{"version":3,"file":"index.js.map","sources":["<anon>","node_modules/@parcel/runtime-js/lib/runtime-4452d46fe566738c.js","node_modules/dayjs/dayjs.min.js","node_modules/dayjs/plugin/utc.js","node_modules/dayjs/plugin/customParseFormat.js","node_modules/dayjs/plugin/isSameOrBefore.js","node_modules/buffer/index.js","node_modules/base64-js/index.js","node_modules/ieee754/index.js","node_modules/@alpinejs/focus/dist/module.esm.js","node_modules/@alpinejs/sort/dist/module.esm.js","src/components/application_form_fields/options_editor.js","src/components/application_form_fields/conditional_field_config.js","src/components/command_palette/command_palette.js","src/components/filter/filter.js","src/pages/reporting/components/reporting_views.js","src/components/form_inputs/combobox.js","src/components/form_inputs/file_input.js","src/components/form_inputs/multi_file_input.js","src/components/form_inputs/phone_input.js","src/components/job_posting_wizard/job_form.js","src/components/job_posting_wizard/workflow.js","node_modules/js-cookie/dist/js.cookie.js","src/components/organizations/organization_sortable.js","src/components/candidate_detail/mention_comment_form.js","src/components/wysiwyg/wysiwyg.js","node_modules/@tiptap/core/dist/index.js","node_modules/@tiptap/core/src/helpers/createChainableState.ts","node_modules/@tiptap/core/src/CommandManager.ts","node_modules/@tiptap/core/src/EventEmitter.ts","node_modules/@tiptap/core/src/helpers/getExtensionField.ts","node_modules/@tiptap/core/src/helpers/splitExtensions.ts","node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts","node_modules/@tiptap/core/src/helpers/getNodeType.ts","node_modules/@tiptap/core/src/utilities/mergeAttributes.ts","node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts","node_modules/@tiptap/core/src/utilities/isFunction.ts","node_modules/@tiptap/core/src/utilities/callOrReturn.ts","node_modules/@tiptap/core/src/utilities/isEmptyObject.ts","node_modules/@tiptap/core/src/utilities/fromString.ts","node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts","node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts","node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts","node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts","node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts","node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts","node_modules/@tiptap/core/src/utilities/isRegExp.ts","node_modules/@tiptap/core/src/InputRule.ts","node_modules/@tiptap/core/src/utilities/isPlainObject.ts","node_modules/@tiptap/core/src/utilities/mergeDeep.ts","node_modules/@tiptap/core/src/Mark.ts","node_modules/@tiptap/core/src/utilities/isNumber.ts","node_modules/@tiptap/core/src/PasteRule.ts","node_modules/@tiptap/core/src/utilities/findDuplicates.ts","node_modules/@tiptap/core/src/ExtensionManager.ts","node_modules/@tiptap/core/src/Extension.ts","node_modules/@tiptap/core/src/helpers/getTextBetween.ts","node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts","node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts","node_modules/@tiptap/core/src/commands/blur.ts","node_modules/@tiptap/core/src/commands/clearContent.ts","node_modules/@tiptap/core/src/commands/clearNodes.ts","node_modules/@tiptap/core/src/commands/command.ts","node_modules/@tiptap/core/src/commands/createParagraphNear.ts","node_modules/@tiptap/core/src/commands/cut.ts","node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts","node_modules/@tiptap/core/src/commands/deleteNode.ts","node_modules/@tiptap/core/src/commands/deleteRange.ts","node_modules/@tiptap/core/src/commands/deleteSelection.ts","node_modules/@tiptap/core/src/commands/enter.ts","node_modules/@tiptap/core/src/commands/exitCode.ts","node_modules/@tiptap/core/src/utilities/objectIncludes.ts","node_modules/@tiptap/core/src/helpers/getMarkRange.ts","node_modules/@tiptap/core/src/helpers/getMarkType.ts","node_modules/@tiptap/core/src/commands/extendMarkRange.ts","node_modules/@tiptap/core/src/commands/first.ts","node_modules/@tiptap/core/src/helpers/isTextSelection.ts","node_modules/@tiptap/core/src/utilities/minMax.ts","node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts","node_modules/@tiptap/core/src/utilities/isAndroid.ts","node_modules/@tiptap/core/src/utilities/isiOS.ts","node_modules/@tiptap/core/src/commands/focus.ts","node_modules/@tiptap/core/src/commands/forEach.ts","node_modules/@tiptap/core/src/commands/insertContent.ts","node_modules/@tiptap/core/src/utilities/elementFromString.ts","node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts","node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts","node_modules/@tiptap/core/src/commands/insertContentAt.ts","node_modules/@tiptap/core/src/commands/join.ts","node_modules/@tiptap/core/src/commands/joinItemBackward.ts","node_modules/@tiptap/core/src/commands/joinItemForward.ts","node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts","node_modules/@tiptap/core/src/commands/joinTextblockForward.ts","node_modules/@tiptap/core/src/utilities/isMacOS.ts","node_modules/@tiptap/core/src/commands/keyboardShortcut.ts","node_modules/@tiptap/core/src/helpers/isNodeActive.ts","node_modules/@tiptap/core/src/commands/lift.ts","node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts","node_modules/@tiptap/core/src/commands/liftListItem.ts","node_modules/@tiptap/core/src/commands/newlineInCode.ts","node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts","node_modules/@tiptap/core/src/utilities/deleteProps.ts","node_modules/@tiptap/core/src/commands/resetAttributes.ts","node_modules/@tiptap/core/src/commands/scrollIntoView.ts","node_modules/@tiptap/core/src/commands/selectAll.ts","node_modules/@tiptap/core/src/commands/selectNodeBackward.ts","node_modules/@tiptap/core/src/commands/selectNodeForward.ts","node_modules/@tiptap/core/src/commands/selectParentNode.ts","node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts","node_modules/@tiptap/core/src/commands/selectTextblockStart.ts","node_modules/@tiptap/core/src/helpers/createDocument.ts","node_modules/@tiptap/core/src/commands/setContent.ts","node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts","node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts","node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts","node_modules/@tiptap/core/src/helpers/findChildren.ts","node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts","node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts","node_modules/@tiptap/core/src/helpers/findParentNode.ts","node_modules/@tiptap/core/src/helpers/getSchema.ts","node_modules/@tiptap/core/src/helpers/generateHTML.ts","node_modules/@tiptap/core/src/helpers/generateJSON.ts","node_modules/@tiptap/core/src/helpers/getText.ts","node_modules/@tiptap/core/src/helpers/generateText.ts","node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts","node_modules/@tiptap/core/src/helpers/getAttributes.ts","node_modules/@tiptap/core/src/utilities/removeDuplicates.ts","node_modules/@tiptap/core/src/helpers/getChangedRanges.ts","node_modules/@tiptap/core/src/helpers/getDebugJSON.ts","node_modules/@tiptap/core/src/helpers/getMarksBetween.ts","node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts","node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts","node_modules/@tiptap/core/src/helpers/isMarkActive.ts","node_modules/@tiptap/core/src/helpers/isActive.ts","node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts","node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts","node_modules/@tiptap/core/src/helpers/isList.ts","node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts","node_modules/@tiptap/core/src/helpers/isNodeSelection.ts","node_modules/@tiptap/core/src/helpers/posToDOMRect.ts","node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts","node_modules/@tiptap/core/src/commands/setMark.ts","node_modules/@tiptap/core/src/commands/setMeta.ts","node_modules/@tiptap/core/src/commands/setNode.ts","node_modules/@tiptap/core/src/commands/setNodeSelection.ts","node_modules/@tiptap/core/src/commands/setTextSelection.ts","node_modules/@tiptap/core/src/commands/sinkListItem.ts","node_modules/@tiptap/core/src/commands/splitBlock.ts","node_modules/@tiptap/core/src/commands/splitListItem.ts","node_modules/@tiptap/core/src/commands/toggleList.ts","node_modules/@tiptap/core/src/commands/toggleMark.ts","node_modules/@tiptap/core/src/commands/toggleNode.ts","node_modules/@tiptap/core/src/commands/toggleWrap.ts","node_modules/@tiptap/core/src/commands/undoInputRule.ts","node_modules/@tiptap/core/src/commands/unsetAllMarks.ts","node_modules/@tiptap/core/src/commands/unsetMark.ts","node_modules/@tiptap/core/src/commands/updateAttributes.ts","node_modules/@tiptap/core/src/commands/wrapIn.ts","node_modules/@tiptap/core/src/commands/wrapInList.ts","node_modules/@tiptap/core/src/extensions/commands.ts","node_modules/@tiptap/core/src/extensions/drop.ts","node_modules/@tiptap/core/src/extensions/editable.ts","node_modules/@tiptap/core/src/extensions/focusEvents.ts","node_modules/@tiptap/core/src/extensions/keymap.ts","node_modules/@tiptap/core/src/extensions/paste.ts","node_modules/@tiptap/core/src/extensions/tabindex.ts","node_modules/@tiptap/core/src/NodePos.ts","node_modules/@tiptap/core/src/style.ts","node_modules/@tiptap/core/src/utilities/createStyleTag.ts","node_modules/@tiptap/core/src/Editor.ts","node_modules/@tiptap/core/src/inputRules/markInputRule.ts","node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts","node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts","node_modules/@tiptap/core/src/inputRules/textInputRule.ts","node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts","node_modules/@tiptap/core/src/Node.ts","node_modules/@tiptap/core/src/NodeView.ts","node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts","node_modules/@tiptap/core/src/utilities/canInsertNode.ts","node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts","node_modules/@tiptap/core/src/utilities/isString.ts","node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts","node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts","node_modules/@tiptap/core/src/Tracker.ts","node_modules/@tiptap/pm/state/dist/index.js","node_modules/prosemirror-state/dist/index.js","node_modules/prosemirror-model/dist/index.js","node_modules/orderedmap/dist/index.js","node_modules/prosemirror-transform/dist/index.js","node_modules/@tiptap/pm/view/dist/index.js","node_modules/prosemirror-view/dist/index.js","node_modules/@tiptap/pm/keymap/dist/index.js","node_modules/prosemirror-keymap/dist/index.js","node_modules/w3c-keyname/index.js","node_modules/@tiptap/pm/model/dist/index.js","node_modules/@tiptap/pm/transform/dist/index.js","node_modules/@tiptap/pm/commands/dist/index.js","node_modules/prosemirror-commands/dist/index.js","node_modules/@tiptap/pm/schema-list/dist/index.js","node_modules/prosemirror-schema-list/dist/index.js","node_modules/@tiptap/extension-color/dist/index.js","node_modules/@tiptap/extension-color/src/color.ts","node_modules/@tiptap/extension-text-style/dist/index.js","node_modules/@tiptap/extension-text-style/src/text-style.ts","node_modules/@tiptap/extension-highlight/dist/index.js","node_modules/@tiptap/extension-highlight/src/highlight.ts","node_modules/@tiptap/extension-image/dist/index.js","node_modules/@tiptap/extension-image/src/image.ts","node_modules/@tiptap/extension-link/dist/index.js","node_modules/@tiptap/extension-link/src/helpers/whitespace.ts","node_modules/@tiptap/extension-link/src/helpers/autolink.ts","node_modules/@tiptap/extension-link/src/helpers/clickHandler.ts","node_modules/@tiptap/extension-link/src/helpers/pasteHandler.ts","node_modules/@tiptap/extension-link/src/link.ts","node_modules/linkifyjs/dist/linkify.mjs","node_modules/@tiptap/extension-text-align/dist/index.js","node_modules/@tiptap/extension-text-align/src/text-align.ts","node_modules/@tiptap/extension-underline/dist/index.js","node_modules/@tiptap/extension-underline/src/underline.ts","node_modules/@tiptap/starter-kit/dist/index.js","node_modules/@tiptap/starter-kit/src/starter-kit.ts","node_modules/@tiptap/extension-blockquote/dist/index.js","node_modules/@tiptap/extension-blockquote/src/blockquote.ts","node_modules/@tiptap/extension-bold/dist/index.js","node_modules/@tiptap/extension-bold/src/bold.ts","node_modules/@tiptap/extension-bullet-list/dist/index.js","node_modules/@tiptap/extension-bullet-list/src/bullet-list.ts","node_modules/@tiptap/extension-code/dist/index.js","node_modules/@tiptap/extension-code/src/code.ts","node_modules/@tiptap/extension-code-block/dist/index.js","node_modules/@tiptap/extension-code-block/src/code-block.ts","node_modules/@tiptap/extension-document/dist/index.js","node_modules/@tiptap/extension-document/src/document.ts","node_modules/@tiptap/extension-dropcursor/dist/index.js","node_modules/@tiptap/extension-dropcursor/src/dropcursor.ts","node_modules/@tiptap/pm/dropcursor/dist/index.js","node_modules/prosemirror-dropcursor/dist/index.js","node_modules/@tiptap/extension-gapcursor/dist/index.js","node_modules/@tiptap/extension-gapcursor/src/gapcursor.ts","node_modules/@tiptap/pm/gapcursor/dist/index.js","node_modules/prosemirror-gapcursor/dist/index.js","node_modules/@tiptap/extension-hard-break/dist/index.js","node_modules/@tiptap/extension-hard-break/src/hard-break.ts","node_modules/@tiptap/extension-heading/dist/index.js","node_modules/@tiptap/extension-heading/src/heading.ts","node_modules/@tiptap/extension-history/dist/index.js","node_modules/@tiptap/extension-history/src/history.ts","node_modules/@tiptap/pm/history/dist/index.js","node_modules/prosemirror-history/dist/index.js","node_modules/rope-sequence/dist/index.js","node_modules/@tiptap/extension-horizontal-rule/dist/index.js","node_modules/@tiptap/extension-horizontal-rule/src/horizontal-rule.ts","node_modules/@tiptap/extension-italic/dist/index.js","node_modules/@tiptap/extension-italic/src/italic.ts","node_modules/@tiptap/extension-list-item/dist/index.js","node_modules/@tiptap/extension-list-item/src/list-item.ts","node_modules/@tiptap/extension-ordered-list/dist/index.js","node_modules/@tiptap/extension-ordered-list/src/ordered-list.ts","node_modules/@tiptap/extension-paragraph/dist/index.js","node_modules/@tiptap/extension-paragraph/src/paragraph.ts","node_modules/@tiptap/extension-strike/dist/index.js","node_modules/@tiptap/extension-strike/src/strike.ts","node_modules/@tiptap/extension-text/dist/index.js","node_modules/@tiptap/extension-text/src/text.ts","src/components/wysiwyg/variableSuggestion.js","node_modules/@tiptap/suggestion/dist/index.js","node_modules/@tiptap/suggestion/src/findSuggestionMatch.ts","node_modules/@tiptap/suggestion/src/suggestion.ts","src/components/wysiwyg/variableNode.js","src/components/wysiwyg/imageResizer.js","src/components/wysiwyg/emailImageWidth.mjs","src/components/wysiwyg/emailTableExtension.js","node_modules/@parcel/runtime-js/lib/runtime-401d874b453e0b16.js","node_modules/@parcel/runtime-js/lib/helpers/browser/js-loader.js","node_modules/@parcel/runtime-js/lib/helpers/cacheLoader.js","node_modules/@parcel/runtime-js/lib/runtime-d661c20d681015dc.js","src/pages/scheduling/components/availability_calendar.js","node_modules/dayjs/plugin/timezone.js","node_modules/dayjs/plugin/isoWeek.js","src/components/careersite/job_list_filter.js","src/pages/organizations/scorecard-weights.js","src/components/automations/condition_builder.js","src/components/applications_list/applications_list.js","src/components/candidates_table/candidates_table_mobile.js","src/components/interview_notebook/interview_notebook.js","src/shared/url_param.js","src/pages/organizations/organization_user_list.js","src/shared/slideover.js","src/components/whats_new/whats_new.js","node_modules/@zootools/email-spell-checker/dist/lib/run.js","node_modules/@zootools/email-spell-checker/dist/lib/helpers/assert-valid-user-options.js","node_modules/@zootools/email-spell-checker/dist/lib/helpers/assert.js","node_modules/@zootools/email-spell-checker/dist/lib/suggest-email.js","node_modules/@zootools/email-spell-checker/dist/lib/helpers/encode-email.js","node_modules/@zootools/email-spell-checker/dist/lib/helpers/find-closest-domain.js","node_modules/@zootools/email-spell-checker/dist/lib/helpers/parse-email.js","node_modules/@zootools/email-spell-checker/dist/lib/helpers/trim.js","node_modules/@zootools/email-spell-checker/dist/lib/helpers/get-options.js","node_modules/@zootools/email-spell-checker/dist/lib/config/index.js","node_modules/@zootools/email-spell-checker/dist/lib/fuzzy-detection/sift3-distance.js","src/index.js","node_modules/dayjs/locale/tr.js","node_modules/apexcharts/dist/apexcharts.esm.js","node_modules/qrcode-generator/dist/qrcode.mjs","node_modules/@alpinejs/collapse/dist/module.esm.js","node_modules/@alpinejs/intersect/dist/module.esm.js","node_modules/@alpinejs/mask/dist/module.esm.js","node_modules/@alpinejs/morph/dist/module.esm.js","node_modules/@alpinejs/persist/dist/module.esm.js","node_modules/@alpinejs/ui/dist/module.esm.js","node_modules/alpinejs/dist/module.esm.js","node_modules/@zootools/email-spell-checker/dist/index.js","node_modules/flowbite/lib/esm/index.js","node_modules/flowbite/src/index.ts","node_modules/flowbite/lib/esm/dom/events.js","node_modules/flowbite/src/dom/events.ts","node_modules/flowbite/lib/esm/components/accordion/index.js","node_modules/flowbite/src/components/accordion/index.ts","node_modules/flowbite/lib/esm/dom/instances.js","node_modules/flowbite/src/dom/instances.ts","node_modules/flowbite/lib/esm/components/collapse/index.js","node_modules/flowbite/src/components/collapse/index.ts","node_modules/flowbite/lib/esm/components/carousel/index.js","node_modules/flowbite/src/components/carousel/index.ts","node_modules/flowbite/lib/esm/components/dismiss/index.js","node_modules/flowbite/src/components/dismiss/index.ts","node_modules/flowbite/lib/esm/components/dropdown/index.js","node_modules/flowbite/src/components/dropdown/index.ts","node_modules/@popperjs/core/lib/popper.js","node_modules/@popperjs/core/lib/createPopper.js","node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","node_modules/@popperjs/core/lib/dom-utils/getWindow.js","node_modules/@popperjs/core/lib/utils/math.js","node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","node_modules/@popperjs/core/lib/utils/userAgent.js","node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","node_modules/@popperjs/core/lib/utils/orderModifiers.js","node_modules/@popperjs/core/lib/enums.js","node_modules/@popperjs/core/lib/utils/debounce.js","node_modules/@popperjs/core/lib/utils/mergeByName.js","node_modules/@popperjs/core/lib/modifiers/eventListeners.js","node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","node_modules/@popperjs/core/lib/utils/computeOffsets.js","node_modules/@popperjs/core/lib/utils/getBasePlacement.js","node_modules/@popperjs/core/lib/utils/getVariation.js","node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","node_modules/@popperjs/core/lib/modifiers/computeStyles.js","node_modules/@popperjs/core/lib/modifiers/applyStyles.js","node_modules/@popperjs/core/lib/modifiers/offset.js","node_modules/@popperjs/core/lib/modifiers/flip.js","node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","node_modules/@popperjs/core/lib/utils/detectOverflow.js","node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","node_modules/@popperjs/core/lib/dom-utils/contains.js","node_modules/@popperjs/core/lib/utils/rectToClientRect.js","node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","node_modules/@popperjs/core/lib/utils/expandToHashMap.js","node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","node_modules/@popperjs/core/lib/utils/getAltAxis.js","node_modules/@popperjs/core/lib/utils/within.js","node_modules/@popperjs/core/lib/modifiers/arrow.js","node_modules/@popperjs/core/lib/modifiers/hide.js","node_modules/flowbite/lib/esm/components/modal/index.js","node_modules/flowbite/src/components/modal/index.ts","node_modules/flowbite/lib/esm/components/drawer/index.js","node_modules/flowbite/src/components/drawer/index.ts","node_modules/flowbite/lib/esm/components/tabs/index.js","node_modules/flowbite/src/components/tabs/index.ts","node_modules/flowbite/lib/esm/components/tooltip/index.js","node_modules/flowbite/src/components/tooltip/index.ts","node_modules/flowbite/lib/esm/components/popover/index.js","node_modules/flowbite/src/components/popover/index.ts","node_modules/flowbite/lib/esm/components/dial/index.js","node_modules/flowbite/src/components/dial/index.ts","node_modules/flowbite/lib/esm/components/input-counter/index.js","node_modules/flowbite/src/components/input-counter/index.ts","node_modules/flowbite/lib/esm/components/clipboard/index.js","node_modules/flowbite/src/components/clipboard/index.ts","node_modules/flowbite/lib/esm/components/datepicker/index.js","node_modules/flowbite/src/components/datepicker/index.ts","node_modules/flowbite-datepicker/dist/main.esm.js","node_modules/flowbite/lib/esm/components/index.js","node_modules/flowbite/src/components/index.ts","node_modules/flowbite/src/types/declarations.ts","node_modules/flowbite/src/components/accordion/types.ts","node_modules/flowbite/src/components/carousel/types.ts","node_modules/flowbite/src/components/collapse/types.ts","node_modules/flowbite/src/components/dial/types.ts","node_modules/flowbite/src/components/dismiss/types.ts","node_modules/flowbite/src/components/drawer/types.ts","node_modules/flowbite/src/components/dropdown/types.ts","node_modules/flowbite/src/components/modal/types.ts","node_modules/flowbite/src/components/popover/types.ts","node_modules/flowbite/src/components/tabs/types.ts","node_modules/flowbite/src/components/tooltip/types.ts","node_modules/flowbite/src/components/input-counter/types.ts","node_modules/flowbite/src/components/clipboard/types.ts","node_modules/flowbite/src/components/datepicker/types.ts","node_modules/flowbite/src/dom/types.ts","node_modules/flowbite/src/components/accordion/interface.ts","node_modules/flowbite/src/components/carousel/interface.ts","node_modules/flowbite/src/components/collapse/interface.ts","node_modules/flowbite/src/components/dial/interface.ts","node_modules/flowbite/src/components/dismiss/interface.ts","node_modules/flowbite/src/components/drawer/interface.ts","node_modules/flowbite/src/components/dropdown/interface.ts","node_modules/flowbite/src/components/modal/interface.ts","node_modules/flowbite/src/components/popover/interface.ts","node_modules/flowbite/src/components/tabs/interface.ts","node_modules/flowbite/src/components/tooltip/interface.ts","node_modules/flowbite/src/components/input-counter/interface.ts","node_modules/flowbite/src/components/clipboard/interface.ts","node_modules/flowbite/src/components/datepicker/interface.ts"],"sourcesContent":["(() => {\n\nfunction $parcel$extendImportMap(map) {\n  Object.assign(parcelRequire.i ??= {}, map);\n}\n\nfunction $parcel$export(e, n, v, s) {\n  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\nfunction $parcel$interopDefault(a) {\n  return a && a.__esModule ? a.default : a;\n}\n\nvar $parcel$bundleURL;\nfunction $parcel$resolve(url) {\n  url = parcelRequire.i?.[url] || url;\n  if (!$parcel$bundleURL) {\n    try {\n      throw new Error();\n    } catch (err) {\n      var matches = ('' + err.stack).match(\n        /(https?|file|ftp|(chrome|moz|safari-web)-extension):\\/\\/[^)\\n]+/g,\n      );\n      if (matches) {\n        $parcel$bundleURL = matches[0];\n      } else {\n        return $parcel$distDir + url;\n      }\n    }\n  }\n  return new URL($parcel$distDir + url, $parcel$bundleURL).toString();\n}\n\n      var $parcel$global = globalThis;\n    var $parcel$distDir = \"./\";\n\nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea735\"];\n\nif (parcelRequire == null) {\n  parcelRequire = function(id) {\n    if (id in $parcel$modules) {\n      return $parcel$modules[id].exports;\n    }\n    if (id in $parcel$inits) {\n      var init = $parcel$inits[id];\n      delete $parcel$inits[id];\n      var module = {id: id, exports: {}};\n      $parcel$modules[id] = module;\n      init.call(module.exports, module, module.exports);\n      return module.exports;\n    }\n    var err = new Error(\"Cannot find module '\" + id + \"'\");\n    err.code = 'MODULE_NOT_FOUND';\n    throw err;\n  };\n\n  parcelRequire.register = function register(id, init) {\n    $parcel$inits[id] = init;\n  };\n\n  $parcel$global[\"parcelRequirea735\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"7iEKJ\", function(module, exports) {\n$parcel$extendImportMap({\n    \"jZLek\": \"htmlToMjml.39067302.js\",\n    \"3nQvj\": \"htmlToMjml.e61db9ad.js\",\n    \"4vlhK\": \"mjml-browser.9a86831a.js\"\n});\n\n});\n\nparcelRegister(\"jhwMH\", function(module, exports) {\n!function(t, e) {\n    module.exports = e();\n}(module.exports, function() {\n    \"use strict\";\n    var t = 1e3, e = 6e4, n = 36e5, r = \"millisecond\", i = \"second\", s = \"minute\", u = \"hour\", a = \"day\", o = \"week\", c = \"month\", f = \"quarter\", h = \"year\", d = \"date\", l = \"Invalid Date\", $ = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/, y = /\\[([^\\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = {\n        name: \"en\",\n        weekdays: \"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),\n        months: \"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),\n        ordinal: function(t) {\n            var e = [\n                \"th\",\n                \"st\",\n                \"nd\",\n                \"rd\"\n            ], n = t % 100;\n            return \"[\" + t + (e[(n - 20) % 10] || e[n] || e[0]) + \"]\";\n        }\n    }, m = function(t, e, n) {\n        var r = String(t);\n        return !r || r.length >= e ? t : \"\" + Array(e + 1 - r.length).join(n) + t;\n    }, v = {\n        s: m,\n        z: function(t) {\n            var e = -t.utcOffset(), n = Math.abs(e), r = Math.floor(n / 60), i = n % 60;\n            return (e <= 0 ? \"+\" : \"-\") + m(r, 2, \"0\") + \":\" + m(i, 2, \"0\");\n        },\n        m: function t(e, n) {\n            if (e.date() < n.date()) return -t(n, e);\n            var r = 12 * (n.year() - e.year()) + (n.month() - e.month()), i = e.clone().add(r, c), s = n - i < 0, u = e.clone().add(r + (s ? -1 : 1), c);\n            return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);\n        },\n        a: function(t) {\n            return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);\n        },\n        p: function(t) {\n            return ({\n                M: c,\n                y: h,\n                w: o,\n                d: a,\n                D: d,\n                h: u,\n                m: s,\n                s: i,\n                ms: r,\n                Q: f\n            })[t] || String(t || \"\").toLowerCase().replace(/s$/, \"\");\n        },\n        u: function(t) {\n            return void 0 === t;\n        }\n    }, g = \"en\", D = {};\n    D[g] = M;\n    var p = \"$isDayjsObject\", S = function(t) {\n        return t instanceof _ || !(!t || !t[p]);\n    }, w = function t(e, n, r) {\n        var i;\n        if (!e) return g;\n        if (\"string\" == typeof e) {\n            var s = e.toLowerCase();\n            D[s] && (i = s), n && (D[s] = n, i = s);\n            var u = e.split(\"-\");\n            if (!i && u.length > 1) return t(u[0]);\n        } else {\n            var a = e.name;\n            D[a] = e, i = a;\n        }\n        return !r && i && (g = i), i || !r && g;\n    }, O = function(t, e) {\n        if (S(t)) return t.clone();\n        var n = \"object\" == typeof e ? e : {};\n        return n.date = t, n.args = arguments, new _(n);\n    }, b = v;\n    b.l = w, b.i = S, b.w = function(t, e) {\n        return O(t, {\n            locale: e.$L,\n            utc: e.$u,\n            x: e.$x,\n            $offset: e.$offset\n        });\n    };\n    var _ = function() {\n        function M(t) {\n            this.$L = w(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[p] = !0;\n        }\n        var m = M.prototype;\n        return m.parse = function(t) {\n            this.$d = function(t) {\n                var e = t.date, n = t.utc;\n                if (null === e) return new Date(NaN);\n                if (b.u(e)) return new Date;\n                if (e instanceof Date) return new Date(e);\n                if (\"string\" == typeof e && !/Z$/i.test(e)) {\n                    var r = e.match($);\n                    if (r) {\n                        var i = r[2] - 1 || 0, s = (r[7] || \"0\").substring(0, 3);\n                        return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);\n                    }\n                }\n                return new Date(e);\n            }(t), this.init();\n        }, m.init = function() {\n            var t = this.$d;\n            this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();\n        }, m.$utils = function() {\n            return b;\n        }, m.isValid = function() {\n            return !(this.$d.toString() === l);\n        }, m.isSame = function(t, e) {\n            var n = O(t);\n            return this.startOf(e) <= n && n <= this.endOf(e);\n        }, m.isAfter = function(t, e) {\n            return O(t) < this.startOf(e);\n        }, m.isBefore = function(t, e) {\n            return this.endOf(e) < O(t);\n        }, m.$g = function(t, e, n) {\n            return b.u(t) ? this[e] : this.set(n, t);\n        }, m.unix = function() {\n            return Math.floor(this.valueOf() / 1e3);\n        }, m.valueOf = function() {\n            return this.$d.getTime();\n        }, m.startOf = function(t, e) {\n            var n = this, r = !!b.u(e) || e, f = b.p(t), l = function(t, e) {\n                var i = b.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);\n                return r ? i : i.endOf(a);\n            }, $ = function(t, e) {\n                return b.w(n.toDate()[t].apply(n.toDate(\"s\"), (r ? [\n                    0,\n                    0,\n                    0,\n                    0\n                ] : [\n                    23,\n                    59,\n                    59,\n                    999\n                ]).slice(e)), n);\n            }, y = this.$W, M = this.$M, m = this.$D, v = \"set\" + (this.$u ? \"UTC\" : \"\");\n            switch(f){\n                case h:\n                    return r ? l(1, 0) : l(31, 11);\n                case c:\n                    return r ? l(1, M) : l(0, M + 1);\n                case o:\n                    var g = this.$locale().weekStart || 0, D = (y < g ? y + 7 : y) - g;\n                    return l(r ? m - D : m + (6 - D), M);\n                case a:\n                case d:\n                    return $(v + \"Hours\", 0);\n                case u:\n                    return $(v + \"Minutes\", 1);\n                case s:\n                    return $(v + \"Seconds\", 2);\n                case i:\n                    return $(v + \"Milliseconds\", 3);\n                default:\n                    return this.clone();\n            }\n        }, m.endOf = function(t) {\n            return this.startOf(t, !1);\n        }, m.$set = function(t, e) {\n            var n, o = b.p(t), f = \"set\" + (this.$u ? \"UTC\" : \"\"), l = (n = {}, n[a] = f + \"Date\", n[d] = f + \"Date\", n[c] = f + \"Month\", n[h] = f + \"FullYear\", n[u] = f + \"Hours\", n[s] = f + \"Minutes\", n[i] = f + \"Seconds\", n[r] = f + \"Milliseconds\", n)[o], $ = o === a ? this.$D + (e - this.$W) : e;\n            if (o === c || o === h) {\n                var y = this.clone().set(d, 1);\n                y.$d[l]($), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;\n            } else l && this.$d[l]($);\n            return this.init(), this;\n        }, m.set = function(t, e) {\n            return this.clone().$set(t, e);\n        }, m.get = function(t) {\n            return this[b.p(t)]();\n        }, m.add = function(r, f) {\n            var d, l = this;\n            r = Number(r);\n            var $ = b.p(f), y = function(t) {\n                var e = O(l);\n                return b.w(e.date(e.date() + Math.round(t * r)), l);\n            };\n            if ($ === c) return this.set(c, this.$M + r);\n            if ($ === h) return this.set(h, this.$y + r);\n            if ($ === a) return y(1);\n            if ($ === o) return y(7);\n            var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[$] || 1, m = this.$d.getTime() + r * M;\n            return b.w(m, this);\n        }, m.subtract = function(t, e) {\n            return this.add(-1 * t, e);\n        }, m.format = function(t) {\n            var e = this, n = this.$locale();\n            if (!this.isValid()) return n.invalidDate || l;\n            var r = t || \"YYYY-MM-DDTHH:mm:ssZ\", i = b.z(this), s = this.$H, u = this.$m, a = this.$M, o = n.weekdays, c = n.months, f = n.meridiem, h = function(t, n, i, s) {\n                return t && (t[n] || t(e, r)) || i[n].slice(0, s);\n            }, d = function(t) {\n                return b.s(s % 12 || 12, t, \"0\");\n            }, $ = f || function(t, e, n) {\n                var r = t < 12 ? \"AM\" : \"PM\";\n                return n ? r.toLowerCase() : r;\n            };\n            return r.replace(y, function(t, r) {\n                return r || function(t) {\n                    switch(t){\n                        case \"YY\":\n                            return String(e.$y).slice(-2);\n                        case \"YYYY\":\n                            return b.s(e.$y, 4, \"0\");\n                        case \"M\":\n                            return a + 1;\n                        case \"MM\":\n                            return b.s(a + 1, 2, \"0\");\n                        case \"MMM\":\n                            return h(n.monthsShort, a, c, 3);\n                        case \"MMMM\":\n                            return h(c, a);\n                        case \"D\":\n                            return e.$D;\n                        case \"DD\":\n                            return b.s(e.$D, 2, \"0\");\n                        case \"d\":\n                            return String(e.$W);\n                        case \"dd\":\n                            return h(n.weekdaysMin, e.$W, o, 2);\n                        case \"ddd\":\n                            return h(n.weekdaysShort, e.$W, o, 3);\n                        case \"dddd\":\n                            return o[e.$W];\n                        case \"H\":\n                            return String(s);\n                        case \"HH\":\n                            return b.s(s, 2, \"0\");\n                        case \"h\":\n                            return d(1);\n                        case \"hh\":\n                            return d(2);\n                        case \"a\":\n                            return $(s, u, !0);\n                        case \"A\":\n                            return $(s, u, !1);\n                        case \"m\":\n                            return String(u);\n                        case \"mm\":\n                            return b.s(u, 2, \"0\");\n                        case \"s\":\n                            return String(e.$s);\n                        case \"ss\":\n                            return b.s(e.$s, 2, \"0\");\n                        case \"SSS\":\n                            return b.s(e.$ms, 3, \"0\");\n                        case \"Z\":\n                            return i;\n                    }\n                    return null;\n                }(t) || i.replace(\":\", \"\");\n            });\n        }, m.utcOffset = function() {\n            return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);\n        }, m.diff = function(r, d, l) {\n            var $, y = this, M = b.p(d), m = O(r), v = (m.utcOffset() - this.utcOffset()) * e, g = this - m, D = function() {\n                return b.m(y, m);\n            };\n            switch(M){\n                case h:\n                    $ = D() / 12;\n                    break;\n                case c:\n                    $ = D();\n                    break;\n                case f:\n                    $ = D() / 3;\n                    break;\n                case o:\n                    $ = (g - v) / 6048e5;\n                    break;\n                case a:\n                    $ = (g - v) / 864e5;\n                    break;\n                case u:\n                    $ = g / n;\n                    break;\n                case s:\n                    $ = g / e;\n                    break;\n                case i:\n                    $ = g / t;\n                    break;\n                default:\n                    $ = g;\n            }\n            return l ? $ : b.a($);\n        }, m.daysInMonth = function() {\n            return this.endOf(c).$D;\n        }, m.$locale = function() {\n            return D[this.$L];\n        }, m.locale = function(t, e) {\n            if (!t) return this.$L;\n            var n = this.clone(), r = w(t, e, !0);\n            return r && (n.$L = r), n;\n        }, m.clone = function() {\n            return b.w(this.$d, this);\n        }, m.toDate = function() {\n            return new Date(this.valueOf());\n        }, m.toJSON = function() {\n            return this.isValid() ? this.toISOString() : null;\n        }, m.toISOString = function() {\n            return this.$d.toISOString();\n        }, m.toString = function() {\n            return this.$d.toUTCString();\n        }, M;\n    }(), Y = _.prototype;\n    return O.prototype = Y, [\n        [\n            \"$ms\",\n            r\n        ],\n        [\n            \"$s\",\n            i\n        ],\n        [\n            \"$m\",\n            s\n        ],\n        [\n            \"$H\",\n            u\n        ],\n        [\n            \"$W\",\n            a\n        ],\n        [\n            \"$M\",\n            c\n        ],\n        [\n            \"$y\",\n            h\n        ],\n        [\n            \"$D\",\n            d\n        ]\n    ].forEach(function(t) {\n        Y[t[1]] = function(e) {\n            return this.$g(e, t[0], t[1]);\n        };\n    }), O.extend = function(t, e) {\n        return t.$i || (t(e, _, O), t.$i = !0), O;\n    }, O.locale = w, O.isDayjs = S, O.unix = function(t) {\n        return O(1e3 * t);\n    }, O.en = D[g], O.Ls = D, O.p = {}, O;\n});\n\n});\n\nparcelRegister(\"jSNlv\", function(module, exports) {\n!function(t, i) {\n    module.exports = i();\n}(module.exports, function() {\n    \"use strict\";\n    var t = \"minute\", i = /[+-]\\d\\d(?::?\\d\\d)?/g, e = /([+-]|\\d\\d)/g;\n    return function(s, f, n) {\n        var u = f.prototype;\n        n.utc = function(t) {\n            var i = {\n                date: t,\n                utc: !0,\n                args: arguments\n            };\n            return new f(i);\n        }, u.utc = function(i) {\n            var e = n(this.toDate(), {\n                locale: this.$L,\n                utc: !0\n            });\n            return i ? e.add(this.utcOffset(), t) : e;\n        }, u.local = function() {\n            return n(this.toDate(), {\n                locale: this.$L,\n                utc: !1\n            });\n        };\n        var r = u.parse;\n        u.parse = function(t) {\n            t.utc && (this.$u = !0), this.$utils().u(t.$offset) || (this.$offset = t.$offset), r.call(this, t);\n        };\n        var o = u.init;\n        u.init = function() {\n            if (this.$u) {\n                var t = this.$d;\n                this.$y = t.getUTCFullYear(), this.$M = t.getUTCMonth(), this.$D = t.getUTCDate(), this.$W = t.getUTCDay(), this.$H = t.getUTCHours(), this.$m = t.getUTCMinutes(), this.$s = t.getUTCSeconds(), this.$ms = t.getUTCMilliseconds();\n            } else o.call(this);\n        };\n        var a = u.utcOffset;\n        u.utcOffset = function(s, f) {\n            var n = this.$utils().u;\n            if (n(s)) return this.$u ? 0 : n(this.$offset) ? a.call(this) : this.$offset;\n            if (\"string\" == typeof s && (s = function(t) {\n                void 0 === t && (t = \"\");\n                var s = t.match(i);\n                if (!s) return null;\n                var f = (\"\" + s[0]).match(e) || [\n                    \"-\",\n                    0,\n                    0\n                ], n = f[0], u = 60 * +f[1] + +f[2];\n                return 0 === u ? 0 : \"+\" === n ? u : -u;\n            }(s), null === s)) return this;\n            var u = Math.abs(s) <= 16 ? 60 * s : s;\n            if (0 === u) return this.utc(f);\n            var r = this.clone();\n            if (f) return r.$offset = u, r.$u = !1, r;\n            var o = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();\n            return (r = this.local().add(u + o, t)).$offset = u, r.$x.$localOffset = o, r;\n        };\n        var h = u.format;\n        u.format = function(t) {\n            var i = t || (this.$u ? \"YYYY-MM-DDTHH:mm:ss[Z]\" : \"\");\n            return h.call(this, i);\n        }, u.valueOf = function() {\n            var t = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());\n            return this.$d.valueOf() - 6e4 * t;\n        }, u.isUTC = function() {\n            return !!this.$u;\n        }, u.toISOString = function() {\n            return this.toDate().toISOString();\n        }, u.toString = function() {\n            return this.toDate().toUTCString();\n        };\n        var l = u.toDate;\n        u.toDate = function(t) {\n            return \"s\" === t && this.$offset ? n(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\")).toDate() : l.call(this);\n        };\n        var c = u.diff;\n        u.diff = function(t, i, e) {\n            if (t && this.$u === t.$u) return c.call(this, t, i, e);\n            var s = this.local(), f = n(t).local();\n            return c.call(s, f, i, e);\n        };\n    };\n});\n\n});\n\nparcelRegister(\"6N7gE\", function(module, exports) {\n!function(e, t) {\n    module.exports = t();\n}(module.exports, function() {\n    \"use strict\";\n    var e = {\n        LTS: \"h:mm:ss A\",\n        LT: \"h:mm A\",\n        L: \"MM/DD/YYYY\",\n        LL: \"MMMM D, YYYY\",\n        LLL: \"MMMM D, YYYY h:mm A\",\n        LLLL: \"dddd, MMMM D, YYYY h:mm A\"\n    }, t = /(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\\d/, r = /\\d\\d/, i = /\\d\\d?/, o = /\\d*[^-_:/,()\\s\\d]+/, s = {}, a = function(e) {\n        return (e = +e) + (e > 68 ? 1900 : 2e3);\n    };\n    var f = function(e) {\n        return function(t) {\n            this[e] = +t;\n        };\n    }, h = [\n        /[+-]\\d\\d:?(\\d\\d)?|Z/,\n        function(e) {\n            (this.zone || (this.zone = {})).offset = function(e) {\n                if (!e) return 0;\n                if (\"Z\" === e) return 0;\n                var t = e.match(/([+-]|\\d\\d)/g), n = 60 * t[1] + (+t[2] || 0);\n                return 0 === n ? 0 : \"+\" === t[0] ? -n : n;\n            }(e);\n        }\n    ], u = function(e) {\n        var t = s[e];\n        return t && (t.indexOf ? t : t.s.concat(t.f));\n    }, d = function(e, t) {\n        var n, r = s.meridiem;\n        if (r) {\n            for(var i = 1; i <= 24; i += 1)if (e.indexOf(r(i, 0, t)) > -1) {\n                n = i > 12;\n                break;\n            }\n        } else n = e === (t ? \"pm\" : \"PM\");\n        return n;\n    }, c = {\n        A: [\n            o,\n            function(e) {\n                this.afternoon = d(e, !1);\n            }\n        ],\n        a: [\n            o,\n            function(e) {\n                this.afternoon = d(e, !0);\n            }\n        ],\n        Q: [\n            n,\n            function(e) {\n                this.month = 3 * (e - 1) + 1;\n            }\n        ],\n        S: [\n            n,\n            function(e) {\n                this.milliseconds = 100 * +e;\n            }\n        ],\n        SS: [\n            r,\n            function(e) {\n                this.milliseconds = 10 * +e;\n            }\n        ],\n        SSS: [\n            /\\d{3}/,\n            function(e) {\n                this.milliseconds = +e;\n            }\n        ],\n        s: [\n            i,\n            f(\"seconds\")\n        ],\n        ss: [\n            i,\n            f(\"seconds\")\n        ],\n        m: [\n            i,\n            f(\"minutes\")\n        ],\n        mm: [\n            i,\n            f(\"minutes\")\n        ],\n        H: [\n            i,\n            f(\"hours\")\n        ],\n        h: [\n            i,\n            f(\"hours\")\n        ],\n        HH: [\n            i,\n            f(\"hours\")\n        ],\n        hh: [\n            i,\n            f(\"hours\")\n        ],\n        D: [\n            i,\n            f(\"day\")\n        ],\n        DD: [\n            r,\n            f(\"day\")\n        ],\n        Do: [\n            o,\n            function(e) {\n                var t = s.ordinal, n = e.match(/\\d+/);\n                if (this.day = n[0], t) for(var r = 1; r <= 31; r += 1)t(r).replace(/\\[|\\]/g, \"\") === e && (this.day = r);\n            }\n        ],\n        w: [\n            i,\n            f(\"week\")\n        ],\n        ww: [\n            r,\n            f(\"week\")\n        ],\n        M: [\n            i,\n            f(\"month\")\n        ],\n        MM: [\n            r,\n            f(\"month\")\n        ],\n        MMM: [\n            o,\n            function(e) {\n                var t = u(\"months\"), n = (u(\"monthsShort\") || t.map(function(e) {\n                    return e.slice(0, 3);\n                })).indexOf(e) + 1;\n                if (n < 1) throw new Error;\n                this.month = n % 12 || n;\n            }\n        ],\n        MMMM: [\n            o,\n            function(e) {\n                var t = u(\"months\").indexOf(e) + 1;\n                if (t < 1) throw new Error;\n                this.month = t % 12 || t;\n            }\n        ],\n        Y: [\n            /[+-]?\\d+/,\n            f(\"year\")\n        ],\n        YY: [\n            r,\n            function(e) {\n                this.year = a(e);\n            }\n        ],\n        YYYY: [\n            /\\d{4}/,\n            f(\"year\")\n        ],\n        Z: h,\n        ZZ: h\n    };\n    function l(n) {\n        var r, i;\n        r = n, i = s && s.formats;\n        for(var o = (n = r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t, n, r) {\n            var o = r && r.toUpperCase();\n            return n || i[r] || e[r] || i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g, function(e, t, n) {\n                return t || n.slice(1);\n            });\n        })).match(t), a = o.length, f = 0; f < a; f += 1){\n            var h = o[f], u = c[h], d = u && u[0], l = u && u[1];\n            o[f] = l ? {\n                regex: d,\n                parser: l\n            } : h.replace(/^\\[|\\]$/g, \"\");\n        }\n        return function(e) {\n            for(var t = {}, n = 0, r = 0; n < a; n += 1){\n                var i = o[n];\n                if (\"string\" == typeof i) r += i.length;\n                else {\n                    var s = i.regex, f = i.parser, h = e.slice(r), u = s.exec(h)[0];\n                    f.call(t, u), e = e.replace(u, \"\");\n                }\n            }\n            return function(e) {\n                var t = e.afternoon;\n                if (void 0 !== t) {\n                    var n = e.hours;\n                    t ? n < 12 && (e.hours += 12) : 12 === n && (e.hours = 0), delete e.afternoon;\n                }\n            }(t), t;\n        };\n    }\n    return function(e, t, n) {\n        n.p.customParseFormat = !0, e && e.parseTwoDigitYear && (a = e.parseTwoDigitYear);\n        var r = t.prototype, i = r.parse;\n        r.parse = function(e) {\n            var t = e.date, r = e.utc, o = e.args;\n            this.$u = r;\n            var a = o[1];\n            if (\"string\" == typeof a) {\n                var f = !0 === o[2], h = !0 === o[3], u = f || h, d = o[2];\n                h && (d = o[2]), s = this.$locale(), !f && d && (s = n.Ls[d]), this.$d = function(e, t, n, r) {\n                    try {\n                        if ([\n                            \"x\",\n                            \"X\"\n                        ].indexOf(t) > -1) return new Date((\"X\" === t ? 1e3 : 1) * e);\n                        var i = l(t)(e), o = i.year, s = i.month, a = i.day, f = i.hours, h = i.minutes, u = i.seconds, d = i.milliseconds, c = i.zone, m = i.week, M = new Date, Y = a || (o || s ? 1 : M.getDate()), p = o || M.getFullYear(), v = 0;\n                        o && !s || (v = s > 0 ? s - 1 : M.getMonth());\n                        var D, w = f || 0, g = h || 0, y = u || 0, L = d || 0;\n                        return c ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c.offset * 1e3)) : n ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m && (D = r(D).week(m).toDate()), D);\n                    } catch (e) {\n                        return new Date(\"\");\n                    }\n                }(t, a, r, n), this.init(), d && !0 !== d && (this.$L = this.locale(d).$L), u && t != this.format(a) && (this.$d = new Date(\"\")), s = {};\n            } else if (a instanceof Array) for(var c = a.length, m = 1; m <= c; m += 1){\n                o[1] = a[m - 1];\n                var M = n.apply(this, o);\n                if (M.isValid()) {\n                    this.$d = M.$d, this.$L = M.$L, this.init();\n                    break;\n                }\n                m === c && (this.$d = new Date(\"\"));\n            }\n            else i.call(this, e);\n        };\n    };\n});\n\n});\n\nparcelRegister(\"17sxp\", function(module, exports) {\n!function(e, i) {\n    module.exports = i();\n}(module.exports, function() {\n    \"use strict\";\n    return function(e, i) {\n        i.prototype.isSameOrBefore = function(e, i) {\n            return this.isSame(e, i) || this.isBefore(e, i);\n        };\n    };\n});\n\n});\n\nparcelRegister(\"N0o3H\", function(module, exports) {\n\n$parcel$export(module.exports, \"Buffer\", () => $0934e0939605d48c$export$a143d493d941bafc, (v) => $0934e0939605d48c$export$a143d493d941bafc = v);\n$parcel$export(module.exports, \"INSPECT_MAX_BYTES\", () => $0934e0939605d48c$export$f99ded8fe4b79145, (v) => $0934e0939605d48c$export$f99ded8fe4b79145 = v);\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */ /* eslint-disable no-proto */ var $0934e0939605d48c$export$a143d493d941bafc;\nvar $0934e0939605d48c$export$e4cf37d7f6fb9e0a;\nvar $0934e0939605d48c$export$f99ded8fe4b79145;\nvar $0934e0939605d48c$export$599f31c3813fae4d;\n'use strict';\n\nvar $bQMRt = parcelRequire(\"bQMRt\");\n\nvar $dbnIE = parcelRequire(\"dbnIE\");\nconst $0934e0939605d48c$var$customInspectSymbol = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null;\n$0934e0939605d48c$export$a143d493d941bafc = $0934e0939605d48c$var$Buffer;\n$0934e0939605d48c$export$e4cf37d7f6fb9e0a = $0934e0939605d48c$var$SlowBuffer;\n$0934e0939605d48c$export$f99ded8fe4b79145 = 50;\nconst $0934e0939605d48c$var$K_MAX_LENGTH = 0x7fffffff;\n$0934e0939605d48c$export$599f31c3813fae4d = $0934e0939605d48c$var$K_MAX_LENGTH;\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Print warning and recommend using `buffer` v4.x which has an Object\n *               implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */ $0934e0939605d48c$var$Buffer.TYPED_ARRAY_SUPPORT = $0934e0939605d48c$var$typedArraySupport();\nif (!$0934e0939605d48c$var$Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\nfunction $0934e0939605d48c$var$typedArraySupport() {\n    // Can typed array instances can be augmented?\n    try {\n        const arr = new Uint8Array(1);\n        const proto = {\n            foo: function() {\n                return 42;\n            }\n        };\n        Object.setPrototypeOf(proto, Uint8Array.prototype);\n        Object.setPrototypeOf(arr, proto);\n        return arr.foo() === 42;\n    } catch (e) {\n        return false;\n    }\n}\nObject.defineProperty($0934e0939605d48c$var$Buffer.prototype, 'parent', {\n    enumerable: true,\n    get: function() {\n        if (!$0934e0939605d48c$var$Buffer.isBuffer(this)) return undefined;\n        return this.buffer;\n    }\n});\nObject.defineProperty($0934e0939605d48c$var$Buffer.prototype, 'offset', {\n    enumerable: true,\n    get: function() {\n        if (!$0934e0939605d48c$var$Buffer.isBuffer(this)) return undefined;\n        return this.byteOffset;\n    }\n});\nfunction $0934e0939605d48c$var$createBuffer(length) {\n    if (length > $0934e0939605d48c$var$K_MAX_LENGTH) throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n    // Return an augmented `Uint8Array` instance\n    const buf = new Uint8Array(length);\n    Object.setPrototypeOf(buf, $0934e0939605d48c$var$Buffer.prototype);\n    return buf;\n}\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */ function $0934e0939605d48c$var$Buffer(arg, encodingOrOffset, length) {\n    // Common case.\n    if (typeof arg === 'number') {\n        if (typeof encodingOrOffset === 'string') throw new TypeError('The \"string\" argument must be of type string. Received type number');\n        return $0934e0939605d48c$var$allocUnsafe(arg);\n    }\n    return $0934e0939605d48c$var$from(arg, encodingOrOffset, length);\n}\n$0934e0939605d48c$var$Buffer.poolSize = 8192 // not used by this implementation\n;\nfunction $0934e0939605d48c$var$from(value, encodingOrOffset, length) {\n    if (typeof value === 'string') return $0934e0939605d48c$var$fromString(value, encodingOrOffset);\n    if (ArrayBuffer.isView(value)) return $0934e0939605d48c$var$fromArrayView(value);\n    if (value == null) throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n    if ($0934e0939605d48c$var$isInstance(value, ArrayBuffer) || value && $0934e0939605d48c$var$isInstance(value.buffer, ArrayBuffer)) return $0934e0939605d48c$var$fromArrayBuffer(value, encodingOrOffset, length);\n    if (typeof SharedArrayBuffer !== 'undefined' && ($0934e0939605d48c$var$isInstance(value, SharedArrayBuffer) || value && $0934e0939605d48c$var$isInstance(value.buffer, SharedArrayBuffer))) return $0934e0939605d48c$var$fromArrayBuffer(value, encodingOrOffset, length);\n    if (typeof value === 'number') throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n    const valueOf = value.valueOf && value.valueOf();\n    if (valueOf != null && valueOf !== value) return $0934e0939605d48c$var$Buffer.from(valueOf, encodingOrOffset, length);\n    const b = $0934e0939605d48c$var$fromObject(value);\n    if (b) return b;\n    if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') return $0934e0939605d48c$var$Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);\n    throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n}\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/ $0934e0939605d48c$var$Buffer.from = function(value, encodingOrOffset, length) {\n    return $0934e0939605d48c$var$from(value, encodingOrOffset, length);\n};\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf($0934e0939605d48c$var$Buffer.prototype, Uint8Array.prototype);\nObject.setPrototypeOf($0934e0939605d48c$var$Buffer, Uint8Array);\nfunction $0934e0939605d48c$var$assertSize(size) {\n    if (typeof size !== 'number') throw new TypeError('\"size\" argument must be of type number');\n    else if (size < 0) throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n}\nfunction $0934e0939605d48c$var$alloc(size, fill, encoding) {\n    $0934e0939605d48c$var$assertSize(size);\n    if (size <= 0) return $0934e0939605d48c$var$createBuffer(size);\n    if (fill !== undefined) // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpreted as a start offset.\n    return typeof encoding === 'string' ? $0934e0939605d48c$var$createBuffer(size).fill(fill, encoding) : $0934e0939605d48c$var$createBuffer(size).fill(fill);\n    return $0934e0939605d48c$var$createBuffer(size);\n}\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/ $0934e0939605d48c$var$Buffer.alloc = function(size, fill, encoding) {\n    return $0934e0939605d48c$var$alloc(size, fill, encoding);\n};\nfunction $0934e0939605d48c$var$allocUnsafe(size) {\n    $0934e0939605d48c$var$assertSize(size);\n    return $0934e0939605d48c$var$createBuffer(size < 0 ? 0 : $0934e0939605d48c$var$checked(size) | 0);\n}\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */ $0934e0939605d48c$var$Buffer.allocUnsafe = function(size) {\n    return $0934e0939605d48c$var$allocUnsafe(size);\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */ $0934e0939605d48c$var$Buffer.allocUnsafeSlow = function(size) {\n    return $0934e0939605d48c$var$allocUnsafe(size);\n};\nfunction $0934e0939605d48c$var$fromString(string, encoding) {\n    if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8';\n    if (!$0934e0939605d48c$var$Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding);\n    const length = $0934e0939605d48c$var$byteLength(string, encoding) | 0;\n    let buf = $0934e0939605d48c$var$createBuffer(length);\n    const actual = buf.write(string, encoding);\n    if (actual !== length) // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    buf = buf.slice(0, actual);\n    return buf;\n}\nfunction $0934e0939605d48c$var$fromArrayLike(array) {\n    const length = array.length < 0 ? 0 : $0934e0939605d48c$var$checked(array.length) | 0;\n    const buf = $0934e0939605d48c$var$createBuffer(length);\n    for(let i = 0; i < length; i += 1)buf[i] = array[i] & 255;\n    return buf;\n}\nfunction $0934e0939605d48c$var$fromArrayView(arrayView) {\n    if ($0934e0939605d48c$var$isInstance(arrayView, Uint8Array)) {\n        const copy = new Uint8Array(arrayView);\n        return $0934e0939605d48c$var$fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n    }\n    return $0934e0939605d48c$var$fromArrayLike(arrayView);\n}\nfunction $0934e0939605d48c$var$fromArrayBuffer(array, byteOffset, length) {\n    if (byteOffset < 0 || array.byteLength < byteOffset) throw new RangeError('\"offset\" is outside of buffer bounds');\n    if (array.byteLength < byteOffset + (length || 0)) throw new RangeError('\"length\" is outside of buffer bounds');\n    let buf;\n    if (byteOffset === undefined && length === undefined) buf = new Uint8Array(array);\n    else if (length === undefined) buf = new Uint8Array(array, byteOffset);\n    else buf = new Uint8Array(array, byteOffset, length);\n    // Return an augmented `Uint8Array` instance\n    Object.setPrototypeOf(buf, $0934e0939605d48c$var$Buffer.prototype);\n    return buf;\n}\nfunction $0934e0939605d48c$var$fromObject(obj) {\n    if ($0934e0939605d48c$var$Buffer.isBuffer(obj)) {\n        const len = $0934e0939605d48c$var$checked(obj.length) | 0;\n        const buf = $0934e0939605d48c$var$createBuffer(len);\n        if (buf.length === 0) return buf;\n        obj.copy(buf, 0, 0, len);\n        return buf;\n    }\n    if (obj.length !== undefined) {\n        if (typeof obj.length !== 'number' || $0934e0939605d48c$var$numberIsNaN(obj.length)) return $0934e0939605d48c$var$createBuffer(0);\n        return $0934e0939605d48c$var$fromArrayLike(obj);\n    }\n    if (obj.type === 'Buffer' && Array.isArray(obj.data)) return $0934e0939605d48c$var$fromArrayLike(obj.data);\n}\nfunction $0934e0939605d48c$var$checked(length) {\n    // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n    // length is NaN (which is otherwise coerced to zero.)\n    if (length >= $0934e0939605d48c$var$K_MAX_LENGTH) throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + $0934e0939605d48c$var$K_MAX_LENGTH.toString(16) + ' bytes');\n    return length | 0;\n}\nfunction $0934e0939605d48c$var$SlowBuffer(length) {\n    if (+length != length) length = 0;\n    return $0934e0939605d48c$var$Buffer.alloc(+length);\n}\n$0934e0939605d48c$var$Buffer.isBuffer = function isBuffer(b) {\n    return b != null && b._isBuffer === true && b !== $0934e0939605d48c$var$Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n    ;\n};\n$0934e0939605d48c$var$Buffer.compare = function compare(a, b) {\n    if ($0934e0939605d48c$var$isInstance(a, Uint8Array)) a = $0934e0939605d48c$var$Buffer.from(a, a.offset, a.byteLength);\n    if ($0934e0939605d48c$var$isInstance(b, Uint8Array)) b = $0934e0939605d48c$var$Buffer.from(b, b.offset, b.byteLength);\n    if (!$0934e0939605d48c$var$Buffer.isBuffer(a) || !$0934e0939605d48c$var$Buffer.isBuffer(b)) throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n    if (a === b) return 0;\n    let x = a.length;\n    let y = b.length;\n    for(let i = 0, len = Math.min(x, y); i < len; ++i)if (a[i] !== b[i]) {\n        x = a[i];\n        y = b[i];\n        break;\n    }\n    if (x < y) return -1;\n    if (y < x) return 1;\n    return 0;\n};\n$0934e0939605d48c$var$Buffer.isEncoding = function isEncoding(encoding) {\n    switch(String(encoding).toLowerCase()){\n        case 'hex':\n        case 'utf8':\n        case 'utf-8':\n        case 'ascii':\n        case 'latin1':\n        case 'binary':\n        case 'base64':\n        case 'ucs2':\n        case 'ucs-2':\n        case 'utf16le':\n        case 'utf-16le':\n            return true;\n        default:\n            return false;\n    }\n};\n$0934e0939605d48c$var$Buffer.concat = function concat(list, length) {\n    if (!Array.isArray(list)) throw new TypeError('\"list\" argument must be an Array of Buffers');\n    if (list.length === 0) return $0934e0939605d48c$var$Buffer.alloc(0);\n    let i;\n    if (length === undefined) {\n        length = 0;\n        for(i = 0; i < list.length; ++i)length += list[i].length;\n    }\n    const buffer = $0934e0939605d48c$var$Buffer.allocUnsafe(length);\n    let pos = 0;\n    for(i = 0; i < list.length; ++i){\n        let buf = list[i];\n        if ($0934e0939605d48c$var$isInstance(buf, Uint8Array)) {\n            if (pos + buf.length > buffer.length) {\n                if (!$0934e0939605d48c$var$Buffer.isBuffer(buf)) buf = $0934e0939605d48c$var$Buffer.from(buf);\n                buf.copy(buffer, pos);\n            } else Uint8Array.prototype.set.call(buffer, buf, pos);\n        } else if (!$0934e0939605d48c$var$Buffer.isBuffer(buf)) throw new TypeError('\"list\" argument must be an Array of Buffers');\n        else buf.copy(buffer, pos);\n        pos += buf.length;\n    }\n    return buffer;\n};\nfunction $0934e0939605d48c$var$byteLength(string, encoding) {\n    if ($0934e0939605d48c$var$Buffer.isBuffer(string)) return string.length;\n    if (ArrayBuffer.isView(string) || $0934e0939605d48c$var$isInstance(string, ArrayBuffer)) return string.byteLength;\n    if (typeof string !== 'string') throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);\n    const len = string.length;\n    const mustMatch = arguments.length > 2 && arguments[2] === true;\n    if (!mustMatch && len === 0) return 0;\n    // Use a for loop to avoid recursion\n    let loweredCase = false;\n    for(;;)switch(encoding){\n        case 'ascii':\n        case 'latin1':\n        case 'binary':\n            return len;\n        case 'utf8':\n        case 'utf-8':\n            return $0934e0939605d48c$var$utf8ToBytes(string).length;\n        case 'ucs2':\n        case 'ucs-2':\n        case 'utf16le':\n        case 'utf-16le':\n            return len * 2;\n        case 'hex':\n            return len >>> 1;\n        case 'base64':\n            return $0934e0939605d48c$var$base64ToBytes(string).length;\n        default:\n            if (loweredCase) return mustMatch ? -1 : $0934e0939605d48c$var$utf8ToBytes(string).length // assume utf8\n            ;\n            encoding = ('' + encoding).toLowerCase();\n            loweredCase = true;\n    }\n}\n$0934e0939605d48c$var$Buffer.byteLength = $0934e0939605d48c$var$byteLength;\nfunction $0934e0939605d48c$var$slowToString(encoding, start, end) {\n    let loweredCase = false;\n    // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n    // property of a typed array.\n    // This behaves neither like String nor Uint8Array in that we set start/end\n    // to their upper/lower bounds if the value passed is out of range.\n    // undefined is handled specially as per ECMA-262 6th Edition,\n    // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n    if (start === undefined || start < 0) start = 0;\n    // Return early if start > this.length. Done here to prevent potential uint32\n    // coercion fail below.\n    if (start > this.length) return '';\n    if (end === undefined || end > this.length) end = this.length;\n    if (end <= 0) return '';\n    // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n    end >>>= 0;\n    start >>>= 0;\n    if (end <= start) return '';\n    if (!encoding) encoding = 'utf8';\n    while(true)switch(encoding){\n        case 'hex':\n            return $0934e0939605d48c$var$hexSlice(this, start, end);\n        case 'utf8':\n        case 'utf-8':\n            return $0934e0939605d48c$var$utf8Slice(this, start, end);\n        case 'ascii':\n            return $0934e0939605d48c$var$asciiSlice(this, start, end);\n        case 'latin1':\n        case 'binary':\n            return $0934e0939605d48c$var$latin1Slice(this, start, end);\n        case 'base64':\n            return $0934e0939605d48c$var$base64Slice(this, start, end);\n        case 'ucs2':\n        case 'ucs-2':\n        case 'utf16le':\n        case 'utf-16le':\n            return $0934e0939605d48c$var$utf16leSlice(this, start, end);\n        default:\n            if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n            encoding = (encoding + '').toLowerCase();\n            loweredCase = true;\n    }\n}\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\n$0934e0939605d48c$var$Buffer.prototype._isBuffer = true;\nfunction $0934e0939605d48c$var$swap(b, n, m) {\n    const i = b[n];\n    b[n] = b[m];\n    b[m] = i;\n}\n$0934e0939605d48c$var$Buffer.prototype.swap16 = function swap16() {\n    const len = this.length;\n    if (len % 2 !== 0) throw new RangeError('Buffer size must be a multiple of 16-bits');\n    for(let i = 0; i < len; i += 2)$0934e0939605d48c$var$swap(this, i, i + 1);\n    return this;\n};\n$0934e0939605d48c$var$Buffer.prototype.swap32 = function swap32() {\n    const len = this.length;\n    if (len % 4 !== 0) throw new RangeError('Buffer size must be a multiple of 32-bits');\n    for(let i = 0; i < len; i += 4){\n        $0934e0939605d48c$var$swap(this, i, i + 3);\n        $0934e0939605d48c$var$swap(this, i + 1, i + 2);\n    }\n    return this;\n};\n$0934e0939605d48c$var$Buffer.prototype.swap64 = function swap64() {\n    const len = this.length;\n    if (len % 8 !== 0) throw new RangeError('Buffer size must be a multiple of 64-bits');\n    for(let i = 0; i < len; i += 8){\n        $0934e0939605d48c$var$swap(this, i, i + 7);\n        $0934e0939605d48c$var$swap(this, i + 1, i + 6);\n        $0934e0939605d48c$var$swap(this, i + 2, i + 5);\n        $0934e0939605d48c$var$swap(this, i + 3, i + 4);\n    }\n    return this;\n};\n$0934e0939605d48c$var$Buffer.prototype.toString = function toString() {\n    const length = this.length;\n    if (length === 0) return '';\n    if (arguments.length === 0) return $0934e0939605d48c$var$utf8Slice(this, 0, length);\n    return $0934e0939605d48c$var$slowToString.apply(this, arguments);\n};\n$0934e0939605d48c$var$Buffer.prototype.toLocaleString = $0934e0939605d48c$var$Buffer.prototype.toString;\n$0934e0939605d48c$var$Buffer.prototype.equals = function equals(b) {\n    if (!$0934e0939605d48c$var$Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');\n    if (this === b) return true;\n    return $0934e0939605d48c$var$Buffer.compare(this, b) === 0;\n};\n$0934e0939605d48c$var$Buffer.prototype.inspect = function inspect() {\n    let str = '';\n    const max = $0934e0939605d48c$export$f99ded8fe4b79145;\n    str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n    if (this.length > max) str += ' ... ';\n    return '<Buffer ' + str + '>';\n};\nif ($0934e0939605d48c$var$customInspectSymbol) $0934e0939605d48c$var$Buffer.prototype[$0934e0939605d48c$var$customInspectSymbol] = $0934e0939605d48c$var$Buffer.prototype.inspect;\n$0934e0939605d48c$var$Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n    if ($0934e0939605d48c$var$isInstance(target, Uint8Array)) target = $0934e0939605d48c$var$Buffer.from(target, target.offset, target.byteLength);\n    if (!$0934e0939605d48c$var$Buffer.isBuffer(target)) throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n    if (start === undefined) start = 0;\n    if (end === undefined) end = target ? target.length : 0;\n    if (thisStart === undefined) thisStart = 0;\n    if (thisEnd === undefined) thisEnd = this.length;\n    if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) throw new RangeError('out of range index');\n    if (thisStart >= thisEnd && start >= end) return 0;\n    if (thisStart >= thisEnd) return -1;\n    if (start >= end) return 1;\n    start >>>= 0;\n    end >>>= 0;\n    thisStart >>>= 0;\n    thisEnd >>>= 0;\n    if (this === target) return 0;\n    let x = thisEnd - thisStart;\n    let y = end - start;\n    const len = Math.min(x, y);\n    const thisCopy = this.slice(thisStart, thisEnd);\n    const targetCopy = target.slice(start, end);\n    for(let i = 0; i < len; ++i)if (thisCopy[i] !== targetCopy[i]) {\n        x = thisCopy[i];\n        y = targetCopy[i];\n        break;\n    }\n    if (x < y) return -1;\n    if (y < x) return 1;\n    return 0;\n};\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction $0934e0939605d48c$var$bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n    // Empty buffer means no match\n    if (buffer.length === 0) return -1;\n    // Normalize byteOffset\n    if (typeof byteOffset === 'string') {\n        encoding = byteOffset;\n        byteOffset = 0;\n    } else if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff;\n    else if (byteOffset < -2147483648) byteOffset = -2147483648;\n    byteOffset = +byteOffset // Coerce to Number.\n    ;\n    if ($0934e0939605d48c$var$numberIsNaN(byteOffset)) // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : buffer.length - 1;\n    // Normalize byteOffset: negative offsets start from the end of the buffer\n    if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n    if (byteOffset >= buffer.length) {\n        if (dir) return -1;\n        else byteOffset = buffer.length - 1;\n    } else if (byteOffset < 0) {\n        if (dir) byteOffset = 0;\n        else return -1;\n    }\n    // Normalize val\n    if (typeof val === 'string') val = $0934e0939605d48c$var$Buffer.from(val, encoding);\n    // Finally, search either indexOf (if dir is true) or lastIndexOf\n    if ($0934e0939605d48c$var$Buffer.isBuffer(val)) {\n        // Special case: looking for empty string/buffer always fails\n        if (val.length === 0) return -1;\n        return $0934e0939605d48c$var$arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n    } else if (typeof val === 'number') {\n        val = val & 0xFF // Search for a byte value [0-255]\n        ;\n        if (typeof Uint8Array.prototype.indexOf === 'function') {\n            if (dir) return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n            else return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n        }\n        return $0934e0939605d48c$var$arrayIndexOf(buffer, [\n            val\n        ], byteOffset, encoding, dir);\n    }\n    throw new TypeError('val must be string, number or Buffer');\n}\nfunction $0934e0939605d48c$var$arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n    let indexSize = 1;\n    let arrLength = arr.length;\n    let valLength = val.length;\n    if (encoding !== undefined) {\n        encoding = String(encoding).toLowerCase();\n        if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {\n            if (arr.length < 2 || val.length < 2) return -1;\n            indexSize = 2;\n            arrLength /= 2;\n            valLength /= 2;\n            byteOffset /= 2;\n        }\n    }\n    function read(buf, i) {\n        if (indexSize === 1) return buf[i];\n        else return buf.readUInt16BE(i * indexSize);\n    }\n    let i;\n    if (dir) {\n        let foundIndex = -1;\n        for(i = byteOffset; i < arrLength; i++)if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n            if (foundIndex === -1) foundIndex = i;\n            if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;\n        } else {\n            if (foundIndex !== -1) i -= i - foundIndex;\n            foundIndex = -1;\n        }\n    } else {\n        if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n        for(i = byteOffset; i >= 0; i--){\n            let found = true;\n            for(let j = 0; j < valLength; j++)if (read(arr, i + j) !== read(val, j)) {\n                found = false;\n                break;\n            }\n            if (found) return i;\n        }\n    }\n    return -1;\n}\n$0934e0939605d48c$var$Buffer.prototype.includes = function includes(val, byteOffset, encoding) {\n    return this.indexOf(val, byteOffset, encoding) !== -1;\n};\n$0934e0939605d48c$var$Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n    return $0934e0939605d48c$var$bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n};\n$0934e0939605d48c$var$Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n    return $0934e0939605d48c$var$bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n};\nfunction $0934e0939605d48c$var$hexWrite(buf, string, offset, length) {\n    offset = Number(offset) || 0;\n    const remaining = buf.length - offset;\n    if (!length) length = remaining;\n    else {\n        length = Number(length);\n        if (length > remaining) length = remaining;\n    }\n    const strLen = string.length;\n    if (length > strLen / 2) length = strLen / 2;\n    let i;\n    for(i = 0; i < length; ++i){\n        const parsed = parseInt(string.substr(i * 2, 2), 16);\n        if ($0934e0939605d48c$var$numberIsNaN(parsed)) return i;\n        buf[offset + i] = parsed;\n    }\n    return i;\n}\nfunction $0934e0939605d48c$var$utf8Write(buf, string, offset, length) {\n    return $0934e0939605d48c$var$blitBuffer($0934e0939605d48c$var$utf8ToBytes(string, buf.length - offset), buf, offset, length);\n}\nfunction $0934e0939605d48c$var$asciiWrite(buf, string, offset, length) {\n    return $0934e0939605d48c$var$blitBuffer($0934e0939605d48c$var$asciiToBytes(string), buf, offset, length);\n}\nfunction $0934e0939605d48c$var$base64Write(buf, string, offset, length) {\n    return $0934e0939605d48c$var$blitBuffer($0934e0939605d48c$var$base64ToBytes(string), buf, offset, length);\n}\nfunction $0934e0939605d48c$var$ucs2Write(buf, string, offset, length) {\n    return $0934e0939605d48c$var$blitBuffer($0934e0939605d48c$var$utf16leToBytes(string, buf.length - offset), buf, offset, length);\n}\n$0934e0939605d48c$var$Buffer.prototype.write = function write(string, offset, length, encoding) {\n    // Buffer#write(string)\n    if (offset === undefined) {\n        encoding = 'utf8';\n        length = this.length;\n        offset = 0;\n    // Buffer#write(string, encoding)\n    } else if (length === undefined && typeof offset === 'string') {\n        encoding = offset;\n        length = this.length;\n        offset = 0;\n    // Buffer#write(string, offset[, length][, encoding])\n    } else if (isFinite(offset)) {\n        offset = offset >>> 0;\n        if (isFinite(length)) {\n            length = length >>> 0;\n            if (encoding === undefined) encoding = 'utf8';\n        } else {\n            encoding = length;\n            length = undefined;\n        }\n    } else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n    const remaining = this.length - offset;\n    if (length === undefined || length > remaining) length = remaining;\n    if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) throw new RangeError('Attempt to write outside buffer bounds');\n    if (!encoding) encoding = 'utf8';\n    let loweredCase = false;\n    for(;;)switch(encoding){\n        case 'hex':\n            return $0934e0939605d48c$var$hexWrite(this, string, offset, length);\n        case 'utf8':\n        case 'utf-8':\n            return $0934e0939605d48c$var$utf8Write(this, string, offset, length);\n        case 'ascii':\n        case 'latin1':\n        case 'binary':\n            return $0934e0939605d48c$var$asciiWrite(this, string, offset, length);\n        case 'base64':\n            // Warning: maxLength not taken into account in base64Write\n            return $0934e0939605d48c$var$base64Write(this, string, offset, length);\n        case 'ucs2':\n        case 'ucs-2':\n        case 'utf16le':\n        case 'utf-16le':\n            return $0934e0939605d48c$var$ucs2Write(this, string, offset, length);\n        default:\n            if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n            encoding = ('' + encoding).toLowerCase();\n            loweredCase = true;\n    }\n};\n$0934e0939605d48c$var$Buffer.prototype.toJSON = function toJSON() {\n    return {\n        type: 'Buffer',\n        data: Array.prototype.slice.call(this._arr || this, 0)\n    };\n};\nfunction $0934e0939605d48c$var$base64Slice(buf, start, end) {\n    if (start === 0 && end === buf.length) return $bQMRt.fromByteArray(buf);\n    else return $bQMRt.fromByteArray(buf.slice(start, end));\n}\nfunction $0934e0939605d48c$var$utf8Slice(buf, start, end) {\n    end = Math.min(buf.length, end);\n    const res = [];\n    let i = start;\n    while(i < end){\n        const firstByte = buf[i];\n        let codePoint = null;\n        let bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n        if (i + bytesPerSequence <= end) {\n            let secondByte, thirdByte, fourthByte, tempCodePoint;\n            switch(bytesPerSequence){\n                case 1:\n                    if (firstByte < 0x80) codePoint = firstByte;\n                    break;\n                case 2:\n                    secondByte = buf[i + 1];\n                    if ((secondByte & 0xC0) === 0x80) {\n                        tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;\n                        if (tempCodePoint > 0x7F) codePoint = tempCodePoint;\n                    }\n                    break;\n                case 3:\n                    secondByte = buf[i + 1];\n                    thirdByte = buf[i + 2];\n                    if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n                        tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;\n                        if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) codePoint = tempCodePoint;\n                    }\n                    break;\n                case 4:\n                    secondByte = buf[i + 1];\n                    thirdByte = buf[i + 2];\n                    fourthByte = buf[i + 3];\n                    if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n                        tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;\n                        if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) codePoint = tempCodePoint;\n                    }\n            }\n        }\n        if (codePoint === null) {\n            // we did not generate a valid codePoint so insert a\n            // replacement char (U+FFFD) and advance only 1 byte\n            codePoint = 0xFFFD;\n            bytesPerSequence = 1;\n        } else if (codePoint > 0xFFFF) {\n            // encode to utf16 (surrogate pair dance)\n            codePoint -= 0x10000;\n            res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n            codePoint = 0xDC00 | codePoint & 0x3FF;\n        }\n        res.push(codePoint);\n        i += bytesPerSequence;\n    }\n    return $0934e0939605d48c$var$decodeCodePointsArray(res);\n}\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst $0934e0939605d48c$var$MAX_ARGUMENTS_LENGTH = 0x1000;\nfunction $0934e0939605d48c$var$decodeCodePointsArray(codePoints) {\n    const len = codePoints.length;\n    if (len <= $0934e0939605d48c$var$MAX_ARGUMENTS_LENGTH) return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n    ;\n    // Decode in chunks to avoid \"call stack size exceeded\".\n    let res = '';\n    let i = 0;\n    while(i < len)res += String.fromCharCode.apply(String, codePoints.slice(i, i += $0934e0939605d48c$var$MAX_ARGUMENTS_LENGTH));\n    return res;\n}\nfunction $0934e0939605d48c$var$asciiSlice(buf, start, end) {\n    let ret = '';\n    end = Math.min(buf.length, end);\n    for(let i = start; i < end; ++i)ret += String.fromCharCode(buf[i] & 0x7F);\n    return ret;\n}\nfunction $0934e0939605d48c$var$latin1Slice(buf, start, end) {\n    let ret = '';\n    end = Math.min(buf.length, end);\n    for(let i = start; i < end; ++i)ret += String.fromCharCode(buf[i]);\n    return ret;\n}\nfunction $0934e0939605d48c$var$hexSlice(buf, start, end) {\n    const len = buf.length;\n    if (!start || start < 0) start = 0;\n    if (!end || end < 0 || end > len) end = len;\n    let out = '';\n    for(let i = start; i < end; ++i)out += $0934e0939605d48c$var$hexSliceLookupTable[buf[i]];\n    return out;\n}\nfunction $0934e0939605d48c$var$utf16leSlice(buf, start, end) {\n    const bytes = buf.slice(start, end);\n    let res = '';\n    // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n    for(let i = 0; i < bytes.length - 1; i += 2)res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n    return res;\n}\n$0934e0939605d48c$var$Buffer.prototype.slice = function slice(start, end) {\n    const len = this.length;\n    start = ~~start;\n    end = end === undefined ? len : ~~end;\n    if (start < 0) {\n        start += len;\n        if (start < 0) start = 0;\n    } else if (start > len) start = len;\n    if (end < 0) {\n        end += len;\n        if (end < 0) end = 0;\n    } else if (end > len) end = len;\n    if (end < start) end = start;\n    const newBuf = this.subarray(start, end);\n    // Return an augmented `Uint8Array` instance\n    Object.setPrototypeOf(newBuf, $0934e0939605d48c$var$Buffer.prototype);\n    return newBuf;\n};\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */ function $0934e0939605d48c$var$checkOffset(offset, ext, length) {\n    if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');\n    if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');\n}\n$0934e0939605d48c$var$Buffer.prototype.readUintLE = $0934e0939605d48c$var$Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, byteLength, this.length);\n    let val = this[offset];\n    let mul = 1;\n    let i = 0;\n    while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul;\n    return val;\n};\n$0934e0939605d48c$var$Buffer.prototype.readUintBE = $0934e0939605d48c$var$Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, byteLength, this.length);\n    let val = this[offset + --byteLength];\n    let mul = 1;\n    while(byteLength > 0 && (mul *= 0x100))val += this[offset + --byteLength] * mul;\n    return val;\n};\n$0934e0939605d48c$var$Buffer.prototype.readUint8 = $0934e0939605d48c$var$Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 1, this.length);\n    return this[offset];\n};\n$0934e0939605d48c$var$Buffer.prototype.readUint16LE = $0934e0939605d48c$var$Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 2, this.length);\n    return this[offset] | this[offset + 1] << 8;\n};\n$0934e0939605d48c$var$Buffer.prototype.readUint16BE = $0934e0939605d48c$var$Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 2, this.length);\n    return this[offset] << 8 | this[offset + 1];\n};\n$0934e0939605d48c$var$Buffer.prototype.readUint32LE = $0934e0939605d48c$var$Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 4, this.length);\n    return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n};\n$0934e0939605d48c$var$Buffer.prototype.readUint32BE = $0934e0939605d48c$var$Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 4, this.length);\n    return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n};\n$0934e0939605d48c$var$Buffer.prototype.readBigUInt64LE = $0934e0939605d48c$var$defineBigIntMethod(function readBigUInt64LE(offset) {\n    offset = offset >>> 0;\n    $0934e0939605d48c$var$validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) $0934e0939605d48c$var$boundsError(offset, this.length - 8);\n    const lo = first + this[++offset] * 256 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;\n    const hi = this[++offset] + this[++offset] * 256 + this[++offset] * 2 ** 16 + last * 2 ** 24;\n    return BigInt(lo) + (BigInt(hi) << BigInt(32));\n});\n$0934e0939605d48c$var$Buffer.prototype.readBigUInt64BE = $0934e0939605d48c$var$defineBigIntMethod(function readBigUInt64BE(offset) {\n    offset = offset >>> 0;\n    $0934e0939605d48c$var$validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) $0934e0939605d48c$var$boundsError(offset, this.length - 8);\n    const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + this[++offset];\n    const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + last;\n    return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n});\n$0934e0939605d48c$var$Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, byteLength, this.length);\n    let val = this[offset];\n    let mul = 1;\n    let i = 0;\n    while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul;\n    mul *= 0x80;\n    if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n    return val;\n};\n$0934e0939605d48c$var$Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, byteLength, this.length);\n    let i = byteLength;\n    let mul = 1;\n    let val = this[offset + --i];\n    while(i > 0 && (mul *= 0x100))val += this[offset + --i] * mul;\n    mul *= 0x80;\n    if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n    return val;\n};\n$0934e0939605d48c$var$Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 1, this.length);\n    if (!(this[offset] & 0x80)) return this[offset];\n    return (0xff - this[offset] + 1) * -1;\n};\n$0934e0939605d48c$var$Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 2, this.length);\n    const val = this[offset] | this[offset + 1] << 8;\n    return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n$0934e0939605d48c$var$Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 2, this.length);\n    const val = this[offset + 1] | this[offset] << 8;\n    return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n$0934e0939605d48c$var$Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 4, this.length);\n    return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n};\n$0934e0939605d48c$var$Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 4, this.length);\n    return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n};\n$0934e0939605d48c$var$Buffer.prototype.readBigInt64LE = $0934e0939605d48c$var$defineBigIntMethod(function readBigInt64LE(offset) {\n    offset = offset >>> 0;\n    $0934e0939605d48c$var$validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) $0934e0939605d48c$var$boundsError(offset, this.length - 8);\n    const val = this[offset + 4] + this[offset + 5] * 256 + this[offset + 6] * 2 ** 16 + (last << 24 // Overflow\n    );\n    return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 256 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);\n});\n$0934e0939605d48c$var$Buffer.prototype.readBigInt64BE = $0934e0939605d48c$var$defineBigIntMethod(function readBigInt64BE(offset) {\n    offset = offset >>> 0;\n    $0934e0939605d48c$var$validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) $0934e0939605d48c$var$boundsError(offset, this.length - 8);\n    const val = (first << 24) + // Overflow\n    this[++offset] * 2 ** 16 + this[++offset] * 256 + this[++offset];\n    return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + last);\n});\n$0934e0939605d48c$var$Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 4, this.length);\n    return $dbnIE.read(this, offset, true, 23, 4);\n};\n$0934e0939605d48c$var$Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 4, this.length);\n    return $dbnIE.read(this, offset, false, 23, 4);\n};\n$0934e0939605d48c$var$Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 8, this.length);\n    return $dbnIE.read(this, offset, true, 52, 8);\n};\n$0934e0939605d48c$var$Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkOffset(offset, 8, this.length);\n    return $dbnIE.read(this, offset, false, 52, 8);\n};\nfunction $0934e0939605d48c$var$checkInt(buf, value, offset, ext, max, min) {\n    if (!$0934e0939605d48c$var$Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n    if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds');\n    if (offset + ext > buf.length) throw new RangeError('Index out of range');\n}\n$0934e0939605d48c$var$Buffer.prototype.writeUintLE = $0934e0939605d48c$var$Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) {\n        const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n        $0934e0939605d48c$var$checkInt(this, value, offset, byteLength, maxBytes, 0);\n    }\n    let mul = 1;\n    let i = 0;\n    this[offset] = value & 0xFF;\n    while(++i < byteLength && (mul *= 0x100))this[offset + i] = value / mul & 0xFF;\n    return offset + byteLength;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeUintBE = $0934e0939605d48c$var$Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) {\n        const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n        $0934e0939605d48c$var$checkInt(this, value, offset, byteLength, maxBytes, 0);\n    }\n    let i = byteLength - 1;\n    let mul = 1;\n    this[offset + i] = value & 0xFF;\n    while(--i >= 0 && (mul *= 0x100))this[offset + i] = value / mul & 0xFF;\n    return offset + byteLength;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeUint8 = $0934e0939605d48c$var$Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkInt(this, value, offset, 1, 0xff, 0);\n    this[offset] = value & 0xff;\n    return offset + 1;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeUint16LE = $0934e0939605d48c$var$Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkInt(this, value, offset, 2, 0xffff, 0);\n    this[offset] = value & 0xff;\n    this[offset + 1] = value >>> 8;\n    return offset + 2;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeUint16BE = $0934e0939605d48c$var$Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkInt(this, value, offset, 2, 0xffff, 0);\n    this[offset] = value >>> 8;\n    this[offset + 1] = value & 0xff;\n    return offset + 2;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeUint32LE = $0934e0939605d48c$var$Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkInt(this, value, offset, 4, 0xffffffff, 0);\n    this[offset + 3] = value >>> 24;\n    this[offset + 2] = value >>> 16;\n    this[offset + 1] = value >>> 8;\n    this[offset] = value & 0xff;\n    return offset + 4;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeUint32BE = $0934e0939605d48c$var$Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkInt(this, value, offset, 4, 0xffffffff, 0);\n    this[offset] = value >>> 24;\n    this[offset + 1] = value >>> 16;\n    this[offset + 2] = value >>> 8;\n    this[offset + 3] = value & 0xff;\n    return offset + 4;\n};\nfunction $0934e0939605d48c$var$wrtBigUInt64LE(buf, value, offset, min, max) {\n    $0934e0939605d48c$var$checkIntBI(value, min, max, buf, offset, 7);\n    let lo = Number(value & BigInt(0xffffffff));\n    buf[offset++] = lo;\n    lo = lo >> 8;\n    buf[offset++] = lo;\n    lo = lo >> 8;\n    buf[offset++] = lo;\n    lo = lo >> 8;\n    buf[offset++] = lo;\n    let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n    buf[offset++] = hi;\n    hi = hi >> 8;\n    buf[offset++] = hi;\n    hi = hi >> 8;\n    buf[offset++] = hi;\n    hi = hi >> 8;\n    buf[offset++] = hi;\n    return offset;\n}\nfunction $0934e0939605d48c$var$wrtBigUInt64BE(buf, value, offset, min, max) {\n    $0934e0939605d48c$var$checkIntBI(value, min, max, buf, offset, 7);\n    let lo = Number(value & BigInt(0xffffffff));\n    buf[offset + 7] = lo;\n    lo = lo >> 8;\n    buf[offset + 6] = lo;\n    lo = lo >> 8;\n    buf[offset + 5] = lo;\n    lo = lo >> 8;\n    buf[offset + 4] = lo;\n    let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n    buf[offset + 3] = hi;\n    hi = hi >> 8;\n    buf[offset + 2] = hi;\n    hi = hi >> 8;\n    buf[offset + 1] = hi;\n    hi = hi >> 8;\n    buf[offset] = hi;\n    return offset + 8;\n}\n$0934e0939605d48c$var$Buffer.prototype.writeBigUInt64LE = $0934e0939605d48c$var$defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {\n    return $0934e0939605d48c$var$wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));\n});\n$0934e0939605d48c$var$Buffer.prototype.writeBigUInt64BE = $0934e0939605d48c$var$defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {\n    return $0934e0939605d48c$var$wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));\n});\n$0934e0939605d48c$var$Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) {\n        const limit = Math.pow(2, 8 * byteLength - 1);\n        $0934e0939605d48c$var$checkInt(this, value, offset, byteLength, limit - 1, -limit);\n    }\n    let i = 0;\n    let mul = 1;\n    let sub = 0;\n    this[offset] = value & 0xFF;\n    while(++i < byteLength && (mul *= 0x100)){\n        if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) sub = 1;\n        this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n    }\n    return offset + byteLength;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) {\n        const limit = Math.pow(2, 8 * byteLength - 1);\n        $0934e0939605d48c$var$checkInt(this, value, offset, byteLength, limit - 1, -limit);\n    }\n    let i = byteLength - 1;\n    let mul = 1;\n    let sub = 0;\n    this[offset + i] = value & 0xFF;\n    while(--i >= 0 && (mul *= 0x100)){\n        if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) sub = 1;\n        this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n    }\n    return offset + byteLength;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkInt(this, value, offset, 1, 0x7f, -128);\n    if (value < 0) value = 0xff + value + 1;\n    this[offset] = value & 0xff;\n    return offset + 1;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkInt(this, value, offset, 2, 0x7fff, -32768);\n    this[offset] = value & 0xff;\n    this[offset + 1] = value >>> 8;\n    return offset + 2;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkInt(this, value, offset, 2, 0x7fff, -32768);\n    this[offset] = value >>> 8;\n    this[offset + 1] = value & 0xff;\n    return offset + 2;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);\n    this[offset] = value & 0xff;\n    this[offset + 1] = value >>> 8;\n    this[offset + 2] = value >>> 16;\n    this[offset + 3] = value >>> 24;\n    return offset + 4;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);\n    if (value < 0) value = 0xffffffff + value + 1;\n    this[offset] = value >>> 24;\n    this[offset + 1] = value >>> 16;\n    this[offset + 2] = value >>> 8;\n    this[offset + 3] = value & 0xff;\n    return offset + 4;\n};\n$0934e0939605d48c$var$Buffer.prototype.writeBigInt64LE = $0934e0939605d48c$var$defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {\n    return $0934e0939605d48c$var$wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));\n});\n$0934e0939605d48c$var$Buffer.prototype.writeBigInt64BE = $0934e0939605d48c$var$defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {\n    return $0934e0939605d48c$var$wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));\n});\nfunction $0934e0939605d48c$var$checkIEEE754(buf, value, offset, ext, max, min) {\n    if (offset + ext > buf.length) throw new RangeError('Index out of range');\n    if (offset < 0) throw new RangeError('Index out of range');\n}\nfunction $0934e0939605d48c$var$writeFloat(buf, value, offset, littleEndian, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -340282346638528860000000000000000000000);\n    $dbnIE.write(buf, value, offset, littleEndian, 23, 4);\n    return offset + 4;\n}\n$0934e0939605d48c$var$Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n    return $0934e0939605d48c$var$writeFloat(this, value, offset, true, noAssert);\n};\n$0934e0939605d48c$var$Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n    return $0934e0939605d48c$var$writeFloat(this, value, offset, false, noAssert);\n};\nfunction $0934e0939605d48c$var$writeDouble(buf, value, offset, littleEndian, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $0934e0939605d48c$var$checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);\n    $dbnIE.write(buf, value, offset, littleEndian, 52, 8);\n    return offset + 8;\n}\n$0934e0939605d48c$var$Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n    return $0934e0939605d48c$var$writeDouble(this, value, offset, true, noAssert);\n};\n$0934e0939605d48c$var$Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n    return $0934e0939605d48c$var$writeDouble(this, value, offset, false, noAssert);\n};\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n$0934e0939605d48c$var$Buffer.prototype.copy = function copy(target, targetStart, start, end) {\n    if (!$0934e0939605d48c$var$Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');\n    if (!start) start = 0;\n    if (!end && end !== 0) end = this.length;\n    if (targetStart >= target.length) targetStart = target.length;\n    if (!targetStart) targetStart = 0;\n    if (end > 0 && end < start) end = start;\n    // Copy 0 bytes; we're done\n    if (end === start) return 0;\n    if (target.length === 0 || this.length === 0) return 0;\n    // Fatal error conditions\n    if (targetStart < 0) throw new RangeError('targetStart out of bounds');\n    if (start < 0 || start >= this.length) throw new RangeError('Index out of range');\n    if (end < 0) throw new RangeError('sourceEnd out of bounds');\n    // Are we oob?\n    if (end > this.length) end = this.length;\n    if (target.length - targetStart < end - start) end = target.length - targetStart + start;\n    const len = end - start;\n    if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') // Use built-in when available, missing from IE11\n    this.copyWithin(targetStart, start, end);\n    else Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n    return len;\n};\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\n$0934e0939605d48c$var$Buffer.prototype.fill = function fill(val, start, end, encoding) {\n    // Handle string cases:\n    if (typeof val === 'string') {\n        if (typeof start === 'string') {\n            encoding = start;\n            start = 0;\n            end = this.length;\n        } else if (typeof end === 'string') {\n            encoding = end;\n            end = this.length;\n        }\n        if (encoding !== undefined && typeof encoding !== 'string') throw new TypeError('encoding must be a string');\n        if (typeof encoding === 'string' && !$0934e0939605d48c$var$Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding);\n        if (val.length === 1) {\n            const code = val.charCodeAt(0);\n            if (encoding === 'utf8' && code < 128 || encoding === 'latin1') // Fast path: If `val` fits into a single byte, use that numeric value.\n            val = code;\n        }\n    } else if (typeof val === 'number') val = val & 255;\n    else if (typeof val === 'boolean') val = Number(val);\n    // Invalid ranges are not set to a default, so can range check early.\n    if (start < 0 || this.length < start || this.length < end) throw new RangeError('Out of range index');\n    if (end <= start) return this;\n    start = start >>> 0;\n    end = end === undefined ? this.length : end >>> 0;\n    if (!val) val = 0;\n    let i;\n    if (typeof val === 'number') for(i = start; i < end; ++i)this[i] = val;\n    else {\n        const bytes = $0934e0939605d48c$var$Buffer.isBuffer(val) ? val : $0934e0939605d48c$var$Buffer.from(val, encoding);\n        const len = bytes.length;\n        if (len === 0) throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n        for(i = 0; i < end - start; ++i)this[i + start] = bytes[i % len];\n    }\n    return this;\n};\n// CUSTOM ERRORS\n// =============\n// Simplified versions from Node, changed for Buffer-only usage\nconst $0934e0939605d48c$var$errors = {};\nfunction $0934e0939605d48c$var$E(sym, getMessage, Base) {\n    $0934e0939605d48c$var$errors[sym] = class NodeError extends Base {\n        constructor(){\n            super();\n            Object.defineProperty(this, 'message', {\n                value: getMessage.apply(this, arguments),\n                writable: true,\n                configurable: true\n            });\n            // Add the error code to the name to include it in the stack trace.\n            this.name = `${this.name} [${sym}]`;\n            // Access the stack to generate the error message including the error code\n            // from the name.\n            this.stack // eslint-disable-line no-unused-expressions\n            ;\n            // Reset the name to the actual name.\n            delete this.name;\n        }\n        get code() {\n            return sym;\n        }\n        set code(value) {\n            Object.defineProperty(this, 'code', {\n                configurable: true,\n                enumerable: true,\n                value: value,\n                writable: true\n            });\n        }\n        toString() {\n            return `${this.name} [${sym}]: ${this.message}`;\n        }\n    };\n}\n$0934e0939605d48c$var$E('ERR_BUFFER_OUT_OF_BOUNDS', function(name) {\n    if (name) return `${name} is outside of buffer bounds`;\n    return 'Attempt to access memory outside buffer bounds';\n}, RangeError);\n$0934e0939605d48c$var$E('ERR_INVALID_ARG_TYPE', function(name, actual) {\n    return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n}, TypeError);\n$0934e0939605d48c$var$E('ERR_OUT_OF_RANGE', function(str, range, input) {\n    let msg = `The value of \"${str}\" is out of range.`;\n    let received = input;\n    if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) received = $0934e0939605d48c$var$addNumericalSeparator(String(input));\n    else if (typeof input === 'bigint') {\n        received = String(input);\n        if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) received = $0934e0939605d48c$var$addNumericalSeparator(received);\n        received += 'n';\n    }\n    msg += ` It must be ${range}. Received ${received}`;\n    return msg;\n}, RangeError);\nfunction $0934e0939605d48c$var$addNumericalSeparator(val) {\n    let res = '';\n    let i = val.length;\n    const start = val[0] === '-' ? 1 : 0;\n    for(; i >= start + 4; i -= 3)res = `_${val.slice(i - 3, i)}${res}`;\n    return `${val.slice(0, i)}${res}`;\n}\n// CHECK FUNCTIONS\n// ===============\nfunction $0934e0939605d48c$var$checkBounds(buf, offset, byteLength) {\n    $0934e0939605d48c$var$validateNumber(offset, 'offset');\n    if (buf[offset] === undefined || buf[offset + byteLength] === undefined) $0934e0939605d48c$var$boundsError(offset, buf.length - (byteLength + 1));\n}\nfunction $0934e0939605d48c$var$checkIntBI(value, min, max, buf, offset, byteLength) {\n    if (value > max || value < min) {\n        const n = typeof min === 'bigint' ? 'n' : '';\n        let range;\n        if (byteLength > 3) {\n            if (min === 0 || min === BigInt(0)) range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;\n            else range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` + `${(byteLength + 1) * 8 - 1}${n}`;\n        } else range = `>= ${min}${n} and <= ${max}${n}`;\n        throw new $0934e0939605d48c$var$errors.ERR_OUT_OF_RANGE('value', range, value);\n    }\n    $0934e0939605d48c$var$checkBounds(buf, offset, byteLength);\n}\nfunction $0934e0939605d48c$var$validateNumber(value, name) {\n    if (typeof value !== 'number') throw new $0934e0939605d48c$var$errors.ERR_INVALID_ARG_TYPE(name, 'number', value);\n}\nfunction $0934e0939605d48c$var$boundsError(value, length, type) {\n    if (Math.floor(value) !== value) {\n        $0934e0939605d48c$var$validateNumber(value, type);\n        throw new $0934e0939605d48c$var$errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value);\n    }\n    if (length < 0) throw new $0934e0939605d48c$var$errors.ERR_BUFFER_OUT_OF_BOUNDS();\n    throw new $0934e0939605d48c$var$errors.ERR_OUT_OF_RANGE(type || 'offset', `>= ${type ? 1 : 0} and <= ${length}`, value);\n}\n// HELPER FUNCTIONS\n// ================\nconst $0934e0939605d48c$var$INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\nfunction $0934e0939605d48c$var$base64clean(str) {\n    // Node takes equal signs as end of the Base64 encoding\n    str = str.split('=')[0];\n    // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n    str = str.trim().replace($0934e0939605d48c$var$INVALID_BASE64_RE, '');\n    // Node converts strings with length < 2 to ''\n    if (str.length < 2) return '';\n    // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n    while(str.length % 4 !== 0)str = str + '=';\n    return str;\n}\nfunction $0934e0939605d48c$var$utf8ToBytes(string, units) {\n    units = units || Infinity;\n    let codePoint;\n    const length = string.length;\n    let leadSurrogate = null;\n    const bytes = [];\n    for(let i = 0; i < length; ++i){\n        codePoint = string.charCodeAt(i);\n        // is surrogate component\n        if (codePoint > 0xD7FF && codePoint < 0xE000) {\n            // last char was a lead\n            if (!leadSurrogate) {\n                // no lead yet\n                if (codePoint > 0xDBFF) {\n                    // unexpected trail\n                    if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n                    continue;\n                } else if (i + 1 === length) {\n                    // unpaired lead\n                    if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n                    continue;\n                }\n                // valid lead\n                leadSurrogate = codePoint;\n                continue;\n            }\n            // 2 leads in a row\n            if (codePoint < 0xDC00) {\n                if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n                leadSurrogate = codePoint;\n                continue;\n            }\n            // valid surrogate pair\n            codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n        } else if (leadSurrogate) // valid bmp char, but last char was a lead\n        {\n            if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n        }\n        leadSurrogate = null;\n        // encode utf8\n        if (codePoint < 0x80) {\n            if ((units -= 1) < 0) break;\n            bytes.push(codePoint);\n        } else if (codePoint < 0x800) {\n            if ((units -= 2) < 0) break;\n            bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);\n        } else if (codePoint < 0x10000) {\n            if ((units -= 3) < 0) break;\n            bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n        } else if (codePoint < 0x110000) {\n            if ((units -= 4) < 0) break;\n            bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n        } else throw new Error('Invalid code point');\n    }\n    return bytes;\n}\nfunction $0934e0939605d48c$var$asciiToBytes(str) {\n    const byteArray = [];\n    for(let i = 0; i < str.length; ++i)// Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF);\n    return byteArray;\n}\nfunction $0934e0939605d48c$var$utf16leToBytes(str, units) {\n    let c, hi, lo;\n    const byteArray = [];\n    for(let i = 0; i < str.length; ++i){\n        if ((units -= 2) < 0) break;\n        c = str.charCodeAt(i);\n        hi = c >> 8;\n        lo = c % 256;\n        byteArray.push(lo);\n        byteArray.push(hi);\n    }\n    return byteArray;\n}\nfunction $0934e0939605d48c$var$base64ToBytes(str) {\n    return $bQMRt.toByteArray($0934e0939605d48c$var$base64clean(str));\n}\nfunction $0934e0939605d48c$var$blitBuffer(src, dst, offset, length) {\n    let i;\n    for(i = 0; i < length; ++i){\n        if (i + offset >= dst.length || i >= src.length) break;\n        dst[i + offset] = src[i];\n    }\n    return i;\n}\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction $0934e0939605d48c$var$isInstance(obj, type) {\n    return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n}\nfunction $0934e0939605d48c$var$numberIsNaN(obj) {\n    // For IE11 support\n    return obj !== obj // eslint-disable-line no-self-compare\n    ;\n}\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst $0934e0939605d48c$var$hexSliceLookupTable = function() {\n    const alphabet = '0123456789abcdef';\n    const table = new Array(256);\n    for(let i = 0; i < 16; ++i){\n        const i16 = i * 16;\n        for(let j = 0; j < 16; ++j)table[i16 + j] = alphabet[i] + alphabet[j];\n    }\n    return table;\n}();\n// Return not function with Error if BigInt not supported\nfunction $0934e0939605d48c$var$defineBigIntMethod(fn) {\n    return typeof BigInt === 'undefined' ? $0934e0939605d48c$var$BufferBigIntNotDefined : fn;\n}\nfunction $0934e0939605d48c$var$BufferBigIntNotDefined() {\n    throw new Error('BigInt not supported');\n}\n\n});\nparcelRegister(\"bQMRt\", function(module, exports) {\n\n$parcel$export(module.exports, \"toByteArray\", () => $8a0a73e6b73fd0c4$export$d622b2ad8d90c771, (v) => $8a0a73e6b73fd0c4$export$d622b2ad8d90c771 = v);\n$parcel$export(module.exports, \"fromByteArray\", () => $8a0a73e6b73fd0c4$export$6100ba28696e12de, (v) => $8a0a73e6b73fd0c4$export$6100ba28696e12de = v);\nvar $8a0a73e6b73fd0c4$export$a48f0734ac7c2329;\nvar $8a0a73e6b73fd0c4$export$d622b2ad8d90c771;\nvar $8a0a73e6b73fd0c4$export$6100ba28696e12de;\n'use strict';\n$8a0a73e6b73fd0c4$export$a48f0734ac7c2329 = $8a0a73e6b73fd0c4$var$byteLength;\n$8a0a73e6b73fd0c4$export$d622b2ad8d90c771 = $8a0a73e6b73fd0c4$var$toByteArray;\n$8a0a73e6b73fd0c4$export$6100ba28696e12de = $8a0a73e6b73fd0c4$var$fromByteArray;\nvar $8a0a73e6b73fd0c4$var$lookup = [];\nvar $8a0a73e6b73fd0c4$var$revLookup = [];\nvar $8a0a73e6b73fd0c4$var$Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\nvar $8a0a73e6b73fd0c4$var$code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor(var $8a0a73e6b73fd0c4$var$i = 0, $8a0a73e6b73fd0c4$var$len = $8a0a73e6b73fd0c4$var$code.length; $8a0a73e6b73fd0c4$var$i < $8a0a73e6b73fd0c4$var$len; ++$8a0a73e6b73fd0c4$var$i){\n    $8a0a73e6b73fd0c4$var$lookup[$8a0a73e6b73fd0c4$var$i] = $8a0a73e6b73fd0c4$var$code[$8a0a73e6b73fd0c4$var$i];\n    $8a0a73e6b73fd0c4$var$revLookup[$8a0a73e6b73fd0c4$var$code.charCodeAt($8a0a73e6b73fd0c4$var$i)] = $8a0a73e6b73fd0c4$var$i;\n}\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\n$8a0a73e6b73fd0c4$var$revLookup['-'.charCodeAt(0)] = 62;\n$8a0a73e6b73fd0c4$var$revLookup['_'.charCodeAt(0)] = 63;\nfunction $8a0a73e6b73fd0c4$var$getLens(b64) {\n    var len = b64.length;\n    if (len % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4');\n    // Trim off extra bytes after placeholder bytes are found\n    // See: https://github.com/beatgammit/base64-js/issues/42\n    var validLen = b64.indexOf('=');\n    if (validLen === -1) validLen = len;\n    var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;\n    return [\n        validLen,\n        placeHoldersLen\n    ];\n}\n// base64 is 4/3 + up to two characters of the original data\nfunction $8a0a73e6b73fd0c4$var$byteLength(b64) {\n    var lens = $8a0a73e6b73fd0c4$var$getLens(b64);\n    var validLen = lens[0];\n    var placeHoldersLen = lens[1];\n    return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction $8a0a73e6b73fd0c4$var$_byteLength(b64, validLen, placeHoldersLen) {\n    return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction $8a0a73e6b73fd0c4$var$toByteArray(b64) {\n    var tmp;\n    var lens = $8a0a73e6b73fd0c4$var$getLens(b64);\n    var validLen = lens[0];\n    var placeHoldersLen = lens[1];\n    var arr = new $8a0a73e6b73fd0c4$var$Arr($8a0a73e6b73fd0c4$var$_byteLength(b64, validLen, placeHoldersLen));\n    var curByte = 0;\n    // if there are placeholders, only get up to the last complete 4 chars\n    var len = placeHoldersLen > 0 ? validLen - 4 : validLen;\n    var i;\n    for(i = 0; i < len; i += 4){\n        tmp = $8a0a73e6b73fd0c4$var$revLookup[b64.charCodeAt(i)] << 18 | $8a0a73e6b73fd0c4$var$revLookup[b64.charCodeAt(i + 1)] << 12 | $8a0a73e6b73fd0c4$var$revLookup[b64.charCodeAt(i + 2)] << 6 | $8a0a73e6b73fd0c4$var$revLookup[b64.charCodeAt(i + 3)];\n        arr[curByte++] = tmp >> 16 & 0xFF;\n        arr[curByte++] = tmp >> 8 & 0xFF;\n        arr[curByte++] = tmp & 0xFF;\n    }\n    if (placeHoldersLen === 2) {\n        tmp = $8a0a73e6b73fd0c4$var$revLookup[b64.charCodeAt(i)] << 2 | $8a0a73e6b73fd0c4$var$revLookup[b64.charCodeAt(i + 1)] >> 4;\n        arr[curByte++] = tmp & 0xFF;\n    }\n    if (placeHoldersLen === 1) {\n        tmp = $8a0a73e6b73fd0c4$var$revLookup[b64.charCodeAt(i)] << 10 | $8a0a73e6b73fd0c4$var$revLookup[b64.charCodeAt(i + 1)] << 4 | $8a0a73e6b73fd0c4$var$revLookup[b64.charCodeAt(i + 2)] >> 2;\n        arr[curByte++] = tmp >> 8 & 0xFF;\n        arr[curByte++] = tmp & 0xFF;\n    }\n    return arr;\n}\nfunction $8a0a73e6b73fd0c4$var$tripletToBase64(num) {\n    return $8a0a73e6b73fd0c4$var$lookup[num >> 18 & 0x3F] + $8a0a73e6b73fd0c4$var$lookup[num >> 12 & 0x3F] + $8a0a73e6b73fd0c4$var$lookup[num >> 6 & 0x3F] + $8a0a73e6b73fd0c4$var$lookup[num & 0x3F];\n}\nfunction $8a0a73e6b73fd0c4$var$encodeChunk(uint8, start, end) {\n    var tmp;\n    var output = [];\n    for(var i = start; i < end; i += 3){\n        tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);\n        output.push($8a0a73e6b73fd0c4$var$tripletToBase64(tmp));\n    }\n    return output.join('');\n}\nfunction $8a0a73e6b73fd0c4$var$fromByteArray(uint8) {\n    var tmp;\n    var len = uint8.length;\n    var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n    ;\n    var parts = [];\n    var maxChunkLength = 16383 // must be multiple of 3\n    ;\n    // go through the array every three bytes, we'll deal with trailing stuff later\n    for(var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength)parts.push($8a0a73e6b73fd0c4$var$encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));\n    // pad the end with zeros, but make sure to not forget the extra bytes\n    if (extraBytes === 1) {\n        tmp = uint8[len - 1];\n        parts.push($8a0a73e6b73fd0c4$var$lookup[tmp >> 2] + $8a0a73e6b73fd0c4$var$lookup[tmp << 4 & 0x3F] + '==');\n    } else if (extraBytes === 2) {\n        tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n        parts.push($8a0a73e6b73fd0c4$var$lookup[tmp >> 10] + $8a0a73e6b73fd0c4$var$lookup[tmp >> 4 & 0x3F] + $8a0a73e6b73fd0c4$var$lookup[tmp << 2 & 0x3F] + '=');\n    }\n    return parts.join('');\n}\n\n});\n\nparcelRegister(\"dbnIE\", function(module, exports) {\n\n$parcel$export(module.exports, \"read\", () => $998eb38f4d082829$export$aafa59e2e03f2942, (v) => $998eb38f4d082829$export$aafa59e2e03f2942 = v);\n$parcel$export(module.exports, \"write\", () => $998eb38f4d082829$export$68d8715fc104d294, (v) => $998eb38f4d082829$export$68d8715fc104d294 = v);\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ var $998eb38f4d082829$export$aafa59e2e03f2942;\nvar $998eb38f4d082829$export$68d8715fc104d294;\n$998eb38f4d082829$export$aafa59e2e03f2942 = function(buffer, offset, isLE, mLen, nBytes) {\n    var e, m;\n    var eLen = nBytes * 8 - mLen - 1;\n    var eMax = (1 << eLen) - 1;\n    var eBias = eMax >> 1;\n    var nBits = -7;\n    var i = isLE ? nBytes - 1 : 0;\n    var d = isLE ? -1 : 1;\n    var s = buffer[offset + i];\n    i += d;\n    e = s & (1 << -nBits) - 1;\n    s >>= -nBits;\n    nBits += eLen;\n    for(; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);\n    m = e & (1 << -nBits) - 1;\n    e >>= -nBits;\n    nBits += mLen;\n    for(; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);\n    if (e === 0) e = 1 - eBias;\n    else if (e === eMax) return m ? NaN : (s ? -1 : 1) * Infinity;\n    else {\n        m = m + Math.pow(2, mLen);\n        e = e - eBias;\n    }\n    return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n};\n$998eb38f4d082829$export$68d8715fc104d294 = function(buffer, value, offset, isLE, mLen, nBytes) {\n    var e, m, c;\n    var eLen = nBytes * 8 - mLen - 1;\n    var eMax = (1 << eLen) - 1;\n    var eBias = eMax >> 1;\n    var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n    var i = isLE ? 0 : nBytes - 1;\n    var d = isLE ? 1 : -1;\n    var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n    value = Math.abs(value);\n    if (isNaN(value) || value === Infinity) {\n        m = isNaN(value) ? 1 : 0;\n        e = eMax;\n    } else {\n        e = Math.floor(Math.log(value) / Math.LN2);\n        if (value * (c = Math.pow(2, -e)) < 1) {\n            e--;\n            c *= 2;\n        }\n        if (e + eBias >= 1) value += rt / c;\n        else value += rt * Math.pow(2, 1 - eBias);\n        if (value * c >= 2) {\n            e++;\n            c /= 2;\n        }\n        if (e + eBias >= eMax) {\n            m = 0;\n            e = eMax;\n        } else if (e + eBias >= 1) {\n            m = (value * c - 1) * Math.pow(2, mLen);\n            e = e + eBias;\n        } else {\n            m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n            e = 0;\n        }\n    }\n    for(; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);\n    e = e << mLen | m;\n    eLen += mLen;\n    for(; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);\n    buffer[offset + i - d] |= s * 128;\n};\n\n});\n\n\nparcelRegister(\"ojnWK\", function(module, exports) {\n\n$parcel$export(module.exports, \"focus\", () => src_default);\n$parcel$export(module.exports, \"default\", () => module_default);\n// node_modules/tabbable/dist/index.esm.js\nvar candidateSelectors = [\n    \"input:not([inert]):not([inert] *)\",\n    \"select:not([inert]):not([inert] *)\",\n    \"textarea:not([inert]):not([inert] *)\",\n    \"a[href]:not([inert]):not([inert] *)\",\n    \"button:not([inert]):not([inert] *)\",\n    \"[tabindex]:not(slot):not([inert]):not([inert] *)\",\n    \"audio[controls]:not([inert]):not([inert] *)\",\n    \"video[controls]:not([inert]):not([inert] *)\",\n    '[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)',\n    \"details>summary:first-of-type:not([inert]):not([inert] *)\",\n    \"details:not([inert]):not([inert] *)\"\n];\nvar candidateSelector = /* @__PURE__ */ candidateSelectors.join(\",\");\nvar NoElement = typeof Element === \"undefined\";\nvar matches = NoElement ? function() {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function(element) {\n    var _element$getRootNode;\n    return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function(element) {\n    return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\nvar _isInert = function isInert(node, lookUp) {\n    var _node$getAttribute;\n    if (lookUp === void 0) lookUp = true;\n    var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, \"inert\");\n    var inert = inertAtt === \"\" || inertAtt === \"true\";\n    var result = inert || lookUp && node && // closest does not exist on shadow roots, so we fall back to a manual\n    // lookup upward, in case it is not defined.\n    (typeof node.closest === \"function\" ? node.closest(\"[inert]\") : _isInert(node.parentNode));\n    return result;\n};\nvar isContentEditable = function isContentEditable2(node) {\n    var _node$getAttribute2;\n    var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, \"contenteditable\");\n    return attValue === \"\" || attValue === \"true\";\n};\nvar getCandidates = function getCandidates2(el, includeContainer, filter) {\n    if (_isInert(el)) return [];\n    var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n    if (includeContainer && matches.call(el, candidateSelector)) candidates.unshift(el);\n    candidates = candidates.filter(filter);\n    return candidates;\n};\nvar _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n    var candidates = [];\n    var elementsToCheck = Array.from(elements);\n    while(elementsToCheck.length){\n        var element = elementsToCheck.shift();\n        if (_isInert(element, false)) continue;\n        if (element.tagName === \"SLOT\") {\n            var assigned = element.assignedElements();\n            var content = assigned.length ? assigned : element.children;\n            var nestedCandidates = _getCandidatesIteratively(content, true, options);\n            if (options.flatten) candidates.push.apply(candidates, nestedCandidates);\n            else candidates.push({\n                scopeParent: element,\n                candidates: nestedCandidates\n            });\n        } else {\n            var validCandidate = matches.call(element, candidateSelector);\n            if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) candidates.push(element);\n            var shadowRoot = element.shadowRoot || // check for an undisclosed shadow\n            typeof options.getShadowRoot === \"function\" && options.getShadowRoot(element);\n            var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n            if (shadowRoot && validShadowRoot) {\n                var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n                if (options.flatten) candidates.push.apply(candidates, _nestedCandidates);\n                else candidates.push({\n                    scopeParent: element,\n                    candidates: _nestedCandidates\n                });\n            } else elementsToCheck.unshift.apply(elementsToCheck, element.children);\n        }\n    }\n    return candidates;\n};\nvar hasTabIndex = function hasTabIndex2(node) {\n    return !isNaN(parseInt(node.getAttribute(\"tabindex\"), 10));\n};\nvar getTabIndex = function getTabIndex2(node) {\n    if (!node) throw new Error(\"No node provided\");\n    if (node.tabIndex < 0) {\n        if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) return 0;\n    }\n    return node.tabIndex;\n};\nvar getSortOrderTabIndex = function getSortOrderTabIndex2(node, isScope) {\n    var tabIndex = getTabIndex(node);\n    if (tabIndex < 0 && isScope && !hasTabIndex(node)) return 0;\n    return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables2(a, b) {\n    return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput2(node) {\n    return node.tagName === \"INPUT\";\n};\nvar isHiddenInput = function isHiddenInput2(node) {\n    return isInput(node) && node.type === \"hidden\";\n};\nvar isDetailsWithSummary = function isDetailsWithSummary2(node) {\n    var r = node.tagName === \"DETAILS\" && Array.prototype.slice.apply(node.children).some(function(child) {\n        return child.tagName === \"SUMMARY\";\n    });\n    return r;\n};\nvar getCheckedRadio = function getCheckedRadio2(nodes, form) {\n    for(var i = 0; i < nodes.length; i++){\n        if (nodes[i].checked && nodes[i].form === form) return nodes[i];\n    }\n};\nvar isTabbableRadio = function isTabbableRadio2(node) {\n    if (!node.name) return true;\n    var radioScope = node.form || getRootNode(node);\n    var queryRadios = function queryRadios2(name) {\n        return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n    };\n    var radioSet;\n    if (typeof window !== \"undefined\" && typeof window.CSS !== \"undefined\" && typeof window.CSS.escape === \"function\") radioSet = queryRadios(window.CSS.escape(node.name));\n    else try {\n        radioSet = queryRadios(node.name);\n    } catch (err) {\n        console.error(\"Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s\", err.message);\n        return false;\n    }\n    var checked = getCheckedRadio(radioSet, node.form);\n    return !checked || checked === node;\n};\nvar isRadio = function isRadio2(node) {\n    return isInput(node) && node.type === \"radio\";\n};\nvar isNonTabbableRadio = function isNonTabbableRadio2(node) {\n    return isRadio(node) && !isTabbableRadio(node);\n};\nvar isNodeAttached = function isNodeAttached2(node) {\n    var _nodeRoot;\n    var nodeRoot = node && getRootNode(node);\n    var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n    var attached = false;\n    if (nodeRoot && nodeRoot !== node) {\n        var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n        attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n        while(!attached && nodeRootHost){\n            var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n            nodeRoot = getRootNode(nodeRootHost);\n            nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n            attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n        }\n    }\n    return attached;\n};\nvar isZeroArea = function isZeroArea2(node) {\n    var _node$getBoundingClie = node.getBoundingClientRect(), width = _node$getBoundingClie.width, height = _node$getBoundingClie.height;\n    return width === 0 && height === 0;\n};\nvar isHidden = function isHidden2(node, _ref) {\n    var displayCheck = _ref.displayCheck, getShadowRoot = _ref.getShadowRoot;\n    if (displayCheck === \"full-native\") {\n        if (\"checkVisibility\" in node) {\n            var visible = node.checkVisibility({\n                // Checking opacity might be desirable for some use cases, but natively,\n                // opacity zero elements _are_ focusable and tabbable.\n                checkOpacity: false,\n                opacityProperty: false,\n                contentVisibilityAuto: true,\n                visibilityProperty: true,\n                // This is an alias for `visibilityProperty`. Contemporary browsers\n                // support both. However, this alias has wider browser support (Chrome\n                // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so\n                // we include it anyway.\n                checkVisibilityCSS: true\n            });\n            return !visible;\n        }\n    }\n    if (getComputedStyle(node).visibility === \"hidden\") return true;\n    var isDirectSummary = matches.call(node, \"details>summary:first-of-type\");\n    var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n    if (matches.call(nodeUnderDetails, \"details:not([open]) *\")) return true;\n    if (!displayCheck || displayCheck === \"full\" || // full-native can run this branch when it falls through in case\n    // Element#checkVisibility is unsupported\n    displayCheck === \"full-native\" || displayCheck === \"legacy-full\") {\n        if (typeof getShadowRoot === \"function\") {\n            var originalNode = node;\n            while(node){\n                var parentElement = node.parentElement;\n                var rootNode = getRootNode(node);\n                if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true) return isZeroArea(node);\n                else if (node.assignedSlot) node = node.assignedSlot;\n                else if (!parentElement && rootNode !== node.ownerDocument) node = rootNode.host;\n                else node = parentElement;\n            }\n            node = originalNode;\n        }\n        if (isNodeAttached(node)) return !node.getClientRects().length;\n        if (displayCheck !== \"legacy-full\") return true;\n    } else if (displayCheck === \"non-zero-area\") return isZeroArea(node);\n    return false;\n};\nvar isDisabledFromFieldset = function isDisabledFromFieldset2(node) {\n    if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n        var parentNode = node.parentElement;\n        while(parentNode){\n            if (parentNode.tagName === \"FIELDSET\" && parentNode.disabled) {\n                for(var i = 0; i < parentNode.children.length; i++){\n                    var child = parentNode.children.item(i);\n                    if (child.tagName === \"LEGEND\") return matches.call(parentNode, \"fieldset[disabled] *\") ? true : !child.contains(node);\n                }\n                return true;\n            }\n            parentNode = parentNode.parentElement;\n        }\n    }\n    return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable2(options, node) {\n    if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus\n    isDetailsWithSummary(node) || isDisabledFromFieldset(node)) return false;\n    return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable2(options, node) {\n    if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) return false;\n    return true;\n};\nvar isShadowRootTabbable = function isShadowRootTabbable2(shadowHostNode) {\n    var tabIndex = parseInt(shadowHostNode.getAttribute(\"tabindex\"), 10);\n    if (isNaN(tabIndex) || tabIndex >= 0) return true;\n    return false;\n};\nvar _sortByOrder = function sortByOrder(candidates) {\n    var regularTabbables = [];\n    var orderedTabbables = [];\n    candidates.forEach(function(item, i) {\n        var isScope = !!item.scopeParent;\n        var element = isScope ? item.scopeParent : item;\n        var candidateTabindex = getSortOrderTabIndex(element, isScope);\n        var elements = isScope ? _sortByOrder(item.candidates) : element;\n        if (candidateTabindex === 0) isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n        else orderedTabbables.push({\n            documentOrder: i,\n            tabIndex: candidateTabindex,\n            item: item,\n            isScope: isScope,\n            content: elements\n        });\n    });\n    return orderedTabbables.sort(sortOrderedTabbables).reduce(function(acc, sortable) {\n        sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n        return acc;\n    }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable2(container, options) {\n    options = options || {};\n    var candidates;\n    if (options.getShadowRoot) candidates = _getCandidatesIteratively([\n        container\n    ], options.includeContainer, {\n        filter: isNodeMatchingSelectorTabbable.bind(null, options),\n        flatten: false,\n        getShadowRoot: options.getShadowRoot,\n        shadowRootFilter: isShadowRootTabbable\n    });\n    else candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n    return _sortByOrder(candidates);\n};\nvar focusable = function focusable2(container, options) {\n    options = options || {};\n    var candidates;\n    if (options.getShadowRoot) candidates = _getCandidatesIteratively([\n        container\n    ], options.includeContainer, {\n        filter: isNodeMatchingSelectorFocusable.bind(null, options),\n        flatten: true,\n        getShadowRoot: options.getShadowRoot\n    });\n    else candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n    return candidates;\n};\nvar isTabbable = function isTabbable2(node, options) {\n    options = options || {};\n    if (!node) throw new Error(\"No node provided\");\n    if (matches.call(node, candidateSelector) === false) return false;\n    return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* @__PURE__ */ candidateSelectors.concat(\"iframe:not([inert]):not([inert] *)\").join(\",\");\nvar isFocusable = function isFocusable2(node, options) {\n    options = options || {};\n    if (!node) throw new Error(\"No node provided\");\n    if (matches.call(node, focusableCandidateSelector) === false) return false;\n    return isNodeMatchingSelectorFocusable(options, node);\n};\n// node_modules/focus-trap/dist/focus-trap.esm.js\nfunction _arrayLikeToArray(r, a) {\n    (null == a || a > r.length) && (a = r.length);\n    for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];\n    return n;\n}\nfunction _arrayWithoutHoles(r) {\n    if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) {\n    try {\n        var i = n[a](c), u = i.value;\n    } catch (n2) {\n        return void e(n2);\n    }\n    i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n    return function() {\n        var t = this, e = arguments;\n        return new Promise(function(r, o) {\n            var a = n.apply(t, e);\n            function _next(n2) {\n                asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n2);\n            }\n            function _throw(n2) {\n                asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n2);\n            }\n            _next(void 0);\n        });\n    };\n}\nfunction _createForOfIteratorHelper(r, e) {\n    var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n    if (!t) {\n        if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {\n            t && (r = t);\n            var n = 0, F = function() {};\n            return {\n                s: F,\n                n: function() {\n                    return n >= r.length ? {\n                        done: true\n                    } : {\n                        done: false,\n                        value: r[n++]\n                    };\n                },\n                e: function(r2) {\n                    throw r2;\n                },\n                f: F\n            };\n        }\n        throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n    }\n    var o, a = true, u = false;\n    return {\n        s: function() {\n            t = t.call(r);\n        },\n        n: function() {\n            var r2 = t.next();\n            return a = r2.done, r2;\n        },\n        e: function(r2) {\n            u = true, o = r2;\n        },\n        f: function() {\n            try {\n                a || null == t.return || t.return();\n            } finally{\n                if (u) throw o;\n            }\n        }\n    };\n}\nfunction _defineProperty(e, r, t) {\n    return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n        value: t,\n        enumerable: true,\n        configurable: true,\n        writable: true\n    }) : e[r] = t, e;\n}\nfunction _iterableToArray(r) {\n    if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _nonIterableSpread() {\n    throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction ownKeys(e, r) {\n    var t = Object.keys(e);\n    if (Object.getOwnPropertySymbols) {\n        var o = Object.getOwnPropertySymbols(e);\n        r && (o = o.filter(function(r2) {\n            return Object.getOwnPropertyDescriptor(e, r2).enumerable;\n        })), t.push.apply(t, o);\n    }\n    return t;\n}\nfunction _objectSpread2(e) {\n    for(var r = 1; r < arguments.length; r++){\n        var t = null != arguments[r] ? arguments[r] : {};\n        r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {\n            _defineProperty(e, r2, t[r2]);\n        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {\n            Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));\n        });\n    }\n    return e;\n}\nfunction _regenerator() {\n    var e, t, r = \"function\" == typeof Symbol ? Symbol : {}, n = r.iterator || \"@@iterator\", o = r.toStringTag || \"@@toStringTag\";\n    function i(r2, n2, o2, i2) {\n        var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);\n        return _regeneratorDefine(u2, \"_invoke\", function(r3, n3, o3) {\n            var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = {\n                p: 0,\n                n: 0,\n                v: e,\n                a: d,\n                f: d.bind(e, 4),\n                d: function(t2, r4) {\n                    return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;\n                }\n            };\n            function d(r4, n4) {\n                for(c3 = r4, u3 = n4, t = 0; !y && f2 && !o4 && t < p.length; t++){\n                    var o4, i4 = p[t], d2 = G.p, l = i4[2];\n                    r4 > 3 ? (o4 = l === n4) && (u3 = i4[(c3 = i4[4]) ? 5 : (c3 = 3, 3)], i4[4] = i4[5] = e) : i4[0] <= d2 && ((o4 = r4 < 2 && d2 < i4[1]) ? (c3 = 0, G.v = n4, G.n = i4[1]) : d2 < l && (o4 = r4 < 3 || i4[0] > n4 || n4 > l) && (i4[4] = r4, i4[5] = n4, G.n = l, c3 = 0));\n                }\n                if (o4 || r4 > 1) return a;\n                throw y = true, n4;\n            }\n            return function(o4, p2, l) {\n                if (f2 > 1) throw TypeError(\"Generator is already running\");\n                for(y && 1 === p2 && d(p2, l), c3 = p2, u3 = l; (t = c3 < 2 ? e : u3) || !y;){\n                    i3 || (c3 ? c3 < 3 ? (c3 > 1 && (G.n = -1), d(c3, u3)) : G.n = u3 : G.v = u3);\n                    try {\n                        if (f2 = 2, i3) {\n                            if (c3 || (o4 = \"next\"), t = i3[o4]) {\n                                if (!(t = t.call(i3, u3))) throw TypeError(\"iterator result is not an object\");\n                                if (!t.done) return t;\n                                u3 = t.value, c3 < 2 && (c3 = 0);\n                            } else 1 === c3 && (t = i3.return) && t.call(i3), c3 < 2 && (u3 = TypeError(\"The iterator does not provide a '\" + o4 + \"' method\"), c3 = 1);\n                            i3 = e;\n                        } else if ((t = (y = G.n < 0) ? u3 : r3.call(n3, G)) !== a) break;\n                    } catch (t2) {\n                        i3 = e, c3 = 1, u3 = t2;\n                    } finally{\n                        f2 = 1;\n                    }\n                }\n                return {\n                    value: t,\n                    done: y\n                };\n            };\n        }(r2, o2, i2), true), u2;\n    }\n    var a = {};\n    function Generator() {}\n    function GeneratorFunction() {}\n    function GeneratorFunctionPrototype() {}\n    t = Object.getPrototypeOf;\n    var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function() {\n        return this;\n    }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);\n    function f(e2) {\n        return Object.setPrototypeOf ? Object.setPrototypeOf(e2, GeneratorFunctionPrototype) : (e2.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e2, o, \"GeneratorFunction\")), e2.prototype = Object.create(u), e2;\n    }\n    return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, \"constructor\", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", _regeneratorDefine(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), _regeneratorDefine(u), _regeneratorDefine(u, o, \"Generator\"), _regeneratorDefine(u, n, function() {\n        return this;\n    }), _regeneratorDefine(u, \"toString\", function() {\n        return \"[object Generator]\";\n    }), (_regenerator = function() {\n        return {\n            w: i,\n            m: f\n        };\n    })();\n}\nfunction _regeneratorDefine(e, r, n, t) {\n    var i = Object.defineProperty;\n    try {\n        i({}, \"\", {});\n    } catch (e2) {\n        i = 0;\n    }\n    _regeneratorDefine = function(e2, r2, n2, t2) {\n        function o(r3, n3) {\n            _regeneratorDefine(e2, r3, function(e3) {\n                return this._invoke(r3, n3, e3);\n            });\n        }\n        r2 ? i ? i(e2, r2, {\n            value: n2,\n            enumerable: !t2,\n            configurable: !t2,\n            writable: !t2\n        }) : e2[r2] = n2 : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2));\n    }, _regeneratorDefine(e, r, n, t);\n}\nfunction _toConsumableArray(r) {\n    return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n    if (\"object\" != typeof t || !t) return t;\n    var e = t[Symbol.toPrimitive];\n    if (void 0 !== e) {\n        var i = e.call(t, r);\n        if (\"object\" != typeof i) return i;\n        throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n    }\n    return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n    var i = _toPrimitive(t, \"string\");\n    return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _unsupportedIterableToArray(r, a) {\n    if (r) {\n        if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n        var t = ({}).toString.call(r).slice(8, -1);\n        return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n    }\n}\nvar activeFocusTraps = {\n    // Returns the trap from the top of the stack.\n    getActiveTrap: function getActiveTrap(trapStack) {\n        if ((trapStack === null || trapStack === void 0 ? void 0 : trapStack.length) > 0) return trapStack[trapStack.length - 1];\n        return null;\n    },\n    // Pauses the currently active trap, then adds a new trap to the stack.\n    activateTrap: function activateTrap(trapStack, trap) {\n        var activeTrap = activeFocusTraps.getActiveTrap(trapStack);\n        if (trap !== activeTrap) activeFocusTraps.pauseTrap(trapStack);\n        var trapIndex = trapStack.indexOf(trap);\n        if (trapIndex === -1) trapStack.push(trap);\n        else {\n            trapStack.splice(trapIndex, 1);\n            trapStack.push(trap);\n        }\n    },\n    // Removes the trap from the top of the stack, then unpauses the next trap down.\n    deactivateTrap: function deactivateTrap(trapStack, trap) {\n        var trapIndex = trapStack.indexOf(trap);\n        if (trapIndex !== -1) trapStack.splice(trapIndex, 1);\n        activeFocusTraps.unpauseTrap(trapStack);\n    },\n    // Pauses the trap at the top of the stack.\n    pauseTrap: function pauseTrap(trapStack) {\n        var activeTrap = activeFocusTraps.getActiveTrap(trapStack);\n        activeTrap === null || activeTrap === void 0 || activeTrap._setPausedState(true);\n    },\n    // Unpauses the trap at the top of the stack.\n    unpauseTrap: function unpauseTrap(trapStack) {\n        var activeTrap = activeFocusTraps.getActiveTrap(trapStack);\n        if (activeTrap && !activeTrap._isManuallyPaused()) activeTrap._setPausedState(false);\n    }\n};\nvar isSelectableInput = function isSelectableInput2(node) {\n    return node.tagName && node.tagName.toLowerCase() === \"input\" && typeof node.select === \"function\";\n};\nvar isEscapeEvent = function isEscapeEvent2(e) {\n    return (e === null || e === void 0 ? void 0 : e.key) === \"Escape\" || (e === null || e === void 0 ? void 0 : e.key) === \"Esc\" || (e === null || e === void 0 ? void 0 : e.keyCode) === 27;\n};\nvar isTabEvent = function isTabEvent2(e) {\n    return (e === null || e === void 0 ? void 0 : e.key) === \"Tab\" || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;\n};\nvar isKeyForward = function isKeyForward2(e) {\n    return isTabEvent(e) && !e.shiftKey;\n};\nvar isKeyBackward = function isKeyBackward2(e) {\n    return isTabEvent(e) && e.shiftKey;\n};\nvar delay = function delay2(fn) {\n    return setTimeout(fn, 0);\n};\nvar valueOrHandler = function valueOrHandler2(value) {\n    for(var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)params[_key - 1] = arguments[_key];\n    return typeof value === \"function\" ? value.apply(void 0, params) : value;\n};\nvar getActualTarget = function getActualTarget2(event) {\n    return event.target.shadowRoot && typeof event.composedPath === \"function\" ? event.composedPath()[0] : event.target;\n};\nvar internalTrapStack = [];\nvar createFocusTrap = function createFocusTrap2(elements, userOptions) {\n    var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;\n    var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || internalTrapStack;\n    var config = _objectSpread2({\n        returnFocusOnDeactivate: true,\n        escapeDeactivates: true,\n        delayInitialFocus: true,\n        isolateSubtrees: false,\n        isKeyForward: isKeyForward,\n        isKeyBackward: isKeyBackward\n    }, userOptions);\n    var state = {\n        // containers given to createFocusTrap()\n        /** @type {Array<HTMLElement>} */ containers: [],\n        // list of objects identifying tabbable nodes in `containers` in the trap\n        // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n        //  is active, but the trap should never get to a state where there isn't at least one group\n        //  with at least one tabbable node in it (that would lead to an error condition that would\n        //  result in an error being thrown)\n        /** @type {Array<{\n     *    container: HTMLElement,\n     *    tabbableNodes: Array<HTMLElement>, // empty if none\n     *    focusableNodes: Array<HTMLElement>, // empty if none\n     *    posTabIndexesFound: boolean,\n     *    firstTabbableNode: HTMLElement|undefined,\n     *    lastTabbableNode: HTMLElement|undefined,\n     *    firstDomTabbableNode: HTMLElement|undefined,\n     *    lastDomTabbableNode: HTMLElement|undefined,\n     *    nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n     *  }>}\n     */ containerGroups: [],\n        // same order/length as `containers` list\n        // references to objects in `containerGroups`, but only those that actually have\n        //  tabbable nodes in them\n        // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n        //  the same length\n        tabbableGroups: [],\n        // references to nodes that are siblings to the ancestors of this trap's containers.\n        /** @type {Set<HTMLElement>} */ adjacentElements: /* @__PURE__ */ new Set(),\n        // references to nodes that were inert or aria-hidden before the trap was activated.\n        /** @type {Set<HTMLElement>} */ alreadySilent: /* @__PURE__ */ new Set(),\n        nodeFocusedBeforeActivation: null,\n        mostRecentlyFocusedNode: null,\n        active: false,\n        paused: false,\n        manuallyPaused: false,\n        // timer ID for when delayInitialFocus is true and initial focus in this trap\n        //  has been delayed during activation\n        delayInitialFocusTimer: void 0,\n        // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any\n        recentNavEvent: void 0\n    };\n    var trap;\n    var getOption = function getOption2(configOverrideOptions, optionName, configOptionName) {\n        return configOverrideOptions && configOverrideOptions[optionName] !== void 0 ? configOverrideOptions[optionName] : config[configOptionName || optionName];\n    };\n    var findContainerIndex = function findContainerIndex2(element, event) {\n        var composedPath = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === \"function\" ? event.composedPath() : void 0;\n        return state.containerGroups.findIndex(function(_ref) {\n            var container = _ref.container, tabbableNodes = _ref.tabbableNodes;\n            return container.contains(element) || // fall back to explicit tabbable search which will take into consideration any\n            //  web components if the `tabbableOptions.getShadowRoot` option was used for\n            //  the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n            //  look inside web components even if open)\n            (composedPath === null || composedPath === void 0 ? void 0 : composedPath.includes(container)) || tabbableNodes.find(function(node) {\n                return node === element;\n            });\n        });\n    };\n    var getNodeForOption = function getNodeForOption2(optionName) {\n        var _ref2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref2$hasFallback = _ref2.hasFallback, hasFallback = _ref2$hasFallback === void 0 ? false : _ref2$hasFallback, _ref2$params = _ref2.params, params = _ref2$params === void 0 ? [] : _ref2$params;\n        var optionValue = config[optionName];\n        if (typeof optionValue === \"function\") optionValue = optionValue.apply(void 0, _toConsumableArray(params));\n        if (optionValue === true) optionValue = void 0;\n        if (!optionValue) {\n            if (optionValue === void 0 || optionValue === false) return optionValue;\n            throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n        }\n        var node = optionValue;\n        if (typeof optionValue === \"string\") {\n            try {\n                node = doc.querySelector(optionValue);\n            } catch (err) {\n                throw new Error(\"`\".concat(optionName, '` appears to be an invalid selector; error=\"').concat(err.message, '\"'));\n            }\n            if (!node) {\n                if (!hasFallback) throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n            }\n        }\n        return node;\n    };\n    var getInitialFocusNode = function getInitialFocusNode2() {\n        var node = getNodeForOption(\"initialFocus\", {\n            hasFallback: true\n        });\n        if (node === false) return false;\n        if (node === void 0 || node && !isFocusable(node, config.tabbableOptions)) {\n            if (findContainerIndex(doc.activeElement) >= 0) node = doc.activeElement;\n            else {\n                var firstTabbableGroup = state.tabbableGroups[0];\n                var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n                node = firstTabbableNode || getNodeForOption(\"fallbackFocus\");\n            }\n        } else if (node === null) node = getNodeForOption(\"fallbackFocus\");\n        if (!node) throw new Error(\"Your focus-trap needs to have at least one focusable element\");\n        return node;\n    };\n    var updateTabbableNodes = function updateTabbableNodes2() {\n        state.containerGroups = state.containers.map(function(container) {\n            var tabbableNodes = tabbable(container, config.tabbableOptions);\n            var focusableNodes = focusable(container, config.tabbableOptions);\n            var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : void 0;\n            var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : void 0;\n            var firstDomTabbableNode = focusableNodes.find(function(node) {\n                return isTabbable(node);\n            });\n            var lastDomTabbableNode = focusableNodes.slice().reverse().find(function(node) {\n                return isTabbable(node);\n            });\n            var posTabIndexesFound = !!tabbableNodes.find(function(node) {\n                return getTabIndex(node) > 0;\n            });\n            return {\n                container: container,\n                tabbableNodes: tabbableNodes,\n                focusableNodes: focusableNodes,\n                posTabIndexesFound: /** True if at least one node with positive `tabindex` was found in this container. */ posTabIndexesFound,\n                firstTabbableNode: /** First tabbable node in container, __tabindex__ order; `undefined` if none. */ firstTabbableNode,\n                lastTabbableNode: /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */ lastTabbableNode,\n                firstDomTabbableNode: // NOTE: DOM order is NOT NECESSARILY \"document position\" order, but figuring that out\n                //  would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n                //  because that API doesn't work with Shadow DOM as well as it should (@see\n                //  https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,\n                //  to address an edge case related to positive tabindex support, this seems like a much easier,\n                //  \"close enough most of the time\" alternative for positive tabindexes which should generally\n                //  be avoided anyway...\n                /** First tabbable node in container, __DOM__ order; `undefined` if none. */ firstDomTabbableNode,\n                lastDomTabbableNode: /** Last tabbable node in container, __DOM__ order; `undefined` if none. */ lastDomTabbableNode,\n                /**\n         * Finds the __tabbable__ node that follows the given node in the specified direction,\n         *  in this container, if any.\n         * @param {HTMLElement} node\n         * @param {boolean} [forward] True if going in forward tab order; false if going\n         *  in reverse.\n         * @returns {HTMLElement|undefined} The next tabbable node, if any.\n         */ nextTabbableNode: function nextTabbableNode(node) {\n                    var forward = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;\n                    var nodeIdx = tabbableNodes.indexOf(node);\n                    if (nodeIdx < 0) {\n                        if (forward) return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function(el) {\n                            return isTabbable(el);\n                        });\n                        return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function(el) {\n                            return isTabbable(el);\n                        });\n                    }\n                    return tabbableNodes[nodeIdx + (forward ? 1 : -1)];\n                }\n            };\n        });\n        state.tabbableGroups = state.containerGroups.filter(function(group) {\n            return group.tabbableNodes.length > 0;\n        });\n        if (state.tabbableGroups.length <= 0 && !getNodeForOption(\"fallbackFocus\")) throw new Error(\"Your focus-trap must have at least one container with at least one tabbable node in it at all times\");\n        if (state.containerGroups.find(function(g) {\n            return g.posTabIndexesFound;\n        }) && state.containerGroups.length > 1) throw new Error(\"At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.\");\n    };\n    var _getActiveElement = function getActiveElement(el) {\n        var activeElement = el.activeElement;\n        if (!activeElement) return;\n        if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) return _getActiveElement(activeElement.shadowRoot);\n        return activeElement;\n    };\n    var _tryFocus = function tryFocus(node) {\n        if (node === false) return;\n        if (node === _getActiveElement(document)) return;\n        if (!node || !node.focus) {\n            _tryFocus(getInitialFocusNode());\n            return;\n        }\n        node.focus({\n            preventScroll: !!config.preventScroll\n        });\n        state.mostRecentlyFocusedNode = node;\n        if (isSelectableInput(node)) node.select();\n    };\n    var getReturnFocusNode = function getReturnFocusNode2(previousActiveElement) {\n        var node = getNodeForOption(\"setReturnFocus\", {\n            params: [\n                previousActiveElement\n            ]\n        });\n        return node ? node : node === false ? false : previousActiveElement;\n    };\n    var findNextNavNode = function findNextNavNode2(_ref3) {\n        var target = _ref3.target, event = _ref3.event, _ref3$isBackward = _ref3.isBackward, isBackward = _ref3$isBackward === void 0 ? false : _ref3$isBackward;\n        target = target || getActualTarget(event);\n        updateTabbableNodes();\n        var destinationNode = null;\n        if (state.tabbableGroups.length > 0) {\n            var containerIndex = findContainerIndex(target, event);\n            var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : void 0;\n            if (containerIndex < 0) {\n                if (isBackward) destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;\n                else destinationNode = state.tabbableGroups[0].firstTabbableNode;\n            } else if (isBackward) {\n                var startOfGroupIndex = state.tabbableGroups.findIndex(function(_ref4) {\n                    var firstTabbableNode = _ref4.firstTabbableNode;\n                    return target === firstTabbableNode;\n                });\n                if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) startOfGroupIndex = containerIndex;\n                if (startOfGroupIndex >= 0) {\n                    var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;\n                    var destinationGroup = state.tabbableGroups[destinationGroupIndex];\n                    destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;\n                } else if (!isTabEvent(event)) destinationNode = containerGroup.nextTabbableNode(target, false);\n            } else {\n                var lastOfGroupIndex = state.tabbableGroups.findIndex(function(_ref5) {\n                    var lastTabbableNode = _ref5.lastTabbableNode;\n                    return target === lastTabbableNode;\n                });\n                if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) lastOfGroupIndex = containerIndex;\n                if (lastOfGroupIndex >= 0) {\n                    var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;\n                    var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];\n                    destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;\n                } else if (!isTabEvent(event)) destinationNode = containerGroup.nextTabbableNode(target);\n            }\n        } else destinationNode = getNodeForOption(\"fallbackFocus\");\n        return destinationNode;\n    };\n    var checkPointerDown = function checkPointerDown2(e) {\n        var target = getActualTarget(e);\n        if (findContainerIndex(target, e) >= 0) return;\n        if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n            trap.deactivate({\n                // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n                //  which will result in the outside click setting focus to the node\n                //  that was clicked (and if not focusable, to \"nothing\"); by setting\n                //  `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n                //  on activation (or the configured `setReturnFocus` node), whether the\n                //  outside click was on a focusable node or not\n                returnFocus: config.returnFocusOnDeactivate\n            });\n            return;\n        }\n        if (valueOrHandler(config.allowOutsideClick, e)) return;\n        e.preventDefault();\n    };\n    var checkFocusIn = function checkFocusIn2(event) {\n        var target = getActualTarget(event);\n        var targetContained = findContainerIndex(target, event) >= 0;\n        if (targetContained || target instanceof Document) {\n            if (targetContained) state.mostRecentlyFocusedNode = target;\n        } else {\n            event.stopImmediatePropagation();\n            var nextNode;\n            var navAcrossContainers = true;\n            if (state.mostRecentlyFocusedNode) {\n                if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {\n                    var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);\n                    var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;\n                    if (tabbableNodes.length > 0) {\n                        var mruTabIdx = tabbableNodes.findIndex(function(node) {\n                            return node === state.mostRecentlyFocusedNode;\n                        });\n                        if (mruTabIdx >= 0) {\n                            if (config.isKeyForward(state.recentNavEvent)) {\n                                if (mruTabIdx + 1 < tabbableNodes.length) {\n                                    nextNode = tabbableNodes[mruTabIdx + 1];\n                                    navAcrossContainers = false;\n                                }\n                            } else if (mruTabIdx - 1 >= 0) {\n                                nextNode = tabbableNodes[mruTabIdx - 1];\n                                navAcrossContainers = false;\n                            }\n                        }\n                    }\n                } else if (!state.containerGroups.some(function(g) {\n                    return g.tabbableNodes.some(function(n) {\n                        return getTabIndex(n) > 0;\n                    });\n                })) navAcrossContainers = false;\n            } else navAcrossContainers = false;\n            if (navAcrossContainers) nextNode = findNextNavNode({\n                // move FROM the MRU node, not event-related node (which will be the node that is\n                //  outside the trap causing the focus escape we're trying to fix)\n                target: state.mostRecentlyFocusedNode,\n                isBackward: config.isKeyBackward(state.recentNavEvent)\n            });\n            if (nextNode) _tryFocus(nextNode);\n            else _tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n        }\n        state.recentNavEvent = void 0;\n    };\n    var checkKeyNav = function checkKeyNav2(event) {\n        var isBackward = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n        state.recentNavEvent = event;\n        var destinationNode = findNextNavNode({\n            event: event,\n            isBackward: isBackward\n        });\n        if (destinationNode) {\n            if (isTabEvent(event)) event.preventDefault();\n            _tryFocus(destinationNode);\n        }\n    };\n    var checkTabKey = function checkTabKey2(event) {\n        if (config.isKeyForward(event) || config.isKeyBackward(event)) checkKeyNav(event, config.isKeyBackward(event));\n    };\n    var checkEscapeKey = function checkEscapeKey2(event) {\n        if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {\n            event.preventDefault();\n            trap.deactivate();\n        }\n    };\n    var checkClick = function checkClick2(e) {\n        var target = getActualTarget(e);\n        if (findContainerIndex(target, e) >= 0) return;\n        if (valueOrHandler(config.clickOutsideDeactivates, e)) return;\n        if (valueOrHandler(config.allowOutsideClick, e)) return;\n        e.preventDefault();\n        e.stopImmediatePropagation();\n    };\n    var addListeners = function addListeners2() {\n        if (!state.active) return Promise.resolve();\n        activeFocusTraps.activateTrap(trapStack, trap);\n        var promise;\n        if (config.delayInitialFocus) promise = new Promise(function(resolve) {\n            state.delayInitialFocusTimer = delay(function() {\n                _tryFocus(getInitialFocusNode());\n                resolve();\n            });\n        });\n        else {\n            promise = Promise.resolve();\n            _tryFocus(getInitialFocusNode());\n        }\n        doc.addEventListener(\"focusin\", checkFocusIn, true);\n        doc.addEventListener(\"mousedown\", checkPointerDown, {\n            capture: true,\n            passive: false\n        });\n        doc.addEventListener(\"touchstart\", checkPointerDown, {\n            capture: true,\n            passive: false\n        });\n        doc.addEventListener(\"click\", checkClick, {\n            capture: true,\n            passive: false\n        });\n        doc.addEventListener(\"keydown\", checkTabKey, {\n            capture: true,\n            passive: false\n        });\n        doc.addEventListener(\"keydown\", checkEscapeKey);\n        return promise;\n    };\n    var collectAdjacentElements = function collectAdjacentElements2(containers) {\n        if (state.active && !state.paused) trap._setSubtreeIsolation(false);\n        state.adjacentElements.clear();\n        state.alreadySilent.clear();\n        var containerAncestors = /* @__PURE__ */ new Set();\n        var adjacentElements = /* @__PURE__ */ new Set();\n        var _iterator = _createForOfIteratorHelper(containers), _step;\n        try {\n            for(_iterator.s(); !(_step = _iterator.n()).done;){\n                var container = _step.value;\n                containerAncestors.add(container);\n                var insideShadowRoot = typeof ShadowRoot !== \"undefined\" && container.getRootNode() instanceof ShadowRoot;\n                var current = container;\n                while(current){\n                    containerAncestors.add(current);\n                    var parent = current.parentElement;\n                    var siblings = [];\n                    if (parent) siblings = parent.children;\n                    else if (!parent && insideShadowRoot) {\n                        siblings = current.getRootNode().children;\n                        parent = current.getRootNode().host;\n                        insideShadowRoot = typeof ShadowRoot !== \"undefined\" && parent.getRootNode() instanceof ShadowRoot;\n                    }\n                    var _iterator2 = _createForOfIteratorHelper(siblings), _step2;\n                    try {\n                        for(_iterator2.s(); !(_step2 = _iterator2.n()).done;){\n                            var child = _step2.value;\n                            adjacentElements.add(child);\n                        }\n                    } catch (err) {\n                        _iterator2.e(err);\n                    } finally{\n                        _iterator2.f();\n                    }\n                    current = parent;\n                }\n            }\n        } catch (err) {\n            _iterator.e(err);\n        } finally{\n            _iterator.f();\n        }\n        containerAncestors.forEach(function(el) {\n            adjacentElements[\"delete\"](el);\n        });\n        state.adjacentElements = adjacentElements;\n    };\n    var removeListeners = function removeListeners2() {\n        if (!state.active) return;\n        doc.removeEventListener(\"focusin\", checkFocusIn, true);\n        doc.removeEventListener(\"mousedown\", checkPointerDown, true);\n        doc.removeEventListener(\"touchstart\", checkPointerDown, true);\n        doc.removeEventListener(\"click\", checkClick, true);\n        doc.removeEventListener(\"keydown\", checkTabKey, true);\n        doc.removeEventListener(\"keydown\", checkEscapeKey);\n        return trap;\n    };\n    var checkDomRemoval = function checkDomRemoval2(mutations) {\n        var isFocusedNodeRemoved = mutations.some(function(mutation) {\n            var removedNodes = Array.from(mutation.removedNodes);\n            return removedNodes.some(function(node) {\n                return node === state.mostRecentlyFocusedNode;\n            });\n        });\n        if (isFocusedNodeRemoved) _tryFocus(getInitialFocusNode());\n    };\n    var mutationObserver = typeof window !== \"undefined\" && \"MutationObserver\" in window ? new MutationObserver(checkDomRemoval) : void 0;\n    var updateObservedNodes = function updateObservedNodes2() {\n        if (!mutationObserver) return;\n        mutationObserver.disconnect();\n        if (state.active && !state.paused) state.containers.map(function(container) {\n            mutationObserver.observe(container, {\n                subtree: true,\n                childList: true\n            });\n        });\n    };\n    trap = {\n        get active () {\n            return state.active;\n        },\n        get paused () {\n            return state.paused;\n        },\n        activate: function activate(activateOptions) {\n            if (state.active) return this;\n            var onActivate = getOption(activateOptions, \"onActivate\");\n            var onPostActivate = getOption(activateOptions, \"onPostActivate\");\n            var checkCanFocusTrap = getOption(activateOptions, \"checkCanFocusTrap\");\n            var preexistingTrap = activeFocusTraps.getActiveTrap(trapStack);\n            var revertState = false;\n            if (preexistingTrap && !preexistingTrap.paused) {\n                var _preexistingTrap$_set;\n                (_preexistingTrap$_set = preexistingTrap._setSubtreeIsolation) === null || _preexistingTrap$_set === void 0 || _preexistingTrap$_set.call(preexistingTrap, false);\n                revertState = true;\n            }\n            try {\n                if (!checkCanFocusTrap) updateTabbableNodes();\n                state.active = true;\n                state.paused = false;\n                state.nodeFocusedBeforeActivation = _getActiveElement(doc);\n                onActivate === null || onActivate === void 0 || onActivate();\n                var finishActivation = /* @__PURE__ */ function() {\n                    var _ref6 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee() {\n                        return _regenerator().w(function(_context) {\n                            while(true)switch(_context.n){\n                                case 0:\n                                    if (checkCanFocusTrap) updateTabbableNodes();\n                                    _context.n = 1;\n                                    return addListeners();\n                                case 1:\n                                    trap._setSubtreeIsolation(true);\n                                    updateObservedNodes();\n                                    onPostActivate === null || onPostActivate === void 0 || onPostActivate();\n                                case 2:\n                                    return _context.a(2);\n                            }\n                        }, _callee);\n                    }));\n                    return function finishActivation2() {\n                        return _ref6.apply(this, arguments);\n                    };\n                }();\n                if (checkCanFocusTrap) {\n                    checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);\n                    return this;\n                }\n                finishActivation();\n            } catch (error) {\n                if (preexistingTrap === activeFocusTraps.getActiveTrap(trapStack) && revertState) {\n                    var _preexistingTrap$_set2;\n                    (_preexistingTrap$_set2 = preexistingTrap._setSubtreeIsolation) === null || _preexistingTrap$_set2 === void 0 || _preexistingTrap$_set2.call(preexistingTrap, true);\n                }\n                throw error;\n            }\n            return this;\n        },\n        deactivate: function deactivate(deactivateOptions) {\n            if (!state.active) return this;\n            var options = _objectSpread2({\n                onDeactivate: config.onDeactivate,\n                onPostDeactivate: config.onPostDeactivate,\n                checkCanReturnFocus: config.checkCanReturnFocus\n            }, deactivateOptions);\n            clearTimeout(state.delayInitialFocusTimer);\n            state.delayInitialFocusTimer = void 0;\n            if (!state.paused) trap._setSubtreeIsolation(false);\n            state.alreadySilent.clear();\n            removeListeners();\n            state.active = false;\n            state.paused = false;\n            updateObservedNodes();\n            activeFocusTraps.deactivateTrap(trapStack, trap);\n            var onDeactivate = getOption(options, \"onDeactivate\");\n            var onPostDeactivate = getOption(options, \"onPostDeactivate\");\n            var checkCanReturnFocus = getOption(options, \"checkCanReturnFocus\");\n            var returnFocus = getOption(options, \"returnFocus\", \"returnFocusOnDeactivate\");\n            onDeactivate === null || onDeactivate === void 0 || onDeactivate();\n            var finishDeactivation = function finishDeactivation2() {\n                delay(function() {\n                    if (returnFocus) _tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n                    onPostDeactivate === null || onPostDeactivate === void 0 || onPostDeactivate();\n                });\n            };\n            if (returnFocus && checkCanReturnFocus) {\n                checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);\n                return this;\n            }\n            finishDeactivation();\n            return this;\n        },\n        pause: function pause(pauseOptions) {\n            if (!state.active) return this;\n            state.manuallyPaused = true;\n            return this._setPausedState(true, pauseOptions);\n        },\n        unpause: function unpause(unpauseOptions) {\n            if (!state.active) return this;\n            state.manuallyPaused = false;\n            if (trapStack[trapStack.length - 1] !== this) return this;\n            return this._setPausedState(false, unpauseOptions);\n        },\n        updateContainerElements: function updateContainerElements(containerElements) {\n            var elementsAsArray = [].concat(containerElements).filter(Boolean);\n            state.containers = elementsAsArray.map(function(element) {\n                return typeof element === \"string\" ? doc.querySelector(element) : element;\n            });\n            if (config.isolateSubtrees) collectAdjacentElements(state.containers);\n            if (state.active) {\n                updateTabbableNodes();\n                if (!state.paused) trap._setSubtreeIsolation(true);\n            }\n            updateObservedNodes();\n            return this;\n        }\n    };\n    Object.defineProperties(trap, {\n        _isManuallyPaused: {\n            value: function value() {\n                return state.manuallyPaused;\n            }\n        },\n        _setPausedState: {\n            value: function value(paused, options) {\n                if (state.paused === paused) return this;\n                state.paused = paused;\n                if (paused) {\n                    var onPause = getOption(options, \"onPause\");\n                    var onPostPause = getOption(options, \"onPostPause\");\n                    onPause === null || onPause === void 0 || onPause();\n                    removeListeners();\n                    trap._setSubtreeIsolation(false);\n                    updateObservedNodes();\n                    onPostPause === null || onPostPause === void 0 || onPostPause();\n                } else {\n                    var onUnpause = getOption(options, \"onUnpause\");\n                    var onPostUnpause = getOption(options, \"onPostUnpause\");\n                    onUnpause === null || onUnpause === void 0 || onUnpause();\n                    var finishUnpause = /* @__PURE__ */ function() {\n                        var _ref7 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee2() {\n                            return _regenerator().w(function(_context2) {\n                                while(true)switch(_context2.n){\n                                    case 0:\n                                        updateTabbableNodes();\n                                        _context2.n = 1;\n                                        return addListeners();\n                                    case 1:\n                                        trap._setSubtreeIsolation(true);\n                                        updateObservedNodes();\n                                        onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();\n                                    case 2:\n                                        return _context2.a(2);\n                                }\n                            }, _callee2);\n                        }));\n                        return function finishUnpause2() {\n                            return _ref7.apply(this, arguments);\n                        };\n                    }();\n                    finishUnpause();\n                }\n                return this;\n            }\n        },\n        _setSubtreeIsolation: {\n            value: function value(isEnabled) {\n                if (config.isolateSubtrees) state.adjacentElements.forEach(function(el) {\n                    var _el$getAttribute;\n                    if (isEnabled) switch(config.isolateSubtrees){\n                        case \"aria-hidden\":\n                            if (el.ariaHidden === \"true\" || ((_el$getAttribute = el.getAttribute(\"aria-hidden\")) === null || _el$getAttribute === void 0 ? void 0 : _el$getAttribute.toLowerCase()) === \"true\") state.alreadySilent.add(el);\n                            el.setAttribute(\"aria-hidden\", \"true\");\n                            break;\n                        default:\n                            if (el.inert || el.hasAttribute(\"inert\")) state.alreadySilent.add(el);\n                            el.setAttribute(\"inert\", true);\n                            break;\n                    }\n                    else {\n                        if (state.alreadySilent.has(el)) ;\n                        else switch(config.isolateSubtrees){\n                            case \"aria-hidden\":\n                                el.removeAttribute(\"aria-hidden\");\n                                break;\n                            default:\n                                el.removeAttribute(\"inert\");\n                                break;\n                        }\n                    }\n                });\n            }\n        }\n    });\n    trap.updateContainerElements(elements);\n    return trap;\n};\n// packages/focus/src/index.js\nfunction src_default(Alpine) {\n    let lastFocused;\n    let currentFocused;\n    window.addEventListener(\"focusin\", ()=>{\n        lastFocused = currentFocused;\n        currentFocused = document.activeElement;\n    });\n    Alpine.magic(\"focus\", (el)=>{\n        let within = el;\n        return {\n            __noscroll: false,\n            __wrapAround: false,\n            within (el2) {\n                within = el2;\n                return this;\n            },\n            withoutScrolling () {\n                this.__noscroll = true;\n                return this;\n            },\n            noscroll () {\n                this.__noscroll = true;\n                return this;\n            },\n            withWrapAround () {\n                this.__wrapAround = true;\n                return this;\n            },\n            wrap () {\n                return this.withWrapAround();\n            },\n            focusable (el2) {\n                return isFocusable(el2);\n            },\n            previouslyFocused () {\n                return lastFocused;\n            },\n            lastFocused () {\n                return lastFocused;\n            },\n            focused () {\n                return currentFocused;\n            },\n            focusables () {\n                if (Array.isArray(within)) return within;\n                return focusable(within, {\n                    displayCheck: \"none\"\n                });\n            },\n            all () {\n                return this.focusables();\n            },\n            isFirst (el2) {\n                let els = this.all();\n                return els[0] && els[0].isSameNode(el2);\n            },\n            isLast (el2) {\n                let els = this.all();\n                return els.length && els.slice(-1)[0].isSameNode(el2);\n            },\n            getFirst () {\n                return this.all()[0];\n            },\n            getLast () {\n                return this.all().slice(-1)[0];\n            },\n            getNext () {\n                let list = this.all();\n                let current = document.activeElement;\n                if (list.indexOf(current) === -1) return;\n                if (this.__wrapAround && list.indexOf(current) === list.length - 1) return list[0];\n                return list[list.indexOf(current) + 1];\n            },\n            getPrevious () {\n                let list = this.all();\n                let current = document.activeElement;\n                if (list.indexOf(current) === -1) return;\n                if (this.__wrapAround && list.indexOf(current) === 0) return list.slice(-1)[0];\n                return list[list.indexOf(current) - 1];\n            },\n            first () {\n                this.focus(this.getFirst());\n            },\n            last () {\n                this.focus(this.getLast());\n            },\n            next () {\n                this.focus(this.getNext());\n            },\n            previous () {\n                this.focus(this.getPrevious());\n            },\n            prev () {\n                return this.previous();\n            },\n            focus (el2) {\n                if (!el2) return;\n                setTimeout(()=>{\n                    if (!el2.hasAttribute(\"tabindex\")) el2.setAttribute(\"tabindex\", \"0\");\n                    el2.focus({\n                        preventScroll: this.__noscroll\n                    });\n                });\n            }\n        };\n    });\n    Alpine.directive(\"trap\", Alpine.skipDuringClone((el, { expression, modifiers }, { effect, evaluateLater, cleanup })=>{\n        let evaluator = evaluateLater(expression);\n        let oldValue = false;\n        let options = {\n            escapeDeactivates: false,\n            allowOutsideClick: true,\n            fallbackFocus: ()=>el\n        };\n        let undoInert = ()=>{};\n        if (modifiers.includes(\"noautofocus\")) options.initialFocus = false;\n        else {\n            let autofocusEl = el.querySelector(\"[autofocus]\");\n            if (autofocusEl) options.initialFocus = autofocusEl;\n        }\n        if (modifiers.includes(\"inert\")) options.onPostActivate = ()=>{\n            Alpine.nextTick(()=>{\n                undoInert = setInert(el);\n            });\n        };\n        let trap = createFocusTrap(el, options);\n        let undoDisableScrolling = ()=>{};\n        const releaseFocus = ()=>{\n            undoInert();\n            undoInert = ()=>{};\n            undoDisableScrolling();\n            undoDisableScrolling = ()=>{};\n            trap.deactivate({\n                returnFocus: !modifiers.includes(\"noreturn\")\n            });\n        };\n        effect(()=>evaluator((value)=>{\n                if (oldValue === value) return;\n                if (value && !oldValue) {\n                    if (modifiers.includes(\"noscroll\")) undoDisableScrolling = disableScrolling();\n                    setTimeout(()=>{\n                        trap.activate();\n                    }, 15);\n                }\n                if (!value && oldValue) releaseFocus();\n                oldValue = !!value;\n            }));\n        cleanup(releaseFocus);\n    }, // When cloning, we only want to add aria-hidden attributes to the\n    // DOM and not try to actually trap, as trapping can mess with the\n    // live DOM and isn't just isolated to the cloned DOM.\n    (el, { expression, modifiers }, { evaluate })=>{\n        if (modifiers.includes(\"inert\") && evaluate(expression)) setInert(el);\n    }));\n}\nfunction setInert(el) {\n    let undos = [];\n    crawlSiblingsUp(el, (sibling)=>{\n        let cache = sibling.hasAttribute(\"aria-hidden\");\n        sibling.setAttribute(\"aria-hidden\", \"true\");\n        undos.push(()=>cache || sibling.removeAttribute(\"aria-hidden\"));\n    });\n    return ()=>{\n        while(undos.length)undos.pop()();\n    };\n}\nfunction crawlSiblingsUp(el, callback) {\n    if (el.isSameNode(document.body) || !el.parentNode) return;\n    Array.from(el.parentNode.children).forEach((sibling)=>{\n        if (sibling.isSameNode(el)) crawlSiblingsUp(el.parentNode, callback);\n        else callback(sibling);\n    });\n}\nfunction disableScrolling() {\n    let overflow = document.documentElement.style.overflow;\n    let paddingRight = document.documentElement.style.paddingRight;\n    let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n    let scrollbarGutter = window.getComputedStyle(document.documentElement).scrollbarGutter;\n    document.documentElement.style.overflow = \"hidden\";\n    if (scrollbarGutter && scrollbarGutter !== \"auto\") return ()=>{\n        document.documentElement.style.overflow = overflow;\n    };\n    document.documentElement.style.paddingRight = `${scrollbarWidth}px`;\n    return ()=>{\n        document.documentElement.style.overflow = overflow;\n        document.documentElement.style.paddingRight = paddingRight;\n    };\n}\n// packages/focus/builds/module.js\nvar module_default = src_default;\n /*! Bundled license information:\n\ntabbable/dist/index.esm.js:\n  (*!\n  * tabbable 6.4.0\n  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n  *)\n\nfocus-trap/dist/focus-trap.esm.js:\n  (*!\n  * focus-trap 8.0.0\n  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE\n  *)\n  (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE *)\n*/ \n});\n\nparcelRegister(\"a9mZZ\", function(module, exports) {\n\n$parcel$export(module.exports, \"sort\", () => src_default);\n$parcel$export(module.exports, \"default\", () => module_default);\n// node_modules/sortablejs/modular/sortable.esm.js\nfunction ownKeys(object, enumerableOnly) {\n    var keys = Object.keys(object);\n    if (Object.getOwnPropertySymbols) {\n        var symbols = Object.getOwnPropertySymbols(object);\n        if (enumerableOnly) symbols = symbols.filter(function(sym) {\n            return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n        });\n        keys.push.apply(keys, symbols);\n    }\n    return keys;\n}\nfunction _objectSpread2(target) {\n    for(var i = 1; i < arguments.length; i++){\n        var source = arguments[i] != null ? arguments[i] : {};\n        if (i % 2) ownKeys(Object(source), true).forEach(function(key) {\n            _defineProperty(target, key, source[key]);\n        });\n        else if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n        else ownKeys(Object(source)).forEach(function(key) {\n            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n        });\n    }\n    return target;\n}\nfunction _typeof(obj) {\n    \"@babel/helpers - typeof\";\n    if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") _typeof = function(obj2) {\n        return typeof obj2;\n    };\n    else _typeof = function(obj2) {\n        return obj2 && typeof Symbol === \"function\" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? \"symbol\" : typeof obj2;\n    };\n    return _typeof(obj);\n}\nfunction _defineProperty(obj, key, value) {\n    if (key in obj) Object.defineProperty(obj, key, {\n        value: value,\n        enumerable: true,\n        configurable: true,\n        writable: true\n    });\n    else obj[key] = value;\n    return obj;\n}\nfunction _extends() {\n    _extends = Object.assign || function(target) {\n        for(var i = 1; i < arguments.length; i++){\n            var source = arguments[i];\n            for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];\n        }\n        return target;\n    };\n    return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n    if (source == null) return {};\n    var target = {};\n    var sourceKeys = Object.keys(source);\n    var key, i;\n    for(i = 0; i < sourceKeys.length; i++){\n        key = sourceKeys[i];\n        if (excluded.indexOf(key) >= 0) continue;\n        target[key] = source[key];\n    }\n    return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n    if (source == null) return {};\n    var target = _objectWithoutPropertiesLoose(source, excluded);\n    var key, i;\n    if (Object.getOwnPropertySymbols) {\n        var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n        for(i = 0; i < sourceSymbolKeys.length; i++){\n            key = sourceSymbolKeys[i];\n            if (excluded.indexOf(key) >= 0) continue;\n            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n            target[key] = source[key];\n        }\n    }\n    return target;\n}\nvar version = \"1.15.2\";\nfunction userAgent(pattern) {\n    if (typeof window !== \"undefined\" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(pattern);\n}\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\nvar captureMode = {\n    capture: false,\n    passive: false\n};\nfunction on(el, event, fn) {\n    el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction off(el, event, fn) {\n    el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction matches(el, selector) {\n    if (!selector) return;\n    selector[0] === \">\" && (selector = selector.substring(1));\n    if (el) try {\n        if (el.matches) return el.matches(selector);\n        else if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n        else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n    } catch (_) {\n        return false;\n    }\n    return false;\n}\nfunction getParentOrHost(el) {\n    return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\nfunction closest(el, selector, ctx, includeCTX) {\n    if (el) {\n        ctx = ctx || document;\n        do {\n            if (selector != null && (selector[0] === \">\" ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) return el;\n            if (el === ctx) break;\n        }while (el = getParentOrHost(el));\n    }\n    return null;\n}\nvar R_SPACE = /\\s+/g;\nfunction toggleClass(el, name, state) {\n    if (el && name) {\n        if (el.classList) el.classList[state ? \"add\" : \"remove\"](name);\n        else {\n            var className = (\" \" + el.className + \" \").replace(R_SPACE, \" \").replace(\" \" + name + \" \", \" \");\n            el.className = (className + (state ? \" \" + name : \"\")).replace(R_SPACE, \" \");\n        }\n    }\n}\nfunction css(el, prop, val) {\n    var style = el && el.style;\n    if (style) {\n        if (val === void 0) {\n            if (document.defaultView && document.defaultView.getComputedStyle) val = document.defaultView.getComputedStyle(el, \"\");\n            else if (el.currentStyle) val = el.currentStyle;\n            return prop === void 0 ? val : val[prop];\n        } else {\n            if (!(prop in style) && prop.indexOf(\"webkit\") === -1) prop = \"-webkit-\" + prop;\n            style[prop] = val + (typeof val === \"string\" ? \"\" : \"px\");\n        }\n    }\n}\nfunction matrix(el, selfOnly) {\n    var appliedTransforms = \"\";\n    if (typeof el === \"string\") appliedTransforms = el;\n    else do {\n        var transform = css(el, \"transform\");\n        if (transform && transform !== \"none\") appliedTransforms = transform + \" \" + appliedTransforms;\n    }while (!selfOnly && (el = el.parentNode));\n    var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n    return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction find(ctx, tagName, iterator) {\n    if (ctx) {\n        var list = ctx.getElementsByTagName(tagName), i = 0, n = list.length;\n        if (iterator) for(; i < n; i++)iterator(list[i], i);\n        return list;\n    }\n    return [];\n}\nfunction getWindowScrollingElement() {\n    var scrollingElement = document.scrollingElement;\n    if (scrollingElement) return scrollingElement;\n    else return document.documentElement;\n}\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n    if (!el.getBoundingClientRect && el !== window) return;\n    var elRect, top, left, bottom, right, height, width;\n    if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n        elRect = el.getBoundingClientRect();\n        top = elRect.top;\n        left = elRect.left;\n        bottom = elRect.bottom;\n        right = elRect.right;\n        height = elRect.height;\n        width = elRect.width;\n    } else {\n        top = 0;\n        left = 0;\n        bottom = window.innerHeight;\n        right = window.innerWidth;\n        height = window.innerHeight;\n        width = window.innerWidth;\n    }\n    if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n        container = container || el.parentNode;\n        if (!IE11OrLess) {\n            do if (container && container.getBoundingClientRect && (css(container, \"transform\") !== \"none\" || relativeToNonStaticParent && css(container, \"position\") !== \"static\")) {\n                var containerRect = container.getBoundingClientRect();\n                top -= containerRect.top + parseInt(css(container, \"border-top-width\"));\n                left -= containerRect.left + parseInt(css(container, \"border-left-width\"));\n                bottom = top + elRect.height;\n                right = left + elRect.width;\n                break;\n            }\n            while (container = container.parentNode);\n        }\n    }\n    if (undoScale && el !== window) {\n        var elMatrix = matrix(container || el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d;\n        if (elMatrix) {\n            top /= scaleY;\n            left /= scaleX;\n            width /= scaleX;\n            height /= scaleY;\n            bottom = top + height;\n            right = left + width;\n        }\n    }\n    return {\n        top: top,\n        left: left,\n        bottom: bottom,\n        right: right,\n        width: width,\n        height: height\n    };\n}\nfunction isScrolledPast(el, elSide, parentSide) {\n    var parent = getParentAutoScrollElement(el, true), elSideVal = getRect(el)[elSide];\n    while(parent){\n        var parentSideVal = getRect(parent)[parentSide], visible = void 0;\n        if (parentSide === \"top\" || parentSide === \"left\") visible = elSideVal >= parentSideVal;\n        else visible = elSideVal <= parentSideVal;\n        if (!visible) return parent;\n        if (parent === getWindowScrollingElement()) break;\n        parent = getParentAutoScrollElement(parent, false);\n    }\n    return false;\n}\nfunction getChild(el, childNum, options, includeDragEl) {\n    var currentChild = 0, i = 0, children = el.children;\n    while(i < children.length){\n        if (children[i].style.display !== \"none\" && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n            if (currentChild === childNum) return children[i];\n            currentChild++;\n        }\n        i++;\n    }\n    return null;\n}\nfunction lastChild(el, selector) {\n    var last = el.lastElementChild;\n    while(last && (last === Sortable.ghost || css(last, \"display\") === \"none\" || selector && !matches(last, selector)))last = last.previousElementSibling;\n    return last || null;\n}\nfunction index(el, selector) {\n    var index2 = 0;\n    if (!el || !el.parentNode) return -1;\n    while(el = el.previousElementSibling)if (el.nodeName.toUpperCase() !== \"TEMPLATE\" && el !== Sortable.clone && (!selector || matches(el, selector))) index2++;\n    return index2;\n}\nfunction getRelativeScrollOffset(el) {\n    var offsetLeft = 0, offsetTop = 0, winScroller = getWindowScrollingElement();\n    if (el) do {\n        var elMatrix = matrix(el), scaleX = elMatrix.a, scaleY = elMatrix.d;\n        offsetLeft += el.scrollLeft * scaleX;\n        offsetTop += el.scrollTop * scaleY;\n    }while (el !== winScroller && (el = el.parentNode));\n    return [\n        offsetLeft,\n        offsetTop\n    ];\n}\nfunction indexOfObject(arr, obj) {\n    for(var i in arr){\n        if (!arr.hasOwnProperty(i)) continue;\n        for(var key in obj){\n            if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n        }\n    }\n    return -1;\n}\nfunction getParentAutoScrollElement(el, includeSelf) {\n    if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n    var elem = el;\n    var gotSelf = false;\n    do if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n        var elemCSS = css(elem);\n        if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == \"auto\" || elemCSS.overflowX == \"scroll\") || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == \"auto\" || elemCSS.overflowY == \"scroll\")) {\n            if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n            if (gotSelf || includeSelf) return elem;\n            gotSelf = true;\n        }\n    }\n    while (elem = elem.parentNode);\n    return getWindowScrollingElement();\n}\nfunction extend(dst, src) {\n    if (dst && src) {\n        for(var key in src)if (src.hasOwnProperty(key)) dst[key] = src[key];\n    }\n    return dst;\n}\nfunction isRectEqual(rect1, rect2) {\n    return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\nvar _throttleTimeout;\nfunction throttle(callback, ms) {\n    return function() {\n        if (!_throttleTimeout) {\n            var args = arguments, _this = this;\n            if (args.length === 1) callback.call(_this, args[0]);\n            else callback.apply(_this, args);\n            _throttleTimeout = setTimeout(function() {\n                _throttleTimeout = void 0;\n            }, ms);\n        }\n    };\n}\nfunction cancelThrottle() {\n    clearTimeout(_throttleTimeout);\n    _throttleTimeout = void 0;\n}\nfunction scrollBy(el, x, y) {\n    el.scrollLeft += x;\n    el.scrollTop += y;\n}\nfunction clone(el) {\n    var Polymer = window.Polymer;\n    var $ = window.jQuery || window.Zepto;\n    if (Polymer && Polymer.dom) return Polymer.dom(el).cloneNode(true);\n    else if ($) return $(el).clone(true)[0];\n    else return el.cloneNode(true);\n}\nfunction getChildContainingRectFromElement(container, options, ghostEl2) {\n    var rect = {};\n    Array.from(container.children).forEach(function(child) {\n        var _rect$left, _rect$top, _rect$right, _rect$bottom;\n        if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl2) return;\n        var childRect = getRect(child);\n        rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);\n        rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);\n        rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);\n        rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);\n    });\n    rect.width = rect.right - rect.left;\n    rect.height = rect.bottom - rect.top;\n    rect.x = rect.left;\n    rect.y = rect.top;\n    return rect;\n}\nvar expando = \"Sortable\" + new Date().getTime();\nfunction AnimationStateManager() {\n    var animationStates = [], animationCallbackId;\n    return {\n        captureAnimationState: function captureAnimationState() {\n            animationStates = [];\n            if (!this.options.animation) return;\n            var children = [].slice.call(this.el.children);\n            children.forEach(function(child) {\n                if (css(child, \"display\") === \"none\" || child === Sortable.ghost) return;\n                animationStates.push({\n                    target: child,\n                    rect: getRect(child)\n                });\n                var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);\n                if (child.thisAnimationDuration) {\n                    var childMatrix = matrix(child, true);\n                    if (childMatrix) {\n                        fromRect.top -= childMatrix.f;\n                        fromRect.left -= childMatrix.e;\n                    }\n                }\n                child.fromRect = fromRect;\n            });\n        },\n        addAnimationState: function addAnimationState(state) {\n            animationStates.push(state);\n        },\n        removeAnimationState: function removeAnimationState(target) {\n            animationStates.splice(indexOfObject(animationStates, {\n                target: target\n            }), 1);\n        },\n        animateAll: function animateAll(callback) {\n            var _this = this;\n            if (!this.options.animation) {\n                clearTimeout(animationCallbackId);\n                if (typeof callback === \"function\") callback();\n                return;\n            }\n            var animating = false, animationTime = 0;\n            animationStates.forEach(function(state) {\n                var time = 0, target = state.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state.rect, targetMatrix = matrix(target, true);\n                if (targetMatrix) {\n                    toRect.top -= targetMatrix.f;\n                    toRect.left -= targetMatrix.e;\n                }\n                target.toRect = toRect;\n                if (target.thisAnimationDuration) {\n                    if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n                    (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n                }\n                if (!isRectEqual(toRect, fromRect)) {\n                    target.prevFromRect = fromRect;\n                    target.prevToRect = toRect;\n                    if (!time) time = _this.options.animation;\n                    _this.animate(target, animatingRect, toRect, time);\n                }\n                if (time) {\n                    animating = true;\n                    animationTime = Math.max(animationTime, time);\n                    clearTimeout(target.animationResetTimer);\n                    target.animationResetTimer = setTimeout(function() {\n                        target.animationTime = 0;\n                        target.prevFromRect = null;\n                        target.fromRect = null;\n                        target.prevToRect = null;\n                        target.thisAnimationDuration = null;\n                    }, time);\n                    target.thisAnimationDuration = time;\n                }\n            });\n            clearTimeout(animationCallbackId);\n            if (!animating) {\n                if (typeof callback === \"function\") callback();\n            } else animationCallbackId = setTimeout(function() {\n                if (typeof callback === \"function\") callback();\n            }, animationTime);\n            animationStates = [];\n        },\n        animate: function animate(target, currentRect, toRect, duration) {\n            if (duration) {\n                css(target, \"transition\", \"\");\n                css(target, \"transform\", \"\");\n                var elMatrix = matrix(this.el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d, translateX = (currentRect.left - toRect.left) / (scaleX || 1), translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n                target.animatingX = !!translateX;\n                target.animatingY = !!translateY;\n                css(target, \"transform\", \"translate3d(\" + translateX + \"px,\" + translateY + \"px,0)\");\n                this.forRepaintDummy = repaint(target);\n                css(target, \"transition\", \"transform \" + duration + \"ms\" + (this.options.easing ? \" \" + this.options.easing : \"\"));\n                css(target, \"transform\", \"translate3d(0,0,0)\");\n                typeof target.animated === \"number\" && clearTimeout(target.animated);\n                target.animated = setTimeout(function() {\n                    css(target, \"transition\", \"\");\n                    css(target, \"transform\", \"\");\n                    target.animated = false;\n                    target.animatingX = false;\n                    target.animatingY = false;\n                }, duration);\n            }\n        }\n    };\n}\nfunction repaint(target) {\n    return target.offsetWidth;\n}\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n    return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\nvar plugins = [];\nvar defaults = {\n    initializeByDefault: true\n};\nvar PluginManager = {\n    mount: function mount(plugin) {\n        for(var option2 in defaults)if (defaults.hasOwnProperty(option2) && !(option2 in plugin)) plugin[option2] = defaults[option2];\n        plugins.forEach(function(p) {\n            if (p.pluginName === plugin.pluginName) throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n        });\n        plugins.push(plugin);\n    },\n    pluginEvent: function pluginEvent(eventName, sortable, evt) {\n        var _this = this;\n        this.eventCanceled = false;\n        evt.cancel = function() {\n            _this.eventCanceled = true;\n        };\n        var eventNameGlobal = eventName + \"Global\";\n        plugins.forEach(function(plugin) {\n            if (!sortable[plugin.pluginName]) return;\n            if (sortable[plugin.pluginName][eventNameGlobal]) sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n                sortable: sortable\n            }, evt));\n            if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) sortable[plugin.pluginName][eventName](_objectSpread2({\n                sortable: sortable\n            }, evt));\n        });\n    },\n    initializePlugins: function initializePlugins(sortable, el, defaults2, options) {\n        plugins.forEach(function(plugin) {\n            var pluginName = plugin.pluginName;\n            if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n            var initialized = new plugin(sortable, el, sortable.options);\n            initialized.sortable = sortable;\n            initialized.options = sortable.options;\n            sortable[pluginName] = initialized;\n            _extends(defaults2, initialized.defaults);\n        });\n        for(var option2 in sortable.options){\n            if (!sortable.options.hasOwnProperty(option2)) continue;\n            var modified = this.modifyOption(sortable, option2, sortable.options[option2]);\n            if (typeof modified !== \"undefined\") sortable.options[option2] = modified;\n        }\n    },\n    getEventProperties: function getEventProperties(name, sortable) {\n        var eventProperties = {};\n        plugins.forEach(function(plugin) {\n            if (typeof plugin.eventProperties !== \"function\") return;\n            _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n        });\n        return eventProperties;\n    },\n    modifyOption: function modifyOption(sortable, name, value) {\n        var modifiedValue;\n        plugins.forEach(function(plugin) {\n            if (!sortable[plugin.pluginName]) return;\n            if (plugin.optionListeners && typeof plugin.optionListeners[name] === \"function\") modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n        });\n        return modifiedValue;\n    }\n};\nfunction dispatchEvent(_ref) {\n    var sortable = _ref.sortable, rootEl2 = _ref.rootEl, name = _ref.name, targetEl = _ref.targetEl, cloneEl2 = _ref.cloneEl, toEl = _ref.toEl, fromEl = _ref.fromEl, oldIndex2 = _ref.oldIndex, newIndex2 = _ref.newIndex, oldDraggableIndex2 = _ref.oldDraggableIndex, newDraggableIndex2 = _ref.newDraggableIndex, originalEvent = _ref.originalEvent, putSortable2 = _ref.putSortable, extraEventProperties = _ref.extraEventProperties;\n    sortable = sortable || rootEl2 && rootEl2[expando];\n    if (!sortable) return;\n    var evt, options = sortable.options, onName = \"on\" + name.charAt(0).toUpperCase() + name.substr(1);\n    if (window.CustomEvent && !IE11OrLess && !Edge) evt = new CustomEvent(name, {\n        bubbles: true,\n        cancelable: true\n    });\n    else {\n        evt = document.createEvent(\"Event\");\n        evt.initEvent(name, true, true);\n    }\n    evt.to = toEl || rootEl2;\n    evt.from = fromEl || rootEl2;\n    evt.item = targetEl || rootEl2;\n    evt.clone = cloneEl2;\n    evt.oldIndex = oldIndex2;\n    evt.newIndex = newIndex2;\n    evt.oldDraggableIndex = oldDraggableIndex2;\n    evt.newDraggableIndex = newDraggableIndex2;\n    evt.originalEvent = originalEvent;\n    evt.pullMode = putSortable2 ? putSortable2.lastPutMode : void 0;\n    var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n    for(var option2 in allEventProperties)evt[option2] = allEventProperties[option2];\n    if (rootEl2) rootEl2.dispatchEvent(evt);\n    if (options[onName]) options[onName].call(sortable, evt);\n}\nvar _excluded = [\n    \"evt\"\n];\nvar pluginEvent2 = function pluginEvent3(eventName, sortable) {\n    var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, originalEvent = _ref.evt, data = _objectWithoutProperties(_ref, _excluded);\n    PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n        dragEl: dragEl,\n        parentEl: parentEl,\n        ghostEl: ghostEl,\n        rootEl: rootEl,\n        nextEl: nextEl,\n        lastDownEl: lastDownEl,\n        cloneEl: cloneEl,\n        cloneHidden: cloneHidden,\n        dragStarted: moved,\n        putSortable: putSortable,\n        activeSortable: Sortable.active,\n        originalEvent: originalEvent,\n        oldIndex: oldIndex,\n        oldDraggableIndex: oldDraggableIndex,\n        newIndex: newIndex,\n        newDraggableIndex: newDraggableIndex,\n        hideGhostForTarget: _hideGhostForTarget,\n        unhideGhostForTarget: _unhideGhostForTarget,\n        cloneNowHidden: function cloneNowHidden() {\n            cloneHidden = true;\n        },\n        cloneNowShown: function cloneNowShown() {\n            cloneHidden = false;\n        },\n        dispatchSortableEvent: function dispatchSortableEvent(name) {\n            _dispatchEvent({\n                sortable: sortable,\n                name: name,\n                originalEvent: originalEvent\n            });\n        }\n    }, data));\n};\nfunction _dispatchEvent(info) {\n    dispatchEvent(_objectSpread2({\n        putSortable: putSortable,\n        cloneEl: cloneEl,\n        targetEl: dragEl,\n        rootEl: rootEl,\n        oldIndex: oldIndex,\n        oldDraggableIndex: oldDraggableIndex,\n        newIndex: newIndex,\n        newDraggableIndex: newDraggableIndex\n    }, info));\n}\nvar dragEl;\nvar parentEl;\nvar ghostEl;\nvar rootEl;\nvar nextEl;\nvar lastDownEl;\nvar cloneEl;\nvar cloneHidden;\nvar oldIndex;\nvar newIndex;\nvar oldDraggableIndex;\nvar newDraggableIndex;\nvar activeGroup;\nvar putSortable;\nvar awaitingDragStarted = false;\nvar ignoreNextClick = false;\nvar sortables = [];\nvar tapEvt;\nvar touchEvt;\nvar lastDx;\nvar lastDy;\nvar tapDistanceLeft;\nvar tapDistanceTop;\nvar moved;\nvar lastTarget;\nvar lastDirection;\nvar pastFirstInvertThresh = false;\nvar isCircumstantialInvert = false;\nvar targetMoveDistance;\nvar ghostRelativeParent;\nvar ghostRelativeParentInitialScroll = [];\nvar _silent = false;\nvar savedInputChecked = [];\nvar documentExists = typeof document !== \"undefined\";\nvar PositionGhostAbsolutely = IOS;\nvar CSSFloatProperty = Edge || IE11OrLess ? \"cssFloat\" : \"float\";\nvar supportDraggable = documentExists && !ChromeForAndroid && !IOS && \"draggable\" in document.createElement(\"div\");\nvar supportCssPointerEvents = function() {\n    if (!documentExists) return;\n    if (IE11OrLess) return false;\n    var el = document.createElement(\"x\");\n    el.style.cssText = \"pointer-events:auto\";\n    return el.style.pointerEvents === \"auto\";\n}();\nvar _detectDirection = function _detectDirection2(el, options) {\n    var elCSS = css(el), elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), child1 = getChild(el, 0, options), child2 = getChild(el, 1, options), firstChildCSS = child1 && css(child1), secondChildCSS = child2 && css(child2), firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width, secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n    if (elCSS.display === \"flex\") return elCSS.flexDirection === \"column\" || elCSS.flexDirection === \"column-reverse\" ? \"vertical\" : \"horizontal\";\n    if (elCSS.display === \"grid\") return elCSS.gridTemplateColumns.split(\" \").length <= 1 ? \"vertical\" : \"horizontal\";\n    if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== \"none\") {\n        var touchingSideChild2 = firstChildCSS[\"float\"] === \"left\" ? \"left\" : \"right\";\n        return child2 && (secondChildCSS.clear === \"both\" || secondChildCSS.clear === touchingSideChild2) ? \"vertical\" : \"horizontal\";\n    }\n    return child1 && (firstChildCSS.display === \"block\" || firstChildCSS.display === \"flex\" || firstChildCSS.display === \"table\" || firstChildCSS.display === \"grid\" || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === \"none\" || child2 && elCSS[CSSFloatProperty] === \"none\" && firstChildWidth + secondChildWidth > elWidth) ? \"vertical\" : \"horizontal\";\n};\nvar _dragElInRowColumn = function _dragElInRowColumn2(dragRect, targetRect, vertical) {\n    var dragElS1Opp = vertical ? dragRect.left : dragRect.top, dragElS2Opp = vertical ? dragRect.right : dragRect.bottom, dragElOppLength = vertical ? dragRect.width : dragRect.height, targetS1Opp = vertical ? targetRect.left : targetRect.top, targetS2Opp = vertical ? targetRect.right : targetRect.bottom, targetOppLength = vertical ? targetRect.width : targetRect.height;\n    return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n};\nvar _detectNearestEmptySortable = function _detectNearestEmptySortable2(x, y) {\n    var ret;\n    sortables.some(function(sortable) {\n        var threshold = sortable[expando].options.emptyInsertThreshold;\n        if (!threshold || lastChild(sortable)) return;\n        var rect = getRect(sortable), insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold, insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n        if (insideHorizontally && insideVertically) return ret = sortable;\n    });\n    return ret;\n};\nvar _prepareGroup = function _prepareGroup2(options) {\n    function toFn(value, pull) {\n        return function(to, from, dragEl2, evt) {\n            var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n            if (value == null && (pull || sameGroup)) return true;\n            else if (value == null || value === false) return false;\n            else if (pull && value === \"clone\") return value;\n            else if (typeof value === \"function\") return toFn(value(to, from, dragEl2, evt), pull)(to, from, dragEl2, evt);\n            else {\n                var otherGroup = (pull ? to : from).options.group.name;\n                return value === true || typeof value === \"string\" && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n            }\n        };\n    }\n    var group = {};\n    var originalGroup = options.group;\n    if (!originalGroup || _typeof(originalGroup) != \"object\") originalGroup = {\n        name: originalGroup\n    };\n    group.name = originalGroup.name;\n    group.checkPull = toFn(originalGroup.pull, true);\n    group.checkPut = toFn(originalGroup.put);\n    group.revertClone = originalGroup.revertClone;\n    options.group = group;\n};\nvar _hideGhostForTarget = function _hideGhostForTarget2() {\n    if (!supportCssPointerEvents && ghostEl) css(ghostEl, \"display\", \"none\");\n};\nvar _unhideGhostForTarget = function _unhideGhostForTarget2() {\n    if (!supportCssPointerEvents && ghostEl) css(ghostEl, \"display\", \"\");\n};\nif (documentExists && !ChromeForAndroid) document.addEventListener(\"click\", function(evt) {\n    if (ignoreNextClick) {\n        evt.preventDefault();\n        evt.stopPropagation && evt.stopPropagation();\n        evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n        ignoreNextClick = false;\n        return false;\n    }\n}, true);\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent2(evt) {\n    if (dragEl) {\n        evt = evt.touches ? evt.touches[0] : evt;\n        var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n        if (nearest) {\n            var event = {};\n            for(var i in evt)if (evt.hasOwnProperty(i)) event[i] = evt[i];\n            event.target = event.rootEl = nearest;\n            event.preventDefault = void 0;\n            event.stopPropagation = void 0;\n            nearest[expando]._onDragOver(event);\n        }\n    }\n};\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl2(evt) {\n    if (dragEl) dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n};\nfunction Sortable(el, options) {\n    if (!(el && el.nodeType && el.nodeType === 1)) throw \"Sortable: `el` must be an HTMLElement, not \".concat(({}).toString.call(el));\n    this.el = el;\n    this.options = options = _extends({}, options);\n    el[expando] = this;\n    var defaults2 = {\n        group: null,\n        sort: true,\n        disabled: false,\n        store: null,\n        handle: null,\n        draggable: /^[uo]l$/i.test(el.nodeName) ? \">li\" : \">*\",\n        swapThreshold: 1,\n        // percentage; 0 <= x <= 1\n        invertSwap: false,\n        // invert always\n        invertedSwapThreshold: null,\n        // will be set to same as swapThreshold if default\n        removeCloneOnHide: true,\n        direction: function direction() {\n            return _detectDirection(el, this.options);\n        },\n        ghostClass: \"sortable-ghost\",\n        chosenClass: \"sortable-chosen\",\n        dragClass: \"sortable-drag\",\n        ignore: \"a, img\",\n        filter: null,\n        preventOnFilter: true,\n        animation: 0,\n        easing: null,\n        setData: function setData(dataTransfer, dragEl2) {\n            dataTransfer.setData(\"Text\", dragEl2.textContent);\n        },\n        dropBubble: false,\n        dragoverBubble: false,\n        dataIdAttr: \"data-id\",\n        delay: 0,\n        delayOnTouchOnly: false,\n        touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n        forceFallback: false,\n        fallbackClass: \"sortable-fallback\",\n        fallbackOnBody: false,\n        fallbackTolerance: 0,\n        fallbackOffset: {\n            x: 0,\n            y: 0\n        },\n        supportPointer: Sortable.supportPointer !== false && \"PointerEvent\" in window && !Safari,\n        emptyInsertThreshold: 5\n    };\n    PluginManager.initializePlugins(this, el, defaults2);\n    for(var name in defaults2)!(name in options) && (options[name] = defaults2[name]);\n    _prepareGroup(options);\n    for(var fn in this)if (fn.charAt(0) === \"_\" && typeof this[fn] === \"function\") this[fn] = this[fn].bind(this);\n    this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n    if (this.nativeDraggable) this.options.touchStartThreshold = 1;\n    if (options.supportPointer) on(el, \"pointerdown\", this._onTapStart);\n    else {\n        on(el, \"mousedown\", this._onTapStart);\n        on(el, \"touchstart\", this._onTapStart);\n    }\n    if (this.nativeDraggable) {\n        on(el, \"dragover\", this);\n        on(el, \"dragenter\", this);\n    }\n    sortables.push(this.el);\n    options.store && options.store.get && this.sort(options.store.get(this) || []);\n    _extends(this, AnimationStateManager());\n}\nSortable.prototype = /** @lends Sortable.prototype */ {\n    constructor: Sortable,\n    _isOutsideThisEl: function _isOutsideThisEl(target) {\n        if (!this.el.contains(target) && target !== this.el) lastTarget = null;\n    },\n    _getDirection: function _getDirection(evt, target) {\n        return typeof this.options.direction === \"function\" ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n    },\n    _onTapStart: function _onTapStart(evt) {\n        if (!evt.cancelable) return;\n        var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === \"touch\" && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter = options.filter;\n        _saveInputCheckedState(el);\n        if (dragEl) return;\n        if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) return;\n        if (originalTarget.isContentEditable) return;\n        if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === \"SELECT\") return;\n        target = closest(target, options.draggable, el, false);\n        if (target && target.animated) return;\n        if (lastDownEl === target) return;\n        oldIndex = index(target);\n        oldDraggableIndex = index(target, options.draggable);\n        if (typeof filter === \"function\") {\n            if (filter.call(this, evt, target, this)) {\n                _dispatchEvent({\n                    sortable: _this,\n                    rootEl: originalTarget,\n                    name: \"filter\",\n                    targetEl: target,\n                    toEl: el,\n                    fromEl: el\n                });\n                pluginEvent2(\"filter\", _this, {\n                    evt: evt\n                });\n                preventOnFilter && evt.cancelable && evt.preventDefault();\n                return;\n            }\n        } else if (filter) {\n            filter = filter.split(\",\").some(function(criteria) {\n                criteria = closest(originalTarget, criteria.trim(), el, false);\n                if (criteria) {\n                    _dispatchEvent({\n                        sortable: _this,\n                        rootEl: criteria,\n                        name: \"filter\",\n                        targetEl: target,\n                        fromEl: el,\n                        toEl: el\n                    });\n                    pluginEvent2(\"filter\", _this, {\n                        evt: evt\n                    });\n                    return true;\n                }\n            });\n            if (filter) {\n                preventOnFilter && evt.cancelable && evt.preventDefault();\n                return;\n            }\n        }\n        if (options.handle && !closest(originalTarget, options.handle, el, false)) return;\n        this._prepareDragStart(evt, touch, target);\n    },\n    _prepareDragStart: function _prepareDragStart(evt, touch, target) {\n        var _this = this, el = _this.el, options = _this.options, ownerDocument = el.ownerDocument, dragStartFn;\n        if (target && !dragEl && target.parentNode === el) {\n            var dragRect = getRect(target);\n            rootEl = el;\n            dragEl = target;\n            parentEl = dragEl.parentNode;\n            nextEl = dragEl.nextSibling;\n            lastDownEl = target;\n            activeGroup = options.group;\n            Sortable.dragged = dragEl;\n            tapEvt = {\n                target: dragEl,\n                clientX: (touch || evt).clientX,\n                clientY: (touch || evt).clientY\n            };\n            tapDistanceLeft = tapEvt.clientX - dragRect.left;\n            tapDistanceTop = tapEvt.clientY - dragRect.top;\n            this._lastX = (touch || evt).clientX;\n            this._lastY = (touch || evt).clientY;\n            dragEl.style[\"will-change\"] = \"all\";\n            dragStartFn = function dragStartFn2() {\n                pluginEvent2(\"delayEnded\", _this, {\n                    evt: evt\n                });\n                if (Sortable.eventCanceled) {\n                    _this._onDrop();\n                    return;\n                }\n                _this._disableDelayedDragEvents();\n                if (!FireFox && _this.nativeDraggable) dragEl.draggable = true;\n                _this._triggerDragStart(evt, touch);\n                _dispatchEvent({\n                    sortable: _this,\n                    name: \"choose\",\n                    originalEvent: evt\n                });\n                toggleClass(dragEl, options.chosenClass, true);\n            };\n            options.ignore.split(\",\").forEach(function(criteria) {\n                find(dragEl, criteria.trim(), _disableDraggable);\n            });\n            on(ownerDocument, \"dragover\", nearestEmptyInsertDetectEvent);\n            on(ownerDocument, \"mousemove\", nearestEmptyInsertDetectEvent);\n            on(ownerDocument, \"touchmove\", nearestEmptyInsertDetectEvent);\n            on(ownerDocument, \"mouseup\", _this._onDrop);\n            on(ownerDocument, \"touchend\", _this._onDrop);\n            on(ownerDocument, \"touchcancel\", _this._onDrop);\n            if (FireFox && this.nativeDraggable) {\n                this.options.touchStartThreshold = 4;\n                dragEl.draggable = true;\n            }\n            pluginEvent2(\"delayStart\", this, {\n                evt: evt\n            });\n            if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n                if (Sortable.eventCanceled) {\n                    this._onDrop();\n                    return;\n                }\n                on(ownerDocument, \"mouseup\", _this._disableDelayedDrag);\n                on(ownerDocument, \"touchend\", _this._disableDelayedDrag);\n                on(ownerDocument, \"touchcancel\", _this._disableDelayedDrag);\n                on(ownerDocument, \"mousemove\", _this._delayedDragTouchMoveHandler);\n                on(ownerDocument, \"touchmove\", _this._delayedDragTouchMoveHandler);\n                options.supportPointer && on(ownerDocument, \"pointermove\", _this._delayedDragTouchMoveHandler);\n                _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n            } else dragStartFn();\n        }\n    },\n    _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(e) {\n        var touch = e.touches ? e.touches[0] : e;\n        if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) this._disableDelayedDrag();\n    },\n    _disableDelayedDrag: function _disableDelayedDrag() {\n        dragEl && _disableDraggable(dragEl);\n        clearTimeout(this._dragStartTimer);\n        this._disableDelayedDragEvents();\n    },\n    _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n        var ownerDocument = this.el.ownerDocument;\n        off(ownerDocument, \"mouseup\", this._disableDelayedDrag);\n        off(ownerDocument, \"touchend\", this._disableDelayedDrag);\n        off(ownerDocument, \"touchcancel\", this._disableDelayedDrag);\n        off(ownerDocument, \"mousemove\", this._delayedDragTouchMoveHandler);\n        off(ownerDocument, \"touchmove\", this._delayedDragTouchMoveHandler);\n        off(ownerDocument, \"pointermove\", this._delayedDragTouchMoveHandler);\n    },\n    _triggerDragStart: function _triggerDragStart(evt, touch) {\n        touch = touch || evt.pointerType == \"touch\" && evt;\n        if (!this.nativeDraggable || touch) {\n            if (this.options.supportPointer) on(document, \"pointermove\", this._onTouchMove);\n            else if (touch) on(document, \"touchmove\", this._onTouchMove);\n            else on(document, \"mousemove\", this._onTouchMove);\n        } else {\n            on(dragEl, \"dragend\", this);\n            on(rootEl, \"dragstart\", this._onDragStart);\n        }\n        try {\n            if (document.selection) _nextTick(function() {\n                document.selection.empty();\n            });\n            else window.getSelection().removeAllRanges();\n        } catch (err) {}\n    },\n    _dragStarted: function _dragStarted(fallback, evt) {\n        awaitingDragStarted = false;\n        if (rootEl && dragEl) {\n            pluginEvent2(\"dragStarted\", this, {\n                evt: evt\n            });\n            if (this.nativeDraggable) on(document, \"dragover\", _checkOutsideTargetEl);\n            var options = this.options;\n            !fallback && toggleClass(dragEl, options.dragClass, false);\n            toggleClass(dragEl, options.ghostClass, true);\n            Sortable.active = this;\n            fallback && this._appendGhost();\n            _dispatchEvent({\n                sortable: this,\n                name: \"start\",\n                originalEvent: evt\n            });\n        } else this._nulling();\n    },\n    _emulateDragOver: function _emulateDragOver() {\n        if (touchEvt) {\n            this._lastX = touchEvt.clientX;\n            this._lastY = touchEvt.clientY;\n            _hideGhostForTarget();\n            var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n            var parent = target;\n            while(target && target.shadowRoot){\n                target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n                if (target === parent) break;\n                parent = target;\n            }\n            dragEl.parentNode[expando]._isOutsideThisEl(target);\n            if (parent) do {\n                if (parent[expando]) {\n                    var inserted = void 0;\n                    inserted = parent[expando]._onDragOver({\n                        clientX: touchEvt.clientX,\n                        clientY: touchEvt.clientY,\n                        target: target,\n                        rootEl: parent\n                    });\n                    if (inserted && !this.options.dragoverBubble) break;\n                }\n                target = parent;\n            }while (parent = parent.parentNode);\n            _unhideGhostForTarget();\n        }\n    },\n    _onTouchMove: function _onTouchMove(evt) {\n        if (tapEvt) {\n            var options = this.options, fallbackTolerance = options.fallbackTolerance, fallbackOffset = options.fallbackOffset, touch = evt.touches ? evt.touches[0] : evt, ghostMatrix = ghostEl && matrix(ghostEl, true), scaleX = ghostEl && ghostMatrix && ghostMatrix.a, scaleY = ghostEl && ghostMatrix && ghostMatrix.d, relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent), dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1), dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n            if (!Sortable.active && !awaitingDragStarted) {\n                if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) return;\n                this._onDragStart(evt, true);\n            }\n            if (ghostEl) {\n                if (ghostMatrix) {\n                    ghostMatrix.e += dx - (lastDx || 0);\n                    ghostMatrix.f += dy - (lastDy || 0);\n                } else ghostMatrix = {\n                    a: 1,\n                    b: 0,\n                    c: 0,\n                    d: 1,\n                    e: dx,\n                    f: dy\n                };\n                var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n                css(ghostEl, \"webkitTransform\", cssMatrix);\n                css(ghostEl, \"mozTransform\", cssMatrix);\n                css(ghostEl, \"msTransform\", cssMatrix);\n                css(ghostEl, \"transform\", cssMatrix);\n                lastDx = dx;\n                lastDy = dy;\n                touchEvt = touch;\n            }\n            evt.cancelable && evt.preventDefault();\n        }\n    },\n    _appendGhost: function _appendGhost() {\n        if (!ghostEl) {\n            var container = this.options.fallbackOnBody ? document.body : rootEl, rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container), options = this.options;\n            if (PositionGhostAbsolutely) {\n                ghostRelativeParent = container;\n                while(css(ghostRelativeParent, \"position\") === \"static\" && css(ghostRelativeParent, \"transform\") === \"none\" && ghostRelativeParent !== document)ghostRelativeParent = ghostRelativeParent.parentNode;\n                if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n                    if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n                    rect.top += ghostRelativeParent.scrollTop;\n                    rect.left += ghostRelativeParent.scrollLeft;\n                } else ghostRelativeParent = getWindowScrollingElement();\n                ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n            }\n            ghostEl = dragEl.cloneNode(true);\n            toggleClass(ghostEl, options.ghostClass, false);\n            toggleClass(ghostEl, options.fallbackClass, true);\n            toggleClass(ghostEl, options.dragClass, true);\n            css(ghostEl, \"transition\", \"\");\n            css(ghostEl, \"transform\", \"\");\n            css(ghostEl, \"box-sizing\", \"border-box\");\n            css(ghostEl, \"margin\", 0);\n            css(ghostEl, \"top\", rect.top);\n            css(ghostEl, \"left\", rect.left);\n            css(ghostEl, \"width\", rect.width);\n            css(ghostEl, \"height\", rect.height);\n            css(ghostEl, \"opacity\", \"0.8\");\n            css(ghostEl, \"position\", PositionGhostAbsolutely ? \"absolute\" : \"fixed\");\n            css(ghostEl, \"zIndex\", \"100000\");\n            css(ghostEl, \"pointerEvents\", \"none\");\n            Sortable.ghost = ghostEl;\n            container.appendChild(ghostEl);\n            css(ghostEl, \"transform-origin\", tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + \"% \" + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + \"%\");\n        }\n    },\n    _onDragStart: function _onDragStart(evt, fallback) {\n        var _this = this;\n        var dataTransfer = evt.dataTransfer;\n        var options = _this.options;\n        pluginEvent2(\"dragStart\", this, {\n            evt: evt\n        });\n        if (Sortable.eventCanceled) {\n            this._onDrop();\n            return;\n        }\n        pluginEvent2(\"setupClone\", this);\n        if (!Sortable.eventCanceled) {\n            cloneEl = clone(dragEl);\n            cloneEl.removeAttribute(\"id\");\n            cloneEl.draggable = false;\n            cloneEl.style[\"will-change\"] = \"\";\n            this._hideClone();\n            toggleClass(cloneEl, this.options.chosenClass, false);\n            Sortable.clone = cloneEl;\n        }\n        _this.cloneId = _nextTick(function() {\n            pluginEvent2(\"clone\", _this);\n            if (Sortable.eventCanceled) return;\n            if (!_this.options.removeCloneOnHide) rootEl.insertBefore(cloneEl, dragEl);\n            _this._hideClone();\n            _dispatchEvent({\n                sortable: _this,\n                name: \"clone\"\n            });\n        });\n        !fallback && toggleClass(dragEl, options.dragClass, true);\n        if (fallback) {\n            ignoreNextClick = true;\n            _this._loopId = setInterval(_this._emulateDragOver, 50);\n        } else {\n            off(document, \"mouseup\", _this._onDrop);\n            off(document, \"touchend\", _this._onDrop);\n            off(document, \"touchcancel\", _this._onDrop);\n            if (dataTransfer) {\n                dataTransfer.effectAllowed = \"move\";\n                options.setData && options.setData.call(_this, dataTransfer, dragEl);\n            }\n            on(document, \"drop\", _this);\n            css(dragEl, \"transform\", \"translateZ(0)\");\n        }\n        awaitingDragStarted = true;\n        _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n        on(document, \"selectstart\", _this);\n        moved = true;\n        if (Safari) css(document.body, \"user-select\", \"none\");\n    },\n    // Returns true - if no further action is needed (either inserted or another condition)\n    _onDragOver: function _onDragOver(evt) {\n        var el = this.el, target = evt.target, dragRect, targetRect, revert, options = this.options, group = options.group, activeSortable = Sortable.active, isOwner = activeGroup === group, canSort = options.sort, fromSortable = putSortable || activeSortable, vertical, _this = this, completedFired = false;\n        if (_silent) return;\n        function dragOverEvent(name, extra) {\n            pluginEvent2(name, _this, _objectSpread2({\n                evt: evt,\n                isOwner: isOwner,\n                axis: vertical ? \"vertical\" : \"horizontal\",\n                revert: revert,\n                dragRect: dragRect,\n                targetRect: targetRect,\n                canSort: canSort,\n                fromSortable: fromSortable,\n                target: target,\n                completed: completed,\n                onMove: function onMove(target2, after2) {\n                    return _onMove(rootEl, el, dragEl, dragRect, target2, getRect(target2), evt, after2);\n                },\n                changed: changed\n            }, extra));\n        }\n        function capture() {\n            dragOverEvent(\"dragOverAnimationCapture\");\n            _this.captureAnimationState();\n            if (_this !== fromSortable) fromSortable.captureAnimationState();\n        }\n        function completed(insertion) {\n            dragOverEvent(\"dragOverCompleted\", {\n                insertion: insertion\n            });\n            if (insertion) {\n                if (isOwner) activeSortable._hideClone();\n                else activeSortable._showClone(_this);\n                if (_this !== fromSortable) {\n                    toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n                    toggleClass(dragEl, options.ghostClass, true);\n                }\n                if (putSortable !== _this && _this !== Sortable.active) putSortable = _this;\n                else if (_this === Sortable.active && putSortable) putSortable = null;\n                if (fromSortable === _this) _this._ignoreWhileAnimating = target;\n                _this.animateAll(function() {\n                    dragOverEvent(\"dragOverAnimationComplete\");\n                    _this._ignoreWhileAnimating = null;\n                });\n                if (_this !== fromSortable) {\n                    fromSortable.animateAll();\n                    fromSortable._ignoreWhileAnimating = null;\n                }\n            }\n            if (target === dragEl && !dragEl.animated || target === el && !target.animated) lastTarget = null;\n            if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n                dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n                !insertion && nearestEmptyInsertDetectEvent(evt);\n            }\n            !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n            return completedFired = true;\n        }\n        function changed() {\n            newIndex = index(dragEl);\n            newDraggableIndex = index(dragEl, options.draggable);\n            _dispatchEvent({\n                sortable: _this,\n                name: \"change\",\n                toEl: el,\n                newIndex: newIndex,\n                newDraggableIndex: newDraggableIndex,\n                originalEvent: evt\n            });\n        }\n        if (evt.preventDefault !== void 0) evt.cancelable && evt.preventDefault();\n        target = closest(target, options.draggable, el, true);\n        dragOverEvent(\"dragOver\");\n        if (Sortable.eventCanceled) return completedFired;\n        if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) return completed(false);\n        ignoreNextClick = false;\n        if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n            vertical = this._getDirection(evt, target) === \"vertical\";\n            dragRect = getRect(dragEl);\n            dragOverEvent(\"dragOverValid\");\n            if (Sortable.eventCanceled) return completedFired;\n            if (revert) {\n                parentEl = rootEl;\n                capture();\n                this._hideClone();\n                dragOverEvent(\"revert\");\n                if (!Sortable.eventCanceled) {\n                    if (nextEl) rootEl.insertBefore(dragEl, nextEl);\n                    else rootEl.appendChild(dragEl);\n                }\n                return completed(true);\n            }\n            var elLastChild = lastChild(el, options.draggable);\n            if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n                if (elLastChild === dragEl) return completed(false);\n                if (elLastChild && el === evt.target) target = elLastChild;\n                if (target) targetRect = getRect(target);\n                if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n                    capture();\n                    if (elLastChild && elLastChild.nextSibling) el.insertBefore(dragEl, elLastChild.nextSibling);\n                    else el.appendChild(dragEl);\n                    parentEl = el;\n                    changed();\n                    return completed(true);\n                }\n            } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n                var firstChild = getChild(el, 0, options, true);\n                if (firstChild === dragEl) return completed(false);\n                target = firstChild;\n                targetRect = getRect(target);\n                if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n                    capture();\n                    el.insertBefore(dragEl, firstChild);\n                    parentEl = el;\n                    changed();\n                    return completed(true);\n                }\n            } else if (target.parentNode === el) {\n                targetRect = getRect(target);\n                var direction = 0, targetBeforeFirstSwap, differentLevel = dragEl.parentNode !== el, differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical), side1 = vertical ? \"top\" : \"left\", scrolledPastTop = isScrolledPast(target, \"top\", \"top\") || isScrolledPast(dragEl, \"top\", \"top\"), scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n                if (lastTarget !== target) {\n                    targetBeforeFirstSwap = targetRect[side1];\n                    pastFirstInvertThresh = false;\n                    isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n                }\n                direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n                var sibling;\n                if (direction !== 0) {\n                    var dragIndex = index(dragEl);\n                    do {\n                        dragIndex -= direction;\n                        sibling = parentEl.children[dragIndex];\n                    }while (sibling && (css(sibling, \"display\") === \"none\" || sibling === ghostEl));\n                }\n                if (direction === 0 || sibling === target) return completed(false);\n                lastTarget = target;\n                lastDirection = direction;\n                var nextSibling = target.nextElementSibling, after = false;\n                after = direction === 1;\n                var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n                if (moveVector !== false) {\n                    if (moveVector === 1 || moveVector === -1) after = moveVector === 1;\n                    _silent = true;\n                    setTimeout(_unsilent, 30);\n                    capture();\n                    if (after && !nextSibling) el.appendChild(dragEl);\n                    else target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n                    if (scrolledPastTop) scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n                    parentEl = dragEl.parentNode;\n                    if (targetBeforeFirstSwap !== void 0 && !isCircumstantialInvert) targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n                    changed();\n                    return completed(true);\n                }\n            }\n            if (el.contains(dragEl)) return completed(false);\n        }\n        return false;\n    },\n    _ignoreWhileAnimating: null,\n    _offMoveEvents: function _offMoveEvents() {\n        off(document, \"mousemove\", this._onTouchMove);\n        off(document, \"touchmove\", this._onTouchMove);\n        off(document, \"pointermove\", this._onTouchMove);\n        off(document, \"dragover\", nearestEmptyInsertDetectEvent);\n        off(document, \"mousemove\", nearestEmptyInsertDetectEvent);\n        off(document, \"touchmove\", nearestEmptyInsertDetectEvent);\n    },\n    _offUpEvents: function _offUpEvents() {\n        var ownerDocument = this.el.ownerDocument;\n        off(ownerDocument, \"mouseup\", this._onDrop);\n        off(ownerDocument, \"touchend\", this._onDrop);\n        off(ownerDocument, \"pointerup\", this._onDrop);\n        off(ownerDocument, \"touchcancel\", this._onDrop);\n        off(document, \"selectstart\", this);\n    },\n    _onDrop: function _onDrop(evt) {\n        var el = this.el, options = this.options;\n        newIndex = index(dragEl);\n        newDraggableIndex = index(dragEl, options.draggable);\n        pluginEvent2(\"drop\", this, {\n            evt: evt\n        });\n        parentEl = dragEl && dragEl.parentNode;\n        newIndex = index(dragEl);\n        newDraggableIndex = index(dragEl, options.draggable);\n        if (Sortable.eventCanceled) {\n            this._nulling();\n            return;\n        }\n        awaitingDragStarted = false;\n        isCircumstantialInvert = false;\n        pastFirstInvertThresh = false;\n        clearInterval(this._loopId);\n        clearTimeout(this._dragStartTimer);\n        _cancelNextTick(this.cloneId);\n        _cancelNextTick(this._dragStartId);\n        if (this.nativeDraggable) {\n            off(document, \"drop\", this);\n            off(el, \"dragstart\", this._onDragStart);\n        }\n        this._offMoveEvents();\n        this._offUpEvents();\n        if (Safari) css(document.body, \"user-select\", \"\");\n        css(dragEl, \"transform\", \"\");\n        if (evt) {\n            if (moved) {\n                evt.cancelable && evt.preventDefault();\n                !options.dropBubble && evt.stopPropagation();\n            }\n            ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n            if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== \"clone\") cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n            if (dragEl) {\n                if (this.nativeDraggable) off(dragEl, \"dragend\", this);\n                _disableDraggable(dragEl);\n                dragEl.style[\"will-change\"] = \"\";\n                if (moved && !awaitingDragStarted) toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n                toggleClass(dragEl, this.options.chosenClass, false);\n                _dispatchEvent({\n                    sortable: this,\n                    name: \"unchoose\",\n                    toEl: parentEl,\n                    newIndex: null,\n                    newDraggableIndex: null,\n                    originalEvent: evt\n                });\n                if (rootEl !== parentEl) {\n                    if (newIndex >= 0) {\n                        _dispatchEvent({\n                            rootEl: parentEl,\n                            name: \"add\",\n                            toEl: parentEl,\n                            fromEl: rootEl,\n                            originalEvent: evt\n                        });\n                        _dispatchEvent({\n                            sortable: this,\n                            name: \"remove\",\n                            toEl: parentEl,\n                            originalEvent: evt\n                        });\n                        _dispatchEvent({\n                            rootEl: parentEl,\n                            name: \"sort\",\n                            toEl: parentEl,\n                            fromEl: rootEl,\n                            originalEvent: evt\n                        });\n                        _dispatchEvent({\n                            sortable: this,\n                            name: \"sort\",\n                            toEl: parentEl,\n                            originalEvent: evt\n                        });\n                    }\n                    putSortable && putSortable.save();\n                } else {\n                    if (newIndex !== oldIndex) {\n                        if (newIndex >= 0) {\n                            _dispatchEvent({\n                                sortable: this,\n                                name: \"update\",\n                                toEl: parentEl,\n                                originalEvent: evt\n                            });\n                            _dispatchEvent({\n                                sortable: this,\n                                name: \"sort\",\n                                toEl: parentEl,\n                                originalEvent: evt\n                            });\n                        }\n                    }\n                }\n                if (Sortable.active) {\n                    if (newIndex == null || newIndex === -1) {\n                        newIndex = oldIndex;\n                        newDraggableIndex = oldDraggableIndex;\n                    }\n                    _dispatchEvent({\n                        sortable: this,\n                        name: \"end\",\n                        toEl: parentEl,\n                        originalEvent: evt\n                    });\n                    this.save();\n                }\n            }\n        }\n        this._nulling();\n    },\n    _nulling: function _nulling() {\n        pluginEvent2(\"nulling\", this);\n        rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n        savedInputChecked.forEach(function(el) {\n            el.checked = true;\n        });\n        savedInputChecked.length = lastDx = lastDy = 0;\n    },\n    handleEvent: function handleEvent(evt) {\n        switch(evt.type){\n            case \"drop\":\n            case \"dragend\":\n                this._onDrop(evt);\n                break;\n            case \"dragenter\":\n            case \"dragover\":\n                if (dragEl) {\n                    this._onDragOver(evt);\n                    _globalDragOver(evt);\n                }\n                break;\n            case \"selectstart\":\n                evt.preventDefault();\n                break;\n        }\n    },\n    /**\n   * Serializes the item into an array of string.\n   * @returns {String[]}\n   */ toArray: function toArray() {\n        var order = [], el, children = this.el.children, i = 0, n = children.length, options = this.options;\n        for(; i < n; i++){\n            el = children[i];\n            if (closest(el, options.draggable, this.el, false)) order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n        }\n        return order;\n    },\n    /**\n   * Sorts the elements according to the array.\n   * @param  {String[]}  order  order of the items\n   */ sort: function sort(order, useAnimation) {\n        var items = {}, rootEl2 = this.el;\n        this.toArray().forEach(function(id, i) {\n            var el = rootEl2.children[i];\n            if (closest(el, this.options.draggable, rootEl2, false)) items[id] = el;\n        }, this);\n        useAnimation && this.captureAnimationState();\n        order.forEach(function(id) {\n            if (items[id]) {\n                rootEl2.removeChild(items[id]);\n                rootEl2.appendChild(items[id]);\n            }\n        });\n        useAnimation && this.animateAll();\n    },\n    /**\n   * Save the current sorting\n   */ save: function save() {\n        var store = this.options.store;\n        store && store.set && store.set(this);\n    },\n    /**\n   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n   * @param   {HTMLElement}  el\n   * @param   {String}       [selector]  default: `options.draggable`\n   * @returns {HTMLElement|null}\n   */ closest: function closest$1(el, selector) {\n        return closest(el, selector || this.options.draggable, this.el, false);\n    },\n    /**\n   * Set/get option\n   * @param   {string} name\n   * @param   {*}      [value]\n   * @returns {*}\n   */ option: function option(name, value) {\n        var options = this.options;\n        if (value === void 0) return options[name];\n        else {\n            var modifiedValue = PluginManager.modifyOption(this, name, value);\n            if (typeof modifiedValue !== \"undefined\") options[name] = modifiedValue;\n            else options[name] = value;\n            if (name === \"group\") _prepareGroup(options);\n        }\n    },\n    /**\n   * Destroy\n   */ destroy: function destroy() {\n        pluginEvent2(\"destroy\", this);\n        var el = this.el;\n        el[expando] = null;\n        off(el, \"mousedown\", this._onTapStart);\n        off(el, \"touchstart\", this._onTapStart);\n        off(el, \"pointerdown\", this._onTapStart);\n        if (this.nativeDraggable) {\n            off(el, \"dragover\", this);\n            off(el, \"dragenter\", this);\n        }\n        Array.prototype.forEach.call(el.querySelectorAll(\"[draggable]\"), function(el2) {\n            el2.removeAttribute(\"draggable\");\n        });\n        this._onDrop();\n        this._disableDelayedDragEvents();\n        sortables.splice(sortables.indexOf(this.el), 1);\n        this.el = el = null;\n    },\n    _hideClone: function _hideClone() {\n        if (!cloneHidden) {\n            pluginEvent2(\"hideClone\", this);\n            if (Sortable.eventCanceled) return;\n            css(cloneEl, \"display\", \"none\");\n            if (this.options.removeCloneOnHide && cloneEl.parentNode) cloneEl.parentNode.removeChild(cloneEl);\n            cloneHidden = true;\n        }\n    },\n    _showClone: function _showClone(putSortable2) {\n        if (putSortable2.lastPutMode !== \"clone\") {\n            this._hideClone();\n            return;\n        }\n        if (cloneHidden) {\n            pluginEvent2(\"showClone\", this);\n            if (Sortable.eventCanceled) return;\n            if (dragEl.parentNode == rootEl && !this.options.group.revertClone) rootEl.insertBefore(cloneEl, dragEl);\n            else if (nextEl) rootEl.insertBefore(cloneEl, nextEl);\n            else rootEl.appendChild(cloneEl);\n            if (this.options.group.revertClone) this.animate(dragEl, cloneEl);\n            css(cloneEl, \"display\", \"\");\n            cloneHidden = false;\n        }\n    }\n};\nfunction _globalDragOver(evt) {\n    if (evt.dataTransfer) evt.dataTransfer.dropEffect = \"move\";\n    evt.cancelable && evt.preventDefault();\n}\nfunction _onMove(fromEl, toEl, dragEl2, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n    var evt, sortable = fromEl[expando], onMoveFn = sortable.options.onMove, retVal;\n    if (window.CustomEvent && !IE11OrLess && !Edge) evt = new CustomEvent(\"move\", {\n        bubbles: true,\n        cancelable: true\n    });\n    else {\n        evt = document.createEvent(\"Event\");\n        evt.initEvent(\"move\", true, true);\n    }\n    evt.to = toEl;\n    evt.from = fromEl;\n    evt.dragged = dragEl2;\n    evt.draggedRect = dragRect;\n    evt.related = targetEl || toEl;\n    evt.relatedRect = targetRect || getRect(toEl);\n    evt.willInsertAfter = willInsertAfter;\n    evt.originalEvent = originalEvent;\n    fromEl.dispatchEvent(evt);\n    if (onMoveFn) retVal = onMoveFn.call(sortable, evt, originalEvent);\n    return retVal;\n}\nfunction _disableDraggable(el) {\n    el.draggable = false;\n}\nfunction _unsilent() {\n    _silent = false;\n}\nfunction _ghostIsFirst(evt, vertical, sortable) {\n    var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));\n    var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n    var spacer = 10;\n    return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction _ghostIsLast(evt, vertical, sortable) {\n    var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));\n    var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n    var spacer = 10;\n    return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n    var mouseOnAxis = vertical ? evt.clientY : evt.clientX, targetLength = vertical ? targetRect.height : targetRect.width, targetS1 = vertical ? targetRect.top : targetRect.left, targetS2 = vertical ? targetRect.bottom : targetRect.right, invert = false;\n    if (!invertSwap) {\n        if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n            if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) pastFirstInvertThresh = true;\n            if (!pastFirstInvertThresh) {\n                if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance : mouseOnAxis > targetS2 - targetMoveDistance) return -lastDirection;\n            } else invert = true;\n        } else {\n            if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) return _getInsertDirection(target);\n        }\n    }\n    invert = invert || invertSwap;\n    if (invert) {\n        if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n    }\n    return 0;\n}\nfunction _getInsertDirection(target) {\n    if (index(dragEl) < index(target)) return 1;\n    else return -1;\n}\nfunction _generateId(el) {\n    var str = el.tagName + el.className + el.src + el.href + el.textContent, i = str.length, sum = 0;\n    while(i--)sum += str.charCodeAt(i);\n    return sum.toString(36);\n}\nfunction _saveInputCheckedState(root) {\n    savedInputChecked.length = 0;\n    var inputs = root.getElementsByTagName(\"input\");\n    var idx = inputs.length;\n    while(idx--){\n        var el = inputs[idx];\n        el.checked && savedInputChecked.push(el);\n    }\n}\nfunction _nextTick(fn) {\n    return setTimeout(fn, 0);\n}\nfunction _cancelNextTick(id) {\n    return clearTimeout(id);\n}\nif (documentExists) on(document, \"touchmove\", function(evt) {\n    if ((Sortable.active || awaitingDragStarted) && evt.cancelable) evt.preventDefault();\n});\nSortable.utils = {\n    on: on,\n    off: off,\n    css: css,\n    find: find,\n    is: function is(el, selector) {\n        return !!closest(el, selector, el, false);\n    },\n    extend: extend,\n    throttle: throttle,\n    closest: closest,\n    toggleClass: toggleClass,\n    clone: clone,\n    index: index,\n    nextTick: _nextTick,\n    cancelNextTick: _cancelNextTick,\n    detectDirection: _detectDirection,\n    getChild: getChild\n};\nSortable.get = function(element) {\n    return element[expando];\n};\nSortable.mount = function() {\n    for(var _len = arguments.length, plugins2 = new Array(_len), _key = 0; _key < _len; _key++)plugins2[_key] = arguments[_key];\n    if (plugins2[0].constructor === Array) plugins2 = plugins2[0];\n    plugins2.forEach(function(plugin) {\n        if (!plugin.prototype || !plugin.prototype.constructor) throw \"Sortable: Mounted plugin must be a constructor function, not \".concat(({}).toString.call(plugin));\n        if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n        PluginManager.mount(plugin);\n    });\n};\nSortable.create = function(el, options) {\n    return new Sortable(el, options);\n};\nSortable.version = version;\nvar autoScrolls = [];\nvar scrollEl;\nvar scrollRootEl;\nvar scrolling = false;\nvar lastAutoScrollX;\nvar lastAutoScrollY;\nvar touchEvt$1;\nvar pointerElemChangedInterval;\nfunction AutoScrollPlugin() {\n    function AutoScroll() {\n        this.defaults = {\n            scroll: true,\n            forceAutoScrollFallback: false,\n            scrollSensitivity: 30,\n            scrollSpeed: 10,\n            bubbleScroll: true\n        };\n        for(var fn in this)if (fn.charAt(0) === \"_\" && typeof this[fn] === \"function\") this[fn] = this[fn].bind(this);\n    }\n    AutoScroll.prototype = {\n        dragStarted: function dragStarted(_ref) {\n            var originalEvent = _ref.originalEvent;\n            if (this.sortable.nativeDraggable) on(document, \"dragover\", this._handleAutoScroll);\n            else {\n                if (this.options.supportPointer) on(document, \"pointermove\", this._handleFallbackAutoScroll);\n                else if (originalEvent.touches) on(document, \"touchmove\", this._handleFallbackAutoScroll);\n                else on(document, \"mousemove\", this._handleFallbackAutoScroll);\n            }\n        },\n        dragOverCompleted: function dragOverCompleted(_ref2) {\n            var originalEvent = _ref2.originalEvent;\n            if (!this.options.dragOverBubble && !originalEvent.rootEl) this._handleAutoScroll(originalEvent);\n        },\n        drop: function drop3() {\n            if (this.sortable.nativeDraggable) off(document, \"dragover\", this._handleAutoScroll);\n            else {\n                off(document, \"pointermove\", this._handleFallbackAutoScroll);\n                off(document, \"touchmove\", this._handleFallbackAutoScroll);\n                off(document, \"mousemove\", this._handleFallbackAutoScroll);\n            }\n            clearPointerElemChangedInterval();\n            clearAutoScrolls();\n            cancelThrottle();\n        },\n        nulling: function nulling() {\n            touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n            autoScrolls.length = 0;\n        },\n        _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n            this._handleAutoScroll(evt, true);\n        },\n        _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n            var _this = this;\n            var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, elem = document.elementFromPoint(x, y);\n            touchEvt$1 = evt;\n            if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n                autoScroll(evt, this.options, elem, fallback);\n                var ogElemScroller = getParentAutoScrollElement(elem, true);\n                if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n                    pointerElemChangedInterval && clearPointerElemChangedInterval();\n                    pointerElemChangedInterval = setInterval(function() {\n                        var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n                        if (newElem !== ogElemScroller) {\n                            ogElemScroller = newElem;\n                            clearAutoScrolls();\n                        }\n                        autoScroll(evt, _this.options, newElem, fallback);\n                    }, 10);\n                    lastAutoScrollX = x;\n                    lastAutoScrollY = y;\n                }\n            } else {\n                if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n                    clearAutoScrolls();\n                    return;\n                }\n                autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n            }\n        }\n    };\n    return _extends(AutoScroll, {\n        pluginName: \"scroll\",\n        initializeByDefault: true\n    });\n}\nfunction clearAutoScrolls() {\n    autoScrolls.forEach(function(autoScroll2) {\n        clearInterval(autoScroll2.pid);\n    });\n    autoScrolls = [];\n}\nfunction clearPointerElemChangedInterval() {\n    clearInterval(pointerElemChangedInterval);\n}\nvar autoScroll = throttle(function(evt, options, rootEl2, isFallback) {\n    if (!options.scroll) return;\n    var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = getWindowScrollingElement();\n    var scrollThisInstance = false, scrollCustomFn;\n    if (scrollRootEl !== rootEl2) {\n        scrollRootEl = rootEl2;\n        clearAutoScrolls();\n        scrollEl = options.scroll;\n        scrollCustomFn = options.scrollFn;\n        if (scrollEl === true) scrollEl = getParentAutoScrollElement(rootEl2, true);\n    }\n    var layersOut = 0;\n    var currentParent = scrollEl;\n    do {\n        var el = currentParent, rect = getRect(el), top = rect.top, bottom = rect.bottom, left = rect.left, right = rect.right, width = rect.width, height = rect.height, canScrollX = void 0, canScrollY = void 0, scrollWidth = el.scrollWidth, scrollHeight = el.scrollHeight, elCSS = css(el), scrollPosX = el.scrollLeft, scrollPosY = el.scrollTop;\n        if (el === winScroller) {\n            canScrollX = width < scrollWidth && (elCSS.overflowX === \"auto\" || elCSS.overflowX === \"scroll\" || elCSS.overflowX === \"visible\");\n            canScrollY = height < scrollHeight && (elCSS.overflowY === \"auto\" || elCSS.overflowY === \"scroll\" || elCSS.overflowY === \"visible\");\n        } else {\n            canScrollX = width < scrollWidth && (elCSS.overflowX === \"auto\" || elCSS.overflowX === \"scroll\");\n            canScrollY = height < scrollHeight && (elCSS.overflowY === \"auto\" || elCSS.overflowY === \"scroll\");\n        }\n        var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n        var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n        if (!autoScrolls[layersOut]) {\n            for(var i = 0; i <= layersOut; i++)if (!autoScrolls[i]) autoScrolls[i] = {};\n        }\n        if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n            autoScrolls[layersOut].el = el;\n            autoScrolls[layersOut].vx = vx;\n            autoScrolls[layersOut].vy = vy;\n            clearInterval(autoScrolls[layersOut].pid);\n            if (vx != 0 || vy != 0) {\n                scrollThisInstance = true;\n                autoScrolls[layersOut].pid = setInterval((function() {\n                    if (isFallback && this.layer === 0) Sortable.active._onTouchMove(touchEvt$1);\n                    var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n                    var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n                    if (typeof scrollCustomFn === \"function\") {\n                        if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== \"continue\") return;\n                    }\n                    scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n                }).bind({\n                    layer: layersOut\n                }), 24);\n            }\n        }\n        layersOut++;\n    }while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n    scrolling = scrollThisInstance;\n}, 30);\nvar drop = function drop2(_ref) {\n    var originalEvent = _ref.originalEvent, putSortable2 = _ref.putSortable, dragEl2 = _ref.dragEl, activeSortable = _ref.activeSortable, dispatchSortableEvent = _ref.dispatchSortableEvent, hideGhostForTarget = _ref.hideGhostForTarget, unhideGhostForTarget = _ref.unhideGhostForTarget;\n    if (!originalEvent) return;\n    var toSortable = putSortable2 || activeSortable;\n    hideGhostForTarget();\n    var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n    var target = document.elementFromPoint(touch.clientX, touch.clientY);\n    unhideGhostForTarget();\n    if (toSortable && !toSortable.el.contains(target)) {\n        dispatchSortableEvent(\"spill\");\n        this.onSpill({\n            dragEl: dragEl2,\n            putSortable: putSortable2\n        });\n    }\n};\nfunction Revert() {}\nRevert.prototype = {\n    startIndex: null,\n    dragStart: function dragStart(_ref2) {\n        var oldDraggableIndex2 = _ref2.oldDraggableIndex;\n        this.startIndex = oldDraggableIndex2;\n    },\n    onSpill: function onSpill(_ref3) {\n        var dragEl2 = _ref3.dragEl, putSortable2 = _ref3.putSortable;\n        this.sortable.captureAnimationState();\n        if (putSortable2) putSortable2.captureAnimationState();\n        var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n        if (nextSibling) this.sortable.el.insertBefore(dragEl2, nextSibling);\n        else this.sortable.el.appendChild(dragEl2);\n        this.sortable.animateAll();\n        if (putSortable2) putSortable2.animateAll();\n    },\n    drop: drop\n};\n_extends(Revert, {\n    pluginName: \"revertOnSpill\"\n});\nfunction Remove() {}\nRemove.prototype = {\n    onSpill: function onSpill2(_ref4) {\n        var dragEl2 = _ref4.dragEl, putSortable2 = _ref4.putSortable;\n        var parentSortable = putSortable2 || this.sortable;\n        parentSortable.captureAnimationState();\n        dragEl2.parentNode && dragEl2.parentNode.removeChild(dragEl2);\n        parentSortable.animateAll();\n    },\n    drop: drop\n};\n_extends(Remove, {\n    pluginName: \"removeOnSpill\"\n});\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\nvar sortable_esm_default = Sortable;\n// packages/alpinejs/src/utils/walk.js\nfunction walk(el, callback) {\n    if (typeof ShadowRoot === \"function\" && el instanceof ShadowRoot) {\n        Array.from(el.children).forEach((el2)=>walk(el2, callback));\n        return;\n    }\n    let skip = false;\n    callback(el, ()=>skip = true);\n    if (skip) return;\n    let node = el.firstElementChild;\n    while(node){\n        walk(node, callback, false);\n        node = node.nextElementSibling;\n    }\n}\n// packages/sort/src/index.js\nfunction src_default(Alpine) {\n    Alpine.directive(\"sort\", (el, { value, modifiers, expression }, { effect, evaluate, cleanup })=>{\n        if (value === \"config\") return;\n        if (value === \"handle\") return;\n        if (value === \"group\") return;\n        if (value === \"key\" || value === \"item\") {\n            if ([\n                void 0,\n                null,\n                \"\"\n            ].includes(expression)) return;\n            el._x_sort_key = evaluate(expression);\n            return;\n        }\n        let handleSelector = \"[x-sort\\\\:handle],[wire\\\\:sort\\\\:handle]\";\n        let preferences = {\n            hideGhost: !modifiers.includes(\"ghost\"),\n            useHandles: !!el.querySelector(handleSelector) || Array.from(el.querySelectorAll(\"template:not(svg template)\")).some((tmpl)=>tmpl.content?.querySelector(handleSelector)),\n            group: getGroupName(el, modifiers)\n        };\n        let handleSort = generateSortHandler(expression, evaluate);\n        let config = getConfigurationOverrides(el, modifiers, evaluate);\n        let sortable = initSortable(el, config, preferences, (key, position)=>{\n            handleSort(key, position);\n        });\n        cleanup(()=>sortable.destroy());\n    });\n}\nfunction generateSortHandler(expression, evaluate) {\n    if ([\n        void 0,\n        null,\n        \"\"\n    ].includes(expression)) return ()=>{};\n    return (key, position)=>{\n        evaluate(expression, {\n            scope: {\n                // Supporting both `$item` AND `$key` ($key for BC)...\n                $key: key,\n                $item: key,\n                $position: position\n            },\n            params: [\n                key,\n                position\n            ]\n        });\n    };\n}\nfunction getConfigurationOverrides(el, modifiers, evaluate) {\n    if (el.hasAttribute(\"x-sort:config\")) return evaluate(el.getAttribute(\"x-sort:config\"));\n    if (el.hasAttribute(\"wire:sort:config\")) return evaluate(el.getAttribute(\"wire:sort:config\"));\n    return {};\n}\nfunction initSortable(el, config, preferences, handle) {\n    let ghostRef;\n    let options = {\n        animation: 150,\n        handle: preferences.useHandles ? \"[x-sort\\\\:handle],[wire\\\\:sort\\\\:handle]\" : null,\n        group: preferences.group,\n        scroll: true,\n        forceAutoScrollFallback: true,\n        scrollSensitivity: 50,\n        // This is here so that if a div containing inputs or buttons has x-sort:ignore, it will not prevent interaction...\n        preventOnFilter: false,\n        filter (e) {\n            if (e.target.hasAttribute(\"x-sort:ignore\") || e.target.hasAttribute(\"wire:sort:ignore\")) return true;\n            if (e.target.closest(\"[x-sort\\\\:ignore]\") || e.target.closest(\"[wire\\\\:sort\\\\:ignore]\")) return true;\n            if (!el.querySelector(\"[x-sort\\\\:item],[wire\\\\:sort\\\\:item]\")) return false;\n            let itemHasAttribute = e.target.closest(\"[x-sort\\\\:item],[wire\\\\:sort\\\\:item]\");\n            return itemHasAttribute ? false : true;\n        },\n        onSort (e) {\n            if (e.from !== e.to) {\n                if (e.to !== e.target) return;\n            }\n            let key = void 0;\n            walk(e.item, (el2, skip)=>{\n                if (key !== void 0) return;\n                if (el2._x_sort_key) {\n                    key = el2._x_sort_key;\n                    skip();\n                }\n            });\n            let position = e.newIndex;\n            if (key !== void 0 || key !== null) handle(key, position);\n        },\n        onStart () {\n            document.body.classList.add(\"sorting\");\n            ghostRef = document.querySelector(\".sortable-ghost\");\n            if (preferences.hideGhost && ghostRef) ghostRef.style.opacity = \"0\";\n        },\n        onEnd () {\n            document.body.classList.remove(\"sorting\");\n            if (preferences.hideGhost && ghostRef) ghostRef.style.opacity = \"1\";\n            ghostRef = void 0;\n            keepElementsWithinMorphMarkers(el);\n        }\n    };\n    return new sortable_esm_default(el, {\n        ...options,\n        ...config\n    });\n}\nfunction keepElementsWithinMorphMarkers(el) {\n    let cursor = el.firstChild;\n    while(cursor.nextSibling){\n        if (cursor.textContent.trim() === \"[if ENDBLOCK]><![endif]\") {\n            el.append(cursor);\n            break;\n        }\n        cursor = cursor.nextSibling;\n    }\n}\nfunction getGroupName(el, modifiers) {\n    if (el.hasAttribute(\"x-sort:group\")) return el.getAttribute(\"x-sort:group\");\n    if (el.hasAttribute(\"wire:sort:group\")) return el.getAttribute(\"wire:sort:group\");\n    return modifiers.indexOf(\"group\") !== -1 ? modifiers[modifiers.indexOf(\"group\") + 1] : null;\n}\n// packages/sort/builds/module.js\nvar module_default = src_default;\n /*! Bundled license information:\n\nsortablejs/modular/sortable.esm.js:\n  (**!\n   * Sortable 1.15.2\n   * @author\tRubaXa   <trash@rubaxa.org>\n   * @author\towenm    <owen23355@gmail.com>\n   * @license MIT\n   *)\n*/ \n});\n\nparcelRegister(\"lrtgD\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $f9c2d27d3da567dd$export$2e2bcd8739ae039);\nvar $f9c2d27d3da567dd$export$2e2bcd8739ae039 = ({ options: options })=>({\n        options: options,\n        newOption: \"\",\n        editingIndex: null,\n        editingText: \"\",\n        entryMode: \"single\",\n        bulkText: \"\",\n        // Check if there are unsaved edits (option being edited but not confirmed)\n        hasUnsavedEdits () {\n            return this.editingIndex !== null;\n        },\n        addOption () {\n            if (this.newOption.trim() === \"\") return;\n            const uniqueId = this.slugify(this.newOption) + \"-\" + Math.floor(Math.random() * 10000);\n            const newOptionObj = {\n                text: this.newOption,\n                value: uniqueId,\n                order: this.options.length + 1\n            };\n            this.options.push(newOptionObj);\n            this.newOption = \"\";\n        },\n        deleteOption (index) {\n            // Event filtering\n            if (document.activeElement != this.$el) return;\n            this.options.splice(index, 1);\n            this.options.forEach((option, idx)=>option.order = idx + 1);\n        },\n        startEdit (index) {\n            this.editingIndex = index;\n            this.editingText = this.options[index].text;\n            this.$dispatch(\"options-editor-editing-changed\", {\n                isEditing: true\n            });\n        },\n        saveEdit () {\n            if (this.editingIndex === null) return;\n            if (this.editingText.trim() === \"\") return;\n            this.options[this.editingIndex].text = this.editingText.trim();\n            this.cancelEdit();\n        },\n        cancelEdit () {\n            this.editingIndex = null;\n            this.editingText = \"\";\n            this.$dispatch(\"options-editor-editing-changed\", {\n                isEditing: false\n            });\n        },\n        dragStart (event, index) {\n            event.dataTransfer.setData(\"optionIndex\", index);\n        },\n        drop (event, dropIndex) {\n            const dragIndex = event.dataTransfer.getData(\"optionIndex\");\n            const draggedItem = this.options.splice(dragIndex, 1)[0];\n            this.options.splice(dropIndex, 0, draggedItem);\n            this.options.forEach((option, idx)=>option.order = idx + 1);\n        },\n        slugify (text) {\n            return text.toString().toLowerCase().replace(/\\s+/g, \"-\").replace(/[^\\w\\-]+/g, \"\").replace(/\\-\\-+/g, \"-\").replace(/^-+/, \"\").replace(/-+$/, \"\");\n        },\n        addBulkOptions () {\n            const lines = this.bulkText.split(\"\\n\").map((line)=>line.trim()).filter((line)=>line !== \"\");\n            const existingTexts = this.options.map((o)=>o.text.toLowerCase());\n            lines.forEach((text)=>{\n                if (!existingTexts.includes(text.toLowerCase())) {\n                    const uniqueId = this.slugify(text) + \"-\" + Math.floor(Math.random() * 10000);\n                    this.options.push({\n                        text: text,\n                        value: uniqueId,\n                        order: this.options.length + 1\n                    });\n                    existingTexts.push(text.toLowerCase());\n                }\n            });\n            this.bulkText = \"\";\n            this.entryMode = \"single\";\n        },\n        serializedOptions () {\n            return JSON.stringify(this.options);\n        }\n    });\n\n});\n\nparcelRegister(\"hHqg9\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $ce2ad2657fcd5f58$export$2e2bcd8739ae039);\nvar $ce2ad2657fcd5f58$export$2e2bcd8739ae039 = ({ formId: formId, isConditional: isConditional, fieldId: fieldId, fieldValue: fieldValue, formType: formType = \"information_form\", jobId: jobId = null })=>({\n        isConditional: isConditional,\n        selectedFieldId: fieldId,\n        conditionalValue: fieldValue,\n        availableOptions: [],\n        formType: formType,\n        jobId: jobId,\n        formId: formId,\n        init () {\n            if (this.selectedFieldId) this.loadOptions();\n        },\n        getOptionsUrl () {\n            if (this.formType === \"application_form\" && this.jobId) return `/jobs/${this.jobId}/form/fields/${this.selectedFieldId}/options/`;\n            return `/organization/information-forms/${this.formId}/fields/${this.selectedFieldId}/options/`;\n        },\n        async loadOptions () {\n            if (!this.selectedFieldId) {\n                this.availableOptions = [];\n                this.conditionalValue = \"\";\n                return;\n            }\n            try {\n                const response = await fetch(this.getOptionsUrl());\n                const data = await response.json();\n                this.availableOptions = data.options.map((opt)=>[\n                        opt.value,\n                        opt.text\n                    ]);\n                if (!this.availableOptions.find((opt)=>opt[0] === this.conditionalValue)) this.conditionalValue = \"\";\n            } catch (e) {\n                console.error(\"Failed to load field options:\", e);\n                this.availableOptions = [];\n            }\n        }\n    });\n\n});\n\nparcelRegister(\"bV58F\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $8ad9010a1120133a$export$2e2bcd8739ae039);\nvar $8ad9010a1120133a$export$2e2bcd8739ae039 = ()=>({\n        search: \"\",\n        searchUrl: \"\",\n        isCommandPaletteOpen: false,\n        closingCallback: ()=>{},\n        handleOpen (e) {\n            if (e.detail.search_url) {\n                this.searchUrl = e.detail.search_url;\n                this.search = e.detail.search || \"\";\n                this.isCommandPaletteOpen = true;\n                this.closingCallback = e.detail.closingCallback || this.closingCallback;\n            }\n            if (this.search) this.searchData();\n        },\n        handleClose (e) {\n            this.isCommandPaletteOpen = false;\n            this.closingCallback();\n        },\n        updateURL () {\n            let baseUrl = this.searchUrl;\n            // Prepend a placeholder domain to form a full URL for parsing\n            const placeholderDomain = \"https://placeholder.com\";\n            let url;\n            try {\n                url = new URL(placeholderDomain + baseUrl);\n            } catch (e) {\n                console.error(\"Invalid URL provided.\");\n                return;\n            }\n            // Set or update the \"search\" query parameter\n            if (this.search) url.searchParams.set(\"search\", this.search);\n            else url.searchParams.delete(\"search\");\n            // Remove the placeholder domain from the final URL string\n            return url.toString().replace(placeholderDomain, \"\");\n        },\n        searchData () {\n            let newUrl = this.updateURL();\n            htmx.ajax(\"GET\", newUrl, {\n                target: \"#candidate_palette_results\",\n                swap: \"innerHTML\"\n            });\n        }\n    });\n\n});\n\nparcelRegister(\"busg4\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $85d86a8d4647c102$export$2e2bcd8739ae039);\n/** Filter component\n * Alpine properties\n * $popover\n * $store: filterFields\n *\n */ // Maps filter type → URL param key\nconst $85d86a8d4647c102$var$ATS_APPLICATIONS_FILTER_TYPE_TO_PARAM_KEY = {\n    custom: 'custom_field_responses',\n    org_custom: 'org_custom_field_responses',\n    scorecard: 'scorecard_field_responses',\n    case: 'case_responses',\n    assessment: 'assessment_responses',\n    videointerview: 'videointerview_responses',\n    custom_form_field: 'custom_form_field_responses',\n    hirex_video_interview: 'hirex_video_interview_responses'\n};\nvar $85d86a8d4647c102$export$2e2bcd8739ae039 = ({ fieldName: fieldName, fieldId: fieldId, fieldInitializedWithData: fieldInitializedWithData, resetFromParent: resetFromParent, type: type, url: url, target: target, initialOpenState: initialOpenState, queryParam: queryParam, isEmpty: isEmpty, displayText: displayText, initFromURL: initFromURL, cleanValue: cleanValue, labelText: labelText })=>({\n        fieldName: // Props\n        fieldName,\n        fieldId: fieldId,\n        fieldInitializedWithData: fieldInitializedWithData,\n        resetFromParent: resetFromParent,\n        type: type,\n        url: url,\n        target: target || \"#candidates_table_wrapper\",\n        initialOpenState: initialOpenState,\n        queryParam: // Unimplemented methods. Should be implemented later.\n        queryParam,\n        isEmpty: isEmpty,\n        displayText: displayText,\n        initFromURL: initFromURL,\n        cleanValue: cleanValue,\n        labelText: labelText,\n        // State\n        panelLocked: false,\n        submitted: false,\n        filterScopedRequestInProgress: false,\n        timeoutId: null,\n        // Filter URL helpers\n        getFilterParamKey (filterType) {\n            return $85d86a8d4647c102$var$ATS_APPLICATIONS_FILTER_TYPE_TO_PARAM_KEY[filterType] || null;\n        },\n        getFilterResponsesFromUrl (filterType) {\n            const paramKey = this.getFilterParamKey(filterType);\n            if (!paramKey) return [];\n            const params = new URLSearchParams(window.location.search);\n            if (!params.has(paramKey)) return [];\n            return JSON.parse(params.get(paramKey)) || [];\n        },\n        findFilterResponseForField (filterType, filterFieldId) {\n            return this.getFilterResponsesFromUrl(filterType).find((r)=>r.field_id == filterFieldId) || null;\n        },\n        findFilterResponsesForField (filterType, filterFieldId) {\n            return this.getFilterResponsesFromUrl(filterType).filter((r)=>r.field_id == filterFieldId);\n        },\n        updateFilterJsonResponses (params, filterType, filterFieldId, newEntries) {\n            const paramKey = this.getFilterParamKey(filterType);\n            if (!paramKey) return;\n            let responses = [];\n            if (params.has(paramKey)) responses = JSON.parse(params.get(paramKey));\n            responses = responses.filter((r)=>r.field_id != filterFieldId);\n            responses.push(...newEntries);\n            if (responses.length > 0) params.set(paramKey, JSON.stringify(responses));\n            else params.delete(paramKey);\n        },\n        // Common methods.\n        hide () {\n            this.__wrapper.classList.add(\"hidden\");\n        },\n        remove () {\n            this.__wrapper.remove();\n        },\n        initializeButton () {\n            this.initialOpenState && this.$popover.open();\n            this.$watch(\"$popover.isOpen\", (value)=>{\n                if (this.submitted) this.submitted = false;\n                else {\n                    if (!value && !this.panelLocked) {\n                        if (this.fieldInitializedWithData) {\n                            this.resetFromParent = true;\n                            this.cleanValue();\n                            this.initFromURL();\n                        } else {\n                            this.$store.filterFields.remove(this.fieldId);\n                            this.remove();\n                        }\n                    } else if (!value && this.panelLocked) this.$popover.open();\n                }\n            });\n        },\n        // Event listeners\n        openFilterPanelListener: {\n            /** Opens the panel on `open-filter-panel` event if `fieldId` matches with the event detail.\n     *\n     */ [\"x-on:open-filter-panel.window\"] () {\n                this.$event.detail === this.fieldId && this.$popover.open();\n            }\n        },\n        get __wrapper () {\n            return this.$root.parentElement;\n        }\n    });\n\n});\n\nparcelRegister(\"dWz0N\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $a26bd9c4c1da64af$export$2e2bcd8739ae039);\n/**\n * Reporting \"Saved Views\" controller (Hiring Overview).\n *\n * Model: Saved View + dirty state (Ashby/Linear/Amplitude pattern).\n *\n * The URL is the single source of truth for filters. `filter_preset` is only a pointer to the\n * saved view the live filters were derived from, never the source of the filters themselves.\n *\n * Responsibilities:\n *  - derive the active view + \"modified\" (dirty) state by comparing live URL filters against the\n *    saved view's stored filters,\n *  - repair the desync bug: never leave a `filter_preset` pointer in the URL once the live filters\n *    are empty (e.g. after the user clears every pill one by one).\n *\n * Pills own their own URL writes (htmx hx-push-url), so this controller only observes URL changes\n * (`popstate` for back/forward, `htmx:pushedIntoHistory` for pill apply/remove) and reconciles.\n */ // Params that live in the query string but are not user filters.\nconst $a26bd9c4c1da64af$var$NON_FILTER_PARAMS = [\n    \"filter_preset\",\n    \"page\"\n];\nfunction $a26bd9c4c1da64af$var$liveSearchParams() {\n    const params = new URLSearchParams(window.location.search);\n    $a26bd9c4c1da64af$var$NON_FILTER_PARAMS.forEach((key)=>params.delete(key));\n    return params;\n}\n// Canonicalize a single value so dirty-compare ignores selection order of ||| multi-values.\nfunction $a26bd9c4c1da64af$var$canon(value) {\n    if (typeof value === \"string\" && value.includes(\"|||\")) return value.split(\"|||\").filter(Boolean).sort().join(\"|||\");\n    return value;\n}\nfunction $a26bd9c4c1da64af$var$filtersEqual(a, b) {\n    const ka = Object.keys(a).sort();\n    const kb = Object.keys(b).sort();\n    if (ka.length !== kb.length) return false;\n    if (ka.some((k, i)=>k !== kb[i])) return false;\n    return ka.every((k)=>$a26bd9c4c1da64af$var$canon(a[k]) === $a26bd9c4c1da64af$var$canon(b[k]));\n}\nvar $a26bd9c4c1da64af$export$2e2bcd8739ae039 = ({ presets: presets = [], activeId: activeId = \"\" } = {})=>({\n        presets: presets,\n        activeId: activeId,\n        // Bumped on every URL change so the x-show/x-text getters below recompute (window.location\n        // is not reactive on its own).\n        urlTick: 0,\n        showSaveForm: false,\n        init () {\n            this.reconcile();\n            const onChange = ()=>{\n                this.urlTick++;\n                this.reconcile();\n            };\n            window.addEventListener(\"popstate\", onChange);\n            window.addEventListener(\"htmx:pushedIntoHistory\", onChange);\n        },\n        /** Keep the URL honest: drop a dangling `filter_preset` once no filters remain. */ reconcile () {\n            this.activeId = this.urlPresetId();\n            if (this.activeId && this.isEmpty()) this.dropPointer();\n        },\n        // --- URL readers ---\n        urlPresetId () {\n            return new URLSearchParams(window.location.search).get(\"filter_preset\") || \"\";\n        },\n        liveFilters () {\n            this.urlTick; // register reactive dependency\n            const dict = {};\n            for (const [key, value] of $a26bd9c4c1da64af$var$liveSearchParams())if (value) dict[key] = value;\n            return dict;\n        },\n        isEmpty () {\n            return Object.keys(this.liveFilters()).length === 0;\n        },\n        hasFilters () {\n            return !this.isEmpty();\n        },\n        // --- active view + dirty state ---\n        get activePreset () {\n            this.urlTick;\n            return this.presets.find((p)=>p.id === this.activeId) || null;\n        },\n        get hasActiveView () {\n            return this.activePreset !== null;\n        },\n        get isDirty () {\n            const preset = this.activePreset;\n            if (!preset) return false;\n            return !$a26bd9c4c1da64af$var$filtersEqual(this.liveFilters(), preset.filters || {});\n        },\n        get activeName () {\n            return this.activePreset ? this.activePreset.name : \"\";\n        },\n        // --- actions ---\n        /** Remove only the pointer from the URL, leaving the live filters untouched. */ dropPointer () {\n            const url = new URL(window.location.href);\n            url.searchParams.delete(\"filter_preset\");\n            window.history.replaceState({}, \"\", url);\n            this.activeId = \"\";\n        },\n        /** Snapshot the live query string into a form's hidden query_params input before it submits. */ attachQueryParams (form) {\n            const input = form.querySelector('input[name=\"query_params\"]');\n            if (input) input.value = window.location.search.slice(1);\n        },\n        openSaveForm () {\n            this.showSaveForm = true;\n        },\n        closeSaveForm () {\n            this.showSaveForm = false;\n        }\n    });\n\n});\n\nparcelRegister(\"cSEGC\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $960a16a0d6d71319$export$2e2bcd8739ae039);\nvar $960a16a0d6d71319$export$2e2bcd8739ae039 = ({ modelValue: modelValue = null, choices: choices = [], htmlName: htmlName = '', label: label = '' })=>({\n        modelValue: // Props\n        modelValue,\n        label: label,\n        choices: choices,\n        htmlName: htmlName,\n        updateDropdownPosition () {\n            const dropdown = this.$refs.dropdown;\n            const container = this.$refs.comboboxContainer;\n            if (!dropdown || !container) return;\n            const containerRect = container.getBoundingClientRect();\n            const dropdownHeight = dropdown.offsetHeight || 240; // max-h-60 = 240px fallback\n            const gap = 8; // 8px gap\n            const viewportHeight = window.innerHeight;\n            // Calculate available space below and above the input\n            const spaceBelow = viewportHeight - containerRect.bottom - gap;\n            const spaceAbove = containerRect.top - gap;\n            // Determine if we should show above or below\n            const shouldShowAbove = spaceBelow < dropdownHeight && spaceAbove > spaceBelow;\n            dropdown.style.left = `${containerRect.left}px`;\n            dropdown.style.width = `${containerRect.width}px`;\n            dropdown.style.minWidth = `${containerRect.width}px`;\n            if (shouldShowAbove) {\n                // Position above the input\n                dropdown.style.top = 'auto';\n                dropdown.style.bottom = `${viewportHeight - containerRect.top + gap}px`;\n                dropdown.style.maxHeight = `${Math.min(spaceAbove, 240)}px`;\n            } else {\n                // Position below the input (default)\n                dropdown.style.bottom = 'auto';\n                dropdown.style.top = `${containerRect.bottom + gap}px`;\n                dropdown.style.maxHeight = `${Math.min(spaceBelow, 240)}px`;\n            }\n        },\n        // Called when dropdown opens\n        onDropdownOpen () {\n            this.$nextTick(()=>this.updateDropdownPosition());\n        },\n        // State\n        init () {\n            this.selected = this.modelValue; // Initialize selected in init()\n            this.query = '';\n            this.scrollHandler = null;\n            this.resizeHandler = null;\n            this.positionCheckInterval = null;\n            // Watch for selection changes and dispatch change event on hidden input\n            this.$watch('selected', (value)=>{\n                this.$nextTick(()=>{\n                    const hiddenInput = this.$el.querySelector(`input[name=\"${this.htmlName}\"]`);\n                    if (hiddenInput) hiddenInput.dispatchEvent(new Event('change', {\n                        bubbles: true\n                    }));\n                });\n            });\n        },\n        // Add scroll listeners when dropdown opens\n        addScrollListeners () {\n            if (this.positionCheckInterval) return; // Prevent duplicate intervals\n            // Use requestAnimationFrame for smooth position tracking\n            const checkPosition = ()=>{\n                this.updateDropdownPosition();\n                this.positionCheckInterval = requestAnimationFrame(checkPosition);\n            };\n            this.positionCheckInterval = requestAnimationFrame(checkPosition);\n        },\n        // Remove scroll listeners when dropdown closes\n        removeScrollListeners () {\n            if (this.positionCheckInterval) {\n                cancelAnimationFrame(this.positionCheckInterval);\n                this.positionCheckInterval = null;\n            }\n        },\n        selected: null,\n        query: '',\n        // Computed\n        get filteredOptions () {\n            return this.query === '' ? this.choices : this.choices.filter((option)=>{\n                return option.label.toLowerCase().includes(this.query.toLowerCase());\n            });\n        },\n        // Methods\n        handleQueryChange (event) {\n            this.query = event.target.value;\n        }\n    });\n\n});\n\nparcelRegister(\"8DTOO\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $64ad43a0866d003e$export$2e2bcd8739ae039);\n/**\n * File upload handler with IndexedDB persistence\n * @typedef {Object} FileUploadState\n * @property {string} storageKey - Unique identifier for the file in IndexedDB\n * @property {string} fieldId - Field ID for predictable storage key on form re-render\n * @property {string} fileName - Name of the uploaded file\n * @property {string} fileTempURL - Temp URL of the file to let user download\n * @property {string|null} fileData - Base64 data URL of the file content\n */ /**\n * Creates a new file upload handler instance\n * @param {Object} params - Initialization parameters\n * @param {string} [params.storageKey] - Initial storage key, typically provided by server\n * @param {string} [params.fieldId] - Field ID for predictable storage lookup on re-render\n * @param {number} [params.maxFileSize=5] - Maximum file size in MB (defaults to 5MB)\n * @returns {FileUploadState} File upload state and methods\n */ var $64ad43a0866d003e$export$2e2bcd8739ae039 = ({ storageKey: storageKey, maxFileSize: maxFileSize = 5, fieldId: fieldId = null, doNotRestore: doNotRestore = false })=>({\n        storageKey: storageKey,\n        fieldId: fieldId,\n        doNotRestore: doNotRestore,\n        fileName: \"\",\n        fileTempURL: \"\",\n        fileData: null,\n        isDragging: false,\n        DB_NAME: \"FileUploadDB\",\n        STORE_NAME: \"files\",\n        maxFileSize: maxFileSize,\n        /**\n   * Opens IndexedDB connection\n   * @returns {Promise<IDBDatabase>}\n   */ async openDB () {\n            return new Promise((resolve, reject)=>{\n                const request = indexedDB.open(this.DB_NAME, 1);\n                request.onerror = ()=>reject(request.error);\n                request.onsuccess = ()=>resolve(request.result);\n                request.onupgradeneeded = (event)=>{\n                    const db = event.target.result;\n                    if (!db.objectStoreNames.contains(this.STORE_NAME)) {\n                        const store = db.createObjectStore(this.STORE_NAME, {\n                            keyPath: \"key\"\n                        });\n                        // Add timestamp index for expire policy if needed\n                        store.createIndex(\"timestamp\", \"timestamp\", {\n                            unique: false\n                        });\n                    }\n                };\n            });\n        },\n        /**\n   * Cleans up database, removing old content-based files but keeping field-based files\n   * @param {string} currentKey - Key of the file to keep\n   * @returns {Promise<void>}\n   */ async cleanupDB (currentKey) {\n            const db = await this.openDB();\n            return new Promise((resolve, reject)=>{\n                const transaction = db.transaction([\n                    this.STORE_NAME\n                ], \"readwrite\");\n                const store = transaction.objectStore(this.STORE_NAME);\n                // Get all keys and delete old content-based files (not field-based)\n                const request = store.getAllKeys();\n                request.onsuccess = ()=>{\n                    const keys = request.result;\n                    keys.forEach((key)=>{\n                        // Keep current file and all field-based files (for multi-file forms)\n                        const isFieldBased = key.startsWith(\"__hrx_file_field__\");\n                        if (key !== currentKey && !isFieldBased) store.delete(key);\n                    });\n                };\n                request.onerror = ()=>reject(request.error);\n                transaction.oncomplete = ()=>{\n                    db.close();\n                    resolve();\n                };\n            });\n        },\n        /**\n   * Saves file data to IndexedDB and cleans up old files\n   * @param {string} key - Storage key\n   * @param {Object} data - File data to store\n   * @returns {Promise<void>}\n   */ async saveToDB (key, data) {\n            const db = await this.openDB();\n            return new Promise((resolve, reject)=>{\n                const transaction = db.transaction([\n                    this.STORE_NAME\n                ], \"readwrite\");\n                const store = transaction.objectStore(this.STORE_NAME);\n                // Add timestamp to data\n                const fileData = {\n                    key: key,\n                    ...data,\n                    timestamp: new Date().getTime()\n                };\n                const request = store.put(fileData);\n                request.onerror = ()=>reject(request.error);\n                request.onsuccess = async ()=>{\n                    try {\n                        // Clean up old files after successful save\n                        await this.cleanupDB(key);\n                        resolve();\n                    } catch (e) {\n                        console.warn(\"Error during cleanup:\", e);\n                        resolve(); // Still resolve as the file was saved successfully\n                    }\n                };\n                transaction.oncomplete = ()=>db.close();\n            });\n        },\n        /**\n   * Retrieves file data from IndexedDB\n   * @param {string} key - Storage key to retrieve\n   * @returns {Promise<Object|null>}\n   */ async getFromDB (key) {\n            const db = await this.openDB();\n            return new Promise((resolve, reject)=>{\n                const transaction = db.transaction([\n                    this.STORE_NAME\n                ], \"readonly\");\n                const store = transaction.objectStore(this.STORE_NAME);\n                const request = store.get(key);\n                request.onerror = ()=>reject(request.error);\n                request.onsuccess = ()=>resolve(request.result);\n                transaction.oncomplete = ()=>db.close();\n            });\n        },\n        /**\n   * Removes file data from IndexedDB\n   * @param {string} key - Storage key to remove\n   * @returns {Promise<void>}\n   */ async removeFromDB (key) {\n            const db = await this.openDB();\n            return new Promise((resolve, reject)=>{\n                const transaction = db.transaction([\n                    this.STORE_NAME\n                ], \"readwrite\");\n                const store = transaction.objectStore(this.STORE_NAME);\n                const request = store.delete(key);\n                request.onerror = ()=>reject(request.error);\n                request.onsuccess = ()=>resolve();\n                transaction.oncomplete = ()=>db.close();\n            });\n        },\n        /**\n   * Generates a predictable storage key from field ID\n   * @param {string} fieldId - Field ID for the file input\n   * @returns {string} Storage key prefixed with '__hrx_file_field__'\n   */ getFieldStorageKey (fieldId) {\n            return `__hrx_file_field__${fieldId}`;\n        },\n        /**\n   * Generates a unique storage key from file data\n   * @param {string} fileData - Base64 data URL of file content\n   * @returns {Promise<string>} Storage key prefixed with '__hrx_file__'\n   */ async generateStorageKey (fileData) {\n            // Convert the complete data URL string to bytes for hashing\n            const encoder = new TextEncoder();\n            const data = encoder.encode(fileData);\n            // Generate SHA-256 hash of the data\n            const hashBuffer = await crypto.subtle.digest(\"SHA-256\", data);\n            // Convert hash buffer to hexadecimal string\n            const hashArray = Array.from(new Uint8Array(hashBuffer));\n            const hashHex = hashArray.map((b)=>b.toString(16).padStart(2, \"0\")).join(\"\");\n            return `__hrx_file__${hashHex}`;\n        },\n        /**\n   * Restores file from saved data\n   * @param {Object} savedFile - Saved file data from IndexedDB\n   * @returns {void}\n   */ restoreFile (savedFile) {\n            this.fileName = savedFile.name;\n            this.fileTempURL = URL.createObjectURL(this.base64ToFile(savedFile.data, savedFile.name, savedFile.type));\n            this.fileData = savedFile.data;\n            // Create and assign file to input\n            const dataTransfer = new DataTransfer();\n            const file = this.base64ToFile(savedFile.data, savedFile.name, savedFile.type);\n            dataTransfer.items.add(file);\n            this.$refs.input.files = dataTransfer.files;\n            // Notify listeners that file is attached\n            document.dispatchEvent(new Event(\"file_attached\"));\n        },\n        /**\n   * Initializes the file input with data from IndexedDB if available\n   * @returns {Promise<void>}\n   */ async init () {\n            // First, try to look up by fieldId (works on form re-render after validation error)\n            if (this.fieldId) try {\n                const fieldKey = this.getFieldStorageKey(this.fieldId);\n                const savedFile = await this.getFromDB(fieldKey);\n                if (savedFile && !this.doNotRestore) {\n                    this.storageKey = fieldKey;\n                    this.restoreFile(savedFile);\n                    return;\n                }\n            } catch (e) {\n                console.warn(\"Error retrieving file by field ID:\", e);\n            }\n            // Fall back to storageKey lookup (for server-provided files)\n            if (this.storageKey) try {\n                const savedFile = await this.getFromDB(this.storageKey);\n                if (savedFile) this.restoreFile(savedFile);\n            } catch (e) {\n                console.warn(\"Error retrieving file data:\", e);\n                await this.removeFromDB(this.storageKey);\n            }\n        },\n        /**\n   * Handles file upload events\n   * @returns {Promise<void>}\n   */ async fileHandler () {\n            let file = this.$refs.input.files[0];\n            if (file) {\n                // Check file size limit (configurable, defaults to 5MB)\n                if (file.size / 1024 / 1024 > this.maxFileSize) {\n                    alert(`File size exceeds ${this.maxFileSize}MB. Please upload a file up to ${this.maxFileSize}MB.`);\n                    // Clear all file data\n                    this.$refs.input.value = \"\";\n                    if (this.storageKey) await this.removeFromDB(this.storageKey);\n                    // Also clear field-based storage\n                    if (this.fieldId) await this.removeFromDB(this.getFieldStorageKey(this.fieldId));\n                    this.fileName = \"\";\n                    this.fileTempURL = null;\n                    this.fileData = null;\n                    this.storageKey = null;\n                } else {\n                    this.fileName = file.name;\n                    this.fileTempURL = URL.createObjectURL(file);\n                    // Convert file to data URL and save to IndexedDB\n                    const reader = new FileReader();\n                    reader.onload = async (e)=>{\n                        // Store the data URL (format: \"data:mime/type;base64,...\")\n                        this.fileData = e.target.result;\n                        const fileData = {\n                            name: file.name,\n                            type: file.type,\n                            data: this.fileData\n                        };\n                        try {\n                            // Save with field-based key for predictable retrieval on form re-render\n                            if (this.fieldId) {\n                                const fieldKey = this.getFieldStorageKey(this.fieldId);\n                                await this.saveToDB(fieldKey, fileData);\n                                this.storageKey = fieldKey;\n                            } else {\n                                // Fall back to content-based key if no fieldId\n                                this.storageKey = await this.generateStorageKey(this.fileData);\n                                await this.saveToDB(this.storageKey, fileData);\n                            }\n                            document.dispatchEvent(new Event(\"file_attached\"));\n                        } catch (e) {\n                            console.error(\"Error saving file:\", e);\n                            alert(\"Error saving file. Please try again.\");\n                        }\n                    };\n                    reader.readAsDataURL(file);\n                }\n            }\n        },\n        /**\n   * Handles dragover event to allow drop\n   * @param {DragEvent} event\n   * @returns {void}\n   */ handleDragOver (event) {\n            event.preventDefault();\n            this.isDragging = true;\n        },\n        /**\n   * Handles dragleave event to reset visual state\n   * @param {DragEvent} event\n   * @returns {void}\n   */ handleDragLeave (event) {\n            event.preventDefault();\n            this.isDragging = false;\n        },\n        /**\n   * Handles drop event to process the dropped file\n   * @param {DragEvent} event\n   * @returns {Promise<void>}\n   */ async handleDrop (event) {\n            event.preventDefault();\n            this.isDragging = false;\n            const droppedFiles = event.dataTransfer.files;\n            if (droppedFiles.length === 0) return;\n            // Only take the first file\n            const dataTransfer = new DataTransfer();\n            dataTransfer.items.add(droppedFiles[0]);\n            this.$refs.input.files = dataTransfer.files;\n            await this.fileHandler();\n        },\n        /**\n   * Converts base64 data URL back to a File object\n   * @param {string} base64Data - Base64 data URL of file content\n   * @param {string} filename - Name of the file\n   * @param {string} type - MIME type of the file\n   * @returns {File} Reconstructed File object\n   */ base64ToFile (base64Data, filename, type) {\n            // Extract base64 data from data URL and convert to binary\n            const binaryString = window.atob(base64Data.split(\",\")[1]);\n            const bytes = new Uint8Array(binaryString.length);\n            // Convert binary string to byte array\n            for(let i = 0; i < binaryString.length; i++)bytes[i] = binaryString.charCodeAt(i);\n            // Create Blob and File objects from binary data\n            const blob = new Blob([\n                bytes\n            ], {\n                type: type\n            });\n            return new File([\n                blob\n            ], filename, {\n                type: type\n            });\n        }\n    });\n\n});\n\nparcelRegister(\"7A7V9\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $58520a14f4c46160$export$2e2bcd8739ae039);\n/**\n * Multi-file upload handler with drag-and-drop support\n * No IndexedDB persistence — files live only in the current form session.\n *\n * @param {Object} params\n * @param {number} [params.maxFiles=20] - Maximum number of files allowed\n * @param {number} [params.maxFileSize=5] - Maximum file size in MB per file\n * @param {number} [params.maxTotalSize=100] - Maximum total size in MB for all files combined\n * @param {string} [params.accept] - Accepted file types (MIME types or extensions)\n * @returns {Object} Alpine.js data object\n */ var $58520a14f4c46160$export$2e2bcd8739ae039 = ({ maxFiles: maxFiles = 20, maxFileSize: maxFileSize = 5, maxTotalSize: maxTotalSize = 100, accept: accept = \"\" })=>({\n        files: [],\n        maxFiles: maxFiles,\n        maxFileSize: maxFileSize,\n        maxTotalSize: maxTotalSize,\n        accept: accept,\n        isDragging: false,\n        errors: [],\n        init () {\n            this.$watch(\"files\", (value)=>{\n                this.$dispatch(\"files-updated\", {\n                    files: [\n                        ...value\n                    ]\n                });\n            });\n        },\n        /**\n   * Resets all files by removing them one by one (same as clicking each X button)\n   */ reset () {\n            while(this.files.length > 0)this.removeFile(0);\n        },\n        /**\n   * Validates a file against size and type constraints\n   * @param {File} file\n   * @returns {string|null} Error message or null if valid\n   */ validateFile (file) {\n            if (file.size / 1024 / 1024 > this.maxFileSize) return `\"${file.name}\" exceeds ${this.maxFileSize}MB limit.`;\n            if (this.accept) {\n                const acceptedTypes = this.accept.split(\",\").map((t)=>t.trim());\n                const fileExtension = \".\" + file.name.split(\".\").pop().toLowerCase();\n                const matches = acceptedTypes.some((type)=>{\n                    if (type.startsWith(\".\")) return fileExtension === type.toLowerCase();\n                    if (type.endsWith(\"/*\")) {\n                        const category = type.split(\"/\")[0];\n                        return file.type.startsWith(category + \"/\");\n                    }\n                    return file.type === type;\n                });\n                if (!matches) return `\"${file.name}\" is not an accepted file type.`;\n            }\n            return null;\n        },\n        /**\n   * Processes an array of files, validates and adds them\n   * @param {FileList|Array<File>} fileList\n   */ /**\n   * Returns the current total size of all files in bytes\n   */ get totalSize () {\n            return this.files.reduce((sum, entry)=>sum + entry.size, 0);\n        },\n        addFiles (fileList) {\n            this.errors = [];\n            const errors = [];\n            const filesToAdd = Array.from(fileList);\n            for (const file of filesToAdd){\n                if (this.files.length >= this.maxFiles) {\n                    errors.push(`Maximum ${this.maxFiles} files allowed.`);\n                    break;\n                }\n                if ((this.totalSize + file.size) / 1024 / 1024 > this.maxTotalSize) {\n                    errors.push(`Total upload size would exceed ${this.maxTotalSize}MB limit.`);\n                    break;\n                }\n                const error = this.validateFile(file);\n                if (error) {\n                    errors.push(error);\n                    continue;\n                }\n                this.files.push({\n                    name: file.name,\n                    size: file.size,\n                    tempURL: URL.createObjectURL(file),\n                    file: file\n                });\n            }\n            if (errors.length > 0) this.errors = errors;\n            this.syncInputFiles();\n        },\n        /**\n   * Handles file input change event\n   */ fileHandler () {\n            const inputFiles = this.$refs.input.files;\n            if (inputFiles.length > 0) this.addFiles(inputFiles);\n        },\n        /**\n   * Handles dragover event\n   * @param {DragEvent} event\n   */ handleDragOver (event) {\n            event.preventDefault();\n            this.isDragging = true;\n        },\n        /**\n   * Handles dragleave event\n   */ handleDragLeave () {\n            this.isDragging = false;\n        },\n        /**\n   * Handles drop event\n   * @param {DragEvent} event\n   */ handleDrop (event) {\n            event.preventDefault();\n            this.isDragging = false;\n            const droppedFiles = event.dataTransfer.files;\n            if (droppedFiles.length > 0) this.addFiles(droppedFiles);\n        },\n        /**\n   * Removes a file at the given index\n   * @param {number} index\n   */ removeFile (index) {\n            const removed = this.files.splice(index, 1);\n            if (removed.length > 0) URL.revokeObjectURL(removed[0].tempURL);\n            this.syncInputFiles();\n        },\n        /**\n   * Syncs the internal files array to the hidden file input\n   */ syncInputFiles () {\n            const dataTransfer = new DataTransfer();\n            for (const entry of this.files)dataTransfer.items.add(entry.file);\n            this.$refs.input.files = dataTransfer.files;\n        },\n        /**\n   * Formats file size for display\n   * @param {number} bytes\n   * @returns {string}\n   */ formatSize (bytes) {\n            if (bytes < 1024) return bytes + \" B\";\n            if (bytes < 1048576) return (bytes / 1024).toFixed(1) + \" KB\";\n            return (bytes / 1048576).toFixed(1) + \" MB\";\n        }\n    });\n\n});\n\nparcelRegister(\"bKHmb\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $88e59f55e53b00e7$export$2e2bcd8739ae039);\nvar $88e59f55e53b00e7$export$2e2bcd8739ae039 = ({ inputId: inputId, inputName: inputName, initialCountry: initialCountry = \"auto\" })=>({\n        inputId: // Props\n        inputId,\n        inputName: inputName,\n        // State\n        invalid: false,\n        errorText: \"\",\n        input: null,\n        iti: null,\n        maskPattern: \"999999999999999\",\n        nationalMode: true,\n        placeholderNumberType: \"MOBILE\",\n        // Handlers\n        reset () {\n            this.errorText = \"\";\n            this.invalid = false;\n        },\n        getExampleNumber () {\n            if (!window.intlTelInputUtils) return null;\n            return window.intlTelInputUtils.getExampleNumber(this.iti.getSelectedCountryData().iso2, this.nationalMode, intlTelInputUtils.numberType[this.placeholderNumberType]);\n        },\n        generateMaskPattern (exampleNumber) {\n            const startsWithZero = exampleNumber.startsWith(\"0\");\n            if (startsWithZero) return \"0\" + exampleNumber.substring(1).replace(/\\d/g, \"9\");\n            else return exampleNumber.replace(/\\d/g, \"9\");\n        },\n        updateMask () {\n            const example = this.getExampleNumber();\n            if (example) this.maskPattern = this.generateMaskPattern(example);\n            // Exception for Indonesia\n            // Indonesian phone numbers might be 13 digit\n            // Remove the mask, and let validation work.\n            if (example === \"0812-345-678\") this.maskPattern = \"999999999999999\";\n            console.log(this.maskPattern);\n        },\n        handler (event) {\n            // Listener is on window, so every htmx:before-request on the page fires here.\n            // Only validate when the request originates from the form containing this input,\n            // otherwise an invalid stored phone (e.g. rendered disabled in candidate detail)\n            // would preventDefault unrelated htmx actions and brick the whole page.\n            if (!this.input || this.input.disabled) return;\n            const form = this.input.closest(\"form\");\n            if (!form || event.target !== form) return;\n            this.reset();\n            if (this.input.value.trim() && this.iti) {\n                if (!window.intlTelInputUtils) {\n                    // If utils not loaded, wait for promise and retry handler\n                    this.iti.promise.then(()=>{\n                        this.handler(event);\n                    });\n                    return; // Stop current execution\n                }\n                if (!this.iti.isValidNumber()) {\n                    this.invalid = true;\n                    const example = this.getExampleNumber();\n                    // Handle case where getExampleNumber returned null\n                    this.errorText = example ? `Enter a valid phone number (e.g. ${example}).` : `Enter a valid phone number.`;\n                    event.preventDefault();\n                    this.input.focus();\n                }\n            }\n        },\n        init () {\n            this.input = document.querySelector(`#${this.inputId}`);\n            const config = {\n                utilsScript: \"https://fastly.jsdelivr.net/npm/intl-tel-input@20.3.0/build/js/utils.js\",\n                preferredCountries: [],\n                separateDialCode: false,\n                showFlags: true,\n                nationalMode: this.nationalMode,\n                hiddenInput: function(telInputName) {\n                    return {\n                        phone: inputName\n                    };\n                },\n                initialCountry: initialCountry,\n                placeholderNumberType: this.placeholderNumberType,\n                customPlaceholder: function(selectedCountryPlaceholder, selectedCountryData) {\n                    if (selectedCountryData.name === \"Turkey\") return \"05__ ___ __ __\";\n                    else return selectedCountryPlaceholder;\n                }\n            };\n            // Only use geoIpLookup when no country was provided server-side.\n            // This avoids unnecessary external API calls when we already have the\n            // country from Cloudflare's CF-IPCountry header or organization settings.\n            if (initialCountry === \"auto\") config.geoIpLookup = (callback)=>{\n                fetch(\"https://ipapi.co/json\").then((res)=>res.json()).then((data)=>callback(data.country_code)).catch(()=>callback(\"us\"));\n            };\n            this.iti = window.intlTelInput(this.input, config);\n            this.iti.promise.then(()=>{\n                this.updateMask();\n                this.input.addEventListener(\"countrychange\", ()=>{\n                    this.updateMask();\n                });\n            });\n        }\n    });\nfunction $88e59f55e53b00e7$var$testPhoneNumberInput() {\n    const iti = window.intlTelInputGlobals.getInstance(document.querySelector(\"#id_phone_number\"));\n    const allCountries = window.intlTelInputGlobals.getCountryData();\n    const form = document.querySelector(\"form\");\n    form.setAttribute(\"hx-swap\", \"none\");\n    form.first_name.value = \"John\";\n    form.last_name.value = \"Doe\";\n    form.email.value = \"john.doe@example.com\";\n    allCountries.forEach((countryData, index)=>{\n        setTimeout(()=>{\n            // Set the country\n            iti.setCountry(countryData.iso2);\n            // Generate a valid phone number for this country\n            const exampleNumber = intlTelInputUtils.getExampleNumber(countryData.iso2, true, intlTelInputUtils.numberType.MOBILE);\n            // Set the number in the input\n            iti.setNumber(exampleNumber);\n            // Submit the form\n            htmx.trigger(form, \"submit\");\n            // Log the action\n            console.log(`Tested country: ${countryData.name}, Phone: ${exampleNumber}`);\n        }, 3000 * index);\n    });\n}\n\n});\n\nparcelRegister(\"aFSg5\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $7c57d257fcc40f70$export$2e2bcd8739ae039);\nconst $7c57d257fcc40f70$var$sanitizeHtmlStyles = (html)=>{\n    if (!html) return html;\n    // Remove whitespace between p tags (e.g. </p> <p> -> </p><p>)\n    return html.replace(/<\\/p>\\s+<p>/g, \"</p><p>\");\n};\n// Check if HTML content is visually empty (only contains tags/whitespace)\nconst $7c57d257fcc40f70$var$isHtmlVisuallyEmpty = (html)=>{\n    if (!html) return true;\n    // Remove all HTML tags\n    const textOnly = html.replace(/<[^>]*>/g, \"\");\n    // Remove whitespace entities and whitespace\n    const normalized = textOnly.replace(/&nbsp;/g, \" \").trim();\n    return normalized.length === 0;\n};\nvar $7c57d257fcc40f70$export$2e2bcd8739ae039 = ()=>{\n    const beforeUnloadHandler = (event)=>{\n        event.preventDefault();\n        event.returnValue = true;\n    };\n    const htmxBeforeRequestHandler = (event)=>{\n        // Determine if the event target is a navigation request.\n        const isNavigationRequest = event.detail.boosted && event.target.tagName === \"A\";\n        if (isNavigationRequest) {\n            const isConfirmed = confirm(\"You have unsaved changes. Are you sure you want to navigate away?\");\n            if (!isConfirmed) event.preventDefault(); // Prevent navigation\n        }\n    };\n    const rawFormData = JSON.parse(document.querySelector(\"#form_data\").textContent);\n    rawFormData.description = $7c57d257fcc40f70$var$sanitizeHtmlStyles(rawFormData.description);\n    const rawInitialFormData = JSON.parse(document.querySelector(\"#form_data\").textContent);\n    rawInitialFormData.description = $7c57d257fcc40f70$var$sanitizeHtmlStyles(rawInitialFormData.description);\n    return {\n        // State\n        formData: rawFormData,\n        initialFormData: rawInitialFormData,\n        // Methods\n        init () {\n            // Watch form data and add beforeUnloadHandler callback to beforeunload event when form state is dirty\n            // This will prevent unintended data loss and provide better UX\n            this.$watch(\"formData\", ()=>{\n                if (this.checkFormState(this.formData, this.initialFormData)) {\n                    window.addEventListener(\"beforeunload\", beforeUnloadHandler);\n                    window.addEventListener(\"htmx:beforeRequest\", htmxBeforeRequestHandler);\n                } else {\n                    window.removeEventListener(\"beforeunload\", beforeUnloadHandler);\n                    window.removeEventListener(\"htmx:beforeRequest\", htmxBeforeRequestHandler);\n                }\n            });\n            // we should handle saving, because it runs destroy in some conditions\n            window.addEventListener(\"htmx:beforeRequest\", (event)=>{\n                const isSaveRequest = event.detail.elt.id == \"job-settings-update-button-main\" || event.detail.elt.id == \"job-settings-update-button-flyout\";\n                if (isSaveRequest) {\n                    window.removeEventListener(\"beforeunload\", beforeUnloadHandler);\n                    window.removeEventListener(\"htmx:beforeRequest\", htmxBeforeRequestHandler);\n                }\n            });\n        },\n        // we should also handle organic destroy(navigating instead of saving)\n        destroy () {\n            // Remove the beforeUnloadHandler callback from beforeunload when component lifecycle ends\n            window.removeEventListener(\"beforeunload\", beforeUnloadHandler);\n            window.removeEventListener(\"htmx:beforeRequest\", htmxBeforeRequestHandler);\n        },\n        /**\n     * Recursively checks if two objects (obj1 and obj2) are deeply equal.\n     */ isDeepEqual (obj1, obj2) {\n            // Fast equality check for identical references or primitives\n            if (obj1 === obj2) return true;\n            // Check if either argument is not an object or is null\n            if (typeof obj1 !== \"object\" || obj1 === null || typeof obj2 !== \"object\" || obj2 === null) return false;\n            // Get the keys of both objects\n            const keys1 = Object.keys(obj1);\n            const keys2 = Object.keys(obj2);\n            // If the number of properties is different, objects are not equal\n            if (keys1.length !== keys2.length) return false;\n            // Check each property in obj1 to ensure it exists and is equal in obj2\n            for (let key of keys1){\n                if (!keys2.includes(key)) return false;\n                // Special handling for functions and deeper dive into nested objects\n                if (typeof obj1[key] === \"function\" || typeof obj2[key] === \"function\") {\n                    if (obj1[key].toString() !== obj2[key].toString()) return false;\n                } else if (!this.isDeepEqual(obj1[key], obj2[key])) return false;\n            }\n            return true;\n        },\n        /**\n     * Determines the dirty state of the form by comparing formData and initialFormData.\n     */ checkFormState (formData, initialFormData) {\n            // Create normalized copies for comparison\n            const normalizedFormData = {\n                ...formData\n            };\n            const normalizedInitialFormData = {\n                ...initialFormData\n            };\n            // Normalize success_message: treat empty-looking HTML as equivalent to empty string\n            if ($7c57d257fcc40f70$var$isHtmlVisuallyEmpty(normalizedFormData.success_message)) normalizedFormData.success_message = \"\";\n            if ($7c57d257fcc40f70$var$isHtmlVisuallyEmpty(normalizedInitialFormData.success_message)) normalizedInitialFormData.success_message = \"\";\n            const isDirty = !this.isDeepEqual(normalizedFormData, normalizedInitialFormData);\n            return isDirty;\n        }\n    };\n};\n\n});\n\nparcelRegister(\"b4EcM\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $80ff41514b128c4d$export$2e2bcd8739ae039);\nparcelRequire(\"5IiZx\");\nvar $80ff41514b128c4d$export$2e2bcd8739ae039 = ({ stagesData: stagesData, url: url, pipeline: pipeline, job: job = null, canManagePipeline: canManagePipeline = true })=>({\n        stagesData: // Props\n        stagesData,\n        url: url,\n        pipeline: pipeline,\n        job: job,\n        canManagePipeline: canManagePipeline,\n        errors: {},\n        // State\n        editingStageId: null,\n        newStageAdded: false,\n        isModalOpen: false,\n        selectedStage: null,\n        deletedStageId: null,\n        stageApplicationCount: null,\n        requestInProgress: false,\n        getCsrf () {\n            return JSON.parse(document.querySelector(\"body\").getAttribute(\"hx-headers\"))[\"X-CSRFToken\"];\n        },\n        // Handlers\n        addStage (stageType) {\n            if (!this.newStageAdded) {\n                const stageTypeIndex = this.stagesData.findIndex((typeData)=>typeData.stage_type.value === stageType);\n                const newStage = {\n                    id: 0,\n                    color: \"#94A3B8\",\n                    name: \"\",\n                    description: \"\",\n                    order: null,\n                    stage_type: stageType\n                };\n                // Add the new stage to the end of its group\n                this.stagesData[stageTypeIndex].stages.push(newStage);\n                this.newStageAdded = true;\n                this.editingStageId = 0;\n                // Re-assign order for every stage\n                this.reassignOrders();\n            }\n        },\n        reassignOrders () {\n            let order = 1;\n            this.stagesData.forEach((stageTypeData)=>{\n                stageTypeData.stages.forEach((stage)=>{\n                    stage.order = order;\n                    order++;\n                });\n            });\n        },\n        removeNewStage () {\n            this.stagesData.forEach((stageTypeData)=>{\n                const newStageIndex = stageTypeData.stages.findIndex((stage)=>stage.id === 0);\n                if (newStageIndex !== -1) {\n                    stageTypeData.stages.splice(newStageIndex, 1);\n                    this.newStageAdded = false;\n                }\n            });\n        },\n        formHandler (stageData) {\n            this.requestInProgress = true;\n            // Form validation\n            if (!stageData.name) {\n                stageData.errors = {\n                    name: [\n                        \"This field is required.\"\n                    ]\n                };\n                return;\n            }\n            // Add pipeline and stage_type to each stage\n            this.stagesData.forEach((group)=>{\n                group.stages.forEach((stage)=>{\n                    stage.pipeline = this.pipeline;\n                    stage.stage_type = group.stage_type.value;\n                });\n            });\n            // Convert the entire stagesData state into a JSON string\n            const payload = JSON.stringify({\n                pipeline: this.pipeline,\n                stagesData: this.stagesData\n            });\n            fetch(this.url, {\n                method: \"POST\",\n                headers: {\n                    \"X-CSRFToken\": this.getCsrf(),\n                    \"Content-Type\": \"application/json\"\n                },\n                body: payload\n            }).then(async (response)=>{\n                this.requestInProgress = false;\n                if (!response.ok) {\n                    const errorData = await response.json();\n                    const error = new Error(response.statusText);\n                    error.errors = errorData;\n                    throw error;\n                }\n                return response.json();\n            }).then((data)=>{\n                this.stagesData = data.data; // Update the state\n                this.editingStageId = null;\n                this.newStageAdded = false;\n                this.derived = true;\n            }).catch((error)=>{\n                console.error(\"Error:\", error);\n                stageData.errors = error.errors.errors;\n            });\n        },\n        getStageApplicationCount (stageId) {\n            if (window.fromOrg) return new Promise((resolve, reject)=>{\n                resolve(0);\n            });\n            let applicationCount = fetch(`/jobs/${this.job}/stages/${stageId}/application_count/`, {\n                method: \"GET\"\n            }).then(async (response)=>{\n                if (!response.ok) throw new Error(\"Network response was not ok \" + response.statusText);\n                return response.json();\n            }).then((data)=>{\n                return data.data.application_count;\n            }).catch((error)=>{\n                console.error(\"Error:\", error);\n            });\n            return applicationCount;\n        },\n        deleteStage (stageId) {\n            this.getStageApplicationCount(stageId).then((data)=>{\n                if (data === 0) this.executeDeleteStage(stageId, null);\n                else {\n                    this.deletedStageId = stageId;\n                    this.stageApplicationCount = data;\n                    this.isModalOpen = true;\n                }\n            });\n        },\n        executeDeleteStage (stageId, newStageId) {\n            this.requestInProgress = true;\n            fetch(url, {\n                method: \"DELETE\",\n                headers: {\n                    \"X-CSRFToken\": this.getCsrf(),\n                    \"Content-Type\": \"application/json\"\n                },\n                body: JSON.stringify({\n                    id: stageId,\n                    newStageId: newStageId\n                })\n            }).then(async (response)=>{\n                this.requestInProgress = false;\n                if (!response.ok) throw new Error(\"Network response was not ok \" + response.statusText);\n                return response.json();\n            }).then((data)=>{\n                this.stagesData = data.data; // Update the state\n                this.derived = true;\n            }).catch((error)=>{\n                console.error(\"Error:\", error);\n            });\n        },\n        confirmStageSelection () {\n            if (parseInt(this.selectedStage) === this.deletedStageId) {\n                alert(\"Cannot move applications to the stage being deleted.\");\n                return;\n            }\n            if (this.selectedStage) {\n                this.executeDeleteStage(this.deletedStageId, this.selectedStage);\n                this.isModalOpen = false;\n                this.selectedStage = null;\n                this.deletedStageId = null;\n            } else alert(\"Please select a stage.\");\n        },\n        getNewOrderingDataFromHtml () {\n            let newOrderingData = [];\n            const baseStages = document.querySelectorAll(\".sortable\");\n            let counter = 0;\n            baseStages.forEach((stage, index)=>{\n                let currentStage = {\n                    order: counter + 1,\n                    stage_type: {\n                        value: stage.dataset.stageTypeId,\n                        label: stage.dataset.stageTypeLabel\n                    },\n                    stages: []\n                };\n                stage.querySelectorAll(\".stage\").forEach((stage, stageIndex)=>{\n                    let stageData = {\n                        id: stage.dataset.stageId,\n                        order: counter + 1,\n                        name: stage.dataset.stageName,\n                        color: stage.dataset.colorCode,\n                        description: stage.dataset.stageDescription,\n                        pipeline: this.pipeline,\n                        stage_type: stage.dataset.stageType\n                    };\n                    currentStage.stages.push(stageData);\n                    counter++;\n                });\n                newOrderingData.push(currentStage);\n            });\n            return newOrderingData;\n        },\n        updateOrder () {\n            this.requestInProgress = true;\n            this.stagesData = this.getNewOrderingDataFromHtml();\n            const payload = JSON.stringify({\n                pipeline: this.pipeline,\n                stagesData: this.stagesData\n            });\n            fetch(this.url, {\n                method: \"POST\",\n                headers: {\n                    \"X-CSRFToken\": this.getCsrf(),\n                    \"Content-Type\": \"application/json\"\n                },\n                body: payload\n            }).then(async (response)=>{\n                this.requestInProgress = false;\n                if (!response.ok) {\n                    const errorData = await response.json();\n                    const error = new Error(response.statusText);\n                    error.errors = errorData;\n                    throw error;\n                }\n                return response.json();\n            }).then((data)=>{\n                this.stagesData = data.data; // Update the state\n                this.derived = true;\n            }).then().catch((error)=>{\n                console.error(\"Error:\", error);\n            });\n        }\n    });\n\n});\nparcelRegister(\"5IiZx\", function(module, exports) {\n/*! js-cookie v3.0.8 | MIT */ (function(global, factory) {\n    module.exports = factory();\n})(module.exports, function() {\n    'use strict';\n    function assign(target) {\n        for(var i = 1; i < arguments.length; i++){\n            var source = arguments[i];\n            for(var key in source){\n                if (key === '__proto__') continue;\n                target[key] = source[key];\n            }\n        }\n        return target;\n    }\n    var defaultConverter = {\n        read: function(value) {\n            if (value[0] === '\"') value = value.slice(1, -1);\n            return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\n        },\n        write: function(value) {\n            return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);\n        }\n    };\n    function init(converter, defaultAttributes) {\n        function set(name, value, attributes) {\n            if (typeof document === 'undefined') return;\n            attributes = assign({}, defaultAttributes, attributes);\n            if (typeof attributes.expires === 'number') attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n            if (attributes.expires) attributes.expires = attributes.expires.toUTCString();\n            name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);\n            var stringifiedAttributes = '';\n            for(var attributeName in attributes){\n                if (!attributes[attributeName]) continue;\n                stringifiedAttributes += '; ' + attributeName;\n                if (attributes[attributeName] === true) continue;\n                // Considers RFC 6265 section 5.2:\n                // ...\n                // 3.  If the remaining unparsed-attributes contains a %x3B (\";\")\n                //     character:\n                // Consume the characters of the unparsed-attributes up to,\n                // not including, the first %x3B (\";\") character.\n                // ...\n                stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n            }\n            return document.cookie = name + '=' + converter.write(value, name) + stringifiedAttributes;\n        }\n        function get(name) {\n            if (typeof document === 'undefined' || arguments.length && !name) return;\n            // To prevent the for loop in the first place assign an empty array\n            // in case there are no cookies at all.\n            var cookies = document.cookie ? document.cookie.split('; ') : [];\n            var jar = {};\n            for(var i = 0; i < cookies.length; i++){\n                var parts = cookies[i].split('=');\n                var value = parts.slice(1).join('=');\n                try {\n                    var found = decodeURIComponent(parts[0]);\n                    if (!(found in jar)) jar[found] = converter.read(value, found);\n                    if (name === found) break;\n                } catch (_e) {\n                // Do nothing...\n                }\n            }\n            return name ? jar[name] : jar;\n        }\n        return Object.create({\n            set: set,\n            get: get,\n            remove: function(name, attributes) {\n                set(name, '', assign({}, attributes, {\n                    expires: -1\n                }));\n            },\n            withAttributes: function(attributes) {\n                return init(this.converter, assign({}, this.attributes, attributes));\n            },\n            withConverter: function(converter) {\n                return init(assign({}, this.converter, converter), this.attributes);\n            }\n        }, {\n            attributes: {\n                value: Object.freeze(defaultAttributes)\n            },\n            converter: {\n                value: Object.freeze(converter)\n            }\n        });\n    }\n    var api = init(defaultConverter, {\n        path: '/'\n    });\n    return api;\n});\n\n});\n\n\nparcelRegister(\"1c3wp\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $0de9a4c6f9b7d159$export$2e2bcd8739ae039);\n\nvar $5IiZx = parcelRequire(\"5IiZx\");\nvar $0de9a4c6f9b7d159$export$2e2bcd8739ae039 = ({ rejectReasons: rejectReasons, sortableUpdateUrl: sortableUpdateUrl, availableCurrencies: availableCurrencies = [], isCurrencyModalOpen: isCurrencyModalOpen = false, currencyToDelete: currencyToDelete = null, currencyUsageCount: currencyUsageCount = 0, selectedReplacementCurrency: selectedReplacementCurrency = \"\" })=>({\n        rejectReasons: // Props\n        rejectReasons,\n        sortableUpdateUrl: sortableUpdateUrl,\n        availableCurrencies: availableCurrencies,\n        // State\n        isModalOpen: false,\n        rejectReasonApplicationCount: 0,\n        selectedRejectReason: null,\n        deletedRejectReasonId: null,\n        sortableDeleteUrl: null,\n        requestInProgress: false,\n        editingSortableItemId: null,\n        isCurrencyModalOpen: // Currency migration state\n        isCurrencyModalOpen,\n        currencyToDelete: currencyToDelete,\n        currencyUsageCount: currencyUsageCount,\n        selectedReplacementCurrency: selectedReplacementCurrency,\n        init () {\n            // Watch `editingSortableItemId` value and notify others of its state\n            // This will help the Sortable instances to disable themselves based\n            // on `editingSortableItemId` value.\n            this.$watch(\"editingSortableItemId\", (value)=>{\n                this.$dispatch(\"editingSortableItem\", {\n                    value: value\n                });\n            });\n        },\n        // \"Show\" link of the inline \"added\" message: scroll to the new row and flash it\n        showCreatedItem (id) {\n            const el = document.getElementById(\"sortable-item-\" + id);\n            if (!el) return;\n            el.scrollIntoView({\n                block: \"center\",\n                behavior: \"smooth\"\n            });\n            el.classList.remove(\"row-highlight\");\n            el.offsetWidth; // restart the animation on repeated clicks\n            el.classList.add(\"row-highlight\");\n        },\n        updateSortableItem () {\n            let formDiv = document.getElementById(\"editingForm-\" + this.editingSortableItemId);\n            let inputs = [\n                ...formDiv.getElementsByTagName(\"input\"),\n                ...formDiv.getElementsByTagName(\"select\")\n            ];\n            let data = {};\n            inputs.forEach((input)=>{\n                data[input.name] = input.value;\n                data[\"id\"] = input.parentElement.parentElement.dataset.itemId;\n            });\n            // send request with ajax\n            fetch(this.sortableUpdateUrl, {\n                method: \"POST\",\n                headers: {\n                    \"X-CSRFToken\": (0, (/*@__PURE__*/$parcel$interopDefault($5IiZx))).get(\"csrftoken\"),\n                    \"Content-Type\": \"application/json\"\n                },\n                body: JSON.stringify(data)\n            }).then(async (response)=>{\n                if (!response.ok) throw new Error(\"Network response was not ok \" + response.statusText);\n                location.reload();\n            }).catch((error)=>{\n                console.error(\"Error:\", error);\n            });\n        },\n        getRejectReasonApplicationCount (rejectReasonUrl) {\n            let applicationCount = fetch(rejectReasonUrl, {\n                method: \"GET\",\n                headers: {\n                    \"Content-Type\": \"application/json\"\n                }\n            }).then(async (response)=>{\n                if (!response.ok) throw new Error(\"Network response was not ok \" + response.statusText);\n                return response.json();\n            }).then((data)=>{\n                return data.data.application_count;\n            }).catch((error)=>{\n                console.error(\"Error:\", error);\n            });\n            return applicationCount;\n        },\n        executeDeleteRejectReason (deletedRejectReasonId, newRejectReasonId) {\n            fetch(this.sortableDeleteUrl, {\n                method: \"DELETE\",\n                headers: {\n                    \"X-CSRFToken\": (0, (/*@__PURE__*/$parcel$interopDefault($5IiZx))).get(\"csrftoken\"),\n                    \"Content-Type\": \"application/json\"\n                },\n                body: JSON.stringify({\n                    deletedRejectReasonId: deletedRejectReasonId,\n                    newRejectReasonId: newRejectReasonId\n                })\n            }).then(async (response)=>{\n                if (!response.ok) throw new Error(\"Network response was not ok \" + response.statusText);\n            }).catch((error)=>{\n                console.error(\"Error:\", error);\n            });\n        },\n        async deleteRejectReason (rejectReasonUrl, sortableDeleteUrl, deletedRejectReasonId) {\n            let applicationCount = await this.getRejectReasonApplicationCount(rejectReasonUrl);\n            this.sortableDeleteUrl = sortableDeleteUrl;\n            if (applicationCount === 0) {\n                const hiddenDeleteBtn = document.getElementById(\"hiddenBtn-\" + deletedRejectReasonId);\n                if (hiddenDeleteBtn) hiddenDeleteBtn.click();\n                else // The hidden HTMX delete button is swapped out via\n                // hx-swap=\"outerHTML\" on delete/reorder, so getElementById can\n                // return null. Fall back to issuing the delete directly instead\n                // of throwing on a null `.click()`.\n                this.executeSimpleDelete(sortableDeleteUrl);\n            } else {\n                this.isModalOpen = true;\n                this.rejectReasonApplicationCount = applicationCount;\n                this.deletedRejectReasonId = deletedRejectReasonId;\n            }\n        },\n        executeSimpleDelete (sortableDeleteUrl) {\n            fetch(sortableDeleteUrl, {\n                method: \"DELETE\",\n                headers: {\n                    \"X-CSRFToken\": (0, (/*@__PURE__*/$parcel$interopDefault($5IiZx))).get(\"csrftoken\"),\n                    \"Content-Type\": \"application/json\"\n                }\n            }).then(async (response)=>{\n                if (!response.ok) throw new Error(\"Network response was not ok \" + response.statusText);\n                location.reload();\n            }).catch((error)=>{\n                console.error(\"Error:\", error);\n            });\n        },\n        confirmRejectReasonSelection () {\n            if (this.selectedRejectReason) {\n                this.executeDeleteRejectReason(this.deletedRejectReasonId, this.selectedRejectReason);\n                this.isModalOpen = false;\n                this.selectedRejectReason = null;\n                this.deletedRejectReasonId = null;\n                location.reload();\n            } else alert(\"Please select a reject reason.\");\n        },\n        // Currency migration methods\n        checkCurrencyUsage (currencyId) {\n            const usageUrl = `/organization/currencies/${currencyId}/usage/`;\n            fetch(usageUrl).then((r)=>r.json()).then((data)=>{\n                if (data.can_delete) // Direct delete - no usage\n                fetch(`/organization/currencies/${currencyId}/delete/`, {\n                    method: \"DELETE\",\n                    headers: {\n                        \"X-CSRFToken\": (0, (/*@__PURE__*/$parcel$interopDefault($5IiZx))).get(\"csrftoken\")\n                    }\n                }).then((r)=>{\n                    if (r.ok) // Success - refresh currency list\n                    htmx.ajax(\"GET\", \"/organization/currencies/\", {\n                        target: \"#currencies\",\n                        swap: \"outerHTML\"\n                    });\n                    else return r.text().then((text)=>{\n                        alert(text);\n                    });\n                }).catch((err)=>{\n                    console.error(\"Error deleting currency:\", err);\n                    alert(\"Error deleting currency. Please try again.\");\n                });\n                else {\n                    // Show migration modal\n                    this.currencyToDelete = this.availableCurrencies.find((c)=>c.id === currencyId);\n                    this.currencyUsageCount = data.total_count;\n                    this.isCurrencyModalOpen = true;\n                }\n            }).catch((err)=>{\n                console.error(\"Error checking currency usage:\", err);\n                alert(\"Error checking currency usage. Please try again.\");\n            });\n        },\n        confirmCurrencyMigration () {\n            const formData = new FormData();\n            formData.append(\"new_currency_id\", this.selectedReplacementCurrency);\n            formData.append(\"csrfmiddlewaretoken\", (0, (/*@__PURE__*/$parcel$interopDefault($5IiZx))).get(\"csrftoken\"));\n            fetch(`/organization/currencies/${this.currencyToDelete.id}/delete/`, {\n                method: \"POST\",\n                body: formData\n            }).then((r)=>{\n                if (r.ok) {\n                    // Success - refresh currency list\n                    htmx.ajax(\"GET\", \"/organization/currencies/\", {\n                        target: \"#currencies\",\n                        swap: \"outerHTML\"\n                    });\n                    this.isCurrencyModalOpen = false;\n                    this.selectedReplacementCurrency = \"\";\n                } else return r.text().then((text)=>{\n                    alert(text);\n                });\n            }).catch((err)=>{\n                console.error(\"Error migrating currency:\", err);\n                alert(\"Error migrating currency. Please try again.\");\n            });\n        }\n    });\n\n});\n\nparcelRegister(\"6ZBMV\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $5175c084def09cfa$export$2e2bcd8739ae039);\nconst $5175c084def09cfa$var$MENTION_PATTERN = /@([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+)/g;\nconst $5175c084def09cfa$var$MIRROR_STYLE_PROPS = [\n    \"fontFamily\",\n    \"fontSize\",\n    \"fontWeight\",\n    \"lineHeight\",\n    \"letterSpacing\",\n    \"wordSpacing\",\n    \"textIndent\",\n    \"paddingTop\",\n    \"paddingLeft\",\n    \"paddingRight\",\n    \"paddingBottom\",\n    \"borderTopWidth\",\n    \"borderLeftWidth\",\n    \"borderRightWidth\",\n    \"borderBottomWidth\",\n    \"boxSizing\",\n    \"tabSize\"\n];\nvar $5175c084def09cfa$export$2e2bcd8739ae039 = ({ initialVisibleToUsers: initialVisibleToUsers = [], mentionableUsers: mentionableUsers = [], possibleCSRFError: possibleCSRFError = false, postLabels: postLabels = {\n    everyone: \"Post to everyone\",\n    one: \"Post to {name}\",\n    many: \"Post to {name} and {count} more\"\n} })=>({\n        visible_to_users: initialVisibleToUsers,\n        mentionableUsers: mentionableUsers,\n        possibleCSRFError: possibleCSRFError,\n        mentionMode: false,\n        mentionQuery: \"\",\n        mentionStartIndex: -1,\n        mentionActiveIndex: 0,\n        mentionDropdownTop: 0,\n        mentionDropdownLeft: 0,\n        commentText: \"\",\n        get mentionedUsers () {\n            const matches = [\n                ...this.commentText.matchAll($5175c084def09cfa$var$MENTION_PATTERN)\n            ];\n            const emails = matches.map((m)=>m[1].toLowerCase());\n            return this.mentionableUsers.filter((u)=>emails.includes(u.email.toLowerCase()));\n        },\n        get mentionedNotInVisible () {\n            if (this.visible_to_users.length === 0) return [];\n            const visibleIds = new Set(this.visible_to_users.map((u)=>u.id));\n            return this.mentionedUsers.filter((u)=>!visibleIds.has(u.id));\n        },\n        get filteredMentions () {\n            const q = this.mentionQuery.toLowerCase();\n            if (!q) return this.mentionableUsers;\n            return this.mentionableUsers.filter((u)=>u.name.toLowerCase().includes(q) || u.email.toLowerCase().includes(q));\n        },\n        get postButtonText () {\n            const count = this.visible_to_users.length;\n            // Translated labels come from the template, e.g. \"{name} kişisine gönder\".\n            const name = this.visible_to_users[0]?.name ?? \"\";\n            if (count === 0) return postLabels.everyone;\n            if (count === 1) return postLabels.one.replace(\"{name}\", name);\n            return postLabels.many.replace(\"{name}\", name).replace(\"{count}\", count - 1);\n        },\n        getCaretCoordinates () {\n            const ta = this.$refs.commentTextarea.querySelector(\"textarea\");\n            const mirror = this.$refs.mentionMirror;\n            if (!ta || !mirror) return;\n            const style = window.getComputedStyle(ta);\n            $5175c084def09cfa$var$MIRROR_STYLE_PROPS.forEach((p)=>{\n                mirror.style[p] = style[p];\n            });\n            mirror.style.width = ta.offsetWidth + \"px\";\n            mirror.style.overflowY = \"hidden\";\n            mirror.style.whiteSpace = \"pre-wrap\";\n            mirror.style.wordWrap = \"break-word\";\n            const textBefore = ta.value.substring(0, ta.selectionStart);\n            mirror.textContent = textBefore;\n            const marker = document.createElement(\"span\");\n            marker.textContent = \"|\";\n            mirror.appendChild(marker);\n            const maxLeft = ta.offsetWidth - 288;\n            this.mentionDropdownTop = marker.offsetTop + marker.offsetHeight - ta.scrollTop;\n            this.mentionDropdownLeft = Math.max(0, Math.min(marker.offsetLeft, maxLeft));\n            mirror.textContent = \"\";\n        },\n        insertMention (user) {\n            const ta = this.$refs.commentTextarea.querySelector(\"textarea\");\n            const before = ta.value.slice(0, this.mentionStartIndex);\n            const after = ta.value.slice(ta.selectionStart);\n            const insertion = \"@\" + user.email + \" \";\n            ta.value = before + insertion + after;\n            const newCursor = before.length + insertion.length;\n            ta.setSelectionRange(newCursor, newCursor);\n            this.exitMentionMode();\n            ta.focus();\n            ta.dispatchEvent(new Event(\"input\"));\n        },\n        exitMentionMode () {\n            this.mentionMode = false;\n            this.mentionQuery = \"\";\n            this.mentionStartIndex = -1;\n            this.mentionActiveIndex = 0;\n        },\n        handleMentionInput (event) {\n            const ta = event.target;\n            const pos = ta.selectionStart;\n            const val = ta.value;\n            this.commentText = val;\n            if (!this.mentionMode) {\n                if (pos > 0 && val[pos - 1] === \"@\") {\n                    const charBefore = pos >= 2 ? val[pos - 2] : null;\n                    if (charBefore === null || charBefore === \" \" || charBefore === \"\\n\" || charBefore === \"\\r\") {\n                        this.mentionMode = true;\n                        this.mentionStartIndex = pos - 1;\n                        this.mentionQuery = \"\";\n                        this.mentionActiveIndex = 0;\n                        this.$nextTick(()=>this.getCaretCoordinates());\n                    }\n                }\n            } else {\n                if (pos <= this.mentionStartIndex) {\n                    this.exitMentionMode();\n                    return;\n                }\n                const query = val.slice(this.mentionStartIndex + 1, pos);\n                if (query.includes(\" \") || query.includes(\"\\n\")) {\n                    this.exitMentionMode();\n                    return;\n                }\n                this.mentionQuery = query;\n                this.mentionActiveIndex = Math.min(this.mentionActiveIndex, Math.max(this.filteredMentions.length - 1, 0));\n                this.$nextTick(()=>this.getCaretCoordinates());\n            }\n        },\n        scrollActiveIntoView () {\n            this.$nextTick(()=>{\n                const dropdown = this.$refs.mentionDropdown;\n                if (!dropdown) return;\n                const active = dropdown.querySelector(\"[data-mention-active]\");\n                if (active) active.scrollIntoView({\n                    block: \"nearest\"\n                });\n            });\n        },\n        handleMentionKeydown (event) {\n            if (!this.mentionMode || this.filteredMentions.length === 0) return;\n            if (event.key === \"ArrowDown\") {\n                event.preventDefault();\n                this.mentionActiveIndex = (this.mentionActiveIndex + 1) % this.filteredMentions.length;\n                this.scrollActiveIntoView();\n            } else if (event.key === \"ArrowUp\") {\n                event.preventDefault();\n                this.mentionActiveIndex = (this.mentionActiveIndex - 1 + this.filteredMentions.length) % this.filteredMentions.length;\n                this.scrollActiveIntoView();\n            } else if (event.key === \"Enter\") {\n                event.preventDefault();\n                this.insertMention(this.filteredMentions[this.mentionActiveIndex]);\n            } else if (event.key === \"Escape\") {\n                event.preventDefault();\n                this.exitMentionMode();\n            }\n        }\n    });\n\n});\n\nparcelRegister(\"eokEX\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $a7a355238de703d2$export$2e2bcd8739ae039);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n\nvar $kQKXt = parcelRequire(\"kQKXt\");\n\nvar $5S5Og = parcelRequire(\"5S5Og\");\n\nvar $fdWb7 = parcelRequire(\"fdWb7\");\n\nvar $a49L5 = parcelRequire(\"a49L5\");\n\nvar $7IEdL = parcelRequire(\"7IEdL\");\n\nvar $4ReYh = parcelRequire(\"4ReYh\");\n\nvar $ednZI = parcelRequire(\"ednZI\");\n\nvar $fXWMf = parcelRequire(\"fXWMf\");\n\nvar $1zXqe = parcelRequire(\"1zXqe\");\n\nvar $57Sxd = parcelRequire(\"57Sxd\");\n\nvar $cwcXZ = parcelRequire(\"cwcXZ\");\n\nvar $b2sVO = parcelRequire(\"b2sVO\");\n\nvar $goFHH = parcelRequire(\"goFHH\");\n\n\n\nvar $a7a355238de703d2$export$2e2bcd8739ae039 = ({ content: content, previewFillers: previewFillers = {}, usableVariables: usableVariables = [], recognizableVariables: recognizableVariables = usableVariables, imageUploadActive: imageUploadActive = false, enableHeadings: enableHeadings = false, enableColor: enableColor = false, enableHighlight: enableHighlight = false, emailColumnWidth: emailColumnWidth = 0, previewLayoutPrefix: previewLayoutPrefix = \"\", previewLayoutSuffix: previewLayoutSuffix = \"\", mjmlStamp: mjmlStamp = \"\" })=>{\n    let editor;\n    let imageResizer = null;\n    const hasMjmlStamp = (html)=>Boolean(mjmlStamp) && html.includes(mjmlStamp);\n    return {\n        updatedAt: Date.now(),\n        // A body qualifies for MJML when it starts empty or already carries the stamp.\n        // Pre-stamp rows never qualify, so old data is sent exactly as stored. No stamp = not an email editor.\n        mjmlEligible: Boolean(mjmlStamp) && (!content.trim() || hasMjmlStamp(content)),\n        previewIsMjml: false,\n        // srcs already asked for their natural width, so a broken image is probed once, not on every keystroke\n        probedImageSrcs: new Set(),\n        activeTab: \"write\",\n        previewContent: \"\",\n        previewFillers: previewFillers,\n        usableVariables: usableVariables,\n        // Superset of usableVariables: also turns saved {{ x }} text into nodes for variables the picker doesn't offer.\n        recognizableVariables: recognizableVariables,\n        isUploading: false,\n        uploadError: \"\",\n        imageUploadActive: imageUploadActive,\n        enableHeadings: enableHeadings,\n        enableColor: enableColor,\n        enableHighlight: enableHighlight,\n        // Onboarding email layout (header/footer/shell) wrapped around the preview only, never the saved body.\n        previewLayoutPrefix: previewLayoutPrefix,\n        previewLayoutSuffix: previewLayoutSuffix,\n        colorPopoverVisible: false,\n        customColorHex: \"\",\n        activeColor: null,\n        highlightPopoverVisible: false,\n        customHighlightHex: \"\",\n        activeHighlight: null,\n        linkPopoverVisible: false,\n        linkUrl: \"\",\n        linkText: \"\",\n        isEditingLink: false,\n        // Saved selection to persist across focus changes\n        savedSelectionFrom: null,\n        savedSelectionTo: null,\n        savedSelectedText: \"\",\n        init () {\n            const _this = this;\n            // Clean up any existing editor from HTMX history cache restoration\n            // When HTMX restores from cache, the DOM already has the editor content\n            // and toolbar, but Alpine re-initializes, creating duplicates\n            const existingProseMirror = this.$refs.element?.querySelector('.ProseMirror');\n            if (existingProseMirror) existingProseMirror.remove();\n            // Also clean up existing toolbar (.menu) created by x-if template\n            // Navigate up from $refs.element to find the wysiwyg-container\n            const container = this.$refs.element?.closest('.wysiwyg-container');\n            if (container) {\n                const existingMenus = container.querySelectorAll('.menu');\n                existingMenus.forEach((menu)=>menu.remove());\n            }\n            editor = new (0, $gkCGf.Editor)({\n                element: this.$refs.element,\n                extensions: [\n                    (0, $fXWMf.default).configure({\n                        bulletList: {\n                            keepMarks: true,\n                            keepAttributes: false\n                        },\n                        hardBreak: false,\n                        heading: enableHeadings ? {\n                            levels: [\n                                1,\n                                2,\n                                3\n                            ]\n                        } : false\n                    }),\n                    (0, $ednZI.default),\n                    ...(0, $goFHH.default),\n                    (0, $a49L5.default).configure({\n                        openOnClick: false\n                    }),\n                    // Extend TextAlign to use align=\"center\" attribute instead of style=\"text-align: center\"\n                    // This is more compatible with email clients and our HTML sanitizer\n                    (0, $7IEdL.default).extend({\n                        addGlobalAttributes () {\n                            return [\n                                {\n                                    types: [\n                                        \"heading\",\n                                        \"paragraph\"\n                                    ],\n                                    attributes: {\n                                        textAlign: {\n                                            default: null,\n                                            parseHTML: (element)=>element.getAttribute('align') || element.style.textAlign || null,\n                                            renderHTML: (attributes)=>{\n                                                if (!attributes.textAlign) return {};\n                                                // Use align attribute instead of inline style\n                                                return {\n                                                    align: attributes.textAlign\n                                                };\n                                            }\n                                        }\n                                    }\n                                }\n                            ];\n                        }\n                    }).configure({\n                        types: [\n                            \"heading\",\n                            \"paragraph\"\n                        ]\n                    }),\n                    (0, $fdWb7.default).configure({\n                        HTMLAttributes: {\n                            class: \"max-w-full h-auto rounded-lg shadow-xs\"\n                        },\n                        allowBase64: true,\n                        inline: true\n                    }).extend({\n                        addAttributes () {\n                            return {\n                                ...this.parent?.(),\n                                width: {\n                                    default: null,\n                                    parseHTML: (element)=>element.getAttribute('width') || element.getAttribute('data-width'),\n                                    renderHTML: (attributes)=>{\n                                        if (!attributes.width) return {};\n                                        return {\n                                            width: attributes.width,\n                                            'data-width': attributes.width\n                                        };\n                                    }\n                                },\n                                height: {\n                                    default: null,\n                                    parseHTML: (element)=>element.getAttribute('height') || element.getAttribute('data-height'),\n                                    renderHTML: (attributes)=>{\n                                        if (!attributes.height) return {};\n                                        return {\n                                            height: attributes.height,\n                                            'data-height': attributes.height\n                                        };\n                                    }\n                                },\n                                style: {\n                                    default: null,\n                                    parseHTML: (element)=>element.getAttribute('style'),\n                                    renderHTML: (attributes)=>{\n                                        if (!attributes.style) return {};\n                                        return {\n                                            style: attributes.style\n                                        };\n                                    }\n                                },\n                                class: {\n                                    default: null,\n                                    parseHTML: (element)=>element.getAttribute('class'),\n                                    renderHTML: (attributes)=>{\n                                        if (!attributes.class) return {};\n                                        return {\n                                            class: attributes.class\n                                        };\n                                    }\n                                },\n                                // Outlook's Word engine ignores `float`; this attribute is what\n                                // wraps text beside an image there. Written only for wrapped\n                                // images, see WRAP_ALIGN_ATTRIBUTES in imageResizer.\n                                align: {\n                                    default: null,\n                                    parseHTML: (element)=>element.getAttribute('align'),\n                                    renderHTML: (attributes)=>{\n                                        if (!attributes.align) return {};\n                                        return {\n                                            align: attributes.align\n                                        };\n                                    }\n                                }\n                            };\n                        },\n                        addNodeView () {\n                            return ({ node: node, HTMLAttributes: HTMLAttributes })=>{\n                                const img = document.createElement('img');\n                                // Set all attributes\n                                Object.entries(HTMLAttributes).forEach(([key, value])=>{\n                                    if (value !== null && value !== undefined) img.setAttribute(key, value);\n                                });\n                                // Apply stored dimensions if they exist\n                                if (node.attrs.width && node.attrs.height) {\n                                    img.style.width = `${node.attrs.width}px`;\n                                    img.style.height = `${node.attrs.height}px`;\n                                }\n                                return {\n                                    dom: img,\n                                    update: (updatedNode)=>{\n                                        if (updatedNode.type.name !== 'image') return false;\n                                        // Mirror every attribute, removals included: the width sweep sets\n                                        // width while clearing height and rewriting style, and a DOM that\n                                        // keeps the old values is what the MutationObserver serializes\n                                        // into the form's hidden input.\n                                        const a = updatedNode.attrs;\n                                        const sync = (name, value)=>{\n                                            if (value === null || value === undefined || value === '') img.removeAttribute(name);\n                                            else img.setAttribute(name, value);\n                                        };\n                                        sync('src', a.src);\n                                        sync('alt', a.alt);\n                                        sync('title', a.title);\n                                        sync('class', a.class);\n                                        sync('style', a.style);\n                                        sync('width', a.width);\n                                        sync('data-width', a.width);\n                                        sync('height', a.height);\n                                        sync('data-height', a.height);\n                                        if (a.width && a.height) {\n                                            img.style.width = `${a.width}px`;\n                                            img.style.height = `${a.height}px`;\n                                        }\n                                        return true;\n                                    }\n                                };\n                            };\n                        }\n                    }),\n                    (0, $57Sxd.default),\n                    (0, $1zXqe.default).configure({\n                        variables: this.usableVariables\n                    }),\n                    ...enableColor ? [\n                        (0, $4ReYh.TextStyle),\n                        (0, $kQKXt.Color)\n                    ] : [],\n                    ...enableHighlight ? [\n                        (0, $5S5Og.default).configure({\n                            multicolor: true\n                        })\n                    ] : []\n                ],\n                editorProps: {\n                    attributes: {\n                        class: \"format lg:format-lg dark:format-invert focus:outline-hidden format-blue max-w-none\"\n                    },\n                    handleDrop (view, event, slice, moved) {\n                        if (!moved && event.dataTransfer && event.dataTransfer.files && event.dataTransfer.files[0] && imageUploadActive) {\n                            const file = event.dataTransfer.files[0];\n                            if (file.type.startsWith(\"image/\")) {\n                                event.preventDefault();\n                                _this.handleImageUpload(file);\n                                return true;\n                            }\n                        }\n                        return false;\n                    },\n                    handlePaste (view, event, slice) {\n                        if (imageUploadActive) {\n                            const items = Array.from(event.clipboardData?.items || []);\n                            for (const item of items)if (item.type.startsWith(\"image/\")) {\n                                event.preventDefault();\n                                const file = item.getAsFile();\n                                _this.handleImageUpload(file);\n                                return true;\n                            }\n                        }\n                        return false;\n                    }\n                },\n                content: content,\n                onCreate ({ editor: editor }) {\n                    _this.updatedAt = Date.now();\n                    // Convert existing {{ variable_name }} text to variable nodes\n                    _this.convertExistingVariablesToNodes(editor);\n                },\n                onUpdate ({ editor: editor }) {\n                    _this.updatedAt = Date.now();\n                    _this.capEmailImageWidths();\n                },\n                onSelectionUpdate ({ editor: editor }) {\n                    _this.updatedAt = Date.now();\n                }\n            });\n            // Setup image resize functionality\n            imageResizer = (0, $cwcXZ.createImageResizer)(editor, this.$refs.element, emailColumnWidth);\n            // Setup link click handler\n            this.$refs.element.addEventListener('click', (event)=>{\n                const target = event.target.closest('a[href]');\n                if (target && editor.isEditable) {\n                    event.preventDefault();\n                    // Get the start and end positions of the link element\n                    const startPos = editor.view.posAtDOM(target, 0);\n                    const endPos = editor.view.posAtDOM(target, target.childNodes.length);\n                    // Select the entire link\n                    editor.commands.setTextSelection({\n                        from: startPos,\n                        to: endPos\n                    });\n                    // Show the popover\n                    this.showLinkPopover();\n                }\n            });\n        },\n        isLoaded () {\n            return editor;\n        },\n        isActive (type, opts = {}) {\n            return editor.isActive(type, opts);\n        },\n        toggleHeading (opts) {\n            editor.chain().toggleHeading(opts).focus().run();\n        },\n        toggleBold () {\n            editor.chain().focus().toggleBold().run();\n        },\n        toggleItalic () {\n            editor.chain().focus().toggleItalic().run();\n        },\n        toggleUnderline () {\n            editor.chain().focus().toggleUnderline().run();\n        },\n        toggleStrike () {\n            editor.chain().focus().toggleStrike().run();\n        },\n        showColorPopover () {\n            this.activeColor = editor.getAttributes(\"textStyle\").color || null;\n            this.customColorHex = this.activeColor || \"\";\n            this.colorPopoverVisible = true;\n        },\n        hideColorPopover () {\n            this.colorPopoverVisible = false;\n            this.customColorHex = \"\";\n        },\n        setColor (hex) {\n            if (!hex) return;\n            editor.chain().focus().setColor(hex).run();\n            this.activeColor = hex;\n            this.hideColorPopover();\n        },\n        unsetColor () {\n            editor.chain().focus().unsetColor().run();\n            this.activeColor = null;\n            this.hideColorPopover();\n        },\n        applyCustomColor () {\n            const raw = (this.customColorHex || \"\").trim();\n            const hex = raw.startsWith(\"#\") ? raw : `#${raw}`;\n            if (!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(hex)) return;\n            this.setColor(hex);\n        },\n        currentColor (_updatedAt) {\n            if (!editor) return null;\n            return editor.getAttributes(\"textStyle\").color || null;\n        },\n        showHighlightPopover () {\n            this.activeHighlight = editor.getAttributes(\"highlight\").color || null;\n            this.customHighlightHex = this.activeHighlight || \"\";\n            this.highlightPopoverVisible = true;\n        },\n        hideHighlightPopover () {\n            this.highlightPopoverVisible = false;\n            this.customHighlightHex = \"\";\n        },\n        setHighlight (hex) {\n            if (!hex) return;\n            // setHighlight, not toggleHighlight: picking a swatch on already-highlighted text should recolor, not clear.\n            editor.chain().focus().setHighlight({\n                color: hex\n            }).run();\n            this.activeHighlight = hex;\n            this.hideHighlightPopover();\n        },\n        unsetHighlight () {\n            editor.chain().focus().unsetHighlight().run();\n            this.activeHighlight = null;\n            this.hideHighlightPopover();\n        },\n        applyCustomHighlight () {\n            const raw = (this.customHighlightHex || \"\").trim();\n            const hex = raw.startsWith(\"#\") ? raw : `#${raw}`;\n            if (!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(hex)) return;\n            this.setHighlight(hex);\n        },\n        currentHighlight (_updatedAt) {\n            if (!editor) return null;\n            return editor.getAttributes(\"highlight\").color || null;\n        },\n        showLinkPopover () {\n            // Get the current selection or cursor position\n            const { from: from, to: to } = editor.state.selection;\n            // Try to get link attributes at the current position\n            let { href: href } = editor.getAttributes('link');\n            let selectedText = \"\";\n            let selectionFrom = from;\n            let selectionTo = to;\n            // If we don't have a link at cursor, check if we're inside a link\n            if (!href) {\n                // Look for a link mark at the current position\n                const $pos = editor.state.doc.resolve(from);\n                const marks = $pos.marks();\n                const linkMark = marks.find((mark)=>mark.type.name === 'link');\n                if (linkMark) href = linkMark.attrs.href;\n            }\n            // Get the selected text or the text content of the link\n            if (from !== to) {\n                // There's a selection\n                selectedText = editor.state.doc.textBetween(from, to);\n                selectionFrom = from;\n                selectionTo = to;\n            } else if (href) {\n                // We're at a cursor position in a link, get the full link text\n                const $pos = editor.state.doc.resolve(from);\n                const marks = $pos.marks();\n                const linkMark = marks.find((mark)=>mark.type.name === 'link');\n                if (linkMark) {\n                    // Find the range of this link\n                    let linkStart = from;\n                    let linkEnd = from;\n                    // Search backwards for link start\n                    for(let i = from - 1; i >= 0; i--){\n                        const pos = editor.state.doc.resolve(i);\n                        const posMarks = pos.marks();\n                        const hasLinkMark = posMarks.find((mark)=>mark.type.name === 'link' && mark.attrs.href === href);\n                        if (hasLinkMark) linkStart = i;\n                        else break;\n                    }\n                    // Search forwards for link end\n                    for(let i = from; i < editor.state.doc.content.size; i++){\n                        const pos = editor.state.doc.resolve(i);\n                        const posMarks = pos.marks();\n                        const hasLinkMark = posMarks.find((mark)=>mark.type.name === 'link' && mark.attrs.href === href);\n                        if (hasLinkMark) linkEnd = i + 1;\n                        else break;\n                    }\n                    selectedText = editor.state.doc.textBetween(linkStart, linkEnd);\n                    selectionFrom = linkStart;\n                    selectionTo = linkEnd;\n                }\n            }\n            // Save the selection so it persists when popover inputs are focused\n            this.savedSelectionFrom = selectionFrom;\n            this.savedSelectionTo = selectionTo;\n            this.savedSelectedText = selectedText;\n            this.linkUrl = href || \"\";\n            this.linkText = selectedText || \"\";\n            this.isEditingLink = !!href;\n            this.linkPopoverVisible = true;\n            // Focus the URL input after showing the popover\n            this.$nextTick(()=>{\n                this.$refs.linkUrlInput?.focus();\n            });\n        },\n        hideLinkPopover () {\n            this.linkPopoverVisible = false;\n            this.linkUrl = \"\";\n            this.linkText = \"\";\n            this.isEditingLink = false;\n            // Clear saved selection\n            this.savedSelectionFrom = null;\n            this.savedSelectionTo = null;\n            this.savedSelectedText = \"\";\n        },\n        applyLink () {\n            if (!this.linkUrl.trim()) return;\n            let url = this.linkUrl.trim();\n            // Add protocol if missing, but skip template variables\n            if (!url.match(/^https?:\\/\\//) && !url.match(/^\\{\\{\\s*.*\\s*\\}\\}$/)) url = 'https://' + url;\n            // Use saved selection instead of current editor selection (which may have been lost)\n            const from = this.savedSelectionFrom;\n            const to = this.savedSelectionTo;\n            const hasSelection = from !== null && to !== null && from !== to;\n            const originalText = this.savedSelectedText;\n            const newLinkText = this.linkText.trim();\n            // Restore the selection before applying changes\n            if (hasSelection) editor.chain().focus().setTextSelection({\n                from: from,\n                to: to\n            }).run();\n            else editor.chain().focus().run();\n            if (hasSelection && newLinkText && newLinkText !== originalText) // Selection exists but link text was changed - replace text and apply link\n            editor.chain().focus().deleteSelection().insertContent(`<a href=\"${url}\">${newLinkText}</a>`).run();\n            else if (hasSelection) // Selection exists and text unchanged (or empty) - just update the URL\n            editor.chain().focus().setLink({\n                href: url\n            }).run();\n            else if (newLinkText) // No selection but we have link text - insert new link\n            editor.chain().focus().insertContent(`<a href=\"${url}\">${newLinkText}</a>`).run();\n            else // No selection and no link text - try to set link (will fail gracefully if nothing selected)\n            editor.chain().focus().setLink({\n                href: url\n            }).run();\n            this.hideLinkPopover();\n        },\n        removeLink () {\n            const from = this.savedSelectionFrom;\n            const to = this.savedSelectionTo;\n            const hasSelection = from !== null && to !== null && from !== to;\n            if (hasSelection) editor.chain().focus().setTextSelection({\n                from: from,\n                to: to\n            }).unsetLink().run();\n            else editor.chain().focus().unsetLink().run();\n            this.hideLinkPopover();\n        },\n        setTextAlign (align) {\n            editor.chain().focus().setTextAlign(align).run();\n        },\n        toggleBulletList () {\n            editor.chain().focus().toggleBulletList().run();\n        },\n        toggleOrderedList () {\n            editor.chain().focus().toggleOrderedList().run();\n        },\n        toggleBlockquote () {\n            editor.chain().focus().toggleBlockquote().run();\n        },\n        setHorizontalRule () {\n            editor.chain().focus().setHorizontalRule().run();\n        },\n        insertVariable (variable) {\n            if (editor) {\n                const cleanVariable = variable.replace(/^\\s*\\{\\{\\s*/, '').replace(/\\s*\\}\\}\\s*$/, '');\n                editor.chain().focus().insertVariable(cleanVariable).run();\n            }\n        },\n        handleContentImported () {\n            if (editor) this.convertExistingVariablesToNodes(editor);\n        },\n        convertExistingVariablesToNodes (editor) {\n            if (!editor || !this.recognizableVariables.length) return;\n            // Process the document in multiple passes to avoid position conflicts\n            let hasChanges = true;\n            while(hasChanges){\n                hasChanges = false;\n                const { state: state } = editor;\n                const { doc: doc } = state;\n                let tr = state.tr;\n                // Find the first text node with a variable pattern\n                doc.descendants((node, pos)=>{\n                    if (hasChanges) return false; // Skip if we already found one to replace\n                    if (node.isText && node.text) {\n                        const text = node.text;\n                        const variableRegex = /\\{\\{\\s*(\\w+)\\s*\\}\\}/;\n                        const match = variableRegex.exec(text);\n                        if (match) {\n                            const fullMatch = match[0];\n                            const variableName = match[1];\n                            // Check if this is a valid variable\n                            if (this.recognizableVariables.some((v)=>v.replace(/^\\s*\\{\\{\\s*/, '').replace(/\\s*\\}\\}\\s*$/, '') === variableName)) {\n                                const from = pos + match.index;\n                                const to = pos + match.index + fullMatch.length;\n                                tr = tr.replaceWith(from, to, editor.schema.nodes.variable.create({\n                                    variable: variableName\n                                }));\n                                hasChanges = true;\n                                editor.view.dispatch(tr);\n                                return false; // Stop iteration\n                            }\n                        }\n                    }\n                });\n            }\n        },\n        insertImageFromFile () {\n            const input = document.createElement(\"input\");\n            input.type = \"file\";\n            input.accept = \"image/*\";\n            input.onchange = (e)=>{\n                const file = e.target.files?.[0];\n                if (file) this.handleImageUpload(file);\n            };\n            input.click();\n        },\n        handleImageUpload (file) {\n            if (!file.type.startsWith(\"image/\")) {\n                this.uploadError = \"Please select an image file\";\n                setTimeout(()=>{\n                    this.uploadError = \"\";\n                }, 3000);\n                return;\n            }\n            const maxSize = 5242880;\n            if (file.size > maxSize) {\n                this.uploadError = \"Image size must be less than 5MB\";\n                setTimeout(()=>{\n                    this.uploadError = \"\";\n                }, 3000);\n                return;\n            }\n            this.isUploading = true;\n            this.uploadError = \"\";\n            // Create a temporary form to use HTMX for the upload\n            const tempForm = document.createElement(\"form\");\n            tempForm.style.display = \"none\";\n            tempForm.setAttribute(\"enctype\", \"multipart/form-data\");\n            const formData = new FormData();\n            formData.append(\"image\", file);\n            // Convert FormData to form inputs\n            for (let [key, value] of formData.entries())if (value instanceof File) {\n                const input = document.createElement(\"input\");\n                input.type = \"file\";\n                input.name = key;\n                input.files = this.createFileList(value);\n                tempForm.appendChild(input);\n            } else {\n                const input = document.createElement(\"input\");\n                input.type = \"hidden\";\n                input.name = key;\n                input.value = value;\n                tempForm.appendChild(input);\n            }\n            document.body.appendChild(tempForm);\n            // Set up event listeners for HTMX response\n            const handleSuccess = (evt)=>{\n                if (evt.detail.elt === tempForm) {\n                    try {\n                        const data = JSON.parse(evt.detail.xhr.responseText);\n                        if (data.success) {\n                            // Outlook has no max-width, so a real width attribute is the only\n                            // cap it honours. Only for editors whose output is emailed, only\n                            // when the upload reported a size, and never upscaling: a small\n                            // logo keeps its own width.\n                            // Own line, left: a style-less image would sit in the text line,\n                            // which is never what someone who just pasted a picture wants.\n                            const attrs = {\n                                src: data.url,\n                                alt: file.name,\n                                style: (0, $cwcXZ.IMAGE_ALIGNMENT_STYLES).left\n                            };\n                            if (emailColumnWidth && data.width) attrs.width = Math.min(data.width, emailColumnWidth);\n                            editor.chain().focus().setImage(attrs).run();\n                        } else {\n                            this.uploadError = data.error || \"Upload failed\";\n                            setTimeout(()=>{\n                                this.uploadError = \"\";\n                            }, 5000);\n                        }\n                    } catch (error) {\n                        console.error(\"Upload error:\", error);\n                        this.uploadError = \"Failed to parse response\";\n                        setTimeout(()=>{\n                            this.uploadError = \"\";\n                        }, 5000);\n                    }\n                    cleanup();\n                }\n            };\n            const handleError = (evt)=>{\n                if (evt.detail.elt === tempForm) {\n                    console.error(\"Upload error:\", evt.detail);\n                    this.uploadError = \"Network error during upload\";\n                    setTimeout(()=>{\n                        this.uploadError = \"\";\n                    }, 5000);\n                    cleanup();\n                }\n            };\n            const cleanup = ()=>{\n                this.isUploading = false;\n                document.removeEventListener(\"htmx:afterRequest\", handleSuccess);\n                document.removeEventListener(\"htmx:responseError\", handleError);\n                if (document.body.contains(tempForm)) document.body.removeChild(tempForm);\n            };\n            // Add event listeners\n            document.addEventListener(\"htmx:afterRequest\", handleSuccess);\n            document.addEventListener(\"htmx:responseError\", handleError);\n            // Use HTMX to submit the form\n            htmx.ajax(\"POST\", \"/shared/upload-image/\", {\n                source: tempForm,\n                swap: \"none\"\n            });\n        },\n        createFileList (file) {\n            const dt = new DataTransfer();\n            dt.items.add(file);\n            return dt.files;\n        },\n        // Import HTML and paste bypass the upload callback, so their images arrive\n        // without the width attribute Outlook needs, or with one wider than the\n        // column. After every change, an email image with no width gets\n        // min(natural width, column) once the browser has it, and a wider one is\n        // capped. Inline width/height go with it: in Outlook the inline size wins.\n        capEmailImageWidths () {\n            if (!emailColumnWidth || !editor) return;\n            // The decision table lives in emailImageWidth.js, one cell per\n            // attribute x inline-width combination, mirrored by the backfill command.\n            const sized = (node, width)=>({\n                    ...node.attrs,\n                    width: width,\n                    height: null,\n                    style: (0, $b2sVO.stripSizeDeclarations)(node.attrs.style)\n                });\n            // Capping is per node, in one transaction: two copies of one src may carry different widths.\n            const tr = editor.state.tr;\n            let changed = false;\n            const probes = new Set();\n            editor.state.doc.descendants((node, pos)=>{\n                if (node.type.name !== \"image\" || !node.attrs.src) return;\n                const decision = (0, $b2sVO.decideEmailImageWidth)(node.attrs.width, node.attrs.style, emailColumnWidth);\n                if (decision.action === \"set\") {\n                    tr.setNodeMarkup(pos, undefined, sized(node, decision.width));\n                    changed = true;\n                } else if (decision.action === \"probe\" && !this.probedImageSrcs.has(node.attrs.src)) probes.add(node.attrs.src);\n            });\n            if (changed) editor.view.dispatch(tr);\n            // The natural width arrives later, so it is applied by src, and only to the\n            // copies that still have no width by then.\n            for (const src of probes){\n                this.probedImageSrcs.add(src);\n                const probe = new window.Image();\n                probe.onload = ()=>{\n                    if (!probe.naturalWidth) return;\n                    const width = Math.min(probe.naturalWidth, emailColumnWidth);\n                    const later = editor.state.tr;\n                    let any = false;\n                    editor.state.doc.descendants((node, pos)=>{\n                        if (node.type.name !== \"image\" || node.attrs.src !== src) return;\n                        if ((0, $b2sVO.decideEmailImageWidth)(node.attrs.width, node.attrs.style, emailColumnWidth).action !== \"probe\") return;\n                        later.setNodeMarkup(pos, undefined, sized(node, width));\n                        any = true;\n                    });\n                    if (any) editor.view.dispatch(later);\n                };\n                probe.src = src;\n            }\n        },\n        // Set content from external source (e.g., when switching from GrapeJS editor)\n        setContent (html) {\n            if (!editor) return;\n            // Set the content in TipTap editor\n            editor.commands.setContent(html, false);\n            // New content, new images: measure them even if an earlier template used the same URLs.\n            this.probedImageSrcs.clear();\n            this.capEmailImageWidths();\n            // Convert any {{ variable }} text patterns to variable nodes\n            this.convertExistingVariablesToNodes(editor);\n            // Loaded templates carry their own verdict; the editor drops the comment, so read it here.\n            this.mjmlEligible = hasMjmlStamp(html);\n            // Trigger update\n            this.updatedAt = Date.now();\n        },\n        // Import HTML: whatever it carried, the body now goes out as pasted, never through MJML.\n        importContent (html) {\n            this.setContent(html);\n            this.mjmlEligible = false;\n        },\n        getRawHTML () {\n            // Get raw HTML for saving to database - convert variable nodes back to clean {{ variable_name }} format\n            if (!editor) return \"\";\n            let html = editor.getHTML();\n            // Parse HTML to DOM for proper manipulation\n            const parser = new DOMParser();\n            const doc = parser.parseFromString(html, \"text/html\");\n            // Normalize paragraph spacing for email clients\n            const paragraphs = doc.querySelectorAll('p');\n            paragraphs.forEach((p)=>{\n                // Add <br> to empty paragraphs for proper email rendering\n                if (!p.textContent.trim() && p.childNodes.length === 0) p.innerHTML = '<br>';\n                // Add inline CSS to normalize spacing across email clients\n                const existingStyle = p.getAttribute('style') || '';\n                const emailResetStyle = 'margin: 0; padding: 0; line-height: 1.5;';\n                // Merge existing styles with email reset styles\n                if (existingStyle) {\n                    // If there are existing styles, merge them (email reset takes precedence for spacing)\n                    const combinedStyle = existingStyle.replace(/margin[^;]*;?/gi, '').replace(/padding[^;]*;?/gi, '').replace(/line-height[^;]*;?/gi, '');\n                    p.setAttribute('style', emailResetStyle + ' ' + combinedStyle.trim());\n                } else p.setAttribute('style', emailResetStyle);\n            });\n            // Find all variable spans and replace them with their data-variable values\n            const variableSpans = doc.querySelectorAll('span.wysiwyg-variable[data-variable]');\n            variableSpans.forEach((span)=>{\n                const variableValue = span.getAttribute('data-variable');\n                if (variableValue) {\n                    const textNode = doc.createTextNode(`{{ ${variableValue} }}`);\n                    span.parentNode.replaceChild(textNode, span);\n                }\n            });\n            // Auto-wrap {{ link }} variables with <a> tags for better email rendering\n            let htmlContent = doc.body.innerHTML;\n            // More robust link wrapping: only wrap {{ link }} that aren't already in <a> tags\n            const linkPattern = /\\{\\{\\s*link\\s*\\}\\}/g;\n            const matches = [\n                ...htmlContent.matchAll(linkPattern)\n            ];\n            // Process matches in reverse order to avoid position shifts\n            for (const match of matches.reverse()){\n                const start = match.index;\n                const end = start + match[0].length;\n                const beforeText = htmlContent.substring(0, start);\n                const afterText = htmlContent.substring(end);\n                // Check if we're inside an existing <a> tag\n                const lastAOpen = beforeText.lastIndexOf('<a ');\n                const lastAClose = beforeText.lastIndexOf('</a>');\n                const isInsideATag = lastAOpen > lastAClose && lastAOpen !== -1;\n                // Check if this is part of href=\"{{ link }}\"\n                const isInHref = beforeText.endsWith('href=\"') && afterText.startsWith('\"');\n                // Only wrap if not already inside an <a> tag and not in href attribute\n                if (!isInsideATag && !isInHref) {\n                    const wrappedLink = '<a href=\"{{ link }}\">{{ link }}</a>';\n                    htmlContent = beforeText + wrappedLink + afterText;\n                }\n            }\n            return this.mjmlEligible && htmlContent ? mjmlStamp + htmlContent : htmlContent;\n        },\n        async renderPreview () {\n            this.previewIsMjml = this.mjmlEligible;\n            if (!this.previewIsMjml) {\n                this.previewContent = this.getContent();\n                return;\n            }\n            let body;\n            try {\n                body = await this.compileMjml(this.getPreviewBody());\n            } catch (error) {\n                // A broken compiler must not leave the preview empty; fall back to the plain one.\n                console.warn(\"wysiwyg.mjml_preview.failed\", error);\n                this.previewIsMjml = false;\n                this.previewContent = this.getContent();\n                return;\n            }\n            this.previewContent = this.previewLayoutPrefix ? this.previewLayoutPrefix + body + this.previewLayoutSuffix : body;\n        },\n        // Browser-only: the server still sends the stored HTML untouched.\n        // Both modules load on first preview only, so the 3MB compiler stays out of the page bundle.\n        async compileMjml (html) {\n            const [{ htmlToMjml: htmlToMjml }, mjmlModule] = await Promise.all([\n                (parcelRequire(\"clziF\")),\n                (parcelRequire(\"h8GB1\"))\n            ]);\n            // Parcel hands the UMD bundle over as module.exports itself, so there is no `default`.\n            const mjml2html = typeof mjmlModule === \"function\" ? mjmlModule : mjmlModule.default;\n            const { html: compiled, errors: errors = [] } = await mjml2html(htmlToMjml(html), {\n                validationLevel: \"soft\"\n            });\n            if (errors.length) console.warn(\"wysiwyg.mjml_preview\", errors);\n            // Keep MJML's <style> blocks next to its body so the layout wrap can go around it.\n            const doc = new DOMParser().parseFromString(compiled, \"text/html\");\n            const styles = [\n                ...doc.head.querySelectorAll(\"style\")\n            ].map((style)=>style.outerHTML).join(\"\");\n            return styles + doc.body.innerHTML;\n        },\n        getContent () {\n            let finalContent = this.getPreviewBody();\n            // Wrap with the onboarding email layout so the preview mirrors the actually-sent email.\n            if (this.previewLayoutPrefix) finalContent = this.previewLayoutPrefix + finalContent + this.previewLayoutSuffix;\n            return finalContent;\n        },\n        getPreviewBody () {\n            // Local, not this.previewContent: the MJML path awaits after this, and Alpine would render the scratch value.\n            const parser = new DOMParser();\n            const doc = parser.parseFromString(editor ? editor.getHTML() : \"\", \"text/html\");\n            const childrenToReturn = [];\n            const children = doc.body.children;\n            // well, we can't forEach this, we gotta use a for loop\n            for(let i = 0; i < children.length; i++){\n                const child = children[i];\n                // each child is a node, a html node, we can use the tagName property to get the type of the node\n                // Images are inline, so an image-only paragraph has empty textContent - don't treat it as blank.\n                if (child.tagName === \"P\" && !child.textContent && !child.querySelector(\"img\")) {\n                    // For empty paragraphs in preview, use simple br instead of ProseMirror trailing break\n                    child.innerHTML = '<br>';\n                    childrenToReturn.push(child);\n                } else {\n                    // Handle images for preview mode\n                    this.processImagesForPreview(child);\n                    // Handle variables for preview mode\n                    this.processVariablesForPreview(child);\n                    childrenToReturn.push(child);\n                }\n            }\n            // Convert back to string and replace variables with styled spans for preview\n            let finalContent = childrenToReturn.map((child)=>child.outerHTML).join(\"\");\n            // Replace {{ variable_name }} with styled spans for preview\n            return this.replaceVariablesForPreview(finalContent);\n        },\n        processImagesForPreview (element) {\n            // Find all images in the current element and its children\n            const images = element.tagName === \"IMG\" ? [\n                element\n            ] : element.querySelectorAll('img');\n            images.forEach((img)=>{\n                // Just add basic responsive constraints - don't touch anything else!\n                img.classList.add('wysiwyg-preview-image');\n            });\n        },\n        processVariablesForPreview (element) {\n            // Find all variable nodes in the current element and its children\n            const variables = element.classList && element.classList.contains('wysiwyg-variable') ? [\n                element\n            ] : element.querySelectorAll('.wysiwyg-variable[data-variable]');\n            variables.forEach((variable)=>{\n                const variableName = variable.getAttribute('data-variable');\n                // Remove variable styling classes to unstyled variables in preview\n                variable.classList.remove('wysiwyg-variable');\n                variable.removeAttribute('data-variable');\n                if (variableName && this.previewFillers[variableName]) // Replace the entire variable node content with the preview value\n                variable.innerHTML = this.previewFillers[variableName];\n                else // Keep the original {{ variable_name }} format but without styling\n                variable.innerHTML = `{{ ${variableName} }}`;\n            });\n        },\n        replaceVariablesForPreview (content) {\n            // Replace {{ variable_name }} with styled spans\n            return content.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (_, variableName)=>{\n                const previewValue = this.previewFillers[variableName] || `{{ ${variableName} }}`;\n                return previewValue;\n            });\n        },\n        destroy () {\n            if (imageResizer) {\n                imageResizer.destroy();\n                imageResizer = null;\n            }\n            if (editor) {\n                editor.destroy();\n                editor = null;\n            }\n        }\n    };\n};\n\n});\nparcelRegister(\"gkCGf\", function(module, exports) {\n\n$parcel$export(module.exports, \"getExtensionField\", () => $be3c84bcbbb2383c$export$f73578b718a57eaa);\n$parcel$export(module.exports, \"mergeAttributes\", () => $be3c84bcbbb2383c$export$9f98db6234c4bd78);\n$parcel$export(module.exports, \"callOrReturn\", () => $be3c84bcbbb2383c$export$592682234826c0bd);\n$parcel$export(module.exports, \"Mark\", () => $be3c84bcbbb2383c$export$c9d15bcfc6d42044);\n$parcel$export(module.exports, \"Extension\", () => $be3c84bcbbb2383c$export$eeddbf09bb970356);\n$parcel$export(module.exports, \"combineTransactionSteps\", () => $be3c84bcbbb2383c$export$f945f1716a5df33d);\n$parcel$export(module.exports, \"findChildrenInRange\", () => $be3c84bcbbb2383c$export$6a2a251dde98a23);\n$parcel$export(module.exports, \"getAttributes\", () => $be3c84bcbbb2383c$export$fe94072fee8a6976);\n$parcel$export(module.exports, \"getChangedRanges\", () => $be3c84bcbbb2383c$export$ba396fc65ff2f439);\n$parcel$export(module.exports, \"getMarksBetween\", () => $be3c84bcbbb2383c$export$c5fd7af7c5c1efa);\n$parcel$export(module.exports, \"isNodeSelection\", () => $be3c84bcbbb2383c$export$a8c1d2c13abf8822);\n$parcel$export(module.exports, \"Editor\", () => $be3c84bcbbb2383c$export$7cda8d932e2f33c0);\n$parcel$export(module.exports, \"markInputRule\", () => $be3c84bcbbb2383c$export$9f2cb743ab9131de);\n$parcel$export(module.exports, \"nodeInputRule\", () => $be3c84bcbbb2383c$export$6ca56856dfeaf9b6);\n$parcel$export(module.exports, \"textblockTypeInputRule\", () => $be3c84bcbbb2383c$export$cc081314d3f6ffb0);\n$parcel$export(module.exports, \"wrappingInputRule\", () => $be3c84bcbbb2383c$export$f7316d89abe4e1c1);\n$parcel$export(module.exports, \"Node\", () => $be3c84bcbbb2383c$export$85c928794f8d04d4);\n$parcel$export(module.exports, \"markPasteRule\", () => $be3c84bcbbb2383c$export$3845eb97abe74944);\n$parcel$export(module.exports, \"canInsertNode\", () => $be3c84bcbbb2383c$export$d23217284a0e83b9);\n$parcel$export(module.exports, \"escapeForRegEx\", () => $be3c84bcbbb2383c$export$d3f82eb9fcc60fbc);\nparcelRequire(\"7fRs0\");\nvar $1LeRC = parcelRequire(\"1LeRC\");\nparcelRequire(\"cXOg4\");\nvar $edQEX = parcelRequire(\"edQEX\");\nparcelRequire(\"euyQd\");\nvar $18HhN = parcelRequire(\"18HhN\");\nparcelRequire(\"k43Nl\");\nvar $1krlL = parcelRequire(\"1krlL\");\nparcelRequire(\"jV6wh\");\nvar $gfgdn = parcelRequire(\"gfgdn\");\nparcelRequire(\"cJglX\");\nvar $9D0ij = parcelRequire(\"9D0ij\");\nparcelRequire(\"jP8IL\");\nvar $ie1jF = parcelRequire(\"ie1jF\");\n/**\n * Takes a Transaction & Editor State and turns it into a chainable state object\n * @param config The transaction and state to create the chainable state from\n * @returns A chainable Editor state object\n */ function $be3c84bcbbb2383c$export$83e24c5933427696(config) {\n    const { state: state, transaction: transaction } = config;\n    let { selection: selection } = transaction;\n    let { doc: doc } = transaction;\n    let { storedMarks: storedMarks } = transaction;\n    return {\n        ...state,\n        apply: state.apply.bind(state),\n        applyTransaction: state.applyTransaction.bind(state),\n        plugins: state.plugins,\n        schema: state.schema,\n        reconfigure: state.reconfigure.bind(state),\n        toJSON: state.toJSON.bind(state),\n        get storedMarks () {\n            return storedMarks;\n        },\n        get selection () {\n            return selection;\n        },\n        get doc () {\n            return doc;\n        },\n        get tr () {\n            selection = transaction.selection;\n            doc = transaction.doc;\n            storedMarks = transaction.storedMarks;\n            return transaction;\n        }\n    };\n}\nclass $be3c84bcbbb2383c$export$475014de15a4c342 {\n    constructor(props){\n        this.editor = props.editor;\n        this.rawCommands = this.editor.extensionManager.commands;\n        this.customState = props.state;\n    }\n    get hasCustomState() {\n        return !!this.customState;\n    }\n    get state() {\n        return this.customState || this.editor.state;\n    }\n    get commands() {\n        const { rawCommands: rawCommands, editor: editor, state: state } = this;\n        const { view: view } = editor;\n        const { tr: tr } = state;\n        const props = this.buildProps(tr);\n        return Object.fromEntries(Object.entries(rawCommands).map(([name, command])=>{\n            const method = (...args)=>{\n                const callback = command(...args)(props);\n                if (!tr.getMeta('preventDispatch') && !this.hasCustomState) view.dispatch(tr);\n                return callback;\n            };\n            return [\n                name,\n                method\n            ];\n        }));\n    }\n    get chain() {\n        return ()=>this.createChain();\n    }\n    get can() {\n        return ()=>this.createCan();\n    }\n    createChain(startTr, shouldDispatch = true) {\n        const { rawCommands: rawCommands, editor: editor, state: state } = this;\n        const { view: view } = editor;\n        const callbacks = [];\n        const hasStartTransaction = !!startTr;\n        const tr = startTr || state.tr;\n        const run = ()=>{\n            if (!hasStartTransaction && shouldDispatch && !tr.getMeta('preventDispatch') && !this.hasCustomState) view.dispatch(tr);\n            return callbacks.every((callback)=>callback === true);\n        };\n        const chain = {\n            ...Object.fromEntries(Object.entries(rawCommands).map(([name, command])=>{\n                const chainedCommand = (...args)=>{\n                    const props = this.buildProps(tr, shouldDispatch);\n                    const callback = command(...args)(props);\n                    callbacks.push(callback);\n                    return chain;\n                };\n                return [\n                    name,\n                    chainedCommand\n                ];\n            })),\n            run: run\n        };\n        return chain;\n    }\n    createCan(startTr) {\n        const { rawCommands: rawCommands, state: state } = this;\n        const dispatch = false;\n        const tr = startTr || state.tr;\n        const props = this.buildProps(tr, dispatch);\n        const formattedCommands = Object.fromEntries(Object.entries(rawCommands).map(([name, command])=>{\n            return [\n                name,\n                (...args)=>command(...args)({\n                        ...props,\n                        dispatch: undefined\n                    })\n            ];\n        }));\n        return {\n            ...formattedCommands,\n            chain: ()=>this.createChain(tr, dispatch)\n        };\n    }\n    buildProps(tr, shouldDispatch = true) {\n        const { rawCommands: rawCommands, editor: editor, state: state } = this;\n        const { view: view } = editor;\n        const props = {\n            tr: tr,\n            editor: editor,\n            view: view,\n            state: $be3c84bcbbb2383c$export$83e24c5933427696({\n                state: state,\n                transaction: tr\n            }),\n            dispatch: shouldDispatch ? ()=>undefined : undefined,\n            chain: ()=>this.createChain(tr, shouldDispatch),\n            can: ()=>this.createCan(tr),\n            get commands () {\n                return Object.fromEntries(Object.entries(rawCommands).map(([name, command])=>{\n                    return [\n                        name,\n                        (...args)=>command(...args)(props)\n                    ];\n                }));\n            }\n        };\n        return props;\n    }\n}\nclass $be3c84bcbbb2383c$var$EventEmitter {\n    constructor(){\n        this.callbacks = {};\n    }\n    on(event, fn) {\n        if (!this.callbacks[event]) this.callbacks[event] = [];\n        this.callbacks[event].push(fn);\n        return this;\n    }\n    emit(event, ...args) {\n        const callbacks = this.callbacks[event];\n        if (callbacks) callbacks.forEach((callback)=>callback.apply(this, args));\n        return this;\n    }\n    off(event, fn) {\n        const callbacks = this.callbacks[event];\n        if (callbacks) {\n            if (fn) this.callbacks[event] = callbacks.filter((callback)=>callback !== fn);\n            else delete this.callbacks[event];\n        }\n        return this;\n    }\n    once(event, fn) {\n        const onceFn = (...args)=>{\n            this.off(event, onceFn);\n            fn.apply(this, args);\n        };\n        return this.on(event, onceFn);\n    }\n    removeAllListeners() {\n        this.callbacks = {};\n    }\n}\n/**\n * Returns a field from an extension\n * @param extension The Tiptap extension\n * @param field The field, for example `renderHTML` or `priority`\n * @param context The context object that should be passed as `this` into the function\n * @returns The field value\n */ function $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, field, context) {\n    if (extension.config[field] === undefined && extension.parent) return $be3c84bcbbb2383c$export$f73578b718a57eaa(extension.parent, field, context);\n    if (typeof extension.config[field] === 'function') {\n        const value = extension.config[field].bind({\n            ...context,\n            parent: extension.parent ? $be3c84bcbbb2383c$export$f73578b718a57eaa(extension.parent, field, context) : null\n        });\n        return value;\n    }\n    return extension.config[field];\n}\nfunction $be3c84bcbbb2383c$export$36e8c2990da8266f(extensions) {\n    const baseExtensions = extensions.filter((extension)=>extension.type === 'extension');\n    const nodeExtensions = extensions.filter((extension)=>extension.type === 'node');\n    const markExtensions = extensions.filter((extension)=>extension.type === 'mark');\n    return {\n        baseExtensions: baseExtensions,\n        nodeExtensions: nodeExtensions,\n        markExtensions: markExtensions\n    };\n}\n/**\n * Get a list of all extension attributes defined in `addAttribute` and `addGlobalAttribute`.\n * @param extensions List of extensions\n */ function $be3c84bcbbb2383c$export$6e54e3e69d60df3d(extensions) {\n    const extensionAttributes = [];\n    const { nodeExtensions: nodeExtensions, markExtensions: markExtensions } = $be3c84bcbbb2383c$export$36e8c2990da8266f(extensions);\n    const nodeAndMarkExtensions = [\n        ...nodeExtensions,\n        ...markExtensions\n    ];\n    const defaultAttribute = {\n        default: null,\n        rendered: true,\n        renderHTML: null,\n        parseHTML: null,\n        keepOnSplit: true,\n        isRequired: false\n    };\n    extensions.forEach((extension)=>{\n        const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage,\n            extensions: nodeAndMarkExtensions\n        };\n        const addGlobalAttributes = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addGlobalAttributes', context);\n        if (!addGlobalAttributes) return;\n        const globalAttributes = addGlobalAttributes();\n        globalAttributes.forEach((globalAttribute)=>{\n            globalAttribute.types.forEach((type)=>{\n                Object.entries(globalAttribute.attributes).forEach(([name, attribute])=>{\n                    extensionAttributes.push({\n                        type: type,\n                        name: name,\n                        attribute: {\n                            ...defaultAttribute,\n                            ...attribute\n                        }\n                    });\n                });\n            });\n        });\n    });\n    nodeAndMarkExtensions.forEach((extension)=>{\n        const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage\n        };\n        const addAttributes = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addAttributes', context);\n        if (!addAttributes) return;\n        // TODO: remove `as Attributes`\n        const attributes = addAttributes();\n        Object.entries(attributes).forEach(([name, attribute])=>{\n            const mergedAttr = {\n                ...defaultAttribute,\n                ...attribute\n            };\n            if (typeof (mergedAttr === null || mergedAttr === void 0 ? void 0 : mergedAttr.default) === 'function') mergedAttr.default = mergedAttr.default();\n            if ((mergedAttr === null || mergedAttr === void 0 ? void 0 : mergedAttr.isRequired) && (mergedAttr === null || mergedAttr === void 0 ? void 0 : mergedAttr.default) === undefined) delete mergedAttr.default;\n            extensionAttributes.push({\n                type: extension.name,\n                name: name,\n                attribute: mergedAttr\n            });\n        });\n    });\n    return extensionAttributes;\n}\nfunction $be3c84bcbbb2383c$export$d168cba70360dd3d(nameOrType, schema) {\n    if (typeof nameOrType === 'string') {\n        if (!schema.nodes[nameOrType]) throw Error(`There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`);\n        return schema.nodes[nameOrType];\n    }\n    return nameOrType;\n}\nfunction $be3c84bcbbb2383c$export$9f98db6234c4bd78(...objects) {\n    return objects.filter((item)=>!!item).reduce((items, item)=>{\n        const mergedAttributes = {\n            ...items\n        };\n        Object.entries(item).forEach(([key, value])=>{\n            const exists = mergedAttributes[key];\n            if (!exists) {\n                mergedAttributes[key] = value;\n                return;\n            }\n            if (key === 'class') {\n                const valueClasses = value ? String(value).split(' ') : [];\n                const existingClasses = mergedAttributes[key] ? mergedAttributes[key].split(' ') : [];\n                const insertClasses = valueClasses.filter((valueClass)=>!existingClasses.includes(valueClass));\n                mergedAttributes[key] = [\n                    ...existingClasses,\n                    ...insertClasses\n                ].join(' ');\n            } else if (key === 'style') {\n                const newStyles = value ? value.split(';').map((style)=>style.trim()).filter(Boolean) : [];\n                const existingStyles = mergedAttributes[key] ? mergedAttributes[key].split(';').map((style)=>style.trim()).filter(Boolean) : [];\n                const styleMap = new Map();\n                existingStyles.forEach((style)=>{\n                    const [property, val] = style.split(':').map((part)=>part.trim());\n                    styleMap.set(property, val);\n                });\n                newStyles.forEach((style)=>{\n                    const [property, val] = style.split(':').map((part)=>part.trim());\n                    styleMap.set(property, val);\n                });\n                mergedAttributes[key] = Array.from(styleMap.entries()).map(([property, val])=>`${property}: ${val}`).join('; ');\n            } else mergedAttributes[key] = value;\n        });\n        return mergedAttributes;\n    }, {});\n}\nfunction $be3c84bcbbb2383c$export$bc79d84a417d7b02(nodeOrMark, extensionAttributes) {\n    return extensionAttributes.filter((attribute)=>attribute.type === nodeOrMark.type.name).filter((item)=>item.attribute.rendered).map((item)=>{\n        if (!item.attribute.renderHTML) return {\n            [item.name]: nodeOrMark.attrs[item.name]\n        };\n        return item.attribute.renderHTML(nodeOrMark.attrs) || {};\n    }).reduce((attributes, attribute)=>$be3c84bcbbb2383c$export$9f98db6234c4bd78(attributes, attribute), {});\n}\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nfunction $be3c84bcbbb2383c$export$f6e2535fb5126e54(value) {\n    return typeof value === 'function';\n}\n/**\n * Optionally calls `value` as a function.\n * Otherwise it is returned directly.\n * @param value Function or any value.\n * @param context Optional context to bind to function.\n * @param props Optional props to pass to function.\n */ function $be3c84bcbbb2383c$export$592682234826c0bd(value, context, ...props) {\n    if ($be3c84bcbbb2383c$export$f6e2535fb5126e54(value)) {\n        if (context) return value.bind(context)(...props);\n        return value(...props);\n    }\n    return value;\n}\nfunction $be3c84bcbbb2383c$export$83b788b1a3698c03(value = {}) {\n    return Object.keys(value).length === 0 && value.constructor === Object;\n}\nfunction $be3c84bcbbb2383c$export$3004f64547af360e(value) {\n    if (typeof value !== 'string') return value;\n    if (value.match(/^[+-]?(?:\\d*\\.)?\\d+$/)) return Number(value);\n    if (value === 'true') return true;\n    if (value === 'false') return false;\n    return value;\n}\n/**\n * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`).\n * Cancels when `getAttrs` returned `false`.\n * @param parseRule ProseMirror ParseRule\n * @param extensionAttributes List of attributes to inject\n */ function $be3c84bcbbb2383c$export$7ce6b571718439ec(parseRule, extensionAttributes) {\n    if ('style' in parseRule) return parseRule;\n    return {\n        ...parseRule,\n        getAttrs: (node)=>{\n            const oldAttributes = parseRule.getAttrs ? parseRule.getAttrs(node) : parseRule.attrs;\n            if (oldAttributes === false) return false;\n            const newAttributes = extensionAttributes.reduce((items, item)=>{\n                const value = item.attribute.parseHTML ? item.attribute.parseHTML(node) : $be3c84bcbbb2383c$export$3004f64547af360e(node.getAttribute(item.name));\n                if (value === null || value === undefined) return items;\n                return {\n                    ...items,\n                    [item.name]: value\n                };\n            }, {});\n            return {\n                ...oldAttributes,\n                ...newAttributes\n            };\n        }\n    };\n}\nfunction $be3c84bcbbb2383c$var$cleanUpSchemaItem(data) {\n    return Object.fromEntries(// @ts-ignore\n    Object.entries(data).filter(([key, value])=>{\n        if (key === 'attrs' && $be3c84bcbbb2383c$export$83b788b1a3698c03(value)) return false;\n        return value !== null && value !== undefined;\n    }));\n}\n/**\n * Creates a new Prosemirror schema based on the given extensions.\n * @param extensions An array of Tiptap extensions\n * @param editor The editor instance\n * @returns A Prosemirror schema\n */ function $be3c84bcbbb2383c$export$71bc12a97b59a858(extensions, editor) {\n    var _a;\n    const allAttributes = $be3c84bcbbb2383c$export$6e54e3e69d60df3d(extensions);\n    const { nodeExtensions: nodeExtensions, markExtensions: markExtensions } = $be3c84bcbbb2383c$export$36e8c2990da8266f(extensions);\n    const topNode = (_a = nodeExtensions.find((extension)=>$be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'topNode'))) === null || _a === void 0 ? void 0 : _a.name;\n    const nodes = Object.fromEntries(nodeExtensions.map((extension)=>{\n        const extensionAttributes = allAttributes.filter((attribute)=>attribute.type === extension.name);\n        const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage,\n            editor: editor\n        };\n        const extraNodeFields = extensions.reduce((fields, e)=>{\n            const extendNodeSchema = $be3c84bcbbb2383c$export$f73578b718a57eaa(e, 'extendNodeSchema', context);\n            return {\n                ...fields,\n                ...extendNodeSchema ? extendNodeSchema(extension) : {}\n            };\n        }, {});\n        const schema = $be3c84bcbbb2383c$var$cleanUpSchemaItem({\n            ...extraNodeFields,\n            content: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'content', context)),\n            marks: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'marks', context)),\n            group: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'group', context)),\n            inline: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'inline', context)),\n            atom: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'atom', context)),\n            selectable: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'selectable', context)),\n            draggable: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'draggable', context)),\n            code: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'code', context)),\n            whitespace: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'whitespace', context)),\n            linebreakReplacement: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'linebreakReplacement', context)),\n            defining: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'defining', context)),\n            isolating: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'isolating', context)),\n            attrs: Object.fromEntries(extensionAttributes.map((extensionAttribute)=>{\n                var _a;\n                return [\n                    extensionAttribute.name,\n                    {\n                        default: (_a = extensionAttribute === null || extensionAttribute === void 0 ? void 0 : extensionAttribute.attribute) === null || _a === void 0 ? void 0 : _a.default\n                    }\n                ];\n            }))\n        });\n        const parseHTML = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'parseHTML', context));\n        if (parseHTML) schema.parseDOM = parseHTML.map((parseRule)=>$be3c84bcbbb2383c$export$7ce6b571718439ec(parseRule, extensionAttributes));\n        const renderHTML = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'renderHTML', context);\n        if (renderHTML) schema.toDOM = (node)=>renderHTML({\n                node: node,\n                HTMLAttributes: $be3c84bcbbb2383c$export$bc79d84a417d7b02(node, extensionAttributes)\n            });\n        const renderText = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'renderText', context);\n        if (renderText) schema.toText = renderText;\n        return [\n            extension.name,\n            schema\n        ];\n    }));\n    const marks = Object.fromEntries(markExtensions.map((extension)=>{\n        const extensionAttributes = allAttributes.filter((attribute)=>attribute.type === extension.name);\n        const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage,\n            editor: editor\n        };\n        const extraMarkFields = extensions.reduce((fields, e)=>{\n            const extendMarkSchema = $be3c84bcbbb2383c$export$f73578b718a57eaa(e, 'extendMarkSchema', context);\n            return {\n                ...fields,\n                ...extendMarkSchema ? extendMarkSchema(extension) : {}\n            };\n        }, {});\n        const schema = $be3c84bcbbb2383c$var$cleanUpSchemaItem({\n            ...extraMarkFields,\n            inclusive: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'inclusive', context)),\n            excludes: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'excludes', context)),\n            group: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'group', context)),\n            spanning: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'spanning', context)),\n            code: $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'code', context)),\n            attrs: Object.fromEntries(extensionAttributes.map((extensionAttribute)=>{\n                var _a;\n                return [\n                    extensionAttribute.name,\n                    {\n                        default: (_a = extensionAttribute === null || extensionAttribute === void 0 ? void 0 : extensionAttribute.attribute) === null || _a === void 0 ? void 0 : _a.default\n                    }\n                ];\n            }))\n        });\n        const parseHTML = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'parseHTML', context));\n        if (parseHTML) schema.parseDOM = parseHTML.map((parseRule)=>$be3c84bcbbb2383c$export$7ce6b571718439ec(parseRule, extensionAttributes));\n        const renderHTML = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'renderHTML', context);\n        if (renderHTML) schema.toDOM = (mark)=>renderHTML({\n                mark: mark,\n                HTMLAttributes: $be3c84bcbbb2383c$export$bc79d84a417d7b02(mark, extensionAttributes)\n            });\n        return [\n            extension.name,\n            schema\n        ];\n    }));\n    return new (0, $1krlL.Schema)({\n        topNode: topNode,\n        nodes: nodes,\n        marks: marks\n    });\n}\n/**\n * Tries to get a node or mark type by its name.\n * @param name The name of the node or mark type\n * @param schema The Prosemiror schema to search in\n * @returns The node or mark type, or null if it doesn't exist\n */ function $be3c84bcbbb2383c$export$ea18268b31f54e5(name, schema) {\n    return schema.nodes[name] || schema.marks[name] || null;\n}\nfunction $be3c84bcbbb2383c$export$79b791167b05aada(extension, enabled) {\n    if (Array.isArray(enabled)) return enabled.some((enabledExtension)=>{\n        const name = typeof enabledExtension === 'string' ? enabledExtension : enabledExtension.name;\n        return name === extension.name;\n    });\n    return enabled;\n}\nfunction $be3c84bcbbb2383c$export$d1b60002472b2c81(fragment, schema) {\n    const documentFragment = (0, $1krlL.DOMSerializer).fromSchema(schema).serializeFragment(fragment);\n    const temporaryDocument = document.implementation.createHTMLDocument();\n    const container = temporaryDocument.createElement('div');\n    container.appendChild(documentFragment);\n    return container.innerHTML;\n}\n/**\n * Returns the text content of a resolved prosemirror position\n * @param $from The resolved position to get the text content from\n * @param maxMatch The maximum number of characters to match\n * @returns The text content\n */ const $be3c84bcbbb2383c$export$a3e238086d556fa9 = ($from, maxMatch = 500)=>{\n    let textBefore = '';\n    const sliceEndPos = $from.parentOffset;\n    $from.parent.nodesBetween(Math.max(0, sliceEndPos - maxMatch), sliceEndPos, (node, pos, parent, index)=>{\n        var _a, _b;\n        const chunk = ((_b = (_a = node.type.spec).toText) === null || _b === void 0 ? void 0 : _b.call(_a, {\n            node: node,\n            pos: pos,\n            parent: parent,\n            index: index\n        })) || node.textContent || '%leaf%';\n        textBefore += node.isAtom && !node.isText ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos));\n    });\n    return textBefore;\n};\nfunction $be3c84bcbbb2383c$export$49841c62b9eff15(value) {\n    return Object.prototype.toString.call(value) === '[object RegExp]';\n}\nclass $be3c84bcbbb2383c$export$9b55e2b000ad65f2 {\n    constructor(config){\n        this.find = config.find;\n        this.handler = config.handler;\n    }\n}\nconst $be3c84bcbbb2383c$var$inputRuleMatcherHandler = (text, find)=>{\n    if ($be3c84bcbbb2383c$export$49841c62b9eff15(find)) return find.exec(text);\n    const inputRuleMatch = find(text);\n    if (!inputRuleMatch) return null;\n    const result = [\n        inputRuleMatch.text\n    ];\n    result.index = inputRuleMatch.index;\n    result.input = text;\n    result.data = inputRuleMatch.data;\n    if (inputRuleMatch.replaceWith) {\n        if (!inputRuleMatch.text.includes(inputRuleMatch.replaceWith)) console.warn('[tiptap warn]: \"inputRuleMatch.replaceWith\" must be part of \"inputRuleMatch.text\".');\n        result.push(inputRuleMatch.replaceWith);\n    }\n    return result;\n};\nfunction $be3c84bcbbb2383c$var$run$1(config) {\n    var _a;\n    const { editor: editor, from: from, to: to, text: text, rules: rules, plugin: plugin } = config;\n    const { view: view } = editor;\n    if (view.composing) return false;\n    const $from = view.state.doc.resolve(from);\n    if (// check for code node\n    $from.parent.type.spec.code || !!((_a = $from.nodeBefore || $from.nodeAfter) === null || _a === void 0 ? void 0 : _a.marks.find((mark)=>mark.type.spec.code))) return false;\n    let matched = false;\n    const textBefore = $be3c84bcbbb2383c$export$a3e238086d556fa9($from) + text;\n    rules.forEach((rule)=>{\n        if (matched) return;\n        const match = $be3c84bcbbb2383c$var$inputRuleMatcherHandler(textBefore, rule.find);\n        if (!match) return;\n        const tr = view.state.tr;\n        const state = $be3c84bcbbb2383c$export$83e24c5933427696({\n            state: view.state,\n            transaction: tr\n        });\n        const range = {\n            from: from - (match[0].length - text.length),\n            to: to\n        };\n        const { commands: commands, chain: chain, can: can } = new $be3c84bcbbb2383c$export$475014de15a4c342({\n            editor: editor,\n            state: state\n        });\n        const handler = rule.handler({\n            state: state,\n            range: range,\n            match: match,\n            commands: commands,\n            chain: chain,\n            can: can\n        });\n        // stop if there are no changes\n        if (handler === null || !tr.steps.length) return;\n        // store transform as meta data\n        // so we can undo input rules within the `undoInputRules` command\n        tr.setMeta(plugin, {\n            transform: tr,\n            from: from,\n            to: to,\n            text: text\n        });\n        view.dispatch(tr);\n        matched = true;\n    });\n    return matched;\n}\n/**\n * Create an input rules plugin. When enabled, it will cause text\n * input that matches any of the given rules to trigger the rule’s\n * action.\n */ function $be3c84bcbbb2383c$export$f2a821f78e918151(props) {\n    const { editor: editor, rules: rules } = props;\n    const plugin = new (0, $1LeRC.Plugin)({\n        state: {\n            init () {\n                return null;\n            },\n            apply (tr, prev, state) {\n                const stored = tr.getMeta(plugin);\n                if (stored) return stored;\n                // if InputRule is triggered by insertContent()\n                const simulatedInputMeta = tr.getMeta('applyInputRules');\n                const isSimulatedInput = !!simulatedInputMeta;\n                if (isSimulatedInput) setTimeout(()=>{\n                    let { text: text } = simulatedInputMeta;\n                    if (typeof text === 'string') text;\n                    else text = $be3c84bcbbb2383c$export$d1b60002472b2c81((0, $1krlL.Fragment).from(text), state.schema);\n                    const { from: from } = simulatedInputMeta;\n                    const to = from + text.length;\n                    $be3c84bcbbb2383c$var$run$1({\n                        editor: editor,\n                        from: from,\n                        to: to,\n                        text: text,\n                        rules: rules,\n                        plugin: plugin\n                    });\n                });\n                return tr.selectionSet || tr.docChanged ? null : prev;\n            }\n        },\n        props: {\n            handleTextInput (view, from, to, text) {\n                return $be3c84bcbbb2383c$var$run$1({\n                    editor: editor,\n                    from: from,\n                    to: to,\n                    text: text,\n                    rules: rules,\n                    plugin: plugin\n                });\n            },\n            handleDOMEvents: {\n                compositionend: (view)=>{\n                    setTimeout(()=>{\n                        const { $cursor: $cursor } = view.state.selection;\n                        if ($cursor) $be3c84bcbbb2383c$var$run$1({\n                            editor: editor,\n                            from: $cursor.pos,\n                            to: $cursor.pos,\n                            text: '',\n                            rules: rules,\n                            plugin: plugin\n                        });\n                    });\n                    return false;\n                }\n            },\n            // add support for input rules to trigger on enter\n            // this is useful for example for code blocks\n            handleKeyDown (view, event) {\n                if (event.key !== 'Enter') return false;\n                const { $cursor: $cursor } = view.state.selection;\n                if ($cursor) return $be3c84bcbbb2383c$var$run$1({\n                    editor: editor,\n                    from: $cursor.pos,\n                    to: $cursor.pos,\n                    text: '\\n',\n                    rules: rules,\n                    plugin: plugin\n                });\n                return false;\n            }\n        },\n        // @ts-ignore\n        isInputRules: true\n    });\n    return plugin;\n}\n// see: https://github.com/mesqueeb/is-what/blob/88d6e4ca92fb2baab6003c54e02eedf4e729e5ab/src/index.ts\nfunction $be3c84bcbbb2383c$var$getType(value) {\n    return Object.prototype.toString.call(value).slice(8, -1);\n}\nfunction $be3c84bcbbb2383c$export$53b83ca8eaab0383(value) {\n    if ($be3c84bcbbb2383c$var$getType(value) !== 'Object') return false;\n    return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype;\n}\nfunction $be3c84bcbbb2383c$export$dd702b3c8240390c(target, source) {\n    const output = {\n        ...target\n    };\n    if ($be3c84bcbbb2383c$export$53b83ca8eaab0383(target) && $be3c84bcbbb2383c$export$53b83ca8eaab0383(source)) Object.keys(source).forEach((key)=>{\n        if ($be3c84bcbbb2383c$export$53b83ca8eaab0383(source[key]) && $be3c84bcbbb2383c$export$53b83ca8eaab0383(target[key])) output[key] = $be3c84bcbbb2383c$export$dd702b3c8240390c(target[key], source[key]);\n        else output[key] = source[key];\n    });\n    return output;\n}\n/**\n * The Mark class is used to create custom mark extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */ class $be3c84bcbbb2383c$export$c9d15bcfc6d42044 {\n    constructor(config = {}){\n        this.type = 'mark';\n        this.name = 'mark';\n        this.parent = null;\n        this.child = null;\n        this.config = {\n            name: this.name,\n            defaultOptions: {}\n        };\n        this.config = {\n            ...this.config,\n            ...config\n        };\n        this.name = this.config.name;\n        if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${this.name}\".`);\n        // TODO: remove `addOptions` fallback\n        this.options = this.config.defaultOptions;\n        if (this.config.addOptions) this.options = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(this, 'addOptions', {\n            name: this.name\n        }));\n        this.storage = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(this, 'addStorage', {\n            name: this.name,\n            options: this.options\n        })) || {};\n    }\n    static create(config = {}) {\n        return new $be3c84bcbbb2383c$export$c9d15bcfc6d42044(config);\n    }\n    configure(options = {}) {\n        // return a new instance so we can use the same extension\n        // with different calls of `configure`\n        const extension = this.extend({\n            ...this.config,\n            addOptions: ()=>{\n                return $be3c84bcbbb2383c$export$dd702b3c8240390c(this.options, options);\n            }\n        });\n        // Always preserve the current name\n        extension.name = this.name;\n        // Set the parent to be our parent\n        extension.parent = this.parent;\n        return extension;\n    }\n    extend(extendedConfig = {}) {\n        const extension = new $be3c84bcbbb2383c$export$c9d15bcfc6d42044(extendedConfig);\n        extension.parent = this;\n        this.child = extension;\n        extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name;\n        if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${extension.name}\".`);\n        extension.options = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addOptions', {\n            name: extension.name\n        }));\n        extension.storage = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addStorage', {\n            name: extension.name,\n            options: extension.options\n        }));\n        return extension;\n    }\n    static handleExit({ editor: editor, mark: mark }) {\n        const { tr: tr } = editor.state;\n        const currentPos = editor.state.selection.$from;\n        const isAtEnd = currentPos.pos === currentPos.end();\n        if (isAtEnd) {\n            const currentMarks = currentPos.marks();\n            const isInMark = !!currentMarks.find((m)=>(m === null || m === void 0 ? void 0 : m.type.name) === mark.name);\n            if (!isInMark) return false;\n            const removeMark = currentMarks.find((m)=>(m === null || m === void 0 ? void 0 : m.type.name) === mark.name);\n            if (removeMark) tr.removeStoredMark(removeMark);\n            tr.insertText(' ', currentPos.pos);\n            editor.view.dispatch(tr);\n            return true;\n        }\n        return false;\n    }\n}\nfunction $be3c84bcbbb2383c$export$7e4aa119212bc614(value) {\n    return typeof value === 'number';\n}\n/**\n * Paste rules are used to react to pasted content.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */ class $be3c84bcbbb2383c$export$e75df4392d073e98 {\n    constructor(config){\n        this.find = config.find;\n        this.handler = config.handler;\n    }\n}\nconst $be3c84bcbbb2383c$var$pasteRuleMatcherHandler = (text, find, event)=>{\n    if ($be3c84bcbbb2383c$export$49841c62b9eff15(find)) return [\n        ...text.matchAll(find)\n    ];\n    const matches = find(text, event);\n    if (!matches) return [];\n    return matches.map((pasteRuleMatch)=>{\n        const result = [\n            pasteRuleMatch.text\n        ];\n        result.index = pasteRuleMatch.index;\n        result.input = text;\n        result.data = pasteRuleMatch.data;\n        if (pasteRuleMatch.replaceWith) {\n            if (!pasteRuleMatch.text.includes(pasteRuleMatch.replaceWith)) console.warn('[tiptap warn]: \"pasteRuleMatch.replaceWith\" must be part of \"pasteRuleMatch.text\".');\n            result.push(pasteRuleMatch.replaceWith);\n        }\n        return result;\n    });\n};\nfunction $be3c84bcbbb2383c$var$run(config) {\n    const { editor: editor, state: state, from: from, to: to, rule: rule, pasteEvent: pasteEvent, dropEvent: dropEvent } = config;\n    const { commands: commands, chain: chain, can: can } = new $be3c84bcbbb2383c$export$475014de15a4c342({\n        editor: editor,\n        state: state\n    });\n    const handlers = [];\n    state.doc.nodesBetween(from, to, (node, pos)=>{\n        if (!node.isTextblock || node.type.spec.code) return;\n        const resolvedFrom = Math.max(from, pos);\n        const resolvedTo = Math.min(to, pos + node.content.size);\n        const textToMatch = node.textBetween(resolvedFrom - pos, resolvedTo - pos, undefined, '\\ufffc');\n        const matches = $be3c84bcbbb2383c$var$pasteRuleMatcherHandler(textToMatch, rule.find, pasteEvent);\n        matches.forEach((match)=>{\n            if (match.index === undefined) return;\n            const start = resolvedFrom + match.index + 1;\n            const end = start + match[0].length;\n            const range = {\n                from: state.tr.mapping.map(start),\n                to: state.tr.mapping.map(end)\n            };\n            const handler = rule.handler({\n                state: state,\n                range: range,\n                match: match,\n                commands: commands,\n                chain: chain,\n                can: can,\n                pasteEvent: pasteEvent,\n                dropEvent: dropEvent\n            });\n            handlers.push(handler);\n        });\n    });\n    const success = handlers.every((handler)=>handler !== null);\n    return success;\n}\n// When dragging across editors, must get another editor instance to delete selection content.\nlet $be3c84bcbbb2383c$var$tiptapDragFromOtherEditor = null;\nconst $be3c84bcbbb2383c$var$createClipboardPasteEvent = (text)=>{\n    var _a;\n    const event = new ClipboardEvent('paste', {\n        clipboardData: new DataTransfer()\n    });\n    (_a = event.clipboardData) === null || _a === void 0 || _a.setData('text/html', text);\n    return event;\n};\n/**\n * Create an paste rules plugin. When enabled, it will cause pasted\n * text that matches any of the given rules to trigger the rule’s\n * action.\n */ function $be3c84bcbbb2383c$export$458282b0dddaaaa4(props) {\n    const { editor: editor, rules: rules } = props;\n    let dragSourceElement = null;\n    let isPastedFromProseMirror = false;\n    let isDroppedFromProseMirror = false;\n    let pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null;\n    let dropEvent;\n    try {\n        dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;\n    } catch  {\n        dropEvent = null;\n    }\n    const processEvent = ({ state: state, from: from, to: to, rule: rule, pasteEvt: pasteEvt })=>{\n        const tr = state.tr;\n        const chainableState = $be3c84bcbbb2383c$export$83e24c5933427696({\n            state: state,\n            transaction: tr\n        });\n        const handler = $be3c84bcbbb2383c$var$run({\n            editor: editor,\n            state: chainableState,\n            from: Math.max(from - 1, 0),\n            to: to.b - 1,\n            rule: rule,\n            pasteEvent: pasteEvt,\n            dropEvent: dropEvent\n        });\n        if (!handler || !tr.steps.length) return;\n        try {\n            dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;\n        } catch  {\n            dropEvent = null;\n        }\n        pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null;\n        return tr;\n    };\n    const plugins = rules.map((rule)=>{\n        return new (0, $1LeRC.Plugin)({\n            // we register a global drag handler to track the current drag source element\n            view (view) {\n                const handleDragstart = (event)=>{\n                    var _a;\n                    dragSourceElement = ((_a = view.dom.parentElement) === null || _a === void 0 ? void 0 : _a.contains(event.target)) ? view.dom.parentElement : null;\n                    if (dragSourceElement) $be3c84bcbbb2383c$var$tiptapDragFromOtherEditor = editor;\n                };\n                const handleDragend = ()=>{\n                    if ($be3c84bcbbb2383c$var$tiptapDragFromOtherEditor) $be3c84bcbbb2383c$var$tiptapDragFromOtherEditor = null;\n                };\n                window.addEventListener('dragstart', handleDragstart);\n                window.addEventListener('dragend', handleDragend);\n                return {\n                    destroy () {\n                        window.removeEventListener('dragstart', handleDragstart);\n                        window.removeEventListener('dragend', handleDragend);\n                    }\n                };\n            },\n            props: {\n                handleDOMEvents: {\n                    drop: (view, event)=>{\n                        isDroppedFromProseMirror = dragSourceElement === view.dom.parentElement;\n                        dropEvent = event;\n                        if (!isDroppedFromProseMirror) {\n                            const dragFromOtherEditor = $be3c84bcbbb2383c$var$tiptapDragFromOtherEditor;\n                            if (dragFromOtherEditor === null || dragFromOtherEditor === void 0 ? void 0 : dragFromOtherEditor.isEditable) // setTimeout to avoid the wrong content after drop, timeout arg can't be empty or 0\n                            setTimeout(()=>{\n                                const selection = dragFromOtherEditor.state.selection;\n                                if (selection) dragFromOtherEditor.commands.deleteRange({\n                                    from: selection.from,\n                                    to: selection.to\n                                });\n                            }, 10);\n                        }\n                        return false;\n                    },\n                    paste: (_view, event)=>{\n                        var _a;\n                        const html = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text/html');\n                        pasteEvent = event;\n                        isPastedFromProseMirror = !!(html === null || html === void 0 ? void 0 : html.includes('data-pm-slice'));\n                        return false;\n                    }\n                }\n            },\n            appendTransaction: (transactions, oldState, state)=>{\n                const transaction = transactions[0];\n                const isPaste = transaction.getMeta('uiEvent') === 'paste' && !isPastedFromProseMirror;\n                const isDrop = transaction.getMeta('uiEvent') === 'drop' && !isDroppedFromProseMirror;\n                // if PasteRule is triggered by insertContent()\n                const simulatedPasteMeta = transaction.getMeta('applyPasteRules');\n                const isSimulatedPaste = !!simulatedPasteMeta;\n                if (!isPaste && !isDrop && !isSimulatedPaste) return;\n                // Handle simulated paste\n                if (isSimulatedPaste) {\n                    let { text: text } = simulatedPasteMeta;\n                    if (typeof text === 'string') text;\n                    else text = $be3c84bcbbb2383c$export$d1b60002472b2c81((0, $1krlL.Fragment).from(text), state.schema);\n                    const { from: from } = simulatedPasteMeta;\n                    const to = from + text.length;\n                    const pasteEvt = $be3c84bcbbb2383c$var$createClipboardPasteEvent(text);\n                    return processEvent({\n                        rule: rule,\n                        state: state,\n                        from: from,\n                        to: {\n                            b: to\n                        },\n                        pasteEvt: pasteEvt\n                    });\n                }\n                // handle actual paste/drop\n                const from = oldState.doc.content.findDiffStart(state.doc.content);\n                const to = oldState.doc.content.findDiffEnd(state.doc.content);\n                // stop if there is no changed range\n                if (!$be3c84bcbbb2383c$export$7e4aa119212bc614(from) || !to || from === to.b) return;\n                return processEvent({\n                    rule: rule,\n                    state: state,\n                    from: from,\n                    to: to,\n                    pasteEvt: pasteEvent\n                });\n            }\n        });\n    });\n    return plugins;\n}\nfunction $be3c84bcbbb2383c$export$15704658c784aef1(items) {\n    const filtered = items.filter((el, index)=>items.indexOf(el) !== index);\n    return Array.from(new Set(filtered));\n}\nclass $be3c84bcbbb2383c$var$ExtensionManager {\n    constructor(extensions, editor){\n        this.splittableMarks = [];\n        this.editor = editor;\n        this.extensions = $be3c84bcbbb2383c$var$ExtensionManager.resolve(extensions);\n        this.schema = $be3c84bcbbb2383c$export$71bc12a97b59a858(this.extensions, editor);\n        this.setupExtensions();\n    }\n    /**\n     * Returns a flattened and sorted extension list while\n     * also checking for duplicated extensions and warns the user.\n     * @param extensions An array of Tiptap extensions\n     * @returns An flattened and sorted array of Tiptap extensions\n     */ static resolve(extensions) {\n        const resolvedExtensions = $be3c84bcbbb2383c$var$ExtensionManager.sort($be3c84bcbbb2383c$var$ExtensionManager.flatten(extensions));\n        const duplicatedNames = $be3c84bcbbb2383c$export$15704658c784aef1(resolvedExtensions.map((extension)=>extension.name));\n        if (duplicatedNames.length) console.warn(`[tiptap warn]: Duplicate extension names found: [${duplicatedNames.map((item)=>`'${item}'`).join(', ')}]. This can lead to issues.`);\n        return resolvedExtensions;\n    }\n    /**\n     * Create a flattened array of extensions by traversing the `addExtensions` field.\n     * @param extensions An array of Tiptap extensions\n     * @returns A flattened array of Tiptap extensions\n     */ static flatten(extensions) {\n        return extensions.map((extension)=>{\n            const context = {\n                name: extension.name,\n                options: extension.options,\n                storage: extension.storage\n            };\n            const addExtensions = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addExtensions', context);\n            if (addExtensions) return [\n                extension,\n                ...this.flatten(addExtensions())\n            ];\n            return extension;\n        })// `Infinity` will break TypeScript so we set a number that is probably high enough\n        .flat(10);\n    }\n    /**\n     * Sort extensions by priority.\n     * @param extensions An array of Tiptap extensions\n     * @returns A sorted array of Tiptap extensions by priority\n     */ static sort(extensions) {\n        const defaultPriority = 100;\n        return extensions.sort((a, b)=>{\n            const priorityA = $be3c84bcbbb2383c$export$f73578b718a57eaa(a, 'priority') || defaultPriority;\n            const priorityB = $be3c84bcbbb2383c$export$f73578b718a57eaa(b, 'priority') || defaultPriority;\n            if (priorityA > priorityB) return -1;\n            if (priorityA < priorityB) return 1;\n            return 0;\n        });\n    }\n    /**\n     * Get all commands from the extensions.\n     * @returns An object with all commands where the key is the command name and the value is the command function\n     */ get commands() {\n        return this.extensions.reduce((commands, extension)=>{\n            const context = {\n                name: extension.name,\n                options: extension.options,\n                storage: extension.storage,\n                editor: this.editor,\n                type: $be3c84bcbbb2383c$export$ea18268b31f54e5(extension.name, this.schema)\n            };\n            const addCommands = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addCommands', context);\n            if (!addCommands) return commands;\n            return {\n                ...commands,\n                ...addCommands()\n            };\n        }, {});\n    }\n    /**\n     * Get all registered Prosemirror plugins from the extensions.\n     * @returns An array of Prosemirror plugins\n     */ get plugins() {\n        const { editor: editor } = this;\n        // With ProseMirror, first plugins within an array are executed first.\n        // In Tiptap, we provide the ability to override plugins,\n        // so it feels more natural to run plugins at the end of an array first.\n        // That’s why we have to reverse the `extensions` array and sort again\n        // based on the `priority` option.\n        const extensions = $be3c84bcbbb2383c$var$ExtensionManager.sort([\n            ...this.extensions\n        ].reverse());\n        const inputRules = [];\n        const pasteRules = [];\n        const allPlugins = extensions.map((extension)=>{\n            const context = {\n                name: extension.name,\n                options: extension.options,\n                storage: extension.storage,\n                editor: editor,\n                type: $be3c84bcbbb2383c$export$ea18268b31f54e5(extension.name, this.schema)\n            };\n            const plugins = [];\n            const addKeyboardShortcuts = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addKeyboardShortcuts', context);\n            let defaultBindings = {};\n            // bind exit handling\n            if (extension.type === 'mark' && $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'exitable', context)) defaultBindings.ArrowRight = ()=>$be3c84bcbbb2383c$export$c9d15bcfc6d42044.handleExit({\n                    editor: editor,\n                    mark: extension\n                });\n            if (addKeyboardShortcuts) {\n                const bindings = Object.fromEntries(Object.entries(addKeyboardShortcuts()).map(([shortcut, method])=>{\n                    return [\n                        shortcut,\n                        ()=>method({\n                                editor: editor\n                            })\n                    ];\n                }));\n                defaultBindings = {\n                    ...defaultBindings,\n                    ...bindings\n                };\n            }\n            const keyMapPlugin = (0, $18HhN.keymap)(defaultBindings);\n            plugins.push(keyMapPlugin);\n            const addInputRules = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addInputRules', context);\n            if ($be3c84bcbbb2383c$export$79b791167b05aada(extension, editor.options.enableInputRules) && addInputRules) inputRules.push(...addInputRules());\n            const addPasteRules = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addPasteRules', context);\n            if ($be3c84bcbbb2383c$export$79b791167b05aada(extension, editor.options.enablePasteRules) && addPasteRules) pasteRules.push(...addPasteRules());\n            const addProseMirrorPlugins = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addProseMirrorPlugins', context);\n            if (addProseMirrorPlugins) {\n                const proseMirrorPlugins = addProseMirrorPlugins();\n                plugins.push(...proseMirrorPlugins);\n            }\n            return plugins;\n        }).flat();\n        return [\n            $be3c84bcbbb2383c$export$f2a821f78e918151({\n                editor: editor,\n                rules: inputRules\n            }),\n            ...$be3c84bcbbb2383c$export$458282b0dddaaaa4({\n                editor: editor,\n                rules: pasteRules\n            }),\n            ...allPlugins\n        ];\n    }\n    /**\n     * Get all attributes from the extensions.\n     * @returns An array of attributes\n     */ get attributes() {\n        return $be3c84bcbbb2383c$export$6e54e3e69d60df3d(this.extensions);\n    }\n    /**\n     * Get all node views from the extensions.\n     * @returns An object with all node views where the key is the node name and the value is the node view function\n     */ get nodeViews() {\n        const { editor: editor } = this;\n        const { nodeExtensions: nodeExtensions } = $be3c84bcbbb2383c$export$36e8c2990da8266f(this.extensions);\n        return Object.fromEntries(nodeExtensions.filter((extension)=>!!$be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addNodeView')).map((extension)=>{\n            const extensionAttributes = this.attributes.filter((attribute)=>attribute.type === extension.name);\n            const context = {\n                name: extension.name,\n                options: extension.options,\n                storage: extension.storage,\n                editor: editor,\n                type: $be3c84bcbbb2383c$export$d168cba70360dd3d(extension.name, this.schema)\n            };\n            const addNodeView = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addNodeView', context);\n            if (!addNodeView) return [];\n            const nodeview = (node, view, getPos, decorations, innerDecorations)=>{\n                const HTMLAttributes = $be3c84bcbbb2383c$export$bc79d84a417d7b02(node, extensionAttributes);\n                return addNodeView()({\n                    node: // pass-through\n                    node,\n                    view: view,\n                    getPos: getPos,\n                    decorations: decorations,\n                    innerDecorations: innerDecorations,\n                    editor: // tiptap-specific\n                    editor,\n                    extension: extension,\n                    HTMLAttributes: HTMLAttributes\n                });\n            };\n            return [\n                extension.name,\n                nodeview\n            ];\n        }));\n    }\n    /**\n     * Go through all extensions, create extension storages & setup marks\n     * & bind editor event listener.\n     */ setupExtensions() {\n        this.extensions.forEach((extension)=>{\n            var _a;\n            // store extension storage in editor\n            this.editor.extensionStorage[extension.name] = extension.storage;\n            const context = {\n                name: extension.name,\n                options: extension.options,\n                storage: extension.storage,\n                editor: this.editor,\n                type: $be3c84bcbbb2383c$export$ea18268b31f54e5(extension.name, this.schema)\n            };\n            if (extension.type === 'mark') {\n                const keepOnSplit = (_a = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'keepOnSplit', context))) !== null && _a !== void 0 ? _a : true;\n                if (keepOnSplit) this.splittableMarks.push(extension.name);\n            }\n            const onBeforeCreate = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'onBeforeCreate', context);\n            const onCreate = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'onCreate', context);\n            const onUpdate = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'onUpdate', context);\n            const onSelectionUpdate = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'onSelectionUpdate', context);\n            const onTransaction = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'onTransaction', context);\n            const onFocus = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'onFocus', context);\n            const onBlur = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'onBlur', context);\n            const onDestroy = $be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'onDestroy', context);\n            if (onBeforeCreate) this.editor.on('beforeCreate', onBeforeCreate);\n            if (onCreate) this.editor.on('create', onCreate);\n            if (onUpdate) this.editor.on('update', onUpdate);\n            if (onSelectionUpdate) this.editor.on('selectionUpdate', onSelectionUpdate);\n            if (onTransaction) this.editor.on('transaction', onTransaction);\n            if (onFocus) this.editor.on('focus', onFocus);\n            if (onBlur) this.editor.on('blur', onBlur);\n            if (onDestroy) this.editor.on('destroy', onDestroy);\n        });\n    }\n}\n/**\n * The Extension class is the base class for all extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */ class $be3c84bcbbb2383c$export$eeddbf09bb970356 {\n    constructor(config = {}){\n        this.type = 'extension';\n        this.name = 'extension';\n        this.parent = null;\n        this.child = null;\n        this.config = {\n            name: this.name,\n            defaultOptions: {}\n        };\n        this.config = {\n            ...this.config,\n            ...config\n        };\n        this.name = this.config.name;\n        if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${this.name}\".`);\n        // TODO: remove `addOptions` fallback\n        this.options = this.config.defaultOptions;\n        if (this.config.addOptions) this.options = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(this, 'addOptions', {\n            name: this.name\n        }));\n        this.storage = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(this, 'addStorage', {\n            name: this.name,\n            options: this.options\n        })) || {};\n    }\n    static create(config = {}) {\n        return new $be3c84bcbbb2383c$export$eeddbf09bb970356(config);\n    }\n    configure(options = {}) {\n        // return a new instance so we can use the same extension\n        // with different calls of `configure`\n        const extension = this.extend({\n            ...this.config,\n            addOptions: ()=>{\n                return $be3c84bcbbb2383c$export$dd702b3c8240390c(this.options, options);\n            }\n        });\n        // Always preserve the current name\n        extension.name = this.name;\n        // Set the parent to be our parent\n        extension.parent = this.parent;\n        return extension;\n    }\n    extend(extendedConfig = {}) {\n        const extension = new $be3c84bcbbb2383c$export$eeddbf09bb970356({\n            ...this.config,\n            ...extendedConfig\n        });\n        extension.parent = this;\n        this.child = extension;\n        extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name;\n        if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${extension.name}\".`);\n        extension.options = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addOptions', {\n            name: extension.name\n        }));\n        extension.storage = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addStorage', {\n            name: extension.name,\n            options: extension.options\n        }));\n        return extension;\n    }\n}\n/**\n * Gets the text between two positions in a Prosemirror node\n * and serializes it using the given text serializers and block separator (see getText)\n * @param startNode The Prosemirror node to start from\n * @param range The range of the text to get\n * @param options Options for the text serializer & block separator\n * @returns The text between the two positions\n */ function $be3c84bcbbb2383c$export$6e5992a7455d9ef6(startNode, range, options) {\n    const { from: from, to: to } = range;\n    const { blockSeparator: blockSeparator = '\\n\\n', textSerializers: textSerializers = {} } = options || {};\n    let text = '';\n    startNode.nodesBetween(from, to, (node, pos, parent, index)=>{\n        var _a;\n        if (node.isBlock && pos > from) text += blockSeparator;\n        const textSerializer = textSerializers === null || textSerializers === void 0 ? void 0 : textSerializers[node.type.name];\n        if (textSerializer) {\n            if (parent) text += textSerializer({\n                node: node,\n                pos: pos,\n                parent: parent,\n                index: index,\n                range: range\n            });\n            // do not descend into child nodes when there exists a serializer\n            return false;\n        }\n        if (node.isText) text += (_a = node === null || node === void 0 ? void 0 : node.text) === null || _a === void 0 ? void 0 : _a.slice(Math.max(from, pos) - pos, to - pos); // eslint-disable-line\n    });\n    return text;\n}\n/**\n * Find text serializers `toText` in a Prosemirror schema\n * @param schema The Prosemirror schema to search in\n * @returns A record of text serializers by node name\n */ function $be3c84bcbbb2383c$export$fdd92b7d22ac071c(schema) {\n    return Object.fromEntries(Object.entries(schema.nodes).filter(([, node])=>node.spec.toText).map(([name, node])=>[\n            name,\n            node.spec.toText\n        ]));\n}\nconst $be3c84bcbbb2383c$var$ClipboardTextSerializer = $be3c84bcbbb2383c$export$eeddbf09bb970356.create({\n    name: 'clipboardTextSerializer',\n    addOptions () {\n        return {\n            blockSeparator: undefined\n        };\n    },\n    addProseMirrorPlugins () {\n        return [\n            new (0, $1LeRC.Plugin)({\n                key: new (0, $1LeRC.PluginKey)('clipboardTextSerializer'),\n                props: {\n                    clipboardTextSerializer: ()=>{\n                        const { editor: editor } = this;\n                        const { state: state, schema: schema } = editor;\n                        const { doc: doc, selection: selection } = state;\n                        const { ranges: ranges } = selection;\n                        const from = Math.min(...ranges.map((range)=>range.$from.pos));\n                        const to = Math.max(...ranges.map((range)=>range.$to.pos));\n                        const textSerializers = $be3c84bcbbb2383c$export$fdd92b7d22ac071c(schema);\n                        const range = {\n                            from: from,\n                            to: to\n                        };\n                        return $be3c84bcbbb2383c$export$6e5992a7455d9ef6(doc, range, {\n                            ...this.options.blockSeparator !== undefined ? {\n                                blockSeparator: this.options.blockSeparator\n                            } : {},\n                            textSerializers: textSerializers\n                        });\n                    }\n                }\n            })\n        ];\n    }\n});\nconst $be3c84bcbbb2383c$var$blur = ()=>({ editor: editor, view: view })=>{\n        requestAnimationFrame(()=>{\n            var _a;\n            if (!editor.isDestroyed) {\n                view.dom.blur();\n                // Browsers should remove the caret on blur but safari does not.\n                // See: https://github.com/ueberdosis/tiptap/issues/2405\n                (_a = window === null || window === void 0 ? void 0 : window.getSelection()) === null || _a === void 0 || _a.removeAllRanges();\n            }\n        });\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$clearContent = (emitUpdate = false)=>({ commands: commands })=>{\n        return commands.setContent('', emitUpdate);\n    };\nconst $be3c84bcbbb2383c$var$clearNodes = ()=>({ state: state, tr: tr, dispatch: dispatch })=>{\n        const { selection: selection } = tr;\n        const { ranges: ranges } = selection;\n        if (!dispatch) return true;\n        ranges.forEach(({ $from: $from, $to: $to })=>{\n            state.doc.nodesBetween($from.pos, $to.pos, (node, pos)=>{\n                if (node.type.isText) return;\n                const { doc: doc, mapping: mapping } = tr;\n                const $mappedFrom = doc.resolve(mapping.map(pos));\n                const $mappedTo = doc.resolve(mapping.map(pos + node.nodeSize));\n                const nodeRange = $mappedFrom.blockRange($mappedTo);\n                if (!nodeRange) return;\n                const targetLiftDepth = (0, $gfgdn.liftTarget)(nodeRange);\n                if (node.type.isTextblock) {\n                    const { defaultType: defaultType } = $mappedFrom.parent.contentMatchAt($mappedFrom.index());\n                    tr.setNodeMarkup(nodeRange.start, defaultType);\n                }\n                if (targetLiftDepth || targetLiftDepth === 0) tr.lift(nodeRange, targetLiftDepth);\n            });\n        });\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$command = (fn)=>(props)=>{\n        return fn(props);\n    };\nconst $be3c84bcbbb2383c$var$createParagraphNear = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.createParagraphNear)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$cut = (originRange, targetPos)=>({ editor: editor, tr: tr })=>{\n        const { state: state } = editor;\n        const contentSlice = state.doc.slice(originRange.from, originRange.to);\n        tr.deleteRange(originRange.from, originRange.to);\n        const newPos = tr.mapping.map(targetPos);\n        tr.insert(newPos, contentSlice.content);\n        tr.setSelection(new (0, $1LeRC.TextSelection)(tr.doc.resolve(Math.max(newPos - 1, 0))));\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$deleteCurrentNode = ()=>({ tr: tr, dispatch: dispatch })=>{\n        const { selection: selection } = tr;\n        const currentNode = selection.$anchor.node();\n        // if there is content inside the current node, break out of this command\n        if (currentNode.content.size > 0) return false;\n        const $pos = tr.selection.$anchor;\n        for(let depth = $pos.depth; depth > 0; depth -= 1){\n            const node = $pos.node(depth);\n            if (node.type === currentNode.type) {\n                if (dispatch) {\n                    const from = $pos.before(depth);\n                    const to = $pos.after(depth);\n                    tr.delete(from, to).scrollIntoView();\n                }\n                return true;\n            }\n        }\n        return false;\n    };\nconst $be3c84bcbbb2383c$var$deleteNode = (typeOrName)=>({ tr: tr, state: state, dispatch: dispatch })=>{\n        const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        const $pos = tr.selection.$anchor;\n        for(let depth = $pos.depth; depth > 0; depth -= 1){\n            const node = $pos.node(depth);\n            if (node.type === type) {\n                if (dispatch) {\n                    const from = $pos.before(depth);\n                    const to = $pos.after(depth);\n                    tr.delete(from, to).scrollIntoView();\n                }\n                return true;\n            }\n        }\n        return false;\n    };\nconst $be3c84bcbbb2383c$var$deleteRange = (range)=>({ tr: tr, dispatch: dispatch })=>{\n        const { from: from, to: to } = range;\n        if (dispatch) tr.delete(from, to);\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$deleteSelection = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.deleteSelection)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$enter = ()=>({ commands: commands })=>{\n        return commands.keyboardShortcut('Enter');\n    };\nconst $be3c84bcbbb2383c$var$exitCode = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.exitCode)(state, dispatch);\n    };\n/**\n * Check if object1 includes object2\n * @param object1 Object\n * @param object2 Object\n */ function $be3c84bcbbb2383c$export$7aeb68f71172641d(object1, object2, options = {\n    strict: true\n}) {\n    const keys = Object.keys(object2);\n    if (!keys.length) return true;\n    return keys.every((key)=>{\n        if (options.strict) return object2[key] === object1[key];\n        if ($be3c84bcbbb2383c$export$49841c62b9eff15(object2[key])) return object2[key].test(object1[key]);\n        return object2[key] === object1[key];\n    });\n}\nfunction $be3c84bcbbb2383c$var$findMarkInSet(marks, type, attributes = {}) {\n    return marks.find((item)=>{\n        return item.type === type && $be3c84bcbbb2383c$export$7aeb68f71172641d(// Only check equality for the attributes that are provided\n        Object.fromEntries(Object.keys(attributes).map((k)=>[\n                k,\n                item.attrs[k]\n            ])), attributes);\n    });\n}\nfunction $be3c84bcbbb2383c$var$isMarkInSet(marks, type, attributes = {}) {\n    return !!$be3c84bcbbb2383c$var$findMarkInSet(marks, type, attributes);\n}\n/**\n * Get the range of a mark at a resolved position.\n */ function $be3c84bcbbb2383c$export$8ceae6d06f5c4df5(/**\n * The position to get the mark range for.\n */ $pos, /**\n * The mark type to get the range for.\n */ type, /**\n * The attributes to match against.\n * If not provided, only the first mark at the position will be matched.\n */ attributes) {\n    var _a;\n    if (!$pos || !type) return;\n    let start = $pos.parent.childAfter($pos.parentOffset);\n    // If the cursor is at the start of a text node that does not have the mark, look backward\n    if (!start.node || !start.node.marks.some((mark)=>mark.type === type)) start = $pos.parent.childBefore($pos.parentOffset);\n    // If there is no text node with the mark even backward, return undefined\n    if (!start.node || !start.node.marks.some((mark)=>mark.type === type)) return;\n    // Default to only matching against the first mark's attributes\n    attributes = attributes || ((_a = start.node.marks[0]) === null || _a === void 0 ? void 0 : _a.attrs);\n    // We now know that the cursor is either at the start, middle or end of a text node with the specified mark\n    // so we can look it up on the targeted mark\n    const mark = $be3c84bcbbb2383c$var$findMarkInSet([\n        ...start.node.marks\n    ], type, attributes);\n    if (!mark) return;\n    let startIndex = start.index;\n    let startPos = $pos.start() + start.offset;\n    let endIndex = startIndex + 1;\n    let endPos = startPos + start.node.nodeSize;\n    while(startIndex > 0 && $be3c84bcbbb2383c$var$isMarkInSet([\n        ...$pos.parent.child(startIndex - 1).marks\n    ], type, attributes)){\n        startIndex -= 1;\n        startPos -= $pos.parent.child(startIndex).nodeSize;\n    }\n    while(endIndex < $pos.parent.childCount && $be3c84bcbbb2383c$var$isMarkInSet([\n        ...$pos.parent.child(endIndex).marks\n    ], type, attributes)){\n        endPos += $pos.parent.child(endIndex).nodeSize;\n        endIndex += 1;\n    }\n    return {\n        from: startPos,\n        to: endPos\n    };\n}\nfunction $be3c84bcbbb2383c$export$b1269d6bf6e491ec(nameOrType, schema) {\n    if (typeof nameOrType === 'string') {\n        if (!schema.marks[nameOrType]) throw Error(`There is no mark type named '${nameOrType}'. Maybe you forgot to add the extension?`);\n        return schema.marks[nameOrType];\n    }\n    return nameOrType;\n}\nconst $be3c84bcbbb2383c$var$extendMarkRange = (typeOrName, attributes = {})=>({ tr: tr, state: state, dispatch: dispatch })=>{\n        const type = $be3c84bcbbb2383c$export$b1269d6bf6e491ec(typeOrName, state.schema);\n        const { doc: doc, selection: selection } = tr;\n        const { $from: $from, from: from, to: to } = selection;\n        if (dispatch) {\n            const range = $be3c84bcbbb2383c$export$8ceae6d06f5c4df5($from, type, attributes);\n            if (range && range.from <= from && range.to >= to) {\n                const newSelection = (0, $1LeRC.TextSelection).create(doc, range.from, range.to);\n                tr.setSelection(newSelection);\n            }\n        }\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$first = (commands)=>(props)=>{\n        const items = typeof commands === 'function' ? commands(props) : commands;\n        for(let i = 0; i < items.length; i += 1){\n            if (items[i](props)) return true;\n        }\n        return false;\n    };\nfunction $be3c84bcbbb2383c$export$38b50bf35e79aaf3(value) {\n    return value instanceof (0, $1LeRC.TextSelection);\n}\nfunction $be3c84bcbbb2383c$export$6fb785c609d82593(value = 0, min = 0, max = 0) {\n    return Math.min(Math.max(value, min), max);\n}\nfunction $be3c84bcbbb2383c$export$225b0233b78e0d61(doc, position = null) {\n    if (!position) return null;\n    const selectionAtStart = (0, $1LeRC.Selection).atStart(doc);\n    const selectionAtEnd = (0, $1LeRC.Selection).atEnd(doc);\n    if (position === 'start' || position === true) return selectionAtStart;\n    if (position === 'end') return selectionAtEnd;\n    const minPos = selectionAtStart.from;\n    const maxPos = selectionAtEnd.to;\n    if (position === 'all') return (0, $1LeRC.TextSelection).create(doc, $be3c84bcbbb2383c$export$6fb785c609d82593(0, minPos, maxPos), $be3c84bcbbb2383c$export$6fb785c609d82593(doc.content.size, minPos, maxPos));\n    return (0, $1LeRC.TextSelection).create(doc, $be3c84bcbbb2383c$export$6fb785c609d82593(position, minPos, maxPos), $be3c84bcbbb2383c$export$6fb785c609d82593(position, minPos, maxPos));\n}\nfunction $be3c84bcbbb2383c$var$isAndroid() {\n    return navigator.platform === 'Android' || /android/i.test(navigator.userAgent);\n}\nfunction $be3c84bcbbb2383c$export$86c1a3f9ab33da5c() {\n    return [\n        'iPad Simulator',\n        'iPhone Simulator',\n        'iPod Simulator',\n        'iPad',\n        'iPhone',\n        'iPod'\n    ].includes(navigator.platform) || navigator.userAgent.includes('Mac') && 'ontouchend' in document;\n}\nconst $be3c84bcbbb2383c$var$focus = (position = null, options = {})=>({ editor: editor, view: view, tr: tr, dispatch: dispatch })=>{\n        options = {\n            scrollIntoView: true,\n            ...options\n        };\n        const delayedFocus = ()=>{\n            // focus within `requestAnimationFrame` breaks focus on iOS and Android\n            // so we have to call this\n            if ($be3c84bcbbb2383c$export$86c1a3f9ab33da5c() || $be3c84bcbbb2383c$var$isAndroid()) view.dom.focus();\n            // For React we have to focus asynchronously. Otherwise wild things happen.\n            // see: https://github.com/ueberdosis/tiptap/issues/1520\n            requestAnimationFrame(()=>{\n                if (!editor.isDestroyed) {\n                    view.focus();\n                    if (options === null || options === void 0 ? void 0 : options.scrollIntoView) editor.commands.scrollIntoView();\n                }\n            });\n        };\n        if (view.hasFocus() && position === null || position === false) return true;\n        // we don’t try to resolve a NodeSelection or CellSelection\n        if (dispatch && position === null && !$be3c84bcbbb2383c$export$38b50bf35e79aaf3(editor.state.selection)) {\n            delayedFocus();\n            return true;\n        }\n        // pass through tr.doc instead of editor.state.doc\n        // since transactions could change the editors state before this command has been run\n        const selection = $be3c84bcbbb2383c$export$225b0233b78e0d61(tr.doc, position) || editor.state.selection;\n        const isSameSelection = editor.state.selection.eq(selection);\n        if (dispatch) {\n            if (!isSameSelection) tr.setSelection(selection);\n            // `tr.setSelection` resets the stored marks\n            // so we’ll restore them if the selection is the same as before\n            if (isSameSelection && tr.storedMarks) tr.setStoredMarks(tr.storedMarks);\n            delayedFocus();\n        }\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$forEach = (items, fn)=>(props)=>{\n        return items.every((item, index)=>fn(item, {\n                ...props,\n                index: index\n            }));\n    };\nconst $be3c84bcbbb2383c$var$insertContent = (value, options)=>({ tr: tr, commands: commands })=>{\n        return commands.insertContentAt({\n            from: tr.selection.from,\n            to: tr.selection.to\n        }, value, options);\n    };\nconst $be3c84bcbbb2383c$var$removeWhitespaces = (node)=>{\n    const children = node.childNodes;\n    for(let i = children.length - 1; i >= 0; i -= 1){\n        const child = children[i];\n        if (child.nodeType === 3 && child.nodeValue && /^(\\n\\s\\s|\\n)$/.test(child.nodeValue)) node.removeChild(child);\n        else if (child.nodeType === 1) $be3c84bcbbb2383c$var$removeWhitespaces(child);\n    }\n    return node;\n};\nfunction $be3c84bcbbb2383c$export$1b93bf03550cde01(value) {\n    // add a wrapper to preserve leading and trailing whitespace\n    const wrappedValue = `<body>${value}</body>`;\n    const html = new window.DOMParser().parseFromString(wrappedValue, 'text/html').body;\n    return $be3c84bcbbb2383c$var$removeWhitespaces(html);\n}\n/**\n * Takes a JSON or HTML content and creates a Prosemirror node or fragment from it.\n * @param content The JSON or HTML content to create the node from\n * @param schema The Prosemirror schema to use for the node\n * @param options Options for the parser\n * @returns The created Prosemirror node or fragment\n */ function $be3c84bcbbb2383c$export$12c64e96dddaee61(content, schema, options) {\n    if (content instanceof (0, $1krlL.Node) || content instanceof (0, $1krlL.Fragment)) return content;\n    options = {\n        slice: true,\n        parseOptions: {},\n        ...options\n    };\n    const isJSONContent = typeof content === 'object' && content !== null;\n    const isTextContent = typeof content === 'string';\n    if (isJSONContent) try {\n        const isArrayContent = Array.isArray(content) && content.length > 0;\n        // if the JSON Content is an array of nodes, create a fragment for each node\n        if (isArrayContent) return (0, $1krlL.Fragment).fromArray(content.map((item)=>schema.nodeFromJSON(item)));\n        const node = schema.nodeFromJSON(content);\n        if (options.errorOnInvalidContent) node.check();\n        return node;\n    } catch (error) {\n        if (options.errorOnInvalidContent) throw new Error('[tiptap error]: Invalid JSON content', {\n            cause: error\n        });\n        console.warn('[tiptap warn]: Invalid content.', 'Passed value:', content, 'Error:', error);\n        return $be3c84bcbbb2383c$export$12c64e96dddaee61('', schema, options);\n    }\n    if (isTextContent) {\n        // Check for invalid content\n        if (options.errorOnInvalidContent) {\n            let hasInvalidContent = false;\n            let invalidContent = '';\n            // A copy of the current schema with a catch-all node at the end\n            const contentCheckSchema = new (0, $1krlL.Schema)({\n                topNode: schema.spec.topNode,\n                marks: schema.spec.marks,\n                // Prosemirror's schemas are executed such that: the last to execute, matches last\n                // This means that we can add a catch-all node at the end of the schema to catch any content that we don't know how to handle\n                nodes: schema.spec.nodes.append({\n                    __tiptap__private__unknown__catch__all__node: {\n                        content: 'inline*',\n                        group: 'block',\n                        parseDOM: [\n                            {\n                                tag: '*',\n                                getAttrs: (e)=>{\n                                    // If this is ever called, we know that the content has something that we don't know how to handle in the schema\n                                    hasInvalidContent = true;\n                                    // Try to stringify the element for a more helpful error message\n                                    invalidContent = typeof e === 'string' ? e : e.outerHTML;\n                                    return null;\n                                }\n                            }\n                        ]\n                    }\n                })\n            });\n            if (options.slice) (0, $1krlL.DOMParser).fromSchema(contentCheckSchema).parseSlice($be3c84bcbbb2383c$export$1b93bf03550cde01(content), options.parseOptions);\n            else (0, $1krlL.DOMParser).fromSchema(contentCheckSchema).parse($be3c84bcbbb2383c$export$1b93bf03550cde01(content), options.parseOptions);\n            if (options.errorOnInvalidContent && hasInvalidContent) throw new Error('[tiptap error]: Invalid HTML content', {\n                cause: new Error(`Invalid element found: ${invalidContent}`)\n            });\n        }\n        const parser = (0, $1krlL.DOMParser).fromSchema(schema);\n        if (options.slice) return parser.parseSlice($be3c84bcbbb2383c$export$1b93bf03550cde01(content), options.parseOptions).content;\n        return parser.parse($be3c84bcbbb2383c$export$1b93bf03550cde01(content), options.parseOptions);\n    }\n    return $be3c84bcbbb2383c$export$12c64e96dddaee61('', schema, options);\n}\n// source: https://github.com/ProseMirror/prosemirror-state/blob/master/src/selection.js#L466\nfunction $be3c84bcbbb2383c$export$bf93acd215057ab0(tr, startLen, bias) {\n    const last = tr.steps.length - 1;\n    if (last < startLen) return;\n    const step = tr.steps[last];\n    if (!(step instanceof (0, $gfgdn.ReplaceStep) || step instanceof (0, $gfgdn.ReplaceAroundStep))) return;\n    const map = tr.mapping.maps[last];\n    let end = 0;\n    map.forEach((_from, _to, _newFrom, newTo)=>{\n        if (end === 0) end = newTo;\n    });\n    tr.setSelection((0, $1LeRC.Selection).near(tr.doc.resolve(end), bias));\n}\nconst $be3c84bcbbb2383c$var$isFragment = (nodeOrFragment)=>{\n    return !('type' in nodeOrFragment);\n};\nconst $be3c84bcbbb2383c$var$insertContentAt = (position, value, options)=>({ tr: tr, dispatch: dispatch, editor: editor })=>{\n        var _a;\n        if (dispatch) {\n            options = {\n                parseOptions: editor.options.parseOptions,\n                updateSelection: true,\n                applyInputRules: false,\n                applyPasteRules: false,\n                ...options\n            };\n            let content;\n            const emitContentError = (error)=>{\n                editor.emit('contentError', {\n                    editor: editor,\n                    error: error,\n                    disableCollaboration: ()=>{\n                        if (editor.storage.collaboration) editor.storage.collaboration.isDisabled = true;\n                    }\n                });\n            };\n            const parseOptions = {\n                preserveWhitespace: 'full',\n                ...options.parseOptions\n            };\n            // If `emitContentError` is enabled, we want to check the content for errors\n            // but ignore them (do not remove the invalid content from the document)\n            if (!options.errorOnInvalidContent && !editor.options.enableContentCheck && editor.options.emitContentError) try {\n                $be3c84bcbbb2383c$export$12c64e96dddaee61(value, editor.schema, {\n                    parseOptions: parseOptions,\n                    errorOnInvalidContent: true\n                });\n            } catch (e) {\n                emitContentError(e);\n            }\n            try {\n                content = $be3c84bcbbb2383c$export$12c64e96dddaee61(value, editor.schema, {\n                    parseOptions: parseOptions,\n                    errorOnInvalidContent: (_a = options.errorOnInvalidContent) !== null && _a !== void 0 ? _a : editor.options.enableContentCheck\n                });\n            } catch (e) {\n                emitContentError(e);\n                return false;\n            }\n            let { from: from, to: to } = typeof position === 'number' ? {\n                from: position,\n                to: position\n            } : {\n                from: position.from,\n                to: position.to\n            };\n            let isOnlyTextContent = true;\n            let isOnlyBlockContent = true;\n            const nodes = $be3c84bcbbb2383c$var$isFragment(content) ? content : [\n                content\n            ];\n            nodes.forEach((node)=>{\n                // check if added node is valid\n                node.check();\n                isOnlyTextContent = isOnlyTextContent ? node.isText && node.marks.length === 0 : false;\n                isOnlyBlockContent = isOnlyBlockContent ? node.isBlock : false;\n            });\n            // check if we can replace the wrapping node by\n            // the newly inserted content\n            // example:\n            // replace an empty paragraph by an inserted image\n            // instead of inserting the image below the paragraph\n            if (from === to && isOnlyBlockContent) {\n                const { parent: parent } = tr.doc.resolve(from);\n                const isEmptyTextBlock = parent.isTextblock && !parent.type.spec.code && !parent.childCount;\n                if (isEmptyTextBlock) {\n                    from -= 1;\n                    to += 1;\n                }\n            }\n            let newContent;\n            // if there is only plain text we have to use `insertText`\n            // because this will keep the current marks\n            if (isOnlyTextContent) {\n                // if value is string, we can use it directly\n                // otherwise if it is an array, we have to join it\n                if (Array.isArray(value)) newContent = value.map((v)=>v.text || '').join('');\n                else if (value instanceof (0, $1krlL.Fragment)) {\n                    let text = '';\n                    value.forEach((node)=>{\n                        if (node.text) text += node.text;\n                    });\n                    newContent = text;\n                } else if (typeof value === 'object' && !!value && !!value.text) newContent = value.text;\n                else newContent = value;\n                tr.insertText(newContent, from, to);\n            } else {\n                newContent = content;\n                tr.replaceWith(from, to, newContent);\n            }\n            // set cursor at end of inserted content\n            if (options.updateSelection) $be3c84bcbbb2383c$export$bf93acd215057ab0(tr, tr.steps.length - 1, -1);\n            if (options.applyInputRules) tr.setMeta('applyInputRules', {\n                from: from,\n                text: newContent\n            });\n            if (options.applyPasteRules) tr.setMeta('applyPasteRules', {\n                from: from,\n                text: newContent\n            });\n        }\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$joinUp = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.joinUp)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$joinDown = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.joinDown)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$joinBackward = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.joinBackward)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$joinForward = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.joinForward)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$joinItemBackward = ()=>({ state: state, dispatch: dispatch, tr: tr })=>{\n        try {\n            const point = (0, $gfgdn.joinPoint)(state.doc, state.selection.$from.pos, -1);\n            if (point === null || point === undefined) return false;\n            tr.join(point, 2);\n            if (dispatch) dispatch(tr);\n            return true;\n        } catch  {\n            return false;\n        }\n    };\nconst $be3c84bcbbb2383c$var$joinItemForward = ()=>({ state: state, dispatch: dispatch, tr: tr })=>{\n        try {\n            const point = (0, $gfgdn.joinPoint)(state.doc, state.selection.$from.pos, 1);\n            if (point === null || point === undefined) return false;\n            tr.join(point, 2);\n            if (dispatch) dispatch(tr);\n            return true;\n        } catch  {\n            return false;\n        }\n    };\nconst $be3c84bcbbb2383c$var$joinTextblockBackward = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.joinTextblockBackward)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$joinTextblockForward = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.joinTextblockForward)(state, dispatch);\n    };\nfunction $be3c84bcbbb2383c$export$6159e43e50a41987() {\n    return typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false;\n}\nfunction $be3c84bcbbb2383c$var$normalizeKeyName(name) {\n    const parts = name.split(/-(?!$)/);\n    let result = parts[parts.length - 1];\n    if (result === 'Space') result = ' ';\n    let alt;\n    let ctrl;\n    let shift;\n    let meta;\n    for(let i = 0; i < parts.length - 1; i += 1){\n        const mod = parts[i];\n        if (/^(cmd|meta|m)$/i.test(mod)) meta = true;\n        else if (/^a(lt)?$/i.test(mod)) alt = true;\n        else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;\n        else if (/^s(hift)?$/i.test(mod)) shift = true;\n        else if (/^mod$/i.test(mod)) {\n            if ($be3c84bcbbb2383c$export$86c1a3f9ab33da5c() || $be3c84bcbbb2383c$export$6159e43e50a41987()) meta = true;\n            else ctrl = true;\n        } else throw new Error(`Unrecognized modifier name: ${mod}`);\n    }\n    if (alt) result = `Alt-${result}`;\n    if (ctrl) result = `Ctrl-${result}`;\n    if (meta) result = `Meta-${result}`;\n    if (shift) result = `Shift-${result}`;\n    return result;\n}\nconst $be3c84bcbbb2383c$var$keyboardShortcut = (name)=>({ editor: editor, view: view, tr: tr, dispatch: dispatch })=>{\n        const keys = $be3c84bcbbb2383c$var$normalizeKeyName(name).split(/-(?!$)/);\n        const key = keys.find((item)=>![\n                'Alt',\n                'Ctrl',\n                'Meta',\n                'Shift'\n            ].includes(item));\n        const event = new KeyboardEvent('keydown', {\n            key: key === 'Space' ? ' ' : key,\n            altKey: keys.includes('Alt'),\n            ctrlKey: keys.includes('Ctrl'),\n            metaKey: keys.includes('Meta'),\n            shiftKey: keys.includes('Shift'),\n            bubbles: true,\n            cancelable: true\n        });\n        const capturedTransaction = editor.captureTransaction(()=>{\n            view.someProp('handleKeyDown', (f)=>f(view, event));\n        });\n        capturedTransaction === null || capturedTransaction === void 0 || capturedTransaction.steps.forEach((step)=>{\n            const newStep = step.map(tr.mapping);\n            if (newStep && dispatch) tr.maybeStep(newStep);\n        });\n        return true;\n    };\nfunction $be3c84bcbbb2383c$export$7a24a642b0c7ad29(state, typeOrName, attributes = {}) {\n    const { from: from, to: to, empty: empty } = state.selection;\n    const type = typeOrName ? $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema) : null;\n    const nodeRanges = [];\n    state.doc.nodesBetween(from, to, (node, pos)=>{\n        if (node.isText) return;\n        const relativeFrom = Math.max(from, pos);\n        const relativeTo = Math.min(to, pos + node.nodeSize);\n        nodeRanges.push({\n            node: node,\n            from: relativeFrom,\n            to: relativeTo\n        });\n    });\n    const selectionRange = to - from;\n    const matchedNodeRanges = nodeRanges.filter((nodeRange)=>{\n        if (!type) return true;\n        return type.name === nodeRange.node.type.name;\n    }).filter((nodeRange)=>$be3c84bcbbb2383c$export$7aeb68f71172641d(nodeRange.node.attrs, attributes, {\n            strict: false\n        }));\n    if (empty) return !!matchedNodeRanges.length;\n    const range = matchedNodeRanges.reduce((sum, nodeRange)=>sum + nodeRange.to - nodeRange.from, 0);\n    return range >= selectionRange;\n}\nconst $be3c84bcbbb2383c$var$lift = (typeOrName, attributes = {})=>({ state: state, dispatch: dispatch })=>{\n        const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        const isActive = $be3c84bcbbb2383c$export$7a24a642b0c7ad29(state, type, attributes);\n        if (!isActive) return false;\n        return (0, $9D0ij.lift)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$liftEmptyBlock = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.liftEmptyBlock)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$liftListItem = (typeOrName)=>({ state: state, dispatch: dispatch })=>{\n        const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        return (0, $ie1jF.liftListItem)(type)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$newlineInCode = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.newlineInCode)(state, dispatch);\n    };\n/**\n * Get the type of a schema item by its name.\n * @param name The name of the schema item\n * @param schema The Prosemiror schema to search in\n * @returns The type of the schema item (`node` or `mark`), or null if it doesn't exist\n */ function $be3c84bcbbb2383c$export$e501dfcf737a48e0(name, schema) {\n    if (schema.nodes[name]) return 'node';\n    if (schema.marks[name]) return 'mark';\n    return null;\n}\n/**\n * Remove a property or an array of properties from an object\n * @param obj Object\n * @param key Key to remove\n */ function $be3c84bcbbb2383c$export$8694e5c03a4df8e6(obj, propOrProps) {\n    const props = typeof propOrProps === 'string' ? [\n        propOrProps\n    ] : propOrProps;\n    return Object.keys(obj).reduce((newObj, prop)=>{\n        if (!props.includes(prop)) newObj[prop] = obj[prop];\n        return newObj;\n    }, {});\n}\nconst $be3c84bcbbb2383c$var$resetAttributes = (typeOrName, attributes)=>({ tr: tr, state: state, dispatch: dispatch })=>{\n        let nodeType = null;\n        let markType = null;\n        const schemaType = $be3c84bcbbb2383c$export$e501dfcf737a48e0(typeof typeOrName === 'string' ? typeOrName : typeOrName.name, state.schema);\n        if (!schemaType) return false;\n        if (schemaType === 'node') nodeType = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        if (schemaType === 'mark') markType = $be3c84bcbbb2383c$export$b1269d6bf6e491ec(typeOrName, state.schema);\n        if (dispatch) tr.selection.ranges.forEach((range)=>{\n            state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos)=>{\n                if (nodeType && nodeType === node.type) tr.setNodeMarkup(pos, undefined, $be3c84bcbbb2383c$export$8694e5c03a4df8e6(node.attrs, attributes));\n                if (markType && node.marks.length) node.marks.forEach((mark)=>{\n                    if (markType === mark.type) tr.addMark(pos, pos + node.nodeSize, markType.create($be3c84bcbbb2383c$export$8694e5c03a4df8e6(mark.attrs, attributes)));\n                });\n            });\n        });\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$scrollIntoView = ()=>({ tr: tr, dispatch: dispatch })=>{\n        if (dispatch) tr.scrollIntoView();\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$selectAll = ()=>({ tr: tr, dispatch: dispatch })=>{\n        if (dispatch) {\n            const selection = new (0, $1LeRC.AllSelection)(tr.doc);\n            tr.setSelection(selection);\n        }\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$selectNodeBackward = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.selectNodeBackward)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$selectNodeForward = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.selectNodeForward)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$selectParentNode = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.selectParentNode)(state, dispatch);\n    };\n// @ts-ignore\n// TODO: add types to @types/prosemirror-commands\nconst $be3c84bcbbb2383c$var$selectTextblockEnd = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.selectTextblockEnd)(state, dispatch);\n    };\n// @ts-ignore\n// TODO: add types to @types/prosemirror-commands\nconst $be3c84bcbbb2383c$var$selectTextblockStart = ()=>({ state: state, dispatch: dispatch })=>{\n        return (0, $9D0ij.selectTextblockStart)(state, dispatch);\n    };\n/**\n * Create a new Prosemirror document node from content.\n * @param content The JSON or HTML content to create the document from\n * @param schema The Prosemirror schema to use for the document\n * @param parseOptions Options for the parser\n * @returns The created Prosemirror document node\n */ function $be3c84bcbbb2383c$export$37330def6e48b4c9(content, schema, parseOptions = {}, options = {}) {\n    return $be3c84bcbbb2383c$export$12c64e96dddaee61(content, schema, {\n        slice: false,\n        parseOptions: parseOptions,\n        errorOnInvalidContent: options.errorOnInvalidContent\n    });\n}\nconst $be3c84bcbbb2383c$var$setContent = (content, emitUpdate = false, parseOptions = {}, options = {})=>({ editor: editor, tr: tr, dispatch: dispatch, commands: commands })=>{\n        var _a, _b;\n        const { doc: doc } = tr;\n        // This is to keep backward compatibility with the previous behavior\n        // TODO remove this in the next major version\n        if (parseOptions.preserveWhitespace !== 'full') {\n            const document1 = $be3c84bcbbb2383c$export$37330def6e48b4c9(content, editor.schema, parseOptions, {\n                errorOnInvalidContent: (_a = options.errorOnInvalidContent) !== null && _a !== void 0 ? _a : editor.options.enableContentCheck\n            });\n            if (dispatch) tr.replaceWith(0, doc.content.size, document1).setMeta('preventUpdate', !emitUpdate);\n            return true;\n        }\n        if (dispatch) tr.setMeta('preventUpdate', !emitUpdate);\n        return commands.insertContentAt({\n            from: 0,\n            to: doc.content.size\n        }, content, {\n            parseOptions: parseOptions,\n            errorOnInvalidContent: (_b = options.errorOnInvalidContent) !== null && _b !== void 0 ? _b : editor.options.enableContentCheck\n        });\n    };\nfunction $be3c84bcbbb2383c$export$2cd1d0e1f861bae0(state, typeOrName) {\n    const type = $be3c84bcbbb2383c$export$b1269d6bf6e491ec(typeOrName, state.schema);\n    const { from: from, to: to, empty: empty } = state.selection;\n    const marks = [];\n    if (empty) {\n        if (state.storedMarks) marks.push(...state.storedMarks);\n        marks.push(...state.selection.$head.marks());\n    } else state.doc.nodesBetween(from, to, (node)=>{\n        marks.push(...node.marks);\n    });\n    const mark = marks.find((markItem)=>markItem.type.name === type.name);\n    if (!mark) return {};\n    return {\n        ...mark.attrs\n    };\n}\n/**\n * Returns a new `Transform` based on all steps of the passed transactions.\n * @param oldDoc The Prosemirror node to start from\n * @param transactions The transactions to combine\n * @returns A new `Transform` with all steps of the passed transactions\n */ function $be3c84bcbbb2383c$export$f945f1716a5df33d(oldDoc, transactions) {\n    const transform = new (0, $gfgdn.Transform)(oldDoc);\n    transactions.forEach((transaction)=>{\n        transaction.steps.forEach((step)=>{\n            transform.step(step);\n        });\n    });\n    return transform;\n}\n/**\n * Gets the default block type at a given match\n * @param match The content match to get the default block type from\n * @returns The default block type or null\n */ function $be3c84bcbbb2383c$export$6133a2de0e8ac885(match) {\n    for(let i = 0; i < match.edgeCount; i += 1){\n        const { type: type } = match.edge(i);\n        if (type.isTextblock && !type.hasRequiredAttrs()) return type;\n    }\n    return null;\n}\n/**\n * Find children inside a Prosemirror node that match a predicate.\n * @param node The Prosemirror node to search in\n * @param predicate The predicate to match\n * @returns An array of nodes with their positions\n */ function $be3c84bcbbb2383c$export$f94ca194e830789c(node, predicate) {\n    const nodesWithPos = [];\n    node.descendants((child, pos)=>{\n        if (predicate(child)) nodesWithPos.push({\n            node: child,\n            pos: pos\n        });\n    });\n    return nodesWithPos;\n}\n/**\n * Same as `findChildren` but searches only within a `range`.\n * @param node The Prosemirror node to search in\n * @param range The range to search in\n * @param predicate The predicate to match\n * @returns An array of nodes with their positions\n */ function $be3c84bcbbb2383c$export$6a2a251dde98a23(node, range, predicate) {\n    const nodesWithPos = [];\n    // if (range.from === range.to) {\n    //   const nodeAt = node.nodeAt(range.from)\n    //   if (nodeAt) {\n    //     nodesWithPos.push({\n    //       node: nodeAt,\n    //       pos: range.from,\n    //     })\n    //   }\n    // }\n    node.nodesBetween(range.from, range.to, (child, pos)=>{\n        if (predicate(child)) nodesWithPos.push({\n            node: child,\n            pos: pos\n        });\n    });\n    return nodesWithPos;\n}\n/**\n * Finds the closest parent node to a resolved position that matches a predicate.\n * @param $pos The resolved position to search from\n * @param predicate The predicate to match\n * @returns The closest parent node to the resolved position that matches the predicate\n * @example ```js\n * findParentNodeClosestToPos($from, node => node.type.name === 'paragraph')\n * ```\n */ function $be3c84bcbbb2383c$export$fe09644e3bc6166b($pos, predicate) {\n    for(let i = $pos.depth; i > 0; i -= 1){\n        const node = $pos.node(i);\n        if (predicate(node)) return {\n            pos: i > 0 ? $pos.before(i) : 0,\n            start: $pos.start(i),\n            depth: i,\n            node: node\n        };\n    }\n}\n/**\n * Finds the closest parent node to the current selection that matches a predicate.\n * @param predicate The predicate to match\n * @returns A command that finds the closest parent node to the current selection that matches the predicate\n * @example ```js\n * findParentNode(node => node.type.name === 'paragraph')\n * ```\n */ function $be3c84bcbbb2383c$export$dc159056ffdb4c76(predicate) {\n    return (selection)=>$be3c84bcbbb2383c$export$fe09644e3bc6166b(selection.$from, predicate);\n}\nfunction $be3c84bcbbb2383c$export$19a621270f26273c(extensions, editor) {\n    const resolvedExtensions = $be3c84bcbbb2383c$var$ExtensionManager.resolve(extensions);\n    return $be3c84bcbbb2383c$export$71bc12a97b59a858(resolvedExtensions, editor);\n}\n/**\n * Generate HTML from a JSONContent\n * @param doc The JSONContent to generate HTML from\n * @param extensions The extensions to use for the schema\n * @returns The generated HTML\n */ function $be3c84bcbbb2383c$export$4f413073eb19378c(doc, extensions) {\n    const schema = $be3c84bcbbb2383c$export$19a621270f26273c(extensions);\n    const contentNode = (0, $1krlL.Node).fromJSON(schema, doc);\n    return $be3c84bcbbb2383c$export$d1b60002472b2c81(contentNode.content, schema);\n}\n/**\n * Generate JSONContent from HTML\n * @param html The HTML to generate JSONContent from\n * @param extensions The extensions to use for the schema\n * @returns The generated JSONContent\n */ function $be3c84bcbbb2383c$export$d23738d50f257f47(html, extensions) {\n    const schema = $be3c84bcbbb2383c$export$19a621270f26273c(extensions);\n    const dom = $be3c84bcbbb2383c$export$1b93bf03550cde01(html);\n    return (0, $1krlL.DOMParser).fromSchema(schema).parse(dom).toJSON();\n}\n/**\n * Gets the text of a Prosemirror node\n * @param node The Prosemirror node\n * @param options Options for the text serializer & block separator\n * @returns The text of the node\n * @example ```js\n * const text = getText(node, { blockSeparator: '\\n' })\n * ```\n */ function $be3c84bcbbb2383c$export$c72d34660a162238(node, options) {\n    const range = {\n        from: 0,\n        to: node.content.size\n    };\n    return $be3c84bcbbb2383c$export$6e5992a7455d9ef6(node, range, options);\n}\n/**\n * Generate raw text from a JSONContent\n * @param doc The JSONContent to generate text from\n * @param extensions The extensions to use for the schema\n * @param options Options for the text generation f.e. blockSeparator or textSerializers\n * @returns The generated text\n */ function $be3c84bcbbb2383c$export$43625cf01e0b7b62(doc, extensions, options) {\n    const { blockSeparator: blockSeparator = '\\n\\n', textSerializers: textSerializers = {} } = options || {};\n    const schema = $be3c84bcbbb2383c$export$19a621270f26273c(extensions);\n    const contentNode = (0, $1krlL.Node).fromJSON(schema, doc);\n    return $be3c84bcbbb2383c$export$c72d34660a162238(contentNode, {\n        blockSeparator: blockSeparator,\n        textSerializers: {\n            ...$be3c84bcbbb2383c$export$fdd92b7d22ac071c(schema),\n            ...textSerializers\n        }\n    });\n}\nfunction $be3c84bcbbb2383c$export$e8c6736926dcac42(state, typeOrName) {\n    const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n    const { from: from, to: to } = state.selection;\n    const nodes = [];\n    state.doc.nodesBetween(from, to, (node)=>{\n        nodes.push(node);\n    });\n    const node = nodes.reverse().find((nodeItem)=>nodeItem.type.name === type.name);\n    if (!node) return {};\n    return {\n        ...node.attrs\n    };\n}\n/**\n * Get node or mark attributes by type or name on the current editor state\n * @param state The current editor state\n * @param typeOrName The node or mark type or name\n * @returns The attributes of the node or mark or an empty object\n */ function $be3c84bcbbb2383c$export$fe94072fee8a6976(state, typeOrName) {\n    const schemaType = $be3c84bcbbb2383c$export$e501dfcf737a48e0(typeof typeOrName === 'string' ? typeOrName : typeOrName.name, state.schema);\n    if (schemaType === 'node') return $be3c84bcbbb2383c$export$e8c6736926dcac42(state, typeOrName);\n    if (schemaType === 'mark') return $be3c84bcbbb2383c$export$2cd1d0e1f861bae0(state, typeOrName);\n    return {};\n}\n/**\n * Removes duplicated values within an array.\n * Supports numbers, strings and objects.\n */ function $be3c84bcbbb2383c$export$2e2262a44ac61957(array, by = JSON.stringify) {\n    const seen = {};\n    return array.filter((item)=>{\n        const key = by(item);\n        return Object.prototype.hasOwnProperty.call(seen, key) ? false : seen[key] = true;\n    });\n}\n/**\n * Removes duplicated ranges and ranges that are\n * fully captured by other ranges.\n */ function $be3c84bcbbb2383c$var$simplifyChangedRanges(changes) {\n    const uniqueChanges = $be3c84bcbbb2383c$export$2e2262a44ac61957(changes);\n    return uniqueChanges.length === 1 ? uniqueChanges : uniqueChanges.filter((change, index)=>{\n        const rest = uniqueChanges.filter((_, i)=>i !== index);\n        return !rest.some((otherChange)=>{\n            return change.oldRange.from >= otherChange.oldRange.from && change.oldRange.to <= otherChange.oldRange.to && change.newRange.from >= otherChange.newRange.from && change.newRange.to <= otherChange.newRange.to;\n        });\n    });\n}\n/**\n * Returns a list of changed ranges\n * based on the first and last state of all steps.\n */ function $be3c84bcbbb2383c$export$ba396fc65ff2f439(transform) {\n    const { mapping: mapping, steps: steps } = transform;\n    const changes = [];\n    mapping.maps.forEach((stepMap, index)=>{\n        const ranges = [];\n        // This accounts for step changes where no range was actually altered\n        // e.g. when setting a mark, node attribute, etc.\n        // @ts-ignore\n        if (!stepMap.ranges.length) {\n            const { from: from, to: to } = steps[index];\n            if (from === undefined || to === undefined) return;\n            ranges.push({\n                from: from,\n                to: to\n            });\n        } else stepMap.forEach((from, to)=>{\n            ranges.push({\n                from: from,\n                to: to\n            });\n        });\n        ranges.forEach(({ from: from, to: to })=>{\n            const newStart = mapping.slice(index).map(from, -1);\n            const newEnd = mapping.slice(index).map(to);\n            const oldStart = mapping.invert().map(newStart, -1);\n            const oldEnd = mapping.invert().map(newEnd);\n            changes.push({\n                oldRange: {\n                    from: oldStart,\n                    to: oldEnd\n                },\n                newRange: {\n                    from: newStart,\n                    to: newEnd\n                }\n            });\n        });\n    });\n    return $be3c84bcbbb2383c$var$simplifyChangedRanges(changes);\n}\nfunction $be3c84bcbbb2383c$export$d661e0733145fb37(node, startOffset = 0) {\n    const isTopNode = node.type === node.type.schema.topNodeType;\n    const increment = isTopNode ? 0 : 1;\n    const from = startOffset;\n    const to = from + node.nodeSize;\n    const marks = node.marks.map((mark)=>{\n        const output = {\n            type: mark.type.name\n        };\n        if (Object.keys(mark.attrs).length) output.attrs = {\n            ...mark.attrs\n        };\n        return output;\n    });\n    const attrs = {\n        ...node.attrs\n    };\n    const output = {\n        type: node.type.name,\n        from: from,\n        to: to\n    };\n    if (Object.keys(attrs).length) output.attrs = attrs;\n    if (marks.length) output.marks = marks;\n    if (node.content.childCount) {\n        output.content = [];\n        node.forEach((child, offset)=>{\n            var _a;\n            (_a = output.content) === null || _a === void 0 || _a.push($be3c84bcbbb2383c$export$d661e0733145fb37(child, startOffset + offset + increment));\n        });\n    }\n    if (node.text) output.text = node.text;\n    return output;\n}\nfunction $be3c84bcbbb2383c$export$c5fd7af7c5c1efa(from, to, doc) {\n    const marks = [];\n    // get all inclusive marks on empty selection\n    if (from === to) doc.resolve(from).marks().forEach((mark)=>{\n        const $pos = doc.resolve(from);\n        const range = $be3c84bcbbb2383c$export$8ceae6d06f5c4df5($pos, mark.type);\n        if (!range) return;\n        marks.push({\n            mark: mark,\n            ...range\n        });\n    });\n    else doc.nodesBetween(from, to, (node, pos)=>{\n        if (!node || (node === null || node === void 0 ? void 0 : node.nodeSize) === undefined) return;\n        marks.push(...node.marks.map((mark)=>({\n                from: pos,\n                to: pos + node.nodeSize,\n                mark: mark\n            })));\n    });\n    return marks;\n}\n/**\n * Finds the first node of a given type or name in the current selection.\n * @param state The editor state.\n * @param typeOrName The node type or name.\n * @param pos The position to start searching from.\n * @param maxDepth The maximum depth to search.\n * @returns The node and the depth as an array.\n */ const $be3c84bcbbb2383c$export$ee90757e11fae7cd = (state, typeOrName, pos, maxDepth = 20)=>{\n    const $pos = state.doc.resolve(pos);\n    let currentDepth = maxDepth;\n    let node = null;\n    while(currentDepth > 0 && node === null){\n        const currentNode = $pos.node(currentDepth);\n        if ((currentNode === null || currentNode === void 0 ? void 0 : currentNode.type.name) === typeOrName) node = currentNode;\n        else currentDepth -= 1;\n    }\n    return [\n        node,\n        currentDepth\n    ];\n};\n/**\n * Return attributes of an extension that should be splitted by keepOnSplit flag\n * @param extensionAttributes Array of extension attributes\n * @param typeName The type of the extension\n * @param attributes The attributes of the extension\n * @returns The splitted attributes\n */ function $be3c84bcbbb2383c$export$49b565bbca5fba3a(extensionAttributes, typeName, attributes) {\n    return Object.fromEntries(Object.entries(attributes).filter(([name])=>{\n        const extensionAttribute = extensionAttributes.find((item)=>{\n            return item.type === typeName && item.name === name;\n        });\n        if (!extensionAttribute) return false;\n        return extensionAttribute.attribute.keepOnSplit;\n    }));\n}\nfunction $be3c84bcbbb2383c$export$72001287e2a5b413(state, typeOrName, attributes = {}) {\n    const { empty: empty, ranges: ranges } = state.selection;\n    const type = typeOrName ? $be3c84bcbbb2383c$export$b1269d6bf6e491ec(typeOrName, state.schema) : null;\n    if (empty) return !!(state.storedMarks || state.selection.$from.marks()).filter((mark)=>{\n        if (!type) return true;\n        return type.name === mark.type.name;\n    }).find((mark)=>$be3c84bcbbb2383c$export$7aeb68f71172641d(mark.attrs, attributes, {\n            strict: false\n        }));\n    let selectionRange = 0;\n    const markRanges = [];\n    ranges.forEach(({ $from: $from, $to: $to })=>{\n        const from = $from.pos;\n        const to = $to.pos;\n        state.doc.nodesBetween(from, to, (node, pos)=>{\n            if (!node.isText && !node.marks.length) return;\n            const relativeFrom = Math.max(from, pos);\n            const relativeTo = Math.min(to, pos + node.nodeSize);\n            const range = relativeTo - relativeFrom;\n            selectionRange += range;\n            markRanges.push(...node.marks.map((mark)=>({\n                    mark: mark,\n                    from: relativeFrom,\n                    to: relativeTo\n                })));\n        });\n    });\n    if (selectionRange === 0) return false;\n    // calculate range of matched mark\n    const matchedRange = markRanges.filter((markRange)=>{\n        if (!type) return true;\n        return type.name === markRange.mark.type.name;\n    }).filter((markRange)=>$be3c84bcbbb2383c$export$7aeb68f71172641d(markRange.mark.attrs, attributes, {\n            strict: false\n        })).reduce((sum, markRange)=>sum + markRange.to - markRange.from, 0);\n    // calculate range of marks that excludes the searched mark\n    // for example `code` doesn’t allow any other marks\n    const excludedRange = markRanges.filter((markRange)=>{\n        if (!type) return true;\n        return markRange.mark.type !== type && markRange.mark.type.excludes(type);\n    }).reduce((sum, markRange)=>sum + markRange.to - markRange.from, 0);\n    // we only include the result of `excludedRange`\n    // if there is a match at all\n    const range = matchedRange > 0 ? matchedRange + excludedRange : matchedRange;\n    return range >= selectionRange;\n}\nfunction $be3c84bcbbb2383c$export$39e04e72f972b885(state, name, attributes = {}) {\n    if (!name) return $be3c84bcbbb2383c$export$7a24a642b0c7ad29(state, null, attributes) || $be3c84bcbbb2383c$export$72001287e2a5b413(state, null, attributes);\n    const schemaType = $be3c84bcbbb2383c$export$e501dfcf737a48e0(name, state.schema);\n    if (schemaType === 'node') return $be3c84bcbbb2383c$export$7a24a642b0c7ad29(state, name, attributes);\n    if (schemaType === 'mark') return $be3c84bcbbb2383c$export$72001287e2a5b413(state, name, attributes);\n    return false;\n}\nconst $be3c84bcbbb2383c$export$6a042f9d56fb39ec = (state, nodeType)=>{\n    const { $from: $from, $to: $to, $anchor: $anchor } = state.selection;\n    if (nodeType) {\n        const parentNode = $be3c84bcbbb2383c$export$dc159056ffdb4c76((node)=>node.type.name === nodeType)(state.selection);\n        if (!parentNode) return false;\n        const $parentPos = state.doc.resolve(parentNode.pos + 1);\n        if ($anchor.pos + 1 === $parentPos.end()) return true;\n        return false;\n    }\n    if ($to.parentOffset < $to.parent.nodeSize - 2 || $from.pos !== $to.pos) return false;\n    return true;\n};\nconst $be3c84bcbbb2383c$export$d0aa6c7595396956 = (state)=>{\n    const { $from: $from, $to: $to } = state.selection;\n    if ($from.parentOffset > 0 || $from.pos !== $to.pos) return false;\n    return true;\n};\nfunction $be3c84bcbbb2383c$export$ead95ff48ba53ffd(name, extensions) {\n    const { nodeExtensions: nodeExtensions } = $be3c84bcbbb2383c$export$36e8c2990da8266f(extensions);\n    const extension = nodeExtensions.find((item)=>item.name === name);\n    if (!extension) return false;\n    const context = {\n        name: extension.name,\n        options: extension.options,\n        storage: extension.storage\n    };\n    const group = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'group', context));\n    if (typeof group !== 'string') return false;\n    return group.split(' ').includes('list');\n}\n/**\n * Returns true if the given prosemirror node is empty.\n */ function $be3c84bcbbb2383c$export$cd58ff1081f6abe9(node, { checkChildren: checkChildren = true, ignoreWhitespace: ignoreWhitespace = false } = {}) {\n    var _a;\n    if (ignoreWhitespace) {\n        if (node.type.name === 'hardBreak') // Hard breaks are considered empty\n        return true;\n        if (node.isText) return /^\\s*$/m.test((_a = node.text) !== null && _a !== void 0 ? _a : '');\n    }\n    if (node.isText) return !node.text;\n    if (node.isAtom || node.isLeaf) return false;\n    if (node.content.childCount === 0) return true;\n    if (checkChildren) {\n        let isContentEmpty = true;\n        node.content.forEach((childNode)=>{\n            if (isContentEmpty === false) // Exit early for perf\n            return;\n            if (!$be3c84bcbbb2383c$export$cd58ff1081f6abe9(childNode, {\n                ignoreWhitespace: ignoreWhitespace,\n                checkChildren: checkChildren\n            })) isContentEmpty = false;\n        });\n        return isContentEmpty;\n    }\n    return false;\n}\nfunction $be3c84bcbbb2383c$export$a8c1d2c13abf8822(value) {\n    return value instanceof (0, $1LeRC.NodeSelection);\n}\nfunction $be3c84bcbbb2383c$export$660ecae6cde71645(view, from, to) {\n    const minPos = 0;\n    const maxPos = view.state.doc.content.size;\n    const resolvedFrom = $be3c84bcbbb2383c$export$6fb785c609d82593(from, minPos, maxPos);\n    const resolvedEnd = $be3c84bcbbb2383c$export$6fb785c609d82593(to, minPos, maxPos);\n    const start = view.coordsAtPos(resolvedFrom);\n    const end = view.coordsAtPos(resolvedEnd, -1);\n    const top = Math.min(start.top, end.top);\n    const bottom = Math.max(start.bottom, end.bottom);\n    const left = Math.min(start.left, end.left);\n    const right = Math.max(start.right, end.right);\n    const width = right - left;\n    const height = bottom - top;\n    const x = left;\n    const y = top;\n    const data = {\n        top: top,\n        bottom: bottom,\n        left: left,\n        right: right,\n        width: width,\n        height: height,\n        x: x,\n        y: y\n    };\n    return {\n        ...data,\n        toJSON: ()=>data\n    };\n}\n/**\n * The actual implementation of the rewriteUnknownContent function\n */ function $be3c84bcbbb2383c$var$rewriteUnknownContentInner({ json: json, validMarks: validMarks, validNodes: validNodes, options: options, rewrittenContent: rewrittenContent = [] }) {\n    if (json.marks && Array.isArray(json.marks)) json.marks = json.marks.filter((mark)=>{\n        const name = typeof mark === 'string' ? mark : mark.type;\n        if (validMarks.has(name)) return true;\n        rewrittenContent.push({\n            original: JSON.parse(JSON.stringify(mark)),\n            unsupported: name\n        });\n        // Just ignore any unknown marks\n        return false;\n    });\n    if (json.content && Array.isArray(json.content)) json.content = json.content.map((value)=>$be3c84bcbbb2383c$var$rewriteUnknownContentInner({\n            json: value,\n            validMarks: validMarks,\n            validNodes: validNodes,\n            options: options,\n            rewrittenContent: rewrittenContent\n        }).json).filter((a)=>a !== null && a !== undefined);\n    if (json.type && !validNodes.has(json.type)) {\n        rewrittenContent.push({\n            original: JSON.parse(JSON.stringify(json)),\n            unsupported: json.type\n        });\n        if (json.content && Array.isArray(json.content) && (options === null || options === void 0 ? void 0 : options.fallbackToParagraph) !== false) {\n            // Just treat it like a paragraph and hope for the best\n            json.type = 'paragraph';\n            return {\n                json: json,\n                rewrittenContent: rewrittenContent\n            };\n        }\n        // or just omit it entirely\n        return {\n            json: null,\n            rewrittenContent: rewrittenContent\n        };\n    }\n    return {\n        json: json,\n        rewrittenContent: rewrittenContent\n    };\n}\n/**\n * Rewrite unknown nodes and marks within JSON content\n * Allowing for user within the editor\n */ function $be3c84bcbbb2383c$export$e29d20b0f4dc64ed(/**\n * The JSON content to clean of unknown nodes and marks\n */ json, /**\n * The schema to use for validation\n */ schema, /**\n * Options for the cleaning process\n */ options) {\n    return $be3c84bcbbb2383c$var$rewriteUnknownContentInner({\n        json: json,\n        validNodes: new Set(Object.keys(schema.nodes)),\n        validMarks: new Set(Object.keys(schema.marks)),\n        options: options\n    });\n}\nfunction $be3c84bcbbb2383c$var$canSetMark(state, tr, newMarkType) {\n    var _a;\n    const { selection: selection } = tr;\n    let cursor = null;\n    if ($be3c84bcbbb2383c$export$38b50bf35e79aaf3(selection)) cursor = selection.$cursor;\n    if (cursor) {\n        const currentMarks = (_a = state.storedMarks) !== null && _a !== void 0 ? _a : cursor.marks();\n        // There can be no current marks that exclude the new mark\n        return !!newMarkType.isInSet(currentMarks) || !currentMarks.some((mark)=>mark.type.excludes(newMarkType));\n    }\n    const { ranges: ranges } = selection;\n    return ranges.some(({ $from: $from, $to: $to })=>{\n        let someNodeSupportsMark = $from.depth === 0 ? state.doc.inlineContent && state.doc.type.allowsMarkType(newMarkType) : false;\n        state.doc.nodesBetween($from.pos, $to.pos, (node, _pos, parent)=>{\n            // If we already found a mark that we can enable, return false to bypass the remaining search\n            if (someNodeSupportsMark) return false;\n            if (node.isInline) {\n                const parentAllowsMarkType = !parent || parent.type.allowsMarkType(newMarkType);\n                const currentMarksAllowMarkType = !!newMarkType.isInSet(node.marks) || !node.marks.some((otherMark)=>otherMark.type.excludes(newMarkType));\n                someNodeSupportsMark = parentAllowsMarkType && currentMarksAllowMarkType;\n            }\n            return !someNodeSupportsMark;\n        });\n        return someNodeSupportsMark;\n    });\n}\nconst $be3c84bcbbb2383c$var$setMark = (typeOrName, attributes = {})=>({ tr: tr, state: state, dispatch: dispatch })=>{\n        const { selection: selection } = tr;\n        const { empty: empty, ranges: ranges } = selection;\n        const type = $be3c84bcbbb2383c$export$b1269d6bf6e491ec(typeOrName, state.schema);\n        if (dispatch) {\n            if (empty) {\n                const oldAttributes = $be3c84bcbbb2383c$export$2cd1d0e1f861bae0(state, type);\n                tr.addStoredMark(type.create({\n                    ...oldAttributes,\n                    ...attributes\n                }));\n            } else ranges.forEach((range)=>{\n                const from = range.$from.pos;\n                const to = range.$to.pos;\n                state.doc.nodesBetween(from, to, (node, pos)=>{\n                    const trimmedFrom = Math.max(pos, from);\n                    const trimmedTo = Math.min(pos + node.nodeSize, to);\n                    const someHasMark = node.marks.find((mark)=>mark.type === type);\n                    // if there is already a mark of this type\n                    // we know that we have to merge its attributes\n                    // otherwise we add a fresh new mark\n                    if (someHasMark) node.marks.forEach((mark)=>{\n                        if (type === mark.type) tr.addMark(trimmedFrom, trimmedTo, type.create({\n                            ...mark.attrs,\n                            ...attributes\n                        }));\n                    });\n                    else tr.addMark(trimmedFrom, trimmedTo, type.create(attributes));\n                });\n            });\n        }\n        return $be3c84bcbbb2383c$var$canSetMark(state, tr, type);\n    };\nconst $be3c84bcbbb2383c$var$setMeta = (key, value)=>({ tr: tr })=>{\n        tr.setMeta(key, value);\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$setNode = (typeOrName, attributes = {})=>({ state: state, dispatch: dispatch, chain: chain })=>{\n        const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        let attributesToCopy;\n        if (state.selection.$anchor.sameParent(state.selection.$head)) // only copy attributes if the selection is pointing to a node of the same type\n        attributesToCopy = state.selection.$anchor.parent.attrs;\n        // TODO: use a fallback like insertContent?\n        if (!type.isTextblock) {\n            console.warn('[tiptap warn]: Currently \"setNode()\" only supports text block nodes.');\n            return false;\n        }\n        return chain()// try to convert node to default node if needed\n        .command(({ commands: commands })=>{\n            const canSetBlock = (0, $9D0ij.setBlockType)(type, {\n                ...attributesToCopy,\n                ...attributes\n            })(state);\n            if (canSetBlock) return true;\n            return commands.clearNodes();\n        }).command(({ state: updatedState })=>{\n            return (0, $9D0ij.setBlockType)(type, {\n                ...attributesToCopy,\n                ...attributes\n            })(updatedState, dispatch);\n        }).run();\n    };\nconst $be3c84bcbbb2383c$var$setNodeSelection = (position)=>({ tr: tr, dispatch: dispatch })=>{\n        if (dispatch) {\n            const { doc: doc } = tr;\n            const from = $be3c84bcbbb2383c$export$6fb785c609d82593(position, 0, doc.content.size);\n            const selection = (0, $1LeRC.NodeSelection).create(doc, from);\n            tr.setSelection(selection);\n        }\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$setTextSelection = (position)=>({ tr: tr, dispatch: dispatch })=>{\n        if (dispatch) {\n            const { doc: doc } = tr;\n            const { from: from, to: to } = typeof position === 'number' ? {\n                from: position,\n                to: position\n            } : position;\n            const minPos = (0, $1LeRC.TextSelection).atStart(doc).from;\n            const maxPos = (0, $1LeRC.TextSelection).atEnd(doc).to;\n            const resolvedFrom = $be3c84bcbbb2383c$export$6fb785c609d82593(from, minPos, maxPos);\n            const resolvedEnd = $be3c84bcbbb2383c$export$6fb785c609d82593(to, minPos, maxPos);\n            const selection = (0, $1LeRC.TextSelection).create(doc, resolvedFrom, resolvedEnd);\n            tr.setSelection(selection);\n        }\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$sinkListItem = (typeOrName)=>({ state: state, dispatch: dispatch })=>{\n        const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        return (0, $ie1jF.sinkListItem)(type)(state, dispatch);\n    };\nfunction $be3c84bcbbb2383c$var$ensureMarks(state, splittableMarks) {\n    const marks = state.storedMarks || state.selection.$to.parentOffset && state.selection.$from.marks();\n    if (marks) {\n        const filteredMarks = marks.filter((mark)=>splittableMarks === null || splittableMarks === void 0 ? void 0 : splittableMarks.includes(mark.type.name));\n        state.tr.ensureMarks(filteredMarks);\n    }\n}\nconst $be3c84bcbbb2383c$var$splitBlock = ({ keepMarks: keepMarks = true } = {})=>({ tr: tr, state: state, dispatch: dispatch, editor: editor })=>{\n        const { selection: selection, doc: doc } = tr;\n        const { $from: $from, $to: $to } = selection;\n        const extensionAttributes = editor.extensionManager.attributes;\n        const newAttributes = $be3c84bcbbb2383c$export$49b565bbca5fba3a(extensionAttributes, $from.node().type.name, $from.node().attrs);\n        if (selection instanceof (0, $1LeRC.NodeSelection) && selection.node.isBlock) {\n            if (!$from.parentOffset || !(0, $gfgdn.canSplit)(doc, $from.pos)) return false;\n            if (dispatch) {\n                if (keepMarks) $be3c84bcbbb2383c$var$ensureMarks(state, editor.extensionManager.splittableMarks);\n                tr.split($from.pos).scrollIntoView();\n            }\n            return true;\n        }\n        if (!$from.parent.isBlock) return false;\n        const atEnd = $to.parentOffset === $to.parent.content.size;\n        const deflt = $from.depth === 0 ? undefined : $be3c84bcbbb2383c$export$6133a2de0e8ac885($from.node(-1).contentMatchAt($from.indexAfter(-1)));\n        let types = atEnd && deflt ? [\n            {\n                type: deflt,\n                attrs: newAttributes\n            }\n        ] : undefined;\n        let can = (0, $gfgdn.canSplit)(tr.doc, tr.mapping.map($from.pos), 1, types);\n        if (!types && !can && (0, $gfgdn.canSplit)(tr.doc, tr.mapping.map($from.pos), 1, deflt ? [\n            {\n                type: deflt\n            }\n        ] : undefined)) {\n            can = true;\n            types = deflt ? [\n                {\n                    type: deflt,\n                    attrs: newAttributes\n                }\n            ] : undefined;\n        }\n        if (dispatch) {\n            if (can) {\n                if (selection instanceof (0, $1LeRC.TextSelection)) tr.deleteSelection();\n                tr.split(tr.mapping.map($from.pos), 1, types);\n                if (deflt && !atEnd && !$from.parentOffset && $from.parent.type !== deflt) {\n                    const first = tr.mapping.map($from.before());\n                    const $first = tr.doc.resolve(first);\n                    if ($from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt)) tr.setNodeMarkup(tr.mapping.map($from.before()), deflt);\n                }\n            }\n            if (keepMarks) $be3c84bcbbb2383c$var$ensureMarks(state, editor.extensionManager.splittableMarks);\n            tr.scrollIntoView();\n        }\n        return can;\n    };\nconst $be3c84bcbbb2383c$var$splitListItem = (typeOrName, overrideAttrs = {})=>({ tr: tr, state: state, dispatch: dispatch, editor: editor })=>{\n        var _a;\n        const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        const { $from: $from, $to: $to } = state.selection;\n        // @ts-ignore\n        // eslint-disable-next-line\n        const node = state.selection.node;\n        if (node && node.isBlock || $from.depth < 2 || !$from.sameParent($to)) return false;\n        const grandParent = $from.node(-1);\n        if (grandParent.type !== type) return false;\n        const extensionAttributes = editor.extensionManager.attributes;\n        if ($from.parent.content.size === 0 && $from.node(-1).childCount === $from.indexAfter(-1)) {\n            // In an empty block. If this is a nested list, the wrapping\n            // list item should be split. Otherwise, bail out and let next\n            // command handle lifting.\n            if ($from.depth === 2 || $from.node(-3).type !== type || $from.index(-2) !== $from.node(-2).childCount - 1) return false;\n            if (dispatch) {\n                let wrap = (0, $1krlL.Fragment).empty;\n                // eslint-disable-next-line\n                const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;\n                // Build a fragment containing empty versions of the structure\n                // from the outer list item to the parent node of the cursor\n                for(let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1)wrap = (0, $1krlL.Fragment).from($from.node(d).copy(wrap));\n                // eslint-disable-next-line\n                const depthAfter = $from.indexAfter(-1) < $from.node(-2).childCount ? 1 : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3;\n                // Add a second list item with an empty default start node\n                const newNextTypeAttributes = {\n                    ...$be3c84bcbbb2383c$export$49b565bbca5fba3a(extensionAttributes, $from.node().type.name, $from.node().attrs),\n                    ...overrideAttrs\n                };\n                const nextType = ((_a = type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.createAndFill(newNextTypeAttributes)) || undefined;\n                wrap = wrap.append((0, $1krlL.Fragment).from(type.createAndFill(null, nextType) || undefined));\n                const start = $from.before($from.depth - (depthBefore - 1));\n                tr.replace(start, $from.after(-depthAfter), new (0, $1krlL.Slice)(wrap, 4 - depthBefore, 0));\n                let sel = -1;\n                tr.doc.nodesBetween(start, tr.doc.content.size, (n, pos)=>{\n                    if (sel > -1) return false;\n                    if (n.isTextblock && n.content.size === 0) sel = pos + 1;\n                });\n                if (sel > -1) tr.setSelection((0, $1LeRC.TextSelection).near(tr.doc.resolve(sel)));\n                tr.scrollIntoView();\n            }\n            return true;\n        }\n        const nextType = $to.pos === $from.end() ? grandParent.contentMatchAt(0).defaultType : null;\n        const newTypeAttributes = {\n            ...$be3c84bcbbb2383c$export$49b565bbca5fba3a(extensionAttributes, grandParent.type.name, grandParent.attrs),\n            ...overrideAttrs\n        };\n        const newNextTypeAttributes = {\n            ...$be3c84bcbbb2383c$export$49b565bbca5fba3a(extensionAttributes, $from.node().type.name, $from.node().attrs),\n            ...overrideAttrs\n        };\n        tr.delete($from.pos, $to.pos);\n        const types = nextType ? [\n            {\n                type: type,\n                attrs: newTypeAttributes\n            },\n            {\n                type: nextType,\n                attrs: newNextTypeAttributes\n            }\n        ] : [\n            {\n                type: type,\n                attrs: newTypeAttributes\n            }\n        ];\n        if (!(0, $gfgdn.canSplit)(tr.doc, $from.pos, 2)) return false;\n        if (dispatch) {\n            const { selection: selection, storedMarks: storedMarks } = state;\n            const { splittableMarks: splittableMarks } = editor.extensionManager;\n            const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks();\n            tr.split($from.pos, 2, types).scrollIntoView();\n            if (!marks || !dispatch) return true;\n            const filteredMarks = marks.filter((mark)=>splittableMarks.includes(mark.type.name));\n            tr.ensureMarks(filteredMarks);\n        }\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$joinListBackwards = (tr, listType)=>{\n    const list = $be3c84bcbbb2383c$export$dc159056ffdb4c76((node)=>node.type === listType)(tr.selection);\n    if (!list) return true;\n    const before = tr.doc.resolve(Math.max(0, list.pos - 1)).before(list.depth);\n    if (before === undefined) return true;\n    const nodeBefore = tr.doc.nodeAt(before);\n    const canJoinBackwards = list.node.type === (nodeBefore === null || nodeBefore === void 0 ? void 0 : nodeBefore.type) && (0, $gfgdn.canJoin)(tr.doc, list.pos);\n    if (!canJoinBackwards) return true;\n    tr.join(list.pos);\n    return true;\n};\nconst $be3c84bcbbb2383c$var$joinListForwards = (tr, listType)=>{\n    const list = $be3c84bcbbb2383c$export$dc159056ffdb4c76((node)=>node.type === listType)(tr.selection);\n    if (!list) return true;\n    const after = tr.doc.resolve(list.start).after(list.depth);\n    if (after === undefined) return true;\n    const nodeAfter = tr.doc.nodeAt(after);\n    const canJoinForwards = list.node.type === (nodeAfter === null || nodeAfter === void 0 ? void 0 : nodeAfter.type) && (0, $gfgdn.canJoin)(tr.doc, after);\n    if (!canJoinForwards) return true;\n    tr.join(after);\n    return true;\n};\nconst $be3c84bcbbb2383c$var$toggleList = (listTypeOrName, itemTypeOrName, keepMarks, attributes = {})=>({ editor: editor, tr: tr, state: state, dispatch: dispatch, chain: chain, commands: commands, can: can })=>{\n        const { extensions: extensions, splittableMarks: splittableMarks } = editor.extensionManager;\n        const listType = $be3c84bcbbb2383c$export$d168cba70360dd3d(listTypeOrName, state.schema);\n        const itemType = $be3c84bcbbb2383c$export$d168cba70360dd3d(itemTypeOrName, state.schema);\n        const { selection: selection, storedMarks: storedMarks } = state;\n        const { $from: $from, $to: $to } = selection;\n        const range = $from.blockRange($to);\n        const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks();\n        if (!range) return false;\n        const parentList = $be3c84bcbbb2383c$export$dc159056ffdb4c76((node)=>$be3c84bcbbb2383c$export$ead95ff48ba53ffd(node.type.name, extensions))(selection);\n        if (range.depth >= 1 && parentList && range.depth - parentList.depth <= 1) {\n            // remove list\n            if (parentList.node.type === listType) return commands.liftListItem(itemType);\n            // change list type\n            if ($be3c84bcbbb2383c$export$ead95ff48ba53ffd(parentList.node.type.name, extensions) && listType.validContent(parentList.node.content) && dispatch) return chain().command(()=>{\n                tr.setNodeMarkup(parentList.pos, listType);\n                return true;\n            }).command(()=>$be3c84bcbbb2383c$var$joinListBackwards(tr, listType)).command(()=>$be3c84bcbbb2383c$var$joinListForwards(tr, listType)).run();\n        }\n        if (!keepMarks || !marks || !dispatch) return chain()// try to convert node to default node if needed\n        .command(()=>{\n            const canWrapInList = can().wrapInList(listType, attributes);\n            if (canWrapInList) return true;\n            return commands.clearNodes();\n        }).wrapInList(listType, attributes).command(()=>$be3c84bcbbb2383c$var$joinListBackwards(tr, listType)).command(()=>$be3c84bcbbb2383c$var$joinListForwards(tr, listType)).run();\n        return chain()// try to convert node to default node if needed\n        .command(()=>{\n            const canWrapInList = can().wrapInList(listType, attributes);\n            const filteredMarks = marks.filter((mark)=>splittableMarks.includes(mark.type.name));\n            tr.ensureMarks(filteredMarks);\n            if (canWrapInList) return true;\n            return commands.clearNodes();\n        }).wrapInList(listType, attributes).command(()=>$be3c84bcbbb2383c$var$joinListBackwards(tr, listType)).command(()=>$be3c84bcbbb2383c$var$joinListForwards(tr, listType)).run();\n    };\nconst $be3c84bcbbb2383c$var$toggleMark = (typeOrName, attributes = {}, options = {})=>({ state: state, commands: commands })=>{\n        const { extendEmptyMarkRange: extendEmptyMarkRange = false } = options;\n        const type = $be3c84bcbbb2383c$export$b1269d6bf6e491ec(typeOrName, state.schema);\n        const isActive = $be3c84bcbbb2383c$export$72001287e2a5b413(state, type, attributes);\n        if (isActive) return commands.unsetMark(type, {\n            extendEmptyMarkRange: extendEmptyMarkRange\n        });\n        return commands.setMark(type, attributes);\n    };\nconst $be3c84bcbbb2383c$var$toggleNode = (typeOrName, toggleTypeOrName, attributes = {})=>({ state: state, commands: commands })=>{\n        const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        const toggleType = $be3c84bcbbb2383c$export$d168cba70360dd3d(toggleTypeOrName, state.schema);\n        const isActive = $be3c84bcbbb2383c$export$7a24a642b0c7ad29(state, type, attributes);\n        let attributesToCopy;\n        if (state.selection.$anchor.sameParent(state.selection.$head)) // only copy attributes if the selection is pointing to a node of the same type\n        attributesToCopy = state.selection.$anchor.parent.attrs;\n        if (isActive) return commands.setNode(toggleType, attributesToCopy);\n        // If the node is not active, we want to set the new node type with the given attributes\n        // Copying over the attributes from the current node if the selection is pointing to a node of the same type\n        return commands.setNode(type, {\n            ...attributesToCopy,\n            ...attributes\n        });\n    };\nconst $be3c84bcbbb2383c$var$toggleWrap = (typeOrName, attributes = {})=>({ state: state, commands: commands })=>{\n        const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        const isActive = $be3c84bcbbb2383c$export$7a24a642b0c7ad29(state, type, attributes);\n        if (isActive) return commands.lift(type);\n        return commands.wrapIn(type, attributes);\n    };\nconst $be3c84bcbbb2383c$var$undoInputRule = ()=>({ state: state, dispatch: dispatch })=>{\n        const plugins = state.plugins;\n        for(let i = 0; i < plugins.length; i += 1){\n            const plugin = plugins[i];\n            let undoable;\n            // @ts-ignore\n            // eslint-disable-next-line\n            if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) {\n                if (dispatch) {\n                    const tr = state.tr;\n                    const toUndo = undoable.transform;\n                    for(let j = toUndo.steps.length - 1; j >= 0; j -= 1)tr.step(toUndo.steps[j].invert(toUndo.docs[j]));\n                    if (undoable.text) {\n                        const marks = tr.doc.resolve(undoable.from).marks();\n                        tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks));\n                    } else tr.delete(undoable.from, undoable.to);\n                }\n                return true;\n            }\n        }\n        return false;\n    };\nconst $be3c84bcbbb2383c$var$unsetAllMarks = ()=>({ tr: tr, dispatch: dispatch })=>{\n        const { selection: selection } = tr;\n        const { empty: empty, ranges: ranges } = selection;\n        if (empty) return true;\n        if (dispatch) ranges.forEach((range)=>{\n            tr.removeMark(range.$from.pos, range.$to.pos);\n        });\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$unsetMark = (typeOrName, options = {})=>({ tr: tr, state: state, dispatch: dispatch })=>{\n        var _a;\n        const { extendEmptyMarkRange: extendEmptyMarkRange = false } = options;\n        const { selection: selection } = tr;\n        const type = $be3c84bcbbb2383c$export$b1269d6bf6e491ec(typeOrName, state.schema);\n        const { $from: $from, empty: empty, ranges: ranges } = selection;\n        if (!dispatch) return true;\n        if (empty && extendEmptyMarkRange) {\n            let { from: from, to: to } = selection;\n            const attrs = (_a = $from.marks().find((mark)=>mark.type === type)) === null || _a === void 0 ? void 0 : _a.attrs;\n            const range = $be3c84bcbbb2383c$export$8ceae6d06f5c4df5($from, type, attrs);\n            if (range) {\n                from = range.from;\n                to = range.to;\n            }\n            tr.removeMark(from, to, type);\n        } else ranges.forEach((range)=>{\n            tr.removeMark(range.$from.pos, range.$to.pos, type);\n        });\n        tr.removeStoredMark(type);\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$updateAttributes = (typeOrName, attributes = {})=>({ tr: tr, state: state, dispatch: dispatch })=>{\n        let nodeType = null;\n        let markType = null;\n        const schemaType = $be3c84bcbbb2383c$export$e501dfcf737a48e0(typeof typeOrName === 'string' ? typeOrName : typeOrName.name, state.schema);\n        if (!schemaType) return false;\n        if (schemaType === 'node') nodeType = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        if (schemaType === 'mark') markType = $be3c84bcbbb2383c$export$b1269d6bf6e491ec(typeOrName, state.schema);\n        if (dispatch) tr.selection.ranges.forEach((range)=>{\n            const from = range.$from.pos;\n            const to = range.$to.pos;\n            let lastPos;\n            let lastNode;\n            let trimmedFrom;\n            let trimmedTo;\n            if (tr.selection.empty) state.doc.nodesBetween(from, to, (node, pos)=>{\n                if (nodeType && nodeType === node.type) {\n                    trimmedFrom = Math.max(pos, from);\n                    trimmedTo = Math.min(pos + node.nodeSize, to);\n                    lastPos = pos;\n                    lastNode = node;\n                }\n            });\n            else state.doc.nodesBetween(from, to, (node, pos)=>{\n                if (pos < from && nodeType && nodeType === node.type) {\n                    trimmedFrom = Math.max(pos, from);\n                    trimmedTo = Math.min(pos + node.nodeSize, to);\n                    lastPos = pos;\n                    lastNode = node;\n                }\n                if (pos >= from && pos <= to) {\n                    if (nodeType && nodeType === node.type) tr.setNodeMarkup(pos, undefined, {\n                        ...node.attrs,\n                        ...attributes\n                    });\n                    if (markType && node.marks.length) node.marks.forEach((mark)=>{\n                        if (markType === mark.type) {\n                            const trimmedFrom2 = Math.max(pos, from);\n                            const trimmedTo2 = Math.min(pos + node.nodeSize, to);\n                            tr.addMark(trimmedFrom2, trimmedTo2, markType.create({\n                                ...mark.attrs,\n                                ...attributes\n                            }));\n                        }\n                    });\n                }\n            });\n            if (lastNode) {\n                if (lastPos !== undefined) tr.setNodeMarkup(lastPos, undefined, {\n                    ...lastNode.attrs,\n                    ...attributes\n                });\n                if (markType && lastNode.marks.length) lastNode.marks.forEach((mark)=>{\n                    if (markType === mark.type) tr.addMark(trimmedFrom, trimmedTo, markType.create({\n                        ...mark.attrs,\n                        ...attributes\n                    }));\n                });\n            }\n        });\n        return true;\n    };\nconst $be3c84bcbbb2383c$var$wrapIn = (typeOrName, attributes = {})=>({ state: state, dispatch: dispatch })=>{\n        const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        return (0, $9D0ij.wrapIn)(type, attributes)(state, dispatch);\n    };\nconst $be3c84bcbbb2383c$var$wrapInList = (typeOrName, attributes = {})=>({ state: state, dispatch: dispatch })=>{\n        const type = $be3c84bcbbb2383c$export$d168cba70360dd3d(typeOrName, state.schema);\n        return (0, $ie1jF.wrapInList)(type, attributes)(state, dispatch);\n    };\nvar $be3c84bcbbb2383c$var$commands = /*#__PURE__*/ Object.freeze({\n    __proto__: null,\n    blur: $be3c84bcbbb2383c$var$blur,\n    clearContent: $be3c84bcbbb2383c$var$clearContent,\n    clearNodes: $be3c84bcbbb2383c$var$clearNodes,\n    command: $be3c84bcbbb2383c$var$command,\n    createParagraphNear: $be3c84bcbbb2383c$var$createParagraphNear,\n    cut: $be3c84bcbbb2383c$var$cut,\n    deleteCurrentNode: $be3c84bcbbb2383c$var$deleteCurrentNode,\n    deleteNode: $be3c84bcbbb2383c$var$deleteNode,\n    deleteRange: $be3c84bcbbb2383c$var$deleteRange,\n    deleteSelection: $be3c84bcbbb2383c$var$deleteSelection,\n    enter: $be3c84bcbbb2383c$var$enter,\n    exitCode: $be3c84bcbbb2383c$var$exitCode,\n    extendMarkRange: $be3c84bcbbb2383c$var$extendMarkRange,\n    first: $be3c84bcbbb2383c$var$first,\n    focus: $be3c84bcbbb2383c$var$focus,\n    forEach: $be3c84bcbbb2383c$var$forEach,\n    insertContent: $be3c84bcbbb2383c$var$insertContent,\n    insertContentAt: $be3c84bcbbb2383c$var$insertContentAt,\n    joinBackward: $be3c84bcbbb2383c$var$joinBackward,\n    joinDown: $be3c84bcbbb2383c$var$joinDown,\n    joinForward: $be3c84bcbbb2383c$var$joinForward,\n    joinItemBackward: $be3c84bcbbb2383c$var$joinItemBackward,\n    joinItemForward: $be3c84bcbbb2383c$var$joinItemForward,\n    joinTextblockBackward: $be3c84bcbbb2383c$var$joinTextblockBackward,\n    joinTextblockForward: $be3c84bcbbb2383c$var$joinTextblockForward,\n    joinUp: $be3c84bcbbb2383c$var$joinUp,\n    keyboardShortcut: $be3c84bcbbb2383c$var$keyboardShortcut,\n    lift: $be3c84bcbbb2383c$var$lift,\n    liftEmptyBlock: $be3c84bcbbb2383c$var$liftEmptyBlock,\n    liftListItem: $be3c84bcbbb2383c$var$liftListItem,\n    newlineInCode: $be3c84bcbbb2383c$var$newlineInCode,\n    resetAttributes: $be3c84bcbbb2383c$var$resetAttributes,\n    scrollIntoView: $be3c84bcbbb2383c$var$scrollIntoView,\n    selectAll: $be3c84bcbbb2383c$var$selectAll,\n    selectNodeBackward: $be3c84bcbbb2383c$var$selectNodeBackward,\n    selectNodeForward: $be3c84bcbbb2383c$var$selectNodeForward,\n    selectParentNode: $be3c84bcbbb2383c$var$selectParentNode,\n    selectTextblockEnd: $be3c84bcbbb2383c$var$selectTextblockEnd,\n    selectTextblockStart: $be3c84bcbbb2383c$var$selectTextblockStart,\n    setContent: $be3c84bcbbb2383c$var$setContent,\n    setMark: $be3c84bcbbb2383c$var$setMark,\n    setMeta: $be3c84bcbbb2383c$var$setMeta,\n    setNode: $be3c84bcbbb2383c$var$setNode,\n    setNodeSelection: $be3c84bcbbb2383c$var$setNodeSelection,\n    setTextSelection: $be3c84bcbbb2383c$var$setTextSelection,\n    sinkListItem: $be3c84bcbbb2383c$var$sinkListItem,\n    splitBlock: $be3c84bcbbb2383c$var$splitBlock,\n    splitListItem: $be3c84bcbbb2383c$var$splitListItem,\n    toggleList: $be3c84bcbbb2383c$var$toggleList,\n    toggleMark: $be3c84bcbbb2383c$var$toggleMark,\n    toggleNode: $be3c84bcbbb2383c$var$toggleNode,\n    toggleWrap: $be3c84bcbbb2383c$var$toggleWrap,\n    undoInputRule: $be3c84bcbbb2383c$var$undoInputRule,\n    unsetAllMarks: $be3c84bcbbb2383c$var$unsetAllMarks,\n    unsetMark: $be3c84bcbbb2383c$var$unsetMark,\n    updateAttributes: $be3c84bcbbb2383c$var$updateAttributes,\n    wrapIn: $be3c84bcbbb2383c$var$wrapIn,\n    wrapInList: $be3c84bcbbb2383c$var$wrapInList\n});\nconst $be3c84bcbbb2383c$var$Commands = $be3c84bcbbb2383c$export$eeddbf09bb970356.create({\n    name: 'commands',\n    addCommands () {\n        return {\n            ...$be3c84bcbbb2383c$var$commands\n        };\n    }\n});\nconst $be3c84bcbbb2383c$var$Drop = $be3c84bcbbb2383c$export$eeddbf09bb970356.create({\n    name: 'drop',\n    addProseMirrorPlugins () {\n        return [\n            new (0, $1LeRC.Plugin)({\n                key: new (0, $1LeRC.PluginKey)('tiptapDrop'),\n                props: {\n                    handleDrop: (_, e, slice, moved)=>{\n                        this.editor.emit('drop', {\n                            editor: this.editor,\n                            event: e,\n                            slice: slice,\n                            moved: moved\n                        });\n                    }\n                }\n            })\n        ];\n    }\n});\nconst $be3c84bcbbb2383c$var$Editable = $be3c84bcbbb2383c$export$eeddbf09bb970356.create({\n    name: 'editable',\n    addProseMirrorPlugins () {\n        return [\n            new (0, $1LeRC.Plugin)({\n                key: new (0, $1LeRC.PluginKey)('editable'),\n                props: {\n                    editable: ()=>this.editor.options.editable\n                }\n            })\n        ];\n    }\n});\nconst $be3c84bcbbb2383c$var$focusEventsPluginKey = new (0, $1LeRC.PluginKey)('focusEvents');\nconst $be3c84bcbbb2383c$var$FocusEvents = $be3c84bcbbb2383c$export$eeddbf09bb970356.create({\n    name: 'focusEvents',\n    addProseMirrorPlugins () {\n        const { editor: editor } = this;\n        return [\n            new (0, $1LeRC.Plugin)({\n                key: $be3c84bcbbb2383c$var$focusEventsPluginKey,\n                props: {\n                    handleDOMEvents: {\n                        focus: (view, event)=>{\n                            editor.isFocused = true;\n                            const transaction = editor.state.tr.setMeta('focus', {\n                                event: event\n                            }).setMeta('addToHistory', false);\n                            view.dispatch(transaction);\n                            return false;\n                        },\n                        blur: (view, event)=>{\n                            editor.isFocused = false;\n                            const transaction = editor.state.tr.setMeta('blur', {\n                                event: event\n                            }).setMeta('addToHistory', false);\n                            view.dispatch(transaction);\n                            return false;\n                        }\n                    }\n                }\n            })\n        ];\n    }\n});\nconst $be3c84bcbbb2383c$var$Keymap = $be3c84bcbbb2383c$export$eeddbf09bb970356.create({\n    name: 'keymap',\n    addKeyboardShortcuts () {\n        const handleBackspace = ()=>this.editor.commands.first(({ commands: commands })=>[\n                    ()=>commands.undoInputRule(),\n                    // maybe convert first text block node to default node\n                    ()=>commands.command(({ tr: tr })=>{\n                            const { selection: selection, doc: doc } = tr;\n                            const { empty: empty, $anchor: $anchor } = selection;\n                            const { pos: pos, parent: parent } = $anchor;\n                            const $parentPos = $anchor.parent.isTextblock && pos > 0 ? tr.doc.resolve(pos - 1) : $anchor;\n                            const parentIsIsolating = $parentPos.parent.type.spec.isolating;\n                            const parentPos = $anchor.pos - $anchor.parentOffset;\n                            const isAtStart = parentIsIsolating && $parentPos.parent.childCount === 1 ? parentPos === $anchor.pos : (0, $1LeRC.Selection).atStart(doc).from === pos;\n                            if (!empty || !parent.type.isTextblock || parent.textContent.length || !isAtStart || isAtStart && $anchor.parent.type.name === 'paragraph' // prevent clearNodes when no nodes to clear, otherwise history stack is appended\n                            ) return false;\n                            return commands.clearNodes();\n                        }),\n                    ()=>commands.deleteSelection(),\n                    ()=>commands.joinBackward(),\n                    ()=>commands.selectNodeBackward()\n                ]);\n        const handleDelete = ()=>this.editor.commands.first(({ commands: commands })=>[\n                    ()=>commands.deleteSelection(),\n                    ()=>commands.deleteCurrentNode(),\n                    ()=>commands.joinForward(),\n                    ()=>commands.selectNodeForward()\n                ]);\n        const handleEnter = ()=>this.editor.commands.first(({ commands: commands })=>[\n                    ()=>commands.newlineInCode(),\n                    ()=>commands.createParagraphNear(),\n                    ()=>commands.liftEmptyBlock(),\n                    ()=>commands.splitBlock()\n                ]);\n        const baseKeymap = {\n            Enter: handleEnter,\n            'Mod-Enter': ()=>this.editor.commands.exitCode(),\n            Backspace: handleBackspace,\n            'Mod-Backspace': handleBackspace,\n            'Shift-Backspace': handleBackspace,\n            Delete: handleDelete,\n            'Mod-Delete': handleDelete,\n            'Mod-a': ()=>this.editor.commands.selectAll()\n        };\n        const pcKeymap = {\n            ...baseKeymap\n        };\n        const macKeymap = {\n            ...baseKeymap,\n            'Ctrl-h': handleBackspace,\n            'Alt-Backspace': handleBackspace,\n            'Ctrl-d': handleDelete,\n            'Ctrl-Alt-Backspace': handleDelete,\n            'Alt-Delete': handleDelete,\n            'Alt-d': handleDelete,\n            'Ctrl-a': ()=>this.editor.commands.selectTextblockStart(),\n            'Ctrl-e': ()=>this.editor.commands.selectTextblockEnd()\n        };\n        if ($be3c84bcbbb2383c$export$86c1a3f9ab33da5c() || $be3c84bcbbb2383c$export$6159e43e50a41987()) return macKeymap;\n        return pcKeymap;\n    },\n    addProseMirrorPlugins () {\n        return [\n            // With this plugin we check if the whole document was selected and deleted.\n            // In this case we will additionally call `clearNodes()` to convert e.g. a heading\n            // to a paragraph if necessary.\n            // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well\n            // with many other commands.\n            new (0, $1LeRC.Plugin)({\n                key: new (0, $1LeRC.PluginKey)('clearDocument'),\n                appendTransaction: (transactions, oldState, newState)=>{\n                    if (transactions.some((tr)=>tr.getMeta('composition'))) return;\n                    const docChanges = transactions.some((transaction)=>transaction.docChanged) && !oldState.doc.eq(newState.doc);\n                    const ignoreTr = transactions.some((transaction)=>transaction.getMeta('preventClearDocument'));\n                    if (!docChanges || ignoreTr) return;\n                    const { empty: empty, from: from, to: to } = oldState.selection;\n                    const allFrom = (0, $1LeRC.Selection).atStart(oldState.doc).from;\n                    const allEnd = (0, $1LeRC.Selection).atEnd(oldState.doc).to;\n                    const allWasSelected = from === allFrom && to === allEnd;\n                    if (empty || !allWasSelected) return;\n                    const isEmpty = $be3c84bcbbb2383c$export$cd58ff1081f6abe9(newState.doc);\n                    if (!isEmpty) return;\n                    const tr = newState.tr;\n                    const state = $be3c84bcbbb2383c$export$83e24c5933427696({\n                        state: newState,\n                        transaction: tr\n                    });\n                    const { commands: commands } = new $be3c84bcbbb2383c$export$475014de15a4c342({\n                        editor: this.editor,\n                        state: state\n                    });\n                    commands.clearNodes();\n                    if (!tr.steps.length) return;\n                    return tr;\n                }\n            })\n        ];\n    }\n});\nconst $be3c84bcbbb2383c$var$Paste = $be3c84bcbbb2383c$export$eeddbf09bb970356.create({\n    name: 'paste',\n    addProseMirrorPlugins () {\n        return [\n            new (0, $1LeRC.Plugin)({\n                key: new (0, $1LeRC.PluginKey)('tiptapPaste'),\n                props: {\n                    handlePaste: (_view, e, slice)=>{\n                        this.editor.emit('paste', {\n                            editor: this.editor,\n                            event: e,\n                            slice: slice\n                        });\n                    }\n                }\n            })\n        ];\n    }\n});\nconst $be3c84bcbbb2383c$var$Tabindex = $be3c84bcbbb2383c$export$eeddbf09bb970356.create({\n    name: 'tabindex',\n    addProseMirrorPlugins () {\n        return [\n            new (0, $1LeRC.Plugin)({\n                key: new (0, $1LeRC.PluginKey)('tabindex'),\n                props: {\n                    attributes: ()=>this.editor.isEditable ? {\n                            tabindex: '0'\n                        } : {}\n                }\n            })\n        ];\n    }\n});\nvar $be3c84bcbbb2383c$export$cc3e2d3244e01b7f = /*#__PURE__*/ Object.freeze({\n    __proto__: null,\n    ClipboardTextSerializer: $be3c84bcbbb2383c$var$ClipboardTextSerializer,\n    Commands: $be3c84bcbbb2383c$var$Commands,\n    Drop: $be3c84bcbbb2383c$var$Drop,\n    Editable: $be3c84bcbbb2383c$var$Editable,\n    FocusEvents: $be3c84bcbbb2383c$var$FocusEvents,\n    Keymap: $be3c84bcbbb2383c$var$Keymap,\n    Paste: $be3c84bcbbb2383c$var$Paste,\n    Tabindex: $be3c84bcbbb2383c$var$Tabindex,\n    focusEventsPluginKey: $be3c84bcbbb2383c$var$focusEventsPluginKey\n});\nclass $be3c84bcbbb2383c$export$50c0270e74640068 {\n    get name() {\n        return this.node.type.name;\n    }\n    constructor(pos, editor, isBlock = false, node = null){\n        this.currentNode = null;\n        this.actualDepth = null;\n        this.isBlock = isBlock;\n        this.resolvedPos = pos;\n        this.editor = editor;\n        this.currentNode = node;\n    }\n    get node() {\n        return this.currentNode || this.resolvedPos.node();\n    }\n    get element() {\n        return this.editor.view.domAtPos(this.pos).node;\n    }\n    get depth() {\n        var _a;\n        return (_a = this.actualDepth) !== null && _a !== void 0 ? _a : this.resolvedPos.depth;\n    }\n    get pos() {\n        return this.resolvedPos.pos;\n    }\n    get content() {\n        return this.node.content;\n    }\n    set content(content) {\n        let from = this.from;\n        let to = this.to;\n        if (this.isBlock) {\n            if (this.content.size === 0) {\n                console.error(`You can\\u{2019}t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);\n                return;\n            }\n            from = this.from + 1;\n            to = this.to - 1;\n        }\n        this.editor.commands.insertContentAt({\n            from: from,\n            to: to\n        }, content);\n    }\n    get attributes() {\n        return this.node.attrs;\n    }\n    get textContent() {\n        return this.node.textContent;\n    }\n    get size() {\n        return this.node.nodeSize;\n    }\n    get from() {\n        if (this.isBlock) return this.pos;\n        return this.resolvedPos.start(this.resolvedPos.depth);\n    }\n    get range() {\n        return {\n            from: this.from,\n            to: this.to\n        };\n    }\n    get to() {\n        if (this.isBlock) return this.pos + this.size;\n        return this.resolvedPos.end(this.resolvedPos.depth) + (this.node.isText ? 0 : 1);\n    }\n    get parent() {\n        if (this.depth === 0) return null;\n        const parentPos = this.resolvedPos.start(this.resolvedPos.depth - 1);\n        const $pos = this.resolvedPos.doc.resolve(parentPos);\n        return new $be3c84bcbbb2383c$export$50c0270e74640068($pos, this.editor);\n    }\n    get before() {\n        let $pos = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2));\n        if ($pos.depth !== this.depth) $pos = this.resolvedPos.doc.resolve(this.from - 3);\n        return new $be3c84bcbbb2383c$export$50c0270e74640068($pos, this.editor);\n    }\n    get after() {\n        let $pos = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1));\n        if ($pos.depth !== this.depth) $pos = this.resolvedPos.doc.resolve(this.to + 3);\n        return new $be3c84bcbbb2383c$export$50c0270e74640068($pos, this.editor);\n    }\n    get children() {\n        const children = [];\n        this.node.content.forEach((node, offset)=>{\n            const isBlock = node.isBlock && !node.isTextblock;\n            const isNonTextAtom = node.isAtom && !node.isText;\n            const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1);\n            // Check if targetPos is within valid document range\n            if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) return;\n            const $pos = this.resolvedPos.doc.resolve(targetPos);\n            if (!isBlock && $pos.depth <= this.depth) return;\n            const childNodePos = new $be3c84bcbbb2383c$export$50c0270e74640068($pos, this.editor, isBlock, isBlock ? node : null);\n            if (isBlock) childNodePos.actualDepth = this.depth + 1;\n            children.push(new $be3c84bcbbb2383c$export$50c0270e74640068($pos, this.editor, isBlock, isBlock ? node : null));\n        });\n        return children;\n    }\n    get firstChild() {\n        return this.children[0] || null;\n    }\n    get lastChild() {\n        const children = this.children;\n        return children[children.length - 1] || null;\n    }\n    closest(selector, attributes = {}) {\n        let node = null;\n        let currentNode = this.parent;\n        while(currentNode && !node){\n            if (currentNode.node.type.name === selector) {\n                if (Object.keys(attributes).length > 0) {\n                    const nodeAttributes = currentNode.node.attrs;\n                    const attrKeys = Object.keys(attributes);\n                    for(let index = 0; index < attrKeys.length; index += 1){\n                        const key = attrKeys[index];\n                        if (nodeAttributes[key] !== attributes[key]) break;\n                    }\n                } else node = currentNode;\n            }\n            currentNode = currentNode.parent;\n        }\n        return node;\n    }\n    querySelector(selector, attributes = {}) {\n        return this.querySelectorAll(selector, attributes, true)[0] || null;\n    }\n    querySelectorAll(selector, attributes = {}, firstItemOnly = false) {\n        let nodes = [];\n        if (!this.children || this.children.length === 0) return nodes;\n        const attrKeys = Object.keys(attributes);\n        /**\n         * Finds all children recursively that match the selector and attributes\n         * If firstItemOnly is true, it will return the first item found\n         */ this.children.forEach((childPos)=>{\n            // If we already found a node and we only want the first item, we dont need to keep going\n            if (firstItemOnly && nodes.length > 0) return;\n            if (childPos.node.type.name === selector) {\n                const doesAllAttributesMatch = attrKeys.every((key)=>attributes[key] === childPos.node.attrs[key]);\n                if (doesAllAttributesMatch) nodes.push(childPos);\n            }\n            // If we already found a node and we only want the first item, we can stop here and skip the recursion\n            if (firstItemOnly && nodes.length > 0) return;\n            nodes = nodes.concat(childPos.querySelectorAll(selector, attributes, firstItemOnly));\n        });\n        return nodes;\n    }\n    setAttribute(attributes) {\n        const { tr: tr } = this.editor.state;\n        tr.setNodeMarkup(this.from, undefined, {\n            ...this.node.attrs,\n            ...attributes\n        });\n        this.editor.view.dispatch(tr);\n    }\n}\nconst $be3c84bcbbb2383c$var$style = `.ProseMirror {\n  position: relative;\n}\n\n.ProseMirror {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  white-space: break-spaces;\n  -webkit-font-variant-ligatures: none;\n  font-variant-ligatures: none;\n  font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n  white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n  white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n  white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n  display: inline !important;\n  border: none !important;\n  margin: 0 !important;\n  width: 0 !important;\n  height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n  display: none;\n  pointer-events: none;\n  position: absolute;\n  margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n  content: \"\";\n  display: block;\n  position: absolute;\n  top: -2px;\n  width: 20px;\n  border-top: 1px solid black;\n  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n  to {\n    visibility: hidden;\n  }\n}\n\n.ProseMirror-hideselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection * {\n  caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n  display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n  opacity: 0\n}`;\nfunction $be3c84bcbbb2383c$export$48321b481dd8a36(style, nonce, suffix) {\n    const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ''}]`);\n    if (tiptapStyleTag !== null) return tiptapStyleTag;\n    const styleNode = document.createElement('style');\n    if (nonce) styleNode.setAttribute('nonce', nonce);\n    styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ''}`, '');\n    styleNode.innerHTML = style;\n    document.getElementsByTagName('head')[0].appendChild(styleNode);\n    return styleNode;\n}\nclass $be3c84bcbbb2383c$export$7cda8d932e2f33c0 extends $be3c84bcbbb2383c$var$EventEmitter {\n    constructor(options = {}){\n        super();\n        this.isFocused = false;\n        /**\n         * The editor is considered initialized after the `create` event has been emitted.\n         */ this.isInitialized = false;\n        this.extensionStorage = {};\n        this.options = {\n            element: document.createElement('div'),\n            content: '',\n            injectCSS: true,\n            injectNonce: undefined,\n            extensions: [],\n            autofocus: false,\n            editable: true,\n            editorProps: {},\n            parseOptions: {},\n            coreExtensionOptions: {},\n            enableInputRules: true,\n            enablePasteRules: true,\n            enableCoreExtensions: true,\n            enableContentCheck: false,\n            emitContentError: false,\n            onBeforeCreate: ()=>null,\n            onCreate: ()=>null,\n            onUpdate: ()=>null,\n            onSelectionUpdate: ()=>null,\n            onTransaction: ()=>null,\n            onFocus: ()=>null,\n            onBlur: ()=>null,\n            onDestroy: ()=>null,\n            onContentError: ({ error: error })=>{\n                throw error;\n            },\n            onPaste: ()=>null,\n            onDrop: ()=>null\n        };\n        this.isCapturingTransaction = false;\n        this.capturedTransaction = null;\n        this.setOptions(options);\n        this.createExtensionManager();\n        this.createCommandManager();\n        this.createSchema();\n        this.on('beforeCreate', this.options.onBeforeCreate);\n        this.emit('beforeCreate', {\n            editor: this\n        });\n        this.on('contentError', this.options.onContentError);\n        this.createView();\n        this.injectCSS();\n        this.on('create', this.options.onCreate);\n        this.on('update', this.options.onUpdate);\n        this.on('selectionUpdate', this.options.onSelectionUpdate);\n        this.on('transaction', this.options.onTransaction);\n        this.on('focus', this.options.onFocus);\n        this.on('blur', this.options.onBlur);\n        this.on('destroy', this.options.onDestroy);\n        this.on('drop', ({ event: event, slice: slice, moved: moved })=>this.options.onDrop(event, slice, moved));\n        this.on('paste', ({ event: event, slice: slice })=>this.options.onPaste(event, slice));\n        window.setTimeout(()=>{\n            if (this.isDestroyed) return;\n            this.commands.focus(this.options.autofocus);\n            this.emit('create', {\n                editor: this\n            });\n            this.isInitialized = true;\n        }, 0);\n    }\n    /**\n     * Returns the editor storage.\n     */ get storage() {\n        return this.extensionStorage;\n    }\n    /**\n     * An object of all registered commands.\n     */ get commands() {\n        return this.commandManager.commands;\n    }\n    /**\n     * Create a command chain to call multiple commands at once.\n     */ chain() {\n        return this.commandManager.chain();\n    }\n    /**\n     * Check if a command or a command chain can be executed. Without executing it.\n     */ can() {\n        return this.commandManager.can();\n    }\n    /**\n     * Inject CSS styles.\n     */ injectCSS() {\n        if (this.options.injectCSS && document) this.css = $be3c84bcbbb2383c$export$48321b481dd8a36($be3c84bcbbb2383c$var$style, this.options.injectNonce);\n    }\n    /**\n     * Update editor options.\n     *\n     * @param options A list of options\n     */ setOptions(options = {}) {\n        this.options = {\n            ...this.options,\n            ...options\n        };\n        if (!this.view || !this.state || this.isDestroyed) return;\n        if (this.options.editorProps) this.view.setProps(this.options.editorProps);\n        this.view.updateState(this.state);\n    }\n    /**\n     * Update editable state of the editor.\n     */ setEditable(editable, emitUpdate = true) {\n        this.setOptions({\n            editable: editable\n        });\n        if (emitUpdate) this.emit('update', {\n            editor: this,\n            transaction: this.state.tr\n        });\n    }\n    /**\n     * Returns whether the editor is editable.\n     */ get isEditable() {\n        // since plugins are applied after creating the view\n        // `editable` is always `true` for one tick.\n        // that’s why we also have to check for `options.editable`\n        return this.options.editable && this.view && this.view.editable;\n    }\n    /**\n     * Returns the editor state.\n     */ get state() {\n        return this.view.state;\n    }\n    /**\n     * Register a ProseMirror plugin.\n     *\n     * @param plugin A ProseMirror plugin\n     * @param handlePlugins Control how to merge the plugin into the existing plugins.\n     * @returns The new editor state\n     */ registerPlugin(plugin, handlePlugins) {\n        const plugins = $be3c84bcbbb2383c$export$f6e2535fb5126e54(handlePlugins) ? handlePlugins(plugin, [\n            ...this.state.plugins\n        ]) : [\n            ...this.state.plugins,\n            plugin\n        ];\n        const state = this.state.reconfigure({\n            plugins: plugins\n        });\n        this.view.updateState(state);\n        return state;\n    }\n    /**\n     * Unregister a ProseMirror plugin.\n     *\n     * @param nameOrPluginKeyToRemove The plugins name\n     * @returns The new editor state or undefined if the editor is destroyed\n     */ unregisterPlugin(nameOrPluginKeyToRemove) {\n        if (this.isDestroyed) return undefined;\n        const prevPlugins = this.state.plugins;\n        let plugins = prevPlugins;\n        [].concat(nameOrPluginKeyToRemove).forEach((nameOrPluginKey)=>{\n            // @ts-ignore\n            const name = typeof nameOrPluginKey === 'string' ? `${nameOrPluginKey}$` : nameOrPluginKey.key;\n            // @ts-ignore\n            plugins = plugins.filter((plugin)=>!plugin.key.startsWith(name));\n        });\n        if (prevPlugins.length === plugins.length) // No plugin was removed, so we don’t need to update the state\n        return undefined;\n        const state = this.state.reconfigure({\n            plugins: plugins\n        });\n        this.view.updateState(state);\n        return state;\n    }\n    /**\n     * Creates an extension manager.\n     */ createExtensionManager() {\n        var _a, _b;\n        const coreExtensions = this.options.enableCoreExtensions ? [\n            $be3c84bcbbb2383c$var$Editable,\n            $be3c84bcbbb2383c$var$ClipboardTextSerializer.configure({\n                blockSeparator: (_b = (_a = this.options.coreExtensionOptions) === null || _a === void 0 ? void 0 : _a.clipboardTextSerializer) === null || _b === void 0 ? void 0 : _b.blockSeparator\n            }),\n            $be3c84bcbbb2383c$var$Commands,\n            $be3c84bcbbb2383c$var$FocusEvents,\n            $be3c84bcbbb2383c$var$Keymap,\n            $be3c84bcbbb2383c$var$Tabindex,\n            $be3c84bcbbb2383c$var$Drop,\n            $be3c84bcbbb2383c$var$Paste\n        ].filter((ext)=>{\n            if (typeof this.options.enableCoreExtensions === 'object') return this.options.enableCoreExtensions[ext.name] !== false;\n            return true;\n        }) : [];\n        const allExtensions = [\n            ...coreExtensions,\n            ...this.options.extensions\n        ].filter((extension)=>{\n            return [\n                'extension',\n                'node',\n                'mark'\n            ].includes(extension === null || extension === void 0 ? void 0 : extension.type);\n        });\n        this.extensionManager = new $be3c84bcbbb2383c$var$ExtensionManager(allExtensions, this);\n    }\n    /**\n     * Creates an command manager.\n     */ createCommandManager() {\n        this.commandManager = new $be3c84bcbbb2383c$export$475014de15a4c342({\n            editor: this\n        });\n    }\n    /**\n     * Creates a ProseMirror schema.\n     */ createSchema() {\n        this.schema = this.extensionManager.schema;\n    }\n    /**\n     * Creates a ProseMirror view.\n     */ createView() {\n        var _a;\n        let doc;\n        try {\n            doc = $be3c84bcbbb2383c$export$37330def6e48b4c9(this.options.content, this.schema, this.options.parseOptions, {\n                errorOnInvalidContent: this.options.enableContentCheck\n            });\n        } catch (e) {\n            if (!(e instanceof Error) || ![\n                '[tiptap error]: Invalid JSON content',\n                '[tiptap error]: Invalid HTML content'\n            ].includes(e.message)) // Not the content error we were expecting\n            throw e;\n            this.emit('contentError', {\n                editor: this,\n                error: e,\n                disableCollaboration: ()=>{\n                    if (this.storage.collaboration) this.storage.collaboration.isDisabled = true;\n                    // To avoid syncing back invalid content, reinitialize the extensions without the collaboration extension\n                    this.options.extensions = this.options.extensions.filter((extension)=>extension.name !== 'collaboration');\n                    // Restart the initialization process by recreating the extension manager with the new set of extensions\n                    this.createExtensionManager();\n                }\n            });\n            // Content is invalid, but attempt to create it anyway, stripping out the invalid parts\n            doc = $be3c84bcbbb2383c$export$37330def6e48b4c9(this.options.content, this.schema, this.options.parseOptions, {\n                errorOnInvalidContent: false\n            });\n        }\n        const selection = $be3c84bcbbb2383c$export$225b0233b78e0d61(doc, this.options.autofocus);\n        this.view = new (0, $edQEX.EditorView)(this.options.element, {\n            ...this.options.editorProps,\n            attributes: {\n                // add `role=\"textbox\"` to the editor element\n                role: 'textbox',\n                ...(_a = this.options.editorProps) === null || _a === void 0 ? void 0 : _a.attributes\n            },\n            dispatchTransaction: this.dispatchTransaction.bind(this),\n            state: (0, $1LeRC.EditorState).create({\n                doc: doc,\n                selection: selection || undefined\n            })\n        });\n        // `editor.view` is not yet available at this time.\n        // Therefore we will add all plugins and node views directly afterwards.\n        const newState = this.state.reconfigure({\n            plugins: this.extensionManager.plugins\n        });\n        this.view.updateState(newState);\n        this.createNodeViews();\n        this.prependClass();\n        // Let’s store the editor instance in the DOM element.\n        // So we’ll have access to it for tests.\n        // @ts-ignore\n        const dom = this.view.dom;\n        dom.editor = this;\n    }\n    /**\n     * Creates all node views.\n     */ createNodeViews() {\n        if (this.view.isDestroyed) return;\n        this.view.setProps({\n            nodeViews: this.extensionManager.nodeViews\n        });\n    }\n    /**\n     * Prepend class name to element.\n     */ prependClass() {\n        this.view.dom.className = `tiptap ${this.view.dom.className}`;\n    }\n    captureTransaction(fn) {\n        this.isCapturingTransaction = true;\n        fn();\n        this.isCapturingTransaction = false;\n        const tr = this.capturedTransaction;\n        this.capturedTransaction = null;\n        return tr;\n    }\n    /**\n     * The callback over which to send transactions (state updates) produced by the view.\n     *\n     * @param transaction An editor state transaction\n     */ dispatchTransaction(transaction) {\n        // if the editor / the view of the editor was destroyed\n        // the transaction should not be dispatched as there is no view anymore.\n        if (this.view.isDestroyed) return;\n        if (this.isCapturingTransaction) {\n            if (!this.capturedTransaction) {\n                this.capturedTransaction = transaction;\n                return;\n            }\n            transaction.steps.forEach((step)=>{\n                var _a;\n                return (_a = this.capturedTransaction) === null || _a === void 0 ? void 0 : _a.step(step);\n            });\n            return;\n        }\n        const state = this.state.apply(transaction);\n        const selectionHasChanged = !this.state.selection.eq(state.selection);\n        this.emit('beforeTransaction', {\n            editor: this,\n            transaction: transaction,\n            nextState: state\n        });\n        this.view.updateState(state);\n        this.emit('transaction', {\n            editor: this,\n            transaction: transaction\n        });\n        if (selectionHasChanged) this.emit('selectionUpdate', {\n            editor: this,\n            transaction: transaction\n        });\n        const focus = transaction.getMeta('focus');\n        const blur = transaction.getMeta('blur');\n        if (focus) this.emit('focus', {\n            editor: this,\n            event: focus.event,\n            transaction: transaction\n        });\n        if (blur) this.emit('blur', {\n            editor: this,\n            event: blur.event,\n            transaction: transaction\n        });\n        if (!transaction.docChanged || transaction.getMeta('preventUpdate')) return;\n        this.emit('update', {\n            editor: this,\n            transaction: transaction\n        });\n    }\n    /**\n     * Get attributes of the currently selected node or mark.\n     */ getAttributes(nameOrType) {\n        return $be3c84bcbbb2383c$export$fe94072fee8a6976(this.state, nameOrType);\n    }\n    isActive(nameOrAttributes, attributesOrUndefined) {\n        const name = typeof nameOrAttributes === 'string' ? nameOrAttributes : null;\n        const attributes = typeof nameOrAttributes === 'string' ? attributesOrUndefined : nameOrAttributes;\n        return $be3c84bcbbb2383c$export$39e04e72f972b885(this.state, name, attributes);\n    }\n    /**\n     * Get the document as JSON.\n     */ getJSON() {\n        return this.state.doc.toJSON();\n    }\n    /**\n     * Get the document as HTML.\n     */ getHTML() {\n        return $be3c84bcbbb2383c$export$d1b60002472b2c81(this.state.doc.content, this.schema);\n    }\n    /**\n     * Get the document as text.\n     */ getText(options) {\n        const { blockSeparator: blockSeparator = '\\n\\n', textSerializers: textSerializers = {} } = options || {};\n        return $be3c84bcbbb2383c$export$c72d34660a162238(this.state.doc, {\n            blockSeparator: blockSeparator,\n            textSerializers: {\n                ...$be3c84bcbbb2383c$export$fdd92b7d22ac071c(this.schema),\n                ...textSerializers\n            }\n        });\n    }\n    /**\n     * Check if there is no content.\n     */ get isEmpty() {\n        return $be3c84bcbbb2383c$export$cd58ff1081f6abe9(this.state.doc);\n    }\n    /**\n     * Get the number of characters for the current document.\n     *\n     * @deprecated\n     */ getCharacterCount() {\n        console.warn('[tiptap warn]: \"editor.getCharacterCount()\" is deprecated. Please use \"editor.storage.characterCount.characters()\" instead.');\n        return this.state.doc.content.size - 2;\n    }\n    /**\n     * Destroy the editor.\n     */ destroy() {\n        this.emit('destroy');\n        if (this.view) {\n            // Cleanup our reference to prevent circular references which caused memory leaks\n            // @ts-ignore\n            const dom = this.view.dom;\n            if (dom && dom.editor) delete dom.editor;\n            this.view.destroy();\n        }\n        this.removeAllListeners();\n    }\n    /**\n     * Check if the editor is already destroyed.\n     */ get isDestroyed() {\n        var _a;\n        // @ts-ignore\n        return !((_a = this.view) === null || _a === void 0 ? void 0 : _a.docView);\n    }\n    $node(selector, attributes) {\n        var _a;\n        return ((_a = this.$doc) === null || _a === void 0 ? void 0 : _a.querySelector(selector, attributes)) || null;\n    }\n    $nodes(selector, attributes) {\n        var _a;\n        return ((_a = this.$doc) === null || _a === void 0 ? void 0 : _a.querySelectorAll(selector, attributes)) || null;\n    }\n    $pos(pos) {\n        const $pos = this.state.doc.resolve(pos);\n        return new $be3c84bcbbb2383c$export$50c0270e74640068($pos, this);\n    }\n    get $doc() {\n        return this.$pos(0);\n    }\n}\n/**\n * Build an input rule that adds a mark when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */ function $be3c84bcbbb2383c$export$9f2cb743ab9131de(config) {\n    return new $be3c84bcbbb2383c$export$9b55e2b000ad65f2({\n        find: config.find,\n        handler: ({ state: state, range: range, match: match })=>{\n            const attributes = $be3c84bcbbb2383c$export$592682234826c0bd(config.getAttributes, undefined, match);\n            if (attributes === false || attributes === null) return null;\n            const { tr: tr } = state;\n            const captureGroup = match[match.length - 1];\n            const fullMatch = match[0];\n            if (captureGroup) {\n                const startSpaces = fullMatch.search(/\\S/);\n                const textStart = range.from + fullMatch.indexOf(captureGroup);\n                const textEnd = textStart + captureGroup.length;\n                const excludedMarks = $be3c84bcbbb2383c$export$c5fd7af7c5c1efa(range.from, range.to, state.doc).filter((item)=>{\n                    // @ts-ignore\n                    const excluded = item.mark.type.excluded;\n                    return excluded.find((type)=>type === config.type && type !== item.mark.type);\n                }).filter((item)=>item.to > textStart);\n                if (excludedMarks.length) return null;\n                if (textEnd < range.to) tr.delete(textEnd, range.to);\n                if (textStart > range.from) tr.delete(range.from + startSpaces, textStart);\n                const markEnd = range.from + startSpaces + captureGroup.length;\n                tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {}));\n                tr.removeStoredMark(config.type);\n            }\n        }\n    });\n}\n/**\n * Build an input rule that adds a node when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */ function $be3c84bcbbb2383c$export$6ca56856dfeaf9b6(config) {\n    return new $be3c84bcbbb2383c$export$9b55e2b000ad65f2({\n        find: config.find,\n        handler: ({ state: state, range: range, match: match })=>{\n            const attributes = $be3c84bcbbb2383c$export$592682234826c0bd(config.getAttributes, undefined, match) || {};\n            const { tr: tr } = state;\n            const start = range.from;\n            let end = range.to;\n            const newNode = config.type.create(attributes);\n            if (match[1]) {\n                const offset = match[0].lastIndexOf(match[1]);\n                let matchStart = start + offset;\n                if (matchStart > end) matchStart = end;\n                else end = matchStart + match[1].length;\n                // insert last typed character\n                const lastChar = match[0][match[0].length - 1];\n                tr.insertText(lastChar, start + match[0].length - 1);\n                // insert node from input rule\n                tr.replaceWith(matchStart, end, newNode);\n            } else if (match[0]) {\n                const insertionStart = config.type.isInline ? start : start - 1;\n                tr.insert(insertionStart, config.type.create(attributes)).delete(tr.mapping.map(start), tr.mapping.map(end));\n            }\n            tr.scrollIntoView();\n        }\n    });\n}\n/**\n * Build an input rule that changes the type of a textblock when the\n * matched text is typed into it. When using a regular expresion you’ll\n * probably want the regexp to start with `^`, so that the pattern can\n * only occur at the start of a textblock.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */ function $be3c84bcbbb2383c$export$cc081314d3f6ffb0(config) {\n    return new $be3c84bcbbb2383c$export$9b55e2b000ad65f2({\n        find: config.find,\n        handler: ({ state: state, range: range, match: match })=>{\n            const $start = state.doc.resolve(range.from);\n            const attributes = $be3c84bcbbb2383c$export$592682234826c0bd(config.getAttributes, undefined, match) || {};\n            if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), config.type)) return null;\n            state.tr.delete(range.from, range.to).setBlockType(range.from, range.from, config.type, attributes);\n        }\n    });\n}\n/**\n * Build an input rule that replaces text when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */ function $be3c84bcbbb2383c$export$3ba5a5a15d18a35c(config) {\n    return new $be3c84bcbbb2383c$export$9b55e2b000ad65f2({\n        find: config.find,\n        handler: ({ state: state, range: range, match: match })=>{\n            let insert = config.replace;\n            let start = range.from;\n            const end = range.to;\n            if (match[1]) {\n                const offset = match[0].lastIndexOf(match[1]);\n                insert += match[0].slice(offset + match[1].length);\n                start += offset;\n                const cutOff = start - end;\n                if (cutOff > 0) {\n                    insert = match[0].slice(offset - cutOff, offset) + insert;\n                    start = end;\n                }\n            }\n            state.tr.insertText(insert, start, end);\n        }\n    });\n}\n/**\n * Build an input rule for automatically wrapping a textblock when a\n * given string is typed. When using a regular expresion you’ll\n * probably want the regexp to start with `^`, so that the pattern can\n * only occur at the start of a textblock.\n *\n * `type` is the type of node to wrap in.\n *\n * By default, if there’s a node with the same type above the newly\n * wrapped node, the rule will try to join those\n * two nodes. You can pass a join predicate, which takes a regular\n * expression match and the node before the wrapped node, and can\n * return a boolean to indicate whether a join should happen.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */ function $be3c84bcbbb2383c$export$f7316d89abe4e1c1(config) {\n    return new $be3c84bcbbb2383c$export$9b55e2b000ad65f2({\n        find: config.find,\n        handler: ({ state: state, range: range, match: match, chain: chain })=>{\n            const attributes = $be3c84bcbbb2383c$export$592682234826c0bd(config.getAttributes, undefined, match) || {};\n            const tr = state.tr.delete(range.from, range.to);\n            const $start = tr.doc.resolve(range.from);\n            const blockRange = $start.blockRange();\n            const wrapping = blockRange && (0, $gfgdn.findWrapping)(blockRange, config.type, attributes);\n            if (!wrapping) return null;\n            tr.wrap(blockRange, wrapping);\n            if (config.keepMarks && config.editor) {\n                const { selection: selection, storedMarks: storedMarks } = state;\n                const { splittableMarks: splittableMarks } = config.editor.extensionManager;\n                const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks();\n                if (marks) {\n                    const filteredMarks = marks.filter((mark)=>splittableMarks.includes(mark.type.name));\n                    tr.ensureMarks(filteredMarks);\n                }\n            }\n            if (config.keepAttributes) {\n                /** If the nodeType is `bulletList` or `orderedList` set the `nodeType` as `listItem` */ const nodeType = config.type.name === 'bulletList' || config.type.name === 'orderedList' ? 'listItem' : 'taskList';\n                chain().updateAttributes(nodeType, attributes).run();\n            }\n            const before = tr.doc.resolve(range.from - 1).nodeBefore;\n            if (before && before.type === config.type && (0, $gfgdn.canJoin)(tr.doc, range.from - 1) && (!config.joinPredicate || config.joinPredicate(match, before))) tr.join(range.from - 1);\n        }\n    });\n}\n/**\n * The Node class is used to create custom node extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */ class $be3c84bcbbb2383c$export$85c928794f8d04d4 {\n    constructor(config = {}){\n        this.type = 'node';\n        this.name = 'node';\n        this.parent = null;\n        this.child = null;\n        this.config = {\n            name: this.name,\n            defaultOptions: {}\n        };\n        this.config = {\n            ...this.config,\n            ...config\n        };\n        this.name = this.config.name;\n        if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${this.name}\".`);\n        // TODO: remove `addOptions` fallback\n        this.options = this.config.defaultOptions;\n        if (this.config.addOptions) this.options = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(this, 'addOptions', {\n            name: this.name\n        }));\n        this.storage = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(this, 'addStorage', {\n            name: this.name,\n            options: this.options\n        })) || {};\n    }\n    static create(config = {}) {\n        return new $be3c84bcbbb2383c$export$85c928794f8d04d4(config);\n    }\n    configure(options = {}) {\n        // return a new instance so we can use the same extension\n        // with different calls of `configure`\n        const extension = this.extend({\n            ...this.config,\n            addOptions: ()=>{\n                return $be3c84bcbbb2383c$export$dd702b3c8240390c(this.options, options);\n            }\n        });\n        // Always preserve the current name\n        extension.name = this.name;\n        // Set the parent to be our parent\n        extension.parent = this.parent;\n        return extension;\n    }\n    extend(extendedConfig = {}) {\n        const extension = new $be3c84bcbbb2383c$export$85c928794f8d04d4(extendedConfig);\n        extension.parent = this;\n        this.child = extension;\n        extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name;\n        if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${extension.name}\".`);\n        extension.options = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addOptions', {\n            name: extension.name\n        }));\n        extension.storage = $be3c84bcbbb2383c$export$592682234826c0bd($be3c84bcbbb2383c$export$f73578b718a57eaa(extension, 'addStorage', {\n            name: extension.name,\n            options: extension.options\n        }));\n        return extension;\n    }\n}\n/**\n * Node views are used to customize the rendered DOM structure of a node.\n * @see https://tiptap.dev/guide/node-views\n */ class $be3c84bcbbb2383c$export$77c6811359a01a6f {\n    constructor(component, props, options){\n        this.isDragging = false;\n        this.component = component;\n        this.editor = props.editor;\n        this.options = {\n            stopEvent: null,\n            ignoreMutation: null,\n            ...options\n        };\n        this.extension = props.extension;\n        this.node = props.node;\n        this.decorations = props.decorations;\n        this.innerDecorations = props.innerDecorations;\n        this.view = props.view;\n        this.HTMLAttributes = props.HTMLAttributes;\n        this.getPos = props.getPos;\n        this.mount();\n    }\n    mount() {\n        // eslint-disable-next-line\n        return;\n    }\n    get dom() {\n        return this.editor.view.dom;\n    }\n    get contentDOM() {\n        return null;\n    }\n    onDragStart(event) {\n        var _a, _b, _c, _d, _e, _f, _g;\n        const { view: view } = this.editor;\n        const target = event.target;\n        // get the drag handle element\n        // `closest` is not available for text nodes so we may have to use its parent\n        const dragHandle = target.nodeType === 3 ? (_a = target.parentElement) === null || _a === void 0 ? void 0 : _a.closest('[data-drag-handle]') : target.closest('[data-drag-handle]');\n        if (!this.dom || ((_b = this.contentDOM) === null || _b === void 0 ? void 0 : _b.contains(target)) || !dragHandle) return;\n        let x = 0;\n        let y = 0;\n        // calculate offset for drag element if we use a different drag handle element\n        if (this.dom !== dragHandle) {\n            const domBox = this.dom.getBoundingClientRect();\n            const handleBox = dragHandle.getBoundingClientRect();\n            // In React, we have to go through nativeEvent to reach offsetX/offsetY.\n            const offsetX = (_c = event.offsetX) !== null && _c !== void 0 ? _c : (_d = event.nativeEvent) === null || _d === void 0 ? void 0 : _d.offsetX;\n            const offsetY = (_e = event.offsetY) !== null && _e !== void 0 ? _e : (_f = event.nativeEvent) === null || _f === void 0 ? void 0 : _f.offsetY;\n            x = handleBox.x - domBox.x + offsetX;\n            y = handleBox.y - domBox.y + offsetY;\n        }\n        const clonedNode = this.dom.cloneNode(true);\n        (_g = event.dataTransfer) === null || _g === void 0 || _g.setDragImage(clonedNode, x, y);\n        const pos = this.getPos();\n        if (typeof pos !== 'number') return;\n        // we need to tell ProseMirror that we want to move the whole node\n        // so we create a NodeSelection\n        const selection = (0, $1LeRC.NodeSelection).create(view.state.doc, pos);\n        const transaction = view.state.tr.setSelection(selection);\n        view.dispatch(transaction);\n    }\n    stopEvent(event) {\n        var _a;\n        if (!this.dom) return false;\n        if (typeof this.options.stopEvent === 'function') return this.options.stopEvent({\n            event: event\n        });\n        const target = event.target;\n        const isInElement = this.dom.contains(target) && !((_a = this.contentDOM) === null || _a === void 0 ? void 0 : _a.contains(target));\n        // any event from child nodes should be handled by ProseMirror\n        if (!isInElement) return false;\n        const isDragEvent = event.type.startsWith('drag');\n        const isDropEvent = event.type === 'drop';\n        const isInput = [\n            'INPUT',\n            'BUTTON',\n            'SELECT',\n            'TEXTAREA'\n        ].includes(target.tagName) || target.isContentEditable;\n        // any input event within node views should be ignored by ProseMirror\n        if (isInput && !isDropEvent && !isDragEvent) return true;\n        const { isEditable: isEditable } = this.editor;\n        const { isDragging: isDragging } = this;\n        const isDraggable = !!this.node.type.spec.draggable;\n        const isSelectable = (0, $1LeRC.NodeSelection).isSelectable(this.node);\n        const isCopyEvent = event.type === 'copy';\n        const isPasteEvent = event.type === 'paste';\n        const isCutEvent = event.type === 'cut';\n        const isClickEvent = event.type === 'mousedown';\n        // ProseMirror tries to drag selectable nodes\n        // even if `draggable` is set to `false`\n        // this fix prevents that\n        if (!isDraggable && isSelectable && isDragEvent && event.target === this.dom) event.preventDefault();\n        if (isDraggable && isDragEvent && !isDragging && event.target === this.dom) {\n            event.preventDefault();\n            return false;\n        }\n        // we have to store that dragging started\n        if (isDraggable && isEditable && !isDragging && isClickEvent) {\n            const dragHandle = target.closest('[data-drag-handle]');\n            const isValidDragHandle = dragHandle && (this.dom === dragHandle || this.dom.contains(dragHandle));\n            if (isValidDragHandle) {\n                this.isDragging = true;\n                document.addEventListener('dragend', ()=>{\n                    this.isDragging = false;\n                }, {\n                    once: true\n                });\n                document.addEventListener('drop', ()=>{\n                    this.isDragging = false;\n                }, {\n                    once: true\n                });\n                document.addEventListener('mouseup', ()=>{\n                    this.isDragging = false;\n                }, {\n                    once: true\n                });\n            }\n        }\n        // these events are handled by prosemirror\n        if (isDragging || isDropEvent || isCopyEvent || isPasteEvent || isCutEvent || isClickEvent && isSelectable) return false;\n        return true;\n    }\n    /**\n     * Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view.\n     * @return `false` if the editor should re-read the selection or re-parse the range around the mutation\n     * @return `true` if it can safely be ignored.\n     */ ignoreMutation(mutation) {\n        if (!this.dom || !this.contentDOM) return true;\n        if (typeof this.options.ignoreMutation === 'function') return this.options.ignoreMutation({\n            mutation: mutation\n        });\n        // a leaf/atom node is like a black box for ProseMirror\n        // and should be fully handled by the node view\n        if (this.node.isLeaf || this.node.isAtom) return true;\n        // ProseMirror should handle any selections\n        if (mutation.type === 'selection') return false;\n        // try to prevent a bug on iOS and Android that will break node views on enter\n        // this is because ProseMirror can’t preventDispatch on enter\n        // this will lead to a re-render of the node view on enter\n        // see: https://github.com/ueberdosis/tiptap/issues/1214\n        // see: https://github.com/ueberdosis/tiptap/issues/2534\n        if (this.dom.contains(mutation.target) && mutation.type === 'childList' && ($be3c84bcbbb2383c$export$86c1a3f9ab33da5c() || $be3c84bcbbb2383c$var$isAndroid()) && this.editor.isFocused) {\n            const changedNodes = [\n                ...Array.from(mutation.addedNodes),\n                ...Array.from(mutation.removedNodes)\n            ];\n            // we’ll check if every changed node is contentEditable\n            // to make sure it’s probably mutated by ProseMirror\n            if (changedNodes.every((node)=>node.isContentEditable)) return false;\n        }\n        // we will allow mutation contentDOM with attributes\n        // so we can for example adding classes within our node view\n        if (this.contentDOM === mutation.target && mutation.type === 'attributes') return true;\n        // ProseMirror should handle any changes within contentDOM\n        if (this.contentDOM.contains(mutation.target)) return false;\n        return true;\n    }\n    /**\n     * Update the attributes of the prosemirror node.\n     */ updateAttributes(attributes) {\n        this.editor.commands.command(({ tr: tr })=>{\n            const pos = this.getPos();\n            if (typeof pos !== 'number') return false;\n            tr.setNodeMarkup(pos, undefined, {\n                ...this.node.attrs,\n                ...attributes\n            });\n            return true;\n        });\n    }\n    /**\n     * Delete the node.\n     */ deleteNode() {\n        const from = this.getPos();\n        if (typeof from !== 'number') return;\n        const to = from + this.node.nodeSize;\n        this.editor.commands.deleteRange({\n            from: from,\n            to: to\n        });\n    }\n}\n/**\n * Build an paste rule that adds a mark when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */ function $be3c84bcbbb2383c$export$3845eb97abe74944(config) {\n    return new $be3c84bcbbb2383c$export$e75df4392d073e98({\n        find: config.find,\n        handler: ({ state: state, range: range, match: match, pasteEvent: pasteEvent })=>{\n            const attributes = $be3c84bcbbb2383c$export$592682234826c0bd(config.getAttributes, undefined, match, pasteEvent);\n            if (attributes === false || attributes === null) return null;\n            const { tr: tr } = state;\n            const captureGroup = match[match.length - 1];\n            const fullMatch = match[0];\n            let markEnd = range.to;\n            if (captureGroup) {\n                const startSpaces = fullMatch.search(/\\S/);\n                const textStart = range.from + fullMatch.indexOf(captureGroup);\n                const textEnd = textStart + captureGroup.length;\n                const excludedMarks = $be3c84bcbbb2383c$export$c5fd7af7c5c1efa(range.from, range.to, state.doc).filter((item)=>{\n                    // @ts-ignore\n                    const excluded = item.mark.type.excluded;\n                    return excluded.find((type)=>type === config.type && type !== item.mark.type);\n                }).filter((item)=>item.to > textStart);\n                if (excludedMarks.length) return null;\n                if (textEnd < range.to) tr.delete(textEnd, range.to);\n                if (textStart > range.from) tr.delete(range.from + startSpaces, textStart);\n                markEnd = range.from + startSpaces + captureGroup.length;\n                tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {}));\n                tr.removeStoredMark(config.type);\n            }\n        }\n    });\n}\nfunction $be3c84bcbbb2383c$export$d23217284a0e83b9(state, nodeType) {\n    const { selection: selection } = state;\n    const { $from: $from } = selection;\n    // Special handling for NodeSelection\n    if (selection instanceof (0, $1LeRC.NodeSelection)) {\n        const index = $from.index();\n        const parent = $from.parent;\n        // Can we replace the selected node with the horizontal rule?\n        return parent.canReplaceWith(index, index + 1, nodeType);\n    }\n    // Default: check if we can insert at the current position\n    let depth = $from.depth;\n    while(depth >= 0){\n        const index = $from.index(depth);\n        const parent = $from.node(depth);\n        const match = parent.contentMatchAt(index);\n        if (match.matchType(nodeType)) return true;\n        depth -= 1;\n    }\n    return false;\n}\n// source: https://stackoverflow.com/a/6969486\nfunction $be3c84bcbbb2383c$export$d3f82eb9fcc60fbc(string) {\n    return string.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\nfunction $be3c84bcbbb2383c$export$844ec244b1367d54(value) {\n    return typeof value === 'string';\n}\n/**\n * Build an paste rule that adds a node when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */ function $be3c84bcbbb2383c$export$3cb77ada4d0e5bd5(config) {\n    return new $be3c84bcbbb2383c$export$e75df4392d073e98({\n        find: config.find,\n        handler ({ match: match, chain: chain, range: range, pasteEvent: pasteEvent }) {\n            const attributes = $be3c84bcbbb2383c$export$592682234826c0bd(config.getAttributes, undefined, match, pasteEvent);\n            const content = $be3c84bcbbb2383c$export$592682234826c0bd(config.getContent, undefined, attributes);\n            if (attributes === false || attributes === null) return null;\n            const node = {\n                type: config.type.name,\n                attrs: attributes\n            };\n            if (content) node.content = content;\n            if (match.input) chain().deleteRange(range).insertContentAt(range.from, node);\n        }\n    });\n}\n/**\n * Build an paste rule that replaces text when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */ function $be3c84bcbbb2383c$export$1aff23e8795559fa(config) {\n    return new $be3c84bcbbb2383c$export$e75df4392d073e98({\n        find: config.find,\n        handler: ({ state: state, range: range, match: match })=>{\n            let insert = config.replace;\n            let start = range.from;\n            const end = range.to;\n            if (match[1]) {\n                const offset = match[0].lastIndexOf(match[1]);\n                insert += match[0].slice(offset + match[1].length);\n                start += offset;\n                const cutOff = start - end;\n                if (cutOff > 0) {\n                    insert = match[0].slice(offset - cutOff, offset) + insert;\n                    start = end;\n                }\n            }\n            state.tr.insertText(insert, start, end);\n        }\n    });\n}\nclass $be3c84bcbbb2383c$export$254d9747e34ddc90 {\n    constructor(transaction){\n        this.transaction = transaction;\n        this.currentStep = this.transaction.steps.length;\n    }\n    map(position) {\n        let deleted = false;\n        const mappedPosition = this.transaction.steps.slice(this.currentStep).reduce((newPosition, step)=>{\n            const mapResult = step.getMap().mapResult(newPosition);\n            if (mapResult.deleted) deleted = true;\n            return mapResult.pos;\n        }, position);\n        return {\n            position: mappedPosition,\n            deleted: deleted\n        };\n    }\n}\n\n});\nparcelRegister(\"7fRs0\", function(module, exports) {\n$parcel$export(module.exports, \"AllSelection\", () => (parcelRequire(\"1LeRC\")).AllSelection);\n$parcel$export(module.exports, \"EditorState\", () => (parcelRequire(\"1LeRC\")).EditorState);\n$parcel$export(module.exports, \"NodeSelection\", () => (parcelRequire(\"1LeRC\")).NodeSelection);\n$parcel$export(module.exports, \"Plugin\", () => (parcelRequire(\"1LeRC\")).Plugin);\n$parcel$export(module.exports, \"PluginKey\", () => (parcelRequire(\"1LeRC\")).PluginKey);\n$parcel$export(module.exports, \"Selection\", () => (parcelRequire(\"1LeRC\")).Selection);\n$parcel$export(module.exports, \"TextSelection\", () => (parcelRequire(\"1LeRC\")).TextSelection);\n// state/index.ts\nparcelRequire(\"1LeRC\");\n\n});\nparcelRegister(\"1LeRC\", function(module, exports) {\n\n$parcel$export(module.exports, \"Selection\", () => $1485b5e112c966ab$export$52baac22726c72bf);\n$parcel$export(module.exports, \"SelectionRange\", () => $1485b5e112c966ab$export$7bd1839c3c5d5bd4);\n$parcel$export(module.exports, \"TextSelection\", () => $1485b5e112c966ab$export$c2b25f346d19bcbb);\n$parcel$export(module.exports, \"AllSelection\", () => $1485b5e112c966ab$export$c15d9ba76bdbcd95);\n$parcel$export(module.exports, \"NodeSelection\", () => $1485b5e112c966ab$export$e2940151ac854c0b);\n$parcel$export(module.exports, \"EditorState\", () => $1485b5e112c966ab$export$afa855cbfaff27f2);\n$parcel$export(module.exports, \"Plugin\", () => $1485b5e112c966ab$export$901cf72dabf2112a);\n$parcel$export(module.exports, \"PluginKey\", () => $1485b5e112c966ab$export$1692d8b0e89cecc3);\n\nvar $1krlL = parcelRequire(\"1krlL\");\n\nvar $gfgdn = parcelRequire(\"gfgdn\");\nconst $1485b5e112c966ab$var$classesById = Object.create(null);\n/**\nSuperclass for editor selections. Every selection type should\nextend this. Should not be instantiated directly.\n*/ class $1485b5e112c966ab$export$52baac22726c72bf {\n    /**\n    Initialize a selection with the head and anchor and ranges. If no\n    ranges are given, constructs a single range across `$anchor` and\n    `$head`.\n    */ constructor(/**\n    The resolved anchor of the selection (the side that stays in\n    place when the selection is modified).\n    */ $anchor, /**\n    The resolved head of the selection (the side that moves when\n    the selection is modified).\n    */ $head, ranges){\n        this.$anchor = $anchor;\n        this.$head = $head;\n        this.ranges = ranges || [\n            new $1485b5e112c966ab$export$7bd1839c3c5d5bd4($anchor.min($head), $anchor.max($head))\n        ];\n    }\n    /**\n    The selection's anchor, as an unresolved position.\n    */ get anchor() {\n        return this.$anchor.pos;\n    }\n    /**\n    The selection's head.\n    */ get head() {\n        return this.$head.pos;\n    }\n    /**\n    The lower bound of the selection's main range.\n    */ get from() {\n        return this.$from.pos;\n    }\n    /**\n    The upper bound of the selection's main range.\n    */ get to() {\n        return this.$to.pos;\n    }\n    /**\n    The resolved lower  bound of the selection's main range.\n    */ get $from() {\n        return this.ranges[0].$from;\n    }\n    /**\n    The resolved upper bound of the selection's main range.\n    */ get $to() {\n        return this.ranges[0].$to;\n    }\n    /**\n    Indicates whether the selection contains any content.\n    */ get empty() {\n        let ranges = this.ranges;\n        for(let i = 0; i < ranges.length; i++)if (ranges[i].$from.pos != ranges[i].$to.pos) return false;\n        return true;\n    }\n    /**\n    Get the content of this selection as a slice.\n    */ content() {\n        return this.$from.doc.slice(this.from, this.to, true);\n    }\n    /**\n    Replace the selection with a slice or, if no slice is given,\n    delete the selection. Will append to the given transaction.\n    */ replace(tr, content = (0, $1krlL.Slice).empty) {\n        // Put the new selection at the position after the inserted\n        // content. When that ended in an inline node, search backwards,\n        // to get the position after that node. If not, search forward.\n        let lastNode = content.content.lastChild, lastParent = null;\n        for(let i = 0; i < content.openEnd; i++){\n            lastParent = lastNode;\n            lastNode = lastNode.lastChild;\n        }\n        let mapFrom = tr.steps.length, ranges = this.ranges;\n        for(let i = 0; i < ranges.length; i++){\n            let { $from: $from, $to: $to } = ranges[i], mapping = tr.mapping.slice(mapFrom);\n            tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), i ? (0, $1krlL.Slice).empty : content);\n            if (i == 0) $1485b5e112c966ab$var$selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1);\n        }\n    }\n    /**\n    Replace the selection with the given node, appending the changes\n    to the given transaction.\n    */ replaceWith(tr, node) {\n        let mapFrom = tr.steps.length, ranges = this.ranges;\n        for(let i = 0; i < ranges.length; i++){\n            let { $from: $from, $to: $to } = ranges[i], mapping = tr.mapping.slice(mapFrom);\n            let from = mapping.map($from.pos), to = mapping.map($to.pos);\n            if (i) tr.deleteRange(from, to);\n            else {\n                tr.replaceRangeWith(from, to, node);\n                $1485b5e112c966ab$var$selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1);\n            }\n        }\n    }\n    /**\n    Find a valid cursor or leaf node selection starting at the given\n    position and searching back if `dir` is negative, and forward if\n    positive. When `textOnly` is true, only consider cursor\n    selections. Will return null when no valid selection position is\n    found.\n    */ static findFrom($pos, dir, textOnly = false) {\n        let inner = $pos.parent.inlineContent ? new $1485b5e112c966ab$export$c2b25f346d19bcbb($pos) : $1485b5e112c966ab$var$findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly);\n        if (inner) return inner;\n        for(let depth = $pos.depth - 1; depth >= 0; depth--){\n            let found = dir < 0 ? $1485b5e112c966ab$var$findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly) : $1485b5e112c966ab$var$findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly);\n            if (found) return found;\n        }\n        return null;\n    }\n    /**\n    Find a valid cursor or leaf node selection near the given\n    position. Searches forward first by default, but if `bias` is\n    negative, it will search backwards first.\n    */ static near($pos, bias = 1) {\n        return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new $1485b5e112c966ab$export$c15d9ba76bdbcd95($pos.node(0));\n    }\n    /**\n    Find the cursor or leaf node selection closest to the start of\n    the given document. Will return an\n    [`AllSelection`](https://prosemirror.net/docs/ref/#state.AllSelection) if no valid position\n    exists.\n    */ static atStart(doc) {\n        return $1485b5e112c966ab$var$findSelectionIn(doc, doc, 0, 0, 1) || new $1485b5e112c966ab$export$c15d9ba76bdbcd95(doc);\n    }\n    /**\n    Find the cursor or leaf node selection closest to the end of the\n    given document.\n    */ static atEnd(doc) {\n        return $1485b5e112c966ab$var$findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new $1485b5e112c966ab$export$c15d9ba76bdbcd95(doc);\n    }\n    /**\n    Deserialize the JSON representation of a selection. Must be\n    implemented for custom classes (as a static class method).\n    */ static fromJSON(doc, json) {\n        if (!json || !json.type) throw new RangeError(\"Invalid input for Selection.fromJSON\");\n        let cls = $1485b5e112c966ab$var$classesById[json.type];\n        if (!cls) throw new RangeError(`No selection type ${json.type} defined`);\n        return cls.fromJSON(doc, json);\n    }\n    /**\n    To be able to deserialize selections from JSON, custom selection\n    classes must register themselves with an ID string, so that they\n    can be disambiguated. Try to pick something that's unlikely to\n    clash with classes from other modules.\n    */ static jsonID(id, selectionClass) {\n        if (id in $1485b5e112c966ab$var$classesById) throw new RangeError(\"Duplicate use of selection JSON ID \" + id);\n        $1485b5e112c966ab$var$classesById[id] = selectionClass;\n        selectionClass.prototype.jsonID = id;\n        return selectionClass;\n    }\n    /**\n    Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,\n    which is a value that can be mapped without having access to a\n    current document, and later resolved to a real selection for a\n    given document again. (This is used mostly by the history to\n    track and restore old selections.) The default implementation of\n    this method just converts the selection to a text selection and\n    returns the bookmark for that.\n    */ getBookmark() {\n        return $1485b5e112c966ab$export$c2b25f346d19bcbb.between(this.$anchor, this.$head).getBookmark();\n    }\n}\n$1485b5e112c966ab$export$52baac22726c72bf.prototype.visible = true;\n/**\nRepresents a selected range in a document.\n*/ class $1485b5e112c966ab$export$7bd1839c3c5d5bd4 {\n    /**\n    Create a range.\n    */ constructor(/**\n    The lower bound of the range.\n    */ $from, /**\n    The upper bound of the range.\n    */ $to){\n        this.$from = $from;\n        this.$to = $to;\n    }\n}\nlet $1485b5e112c966ab$var$warnedAboutTextSelection = false;\nfunction $1485b5e112c966ab$var$checkTextSelection($pos) {\n    if (!$1485b5e112c966ab$var$warnedAboutTextSelection && !$pos.parent.inlineContent) {\n        $1485b5e112c966ab$var$warnedAboutTextSelection = true;\n        console[\"warn\"](\"TextSelection endpoint not pointing into a node with inline content (\" + $pos.parent.type.name + \")\");\n    }\n}\n/**\nA text selection represents a classical editor selection, with a\nhead (the moving side) and anchor (immobile side), both of which\npoint into textblock nodes. It can be empty (a regular cursor\nposition).\n*/ class $1485b5e112c966ab$export$c2b25f346d19bcbb extends $1485b5e112c966ab$export$52baac22726c72bf {\n    /**\n    Construct a text selection between the given points.\n    */ constructor($anchor, $head = $anchor){\n        $1485b5e112c966ab$var$checkTextSelection($anchor);\n        $1485b5e112c966ab$var$checkTextSelection($head);\n        super($anchor, $head);\n    }\n    /**\n    Returns a resolved position if this is a cursor selection (an\n    empty text selection), and null otherwise.\n    */ get $cursor() {\n        return this.$anchor.pos == this.$head.pos ? this.$head : null;\n    }\n    map(doc, mapping) {\n        let $head = doc.resolve(mapping.map(this.head));\n        if (!$head.parent.inlineContent) return $1485b5e112c966ab$export$52baac22726c72bf.near($head);\n        let $anchor = doc.resolve(mapping.map(this.anchor));\n        return new $1485b5e112c966ab$export$c2b25f346d19bcbb($anchor.parent.inlineContent ? $anchor : $head, $head);\n    }\n    replace(tr, content = (0, $1krlL.Slice).empty) {\n        super.replace(tr, content);\n        if (content == (0, $1krlL.Slice).empty) {\n            let marks = this.$from.marksAcross(this.$to);\n            if (marks) tr.ensureMarks(marks);\n        }\n    }\n    eq(other) {\n        return other instanceof $1485b5e112c966ab$export$c2b25f346d19bcbb && other.anchor == this.anchor && other.head == this.head;\n    }\n    getBookmark() {\n        return new $1485b5e112c966ab$var$TextBookmark(this.anchor, this.head);\n    }\n    toJSON() {\n        return {\n            type: \"text\",\n            anchor: this.anchor,\n            head: this.head\n        };\n    }\n    /**\n    @internal\n    */ static fromJSON(doc, json) {\n        if (typeof json.anchor != \"number\" || typeof json.head != \"number\") throw new RangeError(\"Invalid input for TextSelection.fromJSON\");\n        return new $1485b5e112c966ab$export$c2b25f346d19bcbb(doc.resolve(json.anchor), doc.resolve(json.head));\n    }\n    /**\n    Create a text selection from non-resolved positions.\n    */ static create(doc, anchor, head = anchor) {\n        let $anchor = doc.resolve(anchor);\n        return new this($anchor, head == anchor ? $anchor : doc.resolve(head));\n    }\n    /**\n    Return a text selection that spans the given positions or, if\n    they aren't text positions, find a text selection near them.\n    `bias` determines whether the method searches forward (default)\n    or backwards (negative number) first. Will fall back to calling\n    [`Selection.near`](https://prosemirror.net/docs/ref/#state.Selection^near) when the document\n    doesn't contain a valid text position.\n    */ static between($anchor, $head, bias) {\n        let dPos = $anchor.pos - $head.pos;\n        if (!bias || dPos) bias = dPos >= 0 ? 1 : -1;\n        if (!$head.parent.inlineContent) {\n            let found = $1485b5e112c966ab$export$52baac22726c72bf.findFrom($head, bias, true) || $1485b5e112c966ab$export$52baac22726c72bf.findFrom($head, -bias, true);\n            if (found) $head = found.$head;\n            else return $1485b5e112c966ab$export$52baac22726c72bf.near($head, bias);\n        }\n        if (!$anchor.parent.inlineContent) {\n            if (dPos == 0) $anchor = $head;\n            else {\n                $anchor = ($1485b5e112c966ab$export$52baac22726c72bf.findFrom($anchor, -bias, true) || $1485b5e112c966ab$export$52baac22726c72bf.findFrom($anchor, bias, true)).$anchor;\n                if ($anchor.pos < $head.pos != dPos < 0) $anchor = $head;\n            }\n        }\n        return new $1485b5e112c966ab$export$c2b25f346d19bcbb($anchor, $head);\n    }\n}\n$1485b5e112c966ab$export$52baac22726c72bf.jsonID(\"text\", $1485b5e112c966ab$export$c2b25f346d19bcbb);\nclass $1485b5e112c966ab$var$TextBookmark {\n    constructor(anchor, head){\n        this.anchor = anchor;\n        this.head = head;\n    }\n    map(mapping) {\n        return new $1485b5e112c966ab$var$TextBookmark(mapping.map(this.anchor), mapping.map(this.head));\n    }\n    resolve(doc) {\n        return $1485b5e112c966ab$export$c2b25f346d19bcbb.between(doc.resolve(this.anchor), doc.resolve(this.head));\n    }\n}\n/**\nA node selection is a selection that points at a single node. All\nnodes marked [selectable](https://prosemirror.net/docs/ref/#model.NodeSpec.selectable) can be the\ntarget of a node selection. In such a selection, `from` and `to`\npoint directly before and after the selected node, `anchor` equals\n`from`, and `head` equals `to`..\n*/ class $1485b5e112c966ab$export$e2940151ac854c0b extends $1485b5e112c966ab$export$52baac22726c72bf {\n    /**\n    Create a node selection. Does not verify the validity of its\n    argument.\n    */ constructor($pos){\n        let node = $pos.nodeAfter;\n        let $end = $pos.node(0).resolve($pos.pos + node.nodeSize);\n        super($pos, $end);\n        this.node = node;\n    }\n    map(doc, mapping) {\n        let { deleted: deleted, pos: pos } = mapping.mapResult(this.anchor);\n        let $pos = doc.resolve(pos);\n        if (deleted) return $1485b5e112c966ab$export$52baac22726c72bf.near($pos);\n        return new $1485b5e112c966ab$export$e2940151ac854c0b($pos);\n    }\n    content() {\n        return new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(this.node), 0, 0);\n    }\n    eq(other) {\n        return other instanceof $1485b5e112c966ab$export$e2940151ac854c0b && other.anchor == this.anchor;\n    }\n    toJSON() {\n        return {\n            type: \"node\",\n            anchor: this.anchor\n        };\n    }\n    getBookmark() {\n        return new $1485b5e112c966ab$var$NodeBookmark(this.anchor);\n    }\n    /**\n    @internal\n    */ static fromJSON(doc, json) {\n        if (typeof json.anchor != \"number\") throw new RangeError(\"Invalid input for NodeSelection.fromJSON\");\n        return new $1485b5e112c966ab$export$e2940151ac854c0b(doc.resolve(json.anchor));\n    }\n    /**\n    Create a node selection from non-resolved positions.\n    */ static create(doc, from) {\n        return new $1485b5e112c966ab$export$e2940151ac854c0b(doc.resolve(from));\n    }\n    /**\n    Determines whether the given node may be selected as a node\n    selection.\n    */ static isSelectable(node) {\n        return !node.isText && node.type.spec.selectable !== false;\n    }\n}\n$1485b5e112c966ab$export$e2940151ac854c0b.prototype.visible = false;\n$1485b5e112c966ab$export$52baac22726c72bf.jsonID(\"node\", $1485b5e112c966ab$export$e2940151ac854c0b);\nclass $1485b5e112c966ab$var$NodeBookmark {\n    constructor(anchor){\n        this.anchor = anchor;\n    }\n    map(mapping) {\n        let { deleted: deleted, pos: pos } = mapping.mapResult(this.anchor);\n        return deleted ? new $1485b5e112c966ab$var$TextBookmark(pos, pos) : new $1485b5e112c966ab$var$NodeBookmark(pos);\n    }\n    resolve(doc) {\n        let $pos = doc.resolve(this.anchor), node = $pos.nodeAfter;\n        if (node && $1485b5e112c966ab$export$e2940151ac854c0b.isSelectable(node)) return new $1485b5e112c966ab$export$e2940151ac854c0b($pos);\n        return $1485b5e112c966ab$export$52baac22726c72bf.near($pos);\n    }\n}\n/**\nA selection type that represents selecting the whole document\n(which can not necessarily be expressed with a text selection, when\nthere are for example leaf block nodes at the start or end of the\ndocument).\n*/ class $1485b5e112c966ab$export$c15d9ba76bdbcd95 extends $1485b5e112c966ab$export$52baac22726c72bf {\n    /**\n    Create an all-selection over the given document.\n    */ constructor(doc){\n        super(doc.resolve(0), doc.resolve(doc.content.size));\n    }\n    replace(tr, content = (0, $1krlL.Slice).empty) {\n        if (content == (0, $1krlL.Slice).empty) {\n            tr.delete(0, tr.doc.content.size);\n            let sel = $1485b5e112c966ab$export$52baac22726c72bf.atStart(tr.doc);\n            if (!sel.eq(tr.selection)) tr.setSelection(sel);\n        } else super.replace(tr, content);\n    }\n    toJSON() {\n        return {\n            type: \"all\"\n        };\n    }\n    /**\n    @internal\n    */ static fromJSON(doc) {\n        return new $1485b5e112c966ab$export$c15d9ba76bdbcd95(doc);\n    }\n    map(doc) {\n        return new $1485b5e112c966ab$export$c15d9ba76bdbcd95(doc);\n    }\n    eq(other) {\n        return other instanceof $1485b5e112c966ab$export$c15d9ba76bdbcd95;\n    }\n    getBookmark() {\n        return $1485b5e112c966ab$var$AllBookmark;\n    }\n}\n$1485b5e112c966ab$export$52baac22726c72bf.jsonID(\"all\", $1485b5e112c966ab$export$c15d9ba76bdbcd95);\nconst $1485b5e112c966ab$var$AllBookmark = {\n    map () {\n        return this;\n    },\n    resolve (doc) {\n        return new $1485b5e112c966ab$export$c15d9ba76bdbcd95(doc);\n    }\n};\n// FIXME we'll need some awareness of text direction when scanning for selections\n// Try to find a selection inside the given node. `pos` points at the\n// position where the search starts. When `text` is true, only return\n// text selections.\nfunction $1485b5e112c966ab$var$findSelectionIn(doc, node, pos, index, dir, text = false) {\n    if (node.inlineContent) return $1485b5e112c966ab$export$c2b25f346d19bcbb.create(doc, pos);\n    for(let i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir){\n        let child = node.child(i);\n        if (!child.isAtom) {\n            let inner = $1485b5e112c966ab$var$findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text);\n            if (inner) return inner;\n        } else if (!text && $1485b5e112c966ab$export$e2940151ac854c0b.isSelectable(child)) return $1485b5e112c966ab$export$e2940151ac854c0b.create(doc, pos - (dir < 0 ? child.nodeSize : 0));\n        pos += child.nodeSize * dir;\n    }\n    return null;\n}\nfunction $1485b5e112c966ab$var$selectionToInsertionEnd(tr, startLen, bias) {\n    let last = tr.steps.length - 1;\n    if (last < startLen) return;\n    let step = tr.steps[last];\n    if (!(step instanceof (0, $gfgdn.ReplaceStep) || step instanceof (0, $gfgdn.ReplaceAroundStep))) return;\n    let map = tr.mapping.maps[last], end;\n    map.forEach((_from, _to, _newFrom, newTo)=>{\n        if (end == null) end = newTo;\n    });\n    tr.setSelection($1485b5e112c966ab$export$52baac22726c72bf.near(tr.doc.resolve(end), bias));\n}\nconst $1485b5e112c966ab$var$UPDATED_SEL = 1, $1485b5e112c966ab$var$UPDATED_MARKS = 2, $1485b5e112c966ab$var$UPDATED_SCROLL = 4;\n/**\nAn editor state transaction, which can be applied to a state to\ncreate an updated state. Use\n[`EditorState.tr`](https://prosemirror.net/docs/ref/#state.EditorState.tr) to create an instance.\n\nTransactions track changes to the document (they are a subclass of\n[`Transform`](https://prosemirror.net/docs/ref/#transform.Transform)), but also other state changes,\nlike selection updates and adjustments of the set of [stored\nmarks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks). In addition, you can store\nmetadata properties in a transaction, which are extra pieces of\ninformation that client code or plugins can use to describe what a\ntransaction represents, so that they can update their [own\nstate](https://prosemirror.net/docs/ref/#state.StateField) accordingly.\n\nThe [editor view](https://prosemirror.net/docs/ref/#view.EditorView) uses a few metadata\nproperties: it will attach a property `\"pointer\"` with the value\n`true` to selection transactions directly caused by mouse or touch\ninput, a `\"composition\"` property holding an ID identifying the\ncomposition that caused it to transactions caused by composed DOM\ninput, and a `\"uiEvent\"` property of that may be `\"paste\"`,\n`\"cut\"`, or `\"drop\"`.\n*/ class $1485b5e112c966ab$export$febc5573c75cefb0 extends (0, $gfgdn.Transform) {\n    /**\n    @internal\n    */ constructor(state){\n        super(state.doc);\n        // The step count for which the current selection is valid.\n        this.curSelectionFor = 0;\n        // Bitfield to track which aspects of the state were updated by\n        // this transaction.\n        this.updated = 0;\n        // Object used to store metadata properties for the transaction.\n        this.meta = Object.create(null);\n        this.time = Date.now();\n        this.curSelection = state.selection;\n        this.storedMarks = state.storedMarks;\n    }\n    /**\n    The transaction's current selection. This defaults to the editor\n    selection [mapped](https://prosemirror.net/docs/ref/#state.Selection.map) through the steps in the\n    transaction, but can be overwritten with\n    [`setSelection`](https://prosemirror.net/docs/ref/#state.Transaction.setSelection).\n    */ get selection() {\n        if (this.curSelectionFor < this.steps.length) {\n            this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor));\n            this.curSelectionFor = this.steps.length;\n        }\n        return this.curSelection;\n    }\n    /**\n    Update the transaction's current selection. Will determine the\n    selection that the editor gets when the transaction is applied.\n    */ setSelection(selection) {\n        if (selection.$from.doc != this.doc) throw new RangeError(\"Selection passed to setSelection must point at the current document\");\n        this.curSelection = selection;\n        this.curSelectionFor = this.steps.length;\n        this.updated = (this.updated | $1485b5e112c966ab$var$UPDATED_SEL) & ~$1485b5e112c966ab$var$UPDATED_MARKS;\n        this.storedMarks = null;\n        return this;\n    }\n    /**\n    Whether the selection was explicitly updated by this transaction.\n    */ get selectionSet() {\n        return (this.updated & $1485b5e112c966ab$var$UPDATED_SEL) > 0;\n    }\n    /**\n    Set the current stored marks.\n    */ setStoredMarks(marks) {\n        this.storedMarks = marks;\n        this.updated |= $1485b5e112c966ab$var$UPDATED_MARKS;\n        return this;\n    }\n    /**\n    Make sure the current stored marks or, if that is null, the marks\n    at the selection, match the given set of marks. Does nothing if\n    this is already the case.\n    */ ensureMarks(marks) {\n        if (!(0, $1krlL.Mark).sameSet(this.storedMarks || this.selection.$from.marks(), marks)) this.setStoredMarks(marks);\n        return this;\n    }\n    /**\n    Add a mark to the set of stored marks.\n    */ addStoredMark(mark) {\n        return this.ensureMarks(mark.addToSet(this.storedMarks || this.selection.$head.marks()));\n    }\n    /**\n    Remove a mark or mark type from the set of stored marks.\n    */ removeStoredMark(mark) {\n        return this.ensureMarks(mark.removeFromSet(this.storedMarks || this.selection.$head.marks()));\n    }\n    /**\n    Whether the stored marks were explicitly set for this transaction.\n    */ get storedMarksSet() {\n        return (this.updated & $1485b5e112c966ab$var$UPDATED_MARKS) > 0;\n    }\n    /**\n    @internal\n    */ addStep(step, doc) {\n        super.addStep(step, doc);\n        this.updated = this.updated & ~$1485b5e112c966ab$var$UPDATED_MARKS;\n        this.storedMarks = null;\n    }\n    /**\n    Update the timestamp for the transaction.\n    */ setTime(time) {\n        this.time = time;\n        return this;\n    }\n    /**\n    Replace the current selection with the given slice.\n    */ replaceSelection(slice) {\n        this.selection.replace(this, slice);\n        return this;\n    }\n    /**\n    Replace the selection with the given node. When `inheritMarks` is\n    true and the content is inline, it inherits the marks from the\n    place where it is inserted.\n    */ replaceSelectionWith(node, inheritMarks = true) {\n        let selection = this.selection;\n        if (inheritMarks) node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : selection.$from.marksAcross(selection.$to) || (0, $1krlL.Mark).none));\n        selection.replaceWith(this, node);\n        return this;\n    }\n    /**\n    Delete the selection.\n    */ deleteSelection() {\n        this.selection.replace(this);\n        return this;\n    }\n    /**\n    Replace the given range, or the selection if no range is given,\n    with a text node containing the given string.\n    */ insertText(text, from, to) {\n        let schema = this.doc.type.schema;\n        if (from == null) {\n            if (!text) return this.deleteSelection();\n            return this.replaceSelectionWith(schema.text(text), true);\n        } else {\n            if (to == null) to = from;\n            to = to == null ? from : to;\n            if (!text) return this.deleteRange(from, to);\n            let marks = this.storedMarks;\n            if (!marks) {\n                let $from = this.doc.resolve(from);\n                marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));\n            }\n            this.replaceRangeWith(from, to, schema.text(text, marks));\n            if (!this.selection.empty) this.setSelection($1485b5e112c966ab$export$52baac22726c72bf.near(this.selection.$to));\n            return this;\n        }\n    }\n    /**\n    Store a metadata property in this transaction, keyed either by\n    name or by plugin.\n    */ setMeta(key, value) {\n        this.meta[typeof key == \"string\" ? key : key.key] = value;\n        return this;\n    }\n    /**\n    Retrieve a metadata property for a given name or plugin.\n    */ getMeta(key) {\n        return this.meta[typeof key == \"string\" ? key : key.key];\n    }\n    /**\n    Returns true if this transaction doesn't contain any metadata,\n    and can thus safely be extended.\n    */ get isGeneric() {\n        for(let _ in this.meta)return false;\n        return true;\n    }\n    /**\n    Indicate that the editor should scroll the selection into view\n    when updated to the state produced by this transaction.\n    */ scrollIntoView() {\n        this.updated |= $1485b5e112c966ab$var$UPDATED_SCROLL;\n        return this;\n    }\n    /**\n    True when this transaction has had `scrollIntoView` called on it.\n    */ get scrolledIntoView() {\n        return (this.updated & $1485b5e112c966ab$var$UPDATED_SCROLL) > 0;\n    }\n}\nfunction $1485b5e112c966ab$var$bind(f, self) {\n    return !self || !f ? f : f.bind(self);\n}\nclass $1485b5e112c966ab$var$FieldDesc {\n    constructor(name, desc, self){\n        this.name = name;\n        this.init = $1485b5e112c966ab$var$bind(desc.init, self);\n        this.apply = $1485b5e112c966ab$var$bind(desc.apply, self);\n    }\n}\nconst $1485b5e112c966ab$var$baseFields = [\n    new $1485b5e112c966ab$var$FieldDesc(\"doc\", {\n        init (config) {\n            return config.doc || config.schema.topNodeType.createAndFill();\n        },\n        apply (tr) {\n            return tr.doc;\n        }\n    }),\n    new $1485b5e112c966ab$var$FieldDesc(\"selection\", {\n        init (config, instance) {\n            return config.selection || $1485b5e112c966ab$export$52baac22726c72bf.atStart(instance.doc);\n        },\n        apply (tr) {\n            return tr.selection;\n        }\n    }),\n    new $1485b5e112c966ab$var$FieldDesc(\"storedMarks\", {\n        init (config) {\n            return config.storedMarks || null;\n        },\n        apply (tr, _marks, _old, state) {\n            return state.selection.$cursor ? tr.storedMarks : null;\n        }\n    }),\n    new $1485b5e112c966ab$var$FieldDesc(\"scrollToSelection\", {\n        init () {\n            return 0;\n        },\n        apply (tr, prev) {\n            return tr.scrolledIntoView ? prev + 1 : prev;\n        }\n    })\n];\n// Object wrapping the part of a state object that stays the same\n// across transactions. Stored in the state's `config` property.\nclass $1485b5e112c966ab$var$Configuration {\n    constructor(schema, plugins){\n        this.schema = schema;\n        this.plugins = [];\n        this.pluginsByKey = Object.create(null);\n        this.fields = $1485b5e112c966ab$var$baseFields.slice();\n        if (plugins) plugins.forEach((plugin)=>{\n            if (this.pluginsByKey[plugin.key]) throw new RangeError(\"Adding different instances of a keyed plugin (\" + plugin.key + \")\");\n            this.plugins.push(plugin);\n            this.pluginsByKey[plugin.key] = plugin;\n            if (plugin.spec.state) this.fields.push(new $1485b5e112c966ab$var$FieldDesc(plugin.key, plugin.spec.state, plugin));\n        });\n    }\n}\n/**\nThe state of a ProseMirror editor is represented by an object of\nthis type. A state is a persistent data structure—it isn't\nupdated, but rather a new state value is computed from an old one\nusing the [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) method.\n\nA state holds a number of built-in fields, and plugins can\n[define](https://prosemirror.net/docs/ref/#state.PluginSpec.state) additional fields.\n*/ class $1485b5e112c966ab$export$afa855cbfaff27f2 {\n    /**\n    @internal\n    */ constructor(/**\n    @internal\n    */ config){\n        this.config = config;\n    }\n    /**\n    The schema of the state's document.\n    */ get schema() {\n        return this.config.schema;\n    }\n    /**\n    The plugins that are active in this state.\n    */ get plugins() {\n        return this.config.plugins;\n    }\n    /**\n    Apply the given transaction to produce a new state.\n    */ apply(tr) {\n        return this.applyTransaction(tr).state;\n    }\n    /**\n    @internal\n    */ filterTransaction(tr, ignore = -1) {\n        for(let i = 0; i < this.config.plugins.length; i++)if (i != ignore) {\n            let plugin = this.config.plugins[i];\n            if (plugin.spec.filterTransaction && !plugin.spec.filterTransaction.call(plugin, tr, this)) return false;\n        }\n        return true;\n    }\n    /**\n    Verbose variant of [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) that\n    returns the precise transactions that were applied (which might\n    be influenced by the [transaction\n    hooks](https://prosemirror.net/docs/ref/#state.PluginSpec.filterTransaction) of\n    plugins) along with the new state.\n    */ applyTransaction(rootTr) {\n        if (!this.filterTransaction(rootTr)) return {\n            state: this,\n            transactions: []\n        };\n        let trs = [\n            rootTr\n        ], newState = this.applyInner(rootTr), seen = null;\n        // This loop repeatedly gives plugins a chance to respond to\n        // transactions as new transactions are added, making sure to only\n        // pass the transactions the plugin did not see before.\n        for(;;){\n            let haveNew = false;\n            for(let i = 0; i < this.config.plugins.length; i++){\n                let plugin = this.config.plugins[i];\n                if (plugin.spec.appendTransaction) {\n                    let n = seen ? seen[i].n : 0, oldState = seen ? seen[i].state : this;\n                    let tr = n < trs.length && plugin.spec.appendTransaction.call(plugin, n ? trs.slice(n) : trs, oldState, newState);\n                    if (tr && newState.filterTransaction(tr, i)) {\n                        tr.setMeta(\"appendedTransaction\", rootTr);\n                        if (!seen) {\n                            seen = [];\n                            for(let j = 0; j < this.config.plugins.length; j++)seen.push(j < i ? {\n                                state: newState,\n                                n: trs.length\n                            } : {\n                                state: this,\n                                n: 0\n                            });\n                        }\n                        trs.push(tr);\n                        newState = newState.applyInner(tr);\n                        haveNew = true;\n                    }\n                    if (seen) seen[i] = {\n                        state: newState,\n                        n: trs.length\n                    };\n                }\n            }\n            if (!haveNew) return {\n                state: newState,\n                transactions: trs\n            };\n        }\n    }\n    /**\n    @internal\n    */ applyInner(tr) {\n        if (!tr.before.eq(this.doc)) throw new RangeError(\"Applying a mismatched transaction\");\n        let newInstance = new $1485b5e112c966ab$export$afa855cbfaff27f2(this.config), fields = this.config.fields;\n        for(let i = 0; i < fields.length; i++){\n            let field = fields[i];\n            newInstance[field.name] = field.apply(tr, this[field.name], this, newInstance);\n        }\n        return newInstance;\n    }\n    /**\n    Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.\n    */ get tr() {\n        return new $1485b5e112c966ab$export$febc5573c75cefb0(this);\n    }\n    /**\n    Create a new state.\n    */ static create(config) {\n        let $config = new $1485b5e112c966ab$var$Configuration(config.doc ? config.doc.type.schema : config.schema, config.plugins);\n        let instance = new $1485b5e112c966ab$export$afa855cbfaff27f2($config);\n        for(let i = 0; i < $config.fields.length; i++)instance[$config.fields[i].name] = $config.fields[i].init(config, instance);\n        return instance;\n    }\n    /**\n    Create a new state based on this one, but with an adjusted set\n    of active plugins. State fields that exist in both sets of\n    plugins are kept unchanged. Those that no longer exist are\n    dropped, and those that are new are initialized using their\n    [`init`](https://prosemirror.net/docs/ref/#state.StateField.init) method, passing in the new\n    configuration object..\n    */ reconfigure(config) {\n        let $config = new $1485b5e112c966ab$var$Configuration(this.schema, config.plugins);\n        let fields = $config.fields, instance = new $1485b5e112c966ab$export$afa855cbfaff27f2($config);\n        for(let i = 0; i < fields.length; i++){\n            let name = fields[i].name;\n            instance[name] = this.hasOwnProperty(name) ? this[name] : fields[i].init(config, instance);\n        }\n        return instance;\n    }\n    /**\n    Serialize this state to JSON. If you want to serialize the state\n    of plugins, pass an object mapping property names to use in the\n    resulting JSON object to plugin objects. The argument may also be\n    a string or number, in which case it is ignored, to support the\n    way `JSON.stringify` calls `toString` methods.\n    */ toJSON(pluginFields) {\n        let result = {\n            doc: this.doc.toJSON(),\n            selection: this.selection.toJSON()\n        };\n        if (this.storedMarks) result.storedMarks = this.storedMarks.map((m)=>m.toJSON());\n        if (pluginFields && typeof pluginFields == 'object') for(let prop in pluginFields){\n            if (prop == \"doc\" || prop == \"selection\") throw new RangeError(\"The JSON fields `doc` and `selection` are reserved\");\n            let plugin = pluginFields[prop], state = plugin.spec.state;\n            if (state && state.toJSON) result[prop] = state.toJSON.call(plugin, this[plugin.key]);\n        }\n        return result;\n    }\n    /**\n    Deserialize a JSON representation of a state. `config` should\n    have at least a `schema` field, and should contain array of\n    plugins to initialize the state with. `pluginFields` can be used\n    to deserialize the state of plugins, by associating plugin\n    instances with the property names they use in the JSON object.\n    */ static fromJSON(config, json, pluginFields) {\n        if (!json) throw new RangeError(\"Invalid input for EditorState.fromJSON\");\n        if (!config.schema) throw new RangeError(\"Required config field 'schema' missing\");\n        let $config = new $1485b5e112c966ab$var$Configuration(config.schema, config.plugins);\n        let instance = new $1485b5e112c966ab$export$afa855cbfaff27f2($config);\n        $config.fields.forEach((field)=>{\n            if (field.name == \"doc\") instance.doc = (0, $1krlL.Node).fromJSON(config.schema, json.doc);\n            else if (field.name == \"selection\") instance.selection = $1485b5e112c966ab$export$52baac22726c72bf.fromJSON(instance.doc, json.selection);\n            else if (field.name == \"storedMarks\") {\n                if (json.storedMarks) instance.storedMarks = json.storedMarks.map(config.schema.markFromJSON);\n            } else {\n                if (pluginFields) for(let prop in pluginFields){\n                    let plugin = pluginFields[prop], state = plugin.spec.state;\n                    if (plugin.key == field.name && state && state.fromJSON && Object.prototype.hasOwnProperty.call(json, prop)) {\n                        instance[field.name] = state.fromJSON.call(plugin, config, json[prop], instance);\n                        return;\n                    }\n                }\n                instance[field.name] = field.init(config, instance);\n            }\n        });\n        return instance;\n    }\n}\nfunction $1485b5e112c966ab$var$bindProps(obj, self, target) {\n    for(let prop in obj){\n        let val = obj[prop];\n        if (val instanceof Function) val = val.bind(self);\n        else if (prop == \"handleDOMEvents\") val = $1485b5e112c966ab$var$bindProps(val, self, {});\n        target[prop] = val;\n    }\n    return target;\n}\n/**\nPlugins bundle functionality that can be added to an editor.\nThey are part of the [editor state](https://prosemirror.net/docs/ref/#state.EditorState) and\nmay influence that state and the view that contains it.\n*/ class $1485b5e112c966ab$export$901cf72dabf2112a {\n    /**\n    Create a plugin.\n    */ constructor(/**\n    The plugin's [spec object](https://prosemirror.net/docs/ref/#state.PluginSpec).\n    */ spec){\n        this.spec = spec;\n        /**\n        The [props](https://prosemirror.net/docs/ref/#view.EditorProps) exported by this plugin.\n        */ this.props = {};\n        if (spec.props) $1485b5e112c966ab$var$bindProps(spec.props, this, this.props);\n        this.key = spec.key ? spec.key.key : $1485b5e112c966ab$var$createKey(\"plugin\");\n    }\n    /**\n    Extract the plugin's state field from an editor state.\n    */ getState(state) {\n        return state[this.key];\n    }\n}\nconst $1485b5e112c966ab$var$keys = Object.create(null);\nfunction $1485b5e112c966ab$var$createKey(name) {\n    if (name in $1485b5e112c966ab$var$keys) return name + \"$\" + ++$1485b5e112c966ab$var$keys[name];\n    $1485b5e112c966ab$var$keys[name] = 0;\n    return name + \"$\";\n}\n/**\nA key is used to [tag](https://prosemirror.net/docs/ref/#state.PluginSpec.key) plugins in a way\nthat makes it possible to find them, given an editor state.\nAssigning a key does mean only one plugin of that type can be\nactive in a state.\n*/ class $1485b5e112c966ab$export$1692d8b0e89cecc3 {\n    /**\n    Create a plugin key.\n    */ constructor(name = \"key\"){\n        this.key = $1485b5e112c966ab$var$createKey(name);\n    }\n    /**\n    Get the active plugin with this key, if any, from an editor\n    state.\n    */ get(state) {\n        return state.config.pluginsByKey[this.key];\n    }\n    /**\n    Get the plugin's state from an editor state.\n    */ getState(state) {\n        return state[this.key];\n    }\n}\n\n});\nparcelRegister(\"1krlL\", function(module, exports) {\n\n$parcel$export(module.exports, \"Fragment\", () => $0f7cdfd9537f6363$export$ffb0004e005737fa);\n$parcel$export(module.exports, \"Mark\", () => $0f7cdfd9537f6363$export$c9d15bcfc6d42044);\n$parcel$export(module.exports, \"ReplaceError\", () => $0f7cdfd9537f6363$export$6de0e778727af3f2);\n$parcel$export(module.exports, \"Slice\", () => $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e);\n$parcel$export(module.exports, \"NodeRange\", () => $0f7cdfd9537f6363$export$7bc461ceb770fb16);\n$parcel$export(module.exports, \"Node\", () => $0f7cdfd9537f6363$export$85c928794f8d04d4);\n$parcel$export(module.exports, \"MarkType\", () => $0f7cdfd9537f6363$export$b6a78689043c6521);\n$parcel$export(module.exports, \"Schema\", () => $0f7cdfd9537f6363$export$19342e026b58ebb7);\n$parcel$export(module.exports, \"DOMParser\", () => $0f7cdfd9537f6363$export$1059c6e7d2ce5669);\n$parcel$export(module.exports, \"DOMSerializer\", () => $0f7cdfd9537f6363$export$3476b78f8f5a8b72);\n\nvar $6ybul = parcelRequire(\"6ybul\");\nfunction $0f7cdfd9537f6363$var$findDiffStart(a, b, pos) {\n    for(let i = 0;; i++){\n        if (i == a.childCount || i == b.childCount) return a.childCount == b.childCount ? null : pos;\n        let childA = a.child(i), childB = b.child(i);\n        if (childA == childB) {\n            pos += childA.nodeSize;\n            continue;\n        }\n        if (!childA.sameMarkup(childB)) return pos;\n        if (childA.isText && childA.text != childB.text) {\n            let tA = childA.text, tB = childB.text, j = 0;\n            for(; tA[j] == tB[j]; j++)pos++;\n            if (j && j < tA.length && j < tB.length && $0f7cdfd9537f6363$var$surrogateHigh(tA.charCodeAt(j - 1)) && $0f7cdfd9537f6363$var$surrogateLow(tA.charCodeAt(j))) pos--;\n            return pos;\n        }\n        if (childA.content.size || childB.content.size) {\n            let inner = $0f7cdfd9537f6363$var$findDiffStart(childA.content, childB.content, pos + 1);\n            if (inner != null) return inner;\n        }\n        pos += childA.nodeSize;\n    }\n}\nfunction $0f7cdfd9537f6363$var$findDiffEnd(a, b, posA, posB) {\n    for(let iA = a.childCount, iB = b.childCount;;){\n        if (iA == 0 || iB == 0) return iA == iB ? null : {\n            a: posA,\n            b: posB\n        };\n        let childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize;\n        if (childA == childB) {\n            posA -= size;\n            posB -= size;\n            continue;\n        }\n        if (!childA.sameMarkup(childB)) return {\n            a: posA,\n            b: posB\n        };\n        if (childA.isText && childA.text != childB.text) {\n            let tA = childA.text, tB = childB.text, iA = tA.length, iB = tB.length;\n            while(iA > 0 && iB > 0 && tA[iA - 1] == tB[iB - 1]){\n                iA--;\n                iB--;\n                posA--;\n                posB--;\n            }\n            if (iA && iB && iA < tA.length && $0f7cdfd9537f6363$var$surrogateHigh(tA.charCodeAt(iA - 1)) && $0f7cdfd9537f6363$var$surrogateLow(tA.charCodeAt(iA))) {\n                posA++;\n                posB++;\n            }\n            return {\n                a: posA,\n                b: posB\n            };\n        }\n        if (childA.content.size || childB.content.size) {\n            let inner = $0f7cdfd9537f6363$var$findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n            if (inner) return inner;\n        }\n        posA -= size;\n        posB -= size;\n    }\n}\nfunction $0f7cdfd9537f6363$var$surrogateLow(ch) {\n    return ch >= 0xDC00 && ch < 0xE000;\n}\nfunction $0f7cdfd9537f6363$var$surrogateHigh(ch) {\n    return ch >= 0xD800 && ch < 0xDC00;\n}\n/**\nA fragment represents a node's collection of child nodes.\n\nLike nodes, fragments are persistent data structures, and you\nshould not mutate them or their content. Rather, you create new\ninstances whenever needed. The API tries to make this easy.\n*/ class $0f7cdfd9537f6363$export$ffb0004e005737fa {\n    /**\n    @internal\n    */ constructor(/**\n    The child nodes in this fragment.\n    */ content, size){\n        this.content = content;\n        this.size = size || 0;\n        if (size == null) for(let i = 0; i < content.length; i++)this.size += content[i].nodeSize;\n    }\n    /**\n    Invoke a callback for all descendant nodes between the given two\n    positions (relative to start of this fragment). Doesn't descend\n    into a node when the callback returns `false`.\n    */ nodesBetween(from, to, f, nodeStart = 0, parent) {\n        for(let i = 0, pos = 0; pos < to; i++){\n            let child = this.content[i], end = pos + child.nodeSize;\n            if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) {\n                let start = pos + 1;\n                child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start);\n            }\n            pos = end;\n        }\n    }\n    /**\n    Call the given callback for every descendant node. `pos` will be\n    relative to the start of the fragment. The callback may return\n    `false` to prevent traversal of a given node's children.\n    */ descendants(f) {\n        this.nodesBetween(0, this.size, f);\n    }\n    /**\n    Extract the text between `from` and `to`. See the same method on\n    [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween).\n    */ textBetween(from, to, blockSeparator, leafText) {\n        let text = \"\", first = true;\n        this.nodesBetween(from, to, (node, pos)=>{\n            let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos) : !node.isLeaf ? \"\" : leafText ? typeof leafText === \"function\" ? leafText(node) : leafText : node.type.spec.leafText ? node.type.spec.leafText(node) : \"\";\n            if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) {\n                if (first) first = false;\n                else text += blockSeparator;\n            }\n            text += nodeText;\n        }, 0);\n        return text;\n    }\n    /**\n    Create a new fragment containing the combined content of this\n    fragment and the other.\n    */ append(other) {\n        if (!other.size) return this;\n        if (!this.size) return other;\n        let last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0;\n        if (last.isText && last.sameMarkup(first)) {\n            content[content.length - 1] = last.withText(last.text + first.text);\n            i = 1;\n        }\n        for(; i < other.content.length; i++)content.push(other.content[i]);\n        return new $0f7cdfd9537f6363$export$ffb0004e005737fa(content, this.size + other.size);\n    }\n    /**\n    Cut out the sub-fragment between the two given positions.\n    */ cut(from, to = this.size) {\n        if (from == 0 && to == this.size) return this;\n        let result = [], size = 0;\n        if (to > from) for(let i = 0, pos = 0; pos < to; i++){\n            let child = this.content[i], end = pos + child.nodeSize;\n            if (end > from) {\n                if (pos < from || end > to) {\n                    if (child.isText) child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));\n                    else child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1));\n                }\n                result.push(child);\n                size += child.nodeSize;\n            }\n            pos = end;\n        }\n        return new $0f7cdfd9537f6363$export$ffb0004e005737fa(result, size);\n    }\n    /**\n    @internal\n    */ cutByIndex(from, to) {\n        if (from == to) return $0f7cdfd9537f6363$export$ffb0004e005737fa.empty;\n        if (from == 0 && to == this.content.length) return this;\n        return new $0f7cdfd9537f6363$export$ffb0004e005737fa(this.content.slice(from, to));\n    }\n    /**\n    Create a new fragment in which the node at the given index is\n    replaced by the given node.\n    */ replaceChild(index, node) {\n        let current = this.content[index];\n        if (current == node) return this;\n        let copy = this.content.slice();\n        let size = this.size + node.nodeSize - current.nodeSize;\n        copy[index] = node;\n        return new $0f7cdfd9537f6363$export$ffb0004e005737fa(copy, size);\n    }\n    /**\n    Create a new fragment by prepending the given node to this\n    fragment.\n    */ addToStart(node) {\n        return new $0f7cdfd9537f6363$export$ffb0004e005737fa([\n            node\n        ].concat(this.content), this.size + node.nodeSize);\n    }\n    /**\n    Create a new fragment by appending the given node to this\n    fragment.\n    */ addToEnd(node) {\n        return new $0f7cdfd9537f6363$export$ffb0004e005737fa(this.content.concat(node), this.size + node.nodeSize);\n    }\n    /**\n    Compare this fragment to another one.\n    */ eq(other) {\n        if (this.content.length != other.content.length) return false;\n        for(let i = 0; i < this.content.length; i++)if (!this.content[i].eq(other.content[i])) return false;\n        return true;\n    }\n    /**\n    The first child of the fragment, or `null` if it is empty.\n    */ get firstChild() {\n        return this.content.length ? this.content[0] : null;\n    }\n    /**\n    The last child of the fragment, or `null` if it is empty.\n    */ get lastChild() {\n        return this.content.length ? this.content[this.content.length - 1] : null;\n    }\n    /**\n    The number of child nodes in this fragment.\n    */ get childCount() {\n        return this.content.length;\n    }\n    /**\n    Get the child node at the given index. Raise an error when the\n    index is out of range.\n    */ child(index) {\n        let found = this.content[index];\n        if (!found) throw new RangeError(\"Index \" + index + \" out of range for \" + this);\n        return found;\n    }\n    /**\n    Get the child node at the given index, if it exists.\n    */ maybeChild(index) {\n        return this.content[index] || null;\n    }\n    /**\n    Call `f` for every child node, passing the node, its offset\n    into this parent node, and its index.\n    */ forEach(f) {\n        for(let i = 0, p = 0; i < this.content.length; i++){\n            let child = this.content[i];\n            f(child, p, i);\n            p += child.nodeSize;\n        }\n    }\n    /**\n    Find the first position at which this fragment and another\n    fragment differ, or `null` if they are the same.\n    */ findDiffStart(other, pos = 0) {\n        return $0f7cdfd9537f6363$var$findDiffStart(this, other, pos);\n    }\n    /**\n    Find the first position, searching from the end, at which this\n    fragment and the given fragment differ, or `null` if they are\n    the same. Since this position will not be the same in both\n    nodes, an object with two separate positions is returned.\n    */ findDiffEnd(other, pos = this.size, otherPos = other.size) {\n        return $0f7cdfd9537f6363$var$findDiffEnd(this, other, pos, otherPos);\n    }\n    /**\n    Find the index and inner offset corresponding to a given relative\n    position in this fragment. The result object will be reused\n    (overwritten) the next time the function is called. @internal\n    */ findIndex(pos) {\n        if (pos == 0) return $0f7cdfd9537f6363$var$retIndex(0, pos);\n        if (pos == this.size) return $0f7cdfd9537f6363$var$retIndex(this.content.length, pos);\n        if (pos > this.size || pos < 0) throw new RangeError(`Position ${pos} outside of fragment (${this})`);\n        for(let i = 0, curPos = 0;; i++){\n            let cur = this.child(i), end = curPos + cur.nodeSize;\n            if (end >= pos) {\n                if (end == pos) return $0f7cdfd9537f6363$var$retIndex(i + 1, end);\n                return $0f7cdfd9537f6363$var$retIndex(i, curPos);\n            }\n            curPos = end;\n        }\n    }\n    /**\n    Return a debugging string that describes this fragment.\n    */ toString() {\n        return \"<\" + this.toStringInner() + \">\";\n    }\n    /**\n    @internal\n    */ toStringInner() {\n        return this.content.join(\", \");\n    }\n    /**\n    Create a JSON-serializeable representation of this fragment.\n    */ toJSON() {\n        return this.content.length ? this.content.map((n)=>n.toJSON()) : null;\n    }\n    /**\n    Deserialize a fragment from its JSON representation.\n    */ static fromJSON(schema, value) {\n        if (!value) return $0f7cdfd9537f6363$export$ffb0004e005737fa.empty;\n        if (!Array.isArray(value)) throw new RangeError(\"Invalid input for Fragment.fromJSON\");\n        return $0f7cdfd9537f6363$export$ffb0004e005737fa.fromArray(value.map(schema.nodeFromJSON));\n    }\n    /**\n    Build a fragment from an array of nodes. Ensures that adjacent\n    text nodes with the same marks are joined together.\n    */ static fromArray(array) {\n        if (!array.length) return $0f7cdfd9537f6363$export$ffb0004e005737fa.empty;\n        let joined, size = 0;\n        for(let i = 0; i < array.length; i++){\n            let node = array[i];\n            size += node.nodeSize;\n            if (i && node.isText && array[i - 1].sameMarkup(node)) {\n                if (!joined) joined = array.slice(0, i);\n                joined[joined.length - 1] = node.withText(joined[joined.length - 1].text + node.text);\n            } else if (joined) joined.push(node);\n        }\n        return new $0f7cdfd9537f6363$export$ffb0004e005737fa(joined || array, size);\n    }\n    /**\n    Create a fragment from something that can be interpreted as a\n    set of nodes. For `null`, it returns the empty fragment. For a\n    fragment, the fragment itself. For a node or array of nodes, a\n    fragment containing those nodes.\n    */ static from(nodes) {\n        if (!nodes) return $0f7cdfd9537f6363$export$ffb0004e005737fa.empty;\n        if (nodes instanceof $0f7cdfd9537f6363$export$ffb0004e005737fa) return nodes;\n        if (Array.isArray(nodes)) return this.fromArray(nodes);\n        if (nodes.attrs) return new $0f7cdfd9537f6363$export$ffb0004e005737fa([\n            nodes\n        ], nodes.nodeSize);\n        throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" + (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"));\n    }\n}\n/**\nAn empty fragment. Intended to be reused whenever a node doesn't\ncontain anything (rather than allocating a new empty fragment for\neach leaf node).\n*/ $0f7cdfd9537f6363$export$ffb0004e005737fa.empty = new $0f7cdfd9537f6363$export$ffb0004e005737fa([], 0);\nconst $0f7cdfd9537f6363$var$found = {\n    index: 0,\n    offset: 0\n};\nfunction $0f7cdfd9537f6363$var$retIndex(index, offset) {\n    $0f7cdfd9537f6363$var$found.index = index;\n    $0f7cdfd9537f6363$var$found.offset = offset;\n    return $0f7cdfd9537f6363$var$found;\n}\nfunction $0f7cdfd9537f6363$var$compareDeep(a, b) {\n    if (a === b) return true;\n    if (!(a && typeof a == \"object\") || !(b && typeof b == \"object\")) return false;\n    let array = Array.isArray(a);\n    if (Array.isArray(b) != array) return false;\n    if (array) {\n        if (a.length != b.length) return false;\n        for(let i = 0; i < a.length; i++)if (!$0f7cdfd9537f6363$var$compareDeep(a[i], b[i])) return false;\n    } else {\n        for(let p in a)if (!(p in b) || !$0f7cdfd9537f6363$var$compareDeep(a[p], b[p])) return false;\n        for(let p in b)if (!(p in a)) return false;\n    }\n    return true;\n}\n/**\nA mark is a piece of information that can be attached to a node,\nsuch as it being emphasized, in code font, or a link. It has a\ntype and optionally a set of attributes that provide further\ninformation (such as the target of the link). Marks are created\nthrough a `Schema`, which controls which types exist and which\nattributes they have.\n*/ class $0f7cdfd9537f6363$export$c9d15bcfc6d42044 {\n    /**\n    @internal\n    */ constructor(/**\n    The type of this mark.\n    */ type, /**\n    The attributes associated with this mark.\n    */ attrs){\n        this.type = type;\n        this.attrs = attrs;\n    }\n    /**\n    Given a set of marks, create a new set which contains this one as\n    well, in the right position. If this mark is already in the set,\n    the set itself is returned. If any marks that are set to be\n    [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present,\n    those are replaced by this one.\n    */ addToSet(set) {\n        let copy, placed = false;\n        for(let i = 0; i < set.length; i++){\n            let other = set[i];\n            if (this.eq(other)) return set;\n            if (this.type.excludes(other.type)) {\n                if (!copy) copy = set.slice(0, i);\n            } else if (other.type.excludes(this.type)) return set;\n            else {\n                if (!placed && other.type.rank > this.type.rank) {\n                    if (!copy) copy = set.slice(0, i);\n                    copy.push(this);\n                    placed = true;\n                }\n                if (copy) copy.push(other);\n            }\n        }\n        if (!copy) copy = set.slice();\n        if (!placed) copy.push(this);\n        return copy;\n    }\n    /**\n    Remove this mark from the given set, returning a new set. If this\n    mark is not in the set, the set itself is returned.\n    */ removeFromSet(set) {\n        for(let i = 0; i < set.length; i++)if (this.eq(set[i])) return set.slice(0, i).concat(set.slice(i + 1));\n        return set;\n    }\n    /**\n    Test whether this mark is in the given set of marks.\n    */ isInSet(set) {\n        for(let i = 0; i < set.length; i++)if (this.eq(set[i])) return true;\n        return false;\n    }\n    /**\n    Test whether this mark has the same type and attributes as\n    another mark.\n    */ eq(other) {\n        return this == other || this.type == other.type && $0f7cdfd9537f6363$var$compareDeep(this.attrs, other.attrs);\n    }\n    /**\n    Convert this mark to a JSON-serializeable representation.\n    */ toJSON() {\n        let obj = {\n            type: this.type.name\n        };\n        for(let _ in this.attrs){\n            obj.attrs = this.attrs;\n            break;\n        }\n        return obj;\n    }\n    /**\n    Deserialize a mark from JSON.\n    */ static fromJSON(schema, json) {\n        if (!json) throw new RangeError(\"Invalid input for Mark.fromJSON\");\n        let type = schema.marks[json.type];\n        if (!type) throw new RangeError(`There is no mark type ${json.type} in this schema`);\n        let mark = type.create(json.attrs);\n        return mark;\n    }\n    /**\n    Test whether two sets of marks are identical.\n    */ static sameSet(a, b) {\n        if (a == b) return true;\n        if (a.length != b.length) return false;\n        for(let i = 0; i < a.length; i++)if (!a[i].eq(b[i])) return false;\n        return true;\n    }\n    /**\n    Create a properly sorted mark set from null, a single mark, or an\n    unsorted array of marks.\n    */ static setFrom(marks) {\n        if (!marks || Array.isArray(marks) && marks.length == 0) return $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none;\n        if (marks instanceof $0f7cdfd9537f6363$export$c9d15bcfc6d42044) return [\n            marks\n        ];\n        let copy = marks.slice();\n        copy.sort((a, b)=>a.type.rank - b.type.rank);\n        return copy;\n    }\n}\n/**\nThe empty set of marks.\n*/ $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none = [];\n/**\nError type raised by [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) when\ngiven an invalid replacement.\n*/ class $0f7cdfd9537f6363$export$6de0e778727af3f2 extends Error {\n}\n/**\nA slice represents a piece cut out of a larger document. It\nstores not only a fragment, but also the depth up to which nodes on\nboth side are ‘open’ (cut through).\n*/ class $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e {\n    /**\n    Create a slice. When specifying a non-zero open depth, you must\n    make sure that there are nodes of at least that depth at the\n    appropriate side of the fragment—i.e. if the fragment is an\n    empty paragraph node, `openStart` and `openEnd` can't be greater\n    than 1.\n    \n    It is not necessary for the content of open nodes to conform to\n    the schema's content constraints, though it should be a valid\n    start/end/middle for such a node, depending on which sides are\n    open.\n    */ constructor(/**\n    The slice's content.\n    */ content, /**\n    The open depth at the start of the fragment.\n    */ openStart, /**\n    The open depth at the end.\n    */ openEnd){\n        this.content = content;\n        this.openStart = openStart;\n        this.openEnd = openEnd;\n    }\n    /**\n    The size this slice would add when inserted into a document.\n    */ get size() {\n        return this.content.size - this.openStart - this.openEnd;\n    }\n    /**\n    @internal\n    */ insertAt(pos, fragment) {\n        let content = $0f7cdfd9537f6363$var$insertInto(this.content, pos + this.openStart, fragment, this.openStart + 1, this.openEnd + 1);\n        return content && new $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e(content, this.openStart, this.openEnd);\n    }\n    /**\n    @internal\n    */ removeBetween(from, to) {\n        return new $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e($0f7cdfd9537f6363$var$removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd);\n    }\n    /**\n    Tests whether this slice is equal to another slice.\n    */ eq(other) {\n        return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd;\n    }\n    /**\n    @internal\n    */ toString() {\n        return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\";\n    }\n    /**\n    Convert a slice to a JSON-serializable representation.\n    */ toJSON() {\n        if (!this.content.size) return null;\n        let json = {\n            content: this.content.toJSON()\n        };\n        if (this.openStart > 0) json.openStart = this.openStart;\n        if (this.openEnd > 0) json.openEnd = this.openEnd;\n        return json;\n    }\n    /**\n    Deserialize a slice from its JSON representation.\n    */ static fromJSON(schema, json) {\n        if (!json) return $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e.empty;\n        let openStart = json.openStart || 0, openEnd = json.openEnd || 0;\n        if (typeof openStart != \"number\" || typeof openEnd != \"number\") throw new RangeError(\"Invalid input for Slice.fromJSON\");\n        return new $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e($0f7cdfd9537f6363$export$ffb0004e005737fa.fromJSON(schema, json.content), openStart, openEnd);\n    }\n    /**\n    Create a slice from a fragment by taking the maximum possible\n    open value on both side of the fragment.\n    */ static maxOpen(fragment, openIsolating = true) {\n        let openStart = 0, openEnd = 0;\n        for(let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild)openStart++;\n        for(let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild)openEnd++;\n        return new $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e(fragment, openStart, openEnd);\n    }\n}\n/**\nThe empty slice.\n*/ $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e.empty = new $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e($0f7cdfd9537f6363$export$ffb0004e005737fa.empty, 0, 0);\nfunction $0f7cdfd9537f6363$var$removeRange(content, from, to) {\n    let { index: index, offset: offset } = content.findIndex(from), child = content.maybeChild(index);\n    let { index: indexTo, offset: offsetTo } = content.findIndex(to);\n    if (offset == from || child.isText) {\n        if (offsetTo != to && !content.child(indexTo).isText) throw new RangeError(\"Removing non-flat range\");\n        return content.cut(0, from).append(content.cut(to));\n    }\n    if (index != indexTo) throw new RangeError(\"Removing non-flat range\");\n    return content.replaceChild(index, child.copy($0f7cdfd9537f6363$var$removeRange(child.content, from - offset - 1, to - offset - 1)));\n}\nfunction $0f7cdfd9537f6363$var$insertInto(content, dist, insert, openStart, openEnd, parent) {\n    let { index: index, offset: offset } = content.findIndex(dist), child = content.maybeChild(index);\n    if (offset == dist || child.isText) {\n        if (parent && openStart <= 0 && openEnd <= 0 && !parent.canReplace(index, index, insert)) return null;\n        return content.cut(0, dist).append(insert).append(content.cut(dist));\n    }\n    let inner = $0f7cdfd9537f6363$var$insertInto(child.content, dist - offset - 1, insert, index == 0 ? openStart - 1 : 0, index == content.childCount - 1 ? openEnd - 1 : 0, child);\n    return inner && content.replaceChild(index, child.copy(inner));\n}\nfunction $0f7cdfd9537f6363$var$replace($from, $to, slice) {\n    if (slice.openStart > $from.depth) throw new $0f7cdfd9537f6363$export$6de0e778727af3f2(\"Inserted content deeper than insertion position\");\n    if ($from.depth - slice.openStart != $to.depth - slice.openEnd) throw new $0f7cdfd9537f6363$export$6de0e778727af3f2(\"Inconsistent open depths\");\n    return $0f7cdfd9537f6363$var$replaceOuter($from, $to, slice, 0);\n}\nfunction $0f7cdfd9537f6363$var$replaceOuter($from, $to, slice, depth) {\n    let index = $from.index(depth), node = $from.node(depth);\n    if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n        let inner = $0f7cdfd9537f6363$var$replaceOuter($from, $to, slice, depth + 1);\n        return node.copy(node.content.replaceChild(index, inner));\n    } else if (!slice.content.size) return $0f7cdfd9537f6363$var$close(node, $0f7cdfd9537f6363$var$replaceTwoWay($from, $to, depth));\n    else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) {\n        let parent = $from.parent, content = parent.content;\n        return $0f7cdfd9537f6363$var$close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)));\n    } else {\n        let { start: start, end: end } = $0f7cdfd9537f6363$var$prepareSliceForReplace(slice, $from);\n        return $0f7cdfd9537f6363$var$close(node, $0f7cdfd9537f6363$var$replaceThreeWay($from, start, end, $to, depth));\n    }\n}\nfunction $0f7cdfd9537f6363$var$checkJoin(main, sub) {\n    if (!sub.type.compatibleContent(main.type)) throw new $0f7cdfd9537f6363$export$6de0e778727af3f2(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name);\n}\nfunction $0f7cdfd9537f6363$var$joinable($before, $after, depth) {\n    let node = $before.node(depth);\n    $0f7cdfd9537f6363$var$checkJoin(node, $after.node(depth));\n    return node;\n}\nfunction $0f7cdfd9537f6363$var$addNode(child, target) {\n    let last = target.length - 1;\n    if (last >= 0 && child.isText && child.sameMarkup(target[last])) target[last] = child.withText(target[last].text + child.text);\n    else target.push(child);\n}\nfunction $0f7cdfd9537f6363$var$addRange($start, $end, depth, target) {\n    let node = ($end || $start).node(depth);\n    let startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount;\n    if ($start) {\n        startIndex = $start.index(depth);\n        if ($start.depth > depth) startIndex++;\n        else if ($start.textOffset) {\n            $0f7cdfd9537f6363$var$addNode($start.nodeAfter, target);\n            startIndex++;\n        }\n    }\n    for(let i = startIndex; i < endIndex; i++)$0f7cdfd9537f6363$var$addNode(node.child(i), target);\n    if ($end && $end.depth == depth && $end.textOffset) $0f7cdfd9537f6363$var$addNode($end.nodeBefore, target);\n}\nfunction $0f7cdfd9537f6363$var$close(node, content) {\n    if (!node.type.validContent(content)) throw new $0f7cdfd9537f6363$export$6de0e778727af3f2(\"Invalid content for node \" + node.type.name);\n    return node.copy(content);\n}\nfunction $0f7cdfd9537f6363$var$replaceThreeWay($from, $start, $end, $to, depth) {\n    let openStart = $from.depth > depth && $0f7cdfd9537f6363$var$joinable($from, $start, depth + 1);\n    let openEnd = $to.depth > depth && $0f7cdfd9537f6363$var$joinable($end, $to, depth + 1);\n    let content = [];\n    $0f7cdfd9537f6363$var$addRange(null, $from, depth, content);\n    if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n        $0f7cdfd9537f6363$var$checkJoin(openStart, openEnd);\n        $0f7cdfd9537f6363$var$addNode($0f7cdfd9537f6363$var$close(openStart, $0f7cdfd9537f6363$var$replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n    } else {\n        if (openStart) $0f7cdfd9537f6363$var$addNode($0f7cdfd9537f6363$var$close(openStart, $0f7cdfd9537f6363$var$replaceTwoWay($from, $start, depth + 1)), content);\n        $0f7cdfd9537f6363$var$addRange($start, $end, depth, content);\n        if (openEnd) $0f7cdfd9537f6363$var$addNode($0f7cdfd9537f6363$var$close(openEnd, $0f7cdfd9537f6363$var$replaceTwoWay($end, $to, depth + 1)), content);\n    }\n    $0f7cdfd9537f6363$var$addRange($to, null, depth, content);\n    return new $0f7cdfd9537f6363$export$ffb0004e005737fa(content);\n}\nfunction $0f7cdfd9537f6363$var$replaceTwoWay($from, $to, depth) {\n    let content = [];\n    $0f7cdfd9537f6363$var$addRange(null, $from, depth, content);\n    if ($from.depth > depth) {\n        let type = $0f7cdfd9537f6363$var$joinable($from, $to, depth + 1);\n        $0f7cdfd9537f6363$var$addNode($0f7cdfd9537f6363$var$close(type, $0f7cdfd9537f6363$var$replaceTwoWay($from, $to, depth + 1)), content);\n    }\n    $0f7cdfd9537f6363$var$addRange($to, null, depth, content);\n    return new $0f7cdfd9537f6363$export$ffb0004e005737fa(content);\n}\nfunction $0f7cdfd9537f6363$var$prepareSliceForReplace(slice, $along) {\n    let extra = $along.depth - slice.openStart, parent = $along.node(extra);\n    let node = parent.copy(slice.content);\n    for(let i = extra - 1; i >= 0; i--)node = $along.node(i).copy($0f7cdfd9537f6363$export$ffb0004e005737fa.from(node));\n    return {\n        start: node.resolveNoCache(slice.openStart + extra),\n        end: node.resolveNoCache(node.content.size - slice.openEnd - extra)\n    };\n}\n/**\nYou can [_resolve_](https://prosemirror.net/docs/ref/#model.Node.resolve) a position to get more\ninformation about it. Objects of this class represent such a\nresolved position, providing various pieces of context\ninformation, and some helper methods.\n\nThroughout this interface, methods that take an optional `depth`\nparameter will interpret undefined as `this.depth` and negative\nnumbers as `this.depth + value`.\n*/ class $0f7cdfd9537f6363$export$b2a42f82e59e4b19 {\n    /**\n    @internal\n    */ constructor(/**\n    The position that was resolved.\n    */ pos, /**\n    @internal\n    */ path, /**\n    The offset this position has into its parent node.\n    */ parentOffset){\n        this.pos = pos;\n        this.path = path;\n        this.parentOffset = parentOffset;\n        this.depth = path.length / 3 - 1;\n    }\n    /**\n    @internal\n    */ resolveDepth(val) {\n        if (val == null) return this.depth;\n        if (val < 0) return this.depth + val;\n        return val;\n    }\n    /**\n    The parent node that the position points into. Note that even if\n    a position points into a text node, that node is not considered\n    the parent—text nodes are ‘flat’ in this model, and have no content.\n    */ get parent() {\n        return this.node(this.depth);\n    }\n    /**\n    The root node in which the position was resolved.\n    */ get doc() {\n        return this.node(0);\n    }\n    /**\n    The ancestor node at the given level. `p.node(p.depth)` is the\n    same as `p.parent`.\n    */ node(depth) {\n        return this.path[this.resolveDepth(depth) * 3];\n    }\n    /**\n    The index into the ancestor at the given level. If this points\n    at the 3rd node in the 2nd paragraph on the top level, for\n    example, `p.index(0)` is 1 and `p.index(1)` is 2.\n    */ index(depth) {\n        return this.path[this.resolveDepth(depth) * 3 + 1];\n    }\n    /**\n    The index pointing after this position into the ancestor at the\n    given level.\n    */ indexAfter(depth) {\n        depth = this.resolveDepth(depth);\n        return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1);\n    }\n    /**\n    The (absolute) position at the start of the node at the given\n    level.\n    */ start(depth) {\n        depth = this.resolveDepth(depth);\n        return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n    }\n    /**\n    The (absolute) position at the end of the node at the given\n    level.\n    */ end(depth) {\n        depth = this.resolveDepth(depth);\n        return this.start(depth) + this.node(depth).content.size;\n    }\n    /**\n    The (absolute) position directly before the wrapping node at the\n    given level, or, when `depth` is `this.depth + 1`, the original\n    position.\n    */ before(depth) {\n        depth = this.resolveDepth(depth);\n        if (!depth) throw new RangeError(\"There is no position before the top-level node\");\n        return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1];\n    }\n    /**\n    The (absolute) position directly after the wrapping node at the\n    given level, or the original position when `depth` is `this.depth + 1`.\n    */ after(depth) {\n        depth = this.resolveDepth(depth);\n        if (!depth) throw new RangeError(\"There is no position after the top-level node\");\n        return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize;\n    }\n    /**\n    When this position points into a text node, this returns the\n    distance between the position and the start of the text node.\n    Will be zero for positions that point between nodes.\n    */ get textOffset() {\n        return this.pos - this.path[this.path.length - 1];\n    }\n    /**\n    Get the node directly after the position, if any. If the position\n    points into a text node, only the part of that node after the\n    position is returned.\n    */ get nodeAfter() {\n        let parent = this.parent, index = this.index(this.depth);\n        if (index == parent.childCount) return null;\n        let dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index);\n        return dOff ? parent.child(index).cut(dOff) : child;\n    }\n    /**\n    Get the node directly before the position, if any. If the\n    position points into a text node, only the part of that node\n    before the position is returned.\n    */ get nodeBefore() {\n        let index = this.index(this.depth);\n        let dOff = this.pos - this.path[this.path.length - 1];\n        if (dOff) return this.parent.child(index).cut(0, dOff);\n        return index == 0 ? null : this.parent.child(index - 1);\n    }\n    /**\n    Get the position at the given index in the parent node at the\n    given depth (which defaults to `this.depth`).\n    */ posAtIndex(index, depth) {\n        depth = this.resolveDepth(depth);\n        let node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n        for(let i = 0; i < index; i++)pos += node.child(i).nodeSize;\n        return pos;\n    }\n    /**\n    Get the marks at this position, factoring in the surrounding\n    marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the\n    position is at the start of a non-empty node, the marks of the\n    node after it (if any) are returned.\n    */ marks() {\n        let parent = this.parent, index = this.index();\n        // In an empty parent, return the empty array\n        if (parent.content.size == 0) return $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none;\n        // When inside a text node, just return the text node's marks\n        if (this.textOffset) return parent.child(index).marks;\n        let main = parent.maybeChild(index - 1), other = parent.maybeChild(index);\n        // If the `after` flag is true of there is no node before, make\n        // the node after this position the main reference.\n        if (!main) {\n            let tmp = main;\n            main = other;\n            other = tmp;\n        }\n        // Use all marks in the main node, except those that have\n        // `inclusive` set to false and are not present in the other node.\n        let marks = main.marks;\n        for(var i = 0; i < marks.length; i++)if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks))) marks = marks[i--].removeFromSet(marks);\n        return marks;\n    }\n    /**\n    Get the marks after the current position, if any, except those\n    that are non-inclusive and not present at position `$end`. This\n    is mostly useful for getting the set of marks to preserve after a\n    deletion. Will return `null` if this position is at the end of\n    its parent node or its parent node isn't a textblock (in which\n    case no marks should be preserved).\n    */ marksAcross($end) {\n        let after = this.parent.maybeChild(this.index());\n        if (!after || !after.isInline) return null;\n        let marks = after.marks, next = $end.parent.maybeChild($end.index());\n        for(var i = 0; i < marks.length; i++)if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks))) marks = marks[i--].removeFromSet(marks);\n        return marks;\n    }\n    /**\n    The depth up to which this position and the given (non-resolved)\n    position share the same parent nodes.\n    */ sharedDepth(pos) {\n        for(let depth = this.depth; depth > 0; depth--)if (this.start(depth) <= pos && this.end(depth) >= pos) return depth;\n        return 0;\n    }\n    /**\n    Returns a range based on the place where this position and the\n    given position diverge around block content. If both point into\n    the same textblock, for example, a range around that textblock\n    will be returned. If they point into different blocks, the range\n    around those blocks in their shared ancestor is returned. You can\n    pass in an optional predicate that will be called with a parent\n    node to see if a range into that parent is acceptable.\n    */ blockRange(other = this, pred) {\n        if (other.pos < this.pos) return other.blockRange(this);\n        for(let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)if (other.pos <= this.end(d) && (!pred || pred(this.node(d)))) return new $0f7cdfd9537f6363$export$7bc461ceb770fb16(this, other, d);\n        return null;\n    }\n    /**\n    Query whether the given position shares the same parent node.\n    */ sameParent(other) {\n        return this.pos - this.parentOffset == other.pos - other.parentOffset;\n    }\n    /**\n    Return the greater of this and the given position.\n    */ max(other) {\n        return other.pos > this.pos ? other : this;\n    }\n    /**\n    Return the smaller of this and the given position.\n    */ min(other) {\n        return other.pos < this.pos ? other : this;\n    }\n    /**\n    @internal\n    */ toString() {\n        let str = \"\";\n        for(let i = 1; i <= this.depth; i++)str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1);\n        return str + \":\" + this.parentOffset;\n    }\n    /**\n    @internal\n    */ static resolve(doc, pos) {\n        if (!(pos >= 0 && pos <= doc.content.size)) throw new RangeError(\"Position \" + pos + \" out of range\");\n        let path = [];\n        let start = 0, parentOffset = pos;\n        for(let node = doc;;){\n            let { index: index, offset: offset } = node.content.findIndex(parentOffset);\n            let rem = parentOffset - offset;\n            path.push(node, index, start + offset);\n            if (!rem) break;\n            node = node.child(index);\n            if (node.isText) break;\n            parentOffset = rem - 1;\n            start += offset + 1;\n        }\n        return new $0f7cdfd9537f6363$export$b2a42f82e59e4b19(pos, path, parentOffset);\n    }\n    /**\n    @internal\n    */ static resolveCached(doc, pos) {\n        let cache = $0f7cdfd9537f6363$var$resolveCache.get(doc);\n        if (cache) for(let i = 0; i < cache.elts.length; i++){\n            let elt = cache.elts[i];\n            if (elt.pos == pos) return elt;\n        }\n        else $0f7cdfd9537f6363$var$resolveCache.set(doc, cache = new $0f7cdfd9537f6363$var$ResolveCache);\n        let result = cache.elts[cache.i] = $0f7cdfd9537f6363$export$b2a42f82e59e4b19.resolve(doc, pos);\n        cache.i = (cache.i + 1) % $0f7cdfd9537f6363$var$resolveCacheSize;\n        return result;\n    }\n}\nclass $0f7cdfd9537f6363$var$ResolveCache {\n    constructor(){\n        this.elts = [];\n        this.i = 0;\n    }\n}\nconst $0f7cdfd9537f6363$var$resolveCacheSize = 12, $0f7cdfd9537f6363$var$resolveCache = new WeakMap();\n/**\nRepresents a flat range of content, i.e. one that starts and\nends in the same node.\n*/ class $0f7cdfd9537f6363$export$7bc461ceb770fb16 {\n    /**\n    Construct a node range. `$from` and `$to` should point into the\n    same node until at least the given `depth`, since a node range\n    denotes an adjacent set of nodes in a single parent node.\n    */ constructor(/**\n    A resolved position along the start of the content. May have a\n    `depth` greater than this object's `depth` property, since\n    these are the positions that were used to compute the range,\n    not re-resolved positions directly at its boundaries.\n    */ $from, /**\n    A position along the end of the content. See\n    caveat for [`$from`](https://prosemirror.net/docs/ref/#model.NodeRange.$from).\n    */ $to, /**\n    The depth of the node that this range points into.\n    */ depth){\n        this.$from = $from;\n        this.$to = $to;\n        this.depth = depth;\n    }\n    /**\n    The position at the start of the range.\n    */ get start() {\n        return this.$from.before(this.depth + 1);\n    }\n    /**\n    The position at the end of the range.\n    */ get end() {\n        return this.$to.after(this.depth + 1);\n    }\n    /**\n    The parent node that the range points into.\n    */ get parent() {\n        return this.$from.node(this.depth);\n    }\n    /**\n    The start index of the range in the parent node.\n    */ get startIndex() {\n        return this.$from.index(this.depth);\n    }\n    /**\n    The end index of the range in the parent node.\n    */ get endIndex() {\n        return this.$to.indexAfter(this.depth);\n    }\n}\nconst $0f7cdfd9537f6363$var$emptyAttrs = Object.create(null);\n/**\nThis class represents a node in the tree that makes up a\nProseMirror document. So a document is an instance of `Node`, with\nchildren that are also instances of `Node`.\n\nNodes are persistent data structures. Instead of changing them, you\ncreate new ones with the content you want. Old ones keep pointing\nat the old document shape. This is made cheaper by sharing\nstructure between the old and new data as much as possible, which a\ntree shape like this (without back pointers) makes easy.\n\n**Do not** directly mutate the properties of a `Node` object. See\n[the guide](https://prosemirror.net/docs/guide/#doc) for more information.\n*/ class $0f7cdfd9537f6363$export$85c928794f8d04d4 {\n    /**\n    @internal\n    */ constructor(/**\n    The type of node that this is.\n    */ type, /**\n    An object mapping attribute names to values. The kind of\n    attributes allowed and required are\n    [determined](https://prosemirror.net/docs/ref/#model.NodeSpec.attrs) by the node type.\n    */ attrs, // A fragment holding the node's children.\n    content, /**\n    The marks (things like whether it is emphasized or part of a\n    link) applied to this node.\n    */ marks = $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none){\n        this.type = type;\n        this.attrs = attrs;\n        this.marks = marks;\n        this.content = content || $0f7cdfd9537f6363$export$ffb0004e005737fa.empty;\n    }\n    /**\n    The array of this node's child nodes.\n    */ get children() {\n        return this.content.content;\n    }\n    /**\n    The size of this node, as defined by the integer-based [indexing\n    scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the\n    amount of characters. For other leaf nodes, it is one. For\n    non-leaf nodes, it is the size of the content plus two (the\n    start and end token).\n    */ get nodeSize() {\n        return this.isLeaf ? 1 : 2 + this.content.size;\n    }\n    /**\n    The number of children that the node has.\n    */ get childCount() {\n        return this.content.childCount;\n    }\n    /**\n    Get the child node at the given index. Raises an error when the\n    index is out of range.\n    */ child(index) {\n        return this.content.child(index);\n    }\n    /**\n    Get the child node at the given index, if it exists.\n    */ maybeChild(index) {\n        return this.content.maybeChild(index);\n    }\n    /**\n    Call `f` for every child node, passing the node, its offset\n    into this parent node, and its index.\n    */ forEach(f) {\n        this.content.forEach(f);\n    }\n    /**\n    Invoke a callback for all descendant nodes recursively overlapping\n    the given two positions that are relative to start of this\n    node's content. This includes all ancestors of the nodes\n    containing the two positions. The callback is invoked with the\n    node, its position relative to the original node (method receiver),\n    its parent node, and its child index. When the callback returns\n    false for a given node, that node's children will not be\n    recursed over. The last parameter can be used to specify a\n    starting position to count from.\n    */ nodesBetween(from, to, f, startPos = 0) {\n        this.content.nodesBetween(from, to, f, startPos, this);\n    }\n    /**\n    Call the given callback for every descendant node. Doesn't\n    descend into a node when the callback returns `false`.\n    */ descendants(f) {\n        this.nodesBetween(0, this.content.size, f);\n    }\n    /**\n    Concatenates all the text nodes found in this fragment and its\n    children.\n    */ get textContent() {\n        return this.isLeaf && this.type.spec.leafText ? this.type.spec.leafText(this) : this.textBetween(0, this.content.size, \"\");\n    }\n    /**\n    Get all text between positions `from` and `to`. When\n    `blockSeparator` is given, it will be inserted to separate text\n    from different block nodes. If `leafText` is given, it'll be\n    inserted for every non-text leaf node encountered, otherwise\n    [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec.leafText) will be used.\n    */ textBetween(from, to, blockSeparator, leafText) {\n        return this.content.textBetween(from, to, blockSeparator, leafText);\n    }\n    /**\n    Returns this node's first child, or `null` if there are no\n    children.\n    */ get firstChild() {\n        return this.content.firstChild;\n    }\n    /**\n    Returns this node's last child, or `null` if there are no\n    children.\n    */ get lastChild() {\n        return this.content.lastChild;\n    }\n    /**\n    Test whether two nodes represent the same piece of document.\n    */ eq(other) {\n        return this == other || this.sameMarkup(other) && this.content.eq(other.content);\n    }\n    /**\n    Compare the markup (type, attributes, and marks) of this node to\n    those of another. Returns `true` if both have the same markup.\n    */ sameMarkup(other) {\n        return this.hasMarkup(other.type, other.attrs, other.marks);\n    }\n    /**\n    Check whether this node's markup correspond to the given type,\n    attributes, and marks.\n    */ hasMarkup(type, attrs, marks) {\n        return this.type == type && $0f7cdfd9537f6363$var$compareDeep(this.attrs, attrs || type.defaultAttrs || $0f7cdfd9537f6363$var$emptyAttrs) && $0f7cdfd9537f6363$export$c9d15bcfc6d42044.sameSet(this.marks, marks || $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none);\n    }\n    /**\n    Create a new node with the same markup as this node, containing\n    the given content (or empty, if no content is given).\n    */ copy(content = null) {\n        if (content == this.content) return this;\n        return new $0f7cdfd9537f6363$export$85c928794f8d04d4(this.type, this.attrs, content, this.marks);\n    }\n    /**\n    Create a copy of this node, with the given set of marks instead\n    of the node's own marks.\n    */ mark(marks) {\n        return marks == this.marks ? this : new $0f7cdfd9537f6363$export$85c928794f8d04d4(this.type, this.attrs, this.content, marks);\n    }\n    /**\n    Create a copy of this node with only the content between the\n    given positions. If `to` is not given, it defaults to the end of\n    the node.\n    */ cut(from, to = this.content.size) {\n        if (from == 0 && to == this.content.size) return this;\n        return this.copy(this.content.cut(from, to));\n    }\n    /**\n    Cut out the part of the document between the given positions, and\n    return it as a `Slice` object.\n    */ slice(from, to = this.content.size, includeParents = false) {\n        if (from == to) return $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e.empty;\n        let $from = this.resolve(from), $to = this.resolve(to);\n        let depth = includeParents ? 0 : $from.sharedDepth(to);\n        let start = $from.start(depth), node = $from.node(depth);\n        let content = node.content.cut($from.pos - start, $to.pos - start);\n        return new $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e(content, $from.depth - depth, $to.depth - depth);\n    }\n    /**\n    Replace the part of the document between the given positions with\n    the given slice. The slice must 'fit', meaning its open sides\n    must be able to connect to the surrounding content, and its\n    content nodes must be valid children for the node they are placed\n    into. If any of this is violated, an error of type\n    [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.\n    */ replace(from, to, slice) {\n        return $0f7cdfd9537f6363$var$replace(this.resolve(from), this.resolve(to), slice);\n    }\n    /**\n    Find the node directly after the given position.\n    */ nodeAt(pos) {\n        for(let node = this;;){\n            let { index: index, offset: offset } = node.content.findIndex(pos);\n            node = node.maybeChild(index);\n            if (!node) return null;\n            if (offset == pos || node.isText) return node;\n            pos -= offset + 1;\n        }\n    }\n    /**\n    Find the (direct) child node after the given offset, if any,\n    and return it along with its index and offset relative to this\n    node.\n    */ childAfter(pos) {\n        let { index: index, offset: offset } = this.content.findIndex(pos);\n        return {\n            node: this.content.maybeChild(index),\n            index: index,\n            offset: offset\n        };\n    }\n    /**\n    Find the (direct) child node before the given offset, if any,\n    and return it along with its index and offset relative to this\n    node.\n    */ childBefore(pos) {\n        if (pos == 0) return {\n            node: null,\n            index: 0,\n            offset: 0\n        };\n        let { index: index, offset: offset } = this.content.findIndex(pos);\n        if (offset < pos) return {\n            node: this.content.child(index),\n            index: index,\n            offset: offset\n        };\n        let node = this.content.child(index - 1);\n        return {\n            node: node,\n            index: index - 1,\n            offset: offset - node.nodeSize\n        };\n    }\n    /**\n    Resolve the given position in the document, returning an\n    [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.\n    */ resolve(pos) {\n        return $0f7cdfd9537f6363$export$b2a42f82e59e4b19.resolveCached(this, pos);\n    }\n    /**\n    @internal\n    */ resolveNoCache(pos) {\n        return $0f7cdfd9537f6363$export$b2a42f82e59e4b19.resolve(this, pos);\n    }\n    /**\n    Test whether a given mark or mark type occurs in this document\n    between the two given positions.\n    */ rangeHasMark(from, to, type) {\n        let found = false;\n        if (to > from) this.nodesBetween(from, to, (node)=>{\n            if (type.isInSet(node.marks)) found = true;\n            return !found;\n        });\n        return found;\n    }\n    /**\n    True when this is a block (non-inline node)\n    */ get isBlock() {\n        return this.type.isBlock;\n    }\n    /**\n    True when this is a textblock node, a block node with inline\n    content.\n    */ get isTextblock() {\n        return this.type.isTextblock;\n    }\n    /**\n    True when this node allows inline content.\n    */ get inlineContent() {\n        return this.type.inlineContent;\n    }\n    /**\n    True when this is an inline node (a text node or a node that can\n    appear among text).\n    */ get isInline() {\n        return this.type.isInline;\n    }\n    /**\n    True when this is a text node.\n    */ get isText() {\n        return this.type.isText;\n    }\n    /**\n    True when this is a leaf node.\n    */ get isLeaf() {\n        return this.type.isLeaf;\n    }\n    /**\n    True when this is an atom, i.e. when it does not have directly\n    editable content. This is usually the same as `isLeaf`, but can\n    be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom)\n    on a node's spec (typically used when the node is displayed as\n    an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)).\n    */ get isAtom() {\n        return this.type.isAtom;\n    }\n    /**\n    Return a string representation of this node for debugging\n    purposes.\n    */ toString() {\n        if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this);\n        let name = this.type.name;\n        if (this.content.size) name += \"(\" + this.content.toStringInner() + \")\";\n        return $0f7cdfd9537f6363$var$wrapMarks(this.marks, name);\n    }\n    /**\n    Get the content match in this node at the given index.\n    */ contentMatchAt(index) {\n        let match = this.type.contentMatch.matchFragment(this.content, 0, index);\n        if (!match) throw new Error(\"Called contentMatchAt on a node with invalid content\");\n        return match;\n    }\n    /**\n    Test whether replacing the range between `from` and `to` (by\n    child index) with the given replacement fragment (which defaults\n    to the empty fragment) would leave the node's content valid. You\n    can optionally pass `start` and `end` indices into the\n    replacement fragment.\n    */ canReplace(from, to, replacement = $0f7cdfd9537f6363$export$ffb0004e005737fa.empty, start = 0, end = replacement.childCount) {\n        let one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n        let two = one && one.matchFragment(this.content, to);\n        if (!two || !two.validEnd) return false;\n        for(let i = start; i < end; i++)if (!this.type.allowsMarks(replacement.child(i).marks)) return false;\n        return true;\n    }\n    /**\n    Test whether replacing the range `from` to `to` (by index) with\n    a node of the given type would leave the node's content valid.\n    */ canReplaceWith(from, to, type, marks) {\n        if (marks && !this.type.allowsMarks(marks)) return false;\n        let start = this.contentMatchAt(from).matchType(type);\n        let end = start && start.matchFragment(this.content, to);\n        return end ? end.validEnd : false;\n    }\n    /**\n    Test whether the given node's content could be appended to this\n    node. If that node is empty, this will only return true if there\n    is at least one node type that can appear in both nodes (to avoid\n    merging completely incompatible nodes).\n    */ canAppend(other) {\n        if (other.content.size) return this.canReplace(this.childCount, this.childCount, other.content);\n        else return this.type.compatibleContent(other.type);\n    }\n    /**\n    Check whether this node and its descendants conform to the\n    schema, and raise an exception when they do not.\n    */ check() {\n        this.type.checkContent(this.content);\n        $0f7cdfd9537f6363$var$checkAttrs(this.type.attrs, this.attrs, \"node\", this.type.name);\n        let copy = $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none;\n        for(let i = 0; i < this.marks.length; i++){\n            let mark = this.marks[i];\n            $0f7cdfd9537f6363$var$checkAttrs(mark.type.attrs, mark.attrs, \"mark\", mark.type.name);\n            copy = mark.addToSet(copy);\n        }\n        if (!$0f7cdfd9537f6363$export$c9d15bcfc6d42044.sameSet(copy, this.marks)) throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((m)=>m.type.name)}`);\n        this.content.forEach((node)=>node.check());\n    }\n    /**\n    Return a JSON-serializeable representation of this node.\n    */ toJSON() {\n        let obj = {\n            type: this.type.name\n        };\n        for(let _ in this.attrs){\n            obj.attrs = this.attrs;\n            break;\n        }\n        if (this.content.size) obj.content = this.content.toJSON();\n        if (this.marks.length) obj.marks = this.marks.map((n)=>n.toJSON());\n        return obj;\n    }\n    /**\n    Deserialize a node from its JSON representation.\n    */ static fromJSON(schema, json) {\n        if (!json) throw new RangeError(\"Invalid input for Node.fromJSON\");\n        let marks = undefined;\n        if (json.marks) {\n            if (!Array.isArray(json.marks)) throw new RangeError(\"Invalid mark data for Node.fromJSON\");\n            marks = json.marks.map(schema.markFromJSON);\n        }\n        if (json.type == \"text\") {\n            if (typeof json.text != \"string\") throw new RangeError(\"Invalid text node in JSON\");\n            return schema.text(json.text, marks);\n        }\n        let content = $0f7cdfd9537f6363$export$ffb0004e005737fa.fromJSON(schema, json.content);\n        let node = schema.nodeType(json.type).create(json.attrs, content, marks);\n        return node;\n    }\n}\n$0f7cdfd9537f6363$export$85c928794f8d04d4.prototype.text = undefined;\nclass $0f7cdfd9537f6363$var$TextNode extends $0f7cdfd9537f6363$export$85c928794f8d04d4 {\n    /**\n    @internal\n    */ constructor(type, attrs, content, marks){\n        super(type, attrs, null, marks);\n        if (!content) throw new RangeError(\"Empty text nodes are not allowed\");\n        this.text = content;\n    }\n    toString() {\n        if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this);\n        return $0f7cdfd9537f6363$var$wrapMarks(this.marks, JSON.stringify(this.text));\n    }\n    get textContent() {\n        return this.text;\n    }\n    textBetween(from, to) {\n        return this.text.slice(from, to);\n    }\n    get nodeSize() {\n        return this.text.length;\n    }\n    mark(marks) {\n        return marks == this.marks ? this : new $0f7cdfd9537f6363$var$TextNode(this.type, this.attrs, this.text, marks);\n    }\n    withText(text) {\n        if (text == this.text) return this;\n        return new $0f7cdfd9537f6363$var$TextNode(this.type, this.attrs, text, this.marks);\n    }\n    cut(from = 0, to = this.text.length) {\n        if (from == 0 && to == this.text.length) return this;\n        return this.withText(this.text.slice(from, to));\n    }\n    eq(other) {\n        return this.sameMarkup(other) && this.text == other.text;\n    }\n    toJSON() {\n        let base = super.toJSON();\n        base.text = this.text;\n        return base;\n    }\n}\nfunction $0f7cdfd9537f6363$var$wrapMarks(marks, str) {\n    for(let i = marks.length - 1; i >= 0; i--)str = marks[i].type.name + \"(\" + str + \")\";\n    return str;\n}\nfunction $0f7cdfd9537f6363$var$checkAttrs(attrs, values, type, name) {\n    for(let attr in values)if (!(attr in attrs)) throw new RangeError(`Unsupported attribute ${attr} for ${type} of type ${name}`);\n    for(let attr in attrs)if (attrs[attr].validate) attrs[attr].validate(values[attr]);\n}\n/**\nInstances of this class represent a match state of a node type's\n[content expression](https://prosemirror.net/docs/ref/#model.NodeSpec.content), and can be used to\nfind out whether further content matches here, and whether a given\nposition is a valid end of the node.\n*/ class $0f7cdfd9537f6363$export$364ed450558d7ec4 {\n    /**\n    @internal\n    */ constructor(/**\n    True when this match state represents a valid end of the node.\n    */ validEnd){\n        this.validEnd = validEnd;\n        /**\n        @internal\n        */ this.next = [];\n        /**\n        @internal\n        */ this.wrapCache = [];\n    }\n    /**\n    @internal\n    */ static parse(string, nodeTypes) {\n        let stream = new $0f7cdfd9537f6363$var$TokenStream(string, nodeTypes);\n        if (stream.next == null) return $0f7cdfd9537f6363$export$364ed450558d7ec4.empty;\n        let expr = $0f7cdfd9537f6363$var$parseExpr(stream);\n        if (stream.next) stream.err(\"Unexpected trailing text\");\n        let match = $0f7cdfd9537f6363$var$dfa($0f7cdfd9537f6363$var$nfa(expr));\n        $0f7cdfd9537f6363$var$checkForDeadEnds(match, stream);\n        return match;\n    }\n    /**\n    Match a node type, returning a match after that node if\n    successful.\n    */ matchType(type) {\n        for(let i = 0; i < this.next.length; i++)if (this.next[i].type == type) return this.next[i].next;\n        return null;\n    }\n    /**\n    Try to match a fragment. Returns the resulting match when\n    successful.\n    */ matchFragment(frag, start = 0, end = frag.childCount) {\n        let cur = this;\n        for(let i = start; cur && i < end; i++)cur = cur.matchType(frag.child(i).type);\n        return cur;\n    }\n    /**\n    @internal\n    */ get inlineContent() {\n        return this.next.length != 0 && this.next[0].type.isInline;\n    }\n    /**\n    Get the first matching node type at this match position that can\n    be generated.\n    */ get defaultType() {\n        for(let i = 0; i < this.next.length; i++){\n            let { type: type } = this.next[i];\n            if (!(type.isText || type.hasRequiredAttrs())) return type;\n        }\n        return null;\n    }\n    /**\n    @internal\n    */ compatible(other) {\n        for(let i = 0; i < this.next.length; i++)for(let j = 0; j < other.next.length; j++)if (this.next[i].type == other.next[j].type) return true;\n        return false;\n    }\n    /**\n    Try to match the given fragment, and if that fails, see if it can\n    be made to match by inserting nodes in front of it. When\n    successful, return a fragment of inserted nodes (which may be\n    empty if nothing had to be inserted). When `toEnd` is true, only\n    return a fragment if the resulting match goes to the end of the\n    content expression.\n    */ fillBefore(after, toEnd = false, startIndex = 0) {\n        let seen = [\n            this\n        ];\n        function search(match, types) {\n            let finished = match.matchFragment(after, startIndex);\n            if (finished && (!toEnd || finished.validEnd)) return $0f7cdfd9537f6363$export$ffb0004e005737fa.from(types.map((tp)=>tp.createAndFill()));\n            for(let i = 0; i < match.next.length; i++){\n                let { type: type, next: next } = match.next[i];\n                if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n                    seen.push(next);\n                    let found = search(next, types.concat(type));\n                    if (found) return found;\n                }\n            }\n            return null;\n        }\n        return search(this, []);\n    }\n    /**\n    Find a set of wrapping node types that would allow a node of the\n    given type to appear at this position. The result may be empty\n    (when it fits directly) and will be null when no such wrapping\n    exists.\n    */ findWrapping(target) {\n        for(let i = 0; i < this.wrapCache.length; i += 2)if (this.wrapCache[i] == target) return this.wrapCache[i + 1];\n        let computed = this.computeWrapping(target);\n        this.wrapCache.push(target, computed);\n        return computed;\n    }\n    /**\n    @internal\n    */ computeWrapping(target) {\n        let seen = Object.create(null), active = [\n            {\n                match: this,\n                type: null,\n                via: null\n            }\n        ];\n        while(active.length){\n            let current = active.shift(), match = current.match;\n            if (match.matchType(target)) {\n                let result = [];\n                for(let obj = current; obj.type; obj = obj.via)result.push(obj.type);\n                return result.reverse();\n            }\n            for(let i = 0; i < match.next.length; i++){\n                let { type: type, next: next } = match.next[i];\n                if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) {\n                    active.push({\n                        match: type.contentMatch,\n                        type: type,\n                        via: current\n                    });\n                    seen[type.name] = true;\n                }\n            }\n        }\n        return null;\n    }\n    /**\n    The number of outgoing edges this node has in the finite\n    automaton that describes the content expression.\n    */ get edgeCount() {\n        return this.next.length;\n    }\n    /**\n    Get the _n_​th outgoing edge from this node in the finite\n    automaton that describes the content expression.\n    */ edge(n) {\n        if (n >= this.next.length) throw new RangeError(`There's no ${n}th edge in this content match`);\n        return this.next[n];\n    }\n    /**\n    @internal\n    */ toString() {\n        let seen = [];\n        function scan(m) {\n            seen.push(m);\n            for(let i = 0; i < m.next.length; i++)if (seen.indexOf(m.next[i].next) == -1) scan(m.next[i].next);\n        }\n        scan(this);\n        return seen.map((m, i)=>{\n            let out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n            for(let i = 0; i < m.next.length; i++)out += (i ? \", \" : \"\") + m.next[i].type.name + \"->\" + seen.indexOf(m.next[i].next);\n            return out;\n        }).join(\"\\n\");\n    }\n}\n/**\n@internal\n*/ $0f7cdfd9537f6363$export$364ed450558d7ec4.empty = new $0f7cdfd9537f6363$export$364ed450558d7ec4(true);\nclass $0f7cdfd9537f6363$var$TokenStream {\n    constructor(string, nodeTypes){\n        this.string = string;\n        this.nodeTypes = nodeTypes;\n        this.inline = null;\n        this.pos = 0;\n        this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n        if (this.tokens[this.tokens.length - 1] == \"\") this.tokens.pop();\n        if (this.tokens[0] == \"\") this.tokens.shift();\n    }\n    get next() {\n        return this.tokens[this.pos];\n    }\n    eat(tok) {\n        return this.next == tok && (this.pos++ || true);\n    }\n    err(str) {\n        throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\");\n    }\n}\nfunction $0f7cdfd9537f6363$var$parseExpr(stream) {\n    let exprs = [];\n    do exprs.push($0f7cdfd9537f6363$var$parseExprSeq(stream));\n    while (stream.eat(\"|\"));\n    return exprs.length == 1 ? exprs[0] : {\n        type: \"choice\",\n        exprs: exprs\n    };\n}\nfunction $0f7cdfd9537f6363$var$parseExprSeq(stream) {\n    let exprs = [];\n    do exprs.push($0f7cdfd9537f6363$var$parseExprSubscript(stream));\n    while (stream.next && stream.next != \")\" && stream.next != \"|\");\n    return exprs.length == 1 ? exprs[0] : {\n        type: \"seq\",\n        exprs: exprs\n    };\n}\nfunction $0f7cdfd9537f6363$var$parseExprSubscript(stream) {\n    let expr = $0f7cdfd9537f6363$var$parseExprAtom(stream);\n    for(;;){\n        if (stream.eat(\"+\")) expr = {\n            type: \"plus\",\n            expr: expr\n        };\n        else if (stream.eat(\"*\")) expr = {\n            type: \"star\",\n            expr: expr\n        };\n        else if (stream.eat(\"?\")) expr = {\n            type: \"opt\",\n            expr: expr\n        };\n        else if (stream.eat(\"{\")) expr = $0f7cdfd9537f6363$var$parseExprRange(stream, expr);\n        else break;\n    }\n    return expr;\n}\nfunction $0f7cdfd9537f6363$var$parseNum(stream) {\n    if (/\\D/.test(stream.next)) stream.err(\"Expected number, got '\" + stream.next + \"'\");\n    let result = Number(stream.next);\n    stream.pos++;\n    return result;\n}\nfunction $0f7cdfd9537f6363$var$parseExprRange(stream, expr) {\n    let min = $0f7cdfd9537f6363$var$parseNum(stream), max = min;\n    if (stream.eat(\",\")) {\n        if (stream.next != \"}\") max = $0f7cdfd9537f6363$var$parseNum(stream);\n        else max = -1;\n    }\n    if (!stream.eat(\"}\")) stream.err(\"Unclosed braced range\");\n    return {\n        type: \"range\",\n        min: min,\n        max: max,\n        expr: expr\n    };\n}\nfunction $0f7cdfd9537f6363$var$resolveName(stream, name) {\n    let types = stream.nodeTypes, type = types[name];\n    if (type) return [\n        type\n    ];\n    let result = [];\n    for(let typeName in types){\n        let type = types[typeName];\n        if (type.isInGroup(name)) result.push(type);\n    }\n    if (result.length == 0) stream.err(\"No node type or group '\" + name + \"' found\");\n    return result;\n}\nfunction $0f7cdfd9537f6363$var$parseExprAtom(stream) {\n    if (stream.eat(\"(\")) {\n        let expr = $0f7cdfd9537f6363$var$parseExpr(stream);\n        if (!stream.eat(\")\")) stream.err(\"Missing closing paren\");\n        return expr;\n    } else if (!/\\W/.test(stream.next)) {\n        let exprs = $0f7cdfd9537f6363$var$resolveName(stream, stream.next).map((type)=>{\n            if (stream.inline == null) stream.inline = type.isInline;\n            else if (stream.inline != type.isInline) stream.err(\"Mixing inline and block content\");\n            return {\n                type: \"name\",\n                value: type\n            };\n        });\n        stream.pos++;\n        return exprs.length == 1 ? exprs[0] : {\n            type: \"choice\",\n            exprs: exprs\n        };\n    } else stream.err(\"Unexpected token '\" + stream.next + \"'\");\n}\n// Construct an NFA from an expression as returned by the parser. The\n// NFA is represented as an array of states, which are themselves\n// arrays of edges, which are `{term, to}` objects. The first state is\n// the entry state and the last node is the success state.\n//\n// Note that unlike typical NFAs, the edge ordering in this one is\n// significant, in that it is used to contruct filler content when\n// necessary.\nfunction $0f7cdfd9537f6363$var$nfa(expr) {\n    let nfa = [\n        []\n    ];\n    connect(compile(expr, 0), node());\n    return nfa;\n    function node() {\n        return nfa.push([]) - 1;\n    }\n    function edge(from, to, term) {\n        let edge = {\n            term: term,\n            to: to\n        };\n        nfa[from].push(edge);\n        return edge;\n    }\n    function connect(edges, to) {\n        edges.forEach((edge)=>edge.to = to);\n    }\n    function compile(expr, from) {\n        if (expr.type == \"choice\") return expr.exprs.reduce((out, expr)=>out.concat(compile(expr, from)), []);\n        else if (expr.type == \"seq\") for(let i = 0;; i++){\n            let next = compile(expr.exprs[i], from);\n            if (i == expr.exprs.length - 1) return next;\n            connect(next, from = node());\n        }\n        else if (expr.type == \"star\") {\n            let loop = node();\n            edge(from, loop);\n            connect(compile(expr.expr, loop), loop);\n            return [\n                edge(loop)\n            ];\n        } else if (expr.type == \"plus\") {\n            let loop = node();\n            connect(compile(expr.expr, from), loop);\n            connect(compile(expr.expr, loop), loop);\n            return [\n                edge(loop)\n            ];\n        } else if (expr.type == \"opt\") return [\n            edge(from)\n        ].concat(compile(expr.expr, from));\n        else if (expr.type == \"range\") {\n            let cur = from;\n            for(let i = 0; i < expr.min; i++){\n                let next = node();\n                connect(compile(expr.expr, cur), next);\n                cur = next;\n            }\n            if (expr.max == -1) connect(compile(expr.expr, cur), cur);\n            else for(let i = expr.min; i < expr.max; i++){\n                let next = node();\n                edge(cur, next);\n                connect(compile(expr.expr, cur), next);\n                cur = next;\n            }\n            return [\n                edge(cur)\n            ];\n        } else if (expr.type == \"name\") return [\n            edge(from, undefined, expr.value)\n        ];\n        else throw new Error(\"Unknown expr type\");\n    }\n}\nfunction $0f7cdfd9537f6363$var$cmp(a, b) {\n    return b - a;\n}\n// Get the set of nodes reachable by null edges from `node`. Omit\n// nodes with only a single null-out-edge, since they may lead to\n// needless duplicated nodes.\nfunction $0f7cdfd9537f6363$var$nullFrom(nfa, node) {\n    let result = [];\n    scan(node);\n    return result.sort($0f7cdfd9537f6363$var$cmp);\n    function scan(node) {\n        let edges = nfa[node];\n        if (edges.length == 1 && !edges[0].term) return scan(edges[0].to);\n        result.push(node);\n        for(let i = 0; i < edges.length; i++){\n            let { term: term, to: to } = edges[i];\n            if (!term && result.indexOf(to) == -1) scan(to);\n        }\n    }\n}\n// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set\n// of state objects (`ContentMatch` instances) with transitions\n// between them.\nfunction $0f7cdfd9537f6363$var$dfa(nfa) {\n    let labeled = Object.create(null);\n    return explore($0f7cdfd9537f6363$var$nullFrom(nfa, 0));\n    function explore(states) {\n        let out = [];\n        states.forEach((node)=>{\n            nfa[node].forEach(({ term: term, to: to })=>{\n                if (!term) return;\n                let set;\n                for(let i = 0; i < out.length; i++)if (out[i][0] == term) set = out[i][1];\n                $0f7cdfd9537f6363$var$nullFrom(nfa, to).forEach((node)=>{\n                    if (!set) out.push([\n                        term,\n                        set = []\n                    ]);\n                    if (set.indexOf(node) == -1) set.push(node);\n                });\n            });\n        });\n        let state = labeled[states.join(\",\")] = new $0f7cdfd9537f6363$export$364ed450558d7ec4(states.indexOf(nfa.length - 1) > -1);\n        for(let i = 0; i < out.length; i++){\n            let states = out[i][1].sort($0f7cdfd9537f6363$var$cmp);\n            state.next.push({\n                type: out[i][0],\n                next: labeled[states.join(\",\")] || explore(states)\n            });\n        }\n        return state;\n    }\n}\nfunction $0f7cdfd9537f6363$var$checkForDeadEnds(match, stream) {\n    for(let i = 0, work = [\n        match\n    ]; i < work.length; i++){\n        let state = work[i], dead = !state.validEnd, nodes = [];\n        for(let j = 0; j < state.next.length; j++){\n            let { type: type, next: next } = state.next[j];\n            nodes.push(type.name);\n            if (dead && !(type.isText || type.hasRequiredAttrs())) dead = false;\n            if (work.indexOf(next) == -1) work.push(next);\n        }\n        if (dead) stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position (see https://prosemirror.net/docs/guide/#generatable)\");\n    }\n}\n// For node types where all attrs have a default value (or which don't\n// have any attributes), build up a single reusable default attribute\n// object, and use it for all nodes that don't specify specific\n// attributes.\nfunction $0f7cdfd9537f6363$var$defaultAttrs(attrs) {\n    let defaults = Object.create(null);\n    for(let attrName in attrs){\n        let attr = attrs[attrName];\n        if (!attr.hasDefault) return null;\n        defaults[attrName] = attr.default;\n    }\n    return defaults;\n}\nfunction $0f7cdfd9537f6363$var$computeAttrs(attrs, value) {\n    let built = Object.create(null);\n    for(let name in attrs){\n        let attr = attrs[name];\n        let given = value && value[name];\n        if (given === undefined) {\n            if (attr.hasDefault) given = attr.default;\n            else throw new RangeError(\"No value supplied for attribute \" + name);\n        } else if (attr.validate) attr.validate(given);\n        built[name] = given;\n    }\n    return built;\n}\nfunction $0f7cdfd9537f6363$var$initAttrs(typeName, attrs) {\n    let result = Object.create(null);\n    if (attrs) for(let name in attrs)result[name] = new $0f7cdfd9537f6363$var$Attribute(typeName, name, attrs[name]);\n    return result;\n}\n/**\nNode types are objects allocated once per `Schema` and used to\n[tag](https://prosemirror.net/docs/ref/#model.Node.type) `Node` instances. They contain information\nabout the node type, such as its name and what kind of node it\nrepresents.\n*/ class $0f7cdfd9537f6363$export$f06e977173f1857c {\n    /**\n    @internal\n    */ constructor(/**\n    The name the node type has in this schema.\n    */ name, /**\n    A link back to the `Schema` the node type belongs to.\n    */ schema, /**\n    The spec that this type is based on\n    */ spec){\n        this.name = name;\n        this.schema = schema;\n        this.spec = spec;\n        /**\n        The set of marks allowed in this node. `null` means all marks\n        are allowed.\n        */ this.markSet = null;\n        this.groups = spec.group ? spec.group.split(\" \") : [];\n        this.attrs = $0f7cdfd9537f6363$var$initAttrs(name, spec.attrs);\n        this.defaultAttrs = $0f7cdfd9537f6363$var$defaultAttrs(this.attrs);\n        this.contentMatch = null;\n        this.inlineContent = null;\n        this.isBlock = !(spec.inline || name == \"text\");\n        this.isText = name == \"text\";\n    }\n    /**\n    True if this is an inline type.\n    */ get isInline() {\n        return !this.isBlock;\n    }\n    /**\n    True if this is a textblock type, a block that contains inline\n    content.\n    */ get isTextblock() {\n        return this.isBlock && this.inlineContent;\n    }\n    /**\n    True for node types that allow no content.\n    */ get isLeaf() {\n        return this.contentMatch == $0f7cdfd9537f6363$export$364ed450558d7ec4.empty;\n    }\n    /**\n    True when this node is an atom, i.e. when it does not have\n    directly editable content.\n    */ get isAtom() {\n        return this.isLeaf || !!this.spec.atom;\n    }\n    /**\n    Return true when this node type is part of the given\n    [group](https://prosemirror.net/docs/ref/#model.NodeSpec.group).\n    */ isInGroup(group) {\n        return this.groups.indexOf(group) > -1;\n    }\n    /**\n    The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option.\n    */ get whitespace() {\n        return this.spec.whitespace || (this.spec.code ? \"pre\" : \"normal\");\n    }\n    /**\n    Tells you whether this node type has any required attributes.\n    */ hasRequiredAttrs() {\n        for(let n in this.attrs)if (this.attrs[n].isRequired) return true;\n        return false;\n    }\n    /**\n    Indicates whether this node allows some of the same content as\n    the given node type.\n    */ compatibleContent(other) {\n        return this == other || this.contentMatch.compatible(other.contentMatch);\n    }\n    /**\n    @internal\n    */ computeAttrs(attrs) {\n        if (!attrs && this.defaultAttrs) return this.defaultAttrs;\n        else return $0f7cdfd9537f6363$var$computeAttrs(this.attrs, attrs);\n    }\n    /**\n    Create a `Node` of this type. The given attributes are\n    checked and defaulted (you can pass `null` to use the type's\n    defaults entirely, if no required attributes exist). `content`\n    may be a `Fragment`, a node, an array of nodes, or\n    `null`. Similarly `marks` may be `null` to default to the empty\n    set of marks.\n    */ create(attrs = null, content, marks) {\n        if (this.isText) throw new Error(\"NodeType.create can't construct text nodes\");\n        return new $0f7cdfd9537f6363$export$85c928794f8d04d4(this, this.computeAttrs(attrs), $0f7cdfd9537f6363$export$ffb0004e005737fa.from(content), $0f7cdfd9537f6363$export$c9d15bcfc6d42044.setFrom(marks));\n    }\n    /**\n    Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content\n    against the node type's content restrictions, and throw an error\n    if it doesn't match.\n    */ createChecked(attrs = null, content, marks) {\n        content = $0f7cdfd9537f6363$export$ffb0004e005737fa.from(content);\n        this.checkContent(content);\n        return new $0f7cdfd9537f6363$export$85c928794f8d04d4(this, this.computeAttrs(attrs), content, $0f7cdfd9537f6363$export$c9d15bcfc6d42044.setFrom(marks));\n    }\n    /**\n    Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is\n    necessary to add nodes to the start or end of the given fragment\n    to make it fit the node. If no fitting wrapping can be found,\n    return null. Note that, due to the fact that required nodes can\n    always be created, this will always succeed if you pass null or\n    `Fragment.empty` as content.\n    */ createAndFill(attrs = null, content, marks) {\n        attrs = this.computeAttrs(attrs);\n        content = $0f7cdfd9537f6363$export$ffb0004e005737fa.from(content);\n        if (content.size) {\n            let before = this.contentMatch.fillBefore(content);\n            if (!before) return null;\n            content = before.append(content);\n        }\n        let matched = this.contentMatch.matchFragment(content);\n        let after = matched && matched.fillBefore($0f7cdfd9537f6363$export$ffb0004e005737fa.empty, true);\n        if (!after) return null;\n        return new $0f7cdfd9537f6363$export$85c928794f8d04d4(this, attrs, content.append(after), $0f7cdfd9537f6363$export$c9d15bcfc6d42044.setFrom(marks));\n    }\n    /**\n    Returns true if the given fragment is valid content for this node\n    type.\n    */ validContent(content) {\n        let result = this.contentMatch.matchFragment(content);\n        if (!result || !result.validEnd) return false;\n        for(let i = 0; i < content.childCount; i++)if (!this.allowsMarks(content.child(i).marks)) return false;\n        return true;\n    }\n    /**\n    Throws a RangeError if the given fragment is not valid content for this\n    node type.\n    @internal\n    */ checkContent(content) {\n        if (!this.validContent(content)) throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`);\n    }\n    /**\n    @internal no longer useful, but called by old prosemirror-view versions\n    */ checkAttrs(attrs) {}\n    /**\n    Check whether the given mark type is allowed in this node.\n    */ allowsMarkType(markType) {\n        return this.markSet == null || this.markSet.indexOf(markType) > -1;\n    }\n    /**\n    Test whether the given set of marks are allowed in this node.\n    */ allowsMarks(marks) {\n        if (this.markSet == null) return true;\n        for(let i = 0; i < marks.length; i++)if (!this.allowsMarkType(marks[i].type)) return false;\n        return true;\n    }\n    /**\n    Removes the marks that are not allowed in this node from the given set.\n    */ allowedMarks(marks) {\n        if (this.markSet == null) return marks;\n        let copy;\n        for(let i = 0; i < marks.length; i++){\n            if (!this.allowsMarkType(marks[i].type)) {\n                if (!copy) copy = marks.slice(0, i);\n            } else if (copy) copy.push(marks[i]);\n        }\n        return !copy ? marks : copy.length ? copy : $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none;\n    }\n    /**\n    @internal\n    */ static compile(nodes, schema) {\n        let result = Object.create(null);\n        nodes.forEach((name, spec)=>result[name] = new $0f7cdfd9537f6363$export$f06e977173f1857c(name, schema, spec));\n        let topType = schema.spec.topNode || \"doc\";\n        if (!result[topType]) throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\");\n        if (!result.text) throw new RangeError(\"Every schema needs a 'text' type\");\n        for(let _ in result.text.attrs)throw new RangeError(\"The text node type should not have attributes\");\n        return result;\n    }\n}\nfunction $0f7cdfd9537f6363$var$validateType(typeName, attrName, type) {\n    let types = type.split(\"|\");\n    return (value)=>{\n        let name = value === null ? \"null\" : typeof value;\n        if (types.indexOf(name) < 0) throw new RangeError(`Expected value of type ${types} for attribute ${attrName} on type ${typeName}, got ${name}`);\n    };\n}\n// Attribute descriptors\nclass $0f7cdfd9537f6363$var$Attribute {\n    constructor(typeName, attrName, options){\n        this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n        this.default = options.default;\n        this.validate = typeof options.validate == \"string\" ? $0f7cdfd9537f6363$var$validateType(typeName, attrName, options.validate) : options.validate;\n    }\n    get isRequired() {\n        return !this.hasDefault;\n    }\n}\n// Marks\n/**\nLike nodes, marks (which are associated with nodes to signify\nthings like emphasis or being part of a link) are\n[tagged](https://prosemirror.net/docs/ref/#model.Mark.type) with type objects, which are\ninstantiated once per `Schema`.\n*/ class $0f7cdfd9537f6363$export$b6a78689043c6521 {\n    /**\n    @internal\n    */ constructor(/**\n    The name of the mark type.\n    */ name, /**\n    @internal\n    */ rank, /**\n    The schema that this mark type instance is part of.\n    */ schema, /**\n    The spec on which the type is based.\n    */ spec){\n        this.name = name;\n        this.rank = rank;\n        this.schema = schema;\n        this.spec = spec;\n        this.attrs = $0f7cdfd9537f6363$var$initAttrs(name, spec.attrs);\n        this.excluded = null;\n        let defaults = $0f7cdfd9537f6363$var$defaultAttrs(this.attrs);\n        this.instance = defaults ? new $0f7cdfd9537f6363$export$c9d15bcfc6d42044(this, defaults) : null;\n    }\n    /**\n    Create a mark of this type. `attrs` may be `null` or an object\n    containing only some of the mark's attributes. The others, if\n    they have defaults, will be added.\n    */ create(attrs = null) {\n        if (!attrs && this.instance) return this.instance;\n        return new $0f7cdfd9537f6363$export$c9d15bcfc6d42044(this, $0f7cdfd9537f6363$var$computeAttrs(this.attrs, attrs));\n    }\n    /**\n    @internal\n    */ static compile(marks, schema) {\n        let result = Object.create(null), rank = 0;\n        marks.forEach((name, spec)=>result[name] = new $0f7cdfd9537f6363$export$b6a78689043c6521(name, rank++, schema, spec));\n        return result;\n    }\n    /**\n    When there is a mark of this type in the given set, a new set\n    without it is returned. Otherwise, the input set is returned.\n    */ removeFromSet(set) {\n        for(var i = 0; i < set.length; i++)if (set[i].type == this) {\n            set = set.slice(0, i).concat(set.slice(i + 1));\n            i--;\n        }\n        return set;\n    }\n    /**\n    Tests whether there is a mark of this type in the given set.\n    */ isInSet(set) {\n        for(let i = 0; i < set.length; i++)if (set[i].type == this) return set[i];\n    }\n    /**\n    Queries whether a given mark type is\n    [excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one.\n    */ excludes(other) {\n        return this.excluded.indexOf(other) > -1;\n    }\n}\n/**\nA document schema. Holds [node](https://prosemirror.net/docs/ref/#model.NodeType) and [mark\ntype](https://prosemirror.net/docs/ref/#model.MarkType) objects for the nodes and marks that may\noccur in conforming documents, and provides functionality for\ncreating and deserializing such documents.\n\nWhen given, the type parameters provide the names of the nodes and\nmarks in this schema.\n*/ class $0f7cdfd9537f6363$export$19342e026b58ebb7 {\n    /**\n    Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).\n    */ constructor(spec){\n        /**\n        The [linebreak\n        replacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement) node defined\n        in this schema, if any.\n        */ this.linebreakReplacement = null;\n        /**\n        An object for storing whatever values modules may want to\n        compute and cache per schema. (If you want to store something\n        in it, try to use property names unlikely to clash.)\n        */ this.cached = Object.create(null);\n        let instanceSpec = this.spec = {};\n        for(let prop in spec)instanceSpec[prop] = spec[prop];\n        instanceSpec.nodes = (0, $6ybul.default).from(spec.nodes), instanceSpec.marks = (0, $6ybul.default).from(spec.marks || {}), this.nodes = $0f7cdfd9537f6363$export$f06e977173f1857c.compile(this.spec.nodes, this);\n        this.marks = $0f7cdfd9537f6363$export$b6a78689043c6521.compile(this.spec.marks, this);\n        let contentExprCache = Object.create(null);\n        for(let prop in this.nodes){\n            if (prop in this.marks) throw new RangeError(prop + \" can not be both a node and a mark\");\n            let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n            type.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = $0f7cdfd9537f6363$export$364ed450558d7ec4.parse(contentExpr, this.nodes));\n            type.inlineContent = type.contentMatch.inlineContent;\n            if (type.spec.linebreakReplacement) {\n                if (this.linebreakReplacement) throw new RangeError(\"Multiple linebreak nodes defined\");\n                if (!type.isInline || !type.isLeaf) throw new RangeError(\"Linebreak replacement nodes must be inline leaf nodes\");\n                this.linebreakReplacement = type;\n            }\n            type.markSet = markExpr == \"_\" ? null : markExpr ? $0f7cdfd9537f6363$var$gatherMarks(this, markExpr.split(\" \")) : markExpr == \"\" || !type.inlineContent ? [] : null;\n        }\n        for(let prop in this.marks){\n            let type = this.marks[prop], excl = type.spec.excludes;\n            type.excluded = excl == null ? [\n                type\n            ] : excl == \"\" ? [] : $0f7cdfd9537f6363$var$gatherMarks(this, excl.split(\" \"));\n        }\n        this.nodeFromJSON = (json)=>$0f7cdfd9537f6363$export$85c928794f8d04d4.fromJSON(this, json);\n        this.markFromJSON = (json)=>$0f7cdfd9537f6363$export$c9d15bcfc6d42044.fromJSON(this, json);\n        this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n        this.cached.wrappings = Object.create(null);\n    }\n    /**\n    Create a node in this schema. The `type` may be a string or a\n    `NodeType` instance. Attributes will be extended with defaults,\n    `content` may be a `Fragment`, `null`, a `Node`, or an array of\n    nodes.\n    */ node(type, attrs = null, content, marks) {\n        if (typeof type == \"string\") type = this.nodeType(type);\n        else if (!(type instanceof $0f7cdfd9537f6363$export$f06e977173f1857c)) throw new RangeError(\"Invalid node type: \" + type);\n        else if (type.schema != this) throw new RangeError(\"Node type from different schema used (\" + type.name + \")\");\n        return type.createChecked(attrs, content, marks);\n    }\n    /**\n    Create a text node in the schema. Empty text nodes are not\n    allowed.\n    */ text(text, marks) {\n        let type = this.nodes.text;\n        return new $0f7cdfd9537f6363$var$TextNode(type, type.defaultAttrs, text, $0f7cdfd9537f6363$export$c9d15bcfc6d42044.setFrom(marks));\n    }\n    /**\n    Create a mark with the given type and attributes.\n    */ mark(type, attrs) {\n        if (typeof type == \"string\") type = this.marks[type];\n        return type.create(attrs);\n    }\n    /**\n    @internal\n    */ nodeType(name) {\n        let found = this.nodes[name];\n        if (!found) throw new RangeError(\"Unknown node type: \" + name);\n        return found;\n    }\n}\nfunction $0f7cdfd9537f6363$var$gatherMarks(schema, marks) {\n    let found = [];\n    for(let i = 0; i < marks.length; i++){\n        let name = marks[i], mark = schema.marks[name], ok = mark;\n        if (mark) found.push(mark);\n        else for(let prop in schema.marks){\n            let mark = schema.marks[prop];\n            if (name == \"_\" || mark.spec.group && mark.spec.group.split(\" \").indexOf(name) > -1) found.push(ok = mark);\n        }\n        if (!ok) throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\");\n    }\n    return found;\n}\nfunction $0f7cdfd9537f6363$var$isTagRule(rule) {\n    return rule.tag != null;\n}\nfunction $0f7cdfd9537f6363$var$isStyleRule(rule) {\n    return rule.style != null;\n}\n/**\nA DOM parser represents a strategy for parsing DOM content into a\nProseMirror document conforming to a given schema. Its behavior is\ndefined by an array of [rules](https://prosemirror.net/docs/ref/#model.ParseRule).\n*/ class $0f7cdfd9537f6363$export$1059c6e7d2ce5669 {\n    /**\n    Create a parser that targets the given schema, using the given\n    parsing rules.\n    */ constructor(/**\n    The schema into which the parser parses.\n    */ schema, /**\n    The set of [parse rules](https://prosemirror.net/docs/ref/#model.ParseRule) that the parser\n    uses, in order of precedence.\n    */ rules){\n        this.schema = schema;\n        this.rules = rules;\n        /**\n        @internal\n        */ this.tags = [];\n        /**\n        @internal\n        */ this.styles = [];\n        let matchedStyles = this.matchedStyles = [];\n        rules.forEach((rule)=>{\n            if ($0f7cdfd9537f6363$var$isTagRule(rule)) this.tags.push(rule);\n            else if ($0f7cdfd9537f6363$var$isStyleRule(rule)) {\n                let prop = /[^=]*/.exec(rule.style)[0];\n                if (matchedStyles.indexOf(prop) < 0) matchedStyles.push(prop);\n                this.styles.push(rule);\n            }\n        });\n        // Only normalize list elements when lists in the schema can't directly contain themselves\n        this.normalizeLists = !this.tags.some((r)=>{\n            if (!/^(ul|ol)\\b/.test(r.tag) || !r.node) return false;\n            let node = schema.nodes[r.node];\n            return node.contentMatch.matchType(node);\n        });\n    }\n    /**\n    Parse a document from the content of a DOM node.\n    */ parse(dom, options = {}) {\n        let context = new $0f7cdfd9537f6363$var$ParseContext(this, options, false);\n        context.addAll(dom, $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none, options.from, options.to);\n        return context.finish();\n    }\n    /**\n    Parses the content of the given DOM node, like\n    [`parse`](https://prosemirror.net/docs/ref/#model.DOMParser.parse), and takes the same set of\n    options. But unlike that method, which produces a whole node,\n    this one returns a slice that is open at the sides, meaning that\n    the schema constraints aren't applied to the start of nodes to\n    the left of the input and the end of nodes at the end.\n    */ parseSlice(dom, options = {}) {\n        let context = new $0f7cdfd9537f6363$var$ParseContext(this, options, true);\n        context.addAll(dom, $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none, options.from, options.to);\n        return $0f7cdfd9537f6363$export$b3f2e2de3a8baa1e.maxOpen(context.finish());\n    }\n    /**\n    @internal\n    */ matchTag(dom, context, after) {\n        for(let i = after ? this.tags.indexOf(after) + 1 : 0; i < this.tags.length; i++){\n            let rule = this.tags[i];\n            if ($0f7cdfd9537f6363$var$matches(dom, rule.tag) && (rule.namespace === undefined || dom.namespaceURI == rule.namespace) && (!rule.context || context.matchesContext(rule.context))) {\n                if (rule.getAttrs) {\n                    let result = rule.getAttrs(dom);\n                    if (result === false) continue;\n                    rule.attrs = result || undefined;\n                }\n                return rule;\n            }\n        }\n    }\n    /**\n    @internal\n    */ matchStyle(prop, value, context, after) {\n        for(let i = after ? this.styles.indexOf(after) + 1 : 0; i < this.styles.length; i++){\n            let rule = this.styles[i], style = rule.style;\n            if (style.indexOf(prop) != 0 || rule.context && !context.matchesContext(rule.context) || // Test that the style string either precisely matches the prop,\n            // or has an '=' sign after the prop, followed by the given\n            // value.\n            style.length > prop.length && (style.charCodeAt(prop.length) != 61 || style.slice(prop.length + 1) != value)) continue;\n            if (rule.getAttrs) {\n                let result = rule.getAttrs(value);\n                if (result === false) continue;\n                rule.attrs = result || undefined;\n            }\n            return rule;\n        }\n    }\n    /**\n    @internal\n    */ static schemaRules(schema) {\n        let result = [];\n        function insert(rule) {\n            let priority = rule.priority == null ? 50 : rule.priority, i = 0;\n            for(; i < result.length; i++){\n                let next = result[i], nextPriority = next.priority == null ? 50 : next.priority;\n                if (nextPriority < priority) break;\n            }\n            result.splice(i, 0, rule);\n        }\n        for(let name in schema.marks){\n            let rules = schema.marks[name].spec.parseDOM;\n            if (rules) rules.forEach((rule)=>{\n                insert(rule = $0f7cdfd9537f6363$var$copy(rule));\n                if (!(rule.mark || rule.ignore || rule.clearMark)) rule.mark = name;\n            });\n        }\n        for(let name in schema.nodes){\n            let rules = schema.nodes[name].spec.parseDOM;\n            if (rules) rules.forEach((rule)=>{\n                insert(rule = $0f7cdfd9537f6363$var$copy(rule));\n                if (!(rule.node || rule.ignore || rule.mark)) rule.node = name;\n            });\n        }\n        return result;\n    }\n    /**\n    Construct a DOM parser using the parsing rules listed in a\n    schema's [node specs](https://prosemirror.net/docs/ref/#model.NodeSpec.parseDOM), reordered by\n    [priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).\n    */ static fromSchema(schema) {\n        return schema.cached.domParser || (schema.cached.domParser = new $0f7cdfd9537f6363$export$1059c6e7d2ce5669(schema, $0f7cdfd9537f6363$export$1059c6e7d2ce5669.schemaRules(schema)));\n    }\n}\nconst $0f7cdfd9537f6363$var$blockTags = {\n    address: true,\n    article: true,\n    aside: true,\n    blockquote: true,\n    body: true,\n    canvas: true,\n    dd: true,\n    div: true,\n    dl: true,\n    fieldset: true,\n    figcaption: true,\n    figure: true,\n    footer: true,\n    form: true,\n    h1: true,\n    h2: true,\n    h3: true,\n    h4: true,\n    h5: true,\n    h6: true,\n    header: true,\n    hgroup: true,\n    hr: true,\n    li: true,\n    noscript: true,\n    ol: true,\n    output: true,\n    p: true,\n    pre: true,\n    section: true,\n    table: true,\n    tfoot: true,\n    ul: true\n};\nconst $0f7cdfd9537f6363$var$ignoreTags = {\n    head: true,\n    noscript: true,\n    object: true,\n    script: true,\n    style: true,\n    title: true\n};\nconst $0f7cdfd9537f6363$var$listTags = {\n    ol: true,\n    ul: true\n};\n// Using a bitfield for node context options\nconst $0f7cdfd9537f6363$var$OPT_PRESERVE_WS = 1, $0f7cdfd9537f6363$var$OPT_PRESERVE_WS_FULL = 2, $0f7cdfd9537f6363$var$OPT_OPEN_LEFT = 4;\nfunction $0f7cdfd9537f6363$var$wsOptionsFor(type, preserveWhitespace, base) {\n    if (preserveWhitespace != null) return (preserveWhitespace ? $0f7cdfd9537f6363$var$OPT_PRESERVE_WS : 0) | (preserveWhitespace === \"full\" ? $0f7cdfd9537f6363$var$OPT_PRESERVE_WS_FULL : 0);\n    return type && type.whitespace == \"pre\" ? $0f7cdfd9537f6363$var$OPT_PRESERVE_WS | $0f7cdfd9537f6363$var$OPT_PRESERVE_WS_FULL : base & ~$0f7cdfd9537f6363$var$OPT_OPEN_LEFT;\n}\nclass $0f7cdfd9537f6363$var$NodeContext {\n    constructor(type, attrs, marks, solid, match, options){\n        this.type = type;\n        this.attrs = attrs;\n        this.marks = marks;\n        this.solid = solid;\n        this.options = options;\n        this.content = [];\n        // Marks applied to the node's children\n        this.activeMarks = $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none;\n        this.match = match || (options & $0f7cdfd9537f6363$var$OPT_OPEN_LEFT ? null : type.contentMatch);\n    }\n    findWrapping(node) {\n        if (!this.match) {\n            if (!this.type) return [];\n            let fill = this.type.contentMatch.fillBefore($0f7cdfd9537f6363$export$ffb0004e005737fa.from(node));\n            if (fill) this.match = this.type.contentMatch.matchFragment(fill);\n            else {\n                let start = this.type.contentMatch, wrap;\n                if (wrap = start.findWrapping(node.type)) {\n                    this.match = start;\n                    return wrap;\n                } else return null;\n            }\n        }\n        return this.match.findWrapping(node.type);\n    }\n    finish(openEnd) {\n        if (!(this.options & $0f7cdfd9537f6363$var$OPT_PRESERVE_WS)) {\n            let last = this.content[this.content.length - 1], m;\n            if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n                let text = last;\n                if (last.text.length == m[0].length) this.content.pop();\n                else this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m[0].length));\n            }\n        }\n        let content = $0f7cdfd9537f6363$export$ffb0004e005737fa.from(this.content);\n        if (!openEnd && this.match) content = content.append(this.match.fillBefore($0f7cdfd9537f6363$export$ffb0004e005737fa.empty, true));\n        return this.type ? this.type.create(this.attrs, content, this.marks) : content;\n    }\n    inlineContext(node) {\n        if (this.type) return this.type.inlineContent;\n        if (this.content.length) return this.content[0].isInline;\n        return node.parentNode && !$0f7cdfd9537f6363$var$blockTags.hasOwnProperty(node.parentNode.nodeName.toLowerCase());\n    }\n}\nclass $0f7cdfd9537f6363$var$ParseContext {\n    constructor(// The parser we are using.\n    parser, // The options passed to this parse.\n    options, isOpen){\n        this.parser = parser;\n        this.options = options;\n        this.isOpen = isOpen;\n        this.open = 0;\n        this.localPreserveWS = false;\n        let topNode = options.topNode, topContext;\n        let topOptions = $0f7cdfd9537f6363$var$wsOptionsFor(null, options.preserveWhitespace, 0) | (isOpen ? $0f7cdfd9537f6363$var$OPT_OPEN_LEFT : 0);\n        if (topNode) topContext = new $0f7cdfd9537f6363$var$NodeContext(topNode.type, topNode.attrs, $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none, true, options.topMatch || topNode.type.contentMatch, topOptions);\n        else if (isOpen) topContext = new $0f7cdfd9537f6363$var$NodeContext(null, null, $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none, true, null, topOptions);\n        else topContext = new $0f7cdfd9537f6363$var$NodeContext(parser.schema.topNodeType, null, $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none, true, null, topOptions);\n        this.nodes = [\n            topContext\n        ];\n        this.find = options.findPositions;\n        this.needsBlock = false;\n    }\n    get top() {\n        return this.nodes[this.open];\n    }\n    // Add a DOM node to the content. Text is inserted as text node,\n    // otherwise, the node is passed to `addElement` or, if it has a\n    // `style` attribute, `addElementWithStyles`.\n    addDOM(dom, marks) {\n        if (dom.nodeType == 3) this.addTextNode(dom, marks);\n        else if (dom.nodeType == 1) this.addElement(dom, marks);\n    }\n    addTextNode(dom, marks) {\n        let value = dom.nodeValue;\n        let top = this.top, preserveWS = top.options & $0f7cdfd9537f6363$var$OPT_PRESERVE_WS_FULL ? \"full\" : this.localPreserveWS || (top.options & $0f7cdfd9537f6363$var$OPT_PRESERVE_WS) > 0;\n        let { schema: schema } = this.parser;\n        if (preserveWS === \"full\" || top.inlineContext(dom) || /[^ \\t\\r\\n\\u000c]/.test(value)) {\n            if (!preserveWS) {\n                value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \");\n                // If this starts with whitespace, and there is no node before it, or\n                // a hard break, or a text node that ends with whitespace, strip the\n                // leading space.\n                if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n                    let nodeBefore = top.content[top.content.length - 1];\n                    let domNodeBefore = dom.previousSibling;\n                    if (!nodeBefore || domNodeBefore && domNodeBefore.nodeName == 'BR' || nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)) value = value.slice(1);\n                }\n            } else if (preserveWS === \"full\") value = value.replace(/\\r\\n?/g, \"\\n\");\n            else if (schema.linebreakReplacement && /[\\r\\n]/.test(value) && this.top.findWrapping(schema.linebreakReplacement.create())) {\n                let lines = value.split(/\\r?\\n|\\r/);\n                for(let i = 0; i < lines.length; i++){\n                    if (i) this.insertNode(schema.linebreakReplacement.create(), marks, true);\n                    if (lines[i]) this.insertNode(schema.text(lines[i]), marks, !/\\S/.test(lines[i]));\n                }\n                value = \"\";\n            } else value = value.replace(/\\r?\\n|\\r/g, \" \");\n            if (value) this.insertNode(schema.text(value), marks, !/\\S/.test(value));\n            this.findInText(dom);\n        } else this.findInside(dom);\n    }\n    // Try to find a handler for the given tag and use that to parse. If\n    // none is found, the element's content nodes are added directly.\n    addElement(dom, marks, matchAfter) {\n        let outerWS = this.localPreserveWS, top = this.top;\n        if (dom.tagName == \"PRE\" || /pre/.test(dom.style && dom.style.whiteSpace)) this.localPreserveWS = true;\n        let name = dom.nodeName.toLowerCase(), ruleID;\n        if ($0f7cdfd9537f6363$var$listTags.hasOwnProperty(name) && this.parser.normalizeLists) $0f7cdfd9537f6363$var$normalizeList(dom);\n        let rule = this.options.ruleFromNode && this.options.ruleFromNode(dom) || (ruleID = this.parser.matchTag(dom, this, matchAfter));\n        out: if (rule ? rule.ignore : $0f7cdfd9537f6363$var$ignoreTags.hasOwnProperty(name)) {\n            this.findInside(dom);\n            this.ignoreFallback(dom, marks);\n        } else if (!rule || rule.skip || rule.closeParent) {\n            if (rule && rule.closeParent) this.open = Math.max(0, this.open - 1);\n            else if (rule && rule.skip.nodeType) dom = rule.skip;\n            let sync, oldNeedsBlock = this.needsBlock;\n            if ($0f7cdfd9537f6363$var$blockTags.hasOwnProperty(name)) {\n                if (top.content.length && top.content[0].isInline && this.open) {\n                    this.open--;\n                    top = this.top;\n                }\n                sync = true;\n                if (!top.type) this.needsBlock = true;\n            } else if (!dom.firstChild) {\n                this.leafFallback(dom, marks);\n                break out;\n            }\n            let innerMarks = rule && rule.skip ? marks : this.readStyles(dom, marks);\n            if (innerMarks) this.addAll(dom, innerMarks);\n            if (sync) this.sync(top);\n            this.needsBlock = oldNeedsBlock;\n        } else {\n            let innerMarks = this.readStyles(dom, marks);\n            if (innerMarks) this.addElementByRule(dom, rule, innerMarks, rule.consuming === false ? ruleID : undefined);\n        }\n        this.localPreserveWS = outerWS;\n    }\n    // Called for leaf DOM nodes that would otherwise be ignored\n    leafFallback(dom, marks) {\n        if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent) this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\"), marks);\n    }\n    // Called for ignored nodes\n    ignoreFallback(dom, marks) {\n        // Ignored BR nodes should at least create an inline context\n        if (dom.nodeName == \"BR\" && (!this.top.type || !this.top.type.inlineContent)) this.findPlace(this.parser.schema.text(\"-\"), marks, true);\n    }\n    // Run any style parser associated with the node's styles. Either\n    // return an updated array of marks, or null to indicate some of the\n    // styles had a rule with `ignore` set.\n    readStyles(dom, marks) {\n        let styles = dom.style;\n        // Because many properties will only show up in 'normalized' form\n        // in `style.item` (i.e. text-decoration becomes\n        // text-decoration-line, text-decoration-color, etc), we directly\n        // query the styles mentioned in our rules instead of iterating\n        // over the items.\n        if (styles && styles.length) for(let i = 0; i < this.parser.matchedStyles.length; i++){\n            let name = this.parser.matchedStyles[i], value = styles.getPropertyValue(name);\n            if (value) for(let after = undefined;;){\n                let rule = this.parser.matchStyle(name, value, this, after);\n                if (!rule) break;\n                if (rule.ignore) return null;\n                if (rule.clearMark) marks = marks.filter((m)=>!rule.clearMark(m));\n                else marks = marks.concat(this.parser.schema.marks[rule.mark].create(rule.attrs));\n                if (rule.consuming === false) after = rule;\n                else break;\n            }\n        }\n        return marks;\n    }\n    // Look up a handler for the given node. If none are found, return\n    // false. Otherwise, apply it, use its return value to drive the way\n    // the node's content is wrapped, and return true.\n    addElementByRule(dom, rule, marks, continueAfter) {\n        let sync, nodeType;\n        if (rule.node) {\n            nodeType = this.parser.schema.nodes[rule.node];\n            if (!nodeType.isLeaf) {\n                let inner = this.enter(nodeType, rule.attrs || null, marks, rule.preserveWhitespace);\n                if (inner) {\n                    sync = true;\n                    marks = inner;\n                }\n            } else if (!this.insertNode(nodeType.create(rule.attrs), marks, dom.nodeName == \"BR\")) this.leafFallback(dom, marks);\n        } else {\n            let markType = this.parser.schema.marks[rule.mark];\n            marks = marks.concat(markType.create(rule.attrs));\n        }\n        let startIn = this.top;\n        if (nodeType && nodeType.isLeaf) this.findInside(dom);\n        else if (continueAfter) this.addElement(dom, marks, continueAfter);\n        else if (rule.getContent) {\n            this.findInside(dom);\n            rule.getContent(dom, this.parser.schema).forEach((node)=>this.insertNode(node, marks, false));\n        } else {\n            let contentDOM = dom;\n            if (typeof rule.contentElement == \"string\") contentDOM = dom.querySelector(rule.contentElement);\n            else if (typeof rule.contentElement == \"function\") contentDOM = rule.contentElement(dom);\n            else if (rule.contentElement) contentDOM = rule.contentElement;\n            this.findAround(dom, contentDOM, true);\n            this.addAll(contentDOM, marks);\n            this.findAround(dom, contentDOM, false);\n        }\n        if (sync && this.sync(startIn)) this.open--;\n    }\n    // Add all child nodes between `startIndex` and `endIndex` (or the\n    // whole node, if not given). If `sync` is passed, use it to\n    // synchronize after every block element.\n    addAll(parent, marks, startIndex, endIndex) {\n        let index = startIndex || 0;\n        for(let dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild, end = endIndex == null ? null : parent.childNodes[endIndex]; dom != end; dom = dom.nextSibling, ++index){\n            this.findAtPoint(parent, index);\n            this.addDOM(dom, marks);\n        }\n        this.findAtPoint(parent, index);\n    }\n    // Try to find a way to fit the given node type into the current\n    // context. May add intermediate wrappers and/or leave non-solid\n    // nodes that we're in.\n    findPlace(node, marks, cautious) {\n        let route, sync;\n        for(let depth = this.open, penalty = 0; depth >= 0; depth--){\n            let cx = this.nodes[depth];\n            let found = cx.findWrapping(node);\n            if (found && (!route || route.length > found.length + penalty)) {\n                route = found;\n                sync = cx;\n                if (!found.length) break;\n            }\n            if (cx.solid) {\n                if (cautious) break;\n                penalty += 2;\n            }\n        }\n        if (!route) return null;\n        this.sync(sync);\n        for(let i = 0; i < route.length; i++)marks = this.enterInner(route[i], null, marks, false);\n        return marks;\n    }\n    // Try to insert the given node, adjusting the context when needed.\n    insertNode(node, marks, cautious) {\n        if (node.isInline && this.needsBlock && !this.top.type) {\n            let block = this.textblockFromContext();\n            if (block) marks = this.enterInner(block, null, marks);\n        }\n        let innerMarks = this.findPlace(node, marks, cautious);\n        if (innerMarks) {\n            this.closeExtra();\n            let top = this.top;\n            if (top.match) top.match = top.match.matchType(node.type);\n            let nodeMarks = $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none;\n            for (let m of innerMarks.concat(node.marks))if (top.type ? top.type.allowsMarkType(m.type) : $0f7cdfd9537f6363$var$markMayApply(m.type, node.type)) nodeMarks = m.addToSet(nodeMarks);\n            top.content.push(node.mark(nodeMarks));\n            return true;\n        }\n        return false;\n    }\n    // Try to start a node of the given type, adjusting the context when\n    // necessary.\n    enter(type, attrs, marks, preserveWS) {\n        let innerMarks = this.findPlace(type.create(attrs), marks, false);\n        if (innerMarks) innerMarks = this.enterInner(type, attrs, marks, true, preserveWS);\n        return innerMarks;\n    }\n    // Open a node of the given type\n    enterInner(type, attrs, marks, solid = false, preserveWS) {\n        this.closeExtra();\n        let top = this.top;\n        top.match = top.match && top.match.matchType(type);\n        let options = $0f7cdfd9537f6363$var$wsOptionsFor(type, preserveWS, top.options);\n        if (top.options & $0f7cdfd9537f6363$var$OPT_OPEN_LEFT && top.content.length == 0) options |= $0f7cdfd9537f6363$var$OPT_OPEN_LEFT;\n        let applyMarks = $0f7cdfd9537f6363$export$c9d15bcfc6d42044.none;\n        marks = marks.filter((m)=>{\n            if (top.type ? top.type.allowsMarkType(m.type) : $0f7cdfd9537f6363$var$markMayApply(m.type, type)) {\n                applyMarks = m.addToSet(applyMarks);\n                return false;\n            }\n            return true;\n        });\n        this.nodes.push(new $0f7cdfd9537f6363$var$NodeContext(type, attrs, applyMarks, solid, null, options));\n        this.open++;\n        return marks;\n    }\n    // Make sure all nodes above this.open are finished and added to\n    // their parents\n    closeExtra(openEnd = false) {\n        let i = this.nodes.length - 1;\n        if (i > this.open) {\n            for(; i > this.open; i--)this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd));\n            this.nodes.length = this.open + 1;\n        }\n    }\n    finish() {\n        this.open = 0;\n        this.closeExtra(this.isOpen);\n        return this.nodes[0].finish(!!(this.isOpen || this.options.topOpen));\n    }\n    sync(to) {\n        for(let i = this.open; i >= 0; i--){\n            if (this.nodes[i] == to) {\n                this.open = i;\n                return true;\n            } else if (this.localPreserveWS) this.nodes[i].options |= $0f7cdfd9537f6363$var$OPT_PRESERVE_WS;\n        }\n        return false;\n    }\n    get currentPos() {\n        this.closeExtra();\n        let pos = 0;\n        for(let i = this.open; i >= 0; i--){\n            let content = this.nodes[i].content;\n            for(let j = content.length - 1; j >= 0; j--)pos += content[j].nodeSize;\n            if (i) pos++;\n        }\n        return pos;\n    }\n    findAtPoint(parent, offset) {\n        if (this.find) {\n            for(let i = 0; i < this.find.length; i++)if (this.find[i].node == parent && this.find[i].offset == offset) this.find[i].pos = this.currentPos;\n        }\n    }\n    findInside(parent) {\n        if (this.find) {\n            for(let i = 0; i < this.find.length; i++)if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) this.find[i].pos = this.currentPos;\n        }\n    }\n    findAround(parent, content, before) {\n        if (parent != content && this.find) {\n            for(let i = 0; i < this.find.length; i++)if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n                let pos = content.compareDocumentPosition(this.find[i].node);\n                if (pos & (before ? 2 : 4)) this.find[i].pos = this.currentPos;\n            }\n        }\n    }\n    findInText(textNode) {\n        if (this.find) {\n            for(let i = 0; i < this.find.length; i++)if (this.find[i].node == textNode) this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset);\n        }\n    }\n    // Determines whether the given context string matches this context.\n    matchesContext(context) {\n        if (context.indexOf(\"|\") > -1) return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this);\n        let parts = context.split(\"/\");\n        let option = this.options.context;\n        let useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n        let minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n        let match = (i, depth)=>{\n            for(; i >= 0; i--){\n                let part = parts[i];\n                if (part == \"\") {\n                    if (i == parts.length - 1 || i == 0) continue;\n                    for(; depth >= minDepth; depth--)if (match(i - 1, depth)) return true;\n                    return false;\n                } else {\n                    let next = depth > 0 || depth == 0 && useRoot ? this.nodes[depth].type : option && depth >= minDepth ? option.node(depth - minDepth).type : null;\n                    if (!next || next.name != part && !next.isInGroup(part)) return false;\n                    depth--;\n                }\n            }\n            return true;\n        };\n        return match(parts.length - 1, this.open);\n    }\n    textblockFromContext() {\n        let $context = this.options.context;\n        if ($context) for(let d = $context.depth; d >= 0; d--){\n            let deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n            if (deflt && deflt.isTextblock && deflt.defaultAttrs) return deflt;\n        }\n        for(let name in this.parser.schema.nodes){\n            let type = this.parser.schema.nodes[name];\n            if (type.isTextblock && type.defaultAttrs) return type;\n        }\n    }\n}\n// Kludge to work around directly nested list nodes produced by some\n// tools and allowed by browsers to mean that the nested list is\n// actually part of the list item above it.\nfunction $0f7cdfd9537f6363$var$normalizeList(dom) {\n    for(let child = dom.firstChild, prevItem = null; child; child = child.nextSibling){\n        let name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n        if (name && $0f7cdfd9537f6363$var$listTags.hasOwnProperty(name) && prevItem) {\n            prevItem.appendChild(child);\n            child = prevItem;\n        } else if (name == \"li\") prevItem = child;\n        else if (name) prevItem = null;\n    }\n}\n// Apply a CSS selector.\nfunction $0f7cdfd9537f6363$var$matches(dom, selector) {\n    return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector);\n}\nfunction $0f7cdfd9537f6363$var$copy(obj) {\n    let copy = {};\n    for(let prop in obj)copy[prop] = obj[prop];\n    return copy;\n}\n// Used when finding a mark at the top level of a fragment parse.\n// Checks whether it would be reasonable to apply a given mark type to\n// a given node, by looking at the way the mark occurs in the schema.\nfunction $0f7cdfd9537f6363$var$markMayApply(markType, nodeType) {\n    let nodes = nodeType.schema.nodes;\n    for(let name in nodes){\n        let parent = nodes[name];\n        if (!parent.allowsMarkType(markType)) continue;\n        let seen = [], scan = (match)=>{\n            seen.push(match);\n            for(let i = 0; i < match.edgeCount; i++){\n                let { type: type, next: next } = match.edge(i);\n                if (type == nodeType) return true;\n                if (seen.indexOf(next) < 0 && scan(next)) return true;\n            }\n        };\n        if (scan(parent.contentMatch)) return true;\n    }\n}\n/**\nA DOM serializer knows how to convert ProseMirror nodes and\nmarks of various types to DOM nodes.\n*/ class $0f7cdfd9537f6363$export$3476b78f8f5a8b72 {\n    /**\n    Create a serializer. `nodes` should map node names to functions\n    that take a node and return a description of the corresponding\n    DOM. `marks` does the same for mark names, but also gets an\n    argument that tells it whether the mark's content is block or\n    inline content (for typical use, it'll always be inline). A mark\n    serializer may be `null` to indicate that marks of that type\n    should not be serialized.\n    */ constructor(/**\n    The node serialization functions.\n    */ nodes, /**\n    The mark serialization functions.\n    */ marks){\n        this.nodes = nodes;\n        this.marks = marks;\n    }\n    /**\n    Serialize the content of this fragment to a DOM fragment. When\n    not in the browser, the `document` option, containing a DOM\n    document, should be passed so that the serializer can create\n    nodes.\n    */ serializeFragment(fragment, options = {}, target) {\n        if (!target) target = $0f7cdfd9537f6363$var$doc(options).createDocumentFragment();\n        let top = target, active = [];\n        fragment.forEach((node)=>{\n            if (active.length || node.marks.length) {\n                let keep = 0, rendered = 0;\n                while(keep < active.length && rendered < node.marks.length){\n                    let next = node.marks[rendered];\n                    if (!this.marks[next.type.name]) {\n                        rendered++;\n                        continue;\n                    }\n                    if (!next.eq(active[keep][0]) || next.type.spec.spanning === false) break;\n                    keep++;\n                    rendered++;\n                }\n                while(keep < active.length)top = active.pop()[1];\n                while(rendered < node.marks.length){\n                    let add = node.marks[rendered++];\n                    let markDOM = this.serializeMark(add, node.isInline, options);\n                    if (markDOM) {\n                        active.push([\n                            add,\n                            top\n                        ]);\n                        top.appendChild(markDOM.dom);\n                        top = markDOM.contentDOM || markDOM.dom;\n                    }\n                }\n            }\n            top.appendChild(this.serializeNodeInner(node, options));\n        });\n        return target;\n    }\n    /**\n    @internal\n    */ serializeNodeInner(node, options) {\n        if (node.isText) return $0f7cdfd9537f6363$var$doc(options).createTextNode(node.text);\n        let { dom: dom, contentDOM: contentDOM } = $0f7cdfd9537f6363$var$renderSpec($0f7cdfd9537f6363$var$doc(options), this.nodes[node.type.name](node), null, node.attrs);\n        if (contentDOM) {\n            if (node.isLeaf) throw new RangeError(\"Content hole not allowed in a leaf node spec\");\n            this.serializeFragment(node.content, options, contentDOM);\n        }\n        return dom;\n    }\n    /**\n    Serialize this node to a DOM node. This can be useful when you\n    need to serialize a part of a document, as opposed to the whole\n    document. To serialize a whole document, use\n    [`serializeFragment`](https://prosemirror.net/docs/ref/#model.DOMSerializer.serializeFragment) on\n    its [content](https://prosemirror.net/docs/ref/#model.Node.content).\n    */ serializeNode(node, options = {}) {\n        let dom = this.serializeNodeInner(node, options);\n        for(let i = node.marks.length - 1; i >= 0; i--){\n            let wrap = this.serializeMark(node.marks[i], node.isInline, options);\n            if (wrap) {\n                (wrap.contentDOM || wrap.dom).appendChild(dom);\n                dom = wrap.dom;\n            }\n        }\n        return dom;\n    }\n    /**\n    @internal\n    */ serializeMark(mark, inline, options = {}) {\n        let toDOM = this.marks[mark.type.name];\n        return toDOM && $0f7cdfd9537f6363$var$renderSpec($0f7cdfd9537f6363$var$doc(options), toDOM(mark, inline), null, mark.attrs);\n    }\n    static renderSpec(doc, structure, xmlNS = null, blockArraysIn) {\n        // Kludge for backwards-compatibility with accidental original behavious\n        if (typeof structure == \"string\") return {\n            dom: doc.createTextNode(structure)\n        };\n        return $0f7cdfd9537f6363$var$renderSpec(doc, structure, xmlNS, blockArraysIn);\n    }\n    /**\n    Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)\n    properties in a schema's node and mark specs.\n    */ static fromSchema(schema) {\n        return schema.cached.domSerializer || (schema.cached.domSerializer = new $0f7cdfd9537f6363$export$3476b78f8f5a8b72(this.nodesFromSchema(schema), this.marksFromSchema(schema)));\n    }\n    /**\n    Gather the serializers in a schema's node specs into an object.\n    This can be useful as a base to build a custom serializer from.\n    */ static nodesFromSchema(schema) {\n        let result = $0f7cdfd9537f6363$var$gatherToDOM(schema.nodes);\n        if (!result.text) result.text = (node)=>node.text;\n        return result;\n    }\n    /**\n    Gather the serializers in a schema's mark specs into an object.\n    */ static marksFromSchema(schema) {\n        return $0f7cdfd9537f6363$var$gatherToDOM(schema.marks);\n    }\n}\nfunction $0f7cdfd9537f6363$var$gatherToDOM(obj) {\n    let result = {};\n    for(let name in obj){\n        let toDOM = obj[name].spec.toDOM;\n        if (toDOM) result[name] = toDOM;\n    }\n    return result;\n}\nfunction $0f7cdfd9537f6363$var$doc(options) {\n    return options.document || window.document;\n}\nconst $0f7cdfd9537f6363$var$suspiciousAttributeCache = new WeakMap();\nfunction $0f7cdfd9537f6363$var$suspiciousAttributes(attrs) {\n    let value = $0f7cdfd9537f6363$var$suspiciousAttributeCache.get(attrs);\n    if (value === undefined) $0f7cdfd9537f6363$var$suspiciousAttributeCache.set(attrs, value = $0f7cdfd9537f6363$var$suspiciousAttributesInner(attrs));\n    return value;\n}\nfunction $0f7cdfd9537f6363$var$suspiciousAttributesInner(attrs) {\n    let result = null;\n    function scan(value) {\n        if (value && typeof value == \"object\") {\n            if (Array.isArray(value)) {\n                if (typeof value[0] == \"string\") {\n                    if (!result) result = [];\n                    result.push(value);\n                } else for(let i = 0; i < value.length; i++)scan(value[i]);\n            } else for(let prop in value)scan(value[prop]);\n        }\n    }\n    scan(attrs);\n    return result;\n}\nfunction $0f7cdfd9537f6363$var$renderSpec(doc, structure, xmlNS, blockArraysIn) {\n    if (structure.nodeType == 1) return {\n        dom: structure\n    };\n    if (structure.dom && structure.dom.nodeType == 1) return structure;\n    let tagName = structure[0], suspicious;\n    if (typeof tagName != \"string\") throw new RangeError(\"Invalid array passed to renderSpec\");\n    if (blockArraysIn && (suspicious = $0f7cdfd9537f6363$var$suspiciousAttributes(blockArraysIn)) && suspicious.indexOf(structure) > -1) throw new RangeError(\"Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.\");\n    let space = tagName.indexOf(\" \");\n    if (space > 0) {\n        xmlNS = tagName.slice(0, space);\n        tagName = tagName.slice(space + 1);\n    }\n    let contentDOM;\n    let dom = xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName);\n    let attrs = structure[1], start = 1;\n    if (attrs && typeof attrs == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n        start = 2;\n        for(let name in attrs)if (attrs[name] != null) {\n            let space = name.indexOf(\" \");\n            if (space > 0) dom.setAttributeNS(name.slice(0, space), name.slice(space + 1), attrs[name]);\n            else if (name == \"style\" && dom.style) dom.style.cssText = attrs[name];\n            else dom.setAttribute(name, attrs[name]);\n        }\n    }\n    for(let i = start; i < structure.length; i++){\n        let child = structure[i];\n        if (child === 0) {\n            if (i < structure.length - 1 || i > start) throw new RangeError(\"Content hole must be the only child of its parent node\");\n            return {\n                dom: dom,\n                contentDOM: dom\n            };\n        } else if (typeof child == \"string\") dom.appendChild(doc.createTextNode(child));\n        else {\n            let { dom: inner, contentDOM: innerContent } = $0f7cdfd9537f6363$var$renderSpec(doc, child, xmlNS, blockArraysIn);\n            dom.appendChild(inner);\n            if (innerContent) {\n                if (contentDOM) throw new RangeError(\"Multiple content holes\");\n                contentDOM = innerContent;\n            }\n        }\n    }\n    return {\n        dom: dom,\n        contentDOM: contentDOM\n    };\n}\n\n});\nparcelRegister(\"6ybul\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $4c4ed464a3187d83$export$2e2bcd8739ae039);\n// ::- Persistent data structure representing an ordered mapping from\n// strings to values, with some convenient update methods.\nfunction $4c4ed464a3187d83$var$OrderedMap(content) {\n    this.content = content;\n}\n$4c4ed464a3187d83$var$OrderedMap.prototype = {\n    constructor: $4c4ed464a3187d83$var$OrderedMap,\n    find: function(key) {\n        for(var i = 0; i < this.content.length; i += 2)if (this.content[i] === key) return i;\n        return -1;\n    },\n    // :: (string) → ?any\n    // Retrieve the value stored under `key`, or return undefined when\n    // no such key exists.\n    get: function(key) {\n        var found = this.find(key);\n        return found == -1 ? undefined : this.content[found + 1];\n    },\n    // :: (string, any, ?string) → OrderedMap\n    // Create a new map by replacing the value of `key` with a new\n    // value, or adding a binding to the end of the map. If `newKey` is\n    // given, the key of the binding will be replaced with that key.\n    update: function(key, value, newKey) {\n        var self = newKey && newKey != key ? this.remove(newKey) : this;\n        var found = self.find(key), content = self.content.slice();\n        if (found == -1) content.push(newKey || key, value);\n        else {\n            content[found + 1] = value;\n            if (newKey) content[found] = newKey;\n        }\n        return new $4c4ed464a3187d83$var$OrderedMap(content);\n    },\n    // :: (string) → OrderedMap\n    // Return a map with the given key removed, if it existed.\n    remove: function(key) {\n        var found = this.find(key);\n        if (found == -1) return this;\n        var content = this.content.slice();\n        content.splice(found, 2);\n        return new $4c4ed464a3187d83$var$OrderedMap(content);\n    },\n    // :: (string, any) → OrderedMap\n    // Add a new key to the start of the map.\n    addToStart: function(key, value) {\n        return new $4c4ed464a3187d83$var$OrderedMap([\n            key,\n            value\n        ].concat(this.remove(key).content));\n    },\n    // :: (string, any) → OrderedMap\n    // Add a new key to the end of the map.\n    addToEnd: function(key, value) {\n        var content = this.remove(key).content.slice();\n        content.push(key, value);\n        return new $4c4ed464a3187d83$var$OrderedMap(content);\n    },\n    // :: (string, string, any) → OrderedMap\n    // Add a key after the given key. If `place` is not found, the new\n    // key is added to the end.\n    addBefore: function(place, key, value) {\n        var without = this.remove(key), content = without.content.slice();\n        var found = without.find(place);\n        content.splice(found == -1 ? content.length : found, 0, key, value);\n        return new $4c4ed464a3187d83$var$OrderedMap(content);\n    },\n    // :: ((key: string, value: any))\n    // Call the given function for each key/value pair in the map, in\n    // order.\n    forEach: function(f) {\n        for(var i = 0; i < this.content.length; i += 2)f(this.content[i], this.content[i + 1]);\n    },\n    // :: (union<Object, OrderedMap>) → OrderedMap\n    // Create a new map by prepending the keys in this map that don't\n    // appear in `map` before the keys in `map`.\n    prepend: function(map) {\n        map = $4c4ed464a3187d83$var$OrderedMap.from(map);\n        if (!map.size) return this;\n        return new $4c4ed464a3187d83$var$OrderedMap(map.content.concat(this.subtract(map).content));\n    },\n    // :: (union<Object, OrderedMap>) → OrderedMap\n    // Create a new map by appending the keys in this map that don't\n    // appear in `map` after the keys in `map`.\n    append: function(map) {\n        map = $4c4ed464a3187d83$var$OrderedMap.from(map);\n        if (!map.size) return this;\n        return new $4c4ed464a3187d83$var$OrderedMap(this.subtract(map).content.concat(map.content));\n    },\n    // :: (union<Object, OrderedMap>) → OrderedMap\n    // Create a map containing all the keys in this map that don't\n    // appear in `map`.\n    subtract: function(map) {\n        var result = this;\n        map = $4c4ed464a3187d83$var$OrderedMap.from(map);\n        for(var i = 0; i < map.content.length; i += 2)result = result.remove(map.content[i]);\n        return result;\n    },\n    // :: () → Object\n    // Turn ordered map into a plain object.\n    toObject: function() {\n        var result = {};\n        this.forEach(function(key, value) {\n            result[key] = value;\n        });\n        return result;\n    },\n    // :: number\n    // The amount of keys in this map.\n    get size () {\n        return this.content.length >> 1;\n    }\n};\n// :: (?union<Object, OrderedMap>) → OrderedMap\n// Return a map with the given content. If null, create an empty\n// map. If given an ordered map, return that map itself. If given an\n// object, create a map from the object's properties.\n$4c4ed464a3187d83$var$OrderedMap.from = function(value) {\n    if (value instanceof $4c4ed464a3187d83$var$OrderedMap) return value;\n    var content = [];\n    if (value) for(var prop in value)content.push(prop, value[prop]);\n    return new $4c4ed464a3187d83$var$OrderedMap(content);\n};\nvar $4c4ed464a3187d83$export$2e2bcd8739ae039 = $4c4ed464a3187d83$var$OrderedMap;\n\n});\n\n\nparcelRegister(\"gfgdn\", function(module, exports) {\n\n$parcel$export(module.exports, \"Mapping\", () => $bd3a9ff77fa05947$export$f5f785078011b62);\n$parcel$export(module.exports, \"ReplaceStep\", () => $bd3a9ff77fa05947$export$5c860b2e74034756);\n$parcel$export(module.exports, \"ReplaceAroundStep\", () => $bd3a9ff77fa05947$export$444ba800d6024a98);\n$parcel$export(module.exports, \"liftTarget\", () => $bd3a9ff77fa05947$export$f1508b72cc76a09e);\n$parcel$export(module.exports, \"findWrapping\", () => $bd3a9ff77fa05947$export$118cb9a83e81ba37);\n$parcel$export(module.exports, \"canSplit\", () => $bd3a9ff77fa05947$export$5aaf008897aef029);\n$parcel$export(module.exports, \"canJoin\", () => $bd3a9ff77fa05947$export$f15f89fd9d8cc98a);\n$parcel$export(module.exports, \"joinPoint\", () => $bd3a9ff77fa05947$export$41b1d4cb5ceb3147);\n$parcel$export(module.exports, \"dropPoint\", () => $bd3a9ff77fa05947$export$2819d598d048fc9c);\n$parcel$export(module.exports, \"replaceStep\", () => $bd3a9ff77fa05947$export$ed6ac67359824afd);\n$parcel$export(module.exports, \"Transform\", () => $bd3a9ff77fa05947$export$563a914cafbdc389);\n\nvar $1krlL = parcelRequire(\"1krlL\");\n// Recovery values encode a range index and an offset. They are\n// represented as numbers, because tons of them will be created when\n// mapping, for example, a large number of decorations. The number's\n// lower 16 bits provide the index, the remaining bits the offset.\n//\n// Note: We intentionally don't use bit shift operators to en- and\n// decode these, since those clip to 32 bits, which we might in rare\n// cases want to overflow. A 64-bit float can represent 48-bit\n// integers precisely.\nconst $bd3a9ff77fa05947$var$lower16 = 0xffff;\nconst $bd3a9ff77fa05947$var$factor16 = Math.pow(2, 16);\nfunction $bd3a9ff77fa05947$var$makeRecover(index, offset) {\n    return index + offset * $bd3a9ff77fa05947$var$factor16;\n}\nfunction $bd3a9ff77fa05947$var$recoverIndex(value) {\n    return value & $bd3a9ff77fa05947$var$lower16;\n}\nfunction $bd3a9ff77fa05947$var$recoverOffset(value) {\n    return (value - (value & $bd3a9ff77fa05947$var$lower16)) / $bd3a9ff77fa05947$var$factor16;\n}\nconst $bd3a9ff77fa05947$var$DEL_BEFORE = 1, $bd3a9ff77fa05947$var$DEL_AFTER = 2, $bd3a9ff77fa05947$var$DEL_ACROSS = 4, $bd3a9ff77fa05947$var$DEL_SIDE = 8;\n/**\nAn object representing a mapped position with extra\ninformation.\n*/ class $bd3a9ff77fa05947$export$c77c9be41668e9b4 {\n    /**\n    @internal\n    */ constructor(/**\n    The mapped version of the position.\n    */ pos, /**\n    @internal\n    */ delInfo, /**\n    @internal\n    */ recover){\n        this.pos = pos;\n        this.delInfo = delInfo;\n        this.recover = recover;\n    }\n    /**\n    Tells you whether the position was deleted, that is, whether the\n    step removed the token on the side queried (via the `assoc`)\n    argument from the document.\n    */ get deleted() {\n        return (this.delInfo & $bd3a9ff77fa05947$var$DEL_SIDE) > 0;\n    }\n    /**\n    Tells you whether the token before the mapped position was deleted.\n    */ get deletedBefore() {\n        return (this.delInfo & ($bd3a9ff77fa05947$var$DEL_BEFORE | $bd3a9ff77fa05947$var$DEL_ACROSS)) > 0;\n    }\n    /**\n    True when the token after the mapped position was deleted.\n    */ get deletedAfter() {\n        return (this.delInfo & ($bd3a9ff77fa05947$var$DEL_AFTER | $bd3a9ff77fa05947$var$DEL_ACROSS)) > 0;\n    }\n    /**\n    Tells whether any of the steps mapped through deletes across the\n    position (including both the token before and after the\n    position).\n    */ get deletedAcross() {\n        return (this.delInfo & $bd3a9ff77fa05947$var$DEL_ACROSS) > 0;\n    }\n}\n/**\nA map describing the deletions and insertions made by a step, which\ncan be used to find the correspondence between positions in the\npre-step version of a document and the same position in the\npost-step version.\n*/ class $bd3a9ff77fa05947$export$c53d01c3ab9721b3 {\n    /**\n    Create a position map. The modifications to the document are\n    represented as an array of numbers, in which each group of three\n    represents a modified chunk as `[start, oldSize, newSize]`.\n    */ constructor(/**\n    @internal\n    */ ranges, /**\n    @internal\n    */ inverted = false){\n        this.ranges = ranges;\n        this.inverted = inverted;\n        if (!ranges.length && $bd3a9ff77fa05947$export$c53d01c3ab9721b3.empty) return $bd3a9ff77fa05947$export$c53d01c3ab9721b3.empty;\n    }\n    /**\n    @internal\n    */ recover(value) {\n        let diff = 0, index = $bd3a9ff77fa05947$var$recoverIndex(value);\n        if (!this.inverted) for(let i = 0; i < index; i++)diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];\n        return this.ranges[index * 3] + diff + $bd3a9ff77fa05947$var$recoverOffset(value);\n    }\n    mapResult(pos, assoc = 1) {\n        return this._map(pos, assoc, false);\n    }\n    map(pos, assoc = 1) {\n        return this._map(pos, assoc, true);\n    }\n    /**\n    @internal\n    */ _map(pos, assoc, simple) {\n        let diff = 0, oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n        for(let i = 0; i < this.ranges.length; i += 3){\n            let start = this.ranges[i] - (this.inverted ? diff : 0);\n            if (start > pos) break;\n            let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex], end = start + oldSize;\n            if (pos <= end) {\n                let side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;\n                let result = start + diff + (side < 0 ? 0 : newSize);\n                if (simple) return result;\n                let recover = pos == (assoc < 0 ? start : end) ? null : $bd3a9ff77fa05947$var$makeRecover(i / 3, pos - start);\n                let del = pos == start ? $bd3a9ff77fa05947$var$DEL_AFTER : pos == end ? $bd3a9ff77fa05947$var$DEL_BEFORE : $bd3a9ff77fa05947$var$DEL_ACROSS;\n                if (assoc < 0 ? pos != start : pos != end) del |= $bd3a9ff77fa05947$var$DEL_SIDE;\n                return new $bd3a9ff77fa05947$export$c77c9be41668e9b4(result, del, recover);\n            }\n            diff += newSize - oldSize;\n        }\n        return simple ? pos + diff : new $bd3a9ff77fa05947$export$c77c9be41668e9b4(pos + diff, 0, null);\n    }\n    /**\n    @internal\n    */ touches(pos, recover) {\n        let diff = 0, index = $bd3a9ff77fa05947$var$recoverIndex(recover);\n        let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n        for(let i = 0; i < this.ranges.length; i += 3){\n            let start = this.ranges[i] - (this.inverted ? diff : 0);\n            if (start > pos) break;\n            let oldSize = this.ranges[i + oldIndex], end = start + oldSize;\n            if (pos <= end && i == index * 3) return true;\n            diff += this.ranges[i + newIndex] - oldSize;\n        }\n        return false;\n    }\n    /**\n    Calls the given function on each of the changed ranges included in\n    this map.\n    */ forEach(f) {\n        let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n        for(let i = 0, diff = 0; i < this.ranges.length; i += 3){\n            let start = this.ranges[i], oldStart = start - (this.inverted ? diff : 0), newStart = start + (this.inverted ? 0 : diff);\n            let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex];\n            f(oldStart, oldStart + oldSize, newStart, newStart + newSize);\n            diff += newSize - oldSize;\n        }\n    }\n    /**\n    Create an inverted version of this map. The result can be used to\n    map positions in the post-step document to the pre-step document.\n    */ invert() {\n        return new $bd3a9ff77fa05947$export$c53d01c3ab9721b3(this.ranges, !this.inverted);\n    }\n    /**\n    @internal\n    */ toString() {\n        return (this.inverted ? \"-\" : \"\") + JSON.stringify(this.ranges);\n    }\n    /**\n    Create a map that moves all positions by offset `n` (which may be\n    negative). This can be useful when applying steps meant for a\n    sub-document to a larger document, or vice-versa.\n    */ static offset(n) {\n        return n == 0 ? $bd3a9ff77fa05947$export$c53d01c3ab9721b3.empty : new $bd3a9ff77fa05947$export$c53d01c3ab9721b3(n < 0 ? [\n            0,\n            -n,\n            0\n        ] : [\n            0,\n            0,\n            n\n        ]);\n    }\n}\n/**\nA StepMap that contains no changed ranges.\n*/ $bd3a9ff77fa05947$export$c53d01c3ab9721b3.empty = new $bd3a9ff77fa05947$export$c53d01c3ab9721b3([]);\n/**\nA mapping represents a pipeline of zero or more [step\nmaps](https://prosemirror.net/docs/ref/#transform.StepMap). It has special provisions for losslessly\nhandling mapping positions through a series of steps in which some\nsteps are inverted versions of earlier steps. (This comes up when\n‘[rebasing](/docs/guide/#transform.rebasing)’ steps for\ncollaboration or history management.)\n*/ class $bd3a9ff77fa05947$export$f5f785078011b62 {\n    /**\n    Create a new mapping with the given position maps.\n    */ constructor(/**\n    The step maps in this mapping.\n    */ maps = [], /**\n    @internal\n    */ mirror, /**\n    The starting position in the `maps` array, used when `map` or\n    `mapResult` is called.\n    */ from = 0, /**\n    The end position in the `maps` array.\n    */ to = maps.length){\n        this.maps = maps;\n        this.mirror = mirror;\n        this.from = from;\n        this.to = to;\n    }\n    /**\n    Create a mapping that maps only through a part of this one.\n    */ slice(from = 0, to = this.maps.length) {\n        return new $bd3a9ff77fa05947$export$f5f785078011b62(this.maps, this.mirror, from, to);\n    }\n    /**\n    @internal\n    */ copy() {\n        return new $bd3a9ff77fa05947$export$f5f785078011b62(this.maps.slice(), this.mirror && this.mirror.slice(), this.from, this.to);\n    }\n    /**\n    Add a step map to the end of this mapping. If `mirrors` is\n    given, it should be the index of the step map that is the mirror\n    image of this one.\n    */ appendMap(map, mirrors) {\n        this.to = this.maps.push(map);\n        if (mirrors != null) this.setMirror(this.maps.length - 1, mirrors);\n    }\n    /**\n    Add all the step maps in a given mapping to this one (preserving\n    mirroring information).\n    */ appendMapping(mapping) {\n        for(let i = 0, startSize = this.maps.length; i < mapping.maps.length; i++){\n            let mirr = mapping.getMirror(i);\n            this.appendMap(mapping.maps[i], mirr != null && mirr < i ? startSize + mirr : undefined);\n        }\n    }\n    /**\n    Finds the offset of the step map that mirrors the map at the\n    given offset, in this mapping (as per the second argument to\n    `appendMap`).\n    */ getMirror(n) {\n        if (this.mirror) {\n            for(let i = 0; i < this.mirror.length; i++)if (this.mirror[i] == n) return this.mirror[i + (i % 2 ? -1 : 1)];\n        }\n    }\n    /**\n    @internal\n    */ setMirror(n, m) {\n        if (!this.mirror) this.mirror = [];\n        this.mirror.push(n, m);\n    }\n    /**\n    Append the inverse of the given mapping to this one.\n    */ appendMappingInverted(mapping) {\n        for(let i = mapping.maps.length - 1, totalSize = this.maps.length + mapping.maps.length; i >= 0; i--){\n            let mirr = mapping.getMirror(i);\n            this.appendMap(mapping.maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : undefined);\n        }\n    }\n    /**\n    Create an inverted version of this mapping.\n    */ invert() {\n        let inverse = new $bd3a9ff77fa05947$export$f5f785078011b62;\n        inverse.appendMappingInverted(this);\n        return inverse;\n    }\n    /**\n    Map a position through this mapping.\n    */ map(pos, assoc = 1) {\n        if (this.mirror) return this._map(pos, assoc, true);\n        for(let i = this.from; i < this.to; i++)pos = this.maps[i].map(pos, assoc);\n        return pos;\n    }\n    /**\n    Map a position through this mapping, returning a mapping\n    result.\n    */ mapResult(pos, assoc = 1) {\n        return this._map(pos, assoc, false);\n    }\n    /**\n    @internal\n    */ _map(pos, assoc, simple) {\n        let delInfo = 0;\n        for(let i = this.from; i < this.to; i++){\n            let map = this.maps[i], result = map.mapResult(pos, assoc);\n            if (result.recover != null) {\n                let corr = this.getMirror(i);\n                if (corr != null && corr > i && corr < this.to) {\n                    i = corr;\n                    pos = this.maps[corr].recover(result.recover);\n                    continue;\n                }\n            }\n            delInfo |= result.delInfo;\n            pos = result.pos;\n        }\n        return simple ? pos : new $bd3a9ff77fa05947$export$c77c9be41668e9b4(pos, delInfo, null);\n    }\n}\nconst $bd3a9ff77fa05947$var$stepsByID = Object.create(null);\n/**\nA step object represents an atomic change. It generally applies\nonly to the document it was created for, since the positions\nstored in it will only make sense for that document.\n\nNew steps are defined by creating classes that extend `Step`,\noverriding the `apply`, `invert`, `map`, `getMap` and `fromJSON`\nmethods, and registering your class with a unique\nJSON-serialization identifier using\n[`Step.jsonID`](https://prosemirror.net/docs/ref/#transform.Step^jsonID).\n*/ class $bd3a9ff77fa05947$export$fd55ce593607084a {\n    /**\n    Get the step map that represents the changes made by this step,\n    and which can be used to transform between positions in the old\n    and the new document.\n    */ getMap() {\n        return $bd3a9ff77fa05947$export$c53d01c3ab9721b3.empty;\n    }\n    /**\n    Try to merge this step with another one, to be applied directly\n    after it. Returns the merged step when possible, null if the\n    steps can't be merged.\n    */ merge(other) {\n        return null;\n    }\n    /**\n    Deserialize a step from its JSON representation. Will call\n    through to the step class' own implementation of this method.\n    */ static fromJSON(schema, json) {\n        if (!json || !json.stepType) throw new RangeError(\"Invalid input for Step.fromJSON\");\n        let type = $bd3a9ff77fa05947$var$stepsByID[json.stepType];\n        if (!type) throw new RangeError(`No step type ${json.stepType} defined`);\n        return type.fromJSON(schema, json);\n    }\n    /**\n    To be able to serialize steps to JSON, each step needs a string\n    ID to attach to its JSON representation. Use this method to\n    register an ID for your step classes. Try to pick something\n    that's unlikely to clash with steps from other modules.\n    */ static jsonID(id, stepClass) {\n        if (id in $bd3a9ff77fa05947$var$stepsByID) throw new RangeError(\"Duplicate use of step JSON ID \" + id);\n        $bd3a9ff77fa05947$var$stepsByID[id] = stepClass;\n        stepClass.prototype.jsonID = id;\n        return stepClass;\n    }\n}\n/**\nThe result of [applying](https://prosemirror.net/docs/ref/#transform.Step.apply) a step. Contains either a\nnew document or a failure value.\n*/ class $bd3a9ff77fa05947$export$8ebf1578a4199c09 {\n    /**\n    @internal\n    */ constructor(/**\n    The transformed document, if successful.\n    */ doc, /**\n    The failure message, if unsuccessful.\n    */ failed){\n        this.doc = doc;\n        this.failed = failed;\n    }\n    /**\n    Create a successful step result.\n    */ static ok(doc) {\n        return new $bd3a9ff77fa05947$export$8ebf1578a4199c09(doc, null);\n    }\n    /**\n    Create a failed step result.\n    */ static fail(message) {\n        return new $bd3a9ff77fa05947$export$8ebf1578a4199c09(null, message);\n    }\n    /**\n    Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given\n    arguments. Create a successful result if it succeeds, and a\n    failed one if it throws a `ReplaceError`.\n    */ static fromReplace(doc, from, to, slice) {\n        try {\n            return $bd3a9ff77fa05947$export$8ebf1578a4199c09.ok(doc.replace(from, to, slice));\n        } catch (e) {\n            if (e instanceof (0, $1krlL.ReplaceError)) return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fail(e.message);\n            throw e;\n        }\n    }\n}\nfunction $bd3a9ff77fa05947$var$mapFragment(fragment, f, parent) {\n    let mapped = [];\n    for(let i = 0; i < fragment.childCount; i++){\n        let child = fragment.child(i);\n        if (child.content.size) child = child.copy($bd3a9ff77fa05947$var$mapFragment(child.content, f, child));\n        if (child.isInline) child = f(child, parent, i);\n        mapped.push(child);\n    }\n    return (0, $1krlL.Fragment).fromArray(mapped);\n}\n/**\nAdd a mark to all inline content between two positions.\n*/ class $bd3a9ff77fa05947$export$d24ba56b0e3464a9 extends $bd3a9ff77fa05947$export$fd55ce593607084a {\n    /**\n    Create a mark step.\n    */ constructor(/**\n    The start of the marked range.\n    */ from, /**\n    The end of the marked range.\n    */ to, /**\n    The mark to add.\n    */ mark){\n        super();\n        this.from = from;\n        this.to = to;\n        this.mark = mark;\n    }\n    apply(doc) {\n        let oldSlice = doc.slice(this.from, this.to), $from = doc.resolve(this.from);\n        let parent = $from.node($from.sharedDepth(this.to));\n        let slice = new (0, $1krlL.Slice)($bd3a9ff77fa05947$var$mapFragment(oldSlice.content, (node, parent)=>{\n            if (!node.isAtom || !parent.type.allowsMarkType(this.mark.type)) return node;\n            return node.mark(this.mark.addToSet(node.marks));\n        }, parent), oldSlice.openStart, oldSlice.openEnd);\n        return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fromReplace(doc, this.from, this.to, slice);\n    }\n    invert() {\n        return new $bd3a9ff77fa05947$export$94150db1311f67a9(this.from, this.to, this.mark);\n    }\n    map(mapping) {\n        let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n        if (from.deleted && to.deleted || from.pos >= to.pos) return null;\n        return new $bd3a9ff77fa05947$export$d24ba56b0e3464a9(from.pos, to.pos, this.mark);\n    }\n    merge(other) {\n        if (other instanceof $bd3a9ff77fa05947$export$d24ba56b0e3464a9 && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) return new $bd3a9ff77fa05947$export$d24ba56b0e3464a9(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n        return null;\n    }\n    toJSON() {\n        return {\n            stepType: \"addMark\",\n            mark: this.mark.toJSON(),\n            from: this.from,\n            to: this.to\n        };\n    }\n    /**\n    @internal\n    */ static fromJSON(schema, json) {\n        if (typeof json.from != \"number\" || typeof json.to != \"number\") throw new RangeError(\"Invalid input for AddMarkStep.fromJSON\");\n        return new $bd3a9ff77fa05947$export$d24ba56b0e3464a9(json.from, json.to, schema.markFromJSON(json.mark));\n    }\n}\n$bd3a9ff77fa05947$export$fd55ce593607084a.jsonID(\"addMark\", $bd3a9ff77fa05947$export$d24ba56b0e3464a9);\n/**\nRemove a mark from all inline content between two positions.\n*/ class $bd3a9ff77fa05947$export$94150db1311f67a9 extends $bd3a9ff77fa05947$export$fd55ce593607084a {\n    /**\n    Create a mark-removing step.\n    */ constructor(/**\n    The start of the unmarked range.\n    */ from, /**\n    The end of the unmarked range.\n    */ to, /**\n    The mark to remove.\n    */ mark){\n        super();\n        this.from = from;\n        this.to = to;\n        this.mark = mark;\n    }\n    apply(doc) {\n        let oldSlice = doc.slice(this.from, this.to);\n        let slice = new (0, $1krlL.Slice)($bd3a9ff77fa05947$var$mapFragment(oldSlice.content, (node)=>{\n            return node.mark(this.mark.removeFromSet(node.marks));\n        }, doc), oldSlice.openStart, oldSlice.openEnd);\n        return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fromReplace(doc, this.from, this.to, slice);\n    }\n    invert() {\n        return new $bd3a9ff77fa05947$export$d24ba56b0e3464a9(this.from, this.to, this.mark);\n    }\n    map(mapping) {\n        let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n        if (from.deleted && to.deleted || from.pos >= to.pos) return null;\n        return new $bd3a9ff77fa05947$export$94150db1311f67a9(from.pos, to.pos, this.mark);\n    }\n    merge(other) {\n        if (other instanceof $bd3a9ff77fa05947$export$94150db1311f67a9 && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) return new $bd3a9ff77fa05947$export$94150db1311f67a9(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n        return null;\n    }\n    toJSON() {\n        return {\n            stepType: \"removeMark\",\n            mark: this.mark.toJSON(),\n            from: this.from,\n            to: this.to\n        };\n    }\n    /**\n    @internal\n    */ static fromJSON(schema, json) {\n        if (typeof json.from != \"number\" || typeof json.to != \"number\") throw new RangeError(\"Invalid input for RemoveMarkStep.fromJSON\");\n        return new $bd3a9ff77fa05947$export$94150db1311f67a9(json.from, json.to, schema.markFromJSON(json.mark));\n    }\n}\n$bd3a9ff77fa05947$export$fd55ce593607084a.jsonID(\"removeMark\", $bd3a9ff77fa05947$export$94150db1311f67a9);\n/**\nAdd a mark to a specific node.\n*/ class $bd3a9ff77fa05947$export$adefd16c402fee4e extends $bd3a9ff77fa05947$export$fd55ce593607084a {\n    /**\n    Create a node mark step.\n    */ constructor(/**\n    The position of the target node.\n    */ pos, /**\n    The mark to add.\n    */ mark){\n        super();\n        this.pos = pos;\n        this.mark = mark;\n    }\n    apply(doc) {\n        let node = doc.nodeAt(this.pos);\n        if (!node) return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fail(\"No node at mark step's position\");\n        let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));\n        return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fromReplace(doc, this.pos, this.pos + 1, new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(updated), 0, node.isLeaf ? 0 : 1));\n    }\n    invert(doc) {\n        let node = doc.nodeAt(this.pos);\n        if (node) {\n            let newSet = this.mark.addToSet(node.marks);\n            if (newSet.length == node.marks.length) {\n                for(let i = 0; i < node.marks.length; i++)if (!node.marks[i].isInSet(newSet)) return new $bd3a9ff77fa05947$export$adefd16c402fee4e(this.pos, node.marks[i]);\n                return new $bd3a9ff77fa05947$export$adefd16c402fee4e(this.pos, this.mark);\n            }\n        }\n        return new $bd3a9ff77fa05947$export$fdf7d1dc10724da2(this.pos, this.mark);\n    }\n    map(mapping) {\n        let pos = mapping.mapResult(this.pos, 1);\n        return pos.deletedAfter ? null : new $bd3a9ff77fa05947$export$adefd16c402fee4e(pos.pos, this.mark);\n    }\n    toJSON() {\n        return {\n            stepType: \"addNodeMark\",\n            pos: this.pos,\n            mark: this.mark.toJSON()\n        };\n    }\n    /**\n    @internal\n    */ static fromJSON(schema, json) {\n        if (typeof json.pos != \"number\") throw new RangeError(\"Invalid input for AddNodeMarkStep.fromJSON\");\n        return new $bd3a9ff77fa05947$export$adefd16c402fee4e(json.pos, schema.markFromJSON(json.mark));\n    }\n}\n$bd3a9ff77fa05947$export$fd55ce593607084a.jsonID(\"addNodeMark\", $bd3a9ff77fa05947$export$adefd16c402fee4e);\n/**\nRemove a mark from a specific node.\n*/ class $bd3a9ff77fa05947$export$fdf7d1dc10724da2 extends $bd3a9ff77fa05947$export$fd55ce593607084a {\n    /**\n    Create a mark-removing step.\n    */ constructor(/**\n    The position of the target node.\n    */ pos, /**\n    The mark to remove.\n    */ mark){\n        super();\n        this.pos = pos;\n        this.mark = mark;\n    }\n    apply(doc) {\n        let node = doc.nodeAt(this.pos);\n        if (!node) return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fail(\"No node at mark step's position\");\n        let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));\n        return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fromReplace(doc, this.pos, this.pos + 1, new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(updated), 0, node.isLeaf ? 0 : 1));\n    }\n    invert(doc) {\n        let node = doc.nodeAt(this.pos);\n        if (!node || !this.mark.isInSet(node.marks)) return this;\n        return new $bd3a9ff77fa05947$export$adefd16c402fee4e(this.pos, this.mark);\n    }\n    map(mapping) {\n        let pos = mapping.mapResult(this.pos, 1);\n        return pos.deletedAfter ? null : new $bd3a9ff77fa05947$export$fdf7d1dc10724da2(pos.pos, this.mark);\n    }\n    toJSON() {\n        return {\n            stepType: \"removeNodeMark\",\n            pos: this.pos,\n            mark: this.mark.toJSON()\n        };\n    }\n    /**\n    @internal\n    */ static fromJSON(schema, json) {\n        if (typeof json.pos != \"number\") throw new RangeError(\"Invalid input for RemoveNodeMarkStep.fromJSON\");\n        return new $bd3a9ff77fa05947$export$fdf7d1dc10724da2(json.pos, schema.markFromJSON(json.mark));\n    }\n}\n$bd3a9ff77fa05947$export$fd55ce593607084a.jsonID(\"removeNodeMark\", $bd3a9ff77fa05947$export$fdf7d1dc10724da2);\n/**\nReplace a part of the document with a slice of new content.\n*/ class $bd3a9ff77fa05947$export$5c860b2e74034756 extends $bd3a9ff77fa05947$export$fd55ce593607084a {\n    /**\n    The given `slice` should fit the 'gap' between `from` and\n    `to`—the depths must line up, and the surrounding nodes must be\n    able to be joined with the open sides of the slice. When\n    `structure` is true, the step will fail if the content between\n    from and to is not just a sequence of closing and then opening\n    tokens (this is to guard against rebased replace steps\n    overwriting something they weren't supposed to).\n    */ constructor(/**\n    The start position of the replaced range.\n    */ from, /**\n    The end position of the replaced range.\n    */ to, /**\n    The slice to insert.\n    */ slice, /**\n    @internal\n    */ structure = false){\n        super();\n        this.from = from;\n        this.to = to;\n        this.slice = slice;\n        this.structure = structure;\n    }\n    apply(doc) {\n        if (this.structure && $bd3a9ff77fa05947$var$contentBetween(doc, this.from, this.to)) return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fail(\"Structure replace would overwrite content\");\n        return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fromReplace(doc, this.from, this.to, this.slice);\n    }\n    getMap() {\n        return new $bd3a9ff77fa05947$export$c53d01c3ab9721b3([\n            this.from,\n            this.to - this.from,\n            this.slice.size\n        ]);\n    }\n    invert(doc) {\n        return new $bd3a9ff77fa05947$export$5c860b2e74034756(this.from, this.from + this.slice.size, doc.slice(this.from, this.to));\n    }\n    map(mapping) {\n        let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n        if (from.deletedAcross && to.deletedAcross) return null;\n        return new $bd3a9ff77fa05947$export$5c860b2e74034756(from.pos, Math.max(from.pos, to.pos), this.slice);\n    }\n    merge(other) {\n        if (!(other instanceof $bd3a9ff77fa05947$export$5c860b2e74034756) || other.structure || this.structure) return null;\n        if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {\n            let slice = this.slice.size + other.slice.size == 0 ? (0, $1krlL.Slice).empty : new (0, $1krlL.Slice)(this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);\n            return new $bd3a9ff77fa05947$export$5c860b2e74034756(this.from, this.to + (other.to - other.from), slice, this.structure);\n        } else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {\n            let slice = this.slice.size + other.slice.size == 0 ? (0, $1krlL.Slice).empty : new (0, $1krlL.Slice)(other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);\n            return new $bd3a9ff77fa05947$export$5c860b2e74034756(other.from, this.to, slice, this.structure);\n        } else return null;\n    }\n    toJSON() {\n        let json = {\n            stepType: \"replace\",\n            from: this.from,\n            to: this.to\n        };\n        if (this.slice.size) json.slice = this.slice.toJSON();\n        if (this.structure) json.structure = true;\n        return json;\n    }\n    /**\n    @internal\n    */ static fromJSON(schema, json) {\n        if (typeof json.from != \"number\" || typeof json.to != \"number\") throw new RangeError(\"Invalid input for ReplaceStep.fromJSON\");\n        return new $bd3a9ff77fa05947$export$5c860b2e74034756(json.from, json.to, (0, $1krlL.Slice).fromJSON(schema, json.slice), !!json.structure);\n    }\n}\n$bd3a9ff77fa05947$export$fd55ce593607084a.jsonID(\"replace\", $bd3a9ff77fa05947$export$5c860b2e74034756);\n/**\nReplace a part of the document with a slice of content, but\npreserve a range of the replaced content by moving it into the\nslice.\n*/ class $bd3a9ff77fa05947$export$444ba800d6024a98 extends $bd3a9ff77fa05947$export$fd55ce593607084a {\n    /**\n    Create a replace-around step with the given range and gap.\n    `insert` should be the point in the slice into which the content\n    of the gap should be moved. `structure` has the same meaning as\n    it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class.\n    */ constructor(/**\n    The start position of the replaced range.\n    */ from, /**\n    The end position of the replaced range.\n    */ to, /**\n    The start of preserved range.\n    */ gapFrom, /**\n    The end of preserved range.\n    */ gapTo, /**\n    The slice to insert.\n    */ slice, /**\n    The position in the slice where the preserved range should be\n    inserted.\n    */ insert, /**\n    @internal\n    */ structure = false){\n        super();\n        this.from = from;\n        this.to = to;\n        this.gapFrom = gapFrom;\n        this.gapTo = gapTo;\n        this.slice = slice;\n        this.insert = insert;\n        this.structure = structure;\n    }\n    apply(doc) {\n        if (this.structure && ($bd3a9ff77fa05947$var$contentBetween(doc, this.from, this.gapFrom) || $bd3a9ff77fa05947$var$contentBetween(doc, this.gapTo, this.to))) return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fail(\"Structure gap-replace would overwrite content\");\n        let gap = doc.slice(this.gapFrom, this.gapTo);\n        if (gap.openStart || gap.openEnd) return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fail(\"Gap is not a flat range\");\n        let inserted = this.slice.insertAt(this.insert, gap.content);\n        if (!inserted) return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fail(\"Content does not fit in gap\");\n        return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fromReplace(doc, this.from, this.to, inserted);\n    }\n    getMap() {\n        return new $bd3a9ff77fa05947$export$c53d01c3ab9721b3([\n            this.from,\n            this.gapFrom - this.from,\n            this.insert,\n            this.gapTo,\n            this.to - this.gapTo,\n            this.slice.size - this.insert\n        ]);\n    }\n    invert(doc) {\n        let gap = this.gapTo - this.gapFrom;\n        return new $bd3a9ff77fa05947$export$444ba800d6024a98(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);\n    }\n    map(mapping) {\n        let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n        let gapFrom = this.from == this.gapFrom ? from.pos : mapping.map(this.gapFrom, -1);\n        let gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1);\n        if (from.deletedAcross && to.deletedAcross || gapFrom < from.pos || gapTo > to.pos) return null;\n        return new $bd3a9ff77fa05947$export$444ba800d6024a98(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);\n    }\n    toJSON() {\n        let json = {\n            stepType: \"replaceAround\",\n            from: this.from,\n            to: this.to,\n            gapFrom: this.gapFrom,\n            gapTo: this.gapTo,\n            insert: this.insert\n        };\n        if (this.slice.size) json.slice = this.slice.toJSON();\n        if (this.structure) json.structure = true;\n        return json;\n    }\n    /**\n    @internal\n    */ static fromJSON(schema, json) {\n        if (typeof json.from != \"number\" || typeof json.to != \"number\" || typeof json.gapFrom != \"number\" || typeof json.gapTo != \"number\" || typeof json.insert != \"number\") throw new RangeError(\"Invalid input for ReplaceAroundStep.fromJSON\");\n        return new $bd3a9ff77fa05947$export$444ba800d6024a98(json.from, json.to, json.gapFrom, json.gapTo, (0, $1krlL.Slice).fromJSON(schema, json.slice), json.insert, !!json.structure);\n    }\n}\n$bd3a9ff77fa05947$export$fd55ce593607084a.jsonID(\"replaceAround\", $bd3a9ff77fa05947$export$444ba800d6024a98);\nfunction $bd3a9ff77fa05947$var$contentBetween(doc, from, to) {\n    let $from = doc.resolve(from), dist = to - from, depth = $from.depth;\n    while(dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount){\n        depth--;\n        dist--;\n    }\n    if (dist > 0) {\n        let next = $from.node(depth).maybeChild($from.indexAfter(depth));\n        while(dist > 0){\n            if (!next || next.isLeaf) return true;\n            next = next.firstChild;\n            dist--;\n        }\n    }\n    return false;\n}\nfunction $bd3a9ff77fa05947$var$addMark(tr, from, to, mark) {\n    let removed = [], added = [];\n    let removing, adding;\n    tr.doc.nodesBetween(from, to, (node, pos, parent)=>{\n        if (!node.isInline) return;\n        let marks = node.marks;\n        if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {\n            let start = Math.max(pos, from), end = Math.min(pos + node.nodeSize, to);\n            let newSet = mark.addToSet(marks);\n            for(let i = 0; i < marks.length; i++)if (!marks[i].isInSet(newSet)) {\n                if (removing && removing.to == start && removing.mark.eq(marks[i])) removing.to = end;\n                else removed.push(removing = new $bd3a9ff77fa05947$export$94150db1311f67a9(start, end, marks[i]));\n            }\n            if (adding && adding.to == start) adding.to = end;\n            else added.push(adding = new $bd3a9ff77fa05947$export$d24ba56b0e3464a9(start, end, mark));\n        }\n    });\n    removed.forEach((s)=>tr.step(s));\n    added.forEach((s)=>tr.step(s));\n}\nfunction $bd3a9ff77fa05947$var$removeMark(tr, from, to, mark) {\n    let matched = [], step = 0;\n    tr.doc.nodesBetween(from, to, (node, pos)=>{\n        if (!node.isInline) return;\n        step++;\n        let toRemove = null;\n        if (mark instanceof (0, $1krlL.MarkType)) {\n            let set = node.marks, found;\n            while(found = mark.isInSet(set)){\n                (toRemove || (toRemove = [])).push(found);\n                set = found.removeFromSet(set);\n            }\n        } else if (mark) {\n            if (mark.isInSet(node.marks)) toRemove = [\n                mark\n            ];\n        } else toRemove = node.marks;\n        if (toRemove && toRemove.length) {\n            let end = Math.min(pos + node.nodeSize, to);\n            for(let i = 0; i < toRemove.length; i++){\n                let style = toRemove[i], found;\n                for(let j = 0; j < matched.length; j++){\n                    let m = matched[j];\n                    if (m.step == step - 1 && style.eq(matched[j].style)) found = m;\n                }\n                if (found) {\n                    found.to = end;\n                    found.step = step;\n                } else matched.push({\n                    style: style,\n                    from: Math.max(pos, from),\n                    to: end,\n                    step: step\n                });\n            }\n        }\n    });\n    matched.forEach((m)=>tr.step(new $bd3a9ff77fa05947$export$94150db1311f67a9(m.from, m.to, m.style)));\n}\nfunction $bd3a9ff77fa05947$var$clearIncompatible(tr, pos, parentType, match = parentType.contentMatch, clearNewlines = true) {\n    let node = tr.doc.nodeAt(pos);\n    let replSteps = [], cur = pos + 1;\n    for(let i = 0; i < node.childCount; i++){\n        let child = node.child(i), end = cur + child.nodeSize;\n        let allowed = match.matchType(child.type);\n        if (!allowed) replSteps.push(new $bd3a9ff77fa05947$export$5c860b2e74034756(cur, end, (0, $1krlL.Slice).empty));\n        else {\n            match = allowed;\n            for(let j = 0; j < child.marks.length; j++)if (!parentType.allowsMarkType(child.marks[j].type)) tr.step(new $bd3a9ff77fa05947$export$94150db1311f67a9(cur, end, child.marks[j]));\n            if (clearNewlines && child.isText && parentType.whitespace != \"pre\") {\n                let m, newline = /\\r?\\n|\\r/g, slice;\n                while(m = newline.exec(child.text)){\n                    if (!slice) slice = new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(parentType.schema.text(\" \", parentType.allowedMarks(child.marks))), 0, 0);\n                    replSteps.push(new $bd3a9ff77fa05947$export$5c860b2e74034756(cur + m.index, cur + m.index + m[0].length, slice));\n                }\n            }\n        }\n        cur = end;\n    }\n    if (!match.validEnd) {\n        let fill = match.fillBefore((0, $1krlL.Fragment).empty, true);\n        tr.replace(cur, cur, new (0, $1krlL.Slice)(fill, 0, 0));\n    }\n    for(let i = replSteps.length - 1; i >= 0; i--)tr.step(replSteps[i]);\n}\nfunction $bd3a9ff77fa05947$var$canCut(node, start, end) {\n    return (start == 0 || node.canReplace(start, node.childCount)) && (end == node.childCount || node.canReplace(0, end));\n}\n/**\nTry to find a target depth to which the content in the given range\ncan be lifted. Will not go across\n[isolating](https://prosemirror.net/docs/ref/#model.NodeSpec.isolating) parent nodes.\n*/ function $bd3a9ff77fa05947$export$f1508b72cc76a09e(range) {\n    let parent = range.parent;\n    let content = parent.content.cutByIndex(range.startIndex, range.endIndex);\n    for(let depth = range.depth;; --depth){\n        let node = range.$from.node(depth);\n        let index = range.$from.index(depth), endIndex = range.$to.indexAfter(depth);\n        if (depth < range.depth && node.canReplace(index, endIndex, content)) return depth;\n        if (depth == 0 || node.type.spec.isolating || !$bd3a9ff77fa05947$var$canCut(node, index, endIndex)) break;\n    }\n    return null;\n}\nfunction $bd3a9ff77fa05947$var$lift(tr, range, target) {\n    let { $from: $from, $to: $to, depth: depth } = range;\n    let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);\n    let start = gapStart, end = gapEnd;\n    let before = (0, $1krlL.Fragment).empty, openStart = 0;\n    for(let d = depth, splitting = false; d > target; d--)if (splitting || $from.index(d) > 0) {\n        splitting = true;\n        before = (0, $1krlL.Fragment).from($from.node(d).copy(before));\n        openStart++;\n    } else start--;\n    let after = (0, $1krlL.Fragment).empty, openEnd = 0;\n    for(let d = depth, splitting = false; d > target; d--)if (splitting || $to.after(d + 1) < $to.end(d)) {\n        splitting = true;\n        after = (0, $1krlL.Fragment).from($to.node(d).copy(after));\n        openEnd++;\n    } else end++;\n    tr.step(new $bd3a9ff77fa05947$export$444ba800d6024a98(start, end, gapStart, gapEnd, new (0, $1krlL.Slice)(before.append(after), openStart, openEnd), before.size - openStart, true));\n}\n/**\nTry to find a valid way to wrap the content in the given range in a\nnode of the given type. May introduce extra nodes around and inside\nthe wrapper node, if necessary. Returns null if no valid wrapping\ncould be found. When `innerRange` is given, that range's content is\nused as the content to fit into the wrapping, instead of the\ncontent of `range`.\n*/ function $bd3a9ff77fa05947$export$118cb9a83e81ba37(range, nodeType, attrs = null, innerRange = range) {\n    let around = $bd3a9ff77fa05947$var$findWrappingOutside(range, nodeType);\n    let inner = around && $bd3a9ff77fa05947$var$findWrappingInside(innerRange, nodeType);\n    if (!inner) return null;\n    return around.map($bd3a9ff77fa05947$var$withAttrs).concat({\n        type: nodeType,\n        attrs: attrs\n    }).concat(inner.map($bd3a9ff77fa05947$var$withAttrs));\n}\nfunction $bd3a9ff77fa05947$var$withAttrs(type) {\n    return {\n        type: type,\n        attrs: null\n    };\n}\nfunction $bd3a9ff77fa05947$var$findWrappingOutside(range, type) {\n    let { parent: parent, startIndex: startIndex, endIndex: endIndex } = range;\n    let around = parent.contentMatchAt(startIndex).findWrapping(type);\n    if (!around) return null;\n    let outer = around.length ? around[0] : type;\n    return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;\n}\nfunction $bd3a9ff77fa05947$var$findWrappingInside(range, type) {\n    let { parent: parent, startIndex: startIndex, endIndex: endIndex } = range;\n    let inner = parent.child(startIndex);\n    let inside = type.contentMatch.findWrapping(inner.type);\n    if (!inside) return null;\n    let lastType = inside.length ? inside[inside.length - 1] : type;\n    let innerMatch = lastType.contentMatch;\n    for(let i = startIndex; innerMatch && i < endIndex; i++)innerMatch = innerMatch.matchType(parent.child(i).type);\n    if (!innerMatch || !innerMatch.validEnd) return null;\n    return inside;\n}\nfunction $bd3a9ff77fa05947$var$wrap(tr, range, wrappers) {\n    let content = (0, $1krlL.Fragment).empty;\n    for(let i = wrappers.length - 1; i >= 0; i--){\n        if (content.size) {\n            let match = wrappers[i].type.contentMatch.matchFragment(content);\n            if (!match || !match.validEnd) throw new RangeError(\"Wrapper type given to Transform.wrap does not form valid content of its parent wrapper\");\n        }\n        content = (0, $1krlL.Fragment).from(wrappers[i].type.create(wrappers[i].attrs, content));\n    }\n    let start = range.start, end = range.end;\n    tr.step(new $bd3a9ff77fa05947$export$444ba800d6024a98(start, end, start, end, new (0, $1krlL.Slice)(content, 0, 0), wrappers.length, true));\n}\nfunction $bd3a9ff77fa05947$var$setBlockType(tr, from, to, type, attrs) {\n    if (!type.isTextblock) throw new RangeError(\"Type given to setBlockType should be a textblock\");\n    let mapFrom = tr.steps.length;\n    tr.doc.nodesBetween(from, to, (node, pos)=>{\n        let attrsHere = typeof attrs == \"function\" ? attrs(node) : attrs;\n        if (node.isTextblock && !node.hasMarkup(type, attrsHere) && $bd3a9ff77fa05947$var$canChangeType(tr.doc, tr.mapping.slice(mapFrom).map(pos), type)) {\n            let convertNewlines = null;\n            if (type.schema.linebreakReplacement) {\n                let pre = type.whitespace == \"pre\", supportLinebreak = !!type.contentMatch.matchType(type.schema.linebreakReplacement);\n                if (pre && !supportLinebreak) convertNewlines = false;\n                else if (!pre && supportLinebreak) convertNewlines = true;\n            }\n            // Ensure all markup that isn't allowed in the new node type is cleared\n            if (convertNewlines === false) $bd3a9ff77fa05947$var$replaceLinebreaks(tr, node, pos, mapFrom);\n            $bd3a9ff77fa05947$var$clearIncompatible(tr, tr.mapping.slice(mapFrom).map(pos, 1), type, undefined, convertNewlines === null);\n            let mapping = tr.mapping.slice(mapFrom);\n            let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);\n            tr.step(new $bd3a9ff77fa05947$export$444ba800d6024a98(startM, endM, startM + 1, endM - 1, new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));\n            if (convertNewlines === true) $bd3a9ff77fa05947$var$replaceNewlines(tr, node, pos, mapFrom);\n            return false;\n        }\n    });\n}\nfunction $bd3a9ff77fa05947$var$replaceNewlines(tr, node, pos, mapFrom) {\n    node.forEach((child, offset)=>{\n        if (child.isText) {\n            let m, newline = /\\r?\\n|\\r/g;\n            while(m = newline.exec(child.text)){\n                let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset + m.index);\n                tr.replaceWith(start, start + 1, node.type.schema.linebreakReplacement.create());\n            }\n        }\n    });\n}\nfunction $bd3a9ff77fa05947$var$replaceLinebreaks(tr, node, pos, mapFrom) {\n    node.forEach((child, offset)=>{\n        if (child.type == child.type.schema.linebreakReplacement) {\n            let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset);\n            tr.replaceWith(start, start + 1, node.type.schema.text(\"\\n\"));\n        }\n    });\n}\nfunction $bd3a9ff77fa05947$var$canChangeType(doc, pos, type) {\n    let $pos = doc.resolve(pos), index = $pos.index();\n    return $pos.parent.canReplaceWith(index, index + 1, type);\n}\n/**\nChange the type, attributes, and/or marks of the node at `pos`.\nWhen `type` isn't given, the existing node type is preserved,\n*/ function $bd3a9ff77fa05947$var$setNodeMarkup(tr, pos, type, attrs, marks) {\n    let node = tr.doc.nodeAt(pos);\n    if (!node) throw new RangeError(\"No node at given position\");\n    if (!type) type = node.type;\n    let newNode = type.create(attrs, null, marks || node.marks);\n    if (node.isLeaf) return tr.replaceWith(pos, pos + node.nodeSize, newNode);\n    if (!type.validContent(node.content)) throw new RangeError(\"Invalid content for node type \" + type.name);\n    tr.step(new $bd3a9ff77fa05947$export$444ba800d6024a98(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(newNode), 0, 0), 1, true));\n}\n/**\nCheck whether splitting at the given position is allowed.\n*/ function $bd3a9ff77fa05947$export$5aaf008897aef029(doc, pos, depth = 1, typesAfter) {\n    let $pos = doc.resolve(pos), base = $pos.depth - depth;\n    let innerType = typesAfter && typesAfter[typesAfter.length - 1] || $pos.parent;\n    if (base < 0 || $pos.parent.type.spec.isolating || !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) || !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount))) return false;\n    for(let d = $pos.depth - 1, i = depth - 2; d > base; d--, i--){\n        let node = $pos.node(d), index = $pos.index(d);\n        if (node.type.spec.isolating) return false;\n        let rest = node.content.cutByIndex(index, node.childCount);\n        let overrideChild = typesAfter && typesAfter[i + 1];\n        if (overrideChild) rest = rest.replaceChild(0, overrideChild.type.create(overrideChild.attrs));\n        let after = typesAfter && typesAfter[i] || node;\n        if (!node.canReplace(index + 1, node.childCount) || !after.type.validContent(rest)) return false;\n    }\n    let index = $pos.indexAfter(base);\n    let baseType = typesAfter && typesAfter[0];\n    return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type);\n}\nfunction $bd3a9ff77fa05947$var$split(tr, pos, depth = 1, typesAfter) {\n    let $pos = tr.doc.resolve(pos), before = (0, $1krlL.Fragment).empty, after = (0, $1krlL.Fragment).empty;\n    for(let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--){\n        before = (0, $1krlL.Fragment).from($pos.node(d).copy(before));\n        let typeAfter = typesAfter && typesAfter[i];\n        after = (0, $1krlL.Fragment).from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));\n    }\n    tr.step(new $bd3a9ff77fa05947$export$5c860b2e74034756(pos, pos, new (0, $1krlL.Slice)(before.append(after), depth, depth), true));\n}\n/**\nTest whether the blocks before and after a given position can be\njoined.\n*/ function $bd3a9ff77fa05947$export$f15f89fd9d8cc98a(doc, pos) {\n    let $pos = doc.resolve(pos), index = $pos.index();\n    return $bd3a9ff77fa05947$var$joinable($pos.nodeBefore, $pos.nodeAfter) && $pos.parent.canReplace(index, index + 1);\n}\nfunction $bd3a9ff77fa05947$var$canAppendWithSubstitutedLinebreaks(a, b) {\n    if (!b.content.size) a.type.compatibleContent(b.type);\n    let match = a.contentMatchAt(a.childCount);\n    let { linebreakReplacement: linebreakReplacement } = a.type.schema;\n    for(let i = 0; i < b.childCount; i++){\n        let child = b.child(i);\n        let type = child.type == linebreakReplacement ? a.type.schema.nodes.text : child.type;\n        match = match.matchType(type);\n        if (!match) return false;\n        if (!a.type.allowsMarks(child.marks)) return false;\n    }\n    return match.validEnd;\n}\nfunction $bd3a9ff77fa05947$var$joinable(a, b) {\n    return !!(a && b && !a.isLeaf && $bd3a9ff77fa05947$var$canAppendWithSubstitutedLinebreaks(a, b));\n}\n/**\nFind an ancestor of the given position that can be joined to the\nblock before (or after if `dir` is positive). Returns the joinable\npoint, if any.\n*/ function $bd3a9ff77fa05947$export$41b1d4cb5ceb3147(doc, pos, dir = -1) {\n    let $pos = doc.resolve(pos);\n    for(let d = $pos.depth;; d--){\n        let before, after, index = $pos.index(d);\n        if (d == $pos.depth) {\n            before = $pos.nodeBefore;\n            after = $pos.nodeAfter;\n        } else if (dir > 0) {\n            before = $pos.node(d + 1);\n            index++;\n            after = $pos.node(d).maybeChild(index);\n        } else {\n            before = $pos.node(d).maybeChild(index - 1);\n            after = $pos.node(d + 1);\n        }\n        if (before && !before.isTextblock && $bd3a9ff77fa05947$var$joinable(before, after) && $pos.node(d).canReplace(index, index + 1)) return pos;\n        if (d == 0) break;\n        pos = dir < 0 ? $pos.before(d) : $pos.after(d);\n    }\n}\nfunction $bd3a9ff77fa05947$var$join(tr, pos, depth) {\n    let convertNewlines = null;\n    let { linebreakReplacement: linebreakReplacement } = tr.doc.type.schema;\n    let $before = tr.doc.resolve(pos - depth), beforeType = $before.node().type;\n    if (linebreakReplacement && beforeType.inlineContent) {\n        let pre = beforeType.whitespace == \"pre\";\n        let supportLinebreak = !!beforeType.contentMatch.matchType(linebreakReplacement);\n        if (pre && !supportLinebreak) convertNewlines = false;\n        else if (!pre && supportLinebreak) convertNewlines = true;\n    }\n    let mapFrom = tr.steps.length;\n    if (convertNewlines === false) {\n        let $after = tr.doc.resolve(pos + depth);\n        $bd3a9ff77fa05947$var$replaceLinebreaks(tr, $after.node(), $after.before(), mapFrom);\n    }\n    if (beforeType.inlineContent) $bd3a9ff77fa05947$var$clearIncompatible(tr, pos + depth - 1, beforeType, $before.node().contentMatchAt($before.index()), convertNewlines == null);\n    let mapping = tr.mapping.slice(mapFrom), start = mapping.map(pos - depth);\n    tr.step(new $bd3a9ff77fa05947$export$5c860b2e74034756(start, mapping.map(pos + depth, -1), (0, $1krlL.Slice).empty, true));\n    if (convertNewlines === true) {\n        let $full = tr.doc.resolve(start);\n        $bd3a9ff77fa05947$var$replaceNewlines(tr, $full.node(), $full.before(), tr.steps.length);\n    }\n    return tr;\n}\n/**\nTry to find a point where a node of the given type can be inserted\nnear `pos`, by searching up the node hierarchy when `pos` itself\nisn't a valid place but is at the start or end of a node. Return\nnull if no position was found.\n*/ function $bd3a9ff77fa05947$export$64cb316d02de1dd1(doc, pos, nodeType) {\n    let $pos = doc.resolve(pos);\n    if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType)) return pos;\n    if ($pos.parentOffset == 0) for(let d = $pos.depth - 1; d >= 0; d--){\n        let index = $pos.index(d);\n        if ($pos.node(d).canReplaceWith(index, index, nodeType)) return $pos.before(d + 1);\n        if (index > 0) return null;\n    }\n    if ($pos.parentOffset == $pos.parent.content.size) for(let d = $pos.depth - 1; d >= 0; d--){\n        let index = $pos.indexAfter(d);\n        if ($pos.node(d).canReplaceWith(index, index, nodeType)) return $pos.after(d + 1);\n        if (index < $pos.node(d).childCount) return null;\n    }\n    return null;\n}\n/**\nFinds a position at or around the given position where the given\nslice can be inserted. Will look at parent nodes' nearest boundary\nand try there, even if the original position wasn't directly at the\nstart or end of that node. Returns null when no position was found.\n*/ function $bd3a9ff77fa05947$export$2819d598d048fc9c(doc, pos, slice) {\n    let $pos = doc.resolve(pos);\n    if (!slice.content.size) return pos;\n    let content = slice.content;\n    for(let i = 0; i < slice.openStart; i++)content = content.firstChild.content;\n    for(let pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++)for(let d = $pos.depth; d >= 0; d--){\n        let bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;\n        let insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);\n        let parent = $pos.node(d), fits = false;\n        if (pass == 1) fits = parent.canReplace(insertPos, insertPos, content);\n        else {\n            let wrapping = parent.contentMatchAt(insertPos).findWrapping(content.firstChild.type);\n            fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);\n        }\n        if (fits) return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);\n    }\n    return null;\n}\n/**\n‘Fit’ a slice into a given position in the document, producing a\n[step](https://prosemirror.net/docs/ref/#transform.Step) that inserts it. Will return null if\nthere's no meaningful way to insert the slice here, or inserting it\nwould be a no-op (an empty slice over an empty range).\n*/ function $bd3a9ff77fa05947$export$ed6ac67359824afd(doc, from, to = from, slice = (0, $1krlL.Slice).empty) {\n    if (from == to && !slice.size) return null;\n    let $from = doc.resolve(from), $to = doc.resolve(to);\n    // Optimization -- avoid work if it's obvious that it's not needed.\n    if ($bd3a9ff77fa05947$var$fitsTrivially($from, $to, slice)) return new $bd3a9ff77fa05947$export$5c860b2e74034756(from, to, slice);\n    return new $bd3a9ff77fa05947$var$Fitter($from, $to, slice).fit();\n}\nfunction $bd3a9ff77fa05947$var$fitsTrivially($from, $to, slice) {\n    return !slice.openStart && !slice.openEnd && $from.start() == $to.start() && $from.parent.canReplace($from.index(), $to.index(), slice.content);\n}\n// Algorithm for 'placing' the elements of a slice into a gap:\n//\n// We consider the content of each node that is open to the left to be\n// independently placeable. I.e. in <p(\"foo\"), p(\"bar\")>, when the\n// paragraph on the left is open, \"foo\" can be placed (somewhere on\n// the left side of the replacement gap) independently from p(\"bar\").\n//\n// This class tracks the state of the placement progress in the\n// following properties:\n//\n//  - `frontier` holds a stack of `{type, match}` objects that\n//    represent the open side of the replacement. It starts at\n//    `$from`, then moves forward as content is placed, and is finally\n//    reconciled with `$to`.\n//\n//  - `unplaced` is a slice that represents the content that hasn't\n//    been placed yet.\n//\n//  - `placed` is a fragment of placed content. Its open-start value\n//    is implicit in `$from`, and its open-end value in `frontier`.\nclass $bd3a9ff77fa05947$var$Fitter {\n    constructor($from, $to, unplaced){\n        this.$from = $from;\n        this.$to = $to;\n        this.unplaced = unplaced;\n        this.frontier = [];\n        this.placed = (0, $1krlL.Fragment).empty;\n        for(let i = 0; i <= $from.depth; i++){\n            let node = $from.node(i);\n            this.frontier.push({\n                type: node.type,\n                match: node.contentMatchAt($from.indexAfter(i))\n            });\n        }\n        for(let i = $from.depth; i > 0; i--)this.placed = (0, $1krlL.Fragment).from($from.node(i).copy(this.placed));\n    }\n    get depth() {\n        return this.frontier.length - 1;\n    }\n    fit() {\n        // As long as there's unplaced content, try to place some of it.\n        // If that fails, either increase the open score of the unplaced\n        // slice, or drop nodes from it, and then try again.\n        while(this.unplaced.size){\n            let fit = this.findFittable();\n            if (fit) this.placeNodes(fit);\n            else this.openMore() || this.dropNode();\n        }\n        // When there's inline content directly after the frontier _and_\n        // directly after `this.$to`, we must generate a `ReplaceAround`\n        // step that pulls that content into the node after the frontier.\n        // That means the fitting must be done to the end of the textblock\n        // node after `this.$to`, not `this.$to` itself.\n        let moveInline = this.mustMoveInline(), placedSize = this.placed.size - this.depth - this.$from.depth;\n        let $from = this.$from, $to = this.close(moveInline < 0 ? this.$to : $from.doc.resolve(moveInline));\n        if (!$to) return null;\n        // If closing to `$to` succeeded, create a step\n        let content = this.placed, openStart = $from.depth, openEnd = $to.depth;\n        while(openStart && openEnd && content.childCount == 1){\n            content = content.firstChild.content;\n            openStart--;\n            openEnd--;\n        }\n        let slice = new (0, $1krlL.Slice)(content, openStart, openEnd);\n        if (moveInline > -1) return new $bd3a9ff77fa05947$export$444ba800d6024a98($from.pos, moveInline, this.$to.pos, this.$to.end(), slice, placedSize);\n        if (slice.size || $from.pos != this.$to.pos) return new $bd3a9ff77fa05947$export$5c860b2e74034756($from.pos, $to.pos, slice);\n        return null;\n    }\n    // Find a position on the start spine of `this.unplaced` that has\n    // content that can be moved somewhere on the frontier. Returns two\n    // depths, one for the slice and one for the frontier.\n    findFittable() {\n        let startDepth = this.unplaced.openStart;\n        for(let cur = this.unplaced.content, d = 0, openEnd = this.unplaced.openEnd; d < startDepth; d++){\n            let node = cur.firstChild;\n            if (cur.childCount > 1) openEnd = 0;\n            if (node.type.spec.isolating && openEnd <= d) {\n                startDepth = d;\n                break;\n            }\n            cur = node.content;\n        }\n        // Only try wrapping nodes (pass 2) after finding a place without\n        // wrapping failed.\n        for(let pass = 1; pass <= 2; pass++)for(let sliceDepth = pass == 1 ? startDepth : this.unplaced.openStart; sliceDepth >= 0; sliceDepth--){\n            let fragment, parent = null;\n            if (sliceDepth) {\n                parent = $bd3a9ff77fa05947$var$contentAt(this.unplaced.content, sliceDepth - 1).firstChild;\n                fragment = parent.content;\n            } else fragment = this.unplaced.content;\n            let first = fragment.firstChild;\n            for(let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--){\n                let { type: type, match: match } = this.frontier[frontierDepth], wrap, inject = null;\n                // In pass 1, if the next node matches, or there is no next\n                // node but the parents look compatible, we've found a\n                // place.\n                if (pass == 1 && (first ? match.matchType(first.type) || (inject = match.fillBefore((0, $1krlL.Fragment).from(first), false)) : parent && type.compatibleContent(parent.type))) return {\n                    sliceDepth: sliceDepth,\n                    frontierDepth: frontierDepth,\n                    parent: parent,\n                    inject: inject\n                };\n                else if (pass == 2 && first && (wrap = match.findWrapping(first.type))) return {\n                    sliceDepth: sliceDepth,\n                    frontierDepth: frontierDepth,\n                    parent: parent,\n                    wrap: wrap\n                };\n                // Don't continue looking further up if the parent node\n                // would fit here.\n                if (parent && match.matchType(parent.type)) break;\n            }\n        }\n    }\n    openMore() {\n        let { content: content, openStart: openStart, openEnd: openEnd } = this.unplaced;\n        let inner = $bd3a9ff77fa05947$var$contentAt(content, openStart);\n        if (!inner.childCount || inner.firstChild.isLeaf) return false;\n        this.unplaced = new (0, $1krlL.Slice)(content, openStart + 1, Math.max(openEnd, inner.size + openStart >= content.size - openEnd ? openStart + 1 : 0));\n        return true;\n    }\n    dropNode() {\n        let { content: content, openStart: openStart, openEnd: openEnd } = this.unplaced;\n        let inner = $bd3a9ff77fa05947$var$contentAt(content, openStart);\n        if (inner.childCount <= 1 && openStart > 0) {\n            let openAtEnd = content.size - openStart <= openStart + inner.size;\n            this.unplaced = new (0, $1krlL.Slice)($bd3a9ff77fa05947$var$dropFromFragment(content, openStart - 1, 1), openStart - 1, openAtEnd ? openStart - 1 : openEnd);\n        } else this.unplaced = new (0, $1krlL.Slice)($bd3a9ff77fa05947$var$dropFromFragment(content, openStart, 1), openStart, openEnd);\n    }\n    // Move content from the unplaced slice at `sliceDepth` to the\n    // frontier node at `frontierDepth`. Close that frontier node when\n    // applicable.\n    placeNodes({ sliceDepth: sliceDepth, frontierDepth: frontierDepth, parent: parent, inject: inject, wrap: wrap }) {\n        while(this.depth > frontierDepth)this.closeFrontierNode();\n        if (wrap) for(let i = 0; i < wrap.length; i++)this.openFrontierNode(wrap[i]);\n        let slice = this.unplaced, fragment = parent ? parent.content : slice.content;\n        let openStart = slice.openStart - sliceDepth;\n        let taken = 0, add = [];\n        let { match: match, type: type } = this.frontier[frontierDepth];\n        if (inject) {\n            for(let i = 0; i < inject.childCount; i++)add.push(inject.child(i));\n            match = match.matchFragment(inject);\n        }\n        // Computes the amount of (end) open nodes at the end of the\n        // fragment. When 0, the parent is open, but no more. When\n        // negative, nothing is open.\n        let openEndCount = fragment.size + sliceDepth - (slice.content.size - slice.openEnd);\n        // Scan over the fragment, fitting as many child nodes as\n        // possible.\n        while(taken < fragment.childCount){\n            let next = fragment.child(taken), matches = match.matchType(next.type);\n            if (!matches) break;\n            taken++;\n            if (taken > 1 || openStart == 0 || next.content.size) {\n                match = matches;\n                add.push($bd3a9ff77fa05947$var$closeNodeStart(next.mark(type.allowedMarks(next.marks)), taken == 1 ? openStart : 0, taken == fragment.childCount ? openEndCount : -1));\n            }\n        }\n        let toEnd = taken == fragment.childCount;\n        if (!toEnd) openEndCount = -1;\n        this.placed = $bd3a9ff77fa05947$var$addToFragment(this.placed, frontierDepth, (0, $1krlL.Fragment).from(add));\n        this.frontier[frontierDepth].match = match;\n        // If the parent types match, and the entire node was moved, and\n        // it's not open, close this frontier node right away.\n        if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1) this.closeFrontierNode();\n        // Add new frontier nodes for any open nodes at the end.\n        for(let i = 0, cur = fragment; i < openEndCount; i++){\n            let node = cur.lastChild;\n            this.frontier.push({\n                type: node.type,\n                match: node.contentMatchAt(node.childCount)\n            });\n            cur = node.content;\n        }\n        // Update `this.unplaced`. Drop the entire node from which we\n        // placed it we got to its end, otherwise just drop the placed\n        // nodes.\n        this.unplaced = !toEnd ? new (0, $1krlL.Slice)($bd3a9ff77fa05947$var$dropFromFragment(slice.content, sliceDepth, taken), slice.openStart, slice.openEnd) : sliceDepth == 0 ? (0, $1krlL.Slice).empty : new (0, $1krlL.Slice)($bd3a9ff77fa05947$var$dropFromFragment(slice.content, sliceDepth - 1, 1), sliceDepth - 1, openEndCount < 0 ? slice.openEnd : sliceDepth - 1);\n    }\n    mustMoveInline() {\n        if (!this.$to.parent.isTextblock) return -1;\n        let top = this.frontier[this.depth], level;\n        if (!top.type.isTextblock || !$bd3a9ff77fa05947$var$contentAfterFits(this.$to, this.$to.depth, top.type, top.match, false) || this.$to.depth == this.depth && (level = this.findCloseLevel(this.$to)) && level.depth == this.depth) return -1;\n        let { depth: depth } = this.$to, after = this.$to.after(depth);\n        while(depth > 1 && after == this.$to.end(--depth))++after;\n        return after;\n    }\n    findCloseLevel($to) {\n        scan: for(let i = Math.min(this.depth, $to.depth); i >= 0; i--){\n            let { match: match, type: type } = this.frontier[i];\n            let dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));\n            let fit = $bd3a9ff77fa05947$var$contentAfterFits($to, i, type, match, dropInner);\n            if (!fit) continue;\n            for(let d = i - 1; d >= 0; d--){\n                let { match: match, type: type } = this.frontier[d];\n                let matches = $bd3a9ff77fa05947$var$contentAfterFits($to, d, type, match, true);\n                if (!matches || matches.childCount) continue scan;\n            }\n            return {\n                depth: i,\n                fit: fit,\n                move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to\n            };\n        }\n    }\n    close($to) {\n        let close = this.findCloseLevel($to);\n        if (!close) return null;\n        while(this.depth > close.depth)this.closeFrontierNode();\n        if (close.fit.childCount) this.placed = $bd3a9ff77fa05947$var$addToFragment(this.placed, close.depth, close.fit);\n        $to = close.move;\n        for(let d = close.depth + 1; d <= $to.depth; d++){\n            let node = $to.node(d), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));\n            this.openFrontierNode(node.type, node.attrs, add);\n        }\n        return $to;\n    }\n    openFrontierNode(type, attrs = null, content) {\n        let top = this.frontier[this.depth];\n        top.match = top.match.matchType(type);\n        this.placed = $bd3a9ff77fa05947$var$addToFragment(this.placed, this.depth, (0, $1krlL.Fragment).from(type.create(attrs, content)));\n        this.frontier.push({\n            type: type,\n            match: type.contentMatch\n        });\n    }\n    closeFrontierNode() {\n        let open = this.frontier.pop();\n        let add = open.match.fillBefore((0, $1krlL.Fragment).empty, true);\n        if (add.childCount) this.placed = $bd3a9ff77fa05947$var$addToFragment(this.placed, this.frontier.length, add);\n    }\n}\nfunction $bd3a9ff77fa05947$var$dropFromFragment(fragment, depth, count) {\n    if (depth == 0) return fragment.cutByIndex(count, fragment.childCount);\n    return fragment.replaceChild(0, fragment.firstChild.copy($bd3a9ff77fa05947$var$dropFromFragment(fragment.firstChild.content, depth - 1, count)));\n}\nfunction $bd3a9ff77fa05947$var$addToFragment(fragment, depth, content) {\n    if (depth == 0) return fragment.append(content);\n    return fragment.replaceChild(fragment.childCount - 1, fragment.lastChild.copy($bd3a9ff77fa05947$var$addToFragment(fragment.lastChild.content, depth - 1, content)));\n}\nfunction $bd3a9ff77fa05947$var$contentAt(fragment, depth) {\n    for(let i = 0; i < depth; i++)fragment = fragment.firstChild.content;\n    return fragment;\n}\nfunction $bd3a9ff77fa05947$var$closeNodeStart(node, openStart, openEnd) {\n    if (openStart <= 0) return node;\n    let frag = node.content;\n    if (openStart > 1) frag = frag.replaceChild(0, $bd3a9ff77fa05947$var$closeNodeStart(frag.firstChild, openStart - 1, frag.childCount == 1 ? openEnd - 1 : 0));\n    if (openStart > 0) {\n        frag = node.type.contentMatch.fillBefore(frag).append(frag);\n        if (openEnd <= 0) frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore((0, $1krlL.Fragment).empty, true));\n    }\n    return node.copy(frag);\n}\nfunction $bd3a9ff77fa05947$var$contentAfterFits($to, depth, type, match, open) {\n    let node = $to.node(depth), index = open ? $to.indexAfter(depth) : $to.index(depth);\n    if (index == node.childCount && !type.compatibleContent(node.type)) return null;\n    let fit = match.fillBefore(node.content, true, index);\n    return fit && !$bd3a9ff77fa05947$var$invalidMarks(type, node.content, index) ? fit : null;\n}\nfunction $bd3a9ff77fa05947$var$invalidMarks(type, fragment, start) {\n    for(let i = start; i < fragment.childCount; i++)if (!type.allowsMarks(fragment.child(i).marks)) return true;\n    return false;\n}\nfunction $bd3a9ff77fa05947$var$definesContent(type) {\n    return type.spec.defining || type.spec.definingForContent;\n}\nfunction $bd3a9ff77fa05947$var$replaceRange(tr, from, to, slice) {\n    if (!slice.size) return tr.deleteRange(from, to);\n    let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);\n    if ($bd3a9ff77fa05947$var$fitsTrivially($from, $to, slice)) return tr.step(new $bd3a9ff77fa05947$export$5c860b2e74034756(from, to, slice));\n    let targetDepths = $bd3a9ff77fa05947$var$coveredDepths($from, tr.doc.resolve(to));\n    // Can't replace the whole document, so remove 0 if it's present\n    if (targetDepths[targetDepths.length - 1] == 0) targetDepths.pop();\n    // Negative numbers represent not expansion over the whole node at\n    // that depth, but replacing from $from.before(-D) to $to.pos.\n    let preferredTarget = -($from.depth + 1);\n    targetDepths.unshift(preferredTarget);\n    // This loop picks a preferred target depth, if one of the covering\n    // depths is not outside of a defining node, and adds negative\n    // depths for any depth that has $from at its start and does not\n    // cross a defining node.\n    for(let d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--){\n        let spec = $from.node(d).type.spec;\n        if (spec.defining || spec.definingAsContext || spec.isolating) break;\n        if (targetDepths.indexOf(d) > -1) preferredTarget = d;\n        else if ($from.before(d) == pos) targetDepths.splice(1, 0, -d);\n    }\n    // Try to fit each possible depth of the slice into each possible\n    // target depth, starting with the preferred depths.\n    let preferredTargetIndex = targetDepths.indexOf(preferredTarget);\n    let leftNodes = [], preferredDepth = slice.openStart;\n    for(let content = slice.content, i = 0;; i++){\n        let node = content.firstChild;\n        leftNodes.push(node);\n        if (i == slice.openStart) break;\n        content = node.content;\n    }\n    // Back up preferredDepth to cover defining textblocks directly\n    // above it, possibly skipping a non-defining textblock.\n    for(let d = preferredDepth - 1; d >= 0; d--){\n        let leftNode = leftNodes[d], def = $bd3a9ff77fa05947$var$definesContent(leftNode.type);\n        if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1))) preferredDepth = d;\n        else if (def || !leftNode.type.isTextblock) break;\n    }\n    for(let j = slice.openStart; j >= 0; j--){\n        let openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);\n        let insert = leftNodes[openDepth];\n        if (!insert) continue;\n        for(let i = 0; i < targetDepths.length; i++){\n            // Loop over possible expansion levels, starting with the\n            // preferred one\n            let targetDepth = targetDepths[(i + preferredTargetIndex) % targetDepths.length], expand = true;\n            if (targetDepth < 0) {\n                expand = false;\n                targetDepth = -targetDepth;\n            }\n            let parent = $from.node(targetDepth - 1), index = $from.index(targetDepth - 1);\n            if (parent.canReplaceWith(index, index, insert.type, insert.marks)) return tr.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to, new (0, $1krlL.Slice)($bd3a9ff77fa05947$var$closeFragment(slice.content, 0, slice.openStart, openDepth), openDepth, slice.openEnd));\n        }\n    }\n    let startSteps = tr.steps.length;\n    for(let i = targetDepths.length - 1; i >= 0; i--){\n        tr.replace(from, to, slice);\n        if (tr.steps.length > startSteps) break;\n        let depth = targetDepths[i];\n        if (depth < 0) continue;\n        from = $from.before(depth);\n        to = $to.after(depth);\n    }\n}\nfunction $bd3a9ff77fa05947$var$closeFragment(fragment, depth, oldOpen, newOpen, parent) {\n    if (depth < oldOpen) {\n        let first = fragment.firstChild;\n        fragment = fragment.replaceChild(0, first.copy($bd3a9ff77fa05947$var$closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));\n    }\n    if (depth > newOpen) {\n        let match = parent.contentMatchAt(0);\n        let start = match.fillBefore(fragment).append(fragment);\n        fragment = start.append(match.matchFragment(start).fillBefore((0, $1krlL.Fragment).empty, true));\n    }\n    return fragment;\n}\nfunction $bd3a9ff77fa05947$var$replaceRangeWith(tr, from, to, node) {\n    if (!node.isInline && from == to && tr.doc.resolve(from).parent.content.size) {\n        let point = $bd3a9ff77fa05947$export$64cb316d02de1dd1(tr.doc, from, node.type);\n        if (point != null) from = to = point;\n    }\n    tr.replaceRange(from, to, new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(node), 0, 0));\n}\nfunction $bd3a9ff77fa05947$var$deleteRange(tr, from, to) {\n    let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);\n    let covered = $bd3a9ff77fa05947$var$coveredDepths($from, $to);\n    for(let i = 0; i < covered.length; i++){\n        let depth = covered[i], last = i == covered.length - 1;\n        if (last && depth == 0 || $from.node(depth).type.contentMatch.validEnd) return tr.delete($from.start(depth), $to.end(depth));\n        if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1)))) return tr.delete($from.before(depth), $to.after(depth));\n    }\n    for(let d = 1; d <= $from.depth && d <= $to.depth; d++){\n        if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d && $from.start(d - 1) == $to.start(d - 1) && $from.node(d - 1).canReplace($from.index(d - 1), $to.index(d - 1))) return tr.delete($from.before(d), to);\n    }\n    tr.delete(from, to);\n}\n// Returns an array of all depths for which $from - $to spans the\n// whole content of the nodes at that depth.\nfunction $bd3a9ff77fa05947$var$coveredDepths($from, $to) {\n    let result = [], minDepth = Math.min($from.depth, $to.depth);\n    for(let d = minDepth; d >= 0; d--){\n        let start = $from.start(d);\n        if (start < $from.pos - ($from.depth - d) || $to.end(d) > $to.pos + ($to.depth - d) || $from.node(d).type.spec.isolating || $to.node(d).type.spec.isolating) break;\n        if (start == $to.start(d) || d == $from.depth && d == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent && d && $to.start(d - 1) == start - 1) result.push(d);\n    }\n    return result;\n}\n/**\nUpdate an attribute in a specific node.\n*/ class $bd3a9ff77fa05947$export$626399c38172f669 extends $bd3a9ff77fa05947$export$fd55ce593607084a {\n    /**\n    Construct an attribute step.\n    */ constructor(/**\n    The position of the target node.\n    */ pos, /**\n    The attribute to set.\n    */ attr, // The attribute's new value.\n    value){\n        super();\n        this.pos = pos;\n        this.attr = attr;\n        this.value = value;\n    }\n    apply(doc) {\n        let node = doc.nodeAt(this.pos);\n        if (!node) return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fail(\"No node at attribute step's position\");\n        let attrs = Object.create(null);\n        for(let name in node.attrs)attrs[name] = node.attrs[name];\n        attrs[this.attr] = this.value;\n        let updated = node.type.create(attrs, null, node.marks);\n        return $bd3a9ff77fa05947$export$8ebf1578a4199c09.fromReplace(doc, this.pos, this.pos + 1, new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(updated), 0, node.isLeaf ? 0 : 1));\n    }\n    getMap() {\n        return $bd3a9ff77fa05947$export$c53d01c3ab9721b3.empty;\n    }\n    invert(doc) {\n        return new $bd3a9ff77fa05947$export$626399c38172f669(this.pos, this.attr, doc.nodeAt(this.pos).attrs[this.attr]);\n    }\n    map(mapping) {\n        let pos = mapping.mapResult(this.pos, 1);\n        return pos.deletedAfter ? null : new $bd3a9ff77fa05947$export$626399c38172f669(pos.pos, this.attr, this.value);\n    }\n    toJSON() {\n        return {\n            stepType: \"attr\",\n            pos: this.pos,\n            attr: this.attr,\n            value: this.value\n        };\n    }\n    static fromJSON(schema, json) {\n        if (typeof json.pos != \"number\" || typeof json.attr != \"string\") throw new RangeError(\"Invalid input for AttrStep.fromJSON\");\n        return new $bd3a9ff77fa05947$export$626399c38172f669(json.pos, json.attr, json.value);\n    }\n}\n$bd3a9ff77fa05947$export$fd55ce593607084a.jsonID(\"attr\", $bd3a9ff77fa05947$export$626399c38172f669);\n/**\nUpdate an attribute in the doc node.\n*/ class $bd3a9ff77fa05947$export$f50707b396300ac9 extends $bd3a9ff77fa05947$export$fd55ce593607084a {\n    /**\n    Construct an attribute step.\n    */ constructor(/**\n    The attribute to set.\n    */ attr, // The attribute's new value.\n    value){\n        super();\n        this.attr = attr;\n        this.value = value;\n    }\n    apply(doc) {\n        let attrs = Object.create(null);\n        for(let name in doc.attrs)attrs[name] = doc.attrs[name];\n        attrs[this.attr] = this.value;\n        let updated = doc.type.create(attrs, doc.content, doc.marks);\n        return $bd3a9ff77fa05947$export$8ebf1578a4199c09.ok(updated);\n    }\n    getMap() {\n        return $bd3a9ff77fa05947$export$c53d01c3ab9721b3.empty;\n    }\n    invert(doc) {\n        return new $bd3a9ff77fa05947$export$f50707b396300ac9(this.attr, doc.attrs[this.attr]);\n    }\n    map(mapping) {\n        return this;\n    }\n    toJSON() {\n        return {\n            stepType: \"docAttr\",\n            attr: this.attr,\n            value: this.value\n        };\n    }\n    static fromJSON(schema, json) {\n        if (typeof json.attr != \"string\") throw new RangeError(\"Invalid input for DocAttrStep.fromJSON\");\n        return new $bd3a9ff77fa05947$export$f50707b396300ac9(json.attr, json.value);\n    }\n}\n$bd3a9ff77fa05947$export$fd55ce593607084a.jsonID(\"docAttr\", $bd3a9ff77fa05947$export$f50707b396300ac9);\n/**\n@internal\n*/ let $bd3a9ff77fa05947$export$88cc3a1dfce48dd3 = class extends Error {\n};\n$bd3a9ff77fa05947$export$88cc3a1dfce48dd3 = function TransformError(message) {\n    let err = Error.call(this, message);\n    err.__proto__ = TransformError.prototype;\n    return err;\n};\n$bd3a9ff77fa05947$export$88cc3a1dfce48dd3.prototype = Object.create(Error.prototype);\n$bd3a9ff77fa05947$export$88cc3a1dfce48dd3.prototype.constructor = $bd3a9ff77fa05947$export$88cc3a1dfce48dd3;\n$bd3a9ff77fa05947$export$88cc3a1dfce48dd3.prototype.name = \"TransformError\";\n/**\nAbstraction to build up and track an array of\n[steps](https://prosemirror.net/docs/ref/#transform.Step) representing a document transformation.\n\nMost transforming methods return the `Transform` object itself, so\nthat they can be chained.\n*/ class $bd3a9ff77fa05947$export$563a914cafbdc389 {\n    /**\n    Create a transform that starts with the given document.\n    */ constructor(/**\n    The current document (the result of applying the steps in the\n    transform).\n    */ doc){\n        this.doc = doc;\n        /**\n        The steps in this transform.\n        */ this.steps = [];\n        /**\n        The documents before each of the steps.\n        */ this.docs = [];\n        /**\n        A mapping with the maps for each of the steps in this transform.\n        */ this.mapping = new $bd3a9ff77fa05947$export$f5f785078011b62;\n    }\n    /**\n    The starting document.\n    */ get before() {\n        return this.docs.length ? this.docs[0] : this.doc;\n    }\n    /**\n    Apply a new step in this transform, saving the result. Throws an\n    error when the step fails.\n    */ step(step) {\n        let result = this.maybeStep(step);\n        if (result.failed) throw new $bd3a9ff77fa05947$export$88cc3a1dfce48dd3(result.failed);\n        return this;\n    }\n    /**\n    Try to apply a step in this transformation, ignoring it if it\n    fails. Returns the step result.\n    */ maybeStep(step) {\n        let result = step.apply(this.doc);\n        if (!result.failed) this.addStep(step, result.doc);\n        return result;\n    }\n    /**\n    True when the document has been changed (when there are any\n    steps).\n    */ get docChanged() {\n        return this.steps.length > 0;\n    }\n    /**\n    @internal\n    */ addStep(step, doc) {\n        this.docs.push(this.doc);\n        this.steps.push(step);\n        this.mapping.appendMap(step.getMap());\n        this.doc = doc;\n    }\n    /**\n    Replace the part of the document between `from` and `to` with the\n    given `slice`.\n    */ replace(from, to = from, slice = (0, $1krlL.Slice).empty) {\n        let step = $bd3a9ff77fa05947$export$ed6ac67359824afd(this.doc, from, to, slice);\n        if (step) this.step(step);\n        return this;\n    }\n    /**\n    Replace the given range with the given content, which may be a\n    fragment, node, or array of nodes.\n    */ replaceWith(from, to, content) {\n        return this.replace(from, to, new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(content), 0, 0));\n    }\n    /**\n    Delete the content between the given positions.\n    */ delete(from, to) {\n        return this.replace(from, to, (0, $1krlL.Slice).empty);\n    }\n    /**\n    Insert the given content at the given position.\n    */ insert(pos, content) {\n        return this.replaceWith(pos, pos, content);\n    }\n    /**\n    Replace a range of the document with a given slice, using\n    `from`, `to`, and the slice's\n    [`openStart`](https://prosemirror.net/docs/ref/#model.Slice.openStart) property as hints, rather\n    than fixed start and end points. This method may grow the\n    replaced area or close open nodes in the slice in order to get a\n    fit that is more in line with WYSIWYG expectations, by dropping\n    fully covered parent nodes of the replaced region when they are\n    marked [non-defining as\n    context](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext), or including an\n    open parent node from the slice that _is_ marked as [defining\n    its content](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).\n    \n    This is the method, for example, to handle paste. The similar\n    [`replace`](https://prosemirror.net/docs/ref/#transform.Transform.replace) method is a more\n    primitive tool which will _not_ move the start and end of its given\n    range, and is useful in situations where you need more precise\n    control over what happens.\n    */ replaceRange(from, to, slice) {\n        $bd3a9ff77fa05947$var$replaceRange(this, from, to, slice);\n        return this;\n    }\n    /**\n    Replace the given range with a node, but use `from` and `to` as\n    hints, rather than precise positions. When from and to are the same\n    and are at the start or end of a parent node in which the given\n    node doesn't fit, this method may _move_ them out towards a parent\n    that does allow the given node to be placed. When the given range\n    completely covers a parent node, this method may completely replace\n    that parent node.\n    */ replaceRangeWith(from, to, node) {\n        $bd3a9ff77fa05947$var$replaceRangeWith(this, from, to, node);\n        return this;\n    }\n    /**\n    Delete the given range, expanding it to cover fully covered\n    parent nodes until a valid replace is found.\n    */ deleteRange(from, to) {\n        $bd3a9ff77fa05947$var$deleteRange(this, from, to);\n        return this;\n    }\n    /**\n    Split the content in the given range off from its parent, if there\n    is sibling content before or after it, and move it up the tree to\n    the depth specified by `target`. You'll probably want to use\n    [`liftTarget`](https://prosemirror.net/docs/ref/#transform.liftTarget) to compute `target`, to make\n    sure the lift is valid.\n    */ lift(range, target) {\n        $bd3a9ff77fa05947$var$lift(this, range, target);\n        return this;\n    }\n    /**\n    Join the blocks around the given position. If depth is 2, their\n    last and first siblings are also joined, and so on.\n    */ join(pos, depth = 1) {\n        $bd3a9ff77fa05947$var$join(this, pos, depth);\n        return this;\n    }\n    /**\n    Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.\n    The wrappers are assumed to be valid in this position, and should\n    probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).\n    */ wrap(range, wrappers) {\n        $bd3a9ff77fa05947$var$wrap(this, range, wrappers);\n        return this;\n    }\n    /**\n    Set the type of all textblocks (partly) between `from` and `to` to\n    the given node type with the given attributes.\n    */ setBlockType(from, to = from, type, attrs = null) {\n        $bd3a9ff77fa05947$var$setBlockType(this, from, to, type, attrs);\n        return this;\n    }\n    /**\n    Change the type, attributes, and/or marks of the node at `pos`.\n    When `type` isn't given, the existing node type is preserved,\n    */ setNodeMarkup(pos, type, attrs = null, marks) {\n        $bd3a9ff77fa05947$var$setNodeMarkup(this, pos, type, attrs, marks);\n        return this;\n    }\n    /**\n    Set a single attribute on a given node to a new value.\n    The `pos` addresses the document content. Use `setDocAttribute`\n    to set attributes on the document itself.\n    */ setNodeAttribute(pos, attr, value) {\n        this.step(new $bd3a9ff77fa05947$export$626399c38172f669(pos, attr, value));\n        return this;\n    }\n    /**\n    Set a single attribute on the document to a new value.\n    */ setDocAttribute(attr, value) {\n        this.step(new $bd3a9ff77fa05947$export$f50707b396300ac9(attr, value));\n        return this;\n    }\n    /**\n    Add a mark to the node at position `pos`.\n    */ addNodeMark(pos, mark) {\n        this.step(new $bd3a9ff77fa05947$export$adefd16c402fee4e(pos, mark));\n        return this;\n    }\n    /**\n    Remove a mark (or a mark of the given type) from the node at\n    position `pos`.\n    */ removeNodeMark(pos, mark) {\n        if (!(mark instanceof (0, $1krlL.Mark))) {\n            let node = this.doc.nodeAt(pos);\n            if (!node) throw new RangeError(\"No node at position \" + pos);\n            mark = mark.isInSet(node.marks);\n            if (!mark) return this;\n        }\n        this.step(new $bd3a9ff77fa05947$export$fdf7d1dc10724da2(pos, mark));\n        return this;\n    }\n    /**\n    Split the node at the given position, and optionally, if `depth` is\n    greater than one, any number of nodes above that. By default, the\n    parts split off will inherit the node type of the original node.\n    This can be changed by passing an array of types and attributes to\n    use after the split.\n    */ split(pos, depth = 1, typesAfter) {\n        $bd3a9ff77fa05947$var$split(this, pos, depth, typesAfter);\n        return this;\n    }\n    /**\n    Add the given mark to the inline content between `from` and `to`.\n    */ addMark(from, to, mark) {\n        $bd3a9ff77fa05947$var$addMark(this, from, to, mark);\n        return this;\n    }\n    /**\n    Remove marks from inline nodes between `from` and `to`. When\n    `mark` is a single mark, remove precisely that mark. When it is\n    a mark type, remove all marks of that type. When it is null,\n    remove all marks of any type.\n    */ removeMark(from, to, mark) {\n        $bd3a9ff77fa05947$var$removeMark(this, from, to, mark);\n        return this;\n    }\n    /**\n    Removes all marks and nodes from the content of the node at\n    `pos` that don't match the given new parent node type. Accepts\n    an optional starting [content match](https://prosemirror.net/docs/ref/#model.ContentMatch) as\n    third argument.\n    */ clearIncompatible(pos, parentType, match) {\n        $bd3a9ff77fa05947$var$clearIncompatible(this, pos, parentType, match);\n        return this;\n    }\n}\n\n});\n\n\n\nparcelRegister(\"cXOg4\", function(module, exports) {\n$parcel$export(module.exports, \"Decoration\", () => (parcelRequire(\"edQEX\")).Decoration);\n$parcel$export(module.exports, \"DecorationSet\", () => (parcelRequire(\"edQEX\")).DecorationSet);\n$parcel$export(module.exports, \"EditorView\", () => (parcelRequire(\"edQEX\")).EditorView);\n// view/index.ts\nparcelRequire(\"edQEX\");\n\n});\nparcelRegister(\"edQEX\", function(module, exports) {\n\n$parcel$export(module.exports, \"Decoration\", () => $a5ab20b42a0afbae$export$10e30b733df217ea);\n$parcel$export(module.exports, \"DecorationSet\", () => $a5ab20b42a0afbae$export$93bf62eb445cec98);\n$parcel$export(module.exports, \"EditorView\", () => $a5ab20b42a0afbae$export$eece2fccabbb77c5);\n\nvar $1LeRC = parcelRequire(\"1LeRC\");\n\nvar $1krlL = parcelRequire(\"1krlL\");\n\nvar $gfgdn = parcelRequire(\"gfgdn\");\nconst $a5ab20b42a0afbae$var$domIndex = function(node) {\n    for(var index = 0;; index++){\n        node = node.previousSibling;\n        if (!node) return index;\n    }\n};\nconst $a5ab20b42a0afbae$var$parentNode = function(node) {\n    let parent = node.assignedSlot || node.parentNode;\n    return parent && parent.nodeType == 11 ? parent.host : parent;\n};\nlet $a5ab20b42a0afbae$var$reusedRange = null;\n// Note that this will always return the same range, because DOM range\n// objects are every expensive, and keep slowing down subsequent DOM\n// updates, for some reason.\nconst $a5ab20b42a0afbae$var$textRange = function(node, from, to) {\n    let range = $a5ab20b42a0afbae$var$reusedRange || ($a5ab20b42a0afbae$var$reusedRange = document.createRange());\n    range.setEnd(node, to == null ? node.nodeValue.length : to);\n    range.setStart(node, from || 0);\n    return range;\n};\nconst $a5ab20b42a0afbae$var$clearReusedRange = function() {\n    $a5ab20b42a0afbae$var$reusedRange = null;\n};\n// Scans forward and backward through DOM positions equivalent to the\n// given one to see if the two are in the same place (i.e. after a\n// text node vs at the end of that text node)\nconst $a5ab20b42a0afbae$var$isEquivalentPosition = function(node, off, targetNode, targetOff) {\n    return targetNode && ($a5ab20b42a0afbae$var$scanFor(node, off, targetNode, targetOff, -1) || $a5ab20b42a0afbae$var$scanFor(node, off, targetNode, targetOff, 1));\n};\nconst $a5ab20b42a0afbae$var$atomElements = /^(img|br|input|textarea|hr)$/i;\nfunction $a5ab20b42a0afbae$var$scanFor(node, off, targetNode, targetOff, dir) {\n    var _a;\n    for(;;){\n        if (node == targetNode && off == targetOff) return true;\n        if (off == (dir < 0 ? 0 : $a5ab20b42a0afbae$var$nodeSize(node))) {\n            let parent = node.parentNode;\n            if (!parent || !$a5ab20b42a0afbae$var$isElt(parent) || $a5ab20b42a0afbae$var$hasBlockDesc(node) || $a5ab20b42a0afbae$var$atomElements.test(node.nodeName) || node.contentEditable == \"false\") return false;\n            off = $a5ab20b42a0afbae$var$domIndex(node) + (dir < 0 ? 0 : 1);\n            node = parent;\n        } else if ($a5ab20b42a0afbae$var$isElt(node)) {\n            let child = node.childNodes[off + (dir < 0 ? -1 : 0)];\n            if ($a5ab20b42a0afbae$var$isElt(child) && child.contentEditable == \"false\") {\n                if ((_a = child.pmViewDesc) === null || _a === void 0 ? void 0 : _a.ignoreForSelection) off += dir;\n                else return false;\n            } else {\n                node = child;\n                off = dir < 0 ? $a5ab20b42a0afbae$var$nodeSize(node) : 0;\n            }\n        } else return false;\n    }\n}\nfunction $a5ab20b42a0afbae$var$nodeSize(node) {\n    return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;\n}\nfunction $a5ab20b42a0afbae$var$isElt(node) {\n    return node.nodeType == 1;\n}\nfunction $a5ab20b42a0afbae$var$isText(node) {\n    return node.nodeType == 3;\n}\nfunction $a5ab20b42a0afbae$var$contains(parent, child) {\n    return child ? parent.contains($a5ab20b42a0afbae$var$isElt(child) ? child : child.parentNode) : false;\n}\nfunction $a5ab20b42a0afbae$var$textNodeBefore$1(node, offset) {\n    for(;;){\n        if ($a5ab20b42a0afbae$var$isText(node) && offset) return node;\n        if ($a5ab20b42a0afbae$var$isElt(node) && offset > 0) {\n            if (node.contentEditable == \"false\") return null;\n            node = node.childNodes[offset - 1];\n            offset = $a5ab20b42a0afbae$var$nodeSize(node);\n        } else if (node.parentNode && !$a5ab20b42a0afbae$var$hasBlockDesc(node)) {\n            offset = $a5ab20b42a0afbae$var$domIndex(node);\n            node = node.parentNode;\n        } else return null;\n    }\n}\nfunction $a5ab20b42a0afbae$var$textNodeAfter$1(node, offset) {\n    for(;;){\n        if ($a5ab20b42a0afbae$var$isText(node) && offset < node.nodeValue.length) return node;\n        if ($a5ab20b42a0afbae$var$isElt(node) && offset < node.childNodes.length) {\n            if (node.contentEditable == \"false\") return null;\n            node = node.childNodes[offset];\n            offset = 0;\n        } else if (node.parentNode && !$a5ab20b42a0afbae$var$hasBlockDesc(node)) {\n            offset = $a5ab20b42a0afbae$var$domIndex(node) + 1;\n            node = node.parentNode;\n        } else return null;\n    }\n}\nfunction $a5ab20b42a0afbae$var$isOnEdge(node, offset, parent) {\n    for(let atStart = offset == 0, atEnd = offset == $a5ab20b42a0afbae$var$nodeSize(node); atStart || atEnd;){\n        if (node == parent) return true;\n        let index = $a5ab20b42a0afbae$var$domIndex(node);\n        node = node.parentNode;\n        if (!node) return false;\n        atStart = atStart && index == 0;\n        atEnd = atEnd && index == $a5ab20b42a0afbae$var$nodeSize(node);\n    }\n}\nfunction $a5ab20b42a0afbae$var$hasBlockDesc(dom) {\n    let desc;\n    for(let cur = dom; cur; cur = cur.parentNode)if (desc = cur.pmViewDesc) break;\n    return desc && desc.node && desc.node.isBlock && (desc.dom == dom || desc.contentDOM == dom);\n}\n// Work around Chrome issue https://bugs.chromium.org/p/chromium/issues/detail?id=447523\n// (isCollapsed inappropriately returns true in shadow dom)\nconst $a5ab20b42a0afbae$var$selectionCollapsed = function(domSel) {\n    return domSel.focusNode && $a5ab20b42a0afbae$var$isEquivalentPosition(domSel.focusNode, domSel.focusOffset, domSel.anchorNode, domSel.anchorOffset);\n};\nfunction $a5ab20b42a0afbae$var$keyEvent(keyCode, key) {\n    let event = document.createEvent(\"Event\");\n    event.initEvent(\"keydown\", true, true);\n    event.keyCode = keyCode;\n    event.key = event.code = key;\n    return event;\n}\nfunction $a5ab20b42a0afbae$var$deepActiveElement(doc) {\n    let elt = doc.activeElement;\n    while(elt && elt.shadowRoot)elt = elt.shadowRoot.activeElement;\n    return elt;\n}\nfunction $a5ab20b42a0afbae$var$caretFromPoint(doc, x, y) {\n    if (doc.caretPositionFromPoint) try {\n        let pos = doc.caretPositionFromPoint(x, y);\n        // Clip the offset, because Chrome will return a text offset\n        // into <input> nodes, which can't be treated as a regular DOM\n        // offset\n        if (pos) return {\n            node: pos.offsetNode,\n            offset: Math.min($a5ab20b42a0afbae$var$nodeSize(pos.offsetNode), pos.offset)\n        };\n    } catch (_) {}\n    if (doc.caretRangeFromPoint) {\n        let range = doc.caretRangeFromPoint(x, y);\n        if (range) return {\n            node: range.startContainer,\n            offset: Math.min($a5ab20b42a0afbae$var$nodeSize(range.startContainer), range.startOffset)\n        };\n    }\n}\nconst $a5ab20b42a0afbae$var$nav = typeof navigator != \"undefined\" ? navigator : null;\nconst $a5ab20b42a0afbae$var$doc = typeof document != \"undefined\" ? document : null;\nconst $a5ab20b42a0afbae$var$agent = $a5ab20b42a0afbae$var$nav && $a5ab20b42a0afbae$var$nav.userAgent || \"\";\nconst $a5ab20b42a0afbae$var$ie_edge = /Edge\\/(\\d+)/.exec($a5ab20b42a0afbae$var$agent);\nconst $a5ab20b42a0afbae$var$ie_upto10 = /MSIE \\d/.exec($a5ab20b42a0afbae$var$agent);\nconst $a5ab20b42a0afbae$var$ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec($a5ab20b42a0afbae$var$agent);\nconst $a5ab20b42a0afbae$var$ie = !!($a5ab20b42a0afbae$var$ie_upto10 || $a5ab20b42a0afbae$var$ie_11up || $a5ab20b42a0afbae$var$ie_edge);\nconst $a5ab20b42a0afbae$var$ie_version = $a5ab20b42a0afbae$var$ie_upto10 ? document.documentMode : $a5ab20b42a0afbae$var$ie_11up ? +$a5ab20b42a0afbae$var$ie_11up[1] : $a5ab20b42a0afbae$var$ie_edge ? +$a5ab20b42a0afbae$var$ie_edge[1] : 0;\nconst $a5ab20b42a0afbae$var$gecko = !$a5ab20b42a0afbae$var$ie && /gecko\\/(\\d+)/i.test($a5ab20b42a0afbae$var$agent);\n$a5ab20b42a0afbae$var$gecko && (/Firefox\\/(\\d+)/.exec($a5ab20b42a0afbae$var$agent) || [\n    0,\n    0\n])[1];\nconst $a5ab20b42a0afbae$var$_chrome = !$a5ab20b42a0afbae$var$ie && /Chrome\\/(\\d+)/.exec($a5ab20b42a0afbae$var$agent);\nconst $a5ab20b42a0afbae$var$chrome = !!$a5ab20b42a0afbae$var$_chrome;\nconst $a5ab20b42a0afbae$var$chrome_version = $a5ab20b42a0afbae$var$_chrome ? +$a5ab20b42a0afbae$var$_chrome[1] : 0;\nconst $a5ab20b42a0afbae$var$safari = !$a5ab20b42a0afbae$var$ie && !!$a5ab20b42a0afbae$var$nav && /Apple Computer/.test($a5ab20b42a0afbae$var$nav.vendor);\n// Is true for both iOS and iPadOS for convenience\nconst $a5ab20b42a0afbae$var$ios = $a5ab20b42a0afbae$var$safari && (/Mobile\\/\\w+/.test($a5ab20b42a0afbae$var$agent) || !!$a5ab20b42a0afbae$var$nav && $a5ab20b42a0afbae$var$nav.maxTouchPoints > 2);\nconst $a5ab20b42a0afbae$var$mac = $a5ab20b42a0afbae$var$ios || ($a5ab20b42a0afbae$var$nav ? /Mac/.test($a5ab20b42a0afbae$var$nav.platform) : false);\nconst $a5ab20b42a0afbae$var$windows = $a5ab20b42a0afbae$var$nav ? /Win/.test($a5ab20b42a0afbae$var$nav.platform) : false;\nconst $a5ab20b42a0afbae$var$android = /Android \\d/.test($a5ab20b42a0afbae$var$agent);\nconst $a5ab20b42a0afbae$var$webkit = !!$a5ab20b42a0afbae$var$doc && \"webkitFontSmoothing\" in $a5ab20b42a0afbae$var$doc.documentElement.style;\nconst $a5ab20b42a0afbae$var$webkit_version = $a5ab20b42a0afbae$var$webkit ? +(/\\bAppleWebKit\\/(\\d+)/.exec(navigator.userAgent) || [\n    0,\n    0\n])[1] : 0;\nfunction $a5ab20b42a0afbae$var$windowRect(doc) {\n    let vp = doc.defaultView && doc.defaultView.visualViewport;\n    if (vp) return {\n        left: 0,\n        right: vp.width,\n        top: 0,\n        bottom: vp.height\n    };\n    return {\n        left: 0,\n        right: doc.documentElement.clientWidth,\n        top: 0,\n        bottom: doc.documentElement.clientHeight\n    };\n}\nfunction $a5ab20b42a0afbae$var$getSide(value, side) {\n    return typeof value == \"number\" ? value : value[side];\n}\nfunction $a5ab20b42a0afbae$var$clientRect(node) {\n    let rect = node.getBoundingClientRect();\n    // Adjust for elements with style \"transform: scale()\"\n    let scaleX = rect.width / node.offsetWidth || 1;\n    let scaleY = rect.height / node.offsetHeight || 1;\n    // Make sure scrollbar width isn't included in the rectangle\n    return {\n        left: rect.left,\n        right: rect.left + node.clientWidth * scaleX,\n        top: rect.top,\n        bottom: rect.top + node.clientHeight * scaleY\n    };\n}\nfunction $a5ab20b42a0afbae$var$scrollRectIntoView(view, rect, startDOM) {\n    // Skip empty rects with all sides at 0, for example, when the element has no CSS box (display: none)\n    if (!$a5ab20b42a0afbae$var$nonZero(rect) && rect.left == 0) return;\n    let scrollThreshold = view.someProp(\"scrollThreshold\") || 0, scrollMargin = view.someProp(\"scrollMargin\") || 5;\n    let doc = view.dom.ownerDocument;\n    for(let parent = startDOM || view.dom;;){\n        if (!parent) break;\n        if (!$a5ab20b42a0afbae$var$isElt(parent)) {\n            parent = $a5ab20b42a0afbae$var$parentNode(parent);\n            continue;\n        }\n        let atTop = parent == doc.body;\n        let bounding = atTop ? $a5ab20b42a0afbae$var$windowRect(doc) : $a5ab20b42a0afbae$var$clientRect(parent);\n        let moveX = 0, moveY = 0;\n        if (rect.top < bounding.top + $a5ab20b42a0afbae$var$getSide(scrollThreshold, \"top\")) moveY = -(bounding.top - rect.top + $a5ab20b42a0afbae$var$getSide(scrollMargin, \"top\"));\n        else if (rect.bottom > bounding.bottom - $a5ab20b42a0afbae$var$getSide(scrollThreshold, \"bottom\")) moveY = rect.bottom - rect.top > bounding.bottom - bounding.top ? rect.top + $a5ab20b42a0afbae$var$getSide(scrollMargin, \"top\") - bounding.top : rect.bottom - bounding.bottom + $a5ab20b42a0afbae$var$getSide(scrollMargin, \"bottom\");\n        if (rect.left < bounding.left + $a5ab20b42a0afbae$var$getSide(scrollThreshold, \"left\")) moveX = -(bounding.left - rect.left + $a5ab20b42a0afbae$var$getSide(scrollMargin, \"left\"));\n        else if (rect.right > bounding.right - $a5ab20b42a0afbae$var$getSide(scrollThreshold, \"right\")) moveX = rect.right - bounding.right + $a5ab20b42a0afbae$var$getSide(scrollMargin, \"right\");\n        if (moveX || moveY) {\n            if (atTop) doc.defaultView.scrollBy(moveX, moveY);\n            else {\n                let startX = parent.scrollLeft, startY = parent.scrollTop;\n                if (moveY) parent.scrollTop += moveY;\n                if (moveX) parent.scrollLeft += moveX;\n                let dX = parent.scrollLeft - startX, dY = parent.scrollTop - startY;\n                rect = {\n                    left: rect.left - dX,\n                    top: rect.top - dY,\n                    right: rect.right - dX,\n                    bottom: rect.bottom - dY\n                };\n            }\n        }\n        let pos = atTop ? \"fixed\" : getComputedStyle(parent).position;\n        if (/^(fixed|sticky)$/.test(pos)) break;\n        parent = pos == \"absolute\" ? parent.offsetParent : $a5ab20b42a0afbae$var$parentNode(parent);\n    }\n}\n// Store the scroll position of the editor's parent nodes, along with\n// the top position of an element near the top of the editor, which\n// will be used to make sure the visible viewport remains stable even\n// when the size of the content above changes.\nfunction $a5ab20b42a0afbae$var$storeScrollPos(view) {\n    let rect = view.dom.getBoundingClientRect(), startY = Math.max(0, rect.top);\n    let refDOM, refTop;\n    for(let x = (rect.left + rect.right) / 2, y = startY + 1; y < Math.min(innerHeight, rect.bottom); y += 5){\n        let dom = view.root.elementFromPoint(x, y);\n        if (!dom || dom == view.dom || !view.dom.contains(dom)) continue;\n        let localRect = dom.getBoundingClientRect();\n        if (localRect.top >= startY - 20) {\n            refDOM = dom;\n            refTop = localRect.top;\n            break;\n        }\n    }\n    return {\n        refDOM: refDOM,\n        refTop: refTop,\n        stack: $a5ab20b42a0afbae$var$scrollStack(view.dom)\n    };\n}\nfunction $a5ab20b42a0afbae$var$scrollStack(dom) {\n    let stack = [], doc = dom.ownerDocument;\n    for(let cur = dom; cur; cur = $a5ab20b42a0afbae$var$parentNode(cur)){\n        stack.push({\n            dom: cur,\n            top: cur.scrollTop,\n            left: cur.scrollLeft\n        });\n        if (dom == doc) break;\n    }\n    return stack;\n}\n// Reset the scroll position of the editor's parent nodes to that what\n// it was before, when storeScrollPos was called.\nfunction $a5ab20b42a0afbae$var$resetScrollPos({ refDOM: refDOM, refTop: refTop, stack: stack }) {\n    let newRefTop = refDOM ? refDOM.getBoundingClientRect().top : 0;\n    $a5ab20b42a0afbae$var$restoreScrollStack(stack, newRefTop == 0 ? 0 : newRefTop - refTop);\n}\nfunction $a5ab20b42a0afbae$var$restoreScrollStack(stack, dTop) {\n    for(let i = 0; i < stack.length; i++){\n        let { dom: dom, top: top, left: left } = stack[i];\n        if (dom.scrollTop != top + dTop) dom.scrollTop = top + dTop;\n        if (dom.scrollLeft != left) dom.scrollLeft = left;\n    }\n}\nlet $a5ab20b42a0afbae$var$preventScrollSupported = null;\n// Feature-detects support for .focus({preventScroll: true}), and uses\n// a fallback kludge when not supported.\nfunction $a5ab20b42a0afbae$var$focusPreventScroll(dom) {\n    if (dom.setActive) return dom.setActive(); // in IE\n    if ($a5ab20b42a0afbae$var$preventScrollSupported) return dom.focus($a5ab20b42a0afbae$var$preventScrollSupported);\n    let stored = $a5ab20b42a0afbae$var$scrollStack(dom);\n    dom.focus($a5ab20b42a0afbae$var$preventScrollSupported == null ? {\n        get preventScroll () {\n            $a5ab20b42a0afbae$var$preventScrollSupported = {\n                preventScroll: true\n            };\n            return true;\n        }\n    } : undefined);\n    if (!$a5ab20b42a0afbae$var$preventScrollSupported) {\n        $a5ab20b42a0afbae$var$preventScrollSupported = false;\n        $a5ab20b42a0afbae$var$restoreScrollStack(stored, 0);\n    }\n}\nfunction $a5ab20b42a0afbae$var$findOffsetInNode(node, coords) {\n    let closest;\n    let dxClosest = 2e8, coordsClosest, offset = 0;\n    let rowBot = coords.top, rowTop = coords.top;\n    let firstBelow, coordsBelow;\n    for(let child = node.firstChild, childIndex = 0; child; child = child.nextSibling, childIndex++){\n        let rects;\n        if ($a5ab20b42a0afbae$var$isElt(child)) rects = child.getClientRects();\n        else if ($a5ab20b42a0afbae$var$isText(child)) rects = $a5ab20b42a0afbae$var$textRange(child).getClientRects();\n        else continue;\n        for(let i = 0; i < rects.length; i++){\n            let rect = rects[i];\n            if (rect.top <= rowBot && rect.bottom >= rowTop) {\n                rowBot = Math.max(rect.bottom, rowBot);\n                rowTop = Math.min(rect.top, rowTop);\n                let dx = rect.left > coords.left ? rect.left - coords.left : rect.right < coords.left ? coords.left - rect.right : 0;\n                if (dx < dxClosest) {\n                    closest = child;\n                    dxClosest = dx;\n                    coordsClosest = dx && $a5ab20b42a0afbae$var$isText(closest) ? {\n                        left: rect.right < coords.left ? rect.right : rect.left,\n                        top: coords.top\n                    } : coords;\n                    if ($a5ab20b42a0afbae$var$isElt(child) && dx) offset = childIndex + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0);\n                    continue;\n                }\n            } else if (rect.top > coords.top && !firstBelow && rect.left <= coords.left && rect.right >= coords.left) {\n                firstBelow = child;\n                coordsBelow = {\n                    left: Math.max(rect.left, Math.min(rect.right, coords.left)),\n                    top: rect.top\n                };\n            }\n            if (!closest && (coords.left >= rect.right && coords.top >= rect.top || coords.left >= rect.left && coords.top >= rect.bottom)) offset = childIndex + 1;\n        }\n    }\n    if (!closest && firstBelow) {\n        closest = firstBelow;\n        coordsClosest = coordsBelow;\n        dxClosest = 0;\n    }\n    if (closest && $a5ab20b42a0afbae$var$isText(closest)) return $a5ab20b42a0afbae$var$findOffsetInText(closest, coordsClosest);\n    if (!closest || dxClosest) return {\n        node: node,\n        offset: offset\n    };\n    return $a5ab20b42a0afbae$var$findOffsetInNode(closest, coordsClosest);\n}\nfunction $a5ab20b42a0afbae$var$findOffsetInText(node, coords) {\n    let len = node.nodeValue.length;\n    let range = document.createRange(), result;\n    for(let i = 0; i < len; i++){\n        range.setEnd(node, i + 1);\n        range.setStart(node, i);\n        let rect = $a5ab20b42a0afbae$var$singleRect(range, 1);\n        if (rect.top == rect.bottom) continue;\n        if ($a5ab20b42a0afbae$var$inRect(coords, rect)) {\n            result = {\n                node: node,\n                offset: i + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0)\n            };\n            break;\n        }\n    }\n    range.detach();\n    return result || {\n        node: node,\n        offset: 0\n    };\n}\nfunction $a5ab20b42a0afbae$var$inRect(coords, rect) {\n    return coords.left >= rect.left - 1 && coords.left <= rect.right + 1 && coords.top >= rect.top - 1 && coords.top <= rect.bottom + 1;\n}\nfunction $a5ab20b42a0afbae$var$targetKludge(dom, coords) {\n    let parent = dom.parentNode;\n    if (parent && /^li$/i.test(parent.nodeName) && coords.left < dom.getBoundingClientRect().left) return parent;\n    return dom;\n}\nfunction $a5ab20b42a0afbae$var$posFromElement(view, elt, coords) {\n    let { node: node, offset: offset } = $a5ab20b42a0afbae$var$findOffsetInNode(elt, coords), bias = -1;\n    if ($a5ab20b42a0afbae$var$isElt(node) && !node.firstChild) {\n        let rect = node.getBoundingClientRect();\n        bias = rect.left != rect.right && coords.left > (rect.left + rect.right) / 2 ? 1 : -1;\n    }\n    return view.docView.posFromDOM(node, offset, bias);\n}\nfunction $a5ab20b42a0afbae$var$posFromCaret(view, node, offset, coords) {\n    // Browser (in caretPosition/RangeFromPoint) will agressively\n    // normalize towards nearby inline nodes. Since we are interested in\n    // positions between block nodes too, we first walk up the hierarchy\n    // of nodes to see if there are block nodes that the coordinates\n    // fall outside of. If so, we take the position before/after that\n    // block. If not, we call `posFromDOM` on the raw node/offset.\n    let outsideBlock = -1;\n    for(let cur = node, sawBlock = false;;){\n        if (cur == view.dom) break;\n        let desc = view.docView.nearestDesc(cur, true), rect;\n        if (!desc) return null;\n        if ($a5ab20b42a0afbae$var$isElt(desc.dom) && (desc.node.isBlock && desc.parent || !desc.contentDOM) && // Ignore elements with zero-size bounding rectangles\n        ((rect = desc.dom.getBoundingClientRect()).width || rect.height)) {\n            if (desc.node.isBlock && desc.parent && !/^T(R|BODY|HEAD|FOOT)$/.test(desc.dom.nodeName)) {\n                // Only apply the horizontal test to the innermost block. Vertical for any parent.\n                if (!sawBlock && rect.left > coords.left || rect.top > coords.top) outsideBlock = desc.posBefore;\n                else if (!sawBlock && rect.right < coords.left || rect.bottom < coords.top) outsideBlock = desc.posAfter;\n                sawBlock = true;\n            }\n            if (!desc.contentDOM && outsideBlock < 0 && !desc.node.isText) {\n                // If we are inside a leaf, return the side of the leaf closer to the coords\n                let before = desc.node.isBlock ? coords.top < (rect.top + rect.bottom) / 2 : coords.left < (rect.left + rect.right) / 2;\n                return before ? desc.posBefore : desc.posAfter;\n            }\n        }\n        cur = desc.dom.parentNode;\n    }\n    return outsideBlock > -1 ? outsideBlock : view.docView.posFromDOM(node, offset, -1);\n}\nfunction $a5ab20b42a0afbae$var$elementFromPoint(element, coords, box) {\n    let len = element.childNodes.length;\n    if (len && box.top < box.bottom) for(let startI = Math.max(0, Math.min(len - 1, Math.floor(len * (coords.top - box.top) / (box.bottom - box.top)) - 2)), i = startI;;){\n        let child = element.childNodes[i];\n        if ($a5ab20b42a0afbae$var$isElt(child)) {\n            let rects = child.getClientRects();\n            for(let j = 0; j < rects.length; j++){\n                let rect = rects[j];\n                if ($a5ab20b42a0afbae$var$inRect(coords, rect)) return $a5ab20b42a0afbae$var$elementFromPoint(child, coords, rect);\n            }\n        }\n        if ((i = (i + 1) % len) == startI) break;\n    }\n    return element;\n}\n// Given an x,y position on the editor, get the position in the document.\nfunction $a5ab20b42a0afbae$var$posAtCoords(view, coords) {\n    let doc = view.dom.ownerDocument, node, offset = 0;\n    let caret = $a5ab20b42a0afbae$var$caretFromPoint(doc, coords.left, coords.top);\n    if (caret) ({ node: node, offset: offset } = caret);\n    let elt = (view.root.elementFromPoint ? view.root : doc).elementFromPoint(coords.left, coords.top);\n    let pos;\n    if (!elt || !view.dom.contains(elt)) {\n        let box = view.dom.getBoundingClientRect();\n        if (!$a5ab20b42a0afbae$var$inRect(coords, box)) return null;\n        elt = $a5ab20b42a0afbae$var$elementFromPoint(view.dom, coords, box);\n        if (!elt) return null;\n    }\n    // Safari's caretRangeFromPoint returns nonsense when on a draggable element\n    if ($a5ab20b42a0afbae$var$safari) {\n        for(let p = elt; node && p; p = $a5ab20b42a0afbae$var$parentNode(p))if (p.draggable) node = undefined;\n    }\n    elt = $a5ab20b42a0afbae$var$targetKludge(elt, coords);\n    if (node) {\n        if ($a5ab20b42a0afbae$var$gecko && $a5ab20b42a0afbae$var$isElt(node)) {\n            // Firefox will sometimes return offsets into <input> nodes, which\n            // have no actual children, from caretPositionFromPoint (#953)\n            offset = Math.min(offset, node.childNodes.length);\n            // It'll also move the returned position before image nodes,\n            // even if those are behind it.\n            if (offset < node.childNodes.length) {\n                let next = node.childNodes[offset], box;\n                if (next.nodeName == \"IMG\" && (box = next.getBoundingClientRect()).right <= coords.left && box.bottom > coords.top) offset++;\n            }\n        }\n        let prev;\n        // When clicking above the right side of an uneditable node, Chrome will report a cursor position after that node.\n        if ($a5ab20b42a0afbae$var$webkit && offset && $a5ab20b42a0afbae$var$isElt(node) && $a5ab20b42a0afbae$var$isElt(prev = node.childNodes[offset - 1]) && prev.contentEditable == \"false\" && prev.getBoundingClientRect().top >= coords.top) offset--;\n        // Suspiciously specific kludge to work around caret*FromPoint\n        // never returning a position at the end of the document\n        if (node == view.dom && offset == node.childNodes.length - 1 && $a5ab20b42a0afbae$var$isElt(node.lastChild) && coords.top > node.lastChild.getBoundingClientRect().bottom) pos = view.state.doc.content.size;\n        else if (offset == 0 || !$a5ab20b42a0afbae$var$isElt(node) || node.childNodes[offset - 1].nodeName != \"BR\") pos = $a5ab20b42a0afbae$var$posFromCaret(view, node, offset, coords);\n    }\n    if (pos == null) pos = $a5ab20b42a0afbae$var$posFromElement(view, elt, coords);\n    let desc = view.docView.nearestDesc(elt, true);\n    return {\n        pos: pos,\n        inside: desc ? desc.posAtStart - desc.border : -1\n    };\n}\nfunction $a5ab20b42a0afbae$var$nonZero(rect) {\n    return rect.top < rect.bottom || rect.left < rect.right;\n}\nfunction $a5ab20b42a0afbae$var$singleRect(target, bias) {\n    let rects = target.getClientRects();\n    if (rects.length) {\n        let first = rects[bias < 0 ? 0 : rects.length - 1];\n        if ($a5ab20b42a0afbae$var$nonZero(first)) return first;\n    }\n    return Array.prototype.find.call(rects, $a5ab20b42a0afbae$var$nonZero) || target.getBoundingClientRect();\n}\nconst $a5ab20b42a0afbae$var$BIDI = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n// Given a position in the document model, get a bounding box of the\n// character at that position, relative to the window.\nfunction $a5ab20b42a0afbae$var$coordsAtPos(view, pos, side) {\n    let { node: node, offset: offset, atom: atom } = view.docView.domFromPos(pos, side < 0 ? -1 : 1);\n    let supportEmptyRange = $a5ab20b42a0afbae$var$webkit || $a5ab20b42a0afbae$var$gecko;\n    if ($a5ab20b42a0afbae$var$isText(node)) {\n        // These browsers support querying empty text ranges. Prefer that in\n        // bidi context or when at the end of a node.\n        if (supportEmptyRange && ($a5ab20b42a0afbae$var$BIDI.test(node.nodeValue) || (side < 0 ? !offset : offset == node.nodeValue.length))) {\n            let rect = $a5ab20b42a0afbae$var$singleRect($a5ab20b42a0afbae$var$textRange(node, offset, offset), side);\n            // Firefox returns bad results (the position before the space)\n            // when querying a position directly after line-broken\n            // whitespace. Detect this situation and and kludge around it\n            if ($a5ab20b42a0afbae$var$gecko && offset && /\\s/.test(node.nodeValue[offset - 1]) && offset < node.nodeValue.length) {\n                let rectBefore = $a5ab20b42a0afbae$var$singleRect($a5ab20b42a0afbae$var$textRange(node, offset - 1, offset - 1), -1);\n                if (rectBefore.top == rect.top) {\n                    let rectAfter = $a5ab20b42a0afbae$var$singleRect($a5ab20b42a0afbae$var$textRange(node, offset, offset + 1), -1);\n                    if (rectAfter.top != rect.top) return $a5ab20b42a0afbae$var$flattenV(rectAfter, rectAfter.left < rectBefore.left);\n                }\n            }\n            return rect;\n        } else {\n            let from = offset, to = offset, takeSide = side < 0 ? 1 : -1;\n            if (side < 0 && !offset) {\n                to++;\n                takeSide = -1;\n            } else if (side >= 0 && offset == node.nodeValue.length) {\n                from--;\n                takeSide = 1;\n            } else if (side < 0) from--;\n            else to++;\n            return $a5ab20b42a0afbae$var$flattenV($a5ab20b42a0afbae$var$singleRect($a5ab20b42a0afbae$var$textRange(node, from, to), takeSide), takeSide < 0);\n        }\n    }\n    let $dom = view.state.doc.resolve(pos - (atom || 0));\n    // Return a horizontal line in block context\n    if (!$dom.parent.inlineContent) {\n        if (atom == null && offset && (side < 0 || offset == $a5ab20b42a0afbae$var$nodeSize(node))) {\n            let before = node.childNodes[offset - 1];\n            if ($a5ab20b42a0afbae$var$isElt(before)) return $a5ab20b42a0afbae$var$flattenH(before.getBoundingClientRect(), false);\n        }\n        if (atom == null && offset < $a5ab20b42a0afbae$var$nodeSize(node)) {\n            let after = node.childNodes[offset];\n            if ($a5ab20b42a0afbae$var$isElt(after)) return $a5ab20b42a0afbae$var$flattenH(after.getBoundingClientRect(), true);\n        }\n        return $a5ab20b42a0afbae$var$flattenH(node.getBoundingClientRect(), side >= 0);\n    }\n    // Inline, not in text node (this is not Bidi-safe)\n    if (atom == null && offset && (side < 0 || offset == $a5ab20b42a0afbae$var$nodeSize(node))) {\n        let before = node.childNodes[offset - 1];\n        let target = $a5ab20b42a0afbae$var$isText(before) ? $a5ab20b42a0afbae$var$textRange(before, $a5ab20b42a0afbae$var$nodeSize(before) - (supportEmptyRange ? 0 : 1)) : $a5ab20b42a0afbae$var$isElt(before) && (before.nodeName != \"BR\" || !before.nextSibling) ? before : null;\n        if (target) return $a5ab20b42a0afbae$var$flattenV($a5ab20b42a0afbae$var$singleRect(target, 1), false);\n    }\n    if (atom == null && offset < $a5ab20b42a0afbae$var$nodeSize(node)) {\n        let after = node.childNodes[offset];\n        while(after.pmViewDesc && after.pmViewDesc.ignoreForCoords)after = after.nextSibling;\n        let target = !after ? null : $a5ab20b42a0afbae$var$isText(after) ? $a5ab20b42a0afbae$var$textRange(after, 0, supportEmptyRange ? 0 : 1) : $a5ab20b42a0afbae$var$isElt(after) ? after : null;\n        if (target) return $a5ab20b42a0afbae$var$flattenV($a5ab20b42a0afbae$var$singleRect(target, -1), true);\n    }\n    // All else failed, just try to get a rectangle for the target node\n    return $a5ab20b42a0afbae$var$flattenV($a5ab20b42a0afbae$var$singleRect($a5ab20b42a0afbae$var$isText(node) ? $a5ab20b42a0afbae$var$textRange(node) : node, -side), side >= 0);\n}\nfunction $a5ab20b42a0afbae$var$flattenV(rect, left) {\n    if (rect.width == 0) return rect;\n    let x = left ? rect.left : rect.right;\n    return {\n        top: rect.top,\n        bottom: rect.bottom,\n        left: x,\n        right: x\n    };\n}\nfunction $a5ab20b42a0afbae$var$flattenH(rect, top) {\n    if (rect.height == 0) return rect;\n    let y = top ? rect.top : rect.bottom;\n    return {\n        top: y,\n        bottom: y,\n        left: rect.left,\n        right: rect.right\n    };\n}\nfunction $a5ab20b42a0afbae$var$withFlushedState(view, state, f) {\n    let viewState = view.state, active = view.root.activeElement;\n    if (viewState != state) view.updateState(state);\n    if (active != view.dom) view.focus();\n    try {\n        return f();\n    } finally{\n        if (viewState != state) view.updateState(viewState);\n        if (active != view.dom && active) active.focus();\n    }\n}\n// Whether vertical position motion in a given direction\n// from a position would leave a text block.\nfunction $a5ab20b42a0afbae$var$endOfTextblockVertical(view, state, dir) {\n    let sel = state.selection;\n    let $pos = dir == \"up\" ? sel.$from : sel.$to;\n    return $a5ab20b42a0afbae$var$withFlushedState(view, state, ()=>{\n        let { node: dom } = view.docView.domFromPos($pos.pos, dir == \"up\" ? -1 : 1);\n        for(;;){\n            let nearest = view.docView.nearestDesc(dom, true);\n            if (!nearest) break;\n            if (nearest.node.isBlock) {\n                dom = nearest.contentDOM || nearest.dom;\n                break;\n            }\n            dom = nearest.dom.parentNode;\n        }\n        let coords = $a5ab20b42a0afbae$var$coordsAtPos(view, $pos.pos, 1);\n        for(let child = dom.firstChild; child; child = child.nextSibling){\n            let boxes;\n            if ($a5ab20b42a0afbae$var$isElt(child)) boxes = child.getClientRects();\n            else if ($a5ab20b42a0afbae$var$isText(child)) boxes = $a5ab20b42a0afbae$var$textRange(child, 0, child.nodeValue.length).getClientRects();\n            else continue;\n            for(let i = 0; i < boxes.length; i++){\n                let box = boxes[i];\n                if (box.bottom > box.top + 1 && (dir == \"up\" ? coords.top - box.top > (box.bottom - coords.top) * 2 : box.bottom - coords.bottom > (coords.bottom - box.top) * 2)) return false;\n            }\n        }\n        return true;\n    });\n}\nconst $a5ab20b42a0afbae$var$maybeRTL = /[\\u0590-\\u08ac]/;\nfunction $a5ab20b42a0afbae$var$endOfTextblockHorizontal(view, state, dir) {\n    let { $head: $head } = state.selection;\n    if (!$head.parent.isTextblock) return false;\n    let offset = $head.parentOffset, atStart = !offset, atEnd = offset == $head.parent.content.size;\n    let sel = view.domSelection();\n    if (!sel) return $head.pos == $head.start() || $head.pos == $head.end();\n    // If the textblock is all LTR, or the browser doesn't support\n    // Selection.modify (Edge), fall back to a primitive approach\n    if (!$a5ab20b42a0afbae$var$maybeRTL.test($head.parent.textContent) || !sel.modify) return dir == \"left\" || dir == \"backward\" ? atStart : atEnd;\n    return $a5ab20b42a0afbae$var$withFlushedState(view, state, ()=>{\n        // This is a huge hack, but appears to be the best we can\n        // currently do: use `Selection.modify` to move the selection by\n        // one character, and see if that moves the cursor out of the\n        // textblock (or doesn't move it at all, when at the start/end of\n        // the document).\n        let { focusNode: oldNode, focusOffset: oldOff, anchorNode: anchorNode, anchorOffset: anchorOffset } = view.domSelectionRange();\n        let oldBidiLevel = sel.caretBidiLevel // Only for Firefox\n        ;\n        sel.modify(\"move\", dir, \"character\");\n        let parentDOM = $head.depth ? view.docView.domAfterPos($head.before()) : view.dom;\n        let { focusNode: newNode, focusOffset: newOff } = view.domSelectionRange();\n        let result = newNode && !$a5ab20b42a0afbae$var$contains(parentDOM, newNode) || oldNode == newNode && oldOff == newOff;\n        // Restore the previous selection\n        try {\n            sel.collapse(anchorNode, anchorOffset);\n            if (oldNode && (oldNode != anchorNode || oldOff != anchorOffset) && sel.extend) sel.extend(oldNode, oldOff);\n        } catch (_) {}\n        if (oldBidiLevel != null) sel.caretBidiLevel = oldBidiLevel;\n        return result;\n    });\n}\nlet $a5ab20b42a0afbae$var$cachedState = null;\nlet $a5ab20b42a0afbae$var$cachedDir = null;\nlet $a5ab20b42a0afbae$var$cachedResult = false;\nfunction $a5ab20b42a0afbae$var$endOfTextblock(view, state, dir) {\n    if ($a5ab20b42a0afbae$var$cachedState == state && $a5ab20b42a0afbae$var$cachedDir == dir) return $a5ab20b42a0afbae$var$cachedResult;\n    $a5ab20b42a0afbae$var$cachedState = state;\n    $a5ab20b42a0afbae$var$cachedDir = dir;\n    return $a5ab20b42a0afbae$var$cachedResult = dir == \"up\" || dir == \"down\" ? $a5ab20b42a0afbae$var$endOfTextblockVertical(view, state, dir) : $a5ab20b42a0afbae$var$endOfTextblockHorizontal(view, state, dir);\n}\n// View descriptions are data structures that describe the DOM that is\n// used to represent the editor's content. They are used for:\n//\n// - Incremental redrawing when the document changes\n//\n// - Figuring out what part of the document a given DOM position\n//   corresponds to\n//\n// - Wiring in custom implementations of the editing interface for a\n//   given node\n//\n// They form a doubly-linked mutable tree, starting at `view.docView`.\nconst $a5ab20b42a0afbae$var$NOT_DIRTY = 0, $a5ab20b42a0afbae$var$CHILD_DIRTY = 1, $a5ab20b42a0afbae$var$CONTENT_DIRTY = 2, $a5ab20b42a0afbae$var$NODE_DIRTY = 3;\n// Superclass for the various kinds of descriptions. Defines their\n// basic structure and shared methods.\nclass $a5ab20b42a0afbae$var$ViewDesc {\n    constructor(parent, children, dom, // This is the node that holds the child views. It may be null for\n    // descs that don't have children.\n    contentDOM){\n        this.parent = parent;\n        this.children = children;\n        this.dom = dom;\n        this.contentDOM = contentDOM;\n        this.dirty = $a5ab20b42a0afbae$var$NOT_DIRTY;\n        // An expando property on the DOM node provides a link back to its\n        // description.\n        dom.pmViewDesc = this;\n    }\n    // Used to check whether a given description corresponds to a\n    // widget/mark/node.\n    matchesWidget(widget) {\n        return false;\n    }\n    matchesMark(mark) {\n        return false;\n    }\n    matchesNode(node, outerDeco, innerDeco) {\n        return false;\n    }\n    matchesHack(nodeName) {\n        return false;\n    }\n    // When parsing in-editor content (in domchange.js), we allow\n    // descriptions to determine the parse rules that should be used to\n    // parse them.\n    parseRule(addedNodes) {\n        return null;\n    }\n    // Used by the editor's event handler to ignore events that come\n    // from certain descs.\n    stopEvent(event) {\n        return false;\n    }\n    // The size of the content represented by this desc.\n    get size() {\n        let size = 0;\n        for(let i = 0; i < this.children.length; i++)size += this.children[i].size;\n        return size;\n    }\n    // For block nodes, this represents the space taken up by their\n    // start/end tokens.\n    get border() {\n        return 0;\n    }\n    destroy() {\n        this.parent = undefined;\n        if (this.dom.pmViewDesc == this) this.dom.pmViewDesc = undefined;\n        for(let i = 0; i < this.children.length; i++)this.children[i].destroy();\n    }\n    posBeforeChild(child) {\n        for(let i = 0, pos = this.posAtStart;; i++){\n            let cur = this.children[i];\n            if (cur == child) return pos;\n            pos += cur.size;\n        }\n    }\n    get posBefore() {\n        return this.parent.posBeforeChild(this);\n    }\n    get posAtStart() {\n        return this.parent ? this.parent.posBeforeChild(this) + this.border : 0;\n    }\n    get posAfter() {\n        return this.posBefore + this.size;\n    }\n    get posAtEnd() {\n        return this.posAtStart + this.size - 2 * this.border;\n    }\n    localPosFromDOM(dom, offset, bias) {\n        // If the DOM position is in the content, use the child desc after\n        // it to figure out a position.\n        if (this.contentDOM && $a5ab20b42a0afbae$var$contains(this.contentDOM, dom)) {\n            if (bias < 0) {\n                let domBefore, desc;\n                if (dom == this.contentDOM) domBefore = dom.childNodes[offset - 1];\n                else {\n                    while(dom.parentNode != this.contentDOM)dom = dom.parentNode;\n                    domBefore = dom.previousSibling;\n                }\n                while(domBefore && !((desc = domBefore.pmViewDesc) && desc.parent == this))domBefore = domBefore.previousSibling;\n                return domBefore ? this.posBeforeChild(desc) + desc.size : this.posAtStart;\n            } else {\n                let domAfter, desc;\n                if (dom == this.contentDOM) domAfter = dom.childNodes[offset];\n                else {\n                    while(dom.parentNode != this.contentDOM)dom = dom.parentNode;\n                    domAfter = dom.nextSibling;\n                }\n                while(domAfter && !((desc = domAfter.pmViewDesc) && desc.parent == this))domAfter = domAfter.nextSibling;\n                return domAfter ? this.posBeforeChild(desc) : this.posAtEnd;\n            }\n        }\n        // Otherwise, use various heuristics, falling back on the bias\n        // parameter, to determine whether to return the position at the\n        // start or at the end of this view desc.\n        let atEnd;\n        if (dom == this.dom && this.contentDOM) atEnd = offset > $a5ab20b42a0afbae$var$domIndex(this.contentDOM);\n        else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM)) atEnd = !!(dom.compareDocumentPosition(this.contentDOM) & 4);\n        else if (this.dom.firstChild) {\n            if (offset == 0) for(let search = dom;; search = search.parentNode){\n                if (search == this.dom) {\n                    atEnd = false;\n                    break;\n                }\n                if (search.previousSibling) break;\n            }\n            if (atEnd == null && offset == dom.childNodes.length) for(let search = dom;; search = search.parentNode){\n                if (search == this.dom) {\n                    atEnd = true;\n                    break;\n                }\n                if (search.nextSibling) break;\n            }\n        }\n        return (atEnd == null ? bias > 0 : atEnd) ? this.posAtEnd : this.posAtStart;\n    }\n    nearestDesc(dom, onlyNodes = false) {\n        for(let first = true, cur = dom; cur; cur = cur.parentNode){\n            let desc = this.getDesc(cur), nodeDOM;\n            if (desc && (!onlyNodes || desc.node)) {\n                // If dom is outside of this desc's nodeDOM, don't count it.\n                if (first && (nodeDOM = desc.nodeDOM) && !($a5ab20b42a0afbae$var$isElt(nodeDOM) ? $a5ab20b42a0afbae$var$contains(nodeDOM, dom) : nodeDOM == dom)) first = false;\n                else return desc;\n            }\n        }\n    }\n    getDesc(dom) {\n        let desc = dom.pmViewDesc;\n        for(let cur = desc; cur; cur = cur.parent)if (cur == this) return desc;\n    }\n    posFromDOM(dom, offset, bias) {\n        for(let scan = dom; scan; scan = scan.parentNode){\n            let desc = this.getDesc(scan);\n            if (desc) return desc.localPosFromDOM(dom, offset, bias);\n        }\n        return -1;\n    }\n    // Find the desc for the node after the given pos, if any. (When a\n    // parent node overrode rendering, there might not be one.)\n    descAt(pos) {\n        for(let i = 0, offset = 0; i < this.children.length; i++){\n            let child = this.children[i], end = offset + child.size;\n            if (offset == pos && end != offset) {\n                while(!child.border && child.children.length)for(let i = 0; i < child.children.length; i++){\n                    let inner = child.children[i];\n                    if (inner.size) {\n                        child = inner;\n                        break;\n                    }\n                }\n                return child;\n            }\n            if (pos < end) return child.descAt(pos - offset - child.border);\n            offset = end;\n        }\n    }\n    domFromPos(pos, side) {\n        if (!this.contentDOM) return {\n            node: this.dom,\n            offset: 0,\n            atom: pos + 1\n        };\n        // First find the position in the child array\n        let i = 0, offset = 0;\n        for(let curPos = 0; i < this.children.length; i++){\n            let child = this.children[i], end = curPos + child.size;\n            if (end > pos) {\n                offset = pos - curPos;\n                break;\n            }\n            curPos = end;\n        }\n        // If this points into the middle of a child, call through\n        if (offset) return this.children[i].domFromPos(offset - this.children[i].border, side);\n        // Go back if there were any zero-length widgets with side >= 0 before this point\n        for(; i > 0; i--){\n            let prev = this.children[i - 1];\n            if (prev.size || !(prev instanceof $a5ab20b42a0afbae$var$BufferHackViewDesc || prev instanceof $a5ab20b42a0afbae$var$WidgetViewDesc && prev.side >= 0)) break;\n        }\n        // Scan towards the first useable node\n        if (side <= 0) {\n            let prev, enter = true;\n            for(;; i--, enter = false){\n                prev = i ? this.children[i - 1] : null;\n                if (!prev || prev.dom.parentNode == this.contentDOM) break;\n            }\n            if (prev && side && enter && !prev.border && !prev.domAtom) return prev.domFromPos(prev.size, side);\n            return {\n                node: this.contentDOM,\n                offset: prev ? $a5ab20b42a0afbae$var$domIndex(prev.dom) + 1 : 0\n            };\n        } else {\n            let next, enter = true;\n            for(;; i++, enter = false){\n                next = i < this.children.length ? this.children[i] : null;\n                if (!next || next.dom.parentNode == this.contentDOM) break;\n            }\n            if (next && enter && !next.border && !next.domAtom) return next.domFromPos(0, side);\n            return {\n                node: this.contentDOM,\n                offset: next ? $a5ab20b42a0afbae$var$domIndex(next.dom) : this.contentDOM.childNodes.length\n            };\n        }\n    }\n    // Used to find a DOM range in a single parent for a given changed\n    // range.\n    parseRange(from, to, base = 0) {\n        if (this.children.length == 0) return {\n            node: this.contentDOM,\n            from: from,\n            to: to,\n            fromOffset: 0,\n            toOffset: this.contentDOM.childNodes.length\n        };\n        let fromOffset = -1, toOffset = -1;\n        for(let offset = base, i = 0;; i++){\n            let child = this.children[i], end = offset + child.size;\n            if (fromOffset == -1 && from <= end) {\n                let childBase = offset + child.border;\n                // FIXME maybe descend mark views to parse a narrower range?\n                if (from >= childBase && to <= end - child.border && child.node && child.contentDOM && this.contentDOM.contains(child.contentDOM)) return child.parseRange(from, to, childBase);\n                from = offset;\n                for(let j = i; j > 0; j--){\n                    let prev = this.children[j - 1];\n                    if (prev.size && prev.dom.parentNode == this.contentDOM && !prev.emptyChildAt(1)) {\n                        fromOffset = $a5ab20b42a0afbae$var$domIndex(prev.dom) + 1;\n                        break;\n                    }\n                    from -= prev.size;\n                }\n                if (fromOffset == -1) fromOffset = 0;\n            }\n            if (fromOffset > -1 && (end > to || i == this.children.length - 1)) {\n                to = end;\n                for(let j = i + 1; j < this.children.length; j++){\n                    let next = this.children[j];\n                    if (next.size && next.dom.parentNode == this.contentDOM && !next.emptyChildAt(-1)) {\n                        toOffset = $a5ab20b42a0afbae$var$domIndex(next.dom);\n                        break;\n                    }\n                    to += next.size;\n                }\n                if (toOffset == -1) toOffset = this.contentDOM.childNodes.length;\n                break;\n            }\n            offset = end;\n        }\n        return {\n            node: this.contentDOM,\n            from: from,\n            to: to,\n            fromOffset: fromOffset,\n            toOffset: toOffset\n        };\n    }\n    emptyChildAt(side) {\n        if (this.border || !this.contentDOM || !this.children.length) return false;\n        let child = this.children[side < 0 ? 0 : this.children.length - 1];\n        return child.size == 0 || child.emptyChildAt(side);\n    }\n    domAfterPos(pos) {\n        let { node: node, offset: offset } = this.domFromPos(pos, 0);\n        if (!$a5ab20b42a0afbae$var$isElt(node) || offset == node.childNodes.length) throw new RangeError(\"No node after pos \" + pos);\n        return node.childNodes[offset];\n    }\n    // View descs are responsible for setting any selection that falls\n    // entirely inside of them, so that custom implementations can do\n    // custom things with the selection. Note that this falls apart when\n    // a selection starts in such a node and ends in another, in which\n    // case we just use whatever domFromPos produces as a best effort.\n    setSelection(anchor, head, view, force = false) {\n        // If the selection falls entirely in a child, give it to that child\n        let from = Math.min(anchor, head), to = Math.max(anchor, head);\n        for(let i = 0, offset = 0; i < this.children.length; i++){\n            let child = this.children[i], end = offset + child.size;\n            if (from > offset && to < end) return child.setSelection(anchor - offset - child.border, head - offset - child.border, view, force);\n            offset = end;\n        }\n        let anchorDOM = this.domFromPos(anchor, anchor ? -1 : 1);\n        let headDOM = head == anchor ? anchorDOM : this.domFromPos(head, head ? -1 : 1);\n        let domSel = view.root.getSelection();\n        let selRange = view.domSelectionRange();\n        let brKludge = false;\n        // On Firefox, using Selection.collapse to put the cursor after a\n        // BR node for some reason doesn't always work (#1073). On Safari,\n        // the cursor sometimes inexplicable visually lags behind its\n        // reported position in such situations (#1092).\n        if (($a5ab20b42a0afbae$var$gecko || $a5ab20b42a0afbae$var$safari) && anchor == head) {\n            let { node: node, offset: offset } = anchorDOM;\n            if ($a5ab20b42a0afbae$var$isText(node)) {\n                brKludge = !!(offset && node.nodeValue[offset - 1] == \"\\n\");\n                // Issue #1128\n                if (brKludge && offset == node.nodeValue.length) for(let scan = node, after; scan; scan = scan.parentNode){\n                    if (after = scan.nextSibling) {\n                        if (after.nodeName == \"BR\") anchorDOM = headDOM = {\n                            node: after.parentNode,\n                            offset: $a5ab20b42a0afbae$var$domIndex(after) + 1\n                        };\n                        break;\n                    }\n                    let desc = scan.pmViewDesc;\n                    if (desc && desc.node && desc.node.isBlock) break;\n                }\n            } else {\n                let prev = node.childNodes[offset - 1];\n                brKludge = prev && (prev.nodeName == \"BR\" || prev.contentEditable == \"false\");\n            }\n        }\n        // Firefox can act strangely when the selection is in front of an\n        // uneditable node. See #1163 and https://bugzilla.mozilla.org/show_bug.cgi?id=1709536\n        if ($a5ab20b42a0afbae$var$gecko && selRange.focusNode && selRange.focusNode != headDOM.node && $a5ab20b42a0afbae$var$isElt(selRange.focusNode)) {\n            let after = selRange.focusNode.childNodes[selRange.focusOffset];\n            if (after && after.contentEditable == \"false\") force = true;\n        }\n        if (!(force || brKludge && $a5ab20b42a0afbae$var$safari) && $a5ab20b42a0afbae$var$isEquivalentPosition(anchorDOM.node, anchorDOM.offset, selRange.anchorNode, selRange.anchorOffset) && $a5ab20b42a0afbae$var$isEquivalentPosition(headDOM.node, headDOM.offset, selRange.focusNode, selRange.focusOffset)) return;\n        // Selection.extend can be used to create an 'inverted' selection\n        // (one where the focus is before the anchor), but not all\n        // browsers support it yet.\n        let domSelExtended = false;\n        if ((domSel.extend || anchor == head) && !(brKludge && $a5ab20b42a0afbae$var$gecko)) {\n            domSel.collapse(anchorDOM.node, anchorDOM.offset);\n            try {\n                if (anchor != head) domSel.extend(headDOM.node, headDOM.offset);\n                domSelExtended = true;\n            } catch (_) {\n            // In some cases with Chrome the selection is empty after calling\n            // collapse, even when it should be valid. This appears to be a bug, but\n            // it is difficult to isolate. If this happens fallback to the old path\n            // without using extend.\n            // Similarly, this could crash on Safari if the editor is hidden, and\n            // there was no selection.\n            }\n        }\n        if (!domSelExtended) {\n            if (anchor > head) {\n                let tmp = anchorDOM;\n                anchorDOM = headDOM;\n                headDOM = tmp;\n            }\n            let range = document.createRange();\n            range.setEnd(headDOM.node, headDOM.offset);\n            range.setStart(anchorDOM.node, anchorDOM.offset);\n            domSel.removeAllRanges();\n            domSel.addRange(range);\n        }\n    }\n    ignoreMutation(mutation) {\n        return !this.contentDOM && mutation.type != \"selection\";\n    }\n    get contentLost() {\n        return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM);\n    }\n    // Remove a subtree of the element tree that has been touched\n    // by a DOM change, so that the next update will redraw it.\n    markDirty(from, to) {\n        for(let offset = 0, i = 0; i < this.children.length; i++){\n            let child = this.children[i], end = offset + child.size;\n            if (offset == end ? from <= end && to >= offset : from < end && to > offset) {\n                let startInside = offset + child.border, endInside = end - child.border;\n                if (from >= startInside && to <= endInside) {\n                    this.dirty = from == offset || to == end ? $a5ab20b42a0afbae$var$CONTENT_DIRTY : $a5ab20b42a0afbae$var$CHILD_DIRTY;\n                    if (from == startInside && to == endInside && (child.contentLost || child.dom.parentNode != this.contentDOM)) child.dirty = $a5ab20b42a0afbae$var$NODE_DIRTY;\n                    else child.markDirty(from - startInside, to - startInside);\n                    return;\n                } else child.dirty = child.dom == child.contentDOM && child.dom.parentNode == this.contentDOM && !child.children.length ? $a5ab20b42a0afbae$var$CONTENT_DIRTY : $a5ab20b42a0afbae$var$NODE_DIRTY;\n            }\n            offset = end;\n        }\n        this.dirty = $a5ab20b42a0afbae$var$CONTENT_DIRTY;\n    }\n    markParentsDirty() {\n        let level = 1;\n        for(let node = this.parent; node; node = node.parent, level++){\n            let dirty = level == 1 ? $a5ab20b42a0afbae$var$CONTENT_DIRTY : $a5ab20b42a0afbae$var$CHILD_DIRTY;\n            if (node.dirty < dirty) node.dirty = dirty;\n        }\n    }\n    get domAtom() {\n        return false;\n    }\n    get ignoreForCoords() {\n        return false;\n    }\n    get ignoreForSelection() {\n        return false;\n    }\n    isText(text) {\n        return false;\n    }\n}\n// A widget desc represents a widget decoration, which is a DOM node\n// drawn between the document nodes.\nclass $a5ab20b42a0afbae$var$WidgetViewDesc extends $a5ab20b42a0afbae$var$ViewDesc {\n    constructor(parent, widget, view, pos){\n        let self, dom = widget.type.toDOM;\n        if (typeof dom == \"function\") dom = dom(view, ()=>{\n            if (!self) return pos;\n            if (self.parent) return self.parent.posBeforeChild(self);\n        });\n        if (!widget.type.spec.raw) {\n            let elt = $a5ab20b42a0afbae$var$isElt(dom) ? dom : document.createElement(\"span\");\n            if (elt != dom) elt.appendChild(dom);\n            if (!elt.hasAttribute(\"contenteditable\")) elt.contentEditable = \"false\";\n            elt.classList.add(\"ProseMirror-widget\");\n        }\n        super(parent, [], dom, null);\n        this.widget = widget;\n        this.widget = widget;\n        self = this;\n    }\n    matchesWidget(widget) {\n        return this.dirty == $a5ab20b42a0afbae$var$NOT_DIRTY && widget.type.eq(this.widget.type);\n    }\n    parseRule() {\n        return {\n            ignore: true\n        };\n    }\n    stopEvent(event) {\n        let stop = this.widget.spec.stopEvent;\n        return stop ? stop(event) : false;\n    }\n    ignoreMutation(mutation) {\n        return mutation.type != \"selection\" || this.widget.spec.ignoreSelection;\n    }\n    destroy() {\n        this.widget.type.destroy(this.dom);\n        super.destroy();\n    }\n    get domAtom() {\n        return true;\n    }\n    get ignoreForSelection() {\n        return !!this.widget.type.spec.relaxedSide;\n    }\n    get side() {\n        return this.widget.type.side;\n    }\n}\nclass $a5ab20b42a0afbae$var$CompositionViewDesc extends $a5ab20b42a0afbae$var$ViewDesc {\n    constructor(parent, dom, textDOM, text){\n        super(parent, [], dom, null);\n        this.textDOM = textDOM;\n        this.text = text;\n    }\n    get size() {\n        return this.text.length;\n    }\n    localPosFromDOM(dom, offset) {\n        if (dom != this.textDOM) return this.posAtStart + (offset ? this.size : 0);\n        return this.posAtStart + offset;\n    }\n    domFromPos(pos) {\n        return {\n            node: this.textDOM,\n            offset: pos\n        };\n    }\n    ignoreMutation(mut) {\n        return mut.type === 'characterData' && mut.target.nodeValue == mut.oldValue;\n    }\n}\n// A mark desc represents a mark. May have multiple children,\n// depending on how the mark is split. Note that marks are drawn using\n// a fixed nesting order, for simplicity and predictability, so in\n// some cases they will be split more often than would appear\n// necessary.\nclass $a5ab20b42a0afbae$var$MarkViewDesc extends $a5ab20b42a0afbae$var$ViewDesc {\n    constructor(parent, mark, dom, contentDOM, spec){\n        super(parent, [], dom, contentDOM);\n        this.mark = mark;\n        this.spec = spec;\n    }\n    static create(parent, mark, inline, view) {\n        let custom = view.nodeViews[mark.type.name];\n        let spec = custom && custom(mark, view, inline);\n        if (!spec || !spec.dom) spec = (0, $1krlL.DOMSerializer).renderSpec(document, mark.type.spec.toDOM(mark, inline), null, mark.attrs);\n        return new $a5ab20b42a0afbae$var$MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom, spec);\n    }\n    parseRule() {\n        if (this.dirty & $a5ab20b42a0afbae$var$NODE_DIRTY || this.mark.type.spec.reparseInView) return null;\n        return {\n            mark: this.mark.type.name,\n            attrs: this.mark.attrs,\n            contentElement: this.contentDOM\n        };\n    }\n    matchesMark(mark) {\n        return this.dirty != $a5ab20b42a0afbae$var$NODE_DIRTY && this.mark.eq(mark);\n    }\n    markDirty(from, to) {\n        super.markDirty(from, to);\n        // Move dirty info to nearest node view\n        if (this.dirty != $a5ab20b42a0afbae$var$NOT_DIRTY) {\n            let parent = this.parent;\n            while(!parent.node)parent = parent.parent;\n            if (parent.dirty < this.dirty) parent.dirty = this.dirty;\n            this.dirty = $a5ab20b42a0afbae$var$NOT_DIRTY;\n        }\n    }\n    slice(from, to, view) {\n        let copy = $a5ab20b42a0afbae$var$MarkViewDesc.create(this.parent, this.mark, true, view);\n        let nodes = this.children, size = this.size;\n        if (to < size) nodes = $a5ab20b42a0afbae$var$replaceNodes(nodes, to, size, view);\n        if (from > 0) nodes = $a5ab20b42a0afbae$var$replaceNodes(nodes, 0, from, view);\n        for(let i = 0; i < nodes.length; i++)nodes[i].parent = copy;\n        copy.children = nodes;\n        return copy;\n    }\n    ignoreMutation(mutation) {\n        return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : super.ignoreMutation(mutation);\n    }\n    destroy() {\n        if (this.spec.destroy) this.spec.destroy();\n        super.destroy();\n    }\n}\n// Node view descs are the main, most common type of view desc, and\n// correspond to an actual node in the document. Unlike mark descs,\n// they populate their child array themselves.\nclass $a5ab20b42a0afbae$var$NodeViewDesc extends $a5ab20b42a0afbae$var$ViewDesc {\n    constructor(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM){\n        super(parent, [], dom, contentDOM);\n        this.node = node;\n        this.outerDeco = outerDeco;\n        this.innerDeco = innerDeco;\n        this.nodeDOM = nodeDOM;\n    }\n    // By default, a node is rendered using the `toDOM` method from the\n    // node type spec. But client code can use the `nodeViews` spec to\n    // supply a custom node view, which can influence various aspects of\n    // the way the node works.\n    //\n    // (Using subclassing for this was intentionally decided against,\n    // since it'd require exposing a whole slew of finicky\n    // implementation details to the user code that they probably will\n    // never need.)\n    static create(parent, node, outerDeco, innerDeco, view, pos) {\n        let custom = view.nodeViews[node.type.name], descObj;\n        let spec = custom && custom(node, view, ()=>{\n            // (This is a function that allows the custom view to find its\n            // own position)\n            if (!descObj) return pos;\n            if (descObj.parent) return descObj.parent.posBeforeChild(descObj);\n        }, outerDeco, innerDeco);\n        let dom = spec && spec.dom, contentDOM = spec && spec.contentDOM;\n        if (node.isText) {\n            if (!dom) dom = document.createTextNode(node.text);\n            else if (!$a5ab20b42a0afbae$var$isText(dom)) throw new RangeError(\"Text must be rendered as a DOM text node\");\n        } else if (!dom) {\n            let spec = (0, $1krlL.DOMSerializer).renderSpec(document, node.type.spec.toDOM(node), null, node.attrs);\n            ({ dom: dom, contentDOM: contentDOM } = spec);\n        }\n        if (!contentDOM && !node.isText && dom.nodeName != \"BR\") {\n            if (!dom.hasAttribute(\"contenteditable\")) dom.contentEditable = \"false\";\n            if (node.type.spec.draggable) dom.draggable = true;\n        }\n        let nodeDOM = dom;\n        dom = $a5ab20b42a0afbae$var$applyOuterDeco(dom, outerDeco, node);\n        if (spec) return descObj = new $a5ab20b42a0afbae$var$CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM, spec);\n        else if (node.isText) return new $a5ab20b42a0afbae$var$TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM);\n        else return new $a5ab20b42a0afbae$var$NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM);\n    }\n    parseRule(addedNodes) {\n        // Experimental kludge to allow opt-in re-parsing of nodes\n        if (this.node.type.spec.reparseInView) return null;\n        // FIXME the assumption that this can always return the current\n        // attrs means that if the user somehow manages to change the\n        // attrs in the dom, that won't be picked up. Not entirely sure\n        // whether this is a problem\n        let rule = {\n            node: this.node.type.name,\n            attrs: this.node.attrs\n        };\n        if (this.node.type.whitespace == \"pre\") rule.preserveWhitespace = \"full\";\n        if (!this.contentDOM) rule.getContent = ()=>this.node.content;\n        else if (!this.contentLost) rule.contentElement = this.contentDOM;\n        else {\n            // Chrome likes to randomly recreate parent nodes when\n            // backspacing things. When that happens, this tries to find the\n            // new parent.\n            for(let i = this.children.length - 1; i >= 0; i--){\n                let child = this.children[i];\n                if (this.dom.contains(child.dom.parentNode)) {\n                    rule.contentElement = child.dom.parentNode;\n                    break;\n                }\n            }\n            if (!rule.contentElement) {\n                let found = addedNodes && addedNodes.find((n)=>$a5ab20b42a0afbae$var$isElt(n) && addedNodes.indexOf(n.parentNode) < 0 && this.dom.contains(n));\n                if (found) rule.contentElement = found;\n                else rule.getContent = ()=>(0, $1krlL.Fragment).empty;\n            }\n        }\n        return rule;\n    }\n    matchesNode(node, outerDeco, innerDeco) {\n        return this.dirty == $a5ab20b42a0afbae$var$NOT_DIRTY && node.eq(this.node) && $a5ab20b42a0afbae$var$sameOuterDeco(outerDeco, this.outerDeco) && innerDeco.eq(this.innerDeco);\n    }\n    get size() {\n        return this.node.nodeSize;\n    }\n    get border() {\n        return this.node.isLeaf ? 0 : 1;\n    }\n    // Syncs `this.children` to match `this.node.content` and the local\n    // decorations, possibly introducing nesting for marks. Then, in a\n    // separate step, syncs the DOM inside `this.contentDOM` to\n    // `this.children`.\n    updateChildren(view, pos) {\n        let inline = this.node.inlineContent, off = pos;\n        let composition = view.composing ? this.localCompositionInfo(view, pos) : null;\n        let localComposition = composition && composition.pos > -1 ? composition : null;\n        let compositionInChild = composition && composition.pos < 0;\n        let updater = new $a5ab20b42a0afbae$var$ViewTreeUpdater(this, localComposition && localComposition.node, view);\n        let addBuffers = this.node.inlineContent, atBufferPos = addBuffers && this.node.isBlock;\n        $a5ab20b42a0afbae$var$iterDeco(this.node, this.innerDeco, (widget, i, insideNode)=>{\n            if (widget.spec.marks) updater.syncToMarks(widget.spec.marks, inline, view, i);\n            else if (widget.type.side >= 0 && !insideNode) updater.syncToMarks(i == this.node.childCount ? (0, $1krlL.Mark).none : this.node.child(i).marks, inline, view, i);\n            // If the next node is a desc matching this widget, reuse it,\n            // otherwise insert the widget as a new view desc.\n            updater.placeWidget(widget, view, off);\n        }, (child, outerDeco, innerDeco, i)=>{\n            // Make sure the wrapping mark descs match the node's marks.\n            updater.syncToMarks(child.marks, inline, view, i);\n            if (atBufferPos && child.isAtom && !child.isText) updater.addHackNode(\"IMG\", updater.top);\n            // Try several strategies for drawing this node\n            let compIndex;\n            if (updater.findNodeMatch(child, outerDeco, innerDeco, i)) ;\n            else if (compositionInChild && view.state.selection.from > off && view.state.selection.to < off + child.nodeSize && (compIndex = updater.findIndexWithChild(composition.node)) > -1 && updater.updateNodeAt(child, outerDeco, innerDeco, compIndex, view)) ;\n            else if (updater.updateNextNode(child, outerDeco, innerDeco, view, i, off)) ;\n            else // Add it as a new view\n            updater.addNode(child, outerDeco, innerDeco, view, off);\n            off += child.nodeSize;\n            if (addBuffers) atBufferPos = child.isAtom && !child.isText;\n        });\n        // Drop all remaining descs after the current position.\n        updater.syncToMarks([], inline, view, 0);\n        if (this.node.isTextblock) updater.addTextblockHacks();\n        updater.destroyRest();\n        // Sync the DOM if anything changed\n        if (updater.changed || this.dirty == $a5ab20b42a0afbae$var$CONTENT_DIRTY) {\n            // May have to protect focused DOM from being changed if a composition is active\n            if (localComposition) this.protectLocalComposition(view, localComposition);\n            $a5ab20b42a0afbae$var$renderDescs(this.contentDOM, this.children, view);\n            if ($a5ab20b42a0afbae$var$ios) $a5ab20b42a0afbae$var$iosHacks(this.dom);\n        }\n    }\n    localCompositionInfo(view, pos) {\n        // Only do something if both the selection and a focused text node\n        // are inside of this node\n        let { from: from, to: to } = view.state.selection;\n        if (!(view.state.selection instanceof (0, $1LeRC.TextSelection)) || from < pos || to > pos + this.node.content.size) return null;\n        let textNode = view.input.compositionNode;\n        if (!textNode || !this.dom.contains(textNode.parentNode)) return null;\n        if (this.node.inlineContent) {\n            // Find the text in the focused node in the node, stop if it's not\n            // there (may have been modified through other means, in which\n            // case it should overwritten)\n            let text = textNode.nodeValue;\n            let textPos = $a5ab20b42a0afbae$var$findTextInFragment(this.node.content, text, from - pos, to - pos);\n            return textPos < 0 ? null : {\n                node: textNode,\n                pos: textPos,\n                text: text\n            };\n        } else return {\n            node: textNode,\n            pos: -1,\n            text: \"\"\n        };\n    }\n    protectLocalComposition(view, { node: node, pos: pos, text: text }) {\n        // The node is already part of a local view desc, leave it there\n        if (this.getDesc(node)) return;\n        // Create a composition view for the orphaned nodes\n        let topNode = node;\n        for(;; topNode = topNode.parentNode){\n            if (topNode.parentNode == this.contentDOM) break;\n            while(topNode.previousSibling)topNode.parentNode.removeChild(topNode.previousSibling);\n            while(topNode.nextSibling)topNode.parentNode.removeChild(topNode.nextSibling);\n            if (topNode.pmViewDesc) topNode.pmViewDesc = undefined;\n        }\n        let desc = new $a5ab20b42a0afbae$var$CompositionViewDesc(this, topNode, node, text);\n        view.input.compositionNodes.push(desc);\n        // Patch up this.children to contain the composition view\n        this.children = $a5ab20b42a0afbae$var$replaceNodes(this.children, pos, pos + text.length, view, desc);\n    }\n    // If this desc must be updated to match the given node decoration,\n    // do so and return true.\n    update(node, outerDeco, innerDeco, view) {\n        if (this.dirty == $a5ab20b42a0afbae$var$NODE_DIRTY || !node.sameMarkup(this.node)) return false;\n        this.updateInner(node, outerDeco, innerDeco, view);\n        return true;\n    }\n    updateInner(node, outerDeco, innerDeco, view) {\n        this.updateOuterDeco(outerDeco);\n        this.node = node;\n        this.innerDeco = innerDeco;\n        if (this.contentDOM) this.updateChildren(view, this.posAtStart);\n        this.dirty = $a5ab20b42a0afbae$var$NOT_DIRTY;\n    }\n    updateOuterDeco(outerDeco) {\n        if ($a5ab20b42a0afbae$var$sameOuterDeco(outerDeco, this.outerDeco)) return;\n        let needsWrap = !$a5ab20b42a0afbae$var$isElt(this.nodeDOM);\n        let oldDOM = this.dom;\n        this.dom = $a5ab20b42a0afbae$var$patchOuterDeco(this.dom, this.nodeDOM, $a5ab20b42a0afbae$var$computeOuterDeco(this.outerDeco, this.node, needsWrap), $a5ab20b42a0afbae$var$computeOuterDeco(outerDeco, this.node, needsWrap));\n        if (this.dom != oldDOM) {\n            oldDOM.pmViewDesc = undefined;\n            this.dom.pmViewDesc = this;\n        }\n        this.outerDeco = outerDeco;\n    }\n    // Mark this node as being the selected node.\n    selectNode() {\n        if ($a5ab20b42a0afbae$var$isElt(this.nodeDOM)) {\n            this.nodeDOM.classList.add(\"ProseMirror-selectednode\");\n            if (this.contentDOM || !this.node.type.spec.draggable) this.nodeDOM.draggable = true;\n        }\n    }\n    // Remove selected node marking from this node.\n    deselectNode() {\n        if ($a5ab20b42a0afbae$var$isElt(this.nodeDOM)) {\n            this.nodeDOM.classList.remove(\"ProseMirror-selectednode\");\n            if (this.contentDOM || !this.node.type.spec.draggable) this.nodeDOM.removeAttribute(\"draggable\");\n        }\n    }\n    get domAtom() {\n        return this.node.isAtom;\n    }\n}\n// Create a view desc for the top-level document node, to be exported\n// and used by the view class.\nfunction $a5ab20b42a0afbae$var$docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n    $a5ab20b42a0afbae$var$applyOuterDeco(dom, outerDeco, doc);\n    let docView = new $a5ab20b42a0afbae$var$NodeViewDesc(undefined, doc, outerDeco, innerDeco, dom, dom, dom);\n    if (docView.contentDOM) docView.updateChildren(view, 0);\n    return docView;\n}\nclass $a5ab20b42a0afbae$var$TextViewDesc extends $a5ab20b42a0afbae$var$NodeViewDesc {\n    constructor(parent, node, outerDeco, innerDeco, dom, nodeDOM){\n        super(parent, node, outerDeco, innerDeco, dom, null, nodeDOM);\n    }\n    parseRule() {\n        let skip = this.nodeDOM.parentNode;\n        while(skip && skip != this.dom && !skip.pmIsDeco)skip = skip.parentNode;\n        return {\n            skip: skip || true\n        };\n    }\n    update(node, outerDeco, innerDeco, view) {\n        if (this.dirty == $a5ab20b42a0afbae$var$NODE_DIRTY || this.dirty != $a5ab20b42a0afbae$var$NOT_DIRTY && !this.inParent() || !node.sameMarkup(this.node)) return false;\n        this.updateOuterDeco(outerDeco);\n        if ((this.dirty != $a5ab20b42a0afbae$var$NOT_DIRTY || node.text != this.node.text) && node.text != this.nodeDOM.nodeValue) {\n            this.nodeDOM.nodeValue = node.text;\n            if (view.trackWrites == this.nodeDOM) view.trackWrites = null;\n        }\n        this.node = node;\n        this.dirty = $a5ab20b42a0afbae$var$NOT_DIRTY;\n        return true;\n    }\n    inParent() {\n        let parentDOM = this.parent.contentDOM;\n        for(let n = this.nodeDOM; n; n = n.parentNode)if (n == parentDOM) return true;\n        return false;\n    }\n    domFromPos(pos) {\n        return {\n            node: this.nodeDOM,\n            offset: pos\n        };\n    }\n    localPosFromDOM(dom, offset, bias) {\n        if (dom == this.nodeDOM) return this.posAtStart + Math.min(offset, this.node.text.length);\n        return super.localPosFromDOM(dom, offset, bias);\n    }\n    ignoreMutation(mutation) {\n        return mutation.type != \"characterData\" && mutation.type != \"selection\";\n    }\n    slice(from, to, _view) {\n        let node = this.node.cut(from, to), dom = document.createTextNode(node.text);\n        return new $a5ab20b42a0afbae$var$TextViewDesc(this.parent, node, this.outerDeco, this.innerDeco, dom, dom);\n    }\n    markDirty(from, to) {\n        super.markDirty(from, to);\n        if (this.dom != this.nodeDOM && (from == 0 || to == this.nodeDOM.nodeValue.length)) this.dirty = $a5ab20b42a0afbae$var$NODE_DIRTY;\n    }\n    get domAtom() {\n        return false;\n    }\n    isText(text) {\n        return this.node.text == text;\n    }\n}\n// A dummy desc used to tag extra BR or IMG nodes created to work\n// around contentEditable terribleness.\nclass $a5ab20b42a0afbae$var$BufferHackViewDesc extends $a5ab20b42a0afbae$var$ViewDesc {\n    parseRule() {\n        return {\n            ignore: true\n        };\n    }\n    matchesHack(nodeName) {\n        return this.dirty == $a5ab20b42a0afbae$var$NOT_DIRTY && this.dom.nodeName == nodeName;\n    }\n    get domAtom() {\n        return true;\n    }\n    get ignoreForCoords() {\n        return this.dom.nodeName == \"IMG\";\n    }\n}\n// A separate subclass is used for customized node views, so that the\n// extra checks only have to be made for nodes that are actually\n// customized.\nclass $a5ab20b42a0afbae$var$CustomNodeViewDesc extends $a5ab20b42a0afbae$var$NodeViewDesc {\n    constructor(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec){\n        super(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM);\n        this.spec = spec;\n    }\n    // A custom `update` method gets to decide whether the update goes\n    // through. If it does, and there's a `contentDOM` node, our logic\n    // updates the children.\n    update(node, outerDeco, innerDeco, view) {\n        if (this.dirty == $a5ab20b42a0afbae$var$NODE_DIRTY) return false;\n        if (this.spec.update && (this.node.type == node.type || this.spec.multiType)) {\n            let result = this.spec.update(node, outerDeco, innerDeco);\n            if (result) this.updateInner(node, outerDeco, innerDeco, view);\n            return result;\n        } else if (!this.contentDOM && !node.isLeaf) return false;\n        else return super.update(node, outerDeco, innerDeco, view);\n    }\n    selectNode() {\n        this.spec.selectNode ? this.spec.selectNode() : super.selectNode();\n    }\n    deselectNode() {\n        this.spec.deselectNode ? this.spec.deselectNode() : super.deselectNode();\n    }\n    setSelection(anchor, head, view, force) {\n        this.spec.setSelection ? this.spec.setSelection(anchor, head, view.root) : super.setSelection(anchor, head, view, force);\n    }\n    destroy() {\n        if (this.spec.destroy) this.spec.destroy();\n        super.destroy();\n    }\n    stopEvent(event) {\n        return this.spec.stopEvent ? this.spec.stopEvent(event) : false;\n    }\n    ignoreMutation(mutation) {\n        return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : super.ignoreMutation(mutation);\n    }\n}\n// Sync the content of the given DOM node with the nodes associated\n// with the given array of view descs, recursing into mark descs\n// because this should sync the subtree for a whole node at a time.\nfunction $a5ab20b42a0afbae$var$renderDescs(parentDOM, descs, view) {\n    let dom = parentDOM.firstChild, written = false;\n    for(let i = 0; i < descs.length; i++){\n        let desc = descs[i], childDOM = desc.dom;\n        if (childDOM.parentNode == parentDOM) {\n            while(childDOM != dom){\n                dom = $a5ab20b42a0afbae$var$rm(dom);\n                written = true;\n            }\n            dom = dom.nextSibling;\n        } else {\n            written = true;\n            parentDOM.insertBefore(childDOM, dom);\n        }\n        if (desc instanceof $a5ab20b42a0afbae$var$MarkViewDesc) {\n            let pos = dom ? dom.previousSibling : parentDOM.lastChild;\n            $a5ab20b42a0afbae$var$renderDescs(desc.contentDOM, desc.children, view);\n            dom = pos ? pos.nextSibling : parentDOM.firstChild;\n        }\n    }\n    while(dom){\n        dom = $a5ab20b42a0afbae$var$rm(dom);\n        written = true;\n    }\n    if (written && view.trackWrites == parentDOM) view.trackWrites = null;\n}\nconst $a5ab20b42a0afbae$var$OuterDecoLevel = function(nodeName) {\n    if (nodeName) this.nodeName = nodeName;\n};\n$a5ab20b42a0afbae$var$OuterDecoLevel.prototype = Object.create(null);\nconst $a5ab20b42a0afbae$var$noDeco = [\n    new $a5ab20b42a0afbae$var$OuterDecoLevel\n];\nfunction $a5ab20b42a0afbae$var$computeOuterDeco(outerDeco, node, needsWrap) {\n    if (outerDeco.length == 0) return $a5ab20b42a0afbae$var$noDeco;\n    let top = needsWrap ? $a5ab20b42a0afbae$var$noDeco[0] : new $a5ab20b42a0afbae$var$OuterDecoLevel, result = [\n        top\n    ];\n    for(let i = 0; i < outerDeco.length; i++){\n        let attrs = outerDeco[i].type.attrs;\n        if (!attrs) continue;\n        if (attrs.nodeName) result.push(top = new $a5ab20b42a0afbae$var$OuterDecoLevel(attrs.nodeName));\n        for(let name in attrs){\n            let val = attrs[name];\n            if (val == null) continue;\n            if (needsWrap && result.length == 1) result.push(top = new $a5ab20b42a0afbae$var$OuterDecoLevel(node.isInline ? \"span\" : \"div\"));\n            if (name == \"class\") top.class = (top.class ? top.class + \" \" : \"\") + val;\n            else if (name == \"style\") top.style = (top.style ? top.style + \";\" : \"\") + val;\n            else if (name != \"nodeName\") top[name] = val;\n        }\n    }\n    return result;\n}\nfunction $a5ab20b42a0afbae$var$patchOuterDeco(outerDOM, nodeDOM, prevComputed, curComputed) {\n    // Shortcut for trivial case\n    if (prevComputed == $a5ab20b42a0afbae$var$noDeco && curComputed == $a5ab20b42a0afbae$var$noDeco) return nodeDOM;\n    let curDOM = nodeDOM;\n    for(let i = 0; i < curComputed.length; i++){\n        let deco = curComputed[i], prev = prevComputed[i];\n        if (i) {\n            let parent;\n            if (prev && prev.nodeName == deco.nodeName && curDOM != outerDOM && (parent = curDOM.parentNode) && parent.nodeName.toLowerCase() == deco.nodeName) curDOM = parent;\n            else {\n                parent = document.createElement(deco.nodeName);\n                parent.pmIsDeco = true;\n                parent.appendChild(curDOM);\n                prev = $a5ab20b42a0afbae$var$noDeco[0];\n                curDOM = parent;\n            }\n        }\n        $a5ab20b42a0afbae$var$patchAttributes(curDOM, prev || $a5ab20b42a0afbae$var$noDeco[0], deco);\n    }\n    return curDOM;\n}\nfunction $a5ab20b42a0afbae$var$patchAttributes(dom, prev, cur) {\n    for(let name in prev)if (name != \"class\" && name != \"style\" && name != \"nodeName\" && !(name in cur)) dom.removeAttribute(name);\n    for(let name in cur)if (name != \"class\" && name != \"style\" && name != \"nodeName\" && cur[name] != prev[name]) dom.setAttribute(name, cur[name]);\n    if (prev.class != cur.class) {\n        let prevList = prev.class ? prev.class.split(\" \").filter(Boolean) : [];\n        let curList = cur.class ? cur.class.split(\" \").filter(Boolean) : [];\n        for(let i = 0; i < prevList.length; i++)if (curList.indexOf(prevList[i]) == -1) dom.classList.remove(prevList[i]);\n        for(let i = 0; i < curList.length; i++)if (prevList.indexOf(curList[i]) == -1) dom.classList.add(curList[i]);\n        if (dom.classList.length == 0) dom.removeAttribute(\"class\");\n    }\n    if (prev.style != cur.style) {\n        if (prev.style) {\n            let prop = /\\s*([\\w\\-\\xa1-\\uffff]+)\\s*:(?:\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|\\(.*?\\)|[^;])*/g, m;\n            while(m = prop.exec(prev.style))dom.style.removeProperty(m[1]);\n        }\n        if (cur.style) dom.style.cssText += cur.style;\n    }\n}\nfunction $a5ab20b42a0afbae$var$applyOuterDeco(dom, deco, node) {\n    return $a5ab20b42a0afbae$var$patchOuterDeco(dom, dom, $a5ab20b42a0afbae$var$noDeco, $a5ab20b42a0afbae$var$computeOuterDeco(deco, node, !$a5ab20b42a0afbae$var$isElt(dom)));\n}\nfunction $a5ab20b42a0afbae$var$sameOuterDeco(a, b) {\n    if (a.length != b.length) return false;\n    for(let i = 0; i < a.length; i++)if (!a[i].type.eq(b[i].type)) return false;\n    return true;\n}\n// Remove a DOM node and return its next sibling.\nfunction $a5ab20b42a0afbae$var$rm(dom) {\n    let next = dom.nextSibling;\n    dom.parentNode.removeChild(dom);\n    return next;\n}\n// Helper class for incrementally updating a tree of mark descs and\n// the widget and node descs inside of them.\nclass $a5ab20b42a0afbae$var$ViewTreeUpdater {\n    constructor(top, lock, view){\n        this.lock = lock;\n        this.view = view;\n        // Index into `this.top`'s child array, represents the current\n        // update position.\n        this.index = 0;\n        // When entering a mark, the current top and index are pushed\n        // onto this.\n        this.stack = [];\n        // Tracks whether anything was changed\n        this.changed = false;\n        this.top = top;\n        this.preMatch = $a5ab20b42a0afbae$var$preMatch(top.node.content, top);\n    }\n    // Destroy and remove the children between the given indices in\n    // `this.top`.\n    destroyBetween(start, end) {\n        if (start == end) return;\n        for(let i = start; i < end; i++)this.top.children[i].destroy();\n        this.top.children.splice(start, end - start);\n        this.changed = true;\n    }\n    // Destroy all remaining children in `this.top`.\n    destroyRest() {\n        this.destroyBetween(this.index, this.top.children.length);\n    }\n    // Sync the current stack of mark descs with the given array of\n    // marks, reusing existing mark descs when possible.\n    syncToMarks(marks, inline, view, parentIndex) {\n        let keep = 0, depth = this.stack.length >> 1;\n        let maxKeep = Math.min(depth, marks.length);\n        while(keep < maxKeep && (keep == depth - 1 ? this.top : this.stack[keep + 1 << 1]).matchesMark(marks[keep]) && marks[keep].type.spec.spanning !== false)keep++;\n        while(keep < depth){\n            this.destroyRest();\n            this.top.dirty = $a5ab20b42a0afbae$var$NOT_DIRTY;\n            this.index = this.stack.pop();\n            this.top = this.stack.pop();\n            depth--;\n        }\n        while(depth < marks.length){\n            this.stack.push(this.top, this.index + 1);\n            let found = -1, scanTo = this.top.children.length;\n            if (parentIndex < this.preMatch.index) scanTo = Math.min(this.index + 3, scanTo);\n            for(let i = this.index; i < scanTo; i++){\n                let next = this.top.children[i];\n                if (next.matchesMark(marks[depth]) && !this.isLocked(next.dom)) {\n                    found = i;\n                    break;\n                }\n            }\n            // When nothing matches, try to update the mark view at this position\n            // in place, so a custom mark view can adapt to a changed mark without\n            // re-creating its DOM.\n            if (found < 0 && this.index < this.top.children.length) {\n                let cur = this.top.children[this.index];\n                if (cur instanceof $a5ab20b42a0afbae$var$MarkViewDesc && cur.dirty != $a5ab20b42a0afbae$var$NODE_DIRTY && cur.mark.type == marks[depth].type && cur.spec.update && !this.isLocked(cur.dom) && cur.spec.update(marks[depth])) {\n                    cur.mark = marks[depth];\n                    found = this.index;\n                    this.changed = true;\n                }\n            }\n            if (found > -1) {\n                if (found > this.index) {\n                    this.changed = true;\n                    this.destroyBetween(this.index, found);\n                }\n                this.top = this.top.children[this.index];\n            } else {\n                let markDesc = $a5ab20b42a0afbae$var$MarkViewDesc.create(this.top, marks[depth], inline, view);\n                this.top.children.splice(this.index, 0, markDesc);\n                this.top = markDesc;\n                this.changed = true;\n            }\n            this.index = 0;\n            depth++;\n        }\n    }\n    // Try to find a node desc matching the given data. Skip over it and\n    // return true when successful.\n    findNodeMatch(node, outerDeco, innerDeco, index) {\n        let found = -1, targetDesc;\n        if (index >= this.preMatch.index && (targetDesc = this.preMatch.matches[index - this.preMatch.index]).parent == this.top && targetDesc.matchesNode(node, outerDeco, innerDeco)) found = this.top.children.indexOf(targetDesc, this.index);\n        else for(let i = this.index, e = Math.min(this.top.children.length, i + 5); i < e; i++){\n            let child = this.top.children[i];\n            if (child.matchesNode(node, outerDeco, innerDeco) && !this.preMatch.matched.has(child)) {\n                found = i;\n                break;\n            }\n        }\n        if (found < 0) return false;\n        this.destroyBetween(this.index, found);\n        this.index++;\n        return true;\n    }\n    updateNodeAt(node, outerDeco, innerDeco, index, view) {\n        let child = this.top.children[index];\n        if (child.dirty == $a5ab20b42a0afbae$var$NODE_DIRTY && child.dom == child.contentDOM) child.dirty = $a5ab20b42a0afbae$var$CONTENT_DIRTY;\n        if (!child.update(node, outerDeco, innerDeco, view)) return false;\n        this.destroyBetween(this.index, index);\n        this.index++;\n        return true;\n    }\n    findIndexWithChild(domNode) {\n        for(;;){\n            let parent = domNode.parentNode;\n            if (!parent) return -1;\n            if (parent == this.top.contentDOM) {\n                let desc = domNode.pmViewDesc;\n                if (desc) for(let i = this.index; i < this.top.children.length; i++){\n                    if (this.top.children[i] == desc) return i;\n                }\n                return -1;\n            }\n            domNode = parent;\n        }\n    }\n    // Try to update the next node, if any, to the given data. Checks\n    // pre-matches to avoid overwriting nodes that could still be used.\n    updateNextNode(node, outerDeco, innerDeco, view, index, pos) {\n        for(let i = this.index; i < this.top.children.length; i++){\n            let next = this.top.children[i];\n            if (next instanceof $a5ab20b42a0afbae$var$NodeViewDesc) {\n                let preMatch = this.preMatch.matched.get(next);\n                if (preMatch != null && preMatch != index) return false;\n                let nextDOM = next.dom, updated;\n                // Can't update if nextDOM is or contains this.lock, except if\n                // it's a text node whose content already matches the new text\n                // and whose decorations match the new ones.\n                let locked = this.isLocked(nextDOM) && !(node.isText && next.node && next.node.isText && next.nodeDOM.nodeValue == node.text && next.dirty != $a5ab20b42a0afbae$var$NODE_DIRTY && $a5ab20b42a0afbae$var$sameOuterDeco(outerDeco, next.outerDeco));\n                if (!locked && next.update(node, outerDeco, innerDeco, view)) {\n                    this.destroyBetween(this.index, i);\n                    if (next.dom != nextDOM) this.changed = true;\n                    this.index++;\n                    return true;\n                } else if (!locked && (updated = this.recreateWrapper(next, node, outerDeco, innerDeco, view, pos))) {\n                    this.destroyBetween(this.index, i);\n                    this.top.children[this.index] = updated;\n                    if (updated.contentDOM) {\n                        updated.dirty = $a5ab20b42a0afbae$var$CONTENT_DIRTY;\n                        updated.updateChildren(view, pos + 1);\n                        updated.dirty = $a5ab20b42a0afbae$var$NOT_DIRTY;\n                    }\n                    this.changed = true;\n                    this.index++;\n                    return true;\n                }\n                break;\n            }\n        }\n        return false;\n    }\n    // When a node with content is replaced by a different node with\n    // identical content, move over its children.\n    recreateWrapper(next, node, outerDeco, innerDeco, view, pos) {\n        if (next.dirty || node.isAtom || !next.children.length || !next.node.content.eq(node.content) || !$a5ab20b42a0afbae$var$sameOuterDeco(outerDeco, next.outerDeco) || !innerDeco.eq(next.innerDeco)) return null;\n        let wrapper = $a5ab20b42a0afbae$var$NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos);\n        if (wrapper.contentDOM) {\n            wrapper.children = next.children;\n            next.children = [];\n            for (let ch of wrapper.children)ch.parent = wrapper;\n        }\n        next.destroy();\n        return wrapper;\n    }\n    // Insert the node as a newly created node desc.\n    addNode(node, outerDeco, innerDeco, view, pos) {\n        let desc = $a5ab20b42a0afbae$var$NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos);\n        if (desc.contentDOM) desc.updateChildren(view, pos + 1);\n        this.top.children.splice(this.index++, 0, desc);\n        this.changed = true;\n    }\n    placeWidget(widget, view, pos) {\n        let next = this.index < this.top.children.length ? this.top.children[this.index] : null;\n        if (next && next.matchesWidget(widget) && (widget == next.widget || !next.widget.type.toDOM.parentNode)) this.index++;\n        else {\n            let desc = new $a5ab20b42a0afbae$var$WidgetViewDesc(this.top, widget, view, pos);\n            this.top.children.splice(this.index++, 0, desc);\n            this.changed = true;\n        }\n    }\n    // Make sure a textblock looks and behaves correctly in\n    // contentEditable.\n    addTextblockHacks() {\n        let lastChild = this.top.children[this.index - 1], parent = this.top;\n        while(lastChild instanceof $a5ab20b42a0afbae$var$MarkViewDesc){\n            parent = lastChild;\n            lastChild = parent.children[parent.children.length - 1];\n        }\n        if (!lastChild || // Empty textblock\n        !(lastChild instanceof $a5ab20b42a0afbae$var$TextViewDesc) || /\\n$/.test(lastChild.node.text) || this.view.requiresGeckoHackNode && /\\s$/.test(lastChild.node.text)) {\n            // Avoid bugs in Safari's cursor drawing (#1165) and Chrome's mouse selection (#1152)\n            if (($a5ab20b42a0afbae$var$safari || $a5ab20b42a0afbae$var$chrome) && lastChild && lastChild.dom.contentEditable == \"false\") this.addHackNode(\"IMG\", parent);\n            this.addHackNode(\"BR\", this.top);\n        }\n    }\n    addHackNode(nodeName, parent) {\n        if (parent == this.top && this.index < parent.children.length && parent.children[this.index].matchesHack(nodeName)) this.index++;\n        else {\n            let dom = document.createElement(nodeName);\n            if (nodeName == \"IMG\") {\n                dom.className = \"ProseMirror-separator\";\n                dom.alt = \"\";\n            }\n            if (nodeName == \"BR\") dom.className = \"ProseMirror-trailingBreak\";\n            let hack = new $a5ab20b42a0afbae$var$BufferHackViewDesc(this.top, [], dom, null);\n            if (parent != this.top) parent.children.push(hack);\n            else parent.children.splice(this.index++, 0, hack);\n            this.changed = true;\n        }\n    }\n    isLocked(node) {\n        return this.lock && (node == this.lock || $a5ab20b42a0afbae$var$isElt(node) && node.contains(this.lock.parentNode));\n    }\n}\n// Iterate from the end of the fragment and array of descs to find\n// directly matching ones, in order to avoid overeagerly reusing those\n// for other nodes.\nfunction $a5ab20b42a0afbae$var$preMatch(frag, parentDesc) {\n    let curDesc = parentDesc, descI = curDesc.children.length;\n    let fI = frag.childCount, matched = new Map, matches = [];\n    outer: while(fI > 0){\n        let desc;\n        for(;;){\n            if (descI) {\n                let next = curDesc.children[descI - 1];\n                if (next instanceof $a5ab20b42a0afbae$var$MarkViewDesc) {\n                    curDesc = next;\n                    descI = next.children.length;\n                } else {\n                    desc = next;\n                    descI--;\n                    break;\n                }\n            } else if (curDesc == parentDesc) break outer;\n            else {\n                descI = curDesc.parent.children.indexOf(curDesc);\n                curDesc = curDesc.parent;\n            }\n        }\n        let node = desc.node;\n        if (!node) continue;\n        if (node != frag.child(fI - 1)) break;\n        --fI;\n        matched.set(desc, fI);\n        matches.push(desc);\n    }\n    return {\n        index: fI,\n        matched: matched,\n        matches: matches.reverse()\n    };\n}\nfunction $a5ab20b42a0afbae$var$compareSide(a, b) {\n    return a.type.side - b.type.side;\n}\n// This function abstracts iterating over the nodes and decorations in\n// a fragment. Calls `onNode` for each node, with its local and child\n// decorations. Splits text nodes when there is a decoration starting\n// or ending inside of them. Calls `onWidget` for each widget.\nfunction $a5ab20b42a0afbae$var$iterDeco(parent, deco, onWidget, onNode) {\n    let locals = deco.locals(parent), offset = 0;\n    // Simple, cheap variant for when there are no local decorations\n    if (locals.length == 0) {\n        for(let i = 0; i < parent.childCount; i++){\n            let child = parent.child(i);\n            onNode(child, locals, deco.forChild(offset, child), i);\n            offset += child.nodeSize;\n        }\n        return;\n    }\n    let decoIndex = 0, active = [], restNode = null;\n    for(let parentIndex = 0;;){\n        let widget, widgets;\n        while(decoIndex < locals.length && locals[decoIndex].to == offset){\n            let next = locals[decoIndex++];\n            if (next.widget) {\n                if (!widget) widget = next;\n                else (widgets || (widgets = [\n                    widget\n                ])).push(next);\n            }\n        }\n        if (widget) {\n            if (widgets) {\n                widgets.sort($a5ab20b42a0afbae$var$compareSide);\n                for(let i = 0; i < widgets.length; i++)onWidget(widgets[i], parentIndex, !!restNode);\n            } else onWidget(widget, parentIndex, !!restNode);\n        }\n        let child, index;\n        if (restNode) {\n            index = -1;\n            child = restNode;\n            restNode = null;\n        } else if (parentIndex < parent.childCount) {\n            index = parentIndex;\n            child = parent.child(parentIndex++);\n        } else break;\n        for(let i = 0; i < active.length; i++)if (active[i].to <= offset) active.splice(i--, 1);\n        while(decoIndex < locals.length && locals[decoIndex].from <= offset && locals[decoIndex].to > offset)active.push(locals[decoIndex++]);\n        let end = offset + child.nodeSize;\n        if (child.isText) {\n            let cutAt = end;\n            if (decoIndex < locals.length && locals[decoIndex].from < cutAt) cutAt = locals[decoIndex].from;\n            for(let i = 0; i < active.length; i++)if (active[i].to < cutAt) cutAt = active[i].to;\n            if (cutAt < end) {\n                restNode = child.cut(cutAt - offset);\n                child = child.cut(0, cutAt - offset);\n                end = cutAt;\n                index = -1;\n            }\n        } else while(decoIndex < locals.length && locals[decoIndex].to < end)decoIndex++;\n        let outerDeco = child.isInline && !child.isLeaf ? active.filter((d)=>!d.inline) : active.slice();\n        onNode(child, outerDeco, deco.forChild(offset, child), index);\n        offset = end;\n    }\n}\n// List markers in Mobile Safari will mysteriously disappear\n// sometimes. This works around that.\nfunction $a5ab20b42a0afbae$var$iosHacks(dom) {\n    if (dom.nodeName == \"UL\" || dom.nodeName == \"OL\") {\n        let oldCSS = dom.style.cssText;\n        dom.style.cssText = oldCSS + \"; list-style: square !important\";\n        window.getComputedStyle(dom).listStyle;\n        dom.style.cssText = oldCSS;\n    }\n}\n// Find a piece of text in an inline fragment, overlapping from-to\nfunction $a5ab20b42a0afbae$var$findTextInFragment(frag, text, from, to) {\n    for(let i = 0, pos = 0; i < frag.childCount && pos <= to;){\n        let child = frag.child(i++), childStart = pos;\n        pos += child.nodeSize;\n        if (!child.isText) continue;\n        let str = child.text;\n        while(i < frag.childCount){\n            let next = frag.child(i++);\n            pos += next.nodeSize;\n            if (!next.isText) break;\n            str += next.text;\n        }\n        if (pos >= from) {\n            if (pos >= to && str.slice(to - text.length - childStart, to - childStart) == text) return to - text.length;\n            let found = childStart < to ? str.lastIndexOf(text, to - childStart - 1) : -1;\n            if (found >= 0 && found + text.length + childStart >= from) return childStart + found;\n            if (from == to && str.length >= to + text.length - childStart && str.slice(to - childStart, to - childStart + text.length) == text) return to;\n        }\n    }\n    return -1;\n}\n// Replace range from-to in an array of view descs with replacement\n// (may be null to just delete). This goes very much against the grain\n// of the rest of this code, which tends to create nodes with the\n// right shape in one go, rather than messing with them after\n// creation, but is necessary in the composition hack.\nfunction $a5ab20b42a0afbae$var$replaceNodes(nodes, from, to, view, replacement) {\n    let result = [];\n    for(let i = 0, off = 0; i < nodes.length; i++){\n        let child = nodes[i], start = off, end = off += child.size;\n        if (start >= to || end <= from) result.push(child);\n        else {\n            if (start < from) result.push(child.slice(0, from - start, view));\n            if (replacement) {\n                result.push(replacement);\n                replacement = undefined;\n            }\n            if (end > to) result.push(child.slice(to - start, child.size, view));\n        }\n    }\n    return result;\n}\nfunction $a5ab20b42a0afbae$var$selectionFromDOM(view, origin = null) {\n    let domSel = view.domSelectionRange(), doc = view.state.doc;\n    if (!domSel.focusNode) return null;\n    let nearestDesc = view.docView.nearestDesc(domSel.focusNode), inWidget = nearestDesc && nearestDesc.size == 0;\n    let head = view.docView.posFromDOM(domSel.focusNode, domSel.focusOffset, 1);\n    if (head < 0) return null;\n    let $head = doc.resolve(head), anchor, selection;\n    if ($a5ab20b42a0afbae$var$selectionCollapsed(domSel)) {\n        anchor = head;\n        while(nearestDesc && !nearestDesc.node)nearestDesc = nearestDesc.parent;\n        if (nearestDesc && nearestDesc.node.isAtom && (0, $1LeRC.NodeSelection).isSelectable(nearestDesc.node) && nearestDesc.parent && !(nearestDesc.node.isInline && $a5ab20b42a0afbae$var$isOnEdge(domSel.focusNode, domSel.focusOffset, nearestDesc.dom))) {\n            let pos = nearestDesc.posBefore;\n            selection = new (0, $1LeRC.NodeSelection)(head == pos ? $head : doc.resolve(pos));\n        } else if ($a5ab20b42a0afbae$var$gecko && origin == \"key\" && head > view.state.selection.to && $a5ab20b42a0afbae$var$isElt(domSel.focusNode) && domSel.focusOffset == domSel.focusNode.childNodes.length && nearestDesc && nearestDesc.posAtStart > view.state.selection.to) // Firefox will jump across scrollable wrapper nodes on keyboard\n        // cursor motion (#1594). This tries to detect this situation\n        // and work around it.\n        for(let scan = domSel.focusNode;; scan = scan.parentNode){\n            if (getComputedStyle(scan).overflow != \"visible\") {\n                selection = (0, $1LeRC.Selection).findFrom(doc.resolve(nearestDesc.posAtStart), 1);\n                break;\n            }\n            if (scan == nearestDesc.dom || scan.nextSibling || !scan.parentNode || !$a5ab20b42a0afbae$var$isElt(scan.parentNode)) break;\n        }\n    } else {\n        if (domSel instanceof view.dom.ownerDocument.defaultView.Selection && domSel.rangeCount > 1) {\n            let min = head, max = head;\n            for(let i = 0; i < domSel.rangeCount; i++){\n                let range = domSel.getRangeAt(i);\n                min = Math.min(min, view.docView.posFromDOM(range.startContainer, range.startOffset, 1));\n                max = Math.max(max, view.docView.posFromDOM(range.endContainer, range.endOffset, -1));\n            }\n            if (min < 0) return null;\n            [anchor, head] = max == view.state.selection.anchor ? [\n                max,\n                min\n            ] : [\n                min,\n                max\n            ];\n            $head = doc.resolve(head);\n        } else anchor = view.docView.posFromDOM(domSel.anchorNode, domSel.anchorOffset, 1);\n        if (anchor < 0) return null;\n    }\n    let $anchor = doc.resolve(anchor);\n    if (!selection) {\n        let bias = origin == \"pointer\" || view.state.selection.head < $head.pos && !inWidget ? 1 : -1;\n        selection = $a5ab20b42a0afbae$var$selectionBetween(view, $anchor, $head, bias);\n    }\n    return selection;\n}\nfunction $a5ab20b42a0afbae$var$editorOwnsSelection(view) {\n    return view.editable ? view.hasFocus() : $a5ab20b42a0afbae$var$hasSelection(view) && document.activeElement && document.activeElement.contains(view.dom);\n}\nfunction $a5ab20b42a0afbae$var$selectionToDOM(view, force = false) {\n    let sel = view.state.selection;\n    $a5ab20b42a0afbae$var$syncNodeSelection(view, sel);\n    if (!$a5ab20b42a0afbae$var$editorOwnsSelection(view)) return;\n    // Need to delay selection normalization during a native selection\n    // drag on Chrome, or it will cause further dragging to glitch.\n    let mouseDown = view.input.mouseDown;\n    if (!force && $a5ab20b42a0afbae$var$chrome && mouseDown) {\n        let domSel = view.domSelectionRange(), curSel = view.domObserver.currentSelection;\n        if (domSel.anchorNode && curSel.anchorNode && $a5ab20b42a0afbae$var$isEquivalentPosition(domSel.anchorNode, domSel.anchorOffset, curSel.anchorNode, curSel.anchorOffset) && mouseDown.delaySelUpdate()) {\n            view.domObserver.setCurSelection();\n            return;\n        }\n    }\n    view.domObserver.disconnectSelection();\n    if (view.cursorWrapper) $a5ab20b42a0afbae$var$selectCursorWrapper(view);\n    else {\n        let { anchor: anchor, head: head } = sel, resetEditableFrom, resetEditableTo;\n        if ($a5ab20b42a0afbae$var$brokenSelectBetweenUneditable && !(sel instanceof (0, $1LeRC.TextSelection))) {\n            if (!sel.$from.parent.inlineContent) resetEditableFrom = $a5ab20b42a0afbae$var$temporarilyEditableNear(view, sel.from);\n            if (!sel.empty && !sel.$from.parent.inlineContent) resetEditableTo = $a5ab20b42a0afbae$var$temporarilyEditableNear(view, sel.to);\n        }\n        view.docView.setSelection(anchor, head, view, force);\n        if ($a5ab20b42a0afbae$var$brokenSelectBetweenUneditable) {\n            if (resetEditableFrom) $a5ab20b42a0afbae$var$resetEditable(resetEditableFrom);\n            if (resetEditableTo) $a5ab20b42a0afbae$var$resetEditable(resetEditableTo);\n        }\n        if (sel.visible) view.dom.classList.remove(\"ProseMirror-hideselection\");\n        else {\n            view.dom.classList.add(\"ProseMirror-hideselection\");\n            if (\"onselectionchange\" in document) $a5ab20b42a0afbae$var$removeClassOnSelectionChange(view);\n        }\n    }\n    view.domObserver.setCurSelection();\n    view.domObserver.connectSelection();\n}\n// Kludge to work around Webkit not allowing a selection to start/end\n// between non-editable block nodes. We briefly make something\n// editable, set the selection, then set it uneditable again.\nconst $a5ab20b42a0afbae$var$brokenSelectBetweenUneditable = $a5ab20b42a0afbae$var$safari || $a5ab20b42a0afbae$var$chrome && $a5ab20b42a0afbae$var$chrome_version < 63;\nfunction $a5ab20b42a0afbae$var$temporarilyEditableNear(view, pos) {\n    let { node: node, offset: offset } = view.docView.domFromPos(pos, 0);\n    let after = offset < node.childNodes.length ? node.childNodes[offset] : null;\n    let before = offset ? node.childNodes[offset - 1] : null;\n    if ($a5ab20b42a0afbae$var$safari && after && after.contentEditable == \"false\") return $a5ab20b42a0afbae$var$setEditable(after);\n    if ((!after || after.contentEditable == \"false\") && (!before || before.contentEditable == \"false\")) {\n        if (after) return $a5ab20b42a0afbae$var$setEditable(after);\n        else if (before) return $a5ab20b42a0afbae$var$setEditable(before);\n    }\n}\nfunction $a5ab20b42a0afbae$var$setEditable(element) {\n    element.contentEditable = \"true\";\n    if ($a5ab20b42a0afbae$var$safari && element.draggable) {\n        element.draggable = false;\n        element.wasDraggable = true;\n    }\n    return element;\n}\nfunction $a5ab20b42a0afbae$var$resetEditable(element) {\n    element.contentEditable = \"false\";\n    if (element.wasDraggable) {\n        element.draggable = true;\n        element.wasDraggable = null;\n    }\n}\nfunction $a5ab20b42a0afbae$var$removeClassOnSelectionChange(view) {\n    let doc = view.dom.ownerDocument;\n    doc.removeEventListener(\"selectionchange\", view.input.hideSelectionGuard);\n    let domSel = view.domSelectionRange();\n    let node = domSel.anchorNode, offset = domSel.anchorOffset;\n    doc.addEventListener(\"selectionchange\", view.input.hideSelectionGuard = ()=>{\n        if (domSel.anchorNode != node || domSel.anchorOffset != offset) {\n            doc.removeEventListener(\"selectionchange\", view.input.hideSelectionGuard);\n            setTimeout(()=>{\n                if (!$a5ab20b42a0afbae$var$editorOwnsSelection(view) || view.state.selection.visible) view.dom.classList.remove(\"ProseMirror-hideselection\");\n            }, 20);\n        }\n    });\n}\nfunction $a5ab20b42a0afbae$var$selectCursorWrapper(view) {\n    let domSel = view.domSelection();\n    if (!domSel) return;\n    let node = view.cursorWrapper.dom, img = node.nodeName == \"IMG\";\n    if (img) domSel.collapse(node.parentNode, $a5ab20b42a0afbae$var$domIndex(node) + 1);\n    else domSel.collapse(node, 0);\n    // Kludge to kill 'control selection' in IE11 when selecting an\n    // invisible cursor wrapper, since that would result in those weird\n    // resize handles and a selection that considers the absolutely\n    // positioned wrapper, rather than the root editable node, the\n    // focused element.\n    if (!img && !view.state.selection.visible && $a5ab20b42a0afbae$var$ie && $a5ab20b42a0afbae$var$ie_version <= 11) {\n        node.disabled = true;\n        node.disabled = false;\n    }\n}\nfunction $a5ab20b42a0afbae$var$syncNodeSelection(view, sel) {\n    if (sel instanceof (0, $1LeRC.NodeSelection)) {\n        let desc = view.docView.descAt(sel.from);\n        if (desc != view.lastSelectedViewDesc) {\n            $a5ab20b42a0afbae$var$clearNodeSelection(view);\n            if (desc) desc.selectNode();\n            view.lastSelectedViewDesc = desc;\n        }\n    } else $a5ab20b42a0afbae$var$clearNodeSelection(view);\n}\n// Clear all DOM statefulness of the last node selection.\nfunction $a5ab20b42a0afbae$var$clearNodeSelection(view) {\n    if (view.lastSelectedViewDesc) {\n        if (view.lastSelectedViewDesc.parent) view.lastSelectedViewDesc.deselectNode();\n        view.lastSelectedViewDesc = undefined;\n    }\n}\nfunction $a5ab20b42a0afbae$var$selectionBetween(view, $anchor, $head, bias) {\n    return view.someProp(\"createSelectionBetween\", (f)=>f(view, $anchor, $head)) || (0, $1LeRC.TextSelection).between($anchor, $head, bias);\n}\nfunction $a5ab20b42a0afbae$var$hasFocusAndSelection(view) {\n    if (view.editable && !view.hasFocus()) return false;\n    return $a5ab20b42a0afbae$var$hasSelection(view);\n}\nfunction $a5ab20b42a0afbae$var$hasSelection(view) {\n    let sel = view.domSelectionRange();\n    if (!sel.anchorNode) return false;\n    try {\n        // Firefox will raise 'permission denied' errors when accessing\n        // properties of `sel.anchorNode` when it's in a generated CSS\n        // element.\n        return $a5ab20b42a0afbae$var$contains(view.dom, sel.anchorNode) && (view.editable || $a5ab20b42a0afbae$var$contains(view.dom, sel.focusNode));\n    } catch (_) {\n        return false;\n    }\n}\nfunction $a5ab20b42a0afbae$var$anchorInRightPlace(view) {\n    let anchorDOM = view.docView.domFromPos(view.state.selection.anchor, 0);\n    let domSel = view.domSelectionRange();\n    return $a5ab20b42a0afbae$var$isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset);\n}\nfunction $a5ab20b42a0afbae$var$moveSelectionBlock(state, dir) {\n    let { $anchor: $anchor, $head: $head } = state.selection;\n    let $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);\n    let $start = !$side.parent.inlineContent ? $side : $side.depth ? state.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;\n    return $start && (0, $1LeRC.Selection).findFrom($start, dir);\n}\nfunction $a5ab20b42a0afbae$var$apply(view, sel) {\n    view.dispatch(view.state.tr.setSelection(sel).scrollIntoView());\n    return true;\n}\nfunction $a5ab20b42a0afbae$var$selectHorizontally(view, dir, mods) {\n    let sel = view.state.selection;\n    if (sel instanceof (0, $1LeRC.TextSelection)) {\n        if (mods.indexOf(\"s\") > -1) {\n            let { $head: $head } = sel, node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter;\n            if (!node || node.isText || !node.isLeaf) return false;\n            let $newHead = view.state.doc.resolve($head.pos + node.nodeSize * (dir < 0 ? -1 : 1));\n            return $a5ab20b42a0afbae$var$apply(view, new (0, $1LeRC.TextSelection)(sel.$anchor, $newHead));\n        } else if (!sel.empty) return false;\n        else if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\")) {\n            let next = $a5ab20b42a0afbae$var$moveSelectionBlock(view.state, dir);\n            if (next && next instanceof (0, $1LeRC.NodeSelection)) return $a5ab20b42a0afbae$var$apply(view, next);\n            return false;\n        } else if (!($a5ab20b42a0afbae$var$mac && mods.indexOf(\"m\") > -1)) {\n            let $head = sel.$head, node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter, desc;\n            if (!node || node.isText) return false;\n            let nodePos = dir < 0 ? $head.pos - node.nodeSize : $head.pos;\n            if (!(node.isAtom || (desc = view.docView.descAt(nodePos)) && !desc.contentDOM)) return false;\n            if ((0, $1LeRC.NodeSelection).isSelectable(node)) return $a5ab20b42a0afbae$var$apply(view, new (0, $1LeRC.NodeSelection)(dir < 0 ? view.state.doc.resolve($head.pos - node.nodeSize) : $head));\n            else // Chrome and Safari will introduce extra pointless cursor\n            // positions around inline uneditable nodes (#937), and\n            // Firefox will sometimes just plain refuse to move across\n            // them (#1592), so in this situation we move the cursor\n            // ourselves.\n            return $a5ab20b42a0afbae$var$apply(view, new (0, $1LeRC.TextSelection)(view.state.doc.resolve(dir < 0 ? nodePos : nodePos + node.nodeSize)));\n        }\n    } else if (sel instanceof (0, $1LeRC.NodeSelection) && sel.node.isInline) return $a5ab20b42a0afbae$var$apply(view, new (0, $1LeRC.TextSelection)(dir > 0 ? sel.$to : sel.$from));\n    else {\n        let next = $a5ab20b42a0afbae$var$moveSelectionBlock(view.state, dir);\n        if (next) return $a5ab20b42a0afbae$var$apply(view, next);\n        return false;\n    }\n}\nfunction $a5ab20b42a0afbae$var$isIgnorable(dom, dir) {\n    let desc = dom.pmViewDesc;\n    return desc ? desc.size == 0 && (dir < 0 || dom.nextSibling || dom.nodeName != \"BR\") : $a5ab20b42a0afbae$var$isElt(dom) && dom.contentEditable == \"false\";\n}\nfunction $a5ab20b42a0afbae$var$skipIgnoredNodes(view, dir) {\n    return dir < 0 ? $a5ab20b42a0afbae$var$skipIgnoredNodesBefore(view) : $a5ab20b42a0afbae$var$skipIgnoredNodesAfter(view);\n}\n// Make sure the cursor isn't directly after one or more ignored\n// nodes, which will confuse the browser's cursor motion logic.\nfunction $a5ab20b42a0afbae$var$skipIgnoredNodesBefore(view) {\n    let sel = view.domSelectionRange();\n    let node = sel.focusNode, offset = sel.focusOffset;\n    if (!node) return;\n    let moveNode, moveOffset, force = false;\n    // Gecko will do odd things when the selection is directly in front\n    // of a non-editable node, so in that case, move it into the next\n    // node if possible. Issue prosemirror/prosemirror#832.\n    if ($a5ab20b42a0afbae$var$gecko && $a5ab20b42a0afbae$var$isElt(node) && offset < $a5ab20b42a0afbae$var$nodeSize(node) && $a5ab20b42a0afbae$var$isIgnorable(node.childNodes[offset], -1)) force = true;\n    for(;;){\n        if (offset > 0) {\n            if (!$a5ab20b42a0afbae$var$isElt(node)) break;\n            let before = node.childNodes[offset - 1];\n            if ($a5ab20b42a0afbae$var$isIgnorable(before, -1)) {\n                moveNode = node;\n                moveOffset = --offset;\n            } else if ($a5ab20b42a0afbae$var$isText(before)) {\n                node = before;\n                offset = node.nodeValue.length;\n            } else break;\n        } else if ($a5ab20b42a0afbae$var$isBlockNode(node)) break;\n        else {\n            let prev = node.previousSibling;\n            while(prev && $a5ab20b42a0afbae$var$isIgnorable(prev, -1)){\n                moveNode = node.parentNode;\n                moveOffset = $a5ab20b42a0afbae$var$domIndex(prev);\n                prev = prev.previousSibling;\n            }\n            if (!prev) {\n                node = node.parentNode;\n                if (node == view.dom) break;\n                offset = 0;\n            } else {\n                node = prev;\n                offset = $a5ab20b42a0afbae$var$nodeSize(node);\n            }\n        }\n    }\n    if (force) $a5ab20b42a0afbae$var$setSelFocus(view, node, offset);\n    else if (moveNode) $a5ab20b42a0afbae$var$setSelFocus(view, moveNode, moveOffset);\n}\n// Make sure the cursor isn't directly before one or more ignored\n// nodes.\nfunction $a5ab20b42a0afbae$var$skipIgnoredNodesAfter(view) {\n    let sel = view.domSelectionRange();\n    let node = sel.focusNode, offset = sel.focusOffset;\n    if (!node) return;\n    let len = $a5ab20b42a0afbae$var$nodeSize(node);\n    let moveNode, moveOffset;\n    for(;;){\n        if (offset < len) {\n            if (!$a5ab20b42a0afbae$var$isElt(node)) break;\n            let after = node.childNodes[offset];\n            if ($a5ab20b42a0afbae$var$isIgnorable(after, 1)) {\n                moveNode = node;\n                moveOffset = ++offset;\n            } else break;\n        } else if ($a5ab20b42a0afbae$var$isBlockNode(node)) break;\n        else {\n            let next = node.nextSibling;\n            while(next && $a5ab20b42a0afbae$var$isIgnorable(next, 1)){\n                moveNode = next.parentNode;\n                moveOffset = $a5ab20b42a0afbae$var$domIndex(next) + 1;\n                next = next.nextSibling;\n            }\n            if (!next) {\n                node = node.parentNode;\n                if (node == view.dom) break;\n                offset = len = 0;\n            } else {\n                node = next;\n                offset = 0;\n                len = $a5ab20b42a0afbae$var$nodeSize(node);\n            }\n        }\n    }\n    if (moveNode) $a5ab20b42a0afbae$var$setSelFocus(view, moveNode, moveOffset);\n}\nfunction $a5ab20b42a0afbae$var$isBlockNode(dom) {\n    let desc = dom.pmViewDesc;\n    return desc && desc.node && desc.node.isBlock;\n}\nfunction $a5ab20b42a0afbae$var$textNodeAfter(node, offset) {\n    while(node && offset == node.childNodes.length && !$a5ab20b42a0afbae$var$hasBlockDesc(node)){\n        offset = $a5ab20b42a0afbae$var$domIndex(node) + 1;\n        node = node.parentNode;\n    }\n    while(node && offset < node.childNodes.length){\n        let next = node.childNodes[offset];\n        if ($a5ab20b42a0afbae$var$isText(next)) return next;\n        if ($a5ab20b42a0afbae$var$isElt(next) && next.contentEditable == \"false\") break;\n        node = next;\n        offset = 0;\n    }\n}\nfunction $a5ab20b42a0afbae$var$textNodeBefore(node, offset) {\n    while(node && !offset && !$a5ab20b42a0afbae$var$hasBlockDesc(node)){\n        offset = $a5ab20b42a0afbae$var$domIndex(node);\n        node = node.parentNode;\n    }\n    while(node && offset){\n        let next = node.childNodes[offset - 1];\n        if ($a5ab20b42a0afbae$var$isText(next)) return next;\n        if ($a5ab20b42a0afbae$var$isElt(next) && next.contentEditable == \"false\") break;\n        node = next;\n        offset = node.childNodes.length;\n    }\n}\nfunction $a5ab20b42a0afbae$var$setSelFocus(view, node, offset) {\n    if (!$a5ab20b42a0afbae$var$isText(node)) {\n        let before, after;\n        if (after = $a5ab20b42a0afbae$var$textNodeAfter(node, offset)) {\n            node = after;\n            offset = 0;\n        } else if (before = $a5ab20b42a0afbae$var$textNodeBefore(node, offset)) {\n            node = before;\n            offset = before.nodeValue.length;\n        }\n    }\n    let sel = view.domSelection();\n    if (!sel) return;\n    if ($a5ab20b42a0afbae$var$selectionCollapsed(sel)) {\n        let range = document.createRange();\n        range.setEnd(node, offset);\n        range.setStart(node, offset);\n        sel.removeAllRanges();\n        sel.addRange(range);\n    } else if (sel.extend) sel.extend(node, offset);\n    view.domObserver.setCurSelection();\n    let { state: state } = view;\n    // If no state update ends up happening, reset the selection.\n    setTimeout(()=>{\n        if (view.state == state) $a5ab20b42a0afbae$var$selectionToDOM(view);\n    }, 50);\n}\nfunction $a5ab20b42a0afbae$var$findDirection(view, pos) {\n    let $pos = view.state.doc.resolve(pos);\n    if (!($a5ab20b42a0afbae$var$chrome || $a5ab20b42a0afbae$var$windows) && $pos.parent.inlineContent) {\n        let coords = view.coordsAtPos(pos);\n        if (pos > $pos.start()) {\n            let before = view.coordsAtPos(pos - 1);\n            let mid = (before.top + before.bottom) / 2;\n            if (mid > coords.top && mid < coords.bottom && Math.abs(before.left - coords.left) > 1) return before.left < coords.left ? \"ltr\" : \"rtl\";\n        }\n        if (pos < $pos.end()) {\n            let after = view.coordsAtPos(pos + 1);\n            let mid = (after.top + after.bottom) / 2;\n            if (mid > coords.top && mid < coords.bottom && Math.abs(after.left - coords.left) > 1) return after.left > coords.left ? \"ltr\" : \"rtl\";\n        }\n    }\n    let computed = getComputedStyle(view.dom).direction;\n    return computed == \"rtl\" ? \"rtl\" : \"ltr\";\n}\n// Check whether vertical selection motion would involve node\n// selections. If so, apply it (if not, the result is left to the\n// browser)\nfunction $a5ab20b42a0afbae$var$selectVertically(view, dir, mods) {\n    let sel = view.state.selection;\n    if (sel instanceof (0, $1LeRC.TextSelection) && !sel.empty || mods.indexOf(\"s\") > -1) return false;\n    if ($a5ab20b42a0afbae$var$mac && mods.indexOf(\"m\") > -1) return false;\n    let { $from: $from, $to: $to } = sel;\n    if (!$from.parent.inlineContent || view.endOfTextblock(dir < 0 ? \"up\" : \"down\")) {\n        let next = $a5ab20b42a0afbae$var$moveSelectionBlock(view.state, dir);\n        if (next && next instanceof (0, $1LeRC.NodeSelection)) return $a5ab20b42a0afbae$var$apply(view, next);\n    }\n    if (!$from.parent.inlineContent) {\n        let side = dir < 0 ? $from : $to;\n        let beyond = sel instanceof (0, $1LeRC.AllSelection) ? (0, $1LeRC.Selection).near(side, dir) : (0, $1LeRC.Selection).findFrom(side, dir);\n        return beyond ? $a5ab20b42a0afbae$var$apply(view, beyond) : false;\n    }\n    return false;\n}\nfunction $a5ab20b42a0afbae$var$stopNativeHorizontalDelete(view, dir) {\n    if (!(view.state.selection instanceof (0, $1LeRC.TextSelection))) return true;\n    let { $head: $head, $anchor: $anchor, empty: empty } = view.state.selection;\n    if (!$head.sameParent($anchor)) return true;\n    if (!empty) return false;\n    if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\")) return true;\n    let nextNode = !$head.textOffset && (dir < 0 ? $head.nodeBefore : $head.nodeAfter);\n    if (nextNode && !nextNode.isText) {\n        let tr = view.state.tr;\n        if (dir < 0) tr.delete($head.pos - nextNode.nodeSize, $head.pos);\n        else tr.delete($head.pos, $head.pos + nextNode.nodeSize);\n        view.dispatch(tr);\n        return true;\n    }\n    return false;\n}\nfunction $a5ab20b42a0afbae$var$switchEditable(view, node, state) {\n    view.domObserver.stop();\n    node.contentEditable = state;\n    view.domObserver.start();\n}\n// Issue #867 / #1090 / https://bugs.chromium.org/p/chromium/issues/detail?id=903821\n// In which Safari (and at some point in the past, Chrome) does really\n// wrong things when the down arrow is pressed when the cursor is\n// directly at the start of a textblock and has an uneditable node\n// after it\nfunction $a5ab20b42a0afbae$var$safariDownArrowBug(view) {\n    if (!$a5ab20b42a0afbae$var$safari || view.state.selection.$head.parentOffset > 0) return false;\n    let { focusNode: focusNode, focusOffset: focusOffset } = view.domSelectionRange();\n    if (focusNode && $a5ab20b42a0afbae$var$isElt(focusNode) && focusOffset == 0 && focusNode.firstChild && $a5ab20b42a0afbae$var$isElt(focusNode.firstChild) && focusNode.firstChild.contentEditable == \"false\") {\n        let child = focusNode.firstChild;\n        $a5ab20b42a0afbae$var$switchEditable(view, child, \"true\");\n        setTimeout(()=>$a5ab20b42a0afbae$var$switchEditable(view, child, \"false\"), 20);\n    }\n    return false;\n}\n// A backdrop key mapping used to make sure we always suppress keys\n// that have a dangerous default effect, even if the commands they are\n// bound to return false, and to make sure that cursor-motion keys\n// find a cursor (as opposed to a node selection) when pressed. For\n// cursor-motion keys, the code in the handlers also takes care of\n// block selections.\nfunction $a5ab20b42a0afbae$var$getMods(event) {\n    let result = \"\";\n    if (event.ctrlKey) result += \"c\";\n    if (event.metaKey) result += \"m\";\n    if (event.altKey) result += \"a\";\n    if (event.shiftKey) result += \"s\";\n    return result;\n}\nfunction $a5ab20b42a0afbae$var$captureKeyDown(view, event) {\n    let code = event.keyCode, mods = $a5ab20b42a0afbae$var$getMods(event);\n    if (code == 8 || $a5ab20b42a0afbae$var$mac && code == 72 && mods == \"c\") return $a5ab20b42a0afbae$var$stopNativeHorizontalDelete(view, -1) || $a5ab20b42a0afbae$var$skipIgnoredNodes(view, -1);\n    else if (code == 46 && !event.shiftKey || $a5ab20b42a0afbae$var$mac && code == 68 && mods == \"c\") return $a5ab20b42a0afbae$var$stopNativeHorizontalDelete(view, 1) || $a5ab20b42a0afbae$var$skipIgnoredNodes(view, 1);\n    else if (code == 13 || code == 27) return true;\n    else if (code == 37 || $a5ab20b42a0afbae$var$mac && code == 66 && mods == \"c\") {\n        let dir = code == 37 ? $a5ab20b42a0afbae$var$findDirection(view, view.state.selection.from) == \"ltr\" ? -1 : 1 : -1;\n        return $a5ab20b42a0afbae$var$selectHorizontally(view, dir, mods) || $a5ab20b42a0afbae$var$skipIgnoredNodes(view, dir);\n    } else if (code == 39 || $a5ab20b42a0afbae$var$mac && code == 70 && mods == \"c\") {\n        let dir = code == 39 ? $a5ab20b42a0afbae$var$findDirection(view, view.state.selection.from) == \"ltr\" ? 1 : -1 : 1;\n        return $a5ab20b42a0afbae$var$selectHorizontally(view, dir, mods) || $a5ab20b42a0afbae$var$skipIgnoredNodes(view, dir);\n    } else if (code == 38 || $a5ab20b42a0afbae$var$mac && code == 80 && mods == \"c\") return $a5ab20b42a0afbae$var$selectVertically(view, -1, mods) || $a5ab20b42a0afbae$var$skipIgnoredNodes(view, -1);\n    else if (code == 40 || $a5ab20b42a0afbae$var$mac && code == 78 && mods == \"c\") return $a5ab20b42a0afbae$var$safariDownArrowBug(view) || $a5ab20b42a0afbae$var$selectVertically(view, 1, mods) || $a5ab20b42a0afbae$var$skipIgnoredNodes(view, 1);\n    else if (mods == ($a5ab20b42a0afbae$var$mac ? \"m\" : \"c\") && (code == 66 || code == 73 || code == 89 || code == 90)) return true;\n    return false;\n}\nfunction $a5ab20b42a0afbae$var$serializeForClipboard(view, slice) {\n    view.someProp(\"transformCopied\", (f)=>{\n        slice = f(slice, view);\n    });\n    let context = [], { content: content, openStart: openStart, openEnd: openEnd } = slice;\n    while(openStart > 1 && openEnd > 1 && content.childCount == 1 && content.firstChild.childCount == 1){\n        openStart--;\n        openEnd--;\n        let node = content.firstChild;\n        context.push(node.type.name, node.attrs != node.type.defaultAttrs ? node.attrs : null);\n        content = node.content;\n    }\n    let serializer = view.someProp(\"clipboardSerializer\") || (0, $1krlL.DOMSerializer).fromSchema(view.state.schema);\n    let doc = $a5ab20b42a0afbae$var$detachedDoc(), wrap = doc.createElement(\"div\");\n    wrap.appendChild(serializer.serializeFragment(content, {\n        document: doc\n    }));\n    let firstChild = wrap.firstChild, needsWrap, wrappers = 0;\n    while(firstChild && $a5ab20b42a0afbae$var$isElt(firstChild) && (needsWrap = $a5ab20b42a0afbae$var$wrapMap[firstChild.nodeName.toLowerCase()])){\n        for(let i = needsWrap.length - 1; i >= 0; i--){\n            let wrapper = doc.createElement(needsWrap[i]);\n            while(wrap.firstChild)wrapper.appendChild(wrap.firstChild);\n            wrap.appendChild(wrapper);\n            wrappers++;\n        }\n        firstChild = wrap.firstChild;\n    }\n    if (firstChild && $a5ab20b42a0afbae$var$isElt(firstChild)) firstChild.setAttribute(\"data-pm-slice\", `${openStart} ${openEnd}${wrappers ? ` -${wrappers}` : \"\"} ${JSON.stringify(context)}`);\n    let text = view.someProp(\"clipboardTextSerializer\", (f)=>f(slice, view)) || slice.content.textBetween(0, slice.content.size, \"\\n\\n\");\n    return {\n        dom: wrap,\n        text: text,\n        slice: slice\n    };\n}\n// Read a slice of content from the clipboard (or drop data).\nfunction $a5ab20b42a0afbae$var$parseFromClipboard(view, text, html, plainText, $context) {\n    let inCode = $context.parent.type.spec.code;\n    let dom, slice;\n    if (!html && !text) return null;\n    let asText = !!text && (plainText || inCode || !html);\n    if (asText) {\n        view.someProp(\"transformPastedText\", (f)=>{\n            text = f(text, inCode || plainText, view);\n        });\n        if (inCode) {\n            slice = new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(view.state.schema.text(text.replace(/\\r\\n?/g, \"\\n\"))), 0, 0);\n            view.someProp(\"transformPasted\", (f)=>{\n                slice = f(slice, view, true);\n            });\n            return slice;\n        }\n        let parsed = view.someProp(\"clipboardTextParser\", (f)=>f(text, $context, plainText, view));\n        if (parsed) slice = parsed;\n        else {\n            let marks = $context.marks();\n            let { schema: schema } = view.state, serializer = (0, $1krlL.DOMSerializer).fromSchema(schema);\n            dom = document.createElement(\"div\");\n            text.split(/(?:\\r\\n?|\\n)+/).forEach((block)=>{\n                let p = dom.appendChild(document.createElement(\"p\"));\n                if (block) p.appendChild(serializer.serializeNode(schema.text(block, marks)));\n            });\n        }\n    } else {\n        view.someProp(\"transformPastedHTML\", (f)=>{\n            html = f(html, view);\n        });\n        dom = $a5ab20b42a0afbae$var$readHTML(html);\n        if ($a5ab20b42a0afbae$var$webkit) $a5ab20b42a0afbae$var$restoreReplacedSpaces(dom);\n    }\n    let contextNode = dom && dom.querySelector(\"[data-pm-slice]\");\n    let sliceData = contextNode && /^(\\d+) (\\d+)(?: -(\\d+))? (.*)/.exec(contextNode.getAttribute(\"data-pm-slice\") || \"\");\n    if (sliceData && sliceData[3]) for(let i = +sliceData[3]; i > 0; i--){\n        let child = dom.firstChild;\n        while(child && !$a5ab20b42a0afbae$var$isElt(child))child = child.nextSibling;\n        if (!child) break;\n        dom = child;\n    }\n    if (!slice) {\n        let parser = view.someProp(\"clipboardParser\") || view.someProp(\"domParser\") || (0, $1krlL.DOMParser).fromSchema(view.state.schema);\n        slice = parser.parseSlice(dom, {\n            preserveWhitespace: !!(asText || sliceData),\n            context: $context,\n            ruleFromNode (dom) {\n                if (dom.nodeName == \"BR\" && !dom.nextSibling && dom.parentNode && !$a5ab20b42a0afbae$var$inlineParents.test(dom.parentNode.nodeName)) return {\n                    ignore: true\n                };\n                return null;\n            }\n        });\n    }\n    if (sliceData) slice = $a5ab20b42a0afbae$var$addContext($a5ab20b42a0afbae$var$closeSlice(slice, +sliceData[1], +sliceData[2]), sliceData[4]);\n    else {\n        slice = (0, $1krlL.Slice).maxOpen($a5ab20b42a0afbae$var$normalizeSiblings(slice.content, $context), true);\n        if (slice.openStart || slice.openEnd) {\n            let openStart = 0, openEnd = 0;\n            for(let node = slice.content.firstChild; openStart < slice.openStart && !node.type.spec.isolating; openStart++, node = node.firstChild);\n            for(let node = slice.content.lastChild; openEnd < slice.openEnd && !node.type.spec.isolating; openEnd++, node = node.lastChild);\n            slice = $a5ab20b42a0afbae$var$closeSlice(slice, openStart, openEnd);\n        }\n    }\n    view.someProp(\"transformPasted\", (f)=>{\n        slice = f(slice, view, asText);\n    });\n    return slice;\n}\nconst $a5ab20b42a0afbae$var$inlineParents = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;\n// Takes a slice parsed with parseSlice, which means there hasn't been\n// any content-expression checking done on the top nodes, tries to\n// find a parent node in the current context that might fit the nodes,\n// and if successful, rebuilds the slice so that it fits into that parent.\n//\n// This addresses the problem that Transform.replace expects a\n// coherent slice, and will fail to place a set of siblings that don't\n// fit anywhere in the schema.\nfunction $a5ab20b42a0afbae$var$normalizeSiblings(fragment, $context) {\n    if (fragment.childCount < 2) return fragment;\n    for(let d = $context.depth; d >= 0; d--){\n        let parent = $context.node(d);\n        let match = parent.contentMatchAt($context.index(d));\n        let lastWrap, result = [];\n        fragment.forEach((node)=>{\n            if (!result) return;\n            let wrap = match.findWrapping(node.type), inLast;\n            if (!wrap) return result = null;\n            if (inLast = result.length && lastWrap.length && $a5ab20b42a0afbae$var$addToSibling(wrap, lastWrap, node, result[result.length - 1], 0)) result[result.length - 1] = inLast;\n            else {\n                if (result.length) result[result.length - 1] = $a5ab20b42a0afbae$var$closeRight(result[result.length - 1], lastWrap.length);\n                let wrapped = $a5ab20b42a0afbae$var$withWrappers(node, wrap);\n                result.push(wrapped);\n                match = match.matchType(wrapped.type);\n                lastWrap = wrap;\n            }\n        });\n        if (result) return (0, $1krlL.Fragment).from(result);\n    }\n    return fragment;\n}\nfunction $a5ab20b42a0afbae$var$withWrappers(node, wrap, from = 0) {\n    for(let i = wrap.length - 1; i >= from; i--)node = wrap[i].create(null, (0, $1krlL.Fragment).from(node));\n    return node;\n}\n// Used to group adjacent nodes wrapped in similar parents by\n// normalizeSiblings into the same parent node\nfunction $a5ab20b42a0afbae$var$addToSibling(wrap, lastWrap, node, sibling, depth) {\n    if (depth < wrap.length && depth < lastWrap.length && wrap[depth] == lastWrap[depth]) {\n        let inner = $a5ab20b42a0afbae$var$addToSibling(wrap, lastWrap, node, sibling.lastChild, depth + 1);\n        if (inner) return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));\n        let match = sibling.contentMatchAt(sibling.childCount);\n        if (match.matchType(depth == wrap.length - 1 ? node.type : wrap[depth + 1])) return sibling.copy(sibling.content.append((0, $1krlL.Fragment).from($a5ab20b42a0afbae$var$withWrappers(node, wrap, depth + 1))));\n    }\n}\nfunction $a5ab20b42a0afbae$var$closeRight(node, depth) {\n    if (depth == 0) return node;\n    let fragment = node.content.replaceChild(node.childCount - 1, $a5ab20b42a0afbae$var$closeRight(node.lastChild, depth - 1));\n    let fill = node.contentMatchAt(node.childCount).fillBefore((0, $1krlL.Fragment).empty, true);\n    return node.copy(fragment.append(fill));\n}\nfunction $a5ab20b42a0afbae$var$closeRange(fragment, side, from, to, depth, openEnd) {\n    let node = side < 0 ? fragment.firstChild : fragment.lastChild, inner = node.content;\n    if (fragment.childCount > 1) openEnd = 0;\n    if (depth < to - 1) inner = $a5ab20b42a0afbae$var$closeRange(inner, side, from, to, depth + 1, openEnd);\n    if (depth >= from) inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore((0, $1krlL.Fragment).empty, true));\n    return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));\n}\nfunction $a5ab20b42a0afbae$var$closeSlice(slice, openStart, openEnd) {\n    if (openStart < slice.openStart) slice = new (0, $1krlL.Slice)($a5ab20b42a0afbae$var$closeRange(slice.content, -1, openStart, slice.openStart, 0, slice.openEnd), openStart, slice.openEnd);\n    if (openEnd < slice.openEnd) slice = new (0, $1krlL.Slice)($a5ab20b42a0afbae$var$closeRange(slice.content, 1, openEnd, slice.openEnd, 0, 0), slice.openStart, openEnd);\n    return slice;\n}\n// Trick from jQuery -- some elements must be wrapped in other\n// elements for innerHTML to work. I.e. if you do `div.innerHTML =\n// \"<td>..</td>\"` the table cells are ignored.\nconst $a5ab20b42a0afbae$var$wrapMap = {\n    thead: [\n        \"table\"\n    ],\n    tbody: [\n        \"table\"\n    ],\n    tfoot: [\n        \"table\"\n    ],\n    caption: [\n        \"table\"\n    ],\n    colgroup: [\n        \"table\"\n    ],\n    col: [\n        \"table\",\n        \"colgroup\"\n    ],\n    tr: [\n        \"table\",\n        \"tbody\"\n    ],\n    td: [\n        \"table\",\n        \"tbody\",\n        \"tr\"\n    ],\n    th: [\n        \"table\",\n        \"tbody\",\n        \"tr\"\n    ]\n};\nfunction $a5ab20b42a0afbae$var$detachedDoc() {\n    return document.implementation.createHTMLDocument(\"title\");\n}\nlet $a5ab20b42a0afbae$var$_policy = null;\nfunction $a5ab20b42a0afbae$var$maybeWrapTrusted(html) {\n    let trustedTypes = window.trustedTypes;\n    if (!trustedTypes) return html;\n    // With the require-trusted-types-for CSP, Chrome will block\n    // innerHTML, even on a detached document. This wraps the string in\n    // a way that makes the browser allow us to use its parser again.\n    if (!$a5ab20b42a0afbae$var$_policy) {\n        if ($a5ab20b42a0afbae$var$_policy = trustedTypes.defaultPolicy) try {\n            return $a5ab20b42a0afbae$var$_policy.createHTML(html);\n        } catch (_a) {}\n        $a5ab20b42a0afbae$var$_policy = trustedTypes.createPolicy(\"ProseMirrorClipboard\", {\n            createHTML: (s)=>s\n        });\n    }\n    return $a5ab20b42a0afbae$var$_policy.createHTML(html);\n}\nfunction $a5ab20b42a0afbae$var$readHTML(html) {\n    let metas = /^(\\s*<meta [^>]*>)*/.exec(html);\n    if (metas) html = html.slice(metas[0].length);\n    let doc = $a5ab20b42a0afbae$var$detachedDoc(), elt = doc.body;\n    let firstTag = /<([a-z][^>\\s]+)/i.exec(html), wrap;\n    if (wrap = firstTag && $a5ab20b42a0afbae$var$wrapMap[firstTag[1].toLowerCase()]) html = wrap.map((n)=>\"<\" + n + \">\").join(\"\") + html + wrap.map((n)=>\"</\" + n + \">\").reverse().join(\"\");\n    elt.innerHTML = $a5ab20b42a0afbae$var$maybeWrapTrusted(html);\n    if (wrap) for(let i = 0; i < wrap.length; i++)elt = elt.querySelector(wrap[i]) || elt;\n    // Inline styles defined in the pasted content, so that parse rules pick them up\n    for(let i = 0; i < doc.styleSheets.length; i++){\n        let style = doc.styleSheets[i];\n        for(let j = 0; j < style.rules.length; j++){\n            let rule = style.rules[j];\n            if (rule instanceof CSSStyleRule) {\n                let matches = elt.querySelectorAll(rule.selectorText);\n                for(let k = 0; k < matches.length; k++)matches[k].style.cssText += rule.style.cssText;\n            }\n        }\n    }\n    return elt;\n}\n// Webkit browsers do some hard-to-predict replacement of regular\n// spaces with non-breaking spaces when putting content on the\n// clipboard. This tries to convert such non-breaking spaces (which\n// will be wrapped in a plain span on Chrome, a span with class\n// Apple-converted-space on Safari) back to regular spaces.\nfunction $a5ab20b42a0afbae$var$restoreReplacedSpaces(dom) {\n    let nodes = dom.querySelectorAll($a5ab20b42a0afbae$var$chrome ? \"span:not([class]):not([style])\" : \"span.Apple-converted-space\");\n    for(let i = 0; i < nodes.length; i++){\n        let node = nodes[i];\n        if (node.childNodes.length == 1 && node.textContent == \"\\u00a0\" && node.parentNode) node.parentNode.replaceChild(dom.ownerDocument.createTextNode(\" \"), node);\n    }\n}\nfunction $a5ab20b42a0afbae$var$addContext(slice, context) {\n    if (!slice.size) return slice;\n    let schema = slice.content.firstChild.type.schema, array;\n    try {\n        array = JSON.parse(context);\n    } catch (e) {\n        return slice;\n    }\n    let { content: content, openStart: openStart, openEnd: openEnd } = slice;\n    for(let i = array.length - 2; i >= 0; i -= 2){\n        let type = schema.nodes[array[i]];\n        if (!type || type.hasRequiredAttrs()) break;\n        try {\n            content = (0, $1krlL.Fragment).from(type.create(array[i + 1], content));\n        } catch (e) {\n            break;\n        }\n        openStart++;\n        openEnd++;\n    }\n    return new (0, $1krlL.Slice)(content, openStart, openEnd);\n}\n// A collection of DOM events that occur within the editor, and callback functions\n// to invoke when the event fires.\nconst $a5ab20b42a0afbae$var$handlers = {};\nconst $a5ab20b42a0afbae$var$editHandlers = {};\nconst $a5ab20b42a0afbae$var$passiveHandlers = {\n    touchstart: true,\n    touchmove: true\n};\nclass $a5ab20b42a0afbae$var$InputState {\n    constructor(){\n        this.shiftKey = false;\n        this.mouseDown = null;\n        this.lastKeyCode = null;\n        this.lastKeyCodeTime = 0;\n        this.lastClick = {\n            time: 0,\n            x: 0,\n            y: 0,\n            type: \"\",\n            button: 0\n        };\n        this.lastSelectionOrigin = null;\n        this.lastSelectionTime = 0;\n        this.lastIOSEnter = 0;\n        this.lastIOSEnterFallbackTimeout = -1;\n        this.lastFocus = 0;\n        this.lastTouch = 0;\n        this.lastChromeDelete = 0;\n        this.composing = false;\n        this.compositionNode = null;\n        this.composingTimeout = -1;\n        this.compositionNodes = [];\n        this.compositionEndedAt = -200000000;\n        this.compositionID = 1;\n        this.badSafariComposition = false;\n        // Set to a composition ID when there are pending changes at compositionend\n        this.compositionPendingChanges = 0;\n        this.domChangeCount = 0;\n        this.eventHandlers = Object.create(null);\n        this.hideSelectionGuard = null;\n    }\n}\nfunction $a5ab20b42a0afbae$var$initInput(view) {\n    for(let event in $a5ab20b42a0afbae$var$handlers){\n        let handler = $a5ab20b42a0afbae$var$handlers[event];\n        view.dom.addEventListener(event, view.input.eventHandlers[event] = (event)=>{\n            if ($a5ab20b42a0afbae$var$eventBelongsToView(view, event) && !$a5ab20b42a0afbae$var$runCustomHandler(view, event) && (view.editable || !(event.type in $a5ab20b42a0afbae$var$editHandlers))) handler(view, event);\n        }, $a5ab20b42a0afbae$var$passiveHandlers[event] ? {\n            passive: true\n        } : undefined);\n    }\n    // On Safari, for reasons beyond my understanding, adding an input\n    // event handler makes an issue where the composition vanishes when\n    // you press enter go away.\n    if ($a5ab20b42a0afbae$var$safari) view.dom.addEventListener(\"input\", ()=>null);\n    $a5ab20b42a0afbae$var$ensureListeners(view);\n}\nfunction $a5ab20b42a0afbae$var$setSelectionOrigin(view, origin) {\n    view.input.lastSelectionOrigin = origin;\n    view.input.lastSelectionTime = Date.now();\n}\nfunction $a5ab20b42a0afbae$var$destroyInput(view) {\n    if (view.input.mouseDown) view.input.mouseDown.done();\n    view.domObserver.stop();\n    for(let type in view.input.eventHandlers)view.dom.removeEventListener(type, view.input.eventHandlers[type]);\n    clearTimeout(view.input.composingTimeout);\n    clearTimeout(view.input.lastIOSEnterFallbackTimeout);\n}\nfunction $a5ab20b42a0afbae$var$ensureListeners(view) {\n    view.someProp(\"handleDOMEvents\", (currentHandlers)=>{\n        for(let type in currentHandlers)if (!view.input.eventHandlers[type]) view.dom.addEventListener(type, view.input.eventHandlers[type] = (event)=>$a5ab20b42a0afbae$var$runCustomHandler(view, event));\n    });\n}\nfunction $a5ab20b42a0afbae$var$runCustomHandler(view, event) {\n    return view.someProp(\"handleDOMEvents\", (handlers)=>{\n        let handler = handlers[event.type];\n        return handler ? handler(view, event) || event.defaultPrevented : false;\n    });\n}\nfunction $a5ab20b42a0afbae$var$eventBelongsToView(view, event) {\n    if (!event.bubbles) return true;\n    if (event.defaultPrevented) return false;\n    for(let node = event.target; node != view.dom; node = node.parentNode)if (!node || node.nodeType == 11 || node.pmViewDesc && node.pmViewDesc.stopEvent(event)) return false;\n    return true;\n}\nfunction $a5ab20b42a0afbae$var$dispatchEvent(view, event) {\n    if (!$a5ab20b42a0afbae$var$runCustomHandler(view, event) && $a5ab20b42a0afbae$var$handlers[event.type] && (view.editable || !(event.type in $a5ab20b42a0afbae$var$editHandlers))) $a5ab20b42a0afbae$var$handlers[event.type](view, event);\n}\n$a5ab20b42a0afbae$var$editHandlers.keydown = (view, _event)=>{\n    let event = _event;\n    view.input.shiftKey = event.keyCode == 16 || event.shiftKey;\n    if ($a5ab20b42a0afbae$var$inOrNearComposition(view)) return;\n    view.input.lastKeyCode = event.keyCode;\n    view.input.lastKeyCodeTime = Date.now();\n    // Suppress enter key events on Chrome Android, because those tend\n    // to be part of a confused sequence of composition events fired,\n    // and handling them eagerly tends to corrupt the input.\n    if ($a5ab20b42a0afbae$var$android && $a5ab20b42a0afbae$var$chrome && event.keyCode == 13) return;\n    if (event.keyCode != 229) view.domObserver.forceFlush();\n    // On iOS, if we preventDefault enter key presses, the virtual\n    // keyboard gets confused. So the hack here is to set a flag that\n    // makes the DOM change code recognize that what just happens should\n    // be replaced by whatever the Enter key handlers do.\n    if ($a5ab20b42a0afbae$var$ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {\n        let now = Date.now();\n        view.input.lastIOSEnter = now;\n        view.input.lastIOSEnterFallbackTimeout = setTimeout(()=>{\n            if (view.input.lastIOSEnter == now) {\n                view.someProp(\"handleKeyDown\", (f)=>f(view, $a5ab20b42a0afbae$var$keyEvent(13, \"Enter\")));\n                view.input.lastIOSEnter = 0;\n            }\n        }, 200);\n    } else if (view.someProp(\"handleKeyDown\", (f)=>f(view, event)) || $a5ab20b42a0afbae$var$captureKeyDown(view, event)) event.preventDefault();\n    else $a5ab20b42a0afbae$var$setSelectionOrigin(view, \"key\");\n};\n$a5ab20b42a0afbae$var$editHandlers.keyup = (view, event)=>{\n    if (event.keyCode == 16) view.input.shiftKey = false;\n};\n$a5ab20b42a0afbae$var$editHandlers.keypress = (view, _event)=>{\n    let event = _event;\n    if ($a5ab20b42a0afbae$var$inOrNearComposition(view) || !event.charCode || event.ctrlKey && !event.altKey || $a5ab20b42a0afbae$var$mac && event.metaKey) return;\n    if (view.someProp(\"handleKeyPress\", (f)=>f(view, event))) {\n        event.preventDefault();\n        return;\n    }\n    let sel = view.state.selection;\n    if (!(sel instanceof (0, $1LeRC.TextSelection)) || !sel.$from.sameParent(sel.$to)) {\n        let text = String.fromCharCode(event.charCode);\n        let deflt = ()=>view.state.tr.insertText(text).scrollIntoView();\n        if (!/[\\r\\n]/.test(text) && !view.someProp(\"handleTextInput\", (f)=>f(view, sel.$from.pos, sel.$to.pos, text, deflt))) view.dispatch(deflt());\n        event.preventDefault();\n    }\n};\nfunction $a5ab20b42a0afbae$var$eventCoords(event) {\n    return {\n        left: event.clientX,\n        top: event.clientY\n    };\n}\nfunction $a5ab20b42a0afbae$var$isNear(event, click) {\n    let dx = click.x - event.clientX, dy = click.y - event.clientY;\n    return dx * dx + dy * dy < 100;\n}\nfunction $a5ab20b42a0afbae$var$runHandlerOnContext(view, propName, pos, inside, event) {\n    if (inside == -1) return false;\n    let $pos = view.state.doc.resolve(inside);\n    for(let i = $pos.depth + 1; i > 0; i--){\n        if (view.someProp(propName, (f)=>i > $pos.depth ? f(view, pos, $pos.nodeAfter, $pos.before(i), event, true) : f(view, pos, $pos.node(i), $pos.before(i), event, false))) return true;\n    }\n    return false;\n}\nfunction $a5ab20b42a0afbae$var$updateSelection(view, selection, origin) {\n    if (!view.focused) view.focus();\n    if (view.state.selection.eq(selection)) return;\n    let tr = view.state.tr.setSelection(selection);\n    tr.setMeta(\"pointer\", true);\n    view.dispatch(tr);\n}\nfunction $a5ab20b42a0afbae$var$selectClickedLeaf(view, inside) {\n    if (inside == -1) return false;\n    let $pos = view.state.doc.resolve(inside), node = $pos.nodeAfter;\n    if (node && node.isAtom && (0, $1LeRC.NodeSelection).isSelectable(node)) {\n        $a5ab20b42a0afbae$var$updateSelection(view, new (0, $1LeRC.NodeSelection)($pos));\n        return true;\n    }\n    return false;\n}\nfunction $a5ab20b42a0afbae$var$selectClickedNode(view, inside) {\n    if (inside == -1) return false;\n    let sel = view.state.selection, selectedNode, selectAt;\n    if (sel instanceof (0, $1LeRC.NodeSelection)) selectedNode = sel.node;\n    let $pos = view.state.doc.resolve(inside);\n    for(let i = $pos.depth + 1; i > 0; i--){\n        let node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n        if ((0, $1LeRC.NodeSelection).isSelectable(node)) {\n            if (selectedNode && sel.$from.depth > 0 && i >= sel.$from.depth && $pos.before(sel.$from.depth + 1) == sel.$from.pos) selectAt = $pos.before(sel.$from.depth);\n            else selectAt = $pos.before(i);\n            break;\n        }\n    }\n    if (selectAt != null) {\n        $a5ab20b42a0afbae$var$updateSelection(view, (0, $1LeRC.NodeSelection).create(view.state.doc, selectAt));\n        return true;\n    } else return false;\n}\nfunction $a5ab20b42a0afbae$var$handleSingleClick(view, pos, inside, event, selectNode) {\n    return $a5ab20b42a0afbae$var$runHandlerOnContext(view, \"handleClickOn\", pos, inside, event) || view.someProp(\"handleClick\", (f)=>f(view, pos, event)) || (selectNode ? $a5ab20b42a0afbae$var$selectClickedNode(view, inside) : $a5ab20b42a0afbae$var$selectClickedLeaf(view, inside));\n}\nfunction $a5ab20b42a0afbae$var$handleDoubleClick(view, pos, inside, event) {\n    return $a5ab20b42a0afbae$var$runHandlerOnContext(view, \"handleDoubleClickOn\", pos, inside, event) || view.someProp(\"handleDoubleClick\", (f)=>f(view, pos, event));\n}\nfunction $a5ab20b42a0afbae$var$handleTripleClick(view, pos, inside, event) {\n    return $a5ab20b42a0afbae$var$runHandlerOnContext(view, \"handleTripleClickOn\", pos, inside, event) || view.someProp(\"handleTripleClick\", (f)=>f(view, pos, event)) || $a5ab20b42a0afbae$var$defaultTripleClick(view, inside, event);\n}\nfunction $a5ab20b42a0afbae$var$defaultTripleClick(view, inside, event) {\n    if (event.button != 0) return false;\n    let selection = $a5ab20b42a0afbae$var$selectionForTripleClick(view, inside, true), doc = view.state.doc;\n    if (!selection) return false;\n    $a5ab20b42a0afbae$var$updateSelection(view, selection);\n    if (selection instanceof (0, $1LeRC.TextSelection) && doc.eq(view.state.doc)) view.input.mouseDown = new $a5ab20b42a0afbae$var$TripleClickDrag(view, selection);\n    return true;\n}\nfunction $a5ab20b42a0afbae$var$selectionForTripleClick(view, inside, selectNodes) {\n    let doc = view.state.doc;\n    if (inside == -1) return doc.inlineContent ? (0, $1LeRC.TextSelection).create(doc, 0, doc.content.size) : null;\n    let $pos = doc.resolve(inside);\n    for(let i = $pos.depth + 1; i > 0; i--){\n        let node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n        let nodePos = $pos.before(i);\n        if (node.inlineContent) return (0, $1LeRC.TextSelection).create(doc, nodePos + 1, nodePos + 1 + node.content.size);\n        else if (selectNodes && (0, $1LeRC.NodeSelection).isSelectable(node)) return (0, $1LeRC.NodeSelection).create(doc, nodePos);\n    }\n    return null;\n}\nfunction $a5ab20b42a0afbae$var$forceDOMFlush(view) {\n    return $a5ab20b42a0afbae$var$endComposition(view);\n}\nconst $a5ab20b42a0afbae$var$selectNodeModifier = $a5ab20b42a0afbae$var$mac ? \"metaKey\" : \"ctrlKey\";\n$a5ab20b42a0afbae$var$handlers.mousedown = (view, _event)=>{\n    let event = _event;\n    view.input.shiftKey = event.shiftKey;\n    let flushed = $a5ab20b42a0afbae$var$forceDOMFlush(view);\n    let now = Date.now(), type = \"singleClick\";\n    if (now - view.input.lastClick.time < 500 && $a5ab20b42a0afbae$var$isNear(event, view.input.lastClick) && !event[$a5ab20b42a0afbae$var$selectNodeModifier] && view.input.lastClick.button == event.button) {\n        if (view.input.lastClick.type == \"singleClick\") type = \"doubleClick\";\n        else if (view.input.lastClick.type == \"doubleClick\") type = \"tripleClick\";\n    }\n    view.input.lastClick = {\n        time: now,\n        x: event.clientX,\n        y: event.clientY,\n        type: type,\n        button: event.button\n    };\n    if (view.input.mouseDown) view.input.mouseDown.done();\n    let pos = view.posAtCoords($a5ab20b42a0afbae$var$eventCoords(event));\n    if (!pos) return;\n    if (type == \"singleClick\") view.input.mouseDown = new $a5ab20b42a0afbae$var$LeftMouseDown(view, pos, event, !!flushed);\n    else if ((type == \"doubleClick\" ? $a5ab20b42a0afbae$var$handleDoubleClick : $a5ab20b42a0afbae$var$handleTripleClick)(view, pos.pos, pos.inside, event)) event.preventDefault();\n    else $a5ab20b42a0afbae$var$setSelectionOrigin(view, \"pointer\");\n};\nclass $a5ab20b42a0afbae$var$MouseDown {\n    constructor(view){\n        this.view = view;\n        this.mightDrag = null;\n        view.root.addEventListener(\"mouseup\", this.up = this.up.bind(this));\n        view.root.addEventListener(\"mousemove\", this.move = this.move.bind(this));\n    }\n    up(event) {\n        this.done();\n    }\n    move(event) {\n        if (event.buttons == 0) this.done();\n    }\n    done() {\n        this.view.root.removeEventListener(\"mouseup\", this.up);\n        this.view.root.removeEventListener(\"mousemove\", this.move);\n        if (this.view.input.mouseDown == this) this.view.input.mouseDown = null;\n    }\n    delaySelUpdate() {\n        return false;\n    }\n}\nclass $a5ab20b42a0afbae$var$LeftMouseDown extends $a5ab20b42a0afbae$var$MouseDown {\n    constructor(view, pos, event, flushed){\n        super(view);\n        this.pos = pos;\n        this.event = event;\n        this.flushed = flushed;\n        this.delayedSelectionSync = false;\n        this.startDoc = view.state.doc;\n        this.selectNode = !!event[$a5ab20b42a0afbae$var$selectNodeModifier];\n        this.allowDefault = event.shiftKey;\n        let targetNode, targetPos;\n        if (pos.inside > -1) {\n            targetNode = view.state.doc.nodeAt(pos.inside);\n            targetPos = pos.inside;\n        } else {\n            let $pos = view.state.doc.resolve(pos.pos);\n            targetNode = $pos.parent;\n            targetPos = $pos.depth ? $pos.before() : 0;\n        }\n        const target = flushed ? null : event.target;\n        const targetDesc = target ? view.docView.nearestDesc(target, true) : null;\n        this.target = targetDesc && $a5ab20b42a0afbae$var$isElt(targetDesc.nodeDOM) ? targetDesc.nodeDOM : null;\n        let { selection: selection } = view.state;\n        if (event.button == 0 && (targetNode.type.spec.draggable && targetNode.type.spec.selectable !== false || selection instanceof (0, $1LeRC.NodeSelection) && selection.from <= targetPos && selection.to > targetPos)) this.mightDrag = {\n            node: targetNode,\n            pos: targetPos,\n            addAttr: !!(this.target && !this.target.draggable),\n            setUneditable: !!(this.target && $a5ab20b42a0afbae$var$gecko && !this.target.hasAttribute(\"contentEditable\"))\n        };\n        if (this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable)) {\n            this.view.domObserver.stop();\n            if (this.mightDrag.addAttr) this.target.draggable = true;\n            if (this.mightDrag.setUneditable) setTimeout(()=>{\n                if (this.view.input.mouseDown == this) this.target.setAttribute(\"contentEditable\", \"false\");\n            }, 20);\n            this.view.domObserver.start();\n        }\n        $a5ab20b42a0afbae$var$setSelectionOrigin(view, \"pointer\");\n    }\n    done() {\n        super.done();\n        if (this.mightDrag && this.target) {\n            this.view.domObserver.stop();\n            if (this.mightDrag.addAttr) this.target.removeAttribute(\"draggable\");\n            if (this.mightDrag.setUneditable) this.target.removeAttribute(\"contentEditable\");\n            this.view.domObserver.start();\n        }\n        if (this.delayedSelectionSync) setTimeout(()=>{\n            if (!this.view.isDestroyed) $a5ab20b42a0afbae$var$selectionToDOM(this.view);\n        });\n    }\n    up(event) {\n        this.done();\n        if (!this.view.dom.contains(event.target)) return;\n        let pos = this.pos;\n        if (this.view.state.doc != this.startDoc) pos = this.view.posAtCoords($a5ab20b42a0afbae$var$eventCoords(event));\n        this.updateAllowDefault(event);\n        if (this.allowDefault || !pos) $a5ab20b42a0afbae$var$setSelectionOrigin(this.view, \"pointer\");\n        else if ($a5ab20b42a0afbae$var$handleSingleClick(this.view, pos.pos, pos.inside, event, this.selectNode)) event.preventDefault();\n        else if (event.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements\n        $a5ab20b42a0afbae$var$safari && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a\n        // cursor, but still report that the node is selected\n        // when asked through getSelection. You'll then get a\n        // situation where clicking at the point where that\n        // (hidden) cursor is doesn't change the selection, and\n        // thus doesn't get a reaction from ProseMirror. This\n        // works around that.\n        $a5ab20b42a0afbae$var$chrome && !this.view.state.selection.visible && Math.min(Math.abs(pos.pos - this.view.state.selection.from), Math.abs(pos.pos - this.view.state.selection.to)) <= 2)) {\n            $a5ab20b42a0afbae$var$updateSelection(this.view, (0, $1LeRC.Selection).near(this.view.state.doc.resolve(pos.pos)));\n            event.preventDefault();\n        } else $a5ab20b42a0afbae$var$setSelectionOrigin(this.view, \"pointer\");\n    }\n    move(event) {\n        this.updateAllowDefault(event);\n        $a5ab20b42a0afbae$var$setSelectionOrigin(this.view, \"pointer\");\n        super.move(event);\n    }\n    updateAllowDefault(event) {\n        if (!this.allowDefault && (Math.abs(this.event.x - event.clientX) > 4 || Math.abs(this.event.y - event.clientY) > 4)) this.allowDefault = true;\n    }\n    delaySelUpdate() {\n        if (!this.allowDefault) return false;\n        this.delayedSelectionSync = true;\n        return true;\n    }\n}\nclass $a5ab20b42a0afbae$var$TripleClickDrag extends $a5ab20b42a0afbae$var$MouseDown {\n    constructor(view, startSelection){\n        super(view);\n        this.startSelection = startSelection;\n        this.startDoc = view.state.doc;\n    }\n    move(event) {\n        if (event.buttons == 0 || this.view.isDestroyed || !this.view.state.doc.eq(this.startDoc)) {\n            this.done();\n            return;\n        }\n        event.preventDefault();\n        $a5ab20b42a0afbae$var$setSelectionOrigin(this.view, \"pointer\");\n        let pos = this.view.posAtCoords($a5ab20b42a0afbae$var$eventCoords(event));\n        let target = pos && $a5ab20b42a0afbae$var$selectionForTripleClick(this.view, pos.inside, false);\n        if (!target) return;\n        let { doc: doc } = this.view.state, start = this.startSelection;\n        let [anchor, head] = target.from < start.from ? [\n            start.to,\n            target.from\n        ] : [\n            start.from,\n            target.to\n        ];\n        $a5ab20b42a0afbae$var$updateSelection(this.view, (0, $1LeRC.TextSelection).create(doc, anchor, head));\n    }\n}\n$a5ab20b42a0afbae$var$handlers.touchstart = (view)=>{\n    view.input.lastTouch = Date.now();\n    $a5ab20b42a0afbae$var$forceDOMFlush(view);\n    $a5ab20b42a0afbae$var$setSelectionOrigin(view, \"pointer\");\n};\n$a5ab20b42a0afbae$var$handlers.touchmove = (view)=>{\n    view.input.lastTouch = Date.now();\n    $a5ab20b42a0afbae$var$setSelectionOrigin(view, \"pointer\");\n};\n$a5ab20b42a0afbae$var$handlers.contextmenu = (view)=>$a5ab20b42a0afbae$var$forceDOMFlush(view);\nfunction $a5ab20b42a0afbae$var$inOrNearComposition(view, event) {\n    if (view.composing) return true;\n    // See https://www.stum.de/2016/06/24/handling-ime-events-in-javascript/.\n    // On Japanese input method editors (IMEs), the Enter key is used to confirm character\n    // selection. On Safari, when Enter is pressed, compositionend and keydown events are\n    // emitted. The keydown event triggers newline insertion, which we don't want.\n    // This method returns true if the keydown event should be ignored.\n    // We only ignore it once, as pressing Enter a second time *should* insert a newline.\n    // Furthermore, the keydown event timestamp must be close to the compositionEndedAt timestamp.\n    // This guards against the case where compositionend is triggered without the keyboard\n    // (e.g. character confirmation may be done with the mouse), and keydown is triggered\n    // afterwards- we wouldn't want to ignore the keydown event in this case.\n    if ($a5ab20b42a0afbae$var$safari && Math.abs(Date.now() - view.input.compositionEndedAt) < 500) {\n        view.input.compositionEndedAt = -200000000;\n        return true;\n    }\n    return false;\n}\n// Drop active composition after 5 seconds of inactivity on Android\nconst $a5ab20b42a0afbae$var$timeoutComposition = $a5ab20b42a0afbae$var$android ? 5000 : -1;\n$a5ab20b42a0afbae$var$editHandlers.compositionstart = $a5ab20b42a0afbae$var$editHandlers.compositionupdate = (view)=>{\n    if (!view.composing) {\n        view.domObserver.flush();\n        let { state: state } = view, $pos = state.selection.$to;\n        if (state.selection instanceof (0, $1LeRC.TextSelection) && state.selection.empty && (state.storedMarks || !$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some((m)=>m.type.spec.inclusive === false) || $a5ab20b42a0afbae$var$chrome && $a5ab20b42a0afbae$var$windows && $a5ab20b42a0afbae$var$selectionBeforeUneditable(view))) {\n            // Need to wrap the cursor in mark nodes different from the ones in the DOM context\n            view.markCursor = view.state.storedMarks || $pos.marks();\n            $a5ab20b42a0afbae$var$endComposition(view, true);\n            view.markCursor = null;\n        } else {\n            $a5ab20b42a0afbae$var$endComposition(view, !state.selection.empty);\n            // In firefox, if the cursor is after but outside a marked node,\n            // the inserted text won't inherit the marks. So this moves it\n            // inside if necessary.\n            if ($a5ab20b42a0afbae$var$gecko && state.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {\n                let sel = view.domSelectionRange();\n                for(let node = sel.focusNode, offset = sel.focusOffset; node && $a5ab20b42a0afbae$var$isElt(node) && offset != 0;){\n                    let before = offset < 0 ? node.lastChild : node.childNodes[offset - 1];\n                    if (!before) break;\n                    if ($a5ab20b42a0afbae$var$isText(before)) {\n                        let sel = view.domSelection();\n                        if (sel) sel.collapse(before, before.nodeValue.length);\n                        break;\n                    } else {\n                        node = before;\n                        offset = -1;\n                    }\n                }\n            }\n        }\n        view.input.composing = true;\n    }\n    $a5ab20b42a0afbae$var$scheduleComposeEnd(view, $a5ab20b42a0afbae$var$timeoutComposition);\n};\nfunction $a5ab20b42a0afbae$var$selectionBeforeUneditable(view) {\n    let { focusNode: focusNode, focusOffset: focusOffset } = view.domSelectionRange();\n    if (!focusNode || !$a5ab20b42a0afbae$var$isElt(focusNode) || focusOffset >= focusNode.childNodes.length) return false;\n    let next = focusNode.childNodes[focusOffset];\n    return $a5ab20b42a0afbae$var$isElt(next) && next.contentEditable == \"false\";\n}\n$a5ab20b42a0afbae$var$editHandlers.compositionend = (view, event)=>{\n    if (view.composing) {\n        view.input.composing = false;\n        view.input.compositionEndedAt = Date.now();\n        view.input.compositionPendingChanges = view.domObserver.pendingRecords().length ? view.input.compositionID : 0;\n        view.input.compositionNode = null;\n        if (view.input.badSafariComposition) view.domObserver.forceFlush();\n        else if (view.input.compositionPendingChanges) Promise.resolve().then(()=>view.domObserver.flush());\n        view.input.compositionID++;\n        $a5ab20b42a0afbae$var$scheduleComposeEnd(view, 20);\n    }\n};\nfunction $a5ab20b42a0afbae$var$scheduleComposeEnd(view, delay) {\n    clearTimeout(view.input.composingTimeout);\n    if (delay > -1) view.input.composingTimeout = setTimeout(()=>$a5ab20b42a0afbae$var$endComposition(view), delay);\n}\nfunction $a5ab20b42a0afbae$var$clearComposition(view) {\n    if (view.composing) {\n        view.input.composing = false;\n        view.input.compositionEndedAt = Date.now();\n    }\n    while(view.input.compositionNodes.length > 0)view.input.compositionNodes.pop().markParentsDirty();\n}\nfunction $a5ab20b42a0afbae$var$findCompositionNode(view) {\n    let sel = view.domSelectionRange();\n    if (!sel.focusNode) return null;\n    let textBefore = $a5ab20b42a0afbae$var$textNodeBefore$1(sel.focusNode, sel.focusOffset);\n    let textAfter = $a5ab20b42a0afbae$var$textNodeAfter$1(sel.focusNode, sel.focusOffset);\n    if (textBefore && textAfter && textBefore != textAfter) {\n        let descAfter = textAfter.pmViewDesc, lastChanged = view.domObserver.lastChangedTextNode;\n        if (textBefore == lastChanged || textAfter == lastChanged) return lastChanged;\n        if (!descAfter || !descAfter.isText(textAfter.nodeValue)) return textAfter;\n        else if (view.input.compositionNode == textAfter) {\n            let descBefore = textBefore.pmViewDesc;\n            if (!(!descBefore || !descBefore.isText(textBefore.nodeValue))) return textAfter;\n        }\n    }\n    return textBefore || textAfter;\n}\n/**\n@internal\n*/ function $a5ab20b42a0afbae$var$endComposition(view, restarting = false) {\n    if ($a5ab20b42a0afbae$var$android && view.domObserver.flushingSoon >= 0) return;\n    view.domObserver.forceFlush();\n    $a5ab20b42a0afbae$var$clearComposition(view);\n    if (restarting || view.docView && view.docView.dirty) {\n        let sel = $a5ab20b42a0afbae$var$selectionFromDOM(view), cur = view.state.selection;\n        if (sel && !sel.eq(cur)) view.dispatch(view.state.tr.setSelection(sel));\n        else if ((view.markCursor || restarting) && !cur.$from.node(cur.$from.sharedDepth(cur.to)).inlineContent) view.dispatch(view.state.tr.deleteSelection());\n        else view.updateState(view.state);\n        return true;\n    }\n    return false;\n}\nfunction $a5ab20b42a0afbae$var$captureCopy(view, dom) {\n    // The extra wrapper is somehow necessary on IE/Edge to prevent the\n    // content from being mangled when it is put onto the clipboard\n    if (!view.dom.parentNode) return;\n    let wrap = view.dom.parentNode.appendChild(document.createElement(\"div\"));\n    wrap.appendChild(dom);\n    wrap.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n    let sel = getSelection(), range = document.createRange();\n    range.selectNodeContents(dom);\n    // Done because IE will fire a selectionchange moving the selection\n    // to its start when removeAllRanges is called and the editor still\n    // has focus (which will mess up the editor's selection state).\n    view.dom.blur();\n    sel.removeAllRanges();\n    sel.addRange(range);\n    setTimeout(()=>{\n        if (wrap.parentNode) wrap.parentNode.removeChild(wrap);\n        view.focus();\n    }, 50);\n}\n// This is very crude, but unfortunately both these browsers _pretend_\n// that they have a clipboard API—all the objects and methods are\n// there, they just don't work, and they are hard to test.\nconst $a5ab20b42a0afbae$var$brokenClipboardAPI = $a5ab20b42a0afbae$var$ie && $a5ab20b42a0afbae$var$ie_version < 15 || $a5ab20b42a0afbae$var$ios && $a5ab20b42a0afbae$var$webkit_version < 604;\n$a5ab20b42a0afbae$var$handlers.copy = $a5ab20b42a0afbae$var$editHandlers.cut = (view, _event)=>{\n    let event = _event;\n    let sel = view.state.selection, cut = event.type == \"cut\";\n    if (sel.empty) return;\n    // IE and Edge's clipboard interface is completely broken\n    let data = $a5ab20b42a0afbae$var$brokenClipboardAPI ? null : event.clipboardData;\n    let slice = sel.content(), { dom: dom, text: text } = $a5ab20b42a0afbae$var$serializeForClipboard(view, slice);\n    if (data) {\n        event.preventDefault();\n        data.clearData();\n        data.setData(\"text/html\", dom.innerHTML);\n        data.setData(\"text/plain\", text);\n    } else $a5ab20b42a0afbae$var$captureCopy(view, dom);\n    if (cut) view.dispatch(view.state.tr.deleteSelection().scrollIntoView().setMeta(\"uiEvent\", \"cut\"));\n};\nfunction $a5ab20b42a0afbae$var$sliceSingleNode(slice) {\n    return slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1 ? slice.content.firstChild : null;\n}\nfunction $a5ab20b42a0afbae$var$capturePaste(view, event) {\n    if (!view.dom.parentNode) return;\n    let plainText = view.input.shiftKey || view.state.selection.$from.parent.type.spec.code;\n    let target = view.dom.parentNode.appendChild(document.createElement(plainText ? \"textarea\" : \"div\"));\n    if (!plainText) target.contentEditable = \"true\";\n    target.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n    target.focus();\n    let plain = view.input.shiftKey && view.input.lastKeyCode != 45;\n    setTimeout(()=>{\n        view.focus();\n        if (target.parentNode) target.parentNode.removeChild(target);\n        if (plainText) $a5ab20b42a0afbae$var$doPaste(view, target.value, null, plain, event);\n        else $a5ab20b42a0afbae$var$doPaste(view, target.textContent, target.innerHTML, plain, event);\n    }, 50);\n}\nfunction $a5ab20b42a0afbae$var$doPaste(view, text, html, preferPlain, event) {\n    let slice = $a5ab20b42a0afbae$var$parseFromClipboard(view, text, html, preferPlain, view.state.selection.$from);\n    if (view.someProp(\"handlePaste\", (f)=>f(view, event, slice || (0, $1krlL.Slice).empty))) return true;\n    if (!slice) return false;\n    let singleNode = $a5ab20b42a0afbae$var$sliceSingleNode(slice);\n    let tr = singleNode ? view.state.tr.replaceSelectionWith(singleNode, preferPlain) : view.state.tr.replaceSelection(slice);\n    view.dispatch(tr.scrollIntoView().setMeta(\"paste\", true).setMeta(\"uiEvent\", \"paste\"));\n    return true;\n}\nfunction $a5ab20b42a0afbae$var$getText(clipboardData) {\n    let text = clipboardData.getData(\"text/plain\") || clipboardData.getData(\"Text\");\n    if (text) return text;\n    let uris = clipboardData.getData(\"text/uri-list\");\n    return uris ? uris.replace(/\\r?\\n/g, \" \") : \"\";\n}\n$a5ab20b42a0afbae$var$editHandlers.paste = (view, _event)=>{\n    let event = _event;\n    // Handling paste from JavaScript during composition is very poorly\n    // handled by browsers, so as a dodgy but preferable kludge, we just\n    // let the browser do its native thing there, except on Android,\n    // where the editor is almost always composing.\n    if (view.composing && !$a5ab20b42a0afbae$var$android) return;\n    let data = $a5ab20b42a0afbae$var$brokenClipboardAPI ? null : event.clipboardData;\n    let plain = view.input.shiftKey && view.input.lastKeyCode != 45;\n    if (data && $a5ab20b42a0afbae$var$doPaste(view, $a5ab20b42a0afbae$var$getText(data), data.getData(\"text/html\"), plain, event)) event.preventDefault();\n    else $a5ab20b42a0afbae$var$capturePaste(view, event);\n};\nclass $a5ab20b42a0afbae$var$Dragging {\n    constructor(slice, move, node){\n        this.slice = slice;\n        this.move = move;\n        this.node = node;\n    }\n}\nconst $a5ab20b42a0afbae$var$dragCopyModifier = $a5ab20b42a0afbae$var$mac ? \"altKey\" : \"ctrlKey\";\nfunction $a5ab20b42a0afbae$var$dragMoves(view, event) {\n    let copy;\n    view.someProp(\"dragCopies\", (test)=>{\n        copy = copy || test(event);\n    });\n    return copy != null ? !copy : !event[$a5ab20b42a0afbae$var$dragCopyModifier];\n}\n$a5ab20b42a0afbae$var$handlers.dragstart = (view, _event)=>{\n    let event = _event;\n    let mouseDown = view.input.mouseDown;\n    if (mouseDown) mouseDown.done();\n    if (!event.dataTransfer) return;\n    let sel = view.state.selection;\n    let pos = sel.empty ? null : view.posAtCoords($a5ab20b42a0afbae$var$eventCoords(event));\n    let node;\n    if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof (0, $1LeRC.NodeSelection) ? sel.to - 1 : sel.to)) ;\n    else if (mouseDown && mouseDown.mightDrag) node = (0, $1LeRC.NodeSelection).create(view.state.doc, mouseDown.mightDrag.pos);\n    else if (event.target && $a5ab20b42a0afbae$var$isElt(event.target)) {\n        let desc = view.docView.nearestDesc(event.target, true);\n        if (desc && desc.node.type.spec.draggable && desc != view.docView) node = (0, $1LeRC.NodeSelection).create(view.state.doc, desc.posBefore);\n    }\n    let draggedSlice = (node || view.state.selection).content();\n    let { dom: dom, text: text, slice: slice } = $a5ab20b42a0afbae$var$serializeForClipboard(view, draggedSlice);\n    // Pre-120 Chrome versions clear files when calling `clearData` (#1472)\n    if (!event.dataTransfer.files.length || !$a5ab20b42a0afbae$var$chrome || $a5ab20b42a0afbae$var$chrome_version > 120) event.dataTransfer.clearData();\n    event.dataTransfer.setData($a5ab20b42a0afbae$var$brokenClipboardAPI ? \"Text\" : \"text/html\", dom.innerHTML);\n    // See https://code.haverbeke.berlin/prosemirror/prosemirror/issues/1156\n    event.dataTransfer.effectAllowed = \"copyMove\";\n    if (!$a5ab20b42a0afbae$var$brokenClipboardAPI) event.dataTransfer.setData(\"text/plain\", text);\n    view.dragging = new $a5ab20b42a0afbae$var$Dragging(slice, $a5ab20b42a0afbae$var$dragMoves(view, event), node);\n};\n$a5ab20b42a0afbae$var$handlers.dragend = (view)=>{\n    let dragging = view.dragging;\n    window.setTimeout(()=>{\n        if (view.dragging == dragging) view.dragging = null;\n    }, 50);\n};\n$a5ab20b42a0afbae$var$editHandlers.dragover = $a5ab20b42a0afbae$var$editHandlers.dragenter = (_, e)=>e.preventDefault();\n$a5ab20b42a0afbae$var$editHandlers.drop = (view, event)=>{\n    try {\n        $a5ab20b42a0afbae$var$handleDrop(view, event, view.dragging);\n    } finally{\n        view.dragging = null;\n    }\n};\nfunction $a5ab20b42a0afbae$var$handleDrop(view, event, dragging) {\n    if (!event.dataTransfer) return;\n    let eventPos = view.posAtCoords($a5ab20b42a0afbae$var$eventCoords(event));\n    if (!eventPos) return;\n    let $mouse = view.state.doc.resolve(eventPos.pos);\n    let slice = dragging && dragging.slice;\n    if (slice) view.someProp(\"transformPasted\", (f)=>{\n        slice = f(slice, view, false);\n    });\n    else slice = $a5ab20b42a0afbae$var$parseFromClipboard(view, $a5ab20b42a0afbae$var$getText(event.dataTransfer), $a5ab20b42a0afbae$var$brokenClipboardAPI ? null : event.dataTransfer.getData(\"text/html\"), false, $mouse);\n    let move = !!(dragging && $a5ab20b42a0afbae$var$dragMoves(view, event));\n    if (view.someProp(\"handleDrop\", (f)=>f(view, event, slice || (0, $1krlL.Slice).empty, move))) {\n        event.preventDefault();\n        return;\n    }\n    if (!slice) return;\n    event.preventDefault();\n    let insertPos = slice ? (0, $gfgdn.dropPoint)(view.state.doc, $mouse.pos, slice) : $mouse.pos;\n    if (insertPos == null) insertPos = $mouse.pos;\n    let tr = view.state.tr;\n    if (move) {\n        let { node: node } = dragging;\n        if (node) node.replace(tr);\n        else tr.deleteSelection();\n    }\n    let pos = tr.mapping.map(insertPos);\n    let isNode = slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1;\n    let beforeInsert = tr.doc;\n    if (isNode) tr.replaceRangeWith(pos, pos, slice.content.firstChild);\n    else tr.replaceRange(pos, pos, slice);\n    if (tr.doc.eq(beforeInsert)) return;\n    let $pos = tr.doc.resolve(pos);\n    if (isNode && (0, $1LeRC.NodeSelection).isSelectable(slice.content.firstChild) && $pos.nodeAfter && $pos.nodeAfter.sameMarkup(slice.content.firstChild)) tr.setSelection(new (0, $1LeRC.NodeSelection)($pos));\n    else {\n        let end = tr.mapping.map(insertPos);\n        tr.mapping.maps[tr.mapping.maps.length - 1].forEach((_from, _to, _newFrom, newTo)=>end = newTo);\n        tr.setSelection($a5ab20b42a0afbae$var$selectionBetween(view, $pos, tr.doc.resolve(end)));\n    }\n    view.focus();\n    view.dispatch(tr.setMeta(\"uiEvent\", \"drop\"));\n}\n$a5ab20b42a0afbae$var$handlers.focus = (view)=>{\n    view.input.lastFocus = Date.now();\n    if (!view.focused) {\n        view.domObserver.stop();\n        view.dom.classList.add(\"ProseMirror-focused\");\n        view.domObserver.start();\n        view.focused = true;\n        setTimeout(()=>{\n            if (view.docView && view.hasFocus() && !view.domObserver.currentSelection.eq(view.domSelectionRange())) $a5ab20b42a0afbae$var$selectionToDOM(view);\n        }, 20);\n    }\n};\n$a5ab20b42a0afbae$var$handlers.blur = (view, _event)=>{\n    let event = _event;\n    if (view.focused) {\n        view.domObserver.stop();\n        view.dom.classList.remove(\"ProseMirror-focused\");\n        view.domObserver.start();\n        if (event.relatedTarget && view.dom.contains(event.relatedTarget)) view.domObserver.currentSelection.clear();\n        view.focused = false;\n    }\n};\n$a5ab20b42a0afbae$var$handlers.beforeinput = (view, _event)=>{\n    let event = _event;\n    // We should probably do more with beforeinput events, but support\n    // is so spotty that I'm still waiting to see where they are going.\n    // Very specific hack to deal with backspace sometimes failing on\n    // Chrome and Firefox Android when after an uneditable node.\n    if ($a5ab20b42a0afbae$var$android && event.inputType == \"deleteContentBackward\") {\n        view.domObserver.flushSoon();\n        let { domChangeCount: domChangeCount } = view.input;\n        setTimeout(()=>{\n            if (view.input.domChangeCount != domChangeCount) return; // Event already had some effect\n            // This bug tends to close the virtual keyboard, so we refocus\n            view.dom.blur();\n            view.focus();\n            if (view.someProp(\"handleKeyDown\", (f)=>f(view, $a5ab20b42a0afbae$var$keyEvent(8, \"Backspace\")))) return;\n            let { $cursor: $cursor } = view.state.selection;\n            // Crude approximation of backspace behavior when no command handled it\n            if ($cursor && $cursor.pos > 0) view.dispatch(view.state.tr.delete($cursor.pos - 1, $cursor.pos).scrollIntoView());\n        }, 50);\n    }\n};\n// Make sure all handlers get registered\nfor(let prop in $a5ab20b42a0afbae$var$editHandlers)$a5ab20b42a0afbae$var$handlers[prop] = $a5ab20b42a0afbae$var$editHandlers[prop];\nfunction $a5ab20b42a0afbae$var$compareObjs(a, b) {\n    if (a == b) return true;\n    for(let p in a)if (a[p] !== b[p]) return false;\n    for(let p in b)if (!(p in a)) return false;\n    return true;\n}\nclass $a5ab20b42a0afbae$var$WidgetType {\n    constructor(toDOM, spec){\n        this.toDOM = toDOM;\n        this.spec = spec || $a5ab20b42a0afbae$var$noSpec;\n        this.side = this.spec.side || 0;\n    }\n    map(mapping, span, offset, oldOffset) {\n        let { pos: pos, deleted: deleted } = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1);\n        return deleted ? null : new $a5ab20b42a0afbae$export$10e30b733df217ea(pos - offset, pos - offset, this);\n    }\n    valid() {\n        return true;\n    }\n    eq(other) {\n        return this == other || other instanceof $a5ab20b42a0afbae$var$WidgetType && (this.spec.key && this.spec.key == other.spec.key || this.toDOM == other.toDOM && $a5ab20b42a0afbae$var$compareObjs(this.spec, other.spec));\n    }\n    destroy(node) {\n        if (this.spec.destroy) this.spec.destroy(node);\n    }\n}\nclass $a5ab20b42a0afbae$var$InlineType {\n    constructor(attrs, spec){\n        this.attrs = attrs;\n        this.spec = spec || $a5ab20b42a0afbae$var$noSpec;\n    }\n    map(mapping, span, offset, oldOffset) {\n        let from = mapping.map(span.from + oldOffset, this.spec.inclusiveStart ? -1 : 1) - offset;\n        let to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset;\n        return from >= to ? null : new $a5ab20b42a0afbae$export$10e30b733df217ea(from, to, this);\n    }\n    valid(_, span) {\n        return span.from < span.to;\n    }\n    eq(other) {\n        return this == other || other instanceof $a5ab20b42a0afbae$var$InlineType && $a5ab20b42a0afbae$var$compareObjs(this.attrs, other.attrs) && $a5ab20b42a0afbae$var$compareObjs(this.spec, other.spec);\n    }\n    static is(span) {\n        return span.type instanceof $a5ab20b42a0afbae$var$InlineType;\n    }\n    destroy() {}\n}\nclass $a5ab20b42a0afbae$var$NodeType {\n    constructor(attrs, spec){\n        this.attrs = attrs;\n        this.spec = spec || $a5ab20b42a0afbae$var$noSpec;\n    }\n    map(mapping, span, offset, oldOffset) {\n        let from = mapping.mapResult(span.from + oldOffset, 1);\n        if (from.deleted) return null;\n        let to = mapping.mapResult(span.to + oldOffset, -1);\n        if (to.deleted || to.pos <= from.pos) return null;\n        return new $a5ab20b42a0afbae$export$10e30b733df217ea(from.pos - offset, to.pos - offset, this);\n    }\n    valid(node, span) {\n        let { index: index, offset: offset } = node.content.findIndex(span.from), child;\n        return offset == span.from && !(child = node.child(index)).isText && offset + child.nodeSize == span.to;\n    }\n    eq(other) {\n        return this == other || other instanceof $a5ab20b42a0afbae$var$NodeType && $a5ab20b42a0afbae$var$compareObjs(this.attrs, other.attrs) && $a5ab20b42a0afbae$var$compareObjs(this.spec, other.spec);\n    }\n    destroy() {}\n}\n/**\nDecoration objects can be provided to the view through the\n[`decorations` prop](https://prosemirror.net/docs/ref/#view.EditorProps.decorations). They come in\nseveral variants—see the static members of this class for details.\n*/ class $a5ab20b42a0afbae$export$10e30b733df217ea {\n    /**\n    @internal\n    */ constructor(/**\n    The start position of the decoration.\n    */ from, /**\n    The end position. Will be the same as `from` for [widget\n    decorations](https://prosemirror.net/docs/ref/#view.Decoration^widget).\n    */ to, /**\n    @internal\n    */ type){\n        this.from = from;\n        this.to = to;\n        this.type = type;\n    }\n    /**\n    @internal\n    */ copy(from, to) {\n        return new $a5ab20b42a0afbae$export$10e30b733df217ea(from, to, this.type);\n    }\n    /**\n    @internal\n    */ eq(other, offset = 0) {\n        return this.type.eq(other.type) && this.from + offset == other.from && this.to + offset == other.to;\n    }\n    /**\n    @internal\n    */ map(mapping, offset, oldOffset) {\n        return this.type.map(mapping, this, offset, oldOffset);\n    }\n    /**\n    Creates a widget decoration, which is a DOM node that's shown in\n    the document at the given position. It is recommended that you\n    delay rendering the widget by passing a function that will be\n    called when the widget is actually drawn in a view, but you can\n    also directly pass a DOM node. `getPos` can be used to find the\n    widget's current document position.\n    */ static widget(pos, toDOM, spec) {\n        return new $a5ab20b42a0afbae$export$10e30b733df217ea(pos, pos, new $a5ab20b42a0afbae$var$WidgetType(toDOM, spec));\n    }\n    /**\n    Creates an inline decoration, which adds the given attributes to\n    each inline node between `from` and `to`.\n    */ static inline(from, to, attrs, spec) {\n        return new $a5ab20b42a0afbae$export$10e30b733df217ea(from, to, new $a5ab20b42a0afbae$var$InlineType(attrs, spec));\n    }\n    /**\n    Creates a node decoration. `from` and `to` should point precisely\n    before and after a node in the document. That node, and only that\n    node, will receive the given attributes.\n    */ static node(from, to, attrs, spec) {\n        return new $a5ab20b42a0afbae$export$10e30b733df217ea(from, to, new $a5ab20b42a0afbae$var$NodeType(attrs, spec));\n    }\n    /**\n    The spec provided when creating this decoration. Can be useful\n    if you've stored extra information in that object.\n    */ get spec() {\n        return this.type.spec;\n    }\n    /**\n    @internal\n    */ get inline() {\n        return this.type instanceof $a5ab20b42a0afbae$var$InlineType;\n    }\n    /**\n    @internal\n    */ get widget() {\n        return this.type instanceof $a5ab20b42a0afbae$var$WidgetType;\n    }\n}\nconst $a5ab20b42a0afbae$var$none = [], $a5ab20b42a0afbae$var$noSpec = {};\n/**\nA collection of [decorations](https://prosemirror.net/docs/ref/#view.Decoration), organized in such\na way that the drawing algorithm can efficiently use and compare\nthem. This is a persistent data structure—it is not modified,\nupdates create a new value.\n*/ class $a5ab20b42a0afbae$export$93bf62eb445cec98 {\n    /**\n    @internal\n    */ constructor(local, children){\n        this.local = local.length ? local : $a5ab20b42a0afbae$var$none;\n        this.children = children.length ? children : $a5ab20b42a0afbae$var$none;\n    }\n    /**\n    Create a set of decorations, using the structure of the given\n    document. This will consume (modify) the `decorations` array, so\n    you must make a copy if you want need to preserve that.\n    */ static create(doc, decorations) {\n        return decorations.length ? $a5ab20b42a0afbae$var$buildTree(decorations, doc, 0, $a5ab20b42a0afbae$var$noSpec) : $a5ab20b42a0afbae$var$empty;\n    }\n    /**\n    Find all decorations in this set which touch the given range\n    (including decorations that start or end directly at the\n    boundaries) and match the given predicate on their spec. When\n    `start` and `end` are omitted, all decorations in the set are\n    considered. When `predicate` isn't given, all decorations are\n    assumed to match.\n    */ find(start, end, predicate) {\n        let result = [];\n        this.findInner(start == null ? 0 : start, end == null ? 1e9 : end, result, 0, predicate);\n        return result;\n    }\n    findInner(start, end, result, offset, predicate) {\n        for(let i = 0; i < this.local.length; i++){\n            let span = this.local[i];\n            if (span.from <= end && span.to >= start && (!predicate || predicate(span.spec))) result.push(span.copy(span.from + offset, span.to + offset));\n        }\n        for(let i = 0; i < this.children.length; i += 3)if (this.children[i] < end && this.children[i + 1] > start) {\n            let childOff = this.children[i] + 1;\n            this.children[i + 2].findInner(start - childOff, end - childOff, result, offset + childOff, predicate);\n        }\n    }\n    /**\n    Map the set of decorations in response to a change in the\n    document.\n    */ map(mapping, doc, options) {\n        if (this == $a5ab20b42a0afbae$var$empty || mapping.maps.length == 0) return this;\n        return this.mapInner(mapping, doc, 0, 0, options || $a5ab20b42a0afbae$var$noSpec);\n    }\n    /**\n    @internal\n    */ mapInner(mapping, node, offset, oldOffset, options) {\n        let newLocal;\n        for(let i = 0; i < this.local.length; i++){\n            let mapped = this.local[i].map(mapping, offset, oldOffset);\n            if (mapped && mapped.type.valid(node, mapped)) (newLocal || (newLocal = [])).push(mapped);\n            else if (options.onRemove) options.onRemove(this.local[i].spec);\n        }\n        if (this.children.length) return $a5ab20b42a0afbae$var$mapChildren(this.children, newLocal || [], mapping, node, offset, oldOffset, options);\n        else return newLocal ? new $a5ab20b42a0afbae$export$93bf62eb445cec98(newLocal.sort($a5ab20b42a0afbae$var$byPos), $a5ab20b42a0afbae$var$none) : $a5ab20b42a0afbae$var$empty;\n    }\n    /**\n    Add the given array of decorations to the ones in the set,\n    producing a new set. Consumes the `decorations` array. Needs\n    access to the current document to create the appropriate tree\n    structure.\n    */ add(doc, decorations) {\n        if (!decorations.length) return this;\n        if (this == $a5ab20b42a0afbae$var$empty) return $a5ab20b42a0afbae$export$93bf62eb445cec98.create(doc, decorations);\n        return this.addInner(doc, decorations, 0);\n    }\n    addInner(doc, decorations, offset) {\n        let children, childIndex = 0;\n        doc.forEach((childNode, childOffset)=>{\n            let baseOffset = childOffset + offset, found;\n            if (!(found = $a5ab20b42a0afbae$var$takeSpansForNode(decorations, childNode, baseOffset))) return;\n            if (!children) children = this.children.slice();\n            while(childIndex < children.length && children[childIndex] < childOffset)childIndex += 3;\n            if (children[childIndex] == childOffset) children[childIndex + 2] = children[childIndex + 2].addInner(childNode, found, baseOffset + 1);\n            else children.splice(childIndex, 0, childOffset, childOffset + childNode.nodeSize, $a5ab20b42a0afbae$var$buildTree(found, childNode, baseOffset + 1, $a5ab20b42a0afbae$var$noSpec));\n            childIndex += 3;\n        });\n        let local = $a5ab20b42a0afbae$var$moveSpans(childIndex ? $a5ab20b42a0afbae$var$withoutNulls(decorations) : decorations, -offset);\n        for(let i = 0; i < local.length; i++)if (!local[i].type.valid(doc, local[i])) local.splice(i--, 1);\n        return new $a5ab20b42a0afbae$export$93bf62eb445cec98(local.length ? this.local.concat(local).sort($a5ab20b42a0afbae$var$byPos) : this.local, children || this.children);\n    }\n    /**\n    Create a new set that contains the decorations in this set, minus\n    the ones in the given array.\n    */ remove(decorations) {\n        if (decorations.length == 0 || this == $a5ab20b42a0afbae$var$empty) return this;\n        return this.removeInner(decorations, 0);\n    }\n    removeInner(decorations, offset) {\n        let children = this.children, local = this.local;\n        for(let i = 0; i < children.length; i += 3){\n            let found;\n            let from = children[i] + offset, to = children[i + 1] + offset;\n            for(let j = 0, span; j < decorations.length; j++)if (span = decorations[j]) {\n                if (span.from > from && span.to < to) {\n                    decorations[j] = null;\n                    (found || (found = [])).push(span);\n                }\n            }\n            if (!found) continue;\n            if (children == this.children) children = this.children.slice();\n            let removed = children[i + 2].removeInner(found, from + 1);\n            if (removed != $a5ab20b42a0afbae$var$empty) children[i + 2] = removed;\n            else {\n                children.splice(i, 3);\n                i -= 3;\n            }\n        }\n        if (local.length) {\n            for(let i = 0, span; i < decorations.length; i++)if (span = decorations[i]) {\n                for(let j = 0; j < local.length; j++)if (local[j].eq(span, offset)) {\n                    if (local == this.local) local = this.local.slice();\n                    local.splice(j--, 1);\n                }\n            }\n        }\n        if (children == this.children && local == this.local) return this;\n        return local.length || children.length ? new $a5ab20b42a0afbae$export$93bf62eb445cec98(local, children) : $a5ab20b42a0afbae$var$empty;\n    }\n    forChild(offset, node) {\n        if (this == $a5ab20b42a0afbae$var$empty) return this;\n        if (node.isLeaf) return $a5ab20b42a0afbae$export$93bf62eb445cec98.empty;\n        let child, local;\n        for(let i = 0; i < this.children.length; i += 3)if (this.children[i] >= offset) {\n            if (this.children[i] == offset) child = this.children[i + 2];\n            break;\n        }\n        let start = offset + 1, end = start + node.content.size;\n        for(let i = 0; i < this.local.length; i++){\n            let dec = this.local[i];\n            if (dec.from < end && dec.to > start && dec.type instanceof $a5ab20b42a0afbae$var$InlineType) {\n                let from = Math.max(start, dec.from) - start, to = Math.min(end, dec.to) - start;\n                if (from < to) (local || (local = [])).push(dec.copy(from, to));\n            }\n        }\n        if (local) {\n            let localSet = new $a5ab20b42a0afbae$export$93bf62eb445cec98(local.sort($a5ab20b42a0afbae$var$byPos), $a5ab20b42a0afbae$var$none);\n            return child ? new $a5ab20b42a0afbae$var$DecorationGroup([\n                localSet,\n                child\n            ]) : localSet;\n        }\n        return child || $a5ab20b42a0afbae$var$empty;\n    }\n    /**\n    @internal\n    */ eq(other) {\n        if (this == other) return true;\n        if (!(other instanceof $a5ab20b42a0afbae$export$93bf62eb445cec98) || this.local.length != other.local.length || this.children.length != other.children.length) return false;\n        for(let i = 0; i < this.local.length; i++)if (!this.local[i].eq(other.local[i])) return false;\n        for(let i = 0; i < this.children.length; i += 3)if (this.children[i] != other.children[i] || this.children[i + 1] != other.children[i + 1] || !this.children[i + 2].eq(other.children[i + 2])) return false;\n        return true;\n    }\n    /**\n    @internal\n    */ locals(node) {\n        return $a5ab20b42a0afbae$var$removeOverlap(this.localsInner(node));\n    }\n    /**\n    @internal\n    */ localsInner(node) {\n        if (this == $a5ab20b42a0afbae$var$empty) return $a5ab20b42a0afbae$var$none;\n        if (node.inlineContent || !this.local.some($a5ab20b42a0afbae$var$InlineType.is)) return this.local;\n        let result = [];\n        for(let i = 0; i < this.local.length; i++)if (!(this.local[i].type instanceof $a5ab20b42a0afbae$var$InlineType)) result.push(this.local[i]);\n        return result;\n    }\n    forEachSet(f) {\n        f(this);\n    }\n}\n/**\nThe empty set of decorations.\n*/ $a5ab20b42a0afbae$export$93bf62eb445cec98.empty = new $a5ab20b42a0afbae$export$93bf62eb445cec98([], []);\n/**\n@internal\n*/ $a5ab20b42a0afbae$export$93bf62eb445cec98.removeOverlap = $a5ab20b42a0afbae$var$removeOverlap;\nconst $a5ab20b42a0afbae$var$empty = $a5ab20b42a0afbae$export$93bf62eb445cec98.empty;\n// An abstraction that allows the code dealing with decorations to\n// treat multiple DecorationSet objects as if it were a single object\n// with (a subset of) the same interface.\nclass $a5ab20b42a0afbae$var$DecorationGroup {\n    constructor(members){\n        this.members = members;\n    }\n    map(mapping, doc) {\n        const mappedDecos = this.members.map((member)=>member.map(mapping, doc, $a5ab20b42a0afbae$var$noSpec));\n        return $a5ab20b42a0afbae$var$DecorationGroup.from(mappedDecos);\n    }\n    forChild(offset, child) {\n        if (child.isLeaf) return $a5ab20b42a0afbae$export$93bf62eb445cec98.empty;\n        let found = [];\n        for(let i = 0; i < this.members.length; i++){\n            let result = this.members[i].forChild(offset, child);\n            if (result == $a5ab20b42a0afbae$var$empty) continue;\n            if (result instanceof $a5ab20b42a0afbae$var$DecorationGroup) found = found.concat(result.members);\n            else found.push(result);\n        }\n        return $a5ab20b42a0afbae$var$DecorationGroup.from(found);\n    }\n    eq(other) {\n        if (!(other instanceof $a5ab20b42a0afbae$var$DecorationGroup) || other.members.length != this.members.length) return false;\n        for(let i = 0; i < this.members.length; i++)if (!this.members[i].eq(other.members[i])) return false;\n        return true;\n    }\n    locals(node) {\n        let result, sorted = true;\n        for(let i = 0; i < this.members.length; i++){\n            let locals = this.members[i].localsInner(node);\n            if (!locals.length) continue;\n            if (!result) result = locals;\n            else {\n                if (sorted) {\n                    result = result.slice();\n                    sorted = false;\n                }\n                for(let j = 0; j < locals.length; j++)result.push(locals[j]);\n            }\n        }\n        return result ? $a5ab20b42a0afbae$var$removeOverlap(sorted ? result : result.sort($a5ab20b42a0afbae$var$byPos)) : $a5ab20b42a0afbae$var$none;\n    }\n    // Create a group for the given array of decoration sets, or return\n    // a single set when possible.\n    static from(members) {\n        switch(members.length){\n            case 0:\n                return $a5ab20b42a0afbae$var$empty;\n            case 1:\n                return members[0];\n            default:\n                return new $a5ab20b42a0afbae$var$DecorationGroup(members.every((m)=>m instanceof $a5ab20b42a0afbae$export$93bf62eb445cec98) ? members : members.reduce((r, m)=>r.concat(m instanceof $a5ab20b42a0afbae$export$93bf62eb445cec98 ? m : m.members), []));\n        }\n    }\n    forEachSet(f) {\n        for(let i = 0; i < this.members.length; i++)this.members[i].forEachSet(f);\n    }\n}\nfunction $a5ab20b42a0afbae$var$mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) {\n    let children = oldChildren.slice();\n    // Mark the children that are directly touched by changes, and\n    // move those that are after the changes.\n    for(let i = 0, baseOffset = oldOffset; i < mapping.maps.length; i++){\n        let moved = 0;\n        mapping.maps[i].forEach((oldStart, oldEnd, newStart, newEnd)=>{\n            let dSize = newEnd - newStart - (oldEnd - oldStart);\n            for(let i = 0; i < children.length; i += 3){\n                let end = children[i + 1];\n                if (end < 0 || oldStart > end + baseOffset - moved) continue;\n                let start = children[i] + baseOffset - moved;\n                if (oldEnd >= start) children[i + 1] = oldStart <= start ? -2 : -1;\n                else if (oldStart >= baseOffset && dSize) {\n                    children[i] += dSize;\n                    children[i + 1] += dSize;\n                }\n            }\n            moved += dSize;\n        });\n        baseOffset = mapping.maps[i].map(baseOffset, -1);\n    }\n    // Find the child nodes that still correspond to a single node,\n    // recursively call mapInner on them and update their positions.\n    let mustRebuild = false;\n    for(let i = 0; i < children.length; i += 3)if (children[i + 1] < 0) {\n        if (children[i + 1] == -2) {\n            mustRebuild = true;\n            children[i + 1] = -1;\n            continue;\n        }\n        let from = mapping.map(oldChildren[i] + oldOffset), fromLocal = from - offset;\n        if (fromLocal < 0 || fromLocal >= node.content.size) {\n            mustRebuild = true;\n            continue;\n        }\n        // Must read oldChildren because children was tagged with -1\n        let to = mapping.map(oldChildren[i + 1] + oldOffset, -1), toLocal = to - offset;\n        let { index: index, offset: childOffset } = node.content.findIndex(fromLocal);\n        let childNode = node.maybeChild(index);\n        if (childNode && childOffset == fromLocal && childOffset + childNode.nodeSize == toLocal) {\n            let mapped = children[i + 2].mapInner(mapping, childNode, from + 1, oldChildren[i] + oldOffset + 1, options);\n            if (mapped != $a5ab20b42a0afbae$var$empty) {\n                children[i] = fromLocal;\n                children[i + 1] = toLocal;\n                children[i + 2] = mapped;\n            } else {\n                children[i + 1] = -2;\n                mustRebuild = true;\n            }\n        } else mustRebuild = true;\n    }\n    // Remaining children must be collected and rebuilt into the appropriate structure\n    if (mustRebuild) {\n        let decorations = $a5ab20b42a0afbae$var$mapAndGatherRemainingDecorations(children, oldChildren, newLocal, mapping, offset, oldOffset, options);\n        let built = $a5ab20b42a0afbae$var$buildTree(decorations, node, 0, options);\n        newLocal = built.local;\n        for(let i = 0; i < children.length; i += 3)if (children[i + 1] < 0) {\n            children.splice(i, 3);\n            i -= 3;\n        }\n        for(let i = 0, j = 0; i < built.children.length; i += 3){\n            let from = built.children[i];\n            while(j < children.length && children[j] < from)j += 3;\n            children.splice(j, 0, built.children[i], built.children[i + 1], built.children[i + 2]);\n        }\n    }\n    return new $a5ab20b42a0afbae$export$93bf62eb445cec98(newLocal.sort($a5ab20b42a0afbae$var$byPos), children);\n}\nfunction $a5ab20b42a0afbae$var$moveSpans(spans, offset) {\n    if (!offset || !spans.length) return spans;\n    let result = [];\n    for(let i = 0; i < spans.length; i++){\n        let span = spans[i];\n        result.push(new $a5ab20b42a0afbae$export$10e30b733df217ea(span.from + offset, span.to + offset, span.type));\n    }\n    return result;\n}\nfunction $a5ab20b42a0afbae$var$mapAndGatherRemainingDecorations(children, oldChildren, decorations, mapping, offset, oldOffset, options) {\n    // Gather all decorations from the remaining marked children\n    function gather(set, oldOffset) {\n        for(let i = 0; i < set.local.length; i++){\n            let mapped = set.local[i].map(mapping, offset, oldOffset);\n            if (mapped) decorations.push(mapped);\n            else if (options.onRemove) options.onRemove(set.local[i].spec);\n        }\n        for(let i = 0; i < set.children.length; i += 3)gather(set.children[i + 2], set.children[i] + oldOffset + 1);\n    }\n    for(let i = 0; i < children.length; i += 3)if (children[i + 1] == -1) gather(children[i + 2], oldChildren[i] + oldOffset + 1);\n    return decorations;\n}\nfunction $a5ab20b42a0afbae$var$takeSpansForNode(spans, node, offset) {\n    if (node.isLeaf) return null;\n    let end = offset + node.nodeSize, found = null;\n    for(let i = 0, span; i < spans.length; i++)if ((span = spans[i]) && span.from > offset && span.to < end) {\n        (found || (found = [])).push(span);\n        spans[i] = null;\n    }\n    return found;\n}\nfunction $a5ab20b42a0afbae$var$withoutNulls(array) {\n    let result = [];\n    for(let i = 0; i < array.length; i++)if (array[i] != null) result.push(array[i]);\n    return result;\n}\n// Build up a tree that corresponds to a set of decorations. `offset`\n// is a base offset that should be subtracted from the `from` and `to`\n// positions in the spans (so that we don't have to allocate new spans\n// for recursive calls).\nfunction $a5ab20b42a0afbae$var$buildTree(spans, node, offset, options) {\n    let children = [], hasNulls = false;\n    node.forEach((childNode, localStart)=>{\n        let found = $a5ab20b42a0afbae$var$takeSpansForNode(spans, childNode, localStart + offset);\n        if (found) {\n            hasNulls = true;\n            let subtree = $a5ab20b42a0afbae$var$buildTree(found, childNode, offset + localStart + 1, options);\n            if (subtree != $a5ab20b42a0afbae$var$empty) children.push(localStart, localStart + childNode.nodeSize, subtree);\n        }\n    });\n    let locals = $a5ab20b42a0afbae$var$moveSpans(hasNulls ? $a5ab20b42a0afbae$var$withoutNulls(spans) : spans, -offset).sort($a5ab20b42a0afbae$var$byPos);\n    for(let i = 0; i < locals.length; i++)if (!locals[i].type.valid(node, locals[i])) {\n        if (options.onRemove) options.onRemove(locals[i].spec);\n        locals.splice(i--, 1);\n    }\n    return locals.length || children.length ? new $a5ab20b42a0afbae$export$93bf62eb445cec98(locals, children) : $a5ab20b42a0afbae$var$empty;\n}\n// Used to sort decorations so that ones with a low start position\n// come first, and within a set with the same start position, those\n// with an smaller end position come first.\nfunction $a5ab20b42a0afbae$var$byPos(a, b) {\n    return a.from - b.from || a.to - b.to;\n}\n// Scan a sorted array of decorations for partially overlapping spans,\n// and split those so that only fully overlapping spans are left (to\n// make subsequent rendering easier). Will return the input array if\n// no partially overlapping spans are found (the common case).\nfunction $a5ab20b42a0afbae$var$removeOverlap(spans) {\n    let working = spans;\n    for(let i = 0; i < working.length - 1; i++){\n        let span = working[i];\n        if (span.from != span.to) for(let j = i + 1; j < working.length; j++){\n            let next = working[j];\n            if (next.from == span.from) {\n                if (next.to != span.to) {\n                    if (working == spans) working = spans.slice();\n                    // Followed by a partially overlapping larger span. Split that\n                    // span.\n                    working[j] = next.copy(next.from, span.to);\n                    $a5ab20b42a0afbae$var$insertAhead(working, j + 1, next.copy(span.to, next.to));\n                }\n                continue;\n            } else {\n                if (next.from < span.to) {\n                    if (working == spans) working = spans.slice();\n                    // The end of this one overlaps with a subsequent span. Split\n                    // this one.\n                    working[i] = span.copy(span.from, next.from);\n                    $a5ab20b42a0afbae$var$insertAhead(working, j, span.copy(next.from, span.to));\n                }\n                break;\n            }\n        }\n    }\n    return working;\n}\nfunction $a5ab20b42a0afbae$var$insertAhead(array, i, deco) {\n    while(i < array.length && $a5ab20b42a0afbae$var$byPos(deco, array[i]) > 0)i++;\n    array.splice(i, 0, deco);\n}\n// Get the decorations associated with the current props of a view.\nfunction $a5ab20b42a0afbae$var$viewDecorations(view) {\n    let found = [];\n    view.someProp(\"decorations\", (f)=>{\n        let result = f(view.state);\n        if (result && result != $a5ab20b42a0afbae$var$empty) found.push(result);\n    });\n    if (view.cursorWrapper) found.push($a5ab20b42a0afbae$export$93bf62eb445cec98.create(view.state.doc, [\n        view.cursorWrapper.deco\n    ]));\n    return $a5ab20b42a0afbae$var$DecorationGroup.from(found);\n}\nconst $a5ab20b42a0afbae$var$observeOptions = {\n    childList: true,\n    characterData: true,\n    characterDataOldValue: true,\n    attributes: true,\n    attributeOldValue: true,\n    subtree: true\n};\n// IE11 has very broken mutation observers, so we also listen to DOMCharacterDataModified\nconst $a5ab20b42a0afbae$var$useCharData = $a5ab20b42a0afbae$var$ie && $a5ab20b42a0afbae$var$ie_version <= 11;\nclass $a5ab20b42a0afbae$var$SelectionState {\n    constructor(){\n        this.anchorNode = null;\n        this.anchorOffset = 0;\n        this.focusNode = null;\n        this.focusOffset = 0;\n    }\n    set(sel) {\n        this.anchorNode = sel.anchorNode;\n        this.anchorOffset = sel.anchorOffset;\n        this.focusNode = sel.focusNode;\n        this.focusOffset = sel.focusOffset;\n    }\n    clear() {\n        this.anchorNode = this.focusNode = null;\n    }\n    eq(sel) {\n        return sel.anchorNode == this.anchorNode && sel.anchorOffset == this.anchorOffset && sel.focusNode == this.focusNode && sel.focusOffset == this.focusOffset;\n    }\n}\nclass $a5ab20b42a0afbae$var$DOMObserver {\n    constructor(view, handleDOMChange){\n        this.view = view;\n        this.handleDOMChange = handleDOMChange;\n        this.queue = [];\n        this.flushingSoon = -1;\n        this.observer = null;\n        this.currentSelection = new $a5ab20b42a0afbae$var$SelectionState;\n        this.onCharData = null;\n        this.suppressingSelectionUpdates = false;\n        this.lastChangedTextNode = null;\n        this.observer = window.MutationObserver && new window.MutationObserver((mutations)=>{\n            for(let i = 0; i < mutations.length; i++)this.queue.push(mutations[i]);\n            if ($a5ab20b42a0afbae$var$ie && $a5ab20b42a0afbae$var$ie_version <= 11 && mutations.some((m)=>m.type == \"childList\" && m.removedNodes.length || m.type == \"characterData\" && m.oldValue.length > m.target.nodeValue.length)) // IE11 will sometimes (on backspacing out a single character\n            // text node after a BR node) call the observer callback\n            // before actually updating the DOM, which will cause\n            // ProseMirror to miss the change (see #930)\n            this.flushSoon();\n            else if ($a5ab20b42a0afbae$var$safari && view.composing && mutations.some((m)=>m.type == \"childList\" && m.target.nodeName == \"TR\")) {\n                // Safari does weird stuff when finishing a composition in a\n                // table cell, which tends to involve inserting inappropriate\n                // nodes in the table row.\n                view.input.badSafariComposition = true;\n                this.flushSoon();\n            } else this.flush();\n        });\n        if ($a5ab20b42a0afbae$var$useCharData) this.onCharData = (e)=>{\n            this.queue.push({\n                target: e.target,\n                type: \"characterData\",\n                oldValue: e.prevValue\n            });\n            this.flushSoon();\n        };\n        this.onSelectionChange = this.onSelectionChange.bind(this);\n    }\n    flushSoon() {\n        if (this.flushingSoon < 0) this.flushingSoon = window.setTimeout(()=>{\n            this.flushingSoon = -1;\n            this.flush();\n        }, 20);\n    }\n    forceFlush() {\n        if (this.flushingSoon > -1) {\n            window.clearTimeout(this.flushingSoon);\n            this.flushingSoon = -1;\n            this.flush();\n        }\n    }\n    start() {\n        if (this.observer) {\n            this.observer.takeRecords();\n            this.observer.observe(this.view.dom, $a5ab20b42a0afbae$var$observeOptions);\n        }\n        if (this.onCharData) this.view.dom.addEventListener(\"DOMCharacterDataModified\", this.onCharData);\n        this.connectSelection();\n    }\n    stop() {\n        if (this.observer) {\n            let take = this.observer.takeRecords();\n            if (take.length) {\n                for(let i = 0; i < take.length; i++)this.queue.push(take[i]);\n                window.setTimeout(()=>this.flush(), 20);\n            }\n            this.observer.disconnect();\n        }\n        if (this.onCharData) this.view.dom.removeEventListener(\"DOMCharacterDataModified\", this.onCharData);\n        this.disconnectSelection();\n    }\n    connectSelection() {\n        this.view.dom.ownerDocument.addEventListener(\"selectionchange\", this.onSelectionChange);\n    }\n    disconnectSelection() {\n        this.view.dom.ownerDocument.removeEventListener(\"selectionchange\", this.onSelectionChange);\n    }\n    suppressSelectionUpdates() {\n        this.suppressingSelectionUpdates = true;\n        setTimeout(()=>this.suppressingSelectionUpdates = false, 50);\n    }\n    onSelectionChange() {\n        if (!$a5ab20b42a0afbae$var$hasFocusAndSelection(this.view)) return;\n        if (this.suppressingSelectionUpdates) return $a5ab20b42a0afbae$var$selectionToDOM(this.view);\n        // Deletions on IE11 fire their events in the wrong order, giving\n        // us a selection change event before the DOM changes are\n        // reported.\n        if ($a5ab20b42a0afbae$var$ie && $a5ab20b42a0afbae$var$ie_version <= 11 && !this.view.state.selection.empty) {\n            let sel = this.view.domSelectionRange();\n            // Selection.isCollapsed isn't reliable on IE\n            if (sel.focusNode && $a5ab20b42a0afbae$var$isEquivalentPosition(sel.focusNode, sel.focusOffset, sel.anchorNode, sel.anchorOffset)) return this.flushSoon();\n        }\n        this.flush();\n    }\n    setCurSelection() {\n        this.currentSelection.set(this.view.domSelectionRange());\n    }\n    ignoreSelectionChange(sel) {\n        if (!sel.focusNode) return true;\n        let ancestors = new Set, container;\n        for(let scan = sel.focusNode; scan; scan = $a5ab20b42a0afbae$var$parentNode(scan))ancestors.add(scan);\n        for(let scan = sel.anchorNode; scan; scan = $a5ab20b42a0afbae$var$parentNode(scan))if (ancestors.has(scan)) {\n            container = scan;\n            break;\n        }\n        let desc = container && this.view.docView.nearestDesc(container);\n        if (desc && desc.ignoreMutation({\n            type: \"selection\",\n            target: $a5ab20b42a0afbae$var$isText(container) ? container.parentNode : container\n        })) {\n            this.setCurSelection();\n            return true;\n        }\n    }\n    pendingRecords() {\n        if (this.observer) for (let mut of this.observer.takeRecords())this.queue.push(mut);\n        return this.queue;\n    }\n    flush() {\n        let { view: view } = this;\n        if (!view.docView || this.flushingSoon > -1) return;\n        let mutations = this.pendingRecords();\n        if (mutations.length) this.queue = [];\n        let sel = view.domSelectionRange();\n        let newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && $a5ab20b42a0afbae$var$hasFocusAndSelection(view) && !this.ignoreSelectionChange(sel);\n        let from = -1, to = -1, typeOver = false, added = [];\n        if (view.editable) for(let i = 0; i < mutations.length; i++){\n            let result = this.registerMutation(mutations[i], added);\n            if (result) {\n                from = from < 0 ? result.from : Math.min(result.from, from);\n                to = to < 0 ? result.to : Math.max(result.to, to);\n                if (result.typeOver) typeOver = true;\n            }\n        }\n        if (added.some((n)=>n.nodeName == \"BR\") && (view.input.lastKeyCode == 8 || view.input.lastKeyCode == 46 || $a5ab20b42a0afbae$var$chrome && (view.composing || view.input.compositionEndedAt > Date.now() - 50) && mutations.some((m)=>m.type == \"childList\" && m.removedNodes.length))) {\n            // Browsers sometimes insert a bogus break node if you\n            // backspace out the last bit of text before an inline-flex node (#1552)\n            for (let node of added)if (node.nodeName == \"BR\" && node.parentNode) {\n                let after = node.nextSibling;\n                while(after && $a5ab20b42a0afbae$var$isElt(after)){\n                    if (after.contentEditable == \"false\") {\n                        node.parentNode.removeChild(node);\n                        break;\n                    }\n                    after = after.firstChild;\n                }\n            }\n        } else if ($a5ab20b42a0afbae$var$gecko && added.length) {\n            let brs = added.filter((n)=>n.nodeName == \"BR\");\n            if (brs.length == 2) {\n                let [a, b] = brs;\n                if (a.parentNode && a.parentNode.parentNode == b.parentNode) b.remove();\n                else a.remove();\n            } else {\n                let { focusNode: focusNode } = this.currentSelection;\n                for (let br of brs){\n                    let parent = br.parentNode;\n                    if (parent && parent.nodeName == \"LI\" && (!focusNode || $a5ab20b42a0afbae$var$blockParent(view, focusNode) != parent)) br.remove();\n                }\n            }\n        }\n        let readSel = null;\n        // If it looks like the browser has reset the selection to the\n        // start of the document after focus, restore the selection from\n        // the state\n        if (from < 0 && newSel && view.input.lastFocus > Date.now() - 200 && Math.max(view.input.lastTouch, view.input.lastClick.time) < Date.now() - 300 && $a5ab20b42a0afbae$var$selectionCollapsed(sel) && (readSel = $a5ab20b42a0afbae$var$selectionFromDOM(view)) && readSel.eq((0, $1LeRC.Selection).near(view.state.doc.resolve(0), 1))) {\n            view.input.lastFocus = 0;\n            $a5ab20b42a0afbae$var$selectionToDOM(view);\n            this.currentSelection.set(sel);\n            view.scrollToSelection();\n        } else if (from > -1 || newSel) {\n            if (from > -1) {\n                view.docView.markDirty(from, to);\n                $a5ab20b42a0afbae$var$checkCSS(view);\n            }\n            if (view.input.badSafariComposition) {\n                view.input.badSafariComposition = false;\n                $a5ab20b42a0afbae$var$fixUpBadSafariComposition(view, added);\n            }\n            this.handleDOMChange(from, to, typeOver, added);\n            if (view.docView && view.docView.dirty) view.updateState(view.state);\n            else if (!this.currentSelection.eq(sel)) $a5ab20b42a0afbae$var$selectionToDOM(view);\n            this.currentSelection.set(sel);\n        }\n    }\n    registerMutation(mut, added) {\n        // Ignore mutations inside nodes that were already noted as inserted\n        if (added.indexOf(mut.target) > -1) return null;\n        let desc = this.view.docView.nearestDesc(mut.target);\n        if (mut.type == \"attributes\" && (desc == this.view.docView || mut.attributeName == \"contenteditable\" || // Firefox sometimes fires spurious events for null/empty styles\n        mut.attributeName == \"style\" && !mut.oldValue && !mut.target.getAttribute(\"style\"))) return null;\n        if (!desc || desc.ignoreMutation(mut)) return null;\n        if (mut.type == \"childList\") {\n            for(let i = 0; i < mut.addedNodes.length; i++){\n                let node = mut.addedNodes[i];\n                added.push(node);\n                if ($a5ab20b42a0afbae$var$isText(node)) this.lastChangedTextNode = node;\n            }\n            if (desc.contentDOM && desc.contentDOM != desc.dom && !desc.contentDOM.contains(mut.target)) return {\n                from: desc.posBefore,\n                to: desc.posAfter\n            };\n            let prev = mut.previousSibling, next = mut.nextSibling;\n            if ($a5ab20b42a0afbae$var$ie && $a5ab20b42a0afbae$var$ie_version <= 11 && mut.addedNodes.length) // IE11 gives us incorrect next/prev siblings for some\n            // insertions, so if there are added nodes, recompute those\n            for(let i = 0; i < mut.addedNodes.length; i++){\n                let { previousSibling: previousSibling, nextSibling: nextSibling } = mut.addedNodes[i];\n                if (!previousSibling || Array.prototype.indexOf.call(mut.addedNodes, previousSibling) < 0) prev = previousSibling;\n                if (!nextSibling || Array.prototype.indexOf.call(mut.addedNodes, nextSibling) < 0) next = nextSibling;\n            }\n            let fromOffset = prev && prev.parentNode == mut.target ? $a5ab20b42a0afbae$var$domIndex(prev) + 1 : 0;\n            let from = desc.localPosFromDOM(mut.target, fromOffset, -1);\n            let toOffset = next && next.parentNode == mut.target ? $a5ab20b42a0afbae$var$domIndex(next) : mut.target.childNodes.length;\n            let to = desc.localPosFromDOM(mut.target, toOffset, 1);\n            return {\n                from: from,\n                to: to\n            };\n        } else if (mut.type == \"attributes\") return {\n            from: desc.posAtStart - desc.border,\n            to: desc.posAtEnd + desc.border\n        };\n        else {\n            this.lastChangedTextNode = mut.target;\n            return {\n                from: desc.posAtStart,\n                to: desc.posAtEnd,\n                // An event was generated for a text change that didn't change\n                // any text. Mark the dom change to fall back to assuming the\n                // selection was typed over with an identical value if it can't\n                // find another change.\n                typeOver: mut.target.nodeValue == mut.oldValue\n            };\n        }\n    }\n}\nlet $a5ab20b42a0afbae$var$cssChecked = new WeakMap();\nlet $a5ab20b42a0afbae$var$cssCheckWarned = false;\nfunction $a5ab20b42a0afbae$var$checkCSS(view) {\n    if ($a5ab20b42a0afbae$var$cssChecked.has(view)) return;\n    $a5ab20b42a0afbae$var$cssChecked.set(view, null);\n    if ([\n        'normal',\n        'nowrap',\n        'pre-line'\n    ].indexOf(getComputedStyle(view.dom).whiteSpace) !== -1) {\n        view.requiresGeckoHackNode = $a5ab20b42a0afbae$var$gecko;\n        if ($a5ab20b42a0afbae$var$cssCheckWarned) return;\n        console[\"warn\"](\"ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.\");\n        $a5ab20b42a0afbae$var$cssCheckWarned = true;\n    }\n}\nfunction $a5ab20b42a0afbae$var$rangeToSelectionRange(view, range) {\n    let anchorNode = range.startContainer, anchorOffset = range.startOffset;\n    let focusNode = range.endContainer, focusOffset = range.endOffset;\n    let currentAnchor = view.domAtPos(view.state.selection.anchor);\n    // Since such a range doesn't distinguish between anchor and head,\n    // use a heuristic that flips it around if its end matches the\n    // current anchor.\n    if ($a5ab20b42a0afbae$var$isEquivalentPosition(currentAnchor.node, currentAnchor.offset, focusNode, focusOffset)) [anchorNode, anchorOffset, focusNode, focusOffset] = [\n        focusNode,\n        focusOffset,\n        anchorNode,\n        anchorOffset\n    ];\n    return {\n        anchorNode: anchorNode,\n        anchorOffset: anchorOffset,\n        focusNode: focusNode,\n        focusOffset: focusOffset\n    };\n}\n// Used to work around a Safari Selection/shadow DOM bug\n// Based on https://github.com/codemirror/dev/issues/414 fix\nfunction $a5ab20b42a0afbae$var$safariShadowSelectionRange(view, selection) {\n    if (selection.getComposedRanges) {\n        let range = selection.getComposedRanges(view.root)[0];\n        if (range) return $a5ab20b42a0afbae$var$rangeToSelectionRange(view, range);\n    }\n    let found;\n    function read(event) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n        found = event.getTargetRanges()[0];\n    }\n    // Because Safari (at least in 2018-2022) doesn't provide regular\n    // access to the selection inside a shadowRoot, we have to perform a\n    // ridiculous hack to get at it—using `execCommand` to trigger a\n    // `beforeInput` event so that we can read the target range from the\n    // event.\n    view.dom.addEventListener(\"beforeinput\", read, true);\n    document.execCommand(\"indent\");\n    view.dom.removeEventListener(\"beforeinput\", read, true);\n    return found ? $a5ab20b42a0afbae$var$rangeToSelectionRange(view, found) : null;\n}\nfunction $a5ab20b42a0afbae$var$blockParent(view, node) {\n    for(let p = node.parentNode; p && p != view.dom; p = p.parentNode){\n        let desc = view.docView.nearestDesc(p, true);\n        if (desc && desc.node.isBlock) return p;\n    }\n    return null;\n}\n// Kludge for a Safari bug where, on ending a composition in an\n// otherwise empty table cell, it randomly moves the composed text\n// into the table row around that cell, greatly confusing everything\n// (#188).\nfunction $a5ab20b42a0afbae$var$fixUpBadSafariComposition(view, addedNodes) {\n    var _a;\n    let { focusNode: focusNode, focusOffset: focusOffset } = view.domSelectionRange();\n    for (let node of addedNodes)if (((_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.nodeName) == \"TR\") {\n        let nextCell = node.nextSibling;\n        while(nextCell && nextCell.nodeName != \"TD\" && nextCell.nodeName != \"TH\")nextCell = nextCell.nextSibling;\n        if (nextCell) {\n            let parent = nextCell;\n            for(;;){\n                let first = parent.firstChild;\n                if (!first || !$a5ab20b42a0afbae$var$isElt(first) || first.contentEditable == \"false\" || /^(BR|IMG)$/.test(first.nodeName)) break;\n                parent = first;\n            }\n            parent.insertBefore(node, parent.firstChild);\n            if (focusNode == node) view.domSelection().collapse(node, focusOffset);\n        } else node.parentNode.removeChild(node);\n    }\n}\n// Note that all referencing and parsing is done with the\n// start-of-operation selection and document, since that's the one\n// that the DOM represents. If any changes came in in the meantime,\n// the modification is mapped over those before it is applied, in\n// readDOMChange.\nfunction $a5ab20b42a0afbae$var$parseBetween(view, from_, to_, addedNodes) {\n    let { node: parent, fromOffset: fromOffset, toOffset: toOffset, from: from, to: to } = view.docView.parseRange(from_, to_);\n    let domSel = view.domSelectionRange();\n    let find;\n    let anchor = domSel.anchorNode;\n    if (anchor && $a5ab20b42a0afbae$var$contains(view.dom, anchor)) {\n        find = [\n            {\n                node: anchor,\n                offset: domSel.anchorOffset\n            }\n        ];\n        if (!$a5ab20b42a0afbae$var$selectionCollapsed(domSel)) find.push({\n            node: domSel.focusNode,\n            offset: domSel.focusOffset\n        });\n    }\n    // Work around issue in Chrome where backspacing sometimes replaces\n    // the deleted content with a random BR node (issues #799, #831)\n    if ($a5ab20b42a0afbae$var$chrome && view.input.lastKeyCode === 8) for(let off = toOffset; off > fromOffset; off--){\n        let node = parent.childNodes[off - 1], desc = node.pmViewDesc;\n        if (node.nodeName == \"BR\" && !desc) {\n            toOffset = off;\n            break;\n        }\n        if (!desc || desc.size) break;\n    }\n    let startDoc = view.state.doc;\n    let parser = view.someProp(\"domParser\") || (0, $1krlL.DOMParser).fromSchema(view.state.schema);\n    let $from = startDoc.resolve(from);\n    let sel = null, doc = parser.parse(parent, {\n        topNode: $from.parent,\n        topMatch: $from.parent.contentMatchAt($from.index()),\n        topOpen: true,\n        from: fromOffset,\n        to: toOffset,\n        preserveWhitespace: $from.parent.type.whitespace == \"pre\" ? \"full\" : true,\n        findPositions: find,\n        ruleFromNode: $a5ab20b42a0afbae$var$ruleFromNode(addedNodes),\n        context: $from\n    });\n    if (find && find[0].pos != null) {\n        let anchor = find[0].pos, head = find[1] && find[1].pos;\n        if (head == null) head = anchor;\n        sel = {\n            anchor: anchor + from,\n            head: head + from\n        };\n    }\n    return {\n        doc: doc,\n        sel: sel,\n        from: from,\n        to: to\n    };\n}\nconst $a5ab20b42a0afbae$var$ruleFromNode = (added)=>(dom)=>{\n        let desc = dom.pmViewDesc;\n        if (desc) return desc.parseRule(added);\n        else if (dom.nodeName == \"BR\" && dom.parentNode) {\n            // Safari replaces the list item or table cell with a BR\n            // directly in the list node (?!) if you delete the last\n            // character in a list item or table cell (#708, #862)\n            if ($a5ab20b42a0afbae$var$safari && /^(ul|ol)$/i.test(dom.parentNode.nodeName)) {\n                let skip = document.createElement(\"div\");\n                skip.appendChild(document.createElement(\"li\"));\n                return {\n                    skip: skip\n                };\n            } else if (dom.parentNode.lastChild == dom || $a5ab20b42a0afbae$var$safari && /^(tr|table)$/i.test(dom.parentNode.nodeName)) return {\n                ignore: true\n            };\n        } else if (dom.nodeName == \"IMG\" && dom.getAttribute(\"mark-placeholder\")) return {\n            ignore: true\n        };\n        return null;\n    };\nconst $a5ab20b42a0afbae$var$isInline = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;\nfunction $a5ab20b42a0afbae$var$readDOMChange(view, from, to, typeOver, addedNodes) {\n    let compositionID = view.input.compositionPendingChanges || (view.composing ? view.input.compositionID : 0);\n    view.input.compositionPendingChanges = 0;\n    if (from < 0) {\n        let origin = view.input.lastSelectionTime > Date.now() - 50 ? view.input.lastSelectionOrigin : null;\n        let newSel = $a5ab20b42a0afbae$var$selectionFromDOM(view, origin);\n        if (newSel && !view.state.selection.eq(newSel)) {\n            if ($a5ab20b42a0afbae$var$chrome && $a5ab20b42a0afbae$var$android && view.input.lastKeyCode === 13 && Date.now() - 100 < view.input.lastKeyCodeTime && view.someProp(\"handleKeyDown\", (f)=>f(view, $a5ab20b42a0afbae$var$keyEvent(13, \"Enter\")))) return;\n            let tr = view.state.tr.setSelection(newSel);\n            if (origin == \"pointer\") tr.setMeta(\"pointer\", true);\n            else if (origin == \"key\") tr.scrollIntoView();\n            if (compositionID) tr.setMeta(\"composition\", compositionID);\n            view.dispatch(tr);\n        }\n        return;\n    }\n    let $before = view.state.doc.resolve(from);\n    let shared = $before.sharedDepth(to);\n    from = $before.before(shared + 1);\n    to = view.state.doc.resolve(to).after(shared + 1);\n    let sel = view.state.selection;\n    let parse = $a5ab20b42a0afbae$var$parseBetween(view, from, to, addedNodes);\n    let doc = view.state.doc, compare = doc.slice(parse.from, parse.to);\n    let preferredPos, preferredSide;\n    // Prefer anchoring to end when Backspace is pressed\n    if (view.input.lastKeyCode === 8 && Date.now() - 100 < view.input.lastKeyCodeTime) {\n        preferredPos = view.state.selection.to;\n        preferredSide = \"end\";\n    } else {\n        preferredPos = view.state.selection.from;\n        preferredSide = \"start\";\n    }\n    view.input.lastKeyCode = null;\n    let change = $a5ab20b42a0afbae$var$findDiff(compare.content, parse.doc.content, parse.from, preferredPos, preferredSide);\n    if (change) view.input.domChangeCount++;\n    if (($a5ab20b42a0afbae$var$ios && view.input.lastIOSEnter > Date.now() - 225 || $a5ab20b42a0afbae$var$android) && addedNodes.some((n)=>$a5ab20b42a0afbae$var$isElt(n) && !$a5ab20b42a0afbae$var$isInline.test(n.nodeName)) && (!change || change.endA >= change.endB) && view.someProp(\"handleKeyDown\", (f)=>f(view, $a5ab20b42a0afbae$var$keyEvent(13, \"Enter\")))) {\n        view.input.lastIOSEnter = 0;\n        return;\n    }\n    if (!change) {\n        if (typeOver && sel instanceof (0, $1LeRC.TextSelection) && !sel.empty && sel.$head.sameParent(sel.$anchor) && !view.composing && !(parse.sel && parse.sel.anchor != parse.sel.head)) change = {\n            start: sel.from,\n            endA: sel.to,\n            endB: sel.to\n        };\n        else {\n            if (parse.sel) {\n                let sel = $a5ab20b42a0afbae$var$resolveSelection(view, view.state.doc, parse.sel);\n                if (sel && !sel.eq(view.state.selection)) {\n                    let tr = view.state.tr.setSelection(sel);\n                    if (compositionID) tr.setMeta(\"composition\", compositionID);\n                    view.dispatch(tr);\n                }\n            }\n            return;\n        }\n    }\n    // Handle the case where overwriting a selection by typing matches\n    // the start or end of the selected content, creating a change\n    // that's smaller than what was actually overwritten.\n    if (view.state.selection.from < view.state.selection.to && change.start == change.endB && view.state.selection instanceof (0, $1LeRC.TextSelection)) {\n        if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2 && view.state.selection.from >= parse.from) change.start = view.state.selection.from;\n        else if (change.endA < view.state.selection.to && change.endA >= view.state.selection.to - 2 && view.state.selection.to <= parse.to) {\n            change.endB += view.state.selection.to - change.endA;\n            change.endA = view.state.selection.to;\n        }\n    }\n    // IE11 will insert a non-breaking space _ahead_ of the space after\n    // the cursor space when adding a space before another space. When\n    // that happened, adjust the change to cover the space instead.\n    if ($a5ab20b42a0afbae$var$ie && $a5ab20b42a0afbae$var$ie_version <= 11 && change.endB == change.start + 1 && change.endA == change.start && change.start > parse.from && parse.doc.textBetween(change.start - parse.from - 1, change.start - parse.from + 1) == \" \\u00a0\") {\n        change.start--;\n        change.endA--;\n        change.endB--;\n    }\n    let $from = parse.doc.resolveNoCache(change.start - parse.from);\n    let $to = parse.doc.resolveNoCache(change.endB - parse.from);\n    let $fromA = doc.resolve(change.start);\n    let inlineChange = $from.sameParent($to) && $from.parent.inlineContent && $fromA.end() >= change.endA;\n    // If this looks like the effect of pressing Enter (or was recorded\n    // as being an iOS enter press), just dispatch an Enter key instead.\n    if (($a5ab20b42a0afbae$var$ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some((n)=>n.nodeName == \"DIV\" || n.nodeName == \"P\")) || !inlineChange && $a5ab20b42a0afbae$var$looksLikeEnter(parse.doc, $from.pos, $to.pos)) && view.someProp(\"handleKeyDown\", (f)=>f(view, $a5ab20b42a0afbae$var$keyEvent(13, \"Enter\")))) {\n        view.input.lastIOSEnter = 0;\n        return;\n    }\n    // Same for backspace\n    if (view.state.selection.anchor > change.start && $a5ab20b42a0afbae$var$looksLikeBackspace(doc, change.start, change.endA, $from, $to) && view.someProp(\"handleKeyDown\", (f)=>f(view, $a5ab20b42a0afbae$var$keyEvent(8, \"Backspace\")))) {\n        if ($a5ab20b42a0afbae$var$android && $a5ab20b42a0afbae$var$chrome) view.domObserver.suppressSelectionUpdates(); // #820\n        return;\n    }\n    // Chrome will occasionally, during composition, delete the\n    // entire composition and then immediately insert it again. This is\n    // used to detect that situation.\n    if ($a5ab20b42a0afbae$var$chrome && change.endB == change.start) view.input.lastChromeDelete = Date.now();\n    // This tries to detect Android virtual keyboard\n    // enter-and-pick-suggestion action. That sometimes (see issue\n    // #1059) first fires a DOM mutation, before moving the selection to\n    // the newly created block. And then, because ProseMirror cleans up\n    // the DOM selection, it gives up moving the selection entirely,\n    // leaving the cursor in the wrong place. When that happens, we drop\n    // the new paragraph from the initial change, and fire a simulated\n    // enter key afterwards.\n    if ($a5ab20b42a0afbae$var$android && !inlineChange && $from.start() != $to.start() && $to.parentOffset == 0 && $from.depth == $to.depth && parse.sel && parse.sel.anchor == parse.sel.head && parse.sel.head == change.endA) {\n        change.endB -= 2;\n        $to = parse.doc.resolveNoCache(change.endB - parse.from);\n        setTimeout(()=>{\n            view.someProp(\"handleKeyDown\", function(f) {\n                return f(view, $a5ab20b42a0afbae$var$keyEvent(13, \"Enter\"));\n            });\n        }, 20);\n    }\n    let chFrom = change.start, chTo = change.endA;\n    let mkTr = (base)=>{\n        let tr = base || view.state.tr.replace(chFrom, chTo, parse.doc.slice(change.start - parse.from, change.endB - parse.from));\n        if (parse.sel) {\n            let sel = $a5ab20b42a0afbae$var$resolveSelection(view, tr.doc, parse.sel);\n            // Chrome will sometimes, during composition, report the\n            // selection in the wrong place. If it looks like that is\n            // happening, don't update the selection.\n            // Edge just doesn't move the cursor forward when you start typing\n            // in an empty block or between br nodes.\n            if (sel && !($a5ab20b42a0afbae$var$chrome && view.composing && sel.empty && (change.start != change.endB || view.input.lastChromeDelete < Date.now() - 100) && (sel.head == chFrom || sel.head == tr.mapping.map(chTo) - 1) || $a5ab20b42a0afbae$var$ie && sel.empty && sel.head == chFrom)) tr.setSelection(sel);\n        }\n        if (compositionID) tr.setMeta(\"composition\", compositionID);\n        return tr.scrollIntoView();\n    };\n    let markChange;\n    if (inlineChange) {\n        if ($from.pos == $to.pos) {\n            // IE11 sometimes weirdly moves the DOM selection around after\n            // backspacing out the first element in a textblock\n            if ($a5ab20b42a0afbae$var$ie && $a5ab20b42a0afbae$var$ie_version <= 11 && $from.parentOffset == 0) {\n                view.domObserver.suppressSelectionUpdates();\n                setTimeout(()=>$a5ab20b42a0afbae$var$selectionToDOM(view), 20);\n            }\n            let tr = mkTr(view.state.tr.delete(chFrom, chTo));\n            let marks = doc.resolve(change.start).marksAcross(doc.resolve(change.endA));\n            if (marks) tr.ensureMarks(marks);\n            view.dispatch(tr);\n        } else if (change.endA == change.endB && (markChange = $a5ab20b42a0afbae$var$isMarkChange($from.parent.content.cut($from.parentOffset, $to.parentOffset), $fromA.parent.content.cut($fromA.parentOffset, change.endA - $fromA.start())))) {\n            let tr = mkTr(view.state.tr);\n            if (markChange.type == \"add\") tr.addMark(chFrom, chTo, markChange.mark);\n            else tr.removeMark(chFrom, chTo, markChange.mark);\n            view.dispatch(tr);\n        } else if ($from.parent.child($from.index()).isText && $from.index() == $to.index() - ($to.textOffset ? 0 : 1)) {\n            // Both positions in the same text node -- simply insert text\n            let text = $from.parent.textBetween($from.parentOffset, $to.parentOffset);\n            let deflt = ()=>mkTr(view.state.tr.insertText(text, chFrom, chTo));\n            if (!view.someProp(\"handleTextInput\", (f)=>f(view, chFrom, chTo, text, deflt))) view.dispatch(deflt());\n        } else view.dispatch(mkTr());\n    } else view.dispatch(mkTr());\n}\nfunction $a5ab20b42a0afbae$var$resolveSelection(view, doc, parsedSel) {\n    if (Math.max(parsedSel.anchor, parsedSel.head) > doc.content.size) return null;\n    return $a5ab20b42a0afbae$var$selectionBetween(view, doc.resolve(parsedSel.anchor), doc.resolve(parsedSel.head));\n}\n// Given two same-length, non-empty fragments of inline content,\n// determine whether the first could be created from the second by\n// removing or adding a single mark type.\nfunction $a5ab20b42a0afbae$var$isMarkChange(cur, prev) {\n    let curMarks = cur.firstChild.marks, prevMarks = prev.firstChild.marks;\n    let added = curMarks, removed = prevMarks, type, mark, update;\n    for(let i = 0; i < prevMarks.length; i++)added = prevMarks[i].removeFromSet(added);\n    for(let i = 0; i < curMarks.length; i++)removed = curMarks[i].removeFromSet(removed);\n    if (added.length == 1 && removed.length == 0) {\n        mark = added[0];\n        type = \"add\";\n        update = (node)=>node.mark(mark.addToSet(node.marks));\n    } else if (added.length == 0 && removed.length == 1) {\n        mark = removed[0];\n        type = \"remove\";\n        update = (node)=>node.mark(mark.removeFromSet(node.marks));\n    } else return null;\n    let updated = [];\n    for(let i = 0; i < prev.childCount; i++)updated.push(update(prev.child(i)));\n    if ((0, $1krlL.Fragment).from(updated).eq(cur)) return {\n        mark: mark,\n        type: type\n    };\n}\nfunction $a5ab20b42a0afbae$var$looksLikeBackspace(old, start, end, $newStart, $newEnd) {\n    if (end - start <= $newEnd.pos - $newStart.pos || // newEnd must point directly at or after the end of the block that newStart points into\n    $a5ab20b42a0afbae$var$skipClosingAndOpening($newStart, true, false) < $newEnd.pos) return false;\n    let $start = old.resolve(start);\n    // Handle the case where, rather than joining blocks, the change just removed an entire block\n    if (!$newStart.parent.isTextblock) {\n        let after = $start.nodeAfter;\n        return after != null && end == start + after.nodeSize;\n    }\n    // Start must be at the end of a block\n    if ($start.parentOffset < $start.parent.content.size || !$start.parent.isTextblock) return false;\n    let $next = old.resolve($a5ab20b42a0afbae$var$skipClosingAndOpening($start, true, true));\n    // The next textblock must start before end and end near it\n    if (!$next.parent.isTextblock || $next.pos > end || $a5ab20b42a0afbae$var$skipClosingAndOpening($next, true, false) < end) return false;\n    // The fragments after the join point must match\n    return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content);\n}\nfunction $a5ab20b42a0afbae$var$looksLikeEnter(content, from, to) {\n    let newTextlines = 0, newLeaves = 0;\n    content.nodesBetween(from, to, (node, pos)=>{\n        if (node.isTextblock && pos >= from && pos < to) newTextlines++;\n        else if (node.isText ? /\\S/.test(node.text.slice(Math.max(0, from - pos), Math.min(node.nodeSize, to - pos))) : node.isLeaf) newLeaves++;\n    });\n    return newLeaves == 0 && newTextlines == 1;\n}\nfunction $a5ab20b42a0afbae$var$skipClosingAndOpening($pos, fromEnd, mayOpen) {\n    let depth = $pos.depth, end = fromEnd ? $pos.end() : $pos.pos;\n    while(depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)){\n        depth--;\n        end++;\n        fromEnd = false;\n    }\n    if (mayOpen) {\n        let next = $pos.node(depth).maybeChild($pos.indexAfter(depth));\n        while(next && !next.isLeaf){\n            next = next.firstChild;\n            end++;\n        }\n    }\n    return end;\n}\nfunction $a5ab20b42a0afbae$var$findDiff(a, b, pos, preferredPos, preferredSide) {\n    let start = a.findDiffStart(b, pos), lenA = pos + a.size, lenB = pos + b.size;\n    if (start == null) return null;\n    let { a: endA, b: endB } = a.findDiffEnd(b, lenA, lenB);\n    if (preferredSide == \"end\") {\n        let adjust = Math.max(0, start - Math.min(endA, endB));\n        preferredPos -= endA + adjust - start;\n    }\n    if (endA < start && lenA < lenB) {\n        let move = preferredPos <= start && preferredPos >= endA ? start - preferredPos : 0;\n        start -= move;\n        endB = start + (endB - endA);\n        endA = start;\n    } else if (endB < start) {\n        let move = preferredPos <= start && preferredPos >= endB ? start - preferredPos : 0;\n        start -= move;\n        endA = start + (endA - endB);\n        endB = start;\n    }\n    return {\n        start: start,\n        endA: endA,\n        endB: endB\n    };\n}\n/**\n@internal\n*/ const $a5ab20b42a0afbae$export$5d42ca91c11c9e4d = $a5ab20b42a0afbae$var$parseFromClipboard;\n/**\n@internal\n*/ const $a5ab20b42a0afbae$export$76b14d3c719c32fc = $a5ab20b42a0afbae$var$endComposition;\n/**\nAn editor view manages the DOM structure that represents an\neditable document. Its state and behavior are determined by its\n[props](https://prosemirror.net/docs/ref/#view.DirectEditorProps).\n*/ class $a5ab20b42a0afbae$export$eece2fccabbb77c5 {\n    /**\n    Create a view. `place` may be a DOM node that the editor should\n    be appended to, a function that will place it into the document,\n    or an object whose `mount` property holds the node to use as the\n    document container. If it is `null`, the editor will not be\n    added to the document.\n    */ constructor(place, props){\n        this._root = null;\n        /**\n        @internal\n        */ this.focused = false;\n        /**\n        Kludge used to work around a Chrome bug @internal\n        */ this.trackWrites = null;\n        this.mounted = false;\n        /**\n        @internal\n        */ this.markCursor = null;\n        /**\n        @internal\n        */ this.cursorWrapper = null;\n        /**\n        @internal\n        */ this.lastSelectedViewDesc = undefined;\n        /**\n        @internal\n        */ this.input = new $a5ab20b42a0afbae$var$InputState;\n        this.prevDirectPlugins = [];\n        this.pluginViews = [];\n        /**\n        Holds `true` when a hack node is needed in Firefox to prevent the\n        [space is eaten issue](https://code.haverbeke.berlin/prosemirror/prosemirror/issues/651)\n        @internal\n        */ this.requiresGeckoHackNode = false;\n        /**\n        When editor content is being dragged, this object contains\n        information about the dragged slice and whether it is being\n        copied or moved. At any other time, it is null.\n        */ this.dragging = null;\n        this._props = props;\n        this.state = props.state;\n        this.directPlugins = props.plugins || [];\n        this.directPlugins.forEach($a5ab20b42a0afbae$var$checkStateComponent);\n        this.dispatch = this.dispatch.bind(this);\n        this.dom = place && place.mount || document.createElement(\"div\");\n        if (place) {\n            if (place.appendChild) place.appendChild(this.dom);\n            else if (typeof place == \"function\") place(this.dom);\n            else if (place.mount) this.mounted = true;\n        }\n        this.editable = $a5ab20b42a0afbae$var$getEditable(this);\n        $a5ab20b42a0afbae$var$updateCursorWrapper(this);\n        this.nodeViews = $a5ab20b42a0afbae$var$buildNodeViews(this);\n        this.docView = $a5ab20b42a0afbae$var$docViewDesc(this.state.doc, $a5ab20b42a0afbae$var$computeDocDeco(this), $a5ab20b42a0afbae$var$viewDecorations(this), this.dom, this);\n        this.domObserver = new $a5ab20b42a0afbae$var$DOMObserver(this, (from, to, typeOver, added)=>$a5ab20b42a0afbae$var$readDOMChange(this, from, to, typeOver, added));\n        this.domObserver.start();\n        $a5ab20b42a0afbae$var$initInput(this);\n        this.updatePluginViews();\n    }\n    /**\n    Holds `true` when a\n    [composition](https://w3c.github.io/uievents/#events-compositionevents)\n    is active.\n    */ get composing() {\n        return this.input.composing;\n    }\n    /**\n    The view's current [props](https://prosemirror.net/docs/ref/#view.EditorProps).\n    */ get props() {\n        if (this._props.state != this.state) {\n            let prev = this._props;\n            this._props = {};\n            for(let name in prev)this._props[name] = prev[name];\n            this._props.state = this.state;\n        }\n        return this._props;\n    }\n    /**\n    Update the view's props. Will immediately cause an update to\n    the DOM.\n    */ update(props) {\n        if (props.handleDOMEvents != this._props.handleDOMEvents) $a5ab20b42a0afbae$var$ensureListeners(this);\n        let prevProps = this._props;\n        this._props = props;\n        if (props.plugins) {\n            props.plugins.forEach($a5ab20b42a0afbae$var$checkStateComponent);\n            this.directPlugins = props.plugins;\n        }\n        this.updateStateInner(props.state, prevProps);\n    }\n    /**\n    Update the view by updating existing props object with the object\n    given as argument. Equivalent to `view.update(Object.assign({},\n    view.props, props))`.\n    */ setProps(props) {\n        let updated = {};\n        for(let name in this._props)updated[name] = this._props[name];\n        updated.state = this.state;\n        for(let name in props)updated[name] = props[name];\n        this.update(updated);\n    }\n    /**\n    Update the editor's `state` prop, without touching any of the\n    other props.\n    */ updateState(state) {\n        this.updateStateInner(state, this._props);\n    }\n    updateStateInner(state, prevProps) {\n        var _a;\n        let prev = this.state, redraw = false, updateSel = false;\n        // When stored marks are added, stop composition, so that they can\n        // be displayed.\n        if (state.storedMarks && this.composing) {\n            $a5ab20b42a0afbae$var$clearComposition(this);\n            updateSel = true;\n        }\n        this.state = state;\n        let pluginsChanged = prev.plugins != state.plugins || this._props.plugins != prevProps.plugins;\n        if (pluginsChanged || this._props.plugins != prevProps.plugins || this._props.nodeViews != prevProps.nodeViews) {\n            let nodeViews = $a5ab20b42a0afbae$var$buildNodeViews(this);\n            if ($a5ab20b42a0afbae$var$changedNodeViews(nodeViews, this.nodeViews)) {\n                this.nodeViews = nodeViews;\n                redraw = true;\n            }\n        }\n        if (pluginsChanged || prevProps.handleDOMEvents != this._props.handleDOMEvents) $a5ab20b42a0afbae$var$ensureListeners(this);\n        this.editable = $a5ab20b42a0afbae$var$getEditable(this);\n        $a5ab20b42a0afbae$var$updateCursorWrapper(this);\n        let innerDeco = $a5ab20b42a0afbae$var$viewDecorations(this), outerDeco = $a5ab20b42a0afbae$var$computeDocDeco(this);\n        let scroll = prev.plugins != state.plugins && !prev.doc.eq(state.doc) ? \"reset\" : state.scrollToSelection > prev.scrollToSelection ? \"to selection\" : \"preserve\";\n        let updateDoc = redraw || !this.docView.matchesNode(state.doc, outerDeco, innerDeco);\n        if (updateDoc || !state.selection.eq(prev.selection)) updateSel = true;\n        let oldScrollPos = scroll == \"preserve\" && updateSel && this.dom.style.overflowAnchor == null && $a5ab20b42a0afbae$var$storeScrollPos(this);\n        if (updateSel) {\n            this.domObserver.stop();\n            // Work around an issue in Chrome, IE, and Edge where changing\n            // the DOM around an active selection puts it into a broken\n            // state where the thing the user sees differs from the\n            // selection reported by the Selection object (#710, #973,\n            // #1011, #1013, #1035).\n            let forceSelUpdate = updateDoc && ($a5ab20b42a0afbae$var$ie || $a5ab20b42a0afbae$var$chrome) && !this.composing && !prev.selection.empty && !state.selection.empty && $a5ab20b42a0afbae$var$selectionContextChanged(prev.selection, state.selection);\n            if (updateDoc) {\n                // If the node that the selection points into is written to,\n                // Chrome sometimes starts misreporting the selection, so this\n                // tracks that and forces a selection reset when our update\n                // did write to the node.\n                let chromeKludge = $a5ab20b42a0afbae$var$chrome ? this.trackWrites = this.domSelectionRange().focusNode : null;\n                if (this.composing) this.input.compositionNode = $a5ab20b42a0afbae$var$findCompositionNode(this);\n                if (redraw || !this.docView.update(state.doc, outerDeco, innerDeco, this)) {\n                    this.docView.updateOuterDeco(outerDeco);\n                    this.docView.destroy();\n                    this.docView = $a5ab20b42a0afbae$var$docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);\n                }\n                if (chromeKludge && (!this.trackWrites || !this.dom.contains(this.trackWrites))) forceSelUpdate = true;\n            }\n            // Work around for an issue where an update arriving right between\n            // a DOM selection change and the \"selectionchange\" event for it\n            // can cause a spurious DOM selection update, disrupting mouse\n            // drag selection.\n            let mouseDown = this.input.mouseDown;\n            if (forceSelUpdate || !(mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && $a5ab20b42a0afbae$var$anchorInRightPlace(this) && mouseDown.delaySelUpdate())) $a5ab20b42a0afbae$var$selectionToDOM(this, forceSelUpdate);\n            else {\n                $a5ab20b42a0afbae$var$syncNodeSelection(this, state.selection);\n                this.domObserver.setCurSelection();\n            }\n            this.domObserver.start();\n        }\n        this.updatePluginViews(prev);\n        if (((_a = this.dragging) === null || _a === void 0 ? void 0 : _a.node) && !prev.doc.eq(state.doc)) this.updateDraggedNode(this.dragging, prev);\n        if (scroll == \"reset\") this.dom.scrollTop = 0;\n        else if (scroll == \"to selection\") this.scrollToSelection();\n        else if (oldScrollPos) $a5ab20b42a0afbae$var$resetScrollPos(oldScrollPos);\n    }\n    /**\n    @internal\n    */ scrollToSelection() {\n        let startDOM = this.domSelectionRange().focusNode;\n        if (!startDOM || !$a5ab20b42a0afbae$var$contains(this.dom, startDOM)) ;\n        else if (this.someProp(\"handleScrollToSelection\", (f)=>f(this))) ;\n        else if (this.state.selection instanceof (0, $1LeRC.NodeSelection)) {\n            let target = this.docView.domAfterPos(this.state.selection.from);\n            if ($a5ab20b42a0afbae$var$isElt(target)) $a5ab20b42a0afbae$var$scrollRectIntoView(this, target.getBoundingClientRect(), startDOM);\n        } else $a5ab20b42a0afbae$var$scrollRectIntoView(this, this.coordsAtPos(this.state.selection.head, 1), startDOM);\n    }\n    destroyPluginViews() {\n        let view;\n        while(view = this.pluginViews.pop())if (view.destroy) view.destroy();\n    }\n    updatePluginViews(prevState) {\n        if (!prevState || prevState.plugins != this.state.plugins || this.directPlugins != this.prevDirectPlugins) {\n            this.prevDirectPlugins = this.directPlugins;\n            this.destroyPluginViews();\n            for(let i = 0; i < this.directPlugins.length; i++){\n                let plugin = this.directPlugins[i];\n                if (plugin.spec.view) this.pluginViews.push(plugin.spec.view(this));\n            }\n            for(let i = 0; i < this.state.plugins.length; i++){\n                let plugin = this.state.plugins[i];\n                if (plugin.spec.view) this.pluginViews.push(plugin.spec.view(this));\n            }\n        } else for(let i = 0; i < this.pluginViews.length; i++){\n            let pluginView = this.pluginViews[i];\n            if (pluginView.update) pluginView.update(this, prevState);\n        }\n    }\n    updateDraggedNode(dragging, prev) {\n        let sel = dragging.node, found = -1;\n        if (sel.from < this.state.doc.content.size && this.state.doc.nodeAt(sel.from) == sel.node) found = sel.from;\n        else {\n            let movedPos = sel.from + (this.state.doc.content.size - prev.doc.content.size);\n            let moved = movedPos > 0 && movedPos < this.state.doc.content.size && this.state.doc.nodeAt(movedPos);\n            if (moved == sel.node) found = movedPos;\n        }\n        this.dragging = new $a5ab20b42a0afbae$var$Dragging(dragging.slice, dragging.move, found < 0 ? undefined : (0, $1LeRC.NodeSelection).create(this.state.doc, found));\n    }\n    someProp(propName, f) {\n        let prop = this._props && this._props[propName], value;\n        if (prop != null && (value = f ? f(prop) : prop)) return value;\n        for(let i = 0; i < this.directPlugins.length; i++){\n            let prop = this.directPlugins[i].props[propName];\n            if (prop != null && (value = f ? f(prop) : prop)) return value;\n        }\n        let plugins = this.state.plugins;\n        if (plugins) for(let i = 0; i < plugins.length; i++){\n            let prop = plugins[i].props[propName];\n            if (prop != null && (value = f ? f(prop) : prop)) return value;\n        }\n    }\n    /**\n    Query whether the view has focus.\n    */ hasFocus() {\n        // Work around IE not handling focus correctly if resize handles are shown.\n        // If the cursor is inside an element with resize handles, activeElement\n        // will be that element instead of this.dom.\n        if ($a5ab20b42a0afbae$var$ie) {\n            // If activeElement is within this.dom, and there are no other elements\n            // setting `contenteditable` to false in between, treat it as focused.\n            let node = this.root.activeElement;\n            if (node == this.dom) return true;\n            if (!node || !this.dom.contains(node)) return false;\n            while(node && this.dom != node && this.dom.contains(node)){\n                if (node.contentEditable == 'false') return false;\n                node = node.parentElement;\n            }\n            return true;\n        }\n        return this.root.activeElement == this.dom;\n    }\n    /**\n    Focus the editor.\n    */ focus() {\n        this.domObserver.stop();\n        if (this.editable) $a5ab20b42a0afbae$var$focusPreventScroll(this.dom);\n        $a5ab20b42a0afbae$var$selectionToDOM(this);\n        this.domObserver.start();\n    }\n    /**\n    Get the document root in which the editor exists. This will\n    usually be the top-level `document`, but might be a [shadow\n    DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM)\n    root if the editor is inside one.\n    */ get root() {\n        let cached = this._root;\n        if (cached == null) {\n            for(let search = this.dom.parentNode; search; search = search.parentNode)if (search.nodeType == 9 || search.nodeType == 11 && search.host) {\n                if (!search.getSelection) Object.getPrototypeOf(search).getSelection = ()=>search.ownerDocument.getSelection();\n                return this._root = search;\n            }\n        }\n        return cached || document;\n    }\n    /**\n    When an existing editor view is moved to a new document or\n    shadow tree, call this to make it recompute its root.\n    */ updateRoot() {\n        this._root = null;\n    }\n    /**\n    Given a pair of viewport coordinates, return the document\n    position that corresponds to them. May return null if the given\n    coordinates aren't inside of the editor. When an object is\n    returned, its `pos` property is the position nearest to the\n    coordinates, and its `inside` property holds the position of the\n    inner node that the position falls inside of, or -1 if it is at\n    the top level, not in any node.\n    */ posAtCoords(coords) {\n        return $a5ab20b42a0afbae$var$posAtCoords(this, coords);\n    }\n    /**\n    Returns the viewport rectangle at a given document position.\n    `left` and `right` will be the same number, as this returns a\n    flat cursor-ish rectangle. If the position is between two things\n    that aren't directly adjacent, `side` determines which element\n    is used. When < 0, the element before the position is used,\n    otherwise the element after.\n    */ coordsAtPos(pos, side = 1) {\n        return $a5ab20b42a0afbae$var$coordsAtPos(this, pos, side);\n    }\n    /**\n    Find the DOM position that corresponds to the given document\n    position. When `side` is negative, find the position as close as\n    possible to the content before the position. When positive,\n    prefer positions close to the content after the position. When\n    zero, prefer as shallow a position as possible.\n    \n    Note that you should **not** mutate the editor's internal DOM,\n    only inspect it (and even that is usually not necessary).\n    */ domAtPos(pos, side = 0) {\n        return this.docView.domFromPos(pos, side);\n    }\n    /**\n    Find the DOM node that represents the document node after the\n    given position. May return `null` when the position doesn't point\n    in front of a node or if the node is inside an opaque node view.\n    \n    This is intended to be able to call things like\n    `getBoundingClientRect` on that DOM node. Do **not** mutate the\n    editor DOM directly, or add styling this way, since that will be\n    immediately overriden by the editor as it redraws the node.\n    */ nodeDOM(pos) {\n        let desc = this.docView.descAt(pos);\n        return desc ? desc.nodeDOM : null;\n    }\n    /**\n    Find the document position that corresponds to a given DOM\n    position. (Whenever possible, it is preferable to inspect the\n    document structure directly, rather than poking around in the\n    DOM, but sometimes—for example when interpreting an event\n    target—you don't have a choice.)\n    \n    The `bias` parameter can be used to influence which side of a DOM\n    node to use when the position is inside a leaf node.\n    */ posAtDOM(node, offset, bias = -1) {\n        let pos = this.docView.posFromDOM(node, offset, bias);\n        if (pos == null) throw new RangeError(\"DOM position not inside the editor\");\n        return pos;\n    }\n    /**\n    Find out whether the selection is at the end of a textblock when\n    moving in a given direction. When, for example, given `\"left\"`,\n    it will return true if moving left from the current cursor\n    position would leave that position's parent textblock. Will apply\n    to the view's current state by default, but it is possible to\n    pass a different state.\n    */ endOfTextblock(dir, state) {\n        return $a5ab20b42a0afbae$var$endOfTextblock(this, state || this.state, dir);\n    }\n    /**\n    Run the editor's paste logic with the given HTML string. The\n    `event`, if given, will be passed to the\n    [`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.\n    */ pasteHTML(html, event) {\n        return $a5ab20b42a0afbae$var$doPaste(this, \"\", html, false, event || new ClipboardEvent(\"paste\"));\n    }\n    /**\n    Run the editor's paste logic with the given plain-text input.\n    */ pasteText(text, event) {\n        return $a5ab20b42a0afbae$var$doPaste(this, text, null, true, event || new ClipboardEvent(\"paste\"));\n    }\n    /**\n    Serialize the given slice as it would be if it was copied from\n    this editor. Returns a DOM element that contains a\n    representation of the slice as its children, a textual\n    representation, and the transformed slice (which can be\n    different from the given input due to hooks like\n    [`transformCopied`](https://prosemirror.net/docs/ref/#view.EditorProps.transformCopied)).\n    */ serializeForClipboard(slice) {\n        return $a5ab20b42a0afbae$var$serializeForClipboard(this, slice);\n    }\n    /**\n    Removes the editor from the DOM and destroys all [node\n    views](https://prosemirror.net/docs/ref/#view.NodeView).\n    */ destroy() {\n        if (!this.docView) return;\n        $a5ab20b42a0afbae$var$destroyInput(this);\n        this.destroyPluginViews();\n        if (this.mounted) {\n            this.docView.update(this.state.doc, [], $a5ab20b42a0afbae$var$viewDecorations(this), this);\n            this.dom.textContent = \"\";\n        } else if (this.dom.parentNode) this.dom.parentNode.removeChild(this.dom);\n        this.docView.destroy();\n        this.docView = null;\n        $a5ab20b42a0afbae$var$clearReusedRange();\n    }\n    /**\n    This is true when the view has been\n    [destroyed](https://prosemirror.net/docs/ref/#view.EditorView.destroy) (and thus should not be\n    used anymore).\n    */ get isDestroyed() {\n        return this.docView == null;\n    }\n    /**\n    Used for testing.\n    */ dispatchEvent(event) {\n        return $a5ab20b42a0afbae$var$dispatchEvent(this, event);\n    }\n    /**\n    @internal\n    */ domSelectionRange() {\n        let sel = this.dom.isConnected !== false && this.domSelection();\n        if (!sel) return {\n            focusNode: null,\n            focusOffset: 0,\n            anchorNode: null,\n            anchorOffset: 0\n        };\n        return $a5ab20b42a0afbae$var$safari && this.root.nodeType === 11 && $a5ab20b42a0afbae$var$deepActiveElement(this.dom.ownerDocument) == this.dom && $a5ab20b42a0afbae$var$safariShadowSelectionRange(this, sel) || sel;\n    }\n    /**\n    @internal\n    */ domSelection() {\n        return this.root.getSelection();\n    }\n}\n$a5ab20b42a0afbae$export$eece2fccabbb77c5.prototype.dispatch = function(tr) {\n    let dispatchTransaction = this._props.dispatchTransaction;\n    if (dispatchTransaction) dispatchTransaction.call(this, tr);\n    else this.updateState(this.state.apply(tr));\n};\nfunction $a5ab20b42a0afbae$var$computeDocDeco(view) {\n    let attrs = Object.create(null);\n    attrs.class = \"ProseMirror\";\n    attrs.contenteditable = String(view.editable);\n    view.someProp(\"attributes\", (value)=>{\n        if (typeof value == \"function\") value = value(view.state);\n        if (value) for(let attr in value){\n            if (attr == \"class\") attrs.class += \" \" + value[attr];\n            else if (attr == \"style\") attrs.style = (attrs.style ? attrs.style + \";\" : \"\") + value[attr];\n            else if (!attrs[attr] && attr != \"contenteditable\" && attr != \"nodeName\") attrs[attr] = String(value[attr]);\n        }\n    });\n    if (!attrs.translate) attrs.translate = \"no\";\n    return [\n        $a5ab20b42a0afbae$export$10e30b733df217ea.node(0, view.state.doc.content.size, attrs)\n    ];\n}\nfunction $a5ab20b42a0afbae$var$updateCursorWrapper(view) {\n    if (view.markCursor) {\n        let dom = document.createElement(\"img\");\n        dom.className = \"ProseMirror-separator\";\n        dom.setAttribute(\"mark-placeholder\", \"true\");\n        dom.setAttribute(\"alt\", \"\");\n        view.cursorWrapper = {\n            dom: dom,\n            deco: $a5ab20b42a0afbae$export$10e30b733df217ea.widget(view.state.selection.from, dom, {\n                raw: true,\n                marks: view.markCursor\n            })\n        };\n    } else view.cursorWrapper = null;\n}\nfunction $a5ab20b42a0afbae$var$getEditable(view) {\n    return !view.someProp(\"editable\", (value)=>value(view.state) === false);\n}\nfunction $a5ab20b42a0afbae$var$selectionContextChanged(sel1, sel2) {\n    let depth = Math.min(sel1.$anchor.sharedDepth(sel1.head), sel2.$anchor.sharedDepth(sel2.head));\n    return sel1.$anchor.start(depth) != sel2.$anchor.start(depth);\n}\nfunction $a5ab20b42a0afbae$var$buildNodeViews(view) {\n    let result = Object.create(null);\n    function add(obj) {\n        for(let prop in obj)if (!Object.prototype.hasOwnProperty.call(result, prop)) result[prop] = obj[prop];\n    }\n    view.someProp(\"nodeViews\", add);\n    view.someProp(\"markViews\", add);\n    return result;\n}\nfunction $a5ab20b42a0afbae$var$changedNodeViews(a, b) {\n    let nA = 0, nB = 0;\n    for(let prop in a){\n        if (a[prop] != b[prop]) return true;\n        nA++;\n    }\n    for(let _ in b)nB++;\n    return nA != nB;\n}\nfunction $a5ab20b42a0afbae$var$checkStateComponent(plugin) {\n    if (plugin.spec.state || plugin.spec.filterTransaction || plugin.spec.appendTransaction) throw new RangeError(\"Plugins passed directly to the view must not have a state component\");\n}\n\n});\n\n\nparcelRegister(\"euyQd\", function(module, exports) {\n$parcel$export(module.exports, \"keymap\", () => (parcelRequire(\"18HhN\")).keymap);\n// keymap/index.ts\nparcelRequire(\"18HhN\");\n\n});\nparcelRegister(\"18HhN\", function(module, exports) {\n\n$parcel$export(module.exports, \"keymap\", () => $0d481d7d66f73fd8$export$5043418e2ef368d5);\n$parcel$export(module.exports, \"keydownHandler\", () => $0d481d7d66f73fd8$export$53f558754f8b9fd1);\n\nvar $16T16 = parcelRequire(\"16T16\");\n\nvar $1LeRC = parcelRequire(\"1LeRC\");\nconst $0d481d7d66f73fd8$var$mac = typeof navigator != \"undefined\" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : false;\nfunction $0d481d7d66f73fd8$var$normalizeKeyName(name) {\n    let parts = name.split(/-(?!$)/), result = parts[parts.length - 1];\n    if (result == \"Space\") result = \" \";\n    let alt, ctrl, shift, meta;\n    for(let i = 0; i < parts.length - 1; i++){\n        let mod = parts[i];\n        if (/^(cmd|meta|m)$/i.test(mod)) meta = true;\n        else if (/^a(lt)?$/i.test(mod)) alt = true;\n        else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;\n        else if (/^s(hift)?$/i.test(mod)) shift = true;\n        else if (/^mod$/i.test(mod)) {\n            if ($0d481d7d66f73fd8$var$mac) meta = true;\n            else ctrl = true;\n        } else throw new Error(\"Unrecognized modifier name: \" + mod);\n    }\n    if (alt) result = \"Alt-\" + result;\n    if (ctrl) result = \"Ctrl-\" + result;\n    if (meta) result = \"Meta-\" + result;\n    if (shift) result = \"Shift-\" + result;\n    return result;\n}\nfunction $0d481d7d66f73fd8$var$normalize(map) {\n    let copy = Object.create(null);\n    for(let prop in map)copy[$0d481d7d66f73fd8$var$normalizeKeyName(prop)] = map[prop];\n    return copy;\n}\nfunction $0d481d7d66f73fd8$var$modifiers(name, event, shift = true) {\n    if (event.altKey) name = \"Alt-\" + name;\n    if (event.ctrlKey) name = \"Ctrl-\" + name;\n    if (event.metaKey) name = \"Meta-\" + name;\n    if (shift && event.shiftKey) name = \"Shift-\" + name;\n    return name;\n}\n/**\nCreate a keymap plugin for the given set of bindings.\n\nBindings should map key names to [command](https://prosemirror.net/docs/ref/#commands)-style\nfunctions, which will be called with `(EditorState, dispatch,\nEditorView)` arguments, and should return true when they've handled\nthe key. Note that the view argument isn't part of the command\nprotocol, but can be used as an escape hatch if a binding needs to\ndirectly interact with the UI.\n\nKey names may be strings like `\"Shift-Ctrl-Enter\"`—a key\nidentifier prefixed with zero or more modifiers. Key identifiers\nare based on the strings that can appear in\n[`KeyEvent.key`](https:developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).\nUse lowercase letters to refer to letter keys (or uppercase letters\nif you want shift to be held). You may use `\"Space\"` as an alias\nfor the `\" \"` name.\n\nModifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or\n`a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or\n`Meta-`) are recognized. For characters that are created by holding\nshift, the `Shift-` prefix is implied, and should not be added\nexplicitly.\n\nYou can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on\nother platforms.\n\nYou can add multiple keymap plugins to an editor. The order in\nwhich they appear determines their precedence (the ones early in\nthe array get to dispatch first).\n*/ function $0d481d7d66f73fd8$export$5043418e2ef368d5(bindings) {\n    return new (0, $1LeRC.Plugin)({\n        props: {\n            handleKeyDown: $0d481d7d66f73fd8$export$53f558754f8b9fd1(bindings)\n        }\n    });\n}\n/**\nGiven a set of bindings (using the same format as\n[`keymap`](https://prosemirror.net/docs/ref/#keymap.keymap)), return a [keydown\nhandler](https://prosemirror.net/docs/ref/#view.EditorProps.handleKeyDown) that handles them.\n*/ function $0d481d7d66f73fd8$export$53f558754f8b9fd1(bindings) {\n    let map = $0d481d7d66f73fd8$var$normalize(bindings);\n    return function(view, event) {\n        let name = (0, $16T16.keyName)(event), baseName, direct = map[$0d481d7d66f73fd8$var$modifiers(name, event)];\n        if (direct && direct(view.state, view.dispatch, view)) return true;\n        // A character key\n        if (name.length == 1 && name != \" \") {\n            if (event.shiftKey) {\n                // In case the name was already modified by shift, try looking\n                // it up without its shift modifier\n                let noShift = map[$0d481d7d66f73fd8$var$modifiers(name, event, false)];\n                if (noShift && noShift(view.state, view.dispatch, view)) return true;\n            }\n            if ((event.shiftKey || event.altKey || event.metaKey || name.charCodeAt(0) > 127) && (baseName = (0, $16T16.base)[event.keyCode]) && baseName != name) {\n                // Try falling back to the keyCode when there's a modifier\n                // active or the character produced isn't ASCII, and our table\n                // produces a different name from the the keyCode. See #668,\n                // #1060\n                let fromCode = map[$0d481d7d66f73fd8$var$modifiers(baseName, event)];\n                if (fromCode && fromCode(view.state, view.dispatch, view)) return true;\n            }\n        }\n        return false;\n    };\n}\n\n});\nparcelRegister(\"16T16\", function(module, exports) {\n\n$parcel$export(module.exports, \"base\", () => $0cf1073115e44648$export$e2253033e6e1df16);\n$parcel$export(module.exports, \"keyName\", () => $0cf1073115e44648$export$fb33aafd75404f4c);\nvar $0cf1073115e44648$export$e2253033e6e1df16 = {\n    8: \"Backspace\",\n    9: \"Tab\",\n    10: \"Enter\",\n    12: \"NumLock\",\n    13: \"Enter\",\n    16: \"Shift\",\n    17: \"Control\",\n    18: \"Alt\",\n    20: \"CapsLock\",\n    27: \"Escape\",\n    32: \" \",\n    33: \"PageUp\",\n    34: \"PageDown\",\n    35: \"End\",\n    36: \"Home\",\n    37: \"ArrowLeft\",\n    38: \"ArrowUp\",\n    39: \"ArrowRight\",\n    40: \"ArrowDown\",\n    44: \"PrintScreen\",\n    45: \"Insert\",\n    46: \"Delete\",\n    59: \";\",\n    61: \"=\",\n    91: \"Meta\",\n    92: \"Meta\",\n    106: \"*\",\n    107: \"+\",\n    108: \",\",\n    109: \"-\",\n    110: \".\",\n    111: \"/\",\n    144: \"NumLock\",\n    145: \"ScrollLock\",\n    160: \"Shift\",\n    161: \"Shift\",\n    162: \"Control\",\n    163: \"Control\",\n    164: \"Alt\",\n    165: \"Alt\",\n    173: \"-\",\n    186: \";\",\n    187: \"=\",\n    188: \",\",\n    189: \"-\",\n    190: \".\",\n    191: \"/\",\n    192: \"`\",\n    219: \"[\",\n    220: \"\\\\\",\n    221: \"]\",\n    222: \"'\"\n};\nvar $0cf1073115e44648$export$fba63a578e423eb = {\n    48: \")\",\n    49: \"!\",\n    50: \"@\",\n    51: \"#\",\n    52: \"$\",\n    53: \"%\",\n    54: \"^\",\n    55: \"&\",\n    56: \"*\",\n    57: \"(\",\n    59: \":\",\n    61: \"+\",\n    173: \"_\",\n    186: \":\",\n    187: \"+\",\n    188: \"<\",\n    189: \"_\",\n    190: \">\",\n    191: \"?\",\n    192: \"~\",\n    219: \"{\",\n    220: \"|\",\n    221: \"}\",\n    222: \"\\\"\"\n};\nvar $0cf1073115e44648$var$mac = typeof navigator != \"undefined\" && /Mac/.test(navigator.platform);\nvar $0cf1073115e44648$var$ie = typeof navigator != \"undefined\" && /MSIE \\d|Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);\n// Fill in the digit keys\nfor(var $0cf1073115e44648$var$i = 0; $0cf1073115e44648$var$i < 10; $0cf1073115e44648$var$i++)$0cf1073115e44648$export$e2253033e6e1df16[48 + $0cf1073115e44648$var$i] = $0cf1073115e44648$export$e2253033e6e1df16[96 + $0cf1073115e44648$var$i] = String($0cf1073115e44648$var$i);\n// The function keys\nfor(var $0cf1073115e44648$var$i = 1; $0cf1073115e44648$var$i <= 24; $0cf1073115e44648$var$i++)$0cf1073115e44648$export$e2253033e6e1df16[$0cf1073115e44648$var$i + 111] = \"F\" + $0cf1073115e44648$var$i;\n// And the alphabetic keys\nfor(var $0cf1073115e44648$var$i = 65; $0cf1073115e44648$var$i <= 90; $0cf1073115e44648$var$i++){\n    $0cf1073115e44648$export$e2253033e6e1df16[$0cf1073115e44648$var$i] = String.fromCharCode($0cf1073115e44648$var$i + 32);\n    $0cf1073115e44648$export$fba63a578e423eb[$0cf1073115e44648$var$i] = String.fromCharCode($0cf1073115e44648$var$i);\n}\n// For each code that doesn't have a shift-equivalent, copy the base name\nfor(var $0cf1073115e44648$var$code in $0cf1073115e44648$export$e2253033e6e1df16)if (!$0cf1073115e44648$export$fba63a578e423eb.hasOwnProperty($0cf1073115e44648$var$code)) $0cf1073115e44648$export$fba63a578e423eb[$0cf1073115e44648$var$code] = $0cf1073115e44648$export$e2253033e6e1df16[$0cf1073115e44648$var$code];\nfunction $0cf1073115e44648$export$fb33aafd75404f4c(event) {\n    // On macOS, keys held with Shift and Cmd don't reflect the effect of Shift in `.key`.\n    // On IE, shift effect is never included in `.key`.\n    var ignoreKey = $0cf1073115e44648$var$mac && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey || $0cf1073115e44648$var$ie && event.shiftKey && event.key && event.key.length == 1 || event.key == \"Unidentified\";\n    var name = !ignoreKey && event.key || (event.shiftKey ? $0cf1073115e44648$export$fba63a578e423eb : $0cf1073115e44648$export$e2253033e6e1df16)[event.keyCode] || event.key || \"Unidentified\";\n    // Edge sometimes produces wrong names (Issue #3)\n    if (name == \"Esc\") name = \"Escape\";\n    if (name == \"Del\") name = \"Delete\";\n    // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/\n    if (name == \"Left\") name = \"ArrowLeft\";\n    if (name == \"Up\") name = \"ArrowUp\";\n    if (name == \"Right\") name = \"ArrowRight\";\n    if (name == \"Down\") name = \"ArrowDown\";\n    return name;\n}\n\n});\n\n\n\nparcelRegister(\"k43Nl\", function(module, exports) {\n$parcel$export(module.exports, \"DOMParser\", () => (parcelRequire(\"1krlL\")).DOMParser);\n$parcel$export(module.exports, \"DOMSerializer\", () => (parcelRequire(\"1krlL\")).DOMSerializer);\n$parcel$export(module.exports, \"Fragment\", () => (parcelRequire(\"1krlL\")).Fragment);\n$parcel$export(module.exports, \"Node\", () => (parcelRequire(\"1krlL\")).Node);\n$parcel$export(module.exports, \"Schema\", () => (parcelRequire(\"1krlL\")).Schema);\n$parcel$export(module.exports, \"Slice\", () => (parcelRequire(\"1krlL\")).Slice);\n// model/index.ts\nparcelRequire(\"1krlL\");\n\n});\n\nparcelRegister(\"jV6wh\", function(module, exports) {\n$parcel$export(module.exports, \"canJoin\", () => (parcelRequire(\"gfgdn\")).canJoin);\n$parcel$export(module.exports, \"canSplit\", () => (parcelRequire(\"gfgdn\")).canSplit);\n$parcel$export(module.exports, \"findWrapping\", () => (parcelRequire(\"gfgdn\")).findWrapping);\n$parcel$export(module.exports, \"joinPoint\", () => (parcelRequire(\"gfgdn\")).joinPoint);\n$parcel$export(module.exports, \"liftTarget\", () => (parcelRequire(\"gfgdn\")).liftTarget);\n$parcel$export(module.exports, \"ReplaceAroundStep\", () => (parcelRequire(\"gfgdn\")).ReplaceAroundStep);\n$parcel$export(module.exports, \"ReplaceStep\", () => (parcelRequire(\"gfgdn\")).ReplaceStep);\n$parcel$export(module.exports, \"Transform\", () => (parcelRequire(\"gfgdn\")).Transform);\n// transform/index.ts\nparcelRequire(\"gfgdn\");\n\n});\n\nparcelRegister(\"cJglX\", function(module, exports) {\n$parcel$export(module.exports, \"createParagraphNear\", () => (parcelRequire(\"9D0ij\")).createParagraphNear);\n$parcel$export(module.exports, \"deleteSelection\", () => (parcelRequire(\"9D0ij\")).deleteSelection);\n$parcel$export(module.exports, \"exitCode\", () => (parcelRequire(\"9D0ij\")).exitCode);\n$parcel$export(module.exports, \"joinBackward\", () => (parcelRequire(\"9D0ij\")).joinBackward);\n$parcel$export(module.exports, \"joinDown\", () => (parcelRequire(\"9D0ij\")).joinDown);\n$parcel$export(module.exports, \"joinForward\", () => (parcelRequire(\"9D0ij\")).joinForward);\n$parcel$export(module.exports, \"joinTextblockBackward\", () => (parcelRequire(\"9D0ij\")).joinTextblockBackward);\n$parcel$export(module.exports, \"joinTextblockForward\", () => (parcelRequire(\"9D0ij\")).joinTextblockForward);\n$parcel$export(module.exports, \"joinUp\", () => (parcelRequire(\"9D0ij\")).joinUp);\n$parcel$export(module.exports, \"lift\", () => (parcelRequire(\"9D0ij\")).lift);\n$parcel$export(module.exports, \"liftEmptyBlock\", () => (parcelRequire(\"9D0ij\")).liftEmptyBlock);\n$parcel$export(module.exports, \"newlineInCode\", () => (parcelRequire(\"9D0ij\")).newlineInCode);\n$parcel$export(module.exports, \"selectNodeBackward\", () => (parcelRequire(\"9D0ij\")).selectNodeBackward);\n$parcel$export(module.exports, \"selectNodeForward\", () => (parcelRequire(\"9D0ij\")).selectNodeForward);\n$parcel$export(module.exports, \"selectParentNode\", () => (parcelRequire(\"9D0ij\")).selectParentNode);\n$parcel$export(module.exports, \"selectTextblockEnd\", () => (parcelRequire(\"9D0ij\")).selectTextblockEnd);\n$parcel$export(module.exports, \"selectTextblockStart\", () => (parcelRequire(\"9D0ij\")).selectTextblockStart);\n$parcel$export(module.exports, \"setBlockType\", () => (parcelRequire(\"9D0ij\")).setBlockType);\n$parcel$export(module.exports, \"wrapIn\", () => (parcelRequire(\"9D0ij\")).wrapIn);\n// commands/index.ts\nparcelRequire(\"9D0ij\");\n\n});\nparcelRegister(\"9D0ij\", function(module, exports) {\n\n$parcel$export(module.exports, \"deleteSelection\", () => $7027fc0208e1ca62$export$e9a518a637d1e641);\n$parcel$export(module.exports, \"joinBackward\", () => $7027fc0208e1ca62$export$979097b097459299);\n$parcel$export(module.exports, \"joinTextblockBackward\", () => $7027fc0208e1ca62$export$1dce4f5c74f5f90f);\n$parcel$export(module.exports, \"joinTextblockForward\", () => $7027fc0208e1ca62$export$e796bb96d22be2cd);\n$parcel$export(module.exports, \"selectNodeBackward\", () => $7027fc0208e1ca62$export$52b8a4af68d19794);\n$parcel$export(module.exports, \"joinForward\", () => $7027fc0208e1ca62$export$bf432e340007f9ef);\n$parcel$export(module.exports, \"selectNodeForward\", () => $7027fc0208e1ca62$export$5835b52680b80cfd);\n$parcel$export(module.exports, \"joinUp\", () => $7027fc0208e1ca62$export$4bb15e6d4372b393);\n$parcel$export(module.exports, \"joinDown\", () => $7027fc0208e1ca62$export$8dd967a262b064bb);\n$parcel$export(module.exports, \"lift\", () => $7027fc0208e1ca62$export$590e8b2c435046d9);\n$parcel$export(module.exports, \"newlineInCode\", () => $7027fc0208e1ca62$export$a5d02b4b65e94f91);\n$parcel$export(module.exports, \"exitCode\", () => $7027fc0208e1ca62$export$634b78845598ff5b);\n$parcel$export(module.exports, \"createParagraphNear\", () => $7027fc0208e1ca62$export$d0f80ac1b4510888);\n$parcel$export(module.exports, \"liftEmptyBlock\", () => $7027fc0208e1ca62$export$a3574cc681852c08);\n$parcel$export(module.exports, \"selectParentNode\", () => $7027fc0208e1ca62$export$a37f6aaa9169911d);\n$parcel$export(module.exports, \"selectTextblockStart\", () => $7027fc0208e1ca62$export$c3a64f3c9604a1b1);\n$parcel$export(module.exports, \"selectTextblockEnd\", () => $7027fc0208e1ca62$export$a66c1876556415e5);\n$parcel$export(module.exports, \"wrapIn\", () => $7027fc0208e1ca62$export$6e5e3c49755affd0);\n$parcel$export(module.exports, \"setBlockType\", () => $7027fc0208e1ca62$export$36987f561c736aad);\n\nvar $gfgdn = parcelRequire(\"gfgdn\");\n\nvar $1krlL = parcelRequire(\"1krlL\");\n\nvar $1LeRC = parcelRequire(\"1LeRC\");\n/**\nDelete the selection, if there is one.\n*/ const $7027fc0208e1ca62$export$e9a518a637d1e641 = (state, dispatch)=>{\n    if (state.selection.empty) return false;\n    if (dispatch) dispatch(state.tr.deleteSelection().scrollIntoView());\n    return true;\n};\nfunction $7027fc0208e1ca62$var$atBlockStart(state, view) {\n    let { $cursor: $cursor } = state.selection;\n    if (!$cursor || (view ? !view.endOfTextblock(\"backward\", state) : $cursor.parentOffset > 0)) return null;\n    return $cursor;\n}\n/**\nIf the selection is empty and at the start of a textblock, try to\nreduce the distance between that block and the one before it—if\nthere's a block directly before it that can be joined, join them.\nIf not, try to move the selected block closer to the next one in\nthe document structure by lifting it out of its parent or moving it\ninto a parent of the previous block. Will use the view for accurate\n(bidi-aware) start-of-textblock detection if given.\n*/ const $7027fc0208e1ca62$export$979097b097459299 = (state, dispatch, view)=>{\n    let $cursor = $7027fc0208e1ca62$var$atBlockStart(state, view);\n    if (!$cursor) return false;\n    let $cut = $7027fc0208e1ca62$var$findCutBefore($cursor);\n    // If there is no node before this, try to lift\n    if (!$cut) {\n        let range = $cursor.blockRange(), target = range && (0, $gfgdn.liftTarget)(range);\n        if (target == null) return false;\n        if (dispatch) dispatch(state.tr.lift(range, target).scrollIntoView());\n        return true;\n    }\n    let before = $cut.nodeBefore;\n    // Apply the joining algorithm\n    if ($7027fc0208e1ca62$var$deleteBarrier(state, $cut, dispatch, -1)) return true;\n    // If the node below has no content and the node above is\n    // selectable, delete the node below and select the one above.\n    if ($cursor.parent.content.size == 0 && ($7027fc0208e1ca62$var$textblockAt(before, \"end\") || (0, $1LeRC.NodeSelection).isSelectable(before))) for(let depth = $cursor.depth;; depth--){\n        let delStep = (0, $gfgdn.replaceStep)(state.doc, $cursor.before(depth), $cursor.after(depth), (0, $1krlL.Slice).empty);\n        if (delStep && delStep.slice.size < delStep.to - delStep.from) {\n            if (dispatch) {\n                let tr = state.tr.step(delStep);\n                tr.setSelection($7027fc0208e1ca62$var$textblockAt(before, \"end\") ? (0, $1LeRC.Selection).findFrom(tr.doc.resolve(tr.mapping.map($cut.pos, -1)), -1) : (0, $1LeRC.NodeSelection).create(tr.doc, $cut.pos - before.nodeSize));\n                dispatch(tr.scrollIntoView());\n            }\n            return true;\n        }\n        if (depth == 1 || $cursor.node(depth - 1).childCount > 1) break;\n    }\n    // If the node before is an atom, delete it\n    if (before.isAtom && $cut.depth == $cursor.depth - 1) {\n        if (dispatch) dispatch(state.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView());\n        return true;\n    }\n    return false;\n};\n/**\nA more limited form of [`joinBackward`]($commands.joinBackward)\nthat only tries to join the current textblock to the one before\nit, if the cursor is at the start of a textblock.\n*/ const $7027fc0208e1ca62$export$1dce4f5c74f5f90f = (state, dispatch, view)=>{\n    let $cursor = $7027fc0208e1ca62$var$atBlockStart(state, view);\n    if (!$cursor) return false;\n    let $cut = $7027fc0208e1ca62$var$findCutBefore($cursor);\n    return $cut ? $7027fc0208e1ca62$var$joinTextblocksAround(state, $cut, dispatch) : false;\n};\n/**\nA more limited form of [`joinForward`]($commands.joinForward)\nthat only tries to join the current textblock to the one after\nit, if the cursor is at the end of a textblock.\n*/ const $7027fc0208e1ca62$export$e796bb96d22be2cd = (state, dispatch, view)=>{\n    let $cursor = $7027fc0208e1ca62$var$atBlockEnd(state, view);\n    if (!$cursor) return false;\n    let $cut = $7027fc0208e1ca62$var$findCutAfter($cursor);\n    return $cut ? $7027fc0208e1ca62$var$joinTextblocksAround(state, $cut, dispatch) : false;\n};\nfunction $7027fc0208e1ca62$var$joinTextblocksAround(state, $cut, dispatch) {\n    let before = $cut.nodeBefore, beforeText = before, beforePos = $cut.pos - 1;\n    for(; !beforeText.isTextblock; beforePos--){\n        if (beforeText.type.spec.isolating) return false;\n        let child = beforeText.lastChild;\n        if (!child) return false;\n        beforeText = child;\n    }\n    let after = $cut.nodeAfter, afterText = after, afterPos = $cut.pos + 1;\n    for(; !afterText.isTextblock; afterPos++){\n        if (afterText.type.spec.isolating) return false;\n        let child = afterText.firstChild;\n        if (!child) return false;\n        afterText = child;\n    }\n    let step = (0, $gfgdn.replaceStep)(state.doc, beforePos, afterPos, (0, $1krlL.Slice).empty);\n    if (!step || step.from != beforePos || step instanceof (0, $gfgdn.ReplaceStep) && step.slice.size >= afterPos - beforePos) return false;\n    if (dispatch) {\n        let tr = state.tr.step(step);\n        tr.setSelection((0, $1LeRC.TextSelection).create(tr.doc, beforePos));\n        dispatch(tr.scrollIntoView());\n    }\n    return true;\n}\nfunction $7027fc0208e1ca62$var$textblockAt(node, side, only = false) {\n    for(let scan = node; scan; scan = side == \"start\" ? scan.firstChild : scan.lastChild){\n        if (scan.isTextblock) return true;\n        if (only && scan.childCount != 1) return false;\n    }\n    return false;\n}\n/**\nWhen the selection is empty and at the start of a textblock, select\nthe node before that textblock, if possible. This is intended to be\nbound to keys like backspace, after\n[`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) or other deleting\ncommands, as a fall-back behavior when the schema doesn't allow\ndeletion at the selected point.\n*/ const $7027fc0208e1ca62$export$52b8a4af68d19794 = (state, dispatch, view)=>{\n    let { $head: $head, empty: empty } = state.selection, $cut = $head;\n    if (!empty) return false;\n    if ($head.parent.isTextblock) {\n        if (view ? !view.endOfTextblock(\"backward\", state) : $head.parentOffset > 0) return false;\n        $cut = $7027fc0208e1ca62$var$findCutBefore($head);\n    }\n    let node = $cut && $cut.nodeBefore;\n    if (!node || !(0, $1LeRC.NodeSelection).isSelectable(node)) return false;\n    if (dispatch) dispatch(state.tr.setSelection((0, $1LeRC.NodeSelection).create(state.doc, $cut.pos - node.nodeSize)).scrollIntoView());\n    return true;\n};\nfunction $7027fc0208e1ca62$var$findCutBefore($pos) {\n    if (!$pos.parent.type.spec.isolating) for(let i = $pos.depth - 1; i >= 0; i--){\n        if ($pos.index(i) > 0) return $pos.doc.resolve($pos.before(i + 1));\n        if ($pos.node(i).type.spec.isolating) break;\n    }\n    return null;\n}\nfunction $7027fc0208e1ca62$var$atBlockEnd(state, view) {\n    let { $cursor: $cursor } = state.selection;\n    if (!$cursor || (view ? !view.endOfTextblock(\"forward\", state) : $cursor.parentOffset < $cursor.parent.content.size)) return null;\n    return $cursor;\n}\n/**\nIf the selection is empty and the cursor is at the end of a\ntextblock, try to reduce or remove the boundary between that block\nand the one after it, either by joining them or by moving the other\nblock closer to this one in the tree structure. Will use the view\nfor accurate start-of-textblock detection if given.\n*/ const $7027fc0208e1ca62$export$bf432e340007f9ef = (state, dispatch, view)=>{\n    let $cursor = $7027fc0208e1ca62$var$atBlockEnd(state, view);\n    if (!$cursor) return false;\n    let $cut = $7027fc0208e1ca62$var$findCutAfter($cursor);\n    // If there is no node after this, there's nothing to do\n    if (!$cut) return false;\n    let after = $cut.nodeAfter;\n    // Try the joining algorithm\n    if ($7027fc0208e1ca62$var$deleteBarrier(state, $cut, dispatch, 1)) return true;\n    // If the node above has no content and the node below is\n    // selectable, delete the node above and select the one below.\n    if ($cursor.parent.content.size == 0 && ($7027fc0208e1ca62$var$textblockAt(after, \"start\") || (0, $1LeRC.NodeSelection).isSelectable(after))) {\n        let delStep = (0, $gfgdn.replaceStep)(state.doc, $cursor.before(), $cursor.after(), (0, $1krlL.Slice).empty);\n        if (delStep && delStep.slice.size < delStep.to - delStep.from) {\n            if (dispatch) {\n                let tr = state.tr.step(delStep);\n                tr.setSelection($7027fc0208e1ca62$var$textblockAt(after, \"start\") ? (0, $1LeRC.Selection).findFrom(tr.doc.resolve(tr.mapping.map($cut.pos)), 1) : (0, $1LeRC.NodeSelection).create(tr.doc, tr.mapping.map($cut.pos)));\n                dispatch(tr.scrollIntoView());\n            }\n            return true;\n        }\n    }\n    // If the next node is an atom, delete it\n    if (after.isAtom && $cut.depth == $cursor.depth - 1) {\n        if (dispatch) dispatch(state.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView());\n        return true;\n    }\n    return false;\n};\n/**\nWhen the selection is empty and at the end of a textblock, select\nthe node coming after that textblock, if possible. This is intended\nto be bound to keys like delete, after\n[`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward) and similar deleting\ncommands, to provide a fall-back behavior when the schema doesn't\nallow deletion at the selected point.\n*/ const $7027fc0208e1ca62$export$5835b52680b80cfd = (state, dispatch, view)=>{\n    let { $head: $head, empty: empty } = state.selection, $cut = $head;\n    if (!empty) return false;\n    if ($head.parent.isTextblock) {\n        if (view ? !view.endOfTextblock(\"forward\", state) : $head.parentOffset < $head.parent.content.size) return false;\n        $cut = $7027fc0208e1ca62$var$findCutAfter($head);\n    }\n    let node = $cut && $cut.nodeAfter;\n    if (!node || !(0, $1LeRC.NodeSelection).isSelectable(node)) return false;\n    if (dispatch) dispatch(state.tr.setSelection((0, $1LeRC.NodeSelection).create(state.doc, $cut.pos)).scrollIntoView());\n    return true;\n};\nfunction $7027fc0208e1ca62$var$findCutAfter($pos) {\n    if (!$pos.parent.type.spec.isolating) for(let i = $pos.depth - 1; i >= 0; i--){\n        let parent = $pos.node(i);\n        if ($pos.index(i) + 1 < parent.childCount) return $pos.doc.resolve($pos.after(i + 1));\n        if (parent.type.spec.isolating) break;\n    }\n    return null;\n}\n/**\nJoin the selected block or, if there is a text selection, the\nclosest ancestor block of the selection that can be joined, with\nthe sibling above it.\n*/ const $7027fc0208e1ca62$export$4bb15e6d4372b393 = (state, dispatch)=>{\n    let sel = state.selection, nodeSel = sel instanceof (0, $1LeRC.NodeSelection), point;\n    if (nodeSel) {\n        if (sel.node.isTextblock || !(0, $gfgdn.canJoin)(state.doc, sel.from)) return false;\n        point = sel.from;\n    } else {\n        point = (0, $gfgdn.joinPoint)(state.doc, sel.from, -1);\n        if (point == null) return false;\n    }\n    if (dispatch) {\n        let tr = state.tr.join(point);\n        if (nodeSel) tr.setSelection((0, $1LeRC.NodeSelection).create(tr.doc, point - state.doc.resolve(point).nodeBefore.nodeSize));\n        dispatch(tr.scrollIntoView());\n    }\n    return true;\n};\n/**\nJoin the selected block, or the closest ancestor of the selection\nthat can be joined, with the sibling after it.\n*/ const $7027fc0208e1ca62$export$8dd967a262b064bb = (state, dispatch)=>{\n    let sel = state.selection, point;\n    if (sel instanceof (0, $1LeRC.NodeSelection)) {\n        if (sel.node.isTextblock || !(0, $gfgdn.canJoin)(state.doc, sel.to)) return false;\n        point = sel.to;\n    } else {\n        point = (0, $gfgdn.joinPoint)(state.doc, sel.to, 1);\n        if (point == null) return false;\n    }\n    if (dispatch) dispatch(state.tr.join(point).scrollIntoView());\n    return true;\n};\n/**\nLift the selected block, or the closest ancestor block of the\nselection that can be lifted, out of its parent node.\n*/ const $7027fc0208e1ca62$export$590e8b2c435046d9 = (state, dispatch)=>{\n    let { $from: $from, $to: $to } = state.selection;\n    let range = $from.blockRange($to), target = range && (0, $gfgdn.liftTarget)(range);\n    if (target == null) return false;\n    if (dispatch) dispatch(state.tr.lift(range, target).scrollIntoView());\n    return true;\n};\n/**\nIf the selection is in a node whose type has a truthy\n[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, replace the\nselection with a newline character.\n*/ const $7027fc0208e1ca62$export$a5d02b4b65e94f91 = (state, dispatch)=>{\n    let { $head: $head, $anchor: $anchor } = state.selection;\n    if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) return false;\n    if (dispatch) dispatch(state.tr.insertText(\"\\n\").scrollIntoView());\n    return true;\n};\nfunction $7027fc0208e1ca62$var$defaultBlockAt(match) {\n    for(let i = 0; i < match.edgeCount; i++){\n        let { type: type } = match.edge(i);\n        if (type.isTextblock && !type.hasRequiredAttrs()) return type;\n    }\n    return null;\n}\n/**\nWhen the selection is in a node with a truthy\n[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, create a\ndefault block after the code block, and move the cursor there.\n*/ const $7027fc0208e1ca62$export$634b78845598ff5b = (state, dispatch)=>{\n    let { $head: $head, $anchor: $anchor } = state.selection;\n    if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) return false;\n    let above = $head.node(-1), after = $head.indexAfter(-1), type = $7027fc0208e1ca62$var$defaultBlockAt(above.contentMatchAt(after));\n    if (!type || !above.canReplaceWith(after, after, type)) return false;\n    if (dispatch) {\n        let pos = $head.after(), tr = state.tr.replaceWith(pos, pos, type.createAndFill());\n        tr.setSelection((0, $1LeRC.Selection).near(tr.doc.resolve(pos), 1));\n        dispatch(tr.scrollIntoView());\n    }\n    return true;\n};\n/**\nIf a block node is selected, create an empty paragraph before (if\nit is its parent's first child) or after it.\n*/ const $7027fc0208e1ca62$export$d0f80ac1b4510888 = (state, dispatch)=>{\n    let sel = state.selection, { $from: $from, $to: $to } = sel;\n    if (sel instanceof (0, $1LeRC.AllSelection) || $from.parent.inlineContent || $to.parent.inlineContent) return false;\n    let type = $7027fc0208e1ca62$var$defaultBlockAt($to.parent.contentMatchAt($to.indexAfter()));\n    if (!type || !type.isTextblock) return false;\n    if (dispatch) {\n        let side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos;\n        let tr = state.tr.insert(side, type.createAndFill());\n        tr.setSelection((0, $1LeRC.TextSelection).create(tr.doc, side + 1));\n        dispatch(tr.scrollIntoView());\n    }\n    return true;\n};\n/**\nIf the cursor is in an empty textblock that can be lifted, lift the\nblock.\n*/ const $7027fc0208e1ca62$export$a3574cc681852c08 = (state, dispatch)=>{\n    let { $cursor: $cursor } = state.selection;\n    if (!$cursor || $cursor.parent.content.size) return false;\n    if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) {\n        let before = $cursor.before();\n        if ((0, $gfgdn.canSplit)(state.doc, before)) {\n            if (dispatch) dispatch(state.tr.split(before).scrollIntoView());\n            return true;\n        }\n    }\n    let range = $cursor.blockRange(), target = range && (0, $gfgdn.liftTarget)(range);\n    if (target == null) return false;\n    if (dispatch) dispatch(state.tr.lift(range, target).scrollIntoView());\n    return true;\n};\n/**\nCreate a variant of [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock) that uses\na custom function to determine the type of the newly split off block.\n*/ function $7027fc0208e1ca62$export$8bf8350f33b1e5ab(splitNode) {\n    return (state, dispatch)=>{\n        let { $from: $from, $to: $to } = state.selection;\n        if (state.selection instanceof (0, $1LeRC.NodeSelection) && state.selection.node.isBlock) {\n            if (!$from.parentOffset || !(0, $gfgdn.canSplit)(state.doc, $from.pos)) return false;\n            if (dispatch) dispatch(state.tr.split($from.pos).scrollIntoView());\n            return true;\n        }\n        if (!$from.depth) return false;\n        let types = [];\n        let splitDepth, deflt, atEnd = false, atStart = false;\n        for(let d = $from.depth;; d--){\n            let node = $from.node(d);\n            if (node.isBlock) {\n                atEnd = $from.end(d) == $from.pos + ($from.depth - d);\n                atStart = $from.start(d) == $from.pos - ($from.depth - d);\n                deflt = $7027fc0208e1ca62$var$defaultBlockAt($from.node(d - 1).contentMatchAt($from.indexAfter(d - 1)));\n                let splitType = splitNode && splitNode($to.parent, atEnd, $from);\n                types.unshift(splitType || (atEnd && deflt ? {\n                    type: deflt\n                } : null));\n                splitDepth = d;\n                break;\n            } else {\n                if (d == 1) return false;\n                types.unshift(null);\n            }\n        }\n        let tr = state.tr;\n        if (state.selection instanceof (0, $1LeRC.TextSelection) || state.selection instanceof (0, $1LeRC.AllSelection)) tr.deleteSelection();\n        let splitPos = tr.mapping.map($from.pos);\n        let can = (0, $gfgdn.canSplit)(tr.doc, splitPos, types.length, types);\n        if (!can) {\n            types[0] = deflt ? {\n                type: deflt\n            } : null;\n            can = (0, $gfgdn.canSplit)(tr.doc, splitPos, types.length, types);\n        }\n        tr.split(splitPos, types.length, types);\n        if (!atEnd && atStart && $from.node(splitDepth).type != deflt) {\n            let first = tr.mapping.map($from.before(splitDepth)), $first = tr.doc.resolve(first);\n            if (deflt && $from.node(splitDepth - 1).canReplaceWith($first.index(), $first.index() + 1, deflt)) tr.setNodeMarkup(tr.mapping.map($from.before(splitDepth)), deflt);\n        }\n        if (dispatch) dispatch(tr.scrollIntoView());\n        return true;\n    };\n}\n/**\nSplit the parent block of the selection. If the selection is a text\nselection, also delete its content.\n*/ const $7027fc0208e1ca62$export$e99155638ff4dff0 = $7027fc0208e1ca62$export$8bf8350f33b1e5ab();\n/**\nActs like [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock), but without\nresetting the set of active marks at the cursor.\n*/ const $7027fc0208e1ca62$export$eeb429476568b72b = (state, dispatch)=>{\n    return $7027fc0208e1ca62$export$e99155638ff4dff0(state, dispatch && ((tr)=>{\n        let marks = state.storedMarks || state.selection.$to.parentOffset && state.selection.$from.marks();\n        if (marks) tr.ensureMarks(marks);\n        dispatch(tr);\n    }));\n};\n/**\nMove the selection to the node wrapping the current selection, if\nany. (Will not select the document node.)\n*/ const $7027fc0208e1ca62$export$a37f6aaa9169911d = (state, dispatch)=>{\n    let { $from: $from, to: to } = state.selection, pos;\n    let same = $from.sharedDepth(to);\n    if (same == 0) return false;\n    pos = $from.before(same);\n    if (dispatch) dispatch(state.tr.setSelection((0, $1LeRC.NodeSelection).create(state.doc, pos)));\n    return true;\n};\n/**\nSelect the whole document.\n*/ const $7027fc0208e1ca62$export$90aca4adda6ff0f5 = (state, dispatch)=>{\n    if (dispatch) dispatch(state.tr.setSelection(new (0, $1LeRC.AllSelection)(state.doc)));\n    return true;\n};\nfunction $7027fc0208e1ca62$var$joinMaybeClear(state, $pos, dispatch) {\n    let before = $pos.nodeBefore, after = $pos.nodeAfter, index = $pos.index();\n    if (!before || !after || !before.type.compatibleContent(after.type)) return false;\n    if (!before.content.size && $pos.parent.canReplace(index - 1, index)) {\n        if (dispatch) dispatch(state.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView());\n        return true;\n    }\n    if (!$pos.parent.canReplace(index, index + 1) || !(after.isTextblock || (0, $gfgdn.canJoin)(state.doc, $pos.pos))) return false;\n    if (dispatch) dispatch(state.tr.join($pos.pos).scrollIntoView());\n    return true;\n}\nfunction $7027fc0208e1ca62$var$deleteBarrier(state, $cut, dispatch, dir) {\n    let before = $cut.nodeBefore, after = $cut.nodeAfter, conn, match;\n    let isolated = before.type.spec.isolating || after.type.spec.isolating;\n    if (!isolated && $7027fc0208e1ca62$var$joinMaybeClear(state, $cut, dispatch)) return true;\n    let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1);\n    if (canDelAfter && (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match.matchType(conn[0] || after.type).validEnd) {\n        if (dispatch) {\n            let end = $cut.pos + after.nodeSize, wrap = (0, $1krlL.Fragment).empty;\n            for(let i = conn.length - 1; i >= 0; i--)wrap = (0, $1krlL.Fragment).from(conn[i].create(null, wrap));\n            wrap = (0, $1krlL.Fragment).from(before.copy(wrap));\n            let tr = state.tr.step(new (0, $gfgdn.ReplaceAroundStep)($cut.pos - 1, end, $cut.pos, end, new (0, $1krlL.Slice)(wrap, 1, 0), conn.length, true));\n            let $joinAt = tr.doc.resolve(end + 2 * conn.length);\n            if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && (0, $gfgdn.canJoin)(tr.doc, $joinAt.pos)) tr.join($joinAt.pos);\n            dispatch(tr.scrollIntoView());\n        }\n        return true;\n    }\n    let selAfter = after.type.spec.isolating || dir > 0 && isolated ? null : (0, $1LeRC.Selection).findFrom($cut, 1);\n    let range = selAfter && selAfter.$from.blockRange(selAfter.$to), target = range && (0, $gfgdn.liftTarget)(range);\n    if (target != null && target >= $cut.depth) {\n        if (dispatch) dispatch(state.tr.lift(range, target).scrollIntoView());\n        return true;\n    }\n    if (canDelAfter && $7027fc0208e1ca62$var$textblockAt(after, \"start\", true) && $7027fc0208e1ca62$var$textblockAt(before, \"end\")) {\n        let at = before, wrap = [];\n        for(;;){\n            wrap.push(at);\n            if (at.isTextblock) break;\n            at = at.lastChild;\n        }\n        let afterText = after, afterDepth = 1;\n        for(; !afterText.isTextblock; afterText = afterText.firstChild)afterDepth++;\n        if (at.canReplace(at.childCount, at.childCount, afterText.content)) {\n            if (dispatch) {\n                let end = (0, $1krlL.Fragment).empty;\n                for(let i = wrap.length - 1; i >= 0; i--)end = (0, $1krlL.Fragment).from(wrap[i].copy(end));\n                let tr = state.tr.step(new (0, $gfgdn.ReplaceAroundStep)($cut.pos - wrap.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new (0, $1krlL.Slice)(end, wrap.length, 0), 0, true));\n                dispatch(tr.scrollIntoView());\n            }\n            return true;\n        }\n    }\n    return false;\n}\nfunction $7027fc0208e1ca62$var$selectTextblockSide(side) {\n    return function(state, dispatch) {\n        let sel = state.selection, $pos = side < 0 ? sel.$from : sel.$to;\n        let depth = $pos.depth;\n        while($pos.node(depth).isInline){\n            if (!depth) return false;\n            depth--;\n        }\n        if (!$pos.node(depth).isTextblock) return false;\n        if (dispatch) dispatch(state.tr.setSelection((0, $1LeRC.TextSelection).create(state.doc, side < 0 ? $pos.start(depth) : $pos.end(depth))));\n        return true;\n    };\n}\n/**\nMoves the cursor to the start of current text block.\n*/ const $7027fc0208e1ca62$export$c3a64f3c9604a1b1 = $7027fc0208e1ca62$var$selectTextblockSide(-1);\n/**\nMoves the cursor to the end of current text block.\n*/ const $7027fc0208e1ca62$export$a66c1876556415e5 = $7027fc0208e1ca62$var$selectTextblockSide(1);\n// Parameterized commands\n/**\nWrap the selection in a node of the given type with the given\nattributes.\n*/ function $7027fc0208e1ca62$export$6e5e3c49755affd0(nodeType, attrs = null) {\n    return function(state, dispatch) {\n        let { $from: $from, $to: $to } = state.selection;\n        let range = $from.blockRange($to), wrapping = range && (0, $gfgdn.findWrapping)(range, nodeType, attrs);\n        if (!wrapping) return false;\n        if (dispatch) dispatch(state.tr.wrap(range, wrapping).scrollIntoView());\n        return true;\n    };\n}\n/**\nReturns a command that tries to set the selected textblocks to the\ngiven node type with the given attributes.\n*/ function $7027fc0208e1ca62$export$36987f561c736aad(nodeType, attrs = null) {\n    return function(state, dispatch) {\n        let applicable = false;\n        for(let i = 0; i < state.selection.ranges.length && !applicable; i++){\n            let { $from: { pos: from }, $to: { pos: to } } = state.selection.ranges[i];\n            state.doc.nodesBetween(from, to, (node, pos)=>{\n                if (applicable) return false;\n                if (!node.isTextblock || node.hasMarkup(nodeType, attrs)) return;\n                if (node.type == nodeType) applicable = true;\n                else {\n                    let $pos = state.doc.resolve(pos), index = $pos.index();\n                    applicable = $pos.parent.canReplaceWith(index, index + 1, nodeType);\n                }\n            });\n        }\n        if (!applicable) return false;\n        if (dispatch) {\n            let tr = state.tr;\n            for(let i = 0; i < state.selection.ranges.length; i++){\n                let { $from: { pos: from }, $to: { pos: to } } = state.selection.ranges[i];\n                tr.setBlockType(from, to, nodeType, attrs);\n            }\n            dispatch(tr.scrollIntoView());\n        }\n        return true;\n    };\n}\nfunction $7027fc0208e1ca62$var$markApplies(doc, ranges, type, enterAtoms) {\n    for(let i = 0; i < ranges.length; i++){\n        let { $from: $from, $to: $to } = ranges[i];\n        let can = $from.depth == 0 ? doc.inlineContent && doc.type.allowsMarkType(type) : false;\n        doc.nodesBetween($from.pos, $to.pos, (node, pos)=>{\n            if (can || !enterAtoms && node.isAtom && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos) return false;\n            can = node.inlineContent && node.type.allowsMarkType(type);\n        });\n        if (can) return true;\n    }\n    return false;\n}\nfunction $7027fc0208e1ca62$var$removeInlineAtoms(ranges) {\n    let result = [];\n    for(let i = 0; i < ranges.length; i++){\n        let { $from: $from, $to: $to } = ranges[i];\n        $from.doc.nodesBetween($from.pos, $to.pos, (node, pos)=>{\n            if (node.isAtom && node.content.size && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos) {\n                if (pos + 1 > $from.pos) result.push(new (0, $1LeRC.SelectionRange)($from, $from.doc.resolve(pos + 1)));\n                $from = $from.doc.resolve(pos + 1 + node.content.size);\n                return false;\n            }\n        });\n        if ($from.pos < $to.pos) result.push(new (0, $1LeRC.SelectionRange)($from, $to));\n    }\n    return result;\n}\n/**\nCreate a command function that toggles the given mark with the\ngiven attributes. Will return `false` when the current selection\ndoesn't support that mark. This will remove the mark if any marks\nof that type exist in the selection, or add it otherwise. If the\nselection is empty, this applies to the [stored\nmarks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks) instead of a range of the\ndocument.\n*/ function $7027fc0208e1ca62$export$797ad2667b8015a8(markType, attrs = null, options) {\n    let removeWhenPresent = (options && options.removeWhenPresent) !== false;\n    let enterAtoms = (options && options.enterInlineAtoms) !== false;\n    return function(state, dispatch) {\n        let { empty: empty, $cursor: $cursor, ranges: ranges } = state.selection;\n        if (empty && !$cursor || !$7027fc0208e1ca62$var$markApplies(state.doc, ranges, markType, enterAtoms)) return false;\n        if (dispatch) {\n            if ($cursor) {\n                if (markType.isInSet(state.storedMarks || $cursor.marks())) dispatch(state.tr.removeStoredMark(markType));\n                else dispatch(state.tr.addStoredMark(markType.create(attrs)));\n            } else {\n                let add, tr = state.tr;\n                if (!enterAtoms) ranges = $7027fc0208e1ca62$var$removeInlineAtoms(ranges);\n                if (removeWhenPresent) add = !ranges.some((r)=>state.doc.rangeHasMark(r.$from.pos, r.$to.pos, markType));\n                else add = !ranges.every((r)=>{\n                    let missing = false;\n                    tr.doc.nodesBetween(r.$from.pos, r.$to.pos, (node, pos, parent)=>{\n                        if (missing) return false;\n                        missing = !markType.isInSet(node.marks) && !!parent && parent.type.allowsMarkType(markType) && !(node.isText && /^\\s*$/.test(node.textBetween(Math.max(0, r.$from.pos - pos), Math.min(node.nodeSize, r.$to.pos - pos))));\n                    });\n                    return !missing;\n                });\n                for(let i = 0; i < ranges.length; i++){\n                    let { $from: $from, $to: $to } = ranges[i];\n                    if (!add) tr.removeMark($from.pos, $to.pos, markType);\n                    else {\n                        let from = $from.pos, to = $to.pos, start = $from.nodeAfter, end = $to.nodeBefore;\n                        let spaceStart = start && start.isText ? /^\\s*/.exec(start.text)[0].length : 0;\n                        let spaceEnd = end && end.isText ? /\\s*$/.exec(end.text)[0].length : 0;\n                        if (from + spaceStart < to) {\n                            from += spaceStart;\n                            to -= spaceEnd;\n                        }\n                        tr.addMark(from, to, markType.create(attrs));\n                    }\n                }\n                dispatch(tr.scrollIntoView());\n            }\n        }\n        return true;\n    };\n}\nfunction $7027fc0208e1ca62$var$wrapDispatchForJoin(dispatch, isJoinable) {\n    return (tr)=>{\n        if (!tr.isGeneric) return dispatch(tr);\n        let ranges = [];\n        for(let i = 0; i < tr.mapping.maps.length; i++){\n            let map = tr.mapping.maps[i];\n            for(let j = 0; j < ranges.length; j++)ranges[j] = map.map(ranges[j]);\n            map.forEach((_s, _e, from, to)=>ranges.push(from, to));\n        }\n        // Figure out which joinable points exist inside those ranges,\n        // by checking all node boundaries in their parent nodes.\n        let joinable = [];\n        for(let i = 0; i < ranges.length; i += 2){\n            let from = ranges[i], to = ranges[i + 1];\n            let $from = tr.doc.resolve(from), depth = $from.sharedDepth(to), parent = $from.node(depth);\n            for(let index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index){\n                let after = parent.maybeChild(index);\n                if (!after) break;\n                if (index && joinable.indexOf(pos) == -1) {\n                    let before = parent.child(index - 1);\n                    if (before.type == after.type && isJoinable(before, after)) joinable.push(pos);\n                }\n                pos += after.nodeSize;\n            }\n        }\n        // Join the joinable points\n        joinable.sort((a, b)=>a - b);\n        for(let i = joinable.length - 1; i >= 0; i--)if ((0, $gfgdn.canJoin)(tr.doc, joinable[i])) tr.join(joinable[i]);\n        dispatch(tr);\n    };\n}\n/**\nWrap a command so that, when it produces a transform that causes\ntwo joinable nodes to end up next to each other, those are joined.\nNodes are considered joinable when they are of the same type and\nwhen the `isJoinable` predicate returns true for them or, if an\narray of strings was passed, if their node type name is in that\narray.\n*/ function $7027fc0208e1ca62$export$29903073afddcd8b(command, isJoinable) {\n    let canJoin = Array.isArray(isJoinable) ? (node)=>isJoinable.indexOf(node.type.name) > -1 : isJoinable;\n    return (state, dispatch, view)=>command(state, dispatch && $7027fc0208e1ca62$var$wrapDispatchForJoin(dispatch, canJoin), view);\n}\n/**\nCombine a number of command functions into a single function (which\ncalls them one by one until one returns true).\n*/ function $7027fc0208e1ca62$export$146a774cdef7663a(...commands) {\n    return function(state, dispatch, view) {\n        for(let i = 0; i < commands.length; i++)if (commands[i](state, dispatch, view)) return true;\n        return false;\n    };\n}\nlet $7027fc0208e1ca62$var$backspace = $7027fc0208e1ca62$export$146a774cdef7663a($7027fc0208e1ca62$export$e9a518a637d1e641, $7027fc0208e1ca62$export$979097b097459299, $7027fc0208e1ca62$export$52b8a4af68d19794);\nlet $7027fc0208e1ca62$var$del = $7027fc0208e1ca62$export$146a774cdef7663a($7027fc0208e1ca62$export$e9a518a637d1e641, $7027fc0208e1ca62$export$bf432e340007f9ef, $7027fc0208e1ca62$export$5835b52680b80cfd);\n/**\nA basic keymap containing bindings not specific to any schema.\nBinds the following keys (when multiple commands are listed, they\nare chained with [`chainCommands`](https://prosemirror.net/docs/ref/#commands.chainCommands)):\n\n* **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock`\n* **Mod-Enter** to `exitCode`\n* **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward`\n* **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n* **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n* **Mod-a** to `selectAll`\n*/ const $7027fc0208e1ca62$export$eb36e8971b04df36 = {\n    \"Enter\": $7027fc0208e1ca62$export$146a774cdef7663a($7027fc0208e1ca62$export$a5d02b4b65e94f91, $7027fc0208e1ca62$export$d0f80ac1b4510888, $7027fc0208e1ca62$export$a3574cc681852c08, $7027fc0208e1ca62$export$e99155638ff4dff0),\n    \"Mod-Enter\": $7027fc0208e1ca62$export$634b78845598ff5b,\n    \"Backspace\": $7027fc0208e1ca62$var$backspace,\n    \"Mod-Backspace\": $7027fc0208e1ca62$var$backspace,\n    \"Shift-Backspace\": $7027fc0208e1ca62$var$backspace,\n    \"Delete\": $7027fc0208e1ca62$var$del,\n    \"Mod-Delete\": $7027fc0208e1ca62$var$del,\n    \"Mod-a\": $7027fc0208e1ca62$export$90aca4adda6ff0f5\n};\n/**\nA copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace,\n**Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and\n**Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** like\nCtrl-Delete.\n*/ const $7027fc0208e1ca62$export$f292ad8dbd5063c8 = {\n    \"Ctrl-h\": $7027fc0208e1ca62$export$eb36e8971b04df36[\"Backspace\"],\n    \"Alt-Backspace\": $7027fc0208e1ca62$export$eb36e8971b04df36[\"Mod-Backspace\"],\n    \"Ctrl-d\": $7027fc0208e1ca62$export$eb36e8971b04df36[\"Delete\"],\n    \"Ctrl-Alt-Backspace\": $7027fc0208e1ca62$export$eb36e8971b04df36[\"Mod-Delete\"],\n    \"Alt-Delete\": $7027fc0208e1ca62$export$eb36e8971b04df36[\"Mod-Delete\"],\n    \"Alt-d\": $7027fc0208e1ca62$export$eb36e8971b04df36[\"Mod-Delete\"],\n    \"Ctrl-a\": $7027fc0208e1ca62$export$c3a64f3c9604a1b1,\n    \"Ctrl-e\": $7027fc0208e1ca62$export$a66c1876556415e5\n};\nfor(let key in $7027fc0208e1ca62$export$eb36e8971b04df36)$7027fc0208e1ca62$export$f292ad8dbd5063c8[key] = $7027fc0208e1ca62$export$eb36e8971b04df36[key];\nconst $7027fc0208e1ca62$var$mac = typeof navigator != \"undefined\" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os != \"undefined\" && os.platform ? os.platform() == \"darwin\" : false;\n/**\nDepending on the detected platform, this will hold\n[`pcBasekeymap`](https://prosemirror.net/docs/ref/#commands.pcBaseKeymap) or\n[`macBaseKeymap`](https://prosemirror.net/docs/ref/#commands.macBaseKeymap).\n*/ const $7027fc0208e1ca62$export$4a0c2b85b1f0a889 = $7027fc0208e1ca62$var$mac ? $7027fc0208e1ca62$export$f292ad8dbd5063c8 : $7027fc0208e1ca62$export$eb36e8971b04df36;\n\n});\n\n\nparcelRegister(\"jP8IL\", function(module, exports) {\n$parcel$export(module.exports, \"liftListItem\", () => (parcelRequire(\"ie1jF\")).liftListItem);\n$parcel$export(module.exports, \"sinkListItem\", () => (parcelRequire(\"ie1jF\")).sinkListItem);\n$parcel$export(module.exports, \"wrapInList\", () => (parcelRequire(\"ie1jF\")).wrapInList);\n// schema-list/index.ts\nparcelRequire(\"ie1jF\");\n\n});\nparcelRegister(\"ie1jF\", function(module, exports) {\n\n$parcel$export(module.exports, \"wrapInList\", () => $d44a8e25c17a1c43$export$a8aef45c6262afee);\n$parcel$export(module.exports, \"liftListItem\", () => $d44a8e25c17a1c43$export$e74cd5adb935a538);\n$parcel$export(module.exports, \"sinkListItem\", () => $d44a8e25c17a1c43$export$dd505f850a3798a4);\n\nvar $gfgdn = parcelRequire(\"gfgdn\");\n\nvar $1krlL = parcelRequire(\"1krlL\");\n\nvar $1LeRC = parcelRequire(\"1LeRC\");\nconst $d44a8e25c17a1c43$var$olDOM = [\n    \"ol\",\n    0\n], $d44a8e25c17a1c43$var$ulDOM = [\n    \"ul\",\n    0\n], $d44a8e25c17a1c43$var$liDOM = [\n    \"li\",\n    0\n];\n/**\nAn ordered list [node spec](https://prosemirror.net/docs/ref/#model.NodeSpec). Has a single\nattribute, `order`, which determines the number at which the list\nstarts counting, and defaults to 1. Represented as an `<ol>`\nelement.\n*/ const $d44a8e25c17a1c43$export$a5dc81035676e7a = {\n    attrs: {\n        order: {\n            default: 1,\n            validate: \"number\"\n        }\n    },\n    parseDOM: [\n        {\n            tag: \"ol\",\n            getAttrs (dom) {\n                return {\n                    order: dom.hasAttribute(\"start\") ? +dom.getAttribute(\"start\") : 1\n                };\n            }\n        }\n    ],\n    toDOM (node) {\n        return node.attrs.order == 1 ? $d44a8e25c17a1c43$var$olDOM : [\n            \"ol\",\n            {\n                start: node.attrs.order\n            },\n            0\n        ];\n    }\n};\n/**\nA bullet list node spec, represented in the DOM as `<ul>`.\n*/ const $d44a8e25c17a1c43$export$a140c94e5ea26bee = {\n    parseDOM: [\n        {\n            tag: \"ul\"\n        }\n    ],\n    toDOM () {\n        return $d44a8e25c17a1c43$var$ulDOM;\n    }\n};\n/**\nA list item (`<li>`) spec.\n*/ const $d44a8e25c17a1c43$export$76c7e83ecc9cdf05 = {\n    parseDOM: [\n        {\n            tag: \"li\"\n        }\n    ],\n    toDOM () {\n        return $d44a8e25c17a1c43$var$liDOM;\n    },\n    defining: true\n};\nfunction $d44a8e25c17a1c43$var$add(obj, props) {\n    let copy = {};\n    for(let prop in obj)copy[prop] = obj[prop];\n    for(let prop in props)copy[prop] = props[prop];\n    return copy;\n}\n/**\nConvenience function for adding list-related node types to a map\nspecifying the nodes for a schema. Adds\n[`orderedList`](https://prosemirror.net/docs/ref/#schema-list.orderedList) as `\"ordered_list\"`,\n[`bulletList`](https://prosemirror.net/docs/ref/#schema-list.bulletList) as `\"bullet_list\"`, and\n[`listItem`](https://prosemirror.net/docs/ref/#schema-list.listItem) as `\"list_item\"`.\n\n`itemContent` determines the content expression for the list items.\nIf you want the commands defined in this module to apply to your\nlist structure, it should have a shape like `\"paragraph block*\"` or\n`\"paragraph (ordered_list | bullet_list)*\"`. `listGroup` can be\ngiven to assign a group name to the list node types, for example\n`\"block\"`.\n*/ function $d44a8e25c17a1c43$export$fa2e7d3d1550c2ea(nodes, itemContent, listGroup) {\n    return nodes.append({\n        ordered_list: $d44a8e25c17a1c43$var$add($d44a8e25c17a1c43$export$a5dc81035676e7a, {\n            content: \"list_item+\",\n            group: listGroup\n        }),\n        bullet_list: $d44a8e25c17a1c43$var$add($d44a8e25c17a1c43$export$a140c94e5ea26bee, {\n            content: \"list_item+\",\n            group: listGroup\n        }),\n        list_item: $d44a8e25c17a1c43$var$add($d44a8e25c17a1c43$export$76c7e83ecc9cdf05, {\n            content: itemContent\n        })\n    });\n}\n/**\nReturns a command function that wraps the selection in a list with\nthe given type an attributes. If `dispatch` is null, only return a\nvalue to indicate whether this is possible, but don't actually\nperform the change.\n*/ function $d44a8e25c17a1c43$export$a8aef45c6262afee(listType, attrs = null) {\n    return function(state, dispatch) {\n        let { $from: $from, $to: $to } = state.selection;\n        let range = $from.blockRange($to), doJoin = false, outerRange = range;\n        if (!range) return false;\n        // This is at the top of an existing list item\n        if (range.depth >= 2 && $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex == 0) {\n            // Don't do anything if this is the top of the list\n            if ($from.index(range.depth - 1) == 0) return false;\n            let $insert = state.doc.resolve(range.start - 2);\n            outerRange = new (0, $1krlL.NodeRange)($insert, $insert, range.depth);\n            if (range.endIndex < range.parent.childCount) range = new (0, $1krlL.NodeRange)($from, state.doc.resolve($to.end(range.depth)), range.depth);\n            doJoin = true;\n        }\n        let wrap = (0, $gfgdn.findWrapping)(outerRange, listType, attrs, range);\n        if (!wrap) return false;\n        if (dispatch) dispatch($d44a8e25c17a1c43$var$doWrapInList(state.tr, range, wrap, doJoin, listType).scrollIntoView());\n        return true;\n    };\n}\nfunction $d44a8e25c17a1c43$var$doWrapInList(tr, range, wrappers, joinBefore, listType) {\n    let content = (0, $1krlL.Fragment).empty;\n    for(let i = wrappers.length - 1; i >= 0; i--)content = (0, $1krlL.Fragment).from(wrappers[i].type.create(wrappers[i].attrs, content));\n    tr.step(new (0, $gfgdn.ReplaceAroundStep)(range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new (0, $1krlL.Slice)(content, 0, 0), wrappers.length, true));\n    let found = 0;\n    for(let i = 0; i < wrappers.length; i++)if (wrappers[i].type == listType) found = i + 1;\n    let splitDepth = wrappers.length - found;\n    let splitPos = range.start + wrappers.length - (joinBefore ? 2 : 0), parent = range.parent;\n    for(let i = range.startIndex, e = range.endIndex, first = true; i < e; i++, first = false){\n        if (!first && (0, $gfgdn.canSplit)(tr.doc, splitPos, splitDepth)) {\n            tr.split(splitPos, splitDepth);\n            splitPos += 2 * splitDepth;\n        }\n        splitPos += parent.child(i).nodeSize;\n    }\n    return tr;\n}\n/**\nBuild a command that splits a non-empty textblock at the top level\nof a list item by also splitting that list item.\n*/ function $d44a8e25c17a1c43$export$e920ee2eb756d384(itemType, itemAttrs) {\n    return function(state, dispatch) {\n        let { $from: $from, $to: $to, node: node } = state.selection;\n        if (node && node.isBlock || $from.depth < 2 || !$from.sameParent($to)) return false;\n        let grandParent = $from.node(-1);\n        if (grandParent.type != itemType) return false;\n        if ($from.parent.content.size == 0 && $from.node(-1).childCount == $from.indexAfter(-1)) {\n            // In an empty block. If this is a nested list, the wrapping\n            // list item should be split. Otherwise, bail out and let next\n            // command handle lifting.\n            if ($from.depth == 3 || $from.node(-3).type != itemType || $from.index(-2) != $from.node(-2).childCount - 1) return false;\n            if (dispatch) {\n                let wrap = (0, $1krlL.Fragment).empty;\n                let depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;\n                // Build a fragment containing empty versions of the structure\n                // from the outer list item to the parent node of the cursor\n                for(let d = $from.depth - depthBefore; d >= $from.depth - 3; d--)wrap = (0, $1krlL.Fragment).from($from.node(d).copy(wrap));\n                let depthAfter = $from.indexAfter(-1) < $from.node(-2).childCount ? 1 : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3;\n                // Add a second list item with an empty default start node\n                wrap = wrap.append((0, $1krlL.Fragment).from(itemType.createAndFill()));\n                let start = $from.before($from.depth - (depthBefore - 1));\n                let tr = state.tr.replace(start, $from.after(-depthAfter), new (0, $1krlL.Slice)(wrap, 4 - depthBefore, 0));\n                let sel = -1;\n                tr.doc.nodesBetween(start, tr.doc.content.size, (node, pos)=>{\n                    if (sel > -1) return false;\n                    if (node.isTextblock && node.content.size == 0) sel = pos + 1;\n                });\n                if (sel > -1) tr.setSelection((0, $1LeRC.Selection).near(tr.doc.resolve(sel)));\n                dispatch(tr.scrollIntoView());\n            }\n            return true;\n        }\n        let nextType = $to.pos == $from.end() ? grandParent.contentMatchAt(0).defaultType : null;\n        let tr = state.tr.delete($from.pos, $to.pos);\n        let types = nextType ? [\n            itemAttrs ? {\n                type: itemType,\n                attrs: itemAttrs\n            } : null,\n            {\n                type: nextType\n            }\n        ] : undefined;\n        if (!(0, $gfgdn.canSplit)(tr.doc, $from.pos, 2, types)) return false;\n        if (dispatch) dispatch(tr.split($from.pos, 2, types).scrollIntoView());\n        return true;\n    };\n}\n/**\nActs like [`splitListItem`](https://prosemirror.net/docs/ref/#schema-list.splitListItem), but\nwithout resetting the set of active marks at the cursor.\n*/ function $d44a8e25c17a1c43$export$265ad35055c66d75(itemType, itemAttrs) {\n    let split = $d44a8e25c17a1c43$export$e920ee2eb756d384(itemType, itemAttrs);\n    return (state, dispatch)=>{\n        return split(state, dispatch && ((tr)=>{\n            let marks = state.storedMarks || state.selection.$to.parentOffset && state.selection.$from.marks();\n            if (marks) tr.ensureMarks(marks);\n            dispatch(tr);\n        }));\n    };\n}\n/**\nCreate a command to lift the list item around the selection up into\na wrapping list.\n*/ function $d44a8e25c17a1c43$export$e74cd5adb935a538(itemType) {\n    return function(state, dispatch) {\n        let { $from: $from, $to: $to } = state.selection;\n        let range = $from.blockRange($to, (node)=>node.childCount > 0 && node.firstChild.type == itemType);\n        if (!range) return false;\n        if (!dispatch) return true;\n        if ($from.node(range.depth - 1).type == itemType) return $d44a8e25c17a1c43$var$liftToOuterList(state, dispatch, itemType, range);\n        else return $d44a8e25c17a1c43$var$liftOutOfList(state, dispatch, range);\n    };\n}\nfunction $d44a8e25c17a1c43$var$liftToOuterList(state, dispatch, itemType, range) {\n    let tr = state.tr, end = range.end, endOfList = range.$to.end(range.depth);\n    if (end < endOfList) {\n        // There are siblings after the lifted items, which must become\n        // children of the last item\n        tr.step(new (0, $gfgdn.ReplaceAroundStep)(end - 1, endOfList, end, endOfList, new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));\n        range = new (0, $1krlL.NodeRange)(tr.doc.resolve(range.$from.pos), tr.doc.resolve(endOfList), range.depth);\n    }\n    const target = (0, $gfgdn.liftTarget)(range);\n    if (target == null) return false;\n    tr.lift(range, target);\n    let after = tr.mapping.map(end, -1) - 1;\n    if ((0, $gfgdn.canJoin)(tr.doc, after)) tr.join(after);\n    dispatch(tr.scrollIntoView());\n    return true;\n}\nfunction $d44a8e25c17a1c43$var$liftOutOfList(state, dispatch, range) {\n    let tr = state.tr, list = range.parent;\n    // Merge the list items into a single big item\n    for(let pos = range.end, i = range.endIndex - 1, e = range.startIndex; i > e; i--){\n        pos -= list.child(i).nodeSize;\n        tr.delete(pos - 1, pos + 1);\n    }\n    let $start = tr.doc.resolve(range.start), item = $start.nodeAfter;\n    if (tr.mapping.map(range.end) != range.start + $start.nodeAfter.nodeSize) return false;\n    let atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;\n    let parent = $start.node(-1), indexBefore = $start.index(-1);\n    if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? (0, $1krlL.Fragment).empty : (0, $1krlL.Fragment).from(list)))) return false;\n    let start = $start.pos, end = start + item.nodeSize;\n    // Strip off the surrounding list. At the sides where we're not at\n    // the end of the list, the existing list is closed. At sides where\n    // this is the end, it is overwritten to its end.\n    tr.step(new (0, $gfgdn.ReplaceAroundStep)(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new (0, $1krlL.Slice)((atStart ? (0, $1krlL.Fragment).empty : (0, $1krlL.Fragment).from(list.copy((0, $1krlL.Fragment).empty))).append(atEnd ? (0, $1krlL.Fragment).empty : (0, $1krlL.Fragment).from(list.copy((0, $1krlL.Fragment).empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));\n    dispatch(tr.scrollIntoView());\n    return true;\n}\n/**\nCreate a command to sink the list item around the selection down\ninto an inner list.\n*/ function $d44a8e25c17a1c43$export$dd505f850a3798a4(itemType) {\n    return function(state, dispatch) {\n        let { $from: $from, $to: $to } = state.selection;\n        let range = $from.blockRange($to, (node)=>node.childCount > 0 && node.firstChild.type == itemType);\n        if (!range) return false;\n        let startIndex = range.startIndex;\n        if (startIndex == 0) return false;\n        let parent = range.parent, nodeBefore = parent.child(startIndex - 1);\n        if (nodeBefore.type != itemType) return false;\n        if (dispatch) {\n            let nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;\n            let inner = (0, $1krlL.Fragment).from(nestedBefore ? itemType.create() : null);\n            let slice = new (0, $1krlL.Slice)((0, $1krlL.Fragment).from(itemType.create(null, (0, $1krlL.Fragment).from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);\n            let before = range.start, after = range.end;\n            dispatch(state.tr.step(new (0, $gfgdn.ReplaceAroundStep)(before - (nestedBefore ? 3 : 1), after, before, after, slice, 1, true)).scrollIntoView());\n        }\n        return true;\n    };\n}\n\n});\n\n\n\nparcelRegister(\"kQKXt\", function(module, exports) {\n\n$parcel$export(module.exports, \"Color\", () => $f2dd16eb0ddfb1e2$export$892596cec99bc70e);\nparcelRequire(\"4ReYh\");\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * This extension allows you to color your text.\n * @see https://tiptap.dev/api/extensions/color\n */ const $f2dd16eb0ddfb1e2$export$892596cec99bc70e = (0, $gkCGf.Extension).create({\n    name: 'color',\n    addOptions () {\n        return {\n            types: [\n                'textStyle'\n            ]\n        };\n    },\n    addGlobalAttributes () {\n        return [\n            {\n                types: this.options.types,\n                attributes: {\n                    color: {\n                        default: null,\n                        parseHTML: (element)=>{\n                            var _a;\n                            return (_a = element.style.color) === null || _a === void 0 ? void 0 : _a.replace(/['\"]+/g, '');\n                        },\n                        renderHTML: (attributes)=>{\n                            if (!attributes.color) return {};\n                            return {\n                                style: `color: ${attributes.color}`\n                            };\n                        }\n                    }\n                }\n            }\n        ];\n    },\n    addCommands () {\n        return {\n            setColor: (color)=>({ chain: chain })=>{\n                    return chain().setMark('textStyle', {\n                        color: color\n                    }).run();\n                },\n            unsetColor: ()=>({ chain: chain })=>{\n                    return chain().setMark('textStyle', {\n                        color: null\n                    }).removeEmptyTextStyle().run();\n                }\n        };\n    }\n});\n\n});\nparcelRegister(\"4ReYh\", function(module, exports) {\n\n$parcel$export(module.exports, \"TextStyle\", () => $3897b9a239049a66$export$1df879243bf2e42d);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\nconst $3897b9a239049a66$var$mergeNestedSpanStyles = (element)=>{\n    if (!element.children.length) return;\n    const childSpans = element.querySelectorAll('span');\n    if (!childSpans) return;\n    childSpans.forEach((childSpan)=>{\n        var _a, _b;\n        const childStyle = childSpan.getAttribute('style');\n        const closestParentSpanStyleOfChild = (_b = (_a = childSpan.parentElement) === null || _a === void 0 ? void 0 : _a.closest('span')) === null || _b === void 0 ? void 0 : _b.getAttribute('style');\n        childSpan.setAttribute('style', `${closestParentSpanStyleOfChild};${childStyle}`);\n    });\n};\n/**\n * This extension allows you to create text styles. It is required by default\n * for the `textColor` and `backgroundColor` extensions.\n * @see https://www.tiptap.dev/api/marks/text-style\n */ const $3897b9a239049a66$export$1df879243bf2e42d = (0, $gkCGf.Mark).create({\n    name: 'textStyle',\n    priority: 101,\n    addOptions () {\n        return {\n            HTMLAttributes: {},\n            mergeNestedSpanStyles: false\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: 'span',\n                getAttrs: (element)=>{\n                    const hasStyles = element.hasAttribute('style');\n                    if (!hasStyles) return false;\n                    if (this.options.mergeNestedSpanStyles) $3897b9a239049a66$var$mergeNestedSpanStyles(element);\n                    return {};\n                }\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'span',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            removeEmptyTextStyle: ()=>({ tr: tr })=>{\n                    const { selection: selection } = tr;\n                    // Gather all of the nodes within the selection range.\n                    // We would need to go through each node individually\n                    // to check if it has any inline style attributes.\n                    // Otherwise, calling commands.unsetMark(this.name)\n                    // removes everything from all the nodes\n                    // within the selection range.\n                    tr.doc.nodesBetween(selection.from, selection.to, (node, pos)=>{\n                        // Check if it's a paragraph element, if so, skip this node as we apply\n                        // the text style to inline text nodes only (span).\n                        if (node.isTextblock) return true;\n                        // Check if the node has no inline style attributes.\n                        // Filter out non-`textStyle` marks.\n                        if (!node.marks.filter((mark)=>mark.type === this.type).some((mark)=>Object.values(mark.attrs).some((value)=>!!value))) // Proceed with the removal of the `textStyle` mark for this node only\n                        tr.removeMark(pos, pos + node.nodeSize, this.type);\n                    });\n                    return true;\n                }\n        };\n    }\n});\n\n});\n\n\nparcelRegister(\"5S5Og\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $4466808fbf16c5bf$export$39dbc3f558091353);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * Matches a highlight to a ==highlight== on input.\n */ const $4466808fbf16c5bf$export$55b9391925fcc072 = /(?:^|\\s)(==(?!\\s+==)((?:[^=]+))==(?!\\s+==))$/;\n/**\n * Matches a highlight to a ==highlight== on paste.\n */ const $4466808fbf16c5bf$export$4ed30f8936af1979 = /(?:^|\\s)(==(?!\\s+==)((?:[^=]+))==(?!\\s+==))/g;\n/**\n * This extension allows you to highlight text.\n * @see https://www.tiptap.dev/api/marks/highlight\n */ const $4466808fbf16c5bf$export$39dbc3f558091353 = (0, $gkCGf.Mark).create({\n    name: 'highlight',\n    addOptions () {\n        return {\n            multicolor: false,\n            HTMLAttributes: {}\n        };\n    },\n    addAttributes () {\n        if (!this.options.multicolor) return {};\n        return {\n            color: {\n                default: null,\n                parseHTML: (element)=>element.getAttribute('data-color') || element.style.backgroundColor,\n                renderHTML: (attributes)=>{\n                    if (!attributes.color) return {};\n                    return {\n                        'data-color': attributes.color,\n                        style: `background-color: ${attributes.color}; color: inherit`\n                    };\n                }\n            }\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: 'mark'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'mark',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            setHighlight: (attributes)=>({ commands: commands })=>{\n                    return commands.setMark(this.name, attributes);\n                },\n            toggleHighlight: (attributes)=>({ commands: commands })=>{\n                    return commands.toggleMark(this.name, attributes);\n                },\n            unsetHighlight: ()=>({ commands: commands })=>{\n                    return commands.unsetMark(this.name);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-Shift-h': ()=>this.editor.commands.toggleHighlight()\n        };\n    },\n    addInputRules () {\n        return [\n            (0, $gkCGf.markInputRule)({\n                find: $4466808fbf16c5bf$export$55b9391925fcc072,\n                type: this.type\n            })\n        ];\n    },\n    addPasteRules () {\n        return [\n            (0, $gkCGf.markPasteRule)({\n                find: $4466808fbf16c5bf$export$4ed30f8936af1979,\n                type: this.type\n            })\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"fdWb7\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $b15532edfcdf27fe$export$3e431a229df88919);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * Matches an image to a ![image](src \"title\") on input.\n */ const $b15532edfcdf27fe$export$55b9391925fcc072 = /(?:^|\\s)(!\\[(.+|:?)]\\((\\S+)(?:(?:\\s+)[\"'](\\S+)[\"'])?\\))$/;\n/**\n * This extension allows you to insert images.\n * @see https://www.tiptap.dev/api/nodes/image\n */ const $b15532edfcdf27fe$export$3e431a229df88919 = (0, $gkCGf.Node).create({\n    name: 'image',\n    addOptions () {\n        return {\n            inline: false,\n            allowBase64: false,\n            HTMLAttributes: {}\n        };\n    },\n    inline () {\n        return this.options.inline;\n    },\n    group () {\n        return this.options.inline ? 'inline' : 'block';\n    },\n    draggable: true,\n    addAttributes () {\n        return {\n            src: {\n                default: null\n            },\n            alt: {\n                default: null\n            },\n            title: {\n                default: null\n            }\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: this.options.allowBase64 ? 'img[src]' : 'img[src]:not([src^=\"data:\"])'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'img',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes)\n        ];\n    },\n    addCommands () {\n        return {\n            setImage: (options)=>({ commands: commands })=>{\n                    return commands.insertContent({\n                        type: this.name,\n                        attrs: options\n                    });\n                }\n        };\n    },\n    addInputRules () {\n        return [\n            (0, $gkCGf.nodeInputRule)({\n                find: $b15532edfcdf27fe$export$55b9391925fcc072,\n                type: this.type,\n                getAttributes: (match)=>{\n                    const [, , alt, src, title] = match;\n                    return {\n                        src: src,\n                        alt: alt,\n                        title: title\n                    };\n                }\n            })\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"a49L5\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $7541d8e7fc52594e$export$a6c7ac8248d6e38a);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n\nvar $bgi9S = parcelRequire(\"bgi9S\");\nparcelRequire(\"7fRs0\");\nvar $1LeRC = parcelRequire(\"1LeRC\");\n// From DOMPurify\n// https://github.com/cure53/DOMPurify/blob/main/src/regexp.ts\nconst $7541d8e7fc52594e$var$UNICODE_WHITESPACE_PATTERN = '[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]';\nconst $7541d8e7fc52594e$var$UNICODE_WHITESPACE_REGEX = new RegExp($7541d8e7fc52594e$var$UNICODE_WHITESPACE_PATTERN);\nconst $7541d8e7fc52594e$var$UNICODE_WHITESPACE_REGEX_END = new RegExp(`${$7541d8e7fc52594e$var$UNICODE_WHITESPACE_PATTERN}$`);\nconst $7541d8e7fc52594e$var$UNICODE_WHITESPACE_REGEX_GLOBAL = new RegExp($7541d8e7fc52594e$var$UNICODE_WHITESPACE_PATTERN, 'g');\n/**\n * Check if the provided tokens form a valid link structure, which can either be a single link token\n * or a link token surrounded by parentheses or square brackets.\n *\n * This ensures that only complete and valid text is hyperlinked, preventing cases where a valid\n * top-level domain (TLD) is immediately followed by an invalid character, like a number. For\n * example, with the `find` method from Linkify, entering `example.com1` would result in\n * `example.com` being linked and the trailing `1` left as plain text. By using the `tokenize`\n * method, we can perform more comprehensive validation on the input text.\n */ function $7541d8e7fc52594e$var$isValidLinkStructure(tokens) {\n    if (tokens.length === 1) return tokens[0].isLink;\n    if (tokens.length === 3 && tokens[1].isLink) return [\n        '()',\n        '[]'\n    ].includes(tokens[0].value + tokens[2].value);\n    return false;\n}\n/**\n * This plugin allows you to automatically add links to your editor.\n * @param options The plugin options\n * @returns The plugin instance\n */ function $7541d8e7fc52594e$var$autolink(options) {\n    return new (0, $1LeRC.Plugin)({\n        key: new (0, $1LeRC.PluginKey)('autolink'),\n        appendTransaction: (transactions, oldState, newState)=>{\n            /**\n             * Does the transaction change the document?\n             */ const docChanges = transactions.some((transaction)=>transaction.docChanged) && !oldState.doc.eq(newState.doc);\n            /**\n             * Prevent autolink if the transaction is not a document change or if the transaction has the meta `preventAutolink`.\n             */ const preventAutolink = transactions.some((transaction)=>transaction.getMeta('preventAutolink'));\n            /**\n             * Prevent autolink if the transaction is not a document change\n             * or if the transaction has the meta `preventAutolink`.\n             */ if (!docChanges || preventAutolink) return;\n            const { tr: tr } = newState;\n            const transform = (0, $gkCGf.combineTransactionSteps)(oldState.doc, [\n                ...transactions\n            ]);\n            const changes = (0, $gkCGf.getChangedRanges)(transform);\n            changes.forEach(({ newRange: newRange })=>{\n                // Now let’s see if we can add new links.\n                const nodesInChangedRanges = (0, $gkCGf.findChildrenInRange)(newState.doc, newRange, (node)=>node.isTextblock);\n                let textBlock;\n                let textBeforeWhitespace;\n                if (nodesInChangedRanges.length > 1) {\n                    // Grab the first node within the changed ranges (ex. the first of two paragraphs when hitting enter).\n                    textBlock = nodesInChangedRanges[0];\n                    textBeforeWhitespace = newState.doc.textBetween(textBlock.pos, textBlock.pos + textBlock.node.nodeSize, undefined, ' ');\n                } else if (nodesInChangedRanges.length) {\n                    const endText = newState.doc.textBetween(newRange.from, newRange.to, ' ', ' ');\n                    if (!$7541d8e7fc52594e$var$UNICODE_WHITESPACE_REGEX_END.test(endText)) return;\n                    textBlock = nodesInChangedRanges[0];\n                    textBeforeWhitespace = newState.doc.textBetween(textBlock.pos, newRange.to, undefined, ' ');\n                }\n                if (textBlock && textBeforeWhitespace) {\n                    const wordsBeforeWhitespace = textBeforeWhitespace.split($7541d8e7fc52594e$var$UNICODE_WHITESPACE_REGEX).filter(Boolean);\n                    if (wordsBeforeWhitespace.length <= 0) return false;\n                    const lastWordBeforeSpace = wordsBeforeWhitespace[wordsBeforeWhitespace.length - 1];\n                    const lastWordAndBlockOffset = textBlock.pos + textBeforeWhitespace.lastIndexOf(lastWordBeforeSpace);\n                    if (!lastWordBeforeSpace) return false;\n                    const linksBeforeSpace = (0, $bgi9S.tokenize)(lastWordBeforeSpace).map((t)=>t.toObject(options.defaultProtocol));\n                    if (!$7541d8e7fc52594e$var$isValidLinkStructure(linksBeforeSpace)) return false;\n                    linksBeforeSpace.filter((link)=>link.isLink)// Calculate link position.\n                    .map((link)=>({\n                            ...link,\n                            from: lastWordAndBlockOffset + link.start + 1,\n                            to: lastWordAndBlockOffset + link.end + 1\n                        }))// ignore link inside code mark\n                    .filter((link)=>{\n                        if (!newState.schema.marks.code) return true;\n                        return !newState.doc.rangeHasMark(link.from, link.to, newState.schema.marks.code);\n                    })// validate link\n                    .filter((link)=>options.validate(link.value))// check whether should autolink\n                    .filter((link)=>options.shouldAutoLink(link.value))// Add link mark.\n                    .forEach((link)=>{\n                        if ((0, $gkCGf.getMarksBetween)(link.from, link.to, newState.doc).some((item)=>item.mark.type === options.type)) return;\n                        tr.addMark(link.from, link.to, options.type.create({\n                            href: link.href\n                        }));\n                    });\n                }\n            });\n            if (!tr.steps.length) return;\n            return tr;\n        }\n    });\n}\nfunction $7541d8e7fc52594e$var$clickHandler(options) {\n    return new (0, $1LeRC.Plugin)({\n        key: new (0, $1LeRC.PluginKey)('handleClickLink'),\n        props: {\n            handleClick: (view, pos, event)=>{\n                var _a, _b;\n                if (event.button !== 0) return false;\n                if (!view.editable) return false;\n                let a = event.target;\n                const els = [];\n                while(a.nodeName !== 'DIV'){\n                    els.push(a);\n                    a = a.parentNode;\n                }\n                if (!els.find((value)=>value.nodeName === 'A')) return false;\n                const attrs = (0, $gkCGf.getAttributes)(view.state, options.type.name);\n                const link = event.target;\n                const href = (_a = link === null || link === void 0 ? void 0 : link.href) !== null && _a !== void 0 ? _a : attrs.href;\n                const target = (_b = link === null || link === void 0 ? void 0 : link.target) !== null && _b !== void 0 ? _b : attrs.target;\n                if (link && href) {\n                    window.open(href, target);\n                    return true;\n                }\n                return false;\n            }\n        }\n    });\n}\nfunction $7541d8e7fc52594e$var$pasteHandler(options) {\n    return new (0, $1LeRC.Plugin)({\n        key: new (0, $1LeRC.PluginKey)('handlePasteLink'),\n        props: {\n            handlePaste: (view, event, slice)=>{\n                const { state: state } = view;\n                const { selection: selection } = state;\n                const { empty: empty } = selection;\n                if (empty) return false;\n                let textContent = '';\n                slice.content.forEach((node)=>{\n                    textContent += node.textContent;\n                });\n                const link = (0, $bgi9S.find)(textContent, {\n                    defaultProtocol: options.defaultProtocol\n                }).find((item)=>item.isLink && item.value === textContent);\n                if (!textContent || !link) return false;\n                return options.editor.commands.setMark(options.type, {\n                    href: link.href\n                });\n            }\n        }\n    });\n}\nconst $7541d8e7fc52594e$export$4ed30f8936af1979 = /https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z]{2,}\\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi;\nfunction $7541d8e7fc52594e$export$7e0e3bd861dc5487(uri, protocols) {\n    const allowedProtocols = [\n        'http',\n        'https',\n        'ftp',\n        'ftps',\n        'mailto',\n        'tel',\n        'callto',\n        'sms',\n        'cid',\n        'xmpp'\n    ];\n    if (protocols) protocols.forEach((protocol)=>{\n        const nextProtocol = typeof protocol === 'string' ? protocol : protocol.scheme;\n        if (nextProtocol) allowedProtocols.push(nextProtocol);\n    });\n    return !uri || uri.replace($7541d8e7fc52594e$var$UNICODE_WHITESPACE_REGEX_GLOBAL, '').match(new RegExp(// eslint-disable-next-line no-useless-escape\n    `^(?:(?:${allowedProtocols.join('|')}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`, 'i'));\n}\n/**\n * This extension allows you to create links.\n * @see https://www.tiptap.dev/api/marks/link\n */ const $7541d8e7fc52594e$export$a6c7ac8248d6e38a = (0, $gkCGf.Mark).create({\n    name: 'link',\n    priority: 1000,\n    keepOnSplit: false,\n    exitable: true,\n    onCreate () {\n        if (this.options.validate && !this.options.shouldAutoLink) {\n            // Copy the validate function to the shouldAutoLink option\n            this.options.shouldAutoLink = this.options.validate;\n            console.warn('The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.');\n        }\n        this.options.protocols.forEach((protocol)=>{\n            if (typeof protocol === 'string') {\n                (0, $bgi9S.registerCustomProtocol)(protocol);\n                return;\n            }\n            (0, $bgi9S.registerCustomProtocol)(protocol.scheme, protocol.optionalSlashes);\n        });\n    },\n    onDestroy () {\n        (0, $bgi9S.reset)();\n    },\n    inclusive () {\n        return this.options.autolink;\n    },\n    addOptions () {\n        return {\n            openOnClick: true,\n            linkOnPaste: true,\n            autolink: true,\n            protocols: [],\n            defaultProtocol: 'http',\n            HTMLAttributes: {\n                target: '_blank',\n                rel: 'noopener noreferrer nofollow',\n                class: null\n            },\n            isAllowedUri: (url, ctx)=>!!$7541d8e7fc52594e$export$7e0e3bd861dc5487(url, ctx.protocols),\n            validate: (url)=>!!url,\n            shouldAutoLink: (url)=>!!url\n        };\n    },\n    addAttributes () {\n        return {\n            href: {\n                default: null,\n                parseHTML (element) {\n                    return element.getAttribute('href');\n                }\n            },\n            target: {\n                default: this.options.HTMLAttributes.target\n            },\n            rel: {\n                default: this.options.HTMLAttributes.rel\n            },\n            class: {\n                default: this.options.HTMLAttributes.class\n            }\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: 'a[href]',\n                getAttrs: (dom)=>{\n                    const href = dom.getAttribute('href');\n                    // prevent XSS attacks\n                    if (!href || !this.options.isAllowedUri(href, {\n                        defaultValidate: (url)=>!!$7541d8e7fc52594e$export$7e0e3bd861dc5487(url, this.options.protocols),\n                        protocols: this.options.protocols,\n                        defaultProtocol: this.options.defaultProtocol\n                    })) return false;\n                    return null;\n                }\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        // prevent XSS attacks\n        if (!this.options.isAllowedUri(HTMLAttributes.href, {\n            defaultValidate: (href)=>!!$7541d8e7fc52594e$export$7e0e3bd861dc5487(href, this.options.protocols),\n            protocols: this.options.protocols,\n            defaultProtocol: this.options.defaultProtocol\n        })) // strip out the href\n        return [\n            'a',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, {\n                ...HTMLAttributes,\n                href: ''\n            }),\n            0\n        ];\n        return [\n            'a',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            setLink: (attributes)=>({ chain: chain })=>{\n                    const { href: href } = attributes;\n                    if (!this.options.isAllowedUri(href, {\n                        defaultValidate: (url)=>!!$7541d8e7fc52594e$export$7e0e3bd861dc5487(url, this.options.protocols),\n                        protocols: this.options.protocols,\n                        defaultProtocol: this.options.defaultProtocol\n                    })) return false;\n                    return chain().setMark(this.name, attributes).setMeta('preventAutolink', true).run();\n                },\n            toggleLink: (attributes)=>({ chain: chain })=>{\n                    const { href: href } = attributes;\n                    if (!this.options.isAllowedUri(href, {\n                        defaultValidate: (url)=>!!$7541d8e7fc52594e$export$7e0e3bd861dc5487(url, this.options.protocols),\n                        protocols: this.options.protocols,\n                        defaultProtocol: this.options.defaultProtocol\n                    })) return false;\n                    return chain().toggleMark(this.name, attributes, {\n                        extendEmptyMarkRange: true\n                    }).setMeta('preventAutolink', true).run();\n                },\n            unsetLink: ()=>({ chain: chain })=>{\n                    return chain().unsetMark(this.name, {\n                        extendEmptyMarkRange: true\n                    }).setMeta('preventAutolink', true).run();\n                }\n        };\n    },\n    addPasteRules () {\n        return [\n            (0, $gkCGf.markPasteRule)({\n                find: (text)=>{\n                    const foundLinks = [];\n                    if (text) {\n                        const { protocols: protocols, defaultProtocol: defaultProtocol } = this.options;\n                        const links = (0, $bgi9S.find)(text).filter((item)=>item.isLink && this.options.isAllowedUri(item.value, {\n                                defaultValidate: (href)=>!!$7541d8e7fc52594e$export$7e0e3bd861dc5487(href, protocols),\n                                protocols: protocols,\n                                defaultProtocol: defaultProtocol\n                            }));\n                        if (links.length) links.forEach((link)=>foundLinks.push({\n                                text: link.value,\n                                data: {\n                                    href: link.href\n                                },\n                                index: link.start\n                            }));\n                    }\n                    return foundLinks;\n                },\n                type: this.type,\n                getAttributes: (match)=>{\n                    var _a;\n                    return {\n                        href: (_a = match.data) === null || _a === void 0 ? void 0 : _a.href\n                    };\n                }\n            })\n        ];\n    },\n    addProseMirrorPlugins () {\n        const plugins = [];\n        const { protocols: protocols, defaultProtocol: defaultProtocol } = this.options;\n        if (this.options.autolink) plugins.push($7541d8e7fc52594e$var$autolink({\n            type: this.type,\n            defaultProtocol: this.options.defaultProtocol,\n            validate: (url)=>this.options.isAllowedUri(url, {\n                    defaultValidate: (href)=>!!$7541d8e7fc52594e$export$7e0e3bd861dc5487(href, protocols),\n                    protocols: protocols,\n                    defaultProtocol: defaultProtocol\n                }),\n            shouldAutoLink: this.options.shouldAutoLink\n        }));\n        if (this.options.openOnClick === true) plugins.push($7541d8e7fc52594e$var$clickHandler({\n            type: this.type\n        }));\n        if (this.options.linkOnPaste) plugins.push($7541d8e7fc52594e$var$pasteHandler({\n            editor: this.editor,\n            defaultProtocol: this.options.defaultProtocol,\n            type: this.type\n        }));\n        return plugins;\n    }\n});\n\n});\nparcelRegister(\"bgi9S\", function(module, exports) {\n\n$parcel$export(module.exports, \"reset\", () => $53ad084189c41264$export$aad8462122ac592b);\n$parcel$export(module.exports, \"registerCustomProtocol\", () => $53ad084189c41264$export$821627edc2d26f5f);\n$parcel$export(module.exports, \"tokenize\", () => $53ad084189c41264$export$660b2ee2d4fb4eff);\n$parcel$export(module.exports, \"find\", () => $53ad084189c41264$export$71aa6c912b956294);\n// THIS FILE IS AUTOMATICALLY GENERATED DO NOT EDIT DIRECTLY\n// See update-tlds.js for encoding/decoding format\n// https://data.iana.org/TLD/tlds-alpha-by-domain.txt\nconst $53ad084189c41264$var$encodedTlds = \"aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2\";\n// Internationalized domain names containing non-ASCII\nconst $53ad084189c41264$var$encodedUtlds = \"\\u03B5\\u03BB1\\u03C52\\u0431\\u04331\\u0435\\u043B3\\u0434\\u0435\\u0442\\u04384\\u0435\\u044E2\\u043A\\u0430\\u0442\\u043E\\u043B\\u0438\\u043A6\\u043E\\u043C3\\u043C\\u043A\\u04342\\u043E\\u043D1\\u0441\\u043A\\u0432\\u04306\\u043E\\u043D\\u043B\\u0430\\u0439\\u043D5\\u0440\\u04333\\u0440\\u0443\\u04412\\u04442\\u0441\\u0430\\u0439\\u04423\\u0440\\u04313\\u0443\\u043A\\u04403\\u049B\\u0430\\u04373\\u0570\\u0561\\u05753\\u05D9\\u05E9\\u05E8\\u05D0\\u05DC5\\u05E7\\u05D5\\u05DD3\\u0627\\u0628\\u0648\\u0638\\u0628\\u064A5\\u0631\\u0627\\u0645\\u0643\\u06485\\u0644\\u0627\\u0631\\u062F\\u06464\\u0628\\u062D\\u0631\\u064A\\u06465\\u062C\\u0632\\u0627\\u0626\\u06315\\u0633\\u0639\\u0648\\u062F\\u064A\\u06296\\u0639\\u0644\\u064A\\u0627\\u06465\\u0645\\u063A\\u0631\\u06285\\u0645\\u0627\\u0631\\u0627\\u062A5\\u06CC\\u0631\\u0627\\u06465\\u0628\\u0627\\u0631\\u062A2\\u0632\\u0627\\u06314\\u064A\\u062A\\u06433\\u06BE\\u0627\\u0631\\u062A5\\u062A\\u0648\\u0646\\u06334\\u0633\\u0648\\u062F\\u0627\\u06463\\u0631\\u064A\\u06295\\u0634\\u0628\\u0643\\u06294\\u0639\\u0631\\u0627\\u06422\\u06282\\u0645\\u0627\\u06464\\u0641\\u0644\\u0633\\u0637\\u064A\\u06466\\u0642\\u0637\\u06313\\u0643\\u0627\\u062B\\u0648\\u0644\\u064A\\u06436\\u0648\\u06453\\u0645\\u0635\\u06312\\u0644\\u064A\\u0633\\u064A\\u06275\\u0648\\u0631\\u064A\\u062A\\u0627\\u0646\\u064A\\u06277\\u0642\\u06394\\u0647\\u0645\\u0631\\u0627\\u06475\\u067E\\u0627\\u06A9\\u0633\\u062A\\u0627\\u06467\\u0680\\u0627\\u0631\\u062A4\\u0915\\u0949\\u092E3\\u0928\\u0947\\u091F3\\u092D\\u093E\\u0930\\u09240\\u092E\\u094D3\\u094B\\u09245\\u0938\\u0902\\u0917\\u0920\\u09285\\u09AC\\u09BE\\u0982\\u09B2\\u09BE5\\u09AD\\u09BE\\u09B0\\u09A42\\u09F0\\u09A44\\u0A2D\\u0A3E\\u0A30\\u0A244\\u0AAD\\u0ABE\\u0AB0\\u0AA44\\u0B2D\\u0B3E\\u0B30\\u0B244\\u0B87\\u0BA8\\u0BCD\\u0BA4\\u0BBF\\u0BAF\\u0BBE6\\u0BB2\\u0B99\\u0BCD\\u0B95\\u0BC86\\u0B9A\\u0BBF\\u0B99\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0BC2\\u0BB0\\u0BCD11\\u0C2D\\u0C3E\\u0C30\\u0C24\\u0C4D5\\u0CAD\\u0CBE\\u0CB0\\u0CA44\\u0D2D\\u0D3E\\u0D30\\u0D24\\u0D025\\u0DBD\\u0D82\\u0D9A\\u0DCF4\\u0E04\\u0E2D\\u0E213\\u0E44\\u0E17\\u0E223\\u0EA5\\u0EB2\\u0EA73\\u10D2\\u10D42\\u307F\\u3093\\u306A3\\u30A2\\u30DE\\u30BE\\u30F34\\u30AF\\u30E9\\u30A6\\u30C94\\u30B0\\u30FC\\u30B0\\u30EB4\\u30B3\\u30E02\\u30B9\\u30C8\\u30A23\\u30BB\\u30FC\\u30EB3\\u30D5\\u30A1\\u30C3\\u30B7\\u30E7\\u30F36\\u30DD\\u30A4\\u30F3\\u30C84\\u4E16\\u754C2\\u4E2D\\u4FE11\\u56FD1\\u570B1\\u6587\\u7F513\\u4E9A\\u9A6C\\u900A3\\u4F01\\u4E1A2\\u4F5B\\u5C712\\u4FE1\\u606F2\\u5065\\u5EB72\\u516B\\u53662\\u516C\\u53F81\\u76CA2\\u53F0\\u6E7E1\\u70632\\u5546\\u57CE1\\u5E971\\u68072\\u5609\\u91CC0\\u5927\\u9152\\u5E975\\u5728\\u7EBF2\\u5927\\u62FF2\\u5929\\u4E3B\\u65593\\u5A31\\u4E502\\u5BB6\\u96FB2\\u5E7F\\u4E1C2\\u5FAE\\u535A2\\u6148\\u55842\\u6211\\u7231\\u4F603\\u624B\\u673A2\\u62DB\\u80582\\u653F\\u52A11\\u5E9C2\\u65B0\\u52A0\\u57612\\u95FB2\\u65F6\\u5C1A2\\u66F8\\u7C4D2\\u673A\\u67842\\u6DE1\\u9A6C\\u95213\\u6E38\\u620F2\\u6FB3\\u95802\\u70B9\\u770B2\\u79FB\\u52A82\\u7EC4\\u7EC7\\u673A\\u67844\\u7F51\\u57401\\u5E971\\u7AD91\\u7EDC2\\u8054\\u901A2\\u8C37\\u6B4C2\\u8D2D\\u72692\\u901A\\u8CA92\\u96C6\\u56E22\\u96FB\\u8A0A\\u76C8\\u79D14\\u98DE\\u5229\\u6D663\\u98DF\\u54C12\\u9910\\u53852\\u9999\\u683C\\u91CC\\u62C93\\u6E2F2\\uB2F7\\uB1371\\uCEF42\\uC0BC\\uC1312\\uD55C\\uAD6D2\";\n/**\n * Finite State Machine generation utilities\n */ /**\n * @template T\n * @typedef {{ [group: string]: T[] }} Collections\n */ /**\n * @typedef {{ [group: string]: true }} Flags\n */ // Keys in scanner Collections instances\nconst $53ad084189c41264$var$numeric = 'numeric';\nconst $53ad084189c41264$var$ascii = 'ascii';\nconst $53ad084189c41264$var$alpha = 'alpha';\nconst $53ad084189c41264$var$asciinumeric = 'asciinumeric';\nconst $53ad084189c41264$var$alphanumeric = 'alphanumeric';\nconst $53ad084189c41264$var$domain = 'domain';\nconst $53ad084189c41264$var$emoji = 'emoji';\nconst $53ad084189c41264$var$scheme = 'scheme';\nconst $53ad084189c41264$var$slashscheme = 'slashscheme';\nconst $53ad084189c41264$var$whitespace = 'whitespace';\n/**\n * @template T\n * @param {string} name\n * @param {Collections<T>} groups to register in\n * @returns {T[]} Current list of tokens in the given collection\n */ function $53ad084189c41264$var$registerGroup(name, groups) {\n    if (!(name in groups)) groups[name] = [];\n    return groups[name];\n}\n/**\n * @template T\n * @param {T} t token to add\n * @param {Collections<T>} groups\n * @param {Flags} flags\n */ function $53ad084189c41264$var$addToGroups(t, flags, groups) {\n    if (flags[$53ad084189c41264$var$numeric]) {\n        flags[$53ad084189c41264$var$asciinumeric] = true;\n        flags[$53ad084189c41264$var$alphanumeric] = true;\n    }\n    if (flags[$53ad084189c41264$var$ascii]) {\n        flags[$53ad084189c41264$var$asciinumeric] = true;\n        flags[$53ad084189c41264$var$alpha] = true;\n    }\n    if (flags[$53ad084189c41264$var$asciinumeric]) flags[$53ad084189c41264$var$alphanumeric] = true;\n    if (flags[$53ad084189c41264$var$alpha]) flags[$53ad084189c41264$var$alphanumeric] = true;\n    if (flags[$53ad084189c41264$var$alphanumeric]) flags[$53ad084189c41264$var$domain] = true;\n    if (flags[$53ad084189c41264$var$emoji]) flags[$53ad084189c41264$var$domain] = true;\n    for(const k in flags){\n        const group = $53ad084189c41264$var$registerGroup(k, groups);\n        if (group.indexOf(t) < 0) group.push(t);\n    }\n}\n/**\n * @template T\n * @param {T} t token to check\n * @param {Collections<T>} groups\n * @returns {Flags} group flags that contain this token\n */ function $53ad084189c41264$var$flagsForToken(t, groups) {\n    const result = {};\n    for(const c in groups)if (groups[c].indexOf(t) >= 0) result[c] = true;\n    return result;\n}\n/**\n * @template T\n * @typedef {null | T } Transition\n */ /**\n * Define a basic state machine state. j is the list of character transitions,\n * jr is the list of regex-match transitions, jd is the default state to\n * transition to t is the accepting token type, if any. If this is the terminal\n * state, then it does not emit a token.\n *\n * The template type T represents the type of the token this state accepts. This\n * should be a string (such as of the token exports in `text.js`) or a\n * MultiToken subclass (from `multi.js`)\n *\n * @template T\n * @param {T} [token] Token that this state emits\n */ function $53ad084189c41264$export$7254cc27399e90bd(token = null) {\n    // this.n = null; // DEBUG: State name\n    /** @type {{ [input: string]: State<T> }} j */ this.j = {}; // IMPLEMENTATION 1\n    // this.j = []; // IMPLEMENTATION 2\n    /** @type {[RegExp, State<T>][]} jr */ this.jr = [];\n    /** @type {?State<T>} jd */ this.jd = null;\n    /** @type {?T} t */ this.t = token;\n}\n/**\n * Scanner token groups\n * @type Collections<string>\n */ $53ad084189c41264$export$7254cc27399e90bd.groups = {};\n$53ad084189c41264$export$7254cc27399e90bd.prototype = {\n    accepts () {\n        return !!this.t;\n    },\n    /**\n   * Follow an existing transition from the given input to the next state.\n   * Does not mutate.\n   * @param {string} input character or token type to transition on\n   * @returns {?State<T>} the next state, if any\n   */ go (input) {\n        const state = this;\n        const nextState = state.j[input];\n        if (nextState) return nextState;\n        for(let i = 0; i < state.jr.length; i++){\n            const regex = state.jr[i][0];\n            const nextState = state.jr[i][1]; // note: might be empty to prevent default jump\n            if (nextState && regex.test(input)) return nextState;\n        }\n        // Nowhere left to jump! Return default, if any\n        return state.jd;\n    },\n    /**\n   * Whether the state has a transition for the given input. Set the second\n   * argument to true to only look for an exact match (and not a default or\n   * regular-expression-based transition)\n   * @param {string} input\n   * @param {boolean} exactOnly\n   */ has (input, exactOnly = false) {\n        return exactOnly ? input in this.j : !!this.go(input);\n    },\n    /**\n   * Short for \"transition all\"; create a transition from the array of items\n   * in the given list to the same final resulting state.\n   * @param {string | string[]} inputs Group of inputs to transition on\n   * @param {Transition<T> | State<T>} [next] Transition options\n   * @param {Flags} [flags] Collections flags to add token to\n   * @param {Collections<T>} [groups] Master list of token groups\n   */ ta (inputs, next, flags, groups) {\n        for(let i = 0; i < inputs.length; i++)this.tt(inputs[i], next, flags, groups);\n    },\n    /**\n   * Short for \"take regexp transition\"; defines a transition for this state\n   * when it encounters a token which matches the given regular expression\n   * @param {RegExp} regexp Regular expression transition (populate first)\n   * @param {T | State<T>} [next] Transition options\n   * @param {Flags} [flags] Collections flags to add token to\n   * @param {Collections<T>} [groups] Master list of token groups\n   * @returns {State<T>} taken after the given input\n   */ tr (regexp, next, flags, groups) {\n        groups = groups || $53ad084189c41264$export$7254cc27399e90bd.groups;\n        let nextState;\n        if (next && next.j) nextState = next;\n        else {\n            // Token with maybe token groups\n            nextState = new $53ad084189c41264$export$7254cc27399e90bd(next);\n            if (flags && groups) $53ad084189c41264$var$addToGroups(next, flags, groups);\n        }\n        this.jr.push([\n            regexp,\n            nextState\n        ]);\n        return nextState;\n    },\n    /**\n   * Short for \"take transitions\", will take as many sequential transitions as\n   * the length of the given input and returns the\n   * resulting final state.\n   * @param {string | string[]} input\n   * @param {T | State<T>} [next] Transition options\n   * @param {Flags} [flags] Collections flags to add token to\n   * @param {Collections<T>} [groups] Master list of token groups\n   * @returns {State<T>} taken after the given input\n   */ ts (input, next, flags, groups) {\n        let state = this;\n        const len = input.length;\n        if (!len) return state;\n        for(let i = 0; i < len - 1; i++)state = state.tt(input[i]);\n        return state.tt(input[len - 1], next, flags, groups);\n    },\n    /**\n   * Short for \"take transition\", this is a method for building/working with\n   * state machines.\n   *\n   * If a state already exists for the given input, returns it.\n   *\n   * If a token is specified, that state will emit that token when reached by\n   * the linkify engine.\n   *\n   * If no state exists, it will be initialized with some default transitions\n   * that resemble existing default transitions.\n   *\n   * If a state is given for the second argument, that state will be\n   * transitioned to on the given input regardless of what that input\n   * previously did.\n   *\n   * Specify a token group flags to define groups that this token belongs to.\n   * The token will be added to corresponding entires in the given groups\n   * object.\n   *\n   * @param {string} input character, token type to transition on\n   * @param {T | State<T>} [next] Transition options\n   * @param {Flags} [flags] Collections flags to add token to\n   * @param {Collections<T>} [groups] Master list of groups\n   * @returns {State<T>} taken after the given input\n   */ tt (input, next, flags, groups) {\n        groups = groups || $53ad084189c41264$export$7254cc27399e90bd.groups;\n        const state = this;\n        // Check if existing state given, just a basic transition\n        if (next && next.j) {\n            state.j[input] = next;\n            return next;\n        }\n        const t = next;\n        // Take the transition with the usual default mechanisms and use that as\n        // a template for creating the next state\n        let nextState, templateState = state.go(input);\n        if (templateState) {\n            nextState = new $53ad084189c41264$export$7254cc27399e90bd();\n            Object.assign(nextState.j, templateState.j);\n            nextState.jr.push.apply(nextState.jr, templateState.jr);\n            nextState.jd = templateState.jd;\n            nextState.t = templateState.t;\n        } else nextState = new $53ad084189c41264$export$7254cc27399e90bd();\n        if (t) {\n            // Ensure newly token is in the same groups as the old token\n            if (groups) {\n                if (nextState.t && typeof nextState.t === 'string') {\n                    const allFlags = Object.assign($53ad084189c41264$var$flagsForToken(nextState.t, groups), flags);\n                    $53ad084189c41264$var$addToGroups(t, allFlags, groups);\n                } else if (flags) $53ad084189c41264$var$addToGroups(t, flags, groups);\n            }\n            nextState.t = t; // overwrite anything that was previously there\n        }\n        state.j[input] = nextState;\n        return nextState;\n    }\n};\n// Helper functions to improve minification (not exported outside linkifyjs module)\n/**\n * @template T\n * @param {State<T>} state\n * @param {string | string[]} input\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */ const $53ad084189c41264$var$ta = (state, input, next, flags, groups)=>state.ta(input, next, flags, groups);\n/**\n * @template T\n * @param {State<T>} state\n * @param {RegExp} regexp\n * @param {T | State<T>} [next]\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */ const $53ad084189c41264$var$tr = (state, regexp, next, flags, groups)=>state.tr(regexp, next, flags, groups);\n/**\n * @template T\n * @param {State<T>} state\n * @param {string | string[]} input\n * @param {T | State<T>} [next]\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */ const $53ad084189c41264$var$ts = (state, input, next, flags, groups)=>state.ts(input, next, flags, groups);\n/**\n * @template T\n * @param {State<T>} state\n * @param {string} input\n * @param {T | State<T>} [next]\n * @param {Collections<T>} [groups]\n * @param {Flags} [flags]\n */ const $53ad084189c41264$var$tt = (state, input, next, flags, groups)=>state.tt(input, next, flags, groups);\n/******************************************************************************\nText Tokens\nIdentifiers for token outputs from the regexp scanner\n******************************************************************************/ // A valid web domain token\nconst $53ad084189c41264$var$WORD = 'WORD'; // only contains a-z\nconst $53ad084189c41264$var$UWORD = 'UWORD'; // contains letters other than a-z, used for IDN\nconst $53ad084189c41264$var$ASCIINUMERICAL = 'ASCIINUMERICAL'; // contains a-z, 0-9\nconst $53ad084189c41264$var$ALPHANUMERICAL = 'ALPHANUMERICAL'; // contains numbers and letters other than a-z, used for IDN\n// Special case of word\nconst $53ad084189c41264$var$LOCALHOST = 'LOCALHOST';\n// Valid top-level domain, special case of WORD (see tlds.js)\nconst $53ad084189c41264$var$TLD = 'TLD';\n// Valid IDN TLD, special case of UWORD (see tlds.js)\nconst $53ad084189c41264$var$UTLD = 'UTLD';\n// The scheme portion of a web URI protocol. Supported types include: `mailto`,\n// `file`, and user-defined custom protocols. Limited to schemes that contain\n// only letters\nconst $53ad084189c41264$var$SCHEME = 'SCHEME';\n// Similar to SCHEME, except makes distinction for schemes that must always be\n// followed by `://`, not just `:`. Supported types include `http`, `https`,\n// `ftp`, `ftps`\nconst $53ad084189c41264$var$SLASH_SCHEME = 'SLASH_SCHEME';\n// Any sequence of digits 0-9\nconst $53ad084189c41264$var$NUM = 'NUM';\n// Any number of consecutive whitespace characters that are not newline\nconst $53ad084189c41264$var$WS = 'WS';\n// New line (unix style)\nconst $53ad084189c41264$var$NL = 'NL'; // \\n\n// Opening/closing bracket classes\n// TODO: Rename OPEN -> LEFT and CLOSE -> RIGHT in v5 to fit with Unicode names\n// Also rename angle brackes to LESSTHAN and GREATER THAN\nconst $53ad084189c41264$var$OPENBRACE = 'OPENBRACE'; // {\nconst $53ad084189c41264$var$CLOSEBRACE = 'CLOSEBRACE'; // }\nconst $53ad084189c41264$var$OPENBRACKET = 'OPENBRACKET'; // [\nconst $53ad084189c41264$var$CLOSEBRACKET = 'CLOSEBRACKET'; // ]\nconst $53ad084189c41264$var$OPENPAREN = 'OPENPAREN'; // (\nconst $53ad084189c41264$var$CLOSEPAREN = 'CLOSEPAREN'; // )\nconst $53ad084189c41264$var$OPENANGLEBRACKET = 'OPENANGLEBRACKET'; // <\nconst $53ad084189c41264$var$CLOSEANGLEBRACKET = 'CLOSEANGLEBRACKET'; // >\nconst $53ad084189c41264$var$FULLWIDTHLEFTPAREN = 'FULLWIDTHLEFTPAREN'; // （\nconst $53ad084189c41264$var$FULLWIDTHRIGHTPAREN = 'FULLWIDTHRIGHTPAREN'; // ）\nconst $53ad084189c41264$var$LEFTCORNERBRACKET = 'LEFTCORNERBRACKET'; // 「\nconst $53ad084189c41264$var$RIGHTCORNERBRACKET = 'RIGHTCORNERBRACKET'; // 」\nconst $53ad084189c41264$var$LEFTWHITECORNERBRACKET = 'LEFTWHITECORNERBRACKET'; // 『\nconst $53ad084189c41264$var$RIGHTWHITECORNERBRACKET = 'RIGHTWHITECORNERBRACKET'; // 』\nconst $53ad084189c41264$var$FULLWIDTHLESSTHAN = 'FULLWIDTHLESSTHAN'; // ＜\nconst $53ad084189c41264$var$FULLWIDTHGREATERTHAN = 'FULLWIDTHGREATERTHAN'; // ＞\n// Various symbols\nconst $53ad084189c41264$var$AMPERSAND = 'AMPERSAND'; // &\nconst $53ad084189c41264$var$APOSTROPHE = 'APOSTROPHE'; // '\nconst $53ad084189c41264$var$ASTERISK = 'ASTERISK'; // *\nconst $53ad084189c41264$var$AT = 'AT'; // @\nconst $53ad084189c41264$var$BACKSLASH = 'BACKSLASH'; // \\\nconst $53ad084189c41264$var$BACKTICK = 'BACKTICK'; // `\nconst $53ad084189c41264$var$CARET = 'CARET'; // ^\nconst $53ad084189c41264$var$COLON = 'COLON'; // :\nconst $53ad084189c41264$var$COMMA = 'COMMA'; // ,\nconst $53ad084189c41264$var$DOLLAR = 'DOLLAR'; // $\nconst $53ad084189c41264$var$DOT = 'DOT'; // .\nconst $53ad084189c41264$var$EQUALS = 'EQUALS'; // =\nconst $53ad084189c41264$var$EXCLAMATION = 'EXCLAMATION'; // !\nconst $53ad084189c41264$var$HYPHEN = 'HYPHEN'; // -\nconst $53ad084189c41264$var$PERCENT = 'PERCENT'; // %\nconst $53ad084189c41264$var$PIPE = 'PIPE'; // |\nconst $53ad084189c41264$var$PLUS = 'PLUS'; // +\nconst $53ad084189c41264$var$POUND = 'POUND'; // #\nconst $53ad084189c41264$var$QUERY = 'QUERY'; // ?\nconst $53ad084189c41264$var$QUOTE = 'QUOTE'; // \"\nconst $53ad084189c41264$var$FULLWIDTHMIDDLEDOT = 'FULLWIDTHMIDDLEDOT'; // ・\nconst $53ad084189c41264$var$SEMI = 'SEMI'; // ;\nconst $53ad084189c41264$var$SLASH = 'SLASH'; // /\nconst $53ad084189c41264$var$TILDE = 'TILDE'; // ~\nconst $53ad084189c41264$var$UNDERSCORE = 'UNDERSCORE'; // _\n// Emoji symbol\nconst $53ad084189c41264$var$EMOJI$1 = 'EMOJI';\n// Default token - anything that is not one of the above\nconst $53ad084189c41264$var$SYM = 'SYM';\nvar $53ad084189c41264$var$tk = /*#__PURE__*/ Object.freeze({\n    __proto__: null,\n    ALPHANUMERICAL: $53ad084189c41264$var$ALPHANUMERICAL,\n    AMPERSAND: $53ad084189c41264$var$AMPERSAND,\n    APOSTROPHE: $53ad084189c41264$var$APOSTROPHE,\n    ASCIINUMERICAL: $53ad084189c41264$var$ASCIINUMERICAL,\n    ASTERISK: $53ad084189c41264$var$ASTERISK,\n    AT: $53ad084189c41264$var$AT,\n    BACKSLASH: $53ad084189c41264$var$BACKSLASH,\n    BACKTICK: $53ad084189c41264$var$BACKTICK,\n    CARET: $53ad084189c41264$var$CARET,\n    CLOSEANGLEBRACKET: $53ad084189c41264$var$CLOSEANGLEBRACKET,\n    CLOSEBRACE: $53ad084189c41264$var$CLOSEBRACE,\n    CLOSEBRACKET: $53ad084189c41264$var$CLOSEBRACKET,\n    CLOSEPAREN: $53ad084189c41264$var$CLOSEPAREN,\n    COLON: $53ad084189c41264$var$COLON,\n    COMMA: $53ad084189c41264$var$COMMA,\n    DOLLAR: $53ad084189c41264$var$DOLLAR,\n    DOT: $53ad084189c41264$var$DOT,\n    EMOJI: $53ad084189c41264$var$EMOJI$1,\n    EQUALS: $53ad084189c41264$var$EQUALS,\n    EXCLAMATION: $53ad084189c41264$var$EXCLAMATION,\n    FULLWIDTHGREATERTHAN: $53ad084189c41264$var$FULLWIDTHGREATERTHAN,\n    FULLWIDTHLEFTPAREN: $53ad084189c41264$var$FULLWIDTHLEFTPAREN,\n    FULLWIDTHLESSTHAN: $53ad084189c41264$var$FULLWIDTHLESSTHAN,\n    FULLWIDTHMIDDLEDOT: $53ad084189c41264$var$FULLWIDTHMIDDLEDOT,\n    FULLWIDTHRIGHTPAREN: $53ad084189c41264$var$FULLWIDTHRIGHTPAREN,\n    HYPHEN: $53ad084189c41264$var$HYPHEN,\n    LEFTCORNERBRACKET: $53ad084189c41264$var$LEFTCORNERBRACKET,\n    LEFTWHITECORNERBRACKET: $53ad084189c41264$var$LEFTWHITECORNERBRACKET,\n    LOCALHOST: $53ad084189c41264$var$LOCALHOST,\n    NL: $53ad084189c41264$var$NL,\n    NUM: $53ad084189c41264$var$NUM,\n    OPENANGLEBRACKET: $53ad084189c41264$var$OPENANGLEBRACKET,\n    OPENBRACE: $53ad084189c41264$var$OPENBRACE,\n    OPENBRACKET: $53ad084189c41264$var$OPENBRACKET,\n    OPENPAREN: $53ad084189c41264$var$OPENPAREN,\n    PERCENT: $53ad084189c41264$var$PERCENT,\n    PIPE: $53ad084189c41264$var$PIPE,\n    PLUS: $53ad084189c41264$var$PLUS,\n    POUND: $53ad084189c41264$var$POUND,\n    QUERY: $53ad084189c41264$var$QUERY,\n    QUOTE: $53ad084189c41264$var$QUOTE,\n    RIGHTCORNERBRACKET: $53ad084189c41264$var$RIGHTCORNERBRACKET,\n    RIGHTWHITECORNERBRACKET: $53ad084189c41264$var$RIGHTWHITECORNERBRACKET,\n    SCHEME: $53ad084189c41264$var$SCHEME,\n    SEMI: $53ad084189c41264$var$SEMI,\n    SLASH: $53ad084189c41264$var$SLASH,\n    SLASH_SCHEME: $53ad084189c41264$var$SLASH_SCHEME,\n    SYM: $53ad084189c41264$var$SYM,\n    TILDE: $53ad084189c41264$var$TILDE,\n    TLD: $53ad084189c41264$var$TLD,\n    UNDERSCORE: $53ad084189c41264$var$UNDERSCORE,\n    UTLD: $53ad084189c41264$var$UTLD,\n    UWORD: $53ad084189c41264$var$UWORD,\n    WORD: $53ad084189c41264$var$WORD,\n    WS: $53ad084189c41264$var$WS\n});\n// Note that these two Unicode ones expand into a really big one with Babel\nconst $53ad084189c41264$var$ASCII_LETTER = /[a-z]/;\nconst $53ad084189c41264$var$LETTER = /\\p{L}/u; // Any Unicode character with letter data type\nconst $53ad084189c41264$var$EMOJI = /\\p{Emoji}/u; // Any Unicode emoji character\nconst $53ad084189c41264$var$EMOJI_VARIATION$1 = /\\ufe0f/;\nconst $53ad084189c41264$var$DIGIT = /\\d/;\nconst $53ad084189c41264$var$SPACE = /\\s/;\nvar $53ad084189c41264$export$efdc1e5bdb609bb = /*#__PURE__*/ Object.freeze({\n    __proto__: null,\n    ASCII_LETTER: $53ad084189c41264$var$ASCII_LETTER,\n    DIGIT: $53ad084189c41264$var$DIGIT,\n    EMOJI: $53ad084189c41264$var$EMOJI,\n    EMOJI_VARIATION: $53ad084189c41264$var$EMOJI_VARIATION$1,\n    LETTER: $53ad084189c41264$var$LETTER,\n    SPACE: $53ad084189c41264$var$SPACE\n});\n/**\n\tThe scanner provides an interface that takes a string of text as input, and\n\toutputs an array of tokens instances that can be used for easy URL parsing.\n*/ const $53ad084189c41264$var$CR = '\\r'; // carriage-return character\nconst $53ad084189c41264$var$LF = '\\n'; // line-feed character\nconst $53ad084189c41264$var$EMOJI_VARIATION = '\\ufe0f'; // Variation selector, follows heart and others\nconst $53ad084189c41264$var$EMOJI_JOINER = '\\u200d'; // zero-width joiner\nconst $53ad084189c41264$var$OBJECT_REPLACEMENT = '\\ufffc'; // whitespace placeholder that sometimes appears in rich text editors\nlet $53ad084189c41264$var$tlds = null, $53ad084189c41264$var$utlds = null; // don't change so only have to be computed once\n/**\n * Scanner output token:\n * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD')\n * - `v` is the value of the token (e.g., '123', '❤️', 'com')\n * - `s` is the start index of the token in the original string\n * - `e` is the end index of the token in the original string\n * @typedef {{t: string, v: string, s: number, e: number}} Token\n */ /**\n * @template T\n * @typedef {{ [collection: string]: T[] }} Collections\n */ /**\n * Initialize the scanner character-based state machine for the given start\n * state\n * @param {[string, boolean][]} customSchemes List of custom schemes, where each\n * item is a length-2 tuple with the first element set to the string scheme, and\n * the second element set to `true` if the `://` after the scheme is optional\n */ function $53ad084189c41264$var$init$2(customSchemes = []) {\n    // Frequently used states (name argument removed during minification)\n    /** @type Collections<string> */ const groups = {}; // of tokens\n    $53ad084189c41264$export$7254cc27399e90bd.groups = groups;\n    /** @type State<string> */ const Start = new $53ad084189c41264$export$7254cc27399e90bd();\n    if ($53ad084189c41264$var$tlds == null) $53ad084189c41264$var$tlds = $53ad084189c41264$var$decodeTlds($53ad084189c41264$var$encodedTlds);\n    if ($53ad084189c41264$var$utlds == null) $53ad084189c41264$var$utlds = $53ad084189c41264$var$decodeTlds($53ad084189c41264$var$encodedUtlds);\n    // States for special URL symbols that accept immediately after start\n    $53ad084189c41264$var$tt(Start, \"'\", $53ad084189c41264$var$APOSTROPHE);\n    $53ad084189c41264$var$tt(Start, '{', $53ad084189c41264$var$OPENBRACE);\n    $53ad084189c41264$var$tt(Start, '}', $53ad084189c41264$var$CLOSEBRACE);\n    $53ad084189c41264$var$tt(Start, '[', $53ad084189c41264$var$OPENBRACKET);\n    $53ad084189c41264$var$tt(Start, ']', $53ad084189c41264$var$CLOSEBRACKET);\n    $53ad084189c41264$var$tt(Start, '(', $53ad084189c41264$var$OPENPAREN);\n    $53ad084189c41264$var$tt(Start, ')', $53ad084189c41264$var$CLOSEPAREN);\n    $53ad084189c41264$var$tt(Start, '<', $53ad084189c41264$var$OPENANGLEBRACKET);\n    $53ad084189c41264$var$tt(Start, '>', $53ad084189c41264$var$CLOSEANGLEBRACKET);\n    $53ad084189c41264$var$tt(Start, \"\\uFF08\", $53ad084189c41264$var$FULLWIDTHLEFTPAREN);\n    $53ad084189c41264$var$tt(Start, \"\\uFF09\", $53ad084189c41264$var$FULLWIDTHRIGHTPAREN);\n    $53ad084189c41264$var$tt(Start, \"\\u300C\", $53ad084189c41264$var$LEFTCORNERBRACKET);\n    $53ad084189c41264$var$tt(Start, \"\\u300D\", $53ad084189c41264$var$RIGHTCORNERBRACKET);\n    $53ad084189c41264$var$tt(Start, \"\\u300E\", $53ad084189c41264$var$LEFTWHITECORNERBRACKET);\n    $53ad084189c41264$var$tt(Start, \"\\u300F\", $53ad084189c41264$var$RIGHTWHITECORNERBRACKET);\n    $53ad084189c41264$var$tt(Start, \"\\uFF1C\", $53ad084189c41264$var$FULLWIDTHLESSTHAN);\n    $53ad084189c41264$var$tt(Start, \"\\uFF1E\", $53ad084189c41264$var$FULLWIDTHGREATERTHAN);\n    $53ad084189c41264$var$tt(Start, '&', $53ad084189c41264$var$AMPERSAND);\n    $53ad084189c41264$var$tt(Start, '*', $53ad084189c41264$var$ASTERISK);\n    $53ad084189c41264$var$tt(Start, '@', $53ad084189c41264$var$AT);\n    $53ad084189c41264$var$tt(Start, '`', $53ad084189c41264$var$BACKTICK);\n    $53ad084189c41264$var$tt(Start, '^', $53ad084189c41264$var$CARET);\n    $53ad084189c41264$var$tt(Start, ':', $53ad084189c41264$var$COLON);\n    $53ad084189c41264$var$tt(Start, ',', $53ad084189c41264$var$COMMA);\n    $53ad084189c41264$var$tt(Start, '$', $53ad084189c41264$var$DOLLAR);\n    $53ad084189c41264$var$tt(Start, '.', $53ad084189c41264$var$DOT);\n    $53ad084189c41264$var$tt(Start, '=', $53ad084189c41264$var$EQUALS);\n    $53ad084189c41264$var$tt(Start, '!', $53ad084189c41264$var$EXCLAMATION);\n    $53ad084189c41264$var$tt(Start, '-', $53ad084189c41264$var$HYPHEN);\n    $53ad084189c41264$var$tt(Start, '%', $53ad084189c41264$var$PERCENT);\n    $53ad084189c41264$var$tt(Start, '|', $53ad084189c41264$var$PIPE);\n    $53ad084189c41264$var$tt(Start, '+', $53ad084189c41264$var$PLUS);\n    $53ad084189c41264$var$tt(Start, '#', $53ad084189c41264$var$POUND);\n    $53ad084189c41264$var$tt(Start, '?', $53ad084189c41264$var$QUERY);\n    $53ad084189c41264$var$tt(Start, '\"', $53ad084189c41264$var$QUOTE);\n    $53ad084189c41264$var$tt(Start, '/', $53ad084189c41264$var$SLASH);\n    $53ad084189c41264$var$tt(Start, ';', $53ad084189c41264$var$SEMI);\n    $53ad084189c41264$var$tt(Start, '~', $53ad084189c41264$var$TILDE);\n    $53ad084189c41264$var$tt(Start, '_', $53ad084189c41264$var$UNDERSCORE);\n    $53ad084189c41264$var$tt(Start, '\\\\', $53ad084189c41264$var$BACKSLASH);\n    $53ad084189c41264$var$tt(Start, \"\\u30FB\", $53ad084189c41264$var$FULLWIDTHMIDDLEDOT);\n    const Num = $53ad084189c41264$var$tr(Start, $53ad084189c41264$var$DIGIT, $53ad084189c41264$var$NUM, {\n        [$53ad084189c41264$var$numeric]: true\n    });\n    $53ad084189c41264$var$tr(Num, $53ad084189c41264$var$DIGIT, Num);\n    const Asciinumeric = $53ad084189c41264$var$tr(Num, $53ad084189c41264$var$ASCII_LETTER, $53ad084189c41264$var$ASCIINUMERICAL, {\n        [$53ad084189c41264$var$asciinumeric]: true\n    });\n    const Alphanumeric = $53ad084189c41264$var$tr(Num, $53ad084189c41264$var$LETTER, $53ad084189c41264$var$ALPHANUMERICAL, {\n        [$53ad084189c41264$var$alphanumeric]: true\n    });\n    // State which emits a word token\n    const Word = $53ad084189c41264$var$tr(Start, $53ad084189c41264$var$ASCII_LETTER, $53ad084189c41264$var$WORD, {\n        [$53ad084189c41264$var$ascii]: true\n    });\n    $53ad084189c41264$var$tr(Word, $53ad084189c41264$var$DIGIT, Asciinumeric);\n    $53ad084189c41264$var$tr(Word, $53ad084189c41264$var$ASCII_LETTER, Word);\n    $53ad084189c41264$var$tr(Asciinumeric, $53ad084189c41264$var$DIGIT, Asciinumeric);\n    $53ad084189c41264$var$tr(Asciinumeric, $53ad084189c41264$var$ASCII_LETTER, Asciinumeric);\n    // Same as previous, but specific to non-fsm.ascii alphabet words\n    const UWord = $53ad084189c41264$var$tr(Start, $53ad084189c41264$var$LETTER, $53ad084189c41264$var$UWORD, {\n        [$53ad084189c41264$var$alpha]: true\n    });\n    $53ad084189c41264$var$tr(UWord, $53ad084189c41264$var$ASCII_LETTER); // Non-accepting\n    $53ad084189c41264$var$tr(UWord, $53ad084189c41264$var$DIGIT, Alphanumeric);\n    $53ad084189c41264$var$tr(UWord, $53ad084189c41264$var$LETTER, UWord);\n    $53ad084189c41264$var$tr(Alphanumeric, $53ad084189c41264$var$DIGIT, Alphanumeric);\n    $53ad084189c41264$var$tr(Alphanumeric, $53ad084189c41264$var$ASCII_LETTER); // Non-accepting\n    $53ad084189c41264$var$tr(Alphanumeric, $53ad084189c41264$var$LETTER, Alphanumeric); // Non-accepting\n    // Whitespace jumps\n    // Tokens of only non-newline whitespace are arbitrarily long\n    // If any whitespace except newline, more whitespace!\n    const Nl = $53ad084189c41264$var$tt(Start, $53ad084189c41264$var$LF, $53ad084189c41264$var$NL, {\n        [$53ad084189c41264$var$whitespace]: true\n    });\n    const Cr = $53ad084189c41264$var$tt(Start, $53ad084189c41264$var$CR, $53ad084189c41264$var$WS, {\n        [$53ad084189c41264$var$whitespace]: true\n    });\n    const Ws = $53ad084189c41264$var$tr(Start, $53ad084189c41264$var$SPACE, $53ad084189c41264$var$WS, {\n        [$53ad084189c41264$var$whitespace]: true\n    });\n    $53ad084189c41264$var$tt(Start, $53ad084189c41264$var$OBJECT_REPLACEMENT, Ws);\n    $53ad084189c41264$var$tt(Cr, $53ad084189c41264$var$LF, Nl); // \\r\\n\n    $53ad084189c41264$var$tt(Cr, $53ad084189c41264$var$OBJECT_REPLACEMENT, Ws);\n    $53ad084189c41264$var$tr(Cr, $53ad084189c41264$var$SPACE, Ws);\n    $53ad084189c41264$var$tt(Ws, $53ad084189c41264$var$CR); // non-accepting state to avoid mixing whitespaces\n    $53ad084189c41264$var$tt(Ws, $53ad084189c41264$var$LF); // non-accepting state to avoid mixing whitespaces\n    $53ad084189c41264$var$tr(Ws, $53ad084189c41264$var$SPACE, Ws);\n    $53ad084189c41264$var$tt(Ws, $53ad084189c41264$var$OBJECT_REPLACEMENT, Ws);\n    // Emoji tokens. They are not grouped by the scanner except in cases where a\n    // zero-width joiner is present\n    const Emoji = $53ad084189c41264$var$tr(Start, $53ad084189c41264$var$EMOJI, $53ad084189c41264$var$EMOJI$1, {\n        [$53ad084189c41264$var$emoji]: true\n    });\n    $53ad084189c41264$var$tt(Emoji, '#'); // no transition, emoji regex seems to match #\n    $53ad084189c41264$var$tr(Emoji, $53ad084189c41264$var$EMOJI, Emoji);\n    $53ad084189c41264$var$tt(Emoji, $53ad084189c41264$var$EMOJI_VARIATION, Emoji);\n    // tt(Start, EMOJI_VARIATION, Emoji); // This one is sketchy\n    const EmojiJoiner = $53ad084189c41264$var$tt(Emoji, $53ad084189c41264$var$EMOJI_JOINER);\n    $53ad084189c41264$var$tt(EmojiJoiner, '#');\n    $53ad084189c41264$var$tr(EmojiJoiner, $53ad084189c41264$var$EMOJI, Emoji);\n    // tt(EmojiJoiner, EMOJI_VARIATION, Emoji); // also sketchy\n    // Generates states for top-level domains\n    // Note that this is most accurate when tlds are in alphabetical order\n    const wordjr = [\n        [\n            $53ad084189c41264$var$ASCII_LETTER,\n            Word\n        ],\n        [\n            $53ad084189c41264$var$DIGIT,\n            Asciinumeric\n        ]\n    ];\n    const uwordjr = [\n        [\n            $53ad084189c41264$var$ASCII_LETTER,\n            null\n        ],\n        [\n            $53ad084189c41264$var$LETTER,\n            UWord\n        ],\n        [\n            $53ad084189c41264$var$DIGIT,\n            Alphanumeric\n        ]\n    ];\n    for(let i = 0; i < $53ad084189c41264$var$tlds.length; i++)$53ad084189c41264$var$fastts(Start, $53ad084189c41264$var$tlds[i], $53ad084189c41264$var$TLD, $53ad084189c41264$var$WORD, wordjr);\n    for(let i = 0; i < $53ad084189c41264$var$utlds.length; i++)$53ad084189c41264$var$fastts(Start, $53ad084189c41264$var$utlds[i], $53ad084189c41264$var$UTLD, $53ad084189c41264$var$UWORD, uwordjr);\n    $53ad084189c41264$var$addToGroups($53ad084189c41264$var$TLD, {\n        tld: true,\n        ascii: true\n    }, groups);\n    $53ad084189c41264$var$addToGroups($53ad084189c41264$var$UTLD, {\n        utld: true,\n        alpha: true\n    }, groups);\n    // Collect the states generated by different protocols. NOTE: If any new TLDs\n    // get added that are also protocols, set the token to be the same as the\n    // protocol to ensure parsing works as expected.\n    $53ad084189c41264$var$fastts(Start, 'file', $53ad084189c41264$var$SCHEME, $53ad084189c41264$var$WORD, wordjr);\n    $53ad084189c41264$var$fastts(Start, 'mailto', $53ad084189c41264$var$SCHEME, $53ad084189c41264$var$WORD, wordjr);\n    $53ad084189c41264$var$fastts(Start, 'http', $53ad084189c41264$var$SLASH_SCHEME, $53ad084189c41264$var$WORD, wordjr);\n    $53ad084189c41264$var$fastts(Start, 'https', $53ad084189c41264$var$SLASH_SCHEME, $53ad084189c41264$var$WORD, wordjr);\n    $53ad084189c41264$var$fastts(Start, 'ftp', $53ad084189c41264$var$SLASH_SCHEME, $53ad084189c41264$var$WORD, wordjr);\n    $53ad084189c41264$var$fastts(Start, 'ftps', $53ad084189c41264$var$SLASH_SCHEME, $53ad084189c41264$var$WORD, wordjr);\n    $53ad084189c41264$var$addToGroups($53ad084189c41264$var$SCHEME, {\n        scheme: true,\n        ascii: true\n    }, groups);\n    $53ad084189c41264$var$addToGroups($53ad084189c41264$var$SLASH_SCHEME, {\n        slashscheme: true,\n        ascii: true\n    }, groups);\n    // Register custom schemes. Assumes each scheme is asciinumeric with hyphens\n    customSchemes = customSchemes.sort((a, b)=>a[0] > b[0] ? 1 : -1);\n    for(let i = 0; i < customSchemes.length; i++){\n        const sch = customSchemes[i][0];\n        const optionalSlashSlash = customSchemes[i][1];\n        const flags = optionalSlashSlash ? {\n            [$53ad084189c41264$var$scheme]: true\n        } : {\n            [$53ad084189c41264$var$slashscheme]: true\n        };\n        if (sch.indexOf('-') >= 0) flags[$53ad084189c41264$var$domain] = true;\n        else if (!$53ad084189c41264$var$ASCII_LETTER.test(sch)) flags[$53ad084189c41264$var$numeric] = true; // numbers only\n        else if ($53ad084189c41264$var$DIGIT.test(sch)) flags[$53ad084189c41264$var$asciinumeric] = true;\n        else flags[$53ad084189c41264$var$ascii] = true;\n        $53ad084189c41264$var$ts(Start, sch, sch, flags);\n    }\n    // Localhost token\n    $53ad084189c41264$var$ts(Start, 'localhost', $53ad084189c41264$var$LOCALHOST, {\n        ascii: true\n    });\n    // Set default transition for start state (some symbol)\n    Start.jd = new $53ad084189c41264$export$7254cc27399e90bd($53ad084189c41264$var$SYM);\n    return {\n        start: Start,\n        tokens: Object.assign({\n            groups: groups\n        }, $53ad084189c41264$var$tk)\n    };\n}\n/**\n\tGiven a string, returns an array of TOKEN instances representing the\n\tcomposition of that string.\n\n\t@method run\n\t@param {State<string>} start scanner starting state\n\t@param {string} str input string to scan\n\t@return {Token[]} list of tokens, each with a type and value\n*/ function $53ad084189c41264$var$run$1(start, str) {\n    // State machine is not case sensitive, so input is tokenized in lowercased\n    // form (still returns regular case). Uses selective `toLowerCase` because\n    // lowercasing the entire string causes the length and character position to\n    // vary in some non-English strings with V8-based runtimes.\n    const iterable = $53ad084189c41264$export$b9ca061da17f2d30(str.replace(/[A-Z]/g, (c)=>c.toLowerCase()));\n    const charCount = iterable.length; // <= len if there are emojis, etc\n    const tokens = []; // return value\n    // cursor through the string itself, accounting for characters that have\n    // width with length 2 such as emojis\n    let cursor = 0;\n    // Cursor through the array-representation of the string\n    let charCursor = 0;\n    // Tokenize the string\n    while(charCursor < charCount){\n        let state = start;\n        let nextState = null;\n        let tokenLength = 0;\n        let latestAccepting = null;\n        let sinceAccepts = -1;\n        let charsSinceAccepts = -1;\n        while(charCursor < charCount && (nextState = state.go(iterable[charCursor]))){\n            state = nextState;\n            // Keep track of the latest accepting state\n            if (state.accepts()) {\n                sinceAccepts = 0;\n                charsSinceAccepts = 0;\n                latestAccepting = state;\n            } else if (sinceAccepts >= 0) {\n                sinceAccepts += iterable[charCursor].length;\n                charsSinceAccepts++;\n            }\n            tokenLength += iterable[charCursor].length;\n            cursor += iterable[charCursor].length;\n            charCursor++;\n        }\n        // Roll back to the latest accepting state\n        cursor -= sinceAccepts;\n        charCursor -= charsSinceAccepts;\n        tokenLength -= sinceAccepts;\n        // No more jumps, just make a new token from the last accepting one\n        tokens.push({\n            t: latestAccepting.t,\n            // token type/name\n            v: str.slice(cursor - tokenLength, cursor),\n            // string value\n            s: cursor - tokenLength,\n            // start index\n            e: cursor // end index (excluding)\n        });\n    }\n    return tokens;\n}\n/**\n * Convert a String to an Array of characters, taking into account that some\n * characters like emojis take up two string indexes.\n *\n * Adapted from core-js (MIT license)\n * https://github.com/zloirock/core-js/blob/2d69cf5f99ab3ea3463c395df81e5a15b68f49d9/packages/core-js/internals/string-multibyte.js\n *\n * @function stringToArray\n * @param {string} str\n * @returns {string[]}\n */ function $53ad084189c41264$export$b9ca061da17f2d30(str) {\n    const result = [];\n    const len = str.length;\n    let index = 0;\n    while(index < len){\n        let first = str.charCodeAt(index);\n        let second;\n        let char = first < 0xd800 || first > 0xdbff || index + 1 === len || (second = str.charCodeAt(index + 1)) < 0xdc00 || second > 0xdfff ? str[index] // single character\n         : str.slice(index, index + 2); // two-index characters\n        result.push(char);\n        index += char.length;\n    }\n    return result;\n}\n/**\n * Fast version of ts function for when transition defaults are well known\n * @param {State<string>} state\n * @param {string} input\n * @param {string} t\n * @param {string} defaultt\n * @param {[RegExp, State<string>][]} jr\n * @returns {State<string>}\n */ function $53ad084189c41264$var$fastts(state, input, t, defaultt, jr) {\n    let next;\n    const len = input.length;\n    for(let i = 0; i < len - 1; i++){\n        const char = input[i];\n        if (state.j[char]) next = state.j[char];\n        else {\n            next = new $53ad084189c41264$export$7254cc27399e90bd(defaultt);\n            next.jr = jr.slice();\n            state.j[char] = next;\n        }\n        state = next;\n    }\n    next = new $53ad084189c41264$export$7254cc27399e90bd(t);\n    next.jr = jr.slice();\n    state.j[input[len - 1]] = next;\n    return next;\n}\n/**\n * Converts a string of Top-Level Domain names encoded in update-tlds.js back\n * into a list of strings.\n * @param {str} encoded encoded TLDs string\n * @returns {str[]} original TLDs list\n */ function $53ad084189c41264$var$decodeTlds(encoded) {\n    const words = [];\n    const stack = [];\n    let i = 0;\n    let digits = '0123456789';\n    while(i < encoded.length){\n        let popDigitCount = 0;\n        while(digits.indexOf(encoded[i + popDigitCount]) >= 0)popDigitCount++; // encountered some digits, have to pop to go one level up trie\n        if (popDigitCount > 0) {\n            words.push(stack.join('')); // whatever preceded the pop digits must be a word\n            for(let popCount = parseInt(encoded.substring(i, i + popDigitCount), 10); popCount > 0; popCount--)stack.pop();\n            i += popDigitCount;\n        } else {\n            stack.push(encoded[i]); // drop down a level into the trie\n            i++;\n        }\n    }\n    return words;\n}\n/**\n * An object where each key is a valid DOM Event Name such as `click` or `focus`\n * and each value is an event handler function.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/Element#events\n * @typedef {?{ [event: string]: Function }} EventListeners\n */ /**\n * All formatted properties required to render a link, including `tagName`,\n * `attributes`, `content` and `eventListeners`.\n * @typedef {{ tagName: any, attributes: {[attr: string]: any}, content: string,\n * eventListeners: EventListeners }} IntermediateRepresentation\n */ /**\n * Specify either an object described by the template type `O` or a function.\n *\n * The function takes a string value (usually the link's href attribute), the\n * link type (`'url'`, `'hashtag`', etc.) and an internal token representation\n * of the link. It should return an object of the template type `O`\n * @template O\n * @typedef {O | ((value: string, type: string, token: MultiToken) => O)} OptObj\n */ /**\n * Specify either a function described by template type `F` or an object.\n *\n * Each key in the object should be a link type (`'url'`, `'hashtag`', etc.). Each\n * value should be a function with template type `F` that is called when the\n * corresponding link type is encountered.\n * @template F\n * @typedef {F | { [type: string]: F}} OptFn\n */ /**\n * Specify either a value with template type `V`, a function that returns `V` or\n * an object where each value resolves to `V`.\n *\n * The function takes a string value (usually the link's href attribute), the\n * link type (`'url'`, `'hashtag`', etc.) and an internal token representation\n * of the link. It should return an object of the template type `V`\n *\n * For the object, each key should be a link type (`'url'`, `'hashtag`', etc.).\n * Each value should either have type `V` or a function that returns V. This\n * function similarly takes a string value and a token.\n *\n * Example valid types for `Opt<string>`:\n *\n * ```js\n * 'hello'\n * (value, type, token) => 'world'\n * { url: 'hello', email: (value, token) => 'world'}\n * ```\n * @template V\n * @typedef {V | ((value: string, type: string, token: MultiToken) => V) | { [type: string]: V | ((value: string, token: MultiToken) => V) }} Opt\n */ /**\n * See available options: https://linkify.js.org/docs/options.html\n * @typedef {{\n * \tdefaultProtocol?: string,\n *  events?: OptObj<EventListeners>,\n * \tformat?: Opt<string>,\n * \tformatHref?: Opt<string>,\n * \tnl2br?: boolean,\n * \ttagName?: Opt<any>,\n * \ttarget?: Opt<string>,\n * \trel?: Opt<string>,\n * \tvalidate?: Opt<boolean>,\n * \ttruncate?: Opt<number>,\n * \tclassName?: Opt<string>,\n * \tattributes?: OptObj<({ [attr: string]: any })>,\n *  ignoreTags?: string[],\n * \trender?: OptFn<((ir: IntermediateRepresentation) => any)>\n * }} Opts\n */ /**\n * @type Required<Opts>\n */ const $53ad084189c41264$var$defaults = {\n    defaultProtocol: 'http',\n    events: null,\n    format: $53ad084189c41264$var$noop,\n    formatHref: $53ad084189c41264$var$noop,\n    nl2br: false,\n    tagName: 'a',\n    target: null,\n    rel: null,\n    validate: true,\n    truncate: Infinity,\n    className: null,\n    attributes: null,\n    ignoreTags: [],\n    render: null\n};\n/**\n * Utility class for linkify interfaces to apply specified\n * {@link Opts formatting and rendering options}.\n *\n * @param {Opts | Options} [opts] Option value overrides.\n * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For\n *   internal use) default render function that determines how to generate an\n *   HTML element based on a link token's derived tagName, attributes and HTML.\n *   Similar to render option\n */ function $53ad084189c41264$export$c019608e5b5bb4cb(opts, defaultRender = null) {\n    let o = Object.assign({}, $53ad084189c41264$var$defaults);\n    if (opts) o = Object.assign(o, opts instanceof $53ad084189c41264$export$c019608e5b5bb4cb ? opts.o : opts);\n    // Ensure all ignored tags are uppercase\n    const ignoredTags = o.ignoreTags;\n    const uppercaseIgnoredTags = [];\n    for(let i = 0; i < ignoredTags.length; i++)uppercaseIgnoredTags.push(ignoredTags[i].toUpperCase());\n    /** @protected */ this.o = o;\n    if (defaultRender) this.defaultRender = defaultRender;\n    this.ignoreTags = uppercaseIgnoredTags;\n}\n$53ad084189c41264$export$c019608e5b5bb4cb.prototype = {\n    o: $53ad084189c41264$var$defaults,\n    /**\n   * @type string[]\n   */ ignoreTags: [],\n    /**\n   * @param {IntermediateRepresentation} ir\n   * @returns {any}\n   */ defaultRender (ir) {\n        return ir;\n    },\n    /**\n   * Returns true or false based on whether a token should be displayed as a\n   * link based on the user options.\n   * @param {MultiToken} token\n   * @returns {boolean}\n   */ check (token) {\n        return this.get('validate', token.toString(), token);\n    },\n    // Private methods\n    /**\n   * Resolve an option's value based on the value of the option and the given\n   * params. If operator and token are specified and the target option is\n   * callable, automatically calls the function with the given argument.\n   * @template {keyof Opts} K\n   * @param {K} key Name of option to use\n   * @param {string} [operator] will be passed to the target option if it's a\n   * function. If not specified, RAW function value gets returned\n   * @param {MultiToken} [token] The token from linkify.tokenize\n   * @returns {Opts[K] | any}\n   */ get (key, operator, token) {\n        const isCallable = operator != null;\n        let option = this.o[key];\n        if (!option) return option;\n        if (typeof option === 'object') {\n            option = token.t in option ? option[token.t] : $53ad084189c41264$var$defaults[key];\n            if (typeof option === 'function' && isCallable) option = option(operator, token);\n        } else if (typeof option === 'function' && isCallable) option = option(operator, token.t, token);\n        return option;\n    },\n    /**\n   * @template {keyof Opts} L\n   * @param {L} key Name of options object to use\n   * @param {string} [operator]\n   * @param {MultiToken} [token]\n   * @returns {Opts[L] | any}\n   */ getObj (key, operator, token) {\n        let obj = this.o[key];\n        if (typeof obj === 'function' && operator != null) obj = obj(operator, token.t, token);\n        return obj;\n    },\n    /**\n   * Convert the given token to a rendered element that may be added to the\n   * calling-interface's DOM\n   * @param {MultiToken} token Token to render to an HTML element\n   * @returns {any} Render result; e.g., HTML string, DOM element, React\n   *   Component, etc.\n   */ render (token) {\n        const ir = token.render(this); // intermediate representation\n        const renderFn = this.get('render', null, token) || this.defaultRender;\n        return renderFn(ir, token.t, token);\n    }\n};\nfunction $53ad084189c41264$var$noop(val) {\n    return val;\n}\nvar $53ad084189c41264$export$41c562ebe57d11e2 = /*#__PURE__*/ Object.freeze({\n    __proto__: null,\n    Options: $53ad084189c41264$export$c019608e5b5bb4cb,\n    defaults: $53ad084189c41264$var$defaults\n});\n/******************************************************************************\n\tMulti-Tokens\n\tTokens composed of arrays of TextTokens\n******************************************************************************/ /**\n * @param {string} value\n * @param {Token[]} tokens\n */ function $53ad084189c41264$export$28075db42e06f164(value, tokens) {\n    this.t = 'token';\n    this.v = value;\n    this.tk = tokens;\n}\n/**\n * Abstract class used for manufacturing tokens of text tokens. That is rather\n * than the value for a token being a small string of text, it's value an array\n * of text tokens.\n *\n * Used for grouping together URLs, emails, hashtags, and other potential\n * creations.\n * @class MultiToken\n * @property {string} t\n * @property {string} v\n * @property {Token[]} tk\n * @abstract\n */ $53ad084189c41264$export$28075db42e06f164.prototype = {\n    isLink: false,\n    /**\n   * Return the string this token represents.\n   * @return {string}\n   */ toString () {\n        return this.v;\n    },\n    /**\n   * What should the value for this token be in the `href` HTML attribute?\n   * Returns the `.toString` value by default.\n   * @param {string} [scheme]\n   * @return {string}\n   */ toHref (scheme) {\n        return this.toString();\n    },\n    /**\n   * @param {Options} options Formatting options\n   * @returns {string}\n   */ toFormattedString (options) {\n        const val = this.toString();\n        const truncate = options.get('truncate', val, this);\n        const formatted = options.get('format', val, this);\n        return truncate && formatted.length > truncate ? formatted.substring(0, truncate) + \"\\u2026\" : formatted;\n    },\n    /**\n   *\n   * @param {Options} options\n   * @returns {string}\n   */ toFormattedHref (options) {\n        return options.get('formatHref', this.toHref(options.get('defaultProtocol')), this);\n    },\n    /**\n   * The start index of this token in the original input string\n   * @returns {number}\n   */ startIndex () {\n        return this.tk[0].s;\n    },\n    /**\n   * The end index of this token in the original input string (up to this\n   * index but not including it)\n   * @returns {number}\n   */ endIndex () {\n        return this.tk[this.tk.length - 1].e;\n    },\n    /**\n  \tReturns an object  of relevant values for this token, which includes keys\n  \t* type - Kind of token ('url', 'email', etc.)\n  \t* value - Original text\n  \t* href - The value that should be added to the anchor tag's href\n  \t\tattribute\n  \t\t@method toObject\n  \t@param {string} [protocol] `'http'` by default\n  */ toObject (protocol = $53ad084189c41264$var$defaults.defaultProtocol) {\n        return {\n            type: this.t,\n            value: this.toString(),\n            isLink: this.isLink,\n            href: this.toHref(protocol),\n            start: this.startIndex(),\n            end: this.endIndex()\n        };\n    },\n    /**\n   *\n   * @param {Options} options Formatting option\n   */ toFormattedObject (options) {\n        return {\n            type: this.t,\n            value: this.toFormattedString(options),\n            isLink: this.isLink,\n            href: this.toFormattedHref(options),\n            start: this.startIndex(),\n            end: this.endIndex()\n        };\n    },\n    /**\n   * Whether this token should be rendered as a link according to the given options\n   * @param {Options} options\n   * @returns {boolean}\n   */ validate (options) {\n        return options.get('validate', this.toString(), this);\n    },\n    /**\n   * Return an object that represents how this link should be rendered.\n   * @param {Options} options Formattinng options\n   */ render (options) {\n        const token = this;\n        const href = this.toHref(options.get('defaultProtocol'));\n        const formattedHref = options.get('formatHref', href, this);\n        const tagName = options.get('tagName', href, token);\n        const content = this.toFormattedString(options);\n        const attributes = {};\n        const className = options.get('className', href, token);\n        const target = options.get('target', href, token);\n        const rel = options.get('rel', href, token);\n        const attrs = options.getObj('attributes', href, token);\n        const eventListeners = options.getObj('events', href, token);\n        attributes.href = formattedHref;\n        if (className) attributes.class = className;\n        if (target) attributes.target = target;\n        if (rel) attributes.rel = rel;\n        if (attrs) Object.assign(attributes, attrs);\n        return {\n            tagName: tagName,\n            attributes: attributes,\n            content: content,\n            eventListeners: eventListeners\n        };\n    }\n};\n/**\n * Create a new token that can be emitted by the parser state machine\n * @param {string} type readable type of the token\n * @param {object} props properties to assign or override, including isLink = true or false\n * @returns {new (value: string, tokens: Token[]) => MultiToken} new token class\n */ function $53ad084189c41264$export$21042e7280c1baba(type, props) {\n    class Token extends $53ad084189c41264$export$28075db42e06f164 {\n        constructor(value, tokens){\n            super(value, tokens);\n            this.t = type;\n        }\n    }\n    for(const p in props)Token.prototype[p] = props[p];\n    Token.t = type;\n    return Token;\n}\n/**\n\tRepresents a list of tokens making up a valid email address\n*/ const $53ad084189c41264$var$Email = $53ad084189c41264$export$21042e7280c1baba('email', {\n    isLink: true,\n    toHref () {\n        return 'mailto:' + this.toString();\n    }\n});\n/**\n\tRepresents some plain text\n*/ const $53ad084189c41264$var$Text = $53ad084189c41264$export$21042e7280c1baba('text');\n/**\n\tMulti-linebreak token - represents a line break\n\t@class Nl\n*/ const $53ad084189c41264$var$Nl = $53ad084189c41264$export$21042e7280c1baba('nl');\n/**\n\tRepresents a list of text tokens making up a valid URL\n\t@class Url\n*/ const $53ad084189c41264$var$Url = $53ad084189c41264$export$21042e7280c1baba('url', {\n    isLink: true,\n    /**\n  \tLowercases relevant parts of the domain and adds the protocol if\n  \trequired. Note that this will not escape unsafe HTML characters in the\n  \tURL.\n  \t\t@param {string} [scheme] default scheme (e.g., 'https')\n  \t@return {string} the full href\n  */ toHref (scheme = $53ad084189c41264$var$defaults.defaultProtocol) {\n        // Check if already has a prefix scheme\n        return this.hasProtocol() ? this.v : `${scheme}://${this.v}`;\n    },\n    /**\n   * Check whether this URL token has a protocol\n   * @return {boolean}\n   */ hasProtocol () {\n        const tokens = this.tk;\n        return tokens.length >= 2 && tokens[0].t !== $53ad084189c41264$var$LOCALHOST && tokens[1].t === $53ad084189c41264$var$COLON;\n    }\n});\nvar $53ad084189c41264$export$13e2537ceeaf8a3a = /*#__PURE__*/ Object.freeze({\n    __proto__: null,\n    Base: $53ad084189c41264$export$28075db42e06f164,\n    Email: $53ad084189c41264$var$Email,\n    MultiToken: $53ad084189c41264$export$28075db42e06f164,\n    Nl: $53ad084189c41264$var$Nl,\n    Text: $53ad084189c41264$var$Text,\n    Url: $53ad084189c41264$var$Url,\n    createTokenClass: $53ad084189c41264$export$21042e7280c1baba\n});\n/**\n\tNot exactly parser, more like the second-stage scanner (although we can\n\ttheoretically hotswap the code here with a real parser in the future... but\n\tfor a little URL-finding utility abstract syntax trees may be a little\n\toverkill).\n\n\tURL format: http://en.wikipedia.org/wiki/URI_scheme\n\tEmail format: http://en.wikipedia.org/wiki/EmailAddress (links to RFC in\n\treference)\n\n\t@module linkify\n\t@submodule parser\n\t@main run\n*/ const $53ad084189c41264$var$makeState = (arg)=>new $53ad084189c41264$export$7254cc27399e90bd(arg);\n/**\n * Generate the parser multi token-based state machine\n * @param {{ groups: Collections<string> }} tokens\n */ function $53ad084189c41264$var$init$1({ groups: groups }) {\n    // Types of characters the URL can definitely end in\n    const qsAccepting = groups.domain.concat([\n        $53ad084189c41264$var$AMPERSAND,\n        $53ad084189c41264$var$ASTERISK,\n        $53ad084189c41264$var$AT,\n        $53ad084189c41264$var$BACKSLASH,\n        $53ad084189c41264$var$BACKTICK,\n        $53ad084189c41264$var$CARET,\n        $53ad084189c41264$var$DOLLAR,\n        $53ad084189c41264$var$EQUALS,\n        $53ad084189c41264$var$HYPHEN,\n        $53ad084189c41264$var$NUM,\n        $53ad084189c41264$var$PERCENT,\n        $53ad084189c41264$var$PIPE,\n        $53ad084189c41264$var$PLUS,\n        $53ad084189c41264$var$POUND,\n        $53ad084189c41264$var$SLASH,\n        $53ad084189c41264$var$SYM,\n        $53ad084189c41264$var$TILDE,\n        $53ad084189c41264$var$UNDERSCORE\n    ]);\n    // Types of tokens that can follow a URL and be part of the query string\n    // but cannot be the very last characters\n    // Characters that cannot appear in the URL at all should be excluded\n    const qsNonAccepting = [\n        $53ad084189c41264$var$APOSTROPHE,\n        $53ad084189c41264$var$COLON,\n        $53ad084189c41264$var$COMMA,\n        $53ad084189c41264$var$DOT,\n        $53ad084189c41264$var$EXCLAMATION,\n        $53ad084189c41264$var$PERCENT,\n        $53ad084189c41264$var$QUERY,\n        $53ad084189c41264$var$QUOTE,\n        $53ad084189c41264$var$SEMI,\n        $53ad084189c41264$var$OPENANGLEBRACKET,\n        $53ad084189c41264$var$CLOSEANGLEBRACKET,\n        $53ad084189c41264$var$OPENBRACE,\n        $53ad084189c41264$var$CLOSEBRACE,\n        $53ad084189c41264$var$CLOSEBRACKET,\n        $53ad084189c41264$var$OPENBRACKET,\n        $53ad084189c41264$var$OPENPAREN,\n        $53ad084189c41264$var$CLOSEPAREN,\n        $53ad084189c41264$var$FULLWIDTHLEFTPAREN,\n        $53ad084189c41264$var$FULLWIDTHRIGHTPAREN,\n        $53ad084189c41264$var$LEFTCORNERBRACKET,\n        $53ad084189c41264$var$RIGHTCORNERBRACKET,\n        $53ad084189c41264$var$LEFTWHITECORNERBRACKET,\n        $53ad084189c41264$var$RIGHTWHITECORNERBRACKET,\n        $53ad084189c41264$var$FULLWIDTHLESSTHAN,\n        $53ad084189c41264$var$FULLWIDTHGREATERTHAN\n    ];\n    // For addresses without the mailto prefix\n    // Tokens allowed in the localpart of the email\n    const localpartAccepting = [\n        $53ad084189c41264$var$AMPERSAND,\n        $53ad084189c41264$var$APOSTROPHE,\n        $53ad084189c41264$var$ASTERISK,\n        $53ad084189c41264$var$BACKSLASH,\n        $53ad084189c41264$var$BACKTICK,\n        $53ad084189c41264$var$CARET,\n        $53ad084189c41264$var$DOLLAR,\n        $53ad084189c41264$var$EQUALS,\n        $53ad084189c41264$var$HYPHEN,\n        $53ad084189c41264$var$OPENBRACE,\n        $53ad084189c41264$var$CLOSEBRACE,\n        $53ad084189c41264$var$PERCENT,\n        $53ad084189c41264$var$PIPE,\n        $53ad084189c41264$var$PLUS,\n        $53ad084189c41264$var$POUND,\n        $53ad084189c41264$var$QUERY,\n        $53ad084189c41264$var$SLASH,\n        $53ad084189c41264$var$SYM,\n        $53ad084189c41264$var$TILDE,\n        $53ad084189c41264$var$UNDERSCORE\n    ];\n    // The universal starting state.\n    /**\n   * @type State<Token>\n   */ const Start = $53ad084189c41264$var$makeState();\n    const Localpart = $53ad084189c41264$var$tt(Start, $53ad084189c41264$var$TILDE); // Local part of the email address\n    $53ad084189c41264$var$ta(Localpart, localpartAccepting, Localpart);\n    $53ad084189c41264$var$ta(Localpart, groups.domain, Localpart);\n    const Domain = $53ad084189c41264$var$makeState(), Scheme = $53ad084189c41264$var$makeState(), SlashScheme = $53ad084189c41264$var$makeState();\n    $53ad084189c41264$var$ta(Start, groups.domain, Domain); // parsed string ends with a potential domain name (A)\n    $53ad084189c41264$var$ta(Start, groups.scheme, Scheme); // e.g., 'mailto'\n    $53ad084189c41264$var$ta(Start, groups.slashscheme, SlashScheme); // e.g., 'http'\n    $53ad084189c41264$var$ta(Domain, localpartAccepting, Localpart);\n    $53ad084189c41264$var$ta(Domain, groups.domain, Domain);\n    const LocalpartAt = $53ad084189c41264$var$tt(Domain, $53ad084189c41264$var$AT); // Local part of the email address plus @\n    $53ad084189c41264$var$tt(Localpart, $53ad084189c41264$var$AT, LocalpartAt); // close to an email address now\n    // Local part of an email address can be e.g. 'http' or 'mailto'\n    $53ad084189c41264$var$tt(Scheme, $53ad084189c41264$var$AT, LocalpartAt);\n    $53ad084189c41264$var$tt(SlashScheme, $53ad084189c41264$var$AT, LocalpartAt);\n    const LocalpartDot = $53ad084189c41264$var$tt(Localpart, $53ad084189c41264$var$DOT); // Local part of the email address plus '.' (localpart cannot end in .)\n    $53ad084189c41264$var$ta(LocalpartDot, localpartAccepting, Localpart);\n    $53ad084189c41264$var$ta(LocalpartDot, groups.domain, Localpart);\n    const EmailDomain = $53ad084189c41264$var$makeState();\n    $53ad084189c41264$var$ta(LocalpartAt, groups.domain, EmailDomain); // parsed string starts with local email info + @ with a potential domain name\n    $53ad084189c41264$var$ta(EmailDomain, groups.domain, EmailDomain);\n    const EmailDomainDot = $53ad084189c41264$var$tt(EmailDomain, $53ad084189c41264$var$DOT); // domain followed by DOT\n    $53ad084189c41264$var$ta(EmailDomainDot, groups.domain, EmailDomain);\n    const Email$1 = $53ad084189c41264$var$makeState($53ad084189c41264$var$Email); // Possible email address (could have more tlds)\n    $53ad084189c41264$var$ta(EmailDomainDot, groups.tld, Email$1);\n    $53ad084189c41264$var$ta(EmailDomainDot, groups.utld, Email$1);\n    $53ad084189c41264$var$tt(LocalpartAt, $53ad084189c41264$var$LOCALHOST, Email$1);\n    // Hyphen can jump back to a domain name\n    const EmailDomainHyphen = $53ad084189c41264$var$tt(EmailDomain, $53ad084189c41264$var$HYPHEN); // parsed string starts with local email info + @ with a potential domain name\n    $53ad084189c41264$var$tt(EmailDomainHyphen, $53ad084189c41264$var$HYPHEN, EmailDomainHyphen);\n    $53ad084189c41264$var$ta(EmailDomainHyphen, groups.domain, EmailDomain);\n    $53ad084189c41264$var$ta(Email$1, groups.domain, EmailDomain);\n    $53ad084189c41264$var$tt(Email$1, $53ad084189c41264$var$DOT, EmailDomainDot);\n    $53ad084189c41264$var$tt(Email$1, $53ad084189c41264$var$HYPHEN, EmailDomainHyphen);\n    // Final possible email states\n    const EmailColon = $53ad084189c41264$var$tt(Email$1, $53ad084189c41264$var$COLON); // URL followed by colon (potential port number here)\n    /*const EmailColonPort = */ $53ad084189c41264$var$ta(EmailColon, groups.numeric, $53ad084189c41264$var$Email); // URL followed by colon and port number\n    // Account for dots and hyphens. Hyphens are usually parts of domain names\n    // (but not TLDs)\n    const DomainHyphen = $53ad084189c41264$var$tt(Domain, $53ad084189c41264$var$HYPHEN); // domain followed by hyphen\n    const DomainDot = $53ad084189c41264$var$tt(Domain, $53ad084189c41264$var$DOT); // domain followed by DOT\n    $53ad084189c41264$var$tt(DomainHyphen, $53ad084189c41264$var$HYPHEN, DomainHyphen);\n    $53ad084189c41264$var$ta(DomainHyphen, groups.domain, Domain);\n    $53ad084189c41264$var$ta(DomainDot, localpartAccepting, Localpart);\n    $53ad084189c41264$var$ta(DomainDot, groups.domain, Domain);\n    const DomainDotTld = $53ad084189c41264$var$makeState($53ad084189c41264$var$Url); // Simplest possible URL with no query string\n    $53ad084189c41264$var$ta(DomainDot, groups.tld, DomainDotTld);\n    $53ad084189c41264$var$ta(DomainDot, groups.utld, DomainDotTld);\n    $53ad084189c41264$var$ta(DomainDotTld, groups.domain, Domain);\n    $53ad084189c41264$var$ta(DomainDotTld, localpartAccepting, Localpart);\n    $53ad084189c41264$var$tt(DomainDotTld, $53ad084189c41264$var$DOT, DomainDot);\n    $53ad084189c41264$var$tt(DomainDotTld, $53ad084189c41264$var$HYPHEN, DomainHyphen);\n    $53ad084189c41264$var$tt(DomainDotTld, $53ad084189c41264$var$AT, LocalpartAt);\n    const DomainDotTldColon = $53ad084189c41264$var$tt(DomainDotTld, $53ad084189c41264$var$COLON); // URL followed by colon (potential port number here)\n    const DomainDotTldColonPort = $53ad084189c41264$var$makeState($53ad084189c41264$var$Url); // TLD followed by a port number\n    $53ad084189c41264$var$ta(DomainDotTldColon, groups.numeric, DomainDotTldColonPort);\n    // Long URL with optional port and maybe query string\n    const Url$1 = $53ad084189c41264$var$makeState($53ad084189c41264$var$Url);\n    // URL with extra symbols at the end, followed by an opening bracket\n    const UrlNonaccept = $53ad084189c41264$var$makeState(); // URL followed by some symbols (will not be part of the final URL)\n    // Query strings\n    $53ad084189c41264$var$ta(Url$1, qsAccepting, Url$1);\n    $53ad084189c41264$var$ta(Url$1, qsNonAccepting, UrlNonaccept);\n    $53ad084189c41264$var$ta(UrlNonaccept, qsAccepting, Url$1);\n    $53ad084189c41264$var$ta(UrlNonaccept, qsNonAccepting, UrlNonaccept);\n    // Become real URLs after `SLASH` or `COLON NUM SLASH`\n    // Here works with or without scheme:// prefix\n    $53ad084189c41264$var$tt(DomainDotTld, $53ad084189c41264$var$SLASH, Url$1);\n    $53ad084189c41264$var$tt(DomainDotTldColonPort, $53ad084189c41264$var$SLASH, Url$1);\n    // Note that domains that begin with schemes are treated slighly differently\n    const SchemeColon = $53ad084189c41264$var$tt(Scheme, $53ad084189c41264$var$COLON); // e.g., 'mailto:'\n    const SlashSchemeColon = $53ad084189c41264$var$tt(SlashScheme, $53ad084189c41264$var$COLON); // e.g., 'http:'\n    const SlashSchemeColonSlash = $53ad084189c41264$var$tt(SlashSchemeColon, $53ad084189c41264$var$SLASH); // e.g., 'http:/'\n    const UriPrefix = $53ad084189c41264$var$tt(SlashSchemeColonSlash, $53ad084189c41264$var$SLASH); // e.g., 'http://'\n    // Scheme states can transition to domain states\n    $53ad084189c41264$var$ta(Scheme, groups.domain, Domain);\n    $53ad084189c41264$var$tt(Scheme, $53ad084189c41264$var$DOT, DomainDot);\n    $53ad084189c41264$var$tt(Scheme, $53ad084189c41264$var$HYPHEN, DomainHyphen);\n    $53ad084189c41264$var$ta(SlashScheme, groups.domain, Domain);\n    $53ad084189c41264$var$tt(SlashScheme, $53ad084189c41264$var$DOT, DomainDot);\n    $53ad084189c41264$var$tt(SlashScheme, $53ad084189c41264$var$HYPHEN, DomainHyphen);\n    // Force URL with scheme prefix followed by anything sane\n    $53ad084189c41264$var$ta(SchemeColon, groups.domain, Url$1);\n    $53ad084189c41264$var$tt(SchemeColon, $53ad084189c41264$var$SLASH, Url$1);\n    $53ad084189c41264$var$tt(SchemeColon, $53ad084189c41264$var$QUERY, Url$1);\n    $53ad084189c41264$var$ta(UriPrefix, groups.domain, Url$1);\n    $53ad084189c41264$var$ta(UriPrefix, qsAccepting, Url$1);\n    $53ad084189c41264$var$tt(UriPrefix, $53ad084189c41264$var$SLASH, Url$1);\n    const bracketPairs = [\n        [\n            $53ad084189c41264$var$OPENBRACE,\n            $53ad084189c41264$var$CLOSEBRACE\n        ],\n        // {}\n        [\n            $53ad084189c41264$var$OPENBRACKET,\n            $53ad084189c41264$var$CLOSEBRACKET\n        ],\n        // []\n        [\n            $53ad084189c41264$var$OPENPAREN,\n            $53ad084189c41264$var$CLOSEPAREN\n        ],\n        // ()\n        [\n            $53ad084189c41264$var$OPENANGLEBRACKET,\n            $53ad084189c41264$var$CLOSEANGLEBRACKET\n        ],\n        // <>\n        [\n            $53ad084189c41264$var$FULLWIDTHLEFTPAREN,\n            $53ad084189c41264$var$FULLWIDTHRIGHTPAREN\n        ],\n        // （）\n        [\n            $53ad084189c41264$var$LEFTCORNERBRACKET,\n            $53ad084189c41264$var$RIGHTCORNERBRACKET\n        ],\n        // 「」\n        [\n            $53ad084189c41264$var$LEFTWHITECORNERBRACKET,\n            $53ad084189c41264$var$RIGHTWHITECORNERBRACKET\n        ],\n        // 『』\n        [\n            $53ad084189c41264$var$FULLWIDTHLESSTHAN,\n            $53ad084189c41264$var$FULLWIDTHGREATERTHAN\n        ] // ＜＞\n    ];\n    for(let i = 0; i < bracketPairs.length; i++){\n        const [OPEN, CLOSE] = bracketPairs[i];\n        const UrlOpen = $53ad084189c41264$var$tt(Url$1, OPEN); // URL followed by open bracket\n        // Continue not accepting for open brackets\n        $53ad084189c41264$var$tt(UrlNonaccept, OPEN, UrlOpen);\n        // Closing bracket component. This character WILL be included in the URL\n        $53ad084189c41264$var$tt(UrlOpen, CLOSE, Url$1);\n        // URL that beings with an opening bracket, followed by a symbols.\n        // Note that the final state can still be `UrlOpen` (if the URL has a\n        // single opening bracket for some reason).\n        const UrlOpenQ = $53ad084189c41264$var$makeState($53ad084189c41264$var$Url);\n        $53ad084189c41264$var$ta(UrlOpen, qsAccepting, UrlOpenQ);\n        const UrlOpenSyms = $53ad084189c41264$var$makeState(); // UrlOpen followed by some symbols it cannot end it\n        $53ad084189c41264$var$ta(UrlOpen, qsNonAccepting);\n        // URL that begins with an opening bracket, followed by some symbols\n        $53ad084189c41264$var$ta(UrlOpenQ, qsAccepting, UrlOpenQ);\n        $53ad084189c41264$var$ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms);\n        $53ad084189c41264$var$ta(UrlOpenSyms, qsAccepting, UrlOpenQ);\n        $53ad084189c41264$var$ta(UrlOpenSyms, qsNonAccepting, UrlOpenSyms);\n        // Close brace/bracket to become regular URL\n        $53ad084189c41264$var$tt(UrlOpenQ, CLOSE, Url$1);\n        $53ad084189c41264$var$tt(UrlOpenSyms, CLOSE, Url$1);\n    }\n    $53ad084189c41264$var$tt(Start, $53ad084189c41264$var$LOCALHOST, DomainDotTld); // localhost is a valid URL state\n    $53ad084189c41264$var$tt(Start, $53ad084189c41264$var$NL, $53ad084189c41264$var$Nl); // single new line\n    return {\n        start: Start,\n        tokens: $53ad084189c41264$var$tk\n    };\n}\n/**\n * Run the parser state machine on a list of scanned string-based tokens to\n * create a list of multi tokens, each of which represents a URL, email address,\n * plain text, etc.\n *\n * @param {State<MultiToken>} start parser start state\n * @param {string} input the original input used to generate the given tokens\n * @param {Token[]} tokens list of scanned tokens\n * @returns {MultiToken[]}\n */ function $53ad084189c41264$var$run(start, input, tokens) {\n    let len = tokens.length;\n    let cursor = 0;\n    let multis = [];\n    let textTokens = [];\n    while(cursor < len){\n        let state = start;\n        let secondState = null;\n        let nextState = null;\n        let multiLength = 0;\n        let latestAccepting = null;\n        let sinceAccepts = -1;\n        while(cursor < len && !(secondState = state.go(tokens[cursor].t)))// Starting tokens with nowhere to jump to.\n        // Consider these to be just plain text\n        textTokens.push(tokens[cursor++]);\n        while(cursor < len && (nextState = secondState || state.go(tokens[cursor].t))){\n            // Get the next state\n            secondState = null;\n            state = nextState;\n            // Keep track of the latest accepting state\n            if (state.accepts()) {\n                sinceAccepts = 0;\n                latestAccepting = state;\n            } else if (sinceAccepts >= 0) sinceAccepts++;\n            cursor++;\n            multiLength++;\n        }\n        if (sinceAccepts < 0) {\n            // No accepting state was found, part of a regular text token add\n            // the first text token to the text tokens array and try again from\n            // the next\n            cursor -= multiLength;\n            if (cursor < len) {\n                textTokens.push(tokens[cursor]);\n                cursor++;\n            }\n        } else {\n            // Accepting state!\n            // First close off the textTokens (if available)\n            if (textTokens.length > 0) {\n                multis.push($53ad084189c41264$var$initMultiToken($53ad084189c41264$var$Text, input, textTokens));\n                textTokens = [];\n            }\n            // Roll back to the latest accepting state\n            cursor -= sinceAccepts;\n            multiLength -= sinceAccepts;\n            // Create a new multitoken\n            const Multi = latestAccepting.t;\n            const subtokens = tokens.slice(cursor - multiLength, cursor);\n            multis.push($53ad084189c41264$var$initMultiToken(Multi, input, subtokens));\n        }\n    }\n    // Finally close off the textTokens (if available)\n    if (textTokens.length > 0) multis.push($53ad084189c41264$var$initMultiToken($53ad084189c41264$var$Text, input, textTokens));\n    return multis;\n}\n/**\n * Utility function for instantiating a new multitoken with all the relevant\n * fields during parsing.\n * @param {new (value: string, tokens: Token[]) => MultiToken} Multi class to instantiate\n * @param {string} input original input string\n * @param {Token[]} tokens consecutive tokens scanned from input string\n * @returns {MultiToken}\n */ function $53ad084189c41264$var$initMultiToken(Multi, input, tokens) {\n    const startIdx = tokens[0].s;\n    const endIdx = tokens[tokens.length - 1].e;\n    const value = input.slice(startIdx, endIdx);\n    return new Multi(value, tokens);\n}\nconst $53ad084189c41264$var$warn = typeof console !== 'undefined' && console && console.warn || (()=>{});\nconst $53ad084189c41264$var$warnAdvice = 'until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.';\n// Side-effect initialization state\nconst $53ad084189c41264$var$INIT = {\n    scanner: null,\n    parser: null,\n    tokenQueue: [],\n    pluginQueue: [],\n    customSchemes: [],\n    initialized: false\n};\n/**\n * @typedef {{\n * \tstart: State<string>,\n * \ttokens: { groups: Collections<string> } & typeof tk\n * }} ScannerInit\n */ /**\n * @typedef {{\n * \tstart: State<MultiToken>,\n * \ttokens: typeof multi\n * }} ParserInit\n */ /**\n * @typedef {(arg: { scanner: ScannerInit }) => void} TokenPlugin\n */ /**\n * @typedef {(arg: { scanner: ScannerInit, parser: ParserInit }) => void} Plugin\n */ /**\n * De-register all plugins and reset the internal state-machine. Used for\n * testing; not required in practice.\n * @private\n */ function $53ad084189c41264$export$aad8462122ac592b() {\n    $53ad084189c41264$export$7254cc27399e90bd.groups = {};\n    $53ad084189c41264$var$INIT.scanner = null;\n    $53ad084189c41264$var$INIT.parser = null;\n    $53ad084189c41264$var$INIT.tokenQueue = [];\n    $53ad084189c41264$var$INIT.pluginQueue = [];\n    $53ad084189c41264$var$INIT.customSchemes = [];\n    $53ad084189c41264$var$INIT.initialized = false;\n    return $53ad084189c41264$var$INIT;\n}\n/**\n * Register a token plugin to allow the scanner to recognize additional token\n * types before the parser state machine is constructed from the results.\n * @param {string} name of plugin to register\n * @param {TokenPlugin} plugin function that accepts the scanner state machine\n * and available scanner tokens and collections and extends the state machine to\n * recognize additional tokens or groups.\n */ function $53ad084189c41264$export$56d1f1cb1f3c0e96(name, plugin) {\n    if (typeof plugin !== 'function') throw new Error(`linkifyjs: Invalid token plugin ${plugin} (expects function)`);\n    for(let i = 0; i < $53ad084189c41264$var$INIT.tokenQueue.length; i++)if (name === $53ad084189c41264$var$INIT.tokenQueue[i][0]) {\n        $53ad084189c41264$var$warn(`linkifyjs: token plugin \"${name}\" already registered - will be overwritten`);\n        $53ad084189c41264$var$INIT.tokenQueue[i] = [\n            name,\n            plugin\n        ];\n        return;\n    }\n    $53ad084189c41264$var$INIT.tokenQueue.push([\n        name,\n        plugin\n    ]);\n    if ($53ad084189c41264$var$INIT.initialized) $53ad084189c41264$var$warn(`linkifyjs: already initialized - will not register token plugin \"${name}\" ${$53ad084189c41264$var$warnAdvice}`);\n}\n/**\n * Register a linkify plugin\n * @param {string} name of plugin to register\n * @param {Plugin} plugin function that accepts the parser state machine and\n * extends the parser to recognize additional link types\n */ function $53ad084189c41264$export$7612db19fb8beb1e(name, plugin) {\n    if (typeof plugin !== 'function') throw new Error(`linkifyjs: Invalid plugin ${plugin} (expects function)`);\n    for(let i = 0; i < $53ad084189c41264$var$INIT.pluginQueue.length; i++)if (name === $53ad084189c41264$var$INIT.pluginQueue[i][0]) {\n        $53ad084189c41264$var$warn(`linkifyjs: plugin \"${name}\" already registered - will be overwritten`);\n        $53ad084189c41264$var$INIT.pluginQueue[i] = [\n            name,\n            plugin\n        ];\n        return;\n    }\n    $53ad084189c41264$var$INIT.pluginQueue.push([\n        name,\n        plugin\n    ]);\n    if ($53ad084189c41264$var$INIT.initialized) $53ad084189c41264$var$warn(`linkifyjs: already initialized - will not register plugin \"${name}\" ${$53ad084189c41264$var$warnAdvice}`);\n}\n/**\n * Detect URLs with the following additional protocol. Anything with format\n * \"protocol://...\" will be considered a link. If `optionalSlashSlash` is set to\n * `true`, anything with format \"protocol:...\" will be considered a link.\n * @param {string} scheme\n * @param {boolean} [optionalSlashSlash]\n */ function $53ad084189c41264$export$821627edc2d26f5f(scheme, optionalSlashSlash = false) {\n    if ($53ad084189c41264$var$INIT.initialized) $53ad084189c41264$var$warn(`linkifyjs: already initialized - will not register custom scheme \"${scheme}\" ${$53ad084189c41264$var$warnAdvice}`);\n    if (!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme)) throw new Error(`linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or \"-\"\n2. Cannot start or end with \"-\"\n3. \"-\" cannot repeat`);\n    $53ad084189c41264$var$INIT.customSchemes.push([\n        scheme,\n        optionalSlashSlash\n    ]);\n}\n/**\n * Initialize the linkify state machine. Called automatically the first time\n * linkify is called on a string, but may be called manually as well.\n */ function $53ad084189c41264$export$2cd8252107eb640b() {\n    // Initialize scanner state machine and plugins\n    $53ad084189c41264$var$INIT.scanner = $53ad084189c41264$var$init$2($53ad084189c41264$var$INIT.customSchemes);\n    for(let i = 0; i < $53ad084189c41264$var$INIT.tokenQueue.length; i++)$53ad084189c41264$var$INIT.tokenQueue[i][1]({\n        scanner: $53ad084189c41264$var$INIT.scanner\n    });\n    // Initialize parser state machine and plugins\n    $53ad084189c41264$var$INIT.parser = $53ad084189c41264$var$init$1($53ad084189c41264$var$INIT.scanner.tokens);\n    for(let i = 0; i < $53ad084189c41264$var$INIT.pluginQueue.length; i++)$53ad084189c41264$var$INIT.pluginQueue[i][1]({\n        scanner: $53ad084189c41264$var$INIT.scanner,\n        parser: $53ad084189c41264$var$INIT.parser\n    });\n    $53ad084189c41264$var$INIT.initialized = true;\n    return $53ad084189c41264$var$INIT;\n}\n/**\n * Parse a string into tokens that represent linkable and non-linkable sub-components\n * @param {string} str\n * @return {MultiToken[]} tokens\n */ function $53ad084189c41264$export$660b2ee2d4fb4eff(str) {\n    if (!$53ad084189c41264$var$INIT.initialized) $53ad084189c41264$export$2cd8252107eb640b();\n    return $53ad084189c41264$var$run($53ad084189c41264$var$INIT.parser.start, str, $53ad084189c41264$var$run$1($53ad084189c41264$var$INIT.scanner.start, str));\n}\n$53ad084189c41264$export$660b2ee2d4fb4eff.scan = $53ad084189c41264$var$run$1; // for testing\n/**\n * Find a list of linkable items in the given string.\n * @param {string} str string to find links in\n * @param {string | Opts} [type] either formatting options or specific type of\n * links to find, e.g., 'url' or 'email'\n * @param {Opts} [opts] formatting options for final output. Cannot be specified\n * if opts already provided in `type` argument\n */ function $53ad084189c41264$export$71aa6c912b956294(str, type = null, opts = null) {\n    if (type && typeof type === 'object') {\n        if (opts) throw Error(`linkifyjs: Invalid link type ${type}; must be a string`);\n        opts = type;\n        type = null;\n    }\n    const options = new $53ad084189c41264$export$c019608e5b5bb4cb(opts);\n    const tokens = $53ad084189c41264$export$660b2ee2d4fb4eff(str);\n    const filtered = [];\n    for(let i = 0; i < tokens.length; i++){\n        const token = tokens[i];\n        if (token.isLink && (!type || token.t === type) && options.check(token)) filtered.push(token.toFormattedObject(options));\n    }\n    return filtered;\n}\n/**\n * Is the given string valid linkable text of some sort. Note that this does not\n * trim the text for you.\n *\n * Optionally pass in a second `type` param, which is the type of link to test\n * for.\n *\n * For example,\n *\n *     linkify.test(str, 'email');\n *\n * Returns `true` if str is a valid email.\n * @param {string} str string to test for links\n * @param {string} [type] optional specific link type to look for\n * @returns boolean true/false\n */ function $53ad084189c41264$export$e0969da9b8fb378d(str, type = null) {\n    const tokens = $53ad084189c41264$export$660b2ee2d4fb4eff(str);\n    return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].t === type);\n}\n\n});\n\n\nparcelRegister(\"7IEdL\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $59ebd7842d492c6a$export$3720eb13f948f394);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * This extension allows you to align text.\n * @see https://www.tiptap.dev/api/extensions/text-align\n */ const $59ebd7842d492c6a$export$3720eb13f948f394 = (0, $gkCGf.Extension).create({\n    name: 'textAlign',\n    addOptions () {\n        return {\n            types: [],\n            alignments: [\n                'left',\n                'center',\n                'right',\n                'justify'\n            ],\n            defaultAlignment: null\n        };\n    },\n    addGlobalAttributes () {\n        return [\n            {\n                types: this.options.types,\n                attributes: {\n                    textAlign: {\n                        default: this.options.defaultAlignment,\n                        parseHTML: (element)=>{\n                            const alignment = element.style.textAlign;\n                            return this.options.alignments.includes(alignment) ? alignment : this.options.defaultAlignment;\n                        },\n                        renderHTML: (attributes)=>{\n                            if (!attributes.textAlign) return {};\n                            return {\n                                style: `text-align: ${attributes.textAlign}`\n                            };\n                        }\n                    }\n                }\n            }\n        ];\n    },\n    addCommands () {\n        return {\n            setTextAlign: (alignment)=>({ commands: commands })=>{\n                    if (!this.options.alignments.includes(alignment)) return false;\n                    return this.options.types.map((type)=>commands.updateAttributes(type, {\n                            textAlign: alignment\n                        })).every((response)=>response);\n                },\n            unsetTextAlign: ()=>({ commands: commands })=>{\n                    return this.options.types.map((type)=>commands.resetAttributes(type, 'textAlign')).every((response)=>response);\n                },\n            toggleTextAlign: (alignment)=>({ editor: editor, commands: commands })=>{\n                    if (!this.options.alignments.includes(alignment)) return false;\n                    if (editor.isActive({\n                        textAlign: alignment\n                    })) return commands.unsetTextAlign();\n                    return commands.setTextAlign(alignment);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-Shift-l': ()=>this.editor.commands.setTextAlign('left'),\n            'Mod-Shift-e': ()=>this.editor.commands.setTextAlign('center'),\n            'Mod-Shift-r': ()=>this.editor.commands.setTextAlign('right'),\n            'Mod-Shift-j': ()=>this.editor.commands.setTextAlign('justify')\n        };\n    }\n});\n\n});\n\nparcelRegister(\"ednZI\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $a594e465601a2726$export$741ee5bff4f2bc22);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * This extension allows you to create underline text.\n * @see https://www.tiptap.dev/api/marks/underline\n */ const $a594e465601a2726$export$741ee5bff4f2bc22 = (0, $gkCGf.Mark).create({\n    name: 'underline',\n    addOptions () {\n        return {\n            HTMLAttributes: {}\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: 'u'\n            },\n            {\n                style: 'text-decoration',\n                consuming: false,\n                getAttrs: (style)=>style.includes('underline') ? {} : false\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'u',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            setUnderline: ()=>({ commands: commands })=>{\n                    return commands.setMark(this.name);\n                },\n            toggleUnderline: ()=>({ commands: commands })=>{\n                    return commands.toggleMark(this.name);\n                },\n            unsetUnderline: ()=>({ commands: commands })=>{\n                    return commands.unsetMark(this.name);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-u': ()=>this.editor.commands.toggleUnderline(),\n            'Mod-U': ()=>this.editor.commands.toggleUnderline()\n        };\n    }\n});\n\n});\n\nparcelRegister(\"fXWMf\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $b9f9f5a2724622fc$export$626064c5f1b71dc);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n\nvar $2u5A9 = parcelRequire(\"2u5A9\");\n\nvar $2xosh = parcelRequire(\"2xosh\");\n\nvar $dacGJ = parcelRequire(\"dacGJ\");\n\nvar $lluJu = parcelRequire(\"lluJu\");\n\nvar $1BHwg = parcelRequire(\"1BHwg\");\n\nvar $9aRSD = parcelRequire(\"9aRSD\");\n\nvar $lnzEF = parcelRequire(\"lnzEF\");\n\nvar $i3rT4 = parcelRequire(\"i3rT4\");\n\nvar $k7DD8 = parcelRequire(\"k7DD8\");\n\nvar $4w6kx = parcelRequire(\"4w6kx\");\n\nvar $luyzA = parcelRequire(\"luyzA\");\n\nvar $gaTMf = parcelRequire(\"gaTMf\");\n\nvar $5G1It = parcelRequire(\"5G1It\");\n\nvar $cabgp = parcelRequire(\"cabgp\");\n\nvar $l1c21 = parcelRequire(\"l1c21\");\n\nvar $dzWv6 = parcelRequire(\"dzWv6\");\n\nvar $2jORh = parcelRequire(\"2jORh\");\n\nvar $hirCw = parcelRequire(\"hirCw\");\n/**\n * The starter kit is a collection of essential editor extensions.\n *\n * It’s a good starting point for building your own editor.\n */ const $b9f9f5a2724622fc$export$626064c5f1b71dc = (0, $gkCGf.Extension).create({\n    name: 'starterKit',\n    addExtensions () {\n        const extensions = [];\n        if (this.options.bold !== false) extensions.push((0, $2xosh.Bold).configure(this.options.bold));\n        if (this.options.blockquote !== false) extensions.push((0, $2u5A9.Blockquote).configure(this.options.blockquote));\n        if (this.options.bulletList !== false) extensions.push((0, $dacGJ.BulletList).configure(this.options.bulletList));\n        if (this.options.code !== false) extensions.push((0, $lluJu.Code).configure(this.options.code));\n        if (this.options.codeBlock !== false) extensions.push((0, $1BHwg.CodeBlock).configure(this.options.codeBlock));\n        if (this.options.document !== false) extensions.push((0, $9aRSD.Document).configure(this.options.document));\n        if (this.options.dropcursor !== false) extensions.push((0, $lnzEF.Dropcursor).configure(this.options.dropcursor));\n        if (this.options.gapcursor !== false) extensions.push((0, $i3rT4.Gapcursor).configure(this.options.gapcursor));\n        if (this.options.hardBreak !== false) extensions.push((0, $k7DD8.HardBreak).configure(this.options.hardBreak));\n        if (this.options.heading !== false) extensions.push((0, $4w6kx.Heading).configure(this.options.heading));\n        if (this.options.history !== false) extensions.push((0, $luyzA.History).configure(this.options.history));\n        if (this.options.horizontalRule !== false) extensions.push((0, $gaTMf.HorizontalRule).configure(this.options.horizontalRule));\n        if (this.options.italic !== false) extensions.push((0, $5G1It.Italic).configure(this.options.italic));\n        if (this.options.listItem !== false) extensions.push((0, $cabgp.ListItem).configure(this.options.listItem));\n        if (this.options.orderedList !== false) extensions.push((0, $l1c21.OrderedList).configure(this.options.orderedList));\n        if (this.options.paragraph !== false) extensions.push((0, $dzWv6.Paragraph).configure(this.options.paragraph));\n        if (this.options.strike !== false) extensions.push((0, $2jORh.Strike).configure(this.options.strike));\n        if (this.options.text !== false) extensions.push((0, $hirCw.Text).configure(this.options.text));\n        return extensions;\n    }\n});\n\n});\nparcelRegister(\"2u5A9\", function(module, exports) {\n\n$parcel$export(module.exports, \"Blockquote\", () => $1cf2b69bc5a33625$export$29a7a275fe11687);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * Matches a blockquote to a `>` as input.\n */ const $1cf2b69bc5a33625$export$55b9391925fcc072 = /^\\s*>\\s$/;\n/**\n * This extension allows you to create blockquotes.\n * @see https://tiptap.dev/api/nodes/blockquote\n */ const $1cf2b69bc5a33625$export$29a7a275fe11687 = (0, $gkCGf.Node).create({\n    name: 'blockquote',\n    addOptions () {\n        return {\n            HTMLAttributes: {}\n        };\n    },\n    content: 'block+',\n    group: 'block',\n    defining: true,\n    parseHTML () {\n        return [\n            {\n                tag: 'blockquote'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'blockquote',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            setBlockquote: ()=>({ commands: commands })=>{\n                    return commands.wrapIn(this.name);\n                },\n            toggleBlockquote: ()=>({ commands: commands })=>{\n                    return commands.toggleWrap(this.name);\n                },\n            unsetBlockquote: ()=>({ commands: commands })=>{\n                    return commands.lift(this.name);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-Shift-b': ()=>this.editor.commands.toggleBlockquote()\n        };\n    },\n    addInputRules () {\n        return [\n            (0, $gkCGf.wrappingInputRule)({\n                find: $1cf2b69bc5a33625$export$55b9391925fcc072,\n                type: this.type\n            })\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"2xosh\", function(module, exports) {\n\n$parcel$export(module.exports, \"Bold\", () => $1d91a21df58be65e$export$95aa4184327d6b72);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * Matches bold text via `**` as input.\n */ const $1d91a21df58be65e$export$73ba4776eeca629e = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))$/;\n/**\n * Matches bold text via `**` while pasting.\n */ const $1d91a21df58be65e$export$47b75d481b90409 = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))/g;\n/**\n * Matches bold text via `__` as input.\n */ const $1d91a21df58be65e$export$79cd1d2695dae26d = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))$/;\n/**\n * Matches bold text via `__` while pasting.\n */ const $1d91a21df58be65e$export$9b623891dbc7bd12 = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))/g;\n/**\n * This extension allows you to mark text as bold.\n * @see https://tiptap.dev/api/marks/bold\n */ const $1d91a21df58be65e$export$95aa4184327d6b72 = (0, $gkCGf.Mark).create({\n    name: 'bold',\n    addOptions () {\n        return {\n            HTMLAttributes: {}\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: 'strong'\n            },\n            {\n                tag: 'b',\n                getAttrs: (node)=>node.style.fontWeight !== 'normal' && null\n            },\n            {\n                style: 'font-weight=400',\n                clearMark: (mark)=>mark.type.name === this.name\n            },\n            {\n                style: 'font-weight',\n                getAttrs: (value)=>/^(bold(er)?|[5-9]\\d{2,})$/.test(value) && null\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'strong',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            setBold: ()=>({ commands: commands })=>{\n                    return commands.setMark(this.name);\n                },\n            toggleBold: ()=>({ commands: commands })=>{\n                    return commands.toggleMark(this.name);\n                },\n            unsetBold: ()=>({ commands: commands })=>{\n                    return commands.unsetMark(this.name);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-b': ()=>this.editor.commands.toggleBold(),\n            'Mod-B': ()=>this.editor.commands.toggleBold()\n        };\n    },\n    addInputRules () {\n        return [\n            (0, $gkCGf.markInputRule)({\n                find: $1d91a21df58be65e$export$73ba4776eeca629e,\n                type: this.type\n            }),\n            (0, $gkCGf.markInputRule)({\n                find: $1d91a21df58be65e$export$79cd1d2695dae26d,\n                type: this.type\n            })\n        ];\n    },\n    addPasteRules () {\n        return [\n            (0, $gkCGf.markPasteRule)({\n                find: $1d91a21df58be65e$export$47b75d481b90409,\n                type: this.type\n            }),\n            (0, $gkCGf.markPasteRule)({\n                find: $1d91a21df58be65e$export$9b623891dbc7bd12,\n                type: this.type\n            })\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"dacGJ\", function(module, exports) {\n\n$parcel$export(module.exports, \"BulletList\", () => $99560d28eed0b417$export$546f606c73d35982);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\nconst $99560d28eed0b417$var$ListItemName = 'listItem';\nconst $99560d28eed0b417$var$TextStyleName = 'textStyle';\n/**\n * Matches a bullet list to a dash or asterisk.\n */ const $99560d28eed0b417$export$55b9391925fcc072 = /^\\s*([-+*])\\s$/;\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */ const $99560d28eed0b417$export$546f606c73d35982 = (0, $gkCGf.Node).create({\n    name: 'bulletList',\n    addOptions () {\n        return {\n            itemTypeName: 'listItem',\n            HTMLAttributes: {},\n            keepMarks: false,\n            keepAttributes: false\n        };\n    },\n    group: 'block list',\n    content () {\n        return `${this.options.itemTypeName}+`;\n    },\n    parseHTML () {\n        return [\n            {\n                tag: 'ul'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'ul',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            toggleBulletList: ()=>({ commands: commands, chain: chain })=>{\n                    if (this.options.keepAttributes) return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes($99560d28eed0b417$var$ListItemName, this.editor.getAttributes($99560d28eed0b417$var$TextStyleName)).run();\n                    return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-Shift-8': ()=>this.editor.commands.toggleBulletList()\n        };\n    },\n    addInputRules () {\n        let inputRule = (0, $gkCGf.wrappingInputRule)({\n            find: $99560d28eed0b417$export$55b9391925fcc072,\n            type: this.type\n        });\n        if (this.options.keepMarks || this.options.keepAttributes) inputRule = (0, $gkCGf.wrappingInputRule)({\n            find: $99560d28eed0b417$export$55b9391925fcc072,\n            type: this.type,\n            keepMarks: this.options.keepMarks,\n            keepAttributes: this.options.keepAttributes,\n            getAttributes: ()=>{\n                return this.editor.getAttributes($99560d28eed0b417$var$TextStyleName);\n            },\n            editor: this.editor\n        });\n        return [\n            inputRule\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"lluJu\", function(module, exports) {\n\n$parcel$export(module.exports, \"Code\", () => $f8a365fd4a686699$export$52f0f02147b12c03);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * Regular expressions to match inline code blocks enclosed in backticks.\n *  It matches:\n *     - An opening backtick, followed by\n *     - Any text that doesn't include a backtick (captured for marking), followed by\n *     - A closing backtick.\n *  This ensures that any text between backticks is formatted as code,\n *  regardless of the surrounding characters (exception being another backtick).\n */ const $f8a365fd4a686699$export$55b9391925fcc072 = /(^|[^`])`([^`]+)`(?!`)/;\n/**\n * Matches inline code while pasting.\n */ const $f8a365fd4a686699$export$4ed30f8936af1979 = /(^|[^`])`([^`]+)`(?!`)/g;\n/**\n * This extension allows you to mark text as inline code.\n * @see https://tiptap.dev/api/marks/code\n */ const $f8a365fd4a686699$export$52f0f02147b12c03 = (0, $gkCGf.Mark).create({\n    name: 'code',\n    addOptions () {\n        return {\n            HTMLAttributes: {}\n        };\n    },\n    excludes: '_',\n    code: true,\n    exitable: true,\n    parseHTML () {\n        return [\n            {\n                tag: 'code'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'code',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            setCode: ()=>({ commands: commands })=>{\n                    return commands.setMark(this.name);\n                },\n            toggleCode: ()=>({ commands: commands })=>{\n                    return commands.toggleMark(this.name);\n                },\n            unsetCode: ()=>({ commands: commands })=>{\n                    return commands.unsetMark(this.name);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-e': ()=>this.editor.commands.toggleCode()\n        };\n    },\n    addInputRules () {\n        return [\n            (0, $gkCGf.markInputRule)({\n                find: $f8a365fd4a686699$export$55b9391925fcc072,\n                type: this.type\n            })\n        ];\n    },\n    addPasteRules () {\n        return [\n            (0, $gkCGf.markPasteRule)({\n                find: $f8a365fd4a686699$export$4ed30f8936af1979,\n                type: this.type\n            })\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"1BHwg\", function(module, exports) {\n\n$parcel$export(module.exports, \"CodeBlock\", () => $12bb012f8380ac9f$export$6c415d1fdae3dfdb);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\nparcelRequire(\"7fRs0\");\nvar $1LeRC = parcelRequire(\"1LeRC\");\n/**\n * Matches a code block with backticks.\n */ const $12bb012f8380ac9f$export$4f70c75119de8367 = /^```([a-z]+)?[\\s\\n]$/;\n/**\n * Matches a code block with tildes.\n */ const $12bb012f8380ac9f$export$ab3d90a1a99abb84 = /^~~~([a-z]+)?[\\s\\n]$/;\n/**\n * This extension allows you to create code blocks.\n * @see https://tiptap.dev/api/nodes/code-block\n */ const $12bb012f8380ac9f$export$6c415d1fdae3dfdb = (0, $gkCGf.Node).create({\n    name: 'codeBlock',\n    addOptions () {\n        return {\n            languageClassPrefix: 'language-',\n            exitOnTripleEnter: true,\n            exitOnArrowDown: true,\n            defaultLanguage: null,\n            HTMLAttributes: {}\n        };\n    },\n    content: 'text*',\n    marks: '',\n    group: 'block',\n    code: true,\n    defining: true,\n    addAttributes () {\n        return {\n            language: {\n                default: this.options.defaultLanguage,\n                parseHTML: (element)=>{\n                    var _a;\n                    const { languageClassPrefix: languageClassPrefix } = this.options;\n                    const classNames = [\n                        ...((_a = element.firstElementChild) === null || _a === void 0 ? void 0 : _a.classList) || []\n                    ];\n                    const languages = classNames.filter((className)=>className.startsWith(languageClassPrefix)).map((className)=>className.replace(languageClassPrefix, ''));\n                    const language = languages[0];\n                    if (!language) return null;\n                    return language;\n                },\n                rendered: false\n            }\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: 'pre',\n                preserveWhitespace: 'full'\n            }\n        ];\n    },\n    renderHTML ({ node: node, HTMLAttributes: HTMLAttributes }) {\n        return [\n            'pre',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            [\n                'code',\n                {\n                    class: node.attrs.language ? this.options.languageClassPrefix + node.attrs.language : null\n                },\n                0\n            ]\n        ];\n    },\n    addCommands () {\n        return {\n            setCodeBlock: (attributes)=>({ commands: commands })=>{\n                    return commands.setNode(this.name, attributes);\n                },\n            toggleCodeBlock: (attributes)=>({ commands: commands })=>{\n                    return commands.toggleNode(this.name, 'paragraph', attributes);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-Alt-c': ()=>this.editor.commands.toggleCodeBlock(),\n            // remove code block when at start of document or code block is empty\n            Backspace: ()=>{\n                const { empty: empty, $anchor: $anchor } = this.editor.state.selection;\n                const isAtStart = $anchor.pos === 1;\n                if (!empty || $anchor.parent.type.name !== this.name) return false;\n                if (isAtStart || !$anchor.parent.textContent.length) return this.editor.commands.clearNodes();\n                return false;\n            },\n            // exit node on triple enter\n            Enter: ({ editor: editor })=>{\n                if (!this.options.exitOnTripleEnter) return false;\n                const { state: state } = editor;\n                const { selection: selection } = state;\n                const { $from: $from, empty: empty } = selection;\n                if (!empty || $from.parent.type !== this.type) return false;\n                const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;\n                const endsWithDoubleNewline = $from.parent.textContent.endsWith('\\n\\n');\n                if (!isAtEnd || !endsWithDoubleNewline) return false;\n                return editor.chain().command(({ tr: tr })=>{\n                    tr.delete($from.pos - 2, $from.pos);\n                    return true;\n                }).exitCode().run();\n            },\n            // exit node on arrow down\n            ArrowDown: ({ editor: editor })=>{\n                if (!this.options.exitOnArrowDown) return false;\n                const { state: state } = editor;\n                const { selection: selection, doc: doc } = state;\n                const { $from: $from, empty: empty } = selection;\n                if (!empty || $from.parent.type !== this.type) return false;\n                const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;\n                if (!isAtEnd) return false;\n                const after = $from.after();\n                if (after === undefined) return false;\n                const nodeAfter = doc.nodeAt(after);\n                if (nodeAfter) return editor.commands.command(({ tr: tr })=>{\n                    tr.setSelection((0, $1LeRC.Selection).near(doc.resolve(after)));\n                    return true;\n                });\n                return editor.commands.exitCode();\n            }\n        };\n    },\n    addInputRules () {\n        return [\n            (0, $gkCGf.textblockTypeInputRule)({\n                find: $12bb012f8380ac9f$export$4f70c75119de8367,\n                type: this.type,\n                getAttributes: (match)=>({\n                        language: match[1]\n                    })\n            }),\n            (0, $gkCGf.textblockTypeInputRule)({\n                find: $12bb012f8380ac9f$export$ab3d90a1a99abb84,\n                type: this.type,\n                getAttributes: (match)=>({\n                        language: match[1]\n                    })\n            })\n        ];\n    },\n    addProseMirrorPlugins () {\n        return [\n            // this plugin creates a code block for pasted content from VS Code\n            // we can also detect the copied code language\n            new (0, $1LeRC.Plugin)({\n                key: new (0, $1LeRC.PluginKey)('codeBlockVSCodeHandler'),\n                props: {\n                    handlePaste: (view, event)=>{\n                        if (!event.clipboardData) return false;\n                        // don’t create a new code block within code blocks\n                        if (this.editor.isActive(this.type.name)) return false;\n                        const text = event.clipboardData.getData('text/plain');\n                        const vscode = event.clipboardData.getData('vscode-editor-data');\n                        const vscodeData = vscode ? JSON.parse(vscode) : undefined;\n                        const language = vscodeData === null || vscodeData === void 0 ? void 0 : vscodeData.mode;\n                        if (!text || !language) return false;\n                        const { tr: tr, schema: schema } = view.state;\n                        // prepare a text node\n                        // strip carriage return chars from text pasted as code\n                        // see: https://github.com/ProseMirror/prosemirror-view/commit/a50a6bcceb4ce52ac8fcc6162488d8875613aacd\n                        const textNode = schema.text(text.replace(/\\r\\n?/g, '\\n'));\n                        // create a code block with the text node\n                        // replace selection with the code block\n                        tr.replaceSelectionWith(this.type.create({\n                            language: language\n                        }, textNode));\n                        if (tr.selection.$from.parent.type !== this.type) // put cursor inside the newly created code block\n                        tr.setSelection((0, $1LeRC.TextSelection).near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))));\n                        // store meta information\n                        // this is useful for other plugins that depends on the paste event\n                        // like the paste rule plugin\n                        tr.setMeta('paste', true);\n                        view.dispatch(tr);\n                        return true;\n                    }\n                }\n            })\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"9aRSD\", function(module, exports) {\n\n$parcel$export(module.exports, \"Document\", () => $6aded7bc8316e260$export$b34a105447964f9f);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * The default document node which represents the top level node of the editor.\n * @see https://tiptap.dev/api/nodes/document\n */ const $6aded7bc8316e260$export$b34a105447964f9f = (0, $gkCGf.Node).create({\n    name: 'doc',\n    topNode: true,\n    content: 'block+'\n});\n\n});\n\nparcelRegister(\"lnzEF\", function(module, exports) {\n\n$parcel$export(module.exports, \"Dropcursor\", () => $f90767477590503a$export$bc16731f26f3900d);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\nparcelRequire(\"a1ERn\");\nvar $e0Vzz = parcelRequire(\"e0Vzz\");\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * inbetween nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */ const $f90767477590503a$export$bc16731f26f3900d = (0, $gkCGf.Extension).create({\n    name: 'dropCursor',\n    addOptions () {\n        return {\n            color: 'currentColor',\n            width: 1,\n            class: undefined\n        };\n    },\n    addProseMirrorPlugins () {\n        return [\n            (0, $e0Vzz.dropCursor)(this.options)\n        ];\n    }\n});\n\n});\nparcelRegister(\"a1ERn\", function(module, exports) {\n$parcel$export(module.exports, \"dropCursor\", () => (parcelRequire(\"e0Vzz\")).dropCursor);\n// dropcursor/index.ts\nparcelRequire(\"e0Vzz\");\n\n});\nparcelRegister(\"e0Vzz\", function(module, exports) {\n\n$parcel$export(module.exports, \"dropCursor\", () => $a33db98654728ae4$export$b8e3092a3bfa2062);\n\nvar $1LeRC = parcelRequire(\"1LeRC\");\n\nvar $gfgdn = parcelRequire(\"gfgdn\");\n/**\nCreate a plugin that, when added to a ProseMirror instance,\ncauses a decoration to show up at the drop position when something\nis dragged over the editor.\n\nNodes may add a `disableDropCursor` property to their spec to\ncontrol the showing of a drop cursor inside them. This may be a\nboolean or a function, which will be called with a view and a\nposition, and should return a boolean.\n*/ function $a33db98654728ae4$export$b8e3092a3bfa2062(options = {}) {\n    return new (0, $1LeRC.Plugin)({\n        view (editorView) {\n            return new $a33db98654728ae4$var$DropCursorView(editorView, options);\n        }\n    });\n}\nclass $a33db98654728ae4$var$DropCursorView {\n    constructor(editorView, options){\n        var _a;\n        this.editorView = editorView;\n        this.cursorPos = null;\n        this.element = null;\n        this.timeout = -1;\n        this.width = (_a = options.width) !== null && _a !== void 0 ? _a : 1;\n        this.color = options.color === false ? undefined : options.color || \"black\";\n        this.class = options.class;\n        this.handlers = [\n            \"dragover\",\n            \"dragend\",\n            \"drop\",\n            \"dragleave\"\n        ].map((name)=>{\n            let handler = (e)=>{\n                this[name](e);\n            };\n            editorView.dom.addEventListener(name, handler);\n            return {\n                name: name,\n                handler: handler\n            };\n        });\n    }\n    destroy() {\n        this.handlers.forEach(({ name: name, handler: handler })=>this.editorView.dom.removeEventListener(name, handler));\n    }\n    update(editorView, prevState) {\n        if (this.cursorPos != null && prevState.doc != editorView.state.doc) {\n            if (this.cursorPos > editorView.state.doc.content.size) this.setCursor(null);\n            else this.updateOverlay();\n        }\n    }\n    setCursor(pos) {\n        if (pos == this.cursorPos) return;\n        this.cursorPos = pos;\n        if (pos == null) {\n            this.element.parentNode.removeChild(this.element);\n            this.element = null;\n        } else this.updateOverlay();\n    }\n    updateOverlay() {\n        let $pos = this.editorView.state.doc.resolve(this.cursorPos);\n        let isBlock = !$pos.parent.inlineContent, rect;\n        if (isBlock) {\n            let before = $pos.nodeBefore, after = $pos.nodeAfter;\n            if (before || after) {\n                let node = this.editorView.nodeDOM(this.cursorPos - (before ? before.nodeSize : 0));\n                if (node) {\n                    let nodeRect = node.getBoundingClientRect();\n                    let top = before ? nodeRect.bottom : nodeRect.top;\n                    if (before && after) top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2;\n                    rect = {\n                        left: nodeRect.left,\n                        right: nodeRect.right,\n                        top: top - this.width / 2,\n                        bottom: top + this.width / 2\n                    };\n                }\n            }\n        }\n        if (!rect) {\n            let coords = this.editorView.coordsAtPos(this.cursorPos);\n            rect = {\n                left: coords.left - this.width / 2,\n                right: coords.left + this.width / 2,\n                top: coords.top,\n                bottom: coords.bottom\n            };\n        }\n        let parent = this.editorView.dom.offsetParent;\n        if (!this.element) {\n            this.element = parent.appendChild(document.createElement(\"div\"));\n            if (this.class) this.element.className = this.class;\n            this.element.style.cssText = \"position: absolute; z-index: 50; pointer-events: none;\";\n            if (this.color) this.element.style.backgroundColor = this.color;\n        }\n        this.element.classList.toggle(\"prosemirror-dropcursor-block\", isBlock);\n        this.element.classList.toggle(\"prosemirror-dropcursor-inline\", !isBlock);\n        let parentLeft, parentTop;\n        if (!parent || parent == document.body && getComputedStyle(parent).position == \"static\") {\n            parentLeft = -pageXOffset;\n            parentTop = -pageYOffset;\n        } else {\n            let rect = parent.getBoundingClientRect();\n            parentLeft = rect.left - parent.scrollLeft;\n            parentTop = rect.top - parent.scrollTop;\n        }\n        this.element.style.left = rect.left - parentLeft + \"px\";\n        this.element.style.top = rect.top - parentTop + \"px\";\n        this.element.style.width = rect.right - rect.left + \"px\";\n        this.element.style.height = rect.bottom - rect.top + \"px\";\n    }\n    scheduleRemoval(timeout) {\n        clearTimeout(this.timeout);\n        this.timeout = setTimeout(()=>this.setCursor(null), timeout);\n    }\n    dragover(event) {\n        if (!this.editorView.editable) return;\n        let pos = this.editorView.posAtCoords({\n            left: event.clientX,\n            top: event.clientY\n        });\n        let node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside);\n        let disableDropCursor = node && node.type.spec.disableDropCursor;\n        let disabled = typeof disableDropCursor == \"function\" ? disableDropCursor(this.editorView, pos, event) : disableDropCursor;\n        if (pos && !disabled) {\n            let target = pos.pos;\n            if (this.editorView.dragging && this.editorView.dragging.slice) {\n                let point = (0, $gfgdn.dropPoint)(this.editorView.state.doc, target, this.editorView.dragging.slice);\n                if (point != null) target = point;\n            }\n            this.setCursor(target);\n            this.scheduleRemoval(5000);\n        }\n    }\n    dragend() {\n        this.scheduleRemoval(20);\n    }\n    drop() {\n        this.scheduleRemoval(20);\n    }\n    dragleave(event) {\n        if (event.target == this.editorView.dom || !this.editorView.dom.contains(event.relatedTarget)) this.setCursor(null);\n    }\n}\n\n});\n\n\n\nparcelRegister(\"i3rT4\", function(module, exports) {\n\n$parcel$export(module.exports, \"Gapcursor\", () => $d24e23a4ef2e6f18$export$79c3dcaa03287f63);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\nparcelRequire(\"hZrtw\");\nvar $f94iL = parcelRequire(\"f94iL\");\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */ const $d24e23a4ef2e6f18$export$79c3dcaa03287f63 = (0, $gkCGf.Extension).create({\n    name: 'gapCursor',\n    addProseMirrorPlugins () {\n        return [\n            (0, $f94iL.gapCursor)()\n        ];\n    },\n    extendNodeSchema (extension) {\n        var _a;\n        const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage\n        };\n        return {\n            allowGapCursor: (_a = (0, $gkCGf.callOrReturn)((0, $gkCGf.getExtensionField)(extension, 'allowGapCursor', context))) !== null && _a !== void 0 ? _a : null\n        };\n    }\n});\n\n});\nparcelRegister(\"hZrtw\", function(module, exports) {\n$parcel$export(module.exports, \"gapCursor\", () => (parcelRequire(\"f94iL\")).gapCursor);\n// gapcursor/index.ts\nparcelRequire(\"f94iL\");\n\n});\nparcelRegister(\"f94iL\", function(module, exports) {\n\n$parcel$export(module.exports, \"gapCursor\", () => $b06b087e5c2a3bdd$export$54f46a1492d5247);\n\nvar $18HhN = parcelRequire(\"18HhN\");\n\nvar $1LeRC = parcelRequire(\"1LeRC\");\n\nvar $1krlL = parcelRequire(\"1krlL\");\n\nvar $edQEX = parcelRequire(\"edQEX\");\n/**\nGap cursor selections are represented using this class. Its\n`$anchor` and `$head` properties both point at the cursor position.\n*/ class $b06b087e5c2a3bdd$export$3d3d259665dcb4d4 extends (0, $1LeRC.Selection) {\n    /**\n    Create a gap cursor.\n    */ constructor($pos){\n        super($pos, $pos);\n    }\n    map(doc, mapping) {\n        let $pos = doc.resolve(mapping.map(this.head));\n        return $b06b087e5c2a3bdd$export$3d3d259665dcb4d4.valid($pos) ? new $b06b087e5c2a3bdd$export$3d3d259665dcb4d4($pos) : (0, $1LeRC.Selection).near($pos);\n    }\n    content() {\n        return (0, $1krlL.Slice).empty;\n    }\n    eq(other) {\n        return other instanceof $b06b087e5c2a3bdd$export$3d3d259665dcb4d4 && other.head == this.head;\n    }\n    toJSON() {\n        return {\n            type: \"gapcursor\",\n            pos: this.head\n        };\n    }\n    /**\n    @internal\n    */ static fromJSON(doc, json) {\n        if (typeof json.pos != \"number\") throw new RangeError(\"Invalid input for GapCursor.fromJSON\");\n        return new $b06b087e5c2a3bdd$export$3d3d259665dcb4d4(doc.resolve(json.pos));\n    }\n    /**\n    @internal\n    */ getBookmark() {\n        return new $b06b087e5c2a3bdd$var$GapBookmark(this.anchor);\n    }\n    /**\n    @internal\n    */ static valid($pos) {\n        let parent = $pos.parent;\n        if (parent.isTextblock || !$b06b087e5c2a3bdd$var$closedBefore($pos) || !$b06b087e5c2a3bdd$var$closedAfter($pos)) return false;\n        let override = parent.type.spec.allowGapCursor;\n        if (override != null) return override;\n        let deflt = parent.contentMatchAt($pos.index()).defaultType;\n        return deflt && deflt.isTextblock;\n    }\n    /**\n    @internal\n    */ static findGapCursorFrom($pos, dir, mustMove = false) {\n        search: for(;;){\n            if (!mustMove && $b06b087e5c2a3bdd$export$3d3d259665dcb4d4.valid($pos)) return $pos;\n            let pos = $pos.pos, next = null;\n            // Scan up from this position\n            for(let d = $pos.depth;; d--){\n                let parent = $pos.node(d);\n                if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {\n                    next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);\n                    break;\n                } else if (d == 0) return null;\n                pos += dir;\n                let $cur = $pos.doc.resolve(pos);\n                if ($b06b087e5c2a3bdd$export$3d3d259665dcb4d4.valid($cur)) return $cur;\n            }\n            // And then down into the next node\n            for(;;){\n                let inside = dir > 0 ? next.firstChild : next.lastChild;\n                if (!inside) {\n                    if (next.isAtom && !next.isText && !(0, $1LeRC.NodeSelection).isSelectable(next)) {\n                        $pos = $pos.doc.resolve(pos + next.nodeSize * dir);\n                        mustMove = false;\n                        continue search;\n                    }\n                    break;\n                }\n                next = inside;\n                pos += dir;\n                let $cur = $pos.doc.resolve(pos);\n                if ($b06b087e5c2a3bdd$export$3d3d259665dcb4d4.valid($cur)) return $cur;\n            }\n            return null;\n        }\n    }\n}\n$b06b087e5c2a3bdd$export$3d3d259665dcb4d4.prototype.visible = false;\n$b06b087e5c2a3bdd$export$3d3d259665dcb4d4.findFrom = $b06b087e5c2a3bdd$export$3d3d259665dcb4d4.findGapCursorFrom;\n(0, $1LeRC.Selection).jsonID(\"gapcursor\", $b06b087e5c2a3bdd$export$3d3d259665dcb4d4);\nclass $b06b087e5c2a3bdd$var$GapBookmark {\n    constructor(pos){\n        this.pos = pos;\n    }\n    map(mapping) {\n        return new $b06b087e5c2a3bdd$var$GapBookmark(mapping.map(this.pos));\n    }\n    resolve(doc) {\n        let $pos = doc.resolve(this.pos);\n        return $b06b087e5c2a3bdd$export$3d3d259665dcb4d4.valid($pos) ? new $b06b087e5c2a3bdd$export$3d3d259665dcb4d4($pos) : (0, $1LeRC.Selection).near($pos);\n    }\n}\nfunction $b06b087e5c2a3bdd$var$closedBefore($pos) {\n    for(let d = $pos.depth; d >= 0; d--){\n        let index = $pos.index(d), parent = $pos.node(d);\n        // At the start of this parent, look at next one\n        if (index == 0) {\n            if (parent.type.spec.isolating) return true;\n            continue;\n        }\n        // See if the node before (or its first ancestor) is closed\n        for(let before = parent.child(index - 1);; before = before.lastChild){\n            if (before.childCount == 0 && !before.inlineContent || before.isAtom || before.type.spec.isolating) return true;\n            if (before.inlineContent) return false;\n        }\n    }\n    // Hit start of document\n    return true;\n}\nfunction $b06b087e5c2a3bdd$var$closedAfter($pos) {\n    for(let d = $pos.depth; d >= 0; d--){\n        let index = $pos.indexAfter(d), parent = $pos.node(d);\n        if (index == parent.childCount) {\n            if (parent.type.spec.isolating) return true;\n            continue;\n        }\n        for(let after = parent.child(index);; after = after.firstChild){\n            if (after.childCount == 0 && !after.inlineContent || after.isAtom || after.type.spec.isolating) return true;\n            if (after.inlineContent) return false;\n        }\n    }\n    return true;\n}\n/**\nCreate a gap cursor plugin. When enabled, this will capture clicks\nnear and arrow-key-motion past places that don't have a normally\nselectable position nearby, and create a gap cursor selection for\nthem. The cursor is drawn as an element with class\n`ProseMirror-gapcursor`. You can either include\n`style/gapcursor.css` from the package's directory or add your own\nstyles to make it visible.\n*/ function $b06b087e5c2a3bdd$export$54f46a1492d5247() {\n    return new (0, $1LeRC.Plugin)({\n        props: {\n            decorations: $b06b087e5c2a3bdd$var$drawGapCursor,\n            createSelectionBetween (_view, $anchor, $head) {\n                return $anchor.pos == $head.pos && $b06b087e5c2a3bdd$export$3d3d259665dcb4d4.valid($head) ? new $b06b087e5c2a3bdd$export$3d3d259665dcb4d4($head) : null;\n            },\n            handleClick: $b06b087e5c2a3bdd$var$handleClick,\n            handleKeyDown: $b06b087e5c2a3bdd$var$handleKeyDown,\n            handleDOMEvents: {\n                beforeinput: $b06b087e5c2a3bdd$var$beforeinput\n            }\n        }\n    });\n}\nconst $b06b087e5c2a3bdd$var$handleKeyDown = (0, $18HhN.keydownHandler)({\n    \"ArrowLeft\": $b06b087e5c2a3bdd$var$arrow(\"horiz\", -1),\n    \"ArrowRight\": $b06b087e5c2a3bdd$var$arrow(\"horiz\", 1),\n    \"ArrowUp\": $b06b087e5c2a3bdd$var$arrow(\"vert\", -1),\n    \"ArrowDown\": $b06b087e5c2a3bdd$var$arrow(\"vert\", 1)\n});\nfunction $b06b087e5c2a3bdd$var$arrow(axis, dir) {\n    const dirStr = axis == \"vert\" ? dir > 0 ? \"down\" : \"up\" : dir > 0 ? \"right\" : \"left\";\n    return function(state, dispatch, view) {\n        let sel = state.selection;\n        let $start = dir > 0 ? sel.$to : sel.$from, mustMove = sel.empty;\n        if (sel instanceof (0, $1LeRC.TextSelection)) {\n            if (!view.endOfTextblock(dirStr) || $start.depth == 0) return false;\n            mustMove = false;\n            $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before());\n        }\n        let $found = $b06b087e5c2a3bdd$export$3d3d259665dcb4d4.findGapCursorFrom($start, dir, mustMove);\n        if (!$found) return false;\n        if (dispatch) dispatch(state.tr.setSelection(new $b06b087e5c2a3bdd$export$3d3d259665dcb4d4($found)));\n        return true;\n    };\n}\nfunction $b06b087e5c2a3bdd$var$handleClick(view, pos, event) {\n    if (!view || !view.editable) return false;\n    let $pos = view.state.doc.resolve(pos);\n    if (!$b06b087e5c2a3bdd$export$3d3d259665dcb4d4.valid($pos)) return false;\n    let clickPos = view.posAtCoords({\n        left: event.clientX,\n        top: event.clientY\n    });\n    if (clickPos && clickPos.inside > -1 && (0, $1LeRC.NodeSelection).isSelectable(view.state.doc.nodeAt(clickPos.inside))) return false;\n    view.dispatch(view.state.tr.setSelection(new $b06b087e5c2a3bdd$export$3d3d259665dcb4d4($pos)));\n    return true;\n}\n// This is a hack that, when a composition starts while a gap cursor\n// is active, quickly creates an inline context for the composition to\n// happen in, to avoid it being aborted by the DOM selection being\n// moved into a valid position.\nfunction $b06b087e5c2a3bdd$var$beforeinput(view, event) {\n    if (event.inputType != \"insertCompositionText\" || !(view.state.selection instanceof $b06b087e5c2a3bdd$export$3d3d259665dcb4d4)) return false;\n    let { $from: $from } = view.state.selection;\n    let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);\n    if (!insert) return false;\n    let frag = (0, $1krlL.Fragment).empty;\n    for(let i = insert.length - 1; i >= 0; i--)frag = (0, $1krlL.Fragment).from(insert[i].createAndFill(null, frag));\n    let tr = view.state.tr.replace($from.pos, $from.pos, new (0, $1krlL.Slice)(frag, 0, 0));\n    tr.setSelection((0, $1LeRC.TextSelection).near(tr.doc.resolve($from.pos + 1)));\n    view.dispatch(tr);\n    return false;\n}\nfunction $b06b087e5c2a3bdd$var$drawGapCursor(state) {\n    if (!(state.selection instanceof $b06b087e5c2a3bdd$export$3d3d259665dcb4d4)) return null;\n    let node = document.createElement(\"div\");\n    node.className = \"ProseMirror-gapcursor\";\n    return (0, $edQEX.DecorationSet).create(state.doc, [\n        (0, $edQEX.Decoration).widget(state.selection.head, node, {\n            key: \"gapcursor\"\n        })\n    ]);\n}\n\n});\n\n\n\nparcelRegister(\"k7DD8\", function(module, exports) {\n\n$parcel$export(module.exports, \"HardBreak\", () => $ea6333d2d29ed452$export$d3d3fac13fa635d9);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * This extension allows you to insert hard breaks.\n * @see https://www.tiptap.dev/api/nodes/hard-break\n */ const $ea6333d2d29ed452$export$d3d3fac13fa635d9 = (0, $gkCGf.Node).create({\n    name: 'hardBreak',\n    addOptions () {\n        return {\n            keepMarks: true,\n            HTMLAttributes: {}\n        };\n    },\n    inline: true,\n    group: 'inline',\n    selectable: false,\n    linebreakReplacement: true,\n    parseHTML () {\n        return [\n            {\n                tag: 'br'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'br',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes)\n        ];\n    },\n    renderText () {\n        return '\\n';\n    },\n    addCommands () {\n        return {\n            setHardBreak: ()=>({ commands: commands, chain: chain, state: state, editor: editor })=>{\n                    return commands.first([\n                        ()=>commands.exitCode(),\n                        ()=>commands.command(()=>{\n                                const { selection: selection, storedMarks: storedMarks } = state;\n                                if (selection.$from.parent.type.spec.isolating) return false;\n                                const { keepMarks: keepMarks } = this.options;\n                                const { splittableMarks: splittableMarks } = editor.extensionManager;\n                                const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks();\n                                return chain().insertContent({\n                                    type: this.name\n                                }).command(({ tr: tr, dispatch: dispatch })=>{\n                                    if (dispatch && marks && keepMarks) {\n                                        const filteredMarks = marks.filter((mark)=>splittableMarks.includes(mark.type.name));\n                                        tr.ensureMarks(filteredMarks);\n                                    }\n                                    return true;\n                                }).run();\n                            })\n                    ]);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-Enter': ()=>this.editor.commands.setHardBreak(),\n            'Shift-Enter': ()=>this.editor.commands.setHardBreak()\n        };\n    }\n});\n\n});\n\nparcelRegister(\"4w6kx\", function(module, exports) {\n\n$parcel$export(module.exports, \"Heading\", () => $349f0fa639d26eec$export$a8a3e93435678ff9);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * This extension allows you to create headings.\n * @see https://www.tiptap.dev/api/nodes/heading\n */ const $349f0fa639d26eec$export$a8a3e93435678ff9 = (0, $gkCGf.Node).create({\n    name: 'heading',\n    addOptions () {\n        return {\n            levels: [\n                1,\n                2,\n                3,\n                4,\n                5,\n                6\n            ],\n            HTMLAttributes: {}\n        };\n    },\n    content: 'inline*',\n    group: 'block',\n    defining: true,\n    addAttributes () {\n        return {\n            level: {\n                default: 1,\n                rendered: false\n            }\n        };\n    },\n    parseHTML () {\n        return this.options.levels.map((level)=>({\n                tag: `h${level}`,\n                attrs: {\n                    level: level\n                }\n            }));\n    },\n    renderHTML ({ node: node, HTMLAttributes: HTMLAttributes }) {\n        const hasLevel = this.options.levels.includes(node.attrs.level);\n        const level = hasLevel ? node.attrs.level : this.options.levels[0];\n        return [\n            `h${level}`,\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            setHeading: (attributes)=>({ commands: commands })=>{\n                    if (!this.options.levels.includes(attributes.level)) return false;\n                    return commands.setNode(this.name, attributes);\n                },\n            toggleHeading: (attributes)=>({ commands: commands })=>{\n                    if (!this.options.levels.includes(attributes.level)) return false;\n                    return commands.toggleNode(this.name, 'paragraph', attributes);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return this.options.levels.reduce((items, level)=>({\n                ...items,\n                [`Mod-Alt-${level}`]: ()=>this.editor.commands.toggleHeading({\n                        level: level\n                    })\n            }), {});\n    },\n    addInputRules () {\n        return this.options.levels.map((level)=>{\n            return (0, $gkCGf.textblockTypeInputRule)({\n                find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\\\s$`),\n                type: this.type,\n                getAttributes: {\n                    level: level\n                }\n            });\n        });\n    }\n});\n\n});\n\nparcelRegister(\"luyzA\", function(module, exports) {\n\n$parcel$export(module.exports, \"History\", () => $fa5737cb756d0d98$export$84202caead5689ba);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\nparcelRequire(\"7sCP3\");\nvar $1WaCX = parcelRequire(\"1WaCX\");\n/**\n * This extension allows you to undo and redo recent changes.\n * @see https://www.tiptap.dev/api/extensions/history\n *\n * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n * the `history` extension, as it is not compatible with the `collaboration` extension.\n *\n * `@tiptap/extension-collaboration` uses its own history implementation.\n */ const $fa5737cb756d0d98$export$84202caead5689ba = (0, $gkCGf.Extension).create({\n    name: 'history',\n    addOptions () {\n        return {\n            depth: 100,\n            newGroupDelay: 500\n        };\n    },\n    addCommands () {\n        return {\n            undo: ()=>({ state: state, dispatch: dispatch })=>{\n                    return (0, $1WaCX.undo)(state, dispatch);\n                },\n            redo: ()=>({ state: state, dispatch: dispatch })=>{\n                    return (0, $1WaCX.redo)(state, dispatch);\n                }\n        };\n    },\n    addProseMirrorPlugins () {\n        return [\n            (0, $1WaCX.history)(this.options)\n        ];\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-z': ()=>this.editor.commands.undo(),\n            'Shift-Mod-z': ()=>this.editor.commands.redo(),\n            'Mod-y': ()=>this.editor.commands.redo(),\n            // Russian keyboard layouts\n            \"Mod-\\u044F\": ()=>this.editor.commands.undo(),\n            \"Shift-Mod-\\u044F\": ()=>this.editor.commands.redo()\n        };\n    }\n});\n\n});\nparcelRegister(\"7sCP3\", function(module, exports) {\n$parcel$export(module.exports, \"history\", () => (parcelRequire(\"1WaCX\")).history);\n$parcel$export(module.exports, \"redo\", () => (parcelRequire(\"1WaCX\")).redo);\n$parcel$export(module.exports, \"undo\", () => (parcelRequire(\"1WaCX\")).undo);\n// history/index.ts\nparcelRequire(\"1WaCX\");\n\n});\nparcelRegister(\"1WaCX\", function(module, exports) {\n\n$parcel$export(module.exports, \"history\", () => $16937392103b9646$export$55abd4691b317664);\n$parcel$export(module.exports, \"undo\", () => $16937392103b9646$export$21f930c44940fd98);\n$parcel$export(module.exports, \"redo\", () => $16937392103b9646$export$1688e416fee0a49e);\n\nvar $i65BY = parcelRequire(\"i65BY\");\n\nvar $gfgdn = parcelRequire(\"gfgdn\");\n\nvar $1LeRC = parcelRequire(\"1LeRC\");\n// ProseMirror's history isn't simply a way to roll back to a previous\n// state, because ProseMirror supports applying changes without adding\n// them to the history (for example during collaboration).\n//\n// To this end, each 'Branch' (one for the undo history and one for\n// the redo history) keeps an array of 'Items', which can optionally\n// hold a step (an actual undoable change), and always hold a position\n// map (which is needed to move changes below them to apply to the\n// current document).\n//\n// An item that has both a step and a selection bookmark is the start\n// of an 'event' — a group of changes that will be undone or redone at\n// once. (It stores only the bookmark, since that way we don't have to\n// provide a document until the selection is actually applied, which\n// is useful when compressing.)\n// Used to schedule history compression\nconst $16937392103b9646$var$max_empty_items = 500;\nclass $16937392103b9646$var$Branch {\n    constructor(items, eventCount){\n        this.items = items;\n        this.eventCount = eventCount;\n    }\n    // Pop the latest event off the branch's history and apply it\n    // to a document transform.\n    popEvent(state, preserveItems) {\n        if (this.eventCount == 0) return null;\n        let end = this.items.length;\n        for(;; end--){\n            let next = this.items.get(end - 1);\n            if (next.selection) {\n                --end;\n                break;\n            }\n        }\n        let remap, mapFrom;\n        if (preserveItems) {\n            remap = this.remapping(end, this.items.length);\n            mapFrom = remap.maps.length;\n        }\n        let transform = state.tr;\n        let selection, remaining;\n        let addAfter = [], addBefore = [];\n        this.items.forEach((item, i)=>{\n            if (!item.step) {\n                if (!remap) {\n                    remap = this.remapping(end, i + 1);\n                    mapFrom = remap.maps.length;\n                }\n                mapFrom--;\n                addBefore.push(item);\n                return;\n            }\n            if (remap) {\n                addBefore.push(new $16937392103b9646$var$Item(item.map));\n                let step = item.step.map(remap.slice(mapFrom)), map;\n                if (step && transform.maybeStep(step).doc) {\n                    map = transform.mapping.maps[transform.mapping.maps.length - 1];\n                    addAfter.push(new $16937392103b9646$var$Item(map, undefined, undefined, addAfter.length + addBefore.length));\n                }\n                mapFrom--;\n                if (map) remap.appendMap(map, mapFrom);\n            } else transform.maybeStep(item.step);\n            if (item.selection) {\n                selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection;\n                remaining = new $16937392103b9646$var$Branch(this.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this.eventCount - 1);\n                return false;\n            }\n        }, this.items.length, 0);\n        return {\n            remaining: remaining,\n            transform: transform,\n            selection: selection\n        };\n    }\n    // Create a new branch with the given transform added.\n    addTransform(transform, selection, histOptions, preserveItems) {\n        let newItems = [], eventCount = this.eventCount;\n        let oldItems = this.items, lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null;\n        for(let i = 0; i < transform.steps.length; i++){\n            let step = transform.steps[i].invert(transform.docs[i]);\n            let item = new $16937392103b9646$var$Item(transform.mapping.maps[i], step, selection), merged;\n            if (merged = lastItem && lastItem.merge(item)) {\n                item = merged;\n                if (i) newItems.pop();\n                else oldItems = oldItems.slice(0, oldItems.length - 1);\n            }\n            newItems.push(item);\n            if (selection) {\n                eventCount++;\n                selection = undefined;\n            }\n            if (!preserveItems) lastItem = item;\n        }\n        let overflow = eventCount - histOptions.depth;\n        if (overflow > $16937392103b9646$var$DEPTH_OVERFLOW) {\n            oldItems = $16937392103b9646$var$cutOffEvents(oldItems, overflow);\n            eventCount -= overflow;\n        }\n        return new $16937392103b9646$var$Branch(oldItems.append(newItems), eventCount);\n    }\n    remapping(from, to) {\n        let maps = new (0, $gfgdn.Mapping);\n        this.items.forEach((item, i)=>{\n            let mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from ? maps.maps.length - item.mirrorOffset : undefined;\n            maps.appendMap(item.map, mirrorPos);\n        }, from, to);\n        return maps;\n    }\n    addMaps(array) {\n        if (this.eventCount == 0) return this;\n        return new $16937392103b9646$var$Branch(this.items.append(array.map((map)=>new $16937392103b9646$var$Item(map))), this.eventCount);\n    }\n    // When the collab module receives remote changes, the history has\n    // to know about those, so that it can adjust the steps that were\n    // rebased on top of the remote changes, and include the position\n    // maps for the remote changes in its array of items.\n    rebased(rebasedTransform, rebasedCount) {\n        if (!this.eventCount) return this;\n        let rebasedItems = [], start = Math.max(0, this.items.length - rebasedCount);\n        let mapping = rebasedTransform.mapping;\n        let newUntil = rebasedTransform.steps.length;\n        let eventCount = this.eventCount;\n        this.items.forEach((item)=>{\n            if (item.selection) eventCount--;\n        }, start);\n        let iRebased = rebasedCount;\n        this.items.forEach((item)=>{\n            let pos = mapping.getMirror(--iRebased);\n            if (pos == null) return;\n            newUntil = Math.min(newUntil, pos);\n            let map = mapping.maps[pos];\n            if (item.step) {\n                let step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]);\n                let selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos));\n                if (selection) eventCount++;\n                rebasedItems.push(new $16937392103b9646$var$Item(map, step, selection));\n            } else rebasedItems.push(new $16937392103b9646$var$Item(map));\n        }, start);\n        let newMaps = [];\n        for(let i = rebasedCount; i < newUntil; i++)newMaps.push(new $16937392103b9646$var$Item(mapping.maps[i]));\n        let items = this.items.slice(0, start).append(newMaps).append(rebasedItems);\n        let branch = new $16937392103b9646$var$Branch(items, eventCount);\n        if (branch.emptyItemCount() > $16937392103b9646$var$max_empty_items) branch = branch.compress(this.items.length - rebasedItems.length);\n        return branch;\n    }\n    emptyItemCount() {\n        let count = 0;\n        this.items.forEach((item)=>{\n            if (!item.step) count++;\n        });\n        return count;\n    }\n    // Compressing a branch means rewriting it to push the air (map-only\n    // items) out. During collaboration, these naturally accumulate\n    // because each remote change adds one. The `upto` argument is used\n    // to ensure that only the items below a given level are compressed,\n    // because `rebased` relies on a clean, untouched set of items in\n    // order to associate old items with rebased steps.\n    compress(upto = this.items.length) {\n        let remap = this.remapping(0, upto), mapFrom = remap.maps.length;\n        let items = [], events = 0;\n        this.items.forEach((item, i)=>{\n            if (i >= upto) {\n                items.push(item);\n                if (item.selection) events++;\n            } else if (item.step) {\n                let step = item.step.map(remap.slice(mapFrom)), map = step && step.getMap();\n                mapFrom--;\n                if (map) remap.appendMap(map, mapFrom);\n                if (step) {\n                    let selection = item.selection && item.selection.map(remap.slice(mapFrom));\n                    if (selection) events++;\n                    let newItem = new $16937392103b9646$var$Item(map.invert(), step, selection), merged, last = items.length - 1;\n                    if (merged = items.length && items[last].merge(newItem)) items[last] = merged;\n                    else items.push(newItem);\n                }\n            } else if (item.map) mapFrom--;\n        }, this.items.length, 0);\n        return new $16937392103b9646$var$Branch((0, $i65BY.default).from(items.reverse()), events);\n    }\n}\n$16937392103b9646$var$Branch.empty = new $16937392103b9646$var$Branch((0, $i65BY.default).empty, 0);\nfunction $16937392103b9646$var$cutOffEvents(items, n) {\n    let cutPoint;\n    items.forEach((item, i)=>{\n        if (item.selection && n-- == 0) {\n            cutPoint = i;\n            return false;\n        }\n    });\n    return items.slice(cutPoint);\n}\nclass $16937392103b9646$var$Item {\n    constructor(// The (forward) step map for this item.\n    map, // The inverted step\n    step, // If this is non-null, this item is the start of a group, and\n    // this selection is the starting selection for the group (the one\n    // that was active before the first step was applied)\n    selection, // If this item is the inverse of a previous mapping on the stack,\n    // this points at the inverse's offset\n    mirrorOffset){\n        this.map = map;\n        this.step = step;\n        this.selection = selection;\n        this.mirrorOffset = mirrorOffset;\n    }\n    merge(other) {\n        if (this.step && other.step && !other.selection) {\n            let step = other.step.merge(this.step);\n            if (step) return new $16937392103b9646$var$Item(step.getMap().invert(), step, this.selection);\n        }\n    }\n}\n// The value of the state field that tracks undo/redo history for that\n// state. Will be stored in the plugin state when the history plugin\n// is active.\nclass $16937392103b9646$var$HistoryState {\n    constructor(done, undone, prevRanges, prevTime, prevComposition){\n        this.done = done;\n        this.undone = undone;\n        this.prevRanges = prevRanges;\n        this.prevTime = prevTime;\n        this.prevComposition = prevComposition;\n    }\n}\nconst $16937392103b9646$var$DEPTH_OVERFLOW = 20;\n// Record a transformation in undo history.\nfunction $16937392103b9646$var$applyTransaction(history, state, tr, options) {\n    let historyTr = tr.getMeta($16937392103b9646$var$historyKey), rebased;\n    if (historyTr) return historyTr.historyState;\n    if (tr.getMeta($16937392103b9646$var$closeHistoryKey)) history = new $16937392103b9646$var$HistoryState(history.done, history.undone, null, 0, -1);\n    let appended = tr.getMeta(\"appendedTransaction\");\n    if (tr.steps.length == 0) return history;\n    else if (appended && appended.getMeta($16937392103b9646$var$historyKey)) {\n        if (appended.getMeta($16937392103b9646$var$historyKey).redo) return new $16937392103b9646$var$HistoryState(history.done.addTransform(tr, undefined, options, $16937392103b9646$var$mustPreserveItems(state)), history.undone, $16937392103b9646$var$rangesFor(tr.mapping.maps), history.prevTime, history.prevComposition);\n        else return new $16937392103b9646$var$HistoryState(history.done, history.undone.addTransform(tr, undefined, options, $16937392103b9646$var$mustPreserveItems(state)), null, history.prevTime, history.prevComposition);\n    } else if (tr.getMeta(\"addToHistory\") !== false && !(appended && appended.getMeta(\"addToHistory\") === false)) {\n        // Group transforms that occur in quick succession into one event.\n        let composition = tr.getMeta(\"composition\");\n        let newGroup = history.prevTime == 0 || !appended && history.prevComposition != composition && (history.prevTime < (tr.time || 0) - options.newGroupDelay || !$16937392103b9646$var$isAdjacentTo(tr, history.prevRanges));\n        let prevRanges = appended ? $16937392103b9646$var$mapRanges(history.prevRanges, tr.mapping) : $16937392103b9646$var$rangesFor(tr.mapping.maps);\n        return new $16937392103b9646$var$HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : undefined, options, $16937392103b9646$var$mustPreserveItems(state)), $16937392103b9646$var$Branch.empty, prevRanges, tr.time, composition == null ? history.prevComposition : composition);\n    } else if (rebased = tr.getMeta(\"rebased\")) // Used by the collab module to tell the history that some of its\n    // content has been rebased.\n    return new $16937392103b9646$var$HistoryState(history.done.rebased(tr, rebased), history.undone.rebased(tr, rebased), $16937392103b9646$var$mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition);\n    else return new $16937392103b9646$var$HistoryState(history.done.addMaps(tr.mapping.maps), history.undone.addMaps(tr.mapping.maps), $16937392103b9646$var$mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition);\n}\nfunction $16937392103b9646$var$isAdjacentTo(transform, prevRanges) {\n    if (!prevRanges) return false;\n    if (!transform.docChanged) return true;\n    let adjacent = false;\n    transform.mapping.maps[0].forEach((start, end)=>{\n        for(let i = 0; i < prevRanges.length; i += 2)if (start <= prevRanges[i + 1] && end >= prevRanges[i]) adjacent = true;\n    });\n    return adjacent;\n}\nfunction $16937392103b9646$var$rangesFor(maps) {\n    let result = [];\n    for(let i = maps.length - 1; i >= 0 && result.length == 0; i--)maps[i].forEach((_from, _to, from, to)=>result.push(from, to));\n    return result;\n}\nfunction $16937392103b9646$var$mapRanges(ranges, mapping) {\n    if (!ranges) return null;\n    let result = [];\n    for(let i = 0; i < ranges.length; i += 2){\n        let from = mapping.map(ranges[i], 1), to = mapping.map(ranges[i + 1], -1);\n        if (from <= to) result.push(from, to);\n    }\n    return result;\n}\n// Apply the latest event from one branch to the document and shift the event\n// onto the other branch.\nfunction $16937392103b9646$var$histTransaction(history, state, redo) {\n    let preserveItems = $16937392103b9646$var$mustPreserveItems(state);\n    let histOptions = $16937392103b9646$var$historyKey.get(state).spec.config;\n    let pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);\n    if (!pop) return null;\n    let selection = pop.selection.resolve(pop.transform.doc);\n    let added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems);\n    let newHist = new $16937392103b9646$var$HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0, -1);\n    return pop.transform.setSelection(selection).setMeta($16937392103b9646$var$historyKey, {\n        redo: redo,\n        historyState: newHist\n    });\n}\nlet $16937392103b9646$var$cachedPreserveItems = false, $16937392103b9646$var$cachedPreserveItemsPlugins = null;\n// Check whether any plugin in the given state has a\n// `historyPreserveItems` property in its spec, in which case we must\n// preserve steps exactly as they came in, so that they can be\n// rebased.\nfunction $16937392103b9646$var$mustPreserveItems(state) {\n    let plugins = state.plugins;\n    if ($16937392103b9646$var$cachedPreserveItemsPlugins != plugins) {\n        $16937392103b9646$var$cachedPreserveItems = false;\n        $16937392103b9646$var$cachedPreserveItemsPlugins = plugins;\n        for(let i = 0; i < plugins.length; i++)if (plugins[i].spec.historyPreserveItems) {\n            $16937392103b9646$var$cachedPreserveItems = true;\n            break;\n        }\n    }\n    return $16937392103b9646$var$cachedPreserveItems;\n}\n/**\nSet a flag on the given transaction that will prevent further steps\nfrom being appended to an existing history event (so that they\nrequire a separate undo command to undo).\n*/ function $16937392103b9646$export$181a649d919c589e(tr) {\n    return tr.setMeta($16937392103b9646$var$closeHistoryKey, true);\n}\nconst $16937392103b9646$var$historyKey = new (0, $1LeRC.PluginKey)(\"history\");\nconst $16937392103b9646$var$closeHistoryKey = new (0, $1LeRC.PluginKey)(\"closeHistory\");\n/**\nReturns a plugin that enables the undo history for an editor. The\nplugin will track undo and redo stacks, which can be used with the\n[`undo`](https://prosemirror.net/docs/ref/#history.undo) and [`redo`](https://prosemirror.net/docs/ref/#history.redo) commands.\n\nYou can set an `\"addToHistory\"` [metadata\nproperty](https://prosemirror.net/docs/ref/#state.Transaction.setMeta) of `false` on a transaction\nto prevent it from being rolled back by undo.\n*/ function $16937392103b9646$export$55abd4691b317664(config = {}) {\n    config = {\n        depth: config.depth || 100,\n        newGroupDelay: config.newGroupDelay || 500\n    };\n    return new (0, $1LeRC.Plugin)({\n        key: $16937392103b9646$var$historyKey,\n        state: {\n            init () {\n                return new $16937392103b9646$var$HistoryState($16937392103b9646$var$Branch.empty, $16937392103b9646$var$Branch.empty, null, 0, -1);\n            },\n            apply (tr, hist, state) {\n                return $16937392103b9646$var$applyTransaction(hist, state, tr, config);\n            }\n        },\n        config: config,\n        props: {\n            handleDOMEvents: {\n                beforeinput (view, e) {\n                    let inputType = e.inputType;\n                    let command = inputType == \"historyUndo\" ? $16937392103b9646$export$21f930c44940fd98 : inputType == \"historyRedo\" ? $16937392103b9646$export$1688e416fee0a49e : null;\n                    if (!command) return false;\n                    e.preventDefault();\n                    return command(view.state, view.dispatch);\n                }\n            }\n        }\n    });\n}\nfunction $16937392103b9646$var$buildCommand(redo, scroll) {\n    return (state, dispatch)=>{\n        let hist = $16937392103b9646$var$historyKey.getState(state);\n        if (!hist || (redo ? hist.undone : hist.done).eventCount == 0) return false;\n        if (dispatch) {\n            let tr = $16937392103b9646$var$histTransaction(hist, state, redo);\n            if (tr) dispatch(scroll ? tr.scrollIntoView() : tr);\n        }\n        return true;\n    };\n}\n/**\nA command function that undoes the last change, if any.\n*/ const $16937392103b9646$export$21f930c44940fd98 = $16937392103b9646$var$buildCommand(false, true);\n/**\nA command function that redoes the last undone change, if any.\n*/ const $16937392103b9646$export$1688e416fee0a49e = $16937392103b9646$var$buildCommand(true, true);\n/**\nA command function that undoes the last change. Don't scroll the\nselection into view.\n*/ const $16937392103b9646$export$24b5d280435f3a3f = $16937392103b9646$var$buildCommand(false, false);\n/**\nA command function that redoes the last undone change. Don't\nscroll the selection into view.\n*/ const $16937392103b9646$export$3774e54bae7be19b = $16937392103b9646$var$buildCommand(true, false);\n/**\nThe amount of undoable events available in a given state.\n*/ function $16937392103b9646$export$f8a176c2b9a10bdb(state) {\n    let hist = $16937392103b9646$var$historyKey.getState(state);\n    return hist ? hist.done.eventCount : 0;\n}\n/**\nThe amount of redoable events available in a given editor state.\n*/ function $16937392103b9646$export$3ffe6b288e7d941b(state) {\n    let hist = $16937392103b9646$var$historyKey.getState(state);\n    return hist ? hist.undone.eventCount : 0;\n}\n\n});\nparcelRegister(\"i65BY\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $d2cd23df1a60c401$export$2e2bcd8739ae039);\nvar $d2cd23df1a60c401$var$GOOD_LEAF_SIZE = 200;\n// :: class<T> A rope sequence is a persistent sequence data structure\n// that supports appending, prepending, and slicing without doing a\n// full copy. It is represented as a mostly-balanced tree.\nvar $d2cd23df1a60c401$var$RopeSequence = function RopeSequence() {};\n$d2cd23df1a60c401$var$RopeSequence.prototype.append = function append(other) {\n    if (!other.length) return this;\n    other = $d2cd23df1a60c401$var$RopeSequence.from(other);\n    return !this.length && other || other.length < $d2cd23df1a60c401$var$GOOD_LEAF_SIZE && this.leafAppend(other) || this.length < $d2cd23df1a60c401$var$GOOD_LEAF_SIZE && other.leafPrepend(this) || this.appendInner(other);\n};\n// :: (union<[T], RopeSequence<T>>) → RopeSequence<T>\n// Prepend an array or other rope to this one, returning a new rope.\n$d2cd23df1a60c401$var$RopeSequence.prototype.prepend = function prepend(other) {\n    if (!other.length) return this;\n    return $d2cd23df1a60c401$var$RopeSequence.from(other).append(this);\n};\n$d2cd23df1a60c401$var$RopeSequence.prototype.appendInner = function appendInner(other) {\n    return new $d2cd23df1a60c401$var$Append(this, other);\n};\n// :: (?number, ?number) → RopeSequence<T>\n// Create a rope repesenting a sub-sequence of this rope.\n$d2cd23df1a60c401$var$RopeSequence.prototype.slice = function slice(from, to) {\n    if (from === void 0) from = 0;\n    if (to === void 0) to = this.length;\n    if (from >= to) return $d2cd23df1a60c401$var$RopeSequence.empty;\n    return this.sliceInner(Math.max(0, from), Math.min(this.length, to));\n};\n// :: (number) → T\n// Retrieve the element at the given position from this rope.\n$d2cd23df1a60c401$var$RopeSequence.prototype.get = function get(i) {\n    if (i < 0 || i >= this.length) return undefined;\n    return this.getInner(i);\n};\n// :: ((element: T, index: number) → ?bool, ?number, ?number)\n// Call the given function for each element between the given\n// indices. This tends to be more efficient than looping over the\n// indices and calling `get`, because it doesn't have to descend the\n// tree for every element.\n$d2cd23df1a60c401$var$RopeSequence.prototype.forEach = function forEach(f, from, to) {\n    if (from === void 0) from = 0;\n    if (to === void 0) to = this.length;\n    if (from <= to) this.forEachInner(f, from, to, 0);\n    else this.forEachInvertedInner(f, from, to, 0);\n};\n// :: ((element: T, index: number) → U, ?number, ?number) → [U]\n// Map the given functions over the elements of the rope, producing\n// a flat array.\n$d2cd23df1a60c401$var$RopeSequence.prototype.map = function map(f, from, to) {\n    if (from === void 0) from = 0;\n    if (to === void 0) to = this.length;\n    var result = [];\n    this.forEach(function(elt, i) {\n        return result.push(f(elt, i));\n    }, from, to);\n    return result;\n};\n// :: (?union<[T], RopeSequence<T>>) → RopeSequence<T>\n// Create a rope representing the given array, or return the rope\n// itself if a rope was given.\n$d2cd23df1a60c401$var$RopeSequence.from = function from(values) {\n    if (values instanceof $d2cd23df1a60c401$var$RopeSequence) return values;\n    return values && values.length ? new $d2cd23df1a60c401$var$Leaf(values) : $d2cd23df1a60c401$var$RopeSequence.empty;\n};\nvar $d2cd23df1a60c401$var$Leaf = /*@__PURE__*/ function(RopeSequence) {\n    function Leaf(values) {\n        RopeSequence.call(this);\n        this.values = values;\n    }\n    if (RopeSequence) Leaf.__proto__ = RopeSequence;\n    Leaf.prototype = Object.create(RopeSequence && RopeSequence.prototype);\n    Leaf.prototype.constructor = Leaf;\n    var prototypeAccessors = {\n        length: {\n            configurable: true\n        },\n        depth: {\n            configurable: true\n        }\n    };\n    Leaf.prototype.flatten = function flatten() {\n        return this.values;\n    };\n    Leaf.prototype.sliceInner = function sliceInner(from, to) {\n        if (from == 0 && to == this.length) return this;\n        return new Leaf(this.values.slice(from, to));\n    };\n    Leaf.prototype.getInner = function getInner(i) {\n        return this.values[i];\n    };\n    Leaf.prototype.forEachInner = function forEachInner(f, from, to, start) {\n        for(var i = from; i < to; i++){\n            if (f(this.values[i], start + i) === false) return false;\n        }\n    };\n    Leaf.prototype.forEachInvertedInner = function forEachInvertedInner(f, from, to, start) {\n        for(var i = from - 1; i >= to; i--){\n            if (f(this.values[i], start + i) === false) return false;\n        }\n    };\n    Leaf.prototype.leafAppend = function leafAppend(other) {\n        if (this.length + other.length <= $d2cd23df1a60c401$var$GOOD_LEAF_SIZE) return new Leaf(this.values.concat(other.flatten()));\n    };\n    Leaf.prototype.leafPrepend = function leafPrepend(other) {\n        if (this.length + other.length <= $d2cd23df1a60c401$var$GOOD_LEAF_SIZE) return new Leaf(other.flatten().concat(this.values));\n    };\n    prototypeAccessors.length.get = function() {\n        return this.values.length;\n    };\n    prototypeAccessors.depth.get = function() {\n        return 0;\n    };\n    Object.defineProperties(Leaf.prototype, prototypeAccessors);\n    return Leaf;\n}($d2cd23df1a60c401$var$RopeSequence);\n// :: RopeSequence\n// The empty rope sequence.\n$d2cd23df1a60c401$var$RopeSequence.empty = new $d2cd23df1a60c401$var$Leaf([]);\nvar $d2cd23df1a60c401$var$Append = /*@__PURE__*/ function(RopeSequence) {\n    function Append(left, right) {\n        RopeSequence.call(this);\n        this.left = left;\n        this.right = right;\n        this.length = left.length + right.length;\n        this.depth = Math.max(left.depth, right.depth) + 1;\n    }\n    if (RopeSequence) Append.__proto__ = RopeSequence;\n    Append.prototype = Object.create(RopeSequence && RopeSequence.prototype);\n    Append.prototype.constructor = Append;\n    Append.prototype.flatten = function flatten() {\n        return this.left.flatten().concat(this.right.flatten());\n    };\n    Append.prototype.getInner = function getInner(i) {\n        return i < this.left.length ? this.left.get(i) : this.right.get(i - this.left.length);\n    };\n    Append.prototype.forEachInner = function forEachInner(f, from, to, start) {\n        var leftLen = this.left.length;\n        if (from < leftLen && this.left.forEachInner(f, from, Math.min(to, leftLen), start) === false) return false;\n        if (to > leftLen && this.right.forEachInner(f, Math.max(from - leftLen, 0), Math.min(this.length, to) - leftLen, start + leftLen) === false) return false;\n    };\n    Append.prototype.forEachInvertedInner = function forEachInvertedInner(f, from, to, start) {\n        var leftLen = this.left.length;\n        if (from > leftLen && this.right.forEachInvertedInner(f, from - leftLen, Math.max(to, leftLen) - leftLen, start + leftLen) === false) return false;\n        if (to < leftLen && this.left.forEachInvertedInner(f, Math.min(from, leftLen), to, start) === false) return false;\n    };\n    Append.prototype.sliceInner = function sliceInner(from, to) {\n        if (from == 0 && to == this.length) return this;\n        var leftLen = this.left.length;\n        if (to <= leftLen) return this.left.slice(from, to);\n        if (from >= leftLen) return this.right.slice(from - leftLen, to - leftLen);\n        return this.left.slice(from, leftLen).append(this.right.slice(0, to - leftLen));\n    };\n    Append.prototype.leafAppend = function leafAppend(other) {\n        var inner = this.right.leafAppend(other);\n        if (inner) return new Append(this.left, inner);\n    };\n    Append.prototype.leafPrepend = function leafPrepend(other) {\n        var inner = this.left.leafPrepend(other);\n        if (inner) return new Append(inner, this.right);\n    };\n    Append.prototype.appendInner = function appendInner(other) {\n        if (this.left.depth >= Math.max(this.right.depth, other.depth) + 1) return new Append(this.left, new Append(this.right, other));\n        return new Append(this, other);\n    };\n    return Append;\n}($d2cd23df1a60c401$var$RopeSequence);\nvar $d2cd23df1a60c401$export$2e2bcd8739ae039 = $d2cd23df1a60c401$var$RopeSequence;\n\n});\n\n\n\n\nparcelRegister(\"gaTMf\", function(module, exports) {\n\n$parcel$export(module.exports, \"HorizontalRule\", () => $bc68d8b20cccf3bc$export$841e9c95e6429474);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\nparcelRequire(\"7fRs0\");\nvar $1LeRC = parcelRequire(\"1LeRC\");\n/**\n * This extension allows you to insert horizontal rules.\n * @see https://www.tiptap.dev/api/nodes/horizontal-rule\n */ const $bc68d8b20cccf3bc$export$841e9c95e6429474 = (0, $gkCGf.Node).create({\n    name: 'horizontalRule',\n    addOptions () {\n        return {\n            HTMLAttributes: {}\n        };\n    },\n    group: 'block',\n    parseHTML () {\n        return [\n            {\n                tag: 'hr'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'hr',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes)\n        ];\n    },\n    addCommands () {\n        return {\n            setHorizontalRule: ()=>({ chain: chain, state: state })=>{\n                    // Check if we can insert the node at the current selection\n                    if (!(0, $gkCGf.canInsertNode)(state, state.schema.nodes[this.name])) return false;\n                    const { selection: selection } = state;\n                    const { $from: $originFrom, $to: $originTo } = selection;\n                    const currentChain = chain();\n                    if ($originFrom.parentOffset === 0) currentChain.insertContentAt({\n                        from: Math.max($originFrom.pos - 1, 0),\n                        to: $originTo.pos\n                    }, {\n                        type: this.name\n                    });\n                    else if ((0, $gkCGf.isNodeSelection)(selection)) currentChain.insertContentAt($originTo.pos, {\n                        type: this.name\n                    });\n                    else currentChain.insertContent({\n                        type: this.name\n                    });\n                    return currentChain// set cursor after horizontal rule\n                    .command(({ tr: tr, dispatch: dispatch })=>{\n                        var _a;\n                        if (dispatch) {\n                            const { $to: $to } = tr.selection;\n                            const posAfter = $to.end();\n                            if ($to.nodeAfter) {\n                                if ($to.nodeAfter.isTextblock) tr.setSelection((0, $1LeRC.TextSelection).create(tr.doc, $to.pos + 1));\n                                else if ($to.nodeAfter.isBlock) tr.setSelection((0, $1LeRC.NodeSelection).create(tr.doc, $to.pos));\n                                else tr.setSelection((0, $1LeRC.TextSelection).create(tr.doc, $to.pos));\n                            } else {\n                                // add node after horizontal rule if it’s the end of the document\n                                const node = (_a = $to.parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();\n                                if (node) {\n                                    tr.insert(posAfter, node);\n                                    tr.setSelection((0, $1LeRC.TextSelection).create(tr.doc, posAfter + 1));\n                                }\n                            }\n                            tr.scrollIntoView();\n                        }\n                        return true;\n                    }).run();\n                }\n        };\n    },\n    addInputRules () {\n        return [\n            (0, $gkCGf.nodeInputRule)({\n                find: /^(?:---|—-|___\\s|\\*\\*\\*\\s)$/,\n                type: this.type\n            })\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"5G1It\", function(module, exports) {\n\n$parcel$export(module.exports, \"Italic\", () => $422234cfc13196b6$export$1cfcf4275506b1c6);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * Matches an italic to a *italic* on input.\n */ const $422234cfc13196b6$export$73ba4776eeca629e = /(?:^|\\s)(\\*(?!\\s+\\*)((?:[^*]+))\\*(?!\\s+\\*))$/;\n/**\n * Matches an italic to a *italic* on paste.\n */ const $422234cfc13196b6$export$47b75d481b90409 = /(?:^|\\s)(\\*(?!\\s+\\*)((?:[^*]+))\\*(?!\\s+\\*))/g;\n/**\n * Matches an italic to a _italic_ on input.\n */ const $422234cfc13196b6$export$79cd1d2695dae26d = /(?:^|\\s)(_(?!\\s+_)((?:[^_]+))_(?!\\s+_))$/;\n/**\n * Matches an italic to a _italic_ on paste.\n */ const $422234cfc13196b6$export$9b623891dbc7bd12 = /(?:^|\\s)(_(?!\\s+_)((?:[^_]+))_(?!\\s+_))/g;\n/**\n * This extension allows you to create italic text.\n * @see https://www.tiptap.dev/api/marks/italic\n */ const $422234cfc13196b6$export$1cfcf4275506b1c6 = (0, $gkCGf.Mark).create({\n    name: 'italic',\n    addOptions () {\n        return {\n            HTMLAttributes: {}\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: 'em'\n            },\n            {\n                tag: 'i',\n                getAttrs: (node)=>node.style.fontStyle !== 'normal' && null\n            },\n            {\n                style: 'font-style=normal',\n                clearMark: (mark)=>mark.type.name === this.name\n            },\n            {\n                style: 'font-style=italic'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'em',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            setItalic: ()=>({ commands: commands })=>{\n                    return commands.setMark(this.name);\n                },\n            toggleItalic: ()=>({ commands: commands })=>{\n                    return commands.toggleMark(this.name);\n                },\n            unsetItalic: ()=>({ commands: commands })=>{\n                    return commands.unsetMark(this.name);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-i': ()=>this.editor.commands.toggleItalic(),\n            'Mod-I': ()=>this.editor.commands.toggleItalic()\n        };\n    },\n    addInputRules () {\n        return [\n            (0, $gkCGf.markInputRule)({\n                find: $422234cfc13196b6$export$73ba4776eeca629e,\n                type: this.type\n            }),\n            (0, $gkCGf.markInputRule)({\n                find: $422234cfc13196b6$export$79cd1d2695dae26d,\n                type: this.type\n            })\n        ];\n    },\n    addPasteRules () {\n        return [\n            (0, $gkCGf.markPasteRule)({\n                find: $422234cfc13196b6$export$47b75d481b90409,\n                type: this.type\n            }),\n            (0, $gkCGf.markPasteRule)({\n                find: $422234cfc13196b6$export$9b623891dbc7bd12,\n                type: this.type\n            })\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"cabgp\", function(module, exports) {\n\n$parcel$export(module.exports, \"ListItem\", () => $8daf27f2875b04a8$export$a7b06bfba60a8a78);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * This extension allows you to create list items.\n * @see https://www.tiptap.dev/api/nodes/list-item\n */ const $8daf27f2875b04a8$export$a7b06bfba60a8a78 = (0, $gkCGf.Node).create({\n    name: 'listItem',\n    addOptions () {\n        return {\n            HTMLAttributes: {},\n            bulletListTypeName: 'bulletList',\n            orderedListTypeName: 'orderedList'\n        };\n    },\n    content: 'paragraph block*',\n    defining: true,\n    parseHTML () {\n        return [\n            {\n                tag: 'li'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'li',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addKeyboardShortcuts () {\n        return {\n            Enter: ()=>this.editor.commands.splitListItem(this.name),\n            Tab: ()=>this.editor.commands.sinkListItem(this.name),\n            'Shift-Tab': ()=>this.editor.commands.liftListItem(this.name)\n        };\n    }\n});\n\n});\n\nparcelRegister(\"l1c21\", function(module, exports) {\n\n$parcel$export(module.exports, \"OrderedList\", () => $f4d3062c4e6e0bd6$export$547f885a1fca4e31);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\nconst $f4d3062c4e6e0bd6$var$ListItemName = 'listItem';\nconst $f4d3062c4e6e0bd6$var$TextStyleName = 'textStyle';\n/**\n * Matches an ordered list to a 1. on input (or any number followed by a dot).\n */ const $f4d3062c4e6e0bd6$export$55b9391925fcc072 = /^(\\d+)\\.\\s$/;\n/**\n * This extension allows you to create ordered lists.\n * This requires the ListItem extension\n * @see https://www.tiptap.dev/api/nodes/ordered-list\n * @see https://www.tiptap.dev/api/nodes/list-item\n */ const $f4d3062c4e6e0bd6$export$547f885a1fca4e31 = (0, $gkCGf.Node).create({\n    name: 'orderedList',\n    addOptions () {\n        return {\n            itemTypeName: 'listItem',\n            HTMLAttributes: {},\n            keepMarks: false,\n            keepAttributes: false\n        };\n    },\n    group: 'block list',\n    content () {\n        return `${this.options.itemTypeName}+`;\n    },\n    addAttributes () {\n        return {\n            start: {\n                default: 1,\n                parseHTML: (element)=>{\n                    return element.hasAttribute('start') ? parseInt(element.getAttribute('start') || '', 10) : 1;\n                }\n            },\n            type: {\n                default: null,\n                parseHTML: (element)=>element.getAttribute('type')\n            }\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: 'ol'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        const { start: start, ...attributesWithoutStart } = HTMLAttributes;\n        return start === 1 ? [\n            'ol',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, attributesWithoutStart),\n            0\n        ] : [\n            'ol',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            toggleOrderedList: ()=>({ commands: commands, chain: chain })=>{\n                    if (this.options.keepAttributes) return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes($f4d3062c4e6e0bd6$var$ListItemName, this.editor.getAttributes($f4d3062c4e6e0bd6$var$TextStyleName)).run();\n                    return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-Shift-7': ()=>this.editor.commands.toggleOrderedList()\n        };\n    },\n    addInputRules () {\n        let inputRule = (0, $gkCGf.wrappingInputRule)({\n            find: $f4d3062c4e6e0bd6$export$55b9391925fcc072,\n            type: this.type,\n            getAttributes: (match)=>({\n                    start: +match[1]\n                }),\n            joinPredicate: (match, node)=>node.childCount + node.attrs.start === +match[1]\n        });\n        if (this.options.keepMarks || this.options.keepAttributes) inputRule = (0, $gkCGf.wrappingInputRule)({\n            find: $f4d3062c4e6e0bd6$export$55b9391925fcc072,\n            type: this.type,\n            keepMarks: this.options.keepMarks,\n            keepAttributes: this.options.keepAttributes,\n            getAttributes: (match)=>({\n                    start: +match[1],\n                    ...this.editor.getAttributes($f4d3062c4e6e0bd6$var$TextStyleName)\n                }),\n            joinPredicate: (match, node)=>node.childCount + node.attrs.start === +match[1],\n            editor: this.editor\n        });\n        return [\n            inputRule\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"dzWv6\", function(module, exports) {\n\n$parcel$export(module.exports, \"Paragraph\", () => $9e2bec406bc918cd$export$358a232cca1ab2ac);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * This extension allows you to create paragraphs.\n * @see https://www.tiptap.dev/api/nodes/paragraph\n */ const $9e2bec406bc918cd$export$358a232cca1ab2ac = (0, $gkCGf.Node).create({\n    name: 'paragraph',\n    priority: 1000,\n    addOptions () {\n        return {\n            HTMLAttributes: {}\n        };\n    },\n    group: 'block',\n    content: 'inline*',\n    parseHTML () {\n        return [\n            {\n                tag: 'p'\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            'p',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            setParagraph: ()=>({ commands: commands })=>{\n                    return commands.setNode(this.name);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-Alt-0': ()=>this.editor.commands.setParagraph()\n        };\n    }\n});\n\n});\n\nparcelRegister(\"2jORh\", function(module, exports) {\n\n$parcel$export(module.exports, \"Strike\", () => $1b04ce84bc40ae69$export$97176b8d51d2058f);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * Matches a strike to a ~~strike~~ on input.\n */ const $1b04ce84bc40ae69$export$55b9391925fcc072 = /(?:^|\\s)(~~(?!\\s+~~)((?:[^~]+))~~(?!\\s+~~))$/;\n/**\n * Matches a strike to a ~~strike~~ on paste.\n */ const $1b04ce84bc40ae69$export$4ed30f8936af1979 = /(?:^|\\s)(~~(?!\\s+~~)((?:[^~]+))~~(?!\\s+~~))/g;\n/**\n * This extension allows you to create strike text.\n * @see https://www.tiptap.dev/api/marks/strike\n */ const $1b04ce84bc40ae69$export$97176b8d51d2058f = (0, $gkCGf.Mark).create({\n    name: 'strike',\n    addOptions () {\n        return {\n            HTMLAttributes: {}\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: 's'\n            },\n            {\n                tag: 'del'\n            },\n            {\n                tag: 'strike'\n            },\n            {\n                style: 'text-decoration',\n                consuming: false,\n                getAttrs: (style)=>style.includes('line-through') ? {} : false\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            's',\n            (0, $gkCGf.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),\n            0\n        ];\n    },\n    addCommands () {\n        return {\n            setStrike: ()=>({ commands: commands })=>{\n                    return commands.setMark(this.name);\n                },\n            toggleStrike: ()=>({ commands: commands })=>{\n                    return commands.toggleMark(this.name);\n                },\n            unsetStrike: ()=>({ commands: commands })=>{\n                    return commands.unsetMark(this.name);\n                }\n        };\n    },\n    addKeyboardShortcuts () {\n        return {\n            'Mod-Shift-s': ()=>this.editor.commands.toggleStrike()\n        };\n    },\n    addInputRules () {\n        return [\n            (0, $gkCGf.markInputRule)({\n                find: $1b04ce84bc40ae69$export$55b9391925fcc072,\n                type: this.type\n            })\n        ];\n    },\n    addPasteRules () {\n        return [\n            (0, $gkCGf.markPasteRule)({\n                find: $1b04ce84bc40ae69$export$4ed30f8936af1979,\n                type: this.type\n            })\n        ];\n    }\n});\n\n});\n\nparcelRegister(\"hirCw\", function(module, exports) {\n\n$parcel$export(module.exports, \"Text\", () => $c9798af43a358308$export$5f1af8db9871e1d6);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n/**\n * This extension allows you to create text nodes.\n * @see https://www.tiptap.dev/api/nodes/text\n */ const $c9798af43a358308$export$5f1af8db9871e1d6 = (0, $gkCGf.Node).create({\n    name: 'text',\n    group: 'inline'\n});\n\n});\n\n\nparcelRegister(\"1zXqe\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $12672754d4794564$export$2e2bcd8739ae039);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n\nvar $4WF04 = parcelRequire(\"4WF04\");\n// Simple renderer without external libs\nfunction $12672754d4794564$var$renderSuggestionList() {\n    let popup = null;\n    const createPopup = (props)=>{\n        const { clientRect: clientRect } = props;\n        const container = document.createElement('div');\n        container.className = 'bg-white border border-gray-200 rounded-sm shadow-md text-sm text-gray-700 max-h-60 overflow-y-auto';\n        container.style.position = 'absolute';\n        container.style.zIndex = '1000';\n        positionPopup(container, clientRect);\n        document.body.appendChild(container);\n        return container;\n    };\n    const positionPopup = (container, clientRect)=>{\n        if (!clientRect) return;\n        const { top: top, left: left, height: height } = clientRect();\n        container.style.top = `${top + height + window.scrollY}px`;\n        container.style.left = `${left + window.scrollX}px`;\n    };\n    const onStart = (props)=>{\n        popup = createPopup(props);\n        updateList(props);\n    };\n    const onUpdate = (props)=>{\n        updateList(props);\n        positionPopup(popup, props.clientRect);\n    };\n    const onKeyDown = (props)=>{\n        if (props.event.key === 'Escape') {\n            onExit();\n            return true;\n        }\n        const items = Array.from(popup.querySelectorAll('button'));\n        let currentIndex = items.findIndex((i)=>i.classList.contains('bg-gray-100'));\n        if (props.event.key === 'ArrowDown') {\n            currentIndex = (currentIndex + 1) % items.length;\n            highlight(items, currentIndex);\n            return true;\n        }\n        if (props.event.key === 'ArrowUp') {\n            currentIndex = (currentIndex - 1 + items.length) % items.length;\n            highlight(items, currentIndex);\n            return true;\n        }\n        if (props.event.key === 'Enter') {\n            if (currentIndex >= 0) {\n                items[currentIndex].click();\n                return true;\n            }\n        }\n        return false;\n    };\n    const onExit = ()=>{\n        if (popup) {\n            popup.remove();\n            popup = null;\n        }\n    };\n    function updateList(props) {\n        const { items: items, command: command } = props;\n        popup.innerHTML = '';\n        items.forEach((item, index)=>{\n            const btn = document.createElement('button');\n            btn.type = 'button';\n            const clean = item.label.replace(/^\\s*\\{\\{\\s*/, '').replace(/\\s*\\}\\}\\s*$/, '');\n            btn.innerHTML = `<span class=\"text-indigo-500\">{{</span><span class=\"mx-1\">${clean}</span><span class=\"text-indigo-500\">}}</span>`;\n            btn.className = 'flex items-center gap-0 w-full px-3 py-1 text-left hover:bg-indigo-50 hover:text-indigo-600';\n            if (index === 0) btn.classList.add('bg-gray-100');\n            btn.addEventListener('click', ()=>command(item));\n            popup.appendChild(btn);\n        });\n    }\n    function highlight(items, index) {\n        items.forEach((i)=>i.classList.remove('bg-gray-100'));\n        items[index].classList.add('bg-gray-100');\n        items[index].scrollIntoView({\n            block: 'nearest'\n        });\n    }\n    return {\n        onStart: onStart,\n        onUpdate: onUpdate,\n        onKeyDown: onKeyDown,\n        onExit: onExit\n    };\n}\nconst $12672754d4794564$var$VariableSuggestion = (0, $gkCGf.Extension).create({\n    name: 'variableSuggestion',\n    addOptions () {\n        return {\n            variables: [],\n            char: '{'\n        };\n    },\n    addProseMirrorPlugins () {\n        return [\n            (0, $4WF04.default)({\n                char: this.options.char,\n                startOfLine: false,\n                allowSpaces: false,\n                editor: this.editor,\n                items: ({ query: query })=>{\n                    return this.options.variables.filter((v)=>v.toLowerCase().includes(query.toLowerCase())).slice(0, 20).map((v)=>({\n                            label: v\n                        }));\n                },\n                command: ({ editor: editor, range: range, props: props })=>{\n                    const variable = props.label.trim().replace(/^\\s*\\{\\{\\s*/, '').replace(/\\s*\\}\\}\\s*$/, '');\n                    editor.chain().focus().deleteRange(range).insertVariable(variable).run();\n                },\n                render: $12672754d4794564$var$renderSuggestionList\n            })\n        ];\n    }\n});\nvar $12672754d4794564$export$2e2bcd8739ae039 = $12672754d4794564$var$VariableSuggestion;\n\n});\nparcelRegister(\"4WF04\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $399c61f74c68e54b$export$e88208c327ffe234);\nparcelRequire(\"7fRs0\");\nvar $1LeRC = parcelRequire(\"1LeRC\");\nparcelRequire(\"cXOg4\");\nvar $edQEX = parcelRequire(\"edQEX\");\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\nfunction $399c61f74c68e54b$export$f7cfb3ba7349a641(config) {\n    var _a;\n    const { char: char, allowSpaces: allowSpacesOption, allowToIncludeChar: allowToIncludeChar, allowedPrefixes: allowedPrefixes, startOfLine: startOfLine, $position: $position } = config;\n    const allowSpaces = allowSpacesOption && !allowToIncludeChar;\n    const escapedChar = (0, $gkCGf.escapeForRegEx)(char);\n    const suffix = new RegExp(`\\\\s${escapedChar}$`);\n    const prefix = startOfLine ? '^' : '';\n    const finalEscapedChar = allowToIncludeChar ? '' : escapedChar;\n    const regexp = allowSpaces ? new RegExp(`${prefix}${escapedChar}.*?(?=\\\\s${finalEscapedChar}|$)`, 'gm') : new RegExp(`${prefix}(?:^)?${escapedChar}[^\\\\s${finalEscapedChar}]*`, 'gm');\n    const text = ((_a = $position.nodeBefore) === null || _a === void 0 ? void 0 : _a.isText) && $position.nodeBefore.text;\n    if (!text) return null;\n    const textFrom = $position.pos - text.length;\n    const match = Array.from(text.matchAll(regexp)).pop();\n    if (!match || match.input === undefined || match.index === undefined) return null;\n    // JavaScript doesn't have lookbehinds. This hacks a check that first character\n    // is a space or the start of the line\n    const matchPrefix = match.input.slice(Math.max(0, match.index - 1), match.index);\n    const matchPrefixIsAllowed = new RegExp(`^[${allowedPrefixes === null || allowedPrefixes === void 0 ? void 0 : allowedPrefixes.join('')}\\0]?$`).test(matchPrefix);\n    if (allowedPrefixes !== null && !matchPrefixIsAllowed) return null;\n    // The absolute position of the match in the document\n    const from = textFrom + match.index;\n    let to = from + match[0].length;\n    // Edge case handling; if spaces are allowed and we're directly in between\n    // two triggers\n    if (allowSpaces && suffix.test(text.slice(to - 1, to + 1))) {\n        match[0] += ' ';\n        to += 1;\n    }\n    // If the $position is located within the matched substring, return that range\n    if (from < $position.pos && to >= $position.pos) return {\n        range: {\n            from: from,\n            to: to\n        },\n        query: match[0].slice(char.length),\n        text: match[0]\n    };\n    return null;\n}\nconst $399c61f74c68e54b$export$14a9e419a6a9b699 = new (0, $1LeRC.PluginKey)('suggestion');\n/**\n * This utility allows you to create suggestions.\n * @see https://tiptap.dev/api/utilities/suggestion\n */ function $399c61f74c68e54b$export$e88208c327ffe234({ pluginKey: pluginKey = $399c61f74c68e54b$export$14a9e419a6a9b699, editor: editor, char: char = '@', allowSpaces: allowSpaces = false, allowToIncludeChar: allowToIncludeChar = false, allowedPrefixes: allowedPrefixes = [\n    ' '\n], startOfLine: startOfLine = false, decorationTag: decorationTag = 'span', decorationClass: decorationClass = 'suggestion', command: command = ()=>null, items: items = ()=>[], render: render = ()=>({}), allow: allow = ()=>true, findSuggestionMatch: findSuggestionMatch$1 = $399c61f74c68e54b$export$f7cfb3ba7349a641 }) {\n    let props;\n    const renderer = render === null || render === void 0 ? void 0 : render();\n    const plugin = new (0, $1LeRC.Plugin)({\n        key: pluginKey,\n        view () {\n            return {\n                update: async (view, prevState)=>{\n                    var _a, _b, _c, _d, _e, _f, _g;\n                    const prev = (_a = this.key) === null || _a === void 0 ? void 0 : _a.getState(prevState);\n                    const next = (_b = this.key) === null || _b === void 0 ? void 0 : _b.getState(view.state);\n                    // See how the state changed\n                    const moved = prev.active && next.active && prev.range.from !== next.range.from;\n                    const started = !prev.active && next.active;\n                    const stopped = prev.active && !next.active;\n                    const changed = !started && !stopped && prev.query !== next.query;\n                    const handleStart = started || moved && changed;\n                    const handleChange = changed || moved;\n                    const handleExit = stopped || moved && changed;\n                    // Cancel when suggestion isn't active\n                    if (!handleStart && !handleChange && !handleExit) return;\n                    const state = handleExit && !handleStart ? prev : next;\n                    const decorationNode = view.dom.querySelector(`[data-decoration-id=\"${state.decorationId}\"]`);\n                    props = {\n                        editor: editor,\n                        range: state.range,\n                        query: state.query,\n                        text: state.text,\n                        items: [],\n                        command: (commandProps)=>{\n                            return command({\n                                editor: editor,\n                                range: state.range,\n                                props: commandProps\n                            });\n                        },\n                        decorationNode: decorationNode,\n                        // virtual node for popper.js or tippy.js\n                        // this can be used for building popups without a DOM node\n                        clientRect: decorationNode ? ()=>{\n                            var _a;\n                            // because of `items` can be asynchrounous we’ll search for the current decoration node\n                            const { decorationId: decorationId } = (_a = this.key) === null || _a === void 0 ? void 0 : _a.getState(editor.state); // eslint-disable-line\n                            const currentDecorationNode = view.dom.querySelector(`[data-decoration-id=\"${decorationId}\"]`);\n                            return (currentDecorationNode === null || currentDecorationNode === void 0 ? void 0 : currentDecorationNode.getBoundingClientRect()) || null;\n                        } : null\n                    };\n                    if (handleStart) (_c = renderer === null || renderer === void 0 ? void 0 : renderer.onBeforeStart) === null || _c === void 0 || _c.call(renderer, props);\n                    if (handleChange) (_d = renderer === null || renderer === void 0 ? void 0 : renderer.onBeforeUpdate) === null || _d === void 0 || _d.call(renderer, props);\n                    if (handleChange || handleStart) props.items = await items({\n                        editor: editor,\n                        query: state.query\n                    });\n                    if (handleExit) (_e = renderer === null || renderer === void 0 ? void 0 : renderer.onExit) === null || _e === void 0 || _e.call(renderer, props);\n                    if (handleChange) (_f = renderer === null || renderer === void 0 ? void 0 : renderer.onUpdate) === null || _f === void 0 || _f.call(renderer, props);\n                    if (handleStart) (_g = renderer === null || renderer === void 0 ? void 0 : renderer.onStart) === null || _g === void 0 || _g.call(renderer, props);\n                },\n                destroy: ()=>{\n                    var _a;\n                    if (!props) return;\n                    (_a = renderer === null || renderer === void 0 ? void 0 : renderer.onExit) === null || _a === void 0 || _a.call(renderer, props);\n                }\n            };\n        },\n        state: {\n            // Initialize the plugin's internal state.\n            init () {\n                const state = {\n                    active: false,\n                    range: {\n                        from: 0,\n                        to: 0\n                    },\n                    query: null,\n                    text: null,\n                    composing: false\n                };\n                return state;\n            },\n            // Apply changes to the plugin state from a view transaction.\n            apply (transaction, prev, _oldState, state) {\n                const { isEditable: isEditable } = editor;\n                const { composing: composing } = editor.view;\n                const { selection: selection } = transaction;\n                const { empty: empty, from: from } = selection;\n                const next = {\n                    ...prev\n                };\n                next.composing = composing;\n                // We can only be suggesting if the view is editable, and:\n                //   * there is no selection, or\n                //   * a composition is active (see: https://github.com/ueberdosis/tiptap/issues/1449)\n                if (isEditable && (empty || editor.view.composing)) {\n                    // Reset active state if we just left the previous suggestion range\n                    if ((from < prev.range.from || from > prev.range.to) && !composing && !prev.composing) next.active = false;\n                    // Try to match against where our cursor currently is\n                    const match = findSuggestionMatch$1({\n                        char: char,\n                        allowSpaces: allowSpaces,\n                        allowToIncludeChar: allowToIncludeChar,\n                        allowedPrefixes: allowedPrefixes,\n                        startOfLine: startOfLine,\n                        $position: selection.$from\n                    });\n                    const decorationId = `id_${Math.floor(Math.random() * 0xffffffff)}`;\n                    // If we found a match, update the current state to show it\n                    if (match && allow({\n                        editor: editor,\n                        state: state,\n                        range: match.range,\n                        isActive: prev.active\n                    })) {\n                        next.active = true;\n                        next.decorationId = prev.decorationId ? prev.decorationId : decorationId;\n                        next.range = match.range;\n                        next.query = match.query;\n                        next.text = match.text;\n                    } else next.active = false;\n                } else next.active = false;\n                // Make sure to empty the range if suggestion is inactive\n                if (!next.active) {\n                    next.decorationId = null;\n                    next.range = {\n                        from: 0,\n                        to: 0\n                    };\n                    next.query = null;\n                    next.text = null;\n                }\n                return next;\n            }\n        },\n        props: {\n            // Call the keydown hook if suggestion is active.\n            handleKeyDown (view, event) {\n                var _a;\n                const { active: active, range: range } = plugin.getState(view.state);\n                if (!active) return false;\n                return ((_a = renderer === null || renderer === void 0 ? void 0 : renderer.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(renderer, {\n                    view: view,\n                    event: event,\n                    range: range\n                })) || false;\n            },\n            // Setup decorator on the currently active suggestion.\n            decorations (state) {\n                const { active: active, range: range, decorationId: decorationId } = plugin.getState(state);\n                if (!active) return null;\n                return (0, $edQEX.DecorationSet).create(state.doc, [\n                    (0, $edQEX.Decoration).inline(range.from, range.to, {\n                        nodeName: decorationTag,\n                        class: decorationClass,\n                        'data-decoration-id': decorationId\n                    })\n                ]);\n            }\n        }\n    });\n    return plugin;\n}\n\n});\n\n\nparcelRegister(\"57Sxd\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $3bb7e8aed5b1c511$export$2e2bcd8739ae039);\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\nconst $3bb7e8aed5b1c511$var$VariableNode = (0, $gkCGf.Node).create({\n    name: \"variable\",\n    group: \"inline\",\n    inline: true,\n    selectable: false,\n    marks: \"bold italic underline strike\",\n    addAttributes () {\n        return {\n            variable: {\n                default: null,\n                parseHTML: (element)=>element.getAttribute(\"data-variable\"),\n                renderHTML: (attributes)=>({\n                        \"data-variable\": attributes.variable\n                    })\n            }\n        };\n    },\n    parseHTML () {\n        return [\n            {\n                tag: \"span[data-variable]\"\n            }\n        ];\n    },\n    renderHTML ({ node: node, HTMLAttributes: HTMLAttributes }) {\n        const variable = node.attrs.variable;\n        return [\n            \"span\",\n            {\n                ...HTMLAttributes,\n                class: \"wysiwyg-variable\",\n                \"data-variable\": variable\n            },\n            [\n                \"span\",\n                {\n                    class: \"curly-braces\"\n                },\n                \"{{\"\n            ],\n            [\n                \"span\",\n                {\n                    class: \"variable-name\"\n                },\n                ` ${variable} `\n            ],\n            [\n                \"span\",\n                {\n                    class: \"curly-braces\"\n                },\n                \"}}\"\n            ]\n        ];\n    },\n    addNodeView () {\n        return ({ node: node, HTMLAttributes: HTMLAttributes })=>{\n            const variable = node.attrs.variable;\n            const span = document.createElement(\"span\");\n            span.className = \"wysiwyg-variable\";\n            span.setAttribute(\"data-variable\", variable);\n            // Apply styling based on marks\n            const marks = node.marks || [];\n            marks.forEach((mark)=>{\n                switch(mark.type.name){\n                    case 'bold':\n                        span.style.fontWeight = 'bold';\n                        break;\n                    case 'italic':\n                        span.style.fontStyle = 'italic';\n                        break;\n                    case 'underline':\n                        span.style.textDecoration = span.style.textDecoration ? span.style.textDecoration + ' underline' : 'underline';\n                        break;\n                    case 'strike':\n                        span.style.textDecoration = span.style.textDecoration ? span.style.textDecoration + ' line-through' : 'line-through';\n                        break;\n                }\n            });\n            const openBrace = document.createElement(\"span\");\n            openBrace.className = \"curly-braces\";\n            openBrace.textContent = \"{{\";\n            const variableName = document.createElement(\"span\");\n            variableName.className = \"variable-name\";\n            variableName.textContent = ` ${variable} `;\n            const closeBrace = document.createElement(\"span\");\n            closeBrace.className = \"curly-braces\";\n            closeBrace.textContent = \"}}\";\n            span.appendChild(openBrace);\n            span.appendChild(variableName);\n            span.appendChild(closeBrace);\n            return {\n                dom: span,\n                update: (updatedNode)=>{\n                    if (updatedNode.type.name !== \"variable\") return false;\n                    // Update styling when marks change\n                    const newMarks = updatedNode.marks || [];\n                    span.style.fontWeight = '';\n                    span.style.fontStyle = '';\n                    span.style.textDecoration = '';\n                    newMarks.forEach((mark)=>{\n                        switch(mark.type.name){\n                            case 'bold':\n                                span.style.fontWeight = 'bold';\n                                break;\n                            case 'italic':\n                                span.style.fontStyle = 'italic';\n                                break;\n                            case 'underline':\n                                span.style.textDecoration = span.style.textDecoration ? span.style.textDecoration + ' underline' : 'underline';\n                                break;\n                            case 'strike':\n                                span.style.textDecoration = span.style.textDecoration ? span.style.textDecoration + ' line-through' : 'line-through';\n                                break;\n                        }\n                    });\n                    return true;\n                }\n            };\n        };\n    },\n    addCommands () {\n        return {\n            insertVariable: (variable)=>({ commands: commands })=>{\n                    return commands.insertContent({\n                        type: this.name,\n                        attrs: {\n                            variable: variable\n                        }\n                    });\n                }\n        };\n    }\n});\nvar $3bb7e8aed5b1c511$export$2e2bcd8739ae039 = $3bb7e8aed5b1c511$var$VariableNode;\n\n});\n\nparcelRegister(\"cwcXZ\", function(module, exports) {\n\n$parcel$export(module.exports, \"IMAGE_ALIGNMENT_STYLES\", () => $91d288198827f45b$export$843fcab4be7a8d7d);\n$parcel$export(module.exports, \"createImageResizer\", () => $91d288198827f45b$export$2ab1496d1b3c0c54);\n/**\n * Simple Image Resize & Align for TipTap\n * Clean, maintainable image controls\n */ // Two independent choices, the way Word and Docs split them: where the image\n// sits, and whether text wraps beside it. CSS cannot centre a float, so wrap\n// only applies to left and right (tiptap#5685). Inline styles rather than\n// classes, and px rather than rem: no mail client loads our CSS, and Outlook on\n// Windows draws with the Word engine, which has no rem unit.\nconst $91d288198827f45b$export$843fcab4be7a8d7d = {\n    left: 'float: none; display: block; margin: 16px auto 16px 0;',\n    center: 'float: none; display: block; margin: 16px auto;',\n    right: 'float: none; display: block; margin: 16px 0 16px auto;',\n    wrapLeft: 'float: left; margin: 0 16px 8px 0;',\n    wrapRight: 'float: right; margin: 0 0 8px 16px;'\n};\n// Word supports neither `float` nor `margin: auto`, so every mode above needs a\n// second, attribute-based spelling for Outlook. Wrapping is `align` on the image\n// itself, the HTML 4 original the property was named after; position without\n// wrapping is `align` on the paragraph, which Tiptap's TextAlign already writes\n// as an attribute. Only one of the two is ever set: `align` on an unwrapped\n// image would start wrapping text Word would otherwise leave below it.\nconst $91d288198827f45b$var$WRAP_ALIGN_ATTRIBUTES = {\n    wrapLeft: 'left',\n    wrapRight: 'right'\n};\nconst $91d288198827f45b$var$WRAPPED_STYLE_KEYS = {\n    left: 'wrapLeft',\n    right: 'wrapRight'\n};\nconst $91d288198827f45b$var$styleKeyFor = (position, wrap)=>wrap && $91d288198827f45b$var$WRAPPED_STYLE_KEYS[position] || position;\n// Each icon draws the image block (filled) against the text lines it produces,\n// so the button shows the result rather than naming a direction.\nconst $91d288198827f45b$var$icon = (body)=>`<svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\">${body}</svg>`;\nconst $91d288198827f45b$var$block = (x)=>`<rect x=\"${x}\" y=\"8\" width=\"9\" height=\"8\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M3 4h18M3 20h18\"/>`;\nconst $91d288198827f45b$var$ALIGNMENT_ICONS = {\n    left: $91d288198827f45b$var$icon($91d288198827f45b$var$block(3)),\n    center: $91d288198827f45b$var$icon('<rect x=\"7\" y=\"8\" width=\"10\" height=\"8\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M3 4h18M3 20h18\"/>'),\n    right: $91d288198827f45b$var$icon($91d288198827f45b$var$block(12)),\n    wrap: $91d288198827f45b$var$icon('<rect x=\"3\" y=\"5\" width=\"9\" height=\"9\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M14 7h7M14 11h7M3 17h18M3 20h18\"/>')\n};\nconst $91d288198827f45b$var$ALIGNMENT_BUTTONS = [\n    {\n        key: 'left',\n        title: 'Own line, left'\n    },\n    {\n        key: 'center',\n        title: 'Own line, centered'\n    },\n    {\n        key: 'right',\n        title: 'Own line, right'\n    }\n];\nclass $91d288198827f45b$var$ImageResizerClass {\n    constructor(editor, editorElement, maxWidth = 0){\n        this.editor = editor;\n        this.editorElement = editorElement;\n        // Email editors pass the column width. Outlook honours a width and ignores\n        // max-width, so a drag past the column would reach a recipient overflowing\n        // it no matter what the sanitizer adds afterwards. 0 means no limit.\n        this.maxWidth = maxWidth;\n        this.selectedImage = null;\n        this.resizeContainer = null;\n        this.isResizing = false;\n        this.init();\n    }\n    init() {\n        this.createControls();\n        this.attachListeners();\n    }\n    createControls() {\n        // Create overlay container\n        this.resizeContainer = document.createElement(\"div\");\n        this.resizeContainer.className = \"image-resize-container\";\n        this.resizeContainer.style.display = \"none\";\n        this.resizeContainer.style.position = \"absolute\";\n        // Ensure editor has relative positioning\n        if (getComputedStyle(this.editorElement).position === 'static') this.editorElement.style.position = 'relative';\n        this.editorElement.appendChild(this.resizeContainer);\n        // Add resize handles\n        [\n            \"nw\",\n            \"ne\",\n            \"sw\",\n            \"se\"\n        ].forEach((direction)=>{\n            const handle = document.createElement(\"div\");\n            handle.className = `resize-handle resize-handle-${direction}`;\n            handle.dataset.direction = direction;\n            this.resizeContainer.appendChild(handle);\n        });\n        // Add alignment buttons\n        const alignContainer = document.createElement(\"div\");\n        alignContainer.className = \"image-alignment-controls\";\n        $91d288198827f45b$var$ALIGNMENT_BUTTONS.forEach(({ key: key, title: title })=>{\n            const btn = document.createElement(\"button\");\n            btn.className = `alignment-btn alignment-btn-${key}`;\n            btn.innerHTML = $91d288198827f45b$var$ALIGNMENT_ICONS[key];\n            btn.title = title;\n            btn.onclick = (e)=>{\n                e.preventDefault();\n                // Switching sides keeps the wrap setting; centre drops it.\n                this.alignImage(key, this.currentAlignment().wrap);\n            };\n            alignContainer.appendChild(btn);\n        });\n        const wrapBtn = document.createElement(\"button\");\n        wrapBtn.className = \"alignment-btn alignment-btn-wrap\";\n        wrapBtn.innerHTML = $91d288198827f45b$var$ALIGNMENT_ICONS.wrap;\n        wrapBtn.title = \"Let text wrap beside the image\";\n        wrapBtn.onclick = (e)=>{\n            e.preventDefault();\n            const { position: position, wrap: wrap } = this.currentAlignment();\n            if ($91d288198827f45b$var$WRAPPED_STYLE_KEYS[position]) this.alignImage(position, !wrap);\n        };\n        alignContainer.appendChild(wrapBtn);\n        this.resizeContainer.appendChild(alignContainer);\n    }\n    attachListeners() {\n        // Click on images to select\n        this.editorElement.addEventListener(\"click\", (e)=>{\n            // The controls sit inside the editor; their clicks are not a deselect.\n            if (this.resizeContainer?.contains(e.target)) return;\n            if (e.target.tagName === \"IMG\") this.selectImage(e.target);\n            else this.deselectImage();\n        });\n        // Click outside to deselect\n        document.addEventListener(\"click\", (e)=>{\n            if (!this.editorElement.contains(e.target) && (!this.resizeContainer || !this.resizeContainer.contains(e.target))) this.deselectImage();\n        });\n        // Resize drag handling\n        this.resizeContainer?.addEventListener(\"mousedown\", (e)=>{\n            if (e.target.classList.contains(\"resize-handle\")) this.startResize(e);\n        });\n        document.addEventListener(\"mousemove\", (e)=>{\n            if (this.isResizing) this.doResize(e);\n        });\n        document.addEventListener(\"mouseup\", ()=>{\n            if (this.isResizing) this.endResize();\n        });\n    }\n    selectImage(img) {\n        this.selectedImage = img;\n        this.showControls();\n        this.updateButtonStates();\n    }\n    deselectImage() {\n        this.selectedImage = null;\n        if (this.resizeContainer) this.resizeContainer.style.display = \"none\";\n    }\n    showControls() {\n        if (!this.selectedImage || !this.resizeContainer) return;\n        const imgRect = this.selectedImage.getBoundingClientRect();\n        const editorRect = this.editorElement.getBoundingClientRect();\n        this.resizeContainer.style.display = \"block\";\n        this.resizeContainer.style.left = imgRect.left - editorRect.left + \"px\";\n        this.resizeContainer.style.top = imgRect.top - editorRect.top + \"px\";\n        this.resizeContainer.style.width = imgRect.width + \"px\";\n        this.resizeContainer.style.height = imgRect.height + \"px\";\n    }\n    // The image's own style is the state; nothing is cached, so content typed,\n    // pasted or imported elsewhere reads back correctly.\n    currentAlignment() {\n        const style = this.selectedImage?.style;\n        if (!style) return {\n            position: 'left',\n            wrap: false\n        };\n        if (style.float === 'left' || style.float === 'right') return {\n            position: style.float,\n            wrap: true\n        };\n        if (style.marginLeft === 'auto' && style.marginRight === 'auto') return {\n            position: 'center',\n            wrap: false\n        };\n        if (style.marginLeft === 'auto') return {\n            position: 'right',\n            wrap: false\n        };\n        // Everything else, including an image pasted or imported with no style of\n        // its own, reads as left: that is where it renders.\n        return {\n            position: 'left',\n            wrap: false\n        };\n    }\n    updateButtonStates() {\n        if (!this.selectedImage || !this.resizeContainer) return;\n        const { position: position, wrap: wrap } = this.currentAlignment();\n        this.resizeContainer.querySelectorAll('.alignment-btn').forEach((btn)=>btn.classList.remove('active'));\n        this.resizeContainer.querySelector(`.alignment-btn-${position}`)?.classList.add('active');\n        // Wrapping is a float, and a float has no centred form.\n        const wrapBtn = this.resizeContainer.querySelector('.alignment-btn-wrap');\n        wrapBtn.disabled = !$91d288198827f45b$var$WRAPPED_STYLE_KEYS[position];\n        wrapBtn.classList.toggle('active', wrap);\n    }\n    alignImage(position, wrap) {\n        if (!this.selectedImage || !this.editor) return;\n        const styleKey = $91d288198827f45b$var$styleKeyFor(position, wrap);\n        // Preserve current dimensions\n        const currentWidth = this.selectedImage.style.width;\n        const currentHeight = this.selectedImage.style.height;\n        let newStyle = $91d288198827f45b$export$843fcab4be7a8d7d[styleKey];\n        if (currentWidth) newStyle += ` width: ${currentWidth};`;\n        if (currentHeight) newStyle += ` height: ${currentHeight};`;\n        this.selectedImage.style.cssText = newStyle;\n        // Update TipTap\n        const chain = this.editor.chain().focus().updateAttributes(\"image\", {\n            style: this.selectedImage.style.cssText,\n            align: $91d288198827f45b$var$WRAP_ALIGN_ATTRIBUTES[styleKey] || null\n        });\n        // Position names are TextAlign's own values. A wrapped image is placed by\n        // the float/align pair instead: aligning its paragraph would move the\n        // wrapping text too.\n        if (!wrap) chain.setTextAlign(position);\n        chain.run();\n        this.updateButtonStates();\n        setTimeout(()=>this.showControls(), 10);\n    }\n    startResize(e) {\n        this.isResizing = true;\n        this.startX = e.clientX;\n        this.startY = e.clientY;\n        this.startWidth = this.selectedImage.offsetWidth;\n        this.startHeight = this.selectedImage.offsetHeight;\n        this.aspectRatio = this.selectedImage.naturalWidth / this.selectedImage.naturalHeight;\n        document.body.style.cursor = \"se-resize\";\n        document.body.style.userSelect = \"none\";\n    }\n    doResize(e) {\n        if (!this.isResizing || !this.selectedImage) return;\n        const deltaX = e.clientX - this.startX;\n        const deltaY = e.clientY - this.startY;\n        const deltaMax = Math.max(Math.abs(deltaX), Math.abs(deltaY / this.aspectRatio));\n        let newWidth = Math.max(50, this.startWidth + (deltaX > 0 ? deltaMax : -deltaMax));\n        if (this.maxWidth) newWidth = Math.min(newWidth, this.maxWidth);\n        const newHeight = newWidth / this.aspectRatio;\n        this.selectedImage.style.width = newWidth + \"px\";\n        this.selectedImage.style.height = newHeight + \"px\";\n        this.resizeContainer.style.width = newWidth + \"px\";\n        this.resizeContainer.style.height = newHeight + \"px\";\n    }\n    endResize() {\n        this.isResizing = false;\n        document.body.style.cursor = \"\";\n        document.body.style.userSelect = \"\";\n        if (this.selectedImage && this.editor) {\n            const width = this.selectedImage.style.width;\n            const height = this.selectedImage.style.height;\n            this.editor.chain().focus().updateAttributes(\"image\", {\n                style: this.selectedImage.style.cssText,\n                width: width.replace('px', ''),\n                height: height.replace('px', '')\n            }).run();\n        }\n        this.showControls();\n    }\n    destroy() {\n        if (this.resizeContainer && this.editorElement?.contains(this.resizeContainer)) this.editorElement.removeChild(this.resizeContainer);\n        this.selectedImage = null;\n        this.resizeContainer = null;\n    }\n}\nfunction $91d288198827f45b$export$2ab1496d1b3c0c54(editor, editorElement, maxWidth = 0) {\n    return new $91d288198827f45b$var$ImageResizerClass(editor, editorElement, maxWidth);\n}\n\n});\n\nparcelRegister(\"b2sVO\", function(module, exports) {\n\n$parcel$export(module.exports, \"inlineWidth\", () => $68e1dffe4d0c6ef4$export$52173eece433aa80);\n$parcel$export(module.exports, \"stripSizeDeclarations\", () => $68e1dffe4d0c6ef4$export$aee7d52823245311);\n$parcel$export(module.exports, \"decideEmailImageWidth\", () => $68e1dffe4d0c6ef4$export$d10f0884d88aa2ca);\n// What to do with one email image's width, decided from the full input space:\n// attribute (absent | integer | other) x inline width (absent | px | auto | other).\n// Outlook ignores max-width and reads the width attribute, except that a CSS\n// width (auto included) beats the attribute. The same rules as the backfill\n// command (backfill_email_image_widths.py) — change them together.\n//\n//                 | inline absent      | inline px p          | inline auto        | inline other (%…)\n// attr absent     | probe              | p>col: set col       | probe              | leave\n// attr integer a  | a>col: set col     |   else leave         | set min(a,col)     | leave\n// attr other (%…) | leave              |                      | set attr as-is     | leave\n//\n// Every \"set\" also strips inline width/height and the height attribute, so the\n// new width is not overridden or distorted. \"probe\" means: measure the natural\n// size, then set min(natural, col).\n// The effective inline width, following the cascade (!important, then last).\n// {px}, {auto}, {other} for a percentage or another unit, null when absent.\n// This is a pattern, not a CSS parser: comments are stripped first, and a style\n// carrying a string or url() is reported {other} so nothing touches it — the\n// backend's tinycss2 could read further, but \"leave it alone\" can break nothing.\nconst $68e1dffe4d0c6ef4$export$52173eece433aa80 = (style)=>{\n    style = (style || \"\").replace(/\\/\\*[\\s\\S]*?\\*\\//g, \" \");\n    if (/[\"']|url\\(/i.test(style)) return {\n        other: true\n    };\n    const re = /(?:^|;)\\s*width\\s*:\\s*([^;!]+?)\\s*(!important)?\\s*(?=;|$)/gi;\n    let match, last = null;\n    while(match = re.exec(style))if (!last || match[2] || !last[2]) last = match;\n    if (!last) return null;\n    const value = last[1].trim();\n    if (/^auto$/i.test(value)) return {\n        auto: true\n    };\n    const px = /^([\\d.]+)px$/i.exec(value);\n    return px ? {\n        px: Math.ceil(parseFloat(px[1]))\n    } : {\n        other: true\n    };\n};\n// Only a bare integer is a px width; parseInt would read \"100%\" as 100.\nconst $68e1dffe4d0c6ef4$var$integerAttribute = (widthAttribute)=>/^\\d+$/.test(widthAttribute || \"\") ? parseInt(widthAttribute, 10) : null;\nconst $68e1dffe4d0c6ef4$var$SIZE_DECLARATIONS = /(^|;)\\s*(width|height)\\s*:[^;]*/gi;\nconst $68e1dffe4d0c6ef4$export$aee7d52823245311 = (style)=>(style || \"\").replace($68e1dffe4d0c6ef4$var$SIZE_DECLARATIONS, \"\").replace(/^;\\s*/, \"\").trim() || null;\nconst $68e1dffe4d0c6ef4$export$d10f0884d88aa2ca = (widthAttribute, style, column)=>{\n    const inline = $68e1dffe4d0c6ef4$export$52173eece433aa80(style);\n    if (inline?.other) return {\n        action: \"leave\"\n    }; // the author's layout, not ours to touch\n    if (inline && \"px\" in inline) // 0 is a real value (a hidden spacer), so the check is presence, not truthiness.\n    return inline.px > column ? {\n        action: \"set\",\n        width: column\n    } : {\n        action: \"leave\"\n    };\n    const attribute = $68e1dffe4d0c6ef4$var$integerAttribute(widthAttribute);\n    if (inline?.auto) {\n        // The auto defeats the attribute, so drop it; an attribute keeps saying what it said.\n        if (attribute !== null) return {\n            action: \"set\",\n            width: Math.min(attribute, column)\n        };\n        if (widthAttribute) return {\n            action: \"set\",\n            width: widthAttribute\n        };\n        return {\n            action: \"probe\"\n        };\n    }\n    if (attribute !== null) return attribute > column ? {\n        action: \"set\",\n        width: column\n    } : {\n        action: \"leave\"\n    };\n    if (widthAttribute) return {\n        action: \"leave\"\n    }; // \"100%\": the author's, as on the backend\n    return {\n        action: \"probe\"\n    };\n};\n\n});\n\nparcelRegister(\"goFHH\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $beff3cc23a6879ee$export$2e2bcd8739ae039);\n// Custom table extension for email HTML import with bgcolor, style, width, height support\n\nvar $gkCGf = parcelRequire(\"gkCGf\");\n// Common email HTML attributes to preserve\nconst $beff3cc23a6879ee$var$EMAIL_ATTRIBUTES = {\n    bgcolor: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"bgcolor\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.bgcolor) return {};\n            return {\n                bgcolor: attributes.bgcolor\n            };\n        }\n    },\n    style: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"style\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.style) return {};\n            return {\n                style: attributes.style\n            };\n        }\n    },\n    width: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"width\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.width) return {};\n            return {\n                width: attributes.width\n            };\n        }\n    },\n    height: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"height\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.height) return {};\n            return {\n                height: attributes.height\n            };\n        }\n    },\n    align: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"align\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.align) return {};\n            return {\n                align: attributes.align\n            };\n        }\n    },\n    valign: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"valign\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.valign) return {};\n            return {\n                valign: attributes.valign\n            };\n        }\n    },\n    border: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"border\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.border) return {};\n            return {\n                border: attributes.border\n            };\n        }\n    },\n    cellpadding: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"cellpadding\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.cellpadding) return {};\n            return {\n                cellpadding: attributes.cellpadding\n            };\n        }\n    },\n    cellspacing: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"cellspacing\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.cellspacing) return {};\n            return {\n                cellspacing: attributes.cellspacing\n            };\n        }\n    },\n    colspan: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"colspan\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.colspan) return {};\n            return {\n                colspan: attributes.colspan\n            };\n        }\n    },\n    rowspan: {\n        default: null,\n        parseHTML: (element)=>element.getAttribute(\"rowspan\"),\n        renderHTML: (attributes)=>{\n            if (!attributes.rowspan) return {};\n            return {\n                rowspan: attributes.rowspan\n            };\n        }\n    }\n};\n// Table node\nconst $beff3cc23a6879ee$var$EmailTable = (0, $gkCGf.Node).create({\n    name: \"emailTable\",\n    group: \"block\",\n    content: \"emailTableRow+\",\n    parseHTML () {\n        return [\n            {\n                tag: \"table\"\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            \"table\",\n            (0, $gkCGf.mergeAttributes)(HTMLAttributes),\n            0\n        ];\n    },\n    addAttributes () {\n        return {\n            ...$beff3cc23a6879ee$var$EMAIL_ATTRIBUTES\n        };\n    }\n});\n// Table row node\nconst $beff3cc23a6879ee$var$EmailTableRow = (0, $gkCGf.Node).create({\n    name: \"emailTableRow\",\n    content: \"(emailTableCell | emailTableHeader)+\",\n    parseHTML () {\n        return [\n            {\n                tag: \"tr\"\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            \"tr\",\n            (0, $gkCGf.mergeAttributes)(HTMLAttributes),\n            0\n        ];\n    },\n    addAttributes () {\n        return {\n            bgcolor: $beff3cc23a6879ee$var$EMAIL_ATTRIBUTES.bgcolor,\n            style: $beff3cc23a6879ee$var$EMAIL_ATTRIBUTES.style,\n            height: $beff3cc23a6879ee$var$EMAIL_ATTRIBUTES.height,\n            align: $beff3cc23a6879ee$var$EMAIL_ATTRIBUTES.align,\n            valign: $beff3cc23a6879ee$var$EMAIL_ATTRIBUTES.valign\n        };\n    }\n});\n// Table cell node\nconst $beff3cc23a6879ee$var$EmailTableCell = (0, $gkCGf.Node).create({\n    name: \"emailTableCell\",\n    content: \"block+\",\n    // Enter on an empty paragraph lifts it out of a non-isolating cell and the schema\n    // repair mints a new cell, so typed text jumps to a new column. Same as tiptap's own TableCell.\n    isolating: true,\n    parseHTML () {\n        return [\n            {\n                tag: \"td\"\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            \"td\",\n            (0, $gkCGf.mergeAttributes)(HTMLAttributes),\n            0\n        ];\n    },\n    addAttributes () {\n        return {\n            ...$beff3cc23a6879ee$var$EMAIL_ATTRIBUTES\n        };\n    }\n});\n// Table header cell node\nconst $beff3cc23a6879ee$var$EmailTableHeader = (0, $gkCGf.Node).create({\n    name: \"emailTableHeader\",\n    content: \"block+\",\n    isolating: true,\n    parseHTML () {\n        return [\n            {\n                tag: \"th\"\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            \"th\",\n            (0, $gkCGf.mergeAttributes)(HTMLAttributes),\n            0\n        ];\n    },\n    addAttributes () {\n        return {\n            ...$beff3cc23a6879ee$var$EMAIL_ATTRIBUTES\n        };\n    }\n});\n// Extension to add style/bgcolor to paragraphs, headings, and other block elements\nconst $beff3cc23a6879ee$var$EmailBlockAttributes = (0, $gkCGf.Extension).create({\n    name: \"emailBlockAttributes\",\n    addGlobalAttributes () {\n        return [\n            {\n                types: [\n                    \"paragraph\",\n                    \"heading\",\n                    \"blockquote\",\n                    \"listItem\"\n                ],\n                attributes: {\n                    bgcolor: {\n                        default: null,\n                        parseHTML: (element)=>element.getAttribute(\"bgcolor\"),\n                        renderHTML: (attributes)=>{\n                            if (!attributes.bgcolor) return {};\n                            return {\n                                bgcolor: attributes.bgcolor\n                            };\n                        }\n                    },\n                    style: {\n                        default: null,\n                        parseHTML: (element)=>element.getAttribute(\"style\"),\n                        renderHTML: (attributes)=>{\n                            if (!attributes.style) return {};\n                            return {\n                                style: attributes.style\n                            };\n                        }\n                    }\n                }\n            }\n        ];\n    }\n});\n// Div support for email layouts\nconst $beff3cc23a6879ee$var$EmailDiv = (0, $gkCGf.Node).create({\n    name: \"emailDiv\",\n    group: \"block\",\n    content: \"block+\",\n    parseHTML () {\n        return [\n            {\n                tag: \"div\"\n            }\n        ];\n    },\n    renderHTML ({ HTMLAttributes: HTMLAttributes }) {\n        return [\n            \"div\",\n            (0, $gkCGf.mergeAttributes)(HTMLAttributes),\n            0\n        ];\n    },\n    addAttributes () {\n        return {\n            bgcolor: $beff3cc23a6879ee$var$EMAIL_ATTRIBUTES.bgcolor,\n            style: $beff3cc23a6879ee$var$EMAIL_ATTRIBUTES.style,\n            width: $beff3cc23a6879ee$var$EMAIL_ATTRIBUTES.width,\n            align: $beff3cc23a6879ee$var$EMAIL_ATTRIBUTES.align\n        };\n    }\n});\n// Export all extensions as a single array for easy inclusion\nconst $beff3cc23a6879ee$var$EmailExtensions = [\n    $beff3cc23a6879ee$var$EmailTable,\n    $beff3cc23a6879ee$var$EmailTableRow,\n    $beff3cc23a6879ee$var$EmailTableCell,\n    $beff3cc23a6879ee$var$EmailTableHeader,\n    $beff3cc23a6879ee$var$EmailDiv,\n    $beff3cc23a6879ee$var$EmailBlockAttributes\n];\nvar $beff3cc23a6879ee$export$2e2bcd8739ae039 = $beff3cc23a6879ee$var$EmailExtensions;\n\n});\n\nparcelRegister(\"clziF\", function(module, exports) {\n\n\nmodule.exports = Promise.all([\n    (parcelRequire(\"dNLwc\"))($parcel$resolve(\"3nQvj\")),\n    (parcelRequire(\"dNLwc\"))($parcel$resolve(\"jZLek\"))\n]).then(()=>parcelRequire('2OEOD'));\n\n});\nparcelRegister(\"dNLwc\", function(module, exports) {\n\"use strict\";\n\nvar $7lV8K = parcelRequire(\"7lV8K\");\nmodule.exports = $7lV8K(function(bundle) {\n    return new Promise(function(resolve, reject) {\n        // Don't insert the same script twice (e.g. if it was already in the HTML)\n        var existingScripts = document.getElementsByTagName('script');\n        if ([].concat(existingScripts).some(function(script) {\n            return script.src === bundle;\n        })) {\n            resolve();\n            return;\n        }\n        var preloadLink = document.createElement('link');\n        preloadLink.href = bundle;\n        preloadLink.rel = 'preload';\n        preloadLink.as = 'script';\n        document.head.appendChild(preloadLink);\n        var script = document.createElement('script');\n        script.async = true;\n        script.type = 'text/javascript';\n        script.src = bundle;\n        script.onerror = function(e) {\n            var error = new TypeError(\"Failed to fetch dynamically imported module: \".concat(bundle, \". Error: \").concat(e.message));\n            script.onerror = script.onload = null;\n            script.remove();\n            reject(error);\n        };\n        script.onload = function() {\n            script.onerror = script.onload = null;\n            resolve();\n        };\n        document.getElementsByTagName('head')[0].appendChild(script);\n    });\n});\n\n});\nparcelRegister(\"7lV8K\", function(module, exports) {\n\"use strict\";\nvar $55a6d16921f8ab25$var$cachedBundles = {};\nvar $55a6d16921f8ab25$var$cachedPreloads = {};\nvar $55a6d16921f8ab25$var$cachedPrefetches = {};\nfunction $55a6d16921f8ab25$var$getCache(type) {\n    switch(type){\n        case 'preload':\n            return $55a6d16921f8ab25$var$cachedPreloads;\n        case 'prefetch':\n            return $55a6d16921f8ab25$var$cachedPrefetches;\n        default:\n            return $55a6d16921f8ab25$var$cachedBundles;\n    }\n}\nmodule.exports = function(loader, type) {\n    return function(bundle) {\n        var cache = $55a6d16921f8ab25$var$getCache(type);\n        if (cache[bundle]) return cache[bundle];\n        return cache[bundle] = loader.apply(null, arguments).catch(function(e) {\n            delete cache[bundle];\n            throw e;\n        });\n    };\n};\n\n});\n\n\n\nparcelRegister(\"h8GB1\", function(module, exports) {\n\n\nmodule.exports = Promise.all([\n    (parcelRequire(\"dNLwc\"))($parcel$resolve(\"3nQvj\")),\n    (parcelRequire(\"dNLwc\"))($parcel$resolve(\"4vlhK\"))\n]).then(()=>parcelRequire('jQNkf'));\n\n});\n\n\nparcelRegister(\"d6Hx1\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $98ad9a5c4b4a74be$export$2e2bcd8739ae039);\n\nvar $jhwMH = parcelRequire(\"jhwMH\");\n\nvar $jSNlv = parcelRequire(\"jSNlv\");\n\nvar $1QcTx = parcelRequire(\"1QcTx\");\n\nvar $5K4Ak = parcelRequire(\"5K4Ak\");\n$jhwMH.extend($jSNlv);\n$jhwMH.extend($1QcTx);\n$jhwMH.extend($5K4Ak);\n// Cute pastel colors for calendar events (background color classes)\nconst $98ad9a5c4b4a74be$var$CALENDAR_COLORS = [\n    {\n        bg: \"bg-blue-100\",\n        border: \"border-blue-200\"\n    },\n    {\n        bg: \"bg-pink-100\",\n        border: \"border-pink-200\"\n    },\n    {\n        bg: \"bg-green-100\",\n        border: \"border-green-200\"\n    },\n    {\n        bg: \"bg-purple-100\",\n        border: \"border-purple-200\"\n    },\n    {\n        bg: \"bg-amber-100\",\n        border: \"border-amber-200\"\n    },\n    {\n        bg: \"bg-cyan-100\",\n        border: \"border-cyan-200\"\n    },\n    {\n        bg: \"bg-rose-100\",\n        border: \"border-rose-200\"\n    },\n    {\n        bg: \"bg-teal-100\",\n        border: \"border-teal-200\"\n    }\n];\nvar $98ad9a5c4b4a74be$export$2e2bcd8739ae039 = ({ initialCurrentDate: initialCurrentDate, userLocale: userLocale = \"en\", initialStartTime: initialStartTime = \"09:00\", initialEndTime: initialEndTime = \"10:00\" })=>{\n    // Configure Day.js locale based on user preference\n    const locale = userLocale === \"tr\" ? \"tr\" : \"en\";\n    $jhwMH.locale(locale);\n    return {\n        inProgress: false,\n        currentDate: initialCurrentDate ? $jhwMH(initialCurrentDate) : $jhwMH(),\n        startTime: initialStartTime,\n        endTime: initialEndTime,\n        locale: locale,\n        selectedTimezone: null,\n        // Get color for a calendar based on its index\n        getCalendarColor (index) {\n            return $98ad9a5c4b4a74be$var$CALENDAR_COLORS[index % $98ad9a5c4b4a74be$var$CALENDAR_COLORS.length];\n        },\n        // Get localized day names for calendar header\n        getLocalizedDayNames () {\n            const dayNames = [];\n            // Start with Monday (ISO week)\n            for(let i = 1; i <= 7; i++){\n                const day = $jhwMH().isoWeekday(i);\n                dayNames.push(day.format(\"dd\")); // Short day names like \"Mo\", \"Tu\", etc.\n            }\n            return dayNames;\n        },\n        processEvents (events) {\n            // Sort events by start time using valueOf() for reliable comparison\n            const sortedEvents = [\n                ...events\n            ].sort((a, b)=>{\n                const startA = this.convertToLocalTime(a.when.start_time, a.when.start_timezone);\n                const startB = this.convertToLocalTime(b.when.start_time, b.when.start_timezone);\n                return startA.valueOf() - startB.valueOf();\n            });\n            // Track overlapping groups - need to track the maximum end time of the group\n            const groups = [];\n            let currentGroup = [];\n            let groupMaxEnd = null;\n            for (const event of sortedEvents){\n                const eventStart = this.convertToLocalTime(event.when.start_time, event.when.start_timezone);\n                const eventEnd = this.convertToLocalTime(event.when.end_time, event.when.end_timezone);\n                // If currentGroup is empty or event overlaps with the group's time span\n                if (currentGroup.length === 0) {\n                    currentGroup.push({\n                        event: event,\n                        column: 0\n                    });\n                    groupMaxEnd = eventEnd;\n                } else // Check if event starts before the group's maximum end time (any overlap)\n                if (eventStart.isBefore(groupMaxEnd)) {\n                    // Find first available column where no overlap exists\n                    let column = 0;\n                    while(currentGroup.some((item)=>item.column === column && this.eventsOverlap(item.event, event)))column++;\n                    currentGroup.push({\n                        event: event,\n                        column: column\n                    });\n                    // Update group's max end time if this event ends later\n                    if (eventEnd.isAfter(groupMaxEnd)) groupMaxEnd = eventEnd;\n                } else {\n                    // No overlap with group, start new group\n                    groups.push(currentGroup);\n                    currentGroup = [\n                        {\n                            event: event,\n                            column: 0\n                        }\n                    ];\n                    groupMaxEnd = eventEnd;\n                }\n            }\n            if (currentGroup.length > 0) groups.push(currentGroup);\n            return groups;\n        },\n        eventsOverlap (event1, event2) {\n            const start1 = this.convertToLocalTime(event1.when.start_time, event1.when.start_timezone);\n            const end1 = this.convertToLocalTime(event1.when.end_time, event1.when.end_timezone);\n            const start2 = this.convertToLocalTime(event2.when.start_time, event2.when.start_timezone);\n            const end2 = this.convertToLocalTime(event2.when.end_time, event2.when.end_timezone);\n            // Two events overlap if one starts before the other ends\n            return start1.isBefore(end2) && start2.isBefore(end1);\n        },\n        // Get horizontal positioning for overlapping events (left/width)\n        getEventHorizontalStyle (event, events) {\n            const groups = this.processEvents(events);\n            let eventGroup;\n            // Find which group contains this event\n            for(let i = 0; i < groups.length; i++){\n                const group = groups[i];\n                const foundEvent = group.find((item)=>item.event.id === event.id);\n                if (foundEvent) {\n                    eventGroup = group;\n                    break;\n                }\n            }\n            // Default: full width with margin for spacing from grid lines\n            if (!eventGroup || eventGroup.length <= 1) return {\n                width: \"calc(100% - 12px)\",\n                left: \"6px\"\n            };\n            const maxColumns = Math.max(...eventGroup.map((item)=>item.column)) + 1;\n            const eventData = eventGroup.find((item)=>item.event.id === event.id);\n            const column = eventData.column;\n            // Calculate horizontal position as percentages - events share full width evenly\n            const widthPercent = 100 / maxColumns;\n            const leftPercent = column * widthPercent;\n            return {\n                width: `calc(${widthPercent}% - 12px)`,\n                left: `calc(${leftPercent}% + 6px)`\n            };\n        },\n        // Combined absolute positioning for events (top, height, left, width as percentages)\n        getEventAbsoluteStyle (event, events) {\n            // Vertical positioning: percentage of total day (24 hours = 1440 minutes = 100%)\n            // Use native Date for reliable local time conversion (unix timestamps are UTC)\n            const startDate = new Date(event.when.start_time * 1000);\n            const endDate = new Date(event.when.end_time * 1000);\n            const startMinutes = startDate.getHours() * 60 + startDate.getMinutes();\n            const endMinutes = endDate.getHours() * 60 + endDate.getMinutes();\n            const durationMinutes = endMinutes - startMinutes;\n            // Top and height as percentage of day\n            const topPercent = startMinutes / 1440 * 100;\n            const heightPercent = durationMinutes / 1440 * 100;\n            // Horizontal positioning: get column info from overlap detection\n            const groups = this.processEvents(events);\n            let eventGroup;\n            for(let i = 0; i < groups.length; i++){\n                const group = groups[i];\n                const foundEvent = group.find((item)=>item.event.id === event.id);\n                if (foundEvent) {\n                    eventGroup = group;\n                    break;\n                }\n            }\n            let leftPercent = 0;\n            let widthPercent = 100;\n            if (eventGroup && eventGroup.length > 1) {\n                const maxColumns = Math.max(...eventGroup.map((item)=>item.column)) + 1;\n                const eventData = eventGroup.find((item)=>item.event.id === event.id);\n                const column = eventData.column;\n                widthPercent = 100 / maxColumns;\n                leftPercent = column * widthPercent;\n            }\n            return {\n                top: `${topPercent}%`,\n                height: `${heightPercent}%`,\n                left: `calc(${leftPercent}% + 2px)`,\n                width: `calc(${widthPercent}% - 4px)`\n            };\n        },\n        // Simple event style - just vertical positioning via grid-row\n        getEventStyle (event) {\n            return {\n                \"grid-row\": `${this.getGridRow(event)} / span ${this.getGridSpan(event)}`\n            };\n        },\n        // Grid-based event style for vertical positioning (uses grid-row)\n        getEventGridStyle (event) {\n            return {\n                \"grid-row\": `${this.getGridRow(event)} / span ${this.getGridSpan(event)}`,\n                \"grid-column\": \"1\"\n            };\n        },\n        // Get overlay style for selected time slot (matches events grid with header row)\n        getSelectedTimeOverlayStyle () {\n            const [startHours, startMinutes] = this.startTime.split(\":\").map(Number);\n            const [endHours, endMinutes] = this.endTime.split(\":\").map(Number);\n            // Grid row calculation: each hour has 12 slots (5-minute intervals)\n            // +2 for initial offset (header row) - must match getGridRow calculation\n            const startRow = startHours * 12 + Math.floor(startMinutes / 5) + 2;\n            // Calculate duration in 5-minute slots\n            const startTotalMinutes = startHours * 60 + startMinutes;\n            const endTotalMinutes = endHours * 60 + endMinutes;\n            const durationMinutes = endTotalMinutes - startTotalMinutes;\n            const span = Math.ceil(durationMinutes / 5);\n            return {\n                \"grid-row\": `${startRow} / span ${span}`\n            };\n        },\n        // --- Meeting room availability -------------------------------------------\n        // The server returns only busy time ranges for the selected room; the\n        // provider's free/busy API carries no titles or participants, so there is\n        // nothing else to render even if we wanted to.\n        selectedRoomId: \"\",\n        roomBusy: [],\n        roomUnavailable: false,\n        fetchRoomBusy () {\n            this.roomUnavailable = false;\n            if (!this.selectedRoomId) {\n                this.roomBusy = [];\n                return;\n            }\n            const dayStart = this.currentDate.startOf(\"day\").unix();\n            fetch(`/scheduling/rooms/${this.selectedRoomId}/busy/${dayStart}/`).then(async (response)=>{\n                if (!response.ok) {\n                    // A room deleted on the provider side is deactivated server-side;\n                    // flag it here so the picker stops promising availability.\n                    if (response.status === 404) this.roomUnavailable = true;\n                    throw new Error(`Room availability failed with ${response.status}`);\n                }\n                return response.json();\n            }).then((data)=>{\n                this.roomBusy = data.busy || [];\n            }).catch(()=>{\n                this.roomBusy = [];\n            });\n        },\n        clearRoom () {\n            this.selectedRoomId = \"\";\n            this.roomBusy = [];\n            this.roomUnavailable = false;\n        },\n        getRoomBusyStyle (slot) {\n            const start = this.convertToLocalTime(slot.start_time);\n            const end = this.convertToLocalTime(slot.end_time);\n            const startRow = start.hour() * 12 + Math.floor(start.minute() / 5) + 2;\n            const span = Math.max(1, Math.ceil(end.diff(start, \"minute\") / 5));\n            return {\n                \"grid-row\": `${startRow} / span ${span}`\n            };\n        },\n        // True when the currently picked slot overlaps a booking on the room.\n        get roomConflict () {\n            if (!this.selectedRoomId || this.roomBusy.length === 0) return false;\n            const [startHours, startMinutes] = this.startTime.split(\":\").map(Number);\n            const [endHours, endMinutes] = this.endTime.split(\":\").map(Number);\n            const selectedStart = startHours * 60 + startMinutes;\n            const selectedEnd = endHours * 60 + endMinutes;\n            return this.roomBusy.some((slot)=>{\n                const start = this.convertToLocalTime(slot.start_time);\n                const end = this.convertToLocalTime(slot.end_time);\n                const busyStart = start.hour() * 60 + start.minute();\n                const busyEnd = end.hour() * 60 + end.minute();\n                return selectedStart < busyEnd && busyStart < selectedEnd;\n            });\n        },\n        scrollToBusinessHours () {\n            // Wait for the next tick to ensure DOM is updated\n            this.$nextTick(()=>{\n                const container = this.$refs.eventContainer;\n                if (container) {\n                    // For 9 AM:\n                    // - Skip header row (1.25rem)\n                    // - Each hour is 12 slots (5-minute intervals)\n                    // - We want to scroll to 9 * 12 = 108 slots\n                    const slotHeight = (container.scrollHeight - 1.25) / 288; // Total height minus header divided by number of slots\n                    const scrollPosition = 108 * slotHeight;\n                    container.scrollTop = scrollPosition;\n                }\n            });\n        },\n        today () {\n            return $jhwMH();\n        },\n        setDate (date) {\n            this.currentDate = $jhwMH(date);\n        },\n        nextMonth () {\n            this.currentDate = this.currentDate.add(1, \"month\");\n        },\n        previousMonth () {\n            this.currentDate = this.currentDate.subtract(1, \"month\");\n        },\n        nextDay () {\n            this.currentDate = this.currentDate.add(1, \"day\");\n        },\n        previousDay () {\n            this.currentDate = this.currentDate.subtract(1, \"day\");\n        },\n        getSelectedTimeStyle () {\n            // Calculate grid position based on start and end time\n            const [startHours, startMinutes] = this.startTime.split(\":\").map(Number);\n            const [endHours, endMinutes] = this.endTime.split(\":\").map(Number);\n            // Grid row calculation: each hour has 12 slots (5-minute intervals)\n            // +2 for the initial offset (header row)\n            const startRow = startHours * 12 + Math.floor(startMinutes / 5) + 2;\n            // Calculate duration in 5-minute slots\n            const startTotalMinutes = startHours * 60 + startMinutes;\n            const endTotalMinutes = endHours * 60 + endMinutes;\n            const durationMinutes = endTotalMinutes - startTotalMinutes;\n            const span = Math.ceil(durationMinutes / 5);\n            return {\n                \"grid-row\": `${startRow} / span ${span}`\n            };\n        },\n        getDaysArray () {\n            let startDay = this.currentDate.startOf(\"month\").startOf(\"isoWeek\");\n            let endDay = this.currentDate.endOf(\"month\").endOf(\"isoWeek\");\n            let days = [];\n            for(let day = startDay; day.isBefore(endDay); day = day.add(1, \"day\"))days.push({\n                date: day.format(\"YYYY-MM-DD\"),\n                number: day.format(\"D\"),\n                isCurrentMonth: day.month() === this.currentDate.month(),\n                isCurrentDay: day.format(\"YYYY-MM-DD\") === this.currentDate.format(\"YYYY-MM-DD\"),\n                isToday: day.format(\"YYYY-MM-DD\") === $jhwMH().format(\"YYYY-MM-DD\"),\n                isStartOfMonth: day.date() === 1,\n                isEndOfMonth: day.date() === day.daysInMonth(),\n                isTopLeftDay: day.isSame(startDay, \"day\"),\n                isTopRightDay: day.isSame(startDay.add(6, \"day\"), \"day\"),\n                isBottomLeftDay: day.isSame(endDay.subtract(6, \"day\"), \"day\"),\n                isBottomRightDay: day.isSame(endDay, \"day\")\n            });\n            return days;\n        },\n        unauthenticatedInterviewers: [],\n        // calendar data format: {id: string, events: array}\n        calendars: [],\n        filteredEvents (calendarData) {\n            return calendarData.events.filter((event)=>{\n                const eventStart = this.convertToLocalTime(event.when.start_time, event.when.start_timezone);\n                const eventEnd = this.convertToLocalTime(event.when.end_time, event.when.end_timezone);\n                return eventStart.isSame(this.currentDate, \"day\") || eventEnd.isSame(this.currentDate, \"day\");\n            });\n        },\n        getEventClasses (event) {\n            return \"relative mt-px flex\";\n        },\n        getGridRow (event) {\n            const localTime = this.convertToLocalTime(event.when.start_time, event.when.start_timezone);\n            const hour = localTime.hour();\n            const minute = localTime.minute();\n            return hour * 12 + Math.floor(minute / 5) + 2; // +2 for initial offset in grid rows\n        },\n        getGridSpan (event) {\n            const startTime = this.convertToLocalTime(event.when.start_time, event.when.start_timezone);\n            const endTime = this.convertToLocalTime(event.when.end_time, event.when.end_timezone);\n            const duration = endTime.diff(startTime, \"minute\");\n            return Math.ceil(duration / 5); // Each grid row represents 5 minutes\n        },\n        formatTime (event) {\n            const localTime = this.convertToLocalTime(event.when.start_time, event.when.start_timezone);\n            return localTime.format(\"h:mm A\");\n        },\n        getDateTime (event) {\n            return this.convertToLocalTime(event.when.start_time, event.when.start_timezone).toISOString();\n        },\n        convertToLocalTime (unixTime, timezone) {\n            // Convert unix timestamp to the selected timezone for display\n            // If selectedTimezone is set, use it; otherwise fall back to browser's timezone\n            const targetTimezone = this.selectedTimezone || $jhwMH.tz.guess();\n            return $jhwMH.unix(unixTime).tz(targetTimezone);\n        },\n        isEven (index) {\n            return index % 2 === 0;\n        },\n        /*\n     * Fetches calendar events for the given interviewer and adds them to the calendars array\n     * If the interviewer is not authenticated, adds the email to the unauthenticatedInterviewers array\n     *\n     * @param {{ email: string, name: string, id: string }} interviewer - interviewer object\n     */ fetchCalendars (interviewer) {\n            this.inProgress = true;\n            fetch(`/scheduling/calendars/${interviewer.id}/events/${this.currentDate.startOf(\"day\").unix()}/`).then(async (response)=>{\n                this.inProgress = false;\n                if (!response.ok) {\n                    const data = await response.json();\n                    const error = new Error(`API request failed with status ${response.status}`);\n                    // Attach the server response data to the error object to preserve existing error handling logic\n                    Object.assign(error, data);\n                    throw error;\n                }\n                return response.json();\n            }).then((data)=>{\n                // push data to calendars array\n                // check if the interviewer is already in the calendars array\n                // if so, update the events array\n                const index = this.calendars.findIndex((calendar)=>calendar.id === interviewer.email);\n                if (index === -1) this.calendars.push({\n                    id: interviewer.email,\n                    events: data.events\n                });\n                else this.calendars[index].events = data.events;\n                // Scroll to business hours after calendar data is loaded\n                this.scrollToBusinessHours();\n            }).catch((error)=>{\n                // If error is 400 and error.type is \"grant-needed\", push the email to unauthenticatedInterviewers\n                if (error?.error?.type === \"grant-needed\") this.unauthenticatedInterviewers.push(interviewer.email);\n                else // Report error to sentry\n                try {\n                    throw new Error(\"Unexpected Nylas error\", error);\n                } catch (err) {\n                    window.Sentry && Sentry.onLoad(function() {\n                        const client = Sentry.getClient();\n                        client.captureException(err);\n                    });\n                }\n            });\n        },\n        init () {\n            if (this.interviewers) {\n                this.calendars = [];\n                this.unauthenticatedInterviewers = [];\n                for (const interviewer of this.interviewers)this.fetchCalendars(interviewer);\n            }\n            this.$watch(\"interviewers, currentDate\", (value)=>{\n                // For each interviewer, fetch calender events and add returned data to calendars\n                // Clean up calendars and unauthenticatedInterviewers arrays before fetching new data\n                this.calendars = [];\n                this.unauthenticatedInterviewers = [];\n                for (const interviewer of value)this.fetchCalendars(interviewer);\n            });\n            // Watch for start time changes\n            this.$watch(\"startTime\", (value)=>{\n                if (!value) return;\n                // Parse the start time and add one hour\n                const [hours, minutes] = value.split(\":\");\n                const startDate = new Date(2000, 0, 1, parseInt(hours), parseInt(minutes));\n                // Special case for 11 PM (23:00)\n                if (parseInt(hours) >= 23) // Add 45 minutes instead of 1 hour\n                this.endTime = \"23:45\";\n                else {\n                    // Normal case: add 1 hour\n                    const endDate = new Date(startDate.getTime() + 3600000);\n                    this.endTime = `${endDate.getHours().toString().padStart(2, \"0\")}:${endDate.getMinutes().toString().padStart(2, \"0\")}`;\n                }\n            });\n            // Room busy blocks are day-scoped, so they follow both the picked room and\n            // the picked date.\n            this.$watch(\"selectedRoomId\", ()=>this.fetchRoomBusy());\n            this.$watch(\"currentDate\", ()=>this.fetchRoomBusy());\n            // Initial scroll to business hours\n            this.scrollToBusinessHours();\n        }\n    };\n};\n\n});\nparcelRegister(\"1QcTx\", function(module, exports) {\n!function(t, e) {\n    module.exports = e();\n}(module.exports, function() {\n    \"use strict\";\n    var t = {\n        year: 0,\n        month: 1,\n        day: 2,\n        hour: 3,\n        minute: 4,\n        second: 5\n    }, e = {};\n    return function(n, i, r) {\n        var o, a = function(t, n, i) {\n            void 0 === i && (i = {});\n            var r = new Date(t), o = function(t, n) {\n                void 0 === n && (n = {});\n                var i = n.timeZoneName || \"short\", r = t + \"|\" + i, o = e[r];\n                return o || (o = new Intl.DateTimeFormat(\"en-US\", {\n                    hour12: !1,\n                    timeZone: t,\n                    year: \"numeric\",\n                    month: \"2-digit\",\n                    day: \"2-digit\",\n                    hour: \"2-digit\",\n                    minute: \"2-digit\",\n                    second: \"2-digit\",\n                    timeZoneName: i\n                }), e[r] = o), o;\n            }(n, i);\n            return o.formatToParts(r);\n        }, u = function(e, n) {\n            for(var i = a(e, n), o = [], u = 0; u < i.length; u += 1){\n                var f = i[u], s = f.type, m = f.value, c = t[s];\n                c >= 0 && (o[c] = parseInt(m, 10));\n            }\n            var l = o[3], d = 24 === l ? 0 : l, h = o[0] + \"-\" + o[1] + \"-\" + o[2] + \" \" + d + \":\" + o[4] + \":\" + o[5] + \":000\", v = +e;\n            return (r.utc(h).valueOf() - (v -= v % 1e3)) / 6e4;\n        }, f = i.prototype;\n        f.tz = function(t, e) {\n            if (void 0 === t && (t = o), !this.isValid()) return this;\n            var n, i = this.utcOffset(), a = this.toDate(), f = a.toLocaleString(\"en-US\", {\n                timeZone: t\n            }), s = u(+a, t);\n            if (!Number(s)) n = this.utcOffset(0, e);\n            else if (n = r(f, {\n                locale: this.$L\n            }).$set(\"millisecond\", this.$ms).utcOffset(s, !0), e) {\n                var m = n.utcOffset();\n                n = n.add(i - m, \"minute\");\n            }\n            return n.$x.$timezone = t, n;\n        }, f.offsetName = function(t) {\n            var e = this.$x.$timezone || r.tz.guess(), n = a(this.valueOf(), e, {\n                timeZoneName: t\n            }).find(function(t) {\n                return \"timezonename\" === t.type.toLowerCase();\n            });\n            return n && n.value;\n        };\n        var s = f.startOf;\n        f.startOf = function(t, e) {\n            if (!this.$x || !this.$x.$timezone) return s.call(this, t, e);\n            var n = r(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\"), {\n                locale: this.$L\n            });\n            return s.call(n, t, e).tz(this.$x.$timezone, !0);\n        }, r.tz = function(t, e, n) {\n            var i = n && e, a = n || e || o, f = u(+r(), a);\n            if (\"string\" != typeof t) return r(t).tz(a);\n            var s = r.utc(t, i).valueOf();\n            if (Number.isNaN(s)) {\n                var m = r(NaN);\n                return m.$x.$timezone = a, m;\n            }\n            var c = function(t, e, n) {\n                var i = t - 60 * e * 1e3, r = u(i, n);\n                if (e === r) return [\n                    i,\n                    e\n                ];\n                var o = u(i -= 60 * (r - e) * 1e3, n);\n                return r === o ? [\n                    i,\n                    r\n                ] : [\n                    t - 60 * Math.min(r, o) * 1e3,\n                    Math.max(r, o)\n                ];\n            }(s, f, a), l = c[0], d = c[1], h = r(l).utcOffset(d);\n            return h.$x.$timezone = a, h;\n        }, r.tz.guess = function() {\n            return Intl.DateTimeFormat().resolvedOptions().timeZone;\n        }, r.tz.setDefault = function(t) {\n            o = t;\n        };\n    };\n});\n\n});\n\nparcelRegister(\"5K4Ak\", function(module, exports) {\n!function(e, t) {\n    module.exports = t();\n}(module.exports, function() {\n    \"use strict\";\n    var e = \"day\";\n    return function(t, i, s) {\n        var a = function(t) {\n            return t.add(4 - t.isoWeekday(), e);\n        }, d = i.prototype;\n        d.isoWeekYear = function() {\n            return a(this).year();\n        }, d.isoWeek = function(t) {\n            if (!this.$utils().u(t)) return this.add(7 * (t - this.isoWeek()), e);\n            var i, d, n, o, r = a(this), u = (i = this.isoWeekYear(), d = this.$u, n = (d ? s.utc : s)().year(i).startOf(\"year\"), o = 4 - n.isoWeekday(), n.isoWeekday() > 4 && (o += 7), n.add(o, e));\n            return r.diff(u, \"week\") + 1;\n        }, d.isoWeekday = function(e) {\n            return this.$utils().u(e) ? this.day() || 7 : this.day(this.day() % 7 ? e : e - 7);\n        };\n        var n = d.startOf;\n        d.startOf = function(e, t) {\n            var i = this.$utils(), s = !!i.u(t) || t;\n            return \"isoweek\" === i.p(e) ? s ? this.date(this.date() - (this.isoWeekday() - 1)).startOf(\"day\") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf(\"day\") : n.bind(this)(e, t);\n        };\n    };\n});\n\n});\n\n\nparcelRegister(\"F4g3Q\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $07b722027a47cba2$export$2e2bcd8739ae039);\n/**\n * @fileoverview Alpine.js component for filtering job listings on career site pages.\n *\n * This component provides client-side filtering functionality for job cards by:\n * - Location (populated from DOM with UUID-based IDs)\n * - Department (populated from DOM with UUID-based IDs)\n * - Employment type (options rendered server-side via Django {% translate %} tags)\n * - Workplace type (options rendered server-side via Django {% translate %} tags)\n *\n * The component reads job data from HTML data attributes on job cards and uses\n * DOM manipulation to show/hide cards based on the selected filter criteria.\n */ /**\n * @typedef {Object} FilterOption\n * @property {string} value - The filter value used for comparison\n * @property {string} label - The display label shown to users\n */ /**\n * @typedef {Object} JobListFilterData\n * @property {string} selectedLocation - Currently selected location ID (UUID)\n * @property {string} selectedEmploymentType - Currently selected employment type value\n * @property {string} selectedWorkplaceType - Currently selected workplace type value\n * @property {string} selectedDepartment - Currently selected department ID (UUID)\n * @property {FilterOption[]} locations - Available location options with UUID values\n * @property {FilterOption[]} departments - Available department options with UUID values\n * @property {function(): void} init - Initialize the component and populate filter options\n * @property {function(): void} populateLocationOptions - Extract location options from DOM\n * @property {function(): void} populateDepartmentOptions - Extract department options from DOM\n * @property {function(): void} filterJobs - Apply current filters to job cards\n * @property {function(): void} updateDepartmentGroupsVisibility - Show/hide department groups based on visible jobs\n * @property {function(boolean): void} toggleNoResultsMessage - Show/hide the no results message\n * @property {function(): void} resetFilters - Clear all filters and show all jobs\n */ /**\n * Alpine.js job list filter component for career site job listings.\n * Provides client-side filtering by location, department, employment type,\n * and workplace type.\n *\n * @returns {JobListFilterData} Alpine.js component data object\n */ var $07b722027a47cba2$export$2e2bcd8739ae039 = ()=>{\n    console.debug(\"Alpine.js job_list_filter component instantiated\");\n    return {\n        // State - Filter selections\n        /** @type {string} Currently selected location ID (UUID, empty string = no filter) */ selectedLocation: \"\",\n        /** @type {string} Currently selected employment type (empty string = no filter) */ selectedEmploymentType: \"\",\n        /** @type {string} Currently selected workplace type (empty string = no filter) */ selectedWorkplaceType: \"\",\n        /** @type {string} Currently selected department ID (UUID, empty string = no filter) */ selectedDepartment: \"\",\n        // Available options - Filter choices\n        /** @type {FilterOption[]} Location options populated from job cards */ locations: [],\n        /** @type {FilterOption[]} Department options populated from job cards */ departments: [],\n        /**\n     * Initialize the Alpine.js component.\n     * Waits for DOM to be ready, then populates location and department\n     * options from job cards.\n     * Employment type and workplace type options are rendered server-side.\n     * Called automatically by Alpine.js when component is mounted.\n     *\n     * @returns {void}\n     */ init () {\n            console.debug(\"Alpine.js job_list_filter init() called\");\n            // Use nextTick to ensure DOM is ready\n            this.$nextTick(()=>{\n                console.debug(\"Alpine.js nextTick called\");\n                // Populate location and department options from existing job cards\n                this.populateLocationOptions();\n                this.populateDepartmentOptions();\n                console.debug(\"Data populated:\", {\n                    locations: this.locations,\n                    departments: this.departments\n                });\n            });\n        },\n        /**\n     * Extract location options from job card DOM elements.\n     * Reads data-location-id attributes and finds corresponding display names\n     * using the data-field-type=\"location\" attribute for identification.\n     * Updates the locations array with FilterOption objects.\n     *\n     * @returns {void}\n     */ populateLocationOptions () {\n            const jobCards = document.querySelectorAll(\".job-card\");\n            console.debug(\"Found job cards:\", jobCards.length);\n            const locationsMap = new Map();\n            jobCards.forEach((card, index)=>{\n                const locationId = card.getAttribute(\"data-location-id\");\n                console.debug(`Card ${index}:`, {\n                    locationId: locationId,\n                    hasDataLocationId: card.hasAttribute(\"data-location-id\")\n                });\n                if (locationId && locationId !== \"\") {\n                    // Get the location name from the element with data-field-type=\"location\"\n                    const locationElement = card.querySelector('[data-field-type=\"location\"]');\n                    if (locationElement) {\n                        const locationName = locationElement.textContent.trim();\n                        if (locationName) locationsMap.set(locationId, locationName);\n                    }\n                }\n            });\n            // Convert map to array of objects for Alpine.js x-for, sort by label\n            this.locations = Array.from(locationsMap.entries()).map(([id, name])=>({\n                    value: id,\n                    label: name\n                })).sort((a, b)=>a.label.localeCompare(b.label));\n            console.debug(\"Final location array:\", this.locations);\n        },\n        /**\n     * Extract department options from job card DOM elements.\n     * Reads data-department-id and data-department-name attributes.\n     * Jobs without a department are grouped under a translated \"Other\"\n     * section on the page, so when such cards exist an \"Other\" option\n     * (sentinel value \"__other__\") is appended, labeled with that\n     * section's header text.\n     * Updates the departments array with FilterOption objects.\n     *\n     * @returns {void}\n     */ populateDepartmentOptions () {\n            const jobCards = document.querySelectorAll(\".job-card\");\n            const departmentsMap = new Map();\n            let otherLabel = \"\";\n            jobCards.forEach((card)=>{\n                const departmentId = card.getAttribute(\"data-department-id\");\n                const departmentName = card.getAttribute(\"data-department-name\");\n                if (departmentId && departmentName) departmentsMap.set(departmentId, departmentName);\n                else if (!otherLabel) {\n                    // Department-less jobs render under the translated \"Other\"\n                    // section; reuse its header as the option label.\n                    const heading = card.closest(\"[data-department-group]\")?.querySelector(\"h3\");\n                    otherLabel = heading ? heading.textContent.trim() : \"\";\n                }\n            });\n            this.departments = Array.from(departmentsMap.entries()).map(([id, name])=>({\n                    value: id,\n                    label: name\n                })).sort((a, b)=>a.label.localeCompare(b.label));\n            if (otherLabel) this.departments.push({\n                value: \"__other__\",\n                label: otherLabel\n            });\n            console.debug(\"Final department array:\", this.departments);\n        },\n        /**\n     * Apply current filter selections to job cards.\n     * Shows/hides job cards based on location, employment type, and workplace type filters.\n     * Also updates department group visibility and shows/hides no results message.\n     *\n     * @returns {void}\n     */ filterJobs () {\n            const jobCards = document.querySelectorAll(\".job-card\");\n            let visibleCount = 0;\n            jobCards.forEach((card)=>{\n                const locationId = card.getAttribute(\"data-location-id\") || \"\";\n                const employmentType = card.getAttribute(\"data-employment-type\") || \"\";\n                const workplaceType = card.getAttribute(\"data-workplace-type\") || \"\";\n                const departmentId = card.getAttribute(\"data-department-id\") || \"\";\n                // Check if job matches all filters\n                const matchesLocation = !this.selectedLocation || locationId === this.selectedLocation;\n                const matchesEmployment = !this.selectedEmploymentType || employmentType === this.selectedEmploymentType;\n                const matchesWorkplace = !this.selectedWorkplaceType || workplaceType === this.selectedWorkplaceType;\n                const matchesDepartment = !this.selectedDepartment || (this.selectedDepartment === \"__other__\" ? departmentId === \"\" : departmentId === this.selectedDepartment);\n                const shouldShow = matchesLocation && matchesEmployment && matchesWorkplace && matchesDepartment;\n                // Show/hide the card\n                if (shouldShow) {\n                    card.style.display = \"\";\n                    card.classList.remove(\"opacity-0\");\n                    visibleCount++;\n                } else {\n                    card.style.display = \"none\";\n                    card.classList.add(\"opacity-0\");\n                }\n            });\n            // Handle department groups visibility\n            this.updateDepartmentGroupsVisibility();\n            // Show/hide no results message\n            this.toggleNoResultsMessage(visibleCount === 0);\n        },\n        /**\n     * Update department group visibility based on visible job cards.\n     * Hides department sections that have no visible jobs after filtering.\n     * Shows department sections that have at least one visible job.\n     *\n     * @returns {void}\n     */ updateDepartmentGroupsVisibility () {\n            const departmentGroups = document.querySelectorAll(\"[data-department-group]\");\n            departmentGroups.forEach((group)=>{\n                const visibleJobs = group.querySelectorAll('.job-card:not([style*=\"display: none\"])');\n                if (visibleJobs.length === 0) group.style.display = \"none\";\n                else group.style.display = \"\";\n            });\n        },\n        /**\n     * Show or hide the \"no results found\" message.\n     * Uses the existing element in the template with proper translation.\n     *\n     * @param {boolean} show - Whether to show (true) or hide (false) the message\n     * @returns {void}\n     */ toggleNoResultsMessage (show) {\n            const noResultsEl = document.getElementById(\"no-filter-results\");\n            if (noResultsEl) {\n                if (show) noResultsEl.classList.remove(\"hidden\");\n                else noResultsEl.classList.add(\"hidden\");\n            }\n        },\n        /**\n     * Reset all filter selections to empty values.\n     * Clears location, department, employment type, and workplace type filters.\n     * Automatically triggers filterJobs() to show all jobs.\n     *\n     * @returns {void}\n     */ resetFilters () {\n            this.selectedLocation = \"\";\n            this.selectedEmploymentType = \"\";\n            this.selectedWorkplaceType = \"\";\n            this.selectedDepartment = \"\";\n            this.filterJobs();\n        }\n    };\n};\n\n});\n\nparcelRegister(\"lbjQh\", function(module, exports) {\n\n$parcel$export(module.exports, \"createScorecardWeightsComponent\", () => $f6ba04531c01af03$export$5c82fe5388917ea3);\n/**\n * Alpine.js component for scorecard weight management\n * Handles editing, validation, and dirty state tracking for scorecard part weights\n */ /**\n * Create scorecard weights Alpine.js component\n *\n * @param {Object} initialData - Initial component data\n * @param {boolean} initialData.isWeighted - Whether weights are currently enabled\n * @param {boolean} initialData.hasScoreableParts - Whether there are scoreable parts\n * @returns {Object} Alpine.js component configuration\n */ function $f6ba04531c01af03$export$5c82fe5388917ea3(initialData) {\n    return {\n        isWeighted: initialData.isWeighted,\n        hasScoreableParts: initialData.hasScoreableParts,\n        weights: {},\n        isDirty: false,\n        initialState: null,\n        editingPartId: null,\n        /**\n     * Initialize the component\n     */ init () {\n            this.setupBeforeUnloadHandler();\n            this.loadWeights();\n            if (!initialData.hasScoreableParts) this.isWeighted = false;\n            this.captureInitial();\n            this.setupWatchers();\n            window.__hirexScorecardWeightsDirty = false;\n        },\n        /**\n     * Setup beforeunload handler to warn about unsaved changes\n     */ setupBeforeUnloadHandler () {\n            if (window.__hirexScorecardWeightsDirty === undefined) {\n                window.__hirexScorecardWeightsDirty = false;\n                window.addEventListener(\"beforeunload\", (event)=>{\n                    if (window.__hirexScorecardWeightsDirty) {\n                        event.preventDefault();\n                        event.returnValue = \"\";\n                    }\n                });\n            }\n        },\n        /**\n     * Load weights from JSON seed data\n     */ loadWeights () {\n            const dataEl = this.$refs.weightsSeed;\n            if (dataEl) try {\n                const parsed = JSON.parse(dataEl.textContent || \"{}\");\n                this.weights = this.normalizeWeights(parsed);\n            } catch (error) {\n                console.error(\"Failed to parse scorecard weights\", error);\n            }\n        },\n        /**\n     * Normalize weight values from parsed JSON\n     * @param {Object} parsed - Parsed weight data\n     * @returns {Object} Normalized weights\n     */ normalizeWeights (parsed) {\n            const normalized = {};\n            Object.keys(parsed || {}).forEach((key)=>{\n                const value = parsed[key];\n                normalized[key] = value === null ? null : Number(value);\n            });\n            return normalized;\n        },\n        /**\n     * Setup watchers for state changes\n     */ setupWatchers () {\n            this.$nextTick(()=>{\n                this.$watch(\"isWeighted\", ()=>this.updateDirty());\n                this.$watch(\"weights\", ()=>this.updateDirty(), {\n                    deep: true\n                });\n            });\n        },\n        /**\n     * Capture initial state for dirty tracking\n     */ captureInitial () {\n            this.initialState = JSON.stringify({\n                isWeighted: this.isWeighted,\n                weights: this.weights\n            });\n        },\n        /**\n     * Update dirty state based on current vs initial values\n     */ updateDirty () {\n            const currentState = JSON.stringify({\n                isWeighted: this.isWeighted,\n                weights: this.weights\n            });\n            this.isDirty = this.initialState !== currentState;\n            window.__hirexScorecardWeightsDirty = this.isDirty;\n        },\n        /**\n     * Format weight for display\n     * @param {string} partId - The part ID\n     * @returns {string} Formatted weight string\n     */ formatWeight (partId) {\n            const val = this.weights?.[partId];\n            if (val === null || val === undefined || val === \"\") return \"--\";\n            return `%${val}`;\n        },\n        /**\n     * Calculate total weight percentage\n     * @returns {number} Total weight as percentage\n     */ totalWeight () {\n            if (!this.isWeighted) return 0;\n            return Object.values(this.weights || {}).reduce((acc, value)=>acc + (Number(value) || 0), 0);\n        },\n        /**\n     * Check if there's a client-side validation error\n     * @returns {boolean} True if weights don't sum to 100%\n     */ hasClientError () {\n            return this.isWeighted && Math.abs(this.totalWeight() - 100) > 0.01;\n        },\n        /**\n     * Check if the save button should be disabled\n     * @returns {boolean} True if button should be disabled\n     */ isSaveButtonDisabled () {\n            return !this.isDirty || this.hasClientError() || !this.hasScoreableParts;\n        }\n    };\n}\n\n});\n\nparcelRegister(\"ak9J4\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $784350fd8b4a0673$export$2e2bcd8739ae039);\n/**\n * Condition Builder Alpine.js component\n *\n * Visual rule builder for automation conditions.\n * Allows users to create conditions based on form field values.\n */ function $784350fd8b4a0673$export$2e2bcd8739ae039({ initialConditions: initialConditions = {}, operatorsMap: operatorsMap = {}, fieldsEndpointUrl: fieldsEndpointUrl = \"\" }) {\n    return {\n        expanded: false,\n        logic: \"AND\",\n        rules: [],\n        groups: [],\n        fields: [],\n        operatorsMap: operatorsMap,\n        fieldsEndpointUrl: fieldsEndpointUrl,\n        hasFields: false,\n        _initialConditions: initialConditions,\n        _initialConditionsApplied: false,\n        init () {\n            // Don't load initial conditions here - wait until fields are loaded\n            // This ensures the select dropdowns have options before values are set\n            // Listen for fields loaded event\n            this.$el.addEventListener(\"fields-loaded\", (e)=>{\n                this.fields = e.detail.fields || [];\n                this.hasFields = this.fields.length > 0;\n                // Clear rules and groups if no fields\n                if (!this.hasFields) {\n                    this.rules = [];\n                    this.groups = [];\n                    this.expanded = false;\n                }\n            });\n        },\n        // Apply initial conditions after fields are loaded\n        _applyInitialConditions () {\n            if (this._initialConditionsApplied) return;\n            const hasRules = this._initialConditions?.rules?.length > 0;\n            const hasGroups = this._initialConditions?.groups?.length > 0;\n            if (!hasRules && !hasGroups) return;\n            this._initialConditionsApplied = true;\n            this.logic = this._initialConditions.logic || \"AND\";\n            this.expanded = true;\n            // Set rules from initial conditions\n            this.rules = (this._initialConditions.rules || []).map((rule)=>({\n                    field_id: rule.field_id || \"\",\n                    operator: rule.operator || \"\",\n                    value: rule.value ?? \"\",\n                    type: rule.type || \"form_field\"\n                }));\n            // Set groups from initial conditions\n            this.groups = (this._initialConditions.groups || []).map((group)=>({\n                    logic: group.logic || \"AND\",\n                    rules: (group.rules || []).map((rule)=>({\n                            field_id: rule.field_id || \"\",\n                            operator: rule.operator || \"\",\n                            value: rule.value ?? \"\",\n                            type: rule.type || \"form_field\"\n                        }))\n                }));\n            // Use setTimeout to wait for full DOM render cycle, then manually sync select values\n            // This is needed because Alpine's x-model on selects doesn't properly sync when\n            // both the select and its options are rendered dynamically via nested x-for\n            setTimeout(()=>{\n                this._syncSelectValues();\n                // Second sync after a longer delay for value inputs that depend on field/operator\n                // The multiselect template needs field_id and operator to be set, then Alpine\n                // needs to render the options via x-for before we can sync selected values\n                setTimeout(()=>{\n                    this._syncSelectValues();\n                }, 150);\n            }, 0);\n        },\n        // Manually sync select element values to match Alpine data\n        // This fixes the x-model binding issue with dynamically rendered selects\n        _syncSelectValues () {\n            const container = this.$el;\n            if (!container) return;\n            // Helper to sync selects within a rule div\n            const syncRuleSelects = (ruleDiv, rule)=>{\n                if (!ruleDiv || !rule) return;\n                // Sync field select\n                const fieldSelect = ruleDiv.querySelector('select[x-model=\"rule.field_id\"]');\n                if (fieldSelect && rule.field_id) fieldSelect.value = rule.field_id;\n                // Sync operator select\n                const operatorSelect = ruleDiv.querySelector('select[x-model=\"rule.operator\"]');\n                if (operatorSelect && rule.operator) operatorSelect.value = rule.operator;\n                // Sync value select (single select) - third select in the rule div\n                const allSelects = ruleDiv.querySelectorAll(\"select\");\n                const valueSelect = allSelects[2]; // 0=field, 1=operator, 2=value\n                if (valueSelect && !valueSelect.multiple && rule.value && !Array.isArray(rule.value)) valueSelect.value = rule.value;\n                // Sync value multiselect\n                // Alpine's x-model on <select multiple> doesn't properly sync when options\n                // are dynamically rendered. We need to directly set the DOM selected state.\n                if (valueSelect && valueSelect.multiple && Array.isArray(rule.value) && rule.value.length > 0) {\n                    const valuesToSelect = new Set(rule.value);\n                    Array.from(valueSelect.options).forEach((option)=>{\n                        option.selected = valuesToSelect.has(option.value);\n                    });\n                }\n            };\n            // Sync top-level rules\n            this.rules.forEach((rule, index)=>{\n                // Find the rule's container div (nth rule div in the first .space-y-3)\n                const topLevelRulesContainer = container.querySelector(\".rounded-lg.border.border-gray-200 > .space-y-3\");\n                if (!topLevelRulesContainer) return;\n                const ruleDivs = topLevelRulesContainer.querySelectorAll(\":scope > template + div, :scope > div[class*='flex items-start']\");\n                const ruleDiv = ruleDivs[index];\n                syncRuleSelects(ruleDiv, rule);\n            });\n            // Sync rules within groups\n            this.groups.forEach((group, groupIndex)=>{\n                // Find the group container (bg-indigo-50 divs)\n                const groupDivs = container.querySelectorAll(\".bg-indigo-50\");\n                const groupDiv = groupDivs[groupIndex];\n                if (!groupDiv) return;\n                // Find rules within this group\n                const groupRuleDivs = groupDiv.querySelectorAll(\".space-y-2 > template + div, .space-y-2 > div[class*='flex items-start']\");\n                group.rules.forEach((rule, ruleIndex)=>{\n                    const ruleDiv = groupRuleDivs[ruleIndex];\n                    syncRuleSelects(ruleDiv, rule);\n                });\n            });\n        },\n        expand () {\n            this.expanded = true;\n            if (this.rules.length === 0) this.addRule();\n        },\n        collapse () {\n            this.expanded = false;\n        },\n        addRule () {\n            this.rules.push({\n                field_id: \"\",\n                operator: \"\",\n                value: \"\",\n                type: \"form_field\"\n            });\n        },\n        removeRule (index) {\n            this.rules.splice(index, 1);\n            // Collapse if no rules and no groups remain\n            if (this.rules.length === 0 && this.groups.length === 0) this.expanded = false;\n        },\n        onFieldChange (index) {\n            // Reset operator and value when field changes\n            this.rules[index].operator = \"\";\n            this.rules[index].value = \"\";\n            // Update type based on field\n            const field = this.getFieldById(this.rules[index].field_id);\n            if (field && field.field_type === \"DATE\") this.rules[index].type = \"form_field_date\";\n            else this.rules[index].type = \"form_field\";\n        },\n        onOperatorChange (index) {\n            const rule = this.rules[index];\n            // Reset value when operator changes\n            if (rule.operator === \"between\") // Initialize array for between operator\n            rule.value = [\n                null,\n                null\n            ];\n            else if (rule.operator === \"in\" || rule.operator === \"not_in\") // Initialize array for multi-select\n            rule.value = [];\n            else rule.value = \"\";\n        },\n        // ===== Group Methods =====\n        addGroup () {\n            this.groups.push({\n                logic: \"AND\",\n                rules: [\n                    {\n                        field_id: \"\",\n                        operator: \"\",\n                        value: \"\",\n                        type: \"form_field\"\n                    }\n                ]\n            });\n        },\n        removeGroup (groupIndex) {\n            this.groups.splice(groupIndex, 1);\n            // Collapse if no rules and no groups\n            if (this.rules.length === 0 && this.groups.length === 0) this.expanded = false;\n        },\n        addRuleToGroup (groupIndex) {\n            this.groups[groupIndex].rules.push({\n                field_id: \"\",\n                operator: \"\",\n                value: \"\",\n                type: \"form_field\"\n            });\n        },\n        removeRuleFromGroup (groupIndex, ruleIndex) {\n            this.groups[groupIndex].rules.splice(ruleIndex, 1);\n            // If group has no rules, remove the group\n            if (this.groups[groupIndex].rules.length === 0) this.removeGroup(groupIndex);\n        },\n        onFieldChangeInGroup (groupIndex, ruleIndex) {\n            const rule = this.groups[groupIndex].rules[ruleIndex];\n            // Reset operator and value when field changes\n            rule.operator = \"\";\n            rule.value = \"\";\n            // Update type based on field\n            const field = this.getFieldById(rule.field_id);\n            if (field && field.field_type === \"DATE\") rule.type = \"form_field_date\";\n            else rule.type = \"form_field\";\n        },\n        onOperatorChangeInGroup (groupIndex, ruleIndex) {\n            const rule = this.groups[groupIndex].rules[ruleIndex];\n            // Reset value when operator changes\n            if (rule.operator === \"between\") rule.value = [\n                null,\n                null\n            ];\n            else if (rule.operator === \"in\" || rule.operator === \"not_in\") rule.value = [];\n            else rule.value = \"\";\n        },\n        getFieldById (fieldId) {\n            return this.fields.find((f)=>f.id === fieldId);\n        },\n        getOperatorsForField (fieldId) {\n            const field = this.getFieldById(fieldId);\n            if (!field) return [];\n            return this.operatorsMap[field.field_type] || [];\n        },\n        getFieldOptions (fieldId) {\n            const field = this.getFieldById(fieldId);\n            if (!field || !field.options) return [];\n            return field.options;\n        },\n        getValueInputType (fieldId, operator) {\n            if (!fieldId || !operator) return \"none\";\n            const field = this.getFieldById(fieldId);\n            if (!field) return \"none\";\n            const fieldType = field.field_type;\n            const hasOptions = field.options && field.options.length > 0;\n            // Handle between operator\n            if (operator === \"between\") {\n                if (fieldType === \"DATE\") return \"between_date\";\n                if (fieldType === \"NUMERIC\" || fieldType === \"SALARY_EXPECTATION\") return \"between_number\";\n            }\n            // Handle in/not_in operators (multi-select)\n            if (operator === \"in\" || operator === \"not_in\") {\n                if (hasOptions) return \"multiselect\";\n                return \"text\"; // Fallback for text fields\n            }\n            // Field type specific inputs\n            switch(fieldType){\n                case \"NUMERIC\":\n                case \"SALARY_EXPECTATION\":\n                    return \"number\";\n                case \"DATE\":\n                    return \"date\";\n                case \"DROPDOWN\":\n                case \"MULTIPLESELECT\":\n                case \"YESNO\":\n                case \"PRIVACY_POLICY\":\n                case \"UNIVERSITY\":\n                case \"CITY\":\n                case \"FIELD_OF_STUDY\":\n                    return hasOptions ? \"select\" : \"text\";\n                case \"MULTIPLECHOICE\":\n                    return hasOptions ? \"multiselect\" : \"text\";\n                case \"SHORTTEXT\":\n                case \"LONGTEXT\":\n                case \"URL\":\n                default:\n                    return \"text\";\n            }\n        },\n        getConditionsJSON () {\n            // Helper to check if a rule is valid\n            const isValidRule = (rule)=>rule.field_id && rule.operator && rule.value !== \"\" && rule.value !== null && (Array.isArray(rule.value) ? rule.value.length > 0 : true);\n            // Helper to serialize a rule\n            const serializeRule = (rule)=>({\n                    type: rule.type,\n                    field_id: rule.field_id,\n                    operator: rule.operator,\n                    value: rule.value\n                });\n            // Filter out incomplete rules\n            const validRules = this.rules.filter(isValidRule);\n            // Filter and serialize groups (only include groups with valid rules)\n            const validGroups = this.groups.map((group)=>{\n                const groupValidRules = group.rules.filter(isValidRule);\n                if (groupValidRules.length === 0) return null;\n                return {\n                    logic: group.logic,\n                    rules: groupValidRules.map(serializeRule)\n                };\n            }).filter((group)=>group !== null);\n            // Return empty if nothing valid\n            if (validRules.length === 0 && validGroups.length === 0) return \"{}\";\n            const result = {\n                logic: this.logic,\n                rules: validRules.map(serializeRule)\n            };\n            // Only include groups if there are valid groups\n            if (validGroups.length > 0) result.groups = validGroups;\n            return JSON.stringify(result);\n        },\n        // Method to load fields from endpoint\n        async loadFields (informationFormId) {\n            if (!informationFormId || !this.fieldsEndpointUrl) {\n                this.fields = [];\n                this.hasFields = false;\n                this.rules = [];\n                this.groups = [];\n                this.expanded = false;\n                return;\n            }\n            const url = this.fieldsEndpointUrl.replace(\"__FORM_ID__\", informationFormId);\n            try {\n                const response = await fetch(url, {\n                    headers: {\n                        \"HX-Request\": \"true\"\n                    }\n                });\n                if (response.ok) {\n                    const data = await response.json();\n                    this.fields = data.fields || [];\n                    this.hasFields = this.fields.length > 0;\n                    // Apply initial conditions after fields are loaded\n                    // This ensures select dropdowns have options before values are set\n                    if (this.hasFields) this._applyInitialConditions();\n                }\n            } catch (error) {\n                console.error(\"Failed to load form fields:\", error);\n                this.fields = [];\n                this.hasFields = false;\n            }\n        }\n    };\n}\n\n});\n\nparcelRegister(\"lWvX9\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $ff97ccf4e3f7aa57$export$2e2bcd8739ae039);\n/**\n * @fileoverview Alpine component for the candidates (applications) list shell.\n *\n * Owns the URL <-> table contract for the page: every filter/sort/pagination change\n * pushes a querystring and reloads the `#applications_table_isle` via htmx, and the\n * sidebar's nested filter components call back into these methods.\n *\n * Config (see ApplicationsList.get_context_data) arrives as a JSON blob so no Django\n * template values live in this file.\n *\n * @param {Object} config\n * @param {string} config.searchUrl - page URL, what gets pushed to the address bar\n * @param {string} config.tableUrl - table isle endpoint\n * @param {string} config.legacyCandidateListUrl - legacy table, for the escape hatch\n * @param {string} config.applicationDetailUrlTpl - slideover URL with an `__APP_ID__` placeholder\n * @param {string} config.candidateDetailUrlTpl - slideover URL with a `__CAND_ID__` placeholder\n * @param {string} config.colsStorageKey - localStorage key for the visible columns\n * @param {string} config.oneRowStorageKey - localStorage key for \"Show one row per candidate\"\n * @param {string} config.oneRowParam - isle-fetch flag sent while that setting is on\n * @param {string} config.caseResponsesParam\n * @param {string} config.orgCustomFieldResponsesParam\n * @param {string} config.savedFieldResponsesParam\n * @param {string} config.jobFieldResponsesParam\n * @param {string} config.caseEmptyStatusValue\n * @param {string} config.caseOverdueStatusValue\n * @param {string} config.rowSelectIdPrefix - row checkbox id prefix, `<prefix><candidate_id>[-<application_id>]`\n */ function $ff97ccf4e3f7aa57$export$2e2bcd8739ae039(config) {\n    return {\n        config: config,\n        // Nested filter components call these methods, so `this.$el` would be *their* element.\n        // Every page-wide DOM read/dispatch goes through this instead.\n        rootEl: null,\n        redirectingToLegacyTable: false,\n        tableLoading: false,\n        // Set by the isle's own htmx:before-swap guard, which also stops the global error modal.\n        tableFailed: false,\n        sidebarCollapsed: JSON.parse(localStorage.getItem(\"filterSidebarCollapsed\") || \"false\"),\n        mobileFiltersOpen: false,\n        showOnlyMyJobs: new URLSearchParams(window.location.search).get(\"my_jobs\") === \"true\",\n        search: new URLSearchParams(window.location.search).get(\"search\") || \"\",\n        // Visible columns: localStorage is the source of truth; `_cols` rides only on isle/save fetches, never the address bar.\n        cols: [],\n        // Like cols: localStorage only, rides on isle fetches as `oneRowParam`.\n        oneRowPerCandidate: JSON.parse(localStorage.getItem(config.oneRowStorageKey) || \"false\"),\n        // Pagination settings dialog; held here so it survives the isle reload its toggles trigger.\n        settingsOpen: false,\n        // Byproduct snapshots of the last collect* call; stale the moment a box is ticked. Re-collect instead of trusting them.\n        currentlyHighlyProbableSelectedCandidateIds: [],\n        currentlyHighlyProbableSelectedApplicationIds: [],\n        currentlyHighlyProbableSelectedRowCount: 0,\n        init () {\n            this.rootEl = this.$el;\n            const goLegacy = ()=>{\n                this.redirectingToLegacyTable = true;\n                // Keep ?candidate_id etc. so deep links still open the slideover on the legacy page.\n                window.location.href = this.config.legacyCandidateListUrl + window.location.search;\n            };\n            if (!this.$store.candidate_listing_settings.get(\"use_new_candidates_page\")) goLegacy();\n            this.$watch(\"$store.candidate_listing_settings.use_new_candidates_page\", (v)=>{\n                if (!v) goLegacy();\n            });\n            // Columns: hydrate from localStorage, then do the ONE initial table load carrying _cols. No static\n            // hx-trigger load, so nothing races to render the default set over this on a hard refresh.\n            this.initCols();\n            // Before the first fetch, so neither the table request nor the sidebar sees the junk.\n            this.dropMalformedCaseFilters();\n            this.dropMalformedEavFieldFilters(this.config.orgCustomFieldResponsesParam);\n            this.dropMalformedEavFieldFilters(this.config.savedFieldResponsesParam);\n            this.dropMalformedEavFieldFilters(this.config.jobFieldResponsesParam);\n            this.dropMalformedEavFieldFilters(this.config.scorecardResponsesParam);\n            this.dropNonUuidTokens(\"company\");\n            this.dropNonUuidTokens(\"sector\");\n            this.dropNonUuidTokens(\"school\");\n            this.dropNonUuidTokens(\"field_of_study\");\n            this.dropNonUuidTokens(\"location\");\n            this.reloadTable();\n            this.$watch(\"oneRowPerCandidate\", (on)=>{\n                localStorage.setItem(this.config.oneRowStorageKey, JSON.stringify(on));\n                this.reloadTable();\n            });\n            // Restore slideover from URL (?application_id / ?candidate_id); $nextTick + window dispatch so slideover is mounted.\n            this.$nextTick(()=>this.restoreSlideoverFromUrl());\n        },\n        // $dispatch would fire from the calling (nested) element; keep the page-level events on the root.\n        _dispatch (name, detail) {\n            this.rootEl.dispatchEvent(new CustomEvent(name, {\n                detail: detail,\n                bubbles: true,\n                composed: true,\n                cancelable: true\n            }));\n        },\n        // Fresh read of the ticked row checkboxes, parsed from their ids.\n        _collectSelectedRows () {\n            const prefix = this.config.rowSelectIdPrefix;\n            const checkboxes = this.rootEl.querySelectorAll(`input[type=\"checkbox\"][id^=\"${prefix}\"]:checked`);\n            const rows = [];\n            for (const checkbox of checkboxes){\n                const [candidateId, applicationId] = checkbox.id.slice(prefix.length).split(\"-\");\n                rows.push({\n                    candidateId: candidateId,\n                    applicationId: applicationId\n                });\n            }\n            return rows;\n        },\n        // Ticks and table swaps both change what's selected; re-collect fresh.\n        collectSelection () {\n            this.collectSelectedCandidateIds();\n            this.collectSelectedApplicationIds();\n            this.collectSelectedRowCount();\n        },\n        collectSelectedRowCount () {\n            const rowCount = this._collectSelectedRows().length;\n            this.currentlyHighlyProbableSelectedRowCount = rowCount;\n            return rowCount;\n        },\n        collectSelectedCandidateIds () {\n            const candidateIds = [];\n            for (const row of this._collectSelectedRows())// One candidate can have several ticked application rows.\n            if (!candidateIds.includes(row.candidateId)) candidateIds.push(row.candidateId);\n            this.currentlyHighlyProbableSelectedCandidateIds = candidateIds;\n            return candidateIds;\n        },\n        collectSelectedApplicationIds () {\n            const applicationIds = [];\n            for (const row of this._collectSelectedRows())// App-less candidate rows have no application id.\n            if (row.applicationId) applicationIds.push(row.applicationId);\n            this.currentlyHighlyProbableSelectedApplicationIds = applicationIds;\n            return applicationIds;\n        },\n        // Selection-bar actions request through these two, so the fresh selection rides along without each action wiring it.\n        // `source` is the action's <form>: its fields (files too, multipart via enctype) are sent with `values` on top.\n        sendBulkAction (url, { source: source, target: target, values: values = {} }) {\n            return this._requestWithSelection(\"POST\", url, {\n                source: source,\n                target: target,\n                values: values\n            });\n        },\n        // GET twin, for selection-dependent bits of an action's UI (e.g. the mail template picker).\n        loadForSelection (url, { source: source, target: target }) {\n            return this._requestWithSelection(\"GET\", url, {\n                source: source,\n                target: target,\n                values: {}\n            });\n        },\n        _requestWithSelection (verb, url, { source: source, target: target, values: values }) {\n            return htmx.ajax(verb, url, {\n                source: source,\n                target: target,\n                swap: \"innerHTML\",\n                values: {\n                    ...values,\n                    candidates: this.collectSelectedCandidateIds()\n                }\n            });\n        },\n        _detailUrlFor (params) {\n            const appId = params.get(\"application_id\");\n            const candId = params.get(\"candidate_id\");\n            if (appId) return this.config.applicationDetailUrlTpl.replace(\"__APP_ID__\", encodeURIComponent(appId)) + window.location.search;\n            if (candId) return this.config.candidateDetailUrlTpl.replace(\"__CAND_ID__\", encodeURIComponent(candId)) + window.location.search;\n            return null;\n        },\n        _defaultCols () {\n            try {\n                return JSON.parse(document.getElementById(\"applications-default-cols\").textContent);\n            } catch (e) {\n                return [];\n            }\n        },\n        _catalogCols () {\n            try {\n                return JSON.parse(document.getElementById(\"applications-catalog-cols\").textContent);\n            } catch (e) {\n                return [];\n            }\n        },\n        // ponytail: one-shot fixup, keyed off a marker so it runs once per browser. Arrays stored before\n        // `_cols` became order-significant are in historical checkbox-click order, so without this every\n        // existing user's table silently reshuffles on the first load after deploy. Per-org keys aren't\n        // in the published catalog, so they land at the end — fine for a fixup, and reorderable after.\n        _normalizeStoredColOrder (cols) {\n            if (localStorage.getItem(this.config.colsOrderNormalizedKey) === \"1\") return cols;\n            localStorage.setItem(this.config.colsOrderNormalizedKey, \"1\");\n            const catalog = this._catalogCols();\n            if (catalog.length === 0) return cols;\n            const inCatalog = catalog.filter((key)=>cols.includes(key));\n            const rest = cols.filter((key)=>!catalog.includes(key));\n            return [\n                ...inCatalog,\n                ...rest\n            ];\n        },\n        initCols () {\n            const stored = localStorage.getItem(this.config.colsStorageKey);\n            if (!stored) {\n                this.cols = this._defaultCols();\n                return;\n            }\n            try {\n                this.cols = JSON.parse(stored);\n            } catch (e) {\n                this.cols = this._defaultCols();\n                return;\n            }\n            // Persist the fixup, since views_header reads this key on its own for the dirty check.\n            const normalized = this._normalizeStoredColOrder(this.cols);\n            if (normalized.join(\",\") === this.cols.join(\",\")) return;\n            this.cols = normalized;\n            localStorage.setItem(this.config.colsStorageKey, JSON.stringify(this.cols));\n        },\n        colsParam () {\n            return this.cols.join(\",\");\n        },\n        // Commit a staged column selection (from the picker's Apply): persist + one table reload.\n        applyCols (newCols) {\n            this.cols = [\n                ...newCols\n            ];\n            localStorage.setItem(this.config.colsStorageKey, JSON.stringify(this.cols));\n            this.reloadTable();\n        },\n        setColsFromView (csv) {\n            // null/undefined (e.g. 'All candidates') -> defaults; '' -> explicitly none; else the view's set.\n            if (csv === null || csv === undefined) this.cols = this._defaultCols();\n            else this.cols = csv ? csv.split(\",\").filter(Boolean) : [];\n            localStorage.setItem(this.config.colsStorageKey, JSON.stringify(this.cols));\n        },\n        reloadTable () {\n            return this._pushAndReloadTable(new URLSearchParams(window.location.search));\n        },\n        isMobile () {\n            return window.matchMedia(\"(max-width: 767px)\").matches;\n        },\n        toggleSidebar () {\n            if (this.isMobile()) this.mobileFiltersOpen = !this.mobileFiltersOpen;\n            else {\n                this.sidebarCollapsed = !this.sidebarCollapsed;\n                localStorage.setItem(\"filterSidebarCollapsed\", JSON.stringify(this.sidebarCollapsed));\n            }\n        },\n        submitFilters () {\n            const params = new URLSearchParams(window.location.search);\n            if (this.search) params.set(\"search\", this.search);\n            else params.delete(\"search\");\n            if (this.showOnlyMyJobs) params.set(\"my_jobs\", \"true\");\n            else params.delete(\"my_jobs\");\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n        },\n        filterChanged (filterKey) {\n            const params = new URLSearchParams(window.location.search);\n            const checked = this.rootEl.querySelectorAll(`input[name='${filterKey}']:checked`);\n            const values = [\n                ...checked\n            ].map((cb)=>cb.value);\n            if (values.length) params.set(filterKey, \"|||\" + values.join(\"|||\"));\n            else params.delete(filterKey);\n            // switching jobs invalidates stage ids from the previous pipeline and question ids from its application form.\n            if (filterKey === \"jobs\") {\n                params.delete(\"stages\");\n                params.delete(this.config.jobFieldResponsesParam);\n            }\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: filterKey\n            });\n        },\n        singleSelectChanged (filterKey) {\n            const params = new URLSearchParams(window.location.search);\n            const radio = this.rootEl.querySelector(`input[name='${filterKey}']:checked`);\n            if (radio && radio.value) params.set(filterKey, radio.value);\n            else params.delete(filterKey);\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: filterKey\n            });\n        },\n        textFilterChanged (filterKey, value) {\n            const params = new URLSearchParams(window.location.search);\n            if (value) params.set(filterKey, value);\n            else params.delete(filterKey);\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: filterKey\n            });\n        },\n        // Min/max pair in one reload, so clearing both doesn't fetch the table twice.\n        rangeFilterChanged (minKey, min, maxKey, max) {\n            const params = new URLSearchParams(window.location.search);\n            if (min !== \"\") params.set(minKey, min);\n            else params.delete(minKey);\n            if (max !== \"\") params.set(maxKey, max);\n            else params.delete(maxKey);\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: minKey\n            });\n        },\n        clearSingleFilter (filterKey) {\n            const params = new URLSearchParams(window.location.search);\n            params.delete(filterKey);\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: filterKey\n            });\n        },\n        // Case filter: one JSON array param holding a {field_id, value?, score__gte?, score__lte?} entry per case.\n        caseFilters () {\n            try {\n                const raw = new URLSearchParams(window.location.search).get(this.config.caseResponsesParam);\n                const parsed = JSON.parse(raw);\n                return Array.isArray(parsed) ? parsed : [];\n            } catch (e) {\n                return [];\n            }\n        },\n        dropMalformedCaseFilters () {\n            const params = new URLSearchParams(window.location.search);\n            if (params.get(this.config.caseResponsesParam) === null) return;\n            const entries = this.caseFilters();\n            const usable = entries.filter((entry)=>entry && entry.field_id);\n            if (entries.length && usable.length === entries.length) return;\n            if (usable.length) params.set(this.config.caseResponsesParam, JSON.stringify(usable));\n            else params.delete(this.config.caseResponsesParam);\n            const query = params.toString();\n            history.replaceState(null, \"\", this.config.searchUrl + (query ? \"?\" + query : \"\"));\n        },\n        // Company/sector/school/field of study/location filters are id-based. A leftover name (saved view or bookmark from before the\n        // canonical pool) can't be checked, counted or cleared in the sidebar, so drop it on arrival.\n        dropNonUuidTokens (filterKey) {\n            const params = new URLSearchParams(window.location.search);\n            if (params.get(filterKey) === null) return;\n            const tokens = (params.get(filterKey) || \"\").split(\"|||\").filter(Boolean);\n            const usable = tokens.filter((token)=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(token));\n            if (usable.length === tokens.length) return;\n            if (usable.length) params.set(filterKey, \"|||\" + usable.join(\"|||\"));\n            else params.delete(filterKey);\n            const query = params.toString();\n            history.replaceState(null, \"\", this.config.searchUrl + (query ? \"?\" + query : \"\"));\n        },\n        caseFilterChanged (caseId, entry) {\n            const params = new URLSearchParams(window.location.search);\n            const next = {\n                field_id: caseId\n            };\n            // Status options carry a comma-joined bucket of real statuses; the two sentinels stay scalar\n            // because BaseCaseFilter resolves them specially.\n            if (entry.value) {\n                const sentinels = [\n                    this.config.caseEmptyStatusValue,\n                    this.config.caseOverdueStatusValue\n                ];\n                if (sentinels.includes(entry.value)) next.value = entry.value;\n                else {\n                    next.value = entry.value.split(\",\");\n                    next.lookup = \"in\";\n                }\n            }\n            if (entry.score__gte !== \"\" && entry.score__gte !== null && entry.score__gte !== undefined) next.score__gte = parseFloat(entry.score__gte);\n            if (entry.score__lte !== \"\" && entry.score__lte !== null && entry.score__lte !== undefined) next.score__lte = parseFloat(entry.score__lte);\n            const others = this.caseFilters().filter((e)=>e && e.field_id !== caseId);\n            // field_id alone means nothing is set for that case — drop the entry instead of storing a no-op.\n            const all = Object.keys(next).length > 1 ? [\n                ...others,\n                next\n            ] : others;\n            if (all.length) params.set(this.config.caseResponsesParam, JSON.stringify(all));\n            else params.delete(this.config.caseResponsesParam);\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: this.config.caseResponsesParam\n            });\n        },\n        // Scorecard filter: one JSON array param holding a\n        // {field_id, value?, decision?, score__gte?, score__lte?} entry per scorecard template.\n        // Reads/scrubs through the param-generic eavFieldFilters helpers below; only the entry shape differs.\n        scorecardFilterChanged (scorecardId, entry) {\n            const paramKey = this.config.scorecardResponsesParam;\n            const params = new URLSearchParams(window.location.search);\n            const next = {\n                field_id: scorecardId\n            };\n            if (entry.value) next.value = entry.value;\n            if (entry.decision) next.decision = entry.decision;\n            if (entry.score__gte !== \"\" && entry.score__gte !== null && entry.score__gte !== undefined) next.score__gte = parseFloat(entry.score__gte);\n            if (entry.score__lte !== \"\" && entry.score__lte !== null && entry.score__lte !== undefined) next.score__lte = parseFloat(entry.score__lte);\n            const others = this.eavFieldFilters(paramKey).filter((e)=>e && e.field_id !== scorecardId);\n            // field_id alone means nothing is set for that scorecard — drop the entry instead of storing a no-op.\n            const all = Object.keys(next).length > 1 ? [\n                ...others,\n                next\n            ] : others;\n            if (all.length) params.set(paramKey, JSON.stringify(all));\n            else params.delete(paramKey);\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: paramKey\n            });\n        },\n        // Server told us some scorecard entries name templates it ignored (deleted, or hidden from this\n        // user). Drop them from the URL only — the rendered table already excluded them, so a reload would\n        // fetch identical rows. replaceState, so the stale URL doesn't become a back-button destination.\n        dropStaleScorecardFilters (ids) {\n            const paramKey = this.config.scorecardResponsesParam;\n            const params = new URLSearchParams(window.location.search);\n            if (params.get(paramKey) === null || !ids || !ids.length) return;\n            const stale = new Set(ids.map(String));\n            const kept = this.eavFieldFilters(paramKey).filter((entry)=>entry && !stale.has(String(entry.field_id)));\n            if (kept.length) params.set(paramKey, JSON.stringify(kept));\n            else params.delete(paramKey);\n            const query = params.toString();\n            history.replaceState(null, \"\", this.config.searchUrl + (query ? \"?\" + query : \"\"));\n            // So the section badge stops counting them and any open row re-reads its (now absent) entry.\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: paramKey\n            });\n        },\n        // EAV field filters (org custom fields, screening questions): one JSON array param each, holding\n        // {field_id, value, lookup} entries — a range field owns two of them.\n        eavFieldFilters (paramKey) {\n            try {\n                const parsed = JSON.parse(new URLSearchParams(window.location.search).get(paramKey));\n                return Array.isArray(parsed) ? parsed : [];\n            } catch (e) {\n                return [];\n            }\n        },\n        dropMalformedEavFieldFilters (paramKey) {\n            const params = new URLSearchParams(window.location.search);\n            if (params.get(paramKey) === null) return;\n            const entries = this.eavFieldFilters(paramKey);\n            const usable = entries.filter((entry)=>entry && entry.field_id);\n            if (entries.length && usable.length === entries.length) return;\n            if (usable.length) params.set(paramKey, JSON.stringify(usable));\n            else params.delete(paramKey);\n            const query = params.toString();\n            history.replaceState(null, \"\", this.config.searchUrl + (query ? \"?\" + query : \"\"));\n        },\n        eavFieldChanged (paramKey, fieldId, entries) {\n            const params = new URLSearchParams(window.location.search);\n            const others = this.eavFieldFilters(paramKey).filter((entry)=>entry && String(entry.field_id) !== String(fieldId));\n            const all = [\n                ...others,\n                ...entries\n            ];\n            if (all.length) params.set(paramKey, JSON.stringify(all));\n            else params.delete(paramKey);\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: paramKey\n            });\n        },\n        dateFilterChanged (filterKey) {\n            const params = new URLSearchParams(window.location.search);\n            params.delete(filterKey + \"_preset\");\n            params.delete(filterKey + \"_from\");\n            params.delete(filterKey + \"_to\");\n            const radio = this.rootEl.querySelector(`input[name='${filterKey}_preset']:checked`);\n            if (radio) {\n                params.set(filterKey + \"_preset\", radio.value);\n                if (radio.value === \"custom\") {\n                    const fromEl = this.rootEl.querySelector(`input[name='${filterKey}_from']`);\n                    const toEl = this.rootEl.querySelector(`input[name='${filterKey}_to']`);\n                    if (fromEl && fromEl.value) params.set(filterKey + \"_from\", fromEl.value);\n                    if (toEl && toEl.value) params.set(filterKey + \"_to\", toEl.value);\n                }\n            }\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: filterKey\n            });\n        },\n        clearDateFilter (filterKey) {\n            const params = new URLSearchParams(window.location.search);\n            params.delete(filterKey + \"_preset\");\n            params.delete(filterKey + \"_from\");\n            params.delete(filterKey + \"_to\");\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n            this._dispatch(\"filter-state-changed\", {\n                filterKey: filterKey\n            });\n        },\n        handleSort (orderKey) {\n            const params = new URLSearchParams(window.location.search);\n            const current = params.get(\"order\") || \"\";\n            const next = current === orderKey ? \"-\" + orderKey : orderKey;\n            params.set(\"order\", next);\n            params.delete(\"order_dir\");\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n        },\n        clearSort () {\n            const params = new URLSearchParams(window.location.search);\n            params.delete(\"order\");\n            params.delete(\"order_dir\");\n            params.delete(\"page\");\n            this._pushAndReloadTable(params);\n        },\n        handlePageClick (pageNum) {\n            const params = new URLSearchParams(window.location.search);\n            params.set(\"page\", pageNum);\n            // Drop slideover view-state so paginating doesn't re-open a detail that isn't on the new page.\n            params.delete(\"application_id\");\n            params.delete(\"candidate_id\");\n            this._pushAndReloadTable(params);\n        },\n        clearFilters () {\n            this.search = \"\";\n            this.showOnlyMyJobs = false;\n            this._pushAndReloadTable(new URLSearchParams());\n            this._dispatch(\"filter-state-changed\", {\n                cleared: true\n            });\n        },\n        refresh () {\n            this._pushAndReloadTable(new URLSearchParams(window.location.search));\n        },\n        // Saved views: applying a view pushes its filter querystring and reloads the table + sidebar.\n        applyView (detail) {\n            const viewParams = new URLSearchParams(detail.encodedUrl);\n            this.search = viewParams.get(\"search\") || \"\";\n            this.showOnlyMyJobs = viewParams.get(\"my_jobs\") === \"true\";\n            // Restore the view's columns (cols=null for 'All candidates' -> defaults) before the reload picks up _cols.\n            this.setColsFromView(detail.cols);\n            this._pushAndReloadTable(viewParams);\n            this._dispatch(\"filter-state-changed\", {\n                cleared: true\n            });\n        },\n        refreshSlideover () {\n            const detailUrl = this._detailUrlFor(new URLSearchParams(window.location.search));\n            if (!detailUrl) return;\n            // ponytail: source = the indicator, never body. Body-sourced htmx.ajax poisons htmx 1.9's body\n            // request-counter (wiped mid-flight when body's class hash changes), leaving `htmx-request` stuck\n            // on body forever → skeleton pinned over every slideover.\n            htmx.ajax(\"GET\", detailUrl, {\n                source: document.getElementById(\"slideover-indicator\"),\n                target: \"#slideover-content\"\n            });\n        },\n        restoreSlideoverFromUrl () {\n            const detailUrl = this._detailUrlFor(new URLSearchParams(window.location.search));\n            if (!detailUrl) return;\n            const closingCallback = ()=>{\n                const u = new URL(window.location);\n                u.searchParams.delete(\"application_id\");\n                u.searchParams.delete(\"candidate_id\");\n                window.history.replaceState(null, \"\", u.toString());\n                window.dispatchEvent(new CustomEvent(\"candidate-slideover-closed\"));\n            };\n            window.dispatchEvent(new CustomEvent(\"open-slideover\", {\n                detail: {\n                    size: \"xl\",\n                    closingCallback: closingCallback\n                }\n            }));\n            htmx.ajax(\"GET\", detailUrl, {\n                source: document.getElementById(\"slideover-indicator\"),\n                target: \"#slideover-content\"\n            });\n        },\n        // Focus the search input on \"/\" (ignore when typing in inputs/textareas/contenteditable).\n        handleSlashKey (event) {\n            if (event.key !== \"/\") return;\n            const t = event.target;\n            const tag = t && t.tagName ? t.tagName.toLowerCase() : \"\";\n            if (tag === \"input\" || tag === \"textarea\" || tag === \"select\" || t && t.isContentEditable) return;\n            event.preventDefault();\n            this.$refs.searchInput && this.$refs.searchInput.focus();\n        },\n        _pushAndReloadTable (params) {\n            const query = params.toString();\n            // Address bar stays clean (filters only, no _cols).\n            history.pushState(null, \"\", this.config.searchUrl + (query ? \"?\" + query : \"\"));\n            // The isle fetch carries _cols so the server renders the right columns.\n            const fetchParams = new URLSearchParams(params);\n            fetchParams.set(\"_cols\", this.colsParam());\n            if (this.oneRowPerCandidate) fetchParams.set(this.config.oneRowParam, \"1\");\n            this.tableLoading = true;\n            this.tableFailed = false;\n            // ponytail: source = the component root, never body — keeps htmx's request-counter off <body> so it\n            // can't get stuck. Table loading UX is driven by tableLoading, not the htmx-request class.\n            return htmx.ajax(\"GET\", this.config.tableUrl + \"?\" + fetchParams.toString(), {\n                source: this.rootEl,\n                target: \"#applications_table_isle\",\n                swap: \"innerHTML\"\n            }).finally(()=>{\n                this.tableLoading = false;\n                this.collectSelection();\n            });\n        }\n    };\n}\n\n});\n\nparcelRegister(\"jwT4P\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $e37bba9fca4e290b$export$2e2bcd8739ae039);\n/** Mobile (≤ md) applications list shell: stage picker, search, sort / filters / fields sheets and the\n * card list loaded from the `job-applications-mobile` fragment. Lives inside candidates_table's\n * Alpine scope (uses its `openSlideover`) and shares the URL params with the desktop table.\n */ var $e37bba9fca4e290b$export$2e2bcd8739ae039 = ({ listUrl: listUrl, baseUrl: baseUrl, filterUrl: filterUrl, rejected: rejected, storageKey: storageKey, catalog: catalog, sortOptions: sortOptions, filterNames: filterNames })=>({\n        sheet: null,\n        mobileSearch: new URLSearchParams(window.location.search).get(\"search\") || \"\",\n        order: new URLSearchParams(window.location.search).get(\"order\") || \"\",\n        mobileCount: null,\n        fieldSearch: \"\",\n        catalog: catalog,\n        sortOptions: sortOptions,\n        filterNames: filterNames,\n        // compact-line fields, per job\n        fields: window.Alpine.$persist([\n            \"field_of_study\",\n            \"school\",\n            \"experience\"\n        ]).as(storageKey),\n        init () {\n            if (this.isMobile()) this.loadList();\n        },\n        isMobile () {\n            return window.matchMedia(\"(max-width: 767px)\").matches;\n        },\n        get sortLabel () {\n            const current = this.sortOptions.find((o)=>o.value === this.order) || this.sortOptions[0];\n            return current.label;\n        },\n        listParams () {\n            const params = new URLSearchParams(window.location.search);\n            params.delete(\"page\");\n            params.delete(\"application_id\");\n            if (rejected) params.set(\"rejected\", \"true\");\n            return params;\n        },\n        loadList () {\n            // source: the wrapper gets htmx-request (dims the list); without one htmx marks <body> and never clears it\n            htmx.ajax(\"GET\", `${listUrl}?${this.listParams()}`, {\n                source: \"#mobile-list-indicator\",\n                target: \"#mobile-list\",\n                swap: \"innerHTML\"\n            });\n        },\n        // Table swaps (filter chips, desktop search) push the URL; reload the cards from it.\n        onSettled (event) {\n            if (!this.isMobile()) return;\n            const id = event.detail.target?.id;\n            if (id === \"candidates_table_wrapper\") this.loadList();\n            if (id === \"mobile-list\") this.mobileCount = document.getElementById(\"mobile-list-count\")?.dataset.count ?? this.mobileCount;\n        },\n        pushParam (key, value) {\n            const params = new URLSearchParams(window.location.search);\n            value ? params.set(key, value) : params.delete(key);\n            params.delete(\"page\");\n            history.pushState(null, \"\", `${baseUrl}?${params}`);\n            this.loadList();\n        },\n        setOrder (value) {\n            this.order = value;\n            this.sheet = null;\n            this.pushParam(\"order\", value);\n        },\n        toggleField (id) {\n            const next = this.fields.includes(id) ? this.fields.filter((f)=>f !== id) : [\n                ...this.fields,\n                id\n            ];\n            // keep catalog order so line1/line2 stay stable\n            this.fields = this.catalog.map((c)=>c.id).filter((c)=>next.includes(c));\n        },\n        get activeFilterIds () {\n            return this.$store.filterFields.fields.filter((id)=>this.filterNames[id]);\n        },\n        // Same flow as the desktop \"Add Filter\" menu: append the chip, then its panel opens.\n        addFilter (fieldId) {\n            this.sheet = null;\n            if (this.$store.filterFields.has(fieldId)) {\n                this.$dispatch(\"open-filter-panel\", fieldId);\n                return;\n            }\n            htmx.ajax(\"GET\", `${filterUrl}&id=${fieldId}&is_open=true`, {\n                source: \"#filters\",\n                target: \"#filters\",\n                swap: \"beforeend\"\n            }).then(()=>this.$store.filterFields.add(fieldId));\n        },\n        clearFilters () {\n            window.location.assign(baseUrl);\n        }\n    });\n\n});\n\nparcelRegister(\"dgpCO\", function(module, exports) {\n\n$parcel$export(module.exports, \"interviewsNav\", () => $9a80a58dfd172945$export$40b84117a14e9e09);\n$parcel$export(module.exports, \"notesEditor\", () => $9a80a58dfd172945$export$f208eadbd57671d0);\n$parcel$export(module.exports, \"interviewChat\", () => $9a80a58dfd172945$export$c9ecfb1c06f2cc2f);\n// Alpine components for the AI Interview Notebook (candidate detail → Interviews tab).\n// Registered via Alpine.data in index.js so they exist before htmx swaps the tab in —\n// inline <script> definitions in swapped partials lose the race against Alpine's\n// MutationObserver (htmx defers script eval to its settle phase).\n// List ↔ detail navigation: two layers on the same surface. Scroll resets when\n// entering the detail and is restored on back.\nfunction $9a80a58dfd172945$export$40b84117a14e9e09() {\n    return {\n        view: \"list\",\n        _listScroll: 0,\n        _pendingDetail: false,\n        _scroller () {\n            return this.$root.closest('[role=\"tabpanel\"]') || document.documentElement;\n        },\n        // The row click fires the htmx request; the surface only flips once the\n        // content has actually swapped in (onDetailLoaded) — flipping immediately\n        // showed a spinner/stale-content blink and made everything re-render in view.\n        openDetail () {\n            this._listScroll = this._scroller().scrollTop;\n            this._pendingDetail = true;\n        },\n        onDetailLoaded (evt) {\n            if (!this._pendingDetail) return;\n            if (!evt.detail || !evt.detail.target || evt.detail.target.id !== \"interviews-detail-panel\") return;\n            this._pendingDetail = false;\n            this.view = \"detail\";\n            this.$nextTick(()=>{\n                this._scroller().scrollTop = 0;\n            });\n        },\n        goList () {\n            this._pendingDetail = false;\n            this.view = \"list\";\n            this.$nextTick(()=>{\n                this._scroller().scrollTop = this._listScroll;\n            });\n        },\n        onEscape (evt) {\n            if (this.view !== \"detail\") return; // at list level Escape keeps closing the candidate panel\n            const chatPanel = this.$root.querySelector(\".iv-chat-panel\");\n            if (chatPanel && getComputedStyle(chatPanel).display !== \"none\") return; // chat drawer closes first\n            evt.stopPropagation();\n            this.goList();\n        }\n    };\n}\nfunction $9a80a58dfd172945$export$f208eadbd57671d0(opts) {\n    return {\n        blockStates: {},\n        everTouched: false,\n        _timers: {},\n        _fadeTimers: {},\n        docState () {\n            const states = Object.values(this.blockStates);\n            if (states.includes(\"error\")) return \"error\";\n            if (states.includes(\"dirty\") || states.includes(\"saving\")) return \"dirty\";\n            return this.everTouched ? \"saved\" : \"idle\";\n        },\n        hasDot (blockId) {\n            return this.blockStates[blockId] !== undefined;\n        },\n        dotClass (blockId) {\n            const state = this.blockStates[blockId];\n            if (state === \"error\") return \"bg-red-600\";\n            if (state === \"saved\") return \"bg-[#40C4AA]\";\n            return \"bg-[#F2AE40]\";\n        },\n        _setState (blockId, state) {\n            clearTimeout(this._fadeTimers[blockId]);\n            if (state === null) {\n                delete this.blockStates[blockId];\n                return;\n            }\n            this.blockStates[blockId] = state;\n            if (state === \"saved\") this._fadeTimers[blockId] = setTimeout(()=>{\n                if (this.blockStates[blockId] === \"saved\") delete this.blockStates[blockId];\n            }, 2200);\n        },\n        onEdit (el) {\n            this.everTouched = true;\n            const blockId = el.dataset.blockId;\n            this._setState(blockId, \"dirty\");\n            clearTimeout(this._timers[blockId]);\n            this._timers[blockId] = setTimeout(()=>this.saveBlock(el), 1200);\n        },\n        onBlur (el) {\n            const blockId = el.dataset.blockId;\n            if (this._timers[blockId] !== undefined) {\n                clearTimeout(this._timers[blockId]);\n                this.saveBlock(el);\n            }\n        },\n        async saveBlock (el) {\n            const blockId = el.dataset.blockId;\n            delete this._timers[blockId];\n            this._setState(blockId, \"saving\");\n            try {\n                const resp = await fetch(el.dataset.editUrl, {\n                    method: \"POST\",\n                    headers: {\n                        \"X-CSRFToken\": opts.csrf,\n                        \"Content-Type\": \"application/x-www-form-urlencoded\"\n                    },\n                    body: new URLSearchParams({\n                        text: el.innerText\n                    })\n                });\n                if (!resp.ok) throw new Error(\"save failed: \" + resp.status);\n                // A newer keystroke may already have re-dirtied the block.\n                if (this._timers[blockId] === undefined && this.blockStates[blockId] === \"saving\") this._setState(blockId, \"saved\");\n            } catch (e) {\n                this._setState(blockId, \"error\");\n            }\n        },\n        // htmx add/delete rows persist server-side immediately; nothing to track per\n        // block, but a failed one should surface on the doc label.\n        onStructureChange (evt) {\n            const detail = evt.detail || {};\n            const path = detail.pathInfo && detail.pathInfo.requestPath || \"\";\n            if (path.indexOf(\"/notes/blocks/\") === -1) return;\n            if (detail.successful) this.everTouched = true;\n            else this._setState(\"__structure__\", \"error\");\n        }\n    };\n}\nfunction $9a80a58dfd172945$export$c9ecfb1c06f2cc2f(opts) {\n    return {\n        messages: opts.messages || [],\n        draft: \"\",\n        busy: false,\n        // The drawer opens on click/focus or on send — never on load (it would\n        // overlay the notes the user came to read).\n        open: false,\n        init () {\n            this.$watch(\"open\", (opened)=>{\n                if (opened) this.scrollDown();\n            });\n        },\n        renderMarkdown (text) {\n            if (window.marked && window.DOMPurify) return window.DOMPurify.sanitize(window.marked.parse(text || \"\"));\n            const div = document.createElement(\"div\");\n            div.textContent = text || \"\";\n            return div.innerHTML;\n        },\n        async send () {\n            const text = this.draft.trim();\n            if (!text || this.busy) return;\n            this.draft = \"\";\n            this.open = true;\n            this.busy = true;\n            this.messages.push({\n                role: \"user\",\n                text: text\n            });\n            this.scrollDown();\n            try {\n                const resp = await fetch(opts.turnUrl, {\n                    method: \"POST\",\n                    headers: {\n                        \"Content-Type\": \"application/json\",\n                        \"X-CSRFToken\": opts.csrf\n                    },\n                    body: JSON.stringify({\n                        message: text\n                    })\n                });\n                if (!resp.ok || !resp.body) throw new Error(\"turn failed: \" + resp.status);\n                const reader = resp.body.getReader();\n                const decoder = new TextDecoder();\n                let buffer = \"\";\n                for(;;){\n                    const { done: done, value: value } = await reader.read();\n                    if (done) break;\n                    buffer += decoder.decode(value, {\n                        stream: true\n                    });\n                    let boundary;\n                    while((boundary = buffer.indexOf(\"\\n\\n\")) !== -1){\n                        const rawEvent = buffer.slice(0, boundary);\n                        buffer = buffer.slice(boundary + 2);\n                        const dataLine = rawEvent.split(\"\\n\").find((line)=>line.startsWith(\"data: \"));\n                        if (dataLine) this.handleFrame(JSON.parse(dataLine.slice(6)));\n                    }\n                }\n            } catch (e) {\n                this.messages.push({\n                    role: \"error\",\n                    text: opts.errorMessage\n                });\n            } finally{\n                this.busy = false;\n                this.scrollDown();\n            }\n        },\n        handleFrame (frame) {\n            if (frame.type === \"assistant\") {\n                this.messages.push({\n                    role: \"assistant\",\n                    text: frame.content\n                });\n                this.scrollDown();\n            } else if (frame.type === \"error\") this.messages.push({\n                role: \"error\",\n                text: frame.message || opts.errorMessage\n            });\n        },\n        scrollDown () {\n            this.$nextTick(()=>{\n                const thread = this.$refs.thread;\n                if (thread) thread.scrollTop = thread.scrollHeight;\n            });\n        }\n    };\n}\n\n});\n\nparcelRegister(\"kXOQU\", function(module, exports) {\n\n$parcel$export(module.exports, \"stackOverBase\", () => $f430c38a50cca8e5$export$7f664f745491654);\n$parcel$export(module.exports, \"urlParam\", () => $f430c38a50cca8e5$export$c58cbe8a8ef2f1b3);\n// Mirrors one URL param into page state; the URL is the source of truth.\n// Back/Forward, reload and programmatic changes all reach onChange(value, { initial }).\nconst $f430c38a50cca8e5$var$CHANGED_EVENT = \"urlparam:changed\";\nconst $f430c38a50cca8e5$var$registry = new Map(); // param name -> { clearOn }\nfunction $f430c38a50cca8e5$var$navigate(mutate, { push: push, pushedBy: pushedBy }) {\n    const url = new URL(window.location);\n    mutate(url.searchParams);\n    if (push) history.pushState({\n        pushedBy: pushedBy\n    }, \"\", url);\n    else history.replaceState(history.state, \"\", url);\n    // pushState/replaceState don't fire popstate; tell every instance to re-read.\n    window.dispatchEvent(new Event($f430c38a50cca8e5$var$CHANGED_EVENT));\n}\nfunction $f430c38a50cca8e5$export$7f664f745491654(name) {\n    const url = new URL(window.location);\n    const value = url.searchParams.get(name);\n    if (value === null || history.state?.pushedBy === name) return;\n    url.searchParams.delete(name);\n    history.replaceState(null, \"\", url);\n    url.searchParams.set(name, value);\n    history.pushState({\n        pushedBy: name\n    }, \"\", url);\n}\nfunction $f430c38a50cca8e5$export$c58cbe8a8ef2f1b3(name, { fallback: fallback = null, clearOn: clearOn = [], resets: resets = [], onChange: onChange }) {\n    const read = ()=>new URL(window.location).searchParams.get(name) ?? fallback;\n    let value = read();\n    const sync = ()=>{\n        const next = read();\n        if (next === value) return;\n        value = next;\n        onChange(value, {\n            initial: false\n        });\n    };\n    const write = (next, push)=>{\n        next = next === null ? null : String(next);\n        if (next === value) return;\n        $f430c38a50cca8e5$var$navigate((params)=>{\n            // Fallback stays out of the URL: ?tab=members == no ?tab.\n            if (next === null || next === fallback) params.delete(name);\n            else params.set(name, next);\n            // Plain params this one invalidates, e.g. a tab change resets ?page.\n            for (const other of resets)params.delete(other);\n            // Same history entry drops dependents, e.g. tab change closes the tab's modal.\n            for (const [other, config] of $f430c38a50cca8e5$var$registry)if (config.clearOn.includes(name)) params.delete(other);\n        }, {\n            push: push,\n            pushedBy: name\n        });\n    };\n    $f430c38a50cca8e5$var$registry.set(name, {\n        clearOn: clearOn\n    });\n    window.addEventListener(\"popstate\", sync);\n    window.addEventListener($f430c38a50cca8e5$var$CHANGED_EVENT, sync);\n    onChange(value, {\n        initial: true\n    });\n    return {\n        get value () {\n            return value;\n        },\n        set: (next)=>write(next, true),\n        replace: (next)=>write(next, false),\n        clear () {\n            if (value === fallback) return;\n            // We pushed this entry: undo it so Back doesn't land on a closed modal.\n            if (history.state?.pushedBy === name) history.back();\n            else write(fallback, false);\n        },\n        destroy () {\n            $f430c38a50cca8e5$var$registry.delete(name);\n            window.removeEventListener(\"popstate\", sync);\n            window.removeEventListener($f430c38a50cca8e5$var$CHANGED_EVENT, sync);\n        }\n    };\n}\n\n});\n\nparcelRegister(\"55buA\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $3b365586fec8dddb$export$2e2bcd8739ae039);\n\nvar $7thvI = parcelRequire(\"7thvI\");\n\nvar $kXOQU = parcelRequire(\"kXOQU\");\nvar /**\n * Settings → Users: tabs (?tab=), users table isle, ?user_id=<pk> user slideover, and the ?group_modal=new|<uuid> group modal.\n * The address bar is the table's state: ?tab, ?search and ?page are urlParams whose changes\n * (clicks, Back/Forward) all land in refresh(); mutations fire the load event, which does too.\n */ $3b365586fec8dddb$export$2e2bcd8739ae039 = ({ tabs: tabs, tableUrl: tableUrl, userDetailUrlTemplate: userDetailUrlTemplate, groupCreateUrl: groupCreateUrl, groupEditUrlTemplate: groupEditUrlTemplate, uuidPlaceholder: uuidPlaceholder })=>({\n        search: \"\",\n        tabs: tabs,\n        tab: null,\n        tabParam: null,\n        searchParam: null,\n        pageParam: null,\n        refreshQueued: false,\n        refreshQuiet: false,\n        userParam: null,\n        userSlideoverKey: null,\n        groupModalOpen: false,\n        groupModalParam: null,\n        get isGuestUser () {\n            return this.tab === this.tabs.GUESTS;\n        },\n        init () {\n            this.tabParam = (0, $kXOQU.urlParam)(\"tab\", {\n                fallback: this.tabs.USERS,\n                resets: [\n                    \"page\"\n                ],\n                onChange: (value, { initial: initial })=>{\n                    this.tab = value;\n                    if (!initial) this.refresh();\n                }\n            });\n            this.searchParam = (0, $kXOQU.urlParam)(\"search\", {\n                fallback: \"\",\n                resets: [\n                    \"page\"\n                ],\n                onChange: (value, { initial: initial })=>{\n                    this.search = value;\n                    if (!initial) this.refresh();\n                }\n            });\n            this.pageParam = (0, $kXOQU.urlParam)(\"page\", {\n                onChange: (value, { initial: initial })=>{\n                    if (!initial) this.refresh();\n                }\n            });\n            this.refresh();\n            (0, $kXOQU.stackOverBase)(\"user_id\");\n            this.userParam = (0, $kXOQU.urlParam)(\"user_id\", {\n                clearOn: [\n                    \"tab\"\n                ],\n                onChange: (value, { initial: initial })=>{\n                    // Our own re-push below; refetching would wipe the edits.\n                    if (value && value === this.userSlideoverKey) return;\n                    // On load the slideover component may not be listening yet.\n                    if (value && initial) this.$nextTick(()=>this.openUser(value));\n                    else if (value) this.openUser(value);\n                    else if (this.userSlideoverKey) this.closeUserFromBack();\n                }\n            });\n            // A tab switch drops ?group_modal in the same history entry.\n            this.groupModalParam = (0, $kXOQU.urlParam)(\"group_modal\", {\n                clearOn: [\n                    \"tab\"\n                ],\n                onChange: (value)=>{\n                    if (value) this.loadGroupModal(value);\n                    else this.groupModalOpen = false;\n                }\n            });\n            this.$watch(\"groupModalOpen\", (open)=>{\n                if (!open) this.groupModalParam.clear();\n            });\n        },\n        destroy () {\n            this.tabParam.destroy();\n            this.searchParam.destroy();\n            this.pageParam.destroy();\n            this.userParam.destroy();\n            this.groupModalParam.destroy();\n        },\n        openUser (id) {\n            this.userSlideoverKey = id;\n            window.dispatchEvent(new CustomEvent(\"open-slideover\", {\n                detail: {\n                    size: \"md\",\n                    // Slideover runs this twice on X/Escape/Discard (handleClose, then its isSlideoverOpen watcher);\n                    // a second clear() would see our entry still on top and go Back off the page.\n                    closingCallback: ()=>{\n                        if (!this.userSlideoverKey) return;\n                        this.userSlideoverKey = null;\n                        this.userParam.clear();\n                        // Generous: whatever changed in the slideover shows in the table.\n                        this.refresh({\n                            quiet: true\n                        });\n                    }\n                }\n            }));\n            (0, $7thvI.loadSlideover)(userDetailUrlTemplate.replace(uuidPlaceholder, id));\n        },\n        // Back on an open slideover. X/save already closed it and nulled the key, so this is only Back.\n        // Dirty edits make close-slideover show \"Discard changes?\" and stay open (closingCallback not run):\n        // push ?user_id back so the URL matches; Discard then clears it like any close.\n        closeUserFromBack () {\n            window.dispatchEvent(new Event(\"close-slideover\"));\n            if (this.userSlideoverKey) this.userParam.set(this.userSlideoverKey);\n        },\n        // Detail/role/access edits: reload the open slideover in place; its indicator is the loading state.\n        refreshUser () {\n            if (!this.userParam.value) return;\n            (0, $7thvI.loadSlideover)(userDetailUrlTemplate.replace(uuidPlaceholder, this.userParam.value));\n        },\n        searchData () {\n            this.searchParam.set(this.search);\n        },\n        handlePageClick (pageNum) {\n            this.pageParam.set(pageNum);\n        },\n        // One navigation can change several params (tab resets page, Back undoes search + page): one fetch for all.\n        // quiet: swap in place without the spinner; only if every caller in the tick asked for it.\n        refresh ({ quiet: quiet = false } = {}) {\n            this.refreshQuiet = this.refreshQueued ? this.refreshQuiet && quiet : quiet;\n            if (this.refreshQueued) return;\n            this.refreshQueued = true;\n            queueMicrotask(()=>{\n                this.refreshQueued = false;\n                this._reloadTable({\n                    quiet: this.refreshQuiet\n                });\n            });\n        },\n        // Groups tab has no users table; switching back reloads it.\n        // Container as source: its htmx-request class swaps the table for a spinner. The quiet source is\n        // its sibling, so nothing above the table gets the class.\n        _reloadTable ({ quiet: quiet = false } = {}) {\n            if (this.tab === this.tabs.GROUPS) return;\n            // Slideover state isn't table state; keeps ?user_id out of the isle's page/name hrefs.\n            const params = new URLSearchParams(window.location.search);\n            params.delete(\"user_id\");\n            htmx.ajax(\"GET\", tableUrl + \"?\" + params.toString(), {\n                source: quiet ? \"#organization_user_table_quiet_source\" : \"#organization_user_table_container\",\n                target: \"#organization_user_table\",\n                swap: \"innerHTML\"\n            });\n        },\n        async loadGroupModal (key) {\n            const url = key === \"new\" ? groupCreateUrl : groupEditUrlTemplate.replace(uuidPlaceholder, key);\n            const response = await fetch(url);\n            if (!response.ok) {\n                this.groupModalParam.clear();\n                return;\n            }\n            const body = document.getElementById(\"organization-user-group-modal-body\");\n            body.innerHTML = await response.text();\n            htmx.process(body);\n            this.groupModalOpen = true;\n        }\n    });\n\n});\nparcelRegister(\"7thvI\", function(module, exports) {\n\n$parcel$export(module.exports, \"loadSlideover\", () => $5708d315b3c58d06$export$a020ab39c95810eb);\n// Loads url into the layout's slideover. Source = its indicator, never body: a body-sourced\n// request puts htmx-request on <body>, which trips every `.htmx-request &` style on the page.\nfunction $5708d315b3c58d06$export$a020ab39c95810eb(url) {\n    return htmx.ajax(\"GET\", url, {\n        source: document.getElementById(\"slideover-indicator\"),\n        target: \"#slideover-content\"\n    });\n}\n\n});\n\n\nparcelRegister(\"fZuEE\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $ba4454e3ff65ae01$export$2e2bcd8739ae039);\n// What's new: one Alpine state machine for the popover, note modal and slideover.\n// Every state change goes through go(), which wraps it in a view transition (see global.css \"What's new\").\nconst $ba4454e3ff65ae01$var$PANEL_TTL_MS = 3000000; // hero URLs are signed for 1h; refetch the panel before they expire\nconst $ba4454e3ff65ae01$var$REDUCED_MOTION = \"(prefers-reduced-motion: reduce)\";\nvar $ba4454e3ff65ae01$export$2e2bcd8739ae039 = ({ unseen: unseen, panelUrl: panelUrl, announceUrl: announceUrl })=>({\n        view: \"closed\",\n        target: \"closed\",\n        unseen: unseen,\n        loading: false,\n        panelLoadedAt: 0,\n        transitionId: 0,\n        async init () {\n            // Auto-announce once per tab session, and only where the icon is visible (not mobile, not HRIS context).\n            // $nextTick: the header wrapper's x-cloak/x-show are applied after this init, so the icon reads hidden until then.\n            if (!announceUrl) return;\n            await this.$nextTick();\n            if (!this.$refs.button.checkVisibility?.()) return;\n            const key = `whats-new-announced:${announceUrl}`;\n            try {\n                if (sessionStorage.getItem(key)) return;\n                sessionStorage.setItem(key, \"1\");\n            } catch (e) {\n            // Storage blocked: announce anyway; the server marks it opened, so it shows once.\n            }\n            this.openNote(announceUrl, this.$refs.button, null);\n        },\n        async go (next) {\n            if (next === this.target) return;\n            const from = this.target;\n            this.target = next;\n            // open: closed -> surface (dropdown-like pop); close: surface -> closed; morph: surface -> surface.\n            const kind = from === \"closed\" ? \"open\" : next === \"closed\" ? \"close\" : \"morph\";\n            const apply = async ()=>{\n                this.view = next;\n                await this.$nextTick();\n                // Hidden surfaces keep their DOM; stop the hero loop when the modal is not on screen.\n                this.$root.querySelectorAll(\"#whats-new-modal video\").forEach((video)=>{\n                    if (next === \"modal\") video.play().catch(()=>{});\n                    else video.pause();\n                });\n            };\n            if (!document.startViewTransition || window.matchMedia($ba4454e3ff65ae01$var$REDUCED_MOTION).matches) return apply();\n            const id = ++this.transitionId;\n            const root = document.documentElement;\n            root.dataset.whatsNewVt = kind;\n            try {\n                await document.startViewTransition(apply).finished;\n            } finally{\n                // A newer go() owns the attribute now; leave it alone.\n                if (id === this.transitionId) delete root.dataset.whatsNewVt;\n            }\n        },\n        // GET into a container; true only if the response swapped something in (htmx skips 4xx swaps).\n        async load (url, selector, source) {\n            if (this.loading) return false;\n            this.loading = true;\n            const container = document.querySelector(selector);\n            container.innerHTML = \"\";\n            try {\n                await htmx.ajax(\"GET\", url, {\n                    source: source,\n                    target: selector,\n                    swap: \"innerHTML\"\n                });\n            } finally{\n                this.loading = false;\n            }\n            return container.childElementCount > 0;\n        },\n        async ensurePanel (source) {\n            if (Date.now() - this.panelLoadedAt < $ba4454e3ff65ae01$var$PANEL_TTL_MS) return true;\n            const loaded = await this.load(panelUrl, \"#whats-new-popover-list\", source);\n            if (loaded) {\n                this.panelLoadedAt = Date.now();\n                this.unseen = false; // the panel request marked every listed note seen\n            }\n            return loaded;\n        },\n        async togglePopover () {\n            if (this.target !== \"closed\") return this.go(\"closed\");\n            if (await this.ensurePanel(this.$refs.button)) return this.go(\"popover\");\n        },\n        async showAll (source) {\n            if (await this.ensurePanel(source)) return this.go(\"slideover\");\n        },\n        // Fetch first, then transition, so the snapshot already holds the note.\n        async openNote (url, source, noteId) {\n            if (!await this.load(url, \"#whats-new-modal\", source)) return;\n            if (noteId) document.querySelectorAll(`[data-unread-dot=\"${noteId}\"]`).forEach((dot)=>dot.remove());\n            return this.go(\"modal\");\n        }\n    });\n\n});\n\nparcelRegister(\"QGjLH\", function(module, exports) {\n\"use strict\";\nvar $09e5aee2c0c729f7$var$__importDefault = module.exports && module.exports.__importDefault || function(mod) {\n    return mod && mod.__esModule ? mod : {\n        \"default\": mod\n    };\n};\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\n\nconst $09e5aee2c0c729f7$var$assert_valid_user_options_1 = $09e5aee2c0c729f7$var$__importDefault((parcelRequire(\"jnMMz\")));\n\nconst $09e5aee2c0c729f7$var$suggest_email_1 = $09e5aee2c0c729f7$var$__importDefault((parcelRequire(\"eP7JE\")));\n\nconst $09e5aee2c0c729f7$var$get_options_1 = $09e5aee2c0c729f7$var$__importDefault((parcelRequire(\"8drio\")));\nfunction $09e5aee2c0c729f7$var$run(userOptions) {\n    const options = $09e5aee2c0c729f7$var$get_options_1.default(userOptions);\n    $09e5aee2c0c729f7$var$assert_valid_user_options_1.default(options || {});\n    const email = $09e5aee2c0c729f7$var$suggest_email_1.default(options);\n    if (!email && userOptions.empty) userOptions.empty();\n    if (email && userOptions.suggested) userOptions.suggested(email);\n    return email;\n}\nmodule.exports.default = $09e5aee2c0c729f7$var$run;\n\n});\nparcelRegister(\"jnMMz\", function(module, exports) {\n\"use strict\";\nvar $e1c6017e60cbbf79$var$__importDefault = module.exports && module.exports.__importDefault || function(mod) {\n    return mod && mod.__esModule ? mod : {\n        \"default\": mod\n    };\n};\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\n\nconst $e1c6017e60cbbf79$var$assert_1 = $e1c6017e60cbbf79$var$__importDefault((parcelRequire(\"9dtzC\")));\nfunction $e1c6017e60cbbf79$var$assertValidUserOptions(options) {\n    $e1c6017e60cbbf79$var$assert_1.default(Array.isArray(options.domains), 'domains must be an array');\n    $e1c6017e60cbbf79$var$assert_1.default(Array.isArray(options.topLevelDomains), 'topLevelDomains must be an array');\n    $e1c6017e60cbbf79$var$assert_1.default(Array.isArray(options.secondLevelDomains), 'secondLevelDomains must be an array');\n    $e1c6017e60cbbf79$var$assert_1.default(typeof options.distanceFunction === 'function', 'distanceFunction must be a function');\n}\nmodule.exports.default = $e1c6017e60cbbf79$var$assertValidUserOptions;\n\n});\nparcelRegister(\"9dtzC\", function(module, exports) {\n\"use strict\";\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\nfunction $6b5c44a0c3a6b87b$var$assert(condition, message) {\n    if (!condition) throw new Error(message);\n}\nmodule.exports.default = $6b5c44a0c3a6b87b$var$assert;\n\n});\n\n\nparcelRegister(\"eP7JE\", function(module, exports) {\n\"use strict\";\nvar $acabd4298c556def$var$__importDefault = module.exports && module.exports.__importDefault || function(mod) {\n    return mod && mod.__esModule ? mod : {\n        \"default\": mod\n    };\n};\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\n\nconst $acabd4298c556def$var$encode_email_1 = $acabd4298c556def$var$__importDefault((parcelRequire(\"lNRti\")));\n\nconst $acabd4298c556def$var$find_closest_domain_1 = $acabd4298c556def$var$__importDefault((parcelRequire(\"4GARs\")));\n\nconst $acabd4298c556def$var$parse_email_1 = $acabd4298c556def$var$__importDefault((parcelRequire(\"feo5y\")));\nfunction $acabd4298c556def$var$suggestEmail(opts) {\n    const encodedEmail = $acabd4298c556def$var$encode_email_1.default(opts.email.toLowerCase());\n    const email = $acabd4298c556def$var$parse_email_1.default(encodedEmail);\n    if (!email) return undefined;\n    const { domains: domains, domainThreshold: domainThreshold, distanceFunction: distanceFunction, secondLevelDomains: secondLevelDomains, topLevelDomains: topLevelDomains } = opts;\n    if (secondLevelDomains && topLevelDomains) {\n        // If the email is a valid 2nd-level + top-level, do not suggest anything.\n        // if (hasValidSecondLevelDomain(email) && hasValidTopLevelDomain(email)) {\n        if (secondLevelDomains.indexOf(email.secondLevelDomain) !== -1 && topLevelDomains.indexOf(email.topLevelDomain) !== -1) return undefined;\n    }\n    let closestDomain = $acabd4298c556def$var$find_closest_domain_1.default({\n        domain: email.domain,\n        domains: domains,\n        distanceFunction: distanceFunction,\n        threshold: domainThreshold\n    });\n    if (closestDomain) {\n        if (closestDomain == email.domain) // The email address exactly matches one of the supplied domains; do not return a suggestion.\n        return undefined;\n        else // The email address closely matches one of the supplied domains; return a suggestion\n        return {\n            address: email.address,\n            domain: closestDomain,\n            full: email.address + '@' + closestDomain\n        };\n    }\n    // The email address does not closely match one of the supplied domains\n    const closestSecondLevelDomain = $acabd4298c556def$var$find_closest_domain_1.default({\n        domain: email.secondLevelDomain,\n        domains: secondLevelDomains,\n        distanceFunction: distanceFunction,\n        threshold: opts.secondLevelThreshold\n    });\n    const closestTopLevelDomain = $acabd4298c556def$var$find_closest_domain_1.default({\n        domain: email.topLevelDomain,\n        domains: topLevelDomains,\n        distanceFunction: distanceFunction,\n        threshold: opts.topLevelThreshold\n    });\n    if (email.domain) {\n        closestDomain = email.domain;\n        let rtrn = false;\n        if (closestSecondLevelDomain && closestSecondLevelDomain != email.secondLevelDomain) {\n            // The email address may have a mispelled second-level domain; return a suggestion\n            closestDomain = closestDomain.replace(email.secondLevelDomain, closestSecondLevelDomain);\n            rtrn = true;\n        }\n        if (closestTopLevelDomain && closestTopLevelDomain != email.topLevelDomain && email.secondLevelDomain !== '') {\n            // The email address may have a mispelled top-level domain; return a suggestion\n            closestDomain = closestDomain.replace(new RegExp(email.topLevelDomain + '$'), closestTopLevelDomain);\n            rtrn = true;\n        }\n        if (rtrn) return {\n            address: email.address,\n            domain: closestDomain,\n            full: email.address + '@' + closestDomain\n        };\n    }\n    /* The email address exactly matches one of the supplied domains, does not closely\n     * match any domain and does not appear to simply have a mispelled top-level domain,\n     * or is an invalid email address; do not return a suggestion.\n     */ return undefined;\n}\nmodule.exports.default = $acabd4298c556def$var$suggestEmail;\n\n});\nparcelRegister(\"lNRti\", function(module, exports) {\n\"use strict\";\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\n// Encode the email address to prevent XSS but leave in valid\n// characters, following this official spec:\n// http://en.wikipedia.org/wiki/Email_address#Syntax\n//\n// We have to replace all the possible characters.\n// that's why we use a regex with a global flag.\nfunction $fdf7a6edd8532839$var$encodeEmail(email) {\n    const result = encodeURI(email).replace(/%20/g, ' ').replace(/%25/g, '%').replace(/%5E/g, '^').replace(/%60/g, '`').replace(/%7B/g, '{').replace(/%7C/g, '|').replace(/%7D/g, '}');\n    return result;\n}\nmodule.exports.default = $fdf7a6edd8532839$var$encodeEmail;\n\n});\n\nparcelRegister(\"4GARs\", function(module, exports) {\n\"use strict\";\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\nfunction $3697ad8bc4d6e11d$var$findClosestDomain(opts) {\n    const { domain: domain, domains: domains, distanceFunction: distanceFunction, threshold: threshold } = opts;\n    let dist;\n    let minDist = Infinity;\n    let closestDomain = null;\n    if (!domain || !domains) return undefined;\n    for(let i = 0; i < domains.length; i++){\n        if (domain === domains[i]) return domain;\n        dist = distanceFunction(domain, domains[i]);\n        if (dist < minDist) {\n            minDist = dist;\n            closestDomain = domains[i];\n        }\n    }\n    if (minDist <= threshold && closestDomain !== null) return closestDomain;\n    else return undefined;\n}\nmodule.exports.default = $3697ad8bc4d6e11d$var$findClosestDomain;\n\n});\n\nparcelRegister(\"feo5y\", function(module, exports) {\n\"use strict\";\nvar $b16ad95621c54918$var$__importDefault = module.exports && module.exports.__importDefault || function(mod) {\n    return mod && mod.__esModule ? mod : {\n        \"default\": mod\n    };\n};\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\n\nconst $b16ad95621c54918$var$trim_1 = $b16ad95621c54918$var$__importDefault((parcelRequire(\"kr65L\")));\nconst $b16ad95621c54918$var$MINIUM_EMAIL_PARTS = 2;\nfunction $b16ad95621c54918$var$parseEmail(emailStr) {\n    const email = $b16ad95621c54918$var$trim_1.default(emailStr);\n    const parts = email.split('@');\n    if (parts.length < $b16ad95621c54918$var$MINIUM_EMAIL_PARTS) return false;\n    for(let i = 0; i < parts.length; i++){\n        if (parts[i] === '') return false;\n    }\n    // FYI, in hello@example.com\n    // secondLevelDomain -> example\n    // topLevelDomain -> com\n    let sld = '';\n    let tld = '';\n    const domain = parts.pop();\n    const domainParts = domain.split('.');\n    if (domainParts.length === 0) // The address does not have a top-level domain\n    return false;\n    else if (domainParts.length == 1) // The address has only a top-level domain (valid under RFC)\n    tld = domainParts[0];\n    else {\n        // The address has a domain and a top-level domain\n        sld = domainParts[0];\n        for(let j = 1; j < domainParts.length; j++)tld += domainParts[j] + '.';\n        tld = tld.substring(0, tld.length - 1);\n    }\n    return {\n        topLevelDomain: tld,\n        secondLevelDomain: sld,\n        domain: domain,\n        address: parts.join('@')\n    };\n}\nmodule.exports.default = $b16ad95621c54918$var$parseEmail;\n\n});\nparcelRegister(\"kr65L\", function(module, exports) {\n\"use strict\";\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\nconst $ee0b0dfb4082f018$var$WHITESPACE_PATTERN = /\\s/;\n/**\n * Just in case a browser doesn't support .trim\n * Copied from https://github.com/Trott/trim\n * Credits to them\n */ function $ee0b0dfb4082f018$var$trim(str) {\n    if (str.trim) return str.trim();\n    return $ee0b0dfb4082f018$var$right($ee0b0dfb4082f018$var$left(str));\n}\nfunction $ee0b0dfb4082f018$var$left(str) {\n    if (str.trimLeft) return str.trimLeft();\n    return str.replace(/^\\s\\s*/, '');\n}\nfunction $ee0b0dfb4082f018$var$right(str) {\n    if (str.trimRight) return str.trimRight();\n    let i = str.length;\n    while($ee0b0dfb4082f018$var$WHITESPACE_PATTERN.test(str.charAt(--i)));\n    return str.slice(0, i + 1);\n}\nmodule.exports.default = $ee0b0dfb4082f018$var$trim;\n\n});\n\n\n\nparcelRegister(\"8drio\", function(module, exports) {\n\"use strict\";\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\n\nvar $2ffcM = parcelRequire(\"2ffcM\");\nfunction $5fb4b5f9e0cc200d$var$getOptions(userOptions) {\n    return {\n        email: userOptions.email,\n        domains: userOptions.domains || $2ffcM.DEFAULT_CONFIG.domains,\n        topLevelDomains: userOptions.topLevelDomains || $2ffcM.DEFAULT_CONFIG.topLevelDomains,\n        secondLevelDomains: userOptions.secondLevelDomains || $2ffcM.DEFAULT_CONFIG.secondLevelDomains,\n        distanceFunction: userOptions.distanceFunction || $2ffcM.DEFAULT_CONFIG.distanceFunction,\n        domainThreshold: userOptions.domainThreshold || $2ffcM.DEFAULT_CONFIG.domainThreshold,\n        secondLevelThreshold: userOptions.secondLevelThreshold || $2ffcM.DEFAULT_CONFIG.secondLevelThreshold,\n        topLevelThreshold: userOptions.topLevelThreshold || $2ffcM.DEFAULT_CONFIG.topLevelThreshold,\n        suggested: userOptions.suggested || undefined,\n        empty: userOptions.suggested || undefined\n    };\n}\nmodule.exports.default = $5fb4b5f9e0cc200d$var$getOptions;\n\n});\nparcelRegister(\"2ffcM\", function(module, exports) {\n\"use strict\";\n// Default configuration options\nvar $1a28c6e684133df7$var$__importDefault = module.exports && module.exports.__importDefault || function(mod) {\n    return mod && mod.__esModule ? mod : {\n        \"default\": mod\n    };\n};\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\nmodule.exports.POPULAR_TLDS = module.exports.POPULAR_DOMAINS = module.exports.DEFAULT_CONFIG = void 0;\n\nconst $1a28c6e684133df7$var$sift3_distance_1 = $1a28c6e684133df7$var$__importDefault((parcelRequire(\"1dEEe\")));\n/***\n * Default list of popular emails for 2022 and onwards.\n * https://www.mailmunch.com/blog/best-email-service-providers\n *\n * If you find a domain you want to add, please submit a PR.\n * Also, notice that this list is not exhaustive.\n * You can always pass your own list of domains.\n */ const $1a28c6e684133df7$var$POPULAR_DOMAINS = [\n    'msn.com',\n    'bellsouth.net',\n    'telus.net',\n    'comcast.net',\n    'optusnet.com.au',\n    'earthlink.net',\n    'qq.com',\n    'sky.com',\n    'icloud.com',\n    'sympatico.ca',\n    'googlemail.com',\n    'att.net',\n    'xtra.co.nz',\n    'web.de',\n    'cox.net',\n    'gmail.com',\n    'ymail.com',\n    'aim.com',\n    'rogers.com',\n    'verizon.net',\n    'rocketmail.com',\n    'optonline.net',\n    'sbcglobal.net',\n    // aol\n    'aol.com',\n    'aim.com',\n    'me.com',\n    'mailw.com',\n    'btinternet.com',\n    'charter.net',\n    'shaw.ca',\n    'hey.com',\n    // Proton\n    'proton.me',\n    'pm.com',\n    'protonmail.com',\n    'zoho.com',\n    'yandex.com',\n    'titan.email'\n];\nmodule.exports.POPULAR_DOMAINS = $1a28c6e684133df7$var$POPULAR_DOMAINS;\nconst $1a28c6e684133df7$var$POPULAR_TLDS = [\n    'com',\n    'com.au',\n    'com.tw',\n    'co',\n    'ca',\n    'co.nz',\n    'co.uk',\n    'de',\n    'fr',\n    'it',\n    'ru',\n    'org',\n    'edu',\n    'gov',\n    'jp',\n    'nl',\n    'kr',\n    'se',\n    'eu',\n    'ie',\n    'co.il',\n    'us',\n    'at',\n    'be',\n    'dk',\n    'hk',\n    'es',\n    'gr',\n    'ch',\n    'no',\n    'cz',\n    'net',\n    'net.au',\n    'info',\n    'biz',\n    'mil',\n    'co.jp',\n    'sg',\n    'hu',\n    'uk',\n    'sk',\n    // Country specific popular domains\n    'ar',\n    'cf',\n    'cl',\n    'cn',\n    'ga',\n    'gq',\n    'ir',\n    'ml',\n    'mx',\n    'nu',\n    'nz',\n    'ph',\n    'pl',\n    'ro',\n    'tk',\n    'tw',\n    'ua',\n    'vg',\n    'ws',\n    'xn',\n    'za',\n    // popular TLDs that startup use in 2022\n    // https://thewebsiteflip.com/domains/funded-startup-brands-2021/#:~:text=from%20the%20data.-,1.,TLDs%20for%20the%20foreseeable%20future.\n    // https://martijnoud.com/most-popular-tld-crypto/\n    'app',\n    'au',\n    'ai',\n    'biz',\n    'br',\n    'blog',\n    'cloud',\n    'club',\n    'cc',\n    'de',\n    'dev',\n    'digital',\n    'fi',\n    'finance',\n    'id',\n    'in',\n    'io',\n    'me',\n    'mobi',\n    'network',\n    'pw',\n    'so',\n    'xyz',\n    'software',\n    'to',\n    'tech'\n];\nmodule.exports.POPULAR_TLDS = $1a28c6e684133df7$var$POPULAR_TLDS;\nconst $1a28c6e684133df7$var$DEFAULT_CONFIG = {\n    domainThreshold: 2,\n    domains: $1a28c6e684133df7$var$POPULAR_DOMAINS,\n    secondLevelThreshold: 2,\n    secondLevelDomains: [\n        'yahoo',\n        'hotmail',\n        'mail',\n        'live',\n        'outlook'\n    ],\n    topLevelThreshold: 2,\n    topLevelDomains: $1a28c6e684133df7$var$POPULAR_TLDS,\n    distanceFunction: $1a28c6e684133df7$var$sift3_distance_1.default\n};\nmodule.exports.DEFAULT_CONFIG = $1a28c6e684133df7$var$DEFAULT_CONFIG;\n\n});\nparcelRegister(\"1dEEe\", function(module, exports) {\n\"use strict\";\nObject.defineProperty(module.exports, \"__esModule\", {\n    value: true\n});\nfunction $0e36892d868a9a74$var$sift3Distance(s1, s2) {\n    // sift3: http://siderite.blogspot.com/2007/04/super-fast-and-accurate-string-distance.html\n    if (s1 == null || s1.length === 0) {\n        if (s2 == null || s2.length === 0) return 0;\n        else return s2.length;\n    }\n    if (s2 == null || s2.length === 0) return s1.length;\n    let c = 0;\n    let offset1 = 0;\n    let offset2 = 0;\n    let lcs = 0;\n    const maxOffset = 5;\n    while(c + offset1 < s1.length && c + offset2 < s2.length){\n        if (s1.charAt(c + offset1) == s2.charAt(c + offset2)) lcs++;\n        else {\n            offset1 = 0;\n            offset2 = 0;\n            for(let i = 0; i < maxOffset; i++){\n                if (c + i < s1.length && s1.charAt(c + i) == s2.charAt(c)) {\n                    offset1 = i;\n                    break;\n                }\n                if (c + i < s2.length && s1.charAt(c) == s2.charAt(c + i)) {\n                    offset2 = i;\n                    break;\n                }\n            }\n        }\n        c++;\n    }\n    return (s1.length + s2.length) / 2 - lcs;\n}\nmodule.exports.default = $0e36892d868a9a74$var$sift3Distance;\n\n});\n\n\n\n\n// Day.js configuration\n\nvar $jhwMH = parcelRequire(\"jhwMH\");\n\nvar $jSNlv = parcelRequire(\"jSNlv\");\n\nvar $6N7gE = parcelRequire(\"6N7gE\");\n\nvar $17sxp = parcelRequire(\"17sxp\");\nvar $8f169e030fd838f9$exports = {};\n\n!function(a, e) {\n    $8f169e030fd838f9$exports = e((parcelRequire(\"jhwMH\")));\n}($8f169e030fd838f9$exports, function(a) {\n    \"use strict\";\n    function e(a) {\n        return a && \"object\" == typeof a && \"default\" in a ? a : {\n            default: a\n        };\n    }\n    var t = e(a), _ = {\n        name: \"tr\",\n        weekdays: \"Pazar_Pazartesi_Sal\\u0131_\\xc7ar\\u015Famba_Per\\u015Fembe_Cuma_Cumartesi\".split(\"_\"),\n        weekdaysShort: \"Paz_Pts_Sal_\\xc7ar_Per_Cum_Cts\".split(\"_\"),\n        weekdaysMin: \"Pz_Pt_Sa_\\xc7a_Pe_Cu_Ct\".split(\"_\"),\n        months: \"Ocak_\\u015Eubat_Mart_Nisan_May\\u0131s_Haziran_Temmuz_A\\u011Fustos_Eyl\\xfcl_Ekim_Kas\\u0131m_Aral\\u0131k\".split(\"_\"),\n        monthsShort: \"Oca_\\u015Eub_Mar_Nis_May_Haz_Tem_A\\u011Fu_Eyl_Eki_Kas_Ara\".split(\"_\"),\n        weekStart: 1,\n        formats: {\n            LT: \"HH:mm\",\n            LTS: \"HH:mm:ss\",\n            L: \"DD.MM.YYYY\",\n            LL: \"D MMMM YYYY\",\n            LLL: \"D MMMM YYYY HH:mm\",\n            LLLL: \"dddd, D MMMM YYYY HH:mm\"\n        },\n        relativeTime: {\n            future: \"%s sonra\",\n            past: \"%s \\xf6nce\",\n            s: \"birka\\xe7 saniye\",\n            m: \"bir dakika\",\n            mm: \"%d dakika\",\n            h: \"bir saat\",\n            hh: \"%d saat\",\n            d: \"bir g\\xfcn\",\n            dd: \"%d g\\xfcn\",\n            M: \"bir ay\",\n            MM: \"%d ay\",\n            y: \"bir y\\u0131l\",\n            yy: \"%d y\\u0131l\"\n        },\n        ordinal: function(a) {\n            return a + \".\";\n        }\n    };\n    return t.default.locale(_, null, !0), _;\n});\n\n\n\nvar $N0o3H = parcelRequire(\"N0o3H\");\nvar $e4b487e979d7c06d$require$Buffer = $N0o3H.Buffer;\nvar $e4b487e979d7c06d$var$__defProp = Object.defineProperty;\nvar $e4b487e979d7c06d$var$__defProps = Object.defineProperties;\nvar $e4b487e979d7c06d$var$__getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar $e4b487e979d7c06d$var$__getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar $e4b487e979d7c06d$var$__hasOwnProp = Object.prototype.hasOwnProperty;\nvar $e4b487e979d7c06d$var$__propIsEnum = Object.prototype.propertyIsEnumerable;\nvar $e4b487e979d7c06d$var$__defNormalProp = (obj, key, value)=>key in obj ? $e4b487e979d7c06d$var$__defProp(obj, key, {\n        enumerable: true,\n        configurable: true,\n        writable: true,\n        value: value\n    }) : obj[key] = value;\nvar $e4b487e979d7c06d$var$__spreadValues = (a2, b2)=>{\n    for(var prop in b2 || (b2 = {}))if ($e4b487e979d7c06d$var$__hasOwnProp.call(b2, prop)) $e4b487e979d7c06d$var$__defNormalProp(a2, prop, b2[prop]);\n    if ($e4b487e979d7c06d$var$__getOwnPropSymbols) {\n        for (var prop of $e4b487e979d7c06d$var$__getOwnPropSymbols(b2))if ($e4b487e979d7c06d$var$__propIsEnum.call(b2, prop)) $e4b487e979d7c06d$var$__defNormalProp(a2, prop, b2[prop]);\n    }\n    return a2;\n};\nvar $e4b487e979d7c06d$var$__spreadProps = (a2, b2)=>$e4b487e979d7c06d$var$__defProps(a2, $e4b487e979d7c06d$var$__getOwnPropDescs(b2));\nvar $e4b487e979d7c06d$var$__objRest = (source, exclude)=>{\n    var target = {};\n    for(var prop in source)if ($e4b487e979d7c06d$var$__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];\n    if (source != null && $e4b487e979d7c06d$var$__getOwnPropSymbols) {\n        for (var prop of $e4b487e979d7c06d$var$__getOwnPropSymbols(source))if (exclude.indexOf(prop) < 0 && $e4b487e979d7c06d$var$__propIsEnum.call(source, prop)) target[prop] = source[prop];\n    }\n    return target;\n};\nvar $e4b487e979d7c06d$var$__publicField = (obj, key, value)=>$e4b487e979d7c06d$var$__defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar $e4b487e979d7c06d$var$__async = (__this, __arguments, generator)=>{\n    return new Promise((resolve, reject)=>{\n        var fulfilled = (value)=>{\n            try {\n                step(generator.next(value));\n            } catch (e2) {\n                reject(e2);\n            }\n        };\n        var rejected = (value)=>{\n            try {\n                step(generator.throw(value));\n            } catch (e2) {\n                reject(e2);\n            }\n        };\n        var step = (x)=>x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n        step((generator = generator.apply(__this, __arguments)).next());\n    });\n};\n/*!\n * ApexCharts v6.10.0\n * (c) 2018-2026 ApexCharts\n */ class $e4b487e979d7c06d$var$Environment {\n    /**\n   * Check if running in server-side rendering environment (Node.js)\n   * @returns {boolean} True if in SSR/Node.js, false if in browser\n   */ static isSSR() {\n        return typeof window === \"undefined\" || typeof document === \"undefined\";\n    }\n    /**\n   * Check if running in browser environment\n   * @returns {boolean} True if in browser, false if in SSR/Node.js\n   */ static isBrowser() {\n        return !this.isSSR();\n    }\n    /**\n   * Check if a specific browser API is available\n   * @param {string} api - Name of the API to check (e.g., 'ResizeObserver')\n   * @returns {boolean} True if API is available\n   */ static hasAPI(api) {\n        if (this.isSSR()) return false;\n        return typeof /** @type {any} */ window[api] !== \"undefined\";\n    }\n    /**\n   * Returns the global Apex config object regardless of environment.\n   * In browser: window.Apex; in SSR/Node.js: global.Apex; fallback: {}.\n   * @returns {any}\n   */ static getApex() {\n        if (typeof window !== \"undefined\" && window.Apex) return window.Apex;\n        if (typeof $parcel$global !== \"undefined\" && $parcel$global.Apex) return $parcel$global.Apex;\n        return {};\n    }\n}\nclass $e4b487e979d7c06d$var$SSRElement {\n    /**\n   * @param {string} nodeName\n   * @param {any} namespaceURI\n   */ constructor(nodeName, namespaceURI = null){\n        this.nodeName = nodeName;\n        this.namespaceURI = namespaceURI;\n        this.attributes = /* @__PURE__ */ new Map();\n        this.children = [];\n        this.textContent = \"\";\n        this.style = {};\n        this.classList = new $e4b487e979d7c06d$var$SSRClassList();\n        this.parentNode = /** @type {SSRElement | null} */ null;\n        this._ssrWidth = void 0;\n        this._ssrHeight = void 0;\n        this._ssrMode = void 0;\n    }\n    /**\n   * @param {string} name\n   * @param {any} value\n   */ setAttribute(name2, value) {\n        this.attributes.set(name2, value);\n    }\n    /**\n   * @param {string} name\n   */ getAttribute(name2) {\n        return this.attributes.get(name2);\n    }\n    /**\n   * @param {string} name\n   */ removeAttribute(name2) {\n        this.attributes.delete(name2);\n    }\n    /**\n   * @param {string} name\n   */ hasAttribute(name2) {\n        return this.attributes.has(name2);\n    }\n    /**\n   * @param {any} child\n   */ appendChild(child) {\n        if (child && child !== this) {\n            if (child.parentNode && child.parentNode !== this) child.parentNode.removeChild(child);\n            else if (child.parentNode === this) {\n                const index = this.children.indexOf(child);\n                if (index !== -1) this.children.splice(index, 1);\n            }\n            child.parentNode = this;\n            this.children.push(child);\n        }\n        return child;\n    }\n    /**\n   * @param {any} child\n   */ removeChild(child) {\n        const index = this.children.indexOf(child);\n        if (index !== -1) {\n            this.children.splice(index, 1);\n            child.parentNode = null;\n        }\n        return child;\n    }\n    /**\n   * @param {any} newNode\n   * @param {any} referenceNode\n   */ insertBefore(newNode, referenceNode) {\n        if (!referenceNode) return this.appendChild(newNode);\n        if (newNode.parentNode && newNode.parentNode !== this) newNode.parentNode.removeChild(newNode);\n        else if (newNode.parentNode === this) {\n            const existingIndex = this.children.indexOf(newNode);\n            if (existingIndex !== -1) this.children.splice(existingIndex, 1);\n        }\n        const index = this.children.indexOf(referenceNode);\n        if (index !== -1) {\n            newNode.parentNode = this;\n            this.children.splice(index, 0, newNode);\n        }\n        return newNode;\n    }\n    cloneNode(deep = false) {\n        const clone = new $e4b487e979d7c06d$var$SSRElement(this.nodeName, this.namespaceURI);\n        clone.textContent = this.textContent;\n        this.attributes.forEach((value, key)=>{\n            clone.attributes.set(key, value);\n        });\n        Object.assign(clone.style, this.style);\n        if (deep) this.children.forEach((child)=>{\n            if (child.cloneNode) clone.appendChild(child.cloneNode(true));\n        });\n        return clone;\n    }\n    getBoundingClientRect() {\n        return {\n            width: this._ssrWidth || 0,\n            height: this._ssrHeight || 0,\n            top: 0,\n            left: 0,\n            right: this._ssrWidth || 0,\n            bottom: this._ssrHeight || 0,\n            x: 0,\n            y: 0\n        };\n    }\n    getRootNode() {\n        let root = this;\n        while(root.parentNode)root = root.parentNode;\n        return root;\n    }\n    querySelector() {\n        return null;\n    }\n    querySelectorAll() {\n        return [];\n    }\n    getElementsByClassName() {\n        return [];\n    }\n    addEventListener() {}\n    removeEventListener() {}\n    get childNodes() {\n        return this.children;\n    }\n    toString() {\n        let attrs = \"\";\n        this.attributes.forEach((value, key)=>{\n            attrs += ` ${key}=\"${value}\"`;\n        });\n        if (this.children.length === 0 && !this.textContent) return `<${this.nodeName}${attrs}/>`;\n        const childrenStr = this.children.map((c2)=>c2.toString()).join(\"\");\n        return `<${this.nodeName}${attrs}>${this.textContent}${childrenStr}</${this.nodeName}>`;\n    }\n    // Property getters/setters\n    get innerHTML() {\n        return this.children.map((c2)=>c2.toString()).join(\"\");\n    }\n    set innerHTML(value) {\n        this.children = [];\n        this.textContent = value;\n    }\n    get outerHTML() {\n        return this.toString();\n    }\n    get isConnected() {\n        return true;\n    }\n}\nclass $e4b487e979d7c06d$var$SSRClassList {\n    constructor(){\n        this.classes = /* @__PURE__ */ new Set();\n    }\n    add(...classNames) {\n        classNames.forEach((name2)=>this.classes.add(name2));\n    }\n    remove(...classNames) {\n        classNames.forEach((name2)=>this.classes.delete(name2));\n    }\n    /**\n   * @param {string} className\n   */ contains(className) {\n        return this.classes.has(className);\n    }\n    /**\n   * @param {string} className\n   * @param {any} force\n   */ toggle(className, force) {\n        if (force === true) {\n            this.classes.add(className);\n            return true;\n        } else if (force === false) {\n            this.classes.delete(className);\n            return false;\n        } else if (this.classes.has(className)) {\n            this.classes.delete(className);\n            return false;\n        } else {\n            this.classes.add(className);\n            return true;\n        }\n    }\n    toString() {\n        return Array.from(this.classes).join(\" \");\n    }\n}\nclass $e4b487e979d7c06d$var$SSRDOMShim {\n    constructor(){\n        this.SVGNS = \"http://www.w3.org/2000/svg\";\n        this.XLINKNS = \"http://www.w3.org/1999/xlink\";\n    }\n    /**\n   * Create SVG element with namespace\n   * @param {string} namespaceURI - Namespace URI\n   * @param {string} qualifiedName - Element tag name\n   * @returns {SSRElement} Mock SVG element\n   */ createElementNS(namespaceURI, qualifiedName) {\n        return new $e4b487e979d7c06d$var$SSRElement(qualifiedName, namespaceURI);\n    }\n    /**\n   * Create text node\n   * @param {string} data - Text content\n   * @returns {object} Text node mock\n   */ createTextNode(data) {\n        const node = {\n            nodeName: \"#text\",\n            nodeType: 3,\n            textContent: data,\n            toString () {\n                return node.textContent;\n            }\n        };\n        return node;\n    }\n    /**\n   * Query selector (returns null in SSR)\n   * @returns {null}\n   */ querySelector() {\n        return null;\n    }\n    /**\n   * Query selector all (returns empty array in SSR)\n   * @returns {any[]}\n   */ querySelectorAll() {\n        return [];\n    }\n    /**\n   * Get computed style (returns empty object in SSR)\n   * @returns {object}\n   */ getComputedStyle() {\n        return {};\n    }\n    /**\n   * Get bounding client rect for element\n   * @param {SSRElement} element - Element to measure\n   * @returns {object} Mock dimensions\n   */ getBoundingClientRect(element) {\n        if (element && element.getBoundingClientRect) return element.getBoundingClientRect();\n        return {\n            width: 0,\n            height: 0,\n            top: 0,\n            left: 0,\n            right: 0,\n            bottom: 0,\n            x: 0,\n            y: 0\n        };\n    }\n    /**\n   * Create mock XMLSerializer for SSR\n   * @returns {object} XMLSerializer mock\n   */ createXMLSerializer() {\n        return {\n            /**\n       * @param {Element} element\n       */ serializeToString (element) {\n                return element.toString ? element.toString() : \"\";\n            }\n        };\n    }\n    /**\n   * Create mock DOMParser for SSR\n   * @returns {object} DOMParser mock\n   */ createDOMParser() {\n        return {\n            /**\n       * @param {string} str\n       * @param {string} _type\n       */ parseFromString (str, _type) {\n                const root = new $e4b487e979d7c06d$var$SSRElement(\"root\");\n                root.innerHTML = str;\n                return {\n                    documentElement: root\n                };\n            }\n        };\n    }\n}\nlet $e4b487e979d7c06d$var$shim = null;\nlet $e4b487e979d7c06d$var$xmlSerializerInstance = null;\nlet $e4b487e979d7c06d$var$domParserInstance = null;\nclass $e4b487e979d7c06d$var$BrowserAPIs {\n    /**\n   * Initialize the SSR shim if in SSR environment\n   * Must be called before using other methods\n   */ static init() {\n        if ($e4b487e979d7c06d$var$Environment.isSSR() && !$e4b487e979d7c06d$var$shim) $e4b487e979d7c06d$var$shim = new $e4b487e979d7c06d$var$SSRDOMShim();\n    }\n    /**\n   * Create an HTML element\n   * @param {string} tagName - Element tag name\n   * @returns {HTMLElement} HTML element\n   */ static createElement(tagName) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) {\n            if (!$e4b487e979d7c06d$var$shim) this.init();\n            return $e4b487e979d7c06d$var$shim.createElementNS(null, tagName);\n        }\n        return document.createElement(tagName);\n    }\n    /**\n   * Create an SVG element with namespace\n   * @param {string} namespaceURI - Namespace URI\n   * @param {string} qualifiedName - Element tag name\n   * @returns {HTMLElement} created element\n   */ static createElementNS(namespaceURI, qualifiedName) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) {\n            if (!$e4b487e979d7c06d$var$shim) this.init();\n            return $e4b487e979d7c06d$var$shim.createElementNS(namespaceURI, qualifiedName);\n        }\n        return /** @type {HTMLElement} */ document.createElementNS(namespaceURI, qualifiedName);\n    }\n    /**\n   * Create a text node\n   * @param {string} data - Text content\n   * @returns {Text|object} Text node\n   */ static createTextNode(data) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) {\n            if (!$e4b487e979d7c06d$var$shim) this.init();\n            return $e4b487e979d7c06d$var$shim.createTextNode(data);\n        }\n        return document.createTextNode(data);\n    }\n    /**\n   * Query selector\n   * @param {string} selector - CSS selector\n   * @returns {Element|null}\n   */ static querySelector(selector) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return null;\n        return document.querySelector(selector);\n    }\n    /**\n   * Query selector all\n   * @param {string} selector - CSS selector\n   * @returns {NodeList|any[]}\n   */ static querySelectorAll(selector) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return [];\n        return document.querySelectorAll(selector);\n    }\n    /**\n   * Get computed style for an element\n   * @param {Element} element - Element to get styles for\n   * @returns {CSSStyleDeclaration|object}\n   */ static getComputedStyle(element) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return {};\n        return window.getComputedStyle(element);\n    }\n    /**\n   * Evaluate a media query. Returns the live MediaQueryList in a browser (so\n   * callers can attach a `change` listener) or null under SSR / when\n   * unsupported. Facet (#13) uses this for `theme.follow: 'os'`.\n   * @param {string} query\n   * @returns {MediaQueryList|null}\n   */ static matchMedia(query) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR() || typeof window.matchMedia !== \"function\") return null;\n        try {\n            return window.matchMedia(query);\n        } catch (e2) {\n            return null;\n        }\n    }\n    /**\n   * Get bounding client rect for an element\n   * @param {Element} element - Element to measure\n   * @returns {DOMRect|object}\n   */ static getBoundingClientRect(element) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) {\n            if (!$e4b487e979d7c06d$var$shim) this.init();\n            return $e4b487e979d7c06d$var$shim.getBoundingClientRect(element);\n        }\n        return element ? element.getBoundingClientRect() : {\n            width: 0,\n            height: 0,\n            top: 0,\n            left: 0,\n            right: 0,\n            bottom: 0,\n            x: 0,\n            y: 0\n        };\n    }\n    /**\n   * Get XMLSerializer instance\n   * @returns {XMLSerializer|object}\n   */ static getXMLSerializer() {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) {\n            if (!$e4b487e979d7c06d$var$shim) this.init();\n            if (!$e4b487e979d7c06d$var$xmlSerializerInstance) $e4b487e979d7c06d$var$xmlSerializerInstance = $e4b487e979d7c06d$var$shim.createXMLSerializer();\n            return $e4b487e979d7c06d$var$xmlSerializerInstance;\n        }\n        if (!$e4b487e979d7c06d$var$xmlSerializerInstance) $e4b487e979d7c06d$var$xmlSerializerInstance = new XMLSerializer();\n        return $e4b487e979d7c06d$var$xmlSerializerInstance;\n    }\n    /**\n   * Get DOMParser instance\n   * @returns {DOMParser|object}\n   */ static getDOMParser() {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) {\n            if (!$e4b487e979d7c06d$var$shim) this.init();\n            if (!$e4b487e979d7c06d$var$domParserInstance) $e4b487e979d7c06d$var$domParserInstance = $e4b487e979d7c06d$var$shim.createDOMParser();\n            return $e4b487e979d7c06d$var$domParserInstance;\n        }\n        if (!$e4b487e979d7c06d$var$domParserInstance) $e4b487e979d7c06d$var$domParserInstance = new DOMParser();\n        return $e4b487e979d7c06d$var$domParserInstance;\n    }\n    /**\n   * Add event listener to window\n   * @param {string} event - Event name\n   * @param {EventListenerOrEventListenerObject} handler - Event handler\n   * @param {object} options - Event options\n   */ static addWindowEventListener(event, handler, options2) {\n        if ($e4b487e979d7c06d$var$Environment.isBrowser()) window.addEventListener(event, handler, options2);\n    }\n    /**\n   * Remove event listener from window\n   * @param {string} event - Event name\n   * @param {EventListenerOrEventListenerObject} handler - Event handler\n   * @param {object} options - Event options\n   */ static removeWindowEventListener(event, handler, options2) {\n        if ($e4b487e979d7c06d$var$Environment.isBrowser()) window.removeEventListener(event, handler, options2);\n    }\n    /**\n   * Request animation frame\n   * @param {FrameRequestCallback} callback - Callback function\n   * @returns {number|null}\n   */ static requestAnimationFrame(callback) {\n        if ($e4b487e979d7c06d$var$Environment.isBrowser()) return window.requestAnimationFrame(callback);\n        callback(0);\n        return null;\n    }\n    /**\n   * Cancel animation frame\n   * @param {number} id - Animation frame ID\n   */ static cancelAnimationFrame(id) {\n        if ($e4b487e979d7c06d$var$Environment.isBrowser() && id) window.cancelAnimationFrame(id);\n    }\n    /**\n   * Check if element exists\n   * @param {Element} element - Element to check\n   * @returns {boolean}\n   */ static elementExists(element) {\n        if (!element) return false;\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return element._ssrMode === true || element.nodeName !== void 0;\n        return element.getRootNode ? element.getRootNode({\n            composed: true\n        }) === document || element.isConnected : false;\n    }\n    /**\n   * Get window object (or null in SSR)\n   * @returns {Window|null}\n   */ static getWindow() {\n        return $e4b487e979d7c06d$var$Environment.isBrowser() ? window : null;\n    }\n    /**\n   * Get document object (or null in SSR)\n   * @returns {Document|null}\n   */ static getDocument() {\n        return $e4b487e979d7c06d$var$Environment.isBrowser() ? document : null;\n    }\n    /**\n   * Get the shim instance (for testing purposes)\n   * @returns {SSRDOMShim|null}\n   */ static _getShim() {\n        return $e4b487e979d7c06d$var$shim;\n    }\n    /**\n   * Reset the shim instance (for testing purposes)\n   */ static _resetShim() {\n        $e4b487e979d7c06d$var$shim = null;\n        $e4b487e979d7c06d$var$xmlSerializerInstance = null;\n        $e4b487e979d7c06d$var$domParserInstance = null;\n    }\n}\nconst $e4b487e979d7c06d$var$fnIds = /* @__PURE__ */ new WeakMap();\nlet $e4b487e979d7c06d$var$fnSeq = 0;\nlet $e4b487e979d7c06d$var$Utils$1 = class Utils {\n    /**\n   * @param {*} item\n   */ static isObject(item) {\n        return item && typeof item === \"object\" && !Array.isArray(item);\n    }\n    // Type checking that works across different window objects\n    /**\n   * @param {string} type\n   * @param {string} val\n   */ static is(type, val) {\n        return Object.prototype.toString.call(val) === \"[object \" + type + \"]\";\n    }\n    static isSafari() {\n        return $e4b487e979d7c06d$var$Environment.isBrowser() && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n    }\n    // to extend defaults with user options\n    // credit: http://stackoverflow.com/questions/27936772/deep-object-merging-in-es6-es7#answer-34749873\n    /**\n   * @param {any} target\n   * @param {any} source\n   */ static extend(target, source) {\n        if (!this.isObject(target) && this.isObject(source)) return this.clone(source);\n        const output = Object.assign({}, target);\n        if (this.isObject(target) && this.isObject(source)) Object.keys(source).forEach((key)=>{\n            if (this.isObject(source[key])) {\n                if (!(key in target)) Object.assign(output, {\n                    [key]: source[key]\n                });\n                else output[key] = this.extend(target[key], source[key]);\n            } else Object.assign(output, {\n                [key]: source[key]\n            });\n        });\n        return output;\n    }\n    /**\n   * @param {any[]} arrToExtend\n   * @param {any} resultArr\n   */ static extendArray(arrToExtend, resultArr) {\n        const extendedArr = [];\n        arrToExtend.map((item)=>{\n            extendedArr.push(Utils.extend(resultArr, item));\n        });\n        arrToExtend = extendedArr;\n        return arrToExtend;\n    }\n    // If month counter exceeds 12, it starts again from 1\n    /**\n   * @param {number} month\n   */ static monthMod(month) {\n        return month % 12;\n    }\n    /**\n   * clone object with optional shallow copy for performance\n   * @param {*} source - Source object to clone\n   * @param {WeakMap<any, any>} visited - Circular reference tracker\n   * @param {boolean} shallow - If true, performs shallow copy (default: false)\n   * @returns {*} Cloned object\n   */ static clone(source, visited = /* @__PURE__ */ new WeakMap(), shallow = false) {\n        if (source === null || typeof source !== \"object\") return source;\n        if (visited.has(source)) return visited.get(source);\n        let cloneResult;\n        if (Array.isArray(source)) {\n            if (shallow) cloneResult = source.slice();\n            else {\n                cloneResult = [];\n                visited.set(source, cloneResult);\n                for(let i2 = 0; i2 < source.length; i2++)cloneResult[i2] = this.clone(source[i2], visited, false);\n            }\n        } else if (source instanceof Date) cloneResult = new Date(source.getTime());\n        else if (shallow) cloneResult = Object.assign({}, source);\n        else {\n            cloneResult = {};\n            visited.set(source, cloneResult);\n            for(const prop in source)if (Object.prototype.hasOwnProperty.call(source, prop)) cloneResult[prop] = this.clone(/** @type {Record<string,any>} */ source[prop], visited, false);\n        }\n        return cloneResult;\n    }\n    /**\n   * Shallow clone for performance when deep clone isn't needed\n   * @param {*} source - Source to clone\n   * @returns {*} Shallow cloned object\n   */ static shallowClone(source) {\n        if (source === null || typeof source !== \"object\") return source;\n        if (Array.isArray(source)) return source.slice();\n        return Object.assign({}, source);\n    }\n    /**\n   * Serialize options for an equality check, with functions included.\n   *\n   * `JSON.stringify` DROPS function values, so two configs differing only in a\n   * callback stringify identically. The update path used that comparison to skip\n   * redundant renders, which silently swallowed any update that changed only a\n   * function: a new `plotOptions.unit.positions` (a whole layout), a new\n   * `dataLabels.formatter`, a new custom tooltip.\n   *\n   * Functions are compared BY IDENTITY: the same function twice still compares\n   * equal (so the skip keeps working), a different one does not. A caller who\n   * passes a fresh closure on every update gets a render every time, which is\n   * the safe direction to err in - the closure may capture new state.\n   *\n   * @param {any} options\n   * @returns {string}\n   */ static stringifyForCompare(options2) {\n        return JSON.stringify(options2, (_key, value)=>{\n            if (typeof value !== \"function\") return value;\n            let id = $e4b487e979d7c06d$var$fnIds.get(value);\n            if (id === void 0) {\n                id = ++$e4b487e979d7c06d$var$fnSeq;\n                $e4b487e979d7c06d$var$fnIds.set(value, id);\n            }\n            return `__apx_fn_${id}`;\n        });\n    }\n    /**\n   * Fast shallow equality check for objects\n   * @param {Object} obj1 - First object\n   * @param {Object} obj2 - Second object\n   * @returns {boolean} True if shallowly equal\n   */ static shallowEqual(obj1, obj2) {\n        if (obj1 === obj2) return true;\n        if (!obj1 || !obj2) return false;\n        if (typeof obj1 !== \"object\" || typeof obj2 !== \"object\") return obj1 === obj2;\n        const keys1 = Object.keys(obj1);\n        const keys2 = Object.keys(obj2);\n        if (keys1.length !== keys2.length) return false;\n        for (const key of keys1){\n            if (/** @type {Record<string,any>} */ obj1[key] !== /** @type {Record<string,any>} */ obj2[key]) return false;\n        }\n        return true;\n    }\n    /**\n   * @param {number} x\n   */ static log10(x) {\n        return Math.log(x) / Math.LN10;\n    }\n    /**\n   * @param {number} x\n   */ static roundToBase10(x) {\n        return Math.pow(10, Math.floor(Math.log10(x)));\n    }\n    /**\n   * @param {number} x\n   * @param {number} base\n   */ static roundToBase(x, base) {\n        return Math.pow(base, Math.floor(Math.log(x) / Math.log(base)));\n    }\n    /**\n   * @param {any} val\n   */ static parseNumber(val) {\n        if (typeof val === \"number\" || val === null) return val;\n        return parseFloat(val);\n    }\n    /**\n   * @param {number} num\n   */ static stripNumber(num, precision = 2) {\n        return Number.isInteger(num) ? num : parseFloat(num.toPrecision(precision));\n    }\n    static randomId() {\n        return (Math.random() + 1).toString(36).substring(4);\n    }\n    /**\n   * @param {number} num\n   */ static noExponents(num) {\n        if (num.toString().includes(\"e\")) return Math.round(num);\n        return num;\n    }\n    /**\n   * @param {any} element\n   */ static elementExists(element) {\n        if (!element || !element.isConnected) return false;\n        return true;\n    }\n    /**\n   * @param {any} el\n   */ static getDimensions(el) {\n        if (!el) return [\n            0,\n            0\n        ];\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return [\n            el._ssrWidth || 400,\n            el._ssrHeight || 300\n        ];\n        let computedStyle;\n        try {\n            computedStyle = getComputedStyle(el, null);\n        } catch (e2) {\n            return [\n                el.clientWidth || 0,\n                el.clientHeight || 0\n            ];\n        }\n        let elementWidth = el.clientWidth;\n        let elementHeight = el.clientHeight;\n        if (!elementWidth || !elementHeight) {\n            const rect = el.getBoundingClientRect();\n            elementWidth = elementWidth || rect.width;\n            elementHeight = elementHeight || rect.height;\n        }\n        elementHeight -= parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom);\n        elementWidth -= parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight);\n        return [\n            elementWidth,\n            elementHeight\n        ];\n    }\n    /**\n   * @returns {any}\n   * @param {any} element\n   */ static getBoundingClientRect(element) {\n        if (!element) return {\n            top: 0,\n            right: 0,\n            bottom: 0,\n            left: 0,\n            width: 0,\n            height: 0,\n            x: 0,\n            y: 0\n        };\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return $e4b487e979d7c06d$var$BrowserAPIs.getBoundingClientRect(element);\n        const rect = element.getBoundingClientRect();\n        return {\n            top: rect.top,\n            right: rect.right,\n            bottom: rect.bottom,\n            left: rect.left,\n            width: element.clientWidth,\n            height: element.clientHeight,\n            x: rect.left,\n            y: rect.top\n        };\n    }\n    /**\n   * @param {any[]} arr\n   */ static getLargestStringFromArr(arr) {\n        return arr.reduce((a2, b2)=>{\n            if (Array.isArray(b2)) b2 = b2.reduce((aa, bb)=>aa.length > bb.length ? aa : bb);\n            return a2.length > b2.length ? a2 : b2;\n        }, 0);\n    }\n    // http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb#answer-12342275\n    static hexToRgba(hex = \"#999999\", opacity = 0.6) {\n        if (hex.substring(0, 1) !== \"#\") hex = \"#999999\";\n        const hexStr = hex.replace(\"#\", \"\");\n        const h2 = hexStr.match(new RegExp(\"(.{\" + hexStr.length / 3 + \"})\", \"g\")) || [];\n        for(let i2 = 0; i2 < h2.length; i2++)h2[i2] = parseInt(h2[i2].length === 1 ? h2[i2] + h2[i2] : h2[i2], 16);\n        if (typeof opacity !== \"undefined\") h2.push(opacity);\n        return \"rgba(\" + h2.join(\",\") + \")\";\n    }\n    /**\n   * @param {string} rgba\n   */ static getOpacityFromRGBA(rgba) {\n        return parseFloat(rgba.replace(/^.*,(.+)\\)/, \"$1\"));\n    }\n    /**\n   * Parse a #RGB or #RRGGBB hex colour string into [r,g,b] in 0–255.\n   * Returns null for invalid input. Used by getContrastRatio.\n   * @param {string} hex\n   * @returns {[number, number, number] | null}\n   */ static parseHex(hex) {\n        if (typeof hex !== \"string\") return null;\n        let h2 = hex.trim().replace(\"#\", \"\");\n        if (h2.length === 3) h2 = h2.split(\"\").map((c2)=>c2 + c2).join(\"\");\n        if (!/^[0-9a-fA-F]{6}$/.test(h2)) return null;\n        return [\n            parseInt(h2.slice(0, 2), 16),\n            parseInt(h2.slice(2, 4), 16),\n            parseInt(h2.slice(4, 6), 16)\n        ];\n    }\n    /**\n   * Relative luminance per WCAG 2.x (https://www.w3.org/TR/WCAG22/#dfn-relative-luminance).\n   * @param {[number, number, number]} rgb 0–255 sRGB triplet\n   * @returns {number} 0.0–1.0\n   */ static relativeLuminance([r2, g2, b2]) {\n        const channel = (c2)=>{\n            const v2 = c2 / 255;\n            return v2 <= 0.03928 ? v2 / 12.92 : Math.pow((v2 + 0.055) / 1.055, 2.4);\n        };\n        return 0.2126 * channel(r2) + 0.7152 * channel(g2) + 0.0722 * channel(b2);\n    }\n    /**\n   * WCAG contrast ratio between two hex colours. Returns 0 for invalid input.\n   * Range: 1 (identical) … 21 (#000 vs #fff).\n   * WCAG AA requires ≥ 4.5 for normal text and ≥ 3.0 for large text / UI components.\n   * @param {string} hex1\n   * @param {string} hex2\n   * @returns {number}\n   */ static getContrastRatio(hex1, hex2) {\n        const rgb1 = Utils.parseHex(hex1);\n        const rgb2 = Utils.parseHex(hex2);\n        if (!rgb1 || !rgb2) return 0;\n        const l1 = Utils.relativeLuminance(rgb1);\n        const l2 = Utils.relativeLuminance(rgb2);\n        const lighter = Math.max(l1, l2);\n        const darker = Math.min(l1, l2);\n        return (lighter + 0.05) / (darker + 0.05);\n    }\n    /**\n   * @param {any} rgb\n   */ static rgb2hex(rgb) {\n        rgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n        return rgb && rgb.length === 4 ? \"#\" + (\"0\" + parseInt(rgb[1], 10).toString(16)).slice(-2) + (\"0\" + parseInt(rgb[2], 10).toString(16)).slice(-2) + (\"0\" + parseInt(rgb[3], 10).toString(16)).slice(-2) : \"\";\n    }\n    /**\n   * @param {number} percent\n   * @param {string} color\n   */ shadeRGBColor(percent, color) {\n        const f = color.split(\",\"), t2 = percent < 0 ? 0 : 255, p2 = percent < 0 ? percent * -1 : percent, R = parseInt(f[0].slice(4), 10), G2 = parseInt(f[1], 10), B = parseInt(f[2], 10);\n        return \"rgb(\" + (Math.round((t2 - R) * p2) + R) + \",\" + (Math.round((t2 - G2) * p2) + G2) + \",\" + (Math.round((t2 - B) * p2) + B) + \")\";\n    }\n    /**\n   * @param {number} percent\n   * @param {string} color\n   */ shadeHexColor(percent, color) {\n        const f = parseInt(color.slice(1), 16), t2 = percent < 0 ? 0 : 255, p2 = percent < 0 ? percent * -1 : percent, R = f >> 16, G2 = f >> 8 & 255, B = f & 255;\n        return \"#\" + (16777216 + (Math.round((t2 - R) * p2) + R) * 65536 + (Math.round((t2 - G2) * p2) + G2) * 256 + (Math.round((t2 - B) * p2) + B)).toString(16).slice(1);\n    }\n    // beautiful color shading blending code\n    // http://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors\n    /**\n   * @param {number} p\n   * @param {string} color\n   */ shadeColor(p2, color) {\n        if (Utils.isColorHex(color)) return this.shadeHexColor(p2, color);\n        else return this.shadeRGBColor(p2, color);\n    }\n    /**\n   * @param {string} color\n   */ static isColorHex(color) {\n        return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(color);\n    }\n    /**\n   * @param {string} color\n   */ static isCSSVariable(color) {\n        if (typeof color !== \"string\") return false;\n        const value = color.trim();\n        return value.startsWith(\"var(\") && value.endsWith(\")\");\n    }\n    /**\n   * @param {string} color\n   */ static getThemeColor(color) {\n        if (!Utils.isCSSVariable(color)) return color;\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return color;\n        const tempElem = document.createElement(\"div\");\n        tempElem.style.cssText = \"position:fixed; left: -9999px; visibility:hidden;\";\n        tempElem.style.color = color;\n        document.body.appendChild(tempElem);\n        let computedColor;\n        try {\n            computedColor = window.getComputedStyle(tempElem).color;\n        } finally{\n            if (tempElem.parentNode) tempElem.parentNode.removeChild(tempElem);\n        }\n        return computedColor;\n    }\n    /**\n   * @param {string} color\n   * @param {number} opacity\n   */ static applyOpacityToColor(color, opacity) {\n        const value = Number(opacity);\n        if (!Number.isFinite(value)) return color;\n        if (value <= 0) return \"transparent\";\n        if (value >= 1) return color;\n        const percent = Math.round(value * 100);\n        return `color-mix(in srgb, ${color} ${percent}%, transparent)`;\n    }\n    /**\n   * @param {number} size\n   * @param {number} dataPointsLen\n   */ static getPolygonPos(size, dataPointsLen) {\n        const dotsArray = [];\n        const angle = Math.PI * 2 / dataPointsLen;\n        for(let i2 = 0; i2 < dataPointsLen; i2++){\n            const curPos = {};\n            curPos.x = size * Math.sin(i2 * angle);\n            curPos.y = -size * Math.cos(i2 * angle);\n            dotsArray.push(curPos);\n        }\n        return dotsArray;\n    }\n    /**\n   * @param {number} centerX\n   * @param {number} centerY\n   * @param {number} radius\n   * @param {number} angleInDegrees\n   */ static polarToCartesian(centerX, centerY, radius, angleInDegrees) {\n        const angleInRadians = (angleInDegrees - 90) * Math.PI / 180;\n        return {\n            x: centerX + radius * Math.cos(angleInRadians),\n            y: centerY + radius * Math.sin(angleInRadians)\n        };\n    }\n    /**\n   * @param {string} str\n   */ static escapeString(str, escapeWith = \"x\") {\n        let newStr = str.toString().slice();\n        newStr = newStr.replace(/[` ~!@#$%^&*()|+=?;:'\",.<>{}[\\]\\\\/]/gi, escapeWith);\n        return newStr;\n    }\n    /**\n   * @param {number} val\n   */ static negToZero(val) {\n        return val < 0 ? 0 : val;\n    }\n    /**\n   * @param {any[]} arr\n   * @param {number} old_index\n   * @param {number} new_index\n   */ static moveIndexInArray(arr, old_index, new_index) {\n        if (new_index >= arr.length) {\n            let k = new_index - arr.length + 1;\n            while(k--)arr.push(void 0);\n        }\n        arr.splice(new_index, 0, arr.splice(old_index, 1)[0]);\n        return arr;\n    }\n    /**\n   * @param {string} s\n   */ static extractNumber(s2) {\n        return parseFloat(s2.replace(/[^\\d.]*/g, \"\"));\n    }\n    /**\n   * @param {any} el\n   * @param {string} cls\n   */ static findAncestor(el, cls) {\n        while((el = el.parentElement) && !el.classList.contains(cls));\n        return el;\n    }\n    /**\n   * @param {any} el\n   * @param {Record<string, any>} styles\n   */ static setELstyles(el, styles) {\n        for(const key in styles)if (Object.prototype.hasOwnProperty.call(styles, key)) el.style[key] = styles[key];\n    }\n    // prevents JS prevision errors when adding\n    /**\n   * @param {number} a\n   * @param {number} b\n   */ static preciseAddition(a2, b2) {\n        const aDecimals = (String(a2).split(\".\")[1] || \"\").length;\n        const bDecimals = (String(b2).split(\".\")[1] || \"\").length;\n        const factor = Math.pow(10, Math.max(aDecimals, bDecimals));\n        return (Math.round(a2 * factor) + Math.round(b2 * factor)) / factor;\n    }\n    /**\n   * @param {any} value\n   */ static isNumber(value) {\n        return !isNaN(value) && parseFloat(String(Number(value))) === value && !isNaN(parseInt(value, 10));\n    }\n    /**\n   * @param {number} n\n   */ static isFloat(n2) {\n        return Number(n2) === n2 && n2 % 1 !== 0;\n    }\n    static isMsEdge() {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return false;\n        const ua = window.navigator.userAgent;\n        const edge = ua.indexOf(\"Edge/\");\n        if (edge > 0) return parseInt(ua.substring(edge + 5, ua.indexOf(\".\", edge)), 10);\n        return false;\n    }\n    //\n    // Find the Greatest Common Divisor of two numbers\n    //\n    /**\n   * @param {number} a\n   * @param {number} b\n   */ static getGCD(a2, b2, p2 = 7) {\n        let factor = Math.pow(10, p2 - Math.floor(Math.log10(Math.max(a2, b2))));\n        if (factor > 1) {\n            a2 = Math.round(Math.abs(a2) * factor);\n            b2 = Math.round(Math.abs(b2) * factor);\n        } else factor = 1;\n        while(b2){\n            const t2 = b2;\n            b2 = a2 % b2;\n            a2 = t2;\n        }\n        return a2 / factor;\n    }\n    /**\n   * @param {number} n\n   */ static getPrimeFactors(n2) {\n        const factors = [];\n        let divisor = 2;\n        while(n2 >= 2)if (n2 % divisor == 0) {\n            factors.push(divisor);\n            n2 = n2 / divisor;\n        } else divisor++;\n        return factors;\n    }\n    /**\n   * @param {number} a\n   * @param {number} b\n   */ static mod(a2, b2, p2 = 7) {\n        const big = Math.pow(10, p2 - Math.floor(Math.log10(Math.max(a2, b2))));\n        a2 = Math.round(Math.abs(a2) * big);\n        b2 = Math.round(Math.abs(b2) * big);\n        return a2 % b2 / big;\n    }\n};\nclass $e4b487e979d7c06d$var$DateTime {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n        this.months31 = [\n            1,\n            3,\n            5,\n            7,\n            8,\n            10,\n            12\n        ];\n        this.months30 = [\n            2,\n            4,\n            6,\n            9,\n            11\n        ];\n        this.daysCntOfYear = [\n            0,\n            31,\n            59,\n            90,\n            120,\n            151,\n            181,\n            212,\n            243,\n            273,\n            304,\n            334\n        ];\n    }\n    /**\n   * @param {any} date\n   */ isValidDate(date) {\n        if (typeof date === \"number\") return false;\n        return !isNaN(this.parseDate(date));\n    }\n    /**\n   * @param {any} dateStr\n   */ getTimeStamp(dateStr) {\n        if (isNaN(Date.parse(dateStr))) return dateStr;\n        const utc = this.w.config.xaxis.labels.datetimeUTC;\n        return !utc ? new Date(dateStr).getTime() : new Date(new Date(dateStr).toISOString().substr(0, 25)).getTime();\n    }\n    /**\n   * @param {any} timestamp\n   */ getDate(timestamp) {\n        const utc = this.w.config.xaxis.labels.datetimeUTC;\n        return utc ? new Date(new Date(timestamp).toUTCString()) : new Date(timestamp);\n    }\n    /**\n   * @param {string} dateStr\n   */ parseDate(dateStr) {\n        const parsed = Date.parse(dateStr);\n        if (!isNaN(parsed)) return this.getTimeStamp(dateStr);\n        let output = Date.parse(dateStr.replace(/-/g, \"/\").replace(/[a-z]+/gi, \" \"));\n        output = this.getTimeStamp(output);\n        return output;\n    }\n    // This fixes the difference of x-axis labels between chrome/safari\n    // Fixes #1726, #1544, #1485, #1255\n    /**\n   * @param {string} dateStr\n   */ parseDateWithTimezone(dateStr) {\n        return Date.parse(dateStr.replace(/-/g, \"/\").replace(/[a-z]+/gi, \" \"));\n    }\n    // http://stackoverflow.com/questions/14638018/current-time-formatting-with-javascript#answer-14638191\n    /**\n   * @param {Date} date\n   * @param {string} format\n   */ formatDate(date, format) {\n        const locale = this.w.globals.locale;\n        const utc = this.w.config.xaxis.labels.datetimeUTC;\n        const MMMM = [\n            \"\\0\",\n            ...locale.months\n        ];\n        const MMM = [\n            \"\u0001\",\n            ...locale.shortMonths\n        ];\n        const dddd = [\n            \"\u0002\",\n            ...locale.days\n        ];\n        const ddd = [\n            \"\u0003\",\n            ...locale.shortDays\n        ];\n        function ii(i2, len = 2) {\n            let s3 = i2 + \"\";\n            while(s3.length < len)s3 = \"0\" + s3;\n            return s3;\n        }\n        const y = utc ? date.getUTCFullYear() : date.getFullYear();\n        format = format.replace(/(^|[^\\\\])yyyy+/g, \"$1\" + y);\n        format = format.replace(/(^|[^\\\\])yy/g, \"$1\" + y.toString().substr(2, 2));\n        format = format.replace(/(^|[^\\\\])y/g, \"$1\" + y);\n        const M2 = (utc ? date.getUTCMonth() : date.getMonth()) + 1;\n        format = format.replace(/(^|[^\\\\])MMMM+/g, \"$1\" + MMMM[0]);\n        format = format.replace(/(^|[^\\\\])MMM/g, \"$1\" + MMM[0]);\n        format = format.replace(/(^|[^\\\\])MM/g, \"$1\" + ii(M2));\n        format = format.replace(/(^|[^\\\\])M/g, \"$1\" + M2);\n        const d = utc ? date.getUTCDate() : date.getDate();\n        format = format.replace(/(^|[^\\\\])dddd+/g, \"$1\" + dddd[0]);\n        format = format.replace(/(^|[^\\\\])ddd/g, \"$1\" + ddd[0]);\n        format = format.replace(/(^|[^\\\\])dd/g, \"$1\" + ii(d));\n        format = format.replace(/(^|[^\\\\])d/g, \"$1\" + d);\n        const H = utc ? date.getUTCHours() : date.getHours();\n        format = format.replace(/(^|[^\\\\])HH+/g, \"$1\" + ii(H));\n        format = format.replace(/(^|[^\\\\])H/g, \"$1\" + H);\n        const h2 = H > 12 ? H - 12 : H === 0 ? 12 : H;\n        format = format.replace(/(^|[^\\\\])hh+/g, \"$1\" + ii(h2));\n        format = format.replace(/(^|[^\\\\])h/g, \"$1\" + h2);\n        const m2 = utc ? date.getUTCMinutes() : date.getMinutes();\n        format = format.replace(/(^|[^\\\\])mm+/g, \"$1\" + ii(m2));\n        format = format.replace(/(^|[^\\\\])m/g, \"$1\" + m2);\n        const s2 = utc ? date.getUTCSeconds() : date.getSeconds();\n        format = format.replace(/(^|[^\\\\])ss+/g, \"$1\" + ii(s2));\n        format = format.replace(/(^|[^\\\\])s/g, \"$1\" + s2);\n        let f = utc ? date.getUTCMilliseconds() : date.getMilliseconds();\n        format = format.replace(/(^|[^\\\\])fff+/g, \"$1\" + ii(f, 3));\n        f = Math.round(f / 10);\n        format = format.replace(/(^|[^\\\\])ff/g, \"$1\" + ii(f));\n        f = Math.round(f / 10);\n        format = format.replace(/(^|[^\\\\])f/g, \"$1\" + f);\n        const T = H < 12 ? \"AM\" : \"PM\";\n        format = format.replace(/(^|[^\\\\])TT+/g, \"$1\" + T);\n        format = format.replace(/(^|[^\\\\])T/g, \"$1\" + T.charAt(0));\n        const t2 = T.toLowerCase();\n        format = format.replace(/(^|[^\\\\])tt+/g, \"$1\" + t2);\n        format = format.replace(/(^|[^\\\\])t/g, \"$1\" + t2.charAt(0));\n        let tz = -date.getTimezoneOffset();\n        let K = utc || !tz ? \"Z\" : tz > 0 ? \"+\" : \"-\";\n        if (!utc) {\n            tz = Math.abs(tz);\n            const tzHrs = Math.floor(tz / 60);\n            const tzMin = tz % 60;\n            K += ii(tzHrs) + \":\" + ii(tzMin);\n        }\n        format = format.replace(/(^|[^\\\\])K/g, \"$1\" + K);\n        const day = (utc ? date.getUTCDay() : date.getDay()) + 1;\n        format = format.replace(new RegExp(dddd[0], \"g\"), dddd[day]);\n        format = format.replace(new RegExp(ddd[0], \"g\"), ddd[day]);\n        format = format.replace(new RegExp(MMMM[0], \"g\"), MMMM[M2]);\n        format = format.replace(new RegExp(MMM[0], \"g\"), MMM[M2]);\n        format = format.replace(/\\\\(.)/g, \"$1\");\n        return format;\n    }\n    /**\n   * @param {number} minX\n   * @param {number} maxX\n   */ getTimeUnitsfromTimestamp(minX, maxX) {\n        const w2 = this.w;\n        if (w2.config.xaxis.min !== void 0) minX = w2.config.xaxis.min;\n        if (w2.config.xaxis.max !== void 0) maxX = w2.config.xaxis.max;\n        const tsMin = this.getDate(minX);\n        const tsMax = this.getDate(maxX);\n        const minD = this.formatDate(tsMin, \"yyyy MM dd HH mm ss fff\").split(\" \");\n        const maxD = this.formatDate(tsMax, \"yyyy MM dd HH mm ss fff\").split(\" \");\n        return {\n            minMillisecond: parseInt(minD[6], 10),\n            maxMillisecond: parseInt(maxD[6], 10),\n            minSecond: parseInt(minD[5], 10),\n            maxSecond: parseInt(maxD[5], 10),\n            minMinute: parseInt(minD[4], 10),\n            maxMinute: parseInt(maxD[4], 10),\n            minHour: parseInt(minD[3], 10),\n            maxHour: parseInt(maxD[3], 10),\n            minDate: parseInt(minD[2], 10),\n            maxDate: parseInt(maxD[2], 10),\n            minMonth: parseInt(minD[1], 10) - 1,\n            maxMonth: parseInt(maxD[1], 10) - 1,\n            minYear: parseInt(minD[0], 10),\n            maxYear: parseInt(maxD[0], 10)\n        };\n    }\n    /**\n   * @param {number} year\n   */ isLeapYear(year) {\n        return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n    }\n    /**\n   * @param {number} month\n   * @param {number} year\n   * @param {number} subtract\n   */ calculcateLastDaysOfMonth(month, year, subtract) {\n        const days = this.determineDaysOfMonths(month, year);\n        return days - subtract;\n    }\n    /**\n   * @param {number} year\n   */ determineDaysOfYear(year) {\n        let days = 365;\n        if (this.isLeapYear(year)) days = 366;\n        return days;\n    }\n    /**\n   * @param {number} year\n   * @param {number} month\n   * @param {number} date\n   */ determineRemainingDaysOfYear(year, month, date) {\n        let dayOfYear = this.daysCntOfYear[month] + date;\n        if (month > 1 && this.isLeapYear(year)) dayOfYear++;\n        return dayOfYear;\n    }\n    /**\n   * @param {number} month\n   * @param {number} year\n   */ determineDaysOfMonths(month, year) {\n        let days = 30;\n        month = $e4b487e979d7c06d$var$Utils$1.monthMod(month);\n        switch(true){\n            case this.months30.indexOf(month) > -1:\n                if (month === 2) {\n                    if (this.isLeapYear(year)) days = 29;\n                    else days = 28;\n                }\n                break;\n            case this.months31.indexOf(month) > -1:\n                days = 31;\n                break;\n            default:\n                days = 31;\n                break;\n        }\n        return days;\n    }\n    // ───────────────────────────────────────────────────────────────────────────\n    // Pure date helpers used by the v6 single-interval TimeScale.\n    // Native Date setters/getters do all rollover work (leap years, month\n    // length, year crossings), eliminating the manual rollover code that was\n    // the source of the historical TimeScale boundary bugs.\n    // ───────────────────────────────────────────────────────────────────────────\n    /**\n   * Extract calendar fields from a timestamp. Month is 0-indexed (matches\n   * Date.getMonth / getUTCMonth).\n   *\n   * @param {number} timestamp\n   * @param {boolean} isUTC\n   * @returns {{ year: number, month: number, date: number, hour: number, minute: number, second: number, ms: number, weekday: number }}\n   */ getDateFields(timestamp, isUTC) {\n        const d = new Date(timestamp);\n        return isUTC ? {\n            year: d.getUTCFullYear(),\n            month: d.getUTCMonth(),\n            date: d.getUTCDate(),\n            hour: d.getUTCHours(),\n            minute: d.getUTCMinutes(),\n            second: d.getUTCSeconds(),\n            ms: d.getUTCMilliseconds(),\n            weekday: d.getUTCDay()\n        } : {\n            year: d.getFullYear(),\n            month: d.getMonth(),\n            date: d.getDate(),\n            hour: d.getHours(),\n            minute: d.getMinutes(),\n            second: d.getSeconds(),\n            ms: d.getMilliseconds(),\n            weekday: d.getDay()\n        };\n    }\n    /**\n   * Advance a timestamp by `count` units. Native setters handle cross-month,\n   * cross-year, leap-year, and DST rollover correctly.\n   *\n   * @param {number} timestamp\n   * @param {'year'|'month'|'week'|'day'|'hour'|'minute'|'second'} unit\n   * @param {number} count  may be negative\n   * @param {boolean} isUTC\n   * @returns {number}\n   */ addInterval(timestamp, unit, count, isUTC) {\n        const d = new Date(timestamp);\n        if (isUTC) switch(unit){\n            case \"year\":\n                d.setUTCFullYear(d.getUTCFullYear() + count);\n                break;\n            case \"month\":\n                d.setUTCMonth(d.getUTCMonth() + count);\n                break;\n            case \"week\":\n                d.setUTCDate(d.getUTCDate() + count * 7);\n                break;\n            case \"day\":\n                d.setUTCDate(d.getUTCDate() + count);\n                break;\n            case \"hour\":\n                d.setUTCHours(d.getUTCHours() + count);\n                break;\n            case \"minute\":\n                d.setUTCMinutes(d.getUTCMinutes() + count);\n                break;\n            case \"second\":\n                d.setUTCSeconds(d.getUTCSeconds() + count);\n                break;\n        }\n        else switch(unit){\n            case \"year\":\n                d.setFullYear(d.getFullYear() + count);\n                break;\n            case \"month\":\n                d.setMonth(d.getMonth() + count);\n                break;\n            case \"week\":\n                d.setDate(d.getDate() + count * 7);\n                break;\n            case \"day\":\n                d.setDate(d.getDate() + count);\n                break;\n            case \"hour\":\n                d.setHours(d.getHours() + count);\n                break;\n            case \"minute\":\n                d.setMinutes(d.getMinutes() + count);\n                break;\n            case \"second\":\n                d.setSeconds(d.getSeconds() + count);\n                break;\n        }\n        return d.getTime();\n    }\n    /**\n   * Snap a timestamp UP to the next boundary aligned with `step` units of\n   * `unit`. Returns the input unchanged if already on a boundary. Alignment\n   * rules per unit:\n   *   - second: 0/step/2*step/... seconds within a minute (step must divide 60)\n   *   - minute: 0/step/2*step/... minutes within an hour (step must divide 60)\n   *   - hour:   0/step/... hours within a day (step must divide 24)\n   *   - day:    every day (step always 1)\n   *   - week:   next Monday on a `step`-week stride from a fixed epoch Monday\n   *   - month:  Jan/Apr/Jul/Oct for step=3, Jan/Jul for step=6 (step must divide 12)\n   *   - year:   year % step === 0\n   *\n   * @param {number} timestamp\n   * @param {'year'|'month'|'week'|'day'|'hour'|'minute'|'second'} unit\n   * @param {number} step\n   * @param {boolean} isUTC\n   * @returns {number}\n   */ ceilToBoundary(timestamp, unit, step, isUTC) {\n        const d = new Date(timestamp);\n        if (isUTC) switch(unit){\n            case \"second\":\n                {\n                    const s2 = d.getUTCSeconds();\n                    const aligned = Math.ceil(s2 / step) * step;\n                    if (aligned === s2 && d.getUTCMilliseconds() === 0) return timestamp;\n                    d.setUTCMilliseconds(0);\n                    d.setUTCSeconds(aligned);\n                    return d.getTime();\n                }\n            case \"minute\":\n                {\n                    const m2 = d.getUTCMinutes();\n                    const aligned = Math.ceil(m2 / step) * step;\n                    if (aligned === m2 && d.getUTCSeconds() === 0 && d.getUTCMilliseconds() === 0) return timestamp;\n                    d.setUTCMilliseconds(0);\n                    d.setUTCSeconds(0);\n                    d.setUTCMinutes(aligned);\n                    return d.getTime();\n                }\n            case \"hour\":\n                {\n                    const h2 = d.getUTCHours();\n                    const aligned = Math.ceil(h2 / step) * step;\n                    if (aligned === h2 && d.getUTCMinutes() === 0 && d.getUTCSeconds() === 0 && d.getUTCMilliseconds() === 0) return timestamp;\n                    d.setUTCMilliseconds(0);\n                    d.setUTCSeconds(0);\n                    d.setUTCMinutes(0);\n                    d.setUTCHours(aligned);\n                    return d.getTime();\n                }\n            case \"day\":\n                if (d.getUTCHours() === 0 && d.getUTCMinutes() === 0 && d.getUTCSeconds() === 0 && d.getUTCMilliseconds() === 0) return timestamp;\n                d.setUTCMilliseconds(0);\n                d.setUTCSeconds(0);\n                d.setUTCMinutes(0);\n                d.setUTCHours(0);\n                d.setUTCDate(d.getUTCDate() + 1);\n                return d.getTime();\n            case \"week\":\n                {\n                    const MS_PER_WEEK = 604800000;\n                    const REF_MONDAY_UTC = Date.UTC(1970, 0, 5);\n                    d.setUTCMilliseconds(0);\n                    d.setUTCSeconds(0);\n                    d.setUTCMinutes(0);\n                    d.setUTCHours(0);\n                    const startOfDay = d.getTime();\n                    const weeksSinceRef = Math.ceil((startOfDay - REF_MONDAY_UTC) / MS_PER_WEEK);\n                    const alignedWeeks = Math.ceil(weeksSinceRef / step) * step;\n                    const aligned = REF_MONDAY_UTC + alignedWeeks * MS_PER_WEEK;\n                    if (aligned >= timestamp) return aligned;\n                    return aligned + step * MS_PER_WEEK;\n                }\n            case \"month\":\n                {\n                    const m2 = d.getUTCMonth();\n                    const aligned = Math.ceil(m2 / step) * step;\n                    if (aligned === m2 && d.getUTCDate() === 1 && d.getUTCHours() === 0 && d.getUTCMinutes() === 0 && d.getUTCSeconds() === 0 && d.getUTCMilliseconds() === 0) return timestamp;\n                    d.setUTCMilliseconds(0);\n                    d.setUTCSeconds(0);\n                    d.setUTCMinutes(0);\n                    d.setUTCHours(0);\n                    d.setUTCDate(1);\n                    d.setUTCMonth(aligned);\n                    return d.getTime();\n                }\n            case \"year\":\n                {\n                    const y = d.getUTCFullYear();\n                    const aligned = Math.ceil(y / step) * step;\n                    if (aligned === y && d.getUTCMonth() === 0 && d.getUTCDate() === 1 && d.getUTCHours() === 0 && d.getUTCMinutes() === 0 && d.getUTCSeconds() === 0 && d.getUTCMilliseconds() === 0) return timestamp;\n                    return Date.UTC(aligned, 0, 1);\n                }\n        }\n        else switch(unit){\n            case \"second\":\n                {\n                    const s2 = d.getSeconds();\n                    const aligned = Math.ceil(s2 / step) * step;\n                    if (aligned === s2 && d.getMilliseconds() === 0) return timestamp;\n                    d.setMilliseconds(0);\n                    d.setSeconds(aligned);\n                    return d.getTime();\n                }\n            case \"minute\":\n                {\n                    const m2 = d.getMinutes();\n                    const aligned = Math.ceil(m2 / step) * step;\n                    if (aligned === m2 && d.getSeconds() === 0 && d.getMilliseconds() === 0) return timestamp;\n                    d.setMilliseconds(0);\n                    d.setSeconds(0);\n                    d.setMinutes(aligned);\n                    return d.getTime();\n                }\n            case \"hour\":\n                {\n                    const h2 = d.getHours();\n                    const aligned = Math.ceil(h2 / step) * step;\n                    if (aligned === h2 && d.getMinutes() === 0 && d.getSeconds() === 0 && d.getMilliseconds() === 0) return timestamp;\n                    d.setMilliseconds(0);\n                    d.setSeconds(0);\n                    d.setMinutes(0);\n                    d.setHours(aligned);\n                    return d.getTime();\n                }\n            case \"day\":\n                if (d.getHours() === 0 && d.getMinutes() === 0 && d.getSeconds() === 0 && d.getMilliseconds() === 0) return timestamp;\n                d.setMilliseconds(0);\n                d.setSeconds(0);\n                d.setMinutes(0);\n                d.setHours(0);\n                d.setDate(d.getDate() + 1);\n                return d.getTime();\n            case \"week\":\n                {\n                    const MS_PER_WEEK = 604800000;\n                    const REF_MONDAY_LOCAL = new Date(1970, 0, 5).getTime();\n                    d.setMilliseconds(0);\n                    d.setSeconds(0);\n                    d.setMinutes(0);\n                    d.setHours(0);\n                    const startOfDay = d.getTime();\n                    const weeksSinceRef = Math.ceil((startOfDay - REF_MONDAY_LOCAL) / MS_PER_WEEK);\n                    const alignedWeeks = Math.ceil(weeksSinceRef / step) * step;\n                    const aligned = REF_MONDAY_LOCAL + alignedWeeks * MS_PER_WEEK;\n                    if (aligned >= timestamp) return aligned;\n                    return aligned + step * MS_PER_WEEK;\n                }\n            case \"month\":\n                {\n                    const m2 = d.getMonth();\n                    const aligned = Math.ceil(m2 / step) * step;\n                    if (aligned === m2 && d.getDate() === 1 && d.getHours() === 0 && d.getMinutes() === 0 && d.getSeconds() === 0 && d.getMilliseconds() === 0) return timestamp;\n                    d.setMilliseconds(0);\n                    d.setSeconds(0);\n                    d.setMinutes(0);\n                    d.setHours(0);\n                    d.setDate(1);\n                    d.setMonth(aligned);\n                    return d.getTime();\n                }\n            case \"year\":\n                {\n                    const y = d.getFullYear();\n                    const aligned = Math.ceil(y / step) * step;\n                    if (aligned === y && d.getMonth() === 0 && d.getDate() === 1 && d.getHours() === 0 && d.getMinutes() === 0 && d.getSeconds() === 0 && d.getMilliseconds() === 0) return timestamp;\n                    return new Date(aligned, 0, 1).getTime();\n                }\n        }\n        return timestamp;\n    }\n    /**\n   * Test whether a timestamp falls exactly on a unit boundary (start of year,\n   * start of month, start of day, etc.). Used by the multi-resolution\n   * formatter to upgrade a tick's display unit to a coarser scale.\n   *\n   * @param {number} timestamp\n   * @param {'year'|'month'|'day'|'hour'|'minute'|'second'} unit\n   * @param {boolean} isUTC\n   * @returns {boolean}\n   */ isAtBoundary(timestamp, unit, isUTC) {\n        const f = this.getDateFields(timestamp, isUTC);\n        switch(unit){\n            case \"year\":\n                return f.month === 0 && f.date === 1 && f.hour === 0 && f.minute === 0 && f.second === 0 && f.ms === 0;\n            case \"month\":\n                return f.date === 1 && f.hour === 0 && f.minute === 0 && f.second === 0 && f.ms === 0;\n            case \"day\":\n                return f.hour === 0 && f.minute === 0 && f.second === 0 && f.ms === 0;\n            case \"hour\":\n                return f.minute === 0 && f.second === 0 && f.ms === 0;\n            case \"minute\":\n                return f.second === 0 && f.ms === 0;\n            case \"second\":\n                return f.ms === 0;\n        }\n        return false;\n    }\n}\nclass $e4b487e979d7c06d$var$Formatters {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n        this.tooltipKeyFormat = \"dd MMM\";\n    }\n    /**\n   * @param {Function} fn\n   * @param {any} val\n   * @param {any} timestamp\n   * @param {any} _opts\n   */ xLabelFormat(fn, val, timestamp, _opts) {\n        const w2 = this.w;\n        if (w2.config.xaxis.type === \"datetime\") {\n            if (w2.config.xaxis.labels.formatter === void 0) {\n                if (w2.config.tooltip.x.formatter === void 0) {\n                    const datetimeObj = new $e4b487e979d7c06d$var$DateTime(this.w);\n                    return datetimeObj.formatDate(datetimeObj.getDate(val), w2.config.tooltip.x.format);\n                }\n            }\n        }\n        return fn(val, timestamp, _opts);\n    }\n    /**\n   * @param {any} val\n   */ defaultGeneralFormatter(val) {\n        if (Array.isArray(val)) return val.map((v2)=>{\n            return v2;\n        });\n        else return val;\n    }\n    /**\n   * @param {any} v\n   * @param {ApexYAxis} yaxe\n   */ defaultYFormatter(v2, yaxe) {\n        const w2 = this.w;\n        if ($e4b487e979d7c06d$var$Utils$1.isNumber(v2)) {\n            if (w2.globals.yValueDecimal !== 0) v2 = v2.toFixed(yaxe.decimalsInFloat !== void 0 ? yaxe.decimalsInFloat : w2.globals.yValueDecimal);\n            else {\n                const f = v2.toFixed(0);\n                v2 = Number(f) === v2 ? f : v2.toFixed(1);\n            }\n        }\n        return v2;\n    }\n    setLabelFormatters() {\n        const w2 = this.w;\n        const fmt = w2.formatters;\n        fmt.xaxisTooltipFormatter = (val)=>{\n            return this.defaultGeneralFormatter(val);\n        };\n        fmt.ttKeyFormatter = (val)=>{\n            return this.defaultGeneralFormatter(val);\n        };\n        fmt.ttZFormatter = (val)=>{\n            return val;\n        };\n        fmt.legendFormatter = (val)=>{\n            return this.defaultGeneralFormatter(val);\n        };\n        if (w2.config.xaxis.labels.formatter !== void 0) fmt.xLabelFormatter = w2.config.xaxis.labels.formatter;\n        else fmt.xLabelFormatter = (val)=>{\n            if ($e4b487e979d7c06d$var$Utils$1.isNumber(val)) {\n                if (!w2.config.xaxis.convertedCatToNumeric && w2.config.xaxis.type === \"numeric\") {\n                    if ($e4b487e979d7c06d$var$Utils$1.isNumber(w2.config.xaxis.decimalsInFloat)) return val.toFixed(w2.config.xaxis.decimalsInFloat);\n                    else {\n                        const diff = w2.globals.maxX - w2.globals.minX;\n                        if (diff > 0) {\n                            const step = diff / 10;\n                            const decimals = Math.max(0, -Math.floor(Math.log10(step)));\n                            return val.toFixed(decimals);\n                        }\n                        return val.toFixed(0);\n                    }\n                }\n                if (w2.globals.isBarHorizontal) {\n                    const range = w2.globals.maxY - w2.globals.minY;\n                    if (range < 4) return val.toFixed(1);\n                }\n                return val.toFixed(0);\n            }\n            return val;\n        };\n        if (typeof w2.config.tooltip.x.formatter === \"function\") fmt.ttKeyFormatter = w2.config.tooltip.x.formatter;\n        else fmt.ttKeyFormatter = fmt.xLabelFormatter;\n        if (typeof w2.config.xaxis.tooltip.formatter === \"function\") fmt.xaxisTooltipFormatter = w2.config.xaxis.tooltip.formatter;\n        if (Array.isArray(w2.config.tooltip.y)) fmt.ttVal = w2.config.tooltip.y;\n        else if (w2.config.tooltip.y.formatter !== void 0) fmt.ttVal = w2.config.tooltip.y;\n        if (w2.config.tooltip.z.formatter !== void 0) fmt.ttZFormatter = w2.config.tooltip.z.formatter;\n        if (w2.config.legend.formatter !== void 0) fmt.legendFormatter = w2.config.legend.formatter;\n        fmt.yLabelFormatters = [];\n        w2.config.yaxis.forEach((yaxe, i2)=>{\n            if (yaxe.labels.formatter !== void 0) fmt.yLabelFormatters[i2] = yaxe.labels.formatter;\n            else if (w2.config.chart.type === \"violin\") {\n                const round = (v2)=>typeof v2 === \"number\" && isFinite(v2) ? `${Math.round(v2 * 100) / 100}` : v2;\n                fmt.yLabelFormatters[i2] = (val)=>{\n                    if (!w2.globals.xyCharts) return val;\n                    return Array.isArray(val) ? val.map(round) : round(val);\n                };\n            } else fmt.yLabelFormatters[i2] = (val)=>{\n                if (!w2.globals.xyCharts) return val;\n                if (Array.isArray(val)) return val.map((v2)=>{\n                    return this.defaultYFormatter(v2, yaxe);\n                });\n                else return this.defaultYFormatter(val, yaxe);\n            };\n        });\n        return w2.globals;\n    }\n    heatmapLabelFormatters() {\n        const w2 = this.w;\n        if (w2.config.chart.type === \"heatmap\") {\n            w2.globals.yAxisScale[0].result = /** @type {any} */ w2.seriesData.seriesNames.slice();\n            const longest = /** @type {any} */ w2.seriesData.seriesNames.reduce((a2, b2)=>a2.length > b2.length ? a2 : b2, 0);\n            w2.globals.yAxisScale[0].niceMax = longest;\n            w2.globals.yAxisScale[0].niceMin = longest;\n        }\n    }\n}\nconst $e4b487e979d7c06d$var$name = \"en\";\nconst $e4b487e979d7c06d$var$options = {\n    \"months\": [\n        \"January\",\n        \"February\",\n        \"March\",\n        \"April\",\n        \"May\",\n        \"June\",\n        \"July\",\n        \"August\",\n        \"September\",\n        \"October\",\n        \"November\",\n        \"December\"\n    ],\n    \"shortMonths\": [\n        \"Jan\",\n        \"Feb\",\n        \"Mar\",\n        \"Apr\",\n        \"May\",\n        \"Jun\",\n        \"Jul\",\n        \"Aug\",\n        \"Sep\",\n        \"Oct\",\n        \"Nov\",\n        \"Dec\"\n    ],\n    \"days\": [\n        \"Sunday\",\n        \"Monday\",\n        \"Tuesday\",\n        \"Wednesday\",\n        \"Thursday\",\n        \"Friday\",\n        \"Saturday\"\n    ],\n    \"shortDays\": [\n        \"Sun\",\n        \"Mon\",\n        \"Tue\",\n        \"Wed\",\n        \"Thu\",\n        \"Fri\",\n        \"Sat\"\n    ],\n    \"toolbar\": {\n        \"exportToSVG\": \"Download SVG\",\n        \"exportToPNG\": \"Download PNG\",\n        \"exportToCSV\": \"Download CSV\",\n        \"menu\": \"Menu\",\n        \"selection\": \"Selection\",\n        \"selectionZoom\": \"Selection Zoom\",\n        \"zoomIn\": \"Zoom In\",\n        \"zoomOut\": \"Zoom Out\",\n        \"pan\": \"Panning\",\n        \"reset\": \"Reset Zoom\",\n        \"measure\": \"Measure\"\n    }\n};\nconst $e4b487e979d7c06d$var$en = {\n    name: $e4b487e979d7c06d$var$name,\n    options: $e4b487e979d7c06d$var$options\n};\nclass $e4b487e979d7c06d$var$Options {\n    constructor(){\n        this.yAxis = {\n            show: true,\n            showAlways: false,\n            showForNullSeries: true,\n            seriesName: void 0,\n            opposite: false,\n            reversed: false,\n            logarithmic: false,\n            logBase: 10,\n            tickAmount: void 0,\n            stepSize: void 0,\n            forceNiceScale: false,\n            alignZero: false,\n            max: void 0,\n            min: void 0,\n            floating: false,\n            decimalsInFloat: void 0,\n            labels: {\n                show: true,\n                showDuplicates: false,\n                minWidth: 0,\n                maxWidth: 160,\n                offsetX: 0,\n                offsetY: 0,\n                align: void 0,\n                rotate: 0,\n                padding: 20,\n                style: {\n                    colors: [],\n                    fontSize: \"11px\",\n                    fontWeight: 400,\n                    fontFamily: void 0,\n                    cssClass: \"\"\n                },\n                formatter: void 0\n            },\n            axisBorder: {\n                show: false,\n                color: \"#e0e0e0\",\n                width: 1,\n                offsetX: 0,\n                offsetY: 0\n            },\n            axisTicks: {\n                show: false,\n                color: \"#e0e0e0\",\n                width: 6,\n                offsetX: 0,\n                offsetY: 0\n            },\n            title: {\n                text: void 0,\n                rotate: -90,\n                offsetY: 0,\n                offsetX: 0,\n                style: {\n                    color: void 0,\n                    fontSize: \"11px\",\n                    fontWeight: 900,\n                    fontFamily: void 0,\n                    cssClass: \"\"\n                }\n            },\n            tooltip: {\n                enabled: false,\n                offsetX: 0\n            },\n            crosshairs: {\n                show: true,\n                position: \"front\",\n                stroke: {\n                    color: \"#b6b6b6\",\n                    width: 1,\n                    dashArray: 0\n                }\n            }\n        };\n        this.pointAnnotation = {\n            id: void 0,\n            x: 0,\n            y: null,\n            yAxisIndex: 0,\n            seriesIndex: void 0,\n            mouseEnter: void 0,\n            mouseLeave: void 0,\n            click: void 0,\n            marker: {\n                size: 4,\n                fillColor: \"#fff\",\n                strokeWidth: 2,\n                strokeColor: \"#333\",\n                shape: \"circle\",\n                offsetX: 0,\n                offsetY: 0,\n                // radius: 2, // DEPRECATED\n                cssClass: \"\"\n            },\n            label: {\n                borderColor: \"#c2c2c2\",\n                borderWidth: 1,\n                borderRadius: 2,\n                text: void 0,\n                textAnchor: \"middle\",\n                offsetX: 0,\n                offsetY: 0,\n                mouseEnter: void 0,\n                mouseLeave: void 0,\n                click: void 0,\n                style: {\n                    background: \"#fff\",\n                    color: void 0,\n                    fontSize: \"11px\",\n                    fontFamily: void 0,\n                    fontWeight: 400,\n                    cssClass: \"\",\n                    padding: {\n                        left: 5,\n                        right: 5,\n                        top: 2,\n                        bottom: 2\n                    }\n                }\n            },\n            customSVG: {\n                // this will be deprecated in the next major version as it is going to be replaced with a better alternative below (image)\n                SVG: void 0,\n                cssClass: void 0,\n                offsetX: 0,\n                offsetY: 0\n            },\n            image: {\n                path: void 0,\n                width: 20,\n                height: 20,\n                offsetX: 0,\n                offsetY: 0\n            },\n            tooltip: {\n                // Show a hover tooltip over the annotation marker, like a regular\n                // data point. Lets you surface richer detail than fits in the label.\n                enabled: false,\n                // Static tooltip content (HTML allowed; array joined with <br/>).\n                // Falls back to label.text when omitted.\n                text: void 0,\n                // formatter({ annotation, seriesIndex, id, w }) => string (HTML).\n                // Takes precedence over `text` when provided.\n                formatter: void 0,\n                // 'light' | 'dark'. Falls back to the global tooltip.theme.\n                theme: void 0,\n                offsetX: 0,\n                offsetY: 0\n            }\n        };\n        this.yAxisAnnotation = {\n            id: void 0,\n            y: 0,\n            y2: null,\n            strokeDashArray: 1,\n            fillColor: \"#c2c2c2\",\n            borderColor: \"#c2c2c2\",\n            borderWidth: 1,\n            opacity: 0.3,\n            offsetX: 0,\n            offsetY: 0,\n            width: \"100%\",\n            yAxisIndex: 0,\n            label: {\n                borderColor: \"#c2c2c2\",\n                borderWidth: 1,\n                borderRadius: 2,\n                text: void 0,\n                textAnchor: \"end\",\n                position: \"right\",\n                offsetX: 0,\n                offsetY: -3,\n                mouseEnter: void 0,\n                mouseLeave: void 0,\n                click: void 0,\n                style: {\n                    background: \"#fff\",\n                    color: void 0,\n                    fontSize: \"11px\",\n                    fontFamily: void 0,\n                    fontWeight: 400,\n                    cssClass: \"\",\n                    padding: {\n                        left: 5,\n                        right: 5,\n                        top: 2,\n                        bottom: 2\n                    }\n                }\n            }\n        };\n        this.xAxisAnnotation = {\n            id: void 0,\n            x: 0,\n            x2: null,\n            strokeDashArray: 1,\n            fillColor: \"#c2c2c2\",\n            borderColor: \"#c2c2c2\",\n            borderWidth: 1,\n            opacity: 0.3,\n            offsetX: 0,\n            offsetY: 0,\n            label: {\n                borderColor: \"#c2c2c2\",\n                borderWidth: 1,\n                borderRadius: 2,\n                text: void 0,\n                textAnchor: \"middle\",\n                orientation: \"vertical\",\n                position: \"top\",\n                offsetX: 0,\n                offsetY: 0,\n                mouseEnter: void 0,\n                mouseLeave: void 0,\n                click: void 0,\n                style: {\n                    background: \"#fff\",\n                    color: void 0,\n                    fontSize: \"11px\",\n                    fontFamily: void 0,\n                    fontWeight: 400,\n                    cssClass: \"\",\n                    padding: {\n                        left: 5,\n                        right: 5,\n                        top: 2,\n                        bottom: 2\n                    }\n                }\n            }\n        };\n        this.text = {\n            x: 0,\n            y: 0,\n            text: \"\",\n            textAnchor: \"start\",\n            foreColor: void 0,\n            fontSize: \"13px\",\n            fontFamily: void 0,\n            fontWeight: 400,\n            appendTo: \".apexcharts-annotations\",\n            backgroundColor: \"transparent\",\n            borderColor: \"#c2c2c2\",\n            borderRadius: 0,\n            borderWidth: 0,\n            paddingLeft: 4,\n            paddingRight: 4,\n            paddingTop: 2,\n            paddingBottom: 2\n        };\n    }\n    init() {\n        return {\n            annotations: {\n                yaxis: [\n                    this.yAxisAnnotation\n                ],\n                xaxis: [\n                    this.xAxisAnnotation\n                ],\n                points: [\n                    this.pointAnnotation\n                ],\n                texts: [],\n                images: [],\n                shapes: []\n            },\n            // Weave (#1): public plugin platform. Per-chart activation list:\n            // { name, options?, order? }. Requires the Weave host to be bundled\n            // (`import 'apexcharts/features/weave'`, included in the full bundle) and\n            // the plugin registered via ApexCharts.registerPlugin().\n            plugins: [],\n            chart: {\n                animations: {\n                    // Master switch — set false to render charts without any animation.\n                    // Each chart type gets a tailored initial-mount animation by default:\n                    //   line/area/rangeArea/radar: pen-stroke draw + radial fill bloom\n                    //   bar/stacked/range/funnel:  grow from baseline (+ stagger)\n                    //   scatter/bubble:            scale-up pop with overshoot\n                    //   heatmap:                   diagonal-wave cell reveal\n                    //   treemap:                   largest-tile-first cascade\n                    //   pie/donut/polar/gauge:     arc sweep + needle settle\n                    // Speed is controlled by `speed`; per-element stagger by\n                    // `animateGradually.enabled` / `animateGradually.delay`.\n                    enabled: true,\n                    speed: 800,\n                    // Cadence (#6): easing for the generic tweens (data-update value\n                    // transitions, path morphs, marker animate). A registered name, a\n                    // cubic-bezier [x1,y1,x2,y2] array, or a function (t in [0,1]).\n                    // 'easeInOutSine' is the historical curve, so the default is\n                    // behavior-neutral. The tuned initial-draw pen/pop easings are fixed.\n                    easing: \"easeInOutSine\",\n                    animateGradually: {\n                        // Drives per-element stagger across all chart types. When enabled,\n                        // bars/heatmap-cells/scatter-points/treemap-tiles reveal in\n                        // sequence; line/area markers fade in progressively along the\n                        // draw. `delay` is the requested step in ms (auto-capped per\n                        // chart so total stagger ≤ ~half the animation duration).\n                        delay: 150,\n                        enabled: true\n                    },\n                    dynamicAnimation: {\n                        // Data-change (updateSeries) animation. Independent from the\n                        // initial-mount animations above.\n                        enabled: true,\n                        speed: 350,\n                        // Easing for data-change morphs only (same accepted forms as\n                        // `animations.easing`). Unset -> inherit the chart-wide easing,\n                        // except detected streaming scrolls (rolling window / append\n                        // under xaxis.range) which default to 'linear' so the window\n                        // slides at constant velocity instead of pulsing each tick.\n                        easing: void 0\n                    },\n                    chartTypeMorph: {\n                        // Cross-type morph (updateOptions changing chart.type). Bridges\n                        // the destroy+recreate flicker by sampling source + target paths\n                        // into N evenly-spaced perimeter points and tweening point-by-point\n                        // with rotation-search alignment, so the transition is always smooth\n                        // and non-self-intersecting even between very different shapes (bar\n                        // rect ↔ pie wedge / radial arc). Supported pairs include bar ↔\n                        // pie / donut / radialBar / polarArea / funnel / pyramid (plus the\n                        // trivial pie ↔ donut ↔ polarArea cases). Falls back to instant\n                        // snap when types or data shape are incompatible.\n                        enabled: true,\n                        speed: 600\n                    },\n                    // Honor the OS-level prefers-reduced-motion setting. When true (default)\n                    // and the user has the accessibility preference enabled, all initial-mount\n                    // animations are skipped and the chart renders instantly.\n                    respectReducedMotion: true,\n                    // Above this many data points, per-element morph + stagger (which\n                    // spins up one JS-driven animation timeline per path — three chained\n                    // tweens each in morphSVG) is replaced by a single GPU-composited\n                    // opacity fade of the whole series. Thousands of candlesticks/bars\n                    // otherwise jank the main thread on initial render and on every zoom.\n                    // The fade reuses the existing delayedElements reveal so the result\n                    // still animates in, just at O(1) cost instead of O(n). Set to 0 to\n                    // always animate per-element regardless of dataset size.\n                    largeDatasetThreshold: 1e3\n                },\n                background: \"\",\n                locales: [\n                    $e4b487e979d7c06d$var$en\n                ],\n                defaultLocale: \"en\",\n                // Perspectives (#10): serializable/shareable view state. Passive:\n                // requires `import 'apexcharts/features/perspectives'`. serializeOptions\n                // is the whitelist of function-free option paths stored in a token.\n                perspectives: {\n                    serializeOptions: [\n                        \"theme\",\n                        \"xaxis\",\n                        \"yaxis\",\n                        \"title\",\n                        \"subtitle\"\n                    ]\n                },\n                // Rewind (#3): undo/redo history. Opt-in (bundle + behavior): requires\n                // `import 'apexcharts/features/history'` AND chart.history.enabled.\n                history: {\n                    enabled: false,\n                    maxDepth: 100,\n                    coalesceMs: 250,\n                    keyboard: true\n                },\n                // Strata (#2): hybrid SVG+canvas series renderer. 'svg' (default) |\n                // 'canvas' | 'auto'. 'auto'/'canvas' need the canvas renderer feature\n                // (`import 'apexcharts/features/renderer-canvas'`); without it, or with\n                // a canvas-unsupported feature (pattern/image fill, color-matrix state\n                // filters), selection falls back to 'svg'. Only the series layer is\n                // canvas-capable in v1; chrome stays SVG.\n                renderer: \"svg\",\n                rendererThreshold: 8e3,\n                layers: {\n                    series: \"auto\",\n                    grid: \"svg\",\n                    annotations: \"svg\",\n                    dataLabels: \"svg\"\n                },\n                dropShadow: {\n                    enabled: false,\n                    enabledOnSeries: void 0,\n                    top: 2,\n                    left: 2,\n                    blur: 4,\n                    color: \"#000\",\n                    opacity: 0.7\n                },\n                events: {\n                    animationEnd: void 0,\n                    beforeMount: void 0,\n                    mounted: void 0,\n                    updated: void 0,\n                    click: void 0,\n                    mouseMove: void 0,\n                    mouseLeave: void 0,\n                    xAxisLabelClick: void 0,\n                    legendClick: void 0,\n                    markerClick: void 0,\n                    selection: void 0,\n                    dataPointSelection: void 0,\n                    dataPointMouseEnter: void 0,\n                    dataPointMouseLeave: void 0,\n                    beforeZoom: void 0,\n                    beforeResetZoom: void 0,\n                    zoomed: void 0,\n                    scrolled: void 0,\n                    brushScrolled: void 0,\n                    crossFilter: void 0,\n                    filterChange: void 0,\n                    annotationDragged: void 0,\n                    annotationEdited: void 0,\n                    annotationCreated: void 0,\n                    annotationStyled: void 0,\n                    annotationDeleted: void 0,\n                    measured: void 0,\n                    keyDown: void 0,\n                    keyUp: void 0\n                },\n                foreColor: \"#373d3f\",\n                fontFamily: \"Helvetica, Arial, sans-serif\",\n                height: \"auto\",\n                parentHeightOffset: 15,\n                redrawOnParentResize: true,\n                redrawOnWindowResize: true,\n                id: void 0,\n                group: void 0,\n                nonce: void 0,\n                // Per-chart license key override for the gated premium features\n                // (storyboard, link/crossfilter, ink, measure, contextMenu,\n                // perspectives, history). Most specific wins: chart.license ->\n                // ApexCharts.setLicense() -> window.Apex.license -> unlicensed (trial\n                // watermark). Shared across the ApexCharts family. See setLicense().\n                license: void 0,\n                offsetX: 0,\n                offsetY: 0,\n                injectStyleSheet: true,\n                selection: {\n                    enabled: false,\n                    type: \"x\",\n                    // selectedPoints: undefined, // default datapoints that should be selected automatically\n                    fill: {\n                        color: \"#24292e\",\n                        opacity: 0.1\n                    },\n                    stroke: {\n                        width: 1,\n                        color: \"#24292e\",\n                        opacity: 0.4,\n                        dashArray: 3\n                    },\n                    xaxis: {\n                        min: void 0,\n                        max: void 0\n                    },\n                    yaxis: {\n                        min: void 0,\n                        max: void 0\n                    }\n                },\n                sparkline: {\n                    enabled: false\n                },\n                brush: {\n                    enabled: false,\n                    autoScaleYaxis: true,\n                    target: void 0,\n                    targets: void 0\n                },\n                // Linked Views (#4): crossfilter / linked highlighting. Requires the\n                // `link` feature. Two modes:\n                //   HIGHLIGHT (P1): `enabled` with no `dimension`. Charts sharing a\n                //   `chart.group` form a set; brushing a range (needs\n                //   `chart.selection.enabled`) dims out-of-range marks in place.\n                //   FILTER (P2): set `dimension` (its presence selects this path). Each\n                //   chart declares a dimension + reduction over a shared record set\n                //   registered with ApexCharts.crossfilter({ id, records }); clicking a\n                //   bucket re-aggregates the other charts. See docs/spec.\n                link: {\n                    enabled: false,\n                    mode: \"highlight\",\n                    dimOpacity: 0.2,\n                    // FILTER-mode config (all optional except dimension):\n                    id: void 0,\n                    // crossfilter coordinator id (defaults to chart.group)\n                    dimension: void 0,\n                    // (row) => key; presence selects filter mode\n                    reduce: void 0,\n                    // 'count' | { sum|avg|min|max: field } | (rows)=>n\n                    type: void 0,\n                    // 'category' | 'range' (else inferred from bins)\n                    bins: void 0,\n                    // range dims: { width } | { count } | { thresholds }\n                    order: void 0,\n                    // category order: 'first-seen' | 'asc' | 'desc' | fn\n                    seriesName: void 0\n                },\n                // Ink Layer (#7): direct-manipulation annotations. When enabled, every\n                // point annotation is draggable (unless it sets draggable:false); or opt\n                // in per annotation with annotations.points[].draggable. Clicking an\n                // ink-managed annotation opens a floating editor card: rename inline,\n                // recolor, toggle bold, step the font size, size/reshape the marker, or\n                // delete the note. Axis-line annotations get separate Label and Line\n                // color rows, so restyling the label chip never touches the stroke.\n                // Requires the `ink` feature. Fires annotationDragged,\n                // annotationEdited, annotationStyled and annotationDeleted.\n                ink: {\n                    enabled: false,\n                    // Show a minimal \"add note\" tool palette; clicking it arms create\n                    // mode (the next plot click drops an editable, draggable annotation).\n                    palette: false,\n                    // Snap a dragged point / axis-line annotation to the nearest gridline\n                    // (numeric x + linear y). Undo/redo of ink edits is automatic when the\n                    // history (Rewind) feature is enabled.\n                    snap: false,\n                    // Accent swatches offered by the floating note editor; defaults to a\n                    // built-in 6-color palette when undefined.\n                    noteColors: void 0\n                },\n                // Measure ruler (#18): a measure/delta ruler. Requires the `measure`\n                // feature. Hold `key` (default 'm') and drag A->B on the plot, or call\n                // chart.startMeasure()/chart.stopMeasure() to arm it. The live ruler\n                // reads dx, dy, %change and slope; on release it pins as a data-anchored\n                // overlay that re-projects on zoom/resize. Fires `measured`.\n                measure: {\n                    enabled: false,\n                    // 'span' (default): finance-style vertical band between two x-points\n                    // with a \"change (%) + range\" readout, endpoints snapped to the first\n                    // series. 'free': a diagonal ruler between two arbitrary points.\n                    mode: \"span\",\n                    key: \"m\",\n                    pinOnRelease: true,\n                    // Styling tokens. Every element also carries a stable CSS class\n                    // (apexcharts-measure-band / -vline / -line / -label-bg / -label,\n                    // group gets apexcharts-measure-up|down|flat). Colors are left\n                    // undefined so they resolve config -> `--apx-measure-*` CSS custom\n                    // property -> built-in default; set them here to force a color from JS.\n                    colors: {\n                        up: void 0,\n                        down: void 0,\n                        neutral: void 0,\n                        guide: void 0\n                    },\n                    band: true,\n                    // span mode: shaded band between the two x-positions\n                    guides: true,\n                    // span mode: vertical dashed reference lines\n                    markers: true,\n                    // endpoint dots on the series line\n                    // Content: value formatters and a full readout override. `label`\n                    // receives { from, to, dx, dy, percentChange, slope, mode } and\n                    // returns a string or string[] (lines).\n                    format: {\n                        x: void 0,\n                        y: void 0,\n                        percent: void 0\n                    },\n                    label: void 0\n                },\n                // Radial Actions (#chrome): right-click / long-press context menu.\n                // Requires the `contextMenu` feature. Each action receives the clicked\n                // data coordinates, so verbs act at the point (not chart-wide like a\n                // toolbar button). `items` is an ordered list of built-in ids\n                // ('annotate' | 'xline' | 'yline' | 'measure') and/or custom\n                // { id, label, icon, onClick(ctx, { x, y, seriesIndex, dataPointIndex,\n                // clientX, clientY }) }. 'measure' is shown only when the measure tool\n                // is enabled. `labels` overrides built-in text; `noteText` is the label\n                // dropped by 'annotate'.\n                contextMenu: {\n                    enabled: false,\n                    items: [\n                        \"annotate\",\n                        \"xline\",\n                        \"yline\",\n                        \"measure\"\n                    ],\n                    labels: {\n                        annotate: void 0,\n                        xline: void 0,\n                        yline: void 0,\n                        measure: void 0\n                    },\n                    noteText: \"Note\",\n                    // 'xline' (\"Annotate here\") drops a dashed vertical LINE at the\n                    // clicked x; 'yline' (\"Mark this level\") a dashed horizontal line at\n                    // the clicked y. Lines only, never a range rectangle. Like the note,\n                    // a line is ink-managed when the ink feature is bundled: it opens\n                    // the floating editor (rename; separate Label and Line color rows,\n                    // so restyling the chip cannot blank the stroke; delete), drags\n                    // along its axis, and undoes via Rewind. `line` styles both items.\n                    line: {\n                        text: \"\",\n                        // label drawn on the line; empty for no label\n                        strokeDashArray: 4,\n                        color: void 0\n                    }\n                },\n                stacked: false,\n                stackOnlyBar: true,\n                // mixed chart with stacked bars and line series - incorrect line draw #907\n                stackType: \"normal\",\n                // Real-time streaming mode. When enabled, appendData() bounds memory\n                // automatically: each series is trimmed to `maxPoints` (when set) or\n                // to the visible `xaxis.range` window plus a two-point off-screen\n                // runway (so exiting segments slide off the left edge instead of\n                // popping). The scroll animation itself needs no opt-in; updates\n                // that continue the previous window (appendData, or updateSeries with\n                // a shifted fixed-length window) always translate at constant\n                // velocity; see modules/animations/StreamScroll.\n                streaming: {\n                    enabled: false,\n                    maxPoints: void 0\n                },\n                toolbar: {\n                    show: true,\n                    offsetX: 0,\n                    offsetY: 0,\n                    tools: {\n                        download: true,\n                        selection: true,\n                        zoom: true,\n                        zoomin: true,\n                        zoomout: true,\n                        pan: true,\n                        reset: true,\n                        // Shown only when the measure ruler is active (chart.measure.enabled\n                        // and the `measure` feature bundled). Toggles the measure tool; set\n                        // false to keep the ruler key-driven only. See chart.measure.\n                        measure: true,\n                        customIcons: []\n                    },\n                    export: {\n                        csv: {\n                            filename: void 0,\n                            columnDelimiter: \",\",\n                            headerCategory: \"category\",\n                            headerValue: \"value\",\n                            categoryFormatter: void 0,\n                            valueFormatter: void 0\n                        },\n                        png: {\n                            filename: void 0\n                        },\n                        svg: {\n                            filename: void 0\n                        },\n                        scale: void 0,\n                        width: void 0,\n                        // An exported SVG is a standalone document: it cannot reach the\n                        // page's @font-face rules, so a custom font falls back to a\n                        // generic one in the PNG/SVG. When true, matching @font-face\n                        // rules are inlined as base64 data URIs. See #3617.\n                        embedFonts: true\n                    },\n                    autoSelected: \"zoom\"\n                },\n                type: \"line\",\n                width: \"100%\",\n                zoom: {\n                    enabled: true,\n                    type: \"x\",\n                    autoScaleYaxis: false,\n                    // Wheel and pinch zoom can both be triggered without meaning to (a\n                    // page scroll or a two-finger swipe over the chart), so 'auto' offers\n                    // them only when the viewer has a way back: the toolbar's reset\n                    // button. With the toolbar hidden they stay off, since a zoom nobody\n                    // asked for and nobody can undo is a trap. Set either to true to\n                    // force the gesture on regardless (for a page that supplies its own\n                    // reset control), or false to turn it off outright.\n                    allowMouseWheelZoom: \"auto\",\n                    // Momentum: two-finger pinch-zoom on touch devices. Zooms the x-axis\n                    // around the pinch centroid (matching the x-only wheel/toolbar zoom),\n                    // frame-by-frame rather than the 400ms wheel throttle.\n                    pinch: \"auto\",\n                    zoomedArea: {\n                        fill: {\n                            color: \"#90CAF9\",\n                            opacity: 0.4\n                        },\n                        stroke: {\n                            color: \"#0D47A1\",\n                            opacity: 0.4,\n                            width: 1\n                        }\n                    }\n                },\n                // Momentum: kinetic panning on touch. When a one-finger pan is released\n                // with velocity, the chart keeps gliding and decelerates by `friction`\n                // each frame, clamping (no elastic overshoot) at the data edges.\n                pan: {\n                    inertia: true,\n                    friction: 0.92\n                },\n                accessibility: {\n                    enabled: true,\n                    description: void 0,\n                    announcements: {\n                        enabled: true\n                    },\n                    keyboard: {\n                        enabled: true,\n                        navigation: {\n                            enabled: true,\n                            wrapAround: false\n                        }\n                    }\n                },\n                dataReducer: {\n                    enabled: false,\n                    algorithm: \"lttb\",\n                    targetPoints: 250,\n                    threshold: 500\n                }\n            },\n            parsing: {\n                x: void 0,\n                y: void 0\n            },\n            plotOptions: {\n                line: {\n                    isSlopeChart: false,\n                    colors: {\n                        threshold: 0,\n                        colorAboveThreshold: void 0,\n                        colorBelowThreshold: void 0\n                    }\n                },\n                area: {\n                    fillTo: \"origin\"\n                },\n                bar: {\n                    horizontal: false,\n                    columnWidth: \"70%\",\n                    // should be in percent 0 - 100\n                    barHeight: \"70%\",\n                    // should be in percent 0 - 100\n                    distributed: false,\n                    borderRadius: 0,\n                    borderRadiusApplication: \"around\",\n                    // [around, end]\n                    borderRadiusWhenStacked: \"last\",\n                    // [all, last]\n                    rangeBarOverlap: true,\n                    rangeBarGroupRows: false,\n                    hideZeroBarsWhenGrouped: false,\n                    isDumbbell: false,\n                    dumbbellColors: void 0,\n                    isFunnel: false,\n                    isFunnel3d: true,\n                    colors: {\n                        ranges: [],\n                        backgroundBarColors: [],\n                        backgroundBarOpacity: 1,\n                        backgroundBarRadius: 0\n                    },\n                    dataLabels: {\n                        position: \"top\",\n                        // top, center, bottom\n                        maxItems: 100,\n                        hideOverflowingLabels: true,\n                        orientation: \"horizontal\",\n                        total: {\n                            enabled: false,\n                            formatter: void 0,\n                            offsetX: 0,\n                            offsetY: 0,\n                            style: {\n                                color: \"#373d3f\",\n                                fontSize: \"12px\",\n                                fontFamily: void 0,\n                                fontWeight: 600\n                            }\n                        }\n                    }\n                },\n                bubble: {\n                    zScaling: true,\n                    minBubbleRadius: void 0,\n                    maxBubbleRadius: void 0\n                },\n                scatter: {\n                    // Spread overlapping points apart (\"jitter\"). Two uses, one engine:\n                    //  - Strip plot: supply data as { x: 'Category', y: [v1, v2, ...] }.\n                    //    Each category becomes a band and the values are scattered\n                    //    horizontally within it. Marker styling comes from the standard\n                    //    `markers` / `colors` config.\n                    //  - Overplotting: ordinary { x, y } points get a small random offset\n                    //    so dense clusters fan out. The underlying data (and tooltip\n                    //    values) stay exact — only the drawn position moves.\n                    // Offsets are in axis units (x: 1 = one category step) and are\n                    // deterministic (stable across re-renders, SSR-safe).\n                    jitter: {\n                        enabled: false,\n                        x: 0,\n                        // max ± horizontal offset, in x-axis units\n                        y: 0,\n                        // max ± vertical offset, in y-axis units\n                        distributed: false,\n                        // single series: colour each band differently\n                        maxPoints: 5e3\n                    }\n                },\n                candlestick: {\n                    colors: {\n                        upward: \"#00B746\",\n                        downward: \"#EF403C\"\n                    },\n                    wick: {\n                        useFillColor: true\n                    }\n                },\n                boxPlot: {\n                    colors: {\n                        upper: \"#00E396\",\n                        lower: \"#008FFB\"\n                    },\n                    // Where the whiskers reach when the summary is DERIVED from raw\n                    // observations (a datum supplying `points` instead of a 5-number y,\n                    // which needs `apexcharts/features/stats`). Ignored for precomputed\n                    // summaries, which are drawn exactly as given.\n                    //   'minmax' → the extremes, so nothing is hidden\n                    //   'tukey'  → the last observation inside 1.5 * IQR of each\n                    //              quartile. Points beyond the fence fall outside the\n                    //              whisker, so pair it with `points.show` or they become\n                    //              invisible.\n                    whiskers: \"minmax\",\n                    // Optional individual observations (\"jitter\") overlaid on each box.\n                    // Inert unless a data point supplies a `points: number[]` array; off\n                    // by default so existing boxPlot charts are unchanged.\n                    points: {\n                        show: false,\n                        shape: \"circle\",\n                        // 'circle' | 'square'\n                        size: 2.5,\n                        // radius (px)\n                        jitter: 0.5,\n                        // 0..1 fraction of the box half-width to scatter within\n                        maxPoints: 3e3,\n                        // cap per box; excess is stride-thinned\n                        opacity: 0.9,\n                        // 'series-dark' (default) → a darker shade of the series colour,\n                        // 'series' → the series colour, or any literal colour string.\n                        fillColor: \"series-dark\",\n                        strokeColor: \"#fff\",\n                        strokeWidth: 1\n                    }\n                },\n                violin: {\n                    // Multiply the density-derived half-width. 1 = density's own maxWeight\n                    // maps to half the category slot.\n                    bandwidthScale: 1,\n                    // Kernel density estimation, used only when the density is DERIVED\n                    // from raw observations (a datum supplying `points`, or a flat number\n                    // array as `y`, which needs `apexcharts/features/stats`). A\n                    // precomputed density profile is drawn exactly as given.\n                    //   bandwidth  → kernel width in value units. Unset uses Silverman's\n                    //                rule of thumb, which takes the smaller of the\n                    //                standard deviation and a scaled IQR so one distant\n                    //                outlier cannot smear the curve flat. Note this is a\n                    //                statistical parameter, unlike `bandwidthScale`\n                    //                above, which only scales the drawn width.\n                    //   resolution → density samples per violin (default 64).\n                    kde: {\n                        bandwidth: void 0,\n                        resolution: 64\n                    },\n                    // 'individual' → every violin uses the full slot width (scaled to its\n                    // own peak). 'group' → all violins share one scale (the densest in the\n                    // series), so widths stay proportional to density across categories.\n                    normalize: \"individual\",\n                    // Individual observations (\"jitter\") overlaid on the violin shape.\n                    points: {\n                        show: true,\n                        shape: \"circle\",\n                        // 'circle' | 'square'\n                        size: 2.5,\n                        // radius (px)\n                        jitter: 0.5,\n                        // 0..1 fraction of the half-width to scatter within\n                        constrainToViolin: true,\n                        // clamp jitter to the density width at each value\n                        maxPoints: 3e3,\n                        // cap per violin; excess is stride-thinned\n                        opacity: 0.9,\n                        // Default: a darker shade of each violin's own colour, with a white\n                        // outline. fillColor accepts 'series-dark' (default), 'series' (the\n                        // violin's colour as-is), or any literal colour string.\n                        fillColor: \"series-dark\",\n                        strokeColor: \"#fff\",\n                        strokeWidth: 1\n                    }\n                },\n                histogram: {\n                    // How the bin width is chosen from the raw observations. A rule name\n                    // ('auto' | 'fd' | 'sturges' | 'scott' | 'rice' | 'sqrt') or a fixed\n                    // bin count. 'auto' takes the narrower of Freedman-Diaconis and\n                    // Sturges, falling back to Sturges when the IQR is 0 (which happens\n                    // as soon as most values are identical).\n                    bins: \"auto\",\n                    // Explicit bin width in value units. Wins over `bins` when set: use\n                    // it when the bin boundaries carry meaning (decades, 5-minute\n                    // buckets) rather than being a statistical choice.\n                    binWidth: void 0,\n                    // [min, max] to bin over, instead of the data's own extent. Lets\n                    // several histograms share one scale.\n                    range: void 0,\n                    // y units: 'count' (observations per bin), 'relative' (percent of\n                    // the series total), or 'density' (count / (n * binWidth), so the\n                    // total area is 1 and bins of different widths stay comparable).\n                    normalize: \"count\",\n                    // Running total across bins, i.e. a cumulative distribution.\n                    cumulative: false,\n                    // With more than one series, draw every distribution across the FULL\n                    // bin so they overlay, instead of dividing the bin between them. All\n                    // series already share one set of edges, and comparing two shapes is\n                    // the reason to put them on one axis; splitting the bin makes the\n                    // columns stop touching, which reads as a clustered bar chart rather\n                    // than a distribution. Set false for side-by-side bars.\n                    //\n                    // An overlay is unreadable opaque, so it also softens the fill and\n                    // drops the bin separator stroke. Both remain overridable.\n                    overlap: true\n                },\n                heatmap: {\n                    radius: 2,\n                    enableShades: true,\n                    shadeIntensity: 0.5,\n                    reverseNegativeShade: false,\n                    distributed: false,\n                    useFillColorAsStroke: false,\n                    colorScale: {\n                        inverse: false,\n                        ranges: [],\n                        min: void 0,\n                        max: void 0,\n                        // Replaces the default categorical legend with a continuous\n                        // gradient stripe + a hover indicator arrow. Honors\n                        // `chart.legend.position` (top / right / bottom / left).\n                        gradientLegend: {\n                            enabled: false,\n                            // Strip length along the legend's long axis. Accepts a number\n                            // (pixels) or a percentage string. For top/bottom placement the\n                            // percentage is resolved against the chart's SVG width; for\n                            // left/right placement, against the SVG height.\n                            width: \"70%\",\n                            height: \"70%\",\n                            thickness: 12,\n                            // Alignment of the strip within the legend area:\n                            //  - top/bottom: 'start' = left, 'center', 'end' = right\n                            //  - left/right: 'start' = top,  'center', 'end' = bottom\n                            align: \"center\",\n                            // Number of gradient stops sampled from the shade function when\n                            // no explicit `ranges` are provided.\n                            stops: 16,\n                            // Show min/max labels at the ends of the strip.\n                            showLabels: true,\n                            // Show a value tooltip next to the arrow when hovering a cell.\n                            showHoverValue: true,\n                            labelStyle: {\n                                fontSize: \"11px\",\n                                fontFamily: void 0,\n                                colors: void 0\n                            },\n                            arrow: {\n                                size: 8,\n                                color: void 0\n                            },\n                            formatter: void 0\n                        }\n                    }\n                },\n                funnel: {\n                    // 'rectangle' preserves the existing centered-rectangle funnel\n                    // geometry. 'trapezoid' produces continuous sloped sides between\n                    // consecutive stages (each stage's bottom width matches the next\n                    // stage's top width).\n                    shape: \"rectangle\",\n                    // For shape: 'trapezoid' only — what to do with the last stage's\n                    // bottom edge: 'flat' (parallel sides) or 'taper' (taper to a point).\n                    lastShape: \"flat\"\n                },\n                treemap: {\n                    enableShades: true,\n                    shadeIntensity: 0.5,\n                    distributed: false,\n                    reverseNegativeShade: false,\n                    useFillColorAsStroke: false,\n                    borderRadius: 4,\n                    dataLabels: {\n                        format: \"scale\",\n                        // scale | truncate\n                        // Skip a tile's label when it would render below this size.\n                        //\n                        // With `format: 'scale'` the font size follows the tile's area, so\n                        // on a dense treemap most tiles ask for text a few pixels tall,\n                        // which nobody can read. Drawing it is not free: each label has to\n                        // be built and measured against the DOM, and on a 10k-tile chart\n                        // that was the entire render cost (~7.5s, versus ~0.1s once the\n                        // unreadable ones are skipped).\n                        //\n                        // The default sits below the smallest label any bundled sample\n                        // draws, so it only ever removes text that was already illegible.\n                        // Set 0 to draw a label on every tile regardless of size.\n                        minFontSize: 4\n                    },\n                    colorScale: {\n                        inverse: false,\n                        ranges: [],\n                        min: void 0,\n                        max: void 0,\n                        // Colour a tile by a SECOND metric, independent of the value that\n                        // sizes it (area = how big, colour = how it did). Reads\n                        // `datum.colorValue` unless this names another key or supplies an\n                        // accessor `(datum, {seriesIndex, dataPointIndex, w}) => number`.\n                        colorValue: void 0,\n                        // Continuous interpolation between colour stops. Active as soon as\n                        // any datum carries a colour metric; `enabled: false` opts out and\n                        // `true` forces it on. `ranges` is unaffected and still applies\n                        // wherever it is set.\n                        gradient: {\n                            enabled: void 0,\n                            // Domain. Defaults to the extent of the colour metric.\n                            min: void 0,\n                            max: void 0,\n                            // The value the middle colour is pinned to. Defaults to 0 when\n                            // the domain straddles zero (a diverging metric), else none.\n                            midpoint: void 0,\n                            // With a midpoint, balance the domain around it so equal moves\n                            // in either direction read as equally saturated.\n                            symmetric: true,\n                            // Low -> mid -> high. Two colours make a sequential ramp.\n                            colors: void 0,\n                            // Explicit `[{ value, color }]` stops; overrides colors/midpoint.\n                            stops: void 0\n                        },\n                        // Continuous colour legend: a gradient strip with end labels and a\n                        // hover indicator, in place of the categorical legend. Same options\n                        // as the heatmap's.\n                        gradientLegend: {\n                            enabled: false,\n                            width: \"70%\",\n                            height: \"70%\",\n                            thickness: 12,\n                            align: \"center\",\n                            stops: 16,\n                            showLabels: true,\n                            showHoverValue: true,\n                            labelStyle: {\n                                fontSize: \"11px\",\n                                fontFamily: void 0,\n                                colors: void 0\n                            },\n                            arrow: {\n                                size: 8,\n                                color: void 0\n                            },\n                            formatter: void 0\n                        }\n                    },\n                    // Arbitrary-depth treemap: a datum may carry `children`.\n                    nested: {\n                        // Parent containers appear on their own as soon as the data is\n                        // nested; `false` forces the flat two-level layout.\n                        enabled: void 0,\n                        // Read `drilldown: '<id>'` ids as extra levels instead of as a\n                        // click target for the drilldown feature. Off by default, because\n                        // on a treemap that id has always meant \"descend on click\".\n                        drilldownAsLevels: false\n                    },\n                    // How a parent is drawn once the data is nested. Per-level overrides\n                    // go in `levels` below.\n                    parents: {\n                        // 'auto' (default): on when the data carries `children`.\n                        show: \"auto\",\n                        // Inset between a parent's edge and the children inside it.\n                        padding: 4,\n                        fill: void 0,\n                        fillOpacity: 1,\n                        borderColor: void 0,\n                        borderWidth: 1,\n                        borderRadius: void 0,\n                        hover: {\n                            show: true,\n                            color: void 0,\n                            width: 2\n                        },\n                        header: {\n                            show: true,\n                            height: 22,\n                            // Skip the strip on tiles too narrow to show a name.\n                            minWidth: 40,\n                            align: \"left\",\n                            offsetX: 0,\n                            offsetY: 0,\n                            showValue: false,\n                            // (name, { value, depth, seriesIndex, node, w }) => string\n                            formatter: void 0,\n                            style: {\n                                fontSize: \"12px\",\n                                fontFamily: void 0,\n                                fontWeight: 600,\n                                color: void 0,\n                                background: void 0,\n                                cssClass: \"\"\n                            }\n                        },\n                        tooltip: {\n                            // ({ name, value, depth, leafCount, percentOfParent,\n                            //    percentOfTotal, node, w }) => html\n                            formatter: void 0\n                        }\n                    },\n                    // Per-depth overrides of `parents`, indexed from the outermost group\n                    // actually drawn (0 = the series, or the first authored level when a\n                    // single series is unwrapped).\n                    levels: [],\n                    // Click a group to fill the canvas with it; a breadcrumb goes back.\n                    // Ignored when the drilldown feature is active on the same chart:\n                    // both navigate the hierarchy, and drilldown owns the click there.\n                    zoom: {\n                        enabled: false,\n                        // Overrides `drilldown.breadcrumb` for this chart only. Same shape\n                        // (show / position / separator / rootLabel / offsetX / offsetY /\n                        // formatter), so a zoomed treemap and a drilled-in chart present\n                        // the same affordance without importing the drilldown feature.\n                        breadcrumb: void 0\n                    },\n                    seriesTitle: {\n                        show: true,\n                        offsetY: 1,\n                        offsetX: 1,\n                        borderColor: \"#000\",\n                        borderWidth: 1,\n                        borderRadius: 2,\n                        style: {\n                            background: \"rgba(0, 0, 0, 0.6)\",\n                            color: \"#fff\",\n                            fontSize: \"12px\",\n                            fontFamily: void 0,\n                            fontWeight: 400,\n                            cssClass: \"\",\n                            padding: {\n                                left: 6,\n                                right: 6,\n                                top: 2,\n                                bottom: 2\n                            }\n                        }\n                    }\n                },\n                unit: {\n                    // 'grouped' (each category is its own cluster, laid out in a row) |\n                    // 'packed' (one blob; categories coloured + sorted, minority centred) |\n                    // 'columns' (each category is a vertical bar built from stacked dots) |\n                    // 'grid' (one lattice of cells filled in category order - a waffle /\n                    // part-to-whole square \"pie\"; `chart.type:'waffle'` presets this) |\n                    // 'scatter' (units on real value axes: a beeswarm, or a 2D\n                    // value-value scatter - see the `scatter` block below) |\n                    // 'arc' (a semicircular fan) |\n                    // 'custom' (positions come from `positions` below).\n                    layout: \"grouped\",\n                    // `layout: 'custom'` only. The layout provider: either a function\n                    // `(objects, rect) => [{id, x, y, r?}]` returning plot pixels, or the\n                    // name of one registered with `ApexCharts.registerUnitLayout`.\n                    //\n                    // This is the whole extension point. A layout is objects in,\n                    // positions out; it knows nothing about animation, because the engine\n                    // already tweens position, radius and colour and already keeps each\n                    // mark's identity across a relayout. So an arrangement this file\n                    // cannot know about - a country silhouette, a hex grid, a timeline, a\n                    // projection handed over by ApexMaps - is a plugin, not a core edit.\n                    //\n                    // `objects` carries one entry per mark: {id, index, seriesIndex,\n                    // dataPointIndex, label, value, datum, r}. `id` is the datum's own\n                    // id/name when the per-unit object form supplies one, so a provider\n                    // can address a specific unit rather than a positional slot.\n                    //\n                    // A mark whose id the provider omits animates out; ids matching no\n                    // mark are ignored.\n                    positions: void 0,\n                    // Update transition, controlling which previous dot each new dot\n                    // tweens from. 'group' (default): keyed per category, so dots stay in\n                    // their group and category-level enters/exits fade. 'flow': keyed by\n                    // global order, so the anonymous crowd migrates across a regroup (the\n                    // circles-to-bars effect). 'identity': keyed by each datum's id/name,\n                    // so a SPECIFIC unit migrates across any regroup/relayout keeping its\n                    // colour and size (needs the object form with unique ids/names).\n                    transition: \"group\",\n                    // 'circle' | 'square' | 'image' (isotype pictogram).\n                    shape: \"circle\",\n                    // Icon used when shape:'image'. Each unit renders this icon at the\n                    // given size. Set `tint:true` to recolour a monochrome icon to the\n                    // category colour (or a per-unit fillColor) so the pictogram matches\n                    // the legend; leave it off for multi-colour icons that should keep\n                    // their own colours.\n                    image: {\n                        src: void 0,\n                        width: 20,\n                        height: 20,\n                        tint: false\n                    },\n                    // dot radius in px, or 'auto' to size dots so the largest cluster\n                    // fits its allotted box.\n                    size: \"auto\",\n                    // The 'columns' layout can size its dots independently of `size`\n                    // (which the circle layouts / storyboard beats often pin to a\n                    // constant so dots do not resize while migrating). 'inherit' uses\n                    // `size`; 'auto' sizes the dots to fill the plot height; a number\n                    // pins a columns-only size. Circle / square only (image icons keep\n                    // their intrinsic size).\n                    columns: {\n                        size: \"inherit\"\n                    },\n                    // The 'grid' (waffle) layout: one lattice of cells filled in category\n                    // order. `columns` = cells per row. `total` (optional) fixes the cell\n                    // budget - e.g. 100 for a percentage waffle - and largest-remainder\n                    // allocates the cells to categories; leave it undefined for one cell\n                    // per unit (respects unitValue / maxUnits). `fillFrom` picks the first\n                    // row: 'bottom' (default) or 'top'.\n                    //\n                    // `split:true` switches to SMALL MULTIPLES: one mini-waffle per\n                    // category, arranged in a near-square trellis (or `tileColumns` per\n                    // row). Each tile then has `total` cells (default 100) and fills a\n                    // fraction equal to the category's value over `max` (default = the\n                    // largest count, so the leader fills its tile; set `max:100` with\n                    // percentage data for true \"of 100\" tiles). The unfilled cells show as\n                    // a faint `trackColor` backdrop, and each tile gets its own label.\n                    grid: {\n                        columns: 10,\n                        total: void 0,\n                        fillFrom: \"bottom\",\n                        // small-multiple (one waffle per category) mode + its knobs:\n                        split: false,\n                        // tiles per row; undefined = auto (near-square).\n                        tileColumns: void 0,\n                        // value -> filled-cell denominator; undefined = the largest count.\n                        max: void 0,\n                        // colour of the empty \"track\" cells; undefined = a neutral grey.\n                        trackColor: void 0\n                    },\n                    // The 'scatter' layout places each unit on real value axes (needs the\n                    // object-form data). Two modes via `y`:\n                    //  - `y:'lanes'` (default): a BEESWARM. X is the per-unit value axis,\n                    //    Y is a category lane. `spread:'swarm'` packs dots off the centre\n                    //    line so equal values do not overlap; 'jitter' scatters randomly.\n                    //  - `y:'value'`: a 2D value-value scatter. X = each datum's `x`, Y =\n                    //    each datum's `y`, on two numeric axes; category = colour.\n                    // `sizeRange:[min,max]` turns dots into BUBBLES scaled (by area) from\n                    // each datum's `sizeField` (default 'z') - a bubble scatter / bubble\n                    // beeswarm. `tickAmount`/`xMin`/`xMax`/`xTitle`/`xFormatter` control the\n                    // X axis; the `y*` twins the Y axis (2D only); `laneLabelWidth` the\n                    // lane-label gutter (lanes mode); `gridlines` the grid.\n                    scatter: {\n                        y: \"lanes\",\n                        spread: \"swarm\",\n                        // Beeswarm orientation (1D lanes mode only): 'horizontal' lays the\n                        // value on the X axis with category lanes stacked on Y (default);\n                        // 'vertical' lays the value on the Y axis with category lanes as\n                        // columns across X. Ignored for the 2D value-value scatter (y:'value').\n                        orientation: \"horizontal\",\n                        tickAmount: 5,\n                        xMin: void 0,\n                        xMax: void 0,\n                        xTitle: void 0,\n                        // (value) => string\n                        xFormatter: void 0,\n                        yTickAmount: 5,\n                        yMin: void 0,\n                        yMax: void 0,\n                        yTitle: void 0,\n                        // (value) => string\n                        yFormatter: void 0,\n                        // bubble sizing: datum key for the size value + [minR, maxR] in px.\n                        sizeField: \"z\",\n                        sizeRange: void 0,\n                        laneLabelWidth: void 0,\n                        gridlines: true\n                    },\n                    // Opt-in bubble sizing: scale each dot's radius by its per-unit value\n                    // (needs the object-form data). Circle shape only; the lattice is\n                    // spaced for the largest bubble so dots never overlap.\n                    sizeByValue: {\n                        enabled: false,\n                        // radius (px) for the largest value, or 'auto' to fit the largest\n                        // bubble to the plot like uniform auto-sizing.\n                        maxRadius: \"auto\",\n                        // radius (px) for the smallest value; defaults to ~35% of maxRadius.\n                        minRadius: void 0,\n                        // 'area' (bubble AREA proportional to value) | 'linear'.\n                        scale: \"area\"\n                    },\n                    // packing gap factor between spiral shells (1 = dots touch).\n                    spacing: 1.05,\n                    // corner radius for shape:'square'.\n                    borderRadius: 0,\n                    // How marks move between layouts on an update, and where entering\n                    // marks come from.\n                    //\n                    // `motion`: 'spring' settles each mark on a damped spring, so a\n                    // gather interrupted by the next update carries the marks' velocity\n                    // into it instead of restarting them from a standstill - which is\n                    // what a dragged slider or a scrubbed storyboard does on almost every\n                    // frame. 'tween' runs the fixed-duration ease below instead. 'auto'\n                    // (the default) is spring, unless `easing` was set to something other\n                    // than the default, so an explicit curve keeps working without having\n                    // to set `motion` as well.\n                    //\n                    // `spring`: 'crisp' (default) | 'gentle' (softer, for large reflows)\n                    // | 'snappy' (faster, a hint of settle). Scaled by\n                    // `chart.animations.speed`, which stretches the spring in time\n                    // without making it bouncier.\n                    //\n                    // `easing` (tween only): 'outCubic' (default: decelerate to a stop) |\n                    // 'inOutCubic' (accelerate gently out of rest, weighted travel) |\n                    // 'outBack' (overshoot each mark past its slot and spring back - a\n                    // per-mark settle), with `overshoot` tuning the spring strength.\n                    //\n                    // `enter`: where a fresh / appearing mark animates FROM - 'burst'\n                    // (default: fly out from the cluster centre) | 'fade' (materialise in\n                    // place) | 'rise' (fade in while drifting gently up into the slot).\n                    //\n                    // Colour, radius and opacity always stay on the out-cubic, under\n                    // either motion (a back ease overshoots past 1, which would push RGB\n                    // channels / radii out of range; and the spring's rest thresholds are\n                    // absolute, so they are far too coarse for a 0..1 quantity).\n                    gather: {\n                        motion: \"auto\",\n                        spring: \"crisp\",\n                        easing: \"outCubic\",\n                        overshoot: 1.70158,\n                        enter: \"burst\"\n                    },\n                    // The 'arc' layout arranges marks as a PARLIAMENT / hemicycle: seats in\n                    // concentric arced rows across an annulus, filled in category order so\n                    // each category is a contiguous wedge (the classic seating chart). Angles\n                    // use the radialBar convention (0 = top, clockwise); the default sweep is\n                    // a top semicircle (a full circle = startAngle 0, endAngle 360).\n                    // `innerRadiusRatio` is the donut hole (inner radius / outer); `rows`\n                    // fixes the number of seat rows, or 'auto' to size the dots as large as\n                    // fit. Like 'packed' the legend carries the category names (no per-wedge\n                    // labels).\n                    arc: {\n                        startAngle: -90,\n                        endAngle: 90,\n                        innerRadiusRatio: 0.4,\n                        rows: \"auto\"\n                    },\n                    // 1 dot represents this many units of value (waffle scaling).\n                    unitValue: 1,\n                    // safety cap on total dots; counts scale down proportionally above it.\n                    maxUnits: 5e3,\n                    // packed layout: order categories smallest-first so the minority\n                    // group nests in the centre of the blob.\n                    sortByGroup: true,\n                    clusterLabels: {\n                        show: true,\n                        // Label placement relative to the cluster/bar: 'top' (default) or\n                        // 'bottom'. A 'bottom' label is always straight; the curved arc\n                        // (below) rides the top crown only.\n                        position: \"top\",\n                        curved: true,\n                        fontSize: \"13px\",\n                        fontFamily: void 0,\n                        fontWeight: 600,\n                        // defaults to the cluster's own colour when undefined.\n                        color: void 0,\n                        offsetY: 0,\n                        // (name, { seriesIndex, value, percent, w }) => string.\n                        // Return \"\\n\"-separated text to split an outer label over lines.\n                        formatter: void 0,\n                        // Outer (name) labels, as pie/donut draw them: the label sits in the\n                        // margin beside the shape and a leader line joins it to the colour\n                        // band it names, so the crowd needs no legend to be read.\n                        //\n                        // `layout: 'custom'` only, and best on a silhouette whose categories\n                        // stack vertically (the default row ordering): those alternate down\n                        // the left and right gutters. A column-ordered shape sends each\n                        // label to the side its own band sits on.\n                        //\n                        // The margin is taken off BOTH sides so the shape stays centred,\n                        // which means turning this on makes the silhouette a little smaller.\n                        external: {\n                            show: false,\n                            connector: {\n                                show: true,\n                                width: 1.5,\n                                // defaults to the band's own colour when undefined.\n                                color: void 0,\n                                // air between the band's outermost dot and the line's bend.\n                                gap: 8,\n                                // length of the run out to the label.\n                                length: 22\n                            },\n                            offsetX: 0,\n                            offsetY: 0\n                        }\n                    },\n                    tooltip: {\n                        // Per-unit tooltip body. Each dot carries its category (seriesIndex)\n                        // and its index within that category (dataPointIndex), so the\n                        // formatter can look up per-unit data and return a string/HTML.\n                        // ({ seriesName, seriesIndex, dataPointIndex, count, unitValue,\n                        //    color, w }) => string\n                        // Default: \"#<dataPointIndex+1> of <count>\".\n                        formatter: void 0\n                    }\n                },\n                radialBar: {\n                    inverseOrder: false,\n                    startAngle: 0,\n                    endAngle: 360,\n                    offsetX: 0,\n                    offsetY: 0,\n                    // Gauge sub-shape. 'arc' (default) renders the existing filled\n                    // value-arc gauge; 'needle' replaces the value-arc with a rotating\n                    // pointer/needle. Bands and ticks are independent and work for both\n                    // shapes.\n                    shape: \"arc\",\n                    // Value-to-angle mapping. Defaults to the existing 0..100 range\n                    // used by radialBar. Override for gauges that need a custom domain\n                    // (e.g. min: 0, max: 240 for a speedometer).\n                    min: 0,\n                    max: 100,\n                    // Threshold bands rendered as colored arc segments along the gauge\n                    // arc (e.g. [{from:0,to:30,color:'#FF4560'}, ...]). Bands draw\n                    // behind the value-arc and tick marks. Set to [] (default) to\n                    // disable.\n                    bands: [],\n                    bandsStyle: {\n                        // % of arc radius. Slightly less than the value-arc stroke so\n                        // the value-arc reads on top by default.\n                        strokeWidth: \"40%\",\n                        // px gap between consecutive bands.\n                        gap: 0,\n                        // Hide the track when bands cover the full range; the bands\n                        // themselves act as the visual backdrop.\n                        hideTrackWhenPresent: true\n                    },\n                    // Tick marks rendered along (outside) the gauge arc.\n                    ticks: {\n                        show: false,\n                        major: {\n                            count: 11,\n                            length: 10,\n                            width: 2,\n                            color: \"#666\",\n                            // 'inside' draws ticks from `radius - length` to `radius`;\n                            // 'outside' draws from `radius` to `radius + length`.\n                            placement: \"outside\"\n                        },\n                        minor: {\n                            count: 4,\n                            // minor ticks BETWEEN each pair of major ticks\n                            length: 5,\n                            width: 1,\n                            color: \"#999\",\n                            placement: \"outside\"\n                        },\n                        labels: {\n                            show: false,\n                            offset: 6,\n                            fontSize: \"11px\",\n                            fontFamily: void 0,\n                            fontWeight: 400,\n                            color: \"#666\",\n                            /** @param {number} v */ formatter (v2) {\n                                return String(v2);\n                            }\n                        }\n                    },\n                    // Needle/dial configuration. Only applies when `shape: 'needle'`.\n                    needle: {\n                        color: \"#333\",\n                        // Needle length as a % of the gauge radius (string like '85%')\n                        // or as an absolute px number.\n                        length: \"85%\",\n                        // px width of the needle line at the base.\n                        baseWidth: 4,\n                        // px width of the needle tip (tapered if smaller than baseWidth).\n                        tipWidth: 1,\n                        // px offset from the geometric arc center on Y. Positive values\n                        // push the needle base down (toward the chord midpoint of a\n                        // ∩-shape gauge); negative pushes up. The needle rotates around\n                        // this shifted point.\n                        offsetY: 0,\n                        // When true, also render the filled value-arc alongside the\n                        // needle. Default false preserves the previous needle-only\n                        // behavior. Useful for gauges that want a progress ring plus a\n                        // pointer indicator.\n                        showValueArc: false,\n                        animation: {\n                            enabled: true,\n                            duration: 800,\n                            easing: \"ease-out\"\n                        }\n                    },\n                    hollow: {\n                        margin: 5,\n                        size: \"50%\",\n                        background: \"transparent\",\n                        image: void 0,\n                        imageWidth: 150,\n                        imageHeight: 150,\n                        imageOffsetX: 0,\n                        imageOffsetY: 0,\n                        imageClipped: true,\n                        position: \"front\",\n                        // Optional stroke around the hollow ring. Combined with\n                        // `strokeDasharray` this produces a dashed indicator circle\n                        // around the value text — useful for gauge designs where the\n                        // value sits inside its own boundary.\n                        stroke: void 0,\n                        strokeWidth: 1,\n                        strokeDasharray: void 0,\n                        dropShadow: {\n                            enabled: false,\n                            top: 0,\n                            left: 0,\n                            blur: 3,\n                            color: \"#000\",\n                            opacity: 0.5\n                        }\n                    },\n                    track: {\n                        show: true,\n                        startAngle: void 0,\n                        endAngle: void 0,\n                        background: \"#f2f2f2\",\n                        strokeWidth: \"97%\",\n                        opacity: 1,\n                        margin: 5,\n                        // margin is in pixels\n                        dropShadow: {\n                            enabled: false,\n                            top: 0,\n                            left: 0,\n                            blur: 3,\n                            color: \"#000\",\n                            opacity: 0.5\n                        }\n                    },\n                    dataLabels: {\n                        show: true,\n                        name: {\n                            show: true,\n                            fontSize: \"16px\",\n                            fontFamily: void 0,\n                            fontWeight: 600,\n                            color: void 0,\n                            offsetY: 0,\n                            /**\n               * @param {any} val\n               */ formatter (val) {\n                                return val;\n                            }\n                        },\n                        value: {\n                            show: true,\n                            fontSize: \"14px\",\n                            fontFamily: void 0,\n                            fontWeight: 400,\n                            color: void 0,\n                            offsetY: 16,\n                            /**\n               * @param {any} val\n               */ formatter (val) {\n                                return val + \"%\";\n                            }\n                        },\n                        total: {\n                            show: false,\n                            label: \"Total\",\n                            fontSize: \"16px\",\n                            fontWeight: 600,\n                            fontFamily: void 0,\n                            color: void 0,\n                            /**\n               * @param {import('../../types/internal').ChartStateW} w\n               */ formatter (w2) {\n                                return(/**\n                   * @param {number} a\n                   * @param {number} b\n                   */ w2.globals.seriesTotals.reduce((a2, b2)=>a2 + b2, 0) / w2.seriesData.series.length + \"%\");\n                            }\n                        }\n                    },\n                    barLabels: {\n                        enabled: false,\n                        offsetX: 0,\n                        offsetY: 0,\n                        useSeriesColors: true,\n                        fontFamily: void 0,\n                        fontWeight: 600,\n                        fontSize: \"16px\",\n                        /**\n             * @param {any} val\n             */ formatter (val) {\n                            return val;\n                        },\n                        onClick: void 0\n                    }\n                },\n                pie: {\n                    customScale: 1,\n                    offsetX: 0,\n                    offsetY: 0,\n                    startAngle: 0,\n                    endAngle: 360,\n                    expandOnClick: true,\n                    // How far a clicked slice slides out of the pie (px), measured along\n                    // its own mid-angle. The slice is translated, not redrawn at a bigger\n                    // radius, so its shape and the quantity it encodes are unchanged and\n                    // a gap opens between it and the rest of the pie. The inner\n                    // percentage label (and the outer name label, when enabled) ride\n                    // along with it. Ignored for polarArea, where the radius is the\n                    // value, and in a drilldown pie/donut, where a click navigates (the\n                    // slice would slide out only to be discarded by the drill, and\n                    // states.active takes the click feedback back over). Set 0 to keep\n                    // the slice in place.\n                    expandOffset: 10,\n                    // Hover outline: a translucent band traced just outside the rim of\n                    // the hovered slice, so the slice keeps its own colour instead of\n                    // being lightened. Takes the place of the states.hover filter for\n                    // pie / donut / polarArea, and is skipped entirely when\n                    // states.hover.filter.type is 'none' (that stays the way to turn all\n                    // hover feedback off). Applies to pie, donut and polarArea.\n                    hoverOutline: {\n                        show: true,\n                        size: 8,\n                        // band thickness (px)\n                        // Extra clearance between the slice rim and the band (px), ON TOP\n                        // of the slice stroke: the band always starts at the outer edge of\n                        // the stroke, never under it. Default 0, because a stroke is\n                        // normally present (stroke.width defaults to 2) and already reads\n                        // as the separation. Any gap beyond that and the band stops\n                        // belonging to its slice and starts reading as a ring of its own.\n                        gap: 0,\n                        opacity: 0.3,\n                        // band opacity, over the slice colour\n                        color: void 0\n                    },\n                    // Rounds the corners of each slice (in px). Applies to pie, donut and\n                    // polarArea (all rendered by the Pie module). 0 = sharp corners\n                    // (default, unchanged behavior). The value is clamped per slice so\n                    // opposing corner fillets never cross on thin/narrow slices.\n                    borderRadius: 0,\n                    // Gap between adjacent slices (in px). Applies to pie, donut and\n                    // polarArea. 0 = slices touch (default). Each slice is inset\n                    // symmetrically, so its mid-angle (data label + hit region) is kept.\n                    spacing: 0,\n                    dataLabels: {\n                        // These are the percentage values which are displayed on slice\n                        offset: 0,\n                        // offset by which labels will move outside\n                        minAngleToShowLabel: 10,\n                        // External (outer) labels: render the category/series name outside\n                        // the slice, joined to it by a leader (connector) line, so users\n                        // don't have to map legend colors back to slices. The percentage\n                        // keeps rendering inside the slice (governed by dataLabels.enabled).\n                        // Pie + donut only; ignored for polarArea (radial length already\n                        // encodes the value there).\n                        external: {\n                            show: false,\n                            // master switch for the external (outer) labels\n                            offsetX: 0,\n                            offsetY: 0,\n                            fontSize: void 0,\n                            // falls back to dataLabels.style.fontSize\n                            fontFamily: void 0,\n                            // falls back to dataLabels.style.fontFamily\n                            fontWeight: void 0,\n                            // falls back to dataLabels.style.fontWeight\n                            color: void 0,\n                            // defaults to chart.foreColor (readable text)\n                            /**\n               * Return a string (single line) or an array of strings (stacked\n               * lines, e.g. [name, percent + '%']).\n               * @param {string} name\n               * @param {{ seriesIndex: number, percent: number, value: number, w: any }} opts\n               * @returns {string | string[]}\n               */ formatter: void 0,\n                            connector: {\n                                show: true,\n                                width: 1,\n                                color: void 0,\n                                // defaults to the slice color\n                                length: 16,\n                                // horizontal run after the radial elbow (px)\n                                gap: 6\n                            }\n                        }\n                    },\n                    donut: {\n                        size: \"65%\",\n                        background: \"transparent\",\n                        labels: {\n                            // These are the inner labels appearing inside donut\n                            show: false,\n                            name: {\n                                show: true,\n                                fontSize: \"16px\",\n                                fontFamily: void 0,\n                                fontWeight: 600,\n                                color: void 0,\n                                offsetY: -10,\n                                /**\n                 * @param {any} val\n                 */ formatter (val) {\n                                    return val;\n                                }\n                            },\n                            value: {\n                                show: true,\n                                fontSize: \"20px\",\n                                fontFamily: void 0,\n                                fontWeight: 400,\n                                color: void 0,\n                                offsetY: 10,\n                                /**\n                 * @param {any} val\n                 */ formatter (val) {\n                                    return val;\n                                }\n                            },\n                            total: {\n                                show: false,\n                                showAlways: false,\n                                label: \"Total\",\n                                fontSize: \"16px\",\n                                fontWeight: 400,\n                                fontFamily: void 0,\n                                color: void 0,\n                                /**\n                 * @param {import('../../types/internal').ChartStateW} w\n                 */ formatter (w2) {\n                                    return w2.globals.seriesTotals.reduce((a2, b2)=>a2 + b2, 0);\n                                }\n                            }\n                        }\n                    }\n                },\n                polarArea: {\n                    rings: {\n                        strokeWidth: 1,\n                        strokeColor: \"#e8e8e8\"\n                    },\n                    spokes: {\n                        strokeWidth: 1,\n                        connectorColors: \"#e8e8e8\"\n                    }\n                },\n                sunburst: {\n                    // Sunburst / nested pie-donut (hierarchical radial). Rings go from the\n                    // centre hole outward, one per hierarchy level; each child arc is\n                    // nested inside its parent's angular wedge.\n                    offsetX: 0,\n                    offsetY: 0,\n                    startAngle: 0,\n                    endAngle: 360,\n                    // Centre hole radius, as a % of the max radius (like donut size).\n                    innerSize: \"15%\",\n                    // Corner rounding + inter-arc gap (px), same semantics as the pie\n                    // family (see plotOptions.pie.borderRadius / .spacing).\n                    borderRadius: 0,\n                    spacing: 1,\n                    // How a branch that bottoms out before the deepest level is drawn:\n                    // 'extend' stretches the leaf arc out to the rim (default, matches\n                    // d3); 'stop' leaves the outer rings empty behind it.\n                    leaf: \"extend\",\n                    // Angular partition of a parent's wedge among its children:\n                    // 'normalize' splits by each child's share of its siblings (safe for\n                    // any data); 'strict' expects children to sum to the parent's value.\n                    partition: \"normalize\",\n                    // Each depth level is tinted this much lighter than its parent colour\n                    // (0 = keep parent colour, 1 = white). A per-node `color` overrides.\n                    tint: 0.14,\n                    // Click a wedge to zoom into that branch (its subtree fills the\n                    // chart; a breadcrumb walks back). Click the focused inner ring to\n                    // zoom out. Set false to disable.\n                    zoomOnClick: true,\n                    dataLabels: {\n                        show: true,\n                        // Hide the label on any arc narrower than this (degrees), so tiny\n                        // wedges do not overflow with text.\n                        minAngleToShow: 8,\n                        style: {\n                            fontSize: \"12px\",\n                            fontFamily: void 0,\n                            fontWeight: 400,\n                            colors: void 0\n                        }\n                    }\n                },\n                radar: {\n                    size: void 0,\n                    offsetX: 0,\n                    offsetY: 0,\n                    polygons: {\n                        // strokeColor: '#e8e8e8', // should be deprecated in the minor version i.e 3.2\n                        strokeWidth: 1,\n                        strokeColors: \"#e8e8e8\",\n                        connectorColors: \"#e8e8e8\",\n                        fill: {\n                            colors: void 0\n                        }\n                    }\n                }\n            },\n            colors: void 0,\n            dataLabels: {\n                enabled: true,\n                enabledOnSeries: void 0,\n                /**\n         * @param {any} val\n         */ formatter (val) {\n                    return val !== null ? val : \"\";\n                },\n                textAnchor: \"middle\",\n                distributed: false,\n                offsetX: 0,\n                offsetY: 0,\n                style: {\n                    fontSize: \"12px\",\n                    fontFamily: void 0,\n                    fontWeight: 600,\n                    colors: void 0\n                },\n                background: {\n                    enabled: true,\n                    foreColor: \"#fff\",\n                    backgroundColor: void 0,\n                    borderRadius: 2,\n                    padding: 4,\n                    opacity: 0.9,\n                    borderWidth: 1,\n                    borderColor: \"#fff\",\n                    dropShadow: {\n                        enabled: false,\n                        top: 1,\n                        left: 1,\n                        blur: 1,\n                        color: \"#000\",\n                        opacity: 0.8\n                    }\n                },\n                dropShadow: {\n                    enabled: false,\n                    top: 1,\n                    left: 1,\n                    blur: 1,\n                    color: \"#000\",\n                    opacity: 0.8\n                },\n                // Ride data labels to their new position on a data-change update\n                // (e.g. a bar chart race), instead of snapping. Off by default so\n                // existing charts are unchanged. Speed/easing follow\n                // chart.animations.dynamicAnimation. Bar/column only.\n                animate: {\n                    enabled: false\n                },\n                // Count the numeric value up/down from its previous value on update,\n                // like countUp.js. Off by default. The dataLabels.formatter runs each\n                // frame, so number formatting (decimals, separators, prefixes) is\n                // preserved. Bar/column only.\n                countUp: {\n                    enabled: false\n                }\n            },\n            fill: {\n                type: \"solid\",\n                colors: void 0,\n                // array of colors\n                opacity: 0.85,\n                gradient: {\n                    shade: \"dark\",\n                    type: \"horizontal\",\n                    shadeIntensity: 0.5,\n                    gradientToColors: void 0,\n                    inverseColors: true,\n                    opacityFrom: 1,\n                    opacityTo: 1,\n                    stops: [\n                        0,\n                        50,\n                        100\n                    ],\n                    colorStops: []\n                },\n                image: {\n                    src: [],\n                    width: void 0,\n                    // optional\n                    height: void 0\n                },\n                pattern: {\n                    style: \"squares\",\n                    // String | Array of Strings\n                    width: 6,\n                    height: 6,\n                    strokeWidth: 2\n                }\n            },\n            forecastDataPoints: {\n                count: 0,\n                fillOpacity: 0.5,\n                strokeWidth: void 0,\n                dashArray: 4\n            },\n            grid: {\n                show: true,\n                borderColor: \"#e0e0e0\",\n                strokeDashArray: 0,\n                position: \"back\",\n                xaxis: {\n                    lines: {\n                        show: false\n                    }\n                },\n                yaxis: {\n                    lines: {\n                        show: true\n                    }\n                },\n                row: {\n                    colors: void 0,\n                    // takes as array which will be repeated on rows\n                    opacity: 0.5\n                },\n                column: {\n                    colors: void 0,\n                    // takes an array which will be repeated on columns\n                    opacity: 0.5\n                },\n                padding: {\n                    top: 0,\n                    right: 10,\n                    bottom: 0,\n                    left: 12\n                }\n            },\n            labels: [],\n            drilldown: {\n                // Opt-in. When false, the Drilldown feature module stays inert even if\n                // it was imported. Requires `import 'apexcharts/features/drilldown'`.\n                enabled: false,\n                // Child levels referenced by a data point's `drilldown: '<id>'` field.\n                // Each: { id, name?, data, chart?, xaxis?, yaxis?, colors?, plotOptions? }\n                series: [],\n                breadcrumb: {\n                    show: true,\n                    position: \"top-left\",\n                    // 'top-left' | 'top-right'\n                    separator: \" / \",\n                    rootLabel: \"All\",\n                    offsetX: 0,\n                    offsetY: 0\n                },\n                // Animation is delegated to the chart's update pipeline; `enabled`\n                // gates whether the drill transition animates at all.\n                animation: {\n                    enabled: true,\n                    // Anchor the drill transition at the clicked point: the child unfolds\n                    // outward from it (and settles back on drill-up) instead of the chart\n                    // simply re-rendering. A gentle scale layered on the SVG; opt-in.\n                    zoomFromPoint: false,\n                    // Base duration (ms) of the transition, used only when zoomFromPoint\n                    // is true. The fade-out phase runs a little shorter than this.\n                    speed: 260\n                },\n                // Optional async resolver, called when a drillable point has no inline\n                // match in `series`. Receives ({ id, point, seriesIndex, dataPointIndex })\n                // and returns a level (or a promise of one). A throw, a rejection, or a\n                // resolved value without a `data` array leaves the chart exactly where\n                // it was and fires `drillDownError` - a failed fetch is ordinary, not\n                // a reason to strand the view.\n                // onDrillDown: undefined,\n                // Overlay shown while an async level resolves. `text` is optional: with\n                // none, the spinner shows alone (and carries 'Loading' as its\n                // accessible name), which keeps the default free of any language.\n                loading: {\n                    show: true\n                },\n                // Cache levels resolved by `onDrillDown`, keyed by id, so drilling back\n                // down a branch does not re-fetch it. Call `chart.drillDown` module's\n                // clearCache() when the data behind an already-drilled chart changes.\n                cache: true,\n                // The dot that marks a drillable point on a line/area chart drawn\n                // without markers. A bar, slice, tile or cell is already a visible,\n                // clickable mark; a line point is not, so without this the chart would\n                // give no sign that anything can be opened. Only drillable points get\n                // one, which is what makes them read as openable. Set `show: false` to\n                // supply your own affordance (turning `markers.size` on, for instance).\n                // Omitted colours inherit the series marker defaults.\n                marker: {\n                    show: true,\n                    size: 6,\n                    // shape: undefined,      // 'circle' | 'square' | 'rect'\n                    // fillColor: undefined,  // defaults to the series colour\n                    strokeColor: \"#fff\"\n                }\n            },\n            legend: {\n                show: true,\n                showForSingleSeries: false,\n                showForNullSeries: true,\n                showForZeroSeries: true,\n                floating: false,\n                position: \"bottom\",\n                // whether to position legends in 1 of 4\n                // direction - top, bottom, left, right\n                horizontalAlign: \"center\",\n                // when position top/bottom, you can specify whether to align legends left, right or center\n                inverseOrder: false,\n                fontSize: \"12px\",\n                fontFamily: void 0,\n                fontWeight: 400,\n                width: void 0,\n                height: void 0,\n                formatter: void 0,\n                tooltipHoverFormatter: void 0,\n                offsetX: -20,\n                offsetY: 4,\n                customLegendItems: [],\n                clusterGroupedSeries: true,\n                clusterGroupedSeriesOrientation: \"vertical\",\n                labels: {\n                    colors: void 0,\n                    useSeriesColors: false\n                },\n                markers: {\n                    size: 7,\n                    fillColors: void 0,\n                    strokeWidth: 1,\n                    shape: void 0,\n                    offsetX: 0,\n                    offsetY: 0,\n                    customHTML: void 0,\n                    onClick: void 0\n                },\n                itemMargin: {\n                    horizontal: 5,\n                    vertical: 4\n                },\n                onItemClick: {\n                    toggleDataSeries: true\n                },\n                onItemHover: {\n                    highlightDataSeries: true\n                }\n            },\n            markers: {\n                discrete: [],\n                size: 0,\n                colors: void 0,\n                strokeColors: \"#fff\",\n                strokeWidth: 2,\n                strokeOpacity: 0.9,\n                strokeDashArray: 0,\n                fillOpacity: 1,\n                shape: \"circle\",\n                offsetX: 0,\n                offsetY: 0,\n                showNullDataPoints: true,\n                onClick: void 0,\n                onDblClick: void 0,\n                hover: {\n                    size: void 0,\n                    sizeOffset: 3\n                }\n            },\n            noData: {\n                text: void 0,\n                align: \"center\",\n                offsetX: 0,\n                offsetY: 0,\n                style: {\n                    color: void 0,\n                    fontSize: \"14px\",\n                    fontFamily: void 0\n                }\n            },\n            responsive: [],\n            // breakpoints should follow ascending order 400, then 700, then 1000\n            series: void 0,\n            states: {\n                hover: {\n                    filter: {\n                        type: \"lighten\",\n                        value: 0.15\n                    }\n                },\n                active: {\n                    allowMultipleDataPointsSelection: false,\n                    filter: {\n                        type: \"darken\",\n                        value: 0.35\n                    }\n                }\n            },\n            title: {\n                text: void 0,\n                align: \"left\",\n                margin: 5,\n                offsetX: 0,\n                offsetY: 0,\n                floating: false,\n                style: {\n                    fontSize: \"14px\",\n                    fontWeight: 900,\n                    fontFamily: void 0,\n                    color: void 0\n                }\n            },\n            subtitle: {\n                text: void 0,\n                align: \"left\",\n                margin: 5,\n                offsetX: 0,\n                offsetY: 30,\n                floating: false,\n                style: {\n                    fontSize: \"12px\",\n                    fontWeight: 400,\n                    fontFamily: void 0,\n                    color: void 0\n                }\n            },\n            stroke: {\n                show: true,\n                curve: \"smooth\",\n                // \"smooth\" / \"straight\" / \"monotoneCubic\" / \"stepline\" / \"linestep\"\n                lineCap: \"butt\",\n                // round, butt , square\n                width: 2,\n                colors: void 0,\n                // array of colors\n                dashArray: 0,\n                // single value or array of values\n                fill: {\n                    type: \"solid\",\n                    colors: void 0,\n                    // array of colors\n                    opacity: 0.85,\n                    gradient: {\n                        shade: \"dark\",\n                        type: \"horizontal\",\n                        shadeIntensity: 0.5,\n                        gradientToColors: void 0,\n                        inverseColors: true,\n                        opacityFrom: 1,\n                        opacityTo: 1,\n                        stops: [\n                            0,\n                            50,\n                            100\n                        ],\n                        colorStops: []\n                    }\n                }\n            },\n            tooltip: {\n                enabled: true,\n                enabledOnSeries: void 0,\n                shared: true,\n                hideEmptySeries: false,\n                followCursor: false,\n                // when disabled, the tooltip will show on top of the series instead of mouse position\n                intersect: false,\n                // when enabled, tooltip will only show when user directly hovers over point\n                inverseOrder: false,\n                arrow: true,\n                custom: void 0,\n                fillSeriesColor: false,\n                theme: \"light\",\n                cssClass: \"\",\n                style: {\n                    fontSize: \"12px\",\n                    fontFamily: void 0,\n                    background: void 0\n                },\n                onDatasetHover: {\n                    highlightDataSeries: false\n                },\n                x: {\n                    // x value\n                    show: true,\n                    format: \"dd MMM\",\n                    // dd/MM, dd MMM yy, dd MMM yyyy\n                    formatter: void 0\n                },\n                y: {\n                    formatter: void 0,\n                    title: {\n                        /**\n             * @param {string} seriesName\n             */ formatter (seriesName) {\n                            return seriesName ? seriesName + \": \" : \"\";\n                        }\n                    }\n                },\n                z: {\n                    formatter: void 0,\n                    title: \"Size: \"\n                },\n                marker: {\n                    show: true,\n                    fillColors: void 0\n                },\n                items: {\n                    display: \"flex\"\n                },\n                fixed: {\n                    enabled: false,\n                    position: \"topRight\",\n                    // topRight, topLeft, bottomRight, bottomLeft\n                    offsetX: 0,\n                    offsetY: 0\n                }\n            },\n            xaxis: {\n                type: \"category\",\n                categories: [],\n                convertedCatToNumeric: false,\n                // internal property which should not be altered outside\n                offsetX: 0,\n                offsetY: 0,\n                overwriteCategories: void 0,\n                labels: {\n                    show: true,\n                    rotate: -45,\n                    rotateAlways: false,\n                    hideOverlappingLabels: true,\n                    trim: false,\n                    minHeight: void 0,\n                    maxHeight: 120,\n                    showDuplicates: true,\n                    style: {\n                        colors: [],\n                        fontSize: \"12px\",\n                        fontWeight: 400,\n                        fontFamily: void 0,\n                        cssClass: \"\"\n                    },\n                    offsetX: 0,\n                    offsetY: 0,\n                    format: void 0,\n                    formatter: void 0,\n                    // custom formatter function which will override format\n                    datetimeUTC: true,\n                    datetimeFormatter: {\n                        // Base format per interval unit. TimeScale.formatDates folds in\n                        // coarser context automatically when the data range spans it\n                        // (e.g. month-scale across years → 'MMM yyyy', hour-scale across\n                        // days → 'dd MMM HH:mm'). Customizing a base format that already\n                        // includes the higher-unit token disables the auto-expansion for\n                        // that level.\n                        year: \"yyyy\",\n                        month: \"MMM\",\n                        day: \"dd MMM\",\n                        hour: \"HH:mm\",\n                        minute: \"HH:mm\",\n                        second: \"HH:mm:ss\"\n                    }\n                },\n                group: {\n                    groups: [],\n                    style: {\n                        colors: [],\n                        fontSize: \"12px\",\n                        fontWeight: 400,\n                        fontFamily: void 0,\n                        cssClass: \"\"\n                    }\n                },\n                axisBorder: {\n                    show: true,\n                    color: \"#e0e0e0\",\n                    width: \"100%\",\n                    height: 1,\n                    offsetX: 0,\n                    offsetY: 0\n                },\n                axisTicks: {\n                    show: true,\n                    color: \"#e0e0e0\",\n                    height: 6,\n                    offsetX: 0,\n                    offsetY: 0\n                },\n                stepSize: void 0,\n                tickAmount: void 0,\n                tickPlacement: \"on\",\n                min: void 0,\n                max: void 0,\n                range: void 0,\n                floating: false,\n                decimalsInFloat: void 0,\n                position: \"bottom\",\n                title: {\n                    text: void 0,\n                    offsetX: 0,\n                    offsetY: 0,\n                    style: {\n                        color: void 0,\n                        fontSize: \"12px\",\n                        fontWeight: 900,\n                        fontFamily: void 0,\n                        cssClass: \"\"\n                    }\n                },\n                crosshairs: {\n                    show: true,\n                    width: 1,\n                    // tickWidth/barWidth or an integer\n                    position: \"back\",\n                    opacity: 0.9,\n                    stroke: {\n                        color: \"#b6b6b6\",\n                        width: 1,\n                        dashArray: 3\n                    },\n                    fill: {\n                        type: \"solid\",\n                        // solid, gradient\n                        color: \"#B1B9C4\",\n                        gradient: {\n                            colorFrom: \"#D8E3F0\",\n                            colorTo: \"#BED1E6\",\n                            stops: [\n                                0,\n                                100\n                            ],\n                            opacityFrom: 0.4,\n                            opacityTo: 0.5\n                        }\n                    },\n                    dropShadow: {\n                        enabled: false,\n                        left: 0,\n                        top: 0,\n                        blur: 1,\n                        opacity: 0.8\n                    }\n                },\n                tooltip: {\n                    enabled: false,\n                    offsetY: 0,\n                    formatter: void 0,\n                    style: {\n                        fontSize: \"12px\",\n                        fontFamily: void 0\n                    }\n                }\n            },\n            yaxis: this.yAxis,\n            theme: {\n                mode: \"\",\n                palette: \"palette1\",\n                // If defined, it will overwrite globals.colors variable\n                // Facet (#13): read `--apx-*` CSS design tokens from the cascade\n                // (accent/fore/grid/surface + series-1..N). true (default) reads any\n                // present (absence is a no-op); false disables. Tokens top the\n                // resolution chain below explicit config. Tokens are re-read on every\n                // render; call chart.refreshTokens() to pick up a runtime CSS change\n                // that does not itself trigger a render.\n                tokens: true,\n                // Facet (#13): 'os' follows prefers-color-scheme + prefers-contrast\n                // reactively (SSR-safe, cleaned up on destroy). false disables.\n                follow: false,\n                // 'os' | false\n                // Facet (#13): a theme registered via ApexCharts.registerTheme(name, def)\n                name: \"\",\n                // '' | registered theme name\n                monochrome: {\n                    // monochrome allows you to select just 1 color and fill out the rest with light/dark shade (intensity can be selected)\n                    enabled: false,\n                    color: \"#008FFB\",\n                    shadeTo: \"light\",\n                    shadeIntensity: 0.65\n                },\n                accessibility: {\n                    colorBlindMode: \"\"\n                }\n            }\n        };\n    }\n}\nconst $e4b487e979d7c06d$var$TYPE_OWNED = \"_apexOwnedByType\";\nconst $e4b487e979d7c06d$var$ownedBy = (types, fn)=>{\n    const marked = /** @type {any} */ fn;\n    marked[$e4b487e979d7c06d$var$TYPE_OWNED] = types;\n    return fn;\n};\nconst $e4b487e979d7c06d$var$TYPE_OWNED_PATHS = [\n    // What the tooltip reads and how it resolves a hover. `custom` is the sharp\n    // one: each built-in reads globals only its own type fills.\n    \"tooltip.custom\",\n    \"tooltip.shared\",\n    \"tooltip.intersect\",\n    \"tooltip.followCursor\",\n    // Whether values are written on the marks, and how they are phrased. A pie's\n    // percentage formatter handed a treemap a category name.\n    \"dataLabels.enabled\",\n    \"dataLabels.formatter\",\n    \"plotOptions.bar.dataLabels.position\",\n    // A box plot's outlier markers are hit targets; a violin draws none.\n    \"markers.size\",\n    // Hover and select feedback, off by design on the types that draw their own.\n    \"states.hover.filter.type\",\n    \"states.active.filter.type\",\n    // Axis chrome that exists to be pointed at.\n    \"xaxis.crosshairs.width\",\n    \"xaxis.tickPlacement\",\n    \"xaxis.tooltip.enabled\",\n    // Interaction the type either supports or does not: a violin's categories\n    // cannot be range-zoomed, and an index-keyed summary animates as churn.\n    \"chart.zoom.enabled\",\n    \"chart.animations.dynamicAnimation.enabled\"\n];\nconst $e4b487e979d7c06d$var$readPath = (obj, path)=>{\n    let cur = /** @type {any} */ obj;\n    for (const key of path.split(\".\")){\n        if (cur == null || typeof cur !== \"object\") return void 0;\n        cur = cur[key];\n    }\n    return cur;\n};\nconst $e4b487e979d7c06d$var$writePath = (obj, path, value)=>{\n    const keys = path.split(\".\");\n    const last = keys.pop();\n    let cur = /** @type {any} */ obj;\n    for (const key of keys){\n        if (cur[key] == null || typeof cur[key] !== \"object\") cur[key] = {};\n        cur = cur[key];\n    }\n    if (value === void 0) delete cur[/** @type {string} */ last];\n    else cur[/** @type {string} */ last] = value;\n};\nconst $e4b487e979d7c06d$var$TYPE_ALIASES = {\n    funnel: \"bar\",\n    pyramid: \"bar\",\n    gauge: \"radialBar\",\n    waffle: \"unit\",\n    histogram: \"bar\"\n};\nconst $e4b487e979d7c06d$var$typeOpts = (type, config)=>{\n    var _a, _b;\n    const base = /** @type {Record<string, string>} */ $e4b487e979d7c06d$var$TYPE_ALIASES[type];\n    return {\n        chart: {\n            type: base || type,\n            requestedType: base ? type : void 0,\n            // Stacking belongs to the chart, not to its type, so both sides see it.\n            stacked: (_a = config.chart) == null ? void 0 : _a.stacked\n        },\n        plotOptions: {\n            bar: {\n                isFunnel: type === \"funnel\" || type === \"pyramid\"\n            },\n            histogram: (_b = config.plotOptions) == null ? void 0 : _b.histogram\n        },\n        // The histogram's defaults read the series to decide whether overlaid bins\n        // share a tooltip. Both sides are asked with the series the chart has now.\n        series: config.series,\n        yaxis: [\n            {\n                title: {},\n                labels: {},\n                axisBorder: {},\n                axisTicks: {}\n            }\n        ]\n    };\n};\nconst $e4b487e979d7c06d$var$isUntouched = (current, fromDefault)=>{\n    if (typeof current === \"function\") {\n        if (Array.isArray(/** @type {any} */ current[$e4b487e979d7c06d$var$TYPE_OWNED])) return true;\n        return typeof fromDefault === \"function\" && String(current) === String(fromDefault);\n    }\n    if (typeof fromDefault === \"function\") return current === void 0;\n    if (current === fromDefault) return true;\n    try {\n        return JSON.stringify(current) === JSON.stringify(fromDefault);\n    } catch (e2) {\n        return false;\n    }\n};\nconst $e4b487e979d7c06d$var$getRangeValues = ({ isTimeline: isTimeline, seriesIndex: seriesIndex, dataPointIndex: dataPointIndex, y1: y1, y2: y2, w: w2 })=>{\n    var _a;\n    let start = w2.rangeData.seriesRangeStart[seriesIndex][dataPointIndex];\n    let end = w2.rangeData.seriesRangeEnd[seriesIndex][dataPointIndex];\n    let ylabel = w2.labelData.labels[dataPointIndex];\n    let seriesName = w2.config.series[seriesIndex].name ? w2.config.series[seriesIndex].name : \"\";\n    const yLbFormatter = w2.formatters.ttKeyFormatter;\n    const yLbTitleFormatter = w2.config.tooltip.y.title.formatter;\n    const opts = {\n        w: w2,\n        seriesIndex: seriesIndex,\n        dataPointIndex: dataPointIndex,\n        start: start,\n        end: end\n    };\n    if (typeof yLbTitleFormatter === \"function\") seriesName = yLbTitleFormatter(seriesName, opts);\n    if ((_a = w2.config.series[seriesIndex].data[dataPointIndex]) == null ? void 0 : _a.x) ylabel = w2.config.series[seriesIndex].data[dataPointIndex].x;\n    if (!isTimeline) {\n        if (w2.config.xaxis.type === \"datetime\") {\n            const xFormat = new $e4b487e979d7c06d$var$Formatters(w2);\n            ylabel = xFormat.xLabelFormat(w2.formatters.ttKeyFormatter, ylabel, ylabel, {\n                i: void 0,\n                dateFormatter: new $e4b487e979d7c06d$var$DateTime(w2).formatDate,\n                w: w2\n            });\n        }\n    }\n    if (typeof yLbFormatter === \"function\") ylabel = yLbFormatter(ylabel, opts);\n    if (Number.isFinite(y1) && Number.isFinite(y2)) {\n        start = y1;\n        end = y2;\n    }\n    let startVal = \"\";\n    let endVal = \"\";\n    const color = w2.globals.colors[seriesIndex];\n    if (w2.config.tooltip.x.formatter === void 0) {\n        if (w2.config.xaxis.type === \"datetime\") {\n            const datetimeObj = new $e4b487e979d7c06d$var$DateTime(w2);\n            startVal = datetimeObj.formatDate(datetimeObj.getDate(start), w2.config.tooltip.x.format);\n            endVal = datetimeObj.formatDate(datetimeObj.getDate(end), w2.config.tooltip.x.format);\n        } else {\n            startVal = start;\n            endVal = end;\n        }\n    } else {\n        startVal = w2.config.tooltip.x.formatter(start);\n        endVal = w2.config.tooltip.x.formatter(end);\n    }\n    return {\n        start: start,\n        end: end,\n        startVal: startVal,\n        endVal: endVal,\n        ylabel: ylabel,\n        color: color,\n        seriesName: seriesName\n    };\n};\nconst $e4b487e979d7c06d$var$buildRangeTooltipHTML = (opts)=>{\n    let { color: color, seriesName: seriesName, ylabel: ylabel, start: start, end: end, seriesIndex: seriesIndex, dataPointIndex: dataPointIndex } = opts;\n    const formatter = opts.w.globals.tooltip.tooltipLabels.getFormatters(seriesIndex);\n    start = formatter.yLbFormatter(start);\n    end = formatter.yLbFormatter(end);\n    const val = formatter.yLbFormatter(opts.w.seriesData.series[seriesIndex][dataPointIndex]);\n    let valueHTML = \"\";\n    const rangeValues = `<span class=\"value start-value\">\n  ${start}\n  </span> <span class=\"separator\">-</span> <span class=\"value end-value\">\n  ${end}\n  </span>`;\n    if (opts.w.globals.comboCharts) {\n        if (opts.w.config.series[seriesIndex].type === \"rangeArea\" || opts.w.config.series[seriesIndex].type === \"rangeBar\") valueHTML = rangeValues;\n        else valueHTML = `<span>${val}</span>`;\n    } else valueHTML = rangeValues;\n    return '<div class=\"apexcharts-tooltip-rangebar\"><div> <span class=\"series-name\" style=\"color: ' + color + '\">' + (seriesName ? seriesName : \"\") + '</span></div><div> <span class=\"category\">' + ylabel + \": </span> \" + valueHTML + \" </div></div>\";\n};\nclass $e4b487e979d7c06d$var$Defaults {\n    /**\n   * @param {Record<string, any>} opts\n   */ constructor(opts){\n        this.opts = opts;\n    }\n    /**\n   * The defaults a chart type chooses for itself, which is the same pick\n   * Config.init makes on the initial render. Shared with the update path so\n   * that \"what does type X want\" has one answer and cannot drift between the\n   * two. Modes layered on top of a type (brush, slope, sparkline) are not\n   * included: they belong to the chart, not to its type, and a type change does\n   * not disturb them.\n   *\n   * @param {Record<string, any>} opts a config, read for the type and for the\n   *   flags that pick a variant of it\n   * @returns {Record<string, any>}\n   */ static forType(opts) {\n        var _a, _b;\n        const defaults = new $e4b487e979d7c06d$var$Defaults(opts);\n        const chartTypes = [\n            \"line\",\n            \"area\",\n            \"bar\",\n            \"candlestick\",\n            \"boxPlot\",\n            \"violin\",\n            \"rangeBar\",\n            \"rangeArea\",\n            \"bubble\",\n            \"scatter\",\n            \"heatmap\",\n            \"treemap\",\n            \"unit\",\n            \"sunburst\",\n            \"pie\",\n            \"polarArea\",\n            \"donut\",\n            \"radar\",\n            \"radialBar\"\n        ];\n        const requestedType = opts.chart.requestedType;\n        let chartDefaults;\n        if (requestedType === \"funnel\" || requestedType === \"pyramid\") chartDefaults = /** @type {any} */ defaults[requestedType]();\n        else if (requestedType === \"gauge\") chartDefaults = defaults.gauge();\n        else if (requestedType === \"histogram\") chartDefaults = defaults.histogram();\n        else if (chartTypes.indexOf(opts.chart.type) !== -1) chartDefaults = /** @type {any} */ defaults[opts.chart.type]();\n        else chartDefaults = defaults.line();\n        if ((_b = (_a = opts.plotOptions) == null ? void 0 : _a.bar) == null ? void 0 : _b.isFunnel) chartDefaults = defaults.funnel();\n        if (opts.chart.stacked && opts.chart.type === \"bar\") chartDefaults = defaults.stackedBars();\n        return chartDefaults;\n    }\n    /**\n   * Re-choose the type-owned leaves (see TYPE_OWNED_PATHS) after\n   * `updateOptions({ chart: { type } })` moved the chart from one type to\n   * another, so the chart behaves as the type it now is.\n   *\n   * A leaf is only handed over when it still holds exactly what `fromType`\n   * chose for it. That single test covers every way a value can be the user's\n   * instead of ours: set at construction, set by an earlier update, or set by\n   * this very update. `options` is consulted too, so an explicit ask in the\n   * same call wins even when it happens to equal the outgoing default.\n   *\n   * @param {Record<string, any>} config the merged w.config, mutated in place\n   * @param {string} fromType the type (or requested alias) before this update\n   * @param {Record<string, any>} [options] this update's payload\n   */ static handOverTypeDefaults(config, fromType, options2) {\n        const toType = config.chart.requestedType || config.chart.type;\n        if (!fromType || fromType === toType) return;\n        const base = new $e4b487e979d7c06d$var$Options().init();\n        const from = $e4b487e979d7c06d$var$Utils$1.extend(base, $e4b487e979d7c06d$var$Defaults.forType($e4b487e979d7c06d$var$typeOpts(fromType, config)));\n        const to = $e4b487e979d7c06d$var$Utils$1.extend(base, $e4b487e979d7c06d$var$Defaults.forType($e4b487e979d7c06d$var$typeOpts(toType, config)));\n        for (const path of $e4b487e979d7c06d$var$TYPE_OWNED_PATHS){\n            if (options2 && $e4b487e979d7c06d$var$readPath(options2, path) !== void 0) continue;\n            const fromDefault = $e4b487e979d7c06d$var$readPath(from, path);\n            const toDefault = $e4b487e979d7c06d$var$readPath(to, path);\n            if (fromDefault === void 0 && toDefault === void 0) continue;\n            if (!$e4b487e979d7c06d$var$isUntouched($e4b487e979d7c06d$var$readPath(config, path), fromDefault)) continue;\n            $e4b487e979d7c06d$var$writePath(config, path, toDefault);\n        }\n    }\n    hideYAxis() {\n        this.opts.yaxis[0].show = false;\n        this.opts.yaxis[0].title.text = \"\";\n        this.opts.yaxis[0].axisBorder.show = false;\n        this.opts.yaxis[0].axisTicks.show = false;\n        this.opts.yaxis[0].floating = true;\n    }\n    line() {\n        return {\n            dataLabels: {\n                enabled: false\n            },\n            stroke: {\n                width: 5,\n                curve: \"straight\"\n            },\n            markers: {\n                size: 0,\n                hover: {\n                    sizeOffset: 6\n                }\n            },\n            xaxis: {\n                crosshairs: {\n                    width: 1\n                }\n            }\n        };\n    }\n    /**\n   * @param {Record<string, any>} defaults\n   */ sparkline(defaults) {\n        this.hideYAxis();\n        const ret = {\n            grid: {\n                show: false,\n                padding: {\n                    left: 0,\n                    right: 0,\n                    top: 0,\n                    bottom: 0\n                }\n            },\n            legend: {\n                show: false\n            },\n            xaxis: {\n                labels: {\n                    show: false\n                },\n                tooltip: {\n                    enabled: false\n                },\n                axisBorder: {\n                    show: false\n                },\n                axisTicks: {\n                    show: false\n                }\n            },\n            chart: {\n                toolbar: {\n                    show: false\n                },\n                zoom: {\n                    enabled: false\n                }\n            },\n            dataLabels: {\n                enabled: false\n            }\n        };\n        return $e4b487e979d7c06d$var$Utils$1.extend(defaults, ret);\n    }\n    slope() {\n        this.hideYAxis();\n        return {\n            chart: {\n                toolbar: {\n                    show: false\n                },\n                zoom: {\n                    enabled: false\n                }\n            },\n            dataLabels: {\n                enabled: true,\n                /**\n         * @param {any} val\n         * @param {Record<string, any>} opts\n         */ formatter (val, opts) {\n                    const seriesName = opts.w.config.series[opts.seriesIndex].name;\n                    return val !== null ? seriesName + \": \" + val : \"\";\n                },\n                background: {\n                    enabled: false\n                },\n                offsetX: -5\n            },\n            grid: {\n                xaxis: {\n                    lines: {\n                        show: true\n                    }\n                },\n                yaxis: {\n                    lines: {\n                        show: false\n                    }\n                }\n            },\n            xaxis: {\n                position: \"top\",\n                labels: {\n                    style: {\n                        fontSize: 14,\n                        fontWeight: 900\n                    }\n                },\n                tooltip: {\n                    enabled: false\n                },\n                crosshairs: {\n                    show: false\n                }\n            },\n            markers: {\n                size: 8,\n                hover: {\n                    sizeOffset: 1\n                }\n            },\n            legend: {\n                show: false\n            },\n            tooltip: {\n                shared: false,\n                intersect: true,\n                followCursor: true\n            },\n            stroke: {\n                width: 5,\n                curve: \"straight\"\n            }\n        };\n    }\n    bar() {\n        return {\n            chart: {\n                stacked: false\n            },\n            plotOptions: {\n                bar: {\n                    dataLabels: {\n                        position: \"center\"\n                    }\n                }\n            },\n            dataLabels: {\n                style: {\n                    colors: [\n                        \"#fff\"\n                    ]\n                },\n                background: {\n                    enabled: false\n                }\n            },\n            stroke: {\n                width: 0,\n                lineCap: \"square\"\n            },\n            fill: {\n                opacity: 0.85\n            },\n            legend: {\n                markers: {\n                    shape: \"square\"\n                }\n            },\n            tooltip: {\n                shared: false,\n                intersect: true\n            },\n            xaxis: {\n                tooltip: {\n                    enabled: false\n                },\n                tickPlacement: \"between\",\n                crosshairs: {\n                    width: \"barWidth\",\n                    position: \"back\",\n                    fill: {\n                        type: \"gradient\"\n                    },\n                    dropShadow: {\n                        enabled: false\n                    },\n                    stroke: {\n                        width: 0\n                    }\n                }\n            }\n        };\n    }\n    funnel() {\n        this.hideYAxis();\n        return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, this.bar()), {\n            chart: {\n                animations: {\n                    speed: 800,\n                    animateGradually: {\n                        enabled: false\n                    }\n                }\n            },\n            plotOptions: {\n                bar: {\n                    horizontal: true,\n                    borderRadiusApplication: \"around\",\n                    borderRadius: 0,\n                    dataLabels: {\n                        position: \"center\"\n                    }\n                }\n            },\n            grid: {\n                show: false,\n                padding: {\n                    left: 0,\n                    right: 0\n                }\n            },\n            xaxis: {\n                labels: {\n                    show: false\n                },\n                tooltip: {\n                    enabled: false\n                },\n                axisBorder: {\n                    show: false\n                },\n                axisTicks: {\n                    show: false\n                }\n            }\n        });\n    }\n    pyramid() {\n        return this.funnel();\n    }\n    gauge() {\n        const base = this.radialBar();\n        return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, base), {\n            plotOptions: {\n                radialBar: {\n                    startAngle: -135,\n                    endAngle: 135,\n                    hollow: {\n                        margin: 0,\n                        size: \"60%\"\n                    },\n                    track: {\n                        background: \"#e7e7e7\",\n                        strokeWidth: \"100%\",\n                        margin: 5\n                    },\n                    dataLabels: {\n                        name: {\n                            show: false\n                        },\n                        value: {\n                            show: true,\n                            fontSize: \"32px\",\n                            fontWeight: 600,\n                            offsetY: 8\n                        }\n                    }\n                }\n            }\n        });\n    }\n    histogram() {\n        var _a, _b, _c, _d;\n        const overlaid = Array.isArray((_a = this.opts) == null ? void 0 : _a.series) && this.opts.series.length > 1 && ((_d = (_c = (_b = this.opts) == null ? void 0 : _b.plotOptions) == null ? void 0 : _c.histogram) == null ? void 0 : _d.overlap) !== false;\n        return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, this.bar()), {\n            chart: {\n                stacked: false,\n                // The bins are the summary: they are chosen once from the whole sample\n                // and do NOT re-derive from the visible window, so zooming only\n                // magnifies bars while hiding the rest of the distribution the shape is\n                // read against. Off by default, mirroring heatmap and violin; users can\n                // opt back in with chart.zoom.enabled: true.\n                zoom: {\n                    enabled: false\n                },\n                animations: {\n                    // The bars of a histogram are one shape, not N independent\n                    // categories, so revealing them one by one reads as a sequence that\n                    // is not in the data. The distribution rises as a whole instead.\n                    animateGradually: {\n                        enabled: false\n                    }\n                }\n            },\n            plotOptions: {\n                bar: {\n                    // Bins are adjacent by definition, so the columns touch: a gap\n                    // between them would read as a gap in the data. Rounded corners are\n                    // dropped for the same reason (they shave area off each bar, and a\n                    // histogram's whole claim is that area is proportional to count).\n                    columnWidth: \"100%\",\n                    borderRadius: 0,\n                    dataLabels: {\n                        position: \"top\"\n                    }\n                }\n            },\n            dataLabels: {\n                enabled: false\n            },\n            fill: overlaid ? {\n                opacity: 0.65\n            } : {},\n            // A hairline separator keeps the bin boundaries readable once the columns\n            // touch, the same treatment heatmap cells get.\n            stroke: overlaid ? {\n                show: false\n            } : {\n                show: true,\n                width: 1,\n                colors: [\n                    \"#fff\"\n                ]\n            },\n            xaxis: {\n                type: \"numeric\",\n                // The axis carries bin midpoints; the range is what people read, and\n                // the tooltip already states it.\n                tooltip: {\n                    enabled: false\n                }\n            },\n            tooltip: {\n                // Overlaid bars share a bin, so hovering one has to report both\n                // distributions: the comparison is the whole point of stacking them on\n                // one axis.\n                shared: overlaid,\n                intersect: false,\n                x: {\n                    formatter: (val, opts)=>{\n                        var _a2, _b2;\n                        const edges = (_b2 = (_a2 = opts == null ? void 0 : opts.w) == null ? void 0 : _a2.histogramData) == null ? void 0 : _b2.edges;\n                        const k = opts == null ? void 0 : opts.dataPointIndex;\n                        if (!Array.isArray(edges) || typeof k !== \"number\" || k < 0) return String(val);\n                        const lo = edges[k];\n                        const hi = edges[k + 1];\n                        if (lo === void 0 || hi === void 0) return String(val);\n                        const fmt = (v2)=>Number.isInteger(v2) ? String(v2) : v2.toFixed(2);\n                        return `${fmt(lo)} to ${fmt(hi)}`;\n                    }\n                }\n            }\n        });\n    }\n    candlestick() {\n        return {\n            stroke: {\n                width: 1\n            },\n            fill: {\n                opacity: 1\n            },\n            dataLabels: {\n                enabled: false\n            },\n            tooltip: {\n                shared: true,\n                custom: $e4b487e979d7c06d$var$ownedBy([\n                    \"candlestick\"\n                ], ({ seriesIndex: seriesIndex, dataPointIndex: dataPointIndex, w: w2 })=>{\n                    return this._getBoxTooltip(w2, seriesIndex, dataPointIndex, [\n                        \"Open\",\n                        \"High\",\n                        \"\",\n                        \"Low\",\n                        \"Close\"\n                    ], \"candlestick\");\n                })\n            },\n            states: {\n                active: {\n                    filter: {\n                        type: \"none\"\n                    }\n                }\n            },\n            xaxis: {\n                crosshairs: {\n                    width: 1\n                }\n            }\n        };\n    }\n    boxPlot() {\n        return {\n            chart: {\n                animations: {\n                    dynamicAnimation: {\n                        enabled: false\n                    }\n                }\n            },\n            stroke: {\n                width: 1,\n                colors: [\n                    \"#24292e\"\n                ]\n            },\n            dataLabels: {\n                enabled: false\n            },\n            tooltip: {\n                shared: true,\n                custom: $e4b487e979d7c06d$var$ownedBy([\n                    \"boxPlot\"\n                ], ({ seriesIndex: seriesIndex, dataPointIndex: dataPointIndex, w: w2 })=>{\n                    return this._getBoxTooltip(w2, seriesIndex, dataPointIndex, [\n                        \"Minimum\",\n                        \"Q1\",\n                        \"Median\",\n                        \"Q3\",\n                        \"Maximum\"\n                    ], \"boxPlot\");\n                })\n            },\n            markers: {\n                size: 7,\n                strokeWidth: 1,\n                strokeColors: \"#111\"\n            },\n            xaxis: {\n                crosshairs: {\n                    width: 1\n                }\n            }\n        };\n    }\n    violin() {\n        return {\n            chart: {\n                // Violins are a per-category distribution plot (discrete category\n                // x-axis), so range zooming/panning is meaningless — off by default.\n                zoom: {\n                    enabled: false\n                },\n                animations: {\n                    dynamicAnimation: {\n                        enabled: false\n                    }\n                }\n            },\n            stroke: {\n                width: 1,\n                colors: [\n                    \"#24292e\"\n                ]\n            },\n            fill: {\n                opacity: 0.7\n            },\n            dataLabels: {\n                enabled: false\n            },\n            tooltip: {\n                shared: true,\n                custom: $e4b487e979d7c06d$var$ownedBy([\n                    \"violin\"\n                ], ({ seriesIndex: seriesIndex, dataPointIndex: dataPointIndex, w: w2 })=>{\n                    return this._getViolinTooltip(w2, seriesIndex, dataPointIndex);\n                })\n            },\n            states: {\n                active: {\n                    filter: {\n                        type: \"none\"\n                    }\n                }\n            },\n            xaxis: {\n                crosshairs: {\n                    width: 1\n                }\n            }\n        };\n    }\n    rangeBar() {\n        const handleTimelineTooltip = (opts)=>{\n            const { color: color, seriesName: seriesName, ylabel: ylabel, startVal: startVal, endVal: endVal } = $e4b487e979d7c06d$var$getRangeValues($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, opts), {\n                isTimeline: true\n            }));\n            return $e4b487e979d7c06d$var$buildRangeTooltipHTML($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, opts), {\n                color: color,\n                seriesName: seriesName,\n                ylabel: ylabel,\n                start: startVal,\n                end: endVal\n            }));\n        };\n        const handleRangeColumnTooltip = (opts)=>{\n            const { color: color, seriesName: seriesName, ylabel: ylabel, start: start, end: end } = $e4b487e979d7c06d$var$getRangeValues(opts);\n            return $e4b487e979d7c06d$var$buildRangeTooltipHTML($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, opts), {\n                color: color,\n                seriesName: seriesName,\n                ylabel: ylabel,\n                start: start,\n                end: end\n            }));\n        };\n        return {\n            chart: {\n                animations: {\n                    animateGradually: false\n                }\n            },\n            stroke: {\n                width: 0,\n                lineCap: \"square\"\n            },\n            plotOptions: {\n                bar: {\n                    borderRadius: 0,\n                    dataLabels: {\n                        position: \"center\"\n                    }\n                }\n            },\n            dataLabels: {\n                enabled: false,\n                /**\n         * @param {any} val\n         */ formatter (val, { seriesIndex: seriesIndex, dataPointIndex: dataPointIndex, w: w2 }) {\n                    const getVal = ()=>{\n                        const start = w2.rangeData.seriesRangeStart[seriesIndex][dataPointIndex];\n                        const end = w2.rangeData.seriesRangeEnd[seriesIndex][dataPointIndex];\n                        return end - start;\n                    };\n                    if (w2.globals.comboCharts) {\n                        if (w2.config.series[seriesIndex].type === \"rangeBar\" || w2.config.series[seriesIndex].type === \"rangeArea\") return getVal();\n                        else return val;\n                    } else return getVal();\n                },\n                background: {\n                    enabled: false\n                },\n                style: {\n                    colors: [\n                        \"#fff\"\n                    ]\n                }\n            },\n            markers: {\n                size: 10\n            },\n            tooltip: {\n                shared: false,\n                followCursor: true,\n                custom: $e4b487e979d7c06d$var$ownedBy([\n                    \"rangeBar\"\n                ], /** @param {Record<string, any>} opts */ (opts)=>{\n                    if (opts.w.config.plotOptions && opts.w.config.plotOptions.bar && opts.w.config.plotOptions.bar.horizontal) return handleTimelineTooltip(opts);\n                    else return handleRangeColumnTooltip(opts);\n                })\n            },\n            xaxis: {\n                tickPlacement: \"between\",\n                tooltip: {\n                    enabled: false\n                },\n                crosshairs: {\n                    stroke: {\n                        width: 0\n                    }\n                }\n            }\n        };\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ dumbbell(opts) {\n        var _a, _b;\n        if (!((_a = opts.plotOptions.bar) == null ? void 0 : _a.barHeight)) opts.plotOptions.bar.barHeight = 2;\n        if (!((_b = opts.plotOptions.bar) == null ? void 0 : _b.columnWidth)) opts.plotOptions.bar.columnWidth = 2;\n        return opts;\n    }\n    area() {\n        return {\n            stroke: {\n                width: 4,\n                fill: {\n                    type: \"solid\",\n                    gradient: {\n                        inverseColors: false,\n                        shade: \"light\",\n                        type: \"vertical\",\n                        opacityFrom: 0.65,\n                        opacityTo: 0.5,\n                        stops: [\n                            0,\n                            100,\n                            100\n                        ]\n                    }\n                }\n            },\n            fill: {\n                type: \"gradient\",\n                gradient: {\n                    inverseColors: false,\n                    shade: \"light\",\n                    type: \"vertical\",\n                    opacityFrom: 0.65,\n                    opacityTo: 0.5,\n                    stops: [\n                        0,\n                        100,\n                        100\n                    ]\n                }\n            },\n            markers: {\n                size: 0,\n                hover: {\n                    sizeOffset: 6\n                }\n            },\n            tooltip: {\n                followCursor: false\n            }\n        };\n    }\n    rangeArea() {\n        const handleRangeAreaTooltip = (opts)=>{\n            const { color: color, seriesName: seriesName, ylabel: ylabel, start: start, end: end } = $e4b487e979d7c06d$var$getRangeValues(opts);\n            return $e4b487e979d7c06d$var$buildRangeTooltipHTML($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, opts), {\n                color: color,\n                seriesName: seriesName,\n                ylabel: ylabel,\n                start: start,\n                end: end\n            }));\n        };\n        return {\n            stroke: {\n                curve: \"straight\",\n                width: 0\n            },\n            fill: {\n                type: \"solid\",\n                opacity: 0.6\n            },\n            markers: {\n                size: 0\n            },\n            states: {\n                hover: {\n                    filter: {\n                        type: \"none\"\n                    }\n                },\n                active: {\n                    filter: {\n                        type: \"none\"\n                    }\n                }\n            },\n            tooltip: {\n                intersect: false,\n                shared: true,\n                followCursor: true,\n                custom: $e4b487e979d7c06d$var$ownedBy([\n                    \"rangeArea\"\n                ], /** @param {Record<string, any>} opts */ (opts)=>handleRangeAreaTooltip(opts))\n            }\n        };\n    }\n    /**\n   * @param {Record<string, any>} defaults\n   */ brush(defaults) {\n        const ret = {\n            chart: {\n                toolbar: {\n                    autoSelected: \"selection\",\n                    show: false\n                },\n                zoom: {\n                    enabled: false\n                }\n            },\n            dataLabels: {\n                enabled: false\n            },\n            stroke: {\n                width: 1\n            },\n            tooltip: {\n                enabled: false\n            },\n            xaxis: {\n                tooltip: {\n                    enabled: false\n                }\n            }\n        };\n        return $e4b487e979d7c06d$var$Utils$1.extend(defaults, ret);\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ stacked100(opts) {\n        opts.dataLabels = opts.dataLabels || {};\n        opts.dataLabels.formatter = opts.dataLabels.formatter || void 0;\n        const existingDataLabelFormatter = opts.dataLabels.formatter;\n        opts.yaxis.forEach((yaxe, index)=>{\n            opts.yaxis[index].min = 0;\n            opts.yaxis[index].max = 100;\n        });\n        const isBar = opts.chart.type === \"bar\";\n        if (isBar) opts.dataLabels.formatter = existingDataLabelFormatter || /**\n       * @param {any} val\n       */ function(val) {\n            if (typeof val === \"number\") return val ? val.toFixed(0) + \"%\" : val;\n            return val;\n        };\n        return opts;\n    }\n    stackedBars() {\n        const barDefaults = this.bar();\n        return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, barDefaults), {\n            plotOptions: $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, barDefaults.plotOptions), {\n                bar: $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, barDefaults.plotOptions.bar), {\n                    borderRadiusApplication: \"end\",\n                    borderRadiusWhenStacked: \"last\"\n                })\n            })\n        });\n    }\n    // This function removes the left and right spacing in chart for line/area/scatter if xaxis type = category for those charts by converting xaxis = numeric. Numeric/Datetime xaxis prevents the unnecessary spacing in the left/right of the chart area\n    /**\n   * @param {Record<string, any>} opts\n   */ convertCatToNumeric(opts) {\n        opts.xaxis.convertedCatToNumeric = true;\n        return opts;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   * @param {any} cats\n   */ convertCatToNumericXaxis(opts, cats) {\n        opts.xaxis.type = \"numeric\";\n        opts.xaxis.labels = opts.xaxis.labels || {};\n        opts.xaxis.labels.formatter = opts.xaxis.labels.formatter || /**\n     * @param {any} val\n     */ function(val) {\n            return $e4b487e979d7c06d$var$Utils$1.isNumber(val) ? Math.floor(val) : val;\n        };\n        const defaultFormatter = opts.xaxis.labels.formatter;\n        let labels = opts.xaxis.categories && opts.xaxis.categories.length ? opts.xaxis.categories : opts.labels;\n        if (cats && cats.length) labels = cats.map((c2)=>{\n            return Array.isArray(c2) ? c2 : String(c2);\n        });\n        if (labels && labels.length) opts.xaxis.labels.formatter = function(val) {\n            return $e4b487e979d7c06d$var$Utils$1.isNumber(val) ? defaultFormatter(labels[Math.floor(val) - 1]) : defaultFormatter(val);\n        };\n        opts.xaxis.categories = [];\n        opts.labels = [];\n        opts.xaxis.tickAmount = opts.xaxis.tickAmount || \"dataPoints\";\n        return opts;\n    }\n    bubble() {\n        return {\n            dataLabels: {\n                style: {\n                    colors: [\n                        \"#fff\"\n                    ]\n                }\n            },\n            tooltip: {\n                shared: false,\n                intersect: true\n            },\n            xaxis: {\n                crosshairs: {\n                    width: 0\n                }\n            },\n            fill: {\n                type: \"solid\",\n                gradient: {\n                    shade: \"light\",\n                    inverse: true,\n                    shadeIntensity: 0.55,\n                    opacityFrom: 0.4,\n                    opacityTo: 0.8\n                }\n            }\n        };\n    }\n    scatter() {\n        return {\n            dataLabels: {\n                enabled: false\n            },\n            tooltip: {\n                shared: false,\n                intersect: true\n            },\n            markers: {\n                size: 6,\n                strokeWidth: 1,\n                hover: {\n                    sizeOffset: 2\n                }\n            }\n        };\n    }\n    heatmap() {\n        return {\n            chart: {\n                stacked: false,\n                // A heatmap is a fixed grid: zooming/panning only distorts the cells\n                // and (on a datetime axis) collapses the month labels to repeats, so\n                // it is off by default, mirroring treemap. Users can opt back in with\n                // chart.zoom.enabled: true.\n                zoom: {\n                    enabled: false\n                }\n            },\n            fill: {\n                opacity: 1\n            },\n            dataLabels: {\n                style: {\n                    colors: [\n                        \"#fff\"\n                    ]\n                }\n            },\n            stroke: {\n                colors: [\n                    \"#fff\"\n                ]\n            },\n            tooltip: {\n                // Anchor the tooltip above the hovered cell with a downward arrow\n                // (flipping below near the top edge), the same treatment horizontal\n                // bars get, rather than trailing the cursor. Opt back into the old\n                // behavior with tooltip.followCursor: true.\n                followCursor: false,\n                marker: {\n                    show: false\n                },\n                x: {\n                    show: false\n                }\n            },\n            legend: {\n                position: \"top\",\n                markers: {\n                    shape: \"square\"\n                }\n            },\n            grid: {\n                padding: {\n                    right: 20\n                }\n            }\n        };\n    }\n    treemap() {\n        return {\n            chart: {\n                zoom: {\n                    enabled: false\n                }\n            },\n            dataLabels: {\n                style: {\n                    fontSize: 14,\n                    fontWeight: 600,\n                    colors: [\n                        \"#fff\"\n                    ]\n                }\n            },\n            stroke: {\n                show: true,\n                width: 2,\n                colors: [\n                    \"#fff\"\n                ]\n            },\n            legend: {\n                show: false\n            },\n            fill: {\n                opacity: 1,\n                gradient: {\n                    stops: [\n                        0,\n                        100\n                    ]\n                }\n            },\n            tooltip: {\n                followCursor: true,\n                x: {\n                    show: false\n                }\n            },\n            grid: {\n                padding: {\n                    left: 0,\n                    right: 0\n                }\n            },\n            xaxis: {\n                crosshairs: {\n                    show: false\n                },\n                tooltip: {\n                    enabled: false\n                },\n                // A treemap has no x axis to read: the tiles are the whole plot, and\n                // the ticks mark data-point positions that mean nothing here. One tick\n                // per row is invisible at a dozen rows and a solid comb under the plot\n                // at several hundred, so they are off by default. Set\n                // `xaxis.axisTicks.show: true` to bring them back.\n                axisTicks: {\n                    show: false\n                }\n            }\n        };\n    }\n    unit() {\n        return {\n            chart: {\n                toolbar: {\n                    show: false\n                }\n            },\n            dataLabels: {\n                enabled: false\n            },\n            stroke: {\n                show: false,\n                width: 0\n            },\n            fill: {\n                opacity: 1\n            },\n            tooltip: {\n                followCursor: true,\n                x: {\n                    show: false\n                }\n            },\n            legend: {\n                show: true,\n                position: \"bottom\"\n            },\n            grid: {\n                padding: {\n                    left: 0,\n                    right: 0,\n                    top: 0,\n                    bottom: 0\n                }\n            }\n        };\n    }\n    sunburst() {\n        return {\n            chart: {\n                toolbar: {\n                    show: false\n                }\n            },\n            dataLabels: {\n                style: {\n                    colors: [\n                        \"#fff\"\n                    ]\n                },\n                dropShadow: {\n                    enabled: true\n                }\n            },\n            stroke: {\n                colors: [\n                    \"#fff\"\n                ]\n            },\n            fill: {\n                opacity: 1\n            },\n            // Unlike pie, sunburst keeps the STANDARD themed tooltip (light/dark).\n            // Slice-coloured tooltips (fillSeriesColor) wash out here because child\n            // arcs are tinted toward white per depth; users can still opt in.\n            legend: {\n                position: \"right\"\n            },\n            grid: {\n                padding: {\n                    left: 0,\n                    right: 0,\n                    top: 0,\n                    bottom: 0\n                }\n            }\n        };\n    }\n    pie() {\n        return {\n            chart: {\n                toolbar: {\n                    show: false\n                }\n            },\n            plotOptions: {\n                pie: {\n                    donut: {\n                        labels: {\n                            show: false\n                        }\n                    }\n                }\n            },\n            dataLabels: {\n                /**\n         * The share of the whole, as a percentage. Guarded because a config\n         * survives a chart-type change: a pie that becomes a treemap hands\n         * this same default a category NAME, and a default of ours must not\n         * throw on a value it was never designed for.\n         * @param {any} val\n         */ formatter (val) {\n                    return typeof val === \"number\" ? val.toFixed(1) + \"%\" : val;\n                },\n                style: {\n                    colors: [\n                        \"#fff\"\n                    ]\n                },\n                background: {\n                    enabled: false\n                },\n                dropShadow: {\n                    enabled: true\n                }\n            },\n            stroke: {\n                colors: [\n                    \"#fff\"\n                ]\n            },\n            fill: {\n                opacity: 1,\n                gradient: {\n                    shade: \"light\",\n                    stops: [\n                        0,\n                        100\n                    ]\n                }\n            },\n            tooltip: {\n                theme: \"dark\",\n                fillSeriesColor: true\n            },\n            legend: {\n                position: \"right\"\n            },\n            grid: {\n                padding: {\n                    left: 0,\n                    right: 0,\n                    top: 0,\n                    bottom: 0\n                }\n            }\n        };\n    }\n    donut() {\n        return {\n            chart: {\n                toolbar: {\n                    show: false\n                }\n            },\n            dataLabels: {\n                /**\n         * The share of the whole, as a percentage. Guarded because a config\n         * survives a chart-type change: a pie that becomes a treemap hands\n         * this same default a category NAME, and a default of ours must not\n         * throw on a value it was never designed for.\n         * @param {any} val\n         */ formatter (val) {\n                    return typeof val === \"number\" ? val.toFixed(1) + \"%\" : val;\n                },\n                style: {\n                    colors: [\n                        \"#fff\"\n                    ]\n                },\n                background: {\n                    enabled: false\n                },\n                dropShadow: {\n                    enabled: true\n                }\n            },\n            stroke: {\n                colors: [\n                    \"#fff\"\n                ]\n            },\n            fill: {\n                opacity: 1,\n                gradient: {\n                    shade: \"light\",\n                    shadeIntensity: 0.35,\n                    stops: [\n                        80,\n                        100\n                    ],\n                    opacityFrom: 1,\n                    opacityTo: 1\n                }\n            },\n            tooltip: {\n                theme: \"dark\",\n                fillSeriesColor: true\n            },\n            legend: {\n                position: \"right\"\n            },\n            grid: {\n                padding: {\n                    left: 0,\n                    right: 0,\n                    top: 0,\n                    bottom: 0\n                }\n            }\n        };\n    }\n    polarArea() {\n        return {\n            chart: {\n                toolbar: {\n                    show: false\n                }\n            },\n            dataLabels: {\n                /**\n         * The share of the whole, as a percentage. Guarded because a config\n         * survives a chart-type change: a pie that becomes a treemap hands\n         * this same default a category NAME, and a default of ours must not\n         * throw on a value it was never designed for.\n         * @param {any} val\n         */ formatter (val) {\n                    return typeof val === \"number\" ? val.toFixed(1) + \"%\" : val;\n                },\n                enabled: false\n            },\n            stroke: {\n                show: true,\n                width: 2\n            },\n            fill: {\n                opacity: 0.7\n            },\n            tooltip: {\n                theme: \"dark\",\n                fillSeriesColor: true\n            },\n            legend: {\n                position: \"right\"\n            },\n            grid: {\n                padding: {\n                    left: 0,\n                    right: 0,\n                    top: 0,\n                    bottom: 0\n                }\n            }\n        };\n    }\n    radar() {\n        this.opts.yaxis[0].labels.offsetY = this.opts.yaxis[0].labels.offsetY ? this.opts.yaxis[0].labels.offsetY : 6;\n        return {\n            dataLabels: {\n                enabled: false,\n                style: {\n                    fontSize: \"11px\"\n                }\n            },\n            stroke: {\n                width: 2\n            },\n            markers: {\n                size: 5,\n                strokeWidth: 1,\n                strokeOpacity: 1\n            },\n            fill: {\n                opacity: 0.2\n            },\n            tooltip: {\n                shared: false,\n                intersect: true,\n                followCursor: true\n            },\n            grid: {\n                show: false,\n                padding: {\n                    left: 0,\n                    right: 0,\n                    top: 0,\n                    bottom: 0\n                }\n            },\n            xaxis: {\n                labels: {\n                    formatter: (val)=>val,\n                    style: {\n                        colors: [\n                            \"#a8a8a8\"\n                        ],\n                        fontSize: \"11px\"\n                    }\n                },\n                tooltip: {\n                    enabled: false\n                },\n                crosshairs: {\n                    show: false\n                }\n            }\n        };\n    }\n    radialBar() {\n        return {\n            chart: {\n                animations: {\n                    dynamicAnimation: {\n                        enabled: true,\n                        speed: 800\n                    }\n                },\n                toolbar: {\n                    show: false\n                }\n            },\n            stroke: {\n                // Radial value arcs are stroked open arcs; square/round caps would\n                // extend the stroke half a stroke-width past each endpoint, making\n                // the \"starting edge\" visibly stick out past the geometric arc.\n                // Butt cap is the only one that aligns with the arc's true angular\n                // span. Without this, a chart that previously was a bar (whose\n                // defaults set lineCap='square') would carry that cap across into\n                // the radial render after a type morph.\n                lineCap: \"butt\"\n            },\n            fill: {\n                gradient: {\n                    shade: \"dark\",\n                    shadeIntensity: 0.4,\n                    inverseColors: false,\n                    type: \"diagonal2\",\n                    opacityFrom: 1,\n                    opacityTo: 1,\n                    stops: [\n                        70,\n                        98,\n                        100\n                    ]\n                }\n            },\n            legend: {\n                show: false,\n                position: \"right\"\n            },\n            tooltip: {\n                enabled: false,\n                fillSeriesColor: true\n            },\n            grid: {\n                padding: {\n                    left: 0,\n                    right: 0,\n                    top: 0,\n                    bottom: 0\n                }\n            }\n        };\n    }\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {number} seriesIndex\n   * @param {number} dataPointIndex\n   * @param {any[]} labels\n   * @param {string} chartType\n   */ _getBoxTooltip(w2, seriesIndex, dataPointIndex, labels, chartType) {\n        const o2 = w2.candleData.seriesCandleO[seriesIndex][dataPointIndex];\n        const h2 = w2.candleData.seriesCandleH[seriesIndex][dataPointIndex];\n        const m2 = w2.candleData.seriesCandleM[seriesIndex][dataPointIndex];\n        const l2 = w2.candleData.seriesCandleL[seriesIndex][dataPointIndex];\n        const c2 = w2.candleData.seriesCandleC[seriesIndex][dataPointIndex];\n        const _si = /** @type {Record<string,any>} */ w2.config.series[seriesIndex];\n        if (_si.type && _si.type !== chartType) return `<div class=\"apexcharts-custom-tooltip\">\n          ${_si.name ? _si.name : \"series-\" + (seriesIndex + 1)}: <strong>${w2.seriesData.series[seriesIndex][dataPointIndex]}</strong>\n        </div>`;\n        else return `<div class=\"apexcharts-tooltip-box apexcharts-tooltip-${w2.config.chart.type}\"><div>${labels[0]}: <span class=\"value\">` + o2 + `</span></div><div>${labels[1]}: <span class=\"value\">` + h2 + \"</span></div>\" + (m2 ? `<div>${labels[2]}: <span class=\"value\">` + m2 + \"</span></div>\" : \"\") + `<div>${labels[3]}: <span class=\"value\">` + l2 + `</span></div><div>${labels[4]}: <span class=\"value\">` + c2 + \"</span></div></div>\";\n    }\n    /**\n   * Shared tooltip for a violin: distribution value range and observation\n   * count. Per-point hover is intentionally unsupported (jitter renders as a\n   * single path), so the tooltip summarizes the violin as a whole.\n   *\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {number} seriesIndex\n   * @param {number} dataPointIndex\n   */ _getViolinTooltip(w2, seriesIndex, dataPointIndex) {\n        var _a, _b, _c;\n        const minV = (_a = w2.violinData.seriesViolinMin[seriesIndex]) == null ? void 0 : _a[dataPointIndex];\n        const maxV = (_b = w2.violinData.seriesViolinMax[seriesIndex]) == null ? void 0 : _b[dataPointIndex];\n        const pts = ((_c = w2.violinData.seriesViolinPoints[seriesIndex]) == null ? void 0 : _c[dataPointIndex]) || [];\n        const name2 = /** @type {Record<string,any>} */ w2.config.series[seriesIndex].name || \"series-\" + (seriesIndex + 1);\n        return `<div class=\"apexcharts-tooltip-box apexcharts-tooltip-${w2.config.chart.type}\"><div class=\"apexcharts-tooltip-violin-name\">${name2}</div><div>Min: <span class=\"value\">${minV}</span></div><div>Max: <span class=\"value\">${maxV}</span></div><div>Observations: <span class=\"value\">${pts.length}</span></div></div>`;\n    }\n}\nclass $e4b487e979d7c06d$var$Config {\n    /**\n   * @param {Record<string, any>} opts\n   */ constructor(opts){\n        this.opts = opts;\n    }\n    /** @param {{responsiveOverride: any}} opts */ init({ responsiveOverride: responsiveOverride }) {\n        var _a, _b, _c, _d, _e, _f, _g, _h;\n        let opts = this.opts;\n        const options2 = new $e4b487e979d7c06d$var$Options();\n        const defaults = new $e4b487e979d7c06d$var$Defaults(opts);\n        opts = this.normalizeAliasedChartType(opts);\n        this.chartType = opts.chart.type;\n        opts = this.extendYAxis(opts);\n        opts = this.extendAnnotations(opts);\n        let config = options2.init();\n        let newDefaults = {};\n        if (opts && typeof opts === \"object\") {\n            let chartDefaults = $e4b487e979d7c06d$var$Defaults.forType(opts);\n            if ((_a = opts.chart.brush) == null ? void 0 : _a.enabled) chartDefaults = defaults.brush(chartDefaults);\n            if ((_c = (_b = opts.plotOptions) == null ? void 0 : _b.line) == null ? void 0 : _c.isSlopeChart) chartDefaults = defaults.slope();\n            if (opts.chart.stacked && opts.chart.stackType === \"100%\") opts = defaults.stacked100(opts);\n            if ((_e = (_d = opts.plotOptions) == null ? void 0 : _d.bar) == null ? void 0 : _e.isDumbbell) opts = defaults.dumbbell(opts);\n            this.checkForDarkTheme($e4b487e979d7c06d$var$Environment.getApex());\n            this.checkForDarkTheme(opts);\n            opts.xaxis = opts.xaxis || $e4b487e979d7c06d$var$Environment.getApex().xaxis || {};\n            if (!responsiveOverride) opts.xaxis.convertedCatToNumeric = false;\n            opts = this.checkForCatToNumericXAxis(this.chartType, chartDefaults, opts);\n            if (((_f = opts.chart.sparkline) == null ? void 0 : _f.enabled) || ((_h = (_g = $e4b487e979d7c06d$var$Environment.getApex().chart) == null ? void 0 : _g.sparkline) == null ? void 0 : _h.enabled)) chartDefaults = defaults.sparkline(chartDefaults);\n            newDefaults = $e4b487e979d7c06d$var$Utils$1.extend(config, chartDefaults);\n        }\n        const mergedWithDefaultConfig = $e4b487e979d7c06d$var$Utils$1.extend(newDefaults, $e4b487e979d7c06d$var$Environment.getApex());\n        config = $e4b487e979d7c06d$var$Utils$1.extend(mergedWithDefaultConfig, opts);\n        config = this.handleUserInputErrors(config);\n        return config;\n    }\n    /**\n   * Promoted chart-type aliases — `funnel`, `pyramid`, `gauge` — render via\n   * the existing `bar` (with `isFunnel`) and `radialBar` pathways. To keep\n   * the ~20 internal `chart.type === 'bar' | 'radialBar'` checks working\n   * unchanged, we normalize `chart.type` to the base renderer name here and\n   * preserve the user-facing name on `chart.requestedType` for the public\n   * API and for default selection.\n   *\n   * @param {Record<string, any>} opts\n   * @returns {Record<string, any>}\n   */ normalizeAliasedChartType(opts) {\n        if (!opts || !opts.chart) return opts;\n        const requested = opts.chart.type;\n        if (requested !== \"funnel\" && requested !== \"pyramid\" && requested !== \"gauge\" && requested !== \"waffle\" && requested !== \"histogram\") return opts;\n        opts.chart.requestedType = requested;\n        if (requested === \"waffle\") {\n            opts.plotOptions = opts.plotOptions || {};\n            opts.plotOptions.unit = opts.plotOptions.unit || {};\n            if (opts.plotOptions.unit.layout == null) opts.plotOptions.unit.layout = \"grid\";\n            if (opts.plotOptions.unit.shape == null) opts.plotOptions.unit.shape = \"square\";\n            opts.chart.type = \"unit\";\n        } else if (requested === \"funnel\" || requested === \"pyramid\") {\n            opts.plotOptions = opts.plotOptions || {};\n            opts.plotOptions.bar = opts.plotOptions.bar || {};\n            opts.plotOptions.bar.isFunnel = true;\n            opts.plotOptions.bar.horizontal = true;\n            opts.chart.type = \"bar\";\n            if (requested === \"pyramid\") opts.plotOptions.bar.isPyramid = true;\n            else opts.plotOptions.bar.isPyramid = false;\n        } else if (requested === \"gauge\") opts.chart.type = \"radialBar\";\n        else if (requested === \"histogram\") {\n            opts.xaxis = opts.xaxis || {};\n            if (opts.xaxis.type == null) opts.xaxis.type = \"numeric\";\n            opts.chart.type = \"bar\";\n        }\n        return opts;\n    }\n    /**\n   * @param {string} chartType\n   * @param {Record<string, any>} chartDefaults\n   * @param {Record<string, any>} opts\n   */ checkForCatToNumericXAxis(chartType, chartDefaults, opts) {\n        var _a, _b, _c, _d, _e;\n        const defaults = new $e4b487e979d7c06d$var$Defaults(opts);\n        const isBarHorizontal = (chartType === \"bar\" || chartType === \"boxPlot\" || chartType === \"violin\") && ((_b = (_a = opts.plotOptions) == null ? void 0 : _a.bar) == null ? void 0 : _b.horizontal);\n        const unsupportedZoom = chartType === \"pie\" || chartType === \"polarArea\" || chartType === \"donut\" || chartType === \"radar\" || chartType === \"radialBar\" || chartType === \"heatmap\" || chartType === \"unit\" || chartType === \"sunburst\";\n        const notNumericXAxis = opts.xaxis.type !== \"datetime\" && opts.xaxis.type !== \"numeric\";\n        const isScatterJitter = (chartType === \"scatter\" || chartType === \"bubble\") && ((_e = (_d = (_c = opts.plotOptions) == null ? void 0 : _c.scatter) == null ? void 0 : _d.jitter) == null ? void 0 : _e.enabled);\n        const tickPlacement = opts.xaxis.tickPlacement ? opts.xaxis.tickPlacement : chartDefaults.xaxis && chartDefaults.xaxis.tickPlacement;\n        if (!isBarHorizontal && !unsupportedZoom && !isScatterJitter && notNumericXAxis && tickPlacement !== \"between\") opts = defaults.convertCatToNumeric(opts);\n        return opts;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   * @param {import('../../types/internal').ChartStateW} [w]\n   */ extendYAxis(opts, w2) {\n        const options2 = new $e4b487e979d7c06d$var$Options();\n        if (typeof opts.yaxis === \"undefined\" || !opts.yaxis || Array.isArray(opts.yaxis) && opts.yaxis.length === 0) opts.yaxis = {};\n        const globalApex = $e4b487e979d7c06d$var$Environment.getApex();\n        if (opts.yaxis.constructor !== Array && globalApex.yaxis && globalApex.yaxis.constructor !== Array) opts.yaxis = $e4b487e979d7c06d$var$Utils$1.extend(opts.yaxis, globalApex.yaxis);\n        if (opts.yaxis.constructor !== Array) opts.yaxis = [\n            $e4b487e979d7c06d$var$Utils$1.extend(options2.yAxis, opts.yaxis)\n        ];\n        else opts.yaxis = $e4b487e979d7c06d$var$Utils$1.extendArray(opts.yaxis, options2.yAxis);\n        let isLogY = false;\n        opts.yaxis.forEach((y)=>{\n            if (y.logarithmic) isLogY = true;\n        });\n        let series = opts.series;\n        if (w2 && !series) series = w2.config.series;\n        if (isLogY && series.length !== opts.yaxis.length && series.length) opts.yaxis = series.map((s2, i2)=>{\n            if (!s2.name) series[i2].name = `series-${i2 + 1}`;\n            if (opts.yaxis[i2]) {\n                opts.yaxis[i2].seriesName = series[i2].name;\n                return opts.yaxis[i2];\n            } else {\n                const newYaxis = $e4b487e979d7c06d$var$Utils$1.extend(options2.yAxis, opts.yaxis[0]);\n                newYaxis.show = false;\n                return newYaxis;\n            }\n        });\n        if (isLogY && series.length > 1 && series.length !== opts.yaxis.length) console.warn(\"A multi-series logarithmic chart should have equal number of series and y-axes\");\n        return opts;\n    }\n    // annotations also accepts array, so we need to extend them manually\n    /**\n   * @param {Record<string, any>} opts\n   */ extendAnnotations(opts) {\n        if (typeof opts.annotations === \"undefined\") {\n            opts.annotations = {};\n            opts.annotations.yaxis = [];\n            opts.annotations.xaxis = [];\n            opts.annotations.points = [];\n        }\n        opts = this.extendYAxisAnnotations(opts);\n        opts = this.extendXAxisAnnotations(opts);\n        opts = this.extendPointAnnotations(opts);\n        return opts;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ extendYAxisAnnotations(opts) {\n        const options2 = new $e4b487e979d7c06d$var$Options();\n        opts.annotations.yaxis = $e4b487e979d7c06d$var$Utils$1.extendArray(typeof opts.annotations.yaxis !== \"undefined\" ? opts.annotations.yaxis : [], options2.yAxisAnnotation);\n        return opts;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ extendXAxisAnnotations(opts) {\n        const options2 = new $e4b487e979d7c06d$var$Options();\n        opts.annotations.xaxis = $e4b487e979d7c06d$var$Utils$1.extendArray(typeof opts.annotations.xaxis !== \"undefined\" ? opts.annotations.xaxis : [], options2.xAxisAnnotation);\n        return opts;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ extendPointAnnotations(opts) {\n        const options2 = new $e4b487e979d7c06d$var$Options();\n        opts.annotations.points = $e4b487e979d7c06d$var$Utils$1.extendArray(typeof opts.annotations.points !== \"undefined\" ? opts.annotations.points : [], options2.pointAnnotation);\n        return opts;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ checkForDarkTheme(opts) {\n        if (opts.theme && opts.theme.mode === \"dark\") {\n            if (!opts.tooltip) opts.tooltip = {};\n            if (opts.tooltip.theme !== \"light\") opts.tooltip.theme = \"dark\";\n            if (!opts.chart.foreColor) opts.chart.foreColor = \"#f6f7f8\";\n            if (!opts.theme.palette) opts.theme.palette = \"palette4\";\n        }\n    }\n    /**\n   * @param {any} opts\n   */ handleUserInputErrors(opts) {\n        const config = opts;\n        if (config.tooltip.shared && config.tooltip.intersect) throw new Error(\"tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.\");\n        if (config.chart.type === \"bar\" && config.plotOptions.bar.horizontal) {\n            if (config.yaxis.length > 1) throw new Error(\"Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false\");\n            if (config.yaxis[0].reversed) config.yaxis[0].opposite = true;\n            config.xaxis.tooltip.enabled = false;\n            config.yaxis[0].tooltip.enabled = false;\n            config.chart.zoom.enabled = false;\n        }\n        if (config.chart.type === \"bar\" || config.chart.type === \"rangeBar\") {\n            if (config.tooltip.shared) {\n                if (config.xaxis.crosshairs.width === \"barWidth\" && config.series.length > 1) config.xaxis.crosshairs.width = \"tickWidth\";\n            }\n        }\n        if (config.chart.type === \"candlestick\" || config.chart.type === \"boxPlot\") {\n            if (config.yaxis[0].reversed) {\n                console.warn(`Reversed y-axis in ${config.chart.type} chart is not supported.`);\n                config.yaxis[0].reversed = false;\n            }\n        }\n        return config;\n    }\n}\nconst $e4b487e979d7c06d$var$LINE_HEIGHT_RATIO = 1.618;\nconst $e4b487e979d7c06d$var$NICE_SCALE_ALLOWED_MAG_MSD = [\n    [\n        1,\n        1,\n        2,\n        5,\n        5,\n        5,\n        10,\n        10,\n        10,\n        10,\n        10\n    ],\n    [\n        1,\n        1,\n        2,\n        5,\n        5,\n        5,\n        10,\n        10,\n        10,\n        10,\n        10\n    ]\n];\nconst $e4b487e979d7c06d$var$NICE_SCALE_DEFAULT_TICKS = [\n    1,\n    2,\n    4,\n    4,\n    6,\n    6,\n    6,\n    6,\n    6,\n    6,\n    6,\n    6,\n    6,\n    6,\n    6,\n    6,\n    6,\n    6,\n    12,\n    12,\n    12,\n    12,\n    12,\n    12,\n    12,\n    12,\n    12,\n    24\n];\nclass $e4b487e979d7c06d$var$Globals {\n    /**\n   * @param {any} gl\n   */ initGlobalVars(gl) {\n        gl.series = [];\n        gl.seriesCandleO = [];\n        gl.seriesCandleH = [];\n        gl.seriesCandleM = [];\n        gl.seriesCandleL = [];\n        gl.seriesCandleC = [];\n        gl.seriesRangeStart = [];\n        gl.seriesRangeEnd = [];\n        gl.seriesRange = [];\n        gl.seriesPercent = [];\n        gl.seriesGoals = [];\n        gl.seriesX = [];\n        gl.seriesZ = [];\n        gl.seriesNames = [];\n        gl.seriesTotals = [];\n        gl.seriesLog = [];\n        gl.seriesColors = [];\n        gl.stackedSeriesTotals = [];\n        gl.seriesXvalues = [];\n        gl.seriesYvalues = [];\n        gl.dataWasParsed = false;\n        gl.originalSeries = null;\n        gl.maxValsInArrayIndex = 0;\n        gl.yValueDecimal = 0;\n        gl.allSeriesHasEqualX = true;\n        gl.hasNullValues = false;\n        gl.invalidLogScale = false;\n        gl.seriesRangeName = {};\n        gl.labels = [];\n        gl.hasXaxisGroups = false;\n        gl.groups = [];\n        gl.barGroups = [];\n        gl.lineGroups = [];\n        gl.areaGroups = [];\n        gl.hasSeriesGroups = false;\n        gl.seriesGroups = [];\n        gl.categoryLabels = [];\n        gl.timescaleLabels = [];\n        gl.noLabelsProvided = false;\n        gl.isXNumeric = false;\n        gl.skipLastTimelinelabel = false;\n        gl.skipFirstTimelinelabel = false;\n        gl.isDataXYZ = false;\n        gl.isMultiLineX = false;\n        gl.isMultipleYAxis = false;\n        gl.maxY = -Number.MAX_VALUE;\n        gl.minY = Number.MIN_VALUE;\n        gl.minYArr = [];\n        gl.maxYArr = [];\n        gl.maxX = -Number.MAX_VALUE;\n        gl.minX = Number.MAX_VALUE;\n        gl.initialMaxX = -Number.MAX_VALUE;\n        gl.initialMinX = Number.MAX_VALUE;\n        gl.maxDate = 0;\n        gl.minDate = Number.MAX_VALUE;\n        gl.minZ = Number.MAX_VALUE;\n        gl.maxZ = -Number.MAX_VALUE;\n        gl.minXDiff = Number.MAX_VALUE;\n        gl.yAxisScale = [];\n        gl.xAxisScale = null;\n        gl.xAxisTicksPositions = [];\n        gl.xRange = 0;\n        gl.yRange = [];\n        gl.zRange = 0;\n        gl.dataPoints = 0;\n        gl.xTickAmount = 0;\n        gl.multiAxisTickAmount = 0;\n        gl.disableZoomIn = false;\n        gl.disableZoomOut = false;\n        gl.yLabelsCoords = [];\n        gl.yTitleCoords = [];\n        gl.barPadForNumericAxis = 0;\n        gl.padHorizontal = 0;\n        gl.rotateXLabels = false;\n        gl.overlappingXLabels = false;\n        gl.radialSize = 0;\n        gl.barHeight = 0;\n        gl.barWidth = 0;\n        gl.animationEnded = false;\n        gl.isDestroyed = false;\n        gl.bulkRevealScheduled = false;\n        gl.resizeTimer = null;\n        gl.selectionResizeTimer = null;\n        gl.delayedElements = [];\n        gl.pointsArray = [];\n        gl.barCanvasCoords = null;\n        gl.activeRenderer = null;\n        gl.dataLabelsRects = [];\n        gl.lastDrawnDataLabelsIndexes = [];\n        gl.textRectsCache = /* @__PURE__ */ new Map();\n        gl.domCache = /* @__PURE__ */ new Map();\n        gl.dimensionCache = {};\n        gl.cachedSelectors = {};\n        if (!gl.seriesNS) this._attachNamespaces(gl);\n    }\n    /**\n   * Attach domain-grouped namespace sub-objects onto gl.\n   * Each sub-object is a plain object whose properties are defined as\n   * getters/setters that read/write the canonical flat properties on gl.\n   * This means there is exactly ONE storage location per value — no copies,\n   * no sync needed.\n   *\n   * Namespaces:\n   *   gl.series  — parsed series data and chart-type-specific arrays\n   *   gl.axes    — axis bounds, scales, ranges, tick state\n   *   gl.layout  — SVG/grid dimensions, translations, label sizes\n   *   gl.cache   — DOM caches, timers, observers, drawing scratch space\n   *\n   * Note: interact state lives on w.interact (not gl) — see Base.js.\n   * @param {any} gl\n   */ _attachNamespaces(gl) {\n        const proxy = (ns, key, nsKey = key)=>{\n            Object.defineProperty(ns, nsKey, {\n                get () {\n                    return gl[key];\n                },\n                set (v2) {\n                    gl[key] = v2;\n                },\n                enumerable: true,\n                configurable: true\n            });\n        };\n        const seriesNS = {};\n        proxy(seriesNS, \"series\", \"data\");\n        for (const key of [\n            \"seriesNames\",\n            \"seriesX\",\n            \"seriesZ\",\n            \"seriesXvalues\",\n            \"seriesYvalues\",\n            \"seriesGoals\",\n            \"seriesLog\",\n            \"seriesColors\",\n            \"seriesPercent\",\n            \"seriesTotals\",\n            \"stackedSeriesTotals\",\n            \"seriesCandleO\",\n            \"seriesCandleH\",\n            \"seriesCandleM\",\n            \"seriesCandleL\",\n            \"seriesCandleC\",\n            \"seriesRangeStart\",\n            \"seriesRangeEnd\",\n            \"seriesRange\",\n            \"seriesYAxisMap\",\n            \"seriesYAxisReverseMap\",\n            \"seriesGroups\",\n            \"barGroups\",\n            \"lineGroups\",\n            \"areaGroups\",\n            \"originalSeries\",\n            \"collapsedSeries\",\n            \"collapsedSeriesIndices\",\n            \"ancillaryCollapsedSeries\",\n            \"ancillaryCollapsedSeriesIndices\",\n            \"allSeriesCollapsed\",\n            \"risingSeries\",\n            \"previousPaths\",\n            \"ignoreYAxisIndexes\",\n            \"labels\",\n            \"categoryLabels\",\n            \"timescaleLabels\",\n            \"groups\"\n        ])proxy(seriesNS, key);\n        Object.defineProperty(gl, \"seriesNS\", {\n            value: seriesNS,\n            writable: false,\n            enumerable: false,\n            configurable: true\n        });\n        const axesNS = {};\n        for (const key of [\n            \"minX\",\n            \"maxX\",\n            \"initialMinX\",\n            \"initialMaxX\",\n            \"minY\",\n            \"maxY\",\n            \"minYArr\",\n            \"maxYArr\",\n            \"minZ\",\n            \"maxZ\",\n            \"minDate\",\n            \"maxDate\",\n            \"minXDiff\",\n            \"xRange\",\n            \"yRange\",\n            \"zRange\",\n            \"xAxisScale\",\n            \"yAxisScale\",\n            \"xAxisTicksPositions\",\n            \"xTickAmount\",\n            \"multiAxisTickAmount\",\n            \"dataPoints\",\n            \"maxValsInArrayIndex\",\n            \"isXNumeric\",\n            \"isMultipleYAxis\",\n            \"isMultiLineX\",\n            \"isDataXYZ\",\n            \"dataFormatXNumeric\",\n            \"allSeriesHasEqualX\",\n            \"hasNullValues\",\n            \"dataWasParsed\",\n            \"hasXaxisGroups\",\n            \"hasSeriesGroups\",\n            \"skipFirstTimelinelabel\",\n            \"skipLastTimelinelabel\",\n            \"yValueDecimal\",\n            \"invalidLogScale\",\n            \"noLabelsProvided\"\n        ])proxy(axesNS, key);\n        Object.defineProperty(gl, \"axes\", {\n            value: axesNS,\n            writable: false,\n            enumerable: false,\n            configurable: true\n        });\n        const layoutNS = {};\n        for (const key of [\n            \"svgWidth\",\n            \"svgHeight\",\n            \"gridWidth\",\n            \"gridHeight\",\n            \"translateX\",\n            \"translateY\",\n            \"translateXAxisX\",\n            \"translateXAxisY\",\n            \"translateYAxisX\",\n            \"xAxisLabelsHeight\",\n            \"xAxisGroupLabelsHeight\",\n            \"xAxisLabelsWidth\",\n            \"yAxisLabelsWidth\",\n            \"yAxisWidths\",\n            \"yLabelsCoords\",\n            \"yTitleCoords\",\n            \"padHorizontal\",\n            \"barPadForNumericAxis\",\n            \"rotateXLabels\",\n            \"scaleX\",\n            \"scaleY\",\n            \"radialSize\",\n            \"defaultLabels\",\n            \"overlappingXLabels\"\n        ])proxy(layoutNS, key);\n        Object.defineProperty(gl, \"layout\", {\n            value: layoutNS,\n            writable: false,\n            enumerable: false,\n            configurable: true\n        });\n        const cacheNS = {};\n        for (const key of [\n            \"domCache\",\n            \"dimensionCache\",\n            \"cachedSelectors\",\n            \"textRectsCache\",\n            \"pointsArray\",\n            \"dataLabelsRects\",\n            \"lastDrawnDataLabelsIndexes\",\n            \"delayedElements\",\n            \"resizeTimer\",\n            \"selectionResizeTimer\",\n            \"resizeObserver\"\n        ])proxy(cacheNS, key);\n        Object.defineProperty(gl, \"cache\", {\n            value: cacheNS,\n            writable: false,\n            enumerable: false,\n            configurable: true\n        });\n    }\n    /**\n   * Persistent chart state — set ONCE at chart construction and intentionally NOT\n   * reset by initGlobalVars.  These values must survive updateSeries / re-render.\n   *\n   * Rule: if a value is recalculated fresh on every render it belongs in\n   * initGlobalVars instead, not here.\n   * @returns {import('../../types/internal').ChartGlobals}\n   * @param {Record<string, any>} config\n   */ globalVars(config) {\n        const globals = {\n            // ── Identity (set once, never changes) ───────────────────────────────────\n            chartID: null,\n            // full chart ID: \"apexcharts-<cuid>\"\n            cuid: null,\n            // random suffix only\n            // ── Event registry (accumulates listeners, never reset) ───────────────────\n            events: {\n                beforeMount: [],\n                mounted: [],\n                updated: [],\n                clicked: [],\n                selection: [],\n                dataPointSelection: [],\n                zoomed: [],\n                scrolled: []\n            },\n            // ── Theme colors (set by Theme module after config merge) ─────────────────\n            colors: [],\n            fill: {\n                colors: []\n            },\n            // ── Animation-frame handles cancellable across re-renders ─────────────────\n            // The chart-type instances that own these loops (Radial needle, Unit\n            // gather/exit) are recreated every render, so the handle lives here: a new\n            // render cancels the previous render's loop before starting its own,\n            // instead of leaving it to animate detached nodes. NOT reset per render.\n            radialNeedleRAF: null,\n            unitGatherRAF: null,\n            unitExitRAF: null,\n            stroke: {\n                colors: []\n            },\n            dataLabels: {\n                style: {\n                    colors: []\n                }\n            },\n            radarPolygons: {\n                fill: {\n                    colors: []\n                }\n            },\n            markers: {\n                colors: [],\n                size: config.markers.size,\n                largestSize: 0\n            },\n            LINE_HEIGHT_RATIO: // ── Device / environment detected once at startup ─────────────────────────\n            // Note: isTouchDevice lives on w.interact — see Base.js. Shim installed there.\n            $e4b487e979d7c06d$var$LINE_HEIGHT_RATIO,\n            // ── Chart-type flags (derived from config, set during Core.mount) ─────────\n            axisCharts: true,\n            // false for pie/radial/treemap etc.\n            isSlopeChart: config.plotOptions.line.isSlopeChart,\n            comboCharts: false,\n            // true when mixing line + column series\n            // ── Config snapshots (backups for zoom-reset / updateOptions) ────────────\n            initialConfig: null,\n            // deep clone of the original user config\n            initialSeries: [],\n            // The `--apx-surface` value Theme wrote into chart.background, so a later\n            // token read can tell its own value from an explicit user background and\n            // update it (see Theme.applyTokenChrome). Persistent: a re-render must\n            // not forget it.\n            tokenSurface: void 0,\n            lastXAxis: [],\n            lastYAxis: [],\n            // ── User interaction state (must survive re-renders) ──────────────────────\n            // Note: zoomEnabled, panEnabled, selectionEnabled, zoomed, selection,\n            //       visibleXRange, selectedDataPoints, mousedown, clientX, clientY,\n            //       lastClientPosition, capturedSeriesIndex, capturedDataPointIndex,\n            //       disableZoomIn, disableZoomOut, isTouchDevice\n            //       live on w.interact — see Base.js. Backward-compat shims installed there.\n            // Series collapse state (user-driven, must persist across re-renders)\n            allSeriesCollapsed: false,\n            collapsedSeries: [],\n            collapsedSeriesIndices: [],\n            ancillaryCollapsedSeries: [],\n            ancillaryCollapsedSeriesIndices: [],\n            risingSeries: [],\n            // series being re-shown after collapse\n            ignoreYAxisIndexes: [],\n            // y-axis indices excluded during series collapse\n            // ── Lifecycle / update flags ──────────────────────────────────────────────\n            isDirty: false,\n            // true when user called an update method manually\n            isExecCalled: false,\n            // true when update came via exec()\n            dataChanged: false,\n            // true when series data was changed dynamically\n            resized: false,\n            // true after a container resize\n            // ── Data format flags (derived from config/series, stable between renders) ─\n            // Note: dataFormatXNumeric lives on w.axisFlags — see Base.js. Shim installed there.\n            // hasNullValues / invalidLogScale are recomputed every render and reset in\n            // initGlobalVars (they are NOT stable between renders).\n            // Persistent data tracking\n            columnSeries: null,\n            // tracks which series are rendered as bars/columns\n            yaxis: null,\n            // resolved yaxis config array\n            total: 0,\n            // running total (used by pie/radial)\n            // ── Animation control ─────────────────────────────────────────────────────\n            shouldAnimate: true,\n            previousPaths: [],\n            // paths from previous render — source for enter animation\n            // polarArea's last-drawn sector angles. Its angles are count-based, not\n            // value-based, so a data-change animation cannot reconstruct them from\n            // previousPaths (the previous VALUES) the way pie does; Pie.draw stashes\n            // the real ones here each render.\n            prevPolarAngles: null,\n            // Streaming scroll: previous frame's parsed rows + pixel positions,\n            // captured by Series.getPreviousPaths(). Consulted (like previousPaths)\n            // only while a data-change morph renders. See StreamScroll.\n            prevStreamFrame: null,\n            // Axis-chrome snapshot (tick label texts/positions + gridline positions)\n            // captured alongside prevStreamFrame; consumed once by AxisTransition\n            // after a variable-length re-render mounts.\n            prevChromeFrame: null,\n            // ── SVG viewport (set by Dimensions, but persistent as layout anchor) ─────\n            svgWidth: 0,\n            svgHeight: 0,\n            // Fingerprint of the container inputs that fed the last rendered size, so\n            // the window-resize handler can skip a redraw (and the animation teardown\n            // it causes) when a resize does not change the chart's drawing box.\n            lastResizeSignature: null,\n            // Note: gridWidth, gridHeight, translateX, translateY, translateXAxisX,\n            // translateXAxisY, xAxisLabelsHeight, xAxisGroupLabelsHeight, xAxisLabelsWidth,\n            // rotateXLabels, xAxisHeight, yLabelsCoords, yTitleCoords live on w.layout —\n            // see Base.js. Backward-compat shims installed there.\n            defaultLabels: false,\n            // Note: formatter properties (xLabelFormatter, yLabelFormatters, etc.) live on\n            // w.formatters — see Base.js. Backward-compat shims installed there.\n            yAxisLabelsWidth: 0,\n            scaleX: 1,\n            scaleY: 1,\n            translateYAxisX: [],\n            yAxisWidths: [],\n            // ── Instances (created once, replaced only on full re-init) ──────────────\n            tooltip: null,\n            resizeObserver: null,\n            // ── Locale (loaded once; changes only via setLocale()) ───────────────────\n            locale: {},\n            // ── Method queue (deferred calls during async operations) ────────────────\n            memory: {\n                methodsToExec: []\n            },\n            // ── Scale configuration constants — imported from utils/Constants.js ──────\n            niceScaleAllowedMagMsd: $e4b487e979d7c06d$var$NICE_SCALE_ALLOWED_MAG_MSD,\n            niceScaleDefaultTicks: $e4b487e979d7c06d$var$NICE_SCALE_DEFAULT_TICKS,\n            // ── Multi-axis series mapping ─────────────────────────────────────────────\n            seriesYAxisMap: [],\n            // yAxis index → series indices[]\n            seriesYAxisReverseMap: [],\n            // series index → yAxis index\n            noData: false\n        };\n        return /** @type {import('../../types/internal').ChartGlobals} */ /** @type {unknown} */ globals;\n    }\n    /**\n   * Lazy initial-series snapshot. Capturing `initialSeries` used to deep-clone\n   * the entire series on every parse and every update: the single largest CPU\n   * bucket at 50k+ points (profiled at ~23ms per 50k update). The setter now\n   * stores a cheap per-series shallow copy (series OBJECTS copied, data arrays\n   * shared) and the deep snapshot materializes only when something actually\n   * reads it (resetSeries, toolbar reset-home, tooltip same-length check).\n   *\n   * Why sharing the data arrays is safe: internal \"mutations\" of a series'\n   * data are property REPLACEMENTS (`series[i].data = []` on legend collapse),\n   * which cannot reach the captured copies because each series object was\n   * copied at capture time. The one in-place mutator (appendData's push loop)\n   * re-captures immediately after mutating, so the pending snapshot never\n   * spans the mutation.\n   *\n   * @param {Record<string, any>} globals\n   */ defineLazyInitialSeries(globals) {\n        let src = [];\n        let snap = null;\n        Object.defineProperty(globals, \"initialSeries\", {\n            configurable: true,\n            enumerable: true,\n            get () {\n                if (snap === null) snap = $e4b487e979d7c06d$var$Utils$1.clone(src);\n                return snap;\n            },\n            set (value) {\n                src = Array.isArray(value) ? value.map((s2)=>s2 && typeof s2 === \"object\" && !Array.isArray(s2) ? $e4b487e979d7c06d$var$__spreadValues({}, s2) : s2) : value;\n                snap = null;\n                globals._initialSeriesPeek = src;\n            }\n        });\n        globals._initialSeriesPeek = src;\n    }\n    /**\n   * @param {Record<string, any>} config\n   */ init(config) {\n        const globals = this.globalVars(config);\n        this.initGlobalVars(globals);\n        this.defineLazyInitialSeries(globals);\n        globals.initialConfig = $e4b487e979d7c06d$var$Utils$1.extend({}, config);\n        globals.initialSeries = config.series;\n        globals.lastXAxis = $e4b487e979d7c06d$var$Utils$1.clone(/** @type {NonNullable<typeof globals.initialConfig>} */ globals.initialConfig.xaxis);\n        globals.lastYAxis = $e4b487e979d7c06d$var$Utils$1.clone(/** @type {NonNullable<typeof globals.initialConfig>} */ globals.initialConfig.yaxis);\n        return globals;\n    }\n}\nclass $e4b487e979d7c06d$var$Base {\n    /**\n   * @param {object} opts\n   */ constructor(opts){\n        this.opts = opts;\n    }\n    /**\n   * Build and return the full chart state object `w`.\n   * @returns {import('../types/internal').ChartStateW}\n   */ init() {\n        const config = new $e4b487e979d7c06d$var$Config(this.opts).init({\n            responsiveOverride: false\n        });\n        const globals = new $e4b487e979d7c06d$var$Globals().init(config);\n        const w2 = {\n            config: config,\n            globals: globals,\n            dom: {},\n            // DOM node cache — lives here, not inside globals\n            interact: {\n                // Tool mode (derived from toolbar config at construction, updated by Toolbar)\n                zoomEnabled: config.chart.toolbar.autoSelected === \"zoom\" && config.chart.toolbar.tools.zoom && config.chart.zoom.enabled,\n                panEnabled: config.chart.toolbar.autoSelected === \"pan\" && config.chart.toolbar.tools.pan,\n                selectionEnabled: config.chart.toolbar.autoSelected === \"selection\" && config.chart.toolbar.tools.selection,\n                // Measure tool pre-selected via toolbar.autoSelected: 'measure'. Armed by\n                // the Measure module (self-arms on mount) and the toolbar button.\n                measureEnabled: config.chart.toolbar.autoSelected === \"measure\" && !!config.chart.toolbar.tools.measure && !!(config.chart.measure && config.chart.measure.enabled),\n                // Zoom / pan state (user-driven, must persist across re-renders)\n                zoomed: false,\n                selection: void 0,\n                visibleXRange: void 0,\n                selectedDataPoints: [],\n                // Mouse / pointer state\n                mousedown: false,\n                clientX: null,\n                clientY: null,\n                lastClientPosition: {},\n                // Tooltip capture state\n                capturedSeriesIndex: -1,\n                capturedDataPointIndex: -1,\n                // Timescale zoom bounds (reset per render by TimeScale)\n                disableZoomIn: false,\n                disableZoomOut: false,\n                // Device detection (set once at construction)\n                isTouchDevice: $e4b487e979d7c06d$var$Environment.isBrowser() ? \"ontouchstart\" in window || navigator.maxTouchPoints > 0 : false\n            },\n            formatters: {\n                // Populated by Formatters.setLabelFormatters() each render\n                xLabelFormatter: void 0,\n                yLabelFormatters: [],\n                xaxisTooltipFormatter: void 0,\n                ttKeyFormatter: void 0,\n                ttVal: void 0,\n                ttZFormatter: void 0,\n                legendFormatter: void 0\n            },\n            // Candlestick / boxplot OHLC arrays — written by Data.handleCandleStickBoxData()\n            // each render; empty for all other chart types.\n            candleData: {\n                seriesCandleO: [],\n                seriesCandleH: [],\n                seriesCandleM: [],\n                seriesCandleL: [],\n                seriesCandleC: [],\n                // Optional raw observations per boxPlot data point ([i][j] = number[]),\n                // rendered as jitter dots. Empty unless boxPlot points are supplied.\n                seriesBoxPoints: []\n            },\n            // Range chart arrays — written by Data.handleRangeData() each render;\n            // empty for all other chart types.\n            rangeData: {\n                seriesRangeStart: [],\n                seriesRangeEnd: [],\n                seriesRange: []\n            },\n            // Violin distribution arrays — written by Data.handleViolinData() each\n            // render; empty for all other chart types.\n            //   seriesViolinDensity[i][j] = { values:number[], weights:number[], maxWeight:number }\n            //   seriesViolinPoints[i][j]  = number[] (raw observations, value-axis units)\n            //   seriesViolinMin/Max[i][j] = number (extent of density + points — drives Range.js)\n            violinData: {\n                seriesViolinDensity: [],\n                seriesViolinPoints: [],\n                seriesViolinMin: [],\n                seriesViolinMax: []\n            },\n            // Histogram binning — written by Data.binHistogramData() each render;\n            // empty for all other chart types.\n            //   edges[k]     = bin boundaries (length = binCount + 1)\n            //   counts[i][k] = raw observation count per series, before normalize\n            //   rule         = the rule that chose the width ('fd', 'sturges', ...)\n            histogramData: {\n                edges: [],\n                binWidth: 0,\n                counts: [],\n                rule: \"\",\n                capped: false\n            },\n            // Label / category data — written by Data.parseData() and TimeScale each render.\n            labelData: {\n                labels: [],\n                categoryLabels: [],\n                timescaleLabels: [],\n                // written by TimeScale.calculateTimeScaleMinMax()\n                hasXaxisGroups: false,\n                groups: [],\n                seriesGroups: []\n            },\n            // Axis / parsing behaviour flags — written by Data.parseData() each render.\n            axisFlags: {\n                isXNumeric: false,\n                dataFormatXNumeric: false,\n                isDataXYZ: false,\n                isRangeData: false,\n                isRangeBar: false,\n                isMultiLineX: false,\n                noLabelsProvided: false,\n                dataWasParsed: false\n            },\n            // Parsed series data — written by Data.parseData() each render.\n            // Note: initialSeries and originalSeries are intentionally excluded —\n            // they are persistent (survive re-renders) and remain on w.globals.\n            seriesData: {\n                series: [],\n                // main y-values array\n                seriesNames: [],\n                seriesX: [],\n                seriesZ: [],\n                seriesColors: [],\n                seriesGoals: [],\n                stackedSeriesTotals: [],\n                stackedSeriesTotalsByGroups: [],\n                unitData: []\n            },\n            // Grid / axis layout computed by Dimensions.plotCoords() each render.\n            // gridWidth/gridHeight/translateX/translateY are also used as starting\n            // points by Dimensions on the next render (accumulated values), so the\n            // shim must be bidirectional — reads and writes both route correctly.\n            layout: {\n                gridHeight: 0,\n                gridWidth: 0,\n                translateX: 0,\n                translateY: 0,\n                translateXAxisX: 0,\n                translateXAxisY: 0,\n                rotateXLabels: false,\n                xAxisHeight: 0,\n                xAxisLabelsHeight: 0,\n                xAxisGroupLabelsHeight: 0,\n                xAxisLabelsWidth: 0,\n                yLabelsCoords: [],\n                yTitleCoords: [],\n                gridPad: {\n                    top: 0,\n                    right: 0,\n                    bottom: 0,\n                    left: 0\n                }\n            }\n        };\n        Object.defineProperty(globals, \"dom\", {\n            get () {\n                return w2.dom;\n            },\n            set (v2) {\n                w2.dom = v2;\n            },\n            enumerable: false,\n            configurable: true\n        });\n        for (const key of [\n            \"xLabelFormatter\",\n            \"yLabelFormatters\",\n            \"xaxisTooltipFormatter\",\n            \"ttKeyFormatter\",\n            \"ttVal\",\n            \"ttZFormatter\",\n            \"legendFormatter\"\n        ])Object.defineProperty(globals, key, {\n            get () {\n                return /** @type {Record<string,any>} */ w2.formatters[key];\n            },\n            set (v2) {\n                w2.formatters[key] = v2;\n            },\n            enumerable: false,\n            configurable: true\n        });\n        for (const key of [\n            \"zoomEnabled\",\n            \"panEnabled\",\n            \"selectionEnabled\",\n            \"zoomed\",\n            \"selection\",\n            \"visibleXRange\",\n            \"selectedDataPoints\",\n            \"mousedown\",\n            \"clientX\",\n            \"clientY\",\n            \"lastClientPosition\",\n            \"capturedSeriesIndex\",\n            \"capturedDataPointIndex\",\n            \"disableZoomIn\",\n            \"disableZoomOut\",\n            \"isTouchDevice\"\n        ])Object.defineProperty(globals, key, {\n            get () {\n                return /** @type {Record<string,any>} */ w2.interact[key];\n            },\n            set (v2) {\n                w2.interact[key] = v2;\n            },\n            enumerable: false,\n            configurable: true\n        });\n        for (const key of [\n            \"gridHeight\",\n            \"gridWidth\",\n            \"translateX\",\n            \"translateY\",\n            \"translateXAxisX\",\n            \"translateXAxisY\",\n            \"rotateXLabels\",\n            \"xAxisHeight\",\n            \"xAxisLabelsHeight\",\n            \"xAxisGroupLabelsHeight\",\n            \"xAxisLabelsWidth\",\n            \"yLabelsCoords\",\n            \"yTitleCoords\",\n            \"gridPad\"\n        ])Object.defineProperty(globals, key, {\n            get () {\n                return /** @type {Record<string,any>} */ w2.layout[key];\n            },\n            set (v2) {\n                w2.layout[key] = v2;\n            },\n            enumerable: false,\n            configurable: true\n        });\n        for (const key of [\n            \"series\",\n            \"seriesNames\",\n            \"seriesX\",\n            \"seriesZ\",\n            \"seriesColors\",\n            \"seriesGoals\",\n            \"stackedSeriesTotals\",\n            \"stackedSeriesTotalsByGroups\"\n        ])Object.defineProperty(globals, key, {\n            get () {\n                return /** @type {Record<string,any>} */ w2.seriesData[key];\n            },\n            set (v2) {\n                w2.seriesData[key] = v2;\n            },\n            enumerable: false,\n            configurable: true\n        });\n        for (const key of [\n            \"isXNumeric\",\n            \"dataFormatXNumeric\",\n            \"isDataXYZ\",\n            \"isRangeData\",\n            \"isRangeBar\",\n            \"isMultiLineX\",\n            \"noLabelsProvided\",\n            \"dataWasParsed\"\n        ])Object.defineProperty(globals, key, {\n            get () {\n                return /** @type {Record<string,any>} */ w2.axisFlags[key];\n            },\n            set (v2) {\n                w2.axisFlags[key] = v2;\n            },\n            enumerable: false,\n            configurable: true\n        });\n        for (const key of [\n            \"labels\",\n            \"categoryLabels\",\n            \"timescaleLabels\",\n            \"hasXaxisGroups\",\n            \"groups\",\n            \"seriesGroups\"\n        ])Object.defineProperty(globals, key, {\n            get () {\n                return /** @type {Record<string,any>} */ w2.labelData[key];\n            },\n            set (v2) {\n                w2.labelData[key] = v2;\n            },\n            enumerable: false,\n            configurable: true\n        });\n        for (const key of [\n            \"seriesRangeStart\",\n            \"seriesRangeEnd\",\n            \"seriesRange\"\n        ])Object.defineProperty(globals, key, {\n            get () {\n                return /** @type {Record<string,any>} */ w2.rangeData[key];\n            },\n            set (v2) {\n                w2.rangeData[key] = v2;\n            },\n            enumerable: false,\n            configurable: true\n        });\n        for (const key of [\n            \"seriesCandleO\",\n            \"seriesCandleH\",\n            \"seriesCandleM\",\n            \"seriesCandleL\",\n            \"seriesCandleC\"\n        ])Object.defineProperty(globals, key, {\n            get () {\n                return /** @type {Record<string,any>} */ w2.candleData[key];\n            },\n            set (v2) {\n                w2.candleData[key] = v2;\n            },\n            enumerable: false,\n            configurable: true\n        });\n        for (const key of [\n            \"seriesViolinDensity\",\n            \"seriesViolinPoints\",\n            \"seriesViolinMin\",\n            \"seriesViolinMax\"\n        ])Object.defineProperty(globals, key, {\n            get () {\n                return /** @type {Record<string,any>} */ w2.violinData[key];\n            },\n            set (v2) {\n                w2.violinData[key] = v2;\n            },\n            enumerable: false,\n            configurable: true\n        });\n        return /** @type {import('../types/internal').ChartStateW} */ /** @type {unknown} */ w2;\n    }\n}\nclass $e4b487e979d7c06d$var$CoreUtils {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n    }\n    /**\n   * @param {any[]} series\n   * @param {string} chartType\n   */ static checkComboSeries(series, chartType) {\n        let comboCharts = false;\n        let comboBarCount = 0;\n        let comboCount = 0;\n        if (chartType === void 0) chartType = \"line\";\n        if (series.length && typeof series[0].type !== \"undefined\") series.forEach((s2)=>{\n            if (s2.type === \"bar\" || s2.type === \"column\" || s2.type === \"candlestick\" || s2.type === \"boxPlot\" || s2.type === \"violin\") comboBarCount++;\n            if (typeof s2.type !== \"undefined\" && s2.type !== chartType) comboCount++;\n        });\n        if (comboCount > 0) comboCharts = true;\n        return {\n            comboBarCount: comboBarCount,\n            comboCharts: comboCharts\n        };\n    }\n    /**\n   * @memberof CoreUtils\n   * returns the sum of all individual values in a multiple stacked series\n   * Eg. w.seriesData.series = [[32,33,43,12], [2,3,5,1]]\n   *  @return [34,36,48,13]\n   * @param {number[]} excludedSeriesIndices\n   **/ getStackedSeriesTotals(excludedSeriesIndices = []) {\n        const w2 = this.w;\n        const total = [];\n        if (w2.seriesData.series.length === 0) return total;\n        for(let i2 = 0; i2 < w2.seriesData.series[w2.globals.maxValsInArrayIndex].length; i2++){\n            let t2 = 0;\n            for(let j = 0; j < w2.seriesData.series.length; j++)if (typeof w2.seriesData.series[j][i2] !== \"undefined\" && excludedSeriesIndices.indexOf(j) === -1) t2 += w2.seriesData.series[j][i2];\n            total.push(t2);\n        }\n        return total;\n    }\n    // get total of the all values inside all series\n    /**\n   * @param {number | null} [index]\n   */ getSeriesTotalByIndex(index = null) {\n        if (index === null) return /** @type {any[]} */ this.w.config.series.reduce((acc, cur)=>acc + cur, 0);\n        else {\n            const seriesAtIndex = this.w.seriesData.series[index];\n            if (!Array.isArray(seriesAtIndex)) return seriesAtIndex != null ? seriesAtIndex : 0;\n            return seriesAtIndex.reduce((acc, cur)=>acc + cur, 0);\n        }\n    }\n    /**\n   * @memberof CoreUtils\n   * returns the sum of values in a multiple stacked grouped charts\n   * Eg. w.seriesData.series = [[32,33,43,12], [2,3,5,1], [43, 23, 34, 22]]\n   * series 1 and 2 are in a group, while series 3 is in another group\n   *  @return [[34, 36, 48, 12], [43, 23, 34, 22]]\n   **/ getStackedSeriesTotalsByGroups() {\n        const w2 = this.w;\n        const total = [];\n        w2.labelData.seriesGroups.forEach((sg)=>{\n            const includedIndexes = [];\n            w2.config.series.forEach((s2, si)=>{\n                if (sg.indexOf(w2.seriesData.seriesNames[si]) > -1) includedIndexes.push(si);\n            });\n            const excludedIndices = w2.seriesData.series.map((_, fi)=>includedIndexes.indexOf(fi) === -1 ? fi : -1).filter((f)=>f !== -1);\n            total.push(this.getStackedSeriesTotals(excludedIndices));\n        });\n        return total;\n    }\n    setSeriesYAxisMappings() {\n        const gl = this.w.globals;\n        const cnf = this.w.config;\n        let axisSeriesMap = [];\n        const seriesYAxisReverseMap = [];\n        const unassignedSeriesIndices = [];\n        const seriesNameArrayStyle = this.w.seriesData.series.length > cnf.yaxis.length || /**\n     * @param {ApexYAxis} a\n     */ cnf.yaxis.some((a2)=>Array.isArray(a2.seriesName));\n        cnf.series.forEach((_s, i2)=>{\n            unassignedSeriesIndices.push(i2);\n            seriesYAxisReverseMap.push(null);\n        });\n        cnf.yaxis.forEach((_yaxe, yi)=>{\n            axisSeriesMap[yi] = [];\n        });\n        const unassignedYAxisIndices = [];\n        cnf.yaxis.forEach((yaxe, yi)=>{\n            let assigned = false;\n            if (yaxe.seriesName) {\n                let seriesNames = [];\n                if (Array.isArray(yaxe.seriesName)) seriesNames = yaxe.seriesName;\n                else seriesNames.push(yaxe.seriesName);\n                seriesNames.forEach((name2)=>{\n                    cnf.series.forEach((s2, si)=>{\n                        if (/** @type {any} */ s2.name === name2) {\n                            let remove = si;\n                            if (yi === si || seriesNameArrayStyle) {\n                                if (!seriesNameArrayStyle || unassignedSeriesIndices.indexOf(si) > -1) axisSeriesMap[yi].push([\n                                    yi,\n                                    si\n                                ]);\n                                else console.warn(\"Series '\" + /** @type {any} */ s2.name + \"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes.\");\n                            } else {\n                                axisSeriesMap[si].push([\n                                    si,\n                                    yi\n                                ]);\n                                remove = yi;\n                            }\n                            assigned = true;\n                            remove = unassignedSeriesIndices.indexOf(remove);\n                            if (remove !== -1) unassignedSeriesIndices.splice(remove, 1);\n                        }\n                    });\n                });\n            }\n            if (!assigned) unassignedYAxisIndices.push(yi);\n        });\n        axisSeriesMap = axisSeriesMap.map((yaxe)=>{\n            const ra = [];\n            yaxe.forEach((sa)=>{\n                seriesYAxisReverseMap[sa[1]] = sa[0];\n                ra.push(sa[1]);\n            });\n            return ra;\n        });\n        let lastUnassignedYAxis = cnf.yaxis.length - 1;\n        for(let i2 = 0; i2 < unassignedYAxisIndices.length; i2++){\n            lastUnassignedYAxis = unassignedYAxisIndices[i2];\n            axisSeriesMap[lastUnassignedYAxis] = [];\n            if (unassignedSeriesIndices) {\n                const si = unassignedSeriesIndices[0];\n                unassignedSeriesIndices.shift();\n                axisSeriesMap[lastUnassignedYAxis].push(si);\n                seriesYAxisReverseMap[si] = lastUnassignedYAxis;\n            } else break;\n        }\n        unassignedSeriesIndices.forEach((i2)=>{\n            axisSeriesMap[lastUnassignedYAxis].push(i2);\n            seriesYAxisReverseMap[i2] = lastUnassignedYAxis;\n        });\n        gl.seriesYAxisMap = axisSeriesMap.map((x)=>x);\n        gl.seriesYAxisReverseMap = seriesYAxisReverseMap.map((x)=>x);\n        gl.seriesYAxisMap.forEach((axisSeries, ai)=>{\n            axisSeries.forEach((si)=>{\n                if (/** @type {any} */ cnf.series[si] && /** @type {any} */ cnf.series[si].group === void 0) {\n                    const _series = /** @type {any} */ cnf.series[si];\n                    _series.group = \"apexcharts-axis-\".concat(ai.toString());\n                }\n            });\n        });\n    }\n    /**\n   * @param {number | null} [index]\n   */ isSeriesNull(index = null) {\n        let r2 = [];\n        const series = /** @type {any[]} */ this.w.config.series;\n        if (index === null) r2 = series.filter((d)=>d !== null);\n        else if (series[index] && Array.isArray(series[index].data)) r2 = series[index].data.filter((d)=>d !== null);\n        else r2 = series[index] !== null && series[index] !== void 0 ? [\n            series[index]\n        ] : [];\n        return r2.length === 0;\n    }\n    /**\n   * @param {number} index\n   */ seriesHaveSameValues(index) {\n        const seriesAtIndex = this.w.seriesData.series[index];\n        if (!Array.isArray(seriesAtIndex)) return true;\n        return seriesAtIndex.every((val, i2, arr)=>val === arr[0]);\n    }\n    /**\n   * @param {any[]} labels\n   */ getCategoryLabels(labels) {\n        const w2 = this.w;\n        let catLabels = labels.slice();\n        if (w2.config.xaxis.convertedCatToNumeric) catLabels = labels.map((i2)=>{\n            return w2.config.xaxis.labels.formatter(i2 - w2.globals.minX + 1);\n        });\n        return catLabels;\n    }\n    // maxValsInArrayIndex is the index of series[] which has the largest number of items\n    getLargestSeries() {\n        const w2 = this.w;\n        w2.globals.maxValsInArrayIndex = w2.seriesData.series.map((a2)=>a2.length).indexOf(Math.max.apply(Math, /**\n         * @param {number[]} a\n         */ w2.seriesData.series.map((a2)=>a2.length)));\n    }\n    getLargestMarkerSize() {\n        const w2 = this.w;\n        let size = 0;\n        w2.globals.markers.size.forEach((m2)=>{\n            size = Math.max(size, m2);\n        });\n        if (w2.config.markers.discrete && w2.config.markers.discrete.length) w2.config.markers.discrete.forEach((m2)=>{\n            size = Math.max(size, m2.size);\n        });\n        if (size > 0) {\n            if (w2.config.markers.hover.size > 0) size = w2.config.markers.hover.size;\n            else size += w2.config.markers.hover.sizeOffset;\n        }\n        w2.globals.markers.largestSize = size;\n        return size;\n    }\n    /**\n   * @memberof Core\n   * returns the sum of all values in a series\n   * Eg. w.seriesData.series = [[32,33,43,12], [2,3,5,1]]\n   *  @return [120, 11]\n   **/ getSeriesTotals() {\n        const w2 = this.w;\n        w2.globals.seriesTotals = w2.seriesData.series.map((ser)=>{\n            let total = 0;\n            if (Array.isArray(ser)) for(let j = 0; j < ser.length; j++)total += ser[j];\n            else total += ser;\n            return total;\n        });\n    }\n    /**\n   * @param {number} minX\n   * @param {number} maxX\n   */ getSeriesTotalsXRange(minX, maxX) {\n        const w2 = this.w;\n        const seriesTotalsXRange = w2.seriesData.series.map((ser, index)=>{\n            let total = 0;\n            for(let j = 0; j < ser.length; j++)if (w2.seriesData.seriesX[index][j] > minX && w2.seriesData.seriesX[index][j] < maxX) total += ser[j];\n            return total;\n        });\n        return seriesTotalsXRange;\n    }\n    /**\n   * @memberof CoreUtils\n   * returns the percentage value of all individual values which can be used in a 100% stacked series\n   * Eg. w.seriesData.series = [[32, 33, 43, 12], [2, 3, 5, 1]]\n   *  @return [[94.11, 91.66, 89.58, 92.30], [5.88, 8.33, 10.41, 7.7]]\n   **/ getPercentSeries() {\n        const w2 = this.w;\n        w2.globals.seriesPercent = w2.seriesData.series.map((ser)=>{\n            const seriesPercent = [];\n            if (Array.isArray(ser)) for(let j = 0; j < ser.length; j++){\n                const total = w2.seriesData.stackedSeriesTotals[j];\n                let percent = 0;\n                if (total) percent = 100 * ser[j] / total;\n                seriesPercent.push(percent);\n            }\n            else {\n                const total = w2.globals.seriesTotals.reduce((acc, val)=>acc + val, 0);\n                const percent = 100 * ser / total;\n                seriesPercent.push(percent);\n            }\n            return seriesPercent;\n        });\n    }\n    getCalculatedRatios() {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const yRatio = [];\n        let invertedYRatio = 0;\n        let xRatio = 0;\n        let invertedXRatio = 0;\n        let zRatio = 0;\n        let baseLineY = [];\n        let baseLineInvertedY = 0.1;\n        let baseLineX = 0;\n        gl.yRange = [];\n        if (gl.isMultipleYAxis) for(let i2 = 0; i2 < gl.minYArr.length; i2++){\n            gl.yRange.push(Math.abs(gl.minYArr[i2] - gl.maxYArr[i2]));\n            baseLineY.push(0);\n        }\n        else gl.yRange.push(Math.abs(gl.minY - gl.maxY));\n        gl.xRange = Math.abs(gl.maxX - gl.minX);\n        gl.zRange = Math.abs(gl.maxZ - gl.minZ);\n        for(let i2 = 0; i2 < gl.yRange.length; i2++)yRatio.push(gl.yRange[i2] / this.w.layout.gridHeight);\n        xRatio = gl.xRange / this.w.layout.gridWidth;\n        invertedYRatio = /** @type {any} */ gl.yRange / this.w.layout.gridWidth;\n        invertedXRatio = gl.xRange / this.w.layout.gridHeight;\n        zRatio = gl.zRange / this.w.layout.gridHeight * 16;\n        if (!zRatio) zRatio = 1;\n        if (gl.minY !== Number.MIN_VALUE && Math.abs(gl.minY) !== 0) {\n            const _hasNegsGl = /** @type {any} */ gl;\n            _hasNegsGl.hasNegs = true;\n        }\n        if (w2.globals.seriesYAxisReverseMap.length > 0) {\n            const scaleBaseLineYScale = (y, i2)=>{\n                const yAxis = w2.config.yaxis[w2.globals.seriesYAxisReverseMap[i2]];\n                if (!yAxis) return 0;\n                const sign = y < 0 ? -1 : 1;\n                y = Math.abs(y);\n                if (yAxis.logarithmic) y = this.getBaseLog(yAxis.logBase, y);\n                return -sign * y / yRatio[i2];\n            };\n            if (gl.isMultipleYAxis) {\n                baseLineY = [];\n                for(let i2 = 0; i2 < yRatio.length; i2++)baseLineY.push(scaleBaseLineYScale(gl.minYArr[i2], i2));\n            } else {\n                baseLineY = [];\n                baseLineY.push(scaleBaseLineYScale(gl.minY, 0));\n                if (gl.minY !== Number.MIN_VALUE && Math.abs(gl.minY) !== 0) {\n                    baseLineInvertedY = -gl.minY / invertedYRatio;\n                    baseLineX = gl.minX / xRatio;\n                }\n            }\n        } else {\n            baseLineY = [];\n            baseLineY.push(0);\n            baseLineInvertedY = 0;\n            baseLineX = 0;\n        }\n        return {\n            yRatio: yRatio,\n            invertedYRatio: invertedYRatio,\n            zRatio: zRatio,\n            xRatio: xRatio,\n            invertedXRatio: invertedXRatio,\n            baseLineInvertedY: baseLineInvertedY,\n            baseLineY: baseLineY,\n            baseLineX: baseLineX\n        };\n    }\n    /**\n   * @param {any[]} series\n   */ getLogSeries(series) {\n        const w2 = this.w;\n        w2.globals.seriesLog = series.map((s2, i2)=>{\n            const yAxisIndex = w2.globals.seriesYAxisReverseMap[i2];\n            if (w2.config.yaxis[yAxisIndex] && w2.config.yaxis[yAxisIndex].logarithmic) return s2.map((d)=>{\n                if (d === null) return null;\n                return this.getLogVal(w2.config.yaxis[yAxisIndex].logBase, d, i2);\n            });\n            else return s2;\n        });\n        return w2.globals.invalidLogScale ? series : w2.globals.seriesLog;\n    }\n    /**\n   * @param {number} val\n   * @param {number} seriesIndex\n   * @returns {number}\n   */ getLogValAtSeriesIndex(val, seriesIndex) {\n        if (val === null) return /** @type {any} */ null;\n        const w2 = this.w;\n        const yAxisIndex = w2.globals.seriesYAxisReverseMap[seriesIndex];\n        if (w2.config.yaxis[yAxisIndex] && w2.config.yaxis[yAxisIndex].logarithmic) return this.getLogVal(w2.config.yaxis[yAxisIndex].logBase, val, seriesIndex);\n        return val;\n    }\n    /**\n   * @param {number} base\n   * @param {number} value\n   */ getBaseLog(base, value) {\n        return Math.log(value) / Math.log(base);\n    }\n    /**\n   * @param {number} b\n   * @param {number} d\n   * @param {number} seriesIndex\n   */ getLogVal(b2, d, seriesIndex) {\n        if (d <= 0) return 0;\n        const w2 = this.w;\n        const min_log_val = w2.globals.minYArr[seriesIndex] === 0 ? -1 : this.getBaseLog(b2, w2.globals.minYArr[seriesIndex]);\n        const max_log_val = w2.globals.maxYArr[seriesIndex] === 0 ? 0 : this.getBaseLog(b2, w2.globals.maxYArr[seriesIndex]);\n        const number_of_height_levels = max_log_val - min_log_val;\n        if (d < 1) return d / number_of_height_levels;\n        const log_height_value = this.getBaseLog(b2, d) - min_log_val;\n        return log_height_value / number_of_height_levels;\n    }\n    /**\n   * @param {number[]} yRatio\n   */ getLogYRatios(yRatio) {\n        const w2 = this.w;\n        const gl = this.w.globals;\n        const _gl = /** @type {any} */ gl;\n        _gl.yLogRatio = yRatio.slice();\n        _gl.logYRange = /** @type {any[]} */ gl.yRange.map((_, i2)=>{\n            const yAxisIndex = w2.globals.seriesYAxisReverseMap[i2];\n            if (w2.config.yaxis[yAxisIndex] && this.w.config.yaxis[yAxisIndex].logarithmic) {\n                let maxY = -Number.MAX_VALUE;\n                let minY = Number.MIN_VALUE;\n                let range = 1;\n                gl.seriesLog.forEach((s2, si)=>{\n                    s2.forEach((v2)=>{\n                        if (w2.config.yaxis[si] && w2.config.yaxis[si].logarithmic) {\n                            maxY = Math.max(v2, maxY);\n                            minY = Math.min(v2, minY);\n                        }\n                    });\n                });\n                range = Math.pow(gl.yRange[i2], Math.abs(minY - maxY) / gl.yRange[i2]);\n                _gl.yLogRatio[i2] = range / this.w.layout.gridHeight;\n                return range;\n            }\n        });\n        return _gl.invalidLogScale ? yRatio.slice() : _gl.yLogRatio;\n    }\n    // Some config objects can be array - and we need to extend them correctly\n    /**\n   * @param {any} configInstance\n   * @param {Record<string, any>} options\n   * @param {import('../types/internal').ChartStateW} w\n   */ static extendArrayProps(configInstance, options2, w2) {\n        var _a, _b;\n        if (options2 == null ? void 0 : options2.yaxis) options2 = configInstance.extendYAxis(options2, w2);\n        if (options2 == null ? void 0 : options2.annotations) {\n            if (options2.annotations.yaxis) options2 = configInstance.extendYAxisAnnotations(options2);\n            if ((_a = options2 == null ? void 0 : options2.annotations) == null ? void 0 : _a.xaxis) options2 = configInstance.extendXAxisAnnotations(options2);\n            if ((_b = options2 == null ? void 0 : options2.annotations) == null ? void 0 : _b.points) options2 = configInstance.extendPointAnnotations(options2);\n        }\n        return options2;\n    }\n    // Series of the same group and type can be stacked together distinct from\n    // other series of the same type on the same axis.\n    /**\n   * @param {Record<string, any>} typeSeries\n   * @param {string[]} typeGroups\n   * @param {string} type\n   * @param {string} chartClass\n   */ drawSeriesByGroup(typeSeries, typeGroups, type, chartClass) {\n        const w2 = this.w;\n        const graph = [];\n        if (typeSeries.series.length > 0) typeGroups.forEach((gn)=>{\n            const gs = [];\n            const gi = [];\n            typeSeries.i.forEach((i2, ii)=>{\n                if (/** @type {Record<string,any>} */ w2.config.series[i2].group === gn) {\n                    gs.push(typeSeries.series[ii]);\n                    gi.push(i2);\n                }\n            });\n            gs.length > 0 && graph.push(/** @type {any} */ chartClass.draw(gs, type, gi));\n        });\n        return graph;\n    }\n}\nconst $e4b487e979d7c06d$var$SVGNS$2 = \"http://www.w3.org/2000/svg\";\nclass $e4b487e979d7c06d$var$Point {\n    /**\n   * @param {number|{x:number,y:number}} x\n   * @param {number} [y]\n   */ constructor(x, y){\n        if (typeof x === \"object\") {\n            this.x = x.x;\n            this.y = x.y;\n        } else {\n            this.x = x || 0;\n            this.y = y || 0;\n        }\n    }\n    /**\n   * @param {Matrix} matrix\n   */ transform(matrix) {\n        return matrix.apply(this);\n    }\n    clone() {\n        return new $e4b487e979d7c06d$var$Point(this.x, this.y);\n    }\n}\nclass $e4b487e979d7c06d$var$Matrix {\n    /**\n   * Defaults to the identity matrix when called with no args.\n   * @param {number} [a]\n   * @param {number} [b]\n   * @param {number} [c]\n   * @param {number} [d]\n   * @param {number} [e]\n   * @param {number} [f]\n   */ constructor(a2, b2, c2, d, e2, f){\n        this.a = a2 != null ? a2 : 1;\n        this.b = b2 != null ? b2 : 0;\n        this.c = c2 != null ? c2 : 0;\n        this.d = d != null ? d : 1;\n        this.e = e2 != null ? e2 : 0;\n        this.f = f != null ? f : 0;\n    }\n    /**\n   * @param {number} deg\n   */ rotate(deg) {\n        const rad = deg * Math.PI / 180;\n        const cos = Math.cos(rad);\n        const sin = Math.sin(rad);\n        return this.multiply(new $e4b487e979d7c06d$var$Matrix(cos, sin, -sin, cos, 0, 0));\n    }\n    /**\n   * @param {number} sx\n   * @param {number} sy\n   */ scale(sx, sy) {\n        return this.multiply(new $e4b487e979d7c06d$var$Matrix(sx, 0, 0, sy != null ? sy : sx, 0, 0));\n    }\n    /**\n   * @param {Matrix} m\n   */ multiply(m2) {\n        return new $e4b487e979d7c06d$var$Matrix(this.a * m2.a + this.c * m2.b, this.b * m2.a + this.d * m2.b, this.a * m2.c + this.c * m2.d, this.b * m2.c + this.d * m2.d, this.a * m2.e + this.c * m2.f + this.e, this.b * m2.e + this.d * m2.f + this.f);\n    }\n    /**\n   * @param {Point} point\n   */ apply(point) {\n        return new $e4b487e979d7c06d$var$Point(this.a * point.x + this.c * point.y + this.e, this.b * point.x + this.d * point.y + this.f);\n    }\n}\nclass $e4b487e979d7c06d$var$Box {\n    /**\n   * @param {number} x\n   * @param {number} y\n   * @param {number} w\n   * @param {number} h\n   */ constructor(x, y, w2, h2){\n        this.x = x;\n        this.y = y;\n        this.w = w2;\n        this.h = h2;\n        this.width = w2;\n        this.height = h2;\n        this.x2 = x + w2;\n        this.y2 = y + h2;\n    }\n}\n/*!\n * Path morphing for SVG path animations\n * Based on svg.pathmorphing.js by Ulrich-Matthias Schäfer (MIT License)\n * Refactored to be standalone (no SVG.js dependency)\n *\n * Two algorithms are exported:\n *   - morphPaths()    — command-level interpolation; preserves curves but can\n *                       produce \"wings/flips\" when two shapes have very\n *                       different topology (e.g. bar rect → pie arc).\n *   - morphPolygons() — resamples both shapes into N evenly-spaced perimeter\n *                       points and tweens point-by-point with rotation-search\n *                       alignment; always smooth and non-self-intersecting,\n *                       at the cost of throwing away curve smoothness.\n */ function $e4b487e979d7c06d$var$parsePath(d) {\n    if (!d || typeof d !== \"string\") return [\n        [\n            \"M\",\n            0,\n            0\n        ]\n    ];\n    const commands = [];\n    const re = /([MmLlHhVvCcSsQqTtAaZz])\\s*/g;\n    const numRe = /[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?/gi;\n    let match;\n    const letters = [];\n    const positions = [];\n    while((match = re.exec(d)) !== null){\n        letters.push(match[1]);\n        positions.push(match.index);\n    }\n    for(let i2 = 0; i2 < letters.length; i2++){\n        const start = positions[i2] + letters[i2].length;\n        const end = i2 + 1 < positions.length ? positions[i2 + 1] : d.length;\n        const paramStr = d.substring(start, end);\n        const nums = [];\n        let numMatch;\n        numRe.lastIndex = 0;\n        while((numMatch = numRe.exec(paramStr)) !== null)nums.push(parseFloat(numMatch[0]));\n        const cmd = letters[i2].toUpperCase();\n        if (cmd === \"Z\") commands.push([\n            \"Z\"\n        ]);\n        else if (cmd === \"M\" || cmd === \"L\" || cmd === \"T\") for(let j = 0; j < nums.length; j += 2)commands.push([\n            cmd,\n            nums[j],\n            nums[j + 1]\n        ]);\n        else if (cmd === \"H\") for(let j = 0; j < nums.length; j++)commands.push([\n            cmd,\n            nums[j]\n        ]);\n        else if (cmd === \"V\") for(let j = 0; j < nums.length; j++)commands.push([\n            cmd,\n            nums[j]\n        ]);\n        else if (cmd === \"C\") for(let j = 0; j < nums.length; j += 6)commands.push([\n            cmd,\n            nums[j],\n            nums[j + 1],\n            nums[j + 2],\n            nums[j + 3],\n            nums[j + 4],\n            nums[j + 5]\n        ]);\n        else if (cmd === \"S\" || cmd === \"Q\") for(let j = 0; j < nums.length; j += 4)commands.push([\n            cmd,\n            nums[j],\n            nums[j + 1],\n            nums[j + 2],\n            nums[j + 3]\n        ]);\n        else if (cmd === \"A\") for(let j = 0; j < nums.length; j += 7)commands.push([\n            cmd,\n            nums[j],\n            nums[j + 1],\n            nums[j + 2],\n            nums[j + 3],\n            nums[j + 4],\n            nums[j + 5],\n            nums[j + 6]\n        ]);\n    }\n    if (commands.length === 0) commands.push([\n        \"M\",\n        0,\n        0\n    ]);\n    return commands;\n}\nfunction $e4b487e979d7c06d$var$pathBbox(arr) {\n    let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;\n    arr.forEach((cmd)=>{\n        for(let i2 = 1; i2 < cmd.length; i2 += 2)if (i2 + 1 <= cmd.length) {\n            const x = cmd[i2];\n            const y = cmd[i2 + 1];\n            if (typeof x === \"number\" && typeof y === \"number\") {\n                if (x < minX) minX = x;\n                if (x > maxX) maxX = x;\n                if (y < minY) minY = y;\n                if (y > maxY) maxY = y;\n            }\n        }\n    });\n    if (minX === Infinity) return {\n        x: 0,\n        y: 0,\n        width: 0,\n        height: 0\n    };\n    return {\n        x: minX,\n        y: minY,\n        width: maxX - minX,\n        height: maxY - minY\n    };\n}\nfunction $e4b487e979d7c06d$var$arrayToPath(arr) {\n    return arr.map((cmd)=>cmd.join(\" \")).join(\" \");\n}\nfunction $e4b487e979d7c06d$var$simplify(val) {\n    switch(val[0]){\n        case \"z\":\n        case \"Z\":\n            val[0] = \"L\";\n            val[1] = this.start[0];\n            val[2] = this.start[1];\n            break;\n        case \"H\":\n            val[0] = \"L\";\n            val[2] = this.pos[1];\n            break;\n        case \"V\":\n            val[0] = \"L\";\n            val[2] = val[1];\n            val[1] = this.pos[0];\n            break;\n        case \"T\":\n            val[0] = \"Q\";\n            val[3] = val[1];\n            val[4] = val[2];\n            val[1] = this.reflection[1];\n            val[2] = this.reflection[0];\n            break;\n        case \"S\":\n            val[0] = \"C\";\n            val[6] = val[4];\n            val[5] = val[3];\n            val[4] = val[2];\n            val[3] = val[1];\n            val[2] = this.reflection[1];\n            val[1] = this.reflection[0];\n            break;\n    }\n    return val;\n}\nfunction $e4b487e979d7c06d$var$setPosAndReflection(val) {\n    var len = val.length;\n    this.pos = [\n        val[len - 2],\n        val[len - 1]\n    ];\n    if (\"SCQT\".indexOf(val[0]) != -1) this.reflection = [\n        2 * this.pos[0] - val[len - 4],\n        2 * this.pos[1] - val[len - 3]\n    ];\n    return val;\n}\nfunction $e4b487e979d7c06d$var$toBezier(val) {\n    var _a;\n    var retVal = [\n        val\n    ];\n    switch(val[0]){\n        case \"M\":\n            this.pos = this.start = [\n                val[1],\n                val[2]\n            ];\n            return retVal;\n        case \"L\":\n            val[5] = val[3] = val[1];\n            val[6] = val[4] = val[2];\n            val[1] = this.pos[0];\n            val[2] = this.pos[1];\n            break;\n        case \"Q\":\n            val[6] = val[4];\n            val[5] = val[3];\n            val[4] = val[4] * 1 / 3 + val[2] * 2 / 3;\n            val[3] = val[3] * 1 / 3 + val[1] * 2 / 3;\n            val[2] = this.pos[1] * 1 / 3 + val[2] * 2 / 3;\n            val[1] = this.pos[0] * 1 / 3 + val[1] * 2 / 3;\n            break;\n        case \"A\":\n            retVal = $e4b487e979d7c06d$var$arcToBezier((_a = this.pos) != null ? _a : [], val);\n            val = retVal[0];\n            break;\n    }\n    val[0] = \"C\";\n    this.pos = [\n        val[5],\n        val[6]\n    ];\n    this.reflection = [\n        2 * val[5] - val[3],\n        2 * val[6] - val[4]\n    ];\n    return retVal;\n}\nfunction $e4b487e979d7c06d$var$findNextM(arr, offset) {\n    if (offset === false) return false;\n    for(var i2 = offset, len = arr.length; i2 < len; ++i2){\n        if (arr[i2][0] == \"M\") return i2;\n    }\n    return false;\n}\nfunction $e4b487e979d7c06d$var$arcToBezier(pos, val) {\n    var rx = Math.abs(val[1]), ry = Math.abs(val[2]), xAxisRotation = val[3] % 360, largeArcFlag = val[4], sweepFlag = val[5], x = val[6], y = val[7], A = new $e4b487e979d7c06d$var$Point(pos[0], pos[1]), B = new $e4b487e979d7c06d$var$Point(x, y), primedCoord, lambda, mat, k, c2, cSquare, t2, O, OA, OB, tetaStart, tetaEnd, deltaTeta, nbSectors, f, arcSegPoints, angle, sinAngle, cosAngle, pt, i2, il, retVal = [], x1, y1, x2, y2;\n    if (rx === 0 || ry === 0 || A.x === B.x && A.y === B.y) return [\n        [\n            \"C\",\n            A.x,\n            A.y,\n            B.x,\n            B.y,\n            B.x,\n            B.y\n        ]\n    ];\n    primedCoord = new $e4b487e979d7c06d$var$Point((A.x - B.x) / 2, (A.y - B.y) / 2).transform(// Start with the identity matrix (no args → Matrix defaults a=d=1, others 0).\n    // Passing all-zero args here would produce a degenerate zero matrix, since\n    // `0 ?? 1` is `0`, not `1` — every subsequent transform then yields (0,0)\n    // and the arc-to-bezier conversion crashes on a NaN cascade.\n    /** @type {any} */ new $e4b487e979d7c06d$var$Matrix().rotate(xAxisRotation));\n    lambda = primedCoord.x * primedCoord.x / (rx * rx) + primedCoord.y * primedCoord.y / (ry * ry);\n    if (lambda > 1) {\n        lambda = Math.sqrt(lambda);\n        rx = lambda * rx;\n        ry = lambda * ry;\n    }\n    mat = /** @type {any} */ new $e4b487e979d7c06d$var$Matrix().rotate(xAxisRotation).scale(1 / rx, 1 / ry).rotate(-xAxisRotation);\n    A = A.transform(mat);\n    B = B.transform(mat);\n    k = [\n        B.x - A.x,\n        B.y - A.y\n    ];\n    cSquare = k[0] * k[0] + k[1] * k[1];\n    c2 = Math.sqrt(cSquare);\n    k[0] /= c2;\n    k[1] /= c2;\n    t2 = cSquare < 4 ? Math.sqrt(1 - cSquare / 4) : 0;\n    if (largeArcFlag === sweepFlag) t2 *= -1;\n    O = new $e4b487e979d7c06d$var$Point((B.x + A.x) / 2 + t2 * -k[1], (B.y + A.y) / 2 + t2 * k[0]);\n    OA = new $e4b487e979d7c06d$var$Point(A.x - O.x, A.y - O.y);\n    OB = new $e4b487e979d7c06d$var$Point(B.x - O.x, B.y - O.y);\n    tetaStart = Math.acos(OA.x / Math.sqrt(OA.x * OA.x + OA.y * OA.y));\n    if (OA.y < 0) tetaStart *= -1;\n    tetaEnd = Math.acos(OB.x / Math.sqrt(OB.x * OB.x + OB.y * OB.y));\n    if (OB.y < 0) tetaEnd *= -1;\n    if (sweepFlag && tetaStart > tetaEnd) tetaEnd += 2 * Math.PI;\n    if (!sweepFlag && tetaStart < tetaEnd) tetaEnd -= 2 * Math.PI;\n    nbSectors = Math.ceil(Math.abs(tetaStart - tetaEnd) * 2 / Math.PI);\n    arcSegPoints = [];\n    angle = tetaStart;\n    deltaTeta = (tetaEnd - tetaStart) / nbSectors;\n    f = 4 * Math.tan(deltaTeta / 4) / 3;\n    for(i2 = 0; i2 <= nbSectors; i2++){\n        cosAngle = Math.cos(angle);\n        sinAngle = Math.sin(angle);\n        pt = new $e4b487e979d7c06d$var$Point(O.x + cosAngle, O.y + sinAngle);\n        arcSegPoints[i2] = [\n            new $e4b487e979d7c06d$var$Point(pt.x + f * sinAngle, pt.y - f * cosAngle),\n            pt,\n            new $e4b487e979d7c06d$var$Point(pt.x - f * sinAngle, pt.y + f * cosAngle)\n        ];\n        angle += deltaTeta;\n    }\n    arcSegPoints[0][0] = arcSegPoints[0][1].clone();\n    arcSegPoints[arcSegPoints.length - 1][2] = arcSegPoints[arcSegPoints.length - 1][1].clone();\n    mat = /** @type {any} */ new $e4b487e979d7c06d$var$Matrix().rotate(xAxisRotation).scale(rx, ry).rotate(-xAxisRotation);\n    for(i2 = 0, il = arcSegPoints.length; i2 < il; i2++){\n        arcSegPoints[i2][0] = arcSegPoints[i2][0].transform(mat);\n        arcSegPoints[i2][1] = arcSegPoints[i2][1].transform(mat);\n        arcSegPoints[i2][2] = arcSegPoints[i2][2].transform(mat);\n    }\n    for(i2 = 1, il = arcSegPoints.length; i2 < il; i2++){\n        pt = arcSegPoints[i2 - 1][2];\n        x1 = pt.x;\n        y1 = pt.y;\n        pt = arcSegPoints[i2][0];\n        x2 = pt.x;\n        y2 = pt.y;\n        pt = arcSegPoints[i2][1];\n        x = pt.x;\n        y = pt.y;\n        retVal.push([\n            \"C\",\n            x1,\n            y1,\n            x2,\n            y2,\n            x,\n            y\n        ]);\n    }\n    return retVal;\n}\nfunction $e4b487e979d7c06d$var$handleBlock(startArr, startOffsetM, startOffsetNextM, destArr, destOffsetM, destOffsetNextM) {\n    var startArrTemp = startArr.slice(startOffsetM, startOffsetNextM || void 0);\n    var destArrTemp = destArr.slice(destOffsetM, destOffsetNextM || void 0);\n    var i2 = 0, posStart = {\n        pos: [\n            0,\n            0\n        ],\n        start: [\n            0,\n            0\n        ]\n    }, posDest = {\n        pos: [\n            0,\n            0\n        ],\n        start: [\n            0,\n            0\n        ]\n    };\n    while(true){\n        startArrTemp[i2] = $e4b487e979d7c06d$var$simplify.call(posStart, startArrTemp[i2]);\n        destArrTemp[i2] = $e4b487e979d7c06d$var$simplify.call(posDest, destArrTemp[i2]);\n        if (startArrTemp[i2][0] != destArrTemp[i2][0] || startArrTemp[i2][0] == \"M\" || startArrTemp[i2][0] == \"A\" && (startArrTemp[i2][4] != destArrTemp[i2][4] || startArrTemp[i2][5] != destArrTemp[i2][5])) {\n            Array.prototype.splice.apply(startArrTemp, /** @type {[number, number, ...any[]]} */ [\n                i2,\n                1\n            ].concat(/** @type {any} */ $e4b487e979d7c06d$var$toBezier.call(posStart, startArrTemp[i2])));\n            Array.prototype.splice.apply(destArrTemp, /** @type {[number, number, ...any[]]} */ [\n                i2,\n                1\n            ].concat(/** @type {any} */ $e4b487e979d7c06d$var$toBezier.call(posDest, destArrTemp[i2])));\n        } else {\n            startArrTemp[i2] = /** @type {any} */ $e4b487e979d7c06d$var$setPosAndReflection.call(posStart, startArrTemp[i2]);\n            destArrTemp[i2] = /** @type {any} */ $e4b487e979d7c06d$var$setPosAndReflection.call(posDest, destArrTemp[i2]);\n        }\n        if (++i2 == startArrTemp.length && i2 == destArrTemp.length) break;\n        if (i2 == startArrTemp.length) startArrTemp.push([\n            \"C\",\n            posStart.pos[0],\n            posStart.pos[1],\n            posStart.pos[0],\n            posStart.pos[1],\n            posStart.pos[0],\n            posStart.pos[1]\n        ]);\n        if (i2 == destArrTemp.length) destArrTemp.push([\n            \"C\",\n            posDest.pos[0],\n            posDest.pos[1],\n            posDest.pos[0],\n            posDest.pos[1],\n            posDest.pos[0],\n            posDest.pos[1]\n        ]);\n    }\n    return {\n        start: startArrTemp,\n        dest: destArrTemp\n    };\n}\nfunction $e4b487e979d7c06d$var$synchronizePaths(fromD, toD) {\n    var startArr = $e4b487e979d7c06d$var$parsePath(fromD);\n    var destArr = $e4b487e979d7c06d$var$parsePath(toD);\n    var startOffsetM = 0;\n    var destOffsetM = 0;\n    var startOffsetNextM = false;\n    var destOffsetNextM = false;\n    var result;\n    while(true){\n        if (startOffsetM === false && destOffsetM === false) break;\n        startOffsetNextM = $e4b487e979d7c06d$var$findNextM(startArr, startOffsetM === false ? false : startOffsetM + 1);\n        destOffsetNextM = $e4b487e979d7c06d$var$findNextM(destArr, destOffsetM === false ? false : destOffsetM + 1);\n        if (startOffsetM === false) {\n            const bbox = $e4b487e979d7c06d$var$pathBbox(/** @type {any} */ result.start);\n            if (bbox.height == 0 || bbox.width == 0) startOffsetM = startArr.push(startArr[0]) - 1;\n            else startOffsetM = startArr.push([\n                \"M\",\n                bbox.x + bbox.width / 2,\n                bbox.y + bbox.height / 2\n            ]) - 1;\n        }\n        if (destOffsetM === false) {\n            const bbox = $e4b487e979d7c06d$var$pathBbox(/** @type {any} */ result.dest);\n            if (bbox.height == 0 || bbox.width == 0) destOffsetM = destArr.push(destArr[0]) - 1;\n            else destOffsetM = destArr.push([\n                \"M\",\n                bbox.x + bbox.width / 2,\n                bbox.y + bbox.height / 2\n            ]) - 1;\n        }\n        result = $e4b487e979d7c06d$var$handleBlock(startArr, startOffsetM, startOffsetNextM, destArr, destOffsetM, destOffsetNextM);\n        startArr = startArr.slice(0, startOffsetM).concat(result.start, startOffsetNextM === false ? [] : startArr.slice(startOffsetNextM));\n        destArr = destArr.slice(0, destOffsetM).concat(result.dest, destOffsetNextM === false ? [] : destArr.slice(destOffsetNextM));\n        startOffsetM = startOffsetNextM === false ? false : startOffsetM + result.start.length;\n        destOffsetM = destOffsetNextM === false ? false : destOffsetM + result.dest.length;\n    }\n    return {\n        start: startArr,\n        dest: destArr\n    };\n}\nfunction $e4b487e979d7c06d$var$morphPaths(fromD, toD) {\n    var synced = $e4b487e979d7c06d$var$synchronizePaths(fromD, toD);\n    var startArr = synced.start;\n    var destArr = synced.dest;\n    return function(pos) {\n        var result = startArr.map(function(from, idx) {\n            return destArr[idx].map(function(to, toIdx) {\n                if (toIdx === 0) return to;\n                return from[toIdx] + (destArr[idx][toIdx] - from[toIdx]) * pos;\n            });\n        });\n        return $e4b487e979d7c06d$var$arrayToPath(result);\n    };\n}\nlet $e4b487e979d7c06d$var$_measureSvg = null;\nlet $e4b487e979d7c06d$var$_measurePath = null;\nfunction $e4b487e979d7c06d$var$samplePathPoints(d, n2) {\n    const pts = new Array(n2);\n    if (!$e4b487e979d7c06d$var$Environment.isBrowser()) {\n        const arr = $e4b487e979d7c06d$var$parsePath(d);\n        const bbox = $e4b487e979d7c06d$var$pathBbox(arr);\n        const cx = bbox.x + bbox.width / 2;\n        const cy = bbox.y + bbox.height / 2;\n        for(let i2 = 0; i2 < n2; i2++)pts[i2] = {\n            x: cx,\n            y: cy\n        };\n        return pts;\n    }\n    if (!$e4b487e979d7c06d$var$_measureSvg) {\n        $e4b487e979d7c06d$var$_measureSvg = /** @type {SVGSVGElement} */ document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n        $e4b487e979d7c06d$var$_measureSvg.setAttribute(\"width\", \"0\");\n        $e4b487e979d7c06d$var$_measureSvg.setAttribute(\"height\", \"0\");\n        $e4b487e979d7c06d$var$_measureSvg.setAttribute(\"style\", \"position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;\");\n        $e4b487e979d7c06d$var$_measurePath = /** @type {SVGPathElement} */ document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n        $e4b487e979d7c06d$var$_measureSvg.appendChild($e4b487e979d7c06d$var$_measurePath);\n        document.body.appendChild($e4b487e979d7c06d$var$_measureSvg);\n    }\n    $e4b487e979d7c06d$var$_measurePath.setAttribute(\"d\", d || \"M0 0\");\n    let len = 0;\n    try {\n        len = $e4b487e979d7c06d$var$_measurePath.getTotalLength();\n    } catch (e2) {\n        len = 0;\n    }\n    if (!len || !isFinite(len)) {\n        const arr = $e4b487e979d7c06d$var$parsePath(d);\n        const bbox = $e4b487e979d7c06d$var$pathBbox(arr);\n        const cx = bbox.x + bbox.width / 2;\n        const cy = bbox.y + bbox.height / 2;\n        for(let i2 = 0; i2 < n2; i2++)pts[i2] = {\n            x: cx,\n            y: cy\n        };\n        return pts;\n    }\n    for(let i2 = 0; i2 < n2; i2++)try {\n        const p2 = $e4b487e979d7c06d$var$_measurePath.getPointAtLength(i2 / n2 * len);\n        pts[i2] = {\n            x: p2.x,\n            y: p2.y\n        };\n    } catch (e2) {\n        pts[i2] = {\n            x: 0,\n            y: 0\n        };\n    }\n    return pts;\n}\nfunction $e4b487e979d7c06d$var$morphPolygons(fromD, toD, n2 = 96) {\n    const fromPts = $e4b487e979d7c06d$var$samplePathPoints(fromD, n2);\n    const toPts = $e4b487e979d7c06d$var$samplePathPoints(toD, n2);\n    let bestOffset = 0;\n    let bestDist = Infinity;\n    for(let off = 0; off < n2; off++){\n        let dist = 0;\n        for(let i2 = 0; i2 < n2; i2++){\n            const a2 = fromPts[(i2 + off) % n2];\n            const b2 = toPts[i2];\n            const dx = a2.x - b2.x;\n            const dy = a2.y - b2.y;\n            dist += dx * dx + dy * dy;\n            if (dist >= bestDist) break;\n        }\n        if (dist < bestDist) {\n            bestDist = dist;\n            bestOffset = off;\n        }\n    }\n    const aligned = new Array(n2);\n    for(let i2 = 0; i2 < n2; i2++)aligned[i2] = fromPts[(i2 + bestOffset) % n2];\n    return function(pos) {\n        let out = \"\";\n        for(let i2 = 0; i2 < n2; i2++){\n            const a2 = aligned[i2];\n            const b2 = toPts[i2];\n            const x = a2.x + (b2.x - a2.x) * pos;\n            const y = a2.y + (b2.y - a2.y) * pos;\n            out += (i2 === 0 ? \"M\" : \"L\") + x.toFixed(3) + \" \" + y.toFixed(3) + \" \";\n        }\n        return out + \"Z\";\n    };\n}\nfunction $e4b487e979d7c06d$var$easeInOut(t2) {\n    return -Math.cos(t2 * Math.PI) / 2 + 0.5;\n}\nlet $e4b487e979d7c06d$var$_defaultEasing = $e4b487e979d7c06d$var$easeInOut;\nfunction $e4b487e979d7c06d$var$setDefaultEasing(fn) {\n    $e4b487e979d7c06d$var$_defaultEasing = typeof fn === \"function\" ? fn : $e4b487e979d7c06d$var$easeInOut;\n}\nfunction $e4b487e979d7c06d$var$parseColor$1(str) {\n    if (!str || typeof str !== \"string\") return null;\n    if (str[0] === \"#\") {\n        let hex = str.slice(1);\n        if (hex.length === 3) hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n        const n2 = parseInt(hex, 16);\n        return [\n            n2 >> 16 & 255,\n            n2 >> 8 & 255,\n            n2 & 255,\n            1\n        ];\n    }\n    const m2 = str.match(/rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+))?\\s*\\)/);\n    if (m2) return [\n        +m2[1],\n        +m2[2],\n        +m2[3],\n        m2[4] !== void 0 ? +m2[4] : 1\n    ];\n    return null;\n}\nfunction $e4b487e979d7c06d$var$interpolateColor(from, to, pos) {\n    return `rgba(${Math.round(from[0] + (to[0] - from[0]) * pos)},${Math.round(from[1] + (to[1] - from[1]) * pos)},${Math.round(from[2] + (to[2] - from[2]) * pos)},${from[3] + (to[3] - from[3]) * pos})`;\n}\nclass $e4b487e979d7c06d$var$SVGAnimationRunner {\n    /**\n   * @param {any} element\n   * @param {number} duration\n   * @param {number} delay\n   */ constructor(element, duration, delay){\n        this.el = element;\n        this.duration = duration != null ? duration : 300;\n        this.delay = delay || 0;\n        this._attrTarget = null;\n        this._plotTarget = null;\n        this._plotSnap = null;\n        this._plotAlgorithm = \"commands\";\n        this._afterCb = null;\n        this._duringCb = null;\n        this._easing = null;\n        this._next = null;\n        this._root = null;\n        this._scheduled = false;\n    }\n    /**\n   * Override the easing for this runner (else the module default is used).\n   * @param {(t:number)=>number} fn\n   */ ease(fn) {\n        if (typeof fn === \"function\") this._easing = fn;\n        this._schedule();\n        return this;\n    }\n    /**\n   * @param {Record<string, any>} to\n   */ attr(to) {\n        this._attrTarget = to;\n        this._schedule();\n        return this;\n    }\n    /**\n   * @param {string} d\n   * @param {'commands' | 'polygons'} [algorithm] - morph engine to use for\n   *   the d→d interpolation. 'commands' (default) is the legacy\n   *   per-command lerp; 'polygons' resamples both paths into N evenly\n   *   spaced points and tweens point-by-point (smoother for shapes with\n   *   very different anchor-point counts).\n   * @param {string} [snapTo] - final d to land on when it differs from the\n   *   interpolation target. Used by reconciled length-change morphs: the\n   *   tween runs against a padded path (extra anchors lying exactly on the\n   *   final geometry) but the element must end with the renderer's clean,\n   *   un-padded d so later captures and morphs stay stable.\n   */ plot(d, algorithm, snapTo) {\n        this._plotTarget = d;\n        if (algorithm) this._plotAlgorithm = algorithm;\n        this._plotSnap = snapTo || null;\n        this._schedule();\n        return this;\n    }\n    /**\n   * @param {Function} fn\n   */ after(fn) {\n        this._afterCb = fn;\n        this._schedule();\n        return this;\n    }\n    /**\n   * @param {Function} fn\n   */ during(fn) {\n        this._duringCb = fn;\n        this._schedule();\n        return this;\n    }\n    /**\n   * @param {number} duration\n   * @param {number} delay\n   */ animate(duration, delay) {\n        const next = new $e4b487e979d7c06d$var$SVGAnimationRunner(this.el, duration, delay);\n        this._next = next;\n        next._root = this._root || this;\n        return next;\n    }\n    _schedule() {\n        const root = this._root || this;\n        if (!root._scheduled) {\n            root._scheduled = true;\n            queueMicrotask(()=>root._executeChain());\n        }\n    }\n    _executeChain() {\n        const chain = [];\n        let r2 = this;\n        while(r2){\n            chain.push(r2);\n            r2 = r2._next;\n        }\n        let cumulativeDelay = 0;\n        chain.forEach((runner)=>{\n            cumulativeDelay += runner.delay;\n            runner._execute(cumulativeDelay);\n            cumulativeDelay += runner.duration;\n        });\n    }\n    /**\n   * @param {number} startDelay\n   */ _execute(startDelay) {\n        const el = this.el;\n        const duration = this.duration;\n        if (duration <= 1) {\n            const apply = ()=>{\n                if (this._attrTarget) el.attr(this._attrTarget);\n                if (this._plotTarget) el.plot(this._plotSnap || this._plotTarget);\n                if (this._afterCb) this._afterCb.call(el);\n            };\n            if (startDelay > 0) setTimeout(apply, startDelay);\n            else apply();\n            return;\n        }\n        const run = ()=>{\n            const fromAttrs = /** @type {Record<string, any>} */ {};\n            const fromColors = /** @type {Record<string, any>} */ {};\n            const toColors = /** @type {Record<string, any>} */ {};\n            if (this._attrTarget) for (const key of Object.keys(this._attrTarget)){\n                const fromVal = el.attr(key);\n                fromAttrs[key] = fromVal;\n                const fc = $e4b487e979d7c06d$var$parseColor$1(fromVal);\n                const tc = $e4b487e979d7c06d$var$parseColor$1(String(this._attrTarget[key]));\n                if (fc && tc) {\n                    fromColors[key] = fc;\n                    toColors[key] = tc;\n                }\n            }\n            let morphFn = null;\n            if (this._plotTarget) {\n                const fromPath = el.attr(\"d\") || \"\";\n                try {\n                    morphFn = this._plotAlgorithm === \"polygons\" ? $e4b487e979d7c06d$var$morphPolygons(fromPath, this._plotTarget) : $e4b487e979d7c06d$var$morphPaths(fromPath, this._plotTarget);\n                } catch (e2) {\n                    morphFn = null;\n                }\n            }\n            const start = performance.now();\n            const easing = this._easing || $e4b487e979d7c06d$var$_defaultEasing;\n            const tick = (now)=>{\n                const elapsed = now - start;\n                const rawPos = Math.min(elapsed / duration, 1);\n                const pos = easing(rawPos);\n                if (this._attrTarget) {\n                    if (rawPos >= 1) el.attr(this._attrTarget);\n                    else {\n                        const current = /** @type {Record<string, any>} */ {};\n                        for (const key of Object.keys(this._attrTarget))if (fromColors[key] && toColors[key]) current[key] = $e4b487e979d7c06d$var$interpolateColor(fromColors[key], toColors[key], pos);\n                        else {\n                            const from = parseFloat(fromAttrs[key]);\n                            const to = parseFloat(this._attrTarget[key]);\n                            if (!isNaN(from) && !isNaN(to)) current[key] = from + (to - from) * pos;\n                        }\n                        el.attr(current);\n                    }\n                }\n                if (morphFn && rawPos < 1) el.attr(\"d\", /** @type {any} */ morphFn(pos));\n                if (this._duringCb) this._duringCb(pos);\n                if (rawPos < 1) $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(tick);\n                else {\n                    if (this._plotTarget) el.attr(\"d\", this._plotSnap || this._plotTarget);\n                    if (this._afterCb) this._afterCb.call(el);\n                }\n            };\n            $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(tick);\n        };\n        if (startDelay > 0) setTimeout(run, startDelay);\n        else run();\n    }\n}\nfunction $e4b487e979d7c06d$var$installAnimationMethods(ElementClass) {\n    ElementClass.prototype.animate = function(duration, delay) {\n        return new $e4b487e979d7c06d$var$SVGAnimationRunner(this, duration, delay);\n    };\n}\nfunction $e4b487e979d7c06d$var$easeInOutSine(t2) {\n    return -Math.cos(t2 * Math.PI) / 2 + 0.5;\n}\nfunction $e4b487e979d7c06d$var$cubicBezier(x1, y1, x2, y2) {\n    x1 = Math.min(Math.max(x1, 0), 1);\n    x2 = Math.min(Math.max(x2, 0), 1);\n    const cx = 3 * x1;\n    const bx = 3 * (x2 - x1) - cx;\n    const ax = 1 - cx - bx;\n    const cy = 3 * y1;\n    const by = 3 * (y2 - y1) - cy;\n    const ay = 1 - cy - by;\n    const sampleX = (t2)=>((ax * t2 + bx) * t2 + cx) * t2;\n    const sampleY = (t2)=>((ay * t2 + by) * t2 + cy) * t2;\n    const solveT = (x)=>{\n        let lo = 0;\n        let hi = 1;\n        let t2 = x;\n        if (t2 < lo) return lo;\n        if (t2 > hi) return hi;\n        while(lo < hi){\n            const xt = sampleX(t2);\n            if (Math.abs(xt - x) < 1e-4) return t2;\n            if (x > xt) lo = t2;\n            else hi = t2;\n            t2 = (lo + hi) / 2;\n        }\n        return t2;\n    };\n    return (t2)=>t2 <= 0 ? 0 : t2 >= 1 ? 1 : sampleY(solveT(t2));\n}\nconst $e4b487e979d7c06d$var$REGISTRY = /* @__PURE__ */ new Map();\nconst $e4b487e979d7c06d$var$linear = (t2)=>t2;\n$e4b487e979d7c06d$var$REGISTRY.set(\"linear\", $e4b487e979d7c06d$var$linear);\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeInOutSine\", $e4b487e979d7c06d$var$easeInOutSine);\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeInSine\", (t2)=>1 - Math.cos(t2 * Math.PI / 2));\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeOutSine\", (t2)=>Math.sin(t2 * Math.PI / 2));\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeInQuad\", (t2)=>t2 * t2);\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeOutQuad\", (t2)=>1 - (1 - t2) * (1 - t2));\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeInOutQuad\", (t2)=>t2 < 0.5 ? 2 * t2 * t2 : 1 - Math.pow(-2 * t2 + 2, 2) / 2);\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeInCubic\", (t2)=>t2 * t2 * t2);\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeOutCubic\", (t2)=>1 - Math.pow(1 - t2, 3));\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeInOutCubic\", (t2)=>t2 < 0.5 ? 4 * t2 * t2 * t2 : 1 - Math.pow(-2 * t2 + 2, 3) / 2);\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeOutBack\", (t2)=>{\n    const c1 = 1.70158;\n    const c3 = c1 + 1;\n    return 1 + c3 * Math.pow(t2 - 1, 3) + c1 * Math.pow(t2 - 1, 2);\n});\n$e4b487e979d7c06d$var$REGISTRY.set(\"easeInOutBack\", (t2)=>{\n    const c1 = 1.70158;\n    const c2 = c1 * 1.525;\n    return t2 < 0.5 ? Math.pow(2 * t2, 2) * ((c2 + 1) * 2 * t2 - c2) / 2 : (Math.pow(2 * t2 - 2, 2) * ((c2 + 1) * (t2 * 2 - 2) + c2) + 2) / 2;\n});\nfunction $e4b487e979d7c06d$var$registerEasing(name2, fn) {\n    if (typeof name2 === \"string\" && name2 && typeof fn === \"function\") $e4b487e979d7c06d$var$REGISTRY.set(name2, fn);\n}\nfunction $e4b487e979d7c06d$var$isBezierArray(v2) {\n    return Array.isArray(v2) && v2.length === 4 && v2.every((n2)=>typeof n2 === \"number\");\n}\nfunction $e4b487e979d7c06d$var$resolveEasing(value) {\n    if (typeof value === \"function\") return $e4b487e979d7c06d$var$guardEasing(value);\n    if ($e4b487e979d7c06d$var$isBezierArray(value)) return $e4b487e979d7c06d$var$cubicBezier(value[0], value[1], value[2], value[3]);\n    if (typeof value === \"string\" && $e4b487e979d7c06d$var$REGISTRY.has(value)) return $e4b487e979d7c06d$var$guardEasing(/** @type {(t:number)=>number} */ $e4b487e979d7c06d$var$REGISTRY.get(value));\n    return $e4b487e979d7c06d$var$easeInOutSine;\n}\nfunction $e4b487e979d7c06d$var$guardEasing(fn) {\n    return (t2)=>{\n        const y = fn(t2);\n        return typeof y === \"number\" && isFinite(y) ? y : t2;\n    };\n}\nconst $e4b487e979d7c06d$var$SVGNS$1 = \"http://www.w3.org/2000/svg\";\nfunction $e4b487e979d7c06d$var$easeOutCubic$1(t2) {\n    return 1 - Math.pow(1 - t2, 3);\n}\nfunction $e4b487e979d7c06d$var$easeOutBack$1(t2) {\n    const c1 = 1.70158;\n    const c3 = c1 + 1;\n    return 1 + c3 * Math.pow(t2 - 1, 3) + c1 * Math.pow(t2 - 1, 2);\n}\nlet $e4b487e979d7c06d$var$_reducedMotionMql = null;\nfunction $e4b487e979d7c06d$var$prefersReducedMotion() {\n    if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return false;\n    try {\n        if (!$e4b487e979d7c06d$var$_reducedMotionMql) $e4b487e979d7c06d$var$_reducedMotionMql = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n        return !!$e4b487e979d7c06d$var$_reducedMotionMql.matches;\n    } catch (_) {\n        return false;\n    }\n}\nfunction $e4b487e979d7c06d$var$applyProgressiveReveal(el, x, w2) {\n    if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return false;\n    if (w2.globals.dataChanged || w2.globals.resized) return false;\n    const animCfg = w2.config.chart.animations;\n    if (!animCfg || animCfg.enabled === false) return false;\n    const chartType = w2.config.chart.type;\n    if (chartType !== \"line\" && chartType !== \"area\" && chartType !== \"rangeArea\") return false;\n    if (!(w2.layout.gridWidth > 0)) return false;\n    const drawSpeed = (animCfg.speed || 800) * 2;\n    const xRatio = Math.max(0, Math.min(1, x / w2.layout.gridWidth));\n    const easedT = 1 - Math.cbrt(1 - xRatio);\n    const revealDelay = easedT * drawSpeed;\n    const node = el.node;\n    const style = node.style;\n    style.opacity = \"0\";\n    let startAnchor = null;\n    const tick = (now)=>{\n        if (startAnchor === null) startAnchor = now;\n        if (now - startAnchor >= revealDelay) style.opacity = \"\";\n        else $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(tick);\n    };\n    $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(tick);\n    return true;\n}\nfunction $e4b487e979d7c06d$var$applyAnimationPolicy(w2) {\n    const anim = w2.config.chart.animations;\n    if (!anim) return;\n    if (anim.respectReducedMotion !== false && $e4b487e979d7c06d$var$prefersReducedMotion()) {\n        anim.enabled = false;\n        if (anim.dynamicAnimation) anim.dynamicAnimation.enabled = false;\n    }\n    $e4b487e979d7c06d$var$setDefaultEasing($e4b487e979d7c06d$var$resolveEasing(anim.easing));\n}\nfunction $e4b487e979d7c06d$var$computeStagger(opts) {\n    const style = opts.style;\n    const index = opts.index || 0;\n    const baseDelay = typeof opts.baseDelay === \"number\" ? opts.baseDelay : 40;\n    const row = opts.row || 0;\n    const col = opts.col || 0;\n    const groupIndex = opts.groupIndex || 0;\n    const perGroup = opts.perGroup || 1;\n    const centerDistance = opts.centerDistance || 0;\n    switch(style){\n        case \"none\":\n            return 0;\n        case \"diagonal\":\n            return (row + col) * baseDelay;\n        case \"group\":\n            return groupIndex * baseDelay + index % perGroup * (baseDelay / 4);\n        case \"centroid\":\n            return centerDistance * baseDelay * (index + 1);\n        case \"sequential\":\n        default:\n            return index * baseDelay;\n    }\n}\nclass $e4b487e979d7c06d$var$Animations {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} [ctx]\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n    }\n    /**\n   * @param {any} el\n   * @param {Record<string, any>} from\n   * @param {Record<string, any>} to\n   * @param {object} speed\n   */ animateLine(el, from, to, speed) {\n        el.attr(from).animate(speed).attr(to);\n    }\n    /*\n   ** Animate radius of a circle element\n   * @param {any} el\n   * @param {number} speed\n   * @param {string} easing\n   * @param {Function} cb\n   */ /** @param {any} el @param {any} speed @param {any} easing @param {any} cb */ animateMarker(el, speed, easing, cb) {\n        el.attr({\n            opacity: 0\n        }).animate(speed).attr({\n            opacity: 1\n        }).after(()=>{\n            cb();\n        });\n    }\n    /**\n   * Scale-up \"pop\" effect for scatter/bubble markers. Animates\n   * `transform: scale(0 → 1)` (with `easeOutBack` overshoot) plus opacity,\n   * around the marker's own center via `transform-box: fill-box`.\n   *\n   * Falls back to instant render in SSR / when shouldAnimate is false.\n   *\n   * @param {any} el\n   * @param {{ speed: number, delay?: number, onComplete?: () => void }} params\n   */ animatePop(el, { speed: speed, delay: delay = 0, onComplete: onComplete }) {\n        const w2 = this.w;\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser() || !w2.globals.shouldAnimate || speed < 1) {\n            if (onComplete) onComplete();\n            return;\n        }\n        const node = el.node;\n        const style = node.style;\n        style.transformBox = \"fill-box\";\n        style.transformOrigin = \"center\";\n        style.transform = \"scale(0)\";\n        style.opacity = \"0\";\n        const startAt = performance.now() + delay;\n        const step = (now)=>{\n            if (w2.globals.isDestroyed) return;\n            const t2 = Math.max(0, Math.min(1, (now - startAt) / speed));\n            style.transform = `scale(${$e4b487e979d7c06d$var$easeOutBack$1(t2)})`;\n            style.opacity = String(Math.min(1, t2 * 2));\n            if (t2 < 1) $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n            else {\n                style.transform = \"\";\n                style.transformOrigin = \"\";\n                style.transformBox = \"\";\n                style.opacity = \"\";\n                if (onComplete) onComplete();\n            }\n        };\n        $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n    }\n    /*\n   ** Animate rect properties\n   * @param {any} el\n   * @param {any} from\n   * @param {any} to\n   * @param {number} speed\n   * @param {Function} fn\n   */ /** @param {any} el @param {any} from @param {any} to @param {any} speed @param {any} fn @param {number} [delay] */ animateRect(el, from, to, speed, fn, delay = 0) {\n        el.attr(from).animate(speed, delay).attr(to).after(()=>fn());\n    }\n    /**\n   * @param {Record<string, any>} params\n   */ animatePathsGradually(params) {\n        const { el: el, realIndex: realIndex, j: j, fill: fill, pathFrom: pathFrom, pathTo: pathTo, pathToInterp: pathToInterp, speed: speed, delay: delay, scrollMorph: scrollMorph } = params;\n        const me = this;\n        const w2 = this.w;\n        let delayFactor = 0;\n        if (w2.config.chart.animations.animateGradually.enabled) delayFactor = w2.config.chart.animations.animateGradually.delay;\n        if (w2.config.chart.animations.dynamicAnimation.enabled && w2.globals.dataChanged && w2.config.chart.type !== \"bar\") delayFactor = 0;\n        me.morphSVG(el, realIndex, j, w2.config.chart.type === \"line\" && !w2.globals.comboCharts ? \"stroke\" : fill, pathFrom, pathTo, speed, delay * delayFactor, scrollMorph, pathToInterp);\n    }\n    /**\n   * Opacity-fade reveal (see Graphics.renderPaths `revealViaFade`): hide this\n   * path immediately, then reveal the whole series in a single CSS opacity fade\n   * once the synchronous draw pass has finished. Used for two cases that both\n   * want to avoid per-path morphs: the large-dataset bulk render (>\n   * largeDatasetThreshold) and candlestick/boxPlot data-change updates (where an\n   * index-based morph would slide candles around on zoom). Every faded path is\n   * pushed to delayedElements, but only the first one schedules the reveal — a\n   * lone requestAnimationFrame fires after all paths are in the DOM, so N paths\n   * cost one frame callback instead of N morph timelines. The guard flag is\n   * reset inside the callback (and in initGlobalVars) so subsequent renders\n   * re-arm it.\n   * @param {any} el\n   */ revealBulk(el) {\n        const w2 = this.w;\n        el.node.classList.add(\"apexcharts-element-hidden\");\n        w2.globals.delayedElements.push({\n            el: el.node\n        });\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser() || !w2.globals.shouldAnimate) {\n            this.animationCompleted(el);\n            return;\n        }\n        if (!w2.globals.bulkRevealScheduled) {\n            w2.globals.bulkRevealScheduled = true;\n            $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(()=>{\n                if (w2.globals.isDestroyed) return;\n                w2.globals.bulkRevealScheduled = false;\n                this.animationCompleted(el);\n            });\n        }\n    }\n    showDelayedElements() {\n        this.w.globals.delayedElements.forEach((d)=>{\n            if (d.holdUntilComplete && !this.w.globals.animationEnded) return;\n            const ele = d.el;\n            ele.classList.remove(\"apexcharts-element-hidden\");\n            ele.classList.add(\"apexcharts-hidden-element-shown\");\n        });\n    }\n    /**\n   * @param {any} el\n   */ animationCompleted(el) {\n        const w2 = this.w;\n        if (w2.globals.animationEnded) return;\n        w2.globals.animationEnded = true;\n        this.showDelayedElements();\n        if (typeof w2.config.chart.events.animationEnd === \"function\") w2.config.chart.events.animationEnd(this.ctx, {\n            el: el,\n            w: w2\n        });\n    }\n    /**\n   * Initial-mount \"pen-stroke\" draw effect for line / area / rangeArea paths.\n   *\n   * Stroke paths animate `stroke-dashoffset` from total length → 0.\n   * Fill paths animate the width of a per-series SVG `<mask>` rect from 0 → gridWidth,\n   * which coexists with the existing `clip-path: gridRectMask` (mask + clip-path\n   * are independent SVG attributes).\n   *\n   * For radar / radial shapes, pass `mask: { type: 'radial', cx, cy, r }` to\n   * use a circular mask that blooms from center outward instead of the default\n   * left-to-right rect wipe.\n   *\n   * @param {any} el            - SVG.js path element\n   * @param {{realIndex: number, j?: number, isFill: boolean, isLast: boolean, speed: number, delay: number, mask?: {type: 'rect'|'radial', cx?: number, cy?: number, r?: number}}} params\n   */ animateDraw(el, { realIndex: realIndex, j: j, isFill: isFill, isLast: isLast, speed: speed, delay: delay, mask: maskShape }) {\n        const w2 = this.w;\n        const me = this;\n        const finalize = ()=>{\n            if (isLast && w2.globals.shouldAnimate) me.animationCompleted(el);\n            me.showDelayedElements();\n        };\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser() || !w2.globals.shouldAnimate || speed < 1) {\n            finalize();\n            return;\n        }\n        const node = el.node;\n        const runMaskReveal = ()=>{\n            const pad = 4;\n            const isRadial = maskShape && maskShape.type === \"radial\";\n            const targetWidth = w2.layout.gridWidth + pad * 2;\n            const radialCx = maskShape && maskShape.cx || 0;\n            const radialCy = maskShape && maskShape.cy || 0;\n            const targetRadius = (maskShape && maskShape.r || w2.layout.gridWidth / 2) + pad;\n            const maskId = `apexDrawMask${w2.globals.cuid}-${realIndex}-${j != null ? j : 0}-${isFill ? \"f\" : \"s\"}`;\n            const mask = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$1, \"mask\");\n            mask.setAttribute(\"id\", maskId);\n            mask.setAttribute(\"maskUnits\", \"userSpaceOnUse\");\n            let revealEl;\n            if (isRadial) {\n                const region = targetRadius;\n                mask.setAttribute(\"x\", String(radialCx - region));\n                mask.setAttribute(\"y\", String(radialCy - region));\n                mask.setAttribute(\"width\", String(region * 2));\n                mask.setAttribute(\"height\", String(region * 2));\n                revealEl = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$1, \"circle\");\n                revealEl.setAttribute(\"cx\", String(radialCx));\n                revealEl.setAttribute(\"cy\", String(radialCy));\n                revealEl.setAttribute(\"r\", \"0\");\n                revealEl.setAttribute(\"fill\", \"#fff\");\n            } else {\n                mask.setAttribute(\"x\", String(-pad));\n                mask.setAttribute(\"y\", String(-pad));\n                mask.setAttribute(\"width\", String(targetWidth));\n                mask.setAttribute(\"height\", String(w2.layout.gridHeight + pad * 2));\n                revealEl = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$1, \"rect\");\n                revealEl.setAttribute(\"x\", String(-pad));\n                revealEl.setAttribute(\"y\", String(-pad));\n                revealEl.setAttribute(\"width\", \"0\");\n                revealEl.setAttribute(\"height\", String(w2.layout.gridHeight + pad * 2));\n                revealEl.setAttribute(\"fill\", \"#fff\");\n            }\n            mask.appendChild(revealEl);\n            w2.dom.elDefs.node.appendChild(mask);\n            node.setAttribute(\"mask\", `url(#${maskId})`);\n            const startAt = performance.now() + (delay || 0);\n            const step = (now)=>{\n                if (w2.globals.isDestroyed) return;\n                const t2 = Math.max(0, Math.min(1, (now - startAt) / speed));\n                const eased = $e4b487e979d7c06d$var$easeOutCubic$1(t2);\n                if (isRadial) revealEl.setAttribute(\"r\", String(eased * targetRadius));\n                else revealEl.setAttribute(\"width\", String(eased * targetWidth));\n                if (t2 < 1) $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n                else {\n                    node.removeAttribute(\"mask\");\n                    if (mask.parentNode) mask.parentNode.removeChild(mask);\n                    finalize();\n                }\n            };\n            $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n        };\n        const runStrokeDraw = (len)=>{\n            node.setAttribute(\"stroke-dasharray\", String(len));\n            node.setAttribute(\"stroke-dashoffset\", String(len));\n            const startAt = performance.now() + (delay || 0);\n            const step = (now)=>{\n                if (w2.globals.isDestroyed) return;\n                const t2 = Math.max(0, Math.min(1, (now - startAt) / speed));\n                node.setAttribute(\"stroke-dashoffset\", String(len * (1 - $e4b487e979d7c06d$var$easeOutCubic$1(t2))));\n                if (t2 < 1) $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n                else {\n                    node.removeAttribute(\"stroke-dasharray\");\n                    node.removeAttribute(\"stroke-dashoffset\");\n                    finalize();\n                }\n            };\n            $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n        };\n        $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(()=>{\n            if (w2.globals.isDestroyed) return;\n            if (isFill) {\n                runMaskReveal();\n                return;\n            }\n            const existingDash = node.getAttribute(\"stroke-dasharray\");\n            const hasCustomDash = !!existingDash && existingDash !== \"0\" && existingDash !== \"\";\n            if (hasCustomDash) {\n                runMaskReveal();\n                return;\n            }\n            let len = 0;\n            try {\n                if (typeof node.getTotalLength === \"function\") len = node.getTotalLength();\n            } catch (_) {\n                len = 0;\n            }\n            if (!len) {\n                finalize();\n                return;\n            }\n            runStrokeDraw(len);\n        });\n    }\n    // SVG.js animation for morphing one path to another\n    /**\n   * @param {any} el\n   * @param {number} realIndex\n   * @param {number} j\n   * @param {string} fill\n   * @param {string} pathFrom\n   * @param {string} pathTo\n   * @param {number} speed\n   * @param {number} delay\n   * @param {boolean} [scrollMorph] - this morph is a streaming scroll (StreamScroll)\n   * @param {string} [pathToInterp] - interpolation target that differs from the\n   *   final path. Reconciled length-change morphs tween toward a padded copy of\n   *   pathTo (extra anchors sitting exactly on the final geometry) and snap to\n   *   the clean pathTo at the end.\n   */ morphSVG(el, realIndex, j, fill, pathFrom, pathTo, speed, delay, scrollMorph, pathToInterp) {\n        var _a, _b;\n        const w2 = this.w;\n        if (!pathFrom) pathFrom = el.attr(\"pathFrom\");\n        if (!pathTo) pathTo = el.attr(\"pathTo\");\n        const disableAnimationForCorrupPath = ()=>{\n            if (w2.config.chart.type === \"radar\") speed = 1;\n            return `M 0 ${w2.layout.gridHeight}`;\n        };\n        if (!pathFrom || pathFrom.indexOf(\"undefined\") > -1 || pathFrom.indexOf(\"NaN\") > -1) pathFrom = disableAnimationForCorrupPath();\n        if (!pathTo.trim() || pathTo.indexOf(\"undefined\") > -1 || pathTo.indexOf(\"NaN\") > -1) {\n            pathTo = disableAnimationForCorrupPath();\n            pathToInterp = void 0;\n        }\n        if (pathToInterp && (!pathToInterp.trim() || pathToInterp.indexOf(\"undefined\") > -1 || pathToInterp.indexOf(\"NaN\") > -1)) pathToInterp = void 0;\n        if (!w2.globals.shouldAnimate) speed = 1;\n        const crossTypeMorph = ((_b = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange) == null ? void 0 : _b.isActive()) === true;\n        const morphAlgo = crossTypeMorph ? \"polygons\" : \"commands\";\n        let morphEase = null;\n        if (w2.globals.dataChanged) {\n            const dynEasing = w2.config.chart.animations.dynamicAnimation.easing;\n            if (dynEasing != null) morphEase = $e4b487e979d7c06d$var$resolveEasing(dynEasing);\n            else if (scrollMorph) morphEase = $e4b487e979d7c06d$var$resolveEasing(\"linear\");\n        }\n        const runner = el.plot(pathFrom).animate(1, delay).plot(pathFrom).animate(speed, delay);\n        if (morphEase) runner.ease(morphEase);\n        runner.plot(pathToInterp || pathTo, morphAlgo, pathToInterp ? pathTo : void 0).after(()=>{\n            if ($e4b487e979d7c06d$var$Utils$1.isNumber(j)) {\n                const maxSeries = w2.seriesData.series[w2.globals.maxValsInArrayIndex];\n                if (maxSeries && j === maxSeries.length - 2 && w2.globals.shouldAnimate) this.animationCompleted(el);\n            } else if (fill !== \"none\" && w2.globals.shouldAnimate) {\n                if (!w2.globals.comboCharts && realIndex === w2.seriesData.series.length - 1 || w2.globals.comboCharts) this.animationCompleted(el);\n            }\n            this.showDelayedElements();\n        });\n    }\n}\nconst $e4b487e979d7c06d$var$DEFAULT_INTENSITY = {\n    lighten: 0.15,\n    darken: 0.35\n};\nclass $e4b487e979d7c06d$var$Filters {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n    }\n    /**\n   * The three chart types drawn by the Pie module.\n   * @param {any} w\n   */ static isSliceChart(w2) {\n        const type = w2.config.chart.type;\n        return type === \"pie\" || type === \"donut\" || type === \"polarArea\";\n    }\n    /**\n   * True when a pie / donut slice carries the hover state itself, as the\n   * outline band traced outside its rim. The band IS the hover feedback, so\n   * the states.hover lighten filter must not also recolour the slice: the\n   * point of the band is that a hovered slice keeps its own colour.\n   * `states.hover.filter.type: 'none'` still turns every hover visual off, so\n   * this only claims the state when a hover visual was wanted at all.\n   * @param {any} w\n   */ static hoverOutlineOwnsHoverState(w2) {\n        var _a;\n        return $e4b487e979d7c06d$var$Filters.isSliceChart(w2) && w2.config.states.hover.filter.type !== \"none\" && ((_a = w2.config.plotOptions.pie.hoverOutline) == null ? void 0 : _a.show) === true;\n    }\n    /**\n   * True when a pie / donut slice carries the selected state itself, by\n   * sliding out of the pie (see Pie.offsetSlice). Moving out of the pie is a\n   * strong enough signal on its own, so the states.active darken filter would\n   * only muddy the slice colour on top of it. polarArea is excluded: it never\n   * slides (its radius is the value), so it keeps the filter as its only\n   * click feedback.\n   * @param {any} w\n   */ static sliceOffsetOwnsActiveState(w2) {\n        return $e4b487e979d7c06d$var$Filters.isSliceChart(w2) && w2.config.chart.type !== \"polarArea\" && w2.config.plotOptions.pie.expandOnClick === true && w2.config.plotOptions.pie.expandOffset > 0 && !$e4b487e979d7c06d$var$Filters.drilldownBlocksSliceOffset(w2);\n    }\n    /**\n   * A drilldown pie / donut does not slide its slices out at all: a click there\n   * is navigation, so the slice would pull out and then be thrown away by the\n   * drill it just triggered, which reads as a glitch rather than as motion.\n   * The states.active filter comes back as the click feedback (it is instant,\n   * so the re-render lands on top of it rather than fighting it).\n   * @param {any} w\n   */ static drilldownBlocksSliceOffset(w2) {\n        var _a;\n        return $e4b487e979d7c06d$var$Filters.isSliceChart(w2) && ((_a = w2.config.drilldown) == null ? void 0 : _a.enabled) === true;\n    }\n    // create a re-usable filter which can be appended other filter effects and applied to multiple elements\n    /**\n   * @param {any} el\n   * @param {number} i\n   */ getDefaultFilter(el, i2) {\n        const w2 = this.w;\n        if (el.unfilter) el.unfilter(true);\n        if (w2.config.chart.dropShadow.enabled) this.dropShadow(el, w2.config.chart.dropShadow, i2);\n    }\n    /**\n   * @param {any} el\n   * @param {number} i\n   * @param {string} filterType\n   * @param {number} [intensity] Blend strength (0 to 1). Defaults per type.\n   */ applyFilter(el, i2, filterType, intensity) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        if (el.unfilter) el.unfilter(true);\n        if (filterType === \"none\") {\n            this.getDefaultFilter(el, i2);\n            return;\n        }\n        const shadowAttr = w2.config.chart.dropShadow;\n        const fallback = filterType === \"lighten\" ? $e4b487e979d7c06d$var$DEFAULT_INTENSITY.lighten : $e4b487e979d7c06d$var$DEFAULT_INTENSITY.darken;\n        const t2 = Math.max(0, Math.min(1, typeof intensity === \"number\" ? intensity : fallback));\n        const diag = 1 - t2;\n        const offset = filterType === \"lighten\" ? t2 : 0;\n        if (el.filterWith) {\n            el.filterWith((add)=>{\n                add.colorMatrix({\n                    type: \"matrix\",\n                    values: `\n            ${diag} 0 0 0 ${offset}\n            0 ${diag} 0 0 ${offset}\n            0 0 ${diag} 0 ${offset}\n            0 0 0 1 0\n          `,\n                    in: \"SourceGraphic\",\n                    result: \"brightness\"\n                });\n                if (shadowAttr.enabled) this.addShadow(add, i2, shadowAttr, \"brightness\");\n            });\n            if (!shadowAttr.noUserSpaceOnUse) (_b = (_a = el.filterer()) == null ? void 0 : _a.node) == null || _b.setAttribute(\"filterUnits\", \"userSpaceOnUse\");\n            this._scaleFilterSize((_c = el.filterer()) == null ? void 0 : _c.node);\n        }\n    }\n    // appends dropShadow to the filter object which can be chained with other filter effects\n    /**\n   * @param {any} add\n   * @param {number} i\n   * @param {Record<string, any>} attrs\n   * @param {string} source\n   */ addShadow(add, i2, attrs, source) {\n        var _a;\n        const w2 = this.w;\n        let { blur: blur, top: top, left: left, color: color, opacity: opacity } = attrs;\n        color = Array.isArray(color) ? color[i2] : color;\n        if (((_a = w2.config.chart.dropShadow.enabledOnSeries) == null ? void 0 : _a.length) > 0) {\n            if (w2.config.chart.dropShadow.enabledOnSeries.indexOf(i2) === -1) return add;\n        }\n        add.offset({\n            in: source,\n            dx: left,\n            dy: top,\n            result: \"offset\"\n        });\n        add.gaussianBlur({\n            in: \"offset\",\n            stdDeviation: blur,\n            result: \"blur\"\n        });\n        add.flood({\n            \"flood-color\": color,\n            \"flood-opacity\": opacity,\n            result: \"flood\"\n        });\n        add.composite({\n            in: \"flood\",\n            in2: \"blur\",\n            operator: \"in\",\n            result: \"shadow\"\n        });\n        add.merge([\n            \"shadow\",\n            source\n        ]);\n    }\n    // directly adds dropShadow to the element and returns the same element.\n    /**\n   * @param {any} el\n   * @param {Record<string, any>} attrs\n   */ dropShadow(el, attrs, i2 = 0) {\n        var _a, _b, _c, _d, _e;\n        const w2 = this.w;\n        if (el.unfilter) el.unfilter(true);\n        if ($e4b487e979d7c06d$var$Utils$1.isMsEdge() && w2.config.chart.type === \"radialBar\") return el;\n        if (((_a = w2.config.chart.dropShadow.enabledOnSeries) == null ? void 0 : _a.length) > 0) {\n            if (((_b = w2.config.chart.dropShadow.enabledOnSeries) == null ? void 0 : _b.indexOf(i2)) === -1) return el;\n        }\n        if (el.filterWith) {\n            el.filterWith((add)=>{\n                this.addShadow(add, i2, attrs, \"SourceGraphic\");\n            });\n            if (!attrs.noUserSpaceOnUse) (_d = (_c = el.filterer()) == null ? void 0 : _c.node) == null || _d.setAttribute(\"filterUnits\", \"userSpaceOnUse\");\n            this._scaleFilterSize((_e = el.filterer()) == null ? void 0 : _e.node);\n        }\n        return el;\n    }\n    /**\n   * @param {any} el\n   * @param {number} realIndex\n   * @param {number} dataPointIndex\n   */ setSelectionFilter(el, realIndex, dataPointIndex) {\n        const w2 = this.w;\n        if (typeof w2.interact.selectedDataPoints[realIndex] !== \"undefined\") {\n            if (w2.interact.selectedDataPoints[realIndex].indexOf(dataPointIndex) > -1) {\n                el.node.setAttribute(\"selected\", true);\n                if ($e4b487e979d7c06d$var$Filters.sliceOffsetOwnsActiveState(w2)) return;\n                const activeFilter = w2.config.states.active.filter;\n                if (activeFilter.type !== \"none\") this.applyFilter(el, realIndex, activeFilter.type, activeFilter.value);\n            }\n        }\n    }\n    /**\n   * @param {any} el\n   */ _scaleFilterSize(el) {\n        if (!el) return;\n        const setAttributes = (attrs)=>{\n            for(const key in attrs)if (Object.prototype.hasOwnProperty.call(attrs, key)) el.setAttribute(key, attrs[key]);\n        };\n        setAttributes({\n            width: \"200%\",\n            height: \"200%\",\n            x: \"-50%\",\n            y: \"-50%\"\n        });\n    }\n}\nclass $e4b487e979d7c06d$var$Graphics {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext | null} ctx\n   */ constructor(w2, ctx = null){\n        this.w = w2;\n        this.ctx = ctx;\n    }\n    /*****************************************************************************\n   *                                                                            *\n   *  SVG Path Rounding Function                                                *\n   *  Copyright (C) 2014 Yona Appletree                                         *\n   *                                                                            *\n   *  Licensed under the Apache License, Version 2.0 (the \"License\");           *\n   *  you may not use this file except in compliance with the License.          *\n   *  You may obtain a copy of the License at                                   *\n   *                                                                            *\n   *      http://www.apache.org/licenses/LICENSE-2.0                            *\n   *                                                                            *\n   *  Unless required by applicable law or agreed to in writing, software       *\n   *  distributed under the License is distributed on an \"AS IS\" BASIS,         *\n   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  *\n   *  See the License for the specific language governing permissions and       *\n   *  limitations under the License.                                            *\n   *                                                                            *\n   *****************************************************************************/ /**\n   * SVG Path rounding function. Takes an input path string and outputs a path\n   * string where all line-line corners have been rounded. Only supports absolute\n   * commands at the moment.\n   *\n   * @param pathString The SVG input path\n   * @param radius The amount to round the corners, either a value in the SVG\n   *               coordinate space, or, if useFractionalRadius is true, a value\n   *               from 0 to 1.\n   * @returns A new SVG path string with the rounding\n   * @param {string} pathString\n   * @param {number} radius\n   */ roundPathCorners(pathString, radius) {\n        if (pathString.indexOf(\"NaN\") > -1) pathString = \"\";\n        function moveTowardsLength(movingPoint, targetPoint, amount) {\n            var width = targetPoint.x - movingPoint.x;\n            var height = targetPoint.y - movingPoint.y;\n            var distance = Math.sqrt(width * width + height * height);\n            return moveTowardsFractional(movingPoint, targetPoint, Math.min(1, amount / distance));\n        }\n        function moveTowardsFractional(movingPoint, targetPoint, fraction) {\n            return {\n                x: movingPoint.x + (targetPoint.x - movingPoint.x) * fraction,\n                y: movingPoint.y + (targetPoint.y - movingPoint.y) * fraction\n            };\n        }\n        function adjustCommand(cmd, newPoint) {\n            if (cmd.length > 2) {\n                cmd[cmd.length - 2] = newPoint.x;\n                cmd[cmd.length - 1] = newPoint.y;\n            }\n        }\n        function pointForCommand(cmd) {\n            return {\n                x: parseFloat(cmd[cmd.length - 2]),\n                y: parseFloat(cmd[cmd.length - 1])\n            };\n        }\n        var pathParts = pathString.split(/[,\\s]/).reduce(function(parts, part) {\n            var match = part.match(/^([a-zA-Z])(.+)/);\n            if (match) {\n                parts.push(match[1]);\n                parts.push(match[2]);\n            } else parts.push(part);\n            return parts;\n        }, []);\n        var commands = pathParts.reduce(function(commands2, part) {\n            if (parseFloat(part) == part && commands2.length) commands2[commands2.length - 1].push(part);\n            else commands2.push([\n                part\n            ]);\n            return commands2;\n        }, []);\n        var resultCommands = [];\n        if (commands.length > 1) {\n            var startPoint = pointForCommand(commands[0]);\n            var virtualCloseLine = null;\n            if (commands[commands.length - 1][0] == \"Z\" && commands[0].length > 2) {\n                virtualCloseLine = [\n                    \"L\",\n                    startPoint.x,\n                    startPoint.y\n                ];\n                commands[commands.length - 1] = virtualCloseLine;\n            }\n            resultCommands.push(commands[0]);\n            for(var cmdIndex = 1; cmdIndex < commands.length; cmdIndex++){\n                var prevCmd = resultCommands[resultCommands.length - 1];\n                var curCmd = commands[cmdIndex];\n                var nextCmd = curCmd == virtualCloseLine ? commands[1] : commands[cmdIndex + 1];\n                if (nextCmd && prevCmd && prevCmd.length > 2 && curCmd[0] == \"L\" && nextCmd.length > 2 && nextCmd[0] == \"L\") {\n                    var prevPoint = pointForCommand(prevCmd);\n                    var curPoint = pointForCommand(curCmd);\n                    var nextPoint = pointForCommand(nextCmd);\n                    var curveStart, curveEnd;\n                    curveStart = moveTowardsLength(curPoint, prevPoint, radius);\n                    curveEnd = moveTowardsLength(curPoint, nextPoint, radius);\n                    adjustCommand(curCmd, curveStart);\n                    curCmd.origPoint = curPoint;\n                    resultCommands.push(curCmd);\n                    var startControl = moveTowardsFractional(curveStart, curPoint, 0.5);\n                    var endControl = moveTowardsFractional(curPoint, curveEnd, 0.5);\n                    var curveCmd = [\n                        \"C\",\n                        startControl.x,\n                        startControl.y,\n                        endControl.x,\n                        endControl.y,\n                        curveEnd.x,\n                        curveEnd.y\n                    ];\n                    curveCmd.origPoint = curPoint;\n                    resultCommands.push(curveCmd);\n                } else resultCommands.push(curCmd);\n            }\n            if (virtualCloseLine) {\n                var newStartPoint = pointForCommand(resultCommands[resultCommands.length - 1]);\n                resultCommands.push([\n                    \"Z\"\n                ]);\n                adjustCommand(resultCommands[0], newStartPoint);\n            }\n        } else resultCommands = commands;\n        return resultCommands.reduce(function(str, c2) {\n            return str + c2.join(\" \") + \" \";\n        }, \"\");\n    }\n    /**\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x2\n   * @param {number} y2\n   * @param {number | null} [strokeWidth]\n   */ drawLine(x1, y1, x2, y2, lineColor = \"#a8a8a8\", dashArray = 0, strokeWidth = null, strokeLineCap = \"butt\") {\n        const w2 = this.w;\n        const line = w2.dom.Paper.line().attr({\n            x1: x1,\n            y1: y1,\n            x2: x2,\n            y2: y2,\n            stroke: lineColor,\n            \"stroke-dasharray\": dashArray,\n            \"stroke-width\": strokeWidth,\n            \"stroke-linecap\": strokeLineCap\n        });\n        return line;\n    }\n    /**\n   * @param {number | null} [strokeWidth]\n   * @param {string | null} [strokeColor]\n   */ drawRect(x1 = 0, y1 = 0, x2 = 0, y2 = 0, radius = 0, color = \"#fefefe\", opacity = 1, strokeWidth = null, strokeColor = null, strokeDashArray = 0) {\n        const w2 = this.w;\n        const rect = w2.dom.Paper.rect();\n        rect.attr({\n            x: x1,\n            y: y1,\n            width: x2 > 0 ? x2 : 0,\n            height: y2 > 0 ? y2 : 0,\n            rx: radius,\n            ry: radius,\n            opacity: opacity,\n            \"stroke-width\": strokeWidth !== null ? strokeWidth : 0,\n            stroke: strokeColor !== null ? strokeColor : \"none\",\n            \"stroke-dasharray\": strokeDashArray\n        });\n        rect.node.setAttribute(\"fill\", color);\n        return rect;\n    }\n    /**\n   * @param {string} polygonString\n   */ drawPolygon(polygonString, stroke = \"#e1e1e1\", strokeWidth = 1, fill = \"none\") {\n        const w2 = this.w;\n        const polygon = w2.dom.Paper.polygon(polygonString).attr({\n            fill: fill,\n            stroke: stroke,\n            \"stroke-width\": strokeWidth\n        });\n        return polygon;\n    }\n    /**\n   * @param {number} radius\n   * @param {Record<string, any> | null} attrs\n   */ drawCircle(radius, attrs = null) {\n        const w2 = this.w;\n        if (radius < 0) radius = 0;\n        const c2 = w2.dom.Paper.circle(radius * 2);\n        if (attrs !== null) c2.attr(attrs);\n        return c2;\n    }\n    /** @param {{ d?: string, stroke?: string, strokeWidth?: number, fill: any, fillOpacity?: number, strokeOpacity?: number, classes?: any, strokeLinecap?: any, strokeDashArray?: number }} opts */ drawPath({ d: d = \"\", stroke: stroke = \"#a8a8a8\", strokeWidth: strokeWidth = 1, fill: fill, fillOpacity: fillOpacity = 1, strokeOpacity: strokeOpacity = 1, classes: classes, strokeLinecap: strokeLinecap = null, strokeDashArray: strokeDashArray = 0 }) {\n        const w2 = this.w;\n        if (strokeLinecap === null) strokeLinecap = w2.config.stroke.lineCap;\n        if (d.indexOf(\"undefined\") > -1 || d.indexOf(\"NaN\") > -1) d = `M 0 ${w2.layout.gridHeight}`;\n        const p2 = w2.dom.Paper.path(d).attr({\n            fill: fill,\n            \"fill-opacity\": fillOpacity,\n            stroke: stroke,\n            \"stroke-opacity\": strokeOpacity,\n            \"stroke-linecap\": strokeLinecap,\n            \"stroke-width\": strokeWidth,\n            \"stroke-dasharray\": strokeDashArray,\n            class: classes\n        });\n        return p2;\n    }\n    /**\n   * @param {Record<string, any> | null} attrs\n   */ group(attrs = null) {\n        const w2 = this.w;\n        const g2 = w2.dom.Paper.group();\n        if (attrs !== null) g2.attr(attrs);\n        return g2;\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   */ move(x, y) {\n        const move = [\n            \"M\",\n            x,\n            y\n        ].join(\" \");\n        return move;\n    }\n    /**\n   * @param {number | null} x\n   * @param {number | null} y\n   * @param {string | null} hORv\n   * @returns {string}\n   */ line(x, y, hORv = null) {\n        if (hORv === \"H\") return [\n            \" H\",\n            x\n        ].join(\" \");\n        if (hORv === \"V\") return [\n            \" V\",\n            y\n        ].join(\" \");\n        return [\n            \" L\",\n            x,\n            y\n        ].join(\" \");\n    }\n    /**\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x2\n   * @param {number} y2\n   * @param {number} x\n   * @param {number} y\n   */ curve(x1, y1, x2, y2, x, y) {\n        const curve = [\n            \"C\",\n            x1,\n            y1,\n            x2,\n            y2,\n            x,\n            y\n        ].join(\" \");\n        return curve;\n    }\n    /**\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x\n   * @param {number} y\n   */ quadraticCurve(x1, y1, x, y) {\n        const curve = [\n            \"Q\",\n            x1,\n            y1,\n            x,\n            y\n        ].join(\" \");\n        return curve;\n    }\n    /**\n   * @param {number} rx\n   * @param {number} ry\n   * @param {number} axisRotation\n   * @param {number} largeArcFlag\n   * @param {number} sweepFlag\n   * @param {number} x\n   * @param {number} y\n   */ arc(rx, ry, axisRotation, largeArcFlag, sweepFlag, x, y, relative = false) {\n        let coord = \"A\";\n        if (relative) coord = \"a\";\n        const arc = [\n            coord,\n            rx,\n            ry,\n            axisRotation,\n            largeArcFlag,\n            sweepFlag,\n            x,\n            y\n        ].join(\" \");\n        return arc;\n    }\n    /**\n   * @memberof Graphics\n   * @param {Record<string, any>} opts\n   *  i = series's index\n   *  realIndex = realIndex is series's actual index when it was drawn time. After several redraws, the iterating \"i\" may change in loops, but realIndex doesn't\n   *  pathFrom = existing pathFrom to animateTo\n   *  pathTo = new Path to which d attr will be animated from pathFrom to pathTo\n   *  stroke = line Color\n   *  strokeWidth = width of path Line\n   *  fill = it can be gradient, single color, pattern or image\n   *  animationDelay = how much to delay when starting animation (in milliseconds)\n   *  dataChangeSpeed = for dynamic animations, when data changes\n   *  className = class attribute to add\n   *  scrollMorph = this data-change morph is a streaming scroll (see StreamScroll);\n   *                defaults the morph easing to linear so the slide is constant-velocity\n   * @return {any} svg.js path object\n   **/ renderPaths({ j: j, realIndex: realIndex, pathFrom: pathFrom, pathTo: pathTo, pathToInterp: pathToInterp, stroke: stroke, strokeWidth: strokeWidth, strokeLinecap: strokeLinecap, fill: fill, animationDelay: animationDelay, initialSpeed: initialSpeed, dataChangeSpeed: dataChangeSpeed, className: className, chartType: chartType, shouldClipToGrid: shouldClipToGrid = true, bindEventsOnPaths: bindEventsOnPaths = true, drawShadow: drawShadow = true, drawMask: drawMask = null, scrollMorph: scrollMorph = false }) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n        const anim = new $e4b487e979d7c06d$var$Animations(this.w, (_a = this.ctx) != null ? _a : void 0);\n        const initialAnim = this.w.config.chart.animations.enabled;\n        const dynamicAnim = initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;\n        if (pathFrom && pathFrom.startsWith(\"M 0 0 \") && pathTo) {\n            const moveCommand = pathTo.match(/^M\\s+[\\d.-]+\\s+[\\d.-]+/);\n            if (moveCommand) pathFrom = pathFrom.replace(/^M\\s+0\\s+0/, moveCommand[0]);\n        }\n        let d;\n        const crossTypeMorph = ((_c = (_b = this.ctx) == null ? void 0 : _b.morphTypeChange) == null ? void 0 : _c.isActive()) === true;\n        const shouldAnimate = !!(initialAnim && !w2.globals.resized || dynamicAnim && w2.globals.dataChanged && w2.globals.shouldAnimate || crossTypeMorph && initialAnim && w2.globals.shouldAnimate);\n        const isDrawableSeries = typeof className === \"string\" && (className.indexOf(\"apexcharts-line\") > -1 || className.indexOf(\"apexcharts-area\") > -1 || className.indexOf(\"apexcharts-rangeArea\") > -1 || className.indexOf(\"apexcharts-radar\") > -1);\n        const useDrawMode = !!(initialAnim && !w2.globals.resized && !w2.globals.dataChanged && isDrawableSeries);\n        const largeThreshold = (_d = w2.config.chart.animations.largeDatasetThreshold) != null ? _d : 0;\n        const bulkRender = !!(shouldAnimate && !useDrawMode && largeThreshold > 0 && w2.globals.dataPoints > largeThreshold);\n        const isCandleOrBox = chartType === \"candlestick\" || chartType === \"boxPlot\";\n        const fadeOnDataChange = !!(isCandleOrBox && shouldAnimate && !useDrawMode && w2.globals.dataChanged && // ...but a cross-type morph is a deliberate one-off with marks already\n        // paired, so it keeps its tween instead of fading.\n        !crossTypeMorph);\n        const revealViaFade = bulkRender || fadeOnDataChange;\n        if (shouldAnimate && !useDrawMode && !revealViaFade) d = pathFrom;\n        else {\n            d = pathTo;\n            if (!shouldAnimate) w2.globals.animationEnded = true;\n        }\n        const strokeDashArrayOpt = w2.config.stroke.dashArray;\n        let strokeDashArray = 0;\n        if (Array.isArray(strokeDashArrayOpt)) strokeDashArray = strokeDashArrayOpt[realIndex];\n        else strokeDashArray = w2.config.stroke.dashArray;\n        const el = this.drawPath({\n            d: d,\n            stroke: stroke,\n            strokeWidth: strokeWidth,\n            fill: fill,\n            fillOpacity: 1,\n            classes: className,\n            strokeLinecap: strokeLinecap,\n            strokeDashArray: strokeDashArray\n        });\n        el.attr(\"index\", realIndex);\n        if (shouldClipToGrid) {\n            if (chartType === \"bar\" && !w2.globals.isBarHorizontal || w2.globals.comboCharts) el.attr({\n                \"clip-path\": `url(#gridRectBarMask${w2.globals.cuid})`\n            });\n            else el.attr({\n                \"clip-path\": `url(#gridRectMask${w2.globals.cuid})`\n            });\n        }\n        if (w2.config.chart.dropShadow.enabled && drawShadow) filters.dropShadow(el, w2.config.chart.dropShadow, realIndex);\n        if (bindEventsOnPaths) {\n            el.node.addEventListener(\"mouseenter\", this.pathMouseEnter.bind(this, el));\n            el.node.addEventListener(\"mouseleave\", this.pathMouseLeave.bind(this, el));\n            el.node.addEventListener(\"mousedown\", this.pathMouseDown.bind(this, el));\n        }\n        el.attr({\n            pathTo: pathTo,\n            pathFrom: pathFrom\n        });\n        const defaultAnimateOpts = {\n            el: el,\n            j: j,\n            realIndex: realIndex,\n            pathFrom: pathFrom,\n            pathTo: pathTo,\n            pathToInterp: pathToInterp,\n            fill: fill,\n            strokeWidth: strokeWidth,\n            delay: animationDelay,\n            scrollMorph: scrollMorph\n        };\n        if (initialAnim && !w2.globals.resized && !w2.globals.dataChanged) {\n            if (useDrawMode) {\n                const drawSpeed = initialSpeed * 2;\n                const isFill = stroke === \"none\" || strokeWidth === 0;\n                const seriesCount = w2.seriesData.series.length;\n                const isLast = w2.globals.comboCharts ? true : realIndex === seriesCount - 1;\n                anim.animateDraw(el, {\n                    realIndex: realIndex,\n                    j: j,\n                    isFill: isFill,\n                    isLast: isLast,\n                    speed: drawSpeed,\n                    delay: 0,\n                    mask: drawMask\n                });\n            } else if (!revealViaFade) anim.animatePathsGradually($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, defaultAnimateOpts), {\n                speed: initialSpeed\n            }));\n        } else if ((w2.globals.resized || !w2.globals.dataChanged) && !revealViaFade) anim.showDelayedElements();\n        const animateOnUpdate = shouldAnimate && !revealViaFade && (w2.globals.dataChanged && dynamicAnim || crossTypeMorph);\n        if (animateOnUpdate) anim.animatePathsGradually($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, defaultAnimateOpts), {\n            speed: dataChangeSpeed\n        }));\n        if (revealViaFade) anim.revealBulk(el);\n        return el;\n    }\n    /**\n   * @param {string} style\n   * @param {number} width\n   * @param {number} height\n   */ drawPattern(style, width, height, stroke = \"#a8a8a8\", strokeWidth = 0) {\n        const w2 = this.w;\n        const p2 = w2.dom.Paper.pattern(width, height, (add)=>{\n            if (style === \"horizontalLines\") add.line(0, 0, height, 0).stroke({\n                color: stroke,\n                width: strokeWidth + 1\n            });\n            else if (style === \"verticalLines\") add.line(0, 0, 0, width).stroke({\n                color: stroke,\n                width: strokeWidth + 1\n            });\n            else if (style === \"slantedLines\") add.line(0, 0, width, height).stroke({\n                color: stroke,\n                width: strokeWidth\n            });\n            else if (style === \"squares\") add.rect(width, height).fill(\"none\").stroke({\n                color: stroke,\n                width: strokeWidth\n            });\n            else if (style === \"circles\") add.circle(width).fill(\"none\").stroke({\n                color: stroke,\n                width: strokeWidth\n            });\n        });\n        return p2;\n    }\n    /**\n   * @param {string} style\n   * @param {string} gfrom\n   * @param {string} gto\n   * @param {number} opacityFrom\n   * @param {number} opacityTo\n   * @param {number | null} [size]\n   * @param {number[] | null} stops\n   * @param {any[]} colorStops\n   * @param {number} [i]\n   * @param {boolean} [verticalUserSpace] anchor a vertical gradient to the plot\n   *   area rather than to each path's own bounding box. Needed when one series\n   *   is drawn as several path elements (nulls split it into segments): with\n   *   the default objectBoundingBox each segment resolves the same offset\n   *   against a different bbox, so the color transition lands on a different\n   *   value in every segment.\n   */ drawGradient(style, gfrom, gto, opacityFrom, opacityTo, size = null, stops = null, colorStops = [], i2 = 0, verticalUserSpace = false) {\n        const w2 = this.w;\n        let g2;\n        if (gfrom.length < 9 && gfrom.indexOf(\"#\") === 0) gfrom = $e4b487e979d7c06d$var$Utils$1.hexToRgba(gfrom, opacityFrom);\n        if (gto.length < 9 && gto.indexOf(\"#\") === 0) gto = $e4b487e979d7c06d$var$Utils$1.hexToRgba(gto, opacityTo);\n        let stop1 = 0;\n        let stop2 = 1;\n        let stop3 = 1;\n        let stop4 = null;\n        if (stops !== null) {\n            stop1 = typeof stops[0] !== \"undefined\" ? stops[0] / 100 : 0;\n            stop2 = typeof stops[1] !== \"undefined\" ? stops[1] / 100 : 1;\n            stop3 = typeof stops[2] !== \"undefined\" ? stops[2] / 100 : 1;\n            stop4 = typeof stops[3] !== \"undefined\" ? stops[3] / 100 : null;\n        }\n        const radial = !!(w2.config.chart.type === \"donut\" || w2.config.chart.type === \"pie\" || w2.config.chart.type === \"polarArea\" || w2.config.chart.type === \"bubble\");\n        if (!colorStops || colorStops.length === 0) g2 = w2.dom.Paper.gradient(radial ? \"radial\" : \"linear\", (add)=>{\n            add.stop(stop1, gfrom, opacityFrom);\n            add.stop(stop2, gto, opacityTo);\n            add.stop(stop3, gto, opacityTo);\n            if (stop4 !== null) add.stop(stop4, gfrom, opacityFrom);\n        });\n        else g2 = w2.dom.Paper.gradient(radial ? \"radial\" : \"linear\", (add)=>{\n            const gradientStops = Array.isArray(colorStops[i2]) ? colorStops[i2] : Array.isArray(colorStops[0]) ? colorStops[0] || [] : colorStops;\n            gradientStops.forEach((s2)=>{\n                add.stop(s2.offset / 100, s2.color, s2.opacity);\n            });\n        });\n        if (!radial) {\n            if (style === \"vertical\") {\n                if (verticalUserSpace) {\n                    g2.attr({\n                        gradientUnits: \"userSpaceOnUse\"\n                    });\n                    g2.from(0, 0).to(0, w2.layout.gridHeight);\n                } else g2.from(0, 0).to(0, 1);\n            } else if (style === \"diagonal\") g2.from(0, 0).to(1, 1);\n            else if (style === \"horizontal\") g2.from(0, 1).to(1, 1);\n            else if (style === \"diagonal2\") g2.from(1, 0).to(0, 1);\n        } else {\n            const offx = w2.layout.gridWidth / 2;\n            const offy = w2.layout.gridHeight / 2;\n            if (w2.config.chart.type !== \"bubble\") g2.attr({\n                gradientUnits: \"userSpaceOnUse\",\n                cx: offx,\n                cy: offy,\n                r: size\n            });\n            else g2.attr({\n                cx: 0.5,\n                cy: 0.5,\n                r: 0.8,\n                fx: 0.2,\n                fy: 0.2\n            });\n        }\n        return g2;\n    }\n    /** @param {{ text: any, maxWidth: any, fontSize: any, fontFamily?: any }} opts */ getTextBasedOnMaxWidth({ text: text, maxWidth: maxWidth, fontSize: fontSize, fontFamily: fontFamily }) {\n        const tRects = this.getTextRects(text, fontSize, fontFamily, \"\");\n        const wordWidth = tRects.width / text.length;\n        const wordsBasedOnWidth = Math.floor(maxWidth / wordWidth);\n        if (maxWidth < tRects.width) return text.slice(0, wordsBasedOnWidth - 3) + \"...\";\n        return text;\n    }\n    /**\n   * @param {{ x: any, y: any, text: any, textAnchor?: any, fontSize?: any, fontFamily?: any, fontWeight?: any, foreColor?: any, opacity?: any, maxWidth?: any, cssClass?: string, isPlainText?: boolean, dominantBaseline?: string }} opts\n   */ drawText({ x: x, y: y, text: text, textAnchor: textAnchor, fontSize: fontSize, fontFamily: fontFamily, fontWeight: fontWeight, foreColor: foreColor, opacity: opacity, maxWidth: maxWidth, cssClass: cssClass = \"\", isPlainText: isPlainText = true, dominantBaseline: dominantBaseline = \"auto\" }) {\n        const w2 = this.w;\n        if (typeof text === \"undefined\") text = \"\";\n        let truncatedText = text;\n        if (!textAnchor) textAnchor = \"start\";\n        if (!foreColor || !foreColor.length) foreColor = w2.config.chart.foreColor;\n        fontFamily = fontFamily || w2.config.chart.fontFamily;\n        fontSize = fontSize || \"11px\";\n        fontWeight = fontWeight || \"regular\";\n        const commonProps = {\n            maxWidth: maxWidth,\n            fontSize: fontSize,\n            fontFamily: fontFamily\n        };\n        let elText;\n        if (Array.isArray(text)) elText = w2.dom.Paper.text((add)=>{\n            for(let i2 = 0; i2 < text.length; i2++){\n                truncatedText = text[i2];\n                if (maxWidth) truncatedText = this.getTextBasedOnMaxWidth($e4b487e979d7c06d$var$__spreadValues({\n                    text: text[i2]\n                }, commonProps));\n                i2 === 0 ? add.tspan(truncatedText) : add.tspan(truncatedText).newLine();\n            }\n        });\n        else {\n            if (maxWidth) truncatedText = this.getTextBasedOnMaxWidth($e4b487e979d7c06d$var$__spreadValues({\n                text: text\n            }, commonProps));\n            elText = isPlainText ? w2.dom.Paper.plain(text) : /**\n         * @param {any} add\n         */ w2.dom.Paper.text((add)=>add.tspan(truncatedText));\n        }\n        elText.attr({\n            x: x,\n            y: y,\n            \"text-anchor\": textAnchor,\n            \"dominant-baseline\": dominantBaseline,\n            \"font-size\": fontSize,\n            \"font-family\": fontFamily,\n            \"font-weight\": fontWeight,\n            fill: foreColor,\n            class: \"apexcharts-text \" + cssClass\n        });\n        elText.node.style.fontFamily = fontFamily;\n        elText.node.style.opacity = opacity;\n        return elText;\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   * @param {string} type\n   * @param {number} size\n   */ getMarkerPath(x, y, type, size) {\n        const CROSS_SHRINK = 1.4;\n        const PLUS_SHRINK = 1.12;\n        const STAR_GROW = 1.15;\n        const SPARKLE_SHRINK = 1.1;\n        const SQUARE_SHRINK = 1.125;\n        const DIAMOND_GROW = 1.05;\n        const LINE_SHRINK = 1.1;\n        const CIRCLE_DIAMETER = 2;\n        let d = \"\";\n        switch(type){\n            case \"cross\":\n                size = size / CROSS_SHRINK;\n                d = `M ${x - size} ${y - size} L ${x + size} ${y + size}  M ${x - size} ${y + size} L ${x + size} ${y - size}`;\n                break;\n            case \"plus\":\n                size = size / PLUS_SHRINK;\n                d = `M ${x - size} ${y} L ${x + size} ${y}  M ${x} ${y - size} L ${x} ${y + size}`;\n                break;\n            case \"star\":\n            case \"sparkle\":\n                {\n                    let points = 5;\n                    size = size * STAR_GROW;\n                    if (type === \"sparkle\") {\n                        size = size / SPARKLE_SHRINK;\n                        points = 4;\n                    }\n                    const step = Math.PI / points;\n                    for(let i2 = 0; i2 <= 2 * points; i2++){\n                        const angle = i2 * step;\n                        const radius = i2 % 2 === 0 ? size : size / 2;\n                        const xPos = x + radius * Math.sin(angle);\n                        const yPos = y - radius * Math.cos(angle);\n                        d += (i2 === 0 ? \"M\" : \"L\") + xPos + \",\" + yPos;\n                    }\n                    d += \"Z\";\n                    break;\n                }\n            case \"triangle\":\n                d = `M ${x} ${y - size} \n             L ${x + size} ${y + size} \n             L ${x - size} ${y + size} \n             Z`;\n                break;\n            case \"square\":\n            case \"rect\":\n                size = size / SQUARE_SHRINK;\n                d = `M ${x - size} ${y - size} \n           L ${x + size} ${y - size} \n           L ${x + size} ${y + size} \n           L ${x - size} ${y + size} \n           Z`;\n                break;\n            case \"diamond\":\n                size = size * DIAMOND_GROW;\n                d = `M ${x} ${y - size} \n             L ${x + size} ${y} \n             L ${x} ${y + size} \n             L ${x - size} ${y} \n            Z`;\n                break;\n            case \"line\":\n                size = size / LINE_SHRINK;\n                d = `M ${x - size} ${y} \n           L ${x + size} ${y}`;\n                break;\n            case \"circle\":\n            default:\n                size = size * CIRCLE_DIAMETER;\n                d = `M ${x}, ${y} \n           m -${size / 2}, 0 \n           a ${size / 2},${size / 2} 0 1,0 ${size},0 \n           a ${size / 2},${size / 2} 0 1,0 -${size},0`;\n                break;\n        }\n        return d;\n    }\n    /**\n   * @param {number} x - The x-coordinate of the marker\n   * @param {number} y - The y-coordinate of the marker\n   * @param {string} type - Marker shape type\n   * @param {number} size - The size of the marker\n   * @param {Record<string, any>} opts - The options for the marker\n   * @returns {any} The created marker.\n   */ drawMarkerShape(x, y, type, size, opts) {\n        const path = this.drawPath({\n            d: this.getMarkerPath(x, y, type, size),\n            stroke: opts.pointStrokeColor,\n            strokeDashArray: opts.pointStrokeDashArray,\n            strokeWidth: opts.pointStrokeWidth,\n            fill: opts.pointFillColor,\n            fillOpacity: opts.pointFillOpacity,\n            strokeOpacity: opts.pointStrokeOpacity\n        });\n        path.attr({\n            cx: x,\n            cy: y,\n            shape: opts.shape,\n            class: opts.class ? opts.class : \"\"\n        });\n        return path;\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   * @param {Record<string, any>} opts\n   */ drawMarker(x, y, opts) {\n        x = x || 0;\n        let size = opts.pSize || 0;\n        if (!$e4b487e979d7c06d$var$Utils$1.isNumber(y)) {\n            size = 0;\n            y = 0;\n        }\n        return this.drawMarkerShape(x, y, opts == null ? void 0 : opts.shape, size, $e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({}, opts), opts.shape === \"line\" || opts.shape === \"plus\" || opts.shape === \"cross\" ? {\n            pointStrokeColor: opts.pointFillColor,\n            pointStrokeOpacity: opts.pointFillOpacity\n        } : {}));\n    }\n    /**\n   * @param {any} path\n   * @param {Event | null} [e]\n   */ pathMouseEnter(path, e2) {\n        var _a, _b;\n        const w2 = this.w;\n        const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n        const i2 = parseInt((_a = path.node.getAttribute(\"index\")) != null ? _a : \"\", 10);\n        const j = parseInt((_b = path.node.getAttribute(\"j\")) != null ? _b : \"\", 10);\n        if (isNaN(i2) || isNaN(j)) return;\n        if (typeof w2.config.chart.events.dataPointMouseEnter === \"function\") w2.config.chart.events.dataPointMouseEnter(e2, this.ctx, {\n            seriesIndex: i2,\n            dataPointIndex: j,\n            w: w2\n        });\n        $e4b487e979d7c06d$var$Graphics._fireEvent(w2, \"dataPointMouseEnter\", [\n            e2,\n            this.ctx,\n            {\n                seriesIndex: i2,\n                dataPointIndex: j,\n                w: w2\n            }\n        ]);\n        if (w2.config.states.active.filter.type !== \"none\") {\n            if (path.node.getAttribute(\"selected\") === \"true\") return;\n        }\n        if ($e4b487e979d7c06d$var$Filters.hoverOutlineOwnsHoverState(w2)) return;\n        if (w2.config.states.hover.filter.type !== \"none\") {\n            if (!w2.interact.isTouchDevice) {\n                const hoverFilter = w2.config.states.hover.filter;\n                filters.applyFilter(path, i2, hoverFilter.type, hoverFilter.value);\n            }\n        }\n    }\n    /**\n   * @param {any} path\n   * @param {Event | null} [e]\n   */ pathMouseLeave(path, e2) {\n        var _a, _b;\n        const w2 = this.w;\n        const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n        const i2 = parseInt((_a = path.node.getAttribute(\"index\")) != null ? _a : \"\", 10);\n        const j = parseInt((_b = path.node.getAttribute(\"j\")) != null ? _b : \"\", 10);\n        if (isNaN(i2) || isNaN(j)) return;\n        if (typeof w2.config.chart.events.dataPointMouseLeave === \"function\") w2.config.chart.events.dataPointMouseLeave(e2, this.ctx, {\n            seriesIndex: i2,\n            dataPointIndex: j,\n            w: w2\n        });\n        $e4b487e979d7c06d$var$Graphics._fireEvent(w2, \"dataPointMouseLeave\", [\n            e2,\n            this.ctx,\n            {\n                seriesIndex: i2,\n                dataPointIndex: j,\n                w: w2\n            }\n        ]);\n        if (w2.config.states.active.filter.type !== \"none\") {\n            if (path.node.getAttribute(\"selected\") === \"true\") return;\n        }\n        if ($e4b487e979d7c06d$var$Filters.hoverOutlineOwnsHoverState(w2)) return;\n        if (w2.config.states.hover.filter.type !== \"none\") filters.getDefaultFilter(path, i2);\n    }\n    /**\n   * Clear every selected data point (single-select mode): reset the selection\n   * array and restore the default filter on all series path/circle/rect nodes.\n   * NOTE: preserves the original behavior of passing the clicked series index\n   * `i` to getDefaultFilter for every element (not each element's own index).\n   * @param {any} filters @param {number} i\n   */ _clearAllDataPointSelections(filters, i2) {\n        const w2 = this.w;\n        w2.interact.selectedDataPoints = [];\n        const elPaths = w2.dom.Paper.find(\".apexcharts-series path:not(.apexcharts-decoration-element)\");\n        const elCircles = w2.dom.Paper.find(\".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)\");\n        const deSelect = (els)=>{\n            Array.prototype.forEach.call(els, (el)=>{\n                el.node.setAttribute(\"selected\", \"false\");\n                filters.getDefaultFilter(el, i2);\n            });\n        };\n        deSelect(elPaths);\n        deSelect(elCircles);\n    }\n    /**\n   * Toggle the selected state of a single data point. Mutates\n   * `w.interact.selectedDataPoints` and the path's `selected` attribute,\n   * honoring single- vs multi-select mode. Returns the new selected flag.\n   * @param {any} path @param {any} filters @param {number} i @param {number} j\n   * @returns {'true' | 'false'}\n   */ _togglePointSelection(path, filters, i2, j) {\n        const w2 = this.w;\n        if (path.node.getAttribute(\"selected\") === \"true\") {\n            path.node.setAttribute(\"selected\", \"false\");\n            const index = w2.interact.selectedDataPoints[i2].indexOf(j);\n            if (index > -1) w2.interact.selectedDataPoints[i2].splice(index, 1);\n            return \"false\";\n        }\n        if (!w2.config.states.active.allowMultipleDataPointsSelection && w2.interact.selectedDataPoints.length > 0) this._clearAllDataPointSelections(filters, i2);\n        path.node.setAttribute(\"selected\", \"true\");\n        if (typeof w2.interact.selectedDataPoints[i2] === \"undefined\") w2.interact.selectedDataPoints[i2] = [];\n        w2.interact.selectedDataPoints[i2].push(j);\n        return \"true\";\n    }\n    /**\n   * Apply the active / hover / default state filter after a selection toggle,\n   * matching the original inline branching.\n   * @param {any} path @param {any} filters @param {number} i\n   * @param {'true' | 'false'} selected\n   */ _applyPointSelectionFilter(path, filters, i2, selected) {\n        const w2 = this.w;\n        if ($e4b487e979d7c06d$var$Filters.sliceOffsetOwnsActiveState(w2)) return;\n        if (selected === \"true\") {\n            const activeFilter = w2.config.states.active.filter;\n            if (activeFilter !== \"none\") filters.applyFilter(path, i2, activeFilter.type, activeFilter.value);\n            else {\n                if (w2.config.states.hover.filter !== \"none\") {\n                    if (!w2.interact.isTouchDevice) {\n                        const hoverFilter = w2.config.states.hover.filter;\n                        filters.applyFilter(path, i2, hoverFilter.type, hoverFilter.value);\n                    }\n                }\n            }\n        } else if (w2.config.states.active.filter.type !== \"none\") {\n            if (w2.config.states.hover.filter.type !== \"none\" && !w2.interact.isTouchDevice) {\n                const hoverFilter = w2.config.states.hover.filter;\n                filters.applyFilter(path, i2, hoverFilter.type, hoverFilter.value);\n            } else filters.getDefaultFilter(path, i2);\n        }\n    }\n    /**\n   * @param {any} path\n   * @param {Event | null} e\n   */ pathMouseDown(path, e2) {\n        var _a, _b;\n        const w2 = this.w;\n        const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n        const i2 = parseInt((_a = path.node.getAttribute(\"index\")) != null ? _a : \"\", 10);\n        const j = parseInt((_b = path.node.getAttribute(\"j\")) != null ? _b : \"\", 10);\n        if (isNaN(i2) || isNaN(j)) return;\n        const link = w2.config.chart.link;\n        const crossfilterClick = !!(link && (typeof link.dimension === \"function\" || link.enabled));\n        if (!crossfilterClick) {\n            const selected = this._togglePointSelection(path, filters, i2, j);\n            this._applyPointSelectionFilter(path, filters, i2, selected);\n        }\n        if (typeof w2.config.chart.events.dataPointSelection === \"function\") w2.config.chart.events.dataPointSelection(e2, this.ctx, {\n            selectedDataPoints: w2.interact.selectedDataPoints,\n            seriesIndex: i2,\n            dataPointIndex: j,\n            w: w2\n        });\n        if (e2) $e4b487e979d7c06d$var$Graphics._fireEvent(w2, \"dataPointSelection\", [\n            e2,\n            this.ctx,\n            {\n                selectedDataPoints: w2.interact.selectedDataPoints,\n                seriesIndex: i2,\n                dataPointIndex: j,\n                w: w2\n            }\n        ]);\n    }\n    /**\n   * @param {any} el\n   * @returns {{ x: number, y: number }}\n   */ rotateAroundCenter(el) {\n        let coord = /** @type {any} */ {};\n        if (el && typeof el.getBBox === \"function\") coord = el.getBBox();\n        const x = coord.x + coord.width / 2;\n        const y = coord.y + coord.height / 2;\n        return {\n            x: x,\n            y: y\n        };\n    }\n    /**\n   * Sets up event delegation on a parent group element.\n   * Uses mouseover/mouseout (which bubble) to simulate mouseenter/mouseleave\n   * on matching child elements, reducing per-element listener overhead.\n   * @param {any} parentGroup\n   * @param {string} targetSelector\n   */ setupEventDelegation(parentGroup, targetSelector) {\n        let currentHovered = null;\n        parentGroup.node.addEventListener(\"mouseover\", (e2)=>{\n            const targetNode = $e4b487e979d7c06d$var$Graphics._findDelegateTarget(e2.target, parentGroup.node, targetSelector);\n            if (!targetNode || targetNode === currentHovered) return;\n            if (currentHovered && /** @type {any} */ currentHovered.instance) this.pathMouseLeave(/** @type {any} */ currentHovered.instance, e2);\n            currentHovered = targetNode;\n            if (targetNode.instance) this.pathMouseEnter(targetNode.instance, e2);\n        });\n        parentGroup.node.addEventListener(\"mouseout\", (e2)=>{\n            if (!currentHovered) return;\n            const relatedNode = e2.relatedTarget ? $e4b487e979d7c06d$var$Graphics._findDelegateTarget(e2.relatedTarget, parentGroup.node, targetSelector) : null;\n            if (relatedNode !== currentHovered) {\n                if (currentHovered && /** @type {any} */ currentHovered.instance) this.pathMouseLeave(/** @type {any} */ currentHovered.instance, e2);\n                currentHovered = null;\n            }\n        });\n        parentGroup.node.addEventListener(\"mousedown\", (e2)=>{\n            const targetNode = $e4b487e979d7c06d$var$Graphics._findDelegateTarget(e2.target, parentGroup.node, targetSelector);\n            if (targetNode && targetNode.instance) this.pathMouseDown(targetNode.instance, e2);\n        });\n    }\n    // Fire a named event from w.globals.events without requiring a ctx reference.\n    // Mirrors Events.fireEvent() but reads the registry directly from w so that\n    // pathMouseEnter/Leave/Down work even when this.ctx is null (Graphics instances\n    // created without a ctx arg for drawing-only use cases).\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {string} name\n   * @param {any[]} args\n   */ static _fireEvent(w2, name2, args) {\n        const evs = w2.globals.events;\n        if (!evs || !Object.prototype.hasOwnProperty.call(evs, name2)) return;\n        const handlers = /** @type {Record<string,any>} */ evs[name2];\n        for(let i2 = 0; i2 < handlers.length; i2++)handlers[i2].apply(null, args);\n    }\n    /**\n   * @param {any} node\n   * @param {Record<string, any>} boundary\n   * @param {string} selector\n   */ static _findDelegateTarget(node, boundary, selector) {\n        while(node && node !== boundary && node !== document){\n            if (node.matches && node.matches(selector)) return node;\n            node = node.parentNode;\n        }\n        return null;\n    }\n    /**\n   * @param {any} el\n   * @param {Record<string, any>} attrs\n   */ static setAttrs(el, attrs) {\n        for(const key in attrs)if (Object.prototype.hasOwnProperty.call(attrs, key)) el.setAttribute(key, attrs[key]);\n    }\n    /**\n   * @param {string} text\n   * @param {string} fontSize\n   * @param {string | null | undefined} [fontFamily]\n   * @param {string} [transform]\n   * @returns {{ width: number, height: number }}\n   */ getTextRects(text, fontSize, fontFamily, transform, useBBox = true) {\n        const w2 = this.w;\n        const cacheKey = [\n            text,\n            fontSize,\n            fontFamily,\n            transform,\n            useBBox\n        ].join(\"\\0\");\n        const cache = w2.globals.textRectsCache;\n        if (cache && cache.has(cacheKey)) return /** @type {{ width: number, height: number }} */ cache.get(cacheKey);\n        const virtualText = this.drawText({\n            x: -200,\n            y: -200,\n            text: text,\n            textAnchor: \"start\",\n            fontSize: fontSize,\n            fontFamily: fontFamily,\n            foreColor: \"#fff\",\n            opacity: 0\n        });\n        if (transform) virtualText.attr(\"transform\", transform);\n        w2.dom.Paper.add(virtualText);\n        let rect = virtualText.bbox();\n        const bboxY = rect.y;\n        if (!useBBox) rect = virtualText.node.getBoundingClientRect();\n        virtualText.remove();\n        const result = {\n            width: rect.width,\n            height: rect.height,\n            // Offset from the text element's `y` (alphabetic baseline) to the\n            // bbox vertical center. For most fonts this is NEGATIVE (bbox center\n            // sits above the baseline because the ascender is taller than the\n            // descender). Use as: `text_y = desired_visual_center_y - centerOffset`.\n            // Only populated when useBBox=true (the default).\n            centerOffset: useBBox ? bboxY + rect.height / 2 - -200 : 0\n        };\n        if (cache) cache.set(cacheKey, result);\n        return result;\n    }\n    /**\n   * append ... to long text\n   * http://stackoverflow.com/questions/9241315/trimming-text-to-a-given-pixel-width-in-svg\n   * @memberof Graphics\n   * @param {Record<string, any>} textObj\n   * @param {string} textString\n   * @param {number} width\n   **/ placeTextWithEllipsis(textObj, textString, width) {\n        if (typeof textObj.getComputedTextLength !== \"function\") return;\n        textObj.textContent = textString;\n        if (textString.length > 0) {\n            if (textObj.getComputedTextLength() >= width / 1.1) {\n                for(let x = textString.length - 3; x > 0; x -= 3)if (textObj.getSubStringLength(0, x) <= width / 1.1) {\n                    textObj.textContent = textString.substring(0, x) + \"...\";\n                    return;\n                }\n                textObj.textContent = \".\";\n            }\n        }\n    }\n}\nclass $e4b487e979d7c06d$var$Fill {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n        this.opts = null;\n        this.seriesIndex = 0;\n        this.patternIDs = [];\n    }\n    /**\n   * @param {Record<string, any>} params\n   */ clippedImgArea(params) {\n        const w2 = this.w;\n        const cnf = w2.config;\n        const svgW = parseInt(String(w2.layout.gridWidth), 10);\n        const svgH = parseInt(String(w2.layout.gridHeight), 10);\n        const size = svgW > svgH ? svgW : svgH;\n        const fillImg = params.image;\n        let imgWidth = 0;\n        let imgHeight = 0;\n        if (typeof params.width === \"undefined\" && typeof params.height === \"undefined\") {\n            if (cnf.fill.image.width !== void 0 && cnf.fill.image.height !== void 0) {\n                imgWidth = cnf.fill.image.width + 1;\n                imgHeight = cnf.fill.image.height;\n            } else {\n                imgWidth = size + 1;\n                imgHeight = size;\n            }\n        } else {\n            imgWidth = params.width;\n            imgHeight = params.height;\n        }\n        const elPattern = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"pattern\");\n        $e4b487e979d7c06d$var$Graphics.setAttrs(elPattern, {\n            id: params.patternID,\n            patternUnits: params.patternUnits ? params.patternUnits : \"userSpaceOnUse\",\n            width: imgWidth + \"px\",\n            height: imgHeight + \"px\"\n        });\n        const elImage = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"image\");\n        elPattern.appendChild(elImage);\n        const SVGLib = $e4b487e979d7c06d$var$Environment.isBrowser() ? /** @type {any} */ window.SVG : /** @type {any} */ $parcel$global.SVG;\n        elImage.setAttributeNS(SVGLib.xlink, \"href\", fillImg);\n        $e4b487e979d7c06d$var$Graphics.setAttrs(elImage, {\n            x: 0,\n            y: 0,\n            preserveAspectRatio: \"none\",\n            width: imgWidth + \"px\",\n            height: imgHeight + \"px\"\n        });\n        elImage.style.opacity = params.opacity;\n        w2.dom.elDefs.node.appendChild(elPattern);\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ getSeriesIndex(opts) {\n        const w2 = this.w;\n        const cType = w2.config.chart.type;\n        if ((cType === \"bar\" || cType === \"rangeBar\") && w2.config.plotOptions.bar.distributed || cType === \"heatmap\" || cType === \"treemap\") this.seriesIndex = opts.seriesNumber;\n        else this.seriesIndex = opts.seriesNumber % w2.seriesData.series.length;\n        return this.seriesIndex;\n    }\n    /**\n   * The y-axis window a series is plotted against. This is the space the\n   * threshold gradient is measured in, since that gradient spans the plot area.\n   *\n   * @param {number} realIndex\n   */ getSeriesAxisRange(realIndex) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        const yaxisIndex = (_b = (_a = w2.globals.seriesYAxisReverseMap) == null ? void 0 : _a[realIndex]) != null ? _b : 0;\n        return {\n            minY: $e4b487e979d7c06d$var$Utils$1.isNumber(w2.globals.minYArr[realIndex]) ? w2.globals.minYArr[realIndex] : w2.globals.minY,\n            maxY: $e4b487e979d7c06d$var$Utils$1.isNumber(w2.globals.maxYArr[realIndex]) ? w2.globals.maxYArr[realIndex] : w2.globals.maxY,\n            reversed: !!((_c = w2.config.yaxis[yaxisIndex]) == null ? void 0 : _c.reversed)\n        };\n    }\n    /**\n   * Builds the two stops that split a series into an above- and a\n   * below-threshold color.\n   *\n   * The stops are painted into a vertical gradient anchored to the plot area\n   * (see Graphics.drawGradient's verticalUserSpace branch), so the boundary is\n   * positioned over the *axis* range. Deriving it from the data range instead\n   * puts the transition on the wrong value whenever the axis extends past the\n   * data, which is the common case: an explicit yaxis.min/max, a nice scale, or\n   * an axis shared with another series.\n   *\n   * @param {{ minY: number, maxY: number, reversed?: boolean }} axisRange\n   * @param {Record<string, any>} multiColorConfig\n   */ computeColorStops(axisRange, multiColorConfig) {\n        const w2 = this.w;\n        const { threshold: threshold, colorAboveThreshold: colorAboveThreshold, colorBelowThreshold: colorBelowThreshold } = multiColorConfig;\n        const { minY: minY, maxY: maxY } = axisRange;\n        const span = maxY - minY;\n        let offset = span === 0 ? threshold > maxY ? 0 : 100 : (maxY - threshold) / span * 100;\n        if (axisRange.reversed) offset = 100 - offset;\n        offset = Math.max(0, Math.min(offset, 100));\n        const fillOpacity = Array.isArray(w2.config.fill.opacity) ? w2.config.fill.opacity[this.seriesIndex] : w2.config.fill.opacity;\n        const above = {\n            offset: offset,\n            color: colorAboveThreshold,\n            opacity: fillOpacity\n        };\n        const below = {\n            offset: offset,\n            color: colorBelowThreshold,\n            opacity: fillOpacity\n        };\n        return axisRange.reversed ? [\n            below,\n            above\n        ] : [\n            above,\n            below\n        ];\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ fillPath(opts) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        this.opts = opts;\n        const cnf = this.w.config;\n        let pathFill;\n        let patternFill, gradientFill;\n        this.seriesIndex = this.getSeriesIndex(opts);\n        const drawMultiColorLine = cnf.plotOptions.line.colors.colorAboveThreshold && cnf.plotOptions.line.colors.colorBelowThreshold;\n        const fillColors = this.getFillColors();\n        let fillColor = fillColors[this.seriesIndex];\n        if (w2.seriesData.seriesColors[this.seriesIndex] !== void 0) fillColor = w2.seriesData.seriesColors[this.seriesIndex];\n        if (typeof fillColor === \"function\") fillColor = fillColor({\n            seriesIndex: this.seriesIndex,\n            dataPointIndex: opts.dataPointIndex,\n            value: opts.value,\n            w: w2\n        });\n        const fillType = opts.fillType ? opts.fillType : this.getFillType(this.seriesIndex);\n        let fillOpacity = Array.isArray(cnf.fill.opacity) ? cnf.fill.opacity[this.seriesIndex] : cnf.fill.opacity;\n        const useGradient = fillType === \"gradient\" || drawMultiColorLine;\n        if (opts.color) fillColor = opts.color;\n        const seriesItem = /** @type {Record<string,any>} */ w2.config.series[this.seriesIndex];\n        if ((_b = (_a = seriesItem == null ? void 0 : seriesItem.data) == null ? void 0 : _a[opts.dataPointIndex]) == null ? void 0 : _b.fillColor) fillColor = (_d = (_c = seriesItem == null ? void 0 : seriesItem.data) == null ? void 0 : _c[opts.dataPointIndex]) == null ? void 0 : _d.fillColor;\n        if (!fillColor) {\n            fillColor = \"#fff\";\n            console.warn(\"undefined color - ApexCharts\");\n        }\n        if (opts.opacity !== void 0 && opts.opacity !== null) fillOpacity = opts.opacity;\n        let defaultColor = fillColor;\n        if ($e4b487e979d7c06d$var$Utils$1.isCSSVariable(fillColor)) defaultColor = $e4b487e979d7c06d$var$Utils$1.applyOpacityToColor(fillColor, fillOpacity);\n        else if (fillColor.indexOf(\"rgb\") === -1) {\n            if (fillColor.indexOf(\"#\") === -1) defaultColor = fillColor;\n            else if (fillColor.length < 9) defaultColor = $e4b487e979d7c06d$var$Utils$1.hexToRgba(fillColor, fillOpacity);\n        } else if (fillColor.indexOf(\"rgba\") > -1) fillOpacity = $e4b487e979d7c06d$var$Utils$1.getOpacityFromRGBA(fillColor);\n        else defaultColor = $e4b487e979d7c06d$var$Utils$1.hexToRgba($e4b487e979d7c06d$var$Utils$1.rgb2hex(fillColor), fillOpacity);\n        const resolvedFillColor = $e4b487e979d7c06d$var$Utils$1.isCSSVariable(fillColor) ? $e4b487e979d7c06d$var$Utils$1.getThemeColor(fillColor) : fillColor;\n        if (fillType === \"pattern\") patternFill = this.handlePatternFill({\n            fillConfig: opts.fillConfig,\n            patternFill: patternFill,\n            fillColor: resolvedFillColor,\n            defaultColor: defaultColor\n        });\n        if (useGradient) {\n            const colorStops = cnf.fill.gradient.colorStops ? [\n                ...cnf.fill.gradient.colorStops\n            ] : [];\n            let type = cnf.fill.gradient.type;\n            if (drawMultiColorLine) {\n                colorStops[this.seriesIndex] = this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex), cnf.plotOptions.line.colors);\n                type = \"vertical\";\n            }\n            gradientFill = this.handleGradientFill({\n                type: type,\n                fillConfig: opts.fillConfig,\n                fillColor: resolvedFillColor,\n                fillOpacity: fillOpacity,\n                colorStops: colorStops,\n                i: this.seriesIndex,\n                // Threshold stops are positioned over the axis range, so the gradient\n                // has to be anchored to the plot area to match. This also keeps every\n                // segment of a null-split series on one shared coordinate space.\n                verticalUserSpace: drawMultiColorLine\n            });\n        }\n        if (fillType === \"image\") {\n            const imgSrc = cnf.fill.image.src;\n            const patternID = opts.patternID ? opts.patternID : \"\";\n            const patternKey = `pattern${w2.globals.cuid}${opts.seriesNumber + 1}${patternID}`;\n            if (this.patternIDs.indexOf(patternKey) === -1) {\n                this.clippedImgArea({\n                    opacity: fillOpacity,\n                    image: Array.isArray(imgSrc) ? opts.seriesNumber < imgSrc.length ? imgSrc[opts.seriesNumber] : imgSrc[0] : imgSrc,\n                    width: opts.width ? opts.width : void 0,\n                    height: opts.height ? opts.height : void 0,\n                    patternUnits: opts.patternUnits,\n                    patternID: patternKey\n                });\n                this.patternIDs.push(patternKey);\n            }\n            pathFill = `url(#${patternKey})`;\n        } else if (useGradient) pathFill = gradientFill;\n        else if (fillType === \"pattern\") pathFill = patternFill;\n        else pathFill = defaultColor;\n        if (opts.solid) pathFill = defaultColor;\n        return pathFill;\n    }\n    /**\n   * @param {number} seriesIndex\n   */ getFillType(seriesIndex) {\n        const w2 = this.w;\n        if (Array.isArray(w2.config.fill.type)) return w2.config.fill.type[seriesIndex];\n        else return w2.config.fill.type;\n    }\n    getFillColors() {\n        const w2 = this.w;\n        const cnf = w2.config;\n        const opts = this.opts;\n        let fillColors = [];\n        if (w2.globals.comboCharts) {\n            if (/** @type {Record<string,any>} */ w2.config.series[this.seriesIndex].type === \"line\") {\n                if (Array.isArray(w2.globals.stroke.colors)) fillColors = w2.globals.stroke.colors;\n                else fillColors.push(w2.globals.stroke.colors);\n            } else if (Array.isArray(w2.globals.fill.colors)) fillColors = w2.globals.fill.colors;\n            else fillColors.push(w2.globals.fill.colors);\n        } else {\n            if (cnf.chart.type === \"line\") {\n                if (Array.isArray(w2.globals.stroke.colors)) fillColors = w2.globals.stroke.colors;\n                else fillColors.push(w2.globals.stroke.colors);\n            } else if (Array.isArray(w2.globals.fill.colors)) fillColors = w2.globals.fill.colors;\n            else fillColors.push(w2.globals.fill.colors);\n        }\n        if (typeof opts.fillColors !== \"undefined\") {\n            fillColors = [];\n            if (Array.isArray(opts.fillColors)) fillColors = opts.fillColors.slice();\n            else fillColors.push(opts.fillColors);\n        }\n        return fillColors;\n    }\n    /** @param {{fillConfig: any, patternFill: any, fillColor: any, defaultColor: any}} opts */ handlePatternFill({ fillConfig: fillConfig, patternFill: patternFill, fillColor: fillColor, defaultColor: defaultColor }) {\n        let fillCnf = this.w.config.fill;\n        if (fillConfig) fillCnf = fillConfig;\n        const opts = this.opts;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const patternStrokeWidth = Array.isArray(fillCnf.pattern.strokeWidth) ? fillCnf.pattern.strokeWidth[this.seriesIndex] : fillCnf.pattern.strokeWidth;\n        const patternLineColor = fillColor;\n        if (Array.isArray(fillCnf.pattern.style)) {\n            if (typeof fillCnf.pattern.style[opts.seriesNumber] !== \"undefined\") {\n                const pf = graphics.drawPattern(fillCnf.pattern.style[opts.seriesNumber], fillCnf.pattern.width, fillCnf.pattern.height, patternLineColor, patternStrokeWidth);\n                patternFill = pf;\n            } else patternFill = defaultColor;\n        } else patternFill = graphics.drawPattern(fillCnf.pattern.style, fillCnf.pattern.width, fillCnf.pattern.height, patternLineColor, patternStrokeWidth);\n        return patternFill;\n    }\n    handleGradientFill({ type: type, fillColor: fillColor, fillOpacity: fillOpacity, fillConfig: fillConfig, colorStops: colorStops, i: i2, verticalUserSpace: verticalUserSpace = false }) {\n        let fillCnf = this.w.config.fill;\n        if (fillConfig) fillCnf = $e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({}, fillCnf), fillConfig);\n        const opts = this.opts;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const utils = new $e4b487e979d7c06d$var$Utils$1();\n        type = type || fillCnf.gradient.type;\n        let gradientFrom = fillColor;\n        let gradientTo;\n        let opacityFrom = fillCnf.gradient.opacityFrom === void 0 ? fillOpacity : Array.isArray(fillCnf.gradient.opacityFrom) ? fillCnf.gradient.opacityFrom[i2] : fillCnf.gradient.opacityFrom;\n        if (gradientFrom.indexOf(\"rgba\") > -1) opacityFrom = $e4b487e979d7c06d$var$Utils$1.getOpacityFromRGBA(gradientFrom);\n        let opacityTo = fillCnf.gradient.opacityTo === void 0 ? fillOpacity : Array.isArray(fillCnf.gradient.opacityTo) ? fillCnf.gradient.opacityTo[i2] : fillCnf.gradient.opacityTo;\n        if (fillCnf.gradient.gradientToColors === void 0 || fillCnf.gradient.gradientToColors.length === 0) {\n            if (fillCnf.gradient.shade === \"dark\") gradientTo = utils.shadeColor(parseFloat(fillCnf.gradient.shadeIntensity) * -1, fillColor.indexOf(\"rgb\") > -1 ? $e4b487e979d7c06d$var$Utils$1.rgb2hex(fillColor) : fillColor);\n            else gradientTo = utils.shadeColor(parseFloat(fillCnf.gradient.shadeIntensity), fillColor.indexOf(\"rgb\") > -1 ? $e4b487e979d7c06d$var$Utils$1.rgb2hex(fillColor) : fillColor);\n        } else if (fillCnf.gradient.gradientToColors[opts.seriesNumber]) {\n            const gToColor = fillCnf.gradient.gradientToColors[opts.seriesNumber];\n            gradientTo = gToColor;\n            if (gToColor.indexOf(\"rgba\") > -1) opacityTo = $e4b487e979d7c06d$var$Utils$1.getOpacityFromRGBA(gToColor);\n        } else gradientTo = fillColor;\n        if (fillCnf.gradient.gradientFrom) gradientFrom = fillCnf.gradient.gradientFrom;\n        if (fillCnf.gradient.gradientTo) gradientTo = fillCnf.gradient.gradientTo;\n        if (fillCnf.gradient.inverseColors) {\n            const t2 = gradientFrom;\n            gradientFrom = gradientTo;\n            gradientTo = t2;\n        }\n        if (gradientFrom.indexOf(\"rgb\") > -1) gradientFrom = $e4b487e979d7c06d$var$Utils$1.rgb2hex(gradientFrom);\n        if (gradientTo.indexOf(\"rgb\") > -1) gradientTo = $e4b487e979d7c06d$var$Utils$1.rgb2hex(gradientTo);\n        return graphics.drawGradient(type, gradientFrom, gradientTo, opacityFrom, opacityTo, opts.size, fillCnf.gradient.stops, colorStops, i2, verticalUserSpace);\n    }\n}\nconst $e4b487e979d7c06d$var$OK_FILTER_TYPES = [\n    \"none\",\n    \"lighten\",\n    \"darken\"\n];\nfunction $e4b487e979d7c06d$var$seriesEmitter(ctx, graphics) {\n    const r2 = ctx && ctx.renderer;\n    return r2 && r2.kind && r2.kind !== \"svg\" ? r2 : graphics;\n}\nfunction $e4b487e979d7c06d$var$computeMarkCount(w2) {\n    const series = w2.config.series || [];\n    const type = w2.config.chart.type;\n    const scatterish = type === \"scatter\" || type === \"bubble\";\n    const markerSize = w2.config.markers && w2.config.markers.size;\n    const markersOn = Array.isArray(markerSize) ? markerSize.some((s2)=>s2 > 0) : (markerSize || 0) > 0;\n    const labelsOn = !!(w2.config.dataLabels && w2.config.dataLabels.enabled);\n    const isHeatmap = type === \"heatmap\";\n    let total = 0;\n    let maxLen = 0;\n    series.forEach((s2)=>{\n        const n2 = Array.isArray(s2.data) ? s2.data.length : 0;\n        if (n2 > maxLen) maxLen = n2;\n        if (scatterish || markersOn || isHeatmap) total += n2;\n        if (labelsOn) total += n2;\n    });\n    const LARGE_D = 5e4;\n    if (maxLen >= LARGE_D) total = Math.max(total, maxLen);\n    return total;\n}\nfunction $e4b487e979d7c06d$var$hasCanvasUnsupportedFeature(w2) {\n    var _a, _b;\n    const fillType = w2.config.fill && w2.config.fill.type;\n    const isUnsupportedFill = (t2)=>t2 === \"pattern\" || t2 === \"image\" || t2 === \"gradient\";\n    if (Array.isArray(fillType) ? fillType.some(isUnsupportedFill) : isUnsupportedFill(fillType)) return true;\n    const lineColors = (_b = (_a = w2.config.plotOptions) == null ? void 0 : _a.line) == null ? void 0 : _b.colors;\n    if (lineColors && lineColors.colorAboveThreshold && lineColors.colorBelowThreshold) return true;\n    const states = w2.config.states || {};\n    const hoverFilter = states.hover && states.hover.filter && states.hover.filter.type;\n    const activeFilter = states.active && states.active.filter && states.active.filter.type;\n    if (hoverFilter && !$e4b487e979d7c06d$var$OK_FILTER_TYPES.includes(hoverFilter)) return true;\n    if (activeFilter && !$e4b487e979d7c06d$var$OK_FILTER_TYPES.includes(activeFilter)) return true;\n    return false;\n}\nclass $e4b487e979d7c06d$var$Markers {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this._filters = new $e4b487e979d7c06d$var$Filters(this.w);\n        this._graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n        this._seriesWrap = null;\n        this._seriesWrapIndex = -1;\n    }\n    /**\n   * Invalidate the cached per-series wrap group. Callers that drive\n   * plotChartMarkers point-by-point (Line) must call this when a series'\n   * element tree is (re)created, so a later render never appends markers to a\n   * detached group from the previous pass.\n   */ resetSeriesWrapCache() {\n        this._seriesWrap = null;\n        this._seriesWrapIndex = -1;\n    }\n    setGlobalMarkerSize() {\n        const w2 = this.w;\n        w2.globals.markers.size = Array.isArray(w2.config.markers.size) ? w2.config.markers.size : [\n            w2.config.markers.size\n        ];\n        if (w2.globals.markers.size.length > 0) {\n            if (w2.globals.markers.size.length < w2.seriesData.series.length + 1) {\n                for(let i2 = 0; i2 <= w2.seriesData.series.length; i2++)if (typeof w2.globals.markers.size[i2] === \"undefined\") w2.globals.markers.size.push(w2.globals.markers.size[0]);\n            }\n        } else w2.globals.markers.size = w2.config.series.map(()=>/** @type {number} */ w2.config.markers.size);\n    }\n    /** @param {{ pointsPos?: any, seriesIndex?: any, j?: any, pSize?: any, alwaysDrawMarker?: boolean, isVirtualPoint?: boolean }} opts */ plotChartMarkers({ pointsPos: pointsPos, seriesIndex: seriesIndex, j: j, pSize: pSize, alwaysDrawMarker: alwaysDrawMarker = false, isVirtualPoint: isVirtualPoint = false }) {\n        const w2 = this.w;\n        const i2 = seriesIndex;\n        const p2 = pointsPos;\n        let elMarkersWrap = null;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const emit = $e4b487e979d7c06d$var$seriesEmitter(this.ctx, graphics);\n        const hasDiscreteMarkers = w2.config.markers.discrete && w2.config.markers.discrete.length;\n        if (Array.isArray(p2.x)) for(let q = 0; q < p2.x.length; q++){\n            let markerElement;\n            let dataPointIndex = j;\n            let invalidMarker = !$e4b487e979d7c06d$var$Utils$1.isNumber(p2.y[q]);\n            if (w2.globals.markers.largestSize === 0 && w2.globals.hasNullValues && w2.seriesData.series[i2][j + 1] !== null && !isVirtualPoint) invalidMarker = true;\n            if (j === 1 && q === 0) dataPointIndex = 0;\n            if (j === 1 && q === 1) dataPointIndex = 1;\n            let markerClasses = \"apexcharts-marker\";\n            if ((w2.config.chart.type === \"line\" || w2.config.chart.type === \"area\") && !w2.globals.comboCharts && !w2.config.tooltip.intersect) markerClasses += \" no-pointer-events\";\n            const shouldMarkerDraw = Array.isArray(w2.config.markers.size) ? w2.globals.markers.size[seriesIndex] > 0 : w2.config.markers.size > 0;\n            if (shouldMarkerDraw || alwaysDrawMarker || hasDiscreteMarkers) {\n                if (emit.kind === \"canvas\") {\n                    if (typeof w2.globals.pointsArray[seriesIndex] === \"undefined\") w2.globals.pointsArray[seriesIndex] = [];\n                    w2.globals.pointsArray[seriesIndex][dataPointIndex] = [\n                        p2.x[q],\n                        p2.y[q]\n                    ];\n                }\n                if (!invalidMarker) markerClasses += ` w${$e4b487e979d7c06d$var$Utils$1.randomId()}`;\n                const opts = this.getMarkerConfig({\n                    cssClass: markerClasses,\n                    seriesIndex: seriesIndex,\n                    dataPointIndex: dataPointIndex\n                });\n                const _si = /** @type {Record<string,any>} */ w2.config.series[i2];\n                if (_si.data[dataPointIndex]) {\n                    if (_si.data[dataPointIndex].fillColor) opts.pointFillColor = _si.data[dataPointIndex].fillColor;\n                    if (_si.data[dataPointIndex].strokeColor) opts.pointStrokeColor = _si.data[dataPointIndex].strokeColor;\n                }\n                if (typeof pSize !== \"undefined\") opts.pSize = pSize;\n                if (p2.x[q] < -w2.globals.markers.largestSize || p2.x[q] > w2.layout.gridWidth + w2.globals.markers.largestSize || p2.y[q] < -w2.globals.markers.largestSize || p2.y[q] > w2.layout.gridHeight + w2.globals.markers.largestSize) opts.pSize = 0;\n                if (!invalidMarker) {\n                    const shouldCreateMarkerWrap = w2.globals.markers.size[seriesIndex] > 0 || alwaysDrawMarker || hasDiscreteMarkers;\n                    if (shouldCreateMarkerWrap && !elMarkersWrap) {\n                        const standardWrap = !alwaysDrawMarker && !hasDiscreteMarkers;\n                        if (standardWrap && this._seriesWrap && this._seriesWrapIndex === seriesIndex) elMarkersWrap = this._seriesWrap;\n                        else {\n                            elMarkersWrap = emit.group({\n                                class: standardWrap ? \"apexcharts-series-markers\" : \"\"\n                            });\n                            elMarkersWrap.attr(\"clip-path\", `url(#gridRectMarkerMask${w2.globals.cuid})`);\n                            this.setupMarkerDelegation(elMarkersWrap);\n                            if (standardWrap) {\n                                this._seriesWrap = elMarkersWrap;\n                                this._seriesWrapIndex = seriesIndex;\n                            }\n                        }\n                    }\n                    markerElement = emit.drawMarker(p2.x[q], p2.y[q], opts);\n                    markerElement.attr(\"rel\", dataPointIndex);\n                    markerElement.attr(\"j\", dataPointIndex);\n                    markerElement.attr(\"index\", seriesIndex);\n                    markerElement.node.setAttribute(\"default-marker-size\", opts.pSize);\n                    $e4b487e979d7c06d$var$applyProgressiveReveal(markerElement, p2.x[q], w2);\n                    this._filters.setSelectionFilter(markerElement, seriesIndex, dataPointIndex);\n                    if (elMarkersWrap) elMarkersWrap.add(markerElement);\n                }\n            } else {\n                if (typeof w2.globals.pointsArray[seriesIndex] === \"undefined\") w2.globals.pointsArray[seriesIndex] = [];\n                w2.globals.pointsArray[seriesIndex].push([\n                    p2.x[q],\n                    p2.y[q]\n                ]);\n            }\n        }\n        return elMarkersWrap;\n    }\n    /** @param {{cssClass: any, seriesIndex: any, dataPointIndex?: any, radius?: any, size?: any, strokeWidth?: any}} opts */ getMarkerConfig({ cssClass: cssClass, seriesIndex: seriesIndex, dataPointIndex: dataPointIndex = null, radius: radius = null, size: size = null, strokeWidth: strokeWidth = null }) {\n        const w2 = this.w;\n        const pStyle = this.getMarkerStyle(seriesIndex);\n        let pSize = size === null ? w2.globals.markers.size[seriesIndex] : size;\n        const m2 = w2.config.markers;\n        if (dataPointIndex !== null && m2.discrete.length) m2.discrete.map((marker)=>{\n            if (marker.seriesIndex === seriesIndex && marker.dataPointIndex === dataPointIndex) {\n                if (marker.strokeColor !== void 0) pStyle.pointStrokeColor = marker.strokeColor;\n                if (marker.fillColor !== void 0) pStyle.pointFillColor = marker.fillColor;\n                if (marker.size !== void 0) pSize = marker.size;\n                if (marker.shape !== void 0) pStyle.pointShape = marker.shape;\n            }\n        });\n        return {\n            pSize: radius === null ? pSize : radius,\n            pRadius: radius !== null ? radius : m2.radius,\n            pointStrokeWidth: strokeWidth !== null ? strokeWidth : Array.isArray(m2.strokeWidth) ? m2.strokeWidth[seriesIndex] : m2.strokeWidth,\n            pointStrokeColor: pStyle.pointStrokeColor,\n            pointFillColor: pStyle.pointFillColor,\n            shape: pStyle.pointShape || (Array.isArray(m2.shape) ? m2.shape[seriesIndex] : m2.shape),\n            class: cssClass,\n            pointStrokeOpacity: Array.isArray(m2.strokeOpacity) ? m2.strokeOpacity[seriesIndex] : m2.strokeOpacity,\n            pointStrokeDashArray: Array.isArray(m2.strokeDashArray) ? m2.strokeDashArray[seriesIndex] : m2.strokeDashArray,\n            pointFillOpacity: Array.isArray(m2.fillOpacity) ? m2.fillOpacity[seriesIndex] : m2.fillOpacity,\n            seriesIndex: seriesIndex\n        };\n    }\n    /**\n   * @param {any} parentGroup\n   */ setupMarkerDelegation(parentGroup) {\n        const w2 = this.w;\n        const selector = \".apexcharts-marker\";\n        this._graphics.setupEventDelegation(parentGroup, selector);\n        parentGroup.node.addEventListener(\"click\", (e2)=>{\n            if (w2.config.markers.onClick) {\n                const targetNode = $e4b487e979d7c06d$var$Graphics._findDelegateTarget(e2.target, parentGroup.node, selector);\n                if (targetNode) w2.config.markers.onClick(e2);\n            }\n        });\n        parentGroup.node.addEventListener(\"dblclick\", (e2)=>{\n            if (w2.config.markers.onDblClick) {\n                const targetNode = $e4b487e979d7c06d$var$Graphics._findDelegateTarget(e2.target, parentGroup.node, selector);\n                if (targetNode) w2.config.markers.onDblClick(e2);\n            }\n        });\n        parentGroup.node.addEventListener(\"touchstart\", (e2)=>{\n            const targetNode = $e4b487e979d7c06d$var$Graphics._findDelegateTarget(e2.target, parentGroup.node, selector);\n            if (targetNode && targetNode.instance) this._graphics.pathMouseDown(targetNode.instance, e2);\n        }, {\n            passive: true\n        });\n    }\n    /**\n   * @returns {any}\n   * @param {number} seriesIndex\n   */ getMarkerStyle(seriesIndex) {\n        const w2 = this.w;\n        const colors = w2.globals.markers.colors;\n        const strokeColors = w2.config.markers.strokeColor || w2.config.markers.strokeColors;\n        const pointStrokeColor = Array.isArray(strokeColors) ? strokeColors[seriesIndex] : strokeColors;\n        const pointFillColor = Array.isArray(colors) ? colors[seriesIndex] : colors;\n        return {\n            pointStrokeColor: pointStrokeColor,\n            pointFillColor: pointFillColor\n        };\n    }\n}\nclass $e4b487e979d7c06d$var$Scatter {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.ctx = ctx;\n        this.w = w2;\n        this.initialAnim = this.w.config.chart.animations.enabled;\n        this.anim = new $e4b487e979d7c06d$var$Animations(this.w);\n        this.filters = new $e4b487e979d7c06d$var$Filters(this.w);\n        this.fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        this.markers = new $e4b487e979d7c06d$var$Markers(this.w, this.ctx);\n        this.graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        this._elPointsWrap = null;\n        this._elPointsWrapParent = null;\n        this._perSeries = null;\n    }\n    /**\n   * @param {Element} elSeries\n   * @param {number} j\n   * @param {Record<string, any>} opts\n   */ draw(elSeries, j, opts) {\n        const w2 = this.w;\n        const graphics = this.graphics;\n        const emit = $e4b487e979d7c06d$var$seriesEmitter(this.ctx, graphics);\n        const realIndex = opts.realIndex;\n        const pointsPos = opts.pointsPos;\n        const zRatio = opts.zRatio;\n        const elPointsMain = opts.elParent;\n        let elPointsWrap = this._elPointsWrap;\n        if (!elPointsWrap || this._elPointsWrapParent !== elPointsMain) {\n            elPointsWrap = emit.group({\n                class: `apexcharts-series-markers apexcharts-series-${w2.config.chart.type}`\n            });\n            elPointsWrap.attr(\"clip-path\", `url(#gridRectMarkerMask${w2.globals.cuid})`);\n            this.markers.setupMarkerDelegation(elPointsWrap);\n            elPointsMain.add(elPointsWrap);\n            this._elPointsWrap = elPointsWrap;\n            this._elPointsWrapParent = elPointsMain;\n            this._perSeries = this._buildPerSeriesCache(realIndex, emit);\n        }\n        if (Array.isArray(pointsPos.x)) for(let q = 0; q < pointsPos.x.length; q++){\n            let dataPointIndex = j + 1;\n            let shouldDraw = true;\n            if (j === 0 && q === 0) dataPointIndex = 0;\n            if (j === 0 && q === 1) dataPointIndex = 1;\n            let radius = w2.globals.markers.size[realIndex];\n            if (zRatio !== Infinity) {\n                const bubble = w2.config.plotOptions.bubble;\n                radius = w2.seriesData.seriesZ[realIndex][dataPointIndex];\n                if (bubble.zScaling) radius /= zRatio;\n                if (bubble.minBubbleRadius && radius < bubble.minBubbleRadius) radius = bubble.minBubbleRadius;\n                if (bubble.maxBubbleRadius && radius > bubble.maxBubbleRadius) radius = bubble.maxBubbleRadius;\n            }\n            const x = pointsPos.x[q];\n            const y = pointsPos.y[q];\n            radius = radius || 0;\n            if (y === null || typeof w2.seriesData.series[realIndex][dataPointIndex] === \"undefined\") shouldDraw = false;\n            if (shouldDraw) {\n                const point = this.drawPoint(x, y, radius, realIndex, dataPointIndex, j);\n                elPointsWrap.add(point);\n                if (emit.kind === \"canvas\") {\n                    if (typeof w2.globals.pointsArray[realIndex] === \"undefined\") w2.globals.pointsArray[realIndex] = [];\n                    w2.globals.pointsArray[realIndex][dataPointIndex] = [\n                        x,\n                        y\n                    ];\n                }\n            }\n        }\n    }\n    /**\n   * Per-series constants for drawPoint's hot path. Everything here is uniform\n   * across the points of one series; computing or allocating it per point is\n   * measurable overhead at 20k-50k points.\n   * @param {number} realIndex\n   * @param {any} emit\n   */ _buildPerSeriesCache(realIndex, emit) {\n        var _a;\n        const w2 = this.w;\n        return {\n            realIndex: realIndex,\n            emit: emit,\n            isBubble: w2.config.chart.type === \"bubble\" || w2.globals.comboCharts && w2.config.series[realIndex] && /** @type {Record<string,any>} */ w2.config.series[realIndex].type === \"bubble\",\n            // discrete markers vary per point; they disable both caches below\n            canCacheConfig: !w2.config.markers.discrete.length,\n            /** @type {any} lazily built shared marker config (first point) */ markerConfig: null,\n            /** @type {boolean|undefined} lazily resolved on the first fillPath call */ fillCacheable: void 0,\n            /** @type {any} cached fillPath result (undefined = not cached yet) */ fillCircle: void 0,\n            dropShadowEnabled: w2.config.chart.dropShadow.enabled,\n            doInitialAnim: this.initialAnim && !w2.globals.dataChanged && !w2.globals.resized,\n            jitter: (_a = w2.config.plotOptions.scatter) == null ? void 0 : _a.jitter,\n            /** @type {any} lazily built pop-animation constants */ anim: null\n        };\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   * @param {number} radius\n   * @param {number} realIndex\n   * @param {number} dataPointIndex\n   * @param {number} j\n   */ drawPoint(x, y, radius, realIndex, dataPointIndex, j) {\n        var _a;\n        const w2 = this.w;\n        const i2 = realIndex;\n        const anim = this.anim;\n        const filters = this.filters;\n        const fill = this.fill;\n        const markers = this.markers;\n        let ps = this._perSeries;\n        if (!ps || ps.realIndex !== realIndex) ps = this._perSeries = this._buildPerSeriesCache(realIndex, $e4b487e979d7c06d$var$seriesEmitter(this.ctx, this.graphics));\n        const emit = ps.emit;\n        let markerConfig;\n        if (ps.canCacheConfig) {\n            if (!ps.markerConfig) ps.markerConfig = markers.getMarkerConfig({\n                cssClass: \"apexcharts-marker\",\n                seriesIndex: i2,\n                dataPointIndex: dataPointIndex,\n                radius: ps.isBubble ? radius : null\n            });\n            markerConfig = ps.markerConfig;\n            if (ps.isBubble) {\n                markerConfig.pSize = radius;\n                markerConfig.pRadius = radius;\n            }\n        } else markerConfig = markers.getMarkerConfig({\n            cssClass: \"apexcharts-marker\",\n            seriesIndex: i2,\n            dataPointIndex: dataPointIndex,\n            radius: ps.isBubble ? radius : null\n        });\n        const _si = /** @type {Record<string,any>} */ w2.config.series[i2];\n        const dataItem = _si.data[dataPointIndex];\n        let pathFillCircle;\n        if (ps.fillCircle !== void 0) pathFillCircle = ps.fillCircle;\n        else {\n            pathFillCircle = fill.fillPath({\n                seriesNumber: realIndex,\n                dataPointIndex: dataPointIndex,\n                color: markerConfig.pointFillColor,\n                patternUnits: \"objectBoundingBox\",\n                value: w2.seriesData.series[realIndex][j]\n            });\n            if (ps.fillCacheable === void 0) ps.fillCacheable = ps.canCacheConfig && fill.getFillType(realIndex) === \"solid\" && typeof markerConfig.pointFillColor === \"string\" && !!markerConfig.pointFillColor;\n            if (ps.fillCacheable && !(dataItem == null ? void 0 : dataItem.fillColor)) ps.fillCircle = pathFillCircle;\n        }\n        const el = emit.drawMarker(x, y, markerConfig);\n        if (dataItem == null ? void 0 : dataItem.fillColor) pathFillCircle = dataItem.fillColor;\n        const jt = ps.jitter;\n        if ((jt == null ? void 0 : jt.enabled) && jt.distributed && w2.globals.colors.length) {\n            const bandIdx = Math.round((_a = w2.seriesData.seriesX[realIndex]) == null ? void 0 : _a[dataPointIndex]);\n            if (!isNaN(bandIdx)) pathFillCircle = w2.globals.colors[bandIdx % w2.globals.colors.length];\n        }\n        el.attr({\n            fill: pathFillCircle\n        });\n        if (ps.dropShadowEnabled) {\n            const dropShadow = w2.config.chart.dropShadow;\n            filters.dropShadow(el, dropShadow, realIndex);\n        }\n        if (ps.doInitialAnim) {\n            if (!ps.anim) {\n                const animCfg = w2.config.chart.animations;\n                const totalPoints = w2.globals.dataPoints || 1;\n                const gradCfg = animCfg.animateGradually;\n                const gradEnabled = gradCfg && gradCfg.enabled !== false;\n                ps.anim = {\n                    popSpeed: animCfg.speed,\n                    baseDelay: gradEnabled ? Math.min(20, animCfg.speed * 0.5 / Math.max(1, totalPoints)) : 0\n                };\n            }\n            const delay = $e4b487e979d7c06d$var$computeStagger({\n                style: ps.anim.baseDelay > 0 ? \"sequential\" : \"none\",\n                index: dataPointIndex,\n                baseDelay: ps.anim.baseDelay\n            });\n            anim.animatePop(el, {\n                speed: ps.anim.popSpeed,\n                delay: delay,\n                onComplete: ()=>anim.animationCompleted(el)\n            });\n        } else w2.globals.animationEnded = true;\n        el.attr({\n            rel: dataPointIndex,\n            j: dataPointIndex,\n            index: realIndex,\n            \"default-marker-size\": markerConfig.pSize\n        });\n        filters.setSelectionFilter(el, realIndex, dataPointIndex);\n        return el;\n    }\n    /**\n   * @param {number} y\n   */ centerTextInBubble(y) {\n        const w2 = this.w;\n        y = y + parseInt(w2.config.dataLabels.style.fontSize, 10) / 4;\n        return {\n            y: y\n        };\n    }\n}\nconst $e4b487e979d7c06d$var$resolveDataLabelOffset = (value, w2, seriesIndex, dataPointIndex)=>{\n    if (typeof value !== \"function\") return value;\n    const resolved = value({\n        series: w2.seriesData.series,\n        seriesIndex: seriesIndex,\n        dataPointIndex: dataPointIndex,\n        w: w2\n    });\n    return Number.isFinite(resolved) ? resolved : 0;\n};\nclass $e4b487e979d7c06d$var$DataLabels {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext | null} ctx\n   */ constructor(w2, ctx = null){\n        this.w = w2;\n        this.ctx = ctx;\n    }\n    // When there are many datalabels to be printed, and some of them overlaps each other in the same series, this method will take care of that\n    // Also, when datalabels exceeds the drawable area and get clipped off, we need to adjust and move some pixels to make them visible again\n    /**\n   * @param {number} x\n   * @param {number} y\n   * @param {any} val\n   * @param {number} i\n   * @param {number} dataPointIndex\n   * @param {boolean} alwaysDrawDataLabel\n   * @param {string} fontSize\n   */ dataLabelsCorrection(x, y, val, i2, dataPointIndex, alwaysDrawDataLabel, fontSize) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        let drawnextLabel = false;\n        const textRects = /** @type {any} */ graphics.getTextRects(val, fontSize);\n        const width = textRects.width;\n        const height = textRects.height;\n        if (y < 0) y = 0;\n        if (y > w2.layout.gridHeight + height) y = w2.layout.gridHeight + height / 2;\n        if (typeof /** @type {any} */ w2.globals.dataLabelsRects[i2] === \"undefined\") w2.globals.dataLabelsRects[i2] = [];\n        w2.globals.dataLabelsRects[i2].push({\n            x: x,\n            y: y,\n            width: width,\n            height: height\n        });\n        const len = /** @type {any} */ w2.globals.dataLabelsRects[i2].length - 2;\n        const lastDrawnIndex = typeof w2.globals.lastDrawnDataLabelsIndexes[i2] !== \"undefined\" ? w2.globals.lastDrawnDataLabelsIndexes[i2][w2.globals.lastDrawnDataLabelsIndexes[i2].length - 1] : 0;\n        if (typeof /** @type {any} */ w2.globals.dataLabelsRects[i2][len] !== \"undefined\") {\n            const lastDataLabelRect = /** @type {any} */ w2.globals.dataLabelsRects[i2][lastDrawnIndex];\n            if (// next label forward and x not intersecting\n            x > lastDataLabelRect.x + lastDataLabelRect.width || y > lastDataLabelRect.y + lastDataLabelRect.height || y + height < lastDataLabelRect.y || x + width < lastDataLabelRect.x) drawnextLabel = true;\n        }\n        if (dataPointIndex === 0 || alwaysDrawDataLabel) drawnextLabel = true;\n        return {\n            x: x,\n            y: y,\n            textRects: textRects,\n            drawnextLabel: drawnextLabel\n        };\n    }\n    /** @param {{type: any, pos: any, i: any, j: any, isRangeStart: any, strokeWidth?: any}} opts */ drawDataLabel({ type: type, pos: pos, i: i2, j: j, isRangeStart: isRangeStart, strokeWidth: strokeWidth = 2 }) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const dataLabelsConfig = w2.config.dataLabels;\n        let x = 0;\n        let y = 0;\n        let dataPointIndex = j;\n        let elDataLabelsWrap = null;\n        const seriesCollapsed = w2.globals.collapsedSeriesIndices.indexOf(i2) !== -1;\n        if (seriesCollapsed || !dataLabelsConfig.enabled || !Array.isArray(pos.x)) return elDataLabelsWrap;\n        elDataLabelsWrap = graphics.group({\n            class: \"apexcharts-data-labels\"\n        });\n        for(let q = 0; q < pos.x.length; q++){\n            if (j === 1 && q === 0) dataPointIndex = 0;\n            if (j === 1 && q === 1) dataPointIndex = 1;\n            x = pos.x[q] + $e4b487e979d7c06d$var$resolveDataLabelOffset(dataLabelsConfig.offsetX, w2, i2, dataPointIndex);\n            y = pos.y[q] + $e4b487e979d7c06d$var$resolveDataLabelOffset(dataLabelsConfig.offsetY, w2, i2, dataPointIndex) + strokeWidth;\n            if (!isNaN(x)) {\n                let val = w2.seriesData.series[i2][dataPointIndex];\n                if (type === \"rangeArea\") {\n                    if (isRangeStart) val = w2.rangeData.seriesRangeStart[i2][dataPointIndex];\n                    else val = w2.rangeData.seriesRangeEnd[i2][dataPointIndex];\n                }\n                let text = \"\";\n                const getText = (v2)=>{\n                    return w2.config.dataLabels.formatter(v2, {\n                        seriesIndex: i2,\n                        dataPointIndex: dataPointIndex,\n                        w: w2\n                    });\n                };\n                if (w2.config.chart.type === \"bubble\") {\n                    val = w2.seriesData.seriesZ[i2][dataPointIndex];\n                    text = getText(val);\n                    y = pos.y[q];\n                    const scatter = new $e4b487e979d7c06d$var$Scatter(this.w, /** @type {import('../types/internal').ChartContext} */ this.ctx);\n                    const centerTextInBubbleCoords = scatter.centerTextInBubble(y);\n                    y = centerTextInBubbleCoords.y;\n                } else if (typeof val !== \"undefined\") text = getText(val);\n                let textAnchor = w2.config.dataLabels.textAnchor;\n                if (w2.globals.isSlopeChart) {\n                    if (dataPointIndex === 0) textAnchor = \"end\";\n                    else if (dataPointIndex === /** @type {Record<string,any>} */ w2.config.series[i2].data.length - 1) textAnchor = \"start\";\n                    else textAnchor = \"middle\";\n                }\n                this.plotDataLabelsText({\n                    x: x,\n                    y: y,\n                    text: text,\n                    i: i2,\n                    j: dataPointIndex,\n                    parent: elDataLabelsWrap,\n                    offsetCorrection: true,\n                    dataLabelsConfig: w2.config.dataLabels,\n                    textAnchor: textAnchor\n                });\n            }\n        }\n        return elDataLabelsWrap;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ plotDataLabelsText(opts) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        let { x: x, y: y, i: i2, j: j, text: text, textAnchor: textAnchor, fontSize: fontSize, parent: parent, dataLabelsConfig: dataLabelsConfig, color: color, alwaysDrawDataLabel: alwaysDrawDataLabel, offsetCorrection: offsetCorrection, className: className, seriesIndex: // some callers (radar) reuse `j` for something other than the data point\n        // index, so per-point offsets take these explicit indices when supplied\n        seriesIndex = i2, dataPointIndex: dataPointIndex = j } = opts;\n        let dataLabelText = null;\n        if (Array.isArray(w2.config.dataLabels.enabledOnSeries)) {\n            if (w2.config.dataLabels.enabledOnSeries.indexOf(i2) < 0) return dataLabelText;\n        }\n        let correctedLabels = {\n            x: x,\n            y: y,\n            drawnextLabel: true,\n            textRects: null\n        };\n        if (offsetCorrection) correctedLabels = this.dataLabelsCorrection(x, y, text, i2, j, alwaysDrawDataLabel, parseInt(/** @type {any} */ dataLabelsConfig.style.fontSize, 10).toString());\n        if (!w2.interact.zoomed) {\n            x = correctedLabels.x;\n            y = correctedLabels.y;\n        }\n        if (correctedLabels.textRects) {\n            const barPad = w2.globals.barPadForNumericAxis || 0;\n            if (x < -(barPad + 20) - /** @type {any} */ correctedLabels.textRects.width || x > w2.layout.gridWidth + /** @type {any} */ correctedLabels.textRects.width + barPad + 30) text = \"\";\n        }\n        let dataLabelColor = w2.globals.dataLabels.style.colors[i2];\n        if ((w2.config.chart.type === \"bar\" || w2.config.chart.type === \"rangeBar\") && w2.config.plotOptions.bar.distributed || w2.config.dataLabels.distributed) dataLabelColor = w2.globals.dataLabels.style.colors[j];\n        if (typeof dataLabelColor === \"function\") dataLabelColor = /** @type {any} */ dataLabelColor({\n            series: w2.seriesData.series,\n            seriesIndex: i2,\n            dataPointIndex: j,\n            w: w2\n        });\n        if (color) dataLabelColor = color;\n        const offsetsHandledElsewhere = w2.config.chart.type === \"bar\" || w2.config.chart.type === \"rangeBar\";\n        const resolvedOffX = offsetsHandledElsewhere ? 0 : $e4b487e979d7c06d$var$resolveDataLabelOffset(dataLabelsConfig.offsetX, w2, seriesIndex, dataPointIndex);\n        const resolvedOffY = offsetsHandledElsewhere ? 0 : $e4b487e979d7c06d$var$resolveDataLabelOffset(dataLabelsConfig.offsetY, w2, seriesIndex, dataPointIndex);\n        let offX = resolvedOffX;\n        const offY = resolvedOffY;\n        if (w2.globals.isSlopeChart) {\n            if (j !== 0) offX = resolvedOffX * -2 + 5;\n            if (j !== 0 && j !== /** @type {Record<string,any>} */ w2.config.series[i2].data.length - 1) offX = 0;\n        }\n        if (correctedLabels.drawnextLabel) {\n            if (textAnchor === \"middle\") {\n                if (x === w2.layout.gridWidth) textAnchor = \"end\";\n            }\n            dataLabelText = graphics.drawText({\n                x: x + offX,\n                y: y + offY,\n                foreColor: dataLabelColor,\n                textAnchor: textAnchor || dataLabelsConfig.textAnchor,\n                text: text,\n                fontSize: fontSize || dataLabelsConfig.style.fontSize,\n                fontFamily: dataLabelsConfig.style.fontFamily,\n                fontWeight: dataLabelsConfig.style.fontWeight || \"normal\"\n            });\n            dataLabelText.attr({\n                class: className || \"apexcharts-datalabel\",\n                cx: x,\n                cy: y\n            });\n            if (dataLabelsConfig.dropShadow.enabled) {\n                const textShadow = dataLabelsConfig.dropShadow;\n                const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n                filters.dropShadow(dataLabelText, textShadow);\n            }\n            parent.add(dataLabelText);\n            $e4b487e979d7c06d$var$applyProgressiveReveal(dataLabelText, x, w2);\n            if (typeof w2.globals.lastDrawnDataLabelsIndexes[i2] === \"undefined\") w2.globals.lastDrawnDataLabelsIndexes[i2] = [];\n            w2.globals.lastDrawnDataLabelsIndexes[i2].push(j);\n        }\n        return dataLabelText;\n    }\n    /**\n   * @param {Element} el\n   * @param {{x: number, y: number, width: number, height: number}} coords\n   */ addBackgroundToDataLabel(el, coords) {\n        const w2 = this.w;\n        const bCnf = w2.config.dataLabels.background;\n        const paddingH = bCnf.padding;\n        const paddingV = bCnf.padding / 2;\n        const width = coords.width;\n        const height = coords.height;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const elRect = graphics.drawRect(coords.x - paddingH, coords.y - paddingV / 2, width + paddingH * 2, height + paddingV, bCnf.borderRadius, w2.config.chart.background === \"transparent\" || !w2.config.chart.background ? \"#fff\" : w2.config.chart.background, bCnf.opacity, bCnf.borderWidth, bCnf.borderColor);\n        if (bCnf.dropShadow.enabled) {\n            const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n            filters.dropShadow(elRect, bCnf.dropShadow);\n        }\n        return elRect;\n    }\n    dataLabelsBackground() {\n        var _a;\n        const w2 = this.w;\n        if (w2.config.chart.type === \"bubble\") return;\n        const elDataLabels = w2.dom.baseEl.querySelectorAll(\".apexcharts-datalabels text\");\n        for(let i2 = 0; i2 < elDataLabels.length; i2++){\n            const el = elDataLabels[i2];\n            const coords = /** @type {SVGGraphicsElement} */ el.getBBox();\n            let elRect = null;\n            if (coords.width && coords.height) elRect = this.addBackgroundToDataLabel(el, coords);\n            if (elRect) {\n                (_a = el.parentNode) == null || _a.insertBefore(elRect.node, el);\n                const background = w2.config.dataLabels.background.backgroundColor || el.getAttribute(\"fill\");\n                const shouldAnim = w2.config.chart.animations.enabled && !w2.globals.resized && !w2.globals.dataChanged;\n                if (shouldAnim) elRect.animate().attr({\n                    fill: background\n                });\n                else elRect.attr({\n                    fill: background\n                });\n                el.setAttribute(\"fill\", w2.config.dataLabels.background.foreColor);\n                const cxAttr = el.getAttribute(\"cx\");\n                if (cxAttr !== null) $e4b487e979d7c06d$var$applyProgressiveReveal(elRect, parseFloat(cxAttr), w2);\n            }\n        }\n    }\n    bringForward() {\n        const w2 = this.w;\n        const elDataLabelsNodes = w2.dom.baseEl.querySelectorAll(\".apexcharts-datalabels\");\n        const elSeries = w2.dom.baseEl.querySelector(\".apexcharts-plot-series:last-child\");\n        for(let i2 = 0; i2 < elDataLabelsNodes.length; i2++)if (elSeries) elSeries.insertBefore(elDataLabelsNodes[i2], elSeries.nextSibling);\n    }\n}\nclass $e4b487e979d7c06d$var$PerformanceCache {\n    /**\n   * Invalidate all caches\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   */ static invalidateAll(w2) {\n        if (!w2 || !w2.globals) return;\n        if (w2.globals.cachedSelectors) w2.globals.cachedSelectors = {};\n        if (w2.globals.domCache) w2.globals.domCache.clear();\n        w2.globals.dimensionCache = {};\n    }\n    /**\n   * Invalidate dimension cache only\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   */ static invalidateDimensions(w2) {\n        if (!w2 || !w2.globals) return;\n        w2.globals.dimensionCache = {};\n    }\n    /**\n   * Invalidate selector cache only\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   */ static invalidateSelectors(w2) {\n        if (!w2 || !w2.globals) return;\n        if (w2.globals.cachedSelectors) w2.globals.cachedSelectors = {};\n    }\n    /**\n   * Get cached selector result or compute and cache it\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   * @param {string} key - Cache key\n   * @param {Function} queryFn - Function to execute if not cached\n   * @returns {*} Cached or newly computed result\n   */ static getCachedSelector(w2, key, queryFn) {\n        if (!w2 || !w2.globals) return queryFn();\n        if (!w2.globals.cachedSelectors) w2.globals.cachedSelectors = {};\n        if (!w2.globals.cachedSelectors[key]) w2.globals.cachedSelectors[key] = queryFn();\n        return w2.globals.cachedSelectors[key];\n    }\n    /**\n   * Get cached dimension or compute and cache it\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   * @param {string} key - Cache key\n   * @param {Function} computeFn - Function to compute dimensions\n   * @param {number} maxAge - Maximum cache age in milliseconds (default: 1000ms)\n   * @returns {*} Cached or newly computed dimensions\n   */ static getCachedDimension(w2, key, computeFn, maxAge = 1e3) {\n        if (!w2 || !w2.globals) return computeFn();\n        if (!w2.globals.dimensionCache) w2.globals.dimensionCache = {};\n        const cache = w2.globals.dimensionCache[key];\n        const now = Date.now();\n        if (cache && cache.lastUpdate && now - cache.lastUpdate < maxAge) return cache.value;\n        const value = computeFn();\n        w2.globals.dimensionCache[key] = {\n            value: value,\n            lastUpdate: now\n        };\n        return value;\n    }\n    /**\n   * Cache a DOM element reference\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   * @param {string} key - Cache key\n   * @param {Element} element - DOM element to cache\n   */ static cacheDOMElement(w2, key, element) {\n        if (!w2 || !w2.globals) return;\n        if (!w2.globals.domCache) w2.globals.domCache = /* @__PURE__ */ new Map();\n        w2.globals.domCache.set(key, element);\n    }\n    /**\n   * Get cached DOM element\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   * @param {string} key - Cache key\n   * @returns {Element|null} Cached element or null\n   */ static getCachedDOMElement(w2, key) {\n        if (!w2 || !w2.globals || !w2.globals.domCache) return null;\n        return w2.globals.domCache.get(key) || null;\n    }\n}\nclass $e4b487e979d7c06d$var$AxesUtils {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   */ constructor(w2, { theme: theme = null, timeScale: timeScale = null } = {}){\n        this.w = w2;\n        this.theme = theme;\n        this.timeScale = timeScale;\n    }\n    // Based on the formatter function, get the label text and position\n    /**\n   * @param {any[]} labels\n   * @param {Array<Record<string, any>>} timescaleLabels\n   * @param {number} x\n   * @param {number} i\n   * @param {any[]} drawnLabels\n   */ getLabel(labels, timescaleLabels, x, i2, drawnLabels = [], fontSize = \"12px\", isLeafGroup = true) {\n        const w2 = this.w;\n        const rawLabel = typeof labels[i2] === \"undefined\" ? \"\" : labels[i2];\n        let label = rawLabel;\n        const xlbFormatter = w2.formatters.xLabelFormatter;\n        const customFormatter = w2.config.xaxis.labels.formatter;\n        const xFormat = new $e4b487e979d7c06d$var$Formatters(this.w);\n        const timestamp = rawLabel;\n        if (isLeafGroup) {\n            label = /** @type {any} */ xFormat.xLabelFormat(xlbFormatter, rawLabel, timestamp, {\n                i: i2,\n                dateFormatter: new $e4b487e979d7c06d$var$DateTime(this.w).formatDate,\n                w: w2\n            });\n            if (customFormatter !== void 0) label = customFormatter(rawLabel, labels[i2], {\n                i: i2,\n                dateFormatter: new $e4b487e979d7c06d$var$DateTime(this.w).formatDate,\n                w: w2\n            });\n        }\n        if (timescaleLabels.length > 0) {\n            x = timescaleLabels[i2].position;\n            label = timescaleLabels[i2].value;\n        } else if (w2.config.xaxis.type === \"datetime\" && customFormatter === void 0) label = \"\";\n        if (typeof label === \"undefined\") label = \"\";\n        label = Array.isArray(label) ? label : label.toString();\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        let textRect = {};\n        if (w2.layout.rotateXLabels && isLeafGroup) textRect = graphics.getTextRects(label, parseInt(fontSize, 10).toString(), null, `rotate(${w2.config.xaxis.labels.rotate} 0 0)`, false);\n        else textRect = graphics.getTextRects(label, parseInt(fontSize, 10).toString());\n        const allowDuplicatesInTimeScale = !w2.config.xaxis.labels.showDuplicates && this.timeScale;\n        if (!Array.isArray(label) && (String(label) === \"NaN\" || drawnLabels.indexOf(label) >= 0 && allowDuplicatesInTimeScale)) label = \"\";\n        return {\n            x: x,\n            text: label,\n            textRect: textRect\n        };\n    }\n    /**\n   * @param {number} i\n   * @param {any} label\n   * @param {number} labelsLen\n   */ checkLabelBasedOnTickamount(i2, label, labelsLen) {\n        const w2 = this.w;\n        let ticks = w2.config.xaxis.tickAmount;\n        if (ticks === \"dataPoints\") ticks = Math.round(w2.layout.gridWidth / 120);\n        if (ticks > labelsLen) return label;\n        const tickMultiple = Math.round(labelsLen / (ticks + 1));\n        if (i2 % tickMultiple === 0) return label;\n        else label.text = \"\";\n        return label;\n    }\n    /**\n   * @param {number} i\n   * @param {any} label\n   * @param {number} labelsLen\n   * @param {any[]} drawnLabels\n   * @param {Array<Record<string, any>>} drawnLabelsRects\n   */ checkForOverflowingLabels(i2, label, labelsLen, drawnLabels, drawnLabelsRects) {\n        const w2 = this.w;\n        if (i2 === 0) {\n            if (w2.globals.skipFirstTimelinelabel) label.text = \"\";\n        }\n        if (i2 === labelsLen - 1) {\n            if (w2.globals.skipLastTimelinelabel) label.text = \"\";\n        }\n        if (w2.config.xaxis.labels.hideOverlappingLabels && drawnLabels.length > 0) {\n            const prev = drawnLabelsRects[drawnLabelsRects.length - 1];\n            if (w2.config.xaxis.labels.trim && w2.config.xaxis.type !== \"datetime\") return label;\n            if (/** @type {any} */ label.x < prev.textRect.width / (w2.layout.rotateXLabels ? // Floor the rotation at 1deg: rotateAlways:true forces\n            // rotateXLabels even with rotate:0, and a 0 divisor here makes the\n            // spread Infinity, blanking every label after the first.\n            Math.max(Math.abs(w2.config.xaxis.labels.rotate), 1) / 12 : 1.01) + prev.x) label.text = \"\";\n        }\n        return label;\n    }\n    /**\n   * @param {number} i\n   * @param {any[]} labels\n   */ checkForReversedLabels(i2, labels) {\n        const w2 = this.w;\n        if (w2.config.yaxis[i2] && w2.config.yaxis[i2].reversed) labels.reverse();\n        return labels;\n    }\n    /**\n   * @param {number} index\n   */ yAxisAllSeriesCollapsed(index) {\n        const gl = this.w.globals;\n        return !gl.seriesYAxisMap[index].some((si)=>{\n            return gl.collapsedSeriesIndices.indexOf(si) === -1;\n        });\n    }\n    // Method to translate annotation.yAxisIndex values from\n    // seriesName-as-a-string values to seriesName-as-an-array values (old style\n    // series mapping to new style).\n    /**\n   * @param {number} index\n   */ translateYAxisIndex(index) {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const yaxis = w2.config.yaxis;\n        const newStyle = w2.seriesData.series.length > yaxis.length || /**\n     * @param {Record<string, any>} a\n     */ yaxis.some((a2)=>Array.isArray(a2.seriesName));\n        if (newStyle) return index;\n        else return gl.seriesYAxisReverseMap[index];\n    }\n    /**\n   * @param {number} index\n   */ isYAxisHidden(index) {\n        const w2 = this.w;\n        const yaxis = w2.config.yaxis[index];\n        if (!yaxis.show || this.yAxisAllSeriesCollapsed(index)) return true;\n        if (!yaxis.showForNullSeries) {\n            const seriesIndices = w2.globals.seriesYAxisMap[index];\n            const coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n            return seriesIndices.every((si)=>coreUtils.isSeriesNull(si));\n        }\n        return false;\n    }\n    // get the label color for y-axis\n    // realIndex is the actual series index, while i is the tick Index\n    /**\n   * @param {string[]} yColors\n   * @param {number} realIndex\n   */ getYAxisForeColor(yColors, realIndex) {\n        var _a;\n        const w2 = this.w;\n        if (Array.isArray(yColors) && w2.globals.yAxisScale[realIndex]) (_a = this.theme) == null || _a.pushExtraColors(yColors, w2.globals.yAxisScale[realIndex].result.length, false);\n        return yColors;\n    }\n    /**\n   * @param {number} x\n   * @param {number} tickAmount\n   * @param {Record<string, any>} axisBorder\n   * @param {Record<string, any>} axisTicks\n   * @param {number} realIndex\n   * @param {any} labelsDivider\n   * @param {any} elYaxis\n   */ drawYAxisTicks(x, tickAmount, axisBorder, axisTicks, realIndex, labelsDivider, elYaxis) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        let tY = w2.layout.translateY + w2.config.yaxis[realIndex].labels.offsetY;\n        if (w2.globals.isBarHorizontal) tY = 0;\n        else if (w2.config.chart.type === \"heatmap\") tY += labelsDivider / 2;\n        if (axisTicks.show && tickAmount > 0) {\n            if (w2.config.yaxis[realIndex].opposite === true) x = x + axisTicks.width;\n            for(let i2 = tickAmount; i2 >= 0; i2--){\n                const elTick = graphics.drawLine(x + axisBorder.offsetX - axisTicks.width + axisTicks.offsetX, tY + axisTicks.offsetY, x + axisBorder.offsetX + axisTicks.offsetX, tY + axisTicks.offsetY, axisTicks.color);\n                elYaxis.add(elTick);\n                tY += labelsDivider;\n            }\n        }\n    }\n}\nclass $e4b487e979d7c06d$var$XAxis {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   * @param {any} [elgrid]\n   */ constructor(w2, ctx, elgrid){\n        this.w = w2;\n        this.ctx = ctx;\n        this.elgrid = elgrid;\n        this.axesUtils = new $e4b487e979d7c06d$var$AxesUtils(w2, {\n            theme: ctx.theme,\n            timeScale: ctx.timeScale\n        });\n        this.xaxisLabels = w2.labelData.labels.slice();\n        if (w2.labelData.timescaleLabels.length > 0 && !w2.globals.isBarHorizontal) this.xaxisLabels = w2.labelData.timescaleLabels.slice();\n        if (w2.config.xaxis.overwriteCategories) this.xaxisLabels = w2.config.xaxis.overwriteCategories;\n        this.drawnLabels = [];\n        this.drawnLabelsRects = [];\n        if (w2.config.xaxis.position === \"top\") this.offY = 0;\n        else this.offY = w2.layout.gridHeight;\n        this.offY = this.offY + w2.config.xaxis.axisBorder.offsetY;\n        this.isCategoryBarHorizontal = w2.config.chart.type === \"bar\" && w2.config.plotOptions.bar.horizontal;\n        this.xaxisFontSize = w2.config.xaxis.labels.style.fontSize;\n        this.xaxisFontFamily = w2.config.xaxis.labels.style.fontFamily;\n        this.xaxisForeColors = w2.config.xaxis.labels.style.colors;\n        this.xaxisBorderWidth = w2.config.xaxis.axisBorder.width;\n        if (this.isCategoryBarHorizontal) this.xaxisBorderWidth = w2.config.yaxis[0].axisBorder.width.toString();\n        if (String(this.xaxisBorderWidth).indexOf(\"%\") > -1) this.xaxisBorderWidth = w2.layout.gridWidth * parseInt(this.xaxisBorderWidth, 10) / 100;\n        else this.xaxisBorderWidth = parseInt(this.xaxisBorderWidth, 10);\n        this.xaxisBorderHeight = w2.config.xaxis.axisBorder.height;\n        this.yaxis = w2.config.yaxis[0];\n    }\n    drawXaxis() {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const elXaxis = graphics.group({\n            class: \"apexcharts-xaxis\",\n            transform: `translate(${w2.config.xaxis.offsetX}, ${w2.config.xaxis.offsetY})`\n        });\n        const elXaxisTexts = graphics.group({\n            class: \"apexcharts-xaxis-texts-g\",\n            transform: `translate(${w2.layout.translateXAxisX}, ${w2.layout.translateXAxisY})`\n        });\n        elXaxis.add(elXaxisTexts);\n        let labels = [];\n        for(let i2 = 0; i2 < this.xaxisLabels.length; i2++)labels.push(this.xaxisLabels[i2]);\n        this.drawXAxisLabelAndGroup(true, graphics, elXaxisTexts, labels, w2.axisFlags.isXNumeric, (i2, colWidth)=>colWidth);\n        if (w2.labelData.hasXaxisGroups) {\n            const labelsGroup = w2.labelData.groups;\n            labels = [];\n            for(let i2 = 0; i2 < labelsGroup.length; i2++)labels.push(labelsGroup[i2].title);\n            const overwriteStyles = /** @type {any} */ {};\n            if (w2.config.xaxis.group.style) {\n                overwriteStyles.xaxisFontSize = w2.config.xaxis.group.style.fontSize;\n                overwriteStyles.xaxisFontFamily = w2.config.xaxis.group.style.fontFamily;\n                overwriteStyles.xaxisForeColors = w2.config.xaxis.group.style.colors;\n                overwriteStyles.fontWeight = w2.config.xaxis.group.style.fontWeight;\n                overwriteStyles.cssClass = w2.config.xaxis.group.style.cssClass;\n            }\n            this.drawXAxisLabelAndGroup(false, graphics, elXaxisTexts, labels, false, (i2, colWidth)=>labelsGroup[i2].cols * colWidth, overwriteStyles);\n        }\n        if (w2.config.xaxis.title.text !== void 0) {\n            const elXaxisTitle = graphics.group({\n                class: \"apexcharts-xaxis-title\"\n            });\n            const elXAxisTitleText = graphics.drawText({\n                x: w2.layout.gridWidth / 2 + w2.config.xaxis.title.offsetX,\n                y: this.offY + parseFloat(this.xaxisFontSize) + (w2.config.xaxis.position === \"bottom\" ? w2.layout.xAxisLabelsHeight : -w2.layout.xAxisLabelsHeight - 10) + w2.config.xaxis.title.offsetY,\n                text: w2.config.xaxis.title.text,\n                textAnchor: \"middle\",\n                fontSize: w2.config.xaxis.title.style.fontSize,\n                fontFamily: w2.config.xaxis.title.style.fontFamily,\n                fontWeight: w2.config.xaxis.title.style.fontWeight,\n                foreColor: w2.config.xaxis.title.style.color,\n                cssClass: \"apexcharts-xaxis-title-text \" + w2.config.xaxis.title.style.cssClass\n            });\n            elXaxisTitle.add(elXAxisTitleText);\n            elXaxis.add(elXaxisTitle);\n        }\n        if (w2.config.xaxis.axisBorder.show) {\n            const offX = w2.globals.barPadForNumericAxis;\n            const elHorzLine = graphics.drawLine(w2.globals.padHorizontal + w2.config.xaxis.axisBorder.offsetX - offX, this.offY, this.xaxisBorderWidth + offX, this.offY, w2.config.xaxis.axisBorder.color, 0, this.xaxisBorderHeight);\n            if (this.elgrid && this.elgrid.elGridBorders && w2.config.grid.show) this.elgrid.elGridBorders.add(elHorzLine);\n            else elXaxis.add(elHorzLine);\n        }\n        return elXaxis;\n    }\n    /**\n   * @param {Record<string, any>} [overwriteStyles]\n   * @param {boolean} isLeafGroup\n   * @param {import('../Graphics').default} graphics\n   * @param {any} elXaxisTexts\n   * @param {any[]} labels\n   * @param {boolean} isXNumeric\n   * @param {any} colWidthCb\n   */ drawXAxisLabelAndGroup(isLeafGroup, graphics, elXaxisTexts, labels, isXNumeric, colWidthCb, overwriteStyles = {}) {\n        var _a, _b;\n        const drawnLabels = [];\n        const drawnLabelsRects = [];\n        const w2 = this.w;\n        const xaxisFontSize = overwriteStyles.xaxisFontSize || this.xaxisFontSize;\n        const xaxisFontFamily = overwriteStyles.xaxisFontFamily || this.xaxisFontFamily;\n        const xaxisForeColors = overwriteStyles.xaxisForeColors || this.xaxisForeColors;\n        const fontWeight = overwriteStyles.fontWeight || w2.config.xaxis.labels.style.fontWeight;\n        const cssClass = overwriteStyles.cssClass || w2.config.xaxis.labels.style.cssClass;\n        let colWidth;\n        let xPos = w2.globals.padHorizontal;\n        const labelsLen = labels.length;\n        let dataPoints = w2.config.xaxis.type === \"category\" ? w2.globals.dataPoints : labelsLen;\n        if (dataPoints === 0 && labelsLen > dataPoints) dataPoints = labelsLen;\n        if (isXNumeric) {\n            const len = Math.max(Number(w2.config.xaxis.tickAmount) || 1, dataPoints > 1 ? dataPoints - 1 : dataPoints);\n            colWidth = w2.layout.gridWidth / Math.min(len, labelsLen - 1);\n            xPos = xPos + colWidthCb(0, colWidth) / 2 + w2.config.xaxis.labels.offsetX;\n        } else {\n            colWidth = w2.layout.gridWidth / dataPoints;\n            xPos = xPos + colWidthCb(0, colWidth) + w2.config.xaxis.labels.offsetX;\n        }\n        for(let i2 = 0; i2 <= labelsLen - 1; i2++){\n            let x = xPos - colWidthCb(i2, colWidth) / 2 + w2.config.xaxis.labels.offsetX;\n            if (i2 === 0 && labelsLen === 1 && colWidth / 2 === xPos && dataPoints === 1) x = w2.layout.gridWidth / 2;\n            let label = this.axesUtils.getLabel(labels, w2.labelData.timescaleLabels, x, i2, drawnLabels, xaxisFontSize, isLeafGroup);\n            let offsetYCorrection = 28;\n            if (w2.layout.rotateXLabels && isLeafGroup) offsetYCorrection = 22;\n            if (w2.config.xaxis.title.text && w2.config.xaxis.position === \"top\") offsetYCorrection += parseFloat(w2.config.xaxis.title.style.fontSize) + 2;\n            if (!isLeafGroup) offsetYCorrection = offsetYCorrection + parseFloat(xaxisFontSize) + (w2.layout.xAxisLabelsHeight - w2.layout.xAxisGroupLabelsHeight) + (w2.layout.rotateXLabels ? 10 : 0);\n            const isCategoryTickAmounts = typeof w2.config.xaxis.tickAmount !== \"undefined\" && w2.config.xaxis.tickAmount !== \"dataPoints\" && w2.config.xaxis.type !== \"datetime\";\n            if (isCategoryTickAmounts) label = this.axesUtils.checkLabelBasedOnTickamount(i2, label, labelsLen);\n            else label = this.axesUtils.checkForOverflowingLabels(i2, label, labelsLen, drawnLabels, drawnLabelsRects);\n            const getCatForeColor = ()=>{\n                return isLeafGroup && w2.config.xaxis.convertedCatToNumeric ? xaxisForeColors[w2.globals.minX + i2 - 1] : xaxisForeColors[i2];\n            };\n            const labelRectWidth = /** @type {any} */ (_b = (_a = label.textRect) == null ? void 0 : _a.width) != null ? _b : 0;\n            const halfWidth = labelRectWidth / 2;\n            const fullyOutsideGrid = label.x + halfWidth < 0;\n            if (w2.config.xaxis.labels.show && !fullyOutsideGrid) {\n                const elText = graphics.drawText({\n                    x: label.x,\n                    y: this.offY + w2.config.xaxis.labels.offsetY + offsetYCorrection - (w2.config.xaxis.position === \"top\" ? w2.layout.xAxisHeight + w2.config.xaxis.axisTicks.height - 2 : 0),\n                    text: label.text,\n                    textAnchor: \"middle\",\n                    fontWeight: fontWeight,\n                    fontSize: xaxisFontSize,\n                    fontFamily: xaxisFontFamily,\n                    foreColor: Array.isArray(xaxisForeColors) ? getCatForeColor() : xaxisForeColors,\n                    isPlainText: false,\n                    cssClass: (isLeafGroup ? \"apexcharts-xaxis-label \" : \"apexcharts-xaxis-group-label \") + cssClass\n                });\n                elXaxisTexts.add(elText);\n                elText.on(\"click\", (e2)=>{\n                    if (typeof w2.config.chart.events.xAxisLabelClick === \"function\") {\n                        const opts = Object.assign({}, w2, {\n                            labelIndex: i2\n                        });\n                        w2.config.chart.events.xAxisLabelClick(e2, this.ctx, opts);\n                    }\n                });\n                if (isLeafGroup) {\n                    const elTooltipTitle = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"title\");\n                    elTooltipTitle.textContent = Array.isArray(label.text) ? label.text.join(\" \") : label.text;\n                    elText.node.appendChild(elTooltipTitle);\n                    if (label.text !== \"\") {\n                        drawnLabels.push(label.text);\n                        drawnLabelsRects.push(label);\n                    }\n                }\n            }\n            if (i2 < labelsLen - 1) xPos = xPos + colWidthCb(i2 + 1, colWidth);\n        }\n    }\n    // this actually becomes the vertical axis (for bar charts)\n    /**\n   * @param {number} realIndex\n   */ drawXaxisInversed(realIndex) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const translateYAxisX = w2.config.yaxis[0].opposite ? w2.globals.translateYAxisX[realIndex] : 0;\n        const elYaxis = graphics.group({\n            class: \"apexcharts-yaxis apexcharts-xaxis-inversed\",\n            rel: realIndex\n        });\n        const elYaxisTexts = graphics.group({\n            class: \"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g\",\n            transform: \"translate(\" + translateYAxisX + \", 0)\"\n        });\n        elYaxis.add(elYaxisTexts);\n        const labels = [];\n        if (w2.config.yaxis[realIndex].show) for(let i2 = 0; i2 < this.xaxisLabels.length; i2++)labels.push(this.xaxisLabels[i2]);\n        const colHeight = w2.layout.gridHeight / labels.length;\n        let yPos = -(colHeight / 2.2);\n        const lbFormatter = w2.formatters.yLabelFormatters[0];\n        const ylabels = w2.config.yaxis[0].labels;\n        if (ylabels.show) for(let i2 = 0; i2 <= labels.length - 1; i2++){\n            let label = typeof labels[i2] === \"undefined\" ? \"\" : labels[i2];\n            label = lbFormatter(label, {\n                seriesIndex: realIndex,\n                dataPointIndex: i2,\n                w: w2\n            });\n            const yColors = this.axesUtils.getYAxisForeColor(ylabels.style.colors, realIndex);\n            const getForeColor = ()=>{\n                return Array.isArray(yColors) ? yColors[i2] : yColors;\n            };\n            let multiY = 0;\n            if (Array.isArray(label)) multiY = label.length / 2 * parseInt(ylabels.style.fontSize, 10);\n            let offsetX = ylabels.offsetX - 15;\n            let textAnchor = \"end\";\n            if (this.yaxis.opposite) textAnchor = \"start\";\n            if (w2.config.yaxis[0].labels.align === \"left\") {\n                offsetX = ylabels.offsetX;\n                textAnchor = \"start\";\n            } else if (w2.config.yaxis[0].labels.align === \"center\") {\n                offsetX = ylabels.offsetX;\n                textAnchor = \"middle\";\n            } else if (w2.config.yaxis[0].labels.align === \"right\") textAnchor = \"end\";\n            const elLabel = graphics.drawText({\n                x: offsetX,\n                y: yPos + colHeight + ylabels.offsetY - multiY,\n                text: label,\n                textAnchor: textAnchor,\n                foreColor: getForeColor(),\n                fontSize: ylabels.style.fontSize,\n                fontFamily: ylabels.style.fontFamily,\n                fontWeight: ylabels.style.fontWeight,\n                isPlainText: false,\n                cssClass: \"apexcharts-yaxis-label \" + ylabels.style.cssClass,\n                maxWidth: ylabels.maxWidth\n            });\n            elYaxisTexts.add(elLabel);\n            elLabel.on(\"click\", (e2)=>{\n                if (typeof w2.config.chart.events.xAxisLabelClick === \"function\") {\n                    const opts = Object.assign({}, w2, {\n                        labelIndex: i2\n                    });\n                    w2.config.chart.events.xAxisLabelClick(e2, this.ctx, opts);\n                }\n            });\n            const elTooltipTitle = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"title\");\n            elTooltipTitle.textContent = Array.isArray(label) ? label.join(\" \") : label;\n            elLabel.node.appendChild(elTooltipTitle);\n            if (w2.config.yaxis[realIndex].labels.rotate !== 0) {\n                const labelRotatingCenter = graphics.rotateAroundCenter(elLabel.node);\n                elLabel.node.setAttribute(\"transform\", `rotate(${w2.config.yaxis[realIndex].labels.rotate} 0 ${labelRotatingCenter.y})`);\n            }\n            yPos = yPos + colHeight;\n        }\n        if (w2.config.yaxis[0].title.text !== void 0) {\n            const elXaxisTitle = graphics.group({\n                class: \"apexcharts-yaxis-title apexcharts-xaxis-title-inversed\",\n                transform: \"translate(\" + translateYAxisX + \", 0)\"\n            });\n            const elXAxisTitleText = graphics.drawText({\n                x: w2.config.yaxis[0].title.offsetX,\n                y: w2.layout.gridHeight / 2 + w2.config.yaxis[0].title.offsetY,\n                text: w2.config.yaxis[0].title.text,\n                textAnchor: \"middle\",\n                foreColor: w2.config.yaxis[0].title.style.color,\n                fontSize: w2.config.yaxis[0].title.style.fontSize,\n                fontWeight: w2.config.yaxis[0].title.style.fontWeight,\n                fontFamily: w2.config.yaxis[0].title.style.fontFamily,\n                cssClass: \"apexcharts-yaxis-title-text \" + w2.config.yaxis[0].title.style.cssClass\n            });\n            elXaxisTitle.add(elXAxisTitleText);\n            elYaxis.add(elXaxisTitle);\n        }\n        let offX = 0;\n        if (this.isCategoryBarHorizontal && w2.config.yaxis[0].opposite) offX = w2.layout.gridWidth;\n        const axisBorder = w2.config.xaxis.axisBorder;\n        if (axisBorder.show) {\n            const elVerticalLine = graphics.drawLine(w2.globals.padHorizontal + axisBorder.offsetX + offX, 1 + axisBorder.offsetY, w2.globals.padHorizontal + axisBorder.offsetX + offX, w2.layout.gridHeight + axisBorder.offsetY, axisBorder.color, 0);\n            if (this.elgrid && this.elgrid.elGridBorders && w2.config.grid.show) this.elgrid.elGridBorders.add(elVerticalLine);\n            else elYaxis.add(elVerticalLine);\n        }\n        if (w2.config.yaxis[0].axisTicks.show) this.axesUtils.drawYAxisTicks(offX, labels.length, w2.config.yaxis[0].axisBorder, w2.config.yaxis[0].axisTicks, 0, colHeight, elYaxis);\n        return elYaxis;\n    }\n    /**\n   * @param {number} x1\n   * @param {number} y2\n   * @param {any} appendToElement\n   */ drawXaxisTicks(x1, y2, appendToElement) {\n        const w2 = this.w;\n        const x2 = x1;\n        if (x1 < 0 || x1 - 2 > w2.layout.gridWidth) return;\n        const y1 = this.offY + w2.config.xaxis.axisTicks.offsetY;\n        y2 = y2 + y1 + w2.config.xaxis.axisTicks.height;\n        if (w2.config.xaxis.position === \"top\") y2 = y1 - w2.config.xaxis.axisTicks.height;\n        if (w2.config.xaxis.axisTicks.show) {\n            const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n            const line = graphics.drawLine(x1 + w2.config.xaxis.axisTicks.offsetX, y1 + w2.config.xaxis.offsetY, x2 + w2.config.xaxis.axisTicks.offsetX, y2 + w2.config.xaxis.offsetY, w2.config.xaxis.axisTicks.color);\n            appendToElement.add(line);\n            line.node.classList.add(\"apexcharts-xaxis-tick\");\n        }\n    }\n    getXAxisTicksPositions() {\n        const w2 = this.w;\n        const xAxisTicksPositions = [];\n        const xCount = this.xaxisLabels.length;\n        let x1 = w2.globals.padHorizontal;\n        if (w2.labelData.timescaleLabels.length > 0) for(let i2 = 0; i2 < xCount; i2++){\n            x1 = this.xaxisLabels[i2].position;\n            xAxisTicksPositions.push(x1);\n        }\n        else {\n            const xCountForCategoryCharts = xCount;\n            for(let i2 = 0; i2 < xCountForCategoryCharts; i2++){\n                let x1Count = xCountForCategoryCharts;\n                if (w2.axisFlags.isXNumeric && w2.config.chart.type !== \"bar\") x1Count -= 1;\n                x1 = x1 + w2.layout.gridWidth / x1Count;\n                xAxisTicksPositions.push(x1);\n            }\n        }\n        return xAxisTicksPositions;\n    }\n    // to rotate x-axis labels or to put ... for longer text in xaxis\n    xAxisLabelCorrections() {\n        var _a, _b, _c;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const xAxis = w2.dom.baseEl.querySelector(\".apexcharts-xaxis-texts-g\");\n        const xAxisTexts = w2.dom.baseEl.querySelectorAll(\".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)\");\n        const yAxisTextsInversed = w2.dom.baseEl.querySelectorAll(\".apexcharts-yaxis-inversed text\");\n        const xAxisTextsInversed = w2.dom.baseEl.querySelectorAll(\".apexcharts-xaxis-inversed-texts-g text tspan\");\n        if (w2.layout.rotateXLabels || w2.config.xaxis.labels.rotateAlways) for(let xat = 0; xat < xAxisTexts.length; xat++){\n            const textRotatingCenter = graphics.rotateAroundCenter(xAxisTexts[xat]);\n            textRotatingCenter.y = textRotatingCenter.y - 1;\n            textRotatingCenter.x = textRotatingCenter.x + 1;\n            xAxisTexts[xat].setAttribute(\"transform\", `rotate(${w2.config.xaxis.labels.rotate} ${textRotatingCenter.x} ${textRotatingCenter.y})`);\n            xAxisTexts[xat].setAttribute(\"text-anchor\", `end`);\n            xAxis == null || xAxis.setAttribute(\"transform\", `translate(0, ${-10})`);\n            const tSpan = xAxisTexts[xat].childNodes;\n            if (w2.config.xaxis.labels.trim) Array.prototype.forEach.call(tSpan, (ts)=>{\n                graphics.placeTextWithEllipsis(ts, ts.textContent, w2.layout.xAxisLabelsHeight - (w2.config.legend.position === \"bottom\" ? 20 : 10));\n            });\n        }\n        else {\n            const width = w2.layout.gridWidth / (w2.labelData.labels.length + 1);\n            for(let xat = 0; xat < xAxisTexts.length; xat++){\n                const tSpan = xAxisTexts[xat].childNodes;\n                if (w2.config.xaxis.labels.trim && w2.config.xaxis.type !== \"datetime\") Array.prototype.forEach.call(tSpan, (ts)=>{\n                    graphics.placeTextWithEllipsis(ts, ts.textContent, width);\n                });\n            }\n        }\n        if (yAxisTextsInversed.length > 0) {\n            const firstLabelPosX = /** @type {SVGGraphicsElement} */ yAxisTextsInversed[yAxisTextsInversed.length - 1].getBBox();\n            const lastLabelPosX = /** @type {SVGGraphicsElement} */ yAxisTextsInversed[0].getBBox();\n            if (firstLabelPosX.x < -20) (_a = yAxisTextsInversed[yAxisTextsInversed.length - 1].parentNode) == null || _a.removeChild(yAxisTextsInversed[yAxisTextsInversed.length - 1]);\n            if (lastLabelPosX.x + lastLabelPosX.width > w2.layout.gridWidth && !w2.globals.isBarHorizontal) (_b = yAxisTextsInversed[0].parentNode) == null || _b.removeChild(yAxisTextsInversed[0]);\n            for(let xat = 0; xat < xAxisTextsInversed.length; xat++)graphics.placeTextWithEllipsis(xAxisTextsInversed[xat], (_c = xAxisTextsInversed[xat].textContent) != null ? _c : \"\", w2.config.yaxis[0].labels.maxWidth - (w2.config.yaxis[0].title.text ? parseFloat(w2.config.yaxis[0].title.style.fontSize) * 2 : 0) - 15);\n        }\n    }\n}\nclass $e4b487e979d7c06d$var$Grid {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.xaxisLabels = w2.labelData.labels.slice();\n        this.axesUtils = new $e4b487e979d7c06d$var$AxesUtils(ctx.w, {\n            theme: ctx.theme,\n            timeScale: ctx.timeScale\n        });\n        this.isRangeBar = w2.rangeData.seriesRange.length && w2.globals.isBarHorizontal;\n        if (w2.labelData.timescaleLabels.length > 0) this.xaxisLabels = w2.labelData.timescaleLabels.slice();\n    }\n    /**\n   * @param {any} elGrid\n   */ drawGridArea(elGrid = null) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        if (!elGrid) elGrid = graphics.group({\n            class: \"apexcharts-grid\"\n        });\n        const elVerticalLine = graphics.drawLine(w2.globals.padHorizontal, 1, w2.globals.padHorizontal, w2.layout.gridHeight, \"transparent\");\n        const elHorzLine = graphics.drawLine(w2.globals.padHorizontal, w2.layout.gridHeight, w2.layout.gridWidth, w2.layout.gridHeight, \"transparent\");\n        elGrid.add(elHorzLine);\n        elGrid.add(elVerticalLine);\n        return elGrid;\n    }\n    drawGrid() {\n        const gl = this.w.globals;\n        if (gl.axisCharts) {\n            const elgrid = this.renderGrid();\n            this.drawGridArea(elgrid.el);\n            return elgrid;\n        }\n        return null;\n    }\n    createGridMask() {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const strokeSize = Array.isArray(w2.config.stroke.width) ? Math.max(...w2.config.stroke.width) : w2.config.stroke.width;\n        const createClipPath = (id)=>{\n            const clipPath = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"clipPath\");\n            clipPath.setAttribute(\"id\", id);\n            return clipPath;\n        };\n        w2.dom.elGridRectMask = createClipPath(`gridRectMask${gl.cuid}`);\n        w2.dom.elGridRectBarMask = createClipPath(`gridRectBarMask${gl.cuid}`);\n        w2.dom.elGridRectMarkerMask = createClipPath(`gridRectMarkerMask${gl.cuid}`);\n        w2.dom.elForecastMask = createClipPath(`forecastMask${gl.cuid}`);\n        w2.dom.elNonForecastMask = createClipPath(`nonForecastMask${gl.cuid}`);\n        const hasBar = [\n            \"bar\",\n            \"rangeBar\",\n            \"candlestick\",\n            \"boxPlot\",\n            \"violin\"\n        ].includes(w2.config.chart.type) || w2.globals.comboBarCount > 0;\n        let barWidthLeft = 0;\n        let barWidthRight = 0;\n        if (hasBar && w2.axisFlags.isXNumeric && !w2.globals.isBarHorizontal) {\n            barWidthLeft = Math.max(w2.layout.gridPad.left, gl.barPadForNumericAxis);\n            barWidthRight = Math.max(w2.layout.gridPad.right, gl.barPadForNumericAxis);\n        }\n        w2.dom.elGridRect = graphics.drawRect(-strokeSize / 2 - 2, -strokeSize / 2 - 2, w2.layout.gridWidth + strokeSize + 4, w2.layout.gridHeight + strokeSize + 4, 0, \"#fff\");\n        w2.dom.elGridRectBar = graphics.drawRect(-strokeSize / 2 - barWidthLeft - 2, -strokeSize / 2 - 2, w2.layout.gridWidth + strokeSize + barWidthRight + barWidthLeft + 4, w2.layout.gridHeight + strokeSize + 4, 0, \"#fff\");\n        const markerSize = w2.globals.markers.largestSize;\n        w2.dom.elGridRectMarker = graphics.drawRect(Math.min(-strokeSize / 2 - barWidthLeft - 2, -markerSize), -markerSize, w2.layout.gridWidth + Math.max(strokeSize + barWidthRight + barWidthLeft + 4, markerSize * 2), w2.layout.gridHeight + markerSize * 2, 0, \"#fff\");\n        w2.dom.elGridRectMask.appendChild(w2.dom.elGridRect.node);\n        w2.dom.elGridRectBarMask.appendChild(w2.dom.elGridRectBar.node);\n        w2.dom.elGridRectMarkerMask.appendChild(w2.dom.elGridRectMarker.node);\n        const defs = w2.dom.elDefs.node;\n        defs.appendChild(w2.dom.elGridRectMask);\n        defs.appendChild(w2.dom.elGridRectBarMask);\n        defs.appendChild(w2.dom.elGridRectMarkerMask);\n        defs.appendChild(w2.dom.elForecastMask);\n        defs.appendChild(w2.dom.elNonForecastMask);\n    }\n    /** @param {{i: any, x1: any, y1: any, x2: any, y2: any, xCount: any, parent: any}} opts */ _drawGridLines({ i: i2, x1: x1, y1: y1, x2: x2, y2: y2, xCount: xCount, parent: parent }) {\n        const w2 = this.w;\n        const shouldDraw = ()=>{\n            if (i2 === 0 && w2.globals.skipFirstTimelinelabel) return false;\n            if (i2 === xCount - 1 && w2.globals.skipLastTimelinelabel && !w2.config.xaxis.labels.formatter) return false;\n            if (w2.config.chart.type === \"radar\") return false;\n            return true;\n        };\n        if (shouldDraw()) {\n            if (w2.config.grid.xaxis.lines.show) this._drawGridLine({\n                i: i2,\n                x1: x1,\n                y1: y1,\n                x2: x2,\n                y2: y2,\n                xCount: xCount,\n                parent: parent\n            });\n            let y_2 = 0;\n            if (w2.labelData.hasXaxisGroups && w2.config.xaxis.tickPlacement === \"between\") {\n                const groups = w2.labelData.groups;\n                if (groups) {\n                    let gacc = 0;\n                    for(let gi = 0; gacc < i2 && gi < groups.length; gi++)gacc += groups[gi].cols;\n                    if (gacc === i2) y_2 = w2.layout.xAxisLabelsHeight * 0.6;\n                }\n            }\n            const xAxis = new $e4b487e979d7c06d$var$XAxis(this.w, this.ctx);\n            xAxis.drawXaxisTicks(x1, y_2, w2.dom.elGraphical);\n        }\n    }\n    /** @param {{i: any, x1: any, y1: any, x2: any, y2: any, xCount: any, parent: any}} opts */ _drawGridLine({ i: i2, x1: x1, y1: y1, x2: x2, y2: y2, xCount: xCount, parent: parent }) {\n        const w2 = this.w;\n        const isHorzLine = parent.node.classList.contains(\"apexcharts-gridlines-horizontal\");\n        const offX = w2.globals.barPadForNumericAxis;\n        const excludeBorders = y1 === 0 && y2 === 0 || x1 === 0 && x2 === 0 || y1 === w2.layout.gridHeight && y2 === w2.layout.gridHeight || w2.globals.isBarHorizontal && (i2 === 0 || i2 === xCount - 1);\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const line = graphics.drawLine(x1 - (isHorzLine ? offX : 0), y1, x2 + (isHorzLine ? offX : 0), y2, w2.config.grid.borderColor, w2.config.grid.strokeDashArray);\n        line.node.classList.add(\"apexcharts-gridline\");\n        if (excludeBorders && w2.config.grid.show) this.elGridBorders.add(line);\n        else parent.add(line);\n    }\n    /** @param {{c: any, x1: any, y1: any, x2: any, y2: any, type: any}} opts */ _drawGridBandRect({ c: c2, x1: x1, y1: y1, x2: x2, y2: y2, type: type }) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const offX = w2.globals.barPadForNumericAxis;\n        const color = w2.config.grid[type].colors[c2];\n        const rect = graphics.drawRect(x1 - (type === \"row\" ? offX : 0), y1, x2 + (type === \"row\" ? offX * 2 : 0), y2, 0, color, w2.config.grid[type].opacity);\n        this.elg.add(rect);\n        rect.attr(\"clip-path\", `url(#gridRectMask${w2.globals.cuid})`);\n        rect.node.classList.add(`apexcharts-grid-${type}`);\n    }\n    /** @param {{xCount: any, tickAmount: any}} opts */ _drawXYLines({ xCount: xCount, tickAmount: tickAmount }) {\n        var _a;\n        const w2 = this.w;\n        const datetimeLines = ({ xC: xC, x1: x1, y1: y1, x2: x2, y2: y2 })=>{\n            for(let i2 = 0; i2 < xC; i2++){\n                x1 = /** @type {any} */ this.xaxisLabels[i2].position;\n                x2 = /** @type {any} */ this.xaxisLabels[i2].position;\n                if (x1 < 0 || x1 - 2 > w2.layout.gridWidth) continue;\n                this._drawGridLines({\n                    i: i2,\n                    x1: x1,\n                    y1: y1,\n                    x2: x2,\n                    y2: y2,\n                    xCount: xCount,\n                    parent: this.elgridLinesV\n                });\n            }\n        };\n        const categoryLines = ({ xC: xC, x1: x1, y1: y1, x2: x2, y2: y2 })=>{\n            for(let i2 = 0; i2 < xC + (w2.axisFlags.isXNumeric ? 0 : 1); i2++){\n                if (i2 === 0 && xC === 1 && w2.globals.dataPoints === 1) {\n                    x1 = w2.layout.gridWidth / 2;\n                    x2 = x1;\n                }\n                this._drawGridLines({\n                    i: i2,\n                    x1: x1,\n                    y1: y1,\n                    x2: x2,\n                    y2: y2,\n                    xCount: xCount,\n                    parent: this.elgridLinesV\n                });\n                x1 += w2.layout.gridWidth / (w2.axisFlags.isXNumeric ? xC - 1 : xC);\n                x2 = x1;\n            }\n        };\n        if (w2.config.grid.xaxis.lines.show || w2.config.xaxis.axisTicks.show) {\n            const x1 = w2.globals.padHorizontal;\n            const y1 = 0;\n            let x2;\n            const y2 = w2.layout.gridHeight;\n            if (w2.labelData.timescaleLabels.length) datetimeLines({\n                xC: xCount,\n                x1: x1,\n                y1: y1,\n                x2: x2,\n                y2: y2\n            });\n            else {\n                if (w2.axisFlags.isXNumeric) xCount = (_a = w2.globals.xAxisScale) == null ? void 0 : _a.result.length;\n                categoryLines({\n                    xC: xCount,\n                    x1: x1,\n                    y1: y1,\n                    x2: x2,\n                    y2: y2\n                });\n            }\n        }\n        if (w2.config.grid.yaxis.lines.show) {\n            const x1 = 0;\n            let y1 = 0;\n            let y2 = 0;\n            const x2 = w2.layout.gridWidth;\n            let tA = tickAmount + 1;\n            if (this.isRangeBar) tA = w2.labelData.labels.length;\n            for(let i2 = 0; i2 < tA + (this.isRangeBar ? 1 : 0); i2++){\n                this._drawGridLine({\n                    i: i2,\n                    xCount: tA + (this.isRangeBar ? 1 : 0),\n                    x1: x1,\n                    y1: y1,\n                    x2: x2,\n                    y2: y2,\n                    parent: this.elgridLinesH\n                });\n                y1 += w2.layout.gridHeight / (this.isRangeBar ? tA : tickAmount);\n                y2 = y1;\n            }\n        }\n    }\n    /** @param {{ xCount?: any, tickAmount?: any }} opts */ _drawInvertedXYLines({ xCount: xCount }) {\n        const w2 = this.w;\n        if (w2.config.grid.xaxis.lines.show || w2.config.xaxis.axisTicks.show) {\n            let x1 = w2.globals.padHorizontal;\n            const y1 = 0;\n            let x2;\n            const y2 = w2.layout.gridHeight;\n            for(let i2 = 0; i2 < xCount + 1; i2++){\n                if (w2.config.grid.xaxis.lines.show) this._drawGridLine({\n                    i: i2,\n                    xCount: xCount + 1,\n                    x1: x1,\n                    y1: y1,\n                    x2: x2,\n                    y2: y2,\n                    parent: this.elgridLinesV\n                });\n                const xAxis = new $e4b487e979d7c06d$var$XAxis(this.w, this.ctx);\n                xAxis.drawXaxisTicks(x1, 0, w2.dom.elGraphical);\n                x1 += w2.layout.gridWidth / xCount;\n                x2 = x1;\n            }\n        }\n        if (w2.config.grid.yaxis.lines.show) {\n            const x1 = 0;\n            let y1 = 0;\n            let y2 = 0;\n            const x2 = w2.layout.gridWidth;\n            for(let i2 = 0; i2 < w2.globals.dataPoints + 1; i2++){\n                this._drawGridLine({\n                    i: i2,\n                    xCount: w2.globals.dataPoints + 1,\n                    x1: x1,\n                    y1: y1,\n                    x2: x2,\n                    y2: y2,\n                    parent: this.elgridLinesH\n                });\n                y1 += w2.layout.gridHeight / w2.globals.dataPoints;\n                y2 = y1;\n            }\n        }\n    }\n    renderGrid() {\n        var _a, _b, _c;\n        const w2 = this.w;\n        const gl = w2.globals;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        this.elg = graphics.group({\n            class: \"apexcharts-grid\"\n        });\n        this.elgridLinesH = graphics.group({\n            class: \"apexcharts-gridlines-horizontal\"\n        });\n        this.elgridLinesV = graphics.group({\n            class: \"apexcharts-gridlines-vertical\"\n        });\n        this.elGridBorders = graphics.group({\n            class: \"apexcharts-grid-borders\"\n        });\n        this.elg.add(this.elgridLinesH);\n        this.elg.add(this.elgridLinesV);\n        if (!w2.config.grid.show) {\n            this.elgridLinesV.hide();\n            this.elgridLinesH.hide();\n            this.elGridBorders.hide();\n        }\n        let gridAxisIndex = 0;\n        while(gridAxisIndex < gl.seriesYAxisMap.length && gl.ignoreYAxisIndexes.includes(gridAxisIndex))gridAxisIndex++;\n        if (gridAxisIndex === gl.seriesYAxisMap.length) gridAxisIndex = 0;\n        let yTickAmount = gl.yAxisScale[gridAxisIndex].result.length - 1;\n        let xCount;\n        if (!gl.isBarHorizontal || this.isRangeBar) {\n            xCount = this.xaxisLabels.length;\n            if (this.isRangeBar) {\n                yTickAmount = w2.labelData.labels.length;\n                if (w2.config.xaxis.tickAmount && w2.config.xaxis.labels.formatter) xCount = w2.config.xaxis.tickAmount;\n                if (((_c = (_b = (_a = gl.yAxisScale) == null ? void 0 : _a[gridAxisIndex]) == null ? void 0 : _b.result) == null ? void 0 : _c.length) > 0 && w2.config.xaxis.type !== \"datetime\") xCount = gl.yAxisScale[gridAxisIndex].result.length - 1;\n            }\n            this._drawXYLines({\n                xCount: xCount,\n                tickAmount: yTickAmount\n            });\n        } else {\n            xCount = yTickAmount;\n            yTickAmount = gl.xTickAmount;\n            this._drawInvertedXYLines({\n                xCount: xCount,\n                tickAmount: yTickAmount\n            });\n        }\n        this.drawGridBands(xCount, yTickAmount);\n        return {\n            el: this.elg,\n            elGridBorders: this.elGridBorders,\n            xAxisTickWidth: w2.layout.gridWidth / xCount\n        };\n    }\n    /**\n   * @param {number} xCount\n   * @param {number} tickAmount\n   */ drawGridBands(xCount, tickAmount) {\n        var _a, _b, _c, _d, _e;\n        const w2 = this.w;\n        const drawBands = (type, count, x1, y1, x2, y2)=>{\n            for(let i2 = 0, c2 = 0; i2 < count; i2++, c2++){\n                if (c2 >= w2.config.grid[type].colors.length) c2 = 0;\n                this._drawGridBandRect({\n                    c: c2,\n                    x1: x1,\n                    y1: y1,\n                    x2: x2,\n                    y2: y2,\n                    type: type\n                });\n                y1 += w2.layout.gridHeight / tickAmount;\n            }\n        };\n        if (((_a = w2.config.grid.row.colors) == null ? void 0 : _a.length) > 0) drawBands(\"row\", tickAmount, 0, 0, w2.layout.gridWidth, w2.layout.gridHeight / tickAmount);\n        if (((_b = w2.config.grid.column.colors) == null ? void 0 : _b.length) > 0) {\n            let xc = !w2.globals.isBarHorizontal && w2.config.xaxis.tickPlacement === \"on\" && (w2.config.xaxis.type === \"category\" || w2.config.xaxis.convertedCatToNumeric) ? xCount - 1 : xCount;\n            if (w2.axisFlags.isXNumeric) xc = ((_d = (_c = w2.globals.xAxisScale) == null ? void 0 : _c.result.length) != null ? _d : 1) - 1;\n            let x1 = w2.globals.padHorizontal;\n            const y1 = 0;\n            let x2 = w2.globals.padHorizontal + w2.layout.gridWidth / xc;\n            const y2 = w2.layout.gridHeight;\n            for(let i2 = 0, c2 = 0; i2 < xCount; i2++, c2++){\n                if (c2 >= w2.config.grid.column.colors.length) c2 = 0;\n                if (w2.config.xaxis.type === \"datetime\") {\n                    x1 = /** @type {any} */ this.xaxisLabels[i2].position;\n                    x2 = /** @type {any} */ (((_e = this.xaxisLabels[i2 + 1]) == null ? void 0 : _e.position) || w2.layout.gridWidth) - /** @type {any} */ this.xaxisLabels[i2].position;\n                }\n                this._drawGridBandRect({\n                    c: c2,\n                    x1: x1,\n                    y1: y1,\n                    x2: x2,\n                    y2: y2,\n                    type: \"column\"\n                });\n                x1 += w2.layout.gridWidth / xc;\n            }\n        }\n    }\n}\nclass $e4b487e979d7c06d$var$Scales {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n        this.coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n    }\n    // http://stackoverflow.com/questions/326679/choosing-an-attractive-linear-scale-for-a-graphs-y-axis\n    // This routine creates the Y axis values for a graph.\n    /**\n   * @param {number} yMin\n   * @param {number} yMax\n   */ niceScale(yMin, yMax, index = 0) {\n        const jsPrecision = 1e-11;\n        const w2 = this.w;\n        const gl = w2.globals;\n        let axisCnf;\n        let maxTicks;\n        let gotMin;\n        let gotMax;\n        if (gl.isBarHorizontal) {\n            axisCnf = w2.config.xaxis;\n            maxTicks = Math.max((gl.svgWidth - 100) / 25, 2);\n        } else {\n            axisCnf = w2.config.yaxis[index];\n            maxTicks = Math.max((gl.svgHeight - 100) / 15, 2);\n        }\n        if (!$e4b487e979d7c06d$var$Utils$1.isNumber(maxTicks)) maxTicks = 10;\n        gotMin = axisCnf.min !== void 0 && axisCnf.min !== null;\n        gotMax = axisCnf.max !== void 0 && axisCnf.max !== null;\n        let gotStepSize = axisCnf.stepSize !== void 0 && axisCnf.stepSize !== null;\n        let gotTickAmount = axisCnf.tickAmount !== void 0 && axisCnf.tickAmount !== null;\n        let ticks = gotTickAmount ? axisCnf.tickAmount : $e4b487e979d7c06d$var$NICE_SCALE_DEFAULT_TICKS[Math.min(Math.round(maxTicks / 2), $e4b487e979d7c06d$var$NICE_SCALE_DEFAULT_TICKS.length - 1)];\n        if (gl.isMultipleYAxis && !gotTickAmount && gl.multiAxisTickAmount > 0) {\n            ticks = gl.multiAxisTickAmount;\n            gotTickAmount = true;\n        }\n        if (ticks === \"dataPoints\") ticks = gl.dataPoints - 1;\n        else ticks = Math.abs(Math.round(ticks));\n        if (yMin === Number.MIN_VALUE && yMax === 0 || !$e4b487e979d7c06d$var$Utils$1.isNumber(yMin) && !$e4b487e979d7c06d$var$Utils$1.isNumber(yMax) || yMin === Number.MIN_VALUE && yMax === -Number.MAX_VALUE) {\n            yMin = $e4b487e979d7c06d$var$Utils$1.isNumber(axisCnf.min) ? axisCnf.min : 0;\n            yMax = $e4b487e979d7c06d$var$Utils$1.isNumber(axisCnf.max) ? axisCnf.max : yMin + ticks;\n            gl.allSeriesCollapsed = false;\n        }\n        if (yMin > yMax) {\n            console.warn(\"axis.min cannot be greater than axis.max: swapping min and max\");\n            const temp = yMax;\n            yMax = yMin;\n            yMin = temp;\n        } else if (yMin === yMax) {\n            yMin = yMin === 0 ? 0 : yMin - 1;\n            yMax = yMax === 0 ? 2 : yMax + 1;\n        }\n        const result = [];\n        if (ticks < 1) ticks = 1;\n        let tiks = ticks;\n        let range = Math.abs(yMax - yMin);\n        const proximityRatio = 0.15;\n        if (!gotMin && yMin > 0 && yMin / range < proximityRatio) {\n            yMin = 0;\n            gotMin = true;\n        }\n        if (!gotMax && yMax < 0 && -yMax / range < proximityRatio) {\n            yMax = 0;\n            gotMax = true;\n        }\n        range = Math.abs(yMax - yMin);\n        let stepSize = range / tiks;\n        let niceStep = stepSize;\n        const mag = Math.floor(Math.log10(niceStep));\n        const magPow = Math.pow(10, mag);\n        let magMsd = Math.ceil(niceStep / magPow);\n        magMsd = $e4b487e979d7c06d$var$NICE_SCALE_ALLOWED_MAG_MSD[gl.yValueDecimal === 0 ? 0 : 1][magMsd];\n        niceStep = magMsd * magPow;\n        stepSize = niceStep;\n        if (gl.isBarHorizontal && axisCnf.stepSize && axisCnf.type !== \"datetime\") {\n            stepSize = axisCnf.stepSize;\n            gotStepSize = true;\n        } else if (gotStepSize) stepSize = axisCnf.stepSize;\n        if (gotStepSize) {\n            if (axisCnf.forceNiceScale) {\n                const stepMag = Math.floor(Math.log10(stepSize));\n                stepSize *= Math.pow(10, mag - stepMag);\n            }\n        }\n        if (gotMin && gotMax) {\n            let crudeStep = range / tiks;\n            if (gotTickAmount) {\n                if (gotStepSize) {\n                    if ($e4b487e979d7c06d$var$Utils$1.mod(range, stepSize) != 0) {\n                        const gcdStep = $e4b487e979d7c06d$var$Utils$1.getGCD(stepSize, crudeStep);\n                        if (crudeStep / gcdStep < 10) stepSize = gcdStep;\n                        else stepSize = crudeStep;\n                    } else if ($e4b487e979d7c06d$var$Utils$1.mod(stepSize, crudeStep) == 0) stepSize = crudeStep;\n                    else {\n                        crudeStep = stepSize;\n                        gotTickAmount = false;\n                    }\n                } else stepSize = crudeStep;\n            } else {\n                if (gotStepSize) {\n                    if ($e4b487e979d7c06d$var$Utils$1.mod(range, stepSize) == 0) crudeStep = stepSize;\n                    else stepSize = crudeStep;\n                } else if ($e4b487e979d7c06d$var$Utils$1.mod(range, stepSize) == 0) crudeStep = stepSize;\n                else {\n                    tiks = Math.ceil(range / stepSize);\n                    crudeStep = range / tiks;\n                    const gcdStep = $e4b487e979d7c06d$var$Utils$1.getGCD(range, stepSize);\n                    if (range / gcdStep < maxTicks) crudeStep = gcdStep;\n                    stepSize = crudeStep;\n                }\n            }\n            tiks = Math.round(range / stepSize);\n        } else {\n            if (!gotMin && !gotMax) {\n                if (gl.isMultipleYAxis && gotTickAmount) {\n                    const tMin = stepSize * Math.floor(yMin / stepSize);\n                    let tMax = tMin + stepSize * tiks;\n                    if (tMax < yMax) stepSize *= 2;\n                    yMin = tMin;\n                    tMax = yMax;\n                    yMax = yMin + stepSize * tiks;\n                    range = Math.abs(yMax - yMin);\n                    if (yMin > 0 && yMin < Math.abs(tMax - yMax)) {\n                        yMin = 0;\n                        yMax = stepSize * tiks;\n                    }\n                    if (yMax < 0 && -yMax < Math.abs(tMin - yMin)) {\n                        yMax = 0;\n                        yMin = -stepSize * tiks;\n                    }\n                } else {\n                    yMin = stepSize * Math.floor(yMin / stepSize);\n                    yMax = stepSize * Math.ceil(yMax / stepSize);\n                }\n            } else if (gotMax) {\n                if (gotTickAmount) yMin = yMax - stepSize * tiks;\n                else {\n                    const yMinPrev = yMin;\n                    yMin = stepSize * Math.floor(yMin / stepSize);\n                    if (Math.abs(yMax - yMin) / $e4b487e979d7c06d$var$Utils$1.getGCD(range, stepSize) > maxTicks) {\n                        yMin = yMax - stepSize * ticks;\n                        yMin += stepSize * Math.floor((yMinPrev - yMin) / stepSize);\n                    }\n                }\n            } else if (gotMin) {\n                if (gotTickAmount) yMax = yMin + stepSize * tiks;\n                else {\n                    const yMaxPrev = yMax;\n                    yMax = stepSize * Math.ceil(yMax / stepSize);\n                    if (Math.abs(yMax - yMin) / $e4b487e979d7c06d$var$Utils$1.getGCD(range, stepSize) > maxTicks) {\n                        yMax = yMin + stepSize * ticks;\n                        yMax += stepSize * Math.ceil((yMaxPrev - yMax) / stepSize);\n                    }\n                }\n            }\n            range = Math.abs(yMax - yMin);\n            stepSize = $e4b487e979d7c06d$var$Utils$1.getGCD(range, stepSize);\n            tiks = Math.round(range / stepSize);\n        }\n        if (!gotTickAmount && !(gotMin || gotMax)) {\n            tiks = Math.ceil((range - jsPrecision) / (stepSize + jsPrecision));\n            if (tiks > 16 && $e4b487e979d7c06d$var$Utils$1.getPrimeFactors(tiks).length < 2) tiks++;\n        }\n        if (!gotTickAmount && axisCnf.forceNiceScale && gl.yValueDecimal === 0 && tiks > range) {\n            tiks = range;\n            stepSize = Math.round(range / tiks);\n        }\n        if (tiks > maxTicks && (!(gotTickAmount || gotStepSize) || axisCnf.forceNiceScale)) {\n            const pf = $e4b487e979d7c06d$var$Utils$1.getPrimeFactors(tiks);\n            const last = pf.length - 1;\n            let tt = tiks;\n            reduceLoop: for(var xFactors = 0; xFactors < last; xFactors++)for(var lowest = 0; lowest <= last - xFactors; lowest++){\n                const stop = Math.min(lowest + xFactors, last);\n                let t2 = tt;\n                let div = 1;\n                for(var next = lowest; next <= stop; next++)div *= pf[next];\n                t2 /= div;\n                if (t2 < maxTicks) {\n                    tt = t2;\n                    break reduceLoop;\n                }\n            }\n            if (tt === tiks) stepSize = range;\n            else stepSize = range / tt;\n            tiks = Math.round(range / stepSize);\n        }\n        if (gl.isMultipleYAxis && gl.multiAxisTickAmount == 0 && gl.ignoreYAxisIndexes.indexOf(index) < 0) gl.multiAxisTickAmount = tiks;\n        let val = yMin - stepSize;\n        const err = stepSize * jsPrecision;\n        do {\n            val += stepSize;\n            result.push($e4b487e979d7c06d$var$Utils$1.stripNumber(val, 7));\n        }while (yMax - val > err);\n        return {\n            result: result,\n            niceMin: result[0],\n            niceMax: result[result.length - 1]\n        };\n    }\n    /** @param {number} yMin @param {number} yMax @param {number|string} ticks @param {number} index @param {number|undefined} step */ linearScale(yMin, yMax, ticks = 10, index = 0, step) {\n        const range = Math.abs(yMax - yMin);\n        let result = [];\n        if (yMin === yMax) {\n            result = [\n                yMin\n            ];\n            return {\n                result: result,\n                niceMin: result[0],\n                niceMax: result[result.length - 1]\n            };\n        }\n        ticks = this._adjustTicksForSmallRange(ticks, index, range);\n        if (/** @type {any} */ ticks === \"dataPoints\") ticks = this.w.globals.dataPoints - 1;\n        const ticksNum = /** @type {number} */ ticks;\n        if (!step) step = range / ticksNum;\n        const MIN_PRECISION = 2;\n        if (step !== 0 && isFinite(step)) {\n            const magnitude = Math.floor(Math.log10(Math.abs(step)));\n            const precision = Math.max(MIN_PRECISION, -magnitude + MIN_PRECISION);\n            const multiplier = Math.pow(10, precision);\n            step = Math.round((step + Number.EPSILON) * multiplier) / multiplier;\n        }\n        let tickCount = ticks === Number.MAX_VALUE ? 5 : ticksNum;\n        if (ticks === Number.MAX_VALUE) step = 1;\n        let v2 = yMin;\n        while(tickCount >= 0){\n            result.push(v2);\n            v2 = $e4b487e979d7c06d$var$Utils$1.preciseAddition(v2, step);\n            tickCount -= 1;\n        }\n        return {\n            result: result,\n            niceMin: result[0],\n            niceMax: result[result.length - 1]\n        };\n    }\n    /**\n   * @param {number} yMin\n   * @param {number} yMax\n   * @param {number} base\n   */ logarithmicScaleNice(yMin, yMax, base) {\n        if (yMax <= 0) yMax = Math.max(yMin, base);\n        if (yMin <= 0) yMin = Math.min(yMax, base);\n        const logs = [];\n        const logMax = Math.ceil(Math.log(yMax) / Math.log(base) + 1);\n        const logMin = Math.floor(Math.log(yMin) / Math.log(base));\n        for(let i2 = logMin; i2 < logMax; i2++)logs.push(Math.pow(base, i2));\n        return {\n            result: logs,\n            niceMin: logs[0],\n            niceMax: logs[logs.length - 1]\n        };\n    }\n    /**\n   * @param {number} yMin\n   * @param {number} yMax\n   * @param {number} base\n   */ logarithmicScale(yMin, yMax, base) {\n        if (yMax <= 0) yMax = Math.max(yMin, base);\n        if (yMin <= 0) yMin = Math.min(yMax, base);\n        const logs = [];\n        const logMax = Math.log(yMax) / Math.log(base);\n        const logMin = Math.log(yMin) / Math.log(base);\n        const logRange = logMax - logMin;\n        const ticks = Math.round(logRange);\n        const logTickSpacing = logRange / ticks;\n        for(let i2 = 0, logTick = logMin; i2 < ticks; i2++, logTick += logTickSpacing)logs.push(Math.pow(base, logTick));\n        logs.push(Math.pow(base, logMax));\n        return {\n            result: logs,\n            niceMin: yMin,\n            niceMax: yMax\n        };\n    }\n    /**\n   * @param {number | string} ticks\n   * @param {number} index\n   * @param {number} range\n   */ _adjustTicksForSmallRange(ticks, index, range) {\n        let newTicks = ticks;\n        if (typeof index !== \"undefined\" && this.w.config.yaxis[index].labels.formatter && this.w.config.yaxis[index].tickAmount === void 0) {\n            const formattedVal = Number(this.w.config.yaxis[index].labels.formatter(1));\n            if ($e4b487e979d7c06d$var$Utils$1.isNumber(formattedVal) && this.w.globals.yValueDecimal === 0) newTicks = Math.ceil(range);\n        }\n        return newTicks < ticks ? newTicks : ticks;\n    }\n    /**\n   * @param {number} index\n   * @param {number} minY\n   * @param {number} maxY\n   */ setYScaleForIndex(index, minY, maxY) {\n        const gl = this.w.globals;\n        const cnf = this.w.config;\n        const y = gl.isBarHorizontal ? cnf.xaxis : cnf.yaxis[index];\n        if (typeof gl.yAxisScale[index] === \"undefined\") gl.yAxisScale[index] = [];\n        const range = Math.abs(maxY - minY);\n        if (y.logarithmic && range <= 5) gl.invalidLogScale = true;\n        if (y.logarithmic && range > 5) {\n            gl.allSeriesCollapsed = false;\n            gl.yAxisScale[index] = y.forceNiceScale ? this.logarithmicScaleNice(minY, maxY, y.logBase) : this.logarithmicScale(minY, maxY, y.logBase);\n        } else if (maxY === -Number.MAX_VALUE || !$e4b487e979d7c06d$var$Utils$1.isNumber(maxY) || minY === Number.MAX_VALUE || !$e4b487e979d7c06d$var$Utils$1.isNumber(minY)) gl.yAxisScale[index] = this.niceScale(Number.MIN_VALUE, 0, index);\n        else {\n            gl.allSeriesCollapsed = false;\n            gl.yAxisScale[index] = this.niceScale(minY, maxY, index);\n        }\n    }\n    /**\n   * @param {number} minX\n   * @param {number} maxX\n   */ setXScale(minX, maxX) {\n        const w2 = this.w;\n        const gl = w2.globals;\n        if (maxX === -Number.MAX_VALUE || !$e4b487e979d7c06d$var$Utils$1.isNumber(maxX)) gl.xAxisScale = this.linearScale(0, 10, 10);\n        else {\n            const ticks = gl.xTickAmount;\n            gl.xAxisScale = this.linearScale(minX, maxX, ticks, 0, w2.config.xaxis.max === void 0 ? w2.config.xaxis.stepSize : void 0);\n        }\n        return gl.xAxisScale;\n    }\n    scaleMultipleYAxes() {\n        const cnf = this.w.config;\n        const gl = this.w.globals;\n        this.coreUtils.setSeriesYAxisMappings();\n        const axisSeriesMap = gl.seriesYAxisMap;\n        const minYArr = gl.minYArr;\n        const maxYArr = gl.maxYArr;\n        const alignZeroParticipants = [];\n        const canAlignZero = !gl.isBarHorizontal;\n        gl.allSeriesCollapsed = true;\n        gl.barGroups = [];\n        axisSeriesMap.forEach((axisSeries, ai)=>{\n            const groupNames = [];\n            axisSeries.forEach((as)=>{\n                var _a;\n                const group = /** @type {Record<string,any>} */ (_a = cnf.series[as]) == null ? void 0 : _a.group;\n                if (groupNames.indexOf(group) < 0) groupNames.push(group);\n            });\n            if (axisSeries.length > 0) {\n                let minY = Number.MAX_VALUE;\n                let maxY = -Number.MAX_VALUE;\n                let lowestY = minY;\n                let highestY = maxY;\n                let seriesType;\n                let seriesGroupName;\n                if (cnf.chart.stacked) {\n                    const mapSeries = new Array(gl.dataPoints).fill(0);\n                    const sumSeries = [];\n                    const posSeries = [];\n                    const negSeries = [];\n                    groupNames.forEach(()=>{\n                        sumSeries.push(mapSeries.map(()=>Number.MIN_VALUE));\n                        posSeries.push(mapSeries.map(()=>Number.MIN_VALUE));\n                        negSeries.push(mapSeries.map(()=>Number.MIN_VALUE));\n                    });\n                    for(let i2 = 0; i2 < axisSeries.length; i2++){\n                        if (!seriesType && /** @type {Record<string,any>} */ cnf.series[axisSeries[i2]].type) seriesType = /** @type {Record<string,any>} */ cnf.series[axisSeries[i2]].type;\n                        const si = axisSeries[i2];\n                        if (/** @type {Record<string,any>} */ cnf.series[si].group) seriesGroupName = /** @type {Record<string,any>} */ cnf.series[si].group;\n                        else seriesGroupName = \"axis-\".concat(ai.toString());\n                        const collapsed = !(gl.collapsedSeriesIndices.indexOf(si) < 0 && gl.ancillaryCollapsedSeriesIndices.indexOf(si) < 0);\n                        if (!collapsed) {\n                            gl.allSeriesCollapsed = false;\n                            groupNames.forEach((gn, gni)=>{\n                                if (/** @type {Record<string,any>} */ cnf.series[si].group === gn) for(let j = 0; j < this.w.seriesData.series[si].length; j++){\n                                    const val = this.w.seriesData.series[si][j];\n                                    if (val >= 0) posSeries[gni][j] += val;\n                                    else negSeries[gni][j] += val;\n                                    sumSeries[gni][j] += val;\n                                    lowestY = Math.min(lowestY, val);\n                                    highestY = Math.max(highestY, val);\n                                }\n                            });\n                        }\n                        if (seriesType === \"bar\" || seriesType === \"column\") gl.barGroups.push(seriesGroupName);\n                    }\n                    if (!seriesType) seriesType = cnf.chart.type;\n                    if (seriesType === \"bar\" || seriesType === \"column\") groupNames.forEach((gn, gni)=>{\n                        minY = Math.min(minY, Math.min.apply(null, negSeries[gni]));\n                        maxY = Math.max(maxY, Math.max.apply(null, posSeries[gni]));\n                    });\n                    else {\n                        groupNames.forEach((gn, gni)=>{\n                            lowestY = Math.min(lowestY, Math.min.apply(null, sumSeries[gni]));\n                            highestY = Math.max(highestY, Math.max.apply(null, sumSeries[gni]));\n                        });\n                        minY = lowestY;\n                        maxY = highestY;\n                    }\n                    if (minY === Number.MIN_VALUE && maxY === Number.MIN_VALUE) maxY = -Number.MAX_VALUE;\n                } else for(let i2 = 0; i2 < axisSeries.length; i2++){\n                    const si = axisSeries[i2];\n                    minY = Math.min(minY, minYArr[si]);\n                    maxY = Math.max(maxY, maxYArr[si]);\n                    const collapsed = !(gl.collapsedSeriesIndices.indexOf(si) < 0 && gl.ancillaryCollapsedSeriesIndices.indexOf(si) < 0);\n                    if (!collapsed) gl.allSeriesCollapsed = false;\n                }\n                if (cnf.yaxis[ai].min !== void 0) {\n                    if (typeof cnf.yaxis[ai].min === \"function\") minY = cnf.yaxis[ai].min(minY);\n                    else minY = cnf.yaxis[ai].min;\n                }\n                if (cnf.yaxis[ai].max !== void 0) {\n                    if (typeof cnf.yaxis[ai].max === \"function\") maxY = cnf.yaxis[ai].max(maxY);\n                    else maxY = cnf.yaxis[ai].max;\n                }\n                gl.barGroups = gl.barGroups.filter((v2, i2, a2)=>a2.indexOf(v2) === i2);\n                const yaxe = cnf.yaxis[ai];\n                const participates = canAlignZero && yaxe.alignZero === true && !yaxe.logarithmic && yaxe.min === void 0 && yaxe.max === void 0 && gl.ignoreYAxisIndexes.indexOf(ai) < 0 && $e4b487e979d7c06d$var$Utils$1.isNumber(minY) && $e4b487e979d7c06d$var$Utils$1.isNumber(maxY);\n                if (participates) alignZeroParticipants.push({\n                    ai: ai,\n                    minY: minY,\n                    maxY: maxY\n                });\n                else {\n                    this.setYScaleForIndex(ai, minY, maxY);\n                    axisSeries.forEach((si)=>{\n                        minYArr[si] = gl.yAxisScale[ai].niceMin;\n                        maxYArr[si] = gl.yAxisScale[ai].niceMax;\n                    });\n                }\n            } else this.setYScaleForIndex(ai, 0, -Number.MAX_VALUE);\n        });\n        if (alignZeroParticipants.length >= 2) {\n            alignZeroParticipants.forEach((p2)=>{\n                this.setYScaleForIndex(p2.ai, p2.minY, p2.maxY);\n                axisSeriesMap[p2.ai].forEach((si)=>{\n                    minYArr[si] = gl.yAxisScale[p2.ai].niceMin;\n                    maxYArr[si] = gl.yAxisScale[p2.ai].niceMax;\n                });\n            });\n            let targetRatio = 0;\n            alignZeroParticipants.forEach((p2)=>{\n                const scale = gl.yAxisScale[p2.ai];\n                const range = scale.niceMax - scale.niceMin;\n                if (range > 0) {\n                    const r2 = -scale.niceMin / range;\n                    if (r2 > targetRatio) targetRatio = r2;\n                }\n            });\n            if (targetRatio > 1) targetRatio = 1;\n            if (targetRatio < 0) targetRatio = 0;\n            const niceRoundUp = (raw)=>{\n                if (raw <= 0) return 1;\n                const mag = Math.floor(Math.log10(raw));\n                const magPow = Math.pow(10, mag);\n                const msd = raw / magPow;\n                let mult;\n                if (msd <= 1 + 1e-9) mult = 1;\n                else if (msd <= 2 + 1e-9) mult = 2;\n                else if (msd <= 2.5 + 1e-9) mult = 2.5;\n                else if (msd <= 5 + 1e-9) mult = 5;\n                else mult = 10;\n                return mult * magPow;\n            };\n            alignZeroParticipants.forEach((p2)=>{\n                const scale = gl.yAxisScale[p2.ai];\n                if (!scale.result || scale.result.length < 2) return;\n                const range = scale.niceMax - scale.niceMin;\n                if (range <= 0) return;\n                const r2 = -scale.niceMin / range;\n                if (Math.abs(r2 - targetRatio) <= 1e-9) return;\n                const extendMin = r2 < targetRatio && targetRatio < 1 - 1e-9;\n                const extendMaxOnly = !extendMin && r2 > targetRatio && targetRatio > 1e-9;\n                if (!extendMin && !extendMaxOnly) return;\n                const targetNiceMin = extendMin ? -targetRatio * scale.niceMax / (1 - targetRatio) : scale.niceMin;\n                const targetNiceMax = extendMaxOnly ? -scale.niceMin * (1 - targetRatio) / targetRatio : scale.niceMax;\n                const newRange = targetNiceMax - targetNiceMin;\n                if (newRange <= 0) return;\n                const desiredTicks = Math.max(scale.result.length, 5);\n                const newStep = niceRoundUp(newRange / Math.max(desiredTicks - 1, 1));\n                if (newStep <= 0) return;\n                let newNiceMin;\n                let newNiceMax;\n                if (extendMin) {\n                    newNiceMin = Math.floor(targetNiceMin / newStep + 1e-9) * newStep;\n                    const requiredMax = targetRatio > 1e-9 ? newNiceMin * (targetRatio - 1) / targetRatio : scale.niceMax;\n                    const maxNeeded = Math.max(requiredMax, scale.niceMax);\n                    newNiceMax = Math.ceil(maxNeeded / newStep - 1e-9) * newStep;\n                } else {\n                    newNiceMax = Math.ceil(targetNiceMax / newStep - 1e-9) * newStep;\n                    const requiredMin = targetRatio < 1 - 1e-9 ? -targetRatio * newNiceMax / (1 - targetRatio) : scale.niceMin;\n                    const minNeeded = Math.min(requiredMin, scale.niceMin);\n                    newNiceMin = Math.floor(minNeeded / newStep + 1e-9) * newStep;\n                }\n                scale.result = [];\n                for(let v2 = newNiceMin; v2 <= newNiceMax + newStep * 1e-9; v2 = $e4b487e979d7c06d$var$Utils$1.preciseAddition(v2, newStep))scale.result.push($e4b487e979d7c06d$var$Utils$1.stripNumber(v2, 7));\n                scale.niceMin = newNiceMin;\n                scale.niceMax = newNiceMax;\n                axisSeriesMap[p2.ai].forEach((si)=>{\n                    minYArr[si] = scale.niceMin;\n                    maxYArr[si] = scale.niceMax;\n                });\n            });\n        } else if (alignZeroParticipants.length === 1) {\n            const p2 = alignZeroParticipants[0];\n            this.setYScaleForIndex(p2.ai, p2.minY, p2.maxY);\n            axisSeriesMap[p2.ai].forEach((si)=>{\n                minYArr[si] = gl.yAxisScale[p2.ai].niceMin;\n                maxYArr[si] = gl.yAxisScale[p2.ai].niceMax;\n            });\n        }\n    }\n}\nclass $e4b487e979d7c06d$var$Range {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n        this.scales = new $e4b487e979d7c06d$var$Scales(this.w);\n    }\n    init() {\n        this.setYRange();\n        this.setXRange();\n        this.setZRange();\n    }\n    /**\n   * One rendered x-pixel expressed in data units, used to widen the\n   * autoScaleYaxis window so a boundary point that is still drawn inside the\n   * plot survives a sub-pixel rounding error in `xaxis.min`/`xaxis.max`.\n   *\n   * The window is taken from the configured bounds (that is what maps onto the\n   * grid) and falls back to the series' own x-extent for whichever bound is\n   * unset. Returns 0 when there is nothing to scale against: `gridWidth` is\n   * still 0 before the first `plotCoords()` run, and a first render has no\n   * pixel round-trip to compensate for anyway.\n   *\n   * @param {number[] | undefined} seriesX\n   * @returns {number}\n   */ _xPixelTolerance(seriesX) {\n        const gridWidth = this.w.layout.gridWidth;\n        if (!gridWidth || !seriesX || !seriesX.length) return 0;\n        const cnfX = this.w.config.xaxis;\n        const lo = typeof cnfX.min === \"number\" ? cnfX.min : seriesX[0];\n        const hi = typeof cnfX.max === \"number\" ? cnfX.max : seriesX[seriesX.length - 1];\n        if (!(hi > lo)) return 0;\n        return (hi - lo) / gridWidth;\n    }\n    /**\n   * @param {number} startingSeriesIndex\n   * @param {number | null} [endingSeriesIndex]\n   */ getMinYMaxY(startingSeriesIndex, lowestY = Number.MAX_VALUE, highestY = -Number.MAX_VALUE, endingSeriesIndex = null) {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n        const cnf = this.w.config;\n        const gl = this.w.globals;\n        let maxY = -Number.MAX_VALUE;\n        let minY = Number.MIN_VALUE;\n        if (endingSeriesIndex === null) endingSeriesIndex = startingSeriesIndex + 1;\n        const series = this.w.seriesData.series;\n        let seriesMin = series;\n        let seriesMax = series;\n        if (cnf.chart.type === \"candlestick\") {\n            seriesMin = this.w.candleData.seriesCandleL;\n            seriesMax = this.w.candleData.seriesCandleH;\n        } else if (cnf.chart.type === \"boxPlot\") {\n            seriesMin = this.w.candleData.seriesCandleO;\n            seriesMax = this.w.candleData.seriesCandleC;\n        } else if (cnf.chart.type === \"violin\") {\n            seriesMin = this.w.violinData.seriesViolinMin;\n            seriesMax = this.w.violinData.seriesViolinMax;\n        } else if (this.w.axisFlags.isRangeData) {\n            seriesMin = this.w.rangeData.seriesRangeStart;\n            seriesMax = this.w.rangeData.seriesRangeEnd;\n        }\n        let autoScaleYaxis = false;\n        if (this.w.seriesData.seriesX.length >= endingSeriesIndex) {\n            const brush = /** @type {any} */ (_a = gl.brushSource) == null ? void 0 : _a.w.config.chart.brush;\n            if (cnf.chart.zoom.enabled && cnf.chart.zoom.autoScaleYaxis || (brush == null ? void 0 : brush.enabled) && (brush == null ? void 0 : brush.autoScaleYaxis)) autoScaleYaxis = true;\n        }\n        for(let i2 = startingSeriesIndex; i2 < endingSeriesIndex; i2++){\n            gl.dataPoints = Math.max(gl.dataPoints, series[i2].length);\n            const seriesType = /** @type {Record<string,any>} */ cnf.series[i2].type;\n            if (this.w.labelData.categoryLabels.length) gl.dataPoints = this.w.labelData.categoryLabels.filter((label)=>typeof label !== \"undefined\").length;\n            if (this.w.labelData.labels.length && cnf.xaxis.type !== \"datetime\" && /**\n       * @param {number} a\n       * @param {number[]} c\n       */ this.w.seriesData.series.reduce((a2, c2)=>a2 + c2.length, 0) !== 0) gl.dataPoints = Math.max(gl.dataPoints, this.w.labelData.labels.length);\n            let firstXIndex = 0;\n            let lastXIndex = series[i2].length - 1;\n            if (autoScaleYaxis) {\n                const xTolerance = this._xPixelTolerance(this.w.seriesData.seriesX[i2]);\n                if (cnf.xaxis.min) {\n                    const lowerBound = cnf.xaxis.min - xTolerance;\n                    for(; firstXIndex < lastXIndex && this.w.seriesData.seriesX[i2][firstXIndex] < lowerBound; firstXIndex++);\n                }\n                if (cnf.xaxis.max) {\n                    const upperBound = cnf.xaxis.max + xTolerance;\n                    for(; lastXIndex > firstXIndex && this.w.seriesData.seriesX[i2][lastXIndex] > upperBound; lastXIndex--);\n                }\n            }\n            const plainNumeric = seriesMin === series && seriesMax === series && cnf.chart.type !== \"boxPlot\" && seriesType !== \"candlestick\" && seriesType !== \"boxPlot\" && seriesType !== \"violin\" && seriesType !== \"rangeArea\" && seriesType !== \"rangeBar\" && !(this.w.seriesData.seriesGoals[i2] && this.w.seriesData.seriesGoals[i2].length);\n            if (plainNumeric) {\n                const arr = series[i2];\n                const jEnd = Math.min(lastXIndex, arr.length - 1);\n                const pe = (_b = this.w.seriesData._parsedExtrema) == null ? void 0 : _b[i2];\n                if (pe && pe.ref === arr && pe.len === arr.length && firstXIndex === 0 && jEnd === arr.length - 1) {\n                    if (pe.maxY > maxY) maxY = pe.maxY;\n                    if (pe.lowestY < lowestY) lowestY = pe.lowestY;\n                    if (pe.negMinY < 0 && pe.negMinY < minY) minY = pe.negMinY;\n                    if (pe.yDec > gl.yValueDecimal) gl.yValueDecimal = pe.yDec;\n                    if (pe.hasNulls) gl.hasNullValues = true;\n                } else {\n                    let yDec = gl.yValueDecimal;\n                    let hasNulls = false;\n                    for(let j = firstXIndex; j <= jEnd; j++){\n                        const val = arr[j];\n                        if (val !== null && typeof val === \"number\" && val === val && val !== Infinity && val !== -Infinity) {\n                            if (val > maxY) maxY = val;\n                            if (val < lowestY) lowestY = val;\n                            if (minY > val && val < 0) minY = val;\n                            if (!Number.isInteger(val)) {\n                                const av = val < 0 ? -val : val;\n                                if (av >= 1e-6 && av < 1e21) {\n                                    const str = \"\" + val;\n                                    const dot = str.indexOf(\".\");\n                                    const dec = dot === -1 ? 0 : str.length - dot - 1;\n                                    if (dec > yDec) yDec = dec;\n                                } else {\n                                    const nv = $e4b487e979d7c06d$var$Utils$1.noExponents(val);\n                                    if ($e4b487e979d7c06d$var$Utils$1.isFloat(nv)) yDec = Math.max(yDec, nv.toString().split(\".\")[1].length);\n                                }\n                            }\n                        } else hasNulls = true;\n                    }\n                    gl.yValueDecimal = yDec;\n                    if (hasNulls) gl.hasNullValues = true;\n                }\n                highestY = maxY;\n                if (seriesType === \"bar\" || seriesType === \"column\") {\n                    if (minY < 0 && maxY < 0) {\n                        maxY = 0;\n                        highestY = Math.max(highestY, 0);\n                    }\n                    if (minY === Number.MIN_VALUE) {\n                        minY = 0;\n                        lowestY = Math.min(lowestY, 0);\n                    }\n                }\n                continue;\n            }\n            for(let j = firstXIndex; j <= lastXIndex && j < this.w.seriesData.series[i2].length; j++){\n                let val = series[i2][j];\n                if (val !== null && $e4b487e979d7c06d$var$Utils$1.isNumber(val)) {\n                    if (typeof ((_c = seriesMax[i2]) == null ? void 0 : _c[j]) !== \"undefined\") {\n                        maxY = Math.max(maxY, seriesMax[i2][j]);\n                        lowestY = Math.min(lowestY, seriesMax[i2][j]);\n                    }\n                    if (typeof ((_d = seriesMin[i2]) == null ? void 0 : _d[j]) !== \"undefined\") {\n                        lowestY = Math.min(lowestY, seriesMin[i2][j]);\n                        highestY = Math.max(highestY, seriesMin[i2][j]);\n                    }\n                    switch(seriesType){\n                        case \"candlestick\":\n                            if (typeof this.w.candleData.seriesCandleC[i2][j] !== \"undefined\") {\n                                maxY = Math.max(maxY, this.w.candleData.seriesCandleH[i2][j]);\n                                lowestY = Math.min(lowestY, this.w.candleData.seriesCandleL[i2][j]);\n                            }\n                            break;\n                        case \"boxPlot\":\n                            if (typeof this.w.candleData.seriesCandleC[i2][j] !== \"undefined\") {\n                                maxY = Math.max(maxY, this.w.candleData.seriesCandleC[i2][j]);\n                                lowestY = Math.min(lowestY, this.w.candleData.seriesCandleO[i2][j]);\n                            }\n                            break;\n                        case \"violin\":\n                            if (typeof ((_e = this.w.violinData.seriesViolinMax[i2]) == null ? void 0 : _e[j]) !== \"undefined\") {\n                                maxY = Math.max(maxY, this.w.violinData.seriesViolinMax[i2][j]);\n                                lowestY = Math.min(lowestY, this.w.violinData.seriesViolinMin[i2][j]);\n                            }\n                            break;\n                    }\n                    if (seriesType && seriesType !== \"candlestick\" && seriesType !== \"boxPlot\" && seriesType !== \"violin\" && seriesType !== \"rangeArea\" && seriesType !== \"rangeBar\") {\n                        maxY = Math.max(maxY, this.w.seriesData.series[i2][j]);\n                        lowestY = Math.min(lowestY, this.w.seriesData.series[i2][j]);\n                    }\n                    if (this.w.seriesData.seriesGoals[i2] && this.w.seriesData.seriesGoals[i2][j] && Array.isArray(this.w.seriesData.seriesGoals[i2][j])) this.w.seriesData.seriesGoals[i2][j].forEach((g2)=>{\n                        maxY = Math.max(maxY, g2.value);\n                        lowestY = Math.min(lowestY, g2.value);\n                    });\n                    if (this.w.config.chart.type === \"boxPlot\" || seriesType === \"boxPlot\") {\n                        const boxPts = (_g = (_f = this.w.candleData.seriesBoxPoints) == null ? void 0 : _f[i2]) == null ? void 0 : _g[j];\n                        if (boxPts) for(let p2 = 0; p2 < boxPts.length; p2++){\n                            const pv = boxPts[p2];\n                            if (typeof pv === \"number\") {\n                                maxY = Math.max(maxY, pv);\n                                lowestY = Math.min(lowestY, pv);\n                            }\n                        }\n                    }\n                    highestY = maxY;\n                    val = $e4b487e979d7c06d$var$Utils$1.noExponents(val);\n                    if ($e4b487e979d7c06d$var$Utils$1.isFloat(val)) gl.yValueDecimal = Math.max(gl.yValueDecimal, val.toString().split(\".\")[1].length);\n                    if (minY > ((_h = seriesMin[i2]) == null ? void 0 : _h[j]) && ((_i = seriesMin[i2]) == null ? void 0 : _i[j]) < 0) minY = seriesMin[i2][j];\n                } else gl.hasNullValues = true;\n            }\n            if (seriesType === \"bar\" || seriesType === \"column\") {\n                if (minY < 0 && maxY < 0) {\n                    maxY = 0;\n                    highestY = Math.max(highestY, 0);\n                }\n                if (minY === Number.MIN_VALUE) {\n                    minY = 0;\n                    lowestY = Math.min(lowestY, 0);\n                }\n            }\n        }\n        if (cnf.chart.type === \"rangeBar\" && this.w.rangeData.seriesRangeStart.length && gl.isBarHorizontal) minY = lowestY;\n        if (cnf.chart.type === \"bar\") {\n            if (minY < 0 && maxY < 0) maxY = 0;\n            if (minY === Number.MIN_VALUE) minY = 0;\n        }\n        return {\n            minY: minY,\n            maxY: maxY,\n            lowestY: lowestY,\n            highestY: highestY\n        };\n    }\n    setYRange() {\n        const gl = this.w.globals;\n        const cnf = this.w.config;\n        gl.maxY = -Number.MAX_VALUE;\n        gl.minY = Number.MIN_VALUE;\n        let lowestYInAllSeries = Number.MAX_VALUE;\n        let minYMaxY;\n        if (gl.isMultipleYAxis) {\n            lowestYInAllSeries = Number.MAX_VALUE;\n            for(let i2 = 0; i2 < this.w.seriesData.series.length; i2++){\n                minYMaxY = this.getMinYMaxY(i2);\n                gl.minYArr[i2] = minYMaxY.lowestY;\n                gl.maxYArr[i2] = minYMaxY.highestY;\n                lowestYInAllSeries = Math.min(lowestYInAllSeries, minYMaxY.lowestY);\n            }\n        }\n        minYMaxY = this.getMinYMaxY(0, lowestYInAllSeries, void 0, this.w.seriesData.series.length);\n        if (cnf.chart.type === \"bar\") {\n            gl.minY = minYMaxY.minY;\n            gl.maxY = minYMaxY.maxY;\n        } else {\n            gl.minY = minYMaxY.lowestY;\n            gl.maxY = minYMaxY.highestY;\n        }\n        lowestYInAllSeries = minYMaxY.lowestY;\n        if (cnf.chart.stacked) this._setStackedMinMax();\n        if (cnf.chart.type === \"line\" || cnf.chart.type === \"area\" || cnf.chart.type === \"scatter\" || cnf.chart.type === \"candlestick\" || cnf.chart.type === \"boxPlot\" || cnf.chart.type === \"violin\" || cnf.chart.type === \"rangeBar\" && !gl.isBarHorizontal) {\n            if (gl.minY === Number.MIN_VALUE && lowestYInAllSeries !== -Number.MAX_VALUE && lowestYInAllSeries !== gl.maxY) gl.minY = lowestYInAllSeries;\n        } else gl.minY = gl.minY !== Number.MIN_VALUE ? Math.min(minYMaxY.minY, gl.minY) : minYMaxY.minY;\n        cnf.yaxis.forEach((yaxe, index)=>{\n            if (yaxe.max !== void 0) {\n                if (typeof yaxe.max === \"number\") gl.maxYArr[index] = yaxe.max;\n                else if (typeof yaxe.max === \"function\") gl.maxYArr[index] = yaxe.max(gl.isMultipleYAxis ? gl.maxYArr[index] : gl.maxY);\n                gl.maxY = gl.maxYArr[index];\n            }\n            if (yaxe.min !== void 0) {\n                if (typeof yaxe.min === \"number\") gl.minYArr[index] = yaxe.min;\n                else if (typeof yaxe.min === \"function\") gl.minYArr[index] = yaxe.min(gl.isMultipleYAxis ? gl.minYArr[index] === Number.MIN_VALUE ? 0 : gl.minYArr[index] : gl.minY);\n                gl.minY = gl.minYArr[index];\n            }\n        });\n        if (gl.isBarHorizontal) {\n            const minmax = [\n                \"min\",\n                \"max\"\n            ];\n            minmax.forEach((m2)=>{\n                if (cnf.xaxis[m2] !== void 0 && typeof cnf.xaxis[m2] === \"number\") m2 === \"min\" ? gl.minY = cnf.xaxis[m2] : gl.maxY = cnf.xaxis[m2];\n            });\n        }\n        if (gl.isMultipleYAxis) {\n            this.scales.scaleMultipleYAxes();\n            gl.minY = lowestYInAllSeries;\n        } else {\n            this.scales.setYScaleForIndex(0, gl.minY, gl.maxY);\n            gl.minY = gl.yAxisScale[0].niceMin;\n            gl.maxY = gl.yAxisScale[0].niceMax;\n            gl.minYArr[0] = gl.minY;\n            gl.maxYArr[0] = gl.maxY;\n        }\n        gl.barGroups = [];\n        gl.lineGroups = [];\n        gl.areaGroups = [];\n        cnf.series.forEach((s2)=>{\n            const _s = /** @type {any} */ s2;\n            const type = _s.type || cnf.chart.type;\n            switch(type){\n                case \"bar\":\n                case \"column\":\n                    gl.barGroups.push(_s.group);\n                    break;\n                case \"line\":\n                    gl.lineGroups.push(_s.group);\n                    break;\n                case \"area\":\n                    gl.areaGroups.push(_s.group);\n                    break;\n            }\n        });\n        gl.barGroups = gl.barGroups.filter((v2, i2, a2)=>a2.indexOf(v2) === i2);\n        gl.lineGroups = gl.lineGroups.filter((v2, i2, a2)=>a2.indexOf(v2) === i2);\n        gl.areaGroups = gl.areaGroups.filter((v2, i2, a2)=>a2.indexOf(v2) === i2);\n        return {\n            minY: gl.minY,\n            maxY: gl.maxY,\n            minYArr: gl.minYArr,\n            maxYArr: gl.maxYArr,\n            yAxisScale: gl.yAxisScale\n        };\n    }\n    setXRange() {\n        const gl = this.w.globals;\n        const cnf = this.w.config;\n        const isXNumeric = cnf.xaxis.type === \"numeric\" || cnf.xaxis.type === \"datetime\" || cnf.xaxis.type === \"category\" && !this.w.axisFlags.noLabelsProvided || this.w.axisFlags.noLabelsProvided || this.w.axisFlags.isXNumeric;\n        const getInitialMinXMaxX = ()=>{\n            var _a;\n            let minX = gl.minX;\n            let maxX = gl.maxX;\n            for(let i2 = 0; i2 < this.w.seriesData.series.length; i2++){\n                const lbls = /** @type {any} */ this.w.labelData.labels[i2];\n                if (!lbls) continue;\n                const pe = (_a = this.w.seriesData._parsedExtrema) == null ? void 0 : _a[i2];\n                if (pe && pe.xNumeric && pe.xref === lbls && pe.len === lbls.length) {\n                    if (pe.maxX > maxX) maxX = pe.maxX;\n                    if (pe.minX < minX) minX = pe.minX;\n                    continue;\n                }\n                for(let j = 0; j < lbls.length; j++){\n                    const v2 = lbls[j];\n                    if (v2 !== null && typeof v2 === \"number\" && v2 === v2) {\n                        if (v2 > maxX) maxX = v2;\n                        if (v2 < minX) minX = v2;\n                    }\n                }\n            }\n            gl.maxX = maxX;\n            gl.initialMaxX = maxX;\n            gl.minX = minX;\n            gl.initialMinX = minX;\n        };\n        if (this.w.axisFlags.isXNumeric) getInitialMinXMaxX();\n        if (this.w.axisFlags.noLabelsProvided) {\n            if (cnf.xaxis.categories.length === 0) {\n                gl.maxX = /** @type {any} */ this.w.labelData.labels[this.w.labelData.labels.length - 1];\n                gl.initialMaxX = /** @type {any} */ this.w.labelData.labels[this.w.labelData.labels.length - 1];\n                gl.minX = 1;\n                gl.initialMinX = 1;\n            }\n        }\n        if (this.w.axisFlags.isXNumeric || this.w.axisFlags.noLabelsProvided || this.w.axisFlags.dataFormatXNumeric) {\n            let ticks = 10;\n            if (cnf.xaxis.tickAmount === void 0) {\n                ticks = Math.round(gl.svgWidth / 150);\n                if (cnf.xaxis.type === \"numeric\" && gl.dataPoints < 30) ticks = gl.dataPoints - 1;\n                if (ticks > gl.dataPoints && gl.dataPoints !== 0) ticks = gl.dataPoints - 1;\n            } else if (cnf.xaxis.tickAmount === \"dataPoints\") {\n                if (this.w.seriesData.series.length > 1) ticks = this.w.seriesData.series[gl.maxValsInArrayIndex].length - 1;\n                if (this.w.axisFlags.isXNumeric) {\n                    const diff = Math.round(gl.maxX - gl.minX);\n                    if (diff < 30) ticks = diff;\n                }\n            } else ticks = cnf.xaxis.tickAmount;\n            gl.xTickAmount = ticks;\n            if (cnf.xaxis.max !== void 0 && typeof cnf.xaxis.max === \"number\") gl.maxX = cnf.xaxis.max;\n            if (cnf.xaxis.min !== void 0 && typeof cnf.xaxis.min === \"number\") gl.minX = cnf.xaxis.min;\n            if (cnf.xaxis.range !== void 0) gl.minX = gl.maxX - cnf.xaxis.range;\n            if (gl.minX !== Number.MAX_VALUE && gl.maxX !== -Number.MAX_VALUE) {\n                if (cnf.xaxis.convertedCatToNumeric && !this.w.axisFlags.dataFormatXNumeric) {\n                    const catScale = [];\n                    for(let i2 = gl.minX - 1; i2 < gl.maxX; i2++)catScale.push(i2 + 1);\n                    gl.xAxisScale = {\n                        result: catScale,\n                        niceMin: catScale[0],\n                        niceMax: catScale[catScale.length - 1]\n                    };\n                } else gl.xAxisScale = this.scales.setXScale(gl.minX, gl.maxX);\n            } else {\n                gl.xAxisScale = this.scales.linearScale(0, ticks, ticks, 0, cnf.xaxis.stepSize);\n                if (this.w.axisFlags.noLabelsProvided && this.w.labelData.labels.length > 0) {\n                    gl.xAxisScale = this.scales.linearScale(1, this.w.labelData.labels.length, ticks - 1, 0, cnf.xaxis.stepSize);\n                    this.w.seriesData.seriesX = /** @type {any} */ this.w.labelData.labels.slice();\n                }\n            }\n            if (isXNumeric) this.w.labelData.labels = /** @type {any} */ gl.xAxisScale.result.slice();\n        }\n        if (gl.isBarHorizontal && this.w.labelData.labels.length) gl.xTickAmount = this.w.labelData.labels.length;\n        this._handleSingleDataPoint();\n        this._getMinXDiff();\n        return {\n            minX: gl.minX,\n            maxX: gl.maxX\n        };\n    }\n    setZRange() {\n        const gl = this.w.globals;\n        if (!this.w.axisFlags.isDataXYZ) return;\n        for(let i2 = 0; i2 < this.w.seriesData.series.length; i2++)if (typeof this.w.seriesData.seriesZ[i2] !== \"undefined\") {\n            for(let j = 0; j < this.w.seriesData.seriesZ[i2].length; j++)if (this.w.seriesData.seriesZ[i2][j] !== null && $e4b487e979d7c06d$var$Utils$1.isNumber(this.w.seriesData.seriesZ[i2][j])) {\n                gl.maxZ = Math.max(gl.maxZ, this.w.seriesData.seriesZ[i2][j]);\n                gl.minZ = Math.min(gl.minZ, this.w.seriesData.seriesZ[i2][j]);\n            }\n        }\n    }\n    _handleSingleDataPoint() {\n        const gl = this.w.globals;\n        const cnf = this.w.config;\n        if (gl.minX === gl.maxX) {\n            const datetimeObj = new $e4b487e979d7c06d$var$DateTime(this.w);\n            if (cnf.xaxis.type === \"datetime\") {\n                const newMinX = datetimeObj.getDate(gl.minX);\n                if (cnf.xaxis.labels.datetimeUTC) newMinX.setUTCDate(newMinX.getUTCDate() - 2);\n                else newMinX.setDate(newMinX.getDate() - 2);\n                gl.minX = new Date(newMinX).getTime();\n                const newMaxX = datetimeObj.getDate(gl.maxX);\n                if (cnf.xaxis.labels.datetimeUTC) newMaxX.setUTCDate(newMaxX.getUTCDate() + 2);\n                else newMaxX.setDate(newMaxX.getDate() + 2);\n                gl.maxX = new Date(newMaxX).getTime();\n            } else if (cnf.xaxis.type === \"numeric\" || cnf.xaxis.type === \"category\" && !this.w.axisFlags.noLabelsProvided) {\n                gl.minX = gl.minX - 2;\n                gl.initialMinX = gl.minX;\n                gl.maxX = gl.maxX + 2;\n                gl.initialMaxX = gl.maxX;\n            }\n        }\n    }\n    _getMinXDiff() {\n        const gl = this.w.globals;\n        if (this.w.axisFlags.isXNumeric) this.w.seriesData.seriesX.forEach((sX, si)=>{\n            var _a;\n            if (sX.length) {\n                if (sX.length === 1) sX.push(this.w.seriesData.seriesX[gl.maxValsInArrayIndex][this.w.seriesData.seriesX[gl.maxValsInArrayIndex].length - 1]);\n                const pe = (_a = this.w.seriesData._parsedExtrema) == null ? void 0 : _a[si];\n                if (pe && pe.xNumeric && pe.xSorted && pe.xref === sX && pe.len === sX.length) {\n                    if (pe.minXDiff < gl.minXDiff) gl.minXDiff = pe.minXDiff;\n                    if (gl.dataPoints === 1 || gl.minXDiff === Number.MAX_VALUE) gl.minXDiff = 0.5;\n                    return;\n                }\n                let presorted = true;\n                let minDiff = gl.minXDiff;\n                for(let j = 1; j < sX.length; j++){\n                    const d = sX[j] - sX[j - 1];\n                    if (d > 0) {\n                        if (d < minDiff) minDiff = d;\n                    } else if (d < 0) {\n                        presorted = false;\n                        break;\n                    }\n                }\n                if (presorted) {\n                    gl.minXDiff = minDiff;\n                    if (gl.dataPoints === 1 || gl.minXDiff === Number.MAX_VALUE) gl.minXDiff = 0.5;\n                    return;\n                }\n                const seriesX = sX.slice();\n                seriesX.sort((a2, b2)=>a2 - b2);\n                seriesX.forEach((s2, j)=>{\n                    if (j > 0) {\n                        const xDiff = s2 - seriesX[j - 1];\n                        if (xDiff > 0) gl.minXDiff = Math.min(xDiff, gl.minXDiff);\n                    }\n                });\n                if (gl.dataPoints === 1 || gl.minXDiff === Number.MAX_VALUE) gl.minXDiff = 0.5;\n            }\n        });\n    }\n    _setStackedMinMax() {\n        const gl = this.w.globals;\n        if (!this.w.seriesData.series.length) return;\n        let seriesGroups = this.w.labelData.seriesGroups;\n        if (!seriesGroups.length) seriesGroups = [\n            this.w.seriesData.seriesNames.map((name2)=>name2)\n        ];\n        const stackedPoss = {};\n        const stackedNegs = {};\n        seriesGroups.forEach((group)=>{\n            stackedPoss[group] = [];\n            stackedNegs[group] = [];\n            const indicesOfSeriesInGroup = this.w.config.series.map((serie, si)=>group.indexOf(this.w.seriesData.seriesNames[si]) > -1 ? si : null).filter((f)=>f !== null);\n            indicesOfSeriesInGroup.forEach((i2)=>{\n                var _a, _b, _c, _d;\n                for(let j = 0; j < this.w.seriesData.series[gl.maxValsInArrayIndex].length; j++){\n                    if (typeof stackedPoss[group][j] === \"undefined\") {\n                        stackedPoss[group][j] = 0;\n                        stackedNegs[group][j] = 0;\n                    }\n                    const stackSeries = this.w.config.chart.stacked && !gl.comboCharts || this.w.config.chart.stacked && gl.comboCharts && (!this.w.config.chart.stackOnlyBar || /** @type {Record<string,any>} */ ((_b = (_a = this.w.config.series) == null ? void 0 : _a[i2]) == null ? void 0 : _b.type) === \"bar\" || /** @type {Record<string,any>} */ ((_d = (_c = this.w.config.series) == null ? void 0 : _c[i2]) == null ? void 0 : _d.type) === \"column\");\n                    if (stackSeries) {\n                        if (this.w.seriesData.series[i2][j] !== null && $e4b487e979d7c06d$var$Utils$1.isNumber(this.w.seriesData.series[i2][j])) this.w.seriesData.series[i2][j] > 0 ? stackedPoss[group][j] += parseFloat(String(this.w.seriesData.series[i2][j])) + 1e-4 : stackedNegs[group][j] += parseFloat(String(this.w.seriesData.series[i2][j]));\n                    }\n                }\n            });\n        });\n        Object.entries(stackedPoss).forEach(([key])=>{\n            stackedPoss[key].forEach((_, stgi)=>{\n                gl.maxY = Math.max(gl.maxY, stackedPoss[key][stgi]);\n                gl.minY = Math.min(gl.minY, stackedNegs[key][stgi]);\n            });\n        });\n    }\n}\nfunction $e4b487e979d7c06d$var$getThemePalettes() {\n    return {\n        // All colours pass WCAG 1.4.11 non-text contrast (≥ 3:1) against the\n        // default light (#fff) and dark (#293450) theme backgrounds.\n        palette1: [\n            \"#008FFB\",\n            \"#00A86F\",\n            \"#CA8501\",\n            \"#FF4560\",\n            \"#846DD5\"\n        ],\n        palette2: [\n            \"#6978CB\",\n            \"#039DE2\",\n            \"#49A84D\",\n            \"#B39105\",\n            \"#D68000\"\n        ],\n        palette3: [\n            \"#209FCC\",\n            \"#648291\",\n            \"#D4526E\",\n            \"#0FA783\",\n            \"#A19285\"\n        ],\n        palette4: [\n            \"#2FA59D\",\n            \"#73A20B\",\n            \"#099DE1\",\n            \"#FD5D5D\",\n            \"#648291\"\n        ],\n        palette5: [\n            \"#2B908F\",\n            \"#F56566\",\n            \"#2EAB16\",\n            \"#FA4443\",\n            \"#1EA2BD\"\n        ],\n        palette6: [\n            \"#449DD1\",\n            \"#F86624\",\n            \"#EA3A4A\",\n            \"#9C63D1\",\n            \"#899E2A\"\n        ],\n        palette7: [\n            \"#DF475B\",\n            \"#1B998B\",\n            \"#7E75B7\",\n            \"#F46036\",\n            \"#B1911B\"\n        ],\n        palette8: [\n            \"#9C63D1\",\n            \"#F86624\",\n            \"#B38F04\",\n            \"#EA3A4A\",\n            \"#2FA2B3\"\n        ],\n        palette9: [\n            \"#98776F\",\n            \"#A19285\",\n            \"#A8705E\",\n            \"#BA6560\",\n            \"#A0927F\"\n        ],\n        palette10: [\n            \"#C91EFF\",\n            \"#A94BFD\",\n            \"#6C6AFE\",\n            \"#2983FF\",\n            \"#009ED8\"\n        ],\n        // CVD-safe palettes (Wong 2011 / IBM design)\n        cvdDeuteranopia: [\n            \"#0072B2\",\n            \"#E69F00\",\n            \"#56B4E9\",\n            \"#009E73\",\n            \"#F0E442\",\n            \"#D55E00\",\n            \"#CC79A7\"\n        ],\n        cvdProtanopia: [\n            \"#0077BB\",\n            \"#EE7733\",\n            \"#009988\",\n            \"#EE3377\",\n            \"#BBBBBB\",\n            \"#33BBEE\",\n            \"#CC3311\"\n        ],\n        cvdTritanopia: [\n            \"#CC3311\",\n            \"#009988\",\n            \"#EE7733\",\n            \"#0077BB\",\n            \"#EE3377\",\n            \"#BBBBBB\",\n            \"#33BBEE\"\n        ],\n        highContrast: [\n            \"#005A9C\",\n            \"#C00000\",\n            \"#007A33\",\n            \"#6C3483\",\n            \"#7B3F00\",\n            \"#0097A7\",\n            \"#4A235A\"\n        ]\n    };\n}\nclass $e4b487e979d7c06d$var$YAxis {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {any} [elgrid]\n   */ constructor(w2, { theme: theme = null, timeScale: timeScale = null } = {}, elgrid){\n        this.w = w2;\n        this.elgrid = elgrid;\n        this.xaxisFontSize = w2.config.xaxis.labels.style.fontSize;\n        this.axisFontFamily = w2.config.xaxis.labels.style.fontFamily;\n        this.xaxisForeColors = w2.config.xaxis.labels.style.colors;\n        this.isCategoryBarHorizontal = w2.config.chart.type === \"bar\" && w2.config.plotOptions.bar.horizontal;\n        this.xAxisoffX = w2.config.xaxis.position === \"bottom\" ? w2.layout.gridHeight : 0;\n        this.drawnLabels = [];\n        this.axesUtils = new $e4b487e979d7c06d$var$AxesUtils(w2, {\n            theme: theme,\n            timeScale: timeScale\n        });\n    }\n    /**\n   * @param {number} realIndex\n   */ drawYaxis(realIndex) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const yaxisStyle = w2.config.yaxis[realIndex].labels.style;\n        const { fontSize: yaxisFontSize, fontFamily: yaxisFontFamily, fontWeight: yaxisFontWeight } = yaxisStyle;\n        const elYaxis = graphics.group({\n            class: \"apexcharts-yaxis\",\n            rel: realIndex,\n            transform: `translate(${w2.globals.translateYAxisX[realIndex]}, 0)`\n        });\n        if (this.axesUtils.isYAxisHidden(realIndex)) return elYaxis;\n        const elYaxisTexts = graphics.group({\n            class: \"apexcharts-yaxis-texts-g\"\n        });\n        elYaxis.add(elYaxisTexts);\n        const tickAmount = w2.globals.yAxisScale[realIndex].result.length - 1;\n        const labelsDivider = w2.layout.gridHeight / tickAmount;\n        const lbFormatter = w2.formatters.yLabelFormatters[realIndex];\n        const labels = this.axesUtils.checkForReversedLabels(realIndex, w2.globals.yAxisScale[realIndex].result.slice());\n        let labelStep = 1;\n        if (w2.config.chart.type === \"heatmap\" && !w2.config.yaxis[realIndex].labels.formatter) {\n            const fs = parseInt(yaxisFontSize, 10) || 11;\n            const maxLabels = Math.max(1, Math.floor(w2.layout.gridHeight / (fs * 1.4)));\n            const count = tickAmount + 1;\n            if (count > maxLabels) labelStep = Math.ceil(count / maxLabels);\n        }\n        if (w2.config.yaxis[realIndex].labels.show) {\n            let lY = w2.layout.translateY + w2.config.yaxis[realIndex].labels.offsetY;\n            if (w2.globals.isBarHorizontal) lY = 0;\n            else if (w2.config.chart.type === \"heatmap\") lY -= labelsDivider / 2;\n            lY += parseInt(yaxisFontSize, 10) / 3;\n            let firstLabel = null;\n            for(let i2 = tickAmount; i2 >= 0; i2--){\n                const thinned = labelStep > 1 && i2 % labelStep !== 0;\n                const val = thinned ? \"\" : lbFormatter(labels[i2], i2, w2);\n                let xPad = w2.config.yaxis[realIndex].labels.padding;\n                if (w2.config.yaxis[realIndex].opposite && w2.config.yaxis.length !== 0) xPad *= -1;\n                const textAnchor = this.getTextAnchor(w2.config.yaxis[realIndex].labels.align, w2.config.yaxis[realIndex].opposite);\n                const yColors = this.axesUtils.getYAxisForeColor(yaxisStyle.colors, realIndex);\n                const foreColor = Array.isArray(yColors) ? yColors[i2] : yColors;\n                const existingYLabels = Array.from(w2.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${realIndex}'] .apexcharts-yaxis-label tspan`)).map((label2)=>label2.textContent);\n                const label = graphics.drawText({\n                    x: xPad,\n                    y: lY,\n                    text: existingYLabels.includes(val) && !w2.config.yaxis[realIndex].labels.showDuplicates ? \"\" : val,\n                    textAnchor: textAnchor,\n                    fontSize: yaxisFontSize,\n                    fontFamily: yaxisFontFamily,\n                    fontWeight: yaxisFontWeight,\n                    maxWidth: w2.config.yaxis[realIndex].labels.maxWidth,\n                    foreColor: foreColor,\n                    isPlainText: false,\n                    cssClass: `apexcharts-yaxis-label ${yaxisStyle.cssClass}`\n                });\n                elYaxisTexts.add(label);\n                this.addTooltip(label, val);\n                if (firstLabel === null) firstLabel = label;\n                if (w2.config.yaxis[realIndex].labels.rotate !== 0) this.rotateLabel(graphics, label, firstLabel, w2.config.yaxis[realIndex].labels.rotate);\n                lY += labelsDivider;\n            }\n        }\n        this.addYAxisTitle(graphics, elYaxis, realIndex);\n        this.addAxisBorder(graphics, elYaxis, realIndex, tickAmount, labelsDivider);\n        return elYaxis;\n    }\n    /**\n   * @param {string} align\n   * @param {boolean} opposite\n   */ getTextAnchor(align, opposite) {\n        if (align === \"left\") return \"start\";\n        if (align === \"center\") return \"middle\";\n        if (align === \"right\") return \"end\";\n        return opposite ? \"start\" : \"end\";\n    }\n    /**\n   * @param {any} label\n   * @param {any} val\n   */ addTooltip(label, val) {\n        const elTooltipTitle = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"title\");\n        elTooltipTitle.textContent = Array.isArray(val) ? val.join(\" \") : val;\n        label.node.appendChild(elTooltipTitle);\n    }\n    /**\n   * @param {import('../Graphics').default} graphics\n   * @param {any} label\n   * @param {any} firstLabel\n   * @param {number} rotate\n   */ rotateLabel(graphics, label, firstLabel, rotate) {\n        const firstLabelCenter = graphics.rotateAroundCenter(firstLabel.node);\n        const labelCenter = graphics.rotateAroundCenter(label.node);\n        label.node.setAttribute(\"transform\", `rotate(${rotate} ${firstLabelCenter.x} ${labelCenter.y})`);\n    }\n    /**\n   * @param {import('../Graphics').default} graphics\n   * @param {any} elYaxis\n   * @param {number} realIndex\n   */ addYAxisTitle(graphics, elYaxis, realIndex) {\n        const w2 = this.w;\n        if (w2.config.yaxis[realIndex].title.text !== void 0) {\n            const elYaxisTitle = graphics.group({\n                class: \"apexcharts-yaxis-title\"\n            });\n            const x = w2.config.yaxis[realIndex].opposite ? w2.globals.translateYAxisX[realIndex] : 0;\n            const elYAxisTitleText = graphics.drawText({\n                x: x,\n                y: w2.layout.gridHeight / 2 + w2.layout.translateY + w2.config.yaxis[realIndex].title.offsetY,\n                text: w2.config.yaxis[realIndex].title.text,\n                textAnchor: \"end\",\n                foreColor: w2.config.yaxis[realIndex].title.style.color,\n                fontSize: w2.config.yaxis[realIndex].title.style.fontSize,\n                fontWeight: w2.config.yaxis[realIndex].title.style.fontWeight,\n                fontFamily: w2.config.yaxis[realIndex].title.style.fontFamily,\n                cssClass: `apexcharts-yaxis-title-text ${w2.config.yaxis[realIndex].title.style.cssClass}`\n            });\n            elYaxisTitle.add(elYAxisTitleText);\n            elYaxis.add(elYaxisTitle);\n        }\n    }\n    /**\n   * @param {import('../Graphics').default} graphics\n   * @param {any} elYaxis\n   * @param {number} realIndex\n   * @param {number} tickAmount\n   * @param {number} labelsDivider\n   */ addAxisBorder(graphics, elYaxis, realIndex, tickAmount, labelsDivider) {\n        const w2 = this.w;\n        const axisBorder = w2.config.yaxis[realIndex].axisBorder;\n        let x = 31 + axisBorder.offsetX;\n        if (w2.config.yaxis[realIndex].opposite) x = -31 - axisBorder.offsetX;\n        if (axisBorder.show) {\n            const elVerticalLine = graphics.drawLine(x, w2.layout.translateY + axisBorder.offsetY - 2, x, w2.layout.gridHeight + w2.layout.translateY + axisBorder.offsetY + 2, axisBorder.color, 0, axisBorder.width);\n            elYaxis.add(elVerticalLine);\n        }\n        if (w2.config.yaxis[realIndex].axisTicks.show) this.axesUtils.drawYAxisTicks(x, tickAmount, axisBorder, w2.config.yaxis[realIndex].axisTicks, realIndex, labelsDivider, elYaxis);\n    }\n    /**\n   * @param {number} realIndex\n   */ drawYaxisInversed(realIndex) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const elXaxis = graphics.group({\n            class: \"apexcharts-xaxis apexcharts-yaxis-inversed\"\n        });\n        const elXaxisTexts = graphics.group({\n            class: \"apexcharts-xaxis-texts-g\",\n            transform: `translate(${w2.layout.translateXAxisX}, ${w2.layout.translateXAxisY})`\n        });\n        elXaxis.add(elXaxisTexts);\n        let tickAmount = w2.globals.yAxisScale[realIndex].result.length - 1;\n        const labelsDivider = w2.layout.gridWidth / tickAmount + 0.1;\n        let l2 = labelsDivider + w2.config.xaxis.labels.offsetX;\n        const lbFormatter = w2.formatters.xLabelFormatter;\n        let labels = this.axesUtils.checkForReversedLabels(realIndex, w2.globals.yAxisScale[realIndex].result.slice());\n        const timescaleLabels = w2.labelData.timescaleLabels;\n        if (timescaleLabels.length > 0) {\n            this.xaxisLabels = timescaleLabels.slice();\n            labels = timescaleLabels.slice();\n            tickAmount = labels.length;\n        }\n        if (w2.config.xaxis.labels.show) for(let i2 = timescaleLabels.length ? 0 : tickAmount; timescaleLabels.length ? i2 < timescaleLabels.length : i2 >= 0; timescaleLabels.length ? i2++ : i2--){\n            let val = lbFormatter == null ? void 0 : lbFormatter(labels[i2], i2, w2);\n            let x = w2.layout.gridWidth + w2.globals.padHorizontal - (l2 - labelsDivider + w2.config.xaxis.labels.offsetX);\n            if (timescaleLabels.length) {\n                const label = this.axesUtils.getLabel(labels, timescaleLabels, x, i2, this.drawnLabels, this.xaxisFontSize);\n                x = label.x;\n                val = label.text;\n                this.drawnLabels.push(label.text);\n                if (i2 === 0 && w2.globals.skipFirstTimelinelabel) val = \"\";\n                if (i2 === labels.length - 1 && w2.globals.skipLastTimelinelabel) val = \"\";\n            }\n            const elTick = graphics.drawText({\n                x: x,\n                y: this.xAxisoffX + w2.config.xaxis.labels.offsetY + 30 - (w2.config.xaxis.position === \"top\" ? w2.layout.xAxisHeight + w2.config.xaxis.axisTicks.height - 2 : 0),\n                text: val,\n                textAnchor: \"middle\",\n                foreColor: Array.isArray(this.xaxisForeColors) ? this.xaxisForeColors[realIndex] : this.xaxisForeColors,\n                fontSize: this.xaxisFontSize,\n                fontFamily: this.axisFontFamily,\n                fontWeight: w2.config.xaxis.labels.style.fontWeight,\n                isPlainText: false,\n                cssClass: `apexcharts-xaxis-label ${w2.config.xaxis.labels.style.cssClass}`\n            });\n            elXaxisTexts.add(elTick);\n            this.addTooltip(elTick, val);\n            l2 += labelsDivider;\n        }\n        this.inversedYAxisTitleText(elXaxis);\n        this.inversedYAxisBorder(elXaxis);\n        return elXaxis;\n    }\n    /**\n   * @param {any} parent\n   */ inversedYAxisBorder(parent) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const axisBorder = w2.config.xaxis.axisBorder;\n        if (axisBorder.show) {\n            let lineCorrection = 0;\n            if (w2.config.chart.type === \"bar\" && w2.axisFlags.isXNumeric) lineCorrection -= 15;\n            const elHorzLine = graphics.drawLine(w2.globals.padHorizontal + lineCorrection + axisBorder.offsetX, this.xAxisoffX, w2.layout.gridWidth, this.xAxisoffX, axisBorder.color, 0, axisBorder.height);\n            if (this.elgrid && this.elgrid.elGridBorders && w2.config.grid.show) this.elgrid.elGridBorders.add(elHorzLine);\n            else parent.add(elHorzLine);\n        }\n    }\n    /**\n   * @param {any} parent\n   */ inversedYAxisTitleText(parent) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        if (w2.config.xaxis.title.text !== void 0) {\n            const elYaxisTitle = graphics.group({\n                class: \"apexcharts-xaxis-title apexcharts-yaxis-title-inversed\"\n            });\n            const elYAxisTitleText = graphics.drawText({\n                x: w2.layout.gridWidth / 2 + w2.config.xaxis.title.offsetX,\n                y: this.xAxisoffX + parseFloat(this.xaxisFontSize) + parseFloat(w2.config.xaxis.title.style.fontSize) + w2.config.xaxis.title.offsetY + 20,\n                text: w2.config.xaxis.title.text,\n                textAnchor: \"middle\",\n                fontSize: w2.config.xaxis.title.style.fontSize,\n                fontFamily: w2.config.xaxis.title.style.fontFamily,\n                fontWeight: w2.config.xaxis.title.style.fontWeight,\n                foreColor: w2.config.xaxis.title.style.color,\n                cssClass: `apexcharts-xaxis-title-text ${w2.config.xaxis.title.style.cssClass}`\n            });\n            elYaxisTitle.add(elYAxisTitleText);\n            parent.add(elYaxisTitle);\n        }\n    }\n    /**\n   * @param {number} realIndex\n   * @param {boolean} yAxisOpposite\n   */ yAxisTitleRotate(realIndex, yAxisOpposite) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const elYAxisLabelsWrap = w2.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${realIndex}'] .apexcharts-yaxis-texts-g`);\n        const yAxisLabelsCoord = elYAxisLabelsWrap ? elYAxisLabelsWrap.getBoundingClientRect() : {\n            width: 0,\n            height: 0\n        };\n        const yAxisTitle = w2.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${realIndex}'] .apexcharts-yaxis-title text`);\n        const yAxisTitleCoord = yAxisTitle ? yAxisTitle.getBoundingClientRect() : {\n            width: 0,\n            height: 0\n        };\n        if (yAxisTitle) {\n            const x = this.xPaddingForYAxisTitle(realIndex, yAxisLabelsCoord, yAxisTitleCoord, yAxisOpposite);\n            yAxisTitle.setAttribute(\"x\", String(x.xPos - (yAxisOpposite ? 10 : 0)));\n            const titleRotatingCenter = graphics.rotateAroundCenter(yAxisTitle);\n            yAxisTitle.setAttribute(\"transform\", `rotate(${yAxisOpposite ? w2.config.yaxis[realIndex].title.rotate * -1 : w2.config.yaxis[realIndex].title.rotate} ${titleRotatingCenter.x} ${titleRotatingCenter.y})`);\n        }\n    }\n    /**\n   * @param {number} realIndex\n   * @param {{width: number, height: number}} yAxisLabelsCoord\n   * @param {{width: number, height: number}} yAxisTitleCoord\n   * @param {boolean} yAxisOpposite\n   */ xPaddingForYAxisTitle(realIndex, yAxisLabelsCoord, yAxisTitleCoord, yAxisOpposite) {\n        const w2 = this.w;\n        let x = 0;\n        let padd = 10;\n        if (w2.config.yaxis[realIndex].title.text === void 0 || realIndex < 0) return {\n            xPos: x,\n            padd: 0\n        };\n        if (yAxisOpposite) x = yAxisLabelsCoord.width + w2.config.yaxis[realIndex].title.offsetX + yAxisTitleCoord.width / 2 + padd / 2;\n        else {\n            x = yAxisLabelsCoord.width * -1 + w2.config.yaxis[realIndex].title.offsetX + padd / 2 + yAxisTitleCoord.width / 2;\n            if (w2.globals.isBarHorizontal) {\n                padd = 25;\n                x = yAxisLabelsCoord.width * -1 - w2.config.yaxis[realIndex].title.offsetX - padd;\n            }\n        }\n        return {\n            xPos: x,\n            padd: padd\n        };\n    }\n    /**\n   * @param {Array<{width: number, height: number}>} yaxisLabelCoords\n   * @param {Array<{width: number, height: number}>} yTitleCoords\n   */ setYAxisXPosition(yaxisLabelCoords, yTitleCoords) {\n        const w2 = this.w;\n        let xLeft = 0;\n        let xRight = 0;\n        let leftOffsetX = 18;\n        let rightOffsetX = 1;\n        if (w2.config.yaxis.length > 1) this.multipleYs = true;\n        w2.config.yaxis.forEach((yaxe, index)=>{\n            const shouldNotDrawAxis = w2.globals.ignoreYAxisIndexes.includes(index) || !yaxe.show || yaxe.floating || yaxisLabelCoords[index].width === 0;\n            const axisWidth = yaxisLabelCoords[index].width + yTitleCoords[index].width;\n            if (!yaxe.opposite) {\n                xLeft = w2.layout.translateX - leftOffsetX;\n                if (!shouldNotDrawAxis) leftOffsetX += axisWidth + 20;\n                w2.globals.translateYAxisX[index] = xLeft + yaxe.labels.offsetX;\n            } else if (w2.globals.isBarHorizontal) {\n                xRight = w2.layout.gridWidth + w2.layout.translateX - 1;\n                w2.globals.translateYAxisX[index] = xRight - yaxe.labels.offsetX;\n            } else {\n                xRight = w2.layout.gridWidth + w2.layout.translateX + rightOffsetX;\n                if (!shouldNotDrawAxis) rightOffsetX += axisWidth + 20;\n                w2.globals.translateYAxisX[index] = xRight - yaxe.labels.offsetX + 20;\n            }\n        });\n    }\n    setYAxisTextAlignments() {\n        const w2 = this.w;\n        const yaxis = Array.from(w2.dom.baseEl.getElementsByClassName(\"apexcharts-yaxis\"));\n        yaxis.forEach((y, index)=>{\n            const yaxe = w2.config.yaxis[index];\n            if (yaxe && !yaxe.floating && yaxe.labels.align !== void 0) {\n                const yAxisInner = w2.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-texts-g`);\n                const yAxisTexts = Array.from(w2.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-label`));\n                const rect = /** @type {Element} */ yAxisInner.getBoundingClientRect();\n                yAxisTexts.forEach((label)=>{\n                    label.setAttribute(\"text-anchor\", yaxe.labels.align);\n                });\n                if (yaxe.labels.align === \"left\" && !yaxe.opposite) yAxisInner.setAttribute(\"transform\", `translate(-${rect.width}, 0)`);\n                else if (yaxe.labels.align === \"center\") yAxisInner.setAttribute(\"transform\", `translate(${rect.width / 2 * (!yaxe.opposite ? -1 : 1)}, 0)`);\n                else if (yaxe.labels.align === \"right\" && yaxe.opposite) yAxisInner.setAttribute(\"transform\", `translate(${rect.width}, 0)`);\n            }\n        });\n    }\n}\nclass $e4b487e979d7c06d$var$Events {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.documentEvent = this.documentEvent.bind(this);\n    }\n    /**\n   * @param {string} name\n   * @param {Function} handler\n   */ addEventListener(name2, handler) {\n        const w2 = this.w;\n        if (Object.prototype.hasOwnProperty.call(w2.globals.events, name2)) w2.globals.events[name2].push(handler);\n        else w2.globals.events[name2] = [\n            handler\n        ];\n    }\n    /**\n   * @param {string} name\n   * @param {Function} handler\n   */ removeEventListener(name2, handler) {\n        const w2 = this.w;\n        if (!Object.prototype.hasOwnProperty.call(w2.globals.events, name2)) return;\n        const index = /** @type {Record<string,any>} */ w2.globals.events[name2].indexOf(handler);\n        if (index !== -1) w2.globals.events[name2].splice(index, 1);\n    }\n    /**\n   * @param {string} name\n   * @param {any[]} args\n   */ fireEvent(name2, args) {\n        const w2 = this.w;\n        if (!Object.prototype.hasOwnProperty.call(w2.globals.events, name2)) return;\n        if (!args || !args.length) args = [];\n        const evs = /** @type {Record<string,any>} */ w2.globals.events[name2];\n        const l2 = evs.length;\n        for(let i2 = 0; i2 < l2; i2++)evs[i2].apply(null, args);\n    }\n    setupEventHandlers() {\n        const w2 = this.w;\n        const me = this.ctx;\n        const clickableArea = w2.dom.baseEl.querySelector(w2.globals.chartClass);\n        this.ctx.eventList.forEach((event)=>{\n            clickableArea == null || clickableArea.addEventListener(event, (e2)=>{\n                const capturedSeriesIndex = e2.target.getAttribute(\"i\") === null && w2.interact.capturedSeriesIndex !== -1 ? w2.interact.capturedSeriesIndex : e2.target.getAttribute(\"i\");\n                const capturedDataPointIndex = e2.target.getAttribute(\"j\") === null && w2.interact.capturedDataPointIndex !== -1 ? w2.interact.capturedDataPointIndex : e2.target.getAttribute(\"j\");\n                const opts = Object.assign({}, w2, {\n                    seriesIndex: w2.globals.axisCharts ? capturedSeriesIndex : 0,\n                    dataPointIndex: capturedDataPointIndex\n                });\n                if (e2.type === \"keydown\") {\n                    if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.keyboard.enabled) {\n                        if (me.ctx.keyboardNavigation) me.ctx.keyboardNavigation.handleKey(e2);\n                        if (typeof w2.config.chart.events.keyDown === \"function\") w2.config.chart.events.keyDown(e2, me, opts);\n                        me.ctx.events.fireEvent(\"keydown\", [\n                            e2,\n                            me,\n                            opts\n                        ]);\n                    }\n                } else if (e2.type === \"keyup\") {\n                    if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.keyboard.enabled) {\n                        if (typeof w2.config.chart.events.keyUp === \"function\") w2.config.chart.events.keyUp(e2, me, opts);\n                        me.ctx.events.fireEvent(\"keyup\", [\n                            e2,\n                            me,\n                            opts\n                        ]);\n                    }\n                } else if (e2.type === \"mousemove\" || e2.type === \"touchmove\") {\n                    if (typeof w2.config.chart.events.mouseMove === \"function\") w2.config.chart.events.mouseMove(e2, me, opts);\n                } else if (e2.type === \"mouseleave\" || e2.type === \"touchleave\") {\n                    if (typeof w2.config.chart.events.mouseLeave === \"function\") w2.config.chart.events.mouseLeave(e2, me, opts);\n                } else if (e2.type === \"mouseup\" && e2.which === 1 || e2.type === \"touchend\") {\n                    if (typeof w2.config.chart.events.click === \"function\") w2.config.chart.events.click(e2, me, opts);\n                    me.ctx.events.fireEvent(\"click\", [\n                        e2,\n                        me,\n                        opts\n                    ]);\n                }\n            }, {\n                capture: false,\n                passive: true\n            });\n        });\n        this.ctx.eventList.forEach((event)=>{\n            w2.dom.baseEl.addEventListener(event, this.documentEvent, {\n                passive: true\n            });\n        });\n        this.ctx.core.setupBrushHandler();\n    }\n    /**\n   * @param {any} e\n   */ documentEvent(e2) {\n        const w2 = this.w;\n        const target = e2.target.className;\n        if (e2.type === \"click\") {\n            const elMenu = w2.dom.baseEl.querySelector(\".apexcharts-menu\");\n            if (elMenu && elMenu.classList.contains(\"apexcharts-menu-open\") && target !== \"apexcharts-menu-icon\") elMenu.classList.remove(\"apexcharts-menu-open\");\n        }\n        w2.interact.clientX = e2.type === \"touchmove\" ? e2.touches[0].clientX : e2.clientX;\n        w2.interact.clientY = e2.type === \"touchmove\" ? e2.touches[0].clientY : e2.clientY;\n    }\n}\nclass $e4b487e979d7c06d$var$Localization {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n    }\n    /**\n   * @param {string} localeName\n   */ setCurrentLocaleValues(localeName) {\n        let locales = this.w.config.chart.locales;\n        const globalApex = $e4b487e979d7c06d$var$Environment.getApex();\n        if (globalApex.chart && globalApex.chart.locales && globalApex.chart.locales.length > 0) locales = this.w.config.chart.locales.concat(globalApex.chart.locales);\n        const selectedLocale = locales.filter((c2)=>c2.name === localeName)[0];\n        if (selectedLocale) {\n            const ret = $e4b487e979d7c06d$var$Utils$1.extend($e4b487e979d7c06d$var$en, selectedLocale);\n            this.w.globals.locale = ret.options;\n        } else throw new Error(\"Wrong locale name provided. Please make sure you set the correct locale name in options\");\n    }\n}\nclass $e4b487e979d7c06d$var$Axes {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n    }\n    /**\n   * @param {string} type\n   * @param {any} elgrid\n   */ drawAxis(type, elgrid) {\n        const gl = this.w.globals;\n        const cnf = this.w.config;\n        const xAxis = new $e4b487e979d7c06d$var$XAxis(this.w, this.ctx, elgrid);\n        const yAxis = new $e4b487e979d7c06d$var$YAxis(this.w, {\n            theme: this.ctx.theme,\n            timeScale: this.ctx.timeScale\n        }, elgrid);\n        if (gl.axisCharts && type !== \"radar\") {\n            let elXaxis, elYaxis;\n            if (gl.isBarHorizontal) {\n                elYaxis = yAxis.drawYaxisInversed(0);\n                elXaxis = xAxis.drawXaxisInversed(0);\n                this.w.dom.elGraphical.add(elXaxis);\n                this.w.dom.elGraphical.add(elYaxis);\n            } else {\n                elXaxis = xAxis.drawXaxis();\n                this.w.dom.elGraphical.add(elXaxis);\n                cnf.yaxis.map((yaxe, index)=>{\n                    if (gl.ignoreYAxisIndexes.indexOf(index) === -1) {\n                        elYaxis = yAxis.drawYaxis(index);\n                        this.w.dom.Paper.add(elYaxis);\n                        if (this.w.config.grid.position === \"back\") {\n                            const inner = this.w.dom.Paper.children()[1];\n                            if (inner) {\n                                inner.remove();\n                                this.w.dom.Paper.add(inner);\n                            }\n                        }\n                    }\n                });\n            }\n        }\n    }\n}\nclass $e4b487e979d7c06d$var$Crosshairs {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n    }\n    drawXCrosshairs() {\n        const w2 = this.w;\n        w2.dom.elGraphical.node.querySelectorAll(\":scope > .apexcharts-xcrosshairs\").forEach((el)=>el.remove());\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n        const crosshairGradient = w2.config.xaxis.crosshairs.fill.gradient;\n        const crosshairShadow = w2.config.xaxis.crosshairs.dropShadow;\n        const fillType = w2.config.xaxis.crosshairs.fill.type;\n        const gradientFrom = crosshairGradient.colorFrom;\n        const gradientTo = crosshairGradient.colorTo;\n        const opacityFrom = crosshairGradient.opacityFrom;\n        const opacityTo = crosshairGradient.opacityTo;\n        const stops = crosshairGradient.stops;\n        const shadow = \"none\";\n        const dropShadow = crosshairShadow.enabled;\n        const shadowLeft = crosshairShadow.left;\n        const shadowTop = crosshairShadow.top;\n        const shadowBlur = crosshairShadow.blur;\n        const shadowColor = crosshairShadow.color;\n        const shadowOpacity = crosshairShadow.opacity;\n        let xcrosshairsFill = w2.config.xaxis.crosshairs.fill.color;\n        if (w2.config.xaxis.crosshairs.show) {\n            if (fillType === \"gradient\") xcrosshairsFill = graphics.drawGradient(\"vertical\", gradientFrom, gradientTo, opacityFrom, opacityTo, null, stops, []);\n            let xcrosshairs = w2.config.xaxis.crosshairs.width === 1 ? graphics.drawLine(0, 0, 0, 0) : graphics.drawRect();\n            let gridHeight = w2.layout.gridHeight;\n            if (!$e4b487e979d7c06d$var$Utils$1.isNumber(gridHeight) || gridHeight < 0) gridHeight = 0;\n            let crosshairsWidth = w2.config.xaxis.crosshairs.width;\n            if (!$e4b487e979d7c06d$var$Utils$1.isNumber(crosshairsWidth) || Number(crosshairsWidth) < 0) crosshairsWidth = 0;\n            xcrosshairs.attr({\n                class: \"apexcharts-xcrosshairs\",\n                x: 0,\n                y: 0,\n                y2: gridHeight,\n                width: crosshairsWidth,\n                height: gridHeight,\n                fill: xcrosshairsFill,\n                filter: shadow,\n                \"fill-opacity\": w2.config.xaxis.crosshairs.opacity,\n                stroke: w2.config.xaxis.crosshairs.stroke.color,\n                \"stroke-width\": w2.config.xaxis.crosshairs.stroke.width,\n                \"stroke-dasharray\": w2.config.xaxis.crosshairs.stroke.dashArray\n            });\n            if (dropShadow) xcrosshairs = filters.dropShadow(xcrosshairs, {\n                left: shadowLeft,\n                top: shadowTop,\n                blur: shadowBlur,\n                color: shadowColor,\n                opacity: shadowOpacity\n            });\n            w2.dom.elGraphical.add(xcrosshairs);\n        }\n    }\n    drawYCrosshairs() {\n        const w2 = this.w;\n        w2.dom.elGraphical.node.querySelectorAll(\":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden\").forEach((el)=>el.remove());\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const crosshair = /** @type {any[]} */ w2.config.yaxis[0].crosshairs;\n        const offX = w2.globals.barPadForNumericAxis;\n        if (/** @type {any[]} */ w2.config.yaxis[0].crosshairs.show) {\n            const ycrosshairs = graphics.drawLine(-offX, 0, w2.layout.gridWidth + offX, 0, crosshair.stroke.color, crosshair.stroke.dashArray, crosshair.stroke.width);\n            ycrosshairs.attr({\n                class: \"apexcharts-ycrosshairs\"\n            });\n            w2.dom.elGraphical.add(ycrosshairs);\n        }\n        const ycrosshairsHidden = graphics.drawLine(-offX, 0, w2.layout.gridWidth + offX, 0, crosshair.stroke.color, 0, 0);\n        ycrosshairsHidden.attr({\n            class: \"apexcharts-ycrosshairs-hidden\"\n        });\n        w2.dom.elGraphical.add(ycrosshairsHidden);\n    }\n}\nfunction $e4b487e979d7c06d$var$mergeYaxisOverride(base, override) {\n    if (!$e4b487e979d7c06d$var$Utils$1.isObject(base) || !$e4b487e979d7c06d$var$Utils$1.isObject(override)) return override !== void 0 ? override : base;\n    const out = $e4b487e979d7c06d$var$__spreadValues({}, base);\n    for (const key of Object.keys(override)){\n        const v2 = override[key];\n        if (v2 === void 0) continue;\n        if ($e4b487e979d7c06d$var$Utils$1.isObject(v2) && $e4b487e979d7c06d$var$Utils$1.isObject(base[key])) out[key] = $e4b487e979d7c06d$var$mergeYaxisOverride(base[key], v2);\n        else out[key] = v2;\n    }\n    return out;\n}\nclass $e4b487e979d7c06d$var$Responsive {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n        this._activeBreakpoint = null;\n    }\n    // the opts parameter if not null has to be set overriding everything\n    // as the opts is set by user externally\n    /**\n   * @param {object} opts\n   */ checkResponsiveConfig(opts) {\n        const w2 = this.w;\n        const cnf = w2.config;\n        if (cnf.responsive.length === 0) return;\n        const res = cnf.responsive.slice();\n        res.sort((a2, b2)=>a2.breakpoint > b2.breakpoint ? 1 : b2.breakpoint > a2.breakpoint ? -1 : 0).reverse();\n        const config = new $e4b487e979d7c06d$var$Config({});\n        const iterateResponsiveOptions = (newOptions = {})=>{\n            var _a;\n            const largestBreakpoint = res[0].breakpoint;\n            const width = $e4b487e979d7c06d$var$Environment.isBrowser() ? window.innerWidth > 0 ? window.innerWidth : screen.width : 0;\n            if (width > largestBreakpoint) {\n                if (this._activeBreakpoint !== null) {\n                    if (!w2.globals.initialConfig) return;\n                    const initialConfig = $e4b487e979d7c06d$var$Utils$1.clone(w2.globals.initialConfig);\n                    initialConfig.series = $e4b487e979d7c06d$var$Utils$1.clone(w2.config.series);\n                    const options2 = $e4b487e979d7c06d$var$CoreUtils.extendArrayProps(config, initialConfig, w2);\n                    newOptions = $e4b487e979d7c06d$var$Utils$1.extend(options2, newOptions);\n                    this.overrideResponsiveOptions(newOptions);\n                    this._activeBreakpoint = null;\n                }\n            } else {\n                for(let i2 = 0; i2 < res.length; i2++)if (width < res[i2].breakpoint) {\n                    const originalUserYaxis = ((_a = res[i2].options) == null ? void 0 : _a.yaxis) ? $e4b487e979d7c06d$var$Utils$1.clone(res[i2].options.yaxis) : null;\n                    newOptions = $e4b487e979d7c06d$var$CoreUtils.extendArrayProps(config, res[i2].options, w2);\n                    newOptions = $e4b487e979d7c06d$var$Utils$1.extend(w2.config, newOptions);\n                    if (Array.isArray(w2.config.yaxis) && originalUserYaxis) {\n                        const userYaxis = Array.isArray(originalUserYaxis) ? originalUserYaxis : [\n                            originalUserYaxis\n                        ];\n                        newOptions = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, newOptions), {\n                            yaxis: w2.config.yaxis.map((baseAxis, idx)=>$e4b487e979d7c06d$var$mergeYaxisOverride(baseAxis, userYaxis[idx]))\n                        });\n                    }\n                    this.overrideResponsiveOptions(newOptions);\n                    this._activeBreakpoint = res[i2].breakpoint;\n                }\n            }\n        };\n        if (opts) {\n            let options2 = $e4b487e979d7c06d$var$CoreUtils.extendArrayProps(config, opts, w2);\n            options2 = $e4b487e979d7c06d$var$Utils$1.extend(w2.config, options2);\n            options2 = $e4b487e979d7c06d$var$Utils$1.extend(options2, opts);\n            iterateResponsiveOptions(options2);\n        } else iterateResponsiveOptions({});\n    }\n    /**\n   * @param {Record<string, any>} newOptions\n   */ overrideResponsiveOptions(newOptions) {\n        const newConfig = new $e4b487e979d7c06d$var$Config(newOptions).init({\n            responsiveOverride: true\n        });\n        this.w.config = /** @type {any} */ newConfig;\n    }\n}\nfunction $e4b487e979d7c06d$var$captureStreamFrame(w2) {\n    var _a, _b, _c;\n    const gl = w2.globals;\n    if (!gl.axisCharts || !w2.seriesData || !Array.isArray(w2.seriesData.series) || w2.seriesData.series.length === 0) {\n        gl.prevStreamFrame = null;\n        return;\n    }\n    const rPixels = [];\n    if ((_b = (_a = w2.dom) == null ? void 0 : _a.baseEl) == null ? void 0 : _b.querySelectorAll) w2.dom.baseEl.querySelectorAll(\".apexcharts-marker\").forEach((node)=>{\n        var _a2, _b2, _c2, _d, _e;\n        const ri = parseInt((_a2 = node.getAttribute(\"index\")) != null ? _a2 : \"\", 10);\n        const j = parseInt((_c2 = (_b2 = node.getAttribute(\"j\")) != null ? _b2 : node.getAttribute(\"rel\")) != null ? _c2 : \"\", 10);\n        const r2 = parseFloat((_e = (_d = node.getAttribute(\"r\")) != null ? _d : node.getAttribute(\"default-marker-size\")) != null ? _e : \"\");\n        if (isFinite(ri) && isFinite(j) && isFinite(r2)) (rPixels[ri] = rPixels[ri] || [])[j] = r2;\n    });\n    gl.prevStreamFrame = {\n        seriesX: (w2.seriesData.seriesX || []).slice(),\n        seriesY: w2.seriesData.series.slice(),\n        xPixels: (gl.seriesXvalues || []).slice(),\n        yPixels: (gl.seriesYvalues || []).slice(),\n        rPixels: rPixels,\n        labels: (gl.labels || []).slice(),\n        isXNumeric: !!((_c = w2.axisFlags) == null ? void 0 : _c.isXNumeric)\n    };\n}\nfunction $e4b487e979d7c06d$var$detectStreamScroll(w2, realIndex, newXPixels, newYPixels) {\n    var _a;\n    const gl = w2.globals;\n    const frame = gl.prevStreamFrame;\n    if (!frame || !gl.dataChanged || !((_a = w2.axisFlags) == null ? void 0 : _a.isXNumeric)) return null;\n    const oldX = frame.seriesX[realIndex];\n    const oldY = frame.seriesY[realIndex];\n    const newX = w2.seriesData.seriesX[realIndex];\n    const newY = w2.seriesData.series[realIndex];\n    if (!oldX || !oldY || !newX || !newY) return null;\n    if (oldX.length < 3 || newX.length < 3) return null;\n    let k = -1;\n    for(let i2 = 0; i2 < oldX.length; i2++)if (oldX[i2] === newX[0]) {\n        k = i2;\n        break;\n    }\n    if (k === -1) return null;\n    const overlap = Math.min(oldX.length - k, newX.length);\n    if (overlap < 2) return null;\n    const appended = newX.length - overlap;\n    if (k === 0 && appended === 0) return null;\n    for(let i2 = 0; i2 < overlap; i2++){\n        if (oldX[k + i2] !== newX[i2]) return null;\n        const oy = oldY[k + i2];\n        const ny = newY[i2];\n        if (oy !== ny && !(oy == null && ny == null)) return null;\n    }\n    const oldXP = frame.xPixels[realIndex];\n    const oldYP = frame.yPixels[realIndex];\n    if (!oldXP || !oldYP) return null;\n    let a2 = -1;\n    let b2 = -1;\n    for(let i2 = 0; i2 < overlap; i2++){\n        if (oldXP[k + i2] == null || oldYP[k + i2] == null || newXPixels[i2] == null || newYPixels[i2] == null) continue;\n        if (a2 === -1) a2 = i2;\n        b2 = i2;\n    }\n    if (a2 === -1 || b2 <= a2) return null;\n    const nxA = /** @type {number} */ newXPixels[a2];\n    const nxB = /** @type {number} */ newXPixels[b2];\n    const oxA = /** @type {number} */ oldXP[k + a2];\n    const oxB = /** @type {number} */ oldXP[k + b2];\n    if (Math.abs(nxB - nxA) < 1e-6) return null;\n    const ax = (oxB - oxA) / (nxB - nxA);\n    const bx = oxA - ax * nxA;\n    if (!isFinite(ax) || !isFinite(bx)) return null;\n    if (Math.abs(ax - 1) > 0.02) return null;\n    if (Math.abs(bx) < 0.5) return null;\n    let yLo = a2;\n    let yHi = a2;\n    for(let i2 = a2; i2 <= b2; i2++){\n        const ny = newYPixels[i2];\n        if (ny == null || oldYP[k + i2] == null) continue;\n        if (ny < /** @type {number} */ newYPixels[yLo]) yLo = i2;\n        if (ny > /** @type {number} */ newYPixels[yHi]) yHi = i2;\n    }\n    let ay = 1;\n    let by = 0;\n    const nyLo = /** @type {number} */ newYPixels[yLo];\n    const nyHi = /** @type {number} */ newYPixels[yHi];\n    if (Math.abs(nyHi - nyLo) > 1e-6) {\n        ay = /** @type {number} */ (oldYP[k + yHi] - /** @type {number} */ oldYP[k + yLo]) / (nyHi - nyLo);\n        by = /** @type {number} */ oldYP[k + yLo] - ay * nyLo;\n    } else by = /** @type {number} */ oldYP[k + yLo] - nyLo;\n    if (!isFinite(ay) || !isFinite(by) || ay < 0.2 || ay > 5) return null;\n    const m2 = Math.floor((a2 + b2) / 2);\n    if (m2 !== a2 && m2 !== b2 && newXPixels[m2] != null && oldXP[k + m2] != null) {\n        const predX = ax * /** @type {number} */ newXPixels[m2] + bx;\n        if (Math.abs(predX - /** @type {number} */ oldXP[k + m2]) > 1.5) return null;\n        if (newYPixels[m2] != null && oldYP[k + m2] != null) {\n            const predY = ay * /** @type {number} */ newYPixels[m2] + by;\n            if (Math.abs(predY - /** @type {number} */ oldYP[k + m2]) > 1.5) return null;\n        }\n    }\n    return {\n        ax: ax,\n        bx: bx,\n        ay: ay,\n        by: by\n    };\n}\nconst $e4b487e979d7c06d$var$NUM_RE = /[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?/gi;\nfunction $e4b487e979d7c06d$var$projectPathToPrevFrame(d, t2) {\n    const { ax: ax, bx: bx, ay: ay, by: by } = t2;\n    const out = [];\n    const re = /([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;\n    let match;\n    while((match = re.exec(d)) !== null){\n        const cmd = match[1].toUpperCase();\n        const nums = (match[2].match($e4b487e979d7c06d$var$NUM_RE) || []).map(parseFloat);\n        if (cmd === \"Z\") {\n            out.push(\"z\");\n            continue;\n        }\n        if (cmd === \"H\") {\n            for (const x of nums)out.push(`H ${ax * x + bx}`);\n            continue;\n        }\n        if (cmd === \"V\") {\n            for (const y of nums)out.push(`V ${ay * y + by}`);\n            continue;\n        }\n        if (cmd === \"A\") {\n            for(let i2 = 0; i2 + 6 < nums.length; i2 += 7)out.push(`A ${nums[i2]} ${nums[i2 + 1]} ${nums[i2 + 2]} ${nums[i2 + 3]} ${nums[i2 + 4]} ${ax * nums[i2 + 5] + bx} ${ay * nums[i2 + 6] + by}`);\n            continue;\n        }\n        const coords = [];\n        for(let i2 = 0; i2 + 1 < nums.length; i2 += 2)coords.push(`${ax * nums[i2] + bx} ${ay * nums[i2 + 1] + by}`);\n        if (coords.length) out.push(`${cmd} ${coords.join(\" \")}`);\n    }\n    return out.join(\" \");\n}\nfunction $e4b487e979d7c06d$var$trimStreamingSeries(newSeries, w2) {\n    const cfg = w2.config.chart.streaming;\n    if (!cfg || !cfg.enabled) return;\n    const maxPoints = cfg.maxPoints;\n    const range = w2.config.xaxis.range;\n    const xOf = (p2)=>{\n        if (p2 == null) return null;\n        if (Array.isArray(p2)) return typeof p2[0] === \"number\" ? p2[0] : null;\n        if (typeof p2 === \"object\") return typeof p2.x === \"number\" ? p2.x : null;\n        return null;\n    };\n    newSeries.forEach((s2)=>{\n        var _a;\n        const data = s2 == null ? void 0 : s2.data;\n        if (!Array.isArray(data) || data.length < 2) return;\n        if (typeof maxPoints === \"number\" && maxPoints > 0) {\n            if (data.length > maxPoints) s2.data = data.slice(data.length - maxPoints);\n            return;\n        }\n        if (!range) return;\n        const lastX = xOf(data[data.length - 1]);\n        const firstX = xOf(data[0]);\n        if (lastX == null || firstX == null || lastX <= firstX) return;\n        const avgSpacing = (lastX - firstX) / (data.length - 1);\n        const cutoff = lastX - range - 2 * avgSpacing;\n        let idx = 0;\n        while(idx < data.length && ((_a = xOf(data[idx])) != null ? _a : cutoff) < cutoff)idx++;\n        if (idx > 0) s2.data = data.slice(idx);\n    });\n}\nfunction $e4b487e979d7c06d$var$buildUnionEntries(join, oldN) {\n    const exitSet = new Set(join.exits);\n    const entries = [];\n    let oi = 0;\n    for(let nj = 0; nj < join.toOld.length; nj++){\n        const oj = join.toOld[nj];\n        if (oj !== -1) {\n            while(oi < oj){\n                if (exitSet.has(oi)) entries.push({\n                    oldJ: oi,\n                    newJ: -1\n                });\n                oi++;\n            }\n            entries.push({\n                oldJ: oj,\n                newJ: nj\n            });\n            oi = oj + 1;\n        } else entries.push({\n            oldJ: -1,\n            newJ: nj\n        });\n    }\n    while(oi < oldN){\n        if (exitSet.has(oi)) entries.push({\n            oldJ: oi,\n            newJ: -1\n        });\n        oi++;\n    }\n    return entries;\n}\nfunction $e4b487e979d7c06d$var$analyzeSeriesPath(d, expectedAnchors, isArea) {\n    if (!d || typeof d !== \"string\") return null;\n    const cmds = $e4b487e979d7c06d$var$parsePath(d);\n    if (!cmds.length || cmds[0][0] !== \"M\") return null;\n    for(let i2 = 1; i2 < cmds.length; i2++){\n        if (cmds[i2][0] === \"M\") return null;\n    }\n    let body = cmds;\n    let closing = null;\n    if (isArea) {\n        if (cmds.length < 5) return null;\n        closing = cmds.slice(-3);\n        body = cmds.slice(0, -3);\n        if (closing[2][0] !== \"Z\") return null;\n        if (closing[1][0] !== \"L\") return null;\n        if (closing[0][0] !== \"L\" && closing[0][0] !== \"C\") return null;\n    } else if (cmds[cmds.length - 1][0] === \"Z\") return null;\n    if (body.length !== expectedAnchors || body.length < 2) return null;\n    const segType = body[1][0];\n    if (segType !== \"L\" && segType !== \"C\") return null;\n    for(let i2 = 2; i2 < body.length; i2++){\n        if (body[i2][0] !== segType) return null;\n    }\n    const anchors = body.map((c2)=>c2[0] === \"C\" ? [\n            Number(c2[5]),\n            Number(c2[6])\n        ] : [\n            Number(c2[1]),\n            Number(c2[2])\n        ]);\n    for (const a2 of anchors){\n        if (!isFinite(a2[0]) || !isFinite(a2[1])) return null;\n    }\n    return {\n        body: body,\n        closing: closing,\n        segType: segType,\n        anchors: anchors\n    };\n}\nfunction $e4b487e979d7c06d$var$lerpPt(a2, b2, t2) {\n    return [\n        a2[0] + (b2[0] - a2[0]) * t2,\n        a2[1] + (b2[1] - a2[1]) * t2\n    ];\n}\nfunction $e4b487e979d7c06d$var$splitCubic(s2, cmd, t2) {\n    const p0 = s2;\n    const p1 = [\n        cmd[1],\n        cmd[2]\n    ];\n    const p2 = [\n        cmd[3],\n        cmd[4]\n    ];\n    const p3 = [\n        cmd[5],\n        cmd[6]\n    ];\n    const p01 = $e4b487e979d7c06d$var$lerpPt(p0, p1, t2);\n    const p12 = $e4b487e979d7c06d$var$lerpPt(p1, p2, t2);\n    const p23 = $e4b487e979d7c06d$var$lerpPt(p2, p3, t2);\n    const p012 = $e4b487e979d7c06d$var$lerpPt(p01, p12, t2);\n    const p123 = $e4b487e979d7c06d$var$lerpPt(p12, p23, t2);\n    const mid = $e4b487e979d7c06d$var$lerpPt(p012, p123, t2);\n    return {\n        first: [\n            \"C\",\n            p01[0],\n            p01[1],\n            p012[0],\n            p012[1],\n            mid[0],\n            mid[1]\n        ],\n        second: [\n            \"C\",\n            p123[0],\n            p123[1],\n            p23[0],\n            p23[1],\n            p3[0],\n            p3[1]\n        ],\n        mid: mid\n    };\n}\nfunction $e4b487e979d7c06d$var$splitLine(s2, cmd, t2) {\n    const e2 = [\n        cmd[1],\n        cmd[2]\n    ];\n    const mid = $e4b487e979d7c06d$var$lerpPt(s2, e2, t2);\n    return {\n        first: [\n            \"L\",\n            mid[0],\n            mid[1]\n        ],\n        second: [\n            \"L\",\n            e2[0],\n            e2[1]\n        ],\n        mid: mid\n    };\n}\nfunction $e4b487e979d7c06d$var$expandPath(analysis, ownIdx) {\n    const { body: body, closing: closing, segType: segType, anchors: anchors } = analysis;\n    const n2 = anchors.length;\n    const m2 = ownIdx.length;\n    const degen = (p2)=>segType === \"C\" ? [\n            \"C\",\n            p2[0],\n            p2[1],\n            p2[0],\n            p2[1],\n            p2[0],\n            p2[1]\n        ] : [\n            \"L\",\n            p2[0],\n            p2[1]\n        ];\n    const out = [\n        [\n            \"M\",\n            anchors[0][0],\n            anchors[0][1]\n        ]\n    ];\n    let firstOwn = 0;\n    while(firstOwn < m2 && ownIdx[firstOwn] !== 0)firstOwn++;\n    for(let q = 1; q <= firstOwn; q++)out.push(degen(anchors[0]));\n    let entry = firstOwn + 1;\n    for(let s2 = 0; s2 < n2 - 1; s2++){\n        let interior = 0;\n        while(entry + interior < m2 && ownIdx[entry + interior] === -1)interior++;\n        const cmd = body[s2 + 1];\n        if (!interior) out.push(cmd.slice());\n        else {\n            const totalParts = interior + 1;\n            let start = anchors[s2];\n            let rest = cmd;\n            for(let q = 0; q < interior; q++){\n                const t2 = 1 / (totalParts - q);\n                const sp = segType === \"C\" ? $e4b487e979d7c06d$var$splitCubic(start, rest, t2) : $e4b487e979d7c06d$var$splitLine(start, rest, t2);\n                out.push(sp.first);\n                start = sp.mid;\n                rest = sp.second;\n            }\n            out.push(rest);\n        }\n        entry += interior + 1;\n    }\n    while(entry < m2){\n        out.push(degen(anchors[n2 - 1]));\n        entry++;\n    }\n    if (closing) closing.forEach((c2)=>out.push(c2.slice()));\n    return out;\n}\nfunction $e4b487e979d7c06d$var$reconcilePathPair(fromD, toD, entries, oldN, newN, isArea) {\n    const fromAnalysis = $e4b487e979d7c06d$var$analyzeSeriesPath(fromD, oldN, isArea);\n    if (!fromAnalysis) return null;\n    const toAnalysis = $e4b487e979d7c06d$var$analyzeSeriesPath(toD, newN, isArea);\n    if (!toAnalysis) return null;\n    if (fromAnalysis.segType !== toAnalysis.segType) return null;\n    if ((fromAnalysis.closing || toAnalysis.closing) && (!fromAnalysis.closing || !toAnalysis.closing || fromAnalysis.closing[0][0] !== toAnalysis.closing[0][0])) return null;\n    const fromOwn = entries.map((e2)=>e2.oldJ);\n    const toOwn = entries.map((e2)=>e2.newJ);\n    return {\n        from: $e4b487e979d7c06d$var$arrayToPath($e4b487e979d7c06d$var$expandPath(fromAnalysis, fromOwn)),\n        toInterp: $e4b487e979d7c06d$var$arrayToPath($e4b487e979d7c06d$var$expandPath(toAnalysis, toOwn))\n    };\n}\nfunction $e4b487e979d7c06d$var$lengthTransitionEnabled(w2) {\n    var _a;\n    const anim = w2.config.chart.animations;\n    if (!anim || anim.enabled === false) return false;\n    if (!anim.dynamicAnimation || anim.dynamicAnimation.enabled === false) return false;\n    const largeThreshold = (_a = anim.largeDatasetThreshold) != null ? _a : 0;\n    if (largeThreshold > 0 && w2.globals.dataPoints > largeThreshold) return false;\n    return !!($e4b487e979d7c06d$var$Environment.isBrowser() && w2.globals.dataChanged && w2.globals.shouldAnimate);\n}\nfunction $e4b487e979d7c06d$var$datumKey(w2, realIndex, j) {\n    var _a, _b, _c, _d;\n    if ((_a = w2.axisFlags) == null ? void 0 : _a.isXNumeric) {\n        const sx = (_c = (_b = w2.seriesData) == null ? void 0 : _b.seriesX) == null ? void 0 : _c[realIndex];\n        if (sx && sx.length && sx[j] != null) return \"x:\" + sx[j];\n    }\n    const lbl = (_d = w2.globals.labels) == null ? void 0 : _d[j];\n    if (lbl != null && String(lbl) !== \"\") return \"c:\" + (Array.isArray(lbl) ? lbl.join(\" \") : String(lbl));\n    return \"j:\" + j;\n}\nfunction $e4b487e979d7c06d$var$frameDatumKey(frame, realIndex, j) {\n    var _a, _b;\n    if (frame.isXNumeric) {\n        const sx = (_a = frame.seriesX) == null ? void 0 : _a[realIndex];\n        if (sx && sx.length && sx[j] != null) return \"x:\" + sx[j];\n    }\n    const lbl = (_b = frame.labels) == null ? void 0 : _b[j];\n    if (lbl != null && String(lbl) !== \"\") return \"c:\" + (Array.isArray(lbl) ? lbl.join(\" \") : String(lbl));\n    return \"j:\" + j;\n}\nfunction $e4b487e979d7c06d$var$joinKeys(oldKeys, newKeys) {\n    const oldIndex = /* @__PURE__ */ new Map();\n    oldKeys.forEach((k, i2)=>{\n        if (!oldIndex.has(k)) oldIndex.set(k, i2);\n    });\n    const toOld = new Array(newKeys.length);\n    const usedOld = /* @__PURE__ */ new Set();\n    let prev = -1;\n    let ordered = true;\n    let identity = oldKeys.length === newKeys.length;\n    newKeys.forEach((k, i2)=>{\n        const oi = oldIndex.has(k) && !usedOld.has(oldIndex.get(k)) ? oldIndex.get(k) : -1;\n        toOld[i2] = oi;\n        if (oi !== -1) {\n            usedOld.add(oi);\n            if (oi < prev) ordered = false;\n            prev = oi;\n        }\n        if (oi !== i2) identity = false;\n    });\n    const exits = [];\n    for(let i2 = 0; i2 < oldKeys.length; i2++)if (!usedOld.has(i2)) exits.push(i2);\n    return {\n        toOld: toOld,\n        exits: exits,\n        ordered: ordered,\n        changed: !identity\n    };\n}\nfunction $e4b487e979d7c06d$var$uniquifyKeys(keys) {\n    const seen = /* @__PURE__ */ new Map();\n    return keys.map((k)=>{\n        const count = seen.get(k) || 0;\n        seen.set(k, count + 1);\n        return count === 0 ? k : `${k}#${count}`;\n    });\n}\nfunction $e4b487e979d7c06d$var$seriesJoin(w2, realIndex, includeIdentity = false, allowReorder = false) {\n    var _a, _b;\n    if (!$e4b487e979d7c06d$var$lengthTransitionEnabled(w2)) return null;\n    const frame = w2.globals.prevStreamFrame;\n    if (!frame) return null;\n    const oldY = (_a = frame.seriesY) == null ? void 0 : _a[realIndex];\n    const newY = (_b = w2.seriesData.series) == null ? void 0 : _b[realIndex];\n    if (!Array.isArray(oldY) || !Array.isArray(newY)) return null;\n    if (!oldY.length || !newY.length) return null;\n    const oldKeys = $e4b487e979d7c06d$var$uniquifyKeys(oldY.map((_, j)=>$e4b487e979d7c06d$var$frameDatumKey(frame, realIndex, j)));\n    const newKeys = $e4b487e979d7c06d$var$uniquifyKeys(newY.map((_, j)=>$e4b487e979d7c06d$var$datumKey(w2, realIndex, j)));\n    const join = $e4b487e979d7c06d$var$joinKeys(oldKeys, newKeys);\n    if (!join.ordered && !allowReorder) return null;\n    if (!join.changed && !includeIdentity) return null;\n    return {\n        join: join,\n        oldKeys: oldKeys,\n        newKeys: newKeys\n    };\n}\nfunction $e4b487e979d7c06d$var$morphEasing(w2) {\n    var _a, _b;\n    const anim = w2.config.chart.animations;\n    return $e4b487e979d7c06d$var$resolveEasing((_b = (_a = anim.dynamicAnimation) == null ? void 0 : _a.easing) != null ? _b : anim.easing);\n}\nfunction $e4b487e979d7c06d$var$rafTween(w2, duration, ease, onFrame, onDone) {\n    const startAt = performance.now();\n    const step = (now)=>{\n        if (w2.globals.isDestroyed) return;\n        const raw = Math.max(0, Math.min(1, (now - startAt) / duration));\n        onFrame(ease(raw), raw);\n        if (raw < 1) $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n        else if (onDone) onDone();\n    };\n    $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n}\nfunction $e4b487e979d7c06d$var$tweenSeriesMarkers(w2, { elPointsMain: elPointsMain, realIndex: realIndex, speed: speed }) {\n    var _a, _b, _c, _d;\n    if (!(elPointsMain == null ? void 0 : elPointsMain.node)) return false;\n    const sj = $e4b487e979d7c06d$var$seriesJoin(w2, realIndex, true);\n    if (!sj) return false;\n    const frame = w2.globals.prevStreamFrame;\n    if (!frame) return false;\n    const oldXP = (_a = frame.xPixels) == null ? void 0 : _a[realIndex];\n    const oldYP = (_b = frame.yPixels) == null ? void 0 : _b[realIndex];\n    if (!oldXP || !oldYP) return false;\n    const markers = elPointsMain.node.querySelectorAll(\".apexcharts-marker\");\n    if (!markers.length) return false;\n    const newXP = ((_c = w2.globals.seriesXvalues) == null ? void 0 : _c[realIndex]) || [];\n    const newYP = ((_d = w2.globals.seriesYvalues) == null ? void 0 : _d[realIndex]) || [];\n    const ease = $e4b487e979d7c06d$var$morphEasing(w2);\n    const duration = Math.max(1, speed || 1);\n    elPointsMain.node.classList.remove(\"apexcharts-element-hidden\");\n    markers.forEach((node)=>{\n        var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i;\n        const j = parseInt((_b2 = (_a2 = node.getAttribute(\"j\")) != null ? _a2 : node.getAttribute(\"rel\")) != null ? _b2 : \"\", 10);\n        if (!isFinite(j) || j < 0 || j >= sj.join.toOld.length) return;\n        const oldJ = sj.join.toOld[j];\n        const to = newXP[j] != null && newYP[j] != null ? [\n            newXP[j],\n            newYP[j]\n        ] : null;\n        if (oldJ === -1 || !to) {\n            const style = /** @type {any} */ node.style;\n            style.opacity = \"0\";\n            $e4b487e979d7c06d$var$rafTween(w2, duration, ease, (eased)=>{\n                style.opacity = String(eased);\n            }, ()=>{\n                style.opacity = \"\";\n            });\n            return;\n        }\n        const dx = ((_c2 = oldXP[oldJ]) != null ? _c2 : NaN) - to[0];\n        const dy = ((_d2 = oldYP[oldJ]) != null ? _d2 : NaN) - to[1];\n        if (!isFinite(dx) || !isFinite(dy)) return;\n        const rFrom = (_g = (_f = (_e = frame.rPixels) == null ? void 0 : _e[realIndex]) == null ? void 0 : _f[oldJ]) != null ? _g : NaN;\n        const rTo = parseFloat((_i = (_h = node.getAttribute(\"r\")) != null ? _h : node.getAttribute(\"default-marker-size\")) != null ? _i : \"\");\n        const scales = isFinite(rFrom) && isFinite(rTo) && rTo > 0 && Math.abs(rFrom - rTo) > 0.25;\n        const moves = Math.abs(dx) >= 0.5 || Math.abs(dy) >= 0.5;\n        if (!moves && !scales) return;\n        const apply = (eased)=>{\n            const offX = dx * (1 - eased);\n            const offY = dy * (1 - eased);\n            if (scales) {\n                const s2 = (rFrom + (rTo - rFrom) * eased) / rTo;\n                node.setAttribute(\"transform\", `translate(${offX + to[0] * (1 - s2)}, ${offY + to[1] * (1 - s2)}) scale(${s2})`);\n            } else node.setAttribute(\"transform\", `translate(${offX}, ${offY})`);\n        };\n        apply(0);\n        $e4b487e979d7c06d$var$rafTween(w2, duration, ease, apply, ()=>{\n            node.removeAttribute(\"transform\");\n        });\n    });\n    return true;\n}\nfunction $e4b487e979d7c06d$var$reconcileSeriesPaths(w2, { type: type, realIndex: realIndex, pathFromLine: pathFromLine, pathFromArea: pathFromArea, linePaths: linePaths, areaPaths: areaPaths }) {\n    var _a, _b;\n    const sj = $e4b487e979d7c06d$var$seriesJoin(w2, realIndex);\n    if (!sj) return null;\n    const { join: join, oldKeys: oldKeys, newKeys: newKeys } = sj;\n    const frame = w2.globals.prevStreamFrame;\n    if (!frame) return null;\n    const oldY = (_a = frame.seriesY) == null ? void 0 : _a[realIndex];\n    const newY = (_b = w2.seriesData.series) == null ? void 0 : _b[realIndex];\n    if (oldY.length < 2 || newY.length < 2) return null;\n    if (oldY.some((v2)=>v2 === null) || newY.some((v2)=>v2 === null)) return null;\n    const entries = $e4b487e979d7c06d$var$buildUnionEntries(join, oldKeys.length);\n    const out = {};\n    if (Array.isArray(linePaths) && linePaths.length === 1 && pathFromLine) out.line = $e4b487e979d7c06d$var$reconcilePathPair(pathFromLine, linePaths[0], entries, oldKeys.length, newKeys.length, false);\n    if (type === \"area\" && Array.isArray(areaPaths) && areaPaths.length === 1 && pathFromArea) out.area = $e4b487e979d7c06d$var$reconcilePathPair(pathFromArea, areaPaths[0], entries, oldKeys.length, newKeys.length, true);\n    if (!out.line && !out.area) return null;\n    return out;\n}\nfunction $e4b487e979d7c06d$var$firstMove(d) {\n    const m2 = /^M\\s*([+-]?[\\d.eE]+)[\\s,]+([+-]?[\\d.eE]+)/.exec(d || \"\");\n    if (!m2) return null;\n    const x = parseFloat(m2[1]);\n    const y = parseFloat(m2[2]);\n    return isFinite(x) && isFinite(y) ? {\n        x: x,\n        y: y\n    } : null;\n}\nfunction $e4b487e979d7c06d$var$renderBarExitGhosts({ w: w2, elSeries: elSeries, record: record, newKeys: newKeys, isHorizontal: isHorizontal, speed: speed }) {\n    var _a;\n    if (!$e4b487e979d7c06d$var$lengthTransitionEnabled(w2)) return;\n    if (!record || !Array.isArray(record.paths) || !(elSeries == null ? void 0 : elSeries.node)) return;\n    const newKeySet = new Set(newKeys);\n    const exits = record.paths.filter((p2)=>p2 && p2.d && p2.key != null && !newKeySet.has(p2.key));\n    if (!exits.length) return;\n    const graphics = new $e4b487e979d7c06d$var$Graphics(w2);\n    const fallbackFill = (_a = w2.globals.colors) == null ? void 0 : _a[parseInt(String(record.realIndex), 10)];\n    exits.forEach((p2)=>{\n        let fill = p2.fill || fallbackFill || \"#c8c8c8\";\n        if (String(fill).indexOf(\"url(\") === 0) fill = fallbackFill || \"#c8c8c8\";\n        const ghost = graphics.drawPath({\n            d: p2.d,\n            stroke: \"none\",\n            strokeWidth: 0,\n            fill: fill,\n            fillOpacity: 1,\n            classes: \"apexcharts-bar-ghost\"\n        });\n        const node = ghost.node;\n        node.setAttribute(\"pointer-events\", \"none\");\n        ghost.attr(\"clip-path\", `url(#gridRectBarMask${w2.globals.cuid})`);\n        elSeries.node.insertBefore(node, elSeries.node.firstChild);\n        const start = $e4b487e979d7c06d$var$firstMove(p2.d);\n        let origin = isHorizontal ? \"left center\" : \"center bottom\";\n        try {\n            const bb = node.getBBox();\n            if (start && bb) {\n                if (isHorizontal) origin = Math.abs(start.x - bb.x) <= Math.abs(start.x - (bb.x + bb.width)) ? \"left center\" : \"right center\";\n                else origin = Math.abs(start.y - (bb.y + bb.height)) <= Math.abs(start.y - bb.y) ? \"center bottom\" : \"center top\";\n            }\n        } catch (_) {}\n        const style = node.style;\n        style.transformBox = \"fill-box\";\n        style.transformOrigin = origin;\n        const duration = Math.max(1, speed || 1);\n        const startAt = performance.now();\n        const step = (now)=>{\n            if (w2.globals.isDestroyed || !node.parentNode) return;\n            const t2 = Math.max(0, Math.min(1, (now - startAt) / duration));\n            const eased = 1 - Math.pow(1 - t2, 3);\n            const scale = 1 - eased;\n            style.transform = isHorizontal ? `scaleX(${scale})` : `scaleY(${scale})`;\n            style.opacity = String(1 - eased);\n            if (t2 < 1) $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n            else node.parentNode.removeChild(node);\n        };\n        $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n    });\n}\nfunction $e4b487e979d7c06d$var$grabLabels(root, sel, posAttr) {\n    return [\n        ...root.querySelectorAll(sel)\n    ].map((el)=>{\n        var _a, _b, _c;\n        return {\n            // `text` is the matching KEY (textContent, which doubles tspan + title\n            // but does so consistently on both sides); `display` is the visible\n            // string, used when rendering an exit ghost.\n            text: el.textContent || \"\",\n            display: (_c = (_b = (_a = el.querySelector(\"tspan\")) == null ? void 0 : _a.textContent) != null ? _b : el.textContent) != null ? _c : \"\",\n            pos: parseFloat(el.getAttribute(posAttr) || \"\"),\n            transform: el.getAttribute(\"transform\")\n        };\n    });\n}\nfunction $e4b487e979d7c06d$var$grabLines(root, sel, posAttr) {\n    return [\n        ...root.querySelectorAll(sel)\n    ].map((el)=>parseFloat(el.getAttribute(posAttr) || \"\"));\n}\nconst $e4b487e979d7c06d$var$NO_GHOST = \":not(.apexcharts-tick-ghost)\";\nconst $e4b487e979d7c06d$var$X_LABELS_SEL = `.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${$e4b487e979d7c06d$var$NO_GHOST}`;\nconst $e4b487e979d7c06d$var$Y_LABELS_SEL = `.apexcharts-yaxis-texts-g text${$e4b487e979d7c06d$var$NO_GHOST}`;\nconst $e4b487e979d7c06d$var$V_GRID_SEL = `.apexcharts-gridlines-vertical line${$e4b487e979d7c06d$var$NO_GHOST}`;\nconst $e4b487e979d7c06d$var$H_GRID_SEL = `.apexcharts-gridlines-horizontal line${$e4b487e979d7c06d$var$NO_GHOST}`;\nfunction $e4b487e979d7c06d$var$currentXScale(w2) {\n    var _a, _b;\n    const gl = w2.globals;\n    if (!((_a = w2.axisFlags) == null ? void 0 : _a.isXNumeric) || gl.isBarHorizontal) return null;\n    if ((_b = w2.config.xaxis) == null ? void 0 : _b.reversed) return null;\n    const min = gl.minX;\n    const max = gl.maxX;\n    const width = w2.layout.gridWidth;\n    if (!isFinite(min) || !isFinite(max) || !(max > min) || !(width > 0)) return null;\n    return {\n        min: min,\n        max: max,\n        width: width\n    };\n}\nfunction $e4b487e979d7c06d$var$currentYAnchors(w2, labels) {\n    var _a;\n    const gl = w2.globals;\n    if (gl.isBarHorizontal) return null;\n    if (!Array.isArray(w2.config.yaxis) || w2.config.yaxis.length !== 1) return null;\n    if ((_a = w2.config.yaxis[0]) == null ? void 0 : _a.logarithmic) return null;\n    const min = gl.minY;\n    const max = gl.maxY;\n    if (!isFinite(min) || !isFinite(max) || !(max > min)) return null;\n    const ps = labels.map((l2)=>l2.pos).filter((p2)=>isFinite(p2));\n    if (ps.length < 2) return null;\n    return {\n        min: min,\n        max: max,\n        pLo: Math.max(...ps),\n        pHi: Math.min(...ps)\n    };\n}\nfunction $e4b487e979d7c06d$var$composeXMap(o2, n2) {\n    if (!o2 || !n2) return null;\n    const os = o2.max - o2.min;\n    const ns = n2.max - n2.min;\n    if (!(os > 0) || !(ns > 0) || !(o2.width > 0) || !(n2.width > 0)) return null;\n    return {\n        toNew: (p2)=>(o2.min + p2 / o2.width * os - n2.min) / ns * n2.width,\n        toOld: (p2)=>(n2.min + p2 / n2.width * ns - o2.min) / os * o2.width\n    };\n}\nfunction $e4b487e979d7c06d$var$composeYMap(o2, n2) {\n    if (!o2 || !n2) return null;\n    const oSpanP = o2.pHi - o2.pLo;\n    const nSpanP = n2.pHi - n2.pLo;\n    const oSpanV = o2.max - o2.min;\n    const nSpanV = n2.max - n2.min;\n    if (!oSpanP || !nSpanP || !(oSpanV > 0) || !(nSpanV > 0)) return null;\n    const oldVal = (p2)=>o2.min + (p2 - o2.pLo) / oSpanP * oSpanV;\n    const newVal = (p2)=>n2.min + (p2 - n2.pLo) / nSpanP * nSpanV;\n    return {\n        toNew: (p2)=>n2.pLo + (oldVal(p2) - n2.min) / nSpanV * nSpanP,\n        toOld: (p2)=>o2.pLo + (newVal(p2) - o2.min) / oSpanV * oSpanP\n    };\n}\nfunction $e4b487e979d7c06d$var$captureAxisChrome(w2) {\n    const gl = w2.globals;\n    gl.prevChromeFrame = null;\n    if (!gl.axisCharts || !$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n    const root = w2.dom.baseEl;\n    if (!$e4b487e979d7c06d$var$Utils$1.elementExists(root)) return;\n    try {\n        const yLabels = $e4b487e979d7c06d$var$grabLabels(root, $e4b487e979d7c06d$var$Y_LABELS_SEL, \"y\");\n        gl.prevChromeFrame = {\n            xLabels: $e4b487e979d7c06d$var$grabLabels(root, $e4b487e979d7c06d$var$X_LABELS_SEL, \"x\"),\n            yLabels: yLabels,\n            vGrid: $e4b487e979d7c06d$var$grabLines(root, $e4b487e979d7c06d$var$V_GRID_SEL, \"x1\"),\n            hGrid: $e4b487e979d7c06d$var$grabLines(root, $e4b487e979d7c06d$var$H_GRID_SEL, \"y1\"),\n            // Value scales of the outgoing render, so ticks whose TEXT has no\n            // counterpart (e.g. a zoom across datetime granularities) can still be\n            // re-projected: new ticks slide in from where their value sat, old\n            // ticks ghost out to where their value lands.\n            xScale: $e4b487e979d7c06d$var$currentXScale(w2),\n            yAnchors: $e4b487e979d7c06d$var$currentYAnchors(w2, yLabels)\n        };\n    } catch (_) {\n        gl.prevChromeFrame = null;\n    }\n}\nfunction $e4b487e979d7c06d$var$fadeIn$1(w2, node, duration, ease) {\n    const style = /** @type {any} */ node.style;\n    style.opacity = \"0\";\n    $e4b487e979d7c06d$var$rafTween(w2, duration, ease, (eased)=>{\n        style.opacity = String(eased);\n    }, ()=>{\n        style.opacity = \"\";\n    });\n}\nfunction $e4b487e979d7c06d$var$tweenPos(w2, node, attrs, from, to, duration, ease) {\n    attrs.forEach((a2)=>node.setAttribute(a2, String(from)));\n    $e4b487e979d7c06d$var$rafTween(w2, duration, ease, (eased)=>{\n        const v2 = String(from + (to - from) * eased);\n        attrs.forEach((a2)=>node.setAttribute(a2, v2));\n    }, ()=>{\n        attrs.forEach((a2)=>node.setAttribute(a2, String(to)));\n    });\n}\nfunction $e4b487e979d7c06d$var$spawnGhost(w2, { template: template, display: display, attrs: attrs, from: from, to: to, duration: duration, ease: ease }) {\n    const parent = template.parentNode;\n    if (!parent) return;\n    const ghost = /** @type {Element} */ template.cloneNode(true);\n    ghost.classList.add(\"apexcharts-tick-ghost\");\n    ghost.setAttribute(\"pointer-events\", \"none\");\n    ghost.removeAttribute(\"id\");\n    if (display !== void 0) {\n        const tspan = ghost.querySelector(\"tspan\");\n        if (tspan) tspan.textContent = display;\n        else ghost.textContent = display;\n        const title = ghost.querySelector(\"title\");\n        if (title) title.textContent = display;\n    }\n    attrs.forEach((a2)=>ghost.setAttribute(a2, String(from)));\n    const style = /** @type {any} */ ghost.style;\n    style.opacity = \"1\";\n    parent.appendChild(ghost);\n    $e4b487e979d7c06d$var$rafTween(w2, duration, ease, (eased)=>{\n        const v2 = String(from + (to - from) * eased);\n        attrs.forEach((a2)=>ghost.setAttribute(a2, v2));\n        style.opacity = String(1 - eased);\n    }, ()=>{\n        if (ghost.parentNode) ghost.parentNode.removeChild(ghost);\n    });\n}\nconst $e4b487e979d7c06d$var$MAX_GHOSTS = 20;\nfunction $e4b487e979d7c06d$var$transitionAxis(w2, { newLabels: newLabels, oldLabels: oldLabels, posAttr: posAttr, newLines: newLines, oldLines: oldLines, lineAttrs: lineAttrs, duration: duration, ease: ease, project: project }) {\n    const oldByText = /* @__PURE__ */ new Map();\n    oldLabels.forEach((l2, i2)=>{\n        if (!oldByText.has(l2.text)) oldByText.set(l2.text, $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, l2), {\n            i: i2\n        }));\n    });\n    const matchedOld = /* @__PURE__ */ new Set();\n    const newLinesAligned = newLines.length === newLabels.length;\n    const oldLinesAligned = oldLines.length === oldLabels.length;\n    const spanPs = oldLabels.map((l2)=>l2.pos).concat(newLabels.map((l2)=>parseFloat(l2.getAttribute(posAttr) || \"\"))).filter((p2)=>isFinite(p2));\n    const spanLo = Math.min(...spanPs);\n    const spanHi = Math.max(...spanPs);\n    const margin = Math.max(40, (spanHi - spanLo) * 0.25);\n    const clamp = (p2)=>Math.max(spanLo - margin, Math.min(spanHi + margin, p2));\n    const tweenPairedLine = (line, old)=>{\n        if (!line) return;\n        const lineTo = parseFloat(line.getAttribute(lineAttrs[0]) || \"\");\n        const lineFrom = oldLines[old.i];\n        if (isFinite(lineTo) && isFinite(lineFrom)) $e4b487e979d7c06d$var$tweenPos(w2, line, lineAttrs, lineFrom, lineTo, duration, ease);\n    };\n    newLabels.forEach((label, i2)=>{\n        const to = parseFloat(label.getAttribute(posAttr) || \"\");\n        const old = oldByText.get(label.textContent || \"\");\n        const line = newLinesAligned ? newLines[i2] : null;\n        if (old) matchedOld.add(old.i);\n        const labelTransform = label.getAttribute(\"transform\");\n        if (!old || !isFinite(old.pos)) {\n            if (!old) {\n                if (project && isFinite(to) && !labelTransform) {\n                    const from = isFinite(project.toOld(to)) ? clamp(project.toOld(to)) : NaN;\n                    if (isFinite(from) && Math.abs(from - to) > 0.5) {\n                        $e4b487e979d7c06d$var$tweenPos(w2, label, [\n                            posAttr\n                        ], from, to, duration, ease);\n                        if (line) $e4b487e979d7c06d$var$tweenPos(w2, line, lineAttrs, from, to, duration, ease);\n                    }\n                }\n                $e4b487e979d7c06d$var$fadeIn$1(w2, label, duration, ease);\n                if (line) $e4b487e979d7c06d$var$fadeIn$1(w2, line, duration, ease);\n            }\n            return;\n        }\n        if (!isFinite(to) || Math.abs(old.pos - to) < 0.5) return;\n        if (labelTransform || old.transform) {\n            const delta = old.pos - to;\n            if (isFinite(delta)) {\n                const base = labelTransform || \"\";\n                $e4b487e979d7c06d$var$rafTween(w2, duration, ease, (eased)=>{\n                    const v2 = delta * (1 - eased);\n                    const t2 = posAttr === \"x\" ? `translate(${v2} 0)` : `translate(0 ${v2})`;\n                    label.setAttribute(\"transform\", `${t2} ${base}`.trim());\n                }, ()=>{\n                    if (base) label.setAttribute(\"transform\", base);\n                    else label.removeAttribute(\"transform\");\n                });\n            }\n            tweenPairedLine(line, old);\n            return;\n        }\n        $e4b487e979d7c06d$var$tweenPos(w2, label, [\n            posAttr\n        ], old.pos, to, duration, ease);\n        tweenPairedLine(line, old);\n    });\n    if (!project || !newLabels.length) return;\n    let ghosts = 0;\n    oldLabels.forEach((old, i2)=>{\n        if (matchedOld.has(i2)) return;\n        if (!isFinite(old.pos) || old.transform) return;\n        if (ghosts >= $e4b487e979d7c06d$var$MAX_GHOSTS) return;\n        const rawTo = project.toNew(old.pos);\n        if (!isFinite(rawTo) || Math.abs(rawTo - old.pos) < 0.5) return;\n        ghosts++;\n        $e4b487e979d7c06d$var$spawnGhost(w2, {\n            template: newLabels[0],\n            display: old.display,\n            attrs: [\n                posAttr\n            ],\n            from: old.pos,\n            to: clamp(rawTo),\n            duration: duration,\n            ease: ease\n        });\n        if (oldLinesAligned && newLines.length && isFinite(oldLines[i2])) $e4b487e979d7c06d$var$spawnGhost(w2, {\n            template: newLines[0],\n            attrs: lineAttrs,\n            from: oldLines[i2],\n            to: clamp(project.toNew(oldLines[i2])),\n            duration: duration,\n            ease: ease\n        });\n    });\n}\nfunction $e4b487e979d7c06d$var$applyAxisTransition(w2) {\n    const gl = w2.globals;\n    const chrome = gl.prevChromeFrame;\n    gl.prevChromeFrame = null;\n    if (!chrome || !gl.axisCharts || !$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n    if (!$e4b487e979d7c06d$var$lengthTransitionEnabled(w2)) return;\n    const anyMotion = (w2.seriesData.series || []).some((_, i2)=>$e4b487e979d7c06d$var$seriesJoin(w2, i2, true, true) !== null);\n    if (!anyMotion) return;\n    const root = w2.dom.baseEl;\n    if (!$e4b487e979d7c06d$var$Utils$1.elementExists(root)) return;\n    const duration = Math.max(1, w2.config.chart.animations.dynamicAnimation.speed || 1);\n    const ease = $e4b487e979d7c06d$var$morphEasing(w2);\n    try {\n        const newYLabels = [\n            ...root.querySelectorAll($e4b487e979d7c06d$var$Y_LABELS_SEL)\n        ];\n        const projX = $e4b487e979d7c06d$var$composeXMap(chrome.xScale, $e4b487e979d7c06d$var$currentXScale(w2));\n        const projY = $e4b487e979d7c06d$var$composeYMap(chrome.yAnchors, $e4b487e979d7c06d$var$currentYAnchors(w2, newYLabels.map((el)=>({\n                pos: parseFloat(el.getAttribute(\"y\") || \"\")\n            }))));\n        $e4b487e979d7c06d$var$transitionAxis(w2, {\n            newLabels: [\n                ...root.querySelectorAll($e4b487e979d7c06d$var$X_LABELS_SEL)\n            ],\n            oldLabels: chrome.xLabels,\n            posAttr: \"x\",\n            newLines: [\n                ...root.querySelectorAll($e4b487e979d7c06d$var$V_GRID_SEL)\n            ],\n            oldLines: chrome.vGrid,\n            lineAttrs: [\n                \"x1\",\n                \"x2\"\n            ],\n            duration: duration,\n            ease: ease,\n            project: projX\n        });\n        $e4b487e979d7c06d$var$transitionAxis(w2, {\n            newLabels: newYLabels,\n            oldLabels: chrome.yLabels,\n            posAttr: \"y\",\n            newLines: [\n                ...root.querySelectorAll($e4b487e979d7c06d$var$H_GRID_SEL)\n            ],\n            oldLines: chrome.hGrid,\n            lineAttrs: [\n                \"y1\",\n                \"y2\"\n            ],\n            duration: duration,\n            ease: ease,\n            project: projY\n        });\n    } catch (_) {}\n}\nconst $e4b487e979d7c06d$var$DL_GROUP_SEL = \".apexcharts-data-labels[data\\\\:dlKey]\";\nconst $e4b487e979d7c06d$var$DL_TEXT_SEL = \".apexcharts-datalabel\";\nfunction $e4b487e979d7c06d$var$dataLabelMotionEnabled(w2) {\n    var _a, _b;\n    const dl = w2.config.dataLabels;\n    return !!(((_a = dl == null ? void 0 : dl.animate) == null ? void 0 : _a.enabled) || ((_b = dl == null ? void 0 : dl.countUp) == null ? void 0 : _b.enabled));\n}\nfunction $e4b487e979d7c06d$var$decimalsOf(n2) {\n    if (!isFinite(n2)) return 0;\n    const s2 = String(Math.abs(n2));\n    const e2 = s2.indexOf(\"e\");\n    if (e2 !== -1) {\n        const mantissa = s2.slice(0, e2);\n        const exp = parseInt(s2.slice(e2 + 1), 10);\n        const dot2 = mantissa.indexOf(\".\");\n        const mantissaDec = dot2 === -1 ? 0 : mantissa.length - dot2 - 1;\n        return Math.min(6, Math.max(0, mantissaDec - exp));\n    }\n    const dot = s2.indexOf(\".\");\n    return dot === -1 ? 0 : Math.min(6, s2.length - dot - 1);\n}\nfunction $e4b487e979d7c06d$var$writeLabel(textEl, s2) {\n    const tspan = textEl.querySelector(\"tspan\");\n    if (tspan) tspan.textContent = s2;\n    else textEl.textContent = s2;\n}\nfunction $e4b487e979d7c06d$var$captureDataLabels(w2) {\n    const gl = w2.globals;\n    gl.prevDataLabels = null;\n    if (!gl.axisCharts || !$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n    if (!$e4b487e979d7c06d$var$dataLabelMotionEnabled(w2)) return;\n    const root = w2.dom.baseEl;\n    if (!$e4b487e979d7c06d$var$Utils$1.elementExists(root)) return;\n    try {\n        const map = /* @__PURE__ */ new Map();\n        root.querySelectorAll($e4b487e979d7c06d$var$DL_GROUP_SEL).forEach((group)=>{\n            const key = group.getAttribute(\"data:dlKey\");\n            if (!key) return;\n            const textEl = group.querySelector($e4b487e979d7c06d$var$DL_TEXT_SEL);\n            if (!textEl) return;\n            map.set(key, {\n                cx: parseFloat(textEl.getAttribute(\"cx\") || \"\"),\n                cy: parseFloat(textEl.getAttribute(\"cy\") || \"\"),\n                val: parseFloat(group.getAttribute(\"data:dlVal\") || \"\")\n            });\n        });\n        gl.prevDataLabels = map.size ? map : null;\n    } catch (_) {\n        gl.prevDataLabels = null;\n    }\n}\nfunction $e4b487e979d7c06d$var$fadeIn(w2, node, duration, ease) {\n    const style = /** @type {any} */ node.style;\n    style.opacity = \"0\";\n    $e4b487e979d7c06d$var$rafTween(w2, duration, ease, (eased)=>{\n        style.opacity = String(eased);\n    }, ()=>{\n        style.opacity = \"\";\n    });\n}\nfunction $e4b487e979d7c06d$var$applyDataLabelTransition(w2) {\n    var _a, _b;\n    const gl = w2.globals;\n    const prev = gl.prevDataLabels;\n    gl.prevDataLabels = null;\n    if (!prev || !gl.axisCharts || !$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n    if (!$e4b487e979d7c06d$var$dataLabelMotionEnabled(w2)) return;\n    if (!$e4b487e979d7c06d$var$lengthTransitionEnabled(w2)) return;\n    const root = w2.dom.baseEl;\n    if (!$e4b487e979d7c06d$var$Utils$1.elementExists(root)) return;\n    const dl = w2.config.dataLabels;\n    const ride = !!((_a = dl.animate) == null ? void 0 : _a.enabled);\n    const countUp = !!((_b = dl.countUp) == null ? void 0 : _b.enabled);\n    const formatter = dl.formatter;\n    const duration = Math.max(1, w2.config.chart.animations.dynamicAnimation.speed || 1);\n    const ease = $e4b487e979d7c06d$var$morphEasing(w2);\n    try {\n        root.querySelectorAll($e4b487e979d7c06d$var$DL_GROUP_SEL).forEach((group)=>{\n            const key = group.getAttribute(\"data:dlKey\");\n            if (!key) return;\n            const textEl = group.querySelector($e4b487e979d7c06d$var$DL_TEXT_SEL);\n            if (!textEl) return;\n            const old = prev.get(key);\n            if (ride) {\n                if (old && isFinite(old.cx) && isFinite(old.cy)) {\n                    const newCx = parseFloat(textEl.getAttribute(\"cx\") || \"\");\n                    const newCy = parseFloat(textEl.getAttribute(\"cy\") || \"\");\n                    const dx = old.cx - newCx;\n                    const dy = old.cy - newCy;\n                    if (isFinite(dx) && isFinite(dy) && Math.abs(dx) + Math.abs(dy) > 0.5) {\n                        const base = group.getAttribute(\"transform\") || \"\";\n                        $e4b487e979d7c06d$var$rafTween(w2, duration, ease, (eased)=>{\n                            const t2 = 1 - eased;\n                            group.setAttribute(\"transform\", `translate(${dx * t2} ${dy * t2}) ${base}`.trim());\n                        }, ()=>{\n                            group.setAttribute(\"transform\", base);\n                        });\n                    }\n                } else if (!old) $e4b487e979d7c06d$var$fadeIn(w2, group, duration, ease);\n            }\n            if (countUp && old && isFinite(old.val)) {\n                const newVal = parseFloat(group.getAttribute(\"data:dlVal\") || \"\");\n                if (isFinite(newVal) && Math.abs(newVal - old.val) > 1e-9) {\n                    const from = old.val;\n                    const dec = Math.max($e4b487e979d7c06d$var$decimalsOf(from), $e4b487e979d7c06d$var$decimalsOf(newVal));\n                    const realIndex = parseInt(key, 10);\n                    const j = parseInt(group.getAttribute(\"data:dlJ\") || \"\", 10);\n                    const fmtOpts = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, w2), {\n                        seriesIndex: realIndex,\n                        dataPointIndex: isFinite(j) ? j : 0,\n                        w: w2\n                    });\n                    const format = (v2)=>{\n                        const rounded = Number(v2.toFixed(dec));\n                        let out = rounded;\n                        if (typeof formatter === \"function\") try {\n                            out = formatter(rounded, fmtOpts);\n                        } catch (_) {\n                            out = rounded;\n                        }\n                        return String(out);\n                    };\n                    $e4b487e979d7c06d$var$rafTween(w2, duration, ease, (eased)=>{\n                        $e4b487e979d7c06d$var$writeLabel(textEl, format(from + (newVal - from) * eased));\n                    }, ()=>{\n                        $e4b487e979d7c06d$var$writeLabel(textEl, format(newVal));\n                    });\n                }\n            }\n        });\n    } catch (_) {}\n}\nclass $e4b487e979d7c06d$var$Series {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {{ toggleDataSeries?: Function, revertDefaultAxisMinMax?: Function, updateSeries?: Function }} [callbacks]\n   */ constructor(w2, { toggleDataSeries: toggleDataSeries, revertDefaultAxisMinMax: revertDefaultAxisMinMax, updateSeries: updateSeries } = {}){\n        this.w = w2;\n        this._toggleDataSeries = toggleDataSeries || null;\n        this._revertDefaultAxisMinMax = revertDefaultAxisMinMax || null;\n        this._updateSeries = updateSeries || null;\n        this.legendInactiveClass = \"legend-mouseover-inactive\";\n    }\n    clearSeriesCache() {\n        const w2 = this.w;\n        if (w2.globals.cachedSelectors) {\n            delete w2.globals.cachedSelectors.allSeriesEls;\n            delete w2.globals.cachedSelectors.highlightSeriesEls;\n        }\n    }\n    getAllSeriesEls() {\n        const w2 = this.w;\n        const cacheKey = \"allSeriesEls\";\n        if (!w2.globals.cachedSelectors[cacheKey]) w2.globals.cachedSelectors[cacheKey] = /** @type {any} */ w2.dom.baseEl.getElementsByClassName(`apexcharts-series`);\n        return w2.globals.cachedSelectors[cacheKey];\n    }\n    /**\n   * @param {string} seriesName\n   */ getSeriesByName(seriesName) {\n        return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${$e4b487e979d7c06d$var$Utils$1.escapeString(seriesName)}']`);\n    }\n    /**\n   * @param {string} seriesName\n   */ isSeriesHidden(seriesName) {\n        var _a;\n        const targetElement = this.getSeriesByName(seriesName);\n        const el = /** @type {Element} */ targetElement;\n        const realIndex = parseInt((_a = el.getAttribute(\"data:realIndex\")) != null ? _a : \"0\", 10);\n        const isHidden = el.classList.contains(\"apexcharts-series-collapsed\");\n        return {\n            isHidden: isHidden,\n            realIndex: realIndex\n        };\n    }\n    /**\n   * @param {any} elSeries\n   * @param {number} index\n   */ addCollapsedClassToSeries(elSeries, index) {\n        $e4b487e979d7c06d$var$Series.addCollapsedClassToSeries(this.w, elSeries, index);\n    }\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {any} elSeries\n   * @param {number} index\n   */ static addCollapsedClassToSeries(w2, elSeries, index) {\n        function iterateOnAllCollapsedSeries(series) {\n            for(let cs = 0; cs < series.length; cs++)if (series[cs].index === index) elSeries.node.classList.add(\"apexcharts-series-collapsed\");\n        }\n        iterateOnAllCollapsedSeries(w2.globals.collapsedSeries);\n        iterateOnAllCollapsedSeries(w2.globals.ancillaryCollapsedSeries);\n    }\n    /**\n   * @param {string} seriesName\n   */ toggleSeries(seriesName) {\n        var _a;\n        const isSeriesHidden = this.isSeriesHidden(seriesName);\n        (_a = this._toggleDataSeries) == null || _a.call(this, isSeriesHidden.realIndex, isSeriesHidden.isHidden);\n        return isSeriesHidden.isHidden;\n    }\n    /**\n   * @param {string} seriesName\n   */ showSeries(seriesName) {\n        var _a;\n        const isSeriesHidden = this.isSeriesHidden(seriesName);\n        if (isSeriesHidden.isHidden) (_a = this._toggleDataSeries) == null || _a.call(this, isSeriesHidden.realIndex, true);\n    }\n    /**\n   * @param {string} seriesName\n   */ hideSeries(seriesName) {\n        var _a;\n        const isSeriesHidden = this.isSeriesHidden(seriesName);\n        if (!isSeriesHidden.isHidden) (_a = this._toggleDataSeries) == null || _a.call(this, isSeriesHidden.realIndex, false);\n    }\n    /**\n   * Cheap pre-update reset for the data-replacement paths (updateSeries /\n   * appendSeries). Clears the same bookkeeping resetSeries() clears (series\n   * cache, previous paths, collapsed-series state) WITHOUT restoring\n   * config.series from the initialSeries snapshot: the caller is about to\n   * replace the series anyway (parseData assigns config.series = newSeries),\n   * so materializing and cloning the snapshot per update is pure waste (two\n   * O(n) deep clones per streaming tick at 50k points).\n   */ prepareDataUpdate() {\n        const w2 = this.w;\n        this.clearSeriesCache();\n        w2.globals.previousPaths = [];\n        w2.globals.collapsedSeries = [];\n        w2.globals.ancillaryCollapsedSeries = [];\n        w2.globals.collapsedSeriesIndices = [];\n        w2.globals.ancillaryCollapsedSeriesIndices = [];\n    }\n    resetSeries(shouldUpdateChart = true, shouldResetZoom = true, shouldResetCollapsed = true) {\n        var _a, _b;\n        const w2 = this.w;\n        this.clearSeriesCache();\n        let series = $e4b487e979d7c06d$var$Utils$1.clone(w2.globals.initialSeries);\n        if (!Array.isArray(series)) series = $e4b487e979d7c06d$var$Utils$1.clone(w2.config.series) || [];\n        w2.globals.previousPaths = [];\n        if (shouldResetCollapsed) {\n            w2.globals.collapsedSeries = [];\n            w2.globals.ancillaryCollapsedSeries = [];\n            w2.globals.collapsedSeriesIndices = [];\n            w2.globals.ancillaryCollapsedSeriesIndices = [];\n        } else series = this.emptyCollapsedSeries(series);\n        w2.config.series = series;\n        if (shouldUpdateChart) {\n            if (shouldResetZoom) {\n                w2.interact.zoomed = false;\n                (_a = this._revertDefaultAxisMinMax) == null || _a.call(this);\n            }\n            (_b = this._updateSeries) == null || _b.call(this, series, w2.config.chart.animations.dynamicAnimation.enabled);\n        }\n    }\n    /**\n   * @param {any[]} series\n   */ emptyCollapsedSeries(series) {\n        const w2 = this.w;\n        if (!Array.isArray(series)) return series;\n        for(let i2 = 0; i2 < series.length; i2++)if (w2.globals.collapsedSeriesIndices.indexOf(i2) > -1) {\n            if (series[i2] && typeof series[i2] === \"object\") series[i2].data = [];\n            else series[i2] = 0;\n        }\n        return series;\n    }\n    /**\n   * Series display names for the CURRENT `w.config` (post-merge), derived the\n   * same way the parser does: an object series' own `name`, else the matching\n   * `labels` entry (non-axis / pie / unit), else a generated `series-N`.\n   * @returns {string[]}\n   */ _deriveSeriesNames() {\n        const w2 = this.w;\n        const series = w2.config.series || [];\n        const labels = w2.config.labels || [];\n        return series.map((s2, i2)=>{\n            if (s2 && typeof s2 === \"object\" && s2.name != null) return String(s2.name);\n            return labels[i2] != null ? String(labels[i2]) : `series-${i2 + 1}`;\n        });\n    }\n    /**\n   * Re-apply legend-hidden (collapsed) series to a freshly-updated\n   * `w.config.series`, matching BY CATEGORY NAME rather than index. This keeps a\n   * hide alive across a data update that reorders or regroups categories - most\n   * visibly a storyboard beat that supplies new series each scroll:\n   *   - a category still present stays hidden (at its possibly-new index);\n   *   - a category the update dropped/regrouped away is un-hidden (it no longer\n   *     exists, so it must reappear as part of the new grouping).\n   * Records without a stored name (older collapses) fall back to their index.\n   */ reconcileCollapsedByName() {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const newNames = this._deriveSeriesNames();\n        const reconcile = (records)=>{\n            const nextRecords = [];\n            const nextIndices = [];\n            records.forEach((rec)=>{\n                const j = rec && rec.name != null ? newNames.indexOf(rec.name) : rec.index;\n                if (j == null || j < 0 || j >= w2.config.series.length) return;\n                const s2 = /** @type {any} */ w2.config.series[j];\n                rec.index = j;\n                rec.data = gl.axisCharts ? s2 && s2.data ? s2.data.slice() : [] : s2;\n                nextRecords.push(rec);\n                nextIndices.push(j);\n            });\n            return {\n                records: nextRecords,\n                indices: nextIndices\n            };\n        };\n        const main = reconcile(gl.collapsedSeries);\n        gl.collapsedSeries = main.records;\n        gl.collapsedSeriesIndices = main.indices;\n        const anc = reconcile(gl.ancillaryCollapsedSeries);\n        gl.ancillaryCollapsedSeries = anc.records;\n        gl.ancillaryCollapsedSeriesIndices = anc.indices;\n        gl.allSeriesCollapsed = gl.collapsedSeries.length + gl.ancillaryCollapsedSeries.length === w2.config.series.length;\n        this.emptyCollapsedSeries(w2.config.series);\n    }\n    /**\n   * @param {string} seriesName\n   */ /**\n   * Bridge SVG series-dim state to the canvas renderer: SVG opacity classes\n   * (legend-mouseover-inactive) don't touch the painted canvas series layer, so\n   * repaint it with a matching per-series opacity. No-op unless the canvas\n   * renderer is active. The renderer is mirrored on globals by RendererController\n   * (Series has no ctx handle).\n   * @param {{active:number, opacity:number}|null} dim\n   */ canvasRestyle(dim) {\n        const r2 = this.w.globals.activeRenderer;\n        if (r2 && r2.kind === \"canvas\" && typeof r2.restyle === \"function\") r2.restyle(dim);\n    }\n    /**\n   * @param {string} seriesName\n   */ highlightSeries(seriesName) {\n        var _a;\n        const w2 = this.w;\n        const targetElement = this.getSeriesByName(seriesName);\n        const realIndex = parseInt((_a = targetElement == null ? void 0 : targetElement.getAttribute(\"data:realIndex\")) != null ? _a : \"\", 10);\n        const cacheKey = \"highlightSeriesEls\";\n        let allSeriesEls = w2.globals.cachedSelectors[cacheKey];\n        if (!allSeriesEls) {\n            allSeriesEls = w2.dom.baseEl.querySelectorAll(`.apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis`);\n            w2.globals.cachedSelectors[cacheKey] = allSeriesEls;\n        }\n        let seriesEl = null;\n        let dataLabelEl = null;\n        let yaxisEl = null;\n        if (w2.globals.axisCharts || w2.config.chart.type === \"radialBar\") {\n            if (w2.globals.axisCharts) {\n                seriesEl = w2.dom.baseEl.querySelector(`.apexcharts-series[data\\\\:realIndex='${realIndex}']`);\n                dataLabelEl = w2.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\\\:realIndex='${realIndex}']`);\n                const yaxisIndex = w2.globals.seriesYAxisReverseMap[realIndex];\n                yaxisEl = w2.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${yaxisIndex}']`);\n            } else seriesEl = w2.dom.baseEl.querySelector(`.apexcharts-series[rel='${realIndex + 1}']`);\n        } else seriesEl = w2.dom.baseEl.querySelector(`.apexcharts-series[rel='${realIndex + 1}'] path`);\n        for(let se2 = 0; se2 < allSeriesEls.length; se2++){\n            const serEl = /** @type {Element} */ allSeriesEls[se2];\n            serEl.classList.add(this.legendInactiveClass);\n        }\n        if (seriesEl) {\n            if (!w2.globals.axisCharts) {\n                const parentEl = /** @type {Element} */ seriesEl.parentNode;\n                parentEl == null || parentEl.classList.remove(this.legendInactiveClass);\n            }\n            seriesEl.classList.remove(this.legendInactiveClass);\n            if (dataLabelEl !== null) dataLabelEl.classList.remove(this.legendInactiveClass);\n            if (yaxisEl !== null) yaxisEl.classList.remove(this.legendInactiveClass);\n        } else for(let se2 = 0; se2 < allSeriesEls.length; se2++){\n            const serEl = /** @type {Element} */ allSeriesEls[se2];\n            serEl.classList.remove(this.legendInactiveClass);\n        }\n        this.canvasRestyle(seriesEl && !Number.isNaN(realIndex) ? {\n            active: realIndex,\n            opacity: 0.2\n        } : null);\n    }\n    /**\n   * @param {Event} e\n   * @param {any} targetElement\n   */ toggleSeriesOnHover(e2, targetElement) {\n        const w2 = this.w;\n        if (!targetElement) targetElement = e2.target;\n        const allSeriesEls = w2.dom.baseEl.querySelectorAll(`.apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis`);\n        if (e2.type === \"mousemove\") {\n            const realIndex = parseInt(targetElement.getAttribute(\"rel\"), 10) - 1;\n            this.highlightSeries(w2.seriesData.seriesNames[realIndex]);\n        } else if (e2.type === \"mouseout\") {\n            for(let se2 = 0; se2 < allSeriesEls.length; se2++)allSeriesEls[se2].classList.remove(this.legendInactiveClass);\n            this.canvasRestyle(null);\n        }\n    }\n    /**\n   * Dim every heatmap cell except those whose value falls inside the color\n   * range at `rangeIndex`. Shared by the categorical legend (hover a legend\n   * item) and the gradient legend (hover a band) — both supply an index into\n   * `colorScale.ranges` plus an action, decoupling the highlight from any\n   * particular DOM element / event shape.\n   *\n   * @param {number} rangeIndex index into `colorScale.ranges`\n   * @param {'highlight'|'reset'} action\n   */ highlightRangeInSeries(rangeIndex, action) {\n        const w2 = this.w;\n        const allHeatMapElements = w2.dom.baseEl.getElementsByClassName(\"apexcharts-heatmap-rect\");\n        const toggleAllInactive = (op)=>{\n            for(let i2 = 0; i2 < allHeatMapElements.length; i2++){\n                const classList = /** @type {any} */ allHeatMapElements[i2].classList;\n                if (typeof classList[op] === \"function\") classList[op](this.legendInactiveClass);\n            }\n        };\n        if (action === \"reset\") {\n            toggleAllInactive(\"remove\");\n            return;\n        }\n        const ranges = w2.config.plotOptions.heatmap.colorScale.ranges;\n        const range = ranges && ranges[rangeIndex];\n        if (!range) return;\n        toggleAllInactive(\"add\");\n        for(let i2 = 0; i2 < allHeatMapElements.length; i2++){\n            const val = Number(allHeatMapElements[i2].getAttribute(\"val\"));\n            if (val >= range.from && val <= range.to) allHeatMapElements[i2].classList.remove(this.legendInactiveClass);\n        }\n    }\n    /**\n   * @param {string[]} chartTypes\n   */ getActiveConfigSeriesIndex(order = \"asc\", chartTypes = []) {\n        const w2 = this.w;\n        let activeIndex = 0;\n        if (w2.config.series.length > 1) {\n            const activeSeriesIndex = w2.config.series.map((s2, index)=>{\n                const checkChartType = ()=>{\n                    if (w2.globals.comboCharts) return chartTypes.length === 0 || chartTypes.length && chartTypes.indexOf(/** @type {Record<string,any>} */ w2.config.series[index].type) > -1;\n                    return true;\n                };\n                const hasData = /** @type {any} */ s2.data && /** @type {any} */ s2.data.length > 0 && w2.globals.collapsedSeriesIndices.indexOf(index) === -1;\n                return hasData && checkChartType() ? index : -1;\n            });\n            for(let a2 = order === \"asc\" ? 0 : activeSeriesIndex.length - 1; order === \"asc\" ? a2 < activeSeriesIndex.length : a2 >= 0; order === \"asc\" ? a2++ : a2--)if (activeSeriesIndex[a2] !== -1) {\n                activeIndex = activeSeriesIndex[a2];\n                break;\n            }\n        }\n        return activeIndex;\n    }\n    /**\n   * The highest active series index inside each series group, as an array\n   * parallel to `w.labelData.seriesGroups`. Entries are -1 for a group whose\n   * every series is collapsed or empty.\n   *\n   * Same activity test as `getActiveConfigSeriesIndex` (has data and is not\n   * legend-collapsed), applied per group so grouped stacked bars can ask which\n   * series caps each individual stack rather than the chart as a whole.\n   * @param {string[]} chartTypes\n   * @returns {number[]}\n   */ getActiveConfigSeriesIndexByGroup(chartTypes = []) {\n        const w2 = this.w;\n        const groups = w2.labelData.seriesGroups || [];\n        return groups.map((group)=>{\n            let last = -1;\n            w2.config.series.forEach((s2, i2)=>{\n                if (group.indexOf(w2.seriesData.seriesNames[i2]) === -1) return;\n                if (w2.globals.comboCharts && chartTypes.length && chartTypes.indexOf(s2.type) === -1) return;\n                const hasData = s2.data && s2.data.length > 0 && w2.globals.collapsedSeriesIndices.indexOf(i2) === -1;\n                if (hasData) last = i2;\n            });\n            return last;\n        });\n    }\n    getBarSeriesIndices() {\n        const w2 = this.w;\n        if (w2.globals.comboCharts) return this.w.config.series.map((s2, i2)=>{\n            return s2.type === \"bar\" || s2.type === \"column\" ? i2 : -1;\n        }).filter((i2)=>{\n            return i2 !== -1;\n        });\n        return this.w.config.series.map((s2, i2)=>{\n            return i2;\n        });\n    }\n    getPreviousPaths() {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        $e4b487e979d7c06d$var$captureStreamFrame(w2);\n        $e4b487e979d7c06d$var$captureAxisChrome(w2);\n        $e4b487e979d7c06d$var$captureDataLabels(w2);\n        if (!w2.globals.axisCharts) {\n            w2.globals.previousPaths = w2.seriesData.series;\n            return;\n        }\n        if (!$e4b487e979d7c06d$var$Utils$1.elementExists(w2.dom.baseEl)) {\n            w2.globals.previousPaths = [];\n            return;\n        }\n        w2.globals.previousPaths = [];\n        function pushPaths(seriesEls, i2, type) {\n            const paths = seriesEls[i2].childNodes;\n            const dArr = {\n                type: type,\n                paths: /** @type {any[]} */ [],\n                realIndex: seriesEls[i2].getAttribute(\"data:realIndex\")\n            };\n            for(let j = 0; j < paths.length; j++)if (paths[j].hasAttribute(\"pathTo\")) {\n                const d = paths[j].getAttribute(\"pathTo\");\n                dArr.paths.push({\n                    d: d,\n                    key: paths[j].getAttribute(\"data:pathKey\"),\n                    fill: paths[j].getAttribute(\"fill\")\n                });\n            }\n            w2.globals.previousPaths.push(dArr);\n        }\n        const getPaths = (chartType)=>{\n            return w2.dom.baseEl.querySelectorAll(`.apexcharts-${chartType}-series .apexcharts-series`);\n        };\n        const chartTypes = [\n            \"line\",\n            \"area\",\n            \"bar\",\n            \"rangebar\",\n            \"rangeArea\",\n            \"candlestick\",\n            \"radar\"\n        ];\n        chartTypes.forEach((type)=>{\n            const paths = getPaths(type);\n            for(let p2 = 0; p2 < paths.length; p2++)pushPaths(paths, p2, type);\n        });\n        const heatTreeSeries = w2.dom.baseEl.querySelectorAll(`.apexcharts-${w2.config.chart.type} .apexcharts-series`);\n        if (heatTreeSeries.length > 0) for(let h2 = 0; h2 < heatTreeSeries.length; h2++){\n            const seriesEls = w2.dom.baseEl.querySelectorAll(`.apexcharts-${w2.config.chart.type} .apexcharts-series[data\\\\:realIndex='${h2}'] rect`);\n            const dArr = [];\n            for(let i2 = 0; i2 < seriesEls.length; i2++){\n                const getAttr = (x)=>{\n                    return /** @type {Element} */ seriesEls[i2].getAttribute(x);\n                };\n                const rect = {\n                    x: parseFloat((_a = getAttr(\"x\")) != null ? _a : \"0\"),\n                    y: parseFloat((_b = getAttr(\"y\")) != null ? _b : \"0\"),\n                    width: parseFloat((_c = getAttr(\"width\")) != null ? _c : \"0\"),\n                    height: parseFloat((_d = getAttr(\"height\")) != null ? _d : \"0\")\n                };\n                dArr.push({\n                    rect: rect,\n                    color: seriesEls[i2].getAttribute(\"color\")\n                });\n            }\n            w2.globals.previousPaths.push(dArr);\n        }\n    }\n    clearPreviousPaths() {\n        const w2 = this.w;\n        w2.globals.previousPaths = [];\n        w2.globals.allSeriesCollapsed = false;\n    }\n    handleNoData() {\n        const w2 = this.w;\n        const me = this;\n        const noDataOpts = w2.config.noData;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(me.w);\n        let x = w2.globals.svgWidth / 2;\n        let y = w2.globals.svgHeight / 2;\n        let textAnchor = \"middle\";\n        w2.globals.noData = true;\n        w2.globals.animationEnded = true;\n        if (noDataOpts.align === \"left\") {\n            x = 10;\n            textAnchor = \"start\";\n        } else if (noDataOpts.align === \"right\") {\n            x = w2.globals.svgWidth - 10;\n            textAnchor = \"end\";\n        }\n        if (noDataOpts.verticalAlign === \"top\") y = 50;\n        else if (noDataOpts.verticalAlign === \"bottom\") y = w2.globals.svgHeight - 50;\n        x = x + noDataOpts.offsetX;\n        y = y + parseInt(noDataOpts.style.fontSize, 10) + 2 + noDataOpts.offsetY;\n        if (noDataOpts.text !== void 0 && noDataOpts.text !== \"\") {\n            const titleText = graphics.drawText({\n                x: x,\n                y: y,\n                text: noDataOpts.text,\n                textAnchor: textAnchor,\n                fontSize: noDataOpts.style.fontSize,\n                fontFamily: noDataOpts.style.fontFamily,\n                foreColor: noDataOpts.style.color,\n                opacity: 1,\n                cssClass: \"apexcharts-text-nodata\"\n            });\n            w2.dom.Paper.add(titleText);\n        }\n    }\n    // When user clicks on legends, the collapsed series is filled with [0,0,0,...,0]\n    // This is because we don't want to alter the series' length as it is used at many places\n    /**\n   * @param {any[]} series\n   */ setNullSeriesToZeroValues(series) {\n        const w2 = this.w;\n        for(let sl = 0; sl < series.length; sl++){\n            if (series[sl].length === 0) for(let j = 0; j < series[w2.globals.maxValsInArrayIndex].length; j++)series[sl].push(0);\n        }\n        return series;\n    }\n    hasAllSeriesEqualX() {\n        let equalLen = true;\n        const w2 = this.w;\n        const filteredSerX = this.filteredSeriesX();\n        for(let i2 = 0; i2 < filteredSerX.length - 1; i2++)if (filteredSerX[i2][0] !== filteredSerX[i2 + 1][0]) {\n            equalLen = false;\n            break;\n        }\n        w2.globals.allSeriesHasEqualX = equalLen;\n        return equalLen;\n    }\n    filteredSeriesX() {\n        const w2 = this.w;\n        const filteredSeriesX = w2.seriesData.seriesX.map((ser)=>ser.length > 0 ? ser : []);\n        return filteredSeriesX;\n    }\n}\nconst $e4b487e979d7c06d$var$TOKEN_MAP = {\n    accent: \"--apx-accent\",\n    fore: \"--apx-fore\",\n    grid: \"--apx-grid\",\n    surface: \"--apx-surface\"\n};\nconst $e4b487e979d7c06d$var$MAX_SERIES_TOKENS = 24;\nfunction $e4b487e979d7c06d$var$readTokens(w2) {\n    if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return {};\n    const el = w2.dom && (w2.dom.elWrap || w2.dom.baseEl) || null;\n    if (!el) return {};\n    const cs = $e4b487e979d7c06d$var$BrowserAPIs.getComputedStyle(el);\n    if (!cs || typeof /** @type {any} */ cs.getPropertyValue !== \"function\") return {};\n    const read = (name2)=>{\n        const v2 = /** @type {any} */ cs.getPropertyValue(name2);\n        return v2 ? String(v2).trim() : \"\";\n    };\n    const out = {};\n    for(const key in $e4b487e979d7c06d$var$TOKEN_MAP){\n        const v2 = read(/** @type {any} */ $e4b487e979d7c06d$var$TOKEN_MAP[key]);\n        if (v2) out[key] = v2;\n    }\n    const series = [];\n    for(let i2 = 1; i2 <= $e4b487e979d7c06d$var$MAX_SERIES_TOKENS; i2++){\n        const v2 = read(`--apx-series-${i2}`);\n        if (!v2) break;\n        series.push(v2);\n    }\n    if (series.length) out.series = series;\n    return out;\n}\nconst $e4b487e979d7c06d$var$THEME_KEY = \"__apexcharts_themes__\";\nif (!/** @type {any} */ globalThis[$e4b487e979d7c06d$var$THEME_KEY]) globalThis[$e4b487e979d7c06d$var$THEME_KEY] = {};\nfunction $e4b487e979d7c06d$var$getThemes() {\n    return /** @type {any} */ globalThis[$e4b487e979d7c06d$var$THEME_KEY];\n}\nfunction $e4b487e979d7c06d$var$registerTheme(name2, def) {\n    if (!name2 || typeof name2 !== \"string\") {\n        console.warn(\"ApexCharts: registerTheme requires a non-empty name.\");\n        return;\n    }\n    if (def != null && (typeof def !== \"object\" || Array.isArray(def))) {\n        console.warn(`ApexCharts: registerTheme(\"${name2}\") expects an object like { mode, palette, tokens, monochrome, accessibility }.`);\n        return;\n    }\n    $e4b487e979d7c06d$var$getThemes()[name2] = def || {};\n}\nfunction $e4b487e979d7c06d$var$getTheme(name2) {\n    if (!name2) return null;\n    return $e4b487e979d7c06d$var$getThemes()[name2] || null;\n}\nfunction $e4b487e979d7c06d$var$unregisterTheme(name2) {\n    if (!name2) return;\n    delete $e4b487e979d7c06d$var$getThemes()[name2];\n}\nconst $e4b487e979d7c06d$var$DEFAULT_FORECOLOR_LIGHT = \"#373d3f\";\nconst $e4b487e979d7c06d$var$DEFAULT_FORECOLOR_DARK = \"#f6f7f8\";\nconst $e4b487e979d7c06d$var$DEFAULT_AXIS_GRID = \"#e0e0e0\";\nclass $e4b487e979d7c06d$var$Theme {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n        this.colors = [];\n        this.isColorFn = false;\n        this.isHeatmapDistributed = this.checkHeatmapDistributed();\n        this.isBarDistributed = this.checkBarDistributed();\n        this._tokens = {};\n        this._namedTheme = null;\n    }\n    checkHeatmapDistributed() {\n        const { chart: chart, plotOptions: plotOptions } = this.w.config;\n        return chart.type === \"treemap\" && plotOptions.treemap && plotOptions.treemap.distributed || chart.type === \"heatmap\" && plotOptions.heatmap && plotOptions.heatmap.distributed;\n    }\n    checkBarDistributed() {\n        const { chart: chart, plotOptions: plotOptions } = this.w.config;\n        return plotOptions.bar && plotOptions.bar.distributed && (chart.type === \"bar\" || chart.type === \"rangeBar\");\n    }\n    init() {\n        this.setDefaultColors();\n    }\n    setDefaultColors() {\n        var _a;\n        const w2 = this.w;\n        const utils = new $e4b487e979d7c06d$var$Utils$1();\n        this._namedTheme = $e4b487e979d7c06d$var$getTheme(w2.config.theme.name);\n        this._applyNamedThemeMode();\n        w2.dom.elWrap.classList.add(`apexcharts-theme-${w2.config.theme.mode || \"light\"}`);\n        this._applyModeDefaults();\n        this._tokens = this._resolveTokens();\n        this.applyTokenChrome(this._tokens);\n        const colorBlindMode = (_a = w2.config.theme.accessibility) == null ? void 0 : _a.colorBlindMode;\n        if (colorBlindMode) {\n            w2.globals.colors = this.getColorBlindColors(colorBlindMode);\n            this.applySeriesColors(w2.seriesData.seriesColors, w2.globals.colors);\n            const defaultColors2 = w2.globals.colors.slice();\n            this.pushExtraColors(w2.globals.colors);\n            this.applyColorTypes([\n                \"fill\",\n                \"stroke\"\n            ], defaultColors2);\n            this.applyDataLabelsColors(defaultColors2);\n            this.applyRadarPolygonsColors();\n            this.applyMarkersColors(defaultColors2);\n            if (colorBlindMode === \"highContrast\") w2.dom.elWrap.classList.add(\"apexcharts-high-contrast\");\n            return;\n        }\n        const configColors = [\n            ...w2.config.colors || w2.config.fill.colors || []\n        ];\n        w2.globals.colors = this.getColors(configColors);\n        this.applySeriesColors(w2.seriesData.seriesColors, w2.globals.colors);\n        if (w2.config.theme.monochrome.enabled) w2.globals.colors = this.getMonochromeColors(w2.config.theme.monochrome, w2.seriesData.series, utils);\n        const defaultColors = w2.globals.colors.slice();\n        this.pushExtraColors(w2.globals.colors);\n        this.applyColorTypes([\n            \"fill\",\n            \"stroke\"\n        ], defaultColors);\n        this.applyDataLabelsColors(defaultColors);\n        this.applyRadarPolygonsColors();\n        this.applyMarkersColors(defaultColors);\n    }\n    /**\n   * Facet (#13): normalize the mode's concrete defaults (foreColor + palette +\n   * tooltip theme) at render time. Only overwrites a value still at its\n   * opposite-mode default sentinel, so an explicit user value or a value\n   * already normalized by checkForDarkTheme/updateThemeOptions is untouched.\n   */ _applyModeDefaults() {\n        const w2 = this.w;\n        const mode = w2.config.theme.mode;\n        if (mode === \"dark\") {\n            if (w2.config.chart.foreColor === $e4b487e979d7c06d$var$DEFAULT_FORECOLOR_LIGHT) w2.config.chart.foreColor = $e4b487e979d7c06d$var$DEFAULT_FORECOLOR_DARK;\n            if (w2.config.theme.palette === \"palette1\") w2.config.theme.palette = \"palette4\";\n            if (w2.config.tooltip && w2.config.tooltip.theme !== \"light\") w2.config.tooltip.theme = \"dark\";\n        } else if (mode === \"light\") {\n            if (w2.config.chart.foreColor === $e4b487e979d7c06d$var$DEFAULT_FORECOLOR_DARK) w2.config.chart.foreColor = $e4b487e979d7c06d$var$DEFAULT_FORECOLOR_LIGHT;\n            if (w2.config.theme.palette === \"palette4\") w2.config.theme.palette = \"palette1\";\n        }\n    }\n    /**\n   * Facet (#13): apply a registered named theme's mode / accessibility /\n   * monochrome, each only when the user (or the OS watcher) has not set it, so\n   * explicit config and `follow:'os'` both win over the named theme.\n   */ _applyNamedThemeMode() {\n        const named = this._namedTheme;\n        if (!named) return;\n        const theme = this.w.config.theme;\n        if (named.mode && !theme.mode) theme.mode = named.mode;\n        if (named.accessibility && named.accessibility.colorBlindMode && !(theme.accessibility && theme.accessibility.colorBlindMode)) {\n            theme.accessibility = theme.accessibility || {};\n            theme.accessibility.colorBlindMode = named.accessibility.colorBlindMode;\n        }\n        if (named.monochrome && named.monochrome.enabled && !theme.monochrome.enabled) theme.monochrome = $e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({}, theme.monochrome), named.monochrome);\n    }\n    /**\n   * Facet (#13): the effective token set. CSS `--apx-*` tokens (when enabled)\n   * layer over the named theme's `tokens`, so a page-level token overrides a\n   * registered brand default.\n   * @returns {{accent?:string, fore?:string, grid?:string, surface?:string, series?:string[]}}\n   */ _resolveTokens() {\n        const named = this._namedTheme && this._namedTheme.tokens || {};\n        const css = this._shouldUseTokens() ? $e4b487e979d7c06d$var$readTokens(this.w) : {};\n        return $e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({}, named), css);\n    }\n    /**\n   * Facet (#13): tokens are on unless explicitly disabled (`theme.tokens:false`).\n   * `true` is the default (the legacy `'auto'` value is accepted and means the\n   * same); `readTokens` returns only the tokens actually present, so absence\n   * is a no-op.\n   * @returns {boolean}\n   */ _shouldUseTokens() {\n        return this.w.config.theme.tokens !== false;\n    }\n    /**\n   * Facet (#13): overwrite chrome defaults with `--apx-*` tokens, but only where\n   * the value still equals its built-in default (so explicit config wins).\n   * @param {{fore?:string, grid?:string, surface?:string}} tokens\n   */ applyTokenChrome(tokens) {\n        if (!tokens) return;\n        const w2 = this.w;\n        if (tokens.fore && (w2.config.chart.foreColor === $e4b487e979d7c06d$var$DEFAULT_FORECOLOR_LIGHT || w2.config.chart.foreColor === $e4b487e979d7c06d$var$DEFAULT_FORECOLOR_DARK)) w2.config.chart.foreColor = tokens.fore;\n        if (tokens.grid) {\n            if (w2.config.grid.borderColor === $e4b487e979d7c06d$var$DEFAULT_AXIS_GRID) w2.config.grid.borderColor = tokens.grid;\n            const applyAxis = (axis)=>{\n                if (!axis) return;\n                if (axis.axisBorder && axis.axisBorder.color === $e4b487e979d7c06d$var$DEFAULT_AXIS_GRID) axis.axisBorder.color = tokens.grid;\n                if (axis.axisTicks && axis.axisTicks.color === $e4b487e979d7c06d$var$DEFAULT_AXIS_GRID) axis.axisTicks.color = tokens.grid;\n            };\n            applyAxis(w2.config.xaxis);\n            if (Array.isArray(w2.config.yaxis)) w2.config.yaxis.forEach(applyAxis);\n            else applyAxis(w2.config.yaxis);\n        }\n        const appliedSurface = w2.globals.tokenSurface;\n        const currentBg = w2.config.chart.background;\n        const isOurs = !currentBg || currentBg === appliedSurface;\n        if (tokens.surface) {\n            if (isOurs) {\n                w2.config.chart.background = tokens.surface;\n                w2.globals.tokenSurface = tokens.surface;\n                const paperNode = w2.dom.Paper && w2.dom.Paper.node;\n                if (paperNode && paperNode.style) paperNode.style.background = tokens.surface;\n            }\n        } else if (appliedSurface && currentBg === appliedSurface) {\n            w2.config.chart.background = \"\";\n            w2.globals.tokenSurface = void 0;\n            const paperNode = w2.dom.Paper && w2.dom.Paper.node;\n            if (paperNode && paperNode.style) paperNode.style.background = \"\";\n        }\n    }\n    /**\n   * @param {any[]} configColors\n   */ getColors(configColors) {\n        const w2 = this.w;\n        if (!configColors || configColors.length === 0) return this.predefined();\n        if (Array.isArray(configColors) && configColors.length > 0 && typeof configColors[0] === \"function\") {\n            this.isColorFn = true;\n            return w2.config.series.map((s2, i2)=>{\n                const c2 = configColors[i2] || configColors[0];\n                return typeof c2 === \"function\" ? c2({\n                    value: w2.globals.axisCharts ? w2.seriesData.series[i2][0] || 0 : w2.seriesData.series[i2],\n                    seriesIndex: i2,\n                    dataPointIndex: i2,\n                    w: this.w\n                }) : c2;\n            });\n        }\n        return configColors;\n    }\n    /**\n   * @param {any[]} seriesColors\n   * @param {any[]} globalsColors\n   */ applySeriesColors(seriesColors, globalsColors) {\n        seriesColors.forEach((c2, i2)=>{\n            if (c2) globalsColors[i2] = c2;\n        });\n    }\n    /**\n   * @param {Record<string, any>} monochrome\n   * @param {any[]} series\n   * @param {any} utils\n   */ getMonochromeColors(monochrome, series, utils) {\n        const { color: color, shadeIntensity: shadeIntensity, shadeTo: shadeTo } = monochrome;\n        const glsCnt = this.isBarDistributed || this.isHeatmapDistributed ? series[0].length * series.length : series.length;\n        const part = 1 / (glsCnt / shadeIntensity);\n        let percent = 0;\n        return Array.from({\n            length: glsCnt\n        }, ()=>{\n            const newColor = shadeTo === \"dark\" ? utils.shadeColor(percent * -1, color) : utils.shadeColor(percent, color);\n            percent += part;\n            return newColor;\n        });\n    }\n    /**\n   * @param {string[]} colorTypes\n   * @param {string[]} defaultColors\n   */ applyColorTypes(colorTypes, defaultColors) {\n        const w2 = this.w;\n        colorTypes.forEach((c2)=>{\n            w2.globals[c2].colors = w2.config[c2].colors === void 0 ? this.isColorFn ? w2.config.colors : defaultColors : w2.config[c2].colors.slice();\n            this.pushExtraColors(/** @type {Record<string,any>} */ w2.globals[c2].colors);\n        });\n    }\n    /**\n   * @param {string[]} defaultColors\n   */ applyDataLabelsColors(defaultColors) {\n        const w2 = this.w;\n        w2.globals.dataLabels.style.colors = w2.config.dataLabels.style.colors === void 0 ? defaultColors : w2.config.dataLabels.style.colors.slice();\n        this.pushExtraColors(w2.globals.dataLabels.style.colors, 50);\n    }\n    applyRadarPolygonsColors() {\n        const w2 = this.w;\n        w2.globals.radarPolygons.fill.colors = w2.config.plotOptions.radar.polygons.fill.colors === void 0 ? [\n            w2.config.theme.mode === \"dark\" ? \"#343A3F\" : \"none\"\n        ] : w2.config.plotOptions.radar.polygons.fill.colors.slice();\n        this.pushExtraColors(w2.globals.radarPolygons.fill.colors, 20);\n    }\n    /**\n   * @param {string[]} defaultColors\n   */ applyMarkersColors(defaultColors) {\n        const w2 = this.w;\n        w2.globals.markers.colors = w2.config.markers.colors === void 0 ? defaultColors : w2.config.markers.colors.slice();\n        this.pushExtraColors(w2.globals.markers.colors);\n    }\n    /**\n   * @param {any} colorSeries\n   * @param {number} [length]\n   * @param {boolean | null} [distributed]\n   */ pushExtraColors(colorSeries, length, distributed = null) {\n        const w2 = this.w;\n        let len = length || w2.seriesData.series.length;\n        if (distributed === null) distributed = this.isBarDistributed || this.isHeatmapDistributed || w2.config.chart.type === \"heatmap\" && w2.config.plotOptions.heatmap && w2.config.plotOptions.heatmap.colorScale.inverse;\n        if (distributed && w2.seriesData.series.length) len = w2.seriesData.series[w2.globals.maxValsInArrayIndex].length * w2.seriesData.series.length;\n        if (colorSeries.length < len) {\n            const diff = len - colorSeries.length;\n            for(let i2 = 0; i2 < diff; i2++)colorSeries.push(colorSeries[i2]);\n        }\n    }\n    /**\n   * @param {'light' | 'dark'} mode\n   */ getColorBlindColors(mode) {\n        const palettes = $e4b487e979d7c06d$var$getThemePalettes();\n        const map = {\n            deuteranopia: palettes.cvdDeuteranopia,\n            protanopia: palettes.cvdProtanopia,\n            tritanopia: palettes.cvdTritanopia,\n            highContrast: palettes.highContrast\n        };\n        return /** @type {Record<string,any>} */ /** @type {any} */ (map[mode] || palettes.palette1).slice();\n    }\n    /**\n   * @param {Record<string, any>} options\n   */ updateThemeOptions(options2) {\n        options2.chart = options2.chart || {};\n        options2.tooltip = options2.tooltip || {};\n        const mode = options2.theme.mode;\n        const palette = mode === \"dark\" ? \"palette4\" : mode === \"light\" ? \"palette1\" : options2.theme.palette || \"palette1\";\n        const foreColor = mode === \"dark\" ? \"#f6f7f8\" : mode === \"light\" ? \"#373d3f\" : options2.chart.foreColor || \"#373d3f\";\n        options2.tooltip.theme = mode || \"light\";\n        options2.chart.foreColor = foreColor;\n        options2.theme.palette = palette;\n        return options2;\n    }\n    predefined() {\n        const palette = this.w.config.theme.palette;\n        const palettes = $e4b487e979d7c06d$var$getThemePalettes();\n        const builtin = /** @type {Record<string,any>} */ palettes[palette] || palettes.palette1;\n        const tokens = this._tokens || {};\n        if (Array.isArray(tokens.series) && tokens.series.length) return tokens.series.slice();\n        if (tokens.accent) return [\n            tokens.accent,\n            ...builtin\n        ];\n        const named = this._namedTheme;\n        if (named && Array.isArray(named.palette) && named.palette.length) return named.palette.slice();\n        return builtin;\n    }\n}\nclass $e4b487e979d7c06d$var$TitleSubtitle {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n    }\n    draw() {\n        this.drawTitleSubtitle(\"title\");\n        this.drawTitleSubtitle(\"subtitle\");\n    }\n    /**\n   * @param {'title' | 'subtitle'} type\n   */ drawTitleSubtitle(type) {\n        const w2 = this.w;\n        const tsConfig = type === \"title\" ? w2.config.title : w2.config.subtitle;\n        let x = w2.globals.svgWidth / 2;\n        let y = tsConfig.offsetY;\n        let textAnchor = \"middle\";\n        if (tsConfig.align === \"left\") {\n            x = 10;\n            textAnchor = \"start\";\n        } else if (tsConfig.align === \"right\") {\n            x = w2.globals.svgWidth - 10;\n            textAnchor = \"end\";\n        }\n        x = x + tsConfig.offsetX;\n        y = y + parseInt(tsConfig.style.fontSize, 10) + tsConfig.margin / 2;\n        if (tsConfig.text !== void 0) {\n            const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n            const titleText = graphics.drawText({\n                x: x,\n                y: y,\n                text: tsConfig.text,\n                textAnchor: textAnchor,\n                fontSize: tsConfig.style.fontSize,\n                fontFamily: tsConfig.style.fontFamily,\n                fontWeight: tsConfig.style.fontWeight,\n                foreColor: tsConfig.style.color,\n                opacity: 1\n            });\n            titleText.node.setAttribute(\"class\", `apexcharts-${type}-text`);\n            w2.dom.Paper.add(titleText);\n        }\n    }\n}\nlet $e4b487e979d7c06d$var$Helpers$4 = class Helpers {\n    /**\n   * @param {import('./Dimensions').default} dCtx\n   */ constructor(dCtx){\n        this.w = dCtx.w;\n        this.dCtx = dCtx;\n    }\n    /**\n   * Get Chart Title/Subtitle Dimensions\n   * @memberof Dimensions\n   * @return {{width: number, height: number}}\n   * @param {string} type\n   **/ getTitleSubtitleCoords(type) {\n        const w2 = this.w;\n        let width = 0;\n        let height = 0;\n        const floating = type === \"title\" ? w2.config.title.floating : w2.config.subtitle.floating;\n        const el = w2.dom.baseEl.querySelector(`.apexcharts-${type}-text`);\n        if (el !== null && !floating) {\n            const coord = el.getBoundingClientRect();\n            width = coord.width;\n            height = w2.globals.axisCharts ? coord.height + 5 : coord.height;\n        }\n        return {\n            width: width,\n            height: height\n        };\n    }\n    getLegendsRect() {\n        const w2 = this.w;\n        const elLegendWrap = w2.dom.elLegendWrap;\n        if (!w2.config.legend.height && (w2.config.legend.position === \"top\" || w2.config.legend.position === \"bottom\")) {\n            if (elLegendWrap) elLegendWrap.style.maxHeight = w2.globals.svgHeight / 2 + \"px\";\n        }\n        const lgRect = /** @type {any} */ Object.assign({}, $e4b487e979d7c06d$var$Utils$1.getBoundingClientRect(elLegendWrap));\n        if (elLegendWrap !== null && !w2.config.legend.floating && w2.config.legend.show) this.dCtx.lgRect = {\n            x: lgRect.x,\n            y: lgRect.y,\n            height: lgRect.height,\n            width: lgRect.height === 0 ? 0 : lgRect.width\n        };\n        else this.dCtx.lgRect = {\n            x: 0,\n            y: 0,\n            height: 0,\n            width: 0\n        };\n        if (w2.config.legend.position === \"left\" || w2.config.legend.position === \"right\") {\n            if (this.dCtx.lgRect.width * 1.5 > w2.globals.svgWidth) this.dCtx.lgRect.width = w2.globals.svgWidth / 1.5;\n        }\n        return this.dCtx.lgRect;\n    }\n    /**\n   * Get Y Axis Dimensions\n   * @memberof Dimensions\n   * @return {{width: number, height: number}}\n   **/ getDatalabelsRect() {\n        const w2 = this.w;\n        const allLabels = [];\n        w2.config.series.forEach((serie, seriesIndex)=>{\n            serie.data.forEach((datum, dataPointIndex)=>{\n                const getText = (v2)=>{\n                    return w2.config.dataLabels.formatter(v2, {\n                        seriesIndex: seriesIndex,\n                        dataPointIndex: dataPointIndex,\n                        w: w2\n                    });\n                };\n                const labelText = getText(w2.seriesData.series[seriesIndex][dataPointIndex]);\n                allLabels.push(labelText);\n            });\n        });\n        const val = $e4b487e979d7c06d$var$Utils$1.getLargestStringFromArr(allLabels);\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const dataLabelsStyle = w2.config.dataLabels.style;\n        const labelrect = graphics.getTextRects(val, parseInt(dataLabelsStyle.fontSize).toString(), dataLabelsStyle.fontFamily);\n        return {\n            width: labelrect.width * 1.05,\n            height: labelrect.height\n        };\n    }\n    /**\n   * @param {any} val\n   * @param {any[]} arr\n   */ getLargestStringFromMultiArr(val, arr) {\n        const w2 = this.w;\n        let valArr = val;\n        if (w2.axisFlags.isMultiLineX) {\n            const maxArrs = arr.map((xl)=>{\n                return Array.isArray(xl) ? xl.length : 1;\n            });\n            const maxArrLen = Math.max(...maxArrs);\n            const maxArrIndex = maxArrs.indexOf(maxArrLen);\n            valArr = arr[maxArrIndex];\n        }\n        return valArr;\n    }\n    /**\n   * Vertical space a sparkline has to keep free inside its SVG so the series\n   * stroke isn't clipped at the top / bottom edge.\n   *\n   * A stroke is centred on its path, so half of it hangs outside the plot\n   * wherever the path runs along an edge. Reserving that half unconditionally\n   * lifts the whole plot away from the SVG edges even when nothing is drawn\n   * there, which shows up as a strip of empty space under an area fill or a\n   * bar base (#5137). So reserve only what the ink can't absorb itself: where\n   * the stroke traces the data points, the distance between the extreme datum\n   * and the axis extreme already swallows part or all of the overhang. Fills\n   * need nothing: area fills are drawn unstroked (see Line.js renderPaths).\n   *\n   * @returns {{ top: number, bottom: number }}\n   **/ getSparklineStrokeInset() {\n        const w2 = this.w;\n        const maxStrokeWidth = Array.isArray(w2.config.stroke.width) ? Math.max(...w2.config.stroke.width) : w2.config.stroke.width;\n        const half = maxStrokeWidth / 2;\n        if (!w2.config.stroke.show || !(half > 0)) return {\n            top: 0,\n            bottom: 0\n        };\n        const yRange = w2.globals.maxY - w2.globals.minY;\n        const extremes = this._getSeriesYExtremes();\n        if (!this._strokeTracesDataPoints() || !(yRange > 0) || !extremes) return {\n            top: half,\n            bottom: half\n        };\n        const plotHeight = Math.max(w2.globals.svgHeight - maxStrokeWidth, 0);\n        const roomAbove = plotHeight * (w2.globals.maxY - extremes.max) / yRange;\n        const roomBelow = plotHeight * (extremes.min - w2.globals.minY) / yRange;\n        return {\n            top: Math.min(Math.max(half - roomAbove, 0), half),\n            bottom: Math.min(Math.max(half - roomBelow, 0), half)\n        };\n    }\n    /**\n   * Whether every drawn series is one whose stroke follows the data points, so\n   * the extreme datum marks the outermost ink. False for anything that strokes\n   * to the baseline or fills the plot (bar, heatmap, ...) and for stacked\n   * charts, where the ink is the cumulative total rather than the raw values.\n   * @returns {boolean}\n   **/ _strokeTracesDataPoints() {\n        const w2 = this.w;\n        if (!w2.globals.axisCharts || w2.config.chart.stacked) return false;\n        const tracesPoints = [\n            \"line\",\n            \"area\",\n            \"scatter\"\n        ];\n        return /** @type {any[]} */ w2.config.series.every((s2)=>tracesPoints.includes(s2.type || w2.config.chart.type));\n    }\n    /**\n   * Min / max across every plotted y value, or null when nothing is plottable.\n   * @returns {{ min: number, max: number } | null}\n   **/ _getSeriesYExtremes() {\n        let min = Infinity;\n        let max = -Infinity;\n        this.w.seriesData.series.forEach((data)=>{\n            if (!Array.isArray(data)) return;\n            data.forEach((val)=>{\n                if (!Number.isFinite(val)) return;\n                if (val < min) min = val;\n                if (val > max) max = val;\n            });\n        });\n        return min === Infinity ? null : {\n            min: min,\n            max: max\n        };\n    }\n};\nclass $e4b487e979d7c06d$var$DimXAxis {\n    /**\n   * @param {import('./Dimensions').default} dCtx\n   */ constructor(dCtx){\n        this.w = dCtx.w;\n        this.dCtx = dCtx;\n    }\n    /**\n   * Get X Axis Dimensions\n   * @memberof Dimensions\n   * @return {{width: number, height: number}}\n   **/ getxAxisLabelsCoords() {\n        const w2 = this.w;\n        let xaxisLabels = w2.labelData.labels.slice();\n        if (w2.config.xaxis.convertedCatToNumeric && xaxisLabels.length === 0) xaxisLabels = w2.labelData.categoryLabels;\n        let rect;\n        if (w2.labelData.timescaleLabels.length > 0) {\n            const coords = this.getxAxisTimeScaleLabelsCoords();\n            rect = {\n                width: coords.width,\n                height: coords.height\n            };\n            w2.layout.rotateXLabels = false;\n        } else {\n            this.dCtx.lgWidthForSideLegends = (w2.config.legend.position === \"left\" || w2.config.legend.position === \"right\") && !w2.config.legend.floating ? this.dCtx.lgRect.width : 0;\n            const xlbFormatter = w2.formatters.xLabelFormatter;\n            let val = $e4b487e979d7c06d$var$Utils$1.getLargestStringFromArr(xaxisLabels);\n            let valArr = this.dCtx.dimHelpers.getLargestStringFromMultiArr(val, xaxisLabels);\n            if (w2.globals.isBarHorizontal) {\n                val = w2.globals.yAxisScale[0].result.reduce((a2, b2)=>a2.length > b2.length ? a2 : b2, 0);\n                valArr = val;\n            }\n            const xFormat = new $e4b487e979d7c06d$var$Formatters(this.w);\n            const timestamp = val;\n            val = xFormat.xLabelFormat(/** @type {Function} */ xlbFormatter, val, timestamp, {\n                i: void 0,\n                dateFormatter: new $e4b487e979d7c06d$var$DateTime(this.w).formatDate,\n                w: w2\n            });\n            valArr = xFormat.xLabelFormat(/** @type {Function} */ xlbFormatter, valArr, timestamp, {\n                i: void 0,\n                dateFormatter: new $e4b487e979d7c06d$var$DateTime(this.w).formatDate,\n                w: w2\n            });\n            if (w2.config.xaxis.convertedCatToNumeric && typeof val === \"undefined\" || String(val).trim() === \"\") {\n                val = \"1\";\n                valArr = val;\n            }\n            const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n            let xLabelrect = graphics.getTextRects(val, w2.config.xaxis.labels.style.fontSize);\n            let xArrLabelrect = xLabelrect;\n            if (val !== valArr) xArrLabelrect = graphics.getTextRects(valArr, w2.config.xaxis.labels.style.fontSize);\n            rect = {\n                width: xLabelrect.width >= xArrLabelrect.width ? xLabelrect.width : xArrLabelrect.width,\n                height: xLabelrect.height >= xArrLabelrect.height ? xLabelrect.height : xArrLabelrect.height\n            };\n            if (rect.width * xaxisLabels.length > w2.globals.svgWidth - this.dCtx.lgWidthForSideLegends - this.dCtx.yAxisWidth - this.dCtx.gridPad.left - this.dCtx.gridPad.right && w2.config.xaxis.labels.rotate !== 0 || w2.config.xaxis.labels.rotateAlways) {\n                if (!w2.globals.isBarHorizontal) {\n                    w2.layout.rotateXLabels = true;\n                    const getRotatedTextRects = (text)=>{\n                        return graphics.getTextRects(text, w2.config.xaxis.labels.style.fontSize, w2.config.xaxis.labels.style.fontFamily, `rotate(${w2.config.xaxis.labels.rotate} 0 0)`, false);\n                    };\n                    xLabelrect = getRotatedTextRects(val);\n                    if (val !== valArr) xArrLabelrect = getRotatedTextRects(valArr);\n                    rect.height = (xLabelrect.height > xArrLabelrect.height ? xLabelrect.height : xArrLabelrect.height) / 1.5;\n                    rect.width = xLabelrect.width > xArrLabelrect.width ? xLabelrect.width : xArrLabelrect.width;\n                }\n            } else w2.layout.rotateXLabels = false;\n        }\n        if (!w2.config.xaxis.labels.show) rect = {\n            width: 0,\n            height: 0\n        };\n        return {\n            width: rect.width,\n            height: rect.height\n        };\n    }\n    /**\n   * Get X Axis Label Group height\n   * @memberof Dimensions\n   * @return {{width: number, height: number}}\n   */ getxAxisGroupLabelsCoords() {\n        var _a;\n        const w2 = this.w;\n        if (!w2.labelData.hasXaxisGroups) return {\n            width: 0,\n            height: 0\n        };\n        const fontSize = ((_a = w2.config.xaxis.group.style) == null ? void 0 : _a.fontSize) || w2.config.xaxis.labels.style.fontSize;\n        const xaxisLabels = w2.labelData.groups.map((g2)=>g2.title);\n        let rect;\n        const val = $e4b487e979d7c06d$var$Utils$1.getLargestStringFromArr(xaxisLabels);\n        const valArr = this.dCtx.dimHelpers.getLargestStringFromMultiArr(val, xaxisLabels);\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const xLabelrect = graphics.getTextRects(val, fontSize);\n        let xArrLabelrect = xLabelrect;\n        if (val !== valArr) xArrLabelrect = graphics.getTextRects(valArr, fontSize);\n        rect = {\n            width: xLabelrect.width >= xArrLabelrect.width ? xLabelrect.width : xArrLabelrect.width,\n            height: xLabelrect.height >= xArrLabelrect.height ? xLabelrect.height : xArrLabelrect.height\n        };\n        if (!w2.config.xaxis.labels.show) rect = {\n            width: 0,\n            height: 0\n        };\n        return {\n            width: rect.width,\n            height: rect.height\n        };\n    }\n    /**\n   * Get X Axis Title Dimensions\n   * @memberof Dimensions\n   * @return {{width: number, height: number}}\n   **/ getxAxisTitleCoords() {\n        const w2 = this.w;\n        let width = 0;\n        let height = 0;\n        if (w2.config.xaxis.title.text !== void 0) {\n            const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n            const rect = graphics.getTextRects(w2.config.xaxis.title.text, w2.config.xaxis.title.style.fontSize);\n            width = rect.width;\n            height = rect.height;\n        }\n        return {\n            width: width,\n            height: height\n        };\n    }\n    getxAxisTimeScaleLabelsCoords() {\n        const w2 = this.w;\n        this.dCtx.timescaleLabels = w2.labelData.timescaleLabels.slice();\n        const labels = this.dCtx.timescaleLabels.map((label)=>label.value);\n        const val = labels.reduce((a2, b2)=>{\n            if (typeof a2 === \"undefined\") {\n                console.error(\"You have possibly supplied invalid Date format. Please supply a valid JavaScript Date\");\n                return 0;\n            } else return a2.length > b2.length ? a2 : b2;\n        }, 0);\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const rect = graphics.getTextRects(val, w2.config.xaxis.labels.style.fontSize);\n        const totalWidthRotated = rect.width * 1.05 * labels.length;\n        if (totalWidthRotated > w2.layout.gridWidth && w2.config.xaxis.labels.rotate !== 0) w2.globals.overlappingXLabels = true;\n        return rect;\n    }\n    // In certain cases, the last labels gets cropped in xaxis.\n    // Hence, we add some additional padding based on the label length to avoid the last label being cropped or we don't draw it at all\n    /**\n   * @param {Record<string, any>} xaxisLabelCoords\n   */ additionalPaddingXLabels(xaxisLabelCoords) {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const cnf = w2.config;\n        const xtype = cnf.xaxis.type;\n        const lbWidth = xaxisLabelCoords.width;\n        gl.skipLastTimelinelabel = false;\n        gl.skipFirstTimelinelabel = false;\n        const isBarOpposite = w2.config.yaxis[0].opposite && w2.globals.isBarHorizontal;\n        const isCollapsed = (i2)=>gl.collapsedSeriesIndices.indexOf(i2) !== -1;\n        const rightPad = (yaxe)=>{\n            if (this.dCtx.timescaleLabels && this.dCtx.timescaleLabels.length) {\n                const firstimescaleLabel = this.dCtx.timescaleLabels[0];\n                const lastTimescaleLabel = this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length - 1];\n                const lastLabelPosition = lastTimescaleLabel.position + lbWidth / 1.75 - this.dCtx.yAxisWidthRight;\n                const firstLabelPosition = firstimescaleLabel.position - lbWidth / 1.75 + this.dCtx.yAxisWidthLeft;\n                const lgRightRectWidth = w2.config.legend.position === \"right\" && this.dCtx.lgRect.width > 0 ? this.dCtx.lgRect.width : 0;\n                if (lastLabelPosition > gl.svgWidth - w2.layout.translateX - lgRightRectWidth) gl.skipLastTimelinelabel = true;\n                if (firstLabelPosition < -((!yaxe.show || yaxe.floating) && (cnf.chart.type === \"bar\" || cnf.chart.type === \"candlestick\" || cnf.chart.type === \"rangeBar\" || cnf.chart.type === \"boxPlot\" || cnf.chart.type === \"violin\") ? lbWidth / 1.75 : 10)) gl.skipFirstTimelinelabel = true;\n            } else if (xtype === \"datetime\") {\n                if (this.dCtx.gridPad.right < lbWidth && !w2.layout.rotateXLabels) gl.skipLastTimelinelabel = true;\n            } else if (xtype !== \"datetime\") {\n                if (this.dCtx.gridPad.right < lbWidth / 2 - this.dCtx.yAxisWidthRight && !w2.layout.rotateXLabels && !w2.config.xaxis.labels.trim) this.dCtx.xPadRight = lbWidth / 2 + 1;\n            }\n        };\n        const padYAxe = (yaxe, i2)=>{\n            if (cnf.yaxis.length > 1 && isCollapsed(i2)) return;\n            rightPad(yaxe);\n        };\n        cnf.yaxis.forEach((yaxe, i2)=>{\n            if (isBarOpposite) {\n                if (this.dCtx.gridPad.left < lbWidth) this.dCtx.xPadLeft = lbWidth / 2 + 1;\n                this.dCtx.xPadRight = lbWidth / 2 + 1;\n            } else padYAxe(yaxe, i2);\n        });\n    }\n}\nclass $e4b487e979d7c06d$var$DimYAxis {\n    /**\n   * @param {import('./Dimensions').default} dCtx\n   */ constructor(dCtx){\n        this.w = dCtx.w;\n        this.dCtx = dCtx;\n    }\n    /**\n   * Get Y Axis Dimensions\n   * @memberof Dimensions\n   * @returns {Array<{width: number, height: number}>}\n   **/ getyAxisLabelsCoords() {\n        const w2 = this.w;\n        const width = 0;\n        const height = 0;\n        const ret = [];\n        let labelPad = 10;\n        const axesUtils = new $e4b487e979d7c06d$var$AxesUtils(this.w, {\n            theme: this.dCtx.theme,\n            timeScale: this.dCtx.timeScale\n        });\n        w2.config.yaxis.map((yaxe, index)=>{\n            const formatterArgs = {\n                seriesIndex: index,\n                dataPointIndex: -1,\n                w: w2\n            };\n            const yS = w2.globals.yAxisScale[index];\n            let yAxisMinWidth = 0;\n            if (!axesUtils.isYAxisHidden(index) && yaxe.labels.show && yaxe.labels.minWidth !== void 0) yAxisMinWidth = yaxe.labels.minWidth;\n            if (!axesUtils.isYAxisHidden(index) && yaxe.labels.show && yS.result.length) {\n                const lbFormatter = w2.formatters.yLabelFormatters[index];\n                const minV = yS.niceMin === Number.MIN_VALUE ? 0 : yS.niceMin;\n                let val = yS.result.reduce((acc, curr)=>{\n                    var _a, _b;\n                    return ((_a = String(lbFormatter(acc, formatterArgs))) == null ? void 0 : _a.length) > ((_b = String(lbFormatter(curr, formatterArgs))) == null ? void 0 : _b.length) ? acc : curr;\n                }, minV);\n                val = lbFormatter(val, formatterArgs);\n                let valArr = val;\n                if (typeof val === \"undefined\" || val.length === 0) val = yS.niceMax;\n                if (String(val).length === 1) {\n                    val = val + \".0\";\n                    valArr = val;\n                }\n                if (w2.globals.isBarHorizontal) {\n                    labelPad = 0;\n                    const barYaxisLabels = w2.labelData.labels.slice();\n                    val = $e4b487e979d7c06d$var$Utils$1.getLargestStringFromArr(barYaxisLabels);\n                    val = lbFormatter(val, {\n                        seriesIndex: index,\n                        dataPointIndex: -1,\n                        w: w2\n                    });\n                    valArr = this.dCtx.dimHelpers.getLargestStringFromMultiArr(val, barYaxisLabels);\n                }\n                const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n                const rotateStr = \"rotate(\".concat(yaxe.labels.rotate, \" 0 0)\");\n                const rect = graphics.getTextRects(val, yaxe.labels.style.fontSize, yaxe.labels.style.fontFamily, rotateStr, false);\n                let arrLabelrect = rect;\n                if (val !== valArr) arrLabelrect = graphics.getTextRects(valArr, yaxe.labels.style.fontSize, yaxe.labels.style.fontFamily, rotateStr, false);\n                ret.push({\n                    width: (yAxisMinWidth > arrLabelrect.width || yAxisMinWidth > rect.width ? yAxisMinWidth : arrLabelrect.width > rect.width ? arrLabelrect.width : rect.width) + labelPad,\n                    height: arrLabelrect.height > rect.height ? arrLabelrect.height : rect.height\n                });\n            } else ret.push({\n                width: width,\n                height: height\n            });\n        });\n        return ret;\n    }\n    /**\n   * Get Y Axis Dimensions\n   * @memberof Dimensions\n   * @returns {Array<{width: number, height: number}>}\n   **/ getyAxisTitleCoords() {\n        const w2 = this.w;\n        const ret = [];\n        w2.config.yaxis.map((yaxe)=>{\n            if (yaxe.show && yaxe.title.text !== void 0) {\n                const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n                const rotateStr = \"rotate(\".concat(yaxe.title.rotate, \" 0 0)\");\n                const rect = graphics.getTextRects(yaxe.title.text, yaxe.title.style.fontSize, yaxe.title.style.fontFamily, rotateStr, false);\n                ret.push({\n                    width: rect.width,\n                    height: rect.height\n                });\n            } else ret.push({\n                width: 0,\n                height: 0\n            });\n        });\n        return ret;\n    }\n    getTotalYAxisWidth() {\n        const w2 = this.w;\n        let yAxisWidth = 0;\n        let yAxisWidthLeft = 0;\n        let yAxisWidthRight = 0;\n        const padding = w2.globals.yAxisScale.length > 1 ? 10 : 0;\n        const axesUtils = new $e4b487e979d7c06d$var$AxesUtils(this.w, {\n            theme: this.dCtx.theme,\n            timeScale: this.dCtx.timeScale\n        });\n        const isHiddenYAxis = function(index) {\n            return w2.globals.ignoreYAxisIndexes.indexOf(index) > -1;\n        };\n        const padForLabelTitle = (coord, index)=>{\n            const floating = w2.config.yaxis[index].floating;\n            let width = 0;\n            if (coord.width > 0 && !floating) {\n                width = coord.width + padding;\n                if (isHiddenYAxis(index)) width = width - coord.width - padding;\n            } else width = floating || axesUtils.isYAxisHidden(index) ? 0 : 5;\n            w2.config.yaxis[index].opposite ? yAxisWidthRight = yAxisWidthRight + width : yAxisWidthLeft = yAxisWidthLeft + width;\n            yAxisWidth = yAxisWidth + width;\n        };\n        w2.layout.yLabelsCoords.map((yLabelCoord, index)=>{\n            padForLabelTitle(yLabelCoord, index);\n        });\n        w2.layout.yTitleCoords.map((yTitleCoord, index)=>{\n            padForLabelTitle(yTitleCoord, index);\n        });\n        if (w2.globals.isBarHorizontal && !w2.config.yaxis[0].floating) yAxisWidth = w2.layout.yLabelsCoords[0].width + w2.layout.yTitleCoords[0].width + 15;\n        this.dCtx.yAxisWidthLeft = yAxisWidthLeft;\n        this.dCtx.yAxisWidthRight = yAxisWidthRight;\n        return yAxisWidth;\n    }\n}\nclass $e4b487e979d7c06d$var$DimGrid {\n    /**\n   * @param {import('./Dimensions').default} dCtx\n   */ constructor(dCtx){\n        this.w = dCtx.w;\n        this.dCtx = dCtx;\n    }\n    /**\n   * @param {number} gridWidth\n   */ gridPadForColumnsInNumericAxis(gridWidth) {\n        const { w: w2 } = this;\n        const { config: cnf, globals: gl } = w2;\n        if (gl.noData || gl.collapsedSeries.length + gl.ancillaryCollapsedSeries.length === cnf.series.length) return 0;\n        const hasBar = (type2)=>[\n                \"bar\",\n                \"rangeBar\",\n                \"candlestick\",\n                \"boxPlot\",\n                \"violin\"\n            ].includes(type2);\n        const type = cnf.chart.type;\n        let barWidth = 0;\n        let seriesLen = hasBar(type) ? cnf.series.length : 1;\n        if (gl.comboBarCount > 0) seriesLen = gl.comboBarCount;\n        gl.collapsedSeries.forEach((c2)=>{\n            if (hasBar(c2.type)) seriesLen -= 1;\n        });\n        if (cnf.chart.stacked) seriesLen = 1;\n        const barsPresent = hasBar(type) || gl.comboBarCount > 0;\n        let xRange = Math.abs(gl.initialMaxX - gl.initialMinX);\n        if (barsPresent && w2.axisFlags.isXNumeric && !gl.isBarHorizontal && seriesLen > 0 && xRange !== 0) {\n            if (xRange <= 3) xRange = gl.dataPoints;\n            const xRatio = xRange / gridWidth;\n            let xDivision = gl.minXDiff && gl.minXDiff / xRatio > 0 ? gl.minXDiff / xRatio : 0;\n            if (xDivision > gridWidth / 2) xDivision /= 2;\n            barWidth = xDivision * parseInt(cnf.plotOptions.bar.columnWidth, 10) / 100;\n            if (barWidth < 1) barWidth = 1;\n            gl.barPadForNumericAxis = barWidth;\n        }\n        return barWidth;\n    }\n    /**\n   * Reserve room to the right of the plot for stacked *total* dataLabels on a\n   * 100% horizontal bar chart.\n   *\n   * The total label is placed just past the end of the stack. Under\n   * `stackType: '100%'` every stack ends at the axis maximum, i.e. exactly at\n   * the right edge of the plot, so the label was drawn outside the grid and\n   * clipped by the SVG viewport. See #3579.\n   *\n   * Scoped to the 100% case on purpose: with ordinary stacking the axis\n   * maximum is a rounded \"nice\" number that normally sits beyond the longest\n   * stack, so there is already room and padding every such chart would move\n   * layouts that render correctly today.\n   *\n   * Raises `xPadRight`, which narrows `gridWidth` without translating the plot\n   * origin, so the y-axis and its labels stay put and only the bars get\n   * shorter.\n   */ gridPadForStackedTotalDataLabels() {\n        const { w: w2 } = this;\n        const totalConfig = w2.config.plotOptions.bar.dataLabels.total;\n        if (!w2.globals.isBarHorizontal || !w2.config.chart.stacked || w2.config.chart.stackType !== \"100%\" || !totalConfig.enabled) return;\n        const totals = w2.seriesData.stackedSeriesTotals || [];\n        if (!totals.length) return;\n        const formatter = totalConfig.formatter || w2.config.dataLabels.formatter;\n        const labels = totals.map((val, j)=>String(formatter ? formatter(val, $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, w2), {\n                seriesIndex: 0,\n                dataPointIndex: j,\n                w: w2\n            })) : val));\n        const graphics = new $e4b487e979d7c06d$var$Graphics(w2);\n        const rect = graphics.getTextRects($e4b487e979d7c06d$var$Utils$1.getLargestStringFromArr(labels), parseFloat(totalConfig.style.fontSize).toString(), totalConfig.style.fontFamily);\n        const needed = rect.width + Math.abs(totalConfig.offsetX || 0) + 2;\n        this.dCtx.xPadRight = Math.max(this.dCtx.xPadRight, needed);\n    }\n    gridPadFortitleSubtitle() {\n        const { w: w2 } = this;\n        const { globals: gl } = w2;\n        let gridShrinkOffset = this.dCtx.isSparkline || !gl.axisCharts ? 0 : 10;\n        const titleSubtitle = [\n            \"title\",\n            \"subtitle\"\n        ];\n        titleSubtitle.forEach((t2)=>{\n            if (w2.config[t2].text !== void 0) gridShrinkOffset += w2.config[t2].margin;\n            else gridShrinkOffset += this.dCtx.isSparkline || !gl.axisCharts ? 0 : 5;\n        });\n        if (w2.config.legend.show && w2.config.legend.position === \"bottom\" && !w2.config.legend.floating && !gl.axisCharts) gridShrinkOffset += 10;\n        const titleCoords = this.dCtx.dimHelpers.getTitleSubtitleCoords(\"title\");\n        const subtitleCoords = this.dCtx.dimHelpers.getTitleSubtitleCoords(\"subtitle\");\n        this.dCtx.titleBlockPad = gridShrinkOffset;\n        w2.layout.gridHeight -= titleCoords.height + subtitleCoords.height + gridShrinkOffset;\n        w2.layout.translateY += titleCoords.height + subtitleCoords.height + gridShrinkOffset;\n    }\n    /**\n   * @param {{width: number, height: number}[]} yTitleCoords\n   * @param {{width: number, height: number}[]} yaxisLabelCoords\n   */ setGridXPosForDualYAxis(yTitleCoords, yaxisLabelCoords) {\n        const { w: w2 } = this;\n        const axesUtils = new $e4b487e979d7c06d$var$AxesUtils(this.w, {\n            theme: this.dCtx.theme,\n            timeScale: this.dCtx.timeScale\n        });\n        w2.config.yaxis.forEach((yaxe, index)=>{\n            if (w2.globals.ignoreYAxisIndexes.indexOf(index) === -1 && !yaxe.floating && !axesUtils.isYAxisHidden(index)) {\n                if (yaxe.opposite) w2.layout.translateX -= yaxisLabelCoords[index].width + yTitleCoords[index].width + parseInt(yaxe.labels.style.fontSize, 10) / 1.2 + 12;\n                if (w2.layout.translateX < 2) w2.layout.translateX = 2;\n            }\n        });\n    }\n}\nconst $e4b487e979d7c06d$var$XHTML$3 = \"http://www.w3.org/1999/xhtml\";\nconst $e4b487e979d7c06d$var$BREADCRUMB_HEIGHT = 18;\nconst $e4b487e979d7c06d$var$BREADCRUMB_HEIGHT_FULL = 23;\nfunction $e4b487e979d7c06d$var$breadcrumbConfig(w2, localCfg) {\n    const shared = w2.config.drilldown && w2.config.drilldown.breadcrumb || {};\n    return $e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({\n        show: true,\n        position: \"top-left\",\n        separator: \" / \",\n        rootLabel: \"All\",\n        offsetX: 0,\n        offsetY: 0,\n        formatter: void 0\n    }, shared), localCfg || {});\n}\nfunction $e4b487e979d7c06d$var$avoidChromeOverlap(w2, nav) {\n    const chrome = /** @type {Element[]} */ [\n        \".apexcharts-title-text\",\n        \".apexcharts-subtitle-text\"\n    ].map((s2)=>w2.dom.baseEl.querySelector(s2)).filter((el)=>el !== null);\n    if (!chrome.length) return;\n    const wrapTop = w2.dom.elWrap.getBoundingClientRect().top;\n    for(let pass = 0; pass < chrome.length + 1; pass++){\n        const nr = nav.getBoundingClientRect();\n        const hit = chrome.find((el)=>{\n            const r2 = el.getBoundingClientRect();\n            return nr.left < r2.right && nr.right > r2.left && nr.top < r2.bottom && nr.bottom > r2.top;\n        });\n        if (!hit) break;\n        nav.style.top = `${hit.getBoundingClientRect().bottom - wrapTop + 4}px`;\n    }\n}\nfunction $e4b487e979d7c06d$var$breadcrumbCeiling(w2, nav) {\n    const gridTop = w2.layout.translateY || 0;\n    const elWrap = w2.dom.elWrap;\n    if (!elWrap) return gridTop;\n    const labels = w2.dom.baseEl.querySelectorAll(\".apexcharts-yaxis-label\");\n    if (!labels.length) return gridTop;\n    const wrapTop = elWrap.getBoundingClientRect().top;\n    const navRect = nav.getBoundingClientRect();\n    let ceiling = gridTop;\n    for(let i2 = 0; i2 < labels.length; i2++){\n        const r2 = labels[i2].getBoundingClientRect();\n        if (!r2.height) continue;\n        if (r2.left >= navRect.right || r2.right <= navRect.left) continue;\n        ceiling = Math.min(ceiling, r2.top - wrapTop);\n    }\n    return ceiling;\n}\nfunction $e4b487e979d7c06d$var$placeInReservedBand(w2, ctx, nav, cfg) {\n    var _a;\n    const dimHelpers = (_a = ctx == null ? void 0 : ctx.dimensions) == null ? void 0 : _a.dimHelpers;\n    const titleArea = dimHelpers ? dimHelpers.getTitleSubtitleCoords(\"title\").height + dimHelpers.getTitleSubtitleCoords(\"subtitle\").height : 0;\n    const navH = nav.getBoundingClientRect().height || $e4b487e979d7c06d$var$BREADCRUMB_HEIGHT;\n    const offsetY = cfg && cfg.offsetY || 0;\n    const ceiling = $e4b487e979d7c06d$var$breadcrumbCeiling(w2, nav);\n    if (ceiling - titleArea >= navH + 1) {\n        nav.style.top = `${ceiling - navH - 1 + offsetY}px`;\n        return true;\n    }\n    nav.style.top = `${titleArea + offsetY}px`;\n    const dark = w2.config.theme.mode === \"dark\";\n    nav.style.background = dark ? \"rgba(20,24,30,0.82)\" : \"rgba(255,255,255,0.86)\";\n    nav.style.borderRadius = \"4px\";\n    return false;\n}\nfunction $e4b487e979d7c06d$var$clearBreadcrumb(w2) {\n    const elWrap = w2.dom.elWrap;\n    if (!elWrap) return;\n    const existing = elWrap.querySelector(\".apexcharts-breadcrumb\");\n    if (existing && existing.parentNode) existing.parentNode.removeChild(existing);\n}\nfunction $e4b487e979d7c06d$var$renderBreadcrumb(w2, opts) {\n    if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return null;\n    const elWrap = w2.dom.elWrap;\n    if (!elWrap) return null;\n    $e4b487e979d7c06d$var$clearBreadcrumb(w2);\n    const cfg = opts.config || $e4b487e979d7c06d$var$breadcrumbConfig(w2);\n    if (cfg.show === false) return null;\n    const crumbs = opts.crumbs || [];\n    if (crumbs.length < 2) return null;\n    const nav = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$3, \"nav\");\n    nav.setAttribute(\"class\", \"apexcharts-breadcrumb\");\n    nav.setAttribute(\"aria-label\", opts.ariaLabel || \"Breadcrumb\");\n    $e4b487e979d7c06d$var$positionBreadcrumb(nav, cfg);\n    if (opts.compact) {\n        nav.style.fontSize = \"11px\";\n        nav.style.padding = \"0 2px\";\n    }\n    const separator = cfg.separator != null ? cfg.separator : \" / \";\n    crumbs.forEach((crumb, i2)=>{\n        var _a;\n        if (i2 > 0) {\n            const sep = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$3, \"span\");\n            sep.setAttribute(\"class\", \"apexcharts-breadcrumb-separator\");\n            sep.setAttribute(\"aria-hidden\", \"true\");\n            sep.textContent = separator;\n            nav.appendChild(sep);\n        }\n        let label = i2 === 0 ? (_a = cfg.rootLabel) != null ? _a : \"All\" : crumb.label;\n        if (typeof cfg.formatter === \"function\") label = cfg.formatter(label, {\n            index: i2,\n            depth: crumbs.length - 1,\n            data: crumb.data\n        });\n        if (i2 === crumbs.length - 1) {\n            const cur = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$3, \"span\");\n            cur.setAttribute(\"class\", \"apexcharts-breadcrumb-item apexcharts-breadcrumb-current\");\n            cur.setAttribute(\"aria-current\", \"page\");\n            cur.textContent = String(label);\n            nav.appendChild(cur);\n            return;\n        }\n        const btn = /** @type {HTMLButtonElement} */ $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$3, \"button\");\n        btn.setAttribute(\"type\", \"button\");\n        btn.setAttribute(\"class\", \"apexcharts-breadcrumb-item\");\n        if (i2 === 0) {\n            const arrow = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$3, \"span\");\n            arrow.setAttribute(\"class\", \"apexcharts-breadcrumb-arrow\");\n            arrow.setAttribute(\"aria-hidden\", \"true\");\n            arrow.textContent = \"\\u2190\";\n            btn.appendChild(arrow);\n        }\n        const text = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$3, \"span\");\n        text.setAttribute(\"class\", \"apexcharts-breadcrumb-label\");\n        text.textContent = String(label);\n        btn.appendChild(text);\n        btn.addEventListener(\"click\", ()=>opts.onNavigate(i2, crumb));\n        nav.appendChild(btn);\n    });\n    elWrap.appendChild(nav);\n    return nav;\n}\nfunction $e4b487e979d7c06d$var$positionBreadcrumb(nav, cfg) {\n    const ox = cfg.offsetX || 0;\n    const oy = cfg.offsetY || 0;\n    nav.style.position = \"absolute\";\n    nav.style.top = oy + \"px\";\n    if (cfg.position === \"top-right\") nav.style.right = -ox + 3 + \"px\";\n    else nav.style.left = ox + \"px\";\n}\nclass $e4b487e979d7c06d$var$Dimensions {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.theme = ctx.theme;\n        this.timeScale = ctx.timeScale;\n        this.lgRect = /** @type {any} */ {};\n        this.yAxisWidth = 0;\n        this.yAxisWidthLeft = 0;\n        this.yAxisWidthRight = 0;\n        this.xAxisHeight = 0;\n        this.isSparkline = this.w.config.chart.sparkline.enabled;\n        this.dimHelpers = new $e4b487e979d7c06d$var$Helpers$4(this);\n        this.dimYAxis = new $e4b487e979d7c06d$var$DimYAxis(this);\n        this.dimXAxis = new $e4b487e979d7c06d$var$DimXAxis(this);\n        this.dimGrid = new $e4b487e979d7c06d$var$DimGrid(this);\n        this.lgWidthForSideLegends = 0;\n        this.gridPad = $e4b487e979d7c06d$var$__spreadValues({}, this.w.config.grid.padding);\n        this.xPadRight = 0;\n        this.titleBlockPad = 0;\n        this.xPadLeft = 0;\n        this.datalabelsCoords = {\n            width: 0,\n            height: 0\n        };\n        this.xAxisWidth = 0;\n        this.timescaleLabels = [];\n    }\n    /**\n   * @memberof Dimensions\n   **/ plotCoords() {\n        const w2 = this.w;\n        const gl = w2.globals;\n        this.gridPad = $e4b487e979d7c06d$var$__spreadValues({}, w2.config.grid.padding);\n        this.lgRect = this.dimHelpers.getLegendsRect();\n        this.datalabelsCoords = {\n            width: 0,\n            height: 0\n        };\n        if (this.isSparkline) {\n            if (this.w.globals.markers.largestSize > 0) Object.entries(this.gridPad).forEach(([k, v2])=>{\n                this.gridPad[k] = Math.max(v2, this.w.globals.markers.largestSize / 1.5);\n            });\n            const strokeInset = this.dimHelpers.getSparklineStrokeInset();\n            this.gridPad.top = Math.max(strokeInset.top, this.gridPad.top);\n            this.gridPad.bottom = Math.max(strokeInset.bottom, this.gridPad.bottom);\n        }\n        if (gl.axisCharts) this.setDimensionsForAxisCharts();\n        else this.setDimensionsForNonAxisCharts();\n        this.dimGrid.gridPadFortitleSubtitle();\n        this.gridPadForBreadcrumb();\n        this.dimGrid.gridPadForStackedTotalDataLabels();\n        w2.layout.gridHeight = w2.layout.gridHeight - this.gridPad.top - this.gridPad.bottom;\n        w2.layout.gridWidth = w2.layout.gridWidth - this.gridPad.left - this.gridPad.right - this.xPadRight - this.xPadLeft;\n        const barWidth = this.dimGrid.gridPadForColumnsInNumericAxis(w2.layout.gridWidth);\n        w2.layout.gridWidth = w2.layout.gridWidth - barWidth * 2;\n        w2.layout.translateX = w2.layout.translateX + this.gridPad.left + this.xPadLeft + (barWidth > 0 ? barWidth : 0);\n        w2.layout.translateY = w2.layout.translateY + this.gridPad.top;\n        return {\n            // w.layout (future slice)\n            layout: {\n                gridHeight: w2.layout.gridHeight,\n                gridWidth: w2.layout.gridWidth,\n                translateX: w2.layout.translateX,\n                translateY: w2.layout.translateY,\n                translateXAxisX: w2.layout.translateXAxisX,\n                translateXAxisY: w2.layout.translateXAxisY,\n                rotateXLabels: w2.layout.rotateXLabels,\n                xAxisHeight: w2.layout.xAxisHeight,\n                xAxisLabelsHeight: w2.layout.xAxisLabelsHeight,\n                xAxisGroupLabelsHeight: w2.layout.xAxisGroupLabelsHeight,\n                xAxisLabelsWidth: w2.layout.xAxisLabelsWidth,\n                yLabelsCoords: w2.layout.yLabelsCoords,\n                yTitleCoords: w2.layout.yTitleCoords,\n                gridPad: $e4b487e979d7c06d$var$__spreadValues({}, this.gridPad)\n            }\n        };\n    }\n    /**\n   * Reserve a strip above the plot for a navigation breadcrumb.\n   *\n   * A treemap fills its plot edge to edge, so unlike a sunburst - whose rings\n   * leave the corners empty - an absolutely-positioned breadcrumb has nowhere\n   * to float without covering a tile. Giving it real space is the only way it\n   * never overlaps.\n   *\n   * Reserved whenever click-to-zoom is enabled, not only while zoomed in: the\n   * strip appears and disappears as the reader navigates, and sizing the plot\n   * around its presence would reflow every tile on each zoom.\n   */ gridPadForBreadcrumb() {\n        var _a, _b, _c, _d, _e, _f;\n        const w2 = this.w;\n        const isTreemap = w2.config.chart.type === \"treemap\";\n        if (isTreemap) {\n            const zoom = (_b = (_a = w2.config.plotOptions) == null ? void 0 : _a.treemap) == null ? void 0 : _b.zoom;\n            if (zoom && zoom.enabled) {\n                if ($e4b487e979d7c06d$var$breadcrumbConfig(w2, zoom.breadcrumb).show === false) return;\n                this.gridPad.top += $e4b487e979d7c06d$var$BREADCRUMB_HEIGHT + 4;\n                return;\n            }\n        }\n        if (!w2.globals.axisCharts) return;\n        if (!this.ctx.drilldown) return;\n        if (!w2.config.drilldown || !w2.config.drilldown.enabled) return;\n        if ($e4b487e979d7c06d$var$breadcrumbConfig(w2).show === false) return;\n        const labelFs = parseFloat(String((_f = (_e = (_d = (_c = w2.config.yaxis) == null ? void 0 : _c[0]) == null ? void 0 : _d.labels) == null ? void 0 : _e.style) == null ? void 0 : _f.fontSize)) || 11;\n        const yLabelOverhang = isTreemap ? 0 : Math.ceil(labelFs * $e4b487e979d7c06d$var$LINE_HEIGHT_RATIO / 2);\n        const needed = $e4b487e979d7c06d$var$BREADCRUMB_HEIGHT_FULL + 1 + yLabelOverhang;\n        const alreadyFree = isTreemap ? 0 : this.titleBlockPad || 0;\n        this.gridPad.top += Math.max(0, needed - alreadyFree);\n    }\n    setDimensionsForAxisCharts() {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const yaxisLabelCoords = this.dimYAxis.getyAxisLabelsCoords();\n        const yTitleCoords = this.dimYAxis.getyAxisTitleCoords();\n        if (gl.isSlopeChart) this.datalabelsCoords = this.dimHelpers.getDatalabelsRect();\n        w2.layout.yLabelsCoords = [];\n        w2.layout.yTitleCoords = [];\n        w2.config.yaxis.map((yaxe, index)=>{\n            w2.layout.yLabelsCoords.push({\n                width: yaxisLabelCoords[index].width,\n                index: index\n            });\n            w2.layout.yTitleCoords.push(/** @type {any} */ {\n                width: yTitleCoords[index].width,\n                index: index\n            });\n        });\n        this.yAxisWidth = this.dimYAxis.getTotalYAxisWidth();\n        const xaxisLabelCoords = this.dimXAxis.getxAxisLabelsCoords();\n        const xaxisGroupLabelCoords = this.dimXAxis.getxAxisGroupLabelsCoords();\n        const xtitleCoords = this.dimXAxis.getxAxisTitleCoords();\n        this.conditionalChecksForAxisCoords(xaxisLabelCoords, xtitleCoords, xaxisGroupLabelCoords);\n        w2.layout.translateXAxisY = w2.layout.rotateXLabels ? this.xAxisHeight / 8 : -4;\n        w2.layout.translateXAxisX = w2.layout.rotateXLabels && w2.axisFlags.isXNumeric && w2.config.xaxis.labels.rotate <= -45 ? -this.xAxisWidth / 4 : 0;\n        if (w2.globals.isBarHorizontal) {\n            w2.layout.rotateXLabels = false;\n            w2.layout.translateXAxisY = -1 * ((parseInt(w2.config.xaxis.labels.style.fontSize, 10) || 12) / 1.5);\n        }\n        w2.layout.translateXAxisY = w2.layout.translateXAxisY + w2.config.xaxis.labels.offsetY;\n        w2.layout.translateXAxisX = w2.layout.translateXAxisX + w2.config.xaxis.labels.offsetX;\n        let yAxisWidth = this.yAxisWidth;\n        let xAxisHeight = this.xAxisHeight;\n        w2.layout.xAxisLabelsHeight = this.xAxisHeight - xtitleCoords.height;\n        w2.layout.xAxisGroupLabelsHeight = w2.layout.xAxisLabelsHeight - xaxisLabelCoords.height;\n        w2.layout.xAxisLabelsWidth = this.xAxisWidth;\n        w2.layout.xAxisHeight = this.xAxisHeight;\n        let translateY = 10;\n        if (w2.config.chart.type === \"radar\" || this.isSparkline) {\n            yAxisWidth = 0;\n            xAxisHeight = 0;\n        }\n        if (this.isSparkline) this.lgRect = {\n            height: 0,\n            width: 0\n        };\n        if (this.isSparkline || w2.config.chart.type === \"treemap\") {\n            yAxisWidth = 0;\n            xAxisHeight = 0;\n            translateY = 0;\n        }\n        if (!this.isSparkline && w2.config.chart.type !== \"treemap\") this.dimXAxis.additionalPaddingXLabels(xaxisLabelCoords);\n        const legendTopBottom = ()=>{\n            w2.layout.translateX = yAxisWidth + this.datalabelsCoords.width;\n            w2.layout.gridHeight = gl.svgHeight - this.lgRect.height - xAxisHeight - (!this.isSparkline && w2.config.chart.type !== \"treemap\" ? w2.layout.rotateXLabels ? 10 : 15 : 0);\n            w2.layout.gridWidth = gl.svgWidth - yAxisWidth - this.datalabelsCoords.width * 2;\n        };\n        if (w2.config.xaxis.position === \"top\") translateY = w2.layout.xAxisHeight - w2.config.xaxis.axisTicks.height - 5;\n        switch(w2.config.legend.position){\n            case \"bottom\":\n                w2.layout.translateY = translateY;\n                legendTopBottom();\n                break;\n            case \"top\":\n                w2.layout.translateY = this.lgRect.height + translateY;\n                legendTopBottom();\n                break;\n            case \"left\":\n                w2.layout.translateY = translateY;\n                w2.layout.translateX = this.lgRect.width + yAxisWidth + this.datalabelsCoords.width;\n                w2.layout.gridHeight = gl.svgHeight - xAxisHeight - 12;\n                w2.layout.gridWidth = gl.svgWidth - this.lgRect.width - yAxisWidth - this.datalabelsCoords.width * 2;\n                break;\n            case \"right\":\n                w2.layout.translateY = translateY;\n                w2.layout.translateX = yAxisWidth + this.datalabelsCoords.width;\n                w2.layout.gridHeight = gl.svgHeight - xAxisHeight - 12;\n                w2.layout.gridWidth = gl.svgWidth - this.lgRect.width - yAxisWidth - this.datalabelsCoords.width * 2 - 5;\n                break;\n            default:\n                throw new Error(\"Legend position not supported\");\n        }\n        this.dimGrid.setGridXPosForDualYAxis(yTitleCoords, yaxisLabelCoords);\n        const objyAxis = new $e4b487e979d7c06d$var$YAxis(this.w, {\n            theme: this.theme,\n            timeScale: this.timeScale\n        });\n        objyAxis.setYAxisXPosition(yaxisLabelCoords, yTitleCoords);\n    }\n    setDimensionsForNonAxisCharts() {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const cnf = w2.config;\n        let xPad = 0;\n        if (w2.config.legend.show && !w2.config.legend.floating) xPad = 20;\n        if (cnf.chart.type === \"unit\") {\n            const legendVisible = cnf.legend.show && !cnf.legend.floating;\n            const pos = cnf.legend.position;\n            let top = 0;\n            let side = 0;\n            if (legendVisible) {\n                if (pos === \"bottom\" || pos === \"top\") top = this.lgRect.height;\n                else side = this.lgRect.width + xPad;\n            }\n            w2.layout.gridWidth = gl.svgWidth - side;\n            w2.layout.gridHeight = gl.svgHeight - top;\n            w2.layout.translateX = pos === \"left\" ? side : 0;\n            w2.layout.translateY = pos === \"top\" ? top : 0;\n            return;\n        }\n        const type = cnf.chart.type === \"sunburst\" ? \"sunburst\" : cnf.chart.type === \"pie\" || cnf.chart.type === \"polarArea\" || cnf.chart.type === \"donut\" ? \"pie\" : \"radialBar\";\n        const offY = cnf.plotOptions[type].offsetY;\n        const offX = cnf.plotOptions[type].offsetX;\n        if (!cnf.legend.show || cnf.legend.floating) {\n            w2.layout.gridHeight = gl.svgHeight;\n            const maxWidth = w2.dom.elWrap.getBoundingClientRect().width;\n            w2.layout.gridWidth = Math.min(maxWidth, w2.layout.gridHeight);\n            w2.layout.translateY = offY;\n            w2.layout.translateX = offX + (gl.svgWidth - w2.layout.gridWidth) / 2;\n            return;\n        }\n        switch(cnf.legend.position){\n            case \"bottom\":\n                w2.layout.gridHeight = gl.svgHeight - this.lgRect.height;\n                w2.layout.gridWidth = gl.svgWidth;\n                w2.layout.translateY = offY - 10;\n                w2.layout.translateX = offX + (gl.svgWidth - w2.layout.gridWidth) / 2;\n                break;\n            case \"top\":\n                w2.layout.gridHeight = gl.svgHeight - this.lgRect.height;\n                w2.layout.gridWidth = gl.svgWidth;\n                w2.layout.translateY = this.lgRect.height + offY + 10;\n                w2.layout.translateX = offX + (gl.svgWidth - w2.layout.gridWidth) / 2;\n                break;\n            case \"left\":\n                w2.layout.gridWidth = gl.svgWidth - this.lgRect.width - xPad;\n                w2.layout.gridHeight = cnf.chart.height !== \"auto\" ? gl.svgHeight : w2.layout.gridWidth;\n                w2.layout.translateY = offY;\n                w2.layout.translateX = offX + this.lgRect.width + xPad;\n                break;\n            case \"right\":\n                w2.layout.gridWidth = gl.svgWidth - this.lgRect.width - xPad - 5;\n                w2.layout.gridHeight = cnf.chart.height !== \"auto\" ? gl.svgHeight : w2.layout.gridWidth;\n                w2.layout.translateY = offY;\n                w2.layout.translateX = offX + 10;\n                break;\n            default:\n                throw new Error(\"Legend position not supported\");\n        }\n    }\n    /**\n   * @param {any} xaxisLabelCoords\n   * @param {any} xtitleCoords\n   * @param {any} xaxisGroupLabelCoords\n   */ conditionalChecksForAxisCoords(xaxisLabelCoords, xtitleCoords, xaxisGroupLabelCoords) {\n        const w2 = this.w;\n        const xAxisNum = w2.labelData.hasXaxisGroups ? 2 : 1;\n        const baseXAxisHeight = xaxisGroupLabelCoords.height + xaxisLabelCoords.height + xtitleCoords.height;\n        const xAxisHeightMultiplicate = w2.axisFlags.isMultiLineX ? 1.2 : $e4b487e979d7c06d$var$LINE_HEIGHT_RATIO;\n        const rotatedXAxisOffset = w2.layout.rotateXLabels ? 22 : 10;\n        const rotatedXAxisLegendOffset = w2.layout.rotateXLabels && w2.config.legend.position === \"bottom\";\n        const additionalOffset = rotatedXAxisLegendOffset ? 10 : 0;\n        this.xAxisHeight = baseXAxisHeight * xAxisHeightMultiplicate + xAxisNum * rotatedXAxisOffset + additionalOffset;\n        this.xAxisWidth = xaxisLabelCoords.width;\n        if (this.xAxisHeight - xtitleCoords.height > w2.config.xaxis.labels.maxHeight) this.xAxisHeight = w2.config.xaxis.labels.maxHeight;\n        if (w2.config.xaxis.labels.minHeight && this.xAxisHeight < w2.config.xaxis.labels.minHeight) this.xAxisHeight = w2.config.xaxis.labels.minHeight;\n        if (w2.config.xaxis.floating) this.xAxisHeight = 0;\n        let minYAxisWidth = 0;\n        let maxYAxisWidth = 0;\n        w2.config.yaxis.forEach((y)=>{\n            minYAxisWidth += y.labels.minWidth;\n            maxYAxisWidth += y.labels.maxWidth;\n        });\n        if (this.yAxisWidth < minYAxisWidth) this.yAxisWidth = minYAxisWidth;\n        if (this.yAxisWidth > maxYAxisWidth) this.yAxisWidth = maxYAxisWidth;\n    }\n}\nconst $e4b487e979d7c06d$var$SECOND = 1e3;\nconst $e4b487e979d7c06d$var$MINUTE = 60 * $e4b487e979d7c06d$var$SECOND;\nconst $e4b487e979d7c06d$var$HOUR = 60 * $e4b487e979d7c06d$var$MINUTE;\nconst $e4b487e979d7c06d$var$DAY = 24 * $e4b487e979d7c06d$var$HOUR;\nconst $e4b487e979d7c06d$var$WEEK = 7 * $e4b487e979d7c06d$var$DAY;\nconst $e4b487e979d7c06d$var$APPROX_MONTH = 30 * $e4b487e979d7c06d$var$DAY;\nconst $e4b487e979d7c06d$var$APPROX_YEAR = 365 * $e4b487e979d7c06d$var$DAY;\nconst $e4b487e979d7c06d$var$MIN_ZOOM_DAYS = 10 / 86400;\nconst $e4b487e979d7c06d$var$TICK_LADDER = [\n    {\n        unit: \"second\",\n        step: 1,\n        approxMs: $e4b487e979d7c06d$var$SECOND\n    },\n    {\n        unit: \"second\",\n        step: 5,\n        approxMs: 5 * $e4b487e979d7c06d$var$SECOND\n    },\n    {\n        unit: \"second\",\n        step: 15,\n        approxMs: 15 * $e4b487e979d7c06d$var$SECOND\n    },\n    {\n        unit: \"second\",\n        step: 30,\n        approxMs: 30 * $e4b487e979d7c06d$var$SECOND\n    },\n    {\n        unit: \"minute\",\n        step: 1,\n        approxMs: $e4b487e979d7c06d$var$MINUTE\n    },\n    {\n        unit: \"minute\",\n        step: 5,\n        approxMs: 5 * $e4b487e979d7c06d$var$MINUTE\n    },\n    {\n        unit: \"minute\",\n        step: 15,\n        approxMs: 15 * $e4b487e979d7c06d$var$MINUTE\n    },\n    {\n        unit: \"minute\",\n        step: 30,\n        approxMs: 30 * $e4b487e979d7c06d$var$MINUTE\n    },\n    {\n        unit: \"hour\",\n        step: 1,\n        approxMs: $e4b487e979d7c06d$var$HOUR\n    },\n    {\n        unit: \"hour\",\n        step: 3,\n        approxMs: 3 * $e4b487e979d7c06d$var$HOUR\n    },\n    {\n        unit: \"hour\",\n        step: 6,\n        approxMs: 6 * $e4b487e979d7c06d$var$HOUR\n    },\n    {\n        unit: \"hour\",\n        step: 12,\n        approxMs: 12 * $e4b487e979d7c06d$var$HOUR\n    },\n    {\n        unit: \"day\",\n        step: 1,\n        approxMs: $e4b487e979d7c06d$var$DAY\n    },\n    {\n        unit: \"day\",\n        step: 2,\n        approxMs: 2 * $e4b487e979d7c06d$var$DAY\n    },\n    {\n        unit: \"week\",\n        step: 1,\n        approxMs: $e4b487e979d7c06d$var$WEEK\n    },\n    {\n        unit: \"week\",\n        step: 2,\n        approxMs: 2 * $e4b487e979d7c06d$var$WEEK\n    },\n    {\n        unit: \"month\",\n        step: 1,\n        approxMs: $e4b487e979d7c06d$var$APPROX_MONTH\n    },\n    {\n        unit: \"month\",\n        step: 3,\n        approxMs: 3 * $e4b487e979d7c06d$var$APPROX_MONTH\n    },\n    {\n        unit: \"month\",\n        step: 6,\n        approxMs: 6 * $e4b487e979d7c06d$var$APPROX_MONTH\n    },\n    {\n        unit: \"year\",\n        step: 1,\n        approxMs: $e4b487e979d7c06d$var$APPROX_YEAR\n    },\n    {\n        unit: \"year\",\n        step: 2,\n        approxMs: 2 * $e4b487e979d7c06d$var$APPROX_YEAR\n    },\n    {\n        unit: \"year\",\n        step: 5,\n        approxMs: 5 * $e4b487e979d7c06d$var$APPROX_YEAR\n    },\n    {\n        unit: \"year\",\n        step: 10,\n        approxMs: 10 * $e4b487e979d7c06d$var$APPROX_YEAR\n    },\n    {\n        unit: \"year\",\n        step: 25,\n        approxMs: 25 * $e4b487e979d7c06d$var$APPROX_YEAR\n    },\n    {\n        unit: \"year\",\n        step: 50,\n        approxMs: 50 * $e4b487e979d7c06d$var$APPROX_YEAR\n    },\n    {\n        unit: \"year\",\n        step: 100,\n        approxMs: 100 * $e4b487e979d7c06d$var$APPROX_YEAR\n    }\n];\nconst $e4b487e979d7c06d$var$DEFAULT_TICK_COUNT = 10;\nclass $e4b487e979d7c06d$var$TimeScale {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.tickInterval = null;\n        this.timeScaleArray = [];\n        this.utc = w2.config.xaxis.labels.datetimeUTC;\n    }\n    /**\n   * Compute raw ticks for a datetime axis spanning [minX, maxX]. Single\n   * uniform stride — one unit, no promotion, no calendar-boundary overlay.\n   * Context (year, day) is folded into each label's format string at\n   * `formatDates` time, not split across promoted ticks.\n   *\n   * @param {number} minX\n   * @param {number} maxX\n   * @returns {Array<any>} raw ticks (pre-formatting). Pass to recalcDimensionsBasedOnFormat for the final timescaleLabels.\n   */ calculateTimeScaleTicks(minX, maxX) {\n        const w2 = this.w;\n        if (w2.globals.allSeriesCollapsed) {\n            w2.labelData.labels = [];\n            w2.labelData.timescaleLabels = [];\n            this.timeScaleArray = [];\n            return [];\n        }\n        const span = maxX - minX;\n        const daysDiff = span / $e4b487e979d7c06d$var$DAY;\n        w2.interact.disableZoomIn = false;\n        w2.interact.disableZoomOut = false;\n        if (daysDiff < $e4b487e979d7c06d$var$MIN_ZOOM_DAYS) w2.interact.disableZoomIn = true;\n        else if (daysDiff > 5e4) w2.interact.disableZoomOut = true;\n        const targetCount = Number.isFinite(w2.config.xaxis.tickAmount) ? /** @type {number} */ w2.config.xaxis.tickAmount : $e4b487e979d7c06d$var$DEFAULT_TICK_COUNT;\n        this.tickInterval = $e4b487e979d7c06d$var$pickInterval(span, targetCount);\n        const ticks = this.generateBaseTicks(minX, maxX, this.tickInterval);\n        this.timeScaleArray = ticks;\n        return ticks;\n    }\n    /**\n   * Walk the interval stride from `minX` to `maxX`. Every tick carries\n   * `unit: interval.unit` — no promotion, no snapping. Uniform spacing is\n   * guaranteed.\n   *\n   * @param {number} minX\n   * @param {number} maxX\n   * @param {{ unit: string, step: number }} interval\n   * @returns {Array<any>}\n   */ generateBaseTicks(minX, maxX, interval) {\n        const w2 = this.w;\n        const dt = new $e4b487e979d7c06d$var$DateTime(w2);\n        const isUTC = this.utc;\n        const gridWidth = w2.layout.gridWidth;\n        const span = maxX - minX;\n        const ticks = [];\n        let t2 = dt.ceilToBoundary(minX, /** @type {any} */ interval.unit, interval.step, isUTC);\n        let iter = 0;\n        const MAX_ITER = 5e3;\n        while(t2 <= maxX && iter < MAX_ITER){\n            const f = dt.getDateFields(t2, isUTC);\n            const position = span > 0 ? (t2 - minX) / span * gridWidth : 0;\n            ticks.push({\n                timestamp: t2,\n                position: position,\n                unit: interval.unit,\n                year: f.year,\n                month: f.month + 1,\n                day: f.date,\n                hour: f.hour,\n                minute: f.minute,\n                second: f.second,\n                value: t2\n            });\n            t2 = dt.addInterval(t2, /** @type {any} */ interval.unit, interval.step, isUTC);\n            iter++;\n        }\n        return ticks;\n    }\n    /**\n   * Public entry called from Core.js after calculateTimeScaleTicks. Formats\n   * the raw ticks into display labels, removes overlapping entries, writes\n   * the result to `w.labelData.timescaleLabels`, and re-runs Dimensions to\n   * lay out the grid based on the final label widths.\n   *\n   * @param {Array<any>} rawTicks\n   */ recalcDimensionsBasedOnFormat(rawTicks) {\n        const w2 = this.w;\n        const formatted = this.formatDates(rawTicks);\n        const filtered = this.removeOverlappingTS(formatted);\n        w2.labelData.timescaleLabels = filtered.slice();\n        const dimensions = new $e4b487e979d7c06d$var$Dimensions(this.w, this.ctx);\n        const layoutState = dimensions.plotCoords();\n        this.ctx._writeLayoutCoords(layoutState.layout);\n    }\n    /**\n   * Format each raw tick into a display label. All ticks share one\n   * effective format computed once from the interval unit and the data\n   * range — when the range spans coarser units, the base format from\n   * `datetimeFormatter[unit]` is automatically extended with the higher-\n   * unit context (e.g. month-scale spanning years → `MMM yyyy`, hour-scale\n   * spanning days → `dd MMM HH:mm`). A user-supplied `xaxis.labels.format`\n   * overrides everything.\n   *\n   * @param {Array<any>} rawTicks\n   * @returns {Array<any>}\n   */ formatDates(rawTicks) {\n        const w2 = this.w;\n        const dt = new $e4b487e979d7c06d$var$DateTime(w2);\n        const userFormat = w2.config.xaxis.labels.format;\n        const dtFmt = w2.config.xaxis.labels.datetimeFormatter;\n        const isUTC = this.utc;\n        const pad = (n2, len = 2)=>String(n2).padStart(len, \"0\");\n        const effectiveFormat = userFormat ? userFormat : this._effectiveFormat(rawTicks, dtFmt);\n        return rawTicks.map((tick)=>{\n            const date = dt.getDate(tick.timestamp);\n            const value = dt.formatDate(date, effectiveFormat);\n            const ds = `${tick.year}-${pad(tick.month)}-${pad(tick.day)}T${pad(tick.hour)}:${pad(tick.minute)}:${pad(tick.second)}.000${isUTC ? \"Z\" : \"\"}`;\n            return {\n                dateString: ds,\n                position: tick.position,\n                value: value,\n                unit: tick.unit,\n                year: tick.year,\n                month: tick.month\n            };\n        });\n    }\n    /**\n   * Pick the format string used for every tick this render. Folds coarser\n   * context into the base `datetimeFormatter[unit]` when the data range\n   * spans it. Skipped when the base format already references the higher\n   * unit's tokens (so user customizations aren't doubled).\n   *\n   * @param {Array<any>} rawTicks\n   * @param {Record<string, string>} dtFmt\n   * @returns {string}\n   */ _effectiveFormat(rawTicks, dtFmt) {\n        if (rawTicks.length === 0) return dtFmt.day || \"dd MMM\";\n        const unit = this.tickInterval && this.tickInterval.unit || rawTicks[0].unit;\n        const base = dtFmt[unit === \"week\" ? \"day\" : unit] || dtFmt.day || \"dd MMM\";\n        const first = rawTicks[0];\n        const last = rawTicks[rawTicks.length - 1];\n        const spansYears = first.year !== last.year;\n        const spansMonths = spansYears || first.month !== last.month;\n        const spansDays = spansMonths || first.day !== last.day;\n        const hasYearToken = /y/i.test(base);\n        const hasMonthToken = /M/.test(base);\n        const hasDayToken = /d/i.test(base);\n        if (unit === \"month\" || unit === \"week\") {\n            if (spansYears && !hasYearToken) return base + \" yyyy\";\n            return base;\n        }\n        if (unit === \"day\") {\n            if (spansYears && !hasYearToken) return base + \" yyyy\";\n            return base;\n        }\n        if (unit === \"hour\" || unit === \"minute\" || unit === \"second\") {\n            if (spansDays && !hasDayToken && !hasMonthToken) {\n                const prefix = spansYears ? \"dd MMM yyyy\" : \"dd MMM\";\n                return prefix + \" \" + base;\n            }\n            return base;\n        }\n        return base;\n    }\n    /**\n   * Drop labels that would overlap their predecessor (when\n   * `xaxis.labels.hideOverlappingLabels` is true). The first label is always\n   * kept. Width is measured per-label unless all labels have the same string\n   * length, in which case one measurement is reused.\n   *\n   * @param {Array<any>} arr\n   * @returns {Array<any>}\n   */ removeOverlappingTS(arr) {\n        if (arr.length === 0) return [];\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(w2);\n        let equalLabelLengthFlag = false;\n        let constantLabelWidth;\n        if (arr[0].value && arr.every((lb)=>lb.value.length === arr[0].value.length)) {\n            equalLabelLengthFlag = true;\n            constantLabelWidth = graphics.getTextRects(arr[0].value, w2.config.xaxis.labels.style.fontSize).width;\n        }\n        let lastDrawnIndex = 0;\n        const filtered = arr.map((item, index)=>{\n            if (index === 0) return item;\n            if (!w2.config.xaxis.labels.hideOverlappingLabels) return item;\n            const prevLabelWidth = equalLabelLengthFlag ? /** @type {number} */ constantLabelWidth : graphics.getTextRects(arr[lastDrawnIndex].value, w2.config.xaxis.labels.style.fontSize).width;\n            const prevPos = arr[lastDrawnIndex].position;\n            const pos = item.position;\n            if (pos > prevPos + prevLabelWidth + 10) {\n                lastDrawnIndex = index;\n                return item;\n            }\n            return null;\n        }).filter((f)=>f !== null);\n        return filtered;\n    }\n}\nfunction $e4b487e979d7c06d$var$pickInterval(span, targetCount) {\n    if (!Number.isFinite(targetCount) || targetCount <= 0) targetCount = $e4b487e979d7c06d$var$DEFAULT_TICK_COUNT;\n    if (span <= 0) return $e4b487e979d7c06d$var$TICK_LADDER[0];\n    const targetMs = span / targetCount;\n    let best = $e4b487e979d7c06d$var$TICK_LADDER[0];\n    let bestDist = Infinity;\n    for (const interval of $e4b487e979d7c06d$var$TICK_LADDER){\n        const dist = Math.abs(Math.log(interval.approxMs / targetMs));\n        if (dist < bestDist) {\n            bestDist = dist;\n            best = interval;\n        }\n    }\n    return best;\n}\nconst $e4b487e979d7c06d$var$REGISTRY_KEY$1 = \"__apexcharts_registry__\";\nconst $e4b487e979d7c06d$var$CUSTOM_KEY = \"__apexcharts_custom_types__\";\nif (!/** @type {any} */ globalThis[$e4b487e979d7c06d$var$REGISTRY_KEY$1]) globalThis[$e4b487e979d7c06d$var$REGISTRY_KEY$1] = {};\nif (!/** @type {any} */ globalThis[$e4b487e979d7c06d$var$CUSTOM_KEY]) globalThis[$e4b487e979d7c06d$var$CUSTOM_KEY] = /* @__PURE__ */ new Set();\nfunction $e4b487e979d7c06d$var$getRegistry$1() {\n    return /** @type {any} */ globalThis[$e4b487e979d7c06d$var$REGISTRY_KEY$1];\n}\nfunction $e4b487e979d7c06d$var$getCustomTypes() {\n    return /** @type {any} */ globalThis[$e4b487e979d7c06d$var$CUSTOM_KEY];\n}\nfunction $e4b487e979d7c06d$var$markCustom(name2) {\n    $e4b487e979d7c06d$var$getCustomTypes().add(name2);\n}\nfunction $e4b487e979d7c06d$var$isCustom(name2) {\n    return $e4b487e979d7c06d$var$getCustomTypes().has(name2);\n}\nfunction $e4b487e979d7c06d$var$hasChartClass(type) {\n    return !!$e4b487e979d7c06d$var$getRegistry$1()[type];\n}\nfunction $e4b487e979d7c06d$var$unregister(name2) {\n    delete $e4b487e979d7c06d$var$getRegistry$1()[name2];\n    $e4b487e979d7c06d$var$getCustomTypes().delete(name2);\n}\nfunction $e4b487e979d7c06d$var$register(typeMap) {\n    Object.assign($e4b487e979d7c06d$var$getRegistry$1(), typeMap);\n}\nfunction $e4b487e979d7c06d$var$getChartClass(type) {\n    const Cls = $e4b487e979d7c06d$var$getRegistry$1()[type];\n    if (!Cls) throw new Error(`ApexCharts: chart type \"${type}\" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);\n    return Cls;\n}\nclass $e4b487e979d7c06d$var$Core {\n    /**\n   * @param {Element} el\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(el, w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.el = el;\n    }\n    setupElements() {\n        const { globals: gl, config: cnf } = this.w;\n        const ct = cnf.chart.type;\n        const xyChartsArrTypes = [\n            \"line\",\n            \"area\",\n            \"bar\",\n            \"rangeBar\",\n            \"rangeArea\",\n            \"candlestick\",\n            \"boxPlot\",\n            \"violin\",\n            \"scatter\",\n            \"bubble\"\n        ];\n        const axisChartsArrTypes = [\n            ...xyChartsArrTypes,\n            \"radar\",\n            \"heatmap\",\n            \"treemap\"\n        ];\n        const isCustomType = !axisChartsArrTypes.includes(ct) && ![\n            \"pie\",\n            \"donut\",\n            \"polarArea\",\n            \"radialBar\"\n        ].includes(ct) && $e4b487e979d7c06d$var$isCustom(ct);\n        gl.axisCharts = axisChartsArrTypes.includes(ct) || isCustomType;\n        gl.xyCharts = xyChartsArrTypes.includes(ct) || isCustomType;\n        gl.isBarHorizontal = [\n            \"bar\",\n            \"rangeBar\",\n            \"boxPlot\",\n            \"violin\"\n        ].includes(ct) && cnf.plotOptions.bar.horizontal;\n        gl.chartClass = `.apexcharts${gl.chartID}`;\n        this.w.dom.baseEl = this.el;\n        this.w.dom.elWrap = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n        $e4b487e979d7c06d$var$Graphics.setAttrs(this.w.dom.elWrap, {\n            id: gl.chartClass.substring(1),\n            class: `apexcharts-canvas ${gl.chartClass.substring(1)}`\n        });\n        this.el.appendChild(this.w.dom.elWrap);\n        const SVG2 = /** @type {any} */ globalThis.SVG;\n        this.w.dom.Paper = SVG2().addTo(this.w.dom.elWrap);\n        this.w.dom.Paper.attr({\n            class: \"apexcharts-svg\",\n            \"xmlns:data\": \"ApexChartsNS\",\n            transform: `translate(${cnf.chart.offsetX}, ${cnf.chart.offsetY})`\n        });\n        this.w.dom.Paper.node.style.background = cnf.theme.mode === \"dark\" && !cnf.chart.background ? \"#343A3F\" : cnf.theme.mode === \"light\" && !cnf.chart.background ? \"#fff\" : cnf.chart.background;\n        this.setSVGDimensions();\n        this.w.dom.elLegendForeign = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"foreignObject\");\n        $e4b487e979d7c06d$var$Graphics.setAttrs(this.w.dom.elLegendForeign, {\n            x: 0,\n            y: 0,\n            width: gl.svgWidth,\n            height: gl.svgHeight\n        });\n        this.w.dom.elLegendWrap = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n        this.w.dom.elLegendWrap.classList.add(\"apexcharts-legend\");\n        this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap);\n        this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign);\n        if (cnf.chart.accessibility.enabled && cnf.chart.accessibility.announcements.enabled) {\n            const srStatus = $e4b487e979d7c06d$var$BrowserAPIs.createElement(\"div\");\n            srStatus.className = \"apexcharts-sr-status\";\n            srStatus.setAttribute(\"role\", \"status\");\n            srStatus.setAttribute(\"aria-live\", \"polite\");\n            srStatus.setAttribute(\"aria-atomic\", \"true\");\n            this.w.dom.elWrap.appendChild(srStatus);\n        }\n        if (cnf.chart.accessibility.enabled) {\n            const ariaLabel = this.getAccessibleChartLabel();\n            const svgRole = cnf.chart.accessibility.keyboard.enabled && cnf.chart.accessibility.keyboard.navigation.enabled ? \"application\" : \"img\";\n            this.w.dom.Paper.attr({\n                role: svgRole,\n                \"aria-label\": ariaLabel\n            });\n            if (cnf.chart.accessibility.description) {\n                const descEl = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"desc\");\n                descEl.textContent = cnf.chart.accessibility.description;\n                this.w.dom.Paper.node.insertBefore(descEl, this.w.dom.elLegendForeign.nextSibling);\n            }\n        }\n        this.w.dom.elGraphical = this.w.dom.Paper.group().attr({\n            class: \"apexcharts-inner apexcharts-graphical\"\n        });\n        this.w.dom.elDefs = this.w.dom.Paper.defs();\n        this.w.dom.Paper.add(this.w.dom.elGraphical);\n        this.w.dom.elGraphical.add(this.w.dom.elDefs);\n    }\n    /**\n   * Classify each series by its resolved chart type into per-type render\n   * buckets (`{ series, i }`, plus `seriesRangeEnd` for rangeArea). Side\n   * effects mirror the original inline code: sets `w.globals.columnSeries`,\n   * folds `w.globals.comboCharts`, and warns on unsupported combinations (a\n   * non-combo type mixed in, or horizontal bars in a combo). Extracted from\n   * plotChartType to shrink it (audit C2).\n   * @param {any[]} ser\n   * @returns {{ seriesTypes: Record<string, any>, customBuckets: Record<string, {series: any[], i: number[]}> }}\n   */ _classifySeriesByType(ser) {\n        const { w: w2 } = this;\n        const { config: cnf, globals: gl } = w2;\n        const seriesTypes = {\n            line: {\n                series: [],\n                i: []\n            },\n            area: {\n                series: [],\n                i: []\n            },\n            scatter: {\n                series: [],\n                i: []\n            },\n            bubble: {\n                series: [],\n                i: []\n            },\n            bar: {\n                series: [],\n                i: []\n            },\n            candlestick: {\n                series: [],\n                i: []\n            },\n            boxPlot: {\n                series: [],\n                i: []\n            },\n            violin: {\n                series: [],\n                i: []\n            },\n            rangeBar: {\n                series: [],\n                i: []\n            },\n            rangeArea: {\n                series: [],\n                seriesRangeEnd: [],\n                i: []\n            }\n        };\n        const customBuckets = {};\n        const chartType = cnf.chart.type || \"line\";\n        let nonComboType = null;\n        let comboCount = 0;\n        this.w.seriesData.series.forEach((serie, st)=>{\n            var _a, _b;\n            const seriesType = ((_a = ser[st]) == null ? void 0 : _a.type) === \"column\" ? \"bar\" : ((_b = ser[st]) == null ? void 0 : _b.type) || (chartType === \"column\" ? \"bar\" : chartType);\n            const st_ = /** @type {Record<string,any>} */ seriesTypes;\n            if (st_[seriesType]) {\n                if (seriesType === \"rangeArea\") {\n                    st_[seriesType].series.push(this.w.rangeData.seriesRangeStart[st]);\n                    st_[seriesType].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[st]);\n                } else st_[seriesType].series.push(serie);\n                st_[seriesType].i.push(st);\n                if (seriesType === \"bar\") w2.globals.columnSeries = seriesTypes.bar;\n            } else if ([\n                \"heatmap\",\n                \"treemap\",\n                \"pie\",\n                \"donut\",\n                \"polarArea\",\n                \"radialBar\",\n                \"radar\",\n                \"unit\",\n                \"sunburst\"\n            ].includes(seriesType)) nonComboType = seriesType;\n            else if ($e4b487e979d7c06d$var$isCustom(seriesType)) {\n                if (!customBuckets[seriesType]) customBuckets[seriesType] = {\n                    series: [],\n                    i: []\n                };\n                customBuckets[seriesType].series.push(serie);\n                customBuckets[seriesType].i.push(st);\n            } else console.warn(`You have specified an unrecognized series type (${seriesType}).`);\n            if (chartType !== seriesType && seriesType !== \"scatter\") comboCount++;\n        });\n        if (comboCount > 0) {\n            if (nonComboType) console.warn(`Chart or series type ${nonComboType} cannot appear with other chart or series types.`);\n            if (seriesTypes.bar.series.length > 0 && cnf.plotOptions.bar.horizontal) {\n                comboCount -= seriesTypes.bar.series.length;\n                seriesTypes.bar = {\n                    series: [],\n                    i: []\n                };\n                w2.globals.columnSeries = {\n                    series: [],\n                    i: []\n                };\n                console.warn(\"Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`\");\n            }\n        }\n        gl.comboCharts || (gl.comboCharts = comboCount > 0);\n        return {\n            seriesTypes: seriesTypes,\n            customBuckets: customBuckets\n        };\n    }\n    /**\n   * @param {any[]} ser\n   * @param {import('../types/internal').XYRatios} xyRatios\n   */ plotChartType(ser, xyRatios) {\n        const { w: w2, ctx: ctx } = this;\n        const canvasMode = ctx.renderer && ctx.renderer.kind === \"canvas\";\n        if (canvasMode) ctx.renderer.beginSeries();\n        const { seriesTypes: seriesTypes, customBuckets: customBuckets } = this._classifySeriesByType(ser);\n        const renderers = this._instantiateSeriesRenderers(seriesTypes, xyRatios);\n        const elGraph = this._assembleSeriesGraphics(seriesTypes, customBuckets, renderers, xyRatios);\n        if (canvasMode) {\n            const rr = /** @type {any} */ ctx.renderer;\n            if (rr && rr._repaintHostInPlace) {\n                rr._repaintHostInPlace = false;\n                const wrapNode = this.w.dom.elGraphical.node.querySelector(\".apexcharts-canvas-series-wrap\");\n                if (wrapNode && rr.canRepaintInPlace && rr.canRepaintInPlace()) {\n                    rr.repaintInPlace();\n                    const groups = Array.isArray(elGraph) ? elGraph : [\n                        elGraph\n                    ];\n                    groups.forEach((g2)=>{\n                        if (g2 && g2.node) wrapNode.appendChild(g2.node);\n                    });\n                    return [];\n                }\n            }\n            const host = ctx.renderer.present();\n            if (host) {\n                const wrap = new $e4b487e979d7c06d$var$Graphics(w2).group({\n                    class: \"apexcharts-canvas-series-wrap\"\n                });\n                wrap.add(host);\n                const groups = Array.isArray(elGraph) ? elGraph : [\n                    elGraph\n                ];\n                groups.forEach((g2)=>{\n                    if (g2) wrap.add(g2);\n                });\n                return wrap;\n            }\n        }\n        return elGraph;\n    }\n    /**\n   * Lazily instantiate the shared series renderers the orchestration below\n   * needs. getChartClass() is only called for types actually present, so a page\n   * that registers just 'line' never triggers a lookup for 'candlestick' etc.\n   * (tree-shaking). Returns the line/candlestick/violin renderers and sets\n   * ctx.pie / ctx.rangeBar as a side effect (both may be null). Extracted from\n   * plotChartType (audit C2).\n   * @param {Record<string, any>} seriesTypes\n   * @param {import('../types/internal').XYRatios} xyRatios\n   * @returns {{ line: any, boxCandlestick: any, violin: any }}\n   */ _instantiateSeriesRenderers(seriesTypes, xyRatios) {\n        const { w: w2, ctx: ctx } = this;\n        const { config: cnf, globals: gl } = w2;\n        const needsLine = seriesTypes.line.series.length > 0 || seriesTypes.area.series.length > 0 || seriesTypes.scatter.series.length > 0 || seriesTypes.bubble.series.length > 0 || seriesTypes.rangeArea.series.length > 0 || !gl.comboCharts && [\n            \"line\",\n            \"area\",\n            \"scatter\",\n            \"bubble\",\n            \"rangeArea\"\n        ].includes(cnf.chart.type);\n        const line = needsLine ? new ($e4b487e979d7c06d$var$getChartClass(\"line\"))(ctx.w, ctx, xyRatios) : null;\n        const needsCandlestick = seriesTypes.candlestick.series.length > 0 || seriesTypes.boxPlot.series.length > 0 || !gl.comboCharts && [\n            \"candlestick\",\n            \"boxPlot\"\n        ].includes(cnf.chart.type);\n        const boxCandlestick = needsCandlestick ? new ($e4b487e979d7c06d$var$getChartClass(\"candlestick\"))(ctx.w, ctx, xyRatios) : null;\n        const needsViolin = seriesTypes.violin.series.length > 0 || !gl.comboCharts && cnf.chart.type === \"violin\";\n        const violin = needsViolin ? new ($e4b487e979d7c06d$var$getChartClass(\"violin\"))(ctx.w, ctx, xyRatios) : null;\n        const needsPie = !gl.comboCharts && [\n            \"pie\",\n            \"donut\",\n            \"polarArea\"\n        ].includes(cnf.chart.type);\n        ctx.pie = needsPie ? new ($e4b487e979d7c06d$var$getChartClass(\"pie\"))(ctx.w, ctx) : null;\n        const needsRangeBar = seriesTypes.rangeBar.series.length > 0 || !gl.comboCharts && cnf.chart.type === \"rangeBar\";\n        ctx.rangeBar = needsRangeBar ? new ($e4b487e979d7c06d$var$getChartClass(\"rangeBar\"))(ctx.w, ctx, xyRatios) : null;\n        return {\n            line: line,\n            boxCandlestick: boxCandlestick,\n            violin: violin\n        };\n    }\n    /**\n   * Build the ordered list of series graphic groups (elGraph) from the\n   * classified buckets. Combo charts layer per-type draws in z-order; a\n   * single-type chart dispatches on cnf.chart.type. Sets ctx.bar for the\n   * non-stacked bar paths (side effect, preserved). Extracted from\n   * plotChartType (audit C2).\n   * @param {Record<string, any>} seriesTypes\n   * @param {Record<string, {series: any[], i: number[]}>} customBuckets\n   * @param {{ line: any, boxCandlestick: any, violin: any }} renderers\n   * @param {import('../types/internal').XYRatios} xyRatios\n   * @returns {any}\n   */ _assembleSeriesGraphics(seriesTypes, customBuckets, renderers, xyRatios) {\n        const { w: w2, ctx: ctx } = this;\n        const { config: cnf, globals: gl } = w2;\n        const { line: line, boxCandlestick: boxCandlestick, violin: violin } = renderers;\n        let elGraph = [];\n        if (gl.comboCharts) {\n            const coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n            if (seriesTypes.area.series.length > 0) elGraph.push(...coreUtils.drawSeriesByGroup(seriesTypes.area, gl.areaGroups, \"area\", line));\n            if (seriesTypes.bar.series.length > 0) {\n                if (cnf.chart.stacked) {\n                    const barStacked = new ($e4b487e979d7c06d$var$getChartClass(\"barStacked\"))(ctx.w, ctx, xyRatios);\n                    elGraph.push(barStacked.draw(seriesTypes.bar.series, seriesTypes.bar.i));\n                } else {\n                    ctx.bar = new ($e4b487e979d7c06d$var$getChartClass(\"bar\"))(ctx.w, ctx, xyRatios);\n                    elGraph.push(ctx.bar.draw(seriesTypes.bar.series, seriesTypes.bar.i));\n                }\n            }\n            if (seriesTypes.rangeArea.series.length > 0) elGraph.push(line.draw(seriesTypes.rangeArea.series, \"rangeArea\", seriesTypes.rangeArea.i, seriesTypes.rangeArea.seriesRangeEnd));\n            if (seriesTypes.line.series.length > 0) elGraph.push(...coreUtils.drawSeriesByGroup(seriesTypes.line, gl.lineGroups, \"line\", line));\n            if (seriesTypes.candlestick.series.length > 0) elGraph.push(boxCandlestick.draw(seriesTypes.candlestick.series, \"candlestick\", seriesTypes.candlestick.i));\n            if (seriesTypes.boxPlot.series.length > 0) elGraph.push(boxCandlestick.draw(seriesTypes.boxPlot.series, \"boxPlot\", seriesTypes.boxPlot.i));\n            if (seriesTypes.violin.series.length > 0) elGraph.push(violin.draw(seriesTypes.violin.series, \"violin\", seriesTypes.violin.i));\n            if (seriesTypes.rangeBar.series.length > 0) elGraph.push(ctx.rangeBar.draw(seriesTypes.rangeBar.series, seriesTypes.rangeBar.i));\n            if (seriesTypes.scatter.series.length > 0) {\n                const scatterLine = new ($e4b487e979d7c06d$var$getChartClass(\"line\"))(ctx.w, ctx, xyRatios, true);\n                elGraph.push(scatterLine.draw(seriesTypes.scatter.series, \"scatter\", seriesTypes.scatter.i));\n            }\n            if (seriesTypes.bubble.series.length > 0) {\n                const bubbleLine = new ($e4b487e979d7c06d$var$getChartClass(\"line\"))(ctx.w, ctx, xyRatios, true);\n                elGraph.push(bubbleLine.draw(seriesTypes.bubble.series, \"bubble\", seriesTypes.bubble.i));\n            }\n            Object.keys(customBuckets).forEach((cname)=>{\n                const bucket = customBuckets[cname];\n                if (bucket.series.length > 0) {\n                    const cs = new ($e4b487e979d7c06d$var$getChartClass(cname))(ctx.w, ctx, xyRatios);\n                    elGraph.push(cs.draw(bucket.series, cname, bucket.i));\n                }\n            });\n        } else {\n            const type = cnf.chart.type;\n            switch(type){\n                case \"line\":\n                    elGraph = line.draw(this.w.seriesData.series, \"line\");\n                    break;\n                case \"area\":\n                    elGraph = line.draw(this.w.seriesData.series, \"area\");\n                    break;\n                case \"bar\":\n                    if (cnf.chart.stacked) {\n                        const barStacked = new ($e4b487e979d7c06d$var$getChartClass(\"barStacked\"))(ctx.w, ctx, xyRatios);\n                        elGraph = barStacked.draw(this.w.seriesData.series);\n                    } else {\n                        ctx.bar = new ($e4b487e979d7c06d$var$getChartClass(\"bar\"))(ctx.w, ctx, xyRatios);\n                        elGraph = ctx.bar.draw(this.w.seriesData.series);\n                    }\n                    break;\n                case \"candlestick\":\n                    elGraph = boxCandlestick.draw(this.w.seriesData.series, \"candlestick\");\n                    break;\n                case \"boxPlot\":\n                    elGraph = boxCandlestick.draw(this.w.seriesData.series, type);\n                    break;\n                case \"violin\":\n                    elGraph = violin.draw(this.w.seriesData.series, \"violin\");\n                    break;\n                case \"rangeBar\":\n                    elGraph = ctx.rangeBar.draw(this.w.seriesData.series);\n                    break;\n                case \"rangeArea\":\n                    elGraph = line.draw(this.w.rangeData.seriesRangeStart, \"rangeArea\", void 0, this.w.rangeData.seriesRangeEnd);\n                    break;\n                case \"heatmap\":\n                    {\n                        const heatmap = new ($e4b487e979d7c06d$var$getChartClass(\"heatmap\"))(ctx.w, ctx, xyRatios);\n                        elGraph = heatmap.draw(this.w.seriesData.series);\n                        break;\n                    }\n                case \"treemap\":\n                    {\n                        const treemap = new ($e4b487e979d7c06d$var$getChartClass(\"treemap\"))(ctx.w, ctx);\n                        elGraph = treemap.draw(this.w.seriesData.series);\n                        break;\n                    }\n                case \"unit\":\n                    {\n                        const unit = new ($e4b487e979d7c06d$var$getChartClass(\"unit\"))(ctx.w, ctx);\n                        elGraph = unit.draw(this.w.seriesData.series);\n                        break;\n                    }\n                case \"sunburst\":\n                    {\n                        const sunburst = new ($e4b487e979d7c06d$var$getChartClass(\"sunburst\"))(ctx.w, ctx);\n                        elGraph = sunburst.draw(this.w.seriesData.series);\n                        break;\n                    }\n                case \"pie\":\n                case \"donut\":\n                case \"polarArea\":\n                    elGraph = ctx.pie.draw(this.w.seriesData.series);\n                    break;\n                case \"radialBar\":\n                    {\n                        const radialBar = new ($e4b487e979d7c06d$var$getChartClass(\"radialBar\"))(ctx.w, ctx);\n                        elGraph = radialBar.draw(this.w.seriesData.series);\n                        break;\n                    }\n                case \"radar\":\n                    {\n                        const radar = new ($e4b487e979d7c06d$var$getChartClass(\"radar\"))(ctx.w, ctx);\n                        elGraph = radar.draw(this.w.seriesData.series);\n                        break;\n                    }\n                default:\n                    if ($e4b487e979d7c06d$var$isCustom(type)) {\n                        const cs = new ($e4b487e979d7c06d$var$getChartClass(type))(ctx.w, ctx, xyRatios);\n                        elGraph = cs.draw(this.w.seriesData.series, type);\n                    } else elGraph = line.draw(this.w.seriesData.series);\n            }\n        }\n        return elGraph;\n    }\n    /**\n   * Extract the CSS unit suffix from a chart width/height config value\n   * (`'100%'` -> `'%'`, `'300px'` -> `'px'`, `300`/`'300'` -> `''`). Kept as the\n   * original digit-split idiom so results are identical for every input the\n   * call sites already handle ('%', 'px', '', 'auto').\n   * @param {string|number} value\n   * @returns {string|undefined}\n   */ _extractDimensionUnit(value) {\n        return String(value).split(/[0-9]+/g).pop();\n    }\n    setSVGDimensions() {\n        var _a;\n        const { globals: gl, config: cnf } = this.w;\n        cnf.chart.width = cnf.chart.width || \"100%\";\n        cnf.chart.height = cnf.chart.height || \"auto\";\n        const rawWidth = cnf.chart.width;\n        const rawHeight = cnf.chart.height;\n        gl.svgWidth = NaN;\n        gl.svgHeight = NaN;\n        let elDim = $e4b487e979d7c06d$var$Utils$1.getDimensions(this.el);\n        const widthUnit = this._extractDimensionUnit(rawWidth);\n        if (widthUnit === \"%\") {\n            if ($e4b487e979d7c06d$var$Utils$1.isNumber(elDim[0])) {\n                if (elDim[0].width === 0) elDim = $e4b487e979d7c06d$var$Utils$1.getDimensions(this.el.parentNode);\n                gl.svgWidth = elDim[0] * parseInt(rawWidth, 10) / 100;\n            }\n        } else if (widthUnit === \"px\" || widthUnit === \"\") gl.svgWidth = parseInt(rawWidth, 10);\n        const heightUnit = this._extractDimensionUnit(rawHeight);\n        if (rawHeight !== \"auto\" && rawHeight !== \"\") {\n            if (heightUnit === \"%\") {\n                const elParentDim = $e4b487e979d7c06d$var$Utils$1.getDimensions(this.el.parentNode);\n                gl.svgHeight = elParentDim[1] * parseInt(rawHeight, 10) / 100;\n            } else gl.svgHeight = parseInt(rawHeight, 10);\n        } else gl.svgHeight = gl.axisCharts ? gl.svgWidth / 1.61 : gl.svgWidth / 1.2;\n        gl.svgWidth = Math.max(gl.svgWidth, 0);\n        gl.svgHeight = Math.max(gl.svgHeight, 0);\n        $e4b487e979d7c06d$var$Graphics.setAttrs(this.w.dom.Paper.node, {\n            width: gl.svgWidth,\n            height: gl.svgHeight\n        });\n        if (heightUnit !== \"%\" && $e4b487e979d7c06d$var$Environment.isBrowser()) {\n            const needsAxisPadding = gl.axisCharts && (cnf.grid.show || cnf.dataLabels.enabled || cnf.xaxis.labels.show || cnf.xaxis.axisBorder.show || cnf.xaxis.axisTicks.show || cnf.yaxis.some((y)=>y.show && (y.labels.show || y.axisBorder.show || y.axisTicks.show)));\n            const offsetY = cnf.chart.sparkline.enabled || !needsAxisPadding ? 0 : cnf.chart.parentHeightOffset;\n            const paperNode = this.w.dom.Paper.node;\n            if ((_a = paperNode.parentNode) == null ? void 0 : _a.parentNode) paperNode.parentNode.parentNode.style.minHeight = `${gl.svgHeight + offsetY}px`;\n        }\n        this.w.dom.elWrap.style.width = `${gl.svgWidth}px`;\n        this.w.dom.elWrap.style.height = `${gl.svgHeight}px`;\n        gl.lastResizeSignature = this.getResizeSignature();\n    }\n    /**\n   * A stable fingerprint of the container measurements that actually feed the\n   * chart's rendered dimensions, given the width/height config. Only inputs that\n   * a resize can change are included: the element width when the width is a\n   * percentage, and the parent height when the height is a percentage. A fully\n   * pixel-sized chart therefore has a constant signature, so a resize never\n   * forces a redraw; a percentage-sized chart's signature tracks the container.\n   * The window-resize handler compares this against the last render to skip\n   * redraws (and the entrance-animation teardown they cause) that aren't needed.\n   * @returns {{ w: number, h: number }}\n   */ getResizeSignature() {\n        const { config: cnf } = this.w;\n        const rawWidth = (cnf.chart.width || \"100%\").toString().trim();\n        const rawHeight = (cnf.chart.height || \"auto\").toString().trim();\n        let w2 = 0;\n        let h2 = 0;\n        if (rawWidth.endsWith(\"%\")) {\n            let elDim = $e4b487e979d7c06d$var$Utils$1.getDimensions(this.el);\n            if (!elDim[0]) elDim = $e4b487e979d7c06d$var$Utils$1.getDimensions(this.el.parentNode);\n            w2 = elDim[0] || 0;\n        }\n        if (rawHeight.endsWith(\"%\")) h2 = $e4b487e979d7c06d$var$Utils$1.getDimensions(this.el.parentNode)[1] || 0;\n        const sig = {\n            w: Math.round(w2),\n            h: Math.round(h2)\n        };\n        if (cnf.responsive && cnf.responsive.length && $e4b487e979d7c06d$var$Environment.isBrowser()) sig.iw = window.innerWidth;\n        return sig;\n    }\n    shiftGraphPosition() {\n        const { globals: gl } = this.w;\n        const { translateY: tY, translateX: tX } = gl;\n        $e4b487e979d7c06d$var$Graphics.setAttrs(this.w.dom.elGraphical.node, {\n            transform: `translate(${tX}, ${tY})`\n        });\n    }\n    resizeNonAxisCharts() {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n        const { w: w2 } = this;\n        const heightStr = w2.config.chart.height ? String(w2.config.chart.height) : \"\";\n        const userSetFixedHeight = heightStr !== \"\" && heightStr !== \"auto\";\n        const isPercentHeight = heightStr.includes(\"%\");\n        let legendHeight = 0;\n        let offY = w2.config.chart.sparkline.enabled ? 1 : 15;\n        offY += w2.layout.gridPad.bottom;\n        if ([\n            \"top\",\n            \"bottom\"\n        ].includes(w2.config.legend.position) && w2.config.legend.show && !w2.config.legend.floating) legendHeight = ((_b = (_a = this.ctx.legend) == null ? void 0 : _a.legendHelpers.getLegendDimensions().clwh) != null ? _b : 0) + 7;\n        const el = w2.dom.baseEl.querySelector(\".apexcharts-radialbar, .apexcharts-pie, .apexcharts-sunburst\");\n        const externalLabelMarginY = w2.globals.pieExternalLabelMarginY || 0;\n        let chartInnerDimensions = externalLabelMarginY > 0 ? w2.globals.radialSize * 2 + externalLabelMarginY * 2 : w2.globals.radialSize * 2.05;\n        const angleType = w2.config.chart.type === \"sunburst\" ? \"sunburst\" : w2.config.chart.type === \"pie\" || w2.config.chart.type === \"donut\" || w2.config.chart.type === \"polarArea\" ? \"pie\" : \"radialBar\";\n        const radialAngleSpan = Math.abs(w2.config.plotOptions[angleType].endAngle - w2.config.plotOptions[angleType].startAngle);\n        if (el && !w2.config.chart.sparkline.enabled && radialAngleSpan < 360) {\n            const svgRect = $e4b487e979d7c06d$var$Utils$1.getBoundingClientRect(this.w.dom.Paper.node);\n            let arcTopFromSVGTop = Infinity;\n            let arcBottomFromSVGTop = -Infinity;\n            const accumulate = (node)=>{\n                var _a2, _b2, _c2, _d2;\n                if ((_a2 = node.classList) == null ? void 0 : _a2.contains(\"apexcharts-radialbar-hollow\")) return;\n                const tag = (_c2 = (_b2 = node.tagName) == null ? void 0 : _b2.toLowerCase) == null ? void 0 : _c2.call(_b2);\n                if (tag === \"text\" || tag === \"tspan\") return;\n                const children = Array.from((_d2 = node.children) != null ? _d2 : []);\n                if (children.length > 0) {\n                    children.forEach((c2)=>accumulate(/** @type {Element} */ c2));\n                    return;\n                }\n                const r2 = $e4b487e979d7c06d$var$Utils$1.getBoundingClientRect(node);\n                const height = r2.bottom - r2.top;\n                if (height > 0) {\n                    const top = r2.top - svgRect.top;\n                    const bottom = r2.bottom - svgRect.top;\n                    if (top < arcTopFromSVGTop) arcTopFromSVGTop = top;\n                    if (bottom > arcBottomFromSVGTop) arcBottomFromSVGTop = bottom;\n                }\n            };\n            Array.from((_c = el.children) != null ? _c : []).forEach((c2)=>accumulate(/** @type {Element} */ c2));\n            if (!Number.isFinite(arcTopFromSVGTop)) arcTopFromSVGTop = 0;\n            if (!Number.isFinite(arcBottomFromSVGTop)) {\n                const elRect = $e4b487e979d7c06d$var$Utils$1.getBoundingClientRect(el);\n                arcBottomFromSVGTop = elRect.bottom - svgRect.top;\n            }\n            const padding = Math.max(offY, w2.globals.radialSize * 0.2);\n            const verticalShift = Math.max(padding - arcTopFromSVGTop, 0);\n            if (verticalShift !== 0) {\n                w2.layout.translateY = ((_d = w2.layout.translateY) != null ? _d : 0) + verticalShift;\n                $e4b487e979d7c06d$var$Graphics.setAttrs(this.w.dom.elGraphical.node, {\n                    transform: `translate(${(_e = w2.layout.translateX) != null ? _e : 0}, ${w2.layout.translateY})`\n                });\n                arcBottomFromSVGTop += verticalShift;\n            }\n            chartInnerDimensions = arcBottomFromSVGTop > 0 ? arcBottomFromSVGTop : w2.globals.radialSize * 2.05;\n            const bottomPadding = Math.max(padding, arcTopFromSVGTop);\n            const svgHeight = Math.ceil(chartInnerDimensions + legendHeight + bottomPadding);\n            const chartOffsetY = (_f = w2.config.chart.offsetY) != null ? _f : 0;\n            const elWrapHeight = svgHeight + Math.max(chartOffsetY, 0);\n            if (!isPercentHeight) {\n                if (this.w.dom.elLegendForeign) this.w.dom.elLegendForeign.setAttribute(\"height\", String(elWrapHeight));\n                this.w.dom.elWrap.style.height = `${elWrapHeight}px`;\n                $e4b487e979d7c06d$var$Graphics.setAttrs(this.w.dom.Paper.node, {\n                    height: svgHeight\n                });\n                if ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n                    const grandparent = (_g = this.w.dom.Paper.node.parentNode) == null ? void 0 : _g.parentNode;\n                    if (grandparent) grandparent.style.minHeight = `${elWrapHeight}px`;\n                }\n                w2.globals.svgHeight = svgHeight;\n                if (w2.config.legend.position === \"bottom\" && w2.config.legend.show && !w2.config.legend.floating) (_h = this.ctx.legend) == null || _h.setLegendWrapXY(20, 0);\n            }\n            return;\n        }\n        const newHeight = Math.ceil(chartInnerDimensions + this.w.layout.translateY + legendHeight + offY);\n        if (userSetFixedHeight) return;\n        if (this.w.dom.elLegendForeign) this.w.dom.elLegendForeign.setAttribute(\"height\", String(newHeight));\n        this.w.dom.elWrap.style.height = `${newHeight}px`;\n        $e4b487e979d7c06d$var$Graphics.setAttrs(this.w.dom.Paper.node, {\n            height: newHeight\n        });\n        if ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n            const grandparent = (_i = this.w.dom.Paper.node.parentNode) == null ? void 0 : _i.parentNode;\n            if (grandparent) grandparent.style.minHeight = `${newHeight}px`;\n        }\n    }\n    coreCalculations() {\n        new $e4b487e979d7c06d$var$Range(this.w).init();\n    }\n    resetGlobals() {\n        const resetxyValues = ()=>this.w.config.series.map(()=>[]);\n        const globalObj = new $e4b487e979d7c06d$var$Globals();\n        const { globals: gl } = this.w;\n        const parsingFlags = {\n            dataWasParsed: this.w.axisFlags.dataWasParsed,\n            originalSeries: gl.originalSeries\n        };\n        globalObj.initGlobalVars(gl);\n        gl.seriesXvalues = resetxyValues();\n        gl.seriesYvalues = resetxyValues();\n        if (parsingFlags.dataWasParsed) {\n            this.w.axisFlags.dataWasParsed = parsingFlags.dataWasParsed;\n            gl.originalSeries = parsingFlags.originalSeries;\n        }\n    }\n    isMultipleY() {\n        if (Array.isArray(this.w.config.yaxis) && this.w.config.yaxis.length > 1) {\n            this.w.globals.isMultipleYAxis = true;\n            return true;\n        }\n        return false;\n    }\n    xySettings() {\n        const { w: w2 } = this;\n        let xyRatios = null;\n        if (w2.globals.axisCharts) {\n            if (w2.config.xaxis.crosshairs.position === \"back\") new $e4b487e979d7c06d$var$Crosshairs(this.w).drawXCrosshairs();\n            if (w2.config.yaxis[0].crosshairs.position === \"back\") new $e4b487e979d7c06d$var$Crosshairs(this.w).drawYCrosshairs();\n            if (w2.config.xaxis.type === \"datetime\" && w2.config.xaxis.labels.formatter === void 0) {\n                this.ctx.timeScale = new $e4b487e979d7c06d$var$TimeScale(this.w, this.ctx);\n                let formattedTimeScale = [];\n                if (isFinite(w2.globals.minX) && isFinite(w2.globals.maxX) && !w2.globals.isBarHorizontal) formattedTimeScale = this.ctx.timeScale.calculateTimeScaleTicks(w2.globals.minX, w2.globals.maxX);\n                else if (w2.globals.isBarHorizontal) formattedTimeScale = this.ctx.timeScale.calculateTimeScaleTicks(w2.globals.minY, w2.globals.maxY);\n                this.ctx.timeScale.recalcDimensionsBasedOnFormat(formattedTimeScale);\n            }\n            const coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n            xyRatios = coreUtils.getCalculatedRatios();\n        }\n        return xyRatios;\n    }\n    /**\n   * @param {any} targetChart\n   */ updateSourceChart(targetChart) {\n        this.ctx.w.interact.selection = void 0;\n        this.ctx.updateHelpers._updateOptions({\n            chart: {\n                selection: {\n                    xaxis: {\n                        min: targetChart.w.globals.minX,\n                        max: targetChart.w.globals.maxX\n                    }\n                }\n            }\n        }, false, false);\n    }\n    setupBrushHandler() {\n        const { ctx: ctx, w: w2 } = this;\n        if (!w2.config.chart.brush.enabled) return;\n        if (typeof w2.config.chart.events.selection !== \"function\") {\n            const targets = Array.isArray(w2.config.chart.brush.targets) ? w2.config.chart.brush.targets : [\n                w2.config.chart.brush.target\n            ];\n            targets.forEach((target)=>{\n                const targetChart = /** @type {any} */ ctx.constructor.getChartByID(target);\n                if (!targetChart) {\n                    console.warn(`ApexCharts: brush target \"${target}\" was not found. Ensure the target chart is rendered (and its chart.id matches) before the brush chart.`);\n                    return;\n                }\n                targetChart.w.globals.brushSource = this.ctx;\n                if (typeof targetChart.w.config.chart.events.zoomed !== \"function\") targetChart.w.config.chart.events.zoomed = ()=>this.updateSourceChart(targetChart);\n                if (typeof targetChart.w.config.chart.events.scrolled !== \"function\") targetChart.w.config.chart.events.scrolled = ()=>/**\n             * @param {any} chart\n             * @param {Event} e\n             */ this.updateSourceChart(targetChart);\n            });\n            w2.config.chart.events.selection = (chart, e2)=>{\n                targets.forEach((target)=>{\n                    const targetChart = /** @type {any} */ ctx.constructor.getChartByID(target);\n                    if (!targetChart) return;\n                    targetChart.ctx.updateHelpers._updateOptions({\n                        xaxis: {\n                            min: e2.xaxis.min,\n                            max: e2.xaxis.max\n                        }\n                    }, false, false, false, false);\n                });\n            };\n        }\n    }\n    getAccessibleChartLabel() {\n        const w2 = this.w;\n        const cnf = w2.config;\n        if (cnf.chart.accessibility && cnf.chart.accessibility.description) return cnf.chart.accessibility.description;\n        const chartType = cnf.chart.type;\n        const parts = [];\n        if (cnf.title.text) {\n            parts.push(`${cnf.title.text}. ${chartType} chart`);\n            if (cnf.subtitle.text) parts.push(cnf.subtitle.text);\n        } else {\n            const namedSeries = (()=>{\n                if (Array.isArray(w2.seriesData.seriesNames) && w2.seriesData.seriesNames.length) return w2.seriesData.seriesNames.filter(Boolean);\n                if (Array.isArray(cnf.series)) return cnf.series.map((s2)=>typeof s2 === \"object\" && s2 !== null ? s2.name : null).filter(Boolean);\n                return [];\n            })();\n            const seriesCount = w2.seriesData.series.length || (cnf.series ? cnf.series.length : 0);\n            if (namedSeries.length) parts.push(`${chartType} chart with ${seriesCount} data series: ${namedSeries.join(\", \")}`);\n            else parts.push(`${chartType} chart with ${seriesCount} data series`);\n        }\n        return parts.join(\". \");\n    }\n}\nconst $e4b487e979d7c06d$var$TRANSFORM_KEY = \"__apexcharts_series_transforms__\";\nif (!/** @type {any} */ globalThis[$e4b487e979d7c06d$var$TRANSFORM_KEY]) globalThis[$e4b487e979d7c06d$var$TRANSFORM_KEY] = {};\nfunction $e4b487e979d7c06d$var$getTransforms() {\n    return /** @type {any} */ globalThis[$e4b487e979d7c06d$var$TRANSFORM_KEY];\n}\nfunction $e4b487e979d7c06d$var$registerSeriesTransform(name2, fn) {\n    if (!name2 || typeof name2 !== \"string\") {\n        console.warn(\"ApexCharts: registerSeriesTransform requires a non-empty name.\");\n        return;\n    }\n    if (typeof fn !== \"function\") {\n        console.warn(`ApexCharts: registerSeriesTransform(\"${name2}\") expects a function (series, w) => series.`);\n        return;\n    }\n    $e4b487e979d7c06d$var$getTransforms()[name2] = fn;\n}\nfunction $e4b487e979d7c06d$var$getSeriesTransform(name2) {\n    if (!name2) return null;\n    return $e4b487e979d7c06d$var$getTransforms()[name2] || null;\n}\nfunction $e4b487e979d7c06d$var$drilldownById(w2, id) {\n    const dd = w2.config.drilldown;\n    const list = dd && Array.isArray(dd.series) ? dd.series : [];\n    return list.find((s2)=>s2 && s2.id === id);\n}\nfunction $e4b487e979d7c06d$var$toNode(w2, d, i2, paletteFromParent, parentKey, seenIds = null, opts = {}) {\n    var _a, _b, _c;\n    const isObj = d && typeof d === \"object\";\n    const name2 = isObj ? (_b = (_a = d.x) != null ? _a : d.name) != null ? _b : \"\" : \"\";\n    const value = isObj ? Number((_c = d.y) != null ? _c : d.value) : Number(d);\n    const node = {\n        name: String(name2),\n        value: isNaN(value) ? null : value,\n        color: isObj && d.color ? d.color : void 0,\n        // Identity across data updates: the path of names (indexed so same-named\n        // siblings stay distinct). Update animations morph matched keys in place.\n        _key: `${parentKey}/${i2}:${name2}`\n    };\n    if (paletteFromParent && !node.color) node.color = paletteFromParent[i2 % paletteFromParent.length];\n    if (opts.keepDatum) node._datum = d;\n    if (isObj && Array.isArray(d.children) && d.children.length) node.children = d.children.map((c2, j)=>$e4b487e979d7c06d$var$toNode(w2, c2, j, null, node._key, seenIds, opts));\n    else if (isObj && d.drilldown != null && opts.expandDrilldown !== false) {\n        const visited = seenIds || /* @__PURE__ */ new Set();\n        if (!visited.has(d.drilldown)) {\n            const dd = $e4b487e979d7c06d$var$drilldownById(w2, d.drilldown);\n            if (dd && Array.isArray(dd.data) && dd.data.length) {\n                const nextSeen = new Set(visited);\n                nextSeen.add(d.drilldown);\n                const palette = Array.isArray(dd.colors) ? dd.colors : null;\n                node.children = dd.data.map((c2, j)=>$e4b487e979d7c06d$var$toNode(w2, c2, j, palette, node._key, nextSeen, opts));\n            }\n        }\n    }\n    return node;\n}\nfunction $e4b487e979d7c06d$var$buildHierarchy(w2, opts = {}) {\n    const cfgSeries = /** @type {any} */ w2.config.series;\n    const first = cfgSeries && cfgSeries[0];\n    const data = first && Array.isArray(first.data) ? first.data : cfgSeries;\n    if (!Array.isArray(data)) return [];\n    return data.map((d, i2)=>$e4b487e979d7c06d$var$toNode(w2, d, i2, null, \"\", null, opts));\n}\nfunction $e4b487e979d7c06d$var$buildSeriesRoots(w2, series, opts = {}) {\n    const cfgSeries = /** @type {any} */ series || w2.config.series;\n    if (!Array.isArray(cfgSeries)) return [];\n    return cfgSeries.map((s2, i2)=>{\n        var _a, _b;\n        const data = s2 && Array.isArray(s2.data) ? s2.data : [];\n        const key = `${i2}:${(_a = s2 == null ? void 0 : s2.name) != null ? _a : \"\"}`;\n        const root = {\n            name: String((_b = s2 == null ? void 0 : s2.name) != null ? _b : \"\"),\n            value: null,\n            color: (s2 == null ? void 0 : s2.color) || void 0,\n            _key: key,\n            _seriesIndex: i2,\n            children: data.map((d, j)=>$e4b487e979d7c06d$var$toNode(w2, d, j, null, key, null, opts))\n        };\n        return root;\n    });\n}\nfunction $e4b487e979d7c06d$var$fillValues(node) {\n    if (node.children && node.children.length) {\n        node.children.forEach((c2)=>$e4b487e979d7c06d$var$fillValues(c2));\n        if (node.value == null || isNaN(node.value)) node.value = node.children.reduce((s2, c2)=>s2 + Math.max(0, c2.value || 0), 0);\n    }\n    if (node.value == null || isNaN(node.value)) node.value = 0;\n}\nfunction $e4b487e979d7c06d$var$hasNesting(series, opts = {}) {\n    if (!Array.isArray(series)) return false;\n    const countDrilldown = opts.drilldown !== false;\n    for(let i2 = 0; i2 < series.length; i2++){\n        const data = series[i2] && series[i2].data;\n        if (!Array.isArray(data)) continue;\n        for(let j = 0; j < data.length; j++){\n            const d = data[j];\n            if (!d || typeof d !== \"object\") continue;\n            if (Array.isArray(d.children) && d.children.length) return true;\n            if (countDrilldown && d.drilldown != null) return true;\n        }\n    }\n    return false;\n}\nfunction $e4b487e979d7c06d$var$morphKey(key) {\n    if (typeof key !== \"string\") return \"\";\n    const i2 = key.indexOf(\"/\");\n    return i2 === -1 ? \"\" : key.slice(i2);\n}\nfunction $e4b487e979d7c06d$var$drilldownAsLevels(w2) {\n    var _a, _b, _c, _d;\n    return !!((_d = (_c = (_b = (_a = w2 == null ? void 0 : w2.config) == null ? void 0 : _a.plotOptions) == null ? void 0 : _b.treemap) == null ? void 0 : _c.nested) == null ? void 0 : _d.drilldownAsLevels);\n}\nfunction $e4b487e979d7c06d$var$isNestedTreemap(w2, series) {\n    var _a, _b, _c;\n    const nestedCfg = (_c = (_b = (_a = w2 == null ? void 0 : w2.config) == null ? void 0 : _a.plotOptions) == null ? void 0 : _b.treemap) == null ? void 0 : _c.nested;\n    if (nestedCfg && nestedCfg.enabled === false) return false;\n    return $e4b487e979d7c06d$var$hasNesting(series, {\n        drilldown: $e4b487e979d7c06d$var$drilldownAsLevels(w2)\n    });\n}\nfunction $e4b487e979d7c06d$var$annotate(roots) {\n    const leaves = [];\n    let maxDepth = 0;\n    roots.forEach((root, si)=>{\n        const seriesLeaves = [];\n        const walk = (node, depth, parent)=>{\n            node._parent = parent;\n            node._depth = depth;\n            node._si = si;\n            node._leaf = !(node.children && node.children.length);\n            if (depth > maxDepth) maxDepth = depth;\n            if (node._leaf) {\n                node._di = seriesLeaves.length;\n                seriesLeaves.push(node);\n            } else {\n                node._di = -1;\n                node.children.forEach((c2)=>walk(c2, depth + 1, node));\n            }\n        };\n        walk(root, 0, null);\n        leaves.push(seriesLeaves);\n    });\n    return {\n        leaves: leaves,\n        maxDepth: maxDepth\n    };\n}\nfunction $e4b487e979d7c06d$var$leafRow(node) {\n    const d = node._datum;\n    if (d && typeof d === \"object\") {\n        const row = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, d), {\n            x: node.name,\n            y: node.value\n        });\n        delete row.children;\n        return row;\n    }\n    return {\n        x: node.name,\n        y: node.value\n    };\n}\nfunction $e4b487e979d7c06d$var$resolveTreemapTree(w2, series) {\n    const roots = $e4b487e979d7c06d$var$buildSeriesRoots(w2, series, {\n        keepDatum: true,\n        expandDrilldown: $e4b487e979d7c06d$var$drilldownAsLevels(w2)\n    });\n    roots.forEach($e4b487e979d7c06d$var$fillValues);\n    const { leaves: leaves, maxDepth: maxDepth } = $e4b487e979d7c06d$var$annotate(roots);\n    const leafSeries = series.map((s2, i2)=>$e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n            data: (leaves[i2] || []).map($e4b487e979d7c06d$var$leafRow)\n        }));\n    return {\n        roots: roots,\n        leafSeries: leafSeries,\n        maxDepth: maxDepth\n    };\n}\nfunction $e4b487e979d7c06d$var$getTreemapRoots(w2) {\n    const stashed = w2.globals.treemapRoots;\n    if (stashed && stashed.length) return {\n        roots: stashed,\n        maxDepth: w2.globals.treemapMaxDepth || 1,\n        nested: true\n    };\n    const roots = $e4b487e979d7c06d$var$buildSeriesRoots(w2, w2.config.series, {\n        keepDatum: true,\n        expandDrilldown: false\n    });\n    roots.forEach($e4b487e979d7c06d$var$fillValues);\n    const { maxDepth: maxDepth } = $e4b487e979d7c06d$var$annotate(roots);\n    return {\n        roots: roots,\n        maxDepth: maxDepth,\n        nested: false\n    };\n}\nconst $e4b487e979d7c06d$var$RAW_SAMPLE_TYPES = [\n    \"histogram\"\n];\nclass $e4b487e979d7c06d$var$Data {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   */ constructor(w2, { resetGlobals: resetGlobals = ()=>{}, isMultipleY: isMultipleY = ()=>{} } = {}){\n        this.w = w2;\n        this.resetGlobals = resetGlobals;\n        this.isMultipleY = isMultipleY;\n        this.twoDSeries = [];\n        this.threeDSeries = [];\n        this.twoDSeriesX = [];\n        this.seriesGoals = [];\n        this._warnedMissingTransform = false;\n        this.coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n        this.activeSeriesIndex = 0;\n    }\n    // Helper to get the first valid data point from the active series\n    getFirstDataPoint() {\n        const series = this.w.config.series;\n        const sr = new $e4b487e979d7c06d$var$Series(this.w);\n        this.activeSeriesIndex = sr.getActiveConfigSeriesIndex();\n        const activeItem = /** @type {any} */ series[this.activeSeriesIndex];\n        if (activeItem && activeItem.data && activeItem.data.length > 0 && activeItem.data[0] !== null && typeof activeItem.data[0] !== \"undefined\") return activeItem.data[0];\n        return null;\n    }\n    isMultiFormat() {\n        return this.isFormatXY() || this.isFormat2DArray();\n    }\n    // given format is [{x, y}, {x, y}]\n    isFormatXY() {\n        var _a;\n        const firstDataPoint = this.getFirstDataPoint();\n        if (!firstDataPoint || typeof firstDataPoint.x === \"undefined\") return false;\n        const data = /** @type {any} */ (_a = this.w.config.series[this.activeSeriesIndex]) == null ? void 0 : _a.data;\n        if (data) {\n            const isXY = (pt)=>pt && typeof pt.x !== \"undefined\";\n            for(let k = 1; k < Math.min(3, data.length); k++)if (isXY(data[k]) !== true) {\n                console.warn(`ApexCharts: series data has mixed formats starting at index ${k}`);\n                break;\n            }\n        }\n        return true;\n    }\n    // given format is [[x, y], [x, y]]\n    isFormat2DArray() {\n        const firstDataPoint = this.getFirstDataPoint();\n        return firstDataPoint && Array.isArray(firstDataPoint);\n    }\n    /**\n   * Typed single pass for the dominant [[x, y], ...] shape: scalar numeric or\n   * null y, no z, no OHLC tuples. One monomorphic loop fills preallocated\n   * x/y arrays and fuses the y-extrema scan that Range.getMinYMaxY would\n   * otherwise repeat over every value (the extrema entry is ref+length\n   * guarded, so any later reshaping of the series array simply falls back to\n   * the scan). Returns false untouched on any non-conforming point so the\n   * general loop below handles mixed/exotic data with unchanged output.\n   * @param {any[]} data\n   * @param {number} i\n   * @returns {boolean}\n   */ _fast2DArrayParse(data, i2) {\n        var _a, _b;\n        const n2 = data.length;\n        if (n2 === 0) return false;\n        const ys = new Array(n2);\n        const xs = new Array(n2);\n        let maxY = -Number.MAX_VALUE;\n        let lowestY = Number.MAX_VALUE;\n        let negMinY = Infinity;\n        let hasNulls = false;\n        let yDec = 0;\n        let xNumeric = true;\n        let minX = Infinity;\n        let maxX = -Infinity;\n        let xSorted = true;\n        let minXDiff = Infinity;\n        let prevX = NaN;\n        for(let j = 0; j < n2; j++){\n            const point = data[j];\n            if (!Array.isArray(point) || point.length > 2) return false;\n            const x = point[0];\n            const y = point[1];\n            if (xNumeric) {\n                if (typeof x === \"number\") {\n                    if (x === x) {\n                        if (x < minX) minX = x;\n                        if (x > maxX) maxX = x;\n                    }\n                    const d = x - prevX;\n                    if (d > 0) {\n                        if (d < minXDiff) minXDiff = d;\n                    } else if (d < 0) xSorted = false;\n                    prevX = x;\n                } else xNumeric = false;\n            }\n            if (typeof y === \"number\") {\n                if (y === y && y !== Infinity && y !== -Infinity) {\n                    if (y > maxY) maxY = y;\n                    if (y < lowestY) lowestY = y;\n                    if (y < 0 && y < negMinY) negMinY = y;\n                    if (!Number.isInteger(y)) {\n                        const av = y < 0 ? -y : y;\n                        if (av >= 1e-6 && av < 1e21) {\n                            const str = \"\" + y;\n                            const dot = str.indexOf(\".\");\n                            const dec = dot === -1 ? 0 : str.length - dot - 1;\n                            if (dec > yDec) yDec = dec;\n                        } else {\n                            const nv = $e4b487e979d7c06d$var$Utils$1.noExponents(y);\n                            if ($e4b487e979d7c06d$var$Utils$1.isFloat(nv)) yDec = Math.max(yDec, nv.toString().split(\".\")[1].length);\n                        }\n                    }\n                } else hasNulls = true;\n            } else if (y === null) hasNulls = true;\n            else return false;\n            ys[j] = y;\n            xs[j] = x;\n        }\n        this.twoDSeries = ys;\n        this.twoDSeriesX = xs;\n        this.w.axisFlags.dataFormatXNumeric = true;\n        const extrema = (_b = (_a = this.w.seriesData)._parsedExtrema) != null ? _b : _a._parsedExtrema = [];\n        extrema[i2] = {\n            ref: ys,\n            len: n2,\n            maxY: maxY,\n            lowestY: lowestY,\n            negMinY: negMinY,\n            hasNulls: hasNulls,\n            yDec: yDec,\n            xref: xs,\n            xNumeric: xNumeric,\n            minX: minX,\n            maxX: maxX,\n            xSorted: xSorted,\n            minXDiff: minXDiff\n        };\n        return true;\n    }\n    /**\n   * @param {any[]} ser\n   * @param {number} i\n   */ handleFormat2DArray(ser, i2) {\n        const cnf = this.w.config;\n        const data = ser[i2].data;\n        const isBoxPlot = cnf.chart.type === \"boxPlot\" || /** @type {any} */ cnf.series[i2].type === \"boxPlot\";\n        if (!isBoxPlot && cnf.xaxis.type !== \"datetime\" && this._fast2DArrayParse(data, i2)) return;\n        for(let j = 0; j < data.length; j++){\n            const point = data[j];\n            const x = point[0];\n            const y = point[1];\n            const z = point[2];\n            if (typeof y !== \"undefined\") {\n                if (Array.isArray(y) && y.length === 4 && !isBoxPlot) this.twoDSeries.push($e4b487e979d7c06d$var$Utils$1.parseNumber(y[3]));\n                else if (point.length >= 5) this.twoDSeries.push($e4b487e979d7c06d$var$Utils$1.parseNumber(point[4]));\n                else this.twoDSeries.push($e4b487e979d7c06d$var$Utils$1.parseNumber(y));\n                this.w.axisFlags.dataFormatXNumeric = true;\n            }\n            if (cnf.xaxis.type === \"datetime\") {\n                const ts = new Date(x).getTime();\n                this.twoDSeriesX.push(ts);\n            } else this.twoDSeriesX.push(x);\n            if (typeof z !== \"undefined\") {\n                this.threeDSeries.push(z);\n                this.w.axisFlags.isDataXYZ = true;\n            }\n        }\n    }\n    /**\n   * @param {any[]} ser\n   * @param {number} i\n   */ handleFormatXY(ser, i2) {\n        const cnf = this.w.config;\n        const gl = this.w.globals;\n        const dt = new $e4b487e979d7c06d$var$DateTime(this.w);\n        const data = ser[i2].data;\n        let activeI = i2;\n        if (gl.collapsedSeriesIndices.indexOf(i2) > -1) activeI = this.activeSeriesIndex;\n        const activeData = ser[activeI].data;\n        for(let j = 0; j < data.length; j++){\n            const point = data[j];\n            if (typeof point.y !== \"undefined\") {\n                const val = Array.isArray(point.y) ? $e4b487e979d7c06d$var$Utils$1.parseNumber(point.y[point.y.length - 1]) : $e4b487e979d7c06d$var$Utils$1.parseNumber(point.y);\n                this.twoDSeries.push(val);\n            }\n            if (typeof this.seriesGoals[i2] === \"undefined\") this.seriesGoals[i2] = [];\n            if (typeof point.goals !== \"undefined\" && Array.isArray(point.goals)) this.seriesGoals[i2].push(point.goals);\n            else this.seriesGoals[i2].push(null);\n            if (typeof point.z !== \"undefined\") {\n                this.threeDSeries.push(point.z);\n                this.w.axisFlags.isDataXYZ = true;\n            }\n        }\n        for(let j = 0; j < activeData.length; j++){\n            const point = activeData[j];\n            const x = point.x;\n            const isXString = typeof x === \"string\";\n            const isXArr = Array.isArray(x);\n            const isXDate = !isXArr && !!dt.isValidDate(x);\n            if (isXString || isXDate) {\n                if (isXString || cnf.xaxis.convertedCatToNumeric) {\n                    const isRangeColumn = gl.isBarHorizontal && this.w.axisFlags.isRangeData;\n                    if (cnf.xaxis.type === \"datetime\" && !isRangeColumn) this.twoDSeriesX.push(dt.parseDate(x));\n                    else {\n                        this.fallbackToCategory = true;\n                        this.twoDSeriesX.push(x);\n                        if (!isNaN(x) && this.w.config.xaxis.type !== \"category\" && typeof x !== \"string\") this.w.axisFlags.isXNumeric = true;\n                    }\n                } else if (cnf.xaxis.type === \"datetime\") this.twoDSeriesX.push(x instanceof Date ? x.getTime() : dt.parseDate(x.toString()));\n                else {\n                    this.w.axisFlags.dataFormatXNumeric = true;\n                    this.w.axisFlags.isXNumeric = true;\n                    this.twoDSeriesX.push(parseFloat(x));\n                }\n            } else if (isXArr) {\n                this.fallbackToCategory = true;\n                this.twoDSeriesX.push(x);\n            } else {\n                this.w.axisFlags.isXNumeric = true;\n                this.w.axisFlags.dataFormatXNumeric = true;\n                this.twoDSeriesX.push(x);\n            }\n        }\n    }\n    /**\n   * @param {any[]} ser\n   * @param {number} i\n   */ handleRangeData(ser, i2) {\n        let range = {\n            start: [],\n            end: [],\n            rangeUniques: []\n        };\n        if (this.isFormat2DArray()) range = this.handleRangeDataFormat(\"array\", ser, i2);\n        else if (this.isFormatXY()) range = this.handleRangeDataFormat(\"xy\", ser, i2);\n        this.w.rangeData.seriesRangeStart[i2] = range.start === void 0 ? [] : range.start;\n        this.w.rangeData.seriesRangeEnd[i2] = range.end === void 0 ? [] : range.end;\n        this.w.rangeData.seriesRange[i2] = range.rangeUniques;\n        this.w.rangeData.seriesRange.forEach((sr)=>{\n            if (!sr) return;\n            sr.forEach((sarr)=>{\n                const yItems = /** @type {any} */ sarr.y;\n                const len = /** @type {any[]} */ yItems.length;\n                if (len <= 1) return;\n                for(let arri = 0; arri < len; arri++){\n                    const arr = /** @type {any} */ yItems[arri];\n                    const range1y1 = arr.y1;\n                    const range1y2 = arr.y2;\n                    for(let sri = arri + 1; sri < len; sri++){\n                        const range2 = /** @type {any} */ yItems[sri];\n                        const range2y1 = range2.y1;\n                        const range2y2 = range2.y2;\n                        if (range1y1 <= range2y2 && range2y1 <= range1y2) {\n                            const sarrAny = /** @type {any} */ sarr;\n                            sarrAny.overlaps.add(arr.rangeName);\n                            sarrAny.overlaps.add(range2.rangeName);\n                        }\n                    }\n                }\n            });\n        });\n        return range;\n    }\n    /**\n   * Marks (#11) P3: fold a custom series' per-datum y-extent into the\n   * range-data slice so both bounds drive the y-axis scale. When `yExtent` is\n   * given it supplies the values a datum occupies (scalar or array => min/max\n   * across them); otherwise the datum's `y` is used (array => first/last,\n   * scalar => itself). The datum still carries a representative scalar `y`\n   * (folded by handleFormatXY into seriesData.series) that gates Range.\n   * @param {any[]} ser @param {number} i @param {Function|null} yExtent\n   */ handleCustomRangeData(ser, i2, yExtent) {\n        const data = ser[i2].data || [];\n        const start = [];\n        const end = [];\n        for(let j = 0; j < data.length; j++){\n            const datum = data[j];\n            let lo;\n            let hi;\n            if (typeof yExtent === \"function\") {\n                let ext = yExtent(datum, j);\n                if (!Array.isArray(ext)) ext = [\n                    ext\n                ];\n                const nums = ext.map((v2)=>$e4b487e979d7c06d$var$Utils$1.parseNumber(v2)).filter((v2)=>v2 !== null && !isNaN(v2));\n                lo = nums.length ? Math.min(...nums) : null;\n                hi = nums.length ? Math.max(...nums) : null;\n            } else {\n                const y = datum == null ? null : datum.y;\n                if (Array.isArray(y)) {\n                    lo = $e4b487e979d7c06d$var$Utils$1.parseNumber(y[0]);\n                    hi = $e4b487e979d7c06d$var$Utils$1.parseNumber(y[y.length - 1]);\n                } else lo = hi = $e4b487e979d7c06d$var$Utils$1.parseNumber(y);\n            }\n            start.push(lo);\n            end.push(hi);\n        }\n        this.w.rangeData.seriesRangeStart[i2] = start;\n        this.w.rangeData.seriesRangeEnd[i2] = end;\n    }\n    /**\n   * @param {any[]} ser\n   * @param {number} i\n   */ handleCandleStickBoxData(ser, i2) {\n        let ohlc = {\n            o: [],\n            h: [],\n            m: [],\n            l: [],\n            c: []\n        };\n        if (this.isFormat2DArray()) ohlc = this.handleCandleStickBoxDataFormat(\"array\", ser, i2);\n        else if (this.isFormatXY()) ohlc = this.handleCandleStickBoxDataFormat(\"xy\", ser, i2);\n        this.w.candleData.seriesCandleO[i2] = ohlc.o;\n        this.w.candleData.seriesCandleH[i2] = ohlc.h;\n        this.w.candleData.seriesCandleM[i2] = ohlc.m;\n        this.w.candleData.seriesCandleL[i2] = ohlc.l;\n        this.w.candleData.seriesCandleC[i2] = ohlc.c;\n        this.w.candleData.seriesBoxPoints[i2] = ohlc.points || [];\n        return ohlc;\n    }\n    /**\n   * Parse a violin series. Each data point carries a precomputed density\n   * profile (the violin shape) and an array of raw observations (the jitter):\n   *\n   *   { x, y: { density: [[value, weight], ...], points: [v1, v2, ...] } }\n   *\n   * Array fallback form: [x, densityPairs, pointsArray].\n   *\n   * Density `weight` need not be normalized — Violin.js scales each violin by\n   * its own maxWeight. The representative scalar pushed into the main series\n   * (so generic code paths see a non-null y) is the density mode — the value\n   * carrying the greatest weight.\n   *\n   * @param {any[]} ser\n   * @param {number} i\n   */ handleViolinData(ser, i2) {\n        var _a, _b, _c, _d, _e, _f;\n        const w2 = this.w;\n        const data = ser[i2].data;\n        const densityArr = [];\n        const pointsArr = [];\n        const minArr = [];\n        const maxArr = [];\n        const placeholders = [];\n        for(let j = 0; j < data.length; j++){\n            const d = data[j];\n            const dens = (_c = (_b = (_a = d == null ? void 0 : d.y) == null ? void 0 : _a.density) != null ? _b : d == null ? void 0 : d[1]) != null ? _c : [];\n            const pts = (_f = (_e = (_d = d == null ? void 0 : d.y) == null ? void 0 : _d.points) != null ? _e : d == null ? void 0 : d[2]) != null ? _f : [];\n            const values = [];\n            const weights = [];\n            let maxWeight = 0;\n            let modeValue = null;\n            let minVal = Infinity;\n            let maxVal = -Infinity;\n            for(let k = 0; k < dens.length; k++){\n                const v2 = $e4b487e979d7c06d$var$Utils$1.parseNumber(dens[k][0]);\n                const wt = $e4b487e979d7c06d$var$Utils$1.parseNumber(dens[k][1]);\n                if (v2 === null || wt === null) continue;\n                values.push(v2);\n                weights.push(wt);\n                if (wt > maxWeight) {\n                    maxWeight = wt;\n                    modeValue = v2;\n                }\n                if (v2 < minVal) minVal = v2;\n                if (v2 > maxVal) maxVal = v2;\n            }\n            const cleanPts = [];\n            for(let k = 0; k < pts.length; k++){\n                const p2 = $e4b487e979d7c06d$var$Utils$1.parseNumber(pts[k]);\n                if (p2 === null) continue;\n                cleanPts.push(p2);\n                if (p2 < minVal) minVal = p2;\n                if (p2 > maxVal) maxVal = p2;\n            }\n            densityArr.push({\n                values: values,\n                weights: weights,\n                maxWeight: maxWeight\n            });\n            pointsArr.push(cleanPts);\n            minArr.push(minVal === Infinity ? 0 : minVal);\n            maxArr.push(maxVal === -Infinity ? 0 : maxVal);\n            placeholders.push(modeValue !== null ? modeValue : cleanPts.length ? cleanPts[Math.floor(cleanPts.length / 2)] : 0);\n        }\n        w2.violinData.seriesViolinDensity[i2] = densityArr;\n        w2.violinData.seriesViolinPoints[i2] = pointsArr;\n        w2.violinData.seriesViolinMin[i2] = minArr;\n        w2.violinData.seriesViolinMax[i2] = maxArr;\n        this.twoDSeries = placeholders;\n    }\n    /**\n   * @param {string} format\n   * @param {any[]} ser\n   * @param {number} i\n   */ handleRangeDataFormat(format, ser, i2) {\n        const rangeStart = [];\n        const rangeEnd = [];\n        const uniqueKeysMap = /* @__PURE__ */ new Map();\n        const uniqueKeys = [];\n        ser[i2].data.forEach((item)=>{\n            if (!uniqueKeysMap.has(item.x)) {\n                const keyObj = {\n                    x: item.x,\n                    overlaps: /* @__PURE__ */ new Set(),\n                    y: []\n                };\n                uniqueKeysMap.set(item.x, keyObj);\n                uniqueKeys.push(keyObj);\n            }\n        });\n        if (format === \"array\") {\n            for(let j = 0; j < ser[i2].data.length; j++)if (Array.isArray(ser[i2].data[j])) {\n                rangeStart.push(ser[i2].data[j][1][0]);\n                rangeEnd.push(ser[i2].data[j][1][1]);\n            } else {\n                rangeStart.push(ser[i2].data[j]);\n                rangeEnd.push(ser[i2].data[j]);\n            }\n        } else if (format === \"xy\") for(let j = 0; j < ser[i2].data.length; j++){\n            const isDataPoint2D = Array.isArray(ser[i2].data[j].y);\n            const id = $e4b487e979d7c06d$var$Utils$1.randomId();\n            const x = ser[i2].data[j].x;\n            const y = {\n                y1: isDataPoint2D ? ser[i2].data[j].y[0] : ser[i2].data[j].y,\n                y2: isDataPoint2D ? ser[i2].data[j].y[1] : ser[i2].data[j].y,\n                rangeName: id\n            };\n            const gl = this.w.globals;\n            if (!gl.seriesRangeName) gl.seriesRangeName = {};\n            if (!gl.seriesRangeName[i2]) gl.seriesRangeName[i2] = {};\n            gl.seriesRangeName[i2][j] = id;\n            const keyObj = uniqueKeysMap.get(x);\n            if (keyObj) keyObj.y.push(y);\n            rangeStart.push(y.y1);\n            rangeEnd.push(y.y2);\n        }\n        return {\n            start: rangeStart,\n            end: rangeEnd,\n            rangeUniques: uniqueKeys\n        };\n    }\n    /**\n   * @param {string} format\n   * @param {any[]} ser\n   * @param {number} i\n   */ handleCandleStickBoxDataFormat(format, ser, i2) {\n        const w2 = this.w;\n        const isBoxPlot = w2.config.chart.type === \"boxPlot\" || /** @type {Record<string,any>} */ w2.config.series[i2].type === \"boxPlot\";\n        const serO = [];\n        const serH = [];\n        const serM = [];\n        const serL = [];\n        const serC = [];\n        const serPoints = [];\n        const data = ser[i2].data;\n        let getVals;\n        if (format === \"array\") {\n            const first = data[0];\n            const isFlat = isBoxPlot && first && first.length === 6 || !isBoxPlot && first && first.length === 5;\n            if (isFlat) getVals = (d)=>d.slice(1);\n            else getVals = (d)=>Array.isArray(d[1]) ? d[1] : [];\n        } else getVals = (d)=>Array.isArray(d.y) ? d.y : [];\n        for(let j = 0; j < data.length; j++){\n            const vals = getVals(data[j]);\n            if (vals && vals.length >= 2) {\n                serO.push(vals[0]);\n                serH.push(vals[1]);\n                if (isBoxPlot) {\n                    serM.push(vals[2]);\n                    serL.push(vals[3]);\n                    serC.push(vals[4]);\n                } else {\n                    serL.push(vals[2]);\n                    serC.push(vals[3]);\n                }\n            }\n            const pts = data[j] && /** @type {any} */ data[j].points;\n            serPoints.push(Array.isArray(pts) ? pts : []);\n        }\n        return {\n            o: serO,\n            h: serH,\n            m: serM,\n            l: serL,\n            c: serC,\n            points: serPoints\n        };\n    }\n    /**\n   * @param {any[]} ser\n   */ parseDataAxisCharts(ser) {\n        var _a, _b, _c, _d, _e, _f;\n        const cnf = this.w.config;\n        const gl = this.w.globals;\n        const dt = new $e4b487e979d7c06d$var$DateTime(this.w);\n        this.w.seriesData._parsedExtrema = [];\n        const xlabels = cnf.labels.length > 0 ? cnf.labels.slice() : cnf.xaxis.categories.slice();\n        this.w.axisFlags.isRangeBar = cnf.chart.type === \"rangeBar\" && gl.isBarHorizontal;\n        this.w.labelData.hasXaxisGroups = cnf.xaxis.type === \"category\" && cnf.xaxis.group.groups.length > 0;\n        if (this.w.labelData.hasXaxisGroups) this.w.labelData.groups = cnf.xaxis.group.groups;\n        ser.forEach((s2, i2)=>{\n            if (s2.name !== void 0) this.w.seriesData.seriesNames.push(s2.name);\n            else this.w.seriesData.seriesNames.push(\"series-\" + parseInt(String(i2 + 1), 10));\n        });\n        this.coreUtils.setSeriesYAxisMappings();\n        const buckets = [];\n        const groups = [\n            ...new Set(cnf.series.map((s2)=>s2.group))\n        ];\n        cnf.series.forEach((s2, i2)=>{\n            const index = groups.indexOf(s2.group);\n            if (!buckets[index]) buckets[index] = [];\n            buckets[index].push(this.w.seriesData.seriesNames[i2]);\n        });\n        this.w.labelData.seriesGroups = buckets;\n        const handleDates = ()=>{\n            for(let j = 0; j < xlabels.length; j++)if (typeof xlabels[j] === \"string\") {\n                const isDate = dt.isValidDate(xlabels[j]);\n                if (isDate) this.twoDSeriesX.push(dt.parseDate(xlabels[j]));\n                else throw new Error(\"You have provided invalid Date format. Please provide a valid JavaScript Date\");\n            } else this.twoDSeriesX.push(xlabels[j]);\n        };\n        for(let i2 = 0; i2 < ser.length; i2++){\n            this.twoDSeries = [];\n            this.twoDSeriesX = [];\n            this.threeDSeries = [];\n            if (typeof ser[i2].data === \"undefined\") {\n                console.error(\"It is a possibility that you may have not included 'data' property in series.\");\n                ser[i2] = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, ser[i2]), {\n                    data: []\n                });\n            }\n            const dr = cnf.chart.dataReducer;\n            const rawStash = (_b = (_a = gl.dataReducerRawSeries) == null ? void 0 : _a[i2]) == null ? void 0 : _b.data;\n            if ((dr == null ? void 0 : dr.enabled) && this.isMultiFormat() && Array.isArray(rawStash) && rawStash.length > ((_c = dr.threshold) != null ? _c : 500)) {\n                const targetPoints = (_d = dr.targetPoints) != null ? _d : 250;\n                const xmin = cnf.xaxis.min;\n                const xmax = cnf.xaxis.max;\n                const windowed = xmin == null && xmax == null ? rawStash : $e4b487e979d7c06d$var$Data.sliceByXRange(rawStash, xmin, xmax);\n                let reduced = windowed;\n                if (windowed.length > targetPoints) {\n                    const sampleY = !Array.isArray(windowed[0]) ? (_e = windowed[0]) == null ? void 0 : _e.y : (_f = windowed[0]) == null ? void 0 : _f[1];\n                    if (Array.isArray(sampleY)) {\n                        if (sampleY.length === 4) reduced = $e4b487e979d7c06d$var$Data.ohlcAggregate(windowed, targetPoints);\n                        else if (sampleY.length === 2) reduced = $e4b487e979d7c06d$var$Data.rangeAggregate(windowed, targetPoints);\n                    } else reduced = $e4b487e979d7c06d$var$Data.lttbDownsample(windowed, targetPoints);\n                }\n                ser[i2] = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, ser[i2]), {\n                    data: reduced\n                });\n            }\n            if (cnf.chart.type === \"rangeBar\" || cnf.chart.type === \"rangeArea\" || ser[i2].type === \"rangeBar\" || ser[i2].type === \"rangeArea\") {\n                this.w.axisFlags.isRangeData = true;\n                this.handleRangeData(ser, i2);\n            }\n            const customType = ser[i2].type || cnf.chart.type;\n            if ($e4b487e979d7c06d$var$isCustom(customType)) {\n                const cls = /** @type {any} */ $e4b487e979d7c06d$var$getChartClass(customType);\n                const yExtent = cls && cls.yExtent;\n                if (cls && cls.dataType === \"rangeXY\" || typeof yExtent === \"function\") {\n                    this.w.axisFlags.isRangeData = true;\n                    this.handleCustomRangeData(ser, i2, yExtent);\n                }\n            }\n            if (this.isMultiFormat()) {\n                if (this.isFormat2DArray()) this.handleFormat2DArray(ser, i2);\n                else if (this.isFormatXY()) this.handleFormatXY(ser, i2);\n                if (cnf.chart.type === \"candlestick\" || ser[i2].type === \"candlestick\" || cnf.chart.type === \"boxPlot\" || ser[i2].type === \"boxPlot\") this.handleCandleStickBoxData(ser, i2);\n                if (cnf.chart.type === \"violin\" || ser[i2].type === \"violin\") this.handleViolinData(ser, i2);\n                this.w.seriesData.series.push(this.twoDSeries);\n                this.w.labelData.labels.push(this.twoDSeriesX);\n                this.w.seriesData.seriesX.push(this.twoDSeriesX);\n                this.w.seriesData.seriesGoals = this.seriesGoals;\n                if (i2 === this.activeSeriesIndex && !this.fallbackToCategory) this.w.axisFlags.isXNumeric = true;\n            } else {\n                if (cnf.xaxis.type === \"datetime\") {\n                    this.w.axisFlags.isXNumeric = true;\n                    handleDates();\n                    this.w.seriesData.seriesX.push(this.twoDSeriesX);\n                } else if (cnf.xaxis.type === \"numeric\") {\n                    this.w.axisFlags.isXNumeric = true;\n                    if (xlabels.length > 0) {\n                        this.twoDSeriesX = xlabels;\n                        this.w.seriesData.seriesX.push(this.twoDSeriesX);\n                    }\n                }\n                this.w.labelData.labels.push(this.twoDSeriesX);\n                const singleArray = ser[i2].data.map((d)=>$e4b487e979d7c06d$var$Utils$1.parseNumber(d));\n                this.w.seriesData.series.push(singleArray);\n            }\n            this.w.seriesData.seriesZ.push(this.threeDSeries);\n            if (ser[i2].color !== void 0) this.w.seriesData.seriesColors.push(ser[i2].color);\n            else this.w.seriesData.seriesColors.push(/** @type {any} */ void 0);\n        }\n        return this.w;\n    }\n    /**\n   * @param {any[]} ser\n   */ parseDataNonAxisCharts(ser) {\n        const cnf = this.w.config;\n        this.w.seriesData.unitData = [];\n        const hasOldFormat = Array.isArray(ser) && ser.every((s2)=>typeof s2 === \"number\") && cnf.labels.length > 0;\n        const hasNewFormat = Array.isArray(ser) && ser.some((s2)=>s2 && typeof s2 === \"object\" && s2.data || s2 && typeof s2 === \"object\" && s2.parsing);\n        if (cnf.chart.type === \"unit\" && hasNewFormat && !hasOldFormat) return this.parseUnitSeries(ser);\n        if (hasOldFormat && hasNewFormat) console.warn(\"ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility.\");\n        if (hasOldFormat) {\n            this.w.seriesData.series = /** @type {any} */ ser.slice();\n            this.w.seriesData.seriesNames = cnf.labels.slice();\n            for(let i2 = 0; i2 < this.w.seriesData.series.length; i2++)if (this.w.seriesData.seriesNames[i2] === void 0) this.w.seriesData.seriesNames.push(\"series-\" + (i2 + 1));\n            return this.w;\n        }\n        if (Array.isArray(ser) && ser.every((s2)=>typeof s2 === \"number\")) {\n            this.w.seriesData.series = /** @type {any} */ ser.slice();\n            this.w.seriesData.seriesNames = [];\n            for(let i2 = 0; i2 < this.w.seriesData.series.length; i2++)this.w.seriesData.seriesNames.push(cnf.labels[i2] || `series-${i2 + 1}`);\n            return this.w;\n        }\n        const processedData = this.extractPieDataFromSeries(ser);\n        this.w.seriesData.series = processedData.values;\n        this.w.seriesData.seriesNames = processedData.labels;\n        if (cnf.chart.type === \"radialBar\") this.w.seriesData.series = this.w.seriesData.series.map((val)=>{\n            const numVal = $e4b487e979d7c06d$var$Utils$1.parseNumber(val);\n            if (numVal > 100) console.warn(`ApexCharts: RadialBar value ${numVal} > 100, consider using percentage values (0-100)`);\n            return numVal;\n        });\n        for(let i2 = 0; i2 < this.w.seriesData.series.length; i2++)if (this.w.seriesData.seriesNames[i2] === void 0) this.w.seriesData.seriesNames.push(\"series-\" + (i2 + 1));\n        return this.w;\n    }\n    /**\n   * Parse the unit chart's per-unit object form:\n   *   series: [{ name, data: [datum, datum, ...] }, ...]\n   * Each category's dot count is `data.length` (one dot per datum), and the\n   * per-unit data is kept on `w.seriesData.unitData` so the renderer can colour\n   * dots individually and the tooltip can show each unit's own info.\n   * @param {any[]} ser\n   * @returns {any} w\n   */ parseUnitSeries(ser) {\n        const cnf = this.w.config;\n        const series = [];\n        const seriesNames = [];\n        const unitData = [];\n        ser.forEach((s2, i2)=>{\n            var _a;\n            const data = s2 && Array.isArray(s2.data) ? s2.data : [];\n            series.push(data.length);\n            const name2 = s2 && s2.name !== void 0 && s2.name !== null ? s2.name : void 0;\n            seriesNames.push((_a = name2 != null ? name2 : cnf.labels[i2]) != null ? _a : `series-${i2 + 1}`);\n            unitData.push(data.slice());\n        });\n        this.w.seriesData.series = /** @type {any} */ series;\n        this.w.seriesData.seriesNames = seriesNames;\n        this.w.seriesData.unitData = unitData;\n        return this.w;\n    }\n    /**\n   * Reset parsing flags to allow re-parsing of data during updates\n   */ resetParsingFlags() {\n        const w2 = this.w;\n        w2.axisFlags.dataWasParsed = false;\n        w2.globals.originalSeries = null;\n        if (w2.config.series) w2.config.series.forEach((serie)=>{\n            if (/** @type {any} */ serie.__apexParsed) delete /** @type {any} */ serie.__apexParsed;\n        });\n    }\n    /**\n   * @param {any[]} ser\n   */ extractPieDataFromSeries(ser) {\n        const values = [];\n        const labels = [];\n        if (!Array.isArray(ser)) {\n            console.warn(\"ApexCharts: Expected array for series data\");\n            return {\n                values: [],\n                labels: []\n            };\n        }\n        if (ser.length === 0) {\n            console.warn(\"ApexCharts: Empty series array\");\n            return {\n                values: [],\n                labels: []\n            };\n        }\n        const firstItem = ser[0];\n        if (typeof firstItem === \"object\" && firstItem !== null && firstItem.data) this.extractPieDataFromSeriesObjects(ser, values, labels);\n        else {\n            console.warn(\"ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property.\");\n            return {\n                values: [],\n                labels: []\n            };\n        }\n        return {\n            values: values,\n            labels: labels\n        };\n    }\n    // Extract data from series objects: [{ data: [...], parsing: {...} }]\n    /**\n   * @param {any[]} seriesArray\n   * @param {any[]} values\n   * @param {any[]} labels\n   */ extractPieDataFromSeriesObjects(seriesArray, values, labels) {\n        seriesArray.forEach((serie, serieIndex)=>{\n            if (!serie.data || !Array.isArray(serie.data)) {\n                console.warn(`ApexCharts: Series ${serieIndex} has no valid data array`);\n                return;\n            }\n            serie.data.forEach((dataPoint)=>{\n                if (typeof dataPoint === \"object\" && dataPoint !== null) {\n                    if (dataPoint.x !== void 0 && dataPoint.y !== void 0) {\n                        labels.push(String(dataPoint.x));\n                        values.push($e4b487e979d7c06d$var$Utils$1.parseNumber(dataPoint.y));\n                    } else console.warn(\"ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:\", dataPoint);\n                } else console.warn(\"ApexCharts: Expected object data point, got:\", typeof dataPoint);\n            });\n        });\n    }\n    /** User possibly set string categories in xaxis.categories or labels prop\n   * Or didn't set xaxis labels at all - in which case we manually do it.\n   * If user passed series data as [[3, 2], [4, 5]] or [{ x: 3, y: 55 }],\n   * this shouldn't be called\n   * @param {any[]} ser - the series which user passed to the config\n   */ handleExternalLabelsData(ser) {\n        const cnf = this.w.config;\n        if (cnf.xaxis.categories.length > 0) this.w.labelData.labels = cnf.xaxis.categories;\n        else if (cnf.labels.length > 0) this.w.labelData.labels = cnf.labels.slice();\n        else if (this.fallbackToCategory) {\n            this.w.labelData.labels = /** @type {string[]} */ /** @type {unknown} */ this.w.labelData.labels[0];\n            if (this.w.rangeData.seriesRange.length) {\n                this.w.rangeData.seriesRange.map((srt)=>{\n                    srt.forEach((sr)=>{\n                        if (this.w.labelData.labels.indexOf(sr.x) < 0 && sr.x) this.w.labelData.labels.push(sr.x);\n                    });\n                });\n                const _labels = this.w.labelData.labels;\n                if (_labels.length > 0 && (typeof _labels[0] === \"number\" || typeof _labels[0] === \"string\")) this.w.labelData.labels = [\n                    ...new Set(_labels)\n                ];\n                else {\n                    const _seen = /* @__PURE__ */ new Map();\n                    for (const _label of _labels){\n                        const _key = JSON.stringify(_label);\n                        if (!_seen.has(_key)) _seen.set(_key, _label);\n                    }\n                    this.w.labelData.labels = Array.from(_seen.values());\n                }\n            }\n            if (cnf.xaxis.convertedCatToNumeric) {\n                const defaults = new $e4b487e979d7c06d$var$Defaults(cnf);\n                defaults.convertCatToNumericXaxis(cnf, this.w.seriesData.seriesX[0]);\n                this._generateExternalLabels(ser);\n            }\n        } else this._generateExternalLabels(ser);\n    }\n    /**\n   * @param {any[]} ser\n   */ _generateExternalLabels(ser) {\n        const gl = this.w.globals;\n        const cnf = this.w.config;\n        let labelArr = [];\n        if (gl.axisCharts) {\n            if (this.w.seriesData.series.length > 0) {\n                if (this.isFormatXY()) {\n                    const seriesDataFiltered = cnf.series.map((serie)=>{\n                        const seen = /* @__PURE__ */ new Map();\n                        for (const point of serie.data)if (!seen.has(point.x)) seen.set(point.x, point);\n                        return Array.from(seen.values());\n                    });\n                    const len = seriesDataFiltered.reduce((p2, c2, i2, a2)=>a2[p2].length > c2.length ? p2 : i2, 0);\n                    for(let i2 = 0; i2 < seriesDataFiltered[len].length; i2++)labelArr.push(i2 + 1);\n                } else for(let i2 = 0; i2 < this.w.seriesData.series[gl.maxValsInArrayIndex].length; i2++)labelArr.push(i2 + 1);\n            }\n            this.w.seriesData.seriesX = [];\n            for(let i2 = 0; i2 < ser.length; i2++)this.w.seriesData.seriesX.push(labelArr);\n            if (!this.w.globals.isBarHorizontal) this.w.axisFlags.isXNumeric = true;\n        }\n        if (labelArr.length === 0) {\n            labelArr = gl.axisCharts ? [] : /**\n         * @param {Record<string, any>} gls\n         * @param {number} glsi\n         */ this.w.seriesData.series.map((gls, glsi)=>{\n                return glsi + 1;\n            });\n            for(let i2 = 0; i2 < ser.length; i2++)this.w.seriesData.seriesX.push(labelArr);\n        }\n        this.w.labelData.labels = /** @type {string[]} */ /** @type {unknown} */ labelArr;\n        if (cnf.xaxis.convertedCatToNumeric) this.w.labelData.categoryLabels = labelArr.map((l2)=>{\n            return cnf.xaxis.labels.formatter(l2);\n        });\n        this.w.axisFlags.noLabelsProvided = true;\n    }\n    /**\n   * @param {any[]} series\n   */ parseRawDataIfNeeded(series) {\n        const cnf = this.w.config;\n        const gl = this.w.globals;\n        const globalParsing = cnf.parsing;\n        if (this.w.axisFlags.dataWasParsed) return series;\n        const hasGlobalParsing = !!(globalParsing && (globalParsing.x || globalParsing.y || globalParsing.z));\n        const hasSeriesParsing = series.some((s2)=>s2.parsing && (s2.parsing.x || s2.parsing.y || s2.parsing.z));\n        if (!hasGlobalParsing && !hasSeriesParsing) return series;\n        const processedSeries = series.map((serie, index)=>{\n            var _a, _b, _c, _d, _e;\n            if (!serie.data || !Array.isArray(serie.data) || serie.data.length === 0) return serie;\n            const effectiveParsing = {\n                x: ((_a = serie.parsing) == null ? void 0 : _a.x) || (globalParsing == null ? void 0 : globalParsing.x),\n                y: ((_b = serie.parsing) == null ? void 0 : _b.y) || (globalParsing == null ? void 0 : globalParsing.y),\n                z: ((_c = serie.parsing) == null ? void 0 : _c.z) || (globalParsing == null ? void 0 : globalParsing.z)\n            };\n            if (!effectiveParsing.x && !effectiveParsing.y) return serie;\n            const firstDataPoint = serie.data[0];\n            if (typeof firstDataPoint === \"object\" && firstDataPoint !== null && (Object.prototype.hasOwnProperty.call(firstDataPoint, \"x\") || Object.prototype.hasOwnProperty.call(firstDataPoint, \"y\")) || Array.isArray(firstDataPoint)) return serie;\n            if (!effectiveParsing.x || !effectiveParsing.y || Array.isArray(effectiveParsing.y) && effectiveParsing.y.length === 0) {\n                const missing = [];\n                if (!effectiveParsing.x) missing.push(\"x\");\n                if (!effectiveParsing.y || Array.isArray(effectiveParsing.y) && effectiveParsing.y.length === 0) missing.push(\"y\");\n                const seriesName = (_d = serie.name) != null ? _d : `series[${index}]`;\n                console.warn(`ApexCharts [${this.w.globals.chartID}]: \"${seriesName}\" has a parseData config but is missing the '${missing.join(\"', '\")}' field specification.`, {\n                    parsing: (_e = serie.parsing) != null ? _e : globalParsing\n                });\n                return serie;\n            }\n            const transformedData = serie.data.map((item, itemIndex)=>{\n                if (typeof item !== \"object\" || item === null) {\n                    console.warn(`ApexCharts: Series ${index}, data point ${itemIndex} is not an object, skipping parsing`);\n                    return item;\n                }\n                const x = this.getNestedValue(item, effectiveParsing.x);\n                let y;\n                let z = void 0;\n                if (Array.isArray(effectiveParsing.y)) {\n                    const yValues = effectiveParsing.y.map((fieldName)=>this.getNestedValue(item, fieldName));\n                    if (this.w.config.chart.type === \"bubble\") {\n                        if (yValues.length < 2) console.warn(`ApexCharts: series[${index}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(effectiveParsing.y)}`);\n                        y = yValues[0];\n                    } else y = yValues;\n                } else y = this.getNestedValue(item, effectiveParsing.y);\n                if (effectiveParsing.z) z = this.getNestedValue(item, effectiveParsing.z);\n                if (x === void 0) console.warn(`ApexCharts: Series ${index}, data point ${itemIndex} missing field '${effectiveParsing.x}'`);\n                if (y === void 0) console.warn(`ApexCharts: Series ${index}, data point ${itemIndex} missing field '${effectiveParsing.y}'`);\n                const result = {\n                    x: x,\n                    y: y,\n                    z: void 0\n                };\n                if (this.w.config.chart.type === \"bubble\" && Array.isArray(effectiveParsing.y) && effectiveParsing.y.length === 2) {\n                    const zValue = this.getNestedValue(item, effectiveParsing.y[1]);\n                    if (zValue !== void 0) result.z = zValue;\n                }\n                if (z !== void 0) result.z = z;\n                return result;\n            });\n            return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, serie), {\n                data: transformedData,\n                __apexParsed: true\n            });\n        });\n        this.w.axisFlags.dataWasParsed = true;\n        if (!gl.originalSeries) gl.originalSeries = $e4b487e979d7c06d$var$Utils$1.clone(series);\n        return processedSeries;\n    }\n    /**\n   * Get nested object value using dot notation path\n   * @param {Object} obj - The object to search in\n   * @param {string} path - Dot notation path (e.g., 'user.profile.name')\n   * @returns {*} The value at the path, or undefined if not found\n   */ getNestedValue(obj, path) {\n        if (!obj || typeof obj !== \"object\" || !path) return void 0;\n        if (path.indexOf(\".\") === -1) return /** @type {any} */ obj[path];\n        const keys = path.split(\".\");\n        let current = obj;\n        for(let i2 = 0; i2 < keys.length; i2++){\n            if (current === null || current === void 0 || typeof current !== \"object\") return void 0;\n            current = /** @type {any} */ current[keys[i2]];\n        }\n        return current;\n    }\n    /**\n   * Optional pre-parse series transform. A chart type whose series carries RAW\n   * observations rather than the values it draws (a histogram's sample, and in\n   * time a boxPlot's or a violin's) registers a transform through\n   * `apexcharts/features/stats`. Core keeps only this lookup, so a bundle that\n   * never asks for a raw-sample type never pays for the statistics.\n   *\n   * @param {any[]} ser\n   * @returns {any[]}\n   */ applySeriesTransform(ser) {\n        const cnf = this.w.config;\n        const name2 = cnf.chart.requestedType || cnf.chart.type;\n        const transform = $e4b487e979d7c06d$var$getSeriesTransform(name2);\n        if (transform) return transform(ser, this.w);\n        if (!Array.isArray(ser) || $e4b487e979d7c06d$var$RAW_SAMPLE_TYPES.indexOf(name2) === -1) return ser;\n        if (!this._warnedMissingTransform) {\n            this._warnedMissingTransform = true;\n            console.warn(`ApexCharts: chart.type '${name2}' needs the stats feature. Add \\`import 'apexcharts/features/stats'\\`, or import from 'apexcharts/${name2}'.`);\n        }\n        return ser.map((s2)=>$e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n                data: []\n            }));\n    }\n    /**\n   * Nested treemap: resolve a `children` hierarchy into the tree the renderer\n   * lays out, and return the leaves as a flat series.\n   *\n   * Everything downstream of here addresses a treemap by `(seriesIndex,\n   * dataPointIndex)` into a flat matrix, so the leaves are flattened in\n   * depth-first order and `dataPointIndex` keeps meaning \"the nth leaf of this\n   * series\". The tree itself goes on globals for the renderer.\n   *\n   * `cnf.series` is replaced with the flattened leaves further down parseData,\n   * which is the only copy that survives — so the nested input is stashed on\n   * the first parse and every later parse resolves from the stash, never from\n   * the already-flattened view. That is the same contract the histogram's raw\n   * observations and the downsampler's raw series use, and `_updateSeries`\n   * clears all three when the user pushes new data.\n   *\n   * @param {any[]} ser\n   * @returns {any[]}\n   */ flattenTreemapHierarchy(ser) {\n        const w2 = this.w;\n        const gl = w2.globals;\n        if (w2.config.chart.type !== \"treemap\" || !Array.isArray(ser)) return ser;\n        if (!gl.treemapRawSeries) {\n            if (!$e4b487e979d7c06d$var$isNestedTreemap(w2, ser)) {\n                gl.treemapRoots = null;\n                return ser;\n            }\n            gl.treemapRawSeries = ser.map((s2)=>$e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n                    data: Array.isArray(s2 == null ? void 0 : s2.data) ? s2.data.slice() : s2 == null ? void 0 : s2.data\n                }));\n        }\n        const { roots: roots, leafSeries: leafSeries, maxDepth: maxDepth } = $e4b487e979d7c06d$var$resolveTreemapTree(w2, gl.treemapRawSeries);\n        gl.treemapRoots = roots;\n        gl.treemapMaxDepth = maxDepth;\n        return leafSeries;\n    }\n    /**\n   * Scatter strip-plot support. When `plotOptions.scatter.jitter.enabled` and a\n   * series carries compact `{ x: 'Category', y: [v1, v2, ...] }` data, expand\n   * each observation into its own `{ x: bandIndex, y }` point (so every dot is a\n   * first-class, hoverable marker) and frame the x-axis as evenly-spaced,\n   * labelled bands. The reference per-point form (numeric x + `xaxis.categories`)\n   * is reframed too, without expansion. Returns `ser` unchanged for non-scatter\n   * charts and for plain numeric/datetime data (continuous overplotting jitter\n   * is offset at render time instead).\n   *\n   * @param {any[]} ser\n   * @returns {any[]}\n   */ expandScatterJitterData(ser) {\n        var _a, _b;\n        const cnf = this.w.config;\n        const isScatter = cnf.chart.type === \"scatter\" || cnf.chart.type === \"bubble\";\n        const jt = (_b = (_a = cnf.plotOptions) == null ? void 0 : _a.scatter) == null ? void 0 : _b.jitter;\n        if (!isScatter || !jt || !jt.enabled || !Array.isArray(ser)) return ser;\n        const hasArrayY = ser.some((s2)=>Array.isArray(s2 == null ? void 0 : s2.data) && s2.data.some((d)=>d && !Array.isArray(d) && Array.isArray(d.y)));\n        if (!hasArrayY) {\n            if (cnf.xaxis.type !== \"datetime\") {\n                if (Array.isArray(cnf.xaxis.categories) && cnf.xaxis.categories.length) this._applyBandAxis(cnf.xaxis.categories.slice());\n                else if (Array.isArray(cnf.xaxis._scatterBandLabels) && cnf.xaxis._scatterBandLabels.length) this._applyBandAxis(cnf.xaxis._scatterBandLabels);\n            }\n            return ser;\n        }\n        const bandLabels = [];\n        const bandIndex = /* @__PURE__ */ new Map();\n        ser.forEach((s2)=>{\n            if (!Array.isArray(s2 == null ? void 0 : s2.data)) return;\n            s2.data.forEach((d)=>{\n                if (d && Array.isArray(d.y)) {\n                    const key = String(d.x);\n                    if (!bandIndex.has(key)) {\n                        bandIndex.set(key, bandLabels.length);\n                        bandLabels.push(d.x);\n                    }\n                }\n            });\n        });\n        const maxPoints = jt.maxPoints || 5e3;\n        const expanded = ser.map((s2)=>{\n            if (!Array.isArray(s2 == null ? void 0 : s2.data)) return s2;\n            const out = [];\n            s2.data.forEach((d)=>{\n                if (d && Array.isArray(d.y)) {\n                    const bi = bandIndex.get(String(d.x));\n                    const ys = d.y;\n                    const stride = ys.length > maxPoints ? Math.ceil(ys.length / maxPoints) : 1;\n                    for(let k = 0; k < ys.length; k += stride){\n                        const yv = $e4b487e979d7c06d$var$Utils$1.parseNumber(ys[k]);\n                        if (yv === null) continue;\n                        out.push({\n                            x: bi,\n                            y: yv\n                        });\n                    }\n                } else if (d && typeof d === \"object\" && !Array.isArray(d)) {\n                    const key = String(d.x);\n                    out.push({\n                        x: bandIndex.has(key) ? bandIndex.get(key) : d.x,\n                        y: d.y\n                    });\n                } else out.push(d);\n            });\n            return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n                data: out\n            });\n        });\n        this._applyBandAxis(bandLabels);\n        return expanded;\n    }\n    /**\n   * Frame the x-axis as N evenly-spaced bands (one per category) on a numeric\n   * scale. Bands sit at integer positions 0..N-1; the range is padded by a full\n   * band on each side (min -1, max N) so jittered dots never clip. Crucially the\n   * range bounds and tick count are integers, so the ticks land exactly on the\n   * band centers regardless of how the numeric scale \"nices\" the step (e.g. the\n   * small-range reduction in Scales._adjustTicksForSmallRange triggered by a\n   * y-axis formatter). Only fills in options the user hasn't set, so explicit\n   * min/max/tickAmount/formatter still win. The exception is an interactive\n   * zoom/pan window (w.interact.zoomed): its fractional bounds are snapped to\n   * whole bands so tick labels stay on band centers and edge bands are never\n   * half-cropped.\n   *\n   * @param {any[]} bandLabels\n   */ _applyBandAxis(bandLabels) {\n        var _a;\n        const xa = this.w.config.xaxis;\n        const n2 = bandLabels.length;\n        if (!n2) return;\n        const owned = /** @type {Record<string, boolean>} */ xa._scatterBand = xa._scatterBand || {};\n        xa._scatterBandLabels = bandLabels.slice();\n        xa.type = \"numeric\";\n        if (((_a = this.w.interact) == null ? void 0 : _a.zoomed) && typeof xa.min === \"number\" && typeof xa.max === \"number\" && isFinite(xa.min) && isFinite(xa.max)) {\n            const clampBand = (b2)=>Math.max(0, Math.min(n2 - 1, b2));\n            let first = clampBand(Math.round(xa.min + 0.49));\n            let last = clampBand(Math.round(xa.max - 0.49));\n            if (last < first) first = last = clampBand(Math.round((xa.min + xa.max) / 2));\n            xa.min = first - 1;\n            xa.max = last + 1;\n            xa.tickAmount = last - first + 2;\n            owned.min = true;\n            owned.max = true;\n            owned.tick = true;\n        } else {\n            if (xa.min == null || owned.min) {\n                xa.min = -1;\n                owned.min = true;\n            }\n            if (xa.max == null || owned.max) {\n                xa.max = n2;\n                owned.max = true;\n            }\n            if (xa.tickAmount == null || xa.tickAmount === \"dataPoints\" || owned.tick) {\n                xa.tickAmount = n2 + 1;\n                owned.tick = true;\n            }\n        }\n        xa.labels = xa.labels || {};\n        const existing = /** @type {any} */ xa.labels.formatter;\n        if (typeof existing !== \"function\" || existing._scatterBand) {\n            const fmt = /** @type {any} */ (val)=>{\n                const r2 = Math.round(val);\n                return Math.abs(val - r2) < 1e-6 && bandLabels[r2] !== void 0 ? bandLabels[r2] : \"\";\n            };\n            fmt._scatterBand = true;\n            xa.labels.formatter = fmt;\n        }\n    }\n    // Segregate user provided data into appropriate vars\n    /**\n   * @param {any[]} ser\n   */ parseData(ser) {\n        var _a, _b, _c, _d, _e, _f, _g;\n        const w2 = this.w;\n        const cnf = w2.config;\n        const gl = w2.globals;\n        ser = this.parseRawDataIfNeeded(ser);\n        ser = this.applySeriesTransform(ser);\n        ser = this.expandScatterJitterData(ser);\n        ser = this.flattenTreemapHierarchy(ser);\n        if (((_a = cnf.chart.dataReducer) == null ? void 0 : _a.enabled) && gl.axisCharts && !gl.dataReducerRawSeries) {\n            gl.dataReducerRawSeries = ser.map((s2)=>({\n                    data: Array.isArray(s2 == null ? void 0 : s2.data) ? s2.data.slice() : s2 == null ? void 0 : s2.data\n                }));\n            let rawMinX = Infinity;\n            let rawMaxX = -Infinity;\n            for (const s2 of ser){\n                const d = s2 == null ? void 0 : s2.data;\n                if (!Array.isArray(d) || d.length === 0) continue;\n                const isXY = !Array.isArray(d[0]);\n                const firstX = isXY ? (_b = d[0]) == null ? void 0 : _b.x : (_c = d[0]) == null ? void 0 : _c[0];\n                const lastX = isXY ? (_d = d[d.length - 1]) == null ? void 0 : _d.x : (_e = d[d.length - 1]) == null ? void 0 : _e[0];\n                if (typeof firstX === \"number\") rawMinX = Math.min(rawMinX, firstX);\n                if (typeof lastX === \"number\") rawMaxX = Math.max(rawMaxX, lastX);\n            }\n            if (rawMinX !== Infinity) {\n                gl.dataReducerRawMinX = rawMinX;\n                gl.dataReducerRawMaxX = rawMaxX;\n            }\n        }\n        if (gl.dataReducerRawSeries && ((_f = cnf.chart.dataReducer) == null ? void 0 : _f.enabled)) ser = ser.map((s2)=>$e4b487e979d7c06d$var$__spreadValues({}, s2));\n        cnf.series = ser;\n        if (gl.dataReducerRawSeries && ((_g = cnf.chart.dataReducer) == null ? void 0 : _g.enabled)) {\n            const stash = gl.dataReducerRawSeries;\n            gl.initialSeries = ser.map((s2, i2)=>{\n                var _a2, _b2, _c2;\n                return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n                    data: (_c2 = (_b2 = (_a2 = stash[i2]) == null ? void 0 : _a2.data) == null ? void 0 : _b2.slice()) != null ? _c2 : s2.data\n                });\n            });\n        } else if (gl.histogramRawSeries) gl.initialSeries = gl.histogramRawSeries;\n        else if (gl.treemapRawSeries) gl.initialSeries = gl.treemapRawSeries;\n        else gl.initialSeries = ser;\n        this.excludeCollapsedSeriesInYAxis();\n        this.fallbackToCategory = false;\n        this.resetGlobals();\n        this.isMultipleY();\n        if (gl.axisCharts) {\n            this.parseDataAxisCharts(ser);\n            this.coreUtils.getLargestSeries();\n        } else this.parseDataNonAxisCharts(ser);\n        if (cnf.chart.stacked) {\n            const series = new $e4b487e979d7c06d$var$Series(this.w);\n            this.w.seriesData.series = series.setNullSeriesToZeroValues(this.w.seriesData.series);\n        }\n        this.coreUtils.getSeriesTotals();\n        if (gl.axisCharts) {\n            $e4b487e979d7c06d$var$Data._defineLazyResult(this.w.seriesData, \"stackedSeriesTotals\", ()=>this.coreUtils.getStackedSeriesTotals());\n            $e4b487e979d7c06d$var$Data._defineLazyResult(this.w.seriesData, \"stackedSeriesTotalsByGroups\", ()=>this.coreUtils.getStackedSeriesTotalsByGroups());\n            $e4b487e979d7c06d$var$Data._defineLazyResult(gl, \"seriesPercent\", ()=>{\n                this.coreUtils.getPercentSeries();\n                return gl.seriesPercent;\n            });\n        } else this.coreUtils.getPercentSeries();\n        if (!this.w.axisFlags.dataFormatXNumeric && (!this.w.axisFlags.isXNumeric || cnf.xaxis.type === \"numeric\" && cnf.labels.length === 0 && cnf.xaxis.categories.length === 0)) this.handleExternalLabelsData(ser);\n        const catLabels = this.coreUtils.getCategoryLabels(this.w.labelData.labels);\n        for(let l2 = 0; l2 < catLabels.length; l2++)if (Array.isArray(catLabels[l2])) {\n            this.w.axisFlags.isMultiLineX = true;\n            break;\n        }\n        return {\n            // w.seriesData (future slice)\n            // initialSeries/originalSeries and the stacked totals are deliberately\n            // ABSENT: they already live as lazy accessors on gl / w.seriesData, so\n            // a snapshot field would either force their materialization (a deep\n            // clone plus three O(n) passes per parse that most charts never need)\n            // or, as a delegating getter, recurse into itself when a writer copies\n            // it back onto the object it delegates to.\n            seriesData: {\n                series: this.w.seriesData.series,\n                seriesNames: this.w.seriesData.seriesNames,\n                seriesX: this.w.seriesData.seriesX,\n                seriesZ: this.w.seriesData.seriesZ,\n                seriesColors: this.w.seriesData.seriesColors,\n                seriesGoals: this.w.seriesData.seriesGoals,\n                unitData: this.w.seriesData.unitData,\n                noLabelsProvided: this.w.axisFlags.noLabelsProvided\n            },\n            // w.rangeData (future slice)\n            rangeData: {\n                seriesRangeStart: this.w.rangeData.seriesRangeStart,\n                seriesRangeEnd: this.w.rangeData.seriesRangeEnd,\n                seriesRange: this.w.rangeData.seriesRange\n            },\n            // w.candleData (future slice)\n            candleData: {\n                seriesCandleO: this.w.candleData.seriesCandleO,\n                seriesCandleH: this.w.candleData.seriesCandleH,\n                seriesCandleM: this.w.candleData.seriesCandleM,\n                seriesCandleL: this.w.candleData.seriesCandleL,\n                seriesCandleC: this.w.candleData.seriesCandleC,\n                seriesBoxPoints: this.w.candleData.seriesBoxPoints\n            },\n            // w.labelData (future slice)\n            labelData: {\n                labels: this.w.labelData.labels,\n                categoryLabels: this.w.labelData.categoryLabels\n            },\n            // w.axisFlags (future slice)\n            axisFlags: {\n                isXNumeric: this.w.axisFlags.isXNumeric,\n                dataFormatXNumeric: this.w.axisFlags.dataFormatXNumeric,\n                isDataXYZ: this.w.axisFlags.isDataXYZ,\n                isRangeData: this.w.axisFlags.isRangeData,\n                isRangeBar: this.w.axisFlags.isRangeBar,\n                isMultiLineX: this.w.axisFlags.isMultiLineX,\n                dataWasParsed: this.w.axisFlags.dataWasParsed,\n                hasXaxisGroups: this.w.labelData.hasXaxisGroups,\n                groups: this.w.labelData.groups,\n                seriesGroups: this.w.labelData.seriesGroups\n            }\n        };\n    }\n    /**\n   * Slice a sorted-by-x series to a [xmin, xmax] window using binary search.\n   *\n   * Pads with one extra point on each side so lines extend cleanly to the\n   * chart edges. Either bound may be null/undefined to disable that side.\n   *\n   * @param {any[]} data - Series data in [{x,y}] or [[x,y]] format, sorted by x.\n   * @param {number|null|undefined} xmin\n   * @param {number|null|undefined} xmax\n   * @returns {any[]} Sliced array (new array, never the input reference).\n   */ /**\n   * Define `key` on `obj` as a lazily computed property: `compute` runs on\n   * first read after this call and its result is cached; assigning to the\n   * property stores the assigned value directly (so code that writes the\n   * field, like getPercentSeries, keeps working). Re-calling resets the cache\n   * (used once per parse).\n   * @param {any} obj\n   * @param {string} key\n   * @param {() => any} compute\n   */ static _defineLazyResult(obj, key, compute) {\n        let has = false;\n        let value;\n        Object.defineProperty(obj, key, {\n            configurable: true,\n            enumerable: true,\n            get () {\n                if (!has) {\n                    has = true;\n                    value = compute();\n                }\n                return value;\n            },\n            set (v2) {\n                has = true;\n                value = v2;\n            }\n        });\n    }\n    /**\n   * @param {any[]} data\n   * @param {any} xmin\n   * @param {any} xmax\n   */ static sliceByXRange(data, xmin, xmax) {\n        const len = data.length;\n        if (len === 0) return data;\n        const isXY = !Array.isArray(data[0]);\n        const getX = isXY ? (p2)=>p2.x : (p2)=>p2[0];\n        let lo = 0;\n        if (xmin != null) {\n            let l2 = 0;\n            let r2 = len - 1;\n            while(l2 <= r2){\n                const m2 = l2 + r2 >> 1;\n                if (getX(data[m2]) < xmin) l2 = m2 + 1;\n                else r2 = m2 - 1;\n            }\n            lo = Math.max(0, l2 - 1);\n        }\n        let hi = len;\n        if (xmax != null) {\n            let l2 = 0;\n            let r2 = len - 1;\n            while(l2 <= r2){\n                const m2 = l2 + r2 >> 1;\n                if (getX(data[m2]) > xmax) r2 = m2 - 1;\n                else l2 = m2 + 1;\n            }\n            hi = Math.min(len, l2 + 1);\n        }\n        return lo === 0 && hi === len ? data.slice() : data.slice(lo, hi);\n    }\n    /**\n   * Largest-Triangle-Three-Bucket (LTTB) downsampling.\n   *\n   * Reduces `data` to `targetPoints` points while preserving the visual shape\n   * of the series as perceived by the human eye.\n   *\n   * @param {any[]} data   - Raw series data in [{x,y}] or [[x,y]] format.\n   * @param {number} targetPoints - Desired output length (>= 3).\n   * @returns {any[]} Downsampled array in the same format as the input.\n   */ static lttbDownsample(data, targetPoints) {\n        const len = data.length;\n        if (targetPoints >= len || targetPoints < 3) return data;\n        const isXY = !Array.isArray(data[0]);\n        const getX = isXY ? (p2)=>p2.x : (p2)=>p2[0];\n        const getY = isXY ? (p2)=>p2.y : (p2)=>p2[1];\n        const sampled = [];\n        sampled.push(data[0]);\n        const bucketSize = (len - 2) / (targetPoints - 2);\n        let a2 = 0;\n        for(let i2 = 0; i2 < targetPoints - 2; i2++){\n            const avgRangeStart = Math.floor((i2 + 1) * bucketSize) + 1;\n            const avgRangeEnd = Math.min(Math.floor((i2 + 2) * bucketSize) + 1, len);\n            let avgX = 0;\n            let avgY = 0;\n            const avgRangeLen = avgRangeEnd - avgRangeStart;\n            for(let j = avgRangeStart; j < avgRangeEnd; j++){\n                avgX += getX(data[j]);\n                avgY += getY(data[j]);\n            }\n            avgX /= avgRangeLen;\n            avgY /= avgRangeLen;\n            const rangeStart = Math.floor(i2 * bucketSize) + 1;\n            const rangeEnd = Math.min(Math.floor((i2 + 1) * bucketSize) + 1, len);\n            const pointAX = getX(data[a2]);\n            const pointAY = getY(data[a2]);\n            let maxArea = -1;\n            let maxAreaIdx = rangeStart;\n            for(let j = rangeStart; j < rangeEnd; j++){\n                const area = Math.abs((pointAX - avgX) * (getY(data[j]) - pointAY) - (pointAX - getX(data[j])) * (avgY - pointAY)) * 0.5;\n                if (area > maxArea) {\n                    maxArea = area;\n                    maxAreaIdx = j;\n                }\n            }\n            sampled.push(data[maxAreaIdx]);\n            a2 = maxAreaIdx;\n        }\n        sampled.push(data[len - 1]);\n        return sampled;\n    }\n    /**\n   * OHLC-aware bucket aggregation for candlestick / OHLC series.\n   *\n   * Each point's y is a 4-tuple `[open, high, low, close]`. LTTB is unusable\n   * here — it treats y as a scalar, so the triangle-area math degenerates and\n   * silently discards the high/low extremes that *define* a candle. Instead we\n   * split the series into `targetPoints` contiguous buckets and roll each up\n   * into a single candle: open = first bucket open, close = last bucket close,\n   * high = max of highs, low = min of lows. The x is the first point's x in the\n   * bucket. Output keeps the input's format ([{x,y}] or [[x,y]]).\n   *\n   * @param {any[]} data         - Raw OHLC series in [{x,y:[o,h,l,c]}] or [[x,[o,h,l,c]]] format.\n   * @param {number} targetPoints - Desired output length (>= 1).\n   * @returns {any[]} Aggregated array in the same format as the input.\n   */ static ohlcAggregate(data, targetPoints) {\n        const len = data.length;\n        if (targetPoints >= len || targetPoints < 1) return data;\n        const isXY = !Array.isArray(data[0]);\n        const getX = isXY ? (p2)=>p2.x : (p2)=>p2[0];\n        const getY = isXY ? (p2)=>p2.y : (p2)=>p2[1];\n        const make = isXY ? (x, y)=>({\n                x: x,\n                y: y\n            }) : (x, y)=>[\n                x,\n                y\n            ];\n        const out = [];\n        const bucketSize = len / targetPoints;\n        for(let i2 = 0; i2 < targetPoints; i2++){\n            const start = Math.floor(i2 * bucketSize);\n            const end = i2 === targetPoints - 1 ? len : Math.floor((i2 + 1) * bucketSize);\n            if (end <= start) continue;\n            const firstY = getY(data[start]);\n            const open = firstY[0];\n            let high = firstY[1];\n            let low = firstY[2];\n            let close = firstY[3];\n            for(let j = start + 1; j < end; j++){\n                const y = getY(data[j]);\n                if (y[1] > high) high = y[1];\n                if (y[2] < low) low = y[2];\n                close = y[3];\n            }\n            out.push(make(getX(data[start]), [\n                open,\n                high,\n                low,\n                close\n            ]));\n        }\n        return out;\n    }\n    /**\n   * Bucket-aggregate 2-tuple range data (`y: [low, high]`, rangeArea/rangeBar)\n   * into `targetPoints` points, the range analog of {@link ohlcAggregate}. Each\n   * bucket emits `[min low, max high]` so the band's vertical extent is never\n   * understated by downsampling (LTTB, built for scalar y, would drop these\n   * extremes). Order-agnostic: the min/max scan both tuple slots, so it is\n   * correct whether a point is stored `[low, high]` or `[high, low]`.\n   *\n   * Null bounds (e.g. an indicator's warm-up period) are ignored, not treated\n   * as 0 — `Math.min(null, x)` would coerce to 0 and pin the band to the\n   * baseline. A bucket with no finite bounds emits `[null, null]` so it renders\n   * as a gap, matching the un-downsampled series.\n   * @param {any[]} data\n   * @param {number} targetPoints\n   * @returns {any[]}\n   */ static rangeAggregate(data, targetPoints) {\n        const len = data.length;\n        if (targetPoints >= len || targetPoints < 1) return data;\n        const isXY = !Array.isArray(data[0]);\n        const getX = isXY ? (p2)=>p2.x : (p2)=>p2[0];\n        const getY = isXY ? (p2)=>p2.y : (p2)=>p2[1];\n        const make = isXY ? (x, y)=>({\n                x: x,\n                y: y\n            }) : (x, y)=>[\n                x,\n                y\n            ];\n        const out = [];\n        const bucketSize = len / targetPoints;\n        for(let i2 = 0; i2 < targetPoints; i2++){\n            const start = Math.floor(i2 * bucketSize);\n            const end = i2 === targetPoints - 1 ? len : Math.floor((i2 + 1) * bucketSize);\n            if (end <= start) continue;\n            let low = Infinity;\n            let high = -Infinity;\n            for(let j = start; j < end; j++){\n                const y = getY(data[j]);\n                if (y == null) continue;\n                for(let k = 0; k < 2; k++){\n                    const v2 = y[k];\n                    if (v2 == null || !isFinite(v2)) continue;\n                    if (v2 < low) low = v2;\n                    if (v2 > high) high = v2;\n                }\n            }\n            out.push(make(getX(data[start]), low === Infinity ? [\n                null,\n                null\n            ] : [\n                low,\n                high\n            ]));\n        }\n        return out;\n    }\n    excludeCollapsedSeriesInYAxis() {\n        const w2 = this.w;\n        const yAxisIndexes = [];\n        w2.globals.seriesYAxisMap.forEach((yAxisArr, yi)=>{\n            let collapsedCount = 0;\n            yAxisArr.forEach((seriesIndex)=>{\n                if (w2.globals.collapsedSeriesIndices.indexOf(seriesIndex) !== -1) collapsedCount++;\n            });\n            if (collapsedCount > 0 && collapsedCount == yAxisArr.length) yAxisIndexes.push(yi);\n        });\n        w2.globals.ignoreYAxisIndexes = yAxisIndexes.map((x)=>x);\n    }\n}\nclass $e4b487e979d7c06d$var$UpdateHelpers {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n    }\n    /**\n   * private method to update Options.\n   *\n   * @param {Record<string, any>} options - A new config object can be passed which will be merged with the existing config object\n   * @param {boolean} redraw - should redraw from beginning or should use existing paths and redraw from there\n   * @param {boolean} animate - should animate or not on updating Options\n   * @param {boolean} overwriteInitialConfig - should update the initial config or not\n   */ _updateOptions(options2, redraw = false, animate = true, updateSyncedCharts = true, overwriteInitialConfig = false) {\n        return new Promise((resolve, reject)=>{\n            let charts = [\n                this.ctx\n            ];\n            if (updateSyncedCharts) charts = this.ctx.getSyncedCharts();\n            if (this.w.globals.isExecCalled) {\n                charts = [\n                    this.ctx\n                ];\n                this.w.globals.isExecCalled = false;\n            }\n            charts.forEach((ch, chartIndex)=>{\n                var _a, _b;\n                const w2 = ch.w;\n                w2.globals.shouldAnimate = animate;\n                if (!redraw) {\n                    w2.globals.resized = true;\n                    w2.globals.dataChanged = true;\n                    if (animate && w2.config.chart.animations.enabled) ch.series.getPreviousPaths();\n                }\n                const fromType = w2.config.chart.requestedType || w2.config.chart.type;\n                if (animate && options2 && typeof options2 === \"object\") {\n                    const newType = (_a = options2 == null ? void 0 : options2.chart) == null ? void 0 : _a.type;\n                    if (newType && newType !== fromType) (_b = ch.morphTypeChange) == null || _b.captureBeforeDestroy({\n                        fromType: fromType,\n                        toType: newType,\n                        newSeries: options2.series || w2.config.series\n                    });\n                }\n                if (options2 && typeof options2 === \"object\") {\n                    ch.config = new $e4b487e979d7c06d$var$Config(options2);\n                    const incomingType = options2.chart && options2.chart.type;\n                    const isAliasRequest = incomingType === \"funnel\" || incomingType === \"pyramid\" || incomingType === \"gauge\";\n                    const wasAlias = !!w2.config.chart.requestedType;\n                    if (incomingType && !isAliasRequest && wasAlias) {\n                        options2.chart = options2.chart || {};\n                        options2.chart.requestedType = incomingType;\n                        const prev = w2.config.chart.requestedType;\n                        if (prev === \"funnel\" || prev === \"pyramid\") {\n                            options2.plotOptions = options2.plotOptions || {};\n                            options2.plotOptions.bar = options2.plotOptions.bar || {};\n                            if (options2.plotOptions.bar.isFunnel === void 0) options2.plotOptions.bar.isFunnel = false;\n                            if (options2.plotOptions.bar.isPyramid === void 0) options2.plotOptions.bar.isPyramid = false;\n                        }\n                    }\n                    ch.config.normalizeAliasedChartType(options2);\n                    options2 = $e4b487e979d7c06d$var$CoreUtils.extendArrayProps(ch.config, options2, w2);\n                    if (ch.w.globals.chartID !== this.w.globals.chartID) {\n                        delete options2.series;\n                        delete options2.yaxis;\n                    }\n                    w2.config = $e4b487e979d7c06d$var$Utils$1.extend(w2.config, options2);\n                    $e4b487e979d7c06d$var$Defaults.handOverTypeDefaults(w2.config, fromType, options2);\n                    if (overwriteInitialConfig) {\n                        w2.globals.lastXAxis = options2.xaxis ? $e4b487e979d7c06d$var$Utils$1.clone(options2.xaxis) : [];\n                        w2.globals.lastYAxis = options2.yaxis ? $e4b487e979d7c06d$var$Utils$1.clone(options2.yaxis) : [];\n                        w2.globals.initialConfig = $e4b487e979d7c06d$var$Utils$1.extend({}, w2.config);\n                        w2.globals.initialSeries = w2.config.series;\n                    }\n                    if (options2.series && (w2.globals.collapsedSeriesIndices.length > 0 || w2.globals.ancillaryCollapsedSeriesIndices.length > 0)) ch.series.reconcileCollapsedByName();\n                }\n                return ch.update(options2).then(()=>{\n                    if (chartIndex === charts.length - 1) resolve(ch);\n                }).catch(reject);\n            });\n        });\n    }\n    /**\n   * Private method to update Series.\n   *\n   * @param {any[]} newSeries - New series which will override the existing\n   * @param {boolean} animate\n   */ _updateSeries(newSeries, animate, overwriteInitialSeries = false) {\n        return new Promise((resolve, reject)=>{\n            const w2 = this.w;\n            w2.globals.shouldAnimate = animate;\n            w2.globals.dataChanged = true;\n            const prevAxisScaleSig = JSON.stringify({\n                y: (w2.globals.yAxisScale || []).map((s2)=>s2 ? s2.result : null),\n                xMin: w2.globals.minX,\n                xMax: w2.globals.maxX\n            });\n            $e4b487e979d7c06d$var$PerformanceCache.invalidateSelectors(w2);\n            if (animate && w2.config.chart.animations.enabled) this.ctx.series.getPreviousPaths();\n            const prevSeriesCount = w2.config.series.length;\n            const prevDataLengths = w2.config.series.map((s2)=>{\n                var _a, _b;\n                return (_b = (_a = s2 == null ? void 0 : s2.data) == null ? void 0 : _a.length) != null ? _b : 0;\n            });\n            if (overwriteInitialSeries) {\n                w2.globals.dataReducerRawSeries = null;\n                w2.globals.histogramRawSeries = null;\n                w2.globals.treemapRawSeries = null;\n            }\n            this.ctx.data.resetParsingFlags();\n            const parsedState = this.ctx.data.parseData(newSeries);\n            this.ctx._writeParsedSeriesData(parsedState.seriesData);\n            this.ctx._writeParsedRangeData(parsedState.rangeData);\n            this.ctx._writeParsedCandleData(parsedState.candleData);\n            this.ctx._writeParsedLabelData(parsedState.labelData);\n            this.ctx._writeParsedAxisFlags(parsedState.axisFlags);\n            if (overwriteInitialSeries) {\n                if (w2.globals.initialConfig) w2.globals.initialConfig.series = w2.config.series;\n                w2.globals.initialSeries = w2.config.series;\n            }\n            if (this._canUseFastPath(newSeries, prevSeriesCount, prevDataLengths, w2)) return this.ctx.fastUpdate(animate, prevAxisScaleSig).then(()=>{\n                resolve(this.ctx);\n            }).catch(reject);\n            if (this.ctx._updateStats) this.ctx._updateStats.full++;\n            return this.ctx.update().then(()=>{\n                resolve(this.ctx);\n            }).catch(reject);\n        });\n    }\n    /**\n   * Returns true if the data-only fast path can be used for this update.\n   * Fast path skips rebuilding grid, axes, legend, annotations, and tooltip DOM.\n   *\n   * Requirements:\n   * - Chart has been fully rendered (DOM exists)\n   * - Axis chart (non-axis charts like pie always need full rebuild due to radial layout)\n   * - Series count unchanged (grid column/row counts depend on it)\n   * - Per-series data lengths unchanged (the fast path preserves the axis DOM,\n   *   and a changed point count re-slots categories/ticks: with explicit\n   *   categories the axis-scale signature can still match, leaving a stale\n   *   ruler under the re-slotted marks; length changes also want the full\n   *   render so enter/exit and axis transitions run)\n   * - No series currently collapsing (collapsed series changes visible data range)\n   * - Not a combo chart (combo charts mix types and need coordinated axis recalc)\n   * - Not currently zoomed (zoomed charts have altered x-labels that need recalculation)\n   * @param {any[]} newSeries\n   * @param {number} prevSeriesCount\n   * @param {number[]} prevDataLengths\n   * @param {import('../../types/internal').ChartStateW} w\n   */ _canUseFastPath(newSeries, prevSeriesCount, prevDataLengths, w2) {\n        if (!w2.dom.elGraphical) return false;\n        if (!w2.globals.axisCharts) return false;\n        if (newSeries.length !== prevSeriesCount) return false;\n        if (newSeries.some((s2, i2)=>{\n            var _a, _b;\n            return ((_b = (_a = s2 == null ? void 0 : s2.data) == null ? void 0 : _a.length) != null ? _b : 0) !== prevDataLengths[i2];\n        })) return false;\n        if (w2.globals.collapsedSeries.length > 0) return false;\n        if (w2.globals.ancillaryCollapsedSeries.length > 0) return false;\n        if (w2.globals.risingSeries.length > 0) return false;\n        if (w2.globals.comboCharts) return false;\n        if (w2.interact.zoomed) return false;\n        return true;\n    }\n    /**\n   * @param {any} s\n   * @param {number} i\n   */ _extendSeries(s2, i2) {\n        const w2 = this.w;\n        const ser = w2.config.series[i2];\n        return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, /** @type {Record<string,any>} */ w2.config.series[i2]), {\n            name: s2.name ? s2.name : /** @type {any} */ ser == null ? void 0 : ser.name,\n            color: s2.color ? s2.color : /** @type {any} */ ser == null ? void 0 : ser.color,\n            type: s2.type ? s2.type : /** @type {any} */ ser == null ? void 0 : ser.type,\n            group: s2.group ? s2.group : /** @type {any} */ ser == null ? void 0 : ser.group,\n            hidden: typeof s2.hidden !== \"undefined\" ? s2.hidden : /** @type {any} */ ser == null ? void 0 : ser.hidden,\n            data: s2.data ? s2.data : /** @type {any} */ ser == null ? void 0 : ser.data,\n            zIndex: typeof s2.zIndex !== \"undefined\" ? s2.zIndex : i2\n        });\n    }\n    /**\n   * @param {number} seriesIndex\n   * @param {number} dataPointIndex\n   */ toggleDataPointSelection(seriesIndex, dataPointIndex) {\n        const w2 = this.w;\n        let elPath = null;\n        const parent = `.apexcharts-series[data\\\\:realIndex='${seriesIndex}']`;\n        if (w2.globals.axisCharts) elPath = w2.dom.Paper.findOne(`${parent} path[j='${dataPointIndex}'], ${parent} circle[j='${dataPointIndex}'], ${parent} rect[j='${dataPointIndex}']`);\n        else if (typeof dataPointIndex === \"undefined\") {\n            elPath = w2.dom.Paper.findOne(`${parent} path[j='${seriesIndex}']`);\n            if (w2.config.chart.type === \"pie\" || w2.config.chart.type === \"polarArea\" || w2.config.chart.type === \"donut\") this.ctx.pie.pieClicked(seriesIndex);\n        }\n        if (elPath) {\n            const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n            graphics.pathMouseDown(elPath, /** @type {any} */ null);\n        } else {\n            console.warn(\"toggleDataPointSelection: Element not found\");\n            return null;\n        }\n        return elPath.node ? elPath.node : null;\n    }\n    /**\n   * @param {Record<string, any>} options\n   */ forceXAxisUpdate(options2) {\n        const w2 = this.w;\n        const minmax = [\n            \"min\",\n            \"max\"\n        ];\n        minmax.forEach((a2)=>{\n            if (typeof options2.xaxis[a2] !== \"undefined\") {\n                w2.config.xaxis[a2] = options2.xaxis[a2];\n                w2.globals.lastXAxis[a2] = options2.xaxis[a2];\n            }\n        });\n        if (options2.xaxis.categories && options2.xaxis.categories.length) w2.config.xaxis.categories = options2.xaxis.categories;\n        if (w2.config.xaxis.convertedCatToNumeric) {\n            const defaults = new $e4b487e979d7c06d$var$Defaults(options2);\n            options2 = defaults.convertCatToNumericXaxis(options2, this.ctx);\n        }\n        return options2;\n    }\n    /**\n   * @param {Record<string, any>} options\n   */ forceYAxisUpdate(options2) {\n        if (options2.chart && options2.chart.stacked && options2.chart.stackType === \"100%\") {\n            if (Array.isArray(options2.yaxis)) options2.yaxis.forEach((yaxe, index)=>{\n                options2.yaxis[index].min = 0;\n                options2.yaxis[index].max = 100;\n            });\n            else {\n                options2.yaxis.min = 0;\n                options2.yaxis.max = 100;\n            }\n        }\n        return options2;\n    }\n    /**\n   * This function reverts the yaxis and xaxis min/max values to what it was when the chart was defined.\n   * This function fixes an important bug where a user might load a new series after zooming in/out of previous series which resulted in wrong min/max\n   * Also, this should never be called internally on zoom/pan - the reset should only happen when user calls the updateSeries() function externally\n   * The function also accepts an object {xaxis, yaxis} which when present is set as the new xaxis/yaxis\n   * @param {Record<string, any>} opts\n   */ revertDefaultAxisMinMax(opts) {\n        const w2 = this.w;\n        let xaxis = w2.globals.lastXAxis;\n        let yaxis = w2.globals.lastYAxis;\n        if (opts && opts.xaxis) xaxis = opts.xaxis;\n        if (opts && opts.yaxis) yaxis = opts.yaxis;\n        const _xaxis = /** @type {any} */ xaxis;\n        w2.config.xaxis.min = _xaxis.min;\n        w2.config.xaxis.max = _xaxis.max;\n        const getLastYAxis = (index)=>{\n            if (typeof yaxis[index] !== \"undefined\") {\n                const _y = /** @type {any} */ yaxis[index];\n                w2.config.yaxis[index].min = _y.min;\n                w2.config.yaxis[index].max = _y.max;\n            }\n        };\n        w2.config.yaxis.map((yaxe, index)=>{\n            if (w2.interact.zoomed) getLastYAxis(index);\n            else {\n                if (typeof yaxis[index] !== \"undefined\") getLastYAxis(index);\n                else if (typeof this.ctx.opts.yaxis[index] !== \"undefined\") {\n                    yaxe.min = this.ctx.opts.yaxis[index].min;\n                    yaxe.max = this.ctx.opts.yaxis[index].max;\n                }\n            }\n        });\n    }\n}\nclass $e4b487e979d7c06d$var$AxisMapping {\n    /**\n   * Pixels per data-unit on the x-axis. Derived from `minX..maxX` so it is the\n   * exact inverse used by both {@link dataXToPx} and {@link pxToDataX}.\n   * @param {import('../types/internal').ChartStateW} w\n   * @returns {number}\n   */ static xRatio(w2) {\n        const gw = w2.layout.gridWidth || 1;\n        return (w2.globals.maxX - w2.globals.minX) / gw;\n    }\n    /**\n   * Data-x -> pixels from the plot origin (usable as an SVG `x` attribute).\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {number} dataX\n   * @returns {number}\n   */ static dataXToPx(w2, dataX) {\n        return (dataX - w2.globals.minX) / $e4b487e979d7c06d$var$AxisMapping.xRatio(w2);\n    }\n    /**\n   * Pixels from the plot origin -> data-x. Feed it `screenX - svgLeft - translateX`.\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {number} px\n   * @returns {number}\n   */ static pxToDataX(w2, px) {\n        return w2.globals.minX + px * $e4b487e979d7c06d$var$AxisMapping.xRatio(w2);\n    }\n    /**\n   * Client (screen) x -> pixels from the plot origin. The origin is the svg\n   * element's left edge plus `translateX`, never the `.apexcharts-grid` box\n   * (fact 2 above), so the result does not depend on what the grid happens to\n   * render. `svgWidth` is the unscaled width the svg was drawn at, so the ratio\n   * against the measured one is the CSS zoom of any container the chart sits in.\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {number} screenX\n   * @returns {number}\n   */ static screenXToPlotPx(w2, screenX) {\n        const baseEl = w2.dom.baseEl;\n        const svg = baseEl && baseEl.querySelector(\".apexcharts-svg\");\n        if (!svg) return screenX - w2.layout.translateX;\n        const svgRect = svg.getBoundingClientRect();\n        const zoom = w2.globals.svgWidth ? svgRect.width / w2.globals.svgWidth : 1;\n        return (screenX - svgRect.left) / (zoom || 1) - w2.layout.translateX;\n    }\n}\nclass $e4b487e979d7c06d$var$Utils2 {\n    /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */ constructor(tooltipContext){\n        this.w = tooltipContext.w;\n        this.ttCtx = tooltipContext;\n    }\n    /**\n   ** When hovering over series, you need to capture which series is being hovered on.\n   ** This function will return both capturedseries index as well as inner index of that series\n   * @memberof Utils\n   * @param {{ hoverArea: any, elGrid: any, clientX: any, clientY: any, context?: any }} opts\n   */ getNearestValues({ hoverArea: hoverArea, elGrid: elGrid, clientX: clientX, clientY: clientY }) {\n        var _a, _b;\n        const w2 = this.w;\n        const seriesBound = elGrid.getBoundingClientRect();\n        const hoverWidth = w2.layout.gridWidth;\n        const hoverHeight = seriesBound.height;\n        let xDivisor = hoverWidth / (w2.globals.dataPoints - 1);\n        const yDivisor = hoverHeight / w2.globals.dataPoints;\n        const hasBars = this.hasBars();\n        if ((w2.globals.comboCharts || hasBars) && !w2.config.xaxis.convertedCatToNumeric) xDivisor = hoverWidth / w2.globals.dataPoints;\n        const hoverX = $e4b487e979d7c06d$var$AxisMapping.screenXToPlotPx(w2, clientX);\n        const hoverY = clientY - seriesBound.top;\n        const edgePad = w2.globals.barPadForNumericAxis || 0;\n        const notInRect = hoverX < -edgePad || hoverY < 0 || hoverX > hoverWidth + edgePad || hoverY > hoverHeight;\n        if (notInRect) {\n            hoverArea.classList.remove(\"hovering-zoom\");\n            hoverArea.classList.remove(\"hovering-pan\");\n        } else {\n            if (w2.interact.zoomEnabled) {\n                hoverArea.classList.remove(\"hovering-pan\");\n                hoverArea.classList.add(\"hovering-zoom\");\n            } else if (w2.interact.panEnabled) {\n                hoverArea.classList.remove(\"hovering-zoom\");\n                hoverArea.classList.add(\"hovering-pan\");\n            }\n        }\n        let j = Math.round(hoverX / xDivisor);\n        const jHorz = Math.floor(hoverY / yDivisor);\n        if (hasBars && !w2.config.xaxis.convertedCatToNumeric) {\n            j = Math.ceil(hoverX / xDivisor);\n            j = j - 1;\n        }\n        let capturedSeries = null;\n        let closest = null;\n        let seriesXValArr = w2.globals.seriesXvalues.map((seriesXVal)=>{\n            return seriesXVal.filter((s2)=>$e4b487e979d7c06d$var$Utils$1.isNumber(s2));\n        });\n        const seriesYValArr = w2.globals.seriesYvalues.map((seriesYVal)=>{\n            return seriesYVal.filter((s2)=>$e4b487e979d7c06d$var$Utils$1.isNumber(s2));\n        });\n        if (w2.axisFlags.isXNumeric) {\n            closest = this.closestInMultiArray(hoverX, hoverY, seriesXValArr, seriesYValArr);\n            capturedSeries = closest.index;\n            j = (_a = closest.j) != null ? _a : 0;\n            if (capturedSeries !== null && w2.globals.hasNullValues) {\n                seriesXValArr = w2.globals.seriesXvalues[capturedSeries];\n                closest = this.closestInArray(hoverX, seriesXValArr);\n                j = (_b = closest.j) != null ? _b : 0;\n            }\n        }\n        w2.interact.capturedSeriesIndex = capturedSeries === null ? -1 : capturedSeries;\n        if (!j || j < 1) j = 0;\n        if (w2.globals.isBarHorizontal) w2.interact.capturedDataPointIndex = jHorz;\n        else w2.interact.capturedDataPointIndex = j;\n        return {\n            capturedSeries: capturedSeries,\n            j: w2.globals.isBarHorizontal ? jHorz : j,\n            hoverX: hoverX,\n            hoverY: hoverY\n        };\n    }\n    /**\n   * @param {any[]} Xarrays\n   */ getFirstActiveXArray(Xarrays) {\n        const w2 = this.w;\n        let activeIndex = 0;\n        const firstActiveSeriesIndex = Xarrays.map((xarr, index)=>{\n            return xarr.length > 0 ? index : -1;\n        });\n        for(let a2 = 0; a2 < firstActiveSeriesIndex.length; a2++)if (firstActiveSeriesIndex[a2] !== -1 && w2.globals.collapsedSeriesIndices.indexOf(a2) === -1 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(a2) === -1) {\n            activeIndex = firstActiveSeriesIndex[a2];\n            break;\n        }\n        return activeIndex;\n    }\n    /**\n   * @param {number} hoverX\n   * @param {number} hoverY\n   * @param {any[]} Xarrays\n   * @param {any[]} Yarrays\n   */ closestInMultiArray(hoverX, hoverY, Xarrays, Yarrays) {\n        const w2 = this.w;\n        const isActiveSeries = (seriesIndex)=>{\n            return w2.globals.collapsedSeriesIndices.indexOf(seriesIndex) === -1 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(seriesIndex) === -1;\n        };\n        const chartType = w2.config.chart.type;\n        const isLineArea = !w2.globals.comboCharts && (chartType === \"line\" || chartType === \"area\");\n        let closestDist = Infinity;\n        let closestSeriesIndex = null;\n        let closestPointIndex = null;\n        if (w2.globals.allSeriesHasEqualX) {\n            let bucketDistX = Infinity;\n            for(let i2 = 0; i2 < Xarrays.length; i2++){\n                if (!isActiveSeries(i2)) continue;\n                const xArr = Xarrays[i2];\n                const yArr = Yarrays[i2];\n                const len = Math.min(xArr.length, yArr.length);\n                for(let j = 0; j < len; j++){\n                    const distX = Math.abs(hoverX - xArr[j]);\n                    if (distX < bucketDistX) {\n                        bucketDistX = distX;\n                        closestPointIndex = j;\n                    }\n                }\n            }\n            if (closestPointIndex !== null) {\n                if (isLineArea) {\n                    let bestSegDist = Infinity;\n                    for(let i2 = 0; i2 < Xarrays.length; i2++){\n                        if (!isActiveSeries(i2)) continue;\n                        const xArr = Xarrays[i2];\n                        const yArr = Yarrays[i2];\n                        const len = Math.min(xArr.length, yArr.length);\n                        if (len < 2) {\n                            const yVal = yArr[closestPointIndex];\n                            if (typeof yVal !== \"number\") continue;\n                            const d = Math.abs(hoverY - yVal);\n                            if (d < bestSegDist) {\n                                bestSegDist = d;\n                                closestSeriesIndex = i2;\n                            }\n                            continue;\n                        }\n                        for(let j = 0; j < len - 1; j++){\n                            const seg = this._distanceToSegment(hoverX, hoverY, xArr[j], yArr[j], xArr[j + 1], yArr[j + 1]);\n                            if (seg.dist < bestSegDist) {\n                                bestSegDist = seg.dist;\n                                closestSeriesIndex = i2;\n                            }\n                        }\n                    }\n                } else {\n                    let bestY = Infinity;\n                    for(let i2 = 0; i2 < Xarrays.length; i2++){\n                        if (!isActiveSeries(i2)) continue;\n                        const yVal = Yarrays[i2][closestPointIndex];\n                        if (typeof yVal !== \"number\") continue;\n                        const distY = Math.abs(hoverY - yVal);\n                        if (distY < bestY) {\n                            bestY = distY;\n                            closestSeriesIndex = i2;\n                        }\n                    }\n                }\n            }\n            return {\n                index: closestSeriesIndex,\n                j: closestPointIndex\n            };\n        }\n        for(let i2 = 0; i2 < Xarrays.length; i2++){\n            if (!isActiveSeries(i2)) continue;\n            const xArr = Xarrays[i2];\n            const yArr = Yarrays[i2];\n            const len = Math.min(xArr.length, yArr.length);\n            if (isLineArea && len >= 2) {\n                for(let j = 0; j < len - 1; j++){\n                    const seg = this._distanceToSegment(hoverX, hoverY, xArr[j], yArr[j], xArr[j + 1], yArr[j + 1]);\n                    if (seg.dist < closestDist) {\n                        closestDist = seg.dist;\n                        closestSeriesIndex = i2;\n                        closestPointIndex = seg.t < 0.5 ? j : j + 1;\n                    }\n                }\n                continue;\n            }\n            for(let j = 0; j < len; j++){\n                const xVal = xArr[j];\n                const distX = hoverX - xVal;\n                const yVal = yArr[j];\n                const distY = hoverY - yVal;\n                const dist = Math.sqrt(distX * distX + distY * distY);\n                if (dist < closestDist) {\n                    closestDist = dist;\n                    closestSeriesIndex = i2;\n                    closestPointIndex = j;\n                }\n            }\n        }\n        return {\n            index: closestSeriesIndex,\n            j: closestPointIndex\n        };\n    }\n    /**\n   * Perpendicular distance from point (px, py) to the line segment\n   * (ax, ay) → (bx, by). Returns the distance plus the projection\n   * parameter t (0 = at A, 1 = at B, clamped) so callers know which\n   * endpoint the projection landed nearest.\n   * @param {number} px\n   * @param {number} py\n   * @param {number} ax\n   * @param {number} ay\n   * @param {number} bx\n   * @param {number} by\n   * @returns {{ dist: number, t: number }}\n   */ _distanceToSegment(px, py, ax, ay, bx, by) {\n        const dx = bx - ax;\n        const dy = by - ay;\n        const lenSq = dx * dx + dy * dy;\n        let t2 = lenSq === 0 ? 0 : ((px - ax) * dx + (py - ay) * dy) / lenSq;\n        if (t2 < 0) t2 = 0;\n        else if (t2 > 1) t2 = 1;\n        const cx = ax + t2 * dx;\n        const cy = ay + t2 * dy;\n        const ex = px - cx;\n        const ey = py - cy;\n        return {\n            dist: Math.sqrt(ex * ex + ey * ey),\n            t: t2\n        };\n    }\n    /**\n   * @param {number} val\n   * @param {any[]} arr\n   */ closestInArray(val, arr) {\n        const curr = arr[0];\n        let currIndex = null;\n        let diff = Math.abs(val - curr);\n        for(let i2 = 0; i2 < arr.length; i2++){\n            const newdiff = Math.abs(val - arr[i2]);\n            if (newdiff < diff) {\n                diff = newdiff;\n                currIndex = i2;\n            }\n        }\n        return {\n            j: currIndex\n        };\n    }\n    /**\n   * When there are multiple series, it is possible to have different x values for each series.\n   * But it may be possible in those multiple series, that there is same x value for 2 or more\n   * series.\n   * @memberof Utils\n   * @param {number} j - the inner index of series (series[i][j])\n   * @return {boolean}\n   */ isXoverlap(j) {\n        const w2 = this.w;\n        const xSameForAllSeriesJArr = [];\n        const seriesX = w2.seriesData.seriesX.filter((s2)=>typeof s2[0] !== \"undefined\");\n        if (seriesX.length > 0) for(let i2 = 0; i2 < seriesX.length - 1; i2++){\n            if (typeof seriesX[i2][j] !== \"undefined\" && typeof seriesX[i2 + 1][j] !== \"undefined\") {\n                if (seriesX[i2][j] !== seriesX[i2 + 1][j]) xSameForAllSeriesJArr.push(\"unEqual\");\n            }\n        }\n        if (xSameForAllSeriesJArr.length === 0) return true;\n        return false;\n    }\n    isInitialSeriesSameLen() {\n        var _a, _b, _c, _d;\n        let sameLen = true;\n        const initialSeries = /** @type {any[]} */ ((_b = (_a = this.w.globals._initialSeriesPeek) != null ? _a : this.w.globals.initialSeries) == null ? void 0 : _b.filter(/**\n         * @param {Record<string, any>} s\n         * @param {number} i\n         */ (s2, i2)=>{\n            var _a2;\n            return !((_a2 = this.w.globals.collapsedSeriesIndices) == null ? void 0 : _a2.includes(i2));\n        })) || [];\n        for(let i2 = 0; i2 < initialSeries.length - 1; i2++){\n            if (!((_c = initialSeries[i2]) == null ? void 0 : _c.data) || !((_d = initialSeries[i2 + 1]) == null ? void 0 : _d.data)) return true;\n            if (initialSeries[i2].data.length !== initialSeries[i2 + 1].data.length) {\n                sameLen = false;\n                break;\n            }\n        }\n        return sameLen;\n    }\n    /**\n   * @param {any[]} allbars\n   */ getBarsHeight(allbars) {\n        const bars = [\n            ...allbars\n        ];\n        const totalHeight = bars.reduce((acc, bar)=>acc + bar.getBBox().height, 0);\n        return totalHeight;\n    }\n    /**\n   * @param {number} capturedSeries\n   */ getElMarkers(capturedSeries) {\n        if (typeof capturedSeries == \"number\") return this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\\\:realIndex='${capturedSeries}'] .apexcharts-series-markers-wrap > *`);\n        return this.w.dom.baseEl.querySelectorAll(\".apexcharts-series-markers-wrap > *\");\n    }\n    getAllMarkers(filterCollapsed = false) {\n        let markersWraps = /** @type {any[]} */ [\n            ...this.w.dom.baseEl.querySelectorAll(\".apexcharts-series-markers-wrap\")\n        ];\n        if (filterCollapsed) markersWraps = markersWraps.filter((m2)=>{\n            const realIndex = Number(m2.getAttribute(\"data:realIndex\"));\n            return this.w.globals.collapsedSeriesIndices.indexOf(realIndex) === -1;\n        });\n        markersWraps.sort((a2, b2)=>{\n            var indexA = Number(a2.getAttribute(\"data:realIndex\"));\n            var indexB = Number(b2.getAttribute(\"data:realIndex\"));\n            return indexB < indexA ? 1 : indexB > indexA ? -1 : 0;\n        });\n        const markers = [];\n        markersWraps.forEach((m2)=>{\n            markers.push(m2.querySelector(\".apexcharts-marker\"));\n        });\n        return markers;\n    }\n    /**\n   * @param {number} capturedSeries\n   */ hasMarkers(capturedSeries) {\n        const markers = this.getElMarkers(capturedSeries);\n        return markers.length > 0;\n    }\n    /**\n   * @param {any} point\n   * @param {number} size\n   */ getPathFromPoint(point, size) {\n        const cx = Number(point.getAttribute(\"cx\"));\n        const cy = Number(point.getAttribute(\"cy\"));\n        const shape = point.getAttribute(\"shape\");\n        return new $e4b487e979d7c06d$var$Graphics(this.w).getMarkerPath(cx, cy, shape, size);\n    }\n    getElBars() {\n        return this.w.dom.baseEl.querySelectorAll(\".apexcharts-bar-series,  .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series\");\n    }\n    hasBars() {\n        const bars = this.getElBars();\n        return bars.length > 0;\n    }\n    /**\n   * @param {number} index\n   */ getHoverMarkerSize(index) {\n        const w2 = this.w;\n        let hoverSize = w2.config.markers.hover.size;\n        if (hoverSize === void 0) hoverSize = w2.globals.markers.size[index] + w2.config.markers.hover.sizeOffset;\n        return hoverSize;\n    }\n    /**\n   * @param {string} state\n   */ toggleAllTooltipSeriesGroups(state) {\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        if (ttCtx.allTooltipSeriesGroups.length === 0) ttCtx.allTooltipSeriesGroups = w2.dom.baseEl.querySelectorAll(\".apexcharts-tooltip-series-group\");\n        const allTooltipSeriesGroups = ttCtx.allTooltipSeriesGroups;\n        for(let i2 = 0; i2 < allTooltipSeriesGroups.length; i2++)if (state === \"enable\") {\n            allTooltipSeriesGroups[i2].classList.add(\"apexcharts-active\");\n            allTooltipSeriesGroups[i2].style.display = w2.config.tooltip.items.display;\n        } else {\n            allTooltipSeriesGroups[i2].classList.remove(\"apexcharts-active\");\n            allTooltipSeriesGroups[i2].style.display = \"none\";\n        }\n    }\n}\nclass $e4b487e979d7c06d$var$Labels {\n    /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */ constructor(tooltipContext){\n        this.w = tooltipContext.w;\n        this.ttCtx = tooltipContext;\n        this.tooltipUtil = new $e4b487e979d7c06d$var$Utils2(tooltipContext);\n    }\n    /** @param {{ shared?: boolean, ttItems?: any, i?: number, j?: any, y1?: any, y2?: any, e?: any }} opts */ drawSeriesTexts({ shared: shared = true, ttItems: ttItems, i: i2 = 0, j: j = null, y1: y1, y2: y2, e: e2 }) {\n        const w2 = this.w;\n        if (w2.config.tooltip.custom !== void 0) this.handleCustomTooltip({\n            i: i2,\n            j: j,\n            y1: y1,\n            y2: y2,\n            w: w2\n        });\n        else this.toggleActiveInactiveSeries(shared, i2);\n        const values = this.getValuesToPrint({\n            i: i2,\n            j: j\n        });\n        this.printLabels({\n            i: i2,\n            j: j,\n            values: values,\n            ttItems: ttItems,\n            shared: shared,\n            e: e2\n        });\n        const tooltipEl = this.ttCtx.getElTooltip();\n        if (tooltipEl) {\n            this.ttCtx.tooltipRect.ttWidth = tooltipEl.getBoundingClientRect().width;\n            this.ttCtx.tooltipRect.ttHeight = tooltipEl.getBoundingClientRect().height;\n        }\n    }\n    /** @param {{i: any, j: any, values: any, ttItems: any, shared: any, e: any}} opts */ printLabels({ i: i2, j: j, values: values, ttItems: ttItems, shared: shared, e: e2 }) {\n        const w2 = this.w;\n        const { xVal: xVal, zVal: zVal, xAxisTTVal: xAxisTTVal } = values;\n        const seriesLen = w2.seriesData.series.length;\n        const basePColor = j !== null && w2.config.plotOptions.bar.distributed ? w2.globals.colors[j] : w2.globals.colors[i2];\n        for(let t2 = 0; t2 < seriesLen; t2++){\n            const tIndex = w2.config.tooltip.inverseOrder ? seriesLen - 1 - t2 : t2;\n            const row = this.computeSeriesRow({\n                i: i2,\n                j: j,\n                t: t2,\n                tIndex: tIndex,\n                shared: shared,\n                e: e2,\n                basePColor: basePColor\n            });\n            this.DOMHandling({\n                i: i2,\n                t: tIndex,\n                j: j,\n                ttItems: ttItems,\n                values: {\n                    val: row.val,\n                    goalVals: row.goalVals,\n                    xVal: xVal,\n                    xAxisTTVal: xAxisTTVal,\n                    zVal: zVal\n                },\n                seriesName: row.seriesName,\n                shared: shared,\n                pColor: row.pColor\n            });\n        }\n    }\n    /**\n   * Compute the per-series row values (seriesName, val, goalVals, pColor)\n   * for one iteration of the tooltip's series loop. Extracted from\n   * printLabels() to keep the outer loop scannable.\n   * @param {{i: number, j: any, t: number, tIndex: number, shared: boolean, e: any, basePColor: string}} opts\n   */ computeSeriesRow({ i: i2, j: j, tIndex: tIndex, shared: shared, e: e2, basePColor: basePColor }) {\n        const w2 = this.w;\n        let f = this.getFormatters(i2);\n        let pColor = basePColor;\n        let val;\n        let goalVals = /** @type {any[]} */ [];\n        let seriesName = w2.config.chart.type === \"treemap\" ? f.yLbTitleFormatter(String(/** @type {any} */ w2.config.series[i2].data[j].x), {\n            series: w2.seriesData.series,\n            seriesIndex: i2,\n            dataPointIndex: j,\n            w: w2\n        }) : this.getSeriesName({\n            fn: f.yLbTitleFormatter,\n            index: i2,\n            seriesIndex: i2,\n            j: j\n        });\n        if (w2.globals.axisCharts) {\n            if (shared) {\n                f = this.getFormatters(tIndex);\n                seriesName = this.getSeriesName({\n                    fn: f.yLbTitleFormatter,\n                    index: tIndex,\n                    seriesIndex: i2,\n                    j: j\n                });\n                pColor = w2.globals.colors[tIndex];\n                val = this.formatYValue(f, tIndex, j);\n                goalVals = this.formatGoalVals(f, tIndex, j);\n            } else {\n                pColor = this.resolvePatternColor(e2, pColor);\n                val = this.formatYValue(f, i2, j);\n                goalVals = this.formatGoalVals(f, i2, j);\n            }\n        }\n        if (j === null) val = f.yLbFormatter(w2.seriesData.series[i2], $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, w2), {\n            seriesIndex: i2,\n            dataPointIndex: i2\n        }));\n        return {\n            seriesName: seriesName,\n            val: val,\n            goalVals: goalVals,\n            pColor: pColor\n        };\n    }\n    /**\n   * Run the y-value formatter for a given (seriesIndex, dataPointIndex),\n   * handling the range-data case (start - end concatenation).\n   * @param {{yLbFormatter: Function}} f\n   * @param {number} index\n   * @param {any} j\n   */ formatYValue(f, index, j) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        if (w2.axisFlags.isRangeData) return f.yLbFormatter((_b = (_a = w2.rangeData.seriesRangeStart) == null ? void 0 : _a[index]) == null ? void 0 : _b[j], {\n            series: w2.rangeData.seriesRangeStart,\n            seriesIndex: index,\n            dataPointIndex: j,\n            w: w2\n        }) + \" - \" + f.yLbFormatter((_d = (_c = w2.rangeData.seriesRangeEnd) == null ? void 0 : _c[index]) == null ? void 0 : _d[j], {\n            series: w2.rangeData.seriesRangeEnd,\n            seriesIndex: index,\n            dataPointIndex: j,\n            w: w2\n        });\n        return f.yLbFormatter(w2.seriesData.series[index][j], {\n            series: w2.seriesData.series,\n            seriesIndex: index,\n            dataPointIndex: j,\n            w: w2\n        });\n    }\n    /**\n   * Format the goal-line values attached to a given (seriesIndex, dataPointIndex).\n   * Returns an empty array when no goals exist.\n   * @param {{yLbFormatter: Function}} f\n   * @param {number} index\n   * @param {any} j\n   */ formatGoalVals(f, index, j) {\n        var _a;\n        const w2 = this.w;\n        const goals = (_a = w2.seriesData.seriesGoals[index]) == null ? void 0 : _a[j];\n        if (!Array.isArray(goals)) return [];\n        return goals.map((goal)=>({\n                attrs: goal,\n                val: f.yLbFormatter(goal.value, {\n                    seriesIndex: index,\n                    dataPointIndex: j,\n                    w: w2\n                })\n            }));\n    }\n    /**\n   * When the hovered element has a pattern fill (url(#…Pattern…)), reach\n   * into the pattern's first child to pull a stroke color. Otherwise\n   * return the raw fill attribute or the fallback.\n   * @param {any} e\n   * @param {string} fallback\n   */ resolvePatternColor(e2, fallback) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        const targetFill = (_a = e2 == null ? void 0 : e2.target) == null ? void 0 : _a.getAttribute(\"fill\");\n        if (!targetFill) return fallback;\n        if (targetFill.indexOf(\"url\") === -1) return targetFill;\n        if (targetFill.indexOf(\"Pattern\") === -1) return fallback;\n        const patternEl = w2.dom.baseEl.querySelector(targetFill.substr(4).slice(0, -1));\n        return (_c = (_b = patternEl == null ? void 0 : patternEl.childNodes[0]) == null ? void 0 : _b.getAttribute(\"stroke\")) != null ? _c : fallback;\n    }\n    /**\n   * @param {number} i\n   */ getFormatters(i2) {\n        const w2 = this.w;\n        let yLbFormatter = w2.formatters.yLabelFormatters[i2];\n        let yLbTitleFormatter;\n        if (w2.formatters.ttVal !== void 0) {\n            if (Array.isArray(w2.formatters.ttVal)) {\n                yLbFormatter = /** @type {any} */ w2.formatters.ttVal[i2] && /** @type {any} */ w2.formatters.ttVal[i2].formatter;\n                yLbTitleFormatter = /** @type {any} */ w2.formatters.ttVal[i2] && /** @type {any} */ w2.formatters.ttVal[i2].title && /** @type {any} */ w2.formatters.ttVal[i2].title.formatter;\n            } else {\n                yLbFormatter = /** @type {any} */ w2.formatters.ttVal.formatter;\n                if (typeof /** @type {any} */ w2.formatters.ttVal.title.formatter === \"function\") yLbTitleFormatter = /** @type {any} */ w2.formatters.ttVal.title.formatter;\n            }\n        } else yLbTitleFormatter = w2.config.tooltip.y.title.formatter;\n        if (typeof yLbFormatter !== \"function\") {\n            if (w2.formatters.yLabelFormatters[0]) yLbFormatter = w2.formatters.yLabelFormatters[0];\n            else yLbFormatter = function(label) {\n                return label;\n            };\n        }\n        if (typeof yLbTitleFormatter !== \"function\") yLbTitleFormatter = function(label) {\n            return label ? label + \": \" : \"\";\n        };\n        return {\n            yLbFormatter: yLbFormatter,\n            yLbTitleFormatter: yLbTitleFormatter\n        };\n    }\n    /** @param {{fn: any, index: any, seriesIndex: any, j: any}} opts */ getSeriesName({ fn: fn, index: index, seriesIndex: seriesIndex, j: j }) {\n        const w2 = this.w;\n        return fn(String(w2.seriesData.seriesNames[index]), {\n            series: w2.seriesData.series,\n            seriesIndex: seriesIndex,\n            dataPointIndex: j,\n            w: w2\n        });\n    }\n    /** @param {{ t?: any, j?: any, i?: any, ttItems?: any, values?: any, seriesName?: any, shared?: any, pColor?: any }} opts */ DOMHandling({ t: t2, j: j, ttItems: ttItems, values: values, seriesName: seriesName, shared: shared, pColor: pColor }) {\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        const { val: val, goalVals: goalVals, xVal: xVal, xAxisTTVal: xAxisTTVal, zVal: zVal } = values;\n        if (!ttItems || !ttItems[t2]) return;\n        let ttItemsChildren = null;\n        ttItemsChildren = ttItems[t2].children;\n        if (w2.config.tooltip.fillSeriesColor) {\n            ttItems[t2].style.backgroundColor = pColor;\n            ttItemsChildren[0].style.display = \"none\";\n        }\n        if (ttCtx.showTooltipTitle) {\n            if (ttCtx.tooltipTitle === null) ttCtx.tooltipTitle = w2.dom.baseEl.querySelector(\".apexcharts-tooltip-title\");\n            if (ttCtx.tooltipTitle) ttCtx.tooltipTitle.innerHTML = xVal;\n        }\n        if (ttCtx.isXAxisTooltipEnabled) {\n            if (ttCtx.xaxisTooltipText) ttCtx.xaxisTooltipText.innerHTML = xAxisTTVal !== \"\" ? xAxisTTVal : xVal;\n        }\n        const ttYLabel = ttItems[t2].querySelector(\".apexcharts-tooltip-text-y-label\");\n        if (ttYLabel) ttYLabel.innerHTML = seriesName ? seriesName : \"\";\n        const ttYVal = ttItems[t2].querySelector(\".apexcharts-tooltip-text-y-value\");\n        if (ttYVal) ttYVal.innerHTML = typeof val !== \"undefined\" ? val : \"\";\n        if (ttItemsChildren[0] && ttItemsChildren[0].classList.contains(\"apexcharts-tooltip-marker\")) {\n            if (w2.config.tooltip.marker.fillColors && Array.isArray(w2.config.tooltip.marker.fillColors)) pColor = w2.config.tooltip.marker.fillColors[t2];\n            if (w2.config.tooltip.fillSeriesColor) ttItemsChildren[0].style.backgroundColor = pColor;\n            else ttItemsChildren[0].style.color = pColor;\n        }\n        if (!w2.config.tooltip.marker.show) ttItemsChildren[0].style.display = \"none\";\n        const ttGLabel = ttItems[t2].querySelector(\".apexcharts-tooltip-text-goals-label\");\n        const ttGVal = ttItems[t2].querySelector(\".apexcharts-tooltip-text-goals-value\");\n        if (goalVals.length && w2.seriesData.seriesGoals[t2]) {\n            const createGoalsHtml = ()=>{\n                let gLabels = \"<div>\";\n                let gVals = \"<div>\";\n                goalVals.forEach((goal)=>{\n                    gLabels += ` <div style=\"display: flex\"><span class=\"apexcharts-tooltip-marker\" style=\"background-color: ${goal.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;\"></span> ${goal.attrs.name}</div>`;\n                    gVals += `<div>${goal.val}</div>`;\n                });\n                ttGLabel.innerHTML = gLabels + `</div>`;\n                ttGVal.innerHTML = gVals + `</div>`;\n            };\n            if (shared) {\n                if (w2.seriesData.seriesGoals[t2][j] && Array.isArray(w2.seriesData.seriesGoals[t2][j])) createGoalsHtml();\n                else {\n                    ttGLabel.innerHTML = \"\";\n                    ttGVal.innerHTML = \"\";\n                }\n            } else createGoalsHtml();\n        } else {\n            ttGLabel.innerHTML = \"\";\n            ttGVal.innerHTML = \"\";\n        }\n        if (zVal !== null) {\n            const ttZLabel = ttItems[t2].querySelector(\".apexcharts-tooltip-text-z-label\");\n            ttZLabel.innerHTML = w2.config.tooltip.z.title;\n            const ttZVal = ttItems[t2].querySelector(\".apexcharts-tooltip-text-z-value\");\n            ttZVal.innerHTML = typeof zVal !== \"undefined\" ? zVal : \"\";\n        }\n        if (shared && ttItemsChildren[0]) {\n            if (w2.config.tooltip.hideEmptySeries) {\n                const ttItemMarker = ttItems[t2].querySelector(\".apexcharts-tooltip-marker\");\n                const ttItemText = ttItems[t2].querySelector(\".apexcharts-tooltip-text\");\n                if (parseFloat(val) == 0) {\n                    ttItemMarker.style.display = \"none\";\n                    ttItemText.style.display = \"none\";\n                } else {\n                    ttItemMarker.style.display = \"block\";\n                    ttItemText.style.display = \"block\";\n                }\n            }\n            if (typeof val === \"undefined\" || val === null || w2.globals.ancillaryCollapsedSeriesIndices.indexOf(t2) > -1 || w2.globals.collapsedSeriesIndices.indexOf(t2) > -1 || Array.isArray(ttCtx.tConfig.enabledOnSeries) && ttCtx.tConfig.enabledOnSeries.indexOf(t2) === -1) ttItemsChildren[0].parentNode.style.display = \"none\";\n            else ttItemsChildren[0].parentNode.style.display = w2.config.tooltip.items.display;\n        } else if (Array.isArray(ttCtx.tConfig.enabledOnSeries) && ttCtx.tConfig.enabledOnSeries.indexOf(t2) === -1) ttItemsChildren[0].parentNode.style.display = \"none\";\n    }\n    /**\n   * @param {boolean} shared\n   * @param {number} i\n   */ toggleActiveInactiveSeries(shared, i2) {\n        const w2 = this.w;\n        if (shared) this.tooltipUtil.toggleAllTooltipSeriesGroups(\"enable\");\n        else {\n            this.tooltipUtil.toggleAllTooltipSeriesGroups(\"disable\");\n            const firstTooltipSeriesGroup = w2.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${i2}`);\n            if (firstTooltipSeriesGroup) {\n                const ftsGroup = /** @type {HTMLElement} */ firstTooltipSeriesGroup;\n                ftsGroup.classList.add(\"apexcharts-active\");\n                ftsGroup.style.display = w2.config.tooltip.items.display;\n            }\n        }\n    }\n    /** @param {{i: any, j: any}} opts */ getValuesToPrint({ i: i2, j: j }) {\n        var _a, _b, _c, _d, _e, _f, _g, _h;\n        const w2 = this.w;\n        const filteredSeriesX = w2.seriesData.seriesX.map((ser)=>ser.length > 0 ? ser : []);\n        let xVal = \"\";\n        let xAxisTTVal = \"\";\n        let zVal = null;\n        let val = null;\n        const customFormatterOpts = {\n            series: w2.seriesData.series,\n            seriesIndex: i2,\n            dataPointIndex: j,\n            w: w2\n        };\n        const zFormatter = w2.formatters.ttZFormatter;\n        if (j === null) val = w2.seriesData.series[i2];\n        else if (w2.axisFlags.isXNumeric && w2.config.chart.type !== \"treemap\") {\n            xVal = filteredSeriesX[i2][j];\n            if (filteredSeriesX[i2].length === 0) {\n                const firstActiveSeriesIndex = this.tooltipUtil.getFirstActiveXArray(filteredSeriesX);\n                xVal = filteredSeriesX[firstActiveSeriesIndex][j];\n            }\n        } else {\n            const dataFormat = new $e4b487e979d7c06d$var$Data(this.w);\n            if (dataFormat.isFormatXY()) xVal = typeof /** @type {any} */ w2.config.series[i2].data[j] !== \"undefined\" ? /** @type {any} */ w2.config.series[i2].data[j].x : \"\";\n            else xVal = typeof w2.labelData.labels[j] !== \"undefined\" ? w2.labelData.labels[j] : \"\";\n        }\n        const bufferXVal = xVal;\n        if (w2.axisFlags.isXNumeric && w2.config.xaxis.type === \"datetime\") {\n            const xFormat = new $e4b487e979d7c06d$var$Formatters(this.w);\n            xVal = xFormat.xLabelFormat(/** @type {Function} */ w2.formatters.ttKeyFormatter, bufferXVal, bufferXVal, {\n                i: void 0,\n                dateFormatter: new $e4b487e979d7c06d$var$DateTime(this.w).formatDate,\n                w: this.w\n            });\n        } else if (w2.globals.isBarHorizontal) xVal = w2.formatters.yLabelFormatters[0](bufferXVal, customFormatterOpts);\n        else xVal = (_c = (_b = (_a = w2.formatters).xLabelFormatter) == null ? void 0 : _b.call(_a, bufferXVal, customFormatterOpts)) != null ? _c : bufferXVal;\n        if (w2.config.tooltip.x.formatter !== void 0) xVal = (_f = (_e = (_d = w2.formatters).ttKeyFormatter) == null ? void 0 : _e.call(_d, bufferXVal, customFormatterOpts)) != null ? _f : bufferXVal;\n        if (w2.seriesData.seriesZ.length > 0 && w2.seriesData.seriesZ[i2].length > 0) zVal = zFormatter == null ? void 0 : zFormatter(w2.seriesData.seriesZ[i2][j], w2);\n        if (typeof w2.config.xaxis.tooltip.formatter === \"function\") xAxisTTVal = (_h = (_g = w2.formatters).xaxisTooltipFormatter) == null ? void 0 : _h.call(_g, bufferXVal, customFormatterOpts);\n        else xAxisTTVal = xVal;\n        return {\n            val: Array.isArray(val) ? val.join(\" \") : val,\n            xVal: Array.isArray(xVal) ? xVal.join(\" \") : xVal,\n            xAxisTTVal: Array.isArray(xAxisTTVal) ? xAxisTTVal.join(\" \") : xAxisTTVal,\n            zVal: zVal\n        };\n    }\n    /** @param {{i: any, j: any, y1: any, y2: any, w: any}} opts */ handleCustomTooltip({ i: i2, j: j, y1: y1, y2: y2, w: w2 }) {\n        const tooltipEl = this.ttCtx.getElTooltip();\n        let fn = w2.config.tooltip.custom;\n        if (Array.isArray(fn)) fn = fn[i2];\n        if (typeof fn !== \"function\") return;\n        const customTooltip = fn({\n            series: w2.seriesData.series,\n            seriesIndex: i2,\n            dataPointIndex: j,\n            y1: y1,\n            y2: y2,\n            w: w2\n        });\n        if (tooltipEl) {\n            const arrowEl = tooltipEl.querySelector(\".apexcharts-tooltip-arrow\");\n            if (typeof customTooltip === \"string\" || typeof customTooltip === \"number\") tooltipEl.innerHTML = String(customTooltip);\n            else if (customTooltip != null && (customTooltip instanceof Element || typeof customTooltip.nodeName === \"string\")) {\n                tooltipEl.innerHTML = \"\";\n                tooltipEl.appendChild(customTooltip.cloneNode(true));\n            }\n            if (arrowEl) tooltipEl.appendChild(arrowEl);\n        }\n    }\n}\nconst $e4b487e979d7c06d$var$ARROW_TIP_OVERHANG = 7;\nconst $e4b487e979d7c06d$var$POINT_TIP_GAP = 0;\nclass $e4b487e979d7c06d$var$Position {\n    /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */ constructor(tooltipContext){\n        this.ttCtx = tooltipContext;\n        this.w = tooltipContext.w;\n    }\n    /**\n   * This will move the crosshair (the vertical/horz line that moves along with mouse)\n   * Along with this, this function also calls the xaxisMove function\n   * @memberof Position\n   * @param {number} cx - point's x position, wherever point's x is, you need to move crosshair\n   * @param {number | null} [j]\n   */ moveXCrosshairs(cx, j = null) {\n        const ttCtx = this.ttCtx;\n        const w2 = this.w;\n        const xcrosshairs = ttCtx.getElXCrosshairs();\n        let x = cx - ttCtx.xcrosshairsWidth / 2;\n        const tickAmount = w2.labelData.labels.slice().length;\n        if (j !== null) x = w2.layout.gridWidth / tickAmount * j;\n        if (xcrosshairs !== null && !w2.globals.isBarHorizontal) {\n            xcrosshairs.setAttribute(\"x\", String(x));\n            xcrosshairs.setAttribute(\"x1\", String(x));\n            xcrosshairs.setAttribute(\"x2\", String(x));\n            xcrosshairs.setAttribute(\"y2\", String(w2.layout.gridHeight));\n            xcrosshairs.classList.add(\"apexcharts-active\");\n        }\n        if (x < 0) x = 0;\n        if (x > w2.layout.gridWidth) x = w2.layout.gridWidth;\n        if (ttCtx.isXAxisTooltipEnabled) {\n            let tx = x;\n            if (w2.config.xaxis.crosshairs.width === \"tickWidth\" || w2.config.xaxis.crosshairs.width === \"barWidth\") tx = x + ttCtx.xcrosshairsWidth / 2;\n            this.moveXAxisTooltip(tx);\n        }\n    }\n    /**\n   * This will move the crosshair (the vertical/horz line that moves along with mouse)\n   * Along with this, this function also calls the xaxisMove function\n   * @memberof Position\n   * @param {number} cy - point's y position, wherever point's y is, you need to move crosshair\n   */ moveYCrosshairs(cy) {\n        const ttCtx = this.ttCtx;\n        if (ttCtx.ycrosshairs !== null) $e4b487e979d7c06d$var$Graphics.setAttrs(ttCtx.ycrosshairs, {\n            y1: cy,\n            y2: cy\n        });\n        if (ttCtx.ycrosshairsHidden !== null) $e4b487e979d7c06d$var$Graphics.setAttrs(ttCtx.ycrosshairsHidden, {\n            y1: cy,\n            y2: cy\n        });\n    }\n    /**\n   ** AxisTooltip is the small rectangle which appears on x axis with x value, when user moves\n   * @memberof Position\n   * @param {number} cx - point's x position, wherever point's x is, you need to move\n   */ moveXAxisTooltip(cx) {\n        var _a, _b;\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        if (ttCtx.xaxisTooltip !== null && ttCtx.xcrosshairsWidth !== 0) {\n            ttCtx.xaxisTooltip.classList.add(\"apexcharts-active\");\n            const cy = ttCtx.xaxisOffY + w2.config.xaxis.tooltip.offsetY + w2.layout.translateY + 5 + w2.config.xaxis.offsetY;\n            const xaxisTTText = ttCtx.xaxisTooltip.getBoundingClientRect();\n            const xaxisTTTextWidth = xaxisTTText.width;\n            cx = cx - xaxisTTTextWidth / 2;\n            if (!isNaN(cx)) {\n                cx = cx + w2.layout.translateX;\n                const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n                const textRect = graphics.getTextRects((_b = (_a = ttCtx.xaxisTooltipText) == null ? void 0 : _a.innerHTML) != null ? _b : \"\", w2.config.xaxis.labels.style.fontSize);\n                if (ttCtx.xaxisTooltipText) ttCtx.xaxisTooltipText.style.minWidth = textRect.width + \"px\";\n                ttCtx.xaxisTooltip.style.left = cx + \"px\";\n                ttCtx.xaxisTooltip.style.top = cy + \"px\";\n            }\n        }\n    }\n    /**\n   * @param {number} index\n   */ moveYAxisTooltip(index) {\n        var _a, _b;\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        if (ttCtx.yaxisTTEls === null) ttCtx.yaxisTTEls = /** @type {any[]} */ [\n            ...w2.dom.baseEl.querySelectorAll(\".apexcharts-yaxistooltip\")\n        ];\n        const ycrosshairsHiddenRectY1 = parseInt((_b = (_a = ttCtx.ycrosshairsHidden) == null ? void 0 : _a.getAttribute(\"y1\")) != null ? _b : \"0\", 10);\n        let cy = w2.layout.translateY + ycrosshairsHiddenRectY1;\n        if (ttCtx.yaxisTTEls) {\n            const yAxisTTRect = ttCtx.yaxisTTEls[index].getBoundingClientRect();\n            const yAxisTTHeight = yAxisTTRect.height;\n            let cx;\n            const labelsGroup = /** @type {SVGGElement | null} */ w2.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-texts-g`);\n            const elWrapRect = w2.dom.elWrap.getBoundingClientRect();\n            if (labelsGroup) {\n                const lr = labelsGroup.getBoundingClientRect();\n                if (lr.width > 0) {\n                    const labelsCenterInElWrap = lr.left + lr.width / 2 - elWrapRect.left;\n                    cx = labelsCenterInElWrap - yAxisTTRect.width / 2;\n                }\n            }\n            if (cx == null) {\n                const GAP = 4;\n                cx = w2.config.yaxis[index].opposite ? w2.globals.translateYAxisX[index] + GAP : w2.globals.translateYAxisX[index] - yAxisTTRect.width - GAP;\n            }\n            cy = cy - yAxisTTHeight / 2;\n            if (w2.globals.ignoreYAxisIndexes.indexOf(index) === -1 && cy > 0 && cy < w2.layout.gridHeight) {\n                ttCtx.yaxisTTEls[index].classList.add(\"apexcharts-active\");\n                ttCtx.yaxisTTEls[index].style.top = cy + \"px\";\n                ttCtx.yaxisTTEls[index].style.left = cx + w2.config.yaxis[index].tooltip.offsetX + \"px\";\n            } else ttCtx.yaxisTTEls[index].classList.remove(\"apexcharts-active\");\n        }\n    }\n    /**\n   ** moves the whole tooltip by changing x, y attrs\n   * @memberof Position\n   * @param {number} cx - point's x position, wherever point's x is, you need to move tooltip\n   * @param {number} cy - point's y position, wherever point's y is, you need to move tooltip\n   * @param {number | null} [markerSize] - point's size\n   */ moveTooltip(cx, cy, markerSize = null) {\n        const ttCtx = this.ttCtx;\n        const tooltipEl = ttCtx.getElTooltip();\n        if (!tooltipEl) return;\n        const pos = this.computeTooltipPosition(cx, cy, markerSize);\n        if (pos === null) return;\n        this.applyTooltipPosition(tooltipEl, pos);\n    }\n    /**\n   * Pure-ish (reads from `this.ttCtx` + `this.w` but performs no DOM writes)\n   * computation of the tooltip box position, edge placement (for arrow),\n   * and arrow vertical offset. Returns null when inputs are not numeric.\n   *\n   * @param {number} cx\n   * @param {number} cy\n   * @param {number | null} [markerSize]\n   * @returns {{ x: number, y: number, placement: 'left'|'right', arrowY: number|null } | null}\n   */ computeTooltipPosition(cx, cy, markerSize = null) {\n        var _a, _b, _c, _d, _e, _f, _g;\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        const tooltipRect = ttCtx.tooltipRect;\n        const arrowEnabled = !!w2.config.tooltip.arrow;\n        const pointSize = markerSize !== null ? parseFloat(String(markerSize)) : 1;\n        const ttH = tooltipRect.ttHeight || 0;\n        const ttW = tooltipRect.ttWidth || 0;\n        const cxNum = parseFloat(String(cx));\n        const cyNum = parseFloat(String(cy));\n        if (isNaN(cxNum) || isNaN(cyNum)) return null;\n        const clearance = pointSize + (arrowEnabled ? $e4b487e979d7c06d$var$ARROW_TIP_OVERHANG : 0) + $e4b487e979d7c06d$var$POINT_TIP_GAP;\n        let x = cxNum + clearance;\n        const pointY = cyNum + w2.layout.translateY;\n        let y = arrowEnabled ? pointY - ttH / 2 + pointSize / 2 : cyNum + pointSize / 2;\n        let placement = \"right\";\n        if (x > w2.layout.gridWidth / 2) {\n            x = cxNum - ttW - clearance;\n            placement = \"left\";\n        }\n        if (x > w2.layout.gridWidth - ttW - 10) x = placement === \"left\" ? Math.min(w2.layout.gridWidth - ttW, x) : w2.layout.gridWidth - ttW;\n        if (x < -20) x = -20;\n        if (w2.config.tooltip.followCursor) {\n            const elGrid = ttCtx.getElGrid();\n            if (!elGrid) return null;\n            const seriesBound = elGrid.getBoundingClientRect();\n            x = ttCtx.e.clientX - seriesBound.left;\n            if (x > w2.layout.gridWidth / 2) {\n                x = x - ttW;\n                placement = \"left\";\n            } else placement = \"right\";\n            y = ttCtx.e.clientY + w2.layout.translateY - seriesBound.top;\n            if (y > w2.layout.gridHeight / 2) y = y - ttH;\n        } else if (!w2.globals.isBarHorizontal) {\n            if (arrowEnabled) {\n                const gridTop = w2.layout.translateY;\n                const gridBottom = w2.layout.translateY + w2.layout.gridHeight;\n                if (y + ttH > gridBottom) y = gridBottom - ttH;\n                if (y < gridTop) y = gridTop;\n            } else if (ttH / 2 + y > w2.layout.gridHeight) y = w2.layout.gridHeight - ttH + w2.layout.translateY;\n        }\n        if (isNaN(x)) return null;\n        x = x + w2.layout.translateX;\n        const a11y = (_b = (_a = w2.config) == null ? void 0 : _a.chart) == null ? void 0 : _b.accessibility;\n        if ((a11y == null ? void 0 : a11y.enabled) && ((_d = (_c = a11y == null ? void 0 : a11y.keyboard) == null ? void 0 : _c.navigation) == null ? void 0 : _d.enabled) && ((_g = (_f = (_e = w2.dom) == null ? void 0 : _e.baseEl) == null ? void 0 : _f.querySelector) == null ? void 0 : _g.call(_f, \".apexcharts-keyboard-focused\"))) {\n            const refPointY = arrowEnabled ? pointY : cyNum;\n            const margin = (pointSize || 1) + 12;\n            const tooltipTop = y;\n            const tooltipBottom = y + ttH;\n            if (!isNaN(refPointY) && ttH > 0 && tooltipTop < refPointY + margin && tooltipBottom > refPointY - margin) {\n                y = refPointY - ttH - margin;\n                if (y < 0) y = refPointY + margin;\n            }\n        }\n        let arrowY = null;\n        if (arrowEnabled && ttH > 0) {\n            const localY = pointY - y;\n            const minArrowY = 10;\n            const maxArrowY = ttH - 10;\n            arrowY = Math.max(minArrowY, Math.min(maxArrowY, localY));\n        }\n        return {\n            x: x,\n            y: y,\n            placement: placement,\n            arrowY: arrowY\n        };\n    }\n    /**\n   * Single DOM-writer used by every positioning path on the main tooltip.\n   * Replaces the duplicated `style.left/top` writes that previously lived\n   * in Position.moveTooltip, Tooltip.drawFixedTooltipRect, and Intersect.\n   *\n   * @param {HTMLElement} tooltipEl\n   * @param {{\n   *   x: number,\n   *   y: number,\n   *   placement?: 'left'|'right'|'top'|'bottom',\n   *   arrowY?: number|null,\n   *   arrowX?: number|null,\n   * }} pos\n   */ applyTooltipPosition(tooltipEl, pos) {\n        if (!tooltipEl) return;\n        const firstPaint = tooltipEl.dataset.positioned !== \"true\";\n        if (firstPaint) tooltipEl.style.transitionProperty = \"none\";\n        tooltipEl.style.left = pos.x + \"px\";\n        tooltipEl.style.top = pos.y + \"px\";\n        if (pos.placement) tooltipEl.dataset.placement = pos.placement;\n        if (pos.arrowY != null) tooltipEl.style.setProperty(\"--apx-tt-arrow-y\", pos.arrowY + \"px\");\n        if (pos.arrowX != null) tooltipEl.style.setProperty(\"--apx-tt-arrow-x\", pos.arrowX + \"px\");\n        if (firstPaint) {\n            tooltipEl.offsetWidth;\n            tooltipEl.dataset.positioned = \"true\";\n            requestAnimationFrame(()=>{\n                tooltipEl.style.transitionProperty = \"\";\n            });\n        }\n    }\n    /**\n   * @param {number} i\n   * @param {number} j\n   */ moveMarkers(i2, j) {\n        var _a;\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        if (w2.globals.markers.size[i2] > 0) {\n            const allPoints = w2.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\\\:realIndex='${i2}'] .apexcharts-marker`);\n            for(let p2 = 0; p2 < allPoints.length; p2++)if (parseInt((_a = allPoints[p2].getAttribute(\"rel\")) != null ? _a : \"0\", 10) === j) {\n                ttCtx.marker.resetPointsSize();\n                ttCtx.marker.enlargeCurrentPoint(j, allPoints[p2]);\n            }\n        } else {\n            ttCtx.marker.resetPointsSize();\n            this.moveDynamicPointOnHover(j, i2);\n        }\n    }\n    // This function is used when you need to show markers/points only on hover -\n    // DIFFERENT X VALUES in multiple series\n    /**\n   * @param {number} j\n   * @param {number} capturedSeries\n   */ moveDynamicPointOnHover(j, capturedSeries) {\n        var _a, _b, _c, _d, _e;\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        let cx = 0;\n        let cy = 0;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const pointsArr = w2.globals.pointsArray;\n        const hoverSize = ttCtx.tooltipUtil.getHoverMarkerSize(capturedSeries);\n        const serType = /** @type {any} */ w2.config.series[capturedSeries].type;\n        if (serType && (serType === \"column\" || serType === \"candlestick\" || serType === \"boxPlot\" || serType === \"violin\")) return;\n        cx = (_b = (_a = pointsArr[capturedSeries]) == null ? void 0 : _a[j]) == null ? void 0 : _b[0];\n        cy = ((_d = (_c = pointsArr[capturedSeries]) == null ? void 0 : _c[j]) == null ? void 0 : _d[1]) || 0;\n        const point = w2.dom.baseEl.querySelector(`.apexcharts-series[data\\\\:realIndex='${capturedSeries}'] .apexcharts-series-markers path`);\n        if (point && cy < w2.layout.gridHeight && cy > 0) {\n            const shape = (_e = point.getAttribute(\"shape\")) != null ? _e : \"circle\";\n            const path = graphics.getMarkerPath(cx, cy, shape, hoverSize * 1.5);\n            point.setAttribute(\"d\", path);\n        }\n        this.moveXCrosshairs(cx);\n        if (!ttCtx.fixedTooltip) this.moveTooltip(cx, cy, hoverSize);\n    }\n    // This function is used when you need to show markers/points only on hover -\n    // SAME X VALUES in multiple series\n    /**\n   * @param {number} j\n   */ moveDynamicPointsOnHover(j) {\n        var _a, _b;\n        const ttCtx = this.ttCtx;\n        const w2 = ttCtx.w;\n        let cx = 0;\n        let cy = 0;\n        let activeSeries = 0;\n        const pointsArr = w2.globals.pointsArray;\n        const series = new $e4b487e979d7c06d$var$Series(this.w);\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        activeSeries = series.getActiveConfigSeriesIndex(\"asc\", [\n            \"line\",\n            \"area\",\n            \"scatter\",\n            \"bubble\"\n        ]);\n        const hoverSize = ttCtx.tooltipUtil.getHoverMarkerSize(activeSeries);\n        if ((_a = pointsArr[activeSeries]) == null ? void 0 : _a[j]) {\n            cx = pointsArr[activeSeries][j][0];\n            cy = pointsArr[activeSeries][j][1];\n        }\n        if (isNaN(cx)) return;\n        const points = ttCtx.tooltipUtil.getAllMarkers();\n        if (points.length) for(let p2 = 0; p2 < w2.seriesData.series.length; p2++){\n            const pointArr = pointsArr[p2];\n            if (w2.globals.comboCharts) {\n                if (typeof pointArr === \"undefined\") points.splice(p2, 0, null);\n            }\n            if (points[p2] && pointArr && pointArr.length) {\n                let pcy = pointsArr[p2][j][1];\n                let pcy2;\n                points[p2].setAttribute(\"cx\", cx);\n                const shape = (_b = points[p2].getAttribute(\"shape\")) != null ? _b : \"circle\";\n                if (w2.config.chart.type === \"rangeArea\" && !w2.globals.comboCharts) {\n                    const rangeStartIndex = j + w2.seriesData.series[p2].length;\n                    pcy2 = pointsArr[p2][rangeStartIndex][1];\n                    const pcyDiff = Math.abs(pcy - pcy2) / 2;\n                    pcy = pcy - pcyDiff;\n                }\n                if (pcy !== null && !isNaN(pcy) && pcy < w2.layout.gridHeight + hoverSize && pcy + hoverSize > 0) {\n                    const path = graphics.getMarkerPath(cx, pcy, shape, hoverSize);\n                    points[p2].setAttribute(\"d\", path);\n                } else points[p2].setAttribute(\"d\", \"\");\n            }\n        }\n        this.moveXCrosshairs(cx);\n        if (!ttCtx.fixedTooltip) this.moveTooltip(cx, cy || w2.layout.gridHeight, hoverSize);\n    }\n    /**\n   * @param {number} j\n   * @param {number} capturedSeries\n   */ moveStickyTooltipOverBars(j, capturedSeries) {\n        var _a, _b, _c, _d, _e;\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        let barLen = w2.globals.columnSeries ? /** @type {any} */ w2.globals.columnSeries.length : w2.seriesData.series.length;\n        if (w2.config.chart.stacked) barLen = w2.globals.barGroups.length;\n        let i2 = barLen >= 2 && barLen % 2 === 0 ? Math.floor(barLen / 2) : Math.floor(barLen / 2) + 1;\n        if (w2.globals.isBarHorizontal) {\n            const series = new $e4b487e979d7c06d$var$Series(this.w);\n            i2 = series.getActiveConfigSeriesIndex(\"desc\") + 1;\n        }\n        let jBar = w2.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${i2}'] path[j='${j}'], .apexcharts-candlestick-series .apexcharts-series[rel='${i2}'] path[j='${j}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${i2}'] path[j='${j}'], .apexcharts-violin-series .apexcharts-series[rel='${i2}'] path[j='${j}'], .apexcharts-rangebar-series .apexcharts-series[rel='${i2}'] path[j='${j}']`);\n        if (!jBar && typeof capturedSeries === \"number\") jBar = w2.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\\\:realIndex='${capturedSeries}'] path[j='${j}'],\n        .apexcharts-candlestick-series .apexcharts-series[data\\\\:realIndex='${capturedSeries}'] path[j='${j}'],\n        .apexcharts-boxPlot-series .apexcharts-series[data\\\\:realIndex='${capturedSeries}'] path[j='${j}'],\n        .apexcharts-violin-series .apexcharts-series[data\\\\:realIndex='${capturedSeries}'] path[j='${j}'],\n        .apexcharts-rangebar-series .apexcharts-series[data\\\\:realIndex='${capturedSeries}'] path[j='${j}']`);\n        let bc = null;\n        const bcc = /** @type {any} */ w2.globals.barCanvasCoords;\n        if (!jBar && bcc) {\n            bc = typeof capturedSeries === \"number\" && ((_a = bcc[capturedSeries]) == null ? void 0 : _a[j]) || null;\n            if (!bc) {\n                for(const key in bcc)if ((_b = bcc[key]) == null ? void 0 : _b[j]) {\n                    bc = bcc[key][j];\n                    break;\n                }\n            }\n        }\n        let bcx = jBar ? parseFloat((_c = jBar.getAttribute(\"cx\")) != null ? _c : \"0\") : bc ? bc.cx : 0;\n        let bcy = jBar ? parseFloat((_d = jBar.getAttribute(\"cy\")) != null ? _d : \"0\") : bc ? bc.cy : 0;\n        const bw = jBar ? parseFloat((_e = jBar.getAttribute(\"barWidth\")) != null ? _e : \"0\") : bc ? bc.barWidth : 0;\n        const elGrid = ttCtx.getElGrid();\n        if (!elGrid) return;\n        const seriesBound = elGrid.getBoundingClientRect();\n        const isBoxOrCandle = jBar && (jBar.classList.contains(\"apexcharts-candlestick-area\") || jBar.classList.contains(\"apexcharts-boxPlot-area\"));\n        if (w2.axisFlags.isXNumeric) {\n            if (jBar && !isBoxOrCandle) {\n                const center = this._datapointCenterXFromBars(j);\n                if (center != null) bcx = center;\n                else bcx = bcx - (barLen % 2 !== 0 ? bw / 2 : 0);\n            }\n            if (jBar && // fixes apexcharts.js#2354\n            isBoxOrCandle) bcx = bcx - bw / 2;\n        } else if (!w2.globals.isBarHorizontal && !bc) {\n            bcx = ttCtx.xAxisTicksPositions[j - 1] + ttCtx.dataPointsDividedWidth / 2;\n            if (isNaN(bcx)) bcx = ttCtx.xAxisTicksPositions[j] - ttCtx.dataPointsDividedWidth / 2;\n        }\n        if (!w2.globals.isBarHorizontal) {\n            if (w2.config.tooltip.followCursor) bcy = ttCtx.e.clientY - seriesBound.top - ttCtx.tooltipRect.ttHeight / 2;\n            else if (bcy + ttCtx.tooltipRect.ttHeight + 15 > w2.layout.gridHeight) bcy = w2.layout.gridHeight;\n        } else bcy = bcy - ttCtx.tooltipRect.ttHeight;\n        if (!w2.globals.isBarHorizontal) this.moveXCrosshairs(bcx);\n        if (!ttCtx.fixedTooltip) {\n            if (w2.globals.isBarHorizontal && !w2.config.tooltip.followCursor) {\n                const placed = this.placeHorizontalSharedTooltip(j);\n                if (placed) return;\n            }\n            this.moveTooltip(bcx, bcy || w2.layout.gridHeight);\n        }\n    }\n    /**\n   * Place tooltip above (or flipped: below) the union rect of all bars at\n   * dataPointIndex `j` for horizontal-bar-likes. Returns true when a\n   * Compute the true horizontal center of dataPointIndex `j` in grid-local\n   * coords from the union of every visible bar's `getBoundingClientRect()`.\n   * Used as a replacement for the (buggy on numeric/datetime xaxis) `cx`\n   * attribute math in `moveStickyTooltipOverBars`. Returns null when no\n   * usable bars are found.\n   * @param {number} j\n   * @returns {number | null}\n   */ _datapointCenterXFromBars(j) {\n        var _a, _b;\n        const w2 = this.w;\n        const bars = w2.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${j}'],.apexcharts-rangebar-series path[j='${j}']`);\n        if (!bars.length) return null;\n        let unionLeft = Infinity;\n        let unionRight = -Infinity;\n        for (const bar of bars){\n            const parent = /** @type {Element|null} */ bar.parentNode;\n            if ((_b = (_a = parent == null ? void 0 : parent.classList) == null ? void 0 : _a.contains) == null ? void 0 : _b.call(_a, \"apexcharts-series-collapsed\")) continue;\n            const r2 = /** @type {Element} */ bar.getBoundingClientRect();\n            if (r2.width === 0 && r2.height === 0) continue;\n            if (r2.left < unionLeft) unionLeft = r2.left;\n            if (r2.right > unionRight) unionRight = r2.right;\n        }\n        if (!isFinite(unionLeft)) return null;\n        return $e4b487e979d7c06d$var$AxisMapping.screenXToPlotPx(w2, (unionLeft + unionRight) / 2);\n    }\n    /**\n   * Place tooltip above (or flipped: below) the union rect of all bars at\n   * dataPointIndex `j` for horizontal-bar-likes. Returns true when a\n   * placement was applied; false when no bars found (caller falls back).\n   * @param {number} j\n   * @returns {boolean}\n   */ placeHorizontalSharedTooltip(j) {\n        var _a, _b;\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        const tooltipEl = ttCtx.getElTooltip();\n        if (!tooltipEl) return false;\n        const elGrid = ttCtx.getElGrid();\n        if (!elGrid) return false;\n        const gridRect = elGrid.getBoundingClientRect();\n        const bars = w2.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${j}'],.apexcharts-rangebar-series path[j='${j}'],.apexcharts-boxPlot-series path[j='${j}']`);\n        if (!bars.length) return false;\n        let unionLeft = Infinity;\n        let unionRight = -Infinity;\n        let unionTop = Infinity;\n        let unionBottom = -Infinity;\n        for (const bar of bars){\n            const parent = /** @type {Element|null} */ bar.parentNode;\n            if ((_b = (_a = parent == null ? void 0 : parent.classList) == null ? void 0 : _a.contains) == null ? void 0 : _b.call(_a, \"apexcharts-series-collapsed\")) continue;\n            const r2 = /** @type {Element} */ bar.getBoundingClientRect();\n            if (r2.width === 0 && r2.height === 0) continue;\n            if (r2.left < unionLeft) unionLeft = r2.left;\n            if (r2.right > unionRight) unionRight = r2.right;\n            if (r2.top < unionTop) unionTop = r2.top;\n            if (r2.bottom > unionBottom) unionBottom = r2.bottom;\n        }\n        if (!isFinite(unionLeft)) return false;\n        const ttW = ttCtx.tooltipRect.ttWidth || 0;\n        const ttH = ttCtx.tooltipRect.ttHeight || 0;\n        const rowCenterX = (unionLeft + unionRight) / 2 - gridRect.left + w2.layout.translateX;\n        const rowTopElWrap = unionTop - gridRect.top + w2.layout.translateY;\n        const rowBottomElWrap = unionBottom - gridRect.top + w2.layout.translateY;\n        const gridTop = w2.layout.translateY;\n        const gridBottom = w2.layout.translateY + w2.layout.gridHeight;\n        const gridLeft = w2.layout.translateX;\n        const gridRight = w2.layout.translateX + w2.layout.gridWidth;\n        let placement = \"top\";\n        let finalY = rowTopElWrap - ttH - $e4b487e979d7c06d$var$ARROW_TIP_OVERHANG;\n        if (finalY < gridTop) {\n            const belowTop = rowBottomElWrap + $e4b487e979d7c06d$var$ARROW_TIP_OVERHANG;\n            if (belowTop + ttH <= gridBottom) {\n                placement = \"bottom\";\n                finalY = belowTop;\n            }\n        }\n        let finalX = rowCenterX - ttW / 2;\n        if (finalX < gridLeft) finalX = gridLeft;\n        if (finalX + ttW > gridRight) finalX = gridRight - ttW;\n        const arrowX = Math.max(10, Math.min(ttW - 10, rowCenterX - finalX));\n        this.applyTooltipPosition(tooltipEl, {\n            x: finalX,\n            y: finalY,\n            placement: placement,\n            arrowY: null,\n            arrowX: arrowX\n        });\n        return true;\n    }\n}\nfunction $e4b487e979d7c06d$var$renderMarkerSVG(shape) {\n    const svg = (body)=>`<svg viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">${body}</svg>`;\n    switch(shape){\n        case \"square\":\n        case \"rect\":\n            return svg('<rect x=\"1\" y=\"1\" width=\"10\" height=\"10\" rx=\"1\" fill=\"currentColor\"/>');\n        case \"line\":\n            return svg('<rect x=\"0\" y=\"5\" width=\"12\" height=\"2\" rx=\"1\" fill=\"currentColor\"/>');\n        case \"diamond\":\n            return svg('<path d=\"M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z\" fill=\"currentColor\"/>');\n        case \"triangle\":\n            return svg('<path d=\"M6 1 L11.2 10.5 L0.8 10.5 Z\" fill=\"currentColor\"/>');\n        case \"cross\":\n            return svg('<path d=\"M2 2 L10 10 M10 2 L2 10\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>');\n        case \"plus\":\n            return svg('<path d=\"M6 1 L6 11 M1 6 L11 6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>');\n        case \"star\":\n            return svg('<path d=\"M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z\" fill=\"currentColor\"/>');\n        case \"sparkle\":\n            return svg('<path d=\"M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z\" fill=\"currentColor\"/>');\n        case \"circle\":\n        default:\n            return svg('<circle cx=\"6\" cy=\"6\" r=\"5\" fill=\"currentColor\"/>');\n    }\n}\nclass $e4b487e979d7c06d$var$Marker {\n    /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */ constructor(tooltipContext){\n        this.w = tooltipContext.w;\n        this.ttCtx = tooltipContext;\n        this.ctx = tooltipContext.ctx;\n        this.tooltipPosition = new $e4b487e979d7c06d$var$Position(tooltipContext);\n    }\n    drawDynamicPoints() {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const marker = new $e4b487e979d7c06d$var$Markers(this.w, this.ctx);\n        const elsSeries = /** @type {any[]} */ [\n            ...w2.dom.baseEl.querySelectorAll(\".apexcharts-series\")\n        ];\n        if (w2.config.chart.stacked) elsSeries.sort((a2, b2)=>{\n            return parseFloat(a2.getAttribute(\"data:realIndex\")) - parseFloat(b2.getAttribute(\"data:realIndex\"));\n        });\n        for(let i2 = 0; i2 < elsSeries.length; i2++){\n            const pointsMain = elsSeries[i2].querySelector(`.apexcharts-series-markers-wrap`);\n            if (pointsMain !== null) {\n                let PointClasses = `apexcharts-marker w${(Math.random() + 1).toString(36).substring(4)}`;\n                if ((w2.config.chart.type === \"line\" || w2.config.chart.type === \"area\") && !w2.globals.comboCharts && !w2.config.tooltip.intersect) PointClasses += \" no-pointer-events\";\n                const elPointOptions = marker.getMarkerConfig({\n                    cssClass: PointClasses,\n                    seriesIndex: Number(pointsMain.getAttribute(\"data:realIndex\"))\n                });\n                const point = graphics.drawMarker(0, 0, elPointOptions);\n                point.node.setAttribute(\"default-marker-size\", 0);\n                const elPointsG = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"g\");\n                elPointsG.classList.add(\"apexcharts-series-markers\");\n                elPointsG.appendChild(point.node);\n                pointsMain.appendChild(elPointsG);\n            }\n        }\n    }\n    /**\n   * @param {any} rel\n   * @param {any} point\n   * @param {number | null} [x]\n   * @param {number | null} [y]\n   */ enlargeCurrentPoint(rel, point, x = null, y = null) {\n        const w2 = this.w;\n        let appliedSize = w2.config.markers.hover.size;\n        if (w2.config.chart.type !== \"bubble\") appliedSize = this.newPointSize(rel, point);\n        let cx = point.getAttribute(\"cx\");\n        let cy = point.getAttribute(\"cy\");\n        if (x !== null && y !== null) {\n            cx = x;\n            cy = y;\n        }\n        this.tooltipPosition.moveXCrosshairs(cx);\n        if (!this.fixedTooltip) {\n            if (w2.config.chart.type === \"radar\") {\n                const elGrid = this.ttCtx.getElGrid();\n                if (!elGrid) return;\n                const seriesBound = elGrid.getBoundingClientRect();\n                cx = this.ttCtx.e.clientX - seriesBound.left;\n            }\n            this.tooltipPosition.moveTooltip(cx, cy, appliedSize);\n        }\n    }\n    /**\n   * @param {number} j\n   */ enlargePoints(j) {\n        var _a, _b;\n        const w2 = this.w;\n        const me = this;\n        const ttCtx = this.ttCtx;\n        const col = j;\n        const points = w2.dom.baseEl.querySelectorAll(\".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker\");\n        let newSize = w2.config.markers.hover.size;\n        for(let p2 = 0; p2 < points.length; p2++){\n            const rel = points[p2].getAttribute(\"rel\");\n            const index = points[p2].getAttribute(\"index\");\n            if (newSize === void 0) newSize = w2.globals.markers.size[/** @type {any} */ index] + w2.config.markers.hover.sizeOffset;\n            if (col === parseInt(rel != null ? rel : \"0\", 10)) {\n                me.newPointSize(col, points[p2]);\n                const cx = (_a = points[p2].getAttribute(\"cx\")) != null ? _a : \"0\";\n                const cy = (_b = points[p2].getAttribute(\"cy\")) != null ? _b : \"0\";\n                me.tooltipPosition.moveXCrosshairs(parseFloat(cx));\n                if (!ttCtx.fixedTooltip) me.tooltipPosition.moveTooltip(parseFloat(cx), parseFloat(cy), newSize);\n            } else me.oldPointSize(points[p2]);\n        }\n    }\n    /**\n   * Resizes the hovered marker to its hover size and returns the size applied,\n   * so the caller can position the tooltip clear of the enlarged dot. Undefined\n   * when nothing was resized (a zero-size marker has nothing to clear).\n   * @param {any} rel\n   * @param {any} point\n   * @returns {number | undefined}\n   */ newPointSize(rel, point) {\n        const w2 = this.w;\n        let newSize = w2.config.markers.hover.size;\n        const elPoint = rel === 0 ? point.parentNode.firstChild : point.parentNode.lastChild;\n        if (elPoint.getAttribute(\"default-marker-size\") !== \"0\") {\n            const index = parseInt(elPoint.getAttribute(\"index\"), 10);\n            if (newSize === void 0) newSize = w2.globals.markers.size[index] + w2.config.markers.hover.sizeOffset;\n            if (newSize < 0) newSize = 0;\n            const path = this.ttCtx.tooltipUtil.getPathFromPoint(point, newSize);\n            point.setAttribute(\"d\", path);\n            return newSize;\n        }\n        return void 0;\n    }\n    /**\n   * @param {any} point\n   */ oldPointSize(point) {\n        const size = parseFloat(point.getAttribute(\"default-marker-size\"));\n        const path = this.ttCtx.tooltipUtil.getPathFromPoint(point, size);\n        point.setAttribute(\"d\", path);\n    }\n    resetPointsSize() {\n        var _a;\n        const w2 = this.w;\n        const points = w2.dom.baseEl.querySelectorAll(\".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker\");\n        for(let p2 = 0; p2 < points.length; p2++){\n            const size = parseFloat((_a = points[p2].getAttribute(\"default-marker-size\")) != null ? _a : \"0\");\n            if ($e4b487e979d7c06d$var$Utils$1.isNumber(size) && size > 0) {\n                const path = this.ttCtx.tooltipUtil.getPathFromPoint(points[p2], size);\n                points[p2].setAttribute(\"d\", path);\n            } else points[p2].setAttribute(\"d\", \"M0,0\");\n        }\n    }\n}\nclass $e4b487e979d7c06d$var$Intersect {\n    /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */ constructor(tooltipContext){\n        this.w = tooltipContext.w;\n        const w2 = this.w;\n        this.ttCtx = tooltipContext;\n        this.isVerticalGroupedRangeBar = !w2.globals.isBarHorizontal && w2.config.chart.type === \"rangeBar\" && w2.config.plotOptions.bar.rangeBarGroupRows;\n    }\n    // a helper function to get an element's attribute value\n    /**\n   * @param {Event} e\n   * @param {string} attr\n   */ getAttr(e2, attr) {\n        var _a;\n        return parseFloat(/** @type {Element} */ (_a = e2.target.getAttribute(attr)) != null ? _a : \"\");\n    }\n    // handle tooltip for heatmaps and treemaps\n    /** @param {{e: any, opt: any, x: any, y: any, type: any}} opts */ handleHeatTreeTooltip({ e: e2, opt: opt, x: x, y: y, type: type }) {\n        var _a, _b;\n        const ttCtx = this.ttCtx;\n        const w2 = this.w;\n        const renderer = w2.globals.activeRenderer;\n        const canvasCells = type === \"heatmap\" && renderer && renderer.kind === \"canvas\" && typeof renderer.hitTest === \"function\";\n        let i2, j, cx, cy, width, height;\n        if (canvasCells) {\n            const seriesBound = opt.elGrid.getBoundingClientRect();\n            const clientX = e2.type === \"touchmove\" ? e2.touches[0].clientX : e2.clientX;\n            const clientY = e2.type === \"touchmove\" ? e2.touches[0].clientY : e2.clientY;\n            const hit = renderer.hitTest(clientX - seriesBound.left, clientY - seriesBound.top);\n            if (!hit) return {\n                x: x,\n                y: y,\n                noHit: true\n            };\n            i2 = hit.seriesIndex;\n            j = hit.dataPointIndex;\n            cx = hit.x;\n            cy = hit.y;\n            width = hit.width;\n            height = hit.height;\n        } else if (e2.target.classList.contains(`apexcharts-${type}-rect`)) {\n            i2 = this.getAttr(e2, \"i\");\n            j = this.getAttr(e2, \"j\");\n            cx = this.getAttr(e2, \"cx\");\n            cy = this.getAttr(e2, \"cy\");\n            width = this.getAttr(e2, \"width\");\n            height = this.getAttr(e2, \"height\");\n        } else return {\n            x: x,\n            y: y\n        };\n        ttCtx.tooltipLabels.drawSeriesTexts({\n            ttItems: opt.ttItems,\n            i: i2,\n            j: j,\n            shared: false,\n            e: e2\n        });\n        w2.interact.capturedSeriesIndex = i2;\n        w2.interact.capturedDataPointIndex = j;\n        ttCtx.tooltipPosition.moveXCrosshairs(cx + width / 2);\n        const tooltipEl = ttCtx.getElTooltip();\n        if (type === \"heatmap\" && w2.config.tooltip.arrow && !w2.config.tooltip.followCursor && tooltipEl) {\n            const elGridRect = opt.elGrid.getBoundingClientRect();\n            const elWrapRect = w2.dom.elWrap.getBoundingClientRect();\n            const gridOffsetXInElWrap = elGridRect.left - elWrapRect.left;\n            let clLeft, clTop, clRight, clBottom;\n            if (canvasCells) {\n                clLeft = cx;\n                clTop = cy;\n                clRight = cx + width;\n                clBottom = cy + height;\n            } else {\n                const r2 = e2.target.getBoundingClientRect();\n                clLeft = r2.left - elGridRect.left;\n                clTop = r2.top - elGridRect.top;\n                clRight = r2.right - elGridRect.left;\n                clBottom = r2.bottom - elGridRect.top;\n            }\n            const ttW = ttCtx.tooltipRect.ttWidth || 0;\n            const ttH = ttCtx.tooltipRect.ttHeight || 0;\n            const cellCenterXInElWrap = (clLeft + clRight) / 2 + gridOffsetXInElWrap;\n            const cellTopInElWrap = clTop + w2.layout.translateY;\n            const cellBottomInElWrap = clBottom + w2.layout.translateY;\n            const gridTop = w2.layout.translateY;\n            const gridBottom = w2.layout.translateY + w2.layout.gridHeight;\n            const gridLeft = gridOffsetXInElWrap;\n            const gridRight = gridOffsetXInElWrap + w2.layout.gridWidth;\n            let placement = \"top\";\n            let finalY = cellTopInElWrap - ttH - $e4b487e979d7c06d$var$ARROW_TIP_OVERHANG;\n            if (finalY < gridTop) {\n                const belowTop = cellBottomInElWrap + $e4b487e979d7c06d$var$ARROW_TIP_OVERHANG;\n                if (belowTop + ttH <= gridBottom) {\n                    placement = \"bottom\";\n                    finalY = belowTop;\n                } else finalY = gridTop;\n            }\n            let finalX = cellCenterXInElWrap - ttW / 2;\n            if (finalX < gridLeft) finalX = gridLeft;\n            if (finalX + ttW > gridRight) finalX = gridRight - ttW;\n            const arrowX = Math.max(10, Math.min(ttW - 10, cellCenterXInElWrap - finalX));\n            ttCtx.tooltipPosition.applyTooltipPosition(tooltipEl, {\n                x: finalX,\n                y: finalY,\n                placement: placement,\n                arrowY: null,\n                arrowX: arrowX\n            });\n            return {\n                x: finalX,\n                y: finalY,\n                positioned: true\n            };\n        }\n        x = cx + ttCtx.tooltipRect.ttWidth / 2 + width;\n        y = cy + ttCtx.tooltipRect.ttHeight / 2 - height / 2;\n        if (x > w2.layout.gridWidth / 2) x = cx - ttCtx.tooltipRect.ttWidth / 2 + width;\n        if (ttCtx.w.config.tooltip.followCursor) {\n            const seriesBound = w2.dom.elWrap.getBoundingClientRect();\n            x = ((_a = w2.interact.clientX) != null ? _a : 0) - seriesBound.left - (x > w2.layout.gridWidth / 2 ? ttCtx.tooltipRect.ttWidth : 0);\n            y = ((_b = w2.interact.clientY) != null ? _b : 0) - seriesBound.top - (y > w2.layout.gridHeight / 2 ? ttCtx.tooltipRect.ttHeight : 0);\n        }\n        return {\n            x: x,\n            y: y\n        };\n    }\n    /**\n   * handle tooltips for line/area/scatter charts where tooltip.intersect is true\n   * when user hovers over the marker directly, this function is executed\n   */ /** @param {{e: any, opt: any, x: any, y: any}} opts */ handleMarkerTooltip({ e: e2, opt: opt, x: x, y: y }) {\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        let i2;\n        let j;\n        if (e2.target.classList.contains(\"apexcharts-marker\")) {\n            const cx = parseInt(opt.paths.getAttribute(\"cx\"), 10);\n            const cy = parseInt(opt.paths.getAttribute(\"cy\"), 10);\n            const val = parseFloat(opt.paths.getAttribute(\"val\"));\n            j = parseInt(opt.paths.getAttribute(\"rel\"), 10);\n            i2 = parseInt(opt.paths.parentNode.parentNode.parentNode.getAttribute(\"rel\"), 10) - 1;\n            if (ttCtx.intersect) {\n                const el = $e4b487e979d7c06d$var$Utils$1.findAncestor(opt.paths, \"apexcharts-series\");\n                if (el) i2 = parseInt(el.getAttribute(\"data:realIndex\"), 10);\n            }\n            ttCtx.tooltipLabels.drawSeriesTexts({\n                ttItems: opt.ttItems,\n                i: i2,\n                j: j,\n                shared: ttCtx.showOnIntersect ? false : w2.config.tooltip.shared,\n                e: e2\n            });\n            if (e2.type === \"mouseup\") ttCtx.markerClick(e2, i2, j);\n            w2.interact.capturedSeriesIndex = i2;\n            w2.interact.capturedDataPointIndex = j;\n            const arrowEnabled = !!w2.config.tooltip.arrow;\n            x = cx;\n            if (arrowEnabled) y = cy;\n            else {\n                y = cy + w2.layout.translateY - ttCtx.tooltipRect.ttHeight * 1.4;\n                if (val < 0) y = cy;\n            }\n            if (ttCtx.w.config.tooltip.followCursor) {\n                const elGrid = ttCtx.getElGrid();\n                if (!elGrid) return {\n                    x: x,\n                    y: y\n                };\n                const seriesBound = elGrid.getBoundingClientRect();\n                y = ttCtx.e.clientY + w2.layout.translateY - seriesBound.top;\n            }\n            ttCtx.marker.enlargeCurrentPoint(j, opt.paths, x, y);\n        }\n        return {\n            x: x,\n            y: y\n        };\n    }\n    /**\n   * handle tooltips for bar/column charts\n   */ /** @param {{e: any, opt: any}} opts */ handleBarTooltip({ e: e2, opt: opt }) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        const tooltipEl = ttCtx.getElTooltip();\n        let bx = 0;\n        let x = 0;\n        let y = 0;\n        let i2 = 0;\n        let strokeWidth;\n        const barXY = this.getBarTooltipXY({\n            e: e2,\n            opt: opt\n        });\n        if (barXY.j === null && barXY.barHeight === 0 && barXY.barWidth === 0) return;\n        i2 = barXY.i;\n        const j = barXY.j;\n        w2.interact.capturedSeriesIndex = i2;\n        w2.interact.capturedDataPointIndex = j !== null ? j : w2.interact.capturedDataPointIndex;\n        if (w2.globals.isBarHorizontal && ttCtx.tooltipUtil.hasBars() || !w2.config.tooltip.shared) {\n            x = barXY.x;\n            y = barXY.y;\n            strokeWidth = Array.isArray(w2.config.stroke.width) ? w2.config.stroke.width[i2] : w2.config.stroke.width;\n            bx = x;\n        } else if (!w2.globals.comboCharts && !w2.config.tooltip.shared) bx = bx / 2;\n        if (isNaN(y)) y = w2.globals.svgHeight - ttCtx.tooltipRect.ttHeight;\n        if (x + ttCtx.tooltipRect.ttWidth > w2.layout.gridWidth) x = x - ttCtx.tooltipRect.ttWidth;\n        else if (x < 0) x = 0;\n        if (ttCtx.w.config.tooltip.followCursor) {\n            const elGrid = ttCtx.getElGrid();\n            if (!elGrid) return;\n        }\n        if (ttCtx.tooltip === null) ttCtx.tooltip = w2.dom.baseEl.querySelector(\".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)\");\n        if (!w2.config.tooltip.shared) {\n            if (w2.globals.comboBarCount > 0) ttCtx.tooltipPosition.moveXCrosshairs(bx + strokeWidth / 2);\n            else ttCtx.tooltipPosition.moveXCrosshairs(bx);\n        }\n        if (!ttCtx.fixedTooltip && (!w2.config.tooltip.shared || w2.globals.isBarHorizontal && ttCtx.tooltipUtil.hasBars())) {\n            y = y + w2.layout.translateY - ttCtx.tooltipRect.ttHeight / 2;\n            if (tooltipEl) {\n                const ttW = ttCtx.tooltipRect.ttWidth || 0;\n                const ttH = ttCtx.tooltipRect.ttHeight || 0;\n                const arrowEnabled = !!w2.config.tooltip.arrow;\n                const { barAnchorXInGrid: barAnchorXInGrid, barAnchorYInGrid: barAnchorYInGrid, barRectInGrid: barRectInGrid } = barXY;\n                const elGridRect = (_a = ttCtx.getElGrid()) == null ? void 0 : _a.getBoundingClientRect();\n                const elWrapRect = w2.dom.elWrap.getBoundingClientRect();\n                const gridOffsetXInElWrap = elGridRect ? elGridRect.left - elWrapRect.left : w2.layout.translateX;\n                let placement;\n                let arrowY = null;\n                let arrowX = null;\n                let finalX = x + gridOffsetXInElWrap;\n                let finalY = y;\n                if (arrowEnabled && w2.globals.isBarHorizontal && barRectInGrid != null) {\n                    const gridTop = w2.layout.translateY;\n                    const gridBottom = w2.layout.translateY + w2.layout.gridHeight;\n                    const gridLeft = gridOffsetXInElWrap;\n                    const gridRight = gridOffsetXInElWrap + w2.layout.gridWidth;\n                    const barCenterXInElWrap = (barRectInGrid.left + barRectInGrid.right) / 2 + gridOffsetXInElWrap;\n                    const barTopInElWrap = barRectInGrid.top + w2.layout.translateY;\n                    const barBottomInElWrap = barRectInGrid.bottom + w2.layout.translateY;\n                    let proposedTop = barTopInElWrap - ttH - $e4b487e979d7c06d$var$ARROW_TIP_OVERHANG;\n                    placement = \"top\";\n                    if (proposedTop < gridTop) {\n                        const belowTop = barBottomInElWrap + $e4b487e979d7c06d$var$ARROW_TIP_OVERHANG;\n                        if (belowTop + ttH <= gridBottom) {\n                            placement = \"bottom\";\n                            proposedTop = belowTop;\n                        }\n                    }\n                    finalY = proposedTop;\n                    finalX = barCenterXInElWrap - ttW / 2;\n                    if (finalX < gridLeft) finalX = gridLeft;\n                    if (finalX + ttW > gridRight) finalX = gridRight - ttW;\n                    arrowX = Math.max(10, Math.min(ttW - 10, barCenterXInElWrap - finalX));\n                } else if (arrowEnabled && barAnchorXInGrid != null && barAnchorYInGrid != null) {\n                    const barCenterXInElWrap = barAnchorXInGrid + gridOffsetXInElWrap;\n                    const gridCenterXInElWrap = gridOffsetXInElWrap + w2.layout.gridWidth / 2;\n                    const barLeftInElWrap = ((_b = barRectInGrid == null ? void 0 : barRectInGrid.left) != null ? _b : barAnchorXInGrid) + gridOffsetXInElWrap;\n                    const barRightInElWrap = ((_c = barRectInGrid == null ? void 0 : barRectInGrid.right) != null ? _c : barAnchorXInGrid) + gridOffsetXInElWrap;\n                    if (barCenterXInElWrap < gridCenterXInElWrap) {\n                        placement = \"right\";\n                        finalX = barRightInElWrap + $e4b487e979d7c06d$var$ARROW_TIP_OVERHANG;\n                    } else {\n                        placement = \"left\";\n                        finalX = barLeftInElWrap - ttW - $e4b487e979d7c06d$var$ARROW_TIP_OVERHANG;\n                    }\n                    if (barRectInGrid) {\n                        const barCenterYInElWrap = (barRectInGrid.top + barRectInGrid.bottom) / 2 + w2.layout.translateY;\n                        finalY = barCenterYInElWrap - ttH / 2;\n                        const gridTop = w2.layout.translateY;\n                        const gridBottom = w2.layout.translateY + w2.layout.gridHeight;\n                        if (finalY < gridTop) finalY = gridTop;\n                        if (finalY + ttH > gridBottom) finalY = gridBottom - ttH;\n                    }\n                    if (ttH > 0 && barRectInGrid) {\n                        const barCenterYInElWrap = (barRectInGrid.top + barRectInGrid.bottom) / 2 + w2.layout.translateY;\n                        arrowY = Math.max(10, Math.min(ttH - 10, barCenterYInElWrap - finalY));\n                    }\n                }\n                ttCtx.tooltipPosition.applyTooltipPosition(tooltipEl, {\n                    x: finalX,\n                    y: finalY,\n                    placement: placement,\n                    arrowY: arrowY,\n                    arrowX: arrowX\n                });\n            }\n        }\n    }\n    /** @param {{e: any, opt: any}} opts */ getBarTooltipXY({ e: e2, opt: opt }) {\n        const w2 = this.w;\n        let j = null;\n        const ttCtx = this.ttCtx;\n        let i2 = 0;\n        let x = 0;\n        let y = 0;\n        let barWidth = 0;\n        let barHeight = 0;\n        let barCx = null;\n        let barCy = null;\n        let barAnchorXInGrid = null;\n        let barAnchorYInGrid = null;\n        let barRectInGrid = null;\n        const cl = e2.target.classList;\n        if (cl.contains(\"apexcharts-bar-area\") || cl.contains(\"apexcharts-candlestick-area\") || cl.contains(\"apexcharts-boxPlot-area\") || cl.contains(\"apexcharts-rangebar-area\")) {\n            const bar = e2.target;\n            const barRect = bar.getBoundingClientRect();\n            const seriesBound = opt.elGrid.getBoundingClientRect();\n            const bh = barRect.height;\n            barHeight = barRect.height;\n            const bw = barRect.width;\n            const cx = parseInt(bar.getAttribute(\"cx\"), 10);\n            const cy = parseInt(bar.getAttribute(\"cy\"), 10);\n            barCx = cx;\n            barCy = cy;\n            barWidth = parseFloat(bar.getAttribute(\"barWidth\"));\n            const rectLeftInGrid = barRect.left - seriesBound.left;\n            const rectTopInGrid = barRect.top - seriesBound.top;\n            const rectCenterXInGrid = rectLeftInGrid + bw / 2;\n            const rectCenterYInGrid = rectTopInGrid + bh / 2;\n            barAnchorXInGrid = rectCenterXInGrid;\n            barAnchorYInGrid = w2.globals.isBarHorizontal ? rectCenterYInGrid : rectTopInGrid;\n            barRectInGrid = {\n                left: rectLeftInGrid,\n                top: rectTopInGrid,\n                right: rectLeftInGrid + bw,\n                bottom: rectTopInGrid + bh\n            };\n            const clientX = e2.type === \"touchmove\" ? e2.touches[0].clientX : e2.clientX;\n            j = parseInt(bar.getAttribute(\"j\"), 10);\n            i2 = parseInt(bar.parentNode.getAttribute(\"rel\"), 10) - 1;\n            const y1 = bar.getAttribute(\"data-range-y1\");\n            const y2 = bar.getAttribute(\"data-range-y2\");\n            if (w2.globals.comboCharts) i2 = parseInt(bar.parentNode.getAttribute(\"data:realIndex\"), 10);\n            const handleXForColumns = (x2)=>{\n                if (w2.axisFlags.isXNumeric) x2 = cx - bw / 2;\n                else if (this.isVerticalGroupedRangeBar) x2 = cx + bw / 2;\n                else x2 = cx - ttCtx.dataPointsDividedWidth + bw / 2;\n                return x2;\n            };\n            const handleYForBars = ()=>{\n                return cy - ttCtx.dataPointsDividedHeight + bh / 2 - ttCtx.tooltipRect.ttHeight / 2;\n            };\n            ttCtx.tooltipLabels.drawSeriesTexts({\n                ttItems: opt.ttItems,\n                i: i2,\n                j: j,\n                y1: y1 ? parseInt(y1, 10) : null,\n                y2: y2 ? parseInt(y2, 10) : null,\n                shared: ttCtx.showOnIntersect ? false : w2.config.tooltip.shared,\n                e: e2\n            });\n            if (w2.config.tooltip.followCursor) {\n                if (w2.globals.isBarHorizontal) {\n                    x = clientX - seriesBound.left + 15;\n                    y = handleYForBars();\n                } else {\n                    x = handleXForColumns(x);\n                    y = e2.clientY - seriesBound.top - ttCtx.tooltipRect.ttHeight / 2 - 15;\n                }\n            } else if (w2.globals.isBarHorizontal) {\n                x = cx;\n                if (ttCtx.xyRatios && x < ttCtx.xyRatios.baseLineInvertedY) x = cx - ttCtx.tooltipRect.ttWidth;\n                y = handleYForBars();\n            } else {\n                x = handleXForColumns(x);\n                y = cy;\n            }\n        }\n        return {\n            x: x,\n            y: y,\n            barHeight: barHeight,\n            barWidth: barWidth,\n            i: i2,\n            j: j,\n            barCx: // SVG attribute values — left for any caller that still wants them.\n            barCx,\n            barCy: barCy,\n            barAnchorXInGrid: // Arrow anchor in grid-local coords (rect-derived; column→top,\n            // horizontal→center). Used by handleBarTooltip to place the arrow\n            // exactly on the bar's data point.\n            barAnchorXInGrid,\n            barAnchorYInGrid: barAnchorYInGrid,\n            barRectInGrid: // Full rendered bar rect (grid-local). Used for top/bottom\n            // placement and flip-on-overflow detection.\n            barRectInGrid\n        };\n    }\n}\nclass $e4b487e979d7c06d$var$AxesTooltip {\n    /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */ constructor(tooltipContext){\n        this.w = tooltipContext.w;\n        this.ttCtx = tooltipContext;\n    }\n    /**\n   * This method adds the secondary tooltip which appears below x axis\n   * @memberof Tooltip\n   **/ drawXaxisTooltip() {\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        const isBottom = w2.config.xaxis.position === \"bottom\";\n        ttCtx.xaxisOffY = isBottom ? w2.layout.gridHeight + 1 : -w2.layout.xAxisHeight - w2.config.xaxis.axisTicks.height + 3;\n        const tooltipCssClass = isBottom ? \"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom\" : \"apexcharts-xaxistooltip apexcharts-xaxistooltip-top\";\n        const renderTo = w2.dom.elWrap;\n        if (ttCtx.isXAxisTooltipEnabled) {\n            const xaxisTooltip = w2.dom.baseEl.querySelector(\".apexcharts-xaxistooltip\");\n            if (xaxisTooltip === null) {\n                ttCtx.xaxisTooltip = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n                ttCtx.xaxisTooltip.setAttribute(\"class\", tooltipCssClass + \" apexcharts-theme-\" + w2.config.tooltip.theme);\n                renderTo.appendChild(ttCtx.xaxisTooltip);\n                ttCtx.xaxisTooltipText = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n                ttCtx.xaxisTooltipText.classList.add(\"apexcharts-xaxistooltip-text\");\n                ttCtx.xaxisTooltipText.style.fontFamily = w2.config.xaxis.tooltip.style.fontFamily || w2.config.chart.fontFamily;\n                ttCtx.xaxisTooltipText.style.fontSize = w2.config.xaxis.tooltip.style.fontSize;\n                ttCtx.xaxisTooltip.appendChild(ttCtx.xaxisTooltipText);\n            }\n        }\n    }\n    /**\n   * This method adds the secondary tooltip which appears below x axis\n   * @memberof Tooltip\n   **/ drawYaxisTooltip() {\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        for(let i2 = 0; i2 < w2.config.yaxis.length; i2++){\n            const isRight = w2.config.yaxis[i2].opposite || w2.config.yaxis[i2].crosshairs.opposite;\n            ttCtx.yaxisOffX = isRight ? w2.layout.gridWidth + 1 : 1;\n            const tooltipCssClass = isRight ? `apexcharts-yaxistooltip apexcharts-yaxistooltip-${i2} apexcharts-yaxistooltip-right` : `apexcharts-yaxistooltip apexcharts-yaxistooltip-${i2} apexcharts-yaxistooltip-left`;\n            const renderTo = w2.dom.elWrap;\n            const yaxisTooltip = w2.dom.baseEl.querySelector(`.apexcharts-yaxistooltip.apexcharts-yaxistooltip-${i2}`);\n            if (yaxisTooltip === null) {\n                ttCtx.yaxisTooltip = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n                ttCtx.yaxisTooltip.setAttribute(\"class\", tooltipCssClass + \" apexcharts-theme-\" + w2.config.tooltip.theme);\n                renderTo.appendChild(ttCtx.yaxisTooltip);\n                if (i2 === 0) ttCtx.yaxisTooltipText = [];\n                ttCtx.yaxisTooltipText[i2] = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n                ttCtx.yaxisTooltipText[i2].classList.add(\"apexcharts-yaxistooltip-text\");\n                ttCtx.yaxisTooltip.appendChild(/** @type {any} */ ttCtx.yaxisTooltipText[i2]);\n            }\n        }\n    }\n    /**\n   * @memberof Tooltip\n   **/ setXCrosshairWidth() {\n        var _a, _b;\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        const xcrosshairs = ttCtx.getElXCrosshairs();\n        ttCtx.xcrosshairsWidth = parseInt(w2.config.xaxis.crosshairs.width, 10);\n        if (!w2.globals.comboCharts) {\n            if (w2.config.xaxis.crosshairs.width === \"tickWidth\") {\n                const count = w2.labelData.labels.length;\n                ttCtx.xcrosshairsWidth = w2.layout.gridWidth / count;\n            } else if (w2.config.xaxis.crosshairs.width === \"barWidth\") {\n                const bar = w2.dom.baseEl.querySelector(\".apexcharts-bar-area\");\n                if (bar !== null) {\n                    const barWidth = parseFloat((_a = bar.getAttribute(\"barWidth\")) != null ? _a : \"0\");\n                    ttCtx.xcrosshairsWidth = barWidth;\n                } else ttCtx.xcrosshairsWidth = 1;\n            }\n        } else {\n            const bar = w2.dom.baseEl.querySelector(\".apexcharts-bar-area\");\n            if (bar !== null && w2.config.xaxis.crosshairs.width === \"barWidth\") {\n                const barWidth = parseFloat((_b = bar.getAttribute(\"barWidth\")) != null ? _b : \"0\");\n                ttCtx.xcrosshairsWidth = barWidth;\n            } else if (w2.config.xaxis.crosshairs.width === \"tickWidth\") {\n                const count = w2.labelData.labels.length;\n                ttCtx.xcrosshairsWidth = w2.layout.gridWidth / count;\n            }\n        }\n        if (w2.globals.isBarHorizontal) ttCtx.xcrosshairsWidth = 0;\n        if (xcrosshairs !== null && ttCtx.xcrosshairsWidth > 0) xcrosshairs.setAttribute(\"width\", String(ttCtx.xcrosshairsWidth));\n    }\n    handleYCrosshair() {\n        const w2 = this.w;\n        const ttCtx = this.ttCtx;\n        ttCtx.ycrosshairs = w2.dom.baseEl.querySelector(\".apexcharts-ycrosshairs\");\n        ttCtx.ycrosshairsHidden = w2.dom.baseEl.querySelector(\".apexcharts-ycrosshairs-hidden\");\n    }\n    /**\n   * @param {number} index\n   * @param {number} clientY\n   * @param {import('../../types/internal').XYRatios} xyRatios\n   */ drawYaxisTooltipText(index, clientY, xyRatios) {\n        const ttCtx = this.ttCtx;\n        const w2 = this.w;\n        const gl = w2.globals;\n        const yAxisSeriesArr = gl.seriesYAxisMap[index];\n        if (ttCtx.yaxisTooltips[index] && yAxisSeriesArr.length > 0) {\n            const lbFormatter = w2.formatters.yLabelFormatters[index];\n            const elGrid = ttCtx.getElGrid();\n            if (!elGrid) return;\n            const seriesBound = elGrid.getBoundingClientRect();\n            const seriesIndex = yAxisSeriesArr[0];\n            let translationsIndex = 0;\n            if (xyRatios.yRatio.length > 1) translationsIndex = seriesIndex;\n            const hoverY = (clientY - seriesBound.top) * xyRatios.yRatio[translationsIndex];\n            const height = gl.maxYArr[seriesIndex] - gl.minYArr[seriesIndex];\n            let val = gl.minYArr[seriesIndex] + (height - hoverY);\n            if (w2.config.yaxis[index].reversed) val = gl.maxYArr[seriesIndex] - (height - hoverY);\n            ttCtx.tooltipPosition.moveYCrosshairs(clientY - seriesBound.top);\n            ttCtx.yaxisTooltipText[index].innerHTML = lbFormatter(val);\n            ttCtx.tooltipPosition.moveYAxisTooltip(index);\n        }\n    }\n}\nclass $e4b487e979d7c06d$var$Tooltip {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.tConfig = w2.config.tooltip;\n        this.tooltipUtil = new $e4b487e979d7c06d$var$Utils2(this);\n        this.tooltipLabels = new $e4b487e979d7c06d$var$Labels(this);\n        this.tooltipPosition = new $e4b487e979d7c06d$var$Position(this);\n        this.marker = new $e4b487e979d7c06d$var$Marker(this);\n        this.intersect = new $e4b487e979d7c06d$var$Intersect(this);\n        this.axesTooltip = new $e4b487e979d7c06d$var$AxesTooltip(this);\n        this.showOnIntersect = this.tConfig.intersect;\n        this.showTooltipTitle = this.tConfig.x.show;\n        this.fixedTooltip = this.tConfig.fixed.enabled;\n        this.xaxisTooltip = null;\n        this.xaxisTooltipText = null;\n        this.yaxisTooltip = null;\n        this.yaxisTooltipText = null;\n        this.yaxisTTEls = null;\n        this.xaxisOffY = 0;\n        this.yaxisOffX = 0;\n        this.xcrosshairsWidth = 0;\n        this.ycrosshairs = null;\n        this.ycrosshairsHidden = null;\n        this.tooltip = null;\n        this.e = null;\n        this.isBarShared = !w2.globals.isBarHorizontal && this.tConfig.shared;\n        this.lastHoverTime = Date.now();\n        this.dimensionUpdateScheduled = false;\n        this.xyRatios = null;\n        this.isXAxisTooltipEnabled = false;\n        this.yaxisTooltips = [];\n        this.allTooltipSeriesGroups = [];\n        this.xAxisTicksPositions = null;\n        this.dataPointsDividedHeight = 0;\n        this.dataPointsDividedWidth = 0;\n        this.tooltipTitle = null;\n        this.legendLabels = null;\n        this.ttItems = null;\n        this.seriesBound = null;\n        this.seriesHoverTimeout = void 0;\n        this.clientX = 0;\n        this.clientY = 0;\n        this.barSeriesHeight = 0;\n        this.tooltipRect = {\n            x: 0,\n            y: 0,\n            ttWidth: 0,\n            ttHeight: 0\n        };\n    }\n    setupDimensionCache() {\n        const w2 = this.w;\n        const tooltipEl = this.getElTooltip();\n        if (!tooltipEl) return;\n        this.updateDimensionCache();\n        if (typeof ResizeObserver !== \"undefined\" && !w2.globals.resizeObserver) {\n            w2.globals.resizeObserver = new ResizeObserver(()=>{\n                if (!this.dimensionUpdateScheduled) {\n                    this.dimensionUpdateScheduled = true;\n                    requestAnimationFrame(()=>{\n                        this.updateDimensionCache();\n                        this.dimensionUpdateScheduled = false;\n                    });\n                }\n            });\n            w2.globals.resizeObserver.observe(tooltipEl);\n        }\n    }\n    updateDimensionCache() {\n        const w2 = this.w;\n        const tooltipEl = this.getElTooltip();\n        if (!tooltipEl) return;\n        const rect = tooltipEl.getBoundingClientRect();\n        w2.globals.dimensionCache.tooltip = /** @type {any} */ {\n            width: rect.width,\n            height: rect.height,\n            lastUpdate: Date.now()\n        };\n    }\n    getCachedDimensions() {\n        const w2 = this.w;\n        if (w2.globals.dimensionCache.tooltip) {\n            const cache2 = /** @type {Record<string,any>} */ w2.globals.dimensionCache.tooltip;\n            const age = Date.now() - cache2.lastUpdate;\n            if (age < 1e3) return {\n                ttWidth: cache2.width,\n                ttHeight: cache2.height\n            };\n        }\n        this.updateDimensionCache();\n        const cache = /** @type {Record<string,any>} */ w2.globals.dimensionCache.tooltip;\n        return cache ? {\n            ttWidth: cache.width,\n            ttHeight: cache.height\n        } : {\n            ttWidth: 0,\n            ttHeight: 0\n        };\n    }\n    /**\n   * @param {{ w: import('../../types/internal').ChartStateW }} [ctx]\n   * @returns {HTMLElement | null}\n   */ getElTooltip(ctx) {\n        if (!ctx) ctx = this;\n        if (!ctx.w.dom.baseEl) return null;\n        return /** @type {HTMLElement | null} */ ctx.w.dom.baseEl.querySelector(\".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)\");\n    }\n    getElXCrosshairs() {\n        return this.w.dom.baseEl.querySelector(\".apexcharts-xcrosshairs\");\n    }\n    getElGrid() {\n        return this.w.dom.baseEl.querySelector(\".apexcharts-grid\");\n    }\n    /**\n   * @param {import('../../types/internal').XYRatios} xyRatios\n   */ drawTooltip(xyRatios) {\n        const w2 = this.w;\n        this.xyRatios = xyRatios;\n        this.isXAxisTooltipEnabled = w2.config.xaxis.tooltip.enabled && w2.globals.axisCharts;\n        this.yaxisTooltips = w2.config.yaxis.map((y)=>{\n            return y.show && y.tooltip.enabled && w2.globals.axisCharts ? true : false;\n        });\n        this.allTooltipSeriesGroups = [];\n        if (!w2.globals.axisCharts) this.showTooltipTitle = false;\n        const existingTooltip = this.getElTooltip();\n        if (existingTooltip == null ? void 0 : existingTooltip.parentNode) existingTooltip.parentNode.removeChild(existingTooltip);\n        this.tooltipTitle = null;\n        const tooltipEl = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n        tooltipEl.classList.add(\"apexcharts-tooltip\");\n        if (w2.config.tooltip.cssClass) tooltipEl.classList.add(w2.config.tooltip.cssClass);\n        tooltipEl.classList.add(`apexcharts-theme-${this.tConfig.theme || \"light\"}`);\n        if (this.tConfig.fillSeriesColor) tooltipEl.classList.add(\"apexcharts-tooltip-fill-series\");\n        if (this.tConfig.style && this.tConfig.style.background) tooltipEl.style.setProperty(\"--apx-tt-bg\", this.tConfig.style.background);\n        const isSharedMulti = this.tConfig.shared && w2.config.series.length > 1 && !w2.globals.isBarHorizontal && w2.config.chart.type !== \"heatmap\";\n        const shouldDrawArrow = this.tConfig.arrow && !this.tConfig.followCursor && !this.tConfig.fixed.enabled && !isSharedMulti && !this.tConfig.fillSeriesColor && w2.globals.axisCharts;\n        if (shouldDrawArrow) {\n            const arrowEl = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n            arrowEl.classList.add(\"apexcharts-tooltip-arrow\");\n            tooltipEl.appendChild(arrowEl);\n        }\n        if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) {\n            tooltipEl.setAttribute(\"role\", \"tooltip\");\n            tooltipEl.setAttribute(\"aria-live\", \"polite\");\n            tooltipEl.setAttribute(\"aria-atomic\", \"true\");\n            tooltipEl.setAttribute(\"aria-hidden\", \"true\");\n        }\n        w2.dom.elWrap.appendChild(tooltipEl);\n        if (w2.globals.axisCharts) {\n            this.axesTooltip.drawXaxisTooltip();\n            this.axesTooltip.drawYaxisTooltip();\n            this.axesTooltip.setXCrosshairWidth();\n            this.axesTooltip.handleYCrosshair();\n            const xAxis = new $e4b487e979d7c06d$var$XAxis(this.w, this.ctx, void 0);\n            this.xAxisTicksPositions = xAxis.getXAxisTicksPositions();\n        }\n        if ((w2.globals.comboCharts || this.tConfig.intersect || w2.config.chart.type === \"rangeBar\") && !this.tConfig.shared) this.showOnIntersect = true;\n        if (w2.config.markers.size === 0 || w2.globals.markers.largestSize === 0) this.marker.drawDynamicPoints();\n        if (w2.globals.collapsedSeries.length === w2.seriesData.series.length) return;\n        this.dataPointsDividedHeight = w2.layout.gridHeight / w2.globals.dataPoints;\n        this.dataPointsDividedWidth = w2.layout.gridWidth / w2.globals.dataPoints;\n        if (this.showTooltipTitle) {\n            this.tooltipTitle = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n            this.tooltipTitle.classList.add(\"apexcharts-tooltip-title\");\n            this.tooltipTitle.style.fontFamily = this.tConfig.style.fontFamily || w2.config.chart.fontFamily;\n            this.tooltipTitle.style.fontSize = this.tConfig.style.fontSize;\n            tooltipEl.appendChild(this.tooltipTitle);\n        }\n        let ttItemsCnt = w2.seriesData.series.length;\n        if ((w2.globals.xyCharts || w2.globals.comboCharts) && this.tConfig.shared) {\n            if (!this.showOnIntersect) ttItemsCnt = w2.seriesData.series.length;\n            else ttItemsCnt = 1;\n        }\n        this.legendLabels = w2.dom.baseEl.querySelectorAll(\".apexcharts-legend-text\");\n        this.ttItems = this.createTTElements(ttItemsCnt);\n        this.addSVGEvents();\n        this.setupDimensionCache();\n    }\n    /**\n   * @param {number} ttItemsCnt\n   */ createTTElements(ttItemsCnt) {\n        const w2 = this.w;\n        const ttItems = [];\n        const tooltipEl = this.getElTooltip();\n        if (!tooltipEl) return ttItems;\n        for(let i2 = 0; i2 < ttItemsCnt; i2++){\n            const gTxt = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n            gTxt.classList.add(\"apexcharts-tooltip-series-group\", `apexcharts-tooltip-series-group-${i2}`);\n            gTxt.style.order = String(w2.config.tooltip.inverseOrder ? ttItemsCnt - i2 : i2 + 1);\n            const point = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"span\");\n            point.classList.add(\"apexcharts-tooltip-marker\");\n            if (w2.config.tooltip.fillSeriesColor) point.style.backgroundColor = w2.globals.colors[i2];\n            else point.style.color = w2.globals.colors[i2];\n            const mShape = w2.config.markers.shape;\n            let shape = mShape;\n            if (Array.isArray(mShape)) shape = mShape[i2];\n            point.setAttribute(\"shape\", shape);\n            point.innerHTML = $e4b487e979d7c06d$var$renderMarkerSVG(shape);\n            gTxt.appendChild(point);\n            const gYZ = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n            gYZ.classList.add(\"apexcharts-tooltip-text\");\n            gYZ.style.fontFamily = this.tConfig.style.fontFamily || w2.config.chart.fontFamily;\n            gYZ.style.fontSize = this.tConfig.style.fontSize;\n            [\n                \"y\",\n                \"goals\",\n                \"z\"\n            ].forEach((g2)=>{\n                const gValText = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n                gValText.classList.add(`apexcharts-tooltip-${g2}-group`);\n                const txtLabel = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"span\");\n                txtLabel.classList.add(`apexcharts-tooltip-text-${g2}-label`);\n                gValText.appendChild(txtLabel);\n                const txtValue = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"span\");\n                txtValue.classList.add(`apexcharts-tooltip-text-${g2}-value`);\n                gValText.appendChild(txtValue);\n                gYZ.appendChild(gValText);\n            });\n            gTxt.appendChild(gYZ);\n            tooltipEl.appendChild(gTxt);\n            ttItems.push(gTxt);\n        }\n        return ttItems;\n    }\n    addSVGEvents() {\n        const w2 = this.w;\n        const type = w2.config.chart.type;\n        const tooltipEl = this.getElTooltip();\n        if (!tooltipEl) return;\n        const commonBar = !!(type === \"bar\" || type === \"candlestick\" || type === \"boxPlot\" || type === \"violin\" || type === \"rangeBar\");\n        const chartWithmarkers = type === \"area\" || type === \"line\" || type === \"scatter\" || type === \"bubble\" || type === \"radar\";\n        const isPolarMarkerChart = chartWithmarkers && !w2.globals.xyCharts;\n        const hoverArea = w2.dom.Paper.node;\n        const elGrid = this.getElGrid();\n        if (elGrid) this.seriesBound = elGrid.getBoundingClientRect();\n        const tooltipY = [];\n        const tooltipX = [];\n        const seriesHoverParams = {\n            hoverArea: hoverArea,\n            elGrid: elGrid,\n            tooltipEl: tooltipEl,\n            tooltipY: tooltipY,\n            tooltipX: tooltipX,\n            ttItems: this.ttItems\n        };\n        let points;\n        if (w2.globals.axisCharts) {\n            if (chartWithmarkers) points = w2.dom.baseEl.querySelectorAll(\".apexcharts-series[data\\\\:longestSeries='true'] .apexcharts-marker\");\n            else if (commonBar) points = w2.dom.baseEl.querySelectorAll(\".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-violin-area, .apexcharts-series .apexcharts-rangebar-area\");\n            else if (type === \"heatmap\" || type === \"treemap\") points = w2.dom.baseEl.querySelectorAll(\".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap\");\n            if (points && points.length) for(let p2 = 0; p2 < points.length; p2++){\n                tooltipY.push(points[p2].getAttribute(\"cy\"));\n                tooltipX.push(points[p2].getAttribute(\"cx\"));\n            }\n        }\n        const validSharedChartTypes = w2.globals.xyCharts && !this.showOnIntersect || w2.globals.comboCharts && !this.showOnIntersect || commonBar && this.tooltipUtil.hasBars() && this.tConfig.shared;\n        if (validSharedChartTypes) this.addPathsEventListeners([\n            hoverArea\n        ], seriesHoverParams);\n        else if (commonBar && !w2.globals.comboCharts || chartWithmarkers && this.showOnIntersect || isPolarMarkerChart) this.addDatapointEventsListeners(seriesHoverParams);\n        else if (type === \"heatmap\" && w2.globals.activeRenderer && w2.globals.activeRenderer.kind === \"canvas\") this.addPathsEventListeners([\n            hoverArea\n        ], seriesHoverParams);\n        else if (!w2.globals.axisCharts || type === \"heatmap\" || type === \"treemap\") {\n            const seriesAll = w2.dom.baseEl.querySelectorAll(\".apexcharts-series\");\n            this.addPathsEventListeners(seriesAll, seriesHoverParams);\n        }\n        if (this.showOnIntersect) {\n            const lineAreaPoints = w2.dom.baseEl.querySelectorAll(\".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker\");\n            if (lineAreaPoints.length > 0) this.addPathsEventListeners(lineAreaPoints, seriesHoverParams);\n            if (this.tooltipUtil.hasBars() && !this.tConfig.shared) this.addDatapointEventsListeners(seriesHoverParams);\n        }\n    }\n    drawFixedTooltipRect() {\n        const w2 = this.w;\n        const tooltipEl = this.getElTooltip();\n        if (!tooltipEl) return {\n            x: 0,\n            y: 0,\n            ttWidth: 0,\n            ttHeight: 0\n        };\n        const tooltipRect = tooltipEl.getBoundingClientRect();\n        const ttWidth = tooltipRect.width + 10;\n        const ttHeight = tooltipRect.height + 10;\n        let x = this.tConfig.fixed.offsetX;\n        let y = this.tConfig.fixed.offsetY;\n        const fixed = this.tConfig.fixed.position.toLowerCase();\n        if (fixed.indexOf(\"right\") > -1) x = x + w2.globals.svgWidth - ttWidth + 10;\n        if (fixed.indexOf(\"bottom\") > -1) y = y + w2.globals.svgHeight - ttHeight - 10;\n        this.tooltipPosition.applyTooltipPosition(tooltipEl, {\n            x: x,\n            y: y\n        });\n        return {\n            x: x,\n            y: y,\n            ttWidth: ttWidth,\n            ttHeight: ttHeight\n        };\n    }\n    /**\n   * @param {Record<string, any>} seriesHoverParams\n   */ addDatapointEventsListeners(seriesHoverParams) {\n        const w2 = this.w;\n        const points = w2.dom.baseEl.querySelectorAll(\".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area\");\n        this.addPathsEventListeners(points, seriesHoverParams);\n    }\n    /**\n   * @param {any} paths\n   * @param {Record<string, any>} opts\n   */ addPathsEventListeners(paths, opts) {\n        const self = this;\n        for(let p2 = 0; p2 < paths.length; p2++){\n            const extendedOpts = {\n                paths: paths[p2],\n                tooltipEl: opts.tooltipEl,\n                tooltipY: opts.tooltipY,\n                tooltipX: opts.tooltipX,\n                elGrid: opts.elGrid,\n                hoverArea: opts.hoverArea,\n                ttItems: opts.ttItems\n            };\n            const events = [\n                \"mousemove\",\n                \"mouseup\",\n                \"touchmove\",\n                \"mouseout\",\n                \"touchend\"\n            ];\n            events.map((ev)=>{\n                return paths[p2].addEventListener(ev, self.onSeriesHover.bind(self, extendedOpts), {\n                    capture: false,\n                    passive: true\n                });\n            });\n        }\n    }\n    /*\n   ** Check to see if the tooltips should be updated based on a mouse / touch event\n   * @param {Record<string, any>} opt\n   * @param {Event} e\n   */ /** @param {Record<string, any>} opt @param {any} e */ onSeriesHover(opt, e2) {\n        const targetDelay = 20;\n        const timeSinceLastUpdate = Date.now() - this.lastHoverTime;\n        if (timeSinceLastUpdate >= targetDelay) this.seriesHover(opt, e2);\n        else {\n            clearTimeout(this.seriesHoverTimeout);\n            this.seriesHoverTimeout = setTimeout(()=>{\n                this.seriesHover(opt, e2);\n            }, targetDelay - timeSinceLastUpdate);\n        }\n    }\n    /*\n   ** The actual series hover function\n   * @param {Record<string, any>} opt\n   * @param {Event} e\n   */ /** @param {Record<string, any>} opt @param {any} e */ seriesHover(opt, e2) {\n        if (this.w.globals.isDestroyed) return;\n        this.lastHoverTime = Date.now();\n        let chartGroups = [];\n        const w2 = this.w;\n        const isCfMember = (chart)=>{\n            var _a, _b, _c;\n            const link = (_c = (_b = (_a = chart == null ? void 0 : chart.w) == null ? void 0 : _a.config) == null ? void 0 : _b.chart) == null ? void 0 : _c.link;\n            return !!(link && typeof link.dimension === \"function\");\n        };\n        if (w2.config.chart.group && !isCfMember(this.ctx)) chartGroups = this.ctx.getSyncedCharts().filter((ch)=>!isCfMember(ch));\n        if (w2.globals.axisCharts && (w2.globals.minX === -Infinity && w2.globals.maxX === Infinity || w2.globals.dataPoints === 0)) return;\n        if (chartGroups.length) chartGroups.forEach((ch)=>{\n            const tooltipEl = this.getElTooltip(ch);\n            const newOpts = {\n                paths: opt.paths,\n                tooltipEl: tooltipEl,\n                tooltipY: opt.tooltipY,\n                tooltipX: opt.tooltipX,\n                elGrid: opt.elGrid,\n                hoverArea: opt.hoverArea,\n                ttItems: ch.w.globals.tooltip.ttItems\n            };\n            if (ch.w.globals.minX === this.w.globals.minX && ch.w.globals.maxX === this.w.globals.maxX) ch.w.globals.tooltip.seriesHoverByContext({\n                chartCtx: ch,\n                ttCtx: ch.w.globals.tooltip,\n                opt: newOpts,\n                e: e2\n            });\n        });\n        else this.seriesHoverByContext({\n            chartCtx: this.ctx,\n            ttCtx: this.w.globals.tooltip,\n            opt: opt,\n            e: e2\n        });\n    }\n    /** @param {{chartCtx: any, ttCtx: any, opt: any, e: any}} opts */ seriesHoverByContext({ chartCtx: chartCtx, ttCtx: ttCtx, opt: opt, e: e2 }) {\n        const w2 = chartCtx.w;\n        const tooltipEl = this.getElTooltip(chartCtx);\n        if (!tooltipEl) return;\n        const cachedDims = ttCtx.getCachedDimensions();\n        ttCtx.tooltipRect = {\n            x: 0,\n            y: 0,\n            ttWidth: cachedDims.ttWidth,\n            ttHeight: cachedDims.ttHeight\n        };\n        ttCtx.e = e2;\n        if (ttCtx.tooltipUtil.hasBars() && !w2.globals.comboCharts && !ttCtx.isBarShared) {\n            if (this.tConfig.onDatasetHover.highlightDataSeries) {\n                const series = new $e4b487e979d7c06d$var$Series(chartCtx.w);\n                series.toggleSeriesOnHover(e2, e2.target.parentNode);\n            }\n        }\n        if (w2.globals.axisCharts) ttCtx.axisChartsTooltips({\n            e: e2,\n            opt: opt,\n            tooltipRect: ttCtx.tooltipRect\n        });\n        else ttCtx.nonAxisChartsTooltips({\n            e: e2,\n            opt: opt,\n            tooltipRect: ttCtx.tooltipRect\n        });\n        if (ttCtx.fixedTooltip) ttCtx.drawFixedTooltipRect();\n    }\n    // tooltip handling for line/area/bar/columns/scatter\n    /** @param {{e: any, opt: any}} opts */ axisChartsTooltips({ e: e2, opt: opt }) {\n        var _a;\n        const w2 = this.w;\n        let x, y;\n        if (!opt.elGrid) return;\n        const seriesBound = opt.elGrid.getBoundingClientRect();\n        const clientX = e2.type === \"touchmove\" ? e2.touches[0].clientX : e2.clientX;\n        const clientY = e2.type === \"touchmove\" ? e2.touches[0].clientY : e2.clientY;\n        this.clientY = clientY;\n        this.clientX = clientX;\n        w2.interact.capturedSeriesIndex = -1;\n        w2.interact.capturedDataPointIndex = -1;\n        if (clientY < seriesBound.top || clientY > seriesBound.top + seriesBound.height) {\n            this.handleMouseOut(opt);\n            return;\n        }\n        if (w2.dom.elWrap.querySelector(\".apexcharts-annotation-tooltip.apexcharts-active\")) {\n            this.handleMouseOut(opt);\n            return;\n        }\n        if (Array.isArray(this.tConfig.enabledOnSeries) && !w2.config.tooltip.shared) {\n            const index = parseInt(opt.paths.getAttribute(\"index\"), 10);\n            if (this.tConfig.enabledOnSeries.indexOf(index) < 0) {\n                this.handleMouseOut(opt);\n                return;\n            }\n        }\n        const tooltipEl = this.getElTooltip();\n        if (!tooltipEl) return;\n        const xcrosshairs = this.getElXCrosshairs();\n        let syncedCharts = [];\n        if (w2.config.chart.group) syncedCharts = this.ctx.getSyncedCharts();\n        const isStickyTooltip = w2.globals.xyCharts || w2.config.chart.type === \"bar\" && !w2.globals.isBarHorizontal && this.tooltipUtil.hasBars() && this.tConfig.shared || w2.globals.comboCharts && this.tooltipUtil.hasBars();\n        if (e2.type === \"mousemove\" || e2.type === \"touchmove\" || e2.type === \"mouseup\") {\n            if (w2.globals.collapsedSeries.length + w2.globals.ancillaryCollapsedSeries.length === w2.seriesData.series.length) return;\n            if (xcrosshairs !== null) xcrosshairs.classList.add(\"apexcharts-active\");\n            const hasYAxisTooltip = (_a = this.yaxisTooltips) == null ? void 0 : _a.filter((b2)=>{\n                return b2 === true;\n            });\n            const _yc = /** @type {any} */ this.ycrosshairs;\n            if (_yc !== null && (hasYAxisTooltip == null ? void 0 : hasYAxisTooltip.length)) _yc.classList.add(\"apexcharts-active\");\n            if (isStickyTooltip && !this.showOnIntersect || syncedCharts.length > 1) this.handleStickyTooltip(e2, clientX, clientY, opt);\n            else if (w2.config.chart.type === \"heatmap\" || w2.config.chart.type === \"treemap\") {\n                const markerXY = this.intersect.handleHeatTreeTooltip({\n                    e: e2,\n                    opt: opt,\n                    x: x,\n                    y: y,\n                    type: w2.config.chart.type\n                });\n                if (markerXY.noHit) {\n                    this.handleMouseOut(opt);\n                    return;\n                }\n                x = markerXY.x;\n                y = markerXY.y;\n                if (!markerXY.positioned) {\n                    tooltipEl.style.left = x + \"px\";\n                    tooltipEl.style.top = y + \"px\";\n                }\n            } else {\n                if (this.tooltipUtil.hasBars()) this.intersect.handleBarTooltip({\n                    e: e2,\n                    opt: opt\n                });\n                if (this.tooltipUtil.hasMarkers(0)) this.intersect.handleMarkerTooltip({\n                    e: e2,\n                    opt: opt,\n                    x: x,\n                    y: y\n                });\n            }\n            if (this.yaxisTooltips && this.yaxisTooltips.length) for(let yt = 0; yt < w2.config.yaxis.length; yt++)this.axesTooltip.drawYaxisTooltipText(yt, clientY, /** @type {import('../../types/internal').XYRatios} */ this.xyRatios);\n            w2.dom.baseEl.classList.add(\"apexcharts-tooltip-active\");\n            opt.tooltipEl.classList.add(\"apexcharts-active\");\n            if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) opt.tooltipEl.removeAttribute(\"aria-hidden\");\n        } else if (e2.type === \"mouseout\" || e2.type === \"touchend\") this.handleMouseOut(opt);\n    }\n    /**\n   * Where a pie / donut / polarArea slice wants its tooltip anchored, in\n   * elWrap-relative pixels.\n   *\n   * Pie.js stamps the arc centroid on the path as `data:cx` / `data:cy`, in\n   * the slice's OWN user space: below the inner group's translate, and below\n   * the pie group's customScale. Reading those as if they were SVG-root\n   * coordinates silently drops both, and the inner translate is exactly the\n   * offset that centres a pie in a chart wider than it is tall, so on such a\n   * chart the tooltip landed a couple of hundred pixels to the left of the\n   * slice it described. The element's screen matrix accounts for every\n   * ancestor transform at once, including the translate a slice picks up while\n   * it is slid out on click.\n   *\n   * @param {any} el a slice path carrying data:cx / data:cy\n   * @returns {{x: number, y: number} | null} null when it carries neither\n   */ getSliceAnchor(el) {\n        var _a, _b;\n        const w2 = this.w;\n        const cx = parseFloat((_a = el == null ? void 0 : el.getAttribute(\"data:cx\")) != null ? _a : \"\");\n        const cy = parseFloat((_b = el == null ? void 0 : el.getAttribute(\"data:cy\")) != null ? _b : \"\");\n        if (isNaN(cx) || isNaN(cy)) return null;\n        const wrapBound = w2.dom.elWrap.getBoundingClientRect();\n        const ctm = typeof el.getScreenCTM === \"function\" ? el.getScreenCTM() : null;\n        if (!ctm) {\n            const svgBound = w2.dom.Paper.node.getBoundingClientRect();\n            return {\n                x: svgBound.left - wrapBound.left + cx,\n                y: svgBound.top - wrapBound.top + cy\n            };\n        }\n        return {\n            x: ctm.a * cx + ctm.c * cy + ctm.e - wrapBound.left,\n            y: ctm.b * cx + ctm.d * cy + ctm.f - wrapBound.top\n        };\n    }\n    // tooltip handling for pie/donuts\n    /** @param {{e: any, opt: any, tooltipRect: any}} opts */ nonAxisChartsTooltips({ e: e2, opt: opt, tooltipRect: tooltipRect }) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        const rel = opt.paths.getAttribute(\"rel\");\n        const tooltipEl = this.getElTooltip();\n        if (!tooltipEl) return;\n        const seriesBound = w2.dom.elWrap.getBoundingClientRect();\n        if (e2.type === \"mousemove\" || e2.type === \"touchmove\") {\n            w2.dom.baseEl.classList.add(\"apexcharts-tooltip-active\");\n            tooltipEl.classList.add(\"apexcharts-active\");\n            if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) tooltipEl.removeAttribute(\"aria-hidden\");\n            if (w2.config.chart.type === \"unit\") {\n                const unitDot = e2.target && typeof e2.target.closest === \"function\" ? e2.target.closest(\".apexcharts-unit-area\") : null;\n                if (!unitDot) return;\n                this.renderUnitTooltip(unitDot);\n            } else this.tooltipLabels.drawSeriesTexts({\n                ttItems: opt.ttItems,\n                i: parseInt(rel, 10) - 1,\n                shared: false\n            });\n            let x, y;\n            const arcPath = opt.paths.querySelector(\"path[data\\\\:cx]\") || opt.paths;\n            const anchor = w2.config.tooltip.intersect ? this.getSliceAnchor(arcPath) : null;\n            if (anchor) {\n                x = anchor.x - tooltipRect.ttWidth / 2;\n                y = anchor.y - tooltipRect.ttHeight - 10;\n            } else {\n                x = ((_a = w2.interact.clientX) != null ? _a : 0) - seriesBound.left - tooltipRect.ttWidth / 2;\n                y = ((_b = w2.interact.clientY) != null ? _b : 0) - seriesBound.top - tooltipRect.ttHeight - 10;\n            }\n            tooltipEl.style.left = x + \"px\";\n            tooltipEl.style.top = y + \"px\";\n            if (w2.config.legend.tooltipHoverFormatter) {\n                const legendFormatter = w2.config.legend.tooltipHoverFormatter;\n                const i2 = rel - 1;\n                const legendEl = /** @type {HTMLElement | undefined} */ (_c = this.legendLabels) == null ? void 0 : _c[i2];\n                if (!legendEl) return;\n                const legendName = legendEl.getAttribute(\"data:default-text\");\n                const text = legendFormatter(legendName, {\n                    seriesIndex: i2,\n                    dataPointIndex: i2,\n                    w: w2\n                });\n                legendEl.innerHTML = text;\n            }\n        } else if (e2.type === \"mouseout\" || e2.type === \"touchend\") {\n            tooltipEl.classList.remove(\"apexcharts-active\");\n            w2.dom.baseEl.classList.remove(\"apexcharts-tooltip-active\");\n            if (w2.config.legend.tooltipHoverFormatter) (_d = this.legendLabels) == null || _d.forEach((l2)=>{\n                const defaultText = l2.getAttribute(\"data:default-text\");\n                l2.innerHTML = decodeURIComponent(defaultText != null ? defaultText : \"\");\n            });\n        }\n    }\n    /**\n   * Fill the tooltip for one hovered unit-chart dot. Each dot carries `i` (its\n   * category / series index) and `j` (its index within that category). The\n   * default body reads \"#<j+1> of <count>\"; `plotOptions.unit.tooltip.formatter`\n   * overrides just the body text (it is handed i/j so it can look up per-unit\n   * data), and the global `tooltip.custom` still overrides the whole markup.\n   * @param {Element} dotEl the hovered `.apexcharts-unit-area` node\n   */ renderUnitTooltip(dotEl) {\n        var _a, _b, _c, _d, _e;\n        const w2 = this.w;\n        const tooltipEl = this.getElTooltip();\n        if (!tooltipEl) return;\n        const i2 = parseInt(dotEl.getAttribute(\"i\") || \"0\", 10);\n        const j = parseInt(dotEl.getAttribute(\"j\") || \"0\", 10);\n        if (typeof w2.config.tooltip.custom === \"function\") {\n            this.tooltipLabels.handleCustomTooltip({\n                i: i2,\n                j: j,\n                y1: null,\n                y2: null,\n                w: w2\n            });\n            return;\n        }\n        const seriesName = w2.seriesData.seriesNames[i2] || `series-${i2 + 1}`;\n        const value = Math.round(Number(w2.seriesData.series[i2]) || 0);\n        const group = dotEl.parentNode;\n        const count = group && group.querySelectorAll ? group.querySelectorAll(\".apexcharts-unit-area\").length : value;\n        const unitOpts = w2.config.plotOptions.unit || {};\n        const unitValue = unitOpts.unitValue > 0 ? unitOpts.unitValue : 1;\n        const catData = w2.seriesData.unitData && w2.seriesData.unitData[i2];\n        const datum = catData ? catData[j] : void 0;\n        const datumObj = datum && typeof datum === \"object\" ? datum : null;\n        const color = datumObj && datumObj.fillColor || w2.globals.colors && w2.globals.colors[i2] || \"#008FFB\";\n        let body;\n        const fmt = unitOpts.tooltip && unitOpts.tooltip.formatter;\n        if (typeof fmt === \"function\") body = fmt({\n            seriesName: seriesName,\n            seriesIndex: i2,\n            dataPointIndex: j,\n            count: count,\n            value: value,\n            unitValue: unitValue,\n            datum: datum,\n            color: color,\n            w: w2\n        });\n        else if (datum !== void 0 && datum !== null) {\n            const label = datumObj ? (_c = (_b = (_a = datumObj.name) != null ? _a : datumObj.label) != null ? _b : datumObj.x) != null ? _c : null : null;\n            const dVal = datumObj ? (_e = (_d = datumObj.value) != null ? _d : datumObj.y) != null ? _e : null : datum;\n            body = label != null && dVal != null ? `${label}: ${dVal}` : label != null ? String(label) : dVal != null ? String(dVal) : `#${(j + 1).toLocaleString()} of ${count.toLocaleString()}`;\n        } else {\n            body = `#${(j + 1).toLocaleString()} of ${count.toLocaleString()}`;\n            if (unitValue !== 1) body += ` &middot; ${unitValue.toLocaleString()} per dot`;\n        }\n        const fontFamily = w2.config.chart.fontFamily || \"inherit\";\n        const fontSize = w2.config.tooltip.style && w2.config.tooltip.style.fontSize || \"12px\";\n        const arrowEl = tooltipEl.querySelector(\".apexcharts-tooltip-arrow\");\n        tooltipEl.innerHTML = `<div class=\"apexcharts-tooltip-title\" style=\"font-family: ${fontFamily}; font-size: ${fontSize};\">${seriesName}</div><div class=\"apexcharts-tooltip-series-group apexcharts-active\" style=\"display: flex;\"><span class=\"apexcharts-tooltip-marker\" style=\"background-color: ${color};\"></span><div class=\"apexcharts-tooltip-text\" style=\"font-family: ${fontFamily}; font-size: ${fontSize};\"><div class=\"apexcharts-tooltip-y-group\"><span class=\"apexcharts-tooltip-text-y-value\">${body}</span></div></div></div>`;\n        if (arrowEl) tooltipEl.appendChild(arrowEl);\n        const rect = tooltipEl.getBoundingClientRect();\n        this.tooltipRect.ttWidth = rect.width;\n        this.tooltipRect.ttHeight = rect.height;\n    }\n    /**\n   * @param {Event} e\n   * @param {number} clientX\n   * @param {number} clientY\n   * @param {Record<string, any>} opt\n   */ handleStickyTooltip(e2, clientX, clientY, opt) {\n        const w2 = this.w;\n        const capj = this.tooltipUtil.getNearestValues({\n            context: this,\n            hoverArea: opt.hoverArea,\n            elGrid: opt.elGrid,\n            clientX: clientX,\n            clientY: clientY\n        });\n        const j = capj.j;\n        let capturedSeries = capj.capturedSeries;\n        if (capturedSeries !== null && w2.globals.collapsedSeriesIndices.includes(capturedSeries != null ? capturedSeries : -1)) capturedSeries = null;\n        const edgePad = w2.globals.barPadForNumericAxis || 0;\n        if (capj.hoverX < -edgePad || capj.hoverX > w2.layout.gridWidth + edgePad) {\n            this.handleMouseOut(opt);\n            return;\n        }\n        if (capturedSeries !== null) this.handleStickyCapturedSeries(e2, capturedSeries != null ? capturedSeries : -1, opt, j != null ? j : 0);\n        else if (this.tooltipUtil.isXoverlap(j != null ? j : 0) || w2.globals.isBarHorizontal) {\n            const firstVisibleSeries = w2.seriesData.series.findIndex(/**\n           * @param {any} s\n           * @param {number} i\n           */ (s2, i2)=>!w2.globals.collapsedSeriesIndices.includes(i2));\n            this.create(e2, this, firstVisibleSeries, j != null ? j : 0, opt.ttItems);\n        }\n    }\n    /**\n   * @param {Event} e\n   * @param {number} capturedSeries\n   * @param {Record<string, any>} opt\n   * @param {number} j\n   */ handleStickyCapturedSeries(e2, capturedSeries, opt, j) {\n        const w2 = this.w;\n        if (!this.tConfig.shared) {\n            const ignoreNull = w2.seriesData.series[capturedSeries][j] === null;\n            if (ignoreNull) {\n                this.handleMouseOut(opt);\n                return;\n            }\n        }\n        if (typeof w2.seriesData.series[capturedSeries][j] !== \"undefined\") {\n            if (this.tConfig.shared && this.tooltipUtil.isXoverlap(j) && this.tooltipUtil.isInitialSeriesSameLen()) this.create(e2, this, capturedSeries, j, opt.ttItems);\n            else this.create(e2, this, capturedSeries, j, opt.ttItems, false);\n        } else if (this.tooltipUtil.isXoverlap(j)) {\n            const firstVisibleSeries = w2.seriesData.series.findIndex(/**\n           * @param {any} s\n           * @param {number} i\n           */ (s2, i2)=>!w2.globals.collapsedSeriesIndices.includes(i2));\n            this.create(e2, this, firstVisibleSeries, j, opt.ttItems);\n        }\n    }\n    deactivateHoverFilter() {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n        const allPaths = w2.dom.Paper.find(`.apexcharts-bar-area`);\n        for(let b2 = 0; b2 < allPaths.length; b2++)graphics.pathMouseLeave(/** @type {any} */ allPaths[b2], /** @type {any} */ void 0);\n    }\n    /**\n   * @param {Record<string, any>} opt\n   */ handleMouseOut(opt) {\n        var _a, _b;\n        const w2 = this.w;\n        const xcrosshairs = this.getElXCrosshairs();\n        w2.dom.baseEl.classList.remove(\"apexcharts-tooltip-active\");\n        opt.tooltipEl.classList.remove(\"apexcharts-active\");\n        delete opt.tooltipEl.dataset.positioned;\n        if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) opt.tooltipEl.setAttribute(\"aria-hidden\", \"true\");\n        this.deactivateHoverFilter();\n        if (w2.config.chart.type !== \"bubble\") this.marker.resetPointsSize();\n        if (xcrosshairs !== null) xcrosshairs.classList.remove(\"apexcharts-active\");\n        const _yc2 = /** @type {any} */ this.ycrosshairs;\n        if (_yc2 !== null) _yc2.classList.remove(\"apexcharts-active\");\n        if (this.isXAxisTooltipEnabled) (_a = this.xaxisTooltip) == null || _a.classList.remove(\"apexcharts-active\");\n        if (this.yaxisTooltips && this.yaxisTooltips.length) {\n            if (this.yaxisTTEls === null) this.yaxisTTEls = /** @type {HTMLElement[]} */ [\n                ...w2.dom.baseEl.querySelectorAll(\".apexcharts-yaxistooltip\")\n            ];\n            for(let i2 = 0; i2 < this.yaxisTTEls.length; i2++)this.yaxisTTEls[i2].classList.remove(\"apexcharts-active\");\n        }\n        if (w2.config.legend.tooltipHoverFormatter) (_b = this.legendLabels) == null || _b.forEach((l2)=>{\n            const defaultText = l2.getAttribute(\"data:default-text\");\n            l2.innerHTML = decodeURIComponent(defaultText != null ? defaultText : \"\");\n        });\n    }\n    /**\n   * @param {Event} e\n   * @param {number} seriesIndex\n   * @param {number} dataPointIndex\n   */ markerClick(e2, seriesIndex, dataPointIndex) {\n        const w2 = this.w;\n        if (typeof w2.config.chart.events.markerClick === \"function\") w2.config.chart.events.markerClick(e2, this.ctx, {\n            seriesIndex: seriesIndex,\n            dataPointIndex: dataPointIndex,\n            w: w2\n        });\n        this.ctx.events.fireEvent(\"markerClick\", [\n            e2,\n            this.ctx,\n            {\n                seriesIndex: seriesIndex,\n                dataPointIndex: dataPointIndex,\n                w: w2\n            }\n        ]);\n    }\n    /**\n   * Marks (#11): whether the chart's type (or any series' type) is a registered\n   * custom series, whose marks live outside the built-in marker DOM.\n   * @returns {boolean}\n   */ _hasCustomSeries() {\n        const w2 = this.w;\n        if ($e4b487e979d7c06d$var$isCustom(w2.config.chart.type)) return true;\n        const series = w2.config.series || [];\n        return series.some((s2)=>s2 && s2.type && $e4b487e979d7c06d$var$isCustom(s2.type));\n    }\n    /**\n   * @param {Event} e\n   * @param {any} context\n   * @param {number} capturedSeries\n   * @param {number} j\n   * @param {any} ttItems\n   * @param {boolean | null} shared\n   */ create(e2, context, capturedSeries, j, ttItems, shared = null) {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;\n        const w2 = this.w;\n        const ttCtx = context;\n        if (e2.type === \"mouseup\") this.markerClick(e2, capturedSeries, j);\n        if (shared === null) shared = this.tConfig.shared;\n        const hasMarkers = this.tooltipUtil.hasMarkers(capturedSeries);\n        const canvasMode = ((_b = (_a = this.ctx) == null ? void 0 : _a.renderer) == null ? void 0 : _b.kind) === \"canvas\";\n        const canvasNonBar = canvasMode && !this.tooltipUtil.hasBars();\n        const marksMode = !canvasMode && !hasMarkers && !this.tooltipUtil.hasBars() && this._hasCustomSeries();\n        const dynamicPoints = canvasNonBar || marksMode;\n        const bars = this.tooltipUtil.getElBars();\n        const handlePoints = ()=>{\n            if (w2.globals.markers.largestSize > 0 && !canvasMode) ttCtx.marker.enlargePoints(j);\n            else ttCtx.tooltipPosition.moveDynamicPointsOnHover(j);\n        };\n        if (w2.config.legend.tooltipHoverFormatter) {\n            const legendFormatter = w2.config.legend.tooltipHoverFormatter;\n            const els = /** @type {HTMLElement[]} */ Array.from((_c = this.legendLabels) != null ? _c : []);\n            els.forEach((l2)=>{\n                const legendName = l2.getAttribute(\"data:default-text\");\n                l2.innerHTML = decodeURIComponent(legendName != null ? legendName : \"\");\n            });\n            for(let i2 = 0; i2 < els.length; i2++){\n                const l2 = els[i2];\n                const lsIndex = parseInt((_d = l2.getAttribute(\"i\")) != null ? _d : \"\", 10);\n                const legendName = decodeURIComponent((_e = l2.getAttribute(\"data:default-text\")) != null ? _e : \"\");\n                const text = legendFormatter(legendName, {\n                    seriesIndex: shared ? lsIndex : capturedSeries,\n                    dataPointIndex: j,\n                    w: w2\n                });\n                if (!shared) {\n                    l2.innerHTML = lsIndex === capturedSeries ? text : legendName;\n                    if (capturedSeries === lsIndex) break;\n                } else l2.innerHTML = w2.globals.collapsedSeriesIndices.indexOf(lsIndex) < 0 ? text : legendName;\n            }\n        }\n        const _rangeData = /** @type {any} */ w2.rangeData;\n        const commonSeriesTextsParams = $e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({\n            ttItems: ttItems,\n            i: capturedSeries,\n            j: j\n        }, ((_i = (_h = (_g = (_f = _rangeData.seriesRange) == null ? void 0 : _f[capturedSeries]) == null ? void 0 : _g[j]) == null ? void 0 : _h.y[0]) == null ? void 0 : _i.y1) !== void 0 && {\n            y1: (_m = (_l = (_k = (_j = _rangeData.seriesRange) == null ? void 0 : _j[capturedSeries]) == null ? void 0 : _k[j]) == null ? void 0 : _l.y[0]) == null ? void 0 : _m.y1\n        }), ((_q = (_p = (_o = (_n = _rangeData.seriesRange) == null ? void 0 : _n[capturedSeries]) == null ? void 0 : _o[j]) == null ? void 0 : _p.y[0]) == null ? void 0 : _q.y2) !== void 0 && {\n            y2: (_u = (_t = (_s = (_r = _rangeData.seriesRange) == null ? void 0 : _r[capturedSeries]) == null ? void 0 : _s[j]) == null ? void 0 : _t.y[0]) == null ? void 0 : _u.y2\n        });\n        if (shared) {\n            ttCtx.tooltipLabels.drawSeriesTexts($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, commonSeriesTextsParams), {\n                shared: this.showOnIntersect ? false : this.tConfig.shared\n            }));\n            if (hasMarkers || dynamicPoints) handlePoints();\n            else if (this.tooltipUtil.hasBars()) {\n                if (canvasMode) ttCtx.tooltipPosition.moveStickyTooltipOverBars(j, capturedSeries);\n                this.barSeriesHeight = this.tooltipUtil.getBarsHeight(/** @type {any[]} */ [\n                    ...bars\n                ]);\n                if (this.barSeriesHeight > 0) {\n                    const graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n                    const paths = w2.dom.Paper.find(`.apexcharts-bar-area[j='${j}']`);\n                    this.deactivateHoverFilter();\n                    const points = ttCtx.tooltipUtil.getAllMarkers(true);\n                    if (points.length && !this.barSeriesHeight) handlePoints();\n                    ttCtx.tooltipPosition.moveStickyTooltipOverBars(j, capturedSeries);\n                    for(let b2 = 0; b2 < paths.length; b2++)graphics.pathMouseEnter(/** @type {any} */ paths[b2], /** @type {any} */ void 0);\n                }\n            }\n        } else {\n            ttCtx.tooltipLabels.drawSeriesTexts($e4b487e979d7c06d$var$__spreadValues({\n                shared: false\n            }, commonSeriesTextsParams));\n            if (this.tooltipUtil.hasBars()) ttCtx.tooltipPosition.moveStickyTooltipOverBars(j, capturedSeries);\n            if (hasMarkers) ttCtx.tooltipPosition.moveMarkers(capturedSeries, j);\n            else if (dynamicPoints) ttCtx.tooltipPosition.moveDynamicPointOnHover(j, capturedSeries);\n        }\n    }\n}\nclass $e4b487e979d7c06d$var$SvgRenderer {\n    /**\n   * @param {any} w\n   * @param {any} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.kind = \"svg\";\n    }\n    // ── lifecycle (SVG builds its layer via the existing plotChartType flow) ──\n    beginSeries() {}\n    present() {\n        return null;\n    }\n    clear() {}\n    // ── emit primitives (delegate to Graphics: the canvas renderer mirrors\n    //    this exact surface) ──\n    /** @param {any} attrs */ group(attrs) {\n        return this.ctx.graphics.group(attrs);\n    }\n    /** @param {any} opts */ drawPath(opts) {\n        return this.ctx.graphics.drawPath(opts);\n    }\n    /** @param {any[]} args */ drawLine(...args) {\n        return this.ctx.graphics.drawLine(...args);\n    }\n    /** @param {any[]} args */ drawRect(...args) {\n        return this.ctx.graphics.drawRect(...args);\n    }\n    /**\n   * @param {number} r\n   * @param {any} attrs\n   */ drawCircle(r2, attrs) {\n        return this.ctx.graphics.drawCircle(r2, attrs);\n    }\n    /** @param {any} opts */ drawText(opts) {\n        return this.ctx.graphics.drawText(opts);\n    }\n    /**\n   * A series mark path (animation-aware). Faithful passthrough to Graphics.\n   * Note: the SVG emit path in the per-type draw() methods routes through\n   * `seriesEmitter`, which returns the caller's own `Graphics` in SVG mode: so\n   * this method is the interface contract surface (mirrored by the canvas\n   * renderer), not the hot path.\n   * @param {any} opts\n   */ renderPaths(opts) {\n        return this.ctx.graphics.renderPaths(opts);\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   * @param {any} opts\n   */ drawMarker(x, y, opts = {}) {\n        return this.ctx.graphics.drawMarker(x, y, opts);\n    }\n    // ── capabilities: SVG supports everything the interface enumerates ──\n    /** @param {string} _feature */ supports(_feature) {\n        return true;\n    }\n    // ── interaction: the DOM does this natively in SVG mode ──\n    hitTest() {\n        return null;\n    }\n    restyle() {}\n    // ── export: SVG serializes directly; no bitmap to composite ──\n    toBitmap() {\n        return null;\n    }\n    destroy() {}\n}\nconst $e4b487e979d7c06d$var$RENDERER_REGISTRY_KEY = \"__apexcharts_renderers__\";\nfunction $e4b487e979d7c06d$var$getRendererRegistry() {\n    const g2 = /** @type {any} */ globalThis;\n    if (!g2[$e4b487e979d7c06d$var$RENDERER_REGISTRY_KEY]) g2[$e4b487e979d7c06d$var$RENDERER_REGISTRY_KEY] = /* @__PURE__ */ new Map();\n    return g2[$e4b487e979d7c06d$var$RENDERER_REGISTRY_KEY];\n}\nclass $e4b487e979d7c06d$var$RendererController {\n    /** Same Map as getRendererRegistry(); exposed for tests/tooling. */ static get _rendererRegistry() {\n        return $e4b487e979d7c06d$var$getRendererRegistry();\n    }\n    /**\n   * @param {string} kind\n   * @param {(w: any, ctx: any) => any} factory\n   */ static registerRenderer(kind, factory) {\n        $e4b487e979d7c06d$var$getRendererRegistry().set(kind, factory);\n    }\n    /**\n   * Remove a registered renderer backend (tests / hot-reload). Charts fall\n   * back to SVG on their next resolve().\n   * @param {string} kind\n   */ static unregisterRenderer(kind) {\n        $e4b487e979d7c06d$var$getRendererRegistry().delete(kind);\n    }\n    /**\n   * @param {any} w\n   * @param {any} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.svg = new $e4b487e979d7c06d$var$SvgRenderer(w2, ctx);\n        this.active = this.svg;\n        this._activeKind = \"svg\";\n        this._instances = {};\n    }\n    /**\n   * The kind selection WANTS (before availability/fallback). Pure.\n   * @returns {import('../renderers/Renderer').RendererKind}\n   */ _desiredKind() {\n        const cfg = this.w.config.chart;\n        const mode = cfg.renderer || \"svg\";\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return \"svg\";\n        if (mode === \"svg\") return \"svg\";\n        if ($e4b487e979d7c06d$var$hasCanvasUnsupportedFeature(this.w)) return \"svg\";\n        if (mode === \"canvas\") return \"canvas\";\n        const marks = $e4b487e979d7c06d$var$computeMarkCount(this.w);\n        const threshold = cfg.rendererThreshold || 8e3;\n        return marks >= threshold ? \"canvas\" : \"svg\";\n    }\n    /**\n   * Resolve + instantiate the active renderer and set `ctx.renderer`. Falls\n   * back to SVG (with a warning only when canvas was explicitly requested) if\n   * the desired backend is not registered.\n   * @returns {import('../renderers/Renderer').RendererKind}\n   */ resolve() {\n        const mode = this.w.config.chart.renderer || \"svg\";\n        const desired = this._desiredKind();\n        if (desired !== \"svg\") {\n            const factory = $e4b487e979d7c06d$var$getRendererRegistry().get(desired);\n            if (factory) {\n                if (!this._instances[desired]) this._instances[desired] = factory(this.w, this.ctx);\n                this.active = this._instances[desired];\n                this._activeKind = desired;\n                this.ctx.renderer = this.active;\n                this.w.globals.activeRenderer = this.active;\n                return this._activeKind;\n            }\n            if (mode === desired) console.warn(`[apexcharts] renderer:\"${desired}\" requested but that renderer is not bundled (import 'apexcharts/features/renderer-${desired}'); falling back to SVG.`);\n        } else if (mode === \"canvas\" && $e4b487e979d7c06d$var$hasCanvasUnsupportedFeature(this.w)) console.warn(`[apexcharts] renderer:\"canvas\" requested but this chart uses a feature the canvas renderer does not render yet (gradient/pattern/image fill or a state color-matrix filter); falling back to SVG.`);\n        this.active = this.svg;\n        this._activeKind = \"svg\";\n        this.ctx.renderer = this.active;\n        this.w.globals.activeRenderer = this.active;\n        return this._activeKind;\n    }\n    /** @returns {import('../renderers/Renderer').RendererKind} */ getActiveKind() {\n        return this._activeKind;\n    }\n    /** Destroy the owned non-SVG renderer instances (full chart destroy). */ teardown() {\n        for(const kind in this._instances){\n            const r2 = this._instances[kind];\n            if (r2 && typeof r2.destroy === \"function\") r2.destroy();\n        }\n        this._instances = {};\n        this.active = this.svg;\n        this._activeKind = \"svg\";\n    }\n}\nclass $e4b487e979d7c06d$var$SVGElement {\n    /**\n   * @param {any} node\n   */ constructor(node){\n        this.node = node;\n        if (node) node.instance = this;\n        this._listeners = [];\n        this._filter = null;\n    }\n    // ---- Attribute methods ----\n    /**\n   * @param {any} a\n   * @param {any} [v]\n   */ attr(a2, v2) {\n        if (typeof a2 === \"string\" && v2 === void 0) return this.node.getAttribute(a2);\n        const attrs = typeof a2 === \"string\" ? {\n            [a2]: v2\n        } : a2;\n        for(const key in attrs){\n            let val = attrs[key];\n            if (val === null) this.node.removeAttribute(key);\n            else if (val !== void 0) {\n                if (typeof val === \"number\" && isNaN(val)) val = 0;\n                this.node.setAttribute(key, val);\n            }\n        }\n        if (this.node.nodeName === \"text\" && attrs.x != null) {\n            const tspans = this.node.querySelectorAll(\"tspan[data-newline]\");\n            for(let i2 = 0; i2 < tspans.length; i2++)tspans[i2].setAttribute(\"x\", attrs.x);\n        }\n        return this;\n    }\n    /**\n   * @param {Record<string, string>} styles\n   */ css(styles) {\n        for(const k in styles)this.node.style[k] = styles[k];\n        return this;\n    }\n    /**\n   * @param {any} v\n   */ fill(v2) {\n        if (typeof v2 === \"object\") return this.attr(v2);\n        return this.attr(\"fill\", v2);\n    }\n    /**\n   * @param {any} v\n   */ stroke(v2) {\n        if (typeof v2 === \"object\") {\n            if (v2.color !== void 0) this.attr(\"stroke\", v2.color);\n            if (v2.width !== void 0) this.attr(\"stroke-width\", v2.width);\n            if (v2.dasharray !== void 0) this.attr(\"stroke-dasharray\", v2.dasharray);\n            if (v2.linecap !== void 0) this.attr(\"stroke-linecap\", v2.linecap);\n            if (v2.opacity !== void 0) this.attr(\"stroke-opacity\", v2.opacity);\n            return this;\n        }\n        return this.attr(\"stroke\", v2);\n    }\n    /**\n   * @param {number} w\n   * @param {number} h\n   */ size(w2, h2) {\n        return this.attr({\n            width: w2,\n            height: h2\n        });\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   */ move(x, y) {\n        return this.attr({\n            x: x,\n            y: y\n        });\n    }\n    /**\n   * @param {number} cx\n   * @param {number} cy\n   */ center(cx, cy) {\n        if (this.node.nodeName === \"g\") {\n            const box = this.bbox();\n            const dx = cx - (box.x + box.width / 2);\n            const dy = cy - (box.y + box.height / 2);\n            return this.attr(\"transform\", `translate(${dx}, ${dy})`);\n        }\n        return this.attr({\n            cx: cx,\n            cy: cy\n        });\n    }\n    // ---- Tree operations ----\n    /**\n   * @param {any} child\n   */ add(child) {\n        if (child && child.__isCanvasMark) return this;\n        this.node.appendChild(child.node || child);\n        return this;\n    }\n    /**\n   * @param {any} parent\n   */ addTo(parent) {\n        const p2 = parent.node || parent;\n        p2.appendChild(this.node);\n        return this;\n    }\n    remove() {\n        if (this.node.parentNode) this.node.parentNode.removeChild(this.node);\n        return this;\n    }\n    clear() {\n        while(this.node.firstChild)this.node.removeChild(this.node.firstChild);\n        return this;\n    }\n    // ---- Query ----\n    /**\n   * @param {string} selector\n   */ find(selector) {\n        return Array.from(this.node.querySelectorAll(selector)).map((n2)=>n2.instance || new $e4b487e979d7c06d$var$SVGElement(n2));\n    }\n    /**\n   * @param {string} selector\n   */ findOne(selector) {\n        const n2 = this.node.querySelector(selector);\n        return n2 ? n2.instance || new $e4b487e979d7c06d$var$SVGElement(n2) : null;\n    }\n    // ---- Events ----\n    /**\n   * @param {Event} event\n   * @param {Function} handler\n   */ on(event, handler) {\n        const eventType = /** @type {string} */ /** @type {any} */ event.split(\".\")[0];\n        this._listeners.push({\n            event: event,\n            eventType: eventType,\n            handler: handler\n        });\n        this.node.addEventListener(eventType, handler);\n        return this;\n    }\n    /**\n   * @param {Event} event\n   * @param {Function} handler\n   */ off(event, handler) {\n        if (!event && !handler) {\n            this._listeners.forEach((l2)=>{\n                this.node.removeEventListener(l2.eventType, l2.handler);\n            });\n            this._listeners = [];\n        } else if (event && !handler) {\n            const eventType = /** @type {string} */ /** @type {any} */ event.split(\".\")[0];\n            this._listeners = this._listeners.filter((l2)=>{\n                if (l2.eventType === eventType) {\n                    this.node.removeEventListener(l2.eventType, l2.handler);\n                    return false;\n                }\n                return true;\n            });\n        } else {\n            const eventType = /** @type {string} */ /** @type {any} */ event.split(\".\")[0];\n            this._listeners = this._listeners.filter((l2)=>{\n                if (l2.eventType === eventType && l2.handler === handler) {\n                    this.node.removeEventListener(l2.eventType, l2.handler);\n                    return false;\n                }\n                return true;\n            });\n        }\n        return this;\n    }\n    // ---- Iteration ----\n    /**\n   * @param {Function} fn\n   * @param {boolean} deep\n   */ each(fn, deep) {\n        const children = Array.from(this.node.children);\n        children.forEach((child)=>{\n            const inst = child.instance || new $e4b487e979d7c06d$var$SVGElement(child);\n            fn.call(inst);\n            if (deep) inst.each(fn, deep);\n        });\n        return this;\n    }\n    // ---- CSS classes ----\n    /**\n   * @param {string} cls\n   */ removeClass(cls) {\n        if (cls === \"*\") this.node.removeAttribute(\"class\");\n        else this.node.classList.remove(cls);\n        return this;\n    }\n    // ---- Children ----\n    children() {\n        return Array.from(this.node.childNodes).filter((n2)=>n2.nodeType === 1).map((n2)=>n2.instance || new $e4b487e979d7c06d$var$SVGElement(n2));\n    }\n    // ---- Visibility ----\n    hide() {\n        this.node.style.display = \"none\";\n        return this;\n    }\n    show() {\n        this.node.style.display = \"\";\n        return this;\n    }\n    // ---- Measurement ----\n    bbox() {\n        if (typeof this.node.getBBox === \"function\") try {\n            return this.node.getBBox();\n        } catch (e2) {}\n        return {\n            x: 0,\n            y: 0,\n            width: 0,\n            height: 0\n        };\n    }\n    // ---- Text-specific ----\n    /**\n   * @param {string} text\n   */ tspan(text) {\n        const tspan = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/2000/svg\", \"tspan\");\n        tspan.textContent = text;\n        this.node.appendChild(tspan);\n        return new $e4b487e979d7c06d$var$SVGElement(tspan);\n    }\n    // ---- Path-specific ----\n    /**\n   * @param {string} d\n   */ plot(d) {\n        if (typeof d === \"string\") this.attr(\"d\", d);\n        return this;\n    }\n    // ---- Animation (overridden by SVGAnimation mixin) ----\n    animate() {\n        throw new Error(\"Animation module not loaded\");\n    }\n    // ---- Filter methods (set up by SVGFilter module) ----\n    // `filterWith`, `unfilter` and `filterer` are installed on the prototype by\n    // installFilterMethods() (svg/index.js). This stub only exists so a call\n    // before the filter module is installed fails with a clear message.\n    filterWith() {\n        throw new Error(\"Filter module not loaded\");\n    }\n}\nlet $e4b487e979d7c06d$var$gradientCounter = 0;\nclass $e4b487e979d7c06d$var$SVGGradient extends $e4b487e979d7c06d$var$SVGElement {\n    /**\n   * @param {any} container\n   * @param {string} type\n   * @param {object} builder\n   */ constructor(container, type, builder){\n        const tag = type === \"radial\" ? \"radialGradient\" : \"linearGradient\";\n        const node = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, tag);\n        super(node);\n        this._id = \"SvgjsGradient\" + ++$e4b487e979d7c06d$var$gradientCounter;\n        this.attr(\"id\", this._id);\n        if (typeof builder === \"function\") builder(new $e4b487e979d7c06d$var$StopBuilder(this));\n        let defs = container.node.querySelector(\"defs\");\n        if (!defs) {\n            defs = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"defs\");\n            container.node.appendChild(defs);\n        }\n        defs.appendChild(this.node);\n    }\n    /**\n   * @param {any} offset\n   * @param {string} color\n   * @param {number} opacity\n   */ stop(offset, color, opacity) {\n        const s2 = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"stop\");\n        s2.setAttribute(\"offset\", offset);\n        s2.setAttribute(\"stop-color\", color);\n        if (opacity !== void 0) s2.setAttribute(\"stop-opacity\", String(opacity));\n        this.node.appendChild(s2);\n        return this;\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   */ from(x, y) {\n        return this.attr({\n            x1: x,\n            y1: y\n        });\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   */ to(x, y) {\n        return this.attr({\n            x2: x,\n            y2: y\n        });\n    }\n    url() {\n        return \"url(#\" + this._id + \")\";\n    }\n    toString() {\n        return this.url();\n    }\n    valueOf() {\n        return this.url();\n    }\n    fill() {\n        return this.url();\n    }\n}\nclass $e4b487e979d7c06d$var$StopBuilder {\n    /**\n   * @param {any} gradient\n   */ constructor(gradient){\n        this.gradient = gradient;\n    }\n    /**\n   * @param {any} offset\n   * @param {string} color\n   * @param {number} opacity\n   */ stop(offset, color, opacity) {\n        this.gradient.stop(offset, color, opacity);\n        return this;\n    }\n}\nlet $e4b487e979d7c06d$var$patternCounter = 0;\nclass $e4b487e979d7c06d$var$SVGPattern extends $e4b487e979d7c06d$var$SVGElement {\n    /**\n   * @param {any} container\n   * @param {number} w\n   * @param {number} h\n   * @param {Function} builder\n   */ constructor(container, w2, h2, builder){\n        const node = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"pattern\");\n        super(node);\n        this._id = \"SvgjsPattern\" + ++$e4b487e979d7c06d$var$patternCounter;\n        this.attr({\n            id: this._id,\n            width: w2,\n            height: h2,\n            patternUnits: \"userSpaceOnUse\"\n        });\n        if (typeof builder === \"function\") {\n            const patternContainer = new $e4b487e979d7c06d$var$SVGContainer(this.node);\n            builder(patternContainer);\n        }\n        let defs = container.node.querySelector(\"defs\");\n        if (!defs) {\n            defs = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"defs\");\n            container.node.appendChild(defs);\n        }\n        defs.appendChild(this.node);\n    }\n    url() {\n        return \"url(#\" + this._id + \")\";\n    }\n    toString() {\n        return this.url();\n    }\n    valueOf() {\n        return this.url();\n    }\n    fill() {\n        return this.url();\n    }\n}\nclass $e4b487e979d7c06d$var$SVGContainer extends $e4b487e979d7c06d$var$SVGElement {\n    /**\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x2\n   * @param {number} y2\n   */ line(x1, y1, x2, y2) {\n        const el = this._make(\"line\");\n        if (x1 !== void 0) el.attr({\n            x1: x1,\n            y1: y1,\n            x2: x2,\n            y2: y2\n        });\n        return el;\n    }\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {number} h\n   */ rect(w2, h2) {\n        const el = this._make(\"rect\");\n        if (w2 !== void 0) el.attr({\n            width: w2,\n            height: h2\n        });\n        return el;\n    }\n    /**\n   * @param {number} d\n   */ circle(d) {\n        const el = this._make(\"circle\");\n        if (d !== void 0) el.attr({\n            r: d / 2,\n            cx: d / 2,\n            cy: d / 2\n        });\n        return el;\n    }\n    /**\n   * @param {string} d\n   */ path(d) {\n        const el = this._make(\"path\");\n        if (d) el.attr(\"d\", d);\n        return el;\n    }\n    /**\n   * @param {string} pts\n   */ polygon(pts) {\n        const el = this._make(\"polygon\");\n        if (pts) el.attr(\"points\", pts);\n        return el;\n    }\n    group() {\n        return this._makeContainer(\"g\");\n    }\n    defs() {\n        return this._makeContainer(\"defs\");\n    }\n    /**\n   * @param {string} textContent\n   */ plain(textContent) {\n        const node = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"text\");\n        node.textContent = textContent;\n        const el = new $e4b487e979d7c06d$var$SVGElement(node);\n        this.node.appendChild(node);\n        return el;\n    }\n    /**\n   * @param {object} builder\n   */ text(builder) {\n        const node = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"text\");\n        const el = new $e4b487e979d7c06d$var$SVGElement(node);\n        this.node.appendChild(node);\n        if (typeof builder === \"function\") builder(new $e4b487e979d7c06d$var$TspanBuilder(node));\n        return el;\n    }\n    /**\n   * @param {string} url\n   * @param {Function} callback\n   */ image(url, callback) {\n        const node = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"image\");\n        node.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"href\", url);\n        const el = new $e4b487e979d7c06d$var$SVGElement(node);\n        this.node.appendChild(node);\n        if (typeof callback === \"function\" && $e4b487e979d7c06d$var$Environment.isBrowser()) {\n            const img = new Image();\n            img.onload = function() {\n                el.size(img.width, img.height);\n                callback.call(el, {\n                    width: img.width,\n                    height: img.height\n                });\n            };\n            img.src = url;\n        }\n        return el;\n    }\n    /**\n   * @param {string} type\n   * @param {object} builder\n   */ gradient(type, builder) {\n        return new $e4b487e979d7c06d$var$SVGGradient(this, type, builder);\n    }\n    /**\n   * @param {number} w\n   * @param {number} h\n   * @param {Function} builder\n   */ pattern(w2, h2, builder) {\n        return new $e4b487e979d7c06d$var$SVGPattern(this, w2, h2, builder);\n    }\n    /**\n   * @param {string} tag\n   */ _make(tag) {\n        const node = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, tag);\n        this.node.appendChild(node);\n        return new $e4b487e979d7c06d$var$SVGElement(node);\n    }\n    /**\n   * @param {string} tag\n   */ _makeContainer(tag) {\n        const node = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, tag);\n        this.node.appendChild(node);\n        return new $e4b487e979d7c06d$var$SVGContainer(node);\n    }\n}\nclass $e4b487e979d7c06d$var$TspanBuilder {\n    /**\n   * @param {any} textNode\n   */ constructor(textNode){\n        this.textNode = textNode;\n    }\n    /**\n   * @param {string} text\n   */ tspan(text) {\n        const tspan = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"tspan\");\n        tspan.textContent = text;\n        this.textNode.appendChild(tspan);\n        return new $e4b487e979d7c06d$var$TspanWrapper(tspan, this.textNode);\n    }\n}\nclass $e4b487e979d7c06d$var$TspanWrapper {\n    /**\n   * @param {any} node\n   * @param {any} textNode\n   */ constructor(node, textNode){\n        this.node = node;\n        this.textNode = textNode;\n    }\n    newLine() {\n        this.node.setAttribute(\"dy\", \"1.1em\");\n        this.node.dataset.newline = \"1\";\n        return this;\n    }\n}\nlet $e4b487e979d7c06d$var$filterCounter = 0;\nclass $e4b487e979d7c06d$var$SVGFilter extends $e4b487e979d7c06d$var$SVGElement {\n    constructor(){\n        const node = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"filter\");\n        super(node);\n        this._id = \"SvgjsFilter\" + ++$e4b487e979d7c06d$var$filterCounter;\n        this.attr(\"id\", this._id);\n    }\n}\nclass $e4b487e979d7c06d$var$FilterBuilder {\n    /**\n   * @param {any} filter\n   */ constructor(filter){\n        this.filter = filter;\n    }\n    /**\n   * @param {object} attrs\n   */ colorMatrix(attrs) {\n        return this._primitive(\"feColorMatrix\", attrs);\n    }\n    /**\n   * @param {object} attrs\n   */ offset(attrs) {\n        return this._primitive(\"feOffset\", attrs);\n    }\n    /**\n   * @param {object} attrs\n   */ gaussianBlur(attrs) {\n        return this._primitive(\"feGaussianBlur\", attrs);\n    }\n    /**\n   * @param {object} attrs\n   */ flood(attrs) {\n        return this._primitive(\"feFlood\", attrs);\n    }\n    /**\n   * @param {object} attrs\n   */ composite(attrs) {\n        return this._primitive(\"feComposite\", attrs);\n    }\n    /**\n   * @param {string[]} sources\n   */ merge(sources) {\n        const m2 = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"feMerge\");\n        sources.forEach((src)=>{\n            const mn = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"feMergeNode\");\n            mn.setAttribute(\"in\", src);\n            m2.appendChild(mn);\n        });\n        this.filter.node.appendChild(m2);\n        return new $e4b487e979d7c06d$var$SVGElement(m2);\n    }\n    /**\n   * @param {string} tag\n   * @param {Record<string, any>} attrs\n   */ _primitive(tag, attrs) {\n        const el = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, tag);\n        for(const key in attrs)el.setAttribute(key, attrs[key]);\n        this.filter.node.appendChild(el);\n        return new $e4b487e979d7c06d$var$SVGElement(el);\n    }\n}\nfunction $e4b487e979d7c06d$var$installFilterMethods(ElementClass) {\n    ElementClass.prototype.filterWith = function(fn) {\n        const filter = new $e4b487e979d7c06d$var$SVGFilter();\n        this._filter = filter;\n        let svgRoot = this.node;\n        while(svgRoot && svgRoot.nodeName !== \"svg\")svgRoot = svgRoot.parentNode;\n        if (svgRoot) {\n            let defs = svgRoot.querySelector(\"defs\");\n            if (!defs) {\n                defs = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"defs\");\n                svgRoot.insertBefore(defs, svgRoot.firstChild);\n            }\n            defs.appendChild(filter.node);\n        }\n        fn(new $e4b487e979d7c06d$var$FilterBuilder(filter));\n        this.attr(\"filter\", \"url(#\" + filter._id + \")\");\n        return this;\n    };\n    ElementClass.prototype.unfilter = function(all) {\n        if (this._filter) {\n            this.node.removeAttribute(\"filter\");\n            if (all && this._filter.node && this._filter.node.parentNode) this._filter.node.parentNode.removeChild(this._filter.node);\n            this._filter = null;\n        }\n        return this;\n    };\n    ElementClass.prototype.filterer = function() {\n        return this._filter;\n    };\n}\nfunction $e4b487e979d7c06d$var$installDraggable(ElementClass) {\n    ElementClass.prototype.draggable = function(opts) {\n        if (opts === false) {\n            if (this._dragCleanup) {\n                this._dragCleanup();\n                this._dragCleanup = null;\n            }\n            return this;\n        }\n        const el = this;\n        const constraints = opts || {};\n        const onPointerDown = (e2)=>{\n            if (e2.button && e2.button !== 0) return;\n            e2.stopPropagation();\n            const isTouch = e2.type === \"touchstart\";\n            const ev = isTouch ? e2.touches[0] : e2;\n            const svgEl = el.node;\n            const startAttrX = parseFloat(svgEl.getAttribute(\"x\")) || 0;\n            const startAttrY = parseFloat(svgEl.getAttribute(\"y\")) || 0;\n            const startClientX = ev.clientX;\n            const startClientY = ev.clientY;\n            const svgRoot = svgEl.ownerSVGElement;\n            let ctm = null;\n            if (svgRoot) ctm = svgRoot.getScreenCTM();\n            const onMove = (me)=>{\n                const mev = me.type === \"touchmove\" ? me.touches[0] : me;\n                let dx = mev.clientX - startClientX;\n                let dy = mev.clientY - startClientY;\n                if (ctm) {\n                    dx = dx / ctm.a;\n                    dy = dy / ctm.d;\n                }\n                let newX = startAttrX + dx;\n                let newY = startAttrY + dy;\n                const w2 = parseFloat(svgEl.getAttribute(\"width\")) || 0;\n                const h2 = parseFloat(svgEl.getAttribute(\"height\")) || 0;\n                if (constraints.minX !== void 0 && newX < constraints.minX) newX = constraints.minX;\n                if (constraints.minY !== void 0 && newY < constraints.minY) newY = constraints.minY;\n                if (constraints.maxX !== void 0 && newX + w2 > constraints.maxX) newX = constraints.maxX - w2;\n                if (constraints.maxY !== void 0 && newY + h2 > constraints.maxY) newY = constraints.maxY - h2;\n                const box = {\n                    x: newX,\n                    y: newY,\n                    w: w2,\n                    h: h2,\n                    x2: newX + w2,\n                    y2: newY + h2\n                };\n                const event = new CustomEvent(\"dragmove\", {\n                    detail: {\n                        handler: {\n                            /**\n               * @param {number} x\n               * @param {number} y\n               */ move: function(x, y) {\n                                svgEl.setAttribute(\"x\", x);\n                                svgEl.setAttribute(\"y\", y);\n                            }\n                        },\n                        box: box\n                    }\n                });\n                svgEl.dispatchEvent(event);\n            };\n            const onUp = ()=>{\n                if ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n                    document.removeEventListener(\"mousemove\", onMove);\n                    document.removeEventListener(\"touchmove\", onMove);\n                    document.removeEventListener(\"mouseup\", onUp);\n                    document.removeEventListener(\"touchend\", onUp);\n                }\n                el._activeDrag = null;\n            };\n            if ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n                document.addEventListener(\"mousemove\", onMove);\n                document.addEventListener(\"touchmove\", onMove);\n                document.addEventListener(\"mouseup\", onUp);\n                document.addEventListener(\"touchend\", onUp);\n                el._activeDrag = {\n                    onMove: onMove,\n                    onUp: onUp\n                };\n            }\n        };\n        el.node.addEventListener(\"mousedown\", onPointerDown);\n        el.node.addEventListener(\"touchstart\", onPointerDown);\n        el._dragCleanup = ()=>{\n            el.node.removeEventListener(\"mousedown\", onPointerDown);\n            el.node.removeEventListener(\"touchstart\", onPointerDown);\n            if (el._activeDrag && $e4b487e979d7c06d$var$Environment.isBrowser()) {\n                document.removeEventListener(\"mousemove\", el._activeDrag.onMove);\n                document.removeEventListener(\"touchmove\", el._activeDrag.onMove);\n                document.removeEventListener(\"mouseup\", el._activeDrag.onUp);\n                document.removeEventListener(\"touchend\", el._activeDrag.onUp);\n                el._activeDrag = null;\n            }\n        };\n        return el;\n    };\n}\nfunction $e4b487e979d7c06d$var$installSelectable(ElementClass) {\n    ElementClass.prototype.select = function(opts) {\n        if (opts === false) {\n            if (this._selectCleanup) {\n                this._selectCleanup();\n                this._selectCleanup = null;\n            }\n            return this;\n        }\n        const el = this;\n        const { createHandle: createHandle, updateHandle: updateHandle } = opts;\n        const handleGroup = document.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"g\");\n        handleGroup.setAttribute(\"class\", \"svg_select_points\");\n        const parent = el.node.parentNode;\n        if (parent) parent.appendChild(handleGroup);\n        const handles = {};\n        const handleNames = [\n            \"t\",\n            \"b\",\n            \"l\",\n            \"r\",\n            \"lt\",\n            \"rt\",\n            \"lb\",\n            \"rb\"\n        ];\n        handleNames.forEach((name2, index)=>{\n            const subGroup = new $e4b487e979d7c06d$var$SVGContainer(document.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"g\"));\n            handleGroup.appendChild(subGroup.node);\n            const handle = createHandle(subGroup, [\n                0,\n                0\n            ], index, [], name2);\n            handles[name2] = {\n                group: subGroup,\n                handle: handle\n            };\n        });\n        const updatePositions = ()=>{\n            const x = parseFloat(el.attr(\"x\")) || 0;\n            const y = parseFloat(el.attr(\"y\")) || 0;\n            const w2 = parseFloat(el.attr(\"width\")) || 0;\n            const h2 = parseFloat(el.attr(\"height\")) || 0;\n            const elTransform = el.node.getAttribute(\"transform\");\n            if (elTransform) handleGroup.setAttribute(\"transform\", elTransform);\n            else handleGroup.removeAttribute(\"transform\");\n            const positions = {\n                t: [\n                    x + w2 / 2,\n                    y\n                ],\n                b: [\n                    x + w2 / 2,\n                    y + h2\n                ],\n                l: [\n                    x,\n                    y + h2 / 2\n                ],\n                r: [\n                    x + w2,\n                    y + h2 / 2\n                ],\n                lt: [\n                    x,\n                    y\n                ],\n                rt: [\n                    x + w2,\n                    y\n                ],\n                lb: [\n                    x,\n                    y + h2\n                ],\n                rb: [\n                    x + w2,\n                    y + h2\n                ]\n            };\n            handleNames.forEach((name2)=>{\n                if (handles[name2] && positions[name2]) updateHandle(handles[name2].group, positions[name2]);\n            });\n        };\n        updatePositions();\n        el._selectHandles = handleGroup;\n        el._selectHandlesMap = handles;\n        el._updateSelectPositions = updatePositions;\n        el._selectCleanup = ()=>{\n            if (handleGroup.parentNode) handleGroup.parentNode.removeChild(handleGroup);\n            el._selectHandles = null;\n            el._selectHandlesMap = null;\n            el._updateSelectPositions = null;\n        };\n        return el;\n    };\n    ElementClass.prototype.resize = function(enable) {\n        if (enable === false) {\n            if (this._resizeCleanup) {\n                this._resizeCleanup();\n                this._resizeCleanup = null;\n            }\n            return this;\n        }\n        const el = this;\n        const handles = el._selectHandlesMap;\n        if (!handles) return el;\n        const cleanupFns = [];\n        const makeHandleDraggable = (name2)=>{\n            const handleInfo = handles[name2];\n            if (!handleInfo || !handleInfo.group || !handleInfo.group.node) return;\n            const handleNode = handleInfo.group.node;\n            const onPointerDown = (e2)=>{\n                if (e2.button && e2.button !== 0) return;\n                e2.stopPropagation();\n                const isTouch = e2.type === \"touchstart\";\n                const ev = isTouch ? e2.touches[0] : e2;\n                const startClientX = ev.clientX;\n                const svgRoot = el.node.ownerSVGElement;\n                let ctm = null;\n                if (svgRoot) ctm = svgRoot.getScreenCTM();\n                const startX = parseFloat(el.attr(\"x\")) || 0;\n                const startW = parseFloat(el.attr(\"width\")) || 0;\n                const onMove = (me)=>{\n                    const mev = me.type === \"touchmove\" ? me.touches[0] : me;\n                    let dx = mev.clientX - startClientX;\n                    if (ctm) dx = dx / /** @type {any} */ ctm.a;\n                    let newX = startX;\n                    let newW = startW;\n                    if (name2 === \"l\") {\n                        newX = startX + dx;\n                        newW = startW - dx;\n                    } else if (name2 === \"r\") newW = startW + dx;\n                    if (newW < 0) newW = 0;\n                    el.attr({\n                        x: newX,\n                        width: newW\n                    });\n                    if (el._updateSelectPositions) el._updateSelectPositions();\n                    const event = new CustomEvent(\"resize\", {\n                        detail: {\n                            el: el\n                        }\n                    });\n                    el.node.dispatchEvent(event);\n                };\n                const onUp = ()=>{\n                    if ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n                        document.removeEventListener(\"mousemove\", onMove);\n                        document.removeEventListener(\"touchmove\", onMove);\n                        document.removeEventListener(\"mouseup\", onUp);\n                        document.removeEventListener(\"touchend\", onUp);\n                    }\n                    const event = new CustomEvent(\"resize\", {\n                        detail: {\n                            el: el\n                        }\n                    });\n                    el.node.dispatchEvent(event);\n                };\n                if ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n                    document.addEventListener(\"mousemove\", onMove);\n                    document.addEventListener(\"touchmove\", onMove);\n                    document.addEventListener(\"mouseup\", onUp);\n                    document.addEventListener(\"touchend\", onUp);\n                }\n            };\n            handleNode.addEventListener(\"mousedown\", onPointerDown);\n            handleNode.addEventListener(\"touchstart\", onPointerDown);\n            cleanupFns.push(()=>{\n                handleNode.removeEventListener(\"mousedown\", onPointerDown);\n                handleNode.removeEventListener(\"touchstart\", onPointerDown);\n            });\n        };\n        makeHandleDraggable(\"l\");\n        makeHandleDraggable(\"r\");\n        el._resizeCleanup = ()=>{\n            cleanupFns.forEach((fn)=>fn());\n        };\n        return el;\n    };\n}\n$e4b487e979d7c06d$var$installFilterMethods($e4b487e979d7c06d$var$SVGElement);\n$e4b487e979d7c06d$var$installAnimationMethods($e4b487e979d7c06d$var$SVGElement);\n$e4b487e979d7c06d$var$installDraggable($e4b487e979d7c06d$var$SVGElement);\n$e4b487e979d7c06d$var$installSelectable($e4b487e979d7c06d$var$SVGElement);\nfunction $e4b487e979d7c06d$var$SVG() {\n    const svgEl = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"svg\");\n    const svg = new $e4b487e979d7c06d$var$SVGContainer(svgEl);\n    svg.attr({\n        xmlns: $e4b487e979d7c06d$var$SVGNS$2\n    });\n    return svg;\n}\n$e4b487e979d7c06d$var$SVG.xlink = \"http://www.w3.org/1999/xlink\";\nif ($e4b487e979d7c06d$var$Environment.isBrowser() && typeof window.SVG === \"undefined\") window.SVG = $e4b487e979d7c06d$var$SVG;\nif ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n    if (typeof window.SVG === \"undefined\") window.SVG = $e4b487e979d7c06d$var$SVG;\n    if (typeof window.Apex === \"undefined\") window.Apex = {};\n} else if (typeof $parcel$global !== \"undefined\") {\n    if (typeof /** @type {any} */ $parcel$global.Apex === \"undefined\") $parcel$global.Apex = {};\n    if (typeof /** @type {any} */ $parcel$global.SVG === \"undefined\") $parcel$global.SVG = $e4b487e979d7c06d$var$SVG;\n}\nconst $e4b487e979d7c06d$var$_InitCtxVariables = class _InitCtxVariables {\n    /**\n   * Register one or more optional feature modules.\n   *\n   * @param {Record<string, new (w: object, ctx: object) => unknown>} featureMap\n   *   Plain object mapping ctx property name → constructor.\n   *\n   * Example (called from src/features/legend.js):\n   *   InitCtxVariables.registerFeatures({ legend: Legend })\n   */ static registerFeatures(featureMap) {\n        for (const [key, Ctor] of Object.entries(featureMap))_InitCtxVariables._featureRegistry.set(key, Ctor);\n    }\n    /**\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(ctx){\n        this.ctx = ctx;\n        this.w = ctx.w;\n    }\n    initModules() {\n        this.ctx.publicMethods = [\n            \"updateOptions\",\n            \"updateSeries\",\n            \"appendData\",\n            \"appendSeries\",\n            \"isSeriesHidden\",\n            \"highlightSeries\",\n            \"toggleSeries\",\n            \"showSeries\",\n            \"hideSeries\",\n            \"setLocale\",\n            \"resetSeries\",\n            \"zoomX\",\n            \"toggleDataPointSelection\",\n            \"dataURI\",\n            \"exportToCSV\",\n            \"addXaxisAnnotation\",\n            \"addYaxisAnnotation\",\n            \"addPointAnnotation\",\n            \"clearAnnotations\",\n            \"removeAnnotation\",\n            \"drillDown\",\n            \"drillUp\",\n            \"drillToRoot\",\n            \"clearDrilldownCache\",\n            \"paper\",\n            \"getActiveRenderer\",\n            \"destroy\"\n        ];\n        this.ctx.eventList = [\n            \"click\",\n            \"mousedown\",\n            \"mousemove\",\n            \"mouseleave\",\n            \"touchstart\",\n            \"touchmove\",\n            \"touchleave\",\n            \"mouseup\",\n            \"touchend\",\n            \"keydown\",\n            \"keyup\"\n        ];\n        this.ctx.animations = new $e4b487e979d7c06d$var$Animations(this.w, this.ctx);\n        this.ctx.axes = new $e4b487e979d7c06d$var$Axes(this.w, this.ctx);\n        this.ctx.core = new $e4b487e979d7c06d$var$Core(this.ctx.el, this.w, this.ctx);\n        this.ctx.config = new $e4b487e979d7c06d$var$Config({});\n        this.ctx.data = new $e4b487e979d7c06d$var$Data(this.w, {\n            resetGlobals: ()=>this.ctx.core.resetGlobals(),\n            isMultipleY: ()=>this.ctx.core.isMultipleY()\n        });\n        this.ctx.grid = new $e4b487e979d7c06d$var$Grid(this.w, this.ctx);\n        this.ctx.graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n        this.ctx.coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n        this.ctx.crosshairs = new $e4b487e979d7c06d$var$Crosshairs(this.w);\n        this.ctx.events = new $e4b487e979d7c06d$var$Events(this.w, this.ctx);\n        this.ctx.fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        this.ctx.localization = new $e4b487e979d7c06d$var$Localization(this.w);\n        this.ctx.options = new $e4b487e979d7c06d$var$Options();\n        this.ctx.responsive = new $e4b487e979d7c06d$var$Responsive(this.w);\n        this.ctx.series = new $e4b487e979d7c06d$var$Series(this.w, {\n            // legend may not be registered — guard with ?.\n            toggleDataSeries: (...a2)=>{\n                var _a;\n                return (_a = this.ctx.legend) == null ? void 0 : _a.legendHelpers.toggleDataSeries(...a2);\n            },\n            revertDefaultAxisMinMax: ()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),\n            updateSeries: (...a2)=>this.ctx.updateHelpers._updateSeries(...a2)\n        });\n        this.ctx.theme = new $e4b487e979d7c06d$var$Theme(this.w);\n        this.ctx.formatters = new $e4b487e979d7c06d$var$Formatters(this.w);\n        this.ctx.titleSubtitle = new $e4b487e979d7c06d$var$TitleSubtitle(this.w);\n        this.ctx.dimensions = new $e4b487e979d7c06d$var$Dimensions(this.w, this.ctx);\n        this.ctx.updateHelpers = new $e4b487e979d7c06d$var$UpdateHelpers(this.w, this.ctx);\n        this.ctx.rendererController = new $e4b487e979d7c06d$var$RendererController(this.w, this.ctx);\n        this.ctx.renderer = this.ctx.rendererController.active;\n        const tooltipInstance = new $e4b487e979d7c06d$var$Tooltip(this.w, this.ctx);\n        this.w.globals.tooltip = tooltipInstance;\n        Object.defineProperty(this.ctx, \"tooltip\", {\n            get () {\n                return this.w.globals.tooltip;\n            },\n            configurable: true\n        });\n        this._initOptionalModules();\n    }\n    /**\n   * Instantiate optional feature modules from the registry.\n   *\n   * Modules that are not registered are set to null on ctx so that call sites\n   * can safely use optional-chaining (ctx.tooltip?.drawTooltip(...)).\n   *\n   * Lazy-getter features (toolbar, zoomPanSelection, keyboardNavigation) are\n   * installed as on-demand getters so they are only constructed if accessed,\n   * and only if their constructor was registered.\n   */ _initOptionalModules() {\n        const reg = _InitCtxVariables._featureRegistry;\n        const w2 = this.w;\n        const ctx = this.ctx;\n        const ExportsCtor = reg.get(\"exports\");\n        ctx.exports = ExportsCtor ? new ExportsCtor(w2, ctx) : null;\n        const LegendCtor = reg.get(\"legend\");\n        ctx.legend = LegendCtor ? new LegendCtor(w2, ctx) : null;\n        const MorphCtor = reg.get(\"morphTypeChange\");\n        ctx.morphTypeChange = MorphCtor ? new MorphCtor(w2, ctx) : null;\n        const DrilldownCtor = reg.get(\"drilldown\");\n        ctx.drilldown = DrilldownCtor ? new DrilldownCtor(w2, ctx) : null;\n        const PerspectivesCtor = reg.get(\"perspectives\");\n        ctx.perspectives = PerspectivesCtor ? new PerspectivesCtor(w2, ctx) : null;\n        const StoryboardCtor = reg.get(\"storyboard\");\n        ctx.storyboard = StoryboardCtor ? new StoryboardCtor(w2, ctx) : null;\n        const HistoryCtor = reg.get(\"history\");\n        ctx.history = HistoryCtor ? new HistoryCtor(w2, ctx) : null;\n        const LinkedViewsCtor = reg.get(\"linkedViews\");\n        ctx.linkedViews = LinkedViewsCtor ? new LinkedViewsCtor(w2, ctx) : null;\n        const InkCtor = reg.get(\"ink\");\n        ctx.ink = InkCtor ? new InkCtor(w2, ctx) : null;\n        const MeasureCtor = reg.get(\"measure\");\n        ctx.measure = MeasureCtor ? new MeasureCtor(w2, ctx) : null;\n        const ContextMenuCtor = reg.get(\"contextMenu\");\n        ctx.contextMenu = ContextMenuCtor ? new ContextMenuCtor(w2, ctx) : null;\n        const WeaveCtor = reg.get(\"weave\");\n        ctx.weave = WeaveCtor ? new WeaveCtor(w2, ctx) : null;\n        const OSThemeCtor = reg.get(\"osThemeWatcher\");\n        ctx.osThemeWatcher = OSThemeCtor ? new OSThemeCtor(w2, ctx) : null;\n        const ToolbarCtor = reg.get(\"toolbar\");\n        Object.defineProperty(ctx, \"toolbar\", {\n            get () {\n                var _a;\n                if (!this._toolbar && ToolbarCtor) this._toolbar = new ToolbarCtor(w2, this);\n                return (_a = this._toolbar) != null ? _a : null;\n            },\n            configurable: true\n        });\n        const ZoomPanCtor = reg.get(\"zoomPanSelection\");\n        Object.defineProperty(ctx, \"zoomPanSelection\", {\n            get () {\n                var _a;\n                if (!this._zoomPanSelection && ZoomPanCtor) this._zoomPanSelection = new ZoomPanCtor(w2, this);\n                return (_a = this._zoomPanSelection) != null ? _a : null;\n            },\n            configurable: true\n        });\n        const KeyboardCtor = reg.get(\"keyboardNavigation\");\n        Object.defineProperty(ctx, \"keyboardNavigation\", {\n            get () {\n                var _a;\n                if (!this._keyboardNavigation && KeyboardCtor) this._keyboardNavigation = new KeyboardCtor(w2, this);\n                return (_a = this._keyboardNavigation) != null ? _a : null;\n            },\n            configurable: true\n        });\n    }\n};\n/**\n * Registry of optional feature modules.\n *\n * Populated by ApexCharts.registerFeatures() (called from feature entry\n * files such as src/features/legend.js). Keys match the ctx property name\n * the module is stored under (e.g. 'legend', 'exports').\n *\n * Core modules that every chart needs are NOT in this registry — they are\n * always instantiated unconditionally in initModules().\n */ $e4b487e979d7c06d$var$__publicField($e4b487e979d7c06d$var$_InitCtxVariables, \"_featureRegistry\", /* @__PURE__ */ new Map());\nlet $e4b487e979d7c06d$var$InitCtxVariables = $e4b487e979d7c06d$var$_InitCtxVariables;\nclass $e4b487e979d7c06d$var$Destroy {\n    /**\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(ctx){\n        this.ctx = ctx;\n        this.w = ctx.w;\n    }\n    /**\n   * @param {{ isUpdating: boolean }} opts\n   */ clear({ isUpdating: isUpdating }) {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;\n        (_a = this.ctx.weave) == null || _a.teardown(isUpdating);\n        if (!isUpdating) this.w.globals.isDestroyed = true;\n        if (this.ctx._zoomPanSelection) this.ctx._zoomPanSelection.destroy();\n        if (this.ctx._toolbar) this.ctx._toolbar.destroy();\n        if (this.w.globals.resizeObserver && typeof this.w.globals.resizeObserver.disconnect === \"function\") {\n            this.w.globals.resizeObserver.disconnect();\n            this.w.globals.resizeObserver = null;\n        }\n        $e4b487e979d7c06d$var$PerformanceCache.invalidateAll(this.w);\n        if (isUpdating) {\n            this.ctx._zoomPanSelection = null;\n            this.ctx._toolbar = null;\n            (_b = this.ctx._keyboardNavigation) == null || _b.destroy();\n            this.ctx._keyboardNavigation = null;\n        } else {\n            (_c = this.ctx.perspectives) == null || _c.teardown();\n            this.ctx.perspectives = null;\n            (_d = this.ctx.storyboard) == null || _d.teardown();\n            this.ctx.storyboard = null;\n            (_e = this.ctx.history) == null || _e.teardown();\n            this.ctx.history = null;\n            (_f = this.ctx.linkedViews) == null || _f.teardown();\n            this.ctx.linkedViews = null;\n            (_g = this.ctx.ink) == null || _g.teardown();\n            this.ctx.ink = null;\n            (_h = this.ctx.measure) == null || _h.teardown();\n            this.ctx.measure = null;\n            (_i = this.ctx.contextMenu) == null || _i.teardown();\n            this.ctx.contextMenu = null;\n            (_j = this.ctx.osThemeWatcher) == null || _j.teardown();\n            this.ctx.osThemeWatcher = null;\n            this.ctx.weave = null;\n            (_l = (_k = this.ctx.rendererController) == null ? void 0 : _k.teardown) == null || _l.call(_k);\n            this.ctx.rendererController = null;\n            this.ctx.renderer = null;\n            this.ctx.drilldown = null;\n            this.ctx.morphTypeChange = null;\n            this.ctx.exports = null;\n            this.ctx.animations = null;\n            this.ctx.axes = null;\n            this.ctx.annotations = null;\n            this.ctx.core = null;\n            this.ctx.data = null;\n            this.ctx.grid = null;\n            this.ctx.series = null;\n            this.ctx.responsive = null;\n            this.ctx.theme = null;\n            this.ctx.formatters = null;\n            this.ctx.titleSubtitle = null;\n            this.ctx.legend = null;\n            this.ctx.dimensions = null;\n            this.ctx.options = null;\n            this.ctx.crosshairs = null;\n            this.ctx._zoomPanSelection = null;\n            this.ctx.updateHelpers = null;\n            this.ctx._toolbar = null;\n            this.ctx.localization = null;\n            this.ctx._keyboardNavigation = null;\n            this.ctx.w.globals.tooltip = null;\n        }\n        this.clearDomElements({\n            isUpdating: isUpdating\n        });\n    }\n    /**\n   * @param {any} draw\n   */ killSVG(draw) {\n        draw.each(/** @this {any} */ function() {\n            this.removeClass(\"*\");\n            this.off();\n        }, true);\n        draw.clear();\n    }\n    /**\n   * @param {{ isUpdating: boolean }} opts\n   */ clearDomElements({ isUpdating: isUpdating }) {\n        const domEls = /** @type {any} */ this.w.dom;\n        if ($e4b487e979d7c06d$var$Environment.isBrowser() && domEls.Paper) {\n            const elSVG = domEls.Paper.node;\n            if (elSVG.parentNode && elSVG.parentNode.parentNode && !isUpdating) elSVG.parentNode.parentNode.style.minHeight = \"unset\";\n            const baseEl = domEls.baseEl;\n            if (baseEl) this.ctx.eventList.forEach((event)=>{\n                baseEl.removeEventListener(event, this.ctx.events.documentEvent);\n            });\n            if (this.ctx.el !== null) while(this.ctx.el.firstChild)this.ctx.el.removeChild(this.ctx.el.firstChild);\n            this.killSVG(domEls.Paper);\n            domEls.Paper.remove();\n        }\n        domEls.Paper = null;\n        domEls.elWrap = null;\n        domEls.elGraphical = null;\n        domEls.elLegendWrap = null;\n        domEls.elLegendForeign = null;\n        domEls.baseEl = null;\n        domEls.elGridRect = null;\n        domEls.elGridRectMask = null;\n        domEls.elGridRectBarMask = null;\n        domEls.elGridRectMarkerMask = null;\n        domEls.elForecastMask = null;\n        domEls.elNonForecastMask = null;\n        domEls.elDefs = null;\n    }\n}\nconst $e4b487e979d7c06d$var$LAYOUT_KEY = \"__apexcharts_unit_layouts__\";\nif (!/** @type {any} */ globalThis[$e4b487e979d7c06d$var$LAYOUT_KEY]) globalThis[$e4b487e979d7c06d$var$LAYOUT_KEY] = {};\nfunction $e4b487e979d7c06d$var$getLayouts() {\n    return /** @type {any} */ globalThis[$e4b487e979d7c06d$var$LAYOUT_KEY];\n}\nfunction $e4b487e979d7c06d$var$registerUnitLayout(name2, fn) {\n    if (!name2 || typeof name2 !== \"string\") {\n        console.warn(\"ApexCharts: registerUnitLayout requires a non-empty name.\");\n        return;\n    }\n    if (typeof fn !== \"function\") {\n        console.warn(`ApexCharts: registerUnitLayout(\"${name2}\") expects a function (objects, rect) => [{id, x, y}].`);\n        return;\n    }\n    $e4b487e979d7c06d$var$getLayouts()[name2] = fn;\n}\nfunction $e4b487e979d7c06d$var$getUnitLayout(name2) {\n    if (!name2) return null;\n    return $e4b487e979d7c06d$var$getLayouts()[name2] || null;\n}\nfunction $e4b487e979d7c06d$var$unregisterUnitLayout(name2) {\n    delete $e4b487e979d7c06d$var$getLayouts()[name2];\n}\nconst $e4b487e979d7c06d$var$ROW_SOURCE_KEY = \"__apexcharts_row_sources__\";\nif (!/** @type {any} */ globalThis[$e4b487e979d7c06d$var$ROW_SOURCE_KEY]) globalThis[$e4b487e979d7c06d$var$ROW_SOURCE_KEY] = {};\nfunction $e4b487e979d7c06d$var$getSources() {\n    return /** @type {any} */ globalThis[$e4b487e979d7c06d$var$ROW_SOURCE_KEY];\n}\nfunction $e4b487e979d7c06d$var$registerRowSource(name2, fn) {\n    if (!name2 || typeof name2 !== \"string\") {\n        console.warn(\"ApexCharts: registerRowSource requires a non-empty name.\");\n        return;\n    }\n    if (typeof fn !== \"function\") {\n        console.warn(`ApexCharts: registerRowSource(\"${name2}\") expects a function (w, opts) => series.`);\n        return;\n    }\n    $e4b487e979d7c06d$var$getSources()[name2] = fn;\n}\nfunction $e4b487e979d7c06d$var$getRowSource(name2) {\n    if (!name2) return null;\n    return $e4b487e979d7c06d$var$getSources()[name2] || null;\n}\nfunction $e4b487e979d7c06d$var$unregisterRowSource(name2) {\n    delete $e4b487e979d7c06d$var$getSources()[name2];\n}\nfunction $e4b487e979d7c06d$var$rowSourceFor(w2) {\n    const cnf = w2 && w2.config && w2.config.chart;\n    if (!cnf) return null;\n    return $e4b487e979d7c06d$var$getRowSource(cnf.requestedType) || $e4b487e979d7c06d$var$getRowSource(cnf.type);\n}\nconst $e4b487e979d7c06d$var$REGISTRY_KEY = \"__apexcharts_plugins__\";\nfunction $e4b487e979d7c06d$var$getRegistry() {\n    const g2 = /** @type {any} */ globalThis;\n    if (!g2[$e4b487e979d7c06d$var$REGISTRY_KEY]) g2[$e4b487e979d7c06d$var$REGISTRY_KEY] = {};\n    return g2[$e4b487e979d7c06d$var$REGISTRY_KEY];\n}\nfunction $e4b487e979d7c06d$var$registerPlugin(def) {\n    if (!def || typeof def.name !== \"string\" || typeof def.setup !== \"function\") {\n        console.error(\"[apexcharts] registerPlugin: a plugin needs a { name, setup } shape.\");\n        return;\n    }\n    $e4b487e979d7c06d$var$getRegistry()[def.name] = def;\n}\nfunction $e4b487e979d7c06d$var$getPlugin(name2) {\n    return $e4b487e979d7c06d$var$getRegistry()[name2] || null;\n}\nfunction $e4b487e979d7c06d$var$unregisterPlugin(name2) {\n    delete $e4b487e979d7c06d$var$getRegistry()[name2];\n}\nconst $e4b487e979d7c06d$var$ros = /* @__PURE__ */ new WeakMap();\nfunction $e4b487e979d7c06d$var$addResizeListener(el, fn) {\n    if ($e4b487e979d7c06d$var$Environment.isSSR()) return;\n    let called = false;\n    if (el.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {\n        const elRect = el.getBoundingClientRect();\n        if (el.style.display === \"none\" || elRect.width === 0) called = true;\n    }\n    const ro = new ResizeObserver((r2)=>{\n        if (called) fn.call(el, r2);\n        called = true;\n    });\n    if (el.nodeType === Node.DOCUMENT_FRAGMENT_NODE) Array.from(el.children).forEach((c2)=>ro.observe(c2));\n    else ro.observe(el);\n    $e4b487e979d7c06d$var$ros.set(fn, ro);\n}\nfunction $e4b487e979d7c06d$var$removeResizeListener(el, fn) {\n    if ($e4b487e979d7c06d$var$Environment.isSSR()) return;\n    const ro = $e4b487e979d7c06d$var$ros.get(fn);\n    if (ro) {\n        ro.disconnect();\n        $e4b487e979d7c06d$var$ros.delete(fn);\n    }\n}\nconst $e4b487e979d7c06d$var$apexCSS = '@keyframes opaque {\\n  0% {\\n    opacity: 0\\n  }\\n\\n  to {\\n    opacity: 1\\n  }\\n}\\n\\n@keyframes resizeanim {\\n\\n  0%,\\n  to {\\n    opacity: 0\\n  }\\n}\\n\\n.apexcharts-canvas {\\n  position: relative;\\n  direction: ltr !important;\\n  user-select: none;\\n  /* Focus indicator colour. Themes override below. */\\n  --apexcharts-focus-color: #008FFB;\\n}\\n\\n/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */\\n.apexcharts-canvas .apexcharts-theme-dark,\\n.apexcharts-theme-dark.apexcharts-canvas {\\n  --apexcharts-focus-color: #FFD500;\\n}\\n.apexcharts-canvas.apexcharts-high-contrast,\\n.apexcharts-high-contrast.apexcharts-canvas {\\n  --apexcharts-focus-color: #FFFF00;\\n}\\n\\n/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */\\n.apexcharts-sr-status {\\n  position: absolute;\\n  width: 1px;\\n  height: 1px;\\n  padding: 0;\\n  margin: -1px;\\n  overflow: hidden;\\n  clip: rect(0, 0, 0, 0);\\n  white-space: nowrap;\\n  border: 0;\\n}\\n\\n/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */\\n@media (prefers-reduced-motion: reduce) {\\n  .apexcharts-canvas *,\\n  .apexcharts-canvas *::before,\\n  .apexcharts-canvas *::after {\\n    animation-duration: 0.01ms !important;\\n    animation-iteration-count: 1 !important;\\n    transition-duration: 0.01ms !important;\\n  }\\n}\\n\\n.apexcharts-canvas ::-webkit-scrollbar {\\n  -webkit-appearance: none;\\n  width: 6px\\n}\\n\\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\\n  border-radius: 4px;\\n  background-color: rgba(0, 0, 0, .5);\\n  box-shadow: 0 0 1px rgba(255, 255, 255, .5);\\n  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\\n}\\n\\n.apexcharts-inner {\\n  position: relative\\n}\\n\\n.apexcharts-text tspan {\\n  font-family: inherit\\n}\\n\\nrect.legend-mouseover-inactive,\\n.legend-mouseover-inactive rect,\\n.legend-mouseover-inactive path,\\n.legend-mouseover-inactive circle,\\n.legend-mouseover-inactive line,\\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\\n  transition: .15s ease all;\\n  opacity: .2\\n}\\n\\n/* Linked Views (#4): per-mark crossfilter dim. Applied to individual data\\n   marks (not whole series) whose x is outside the brushed range. Opacity is\\n   overridable per chart via the --apx-cf-dim custom property. */\\n.apexcharts-crossfilter-dimmed {\\n  transition: opacity .25s ease;\\n  opacity: var(--apx-cf-dim, .2)\\n}\\n\\n/* Linked Views (#4): default styling for the built-in crossfilter data table\\n   (cf.dataTable). Deliberately light so host styles can override. */\\n.apexcharts-cf-table {\\n  border-collapse: collapse;\\n  width: 100%;\\n  font-size: 13px;\\n}\\n.apexcharts-cf-table caption {\\n  caption-side: bottom;\\n  text-align: right;\\n  padding: 6px 2px;\\n  font-size: 12px;\\n  opacity: .7\\n}\\n.apexcharts-cf-table th,\\n.apexcharts-cf-table td {\\n  padding: 6px 10px;\\n  text-align: left;\\n  border-bottom: 1px solid rgba(0, 0, 0, .08)\\n}\\n.apexcharts-cf-table th {\\n  font-weight: 600;\\n  border-bottom-width: 2px\\n}\\n.apexcharts-cf-table tbody tr:hover {\\n  background: rgba(99, 102, 241, .06)\\n}\\n\\n/* Measure ruler (#18): measure / delta ruler.\\n   Theme via these classes or the --apx-measure-* custom properties below\\n   (config `chart.measure.colors` overrides both). The ruler group also carries\\n   a direction class: apexcharts-measure-up | -down | -flat.\\n   Element classes:\\n     .apexcharts-measure-band     shaded span band\\n     .apexcharts-measure-vline    vertical guide lines\\n     .apexcharts-measure-line     free-mode diagonal line\\n     .apexcharts-measure-label-bg readout box     .apexcharts-measure-label text\\n   Colors are applied as SVG presentation attributes, so any rule you write on\\n   these classes overrides them. */\\n.apexcharts-canvas {\\n  --apx-measure-up: #16a34a;\\n  --apx-measure-down: #dc2626;\\n  --apx-measure-neutral: #64748b;\\n  --apx-measure-guide: #94a3b8;\\n}\\n.apexcharts-measure-capture {\\n  cursor: crosshair;\\n}\\n\\n/* Radial Actions (#chrome): right-click context menu. Theme via these classes\\n   or the --apx-menu-* custom properties. */\\n.apexcharts-canvas {\\n  --apx-menu-bg: #ffffff;\\n  --apx-menu-fg: #1e293b;\\n  --apx-menu-border: #e2e8f0;\\n  --apx-menu-hover: #f1f5f9;\\n  --apx-menu-shadow: rgba(15, 23, 42, 0.18);\\n}\\n.apexcharts-context-menu {\\n  min-width: 168px;\\n  padding: 4px;\\n  border-radius: 8px;\\n  background: var(--apx-menu-bg);\\n  border: 1px solid var(--apx-menu-border);\\n  box-shadow: 0 6px 22px var(--apx-menu-shadow);\\n  font-family: Helvetica, Arial, sans-serif;\\n  font-size: 13px;\\n  z-index: 20;\\n  user-select: none;\\n}\\n.apexcharts-context-menu-item {\\n  display: block;\\n  width: 100%;\\n  box-sizing: border-box;\\n  text-align: left;\\n  padding: 7px 12px;\\n  border: 0;\\n  border-radius: 5px;\\n  background: transparent;\\n  color: var(--apx-menu-fg);\\n  font: inherit;\\n  cursor: pointer;\\n}\\n.apexcharts-context-menu-item:hover,\\n.apexcharts-context-menu-item--active {\\n  background: var(--apx-menu-hover);\\n}\\n.apexcharts-context-menu-item:focus {\\n  outline: none;\\n}\\n\\n/* Ink Layer (#7): the floating note editor card, opened by clicking an\\n   ink-managed annotation. Theme via these classes or the --apx-ink-* vars. */\\n.apexcharts-canvas {\\n  --apx-ink-card-bg: #ffffff;\\n  --apx-ink-card-fg: #1e293b;\\n  --apx-ink-card-border: #e2e8f0;\\n  --apx-ink-card-hover: #f1f5f9;\\n  --apx-ink-card-accent: #6366f1;\\n  --apx-ink-card-shadow: rgba(15, 23, 42, 0.18);\\n}\\n.apexcharts-ink-card {\\n  position: absolute;\\n  z-index: 25;\\n  display: flex;\\n  flex-direction: column;\\n  gap: 6px;\\n  padding: 8px;\\n  border-radius: 8px;\\n  background: var(--apx-ink-card-bg);\\n  border: 1px solid var(--apx-ink-card-border);\\n  box-shadow: 0 6px 22px var(--apx-ink-card-shadow);\\n  font-family: Helvetica, Arial, sans-serif;\\n  font-size: 12px;\\n  color: var(--apx-ink-card-fg);\\n  user-select: none;\\n}\\n.apexcharts-ink-card-row {\\n  display: flex;\\n  align-items: center;\\n  gap: 4px;\\n}\\n.apexcharts-ink-card input.apexcharts-ink-editor {\\n  flex: 1 1 auto;\\n  width: 150px;\\n  min-width: 0;\\n  box-sizing: border-box;\\n  padding: 4px 6px;\\n  font: inherit;\\n  color: inherit;\\n  background: transparent;\\n  border: 1px solid var(--apx-ink-card-border);\\n  border-radius: 5px;\\n}\\n.apexcharts-ink-card input.apexcharts-ink-editor:focus {\\n  outline: none;\\n  border-color: var(--apx-ink-card-accent);\\n}\\n.apexcharts-ink-btn {\\n  flex: 0 0 auto;\\n  width: 24px;\\n  height: 24px;\\n  display: inline-flex;\\n  align-items: center;\\n  justify-content: center;\\n  padding: 0;\\n  border: 0;\\n  border-radius: 5px;\\n  background: transparent;\\n  color: inherit;\\n  font: inherit;\\n  font-size: 12px;\\n  line-height: 1;\\n  cursor: pointer;\\n}\\n.apexcharts-ink-btn:hover,\\n.apexcharts-ink-btn--active {\\n  background: var(--apx-ink-card-hover);\\n}\\n.apexcharts-ink-btn:focus-visible,\\n.apexcharts-ink-swatch:focus-visible {\\n  outline: 2px solid var(--apx-ink-card-accent);\\n  outline-offset: 1px;\\n}\\n.apexcharts-ink-btn--bold {\\n  font-weight: 700;\\n}\\n.apexcharts-ink-btn--delete:hover {\\n  color: #dc2626;\\n}\\n.apexcharts-ink-swatch {\\n  flex: 0 0 auto;\\n  width: 16px;\\n  height: 16px;\\n  padding: 0;\\n  border: 1px solid rgba(100, 116, 139, 0.45);\\n  border-radius: 50%;\\n  cursor: pointer;\\n}\\n.apexcharts-ink-swatch--active {\\n  box-shadow:\\n    0 0 0 2px var(--apx-ink-card-bg),\\n    0 0 0 4px var(--apx-ink-card-accent);\\n}\\n.apexcharts-ink-sep {\\n  flex: 0 0 auto;\\n  width: 1px;\\n  height: 16px;\\n  margin: 0 2px;\\n  background: var(--apx-ink-card-border);\\n}\\n.apexcharts-ink-cardlabel {\\n  flex: 0 0 auto;\\n  font-size: 10px;\\n  letter-spacing: 0.4px;\\n  text-transform: uppercase;\\n  opacity: 0.65;\\n  margin-right: 2px;\\n}\\n.apexcharts-ink-marker-size {\\n  flex: 0 0 auto;\\n  min-width: 16px;\\n  text-align: center;\\n  font-variant-numeric: tabular-nums;\\n}\\n\\n.apexcharts-legend-text {\\n  padding-left: 15px;\\n  margin-left: -15px;\\n}\\n\\n.apexcharts-legend-series[role=\"button\"]:focus {\\n  outline: 2px solid var(--apexcharts-focus-color, #008FFB);\\n  outline-offset: 2px;\\n}\\n\\n.apexcharts-legend-series[role=\"button\"]:focus:not(:focus-visible) {\\n  outline: none;\\n}\\n\\n.apexcharts-legend-series[role=\"button\"]:focus-visible {\\n  outline: 2px solid var(--apexcharts-focus-color, #008FFB);\\n  outline-offset: 2px;\\n}\\n\\n.apexcharts-series-collapsed {\\n  opacity: 0\\n}\\n\\n.apexcharts-canvas svg:focus:not(:focus-visible) {\\n  outline: none;\\n}\\n\\n/* Keyboard navigation focus indicator on SVG data elements.\\n   SVG elements don\\'t support CSS outline, so we use stroke. */\\n.apexcharts-bar-area.apexcharts-keyboard-focused,\\n.apexcharts-candlestick-area.apexcharts-keyboard-focused,\\n.apexcharts-boxPlot-area.apexcharts-keyboard-focused,\\n.apexcharts-rangebar-area.apexcharts-keyboard-focused,\\n.apexcharts-pie-area.apexcharts-keyboard-focused,\\n.apexcharts-heatmap-rect.apexcharts-keyboard-focused,\\n.apexcharts-treemap-rect.apexcharts-keyboard-focused {\\n  stroke: var(--apexcharts-focus-color, #008FFB);\\n  stroke-width: 2;\\n  stroke-opacity: 1;\\n}\\n\\n.apexcharts-tooltip {\\n  --apx-tt-bg: #ffffff;\\n  /* Shared by the body and the arrow\\'s two outward facets, so the\\n   * hairline reads as one continuous outline around the whole shape.\\n   * Keep it strong enough to survive on its own: the shadow below is\\n   * elevation, not edge definition. */\\n  --apx-tt-border: rgba(15, 23, 42, 0.12);\\n  /* Elevation, in three layers: a tight contact shadow that anchors the\\n   * bottom edge, a directional key shadow for the lift, and a wide\\n   * ambient one that grounds the whole box. Each is weaker and more\\n   * diffuse than the last.\\n   *\\n   * A tooltip is unusual in that it floats over *data*, so reach costs\\n   * more than it does on a page: every pixel the shadow travels tints a\\n   * bar or a line the reader is trying to compare. These numbers are\\n   * tuned to keep the near-edge contrast that reads as elevation while\\n   * dropping the long low haze that only muddies the plot.\\n   *\\n   * Note there is deliberately no `0 0 0 1px` ring layer. That used to\\n   * stand in for edge definition back when --apx-tt-border was barely\\n   * visible; now that the border is a real hairline (and the arrow\\n   * shares it) a ring only double-draws the outline, and being spread\\n   * rather than offset it leaked ink upward too, flattening the lift.\\n   *\\n   * `--apx-tt-shadow-dir` flips the whole stack\\'s Y in one place \\u2014 see\\n   * the `[data-placement=\"bottom\"]` rule further down. */\\n  --apx-tt-shadow-dir: 1;\\n  --apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(15, 23, 42, 0.06), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(15, 23, 42, 0.10), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(15, 23, 42, 0.14);\\n  --apx-tt-arrow-bg: var(--apx-tt-bg);\\n  --apx-tt-color: #0f172a;\\n  --apx-tt-color-muted: rgba(15, 23, 42, 0.55);\\n  border-radius: 8px;\\n  background: var(--apx-tt-bg);\\n  border: 1px solid var(--apx-tt-border);\\n  box-shadow: var(--apx-tt-shadow);\\n  color: var(--apx-tt-color);\\n  cursor: default;\\n  font-size: 13px;\\n  left: 0;\\n  top: 0;\\n  opacity: 0;\\n  pointer-events: none;\\n  position: absolute;\\n  display: flex;\\n  flex-direction: column;\\n  padding: 2px 0;\\n  white-space: nowrap;\\n  z-index: 12;\\n  transition: opacity .12s ease\\n}\\n\\n/* While the tooltip is visible, smoothly animate position changes\\n * between data points. Kept short (160 ms) and ease-out so it stays\\n * responsive \\u2014 too long would feel laggy when sweeping across many\\n * points fast. The position transition is only attached after the\\n * first paint (Position.applyTooltipPosition flips `data-positioned`\\n * once the tooltip has been placed) so the *first* show doesn\\'t slide\\n * the tooltip in from the previously-stale (0,0) coordinates. */\\n.apexcharts-tooltip.apexcharts-active {\\n  opacity: 1;\\n  transition: opacity .12s ease\\n}\\n.apexcharts-tooltip.apexcharts-active[data-positioned=\"true\"] {\\n  transition: opacity .12s ease, left .16s ease-out, top .16s ease-out\\n}\\n\\n.apexcharts-tooltip.apexcharts-theme-light {\\n  /* defaults already set above; class kept for backward-compat selectors */\\n}\\n\\n.apexcharts-tooltip.apexcharts-theme-dark {\\n  --apx-tt-bg: #1c1c1f;\\n  --apx-tt-border: rgba(255, 255, 255, 0.16);\\n  /* Dark needs more alpha than light to register at all, but not as much\\n   * as it used to: the light rim above now carries the edge, so the\\n   * shadow is free to be pure elevation instead of doubling as an\\n   * outline. Same geometry as light, heavier ink. */\\n  --apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(0, 0, 0, 0.24), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(0, 0, 0, 0.30), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(0, 0, 0, 0.38);\\n  --apx-tt-color: #f3f4f6;\\n  --apx-tt-color-muted: rgba(243, 244, 246, 0.55);\\n}\\n\\n.apexcharts-tooltip * {\\n  font-family: inherit\\n}\\n\\n/* Point-annotation hover tooltip (apexcharts/apexcharts.js#2424). Reuses the\\n * glass body/border/shadow from `.apexcharts-tooltip` but holds free-form\\n * content, so it needs its own padding, wrapping and a sane max width. */\\n.apexcharts-tooltip.apexcharts-annotation-tooltip {\\n  padding: 6px 10px;\\n  max-width: 240px;\\n  white-space: normal;\\n  line-height: 1.4;\\n  pointer-events: none;\\n  z-index: 13\\n}\\n\\n.apexcharts-tooltip-title {\\n  padding: 8px 12px 4px;\\n  font-size: 12px;\\n  font-weight: 600;\\n  letter-spacing: 0.01em;\\n  color: var(--apx-tt-color-muted);\\n  background: transparent;\\n  border-bottom: none;\\n  margin-bottom: 0\\n}\\n\\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,\\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\\n  background: transparent;\\n  border-bottom: none\\n}\\n\\n/* `fillSeriesColor`: each series-group already paints itself with the\\n * series colour. Drop the glass body entirely (transparent bg, no\\n * border, no backdrop-filter, no padding) and clip the coloured\\n * series-group(s) to the tooltip\\'s rounded corners so they fill the\\n * shell edge-to-edge. Text inside the coloured group is forced to\\n * white for contrast. */\\n.apexcharts-tooltip.apexcharts-tooltip-fill-series {\\n  background: transparent;\\n  -webkit-backdrop-filter: none;\\n  backdrop-filter: none;\\n  border: none;\\n  padding: 0;\\n  overflow: hidden;\\n  color: #fff\\n}\\n\\n.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title {\\n  background: rgba(0, 0, 0, 0.22);\\n  color: #fff;\\n  opacity: 1;\\n  padding: 6px 12px\\n}\\n\\n.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group {\\n  color: #fff\\n}\\n\\n/* Arrow connector \\u2014 a 45\\xb0-rotated square straddling the body\\'s edge, so\\n * the body\\'s 1px border runs continuously out across the arrow and back.\\n * The two facets that face away from the tooltip carry the border; the\\n * two that face into it carry none, and the square\\'s opaque fill covers\\n * the segment of the body\\'s own border it sits on, hiding the seam.\\n *\\n * This is why it\\'s a rotated square and not a triangle: `clip-path`\\n * erases `border` and `box-shadow` along with everything outside the\\n * polygon, which left `filter: drop-shadow` as the only way to suggest\\n * an edge \\u2014 and a drop-shadow can only ever blur one, never draw a\\n * hairline. Nothing here needs a filter.\\n *\\n * Geometry: a square of side S rotated 45\\xb0 reaches S/\\u221A2 from its centre\\n * to each corner, so S = 10px gives the ~7px tip overhang that\\n * ARROW_TIP_OVERHANG assumes (tooltip/constants.js) over a ~14px base.\\n * The offsets park the square\\'s *centre* 1px outside the padding box\\n * (-6px = -1px border - 10px/2), i.e. exactly on the body\\'s border line,\\n * so the two borders meet end to end instead of overlapping or gapping.\\n * `box-sizing` must be border-box or the bordered sides would grow the\\n * square asymmetrically and knock its centre off that line. */\\n.apexcharts-tooltip-arrow {\\n  position: absolute;\\n  box-sizing: border-box;\\n  width: 10px;\\n  height: 10px;\\n  background: var(--apx-tt-arrow-bg);\\n  transform: rotate(45deg);\\n  pointer-events: none;\\n  top: calc(var(--apx-tt-arrow-y, 50%) - 5px)\\n}\\n\\n/* Which two sides face outward depends on the placement. Under\\n * `rotate(45deg)` the square\\'s bottom-left corner swings to the left,\\n * top-right to the right, top-left to the top and bottom-right to the\\n * bottom \\u2014 so the pair of borders below is always the two sharing the\\n * corner that ends up as the tip. */\\n.apexcharts-tooltip[data-placement=\"right\"] .apexcharts-tooltip-arrow {\\n  left: -6px;\\n  border-left: 1px solid var(--apx-tt-border);\\n  border-bottom: 1px solid var(--apx-tt-border)\\n}\\n\\n.apexcharts-tooltip[data-placement=\"left\"] .apexcharts-tooltip-arrow {\\n  right: -6px;\\n  border-top: 1px solid var(--apx-tt-border);\\n  border-right: 1px solid var(--apx-tt-border)\\n}\\n\\n/* Vertical arrow variants: tooltip is above/below the data point and the\\n * arrow points down/up. The base rule above uses `--apx-tt-arrow-y` for\\n * left/right placement; for top/bottom we centre on `--apx-tt-arrow-x`\\n * instead (set by applyTooltipPosition). */\\n.apexcharts-tooltip[data-placement=\"top\"] .apexcharts-tooltip-arrow,\\n.apexcharts-tooltip[data-placement=\"bottom\"] .apexcharts-tooltip-arrow {\\n  top: auto;\\n  left: calc(var(--apx-tt-arrow-x, 50%) - 5px)\\n}\\n\\n.apexcharts-tooltip[data-placement=\"top\"] .apexcharts-tooltip-arrow {\\n  bottom: -6px;\\n  border-right: 1px solid var(--apx-tt-border);\\n  border-bottom: 1px solid var(--apx-tt-border)\\n}\\n\\n.apexcharts-tooltip[data-placement=\"bottom\"] .apexcharts-tooltip-arrow {\\n  top: -6px;\\n  border-top: 1px solid var(--apx-tt-border);\\n  border-left: 1px solid var(--apx-tt-border)\\n}\\n\\n/* When the tooltip is flipped below the data point, the default\\n * downward-biased shadow leaves its top edge undefined. Negating the\\n * direction casts the whole elevation upward instead, so the shadow\\n * falls between the tooltip and the mark above it. One multiplier flips\\n * all three layers together; the arrow needs no counterpart, since its\\n * border doesn\\'t depend on light direction. */\\n.apexcharts-tooltip[data-placement=\"bottom\"] {\\n  --apx-tt-shadow-dir: -1\\n}\\n\\n.apexcharts-tooltip-text-goals-value,\\n.apexcharts-tooltip-text-y-value,\\n.apexcharts-tooltip-text-z-value {\\n  display: inline-block;\\n  margin-left: 5px;\\n  font-weight: 600\\n}\\n\\n.apexcharts-tooltip-text-goals-label:empty,\\n.apexcharts-tooltip-text-goals-value:empty,\\n.apexcharts-tooltip-text-y-label:empty,\\n.apexcharts-tooltip-text-y-value:empty,\\n.apexcharts-tooltip-text-z-value:empty,\\n.apexcharts-tooltip-title:empty {\\n  display: none\\n}\\n\\n.apexcharts-tooltip-text-goals-label,\\n.apexcharts-tooltip-text-goals-value {\\n  padding: 6px 0 5px\\n}\\n\\n.apexcharts-tooltip-goals-group,\\n.apexcharts-tooltip-text-goals-label,\\n.apexcharts-tooltip-text-goals-value {\\n  display: flex\\n}\\n\\n.apexcharts-tooltip-text-goals-label:not(:empty),\\n.apexcharts-tooltip-text-goals-value:not(:empty) {\\n  margin-top: -6px\\n}\\n\\n.apexcharts-tooltip-marker {\\n  display: inline-flex;\\n  align-items: center;\\n  justify-content: center;\\n  position: relative;\\n  width: 12px;\\n  height: 12px;\\n  margin-right: 6px;\\n  vertical-align: middle;\\n  color: inherit;\\n}\\n\\n.apexcharts-tooltip-marker svg {\\n  width: 100%;\\n  height: 100%;\\n  display: block;\\n}\\n\\n.apexcharts-tooltip-series-group {\\n  padding: 4px 12px;\\n  display: none;\\n  gap: 8px;\\n  text-align: left;\\n  justify-content: left;\\n  align-items: center\\n}\\n\\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\\n  opacity: 1\\n}\\n\\n.apexcharts-tooltip-series-group.apexcharts-active:last-child,\\n.apexcharts-tooltip-series-group:last-child {\\n  padding-bottom: 8px\\n}\\n\\n.apexcharts-tooltip-y-group {\\n  padding: 6px 0 5px\\n}\\n\\n.apexcharts-custom-tooltip,\\n.apexcharts-tooltip-box {\\n  padding: 4px 8px\\n}\\n\\n.apexcharts-tooltip-boxPlot {\\n  display: flex;\\n  flex-direction: column-reverse\\n}\\n\\n.apexcharts-tooltip-box>div {\\n  margin: 4px 0\\n}\\n\\n.apexcharts-tooltip-box span.value {\\n  font-weight: 700\\n}\\n\\n.apexcharts-tooltip-rangebar {\\n  padding: 5px 8px\\n}\\n\\n.apexcharts-tooltip-rangebar .category {\\n  font-weight: 600;\\n  color: #777\\n}\\n\\n.apexcharts-tooltip-rangebar .series-name {\\n  font-weight: 700;\\n  display: block;\\n  margin-bottom: 5px\\n}\\n\\n/* X/Y axis tooltips \\u2014 small popovers that label the crosshair on the\\n * axes. Restyled to match the modern data-tooltip palette: solid white\\n * body with a subtle border + soft drop-shadow, smaller font, rounded\\n * corners. The arrows still use the CSS border-triangle technique\\n * (cheap, crisp at small sizes); their colours flow from CSS variables\\n * so light/dark themes only need one override per axis. */\\n.apexcharts-xaxistooltip,\\n.apexcharts-yaxistooltip {\\n  --apx-axt-bg: #ffffff;\\n  --apx-axt-border: rgba(15, 23, 42, 0.08);\\n  --apx-axt-color: #0f172a;\\n  --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12);\\n  opacity: 0;\\n  pointer-events: none;\\n  color: var(--apx-axt-color);\\n  font-size: 12px;\\n  font-weight: 500;\\n  text-align: center;\\n  border-radius: 6px;\\n  position: absolute;\\n  z-index: 10;\\n  background: var(--apx-axt-bg);\\n  border: 1px solid var(--apx-axt-border);\\n  box-shadow: var(--apx-axt-shadow)\\n}\\n\\n.apexcharts-xaxistooltip.apexcharts-theme-dark,\\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\\n  --apx-axt-bg: #1c1c1f;\\n  --apx-axt-border: rgba(255, 255, 255, 0.1);\\n  --apx-axt-color: #f3f4f6;\\n  --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45)\\n}\\n\\n.apexcharts-xaxistooltip {\\n  padding: 4px 8px;\\n  transition: .15s ease all\\n}\\n\\n.apexcharts-xaxistooltip:after,\\n.apexcharts-xaxistooltip:before {\\n  left: 50%;\\n  border: solid transparent;\\n  content: \" \";\\n  height: 0;\\n  width: 0;\\n  position: absolute;\\n  pointer-events: none\\n}\\n\\n/* :before paints the 1px border outline of the triangle (slightly larger\\n * than :after); :after sits inside and paints the fill \\u2014 leaves a 1px\\n * ring of :before visible at the edges. */\\n.apexcharts-xaxistooltip:after {\\n  border-color: transparent;\\n  border-width: 5px;\\n  margin-left: -5px\\n}\\n\\n.apexcharts-xaxistooltip:before {\\n  border-color: transparent;\\n  border-width: 6px;\\n  margin-left: -6px\\n}\\n\\n.apexcharts-xaxistooltip-bottom:after,\\n.apexcharts-xaxistooltip-bottom:before {\\n  bottom: 100%\\n}\\n\\n.apexcharts-xaxistooltip-top:after,\\n.apexcharts-xaxistooltip-top:before {\\n  top: 100%\\n}\\n\\n.apexcharts-xaxistooltip-bottom:after {\\n  border-bottom-color: var(--apx-axt-bg)\\n}\\n\\n.apexcharts-xaxistooltip-bottom:before {\\n  border-bottom-color: var(--apx-axt-border)\\n}\\n\\n.apexcharts-xaxistooltip-top:after {\\n  border-top-color: var(--apx-axt-bg)\\n}\\n\\n.apexcharts-xaxistooltip-top:before {\\n  border-top-color: var(--apx-axt-border)\\n}\\n\\n.apexcharts-xaxistooltip.apexcharts-active {\\n  opacity: 1;\\n  transition: .15s ease all\\n}\\n\\n.apexcharts-yaxistooltip {\\n  padding: 3px 8px\\n}\\n\\n.apexcharts-yaxistooltip:after,\\n.apexcharts-yaxistooltip:before {\\n  top: 50%;\\n  border: solid transparent;\\n  content: \" \";\\n  height: 0;\\n  width: 0;\\n  position: absolute;\\n  pointer-events: none\\n}\\n\\n.apexcharts-yaxistooltip:after {\\n  border-color: transparent;\\n  border-width: 5px;\\n  margin-top: -5px\\n}\\n\\n.apexcharts-yaxistooltip:before {\\n  border-color: transparent;\\n  border-width: 6px;\\n  margin-top: -6px\\n}\\n\\n.apexcharts-yaxistooltip-left:after,\\n.apexcharts-yaxistooltip-left:before {\\n  left: 100%\\n}\\n\\n.apexcharts-yaxistooltip-right:after,\\n.apexcharts-yaxistooltip-right:before {\\n  right: 100%\\n}\\n\\n.apexcharts-yaxistooltip-left:after {\\n  border-left-color: var(--apx-axt-bg)\\n}\\n\\n.apexcharts-yaxistooltip-left:before {\\n  border-left-color: var(--apx-axt-border)\\n}\\n\\n.apexcharts-yaxistooltip-right:after {\\n  border-right-color: var(--apx-axt-bg)\\n}\\n\\n.apexcharts-yaxistooltip-right:before {\\n  border-right-color: var(--apx-axt-border)\\n}\\n\\n.apexcharts-yaxistooltip.apexcharts-active {\\n  opacity: 1\\n}\\n\\n.apexcharts-yaxistooltip-hidden {\\n  display: none\\n}\\n\\n.apexcharts-xcrosshairs,\\n.apexcharts-ycrosshairs {\\n  pointer-events: none;\\n  opacity: 0;\\n  transition: .15s ease all\\n}\\n\\n.apexcharts-xcrosshairs.apexcharts-active,\\n.apexcharts-ycrosshairs.apexcharts-active {\\n  opacity: 1;\\n  transition: .15s ease all\\n}\\n\\n.apexcharts-ycrosshairs-hidden {\\n  opacity: 0\\n}\\n\\n.apexcharts-selection-rect {\\n  cursor: move\\n}\\n\\n.svg_select_shape {\\n  stroke-width: 1;\\n  stroke-dasharray: 10 10;\\n  stroke: black;\\n  stroke-opacity: 0.1;\\n  pointer-events: none;\\n  fill: none;\\n}\\n\\n.svg_select_handle {\\n  stroke-width: 3;\\n  stroke: black;\\n  fill: none;\\n}\\n\\n.svg_select_handle_r {\\n  cursor: e-resize;\\n}\\n\\n.svg_select_handle_l {\\n  cursor: w-resize;\\n}\\n\\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\\n  cursor: crosshair\\n}\\n\\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\\n  cursor: move\\n}\\n\\n.apexcharts-menu-icon,\\n.apexcharts-measure-icon,\\n.apexcharts-pan-icon,\\n.apexcharts-reset-icon,\\n.apexcharts-selection-icon,\\n.apexcharts-toolbar-custom-icon,\\n.apexcharts-zoom-icon,\\n.apexcharts-zoomin-icon,\\n.apexcharts-zoomout-icon {\\n  cursor: pointer;\\n  /* WCAG 2.5.8 Target Size (Minimum): 24\\xd724 CSS px hit target. */\\n  width: 26px;\\n  height: 24px;\\n  line-height: 24px;\\n  color: #6e8192;\\n  text-align: center;\\n  /* Reset native <button> chrome \\u2014 these are styled via SVG icons. */\\n  padding: 0;\\n  margin: 0;\\n  background: transparent;\\n  border: 0;\\n  border-radius: 5px;\\n  display: inline-flex;\\n  align-items: center;\\n  justify-content: center;\\n  transition: background-color .12s ease, color .12s ease;\\n}\\n\\n.apexcharts-menu-icon svg,\\n.apexcharts-measure-icon svg,\\n.apexcharts-pan-icon svg,\\n.apexcharts-reset-icon svg,\\n.apexcharts-selection-icon svg,\\n.apexcharts-zoom-icon svg,\\n.apexcharts-zoomin-icon svg,\\n.apexcharts-zoomout-icon svg {\\n  width: 18px;\\n  height: 18px;\\n  fill: none;\\n  stroke: currentColor;\\n  stroke-width: 2;\\n  stroke-linecap: round;\\n  stroke-linejoin: round\\n}\\n\\n.apexcharts-theme-dark .apexcharts-menu-icon,\\n.apexcharts-theme-dark .apexcharts-measure-icon,\\n.apexcharts-theme-dark .apexcharts-pan-icon,\\n.apexcharts-theme-dark .apexcharts-reset-icon,\\n.apexcharts-theme-dark .apexcharts-selection-icon,\\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,\\n.apexcharts-theme-dark .apexcharts-zoom-icon,\\n.apexcharts-theme-dark .apexcharts-zoomin-icon,\\n.apexcharts-theme-dark .apexcharts-zoomout-icon {\\n  color: #d4d6dc\\n}\\n\\n.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,\\n.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,\\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,\\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,\\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected {\\n  background: rgba(0, 143, 251, 0.12);\\n  color: #008ffb\\n}\\n\\n.apexcharts-theme-light .apexcharts-menu-icon:hover,\\n.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-light .apexcharts-reset-icon:hover,\\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover,\\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover {\\n  background: rgba(15, 23, 42, 0.06);\\n  color: #1f2937\\n}\\n\\n.apexcharts-theme-dark .apexcharts-menu-icon:hover,\\n.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-dark .apexcharts-reset-icon:hover,\\n.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,\\n.apexcharts-theme-dark .apexcharts-zoomout-icon:hover {\\n  background: rgba(255, 255, 255, 0.08);\\n  color: #fff\\n}\\n\\n.apexcharts-menu-icon,\\n.apexcharts-selection-icon {\\n  position: relative\\n}\\n\\n.apexcharts-toolbar {\\n  position: absolute;\\n  z-index: 11;\\n  display: inline-flex;\\n  align-items: center;\\n  gap: 1px;\\n  padding: 3px;\\n  border-radius: 8px;\\n  background: rgba(255, 255, 255, 0.85);\\n  backdrop-filter: blur(8px);\\n  -webkit-backdrop-filter: blur(8px);\\n}\\n\\n.apexcharts-theme-dark .apexcharts-toolbar {\\n  background: rgba(28, 28, 31, 0.82);\\n}\\n\\n.apexcharts-menu {\\n  background: rgba(255, 255, 255, 0.95);\\n  backdrop-filter: blur(8px);\\n  -webkit-backdrop-filter: blur(8px);\\n  position: absolute;\\n  top: calc(100% + 4px);\\n  border: 1px solid rgba(15, 23, 42, 0.08);\\n  border-radius: 8px;\\n  padding: 4px;\\n  right: 0;\\n  opacity: 0;\\n  min-width: 120px;\\n  transition: opacity .15s ease, transform .15s ease;\\n  transform: translateY(-2px);\\n  pointer-events: none;\\n  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06)\\n}\\n\\n.apexcharts-menu.apexcharts-menu-open {\\n  opacity: 1;\\n  transform: translateY(0);\\n  pointer-events: all\\n}\\n\\n.apexcharts-menu-item {\\n  padding: 6px 9px;\\n  font-size: 12px;\\n  border-radius: 5px;\\n  cursor: pointer\\n}\\n\\n.apexcharts-theme-light .apexcharts-menu-item:hover {\\n  background: rgba(15, 23, 42, 0.06)\\n}\\n\\n.apexcharts-theme-dark .apexcharts-menu {\\n  background: rgba(28, 28, 31, 0.92);\\n  border-color: rgba(255, 255, 255, 0.08);\\n  color: #f3f4f6;\\n  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4)\\n}\\n\\n.apexcharts-theme-dark .apexcharts-menu-item:hover {\\n  background: rgba(255, 255, 255, 0.08)\\n}\\n\\n@media screen and (min-width:768px) {\\n  .apexcharts-canvas:hover .apexcharts-toolbar {\\n    opacity: 1\\n  }\\n}\\n\\n/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */\\n.apexcharts-toolbar:focus-within {\\n  opacity: 1\\n}\\n\\n/* Focus indicator for toolbar icon buttons */\\n.apexcharts-menu-icon:focus-visible,\\n.apexcharts-measure-icon:focus-visible,\\n.apexcharts-pan-icon:focus-visible,\\n.apexcharts-reset-icon:focus-visible,\\n.apexcharts-selection-icon:focus-visible,\\n.apexcharts-toolbar-custom-icon:focus-visible,\\n.apexcharts-zoom-icon:focus-visible,\\n.apexcharts-zoomin-icon:focus-visible,\\n.apexcharts-zoomout-icon:focus-visible {\\n  outline: 2px solid var(--apexcharts-focus-color, #008FFB);\\n  outline-offset: 1px;\\n  border-radius: 5px\\n}\\n\\n/* Focus indicator for hamburger menu items */\\n.apexcharts-menu-item:focus-visible {\\n  outline: 2px solid var(--apexcharts-focus-color, #008FFB);\\n  outline-offset: -2px;\\n  background: #eee\\n}\\n\\n.apexcharts-canvas .apexcharts-element-hidden,\\n.apexcharts-datalabel.apexcharts-element-hidden,\\n.apexcharts-hide .apexcharts-series-points {\\n  opacity: 0;\\n}\\n\\n.apexcharts-hidden-element-shown {\\n  opacity: 1;\\n  transition: 0.25s ease all;\\n}\\n\\n.apexcharts-datalabel,\\n.apexcharts-datalabel-label,\\n.apexcharts-datalabel-value,\\n.apexcharts-datalabels,\\n.apexcharts-pie-label,\\n.apexcharts-pie-name-label,\\n.apexcharts-pie-name-label-group,\\n.apexcharts-pie-label-connector,\\n.apexcharts-unit-outer-label,\\n.apexcharts-unit-outer-label-group,\\n.apexcharts-unit-label-connector {\\n  cursor: default;\\n  pointer-events: none\\n}\\n\\n.apexcharts-pie-label-connector,\\n.apexcharts-unit-label-connector {\\n  fill: none\\n}\\n\\n.apexcharts-pie-label-delay,\\n.apexcharts-unit-label-delay {\\n  opacity: 0;\\n  animation-name: opaque;\\n  animation-duration: .3s;\\n  animation-fill-mode: forwards;\\n  animation-timing-function: ease\\n}\\n\\n/* Slower than the pie\\'s, on purpose: these come in while the dots are still\\n   easing into place, so a longer fade reads as arriving WITH the crowd. */\\n.apexcharts-unit-label-delay {\\n  animation-duration: .5s\\n}\\n\\n.apexcharts-radialbar-label {\\n  cursor: pointer;\\n}\\n\\n.apexcharts-annotation-rect,\\n.apexcharts-area-series .apexcharts-area,\\n.apexcharts-gridline,\\n.apexcharts-line,\\n.apexcharts-point-annotation-label,\\n.apexcharts-radar-series path:not(.apexcharts-marker),\\n.apexcharts-radar-series polygon,\\n.apexcharts-toolbar svg,\\n.apexcharts-tooltip .apexcharts-marker,\\n.apexcharts-xaxis-annotation-label,\\n.apexcharts-yaxis-annotation-label,\\n.apexcharts-zoom-rect,\\n.no-pointer-events {\\n  pointer-events: none\\n}\\n\\n.apexcharts-tooltip-active .apexcharts-marker {\\n  transition: .15s ease all\\n}\\n\\n.apexcharts-radar-series .apexcharts-yaxis {\\n  pointer-events: none;\\n}\\n\\n.resize-triggers {\\n  animation: 1ms resizeanim;\\n  visibility: hidden;\\n  opacity: 0;\\n  height: 100%;\\n  width: 100%;\\n  overflow: hidden\\n}\\n\\n.contract-trigger:before,\\n.resize-triggers,\\n.resize-triggers>div {\\n  content: \" \";\\n  display: block;\\n  position: absolute;\\n  top: 0;\\n  left: 0\\n}\\n\\n.resize-triggers>div {\\n  height: 100%;\\n  width: 100%;\\n  background: #eee;\\n  overflow: auto\\n}\\n\\n.contract-trigger:before {\\n  overflow: hidden;\\n  width: 200%;\\n  height: 200%\\n}\\n\\n.apexcharts-bar-goals-markers {\\n  pointer-events: none\\n}\\n\\n.apexcharts-bar-shadows {\\n  pointer-events: none\\n}\\n\\n.apexcharts-rangebar-goals-markers {\\n  pointer-events: none\\n}\\n\\n.apexcharts-drilldown-target {\\n  cursor: pointer\\n}\\n\\n.apexcharts-breadcrumb {\\n  position: absolute;\\n  z-index: 11;\\n  display: inline-flex;\\n  align-items: center;\\n  gap: 2px;\\n  font-size: 12px;\\n  font-family: inherit;\\n  padding: 2px 4px\\n}\\n\\n.apexcharts-breadcrumb-item {\\n  background: transparent;\\n  border: none;\\n  padding: 2px 6px;\\n  border-radius: 3px;\\n  font: inherit;\\n  color: inherit;\\n  cursor: pointer;\\n  line-height: 1.2\\n}\\n\\n.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {\\n  background: rgba(0, 0, 0, 0.08)\\n}\\n\\n.apexcharts-breadcrumb-arrow {\\n  margin-right: 4px;\\n  font-weight: 600;\\n  user-select: none\\n}\\n\\n.apexcharts-breadcrumb-current {\\n  cursor: default;\\n  font-weight: 600;\\n  opacity: 0.85\\n}\\n\\n.apexcharts-breadcrumb-separator {\\n  opacity: 0.5;\\n  user-select: none\\n}\\n\\n.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {\\n  background: rgba(255, 255, 255, 0.12)\\n}\\n\\n.apexcharts-drilldown-loading {\\n  position: absolute;\\n  inset: 0;\\n  z-index: 12;\\n  display: flex;\\n  align-items: center;\\n  justify-content: center;\\n  gap: 10px;\\n  font-size: 13px;\\n  font-family: inherit;\\n  color: inherit;\\n  background: rgba(255, 255, 255, 0.62);\\n  /* The chart underneath stays interactive-looking but must not take clicks\\n     while a level is resolving, or a second drill can start mid-fetch. */\\n  cursor: progress\\n}\\n\\n.apexcharts-drilldown-loading-spinner {\\n  width: 26px;\\n  height: 26px;\\n  border-radius: 50%;\\n  border: 2.5px solid rgba(0, 0, 0, 0.16);\\n  border-top-color: rgba(0, 0, 0, 0.55);\\n  animation: apexcharts-drilldown-spin 0.7s linear infinite\\n}\\n\\n.apexcharts-drilldown-loading-text {\\n  opacity: 0.8\\n}\\n\\n.apexcharts-theme-dark .apexcharts-drilldown-loading {\\n  background: rgba(30, 30, 30, 0.62)\\n}\\n\\n.apexcharts-theme-dark .apexcharts-drilldown-loading-spinner {\\n  border-color: rgba(255, 255, 255, 0.22);\\n  border-top-color: rgba(255, 255, 255, 0.7)\\n}\\n\\n@keyframes apexcharts-drilldown-spin {\\n  to {\\n    transform: rotate(360deg)\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .apexcharts-drilldown-loading-spinner {\\n    animation: apexcharts-drilldown-pulse 1.4s ease-in-out infinite\\n  }\\n\\n  @keyframes apexcharts-drilldown-pulse {\\n    0%, 100% {\\n      opacity: 0.35\\n    }\\n\\n    50% {\\n      opacity: 1\\n    }\\n  }\\n}\\n\\n.apexcharts-disable-transitions * {\\n  transition: none !important;\\n}';\nconst $e4b487e979d7c06d$var$e = globalThis.console;\nfunction $e4b487e979d7c06d$var$t(t2) {\n    $e4b487e979d7c06d$var$e.error(t2);\n}\nfunction $e4b487e979d7c06d$var$s(t2) {\n    $e4b487e979d7c06d$var$e.warn(t2);\n}\nconst $e4b487e979d7c06d$var$i = \"APEX-\", $e4b487e979d7c06d$var$n = /* @__PURE__ */ new Date(\"2027-07-31T00:00:00Z\"), $e4b487e979d7c06d$var$r = \"__apex_license_v1__\";\nfunction $e4b487e979d7c06d$var$a() {\n    const e2 = globalThis;\n    let t2 = e2[$e4b487e979d7c06d$var$r];\n    return t2 || (t2 = {\n        key: null,\n        listeners: /* @__PURE__ */ new Set(),\n        result: null\n    }, e2[$e4b487e979d7c06d$var$r] = t2), t2;\n}\nconst $e4b487e979d7c06d$var$l = class {\n    static get licenseKey() {\n        return $e4b487e979d7c06d$var$a().key;\n    }\n    static set licenseKey(e2) {\n        $e4b487e979d7c06d$var$a().key = e2;\n    }\n    static get listeners() {\n        return $e4b487e979d7c06d$var$a().listeners;\n    }\n    static get validationResult() {\n        return $e4b487e979d7c06d$var$a().result;\n    }\n    static set validationResult(e2) {\n        $e4b487e979d7c06d$var$a().result = e2;\n    }\n    static getKey() {\n        return this.licenseKey;\n    }\n    static getLicenseStatus() {\n        return this.licenseKey ? (this.validationResult = this.validateKey(this.licenseKey), this.validationResult) : {\n            expired: false,\n            signatureVerified: false,\n            valid: false\n        };\n    }\n    static isKeyValid(e2) {\n        return !!e2 && this.validateKey(e2).valid;\n    }\n    static isLicenseValid() {\n        return this.getLicenseStatus().valid;\n    }\n    static onChange(e2) {\n        return this.listeners.add(e2), ()=>{\n            this.listeners.delete(e2);\n        };\n    }\n    static setLicense(e2) {\n        var _a;\n        var i2;\n        if (!e2) return this.licenseKey = null, void this.publish({\n            expired: false,\n            signatureVerified: false,\n            valid: false\n        });\n        const n2 = this.validateKey(e2);\n        n2.valid || e2 === this.licenseKey || !(null == (i2 = this.validationResult) ? void 0 : i2.valid) ? (this.licenseKey = e2, this.publish(n2), n2.valid || $e4b487e979d7c06d$var$t(`[Apex] ${n2.message}`)) : $e4b487e979d7c06d$var$s(`[Apex] Ignoring license key: ${(_a = n2.message) != null ? _a : \"it is not valid\"} A valid license is already active on this page.`);\n    }\n    static validateKey(e2) {\n        const t2 = this.parseKey(e2), s2 = this.validateStructure(e2, t2);\n        if (!s2.valid || !(null == t2 ? void 0 : t2.signature)) return s2;\n        const i2 = this.verdicts.get(e2);\n        return false === i2 ? {\n            data: t2.data,\n            expired: false,\n            message: \"Invalid license key. The license signature does not verify.\",\n            signatureVerified: true,\n            valid: false\n        } : (void 0 === i2 && this.verifySignature(e2, t2, s2), $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n            signatureVerified: true === i2\n        }));\n    }\n    static _resetSignatureState() {\n        this.verdicts.clear(), this.verifying.clear(), this.warnedUnverifiable = false, this.epoch++;\n    }\n    static base64ToBytes(e2) {\n        const t2 = e2.replace(/-/g, \"+\").replace(/_/g, \"/\"), s2 = t2.padEnd(4 * Math.ceil(t2.length / 4), \"=\"), i2 = globalThis.atob;\n        if (\"function\" != typeof i2) throw new Error(\"no base64 decoder available\");\n        const n2 = i2(s2), r2 = new Uint8Array(n2.length);\n        for(let e3 = 0; e3 < n2.length; e3++)r2[e3] = n2.charCodeAt(e3);\n        return r2;\n    }\n    static canonicalPayload(e2) {\n        const t2 = e2.domains && e2.domains.length > 0 ? e2.domains.join(\",\") : \"\";\n        return `v1|${e2.issueDate}|${e2.expiryDate}|${e2.plan}|${t2}`;\n    }\n    static notify(e2) {\n        for (const t2 of this.listeners)try {\n            t2(e2);\n        } catch (e3) {}\n    }\n    static parseKey(e2) {\n        if (\"string\" != typeof e2 || !e2.startsWith($e4b487e979d7c06d$var$i)) return null;\n        const t2 = e2.slice(5);\n        if (!t2) return null;\n        try {\n            const e3 = new TextDecoder().decode(this.base64ToBytes(t2)), s2 = JSON.parse(e3);\n            return s2.issueDate && s2.expiryDate && s2.plan ? {\n                data: {\n                    domains: Array.isArray(s2.domains) ? s2.domains : void 0,\n                    expiryDate: s2.expiryDate,\n                    issueDate: s2.issueDate,\n                    plan: s2.plan,\n                    valid: true\n                },\n                signature: \"string\" == typeof s2.sig && s2.sig ? s2.sig : null\n            } : null;\n        } catch (e3) {\n            return null;\n        }\n    }\n    static publish(e2) {\n        this.validationResult = e2, this.notify(e2);\n    }\n    static validateStructure(e2, t2) {\n        const s2 = (e3)=>({\n                expired: false,\n                message: e3,\n                signatureVerified: false,\n                valid: false\n            });\n        if (\"string\" != typeof e2 || !e2.startsWith($e4b487e979d7c06d$var$i)) return s2('Invalid license key format. License key must start with \"APEX-\".');\n        if (!t2) return s2(\"Invalid license key. Unable to decode license data.\");\n        const { data: r2, signature: a2 } = t2;\n        if (!a2 && /* @__PURE__ */ new Date() >= $e4b487e979d7c06d$var$n) return s2(\"This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.\");\n        if (new Date(r2.expiryDate) < /* @__PURE__ */ new Date()) return {\n            data: r2,\n            expired: true,\n            message: `License expired on ${r2.expiryDate}. Please renew your license.`,\n            signatureVerified: false,\n            valid: false\n        };\n        if (r2.domains && r2.domains.length > 0) {\n            const e3 = \"undefined\" == typeof location ? \"\" : location.hostname;\n            if (!r2.domains.some((t3)=>e3 === t3 || e3.endsWith(`.${t3}`))) return {\n                data: r2,\n                expired: false,\n                message: `License is not valid for this domain (${e3}). Allowed domains: ${r2.domains.join(\", \")}.`,\n                signatureVerified: false,\n                valid: false\n            };\n        }\n        return {\n            data: r2,\n            expired: false,\n            signatureVerified: false,\n            valid: true\n        };\n    }\n    static verifySignature(e2, i2, n2) {\n        return $e4b487e979d7c06d$var$__async(this, null, function*() {\n            var r2;\n            if (this.verifying.has(e2) || this.verdicts.has(e2)) return;\n            this.verifying.add(e2);\n            const a2 = this.epoch, l2 = null == (r2 = globalThis.crypto) ? void 0 : r2.subtle;\n            if (!l2 || 0 === this.publicKeysSpki.length) return this.verifying.delete(e2), void (this.warnedUnverifiable || (this.warnedUnverifiable = true, $e4b487e979d7c06d$var$s(l2 ? \"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.\" : \"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.\")));\n            const o2 = new TextEncoder().encode(this.canonicalPayload(i2.data));\n            let c2 = false;\n            for (const e3 of this.publicKeysSpki){\n                try {\n                    const t2 = yield l2.importKey(\"spki\", this.base64ToBytes(e3), {\n                        name: \"ECDSA\",\n                        namedCurve: \"P-256\"\n                    }, false, [\n                        \"verify\"\n                    ]);\n                    c2 = yield l2.verify({\n                        hash: \"SHA-256\",\n                        name: \"ECDSA\"\n                    }, t2, this.base64ToBytes(i2.signature), o2);\n                } catch (e4) {\n                    c2 = false;\n                }\n                if (c2) break;\n            }\n            if (this.verifying.delete(e2), this.epoch !== a2) return;\n            if (this.verdicts.set(e2, c2), c2) {\n                const t2 = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, n2), {\n                    signatureVerified: true\n                });\n                return void (this.licenseKey === e2 ? this.publish(t2) : this.notify(t2));\n            }\n            const h2 = \"Invalid license key. The license signature does not verify.\", d = {\n                data: i2.data,\n                expired: false,\n                message: h2,\n                signatureVerified: true,\n                valid: false\n            };\n            this.licenseKey === e2 ? this.publish(d) : this.notify(d), $e4b487e979d7c06d$var$t(`[Apex] ${h2}`);\n        });\n    }\n};\n$e4b487e979d7c06d$var$l.publicKeysSpki = [\n    \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA==\"\n], $e4b487e979d7c06d$var$l.verdicts = /* @__PURE__ */ new Map(), $e4b487e979d7c06d$var$l.verifying = /* @__PURE__ */ new Set(), $e4b487e979d7c06d$var$l.warnedUnverifiable = false, $e4b487e979d7c06d$var$l.epoch = 0;\nlet $e4b487e979d7c06d$var$o = $e4b487e979d7c06d$var$l;\nconst $e4b487e979d7c06d$var$c = class {\n    static applyStyles(e2) {\n        Object.assign(e2.style, this.CRITICAL_STYLES, {\n            backgroundImage: this.createWatermarkPattern(),\n            backgroundRepeat: \"repeat\"\n        });\n    }\n    static node(e2) {\n        return e2 ? e2.querySelector(`[${this.WATERMARK_ATTR}]`) : null;\n    }\n    static add(e2, t2) {\n        return e2 && \"undefined\" != typeof document ? (this.setManaged(e2, t2), this.paint(e2)) : null;\n    }\n    static exists(e2) {\n        return !!this.node(e2);\n    }\n    static remove(e2, t2) {\n        e2 && (this.setManaged(e2, t2), this.erase(e2));\n    }\n    static untrack(e2) {\n        this.managed.delete(e2);\n    }\n    static createWatermarkPattern() {\n        const e2 = this.WATERMARK_TEXT;\n        return `url(\"data:image/svg+xml,${encodeURIComponent(`\n      <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"300\" height=\"200\">\n        <text\n          x=\"50%\"\n          y=\"50%\"\n          dominant-baseline=\"middle\"\n          text-anchor=\"middle\"\n          font-family=\"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif\"\n          font-size=\"18\"\n          font-weight=\"600\"\n          fill=\"rgba(134, 134, 134, 0.1)\"\n          transform=\"rotate(-35, 100, 60)\"\n        >${e2}</text>\n      </svg>\n    `.trim())}\")`;\n    }\n    static erase(e2) {\n        var t2;\n        null == (t2 = this.node(e2)) || t2.remove();\n    }\n    static paint(e2) {\n        let t2 = this.node(e2);\n        return t2 || (t2 = document.createElement(\"div\"), t2.setAttribute(this.WATERMARK_ATTR, \"\"), e2.appendChild(t2)), this.applyStyles(t2), \"function\" == typeof getComputedStyle && \"static\" === getComputedStyle(e2).position && (e2.style.position = \"relative\"), t2;\n    }\n    static reconcile() {\n        const e2 = $e4b487e979d7c06d$var$o.isLicenseValid();\n        for (const t2 of this.managed)t2.isConnected ? e2 ? this.erase(t2) : this.paint(t2) : this.managed.delete(t2);\n    }\n    static setManaged(e2, t2) {\n        false !== (null == t2 ? void 0 : t2.manage) ? this.track(e2) : this.managed.delete(e2);\n    }\n    static track(e2) {\n        this.managed.add(e2), this.subscribed || (this.subscribed = true, $e4b487e979d7c06d$var$o.onChange(()=>{\n            this.reconcile();\n        }));\n    }\n};\n$e4b487e979d7c06d$var$c.WATERMARK_ATTR = \"data-apexcharts-watermark\", $e4b487e979d7c06d$var$c.WATERMARK_TEXT = \"APEXCHARTS\", $e4b487e979d7c06d$var$c.ATTR = \"data-apexcharts-watermark\", $e4b487e979d7c06d$var$c.CRITICAL_STYLES = {\n    bottom: \"0\",\n    display: \"block\",\n    left: \"0\",\n    msUserSelect: \"none\",\n    opacity: \"1\",\n    pointerEvents: \"none\",\n    position: \"absolute\",\n    right: \"0\",\n    top: \"0\",\n    userSelect: \"none\",\n    visibility: \"visible\",\n    webkitUserSelect: \"none\",\n    zIndex: \"10000\"\n}, $e4b487e979d7c06d$var$c.managed = /* @__PURE__ */ new Set(), $e4b487e979d7c06d$var$c.subscribed = false;\nlet $e4b487e979d7c06d$var$h = $e4b487e979d7c06d$var$c;\nconst $e4b487e979d7c06d$var$p = 0.05, $e4b487e979d7c06d$var$m = 0.05, $e4b487e979d7c06d$var$g = 1 / 45;\nfunction $e4b487e979d7c06d$var$v(e2, t2, s2, i2) {\n    const n2 = {\n        value: e2,\n        velocity: 0,\n        target: e2,\n        stiffness: t2,\n        damping: s2\n    };\n    return n2;\n}\nfunction $e4b487e979d7c06d$var$b(e2, t2) {\n    if (t2 <= 0) return $e4b487e979d7c06d$var$M(e2);\n    let s2 = t2;\n    for(; s2 > 0;){\n        const t3 = Math.min(s2, $e4b487e979d7c06d$var$g), i2 = -e2.stiffness * (e2.value - e2.target) - e2.damping * e2.velocity;\n        e2.velocity += i2 * t3, e2.value += e2.velocity * t3, s2 -= t3;\n    }\n    return !!$e4b487e979d7c06d$var$M(e2) && (e2.value = e2.target, e2.velocity = 0, true);\n}\nfunction $e4b487e979d7c06d$var$w(e2, t2) {\n    e2.target = t2;\n}\nfunction $e4b487e979d7c06d$var$M(e2) {\n    var _a, _b;\n    const t2 = (_a = e2.restVelocity) != null ? _a : $e4b487e979d7c06d$var$p, s2 = (_b = e2.restDisplacement) != null ? _b : $e4b487e979d7c06d$var$m;\n    return Math.abs(e2.velocity) < t2 && Math.abs(e2.value - e2.target) < s2;\n}\nconst $e4b487e979d7c06d$var$S = {\n    crisp: [\n        210,\n        26\n    ],\n    gentle: [\n        120,\n        20\n    ],\n    snappy: [\n        320,\n        30\n    ]\n};\nfunction $e4b487e979d7c06d$var$L(e2) {\n    var _a;\n    return (_a = $e4b487e979d7c06d$var$S[e2 != null ? e2 : \"crisp\"]) != null ? _a : $e4b487e979d7c06d$var$S.crisp;\n}\nconst $e4b487e979d7c06d$var$X = \"__apexcharts_crossfilters__\";\nfunction $e4b487e979d7c06d$var$Y(e2) {\n    if (!Number.isFinite(e2)) return e2;\n    const t2 = Number(e2.toPrecision(12));\n    return Object.is(t2, -0) ? 0 : t2;\n}\nfunction $e4b487e979d7c06d$var$Z(e2) {\n    return \"number\" == typeof e2 && Number.isFinite(e2);\n}\nfunction $e4b487e979d7c06d$var$J(e2) {\n    if (\"function\" == typeof e2) return e2;\n    if (e2 && \"object\" == typeof e2) {\n        if (\"string\" == typeof e2.sum) {\n            const t2 = e2.sum;\n            return (e3)=>e3.reduce((e4, s2)=>e4 + (Number(s2[t2]) || 0), 0);\n        }\n        if (\"string\" == typeof e2.avg) {\n            const t2 = e2.avg;\n            return (e3)=>e3.length ? e3.reduce((e4, s2)=>e4 + (Number(s2[t2]) || 0), 0) / e3.length : 0;\n        }\n        if (\"string\" == typeof e2.min) {\n            const t2 = e2.min;\n            return (e3)=>e3.length ? Math.min(...e3.map((e4)=>Number(e4[t2]) || 0)) : 0;\n        }\n        if (\"string\" == typeof e2.max) {\n            const t2 = e2.max;\n            return (e3)=>e3.length ? Math.max(...e3.map((e4)=>Number(e4[t2]) || 0)) : 0;\n        }\n    }\n    return (e3)=>e3.length;\n}\nfunction $e4b487e979d7c06d$var$G(e2, t2) {\n    return \"function\" == typeof t2 ? e2.slice().sort(t2) : \"asc\" === t2 ? e2.slice().sort((e3, t3)=>e3 > t3 ? 1 : e3 < t3 ? -1 : 0) : \"desc\" === t2 ? e2.slice().sort((e3, t3)=>e3 < t3 ? 1 : e3 > t3 ? -1 : 0) : e2;\n}\nfunction $e4b487e979d7c06d$var$ee(e2, t2) {\n    if (!$e4b487e979d7c06d$var$Z(e2)) return -1;\n    const s2 = t2.length - 1;\n    if (e2 < t2[0] || e2 > t2[s2]) return -1;\n    if (e2 === t2[s2]) return s2 - 1;\n    for(let i2 = 0; i2 < s2; i2++)if (e2 >= t2[i2] && e2 < t2[i2 + 1]) return i2;\n    return -1;\n}\nfunction $e4b487e979d7c06d$var$te(e2) {\n    const t2 = [];\n    for(let s2 = 0; s2 < e2.length - 1; s2++)t2.push($e4b487e979d7c06d$var$Y((e2[s2] + e2[s2 + 1]) / 2));\n    return t2;\n}\nclass $e4b487e979d7c06d$var$se {\n    constructor(e2, t2){\n        this.dims = /* @__PURE__ */ new Map(), this.listeners = /* @__PURE__ */ new Map(), this.id = e2, this.records = Array.isArray(t2) ? t2 : [];\n    }\n    static store() {\n        const e2 = globalThis;\n        return e2[$e4b487e979d7c06d$var$X] || (e2[$e4b487e979d7c06d$var$X] = /* @__PURE__ */ new Map()), e2[$e4b487e979d7c06d$var$X];\n    }\n    static getOrCreate(e2) {\n        if (!e2 || \"string\" != typeof e2.id) throw new Error(\"Crossfilter.getOrCreate requires an { id } string.\");\n        const t2 = $e4b487e979d7c06d$var$se.store(), s2 = t2.get(e2.id);\n        if (s2) return e2.records && s2.setRecords(e2.records), s2;\n        const i2 = new $e4b487e979d7c06d$var$se(e2.id, e2.records);\n        return t2.set(e2.id, i2), i2;\n    }\n    static get(e2) {\n        return $e4b487e979d7c06d$var$se.store().get(e2) || null;\n    }\n    setRecords(e2) {\n        return this.records = Array.isArray(e2) ? e2 : [], this.dims.forEach((e3)=>this.recomputeDomain(e3)), this.emit(\"records\", this.state()), this.emit(\"change\", this.state()), this;\n    }\n    registerDimension(e2, t2) {\n        if (!t2 || \"function\" != typeof t2.dimension) throw new Error(`crossfilter.registerDimension(\"${e2}\") needs a dimension function.`);\n        const s2 = t2.type || (t2.bins ? \"range\" : \"category\"), i2 = {\n            accessor: t2.dimension,\n            reducer: $e4b487e979d7c06d$var$J(t2.reduce),\n            type: s2,\n            bins: t2.bins,\n            order: t2.order,\n            filter: null,\n            labels: [],\n            edges: null,\n            xLabels: [],\n            yLabels: []\n        };\n        return this.dims.set(e2, i2), this.recomputeDomain(i2), null != t2.filter && this.setFilterOn(i2, t2.filter), this;\n    }\n    hasDimension(e2) {\n        return this.dims.has(e2);\n    }\n    removeDimension(e2) {\n        const t2 = this.dims.get(e2), s2 = !!t2 && this.hasFilter(t2);\n        return this.dims.delete(e2), s2 && this.emit(\"change\", this.state()), this;\n    }\n    recomputeDomain(e2) {\n        if (\"matrix\" === e2.type) {\n            const t2 = function(e3, t3, s2) {\n                const i2 = /* @__PURE__ */ new Set(), n2 = /* @__PURE__ */ new Set(), r2 = [], a2 = [];\n                for(let s3 = 0; s3 < e3.length; s3++){\n                    const l2 = t3(e3[s3]);\n                    if (!l2) continue;\n                    const o2 = l2[0], c2 = l2[1];\n                    null == o2 || i2.has(o2) || (i2.add(o2), r2.push(o2)), null == c2 || n2.has(c2) || (n2.add(c2), a2.push(c2));\n                }\n                return {\n                    xLabels: $e4b487e979d7c06d$var$G(r2, s2),\n                    yLabels: $e4b487e979d7c06d$var$G(a2, s2)\n                };\n            }(this.records, e2.accessor, e2.order);\n            return e2.xLabels = t2.xLabels, e2.yLabels = t2.yLabels, void (e2.edges = null);\n        }\n        if (\"range\" === e2.type) return e2.edges = function(e3, t2, s2) {\n            if (s2 && Array.isArray(s2.thresholds) && s2.thresholds.length >= 2) {\n                const e4 = Array.from(new Set(s2.thresholds.filter($e4b487e979d7c06d$var$Z))).sort((e5, t3)=>e5 - t3);\n                return e4.length >= 2 ? e4.map($e4b487e979d7c06d$var$Y) : [\n                    0,\n                    1\n                ];\n            }\n            let i2 = 1 / 0, n2 = -1 / 0;\n            for(let s3 = 0; s3 < e3.length; s3++){\n                const r3 = t2(e3[s3]);\n                $e4b487e979d7c06d$var$Z(r3) && (r3 < i2 && (i2 = r3), r3 > n2 && (n2 = r3));\n            }\n            if (i2 === 1 / 0) return [\n                0,\n                1\n            ];\n            if (i2 === n2) {\n                const e4 = Math.abs(i2) > 0 ? Math.abs(i2) : 1;\n                return [\n                    $e4b487e979d7c06d$var$Y(i2),\n                    $e4b487e979d7c06d$var$Y(i2 + e4)\n                ];\n            }\n            if (s2 && $e4b487e979d7c06d$var$Z(s2.width) && s2.width > 0) {\n                const e4 = s2.width, t3 = Math.floor(i2 / e4) * e4;\n                let r3 = Math.ceil(n2 / e4) * e4;\n                r3 <= t3 && (r3 = t3 + e4);\n                const a3 = Math.max(1, Math.round((r3 - t3) / e4)), l3 = new Array(a3 + 1);\n                for(let s3 = 0; s3 <= a3; s3++)l3[s3] = $e4b487e979d7c06d$var$Y(t3 + s3 * e4);\n                return l3;\n            }\n            const r2 = s2 && $e4b487e979d7c06d$var$Z(s2.count) && s2.count >= 1 ? Math.floor(s2.count) : 30, a2 = (n2 - i2) / r2, l2 = new Array(r2 + 1);\n            for(let e4 = 0; e4 <= r2; e4++)l2[e4] = $e4b487e979d7c06d$var$Y(i2 + e4 * a2);\n            return l2[r2] = $e4b487e979d7c06d$var$Y(n2), l2;\n        }(this.records, e2.accessor, e2.bins), void (e2.labels = $e4b487e979d7c06d$var$te(e2.edges));\n        if (e2.labels = function(e3, t2, s2) {\n            const i2 = /* @__PURE__ */ new Set(), n2 = [];\n            for(let s3 = 0; s3 < e3.length; s3++){\n                const r2 = t2(e3[s3]);\n                null != r2 && (i2.has(r2) || (i2.add(r2), n2.push(r2)));\n            }\n            return $e4b487e979d7c06d$var$G(n2, s2);\n        }(this.records, e2.accessor, e2.order), e2.edges = null, e2.filter instanceof Set) {\n            const t2 = new Set(e2.labels);\n            Array.from(e2.filter).forEach((s2)=>{\n                t2.has(s2) || e2.filter.delete(s2);\n            });\n        }\n    }\n    filter(e2, t2) {\n        const s2 = this.dims.get(e2);\n        return s2 ? (this.setFilterOn(s2, t2), this.emit(\"change\", this.state()), this) : this;\n    }\n    toggleKey(e2, t2) {\n        const s2 = this.dims.get(e2);\n        if (!s2 || \"category\" !== s2.type) return this;\n        s2.filter instanceof Set || (s2.filter = /* @__PURE__ */ new Set());\n        const i2 = s2.filter;\n        return i2.has(t2) ? i2.delete(t2) : i2.add(t2), 0 === i2.size && (s2.filter = null), this.emit(\"change\", this.state()), this;\n    }\n    setFilterOn(e2, t2) {\n        if (null == t2) return void (e2.filter = null);\n        if (\"range\" === e2.type) {\n            if (Array.isArray(t2) && 2 === t2.length && t2.every($e4b487e979d7c06d$var$Z)) {\n                const [s3, i2] = t2;\n                e2.filter = [\n                    Math.min(s3, i2),\n                    Math.max(s3, i2)\n                ];\n            } else e2.filter = null;\n            return;\n        }\n        const s2 = new Set(t2);\n        e2.filter = s2.size ? s2 : null;\n    }\n    clear(e2) {\n        const t2 = this.dims.get(e2);\n        return t2 && (t2.filter = null), this.emit(\"change\", this.state()), this;\n    }\n    reset() {\n        return this.dims.forEach((e2)=>{\n            e2.filter = null;\n        }), this.emit(\"change\", this.state()), this;\n    }\n    hasFilter(e2) {\n        return null != e2.filter && (!(e2.filter instanceof Set) || e2.filter.size > 0);\n    }\n    passes(e2, t2) {\n        if (!this.hasFilter(e2)) return true;\n        const s2 = e2.accessor(t2);\n        if (e2.filter instanceof Set) return e2.filter.has(s2);\n        if (!$e4b487e979d7c06d$var$Z(s2)) return false;\n        const [i2, n2] = e2.filter;\n        return s2 >= i2 && s2 <= n2;\n    }\n    filteredRecords(e2) {\n        const t2 = [];\n        return this.dims.forEach((s2, i2)=>{\n            i2 !== e2 && this.hasFilter(s2) && t2.push(s2);\n        }), 0 === t2.length ? this.records : this.records.filter((e3)=>t2.every((t3)=>this.passes(t3, e3)));\n    }\n    filteredRows() {\n        return this.filteredRecords(null);\n    }\n    aggregateFor(e2) {\n        const t2 = this.dims.get(e2);\n        if (!t2) return {\n            type: \"category\",\n            labels: [],\n            values: [],\n            keys: []\n        };\n        const s2 = this.filteredRecords(e2);\n        if (\"matrix\" === t2.type) {\n            const e3 = new Map(t2.xLabels.map((e4, t3)=>[\n                    e4,\n                    t3\n                ])), i3 = new Map(t2.yLabels.map((e4, t3)=>[\n                    e4,\n                    t3\n                ])), n2 = t2.yLabels.map(()=>t2.xLabels.map(()=>[]));\n            for(let r2 = 0; r2 < s2.length; r2++){\n                const a2 = t2.accessor(s2[r2]);\n                if (!a2) continue;\n                const l2 = e3.get(a2[0]), o2 = i3.get(a2[1]);\n                null != l2 && null != o2 && n2[o2][l2].push(s2[r2]);\n            }\n            return {\n                type: \"matrix\",\n                xLabels: t2.xLabels.slice(),\n                yLabels: t2.yLabels.slice(),\n                matrix: n2.map((e4)=>e4.map((e5)=>t2.reducer(e5)))\n            };\n        }\n        if (\"range\" === t2.type) {\n            const e3 = t2.edges || [\n                0,\n                1\n            ], i3 = e3.length - 1, n2 = Array.from({\n                length: i3\n            }, ()=>[]);\n            for(let i4 = 0; i4 < s2.length; i4++){\n                const r2 = $e4b487e979d7c06d$var$ee(t2.accessor(s2[i4]), e3);\n                r2 >= 0 && n2[r2].push(s2[i4]);\n            }\n            return {\n                type: \"range\",\n                labels: $e4b487e979d7c06d$var$te(e3),\n                values: n2.map((e4)=>t2.reducer(e4)),\n                keys: n2.map((t3, s3)=>[\n                        e3[s3],\n                        e3[s3 + 1]\n                    ]),\n                edges: e3\n            };\n        }\n        const i2 = /* @__PURE__ */ new Map();\n        t2.labels.forEach((e3)=>i2.set(e3, []));\n        for(let e3 = 0; e3 < s2.length; e3++){\n            const n2 = i2.get(t2.accessor(s2[e3]));\n            n2 && n2.push(s2[e3]);\n        }\n        return {\n            type: \"category\",\n            labels: t2.labels.slice(),\n            values: t2.labels.map((e3)=>t2.reducer(i2.get(e3) || [])),\n            keys: t2.labels.slice()\n        };\n    }\n    aggregateAll() {\n        const e2 = {};\n        return this.dims.forEach((t2, s2)=>{\n            e2[s2] = this.aggregateFor(s2);\n        }), e2;\n    }\n    state() {\n        const e2 = {};\n        return this.dims.forEach((t2, s2)=>{\n            this.hasFilter(t2) && (e2[s2] = t2.filter instanceof Set ? Array.from(t2.filter) : t2.filter.slice());\n        }), {\n            filters: e2,\n            filteredCount: this.filteredRows().length,\n            total: this.records.length\n        };\n    }\n    filterOf(e2) {\n        const t2 = this.dims.get(e2);\n        return t2 && this.hasFilter(t2) ? t2.filter instanceof Set ? new Set(t2.filter) : t2.filter.slice() : null;\n    }\n    on(e2, t2) {\n        let s2 = this.listeners.get(e2);\n        return s2 || (s2 = /* @__PURE__ */ new Set(), this.listeners.set(e2, s2)), s2.add(t2), ()=>this.off(e2, t2);\n    }\n    off(e2, t2) {\n        var s2;\n        return null == (s2 = this.listeners.get(e2)) || s2.delete(t2), this;\n    }\n    emit(e2, t2) {\n        var s2;\n        null == (s2 = this.listeners.get(e2)) || s2.forEach((e3)=>{\n            try {\n                e3(t2);\n            } catch (e4) {}\n        });\n    }\n    static esc(e2) {\n        return String(null == e2 ? \"\" : e2).replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\"/g, \"&quot;\");\n    }\n    resolveColumns(e2) {\n        if (Array.isArray(e2) && e2.length) return e2.map((e3)=>\"string\" == typeof e3 ? {\n                field: e3,\n                label: e3\n            } : {\n                field: e3.field,\n                label: e3.label || e3.field,\n                format: e3.format\n            });\n        const t2 = this.records[0];\n        return (t2 ? Object.keys(t2) : []).map((e3)=>({\n                field: e3,\n                label: e3\n            }));\n    }\n    tableHTML(e2, t2, s2) {\n        const i2 = \"<thead><tr>\" + e2.map((e3)=>`<th>${$e4b487e979d7c06d$var$se.esc(e3.label)}</th>`).join(\"\") + \"</tr></thead>\", n2 = \"<tbody>\" + t2.map((t3)=>\"<tr>\" + e2.map((e3)=>{\n                const s3 = t3[e3.field], i3 = e3.format ? e3.format(s3, t3) : s3;\n                return `<td>${$e4b487e979d7c06d$var$se.esc(i3)}</td>`;\n            }).join(\"\") + \"</tr>\").join(\"\") + \"</tbody>\";\n        return `<table class=\"apexcharts-cf-table\">${`<caption>${t2.length} of ${s2} rows</caption>`}${i2}${n2}</table>`;\n    }\n    dataTable(e2, t2) {\n        if (!e2) return {\n            refresh () {},\n            destroy () {}\n        };\n        const s2 = t2 || {}, i2 = this.resolveColumns(s2.columns), n2 = s2.pageSize || 0, r2 = s2.page || 0, a2 = ()=>{\n            const t3 = this.filteredRows(), s3 = n2 ? t3.slice(r2 * n2, r2 * n2 + n2) : t3;\n            e2.innerHTML = this.tableHTML(i2, s3, t3.length);\n        };\n        a2();\n        const l2 = this.on(\"change\", a2);\n        return {\n            refresh: a2,\n            destroy: ()=>{\n                l2(), e2.innerHTML = \"\";\n            }\n        };\n    }\n    destroy() {\n        $e4b487e979d7c06d$var$se.store().delete(this.id), this.dims.clear(), this.listeners.clear(), this.records = [];\n    }\n}\nconst $e4b487e979d7c06d$var$PRICING_URL = \"https://apexcharts.com/pricing\";\nlet $e4b487e979d7c06d$var$_perspectivesTokenDecoded = false;\nconst $e4b487e979d7c06d$var$enforced = /* @__PURE__ */ new Set();\nfunction $e4b487e979d7c06d$var$untrackChart(ctx) {\n    $e4b487e979d7c06d$var$enforced.delete(ctx);\n}\nfunction $e4b487e979d7c06d$var$markPerspectivesTokenDecoded() {\n    $e4b487e979d7c06d$var$_perspectivesTokenDecoded = true;\n    $e4b487e979d7c06d$var$reevaluateLicenseAcrossCharts();\n}\nfunction $e4b487e979d7c06d$var$premiumFeaturesInUse(w2, ctx) {\n    const chart = w2 && w2.config && w2.config.chart || {};\n    const used = [];\n    if (chart.type === \"unit\") used.push(\"unit\");\n    if (ctx.storyboard && ctx.storyboard._used) used.push(\"storyboard\");\n    const link = chart.link;\n    if (ctx.linkedViews && link && (link.enabled === true || typeof link.dimension === \"function\")) used.push(\"link\");\n    if (ctx.ink && chart.ink && chart.ink.enabled === true) used.push(\"ink\");\n    if (ctx.measure && chart.measure && chart.measure.enabled === true) used.push(\"measure\");\n    if (ctx.contextMenu && chart.contextMenu && chart.contextMenu.enabled === true) used.push(\"context-menu\");\n    if (ctx.perspectives && (ctx.perspectives._used || $e4b487e979d7c06d$var$_perspectivesTokenDecoded)) used.push(\"perspectives\");\n    if (ctx.history && chart.history && chart.history.enabled === true) used.push(\"history\");\n    return used;\n}\nfunction $e4b487e979d7c06d$var$resolveKey(w2) {\n    const perChart = w2 && w2.config && w2.config.chart && w2.config.chart.license;\n    if (perChart) return perChart;\n    const singleton = $e4b487e979d7c06d$var$o.getKey();\n    if (singleton) return singleton;\n    const apex = $e4b487e979d7c06d$var$Environment.getApex();\n    if (apex && apex.license) return apex.license;\n    return null;\n}\nconst $e4b487e979d7c06d$var$PREMIUM_PLANS = /* @__PURE__ */ new Set([\n    \"premium\",\n    \"enterprise\"\n]);\nfunction $e4b487e979d7c06d$var$licensedForPremium(key) {\n    if (!key) return false;\n    const result = $e4b487e979d7c06d$var$o.validateKey(key);\n    if (!result.valid) return false;\n    const plan = result.data && result.data.plan;\n    return typeof plan === \"string\" && $e4b487e979d7c06d$var$PREMIUM_PLANS.has(plan.toLowerCase());\n}\nfunction $e4b487e979d7c06d$var$reinstateWatermark(ctx, elWrap) {\n    const node = $e4b487e979d7c06d$var$h.add(elWrap, {\n        manage: false\n    });\n    if (!node || typeof MutationObserver === \"undefined\") return;\n    if (ctx._wmNodeObserver && ctx._wmObservedNode === node) return;\n    if (ctx._wmNodeObserver) ctx._wmNodeObserver.disconnect();\n    const nodeObs = new MutationObserver(()=>{\n        const n2 = $e4b487e979d7c06d$var$h.node(elWrap);\n        if (!n2) return;\n        nodeObs.disconnect();\n        $e4b487e979d7c06d$var$h.applyStyles(n2);\n        nodeObs.takeRecords();\n        nodeObs.observe(n2, {\n            attributes: true,\n            attributeFilter: [\n                \"style\"\n            ]\n        });\n    });\n    nodeObs.observe(node, {\n        attributes: true,\n        attributeFilter: [\n            \"style\"\n        ]\n    });\n    ctx._wmNodeObserver = nodeObs;\n    ctx._wmObservedNode = node;\n}\nfunction $e4b487e979d7c06d$var$addWatermark(ctx, elWrap) {\n    $e4b487e979d7c06d$var$reinstateWatermark(ctx, elWrap);\n    if (typeof MutationObserver === \"undefined\" || ctx._wmWrapObserver) return;\n    const wrapObs = new MutationObserver(()=>{\n        if (!$e4b487e979d7c06d$var$h.node(elWrap)) $e4b487e979d7c06d$var$reinstateWatermark(ctx, elWrap);\n    });\n    wrapObs.observe(elWrap, {\n        childList: true\n    });\n    ctx._wmWrapObserver = wrapObs;\n}\nfunction $e4b487e979d7c06d$var$teardownWatermark(ctx, elWrap) {\n    if (ctx._wmWrapObserver) {\n        ctx._wmWrapObserver.disconnect();\n        ctx._wmWrapObserver = null;\n    }\n    if (ctx._wmNodeObserver) {\n        ctx._wmNodeObserver.disconnect();\n        ctx._wmNodeObserver = null;\n    }\n    ctx._wmObservedNode = null;\n    const wrap = elWrap || ctx.w && ctx.w.dom && ctx.w.dom.elWrap;\n    if (wrap) $e4b487e979d7c06d$var$h.remove(wrap, {\n        manage: false\n    });\n}\nfunction $e4b487e979d7c06d$var$notifyTrial(ctx, key, features) {\n    if (ctx._premiumLicenseNotified) return;\n    ctx._premiumLicenseNotified = true;\n    const many = features.length > 1;\n    if (!key) {\n        console.warn(`[ApexCharts] Premium feature${many ? \"s\" : \"\"} in use (${features.join(\", \")}) without a license. Running in trial mode with a watermark. Get a license: ${$e4b487e979d7c06d$var$PRICING_URL}`);\n        return;\n    }\n    const result = $e4b487e979d7c06d$var$o.validateKey(key);\n    if (result.valid) {\n        const plan = result.data && result.data.plan || \"current\";\n        console.warn(`[ApexCharts] Premium feature${many ? \"s\" : \"\"} in use (${features.join(\", \")}) require a Premium or Enterprise license; the ${plan} plan does not include ${many ? \"them\" : \"it\"}. Running in trial mode with a watermark. Upgrade: ${$e4b487e979d7c06d$var$PRICING_URL}`);\n        return;\n    }\n    if (key !== $e4b487e979d7c06d$var$o.getKey()) console.error(`[Apex] ${result.message}`);\n}\nfunction $e4b487e979d7c06d$var$enforceLicense(w2, ctx) {\n    try {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        if (w2 && w2.globals && w2.globals.isDestroyed) {\n            $e4b487e979d7c06d$var$enforced.delete(ctx);\n            return;\n        }\n        const elWrap = w2 && w2.dom && w2.dom.elWrap;\n        if (!elWrap) return;\n        const features = $e4b487e979d7c06d$var$premiumFeaturesInUse(w2, ctx);\n        if (features.length === 0) {\n            $e4b487e979d7c06d$var$enforced.delete(ctx);\n            $e4b487e979d7c06d$var$teardownWatermark(ctx, elWrap);\n            return;\n        }\n        $e4b487e979d7c06d$var$enforced.add(ctx);\n        const key = $e4b487e979d7c06d$var$resolveKey(w2);\n        if ($e4b487e979d7c06d$var$licensedForPremium(key)) {\n            $e4b487e979d7c06d$var$teardownWatermark(ctx, elWrap);\n            return;\n        }\n        $e4b487e979d7c06d$var$addWatermark(ctx, elWrap);\n        $e4b487e979d7c06d$var$notifyTrial(ctx, key, features);\n    } catch (e2) {}\n}\nfunction $e4b487e979d7c06d$var$reevaluateLicenseAcrossCharts() {\n    if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n    const visited = /* @__PURE__ */ new Set();\n    const apex = $e4b487e979d7c06d$var$Environment.getApex();\n    const instances = apex && apex._chartInstances;\n    if (Array.isArray(instances)) instances.forEach((entry)=>{\n        const chart = entry && entry.chart;\n        if (chart && chart.w && !chart.w.globals.isDestroyed) {\n            visited.add(chart);\n            $e4b487e979d7c06d$var$enforceLicense(chart.w, chart);\n        }\n    });\n    Array.from($e4b487e979d7c06d$var$enforced).forEach((ctx)=>{\n        const w2 = ctx && ctx.w;\n        const elWrap = w2 && w2.dom && w2.dom.elWrap;\n        if (!w2 || w2.globals.isDestroyed || !elWrap || elWrap.isConnected === false) {\n            $e4b487e979d7c06d$var$enforced.delete(ctx);\n            return;\n        }\n        if (visited.has(ctx)) return;\n        $e4b487e979d7c06d$var$enforceLicense(w2, ctx);\n    });\n}\n$e4b487e979d7c06d$var$o.onChange($e4b487e979d7c06d$var$reevaluateLicenseAcrossCharts);\nconst $e4b487e979d7c06d$var$_ApexCharts = class _ApexCharts {\n    /**\n   * Creates a new ApexCharts instance.\n   *\n   * @param {HTMLElement} el - The DOM element to render the chart into.\n   * @param {ApexOptions} opts - Chart configuration options.\n   */ constructor(el, opts){\n        // Module properties set dynamically by InitCtxVariables.initModules().\n        // Declared as typed class fields so @ts-check resolves them throughout the\n        // class body without errors. Each field typed as `any` since the modules are\n        // plain objects whose specific shapes are not yet typed.\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"core\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"responsive\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"axes\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"grid\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"graphics\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"coreUtils\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"crosshairs\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"events\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"fill\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"localization\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"options\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"series\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"theme\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"formatters\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"titleSubtitle\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"dimensions\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"updateHelpers\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"tooltip\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"data\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"animations\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"exports\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"legend\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"toolbar\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"zoomPanSelection\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"keyboardNavigation\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"annotations\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"morphTypeChange\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"timeScale\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"_keyboardNavigation\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"_zoomPanSelection\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"windowResizeHandler\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"parentResizeHandler\");\n        /** @type {string[]} */ $e4b487e979d7c06d$var$__publicField(this, \"publicMethods\", []);\n        /** @type {string[]} */ $e4b487e979d7c06d$var$__publicField(this, \"eventList\", []);\n        /** @type {Promise<any> | null} */ $e4b487e979d7c06d$var$__publicField(this, \"_renderPromise\", null);\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"config\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"perspectives\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"storyboard\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"history\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"linkedViews\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"ink\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"measure\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"contextMenu\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"weave\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"renderer\");\n        /** @type {any} */ $e4b487e979d7c06d$var$__publicField(this, \"rendererController\");\n        this.opts = opts;\n        this.ctx = this;\n        this.w = new $e4b487e979d7c06d$var$Base(opts).init();\n        this.el = el;\n        this.w.globals.cuid = $e4b487e979d7c06d$var$Utils$1.randomId();\n        this.w.globals.chartID = this.w.config.chart.id ? $e4b487e979d7c06d$var$Utils$1.escapeString(this.w.config.chart.id) : this.w.globals.cuid;\n        $e4b487e979d7c06d$var$applyAnimationPolicy(this.w);\n        const initCtx = new $e4b487e979d7c06d$var$InitCtxVariables(this);\n        initCtx.initModules();\n        this.lastUpdateOptions = null;\n        this._updateStats = {\n            fast: 0,\n            fastWithAxes: 0,\n            full: 0\n        };\n        this.create = this.create.bind(this);\n        if ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n            this.windowResizeHandler = this._windowResizeHandler.bind(this);\n            this.parentResizeHandler = this._parentResizeCallback.bind(this);\n        }\n    }\n    /**\n   * Renders the chart. Must be called once after construction.\n   *\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance after mount.\n   */ render() {\n        var _a, _b;\n        if (!((_b = (_a = this.w) == null ? void 0 : _a.config) == null ? void 0 : _b.chart)) return Promise.reject(new Error(\"ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property.\"));\n        if (this._renderPromise) return this._renderPromise;\n        const renderPromise = new Promise((resolve, reject)=>{\n            var _a2;\n            if ($e4b487e979d7c06d$var$Utils$1.elementExists(this.el)) {\n                if (typeof Apex._chartInstances === \"undefined\") Apex._chartInstances = [];\n                if (this.w.config.chart.id) Apex._chartInstances.push({\n                    id: this.w.globals.chartID,\n                    group: this.w.config.chart.group,\n                    chart: this\n                });\n                this.setLocale(this.w.config.chart.defaultLocale);\n                const beforeMount = this.w.config.chart.events.beforeMount;\n                if (typeof beforeMount === \"function\") beforeMount(this, this.w);\n                this.events.fireEvent(\"beforeMount\", [\n                    this,\n                    this.w\n                ]);\n                if ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n                    window.addEventListener(\"resize\", this.windowResizeHandler);\n                    $e4b487e979d7c06d$var$addResizeListener(/** @type {HTMLElement} */ this.el.parentNode, this.parentResizeHandler);\n                    const rootNode = /** @type {any} */ this.el.getRootNode && this.el.getRootNode();\n                    const inShadowRoot = $e4b487e979d7c06d$var$Utils$1.is(\"ShadowRoot\", rootNode);\n                    const doc = this.el.ownerDocument;\n                    let css = inShadowRoot ? rootNode.getElementById(\"apexcharts-css\") : doc.getElementById(\"apexcharts-css\");\n                    if (!css) {\n                        css = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"style\");\n                        css.id = \"apexcharts-css\";\n                        css.textContent = $e4b487e979d7c06d$var$apexCSS;\n                        const nonce = ((_a2 = this.opts.chart) == null ? void 0 : _a2.nonce) || this.w.config.chart.nonce;\n                        if (nonce) css.setAttribute(\"nonce\", nonce);\n                        if (inShadowRoot) rootNode.prepend(css);\n                        else if (this.w.config.chart.injectStyleSheet !== false) doc.head.appendChild(css);\n                    }\n                }\n                const graphData = this.create(this.w.config.series, {});\n                if (!graphData) return resolve(this);\n                this.mount(graphData).then(()=>{\n                    if (typeof this.w.config.chart.events.mounted === \"function\") this.w.config.chart.events.mounted(this, this.w);\n                    this.events.fireEvent(\"mounted\", [\n                        this,\n                        this.w\n                    ]);\n                    resolve(graphData);\n                }).catch((e2)=>{\n                    var _a3, _b2;\n                    const enriched = e2 instanceof Error ? e2 : new Error(String(e2));\n                    const err = /** @type {any} */ enriched;\n                    err.chartId = (_b2 = (_a3 = this.w) == null ? void 0 : _a3.globals) == null ? void 0 : _b2.chartID;\n                    err.el = this.el;\n                    reject(enriched);\n                });\n            } else reject(new Error(\"Element not found\"));\n        });\n        this._renderPromise = renderPromise;\n        renderPromise.catch(()=>{\n            if (this._renderPromise === renderPromise) this._renderPromise = null;\n        });\n        return renderPromise;\n    }\n    /**\n   * @param {any[]} ser\n   * @param {object} opts\n   */ create(ser, opts) {\n        var _a, _b, _c, _d, _e, _f;\n        const w2 = this.w;\n        if (!this.core) {\n            const initCtx = new $e4b487e979d7c06d$var$InitCtxVariables(this);\n            initCtx.initModules();\n        }\n        const gl = this.w.globals;\n        gl.noData = false;\n        gl.animationEnded = false;\n        if (!$e4b487e979d7c06d$var$Utils$1.elementExists(this.el)) {\n            gl.animationEnded = true;\n            return null;\n        }\n        this.responsive.checkResponsiveConfig(opts);\n        $e4b487e979d7c06d$var$applyAnimationPolicy(w2);\n        if (w2.config.xaxis.convertedCatToNumeric) {\n            const defaults = new $e4b487e979d7c06d$var$Defaults(w2.config);\n            defaults.convertCatToNumericXaxis(w2.config, this.ctx);\n        }\n        this.core.setupElements();\n        if (w2.config.chart.type === \"treemap\") {\n            w2.config.grid.show = false;\n            w2.config.yaxis[0].show = false;\n        }\n        if (gl.svgWidth === 0) {\n            gl.animationEnded = true;\n            return null;\n        }\n        let series = ser;\n        ser.forEach((s2, realIndex)=>{\n            if (s2.hidden) series = this.legend.legendHelpers.getSeriesAfterCollapsing({\n                realIndex: realIndex\n            });\n        });\n        const combo = $e4b487e979d7c06d$var$CoreUtils.checkComboSeries(series, w2.config.chart.type);\n        gl.comboCharts = combo.comboCharts;\n        gl.comboBarCount = combo.comboBarCount;\n        const allSeriesAreEmpty = series.every((s2)=>s2.data && s2.data.length === 0);\n        if (series.length === 0 || allSeriesAreEmpty && gl.collapsedSeries.length < 1) this.series.handleNoData();\n        if ($e4b487e979d7c06d$var$Environment.isBrowser()) this.events.setupEventHandlers();\n        const parsedState = this.data.parseData(series);\n        this._writeParsedSeriesData(parsedState.seriesData);\n        this._writeParsedRangeData(parsedState.rangeData);\n        this._writeParsedCandleData(parsedState.candleData);\n        this._writeParsedLabelData(parsedState.labelData);\n        this._writeParsedAxisFlags(parsedState.axisFlags);\n        (_a = this.rendererController) == null || _a.resolve();\n        (_b = this.weave) == null || _b.dispatch(\"afterParse\");\n        this.theme.init();\n        const markers = new $e4b487e979d7c06d$var$Markers(this.w, this);\n        markers.setGlobalMarkerSize();\n        this.formatters.setLabelFormatters();\n        this.titleSubtitle.draw();\n        if (!gl.noData || gl.collapsedSeries.length === w2.seriesData.series.length || w2.config.legend.showForSingleSeries) (_c = this.legend) == null || _c.init();\n        this.series.hasAllSeriesEqualX();\n        if (gl.axisCharts) {\n            this.core.coreCalculations();\n            if (w2.config.xaxis.type !== \"category\") this.formatters.setLabelFormatters();\n            if (this.ctx.toolbar) {\n                this.ctx.toolbar.minX = w2.globals.minX;\n                this.ctx.toolbar.maxX = w2.globals.maxX;\n            }\n        }\n        this.formatters.heatmapLabelFormatters();\n        const coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n        coreUtils.getLargestMarkerSize();\n        const layoutState = this.dimensions.plotCoords();\n        this._writeLayoutCoords(layoutState.layout);\n        const xyRatios = this.core.xySettings();\n        (_d = this.weave) == null || _d.dispatch(\"afterScales\", {\n            xyRatios: xyRatios\n        });\n        this.grid.createGridMask();\n        const elGraph = this.core.plotChartType(series, xyRatios);\n        const dataLabels = new $e4b487e979d7c06d$var$DataLabels(this.w, this);\n        dataLabels.bringForward();\n        if (w2.config.dataLabels.background.enabled) dataLabels.dataLabelsBackground();\n        this.core.shiftGraphPosition();\n        (_f = (_e = this.legend) == null ? void 0 : _e.heatmapGradientLegend) == null || _f.repositionToPlot();\n        if (w2.globals.dataPoints > 50) w2.dom.elWrap.classList.add(\"apexcharts-disable-transitions\");\n        const dim = {\n            plot: {\n                left: w2.layout.translateX,\n                top: w2.layout.translateY,\n                width: w2.layout.gridWidth,\n                height: w2.layout.gridHeight\n            }\n        };\n        return {\n            elGraph: elGraph,\n            xyRatios: xyRatios,\n            dimensions: dim\n        };\n    }\n    /**\n   * @param {any} graphData\n   */ mount(graphData = null) {\n        const me = this;\n        const w2 = me.w;\n        return new Promise((resolve, reject)=>{\n            var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;\n            if (me.el === null) return reject(new Error(\"Not enough data to display or target element not found\"));\n            else if (w2.globals.allSeriesCollapsed) me.series.handleNoData();\n            me.grid = new $e4b487e979d7c06d$var$Grid(me.w, me);\n            const elgrid = me.grid.drawGrid();\n            const AnnotationsCtor = $e4b487e979d7c06d$var$InitCtxVariables._featureRegistry.get(\"annotations\");\n            me.annotations = AnnotationsCtor ? new AnnotationsCtor(me.w, {\n                theme: me.theme,\n                timeScale: me.timeScale\n            }) : null;\n            (_a = me.annotations) == null || _a.drawImageAnnos();\n            (_b = me.annotations) == null || _b.drawTextAnnos();\n            if (w2.config.grid.position === \"back\") {\n                if (elgrid) w2.dom.elGraphical.add(elgrid.el);\n                if ((_c = elgrid == null ? void 0 : elgrid.elGridBorders) == null ? void 0 : _c.node) w2.dom.elGraphical.add(elgrid.elGridBorders);\n            }\n            if (Array.isArray(graphData.elGraph)) for(let g2 = 0; g2 < graphData.elGraph.length; g2++)w2.dom.elGraphical.add(graphData.elGraph[g2]);\n            else w2.dom.elGraphical.add(graphData.elGraph);\n            if (w2.config.grid.position === \"front\") {\n                if (elgrid) w2.dom.elGraphical.add(elgrid.el);\n                if ((_d = elgrid == null ? void 0 : elgrid.elGridBorders) == null ? void 0 : _d.node) w2.dom.elGraphical.add(elgrid.elGridBorders);\n            }\n            if (w2.config.xaxis.crosshairs.position === \"front\") me.crosshairs.drawXCrosshairs();\n            if (w2.config.yaxis[0].crosshairs.position === \"front\") me.crosshairs.drawYCrosshairs();\n            if (w2.config.chart.type !== \"treemap\") me.axes.drawAxis(w2.config.chart.type, elgrid);\n            const xAxis = new $e4b487e979d7c06d$var$XAxis(this.w, this.ctx, elgrid);\n            const yaxis = new $e4b487e979d7c06d$var$YAxis(this.w, {\n                theme: this.theme,\n                timeScale: this.timeScale\n            }, elgrid);\n            if (elgrid !== null) {\n                xAxis.xAxisLabelCorrections();\n                yaxis.setYAxisTextAlignments();\n                w2.config.yaxis.map((yaxe, index)=>{\n                    if (w2.globals.ignoreYAxisIndexes.indexOf(index) === -1) yaxis.yAxisTitleRotate(index, yaxe.opposite);\n                });\n            }\n            (_e = me.annotations) == null || _e.drawAxesAnnotations();\n            if (!w2.globals.noData) {\n                if ($e4b487e979d7c06d$var$Environment.isBrowser() && w2.config.tooltip.enabled && !w2.globals.noData) (_f = me.w.globals.tooltip) == null || _f.drawTooltip(graphData.xyRatios);\n                if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.keyboard.enabled && w2.config.chart.accessibility.keyboard.navigation.enabled) (_g = me.keyboardNavigation) == null || _g.init();\n                if ($e4b487e979d7c06d$var$Environment.isBrowser() && w2.globals.axisCharts && (w2.axisFlags.isXNumeric || /** @type {Record<string,any>} */ w2.config.xaxis.convertedCatToNumeric || w2.axisFlags.isRangeBar)) {\n                    if (w2.config.chart.zoom.enabled || w2.config.chart.selection && w2.config.chart.selection.enabled || // @ts-ignore — chart.pan is an internal toolbar config property\n                    w2.config.chart.pan && w2.config.chart.pan.enabled) (_h = me.zoomPanSelection) == null || _h.init({\n                        xyRatios: graphData.xyRatios\n                    });\n                } else {\n                    const tools = w2.config.chart.toolbar.tools;\n                    const toolsArr = [\n                        \"zoom\",\n                        \"zoomin\",\n                        \"zoomout\",\n                        \"selection\",\n                        \"pan\",\n                        \"reset\"\n                    ];\n                    toolsArr.forEach((t2)=>{\n                        tools[t2] = false;\n                    });\n                }\n                if (w2.config.chart.toolbar.show && !w2.globals.allSeriesCollapsed) (_i = me.toolbar) == null || _i.createToolbar();\n            }\n            (_j = me.weave) == null || _j.dispatch(\"draw\", {\n                pass: \"full\",\n                xyRatios: graphData == null ? void 0 : graphData.xyRatios\n            });\n            if (w2.globals.memory.methodsToExec.length > 0) w2.globals.memory.methodsToExec.forEach((fn)=>{\n                fn.method(fn.params, false, fn.context);\n            });\n            if (!w2.globals.axisCharts && !w2.globals.noData) me.core.resizeNonAxisCharts();\n            $e4b487e979d7c06d$var$enforceLicense(w2, me);\n            resolve(me);\n        });\n    }\n    /**\n   * Destroys the chart instance, removes all DOM elements and event listeners.\n   * After calling this, the instance should not be used again.\n   */ destroy() {\n        var _a;\n        this._renderPromise = null;\n        if ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n            window.removeEventListener(\"resize\", this.windowResizeHandler);\n            $e4b487e979d7c06d$var$removeResizeListener(/** @type {Element} */ this.el.parentNode, this.parentResizeHandler);\n            clearTimeout((_a = this.w.globals.resizeTimer) != null ? _a : void 0);\n        }\n        const chartID = this.w.config.chart.id;\n        if (chartID && Array.isArray(Apex._chartInstances)) Apex._chartInstances.forEach((c2, i2)=>{\n            if (c2.id === $e4b487e979d7c06d$var$Utils$1.escapeString(chartID)) Apex._chartInstances.splice(i2, 1);\n        });\n        if (this._keyboardNavigation) this._keyboardNavigation.destroy();\n        $e4b487e979d7c06d$var$teardownWatermark(this);\n        $e4b487e979d7c06d$var$untrackChart(this);\n        new $e4b487e979d7c06d$var$Destroy(this.ctx).clear({\n            isUpdating: false\n        });\n    }\n    /**\n   * Merges new options into the existing config and re-renders the chart.\n   *\n   * @param {ApexOptions} options - Partial config object merged with the existing config.\n   * @param {boolean} [redraw=false] - When true, redraws the chart from scratch instead of animating from previous paths.\n   * @param {boolean} [animate=true] - Whether to animate the update.\n   * @param {boolean} [updateSyncedCharts=true] - Whether to propagate the update to charts in the same group.\n   * @param {boolean} [overwriteInitialConfig=true] - When true, replaces the stored initial config used by resetSeries().\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance after re-render.\n   */ updateOptions(options2, redraw = false, animate = true, updateSyncedCharts = true, overwriteInitialConfig = true) {\n        const w2 = this.w;\n        if (options2 && \"series\" in options2 && !Array.isArray(options2.series)) {\n            console.warn(\"ApexCharts: updateOptions() ignored `series` because it is not an array.\");\n            options2 = $e4b487e979d7c06d$var$__spreadValues({}, options2);\n            delete options2.series;\n        }\n        w2.interact.selection = void 0;\n        if (this.lastUpdateOptions) {\n            if ($e4b487e979d7c06d$var$Utils$1.shallowEqual(this.lastUpdateOptions, options2)) return Promise.resolve(this);\n            if (options2.series && this.lastUpdateOptions.series && !_ApexCharts._optionsTooBigToCompare(options2)) {\n                if ($e4b487e979d7c06d$var$Utils$1.stringifyForCompare(this.lastUpdateOptions.series) === $e4b487e979d7c06d$var$Utils$1.stringifyForCompare(options2.series)) {\n                    const optionsWithoutSeries = $e4b487e979d7c06d$var$__spreadValues({}, options2);\n                    const lastWithoutSeries = $e4b487e979d7c06d$var$__spreadValues({}, this.lastUpdateOptions);\n                    delete optionsWithoutSeries.series;\n                    delete lastWithoutSeries.series;\n                    if ($e4b487e979d7c06d$var$Utils$1.shallowEqual(optionsWithoutSeries, lastWithoutSeries)) return Promise.resolve(this);\n                }\n            }\n        }\n        if (options2.series) {\n            this.data.resetParsingFlags();\n            this.series.resetSeries(false, true, false);\n            if (options2.series.length && options2.series[0].data) options2.series = options2.series.map((s2, i2)=>{\n                return this.updateHelpers._extendSeries(s2, i2);\n            });\n            this.updateHelpers.revertDefaultAxisMinMax();\n        }\n        if (options2.xaxis) options2 = this.updateHelpers.forceXAxisUpdate(options2);\n        if (options2.yaxis) options2 = this.updateHelpers.forceYAxisUpdate(options2);\n        if (w2.globals.collapsedSeriesIndices.length > 0) this.series.clearPreviousPaths();\n        if (options2.theme) options2 = this.theme.updateThemeOptions(options2);\n        return this.updateHelpers._updateOptions(options2, redraw, animate, updateSyncedCharts, overwriteInitialConfig);\n    }\n    /**\n   * Replaces the chart's series data and re-renders.\n   *\n   * @param {ApexAxisChartSeries | ApexNonAxisChartSeries} [newSeries=[]] - The replacement series array.\n   * @param {boolean} [animate=true] - Whether to animate the update.\n   * @param {boolean} [overwriteInitialSeries=true] - When true, replaces the stored initial series used by resetSeries().\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance after re-render.\n   */ updateSeries(newSeries = [], animate = true, overwriteInitialSeries = true) {\n        if (!Array.isArray(newSeries)) {\n            console.warn(\"ApexCharts: updateSeries() ignored the call because the series is not an array.\");\n            return Promise.resolve(this);\n        }\n        this.data.resetParsingFlags();\n        this.series.prepareDataUpdate();\n        this.updateHelpers.revertDefaultAxisMinMax();\n        return this.updateHelpers._updateSeries(newSeries, animate, overwriteInitialSeries);\n    }\n    /**\n   * Appends a new series to the existing series array and re-renders.\n   *\n   * @param {ApexAxisChartSeries[0] | ApexNonAxisChartSeries} newSerie - The series object to append.\n   * @param {boolean} [animate=true] - Whether to animate the update.\n   * @param {boolean} [overwriteInitialSeries=true] - When true, replaces the stored initial series used by resetSeries().\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance after re-render.\n   */ appendSeries(newSerie, animate = true, overwriteInitialSeries = true) {\n        this.data.resetParsingFlags();\n        const newSeries = this.w.config.series.slice();\n        newSeries.push(/** @type {any} */ newSerie);\n        this.series.prepareDataUpdate();\n        this.updateHelpers.revertDefaultAxisMinMax();\n        return this.updateHelpers._updateSeries(newSeries, animate, overwriteInitialSeries);\n    }\n    /**\n   * Appends data points to existing series without replacing them.\n   * Each element of `newData` corresponds to the series at the same index.\n   *\n   * @param {Array<{ data: any[] }>} newData - Data to append, in the same shape as series[].data.\n   * @param {boolean} [overwriteInitialSeries=true] - When true, updates the stored initial series used by resetSeries().\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance after re-render.\n   */ appendData(newData, overwriteInitialSeries = true) {\n        const me = this;\n        me.data.resetParsingFlags();\n        me.w.globals.dataChanged = true;\n        if (me.w.config.chart.animations.enabled) me.series.getPreviousPaths();\n        const histRaw = me.w.globals.histogramRawSeries;\n        if (histRaw) {\n            for(let i2 = 0; i2 < histRaw.length; i2++){\n                const src = /** @type {any} */ newData[i2];\n                if (src && Array.isArray(src.data) && Array.isArray(histRaw[i2].data)) for(let j = 0; j < src.data.length; j++)histRaw[i2].data.push(src.data[j]);\n            }\n            return this.update();\n        }\n        const newSeries = me.w.config.series.slice();\n        for(let i2 = 0; i2 < newSeries.length; i2++)if (newData[i2] !== null && typeof newData[i2] !== \"undefined\") {\n            const srcSerie = /** @type {any} */ newData[i2];\n            const dstSerie = /** @type {any} */ newSeries[i2];\n            for(let j = 0; j < srcSerie.data.length; j++)dstSerie.data.push(srcSerie.data[j]);\n        }\n        $e4b487e979d7c06d$var$trimStreamingSeries(newSeries, me.w);\n        me.w.config.series = newSeries;\n        if (overwriteInitialSeries) me.w.globals.initialSeries = me.w.config.series;\n        return this.update();\n    }\n    /**\n   * True when an options object carries enough series data that a\n   * JSON.stringify equality check (and the Utils.clone needed to store it for\n   * later comparison) would cost more than the re-render it tries to avoid.\n   * @param {any} options\n   * @returns {boolean}\n   */ static _optionsTooBigToCompare(options2) {\n        const series = options2 && options2.series;\n        if (!Array.isArray(series)) return false;\n        let points = 0;\n        for(let i2 = 0; i2 < series.length; i2++){\n            const d = series[i2] && series[i2].data;\n            points += Array.isArray(d) ? d.length : 1;\n            if (points > 1e3) return true;\n        }\n        return false;\n    }\n    /**\n   * @param {object} [options]\n   */ update(options2) {\n        return new Promise((resolve, reject)=>{\n            if (options2 && this.lastUpdateOptions && !_ApexCharts._optionsTooBigToCompare(options2) && $e4b487e979d7c06d$var$Utils$1.stringifyForCompare(this.lastUpdateOptions) === $e4b487e979d7c06d$var$Utils$1.stringifyForCompare(options2)) return resolve(this);\n            this.lastUpdateOptions = options2 && !_ApexCharts._optionsTooBigToCompare(options2) ? $e4b487e979d7c06d$var$Utils$1.clone(options2) : null;\n            new $e4b487e979d7c06d$var$Destroy(this.ctx).clear({\n                isUpdating: true\n            });\n            const graphData = this.create(this.w.config.series, options2 != null ? options2 : {});\n            if (!graphData) return resolve(this);\n            this.mount(graphData).then(()=>{\n                var _a;\n                (_a = this.morphTypeChange) == null || _a.applyChromeFade();\n                $e4b487e979d7c06d$var$applyAxisTransition(this.w);\n                $e4b487e979d7c06d$var$applyDataLabelTransition(this.w);\n                if (typeof this.w.config.chart.events.updated === \"function\") this.w.config.chart.events.updated(this, this.w);\n                this.events.fireEvent(\"updated\", [\n                    this,\n                    this.w\n                ]);\n                this.w.globals.isDirty = true;\n                resolve(this);\n            }).catch((e2)=>{\n                reject(e2);\n            });\n        });\n    }\n    /**\n   * Redraws the scale-dependent chrome (grid lines, x-axis, y-axes) IN PLACE\n   * within the frozen layout after a data-only update changed the axis\n   * domain. The rebuilt groups replace the old nodes positionally, so z-order\n   * (grid back/front) is preserved without re-running mount. Legend,\n   * annotations containers, toolbar, defs/masks, and the plot geometry are\n   * untouched.\n   *\n   * Returns false when the refresh cannot faithfully reproduce the chart and\n   * the caller must fall back to a full render:\n   * - horizontal bar charts (inversed axes draw through a different path)\n   * - charts with annotations or ink notes (their positions are scale-bound\n   *   and are laid out by the full render)\n   * - the new y labels no longer fit the width reserved at layout time\n   *\n   * @param {any} _xyRatios\n   * @returns {boolean} true when the chrome was refreshed in place\n   */ _fastAxisChromeRefresh(_xyRatios) {\n        const w2 = this.w;\n        const gl = w2.globals;\n        this._fastAxisBailReason = \"\";\n        try {\n            if (gl.isBarHorizontal) {\n                this._fastAxisBailReason = \"barHorizontal\";\n                return false;\n            }\n            if (w2.config.chart.sparkline.enabled) return true;\n            const a2 = w2.config.annotations;\n            if (a2 && (a2.yaxis && a2.yaxis.length || a2.xaxis && a2.xaxis.length || a2.points && a2.points.length || a2.texts && a2.texts.length || a2.images && a2.images.length)) {\n                this._fastAxisBailReason = \"annotations\";\n                return false;\n            }\n            if (w2.config.chart.ink && w2.config.chart.ink.enabled) {\n                this._fastAxisBailReason = \"ink\";\n                return false;\n            }\n            const dim = this.dimensions;\n            if (!dim || !dim.dimYAxis) {\n                this._fastAxisBailReason = \"noDimensions\";\n                return false;\n            }\n            const prevYLabelsCoords = w2.layout.yLabelsCoords;\n            const prevYTitleCoords = w2.layout.yTitleCoords;\n            const yaxisLabelCoords = dim.dimYAxis.getyAxisLabelsCoords();\n            const yTitleCoords = dim.dimYAxis.getyAxisTitleCoords();\n            w2.layout.yLabelsCoords = [];\n            w2.layout.yTitleCoords = [];\n            w2.config.yaxis.map((_yaxe, index)=>{\n                w2.layout.yLabelsCoords.push({\n                    width: yaxisLabelCoords[index].width,\n                    index: index\n                });\n                w2.layout.yTitleCoords.push(/** @type {any} */ {\n                    width: yTitleCoords[index].width,\n                    index: index\n                });\n            });\n            const newYAxisWidth = dim.dimYAxis.getTotalYAxisWidth();\n            if (newYAxisWidth > dim.yAxisWidth + 2) {\n                w2.layout.yLabelsCoords = prevYLabelsCoords;\n                w2.layout.yTitleCoords = prevYTitleCoords;\n                this._fastAxisBailReason = `labelWidth ${newYAxisWidth} > ${dim.yAxisWidth}`;\n                return false;\n            }\n            const innerEl = w2.dom.elGraphical.node;\n            const oldGrid = innerEl.querySelector(\".apexcharts-grid\");\n            const oldGridBorders = innerEl.querySelector(\".apexcharts-grid-borders\");\n            if (!oldGrid) {\n                this._fastAxisBailReason = \"missingGridNode\";\n                return false;\n            }\n            const gridParent = oldGrid.parentNode;\n            const gridNext = oldGridBorders ? oldGridBorders.nextSibling : oldGrid.nextSibling;\n            oldGrid.remove();\n            if (oldGridBorders) oldGridBorders.remove();\n            innerEl.querySelectorAll(\".apexcharts-xaxis-tick\").forEach((t2)=>t2.remove());\n            this.grid = new $e4b487e979d7c06d$var$Grid(w2, this);\n            const elgrid = this.grid.drawGrid();\n            if (elgrid && elgrid.el) {\n                gridParent.insertBefore(elgrid.el.node, gridNext);\n                if (elgrid.elGridBorders && elgrid.elGridBorders.node) gridParent.insertBefore(elgrid.elGridBorders.node, gridNext);\n            }\n            const xAxis = new $e4b487e979d7c06d$var$XAxis(this.w, this.ctx, elgrid);\n            const oldXaxis = innerEl.querySelector(\".apexcharts-xaxis\");\n            if (oldXaxis) {\n                const xParent = oldXaxis.parentNode;\n                const xNext = oldXaxis.nextSibling;\n                oldXaxis.remove();\n                const elXaxis = xAxis.drawXaxis();\n                xParent.insertBefore(elXaxis.node, xNext);\n            }\n            const yAxis = new $e4b487e979d7c06d$var$YAxis(this.w, {\n                theme: this.theme,\n                timeScale: this.timeScale\n            }, elgrid);\n            for(let index = 0; index < w2.config.yaxis.length; index++){\n                if (gl.ignoreYAxisIndexes.indexOf(index) !== -1) continue;\n                const oldY = w2.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${index}']`);\n                if (!oldY) {\n                    this._fastAxisBailReason = \"missingYAxisNode\";\n                    return false;\n                }\n                const yParent = oldY.parentNode;\n                if (!yParent) {\n                    this._fastAxisBailReason = \"missingYAxisParent\";\n                    return false;\n                }\n                const yNext = oldY.nextSibling;\n                oldY.remove();\n                const elYaxis = yAxis.drawYaxis(index);\n                yParent.insertBefore(elYaxis.node, yNext);\n            }\n            if (elgrid !== null) {\n                xAxis.xAxisLabelCorrections();\n                yAxis.setYAxisTextAlignments();\n                w2.config.yaxis.map((yaxe, index)=>{\n                    if (gl.ignoreYAxisIndexes.indexOf(index) === -1) yAxis.yAxisTitleRotate(index, yaxe.opposite);\n                });\n            }\n            return true;\n        } catch (e2) {\n            this._fastAxisBailReason = \"error: \" + (e2 && /** @type {any} */ e2.message);\n            return false;\n        }\n    }\n    /**\n   * Fast update path for data-only series changes.\n   *\n   * Skips rebuilding grid, axes, dimensions, legend, annotations, tooltip DOM,\n   * and toolbar. Only recalculates scales and replots the series paths.\n   * Called automatically by _updateSeries() when the fast path is eligible.\n   *\n   * @param {boolean} animate - Whether to animate the update.\n   * @param {string} [prevAxisScaleSig] - Signature of the on-screen axis scale\n   *   captured by _updateSeries() before parseData recomputed bounds. When the\n   *   recomputed scale differs, the fast path can't repaint the ruler in place,\n   *   so it delegates to a full render. Omitted -> the check is skipped.\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance.\n   */ fastUpdate(animate, prevAxisScaleSig) {\n        return new Promise((resolve, reject)=>{\n            var _a, _b, _c;\n            try {\n                const w2 = this.w;\n                const gl = w2.globals;\n                gl.shouldAnimate = animate;\n                gl.dataChanged = true;\n                gl.animationEnded = false;\n                $e4b487e979d7c06d$var$PerformanceCache.invalidateSelectors(w2);\n                const gl2 = w2.globals;\n                gl2.maxY = -Number.MAX_VALUE;\n                gl2.minY = Number.MIN_VALUE;\n                gl2.minYArr = [];\n                gl2.maxYArr = [];\n                gl2.maxX = -Number.MAX_VALUE;\n                gl2.minX = Number.MAX_VALUE;\n                gl2.initialMaxX = -Number.MAX_VALUE;\n                gl2.initialMinX = Number.MAX_VALUE;\n                gl2.yAxisScale = [];\n                gl2.xAxisScale = null;\n                gl2.xAxisTicksPositions = [];\n                gl2.xRange = 0;\n                gl2.yRange = [];\n                gl2.zRange = 0;\n                gl2.xTickAmount = 0;\n                gl2.multiAxisTickAmount = 0;\n                gl2.pointsArray = [];\n                gl2.barCanvasCoords = null;\n                gl2.dataLabelsRects = [];\n                gl2.lastDrawnDataLabelsIndexes = [];\n                gl2.textRectsCache = /* @__PURE__ */ new Map();\n                gl2.domCache = /* @__PURE__ */ new Map();\n                gl2.cachedSelectors = {};\n                gl2.disableZoomIn = false;\n                gl2.disableZoomOut = false;\n                if (gl.axisCharts) {\n                    this.core.coreCalculations();\n                    if (w2.config.xaxis.type !== \"category\") this.formatters.setLabelFormatters();\n                }\n                this.formatters.heatmapLabelFormatters();\n                const xyRatios = this.core.xySettings();\n                if (this._zoomPanSelection) this._zoomPanSelection.xyRatios = xyRatios;\n                const newAxisScaleSig = JSON.stringify({\n                    y: (gl.yAxisScale || []).map((s2)=>s2 ? s2.result : null),\n                    xMin: gl.minX,\n                    xMax: gl.maxX\n                });\n                const scaleChanged = gl.axisCharts && prevAxisScaleSig != null && newAxisScaleSig !== prevAxisScaleSig;\n                if (scaleChanged && !this._fastAxisChromeRefresh(xyRatios)) {\n                    this._updateStats.full++;\n                    return this.update().then(()=>resolve(this)).catch(reject);\n                }\n                if (scaleChanged) this._updateStats.fastWithAxes++;\n                else this._updateStats.fast++;\n                (_a = this.weave) == null || _a.dispatch(\"afterScales\", {\n                    pass: \"fast\",\n                    xyRatios: xyRatios\n                });\n                const rr = /** @type {any} */ this.ctx.renderer;\n                const reuseCanvasHost = !!(rr && rr.kind === \"canvas\" && rr.canRepaintInPlace && rr.canRepaintInPlace());\n                if (reuseCanvasHost) rr._repaintHostInPlace = true;\n                const innerEl = w2.dom.elGraphical.node;\n                const toRemove = innerEl.querySelectorAll((reuseCanvasHost ? \"\" : \".apexcharts-canvas-series-wrap, \") + \".apexcharts-plot-series, .apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background\");\n                toRemove.forEach((el)=>{\n                    var _a2;\n                    return (_a2 = el.parentNode) == null ? void 0 : _a2.removeChild(el);\n                });\n                const elGraph = this.core.plotChartType(w2.config.series, xyRatios);\n                const gridEl = innerEl.querySelector(\".apexcharts-grid\");\n                const xaxisEl = innerEl.querySelector(\".apexcharts-xaxis\");\n                const graphs = Array.isArray(elGraph) ? elGraph : [\n                    elGraph\n                ];\n                const anchor = gridEl && w2.config.grid.position === \"front\" ? gridEl : xaxisEl;\n                if (anchor) graphs.forEach((g2)=>{\n                    const node = g2 && g2.node ? g2.node : g2;\n                    if (node) innerEl.insertBefore(node, anchor);\n                });\n                else graphs.forEach((g2)=>{\n                    w2.dom.elGraphical.add(g2);\n                });\n                const dataLabels = new $e4b487e979d7c06d$var$DataLabels(w2, this);\n                dataLabels.bringForward();\n                if (w2.config.dataLabels.background.enabled) dataLabels.dataLabelsBackground();\n                if ($e4b487e979d7c06d$var$Environment.isBrowser() && w2.config.tooltip.enabled && !gl.noData) (_b = w2.globals.tooltip) == null || _b.drawTooltip(xyRatios);\n                (_c = this.weave) == null || _c.dispatch(\"draw\", {\n                    pass: \"fast\",\n                    xyRatios: xyRatios\n                });\n                if (typeof w2.config.chart.events.updated === \"function\") w2.config.chart.events.updated(this, w2);\n                this.events.fireEvent(\"updated\", [\n                    this,\n                    w2\n                ]);\n                $e4b487e979d7c06d$var$enforceLicense(w2, this);\n                gl.isDirty = true;\n                resolve(this);\n            } catch (e2) {\n                reject(e2);\n            }\n        });\n    }\n    /**\n   * Returns all charts in the same `chart.group` (including this instance),\n   * used to synchronise zoom/pan across grouped charts.\n   *\n   * @returns {ApexCharts[]}\n   */ getSyncedCharts() {\n        const group = /** @type {ApexCharts[]} */ this.getGroupedCharts();\n        group.splice(0, 0, this);\n        return group;\n    }\n    /**\n   * Returns all charts in the same `chart.group`, excluding this instance.\n   * Used internally to apply hover/zoom effects to sibling charts.\n   *\n   * @returns {ApexCharts[]}\n   */ getGroupedCharts() {\n        return Apex._chartInstances.filter((ch)=>this !== ch.chart && !!this.w.config.chart.group && this.w.config.chart.group === ch.group).map((ch)=>ch.chart);\n    }\n    /**\n   * Retrieves a rendered chart instance by its `chart.id` config value.\n   *\n   * @param {string} id - The chart ID set via `chart.id` in options.\n   * @returns {ApexCharts | undefined}\n   */ static getChartByID(id) {\n        const chartId = $e4b487e979d7c06d$var$Utils$1.escapeString(id);\n        if (!Apex._chartInstances) return void 0;\n        const c2 = Apex._chartInstances.filter((ch)=>ch.id === chartId)[0];\n        return c2 && c2.chart;\n    }\n    /**\n   * Scans the document for elements with a `data-apexcharts` attribute and\n   * `data-options` JSON, then renders a chart in each one automatically.\n   * Useful for non-framework HTML pages.\n   */ static initOnLoad() {\n        var _a;\n        const els = document.querySelectorAll(\"[data-apexcharts]\");\n        for(let i2 = 0; i2 < els.length; i2++){\n            const el = /** @type {HTMLElement} */ els[i2];\n            const options2 = JSON.parse((_a = els[i2].getAttribute(\"data-options\")) != null ? _a : \"\");\n            const apexChart = new _ApexCharts(el, options2);\n            apexChart.render();\n        }\n    }\n    /**\n   * This static method allows users to call chart methods without necessarily from the\n   * instance of the chart in case user has assigned chartID to the targeted chart.\n   * The chartID is used for mapping the instance stored in Apex._chartInstances global variable\n   *\n   * This is helpful in cases when you don't have reference of the chart instance\n   * easily and need to call the method from anywhere.\n   * For eg, in React/Vue applications when you have many parent/child components,\n   * and need easy reference to other charts for performing dynamic operations\n   *\n   * @param {string} chartID - The unique identifier which will be used to call methods\n   * on that chart instance\n   * @param {string} fn - The method name to call\n   * @param {...any} opts - The parameters which are accepted in the original method will be passed here in the same order.\n   */ static exec(chartID, fn, ...opts) {\n        const chart = this.getChartByID(chartID);\n        if (!chart) return;\n        chart.w.globals.isExecCalled = true;\n        let ret = null;\n        if (chart.publicMethods.indexOf(fn) !== -1) ret = /** @type {any} */ chart[fn](...opts);\n        return ret;\n    }\n    /**\n   * Deep-merges `source` into `target` and returns the result.\n   * Thin wrapper around the internal `Utils.extend` utility.\n   *\n   * @param {object} target\n   * @param {object} source\n   * @returns {object}\n   */ static merge(target, source) {\n        return $e4b487e979d7c06d$var$Utils$1.extend(target, source);\n    }\n    static getThemePalettes() {\n        return $e4b487e979d7c06d$var$getThemePalettes();\n    }\n    /**\n   * Register additional chart types. Used by sub-entry points so that only\n   * the types they include are bundled.\n   *\n   * @param {Record<string, new (...args: any[]) => any>} typeMap  e.g. { line: Line, area: Line }\n   */ static use(typeMap) {\n        $e4b487e979d7c06d$var$register(typeMap);\n    }\n    /**\n   * Register optional feature modules (Exports, Legend, Toolbar,\n   * ZoomPanSelection, KeyboardNavigation, Annotations).\n   *\n   * Call this before rendering any chart. Feature entry files (e.g.\n   * `apexcharts/features/legend`) call this automatically when imported.\n   * Note: Tooltip is part of core and does not need to be registered.\n   *\n   * @param {Record<string, new (...args: any[]) => any>} featureMap  e.g. { legend: Legend, exports: Exports }\n   */ static registerFeatures(featureMap) {\n        $e4b487e979d7c06d$var$InitCtxVariables.registerFeatures(featureMap);\n    }\n    /**\n   * Set the license key that unlocks the premium features (storyboard, link /\n   * crossfilter, ink, measure, contextMenu, perspectives, history). Without a\n   * valid key those features still work but the chart shows an \"APEXCHARTS\"\n   * trial watermark; a valid key removes it. Keys are shared across the whole\n   * ApexCharts family (apexgantt, apextree, apexsankey, apex-grid-enterprise,\n   * apexstock), so one customer key works everywhere.\n   *\n   * Call before render(). The watermark is re-evaluated on every render/update,\n   * so a late setLicense(validKey) followed by chart.update() clears it.\n   *\n   * Precedence per chart: `chart.license` (most specific) -> this key ->\n   * `window.Apex.license` -> unlicensed (trial).\n   *\n   * @param {string} key  the `APEX-<base64(JSON)>` license key\n   * @returns {typeof ApexCharts}\n   */ static setLicense(key) {\n        $e4b487e979d7c06d$var$o.setLicense(key);\n        $e4b487e979d7c06d$var$reevaluateLicenseAcrossCharts();\n        return _ApexCharts;\n    }\n    /**\n   * Register a Weave plugin definition (a plain { name, setup } object).\n   * Lives in core so plugins can always be registered; they only activate when\n   * the Weave host is bundled (`import 'apexcharts/features/weave'`, included in\n   * the full bundle) and listed in a chart's `plugins` config.\n   *\n   * @param {{ name: string, apiVersion?: number, setup: Function, destroy?: Function }} def\n   * @returns {typeof ApexCharts}\n   */ static registerPlugin(def) {\n        $e4b487e979d7c06d$var$registerPlugin(def);\n        return _ApexCharts;\n    }\n    /**\n   * Remove a registered Weave plugin definition. Charts already holding an\n   * active instance keep it until their plugins config changes or they are\n   * destroyed; the name simply stops resolving for new activations. Intended\n   * for tests and hot-reload flows.\n   * @param {string} name\n   * @returns {typeof ApexCharts}\n   */ static unregisterPlugin(name2) {\n        $e4b487e979d7c06d$var$unregisterPlugin(name2);\n        return _ApexCharts;\n    }\n    /**\n   * Register a non-SVG series renderer (Strata #2). SVG is built in; the canvas\n   * backend registers itself via `import 'apexcharts/features/renderer-canvas'`.\n   * When a `kind` is not registered, selection falls back to SVG.\n   *\n   * @param {string} kind  e.g. 'canvas'\n   * @param {(w: any, ctx: any) => any} factory  returns a Renderer instance\n   */ static registerRenderer(kind, factory) {\n        $e4b487e979d7c06d$var$RendererController.registerRenderer(kind, factory);\n    }\n    /**\n   * Register a custom series type (Marks #11): a `{ renderItem }` definition\n   * that draws primitives (path/line/rect/circle/text) per datum. Requires the\n   * Marks feature to be bundled (`import 'apexcharts/features/marks'`, included\n   * in the full bundle); without it this warns and no-ops. Once registered, use\n   * it via `series[].type` or `chart.type`.\n   *\n   * @param {string} name  the type name, e.g. 'dumbbell'\n   * @param {{ renderItem: Function, dataType?: string, yExtent?: Function, tooltip?: Function }} def\n   * @returns {typeof ApexCharts}\n   */ static registerSeriesType(name2, def) {\n        const factory = /** @type {any} */ _ApexCharts._customSeriesFactory;\n        if (!factory) {\n            console.warn(`[apexcharts] registerSeriesType(\"${name2}\") requires the Marks feature: import 'apexcharts/features/marks'.`);\n            return _ApexCharts;\n        }\n        if (!def || typeof def.renderItem !== \"function\") {\n            console.warn(`[apexcharts] registerSeriesType(\"${name2}\") needs a def with a renderItem() function.`);\n            return _ApexCharts;\n        }\n        if ($e4b487e979d7c06d$var$hasChartClass(name2) && !$e4b487e979d7c06d$var$isCustom(name2)) {\n            console.warn(`[apexcharts] registerSeriesType(\"${name2}\") would override the built-in \"${name2}\" chart type; pick another name.`);\n            return _ApexCharts;\n        }\n        $e4b487e979d7c06d$var$register({\n            [name2]: factory(name2, def)\n        });\n        $e4b487e979d7c06d$var$markCustom(name2);\n        return _ApexCharts;\n    }\n    /**\n   * Remove a custom series type registered via registerSeriesType. Built-in\n   * chart types cannot be unregistered. Intended for tests and hot-reload.\n   * @param {string} name\n   * @returns {typeof ApexCharts}\n   */ static unregisterSeriesType(name2) {\n        if ($e4b487e979d7c06d$var$isCustom(name2)) $e4b487e979d7c06d$var$unregister(name2);\n        return _ApexCharts;\n    }\n    /**\n   * Facet (#13): register a named theme (palette + design tokens + mode)\n   * referenceable via `theme: { name }`. The theme sits below explicit config\n   * and CSS `--apx-*` tokens, above the built-in palette/mode defaults.\n   *\n   * @param {string} name  the theme name, e.g. 'brand'\n   * @param {any} def  { mode?, palette?, tokens?, monochrome?, accessibility? }\n   * @returns {typeof ApexCharts}\n   */ static registerTheme(name2, def) {\n        $e4b487e979d7c06d$var$registerTheme(name2, def);\n        return _ApexCharts;\n    }\n    /**\n   * Remove a theme registered via registerTheme. Charts referencing it by\n   * `theme.name` fall back to the built-in defaults on their next render.\n   * Intended for tests and hot-reload flows.\n   * @param {string} name\n   * @returns {typeof ApexCharts}\n   */ static unregisterTheme(name2) {\n        $e4b487e979d7c06d$var$unregisterTheme(name2);\n        return _ApexCharts;\n    }\n    /**\n   * Cadence (#6): register a named easing function referenceable via\n   * `chart.animations.easing: '<name>'`. `fn` maps linear progress t in [0,1]\n   * to eased progress (back/elastic curves may overshoot 1).\n   *\n   * @param {string} name  the easing name, e.g. 'bounce'\n   * @param {(t:number)=>number} fn\n   * @returns {typeof ApexCharts}\n   */ static registerEasing(name2, fn) {\n        $e4b487e979d7c06d$var$registerEasing(name2, fn);\n        return _ApexCharts;\n    }\n    /**\n   * Register a named unit-chart layout, referenceable via\n   * `plotOptions.unit.positions: '<name>'` with `plotOptions.unit.layout:\n   * 'custom'`.\n   *\n   * A layout is objects in, positions out: `(objects, rect) => [{id, x, y,\n   * r?}]`, in plot pixels. It knows nothing about animation, because the engine\n   * already tweens position, radius and colour and already keeps each mark's\n   * identity across a relayout. That is what lets an arrangement the engine\n   * cannot know about - a country silhouette, a hex grid, a timeline, a\n   * projection supplied by ApexMaps - be a plugin rather than a core change.\n   *\n   * Marks whose id the layout omits animate out; ids matching no mark are\n   * ignored.\n   *\n   * @param {string} name  the layout name, e.g. 'silhouette'\n   * @param {(objects: any[], rect: {x:number,y:number,width:number,height:number}) => any[]} fn\n   * @returns {typeof ApexCharts}\n   */ static registerUnitLayout(name2, fn) {\n        $e4b487e979d7c06d$var$registerUnitLayout(name2, fn);\n        return _ApexCharts;\n    }\n    /**\n   * Remove a layout registered via registerUnitLayout. Charts referencing it by\n   * name fall back to the grouped layout on their next render.\n   * @param {string} name\n   * @returns {typeof ApexCharts}\n   */ static unregisterUnitLayout(name2) {\n        $e4b487e979d7c06d$var$unregisterUnitLayout(name2);\n        return _ApexCharts;\n    }\n    /**\n   * Register a row source: given a chart's state, what rows is each of its\n   * marks standing for?\n   *\n   * Most marks cannot answer. An ordinary bar aggregates rows the library never\n   * saw. The types that can are the ones whose series carries raw observations\n   * (histogram, boxPlot, violin), and their sources ship with the statistics in\n   * `apexcharts/features/stats`; core keeps only the lookup.\n   *\n   * The function returns a unit-chart series (one cluster per mark, one datum\n   * per row) in the marks' own draw order, or null. See RowSourceRegistry for\n   * why that order is a contract rather than a convention.\n   *\n   * @param {string} name  chart type name, matched against `chart.requestedType` then `chart.type`\n   * @param {(w: any, opts?: any) => any[] | null} fn\n   * @returns {typeof ApexCharts}\n   */ static registerRowSource(name2, fn) {\n        $e4b487e979d7c06d$var$registerRowSource(name2, fn);\n        return _ApexCharts;\n    }\n    /**\n   * Remove a row source registered via registerRowSource.\n   * @param {string} name\n   * @returns {typeof ApexCharts}\n   */ static unregisterRowSource(name2) {\n        $e4b487e979d7c06d$var$unregisterRowSource(name2);\n        return _ApexCharts;\n    }\n    /**\n   * The rows behind this chart's marks, as a unit-chart series.\n   *\n   * A histogram bar stands for the observations it counted, a box for the\n   * sample it summarises. This hands them back as one cluster per mark, so a\n   * mark can come apart into its own rows:\n   *\n   *     chart.updateOptions({ chart: { type: 'unit' }, series: chart.rowSeries() })\n   *\n   * With the morph feature loaded, each dot then leaves from the part of the\n   * mark that was standing for it, and collapsing back is the inverse.\n   *\n   * Returns null when the chart's type cannot name its rows, or when\n   * `apexcharts/features/stats` (which carries the sources for the types that\n   * can) is not loaded.\n   *\n   * @param {{ maxRows?: number }} [opts] `maxRows` caps the dots produced\n   *   (default 3000, matching the jitter overlay); past it every cluster is\n   *   thinned by one shared stride so their relative sizes survive.\n   * @returns {any[]|null}\n   */ rowSeries(opts) {\n        const source = $e4b487e979d7c06d$var$rowSourceFor(this.w);\n        if (!source) return null;\n        return source(this.w, opts) || null;\n    }\n    /**\n   * Linked Views (#4) Phase 2: get-or-create a crossfilter coordinator by id.\n   * Register one shared record set, then let each chart declare a dimension +\n   * reduction under `chart.link`. Selecting in one chart re-aggregates the\n   * others over the filtered subset.\n   *\n   * Lives in core (always callable) but the engine ships in the `link` feature\n   * (`import 'apexcharts/features/link'`, included in the full bundle); without\n   * it this warns and returns null so the engine shakes out when unused.\n   *\n   * @param {{ id: string, records?: any[] }} opts\n   * @returns {any} the coordinator handle, or null if the feature is absent\n   */ static crossfilter(opts) {\n        if (!opts || typeof opts.id !== \"string\") throw new Error(\"ApexCharts.crossfilter requires an { id } string.\");\n        const factory = /** @type {any} */ _ApexCharts._crossfilterFactory;\n        if (!factory) {\n            console.warn(`[apexcharts] ApexCharts.crossfilter(...) requires the link feature: import 'apexcharts/features/link'.`);\n            return null;\n        }\n        const coordinator = factory(opts);\n        $e4b487e979d7c06d$var$reevaluateLicenseAcrossCharts();\n        return coordinator;\n    }\n    /**\n   * Look up an existing crossfilter coordinator by id (null if none / feature\n   * absent).\n   * @param {string} id\n   * @returns {any}\n   */ static getCrossfilter(id) {\n        const get = /** @type {any} */ _ApexCharts._crossfilterGet;\n        return get ? get(id) : null;\n    }\n    /**\n   * Linked Views (#4): clear crossfilter dimming across this chart and every\n   * chart in its `chart.group`. No-op unless the `link` feature is bundled.\n   */ clearCrossfilter() {\n        var _a;\n        (_a = this.linkedViews) == null || _a.clearGroup();\n    }\n    /**\n   * Measure ruler (#18): arm a sticky measure-ruler mode (drag A->B on the\n   * plot to read dx/dy/%change/slope). Alternatively hold the measure key\n   * (chart.measure.key, default 'm') and drag. No-op unless the `measure`\n   * feature is bundled and chart.measure.enabled.\n   */ startMeasure() {\n        var _a;\n        (_a = this.measure) == null || _a.startMeasure();\n    }\n    /** Measure ruler (#18): leave measure mode. */ stopMeasure() {\n        var _a;\n        (_a = this.measure) == null || _a.stopMeasure();\n    }\n    /** Measure ruler (#18): remove all pinned measure rulers. */ clearMeasures() {\n        var _a;\n        (_a = this.measure) == null || _a.clearMeasures();\n    }\n    /**\n   * Toggles (show/hide) the series identified by name.\n   * Mirrors a click on the corresponding legend item.\n   *\n   * @param {string} seriesName\n   * @returns {object | undefined} The collapsed series object, if now hidden.\n   */ toggleSeries(seriesName) {\n        return this.series.toggleSeries(seriesName);\n    }\n    /**\n   * Highlights or un-highlights a series when the user hovers a legend item.\n   * Called internally by the legend; not typically called by consumers.\n   *\n   * @param {MouseEvent} e\n   * @param {HTMLElement} targetElement - The legend marker element being hovered.\n   */ highlightSeriesOnLegendHover(e2, targetElement) {\n        return this.series.toggleSeriesOnHover(e2, targetElement);\n    }\n    /**\n   * Makes a previously hidden series visible and re-renders.\n   *\n   * @param {string} seriesName\n   */ showSeries(seriesName) {\n        this.series.showSeries(seriesName);\n    }\n    /**\n   * Hides a visible series and re-renders.\n   *\n   * @param {string} seriesName\n   */ hideSeries(seriesName) {\n        this.series.hideSeries(seriesName);\n    }\n    /**\n   * Highlights (dims all other series) the series identified by name.\n   *\n   * @param {string} seriesName\n   */ highlightSeries(seriesName) {\n        this.series.highlightSeries(seriesName);\n    }\n    /**\n   * Returns whether the series identified by name is currently hidden.\n   *\n   * @param {string} seriesName\n   * @returns {boolean}\n   */ isSeriesHidden(seriesName) {\n        return this.series.isSeriesHidden(seriesName);\n    }\n    /**\n   * Resets the chart to the initial series and optionally the initial zoom level.\n   *\n   * @param {boolean} [shouldUpdateChart=true] - When true, triggers a re-render.\n   * @param {boolean} [shouldResetZoom=true] - When true, restores the initial zoom level.\n   */ resetSeries(shouldUpdateChart = true, shouldResetZoom = true) {\n        this.series.resetSeries(shouldUpdateChart, shouldResetZoom);\n    }\n    /**\n   * Subscribes to a chart event by name.\n   * Supported event names mirror the `chart.events` option keys\n   * (e.g. `'mounted'`, `'updated'`, `'dataPointMouseEnter'`).\n   *\n   * @param {string} name - Event name.\n   * @param {Function} handler - Callback invoked when the event fires.\n   */ addEventListener(name2, handler) {\n        this.events.addEventListener(name2, handler);\n    }\n    /**\n   * Removes a previously registered event listener.\n   *\n   * @param {string} name - Event name.\n   * @param {Function} handler - The exact function reference passed to addEventListener.\n   */ removeEventListener(name2, handler) {\n        this.events.removeEventListener(name2, handler);\n    }\n    /**\n   * Adds an x-axis annotation dynamically after render.\n   *\n   * @param {XAxisAnnotations} opts - Annotation configuration.\n   * @param {boolean} [pushToMemory=true] - When true, the annotation persists across re-renders.\n   * @param {ApexCharts} [context] - Override the target chart instance (used by exec()).\n   */ addXaxisAnnotation(opts, pushToMemory = true, context) {\n        var _a;\n        let me = /** @type {ApexCharts} */ /** @type {unknown} */ this;\n        if (context) me = context;\n        (_a = me.annotations) == null || _a.addXaxisAnnotationExternal(opts, pushToMemory, me);\n    }\n    /**\n   * Adds a y-axis annotation dynamically after render.\n   *\n   * @param {YAxisAnnotations} opts - Annotation configuration.\n   * @param {boolean} [pushToMemory=true] - When true, the annotation persists across re-renders.\n   * @param {ApexCharts} [context] - Override the target chart instance (used by exec()).\n   */ addYaxisAnnotation(opts, pushToMemory = true, context) {\n        var _a;\n        let me = /** @type {ApexCharts} */ /** @type {unknown} */ this;\n        if (context) me = context;\n        (_a = me.annotations) == null || _a.addYaxisAnnotationExternal(opts, pushToMemory, me);\n    }\n    /**\n   * Adds a point annotation dynamically after render.\n   *\n   * @param {PointAnnotations} opts - Annotation configuration.\n   * @param {boolean} [pushToMemory=true] - When true, the annotation persists across re-renders.\n   * @param {ApexCharts} [context] - Override the target chart instance (used by exec()).\n   */ addPointAnnotation(opts, pushToMemory = true, context) {\n        var _a;\n        let me = /** @type {ApexCharts} */ /** @type {unknown} */ this;\n        if (context) me = context;\n        (_a = me.annotations) == null || _a.addPointAnnotationExternal(opts, pushToMemory, me);\n    }\n    /**\n   * Removes all annotations from the chart.\n   *\n   * @param {ApexCharts} [context] - Override the target chart instance (used by exec()).\n   */ clearAnnotations(context) {\n        var _a;\n        let me = /** @type {ApexCharts} */ /** @type {unknown} */ this;\n        if (context) me = context;\n        me.lastUpdateOptions = null;\n        (_a = me.annotations) == null || _a.clearAnnotations(me);\n    }\n    /**\n   * Removes a specific annotation by its `id`.\n   *\n   * @param {string} id - The annotation id as set in the annotation config.\n   * @param {ApexCharts} [context] - Override the target chart instance (used by exec()).\n   */ removeAnnotation(id, context) {\n        var _a;\n        let me = /** @type {ApexCharts} */ /** @type {unknown} */ this;\n        if (context) me = context;\n        me.lastUpdateOptions = null;\n        (_a = me.annotations) == null || _a.removeAnnotation(me, id);\n    }\n    /**\n   * Returns the inner SVG group element that contains all chart graphics.\n   *\n   * @returns {Element | null}\n   */ getChartArea() {\n        const el = this.w.dom.baseEl.querySelector(\".apexcharts-inner\");\n        return el;\n    }\n    /**\n   * Returns the sum of all data points whose x value falls within [minX, maxX].\n   *\n   * @param {number} minX\n   * @param {number} maxX\n   * @returns {number[]} One total per series.\n   */ getSeriesTotalXRange(minX, maxX) {\n        return this.coreUtils.getSeriesTotalsXRange(minX, maxX);\n    }\n    /**\n   * Returns the highest y value in the specified series.\n   *\n   * @param {number} [seriesIndex=0]\n   * @returns {number}\n   */ getHighestValueInSeries(seriesIndex = 0) {\n        const range = new $e4b487e979d7c06d$var$Range(this.w);\n        return range.getMinYMaxY(seriesIndex).highestY;\n    }\n    /**\n   * Returns the lowest y value in the specified series.\n   *\n   * @param {number} [seriesIndex=0]\n   * @returns {number}\n   */ getLowestValueInSeries(seriesIndex = 0) {\n        const range = new $e4b487e979d7c06d$var$Range(this.w);\n        return range.getMinYMaxY(seriesIndex).lowestY;\n    }\n    /**\n   * Returns the sum of each series (the totals used for percentage calculations).\n   *\n   * @returns {number[]}\n   */ getSeriesTotal() {\n        return this.w.globals.seriesTotals;\n    }\n    /**\n   * Returns a curated snapshot of chart state for use in formatters, events,\n   * and external integrations. Prefer this over accessing `chart.w` directly.\n   *\n   * The shape of this object is stable and versioned. `chart.w` is internal\n   * and will be restricted in a future major version.\n   */ getState() {\n        const w2 = this.w;\n        const gl = w2.globals;\n        return {\n            // Series data — computed/parsed form used for rendering\n            series: w2.seriesData.series,\n            seriesNames: w2.seriesData.seriesNames,\n            colors: gl.colors,\n            labels: w2.labelData.labels,\n            seriesTotals: gl.seriesTotals,\n            seriesPercent: gl.seriesPercent,\n            seriesXvalues: gl.seriesXvalues,\n            seriesYvalues: gl.seriesYvalues,\n            // Axis bounds — updated after each render\n            minX: gl.minX,\n            maxX: gl.maxX,\n            minY: gl.minY,\n            maxY: gl.maxY,\n            minYArr: gl.minYArr,\n            maxYArr: gl.maxYArr,\n            minXDiff: gl.minXDiff,\n            dataPoints: gl.dataPoints,\n            // Axis scale objects — computed tick/scale results\n            xAxisScale: gl.xAxisScale,\n            yAxisScale: gl.yAxisScale,\n            xTickAmount: gl.xTickAmount,\n            // Axis type flags\n            isXNumeric: w2.axisFlags.isXNumeric,\n            // Multi-axis series mapping\n            seriesYAxisMap: gl.seriesYAxisMap,\n            seriesYAxisReverseMap: gl.seriesYAxisReverseMap,\n            // Chart dimensions — updated after each render/resize\n            svgWidth: gl.svgWidth,\n            svgHeight: gl.svgHeight,\n            gridWidth: w2.layout.gridWidth,\n            gridHeight: w2.layout.gridHeight,\n            // Interactive state\n            selectedDataPoints: w2.interact.selectedDataPoints,\n            collapsedSeriesIndices: gl.collapsedSeriesIndices,\n            zoomed: w2.interact.zoomed,\n            // Chart-type-specific series data (null when not applicable)\n            seriesX: w2.seriesData.seriesX,\n            seriesZ: w2.seriesData.seriesZ,\n            seriesCandleO: w2.candleData.seriesCandleO,\n            seriesCandleH: w2.candleData.seriesCandleH,\n            seriesCandleM: w2.candleData.seriesCandleM,\n            seriesCandleL: w2.candleData.seriesCandleL,\n            seriesCandleC: w2.candleData.seriesCandleC,\n            seriesRangeStart: w2.rangeData.seriesRangeStart,\n            seriesRangeEnd: w2.rangeData.seriesRangeEnd,\n            seriesGoals: w2.seriesData.seriesGoals\n        };\n    }\n    /**\n   * Programmatically selects or deselects a data point.\n   * Equivalent to a user click on the data point.\n   *\n   * @param {number} seriesIndex - Zero-based series index.\n   * @param {number} [dataPointIndex] - Zero-based data point index within the series.\n   * @returns {number[][] | null} Updated selectedDataPoints array, or null.\n   */ toggleDataPointSelection(seriesIndex, dataPointIndex) {\n        return this.updateHelpers.toggleDataPointSelection(seriesIndex, dataPointIndex);\n    }\n    /**\n   * Programmatically zooms the x-axis to the given range.\n   * Requires zoom to be enabled (`chart.zoom.enabled: true`).\n   *\n   * @param {number} min - The minimum x value (timestamp or numeric).\n   * @param {number} max - The maximum x value (timestamp or numeric).\n   */ zoomX(min, max) {\n        var _a;\n        (_a = this.ctx.toolbar) == null || _a.zoomUpdateOptions(min, max);\n    }\n    /**\n   * Switches the active locale, updating all locale-dependent labels (toolbar tooltips, month names, etc.).\n   *\n   * @param {string} localeName - Must match a locale name defined in `chart.locales`.\n   */ setLocale(localeName) {\n        this.localization.setCurrentLocaleValues(localeName);\n    }\n    /**\n   * Exports the chart to a PNG or SVG data URI.\n   * Requires the Exports feature: `import 'apexcharts/features/exports'`.\n   *\n   * @param {{ scale?: number, width?: number }} [options]\n   * @returns {Promise<{ imgURI: string } | { blob: Blob }>}\n   */ dataURI(options2) {\n        if (!this.ctx.exports) throw new Error(\"apexcharts: Exports feature is not registered. Import apexcharts/features/exports.\");\n        return this.ctx.exports.dataURI(options2);\n    }\n    /**\n   * Returns the chart's SVG markup as a string, optionally scaled.\n   * Requires the Exports feature: `import 'apexcharts/features/exports'`.\n   *\n   * @param {number} [scale=1]\n   * @returns {Promise<string>}\n   */ getSvgString(scale) {\n        if (!this.ctx.exports) throw new Error(\"apexcharts: Exports feature is not registered. Import apexcharts/features/exports.\");\n        return this.ctx.exports.getSvgString(scale);\n    }\n    /**\n   * Triggers a CSV download of the chart's data.\n   * Requires the Exports feature: `import 'apexcharts/features/exports'`.\n   *\n   * @param {{ series?: any, fileName?: string, columnDelimiter?: string, lineDelimiter?: string }} [options]\n   */ exportToCSV(options2 = {}) {\n        if (!this.ctx.exports) throw new Error(\"apexcharts: Exports feature is not registered. Import apexcharts/features/exports.\");\n        return this.ctx.exports.exportToCSV(options2);\n    }\n    paper() {\n        return this.w.dom.Paper;\n    }\n    /**\n   * Returns the active series renderer for the last render: `'svg'` (default)\n   * or `'canvas'` (Strata #2). `'auto'`/`'canvas'` resolve to `'svg'` unless the\n   * canvas renderer feature is bundled and no canvas-unsupported feature is in\n   * use. See `chart.renderer` / `chart.rendererThreshold`.\n   *\n   * @returns {'svg' | 'canvas' | 'gpu'}\n   */ getActiveRenderer() {\n        return this.rendererController ? this.rendererController.getActiveKind() : \"svg\";\n    }\n    /**\n   * Facet (#13): re-resolve the `--apx-*` design tokens and re-render.\n   *\n   * Tokens are read from the CSS cascade once per render, so a runtime change\n   * that is NOT an OS color-scheme flip (e.g. the host app swaps its own\n   * design-system theme by toggling a class or setting style properties) is\n   * invisible until the next render, and `updateOptions({})` is memoized away.\n   * This busts the memo and re-renders, picking up the current token values.\n   * @returns {Promise<any>}\n   */ refreshTokens() {\n        this.lastUpdateOptions = null;\n        return this.update();\n    }\n    /**\n   * Drills into the child level referenced by `id` (a `chart.drilldown.series` entry).\n   * Requires the Drilldown feature: `import 'apexcharts/features/drilldown'`.\n   *\n   * @param {string|number} id - The drilldown series id to navigate into.\n   * @returns {Promise<ApexCharts>}\n   */ drillDown(id) {\n        if (!this.ctx.drilldown) throw new Error(\"apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.\");\n        return this.ctx.drilldown.drillDown(id);\n    }\n    /**\n   * Navigates back one drilldown level.\n   * Requires the Drilldown feature: `import 'apexcharts/features/drilldown'`.\n   *\n   * @returns {Promise<ApexCharts>}\n   */ drillUp() {\n        if (!this.ctx.drilldown) throw new Error(\"apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.\");\n        return this.ctx.drilldown.drillUp();\n    }\n    /**\n   * Navigates back to the root drilldown level.\n   * Requires the Drilldown feature: `import 'apexcharts/features/drilldown'`.\n   *\n   * @returns {Promise<ApexCharts>}\n   */ drillToRoot() {\n        if (!this.ctx.drilldown) throw new Error(\"apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.\");\n        return this.ctx.drilldown.drillToRoot();\n    }\n    /**\n   * Drops levels cached from `drilldown.onDrillDown`, so the next drill re-runs\n   * the resolver. Call it when the data behind an already-drilled chart changes.\n   * Requires the Drilldown feature: `import 'apexcharts/features/drilldown'`.\n   *\n   * @param {string|number} [id] - A single level id, or every level when omitted.\n   * @returns {ApexCharts}\n   */ clearDrilldownCache(id) {\n        if (!this.ctx.drilldown) throw new Error(\"apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.\");\n        return this.ctx.drilldown.clearCache(id);\n    }\n    // ─── Slice write-back stubs ─────────────────────────────────────────────────\n    /**\n   * Copy own DATA properties of a parse-state slice onto a live w.* slice.\n   * Never Object.assign here: several w.* fields (and, historically, snapshot\n   * fields) are lazy accessors, and [[Get]]-ing an accessor while copying\n   * forces its deferred computation (a deep initialSeries clone plus O(n)\n   * stacked-totals passes on every render/update) and can replace the live\n   * accessor with a materialized value for the life of the instance.\n   * @param {any} target\n   * @param {any} slice\n   */ static _writeDataProps(target, slice) {\n        for (const key of Object.keys(slice)){\n            const d = Object.getOwnPropertyDescriptor(slice, key);\n            if (d && \"value\" in d) target[key] = d.value;\n        }\n    }\n    /**\n   * @param {Partial<import('./types/internal').SeriesData>} slice\n   */ _writeParsedSeriesData(slice) {\n        _ApexCharts._writeDataProps(this.w.seriesData, slice);\n    }\n    /**\n   * @param {Partial<import('./types/internal').RangeData>} slice\n   */ _writeParsedRangeData(slice) {\n        _ApexCharts._writeDataProps(this.w.rangeData, slice);\n    }\n    /**\n   * @param {Partial<import('./types/internal').CandleData>} slice\n   */ _writeParsedCandleData(slice) {\n        _ApexCharts._writeDataProps(this.w.candleData, slice);\n    }\n    /**\n   * @param {Partial<import('./types/internal').LabelData>} slice\n   */ _writeParsedLabelData(slice) {\n        _ApexCharts._writeDataProps(this.w.labelData, slice);\n    }\n    /**\n   * @param {Partial<import('./types/internal').AxisFlags>} slice\n   */ _writeParsedAxisFlags(slice) {\n        _ApexCharts._writeDataProps(this.w.axisFlags, slice);\n    }\n    /**\n   * @param {Partial<import('./types/internal').LayoutCoords>} slice\n   */ _writeLayoutCoords(slice) {\n        _ApexCharts._writeDataProps(this.w.layout, slice);\n    }\n    _parentResizeCallback() {\n        if (this.w.globals.animationEnded && this.w.config.chart.redrawOnParentResize) this._windowResize();\n    }\n    /**\n   * Handle window resize and re-draw the whole chart.\n   */ _windowResize() {\n        this.w.globals.resizeTimer = window.setTimeout(()=>{\n            const gl = this.w.globals;\n            if (this.core && gl.lastResizeSignature) {\n                const sig = this.core.getResizeSignature();\n                if (sig.w === gl.lastResizeSignature.w && sig.h === gl.lastResizeSignature.h && sig.iw === gl.lastResizeSignature.iw) return;\n            }\n            gl.resized = true;\n            gl.dataChanged = false;\n            this.ctx.update();\n        }, 150);\n    }\n    _windowResizeHandler() {\n        var _a;\n        clearTimeout((_a = this.w.globals.resizeTimer) != null ? _a : void 0);\n        let { redrawOnWindowResize: redraw } = this.w.config.chart;\n        if (typeof redraw === \"function\") redraw = /** @type {any} */ redraw();\n        redraw && this._windowResize();\n    }\n};\n/**\n * Static Perspectives helpers (decode/fromURL), populated by the perspectives\n * feature when imported (`import 'apexcharts/features/perspectives'`); null\n * otherwise. Declared here as a placeholder so core stays free of the\n * Perspectives module while the assignment in the feature file type-checks.\n * @type {any}\n */ $e4b487e979d7c06d$var$__publicField($e4b487e979d7c06d$var$_ApexCharts, \"perspectives\", null);\nlet $e4b487e979d7c06d$export$2e2bcd8739ae039 = $e4b487e979d7c06d$var$_ApexCharts;\nclass $e4b487e979d7c06d$var$Exports {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n    }\n    /**\n   * @param {string} svgString\n   */ svgStringToNode(svgString) {\n        const parser = new DOMParser();\n        const svgDoc = parser.parseFromString(svgString, \"image/svg+xml\");\n        return svgDoc.documentElement;\n    }\n    /**\n   * @param {any} svg\n   * @param {number} scale\n   */ scaleSvgNode(svg, scale) {\n        const svgWidth = parseFloat(svg.getAttributeNS(null, \"width\"));\n        const svgHeight = parseFloat(svg.getAttributeNS(null, \"height\"));\n        svg.setAttributeNS(null, \"width\", svgWidth * scale);\n        svg.setAttributeNS(null, \"height\", svgHeight * scale);\n        svg.setAttributeNS(null, \"viewBox\", \"0 0 \" + svgWidth + \" \" + svgHeight);\n    }\n    /**\n   * Inline any Strata canvas series layer into the clone as an SVG `<image>`.\n   * A serialized `<canvas>` loses its bitmap, so a canvas-mode export would drop\n   * the series; an `<image>` carrying the canvas `toDataURL()` preserves it in\n   * place. Because it replaces the `<foreignObject>` at the same DOM position,\n   * the grid-behind / annotations-in-front z-order is retained automatically.\n   * No-op in SVG mode (no series canvas present).\n   * @param {any} clonedNode the cloned elWrap about to be serialized\n   */ inlineCanvasLayers(clonedNode) {\n        const w2 = this.w;\n        const XLINK = \"http://www.w3.org/1999/xlink\";\n        const origCanvases = w2.dom.elWrap.querySelectorAll(\".apexcharts-series-canvas\");\n        if (!origCanvases.length) return;\n        const clonedFOs = clonedNode.querySelectorAll(\".apexcharts-canvas-series\");\n        for(let i2 = 0; i2 < origCanvases.length && i2 < clonedFOs.length; i2++){\n            let dataURL;\n            try {\n                dataURL = /** @type {HTMLCanvasElement} */ origCanvases[i2].toDataURL();\n            } catch (e2) {\n                continue;\n            }\n            const fo = clonedFOs[i2];\n            const img = document.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"image\");\n            img.setAttribute(\"x\", fo.getAttribute(\"x\") || \"0\");\n            img.setAttribute(\"y\", fo.getAttribute(\"y\") || \"0\");\n            img.setAttribute(\"width\", fo.getAttribute(\"width\") || \"0\");\n            img.setAttribute(\"height\", fo.getAttribute(\"height\") || \"0\");\n            img.setAttribute(\"href\", dataURL);\n            img.setAttributeNS(XLINK, \"xlink:href\", dataURL);\n            if (fo.parentNode) fo.parentNode.replaceChild(img, fo);\n        }\n    }\n    /**\n   * `querySelectorAll` as a typed array. Both HTML and SVG elements carry\n   * `style` / `classList`, but `NodeListOf<Element>` does not.\n   * @param {ParentNode} root\n   * @param {string} selector\n   * @returns {Array<HTMLElement | SVGElement>}\n   */ queryStyleable(root, selector) {\n        return /** @type {Array<HTMLElement | SVGElement>} */ Array.prototype.slice.call(root.querySelectorAll(selector));\n    }\n    /**\n   * Applies `styles` only where the element has no inline value for that\n   * property yet.\n   *\n   * The rules being re-applied here came from a stylesheet, so anything a\n   * module set inline has to keep winning exactly like it does in the live\n   * DOM: `legend.fontSize` (Legend.js) and the heatmap gradient legend's\n   * deliberate `display`/`overflow`/`padding` overrides on the legend wrap\n   * (HeatmapGradientLegend.js) would otherwise be clobbered in the export.\n   * @param {HTMLElement | SVGElement} el\n   * @param {Record<string, string>} styles\n   */ setStyleDefaults(el, styles) {\n        Object.keys(styles).forEach((prop)=>{\n            if (el.style.getPropertyValue(prop) === \"\") el.style.setProperty(prop, styles[prop]);\n        });\n    }\n    /**\n   * Re-applies, as inline styles on the clone, the rules that used to reach\n   * the exported SVG through an injected `<style>` block. A strict\n   * Content-Security-Policy without `'unsafe-inline'` blocks that block and\n   * breaks the export, so the export must not depend on one. See #5146.\n   *\n   * Mirrors `src/assets/apexcharts-legend.css`. Interaction-only rules\n   * (`cursor`, `pointer-events`) are carried over for parity even though they\n   * do nothing in a static image; the layout rules are what matter.\n   * @param {HTMLElement} clonedNode the cloned elWrap about to be serialized\n   */ applyExportStyles(clonedNode) {\n        const w2 = this.w;\n        this.queryStyleable(clonedNode, \"style\").forEach((el)=>el.remove());\n        this.queryStyleable(clonedNode, [\n            \".apexcharts-tooltip\",\n            \".apexcharts-toolbar\",\n            \".apexcharts-xaxistooltip\",\n            \".apexcharts-yaxistooltip\",\n            \".apexcharts-xcrosshairs\",\n            \".apexcharts-ycrosshairs\",\n            \".apexcharts-zoom-rect\",\n            \".apexcharts-selection-rect\"\n        ].join(\", \")).forEach((el)=>{\n            el.style.setProperty(\"display\", \"none\", \"important\");\n        });\n        this.queryStyleable(clonedNode, \".apexcharts-flip-y\").forEach((el)=>{\n            this.setStyleDefaults(el, {\n                transform: \"scaleY(-1) translateY(-100%)\",\n                \"transform-origin\": \"top\",\n                \"transform-box\": \"fill-box\"\n            });\n        });\n        this.queryStyleable(clonedNode, \".apexcharts-flip-x\").forEach((el)=>{\n            this.setStyleDefaults(el, {\n                transform: \"scaleX(-1)\",\n                \"transform-origin\": \"center\",\n                \"transform-box\": \"fill-box\"\n            });\n        });\n        if (!w2.config.legend.show || !w2.dom.elLegendWrap || !w2.dom.elLegendWrap.children.length) return;\n        this.queryStyleable(clonedNode, \".apexcharts-legend\").forEach((el)=>{\n            this.setStyleDefaults(el, {\n                display: \"flex\",\n                overflow: \"auto\",\n                padding: \"0 10px\"\n            });\n            const cl = el.classList;\n            const isSide = cl.contains(\"apx-legend-position-left\") || cl.contains(\"apx-legend-position-right\");\n            const isTopOrBottom = cl.contains(\"apx-legend-position-top\") || cl.contains(\"apx-legend-position-bottom\");\n            if (cl.contains(\"apexcharts-legend-group-horizontal\")) this.setStyleDefaults(el, {\n                \"flex-direction\": \"column\"\n            });\n            if (isSide) this.setStyleDefaults(el, {\n                \"flex-direction\": \"column\",\n                bottom: \"0\"\n            });\n            if (isTopOrBottom) this.setStyleDefaults(el, {\n                \"flex-wrap\": \"wrap\"\n            });\n            if (isSide || isTopOrBottom && cl.contains(\"apexcharts-align-left\")) this.setStyleDefaults(el, {\n                \"justify-content\": \"flex-start\",\n                \"align-items\": \"flex-start\"\n            });\n            else if (isTopOrBottom && cl.contains(\"apexcharts-align-center\")) this.setStyleDefaults(el, {\n                \"justify-content\": \"center\",\n                \"align-items\": \"center\"\n            });\n            else if (isTopOrBottom && cl.contains(\"apexcharts-align-right\")) this.setStyleDefaults(el, {\n                \"justify-content\": \"flex-end\",\n                \"align-items\": \"flex-end\"\n            });\n        });\n        this.queryStyleable(clonedNode, \".apexcharts-legend-group\").forEach((el)=>{\n            this.setStyleDefaults(el, {\n                display: \"flex\"\n            });\n        });\n        this.queryStyleable(clonedNode, \".apexcharts-legend-group-vertical\").forEach((el)=>{\n            this.setStyleDefaults(el, {\n                \"flex-direction\": \"column-reverse\"\n            });\n        });\n        this.queryStyleable(clonedNode, \".apexcharts-legend-series\").forEach((el)=>{\n            this.setStyleDefaults(el, {\n                cursor: el.classList.contains(\"apexcharts-no-click\") ? \"auto\" : \"pointer\",\n                \"line-height\": \"normal\",\n                display: \"flex\",\n                \"align-items\": \"center\"\n            });\n        });\n        this.queryStyleable(clonedNode, \".apexcharts-legend-text\").forEach((el)=>{\n            this.setStyleDefaults(el, {\n                position: \"relative\",\n                \"font-size\": \"14px\"\n            });\n        });\n        this.queryStyleable(clonedNode, \".apexcharts-legend-marker\").forEach((el)=>{\n            this.setStyleDefaults(el, {\n                position: \"relative\",\n                display: \"flex\",\n                \"align-items\": \"center\",\n                \"justify-content\": \"center\",\n                cursor: \"pointer\",\n                \"margin-right\": \"1px\"\n            });\n        });\n        this.queryStyleable(clonedNode, \".apexcharts-inactive-legend\").forEach((el)=>{\n            this.setStyleDefaults(el, {\n                opacity: \"0.45\"\n            });\n        });\n        this.queryStyleable(clonedNode, \".apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series\").forEach((el)=>{\n            el.style.setProperty(\"display\", \"none\", \"important\");\n        });\n    }\n    /**\n   * The colour a raster export paints under the chart.\n   *\n   * A PNG needs an opaque base, so `dataURI` fills the canvas before drawing\n   * the SVG onto it. That fill used to be `#fff` whenever `chart.background`\n   * was unset *or* `'transparent'`, which is wrong for a dark theme:\n   * `theme.mode: 'dark'` moves `chart.foreColor` to a near-white `#f6f7f8` but\n   * leaves the background alone, so `background: 'transparent'` produced\n   * near-white labels, axes and legend on white — a PNG that looked like it had\n   * lost all its text. See #2920.\n   *\n   * The unset-background case was already covered: `Core.setupElements` paints\n   * the SVG paper `#343A3F` for a dark theme, and the clone carries that inline\n   * style into the export. `'transparent'` is the gap, because it makes that\n   * paper style transparent too and nothing is left to cover the white fill.\n   *\n   * An explicit non-transparent `chart.background` still wins, including one\n   * written by the Facet `--apx-surface` token (Theme assigns it into the same\n   * field).\n   * @returns {string}\n   */ resolveExportBackground() {\n        const w2 = this.w;\n        const bg = w2.config.chart.background;\n        if (bg && bg !== \"transparent\") return bg;\n        return w2.config.theme.mode === \"dark\" ? \"#343A3F\" : \"#fff\";\n    }\n    /**\n   * Font families the rendered chart actually paints with.\n   *\n   * Read off the live DOM rather than the config: computed styles resolve\n   * `chart.fontFamily`, every per-element `style.fontFamily` override, and any\n   * family the chart inherits from the page, none of which are reliably\n   * enumerable from config alone. The clone is not in the document, so its\n   * computed styles would come back empty.\n   * @returns {Set<string>}\n   */ collectFontFamilies() {\n        const families = /* @__PURE__ */ new Set();\n        const w2 = this.w;\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser() || !w2.dom.elWrap) return families;\n        const els = this.queryStyleable(w2.dom.elWrap, \"text, tspan, .apexcharts-legend-text, .apexcharts-title-text, .apexcharts-subtitle-text\");\n        const all = [\n            w2.dom.elWrap,\n            ...els\n        ];\n        all.forEach((el)=>{\n            const cs = /** @type {any} */ $e4b487e979d7c06d$var$BrowserAPIs.getComputedStyle(/** @type {any} */ el);\n            const ff = cs && cs.fontFamily;\n            if (!ff) return;\n            ff.split(\",\").forEach((name2)=>{\n                const clean = name2.trim().replace(/^['\"]|['\"]$/g, \"\");\n                if (clean) families.add(clean.toLowerCase());\n            });\n        });\n        return families;\n    }\n    /**\n   * Every `@font-face` rule reachable from the document, as `{ family, css }`.\n   *\n   * Same-origin sheets are read through `cssRules`. A cross-origin sheet throws\n   * on that access, so it is re-fetched by href and its `@font-face` blocks are\n   * pulled out of the text: that is the path that matters in practice, since\n   * hosted webfonts (the subject of #3617) are exactly the cross-origin case.\n   * @returns {Promise<Array<{family: string, css: string}>>}\n   */ collectFontFaceRules() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return Promise.resolve([]);\n        const found = [];\n        const remote = [];\n        const pushFromText = (cssText)=>{\n            const blocks = cssText.match(/@font-face\\s*\\{[^}]*\\}/gi) || [];\n            blocks.forEach((css)=>{\n                const m2 = css.match(/font-family\\s*:\\s*([^;}]+)/i);\n                if (!m2) return;\n                const family = m2[1].trim().replace(/^['\"]|['\"]$/g, \"\");\n                found.push({\n                    family: family.toLowerCase(),\n                    css: css\n                });\n            });\n        };\n        const sheets = Array.from(document.styleSheets || []);\n        sheets.forEach((sheet)=>{\n            let rules = null;\n            try {\n                rules = sheet.cssRules;\n            } catch (e2) {\n                rules = null;\n            }\n            if (rules) {\n                Array.from(rules).forEach((rule)=>{\n                    if (rule.type === 5 && rule.cssText) pushFromText(rule.cssText);\n                });\n                return;\n            }\n            if (sheet.href) remote.push(fetch(sheet.href).then((r2)=>r2.ok ? r2.text() : \"\").then(pushFromText).catch(()=>{}));\n        });\n        return Promise.all(remote).then(()=>found);\n    }\n    /**\n   * Inline the `@font-face` rules for the families the chart uses, with the\n   * font files themselves as base64 data URIs, into the exported SVG.\n   *\n   * Needed because the export is a standalone document: rasterizing it through\n   * `<img src=\"data:image/svg+xml,...\">` gives it no access to the page's\n   * stylesheets *or* its loaded fonts, and an SVG-as-image may not fetch\n   * external resources at all. Without this the text silently reflows into a\n   * generic fallback face. See #3617.\n   *\n   * `@font-face` only exists as a stylesheet construct, so unlike the rules in\n   * `applyExportStyles` this cannot be expressed as inline styles and has to\n   * ship as a `<style>` element. A page whose CSP forbids inline styles will\n   * drop it and fall back to today's behaviour, which is why the whole thing is\n   * best-effort: any failure leaves the export exactly as it was.\n   * @param {any} svgNode the parsed outer <svg> about to be serialized\n   * @returns {Promise<void>}\n   */ embedFonts(svgNode) {\n        const w2 = this.w;\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser() || !w2.config.chart.toolbar.export.embedFonts || typeof fetch !== \"function\") return Promise.resolve();\n        const used = this.collectFontFamilies();\n        if (!used.size) return Promise.resolve();\n        return this.collectFontFaceRules().then((faces)=>{\n            const wanted = faces.filter((f)=>used.has(f.family));\n            if (!wanted.length) return Promise.resolve([]);\n            return Promise.all(wanted.map((face)=>this.inlineFontFaceUrls(face.css).catch(()=>null)));\n        }).then((cssBlocks)=>{\n            const css = (cssBlocks || []).filter(Boolean).join(\"\\n\");\n            if (!css) return;\n            const style = document.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"style\");\n            style.textContent = css;\n            svgNode.insertBefore(style, svgNode.firstChild);\n        }).catch(()=>{});\n    }\n    /**\n   * Replace every remote `url(...)` in one `@font-face` block with a base64\n   * data URI. Resolves to null if no url could be fetched, so the caller can\n   * drop a block that would only reference unreachable files.\n   * @param {string} css\n   * @returns {Promise<string | null>}\n   */ inlineFontFaceUrls(css) {\n        const urls = [];\n        const re = /url\\(\\s*(['\"]?)([^'\")]+)\\1\\s*\\)/gi;\n        let m2;\n        while((m2 = re.exec(css)) !== null)if (!m2[2].startsWith(\"data:\")) urls.push(m2[2]);\n        if (!urls.length) return Promise.resolve(css.includes(\"data:\") ? css : null);\n        return Promise.all(urls.map((url)=>this.fetchAsDataUri(url).then((dataUri)=>({\n                    url: url,\n                    dataUri: dataUri\n                })).catch(()=>({\n                    url: url,\n                    dataUri: null\n                })))).then((results)=>{\n            let out = css;\n            let replaced = 0;\n            results.forEach(({ url: url, dataUri: dataUri })=>{\n                if (!dataUri) return;\n                out = out.split(url).join(dataUri);\n                replaced++;\n            });\n            return replaced ? out : null;\n        });\n    }\n    /**\n   * Fetch a binary asset as a base64 data URI.\n   *\n   * Uses `fetch` rather than the `<img>`+canvas route in `getBase64FromUrl`:\n   * that route only works for raster images and taints the canvas for any\n   * response without CORS headers, whereas this works for fonts too and fails\n   * cleanly when CORS denies it.\n   * @param {string} url\n   * @returns {Promise<string>}\n   */ fetchAsDataUri(url) {\n        if (typeof fetch !== \"function\" || typeof btoa !== \"function\") return Promise.reject(new Error(\"fetch unavailable\"));\n        return fetch(url).then((res)=>{\n            if (!res.ok) throw new Error(`HTTP ${res.status} for ${url}`);\n            const type = res.headers.get(\"content-type\") || \"application/octet-stream\";\n            return res.arrayBuffer().then((buf)=>{\n                const bytes = new Uint8Array(buf);\n                let binary = \"\";\n                const CHUNK = 32768;\n                for(let i2 = 0; i2 < bytes.length; i2 += CHUNK)binary += String.fromCharCode.apply(null, /** @type {any} */ bytes.subarray(i2, i2 + CHUNK));\n                return `data:${type};base64,${btoa(binary)}`;\n            });\n        });\n    }\n    /**\n   * @param {number} [_scale]\n   */ getSvgString(_scale) {\n        return new Promise((resolve)=>{\n            const w2 = this.w;\n            let scale = _scale || w2.config.chart.toolbar.export.scale || w2.config.chart.toolbar.export.width / w2.globals.svgWidth;\n            if (!scale) scale = 1;\n            const width = w2.globals.svgWidth * scale;\n            const height = w2.globals.svgHeight * scale;\n            const clonedNode = /** @type {HTMLElement} */ w2.dom.elWrap.cloneNode(true);\n            clonedNode.style.width = width + \"px\";\n            clonedNode.style.height = height + \"px\";\n            this.inlineCanvasLayers(clonedNode);\n            this.applyExportStyles(clonedNode);\n            const serializedNode = new XMLSerializer().serializeToString(clonedNode);\n            let svgString = `\n        <svg xmlns=\"http://www.w3.org/2000/svg\"\n          version=\"1.1\"\n          xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n          class=\"apexcharts-svg\"\n          xmlns:data=\"ApexChartsNS\"\n          transform=\"translate(0, 0)\"\n          width=\"${w2.globals.svgWidth}px\" height=\"${w2.globals.svgHeight}px\">\n          <foreignObject width=\"100%\" height=\"100%\">\n            <div xmlns=\"http://www.w3.org/1999/xhtml\" style=\"width:${width}px; height:${height}px;\">\n              ${serializedNode}\n            </div>\n          </foreignObject>\n        </svg>\n      `;\n            const svgNode = this.svgStringToNode(svgString);\n            if (scale !== 1) this.scaleSvgNode(svgNode, scale);\n            Promise.all([\n                this.convertImagesToBase64(svgNode),\n                this.embedFonts(svgNode)\n            ]).then(()=>{\n                svgString = new XMLSerializer().serializeToString(svgNode);\n                resolve(svgString.replace(/&nbsp;/g, \"&#160;\"));\n            });\n        });\n    }\n    /**\n   * Turn every remote `<image>` in the export into an inline data URI.\n   *\n   * This is not an optimisation: an SVG rasterized through `<img src=\"data:...\">`\n   * is not allowed to fetch external resources, so any href left pointing at a\n   * URL vanishes from the PNG entirely. Image annotations and `hollow.image`\n   * were disappearing from downloads for exactly this reason. See #3170.\n   *\n   * Two things were missing before. `SVGContainer.image()` writes `xlink:href`,\n   * but Strata's inlined canvas layers and hand-authored `customSVG` markup use\n   * the plain `href` form, and only the namespaced attribute was being read.\n   * And conversion went through `<img>`+canvas, which taints (and therefore\n   * throws) for any response without CORS headers, so a cross-origin icon,\n   * the common case, silently failed. `fetch` is tried first and only falls\n   * back to the canvas route, which still helps for a same-origin image on a\n   * page whose CSP blocks `connect-src`.\n   * @param {any} svgNode\n   */ convertImagesToBase64(svgNode) {\n        const XLINK = \"http://www.w3.org/1999/xlink\";\n        const images = svgNode.getElementsByTagName(\"image\");\n        const promises = Array.from(images).map((img)=>{\n            const nsHref = img.getAttributeNS(XLINK, \"href\");\n            const plainHref = img.getAttribute(\"href\");\n            const href = nsHref || plainHref;\n            if (!href || href.startsWith(\"data:\")) return Promise.resolve();\n            const write = (base64)=>{\n                if (nsHref) img.setAttributeNS(XLINK, \"href\", base64);\n                if (plainHref || !nsHref) img.setAttribute(\"href\", base64);\n            };\n            return this.fetchAsDataUri(href).then(write).catch(()=>this.getBase64FromUrl(href).then(write).catch((error)=>{\n                    console.error(\"Error converting image to base64:\", error);\n                }));\n        });\n        return Promise.all(promises);\n    }\n    /**\n   * @param {string} url\n   */ getBase64FromUrl(url) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return Promise.resolve(url);\n        return new Promise((resolve, reject)=>{\n            const img = new Image();\n            img.crossOrigin = \"Anonymous\";\n            img.onload = ()=>{\n                const canvas = document.createElement(\"canvas\");\n                canvas.width = img.width;\n                canvas.height = img.height;\n                const ctx = canvas.getContext(\"2d\");\n                if (ctx) ctx.drawImage(img, 0, 0);\n                resolve(canvas.toDataURL());\n            };\n            img.onerror = reject;\n            img.src = url;\n        });\n    }\n    svgUrl() {\n        return new Promise((resolve)=>{\n            this.getSvgString().then((svgData)=>{\n                const svgBlob = new Blob([\n                    svgData\n                ], {\n                    type: \"image/svg+xml;charset=utf-8\"\n                });\n                resolve(URL.createObjectURL(svgBlob));\n            });\n        });\n    }\n    /**\n   * @param {Record<string, any> | undefined} options\n   */ dataURI(options2) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return Promise.resolve({\n            imgURI: \"\"\n        });\n        return new Promise((resolve)=>{\n            const w2 = this.w;\n            const scale = options2 ? options2.scale || options2.width / w2.globals.svgWidth : 1;\n            const canvas = document.createElement(\"canvas\");\n            canvas.width = w2.globals.svgWidth * scale;\n            canvas.height = parseInt(w2.dom.elWrap.style.height, 10) * scale;\n            const canvasBg = this.resolveExportBackground();\n            const ctx = canvas.getContext(\"2d\");\n            if (!ctx) return;\n            ctx.fillStyle = canvasBg;\n            ctx.fillRect(0, 0, canvas.width, canvas.height);\n            this.getSvgString(scale).then((svgData)=>{\n                const svgUrl = \"data:image/svg+xml,\" + encodeURIComponent(svgData);\n                const img = new Image();\n                img.crossOrigin = \"anonymous\";\n                img.onload = ()=>{\n                    ctx.drawImage(img, 0, 0);\n                    const edgeCanvas = canvas;\n                    if (edgeCanvas.msToBlob) {\n                        const blob = edgeCanvas.msToBlob();\n                        resolve({\n                            blob: blob\n                        });\n                    } else {\n                        const imgURI = canvas.toDataURL(\"image/png\");\n                        resolve({\n                            imgURI: imgURI\n                        });\n                    }\n                };\n                img.src = svgUrl;\n            });\n        });\n    }\n    exportToSVG() {\n        this.svgUrl().then((url)=>{\n            this.triggerDownload(url, this.w.config.chart.toolbar.export.svg.filename, \".svg\");\n        });\n    }\n    exportToPng() {\n        const scale = this.w.config.chart.toolbar.export.scale;\n        const width = this.w.config.chart.toolbar.export.width;\n        const option = scale ? {\n            scale: scale\n        } : width ? {\n            width: width\n        } : void 0;\n        this.dataURI(option).then(({ imgURI: imgURI, blob: blob })=>{\n            if (blob) navigator.msSaveOrOpenBlob(blob, this.w.globals.chartID + \".png\");\n            else this.triggerDownload(imgURI, this.w.config.chart.toolbar.export.png.filename, \".png\");\n        });\n    }\n    /** @param {{ series?: any, fileName?: any, columnDelimiter?: string, lineDelimiter?: string }} opts */ exportToCSV({ series: series, fileName: fileName, columnDelimiter: columnDelimiter = \",\", lineDelimiter: lineDelimiter = \"\\n\" }) {\n        const w2 = this.w;\n        if (!series) series = w2.config.series;\n        let columns = [];\n        const rows = [];\n        let result = \"\";\n        const universalBOM = \"\\uFEFF\";\n        const gSeries = w2.seriesData.series.map((s2, i2)=>{\n            return w2.globals.collapsedSeriesIndices.indexOf(i2) === -1 ? s2 : [];\n        });\n        const csvSafe = (val)=>{\n            if (val == null || $e4b487e979d7c06d$var$Utils$1.isNumber(val)) return val;\n            const s2 = String(val);\n            return /^[=+\\-@\\t\\r]/.test(s2) ? `'${s2}` : s2;\n        };\n        const getFormattedCategory = (cat)=>{\n            if (typeof w2.config.chart.toolbar.export.csv.categoryFormatter === \"function\") return w2.config.chart.toolbar.export.csv.categoryFormatter(cat);\n            if (w2.config.xaxis.type === \"datetime\" && String(cat).length >= 10) return new Date(cat).toDateString();\n            return $e4b487e979d7c06d$var$Utils$1.isNumber(cat) ? cat : csvSafe(cat.split(columnDelimiter).join(\"\"));\n        };\n        const getFormattedValue = (value)=>{\n            return typeof w2.config.chart.toolbar.export.csv.valueFormatter === \"function\" ? w2.config.chart.toolbar.export.csv.valueFormatter(value) : csvSafe(value);\n        };\n        const seriesMaxDataLength = Math.max(...series.map((s2)=>{\n            return s2.data ? s2.data.length : 0;\n        }));\n        const dataFormat = new $e4b487e979d7c06d$var$Data(this.w);\n        const axesUtils = new $e4b487e979d7c06d$var$AxesUtils(this.w, {\n            theme: this.ctx.theme,\n            timeScale: this.ctx.timeScale\n        });\n        const getCat = (i2)=>{\n            let cat = \"\";\n            if (!w2.globals.axisCharts) cat = w2.config.labels[i2];\n            else {\n                if (w2.config.xaxis.type === \"category\" || w2.config.xaxis.convertedCatToNumeric) {\n                    if (w2.globals.isBarHorizontal) {\n                        const lbFormatter = w2.formatters.yLabelFormatters[0];\n                        const sr = new $e4b487e979d7c06d$var$Series(this.ctx.w);\n                        const activeSeries = sr.getActiveConfigSeriesIndex();\n                        cat = lbFormatter(w2.labelData.labels[i2], {\n                            seriesIndex: activeSeries,\n                            dataPointIndex: i2,\n                            w: w2\n                        });\n                    } else cat = axesUtils.getLabel(w2.labelData.labels, w2.labelData.timescaleLabels, 0, i2).text;\n                }\n                if (w2.config.xaxis.type === \"datetime\") {\n                    if (w2.config.xaxis.categories.length) cat = w2.config.xaxis.categories[i2];\n                    else if (w2.config.labels.length) cat = w2.config.labels[i2];\n                }\n            }\n            if (cat === null) return \"nullvalue\";\n            if (Array.isArray(cat)) cat = cat.join(\" \");\n            return $e4b487e979d7c06d$var$Utils$1.isNumber(cat) ? cat : cat.split(columnDelimiter).join(\"\");\n        };\n        const getEmptyDataForCsvColumn = ()=>{\n            return [\n                ...Array(seriesMaxDataLength)\n            ].map(()=>\"\");\n        };\n        const handleAxisRowsColumns = (s2, sI)=>{\n            var _a, _b, _c, _d, _e, _f;\n            if (columns.length && sI === 0) rows.push(columns.join(columnDelimiter));\n            if (s2.data) {\n                const rowData = s2.data.length ? s2.data : getEmptyDataForCsvColumn();\n                for(let i2 = 0; i2 < rowData.length; i2++){\n                    columns = [];\n                    let cat = getCat(i2);\n                    if (cat === \"nullvalue\") continue;\n                    if (!cat) {\n                        if (dataFormat.isFormatXY()) cat = series[sI].data[i2].x;\n                        else if (dataFormat.isFormat2DArray()) cat = series[sI].data[i2] ? series[sI].data[i2][0] : \"\";\n                    }\n                    if (sI === 0) {\n                        columns.push(getFormattedCategory(cat));\n                        for(let ci = 0; ci < w2.seriesData.series.length; ci++){\n                            const value = dataFormat.isFormatXY() ? (_a = series[ci].data[i2]) == null ? void 0 : _a.y : gSeries[ci][i2];\n                            columns.push(getFormattedValue(value));\n                        }\n                    }\n                    if (w2.config.chart.type === \"candlestick\" || s2.type && s2.type === \"candlestick\") {\n                        columns.pop();\n                        columns.push(w2.candleData.seriesCandleO[sI][i2]);\n                        columns.push(w2.candleData.seriesCandleH[sI][i2]);\n                        columns.push(w2.candleData.seriesCandleL[sI][i2]);\n                        columns.push(w2.candleData.seriesCandleC[sI][i2]);\n                    }\n                    if (w2.config.chart.type === \"boxPlot\" || s2.type && s2.type === \"boxPlot\") {\n                        columns.pop();\n                        columns.push(w2.candleData.seriesCandleO[sI][i2]);\n                        columns.push(w2.candleData.seriesCandleH[sI][i2]);\n                        columns.push(w2.candleData.seriesCandleM[sI][i2]);\n                        columns.push(w2.candleData.seriesCandleL[sI][i2]);\n                        columns.push(w2.candleData.seriesCandleC[sI][i2]);\n                    }\n                    if (w2.config.chart.type === \"rangeBar\") {\n                        columns.pop();\n                        columns.push(w2.rangeData.seriesRangeStart[sI][i2]);\n                        columns.push(w2.rangeData.seriesRangeEnd[sI][i2]);\n                    }\n                    if (w2.config.chart.type === \"violin\" || s2.type && s2.type === \"violin\") {\n                        columns.pop();\n                        columns.push((_b = w2.violinData.seriesViolinMin[sI]) == null ? void 0 : _b[i2]);\n                        columns.push((_c = w2.violinData.seriesViolinMax[sI]) == null ? void 0 : _c[i2]);\n                        columns.push((_f = (_e = (_d = w2.violinData.seriesViolinPoints[sI]) == null ? void 0 : _d[i2]) == null ? void 0 : _e.length) != null ? _f : 0);\n                    }\n                    if (columns.length) rows.push(columns.join(columnDelimiter));\n                }\n            }\n        };\n        const handleUnequalXValues = ()=>{\n            const categories = /* @__PURE__ */ new Set();\n            const data = {};\n            series.forEach((s2, sI)=>{\n                s2 == null || s2.data.forEach((dataItem)=>{\n                    let cat, value;\n                    if (dataFormat.isFormatXY()) {\n                        cat = dataItem.x;\n                        value = dataItem.y;\n                    } else if (dataFormat.isFormat2DArray()) {\n                        cat = dataItem[0];\n                        value = dataItem[1];\n                    } else return;\n                    if (!/** @type {Record<string,any>} */ data[cat]) data[cat] = Array(series.length).fill(\"\");\n                    data[cat][sI] = getFormattedValue(value);\n                    categories.add(cat);\n                });\n            });\n            if (columns.length) rows.push(columns.join(columnDelimiter));\n            Array.from(categories).sort().forEach((cat)=>{\n                const values = /** @type {Record<string,any>} */ data[cat];\n                rows.push([\n                    getFormattedCategory(cat),\n                    ...values\n                ].join(columnDelimiter));\n            });\n        };\n        columns.push(w2.config.chart.toolbar.export.csv.headerCategory);\n        if (w2.config.chart.type === \"boxPlot\") {\n            columns.push(\"minimum\");\n            columns.push(\"q1\");\n            columns.push(\"median\");\n            columns.push(\"q3\");\n            columns.push(\"maximum\");\n        } else if (w2.config.chart.type === \"candlestick\") {\n            columns.push(\"open\");\n            columns.push(\"high\");\n            columns.push(\"low\");\n            columns.push(\"close\");\n        } else if (w2.config.chart.type === \"rangeBar\") {\n            columns.push(\"minimum\");\n            columns.push(\"maximum\");\n        } else if (w2.config.chart.type === \"violin\") {\n            columns.push(\"minimum\");\n            columns.push(\"maximum\");\n            columns.push(\"observations\");\n        } else series.map((s2, sI)=>{\n            const sname = (s2.name ? s2.name : `series-${sI}`) + \"\";\n            if (w2.globals.axisCharts) columns.push(sname.split(columnDelimiter).join(\"\") ? sname.split(columnDelimiter).join(\"\") : `series-${sI}`);\n        });\n        if (!w2.globals.axisCharts) {\n            columns.push(w2.config.chart.toolbar.export.csv.headerValue);\n            rows.push(columns.join(columnDelimiter));\n        }\n        if (!w2.globals.allSeriesHasEqualX && w2.globals.axisCharts && !w2.config.xaxis.categories.length && !w2.config.labels.length) handleUnequalXValues();\n        else series.map((s2, sI)=>{\n            if (w2.globals.axisCharts) handleAxisRowsColumns(s2, sI);\n            else {\n                columns = [];\n                columns.push(getFormattedCategory(w2.labelData.labels[sI]));\n                columns.push(getFormattedValue(gSeries[sI]));\n                rows.push(columns.join(columnDelimiter));\n            }\n        });\n        result += rows.join(lineDelimiter);\n        this.triggerDownload(\"data:text/csv; charset=utf-8,\" + encodeURIComponent(universalBOM + result), fileName ? fileName : w2.config.chart.toolbar.export.csv.filename, \".csv\");\n    }\n    /**\n   * @param {string} href\n   * @param {string} filename\n   * @param {string} ext\n   */ triggerDownload(href, filename, ext) {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return;\n        const downloadLink = document.createElement(\"a\");\n        downloadLink.href = href;\n        downloadLink.download = (filename ? filename : this.w.globals.chartID) + ext;\n        document.body.appendChild(downloadLink);\n        downloadLink.click();\n        document.body.removeChild(downloadLink);\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    exports: $e4b487e979d7c06d$var$Exports\n});\nconst $e4b487e979d7c06d$var$apexchartsLegendCSS = \".apexcharts-flip-y {\\n  transform: scaleY(-1) translateY(-100%);\\n  transform-origin: top;\\n  transform-box: fill-box;\\n}\\n.apexcharts-flip-x {\\n  transform: scaleX(-1);\\n  transform-origin: center;\\n  transform-box: fill-box;\\n}\\n.apexcharts-legend {\\n  display: flex;\\n  overflow: auto;\\n  padding: 0 10px;\\n}\\n.apexcharts-legend.apexcharts-legend-group-horizontal {\\n  flex-direction: column;\\n}\\n.apexcharts-legend-group {\\n  display: flex;\\n}\\n.apexcharts-legend-group-vertical {\\n  flex-direction: column-reverse;\\n}\\n.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\\n  flex-wrap: wrap\\n}\\n.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\\n  flex-direction: column;\\n  bottom: 0;\\n}\\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\\n  justify-content: flex-start;\\n  align-items: flex-start;\\n}\\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\\n  justify-content: center;\\n  align-items: center;\\n}\\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\\n  justify-content: flex-end;\\n  align-items: flex-end;\\n}\\n.apexcharts-legend-series {\\n  cursor: pointer;\\n  line-height: normal;\\n  display: flex;\\n  align-items: center;\\n}\\n.apexcharts-legend-text {\\n  position: relative;\\n  font-size: 14px;\\n}\\n.apexcharts-legend-text *, .apexcharts-legend-marker * {\\n  pointer-events: none;\\n}\\n.apexcharts-legend-marker {\\n  position: relative;\\n  display: flex;\\n  align-items: center;\\n  justify-content: center;\\n  cursor: pointer;\\n  margin-right: 1px;\\n}\\n\\n.apexcharts-legend-series.apexcharts-no-click {\\n  cursor: auto;\\n}\\n.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\\n  display: none !important;\\n}\\n.apexcharts-inactive-legend {\\n  opacity: 0.45;\\n} \";\nlet $e4b487e979d7c06d$var$Helpers$3 = class Helpers2 {\n    /**\n   * @param {import('./Legend').default} lgCtx\n   */ constructor(lgCtx){\n        this.w = lgCtx.w;\n        this.lgCtx = lgCtx;\n    }\n    getLegendStyles() {\n        if ($e4b487e979d7c06d$var$Environment.isSSR()) return null;\n        const stylesheet = document.createElement(\"style\");\n        stylesheet.setAttribute(\"type\", \"text/css\");\n        const nonce = this.w.config.chart.nonce;\n        if (nonce) stylesheet.setAttribute(\"nonce\", nonce);\n        const rule = document.createTextNode($e4b487e979d7c06d$var$apexchartsLegendCSS);\n        stylesheet.appendChild(rule);\n        return stylesheet;\n    }\n    getLegendDimensions() {\n        const w2 = this.w;\n        const currLegendsWrap = w2.dom.baseEl.querySelector(\".apexcharts-legend\");\n        if (!currLegendsWrap) return {\n            clwh: 0,\n            clww: 0\n        };\n        const { width: currLegendsWrapWidth, height: currLegendsWrapHeight } = currLegendsWrap.getBoundingClientRect();\n        return {\n            clwh: currLegendsWrapHeight,\n            clww: currLegendsWrapWidth\n        };\n    }\n    appendToForeignObject() {\n        var _a;\n        const legendStyles = this.getLegendStyles();\n        if (this.w.config.chart.injectStyleSheet !== false && legendStyles) (_a = this.w.dom.elLegendForeign) == null || _a.appendChild(legendStyles);\n    }\n    /**\n   * @param {number} seriesCnt\n   * @param {boolean} isHidden\n   */ toggleDataSeries(seriesCnt, isHidden) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        if (w2.globals.axisCharts || w2.config.chart.type === \"radialBar\") {\n            w2.globals.resized = true;\n            let seriesEl = null;\n            let realIndex = null;\n            w2.globals.risingSeries = [];\n            if (w2.globals.axisCharts) {\n                seriesEl = (_a = Array.prototype.find.call(w2.dom.baseEl.querySelectorAll(\".apexcharts-series\"), (el)=>el.getAttribute(\"data:realIndex\") === String(seriesCnt))) != null ? _a : null;\n                if (!seriesEl) return;\n                realIndex = parseInt((_b = seriesEl.getAttribute(\"data:realIndex\")) != null ? _b : \"\", 10);\n            } else {\n                seriesEl = w2.dom.baseEl.querySelector(`.apexcharts-series[rel='${seriesCnt + 1}']`);\n                if (!seriesEl) return;\n                realIndex = parseInt((_c = seriesEl.getAttribute(\"rel\")) != null ? _c : \"\", 10) - 1;\n            }\n            if (isHidden) {\n                const seriesToMakeVisible = [\n                    {\n                        cs: w2.globals.collapsedSeries,\n                        csi: w2.globals.collapsedSeriesIndices\n                    },\n                    {\n                        cs: w2.globals.ancillaryCollapsedSeries,\n                        csi: w2.globals.ancillaryCollapsedSeriesIndices\n                    }\n                ];\n                seriesToMakeVisible.forEach((r2)=>{\n                    const cs = /** @type {any} */ r2.cs;\n                    const csi = /** @type {any} */ r2.csi;\n                    this.riseCollapsedSeries(cs, csi, /** @type {number} */ realIndex);\n                });\n            } else this.hideSeries({\n                seriesEl: seriesEl,\n                realIndex: realIndex\n            });\n            if (w2.config.chart.accessibility.enabled) {\n                const legendItem = w2.dom.baseEl.querySelector(`.apexcharts-legend-series[rel=\"${seriesCnt + 1}\"]`);\n                if (legendItem) {\n                    const isCollapsed = w2.globals.collapsedSeriesIndices.includes(realIndex) || w2.globals.ancillaryCollapsedSeriesIndices.includes(realIndex);\n                    legendItem.setAttribute(\"aria-pressed\", isCollapsed ? \"true\" : \"false\");\n                    const legendTextEl = legendItem.querySelector(\".apexcharts-legend-text\");\n                    const seriesName = legendTextEl ? legendTextEl.textContent : w2.seriesData.seriesNames[seriesCnt];\n                    const statusText = isCollapsed ? \"hidden\" : \"visible\";\n                    legendItem.setAttribute(\"aria-label\", `${seriesName}, ${statusText}. Press Enter or Space to toggle.`);\n                }\n            }\n        } else {\n            w2.globals.resized = true;\n            w2.globals.risingSeries = [];\n            if (isHidden) this.riseCollapsedSeries(w2.globals.collapsedSeries, w2.globals.collapsedSeriesIndices, seriesCnt);\n            else {\n                const series = this.getSeriesAfterCollapsing({\n                    realIndex: seriesCnt\n                });\n                this.lgCtx.updateSeries(series, w2.config.chart.animations.dynamicAnimation.enabled);\n            }\n            if (w2.config.chart.accessibility.enabled) {\n                const legendItem = w2.dom.baseEl.querySelector(`.apexcharts-legend-series[rel=\"${seriesCnt + 1}\"]`);\n                if (legendItem) {\n                    const isCollapsed = w2.globals.collapsedSeriesIndices.includes(seriesCnt);\n                    legendItem.setAttribute(\"aria-pressed\", isCollapsed ? \"true\" : \"false\");\n                    const legendTextEl = legendItem.querySelector(\".apexcharts-legend-text\");\n                    const seriesName = legendTextEl ? legendTextEl.textContent : w2.seriesData.seriesNames[seriesCnt];\n                    const statusText = isCollapsed ? \"hidden\" : \"visible\";\n                    legendItem.setAttribute(\"aria-label\", `${seriesName}, ${statusText}. Press Enter or Space to toggle.`);\n                }\n            }\n        }\n    }\n    /**\n   * Non-axis \"slice\" container. A pie/donut/polarArea slice is normally a\n   * top-level series element (numeric form: `series = [n, n, n]`), but object\n   * form (`series = [{ data: [{ x, y, drilldown }, ...] }]`, which pie/donut\n   * drilldown requires) packs every slice as a data point inside a single\n   * series. Return the array that actually holds the slice values so a\n   * slice/legend index addresses the right thing. Scoped to the pie family so\n   * unit charts (which share this non-axis path) are untouched.\n   * @param {any[]} series\n   * @returns {any[]}\n   */ _nonAxisSliceContainer(series) {\n        const type = this.w.config.chart.type;\n        if ((type === \"pie\" || type === \"donut\" || type === \"polarArea\" || type === \"sunburst\") && series.length === 1 && series[0] && typeof series[0] === \"object\" && Array.isArray(series[0].data)) return series[0].data;\n        return series;\n    }\n    /**\n   * Read a non-axis slice value (handles `{ x, y }` data points and plain\n   * numbers).\n   * @param {any} sliceEntry\n   * @returns {number}\n   */ _readSliceValue(sliceEntry) {\n        if (this.w.config.chart.type === \"unit\" && sliceEntry && Array.isArray(sliceEntry.data)) return sliceEntry.data;\n        return sliceEntry && typeof sliceEntry === \"object\" ? sliceEntry.y : sliceEntry;\n    }\n    /**\n   * Write a non-axis slice value in place, preserving `{ x, drilldown, ... }`\n   * on object data points.\n   * @param {any[]} container\n   * @param {number} i\n   * @param {number} value\n   */ _writeSliceValue(container, i2, value) {\n        const entry = container[i2];\n        if (this.w.config.chart.type === \"unit\" && entry && Array.isArray(entry.data)) {\n            entry.data = Array.isArray(value) ? value : [];\n            return;\n        }\n        if (entry && typeof entry === \"object\") entry.y = value;\n        else container[i2] = value;\n    }\n    /** @param {{realIndex: any}} opts */ getSeriesAfterCollapsing({ realIndex: realIndex }) {\n        var _a, _b;\n        const w2 = this.w;\n        const gl = w2.globals;\n        const series = $e4b487e979d7c06d$var$Utils$1.clone(w2.config.series);\n        if (gl.axisCharts) {\n            const yaxis = w2.config.yaxis[gl.seriesYAxisReverseMap[realIndex]];\n            const collapseData = {\n                index: realIndex,\n                data: series[realIndex].data.slice(),\n                type: series[realIndex].type || w2.config.chart.type,\n                // The category name pins the hide across a data update that reorders or\n                // regroups categories (e.g. a storyboard beat): the collapse is\n                // reconciled by name, not index. See Series.reconcileCollapsedByName.\n                name: (gl.seriesNames || [])[realIndex]\n            };\n            if (yaxis && yaxis.show && yaxis.showAlways) {\n                if (gl.ancillaryCollapsedSeriesIndices.indexOf(realIndex) < 0) {\n                    gl.ancillaryCollapsedSeries.push(collapseData);\n                    gl.ancillaryCollapsedSeriesIndices.push(realIndex);\n                }\n            } else if (gl.collapsedSeriesIndices.indexOf(realIndex) < 0) {\n                gl.collapsedSeries.push(collapseData);\n                gl.collapsedSeriesIndices.push(realIndex);\n                const removeIndexOfRising = gl.risingSeries.indexOf(realIndex);\n                gl.risingSeries.splice(removeIndexOfRising, 1);\n            }\n        } else if (gl.collapsedSeriesIndices.indexOf(realIndex) < 0) {\n            const container = this._nonAxisSliceContainer(series);\n            gl.collapsedSeries.push({\n                index: realIndex,\n                // Store the original slice VALUE so it can be restored on rise. In\n                // object form this is a data point's `y`, not the whole series entry.\n                data: this._readSliceValue(container[realIndex]),\n                type: /** @type {any} */ (_b = (_a = w2.config.series[realIndex]) == null ? void 0 : _a.type) != null ? _b : \"line\",\n                // Pin the hide by category name so it survives a regroup (see above).\n                name: (gl.seriesNames || [])[realIndex]\n            });\n            gl.collapsedSeriesIndices.push(realIndex);\n        }\n        const seriesCount = gl.axisCharts ? w2.config.series.length : this._nonAxisSliceContainer(series).length;\n        gl.allSeriesCollapsed = gl.collapsedSeries.length + gl.ancillaryCollapsedSeries.length === seriesCount;\n        return this._getSeriesBasedOnCollapsedState(series);\n    }\n    /** @param {{seriesEl: any, realIndex: any}} opts */ hideSeries({ seriesEl: seriesEl, realIndex: realIndex }) {\n        const w2 = this.w;\n        const series = this.getSeriesAfterCollapsing({\n            realIndex: realIndex\n        });\n        const seriesChildren = seriesEl.childNodes;\n        for(let sc = 0; sc < seriesChildren.length; sc++)if (seriesChildren[sc].classList.contains(\"apexcharts-series-markers-wrap\")) {\n            if (seriesChildren[sc].classList.contains(\"apexcharts-hide\")) seriesChildren[sc].classList.remove(\"apexcharts-hide\");\n            else seriesChildren[sc].classList.add(\"apexcharts-hide\");\n        }\n        this.lgCtx.updateSeries(series, w2.config.chart.animations.dynamicAnimation.enabled);\n    }\n    /**\n   * @param {any[]} collapsedSeries\n   * @param {number[]} seriesIndices\n   * @param {number} realIndex\n   */ riseCollapsedSeries(collapsedSeries, seriesIndices, realIndex) {\n        const w2 = this.w;\n        let series = $e4b487e979d7c06d$var$Utils$1.clone(w2.config.series);\n        if (collapsedSeries.length > 0) {\n            for(let c2 = 0; c2 < collapsedSeries.length; c2++)if (collapsedSeries[c2].index === realIndex) {\n                if (w2.globals.axisCharts) {\n                    series[realIndex].data = collapsedSeries[c2].data.slice();\n                    series[realIndex].hidden = false;\n                } else {\n                    const container = this._nonAxisSliceContainer(series);\n                    this._writeSliceValue(container, realIndex, collapsedSeries[c2].data);\n                }\n                collapsedSeries.splice(c2, 1);\n                seriesIndices.splice(c2, 1);\n                w2.globals.risingSeries.push(realIndex);\n                c2--;\n            }\n            series = this._getSeriesBasedOnCollapsedState(series);\n            this.lgCtx.updateSeries(series, w2.config.chart.animations.dynamicAnimation.enabled);\n        }\n    }\n    /**\n   * @param {any[]} series\n   */ _getSeriesBasedOnCollapsedState(series) {\n        const w2 = this.w;\n        let collapsed = 0;\n        if (w2.globals.axisCharts) series.forEach((s2, sI)=>{\n            if (!(w2.globals.collapsedSeriesIndices.indexOf(sI) < 0 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(sI) < 0)) {\n                series[sI].data = [];\n                collapsed++;\n            }\n        });\n        else {\n            const container = this._nonAxisSliceContainer(series);\n            container.forEach((s2, sI)=>{\n                if (!(w2.globals.collapsedSeriesIndices.indexOf(sI) < 0)) {\n                    this._writeSliceValue(container, sI, 0);\n                    collapsed++;\n                }\n            });\n        }\n        const seriesCount = w2.globals.axisCharts ? series.length : this._nonAxisSliceContainer(series).length;\n        w2.globals.allSeriesCollapsed = collapsed === seriesCount;\n        return series;\n    }\n};\nconst $e4b487e979d7c06d$var$DEFAULT_DIVERGING = [\n    \"#cf4d3f\",\n    \"#8f9499\",\n    \"#26a75b\"\n];\nconst $e4b487e979d7c06d$var$lerp$1 = (a2, b2, t2)=>a2 + (b2 - a2) * t2;\nfunction $e4b487e979d7c06d$var$toHexPair(n2) {\n    const v2 = Math.max(0, Math.min(255, Math.round(n2)));\n    return v2.toString(16).padStart(2, \"0\");\n}\nfunction $e4b487e979d7c06d$var$mixColors(c1, c2, t2) {\n    const a2 = $e4b487e979d7c06d$var$Utils$1.parseHex($e4b487e979d7c06d$var$normalizeHex(c1));\n    const b2 = $e4b487e979d7c06d$var$Utils$1.parseHex($e4b487e979d7c06d$var$normalizeHex(c2));\n    if (!a2 || !b2) return c1;\n    return \"#\" + $e4b487e979d7c06d$var$toHexPair($e4b487e979d7c06d$var$lerp$1(a2[0], b2[0], t2)) + $e4b487e979d7c06d$var$toHexPair($e4b487e979d7c06d$var$lerp$1(a2[1], b2[1], t2)) + $e4b487e979d7c06d$var$toHexPair($e4b487e979d7c06d$var$lerp$1(a2[2], b2[2], t2));\n}\nfunction $e4b487e979d7c06d$var$normalizeHex(c2) {\n    if (typeof c2 !== \"string\") return \"#000000\";\n    if ($e4b487e979d7c06d$var$Utils$1.isColorHex(c2)) return c2;\n    const asHex = $e4b487e979d7c06d$var$Utils$1.rgb2hex(c2);\n    return asHex || \"#000000\";\n}\nfunction $e4b487e979d7c06d$var$colorValueOf(w2, i2, j) {\n    const series = /** @type {any} */ w2.config.series[i2];\n    const datum = series && Array.isArray(series.data) ? series.data[j] : null;\n    return $e4b487e979d7c06d$var$colorValueOfDatum(w2, datum, i2, j);\n}\nfunction $e4b487e979d7c06d$var$colorValueOfDatum(w2, datum, i2, j) {\n    var _a, _b, _c;\n    if (!datum || typeof datum !== \"object\") return null;\n    const accessor = (_c = (_b = (_a = w2.config.plotOptions) == null ? void 0 : _a.treemap) == null ? void 0 : _b.colorScale) == null ? void 0 : _c.colorValue;\n    let raw;\n    if (typeof accessor === \"function\") raw = accessor(datum, {\n        seriesIndex: i2,\n        dataPointIndex: j,\n        w: w2\n    });\n    else if (typeof accessor === \"string\") raw = datum[accessor];\n    else raw = datum.colorValue;\n    if (raw == null) return null;\n    const n2 = Number(raw);\n    return Number.isFinite(n2) ? n2 : null;\n}\nfunction $e4b487e979d7c06d$var$resolveStops(cfg, min, max, midpoint) {\n    if (Array.isArray(cfg.stops) && cfg.stops.length >= 2) return cfg.stops.filter((s2)=>s2 && Number.isFinite(Number(s2.value))).map((s2)=>({\n            value: Number(s2.value),\n            color: $e4b487e979d7c06d$var$normalizeHex(s2.color)\n        })).sort((a2, b2)=>a2.value - b2.value);\n    const colors = (Array.isArray(cfg.colors) && cfg.colors.length >= 2 ? cfg.colors : $e4b487e979d7c06d$var$DEFAULT_DIVERGING).map($e4b487e979d7c06d$var$normalizeHex);\n    const n2 = colors.length;\n    if (midpoint != null && n2 >= 3) {\n        const mid = Math.floor((n2 - 1) / 2);\n        const out = [];\n        for(let k = 0; k <= mid; k++)out.push({\n            value: $e4b487e979d7c06d$var$lerp$1(min, midpoint, k / mid),\n            color: colors[k]\n        });\n        for(let k = mid + 1; k < n2; k++)out.push({\n            value: $e4b487e979d7c06d$var$lerp$1(midpoint, max, (k - mid) / (n2 - 1 - mid)),\n            color: colors[k]\n        });\n        return out;\n    }\n    return colors.map((c2, k)=>({\n            value: $e4b487e979d7c06d$var$lerp$1(min, max, k / (n2 - 1)),\n            color: c2\n        }));\n}\nfunction $e4b487e979d7c06d$var$buildContinuousScale(w2) {\n    var _a, _b, _c;\n    const cs = (_c = (_b = (_a = w2.config) == null ? void 0 : _a.plotOptions) == null ? void 0 : _b.treemap) == null ? void 0 : _c.colorScale;\n    const cfg = cs && cs.gradient;\n    if (!cfg) return null;\n    if (cfg.enabled === false) return null;\n    const series = /** @type {any} */ w2.config.series || [];\n    let dataMin = Infinity;\n    let dataMax = -Infinity;\n    let found = false;\n    for(let i2 = 0; i2 < series.length; i2++){\n        const data = series[i2] && series[i2].data;\n        if (!Array.isArray(data)) continue;\n        for(let j = 0; j < data.length; j++){\n            const v2 = $e4b487e979d7c06d$var$colorValueOfDatum(w2, data[j], i2, j);\n            if (v2 == null) continue;\n            found = true;\n            if (v2 < dataMin) dataMin = v2;\n            if (v2 > dataMax) dataMax = v2;\n        }\n    }\n    if (!found && cfg.enabled !== true) return null;\n    if (!Number.isFinite(dataMin)) {\n        dataMin = 0;\n        dataMax = 0;\n    }\n    let min = Number.isFinite(Number(cfg.min)) ? Number(cfg.min) : dataMin;\n    let max = Number.isFinite(Number(cfg.max)) ? Number(cfg.max) : dataMax;\n    let midpoint = null;\n    if (cfg.midpoint === null) midpoint = null;\n    else if (Number.isFinite(Number(cfg.midpoint))) midpoint = Number(cfg.midpoint);\n    else if (min < 0 && max > 0) midpoint = 0;\n    if (midpoint != null && cfg.symmetric !== false && !Number.isFinite(Number(cfg.min)) && !Number.isFinite(Number(cfg.max))) {\n        const reach = Math.max(Math.abs(min - midpoint), Math.abs(max - midpoint));\n        min = midpoint - reach;\n        max = midpoint + reach;\n    }\n    if (max === min) {\n        min -= 0.5;\n        max += 0.5;\n    }\n    const stops = $e4b487e979d7c06d$var$resolveStops(cfg, min, max, midpoint);\n    if (stops.length < 2) return null;\n    const at = (v2)=>{\n        if (!Number.isFinite(v2)) return stops[Math.floor(stops.length / 2)].color;\n        if (v2 <= stops[0].value) return stops[0].color;\n        const last = stops[stops.length - 1];\n        if (v2 >= last.value) return last.color;\n        for(let k = 1; k < stops.length; k++){\n            const hi = stops[k];\n            if (v2 <= hi.value) {\n                const lo = stops[k - 1];\n                const span2 = hi.value - lo.value;\n                const t2 = span2 === 0 ? 0 : (v2 - lo.value) / span2;\n                return $e4b487e979d7c06d$var$mixColors(lo.color, hi.color, t2);\n            }\n        }\n        return last.color;\n    };\n    const span = max - min;\n    const legendStops = stops.map((s2)=>({\n            percent: span === 0 ? 0 : (s2.value - min) / span,\n            color: s2.color\n        }));\n    return {\n        min: min,\n        max: max,\n        midpoint: midpoint,\n        stops: stops,\n        at: at,\n        legendStops: legendStops\n    };\n}\nfunction $e4b487e979d7c06d$var$readableOn(bg) {\n    const hex = $e4b487e979d7c06d$var$normalizeHex(bg);\n    return $e4b487e979d7c06d$var$Utils$1.getContrastRatio(hex, \"#ffffff\") >= $e4b487e979d7c06d$var$Utils$1.getContrastRatio(hex, \"#000000\") ? \"#ffffff\" : \"#000000\";\n}\nconst $e4b487e979d7c06d$var$SVG_NS = \"http://www.w3.org/2000/svg\";\nclass $e4b487e979d7c06d$var$HeatmapGradientLegend {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.svgEl = null;\n        this.arrowEl = null;\n        this.hoverValueEl = null;\n        this._min = 0;\n        this._max = 0;\n        this._geom = null;\n        this._bandHitEls = [];\n        this._activeBandIndex = -1;\n        this._onCellEnter = this._onCellEnter.bind(this);\n        this._onCellLeave = this._onCellLeave.bind(this);\n        this._onBandEnter = this._onBandEnter.bind(this);\n        this._onBandLeave = this._onBandLeave.bind(this);\n    }\n    /** Default value formatter for min/max labels and the hover tooltip. */ _getFormatter() {\n        const cfg = this._cfg();\n        if (typeof cfg.formatter === \"function\") return cfg.formatter;\n        return (v2)=>{\n            if (!Number.isFinite(v2)) return String(v2);\n            const abs = Math.abs(v2);\n            if (abs >= 1e3) return v2.toFixed(0);\n            if (abs >= 10) return v2.toFixed(1);\n            return v2.toFixed(2);\n        };\n    }\n    /**\n   * The colorScale of whichever chart type is being drawn. Every chart type\n   * that encodes a value as colour carries the same `colorScale` shape, so one\n   * strip serves them all rather than a near-copy per type.\n   * @param {any} w\n   */ static colorScaleOf(w2) {\n        var _a, _b, _c, _d, _e;\n        const type = (_b = (_a = w2 == null ? void 0 : w2.config) == null ? void 0 : _a.chart) == null ? void 0 : _b.type;\n        if (!type) return null;\n        return ((_e = (_d = (_c = w2 == null ? void 0 : w2.config) == null ? void 0 : _c.plotOptions) == null ? void 0 : _d[type]) == null ? void 0 : _e.colorScale) || null;\n    }\n    /**\n   * @param {any} w\n   */ static configFor(w2) {\n        const cs = $e4b487e979d7c06d$var$HeatmapGradientLegend.colorScaleOf(w2);\n        return cs && cs.gradientLegend || null;\n    }\n    /** This instance's gradient-legend config. */ _cfg() {\n        return $e4b487e979d7c06d$var$HeatmapGradientLegend.configFor(this.w) || {};\n    }\n    /**\n   * True when the user has opted into the gradient legend variant.\n   * @param {any} w\n   */ static isEnabled(w2) {\n        if (!$e4b487e979d7c06d$var$HeatmapGradientLegend.supports(w2)) return false;\n        const cfg = $e4b487e979d7c06d$var$HeatmapGradientLegend.configFor(w2);\n        return !!(cfg && cfg.enabled);\n    }\n    /**\n   * Chart types this legend can serve: those that encode a value as colour\n   * through a `colorScale`. Everything else gets the categorical legend.\n   * @param {any} w\n   */ static supports(w2) {\n        var _a, _b;\n        const type = (_b = (_a = w2 == null ? void 0 : w2.config) == null ? void 0 : _a.chart) == null ? void 0 : _b.type;\n        return type === \"heatmap\" || type === \"treemap\";\n    }\n    /**\n   * Build the gradient legend DOM into `elLegendWrap`.\n   * Caller is responsible for clearing the wrap first.\n   */ draw() {\n        var _a, _b, _c, _d, _e, _f, _g, _h;\n        const w2 = this.w;\n        const elLegendWrap = /** @type {HTMLElement} */ w2.dom.elLegendWrap;\n        if (!elLegendWrap) return;\n        const cfg = this._cfg();\n        const position = w2.config.legend.position;\n        const isVertical = position === \"left\" || position === \"right\";\n        const arrowSize = (_b = (_a = cfg.arrow) == null ? void 0 : _a.size) != null ? _b : 8;\n        const arrowGutter = arrowSize + 4;\n        const labelPadAlongStrip = cfg.showLabels ? 28 : 4;\n        const labelPadAcrossStrip = cfg.showLabels ? 20 : 4;\n        const minLabelWidth = cfg.showLabels ? 44 : 0;\n        const stripLength = this._resolveStripLength(isVertical ? cfg.height : cfg.width, isVertical);\n        const stripThickness = cfg.thickness;\n        const svgWidth = isVertical ? Math.max(stripThickness + arrowGutter + 4, minLabelWidth) : stripLength + labelPadAlongStrip * 2;\n        const svgHeight = isVertical ? stripLength + labelPadAcrossStrip * 2 : stripThickness + arrowGutter + 4;\n        const verticalGroupWidth = stripThickness + arrowGutter;\n        const verticalGroupLeftPad = (svgWidth - verticalGroupWidth) / 2;\n        const stripX = isVertical ? position === \"left\" ? verticalGroupLeftPad : verticalGroupLeftPad + arrowGutter : labelPadAlongStrip;\n        const stripY = isVertical ? labelPadAcrossStrip : position === \"top\" ? arrowGutter : 4;\n        const svg = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVG_NS, \"svg\");\n        svg.setAttribute(\"class\", \"apexcharts-heatmap-gradient-legend apexcharts-gradient-legend\");\n        svg.setAttribute(\"width\", String(svgWidth));\n        svg.setAttribute(\"height\", String(svgHeight));\n        svg.setAttribute(\"overflow\", \"visible\");\n        const defs = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVG_NS, \"defs\");\n        const gradId = `apexcharts-heatmap-gradient-${w2.globals.cuid}`;\n        const linearGrad = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVG_NS, \"linearGradient\");\n        linearGrad.setAttribute(\"id\", gradId);\n        if (isVertical) {\n            linearGrad.setAttribute(\"x1\", \"0\");\n            linearGrad.setAttribute(\"y1\", \"1\");\n            linearGrad.setAttribute(\"x2\", \"0\");\n            linearGrad.setAttribute(\"y2\", \"0\");\n        } else {\n            linearGrad.setAttribute(\"x1\", \"0\");\n            linearGrad.setAttribute(\"y1\", \"0\");\n            linearGrad.setAttribute(\"x2\", \"1\");\n            linearGrad.setAttribute(\"y2\", \"0\");\n        }\n        const { min: min, max: max, stops: stops, bands: bands } = this._computeStops();\n        this._min = min;\n        this._max = max;\n        stops.forEach((s2)=>{\n            const stopEl = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVG_NS, \"stop\");\n            stopEl.setAttribute(\"offset\", `${(s2.percent * 100).toFixed(2)}%`);\n            stopEl.setAttribute(\"stop-color\", s2.color);\n            linearGrad.appendChild(stopEl);\n        });\n        defs.appendChild(linearGrad);\n        svg.appendChild(defs);\n        const rect = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVG_NS, \"rect\");\n        rect.setAttribute(\"x\", String(stripX));\n        rect.setAttribute(\"y\", String(stripY));\n        rect.setAttribute(\"width\", String(isVertical ? stripThickness : stripLength));\n        rect.setAttribute(\"height\", String(isVertical ? stripLength : stripThickness));\n        rect.setAttribute(\"rx\", \"2\");\n        rect.setAttribute(\"fill\", `url(#${gradId})`);\n        svg.appendChild(rect);\n        if (cfg.showLabels) {\n            const labelColor = ((_c = cfg.labelStyle) == null ? void 0 : _c.colors) || (Array.isArray(w2.config.legend.labels.colors) ? w2.config.legend.labels.colors[0] : w2.config.legend.labels.colors) || w2.config.chart.foreColor;\n            const labelFontSize = ((_d = cfg.labelStyle) == null ? void 0 : _d.fontSize) || \"11px\";\n            const labelFontFamily = ((_e = cfg.labelStyle) == null ? void 0 : _e.fontFamily) || w2.config.chart.fontFamily;\n            const fmt = this._getFormatter();\n            const makeLabel = (text, x, y, anchor)=>{\n                const t2 = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVG_NS, \"text\");\n                t2.setAttribute(\"x\", String(x));\n                t2.setAttribute(\"y\", String(y));\n                t2.setAttribute(\"text-anchor\", anchor);\n                t2.setAttribute(\"dominant-baseline\", \"middle\");\n                t2.setAttribute(\"fill\", labelColor);\n                t2.setAttribute(\"font-size\", labelFontSize);\n                if (labelFontFamily) t2.setAttribute(\"font-family\", labelFontFamily);\n                t2.textContent = String(text);\n                return t2;\n            };\n            if (isVertical) {\n                const midX = stripX + stripThickness / 2;\n                svg.appendChild(makeLabel(fmt(min), midX, stripY + stripLength + 10, \"middle\"));\n                svg.appendChild(makeLabel(fmt(max), midX, stripY - 10, \"middle\"));\n            } else {\n                const midY = stripY + stripThickness / 2;\n                svg.appendChild(makeLabel(fmt(min), stripX - 6, midY, \"end\"));\n                svg.appendChild(makeLabel(fmt(max), stripX + stripLength + 6, midY, \"start\"));\n            }\n        }\n        const arrowColor = ((_f = cfg.arrow) == null ? void 0 : _f.color) || w2.config.chart.foreColor;\n        const arrow = this._buildArrow(arrowSize, arrowColor, position);\n        svg.appendChild(arrow);\n        this.arrowEl = arrow;\n        this._bandHitEls = [];\n        if (w2.config.legend.onItemHover.highlightDataSeries && bands.length > 0) bands.forEach((b2)=>{\n            const hit = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVG_NS, \"rect\");\n            if (isVertical) {\n                const yTop = stripY + stripLength - b2.p2 * stripLength;\n                const yBot = stripY + stripLength - b2.p1 * stripLength;\n                hit.setAttribute(\"x\", String(stripX));\n                hit.setAttribute(\"y\", String(yTop));\n                hit.setAttribute(\"width\", String(stripThickness));\n                hit.setAttribute(\"height\", String(Math.max(0, yBot - yTop)));\n            } else {\n                hit.setAttribute(\"x\", String(stripX + b2.p1 * stripLength));\n                hit.setAttribute(\"y\", String(stripY));\n                hit.setAttribute(\"width\", String(Math.max(0, (b2.p2 - b2.p1) * stripLength)));\n                hit.setAttribute(\"height\", String(stripThickness));\n            }\n            hit.setAttribute(\"fill\", \"transparent\");\n            hit.setAttribute(\"class\", \"apexcharts-heatmap-gradient-band\");\n            hit.setAttribute(\"data:range-index\", String(b2.index));\n            hit.style.cursor = \"pointer\";\n            svg.appendChild(hit);\n            this._bandHitEls.push(hit);\n        });\n        this._geom = {\n            isVertical: isVertical,\n            position: position,\n            stripX: stripX,\n            stripY: stripY,\n            stripLength: stripLength,\n            stripThickness: stripThickness,\n            arrowSize: arrowSize,\n            svgWidth: svgWidth,\n            svgHeight: svgHeight\n        };\n        if (cfg.showHoverValue) {\n            const tt = $e4b487e979d7c06d$var$BrowserAPIs.createElement(\"div\");\n            tt.classList.add(\"apexcharts-heatmap-gradient-legend-value\");\n            tt.style.position = \"absolute\";\n            tt.style.fontSize = ((_g = cfg.labelStyle) == null ? void 0 : _g.fontSize) || \"11px\";\n            tt.style.fontFamily = ((_h = cfg.labelStyle) == null ? void 0 : _h.fontFamily) || w2.config.chart.fontFamily || \"\";\n            tt.style.color = w2.config.chart.foreColor;\n            tt.style.background = \"rgba(0,0,0,0.65)\";\n            tt.style.color = \"#fff\";\n            tt.style.padding = \"2px 6px\";\n            tt.style.borderRadius = \"3px\";\n            tt.style.pointerEvents = \"none\";\n            tt.style.whiteSpace = \"nowrap\";\n            tt.style.opacity = \"0\";\n            tt.style.transition = \"opacity 120ms ease\";\n            this.hoverValueEl = tt;\n        }\n        elLegendWrap.classList.add(\"apexcharts-heatmap-gradient-legend-wrap\");\n        elLegendWrap.classList.add(\"apx-legend-position-\" + position);\n        elLegendWrap.appendChild(svg);\n        if (this.hoverValueEl) elLegendWrap.appendChild(this.hoverValueEl);\n        this.svgEl = svg;\n        this._applyWrapAlignment(elLegendWrap, position, isVertical, svgWidth, svgHeight);\n        this._attachHoverListeners();\n        this._attachBandHoverListeners();\n    }\n    /**\n   * Resolve a configured length (number = px, string ending in '%' =\n   * percentage of the chart's SVG width/height) to a pixel length.\n   * @param {number|string} value\n   * @param {boolean} isVertical\n   * @returns {number}\n   */ _resolveStripLength(value, isVertical) {\n        const w2 = this.w;\n        const basis = isVertical ? w2.globals.svgHeight || w2.config.chart.height || 300 : w2.globals.svgWidth || w2.config.chart.width || 600;\n        if (typeof value === \"string\") {\n            const trimmed = value.trim();\n            if (trimmed.endsWith(\"%\")) {\n                const pct = parseFloat(trimmed) || 0;\n                return Math.max(20, basis * pct / 100);\n            }\n            const n2 = parseFloat(trimmed);\n            return Number.isFinite(n2) ? n2 : 200;\n        }\n        if (typeof value === \"number\" && Number.isFinite(value)) return value;\n        return 200;\n    }\n    /**\n   * Position the legend wrap and align the gradient strip within it. The\n   * wrap spans the chart's long axis (full width for top/bottom; full\n   * height for left/right) and uses flexbox to honor the `align` config.\n   * Bypasses the standard `setLegendWrapXY` which sizes the wrap to its\n   * content.\n   * @param {HTMLElement} elLegendWrap\n   * @param {'top'|'right'|'bottom'|'left'} position\n   * @param {boolean} isVertical\n   * @param {number} svgWidth\n   * @param {number} svgHeight\n   */ _applyWrapAlignment(elLegendWrap, position, isVertical, svgWidth, svgHeight) {\n        const w2 = this.w;\n        const cfg = this._cfg();\n        const align = cfg.align || \"center\";\n        const edgePad = 12;\n        const chartWidth = w2.globals.svgWidth || w2.config.chart.width || 600;\n        const chartHeight = w2.globals.svgHeight || w2.config.chart.height || 300;\n        const userOffsetX = w2.config.legend.offsetX || 0;\n        const userOffsetY = w2.config.legend.offsetY || 0;\n        elLegendWrap.style.position = \"absolute\";\n        elLegendWrap.style.display = \"block\";\n        elLegendWrap.style.overflow = \"visible\";\n        elLegendWrap.style.padding = \"0\";\n        elLegendWrap.style.width = svgWidth + \"px\";\n        elLegendWrap.style.height = svgHeight + \"px\";\n        elLegendWrap.style.right = \"auto\";\n        elLegendWrap.style.bottom = \"auto\";\n        if (isVertical) {\n            const availableHeight = chartHeight - svgHeight - edgePad * 2;\n            let y;\n            if (align === \"start\") y = edgePad;\n            else if (align === \"end\") y = edgePad + Math.max(0, availableHeight);\n            else y = edgePad + Math.max(0, availableHeight) / 2;\n            elLegendWrap.style.top = y + userOffsetY + \"px\";\n            if (position === \"left\") elLegendWrap.style.left = edgePad + userOffsetX + \"px\";\n            else elLegendWrap.style.left = chartWidth - svgWidth - edgePad + userOffsetX + \"px\";\n        } else {\n            const availableWidth = chartWidth - svgWidth - edgePad * 2;\n            let x;\n            if (align === \"start\") x = edgePad;\n            else if (align === \"end\") x = edgePad + Math.max(0, availableWidth);\n            else x = edgePad + Math.max(0, availableWidth) / 2;\n            elLegendWrap.style.left = x + userOffsetX + \"px\";\n            if (position === \"top\") elLegendWrap.style.top = edgePad + userOffsetY + \"px\";\n            else elLegendWrap.style.top = chartHeight - svgHeight - edgePad + userOffsetY + \"px\";\n        }\n    }\n    /**\n   * Re-position the strip once the final layout is known.\n   *\n   * `_applyWrapAlignment` (called during `draw()`, before `plotCoords()`) can\n   * only pin to the chart's outer edge. This runs after layout — when\n   * `translateX/Y`, `gridWidth/Height` and `xAxisHeight` are populated — and:\n   *   - centers the strip within its reserved band on the perpendicular axis\n   *     (between the title and the plot for `top`; the x-axis and the chart\n   *     bottom for `bottom`; the chart edge and the plot for `left`/`right`),\n   *     so the slack is split evenly instead of dumped on one side, and\n   *   - aligns it along the plot's own extent (so `align: 'center'` centers\n   *     over the heatmap, not the whole canvas).\n   * Honors `legend.offsetX/offsetY` for user nudging. Safe to call repeatedly.\n   */ repositionToPlot() {\n        var _a, _b;\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const w2 = this.w;\n        const g2 = w2.globals;\n        const wrap = /** @type {HTMLElement} */ w2.dom.elLegendWrap;\n        if (!wrap || !this._geom) return;\n        if (!Number.isFinite(g2.gridWidth) || !Number.isFinite(g2.gridHeight)) return;\n        const { isVertical: isVertical, position: position, svgWidth: svgWidth, svgHeight: svgHeight, stripX: stripX, stripY: stripY, stripThickness: stripThickness } = this._geom;\n        const align = this._cfg().align || \"center\";\n        const ox = w2.config.legend.offsetX || 0;\n        const oy = w2.config.legend.offsetY || 0;\n        const dimHelpers = (_b = (_a = this.ctx) == null ? void 0 : _a.dimensions) == null ? void 0 : _b.dimHelpers;\n        const titleArea = dimHelpers ? dimHelpers.getTitleSubtitleCoords(\"title\").height + dimHelpers.getTitleSubtitleCoords(\"subtitle\").height : 0;\n        const xAxisArea = w2.layout.xAxisHeight || 0;\n        const alongOffset = (extent, size)=>{\n            const avail = Math.max(0, extent - size);\n            if (align === \"start\") return 0;\n            if (align === \"end\") return avail;\n            return avail / 2;\n        };\n        if (isVertical) {\n            wrap.style.top = g2.translateY + alongOffset(g2.gridHeight, svgHeight) + oy + \"px\";\n            const bandStart = position === \"left\" ? 0 : g2.translateX + g2.gridWidth;\n            const bandEnd = position === \"left\" ? g2.translateX : g2.svgWidth;\n            const stripCenter = (bandStart + bandEnd) / 2;\n            wrap.style.left = stripCenter - stripX - stripThickness / 2 + ox + \"px\";\n        } else {\n            wrap.style.left = g2.translateX + alongOffset(g2.gridWidth, svgWidth) + ox + \"px\";\n            const bandStart = position === \"top\" ? titleArea : g2.translateY + g2.gridHeight + xAxisArea;\n            const bandEnd = position === \"top\" ? g2.translateY : g2.svgHeight;\n            const stripCenter = (bandStart + bandEnd) / 2;\n            wrap.style.top = stripCenter - stripY - stripThickness / 2 + oy + \"px\";\n        }\n        $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(()=>this._enforceMinPlotGap());\n    }\n    /**\n   * Guarantee a minimum gap between the strip's chart-facing edge and the plot.\n   * Measured in viewport space (immune to the wrap↔SVG coordinate offset) and\n   * applied as a *relative* shift to the wrap's current position, so it only\n   * nudges a strip that ended up too close — placements with ample room are\n   * left exactly where centering put them. Runs post-paint (see caller).\n   */ _enforceMinPlotGap() {\n        const w2 = this.w;\n        const wrap = /** @type {HTMLElement} */ w2.dom.elLegendWrap;\n        const strip = this.svgEl && this.svgEl.querySelector(\"rect\");\n        const grid = w2.dom.baseEl.querySelector(\".apexcharts-grid\");\n        if (!wrap || !strip || !grid || !this._geom) return;\n        const s2 = strip.getBoundingClientRect();\n        const gr = grid.getBoundingClientRect();\n        if (!s2.width || !s2.height || !gr.width || !gr.height) return;\n        const MIN_GAP = 16;\n        const { isVertical: isVertical, position: position } = this._geom;\n        if (isVertical) {\n            const gap = position === \"left\" ? gr.left - s2.right : s2.left - gr.right;\n            if (gap < MIN_GAP) {\n                const curLeft = parseFloat(wrap.style.left) || 0;\n                const shift = MIN_GAP - gap;\n                wrap.style.left = curLeft + (position === \"left\" ? -shift : shift) + \"px\";\n            }\n        } else {\n            const gap = position === \"top\" ? gr.top - s2.bottom : s2.top - gr.bottom;\n            if (gap < MIN_GAP) {\n                const curTop = parseFloat(wrap.style.top) || 0;\n                const shift = MIN_GAP - gap;\n                wrap.style.top = curTop + (position === \"top\" ? -shift : shift) + \"px\";\n            }\n        }\n    }\n    /**\n   * Tear down listeners (called before re-render).\n   */ destroy() {\n        var _a, _b, _c, _d, _e, _f, _g;\n        for(let i2 = 0; i2 < this._bandHitEls.length; i2++){\n            const el = this._bandHitEls[i2];\n            (_a = el.removeEventListener) == null || _a.call(el, \"mousemove\", this._onBandEnter);\n            (_b = el.removeEventListener) == null || _b.call(el, \"mouseout\", this._onBandLeave);\n        }\n        this._bandHitEls = [];\n        this._activeBandIndex = -1;\n        if (!((_c = this.ctx) == null ? void 0 : _c.events)) return;\n        try {\n            (_e = (_d = this.ctx.events).removeEventListener) == null || _e.call(_d, \"dataPointMouseEnter\", this._onCellEnter);\n            (_g = (_f = this.ctx.events).removeEventListener) == null || _g.call(_f, \"dataPointMouseLeave\", this._onCellLeave);\n        } catch (_) {}\n    }\n    /** Wire mousemove/mouseout on each per-band hit-region (ranges mode). */ _attachBandHoverListeners() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        for(let i2 = 0; i2 < this._bandHitEls.length; i2++){\n            const el = this._bandHitEls[i2];\n            el.addEventListener(\"mousemove\", this._onBandEnter);\n            el.addEventListener(\"mouseout\", this._onBandLeave);\n        }\n    }\n    /**\n   * Hovering a gradient band highlights its cells and dims the rest. Guarded\n   * so the repeated mousemove stream only re-applies on an actual band change.\n   * @param {Event} e\n   */ _onBandEnter(e2) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        const target = /** @type {Element} */ e2.currentTarget;\n        const idx = parseInt((_a = target.getAttribute(\"data:range-index\")) != null ? _a : \"-1\", 10);\n        if (idx < 0 || idx === this._activeBandIndex) return;\n        this._activeBandIndex = idx;\n        (_d = (_c = (_b = this.ctx) == null ? void 0 : _b.events) == null ? void 0 : _c.fireEvent) == null || _d.call(_c, \"legendHover\", [\n            this.ctx,\n            idx,\n            w2\n        ]);\n        new $e4b487e979d7c06d$var$Series(w2).highlightRangeInSeries(idx, \"highlight\");\n    }\n    /** Leaving a band clears the highlight. */ _onBandLeave() {\n        if (this._activeBandIndex < 0) return;\n        const idx = this._activeBandIndex;\n        this._activeBandIndex = -1;\n        new $e4b487e979d7c06d$var$Series(this.w).highlightRangeInSeries(idx, \"reset\");\n    }\n    _attachHoverListeners() {\n        var _a, _b;\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        if (!((_b = (_a = this.ctx) == null ? void 0 : _a.events) == null ? void 0 : _b.addEventListener)) return;\n        this.ctx.events.addEventListener(\"dataPointMouseEnter\", this._onCellEnter);\n        this.ctx.events.addEventListener(\"dataPointMouseLeave\", this._onCellLeave);\n    }\n    /**\n   * dataPointMouseEnter fires as `(e, ctx, { seriesIndex, dataPointIndex, w })`.\n   * Graphics._fireEvent forwards listener args in the same shape.\n   * @param {...any} args\n   */ _onCellEnter(...args) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        if (!this.arrowEl) return;\n        const opts = args[args.length - 1];\n        if (!opts || typeof opts !== \"object\") return;\n        const i2 = opts.seriesIndex;\n        const j = opts.dataPointIndex;\n        if (typeof i2 !== \"number\" || typeof j !== \"number\") return;\n        if (!$e4b487e979d7c06d$var$HeatmapGradientLegend.supports(w2)) return;\n        let val;\n        if (this._continuous) val = $e4b487e979d7c06d$var$colorValueOf(w2, i2, j);\n        else val = (_c = (_b = (_a = w2.seriesData) == null ? void 0 : _a.series) == null ? void 0 : _b[i2]) == null ? void 0 : _c[j];\n        if (val == null || Number.isNaN(val)) return;\n        this._positionArrow(val);\n    }\n    _onCellLeave() {\n        if (!this.arrowEl) return;\n        this.arrowEl.setAttribute(\"opacity\", \"0\");\n        if (this.hoverValueEl) this.hoverValueEl.style.opacity = \"0\";\n    }\n    /**\n   * Move the arrow to the position corresponding to `val` along the strip.\n   * @param {number} val\n   */ _positionArrow(val) {\n        if (!this.arrowEl || !this._geom) return;\n        const { isVertical: isVertical, position: position, stripX: stripX, stripY: stripY, stripLength: stripLength, stripThickness: stripThickness, arrowSize: arrowSize } = this._geom;\n        const min = this._min;\n        const max = this._max;\n        const span = max - min;\n        let pct;\n        if (span === 0) pct = 0.5;\n        else pct = (val - min) / span;\n        if (pct < 0) pct = 0;\n        if (pct > 1) pct = 1;\n        if (isVertical) {\n            const yCenter = stripY + stripLength - pct * stripLength;\n            let tipX, baseX;\n            if (position === \"left\") {\n                tipX = stripX + stripThickness;\n                baseX = tipX + arrowSize;\n            } else {\n                tipX = stripX;\n                baseX = tipX - arrowSize;\n            }\n            const points = [\n                `${tipX},${yCenter}`,\n                `${baseX},${yCenter - arrowSize / 2}`,\n                `${baseX},${yCenter + arrowSize / 2}`\n            ].join(\" \");\n            this.arrowEl.setAttribute(\"points\", points);\n        } else {\n            const xCenter = stripX + pct * stripLength;\n            let tipY, baseY;\n            if (position === \"top\") {\n                tipY = stripY + stripThickness;\n                baseY = tipY + arrowSize;\n            } else {\n                tipY = stripY;\n                baseY = tipY - arrowSize;\n            }\n            const points = [\n                `${xCenter},${tipY}`,\n                `${xCenter - arrowSize / 2},${baseY}`,\n                `${xCenter + arrowSize / 2},${baseY}`\n            ].join(\" \");\n            this.arrowEl.setAttribute(\"points\", points);\n        }\n        this.arrowEl.setAttribute(\"opacity\", \"1\");\n        if (this.hoverValueEl) {\n            const fmt = this._getFormatter();\n            this.hoverValueEl.textContent = fmt(val);\n            if (isVertical) {\n                const yCenter = stripY + stripLength - pct * stripLength;\n                if (position === \"left\") this.hoverValueEl.style.left = `${stripX + stripThickness + arrowSize + 8}px`;\n                else {\n                    this.hoverValueEl.style.left = `${stripX - arrowSize - 8}px`;\n                    this.hoverValueEl.style.transform = \"translateX(-100%)\";\n                }\n                this.hoverValueEl.style.top = `${yCenter - 9}px`;\n            } else {\n                const xCenter = stripX + pct * stripLength;\n                this.hoverValueEl.style.left = `${xCenter}px`;\n                this.hoverValueEl.style.transform = \"translateX(-50%)\";\n                if (position === \"top\") this.hoverValueEl.style.top = `${stripY + stripThickness + arrowSize + 8}px`;\n                else this.hoverValueEl.style.top = `${stripY - arrowSize - 18}px`;\n            }\n            this.hoverValueEl.style.opacity = \"1\";\n        }\n    }\n    /**\n   * @param {number} size\n   * @param {string} color\n   * @param {'top'|'right'|'bottom'|'left'} _position\n   */ _buildArrow(size, color, _position) {\n        const polygon = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVG_NS, \"polygon\");\n        polygon.setAttribute(\"fill\", color);\n        polygon.setAttribute(\"opacity\", \"0\");\n        polygon.setAttribute(\"class\", \"apexcharts-heatmap-gradient-arrow\");\n        polygon.setAttribute(\"points\", \"0,0 0,0 0,0\");\n        polygon.setAttribute(\"pointer-events\", \"none\");\n        return polygon;\n    }\n    /**\n   * Build gradient stops + return effective min/max.\n   * - If `colorScale.ranges` is set, stops are placed at each range boundary\n   *   so the gradient reflects the user's discrete palette.\n   * - Otherwise, samples N stops from the same shadeColor function the cells\n   *   use, so the strip visually matches the heatmap.\n   * @returns {{ min: number, max: number, stops: Array<{percent:number,color:string}>, bands: Array<{index:number,p1:number,p2:number}> }}\n   */ _computeStops() {\n        var _a, _b;\n        const w2 = this.w;\n        const cs = $e4b487e979d7c06d$var$HeatmapGradientLegend.colorScaleOf(w2) || {};\n        const cfg = this._cfg();\n        const continuous = $e4b487e979d7c06d$var$buildContinuousScale(w2);\n        if (continuous) {\n            this._continuous = true;\n            return {\n                min: continuous.min,\n                max: continuous.max,\n                stops: continuous.legendStops,\n                bands: []\n            };\n        }\n        this._continuous = false;\n        let dataMin = Infinity;\n        let dataMax = -Infinity;\n        const rows = ((_a = w2.seriesData) == null ? void 0 : _a.series) || [];\n        for(let i2 = 0; i2 < rows.length; i2++){\n            const row = rows[i2];\n            if (!row) continue;\n            for(let j = 0; j < row.length; j++){\n                const v2 = row[j];\n                if (v2 == null || Number.isNaN(v2)) continue;\n                if (v2 < dataMin) dataMin = v2;\n                if (v2 > dataMax) dataMax = v2;\n            }\n        }\n        if (!Number.isFinite(dataMin)) dataMin = 0;\n        if (!Number.isFinite(dataMax)) dataMax = 0;\n        let min = dataMin;\n        let max = dataMax;\n        if (typeof cs.min !== \"undefined\") min = cs.min < dataMin ? cs.min : dataMin;\n        if (typeof cs.max !== \"undefined\") max = cs.max > dataMax ? cs.max : dataMax;\n        const stops = [];\n        const bands = [];\n        if (cs.ranges && cs.ranges.length > 0) {\n            const ranges = cs.ranges.map((r2, originalIndex)=>$e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, r2), {\n                    _originalIndex: originalIndex\n                })).sort((a2, b2)=>a2.from - b2.from);\n            const lo = ranges[0].from;\n            const hi = ranges[ranges.length - 1].to;\n            min = lo;\n            max = hi;\n            const span = hi - lo || 1;\n            ranges.forEach((r2)=>{\n                const p1 = (r2.from - lo) / span;\n                const p2 = (r2.to - lo) / span;\n                stops.push({\n                    percent: (p1 + p2) / 2,\n                    color: r2.color\n                });\n                bands.push({\n                    index: r2._originalIndex,\n                    p1: p1,\n                    p2: p2\n                });\n            });\n        } else {\n            const baseColor = w2.globals.colors[0] || \"#008FFB\";\n            const utils = new $e4b487e979d7c06d$var$Utils$1();\n            const plot = w2.config.plotOptions[w2.config.chart.type] || {};\n            const shadeIntensity = (_b = plot.shadeIntensity) != null ? _b : 0.5;\n            const hasNegs = /** @type {any} */ w2.globals.hasNegs;\n            const n2 = Math.max(2, cfg.stops || 16);\n            for(let s2 = 0; s2 < n2; s2++){\n                const t2 = s2 / (n2 - 1);\n                const v2 = min + t2 * (max - min);\n                const total = Math.abs(max) + Math.abs(min);\n                const percent_v = total === 0 ? 0 : 100 * v2 / total;\n                let colorShadePercent;\n                if (hasNegs) {\n                    if (plot.reverseNegativeShade) colorShadePercent = percent_v < 0 ? percent_v / 100 * (shadeIntensity * 1.25) : (1 - percent_v / 100) * (shadeIntensity * 1.25);\n                    else colorShadePercent = percent_v <= 0 ? 1 - (1 + percent_v / 100) * shadeIntensity : (1 - percent_v / 100) * shadeIntensity;\n                } else colorShadePercent = 1 - percent_v / 100;\n                if (colorShadePercent > 1) colorShadePercent = 1;\n                if (colorShadePercent < -1) colorShadePercent = -1;\n                const shaded = plot.enableShades ? utils.shadeColor(w2.config.theme.mode === \"dark\" ? colorShadePercent * -1 : colorShadePercent, baseColor) : baseColor;\n                stops.push({\n                    percent: t2,\n                    color: shaded\n                });\n            }\n        }\n        return {\n            min: min,\n            max: max,\n            stops: stops,\n            bands: bands\n        };\n    }\n}\nclass $e4b487e979d7c06d$var$Legend {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.updateSeries = (...a2)=>ctx.updateHelpers._updateSeries(...a2);\n        this.onLegendClick = this.onLegendClick.bind(this);\n        this.onLegendHovered = this.onLegendHovered.bind(this);\n        this.isBarsDistributed = this.w.config.chart.type === \"bar\" && this.w.config.plotOptions.bar.distributed && this.w.config.series.length === 1;\n        this.legendHelpers = new $e4b487e979d7c06d$var$Helpers$3(this);\n    }\n    init() {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const cnf = w2.config;\n        this.isBarsDistributed = cnf.chart.type === \"bar\" && cnf.plotOptions.bar.distributed && cnf.series.length === 1;\n        const showLegendAlways = cnf.legend.showForSingleSeries && this.w.seriesData.series.length === 1 || this.isBarsDistributed || // Heatmap legends are colorScale-driven (discrete ranges or the\n        // gradient strip), not series-driven, so they must render even for a\n        // single-row heatmap.\n        cnf.chart.type === \"heatmap\" || // Same for a treemap once it has a gradient strip: a nested treemap is\n        // usually one series, and the strip describes the colour metric rather\n        // than the series.\n        $e4b487e979d7c06d$var$HeatmapGradientLegend.isEnabled(w2) || this.w.seriesData.series.length > 1;\n        this.legendHelpers.appendToForeignObject();\n        if ((showLegendAlways || !gl.axisCharts) && cnf.legend.show) {\n            const elLegendWrap = /** @type {HTMLElement} */ w2.dom.elLegendWrap;\n            while(elLegendWrap.firstChild)elLegendWrap.removeChild(elLegendWrap.firstChild);\n            if (this.heatmapGradientLegend) {\n                this.heatmapGradientLegend.destroy();\n                this.heatmapGradientLegend = null;\n            }\n            if ($e4b487e979d7c06d$var$HeatmapGradientLegend.isEnabled(w2)) {\n                this.heatmapGradientLegend = new $e4b487e979d7c06d$var$HeatmapGradientLegend(w2, this.ctx);\n                this.heatmapGradientLegend.draw();\n            } else {\n                this.drawLegends();\n                if (cnf.legend.position === \"bottom\" || cnf.legend.position === \"top\") this.legendAlignHorizontal();\n                else if (cnf.legend.position === \"right\" || cnf.legend.position === \"left\") this.legendAlignVertical();\n            }\n        }\n    }\n    createLegendMarker({ i: i2, fillcolor: fillcolor }) {\n        const w2 = this.w;\n        const elMarker = $e4b487e979d7c06d$var$BrowserAPIs.createElement(\"span\");\n        elMarker.classList.add(\"apexcharts-legend-marker\");\n        const mShape = w2.config.legend.markers.shape || w2.config.markers.shape;\n        let shape = mShape;\n        if (Array.isArray(mShape)) shape = mShape[i2];\n        const mSize = Array.isArray(w2.config.legend.markers.size) ? parseFloat(w2.config.legend.markers.size[i2]) : parseFloat(w2.config.legend.markers.size);\n        const mOffsetX = Array.isArray(w2.config.legend.markers.offsetX) ? parseFloat(w2.config.legend.markers.offsetX[i2]) : parseFloat(w2.config.legend.markers.offsetX);\n        const mOffsetY = Array.isArray(w2.config.legend.markers.offsetY) ? parseFloat(w2.config.legend.markers.offsetY[i2]) : parseFloat(w2.config.legend.markers.offsetY);\n        const mBorderWidth = Array.isArray(w2.config.legend.markers.strokeWidth) ? parseFloat(w2.config.legend.markers.strokeWidth[i2]) : parseFloat(w2.config.legend.markers.strokeWidth);\n        const mStyle = elMarker.style;\n        mStyle.height = (mSize + mBorderWidth) * 2 + \"px\";\n        mStyle.width = (mSize + mBorderWidth) * 2 + \"px\";\n        mStyle.left = mOffsetX + \"px\";\n        mStyle.top = mOffsetY + \"px\";\n        if (w2.config.legend.markers.customHTML) {\n            mStyle.background = \"transparent\";\n            mStyle.color = fillcolor[i2];\n            if (Array.isArray(w2.config.legend.markers.customHTML)) {\n                if (w2.config.legend.markers.customHTML[i2]) elMarker.innerHTML = w2.config.legend.markers.customHTML[i2]();\n            } else elMarker.innerHTML = w2.config.legend.markers.customHTML();\n        } else {\n            const markers = new $e4b487e979d7c06d$var$Markers(this.ctx.w, this.ctx);\n            const markerConfig = markers.getMarkerConfig({\n                cssClass: `apexcharts-legend-marker apexcharts-marker apexcharts-marker-${shape}`,\n                seriesIndex: i2,\n                strokeWidth: mBorderWidth,\n                size: mSize\n            });\n            const SVGLib = $e4b487e979d7c06d$var$Environment.isBrowser() ? /** @type {any} */ window.SVG : /** @type {any} */ $parcel$global.SVG;\n            const SVGMarker = SVGLib().addTo(elMarker).size(\"100%\", \"100%\");\n            const marker = new $e4b487e979d7c06d$var$Graphics(this.w).drawMarker(0, 0, $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, markerConfig), {\n                pointFillColor: Array.isArray(fillcolor) ? fillcolor[i2] : markerConfig.pointFillColor,\n                shape: shape\n            }));\n            const shapesEls = w2.dom.Paper.find(\".apexcharts-legend-marker.apexcharts-marker\");\n            shapesEls.forEach((shapeEl)=>{\n                if (shapeEl.node.classList.contains(\"apexcharts-marker-triangle\")) shapeEl.node.style.transform = \"translate(50%, 45%)\";\n                else shapeEl.node.style.transform = \"translate(50%, 50%)\";\n            });\n            SVGMarker.add(marker);\n        }\n        return elMarker;\n    }\n    drawLegends() {\n        var _a;\n        const me = this;\n        const w2 = this.w;\n        const elLegendWrap = /** @type {HTMLElement} */ w2.dom.elLegendWrap;\n        const fontFamily = w2.config.legend.fontFamily;\n        let legendNames = w2.seriesData.seriesNames;\n        let fillcolor = w2.config.legend.markers.fillColors ? w2.config.legend.markers.fillColors.slice() : w2.globals.colors.slice();\n        if (w2.config.chart.type === \"heatmap\") {\n            const ranges = w2.config.plotOptions.heatmap.colorScale.ranges;\n            legendNames = ranges.map((colorScale)=>{\n                return colorScale.name ? colorScale.name : colorScale.from + \" - \" + colorScale.to;\n            });\n            fillcolor = ranges.map((color)=>color.color);\n        } else if (this.isBarsDistributed) legendNames = w2.labelData.labels.slice();\n        if (w2.config.legend.customLegendItems.length) legendNames = w2.config.legend.customLegendItems;\n        const legendFormatter = w2.formatters.legendFormatter;\n        const isLegendInversed = w2.config.legend.inverseOrder;\n        const legendGroups = [];\n        if (w2.labelData.seriesGroups.length > 1 && w2.config.legend.clusterGroupedSeries) w2.labelData.seriesGroups.forEach((_, gi)=>{\n            legendGroups[gi] = $e4b487e979d7c06d$var$BrowserAPIs.createElement(\"div\");\n            legendGroups[gi].classList.add(\"apexcharts-legend-group\", `apexcharts-legend-group-${gi}`);\n            if (w2.config.legend.clusterGroupedSeriesOrientation === \"horizontal\") elLegendWrap.classList.add(\"apexcharts-legend-group-horizontal\");\n            else legendGroups[gi].classList.add(\"apexcharts-legend-group-vertical\");\n        });\n        for(let i2 = isLegendInversed ? legendNames.length - 1 : 0; isLegendInversed ? i2 >= 0 : i2 <= legendNames.length - 1; isLegendInversed ? i2-- : i2++){\n            const text = legendFormatter(legendNames[i2], {\n                seriesIndex: i2,\n                w: w2\n            });\n            let collapsedSeries = false;\n            let ancillaryCollapsedSeries = false;\n            if (w2.globals.collapsedSeries.length > 0) {\n                for(let c2 = 0; c2 < w2.globals.collapsedSeries.length; c2++)if (w2.globals.collapsedSeries[c2].index === i2) collapsedSeries = true;\n            }\n            if (w2.globals.ancillaryCollapsedSeriesIndices.length > 0) {\n                for(let c2 = 0; c2 < w2.globals.ancillaryCollapsedSeriesIndices.length; c2++)if (w2.globals.ancillaryCollapsedSeriesIndices[c2] === i2) ancillaryCollapsedSeries = true;\n            }\n            const elMarker = this.createLegendMarker({\n                i: i2,\n                fillcolor: fillcolor\n            });\n            $e4b487e979d7c06d$var$Graphics.setAttrs(elMarker, {\n                rel: i2 + 1,\n                \"data:collapsed\": collapsedSeries || ancillaryCollapsedSeries\n            });\n            if (collapsedSeries || ancillaryCollapsedSeries) elMarker.classList.add(\"apexcharts-inactive-legend\");\n            const elLegend = $e4b487e979d7c06d$var$BrowserAPIs.createElement(\"div\");\n            if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.keyboard.enabled) {\n                elLegend.setAttribute(\"role\", \"button\");\n                elLegend.setAttribute(\"tabindex\", \"0\");\n                const seriesName = Array.isArray(text) ? text.join(\" \") : text;\n                const isCollapsed = collapsedSeries || ancillaryCollapsedSeries;\n                const statusText = isCollapsed ? \"hidden\" : \"visible\";\n                elLegend.setAttribute(\"aria-label\", `${seriesName}, ${statusText}. Press Enter or Space to toggle.`);\n                elLegend.setAttribute(\"aria-pressed\", isCollapsed ? \"true\" : \"false\");\n            }\n            const elLegendText = $e4b487e979d7c06d$var$BrowserAPIs.createElement(\"span\");\n            elLegendText.classList.add(\"apexcharts-legend-text\");\n            elLegendText.innerHTML = Array.isArray(text) ? text.join(\" \") : text;\n            let textColor = w2.config.legend.labels.useSeriesColors ? w2.globals.colors[i2] : Array.isArray(w2.config.legend.labels.colors) ? (_a = w2.config.legend.labels.colors) == null ? void 0 : _a[i2] : w2.config.legend.labels.colors;\n            if (!textColor) textColor = w2.config.chart.foreColor;\n            elLegendText.style.color = textColor;\n            elLegendText.style.fontSize = w2.config.legend.fontSize;\n            elLegendText.style.fontWeight = w2.config.legend.fontWeight;\n            elLegendText.style.fontFamily = fontFamily || w2.config.chart.fontFamily;\n            $e4b487e979d7c06d$var$Graphics.setAttrs(elLegendText, {\n                rel: i2 + 1,\n                i: i2,\n                \"data:default-text\": encodeURIComponent(text),\n                \"data:collapsed\": collapsedSeries || ancillaryCollapsedSeries\n            });\n            elLegend.appendChild(elMarker);\n            elLegend.appendChild(elLegendText);\n            const coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n            if (!w2.config.legend.showForZeroSeries) {\n                const total = coreUtils.getSeriesTotalByIndex(i2);\n                if (total === 0 && coreUtils.seriesHaveSameValues(i2) && !coreUtils.isSeriesNull(i2) && w2.globals.collapsedSeriesIndices.indexOf(i2) === -1 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(i2) === -1) elLegend.classList.add(\"apexcharts-hidden-zero-series\");\n            }\n            if (!w2.config.legend.showForNullSeries) {\n                if (coreUtils.isSeriesNull(i2) && w2.globals.collapsedSeriesIndices.indexOf(i2) === -1 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(i2) === -1) elLegend.classList.add(\"apexcharts-hidden-null-series\");\n            }\n            if (legendGroups.length) w2.labelData.seriesGroups.forEach((group, gi)=>{\n                var _a2, _b;\n                if (group.includes(/** @type {Record<string,any>} */ (_b = (_a2 = w2.config.series[i2]) == null ? void 0 : _a2.name) != null ? _b : \"\")) {\n                    elLegendWrap.appendChild(legendGroups[gi]);\n                    legendGroups[gi].appendChild(elLegend);\n                }\n            });\n            else elLegendWrap.appendChild(elLegend);\n            elLegendWrap.classList.add(`apexcharts-align-${w2.config.legend.horizontalAlign}`);\n            elLegendWrap.classList.add(\"apx-legend-position-\" + w2.config.legend.position);\n            elLegend.classList.add(\"apexcharts-legend-series\");\n            elLegend.style.margin = `${w2.config.legend.itemMargin.vertical}px ${w2.config.legend.itemMargin.horizontal}px`;\n            elLegendWrap.style.width = w2.config.legend.width ? w2.config.legend.width + \"px\" : \"\";\n            elLegendWrap.style.height = w2.config.legend.height ? w2.config.legend.height + \"px\" : \"\";\n            $e4b487e979d7c06d$var$Graphics.setAttrs(elLegend, {\n                rel: i2 + 1,\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(legendNames[i2]),\n                \"data:collapsed\": collapsedSeries || ancillaryCollapsedSeries\n            });\n            if (collapsedSeries || ancillaryCollapsedSeries) elLegend.classList.add(\"apexcharts-inactive-legend\");\n            if (!w2.config.legend.onItemClick.toggleDataSeries) elLegend.classList.add(\"apexcharts-no-click\");\n        }\n        w2.dom.elWrap.addEventListener(\"click\", me.onLegendClick, true);\n        if (w2.config.legend.onItemHover.highlightDataSeries && w2.config.legend.customLegendItems.length === 0) {\n            w2.dom.elWrap.addEventListener(\"mousemove\", me.onLegendHovered, true);\n            w2.dom.elWrap.addEventListener(\"mouseout\", me.onLegendHovered, true);\n        }\n        if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.keyboard.enabled) w2.dom.elWrap.addEventListener(\"keydown\", me.onLegendKeyDown.bind(me), true);\n    }\n    /**\n   * @param {number} offsetX\n   * @param {number} offsetY\n   */ setLegendWrapXY(offsetX, offsetY) {\n        const w2 = this.w;\n        const elLegendWrap = /** @type {HTMLElement} */ w2.dom.elLegendWrap;\n        const legendHeight = elLegendWrap.clientHeight;\n        let x = 0;\n        let y = 0;\n        if (w2.config.legend.position === \"bottom\") y = w2.globals.svgHeight - Math.min(legendHeight, w2.globals.svgHeight / 2) - 5;\n        else if (w2.config.legend.position === \"top\") {\n            const dim = new $e4b487e979d7c06d$var$Dimensions(this.w, this.ctx);\n            const titleH = dim.dimHelpers.getTitleSubtitleCoords(\"title\").height;\n            const subtitleH = dim.dimHelpers.getTitleSubtitleCoords(\"subtitle\").height;\n            y = (titleH > 0 ? titleH - 10 : 0) + (subtitleH > 0 ? subtitleH - 10 : 0);\n        }\n        elLegendWrap.style.position = \"absolute\";\n        x = x + offsetX + w2.config.legend.offsetX;\n        y = y + offsetY + w2.config.legend.offsetY;\n        elLegendWrap.style.left = x + \"px\";\n        elLegendWrap.style.top = y + \"px\";\n        if (w2.config.legend.position === \"right\") {\n            elLegendWrap.style.left = \"auto\";\n            elLegendWrap.style.right = 25 + w2.config.legend.offsetX + \"px\";\n        }\n        const fixedHeigthWidth = /** @type {const} */ [\n            \"width\",\n            \"height\"\n        ];\n        fixedHeigthWidth.forEach((hw)=>{\n            if (elLegendWrap && elLegendWrap.style[hw]) elLegendWrap.style[hw] = parseInt(String(w2.config.legend[hw]), 10) + \"px\";\n        });\n    }\n    legendAlignHorizontal() {\n        const w2 = this.w;\n        const elLegendWrap = /** @type {HTMLElement} */ w2.dom.elLegendWrap;\n        elLegendWrap.style.right = \"0\";\n        const dimensions = new $e4b487e979d7c06d$var$Dimensions(this.w, this.ctx);\n        const titleRect = dimensions.dimHelpers.getTitleSubtitleCoords(\"title\");\n        const subtitleRect = dimensions.dimHelpers.getTitleSubtitleCoords(\"subtitle\");\n        const offsetX = 20;\n        let offsetY = 0;\n        if (w2.config.legend.position === \"top\") offsetY = titleRect.height + subtitleRect.height + w2.config.title.margin + w2.config.subtitle.margin - 10;\n        this.setLegendWrapXY(offsetX, offsetY);\n    }\n    legendAlignVertical() {\n        const w2 = this.w;\n        const lRect = this.legendHelpers.getLegendDimensions();\n        const offsetY = 20;\n        let offsetX = 0;\n        if (w2.config.legend.position === \"left\") offsetX = 20;\n        if (w2.config.legend.position === \"right\") offsetX = w2.globals.svgWidth - lRect.clww - 10;\n        this.setLegendWrapXY(offsetX, offsetY);\n    }\n    /**\n   * @param {MouseEvent} e\n   */ onLegendHovered(e2) {\n        var _a;\n        const w2 = this.w;\n        const target = /** @type {Element} */ e2.target;\n        const hoverOverLegend = target.classList.contains(\"apexcharts-legend-series\") || target.classList.contains(\"apexcharts-legend-text\") || target.classList.contains(\"apexcharts-legend-marker\");\n        if (w2.config.chart.type !== \"heatmap\" && !this.isBarsDistributed) {\n            if (!target.classList.contains(\"apexcharts-inactive-legend\") && hoverOverLegend) {\n                const series = new $e4b487e979d7c06d$var$Series(this.ctx.w);\n                series.toggleSeriesOnHover(e2, target);\n            }\n        } else if (hoverOverLegend) {\n            const seriesCnt = parseInt((_a = target.getAttribute(\"rel\")) != null ? _a : \"0\", 10) - 1;\n            this.ctx.events.fireEvent(\"legendHover\", [\n                this.ctx,\n                seriesCnt,\n                this.w\n            ]);\n            const series = new $e4b487e979d7c06d$var$Series(this.ctx.w);\n            if (e2.type === \"mousemove\") series.highlightRangeInSeries(seriesCnt, \"highlight\");\n            else if (e2.type === \"mouseout\") series.highlightRangeInSeries(seriesCnt, \"reset\");\n        }\n    }\n    /**\n   * @param {KeyboardEvent} e\n   */ onLegendKeyDown(e2) {\n        const me = this;\n        const w2 = this.w;\n        const target = /** @type {Element} */ e2.target;\n        const isLegendItem = target.classList.contains(\"apexcharts-legend-series\") || target.classList.contains(\"apexcharts-legend-text\") || target.classList.contains(\"apexcharts-legend-marker\");\n        if (!isLegendItem) return;\n        if (e2.key === \"Enter\" || e2.key === \" \") {\n            e2.preventDefault();\n            const rel = target.getAttribute(\"rel\");\n            me.onLegendClick(e2);\n            if (rel !== null && w2.config.legend.onItemClick.toggleDataSeries) requestAnimationFrame(()=>{\n                const restored = w2.dom.baseEl.querySelector(`.apexcharts-legend-series[rel=\"${rel}\"]`);\n                if (restored) restored.focus();\n            });\n        }\n    }\n    /**\n   * @param {Event} e\n   */ onLegendClick(e2) {\n        var _a;\n        const w2 = this.w;\n        const target = /** @type {Element} */ e2.target;\n        if (w2.config.legend.customLegendItems.length) return;\n        if (target.classList.contains(\"apexcharts-legend-series\") || target.classList.contains(\"apexcharts-legend-text\") || target.classList.contains(\"apexcharts-legend-marker\")) {\n            const seriesCnt = parseInt((_a = target.getAttribute(\"rel\")) != null ? _a : \"0\", 10) - 1;\n            const isHidden = target.getAttribute(\"data:collapsed\") === \"true\";\n            const legendClick = this.w.config.chart.events.legendClick;\n            if (typeof legendClick === \"function\") legendClick(this.ctx, seriesCnt, this.w);\n            this.ctx.events.fireEvent(\"legendClick\", [\n                this.ctx,\n                seriesCnt,\n                this.w\n            ]);\n            const markerClick = this.w.config.legend.markers.onClick;\n            if (typeof markerClick === \"function\" && target.classList.contains(\"apexcharts-legend-marker\")) {\n                markerClick(this.ctx, seriesCnt, this.w);\n                this.ctx.events.fireEvent(\"legendMarkerClick\", [\n                    this.ctx,\n                    seriesCnt,\n                    this.w\n                ]);\n            }\n            const clickAllowed = w2.config.chart.type !== \"treemap\" && w2.config.chart.type !== \"heatmap\" && !this.isBarsDistributed;\n            if (clickAllowed && w2.config.legend.onItemClick.toggleDataSeries) this.legendHelpers.toggleDataSeries(seriesCnt, isHidden);\n        }\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    legend: $e4b487e979d7c06d$var$Legend\n});\nconst $e4b487e979d7c06d$var$icoPan = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M5 9 2 12l3 3\"/>\\n    <path d=\"M9 5l3-3 3 3\"/>\\n    <path d=\"M15 19l-3 3-3-3\"/>\\n    <path d=\"M19 9l3 3-3 3\"/>\\n    <path d=\"M2 12h20\"/>\\n    <path d=\"M12 2v20\"/>\\n</svg>\\n';\nconst $e4b487e979d7c06d$var$icoZoom = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <circle cx=\"11\" cy=\"11\" r=\"7\"/>\\n    <path d=\"m21 21-4.3-4.3M8 11h6M11 8v6\"/>\\n</svg>\\n';\nconst $e4b487e979d7c06d$var$icoReset = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\"/>\\n    <path d=\"M3 3v5h5\"/>\\n</svg>\\n';\nconst $e4b487e979d7c06d$var$icoZoomIn = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M12 5v14M5 12h14\"/>\\n</svg>\\n';\nconst $e4b487e979d7c06d$var$icoZoomOut = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M5 12h14\"/>\\n</svg>\\n';\nconst $e4b487e979d7c06d$var$icoSelect = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M5 3a2 2 0 0 0-2 2\"/>\\n    <path d=\"M19 3a2 2 0 0 1 2 2\"/>\\n    <path d=\"M21 19a2 2 0 0 1-2 2\"/>\\n    <path d=\"M5 21a2 2 0 0 1-2-2\"/>\\n    <path d=\"M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1\"/>\\n</svg>\\n';\nconst $e4b487e979d7c06d$var$icoMeasure = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.4 2.4 0 0 1 0-3.4l2.6-2.6a2.4 2.4 0 0 1 3.4 0Z\"/>\\n    <path d=\"m14.5 12.5 2-2\"/>\\n    <path d=\"m11.5 9.5 2-2\"/>\\n    <path d=\"m8.5 6.5 2-2\"/>\\n    <path d=\"m17.5 15.5 2-2\"/>\\n</svg>\\n';\nconst $e4b487e979d7c06d$var$icoMenu = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M4 6h16M4 12h16M4 18h16\"/>\\n</svg>\\n';\nclass $e4b487e979d7c06d$var$Toolbar {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.ev = this.w.config.chart.events;\n        this.selectedClass = \"apexcharts-selected\";\n        this.localeValues = this.w.globals.locale.toolbar;\n        this.minX = w2.globals.minX;\n        this.maxX = w2.globals.maxX;\n        this.elZoom = null;\n        this.elZoomIn = null;\n        this.elZoomOut = null;\n        this.elPan = null;\n        this.elSelection = null;\n        this.elMeasure = null;\n        this.elZoomReset = null;\n        this.elMenuIcon = null;\n        this.elMenu = null;\n        this.elMenuItems = [];\n        this.t = null;\n    }\n    createToolbar() {\n        var _a, _b;\n        const w2 = this.w;\n        const createDiv = ()=>{\n            return $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n        };\n        const createBtn = ()=>{\n            const btn = /** @type {HTMLButtonElement} */ $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"button\");\n            btn.setAttribute(\"type\", \"button\");\n            return btn;\n        };\n        const elToolbarWrap = createDiv();\n        elToolbarWrap.setAttribute(\"class\", \"apexcharts-toolbar\");\n        elToolbarWrap.style.top = w2.config.chart.toolbar.offsetY + \"px\";\n        elToolbarWrap.style.right = -w2.config.chart.toolbar.offsetX + 3 + \"px\";\n        w2.dom.elWrap.appendChild(elToolbarWrap);\n        this.elZoom = createBtn();\n        this.elZoomIn = createBtn();\n        this.elZoomOut = createBtn();\n        this.elPan = createBtn();\n        this.elSelection = createBtn();\n        this.elMeasure = createBtn();\n        this.elZoomReset = createBtn();\n        this.elMenuIcon = createBtn();\n        this.elMenu = createDiv();\n        this.elCustomIcons = [];\n        this.t = w2.config.chart.toolbar.tools;\n        if (Array.isArray(this.t.customIcons)) for(let i2 = 0; i2 < this.t.customIcons.length; i2++)this.elCustomIcons.push(createBtn());\n        const toolbarControls = [];\n        const appendZoomControl = (type, el, ico)=>{\n            const tool = type.toLowerCase();\n            if (this.t[tool] && w2.config.chart.zoom.enabled) toolbarControls.push({\n                el: el,\n                icon: typeof this.t[tool] === \"string\" ? this.t[tool] : ico,\n                title: /** @type {any} */ this.localeValues[type],\n                class: `apexcharts-${tool}-icon`\n            });\n        };\n        appendZoomControl(\"zoomIn\", this.elZoomIn, $e4b487e979d7c06d$var$icoZoomIn);\n        appendZoomControl(\"zoomOut\", this.elZoomOut, $e4b487e979d7c06d$var$icoZoomOut);\n        const zoomSelectionCtrls = (z)=>{\n            if (this.t[z] && w2.config.chart[z].enabled) toolbarControls.push({\n                el: z === \"zoom\" ? this.elZoom : this.elSelection,\n                icon: typeof this.t[z] === \"string\" ? this.t[z] : z === \"zoom\" ? $e4b487e979d7c06d$var$icoZoom : $e4b487e979d7c06d$var$icoSelect,\n                title: /** @type {any} */ this.localeValues[z === \"zoom\" ? \"selectionZoom\" : \"selection\"],\n                class: `apexcharts-${z}-icon`\n            });\n        };\n        zoomSelectionCtrls(\"zoom\");\n        zoomSelectionCtrls(\"selection\");\n        if (this.t.pan && w2.config.chart.zoom.enabled) toolbarControls.push({\n            el: this.elPan,\n            icon: typeof this.t.pan === \"string\" ? this.t.pan : $e4b487e979d7c06d$var$icoPan,\n            title: this.localeValues.pan,\n            class: \"apexcharts-pan-icon\"\n        });\n        if (this.t.measure && w2.config.chart.measure && w2.config.chart.measure.enabled) toolbarControls.push({\n            el: this.elMeasure,\n            icon: typeof this.t.measure === \"string\" ? this.t.measure : $e4b487e979d7c06d$var$icoMeasure,\n            title: /** @type {any} */ this.localeValues.measure || \"Measure\",\n            class: \"apexcharts-measure-icon\"\n        });\n        appendZoomControl(\"reset\", this.elZoomReset, $e4b487e979d7c06d$var$icoReset);\n        if (this.t.download) toolbarControls.push({\n            el: this.elMenuIcon,\n            icon: typeof this.t.download === \"string\" ? this.t.download : $e4b487e979d7c06d$var$icoMenu,\n            title: this.localeValues.menu,\n            class: \"apexcharts-menu-icon\"\n        });\n        for(let i2 = 0; i2 < this.elCustomIcons.length; i2++)toolbarControls.push({\n            el: this.elCustomIcons[i2],\n            icon: this.t.customIcons[i2].icon,\n            title: this.t.customIcons[i2].title,\n            index: this.t.customIcons[i2].index,\n            class: \"apexcharts-toolbar-custom-icon \" + this.t.customIcons[i2].class\n        });\n        toolbarControls.forEach((t2, index)=>{\n            if (t2.index) $e4b487e979d7c06d$var$Utils$1.moveIndexInArray(toolbarControls, index, t2.index);\n        });\n        for(let i2 = 0; i2 < toolbarControls.length; i2++){\n            $e4b487e979d7c06d$var$Graphics.setAttrs(toolbarControls[i2].el, {\n                class: toolbarControls[i2].class,\n                title: toolbarControls[i2].title,\n                \"aria-label\": toolbarControls[i2].title\n            });\n            toolbarControls[i2].el.innerHTML = toolbarControls[i2].icon;\n            elToolbarWrap.appendChild(toolbarControls[i2].el);\n        }\n        if (this.elZoom.parentNode) this.elZoom.setAttribute(\"aria-pressed\", String(!!w2.interact.zoomEnabled));\n        if (this.elSelection.parentNode) this.elSelection.setAttribute(\"aria-pressed\", String(!!w2.interact.selectionEnabled));\n        if (this.elPan.parentNode) this.elPan.setAttribute(\"aria-pressed\", String(!!w2.interact.panEnabled));\n        if (this.elMeasure.parentNode) this.elMeasure.setAttribute(\"aria-pressed\", String(!!w2.interact.measureEnabled));\n        if (this.elMenuIcon.parentNode) {\n            this.elMenuIcon.setAttribute(\"aria-haspopup\", \"true\");\n            this.elMenuIcon.setAttribute(\"aria-expanded\", \"false\");\n        }\n        this._createHamburgerMenu(elToolbarWrap);\n        if (w2.interact.zoomEnabled) this.elZoom.classList.add(this.selectedClass);\n        else if (w2.interact.panEnabled) this.elPan.classList.add(this.selectedClass);\n        else if (w2.interact.selectionEnabled) this.elSelection.classList.add(this.selectedClass);\n        else if (w2.interact.measureEnabled && this.elMeasure) {\n            this.elMeasure.classList.add(this.selectedClass);\n            (_b = (_a = this.ctx.measure) == null ? void 0 : _a.startMeasure) == null || _b.call(_a);\n        }\n        this.addToolbarEventListeners();\n    }\n    /**\n   * @param {Element} parent\n   */ _createHamburgerMenu(parent) {\n        this.elMenuItems = [];\n        parent.appendChild(/** @type {Node} */ this.elMenu);\n        $e4b487e979d7c06d$var$Graphics.setAttrs(this.elMenu, {\n            class: \"apexcharts-menu\",\n            role: \"menu\"\n        });\n        const menuItems = [\n            {\n                name: \"exportSVG\",\n                title: this.localeValues.exportToSVG\n            },\n            {\n                name: \"exportPNG\",\n                title: this.localeValues.exportToPNG\n            },\n            {\n                name: \"exportCSV\",\n                title: this.localeValues.exportToCSV\n            }\n        ];\n        for(let i2 = 0; i2 < menuItems.length; i2++){\n            this.elMenuItems.push($e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\"));\n            this.elMenuItems[i2].innerHTML = menuItems[i2].title;\n            $e4b487e979d7c06d$var$Graphics.setAttrs(this.elMenuItems[i2], {\n                class: `apexcharts-menu-item ${menuItems[i2].name}`,\n                title: menuItems[i2].title,\n                role: \"menuitem\",\n                tabindex: \"-1\"\n            });\n            this.elMenu.appendChild(this.elMenuItems[i2]);\n        }\n    }\n    addToolbarEventListeners() {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n        (_a = this.elZoomReset) == null || _a.addEventListener(\"click\", this.handleZoomReset.bind(this));\n        (_b = this.elSelection) == null || _b.addEventListener(\"click\", this.toggleZoomSelection.bind(this, \"selection\"));\n        (_c = this.elZoom) == null || _c.addEventListener(\"click\", this.toggleZoomSelection.bind(this, \"zoom\"));\n        (_d = this.elZoomIn) == null || _d.addEventListener(\"click\", this.handleZoomIn.bind(this));\n        (_e = this.elZoomOut) == null || _e.addEventListener(\"click\", this.handleZoomOut.bind(this));\n        (_f = this.elPan) == null || _f.addEventListener(\"click\", this.togglePanning.bind(this));\n        (_g = this.elMeasure) == null || _g.addEventListener(\"click\", this.toggleMeasure.bind(this));\n        (_h = this.elMenuIcon) == null || _h.addEventListener(\"click\", this.toggleMenu.bind(this));\n        this.elMenuItems.forEach((m2)=>{\n            if (m2.classList.contains(\"exportSVG\")) m2.addEventListener(\"click\", this.handleDownload.bind(this, \"svg\"));\n            else if (m2.classList.contains(\"exportPNG\")) m2.addEventListener(\"click\", this.handleDownload.bind(this, \"png\"));\n            else if (m2.classList.contains(\"exportCSV\")) m2.addEventListener(\"click\", this.handleDownload.bind(this, \"csv\"));\n        });\n        for(let i2 = 0; i2 < this.t.customIcons.length; i2++)this.elCustomIcons[i2].addEventListener(\"click\", this.t.customIcons[i2].click.bind(this, this.ctx, this.ctx.w));\n        const toolbarButtons = [\n            this.elZoomReset,\n            this.elSelection,\n            this.elZoom,\n            this.elZoomIn,\n            this.elZoomOut,\n            this.elPan,\n            this.elMeasure,\n            this.elMenuIcon,\n            ...this.elCustomIcons\n        ];\n        toolbarButtons.forEach((btn)=>{\n            btn.addEventListener(\"keydown\", (e2)=>{\n                if (e2.key === \"Enter\" || e2.key === \" \") {\n                    e2.preventDefault();\n                    const btnClass = btn.className;\n                    btn.click();\n                    requestAnimationFrame(()=>{\n                        const baseEl = this.w.dom.baseEl;\n                        if (!baseEl) return;\n                        const apexClass = btnClass.split(\" \").find((c2)=>c2.startsWith(\"apexcharts-\"));\n                        if (!apexClass) return;\n                        const restored = baseEl.querySelector(`.${apexClass}`);\n                        if (restored) restored.focus();\n                    });\n                }\n            });\n        });\n        (_i = this.elMenuIcon) == null || _i.addEventListener(\"keydown\", (e2)=>{\n            var _a2;\n            if (e2.key === \"ArrowDown\" || e2.key === \"ArrowUp\") {\n                e2.preventDefault();\n                if (!((_a2 = this.elMenu) == null ? void 0 : _a2.classList.contains(\"apexcharts-menu-open\"))) this.toggleMenu();\n                window.setTimeout(()=>{\n                    const idx = e2.key === \"ArrowDown\" ? 0 : this.elMenuItems.length - 1;\n                    if (this.elMenuItems[idx]) this.elMenuItems[idx].focus();\n                }, 20);\n            }\n        });\n        this.elMenuItems.forEach((m2, idx)=>{\n            m2.addEventListener(\"keydown\", (e2)=>{\n                var _a2;\n                if (e2.key === \"ArrowDown\") {\n                    e2.preventDefault();\n                    const next = this.elMenuItems[idx + 1] || this.elMenuItems[0];\n                    next.focus();\n                } else if (e2.key === \"ArrowUp\") {\n                    e2.preventDefault();\n                    const prev = this.elMenuItems[idx - 1] || this.elMenuItems[this.elMenuItems.length - 1];\n                    prev.focus();\n                } else if (e2.key === \"Escape\" || e2.key === \"Tab\") {\n                    this._closeMenu();\n                    (_a2 = this.elMenuIcon) == null || _a2.focus();\n                    if (e2.key === \"Tab\") ;\n                    else e2.preventDefault();\n                } else if (e2.key === \"Enter\" || e2.key === \" \") {\n                    e2.preventDefault();\n                    m2.click();\n                }\n            });\n        });\n    }\n    /**\n   * @param {string} type\n   */ toggleZoomSelection(type) {\n        const charts = this.ctx.getSyncedCharts();\n        charts.forEach((ch)=>{\n            const tb = ch.ctx.toolbar;\n            const enabledType = type === \"selection\" ? \"selectionEnabled\" : \"zoomEnabled\";\n            const wasEnabled = !!ch.w.globals[enabledType];\n            tb.toggleOtherControls();\n            const el = type === \"selection\" ? tb.elSelection : tb.elZoom;\n            if (!wasEnabled) {\n                ch.w.globals[enabledType] = true;\n                el.classList.add(tb.selectedClass);\n            }\n            el.setAttribute(\"aria-pressed\", String(!!ch.w.globals[enabledType]));\n        });\n    }\n    /**\n   * Toggle the measure ruler tool. Mutually exclusive with zoom/pan/selection\n   * (toggleOtherControls deselects those and disarms any active measure), so a\n   * fresh enable arms the ruler via the Measure module's sticky mode.\n   */ toggleMeasure() {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        const enabling = !w2.interact.measureEnabled;\n        this.toggleOtherControls();\n        if (enabling) {\n            w2.interact.measureEnabled = true;\n            (_a = this.elMeasure) == null || _a.classList.add(this.selectedClass);\n            (_c = (_b = this.ctx.measure) == null ? void 0 : _b.startMeasure) == null || _c.call(_b);\n        }\n        (_d = this.elMeasure) == null || _d.setAttribute(\"aria-pressed\", String(w2.interact.measureEnabled));\n    }\n    getToolbarIconsReference() {\n        const w2 = this.w;\n        if (!this.elZoom) this.elZoom = w2.dom.baseEl.querySelector(\".apexcharts-zoom-icon\");\n        if (!this.elPan) this.elPan = w2.dom.baseEl.querySelector(\".apexcharts-pan-icon\");\n        if (!this.elSelection) this.elSelection = w2.dom.baseEl.querySelector(\".apexcharts-selection-icon\");\n        if (!this.elMeasure) this.elMeasure = w2.dom.baseEl.querySelector(\".apexcharts-measure-icon\");\n    }\n    /**\n   * @param {string} type\n   */ enableZoomPanFromToolbar(type) {\n        this.toggleOtherControls();\n        type === \"pan\" ? this.w.interact.panEnabled = true : this.w.interact.zoomEnabled = true;\n        const el = type === \"pan\" ? this.elPan : this.elZoom;\n        const el2 = type === \"pan\" ? this.elZoom : this.elPan;\n        if (el) el.classList.add(this.selectedClass);\n        if (el2) el2.classList.remove(this.selectedClass);\n    }\n    togglePanning() {\n        const charts = this.ctx.getSyncedCharts();\n        charts.forEach((ch)=>{\n            const tb = ch.ctx.toolbar;\n            const wasEnabled = !!ch.w.interact.panEnabled;\n            tb.toggleOtherControls();\n            if (!wasEnabled) {\n                ch.w.interact.panEnabled = true;\n                tb.elPan.classList.add(tb.selectedClass);\n            }\n            tb.elPan.setAttribute(\"aria-pressed\", String(!!ch.w.interact.panEnabled));\n        });\n    }\n    toggleOtherControls() {\n        var _a, _b, _c;\n        const w2 = this.w;\n        w2.interact.panEnabled = false;\n        w2.interact.zoomEnabled = false;\n        w2.interact.selectionEnabled = false;\n        if (w2.interact.measureEnabled) {\n            w2.interact.measureEnabled = false;\n            (_b = (_a = this.ctx.measure) == null ? void 0 : _a.stopMeasure) == null || _b.call(_a);\n            (_c = this.elMeasure) == null || _c.setAttribute(\"aria-pressed\", \"false\");\n        }\n        this.getToolbarIconsReference();\n        const toggleEls = [\n            this.elPan,\n            this.elSelection,\n            this.elZoom,\n            this.elMeasure\n        ];\n        toggleEls.forEach((el)=>{\n            if (el) el.classList.remove(this.selectedClass);\n        });\n    }\n    /**\n   * Read the current x-range from globals at click time.\n   * Toolbar instance is kept alive across updates (Phase 8 lazy\n   * instantiation), so cached this.minX/maxX go stale after a zoom.\n   * @returns {{minX: number, maxX: number}}\n   */ _currentXRange() {\n        const w2 = this.w;\n        if (w2.axisFlags.isRangeBar) return {\n            minX: w2.globals.minY,\n            maxX: w2.globals.maxY\n        };\n        return {\n            minX: w2.globals.minX,\n            maxX: w2.globals.maxX\n        };\n    }\n    handleZoomIn() {\n        const w2 = this.w;\n        const { minX: minX, maxX: maxX } = this._currentXRange();\n        this.minX = minX;\n        this.maxX = maxX;\n        const centerX = (minX + maxX) / 2;\n        const newMinX = (minX + centerX) / 2;\n        const newMaxX = (maxX + centerX) / 2;\n        const newMinXMaxX = this._getNewMinXMaxX(newMinX, newMaxX);\n        if (!w2.interact.disableZoomIn) this.zoomUpdateOptions(newMinXMaxX.minX, newMinXMaxX.maxX);\n    }\n    handleZoomOut() {\n        const w2 = this.w;\n        const { minX: minX, maxX: maxX } = this._currentXRange();\n        this.minX = minX;\n        this.maxX = maxX;\n        if (w2.config.xaxis.type === \"datetime\" && new Date(minX).getUTCFullYear() < 1e3) return;\n        const centerX = (minX + maxX) / 2;\n        const newMinX = minX - (centerX - minX);\n        const newMaxX = maxX - (centerX - maxX);\n        const newMinXMaxX = this._getNewMinXMaxX(newMinX, newMaxX);\n        if (!w2.interact.disableZoomOut) this.zoomUpdateOptions(newMinXMaxX.minX, newMinXMaxX.maxX);\n    }\n    /**\n   * @param {number} newMinX\n   * @param {number} newMaxX\n   */ _getNewMinXMaxX(newMinX, newMaxX) {\n        const shouldFloor = this.w.config.xaxis.convertedCatToNumeric;\n        return {\n            minX: shouldFloor ? Math.floor(newMinX) : newMinX,\n            maxX: shouldFloor ? Math.floor(newMaxX) : newMaxX\n        };\n    }\n    /**\n   * @param {number} newMinX\n   * @param {number} newMaxX\n   */ zoomUpdateOptions(newMinX, newMaxX) {\n        const w2 = this.w;\n        if (newMinX === void 0 && newMaxX === void 0) {\n            this.handleZoomReset();\n            return;\n        }\n        if (w2.config.xaxis.convertedCatToNumeric) {\n            if (newMinX < 1) {\n                newMinX = 1;\n                newMaxX = w2.globals.dataPoints;\n            }\n            if (newMaxX - newMinX < 2) return;\n        }\n        let xaxis = {\n            min: newMinX,\n            max: newMaxX\n        };\n        const beforeZoomRange = this.getBeforeZoomRange(xaxis, /** @type {any} */ void 0);\n        if (beforeZoomRange) xaxis = beforeZoomRange.xaxis;\n        const options2 = {\n            xaxis: xaxis\n        };\n        if (!w2.globals.initialConfig) return;\n        const yaxis = $e4b487e979d7c06d$var$Utils$1.clone(w2.globals.initialConfig.yaxis);\n        if (!w2.config.chart.group) options2.yaxis = yaxis;\n        this.w.interact.zoomed = true;\n        this.ctx.updateHelpers._updateOptions(options2, false, this.w.config.chart.animations.dynamicAnimation.enabled);\n        this.zoomCallback(xaxis, yaxis);\n    }\n    /**\n   * @param {Record<string, any>} xaxis\n   * @param {Record<string, any>} yaxis\n   */ zoomCallback(xaxis, yaxis) {\n        if (typeof this.ev.zoomed === \"function\") {\n            this.ev.zoomed(this.ctx, {\n                xaxis: xaxis,\n                yaxis: yaxis\n            });\n            this.ctx.events.fireEvent(\"zoomed\", {\n                xaxis: xaxis,\n                yaxis: yaxis\n            });\n        }\n    }\n    /**\n   * @param {Record<string, any>} xaxis\n   * @param {Record<string, any>} yaxis\n   */ getBeforeZoomRange(xaxis, yaxis) {\n        let newRange = null;\n        if (typeof this.ev.beforeZoom === \"function\") newRange = this.ev.beforeZoom(this, {\n            xaxis: xaxis,\n            yaxis: yaxis\n        });\n        return newRange;\n    }\n    toggleMenu() {\n        window.setTimeout(()=>{\n            var _a, _b, _c;\n            if ((_a = this.elMenu) == null ? void 0 : _a.classList.contains(\"apexcharts-menu-open\")) this._closeMenu();\n            else {\n                (_b = this.elMenu) == null || _b.classList.add(\"apexcharts-menu-open\");\n                (_c = this.elMenuIcon) == null || _c.setAttribute(\"aria-expanded\", \"true\");\n            }\n        }, 0);\n    }\n    _closeMenu() {\n        var _a, _b;\n        (_a = this.elMenu) == null || _a.classList.remove(\"apexcharts-menu-open\");\n        (_b = this.elMenuIcon) == null || _b.setAttribute(\"aria-expanded\", \"false\");\n    }\n    /**\n   * @param {string} type\n   */ handleDownload(type) {\n        const w2 = this.w;\n        const exprt = new $e4b487e979d7c06d$var$Exports(this.w, this.ctx);\n        switch(type){\n            case \"svg\":\n                exprt.exportToSVG();\n                break;\n            case \"png\":\n                exprt.exportToPng();\n                break;\n            case \"csv\":\n                exprt.exportToCSV({\n                    series: w2.config.series,\n                    columnDelimiter: w2.config.chart.toolbar.export.csv.columnDelimiter\n                });\n                break;\n        }\n    }\n    handleZoomReset() {\n        const charts = this.ctx.getSyncedCharts();\n        charts.forEach((ch)=>{\n            const w2 = ch.w;\n            if (!w2.interact.zoomed) return;\n            w2.globals.lastXAxis.min = w2.globals.initialConfig.xaxis.min;\n            w2.globals.lastXAxis.max = w2.globals.initialConfig.xaxis.max;\n            ch.updateHelpers.revertDefaultAxisMinMax();\n            if (typeof w2.config.chart.events.beforeResetZoom === \"function\") {\n                const resetZoomRange = w2.config.chart.events.beforeResetZoom(ch, w2);\n                if (resetZoomRange) ch.updateHelpers.revertDefaultAxisMinMax(resetZoomRange);\n            }\n            if (typeof w2.config.chart.events.zoomed === \"function\") ch.ctx.toolbar.zoomCallback({\n                min: w2.config.xaxis.min,\n                max: w2.config.xaxis.max\n            });\n            const series = ch.ctx.series.emptyCollapsedSeries($e4b487e979d7c06d$var$Utils$1.clone(w2.globals.initialSeries));\n            ch.updateHelpers._updateSeries(series, w2.config.chart.animations.dynamicAnimation.enabled);\n            w2.interact.zoomed = false;\n        });\n    }\n    destroy() {\n        this.elZoom = null;\n        this.elZoomIn = null;\n        this.elZoomOut = null;\n        this.elPan = null;\n        this.elSelection = null;\n        this.elMeasure = null;\n        this.elZoomReset = null;\n        this.elMenuIcon = null;\n    }\n}\nconst $e4b487e979d7c06d$var$WHEEL_ZOOM_PIXELS_PER_2X = 240;\nconst $e4b487e979d7c06d$var$INERTIA_MIN_RELEASE_VELOCITY = 0.05;\nconst $e4b487e979d7c06d$var$INERTIA_DEFAULT_FRICTION = 0.92;\nconst $e4b487e979d7c06d$var$INERTIA_STOP_VELOCITY = 0.02;\nconst $e4b487e979d7c06d$var$FRAME_MS_60FPS = 16.6667;\nconst $e4b487e979d7c06d$var$PAN_NUDGE_DIVISOR = 15;\nclass $e4b487e979d7c06d$var$ZoomPanSelection extends $e4b487e979d7c06d$var$Toolbar {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        super(w2, ctx);\n        this.w = w2;\n        this.ctx = ctx;\n        this.dragged = false;\n        this.graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        this.eventList = [\n            \"mousedown\",\n            \"mouseleave\",\n            \"mousemove\",\n            \"touchstart\",\n            \"touchmove\",\n            \"mouseup\",\n            \"touchend\"\n        ];\n        this.clientX = 0;\n        this.clientY = 0;\n        this.startX = 0;\n        this.endX = 0;\n        this.dragX = 0;\n        this.startY = 0;\n        this.endY = 0;\n        this.dragY = 0;\n        this.moveDirection = \"none\";\n    }\n    /** @param {{xyRatios: any}} opts */ init({ xyRatios: xyRatios }) {\n        const w2 = this.w;\n        const me = this;\n        this.xyRatios = xyRatios;\n        this.zoomRect = this.graphics.drawRect(0, 0, 0, 0);\n        this.selectionRect = this.graphics.drawRect(0, 0, 0, 0);\n        this.constraints = new $e4b487e979d7c06d$var$Box(0, 0, w2.layout.gridWidth, w2.layout.gridHeight);\n        this.zoomRect.node.classList.add(\"apexcharts-zoom-rect\");\n        this.selectionRect.node.classList.add(\"apexcharts-selection-rect\");\n        w2.dom.Paper.add(this.zoomRect);\n        w2.dom.Paper.add(this.selectionRect);\n        if (w2.config.chart.selection.type === \"x\") this.slDraggableRect = this.selectionRect.draggable({\n            minX: 0,\n            minY: 0,\n            maxX: w2.layout.gridWidth,\n            maxY: w2.layout.gridHeight\n        }).on(\"dragmove.namespace\", this.selectionDragging.bind(this, \"dragging\"));\n        else if (w2.config.chart.selection.type === \"y\") this.slDraggableRect = this.selectionRect.draggable({\n            minX: 0,\n            maxX: w2.layout.gridWidth\n        }).on(\"dragmove.namespace\", this.selectionDragging.bind(this, \"dragging\"));\n        else this.slDraggableRect = this.selectionRect.draggable().on(\"dragmove.namespace\", this.selectionDragging.bind(this, \"dragging\"));\n        this.preselectedSelection();\n        this.hoverArea = /** @type {Element} */ w2.dom.baseEl.querySelector(`${w2.globals.chartClass} .apexcharts-svg`);\n        if (!this.hoverArea) return;\n        this.hoverArea.classList.add(\"apexcharts-zoomable\");\n        this.eventList.forEach((event)=>{\n            var _a;\n            (_a = this.hoverArea) == null || _a.addEventListener(event, me.svgMouseEvents.bind(me, xyRatios), {\n                capture: false,\n                passive: true\n            });\n        });\n        if (this._wheelZoomEnabled()) this.hoverArea.addEventListener(\"wheel\", me.mouseWheelEvent.bind(me), {\n            capture: false,\n            passive: false\n        });\n        if (this._momentumEnabled()) [\n            \"touchstart\",\n            \"touchmove\",\n            \"touchend\",\n            \"touchcancel\"\n        ].forEach((event)=>{\n            var _a;\n            (_a = this.hoverArea) == null || _a.addEventListener(event, me.momentumTouch.bind(me), {\n                capture: false,\n                passive: false\n            });\n        });\n    }\n    // remove the event listeners which were previously added on hover area\n    destroy() {\n        if (this.slDraggableRect) {\n            this.slDraggableRect.draggable(false);\n            this.slDraggableRect.off();\n            this.selectionRect.off();\n        }\n        this.selectionRect = null;\n        this.zoomRect = null;\n    }\n    /**\n   * @param {import('../types/internal').XYRatios} xyRatios\n   * @param {any} e\n   */ svgMouseEvents(xyRatios, e2) {\n        const w2 = this.w;\n        const toolbar = this.ctx.toolbar;\n        if (w2.interact.momentum && w2.interact.momentum.busy) return;\n        if (this._momentumEnabled() && e2.touches && e2.touches.length > 1) return;\n        const zoomtype = w2.interact.zoomEnabled ? w2.config.chart.zoom.type : w2.config.chart.selection.type;\n        const autoSelected = w2.config.chart.toolbar.autoSelected;\n        if (autoSelected !== \"measure\") {\n            if (e2.shiftKey) {\n                w2.interact.shiftWasPressed = true;\n                toolbar.enableZoomPanFromToolbar(autoSelected === \"pan\" ? \"zoom\" : \"pan\");\n            } else if (w2.interact.shiftWasPressed) {\n                toolbar.enableZoomPanFromToolbar(autoSelected);\n                w2.interact.shiftWasPressed = false;\n            }\n        }\n        if (!e2.target) return;\n        const tc = e2.target.classList;\n        let pc;\n        if (e2.target.parentNode && e2.target.parentNode !== null) pc = e2.target.parentNode.classList;\n        const falsePositives = tc.contains(\"apexcharts-legend-marker\") || tc.contains(\"apexcharts-legend-text\") || pc && pc.contains(\"apexcharts-toolbar\");\n        if (falsePositives) return;\n        this.clientX = e2.type === \"touchmove\" || e2.type === \"touchstart\" ? e2.touches[0].clientX : e2.type === \"touchend\" ? e2.changedTouches[0].clientX : e2.clientX;\n        this.clientY = e2.type === \"touchmove\" || e2.type === \"touchstart\" ? e2.touches[0].clientY : e2.type === \"touchend\" ? e2.changedTouches[0].clientY : e2.clientY;\n        if (e2.type === \"mousedown\" && e2.which === 1 || e2.type === \"touchstart\") {\n            const gridRectDim = this._gridRect();\n            if (!gridRectDim) return;\n            this.startX = this._screenXToPlotPx(this.clientX);\n            this.startY = this.clientY - gridRectDim.top;\n            this.dragged = false;\n            this.w.interact.mousedown = true;\n        }\n        if (e2.type === \"mousemove\" && e2.which === 1 || e2.type === \"touchmove\") {\n            this.dragged = true;\n            if (w2.interact.panEnabled) {\n                w2.interact.selection = null;\n                if (this.w.interact.mousedown) this.panDragging({\n                    context: this,\n                    zoomtype: zoomtype,\n                    xyRatios: this.xyRatios\n                });\n            } else if (this.w.interact.mousedown && w2.interact.zoomEnabled || this.w.interact.mousedown && w2.interact.selectionEnabled) this.selection = this.selectionDrawing({\n                context: this,\n                zoomtype: zoomtype\n            });\n        }\n        if (e2.type === \"mouseup\" || e2.type === \"touchend\" || e2.type === \"mouseleave\") this.handleMouseUp({\n            zoomtype: zoomtype\n        });\n        this.makeSelectionRectDraggable();\n    }\n    /** @param {{ zoomtype?: any, isResized?: any }} opts */ handleMouseUp({ zoomtype: zoomtype, isResized: isResized }) {\n        const w2 = this.w;\n        const gridRectDim = this._gridRect();\n        if (gridRectDim && (this.w.interact.mousedown || isResized)) {\n            this.endX = this._screenXToPlotPx(this.clientX);\n            this.endY = this.clientY - gridRectDim.top;\n            this.dragX = Math.abs(this.endX - this.startX);\n            this.dragY = Math.abs(this.endY - this.startY);\n            if (w2.interact.zoomEnabled || w2.interact.selectionEnabled) this.selectionDrawn({\n                context: this,\n                zoomtype: zoomtype\n            });\n        }\n        if (w2.interact.zoomEnabled) this.hideSelectionRect(this.selectionRect);\n        this.dragged = false;\n        this.w.interact.mousedown = false;\n    }\n    // ---------------------------------------------------------------------------\n    // Wheel zoom: continuous, cursor-anchored zoom on mouse wheel / trackpad.\n    //\n    // Each wheel event multiplies a pending zoom factor scaled to its deltaY (so\n    // a trackpad's stream of tiny deltas and a discrete wheel's ±100 notches both\n    // feel proportional), and the accumulated factor is applied at most once per\n    // animation frame through the same immediate, animation-free fast path the\n    // touch pinch uses (_applyXRange). Deliberately instant, trading-chart style:\n    // no per-step morph and no easing between steps (an animated variant was\n    // tried and rejected). The original implementation instead ran a fixed\n    // 0.5x/1.5x animated update at most once per 400ms and dropped every wheel\n    // event in between, which read as lag on continuous scrolling.\n    //\n    // Like Momentum (see the comment above momentumTouch), applying a frame\n    // triggers _updateOptions, which destroys and recreates this instance\n    // mid-gesture, so all wheel-gesture state lives on w.interact.wheel rather\n    // than on the instance.\n    // ---------------------------------------------------------------------------\n    /**\n   * A wheel or pinch zoom is an incidental gesture: the viewer can land in a\n   * zoomed window without meaning to (a page scroll over the chart, a two-finger\n   * swipe), so it is only offered when there is a way back out of it. The only\n   * built-in way back is the toolbar's reset button, hence 'auto' (the default\n   * for both allowMouseWheelZoom and pinch) resolves against that button being\n   * present. A page that builds its own reset control sets the option to true\n   * and gets the gesture with no toolbar. Drag-to-zoom is deliberate, so it is\n   * not gated this way.\n   *\n   * @param {boolean|'auto'} setting\n   */ _incidentalZoomEnabled(setting) {\n        var _a, _b, _c;\n        const c2 = this.w.config.chart;\n        if (!c2.zoom || !c2.zoom.enabled) return false;\n        if (setting !== \"auto\") return !!setting;\n        return !!(((_a = c2.toolbar) == null ? void 0 : _a.show) && ((_c = (_b = c2.toolbar) == null ? void 0 : _b.tools) == null ? void 0 : _c.reset));\n    }\n    _wheelZoomEnabled() {\n        const { zoom: zoom } = this.w.config.chart;\n        return this._incidentalZoomEnabled(zoom && zoom.allowMouseWheelZoom);\n    }\n    /** Lazily-created, re-render-surviving wheel-gesture state. */ _wheel() {\n        const it = this.w.interact;\n        if (!it.wheel) it.wheel = {\n            factor: 1,\n            clientX: 0,\n            /** @type {number|null} */ rafId: null,\n            /** @type {any} */ endTimer: null\n        };\n        return it.wheel;\n    }\n    /**\n   * @param {any} e\n   */ mouseWheelEvent(e2) {\n        e2.preventDefault();\n        const st = this._wheel();\n        let dy = e2.deltaY;\n        if (e2.deltaMode === 1) dy *= 33;\n        else if (e2.deltaMode === 2) dy *= 330;\n        st.factor *= Math.pow(2, dy / $e4b487e979d7c06d$var$WHEEL_ZOOM_PIXELS_PER_2X);\n        st.clientX = e2.clientX;\n        if (st.rafId == null) st.rafId = requestAnimationFrame(()=>this._applyWheelZoom());\n        if (st.endTimer) clearTimeout(st.endTimer);\n        st.endTimer = setTimeout(()=>this._endWheelZoom(), 150);\n    }\n    /**\n   * Apply the zoom factor accumulated since the last animation frame, keeping\n   * the data value under the cursor pinned (both zooming in and out).\n   */ _applyWheelZoom() {\n        const w2 = this.w;\n        const st = this._wheel();\n        st.rafId = null;\n        const scale = st.factor;\n        st.factor = 1;\n        if (scale === 1 || w2.globals.isDestroyed) return;\n        const gridRectDim = this._gridRect();\n        if (!gridRectDim || !gridRectDim.width) return;\n        const { min: min, max: max } = this._currentXWindow();\n        const range = max - min;\n        const mouseX = Math.min(Math.max((st.clientX - gridRectDim.left) / gridRectDim.width, 0), 1);\n        let newRange = range * scale;\n        const bounds = this._clampBounds();\n        if (bounds) {\n            const minXDiff = w2.globals.minXDiff > 0 && isFinite(w2.globals.minXDiff) ? w2.globals.minXDiff : 0;\n            const minRange = Math.max(minXDiff * 2, (bounds.max - bounds.min) * 1e-6);\n            if (newRange < minRange) newRange = minRange;\n            if (newRange > bounds.max - bounds.min) newRange = bounds.max - bounds.min;\n        }\n        const anchor = min + mouseX * range;\n        let newMinX = anchor - mouseX * newRange;\n        let newMaxX = newMinX + newRange;\n        const eps = range * 1e-9;\n        if (Math.abs(newMinX - min) < eps && Math.abs(newMaxX - max) < eps) return;\n        if (isNaN(newMinX) || isNaN(newMaxX)) return;\n        const beforeZoomRange = this.getBeforeZoomRange({\n            min: newMinX,\n            max: newMaxX\n        }, /** @type {any} */ void 0);\n        if (beforeZoomRange && beforeZoomRange.xaxis) {\n            newMinX = beforeZoomRange.xaxis.min;\n            newMaxX = beforeZoomRange.xaxis.max;\n        }\n        this._applyXRange(newMinX, newMaxX, true);\n    }\n    /** Fire the zoomed callback once the wheel gesture settles (mirrors _endPinch). */ _endWheelZoom() {\n        const w2 = this.w;\n        const st = this._wheel();\n        st.endTimer = null;\n        if (w2.globals.isDestroyed || !w2.interact.zoomed) return;\n        const { min: min, max: max } = this._currentXWindow();\n        const yaxis = w2.globals.initialConfig ? $e4b487e979d7c06d$var$Utils$1.clone(w2.globals.initialConfig.yaxis) : [];\n        const toolbar = this.ctx.toolbar;\n        if (toolbar) toolbar.zoomCallback({\n            min: min,\n            max: max\n        }, yaxis);\n    }\n    makeSelectionRectDraggable() {\n        const w2 = this.w;\n        if (!this.selectionRect) return;\n        const rectDim = this.selectionRect.node.getBoundingClientRect();\n        if (rectDim.width > 0 && rectDim.height > 0) {\n            this.selectionRect.select(false).resize(false);\n            this.selectionRect.select({\n                createRot: ()=>{},\n                updateRot: ()=>{},\n                createHandle: (group, p2, index, pointArr, handleName)=>{\n                    if (handleName === \"l\" || handleName === \"r\") return group.circle(8).css({\n                        \"stroke-width\": 1,\n                        stroke: \"#333\",\n                        fill: \"#fff\"\n                    });\n                    return group.circle(0);\n                },\n                updateHandle: (group, p2)=>{\n                    return group.center(p2[0], p2[1]);\n                }\n            }).resize().on(\"resize\", ()=>{\n                var _a;\n                if (w2.interact.selectionEnabled) {\n                    w2.interact.selection = {\n                        x: parseFloat(this.selectionRect.node.getAttribute(\"x\")),\n                        y: parseFloat(this.selectionRect.node.getAttribute(\"y\")),\n                        width: parseFloat(this.selectionRect.node.getAttribute(\"width\")),\n                        height: parseFloat(this.selectionRect.node.getAttribute(\"height\"))\n                    };\n                    clearTimeout((_a = this.w.globals.selectionResizeTimer) != null ? _a : void 0);\n                    this.w.globals.selectionResizeTimer = window.setTimeout(()=>{\n                        this._emitSelectionFromRect();\n                    }, 30);\n                } else {\n                    const zoomtype = w2.interact.zoomEnabled ? w2.config.chart.zoom.type : w2.config.chart.selection.type;\n                    this.handleMouseUp({\n                        zoomtype: zoomtype,\n                        isResized: true\n                    });\n                }\n            });\n        }\n    }\n    preselectedSelection() {\n        const w2 = this.w;\n        const xyRatios = this.xyRatios;\n        if (!w2.interact.zoomEnabled) {\n            if (typeof w2.interact.selection !== \"undefined\" && w2.interact.selection !== null) this.drawSelectionRect($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, w2.interact.selection), {\n                translateX: w2.layout.translateX,\n                translateY: w2.layout.translateY\n            }));\n            else if (w2.config.chart.selection.xaxis.min !== void 0 && w2.config.chart.selection.xaxis.max !== void 0) {\n                let x = $e4b487e979d7c06d$var$AxisMapping.dataXToPx(w2, w2.config.chart.selection.xaxis.min);\n                let width = $e4b487e979d7c06d$var$AxisMapping.dataXToPx(w2, w2.config.chart.selection.xaxis.max) - x;\n                if (w2.axisFlags.isRangeBar) {\n                    x = (w2.config.chart.selection.xaxis.min - w2.globals.yAxisScale[0].niceMin) / xyRatios.invertedYRatio;\n                    width = (w2.config.chart.selection.xaxis.max - w2.config.chart.selection.xaxis.min) / xyRatios.invertedYRatio;\n                }\n                const selectionRect = {\n                    x: x,\n                    y: 0,\n                    width: width,\n                    height: w2.layout.gridHeight,\n                    translateX: w2.layout.translateX,\n                    translateY: w2.layout.translateY,\n                    selectionEnabled: true\n                };\n                this.drawSelectionRect(selectionRect);\n                this.makeSelectionRectDraggable();\n                if (typeof w2.config.chart.events.selection === \"function\") w2.config.chart.events.selection(this.ctx, {\n                    xaxis: {\n                        min: w2.config.chart.selection.xaxis.min,\n                        max: w2.config.chart.selection.xaxis.max\n                    },\n                    yaxis: {}\n                });\n            }\n        }\n    }\n    /** @param {{x: any, y: any, width: any, height: any, translateX: any, translateY: any}} opts */ drawSelectionRect({ x: x, y: y, width: width, height: height, translateX: translateX = 0, translateY: translateY = 0 }) {\n        const w2 = this.w;\n        const zoomRect = this.zoomRect;\n        const selectionRect = this.selectionRect;\n        if (this.dragged || w2.interact.selection !== null) {\n            const scalingAttrs = {\n                transform: \"translate(\" + translateX + \", \" + translateY + \")\"\n            };\n            if (w2.interact.zoomEnabled && this.dragged) {\n                if (width < 0) width = 1;\n                zoomRect.attr({\n                    x: x,\n                    y: y,\n                    width: width,\n                    height: height,\n                    fill: w2.config.chart.zoom.zoomedArea.fill.color,\n                    \"fill-opacity\": w2.config.chart.zoom.zoomedArea.fill.opacity,\n                    stroke: w2.config.chart.zoom.zoomedArea.stroke.color,\n                    \"stroke-width\": w2.config.chart.zoom.zoomedArea.stroke.width,\n                    \"stroke-opacity\": w2.config.chart.zoom.zoomedArea.stroke.opacity\n                });\n                $e4b487e979d7c06d$var$Graphics.setAttrs(zoomRect.node, scalingAttrs);\n            }\n            if (w2.interact.selectionEnabled) {\n                selectionRect.attr({\n                    x: x,\n                    y: y,\n                    width: width > 0 ? width : 0,\n                    height: height > 0 ? height : 0,\n                    fill: w2.config.chart.selection.fill.color,\n                    \"fill-opacity\": w2.config.chart.selection.fill.opacity,\n                    stroke: w2.config.chart.selection.stroke.color,\n                    \"stroke-width\": w2.config.chart.selection.stroke.width,\n                    \"stroke-dasharray\": w2.config.chart.selection.stroke.dashArray,\n                    \"stroke-opacity\": w2.config.chart.selection.stroke.opacity\n                });\n                $e4b487e979d7c06d$var$Graphics.setAttrs(selectionRect.node, scalingAttrs);\n            }\n        }\n    }\n    /**\n   * @param {any} rect\n   */ hideSelectionRect(rect) {\n        if (rect) rect.attr({\n            x: 0,\n            y: 0,\n            width: 0,\n            height: 0\n        });\n    }\n    selectionDrawing({ context: context, zoomtype: zoomtype }) {\n        const w2 = this.w;\n        const me = context;\n        const gridRectDim = this._gridRect();\n        if (!gridRectDim) return;\n        const startX = me.startX - 1;\n        const startY = me.startY;\n        let inversedX = false;\n        let inversedY = false;\n        const left = this._screenXToPlotPx(me.clientX);\n        const top = me.clientY - gridRectDim.top;\n        let selectionWidth = left - startX;\n        let selectionHeight = top - startY;\n        let selectionRect = {\n            translateX: w2.layout.translateX,\n            translateY: w2.layout.translateY\n        };\n        if (Math.abs(selectionWidth + startX) > w2.layout.gridWidth) selectionWidth = w2.layout.gridWidth - startX;\n        else if (left < 0) selectionWidth = startX;\n        if (startX > left) {\n            inversedX = true;\n            selectionWidth = Math.abs(selectionWidth);\n        }\n        if (startY > top) {\n            inversedY = true;\n            selectionHeight = Math.abs(selectionHeight);\n        }\n        if (zoomtype === \"x\") selectionRect = {\n            x: inversedX ? startX - selectionWidth : startX,\n            y: 0,\n            width: selectionWidth,\n            height: w2.layout.gridHeight\n        };\n        else if (zoomtype === \"y\") selectionRect = {\n            x: 0,\n            y: inversedY ? startY - selectionHeight : startY,\n            width: w2.layout.gridWidth,\n            height: selectionHeight\n        };\n        else selectionRect = {\n            x: inversedX ? startX - selectionWidth : startX,\n            y: inversedY ? startY - selectionHeight : startY,\n            width: selectionWidth,\n            height: selectionHeight\n        };\n        selectionRect = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, selectionRect), {\n            translateX: w2.layout.translateX,\n            translateY: w2.layout.translateY\n        });\n        me.drawSelectionRect(selectionRect);\n        me.selectionDragging(\"resizing\");\n        return selectionRect;\n    }\n    /**\n   * @param {string} type\n   * @param {CustomEvent} e\n   */ selectionDragging(type, e2) {\n        var _a;\n        const w2 = this.w;\n        if (!e2) return;\n        e2.preventDefault();\n        const { handler: handler, box: box } = e2.detail;\n        const constraints = /** @type {any} */ this.constraints;\n        let { x: x, y: y } = box;\n        if (x < constraints.x) x = constraints.x;\n        if (y < constraints.y) y = constraints.y;\n        if (box.x2 > constraints.x2) x = constraints.x2 - box.w;\n        if (box.y2 > constraints.y2) y = constraints.y2 - box.h;\n        handler.move(x, y);\n        const selRect = this.selectionRect;\n        let timerInterval = 0;\n        if (type === \"resizing\") timerInterval = 30;\n        const getSelAttr = (attr)=>{\n            return parseFloat(selRect.node.getAttribute(attr));\n        };\n        const draggedProps = {\n            x: getSelAttr(\"x\"),\n            y: getSelAttr(\"y\"),\n            width: getSelAttr(\"width\"),\n            height: getSelAttr(\"height\")\n        };\n        w2.interact.selection = draggedProps;\n        const link = w2.config.chart.link;\n        const linkActive = !!(link && (link.enabled || typeof link.dimension === \"function\"));\n        if ((typeof w2.config.chart.events.selection === \"function\" || linkActive) && w2.interact.selectionEnabled) {\n            clearTimeout((_a = this.w.globals.selectionResizeTimer) != null ? _a : void 0);\n            this.w.globals.selectionResizeTimer = window.setTimeout(()=>{\n                this._emitSelectionFromRect();\n            }, timerInterval);\n        }\n    }\n    /**\n   * Recompute the reported x/y range from the CURRENT persistent selection rect\n   * (via the shared AxisMapping) and notify listeners: chart.events.selection,\n   * brushScrolled, and the crossfilter coordinator. Shared by the rect-body drag\n   * (selectionDragging) and the handle resize (makeSelectionRectDraggable) so\n   * every gesture re-reports through ONE mapping and the reported range always\n   * matches the rect the user sees. No dragged/threshold gate: reaching here\n   * already means the user moved or resized the persistent rect.\n   */ _emitSelectionFromRect() {\n        var _a;\n        const w2 = this.w;\n        if (!w2.interact.selectionEnabled) return;\n        const link = w2.config.chart.link;\n        const linkActive = !!(link && (link.enabled || typeof link.dimension === \"function\"));\n        if (typeof w2.config.chart.events.selection !== \"function\" && !linkActive) return;\n        const gridRectDim = this._gridRect();\n        if (!gridRectDim) return;\n        const selectionRect = this.selectionRect.node.getBoundingClientRect();\n        const xyRatios = this.xyRatios;\n        let minX, maxX, minY, maxY;\n        const relLeft = this._screenXToPlotPx(selectionRect.left);\n        const relRight = this._screenXToPlotPx(selectionRect.right);\n        if (!w2.axisFlags.isRangeBar) {\n            if (!w2.globals.xAxisScale) return;\n            minX = $e4b487e979d7c06d$var$AxisMapping.pxToDataX(w2, relLeft);\n            maxX = $e4b487e979d7c06d$var$AxisMapping.pxToDataX(w2, relRight);\n            minY = w2.globals.yAxisScale[0].niceMin + (gridRectDim.bottom - selectionRect.bottom) * xyRatios.yRatio[0];\n            maxY = w2.globals.yAxisScale[0].niceMax - (selectionRect.top - gridRectDim.top) * xyRatios.yRatio[0];\n        } else {\n            minX = w2.globals.yAxisScale[0].niceMin + relLeft * xyRatios.invertedYRatio;\n            maxX = w2.globals.yAxisScale[0].niceMin + relRight * xyRatios.invertedYRatio;\n            minY = 0;\n            maxY = 1;\n        }\n        const xyAxis = {\n            xaxis: {\n                min: minX,\n                max: maxX\n            },\n            yaxis: {\n                min: minY,\n                max: maxY\n            }\n        };\n        if (typeof w2.config.chart.events.selection === \"function\") w2.config.chart.events.selection(this.ctx, xyAxis);\n        if (w2.config.chart.brush.enabled && w2.config.chart.events.brushScrolled !== void 0) w2.config.chart.events.brushScrolled(this.ctx, xyAxis);\n        (_a = this.ctx.linkedViews) == null || _a.onSourceSelection(xyAxis.xaxis);\n    }\n    /** @param {{context: any, zoomtype: any}} opts */ selectionDrawn({ context: context, zoomtype: zoomtype }) {\n        var _a;\n        const w2 = this.w;\n        const me = context;\n        const xyRatios = this.xyRatios;\n        const toolbar = this.ctx.toolbar;\n        const selRect = w2.interact.zoomEnabled ? me.zoomRect.node.getBoundingClientRect() : me.selectionRect.node.getBoundingClientRect();\n        const gridRectDim = me._gridRect();\n        if (!gridRectDim) return;\n        const localStartX = this._screenXToPlotPx(selRect.left);\n        const localEndX = this._screenXToPlotPx(selRect.right);\n        const localStartY = selRect.top - gridRectDim.top;\n        const localEndY = selRect.bottom - gridRectDim.top;\n        let xLowestValue, xHighestValue;\n        if (!w2.axisFlags.isRangeBar) {\n            xLowestValue = $e4b487e979d7c06d$var$AxisMapping.pxToDataX(w2, localStartX);\n            xHighestValue = $e4b487e979d7c06d$var$AxisMapping.pxToDataX(w2, localEndX);\n        } else {\n            xLowestValue = w2.globals.yAxisScale[0].niceMin + localStartX * xyRatios.invertedYRatio;\n            xHighestValue = w2.globals.yAxisScale[0].niceMin + localEndX * xyRatios.invertedYRatio;\n        }\n        const yHighestValue = [];\n        const yLowestValue = [];\n        w2.config.yaxis.forEach((yaxe, index)=>{\n            const seriesIndex = w2.globals.seriesYAxisMap[index][0];\n            const highestVal = w2.globals.yAxisScale[index].niceMax - xyRatios.yRatio[seriesIndex] * localStartY;\n            const lowestVal = w2.globals.yAxisScale[index].niceMax - xyRatios.yRatio[seriesIndex] * localEndY;\n            yHighestValue.push(highestVal);\n            yLowestValue.push(lowestVal);\n        });\n        if (me.dragged && (me.dragX > 10 || me.dragY > 10) && xLowestValue !== xHighestValue) {\n            if (w2.interact.zoomEnabled) {\n                if (!w2.globals.initialConfig) return;\n                let yaxis = $e4b487e979d7c06d$var$Utils$1.clone(w2.globals.initialConfig.yaxis);\n                let xaxis = $e4b487e979d7c06d$var$Utils$1.clone(w2.globals.initialConfig.xaxis);\n                w2.interact.zoomed = true;\n                if (w2.config.xaxis.convertedCatToNumeric) {\n                    xLowestValue = Math.floor(xLowestValue);\n                    xHighestValue = Math.floor(xHighestValue);\n                    if (xLowestValue < 1) {\n                        xLowestValue = 1;\n                        xHighestValue = w2.globals.dataPoints;\n                    }\n                    if (xHighestValue - xLowestValue < 2) xHighestValue = xLowestValue + 1;\n                }\n                if (zoomtype === \"xy\" || zoomtype === \"x\") xaxis = {\n                    min: xLowestValue,\n                    max: xHighestValue\n                };\n                if (zoomtype === \"xy\" || zoomtype === \"y\") yaxis.forEach((yaxe, index)=>{\n                    yaxis[index].min = yLowestValue[index];\n                    yaxis[index].max = yHighestValue[index];\n                });\n                if (toolbar) {\n                    const beforeZoomRange = toolbar.getBeforeZoomRange(xaxis, yaxis);\n                    if (beforeZoomRange) {\n                        xaxis = beforeZoomRange.xaxis ? beforeZoomRange.xaxis : xaxis;\n                        yaxis = beforeZoomRange.yaxis ? beforeZoomRange.yaxis : yaxis;\n                    }\n                }\n                const options2 = {\n                    xaxis: xaxis\n                };\n                if (!w2.config.chart.group) options2.yaxis = yaxis;\n                me.ctx.updateHelpers._updateOptions(options2, false, me.w.config.chart.animations.dynamicAnimation.enabled);\n                if (typeof w2.config.chart.events.zoomed === \"function\") toolbar.zoomCallback(xaxis, yaxis);\n            } else if (w2.interact.selectionEnabled) {\n                let yaxis = null;\n                let xaxis = null;\n                xaxis = {\n                    min: xLowestValue,\n                    max: xHighestValue\n                };\n                if (zoomtype === \"xy\" || zoomtype === \"y\") {\n                    const yaxisCopy = /** @type {ApexYAxis[]} */ $e4b487e979d7c06d$var$Utils$1.clone(w2.config.yaxis);\n                    yaxis = yaxisCopy;\n                    yaxisCopy.forEach((yaxe, index)=>{\n                        yaxisCopy[index].min = yLowestValue[index];\n                        yaxisCopy[index].max = yHighestValue[index];\n                    });\n                }\n                w2.interact.selection = me.selection;\n                if (typeof w2.config.chart.events.selection === \"function\") w2.config.chart.events.selection(me.ctx, {\n                    xaxis: xaxis,\n                    yaxis: yaxis\n                });\n                (_a = me.ctx.linkedViews) == null || _a.onSourceSelection(xaxis);\n            }\n        }\n    }\n    /** @param {{ context?: any, zoomtype?: any, xyRatios?: any }} opts */ panDragging({ context: context }) {\n        var _a;\n        const w2 = this.w;\n        const me = context;\n        if (typeof w2.interact.lastClientPosition.x !== \"undefined\") {\n            const deltaX = w2.interact.lastClientPosition.x - me.clientX;\n            const deltaY = ((_a = w2.interact.lastClientPosition.y) != null ? _a : 0) - me.clientY;\n            if (Math.abs(deltaX) > Math.abs(deltaY) && deltaX > 0) this.moveDirection = \"left\";\n            else if (Math.abs(deltaX) > Math.abs(deltaY) && deltaX < 0) this.moveDirection = \"right\";\n            else if (Math.abs(deltaY) > Math.abs(deltaX) && deltaY > 0) this.moveDirection = \"up\";\n            else if (Math.abs(deltaY) > Math.abs(deltaX) && deltaY < 0) this.moveDirection = \"down\";\n        }\n        w2.interact.lastClientPosition = {\n            x: me.clientX,\n            y: me.clientY\n        };\n        const xLowestValue = w2.axisFlags.isRangeBar ? w2.globals.minY : w2.globals.minX;\n        const xHighestValue = w2.axisFlags.isRangeBar ? w2.globals.maxY : w2.globals.maxX;\n        me.panScrolled(xLowestValue, xHighestValue);\n    }\n    // delayedPanScrolled() {\n    //   const w = this.w\n    //   let newMinX = w.globals.minX\n    //   let newMaxX = w.globals.maxX\n    //   const centerX = (w.globals.maxX - w.globals.minX) / 2\n    //   if (this.moveDirection === 'left') {\n    //     newMinX = w.globals.minX + centerX\n    //     newMaxX = w.globals.maxX + centerX\n    //   } else if (this.moveDirection === 'right') {\n    //     newMinX = w.globals.minX - centerX\n    //     newMaxX = w.globals.maxX - centerX\n    //   }\n    //   newMinX = Math.floor(newMinX)\n    //   newMaxX = Math.floor(newMaxX)\n    //   this.updateScrolledChart(\n    //     { xaxis: { min: newMinX, max: newMaxX } },\n    //     newMinX,\n    //     newMaxX\n    //   )\n    // }\n    /**\n   * @param {number} xLowestValue\n   * @param {number} xHighestValue\n   */ panScrolled(xLowestValue, xHighestValue) {\n        var _a, _b;\n        const w2 = this.w;\n        const xyRatios = this.xyRatios;\n        if (!w2.globals.initialConfig) return;\n        const yaxis = $e4b487e979d7c06d$var$Utils$1.clone(w2.globals.initialConfig.yaxis);\n        let xRatio = xyRatios.xRatio;\n        let minX = w2.globals.minX;\n        let maxX = w2.globals.maxX;\n        if (w2.axisFlags.isRangeBar) {\n            xRatio = xyRatios.invertedYRatio;\n            minX = w2.globals.minY;\n            maxX = w2.globals.maxY;\n        }\n        if (this.moveDirection === \"left\") {\n            xLowestValue = minX + w2.layout.gridWidth / $e4b487e979d7c06d$var$PAN_NUDGE_DIVISOR * xRatio;\n            xHighestValue = maxX + w2.layout.gridWidth / $e4b487e979d7c06d$var$PAN_NUDGE_DIVISOR * xRatio;\n        } else if (this.moveDirection === \"right\") {\n            xLowestValue = minX - w2.layout.gridWidth / $e4b487e979d7c06d$var$PAN_NUDGE_DIVISOR * xRatio;\n            xHighestValue = maxX - w2.layout.gridWidth / $e4b487e979d7c06d$var$PAN_NUDGE_DIVISOR * xRatio;\n        }\n        if (!w2.axisFlags.isRangeBar) {\n            const clampMin = (_a = w2.globals.dataReducerRawMinX) != null ? _a : w2.globals.initialMinX;\n            const clampMax = (_b = w2.globals.dataReducerRawMaxX) != null ? _b : w2.globals.initialMaxX;\n            if (xLowestValue < clampMin || xHighestValue > clampMax) {\n                xLowestValue = minX;\n                xHighestValue = maxX;\n            }\n        }\n        const xaxis = {\n            min: xLowestValue,\n            max: xHighestValue\n        };\n        const options2 = {\n            xaxis: xaxis\n        };\n        if (!w2.config.chart.group) options2.yaxis = yaxis;\n        this.updateScrolledChart(options2, xLowestValue, xHighestValue);\n    }\n    /**\n   * @param {object} options\n   * @param {number} xLowestValue\n   * @param {number} xHighestValue\n   */ updateScrolledChart(options2, xLowestValue, xHighestValue) {\n        const w2 = this.w;\n        this.ctx.updateHelpers._updateOptions(options2, false, false);\n        if (typeof w2.config.chart.events.scrolled === \"function\") {\n            const args = {\n                xaxis: {\n                    min: xLowestValue,\n                    max: xHighestValue\n                }\n            };\n            w2.config.chart.events.scrolled(this.ctx, args);\n            this.ctx.events.fireEvent(\"scrolled\", args);\n        }\n    }\n    // ---------------------------------------------------------------------------\n    // Momentum: multi-touch pinch-zoom, two-finger pan and kinetic inertia.\n    //\n    // Every _updateOptions destroys and recreates this instance, and applying a\n    // gesture frame IS an _updateOptions, so the gesture must not depend on the\n    // instance surviving. All runtime state lives on w.interact.momentum (the\n    // interaction slice that persists across re-renders, like the crude pan's\n    // lastClientPosition). The instance that received touchstart keeps driving\n    // the gesture off the persistent state; inertia is a self-contained rAF loop\n    // that stops on w.globals.isDestroyed (a real destroy) rather than being\n    // cancelled by the per-update destroy().\n    // ---------------------------------------------------------------------------\n    _momentumEnabled() {\n        return this._pinchEnabled() || this._panInertiaEnabled();\n    }\n    _pinchEnabled() {\n        return this._incidentalZoomEnabled(this.w.config.chart.zoom.pinch);\n    }\n    _panInertiaEnabled() {\n        const c2 = this.w.config.chart;\n        return !!(c2.pan && c2.pan.inertia);\n    }\n    /** Lazily-created, re-render-surviving gesture state on the interaction slice. */ _m() {\n        const it = this.w.interact;\n        if (!it.momentum) it.momentum = {\n            busy: false,\n            /** @type {any} */ pinch: null,\n            /** @type {any} */ panState: null,\n            /** @type {{x:number,t:number}[]} */ samples: [],\n            /** @type {number|null} */ inertiaRAF: null\n        };\n        return it.momentum;\n    }\n    /** Current x data-window (rangeBars carry the datetime domain on y). */ _currentXWindow() {\n        const w2 = this.w;\n        return w2.axisFlags.isRangeBar ? {\n            min: w2.globals.minY,\n            max: w2.globals.maxY\n        } : {\n            min: w2.globals.minX,\n            max: w2.globals.maxX\n        };\n    }\n    /** Live grid rect from the current DOM. Never cache the grid node on the\n   * instance: a full render replaces this whole instance, but the fast update\n   * path (fastUpdate/_fastAxisChromeRefresh) keeps the instance while swapping\n   * the grid node, and a cached node would go stale (detached nodes report an\n   * all-zero bounding rect, silently corrupting selection geometry). */ _gridRect() {\n        const baseEl = this.w.dom.baseEl;\n        const grid = baseEl && baseEl.querySelector(\".apexcharts-grid\");\n        return grid ? grid.getBoundingClientRect() : null;\n    }\n    /**\n   * Convert an absolute (client) x pixel to the plot-origin coordinate space\n   * that bar placement and the selection rect transform both use:\n   * `screenX - svgLeft - translateX`. This is the ONLY correct reference for the\n   * numeric/datetime x mapping (see AxisMapping): do NOT measure from the\n   * `.apexcharts-grid` box and subtract barPadForNumericAxis, because on a\n   * numeric bar chart that box extends barPad to the LEFT of the plot origin, so\n   * the two corrections are a fragile pair that only cancels while the grid box\n   * happens to extend exactly barPad. Anchoring on translateX (the same origin\n   * the bars use) is stable regardless of grid padding.\n   * @param {number} screenX\n   * @returns {number}\n   */ _screenXToPlotPx(screenX) {\n        return $e4b487e979d7c06d$var$AxisMapping.screenXToPlotPx(this.w, screenX);\n    }\n    /**\n   * Raw data bounds to clamp against. When zoom-aware downsampling is active,\n   * the raw stash tracks the full domain; fall back to the initial window.\n   * Returns null for rangeBars (no raw-x clamp available).\n   * @returns {{min:number, max:number}|null}\n   */ _clampBounds() {\n        var _a, _b;\n        const w2 = this.w;\n        if (w2.axisFlags.isRangeBar) return null;\n        return {\n            min: (_a = w2.globals.dataReducerRawMinX) != null ? _a : w2.globals.initialMinX,\n            max: (_b = w2.globals.dataReducerRawMaxX) != null ? _b : w2.globals.initialMaxX\n        };\n    }\n    /**\n   * Apply an x-window immediately (no animation), mirroring panScrolled but\n   * pixel-accurate: clamp to the raw bounds (preserving window width so a pan\n   * stops flush at the edge rather than shrinking), floor for category axes,\n   * then route through the fast _updateOptions path.\n   * @param {number} newMinX @param {number} newMaxX @param {boolean} isZoom\n   * @returns {{minX:number, maxX:number}|false} applied window, or false if rejected\n   */ _applyXRange(newMinX, newMaxX, isZoom) {\n        const w2 = this.w;\n        if (!w2.globals.initialConfig) return false;\n        const cur = this._currentXWindow();\n        const zoomingOut = isZoom && newMaxX - newMinX > cur.max - cur.min;\n        const bounds = this._clampBounds();\n        if (bounds) {\n            const range = newMaxX - newMinX;\n            if (newMinX < bounds.min) {\n                newMinX = bounds.min;\n                newMaxX = newMinX + range;\n            }\n            if (newMaxX > bounds.max) {\n                newMaxX = bounds.max;\n                newMinX = newMaxX - range;\n            }\n            if (newMinX < bounds.min) newMinX = bounds.min;\n        }\n        if (w2.config.xaxis.convertedCatToNumeric) {\n            newMinX = Math.floor(newMinX);\n            newMaxX = zoomingOut ? Math.ceil(newMaxX) : Math.floor(newMaxX);\n            if (newMinX < 1) newMinX = 1;\n            if (bounds && newMaxX > bounds.max) newMaxX = Math.floor(bounds.max);\n            if (newMaxX - newMinX < 2) return false;\n        }\n        if (!(newMaxX > newMinX)) return false;\n        const options2 = {\n            xaxis: {\n                min: newMinX,\n                max: newMaxX\n            }\n        };\n        if (!w2.config.chart.group) options2.yaxis = $e4b487e979d7c06d$var$Utils$1.clone(w2.globals.initialConfig.yaxis);\n        if (isZoom) w2.interact.zoomed = true;\n        this.ctx.updateHelpers._updateOptions(options2, false, false);\n        return {\n            minX: newMinX,\n            maxX: newMaxX\n        };\n    }\n    _cancelInertia() {\n        const m2 = this._m();\n        if (m2.inertiaRAF != null) {\n            cancelAnimationFrame(m2.inertiaRAF);\n            m2.inertiaRAF = null;\n        }\n    }\n    _fireScrolled() {\n        const w2 = this.w;\n        if (typeof w2.config.chart.events.scrolled !== \"function\") return;\n        const { min: min, max: max } = this._currentXWindow();\n        const args = {\n            xaxis: {\n                min: min,\n                max: max\n            }\n        };\n        w2.config.chart.events.scrolled(this.ctx, args);\n        this.ctx.events.fireEvent(\"scrolled\", args);\n    }\n    /** @param {number} x @param {number} t */ _pushSample(x, t2) {\n        const s2 = this._m().samples;\n        s2.push({\n            x: x,\n            t: t2\n        });\n        while(s2.length > 6)s2.shift();\n    }\n    /**\n   * Single passive:false handler for all touch phases. Two fingers => pinch /\n   * two-finger pan (zoom). One finger, in pan mode => kinetic pan with inertia.\n   * @param {any} e\n   */ momentumTouch(e2) {\n        const w2 = this.w;\n        const m2 = this._m();\n        const type = e2.type;\n        if (type === \"touchstart\") {\n            this._cancelInertia();\n            const gridRectDim = this._gridRect();\n            if (!gridRectDim) return;\n            if (e2.touches.length >= 2 && this._pinchEnabled()) {\n                e2.preventDefault();\n                m2.busy = true;\n                m2.panState = null;\n                this._beginPinch(e2, gridRectDim);\n            } else if (e2.touches.length === 1 && this._panInertiaEnabled() && w2.interact.panEnabled) {\n                m2.busy = true;\n                m2.pinch = null;\n                const t2 = e2.touches[0];\n                const win = this._currentXWindow();\n                const gw = w2.layout.gridWidth || 1;\n                m2.panState = {\n                    startX: t2.clientX,\n                    startY: t2.clientY,\n                    axis: null,\n                    // decided on first move (rails)\n                    minX0: win.min,\n                    maxX0: win.max,\n                    ratio0: (win.max - win.min) / gw\n                };\n                m2.samples = [\n                    {\n                        x: t2.clientX,\n                        t: e2.timeStamp\n                    }\n                ];\n            }\n            return;\n        }\n        if (type === \"touchmove\") {\n            if (m2.pinch && e2.touches.length >= 2) {\n                e2.preventDefault();\n                this._movePinch(e2);\n            } else if (m2.panState && e2.touches.length === 1) this._movePan(e2);\n            return;\n        }\n        if (m2.pinch) {\n            if (e2.touches.length < 2) this._endPinch();\n        } else if (m2.panState) {\n            if (e2.touches.length === 0) this._endPan();\n        }\n        if (e2.touches.length === 0) {\n            w2.interact.mousedown = false;\n            this.dragged = false;\n            if (m2.inertiaRAF == null && !m2.pinch && !m2.panState) m2.busy = false;\n        }\n    }\n    /** @param {any} e @param {DOMRect} gridRectDim */ _beginPinch(e2, gridRectDim) {\n        const w2 = this.w;\n        const t0 = e2.touches[0];\n        const t1 = e2.touches[1];\n        const dist = Math.hypot(t1.clientX - t0.clientX, t1.clientY - t0.clientY) || 1;\n        const cx = (t0.clientX + t1.clientX) / 2 - gridRectDim.left - w2.globals.barPadForNumericAxis;\n        const { min: min, max: max } = this._currentXWindow();\n        this._m().pinch = {\n            d0: dist,\n            cx0: cx,\n            minX0: min,\n            maxX0: max,\n            gridWidth: w2.layout.gridWidth || 1\n        };\n    }\n    /** @param {any} e */ _movePinch(e2) {\n        const w2 = this.w;\n        const p2 = this._m().pinch;\n        if (!p2) return;\n        const gridRectDim = this._gridRect();\n        if (!gridRectDim) return;\n        const t0 = e2.touches[0];\n        const t1 = e2.touches[1];\n        const dist = Math.hypot(t1.clientX - t0.clientX, t1.clientY - t0.clientY) || 1;\n        const cx = (t0.clientX + t1.clientX) / 2 - gridRectDim.left - w2.globals.barPadForNumericAxis;\n        const range0 = p2.maxX0 - p2.minX0;\n        const newRange = range0 * (p2.d0 / dist);\n        const anchorData = p2.minX0 + p2.cx0 / p2.gridWidth * range0;\n        let newMinX = anchorData - cx / p2.gridWidth * newRange;\n        let newMaxX = newMinX + newRange;\n        const bounds = this._clampBounds();\n        if (bounds) {\n            const minXDiff = w2.globals.minXDiff > 0 && isFinite(w2.globals.minXDiff) ? w2.globals.minXDiff : 0;\n            const minRange = Math.max(minXDiff * 2, (bounds.max - bounds.min) * 1e-6);\n            if (newMaxX - newMinX < minRange) {\n                const mid = (newMinX + newMaxX) / 2;\n                newMinX = mid - minRange / 2;\n                newMaxX = mid + minRange / 2;\n            }\n        }\n        this._applyXRange(newMinX, newMaxX, true);\n    }\n    _endPinch() {\n        const w2 = this.w;\n        const m2 = this._m();\n        m2.pinch = null;\n        const { min: min, max: max } = this._currentXWindow();\n        const xaxis = {\n            min: min,\n            max: max\n        };\n        const yaxis = w2.globals.initialConfig ? $e4b487e979d7c06d$var$Utils$1.clone(w2.globals.initialConfig.yaxis) : [];\n        const toolbar = this.ctx.toolbar;\n        if (toolbar) toolbar.zoomCallback(xaxis, yaxis);\n    }\n    /** @param {any} e */ _movePan(e2) {\n        const m2 = this._m();\n        const s2 = m2.panState;\n        const t2 = e2.touches[0];\n        if (!s2.axis) {\n            const dx = Math.abs(t2.clientX - s2.startX);\n            const dy = Math.abs(t2.clientY - s2.startY);\n            if (dx < 6 && dy < 6) {\n                this._pushSample(t2.clientX, e2.timeStamp);\n                return;\n            }\n            if (dy > dx) {\n                m2.busy = false;\n                m2.panState = null;\n                return;\n            }\n            s2.axis = \"x\";\n        }\n        if (s2.axis !== \"x\") return;\n        e2.preventDefault();\n        const totalDeltaPx = t2.clientX - s2.startX;\n        const deltaData = totalDeltaPx * s2.ratio0;\n        this._pushSample(t2.clientX, e2.timeStamp);\n        this._applyXRange(s2.minX0 - deltaData, s2.maxX0 - deltaData, false);\n    }\n    _endPan() {\n        const m2 = this._m();\n        const s2 = m2.panState;\n        m2.panState = null;\n        let vel = 0;\n        const samples = m2.samples;\n        if (samples.length >= 2) {\n            const a2 = samples[0];\n            const b2 = samples[samples.length - 1];\n            const dt = b2.t - a2.t;\n            if (dt > 0) vel = (b2.x - a2.x) / dt;\n        }\n        m2.samples = [];\n        if (s2 && s2.axis === \"x\" && this._panInertiaEnabled() && Math.abs(vel) > $e4b487e979d7c06d$var$INERTIA_MIN_RELEASE_VELOCITY) this._startInertia(vel);\n        else {\n            m2.busy = false;\n            this._fireScrolled();\n        }\n    }\n    /**\n   * Kinetic glide after a one-finger pan release: decay the velocity by\n   * `friction` each frame and shift the window, stopping at the data edge\n   * (clamp, not elastic overshoot). The loop is w-driven, so it keeps running\n   * across the re-renders each frame triggers and stops only on a real destroy.\n   * @param {number} vel0 px/ms, sign is the finger direction\n   */ _startInertia(vel0) {\n        const w2 = this.w;\n        const m2 = this._m();\n        const cfgFriction = w2.config.chart.pan && w2.config.chart.pan.friction;\n        const friction = typeof cfgFriction === \"number\" ? Math.min(Math.max(cfgFriction, 0.5), 0.999) : $e4b487e979d7c06d$var$INERTIA_DEFAULT_FRICTION;\n        let vel = vel0;\n        let lastT = null;\n        m2.busy = true;\n        const step = (ts)=>{\n            if (w2.globals.isDestroyed) {\n                m2.inertiaRAF = null;\n                m2.busy = false;\n                return;\n            }\n            if (lastT == null) {\n                lastT = ts;\n                m2.inertiaRAF = requestAnimationFrame(step);\n                return;\n            }\n            const dt = ts - lastT;\n            lastT = ts;\n            vel *= Math.pow(friction, dt / $e4b487e979d7c06d$var$FRAME_MS_60FPS);\n            if (Math.abs(vel) < $e4b487e979d7c06d$var$INERTIA_STOP_VELOCITY) {\n                m2.inertiaRAF = null;\n                m2.busy = false;\n                this._fireScrolled();\n                return;\n            }\n            const win = this._currentXWindow();\n            const gw = w2.layout.gridWidth || 1;\n            const ratio = (win.max - win.min) / gw;\n            const deltaData = vel * dt * ratio;\n            const applied = this._applyXRange(win.min - deltaData, win.max - deltaData, false);\n            const bounds = this._clampBounds();\n            const hitEdge = !applied || bounds && (deltaData > 0 && applied.minX <= bounds.min + (bounds.max - bounds.min) * 1e-6 || deltaData < 0 && applied.maxX >= bounds.max - (bounds.max - bounds.min) * 1e-6);\n            if (hitEdge) {\n                m2.inertiaRAF = null;\n                m2.busy = false;\n                this._fireScrolled();\n                return;\n            }\n            m2.inertiaRAF = requestAnimationFrame(step);\n        };\n        m2.inertiaRAF = requestAnimationFrame(step);\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    toolbar: $e4b487e979d7c06d$var$Toolbar,\n    zoomPanSelection: $e4b487e979d7c06d$var$ZoomPanSelection\n});\nlet $e4b487e979d7c06d$var$Helpers$2 = class Helpers3 {\n    /**\n   * @param {import('./Annotations').default} annoCtx\n   */ constructor(annoCtx){\n        this.w = annoCtx.w;\n        this.annoCtx = annoCtx;\n    }\n    /**\n   * @param {Record<string, any>} anno\n   * @param {number | null} [annoIndex]\n   */ setOrientations(anno, annoIndex = null) {\n        var _a, _b;\n        const w2 = this.w;\n        if (anno.label.orientation === \"vertical\") {\n            const i2 = annoIndex !== null ? annoIndex : 0;\n            const xAnno = w2.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${i2}']`);\n            if (xAnno !== null) {\n                const xAnnoCoord = /** @type {SVGGraphicsElement} */ xAnno.getBBox();\n                xAnno.setAttribute(\"x\", String(parseFloat((_a = xAnno.getAttribute(\"x\")) != null ? _a : \"0\") - xAnnoCoord.height + 4));\n                const yOffset = anno.label.position === \"top\" ? xAnnoCoord.width : -xAnnoCoord.width;\n                xAnno.setAttribute(\"y\", String(parseFloat((_b = xAnno.getAttribute(\"y\")) != null ? _b : \"0\") + yOffset));\n                const { x: x, y: y } = this.annoCtx.graphics.rotateAroundCenter(xAnno);\n                xAnno.setAttribute(\"transform\", `rotate(-90 ${x} ${y})`);\n            }\n        }\n    }\n    /**\n   * @param {any} annoEl\n   * @param {Record<string, any>} anno\n   */ addBackgroundToAnno(annoEl, anno) {\n        const w2 = this.w;\n        if (!annoEl || !anno.label.text || !String(anno.label.text).trim()) return null;\n        const gridEl = w2.dom.baseEl.querySelector(\".apexcharts-grid\");\n        if (!gridEl) return null;\n        const elGridRect = gridEl.getBoundingClientRect();\n        const gridBBox = /** @type {SVGGraphicsElement} */ gridEl.getBBox();\n        const zoom = elGridRect.width / gridBBox.width || 1;\n        const coords = annoEl.getBoundingClientRect();\n        let { left: pleft, right: pright, top: ptop, bottom: pbottom } = anno.label.style.padding;\n        if (anno.label.orientation === \"vertical\") [ptop, pbottom, pleft, pright] = [\n            pleft,\n            pright,\n            ptop,\n            pbottom\n        ];\n        const gridLeft = elGridRect.left - gridBBox.x * zoom;\n        const gridTop = elGridRect.top - gridBBox.y * zoom;\n        const x1 = (coords.left - gridLeft) / zoom - pleft;\n        const y1 = (coords.top - gridTop) / zoom - ptop;\n        const elRect = this.annoCtx.graphics.drawRect(x1, y1, coords.width / zoom + pleft + pright, coords.height / zoom + ptop + pbottom, anno.label.borderRadius, anno.label.style.background, 1, anno.label.borderWidth, anno.label.borderColor, 0);\n        if (anno.id) elRect.node.classList.add(anno.id);\n        return elRect;\n    }\n    annotationsBackground() {\n        const w2 = this.w;\n        const add = (anno, i2, type)=>{\n            const annoLabel = w2.dom.baseEl.querySelector(`.apexcharts-${type}-annotations .apexcharts-${type}-annotation-label[rel='${i2}']`);\n            if (annoLabel) {\n                const parent = annoLabel.parentNode;\n                const elRect = this.addBackgroundToAnno(annoLabel, anno);\n                if (elRect) {\n                    parent == null || parent.insertBefore(elRect.node, annoLabel);\n                    const labelX = annoLabel.getAttribute(\"x\");\n                    if (labelX !== null) $e4b487e979d7c06d$var$applyProgressiveReveal(elRect, parseFloat(labelX), w2);\n                    if (anno.label.mouseEnter) elRect.node.addEventListener(\"mouseenter\", anno.label.mouseEnter.bind(this, anno));\n                    if (anno.label.mouseLeave) elRect.node.addEventListener(\"mouseleave\", anno.label.mouseLeave.bind(this, anno));\n                    if (anno.label.click) elRect.node.addEventListener(\"click\", anno.label.click.bind(this, anno));\n                }\n            }\n        };\n        w2.config.annotations.xaxis.forEach((anno, i2)=>add(anno, i2, \"xaxis\"));\n        w2.config.annotations.yaxis.forEach((anno, i2)=>add(anno, i2, \"yaxis\"));\n        w2.config.annotations.points.forEach((anno, i2)=>add(anno, i2, \"point\"));\n    }\n    /**\n   * @param {string} type\n   * @param {Record<string, any>} anno\n   */ getY1Y2(type, anno) {\n        var _a, _b;\n        const w2 = this.w;\n        const y = type === \"y1\" ? anno.y : anno.y2;\n        let yP;\n        let clipped = false;\n        if (this.annoCtx.invertAxis) {\n            const labels = w2.config.xaxis.convertedCatToNumeric ? w2.labelData.categoryLabels : w2.labelData.labels;\n            const catIndex = labels.indexOf(y);\n            const xLabel = w2.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${catIndex + 1})`);\n            yP = xLabel ? parseFloat((_a = xLabel.getAttribute(\"y\")) != null ? _a : \"0\") : (w2.layout.gridHeight / labels.length - 1) * (catIndex + 1) - w2.globals.barHeight;\n            if (anno.seriesIndex !== void 0 && w2.globals.barHeight) yP -= w2.globals.barHeight / 2 * (w2.seriesData.series.length - 1) - w2.globals.barHeight * anno.seriesIndex;\n        } else {\n            const yAxisMap = w2.globals.seriesYAxisMap[anno.yAxisIndex];\n            if (!yAxisMap || yAxisMap[0] == null || !w2.config.yaxis[anno.yAxisIndex]) return {\n                yP: 0,\n                clipped: true\n            };\n            const seriesIndex = yAxisMap[0];\n            const yPos = w2.config.yaxis[anno.yAxisIndex].logarithmic ? new $e4b487e979d7c06d$var$CoreUtils(this.w).getLogVal(w2.config.yaxis[anno.yAxisIndex].logBase, y, seriesIndex) / /** @type {any} */ w2.globals.yLogRatio[seriesIndex] : (y - w2.globals.minYArr[seriesIndex]) / (w2.globals.yRange[seriesIndex] / w2.layout.gridHeight);\n            yP = w2.layout.gridHeight - Math.min(Math.max(yPos, 0), w2.layout.gridHeight);\n            clipped = yPos > w2.layout.gridHeight || yPos < 0;\n            if (anno.marker && (anno.y === void 0 || anno.y === null)) yP = 0;\n            if ((_b = w2.config.yaxis[anno.yAxisIndex]) == null ? void 0 : _b.reversed) yP = yPos;\n        }\n        if (typeof y === \"string\" && y.includes(\"px\")) yP = parseFloat(y);\n        return {\n            yP: yP,\n            clipped: clipped\n        };\n    }\n    /**\n   * @param {string} type\n   * @param {Record<string, any>} anno\n   */ getX1X2(type, anno) {\n        const w2 = this.w;\n        const x = type === \"x1\" ? anno.x : anno.x2;\n        const min = this.annoCtx.invertAxis ? w2.globals.minY : w2.globals.minX;\n        const max = this.annoCtx.invertAxis ? w2.globals.maxY : w2.globals.maxX;\n        const range = this.annoCtx.invertAxis ? w2.globals.yRange[0] : w2.globals.xRange;\n        let clipped = false;\n        let xP = this.annoCtx.inversedReversedAxis ? (max - x) / (range / w2.layout.gridWidth) : (x - min) / (range / w2.layout.gridWidth);\n        if ((w2.config.xaxis.type === \"category\" || w2.config.xaxis.convertedCatToNumeric) && !this.annoCtx.invertAxis && !w2.axisFlags.dataFormatXNumeric) {\n            if (!w2.config.chart.sparkline.enabled) xP = this.getStringX(x);\n        }\n        if (typeof x === \"string\" && x.includes(\"px\")) xP = parseFloat(x);\n        if ((x === void 0 || x === null) && anno.marker) xP = w2.layout.gridWidth;\n        if (anno.seriesIndex !== void 0 && w2.globals.barWidth && !this.annoCtx.invertAxis) xP -= w2.globals.barWidth / 2 * (w2.seriesData.series.length - 1) - w2.globals.barWidth * anno.seriesIndex;\n        if (typeof xP !== \"number\") {\n            xP = 0;\n            clipped = true;\n        }\n        if (parseFloat(xP.toFixed(10)) > parseFloat(w2.layout.gridWidth.toFixed(10))) {\n            xP = w2.layout.gridWidth;\n            clipped = true;\n        } else if (xP < 0) {\n            xP = 0;\n            clipped = true;\n        }\n        return {\n            x: xP,\n            clipped: clipped\n        };\n    }\n    /**\n   * @param {number} x\n   */ getStringX(x) {\n        var _a;\n        const w2 = this.w;\n        let rX = x;\n        if (w2.config.xaxis.convertedCatToNumeric && w2.labelData.categoryLabels.length) {\n            const strX = String(x);\n            x = w2.labelData.categoryLabels.findIndex((l2)=>String(l2) === strX) + 1;\n        }\n        const catIndex = w2.labelData.labels.map((item)=>Array.isArray(item) ? item.join(\" \") : item).indexOf(x);\n        const xLabel = w2.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${catIndex + 1})`);\n        if (xLabel) rX = parseFloat((_a = xLabel.getAttribute(\"x\")) != null ? _a : \"0\");\n        return rX;\n    }\n};\nclass $e4b487e979d7c06d$var$XAnnotations {\n    /**\n   * @param {import('./Annotations').default} annoCtx\n   */ constructor(annoCtx){\n        this.w = annoCtx.w;\n        this.annoCtx = annoCtx;\n        this.invertAxis = this.annoCtx.invertAxis;\n        this.helpers = new $e4b487e979d7c06d$var$Helpers$2(this.annoCtx);\n    }\n    /**\n   * @param {XAxisAnnotations} anno\n   * @param {Element} parent\n   * @param {number} index\n   */ addXaxisAnnotation(anno, parent, index) {\n        const w2 = this.w;\n        const result = this.helpers.getX1X2(\"x1\", anno);\n        let x1 = result.x;\n        const clipX1 = result.clipped;\n        let clipX2 = true;\n        let x2;\n        const text = anno.label.text;\n        const strokeDashArray = anno.strokeDashArray;\n        if (!$e4b487e979d7c06d$var$Utils$1.isNumber(x1)) return;\n        if (anno.x2 === null || typeof anno.x2 === \"undefined\") {\n            if (!clipX1) {\n                const line = this.annoCtx.graphics.drawLine(x1 + anno.offsetX, // x1\n                0 + anno.offsetY, // y1\n                x1 + anno.offsetX, // x2\n                w2.layout.gridHeight + anno.offsetY, // y2\n                anno.borderColor, // lineColor\n                strokeDashArray, //dashArray\n                anno.borderWidth);\n                parent.appendChild(line.node);\n                if (anno.id) line.node.classList.add(anno.id);\n                $e4b487e979d7c06d$var$applyProgressiveReveal(line, x1 + anno.offsetX, w2);\n            }\n        } else {\n            const result2 = this.helpers.getX1X2(\"x2\", anno);\n            x2 = result2.x;\n            clipX2 = result2.clipped;\n            if (x2 < x1) {\n                const temp = x1;\n                x1 = x2;\n                x2 = temp;\n            }\n            const rect = this.annoCtx.graphics.drawRect(x1 + anno.offsetX, // x1\n            0 + anno.offsetY, // y1\n            x2 - x1, // x2\n            w2.layout.gridHeight + anno.offsetY, // y2\n            0, // radius\n            anno.fillColor, // color\n            anno.opacity, // opacity,\n            1, // strokeWidth\n            anno.borderColor, // strokeColor\n            strokeDashArray);\n            rect.node.classList.add(\"apexcharts-annotation-rect\");\n            rect.attr(\"clip-path\", `url(#gridRectMask${w2.globals.cuid})`);\n            parent.appendChild(rect.node);\n            if (anno.id) rect.node.classList.add(anno.id);\n            $e4b487e979d7c06d$var$applyProgressiveReveal(rect, x1 + anno.offsetX, w2);\n        }\n        if (!(clipX1 && clipX2)) {\n            const textRects = this.annoCtx.graphics.getTextRects(text, anno.label.style.fontSize);\n            const textY = anno.label.position === \"top\" ? 4 : anno.label.position === \"center\" ? w2.layout.gridHeight / 2 + (anno.label.orientation === \"vertical\" ? textRects.width / 2 : 0) : w2.layout.gridHeight;\n            const elText = this.annoCtx.graphics.drawText({\n                x: x1 + anno.label.offsetX,\n                y: textY + anno.label.offsetY - (anno.label.orientation === \"vertical\" ? anno.label.position === \"top\" ? textRects.width / 2 - 12 : -textRects.width / 2 : 0),\n                text: text,\n                textAnchor: anno.label.textAnchor,\n                fontSize: anno.label.style.fontSize,\n                fontFamily: anno.label.style.fontFamily,\n                fontWeight: anno.label.style.fontWeight,\n                foreColor: anno.label.style.color,\n                cssClass: `apexcharts-xaxis-annotation-label ${anno.label.style.cssClass} ${anno.id ? anno.id : \"\"}`\n            });\n            elText.attr({\n                rel: index\n            });\n            parent.appendChild(elText.node);\n            $e4b487e979d7c06d$var$applyProgressiveReveal(elText, x1 + anno.label.offsetX, w2);\n            this.annoCtx.helpers.setOrientations(anno, index);\n        }\n    }\n    drawXAxisAnnotations() {\n        const w2 = this.w;\n        const elg = this.annoCtx.graphics.group({\n            class: \"apexcharts-xaxis-annotations\"\n        });\n        w2.config.annotations.xaxis.map((anno, index)=>{\n            this.addXaxisAnnotation(anno, elg.node, index);\n        });\n        return elg;\n    }\n}\nclass $e4b487e979d7c06d$var$YAnnotations {\n    /**\n   * @param {import('./Annotations').default} annoCtx\n   */ constructor(annoCtx){\n        this.w = annoCtx.w;\n        this.annoCtx = annoCtx;\n        this.helpers = new $e4b487e979d7c06d$var$Helpers$2(this.annoCtx);\n        this.axesUtils = new $e4b487e979d7c06d$var$AxesUtils(this.annoCtx.w, {\n            theme: this.annoCtx.theme,\n            timeScale: this.annoCtx.timeScale\n        });\n    }\n    /**\n   * @param {YAxisAnnotations} anno\n   * @param {Element} parent\n   * @param {number} index\n   */ addYaxisAnnotation(anno, parent, index) {\n        const w2 = this.w;\n        const strokeDashArray = anno.strokeDashArray;\n        let result = this.helpers.getY1Y2(\"y1\", anno);\n        let y1 = result.yP;\n        const clipY1 = result.clipped;\n        let y2;\n        let clipY2 = true;\n        let drawn = false;\n        const text = anno.label.text;\n        if (anno.y2 === null || typeof anno.y2 === \"undefined\") {\n            if (!clipY1) {\n                drawn = true;\n                const line = this.annoCtx.graphics.drawLine(0 + anno.offsetX, // x1\n                y1 + anno.offsetY, // y1\n                this._getYAxisAnnotationWidth(anno), // x2\n                y1 + anno.offsetY, // y2\n                anno.borderColor, // lineColor\n                strokeDashArray, // dashArray\n                anno.borderWidth);\n                parent.appendChild(line.node);\n                if (anno.id) line.node.classList.add(anno.id);\n            }\n        } else {\n            result = this.helpers.getY1Y2(\"y2\", anno);\n            y2 = result.yP;\n            clipY2 = result.clipped;\n            if (y2 > y1) {\n                const temp = y1;\n                y1 = y2;\n                y2 = temp;\n            }\n            if (!(clipY1 && clipY2)) {\n                drawn = true;\n                const rect = this.annoCtx.graphics.drawRect(0 + anno.offsetX, // x1\n                y2 + anno.offsetY, // y1\n                this._getYAxisAnnotationWidth(anno), // x2\n                y1 - y2, // y2\n                0, // radius\n                anno.fillColor, // color\n                anno.opacity, // opacity,\n                1, // strokeWidth\n                anno.borderColor, // strokeColor\n                strokeDashArray);\n                rect.node.classList.add(\"apexcharts-annotation-rect\");\n                rect.attr(\"clip-path\", `url(#gridRectMask${w2.globals.cuid})`);\n                parent.appendChild(rect.node);\n                if (anno.id) rect.node.classList.add(anno.id);\n            }\n        }\n        if (drawn) {\n            const textX = anno.label.position === \"right\" ? w2.layout.gridWidth : anno.label.position === \"center\" ? w2.layout.gridWidth / 2 : 0;\n            const elText = this.annoCtx.graphics.drawText({\n                x: textX + anno.label.offsetX,\n                y: (y2 != null ? y2 : y1) + anno.label.offsetY - 3,\n                text: text,\n                textAnchor: anno.label.textAnchor,\n                fontSize: anno.label.style.fontSize,\n                fontFamily: anno.label.style.fontFamily,\n                fontWeight: anno.label.style.fontWeight,\n                foreColor: anno.label.style.color,\n                cssClass: `apexcharts-yaxis-annotation-label ${anno.label.style.cssClass} ${anno.id ? anno.id : \"\"}`\n            });\n            elText.attr({\n                rel: index\n            });\n            parent.appendChild(elText.node);\n        }\n    }\n    /**\n   * @param {YAxisAnnotations} anno\n   */ _getYAxisAnnotationWidth(anno) {\n        const w2 = this.w;\n        let width = w2.layout.gridWidth;\n        if (anno.width.indexOf(\"%\") > -1) width = w2.layout.gridWidth * parseInt(anno.width, 10) / 100;\n        else width = parseInt(anno.width, 10);\n        return width + anno.offsetX;\n    }\n    drawYAxisAnnotations() {\n        const w2 = this.w;\n        const elg = this.annoCtx.graphics.group({\n            class: \"apexcharts-yaxis-annotations\"\n        });\n        w2.config.annotations.yaxis.forEach((anno, index)=>{\n            anno.yAxisIndex = this.axesUtils.translateYAxisIndex(anno.yAxisIndex);\n            if (!(this.axesUtils.isYAxisHidden(anno.yAxisIndex) && this.axesUtils.yAxisAllSeriesCollapsed(anno.yAxisIndex))) this.addYaxisAnnotation(anno, elg.node, index);\n        });\n        return elg;\n    }\n}\nclass $e4b487e979d7c06d$var$PointAnnotations {\n    /**\n   * @param {import('./Annotations').default} annoCtx\n   */ constructor(annoCtx){\n        this.w = annoCtx.w;\n        this.annoCtx = annoCtx;\n        this.helpers = new $e4b487e979d7c06d$var$Helpers$2(this.annoCtx);\n    }\n    /**\n   * @param {Record<string, any>} anno\n   * @param {Element} parent\n   * @param {number} index\n   */ addPointAnnotation(anno, parent, index) {\n        const w2 = this.w;\n        if (w2.globals.collapsedSeriesIndices.indexOf(anno.seriesIndex) > -1) return;\n        const resultX = this.helpers.getX1X2(\"x1\", anno);\n        const x = resultX.x;\n        const clipX = resultX.clipped;\n        const resultY = this.helpers.getY1Y2(\"y1\", anno);\n        const y = resultY.yP;\n        const clipY = resultY.clipped;\n        if (!$e4b487e979d7c06d$var$Utils$1.isNumber(x)) return;\n        if (!(clipY || clipX)) {\n            const optsPoints = {\n                pSize: anno.marker.size,\n                pointStrokeWidth: anno.marker.strokeWidth,\n                pointFillColor: anno.marker.fillColor,\n                pointStrokeColor: anno.marker.strokeColor,\n                shape: anno.marker.shape,\n                pRadius: anno.marker.radius,\n                class: `apexcharts-point-annotation-marker ${anno.marker.cssClass} ${anno.id ? anno.id : \"\"}`\n            };\n            let point = this.annoCtx.graphics.drawMarker(x + anno.marker.offsetX, y + anno.marker.offsetY, optsPoints);\n            parent.appendChild(point.node);\n            const tooltipTargets = [\n                point.node\n            ];\n            $e4b487e979d7c06d$var$applyProgressiveReveal(point, x, w2);\n            const text = anno.label.text ? anno.label.text : \"\";\n            const elText = this.annoCtx.graphics.drawText({\n                x: x + anno.label.offsetX,\n                y: y + anno.label.offsetY - anno.marker.size - parseFloat(anno.label.style.fontSize) / 1.6,\n                text: text,\n                textAnchor: anno.label.textAnchor,\n                fontSize: anno.label.style.fontSize,\n                fontFamily: anno.label.style.fontFamily,\n                fontWeight: anno.label.style.fontWeight,\n                foreColor: anno.label.style.color,\n                cssClass: `apexcharts-point-annotation-label ${anno.label.style.cssClass} ${anno.id ? anno.id : \"\"}`\n            });\n            elText.attr({\n                rel: index\n            });\n            parent.appendChild(elText.node);\n            $e4b487e979d7c06d$var$applyProgressiveReveal(elText, x, w2);\n            if (anno.customSVG.SVG) {\n                const g2 = this.annoCtx.graphics.group({\n                    class: \"apexcharts-point-annotations-custom-svg \" + anno.customSVG.cssClass\n                });\n                g2.attr({\n                    transform: `translate(${x + anno.customSVG.offsetX}, ${y + anno.customSVG.offsetY})`\n                });\n                g2.node.innerHTML = anno.customSVG.SVG;\n                parent.appendChild(g2.node);\n                tooltipTargets.push(g2.node);\n            }\n            if (anno.image.path) {\n                const imgWidth = anno.image.width ? anno.image.width : 20;\n                const imgHeight = anno.image.height ? anno.image.height : 20;\n                point = this.annoCtx.addImage({\n                    x: x + anno.image.offsetX - imgWidth / 2,\n                    y: y + anno.image.offsetY - imgHeight / 2,\n                    width: imgWidth,\n                    height: imgHeight,\n                    path: anno.image.path,\n                    appendTo: \".apexcharts-point-annotations\"\n                });\n                tooltipTargets.push(point.node);\n            }\n            if (anno.tooltip && anno.tooltip.enabled) tooltipTargets.forEach((node)=>{\n                node.addEventListener(\"mouseenter\", ()=>{\n                    this.showPointTooltip(anno, node);\n                });\n                node.addEventListener(\"mouseleave\", ()=>{\n                    this.hidePointTooltip();\n                });\n            });\n            if (anno.mouseEnter) point.node.addEventListener(\"mouseenter\", anno.mouseEnter.bind(this, anno));\n            if (anno.mouseLeave) point.node.addEventListener(\"mouseleave\", anno.mouseLeave.bind(this, anno));\n            if (anno.click) point.node.addEventListener(\"click\", anno.click.bind(this, anno));\n        }\n    }\n    /**\n   * Lazily create (once per chart) and return the shared HTML element used to\n   * render point-annotation tooltips. Reuses the `.apexcharts-tooltip` glass\n   * styling; the `.apexcharts-annotation-tooltip` modifier adds padding and\n   * text wrapping for free-form content.\n   * @returns {HTMLElement}\n   */ getPointTooltipEl() {\n        const w2 = this.w;\n        let el = /** @type {HTMLElement | null} */ w2.dom.elWrap.querySelector(\".apexcharts-annotation-tooltip\");\n        if (!el) {\n            el = /** @type {HTMLElement} */ $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n            el.classList.add(\"apexcharts-tooltip\", \"apexcharts-annotation-tooltip\");\n            w2.dom.elWrap.appendChild(el);\n        }\n        return el;\n    }\n    /**\n   * Resolve the tooltip markup for a point annotation. Precedence:\n   * `tooltip.formatter` (fn) -> `tooltip.text` -> `label.text`. Arrays are\n   * joined with line breaks.\n   * @param {Record<string, any>} anno\n   * @returns {string}\n   */ getPointTooltipContent(anno) {\n        const w2 = this.w;\n        const tt = anno.tooltip || {};\n        if (typeof tt.formatter === \"function\") return tt.formatter({\n            annotation: anno,\n            seriesIndex: anno.seriesIndex,\n            id: anno.id,\n            w: w2\n        });\n        let content = tt.text != null ? tt.text : anno.label && anno.label.text;\n        if (Array.isArray(content)) content = content.join(\"<br/>\");\n        return content == null ? \"\" : String(content);\n    }\n    /**\n   * @param {Record<string, any>} anno\n   * @param {Element} targetNode the hovered marker / image / custom-SVG node\n   */ showPointTooltip(anno, targetNode) {\n        const w2 = this.w;\n        const content = this.getPointTooltipContent(anno);\n        if (!content) return;\n        const el = this.getPointTooltipEl();\n        el.innerHTML = content;\n        const theme = anno.tooltip.theme || w2.config.tooltip.theme || \"light\";\n        el.classList.remove(\"apexcharts-theme-light\", \"apexcharts-theme-dark\");\n        el.classList.add(`apexcharts-theme-${theme}`);\n        el.classList.add(\"apexcharts-active\");\n        const wrapRect = w2.dom.elWrap.getBoundingClientRect();\n        const markRect = targetNode.getBoundingClientRect();\n        const ttRect = el.getBoundingClientRect();\n        const offsetX = anno.tooltip.offsetX || 0;\n        const offsetY = anno.tooltip.offsetY || 0;\n        let left = markRect.left - wrapRect.left + markRect.width / 2 - ttRect.width / 2;\n        let top = markRect.top - wrapRect.top - ttRect.height - 10;\n        left = Math.max(0, Math.min(left, wrapRect.width - ttRect.width));\n        if (top < 0) top = markRect.top - wrapRect.top + markRect.height + 10;\n        el.style.left = left + offsetX + \"px\";\n        el.style.top = top + offsetY + \"px\";\n    }\n    hidePointTooltip() {\n        const el = /** @type {HTMLElement | null} */ this.w.dom.elWrap.querySelector(\".apexcharts-annotation-tooltip\");\n        if (el) el.classList.remove(\"apexcharts-active\");\n    }\n    drawPointAnnotations() {\n        const w2 = this.w;\n        const elg = this.annoCtx.graphics.group({\n            class: \"apexcharts-point-annotations\"\n        });\n        w2.config.annotations.points.map((anno, index)=>{\n            this.addPointAnnotation(anno, elg.node, index);\n        });\n        return elg;\n    }\n}\nclass $e4b487e979d7c06d$var$Annotations {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   */ constructor(w2, { theme: theme = null, timeScale: timeScale = null } = {}){\n        this.w = w2;\n        this.theme = theme;\n        this.timeScale = timeScale;\n        this.invertAxis = void 0;\n        this.inversedReversedAxis = void 0;\n        this.graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        if (this.w.globals.isBarHorizontal) this.invertAxis = true;\n        this.helpers = new $e4b487e979d7c06d$var$Helpers$2(this);\n        this.xAxisAnnotations = new $e4b487e979d7c06d$var$XAnnotations(this);\n        this.yAxisAnnotations = new $e4b487e979d7c06d$var$YAnnotations(this);\n        this.pointsAnnotations = new $e4b487e979d7c06d$var$PointAnnotations(this);\n        if (this.w.globals.isBarHorizontal && this.w.config.yaxis[0].reversed) this.inversedReversedAxis = true;\n        this.xDivision = this.w.layout.gridWidth / this.w.globals.dataPoints;\n    }\n    drawAxesAnnotations() {\n        const w2 = this.w;\n        if (w2.globals.axisCharts && w2.globals.dataPoints) {\n            const yAnnotations = this.yAxisAnnotations.drawYAxisAnnotations();\n            const xAnnotations = this.xAxisAnnotations.drawXAxisAnnotations();\n            const pointAnnotations = this.pointsAnnotations.drawPointAnnotations();\n            const initialAnim = w2.config.chart.animations.enabled;\n            const annoArray = [\n                yAnnotations,\n                xAnnotations,\n                pointAnnotations\n            ];\n            const annoElArray = [\n                xAnnotations.node,\n                yAnnotations.node,\n                pointAnnotations.node\n            ];\n            const progressiveAnnos = w2.config.chart.type === \"line\" || w2.config.chart.type === \"area\" || w2.config.chart.type === \"rangeArea\";\n            const skipGroupHide = [\n                progressiveAnnos,\n                false,\n                progressiveAnnos\n            ];\n            for(let i2 = 0; i2 < 3; i2++){\n                w2.dom.elGraphical.add(annoArray[i2]);\n                if (initialAnim && !w2.globals.resized && !w2.globals.dataChanged) {\n                    if (w2.config.chart.type !== \"scatter\" && w2.config.chart.type !== \"bubble\" && w2.globals.dataPoints > 1 && !skipGroupHide[i2]) annoElArray[i2].classList.add(\"apexcharts-element-hidden\");\n                }\n                w2.globals.delayedElements.push({\n                    el: annoElArray[i2],\n                    index: 0\n                });\n            }\n            this.helpers.annotationsBackground();\n        }\n    }\n    drawImageAnnos() {\n        const w2 = this.w;\n        w2.config.annotations.images.map((s2)=>{\n            this.addImage(s2);\n        });\n    }\n    drawTextAnnos() {\n        const w2 = this.w;\n        w2.config.annotations.texts.map((t2)=>{\n            this.addText(t2);\n        });\n    }\n    /**\n   * @param {Record<string, any>} anno\n   * @param {Element} parent\n   * @param {number} index\n   */ addXaxisAnnotation(anno, parent, index) {\n        this.xAxisAnnotations.addXaxisAnnotation(anno, parent, index);\n    }\n    /**\n   * @param {Record<string, any>} anno\n   * @param {Element} parent\n   * @param {number} index\n   */ addYaxisAnnotation(anno, parent, index) {\n        this.yAxisAnnotations.addYaxisAnnotation(anno, parent, index);\n    }\n    /**\n   * @param {Record<string, any>} anno\n   * @param {Element} parent\n   * @param {number} index\n   */ addPointAnnotation(anno, parent, index) {\n        this.pointsAnnotations.addPointAnnotation(anno, parent, index);\n    }\n    /**\n   * @param {Record<string, any>} params\n   */ addText(params) {\n        const { x: x, y: y, text: text, textAnchor: textAnchor, foreColor: foreColor, fontSize: fontSize, fontFamily: fontFamily, fontWeight: fontWeight, cssClass: cssClass, backgroundColor: backgroundColor, borderWidth: borderWidth, strokeDashArray: strokeDashArray, borderRadius: borderRadius, borderColor: borderColor, appendTo: appendTo = \".apexcharts-svg\", paddingLeft: paddingLeft = 4, paddingRight: paddingRight = 4, paddingBottom: paddingBottom = 2, paddingTop: paddingTop = 2 } = params;\n        const w2 = this.w;\n        const elText = this.graphics.drawText({\n            x: x,\n            y: y,\n            text: text,\n            textAnchor: textAnchor || \"start\",\n            fontSize: fontSize || \"12px\",\n            fontWeight: fontWeight || \"regular\",\n            fontFamily: fontFamily || w2.config.chart.fontFamily,\n            foreColor: foreColor || w2.config.chart.foreColor,\n            cssClass: (cssClass, cssClass)\n        });\n        const parent = w2.dom.baseEl.querySelector(appendTo);\n        if (parent) parent.appendChild(elText.node);\n        const textRect = elText.bbox();\n        if (text) {\n            const elRect = this.graphics.drawRect(textRect.x - paddingLeft, textRect.y - paddingTop, textRect.width + paddingLeft + paddingRight, textRect.height + paddingBottom + paddingTop, borderRadius, backgroundColor ? backgroundColor : \"transparent\", 1, borderWidth, borderColor, strokeDashArray);\n            parent.insertBefore(elRect.node, elText.node);\n        }\n    }\n    /**\n   * @param {Record<string, any>} params\n   */ addImage(params) {\n        const w2 = this.w;\n        const { path: path, x: x = 0, y: y = 0, width: width = 20, height: height = 20, appendTo: appendTo = \".apexcharts-svg\" } = params;\n        const img = w2.dom.Paper.image(path);\n        img.size(width, height).move(x, y);\n        const parent = w2.dom.baseEl.querySelector(appendTo);\n        if (parent) parent.appendChild(img.node);\n        return img;\n    }\n    // The addXaxisAnnotation method requires a parent class, and user calling this method externally on the chart instance may not specify parent, hence a different method\n    /**\n   * @param {Record<string, any>} params\n   * @param {boolean} pushToMemory\n   * @param {any} context\n   */ addXaxisAnnotationExternal(params, pushToMemory, context) {\n        this.addAnnotationExternal({\n            params: params,\n            pushToMemory: pushToMemory,\n            context: context,\n            type: \"xaxis\",\n            contextMethod: context.addXaxisAnnotation\n        });\n        return context;\n    }\n    /**\n   * @param {Record<string, any>} params\n   * @param {boolean} pushToMemory\n   * @param {any} context\n   */ addYaxisAnnotationExternal(params, pushToMemory, context) {\n        this.addAnnotationExternal({\n            params: params,\n            pushToMemory: pushToMemory,\n            context: context,\n            type: \"yaxis\",\n            contextMethod: context.addYaxisAnnotation\n        });\n        return context;\n    }\n    /**\n   * @param {Record<string, any>} params\n   * @param {boolean} pushToMemory\n   * @param {any} context\n   */ addPointAnnotationExternal(params, pushToMemory, context) {\n        if (typeof this.invertAxis === \"undefined\") this.invertAxis = context.w.globals.isBarHorizontal;\n        this.addAnnotationExternal({\n            params: params,\n            pushToMemory: pushToMemory,\n            context: context,\n            type: \"point\",\n            contextMethod: context.addPointAnnotation\n        });\n        return context;\n    }\n    /** @param {{params: any, pushToMemory: any, context: any, type: any, contextMethod: any}} opts */ addAnnotationExternal({ params: params, pushToMemory: pushToMemory, context: context, type: type, contextMethod: contextMethod }) {\n        const me = context;\n        const w2 = me.w;\n        const parent = w2.dom.baseEl.querySelector(`.apexcharts-${type}-annotations`);\n        const index = parent.childNodes.length + 1;\n        const options2 = new $e4b487e979d7c06d$var$Options();\n        const axesAnno = Object.assign({}, type === \"xaxis\" ? options2.xAxisAnnotation : type === \"yaxis\" ? options2.yAxisAnnotation : options2.pointAnnotation);\n        const anno = $e4b487e979d7c06d$var$Utils$1.extend(axesAnno, params);\n        switch(type){\n            case \"xaxis\":\n                this.addXaxisAnnotation(anno, parent, index);\n                break;\n            case \"yaxis\":\n                this.addYaxisAnnotation(anno, parent, index);\n                break;\n            case \"point\":\n                this.addPointAnnotation(anno, parent, index);\n                break;\n        }\n        const axesAnnoLabel = w2.dom.baseEl.querySelector(`.apexcharts-${type}-annotations .apexcharts-${type}-annotation-label[rel='${index}']`);\n        const elRect = this.helpers.addBackgroundToAnno(axesAnnoLabel, anno);\n        if (elRect) parent.insertBefore(elRect.node, axesAnnoLabel);\n        if (pushToMemory) w2.globals.memory.methodsToExec.push({\n            context: me,\n            id: anno.id ? anno.id : $e4b487e979d7c06d$var$Utils$1.randomId(),\n            method: contextMethod,\n            label: \"addAnnotation\",\n            params: params\n        });\n        return context;\n    }\n    /**\n   * Remove the shared point-annotation hover tooltip node.\n   *\n   * `hidePointTooltip` is wired only to the marker's `mouseleave`; if the marker\n   * is torn down while hovered (clearAnnotations / removeAnnotation / a redraw),\n   * that never fires and the tooltip is left `.apexcharts-active`. A stale active\n   * annotation tooltip then permanently suppresses the series tooltip (see the\n   * guard in Tooltip.drawTooltip added by b1369f5ab). Removing the node clears\n   * both the ghost box and the stale state; it is recreated on the next hover.\n   * @param {any} w\n   */ _removeAnnotationTooltip(w2) {\n        const el = w2.dom.elWrap && w2.dom.elWrap.querySelector(\".apexcharts-annotation-tooltip\");\n        if (el && el.parentNode) el.parentNode.removeChild(el);\n    }\n    /**\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ clearAnnotations(ctx) {\n        const w2 = ctx.w;\n        this._removeAnnotationTooltip(w2);\n        const annos = w2.dom.baseEl.querySelectorAll(\".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations\");\n        for(let i2 = w2.globals.memory.methodsToExec.length - 1; i2 >= 0; i2--)if (w2.globals.memory.methodsToExec[i2].label === \"addText\" || w2.globals.memory.methodsToExec[i2].label === \"addAnnotation\") w2.globals.memory.methodsToExec.splice(i2, 1);\n        Array.prototype.forEach.call(annos, (a2)=>{\n            while(a2.firstChild)a2.removeChild(a2.firstChild);\n        });\n    }\n    /**\n   * @param {import('../../types/internal').ChartContext} ctx\n   * @param {string} id\n   */ removeAnnotation(ctx, id) {\n        const w2 = ctx.w;\n        this._removeAnnotationTooltip(w2);\n        const annos = w2.dom.baseEl.querySelectorAll(`.${id}`);\n        if (annos) {\n            w2.globals.memory.methodsToExec.map((m2, i2)=>{\n                if (m2.id === id) w2.globals.memory.methodsToExec.splice(i2, 1);\n            });\n            Object.keys(w2.config.annotations).forEach((key)=>{\n                const annotationArray = w2.config.annotations[key];\n                if (Array.isArray(annotationArray)) w2.config.annotations[key] = annotationArray.filter((m2)=>m2.id !== id);\n            });\n            Array.prototype.forEach.call(annos, (a2)=>{\n                a2.parentElement.removeChild(a2);\n            });\n        }\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    annotations: $e4b487e979d7c06d$var$Annotations\n});\nclass $e4b487e979d7c06d$var$KeyboardNavigation {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.seriesIndex = 0;\n        this.dataPointIndex = 0;\n        this.active = false;\n        this._tooltipDismissed = false;\n        this._focusedEl = null;\n        this._hoveredBarEl = null;\n        this._enlargedScatterMarker = null;\n        this._onKeyDown = this._onKeyDown.bind(this);\n        this._onFocus = this._onFocus.bind(this);\n        this._onBlur = this._onBlur.bind(this);\n        this._onLegendClick = this._onLegendClick.bind(this);\n        this._onPointerDown = this._onPointerDown.bind(this);\n        this._lastPointerDownAt = 0;\n    }\n    // ─── Public API ───────────────────────────────────────────────────────────\n    /**\n   * Called after the chart and tooltip have been fully rendered.\n   * Attaches event listeners and makes the SVG keyboard-focusable.\n   */ init() {\n        const w2 = this.w;\n        const svgEl = w2.dom.Paper.node;\n        if (!svgEl) return;\n        svgEl.setAttribute(\"tabindex\", \"0\");\n        svgEl.addEventListener(\"focus\", this._onFocus);\n        svgEl.addEventListener(\"blur\", this._onBlur);\n        svgEl.addEventListener(\"mousedown\", this._onPointerDown, {\n            capture: true\n        });\n        svgEl.addEventListener(\"pointerdown\", this._onPointerDown, {\n            capture: true\n        });\n        svgEl.addEventListener(\"touchstart\", this._onPointerDown, {\n            capture: true,\n            passive: true\n        });\n        svgEl.addEventListener(\"keydown\", this._onKeyDown, {\n            passive: false\n        });\n        this.ctx.events.addEventListener(\"legendClick\", this._onLegendClick);\n    }\n    /**\n   * Removes all event listeners. Called from chart.destroy().\n   */ destroy() {\n        const w2 = this.w;\n        const svgEl = w2.dom.Paper && w2.dom.Paper.node;\n        this.ctx.events.removeEventListener(\"legendClick\", this._onLegendClick);\n        if (!svgEl) return;\n        svgEl.removeEventListener(\"focus\", this._onFocus);\n        svgEl.removeEventListener(\"blur\", this._onBlur);\n        svgEl.removeEventListener(\"keydown\", this._onKeyDown);\n        svgEl.removeEventListener(\"mousedown\", this._onPointerDown, /** @type {any} */ {\n            capture: true\n        });\n        svgEl.removeEventListener(\"pointerdown\", this._onPointerDown, /** @type {any} */ {\n            capture: true\n        });\n        svgEl.removeEventListener(\"touchstart\", this._onPointerDown, /** @type {any} */ {\n            capture: true\n        });\n    }\n    // Records the timestamp of the most recent pointer-down inside the SVG.\n    // `_onFocus` reads this to distinguish keyboard-driven focus (no recent\n    // pointer activity) from mouse-driven focus (pointer event within the\n    // last 100 ms). Stays a no-op for keyboard users.\n    _onPointerDown() {\n        this._lastPointerDownAt = Date.now();\n    }\n    /**\n   * Called from Events.js keydown handler. Navigation keys are already handled\n   * by the direct SVG listener (which can call preventDefault). This entry\n   * point is intentionally a no-op — Events.js still fires the public keyDown\n   * callback and fireEvent('keydown') independently.\n   * @param {Event} _e\n   */ handleKey(_e) {}\n    // ─── Focus / blur ─────────────────────────────────────────────────────────\n    _onFocus() {\n        if (!this._isNavEnabled()) return;\n        if (Date.now() - this._lastPointerDownAt < 100) return;\n        this.active = true;\n        this._clampCursor();\n        this._snapToVisibleRange();\n        this._showCurrentPoint();\n    }\n    _onBlur() {\n        this.active = false;\n        this._tooltipDismissed = false;\n        this._hideFocus();\n    }\n    // Called when the user clicks a legend item (collapse/expand a series).\n    // Hide the keyboard-nav tooltip — the chart is about to re-render and the\n    // current position may no longer be valid.\n    _onLegendClick() {\n        if (!this.active) return;\n        this.active = false;\n        this._hideFocus();\n    }\n    // ─── Key handler ──────────────────────────────────────────────────────────\n    /**\n   * @param {KeyboardEvent} e\n   */ _onKeyDown(e2) {\n        var _a, _b, _c;\n        if (!this._isNavEnabled() || !this.active) return;\n        if (e2.shiftKey && (e2.key === \"ArrowRight\" || e2.key === \"ArrowLeft\") && this._canPan()) {\n            e2.preventDefault();\n            this._panBy(e2.key === \"ArrowRight\" ? 1 : -1);\n            return;\n        }\n        switch(e2.key){\n            case \"ArrowRight\":\n                e2.preventDefault();\n                this._move(0, 1);\n                break;\n            case \"ArrowLeft\":\n                e2.preventDefault();\n                this._move(0, -1);\n                break;\n            case \"ArrowUp\":\n                e2.preventDefault();\n                this._move(-1, 0);\n                break;\n            case \"ArrowDown\":\n                e2.preventDefault();\n                this._move(1, 0);\n                break;\n            case \"Home\":\n                e2.preventDefault();\n                this.dataPointIndex = 0;\n                this._skipNullForward();\n                this._showCurrentPoint();\n                break;\n            case \"End\":\n                e2.preventDefault();\n                this.dataPointIndex = this._getDataPointCount(this.seriesIndex) - 1;\n                this._skipNullBackward();\n                this._showCurrentPoint();\n                break;\n            case \"Enter\":\n            case \" \":\n                e2.preventDefault();\n                this._fireClick();\n                break;\n            case \"+\":\n            case \"=\":\n                if (this._canZoom()) {\n                    e2.preventDefault();\n                    (_a = this.ctx.toolbar) == null || _a.handleZoomIn();\n                    this._announce(\"Zoomed in\");\n                }\n                break;\n            case \"-\":\n            case \"_\":\n                if (this._canZoom()) {\n                    e2.preventDefault();\n                    (_b = this.ctx.toolbar) == null || _b.handleZoomOut();\n                    this._announce(\"Zoomed out\");\n                }\n                break;\n            case \"0\":\n                if (this._canZoom() && this.w.interact.zoomed) {\n                    e2.preventDefault();\n                    (_c = this.ctx.toolbar) == null || _c.handleZoomReset();\n                    this._announce(\"Zoom reset\");\n                }\n                break;\n            case \"Escape\":\n                e2.preventDefault();\n                if (!this._tooltipDismissed) {\n                    this._tooltipDismissed = true;\n                    this._hideFocus();\n                } else {\n                    this.active = false;\n                    this._tooltipDismissed = false;\n                    this._hideFocus();\n                }\n                break;\n        }\n    }\n    // ─── Zoom / pan (keyboard alternatives for drag gestures) ─────────────────\n    _canZoom() {\n        const w2 = this.w;\n        return Boolean(w2.globals.axisCharts && w2.config.chart.zoom && w2.config.chart.zoom.enabled);\n    }\n    _canPan() {\n        return this._canZoom();\n    }\n    /**\n   * Shift the visible x-range by ~10% in the given direction.\n   * @param {number} direction +1 = right, -1 = left\n   */ _panBy(direction) {\n        const w2 = this.w;\n        const toolbar = this.ctx.toolbar;\n        if (!toolbar) return;\n        const minX = Number(w2.globals.minX);\n        const maxX = Number(w2.globals.maxX);\n        if (!isFinite(minX) || !isFinite(maxX) || minX === maxX) return;\n        const span = maxX - minX;\n        const step = span * 0.1 * direction;\n        toolbar.zoomUpdateOptions(minX + step, maxX + step);\n        this._announce(direction > 0 ? \"Panned right\" : \"Panned left\");\n    }\n    // ─── Navigation ───────────────────────────────────────────────────────────\n    /**\n   * @param {number} dSeries\n   * @param {number} dPoint\n   */ _move(dSeries, dPoint) {\n        const w2 = this.w;\n        const wrapAround = w2.config.chart.accessibility.keyboard.navigation.wrapAround;\n        if (dSeries !== 0) {\n            const ttCtx = this.w.globals.tooltip;\n            if (ttCtx && ttCtx.tConfig && ttCtx.tConfig.shared) {\n                const j = this.dataPointIndex;\n                const isActuallyShared = ttCtx.tooltipUtil && ttCtx.tooltipUtil.isXoverlap(j) && ttCtx.tooltipUtil.isInitialSeriesSameLen();\n                if (isActuallyShared) return;\n            }\n            const total = this._getSeriesCount();\n            let si = this.seriesIndex + dSeries;\n            let attempts = 0;\n            while(attempts < total){\n                if (si < 0) si = wrapAround ? total - 1 : 0;\n                if (si >= total) si = wrapAround ? 0 : total - 1;\n                if (!w2.globals.collapsedSeriesIndices.includes(si)) break;\n                si += dSeries;\n                attempts++;\n            }\n            this.seriesIndex = si;\n            const dpCount = this._getDataPointCount(si);\n            if (this.dataPointIndex >= dpCount) this.dataPointIndex = dpCount - 1;\n        }\n        if (dPoint !== 0) {\n            const dpCount = this._getDataPointCount(this.seriesIndex);\n            let di = this.dataPointIndex + dPoint;\n            if (di < 0) di = wrapAround ? dpCount - 1 : 0;\n            if (di >= dpCount) di = wrapAround ? 0 : dpCount - 1;\n            this.dataPointIndex = di;\n            if (dPoint > 0) this._skipNullForward();\n            else this._skipNullBackward();\n            if (!this._isDataPointVisible(this.seriesIndex, this.dataPointIndex)) this._snapToVisibleRangeInDirection(dPoint);\n        }\n        this._showCurrentPoint();\n    }\n    /** Advance dataPointIndex forward past any nulls */ _skipNullForward() {\n        const w2 = this.w;\n        const si = this.seriesIndex;\n        const dpCount = this._getDataPointCount(si);\n        let di = this.dataPointIndex;\n        let attempts = 0;\n        if (!Array.isArray(w2.seriesData.series[si])) return;\n        while(attempts < dpCount && w2.seriesData.series[si][di] === null){\n            di = (di + 1) % dpCount;\n            attempts++;\n        }\n        this.dataPointIndex = di;\n    }\n    /** Retreat dataPointIndex backward past any nulls */ _skipNullBackward() {\n        const w2 = this.w;\n        const si = this.seriesIndex;\n        const dpCount = this._getDataPointCount(si);\n        let di = this.dataPointIndex;\n        let attempts = 0;\n        if (!Array.isArray(w2.seriesData.series[si])) return;\n        while(attempts < dpCount && w2.seriesData.series[si][di] === null){\n            di = (di - 1 + dpCount) % dpCount;\n            attempts++;\n        }\n        this.dataPointIndex = di;\n    }\n    // ─── Display ──────────────────────────────────────────────────────────────\n    _showCurrentPoint() {\n        const { seriesIndex: i2, dataPointIndex: j } = this;\n        const w2 = this.w;\n        const ttCtx = w2.globals.tooltip;\n        if (!ttCtx || !ttCtx.ttItems) return;\n        w2.interact.capturedSeriesIndex = i2;\n        w2.interact.capturedDataPointIndex = j;\n        this._applyFocusClass(i2, j);\n        this._showTooltip(i2, j, /** @type {any} */ ttCtx);\n    }\n    _hideFocus() {\n        const w2 = this.w;\n        const ttCtx = /** @type {any} */ w2.globals.tooltip;\n        this._removeFocusClass();\n        this._leaveHoveredBar();\n        if (!ttCtx) return;\n        if (ttCtx.marker) ttCtx.marker.resetPointsSize();\n        this._enlargedScatterMarker = null;\n        const tooltipEl = ttCtx.getElTooltip();\n        if (tooltipEl) {\n            tooltipEl.classList.remove(\"apexcharts-active\");\n            if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) tooltipEl.setAttribute(\"aria-hidden\", \"true\");\n        }\n        w2.dom.baseEl.classList.remove(\"apexcharts-tooltip-active\");\n        const xcrosshairs = ttCtx.getElXCrosshairs();\n        if (xcrosshairs) xcrosshairs.classList.remove(\"apexcharts-active\");\n    }\n    // ─── Tooltip display per chart type ───────────────────────────────────────\n    /**\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   */ _showTooltip(i2, j, ttCtx) {\n        const w2 = this.w;\n        const type = w2.config.chart.type;\n        const tooltipEl = ttCtx.getElTooltip();\n        if (!tooltipEl) return;\n        const cachedDims = ttCtx.getCachedDimensions();\n        ttCtx.tooltipRect = {\n            x: 0,\n            y: 0,\n            ttWidth: cachedDims.ttWidth || 0,\n            ttHeight: cachedDims.ttHeight || 0\n        };\n        this._setSyntheticEvent(i2, j, ttCtx);\n        w2.dom.baseEl.classList.add(\"apexcharts-tooltip-active\");\n        tooltipEl.classList.add(\"apexcharts-active\");\n        if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) tooltipEl.removeAttribute(\"aria-hidden\");\n        if (type === \"pie\" || type === \"donut\" || type === \"polarArea\") this._showTooltipNonAxis(i2, j, ttCtx, tooltipEl);\n        else if (type === \"radialBar\") this._showTooltipRadialBar(i2, j, ttCtx, tooltipEl);\n        else if (type === \"heatmap\" || type === \"treemap\") this._showTooltipHeatTree(i2, j, ttCtx, tooltipEl, type);\n        else if (type === \"bar\" || type === \"candlestick\" || type === \"boxPlot\" || type === \"violin\" || type === \"rangeBar\") this._showTooltipBar(i2, j, ttCtx);\n        else this._showTooltipAxisLine(i2, j, ttCtx);\n    }\n    /**\n   * Set ttCtx.e to a synthetic mouse-event-like object whose clientX/Y point\n   * to the centre of the current data-point element.  This ensures that any\n   * positioning helper that reads ttCtx.e (followCursor path in moveTooltip,\n   * moveStickyTooltipOverBars, moveDynamicPointsOnHover, etc.) gets valid\n   * coordinates rather than crashing on undefined.\n   *\n   * For chart types that don't have a concrete SVG element per data point\n   * (pie, radialBar) we fall back to the SVG centre.\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   */ _setSyntheticEvent(i2, j, ttCtx) {\n        const w2 = this.w;\n        const type = w2.config.chart.type;\n        let clientX = 0;\n        let clientY = 0;\n        const el = this._getFocusableElement(i2, j);\n        if (el) {\n            const rect = el.getBoundingClientRect();\n            clientX = rect.left + rect.width / 2;\n            clientY = rect.top + rect.height / 2;\n        } else if (w2.globals.pointsArray && w2.globals.pointsArray[i2] && w2.globals.pointsArray[i2][j]) {\n            const pt = w2.globals.pointsArray[i2][j];\n            const elGrid = ttCtx.getElGrid && ttCtx.getElGrid();\n            if (elGrid) {\n                const gridRect = elGrid.getBoundingClientRect();\n                clientX = gridRect.left + (pt[0] || 0);\n                clientY = gridRect.top + (pt[1] || 0);\n            }\n        } else {\n            const svgEl = w2.dom.Paper && w2.dom.Paper.node;\n            if (svgEl) {\n                const svgRect = svgEl.getBoundingClientRect();\n                clientX = svgRect.left + svgRect.width / 2;\n                clientY = svgRect.top + svgRect.height / 2;\n            }\n        }\n        if (type === \"line\" || type === \"area\" || type === \"rangeArea\" || type === \"scatter\" || type === \"bubble\" || type === \"radar\") {\n            if (w2.globals.pointsArray && w2.globals.pointsArray[i2] && w2.globals.pointsArray[i2][j]) {\n                const pt = w2.globals.pointsArray[i2][j];\n                const elGrid = ttCtx.getElGrid && ttCtx.getElGrid();\n                if (elGrid) {\n                    const gridRect = elGrid.getBoundingClientRect();\n                    clientX = gridRect.left + (pt[0] || 0);\n                    clientY = gridRect.top + (pt[1] || 0);\n                }\n            }\n        }\n        ttCtx.e = {\n            type: \"mousemove\",\n            clientX: clientX,\n            clientY: clientY\n        };\n    }\n    /**\n   * bar / column / candlestick / boxPlot / rangeBar\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   */ _showTooltipBar(i2, j, ttCtx) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        const shared = ttCtx.tConfig.shared && (ttCtx.tooltipUtil.isXoverlap(j) || w2.globals.isBarHorizontal) && ttCtx.tooltipUtil.isInitialSeriesSameLen();\n        const rangeData = /** @type {any} */ (_d = (_c = (_b = (_a = w2.rangeData.seriesRange) == null ? void 0 : _a[i2]) == null ? void 0 : _b[j]) == null ? void 0 : _c.y) == null ? void 0 : _d[0];\n        ttCtx.tooltipLabels.drawSeriesTexts($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({\n            ttItems: ttCtx.ttItems,\n            i: i2,\n            j: j\n        }, (rangeData == null ? void 0 : rangeData.y1) !== void 0 && {\n            y1: rangeData.y1\n        }), (rangeData == null ? void 0 : rangeData.y2) !== void 0 && {\n            y2: rangeData.y2\n        }), {\n            shared: shared\n        }));\n        const parent = `.apexcharts-series[data\\\\:realIndex='${i2}']`;\n        const elPath = w2.dom.Paper.findOne(`${parent} path[j='${j}'], ${parent} circle[j='${j}'], ${parent} rect[j='${j}']`);\n        if (elPath) {\n            this._leaveHoveredBar();\n            const graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n            graphics.pathMouseEnter(elPath, null);\n            this._hoveredBarEl = elPath;\n        }\n        if (w2.globals.isBarHorizontal) {\n            const barDomEl = elPath && elPath.node;\n            if (barDomEl) {\n                const wrapRect = w2.dom.elWrap.getBoundingClientRect();\n                const barRect = barDomEl.getBoundingClientRect();\n                const barCx = barRect.left - wrapRect.left;\n                const barCy = barRect.top - wrapRect.top;\n                const bh = barRect.height;\n                const bw = barRect.width;\n                const ttWidth = ttCtx.tooltipRect.ttWidth || 0;\n                const ttHeight = ttCtx.tooltipRect.ttHeight || 0;\n                const y = barCy + bh / 2 - ttHeight / 2;\n                let x = barCx + bw;\n                const baselineX = ttCtx.xyRatios && ttCtx.xyRatios.baseLineInvertedY != null ? ttCtx.xyRatios.baseLineInvertedY : wrapRect.width / 2;\n                if (barCx < baselineX) x = barCx - ttWidth;\n                const tooltipEl = ttCtx.getElTooltip();\n                if (tooltipEl) {\n                    tooltipEl.style.left = x + \"px\";\n                    tooltipEl.style.top = y + \"px\";\n                }\n            }\n        } else ttCtx.tooltipPosition.moveStickyTooltipOverBars(j, i2);\n    }\n    /**\n   * line / area / scatter / bubble / radar / rangeArea\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   */ _showTooltipAxisLine(i2, j, ttCtx) {\n        const w2 = this.w;\n        const type = w2.config.chart.type;\n        const sharedConfigured = ttCtx.tConfig.shared;\n        const shared = sharedConfigured && ttCtx.tooltipUtil.isXoverlap(j) && ttCtx.tooltipUtil.isInitialSeriesSameLen();\n        ttCtx.tooltipLabels.drawSeriesTexts({\n            ttItems: ttCtx.ttItems,\n            i: i2,\n            j: j,\n            shared: shared\n        });\n        const isScatterLike = type === \"scatter\" || type === \"bubble\";\n        const hasVisibleMarkers = w2.globals.markers.largestSize > 0;\n        if (isScatterLike) this._showScatterBubblePoint(i2, j, ttCtx);\n        else if (hasVisibleMarkers) {\n            if (shared) ttCtx.marker.enlargePoints(j);\n            else ttCtx.tooltipPosition.moveDynamicPointOnHover(j, i2);\n        } else if (shared) ttCtx.tooltipPosition.moveDynamicPointsOnHover(j);\n        else ttCtx.tooltipPosition.moveDynamicPointOnHover(j, i2);\n    }\n    /**\n   * Scatter / bubble: find the specific marker element for (seriesIndex i,\n   * dataPointIndex j), resize only that element, and position the tooltip at\n   * its coordinates — mirroring what Position.moveMarkers does for mouse hover.\n   *\n   * Unlike enlargePoints(j) which queries ALL series for rel===j (causing\n   * multiple bubbles to enlarge and tooltip to land on the wrong one), this\n   * method queries by both series index AND data-point index for precision.\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   */ _showScatterBubblePoint(i2, j, ttCtx) {\n        const baseEl = this.w.dom.baseEl;\n        if (this._enlargedScatterMarker) {\n            ttCtx.marker.oldPointSize(this._enlargedScatterMarker);\n            this._enlargedScatterMarker = null;\n        }\n        const seriesEl = baseEl.querySelector(`.apexcharts-series[data\\\\:realIndex='${i2}']`);\n        if (!seriesEl) return;\n        const markerEl = seriesEl.querySelector(`.apexcharts-marker[rel='${j}']`);\n        if (!markerEl) return;\n        ttCtx.marker.enlargeCurrentPoint(j, markerEl);\n        this._enlargedScatterMarker = markerEl;\n    }\n    /**\n   * pie / donut / polarArea\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   * @param {HTMLElement} tooltipEl\n   */ _showTooltipNonAxis(i2, j, ttCtx, tooltipEl) {\n        const w2 = this.w;\n        ttCtx.tooltipLabels.drawSeriesTexts({\n            ttItems: ttCtx.ttItems,\n            i: j,\n            shared: false\n        });\n        const tooltipBound = tooltipEl.getBoundingClientRect();\n        const ttWidth = tooltipBound.width || ttCtx.tooltipRect.ttWidth || 0;\n        const ttHeight = tooltipBound.height || ttCtx.tooltipRect.ttHeight || 0;\n        const sliceEl = w2.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${j}']`);\n        const anchor = ttCtx.getSliceAnchor(sliceEl);\n        if (anchor) {\n            tooltipEl.style.left = anchor.x - ttWidth / 2 + \"px\";\n            tooltipEl.style.top = anchor.y - ttHeight - 10 + \"px\";\n        }\n    }\n    /**\n   * radialBar — one ring per series, single value each\n   * @param {number} i\n   * @param {any} _j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   * @param {HTMLElement} tooltipEl\n   */ _showTooltipRadialBar(i2, _j, ttCtx, tooltipEl) {\n        var _a;\n        const w2 = this.w;\n        ttCtx.tooltipLabels.drawSeriesTexts({\n            ttItems: ttCtx.ttItems,\n            i: i2,\n            shared: false\n        });\n        const { ttWidth: ttWidth = 0, ttHeight: ttHeight = 0 } = ttCtx.getCachedDimensions();\n        const arcEl = w2.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\\\:realIndex='${i2}'] path`);\n        if (arcEl) {\n            const angle = parseFloat((_a = arcEl.getAttribute(\"data:angle\")) != null ? _a : \"\") || 0;\n            const initialAngle = w2.config.plotOptions.radialBar.startAngle || 0;\n            const midAngle = initialAngle + angle / 2;\n            const centerX = w2.layout.gridWidth / 2;\n            const centerY = w2.layout.gridHeight / 2;\n            const radialSize = w2.globals.radialSize || Math.min(w2.layout.gridWidth, w2.layout.gridHeight) / 2;\n            const seriesCount = w2.seriesData.series.length;\n            const trackSize = radialSize / Math.max(seriesCount, 1);\n            const outerRadius = radialSize - i2 * trackSize;\n            const innerRadius = outerRadius - trackSize;\n            const ringRadius = (outerRadius + innerRadius) / 2;\n            const centroid = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(centerX, centerY, ringRadius, midAngle);\n            const x = centroid.x + (w2.layout.translateX || 0);\n            const y = centroid.y + (w2.layout.translateY || 0);\n            tooltipEl.style.left = x - ttWidth / 2 + \"px\";\n            tooltipEl.style.top = y - ttHeight - 10 + \"px\";\n        }\n    }\n    /**\n   * heatmap / treemap — position tooltip using element bounding rect\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   * @param {HTMLElement} tooltipEl\n   * @param {string} type\n   */ _showTooltipHeatTree(i2, j, ttCtx, tooltipEl, type) {\n        var _a, _b;\n        const w2 = this.w;\n        ttCtx.tooltipLabels.drawSeriesTexts({\n            ttItems: ttCtx.ttItems,\n            i: i2,\n            j: j,\n            shared: false\n        });\n        const tooltipRect = tooltipEl.getBoundingClientRect();\n        const ttWidth = tooltipRect.width || ttCtx.tooltipRect.ttWidth || 0;\n        const ttHeight = tooltipRect.height || ttCtx.tooltipRect.ttHeight || 0;\n        const rectClass = type === \"heatmap\" ? \"apexcharts-heatmap-rect\" : \"apexcharts-treemap-rect\";\n        const cell = w2.dom.baseEl.querySelector(`.${rectClass}[i='${i2}'][j='${j}']`);\n        if (cell) {\n            const wrapRect = w2.dom.elWrap.getBoundingClientRect();\n            const cellRect = cell.getBoundingClientRect();\n            const cellCx = cellRect.left - wrapRect.left;\n            const cellCy = cellRect.top - wrapRect.top;\n            const cellWidth = cellRect.width;\n            const cellHeight = cellRect.height;\n            const cx = parseFloat((_a = cell.getAttribute(\"cx\")) != null ? _a : \"\");\n            const cellWidthAttr = parseFloat((_b = cell.getAttribute(\"width\")) != null ? _b : \"\");\n            ttCtx.tooltipPosition.moveXCrosshairs(cx + cellWidthAttr / 2);\n            let x = cellCx + cellWidth + ttWidth / 2;\n            const y = cellCy + cellHeight / 2 - ttHeight / 2;\n            if (cellCx + cellWidth > w2.layout.gridWidth / 2) x = cellCx - ttWidth / 2;\n            tooltipEl.style.left = x + \"px\";\n            tooltipEl.style.top = y + \"px\";\n        }\n    }\n    // ─── Focus class management ───────────────────────────────────────────────\n    /**\n   * @param {number} i\n   * @param {number} j\n   */ _applyFocusClass(i2, j) {\n        this._removeFocusClass();\n        const el = this._getFocusableElement(i2, j);\n        if (el) {\n            el.classList.add(\"apexcharts-keyboard-focused\");\n            el.setAttribute(\"role\", \"img\");\n            const label = this._buildPointLabel(i2, j);\n            if (label) el.setAttribute(\"aria-label\", label);\n            this._focusedEl = el;\n        }\n    }\n    _removeFocusClass() {\n        if (this._focusedEl) {\n            this._focusedEl.classList.remove(\"apexcharts-keyboard-focused\");\n            this._focusedEl.removeAttribute(\"role\");\n            this._focusedEl.removeAttribute(\"aria-label\");\n            this._focusedEl = null;\n        }\n    }\n    /**\n   * Build an accessible label for the data point at (i, j) using the same\n   * formatters the visible tooltip / axis labels use, so SR output matches\n   * the visual presentation.\n   * @param {number} i\n   * @param {number} j\n   * @returns {string}\n   */ _buildPointLabel(i2, j) {\n        var _a, _b, _c, _d, _e, _f, _g, _h;\n        const w2 = this.w;\n        const type = w2.config.chart.type;\n        const seriesNames = w2.seriesData.seriesNames || [];\n        const series = w2.seriesData.series || [];\n        if (type === \"pie\" || type === \"donut\" || type === \"polarArea\") {\n            const sliceLabel = (_b = ((_a = w2.labelData) == null ? void 0 : _a.labels) && w2.labelData.labels[j]) != null ? _b : \"\";\n            const value = Array.isArray(series) ? series[j] : \"\";\n            return sliceLabel ? `${sliceLabel}: ${value}` : `${value}`;\n        }\n        if (type === \"radialBar\") {\n            const seriesName2 = seriesNames[i2] || `Series ${i2 + 1}`;\n            const value = Array.isArray(series) ? series[i2] : \"\";\n            return `${seriesName2}: ${value}`;\n        }\n        const seriesName = seriesNames[i2] || `Series ${i2 + 1}`;\n        const row = Array.isArray(series[i2]) ? series[i2] : [];\n        const rawValue = row[j];\n        let formattedValue = rawValue == null ? \"\" : String(rawValue);\n        const yFormatter = (_d = (_c = w2.formatters) == null ? void 0 : _c.yLabelFormatters) == null ? void 0 : _d[i2];\n        if (typeof yFormatter === \"function\") try {\n            formattedValue = yFormatter(rawValue, {\n                seriesIndex: i2,\n                dataPointIndex: j,\n                w: w2\n            });\n        } catch (e2) {}\n        let category = \"\";\n        const categoryLabels = (_e = w2.labelData) == null ? void 0 : _e.categoryLabels;\n        const seriesX = (_g = (_f = w2.seriesData) == null ? void 0 : _f.seriesX) == null ? void 0 : _g[i2];\n        if (Array.isArray(categoryLabels) && categoryLabels[j] != null) category = String(categoryLabels[j]);\n        else if (Array.isArray(seriesX) && seriesX[j] != null) {\n            const xFormatter = (_h = w2.formatters) == null ? void 0 : _h.xLabelFormatter;\n            if (typeof xFormatter === \"function\") try {\n                category = String(xFormatter(seriesX[j], {\n                    seriesIndex: i2,\n                    dataPointIndex: j,\n                    w: w2\n                }));\n            } catch (e2) {\n                category = String(seriesX[j]);\n            }\n            else category = String(seriesX[j]);\n        }\n        return category ? `${seriesName}: ${formattedValue}, ${category}` : `${seriesName}: ${formattedValue}`;\n    }\n    _leaveHoveredBar() {\n        if (this._hoveredBarEl) {\n            const graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n            graphics.pathMouseLeave(this._hoveredBarEl, null);\n            this._hoveredBarEl = null;\n        }\n    }\n    /**\n   * @param {number} i\n   * @param {number} j\n   */ _getFocusableElement(i2, j) {\n        const w2 = this.w;\n        const type = w2.config.chart.type;\n        const baseEl = w2.dom.baseEl;\n        if (type === \"pie\" || type === \"donut\" || type === \"polarArea\") return baseEl.querySelector(`.apexcharts-pie-area[j='${j}']`);\n        if (type === \"heatmap\") return baseEl.querySelector(`.apexcharts-heatmap-rect[i='${i2}'][j='${j}']`);\n        if (type === \"treemap\") return baseEl.querySelector(`.apexcharts-treemap-rect[i='${i2}'][j='${j}']`);\n        if (type === \"radialBar\") return baseEl.querySelector(`.apexcharts-radialbar-series[data\\\\:realIndex='${i2}'] path`);\n        if (type === \"bar\" || type === \"candlestick\" || type === \"boxPlot\" || type === \"violin\" || type === \"rangeBar\") return baseEl.querySelector(`.apexcharts-series[data\\\\:realIndex='${i2}'] path[j='${j}']`);\n        const marker = baseEl.querySelector(`.apexcharts-series[data\\\\:realIndex='${i2}'] .apexcharts-marker[rel='${j}']`);\n        return marker || null;\n    }\n    // ─── Click / Enter ────────────────────────────────────────────────────────\n    _fireClick() {\n        const w2 = this.w;\n        const ttCtx = w2.globals.tooltip;\n        if (!ttCtx) return;\n        const syntheticEvent = {\n            type: \"mouseup\",\n            clientX: 0,\n            clientY: 0\n        };\n        ttCtx.markerClick(syntheticEvent, this.seriesIndex, this.dataPointIndex);\n    }\n    // ─── Helpers ──────────────────────────────────────────────────────────────\n    _isNavEnabled() {\n        const a11y = this.w.config.chart.accessibility;\n        return a11y.enabled && a11y.keyboard.enabled && a11y.keyboard.navigation.enabled;\n    }\n    _getSeriesCount() {\n        const w2 = this.w;\n        const type = w2.config.chart.type;\n        if (type === \"pie\" || type === \"donut\" || type === \"polarArea\") return 1;\n        return w2.seriesData.series.length;\n    }\n    /**\n   * @param {number} si\n   */ _getDataPointCount(si) {\n        const w2 = this.w;\n        const type = w2.config.chart.type;\n        if (type === \"pie\" || type === \"donut\" || type === \"polarArea\") return w2.seriesData.series.length;\n        const series = w2.seriesData.series;\n        return series[si] && Array.isArray(series[si]) ? series[si].length : 0;\n    }\n    _clampCursor() {\n        const seriesCount = this._getSeriesCount();\n        if (this.seriesIndex >= seriesCount) this.seriesIndex = seriesCount - 1;\n        if (this.seriesIndex < 0) this.seriesIndex = 0;\n        const dpCount = this._getDataPointCount(this.seriesIndex);\n        if (this.dataPointIndex >= dpCount) this.dataPointIndex = dpCount - 1;\n        if (this.dataPointIndex < 0) this.dataPointIndex = 0;\n    }\n    /**\n   * When the chart is zoomed in, the current dataPointIndex may point to a\n   * data point that is outside the visible viewport. Snap the cursor to the\n   * first data point whose x-value falls within [minX, maxX].\n   *\n   * Only adjusts when w.seriesData.seriesX is populated (numeric/datetime axes).\n   * Category-only charts (seriesX entries are strings or auto-indices) are\n   * unaffected — all points are always visible.\n   */ _snapToVisibleRange() {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const si = this.seriesIndex;\n        if (!w2.interact.zoomed) return;\n        const seriesX = w2.seriesData.seriesX && w2.seriesData.seriesX[si];\n        if (!seriesX || !seriesX.length) return;\n        const minX = gl.minX;\n        const maxX = gl.maxX;\n        if (minX === void 0 || maxX === void 0) return;\n        const currentX = seriesX[this.dataPointIndex];\n        if (currentX >= minX && currentX <= maxX) return;\n        const dpCount = seriesX.length;\n        for(let di = 0; di < dpCount; di++)if (seriesX[di] >= minX && seriesX[di] <= maxX) {\n            this.dataPointIndex = di;\n            return;\n        }\n    }\n    /**\n   * Snap to the nearest visible data point in the given navigation direction.\n   * direction > 0 → find the first visible point (left boundary of zoomed range)\n   * direction < 0 → find the last visible point (right boundary of zoomed range)\n   * @param {number} direction\n   */ _snapToVisibleRangeInDirection(direction) {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const si = this.seriesIndex;\n        const seriesX = w2.seriesData.seriesX && w2.seriesData.seriesX[si];\n        if (!seriesX || !seriesX.length) return;\n        const minX = gl.minX;\n        const maxX = gl.maxX;\n        if (minX === void 0 || maxX === void 0) return;\n        const dpCount = seriesX.length;\n        if (direction >= 0) {\n            for(let di = 0; di < dpCount; di++)if (seriesX[di] >= minX && seriesX[di] <= maxX) {\n                this.dataPointIndex = di;\n                return;\n            }\n        } else {\n            for(let di = dpCount - 1; di >= 0; di--)if (seriesX[di] >= minX && seriesX[di] <= maxX) {\n                this.dataPointIndex = di;\n                return;\n            }\n        }\n    }\n    /**\n   * Check whether the data point at (si, di) is within the current visible\n   * x-axis range. Used to skip out-of-viewport points during keyboard nav.\n   * @param {number} si\n   * @param {number} di\n   */ _isDataPointVisible(si, di) {\n        const w2 = this.w;\n        const gl = w2.globals;\n        if (!w2.interact.zoomed) return true;\n        const seriesX = w2.seriesData.seriesX && w2.seriesData.seriesX[si];\n        if (!seriesX) return true;\n        const x = seriesX[di];\n        if (x === void 0) return true;\n        return x >= gl.minX && x <= gl.maxX;\n    }\n    /**\n   * Push a short status message to the visually-hidden aria-live region so\n   * screen readers announce zoom / pan / reset events that have no inherent\n   * tooltip update. Silently no-op if the region is missing or announcements\n   * are disabled.\n   * @param {string} message\n   */ _announce(message) {\n        const w2 = this.w;\n        if (!w2.config.chart.accessibility.announcements.enabled) return;\n        const baseEl = w2.dom.baseEl;\n        if (!baseEl) return;\n        const region = baseEl.querySelector(\".apexcharts-sr-status\");\n        if (!region) return;\n        region.textContent = \"\";\n        setTimeout(()=>{\n            region.textContent = message;\n        }, 0);\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    keyboardNavigation: $e4b487e979d7c06d$var$KeyboardNavigation\n});\nfunction $e4b487e979d7c06d$var$gridDivideRect(bbox, count) {\n    if (!(count > 0)) return [];\n    if (count === 1) return [\n        $e4b487e979d7c06d$var$__spreadValues({}, bbox)\n    ];\n    const horizontal = bbox.width >= bbox.height;\n    const rowExtent = horizontal ? bbox.width : bbox.height;\n    const colExtent = horizontal ? bbox.height : bbox.width;\n    const ratio = colExtent > 0 ? rowExtent / colExtent : count;\n    let rows = Math.max(1, Math.ceil(Math.sqrt(ratio * count)));\n    if (rows > count) rows = count;\n    const baseCols = Math.floor(count / rows);\n    let remainder = count - baseCols * rows;\n    const cells = [];\n    const rowSize = rowExtent / rows;\n    let rowStart = 0;\n    for(let r2 = 0; r2 < rows; r2++){\n        const cols = baseCols + (remainder > 0 ? 1 : 0);\n        if (remainder > 0) remainder--;\n        const colSize = cols > 0 ? colExtent / cols : 0;\n        for(let c2 = 0; c2 < cols; c2++)cells.push(horizontal ? {\n            x: bbox.x + rowStart,\n            y: bbox.y + c2 * colSize,\n            width: rowSize,\n            height: colSize\n        } : {\n            x: bbox.x + c2 * colSize,\n            y: bbox.y + rowStart,\n            width: colSize,\n            height: rowSize\n        });\n        rowStart += rowSize;\n    }\n    return cells;\n}\nfunction $e4b487e979d7c06d$var$gridDivideShape(bbox, count, intervalsAt) {\n    if (!(count > 0)) return [];\n    const horizontal = bbox.width >= bbox.height;\n    const rowExtent = horizontal ? bbox.width : bbox.height;\n    const colExtent = horizontal ? bbox.height : bbox.width;\n    const minorLo = horizontal ? bbox.y : bbox.x;\n    const minorHi = minorLo + colExtent;\n    const ratio = colExtent > 0 ? rowExtent / colExtent : count;\n    let rows = Math.max(Math.ceil(Math.sqrt(ratio * count)), Math.ceil(rowExtent / 16));\n    if (!(rows >= 1)) rows = 1;\n    if (rows > count) rows = count;\n    const baseCols = Math.floor(count / rows);\n    let remainder = count - baseCols * rows;\n    const cells = [];\n    const rowSize = rowExtent / rows;\n    let rowStart = horizontal ? bbox.x : bbox.y;\n    for(let r2 = 0; r2 < rows; r2++){\n        const cols = baseCols + (remainder > 0 ? 1 : 0);\n        if (remainder > 0) remainder--;\n        const spans = [];\n        const raw = intervalsAt(rowStart, rowStart + rowSize, horizontal);\n        if (Array.isArray(raw)) for(let s2 = 0; s2 < raw.length; s2++){\n            const iv = raw[s2];\n            if (!iv) continue;\n            const lo = Math.max(minorLo, Math.min(iv[0], iv[1]));\n            const hi = Math.min(minorHi, Math.max(iv[0], iv[1]));\n            if (hi > lo) spans.push([\n                lo,\n                hi\n            ]);\n        }\n        if (!spans.length) spans.push([\n            minorLo,\n            minorHi\n        ]);\n        const totalLen = spans.reduce((a2, s2)=>a2 + (s2[1] - s2[0]), 0);\n        const exact = spans.map((s2)=>totalLen > 0 ? (s2[1] - s2[0]) / totalLen * cols : cols / spans.length);\n        const share = exact.map((v2)=>Math.floor(v2));\n        let used = share.reduce((a2, b2)=>a2 + b2, 0);\n        const byFrac = exact.map((v2, i2)=>({\n                i: i2,\n                frac: v2 - Math.floor(v2)\n            })).sort((a2, b2)=>b2.frac - a2.frac);\n        for(let k = 0; used < cols; k++, used++)share[byFrac[k % byFrac.length].i]++;\n        for(let s2 = 0; s2 < spans.length; s2++){\n            const n2 = share[s2];\n            if (n2 <= 0) continue;\n            const lo = spans[s2][0];\n            const colSize = (spans[s2][1] - lo) / n2;\n            for(let c2 = 0; c2 < n2; c2++)cells.push(horizontal ? {\n                x: rowStart,\n                y: lo + c2 * colSize,\n                width: rowSize,\n                height: colSize\n            } : {\n                x: lo + c2 * colSize,\n                y: rowStart,\n                width: colSize,\n                height: rowSize\n            });\n        }\n        rowStart += rowSize;\n    }\n    return cells;\n}\nfunction $e4b487e979d7c06d$var$hilbertIndex(x, y, minX, minY, maxX, maxY) {\n    let ix = maxX === minX ? 0 : Math.round(32767 * ((x - minX) / (maxX - minX)));\n    let iy = maxY === minY ? 0 : Math.round(32767 * ((y - minY) / (maxY - minY)));\n    let d = 0;\n    for(let s2 = 32768; s2 >= 1; s2 /= 2){\n        const rx = (ix & s2) > 0 ? 1 : 0;\n        const ry = (iy & s2) > 0 ? 1 : 0;\n        d += s2 * s2 * (3 * rx ^ ry);\n        if (ry === 0) {\n            if (rx === 1) {\n                ix = s2 - 1 - ix;\n                iy = s2 - 1 - iy;\n            }\n            const t2 = ix;\n            ix = iy;\n            iy = t2;\n        }\n    }\n    return d;\n}\nfunction $e4b487e979d7c06d$var$sortByHilbert(items, getXY) {\n    let minX = Infinity;\n    let minY = Infinity;\n    let maxX = -Infinity;\n    let maxY = -Infinity;\n    const pts = items.map((it)=>{\n        const [x, y] = getXY(it);\n        if (x < minX) minX = x;\n        if (x > maxX) maxX = x;\n        if (y < minY) minY = y;\n        if (y > maxY) maxY = y;\n        return [\n            x,\n            y\n        ];\n    });\n    return items.map((item, k)=>({\n            item: item,\n            d: $e4b487e979d7c06d$var$hilbertIndex(pts[k][0], pts[k][1], minX, minY, maxX, maxY)\n        })).sort((a2, b2)=>a2.d - b2.d).map((e2)=>e2.item);\n}\nfunction $e4b487e979d7c06d$var$parseColor(str) {\n    if (!str || typeof str !== \"string\") return null;\n    const s2 = str.trim();\n    if (s2[0] === \"#\") {\n        const hex = s2.slice(1);\n        if (hex.length === 3) return [\n            parseInt(hex[0] + hex[0], 16),\n            parseInt(hex[1] + hex[1], 16),\n            parseInt(hex[2] + hex[2], 16),\n            1\n        ];\n        if (hex.length === 6 || hex.length === 8) return [\n            parseInt(hex.slice(0, 2), 16),\n            parseInt(hex.slice(2, 4), 16),\n            parseInt(hex.slice(4, 6), 16),\n            hex.length === 8 ? parseInt(hex.slice(6, 8), 16) / 255 : 1\n        ];\n        return null;\n    }\n    const m2 = s2.match(/^rgba?\\(([^)]+)\\)$/i);\n    if (m2) {\n        const parts = m2[1].split(\",\").map((p2)=>parseFloat(p2));\n        if (parts.length < 3 || parts.some((v2)=>!isFinite(v2))) return null;\n        return [\n            parts[0],\n            parts[1],\n            parts[2],\n            parts.length > 3 ? parts[3] : 1\n        ];\n    }\n    return null;\n}\nfunction $e4b487e979d7c06d$var$makeColorLerp(from, to) {\n    const a2 = $e4b487e979d7c06d$var$parseColor(from);\n    const b2 = $e4b487e979d7c06d$var$parseColor(to);\n    if (!a2 || !b2) return null;\n    return (t2)=>{\n        const r2 = Math.round(a2[0] + (b2[0] - a2[0]) * t2);\n        const g2 = Math.round(a2[1] + (b2[1] - a2[1]) * t2);\n        const bl = Math.round(a2[2] + (b2[2] - a2[2]) * t2);\n        const al = a2[3] + (b2[3] - a2[3]) * t2;\n        return al >= 1 ? `rgb(${r2},${g2},${bl})` : `rgba(${r2},${g2},${bl},${al})`;\n    };\n}\nfunction $e4b487e979d7c06d$var$easeInOutCubic$1(t2) {\n    return t2 < 0.5 ? 4 * t2 * t2 * t2 : 1 - Math.pow(-2 * t2 + 2, 3) / 2;\n}\nfunction $e4b487e979d7c06d$var$runPieceTween({ pieces: pieces, duration: duration, onPieceDone: onPieceDone, onAllDone: onAllDone }) {\n    let cancelled = false;\n    const start = Date.now();\n    const dur = Math.max(1, duration);\n    const write = (p2, e2)=>{\n        const f = p2.from;\n        const t2 = p2.to;\n        const el = p2.el;\n        el.setAttribute(\"x\", String(f.x + (t2.x - f.x) * e2));\n        el.setAttribute(\"y\", String(f.y + (t2.y - f.y) * e2));\n        el.setAttribute(\"width\", String(Math.max(0, f.width + (t2.width - f.width) * e2)));\n        el.setAttribute(\"height\", String(Math.max(0, f.height + (t2.height - f.height) * e2)));\n        el.setAttribute(\"rx\", String(Math.max(0, f.rx + (t2.rx - f.rx) * e2)));\n        if (p2.fill) el.setAttribute(\"fill\", p2.fill(e2));\n        else if (e2 >= 1 && p2.fillEnd) el.setAttribute(\"fill\", p2.fillEnd);\n    };\n    const frame = ()=>{\n        if (cancelled) return;\n        const elapsed = Date.now() - start;\n        let live = false;\n        for(let k = 0; k < pieces.length; k++){\n            const p2 = pieces[k];\n            if (/** @type {any} */ p2._done) continue;\n            const raw = (elapsed - p2.delay) / dur;\n            if (raw < 1) live = true;\n            if (raw <= 0) continue;\n            const t2 = Math.min(1, raw);\n            write(p2, $e4b487e979d7c06d$var$easeInOutCubic$1(t2));\n            if (t2 >= 1) {\n                p2._done = true;\n                if (onPieceDone) onPieceDone(p2);\n            }\n        }\n        if (live) $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(frame);\n        else if (onAllDone) onAllDone();\n    };\n    $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(frame);\n    return ()=>{\n        cancelled = true;\n    };\n}\nconst $e4b487e979d7c06d$var$BAR_FAMILY = /* @__PURE__ */ new Set([\n    \"bar\",\n    \"funnel\",\n    \"pyramid\",\n    \"histogram\"\n]);\nconst $e4b487e979d7c06d$var$RADIAL_FAMILY = /* @__PURE__ */ new Set([\n    \"pie\",\n    \"donut\",\n    \"polarArea\",\n    \"radialBar\",\n    \"gauge\"\n]);\nconst $e4b487e979d7c06d$var$UNIT_FAMILY = /* @__PURE__ */ new Set([\n    \"unit\",\n    \"waffle\"\n]);\nconst $e4b487e979d7c06d$var$PARTITION_FAMILY = /* @__PURE__ */ new Set([\n    \"treemap\",\n    \"sunburst\"\n]);\nconst $e4b487e979d7c06d$var$SUMMARY_FAMILY = /* @__PURE__ */ new Set([\n    \"boxPlot\",\n    \"violin\"\n]);\nconst $e4b487e979d7c06d$var$GHOST_FADE_FRACTION = 0.55;\nconst $e4b487e979d7c06d$var$PIECE_BUDGET = 1500;\nconst $e4b487e979d7c06d$var$PIECE_STAGGER_MAX = 300;\nfunction $e4b487e979d7c06d$var$familyOf(type) {\n    if ($e4b487e979d7c06d$var$BAR_FAMILY.has(type)) return \"bar\";\n    if ($e4b487e979d7c06d$var$RADIAL_FAMILY.has(type)) return \"radial\";\n    if ($e4b487e979d7c06d$var$UNIT_FAMILY.has(type)) return \"unit\";\n    if ($e4b487e979d7c06d$var$PARTITION_FAMILY.has(type)) return \"partition\";\n    if ($e4b487e979d7c06d$var$SUMMARY_FAMILY.has(type)) return \"summary\";\n    return null;\n}\nclass $e4b487e979d7c06d$var$MorphTypeChange {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this._snapshot = null;\n        this._ghost = null;\n        this._pieceLayer = null;\n        this._pieceCancel = null;\n    }\n    /**\n   * @param {string} fromType\n   * @param {string} toType\n   * @returns {boolean}\n   */ canMorphTypes(fromType, toType) {\n        if (fromType === toType) return false;\n        const ff = $e4b487e979d7c06d$var$familyOf(fromType);\n        const tf = $e4b487e979d7c06d$var$familyOf(toType);\n        if (!ff || !tf) return false;\n        if (ff === \"partition\" !== (tf === \"partition\")) return ff !== \"unit\" && tf !== \"unit\";\n        return true;\n    }\n    /**\n   * @param {string} fromType\n   * @param {string} toType\n   * @param {any} newSeries\n   * @returns {boolean}\n   */ isCompatibleSeriesShape(fromType, toType, newSeries) {\n        if (!Array.isArray(newSeries) || newSeries.length === 0) return false;\n        const ff = $e4b487e979d7c06d$var$familyOf(fromType);\n        const tf = $e4b487e979d7c06d$var$familyOf(toType);\n        if (tf === \"unit\") {\n            if (newSeries.every((v2)=>typeof v2 === \"number\")) return true;\n            return newSeries.every((s2)=>s2 && typeof s2 === \"object\" && Array.isArray(s2.data));\n        }\n        if (tf === \"partition\") return true;\n        if (tf === \"radial\") {\n            if (newSeries.every((v2)=>typeof v2 === \"number\")) return true;\n            return newSeries.length === 1 && newSeries[0] && typeof newSeries[0] === \"object\" && Array.isArray(newSeries[0].data);\n        }\n        if (tf === \"bar\" || tf === \"summary\") return newSeries.every((s2)=>s2 && typeof s2 === \"object\" && Array.isArray(s2.data));\n        return ff !== null && tf !== null;\n    }\n    /**\n   * Capture the live DOM of the *current* (outgoing) chart and stash it on\n   * this module. Called from `apexcharts._updateOptions` before the config\n   * merge that flips `chart.type`.\n   *\n   * Returns true if a morph is queued — caller doesn't need the value, but\n   * tests use it.\n   *\n   * @param {{ fromType: string, toType: string, newSeries: any }} args\n   * @returns {boolean}\n   */ captureBeforeDestroy({ fromType: fromType, toType: toType, newSeries: newSeries }) {\n        this._snapshot = null;\n        this._removeGhost();\n        this._cancelPieces();\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return false;\n        const animCfg = this.w.config.chart.animations;\n        if (!animCfg || animCfg.enabled === false) return false;\n        if (animCfg.chartTypeMorph && animCfg.chartTypeMorph.enabled === false) return false;\n        if (animCfg.respectReducedMotion && $e4b487e979d7c06d$var$prefersReducedMotion()) return false;\n        if (!this.canMorphTypes(fromType, toType)) return false;\n        if (!this.isCompatibleSeriesShape(fromType, toType, newSeries)) return false;\n        const { marks: marks, branches: branches, unitDots: unitDots } = this._captureFromDOM(fromType);\n        if (!marks.length) return false;\n        const mapping = this._buildMapping(marks, fromType, toType, newSeries, branches);\n        if (mapping.size === 0) return false;\n        this._snapshot = {\n            fromType: fromType,\n            toType: toType,\n            mapping: mapping,\n            oldLayout: {\n                translateX: this.w.layout.translateX || 0,\n                translateY: this.w.layout.translateY || 0\n            }\n        };\n        const ff = $e4b487e979d7c06d$var$familyOf(fromType);\n        const tf = $e4b487e979d7c06d$var$familyOf(toType);\n        const canShape = this._canProbePaths();\n        const pieceFamilies = ff === \"bar\" || ff === \"summary\" || ff === \"radial\" && canShape;\n        if (tf === \"unit\" && pieceFamilies) {\n            const total = this._countUnitSeries(newSeries);\n            this._snapshot.pieceOut = total > 0 && total <= $e4b487e979d7c06d$var$PIECE_BUDGET;\n        } else if (ff === \"unit\" && (tf === \"bar\" || tf === \"summary\" || tf === \"radial\" && canShape)) {\n            let total = 0;\n            unitDots.forEach((list)=>{\n                total += list.length;\n            });\n            if (total > 0 && total <= $e4b487e979d7c06d$var$PIECE_BUDGET) {\n                this._snapshot.pieceIn = true;\n                this._snapshot.sourceDots = unitDots;\n                const keyOrder = [];\n                if (tf === \"radial\") (Array.isArray(newSeries) ? newSeries : []).forEach((_v, i2)=>{\n                    keyOrder.push(`${i2}:0`);\n                });\n                else (Array.isArray(newSeries) ? newSeries : []).forEach((s2, seriesIdx)=>{\n                    const data = s2 && Array.isArray(s2.data) ? s2.data : [];\n                    for(let j = 0; j < data.length; j++)keyOrder.push(`${seriesIdx}:${j}`);\n                });\n                this._snapshot.keyOrder = keyOrder;\n            }\n        }\n        if (this._needsGhost(fromType, toType) && !this._snapshot.pieceOut && !this._snapshot.pieceIn) this._captureGhost();\n        this.w.globals.previousPaths = [];\n        return true;\n    }\n    /**\n   * Whether the outgoing marks need an exit animation of their own.\n   *\n   * Most pairs do not. bar → pie hands every wedge the exact `d` of the bar it\n   * replaces, and treemap → sunburst does the same for its tiles: the outgoing\n   * mark IS the incoming mark's first frame, so it never needs to leave, and\n   * drawing a copy of it would only double the image at t=0.\n   *\n   * The unit pairs are the exception, in both directions, because the\n   * correspondence is not 1:1. Going in, one bar becomes N dots, so the bar has\n   * no successor to become. Coming out, N dots become one bar: the bar does\n   * grow from the cloud's footprint, but no individual dot has anywhere to go.\n   * Either way something on screen simply stops existing, which is exactly the\n   * hard cut that made these pairs read as \"the old chart vanished and the new\n   * one animated\" rather than as a morph.\n   *\n   * @param {string} fromType\n   * @param {string} toType\n   * @returns {boolean}\n   */ _needsGhost(fromType, toType) {\n        return $e4b487e979d7c06d$var$familyOf(fromType) === \"unit\" || $e4b487e979d7c06d$var$familyOf(toType) === \"unit\";\n    }\n    /**\n   * Take a detached copy of the outgoing chart's marks, to be mounted over the\n   * incoming chart once it exists (see `_mountGhost`).\n   *\n   * The whole `<svg>` is cloned and the chrome then removed from the copy,\n   * rather than lifting the series groups out on their own: every mark's\n   * position depends on the transforms of the groups above it, and cloning\n   * from the root is what keeps those intact without re-deriving any geometry.\n   *\n   * The chrome is dropped because `applyChromeFade` already fades the incoming\n   * axes, grid and legend in from zero. Keeping the outgoing set as well would\n   * put two sets of axis labels on screen at half opacity each.\n   */ _captureGhost() {\n        var _a, _b;\n        const paper = (_a = this.w.dom) == null ? void 0 : _a.Paper;\n        const node = paper && paper.node;\n        if (!node || typeof node.cloneNode !== \"function\") return;\n        const clone = node.cloneNode(true);\n        const drop = [\n            \".apexcharts-xaxis\",\n            \".apexcharts-yaxis\",\n            \".apexcharts-grid\",\n            \".apexcharts-gridlines-horizontal\",\n            \".apexcharts-gridlines-vertical\",\n            \".apexcharts-legend\",\n            \".apexcharts-title-text\",\n            \".apexcharts-subtitle-text\",\n            \".apexcharts-annotations\",\n            \".apexcharts-zoom-rect\",\n            \".apexcharts-selection-rect\",\n            \".apexcharts-xcrosshairs\",\n            \".apexcharts-ycrosshairs\"\n        ];\n        if (typeof clone.querySelectorAll === \"function\") drop.forEach((sel)=>{\n            clone.querySelectorAll(sel).forEach((el)=>{\n                if (el.parentNode) el.parentNode.removeChild(el);\n            });\n        });\n        if (typeof clone.querySelectorAll === \"function\") clone.querySelectorAll(\"[id]\").forEach((el)=>{\n            el.removeAttribute(\"id\");\n        });\n        (_b = clone.removeAttribute) == null || _b.call(clone, \"id\");\n        this._ghost = clone;\n    }\n    /**\n   * Mount the captured copy over the newly-rendered chart and fade it out.\n   *\n   * It goes ON TOP of the live svg, which is what makes both directions read\n   * as one motion rather than as a swap. Going into a unit chart the bars\n   * dissolve and the dots are uncovered already in flight, having left from\n   * inside the bar that held them. Coming out of one, the dots are still there\n   * to fade while the bar grows underneath them; behind the incoming mark they\n   * would be hidden on the first frame, because that mark starts out exactly\n   * the size of the cloud it is replacing.\n   *\n   * The fade runs over a fraction of the morph so the outgoing marks are gone\n   * before the incoming ones settle. Holding them for the full duration leaves\n   * two charts overlapping right at the moment the eye is reading the final\n   * shape, which looks like a rendering fault rather than a transition.\n   */ _mountGhost() {\n        var _a, _b, _c;\n        const ghost = this._ghost;\n        if (!ghost || !$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const wrap = (_a = this.w.dom) == null ? void 0 : _a.elWrap;\n        if (!wrap || typeof wrap.appendChild !== \"function\") {\n            this._ghost = null;\n            return;\n        }\n        const style = ghost.style;\n        if (style) {\n            style.position = \"absolute\";\n            style.left = \"0\";\n            style.top = \"0\";\n            style.background = \"transparent\";\n            style.pointerEvents = \"none\";\n            style.opacity = \"1\";\n        }\n        (_b = ghost.setAttribute) == null || _b.call(ghost, \"aria-hidden\", \"true\");\n        (_c = ghost.setAttribute) == null || _c.call(ghost, \"class\", \"apexcharts-morph-ghost\");\n        wrap.appendChild(ghost);\n        const speed = this.getSpeed();\n        const fade = Math.max(120, Math.round(speed * $e4b487e979d7c06d$var$GHOST_FADE_FRACTION));\n        $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(()=>{\n            if (!style) return;\n            style.transition = `opacity ${fade}ms ease-in`;\n            style.opacity = \"0\";\n        });\n        setTimeout(()=>this._removeGhost(), fade + 60);\n    }\n    /** Detach the ghost if one is mounted. Safe to call at any time. */ _removeGhost() {\n        const ghost = this._ghost;\n        this._ghost = null;\n        if (ghost && ghost.parentNode) ghost.parentNode.removeChild(ghost);\n    }\n    /* ------------------------------------------------------------------ *\n   * The piece layer (see MorphPieces for the geometry).\n   * ------------------------------------------------------------------ */ /**\n   * Object count of an incoming unit series: one datum per dot in the object\n   * form. The numeric form ([3, 5]) scales values by `plotOptions.unit\n   * .unitValue`, which is not resolvable pre-merge, so it counts as zero and\n   * keeps the burst-and-ghost behaviour.\n   *\n   * @param {any} newSeries\n   * @returns {number}\n   */ _countUnitSeries(newSeries) {\n        if (!Array.isArray(newSeries)) return 0;\n        let total = 0;\n        for (const s2 of newSeries){\n            if (!s2 || typeof s2 !== \"object\" || !Array.isArray(s2.data)) return 0;\n            total += s2.data.length;\n        }\n        return total;\n    }\n    /**\n   * Whether the incoming unit chart should hold its dots for the piece layer:\n   * render them at their final slots, hidden, and let the pieces do the\n   * flying. The reveal happens per dot as its piece lands.\n   *\n   * Consulted by the unit renderer during its draw, which runs after\n   * `captureBeforeDestroy` and before `applyChromeFade`, so the decision was\n   * already made from the same series the renderer is now drawing.\n   *\n   * @returns {boolean}\n   */ usesPieceTakeover() {\n        return !!(this._snapshot && this._snapshot.pieceOut);\n    }\n    /**\n   * Whether the piece layer claims the incoming mark at (realIndex, j): a\n   * source cluster's dots will fly to it and tile it, so it must render\n   * hidden and reveal only when its mosaic is complete. Consulted by the bar\n   * renderer (boxPlot and violin render through it).\n   *\n   * @param {number|string} realIndex\n   * @param {number|string} j\n   * @returns {boolean}\n   */ claimsTargetMark(realIndex, j) {\n        return !!(this._snapshot && this._snapshot.pieceIn && this._snapshot.mapping.has(`${realIndex}:${j}`));\n    }\n    /**\n   * Create the overlay group the pieces are driven in. It lives INSIDE the\n   * new chart's elGraphical so every coordinate matches the marks' own local\n   * space, and it never takes a pointer event.\n   * @returns {any} the <g> node, or null\n   */ _makePieceLayer() {\n        var _a, _b;\n        const graph = (_a = this.w.dom) == null ? void 0 : _a.elGraphical;\n        const host = graph && graph.node;\n        if (!host || typeof host.appendChild !== \"function\") return null;\n        const g2 = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n        if (!g2) return null;\n        g2.setAttribute(\"class\", \"apexcharts-morph-pieces\");\n        g2.setAttribute(\"pointer-events\", \"none\");\n        const cuid = (_b = this.w.globals) == null ? void 0 : _b.cuid;\n        if (cuid) g2.setAttribute(\"clip-path\", `url(#gridRectBarMask${cuid})`);\n        host.appendChild(g2);\n        this._pieceLayer = g2;\n        return g2;\n    }\n    /**\n   * Reveal everything a piece takeover hid, whether or not the pieces ran.\n   * The attribute is plain (no namespace colon) so it stays selectable\n   * everywhere.\n   */ _revealPieceHidden() {\n        var _a;\n        const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n        if (!baseEl || typeof baseEl.querySelectorAll !== \"function\") return;\n        baseEl.querySelectorAll(\"[data-piece-hidden]\").forEach((el)=>{\n            el.removeAttribute(\"opacity\");\n            el.removeAttribute(\"data-piece-hidden\");\n        });\n    }\n    /** Stop the piece run, drop the overlay, and reveal anything still hidden. */ _cancelPieces() {\n        if (this._pieceCancel) {\n            this._pieceCancel();\n            this._pieceCancel = null;\n        }\n        const layer = this._pieceLayer;\n        this._pieceLayer = null;\n        if (layer && layer.parentNode) layer.parentNode.removeChild(layer);\n        this._revealPieceHidden();\n    }\n    /**\n   * Whether this environment can hit-test path geometry at all. Decided\n   * before the ghost clone is taken, because a family whose cells are only\n   * honest when probed (radial) must keep the fade rather than fall back to a\n   * rectangular grid it cannot justify. jsdom answers no.\n   * @returns {boolean}\n   */ _canProbePaths() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return false;\n        const probe = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n        return !!probe && typeof /** @type {any} */ probe.isPointInFill === \"function\";\n    }\n    /**\n   * A per-band ink prober over a mark's path, for gridDivideShape: given a\n   * major-axis band it measures where the mark actually has ink across the\n   * minor axis, so a violin's cells follow its density outline, a boxPlot's\n   * whisker rows collapse to slivers, and a wedge's rows stop at the wedge\n   * instead of spanning the bounding box (which stamped a rectangle over the\n   * mark at frame one).\n   *\n   * The probe path is mounted (hidden) inside the piece layer so its user\n   * space is exactly the space the cells are laid out in. The stroke test\n   * catches zero-area subpaths (a boxPlot's whisker line has no fill to\n   * hit), and its width is what a whisker's slivers will measure.\n   *\n   * Returns null when the environment cannot hit-test path geometry (jsdom);\n   * the caller then keeps the plain grid.\n   *\n   * @param {string} d - path data, in piece-layer coordinates\n   * @param {{x:number,y:number,width:number,height:number}} bbox\n   * @param {any} layer - the mounted piece layer\n   * @returns {{ intervalsAt: (bandLo: number, bandHi: number, horizontal: boolean) => Array<[number, number]> | null, dispose: () => void } | null}\n   */ _makeExtentProber(d, bbox, layer) {\n        const doc = layer.ownerDocument;\n        const probe = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n        probe.setAttribute(\"d\", d);\n        probe.setAttribute(\"fill\", \"#000\");\n        probe.setAttribute(\"stroke\", \"#000\");\n        probe.setAttribute(\"stroke-width\", \"3\");\n        probe.setAttribute(\"visibility\", \"hidden\");\n        layer.appendChild(probe);\n        const svg = probe.ownerSVGElement;\n        if (typeof /** @type {any} */ probe.isPointInFill !== \"function\" || !svg || typeof svg.createSVGPoint !== \"function\") {\n            layer.removeChild(probe);\n            return null;\n        }\n        const pt = svg.createSVGPoint();\n        const hit = (x, y)=>{\n            pt.x = x;\n            pt.y = y;\n            const p2 = /** @type {any} */ probe;\n            return p2.isPointInFill(pt) || typeof p2.isPointInStroke === \"function\" && p2.isPointInStroke(pt);\n        };\n        const SCAN = 48;\n        const intervalsAt = (bandLo, bandHi, horizontal)=>{\n            const lo = horizontal ? bbox.y : bbox.x;\n            const hi = lo + (horizontal ? bbox.height : bbox.width);\n            if (!(hi > lo)) return null;\n            const at = (v2, major)=>horizontal ? hit(major, v2) : hit(v2, major);\n            const majors = [\n                bandLo + (bandHi - bandLo) * 0.1,\n                (bandLo + bandHi) / 2,\n                bandHi - (bandHi - bandLo) * 0.1\n            ];\n            const edge = (inside, outside, major)=>{\n                let a2 = outside;\n                let b2 = inside;\n                for(let it = 0; it < 6; it++){\n                    const m2 = (a2 + b2) / 2;\n                    if (at(m2, major)) b2 = m2;\n                    else a2 = m2;\n                }\n                return (a2 + b2) / 2;\n            };\n            const step = (hi - lo) / SCAN;\n            const proof = new Array(SCAN + 1).fill(null);\n            let any = false;\n            for (const major of majors)for(let s2 = 0; s2 <= SCAN; s2++){\n                if (proof[s2] !== null) continue;\n                if (at(lo + s2 * step, major)) {\n                    proof[s2] = major;\n                    any = true;\n                }\n            }\n            if (!any) return null;\n            const out = [];\n            let runStart = -1;\n            for(let s2 = 0; s2 <= SCAN + 1; s2++){\n                const inside = s2 <= SCAN && proof[s2] !== null;\n                if (inside && runStart < 0) runStart = s2;\n                if (!inside && runStart >= 0) {\n                    const last = s2 - 1;\n                    const major = /** @type {number} */ proof[runStart];\n                    const left = runStart === 0 ? lo : edge(lo + runStart * step, lo + (runStart - 1) * step, major);\n                    const right = last === SCAN ? hi : edge(lo + last * step, lo + (last + 1) * step, /** @type {number} */ proof[last]);\n                    if (right > left) out.push([\n                        left,\n                        right\n                    ]);\n                    runStart = -1;\n                }\n            }\n            return out.length ? out : null;\n        };\n        return {\n            intervalsAt: intervalsAt,\n            dispose: ()=>{\n                if (probe.parentNode) probe.parentNode.removeChild(probe);\n            }\n        };\n    }\n    /**\n   * mark -> objects. Cut each captured mark into one cell per dot and fly\n   * every cell to its dot, corners rounding off and fill blending on the way.\n   * The real dots (rendered hidden by the unit chart, see usesPieceTakeover)\n   * are revealed one by one as their piece lands, so the handoff is\n   * geometrically exact and nothing ever fades.\n   */ _separatePieces() {\n        var _a;\n        const snap = this._snapshot;\n        const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n        if (!snap || !baseEl) return this._revealPieceHidden();\n        const byCluster = /* @__PURE__ */ new Map();\n        let total = 0;\n        baseEl.querySelectorAll(\".apexcharts-unit-area\").forEach((dot)=>{\n            var _a2, _b, _c, _d, _e, _f, _g;\n            const i2 = parseInt((_a2 = dot.getAttribute(\"i\")) != null ? _a2 : \"\", 10);\n            if (isNaN(i2)) return;\n            const cxAttr = dot.getAttribute(\"cx\");\n            let x;\n            let y;\n            let r2 = 3;\n            if (cxAttr != null) {\n                x = parseFloat(cxAttr);\n                y = parseFloat((_b = dot.getAttribute(\"cy\")) != null ? _b : \"\");\n                r2 = parseFloat((_c = dot.getAttribute(\"r\")) != null ? _c : \"3\") || 3;\n            } else {\n                const wAttr = parseFloat((_d = dot.getAttribute(\"width\")) != null ? _d : \"0\") || 0;\n                const hAttr = parseFloat((_e = dot.getAttribute(\"height\")) != null ? _e : \"0\") || 0;\n                x = parseFloat((_f = dot.getAttribute(\"x\")) != null ? _f : \"\") + wAttr / 2;\n                y = parseFloat((_g = dot.getAttribute(\"y\")) != null ? _g : \"\") + hAttr / 2;\n                r2 = Math.max(wAttr, hAttr) / 2 || 3;\n            }\n            if (!isFinite(x) || !isFinite(y)) return;\n            let list = byCluster.get(i2);\n            if (!list) {\n                list = [];\n                byCluster.set(i2, list);\n            }\n            list.push({\n                el: dot,\n                x: x,\n                y: y,\n                r: r2,\n                fill: dot.getAttribute(\"fill\")\n            });\n            total++;\n        });\n        if (total === 0 || total > $e4b487e979d7c06d$var$PIECE_BUDGET) return this._revealPieceHidden();\n        const layer = this._makePieceLayer();\n        if (!layer) return this._revealPieceHidden();\n        const pieces = [];\n        const doc = layer.ownerDocument;\n        const sourceFam = $e4b487e979d7c06d$var$familyOf(snap.fromType);\n        const shapedSource = sourceFam === \"summary\" || sourceFam === \"radial\";\n        Array.from(byCluster.keys()).sort((a2, b2)=>a2 - b2).forEach((i2)=>{\n            var _a2;\n            const dots = /** @type {any[]} */ byCluster.get(i2);\n            const box = this.getInitialBBoxFor(i2);\n            const entry = snap.mapping.get(`${i2}:0`);\n            if (!box || !entry) {\n                dots.forEach((d)=>{\n                    d.el.removeAttribute(\"opacity\");\n                    d.el.removeAttribute(\"data-piece-hidden\");\n                });\n                return;\n            }\n            const markFill = entry.fill && entry.fill.indexOf(\"url(\") !== 0 ? entry.fill : ((_a2 = this.w.globals.colors) == null ? void 0 : _a2[i2]) || dots[0].fill;\n            let prober = null;\n            if (shapedSource) {\n                const shifted = this.getInitialPathFor(i2, 0);\n                if (shifted) prober = this._makeExtentProber(shifted, box, layer);\n            }\n            const divided = prober ? $e4b487e979d7c06d$var$gridDivideShape(box, dots.length, prober.intervalsAt) : $e4b487e979d7c06d$var$gridDivideRect(box, dots.length);\n            if (prober) prober.dispose();\n            const cells = $e4b487e979d7c06d$var$sortByHilbert(divided, (c2)=>[\n                    c2.x + c2.width / 2,\n                    c2.y + c2.height / 2\n                ]);\n            const ordered = $e4b487e979d7c06d$var$sortByHilbert(dots, (d)=>[\n                    d.x,\n                    d.y\n                ]);\n            for(let k = 0; k < ordered.length; k++){\n                const cell = cells[k];\n                const dot = ordered[k];\n                const el = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n                el.setAttribute(\"data-i\", String(i2));\n                el.setAttribute(\"x\", String(cell.x));\n                el.setAttribute(\"y\", String(cell.y));\n                el.setAttribute(\"width\", String(cell.width));\n                el.setAttribute(\"height\", String(cell.height));\n                el.setAttribute(\"rx\", \"0\");\n                el.setAttribute(\"fill\", String(markFill));\n                layer.appendChild(el);\n                pieces.push({\n                    el: el,\n                    from: {\n                        x: cell.x,\n                        y: cell.y,\n                        width: cell.width,\n                        height: cell.height,\n                        rx: 0\n                    },\n                    to: {\n                        x: dot.x - dot.r,\n                        y: dot.y - dot.r,\n                        width: dot.r * 2,\n                        height: dot.r * 2,\n                        rx: dot.r\n                    },\n                    fill: $e4b487e979d7c06d$var$makeColorLerp(markFill, dot.fill),\n                    fillEnd: dot.fill,\n                    delay: 0,\n                    meta: {\n                        dotEl: dot.el\n                    }\n                });\n            }\n        });\n        if (!pieces.length) return this._cancelPieces();\n        this._runPieces(pieces, (piece)=>{\n            const dotEl = piece.meta.dotEl;\n            dotEl.removeAttribute(\"opacity\");\n            dotEl.removeAttribute(\"data-piece-hidden\");\n            if (piece.el.parentNode) piece.el.parentNode.removeChild(piece.el);\n        });\n    }\n    /**\n   * objects -> mark. Each captured outgoing dot flies to one cell of the\n   * incoming mark, squaring off and blending towards the mark's fill; the\n   * mark itself (rendered hidden, see claimsTargetMark) is revealed the\n   * moment its last piece lands and the mosaic is complete, which is also the\n   * moment the seams disappear.\n   */ _combinePieces() {\n        var _a, _b;\n        const snap = this._snapshot;\n        const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n        if (!snap || !snap.sourceDots || !snap.keyOrder || !baseEl) return this._revealPieceHidden();\n        const targets = this._collectTargetMarks(snap.toType);\n        if (!targets.size) return this._revealPieceHidden();\n        const dx = snap.oldLayout.translateX - (this.w.layout.translateX || 0);\n        const dy = snap.oldLayout.translateY - (this.w.layout.translateY || 0);\n        const clusterIdx = Array.from(snap.sourceDots.keys()).sort((a2, b2)=>a2 - b2);\n        const layer = this._makePieceLayer();\n        if (!layer) return this._revealPieceHidden();\n        const doc = layer.ownerDocument;\n        const pieces = [];\n        const targetFam = $e4b487e979d7c06d$var$familyOf(snap.toType);\n        const shapedTarget = targetFam === \"summary\" || targetFam === \"radial\";\n        for(let k = 0; k < clusterIdx.length; k++){\n            const dots = /** @type {any[]} */ snap.sourceDots.get(clusterIdx[k]);\n            const key = snap.keyOrder[k];\n            const target = key ? targets.get(key) : null;\n            if (!target || !dots || !dots.length) {\n                if (target) target.els.forEach((el)=>{\n                    el.removeAttribute(\"opacity\");\n                    el.removeAttribute(\"data-piece-hidden\");\n                });\n                continue;\n            }\n            const markFill = target.fill && target.fill.indexOf(\"url(\") !== 0 ? target.fill : ((_b = this.w.globals.colors) == null ? void 0 : _b[target.realIndex]) || dots[0].fill;\n            let prober = null;\n            if (shapedTarget) {\n                const d = target.d || target.els.map((p2)=>p2.getAttribute(\"pathTo\") || p2.getAttribute(\"d\")).filter(Boolean).join(\" \");\n                if (d) prober = this._makeExtentProber(d, target.bbox, layer);\n            }\n            const divided = prober ? $e4b487e979d7c06d$var$gridDivideShape(target.bbox, dots.length, prober.intervalsAt) : $e4b487e979d7c06d$var$gridDivideRect(target.bbox, dots.length);\n            if (prober) prober.dispose();\n            const cells = $e4b487e979d7c06d$var$sortByHilbert(divided, (c2)=>[\n                    c2.x + c2.width / 2,\n                    c2.y + c2.height / 2\n                ]);\n            const ordered = $e4b487e979d7c06d$var$sortByHilbert(dots, (d)=>[\n                    d.x,\n                    d.y\n                ]);\n            const markState = {\n                remaining: ordered.length,\n                els: target.els,\n                tiles: /** @type {any[]} */ []\n            };\n            for(let m2 = 0; m2 < ordered.length; m2++){\n                const dot = ordered[m2];\n                const cell = cells[m2];\n                const el = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n                const fx = dot.x + dx - dot.r;\n                const fy = dot.y + dy - dot.r;\n                el.setAttribute(\"data-key\", key);\n                el.setAttribute(\"x\", String(fx));\n                el.setAttribute(\"y\", String(fy));\n                el.setAttribute(\"width\", String(dot.r * 2));\n                el.setAttribute(\"height\", String(dot.r * 2));\n                el.setAttribute(\"rx\", String(dot.r));\n                el.setAttribute(\"fill\", String(dot.fill || markFill));\n                layer.appendChild(el);\n                markState.tiles.push(el);\n                pieces.push({\n                    el: el,\n                    from: {\n                        x: fx,\n                        y: fy,\n                        width: dot.r * 2,\n                        height: dot.r * 2,\n                        rx: dot.r\n                    },\n                    to: {\n                        x: cell.x,\n                        y: cell.y,\n                        width: cell.width,\n                        height: cell.height,\n                        rx: 0\n                    },\n                    fill: $e4b487e979d7c06d$var$makeColorLerp(dot.fill, markFill),\n                    fillEnd: String(markFill),\n                    delay: 0,\n                    meta: {\n                        markState: markState\n                    }\n                });\n            }\n        }\n        if (!pieces.length) return this._cancelPieces();\n        this._runPieces(pieces, (piece)=>{\n            const state = piece.meta.markState;\n            state.remaining--;\n            if (state.remaining === 0) {\n                state.els.forEach((el)=>{\n                    el.removeAttribute(\"opacity\");\n                    el.removeAttribute(\"data-piece-hidden\");\n                });\n                state.tiles.forEach((t2)=>{\n                    if (t2.parentNode) t2.parentNode.removeChild(t2);\n                });\n            }\n        });\n    }\n    /**\n   * Stagger and start a piece run. Delays sweep the (already spatially\n   * sorted) list front to back, and the last piece still lands within the\n   * configured morph speed.\n   *\n   * @param {import('./MorphPieces').Piece[]} pieces\n   * @param {(piece: import('./MorphPieces').Piece) => void} onPieceDone\n   */ _runPieces(pieces, onPieceDone) {\n        const speed = this.getSpeed();\n        const stagger = Math.min($e4b487e979d7c06d$var$PIECE_STAGGER_MAX, speed * 0.35);\n        const flight = Math.max(180, speed - stagger);\n        for(let k = 0; k < pieces.length; k++)pieces[k].delay = pieces.length > 1 ? k / (pieces.length - 1) * stagger : 0;\n        this._pieceCancel = $e4b487e979d7c06d$var$runPieceTween({\n            pieces: pieces,\n            duration: flight,\n            onPieceDone: onPieceDone,\n            onAllDone: ()=>{\n                this._pieceCancel = null;\n                this._cancelPieces();\n            }\n        });\n    }\n    /**\n   * The incoming chart's marks, read live: every `path[pathTo]` grouped into\n   * one mark per (realIndex, j), with the union bbox of its final geometry.\n   * Bar marks are one path each; summary marks (boxPlot, violin) may be\n   * several, walked exactly like the capture branch walks the outgoing ones.\n   *\n   * @param {string} toType\n   * @returns {Map<string, { realIndex: number, j: number, bbox: {x:number,y:number,width:number,height:number}, fill: string|null, els: any[], d?: string }>}\n   */ _collectTargetMarks(toType) {\n        var _a;\n        const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n        const out = /* @__PURE__ */ new Map();\n        if (!baseEl) return out;\n        const fam = $e4b487e979d7c06d$var$familyOf(toType);\n        if (fam === \"radial\") {\n            baseEl.querySelectorAll(\".apexcharts-pie-series .apexcharts-pie-area\").forEach((p2, i2)=>{\n                const d = p2.getAttribute(\"data:pathFinal\") || p2.getAttribute(\"d\");\n                if (!d || !d.trim()) return;\n                const box = this._pathBBox(d);\n                if (!box) return;\n                out.set(`${i2}:0`, {\n                    realIndex: i2,\n                    j: 0,\n                    d: d,\n                    bbox: {\n                        x: box.minX,\n                        y: box.minY,\n                        width: box.maxX - box.minX,\n                        height: box.maxY - box.minY\n                    },\n                    fill: p2.getAttribute(\"fill\"),\n                    els: [\n                        p2\n                    ]\n                });\n            });\n            return out;\n        }\n        const wrapClass = fam === \"summary\" ? `.apexcharts-${toType}-series` : \".apexcharts-bar-series\";\n        baseEl.querySelectorAll(`${wrapClass} .apexcharts-series`).forEach((group)=>{\n            var _a2;\n            const realIndex = parseInt((_a2 = group.getAttribute(\"data:realIndex\")) != null ? _a2 : \"0\", 10) || 0;\n            let order = 0;\n            group.querySelectorAll(\"path[pathTo]\").forEach((p2)=>{\n                var _a3;\n                const d = p2.getAttribute(\"pathTo\") || p2.getAttribute(\"d\");\n                if (!d || !d.trim()) return;\n                const jAttr = parseInt((_a3 = p2.getAttribute(\"j\")) != null ? _a3 : \"\", 10);\n                const j = isNaN(jAttr) ? order++ : jAttr;\n                const box = this._pathBBox(d);\n                if (!box) return;\n                const key = `${realIndex}:${j}`;\n                const prev = out.get(key);\n                if (prev) {\n                    prev.els.push(p2);\n                    prev.bbox = {\n                        x: Math.min(prev.bbox.x, box.minX),\n                        y: Math.min(prev.bbox.y, box.minY),\n                        width: Math.max(prev.bbox.x + prev.bbox.width, box.maxX) - Math.min(prev.bbox.x, box.minX),\n                        height: Math.max(prev.bbox.y + prev.bbox.height, box.maxY) - Math.min(prev.bbox.y, box.minY)\n                    };\n                } else out.set(key, {\n                    realIndex: realIndex,\n                    j: j,\n                    bbox: {\n                        x: box.minX,\n                        y: box.minY,\n                        width: box.maxX - box.minX,\n                        height: box.maxY - box.minY\n                    },\n                    fill: p2.getAttribute(\"fill\"),\n                    els: [\n                        p2\n                    ]\n                });\n            });\n        });\n        return out;\n    }\n    /**\n   * Walk the outgoing chart's DOM and collect path `d` strings keyed by\n   * (realIndex, j). The selectors are scoped to the chart family — bar\n   * elements have `pathTo` set; pie/radial elements use their final `d`.\n   *\n   * @param {string} fromType\n   * @returns {{ marks: Array<{ realIndex: number, j: number, d: string, fill: string|null, key?: string|null }>, branches: Array<{ key: string, d: string, fill: string|null }>, unitDots: Map<number, Array<{x:number,y:number,r:number,fill:string|null}>> }}\n   */ _captureFromDOM(fromType) {\n        var _a;\n        const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n        if (!baseEl) return {\n            marks: [],\n            branches: [],\n            unitDots: /* @__PURE__ */ new Map()\n        };\n        const captured = [];\n        const branches = [];\n        const unitDots = /* @__PURE__ */ new Map();\n        const fam = $e4b487e979d7c06d$var$familyOf(fromType);\n        if (fam === \"bar\") {\n            const seriesNodes = baseEl.querySelectorAll(\".apexcharts-bar-series .apexcharts-series\");\n            seriesNodes.forEach((seriesNode)=>{\n                var _a2;\n                const realIndex = parseInt((_a2 = seriesNode.getAttribute(\"data:realIndex\")) != null ? _a2 : \"0\", 10);\n                const paths = seriesNode.querySelectorAll(\"path[pathTo]\");\n                paths.forEach((p2, j)=>{\n                    const d = p2.getAttribute(\"pathTo\") || p2.getAttribute(\"d\");\n                    if (!d) return;\n                    captured.push({\n                        realIndex: realIndex,\n                        j: j,\n                        d: d,\n                        fill: p2.getAttribute(\"fill\")\n                    });\n                });\n            });\n        } else if (fam === \"summary\") {\n            const byMark = /* @__PURE__ */ new Map();\n            baseEl.querySelectorAll(`.apexcharts-${fromType}-area`).forEach((p2)=>{\n                var _a2, _b;\n                const j = parseInt((_a2 = p2.getAttribute(\"j\")) != null ? _a2 : \"\", 10);\n                if (isNaN(j)) return;\n                const d = p2.getAttribute(\"pathTo\") || p2.getAttribute(\"d\");\n                if (!d || !d.trim()) return;\n                const group = typeof p2.closest === \"function\" ? p2.closest(\".apexcharts-series\") : null;\n                const realIndex = parseInt((_b = group == null ? void 0 : group.getAttribute(\"data:realIndex\")) != null ? _b : \"0\", 10) || 0;\n                const key = `${realIndex}:${j}`;\n                const prev = byMark.get(key);\n                if (prev) prev.d += ` ${d}`;\n                else byMark.set(key, {\n                    realIndex: realIndex,\n                    j: j,\n                    d: d,\n                    fill: p2.getAttribute(\"fill\")\n                });\n            });\n            Array.from(byMark.values()).sort((a2, b2)=>a2.realIndex - b2.realIndex || a2.j - b2.j).forEach((m2)=>captured.push(m2));\n        } else if (fam === \"partition\") {\n            if (fromType === \"treemap\") {\n                const rectPath = (el)=>{\n                    var _a2, _b, _c, _d;\n                    const x = parseFloat((_a2 = el.getAttribute(\"x\")) != null ? _a2 : \"\");\n                    const y = parseFloat((_b = el.getAttribute(\"y\")) != null ? _b : \"\");\n                    const width = parseFloat((_c = el.getAttribute(\"width\")) != null ? _c : \"\");\n                    const height = parseFloat((_d = el.getAttribute(\"height\")) != null ? _d : \"\");\n                    if (![\n                        x,\n                        y,\n                        width,\n                        height\n                    ].every((v2)=>isFinite(v2))) return null;\n                    return `M ${x} ${y} L ${x + width} ${y} L ${x + width} ${y + height} L ${x} ${y + height} Z`;\n                };\n                const tiles = baseEl.querySelectorAll(\".apexcharts-treemap-rect\");\n                tiles.forEach((t2)=>{\n                    var _a2, _b;\n                    const d = rectPath(t2);\n                    if (!d) return;\n                    captured.push({\n                        realIndex: parseInt((_a2 = t2.getAttribute(\"i\")) != null ? _a2 : \"0\", 10) || 0,\n                        j: parseInt((_b = t2.getAttribute(\"j\")) != null ? _b : \"0\", 10) || 0,\n                        d: d,\n                        fill: t2.getAttribute(\"fill\"),\n                        key: t2.getAttribute(\"data:key\") || null\n                    });\n                });\n                const containers = baseEl.querySelectorAll(\".apexcharts-treemap-parent-rect\");\n                containers.forEach((c2)=>{\n                    const d = rectPath(c2);\n                    const key = c2.getAttribute(\"data:key\");\n                    if (!d || !key) return;\n                    branches.push({\n                        key: key,\n                        d: d,\n                        fill: c2.getAttribute(\"fill\")\n                    });\n                });\n            } else {\n                const arcs = baseEl.querySelectorAll(\".apexcharts-sunburst-arc\");\n                const leaves = [];\n                arcs.forEach((a2)=>{\n                    if (a2.getAttribute(\"data:leaf\") === \"true\") leaves.push(a2);\n                });\n                const source = leaves.length ? leaves : Array.from(arcs);\n                source.forEach((a2, i2)=>{\n                    const d = a2.getAttribute(\"d\");\n                    if (!d || !d.trim()) return;\n                    captured.push({\n                        realIndex: i2,\n                        j: 0,\n                        d: d,\n                        fill: a2.getAttribute(\"fill\"),\n                        key: a2.getAttribute(\"data:key\") || null\n                    });\n                });\n                arcs.forEach((a2)=>{\n                    if (a2.getAttribute(\"data:leaf\") === \"true\") return;\n                    const d = a2.getAttribute(\"d\");\n                    const key = a2.getAttribute(\"data:key\");\n                    if (!d || !d.trim() || !key) return;\n                    branches.push({\n                        key: key,\n                        d: d,\n                        fill: a2.getAttribute(\"fill\")\n                    });\n                });\n            }\n        } else if (fam === \"unit\") {\n            const dots = baseEl.querySelectorAll(\".apexcharts-unit-area\");\n            const boxes = /* @__PURE__ */ new Map();\n            dots.forEach((dot)=>{\n                var _a2, _b, _c, _d, _e, _f, _g;\n                const i2 = parseInt((_a2 = dot.getAttribute(\"i\")) != null ? _a2 : \"\", 10);\n                if (isNaN(i2)) return;\n                const cxAttr = dot.getAttribute(\"cx\");\n                let x;\n                let y;\n                let r2 = 3;\n                if (cxAttr != null) {\n                    x = parseFloat(cxAttr);\n                    y = parseFloat((_b = dot.getAttribute(\"cy\")) != null ? _b : \"\");\n                    r2 = parseFloat((_c = dot.getAttribute(\"r\")) != null ? _c : \"3\") || 3;\n                } else {\n                    const wAttr = parseFloat((_d = dot.getAttribute(\"width\")) != null ? _d : \"0\") || 0;\n                    const hAttr = parseFloat((_e = dot.getAttribute(\"height\")) != null ? _e : \"0\") || 0;\n                    x = parseFloat((_f = dot.getAttribute(\"x\")) != null ? _f : \"\") + wAttr / 2;\n                    y = parseFloat((_g = dot.getAttribute(\"y\")) != null ? _g : \"\") + hAttr / 2;\n                    r2 = Math.max(wAttr, hAttr) / 2 || 3;\n                }\n                if (!isFinite(x) || !isFinite(y)) return;\n                let list = unitDots.get(i2);\n                if (!list) {\n                    list = [];\n                    unitDots.set(i2, list);\n                }\n                list.push({\n                    x: x,\n                    y: y,\n                    r: r2,\n                    fill: dot.getAttribute(\"fill\")\n                });\n                const box = boxes.get(i2);\n                if (!box) {\n                    boxes.set(i2, {\n                        minX: x,\n                        minY: y,\n                        maxX: x,\n                        maxY: y,\n                        fill: dot.getAttribute(\"fill\")\n                    });\n                    return;\n                }\n                if (x < box.minX) box.minX = x;\n                if (x > box.maxX) box.maxX = x;\n                if (y < box.minY) box.minY = y;\n                if (y > box.maxY) box.maxY = y;\n            });\n            Array.from(boxes.keys()).sort((a2, b2)=>a2 - b2).forEach((i2)=>{\n                const b2 = /** @type {any} */ boxes.get(i2);\n                const pad = 2;\n                const x1 = b2.minX - pad;\n                const y1 = b2.minY - pad;\n                const x2 = b2.maxX + pad;\n                const y2 = b2.maxY + pad;\n                captured.push({\n                    realIndex: i2,\n                    j: 0,\n                    d: `M ${x1} ${y1} L ${x2} ${y1} L ${x2} ${y2} L ${x1} ${y2} Z`,\n                    fill: b2.fill\n                });\n            });\n        } else if (fam === \"radial\") {\n            if (fromType === \"radialBar\" || fromType === \"gauge\") {\n                const centerX = this.w.layout.gridWidth / 2;\n                const centerY = Math.min(this.w.layout.gridWidth, this.w.layout.gridHeight) / 2;\n                const rings = baseEl.querySelectorAll(\".apexcharts-radial-series .apexcharts-radialbar-area\");\n                rings.forEach((p2)=>{\n                    var _a2;\n                    const parent = /** @type {Element|null} */ p2.parentElement;\n                    const realIndex = parseInt((_a2 = parent == null ? void 0 : parent.getAttribute(\"data:realIndex\")) != null ? _a2 : \"0\", 10);\n                    const rawD = p2.getAttribute(\"d\");\n                    if (!rawD) return;\n                    const strokeWidth = parseFloat(p2.getAttribute(\"stroke-width\") || \"0\");\n                    const d = strokeWidth > 1 ? this._radialArcToFilledSegment(rawD, strokeWidth, centerX, centerY) || rawD : rawD;\n                    captured.push({\n                        realIndex: realIndex,\n                        j: 0,\n                        d: d,\n                        fill: p2.getAttribute(\"stroke\")\n                    });\n                });\n            } else {\n                const slices = baseEl.querySelectorAll(\".apexcharts-pie-series .apexcharts-pie-area\");\n                slices.forEach((p2, i2)=>{\n                    const d = p2.getAttribute(\"d\");\n                    if (!d) return;\n                    captured.push({\n                        realIndex: i2,\n                        j: 0,\n                        d: d,\n                        fill: p2.getAttribute(\"fill\")\n                    });\n                });\n            }\n        }\n        return {\n            marks: captured,\n            branches: branches,\n            unitDots: unitDots\n        };\n    }\n    /**\n   * Convert a radialBar's stroked open-arc `d` (\"M x1 y1 A r r 0 large sweep\n   * x2 y2\") into a closed donut-segment polygon whose FILLED rendering\n   * visually matches the original stroked arc — needed because the morph\n   * target (pie/donut/polarArea) renders by fill, not stroke. Returns null\n   * if the input doesn't match the expected M-then-A shape.\n   *\n   * @param {string} rawD\n   * @param {number} strokeWidth\n   * @param {number} centerX\n   * @param {number} centerY\n   * @returns {string | null}\n   */ _radialArcToFilledSegment(rawD, strokeWidth, centerX, centerY) {\n        const m2 = rawD.match(/M\\s*(-?[\\d.]+)\\s+(-?[\\d.]+)\\s+A\\s*(-?[\\d.]+)\\s+(?:-?[\\d.]+)\\s+(?:-?[\\d.]+)\\s+(\\d)\\s+(\\d)\\s+(-?[\\d.]+)\\s+(-?[\\d.]+)/);\n        if (!m2) return null;\n        const x1 = parseFloat(m2[1]);\n        const y1 = parseFloat(m2[2]);\n        const r2 = parseFloat(m2[3]);\n        const large = parseInt(m2[4], 10);\n        const sweep = parseInt(m2[5], 10);\n        const x2 = parseFloat(m2[6]);\n        const y2 = parseFloat(m2[7]);\n        if (!isFinite(r2) || r2 <= 0) return null;\n        const half = strokeWidth / 2;\n        const rOuter = r2 + half;\n        const rInner = Math.max(0, r2 - half);\n        const proj = (px, py, newR)=>{\n            const dx = px - centerX;\n            const dy = py - centerY;\n            const dist = Math.sqrt(dx * dx + dy * dy);\n            if (dist === 0) return {\n                x: centerX,\n                y: centerY\n            };\n            const k = newR / dist;\n            return {\n                x: centerX + dx * k,\n                y: centerY + dy * k\n            };\n        };\n        const o1 = proj(x1, y1, rOuter);\n        const o2 = proj(x2, y2, rOuter);\n        const i1 = proj(x1, y1, rInner);\n        const i2 = proj(x2, y2, rInner);\n        const sweepBack = sweep ? 0 : 1;\n        return `M ${o1.x} ${o1.y} A ${rOuter} ${rOuter} 0 ${large} ${sweep} ${o2.x} ${o2.y} L ${i2.x} ${i2.y} A ${rInner} ${rInner} 0 ${large} ${sweepBack} ${i1.x} ${i1.y} Z`;\n    }\n    /**\n   * Build a closed donut-segment path for the given polar arc geometry. Used\n   * by Radial.drawArcs when morphing FROM a filled wedge (pie/donut/polarArea)\n   * TO a radialBar arc: the final radialBar is rendered as a stroked open arc,\n   * but during the morph we tween d toward this closed-segment form (which\n   * looks identical to the stroked arc when filled with the same color) so\n   * the in-between frames remain visually consistent filled shapes rather\n   * than a thick-outlined wedge.\n   *\n   * @param {number} centerX\n   * @param {number} centerY\n   * @param {number} ringRadius - centerline radius of the radialBar ring\n   * @param {number} strokeWidth - the ring's stroke thickness\n   * @param {number} startAngleDeg - in degrees, 0° = top (12 o'clock)\n   * @param {number} endAngleDeg\n   * @returns {string}\n   */ buildRingSegmentPath(centerX, centerY, ringRadius, strokeWidth, startAngleDeg, endAngleDeg) {\n        const halfStroke = strokeWidth / 2;\n        const rOuter = ringRadius + halfStroke;\n        const rInner = Math.max(0, ringRadius - halfStroke);\n        const sRad = (startAngleDeg - 90) * Math.PI / 180;\n        const eRad = (endAngleDeg - 90) * Math.PI / 180;\n        const oStart = {\n            x: centerX + rOuter * Math.cos(sRad),\n            y: centerY + rOuter * Math.sin(sRad)\n        };\n        const oEnd = {\n            x: centerX + rOuter * Math.cos(eRad),\n            y: centerY + rOuter * Math.sin(eRad)\n        };\n        const iStart = {\n            x: centerX + rInner * Math.cos(sRad),\n            y: centerY + rInner * Math.sin(sRad)\n        };\n        const iEnd = {\n            x: centerX + rInner * Math.cos(eRad),\n            y: centerY + rInner * Math.sin(eRad)\n        };\n        const sweep = endAngleDeg > startAngleDeg ? 1 : 0;\n        const large = Math.abs(endAngleDeg - startAngleDeg) > 180 ? 1 : 0;\n        return `M ${oStart.x} ${oStart.y} A ${rOuter} ${rOuter} 0 ${large} ${sweep} ${oEnd.x} ${oEnd.y} L ${iEnd.x} ${iEnd.y} A ${rInner} ${rInner} 0 ${large} ${1 - sweep} ${iStart.x} ${iStart.y} Z`;\n    }\n    /**\n   * @returns {string | null} the chart-type the active snapshot was captured\n   *   from, or null when no morph is in flight.\n   */ getFromType() {\n        return this._snapshot ? this._snapshot.fromType : null;\n    }\n    /**\n   * Build a (targetKey → captured) map. The targetKey matches the lookup\n   * pattern each chart-type renderer uses when it asks\n   * `getInitialPathFor(realIndex, j)`.\n   *\n   * Strategy: flatten the captured items into a linear sequence (matching the\n   * source chart's natural DOM iteration order: series-then-point for bar,\n   * ring-by-ring for radial), then walk the target's iteration positions in\n   * the same order and pair them up 1:1. This handles every supported shape\n   * without per-pair branching:\n   *\n   *   - bar (1 series, N pts) ↔ radial-family (N items)  → linear[k] ↔ k\n   *   - bar (M series, 1 pt)  ↔ radial-family (M items)  → linear[k] ↔ k\n   *   - radial-family (N items) ↔ bar (any matching shape) → linear[k] ↔ flat target\n   *   - radial-family ↔ radial-family                    → linear[k] ↔ k\n   *\n   * @param {Array<{ realIndex: number, j: number, d: string, fill: string|null, key?: string|null }>} captured\n   * @param {string} _fromType\n   * @param {string} toType\n   * @param {any} newSeries - the series array being passed to the new chart;\n   *   used only to derive the bar target's (realIndex, j) iteration positions.\n   * @param {Array<{ key: string, d: string, fill: string|null }>} [branches]\n   *   non-leaf marks, for the key-based partition pairing.\n   */ _buildMapping(captured, _fromType, toType, newSeries, branches) {\n        const map = /* @__PURE__ */ new Map();\n        const tf = $e4b487e979d7c06d$var$familyOf(toType);\n        const flat = captured.slice().sort((a2, b2)=>a2.realIndex - b2.realIndex || a2.j - b2.j);\n        if (tf === \"partition\" && branches && branches.length) {\n            const keyedMarks = flat.filter((c2)=>c2.key);\n            if (keyedMarks.length === flat.length) {\n                keyedMarks.forEach((c2)=>{\n                    map.set(`key:${c2.key}`, {\n                        d: c2.d,\n                        fill: c2.fill\n                    });\n                });\n                branches.forEach((br)=>{\n                    map.set(`key:${br.key}`, {\n                        d: br.d,\n                        fill: br.fill\n                    });\n                });\n            }\n        }\n        if (tf === \"radial\" || tf === \"unit\" || tf === \"partition\") {\n            flat.forEach((c2, i2)=>{\n                map.set(`${i2}:0`, {\n                    d: c2.d,\n                    fill: c2.fill\n                });\n            });\n            return map;\n        }\n        if (tf === \"bar\" || tf === \"summary\") {\n            const positions = [];\n            const series = Array.isArray(newSeries) ? newSeries : [];\n            series.forEach((s2, seriesIdx)=>{\n                const data = s2 && Array.isArray(s2.data) ? s2.data : [];\n                for(let j = 0; j < data.length; j++)positions.push({\n                    realIndex: seriesIdx,\n                    j: j\n                });\n            });\n            flat.forEach((c2, i2)=>{\n                const pos = positions[i2];\n                if (pos) map.set(`${pos.realIndex}:${pos.j}`, {\n                    d: c2.d,\n                    fill: c2.fill\n                });\n            });\n            return map;\n        }\n        return map;\n    }\n    isActive() {\n        return this._snapshot !== null;\n    }\n    /**\n   * @param {number|string} realIndex\n   * @param {number|string} j\n   * @returns {string | null}\n   */ getInitialPathFor(realIndex, j) {\n        if (!this._snapshot) return null;\n        const entry = this._snapshot.mapping.get(`${realIndex}:${j}`);\n        if (!entry) return null;\n        const dx = this._snapshot.oldLayout.translateX - (this.w.layout.translateX || 0);\n        const dy = this._snapshot.oldLayout.translateY - (this.w.layout.translateY || 0);\n        return dx === 0 && dy === 0 ? entry.d : this._translatePathD(entry.d, dx, dy);\n    }\n    /**\n   * Offset every absolute coordinate in an SVG path `d` by (dx, dy).\n   *\n   * Assumes the path uses only uppercase (absolute) commands — every path\n   * ApexCharts generates does. Relative-command paths would pass through\n   * unchanged at the lowercase, which is also semantically correct (deltas\n   * don't shift under a parent translate).\n   *\n   * @param {string} d\n   * @param {number} dx\n   * @param {number} dy\n   * @returns {string}\n   */ _translatePathD(d, dx, dy) {\n        if (dx === 0 && dy === 0) return d;\n        const commands = $e4b487e979d7c06d$var$parsePath(d);\n        return commands.map(/** @param {any[]} c */ (c2)=>{\n            const cmd = c2[0];\n            if (cmd === \"Z\") return \"Z\";\n            if (cmd === \"M\" || cmd === \"L\" || cmd === \"T\") return `${cmd} ${c2[1] + dx} ${c2[2] + dy}`;\n            if (cmd === \"H\") return `${cmd} ${c2[1] + dx}`;\n            if (cmd === \"V\") return `${cmd} ${c2[1] + dy}`;\n            if (cmd === \"C\") return `${cmd} ${c2[1] + dx} ${c2[2] + dy} ${c2[3] + dx} ${c2[4] + dy} ${c2[5] + dx} ${c2[6] + dy}`;\n            if (cmd === \"S\" || cmd === \"Q\") return `${cmd} ${c2[1] + dx} ${c2[2] + dy} ${c2[3] + dx} ${c2[4] + dy}`;\n            if (cmd === \"A\") return `${cmd} ${c2[1]} ${c2[2]} ${c2[3]} ${c2[4]} ${c2[5]} ${c2[6] + dx} ${c2[7] + dy}`;\n            return c2.join(\" \");\n        }).join(\" \");\n    }\n    /**\n   * The centre point (in the NEW chart's screen space) of the captured shape\n   * for cluster `i`. Kept for callers that only need a point; the unit renderer\n   * uses getInitialBBoxFor so its dots fill the shape rather than stack on a\n   * single point.\n   * @param {number} i\n   * @returns {{ x: number, y: number } | null}\n   */ getInitialCenterFor(i2) {\n        const box = this.getInitialBBoxFor(i2);\n        if (!box) return null;\n        return {\n            x: box.x + box.width / 2,\n            y: box.y + box.height / 2\n        };\n    }\n    /**\n   * The `k`-th captured path in draw order, already shifted into the NEW\n   * chart's coordinate space.\n   *\n   * For marks that pair up by position rather than by a (series, point) grid:\n   * a treemap's tiles and a sunburst's leaves are each one mark per row, laid\n   * out in the same reading order, so the k-th of one becomes the k-th of the\n   * other.\n   *\n   * @param {number} k\n   * @returns {string | null}\n   */ getInitialPathAt(k) {\n        return this.getInitialPathFor(k, 0);\n    }\n    /**\n   * The captured shape for a branch identity (charts/common/Hierarchy.morphKey),\n   * or null when the outgoing chart had no mark for that branch.\n   *\n   * This is what lets a partition morph pair at every level: a sector, an\n   * industry and a company each find the arc or tile that stood for the same\n   * branch, instead of leaves pairing by draw order while the containers pop.\n   *\n   * @param {string} key\n   * @returns {string | null}\n   */ getInitialPathForKey(key) {\n        if (!this._snapshot || !key) return null;\n        return this.getInitialPathFor(\"key\", key);\n    }\n    /** True when the active snapshot can pair by branch key. */ hasKeyedMarks() {\n        if (!this._snapshot) return false;\n        for (const k of this._snapshot.mapping.keys()){\n            if (typeof k === \"string\" && k.startsWith(\"key:\")) return true;\n        }\n        return false;\n    }\n    /**\n   * Where the `j`-th of `n` objects in cluster `i` starts, INSIDE the shape it\n   * came out of.\n   *\n   * An aggregate mark stands for a quantity, and its extent is that quantity: a\n   * bar of height h representing n units gives its k-th unit the height\n   * fraction (k + 0.5)/n. So a bar does not spray its dots from a single point,\n   * it comes apart along its own length, bottom-up, and each dot leaves from\n   * the part of the bar that was standing for it. The reverse direction reads\n   * the same geometry, so explode and collapse are inverses.\n   *\n   * The distribution follows the captured shape's LONGER axis, which is what\n   * makes one function serve both marks: a bar's box is tall and thin, so the\n   * dots leave in a column; a wedge's box is squat, so they leave in a row\n   * across it.\n   *\n   * @param {number} i - cluster index\n   * @param {number} j - the object's rank within its cluster\n   * @param {number} n - objects in the cluster\n   * @returns {{ x: number, y: number } | null}\n   */ getInitialSlotFor(i2, j, n2) {\n        const box = this.getInitialBBoxFor(i2);\n        if (!box) return null;\n        const cx = box.x + box.width / 2;\n        const cy = box.y + box.height / 2;\n        if (!(n2 > 1) || !(j >= 0)) return {\n            x: cx,\n            y: cy\n        };\n        const t2 = (Math.min(j, n2 - 1) + 0.5) / n2;\n        if (box.height >= box.width) return {\n            x: cx,\n            y: box.y + box.height * (1 - t2)\n        };\n        return {\n            x: box.x + box.width * t2,\n            y: cy\n        };\n    }\n    /**\n   * The bounding box (in the NEW chart's screen space) of the captured shape\n   * for cluster `i`. `getInitialSlotFor` distributes a cluster's objects across\n   * this box as their start positions, so a tall bar visibly breaks apart into\n   * a tall column of dots that then swarm into the cluster.\n   * @param {number} i\n   * @returns {{ x: number, y: number, width: number, height: number } | null}\n   */ getInitialBBoxFor(i2) {\n        if (!this._snapshot) return null;\n        const entry = this._snapshot.mapping.get(`${i2}:0`);\n        if (!entry) return null;\n        const box = this._pathBBox(entry.d);\n        if (!box) return null;\n        const dx = this._snapshot.oldLayout.translateX - (this.w.layout.translateX || 0);\n        const dy = this._snapshot.oldLayout.translateY - (this.w.layout.translateY || 0);\n        return {\n            x: box.minX + dx,\n            y: box.minY + dy,\n            width: box.maxX - box.minX,\n            height: box.maxY - box.minY\n        };\n    }\n    /**\n   * Bounding box of an absolute-command SVG path `d`. Good enough as the burst\n   * footprint (we only need where the shape sat, not exact geometry).\n   * @param {string} d\n   * @returns {{ minX:number, minY:number, maxX:number, maxY:number } | null}\n   */ _pathBBox(d) {\n        const commands = $e4b487e979d7c06d$var$parsePath(d);\n        let minX = Infinity;\n        let minY = Infinity;\n        let maxX = -Infinity;\n        let maxY = -Infinity;\n        let seen = false;\n        commands.forEach(/** @param {any[]} c */ (c2)=>{\n            const cmd = c2[0];\n            if (cmd === \"Z\") return;\n            let pairs = [];\n            if (cmd === \"H\") pairs = [\n                [\n                    c2[1],\n                    (minY + maxY) / 2 || c2[1]\n                ]\n            ];\n            else if (cmd === \"V\") pairs = [\n                [\n                    (minX + maxX) / 2 || c2[1],\n                    c2[1]\n                ]\n            ];\n            else if (cmd === \"A\") pairs = [\n                [\n                    c2[6],\n                    c2[7]\n                ]\n            ];\n            else for(let k = 1; k + 1 < c2.length; k += 2)pairs.push([\n                c2[k],\n                c2[k + 1]\n            ]);\n            pairs.forEach(([x, y])=>{\n                if (!isFinite(x) || !isFinite(y)) return;\n                seen = true;\n                if (x < minX) minX = x;\n                if (x > maxX) maxX = x;\n                if (y < minY) minY = y;\n                if (y > maxY) maxY = y;\n            });\n        });\n        if (!seen) return null;\n        return {\n            minX: minX,\n            minY: minY,\n            maxX: maxX,\n            maxY: maxY\n        };\n    }\n    /**\n   * @param {number} realIndex\n   * @param {number} j\n   * @returns {string | null}\n   */ getInitialFillFor(realIndex, j) {\n        if (!this._snapshot) return null;\n        const entry = this._snapshot.mapping.get(`${realIndex}:${j}`);\n        return entry ? entry.fill : null;\n    }\n    /** @returns {number} */ getSpeed() {\n        const animCfg = this.w.config.chart.animations;\n        return animCfg.chartTypeMorph && animCfg.chartTypeMorph.speed || animCfg.speed || 600;\n    }\n    /**\n   * Fade newly-mounted axes / grid / legend / titles from opacity 0 → 1 in\n   * parallel with the morph. Without this the chart's chrome would pop in\n   * abruptly while the series elements are still mid-tween, which reads as a\n   * jarring layout shift.\n   */ applyChromeFade() {\n        var _a;\n        if (!this._snapshot || !$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n        if (!baseEl) return;\n        if (this._snapshot.pieceOut) this._separatePieces();\n        else if (this._snapshot.pieceIn) this._combinePieces();\n        else this._mountGhost();\n        const speed = this.getSpeed();\n        const chromeSelectors = [\n            \".apexcharts-xaxis\",\n            \".apexcharts-yaxis\",\n            \".apexcharts-grid\",\n            \".apexcharts-gridlines-horizontal\",\n            \".apexcharts-gridlines-vertical\",\n            \".apexcharts-legend\",\n            \".apexcharts-title-text\",\n            \".apexcharts-subtitle-text\"\n        ];\n        chromeSelectors.forEach((sel)=>{\n            baseEl.querySelectorAll(sel).forEach((el)=>{\n                if (!el.style) return;\n                el.style.opacity = \"0\";\n                el.style.transition = `opacity ${speed}ms ease-out`;\n                $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(()=>{\n                    el.style.opacity = \"1\";\n                });\n                setTimeout(()=>{\n                    el.style.transition = \"\";\n                    el.style.opacity = \"\";\n                }, speed + 80);\n            });\n        });\n        setTimeout(()=>this.cleanup(), speed + 100);\n    }\n    cleanup() {\n        this._snapshot = null;\n        this._removeGhost();\n        this._cancelPieces();\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    morphTypeChange: $e4b487e979d7c06d$var$MorphTypeChange\n});\nconst $e4b487e979d7c06d$var$XHTML$2 = \"http://www.w3.org/1999/xhtml\";\nclass $e4b487e979d7c06d$var$Breadcrumb {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   * @param {import('./Drilldown').default} drilldown\n   */ constructor(w2, ctx, drilldown){\n        this.w = w2;\n        this.ctx = ctx;\n        this.drilldown = drilldown;\n    }\n    /**\n   * @param {Array<string|number>} path - ['root', id, id, ...]\n   */ render(path) {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const w2 = this.w;\n        const elWrap = w2.dom.elWrap;\n        if (!elWrap) return;\n        const existing = elWrap.querySelector(\".apexcharts-breadcrumb\");\n        if (existing && existing.parentNode) existing.parentNode.removeChild(existing);\n        const cfg = w2.config.drilldown && w2.config.drilldown.breadcrumb;\n        if (!cfg || cfg.show === false) return;\n        if (this.drilldown.depth === 0) return;\n        const nav = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$2, \"nav\");\n        nav.setAttribute(\"class\", \"apexcharts-breadcrumb\");\n        nav.setAttribute(\"aria-label\", \"Drilldown breadcrumb\");\n        this._position(nav, cfg);\n        const separator = cfg.separator != null ? cfg.separator : \" / \";\n        path.forEach((id, i2)=>{\n            if (i2 > 0) {\n                const sep = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$2, \"span\");\n                sep.setAttribute(\"class\", \"apexcharts-breadcrumb-separator\");\n                sep.setAttribute(\"aria-hidden\", \"true\");\n                sep.textContent = separator;\n                nav.appendChild(sep);\n            }\n            const label = this._label(id, i2);\n            const isCurrent = i2 === path.length - 1;\n            if (isCurrent) {\n                const cur = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$2, \"span\");\n                cur.setAttribute(\"class\", \"apexcharts-breadcrumb-item apexcharts-breadcrumb-current\");\n                cur.setAttribute(\"aria-current\", \"page\");\n                cur.textContent = label;\n                nav.appendChild(cur);\n            } else {\n                const btn = /** @type {HTMLButtonElement} */ $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$2, \"button\");\n                btn.setAttribute(\"type\", \"button\");\n                btn.setAttribute(\"class\", \"apexcharts-breadcrumb-item\");\n                if (i2 === 0) {\n                    const arrow = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$2, \"span\");\n                    arrow.setAttribute(\"class\", \"apexcharts-breadcrumb-arrow\");\n                    arrow.setAttribute(\"aria-hidden\", \"true\");\n                    arrow.textContent = \"\\u2190\";\n                    btn.appendChild(arrow);\n                }\n                const text = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$2, \"span\");\n                text.setAttribute(\"class\", \"apexcharts-breadcrumb-label\");\n                text.textContent = label;\n                btn.appendChild(text);\n                btn.addEventListener(\"click\", ()=>this.drilldown.drillToLevel(i2));\n                nav.appendChild(btn);\n            }\n        });\n        elWrap.appendChild(nav);\n        if (this.w.globals.axisCharts) $e4b487e979d7c06d$var$placeInReservedBand(this.w, this.ctx, nav, cfg);\n        this._avoidChromeOverlap(nav);\n    }\n    /**\n   * The breadcrumb is an absolute overlay, so at its default top-left it can\n   * sit on top of a left-aligned title (or subtitle). After mounting, push it\n   * below any chart chrome it intersects. (Sunburst's self-contained\n   * breadcrumb applies the same rule.)\n   * @param {HTMLElement} nav\n   */ _avoidChromeOverlap(nav) {\n        const w2 = this.w;\n        const chrome = /** @type {Element[]} */ [\n            \".apexcharts-title-text\",\n            \".apexcharts-subtitle-text\"\n        ].map((s2)=>w2.dom.baseEl.querySelector(s2)).filter((el)=>el !== null);\n        if (!chrome.length) return;\n        const wrapTop = w2.dom.elWrap.getBoundingClientRect().top;\n        for(let pass = 0; pass < chrome.length + 1; pass++){\n            const nr = nav.getBoundingClientRect();\n            const hit = chrome.find((el)=>{\n                const r2 = el.getBoundingClientRect();\n                return nr.left < r2.right && nr.right > r2.left && nr.top < r2.bottom && nr.bottom > r2.top;\n            });\n            if (!hit) break;\n            nav.style.top = `${hit.getBoundingClientRect().bottom - wrapTop + 4}px`;\n        }\n    }\n    /**\n   * @param {string|number} id\n   * @param {number} index\n   * @returns {string}\n   */ _label(id, index) {\n        const cfg = this.w.config.drilldown.breadcrumb;\n        let label;\n        if (index === 0) label = cfg.rootLabel != null ? cfg.rootLabel : \"All\";\n        else {\n            const list = (this.w.config.drilldown.series || []).find((s2)=>s2 && s2.id === id);\n            label = list && list.name || String(id);\n        }\n        if (typeof cfg.formatter === \"function\") return cfg.formatter(label, {\n            index: index,\n            depth: this.drilldown.depth\n        });\n        return label;\n    }\n    /**\n   * @param {HTMLElement} nav\n   * @param {Record<string, any>} cfg\n   */ _position(nav, cfg) {\n        const ox = cfg.offsetX || 0;\n        const oy = cfg.offsetY || 0;\n        nav.style.position = \"absolute\";\n        nav.style.top = oy + \"px\";\n        if (cfg.position === \"top-right\") nav.style.right = -ox + 3 + \"px\";\n        else nav.style.left = ox + \"px\";\n    }\n}\nconst $e4b487e979d7c06d$var$XHTML$1 = \"http://www.w3.org/1999/xhtml\";\nconst $e4b487e979d7c06d$var$CLASS = \"apexcharts-drilldown-loading\";\nclass $e4b487e979d7c06d$var$DrilldownLoading {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n        this.el = null;\n    }\n    /** @returns {any} the drilldown.loading config, normalised. */ _cfg() {\n        const d = this.w.config.drilldown;\n        const l2 = d && d.loading;\n        if (l2 === false) return {\n            show: false\n        };\n        return l2 || {};\n    }\n    /**\n   * Mount the overlay. No-op when disabled, outside a browser, or already up.\n   */ show() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const cfg = this._cfg();\n        if (cfg.show === false) return;\n        const elWrap = this.w.dom.elWrap;\n        if (!elWrap) return;\n        this.hide();\n        const box = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$1, \"div\");\n        box.setAttribute(\"class\", $e4b487e979d7c06d$var$CLASS);\n        box.setAttribute(\"role\", \"status\");\n        box.setAttribute(\"aria-live\", \"polite\");\n        box.setAttribute(\"aria-label\", cfg.text || \"Loading\");\n        const spinner = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$1, \"div\");\n        spinner.setAttribute(\"class\", `${$e4b487e979d7c06d$var$CLASS}-spinner`);\n        spinner.setAttribute(\"aria-hidden\", \"true\");\n        box.appendChild(spinner);\n        if (cfg.text) {\n            const label = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML$1, \"span\");\n            label.setAttribute(\"class\", `${$e4b487e979d7c06d$var$CLASS}-text`);\n            label.textContent = cfg.text;\n            box.appendChild(label);\n        }\n        elWrap.appendChild(box);\n        this.el = box;\n    }\n    /** Remove the overlay. Safe to call when it is not mounted. */ hide() {\n        const elWrap = this.w.dom.elWrap;\n        if (elWrap) {\n            const nodes = elWrap.querySelectorAll(`.${$e4b487e979d7c06d$var$CLASS}`);\n            for(let i2 = 0; i2 < nodes.length; i2++){\n                const n2 = nodes[i2];\n                if (n2.parentNode) n2.parentNode.removeChild(n2);\n            }\n        } else if (this.el && this.el.parentNode) this.el.parentNode.removeChild(this.el);\n        this.el = null;\n    }\n}\nconst $e4b487e979d7c06d$var$MAX_DEPTH = 32;\nconst $e4b487e979d7c06d$var$DRILL_MARKER = \"__apexDrilldownMarker\";\nclass $e4b487e979d7c06d$var$Drilldown {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.stack = [];\n        this.rootSnapshot = null;\n        this._wired = false;\n        this._asyncCache = /* @__PURE__ */ new Map();\n        this._pending = null;\n        this._warnedUnreachable = false;\n        this._warnedNoSliceOffset = false;\n        this.breadcrumb = new $e4b487e979d7c06d$var$Breadcrumb(w2, ctx, this);\n        this.loading = new $e4b487e979d7c06d$var$DrilldownLoading(w2);\n        this._onPointSelect = this._onPointSelect.bind(this);\n        this._afterRender = this._afterRender.bind(this);\n        this._onPlotDown = this._onPlotDown.bind(this);\n        this._onPlotClick = this._onPlotClick.bind(this);\n        this._downAt = null;\n        this._plotClickWired = null;\n        this.init();\n    }\n    init() {\n        const w2 = this.w;\n        if (!w2.config.drilldown || !w2.config.drilldown.enabled) return;\n        if (this._wired) return;\n        this._wired = true;\n        this.ctx.addEventListener(\"dataPointSelection\", this._onPointSelect);\n        this.ctx.addEventListener(\"mounted\", this._afterRender);\n        this.ctx.addEventListener(\"updated\", this._afterRender);\n        if (w2.config.markers) w2.config.markers.discrete = this._drillMarkers(w2.config.series);\n    }\n    // ─── Observable state ──────────────────────────────────────────────────────\n    /** @returns {Array<string|number>} e.g. ['root', '2024-quarters'] */ get path() {\n        return [\n            \"root\",\n            ...this.stack.map((f)=>f.id)\n        ];\n    }\n    /** @returns {number} 0 at root */ get depth() {\n        return this.stack.length;\n    }\n    // ─── Navigation API ────────────────────────────────────────────────────────\n    /**\n   * Drill into the child level with the given id.\n   * @param {string|number} id\n   * @param {any} [triggerPoint] - the clicked data point (for events / async ctx)\n   * @param {{ seriesIndex?: number, dataPointIndex?: number }} [meta]\n   * @returns {Promise<any>}\n   */ drillDown(id, triggerPoint, meta) {\n        const child = this._resolveChild(id);\n        if (child) return this._drillInto(child, triggerPoint, meta);\n        if (typeof this.w.config.drilldown.onDrillDown === \"function\") return this._drillDownAsync(id, triggerPoint, meta);\n        console.warn(`ApexCharts: drilldown id \"${id}\" not found in chart.drilldown.series, and no onDrillDown resolver is set.`);\n        return Promise.resolve(this.ctx);\n    }\n    /**\n   * Navigate back one level.\n   * @returns {Promise<any>}\n   */ drillUp() {\n        return this.drillToLevel(this.stack.length - 1);\n    }\n    /**\n   * Navigate back to the root view.\n   * @returns {Promise<any>}\n   */ drillToRoot() {\n        return this.drillToLevel(0);\n    }\n    /**\n   * Navigate to an arbitrary depth (0 = root). Used by breadcrumb clicks.\n   * @param {number} targetDepth\n   * @returns {Promise<any>}\n   */ drillToLevel(targetDepth) {\n        const cur = this.stack.length;\n        if (targetDepth < 0 || targetDepth >= cur) return Promise.resolve(this.ctx);\n        const from = this.path[this.path.length - 1];\n        const restore = targetDepth === 0 ? this.rootSnapshot : this.stack[targetDepth].restore;\n        this.stack = this.stack.slice(0, targetDepth);\n        const to = this.path[this.path.length - 1];\n        return this._apply(this._viewFromSnapshot(restore), \"up\", {\n            from: from,\n            to: to\n        });\n    }\n    // ─── Internals ─────────────────────────────────────────────────────────────\n    /**\n   * @param {string|number} id\n   * @returns {any|null}\n   */ _resolveChild(id) {\n        const list = this.w.config.drilldown && this.w.config.drilldown.series;\n        if (!Array.isArray(list)) return null;\n        return list.find((s2)=>s2 && s2.id === id) || null;\n    }\n    /**\n   * @param {any} child\n   * @param {any} [triggerPoint]\n   * @param {{ seriesIndex?: number, dataPointIndex?: number }} [meta]\n   * @returns {Promise<any>}\n   */ _drillInto(child, triggerPoint, meta) {\n        if (this.stack.length >= $e4b487e979d7c06d$var$MAX_DEPTH) {\n            console.warn(`ApexCharts: drilldown max depth (${$e4b487e979d7c06d$var$MAX_DEPTH}) reached.`);\n            return Promise.resolve(this.ctx);\n        }\n        if (!this.rootSnapshot) this.rootSnapshot = this._snapshot();\n        const from = this.path[this.path.length - 1];\n        this.stack.push({\n            id: child.id,\n            name: child.name,\n            restore: this._snapshot()\n        });\n        return this._apply(this._viewFromChild(child), \"down\", {\n            from: from,\n            to: child.id,\n            point: triggerPoint,\n            seriesIndex: meta && meta.seriesIndex,\n            dataPointIndex: meta && meta.dataPointIndex\n        });\n    }\n    /**\n   * Resolve a level through `onDrillDown` and drill into it.\n   *\n   * Failure never changes state: on a throw, a rejection, or a resolver that\n   * hands back something undrillable, the chart stays exactly where it was and\n   * `drillDownError` fires. That is what makes this usable against a real\n   * backend, where a fetch failing is ordinary rather than exceptional.\n   *\n   * @param {string|number|null} id\n   * @param {any} point\n   * @param {{ seriesIndex?: number, dataPointIndex?: number }} [meta]\n   * @returns {Promise<any>}\n   */ _drillDownAsync(id, point, meta) {\n        const cfg = this.w.config.drilldown;\n        const fn = cfg.onDrillDown;\n        const cached = this._cacheGet(id);\n        if (cached) return this._drillInto(cached, point, meta);\n        if (this._pending) return this._pending;\n        let result;\n        this.loading.show();\n        try {\n            result = fn({\n                id: // `id` was missing here, so a resolver could not tell WHICH level was\n                // asked for without re-deriving it from the point. It is the first\n                // thing a real implementation needs (`fetch('/levels/' + id)`).\n                id,\n                point: point,\n                seriesIndex: meta && meta.seriesIndex,\n                dataPointIndex: meta && meta.dataPointIndex\n            });\n        } catch (error) {\n            this.loading.hide();\n            this._fire(\"drillDownError\", {\n                id: id,\n                error: error\n            });\n            return Promise.resolve(this.ctx);\n        }\n        const settle = ()=>{\n            this._pending = null;\n            this.loading.hide();\n        };\n        const p2 = Promise.resolve(result).then((child)=>{\n            settle();\n            if (this._isDead()) return this.ctx;\n            if (!child || !child.data) {\n                this._fire(\"drillDownError\", {\n                    id: id,\n                    error: new Error(`drilldown: onDrillDown resolved without a drillable level for id \"${id}\" (expected an object with a \\`data\\` array).`)\n                });\n                return this.ctx;\n            }\n            const level = child.id != null ? child : $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, child), {\n                id: id\n            });\n            this._cacheSet(id, level);\n            return this._drillInto(level, point, meta);\n        }, (error)=>{\n            settle();\n            if (this._isDead()) return this.ctx;\n            this._fire(\"drillDownError\", {\n                id: id,\n                error: error\n            });\n            return this.ctx;\n        });\n        this._pending = p2;\n        return p2;\n    }\n    /**\n   * Whether the chart was torn down while a resolver was in flight.\n   *\n   * Clicking to drill and then navigating away is ordinary, not exceptional: a\n   * component unmounts, `destroy()` runs, and the fetch settles afterwards.\n   * Without this the resolved level would be applied to a destroyed chart,\n   * which throws out of `updateOptions` and surfaces in the host app as an\n   * unhandled rejection from a click the user has already forgotten about.\n   *\n   * @returns {boolean}\n   */ _isDead() {\n        const w2 = this.w;\n        return !w2 || !w2.globals || w2.globals.isDestroyed === true;\n    }\n    /** @returns {boolean} whether resolved async levels are cached. */ _cacheEnabled() {\n        const cfg = this.w.config.drilldown;\n        return !!(cfg && cfg.cache !== false);\n    }\n    /**\n   * @param {string|number|null} id\n   * @returns {any|null}\n   */ _cacheGet(id) {\n        if (!this._cacheEnabled() || id == null) return null;\n        return this._asyncCache.get(id) || null;\n    }\n    /**\n   * @param {string|number|null} id\n   * @param {any} level\n   */ _cacheSet(id, level) {\n        if (!this._cacheEnabled() || id == null) return;\n        this._asyncCache.set(id, level);\n    }\n    /**\n   * Drop cached async levels, so the next drill re-runs `onDrillDown`. Call it\n   * when the underlying data changes behind a chart that has already drilled.\n   * @param {string|number} [id] a single level, or every level when omitted\n   * @returns {any} the chart, for chaining\n   */ clearCache(id) {\n        if (id == null) this._asyncCache.clear();\n        else this._asyncCache.delete(id);\n        return this.ctx;\n    }\n    /**\n   * Capture the overridable surface of the current view so it can be restored.\n   * Only fields that some drilldown.series entry can change are cloned; series\n   * and chart.type/stacked are always captured.\n   * @returns {object}\n   */ _snapshot() {\n        const c2 = this.w.config;\n        const fields = this._overrideFields();\n        const snap = {\n            series: this._uncollapseSeries($e4b487e979d7c06d$var$Utils$1.clone(c2.series))\n        };\n        if (Array.isArray(c2.labels) && c2.labels.length) snap.labels = $e4b487e979d7c06d$var$Utils$1.clone(c2.labels);\n        snap.chart = {\n            type: c2.chart.type,\n            stacked: c2.chart.stacked\n        };\n        if (fields.has(\"xaxis\")) snap.xaxis = $e4b487e979d7c06d$var$Utils$1.clone(c2.xaxis);\n        if (fields.has(\"yaxis\")) snap.yaxis = $e4b487e979d7c06d$var$Utils$1.clone(c2.yaxis);\n        if (fields.has(\"colors\")) snap.colors = c2.colors ? $e4b487e979d7c06d$var$Utils$1.clone(c2.colors) : void 0;\n        if (fields.has(\"plotOptions\")) snap.plotOptions = $e4b487e979d7c06d$var$Utils$1.clone(c2.plotOptions);\n        if (fields.has(\"fill\")) snap.fill = $e4b487e979d7c06d$var$Utils$1.clone(c2.fill);\n        if (fields.has(\"legend\")) snap.legend = $e4b487e979d7c06d$var$Utils$1.clone(c2.legend);\n        return snap;\n    }\n    /**\n   * Restore any legend-collapsed slices/series to their original values in a\n   * cloned series array, so a drill snapshot captures the pre-collapse data.\n   * Mirrors legend Helpers' collapse addressing: object-form pie/donut packs\n   * every slice as a data point inside `series[0].data`; numeric pie stores a\n   * slice per top-level element; axis series carry a `data` array. No-op when\n   * nothing is collapsed.\n   * @param {any[]} series\n   * @returns {any[]}\n   */ _uncollapseSeries(series) {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const entries = [\n            ...gl.collapsedSeries || [],\n            ...gl.ancillaryCollapsedSeries || []\n        ];\n        if (!entries.length) return series;\n        const type = w2.config.chart.type;\n        const objectFormPie = (type === \"pie\" || type === \"donut\" || type === \"polarArea\") && series.length === 1 && series[0] && typeof series[0] === \"object\" && Array.isArray(series[0].data);\n        const container = objectFormPie ? series[0].data : series;\n        for (const entry of entries){\n            const i2 = entry.index;\n            if (gl.axisCharts) {\n                if (series[i2]) series[i2].data = Array.isArray(entry.data) ? entry.data.slice() : entry.data;\n            } else if (container[i2] && typeof container[i2] === \"object\") container[i2].y = entry.data;\n            else if (container[i2] !== void 0) container[i2] = entry.data;\n        }\n        return series;\n    }\n    /**\n   * Union of overridable fields across all declared drilldown levels. Ensures a\n   * deep drillToRoot restores everything any intermediate level may have changed.\n   * @returns {Set<string>}\n   */ _overrideFields() {\n        const fields = /* @__PURE__ */ new Set();\n        const list = this.w.config.drilldown && this.w.config.drilldown.series || [];\n        for (const s2 of list){\n            if (!s2) continue;\n            if (s2.xaxis) fields.add(\"xaxis\");\n            if (s2.yaxis) fields.add(\"yaxis\");\n            if (s2.colors) fields.add(\"colors\");\n            if (s2.plotOptions) fields.add(\"plotOptions\");\n            if (s2.fill) fields.add(\"fill\");\n            if (s2.legend) fields.add(\"legend\");\n        }\n        return fields;\n    }\n    /**\n   * Copy the optional view fields shared by a drilldown child level and a\n   * restore snapshot (`xaxis`, `yaxis`, `colors`, `plotOptions`, `fill`,\n   * `legend`) from `src` onto `view`, only when present.\n   * @param {Record<string, any>} view @param {Record<string, any>} src\n   */ _copyOptionalViewFields(view, src) {\n        if (src.xaxis) view.xaxis = src.xaxis;\n        if (src.yaxis) view.yaxis = src.yaxis;\n        if (src.colors) view.colors = src.colors;\n        if (src.plotOptions) view.plotOptions = src.plotOptions;\n        if (src.fill) view.fill = src.fill;\n        if (src.legend) view.legend = src.legend;\n    }\n    /**\n   * Build an updateOptions/updateSeries payload for drilling INTO a child level.\n   * Works for axis charts and pie/donut alike: both accept series objects with a\n   * `data` array of `{ x, y }` points (pie derives slice labels from `x`).\n   * @param {any} child\n   * @returns {Record<string, any>}\n   */ _viewFromChild(child) {\n        const view = {};\n        if (Array.isArray(child.series)) view.series = child.series;\n        else view.series = [\n            {\n                name: child.name || \"\",\n                data: child.data\n            }\n        ];\n        const chart = {};\n        if (child.chart && child.chart.type) chart.type = child.chart.type;\n        if (child.chart && child.chart.stacked != null) chart.stacked = child.chart.stacked;\n        if (Object.keys(chart).length) view.chart = chart;\n        this._copyOptionalViewFields(view, child);\n        return view;\n    }\n    /**\n   * Build an updateOptions payload from a restore-snapshot.\n   * @param {Record<string, any>} snap\n   * @returns {Record<string, any>}\n   */ _viewFromSnapshot(snap) {\n        const view = {\n            series: snap.series,\n            chart: snap.chart\n        };\n        if (snap.labels && snap.labels.length) view.labels = snap.labels;\n        this._copyOptionalViewFields(view, snap);\n        return view;\n    }\n    /**\n   * Apply a view by delegating to the right update path, firing drill events\n   * around it.\n   * @param {Record<string, any>} view\n   * @param {'down'|'up'} direction\n   * @param {object} meta\n   * @returns {Promise<any>}\n   */ _apply(view, direction, meta) {\n        const w2 = this.w;\n        w2.interact.selectedDataPoints = [];\n        w2.globals.collapsedSeries = [];\n        w2.globals.collapsedSeriesIndices = [];\n        w2.globals.ancillaryCollapsedSeries = [];\n        w2.globals.ancillaryCollapsedSeriesIndices = [];\n        w2.globals.allSeriesCollapsed = false;\n        w2.globals.risingSeries = [];\n        view.markers = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, view.markers || {}), {\n            discrete: this._drillMarkers(view.series)\n        });\n        const animate = (!w2.config.drilldown.animation || w2.config.drilldown.animation.enabled !== false) && w2.config.chart.animations.enabled !== false;\n        if (direction === \"down\") this._fire(\"drillDownStart\", meta);\n        const runUpdate = (anim)=>this.ctx.updateOptions(view, false, anim, false, false);\n        const done = ()=>{\n            this._fire(direction === \"down\" ? \"drillDownEnd\" : \"drillUp\", meta);\n            return this.ctx;\n        };\n        if (animate && this._zoomEnabled()) {\n            const origin = this._triggerOrigin(meta);\n            if (origin) return this._zoomDrill(origin, direction, ()=>runUpdate(false)).then(done);\n        }\n        return runUpdate(animate).then(done);\n    }\n    /** @returns {boolean} whether trigger-point zoom is configured on. */ _zoomEnabled() {\n        const a2 = this.w.config.drilldown && this.w.config.drilldown.animation;\n        return !!(a2 && a2.zoomFromPoint);\n    }\n    /** @returns {SVGSVGElement|null} the chart's root <svg> node, if present. */ _svgNode() {\n        const paper = this.w.dom && this.w.dom.Paper;\n        return paper && paper.node ? paper.node : null;\n    }\n    /**\n   * The group wrapping ONLY the data marks (bars/cells/tiles) — not the axes,\n   * grid, or titles. Animating this keeps the chart frame still while the marks\n   * move. Covers bar/line/area (`.apexcharts-plot-series`), heatmap, and treemap.\n   * @returns {SVGElement|null}\n   */ _markGroup() {\n        const svg = this._svgNode();\n        if (!svg || typeof svg.querySelector !== \"function\") return null;\n        return svg.querySelector(\".apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap\");\n    }\n    /**\n   * Centre of the clicked point in the SVG's view-box pixel space, used as the\n   * transform-origin for the mark-group scale (which uses `transform-box:\n   * view-box`, so the origin is resolved in SVG coordinates and stays stable\n   * across the parent and child renders). Falls back to the mark group's centre\n   * when there is no trigger point (e.g. drillUp / imperative drill). Returns\n   * null when the marks / SVG / WAAPI are unavailable (SSR / old browsers).\n   * @param {object} meta\n   * @returns {{ x: number, y: number }|null}\n   */ _triggerOrigin(meta) {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return null;\n        const svg = this._svgNode();\n        const group = this._markGroup();\n        if (!svg || !group || typeof group.animate !== \"function\" || typeof svg.getBoundingClientRect !== \"function\") return null;\n        const svgRect = svg.getBoundingClientRect();\n        let el = null;\n        if (meta && meta.seriesIndex != null && meta.dataPointIndex != null && this.w.dom.baseEl) el = this.w.dom.baseEl.querySelector(`[index=\"${meta.seriesIndex}\"][j=\"${meta.dataPointIndex}\"]`);\n        if (el && typeof el.getBoundingClientRect === \"function\") {\n            const r2 = el.getBoundingClientRect();\n            return {\n                x: r2.left + r2.width / 2 - svgRect.left,\n                y: r2.top + r2.height / 2 - svgRect.top\n            };\n        }\n        const gRect = group.getBoundingClientRect();\n        return {\n            x: gRect.left + gRect.width / 2 - svgRect.left,\n            y: gRect.top + gRect.height / 2 - svgRect.top\n        };\n    }\n    /**\n   * Run the \"expand from the clicked point\" choreography around an instant\n   * (un-animated) update. Only the data-mark group is animated — the axes, grid,\n   * and titles stay fixed, so the effect doesn't drag the whole chart frame. The\n   * current marks fade out near-in-place (a quick fade, not a balloon), the child\n   * renders invisibly underneath, then the child marks unfold outward from the\n   * clicked point: a horizontal-biased scale anchored there, so the bars read as\n   * emerging from the column you clicked. Drilling up has no trigger column, so\n   * it settles gently from the marks' centre.\n   *\n   * `transform-box: view-box` resolves the origin in SVG coordinates, so the same\n   * origin applies cleanly to the parent and the freshly-rendered child group.\n   * @param {{ x: number, y: number }} origin\n   * @param {'down'|'up'} direction\n   * @param {() => Promise<any>} runUpdate\n   * @returns {Promise<void>}\n   */ _zoomDrill(origin, direction, runUpdate) {\n        return $e4b487e979d7c06d$var$__async(this, null, function*() {\n            const dur = this._zoomDuration();\n            const down = direction === \"down\";\n            const outDur = Math.round(dur * 0.55);\n            const outTo = down ? \"scale(1.03)\" : \"scale(0.97)\";\n            const inFrom = down ? \"scaleX(0.55) scaleY(0.85)\" : \"scale(1.04)\";\n            const anchor = (el)=>{\n                el.style.transformBox = \"view-box\";\n                el.style.transformOrigin = `${origin.x}px ${origin.y}px`;\n            };\n            const clear = (el)=>{\n                el.style.transform = \"\";\n                el.style.opacity = \"\";\n                el.style.transformOrigin = \"\";\n                el.style.transformBox = \"\";\n            };\n            const outGroup = this._markGroup();\n            let outAnim = null;\n            if (outGroup) {\n                anchor(outGroup);\n                outAnim = outGroup.animate([\n                    {\n                        transform: \"scale(1)\",\n                        opacity: 1\n                    },\n                    {\n                        transform: outTo,\n                        opacity: 0\n                    }\n                ], {\n                    duration: outDur,\n                    easing: \"ease-in\",\n                    fill: \"forwards\"\n                });\n                try {\n                    yield outAnim.finished;\n                } catch (e2) {}\n            }\n            yield runUpdate();\n            const inGroup = this._markGroup();\n            if (inGroup) {\n                anchor(inGroup);\n                inGroup.style.opacity = \"0\";\n                inGroup.style.transform = inFrom;\n                if (outAnim && outGroup === inGroup) outAnim.cancel();\n                const inAnim = inGroup.animate([\n                    {\n                        transform: inFrom,\n                        opacity: 0\n                    },\n                    {\n                        transform: \"scale(1)\",\n                        opacity: 1\n                    }\n                ], // Decelerating ease so the unfold settles softly into place.\n                {\n                    duration: dur,\n                    easing: \"cubic-bezier(0.16, 1, 0.3, 1)\",\n                    fill: \"forwards\"\n                });\n                try {\n                    yield inAnim.finished;\n                } catch (e2) {}\n                clear(inGroup);\n                inAnim.cancel();\n            }\n        });\n    }\n    /** @returns {number} per-phase zoom duration in ms. */ _zoomDuration() {\n        const a2 = this.w.config.drilldown && this.w.config.drilldown.animation;\n        const speed = a2 && typeof a2.speed === \"number\" ? a2.speed : 260;\n        return Math.max(80, speed);\n    }\n    /**\n   * Fire a drill event through both the config callback and the listener registry.\n   * @param {string} name\n   * @param {object} payload\n   */ _fire(name2, payload) {\n        const cb = this.w.config.chart.events && this.w.config.chart.events[name2];\n        if (typeof cb === \"function\") cb(payload, this.ctx, this.w);\n        this.ctx.events.fireEvent(name2, [\n            payload,\n            this.ctx,\n            this.w\n        ]);\n    }\n    // ─── Click + post-render hooks ───────────────────────────────────────────────\n    /**\n   * @param {Event} _event\n   * @param {any} _ctx\n   * @param {{ seriesIndex?: number, dataPointIndex?: number }} opts\n   */ _onPointSelect(_event, _ctx, opts) {\n        if (!opts) return void 0;\n        const point = this._pointAt(opts.seriesIndex, opts.dataPointIndex);\n        if (point && typeof point === \"object\" && point.drilldown != null) return this.drillDown(point.drilldown, point, opts);\n        if (typeof this.w.config.drilldown.onDrillDown === \"function\") return this._drillDownAsync(null, point, opts);\n        return void 0;\n    }\n    /**\n   * @param {number|undefined} seriesIndex\n   * @param {number|undefined} dataPointIndex\n   * @returns {any|null}\n   */ _pointAt(seriesIndex, dataPointIndex) {\n        const series = this.w.config.series;\n        if (!Array.isArray(series) || seriesIndex == null || dataPointIndex == null) return null;\n        const s2 = series[seriesIndex];\n        if (!s2 || !Array.isArray(s2.data)) return null;\n        return s2.data[dataPointIndex] != null ? s2.data[dataPointIndex] : null;\n    }\n    _afterRender() {\n        const w2 = this.w;\n        if (!w2.config.drilldown || !w2.config.drilldown.enabled) return;\n        this._markDrillableTargets();\n        this._wirePlotClick();\n        this.breadcrumb.render(this.path);\n        if (w2.config.markers) w2.config.markers.discrete = this._drillMarkers(w2.config.series);\n    }\n    /**\n   * Mark every point that carries a `drilldown` field as an openable target.\n   *\n   * Two things have to be true for a point to be drillable, and on line/area\n   * neither holds by default. It needs a mark to click (with `markers.size: 0`\n   * there is no element at all), and that mark has to accept the click: core\n   * gives line/area markers `no-pointer-events` so the shared tooltip can track\n   * the whole plot, which silently swallows it. `_drillMarkers()` supplies the\n   * missing dots; this re-enables pointer events on them.\n   *\n   * The cursor class only goes on marks that can actually take the click, so we\n   * never promise an interaction that cannot happen.\n   */ _markDrillableTargets() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const w2 = this.w;\n        const baseEl = w2.dom.baseEl;\n        const series = w2.config.series;\n        if (!baseEl || !Array.isArray(series)) return;\n        let unreachable = 0;\n        series.forEach((s2, i2)=>{\n            const data = s2 && Array.isArray(s2.data) ? s2.data : null;\n            if (!data) return;\n            data.forEach((point, j)=>{\n                if (!point || typeof point !== \"object\" || point.drilldown == null) return;\n                const nodes = baseEl.querySelectorAll(`[index=\"${i2}\"][j=\"${j}\"]`);\n                if (!nodes.length) unreachable++;\n                nodes.forEach((node)=>{\n                    if (this._isClickThroughMark(node)) node.classList.remove(\"no-pointer-events\");\n                    node.classList.add(\"apexcharts-drilldown-target\");\n                });\n            });\n        });\n        if (unreachable && !this._warnedUnreachable) {\n            this._warnedUnreachable = true;\n            console.warn(`ApexCharts: ${unreachable} drillable point(s) have no clickable mark, so clicking them cannot do anything. Leave \\`drilldown.marker\\` on, or give the series markers of its own (\\`markers.size > 0\\`).`);\n        }\n    }\n    /**\n   * Called by Pie when it declines to wire the slice pull-out because this\n   * chart drills. Warned once per chart (a drill re-renders, and the same\n   * notice on every navigation is just noise), and from here rather than from\n   * Pie because this module is the reason it is unavailable.\n   */ warnSliceOffsetDisabled() {\n        if (this._warnedNoSliceOffset) return;\n        this._warnedNoSliceOffset = true;\n        console.warn(\"ApexCharts: `plotOptions.pie.expandOnClick` is not available in a drilldown pie/donut, so it was ignored. A slice click navigates, and a slice that slid out would be discarded by the drill it just triggered.\");\n    }\n    /**\n   * Make the whole band a drillable point owns clickable, not just its dot.\n   *\n   * A dot is ~6px across, so hitting it takes pixel-precise aim, it is far under\n   * the ~44px a finger needs, and the tooltip's arrow points AT the point by\n   * design, which puts a triangle over the very thing you are aiming at. Rather\n   * than move the tooltip, widen the target: a click anywhere in the plot drills\n   * whichever point the tooltip is currently reading. The hit area then matches\n   * the feedback already on screen, so \"the tooltip says 2024, I click, I get\n   * 2024\" holds, and the dot goes back to being an affordance rather than a\n   * target you have to chase.\n   *\n   * Only for the point-based types, since a bar, slice or tile is already a\n   * comfortably large mark and drilling one by clicking the background near it\n   * would be surprising.\n   */ _wirePlotClick() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const baseEl = this.w.dom.baseEl;\n        if (!baseEl || this._plotClickWired === baseEl) return;\n        if (this._plotClickWired) {\n            this._plotClickWired.removeEventListener(\"mousedown\", this._onPlotDown);\n            this._plotClickWired.removeEventListener(\"click\", this._onPlotClick);\n        }\n        baseEl.addEventListener(\"mousedown\", this._onPlotDown);\n        baseEl.addEventListener(\"click\", this._onPlotClick);\n        this._plotClickWired = baseEl;\n    }\n    /** @param {any} e */ _onPlotDown(e2) {\n        this._downAt = {\n            x: e2.clientX,\n            y: e2.clientY\n        };\n    }\n    /**\n   * @param {any} e\n   * @returns {any}\n   */ _onPlotClick(e2) {\n        const w2 = this.w;\n        if (!w2.config.drilldown || !w2.config.drilldown.enabled) return void 0;\n        const down = this._downAt;\n        this._downAt = null;\n        if (down && Math.hypot(e2.clientX - down.x, e2.clientY - down.y) > 4) return void 0;\n        const target = /** @type {Element} */ e2.target;\n        if (!target || typeof target.closest !== \"function\") return void 0;\n        if (target.closest(\".apexcharts-drilldown-target\")) return void 0;\n        if (target.closest(\".apexcharts-legend, .apexcharts-toolbar, .apexcharts-breadcrumb, .apexcharts-menu, .apexcharts-tooltip\")) return void 0;\n        const i2 = w2.interact.capturedSeriesIndex;\n        const j = w2.interact.capturedDataPointIndex;\n        if (i2 == null || j == null || i2 < 0 || j < 0) return void 0;\n        if (!this._isPointBasedSeries(w2.config.series[i2])) return void 0;\n        const point = this._pointAt(i2, j);\n        if (!point || typeof point !== \"object\" || point.drilldown == null) return void 0;\n        return this.drillDown(point.drilldown, point, {\n            seriesIndex: i2,\n            dataPointIndex: j\n        });\n    }\n    /**\n   * A series mark that is deliberately click-through. Restricted to markers\n   * inside the plot: the tooltip draws its own `no-pointer-events` marker, and\n   * that one must stay click-through or it would sit under the cursor and eat\n   * the hover it exists to follow.\n   * @param {Element} node\n   * @returns {boolean}\n   */ _isClickThroughMark(node) {\n        if (!node.classList || !node.classList.contains(\"no-pointer-events\")) return false;\n        if (!node.classList.contains(\"apexcharts-marker\")) return false;\n        return !(typeof node.closest === \"function\" && node.closest(\".apexcharts-tooltip\"));\n    }\n    /**\n   * Discrete-marker entries that give each drillable point a visible dot.\n   *\n   * Only series drawn WITHOUT markers get them, so an author who already shows\n   * markers keeps their styling untouched, and only drillable points get one, so\n   * the dots read as \"these are the ones you can open\" rather than turning every\n   * point into a dot. Core renders discrete markers even when `markers.size` is\n   * 0, which is what makes the affordance possible without a core change.\n   *\n   * Entries are tagged so a resync replaces ours and leaves the author's alone.\n   * @param {any[]} series - the series being rendered (a drill applies its\n   *   level's series, which are not yet on `w.config` when this runs)\n   * @returns {any[]}\n   */ _drillMarkers(series) {\n        const w2 = this.w;\n        const cfg = w2.config.drilldown;\n        const authored = Array.isArray(w2.config.markers && w2.config.markers.discrete) ? w2.config.markers.discrete.filter((d)=>!d || !d[$e4b487e979d7c06d$var$DRILL_MARKER]) : [];\n        const mk = cfg && cfg.marker || {};\n        if (mk.show === false || !Array.isArray(series)) return authored;\n        const own = [];\n        series.forEach((s2, i2)=>{\n            if (!this._seriesNeedsDrillMarker(i2, s2)) return;\n            const data = s2 && Array.isArray(s2.data) ? s2.data : null;\n            if (!data) return;\n            data.forEach((point, j)=>{\n                if (!point || typeof point !== \"object\" || point.drilldown == null) return;\n                const entry = {\n                    seriesIndex: i2,\n                    dataPointIndex: j,\n                    [$e4b487e979d7c06d$var$DRILL_MARKER]: true\n                };\n                if (mk.size !== void 0) entry.size = mk.size;\n                if (mk.shape !== void 0) entry.shape = mk.shape;\n                if (mk.fillColor !== void 0) entry.fillColor = mk.fillColor;\n                if (mk.strokeColor !== void 0) entry.strokeColor = mk.strokeColor;\n                own.push(entry);\n            });\n        });\n        return authored.concat(own);\n    }\n    /**\n   * Whether a series needs drill dots supplied for it: a point-based type whose\n   * marks are the markers, drawn with markers off. Bar, pie, treemap and heatmap\n   * marks are already real clickable elements, and a series that already shows\n   * markers already has its affordance.\n   * @param {number} i @param {any} s\n   * @returns {boolean}\n   */ _seriesNeedsDrillMarker(i2, s2) {\n        if (!this._isPointBasedSeries(s2)) return false;\n        const size = this.w.config.markers && this.w.config.markers.size;\n        const effective = Array.isArray(size) ? size[i2] : size;\n        return !(Number(effective) > 0);\n    }\n    /**\n   * A series whose marks are markers (a point), rather than a shape big enough\n   * to aim at on its own.\n   * @param {any} s\n   * @returns {boolean}\n   */ _isPointBasedSeries(s2) {\n        const type = s2 && s2.type || this.w.config.chart.type;\n        return type === \"line\" || type === \"area\";\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    drilldown: $e4b487e979d7c06d$var$Drilldown\n});\nconst $e4b487e979d7c06d$var$VIEWSTATE_VERSION = 1;\nfunction $e4b487e979d7c06d$var$axisWindow(min, max) {\n    const hasMin = min !== void 0 && min !== null;\n    const hasMax = max !== void 0 && max !== null;\n    if (!hasMin && !hasMax) return null;\n    return {\n        min: hasMin ? min : null,\n        max: hasMax ? max : null\n    };\n}\nfunction $e4b487e979d7c06d$var$cloneSelection(sel) {\n    if (!Array.isArray(sel)) return [];\n    return sel.map((a2)=>Array.isArray(a2) ? a2.slice() : a2);\n}\nfunction $e4b487e979d7c06d$var$annotationKind(method, ctx) {\n    if (typeof method !== \"function\" || !ctx) return null;\n    if (method === ctx.addXaxisAnnotation) return \"xaxis\";\n    if (method === ctx.addYaxisAnnotation) return \"yaxis\";\n    if (method === ctx.addPointAnnotation) return \"point\";\n    return null;\n}\nfunction $e4b487e979d7c06d$var$addMethodName(kind) {\n    switch(kind){\n        case \"xaxis\":\n            return \"addXaxisAnnotation\";\n        case \"yaxis\":\n            return \"addYaxisAnnotation\";\n        case \"point\":\n            return \"addPointAnnotation\";\n        default:\n            return null;\n    }\n}\nfunction $e4b487e979d7c06d$var$captureAnnotations(w2, ctx) {\n    const staticAnno = w2.config.annotations ? $e4b487e979d7c06d$var$Utils$1.clone(w2.config.annotations) : null;\n    const dynamic = [];\n    const mem = w2.globals.memory && w2.globals.memory.methodsToExec || [];\n    for (const entry of mem){\n        if (!entry || entry.label !== \"addAnnotation\") continue;\n        const kind = $e4b487e979d7c06d$var$annotationKind(entry.method, ctx);\n        if (!kind) continue;\n        dynamic.push({\n            kind: kind,\n            params: $e4b487e979d7c06d$var$Utils$1.clone(entry.params)\n        });\n    }\n    return {\n        static: staticAnno,\n        dynamic: dynamic\n    };\n}\nfunction $e4b487e979d7c06d$var$captureMeasure(ctx) {\n    const m2 = ctx && ctx.measure;\n    if (!m2 || typeof m2.getPins !== \"function\") return null;\n    const pins = m2.getPins();\n    return Array.isArray(pins) && pins.length ? {\n        pins: pins\n    } : null;\n}\nfunction $e4b487e979d7c06d$var$captureViewState(w2, ctx) {\n    var _a, _b;\n    const cfgX = w2.config.xaxis || {};\n    const cfgYArr = Array.isArray(w2.config.yaxis) ? w2.config.yaxis : w2.config.yaxis ? [\n        w2.config.yaxis\n    ] : [];\n    const yWindows = cfgYArr.map((y)=>$e4b487e979d7c06d$var$axisWindow(y && y.min, y && y.max));\n    const anyY = yWindows.some((yw)=>yw !== null);\n    const theme = w2.config.theme;\n    const drilldown = ctx && ctx.drilldown;\n    return {\n        v: $e4b487e979d7c06d$var$VIEWSTATE_VERSION,\n        window: {\n            xaxis: $e4b487e979d7c06d$var$axisWindow(cfgX.min, cfgX.max),\n            yaxis: anyY ? yWindows : null\n        },\n        zoomed: !!w2.interact.zoomed,\n        collapsed: (w2.globals.collapsedSeriesIndices || []).slice(),\n        ancillaryCollapsed: (w2.globals.ancillaryCollapsedSeriesIndices || []).slice(),\n        selectedDataPoints: $e4b487e979d7c06d$var$cloneSelection(w2.interact.selectedDataPoints),\n        theme: theme ? {\n            mode: (_a = theme.mode) != null ? _a : null,\n            palette: (_b = theme.palette) != null ? _b : null\n        } : null,\n        locale: w2.config.chart && w2.config.chart.defaultLocale || null,\n        annotations: $e4b487e979d7c06d$var$captureAnnotations(w2, ctx),\n        drill: drilldown && drilldown.depth > 0 ? {\n            path: drilldown.path.slice()\n        } : null,\n        measure: $e4b487e979d7c06d$var$captureMeasure(ctx)\n    };\n}\nfunction $e4b487e979d7c06d$var$applyCollapsedSet(ctx, targetCollapsed, targetAncillary) {\n    const w2 = ctx.w;\n    if (targetCollapsed == null && targetAncillary == null) return;\n    const names = w2.globals.seriesNames || [];\n    const target = /* @__PURE__ */ new Set([\n        ...targetCollapsed || [],\n        ...targetAncillary || []\n    ]);\n    const current = /* @__PURE__ */ new Set([\n        ...w2.globals.collapsedSeriesIndices || [],\n        ...w2.globals.ancillaryCollapsedSeriesIndices || []\n    ]);\n    for(let realIndex = 0; realIndex < names.length; realIndex++){\n        const name2 = names[realIndex];\n        if (name2 == null) continue;\n        const shouldCollapse = target.has(realIndex);\n        const isCollapsed = current.has(realIndex);\n        if (shouldCollapse && !isCollapsed) ctx.hideSeries(name2);\n        else if (!shouldCollapse && isCollapsed) ctx.showSeries(name2);\n    }\n}\nfunction $e4b487e979d7c06d$var$restoreSelection(ctx, selectedDataPoints) {\n    if (!Array.isArray(selectedDataPoints)) return;\n    ctx.w.interact.selectedDataPoints = $e4b487e979d7c06d$var$cloneSelection(selectedDataPoints);\n}\nfunction $e4b487e979d7c06d$var$applyViewState(ctx, view, { animate: animate = true, mergeOptions: mergeOptions } = {}) {\n    var _a, _b;\n    if (!ctx || !view) return;\n    if (typeof view.v === \"number\" && view.v > $e4b487e979d7c06d$var$VIEWSTATE_VERSION) console.warn(`[apexcharts] ViewState v${view.v} is newer than this build understands (v${$e4b487e979d7c06d$var$VIEWSTATE_VERSION}); applying best-effort.`);\n    ctx.clearAnnotations();\n    const options2 = mergeOptions ? $e4b487e979d7c06d$var$Utils$1.clone(mergeOptions) : {};\n    const xw = view.window && view.window.xaxis;\n    options2.xaxis = Object.assign({}, options2.xaxis, xw ? {\n        min: (_a = xw.min) != null ? _a : void 0,\n        max: (_b = xw.max) != null ? _b : void 0\n    } : {\n        min: void 0,\n        max: void 0\n    });\n    const yw = view.window && view.window.yaxis;\n    if (Array.isArray(yw)) options2.yaxis = yw.map((y)=>{\n        var _a2, _b2;\n        return y ? {\n            min: (_a2 = y.min) != null ? _a2 : void 0,\n            max: (_b2 = y.max) != null ? _b2 : void 0\n        } : {};\n    });\n    if (view.theme) {\n        const theme = {};\n        if (view.theme.mode != null) theme.mode = view.theme.mode;\n        if (view.theme.palette != null) theme.palette = view.theme.palette;\n        if (Object.keys(theme).length) options2.theme = Object.assign({}, options2.theme, theme);\n    }\n    if (view.annotations && view.annotations.static) options2.annotations = $e4b487e979d7c06d$var$Utils$1.clone(view.annotations.static);\n    ctx.updateOptions(options2, false, animate, false, false);\n    $e4b487e979d7c06d$var$applyViewInteraction(ctx, view);\n}\nfunction $e4b487e979d7c06d$var$applyViewInteraction(ctx, view) {\n    if (!ctx || !view) return;\n    const w2 = ctx.w;\n    w2.interact.zoomed = !!view.zoomed;\n    $e4b487e979d7c06d$var$applyCollapsedSet(ctx, view.collapsed, view.ancillaryCollapsed);\n    if (view.annotations && Array.isArray(view.annotations.dynamic)) view.annotations.dynamic.forEach((a2)=>{\n        const method = $e4b487e979d7c06d$var$addMethodName(a2.kind);\n        if (method && typeof ctx[method] === \"function\") ctx[method](a2.params, true);\n    });\n    $e4b487e979d7c06d$var$restoreSelection(ctx, view.selectedDataPoints);\n    if (view.locale && view.locale !== w2.config.chart.defaultLocale) ctx.setLocale(view.locale);\n    if (ctx.measure && typeof ctx.measure.setPins === \"function\") ctx.measure.setPins(view.measure && view.measure.pins || []);\n}\nconst $e4b487e979d7c06d$var$PERSPECTIVE_VERSION = 1;\nconst $e4b487e979d7c06d$var$HASH_KEY = \"apex\";\nfunction $e4b487e979d7c06d$var$toBase64(str) {\n    if (typeof $e4b487e979d7c06d$require$Buffer !== \"undefined\") return $e4b487e979d7c06d$require$Buffer.from(str, \"utf-8\").toString(\"base64\");\n    const bytes = new TextEncoder().encode(str);\n    let bin = \"\";\n    for(let i2 = 0; i2 < bytes.length; i2++)bin += String.fromCharCode(bytes[i2]);\n    return btoa(bin);\n}\nfunction $e4b487e979d7c06d$var$fromBase64(b64) {\n    if (typeof $e4b487e979d7c06d$require$Buffer !== \"undefined\") return $e4b487e979d7c06d$require$Buffer.from(b64, \"base64\").toString(\"utf-8\");\n    const bin = atob(b64);\n    const bytes = new Uint8Array(bin.length);\n    for(let i2 = 0; i2 < bin.length; i2++)bytes[i2] = bin.charCodeAt(i2);\n    return new TextDecoder().decode(bytes);\n}\nfunction $e4b487e979d7c06d$var$base64urlEncode(str) {\n    return $e4b487e979d7c06d$var$toBase64(str).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\");\n}\nfunction $e4b487e979d7c06d$var$base64urlDecode(b64url) {\n    let b64 = b64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n    while(b64.length % 4)b64 += \"=\";\n    return $e4b487e979d7c06d$var$fromBase64(b64);\n}\nfunction $e4b487e979d7c06d$var$stripFunctions(obj) {\n    try {\n        return JSON.parse(JSON.stringify(obj));\n    } catch (e2) {\n        return void 0;\n    }\n}\nclass $e4b487e979d7c06d$var$Perspectives {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this._saved = [];\n        this._counter = 0;\n        this._used = false;\n    }\n    /**\n   * Capture the current chart view as a Perspective token.\n   * @returns {{ v: number, view: object, options?: Record<string, any> }}\n   */ capture() {\n        const view = $e4b487e979d7c06d$var$captureViewState(this.w, this.ctx);\n        const token = /** @type {any} */ {\n            v: $e4b487e979d7c06d$var$PERSPECTIVE_VERSION,\n            view: view\n        };\n        const options2 = this._serializableDelta();\n        if (options2 && Object.keys(options2).length) token.options = options2;\n        return token;\n    }\n    /**\n   * Build the whitelisted, function-free option override recorded in the token.\n   * @returns {Record<string, any>}\n   * @private\n   */ _serializableDelta() {\n        const cfg = this.w.config;\n        const whitelist = cfg.chart && cfg.chart.perspectives && cfg.chart.perspectives.serializeOptions || [\n            \"theme\",\n            \"xaxis\",\n            \"yaxis\",\n            \"title\",\n            \"subtitle\"\n        ];\n        const delta = {};\n        whitelist.forEach((path)=>{\n            if (cfg[path] !== void 0) {\n                const stripped = $e4b487e979d7c06d$var$stripFunctions(cfg[path]);\n                if (stripped !== void 0) delta[path] = stripped;\n            }\n        });\n        return delta;\n    }\n    /**\n   * Encode a token (or the current capture) to a compact base64url string.\n   * JSON.stringify drops any functions embedded in annotation params / option\n   * overrides by construction: a shared link carries data; the opening page\n   * supplies its own functions from config.\n   * @param {any} [token]\n   * @returns {string}\n   */ encode(token) {\n        const t2 = token || this.capture();\n        return $e4b487e979d7c06d$var$base64urlEncode(JSON.stringify(t2));\n    }\n    /**\n   * Decode a base64url token string. Never throws: returns null on any error\n   * or version mismatch (with a console warning).\n   * @param {string} str\n   * @returns {any | null}\n   */ decode(str) {\n        return $e4b487e979d7c06d$var$Perspectives.decode(str);\n    }\n    /**\n   * Encode the current capture into a `#apex=<token>` URL hash fragment on the\n   * current location. Browser-only; returns '' under SSR.\n   * @returns {string}\n   */ toURL() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return \"\";\n        const encoded = this.encode(this.capture());\n        const url = new URL(window.location.href);\n        url.hash = `${$e4b487e979d7c06d$var$HASH_KEY}=${encoded}`;\n        return url.toString();\n    }\n    /**\n   * Restore a perspective. Accepts a token object or an encoded string. When\n   * the chart is grouped, applies to every synced chart.\n   *\n   * The token's option overrides and `opts.mergeOptions` are folded into the\n   * view restore's ONE updateOptions call (mergeOptions wins over\n   * token.options; the view's own fields win over both). A single render is\n   * deliberate: a second immediate updateOptions would kill the first one's\n   * animation mid-flight, and a chart.type change applied this way morphs\n   * (morph feature) inside the same re-render instead of being re-rendered\n   * over. Consumed by Storyboard for per-beat option payloads.\n   *\n   * @param {any} tokenOrString\n   * @param {{ animate?: boolean, mergeOptions?: Record<string, any> }} [opts]\n   */ apply(tokenOrString, opts = {}) {\n        const token = typeof tokenOrString === \"string\" ? $e4b487e979d7c06d$var$Perspectives.decode(tokenOrString) : tokenOrString;\n        if (!token || !token.view) return;\n        this._used = true;\n        $e4b487e979d7c06d$var$enforceLicense(this.w, this.ctx);\n        const animate = opts.animate !== void 0 ? opts.animate : true;\n        const combined = $e4b487e979d7c06d$var$Utils$1.extend(token.options ? $e4b487e979d7c06d$var$Utils$1.clone(token.options) : {}, opts.mergeOptions || {});\n        const mergeOptions = Object.keys(combined).length ? combined : void 0;\n        const targets = this.w.config.chart.group ? this.ctx.getSyncedCharts() : [\n            this.ctx\n        ];\n        targets.forEach((chart)=>{\n            $e4b487e979d7c06d$var$applyViewState(chart, token.view, {\n                animate: animate,\n                mergeOptions: mergeOptions\n            });\n        });\n    }\n    /**\n   * Save the current view under a name in the in-memory registry.\n   * @param {string} name\n   * @returns {string} generated id\n   */ save(name2) {\n        const id = `perspective-${++this._counter}`;\n        this._saved.push({\n            id: id,\n            name: name2 || id,\n            token: this.capture()\n        });\n        this._used = true;\n        $e4b487e979d7c06d$var$enforceLicense(this.w, this.ctx);\n        return id;\n    }\n    /**\n   * List saved perspectives.\n   * @returns {{ id: string, name: string, token: any }[]}\n   */ list() {\n        return this._saved.map((s2)=>({\n                id: s2.id,\n                name: s2.name,\n                token: s2.token\n            }));\n    }\n    /**\n   * Delete a saved perspective by id.\n   * @param {string} id\n   */ delete(id) {\n        const i2 = this._saved.findIndex((s2)=>s2.id === id);\n        if (i2 > -1) this._saved.splice(i2, 1);\n    }\n    /** Drop the saved-views registry (called on full destroy). */ teardown() {\n        this._saved = [];\n        this._counter = 0;\n    }\n    // ── static, pure helpers (available once the feature is imported) ─────────\n    /**\n   * @param {string} str base64url token\n   * @returns {any | null}\n   */ static decode(str) {\n        if (typeof str !== \"string\" || !str) return null;\n        try {\n            const token = JSON.parse($e4b487e979d7c06d$var$base64urlDecode(str));\n            if (!token || typeof token !== \"object\") return null;\n            if (token.v !== $e4b487e979d7c06d$var$PERSPECTIVE_VERSION) {\n                console.warn(`apexcharts: unsupported perspective version ${token.v} (expected ${$e4b487e979d7c06d$var$PERSPECTIVE_VERSION}).`);\n                return null;\n            }\n            return token;\n        } catch (e2) {\n            console.warn(\"apexcharts: failed to decode perspective token.\", e2);\n            return null;\n        }\n    }\n    /**\n   * Parse a `#apex=<token>` fragment out of an href (or the current location in\n   * a browser). Pure and Node-safe when given an explicit href.\n   * @param {string} [href]\n   * @returns {any | null}\n   */ static fromURL(href) {\n        try {\n            const target = href || ($e4b487e979d7c06d$var$Environment.isBrowser() ? window.location.href : \"\");\n            if (!target) return null;\n            const url = new URL(target);\n            const hash = url.hash.replace(/^#/, \"\");\n            if (!hash) return null;\n            const pair = hash.split(\"&\").map((p2)=>p2.split(\"=\")).find((p2)=>p2[0] === $e4b487e979d7c06d$var$HASH_KEY);\n            if (!pair || pair[1] == null) return null;\n            return $e4b487e979d7c06d$var$Perspectives.decode(decodeURIComponent(pair[1]));\n        } catch (e2) {\n            return null;\n        }\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    perspectives: $e4b487e979d7c06d$var$Perspectives\n});\n$e4b487e979d7c06d$export$2e2bcd8739ae039.perspectives = {\n    /** @param {string} str */ decode: (str)=>{\n        $e4b487e979d7c06d$var$markPerspectivesTokenDecoded();\n        return $e4b487e979d7c06d$var$Perspectives.decode(str);\n    },\n    /** @param {string} [href] */ fromURL: (href)=>{\n        $e4b487e979d7c06d$var$markPerspectivesTokenDecoded();\n        return $e4b487e979d7c06d$var$Perspectives.fromURL(href);\n    }\n};\nclass $e4b487e979d7c06d$var$Storyboard {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this._beats = [];\n        this._observer = null;\n        this._activeIndex = -1;\n        this._animate = true;\n        this._warnedNoPerspectives = false;\n        this._used = false;\n    }\n    /**\n   * Bind beats to scroll position. Rebinding replaces the previous binding.\n   * @param {{\n   *   beats?: Array<{ el?: Element, selector?: string, key?: string, view?: any, announce?: string, onEnter?: (chart: any, info: StoryboardBeatInfo) => void }>,\n   *   scroller?: Element | string,\n   *   offset?: number,\n   *   animate?: boolean,\n   * }} [opts]\n   * @returns {number} the number of beats bound\n   */ bind(opts = {}) {\n        var _a;\n        this.unbind();\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return 0;\n        const doc = this.ctx.el && this.ctx.el.ownerDocument;\n        if (!doc || typeof IntersectionObserver === \"undefined\") return 0;\n        let root = null;\n        if (opts.scroller) root = typeof opts.scroller === \"string\" ? doc.querySelector(opts.scroller) : opts.scroller;\n        this._beats = this._resolveBeats(doc, root, opts.beats);\n        if (!this._beats.length) return 0;\n        this._animate = opts.animate !== false;\n        const offset = Math.min(Math.max((_a = opts.offset) != null ? _a : 0.5, 0), 1);\n        const top = +(offset * 100).toFixed(3);\n        const bottom = +(100 - offset * 100).toFixed(3);\n        this._observer = new IntersectionObserver((entries)=>this._onIntersect(entries), {\n            root: root,\n            rootMargin: `-${top}% 0px -${bottom}%`,\n            threshold: 0\n        });\n        this._beats.forEach((b2)=>{\n            var _a2;\n            return (_a2 = this._observer) == null ? void 0 : _a2.observe(b2.el);\n        });\n        this._used = true;\n        $e4b487e979d7c06d$var$enforceLicense(this.w, this.ctx);\n        return this._beats.length;\n    }\n    /**\n   * Normalize the beats option, or auto-discover [data-apex-beat] elements in\n   * document order when no explicit list is given.\n   * @param {Document} doc\n   * @param {Element | null} root\n   * @param {Array<any>} [beatsOpt]\n   * @returns {StoryboardBeat[]}\n   * @private\n   */ _resolveBeats(doc, root, beatsOpt) {\n        const beats = [];\n        if (Array.isArray(beatsOpt)) {\n            beatsOpt.forEach((b2, i2)=>{\n                var _a, _b;\n                if (!b2) return;\n                const el = b2.el && typeof b2.el === \"object\" ? b2.el : b2.selector ? doc.querySelector(b2.selector) : null;\n                if (!el) {\n                    console.warn(`apexcharts: storyboard beat ${i2} has no resolvable element; skipped.`);\n                    return;\n                }\n                beats.push({\n                    el: el,\n                    key: (_b = (_a = b2.key) != null ? _a : el.getAttribute(\"data-apex-beat\")) != null ? _b : String(i2),\n                    view: b2.view,\n                    options: b2.options,\n                    announce: b2.announce,\n                    onEnter: typeof b2.onEnter === \"function\" ? b2.onEnter : void 0\n                });\n            });\n            return beats;\n        }\n        const scope = root || doc;\n        scope.querySelectorAll(\"[data-apex-beat]\").forEach((el, i2)=>{\n            beats.push({\n                el: el,\n                key: el.getAttribute(\"data-apex-beat\") || String(i2),\n                view: el.getAttribute(\"data-apex-view\") || void 0,\n                options: void 0,\n                announce: el.getAttribute(\"data-apex-announce\") || void 0,\n                onEnter: void 0\n            });\n        });\n        return beats;\n    }\n    /**\n   * @param {IntersectionObserverEntry[]} entries\n   * @private\n   */ _onIntersect(entries) {\n        entries.forEach((entry)=>{\n            const idx = this._beats.findIndex((b2)=>b2.el === entry.target);\n            if (idx < 0) return;\n            if (entry.isIntersecting) this._activate(idx);\n            else if (idx === this._activeIndex && entry.rootBounds) {\n                if (entry.boundingClientRect.top >= entry.rootBounds.bottom && idx > 0) this._activate(idx - 1);\n            }\n        });\n    }\n    /**\n   * Activate a beat: apply its view token, run its callback, announce it and\n   * fire `beatChange`. Idempotent per beat (re-activating the current beat is\n   * a no-op), so IO chatter never re-applies a view.\n   * @param {number} idx\n   * @param {{ animate?: boolean }} [opts]\n   * @private\n   */ _activate(idx, opts = {}) {\n        var _a, _b;\n        if (idx === this._activeIndex) return;\n        const beat = this._beats[idx];\n        if (!beat) return;\n        const direction = idx > this._activeIndex ? \"down\" : \"up\";\n        this._activeIndex = idx;\n        const animate = (opts.animate !== void 0 ? opts.animate : this._animate) && !$e4b487e979d7c06d$var$prefersReducedMotion();\n        if (beat.view != null || beat.options) {\n            if (this.ctx.perspectives) {\n                const v2 = (_a = beat.view) != null ? _a : {};\n                const token = typeof v2 === \"string\" || v2.view ? v2 : {\n                    view: this._normalizeView(v2)\n                };\n                this.ctx.perspectives.apply(token, {\n                    animate: animate,\n                    mergeOptions: beat.options\n                });\n            } else if (!this._warnedNoPerspectives) {\n                this._warnedNoPerspectives = true;\n                console.warn('apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import \"apexcharts/features/storyboard\" (which includes it) or drive beats via onEnter.');\n            }\n        }\n        const info = {\n            index: idx,\n            key: beat.key,\n            el: beat.el,\n            direction: direction\n        };\n        if (beat.onEnter) beat.onEnter(this.ctx, info);\n        if (beat.announce) this._announce(beat.announce);\n        if (typeof this.w.config.chart.events.beatChange === \"function\") this.w.config.chart.events.beatChange(this.ctx, info);\n        (_b = this.ctx.events) == null || _b.fireEvent(\"beatChange\", [\n            this.ctx,\n            info\n        ]);\n    }\n    /**\n   * Fill in the parts of a hand-authored (bare) ViewState that would\n   * otherwise LEAK between beats. updateOptions merges objects, so a beat\n   * listing only xaxis annotations would keep a previous beat's point\n   * annotations; padding every annotation kind with an empty array makes\n   * each beat fully describe its own state, which is what allows scrubbing\n   * in both directions. Full tokens (from capture()/encode()) already carry\n   * the complete set and never pass through here.\n   * @param {any} view\n   * @returns {any}\n   * @private\n   */ _normalizeView(view) {\n        const provided = view.annotations && view.annotations.static || {};\n        return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, view), {\n            annotations: {\n                static: $e4b487e979d7c06d$var$__spreadValues({\n                    points: [],\n                    xaxis: [],\n                    yaxis: [],\n                    texts: [],\n                    images: []\n                }, provided),\n                dynamic: view.annotations && view.annotations.dynamic || []\n            }\n        });\n    }\n    /**\n   * Programmatically jump to a beat by index or author key (also usable\n   * without scrolling, e.g. from next/prev buttons).\n   * @param {number | string} indexOrKey\n   * @param {{ animate?: boolean }} [opts]\n   */ goTo(indexOrKey, opts = {}) {\n        const idx = typeof indexOrKey === \"number\" ? indexOrKey : this._beats.findIndex((b2)=>b2.key === indexOrKey);\n        if (idx >= 0 && idx < this._beats.length) this._activate(idx, opts);\n    }\n    /**\n   * @returns {{ index: number, key: string | null } | null} the active beat\n   */ current() {\n        if (this._activeIndex < 0) return null;\n        const beat = this._beats[this._activeIndex];\n        return {\n            index: this._activeIndex,\n            key: beat ? beat.key : null\n        };\n    }\n    /** Disconnect the observer and drop the beat list. */ unbind() {\n        if (this._observer) {\n            this._observer.disconnect();\n            this._observer = null;\n        }\n        this._beats = [];\n        this._activeIndex = -1;\n        this._used = false;\n        $e4b487e979d7c06d$var$enforceLicense(this.w, this.ctx);\n    }\n    /** Full-destroy cleanup (called from Destroy). */ teardown() {\n        this.unbind();\n    }\n    /**\n   * Push a beat's announcement to the chart's visually-hidden aria-live\n   * status region so screen-reader users follow the story too. No-op when\n   * announcements are disabled or the region is absent.\n   * @param {string} message\n   * @private\n   */ _announce(message) {\n        const w2 = this.w;\n        if (!w2.config.chart.accessibility.announcements.enabled) return;\n        const baseEl = w2.dom.baseEl;\n        if (!baseEl) return;\n        const region = baseEl.querySelector(\".apexcharts-sr-status\");\n        if (!region) return;\n        region.textContent = \"\";\n        setTimeout(()=>{\n            region.textContent = message;\n        }, 0);\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    storyboard: $e4b487e979d7c06d$var$Storyboard\n});\nfunction $e4b487e979d7c06d$var$isEditableTarget(node) {\n    if (!node) return false;\n    const tag = node.tagName;\n    return tag === \"INPUT\" || tag === \"TEXTAREA\" || tag === \"SELECT\" || node.isContentEditable === true;\n}\nclass $e4b487e979d7c06d$var$History {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.stack = [];\n        this.pointer = -1;\n        this.applying = false;\n        this._batching = false;\n        this._counter = 0;\n        this._coalesceTimer = null;\n        this._settleTimer = null;\n        this._pendingLabel = void 0;\n        this._keydownTarget = null;\n        this._pointerTarget = null;\n        this._engaged = false;\n        this._wired = false;\n        this._readConfig();\n        this._onMounted = this._onMounted.bind(this);\n        this._onUpdated = this._onUpdated.bind(this);\n        this._onSelection = this._onSelection.bind(this);\n        this._onKeyDown = this._onKeyDown.bind(this);\n        this._onPointerDown = this._onPointerDown.bind(this);\n        this.init();\n    }\n    /**\n   * (Re)read chart.history config. Called at construction and again on every\n   * mounted/updated event so `updateOptions({ chart: { history: {...} } })`\n   * takes effect at runtime: enabling wires the keyboard + starts capturing,\n   * disabling stops capturing (the stack is kept for a later re-enable).\n   */ _readConfig() {\n        const w2 = this.w;\n        const cfg = w2.config.chart && w2.config.chart.history || {};\n        this.enabled = !!cfg.enabled;\n        this.maxDepth = cfg.maxDepth > 0 ? cfg.maxDepth : 100;\n        this.coalesceMs = cfg.coalesceMs != null ? cfg.coalesceMs : 250;\n        this.keyboard = cfg.keyboard !== false;\n    }\n    /** Re-sync config, then wire/unwire the keyboard to match. */ _syncConfig() {\n        this._readConfig();\n        if (this.enabled && this.keyboard) this._wireKeyboard();\n        else this._unwireKeyboard();\n    }\n    init() {\n        if (this._wired) return;\n        this._wired = true;\n        this.ctx.addEventListener(\"mounted\", this._onMounted);\n        this.ctx.addEventListener(\"updated\", this._onUpdated);\n        this.ctx.addEventListener(\"scrolled\", this._onUpdated);\n        this.ctx.addEventListener(\"dataPointSelection\", this._onSelection);\n        if (this.enabled && this.keyboard) this._wireKeyboard();\n    }\n    /**\n   * Keyboard: Cmd/Ctrl+Z = undo, Shift+Cmd/Ctrl+Z or Ctrl+Y = redo. Bound on\n   * the document (not the chart element) because pointer gestures that create\n   * an undo step (annotation drag, zoom, pan) call preventDefault and so never\n   * move focus into the chart, leaving an el-scoped listener unreachable. To\n   * stay non-intrusive it acts only when this chart is \"engaged\" (see\n   * _onKeyDown): a capture-phase pointerdown marks engagement so the shortcut\n   * follows the chart the user last touched, and defers to text editing.\n   */ _wireKeyboard() {\n        if (this._keydownTarget) return;\n        const el = /** @type {any} */ this.ctx.el;\n        const doc = el && el.ownerDocument;\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser() || !doc) return;\n        doc.addEventListener(\"keydown\", this._onKeyDown);\n        doc.addEventListener(\"pointerdown\", this._onPointerDown, true);\n        doc.addEventListener(\"mousedown\", this._onPointerDown, true);\n        this._keydownTarget = doc;\n        this._pointerTarget = doc;\n    }\n    _unwireKeyboard() {\n        if (this._keydownTarget) {\n            this._keydownTarget.removeEventListener(\"keydown\", this._onKeyDown);\n            this._keydownTarget = null;\n        }\n        if (this._pointerTarget) {\n            this._pointerTarget.removeEventListener(\"pointerdown\", this._onPointerDown, true);\n            this._pointerTarget.removeEventListener(\"mousedown\", this._onPointerDown, true);\n            this._pointerTarget = null;\n        }\n        this._engaged = false;\n    }\n    // ─── Event handlers ─────────────────────────────────────────────────────\n    _onMounted() {\n        this._syncConfig();\n        if (!this.enabled) return;\n        if (this.stack.length === 0) this._commit(\"initial\", true);\n    }\n    _onUpdated() {\n        this._syncConfig();\n        if (!this.enabled) return;\n        if (this.applying) {\n            this._refreshSettle();\n            return;\n        }\n        this._schedule(\"update\");\n    }\n    _onSelection() {\n        if (!this.enabled || this.applying) return;\n        this._schedule(\"selection\");\n    }\n    /**\n   * Mark whether the chart is engaged: a capture-phase pointerdown inside `el`\n   * engages it (runs before feature handlers stopPropagation), one elsewhere\n   * releases it. Capture phase so an annotation/zoom gesture that stops\n   * propagation still registers.\n   * @param {any} e\n   */ _onPointerDown(e2) {\n        const el = /** @type {any} */ this.ctx.el;\n        this._engaged = !!(el && e2.target && el.contains(e2.target));\n    }\n    /**\n   * @param {KeyboardEvent} e\n   */ _onKeyDown(e2) {\n        if (!(e2.metaKey || e2.ctrlKey)) return;\n        const key = (e2.key || \"\").toLowerCase();\n        if (key !== \"z\" && key !== \"y\") return;\n        const el = /** @type {any} */ this.ctx.el;\n        if (!el) return;\n        const doc = el.ownerDocument;\n        const active = doc && doc.activeElement;\n        if ($e4b487e979d7c06d$var$isEditableTarget(active)) return;\n        if (!(el.contains(active) || this._engaged)) return;\n        const redo = key === \"y\" || e2.shiftKey;\n        e2.preventDefault();\n        if (redo) this.redo();\n        else this.undo();\n    }\n    // ─── Capture (coalesced) ────────────────────────────────────────────────\n    /**\n   * @param {string} label\n   */ _schedule(label) {\n        if (this.applying || this._batching || !this.enabled) return;\n        this._pendingLabel = label;\n        if (this.coalesceMs > 0 && $e4b487e979d7c06d$var$Environment.isBrowser()) {\n            clearTimeout(this._coalesceTimer);\n            this._coalesceTimer = setTimeout(()=>this._commit(this._pendingLabel), this.coalesceMs);\n        } else this._commit(label);\n    }\n    /**\n   * @param {string} [label]\n   * @param {boolean} [force] bypass the applying/batching guard (baseline / transaction)\n   */ _commit(label, force) {\n        clearTimeout(this._coalesceTimer);\n        this._coalesceTimer = null;\n        if (!force && (this.applying || this._batching)) return;\n        const cp = this._capture(label);\n        const current = this.stack[this.pointer];\n        if (current && current.sig === cp.sig) return;\n        if (this.pointer < this.stack.length - 1) this.stack.splice(this.pointer + 1);\n        this.stack.push(cp);\n        this.pointer = this.stack.length - 1;\n        while(this.stack.length > this.maxDepth){\n            this.stack.shift();\n            this.pointer--;\n        }\n        this._emitChange();\n    }\n    /**\n   * @param {string} [label]\n   */ _capture(label) {\n        const view = $e4b487e979d7c06d$var$captureViewState(this.w, this.ctx);\n        const { config: config, seriesSig: seriesSig } = this._cloneConfigCOW();\n        return {\n            id: `hist-${++this._counter}`,\n            view: view,\n            config: config,\n            seriesSig: seriesSig,\n            label: label || \"change\",\n            at: $e4b487e979d7c06d$var$Environment.isBrowser() ? Date.now() : 0,\n            origin: \"local\",\n            // reserved for per-user scoping (Live Rooms)\n            sig: this._signature(view, config)\n        };\n    }\n    /**\n   * Clone w.config, sharing the previous checkpoint's cloned series when the\n   * live series CONTENT is unchanged (copy-on-write). Sharing is decided by a\n   * value signature, not reference identity: callers commonly mutate a kept\n   * series array in place and pass the same reference back to updateSeries, and\n   * an identity check would share a stale clone for exactly that case. The\n   * stringify is not extra cost: _signature already serialises the series as\n   * part of dedup.\n   * @returns {{ config: any, seriesSig: string|null }}\n   */ _cloneConfigCOW() {\n        const w2 = this.w;\n        const prev = this.stack[this.pointer];\n        let seriesSig = null;\n        try {\n            seriesSig = JSON.stringify(w2.config.series);\n        } catch (e2) {\n            seriesSig = null;\n        }\n        let cloned;\n        if (prev && seriesSig !== null && prev.seriesSig === seriesSig) {\n            const _a = w2.config, { series: _series } = _a, rest = $e4b487e979d7c06d$var$__objRest(_a, [\n                \"series\"\n            ]);\n            cloned = $e4b487e979d7c06d$var$Utils$1.clone(rest);\n            cloned.series = prev.config.series;\n        } else cloned = $e4b487e979d7c06d$var$Utils$1.clone(w2.config);\n        return {\n            config: cloned,\n            seriesSig: seriesSig\n        };\n    }\n    /**\n   * Data-level signature for dedup. Functions are dropped by JSON (fine: a\n   * checkpoint whose only change is a function reference is not a meaningful\n   * undo step). Runs once per committed checkpoint, not per raw event.\n   * @param {any} view\n   * @param {any} config\n   * @returns {string}\n   */ _signature(view, config) {\n        try {\n            return JSON.stringify(view) + \"|\" + JSON.stringify(config);\n        } catch (e2) {\n            return `nosig-${this._counter}`;\n        }\n    }\n    // ─── Restore ────────────────────────────────────────────────────────────\n    /**\n   * @param {any} cp\n   * @param {boolean} animate\n   */ _restore(cp, animate) {\n        if (!cp) return;\n        this.applying = true;\n        let p2;\n        try {\n            this.ctx.clearAnnotations();\n            p2 = this.ctx.updateOptions($e4b487e979d7c06d$var$Utils$1.clone(cp.config), false, animate, false, false);\n        } catch (e2) {\n            this.applying = false;\n            throw e2;\n        }\n        Promise.resolve(p2).then(()=>{\n            if (this.w.globals.isDestroyed) {\n                this.applying = false;\n                return;\n            }\n            $e4b487e979d7c06d$var$applyViewInteraction(this.ctx, cp.view);\n            this._refreshSettle();\n            this._emitChange();\n        }).catch(()=>{\n            this.applying = false;\n        });\n    }\n    /**\n   * Hold `applying` true until the restore's burst of async 'updated' events\n   * has drained (one macrotask after the last one). Refreshed by _onUpdated.\n   */ _refreshSettle() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) {\n            this.applying = false;\n            return;\n        }\n        clearTimeout(this._settleTimer);\n        this._settleTimer = setTimeout(()=>{\n            this.applying = false;\n        }, 0);\n    }\n    // ─── Public API ─────────────────────────────────────────────────────────\n    /**\n   * Commit a checkpoint of the current state now (a discrete undo step). Used by\n   * callers that mutate `w.config` without going through a full re-render (e.g.\n   * Ink Layer's targeted annotation redraws, which fire no 'updated' event).\n   * No-op when disabled or while a restore is applying.\n   * @param {string} [label]\n   */ snapshot(label) {\n        if (!this.enabled || this.applying) return;\n        this._commit(label || \"change\");\n    }\n    /**\n   * @param {boolean} [animate]\n   */ undo(animate = true) {\n        if (!this.canUndo()) return;\n        this.pointer--;\n        this._restore(this.stack[this.pointer], animate);\n    }\n    /**\n   * @param {boolean} [animate]\n   */ redo(animate = true) {\n        if (!this.canRedo()) return;\n        this.pointer++;\n        this._restore(this.stack[this.pointer], animate);\n    }\n    canUndo() {\n        return this.pointer > 0;\n    }\n    canRedo() {\n        return this.pointer > -1 && this.pointer < this.stack.length - 1;\n    }\n    /**\n   * @param {string} id\n   * @param {boolean} [animate]\n   */ jump(id, animate = true) {\n        const idx = this.stack.findIndex((c2)=>c2.id === id);\n        if (idx === -1 || idx === this.pointer) return;\n        this.pointer = idx;\n        this._restore(this.stack[idx], animate);\n    }\n    /** Clear the history, keeping the current state as the new baseline. */ clear() {\n        clearTimeout(this._coalesceTimer);\n        this._coalesceTimer = null;\n        const current = this.stack[this.pointer];\n        this.stack = current ? [\n            current\n        ] : [];\n        this.pointer = this.stack.length - 1;\n        this._emitChange();\n    }\n    /**\n   * Group multiple edits into a single undo step. `fn` may be async; await your\n   * updateOptions/updateSeries calls inside it so the intermediate 'updated'\n   * events are suppressed and only one checkpoint is committed afterwards.\n   * @param {() => (void | Promise<any>)} fn\n   * @param {{ label?: string }} [opts]\n   * @returns {Promise<void>}\n   */ transaction(fn, opts = {}) {\n        if (typeof fn !== \"function\") return Promise.resolve();\n        const wasBatching = this._batching;\n        this._batching = true;\n        return Promise.resolve().then(()=>fn()).finally(()=>{\n            this._batching = wasBatching;\n            if (!wasBatching) this._commit(opts.label || \"transaction\", true);\n        });\n    }\n    /**\n   * @returns {{ id: string, label: string, at: number }[]}\n   */ entries() {\n        return this.stack.map((c2)=>({\n                id: c2.id,\n                label: c2.label,\n                at: c2.at\n            }));\n    }\n    /** Lightweight state for the historyChange event / a history-rail UI. */ state() {\n        return {\n            canUndo: this.canUndo(),\n            canRedo: this.canRedo(),\n            index: this.pointer,\n            length: this.stack.length\n        };\n    }\n    _emitChange() {\n        this.ctx.events.fireEvent(\"historyChange\", [\n            this.ctx,\n            this.state()\n        ]);\n    }\n    /** Drop the stack + detach listeners (called on full destroy). */ teardown() {\n        var _a, _b, _c, _d, _e, _f, _g, _h;\n        clearTimeout(this._coalesceTimer);\n        clearTimeout(this._settleTimer);\n        this._coalesceTimer = null;\n        this._settleTimer = null;\n        this._unwireKeyboard();\n        if (this._wired) {\n            (_b = (_a = this.ctx).removeEventListener) == null || _b.call(_a, \"mounted\", this._onMounted);\n            (_d = (_c = this.ctx).removeEventListener) == null || _d.call(_c, \"updated\", this._onUpdated);\n            (_f = (_e = this.ctx).removeEventListener) == null || _f.call(_e, \"scrolled\", this._onUpdated);\n            (_h = (_g = this.ctx).removeEventListener) == null || _h.call(_g, \"dataPointSelection\", this._onSelection);\n        }\n        this.stack = [];\n        this.pointer = -1;\n        this._wired = false;\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    history: $e4b487e979d7c06d$var$History\n});\nconst $e4b487e979d7c06d$var$WEAVE_API_VERSION = 1;\nconst $e4b487e979d7c06d$var$PLUGIN_CHART_METHODS = [\n    \"updateOptions\",\n    \"updateSeries\",\n    \"appendData\",\n    \"appendSeries\",\n    \"toggleSeries\",\n    \"showSeries\",\n    \"hideSeries\",\n    \"highlightSeries\",\n    \"isSeriesHidden\",\n    \"zoomX\",\n    \"addXaxisAnnotation\",\n    \"addYaxisAnnotation\",\n    \"addPointAnnotation\",\n    \"clearAnnotations\",\n    \"removeAnnotation\",\n    \"dataURI\",\n    \"exportToCSV\"\n];\nfunction $e4b487e979d7c06d$var$buildBoundPublicMethods(ctx) {\n    const out = {};\n    $e4b487e979d7c06d$var$PLUGIN_CHART_METHODS.forEach((m2)=>{\n        if (typeof ctx[m2] === \"function\") out[m2] = ctx[m2].bind(ctx);\n    });\n    return Object.freeze(out);\n}\nfunction $e4b487e979d7c06d$var$makeLayerHandle(g2, graphics) {\n    const add = (el)=>{\n        if (el) g2.add(el);\n        return el;\n    };\n    const handle = {\n        get node () {\n            return g2.node;\n        },\n        /** @param {any} opts */ path (opts = {}) {\n            const { d: d = \"\", stroke: stroke = \"#000\", width: width = 1, fill: fill = \"none\", opacity: opacity = 1, dash: dash = 0, className: className = \"\" } = opts;\n            return add(graphics.drawPath({\n                d: d,\n                stroke: stroke,\n                strokeWidth: width,\n                fill: fill,\n                fillOpacity: fill === \"none\" ? 0 : opacity,\n                strokeOpacity: opacity,\n                strokeDashArray: dash,\n                classes: className\n            }));\n        },\n        /** @param {any} opts */ line (opts = {}) {\n            const { x1: x1, y1: y1, x2: x2, y2: y2, stroke: stroke = \"#000\", width: width = 1, dash: dash = 0 } = opts;\n            return add(graphics.drawLine(x1, y1, x2, y2, stroke, dash, width));\n        },\n        /** @param {any} opts */ rect (opts = {}) {\n            const { x: x = 0, y: y = 0, w: w2 = 0, h: h2 = 0, r: r2 = 0, fill: fill = \"#000\", stroke: stroke = null, opacity: opacity = 1 } = opts;\n            return add(graphics.drawRect(x, y, w2, h2, r2, fill, opacity, stroke != null ? 1 : null, stroke));\n        },\n        /** @param {any} opts */ circle (opts = {}) {\n            const { cx: cx = 0, cy: cy = 0, r: r2 = 0, fill: fill = \"#000\", stroke: stroke = null } = opts;\n            return add(graphics.drawCircle(r2, {\n                cx: cx,\n                cy: cy,\n                fill: fill,\n                stroke: stroke || \"none\"\n            }));\n        },\n        /** @param {any} opts */ text (opts = {}) {\n            const { x: x = 0, y: y = 0, text: text = \"\", color: color, size: size, anchor: anchor = \"start\", weight: weight } = opts;\n            return add(graphics.drawText({\n                x: x,\n                y: y,\n                text: text,\n                textAnchor: anchor,\n                fontSize: size,\n                foreColor: color,\n                fontWeight: weight\n            }));\n        },\n        clear () {\n            const node = g2.node;\n            while(node.firstChild)node.removeChild(node.firstChild);\n            return handle;\n        }\n    };\n    return handle;\n}\nfunction $e4b487e979d7c06d$var$buildPluginAPI(host, record) {\n    const ctx = host.ctx;\n    const w2 = host.w;\n    const api = {\n        name: record.def.name,\n        version: $e4b487e979d7c06d$var$WEAVE_API_VERSION,\n        // Live: reconcile refreshes record.options when the chart's plugins config\n        // changes, so updateOptions({ plugins: [{ name, options }] }) reconfigures\n        // an active plugin in place. The returned object is frozen.\n        get options () {\n            return record.options;\n        },\n        // ── lifecycle subscription ──\n        /**\n     * @param {string} hook\n     * @param {Function} fn\n     */ on (hook, fn) {\n            const m2 = record.handlers;\n            if (!m2.has(hook)) m2.set(hook, []);\n            m2.get(hook).push(fn);\n            return api;\n        },\n        /**\n     * @param {string} hook\n     * @param {Function} fn\n     */ off (hook, fn) {\n            const a2 = record.handlers.get(hook);\n            if (a2) {\n                const i2 = a2.indexOf(fn);\n                if (i2 > -1) a2.splice(i2, 1);\n            }\n            return api;\n        },\n        // ── per-plugin, per-chart scratch state (survives updates, dropped on\n        //    destroy). The api object is frozen, but this object is mutable. ──\n        store: {},\n        // ── drawing (renderer-agnostic) ──\n        // Call this INSIDE each draw handler: the host wipes plugin layers at the\n        // start of every draw pass, so a handle cached across draws points at a\n        // detached node and its writes vanish silently.\n        /** @param {any} [opts] */ layer (opts) {\n            return host._layer(record.def.name, opts || {});\n        },\n        // ── reads ──\n        get scales () {\n            return host._currentScales;\n        },\n        // Served from the per-dispatch snapshot when one exists (invalidated at\n        // every dispatch), so reading api.data in a loop does not rebuild the\n        // point arrays on each property access.\n        get data () {\n            return host._lastData || (host._lastData = host._dataSnapshot());\n        },\n        theme: Object.freeze({\n            get mode () {\n                return w2.config.theme.mode;\n            },\n            get foreColor () {\n                return w2.config.chart.foreColor;\n            },\n            /** @param {number} i */ seriesColor (i2) {\n                return w2.globals.colors[i2];\n            },\n            /** @param {string} name */ token (name2) {\n                return host._token(name2);\n            }\n        }),\n        // ── curated actions (bound public methods only; NEVER raw w) ──\n        chart: $e4b487e979d7c06d$var$buildBoundPublicMethods(ctx),\n        // ── custom events out to the host app ──\n        /**\n     * Fires as `plugin:<pluginName>:<name>` on the chart's event bus. The\n     * namespace is not optional: the bus also carries the internal lifecycle\n     * events ('updated', 'mounted', ...), and an un-namespaced emit could\n     * trigger every internal subscriber (history capture, re-render hooks).\n     * Listen with chart.addEventListener('plugin:myplugin:myevent', fn).\n     * @param {string} name\n     * @param {any} [detail]\n     */ emit (name2, detail) {\n            ctx.events.fireEvent(`plugin:${record.def.name}:${name2}`, [\n                ctx,\n                detail\n            ]);\n        },\n        // ── host element (read; lazy: baseEl is not set until render) ──\n        get el () {\n            return w2.dom.baseEl;\n        }\n    };\n    return Object.freeze(api);\n}\nclass $e4b487e979d7c06d$var$WeaveHost {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.active = [];\n        this._layers = /* @__PURE__ */ new Map();\n        this._currentScales = null;\n        this._lastPluginsRef = null;\n        this._lastData = null;\n        this._updatedWired = false;\n        this._onUpdated = this._onUpdated.bind(this);\n        this._init();\n    }\n    _init() {\n        const list = this.w.config.plugins || [];\n        list.map((entry, i2)=>({\n                entry: entry,\n                order: entry.order != null ? entry.order : i2\n            })).sort((a2, b2)=>a2.order - b2.order).forEach((o2)=>this._activate(o2.entry));\n        this._lastPluginsRef = this.w.config.plugins;\n        this._wireUpdated();\n    }\n    _wireUpdated() {\n        if (this._updatedWired) return;\n        this.ctx.addEventListener(\"updated\", this._onUpdated);\n        this._updatedWired = true;\n    }\n    _onUpdated() {\n        this.dispatch(\"afterUpdate\", {\n            pass: \"update\"\n        });\n    }\n    /**\n   * @param {any} entry { name, options?, order? }\n   */ _activate(entry) {\n        const def = $e4b487e979d7c06d$var$getPlugin(entry.name);\n        if (!def) {\n            console.error(`[apexcharts] plugin \"${entry.name}\" is not registered.`);\n            return;\n        }\n        const v2 = def.apiVersion != null ? def.apiVersion : 1;\n        if (Math.trunc(v2) !== $e4b487e979d7c06d$var$WEAVE_API_VERSION) {\n            console.error(`[apexcharts] plugin \"${def.name}\" targets Weave API v${v2}, host is v${$e4b487e979d7c06d$var$WEAVE_API_VERSION}; skipped.`);\n            return;\n        }\n        const record = {\n            def: def,\n            options: Object.freeze($e4b487e979d7c06d$var$__spreadValues({}, entry.options || {})),\n            handlers: /* @__PURE__ */ new Map(),\n            disabled: false,\n            failures: 0,\n            api: null\n        };\n        record.api = $e4b487e979d7c06d$var$buildPluginAPI(this, record);\n        this.active.push(record);\n        this._guard(record, \"setup\", ()=>def.setup(record.api));\n    }\n    /**\n   * @param {string} hook\n   * @param {{ pass?: string, xyRatios?: any }} [extra]\n   */ dispatch(hook, extra) {\n        if (hook === \"draw\") {\n            this._reconcile();\n            this._resetLayers();\n        }\n        this._lastData = null;\n        if (!this.active.length) return;\n        if (hook === \"afterParse\") this._currentScales = null;\n        else if (extra && \"xyRatios\" in extra) this._setScales(extra.xyRatios);\n        const pass = extra && extra.pass || \"full\";\n        let data = null;\n        for (const record of this.active){\n            if (record.disabled) continue;\n            const fns = record.handlers.get(hook);\n            if (!fns || !fns.length) continue;\n            if (data === null) {\n                data = this._dataSnapshot();\n                this._lastData = data;\n            }\n            const payload = {\n                api: record.api,\n                scales: this._currentScales,\n                data: data,\n                pass: pass,\n                hook: hook\n            };\n            for (const fn of fns.slice())this._guard(record, hook, ()=>fn(payload));\n        }\n    }\n    /**\n   * @param {any} record\n   * @param {string} where\n   * @param {Function} fn\n   */ _guard(record, where, fn) {\n        if (record.disabled) return;\n        try {\n            fn();\n        } catch (e2) {\n            console.error(`[apexcharts] plugin \"${record.def.name}\" threw in \"${where}\":`, e2);\n            record.failures = (record.failures || 0) + 1;\n            if (record.failures >= 3) {\n                record.disabled = true;\n                console.error(`[apexcharts] plugin \"${record.def.name}\" disabled after repeated errors.`);\n            }\n        }\n    }\n    // ─── Scales facade ──────────────────────────────────────────────────────\n    /**\n   * Build api.scales from the SAME xyRatios the series were drawn with, so\n   * plugin pixels align with series pixels by construction.\n   * @param {any} xyRatios\n   */ _setScales(xyRatios) {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const L2 = w2.layout;\n        if (!xyRatios || !gl.axisCharts) {\n            this._currentScales = null;\n            return;\n        }\n        const xRatio = xyRatios.xRatio;\n        const yRatio = xyRatios.yRatio || [];\n        const yr = (axis)=>yRatio[axis] != null ? yRatio[axis] : yRatio[0];\n        const maxY = (axis)=>gl.maxYArr[axis] != null ? gl.maxYArr[axis] : gl.maxY;\n        const minY = (axis)=>gl.minYArr[axis] != null ? gl.minYArr[axis] : gl.minY;\n        this._currentScales = {\n            /** @param {number} v */ x: (v2)=>L2.translateX + (v2 - gl.minX) / xRatio,\n            /**\n       * @param {number} v\n       * @param {number} [axis]\n       */ y: (v2, axis = 0)=>L2.translateY + (maxY(axis) - v2) / yr(axis),\n            domainX: [\n                gl.minX,\n                gl.maxX\n            ],\n            /** @param {number} [axis] */ domainY: (axis = 0)=>[\n                    minY(axis),\n                    maxY(axis)\n                ],\n            gridWidth: L2.gridWidth,\n            gridHeight: L2.gridHeight,\n            ratios: xyRatios\n        };\n    }\n    // ─── Read-only data snapshot ────────────────────────────────────────────\n    /**\n   * @returns {any[]} defensive per-series snapshot (never the live slice)\n   */ _dataSnapshot() {\n        const w2 = this.w;\n        const gl = w2.globals;\n        const series = w2.seriesData.series || [];\n        const seriesX = w2.seriesData.seriesX || [];\n        return series.map((sData, i2)=>{\n            const xs = seriesX[i2] || [];\n            const points = (sData || []).map((y, j)=>({\n                    x: xs[j] != null ? xs[j] : j,\n                    y: y\n                }));\n            return {\n                name: gl.seriesNames ? gl.seriesNames[i2] : void 0,\n                hidden: (gl.collapsedSeriesIndices || []).includes(i2),\n                color: gl.colors ? gl.colors[i2] : void 0,\n                points: points\n            };\n        });\n    }\n    // ─── Theme tokens ───────────────────────────────────────────────────────\n    /**\n   * @param {string} name\n   * @returns {any}\n   */ _token(name2) {\n        const w2 = this.w;\n        const gl = w2.globals;\n        switch(name2){\n            case \"foreColor\":\n                return w2.config.chart.foreColor;\n            case \"background\":\n                return w2.config.chart.background;\n            case \"accent\":\n            case \"primary\":\n                return gl.colors ? gl.colors[0] : void 0;\n            default:\n                if (/^series-\\d+$/.test(name2)) return gl.colors ? gl.colors[Number(name2.split(\"-\")[1])] : void 0;\n                return void 0;\n        }\n    }\n    // ─── Layers ─────────────────────────────────────────────────────────────\n    /**\n   * @param {string} name\n   * @param {{ z?: 'front'|'behind', className?: string }} opts\n   */ _layer(name2, { z: z = \"front\", className: className = \"\" } = {}) {\n        let g2 = this._layers.get(name2);\n        if (!g2) {\n            g2 = this.ctx.graphics.group({\n                class: `apexcharts-plugin-${name2} ${className}`.trim()\n            });\n            const parent = this.w.dom.elGraphical.node;\n            if (z === \"behind\") parent.insertBefore(g2.node, parent.firstChild);\n            else parent.appendChild(g2.node);\n            g2.node.setAttribute(\"aria-hidden\", \"true\");\n            this._layers.set(name2, g2);\n        }\n        return $e4b487e979d7c06d$var$makeLayerHandle(g2, this.ctx.graphics);\n    }\n    /**\n   * Remove all plugin layers. Run at the start of every `draw` because\n   * fastUpdate only removes series/data-label groups (not arbitrary plugin\n   * groups), so without this, fast-path redraws would duplicate plugin output.\n   */ _resetLayers() {\n        const el = this.w.dom.elGraphical;\n        const parent = el && el.node;\n        if (parent) {\n            const groups = parent.querySelectorAll('g[class*=\"apexcharts-plugin-\"]');\n            Array.prototype.forEach.call(groups, (n2)=>n2.remove());\n        }\n        this._layers.clear();\n    }\n    // ─── Config-change reconciliation ───────────────────────────────────────\n    /**\n   * Diff w.config.plugins by name: teardown removed, activate added; unchanged\n   * plugins keep their instance + store, but their `options` are refreshed from\n   * the new entry (api.options is a live getter), so\n   * updateOptions({ plugins: [{ name, options }] }) reconfigures in place.\n   * Skipped when the plugins array reference is unchanged (fast redraws), so it\n   * costs nothing on hover.\n   */ _reconcile() {\n        const plugins = this.w.config.plugins || [];\n        if (plugins === this._lastPluginsRef) return;\n        this._lastPluginsRef = plugins;\n        const desired = new Map(plugins.map((e2, i2)=>[\n                e2.name,\n                {\n                    entry: e2,\n                    order: e2.order != null ? e2.order : i2\n                }\n            ]));\n        for(let i2 = this.active.length - 1; i2 >= 0; i2--){\n            const r2 = this.active[i2];\n            const want = desired.get(r2.def.name);\n            if (!want) {\n                this._guard(r2, \"destroy\", ()=>r2.def.destroy && r2.def.destroy(r2.api));\n                this.active.splice(i2, 1);\n            } else r2.options = Object.freeze($e4b487e979d7c06d$var$__spreadValues({}, want.entry.options || {}));\n        }\n        const activeNames = new Set(this.active.map((r2)=>r2.def.name));\n        const toAdd = [];\n        desired.forEach((v2, name2)=>{\n            if (!activeNames.has(name2)) toAdd.push(v2);\n        });\n        toAdd.sort((a2, b2)=>a2.order - b2.order).forEach((v2)=>this._activate(v2.entry));\n    }\n    /**\n   * @param {boolean} [isUpdating]\n   */ teardown(isUpdating) {\n        if (!isUpdating) {\n            this.dispatch(\"destroy\");\n            for (const record of this.active)this._guard(record, \"destroy\", ()=>record.def.destroy && record.def.destroy(record.api));\n            this.active = [];\n            if (this._updatedWired) {\n                this.ctx.removeEventListener && this.ctx.removeEventListener(\"updated\", this._onUpdated);\n                this._updatedWired = false;\n            }\n        }\n        this._layers.clear();\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    weave: $e4b487e979d7c06d$var$WeaveHost\n});\nconst $e4b487e979d7c06d$var$STYLE_KEYS = {\n    fill: \"fill\",\n    stroke: \"stroke\",\n    \"stroke-width\": \"strokeWidth\",\n    \"stroke-dasharray\": \"strokeDash\",\n    \"stroke-linecap\": \"lineCap\",\n    \"fill-opacity\": \"fillOpacity\",\n    \"stroke-opacity\": \"strokeOpacity\",\n    \"fill-rule\": \"fillRule\"\n};\nconst $e4b487e979d7c06d$var$NEVER = Symbol(\"never\");\nconst $e4b487e979d7c06d$var$SHAPE_ID = {\n    circle: 0,\n    square: 1,\n    rect: 1,\n    triangle: 2,\n    diamond: 3,\n    star: 4,\n    sparkle: 5,\n    cross: 6,\n    plus: 7,\n    line: 8\n};\nconst $e4b487e979d7c06d$var$SHAPE_NAME = [\n    \"circle\",\n    \"square\",\n    \"triangle\",\n    \"diamond\",\n    \"star\",\n    \"sparkle\",\n    \"cross\",\n    \"plus\",\n    \"line\"\n];\nconst $e4b487e979d7c06d$var$NOOP_RUNNER = {\n    /** @returns {any} */ attr () {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    },\n    plot () {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    },\n    during () {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    },\n    after (fn) {\n        if (typeof fn === \"function\") fn();\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    },\n    animate () {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    },\n    delay () {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    },\n    loop () {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    },\n    finish () {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    },\n    stop () {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    }\n};\nconst $e4b487e979d7c06d$var$SHARED_MARKER_NODE = {\n    nodeName: \"path\",\n    style: {},\n    classList: {\n        add () {},\n        remove () {},\n        toggle () {},\n        contains: ()=>false\n    },\n    setAttribute () {},\n    getAttribute: ()=>null,\n    removeAttribute () {},\n    hasAttribute: ()=>false,\n    addEventListener () {},\n    removeEventListener () {},\n    appendChild () {},\n    getBBox: ()=>({\n            x: 0,\n            y: 0,\n            width: 0,\n            height: 0\n        })\n};\nconst $e4b487e979d7c06d$var$SHARED_GROUP = {\n    __isCanvasMark: true,\n    node: {\n        nodeName: \"g\",\n        instance: null,\n        style: {},\n        classList: {\n            add () {},\n            remove () {},\n            toggle () {},\n            contains: ()=>false\n        },\n        setAttribute () {},\n        getAttribute: ()=>null,\n        removeAttribute () {},\n        addEventListener () {},\n        removeEventListener () {},\n        appendChild () {},\n        getBBox: ()=>({\n                x: 0,\n                y: 0,\n                width: 0,\n                height: 0\n            })\n    },\n    /** @returns {any} */ attr () {\n        return $e4b487e979d7c06d$var$SHARED_GROUP;\n    },\n    add () {\n        return $e4b487e979d7c06d$var$SHARED_GROUP;\n    },\n    addTo () {\n        return $e4b487e979d7c06d$var$SHARED_GROUP;\n    },\n    remove () {\n        return $e4b487e979d7c06d$var$SHARED_GROUP;\n    },\n    clear () {\n        return $e4b487e979d7c06d$var$SHARED_GROUP;\n    },\n    css () {\n        return $e4b487e979d7c06d$var$SHARED_GROUP;\n    },\n    hide () {\n        return $e4b487e979d7c06d$var$SHARED_GROUP;\n    },\n    show () {\n        return $e4b487e979d7c06d$var$SHARED_GROUP;\n    },\n    removeClass () {\n        return $e4b487e979d7c06d$var$SHARED_GROUP;\n    },\n    animate () {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    }\n};\nclass $e4b487e979d7c06d$var$CanvasMarkerRef {\n    /**\n   * @param {CanvasGraphics} g\n   * @param {number} i\n   */ constructor(g2, i2){\n        this.__isCanvasMark = true;\n        this._g = g2;\n        this._i = i2;\n    }\n    get node() {\n        return $e4b487e979d7c06d$var$SHARED_MARKER_NODE;\n    }\n    /**\n   * @param {any} a\n   * @param {any} [v]\n   * @returns {any}\n   */ attr(a2, v2) {\n        if (typeof a2 === \"string\") {\n            if (a2 === \"fill\" && v2 !== void 0) this._g._setMarkerFill(this._i, v2);\n            return v2 === void 0 ? null : this;\n        }\n        if (a2 && a2.fill !== void 0) this._g._setMarkerFill(this._i, a2.fill);\n        return this;\n    }\n    /** @param {any} _c */ add(_c) {\n        return this;\n    }\n    /** @param {any} _p */ addTo(_p) {\n        return this;\n    }\n    remove() {\n        return this;\n    }\n    /** @param {any} _s */ css(_s) {\n        return this;\n    }\n    /** @param {any} _v */ fill(_v) {\n        if (_v !== void 0) this._g._setMarkerFill(this._i, _v);\n        return this;\n    }\n    /** @param {any} _v */ stroke(_v) {\n        return this;\n    }\n    hide() {\n        return this;\n    }\n    show() {\n        return this;\n    }\n    /** @param {string} _c */ removeClass(_c) {\n        return this;\n    }\n    animate() {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    }\n}\nconst $e4b487e979d7c06d$var$SHARED_RECT_REF = {\n    __isCanvasMark: true,\n    node: $e4b487e979d7c06d$var$SHARED_MARKER_NODE,\n    /** @returns {any} */ attr () {\n        return $e4b487e979d7c06d$var$SHARED_RECT_REF;\n    },\n    add () {\n        return $e4b487e979d7c06d$var$SHARED_RECT_REF;\n    },\n    addTo () {\n        return $e4b487e979d7c06d$var$SHARED_RECT_REF;\n    },\n    remove () {\n        return $e4b487e979d7c06d$var$SHARED_RECT_REF;\n    },\n    /** @returns {any} */ css () {\n        return $e4b487e979d7c06d$var$SHARED_RECT_REF;\n    },\n    animate () {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    }\n};\nclass $e4b487e979d7c06d$var$CanvasMark {\n    /** @param {any} cmd */ constructor(cmd){\n        this.__isCanvasMark = true;\n        this._cmd = cmd;\n        const self = this;\n        this.node = {\n            nodeName: cmd ? cmd.tag : \"g\",\n            instance: this,\n            style: {},\n            classList: {\n                add () {},\n                remove () {},\n                toggle () {},\n                contains: ()=>false\n            },\n            /** @param {string} k @param {any} v */ setAttribute (k, v2) {\n                self._applyAttr(k, v2);\n            },\n            getAttribute: ()=>null,\n            removeAttribute () {},\n            hasAttribute: ()=>false,\n            addEventListener () {},\n            removeEventListener () {},\n            appendChild () {},\n            getBBox: ()=>({\n                    x: 0,\n                    y: 0,\n                    width: 0,\n                    height: 0\n                })\n        };\n    }\n    /**\n   * @param {string} k\n   * @param {any} v\n   */ _applyAttr(k, v2) {\n        const cmd = this._cmd;\n        if (!cmd) return;\n        const sk = $e4b487e979d7c06d$var$STYLE_KEYS[k];\n        if (sk !== void 0) cmd[sk] = v2;\n    }\n    /**\n   * @param {any} a\n   * @param {any} [v]\n   * @returns {any}\n   */ attr(a2, v2) {\n        if (typeof a2 === \"string\") {\n            if (v2 === void 0) return null;\n            this._applyAttr(a2, v2);\n            return this;\n        }\n        for(const k in a2)if (a2[k] !== void 0) this._applyAttr(k, a2[k]);\n        return this;\n    }\n    /** @param {any} _c */ add(_c) {\n        return this;\n    }\n    /** @param {any} _p */ addTo(_p) {\n        return this;\n    }\n    remove() {\n        return this;\n    }\n    clear() {\n        return this;\n    }\n    /** @param {any} _s */ css(_s) {\n        return this;\n    }\n    /** @param {any} v */ fill(v2) {\n        if (typeof v2 === \"object\") return this.attr(v2);\n        return this.attr(\"fill\", v2);\n    }\n    /** @param {any} v */ stroke(v2) {\n        if (typeof v2 === \"object\") {\n            if (v2.color !== void 0) this.attr(\"stroke\", v2.color);\n            if (v2.width !== void 0) this.attr(\"stroke-width\", v2.width);\n            return this;\n        }\n        return this.attr(\"stroke\", v2);\n    }\n    /** @param {string} d */ plot(d) {\n        if (typeof d === \"string\" && this._cmd && this._cmd.tag === \"path\") this._cmd.d = d;\n        return this;\n    }\n    hide() {\n        return this;\n    }\n    show() {\n        return this;\n    }\n    /** @param {string} _c */ removeClass(_c) {\n        return this;\n    }\n    bbox() {\n        return {\n            x: 0,\n            y: 0,\n            width: 0,\n            height: 0\n        };\n    }\n    animate() {\n        return $e4b487e979d7c06d$var$NOOP_RUNNER;\n    }\n}\nclass $e4b487e979d7c06d$var$CanvasGraphics {\n    /** @param {any} w */ constructor(w2){\n        this.w = w2;\n        this._g = new $e4b487e979d7c06d$var$Graphics(w2);\n        this._list = [];\n        this._mx = new Float64Array(16);\n        this._my = new Float64Array(16);\n        this._msize = new Float64Array(16);\n        this._mshape = new Int16Array(16);\n        this._mstyle = new Int32Array(16);\n        this._msi = new Int32Array(16);\n        this._mn = 0;\n        this._mcap = 16;\n        this._crx = new Float64Array(16);\n        this._cry = new Float64Array(16);\n        this._crw = new Float64Array(16);\n        this._crh = new Float64Array(16);\n        this._crstyle = new Int32Array(16);\n        this._crsi = new Int32Array(16);\n        this._crdi = new Int32Array(16);\n        this._crn = 0;\n        this._crcap = 16;\n        this._cellRadius = 0;\n        this._styles = [];\n        this._styleMap = /* @__PURE__ */ new Map();\n        this._lf = $e4b487e979d7c06d$var$NEVER;\n        this._ls = $e4b487e979d7c06d$var$NEVER;\n        this._lsw = $e4b487e979d7c06d$var$NEVER;\n        this._ld = $e4b487e979d7c06d$var$NEVER;\n        this._lfo = $e4b487e979d7c06d$var$NEVER;\n        this._lso = $e4b487e979d7c06d$var$NEVER;\n        this._lid = -1;\n        this._lofFill = $e4b487e979d7c06d$var$NEVER;\n        this._lofBase = -1;\n        this._lofId = -1;\n        this._rlf = $e4b487e979d7c06d$var$NEVER;\n        this._rls = $e4b487e979d7c06d$var$NEVER;\n        this._rlsw = $e4b487e979d7c06d$var$NEVER;\n        this._rlfo = $e4b487e979d7c06d$var$NEVER;\n        this._rlso = $e4b487e979d7c06d$var$NEVER;\n        this._rlid = -1;\n    }\n    _resetStyleCache() {\n        this._lf = $e4b487e979d7c06d$var$NEVER;\n        this._ls = $e4b487e979d7c06d$var$NEVER;\n        this._lsw = $e4b487e979d7c06d$var$NEVER;\n        this._ld = $e4b487e979d7c06d$var$NEVER;\n        this._lfo = $e4b487e979d7c06d$var$NEVER;\n        this._lso = $e4b487e979d7c06d$var$NEVER;\n        this._lid = -1;\n        this._lofFill = $e4b487e979d7c06d$var$NEVER;\n        this._lofBase = -1;\n        this._lofId = -1;\n        this._rlf = $e4b487e979d7c06d$var$NEVER;\n        this._rls = $e4b487e979d7c06d$var$NEVER;\n        this._rlsw = $e4b487e979d7c06d$var$NEVER;\n        this._rlfo = $e4b487e979d7c06d$var$NEVER;\n        this._rlso = $e4b487e979d7c06d$var$NEVER;\n        this._rlid = -1;\n    }\n    /** Start a fresh scene (columnar marker store + object-command list). */ reset() {\n        this._list = [];\n        this._mn = 0;\n        this._styles = [];\n        this._styleMap = /* @__PURE__ */ new Map();\n        this._resetStyleCache();\n        const series = this.w.config.series || [];\n        let cap = 16;\n        for(let i2 = 0; i2 < series.length; i2++){\n            const d = series[i2] && series[i2].data;\n            if (Array.isArray(d)) cap += d.length;\n        }\n        cap = Math.ceil(cap * 1.15) + 16;\n        if (cap > this._mcap) this._allocMarkers(cap);\n        this._crn = 0;\n        this._cellRadius = 0;\n        if (cap > this._crcap) this._allocRects(cap);\n    }\n    /** @param {number} cap */ _allocRects(cap) {\n        this._crcap = cap;\n        this._crx = new Float64Array(cap);\n        this._cry = new Float64Array(cap);\n        this._crw = new Float64Array(cap);\n        this._crh = new Float64Array(cap);\n        this._crstyle = new Int32Array(cap);\n        this._crsi = new Int32Array(cap);\n        this._crdi = new Int32Array(cap);\n    }\n    /** Grow the rect columns (rare: capacity estimate was low). */ _growRects() {\n        const cap = this._crcap * 2;\n        const nx = new Float64Array(cap);\n        nx.set(this._crx);\n        this._crx = nx;\n        const ny = new Float64Array(cap);\n        ny.set(this._cry);\n        this._cry = ny;\n        const nw = new Float64Array(cap);\n        nw.set(this._crw);\n        this._crw = nw;\n        const nh = new Float64Array(cap);\n        nh.set(this._crh);\n        this._crh = nh;\n        const nst = new Int32Array(cap);\n        nst.set(this._crstyle);\n        this._crstyle = nst;\n        const nsi = new Int32Array(cap);\n        nsi.set(this._crsi);\n        this._crsi = nsi;\n        const ndi = new Int32Array(cap);\n        ndi.set(this._crdi);\n        this._crdi = ndi;\n        this._crcap = cap;\n    }\n    /** @param {number} cap */ _allocMarkers(cap) {\n        this._mcap = cap;\n        this._mx = new Float64Array(cap);\n        this._my = new Float64Array(cap);\n        this._msize = new Float64Array(cap);\n        this._mshape = new Int16Array(cap);\n        this._mstyle = new Int32Array(cap);\n        this._msi = new Int32Array(cap);\n    }\n    /** Grow the marker columns (rare: capacity estimate was low). */ _growMarkers() {\n        const cap = this._mcap * 2;\n        const nx = new Float64Array(cap);\n        nx.set(this._mx);\n        this._mx = nx;\n        const ny = new Float64Array(cap);\n        ny.set(this._my);\n        this._my = ny;\n        const ns = new Float64Array(cap);\n        ns.set(this._msize);\n        this._msize = ns;\n        const nsh = new Int16Array(cap);\n        nsh.set(this._mshape);\n        this._mshape = nsh;\n        const nst = new Int32Array(cap);\n        nst.set(this._mstyle);\n        this._mstyle = nst;\n        const nsi = new Int32Array(cap);\n        nsi.set(this._msi);\n        this._msi = nsi;\n        this._mcap = cap;\n    }\n    displayList() {\n        return this._list;\n    }\n    markerCount() {\n        return this._mn;\n    }\n    /**\n   * Intern a marker style; returns its palette id. Keeps the per-point columns\n   * numeric (no retained per-point object).\n   * @param {any} fill @param {any} stroke @param {any} sw @param {any} dash\n   * @param {any} fo @param {any} so\n   * @returns {number}\n   */ _internStyle(fill, stroke, sw, dash, fo, so) {\n        const key = `${fill}|${stroke}|${sw}|${dash}|${fo}|${so}`;\n        const cached = this._styleMap.get(key);\n        if (cached !== void 0) return cached;\n        const id = this._styles.length;\n        this._styles.push({\n            fill: fill,\n            stroke: stroke,\n            strokeWidth: sw,\n            strokeDash: dash,\n            fillOpacity: fo,\n            strokeOpacity: so\n        });\n        this._styleMap.set(key, id);\n        return id;\n    }\n    /**\n   * Override a recorded marker's fill (scatter sets a per-point fill via `attr`\n   * right after drawMarker). Like the draw path, the string-key intern is cached\n   * on (base style, fill) so the Map/string work stays OFF the per-point path\n   * (it otherwise mixes with the `_mstyle[i]` typed-array write → the ~80× slow\n   * path). For a scatter series the base + fill are uniform, so it interns once.\n   * @param {number} i @param {any} fill\n   */ _setMarkerFill(i2, fill) {\n        const base = this._mstyle[i2];\n        if (fill === this._lofFill && base === this._lofBase) {\n            this._mstyle[i2] = this._lofId;\n            return;\n        }\n        const s2 = this._styles[base];\n        if (!s2 || s2.fill === fill) {\n            this._lofFill = fill;\n            this._lofBase = base;\n            this._lofId = base;\n            return;\n        }\n        const id = this._internStyle(fill, s2.stroke, s2.strokeWidth, s2.strokeDash, s2.fillOpacity, s2.strokeOpacity);\n        this._mstyle[i2] = id;\n        this._lofFill = fill;\n        this._lofBase = base;\n        this._lofId = id;\n    }\n    /** @param {number} i @returns {any} the style object for a marker index */ markerStyle(i2) {\n        return this._styles[this._mstyle[i2]];\n    }\n    /** @param {number} i @returns {number} series (realIndex) of a marker, -1 if none */ markerSeries(i2) {\n        return this._msi[i2];\n    }\n    /** @param {number} id @returns {string} */ shapeName(id) {\n        return $e4b487e979d7c06d$var$SHAPE_NAME[id] || \"circle\";\n    }\n    // ── columnar rect cell (heatmap): parallel unboxed arrays, no per-cell object ──\n    /**\n   * Record a heatmap-style cell (a filled, optionally stroked rect). Geometry\n   * and style are captured up front into the columns; the returned handle is a\n   * shared no-op (the emit site sets nothing back on it in canvas mode).\n   * @param {number} x @param {number} y @param {number} w @param {number} h\n   * @param {any} opts {fill, fillOpacity, stroke, strokeWidth, radius, seriesIndex, dataPointIndex}\n   * @returns {any}\n   */ drawRectCell(x, y, w2, h2, opts = {}) {\n        const styleId = this._rectStyleId(opts);\n        if (this._crn >= this._crcap) this._growRects();\n        const i2 = this._crn++;\n        this._crx[i2] = x || 0;\n        this._cry[i2] = y || 0;\n        this._crw[i2] = w2 > 0 ? w2 : 0;\n        this._crh[i2] = h2 > 0 ? h2 : 0;\n        this._crstyle[i2] = styleId;\n        this._crsi[i2] = opts.seriesIndex == null ? -1 : opts.seriesIndex;\n        this._crdi[i2] = opts.dataPointIndex == null ? -1 : opts.dataPointIndex;\n        if (opts.radius) this._cellRadius = opts.radius;\n        return $e4b487e979d7c06d$var$SHARED_RECT_REF;\n    }\n    /**\n   * Resolve (and dedupe) a rect-cell style → shared-palette id. A last-style\n   * cache keeps the Map/string work off the path for runs of same-style cells.\n   * @param {any} opts\n   * @returns {number}\n   */ _rectStyleId(opts) {\n        const fill = opts.fill;\n        const stroke = opts.stroke;\n        const sw = opts.strokeWidth;\n        const fo = opts.fillOpacity;\n        const so = opts.strokeOpacity;\n        if (fill === this._rlf && stroke === this._rls && sw === this._rlsw && fo === this._rlfo && so === this._rlso) return this._rlid;\n        const id = this._internStyle(fill, stroke, sw, 0, fo, so);\n        this._rlf = fill;\n        this._rls = stroke;\n        this._rlsw = sw;\n        this._rlfo = fo;\n        this._rlso = so;\n        this._rlid = id;\n        return id;\n    }\n    /** @returns {number} number of recorded rect cells */ rectCount() {\n        return this._crn;\n    }\n    /** @param {number} i @returns {any} the style object for a rect cell */ rectStyle(i2) {\n        return this._styles[this._crstyle[i2]];\n    }\n    /** @param {number} i @returns {number} series (realIndex) of a cell, -1 if none */ rectSeries(i2) {\n        return this._crsi[i2];\n    }\n    /**\n   * @param {string} tag\n   * @param {number} z\n   * @returns {any}\n   */ _cmd(tag, z) {\n        const cmd = {\n            tag: tag,\n            z: z || 0,\n            fill: void 0,\n            stroke: void 0,\n            strokeWidth: void 0,\n            strokeDash: void 0,\n            lineCap: void 0,\n            fillOpacity: void 0,\n            strokeOpacity: void 0,\n            fillRule: void 0\n        };\n        this._list.push(cmd);\n        return cmd;\n    }\n    // ── organizational (groups don't paint or record) ──\n    // Series draw() creates a wrap group PER POINT (scatter.draw / plotChartMarkers\n    // run per point), so allocating a handle per group is ~50k heavy allocations\n    // at scale: enough transient churn to tip V8 into a GC blow-up. Groups carry\n    // no paint state in canvas mode (attr/add are no-ops), so every group shares\n    // one singleton: zero per-point allocation.\n    /** @param {any} _attrs */ group(_attrs) {\n        return $e4b487e979d7c06d$var$SHARED_GROUP;\n    }\n    // ── per-point marker (line/area markers, scatter, bubble): COLUMNAR ──\n    /**\n   * @param {number} x\n   * @param {number} y\n   * @param {any} opts\n   */ drawMarker(x, y, opts = {}) {\n        var _a;\n        const styleId = this._markerStyleId(opts);\n        if (this._mn >= this._mcap) this._growMarkers();\n        const i2 = this._mn++;\n        this._mx[i2] = x || 0;\n        this._my[i2] = typeof y === \"number\" ? y : NaN;\n        this._msize[i2] = opts.pSize || 0;\n        this._mshape[i2] = (_a = $e4b487e979d7c06d$var$SHAPE_ID[opts.shape || \"circle\"]) != null ? _a : 0;\n        this._mstyle[i2] = styleId;\n        this._msi[i2] = opts.seriesIndex == null ? -1 : opts.seriesIndex;\n        return new $e4b487e979d7c06d$var$CanvasMarkerRef(this, i2);\n    }\n    /**\n   * Resolve (and dedupe) a marker style → palette id. A last-style cache keeps\n   * the Map/string work off the path when consecutive markers share a style\n   * (the common case), so intern runs once per style run.\n   * @param {any} opts\n   * @returns {number}\n   */ _markerStyleId(opts) {\n        const shape = opts.shape || \"circle\";\n        const strokeTinted = shape === \"line\" || shape === \"plus\" || shape === \"cross\";\n        const fill = strokeTinted ? \"none\" : opts.pointFillColor;\n        const stroke = strokeTinted ? opts.pointFillColor : opts.pointStrokeColor;\n        const sw = opts.pointStrokeWidth;\n        const dash = opts.pointStrokeDashArray;\n        const fo = opts.pointFillOpacity;\n        const so = strokeTinted ? opts.pointFillOpacity : opts.pointStrokeOpacity;\n        if (fill === this._lf && stroke === this._ls && sw === this._lsw && dash === this._ld && fo === this._lfo && so === this._lso) return this._lid;\n        const id = this._internStyle(fill, stroke, sw, dash, fo, so);\n        this._lf = fill;\n        this._ls = stroke;\n        this._lsw = sw;\n        this._ld = dash;\n        this._lfo = fo;\n        this._lso = so;\n        this._lid = id;\n        return id;\n    }\n    // ── series body path (line/area/bar): object command ──\n    /** @param {any} opts */ renderPaths(opts) {\n        const cmd = this._cmd(\"path\", opts.realIndex);\n        cmd.d = opts.pathTo;\n        if (opts.pathToNumeric) {\n            cmd.nxs = opts.pathToNumeric.xs;\n            cmd.nys = opts.pathToNumeric.ys;\n            cmd.ncloseY = opts.pathToNumeric.closeY;\n        }\n        cmd.stroke = opts.stroke;\n        cmd.strokeWidth = opts.strokeWidth;\n        cmd.fill = opts.fill;\n        cmd.lineCap = opts.strokeLinecap;\n        cmd.si = opts.realIndex;\n        this.w.globals.animationEnded = true;\n        return new $e4b487e979d7c06d$var$CanvasMark(cmd);\n    }\n    /** @param {any} opts */ drawPath(opts) {\n        const cmd = this._cmd(\"path\", 0);\n        cmd.d = opts.d;\n        cmd.stroke = opts.stroke;\n        cmd.strokeWidth = opts.strokeWidth;\n        cmd.fill = opts.fill;\n        cmd.fillOpacity = opts.fillOpacity;\n        cmd.strokeOpacity = opts.strokeOpacity;\n        cmd.lineCap = opts.strokeLinecap;\n        cmd.strokeDash = opts.strokeDashArray;\n        return new $e4b487e979d7c06d$var$CanvasMark(cmd);\n    }\n    // ── remaining primitives (contract completeness / Marks #11 forward-compat) ──\n    /**\n   * @param {number} x1 @param {number} y1 @param {number} x2 @param {number} y2\n   * @param {string} lineColor @param {any} dashArray @param {number} strokeWidth\n   */ drawLine(x1, y1, x2, y2, lineColor = \"#a8a8a8\", dashArray = 0, strokeWidth = 1) {\n        const cmd = this._cmd(\"line\", 0);\n        cmd.lx1 = x1;\n        cmd.ly1 = y1;\n        cmd.lx2 = x2;\n        cmd.ly2 = y2;\n        cmd.stroke = lineColor;\n        cmd.strokeDash = dashArray;\n        cmd.strokeWidth = strokeWidth;\n        return new $e4b487e979d7c06d$var$CanvasMark(cmd);\n    }\n    /**\n   * Mirrors Graphics.drawRect's full signature (including stroke), so callers\n   * that stroke rects (Marks api.rect, chart code) paint the same on canvas.\n   * @param {number} x1 @param {number} y1 @param {number} x2 @param {number} y2\n   * @param {number} radius @param {string} color @param {number} opacity\n   * @param {number|null} [strokeWidth] @param {string|null} [strokeColor]\n   * @param {any} [strokeDashArray]\n   */ drawRect(x1 = 0, y1 = 0, x2 = 0, y2 = 0, radius = 0, color = \"#fefefe\", opacity = 1, strokeWidth = null, strokeColor = null, strokeDashArray = 0) {\n        const cmd = this._cmd(\"rect\", 0);\n        cmd.x1 = x1;\n        cmd.y1 = y1;\n        cmd.rw = x2 > 0 ? x2 : 0;\n        cmd.rh = y2 > 0 ? y2 : 0;\n        cmd.radius = radius;\n        cmd.fill = color;\n        cmd.fillOpacity = opacity;\n        if (strokeColor != null) {\n            cmd.stroke = strokeColor;\n            cmd.strokeWidth = strokeWidth == null ? 1 : strokeWidth;\n            cmd.strokeDash = strokeDashArray;\n        }\n        return new $e4b487e979d7c06d$var$CanvasMark(cmd);\n    }\n    /**\n   * @param {number} radius\n   * @param {any} attrs\n   */ drawCircle(radius, attrs = null) {\n        const cmd = this._cmd(\"circle\", 0);\n        cmd.r = radius < 0 ? 0 : radius;\n        if (attrs) {\n            cmd.cx = attrs.cx;\n            cmd.cy = attrs.cy;\n            if (attrs.fill !== void 0) cmd.fill = attrs.fill;\n            if (attrs.stroke !== void 0) cmd.stroke = attrs.stroke;\n        }\n        return new $e4b487e979d7c06d$var$CanvasMark(cmd);\n    }\n    /** @param {any} opts */ drawText(opts) {\n        const cmd = this._cmd(\"text\", 0);\n        cmd.text = Array.isArray(opts.text) ? opts.text.join(\" \") : opts.text;\n        cmd.tx = opts.x;\n        cmd.ty = opts.y;\n        cmd.textAnchor = opts.textAnchor || \"start\";\n        cmd.fontSize = opts.fontSize;\n        cmd.fontFamily = opts.fontFamily;\n        cmd.fill = opts.foreColor;\n        return new $e4b487e979d7c06d$var$CanvasMark(cmd);\n    }\n    /**\n   * Resolve a marker's SVG path `d` (non-circle shapes) lazily at paint time.\n   * @param {number} x @param {number} y @param {number} shapeId @param {number} size\n   * @returns {string}\n   */ markerPath(x, y, shapeId, size) {\n        return this._g.getMarkerPath(x, y, $e4b487e979d7c06d$var$SHAPE_NAME[shapeId] || \"circle\", size);\n    }\n}\nconst $e4b487e979d7c06d$var$TWO_PI = Math.PI * 2;\nconst $e4b487e979d7c06d$var$DPR_CAP = 2;\nclass $e4b487e979d7c06d$var$CanvasCompositor {\n    /** @param {any} w */ constructor(w2){\n        this.w = w2;\n        this._host = null;\n        this._canvas = null;\n        this._c2d = null;\n        this._margin = 0;\n        this._dpr = 1;\n        this._dim = null;\n        this._alpha = 1;\n        this._unitPaths = /* @__PURE__ */ new Map();\n        this._markerBatches = 0;\n    }\n    /** Marker style-batches applied during the last paint() (dev/test hook). */ markerBatchCount() {\n        return this._markerBatches;\n    }\n    /**\n   * Opacity multiplier for a series index under the active dim spec: 1 for the\n   * highlighted series (or when not dimming, or for unidentified marks), else\n   * the inactive opacity.\n   * @param {number} si\n   * @returns {number}\n   */ _seriesAlpha(si) {\n        const d = this._dim;\n        if (!d || d.active == null || d.active < 0 || si == null || si < 0) return 1;\n        return si === d.active ? 1 : d.opacity == null ? 0.2 : d.opacity;\n    }\n    _plotDims() {\n        var _a;\n        const gw = Math.max(0, Math.ceil(this.w.layout.gridWidth || 0));\n        const gh = Math.max(0, Math.ceil(this.w.layout.gridHeight || 0));\n        const largest = ((_a = this.w.globals.markers) == null ? void 0 : _a.largestSize) || 0;\n        const margin = Math.ceil(largest + 8);\n        return {\n            gw: gw,\n            gh: gh,\n            margin: margin\n        };\n    }\n    /**\n   * Create (or recreate) the foreignObject + canvas sized to the plot rect and\n   * return the SVGElement host that `plotChartType` inserts into the tree.\n   * @returns {any}\n   */ createHost() {\n        const win = $e4b487e979d7c06d$var$BrowserAPIs.getWindow();\n        this._dpr = Math.min($e4b487e979d7c06d$var$DPR_CAP, win && win.devicePixelRatio || 1);\n        const { gw: gw, gh: gh, margin: margin } = this._plotDims();\n        this._margin = margin;\n        const w2 = gw + margin * 2;\n        const h2 = gh + margin * 2;\n        const fo = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS$2, \"foreignObject\");\n        fo.setAttribute(\"x\", String(-margin));\n        fo.setAttribute(\"y\", String(-margin));\n        fo.setAttribute(\"width\", String(w2));\n        fo.setAttribute(\"height\", String(h2));\n        fo.setAttribute(\"class\", \"apexcharts-canvas-series\");\n        fo.style.overflow = \"visible\";\n        const canvas = /** @type {any} */ $e4b487e979d7c06d$var$BrowserAPIs.createElement(\"canvas\");\n        canvas.setAttribute(\"class\", \"apexcharts-series-canvas\");\n        canvas.width = Math.max(1, Math.round(w2 * this._dpr));\n        canvas.height = Math.max(1, Math.round(h2 * this._dpr));\n        canvas.style.width = w2 + \"px\";\n        canvas.style.height = h2 + \"px\";\n        canvas.style.pointerEvents = \"none\";\n        fo.appendChild(canvas);\n        this._canvas = canvas;\n        this._c2d = canvas.getContext(\"2d\");\n        this._host = new $e4b487e979d7c06d$var$SVGElement(fo);\n        return this._host;\n    }\n    getHost() {\n        return this._host;\n    }\n    clear() {\n        if (!this._c2d || !this._canvas) return;\n        this._c2d.setTransform(1, 0, 0, 1, 0, 0);\n        this._c2d.clearRect(0, 0, this._canvas.width, this._canvas.height);\n    }\n    /**\n   * Re-check devicePixelRatio before painting: a restyle() repaint after the\n   * window moved between monitors would otherwise keep the stale backing-store\n   * scale (blurry or over-sized) until the next full render rebuilds the host.\n   * The canvas CSS size is unchanged; only the backing store is resized.\n   */ _syncDpr() {\n        if (!this._canvas) return;\n        const win = $e4b487e979d7c06d$var$BrowserAPIs.getWindow();\n        const dpr = Math.min($e4b487e979d7c06d$var$DPR_CAP, win && win.devicePixelRatio || 1);\n        if (dpr === this._dpr) return;\n        this._dpr = dpr;\n        const wCss = parseFloat(this._canvas.style.width) || 0;\n        const hCss = parseFloat(this._canvas.style.height) || 0;\n        this._canvas.width = Math.max(1, Math.round(wCss * dpr));\n        this._canvas.height = Math.max(1, Math.round(hCss * dpr));\n    }\n    /**\n   * Paint the recorded scene: object commands (series bodies / rects / lines /\n   * text) first, then the columnar markers on top (matching SVG z-order where\n   * markers sit above the series path). `shim` supplies the columnar marker\n   * arrays + lazy non-circle marker geometry.\n   * @param {any[]} list\n   * @param {any} shim\n   * @param {{active:number, opacity:number}|null} [dim] per-series dim spec\n   *   (hover / legend restyle); null repaints at full opacity.\n   */ paint(list, shim2, dim = null) {\n        const ctx = this._c2d;\n        if (!ctx) return;\n        this._dim = dim || null;\n        this._syncDpr();\n        this.clear();\n        const dpr = this._dpr;\n        const m2 = this._margin;\n        ctx.setTransform(dpr, 0, 0, dpr, m2 * dpr, m2 * dpr);\n        if (list.length) {\n            const ordered = list.length > 1 ? list.map((c2, i2)=>[\n                    c2,\n                    i2\n                ]).sort((a2, b2)=>a2[0].z === b2[0].z ? a2[1] - b2[1] : a2[0].z - b2[0].z).map((pair)=>pair[0]) : list;\n            for(let i2 = 0; i2 < ordered.length; i2++){\n                const c2 = ordered[i2];\n                this._alpha = this._dim ? this._seriesAlpha(c2.si) : 1;\n                this._paintOne(ctx, c2);\n            }\n        }\n        this._paintRects(ctx, shim2);\n        this._paintMarkers(ctx, shim2);\n        this._alpha = 1;\n    }\n    /**\n   * Paint the columnar rect cells (heatmap) as STYLE BATCHES: one fill/stroke\n   * state application per run of consecutive same-style cells, then a fast\n   * fillRect (or a roundRect path when the shared corner radius is non-zero)\n   * per cell. Clipped to the plot rect so cells never bleed into the canvas\n   * margin (mirrors the SVG gridRectMask). Per-cell globalAlpha carries the\n   * hover/legend dim multiplier when a dim spec is active.\n   * @param {any} ctx\n   * @param {any} shim\n   */ _paintRects(ctx, shim2) {\n        const n2 = shim2.rectCount ? shim2.rectCount() : 0;\n        if (!n2) return;\n        const rx = shim2._crx;\n        const ry = shim2._cry;\n        const rw = shim2._crw;\n        const rh = shim2._crh;\n        const rstyle = shim2._crstyle;\n        const radius = shim2._cellRadius || 0;\n        const cx = /** @type {any} */ ctx;\n        const useRound = radius > 0 && typeof cx.roundRect === \"function\";\n        const dimming = !!this._dim;\n        const gw = Math.max(0, this.w.layout.gridWidth || 0);\n        const gh = Math.max(0, this.w.layout.gridHeight || 0);\n        ctx.save();\n        ctx.beginPath();\n        ctx.rect(0, 0, gw, gh);\n        ctx.clip();\n        let i2 = 0;\n        while(i2 < n2){\n            const styleId = rstyle[i2];\n            const style = shim2.rectStyle(i2);\n            if (!style) {\n                i2++;\n                continue;\n            }\n            const fill = style.fill;\n            const doFill = fill && fill !== \"none\" && !(typeof fill === \"string\" && fill.indexOf(\"url(\") === 0);\n            const stroke = style.stroke;\n            const sw = style.strokeWidth == null ? 0 : Number(style.strokeWidth);\n            const doStroke = stroke && stroke !== \"none\" && sw > 0 && !(typeof stroke === \"string\" && stroke.indexOf(\"url(\") === 0);\n            if (doFill) ctx.fillStyle = fill;\n            if (doStroke) {\n                ctx.strokeStyle = stroke;\n                ctx.lineWidth = sw;\n                ctx.setLineDash([]);\n            }\n            const baseFillA = style.fillOpacity == null ? 1 : Number(style.fillOpacity);\n            const baseStrokeA = style.strokeOpacity == null ? 1 : Number(style.strokeOpacity);\n            let j = i2;\n            while(j < n2 && rstyle[j] === styleId){\n                const w2 = rw[j];\n                const h2 = rh[j];\n                if (w2 > 0 && h2 > 0) {\n                    const f = dimming ? this._seriesAlpha(shim2.rectSeries(j)) : 1;\n                    if (useRound) {\n                        ctx.beginPath();\n                        cx.roundRect(rx[j], ry[j], w2, h2, radius);\n                        if (doFill) {\n                            ctx.globalAlpha = baseFillA * f;\n                            ctx.fill();\n                        }\n                        if (doStroke) {\n                            ctx.globalAlpha = baseStrokeA * f;\n                            ctx.stroke();\n                        }\n                    } else {\n                        if (doFill) {\n                            ctx.globalAlpha = baseFillA * f;\n                            ctx.fillRect(rx[j], ry[j], w2, h2);\n                        }\n                        if (doStroke) {\n                            ctx.globalAlpha = baseStrokeA * f;\n                            ctx.strokeRect(rx[j], ry[j], w2, h2);\n                        }\n                    }\n                }\n                j++;\n            }\n            i2 = j;\n        }\n        ctx.globalAlpha = 1;\n        ctx.restore();\n    }\n    /**\n   * Reusable unit Path2D for a (shape, size): the shape's geometry built at the\n   * origin once, then translated per marker via setTransform. Returns null when\n   * the geometry string cannot be parsed.\n   * @param {any} shim\n   * @param {number} shapeId\n   * @param {number} size\n   * @returns {any}\n   */ _unitPath(shim2, shapeId, size) {\n        const key = shapeId + \"|\" + size;\n        let p2 = this._unitPaths.get(key);\n        if (p2 === void 0) {\n            try {\n                p2 = new Path2D(shim2.markerPath(0, 0, shapeId, size));\n            } catch (e2) {\n                p2 = null;\n            }\n            this._unitPaths.set(key, p2);\n        }\n        return p2;\n    }\n    /**\n   * Markers paint as STYLE BATCHES: one fill/stroke state application per run\n   * of consecutive same-style markers (a uniform single-series scatter is\n   * exactly one batch), then per-marker geometry inside the run. Per-marker\n   * geometry stays painter's-ordered (fill+stroke per marker) so overlapping\n   * semi-transparent markers composite exactly as SVG does.\n   * @param {any} ctx\n   * @param {any} shim\n   */ _paintMarkers(ctx, shim2) {\n        this._markerBatches = 0;\n        const n2 = shim2.markerCount();\n        if (!n2) return;\n        const mx = shim2._mx;\n        const my = shim2._my;\n        const msize = shim2._msize;\n        const mshape = shim2._mshape;\n        const mstyle = shim2._mstyle;\n        const dimming = !!this._dim;\n        if (!dimming) this._alpha = 1;\n        let i2 = 0;\n        while(i2 < n2){\n            const styleId = mstyle[i2];\n            const shapeId = mshape[i2];\n            const style = shim2.markerStyle(i2);\n            if (!style) {\n                i2++;\n                continue;\n            }\n            const doFill = this._applyFill(ctx, style);\n            const doStroke = this._applyStroke(ctx, style);\n            this._markerBatches++;\n            const baseFillA = style.fillOpacity == null ? 1 : Number(style.fillOpacity);\n            const baseStrokeA = style.strokeOpacity == null ? 1 : Number(style.strokeOpacity);\n            if (shapeId === 0) {\n                let j = i2;\n                while(j < n2 && mshape[j] === 0 && mstyle[j] === styleId){\n                    const r2 = msize[j] || 0;\n                    const y = my[j];\n                    if (r2 > 0 && y === y) {\n                        ctx.beginPath();\n                        ctx.arc(mx[j], y, r2, 0, $e4b487e979d7c06d$var$TWO_PI);\n                        if (dimming) {\n                            const f = this._seriesAlpha(shim2.markerSeries(j));\n                            if (doFill) {\n                                ctx.globalAlpha = baseFillA * f;\n                                ctx.fill();\n                            }\n                            if (doStroke) {\n                                ctx.globalAlpha = baseStrokeA * f;\n                                ctx.stroke();\n                            }\n                        } else {\n                            if (doFill) ctx.fill();\n                            if (doStroke) ctx.stroke();\n                        }\n                    }\n                    j++;\n                }\n                ctx.globalAlpha = 1;\n                i2 = j;\n            } else {\n                const dpr = this._dpr;\n                const m2 = this._margin;\n                let j = i2;\n                while(j < n2 && mshape[j] === shapeId && mstyle[j] === styleId){\n                    const y = my[j];\n                    const size = msize[j];\n                    if (y === y && size > 0) {\n                        const p2 = this._unitPath(shim2, shapeId, size);\n                        if (p2) {\n                            ctx.setTransform(dpr, 0, 0, dpr, (m2 + mx[j]) * dpr, (m2 + y) * dpr);\n                            const f = dimming ? this._seriesAlpha(shim2.markerSeries(j)) : 1;\n                            if (doFill) {\n                                ctx.globalAlpha = baseFillA * f;\n                                ctx.fill(p2);\n                            }\n                            if (doStroke) {\n                                ctx.globalAlpha = baseStrokeA * f;\n                                ctx.stroke(p2);\n                            }\n                        }\n                    }\n                    j++;\n                }\n                ctx.setTransform(dpr, 0, 0, dpr, m2 * dpr, m2 * dpr);\n                ctx.globalAlpha = 1;\n                i2 = j;\n            }\n        }\n    }\n    /**\n   * Paint a series path from its numeric fast-path coords: a direct\n   * moveTo/lineTo loop over the typed arrays, no Path2D and no d-string\n   * parse. `ncloseY` (areas) closes the polygon down to the baseline exactly\n   * like the string form's `L xLast bottom L x0 bottom z` tail.\n   * @param {any} ctx\n   * @param {any} cmd\n   */ _paintNumericPath(ctx, cmd) {\n        const xs = cmd.nxs;\n        const ys = cmd.nys;\n        const n2 = xs.length;\n        if (!n2) return;\n        ctx.beginPath();\n        ctx.moveTo(xs[0], ys[0]);\n        for(let k = 1; k < n2; k++)ctx.lineTo(xs[k], ys[k]);\n        if (cmd.ncloseY != null) {\n            ctx.lineTo(xs[n2 - 1], cmd.ncloseY);\n            ctx.lineTo(xs[0], cmd.ncloseY);\n            ctx.closePath();\n        }\n        if (this._applyFill(ctx, cmd)) ctx.fill(cmd.fillRule === \"evenodd\" ? \"evenodd\" : \"nonzero\");\n        if (this._applyStroke(ctx, cmd)) ctx.stroke();\n        ctx.globalAlpha = 1;\n    }\n    /**\n   * @param {any} ctx\n   * @param {any} cmd style-bearing flat command\n   */ _paintOne(ctx, cmd) {\n        switch(cmd.tag){\n            case \"path\":\n                if (cmd.nxs) {\n                    this._paintNumericPath(ctx, cmd);\n                    break;\n                }\n                if (!cmd.d) return;\n                if (!cmd.path2d) try {\n                    cmd.path2d = new Path2D(cmd.d);\n                } catch (e2) {\n                    return;\n                }\n                this._fillStrokePath(ctx, cmd, cmd.path2d);\n                break;\n            case \"rect\":\n                {\n                    const p2 = new Path2D();\n                    if (cmd.radius && typeof /** @type {any} */ p2.roundRect === \"function\") p2.roundRect(cmd.x1, cmd.y1, cmd.rw, cmd.rh, cmd.radius);\n                    else p2.rect(cmd.x1, cmd.y1, cmd.rw, cmd.rh);\n                    this._fillStrokePath(ctx, cmd, p2);\n                    break;\n                }\n            case \"circle\":\n                if (!(cmd.r > 0)) return;\n                ctx.beginPath();\n                ctx.arc(cmd.cx, cmd.cy, cmd.r, 0, $e4b487e979d7c06d$var$TWO_PI);\n                this._fillStroke(ctx, cmd);\n                break;\n            case \"line\":\n                ctx.beginPath();\n                ctx.moveTo(cmd.lx1, cmd.ly1);\n                ctx.lineTo(cmd.lx2, cmd.ly2);\n                this._strokeOnly(ctx, cmd);\n                break;\n            case \"text\":\n                {\n                    if (cmd.text == null) return;\n                    ctx.save();\n                    ctx.globalAlpha = this._alpha;\n                    ctx.fillStyle = cmd.fill || \"#000\";\n                    const size = cmd.fontSize || \"11px\";\n                    ctx.font = `${typeof size === \"number\" ? size + \"px\" : size} ${cmd.fontFamily || \"Helvetica, Arial, sans-serif\"}`;\n                    ctx.textAlign = cmd.textAnchor === \"middle\" ? \"center\" : cmd.textAnchor === \"end\" ? \"right\" : \"left\";\n                    ctx.fillText(String(cmd.text), cmd.tx, cmd.ty);\n                    ctx.restore();\n                    break;\n                }\n        }\n    }\n    /**\n   * @param {any} ctx\n   * @param {any} style\n   * @param {any} path2d\n   */ _fillStrokePath(ctx, style, path2d) {\n        if (this._applyFill(ctx, style)) ctx.fill(path2d, style.fillRule === \"evenodd\" ? \"evenodd\" : \"nonzero\");\n        if (this._applyStroke(ctx, style)) ctx.stroke(path2d);\n        ctx.globalAlpha = 1;\n    }\n    /**\n   * @param {any} ctx\n   * @param {any} style\n   */ _fillStroke(ctx, style) {\n        if (this._applyFill(ctx, style)) ctx.fill();\n        if (this._applyStroke(ctx, style)) ctx.stroke();\n        ctx.globalAlpha = 1;\n    }\n    /**\n   * @param {any} ctx\n   * @param {any} style\n   */ _strokeOnly(ctx, style) {\n        if (this._applyStroke(ctx, style)) ctx.stroke();\n        ctx.globalAlpha = 1;\n    }\n    /**\n   * Set fill state. Returns false when there's nothing to fill.\n   * @param {any} ctx\n   * @param {any} style\n   */ _applyFill(ctx, style) {\n        const fill = style.fill;\n        if (!fill || fill === \"none\") return false;\n        if (typeof fill === \"string\" && fill.indexOf(\"url(\") === 0) return false;\n        ctx.globalAlpha = (style.fillOpacity == null ? 1 : Number(style.fillOpacity)) * this._alpha;\n        ctx.fillStyle = fill;\n        return true;\n    }\n    /**\n   * Set stroke state. Returns false when there's nothing to stroke.\n   * @param {any} ctx\n   * @param {any} style\n   */ _applyStroke(ctx, style) {\n        const stroke = style.stroke;\n        const sw = style.strokeWidth == null ? 1 : Number(style.strokeWidth);\n        if (!stroke || stroke === \"none\" || !(sw > 0)) return false;\n        if (typeof stroke === \"string\" && stroke.indexOf(\"url(\") === 0) return false;\n        ctx.globalAlpha = (style.strokeOpacity == null ? 1 : Number(style.strokeOpacity)) * this._alpha;\n        ctx.strokeStyle = stroke;\n        ctx.lineWidth = sw;\n        ctx.lineCap = style.lineCap || \"butt\";\n        const dash = style.strokeDash;\n        if (dash && dash !== 0) ctx.setLineDash(Array.isArray(dash) ? dash : [\n            Number(dash)\n        ]);\n        else ctx.setLineDash([]);\n        return true;\n    }\n    /** Series bitmap for the export composite bridge (P4). @returns {string|null} */ toDataURL() {\n        return this._canvas ? this._canvas.toDataURL() : null;\n    }\n    destroy() {\n        this._host = null;\n        this._canvas = null;\n        this._c2d = null;\n        this._unitPaths.clear();\n    }\n}\nclass $e4b487e979d7c06d$var$CanvasRenderer {\n    /**\n   * @param {any} w\n   * @param {any} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.kind = \"canvas\";\n        this._g = new $e4b487e979d7c06d$var$CanvasGraphics(w2);\n        this._compositor = new $e4b487e979d7c06d$var$CanvasCompositor(w2);\n    }\n    // ── lifecycle ──\n    /** Start a fresh series display list for this render pass. */ beginSeries() {\n        this._g.reset();\n    }\n    /**\n   * Finalize the pass: paint the recorded display list and return the SVG host\n   * (a `<foreignObject><canvas>`) for `plotChartType` to composite into the tree.\n   * @returns {any}\n   */ present() {\n        const host = this._compositor.createHost();\n        this._compositor.paint(this._g.displayList(), this._g);\n        return host;\n    }\n    /** Fast-path wipe of the series layer. */ clear() {\n        this._compositor.clear();\n    }\n    /**\n   * Whether the existing <canvas> host can be repainted in place (it exists\n   * and is still mounted). Used by the data-only fast update path to skip\n   * recreating the foreignObject + backing store on every tick.\n   * @returns {boolean}\n   */ canRepaintInPlace() {\n        const host = this._compositor.getHost();\n        return !!(host && host.node && host.node.isConnected);\n    }\n    /** Repaint the freshly recorded display list into the EXISTING canvas. */ repaintInPlace() {\n        this._compositor.paint(this._g.displayList(), this._g);\n    }\n    // ── emit primitives (delegate to the display-list shim) ──\n    /** @param {any} attrs */ group(attrs) {\n        return this._g.group(attrs);\n    }\n    /** @param {any} opts */ drawPath(opts) {\n        return this._g.drawPath(opts);\n    }\n    /** @param {any[]} args */ drawLine(...args) {\n        return /** @type {any} */ this._g.drawLine(...args);\n    }\n    /** @param {any[]} args */ drawRect(...args) {\n        return /** @type {any} */ this._g.drawRect(...args);\n    }\n    /**\n   * Columnar heatmap-cell rect (dense same-shape rects): recorded into typed\n   * arrays, painted as style batches. Distinct from drawRect (object command)\n   * so 100k cells don't allocate 100k retained commands.\n   * @param {number} x @param {number} y @param {number} w @param {number} h\n   * @param {any} opts\n   */ drawRectCell(x, y, w2, h2, opts) {\n        return this._g.drawRectCell(x, y, w2, h2, opts);\n    }\n    /**\n   * @param {number} r\n   * @param {any} attrs\n   */ drawCircle(r2, attrs) {\n        return this._g.drawCircle(r2, attrs);\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   * @param {any} opts\n   */ drawMarker(x, y, opts) {\n        return this._g.drawMarker(x, y, opts);\n    }\n    /** @param {any} opts */ renderPaths(opts) {\n        return this._g.renderPaths(opts);\n    }\n    /** @param {any} opts */ drawText(opts) {\n        return this._g.drawText(opts);\n    }\n    // ── capabilities ──\n    /** @param {string} feature */ supports(feature) {\n        return feature === \"solidFill\" || feature === \"dashArray\";\n    }\n    // ── interaction ──\n    // Line/area/bar/scatter tooltips resolve via coordinate lookup (pointsArray),\n    // so those need no per-mark query. Heatmap cells, however, are hovered by\n    // point (the SVG path hit-tests the <rect> under the cursor); with cells on\n    // canvas there is no node, so hitTest resolves the columnar rect store.\n    /**\n   * Find the cell under a plot-local point (0,0 = plot origin, the same space\n   * as the recorded cell geometry). Reverse scan so a later-painted cell wins\n   * when cells overlap (continuous-x edges). A linear scan stays well under a\n   * frame even at 100k cells (~100k integer compares). Returns the cell's\n   * series/dataPoint index plus its geometry for tooltip positioning, or null\n   * when the point is off every cell.\n   * @param {number} px\n   * @param {number} py\n   * @returns {({seriesIndex:number,dataPointIndex:number,x:number,y:number,width:number,height:number})|null}\n   */ hitTest(px, py) {\n        const g2 = this._g;\n        const n2 = g2.rectCount ? g2.rectCount() : 0;\n        if (!n2) return null;\n        const rx = g2._crx;\n        const ry = g2._cry;\n        const rw = g2._crw;\n        const rh = g2._crh;\n        for(let k = n2 - 1; k >= 0; k--){\n            const w2 = rw[k];\n            const h2 = rh[k];\n            if (w2 <= 0 || h2 <= 0) continue;\n            if (px >= rx[k] && px < rx[k] + w2 && py >= ry[k] && py < ry[k] + h2) return {\n                seriesIndex: g2._crsi[k],\n                dataPointIndex: g2._crdi[k],\n                x: rx[k],\n                y: ry[k],\n                width: w2,\n                height: h2\n            };\n        }\n        return null;\n    }\n    /**\n   * Repaint the retained series scene with a per-series dim spec (hover /\n   * legend restyle). No geometry recompute: reuses the display list + marker\n   * columns recorded at render time. Pass null to repaint at full opacity.\n   * @param {{active:number, opacity:number}|null} [dim]\n   */ restyle(dim) {\n        this._compositor.paint(this._g.displayList(), this._g, dim || null);\n    }\n    // ── export ── toBitmap() and the compositor's toDataURL() back\n    //    Exports.inlineCanvasLayers, which inlines the series bitmap as an SVG\n    //    <image> so PNG/SVG export includes the canvas layer in correct z-order.\n    /** @returns {{dataURL:string,x:number,y:number,w:number,h:number}|null} */ toBitmap() {\n        const url = this._compositor.toDataURL();\n        if (!url) return null;\n        const gl = this.w.globals;\n        const cfg = this.w.config.chart;\n        const margin = this._compositor._margin;\n        return {\n            dataURL: url,\n            x: (gl.translateX || 0) + (cfg.offsetX || 0) - margin,\n            y: (gl.translateY || 0) + (cfg.offsetY || 0) - margin,\n            w: (this.w.layout.gridWidth || 0) + margin * 2,\n            h: (this.w.layout.gridHeight || 0) + margin * 2\n        };\n    }\n    destroy() {\n        this._compositor.destroy();\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerRenderer(\"canvas\", /**\n   * @param {any} w\n   * @param {any} ctx\n   */ (w2, ctx)=>new $e4b487e979d7c06d$var$CanvasRenderer(w2, ctx));\nfunction $e4b487e979d7c06d$var$makeCustomSeriesClass(name2, def) {\n    const cls = class CustomSeries {\n        /**\n     * @param {any} w @param {any} ctx @param {any} xyRatios\n     */ constructor(w2, ctx, xyRatios){\n            this.w = w2;\n            this.ctx = ctx;\n            this.xyRatios = xyRatios;\n            this._warned = false;\n        }\n        /**\n     * @param {any[]} series parsed y-arrays (one per drawn series)\n     * @param {string} [_ctype]\n     * @param {number[]} [seriesIndices] realIndex per entry (combo dispatch)\n     * @returns {any} the wrap group\n     */ draw(series, _ctype, seriesIndices) {\n            var _a, _b;\n            const w2 = this.w;\n            const graphics = new $e4b487e979d7c06d$var$Graphics(w2, this.ctx);\n            const emit = $e4b487e979d7c06d$var$seriesEmitter(this.ctx, graphics);\n            const ret = graphics.group({\n                class: \"apexcharts-marks-series\"\n            });\n            series.forEach((_s, idx)=>{\n                var _a2;\n                const realIndex = Array.isArray(seriesIndices) ? seriesIndices[idx] : idx;\n                const elSeries = graphics.group({\n                    class: \"apexcharts-series\",\n                    rel: realIndex + 1,\n                    seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n                    \"data:realIndex\": realIndex\n                });\n                const scales = this._scales(realIndex, (w2.seriesData.series[realIndex] || []).length);\n                const color = w2.globals.colors[realIndex];\n                const rawData = /** @type {any} */ ((_a2 = w2.config.series[realIndex]) == null ? void 0 : _a2.data) || [];\n                const xvals = w2.seriesData.seriesX[realIndex] || [];\n                const yvals = w2.seriesData.series[realIndex] || [];\n                w2.globals.seriesXvalues[realIndex] = [];\n                w2.globals.seriesYvalues[realIndex] = [];\n                if (typeof w2.globals.pointsArray[realIndex] === \"undefined\") w2.globals.pointsArray[realIndex] = [];\n                for(let j = 0; j < yvals.length; j++){\n                    const yVal = yvals[j];\n                    if (yVal === null || typeof yVal === \"undefined\") continue;\n                    const xVal = xvals[j];\n                    const xPx = scales.xAt(j, xVal);\n                    const yPx = scales.y(yVal);\n                    const api = this._api(emit, elSeries, realIndex, j);\n                    try {\n                        def.renderItem({\n                            datum: rawData[j],\n                            x: xPx,\n                            y: yPx,\n                            scales: scales,\n                            api: api,\n                            seriesIndex: realIndex,\n                            dataPointIndex: j,\n                            color: color\n                        });\n                    } catch (e2) {\n                        if (!this._warned) {\n                            console.warn(`[apexcharts] renderItem for series type \"${name2}\" threw; skipping datum:`, e2);\n                            this._warned = true;\n                        }\n                    }\n                    w2.globals.seriesXvalues[realIndex][j] = xPx;\n                    w2.globals.seriesYvalues[realIndex][j] = yPx;\n                    w2.globals.pointsArray[realIndex][j] = [\n                        xPx,\n                        yPx\n                    ];\n                }\n                graphics.setupEventDelegation(elSeries, \".apexcharts-marks-mark\");\n                ret.add(elSeries);\n            });\n            (_b = (_a = this.ctx.animations) == null ? void 0 : _a.animationCompleted) == null || _b.call(_a, ret);\n            return ret;\n        }\n        /**\n     * Series-space (elGraphical-local, translate-free) scales, matching how the\n     * built-ins compute pixels, so custom marks align with axes and gridlines\n     * and paint correctly on the elGraphical-local canvas.\n     * @param {number} realIndex\n     * @param {number} [nPts] number of data points (for categorical band sizing)\n     */ _scales(realIndex, nPts) {\n            var _a, _b, _c, _d;\n            const gl = this.w.globals;\n            const cnf = this.w.config;\n            const xRatio = this.xyRatios.xRatio;\n            const yRatioArr = this.xyRatios.yRatio;\n            const axis = (_b = (_a = gl.seriesYAxisReverseMap) == null ? void 0 : _a[realIndex]) != null ? _b : 0;\n            const yr = Array.isArray(yRatioArr) ? (_c = yRatioArr[axis]) != null ? _c : yRatioArr[0] : yRatioArr;\n            const maxYArr = /** @type {any} */ gl.maxYArr;\n            const maxY = Array.isArray(maxYArr) && maxYArr.length ? (_d = maxYArr[axis]) != null ? _d : gl.maxY : gl.maxY;\n            const gridWidth = gl.gridWidth;\n            const gridHeight = gl.gridHeight;\n            const catMode = !gl.isXNumeric;\n            const n2 = nPts || gl.dataPoints || 1;\n            const bandW = n2 > 0 ? gridWidth / n2 : gridWidth;\n            const tickOn = cnf.xaxis.tickPlacement === \"on\";\n            const x = (v2)=>xRatio ? (v2 - gl.minX) / xRatio : gridWidth / 2;\n            const y = (v2)=>(maxY - v2) / yr;\n            const xAt = (index, v2)=>{\n                if (!catMode) return x(v2);\n                if (tickOn && n2 > 1) return index / (n2 - 1) * gridWidth;\n                return (index + 0.5) * bandW;\n            };\n            const step = gl.minXDiff || 1;\n            const band = catMode ? bandW : xRatio ? step / xRatio : gridWidth;\n            return {\n                x: x,\n                xAt: xAt,\n                y: y,\n                gridWidth: gridWidth,\n                gridHeight: gridHeight,\n                band: band\n            };\n        }\n        /**\n     * Per-datum primitive API. Each call emits immediately (canvas-aware via\n     * `emit`), tags the node with the datum's identity, and adds it to the\n     * series group; on canvas the tag/add are inert (marks live on the canvas,\n     * events are coordinate-based).\n     * @param {any} emit @param {any} elSeries @param {number} realIndex @param {number} j\n     */ _api(emit, elSeries, realIndex, j) {\n            const tag = (el)=>{\n                if (el) {\n                    try {\n                        el.node.setAttribute(\"index\", String(realIndex));\n                        el.node.setAttribute(\"j\", String(j));\n                        el.node.classList.add(\"apexcharts-marks-mark\");\n                    } catch (e2) {}\n                    elSeries.add(el);\n                }\n                return el;\n            };\n            return {\n                /** @param {any} o */ path: (o2 = {})=>{\n                    var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n                    return tag(emit.drawPath({\n                        d: o2.d || \"\",\n                        stroke: (_a = o2.stroke) != null ? _a : \"#000\",\n                        strokeWidth: (_c = (_b = o2.width) != null ? _b : o2.strokeWidth) != null ? _c : 1,\n                        fill: (_d = o2.fill) != null ? _d : \"none\",\n                        fillOpacity: (_f = o2.fillOpacity) != null ? _f : o2.fill && o2.fill !== \"none\" ? (_e = o2.opacity) != null ? _e : 1 : 0,\n                        strokeOpacity: (_h = (_g = o2.strokeOpacity) != null ? _g : o2.opacity) != null ? _h : 1,\n                        strokeDashArray: (_i = o2.dash) != null ? _i : 0,\n                        strokeLinecap: o2.lineCap\n                    }));\n                },\n                /** @param {any} o */ line: (o2 = {})=>{\n                    var _a, _b, _c, _d;\n                    return tag(emit.drawLine(o2.x1, o2.y1, o2.x2, o2.y2, (_a = o2.stroke) != null ? _a : \"#000\", (_b = o2.dash) != null ? _b : 0, (_d = (_c = o2.width) != null ? _c : o2.strokeWidth) != null ? _d : 1));\n                },\n                /** @param {any} o */ rect: (o2 = {})=>{\n                    var _a, _b, _c, _d, _e, _f, _g, _h;\n                    return tag(emit.drawRect((_a = o2.x) != null ? _a : 0, (_b = o2.y) != null ? _b : 0, (_c = o2.w) != null ? _c : 0, (_d = o2.h) != null ? _d : 0, (_e = o2.r) != null ? _e : 0, (_f = o2.fill) != null ? _f : \"#000\", (_g = o2.opacity) != null ? _g : 1, o2.stroke != null ? (_h = o2.strokeWidth) != null ? _h : 1 : null, o2.stroke));\n                },\n                /** @param {any} o */ circle: (o2 = {})=>{\n                    var _a, _b, _c, _d, _e;\n                    return tag(emit.drawCircle((_a = o2.r) != null ? _a : 0, {\n                        cx: (_b = o2.cx) != null ? _b : 0,\n                        cy: (_c = o2.cy) != null ? _c : 0,\n                        fill: (_d = o2.fill) != null ? _d : \"#000\",\n                        stroke: o2.stroke || \"none\",\n                        \"stroke-width\": (_e = o2.strokeWidth) != null ? _e : o2.stroke ? 1 : 0\n                    }));\n                },\n                /** @param {any} o */ text: (o2 = {})=>{\n                    var _a, _b, _c, _d;\n                    return tag(emit.drawText({\n                        x: (_a = o2.x) != null ? _a : 0,\n                        y: (_b = o2.y) != null ? _b : 0,\n                        text: (_c = o2.text) != null ? _c : \"\",\n                        textAnchor: (_d = o2.anchor) != null ? _d : \"start\",\n                        fontSize: o2.size,\n                        foreColor: o2.color,\n                        fontWeight: o2.weight\n                    }));\n                }\n            };\n        }\n    };\n    cls.dataType = def.dataType || \"xy\";\n    cls.yExtent = typeof def.yExtent === \"function\" ? def.yExtent : null;\n    return cls;\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039._customSeriesFactory = $e4b487e979d7c06d$var$makeCustomSeriesClass;\nconst $e4b487e979d7c06d$var$DARK_QUERY = \"(prefers-color-scheme: dark)\";\nconst $e4b487e979d7c06d$var$CONTRAST_QUERY = \"(prefers-contrast: more)\";\nclass $e4b487e979d7c06d$var$OSThemeWatcher {\n    /**\n   * @param {any} w @param {any} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        if (w2.config.theme.follow !== \"os\" || !$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const media = this._ensureMedia();\n        if (!media) return;\n        this._applyToConfig(media);\n        this._ensureListeners(media);\n    }\n    /**\n   * Create (once per instance) the MediaQueryLists and stash them on `ctx` so\n   * they persist across the re-render that `updateOptions` triggers.\n   * @returns {{dark: MediaQueryList|null, contrast: MediaQueryList|null, handler: null|(()=>void)}|null}\n   */ _ensureMedia() {\n        if (!this.ctx._osThemeMedia) {\n            const dark = $e4b487e979d7c06d$var$BrowserAPIs.matchMedia($e4b487e979d7c06d$var$DARK_QUERY);\n            const contrast = $e4b487e979d7c06d$var$BrowserAPIs.matchMedia($e4b487e979d7c06d$var$CONTRAST_QUERY);\n            if (!dark && !contrast) return null;\n            this.ctx._osThemeMedia = {\n                dark: dark,\n                contrast: contrast,\n                handler: null\n            };\n        }\n        return this.ctx._osThemeMedia;\n    }\n    /**\n   * Write the OS-resolved mode / high-contrast onto the live `w.config.theme`.\n   * @param {{dark: MediaQueryList|null, contrast: MediaQueryList|null}} media\n   */ _applyToConfig(media) {\n        const theme = this.w.config.theme;\n        if (media.dark) theme.mode = media.dark.matches ? \"dark\" : \"light\";\n        if (media.contrast && media.contrast.matches) {\n            theme.accessibility = theme.accessibility || {};\n            theme.accessibility.colorBlindMode = \"highContrast\";\n        }\n    }\n    /**\n   * Attach the `change` listener once. The handler closes over `ctx` + `media`\n   * (both stable across re-renders), NOT over `this` (a fresh watcher is built\n   * each create), so it never goes stale.\n   * @param {{dark: MediaQueryList|null, contrast: MediaQueryList|null, handler: null|(()=>void)}} media\n   */ _ensureListeners(media) {\n        if (media.handler) return;\n        const ctx = this.ctx;\n        const handler = ()=>{\n            const m2 = ctx._osThemeMedia;\n            if (!m2) return;\n            const themeOpt = {\n                mode: m2.dark && m2.dark.matches ? \"dark\" : \"light\"\n            };\n            if (m2.contrast && m2.contrast.matches) themeOpt.accessibility = {\n                colorBlindMode: \"highContrast\"\n            };\n            else themeOpt.accessibility = {\n                colorBlindMode: \"\"\n            };\n            ctx.updateOptions({\n                theme: themeOpt\n            }, false, true, false);\n        };\n        $e4b487e979d7c06d$var$OSThemeWatcher._add(media.dark, handler);\n        $e4b487e979d7c06d$var$OSThemeWatcher._add(media.contrast, handler);\n        media.handler = handler;\n    }\n    /** Remove the listeners and drop the stashed media. Called on full destroy. */ teardown() {\n        const media = this.ctx._osThemeMedia;\n        if (!media) return;\n        if (media.handler) {\n            $e4b487e979d7c06d$var$OSThemeWatcher._remove(media.dark, media.handler);\n            $e4b487e979d7c06d$var$OSThemeWatcher._remove(media.contrast, media.handler);\n        }\n        this.ctx._osThemeMedia = null;\n    }\n    /**\n   * @param {MediaQueryList|null} mql @param {()=>void} handler\n   */ static _add(mql, handler) {\n        if (!mql) return;\n        if (typeof mql.addEventListener === \"function\") mql.addEventListener(\"change\", handler);\n        else if (typeof /** @type {any} */ mql.addListener === \"function\") mql.addListener(handler);\n    }\n    /**\n   * @param {MediaQueryList|null} mql @param {()=>void} handler\n   */ static _remove(mql, handler) {\n        if (!mql) return;\n        if (typeof mql.removeEventListener === \"function\") mql.removeEventListener(\"change\", handler);\n        else if (typeof /** @type {any} */ mql.removeListener === \"function\") mql.removeListener(handler);\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    osThemeWatcher: $e4b487e979d7c06d$var$OSThemeWatcher\n});\nconst $e4b487e979d7c06d$var$MARK_SELECTOR = [\n    \".apexcharts-bar-area\",\n    \".apexcharts-candlestick-area\",\n    \".apexcharts-boxPlot-area\",\n    \".apexcharts-rangebar-area\",\n    \".apexcharts-marker\"\n].join(\", \");\nconst $e4b487e979d7c06d$var$FILTER_MARK_SELECTOR = [\n    \".apexcharts-pie-area\",\n    \".apexcharts-bar-area\"\n].join(\", \");\nconst $e4b487e979d7c06d$var$DIMMED_CLASS = \"apexcharts-crossfilter-dimmed\";\nconst $e4b487e979d7c06d$var$PIE_TYPES = [\n    \"pie\",\n    \"donut\",\n    \"polarArea\",\n    \"radialBar\"\n];\nclass $e4b487e979d7c06d$var$LinkedViews {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this._dimmed = false;\n        this._wired = false;\n        this._pending = false;\n        this._lastValues = null;\n        this._onPointSelect = this._onPointSelect.bind(this);\n        this._afterRender = this._afterRender.bind(this);\n        this._onChange = this._onChange.bind(this);\n        if (this._mode() === \"filter\") this._initEngine();\n    }\n    /** @returns {'highlight'|'filter'|'off'} */ _mode() {\n        const link = this.w.config.chart.link;\n        if (link && typeof link.dimension === \"function\") return \"filter\";\n        if (link && link.enabled) return \"highlight\";\n        return \"off\";\n    }\n    _enabled() {\n        const link = this.w.config.chart.link;\n        return !!(link && link.enabled);\n    }\n    /**\n   * The source chart's rectangle brush produced a data-x range. In FILTER mode\n   * this becomes a `[min,max]` range filter on the chart's dimension (the other\n   * charts re-aggregate). In HIGHLIGHT mode (P1) it dims out-of-range marks\n   * across the group. Called (null-safe) from ZoomPanSelection selectionDrawn /\n   * selectionDragging.\n   * @param {{min:number, max:number}} xaxis\n   */ onSourceSelection(xaxis) {\n        var _a;\n        const mode = this._mode();\n        if (mode === \"off\") return;\n        if (!xaxis || xaxis.min == null || xaxis.max == null) return;\n        let min = Math.min(xaxis.min, xaxis.max);\n        let max = Math.max(xaxis.min, xaxis.max);\n        const gMinX = this.w.globals.minX;\n        const gMaxX = this.w.globals.maxX;\n        if (isFinite(gMinX) && isFinite(gMaxX) && gMaxX > gMinX) {\n            const tol = (gMaxX - gMinX) * 1e-6;\n            if (min - gMinX <= tol) min = gMinX;\n            if (gMaxX - max <= tol) max = gMaxX;\n        }\n        if (mode === \"filter\") {\n            const cf = this._cf();\n            if (!cf) return;\n            cf.filter(this._chartId(), [\n                min,\n                max\n            ]);\n            this._fireFilterChange(cf, [\n                min,\n                max\n            ]);\n            return;\n        }\n        this._group().forEach((ch)=>{\n            var _a2;\n            (_a2 = ch == null ? void 0 : ch.linkedViews) == null || _a2.applyDim(min, max);\n        });\n        const args = {\n            xaxis: {\n                min: min,\n                max: max\n            },\n            sourceChartID: this.w.globals.chartID\n        };\n        if (typeof this.w.config.chart.events.crossFilter === \"function\") this.w.config.chart.events.crossFilter(this.ctx, args);\n        (_a = this.ctx.events) == null || _a.fireEvent(\"crossFilter\", [\n            this.ctx,\n            args\n        ]);\n    }\n    /** self + grouped siblings (dedup-safe; getGroupedCharts excludes self). */ _group() {\n        const siblings = typeof this.ctx.getGroupedCharts === \"function\" ? this.ctx.getGroupedCharts() : [];\n        return [\n            this.ctx,\n            ...siblings\n        ];\n    }\n    /**\n   * Dim this chart's marks whose x is outside [min,max]; un-dim those inside.\n   * No re-render, so mark identities are preserved.\n   * @param {number} min @param {number} max\n   */ applyDim(min, max) {\n        if (!this._enabled()) return;\n        const w2 = this.w;\n        const baseEl = w2.dom.baseEl;\n        if (!baseEl) return;\n        const dimOpacity = w2.config.chart.link.dimOpacity;\n        if (w2.dom.elWrap && typeof dimOpacity === \"number\") w2.dom.elWrap.style.setProperty(\"--apx-cf-dim\", String(dimOpacity));\n        const seriesX = w2.globals.seriesX || [];\n        const marks = baseEl.querySelectorAll($e4b487e979d7c06d$var$MARK_SELECTOR);\n        marks.forEach((node)=>{\n            const jAttr = node.getAttribute(\"j\");\n            if (jAttr === null) return;\n            const j = parseInt(jAttr, 10);\n            const iAttr = node.getAttribute(\"index\");\n            const i2 = iAttr === null ? 0 : parseInt(iAttr, 10);\n            const row = seriesX[i2] || seriesX[0];\n            if (!row) return;\n            const x = row[j];\n            if (x == null) return;\n            node.classList.toggle($e4b487e979d7c06d$var$DIMMED_CLASS, x < min || x > max);\n        });\n        this._dimmed = true;\n    }\n    /** Remove dimming from this chart only. */ clear() {\n        const baseEl = this.w.dom.baseEl;\n        if (!baseEl) return;\n        baseEl.querySelectorAll(\".\" + $e4b487e979d7c06d$var$DIMMED_CLASS).forEach((n2)=>n2.classList.remove($e4b487e979d7c06d$var$DIMMED_CLASS));\n        this._dimmed = false;\n    }\n    /** Clear dimming across the whole group (backs chart.clearCrossfilter). */ clearGroup() {\n        if (this._mode() === \"filter\") {\n            const cf = this._cf();\n            if (cf) cf.reset();\n            return;\n        }\n        this._group().forEach((ch)=>{\n            var _a;\n            return (_a = ch == null ? void 0 : ch.linkedViews) == null ? void 0 : _a.clear();\n        });\n    }\n    // ─── FILTER mode (crossfilter engine glue) ───────────────────────────────\n    /**\n   * The chart's stable internal id (keys its dimension in the coordinator).\n   * Always set by the ApexCharts constructor (falls back to a cuid).\n   * @returns {string}\n   */ _chartId() {\n        return /** @type {string} */ this.w.globals.chartID;\n    }\n    /** @returns {import('./Crossfilter').default|null} the coordinator, or null */ _cf() {\n        const link = this.w.config.chart.link;\n        const id = link && (link.id || this.w.config.chart.group);\n        return id ? $e4b487e979d7c06d$var$se.get(id) : null;\n    }\n    _isPie() {\n        return $e4b487e979d7c06d$var$PIE_TYPES.indexOf(this.w.config.chart.type) !== -1;\n    }\n    _isHeatmap() {\n        return this.w.config.chart.type === \"heatmap\";\n    }\n    /**\n   * Before the first render: resolve the coordinator, register this chart's\n   * dimension, inject the initial aggregated series into w.config (so the first\n   * paint is already aggregated, no empty flash), and wire the listeners.\n   */ _initEngine() {\n        const cf = this._cf();\n        const link = this.w.config.chart.link;\n        if (!cf) {\n            const id = link && link.id || this.w.config.chart.group;\n            console.warn(`[apexcharts] chart.link.dimension is set but no crossfilter coordinator \"${id}\" exists. Call ApexCharts.crossfilter({ id, records }) before creating the chart.`);\n            return;\n        }\n        const chartId = this._chartId();\n        if (!cf.hasDimension(chartId)) cf.registerDimension(chartId, {\n            dimension: link.dimension,\n            reduce: link.reduce,\n            // heatmap => 2D matrix dimension (accessor returns [xKey, yKey]).\n            type: link.type || (this._isHeatmap() ? \"matrix\" : void 0),\n            bins: link.bins,\n            order: link.order\n        });\n        this._injectSeries(cf.aggregateFor(chartId));\n        this._wire(cf);\n    }\n    /**\n   * Build the chart's series value from an aggregation, shaped by chart type:\n   *   matrix (heatmap) -> [{ name:yKey, data:[{x:xKey, y:value}] }]\n   *   pie/donut  -> number[]\n   *   axis + category -> [{ name, data:number[] }] (categories set separately)\n   *   axis + range    -> [{ name, data:[x,value][] }] on a numeric/time x-axis\n   * @param {any} agg\n   */ _seriesFromAgg(agg) {\n        if (agg.type === \"matrix\") return agg.yLabels.map((yl, yi)=>({\n                name: String(yl),\n                data: agg.xLabels.map((xl, xi)=>({\n                        x: String(xl),\n                        y: agg.matrix[yi][xi]\n                    }))\n            }));\n        if (this._isPie()) return agg.values.slice();\n        const name2 = this.w.config.chart.link.seriesName || \"Count\";\n        if (agg.type === \"range\") return [\n            {\n                name: name2,\n                data: agg.labels.map((x, i2)=>[\n                        x,\n                        agg.values[i2]\n                    ])\n            }\n        ];\n        return [\n            {\n                name: name2,\n                data: agg.values.slice()\n            }\n        ];\n    }\n    /**\n   * Value signature used to skip a reflow when only dimming changed.\n   * @param {any} agg\n   */ _sigOf(agg) {\n        return JSON.stringify(agg.matrix || agg.values);\n    }\n    /**\n   * Write the aggregation into w.config as the chart's series/labels. Runs once\n   * before the first paint; later updates go through updateSeries.\n   * @param {any} agg\n   */ _injectSeries(agg) {\n        const w2 = this.w;\n        this._lastValues = this._sigOf(agg);\n        w2.config.series = this._seriesFromAgg(agg);\n        if (agg.type === \"matrix\") return;\n        if (this._isPie()) w2.config.labels = agg.labels.map(String);\n        else if (agg.type === \"category\") {\n            if (!w2.config.xaxis) w2.config.xaxis = {};\n            w2.config.xaxis.categories = agg.labels.map(String);\n        } else if (agg.type === \"range\") this._pinRangeDomain(agg.edges);\n    }\n    /**\n   * Pin the numeric/datetime x-axis to the outer bin edges of a range-binned\n   * dimension (unless the user set xaxis.min/max explicitly). See _injectSeries.\n   * @param {number[]|null|undefined} edges\n   */ _pinRangeDomain(edges) {\n        if (!Array.isArray(edges) || edges.length < 2) return;\n        const w2 = this.w;\n        if (!w2.config.xaxis) w2.config.xaxis = /** @type {any} */ {};\n        if (w2.config.xaxis.min == null) w2.config.xaxis.min = edges[0];\n        if (w2.config.xaxis.max == null) w2.config.xaxis.max = edges[edges.length - 1];\n    }\n    /** @param {import('./Crossfilter').default} cf */ _wire(cf) {\n        if (this._wired) return;\n        this._wired = true;\n        this.ctx.addEventListener(\"dataPointSelection\", this._onPointSelect);\n        this.ctx.addEventListener(\"mounted\", this._afterRender);\n        this.ctx.addEventListener(\"updated\", this._afterRender);\n        cf.on(\"change\", this._onChange);\n    }\n    /**\n   * A pie slice / bar was clicked: toggle its bucket key on the coordinator.\n   * @param {any} _e @param {any} _ctx @param {{dataPointIndex?:number}} opts\n   */ _onPointSelect(_e, _ctx, opts) {\n        if (this._mode() !== \"filter\" || !opts || opts.dataPointIndex == null) return;\n        const cf = this._cf();\n        if (!cf) return;\n        const chartId = this._chartId();\n        const agg = cf.aggregateFor(chartId);\n        if (agg.type === \"matrix\") return;\n        const key = agg.keys[opts.dataPointIndex];\n        if (key == null) return;\n        cf.toggleKey(chartId, key);\n        this._fireFilterChange(cf, key);\n    }\n    /** Coordinator filter changed: re-aggregate this chart on a microtask so the\n   *  triggering click handler unwinds before we destroy/redraw the DOM. */ _onChange() {\n        if (this._mode() !== \"filter\" || this._pending) return;\n        this._pending = true;\n        Promise.resolve().then(()=>{\n            this._pending = false;\n            if (this.w.globals.isDestroyed) return;\n            this._applyAggregation();\n        });\n    }\n    /**\n   * Pull this chart's crossfilter aggregation and push it through updateSeries\n   * (animated). When the values are unchanged (e.g. only this chart's own\n   * filter moved, which it ignores for itself), skip the reflow and just\n   * refresh the self-dim.\n   */ _applyAggregation() {\n        if (this._mode() !== \"filter\") return;\n        const cf = this._cf();\n        if (!cf) return;\n        const agg = cf.aggregateFor(this._chartId());\n        const sig = this._sigOf(agg);\n        if (sig === this._lastValues) {\n            this._applySelfDim();\n            return;\n        }\n        this._lastValues = sig;\n        this.ctx.updateSeries(this._seriesFromAgg(agg), true);\n    }\n    _afterRender() {\n        if (this._mode() !== \"filter\") return;\n        const series = this.w.config.series;\n        if (!series || series.length === 0) {\n            this._reassertSeries();\n            return;\n        }\n        this._applySelfDim();\n    }\n    /** Restore the aggregated series after an external updateSeries emptied it.\n   *  Deferred a microtask so the triggering update fully unwinds first. */ _reassertSeries() {\n        if (this._pending) return;\n        this._pending = true;\n        Promise.resolve().then(()=>{\n            this._pending = false;\n            if (this.w.globals.isDestroyed) return;\n            const cf = this._cf();\n            if (!cf) return;\n            const agg = cf.aggregateFor(this._chartId());\n            const series = this._seriesFromAgg(agg);\n            if (!series.length) return;\n            this._lastValues = this._sigOf(agg);\n            this.ctx.updateSeries(series, true);\n        });\n    }\n    /**\n   * Dim this chart's own buckets that are not in its own filter (no filter ->\n   * none dimmed). Categorical: dim buckets whose key is not in the selected Set.\n   * Range: dim bins lying fully outside the selected `[min,max]`. Keyed by each\n   * mark's `j` (dataPointIndex) -> the aggregation key.\n   */ _applySelfDim() {\n        const cf = this._cf();\n        if (!cf) return;\n        const w2 = this.w;\n        const baseEl = w2.dom.baseEl;\n        if (!baseEl) return;\n        const chartId = this._chartId();\n        const filter = cf.filterOf(chartId);\n        const dimOpacity = w2.config.chart.link.dimOpacity;\n        if (w2.dom.elWrap && typeof dimOpacity === \"number\") w2.dom.elWrap.style.setProperty(\"--apx-cf-dim\", String(dimOpacity));\n        const isCategory = filter instanceof Set;\n        const isRange = Array.isArray(filter);\n        const agg = cf.aggregateFor(chartId);\n        if (agg.type === \"matrix\") return;\n        const keys = agg.keys;\n        baseEl.querySelectorAll($e4b487e979d7c06d$var$FILTER_MARK_SELECTOR).forEach((node)=>{\n            const jAttr = node.getAttribute(\"j\");\n            if (jAttr === null) return;\n            const key = keys[parseInt(jAttr, 10)];\n            let dim = false;\n            if (isCategory) dim = !/** @type {Set<any>} */ filter.has(key);\n            else if (isRange && Array.isArray(key)) dim = key[1] <= filter[0] || key[0] >= filter[1];\n            node.classList.toggle($e4b487e979d7c06d$var$DIMMED_CLASS, dim);\n        });\n        this._dimmed = !!filter;\n    }\n    /**\n   * Fire the `filterChange` event on this (source) chart.\n   * @param {import('./Crossfilter').default} cf @param {any} key\n   */ _fireFilterChange(cf, key) {\n        var _a;\n        const args = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, cf.state()), {\n            sourceChartID: this._chartId(),\n            key: key\n        });\n        const events = this.w.config.chart.events;\n        if (typeof events.filterChange === \"function\") events.filterChange(this.ctx, args);\n        (_a = this.ctx.events) == null || _a.fireEvent(\"filterChange\", [\n            this.ctx,\n            args\n        ]);\n    }\n    teardown() {\n        var _a, _b, _c, _d, _e, _f;\n        this.clear();\n        if (this._wired) {\n            (_b = (_a = this.ctx).removeEventListener) == null || _b.call(_a, \"dataPointSelection\", this._onPointSelect);\n            (_d = (_c = this.ctx).removeEventListener) == null || _d.call(_c, \"mounted\", this._afterRender);\n            (_f = (_e = this.ctx).removeEventListener) == null || _f.call(_e, \"updated\", this._afterRender);\n            const cf = this._cf();\n            if (cf) {\n                cf.off(\"change\", this._onChange);\n                cf.removeDimension(this._chartId());\n            }\n            this._wired = false;\n        }\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    linkedViews: $e4b487e979d7c06d$var$LinkedViews\n});\nconst $e4b487e979d7c06d$var$AC = /** @type {any} */ $e4b487e979d7c06d$export$2e2bcd8739ae039;\n$e4b487e979d7c06d$var$AC._crossfilterFactory = (opts)=>$e4b487e979d7c06d$var$se.getOrCreate(opts);\n$e4b487e979d7c06d$var$AC._crossfilterGet = (id)=>$e4b487e979d7c06d$var$se.get(id);\nconst $e4b487e979d7c06d$var$DRAG_CLASS = \"apexcharts-ink-draggable\";\nconst $e4b487e979d7c06d$var$TYPES = [\n    \"point\",\n    \"xaxis\",\n    \"yaxis\"\n];\nconst $e4b487e979d7c06d$var$EDGE_PX = 8;\nconst $e4b487e979d7c06d$var$CLICK_SLOP_PX = 2;\nconst $e4b487e979d7c06d$var$FONT_STEPS = [\n    10,\n    11,\n    12,\n    14,\n    17,\n    20\n];\nconst $e4b487e979d7c06d$var$MARKER_SHAPES = [\n    \"circle\",\n    \"square\",\n    \"diamond\",\n    \"triangle\"\n];\nconst $e4b487e979d7c06d$var$SHAPE_GLYPHS = {\n    circle: \"\\u25CF\",\n    square: \"\\u25A0\",\n    diamond: \"\\u25C6\",\n    triangle: \"\\u25B2\"\n};\nconst $e4b487e979d7c06d$var$NOTE_COLORS = [\n    \"#ffffff\",\n    \"#334155\",\n    \"#2563eb\",\n    \"#16a34a\",\n    \"#d97706\",\n    \"#dc2626\"\n];\nconst $e4b487e979d7c06d$var$TRASH_ICON = '<svg viewBox=\"0 0 24 24\" width=\"13\" height=\"13\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\"/></svg>';\nclass $e4b487e979d7c06d$var$InkLayer {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this._wired = false;\n        this._drag = null;\n        this._editor = null;\n        this._creating = false;\n        this._createSeq = 0;\n        this._attach = this._attach.bind(this);\n        this._onRerender = this._onRerender.bind(this);\n        this._onMove = this._onMove.bind(this);\n        this._onUp = this._onUp.bind(this);\n        this._onCreateClick = this._onCreateClick.bind(this);\n        this._onDocDownEditor = this._onDocDownEditor.bind(this);\n        if (this._enabledGlobally() || this._hasDraggable() || this._paletteEnabled()) this._wire();\n    }\n    _enabledGlobally() {\n        const ink = this.w.config.chart.ink;\n        return !!(ink && ink.enabled);\n    }\n    _paletteEnabled() {\n        const ink = this.w.config.chart.ink;\n        return !!(ink && ink.palette);\n    }\n    _snapEnabled() {\n        const ink = this.w.config.chart.ink;\n        return !!(ink && ink.snap);\n    }\n    // ─── P5: snap to gridlines ────────────────────────────────────────────────\n    /** @param {number} v @param {number[]} ticks @returns {number} nearest tick */ _nearest(v2, ticks) {\n        let best = v2;\n        let bd = Infinity;\n        for(let i2 = 0; i2 < ticks.length; i2++){\n            const d = Math.abs(ticks[i2] - v2);\n            if (d < bd) {\n                bd = d;\n                best = ticks[i2];\n            }\n        }\n        return best;\n    }\n    /**\n   * Snap an x value to the nearest x gridline (numeric axes only).\n   * @param {number} x\n   */ _snapX(x) {\n        if (!this._snapEnabled() || typeof x !== \"number\") return x;\n        const s2 = this.w.globals.xAxisScale;\n        return s2 && Array.isArray(s2.result) && s2.result.length ? this._nearest(x, s2.result) : x;\n    }\n    /**\n   * Snap a y value to the nearest y gridline.\n   * @param {number} y @param {number} si\n   */ _snapY(y, si) {\n        if (!this._snapEnabled() || typeof y !== \"number\") return y;\n        const scales = this.w.globals.yAxisScale;\n        const s2 = scales && scales[si];\n        return s2 && Array.isArray(s2.result) && s2.result.length ? this._nearest(y, s2.result) : y;\n    }\n    /** @param {string} type @returns {any[]} the config annotations of a type */ _annoList(type) {\n        const a2 = this.w.config.annotations;\n        if (!a2) return [];\n        const key = type === \"point\" ? \"points\" : type;\n        return Array.isArray(a2[key]) ? a2[key] : [];\n    }\n    /** @param {any} anno */ _isDraggable(anno) {\n        if (!anno) return false;\n        if (anno.draggable === true) return true;\n        if (anno.draggable === false) return false;\n        return this._enabledGlobally();\n    }\n    _hasDraggable() {\n        return $e4b487e979d7c06d$var$TYPES.some((t2)=>this._annoList(t2).some((p2)=>this._isDraggable(p2)));\n    }\n    _wire() {\n        if (this._wired) return;\n        this._wired = true;\n        this.ctx.addEventListener(\"mounted\", this._onRerender);\n        this.ctx.addEventListener(\"updated\", this._onRerender);\n    }\n    /**\n   * A full (re)render rebuilds the SVG and may swap the annotations config\n   * (updateOptions, undo restore), so an open editor card points at stale\n   * state: drop it (without committing) before rebinding handlers. Targeted\n   * redraws call _attach() directly and keep the card open.\n   */ _onRerender() {\n        this._closeEditor(false);\n        this._attach();\n        if (this._creating) {\n            const svg = this.w.dom.Paper && this.w.dom.Paper.node;\n            if (svg) {\n                svg.style.cursor = \"crosshair\";\n                svg.addEventListener(\"click\", this._onCreateClick, true);\n            }\n        }\n    }\n    /**\n   * After each (re)render, bind drag + edit handlers to every draggable\n   * annotation's elements. Idempotent via a per-node flag so a targeted redraw\n   * re-runs this without double-binding the untouched annotations.\n   */ _attach() {\n        const w2 = this.w;\n        const baseEl = w2.dom.baseEl;\n        if (!baseEl) return;\n        $e4b487e979d7c06d$var$TYPES.forEach((type)=>{\n            this._annoList(type).forEach((anno, index)=>{\n                if (!this._isDraggable(anno)) return;\n                if (!anno.id) anno.id = \"apexcharts-ink-\" + type + \"-\" + index + \"-\" + w2.globals.chartID;\n                baseEl.querySelectorAll(\".\" + anno.id).forEach((el)=>{\n                    if (el.__inkBound) return;\n                    el.__inkBound = true;\n                    el.style.cursor = \"move\";\n                    el.classList.add($e4b487e979d7c06d$var$DRAG_CLASS);\n                    el.addEventListener(\"mousedown\", (e2)=>this._onDown(e2, type, index));\n                    el.addEventListener(\"touchstart\", (e2)=>this._onDown(e2, type, index));\n                    el.addEventListener(\"dblclick\", (e2)=>{\n                        e2.preventDefault();\n                        e2.stopPropagation();\n                        this._startEdit(type, index, {\n                            select: true\n                        });\n                    });\n                });\n            });\n        });\n        if (this._paletteEnabled()) this._renderPalette();\n    }\n    // ─── drag / resize ────────────────────────────────────────────────────────\n    /**\n   * @param {any} e @param {string} type @param {number} index\n   */ _onDown(e2, type, index) {\n        if (e2.button && e2.button !== 0) return;\n        const w2 = this.w;\n        const doc = w2.dom.baseEl && w2.dom.baseEl.ownerDocument;\n        if (!doc) return;\n        e2.stopPropagation();\n        if (e2.cancelable) e2.preventDefault();\n        const isTouch = e2.type === \"touchstart\";\n        const ev = isTouch ? e2.touches[0] : e2;\n        const svgRoot = w2.dom.Paper && w2.dom.Paper.node;\n        const ctm = svgRoot && svgRoot.getScreenCTM ? svgRoot.getScreenCTM() : null;\n        const anno = this._annoList(type)[index];\n        let mode = \"move\";\n        let rect = null;\n        let origX = 0;\n        let origW = 0;\n        if (type === \"xaxis\" && anno.x2 != null) {\n            rect = w2.dom.baseEl.querySelector(\".apexcharts-annotation-rect.\" + anno.id);\n            if (rect) {\n                const r2 = rect.getBoundingClientRect();\n                if (Math.abs(ev.clientX - r2.left) <= $e4b487e979d7c06d$var$EDGE_PX) mode = \"resize-x1\";\n                else if (Math.abs(ev.clientX - r2.right) <= $e4b487e979d7c06d$var$EDGE_PX) mode = \"resize-x2\";\n                origX = parseFloat(rect.getAttribute(\"x\")) || 0;\n                origW = parseFloat(rect.getAttribute(\"width\")) || 0;\n            }\n        }\n        this._drag = {\n            type: type,\n            index: index,\n            anno: anno,\n            els: Array.from(w2.dom.baseEl.querySelectorAll(\".\" + anno.id)),\n            mode: mode,\n            rect: rect,\n            origX: origX,\n            origW: origW,\n            startX: ev.clientX,\n            startY: ev.clientY,\n            scaleX: ctm && ctm.a ? ctm.a : 1,\n            scaleY: ctm && ctm.d ? ctm.d : 1,\n            dxPixel: 0,\n            dyPixel: 0,\n            moved: false\n        };\n        doc.addEventListener(\"mousemove\", this._onMove);\n        doc.addEventListener(\"touchmove\", this._onMove, {\n            passive: false\n        });\n        doc.addEventListener(\"mouseup\", this._onUp);\n        doc.addEventListener(\"touchend\", this._onUp);\n    }\n    /** @param {any} me */ _onMove(me) {\n        const d = this._drag;\n        if (!d) return;\n        if (me.cancelable) me.preventDefault();\n        const mev = me.type === \"touchmove\" ? me.touches[0] : me;\n        d.dxPixel = (mev.clientX - d.startX) / d.scaleX;\n        d.dyPixel = (mev.clientY - d.startY) / d.scaleY;\n        if (Math.abs(d.dxPixel) > $e4b487e979d7c06d$var$CLICK_SLOP_PX || Math.abs(d.dyPixel) > $e4b487e979d7c06d$var$CLICK_SLOP_PX) d.moved = true;\n        if (d.mode === \"move\") {\n            const t2 = `translate(${d.dxPixel} ${d.dyPixel})`;\n            d.els.forEach((el)=>el.setAttribute(\"transform\", t2));\n        } else if (d.rect) {\n            if (d.mode === \"resize-x1\") {\n                d.rect.setAttribute(\"x\", d.origX + d.dxPixel);\n                d.rect.setAttribute(\"width\", Math.max(1, d.origW - d.dxPixel));\n            } else if (d.mode === \"resize-x2\") d.rect.setAttribute(\"width\", Math.max(1, d.origW + d.dxPixel));\n        }\n    }\n    _onUp() {\n        const d = this._drag;\n        this._drag = null;\n        this._teardownDocListeners();\n        if (!d || !d.moved) {\n            if (d) {\n                d.els.forEach((el)=>el.removeAttribute(\"transform\"));\n                this._startEdit(d.type, d.index);\n            }\n            return;\n        }\n        const anno = this._annoList(d.type)[d.index];\n        if (!anno) return;\n        this._applyDelta(d, anno);\n        d.els.forEach((el)=>el.removeAttribute(\"transform\"));\n        this._redrawAnno(d.type, anno, d.index);\n        this._checkpoint(\"ink:drag\");\n        this._fireDragged(d.type, anno, d.index);\n    }\n    /**\n   * Record a Rewind (undo) checkpoint for an ink edit. Targeted redraws fire no\n   * 'updated' event, so History would otherwise miss them. No-op when the\n   * history feature is absent or disabled.\n   * @param {string} label\n   */ _checkpoint(label) {\n        var _a, _b;\n        (_b = (_a = this.ctx.history) == null ? void 0 : _a.snapshot) == null || _b.call(_a, label);\n    }\n    /**\n   * Mutate the annotation's config from the pixel drag delta (type + mode aware).\n   * @param {any} d @param {any} anno\n   */ _applyDelta(d, anno) {\n        const w2 = this.w;\n        const dxData = w2.layout.gridWidth ? d.dxPixel * (w2.globals.xRange / w2.layout.gridWidth) : 0;\n        if (d.type === \"point\") {\n            const { newX: newX, newY: newY } = this._invertPoint(anno, d.dxPixel, d.dyPixel);\n            anno.x = this._snapX(newX);\n            if (newY != null) {\n                const yi = anno.yAxisIndex || 0;\n                const map = w2.globals.seriesYAxisMap;\n                anno.y = this._snapY(newY, map && map[yi] ? map[yi][0] : 0);\n            }\n            return;\n        }\n        if (d.type === \"xaxis\") {\n            if (typeof anno.x !== \"number\") return;\n            if (d.mode === \"move\") {\n                if (typeof anno.x2 === \"number\") {\n                    anno.x += dxData;\n                    anno.x2 += dxData;\n                } else anno.x = this._snapX(anno.x + dxData);\n            } else if (d.mode === \"resize-x1\" || d.mode === \"resize-x2\") {\n                const xIsLeft = anno.x2 == null || anno.x <= anno.x2;\n                const grow = d.mode === \"resize-x2\" ? !xIsLeft : xIsLeft;\n                if (grow) anno.x = this._snapX(anno.x + dxData);\n                else if (typeof anno.x2 === \"number\") anno.x2 = this._snapX(anno.x2 + dxData);\n            }\n            return;\n        }\n        if (d.type === \"yaxis\") {\n            const yi = anno.yAxisIndex || 0;\n            const map = w2.globals.seriesYAxisMap;\n            const si = map && map[yi] ? map[yi][0] : 0;\n            const yRange = w2.globals.yRange ? w2.globals.yRange[si] : null;\n            if (yRange == null || !w2.layout.gridHeight) return;\n            const dyData = -d.dyPixel * (yRange / w2.layout.gridHeight);\n            if (typeof anno.y2 === \"number\") {\n                if (typeof anno.y === \"number\") anno.y += dyData;\n                anno.y2 += dyData;\n            } else if (typeof anno.y === \"number\") anno.y = this._snapY(anno.y + dyData, si);\n        }\n    }\n    /**\n   * Invert a pixel drag delta to a point annotation's data x/y.\n   * @param {any} anno @param {number} dxPixel @param {number} dyPixel\n   * @returns {{newX:any, newY:any}}\n   */ _invertPoint(anno, dxPixel, dyPixel) {\n        const w2 = this.w;\n        const categoryX = (w2.config.xaxis.type === \"category\" || w2.config.xaxis.convertedCatToNumeric) && !w2.axisFlags.dataFormatXNumeric;\n        let newX = anno.x;\n        if (!categoryX && typeof anno.x === \"number\" && w2.layout.gridWidth) newX = anno.x + dxPixel * (w2.globals.xRange / w2.layout.gridWidth);\n        let newY = anno.y;\n        const yi = anno.yAxisIndex || 0;\n        const map = w2.globals.seriesYAxisMap;\n        const si = map && map[yi] ? map[yi][0] : 0;\n        const yRange = w2.globals.yRange ? w2.globals.yRange[si] : null;\n        const logY = w2.config.yaxis[yi] && w2.config.yaxis[yi].logarithmic;\n        if (typeof anno.y === \"number\" && yRange != null && !logY && w2.layout.gridHeight) newY = anno.y - dyPixel * (yRange / w2.layout.gridHeight);\n        return {\n            newX: newX,\n            newY: newY\n        };\n    }\n    /**\n   * Targeted redraw of one annotation: drop its elements and re-add the shape +\n   * label + label background at the current config coordinates (no full chart\n   * re-render, and repeat-safe unlike updateOptions({})).\n   * @param {string} type @param {any} anno @param {number} index\n   */ _redrawAnno(type, anno, index) {\n        const w2 = this.w;\n        const baseEl = w2.dom.baseEl;\n        const annotations = this.ctx.annotations;\n        if (!baseEl || !annotations) return;\n        baseEl.querySelectorAll(\".\" + anno.id).forEach((el)=>el.remove());\n        const group = baseEl.querySelector(\".apexcharts-\" + type + \"-annotations\");\n        if (!group) return;\n        if (type === \"point\" && annotations.pointsAnnotations) annotations.pointsAnnotations.addPointAnnotation(anno, group, index);\n        else if (type === \"xaxis\" && annotations.xAxisAnnotations) annotations.xAxisAnnotations.addXaxisAnnotation(anno, group, index);\n        else if (type === \"yaxis\" && annotations.yAxisAnnotations) annotations.yAxisAnnotations.addYaxisAnnotation(anno, group, index);\n        const labelEl = baseEl.querySelector(\".apexcharts-\" + type + \"-annotation-label.\" + anno.id);\n        if (labelEl && annotations.helpers && anno.label && anno.label.text) {\n            const elRect = annotations.helpers.addBackgroundToAnno(labelEl, anno);\n            if (elRect && labelEl.parentNode) labelEl.parentNode.insertBefore(elRect.node, labelEl);\n        }\n        this._attach();\n    }\n    /**\n   * Dispatch an ink annotation lifecycle event both to the user callback\n   * (`chart.events[name]`) and the internal event bus, in that order.\n   * @param {string} name @param {any} args\n   */ _fireAnnotationEvent(name2, args) {\n        var _a;\n        const events = this.w.config.chart.events;\n        if (typeof events[name2] === \"function\") events[name2](this.ctx, args);\n        (_a = this.ctx.events) == null || _a.fireEvent(name2, [\n            this.ctx,\n            args\n        ]);\n    }\n    /** @param {string} type @param {any} anno @param {number} index */ _fireDragged(type, anno, index) {\n        const args = {\n            type: type,\n            id: anno.id,\n            index: index,\n            x: anno.x,\n            y: anno.y\n        };\n        if (anno.x2 != null) args.x2 = anno.x2;\n        if (anno.y2 != null) args.y2 = anno.y2;\n        this._fireAnnotationEvent(\"annotationDragged\", args);\n    }\n    // ─── P3: click-to-create ─────────────────────────────────────────────────\n    /**\n   * Enter create mode: the next click on the plot area drops a new draggable\n   * point annotation there and opens its label editor.\n   */ startCreate() {\n        if (this._creating) return;\n        const svg = this.w.dom.Paper && this.w.dom.Paper.node;\n        if (!svg) return;\n        this._creating = true;\n        svg.style.cursor = \"crosshair\";\n        svg.addEventListener(\"click\", this._onCreateClick, true);\n        this._syncPalette();\n    }\n    /** Leave create mode. */ stopCreate() {\n        if (!this._creating) return;\n        this._creating = false;\n        const svg = this.w.dom.Paper && this.w.dom.Paper.node;\n        if (svg) {\n            svg.style.cursor = \"\";\n            svg.removeEventListener(\"click\", this._onCreateClick, true);\n        }\n        this._syncPalette();\n    }\n    /** @param {any} e */ _onCreateClick(e2) {\n        if (!this._creating) return;\n        e2.preventDefault();\n        e2.stopPropagation();\n        const pos = this._pixelToData(e2.clientX, e2.clientY);\n        this.stopCreate();\n        if (!pos) return;\n        this.createAt(pos.x, pos.y);\n    }\n    /**\n   * Create a draggable note at data coordinates and open its editor card.\n   * Public: the context menu's \"Add note here\" routes here so its notes are\n   * config-backed too, and thus draggable, editable, persistable and undoable.\n   * @param {any} x @param {any} y @param {{text?: string}} [opts]\n   * @returns {any} the created annotation config\n   */ createAt(x, y, opts = {}) {\n        const w2 = this.w;\n        this._wire();\n        this._createSeq += 1;\n        const id = \"apexcharts-ink-new-\" + this._createSeq + \"-\" + w2.globals.chartID;\n        const anno = $e4b487e979d7c06d$var$Utils$1.extend(new $e4b487e979d7c06d$var$Options().pointAnnotation, {\n            x: x,\n            y: y,\n            id: id,\n            draggable: true,\n            label: {\n                text: opts.text || \"Note\"\n            }\n        });\n        if (!w2.config.annotations) w2.config.annotations = {};\n        if (!Array.isArray(w2.config.annotations.points)) w2.config.annotations.points = [];\n        w2.config.annotations.points.push(anno);\n        const index = w2.config.annotations.points.length - 1;\n        this._redrawAnno(\"point\", anno, index);\n        this._checkpoint(\"ink:create\");\n        this._fireCreated(\"point\", anno, index);\n        this._startEdit(\"point\", index, {\n            select: true\n        });\n        return anno;\n    }\n    /**\n   * Create a draggable dashed LINE annotation at a data value and open its\n   * editor card: axis 'x' drops a vertical line at a data x, axis 'y' a\n   * horizontal line at a data y. Public: the context menu's \"Annotate here\"\n   * routes here so its lines are config-backed too, and thus draggable,\n   * editable, persistable and undoable. Lines only: x2/y2 are never set, so\n   * this can never produce a range rectangle.\n   * @param {'x'|'y'} axis @param {any} val\n   * @param {{text?: string, strokeDashArray?: number, color?: string, select?: boolean}} [opts]\n   * @returns {any} the created annotation config\n   */ createLineAt(axis, val, opts = {}) {\n        const w2 = this.w;\n        this._wire();\n        this._createSeq += 1;\n        const id = \"apexcharts-ink-new-\" + this._createSeq + \"-\" + w2.globals.chartID;\n        const type = axis === \"y\" ? \"yaxis\" : \"xaxis\";\n        const defaults = type === \"yaxis\" ? new $e4b487e979d7c06d$var$Options().yAxisAnnotation : new $e4b487e979d7c06d$var$Options().xAxisAnnotation;\n        const over = {\n            id: id,\n            draggable: true,\n            strokeDashArray: opts.strokeDashArray != null ? opts.strokeDashArray : 4,\n            label: {\n                text: opts.text || \"\"\n            }\n        };\n        if (opts.color) {\n            over.borderColor = opts.color;\n            over.label.borderColor = opts.color;\n        }\n        if (type === \"yaxis\") over.y = val;\n        else over.x = val;\n        const anno = $e4b487e979d7c06d$var$Utils$1.extend(defaults, over);\n        if (!w2.config.annotations) w2.config.annotations = {};\n        if (!Array.isArray(w2.config.annotations[type])) w2.config.annotations[type] = [];\n        w2.config.annotations[type].push(anno);\n        const index = w2.config.annotations[type].length - 1;\n        this._redrawAnno(type, anno, index);\n        this._checkpoint(\"ink:create\");\n        this._fireCreated(type, anno, index);\n        if (opts.select !== false) this._startEdit(type, index, {\n            select: true\n        });\n        return anno;\n    }\n    /**\n   * Convert a client-space point to data coordinates (absolute, for create).\n   * @param {number} clientX @param {number} clientY\n   * @returns {{x:any, y:any}|null}\n   */ _pixelToData(clientX, clientY) {\n        const w2 = this.w;\n        const gridEl = w2.dom.baseEl && w2.dom.baseEl.querySelector(\".apexcharts-grid\");\n        if (!gridEl) return null;\n        const g2 = gridEl.getBoundingClientRect();\n        if (!g2.width || !g2.height) return null;\n        const fx = (clientX - g2.left) / g2.width;\n        const fy = (clientY - g2.top) / g2.height;\n        const minX = w2.globals.minX;\n        const xRange = w2.globals.xRange;\n        const minY = w2.globals.minYArr && w2.globals.minYArr[0] != null ? w2.globals.minYArr[0] : w2.globals.minY;\n        const yRange = w2.globals.yRange && w2.globals.yRange[0] != null ? w2.globals.yRange[0] : w2.globals.maxY - w2.globals.minY;\n        let x = minX + fx * xRange;\n        const y = minY + (1 - fy) * yRange;\n        const categoryX = (w2.config.xaxis.type === \"category\" || w2.config.xaxis.convertedCatToNumeric) && !w2.axisFlags.dataFormatXNumeric;\n        if (categoryX) x = Math.round(x);\n        return {\n            x: x,\n            y: y\n        };\n    }\n    /** @param {string} type @param {any} anno @param {number} index */ _fireCreated(type, anno, index) {\n        const args = {\n            type: type,\n            id: anno.id,\n            index: index\n        };\n        if (typeof anno.x !== \"undefined\") args.x = anno.x;\n        if (typeof anno.y !== \"undefined\") args.y = anno.y;\n        this._fireAnnotationEvent(\"annotationCreated\", args);\n    }\n    // ─── P3: tool palette ────────────────────────────────────────────────────\n    /** Render a minimal \"add note\" toggle into the chart wrap (once per render). */ _renderPalette() {\n        const w2 = this.w;\n        const elWrap = w2.dom.elWrap;\n        if (!elWrap || elWrap.querySelector(\".apexcharts-ink-palette\")) return;\n        const doc = elWrap.ownerDocument;\n        const bar = doc.createElement(\"div\");\n        bar.className = \"apexcharts-ink-palette\";\n        const s2 = bar.style;\n        s2.position = \"absolute\";\n        s2.top = \"6px\";\n        s2.left = \"6px\";\n        s2.zIndex = \"15\";\n        const btn = doc.createElement(\"button\");\n        btn.type = \"button\";\n        btn.className = \"apexcharts-ink-add\";\n        btn.textContent = \"+ Note\";\n        const bs = btn.style;\n        bs.cursor = \"pointer\";\n        bs.font = \"12px sans-serif\";\n        bs.padding = \"4px 9px\";\n        bs.borderRadius = \"5px\";\n        bs.border = \"1px solid #6366f1\";\n        bs.color = \"#4338ca\";\n        bs.background = \"#fff\";\n        btn.addEventListener(\"click\", (e2)=>{\n            e2.stopPropagation();\n            if (this._creating) this.stopCreate();\n            else this.startCreate();\n        });\n        bar.appendChild(btn);\n        elWrap.appendChild(bar);\n        this._syncPalette();\n    }\n    /** Reflect create-mode state on the palette button. */ _syncPalette() {\n        const elWrap = this.w.dom.elWrap;\n        const btn = /** @type {any} */ elWrap && elWrap.querySelector(\".apexcharts-ink-add\");\n        if (!btn) return;\n        if (this._creating) {\n            btn.style.background = \"#6366f1\";\n            btn.style.color = \"#fff\";\n            btn.textContent = \"Click chart...\";\n        } else {\n            btn.style.background = \"#fff\";\n            btn.style.color = \"#4338ca\";\n            btn.textContent = \"+ Note\";\n        }\n    }\n    // ─── P2 + P6: the floating note editor card ──────────────────────────────\n    // Click (or double-click) an ink-managed annotation to open a small card\n    // anchored to it: rename inline, recolor via accent swatches, toggle bold,\n    // step the font size, size/reshape the marker (points), or delete the note.\n    /** @returns {string[]} the accent swatches offered by the editor */ _noteColors() {\n        const ink = this.w.config.chart.ink;\n        return ink && Array.isArray(ink.noteColors) && ink.noteColors.length ? ink.noteColors : $e4b487e979d7c06d$var$NOTE_COLORS;\n    }\n    /**\n   * Perceived-luminance check so text/border contrast follows the accent.\n   * @param {string} hex\n   */ static _isLight(hex) {\n        const h2 = String(hex || \"\").replace(\"#\", \"\");\n        const full = h2.length === 3 ? h2.split(\"\").map((c2)=>c2 + c2).join(\"\") : h2;\n        const n2 = parseInt(full, 16);\n        if (isNaN(n2) || full.length !== 6) return false;\n        const r2 = n2 >> 16 & 255;\n        const g2 = n2 >> 8 & 255;\n        const b2 = n2 & 255;\n        return (0.299 * r2 + 0.587 * g2 + 0.114 * b2) / 255 > 0.72;\n    }\n    /** @param {any} style */ static _isBold(style) {\n        const fw = style && style.fontWeight;\n        return fw === \"bold\" || parseInt(String(fw), 10) >= 600;\n    }\n    /**\n   * Small icon/text button for the editor card. mousedown is prevented so the\n   * text input keeps focus while formatting.\n   * @param {any} doc @param {string} content @param {string} title\n   * @param {Function} onClick @param {string} [extraClass] @param {boolean} [isSvg]\n   */ _cardBtn(doc, content, title, onClick, extraClass, isSvg) {\n        const b2 = doc.createElement(\"button\");\n        b2.type = \"button\";\n        b2.className = \"apexcharts-ink-btn\" + (extraClass ? \" \" + extraClass : \"\");\n        b2.title = title;\n        b2.setAttribute(\"aria-label\", title);\n        if (isSvg) b2.innerHTML = content;\n        else b2.textContent = content;\n        b2.addEventListener(\"mousedown\", (e2)=>e2.preventDefault());\n        b2.addEventListener(\"click\", (e2)=>{\n            e2.stopPropagation();\n            onClick();\n        });\n        return b2;\n    }\n    /**\n   * Uppercase row caption (\"Label\" / \"Line\" / \"Marker\") for the editor card.\n   * @param {any} doc @param {string} text\n   */ _cardLabel(doc, text) {\n        const lab = doc.createElement(\"span\");\n        lab.className = \"apexcharts-ink-cardlabel\";\n        lab.textContent = text;\n        return lab;\n    }\n    /**\n   * Color swatch button for the editor card. mousedown is prevented so the\n   * text input keeps focus while restyling.\n   * @param {any} doc @param {string} c\n   * @param {(c: string) => void} pick @param {string} [extraClass]\n   */ _mkSwatch(doc, c2, pick, extraClass) {\n        const sw = doc.createElement(\"button\");\n        sw.type = \"button\";\n        sw.className = \"apexcharts-ink-swatch\" + (extraClass ? \" \" + extraClass : \"\");\n        sw.title = c2;\n        sw.setAttribute(\"aria-label\", \"Color \" + c2);\n        sw.dataset.color = c2;\n        sw.style.background = c2;\n        sw.addEventListener(\"mousedown\", (e2)=>e2.preventDefault());\n        sw.addEventListener(\"click\", (e2)=>{\n            e2.stopPropagation();\n            pick(c2);\n        });\n        return sw;\n    }\n    /**\n   * Open the floating editor card for an annotation.\n   * @param {string} type @param {number} index\n   * @param {{select?: boolean}} [opts] select: preselect the text (create / dblclick)\n   */ _startEdit(type, index, opts = {}) {\n        const w2 = this.w;\n        const anno = this._annoList(type)[index];\n        const baseEl = w2.dom.baseEl;\n        const elWrap = w2.dom.elWrap;\n        if (!anno || !anno.id || !baseEl || !elWrap) return;\n        this._closeEditor(false);\n        const doc = baseEl.ownerDocument;\n        const card = doc.createElement(\"div\");\n        card.className = \"apexcharts-ink-card\";\n        card.setAttribute(\"role\", \"dialog\");\n        card.setAttribute(\"aria-label\", \"Edit note\");\n        card.style.visibility = \"hidden\";\n        const rowText = doc.createElement(\"div\");\n        rowText.className = \"apexcharts-ink-card-row\";\n        const input = doc.createElement(\"input\");\n        input.type = \"text\";\n        input.className = \"apexcharts-ink-editor\";\n        input.placeholder = \"Note text\";\n        input.value = anno.label && anno.label.text || \"\";\n        rowText.appendChild(input);\n        rowText.appendChild(this._cardBtn(doc, $e4b487e979d7c06d$var$TRASH_ICON, \"Delete note\", ()=>this._deleteAnno(), \"apexcharts-ink-btn--delete\", true));\n        card.appendChild(rowText);\n        const rowStyle = doc.createElement(\"div\");\n        rowStyle.className = \"apexcharts-ink-card-row\";\n        if (type !== \"point\") rowStyle.appendChild(this._cardLabel(doc, \"Label\"));\n        this._noteColors().forEach((c2)=>{\n            rowStyle.appendChild(this._mkSwatch(doc, c2, (col)=>this._applyColor(col)));\n        });\n        const sep = doc.createElement(\"span\");\n        sep.className = \"apexcharts-ink-sep\";\n        rowStyle.appendChild(sep);\n        rowStyle.appendChild(this._cardBtn(doc, \"B\", \"Bold\", ()=>this._toggleBold(), \"apexcharts-ink-btn--bold\"));\n        rowStyle.appendChild(this._cardBtn(doc, \"A-\", \"Smaller text\", ()=>this._stepFont(-1)));\n        rowStyle.appendChild(this._cardBtn(doc, \"A+\", \"Larger text\", ()=>this._stepFont(1)));\n        card.appendChild(rowStyle);\n        if (type !== \"point\") {\n            const rowLine = doc.createElement(\"div\");\n            rowLine.className = \"apexcharts-ink-card-row\";\n            rowLine.appendChild(this._cardLabel(doc, \"Line\"));\n            this._noteColors().forEach((c2)=>{\n                rowLine.appendChild(this._mkSwatch(doc, c2, (col)=>this._applyLineColor(col), \"apexcharts-ink-swatch--line\"));\n            });\n            card.appendChild(rowLine);\n        }\n        if (type === \"point\") {\n            const rowMarker = doc.createElement(\"div\");\n            rowMarker.className = \"apexcharts-ink-card-row\";\n            rowMarker.appendChild(this._cardLabel(doc, \"Marker\"));\n            rowMarker.appendChild(this._cardBtn(doc, \"-\", \"Smaller marker\", ()=>this._stepMarker(-1)));\n            const sizeOut = doc.createElement(\"span\");\n            sizeOut.className = \"apexcharts-ink-marker-size\";\n            rowMarker.appendChild(sizeOut);\n            rowMarker.appendChild(this._cardBtn(doc, \"+\", \"Larger marker\", ()=>this._stepMarker(1)));\n            rowMarker.appendChild(this._cardBtn(doc, $e4b487e979d7c06d$var$SHAPE_GLYPHS.circle, \"Marker shape\", ()=>this._cycleShape(), \"apexcharts-ink-btn--shape\"));\n            card.appendChild(rowMarker);\n        }\n        elWrap.appendChild(card);\n        this._editor = {\n            card: card,\n            input: input,\n            type: type,\n            index: index\n        };\n        this._positionCard();\n        this._syncCard();\n        card.style.visibility = \"\";\n        input.focus();\n        if (opts.select) input.select();\n        card.addEventListener(\"keydown\", (e2)=>{\n            if (e2.key === \"Escape\") {\n                e2.preventDefault();\n                e2.stopPropagation();\n                this._closeEditor(false);\n            } else if (e2.key === \"Enter\" && e2.target === input) {\n                e2.preventDefault();\n                this._closeEditor(true);\n            }\n        });\n        doc.addEventListener(\"mousedown\", this._onDocDownEditor, true);\n        doc.addEventListener(\"touchstart\", this._onDocDownEditor, true);\n    }\n    /**\n   * Commit + close on any press outside the card.\n   * @param {any} e\n   */ _onDocDownEditor(e2) {\n        const ed = this._editor;\n        if (!ed || ed.card.contains(e2.target)) return;\n        this._closeEditor(true);\n    }\n    /**\n   * Anchor the card to the annotation's label (below it, or above when there\n   * is no room), clamped inside the chart wrap. Re-run after each restyle\n   * since the label rect changes.\n   */ _positionCard() {\n        const ed = this._editor;\n        if (!ed) return;\n        const w2 = this.w;\n        const baseEl = w2.dom.baseEl;\n        const elWrap = w2.dom.elWrap;\n        const anno = this._annoList(ed.type)[ed.index];\n        if (!baseEl || !elWrap || !anno) return;\n        const anchor = baseEl.querySelector(\".apexcharts-\" + ed.type + \"-annotation-label.\" + anno.id) || baseEl.querySelector(\".\" + anno.id);\n        if (!anchor) return;\n        const wrapRect = elWrap.getBoundingClientRect();\n        const aRect = anchor.getBoundingClientRect();\n        const cw = ed.card.offsetWidth;\n        const ch = ed.card.offsetHeight;\n        let left = Math.round(aRect.left - wrapRect.left);\n        let top = Math.round(aRect.bottom - wrapRect.top) + 8;\n        if (top + ch > elWrap.clientHeight - 4) top = Math.round(aRect.top - wrapRect.top) - ch - 8;\n        if (left + cw > elWrap.clientWidth - 4) left = elWrap.clientWidth - cw - 4;\n        ed.card.style.left = Math.max(4, left) + \"px\";\n        ed.card.style.top = Math.max(4, top) + \"px\";\n    }\n    /** Reflect the annotation's current style on the card controls. */ _syncCard() {\n        const ed = this._editor;\n        if (!ed) return;\n        const anno = this._annoList(ed.type)[ed.index];\n        if (!anno) return;\n        const style = anno.label && anno.label.style || {};\n        const bg = String(style.background || \"\").toLowerCase();\n        ed.card.querySelectorAll(\".apexcharts-ink-swatch:not(.apexcharts-ink-swatch--line)\").forEach((sw)=>{\n            sw.classList.toggle(\"apexcharts-ink-swatch--active\", (sw.dataset.color || \"\").toLowerCase() === bg);\n        });\n        const stroke = String(anno.borderColor || \"\").toLowerCase();\n        ed.card.querySelectorAll(\".apexcharts-ink-swatch--line\").forEach((sw)=>{\n            sw.classList.toggle(\"apexcharts-ink-swatch--active\", (sw.dataset.color || \"\").toLowerCase() === stroke);\n        });\n        const boldBtn = ed.card.querySelector(\".apexcharts-ink-btn--bold\");\n        if (boldBtn) boldBtn.classList.toggle(\"apexcharts-ink-btn--active\", $e4b487e979d7c06d$var$InkLayer._isBold(style));\n        const m2 = anno.marker || {};\n        const sizeOut = ed.card.querySelector(\".apexcharts-ink-marker-size\");\n        if (sizeOut) sizeOut.textContent = String(typeof m2.size === \"number\" ? m2.size : 4);\n        const shapeBtn = ed.card.querySelector(\".apexcharts-ink-btn--shape\");\n        if (shapeBtn) shapeBtn.textContent = $e4b487e979d7c06d$var$SHAPE_GLYPHS[m2.shape] || $e4b487e979d7c06d$var$SHAPE_GLYPHS.circle;\n    }\n    /**\n   * Commit the input's text into the annotation (the card stays open). Also\n   * runs before any style apply so typed-but-unconfirmed text survives the\n   * redraw.\n   * @param {any} ed\n   */ _commitTextOf(ed) {\n        const anno = this._annoList(ed.type)[ed.index];\n        if (!anno) return;\n        const text = ed.input.value;\n        if (!anno.label) anno.label = {};\n        if (anno.label.text === text) return;\n        anno.label.text = text;\n        this._redrawAnno(ed.type, anno, ed.index);\n        this._checkpoint(\"ink:edit\");\n        this._fireEdited(ed.type, anno, ed.index);\n    }\n    /**\n   * Close the editor card. commit=true also commits the pending text. Style\n   * edits apply immediately and are not rolled back by Escape; use undo.\n   * @param {boolean} commit\n   */ _closeEditor(commit) {\n        const ed = this._editor;\n        if (!ed) return;\n        this._editor = null;\n        const doc = this.w.dom.baseEl && this.w.dom.baseEl.ownerDocument;\n        if (doc) {\n            doc.removeEventListener(\"mousedown\", this._onDocDownEditor, true);\n            doc.removeEventListener(\"touchstart\", this._onDocDownEditor, true);\n        }\n        if (ed.card.parentNode) ed.card.parentNode.removeChild(ed.card);\n        if (commit) this._commitTextOf(ed);\n    }\n    /**\n   * Apply a config mutation from a card control: commit pending text, mutate,\n   * redraw, checkpoint for undo, then refresh + re-anchor the card.\n   * @param {string} label @param {(anno: any) => void} mutate\n   */ _applyStyle(label, mutate) {\n        const ed = this._editor;\n        if (!ed) return;\n        const anno = this._annoList(ed.type)[ed.index];\n        if (!anno) return;\n        this._commitTextOf(ed);\n        if (!anno.label) anno.label = {};\n        if (!anno.label.style) anno.label.style = {};\n        mutate(anno);\n        this._redrawAnno(ed.type, anno, ed.index);\n        this._checkpoint(label);\n        this._fireStyled(ed.type, anno, ed.index);\n        this._syncCard();\n        this._positionCard();\n    }\n    /**\n   * Apply an accent color: label chip + marker (points) or line/range fill\n   * (axis annotations), with text/border contrast following the luminance.\n   * @param {string} c\n   */ _applyColor(c2) {\n        const ed = this._editor;\n        if (!ed) return;\n        const light = $e4b487e979d7c06d$var$InkLayer._isLight(c2);\n        this._applyStyle(\"ink:style\", (anno)=>{\n            anno.label.style.background = c2;\n            anno.label.style.color = light ? \"#334155\" : \"#ffffff\";\n            anno.label.borderColor = light ? \"#cbd5e1\" : c2;\n            if (ed.type === \"point\") {\n                if (!anno.marker) anno.marker = {};\n                anno.marker.strokeColor = light ? \"#334155\" : c2;\n                anno.marker.fillColor = light ? \"#ffffff\" : c2;\n            }\n        });\n    }\n    /**\n   * Line-stroke color for axis annotations, separate from the label chip.\n   * @param {string} c\n   */ _applyLineColor(c2) {\n        const ed = this._editor;\n        if (!ed || ed.type === \"point\") return;\n        this._applyStyle(\"ink:style\", (anno)=>{\n            anno.borderColor = c2;\n            if (anno.x2 != null || anno.y2 != null) anno.fillColor = c2;\n        });\n    }\n    /**\n   * Step the label font size through the preset scale.\n   * @param {number} dir\n   */ _stepFont(dir) {\n        this._applyStyle(\"ink:style\", (anno)=>{\n            const cur = parseFloat(anno.label.style.fontSize) || 11;\n            let i2 = 0;\n            for(let k = 1; k < $e4b487e979d7c06d$var$FONT_STEPS.length; k++)if (Math.abs($e4b487e979d7c06d$var$FONT_STEPS[k] - cur) < Math.abs($e4b487e979d7c06d$var$FONT_STEPS[i2] - cur)) i2 = k;\n            i2 = Math.min($e4b487e979d7c06d$var$FONT_STEPS.length - 1, Math.max(0, i2 + dir));\n            anno.label.style.fontSize = $e4b487e979d7c06d$var$FONT_STEPS[i2] + \"px\";\n        });\n    }\n    _toggleBold() {\n        this._applyStyle(\"ink:style\", (anno)=>{\n            anno.label.style.fontWeight = $e4b487e979d7c06d$var$InkLayer._isBold(anno.label.style) ? 400 : 700;\n        });\n    }\n    /**\n   * Grow/shrink the point marker.\n   * @param {number} dir\n   */ _stepMarker(dir) {\n        this._applyStyle(\"ink:style\", (anno)=>{\n            if (!anno.marker) anno.marker = {};\n            const cur = typeof anno.marker.size === \"number\" ? anno.marker.size : 4;\n            anno.marker.size = Math.min(14, Math.max(2, cur + dir));\n        });\n    }\n    /** Cycle the point marker shape (circle, square, diamond, triangle). */ _cycleShape() {\n        this._applyStyle(\"ink:style\", (anno)=>{\n            if (!anno.marker) anno.marker = {};\n            const i2 = $e4b487e979d7c06d$var$MARKER_SHAPES.indexOf(anno.marker.shape);\n            anno.marker.shape = $e4b487e979d7c06d$var$MARKER_SHAPES[(i2 + 1) % $e4b487e979d7c06d$var$MARKER_SHAPES.length];\n        });\n    }\n    /** Delete the annotation the editor is open on (undoable via Rewind). */ _deleteAnno() {\n        const ed = this._editor;\n        if (!ed) return;\n        const list = this._annoList(ed.type);\n        const anno = list[ed.index];\n        this._closeEditor(false);\n        if (!anno) return;\n        const baseEl = this.w.dom.baseEl;\n        if (baseEl && anno.id) baseEl.querySelectorAll(\".\" + anno.id).forEach((el)=>el.remove());\n        list.splice(ed.index, 1);\n        for(let i2 = ed.index; i2 < list.length; i2++)this._redrawAnno(ed.type, list[i2], i2);\n        this._checkpoint(\"ink:delete\");\n        this._fireDeleted(ed.type, anno, ed.index);\n    }\n    /** @param {string} type @param {any} anno @param {number} index */ _fireEdited(type, anno, index) {\n        const args = {\n            type: type,\n            id: anno.id,\n            index: index,\n            text: anno.label ? anno.label.text : \"\"\n        };\n        this._fireAnnotationEvent(\"annotationEdited\", args);\n    }\n    /** @param {string} type @param {any} anno @param {number} index */ _fireStyled(type, anno, index) {\n        const args = {\n            type: type,\n            id: anno.id,\n            index: index,\n            label: anno.label,\n            marker: anno.marker\n        };\n        this._fireAnnotationEvent(\"annotationStyled\", args);\n    }\n    /** @param {string} type @param {any} anno @param {number} index */ _fireDeleted(type, anno, index) {\n        const args = {\n            type: type,\n            id: anno.id,\n            index: index\n        };\n        this._fireAnnotationEvent(\"annotationDeleted\", args);\n    }\n    // ─── lifecycle ────────────────────────────────────────────────────────────\n    _teardownDocListeners() {\n        const doc = this.w.dom.baseEl && this.w.dom.baseEl.ownerDocument;\n        if (!doc) return;\n        doc.removeEventListener(\"mousemove\", this._onMove);\n        doc.removeEventListener(\"touchmove\", this._onMove);\n        doc.removeEventListener(\"mouseup\", this._onUp);\n        doc.removeEventListener(\"touchend\", this._onUp);\n    }\n    teardown() {\n        var _a, _b, _c, _d;\n        this._teardownDocListeners();\n        this._closeEditor(false);\n        this.stopCreate();\n        this._drag = null;\n        if (this._wired) {\n            (_b = (_a = this.ctx).removeEventListener) == null || _b.call(_a, \"mounted\", this._onRerender);\n            (_d = (_c = this.ctx).removeEventListener) == null || _d.call(_c, \"updated\", this._onRerender);\n            this._wired = false;\n        }\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    ink: $e4b487e979d7c06d$var$InkLayer\n});\nclass $e4b487e979d7c06d$var$Measure {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.graphics = new $e4b487e979d7c06d$var$Graphics(w2);\n        this.pins = [];\n        this.drag = null;\n        this.armed = false;\n        this.persistent = false;\n        this.pane = null;\n        this._seedActive = false;\n        this._onKeyDown = this._onKeyDown.bind(this);\n        this._onKeyUp = this._onKeyUp.bind(this);\n        this._onDown = this._onDown.bind(this);\n        this._onMove = this._onMove.bind(this);\n        this._onUp = this._onUp.bind(this);\n        this._onSeedDown = this._onSeedDown.bind(this);\n        this._onSeedKey = this._onSeedKey.bind(this);\n        this._afterRender = this._afterRender.bind(this);\n        ctx.addEventListener(\"mounted\", this._afterRender);\n        ctx.addEventListener(\"updated\", this._afterRender);\n        this._bindKeys();\n    }\n    _cfg() {\n        return this.w.config.chart.measure || {};\n    }\n    _enabled() {\n        return this.w.globals.axisCharts && this._cfg().enabled === true;\n    }\n    _mode() {\n        return this._cfg().mode === \"free\" ? \"free\" : \"span\";\n    }\n    /**\n   * Nearest first-series data point to a data x (used to snap span endpoints\n   * onto the series line).\n   * @param {number} dataX\n   * @returns {{x:number,y:number}|null}\n   */ _snapToSeries(dataX) {\n        const s0 = /** @type {any} */ (this.w.config.series || [])[0];\n        if (!s0) return null;\n        const pts = this._points(s0.data || []);\n        if (!pts.length) return null;\n        let best = pts[0];\n        let bd = Math.abs(pts[0].x - dataX);\n        for(let i2 = 1; i2 < pts.length; i2++){\n            const d = Math.abs(pts[i2].x - dataX);\n            if (d < bd) {\n                bd = d;\n                best = pts[i2];\n            }\n        }\n        return best;\n    }\n    /**\n   * Resolve a raw projected point to the endpoint that is actually drawn: span\n   * mode snaps x to the nearest first-series data point (y follows the line);\n   * free mode keeps the raw point.\n   * @param {{x:number,y:number,gx:number,gy:number}} raw\n   */ _resolve(raw) {\n        if (this._mode() === \"free\") return raw;\n        const snapped = this._snapToSeries(raw.x);\n        if (!snapped) return raw;\n        const g2 = this._dataToGrid(snapped.x, snapped.y);\n        return {\n            x: snapped.x,\n            y: snapped.y,\n            gx: g2.gx,\n            gy: g2.gy\n        };\n    }\n    _doc() {\n        return this.w.dom.baseEl && this.w.dom.baseEl.ownerDocument;\n    }\n    /** Bind the measure-key listeners once on the owner document. */ _bindKeys() {\n        if (this._keysBound) return;\n        const doc = this._doc();\n        if (!doc) return;\n        doc.addEventListener(\"keydown\", this._onKeyDown);\n        doc.addEventListener(\"keyup\", this._onKeyUp);\n        this._keysBound = true;\n    }\n    /** @param {any} e */ _onKeyDown(e2) {\n        if (!this._enabled() || this.persistent) return;\n        const key = this._cfg().key || \"m\";\n        if (e2.key && e2.key.toLowerCase() === String(key).toLowerCase()) this._arm();\n        else if (e2.key === \"Escape\") this._cancelDrag();\n    }\n    /** @param {any} e */ _onKeyUp(e2) {\n        if (this.persistent) return;\n        const key = this._cfg().key || \"m\";\n        if (e2.key && e2.key.toLowerCase() === String(key).toLowerCase()) {\n            if (!this.drag) this._disarm();\n        }\n    }\n    /** Public: arm a sticky measure mode (survives key release) until stopped. */ startMeasure() {\n        if (!this._enabled()) return;\n        this.persistent = true;\n        this._arm();\n    }\n    /** Public: leave measure mode. */ stopMeasure() {\n        this.persistent = false;\n        this._cancelDrag();\n        this._disarm();\n    }\n    /**\n   * Public: begin a measurement anchored at a client-space point (used by the\n   * context menu's \"Measure from here\"). Endpoint A is fixed at (cx,cy), the\n   * ruler follows the cursor, and the next pointer press sets B and pins it.\n   * Escape cancels. No-op unless the measure tool is enabled.\n   * @param {number} cx @param {number} cy\n   */ seedFromClient(cx, cy) {\n        if (!this._enabled()) return;\n        this._cancelDrag();\n        this._endSeed(false);\n        const a2 = this._project(cx, cy);\n        this.drag = {\n            a: a2,\n            b: a2\n        };\n        this._seedActive = true;\n        const doc = this._doc();\n        if (doc) {\n            doc.addEventListener(\"mousemove\", this._onMove);\n            doc.addEventListener(\"touchmove\", this._onMove, {\n                passive: false\n            });\n            doc.addEventListener(\"mousedown\", this._onSeedDown, true);\n            doc.addEventListener(\"touchstart\", this._onSeedDown, true);\n            doc.addEventListener(\"keydown\", this._onSeedKey, true);\n        }\n        this._renderLive();\n    }\n    /** @param {any} e */ _onSeedDown(e2) {\n        if (!this._seedActive || !this.drag) return;\n        e2.preventDefault();\n        e2.stopPropagation();\n        const { cx: cx, cy: cy } = this._clientXY(e2);\n        this.drag.b = this._project(cx, cy);\n        this._endSeed(true);\n    }\n    /** @param {any} e */ _onSeedKey(e2) {\n        if (e2.key === \"Escape\") this._endSeed(false);\n    }\n    /**\n   * Finish (commit) or cancel a \"measure from here\" seed and detach listeners.\n   * @param {boolean} commit\n   */ _endSeed(commit) {\n        var _a, _b;\n        if (!this._seedActive) return;\n        this._seedActive = false;\n        const doc = this._doc();\n        if (doc) {\n            doc.removeEventListener(\"mousemove\", this._onMove);\n            doc.removeEventListener(\"touchmove\", this._onMove);\n            doc.removeEventListener(\"mousedown\", this._onSeedDown, true);\n            doc.removeEventListener(\"touchstart\", this._onSeedDown, true);\n            doc.removeEventListener(\"keydown\", this._onSeedKey, true);\n        }\n        const d = this.drag;\n        this.drag = null;\n        this._clearLive();\n        if (!commit || !d) return;\n        const a2 = this._resolve(d.a);\n        const b2 = this._resolve(d.b);\n        if (Math.abs(a2.gx - b2.gx) < 2 && Math.abs(a2.gy - b2.gy) < 2) return;\n        const mode = this._mode();\n        if (this._cfg().pinOnRelease !== false) {\n            this.pins.push({\n                xa: a2.x,\n                ya: a2.y,\n                xb: b2.x,\n                yb: b2.y,\n                mode: mode\n            });\n            this._renderPins();\n            (_b = (_a = this.ctx.history) == null ? void 0 : _a.snapshot) == null || _b.call(_a, \"measure\");\n        }\n        this._fireMeasured(a2, b2);\n    }\n    /** Public: remove all pinned rulers. */ clearMeasures() {\n        var _a, _b;\n        this.pins = [];\n        this._renderPins();\n        (_b = (_a = this.ctx.history) == null ? void 0 : _a.snapshot) == null || _b.call(_a, \"clear measures\");\n    }\n    /**\n   * Snapshot of the pinned rulers as JSON-safe plain data. This is the piece of\n   * state ViewState / Perspectives (shareable URL) / Rewind (undo) persist:\n   * pins already live in data space, so they round-trip and re-project.\n   * Returns a deep copy so callers cannot mutate ours.\n   * @returns {Array<{xa:number,ya:number,xb:number,yb:number,mode:string}>}\n   */ getPins() {\n        return this.pins.map((p2)=>({\n                xa: p2.xa,\n                ya: p2.ya,\n                xb: p2.xb,\n                yb: p2.yb,\n                mode: p2.mode === \"free\" ? \"free\" : \"span\"\n            }));\n    }\n    /**\n   * Replace the pinned rulers with a restored set and redraw. Accepts the shape\n   * getPins() returns; a nullish / non-array value (or an old token without\n   * measure state) clears all pins. Non-finite entries are dropped. Does NOT\n   * record a Rewind step (the restore itself is the caller's undo boundary).\n   * @param {any} pins\n   */ setPins(pins) {\n        this.pins = Array.isArray(pins) ? pins.filter((p2)=>p2 && isFinite(p2.xa) && isFinite(p2.ya) && isFinite(p2.xb) && isFinite(p2.yb)).map((p2)=>({\n                xa: +p2.xa,\n                ya: +p2.ya,\n                xb: +p2.xb,\n                yb: +p2.yb,\n                mode: p2.mode === \"free\" ? \"free\" : \"span\"\n            })) : [];\n        this._renderPins();\n    }\n    /**\n   * Normalize a series `data` array into {x,y} points (numeric/datetime x or\n   * category index). Non-finite / non-scalar (range/candle) points drop out.\n   * @param {any[]} data\n   * @returns {Array<{x:number,y:number}>}\n   */ _points(data) {\n        const out = [];\n        for(let i2 = 0; i2 < data.length; i2++){\n            const p2 = data[i2];\n            let x;\n            let y;\n            if (Array.isArray(p2)) {\n                x = +p2[0];\n                y = +p2[1];\n            } else if (p2 && typeof p2 === \"object\") {\n                x = +p2.x;\n                y = +p2.y;\n            } else {\n                x = i2;\n                y = +p2;\n            }\n            if (isFinite(x) && isFinite(y)) out.push({\n                x: x,\n                y: y\n            });\n        }\n        return out;\n    }\n    /** Lay the transparent capture pane over the plot so our pointer handlers own\n   *  the drag (ZoomPanSelection never sees it). */ _arm() {\n        if (this.armed || !this._enabled()) return;\n        const w2 = this.w;\n        const parent = w2.dom.elGraphical;\n        if (!parent) return;\n        this.armed = true;\n        const pane = this.graphics.drawRect(0, 0, w2.layout.gridWidth, w2.layout.gridHeight);\n        pane.node.setAttribute(\"class\", \"apexcharts-measure-capture\");\n        pane.node.setAttribute(\"fill\", \"transparent\");\n        pane.node.style.cursor = \"crosshair\";\n        pane.node.style.pointerEvents = \"all\";\n        pane.node.addEventListener(\"mousedown\", this._onDown);\n        pane.node.addEventListener(\"touchstart\", this._onDown, {\n            passive: false\n        });\n        parent.add(pane);\n        this.pane = pane;\n    }\n    _disarm() {\n        this.armed = false;\n        if (this.pane) {\n            this.pane.node.removeEventListener(\"mousedown\", this._onDown);\n            this.pane.node.removeEventListener(\"touchstart\", this._onDown);\n            const p2 = this.pane.node;\n            if (p2.parentNode) p2.parentNode.removeChild(p2);\n            this.pane = null;\n        }\n    }\n    /** @param {any} e @returns {{cx:number,cy:number}} */ _clientXY(e2) {\n        const t2 = e2.touches && e2.touches[0] ? e2.touches[0] : e2;\n        return {\n            cx: t2.clientX,\n            cy: t2.clientY\n        };\n    }\n    _gridRect() {\n        const g2 = this.w.dom.baseEl.querySelector(\".apexcharts-grid\");\n        return g2 ? g2.getBoundingClientRect() : null;\n    }\n    /** [min,max] for the primary y-axis, preferring the rendered nice scale. */ _yRange() {\n        const g2 = this.w.globals;\n        const s2 = g2.yAxisScale && g2.yAxisScale[0];\n        if (s2 && isFinite(s2.niceMin) && isFinite(s2.niceMax) && s2.niceMax !== s2.niceMin) return [\n            s2.niceMin,\n            s2.niceMax\n        ];\n        return [\n            g2.minY,\n            g2.maxY\n        ];\n    }\n    /**\n   * Client pixel -> { x, y (data), gx, gy (grid-local SVG units) }.\n   * @param {number} cx @param {number} cy\n   */ _project(cx, cy) {\n        const w2 = this.w;\n        const rect = this._gridRect();\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const clamp = (v2)=>v2 < 0 ? 0 : v2 > 1 ? 1 : v2;\n        const fx = rect ? clamp((cx - rect.left) / rect.width) : 0;\n        const fy = rect ? clamp((cy - rect.top) / rect.height) : 0;\n        const [ymin, ymax] = this._yRange();\n        const x = w2.globals.minX + fx * (w2.globals.maxX - w2.globals.minX);\n        const y = ymax - fy * (ymax - ymin);\n        return {\n            x: x,\n            y: y,\n            gx: fx * gw,\n            gy: fy * gh\n        };\n    }\n    /**\n   * Data (x,y) -> grid-local SVG coords, for redrawing pinned rulers.\n   * @param {number} x @param {number} y\n   */ _dataToGrid(x, y) {\n        const w2 = this.w;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const xr = w2.globals.maxX - w2.globals.minX || 1;\n        const [ymin, ymax] = this._yRange();\n        const yr = ymax - ymin || 1;\n        return {\n            gx: (x - w2.globals.minX) / xr * gw,\n            gy: gh - (y - ymin) / yr * gh\n        };\n    }\n    /** @param {any} e */ _onDown(e2) {\n        if (!this.armed) return;\n        e2.preventDefault();\n        e2.stopPropagation();\n        const { cx: cx, cy: cy } = this._clientXY(e2);\n        const a2 = this._project(cx, cy);\n        this.drag = {\n            a: a2,\n            b: a2\n        };\n        const doc = this._doc();\n        if (doc) {\n            doc.addEventListener(\"mousemove\", this._onMove);\n            doc.addEventListener(\"mouseup\", this._onUp);\n            doc.addEventListener(\"touchmove\", this._onMove, {\n                passive: false\n            });\n            doc.addEventListener(\"touchend\", this._onUp);\n        }\n        this._renderLive();\n    }\n    /** @param {any} e */ _onMove(e2) {\n        if (!this.drag) return;\n        if (e2.cancelable) e2.preventDefault();\n        const { cx: cx, cy: cy } = this._clientXY(e2);\n        this.drag.b = this._project(cx, cy);\n        this._renderLive();\n    }\n    /** @param {any} _e */ _onUp(_e) {\n        var _a, _b;\n        const doc = this._doc();\n        if (doc) {\n            doc.removeEventListener(\"mousemove\", this._onMove);\n            doc.removeEventListener(\"mouseup\", this._onUp);\n            doc.removeEventListener(\"touchmove\", this._onMove);\n            doc.removeEventListener(\"touchend\", this._onUp);\n        }\n        if (!this.drag) return;\n        const rawA = this.drag.a;\n        const rawB = this.drag.b;\n        this.drag = null;\n        this._clearLive();\n        if (Math.abs(rawA.gx - rawB.gx) < 2 && Math.abs(rawA.gy - rawB.gy) < 2) {\n            if (!this.persistent) this._disarm();\n            return;\n        }\n        const mode = this._mode();\n        const a2 = this._resolve(rawA);\n        const b2 = this._resolve(rawB);\n        if (this._cfg().pinOnRelease !== false) {\n            this.pins.push({\n                xa: a2.x,\n                ya: a2.y,\n                xb: b2.x,\n                yb: b2.y,\n                mode: mode\n            });\n            this._renderPins();\n            (_b = (_a = this.ctx.history) == null ? void 0 : _a.snapshot) == null || _b.call(_a, \"measure\");\n        }\n        this._fireMeasured(a2, b2);\n        if (!this.persistent) this._disarm();\n    }\n    _cancelDrag() {\n        const doc = this._doc();\n        if (doc) {\n            doc.removeEventListener(\"mousemove\", this._onMove);\n            doc.removeEventListener(\"mouseup\", this._onUp);\n            doc.removeEventListener(\"touchmove\", this._onMove);\n            doc.removeEventListener(\"touchend\", this._onUp);\n        }\n        this.drag = null;\n        this._clearLive();\n    }\n    /**\n   * @param {{x:number,y:number}} a @param {{x:number,y:number}} b\n   * @returns {{dx:number,dy:number,pct:number,slope:number}}\n   */ _stats(a2, b2) {\n        const dx = b2.x - a2.x;\n        const dy = b2.y - a2.y;\n        return {\n            dx: dx,\n            dy: dy,\n            pct: a2.y !== 0 ? dy / Math.abs(a2.y) * 100 : NaN,\n            slope: dx !== 0 ? dy / dx : NaN\n        };\n    }\n    /** @param {number} v */ _fmt(v2) {\n        if (!isFinite(v2)) return \"n/a\";\n        const a2 = Math.abs(v2);\n        if (a2 !== 0 && (a2 < 0.01 || a2 >= 1e6)) return v2.toExponential(2);\n        return String(Math.round(v2 * 100) / 100);\n    }\n    /** getComputedStyle of the graphical layer (browser only), for CSS vars. */ _computedStyle() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return null;\n        const node = this.w.dom.elGraphical && this.w.dom.elGraphical.node;\n        if (!node || typeof getComputedStyle !== \"function\") return null;\n        try {\n            return getComputedStyle(node);\n        } catch (e2) {\n            return null;\n        }\n    }\n    /**\n   * Resolve a color: explicit config value, else a `--apx-measure-*` CSS custom\n   * property, else the built-in default.\n   * @param {any} cfgVal @param {string} varName @param {string} fallback\n   * @param {CSSStyleDeclaration|null} [cs]\n   */ _resolveColor(cfgVal, varName, fallback, cs) {\n        if (cfgVal) return cfgVal;\n        const style = cs !== void 0 ? cs : this._computedStyle();\n        const v2 = style ? style.getPropertyValue(varName).trim() : \"\";\n        return v2 || fallback;\n    }\n    /** Resolved semantic colors (config -> CSS var -> built-in default). */ _colors() {\n        const c2 = this._cfg().colors || {};\n        const cs = this._computedStyle();\n        return {\n            up: this._resolveColor(c2.up, \"--apx-measure-up\", \"#16a34a\", cs),\n            down: this._resolveColor(c2.down, \"--apx-measure-down\", \"#dc2626\", cs),\n            neutral: this._resolveColor(c2.neutral, \"--apx-measure-neutral\", \"#64748b\", cs),\n            guide: this._resolveColor(c2.guide, \"--apx-measure-guide\", \"#94a3b8\", cs)\n        };\n    }\n    /** @param {number} dy */ _dirColor(dy) {\n        const c2 = this._colors();\n        return dy === 0 ? c2.neutral : dy > 0 ? c2.up : c2.down;\n    }\n    /** @param {number} dy */ _dirClass(dy) {\n        return dy === 0 ? \"apexcharts-measure-flat\" : dy > 0 ? \"apexcharts-measure-up\" : \"apexcharts-measure-down\";\n    }\n    /**\n   * Format a percentage, via `measure.format.percent` when set.\n   * @param {number} p\n   */ _fmtPct(p2) {\n        if (!isFinite(p2)) return \"n/a\";\n        const f = this._cfg().format && this._cfg().format.percent;\n        if (typeof f === \"function\") try {\n            const s2 = f(p2);\n            if (s2 != null) return String(s2);\n        } catch (e2) {}\n        return (p2 >= 0 ? \"+\" : \"\") + this._fmt(p2) + \"%\";\n    }\n    /**\n   * The readout lines for a ruler: `measure.label` override, else the default\n   * per-mode text.\n   * @param {{x:number,y:number}} a @param {{x:number,y:number}} b\n   * @param {{dx:number,dy:number,pct:number,slope:number}} st @param {string} mode\n   * @returns {string[]}\n   */ _label(a2, b2, st, mode) {\n        const fn = this._cfg().label;\n        if (typeof fn === \"function\") {\n            const out = fn({\n                from: {\n                    x: a2.x,\n                    y: a2.y\n                },\n                to: {\n                    x: b2.x,\n                    y: b2.y\n                },\n                dx: st.dx,\n                dy: st.dy,\n                percentChange: st.pct,\n                slope: st.slope,\n                mode: mode\n            });\n            return Array.isArray(out) ? out.map(String) : [\n                String(out)\n            ];\n        }\n        if (mode === \"span\") {\n            const arrow = st.dy === 0 ? \"\" : st.dy > 0 ? \" \\u2191\" : \" \\u2193\";\n            const pct = isFinite(st.pct) ? \"(\" + this._fmtPct(st.pct) + \")\" : \"\";\n            return [\n                this._fmtY(st.dy) + \"  \" + pct + arrow,\n                this._fmtX(a2.x) + \"  to  \" + this._fmtX(b2.x)\n            ];\n        }\n        return [\n            \"\\u0394x \" + this._fmtDx(st.dx),\n            \"\\u0394y \" + this._fmtY(st.dy),\n            this._fmtPct(st.pct)\n        ];\n    }\n    /**\n   * Format an x delta, treating datetime x as a day count.\n   * @param {number} dx\n   */ _fmtDx(dx) {\n        if (this.w.config.xaxis.type === \"datetime\") {\n            const days = dx / 864e5;\n            return Math.round(days * 10) / 10 + \"d\";\n        }\n        return this._fmt(dx);\n    }\n    /**\n   * Format a y value (a delta) via the y-axis label formatter when present.\n   * @param {number} v\n   */ _fmtY(v2) {\n        const cf = this._cfg().format && this._cfg().format.y;\n        if (typeof cf === \"function\") try {\n            const s2 = cf(v2);\n            if (s2 != null) return String(s2);\n        } catch (e2) {}\n        const f = this.w.globals.yLabelFormatters && this.w.globals.yLabelFormatters[0];\n        if (typeof f === \"function\") try {\n            const s2 = f(v2, {\n                seriesIndex: 0,\n                dataPointIndex: -1,\n                w: this.w\n            });\n            if (s2 != null && s2 !== \"\") return String(s2);\n        } catch (e2) {}\n        return this._fmt(v2);\n    }\n    /**\n   * Format an x value: a short date for datetime x, else the x-label formatter\n   * or a plain number.\n   * @param {number} x\n   */ _fmtX(x) {\n        const w2 = this.w;\n        const cf = this._cfg().format && this._cfg().format.x;\n        if (typeof cf === \"function\") try {\n            const s2 = cf(x);\n            if (s2 != null) return String(s2);\n        } catch (e2) {}\n        if (w2.config.xaxis.type === \"datetime\") {\n            const d = new Date(x);\n            return d.toLocaleDateString(void 0, {\n                day: \"numeric\",\n                month: \"short\",\n                year: \"numeric\"\n            });\n        }\n        const f = w2.globals.xLabelFormatter;\n        if (typeof f === \"function\") try {\n            const s2 = f(x, {\n                w: w2\n            });\n            if (s2 != null && s2 !== \"\") return String(s2);\n        } catch (e2) {}\n        return this._fmt(x);\n    }\n    /** The live overlay group, created lazily inside elGraphical. */ _liveGroup() {\n        const w2 = this.w;\n        if (this._live && this._live.node && this._live.node.parentNode) return this._live;\n        const g2 = this.graphics.group({\n            class: \"apexcharts-measure-live\"\n        });\n        g2.node.style.pointerEvents = \"none\";\n        if (w2.dom.elGraphical) w2.dom.elGraphical.add(g2);\n        this._live = g2;\n        return g2;\n    }\n    _clearLive() {\n        if (this._live && this._live.node) {\n            const n2 = this._live.node;\n            if (n2.parentNode) n2.parentNode.removeChild(n2);\n        }\n        this._live = null;\n    }\n    _renderLive() {\n        if (!this.drag) return;\n        const g2 = this._liveGroup();\n        while(g2.node.firstChild)g2.node.removeChild(g2.node.firstChild);\n        const a2 = this._resolve(this.drag.a);\n        const b2 = this._resolve(this.drag.b);\n        this._drawRuler(g2, a2, b2, false, this._mode());\n    }\n    /** Redraw all pinned rulers into a fresh group (called after each render). */ _renderPins() {\n        const w2 = this.w;\n        const old = w2.dom.baseEl && w2.dom.baseEl.querySelector(\".apexcharts-measure-pins\");\n        if (old && old.parentNode) old.parentNode.removeChild(old);\n        if (!this.pins.length || !w2.dom.elGraphical) return;\n        const g2 = this.graphics.group({\n            class: \"apexcharts-measure-pins\"\n        });\n        g2.node.style.pointerEvents = \"none\";\n        w2.dom.elGraphical.add(g2);\n        this.pins.forEach((p2)=>{\n            const a2 = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, this._dataToGrid(p2.xa, p2.ya)), {\n                x: p2.xa,\n                y: p2.ya\n            });\n            const b2 = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, this._dataToGrid(p2.xb, p2.yb)), {\n                x: p2.xb,\n                y: p2.yb\n            });\n            this._drawRuler(g2, a2, b2, true, p2.mode || \"span\");\n        });\n    }\n    /**\n   * Draw one ruler into `g`, dispatching on style.\n   * @param {any} g\n   * @param {{gx:number,gy:number,x:number,y:number}} a\n   * @param {{gx:number,gy:number,x:number,y:number}} b\n   * @param {boolean} [pinned]\n   * @param {string} [mode] 'span' (finance-style band, default) | 'free'\n   */ _drawRuler(g2, a2, b2, pinned, mode) {\n        const st = this._stats(a2, b2);\n        const rg = this.graphics.group({\n            class: \"apexcharts-measure-ruler \" + this._dirClass(st.dy) + (pinned ? \" apexcharts-measure-pinned\" : \"\")\n        });\n        if ((mode || this._mode()) === \"free\") this._drawFree(rg, a2, b2, st);\n        else this._drawSpan(rg, a2, b2, st);\n        g2.add(rg);\n    }\n    /** Endpoint dots on the series line (skipped when markers:false).\n   * @param {any} g @param {{gx:number,gy:number}} p @param {string} color */ _dot(g2, p2, color) {\n        if (this._cfg().markers === false) return;\n        const dot = this.graphics.drawMarker(p2.gx, p2.gy, {\n            pSize: 4,\n            shape: \"circle\",\n            pointFillColor: color,\n            pointFillOpacity: 1,\n            pointStrokeColor: \"#fff\",\n            pointStrokeWidth: 2,\n            pointStrokeOpacity: 1\n        });\n        g2.add(dot);\n    }\n    /** Draw the readout label box + text into `g` at (bx,by).\n   * @param {any} g @param {string[]} lines @param {number} bx @param {number} by\n   * @param {number} boxW @param {number} boxH @param {string} color */ _readout(g2, lines, bx, by, boxW, boxH, color) {\n        const box = this.graphics.drawRect(bx, by, boxW, boxH, 4);\n        box.node.setAttribute(\"class\", \"apexcharts-measure-label-bg\");\n        box.attr({\n            fill: \"#ffffff\",\n            \"fill-opacity\": 0.95,\n            stroke: color,\n            \"stroke-width\": 1\n        });\n        g2.add(box);\n        const label = this.graphics.drawText({\n            x: bx + 9,\n            y: by + 15,\n            text: lines,\n            textAnchor: \"start\",\n            fontSize: \"11px\",\n            foreColor: \"#1e293b\",\n            cssClass: \"apexcharts-measure-label\"\n        });\n        g2.add(label);\n    }\n    /**\n   * Finance-style ruler: vertical guides + shaded band + endpoints on the\n   * series line + a top readout. Guides/band/markers are individually\n   * toggleable via config.\n   * @param {any} g\n   * @param {{gx:number,gy:number,x:number,y:number}} a\n   * @param {{gx:number,gy:number,x:number,y:number}} b\n   * @param {{dx:number,dy:number,pct:number,slope:number}} st\n   */ _drawSpan(g2, a2, b2, st) {\n        const w2 = this.w;\n        const cfg = this._cfg();\n        const gh = w2.layout.gridHeight;\n        const color = this._dirColor(st.dy);\n        const lx = Math.min(a2.gx, b2.gx);\n        const rx = Math.max(a2.gx, b2.gx);\n        if (cfg.band !== false) {\n            const band = this.graphics.drawRect(lx, 0, Math.max(0, rx - lx), gh, 0);\n            band.node.setAttribute(\"class\", \"apexcharts-measure-band\");\n            band.attr({\n                fill: color,\n                \"fill-opacity\": 0.09,\n                stroke: \"none\"\n            });\n            g2.add(band);\n        }\n        if (cfg.guides !== false) [\n            a2,\n            b2\n        ].forEach((p2)=>{\n            const vline = this.graphics.drawLine(p2.gx, 0, p2.gx, gh, this._colors().guide, 4, 1);\n            vline.node.setAttribute(\"class\", \"apexcharts-measure-vline\");\n            g2.add(vline);\n        });\n        [\n            a2,\n            b2\n        ].forEach((p2)=>this._dot(g2, p2, color));\n        const lines = this._label(a2, b2, st, \"span\");\n        const longest = lines.reduce((m2, s2)=>Math.max(m2, s2.length), 0);\n        const boxW = Math.max(148, longest * 6.4);\n        const boxH = 20 + lines.length * 15;\n        let bx = (lx + rx) / 2 - boxW / 2;\n        bx = Math.max(2, Math.min(bx, w2.layout.gridWidth - boxW - 2));\n        this._readout(g2, lines, bx, 4, boxW, boxH, color);\n    }\n    /**\n   * Free 2D ruler: a diagonal line between two arbitrary points + a readout.\n   * @param {any} g\n   * @param {{gx:number,gy:number,x:number,y:number}} a\n   * @param {{gx:number,gy:number,x:number,y:number}} b\n   * @param {{dx:number,dy:number,pct:number,slope:number}} st\n   */ _drawFree(g2, a2, b2, st) {\n        const color = this._dirColor(st.dy);\n        const line = this.graphics.drawLine(a2.gx, a2.gy, b2.gx, b2.gy, color, 0, 2);\n        line.node.setAttribute(\"class\", \"apexcharts-measure-line\");\n        g2.add(line);\n        [\n            a2,\n            b2\n        ].forEach((p2)=>this._dot(g2, p2, color));\n        const lines = this._label(a2, b2, st, \"free\");\n        const longest = lines.reduce((m2, s2)=>Math.max(m2, s2.length), 0);\n        const boxW = Math.max(72, longest * 6.2);\n        const boxH = 16 + lines.length * 15;\n        let bx = (a2.gx + b2.gx) / 2 + 8;\n        let by = (a2.gy + b2.gy) / 2 - boxH / 2;\n        bx = Math.max(2, Math.min(bx, this.w.layout.gridWidth - boxW - 2));\n        by = Math.max(2, Math.min(by, this.w.layout.gridHeight - boxH - 2));\n        this._readout(g2, lines, bx, by, boxW, boxH, color);\n    }\n    /**\n   * @param {{x:number,y:number}} a @param {{x:number,y:number}} b\n   */ _fireMeasured(a2, b2) {\n        const st = this._stats(a2, b2);\n        const payload = {\n            from: {\n                x: a2.x,\n                y: a2.y\n            },\n            to: {\n                x: b2.x,\n                y: b2.y\n            },\n            dx: st.dx,\n            dy: st.dy,\n            percentChange: st.pct,\n            slope: st.slope\n        };\n        const fn = this.w.config.chart.events.measured;\n        if (typeof fn === \"function\") fn(this.ctx, payload);\n        this.ctx.events.fireEvent(\"measured\", [\n            this.ctx,\n            payload\n        ]);\n    }\n    /** Re-project the measure pins after each render. */ _afterRender() {\n        if (!this._enabled()) return;\n        if (this.w.interact.measureEnabled && !this.persistent) this.persistent = true;\n        if (this.pins.length) this._renderPins();\n        if (this.persistent && !this.drag) {\n            this._disarm();\n            this._arm();\n        }\n    }\n    teardown() {\n        this._cancelDrag();\n        this._endSeed(false);\n        this._disarm();\n        const doc = this._doc();\n        if (doc && this._keysBound) {\n            doc.removeEventListener(\"keydown\", this._onKeyDown);\n            doc.removeEventListener(\"keyup\", this._onKeyUp);\n        }\n        this._keysBound = false;\n        this.pins = [];\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    measure: $e4b487e979d7c06d$var$Measure\n});\nclass $e4b487e979d7c06d$var$ContextMenu {\n    /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.w = w2;\n        this.ctx = ctx;\n        this.menu = null;\n        this._items = [];\n        this._focusIndex = -1;\n        this._trigger = null;\n        this._onContext = this._onContext.bind(this);\n        this._onDocDown = this._onDocDown.bind(this);\n        this._onKey = this._onKey.bind(this);\n        this._afterRender = this._afterRender.bind(this);\n        ctx.addEventListener(\"mounted\", this._afterRender);\n        ctx.addEventListener(\"updated\", this._afterRender);\n    }\n    _cfg() {\n        return this.w.config.chart.contextMenu || {};\n    }\n    _enabled() {\n        return this._cfg().enabled === true;\n    }\n    _doc() {\n        return this.w.dom.baseEl && this.w.dom.baseEl.ownerDocument;\n    }\n    /** (Re)attach the contextmenu trigger to the freshly (re)built SVG. */ _afterRender() {\n        this._detachTrigger();\n        this.close();\n        if (!this._enabled() || !$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const svg = this.w.dom.Paper && this.w.dom.Paper.node;\n        if (!svg) return;\n        svg.addEventListener(\"contextmenu\", this._onContext);\n        this._trigger = svg;\n    }\n    _detachTrigger() {\n        if (this._trigger) {\n            this._trigger.removeEventListener(\"contextmenu\", this._onContext);\n            this._trigger = null;\n        }\n    }\n    /** @param {any} e */ _onContext(e2) {\n        if (!this._enabled()) return;\n        e2.preventDefault();\n        this.open(e2.clientX, e2.clientY);\n    }\n    /**\n   * Client pixel -> data {x,y} via the grid client-rect fraction (scale\n   * independent). Null when the grid is not measurable.\n   * @param {number} cx @param {number} cy\n   * @returns {{x:number,y:number}|null}\n   */ _clientToData(cx, cy) {\n        const w2 = this.w;\n        const grid = w2.dom.baseEl && w2.dom.baseEl.querySelector(\".apexcharts-grid\");\n        if (!grid) return null;\n        const r2 = grid.getBoundingClientRect();\n        if (!r2.width || !r2.height) return null;\n        const clamp = (v2)=>v2 < 0 ? 0 : v2 > 1 ? 1 : v2;\n        const fx = clamp((cx - r2.left) / r2.width);\n        const fy = clamp((cy - r2.top) / r2.height);\n        const x = w2.globals.minX + fx * (w2.globals.maxX - w2.globals.minX);\n        const s2 = w2.globals.yAxisScale && w2.globals.yAxisScale[0];\n        const ymin = s2 && isFinite(s2.niceMin) ? s2.niceMin : w2.globals.minY;\n        const ymax = s2 && isFinite(s2.niceMax) ? s2.niceMax : w2.globals.maxY;\n        const y = ymax - fy * (ymax - ymin);\n        return {\n            x: x,\n            y: y\n        };\n    }\n    /**\n   * Resolve the configured items into runnable entries, dropping built-ins\n   * whose dependency is absent (e.g. measure not enabled).\n   * @param {any} context\n   * @returns {Array<{id:string,label:string,run:Function}>}\n   */ _resolveItems(context) {\n        const cfg = this._cfg();\n        const raw = Array.isArray(cfg.items) && cfg.items.length ? cfg.items : [\n            \"annotate\",\n            \"xline\",\n            \"yline\",\n            \"measure\"\n        ];\n        const labels = cfg.labels || {};\n        const out = [];\n        raw.forEach((it)=>{\n            if (typeof it === \"string\") {\n                if (it === \"annotate\") out.push({\n                    id: \"annotate\",\n                    label: labels.annotate || \"Add note here\",\n                    run: ()=>this._annotate(context)\n                });\n                else if (it === \"xline\") out.push({\n                    id: \"xline\",\n                    label: labels.xline || \"Annotate here\",\n                    run: ()=>this._line(context, \"x\")\n                });\n                else if (it === \"yline\") out.push({\n                    id: \"yline\",\n                    label: labels.yline || \"Mark this level\",\n                    run: ()=>this._line(context, \"y\")\n                });\n                else if (it === \"measure\") {\n                    const m2 = this.ctx.measure;\n                    const on = m2 && this.w.config.chart.measure && this.w.config.chart.measure.enabled;\n                    if (on) out.push({\n                        id: \"measure\",\n                        label: labels.measure || \"Measure from here\",\n                        run: ()=>m2.seedFromClient(context.clientX, context.clientY)\n                    });\n                }\n            } else if (it && typeof it === \"object\" && typeof it.onClick === \"function\") out.push({\n                id: it.id || \"custom\",\n                label: it.label || \"Action\",\n                run: ()=>it.onClick(this.ctx, context)\n            });\n        });\n        return out;\n    }\n    /** @param {any} context */ _annotate(context) {\n        if (context.x == null || context.y == null) return;\n        const cfg = this._cfg();\n        const ink = this.ctx.ink;\n        if (ink && typeof ink.createAt === \"function\") {\n            ink.createAt(context.x, context.y, {\n                text: cfg.noteText || \"Note\"\n            });\n            return;\n        }\n        this.ctx.addPointAnnotation({\n            x: context.x,\n            y: context.y,\n            marker: {\n                size: 5\n            },\n            label: {\n                text: cfg.noteText || \"Note\",\n                style: {\n                    background: \"#fff\",\n                    color: \"#334155\"\n                }\n            }\n        }, true);\n    }\n    /**\n   * The 'xline' / 'yline' items: drop a dashed line annotation at the clicked\n   * data point ('x' = vertical line at the clicked x, 'y' = horizontal line\n   * at the clicked y). Lines only: no x2/y2 is ever set, so this never\n   * creates a range rectangle. Both items share chart.contextMenu.line\n   * ({ text, strokeDashArray, color }) for styling.\n   * @param {any} context @param {'x'|'y'} axis\n   */ _line(context, axis) {\n        const lc = this._cfg().line || {};\n        const val = axis === \"x\" ? context.x : context.y;\n        if (val == null) return;\n        const ink = this.ctx.ink;\n        if (ink && typeof ink.createLineAt === \"function\") {\n            ink.createLineAt(axis, val, {\n                text: lc.text,\n                strokeDashArray: lc.strokeDashArray,\n                color: lc.color\n            });\n            return;\n        }\n        const anno = {\n            strokeDashArray: lc.strokeDashArray != null ? lc.strokeDashArray : 4\n        };\n        if (lc.text) anno.label = {\n            text: lc.text\n        };\n        if (lc.color) {\n            anno.borderColor = lc.color;\n            anno.label = $e4b487e979d7c06d$var$Utils$1.extend(anno.label || {}, {\n                borderColor: lc.color\n            });\n        }\n        if (axis === \"x\") this.ctx.addXaxisAnnotation($e4b487e979d7c06d$var$Utils$1.extend(anno, {\n            x: val\n        }), true);\n        else this.ctx.addYaxisAnnotation($e4b487e979d7c06d$var$Utils$1.extend(anno, {\n            y: val\n        }), true);\n    }\n    /**\n   * Open the menu at a client-space point.\n   * @param {number} clientX @param {number} clientY\n   */ open(clientX, clientY) {\n        this.close();\n        const w2 = this.w;\n        const elWrap = w2.dom.elWrap;\n        const doc = this._doc();\n        if (!elWrap || !doc) return;\n        const data = this._clientToData(clientX, clientY);\n        const g2 = w2.globals;\n        const context = {\n            x: data ? data.x : null,\n            y: data ? data.y : null,\n            seriesIndex: g2.capturedSeriesIndex >= 0 ? g2.capturedSeriesIndex : null,\n            dataPointIndex: g2.capturedDataPointIndex >= 0 ? g2.capturedDataPointIndex : null,\n            clientX: clientX,\n            clientY: clientY\n        };\n        const items = this._resolveItems(context);\n        if (!items.length) return;\n        this._items = items;\n        const menu = doc.createElement(\"div\");\n        menu.className = \"apexcharts-context-menu\";\n        menu.setAttribute(\"role\", \"menu\");\n        menu.style.position = \"absolute\";\n        menu.style.visibility = \"hidden\";\n        items.forEach((it, i2)=>{\n            const btn = doc.createElement(\"button\");\n            btn.type = \"button\";\n            btn.className = \"apexcharts-context-menu-item\";\n            btn.setAttribute(\"role\", \"menuitem\");\n            btn.tabIndex = -1;\n            btn.textContent = it.label;\n            btn.addEventListener(\"click\", (ev)=>{\n                ev.stopPropagation();\n                this._activate(i2);\n            });\n            btn.addEventListener(\"mouseenter\", ()=>this._focus(i2));\n            menu.appendChild(btn);\n        });\n        elWrap.appendChild(menu);\n        this.menu = menu;\n        const wrapRect = elWrap.getBoundingClientRect();\n        let left = clientX - wrapRect.left;\n        let top = clientY - wrapRect.top;\n        const mw = menu.offsetWidth;\n        const mh = menu.offsetHeight;\n        const maxLeft = Math.max(0, elWrap.clientWidth - mw);\n        const maxTop = Math.max(0, elWrap.clientHeight - mh);\n        if (left > maxLeft) left = maxLeft;\n        if (top > maxTop) top = maxTop;\n        menu.style.left = Math.max(0, left) + \"px\";\n        menu.style.top = Math.max(0, top) + \"px\";\n        menu.style.visibility = \"visible\";\n        doc.addEventListener(\"mousedown\", this._onDocDown, true);\n        doc.addEventListener(\"keydown\", this._onKey, true);\n        this._focus(0);\n    }\n    /** @param {number} i */ _focus(i2) {\n        if (!this.menu) return;\n        const btns = this.menu.querySelectorAll(\".apexcharts-context-menu-item\");\n        if (this._focusIndex >= 0 && btns[this._focusIndex]) btns[this._focusIndex].classList.remove(\"apexcharts-context-menu-item--active\");\n        this._focusIndex = i2;\n        if (btns[i2]) {\n            btns[i2].classList.add(\"apexcharts-context-menu-item--active\");\n            if (typeof btns[i2].focus === \"function\") btns[i2].focus();\n        }\n    }\n    /** @param {number} i */ _activate(i2) {\n        const it = this._items[i2];\n        this.close();\n        if (it) it.run();\n    }\n    /** @param {any} e */ _onDocDown(e2) {\n        if (this.menu && this.menu.contains(e2.target)) return;\n        this.close();\n    }\n    /** @param {any} e */ _onKey(e2) {\n        if (!this.menu || !this._items.length) return;\n        if (e2.key === \"Escape\") {\n            e2.preventDefault();\n            this.close();\n        } else if (e2.key === \"ArrowDown\") {\n            e2.preventDefault();\n            this._focus((this._focusIndex + 1) % this._items.length);\n        } else if (e2.key === \"ArrowUp\") {\n            e2.preventDefault();\n            this._focus((this._focusIndex - 1 + this._items.length) % this._items.length);\n        } else if (e2.key === \"Enter\" || e2.key === \" \") {\n            e2.preventDefault();\n            this._activate(this._focusIndex < 0 ? 0 : this._focusIndex);\n        }\n    }\n    close() {\n        const doc = this._doc();\n        if (doc) {\n            doc.removeEventListener(\"mousedown\", this._onDocDown, true);\n            doc.removeEventListener(\"keydown\", this._onKey, true);\n        }\n        if (this.menu && this.menu.parentNode) this.menu.parentNode.removeChild(this.menu);\n        this.menu = null;\n        this._items = [];\n        this._focusIndex = -1;\n    }\n    teardown() {\n        this.close();\n        this._detachTrigger();\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.registerFeatures({\n    contextMenu: $e4b487e979d7c06d$var$ContextMenu\n});\nconst $e4b487e979d7c06d$var$MAX_BINS = 1e3;\nfunction $e4b487e979d7c06d$var$quantileSorted(sorted, q) {\n    const n2 = sorted.length;\n    if (n2 === 0) return NaN;\n    if (n2 === 1) return sorted[0];\n    const pos = (n2 - 1) * q;\n    const lo = Math.floor(pos);\n    const hi = Math.ceil(pos);\n    if (lo === hi) return sorted[lo];\n    return sorted[lo] + (sorted[hi] - sorted[lo]) * (pos - lo);\n}\nfunction $e4b487e979d7c06d$var$stdDev(values) {\n    const n2 = values.length;\n    if (n2 < 2) return 0;\n    let sum = 0;\n    for(let i2 = 0; i2 < n2; i2++)sum += values[i2];\n    const mean = sum / n2;\n    let acc = 0;\n    for(let i2 = 0; i2 < n2; i2++){\n        const d = values[i2] - mean;\n        acc += d * d;\n    }\n    return Math.sqrt(acc / n2);\n}\nfunction $e4b487e979d7c06d$var$widthForRule(sorted, span, rule) {\n    const n2 = sorted.length;\n    const byCount = (count)=>span / Math.max(1, Math.ceil(count));\n    switch(rule){\n        case \"sqrt\":\n            return {\n                width: byCount(Math.sqrt(n2)),\n                rule: \"sqrt\"\n            };\n        case \"rice\":\n            return {\n                width: byCount(2 * Math.cbrt(n2)),\n                rule: \"rice\"\n            };\n        case \"scott\":\n            {\n                const sd = $e4b487e979d7c06d$var$stdDev(sorted);\n                if (sd > 0) return {\n                    width: 3.49 * sd * Math.pow(n2, -1 / 3),\n                    rule: \"scott\"\n                };\n                return {\n                    width: byCount(Math.log2(n2) + 1),\n                    rule: \"sturges\"\n                };\n            }\n        case \"fd\":\n            {\n                const iqr = $e4b487e979d7c06d$var$quantileSorted(sorted, 0.75) - $e4b487e979d7c06d$var$quantileSorted(sorted, 0.25);\n                if (iqr > 0) return {\n                    width: 2 * iqr * Math.pow(n2, -1 / 3),\n                    rule: \"fd\"\n                };\n                return {\n                    width: byCount(Math.log2(n2) + 1),\n                    rule: \"sturges\"\n                };\n            }\n        case \"auto\":\n            {\n                const sturges = byCount(Math.log2(n2) + 1);\n                const iqr = $e4b487e979d7c06d$var$quantileSorted(sorted, 0.75) - $e4b487e979d7c06d$var$quantileSorted(sorted, 0.25);\n                if (iqr <= 0) return {\n                    width: sturges,\n                    rule: \"sturges\"\n                };\n                const fd = 2 * iqr * Math.pow(n2, -1 / 3);\n                return fd < sturges ? {\n                    width: fd,\n                    rule: \"fd\"\n                } : {\n                    width: sturges,\n                    rule: \"sturges\"\n                };\n            }\n        case \"sturges\":\n        default:\n            return {\n                width: byCount(Math.log2(n2) + 1),\n                rule: \"sturges\"\n            };\n    }\n}\nfunction $e4b487e979d7c06d$var$computeBinning(values, opts = {}) {\n    if (!Array.isArray(values) || values.length === 0) return null;\n    const sorted = values.slice().sort((a2, b2)=>a2 - b2);\n    let lo = sorted[0];\n    let hi = sorted[sorted.length - 1];\n    const range = opts.range;\n    if (Array.isArray(range) && range.length === 2) {\n        const rLo = Number(range[0]);\n        const rHi = Number(range[1]);\n        if (isFinite(rLo) && isFinite(rHi) && rHi > rLo) {\n            lo = rLo;\n            hi = rHi;\n        }\n    }\n    if (!(hi > lo)) {\n        const pad = Math.abs(lo) > 0 ? Math.abs(lo) * 0.05 : 0.5;\n        return {\n            edges: [\n                lo - pad,\n                lo + pad\n            ],\n            binWidth: pad * 2,\n            rule: \"single\",\n            capped: false\n        };\n    }\n    const span = hi - lo;\n    let width;\n    let rule;\n    if (typeof opts.binWidth === \"number\" && opts.binWidth > 0) {\n        width = opts.binWidth;\n        rule = \"binWidth\";\n    } else if (typeof opts.bins === \"number\" && opts.bins >= 1) {\n        width = span / Math.floor(opts.bins);\n        rule = \"count\";\n    } else {\n        const chosen = $e4b487e979d7c06d$var$widthForRule(sorted, span, typeof opts.bins === \"string\" ? opts.bins : \"auto\");\n        width = chosen.width;\n        rule = chosen.rule;\n    }\n    if (!isFinite(width) || width <= 0) width = span;\n    let count = Math.ceil(span / width);\n    if (!isFinite(count) || count < 1) count = 1;\n    let capped = false;\n    if (count > $e4b487e979d7c06d$var$MAX_BINS) {\n        count = $e4b487e979d7c06d$var$MAX_BINS;\n        width = span / count;\n        capped = true;\n    }\n    width = span / count;\n    const edges = new Array(count + 1);\n    for(let k = 0; k <= count; k++)edges[k] = lo + k * width;\n    edges[count] = Math.max(edges[count], hi);\n    return {\n        edges: edges,\n        binWidth: width,\n        rule: rule,\n        capped: capped\n    };\n}\nfunction $e4b487e979d7c06d$var$binIndexOf(v2, edges) {\n    const last = edges.length - 1;\n    if (!(v2 >= edges[0]) || v2 > edges[last]) return -1;\n    if (v2 === edges[last]) return last - 1;\n    const width = (edges[last] - edges[0]) / last;\n    if (width > 0) {\n        let k = Math.floor((v2 - edges[0]) / width);\n        if (k < 0) k = 0;\n        if (k > last - 1) k = last - 1;\n        if (v2 < edges[k]) k--;\n        else if (v2 >= edges[k + 1]) k++;\n        if (k < 0 || k > last - 1) return -1;\n        return k;\n    }\n    let lo = 0;\n    let hi = last - 1;\n    while(lo <= hi){\n        const mid = lo + hi >> 1;\n        if (v2 < edges[mid]) hi = mid - 1;\n        else if (v2 >= edges[mid + 1]) lo = mid + 1;\n        else return mid;\n    }\n    return -1;\n}\nfunction $e4b487e979d7c06d$var$binCounts(values, edges) {\n    const counts = new Array(Math.max(0, edges.length - 1)).fill(0);\n    for(let i2 = 0; i2 < values.length; i2++){\n        const k = $e4b487e979d7c06d$var$binIndexOf(values[i2], edges);\n        if (k >= 0) counts[k]++;\n    }\n    return counts;\n}\nfunction $e4b487e979d7c06d$var$rowsByBin(values, edges) {\n    const n2 = Math.max(0, edges.length - 1);\n    const buckets = new Array(n2);\n    for(let k = 0; k < n2; k++)buckets[k] = [];\n    for(let i2 = 0; i2 < values.length; i2++){\n        const k = $e4b487e979d7c06d$var$binIndexOf(values[i2], edges);\n        if (k >= 0) buckets[k].push(values[i2]);\n    }\n    return buckets;\n}\nfunction $e4b487e979d7c06d$var$fiveNumberSummary(values, opts = {}) {\n    if (!Array.isArray(values) || values.length === 0) return null;\n    const sorted = values.slice().sort((a2, b2)=>a2 - b2);\n    const q1 = $e4b487e979d7c06d$var$quantileSorted(sorted, 0.25);\n    const median = $e4b487e979d7c06d$var$quantileSorted(sorted, 0.5);\n    const q3 = $e4b487e979d7c06d$var$quantileSorted(sorted, 0.75);\n    const iqr = q3 - q1;\n    let lo = sorted[0];\n    let hi = sorted[sorted.length - 1];\n    let outliers = [];\n    if (opts.whiskers === \"tukey\" && iqr > 0) {\n        const loFence = q1 - 1.5 * iqr;\n        const hiFence = q3 + 1.5 * iqr;\n        let i2 = 0;\n        while(i2 < sorted.length && sorted[i2] < loFence)i2++;\n        let j = sorted.length - 1;\n        while(j >= 0 && sorted[j] > hiFence)j--;\n        if (i2 <= j) {\n            lo = sorted[i2];\n            hi = sorted[j];\n            outliers = sorted.slice(0, i2).concat(sorted.slice(j + 1));\n        }\n    }\n    return {\n        summary: [\n            lo,\n            q1,\n            median,\n            q3,\n            hi\n        ],\n        outliers: outliers,\n        iqr: iqr\n    };\n}\nfunction $e4b487e979d7c06d$var$kernelDensity(values, opts = {}) {\n    if (!Array.isArray(values) || values.length === 0) return null;\n    const sorted = values.slice().sort((a2, b2)=>a2 - b2);\n    const n2 = sorted.length;\n    let h2 = opts.bandwidth;\n    if (!(typeof h2 === \"number\" && h2 > 0)) {\n        const sd = $e4b487e979d7c06d$var$stdDev(sorted);\n        const iqr = $e4b487e979d7c06d$var$quantileSorted(sorted, 0.75) - $e4b487e979d7c06d$var$quantileSorted(sorted, 0.25);\n        const spread = iqr > 0 ? Math.min(sd, iqr / 1.349) : sd;\n        h2 = 0.9 * spread * Math.pow(n2, -0.2);\n    }\n    if (!isFinite(h2) || h2 <= 0) {\n        const v2 = sorted[0];\n        const eps = Math.abs(v2) > 0 ? Math.abs(v2) * 1e-3 : 1e-3;\n        return {\n            density: [\n                [\n                    v2 - eps,\n                    0\n                ],\n                [\n                    v2,\n                    1\n                ],\n                [\n                    v2 + eps,\n                    0\n                ]\n            ],\n            bandwidth: eps\n        };\n    }\n    const steps = Math.max(8, Math.floor(opts.resolution || 64));\n    const lo = sorted[0] - 2 * h2;\n    const hi = sorted[n2 - 1] + 2 * h2;\n    const step = (hi - lo) / (steps - 1);\n    const norm = 1 / (n2 * h2 * Math.sqrt(2 * Math.PI));\n    const density = [];\n    for(let g2 = 0; g2 < steps; g2++){\n        const x = lo + g2 * step;\n        let sum = 0;\n        for(let i2 = 0; i2 < n2; i2++){\n            const z = (x - sorted[i2]) / h2;\n            sum += Math.exp(-0.5 * z * z);\n        }\n        density.push([\n            x,\n            sum * norm\n        ]);\n    }\n    return {\n        density: density,\n        bandwidth: h2\n    };\n}\nfunction $e4b487e979d7c06d$var$normalizeCounts(counts, opts = {}) {\n    let out = counts.slice();\n    if (opts.cumulative) {\n        let acc = 0;\n        out = out.map((c2)=>acc += c2);\n    }\n    const total = counts.reduce((a2, b2)=>a2 + b2, 0);\n    if (total <= 0) return out;\n    if (opts.normalize === \"relative\") return out.map((c2)=>c2 / total * 100);\n    if (opts.normalize === \"density\") {\n        const w2 = opts.binWidth;\n        if (typeof w2 === \"number\" && w2 > 0) return out.map((c2)=>c2 / (total * w2));\n    }\n    return out;\n}\nfunction $e4b487e979d7c06d$var$histogramValues(data) {\n    const out = [];\n    if (!Array.isArray(data)) return out;\n    for(let i2 = 0; i2 < data.length; i2++){\n        const d = data[i2];\n        let raw = d;\n        if (Array.isArray(d)) raw = d.length === 1 ? d[0] : d[1];\n        else if (d && typeof d === \"object\") raw = d.y !== void 0 ? d.y : d.x;\n        const v2 = $e4b487e979d7c06d$var$Utils$1.parseNumber(raw);\n        if (v2 !== null && isFinite(v2)) out.push(v2);\n    }\n    return out;\n}\nfunction $e4b487e979d7c06d$var$histogramTransform(ser, w2) {\n    var _a;\n    const cnf = w2.config;\n    const gl = w2.globals;\n    if (!Array.isArray(ser)) return ser;\n    if (!gl.histogramRawSeries) gl.histogramRawSeries = ser.map((s2)=>$e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n            data: Array.isArray(s2 == null ? void 0 : s2.data) ? s2.data.slice() : s2 == null ? void 0 : s2.data\n        }));\n    const raw = gl.histogramRawSeries;\n    const hcfg = ((_a = cnf.plotOptions) == null ? void 0 : _a.histogram) || {};\n    const perSeries = raw.map((s2)=>$e4b487e979d7c06d$var$histogramValues(s2 == null ? void 0 : s2.data));\n    let all = [];\n    if (perSeries.length === 1) all = perSeries[0];\n    else for (const vals of perSeries)all = all.concat(vals);\n    const binning = $e4b487e979d7c06d$var$computeBinning(all, {\n        bins: hcfg.bins,\n        binWidth: hcfg.binWidth,\n        range: hcfg.range\n    });\n    if (!binning) {\n        w2.histogramData = {\n            edges: [],\n            binWidth: 0,\n            counts: [],\n            rule: \"\",\n            capped: false\n        };\n        return raw;\n    }\n    const { edges: edges, binWidth: binWidth } = binning;\n    const counts = perSeries.map((vals)=>$e4b487e979d7c06d$var$binCounts(vals, edges));\n    w2.histogramData = {\n        edges: edges,\n        binWidth: binWidth,\n        counts: counts,\n        rule: binning.rule,\n        capped: binning.capped\n    };\n    const collapsed = gl.collapsedSeriesIndices || [];\n    return raw.map((s2, i2)=>{\n        if (collapsed.indexOf(i2) !== -1) return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n            data: []\n        });\n        const ys = $e4b487e979d7c06d$var$normalizeCounts(counts[i2], {\n            normalize: hcfg.normalize,\n            cumulative: hcfg.cumulative,\n            binWidth: binWidth\n        });\n        const data = [];\n        for(let k = 0; k < ys.length; k++)data.push({\n            x: (edges[k] + edges[k + 1]) / 2,\n            y: ys[k]\n        });\n        return $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n            data: data\n        });\n    });\n}\nconst $e4b487e979d7c06d$var$derivedData = /* @__PURE__ */ new WeakSet();\nfunction $e4b487e979d7c06d$var$observationsOf(d, allowFlatY) {\n    var _a;\n    if (!d || typeof d !== \"object\" || Array.isArray(d)) return null;\n    let raw = null;\n    if (Array.isArray(d.points)) raw = d.points;\n    else if (Array.isArray((_a = d.y) == null ? void 0 : _a.points)) raw = d.y.points;\n    else if (allowFlatY && Array.isArray(d.y) && typeof d.y[0] === \"number\") raw = d.y;\n    if (!raw) return null;\n    const out = [];\n    for(let i2 = 0; i2 < raw.length; i2++){\n        const v2 = $e4b487e979d7c06d$var$Utils$1.parseNumber(raw[i2]);\n        if (v2 !== null && isFinite(v2)) out.push(v2);\n    }\n    return out.length ? out : null;\n}\nfunction $e4b487e979d7c06d$var$boxPlotTransform(ser, w2) {\n    var _a, _b;\n    if (!Array.isArray(ser)) return ser;\n    const whiskers = ((_b = (_a = w2.config.plotOptions) == null ? void 0 : _a.boxPlot) == null ? void 0 : _b.whiskers) || \"minmax\";\n    return ser.map((s2)=>{\n        if (!Array.isArray(s2 == null ? void 0 : s2.data)) return s2;\n        let touched = false;\n        const data = s2.data.map((d)=>{\n            if (Array.isArray(d == null ? void 0 : d.y) && d.y.length === 5 && !$e4b487e979d7c06d$var$derivedData.has(d)) return d;\n            const values = $e4b487e979d7c06d$var$observationsOf(d, false);\n            if (!values) return d;\n            const summary = $e4b487e979d7c06d$var$fiveNumberSummary(values, {\n                whiskers: whiskers\n            });\n            if (!summary) return d;\n            touched = true;\n            const next = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, d), {\n                y: summary.summary,\n                points: values\n            });\n            $e4b487e979d7c06d$var$derivedData.add(next);\n            return next;\n        });\n        return touched ? $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n            data: data\n        }) : s2;\n    });\n}\nfunction $e4b487e979d7c06d$var$violinTransform(ser, w2) {\n    var _a, _b;\n    if (!Array.isArray(ser)) return ser;\n    const kde = ((_b = (_a = w2.config.plotOptions) == null ? void 0 : _a.violin) == null ? void 0 : _b.kde) || {};\n    return ser.map((s2)=>{\n        if (!Array.isArray(s2 == null ? void 0 : s2.data)) return s2;\n        let touched = false;\n        const data = s2.data.map((d)=>{\n            var _a2;\n            if (Array.isArray((_a2 = d == null ? void 0 : d.y) == null ? void 0 : _a2.density) && d.y.density.length && !$e4b487e979d7c06d$var$derivedData.has(d)) return d;\n            const values = $e4b487e979d7c06d$var$observationsOf(d, true);\n            if (!values) return d;\n            const est = $e4b487e979d7c06d$var$kernelDensity(values, {\n                bandwidth: kde.bandwidth,\n                resolution: kde.resolution\n            });\n            if (!est) return d;\n            touched = true;\n            const next = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, d), {\n                y: {\n                    density: est.density,\n                    points: values\n                }\n            });\n            $e4b487e979d7c06d$var$derivedData.add(next);\n            return next;\n        });\n        return touched ? $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, s2), {\n            data: data\n        }) : s2;\n    });\n}\nconst $e4b487e979d7c06d$var$DEFAULT_MAX_ROWS = 3e3;\nfunction $e4b487e979d7c06d$var$thinClusters(clusters, maxRows) {\n    let total = 0;\n    let widest = 0;\n    for (const c2 of clusters){\n        total += c2.length;\n        if (c2.length > widest) widest = c2.length;\n    }\n    if (total <= maxRows) return {\n        clusters: clusters,\n        stride: 1,\n        total: total,\n        kept: total\n    };\n    const keptAt = (s2)=>{\n        let n2 = 0;\n        for (const c2 of clusters)n2 += Math.ceil(c2.length / s2);\n        return n2;\n    };\n    let stride = Math.max(2, Math.ceil(total / maxRows));\n    while(stride < widest && keptAt(stride) > maxRows)stride++;\n    let kept = 0;\n    const out = clusters.map((rows)=>{\n        const keepList = [];\n        for(let i2 = 0; i2 < rows.length; i2 += stride)keepList.push(rows[i2]);\n        kept += keepList.length;\n        return keepList;\n    });\n    return {\n        clusters: out,\n        stride: stride,\n        total: total,\n        kept: kept\n    };\n}\nfunction $e4b487e979d7c06d$var$toUnitSeries(w2, clusters, opts) {\n    const maxRows = opts && opts.maxRows != null ? opts.maxRows : $e4b487e979d7c06d$var$DEFAULT_MAX_ROWS;\n    const thinned = $e4b487e979d7c06d$var$thinClusters(clusters.map((c2)=>c2.rows), maxRows);\n    if (thinned.stride > 1) console.warn(`ApexCharts: rowSeries() thinned ${thinned.total} rows to ${thinned.kept} (every ${thinned.stride}${thinned.stride === 2 ? \"nd\" : thinned.stride === 3 ? \"rd\" : \"th\"} row) to stay under maxRows=${maxRows}. Raise maxRows to draw more.`);\n    const colors = w2.globals && w2.globals.colors || [];\n    return clusters.map((c2, i2)=>{\n        const fillColor = colors[c2.realIndex] || colors[0];\n        return {\n            name: c2.name,\n            data: thinned.clusters[i2].map((v2, q)=>$e4b487e979d7c06d$var$__spreadValues({\n                    id: `${c2.realIndex}:${i2}:${q}`,\n                    x: c2.name,\n                    y: v2\n                }, fillColor ? {\n                    fillColor: fillColor\n                } : {}))\n        };\n    });\n}\nfunction $e4b487e979d7c06d$var$histogramRows(w2, opts) {\n    const gl = w2.globals;\n    const hd = w2.histogramData;\n    const raw = gl && gl.histogramRawSeries;\n    if (!hd || !Array.isArray(hd.edges) || hd.edges.length < 2) return null;\n    if (!Array.isArray(raw) || !raw.length) return null;\n    const collapsed = gl && gl.collapsedSeriesIndices || [];\n    const edges = hd.edges;\n    const clusters = [];\n    raw.forEach((s2, i2)=>{\n        var _a;\n        if (collapsed.indexOf(i2) !== -1) return;\n        const buckets = $e4b487e979d7c06d$var$rowsByBin($e4b487e979d7c06d$var$histogramValues(s2 && s2.data), edges);\n        const seriesName = w2.seriesData && ((_a = w2.seriesData.seriesNames) == null ? void 0 : _a[i2]) || (s2 == null ? void 0 : s2.name);\n        buckets.forEach((rows, k)=>{\n            const range = `${$e4b487e979d7c06d$var$formatEdge(edges[k])}-${$e4b487e979d7c06d$var$formatEdge(edges[k + 1])}`;\n            clusters.push({\n                // Only qualify by series when there is more than one to tell apart.\n                name: raw.length > 1 && seriesName ? `${seriesName} ${range}` : range,\n                realIndex: i2,\n                rows: rows\n            });\n        });\n    });\n    return clusters.length ? $e4b487e979d7c06d$var$toUnitSeries(w2, clusters, opts) : null;\n}\nfunction $e4b487e979d7c06d$var$formatEdge(v2) {\n    if (!isFinite(v2)) return String(v2);\n    const r2 = Math.round(v2);\n    return Math.abs(v2 - r2) < 1e-6 ? String(r2) : String(Number(v2.toFixed(2)));\n}\nfunction $e4b487e979d7c06d$var$pointsRowSource(pick) {\n    return (w2, opts)=>{\n        var _a;\n        const perSeries = pick(w2);\n        if (!Array.isArray(perSeries) || !perSeries.length) return null;\n        const collapsed = w2.globals && w2.globals.collapsedSeriesIndices || [];\n        const labels = w2.globals && (((_a = w2.globals.categoryLabels) == null ? void 0 : _a.length) ? w2.globals.categoryLabels : w2.globals.labels) || [];\n        const clusters = [];\n        perSeries.forEach((byCat, i2)=>{\n            var _a2;\n            if (collapsed.indexOf(i2) !== -1) return;\n            if (!Array.isArray(byCat)) return;\n            const seriesName = w2.seriesData && ((_a2 = w2.seriesData.seriesNames) == null ? void 0 : _a2[i2]);\n            byCat.forEach((pts, j)=>{\n                const label = labels[j] != null ? String(labels[j]) : `#${j + 1}`;\n                clusters.push({\n                    name: perSeries.length > 1 && seriesName ? `${seriesName} ${label}` : label,\n                    realIndex: i2,\n                    rows: Array.isArray(pts) ? pts.slice() : []\n                });\n            });\n        });\n        return clusters.length ? $e4b487e979d7c06d$var$toUnitSeries(w2, clusters, opts) : null;\n    };\n}\nconst $e4b487e979d7c06d$var$boxPlotRows = $e4b487e979d7c06d$var$pointsRowSource((w2)=>{\n    var _a;\n    return (_a = w2.candleData) == null ? void 0 : _a.seriesBoxPoints;\n});\nconst $e4b487e979d7c06d$var$violinRows = $e4b487e979d7c06d$var$pointsRowSource((w2)=>{\n    var _a;\n    return (_a = w2.violinData) == null ? void 0 : _a.seriesViolinPoints;\n});\n$e4b487e979d7c06d$var$registerSeriesTransform(\"histogram\", $e4b487e979d7c06d$var$histogramTransform);\n$e4b487e979d7c06d$var$registerSeriesTransform(\"boxPlot\", $e4b487e979d7c06d$var$boxPlotTransform);\n$e4b487e979d7c06d$var$registerSeriesTransform(\"violin\", $e4b487e979d7c06d$var$violinTransform);\n$e4b487e979d7c06d$var$registerRowSource(\"histogram\", $e4b487e979d7c06d$var$histogramRows);\n$e4b487e979d7c06d$var$registerRowSource(\"boxPlot\", $e4b487e979d7c06d$var$boxPlotRows);\n$e4b487e979d7c06d$var$registerRowSource(\"violin\", $e4b487e979d7c06d$var$violinRows);\nclass $e4b487e979d7c06d$var$BarDataLabels {\n    /**\n   * @param {import('../../../charts/Bar').default} barCtx\n   */ constructor(barCtx){\n        this.w = barCtx.w;\n        this.barCtx = barCtx;\n        this.totalFormatter = this.w.config.plotOptions.bar.dataLabels.total.formatter;\n        if (!this.totalFormatter) this.totalFormatter = this.w.config.dataLabels.formatter;\n    }\n    /** handleBarDataLabels is used to calculate the positions for the data-labels\n   * It also sets the element's data attr for bars and calls drawCalculatedBarDataLabels()\n   * After calculating, it also calls the function to draw data labels\n   * @memberof Bar\n   * @param {Record<string, any>} opts - bar properties used throughout the bar drawing function\n   * @return {object} dataLabels node-element which you can append later\n   **/ handleBarDataLabels(opts) {\n        const { x: x, y: y, y1: y1, y2: y2, i: i2, j: j, realIndex: realIndex, columnGroupIndex: columnGroupIndex, series: series, barHeight: barHeight, barWidth: barWidth, barXPosition: barXPosition, barYPosition: barYPosition, visibleSeries: visibleSeries } = opts;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n        const strokeWidth = Array.isArray(this.barCtx.strokeWidth) ? this.barCtx.strokeWidth[realIndex] : this.barCtx.strokeWidth;\n        let bcx;\n        let bcy;\n        if (w2.axisFlags.isXNumeric && !w2.globals.isBarHorizontal) {\n            bcx = x + barWidth * (visibleSeries + 1);\n            bcy = y + barHeight * (visibleSeries + 1) - strokeWidth;\n        } else {\n            bcx = x + barWidth * visibleSeries;\n            bcy = y + barHeight * visibleSeries;\n        }\n        let dataLabels = null;\n        let totalDataLabels = null;\n        let dataLabelsX = x;\n        let dataLabelsY = y;\n        let dataLabelsPos = /** @type {any} */ {};\n        const dataLabelsConfig = w2.config.dataLabels;\n        const barDataLabelsConfig = this.barCtx.barOptions.dataLabels;\n        const barTotalDataLabelsConfig = this.barCtx.barOptions.dataLabels.total;\n        if (typeof barYPosition !== \"undefined\" && (this.barCtx.isRangeBar || this.barCtx.isPyramid)) {\n            bcy = barYPosition;\n            dataLabelsY = barYPosition;\n        }\n        if (typeof barXPosition !== \"undefined\" && this.barCtx.isVerticalGroupedRangeBar) {\n            bcx = barXPosition;\n            dataLabelsX = barXPosition;\n        }\n        const offX = $e4b487e979d7c06d$var$resolveDataLabelOffset(dataLabelsConfig.offsetX, w2, realIndex, j);\n        const offY = $e4b487e979d7c06d$var$resolveDataLabelOffset(dataLabelsConfig.offsetY, w2, realIndex, j);\n        let textRects = {\n            width: 0,\n            height: 0\n        };\n        if (w2.config.dataLabels.enabled) {\n            const yLabel = w2.seriesData.series[realIndex][j];\n            textRects = graphics.getTextRects(w2.config.dataLabels.formatter ? w2.config.dataLabels.formatter(yLabel, $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, w2), {\n                seriesIndex: realIndex,\n                dataPointIndex: j,\n                w: w2\n            })) : w2.formatters.yLabelFormatters[0](yLabel), parseFloat(dataLabelsConfig.style.fontSize).toString());\n        }\n        const params = {\n            x: x,\n            y: y,\n            i: i2,\n            j: j,\n            realIndex: realIndex,\n            columnGroupIndex: columnGroupIndex,\n            bcx: bcx,\n            bcy: bcy,\n            barHeight: barHeight,\n            barWidth: barWidth,\n            textRects: textRects,\n            strokeWidth: strokeWidth,\n            dataLabelsX: dataLabelsX,\n            dataLabelsY: dataLabelsY,\n            dataLabelsConfig: dataLabelsConfig,\n            barDataLabelsConfig: barDataLabelsConfig,\n            barTotalDataLabelsConfig: barTotalDataLabelsConfig,\n            offX: offX,\n            offY: offY\n        };\n        if (this.barCtx.isHorizontal) dataLabelsPos = this.calculateBarsDataLabelsPosition(params);\n        else dataLabelsPos = this.calculateColumnsDataLabelsPosition(params);\n        dataLabels = this.drawCalculatedDataLabels({\n            x: dataLabelsPos.dataLabelsX,\n            y: dataLabelsPos.dataLabelsY,\n            val: this.barCtx.isRangeBar ? [\n                y1,\n                y2\n            ] : w2.config.chart.stackType === \"100%\" ? series[realIndex][j] : w2.seriesData.series[realIndex][j],\n            i: realIndex,\n            j: j,\n            barWidth: barWidth,\n            barHeight: barHeight,\n            textRects: textRects,\n            dataLabelsConfig: dataLabelsConfig\n        });\n        if (w2.config.chart.stacked && barTotalDataLabelsConfig.enabled) totalDataLabels = this.drawTotalDataLabels({\n            x: dataLabelsPos.totalDataLabelsX,\n            y: dataLabelsPos.totalDataLabelsY,\n            barWidth: barWidth,\n            barHeight: barHeight,\n            realIndex: realIndex,\n            textAnchor: dataLabelsPos.totalDataLabelsAnchor,\n            val: this.getStackedTotalDataLabel({\n                realIndex: realIndex,\n                j: j\n            }),\n            dataLabelsConfig: dataLabelsConfig,\n            barTotalDataLabelsConfig: barTotalDataLabelsConfig\n        });\n        return {\n            dataLabelsPos: dataLabelsPos,\n            dataLabels: dataLabels,\n            totalDataLabels: totalDataLabels\n        };\n    }\n    /**\n   * True when this chart stacks in more than one group, so totals have to be\n   * resolved per group rather than across the whole data point. A single-group\n   * chart keeps every old code path exactly as it was. See #4173.\n   */ hasMultipleSeriesGroups() {\n        return this.w.labelData.seriesGroups.length > 1;\n    }\n    /**\n   * The series group `realIndex` belongs to, and that group's own stacking\n   * state, or null when totals are chart-wide (the single-group case).\n   * @param {number} realIndex\n   * @returns {{groupIndex: number, group: string[]} | null}\n   */ getTotalGroupContext(realIndex) {\n        if (!this.hasMultipleSeriesGroups()) return null;\n        const groupIndex = this.barCtx.barHelpers.getSeriesGroupIndex(realIndex);\n        if (groupIndex < 0) return null;\n        return {\n            groupIndex: groupIndex,\n            group: this.w.labelData.seriesGroups[groupIndex]\n        };\n    }\n    /**\n   * Whether `realIndex` is the series that should draw the stacked total.\n   *\n   * That is the series capping the stack. With grouped stacks each group has\n   * its own cap, so gating on the chart-wide `lastActiveBarSerieIndex` drew a\n   * single total for the last group only. See #4173.\n   * @param {number} realIndex\n   */ drawsStackedTotal(realIndex) {\n        const byGroup = this.barCtx.lastActiveBarSerieIndexByGroup;\n        const ctx = this.getTotalGroupContext(realIndex);\n        if (ctx && byGroup && byGroup.length > ctx.groupIndex) return byGroup[ctx.groupIndex] === realIndex;\n        return this.barCtx.lastActiveBarSerieIndex === realIndex;\n    }\n    /** @param {{realIndex: any, j: any}} opts */ getStackedTotalDataLabel({ realIndex: realIndex, j: j }) {\n        const w2 = this.w;\n        const ctx = this.getTotalGroupContext(realIndex);\n        const byGroups = w2.seriesData.stackedSeriesTotalsByGroups;\n        let val = ctx && byGroups && byGroups[ctx.groupIndex] ? byGroups[ctx.groupIndex][j] : this.barCtx.stackedSeriesTotals[j];\n        if (this.totalFormatter) val = this.totalFormatter(val, $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, w2), {\n            seriesIndex: realIndex,\n            dataPointIndex: j,\n            w: w2\n        }));\n        return val;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ calculateColumnsDataLabelsPosition(opts) {\n        const w2 = this.w;\n        let { i: i2, j: j, realIndex: realIndex, y: y, bcx: bcx, barWidth: barWidth, barHeight: barHeight, textRects: textRects, dataLabelsX: dataLabelsX, dataLabelsY: dataLabelsY, dataLabelsConfig: dataLabelsConfig, barDataLabelsConfig: barDataLabelsConfig, barTotalDataLabelsConfig: barTotalDataLabelsConfig, strokeWidth: strokeWidth, offX: offX, offY: offY } = opts;\n        let totalDataLabelsY;\n        let totalDataLabelsX;\n        const totalDataLabelsAnchor = \"middle\";\n        const totalDataLabelsBcx = bcx;\n        barHeight = Math.abs(barHeight);\n        const vertical = w2.config.plotOptions.bar.dataLabels.orientation === \"vertical\";\n        const { zeroEncounters: zeroEncounters } = this.barCtx.barHelpers.getZeroValueEncounters({\n            i: i2,\n            j: j\n        });\n        bcx = bcx - strokeWidth / 2;\n        const dataPointsDividedWidth = w2.layout.gridWidth / w2.globals.dataPoints;\n        if (this.barCtx.isVerticalGroupedRangeBar) dataLabelsX += barWidth / 2;\n        else {\n            if (w2.axisFlags.isXNumeric) dataLabelsX = bcx - barWidth / 2 + offX;\n            else dataLabelsX = bcx - dataPointsDividedWidth + barWidth / 2 + offX;\n            if (!w2.config.chart.stacked && zeroEncounters > 0 && w2.config.plotOptions.bar.hideZeroBarsWhenGrouped) dataLabelsX -= barWidth * zeroEncounters;\n        }\n        if (vertical) {\n            const offsetDLX = 2;\n            dataLabelsX = dataLabelsX + textRects.height / 2 - strokeWidth / 2 - offsetDLX;\n        }\n        const valIsNegative = w2.seriesData.series[i2][j] < 0;\n        let newY = y;\n        if (this.barCtx.isReversed) newY = y + (valIsNegative ? barHeight : -barHeight);\n        switch(barDataLabelsConfig.position){\n            case \"center\":\n                if (vertical) {\n                    if (valIsNegative) dataLabelsY = newY - barHeight / 2 + offY;\n                    else dataLabelsY = newY + barHeight / 2 - offY;\n                } else if (valIsNegative) dataLabelsY = newY - barHeight / 2 + textRects.height / 2 + offY;\n                else dataLabelsY = newY + barHeight / 2 + textRects.height / 2 - offY;\n                break;\n            case \"bottom\":\n                if (vertical) {\n                    if (valIsNegative) dataLabelsY = newY - barHeight + offY;\n                    else dataLabelsY = newY + barHeight - offY;\n                } else if (valIsNegative) dataLabelsY = newY - barHeight + textRects.height + strokeWidth + offY;\n                else dataLabelsY = newY + barHeight - textRects.height / 2 + strokeWidth - offY;\n                break;\n            case \"top\":\n                if (vertical) {\n                    if (valIsNegative) dataLabelsY = newY + offY;\n                    else dataLabelsY = newY - offY;\n                } else if (valIsNegative) dataLabelsY = newY - textRects.height / 2 - offY;\n                else dataLabelsY = newY + textRects.height + offY;\n                break;\n        }\n        let lowestPrevY = newY;\n        const totalGroupCtx = this.getTotalGroupContext(realIndex);\n        const prevYGroups = totalGroupCtx ? [\n            totalGroupCtx.group\n        ] : w2.labelData.seriesGroups;\n        prevYGroups.forEach((sg)=>{\n            var _a;\n            (_a = this.barCtx[sg.join(\",\")]) == null || _a.prevY.forEach((arr)=>{\n                if (valIsNegative) lowestPrevY = Math.max(arr[j], lowestPrevY);\n                else lowestPrevY = Math.min(arr[j], lowestPrevY);\n            });\n        });\n        if (this.drawsStackedTotal(realIndex) && barTotalDataLabelsConfig.enabled) {\n            const ADDITIONAL_OFFY = 18;\n            const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n            const totalLabeltextRects = graphics.getTextRects(this.getStackedTotalDataLabel({\n                realIndex: realIndex,\n                j: j\n            }), dataLabelsConfig.fontSize);\n            if (valIsNegative) totalDataLabelsY = lowestPrevY - totalLabeltextRects.height / 2 - offY - barTotalDataLabelsConfig.offsetY + ADDITIONAL_OFFY;\n            else totalDataLabelsY = lowestPrevY + totalLabeltextRects.height + offY + barTotalDataLabelsConfig.offsetY - ADDITIONAL_OFFY;\n            const xDivision = dataPointsDividedWidth;\n            totalDataLabelsX = totalDataLabelsBcx + (w2.axisFlags.isXNumeric ? -barWidth / 2 : barWidth / 2 - xDivision) + barTotalDataLabelsConfig.offsetX;\n        }\n        if (!w2.config.chart.stacked) {\n            if (dataLabelsY < 0) dataLabelsY = 0 + strokeWidth;\n            else if (dataLabelsY + textRects.height / 3 > w2.layout.gridHeight) dataLabelsY = w2.layout.gridHeight - strokeWidth;\n        }\n        return {\n            bcx: bcx,\n            bcy: y,\n            dataLabelsX: dataLabelsX,\n            dataLabelsY: dataLabelsY,\n            totalDataLabelsX: totalDataLabelsX,\n            totalDataLabelsY: totalDataLabelsY,\n            totalDataLabelsAnchor: totalDataLabelsAnchor\n        };\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ calculateBarsDataLabelsPosition(opts) {\n        var _a;\n        const w2 = this.w;\n        let { x: x, i: i2, j: j, realIndex: realIndex, bcy: bcy, barHeight: barHeight, barWidth: barWidth, textRects: textRects, dataLabelsX: dataLabelsX, strokeWidth: strokeWidth, dataLabelsConfig: dataLabelsConfig, barDataLabelsConfig: barDataLabelsConfig, barTotalDataLabelsConfig: barTotalDataLabelsConfig, offX: offX, offY: offY } = opts;\n        const dataPointsDividedHeight = w2.layout.gridHeight / w2.globals.dataPoints;\n        const { zeroEncounters: zeroEncounters } = this.barCtx.barHelpers.getZeroValueEncounters({\n            i: i2,\n            j: j\n        });\n        barWidth = Math.abs(barWidth);\n        let dataLabelsY;\n        if (this.barCtx.isPyramid) {\n            const centerOffset = (_a = textRects.centerOffset) != null ? _a : 0;\n            dataLabelsY = bcy + barHeight / 2 + offY - centerOffset;\n        } else dataLabelsY = bcy - (this.barCtx.isRangeBar ? 0 : dataPointsDividedHeight) + barHeight / 2 + textRects.height / 2 + offY - 3;\n        if (!w2.config.chart.stacked && zeroEncounters > 0 && w2.config.plotOptions.bar.hideZeroBarsWhenGrouped) dataLabelsY -= barHeight * zeroEncounters;\n        let totalDataLabelsX;\n        let totalDataLabelsY;\n        let totalDataLabelsAnchor = \"start\";\n        const valIsNegative = w2.seriesData.series[i2][j] < 0;\n        let newX = x;\n        if (this.barCtx.isReversed) {\n            newX = x + (valIsNegative ? -barWidth : barWidth);\n            totalDataLabelsAnchor = valIsNegative ? \"start\" : \"end\";\n        }\n        if (this.barCtx.isPyramid) dataLabelsX = w2.layout.gridWidth / 2 + offX;\n        else switch(barDataLabelsConfig.position){\n            case \"center\":\n                if (valIsNegative) dataLabelsX = newX + barWidth / 2 - offX;\n                else dataLabelsX = Math.max(textRects.width / 2, newX - barWidth / 2) + offX;\n                break;\n            case \"bottom\":\n                if (valIsNegative) dataLabelsX = newX + barWidth - strokeWidth - offX;\n                else dataLabelsX = newX - barWidth + strokeWidth + offX;\n                break;\n            case \"top\":\n                if (valIsNegative) dataLabelsX = newX - strokeWidth - offX;\n                else dataLabelsX = newX - strokeWidth + offX;\n                break;\n        }\n        let lowestPrevX = newX;\n        const totalGroupCtx = this.getTotalGroupContext(realIndex);\n        const prevXGroups = totalGroupCtx ? [\n            totalGroupCtx.group\n        ] : w2.labelData.seriesGroups;\n        prevXGroups.forEach((sg)=>{\n            var _a2;\n            (_a2 = this.barCtx[sg.join(\",\")]) == null || _a2.prevX.forEach((arr)=>{\n                if (valIsNegative) lowestPrevX = Math.min(arr[j], lowestPrevX);\n                else lowestPrevX = Math.max(arr[j], lowestPrevX);\n            });\n        });\n        if (this.drawsStackedTotal(realIndex) && barTotalDataLabelsConfig.enabled) {\n            const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n            const totalLabeltextRects = graphics.getTextRects(this.getStackedTotalDataLabel({\n                realIndex: realIndex,\n                j: j\n            }), dataLabelsConfig.fontSize);\n            if (valIsNegative) {\n                totalDataLabelsX = lowestPrevX - strokeWidth - offX - barTotalDataLabelsConfig.offsetX;\n                totalDataLabelsAnchor = \"end\";\n            } else totalDataLabelsX = lowestPrevX + offX + barTotalDataLabelsConfig.offsetX + (this.barCtx.isReversed ? -(barWidth + strokeWidth) : strokeWidth);\n            totalDataLabelsY = dataLabelsY - textRects.height / 2 + totalLabeltextRects.height / 2 + barTotalDataLabelsConfig.offsetY + strokeWidth;\n            if (w2.globals.barGroups.length > 1 && !totalGroupCtx) totalDataLabelsY = totalDataLabelsY - w2.globals.barGroups.length / 2 * (barHeight / 2);\n        }\n        if (!w2.config.chart.stacked) {\n            if (dataLabelsConfig.textAnchor === \"start\") {\n                if (dataLabelsX - textRects.width < 0) dataLabelsX = valIsNegative ? textRects.width + strokeWidth - offX : strokeWidth + offX;\n                else if (dataLabelsX + textRects.width > w2.layout.gridWidth) dataLabelsX = valIsNegative ? w2.layout.gridWidth - strokeWidth : w2.layout.gridWidth - textRects.width - strokeWidth;\n            } else if (dataLabelsConfig.textAnchor === \"middle\") {\n                if (dataLabelsX - textRects.width / 2 < 0) dataLabelsX = textRects.width / 2 + strokeWidth;\n                else if (dataLabelsX + textRects.width / 2 > w2.layout.gridWidth) dataLabelsX = w2.layout.gridWidth - textRects.width / 2 - strokeWidth;\n            } else if (dataLabelsConfig.textAnchor === \"end\") {\n                if (dataLabelsX < 1) dataLabelsX = textRects.width + strokeWidth;\n                else if (dataLabelsX + 1 > w2.layout.gridWidth) dataLabelsX = w2.layout.gridWidth - textRects.width - strokeWidth;\n            }\n        }\n        return {\n            bcx: x,\n            bcy: bcy,\n            dataLabelsX: dataLabelsX,\n            dataLabelsY: dataLabelsY,\n            totalDataLabelsX: totalDataLabelsX,\n            totalDataLabelsY: totalDataLabelsY,\n            totalDataLabelsAnchor: totalDataLabelsAnchor\n        };\n    }\n    /** @param {{x: any, y: any, val: any, i: any, j: any, textRects: any, barHeight: any, barWidth: any, dataLabelsConfig: any}} opts */ drawCalculatedDataLabels({ x: x, y: y, val: val, i: i2, j: // = realIndex\n    j, textRects: textRects, barHeight: barHeight, barWidth: barWidth, dataLabelsConfig: dataLabelsConfig }) {\n        var _a, _b;\n        const w2 = this.w;\n        let rotate = \"rotate(0)\";\n        if (w2.config.plotOptions.bar.dataLabels.orientation === \"vertical\") rotate = `rotate(-90, ${x}, ${y})`;\n        const dataLabels = new $e4b487e979d7c06d$var$DataLabels(this.barCtx.w, this.barCtx.ctx);\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n        const formatter = dataLabelsConfig.formatter;\n        let elDataLabelsWrap = null;\n        const isSeriesNotCollapsed = w2.globals.collapsedSeriesIndices.indexOf(i2) > -1;\n        if (dataLabelsConfig.enabled && !isSeriesNotCollapsed) {\n            elDataLabelsWrap = graphics.group({\n                class: \"apexcharts-data-labels\",\n                transform: rotate\n            });\n            const dlCfg = w2.config.dataLabels;\n            if (((_a = dlCfg.animate) == null ? void 0 : _a.enabled) || ((_b = dlCfg.countUp) == null ? void 0 : _b.enabled)) {\n                elDataLabelsWrap.node.setAttribute(\"data:dlKey\", `${i2}::${$e4b487e979d7c06d$var$datumKey(w2, i2, j)}`);\n                elDataLabelsWrap.node.setAttribute(\"data:dlJ\", String(j));\n                if (typeof val === \"number\" && isFinite(val)) elDataLabelsWrap.node.setAttribute(\"data:dlVal\", String(val));\n            }\n            let text = \"\";\n            if (typeof val !== \"undefined\") text = formatter(val, $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, w2), {\n                seriesIndex: i2,\n                dataPointIndex: j,\n                w: w2\n            }));\n            if (!val && w2.config.plotOptions.bar.hideZeroBarsWhenGrouped) text = \"\";\n            const valIsNegative = w2.seriesData.series[i2][j] < 0;\n            const position = w2.config.plotOptions.bar.dataLabels.position;\n            if (w2.config.plotOptions.bar.dataLabels.orientation === \"vertical\") {\n                if (position === \"top\") {\n                    if (valIsNegative) dataLabelsConfig.textAnchor = \"end\";\n                    else dataLabelsConfig.textAnchor = \"start\";\n                }\n                if (position === \"center\") dataLabelsConfig.textAnchor = \"middle\";\n                if (position === \"bottom\") {\n                    if (valIsNegative) dataLabelsConfig.textAnchor = \"end\";\n                    else dataLabelsConfig.textAnchor = \"start\";\n                }\n            }\n            if (this.barCtx.isRangeBar && this.barCtx.barOptions.dataLabels.hideOverflowingLabels) {\n                const txRect = graphics.getTextRects(text, parseFloat(dataLabelsConfig.style.fontSize).toString());\n                if (barWidth < txRect.width) text = \"\";\n            }\n            if (w2.config.chart.stacked && this.barCtx.barOptions.dataLabels.hideOverflowingLabels) {\n                if (this.barCtx.isHorizontal) {\n                    if (textRects.width / 1.6 > Math.abs(barWidth)) text = \"\";\n                } else if (textRects.height / 1.6 > Math.abs(barHeight)) text = \"\";\n            }\n            const modifiedDataLabelsConfig = $e4b487e979d7c06d$var$__spreadValues({}, dataLabelsConfig);\n            if (this.barCtx.isHorizontal) {\n                if (val < 0) {\n                    if (dataLabelsConfig.textAnchor === \"start\") modifiedDataLabelsConfig.textAnchor = \"end\";\n                    else if (dataLabelsConfig.textAnchor === \"end\") modifiedDataLabelsConfig.textAnchor = \"start\";\n                }\n            }\n            dataLabels.plotDataLabelsText({\n                x: x,\n                y: y,\n                text: text,\n                i: i2,\n                j: j,\n                parent: elDataLabelsWrap,\n                dataLabelsConfig: modifiedDataLabelsConfig,\n                alwaysDrawDataLabel: true,\n                offsetCorrection: true\n            });\n        }\n        return elDataLabelsWrap;\n    }\n    /** @param {{ x?: any, y?: any, val?: any, realIndex?: any, textAnchor?: any, barWidth?: any, barHeight?: any, dataLabelsConfig?: any, barTotalDataLabelsConfig?: any }} opts */ drawTotalDataLabels({ x: x, y: y, val: val, realIndex: realIndex, textAnchor: textAnchor, barTotalDataLabelsConfig: barTotalDataLabelsConfig }) {\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n        let totalDataLabelText;\n        if (barTotalDataLabelsConfig.enabled && typeof x !== \"undefined\" && typeof y !== \"undefined\" && this.drawsStackedTotal(realIndex)) totalDataLabelText = graphics.drawText({\n            x: x,\n            y: y,\n            foreColor: barTotalDataLabelsConfig.style.color,\n            text: val,\n            textAnchor: textAnchor,\n            fontFamily: barTotalDataLabelsConfig.style.fontFamily,\n            fontSize: barTotalDataLabelsConfig.style.fontSize,\n            fontWeight: barTotalDataLabelsConfig.style.fontWeight\n        });\n        return totalDataLabelText;\n    }\n}\nfunction $e4b487e979d7c06d$var$isHistogramOverlay(w2) {\n    var _a, _b, _c, _d, _e, _f, _g;\n    if (((_b = (_a = w2 == null ? void 0 : w2.config) == null ? void 0 : _a.chart) == null ? void 0 : _b.requestedType) !== \"histogram\") return false;\n    if (((_d = (_c = w2.config.plotOptions) == null ? void 0 : _c.histogram) == null ? void 0 : _d.overlap) === false) return false;\n    return ((_g = (_f = (_e = w2.seriesData) == null ? void 0 : _e.series) == null ? void 0 : _f.length) != null ? _g : 0) > 1;\n}\nlet $e4b487e979d7c06d$var$Helpers$1 = class Helpers4 {\n    /**\n   * @param {Record<string, any>} barCtx\n   */ constructor(barCtx){\n        this.w = barCtx.w;\n        this.barCtx = barCtx;\n    }\n    /**\n   * @param {any[]} series\n   */ initVariables(series) {\n        const w2 = this.w;\n        this.barCtx.series = series;\n        this.barCtx.totalItems = 0;\n        this.barCtx.seriesLen = 0;\n        this.barCtx.visibleI = -1;\n        this.barCtx.visibleItems = 1;\n        for(let sl = 0; sl < series.length; sl++){\n            if (series[sl].length > 0) {\n                this.barCtx.seriesLen = this.barCtx.seriesLen + 1;\n                this.barCtx.totalItems += series[sl].length;\n            }\n            if (w2.axisFlags.isXNumeric) {\n                for(let j = 0; j < series[sl].length; j++)if (w2.seriesData.seriesX[sl][j] > w2.globals.minX && w2.seriesData.seriesX[sl][j] < w2.globals.maxX) this.barCtx.visibleItems++;\n            } else this.barCtx.visibleItems = w2.globals.dataPoints;\n        }\n        this.arrBorderRadius = this.createBorderRadiusArr(w2.seriesData.series);\n        if ($e4b487e979d7c06d$var$Utils$1.isSafari()) this.arrBorderRadius = this.arrBorderRadius.map((brArr)=>/**\n           * @param {any} _\n           */ brArr.map((_)=>\"none\"));\n        if (this.barCtx.seriesLen === 0) this.barCtx.seriesLen = 1;\n    }\n    /**\n   * @param {number} realIndex\n   */ initialPositions(realIndex) {\n        const w2 = this.w;\n        let x, y, yDivision, xDivision, barHeight, barWidth, zeroH, zeroW;\n        let dataPoints = w2.globals.dataPoints;\n        if (this.barCtx.isRangeBar) dataPoints = w2.labelData.labels.length;\n        let seriesLen = this.barCtx.seriesLen;\n        if (w2.config.plotOptions.bar.rangeBarGroupRows || $e4b487e979d7c06d$var$isHistogramOverlay(w2)) seriesLen = 1;\n        if (this.barCtx.isHorizontal) {\n            yDivision = w2.layout.gridHeight / dataPoints;\n            barHeight = yDivision / seriesLen;\n            if (w2.axisFlags.isXNumeric) {\n                yDivision = w2.layout.gridHeight / this.barCtx.totalItems;\n                barHeight = yDivision / this.barCtx.seriesLen;\n            }\n            barHeight = barHeight * parseInt(this.barCtx.barOptions.barHeight, 10) / 100;\n            if (String(this.barCtx.barOptions.barHeight).indexOf(\"%\") === -1) barHeight = parseInt(this.barCtx.barOptions.barHeight, 10);\n            zeroW = this.barCtx.baseLineInvertedY + w2.globals.padHorizontal + (this.barCtx.isReversed ? w2.layout.gridWidth : 0) - (this.barCtx.isReversed ? this.barCtx.baseLineInvertedY * 2 : 0);\n            if (this.barCtx.isFunnel) zeroW = w2.layout.gridWidth / 2;\n            y = (yDivision - barHeight * this.barCtx.seriesLen) / 2;\n        } else {\n            xDivision = w2.layout.gridWidth / this.barCtx.visibleItems;\n            if (w2.config.xaxis.convertedCatToNumeric) xDivision = w2.layout.gridWidth / w2.globals.dataPoints;\n            barWidth = xDivision / seriesLen * parseInt(this.barCtx.barOptions.columnWidth, 10) / 100;\n            if (w2.axisFlags.isXNumeric) {\n                const xRatio = this.barCtx.xRatio;\n                if (w2.globals.minXDiff && w2.globals.minXDiff !== 0.5 && w2.globals.minXDiff / xRatio > 0) xDivision = w2.globals.minXDiff / xRatio;\n                barWidth = xDivision / seriesLen * parseInt(this.barCtx.barOptions.columnWidth, 10) / 100;\n                if (barWidth < 1) barWidth = 1;\n            }\n            if (String(this.barCtx.barOptions.columnWidth).indexOf(\"%\") === -1) barWidth = parseInt(this.barCtx.barOptions.columnWidth, 10);\n            zeroH = w2.layout.gridHeight - this.barCtx.baseLineY[this.barCtx.translationsIndex] - (this.barCtx.isReversed ? w2.layout.gridHeight : 0) + (this.barCtx.isReversed ? this.barCtx.baseLineY[this.barCtx.translationsIndex] * 2 : 0);\n            if (w2.axisFlags.isXNumeric) {\n                const xForNumericX = this.barCtx.getBarXForNumericXAxis({\n                    x: x,\n                    j: 0,\n                    realIndex: realIndex,\n                    barWidth: barWidth\n                });\n                x = xForNumericX.x;\n            } else x = w2.globals.padHorizontal + $e4b487e979d7c06d$var$Utils$1.noExponents(xDivision - barWidth * this.barCtx.seriesLen) / 2;\n        }\n        w2.globals.barHeight = barHeight;\n        w2.globals.barWidth = barWidth;\n        return {\n            x: x,\n            y: y,\n            yDivision: yDivision,\n            xDivision: xDivision,\n            barHeight: barHeight,\n            barWidth: barWidth,\n            zeroH: zeroH,\n            zeroW: zeroW\n        };\n    }\n    /**\n   * @param {Record<string, any>} ctx\n   */ initializeStackedPrevVars(ctx) {\n        const w2 = ctx.w;\n        w2.labelData.seriesGroups.forEach((group)=>{\n            if (!ctx[group]) ctx[group] = {};\n            ctx[group].prevY = [];\n            ctx[group].prevX = [];\n            ctx[group].prevYF = [];\n            ctx[group].prevXF = [];\n            ctx[group].prevYVal = [];\n            ctx[group].prevXVal = [];\n        });\n    }\n    /**\n   * @param {Record<string, any>} ctx\n   */ initializeStackedXYVars(ctx) {\n        const w2 = ctx.w;\n        w2.labelData.seriesGroups.forEach((group)=>{\n            if (!ctx[group]) ctx[group] = {};\n            ctx[group].xArrj = [];\n            ctx[group].xArrjF = [];\n            ctx[group].xArrjVal = [];\n            ctx[group].yArrj = [];\n            ctx[group].yArrjF = [];\n            ctx[group].yArrjVal = [];\n        });\n    }\n    /**\n   * @param {any[]} series\n   * @param {number} i\n   * @param {number} j\n   * @param {number} realIndex\n   */ getPathFillColor(series, i2, j, realIndex) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        const fill = new $e4b487e979d7c06d$var$Fill(this.barCtx.w);\n        let fillColor = null;\n        const seriesNumber = this.barCtx.barOptions.distributed ? j : i2;\n        let useRangeColor = false;\n        if (this.barCtx.barOptions.colors.ranges.length > 0) {\n            const colorRange = this.barCtx.barOptions.colors.ranges;\n            colorRange.map((range)=>{\n                if (series[i2][j] >= range.from && series[i2][j] <= range.to) {\n                    fillColor = range.color;\n                    useRangeColor = true;\n                }\n            });\n        }\n        const pathFill = fill.fillPath({\n            seriesNumber: this.barCtx.barOptions.distributed ? seriesNumber : realIndex,\n            dataPointIndex: j,\n            color: fillColor,\n            value: series[i2][j],\n            fillConfig: (_a = w2.config.series[i2].data[j]) == null ? void 0 : _a.fill,\n            fillType: ((_c = (_b = w2.config.series[i2].data[j]) == null ? void 0 : _b.fill) == null ? void 0 : _c.type) ? (_d = w2.config.series[i2].data[j]) == null ? void 0 : _d.fill.type : Array.isArray(w2.config.fill.type) ? w2.config.fill.type[realIndex] : w2.config.fill.type\n        });\n        return {\n            color: pathFill,\n            useRangeColor: useRangeColor\n        };\n    }\n    /**\n   * @param {number} i\n   * @param {number} j\n   * @param {number} realIndex\n   */ getStrokeWidth(i2, j, realIndex) {\n        let strokeWidth = 0;\n        const w2 = this.w;\n        if (typeof this.barCtx.series[i2][j] === \"undefined\" || this.barCtx.series[i2][j] === null || w2.config.chart.type === \"bar\" && !this.barCtx.series[i2][j]) this.barCtx.isNullValue = true;\n        else this.barCtx.isNullValue = false;\n        if (w2.config.stroke.show) {\n            if (!this.barCtx.isNullValue) strokeWidth = Array.isArray(this.barCtx.strokeWidth) ? this.barCtx.strokeWidth[realIndex] : this.barCtx.strokeWidth;\n        }\n        return strokeWidth;\n    }\n    /**\n   * @param {any[]} series\n   */ createBorderRadiusArr(series) {\n        var _a;\n        const w2 = this.w;\n        const alwaysApplyRadius = !this.w.config.chart.stacked || w2.config.plotOptions.bar.borderRadius <= 0;\n        const numSeries = series.length;\n        const numColumns = ((_a = series[0]) == null ? void 0 : _a.length) | 0;\n        const output = Array.from({\n            length: numSeries\n        }, ()=>Array(numColumns).fill(alwaysApplyRadius ? \"top\" : \"none\"));\n        if (alwaysApplyRadius) return output;\n        const chartType = this.w.config.chart.type;\n        for(let j = 0; j < numColumns; j++){\n            const positiveIndices = [];\n            const negativeIndices = [];\n            let nonZeroCount = 0;\n            for(let i2 = 0; i2 < numSeries; i2++){\n                const value = series[i2][j];\n                if (value > 0) {\n                    positiveIndices.push(i2);\n                    nonZeroCount++;\n                } else if (value < 0) {\n                    negativeIndices.push(i2);\n                    nonZeroCount++;\n                }\n            }\n            if (positiveIndices.length > 0 && negativeIndices.length === 0) {\n                if (positiveIndices.length === 1) output[positiveIndices[0]][j] = chartType === \"bar\" && numColumns === 1 ? \"top\" : \"both\";\n                else {\n                    const firstPositiveIndex = positiveIndices[0];\n                    const lastPositiveIndex = positiveIndices[positiveIndices.length - 1];\n                    for (const i2 of positiveIndices){\n                        if (i2 === firstPositiveIndex) output[i2][j] = chartType === \"bar\" && numColumns === 1 ? \"top\" : \"bottom\";\n                        else if (i2 === lastPositiveIndex) output[i2][j] = \"top\";\n                        else output[i2][j] = \"none\";\n                    }\n                }\n            } else if (negativeIndices.length > 0 && positiveIndices.length === 0) {\n                if (negativeIndices.length === 1) output[negativeIndices[0]][j] = \"both\";\n                else {\n                    const highestNegativeIndex = Math.max(...negativeIndices);\n                    const lowestNegativeIndex = Math.min(...negativeIndices);\n                    for (const i2 of negativeIndices){\n                        if (i2 === highestNegativeIndex) output[i2][j] = \"bottom\";\n                        else if (i2 === lowestNegativeIndex) output[i2][j] = \"top\";\n                        else output[i2][j] = \"none\";\n                    }\n                }\n            } else if (positiveIndices.length > 0 && negativeIndices.length > 0) {\n                const lastPositiveIndex = positiveIndices[positiveIndices.length - 1];\n                for (const i2 of positiveIndices)if (i2 === lastPositiveIndex) output[i2][j] = \"top\";\n                else output[i2][j] = \"none\";\n                const highestNegativeIndex = Math.max(...negativeIndices);\n                for (const i2 of negativeIndices)if (i2 === highestNegativeIndex) output[i2][j] = \"bottom\";\n                else output[i2][j] = \"none\";\n            } else if (nonZeroCount === 1) {\n                const index = positiveIndices[0] || negativeIndices[0];\n                output[index][j] = \"both\";\n            }\n        }\n        return output;\n    }\n    /** @param {{ j?: any, i?: any, x1?: any, x2?: any, y1?: any, y2?: any, bc?: any, elSeries?: any }} opts */ barBackground({ j: j, i: i2, x1: x1, x2: x2, y1: y1, y2: y2, elSeries: elSeries }) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n        const sr = new $e4b487e979d7c06d$var$Series(this.barCtx.w);\n        const activeSeriesIndex = sr.getActiveConfigSeriesIndex();\n        if (this.barCtx.barOptions.colors.backgroundBarColors.length > 0 && activeSeriesIndex === i2) {\n            if (j >= this.barCtx.barOptions.colors.backgroundBarColors.length) j %= this.barCtx.barOptions.colors.backgroundBarColors.length;\n            const bcolor = this.barCtx.barOptions.colors.backgroundBarColors[j];\n            const rect = graphics.drawRect(typeof x1 !== \"undefined\" ? x1 : 0, typeof y1 !== \"undefined\" ? y1 : 0, typeof x2 !== \"undefined\" ? x2 : w2.layout.gridWidth, typeof y2 !== \"undefined\" ? y2 : w2.layout.gridHeight, this.barCtx.barOptions.colors.backgroundBarRadius, bcolor, this.barCtx.barOptions.colors.backgroundBarOpacity);\n            elSeries.add(rect);\n            rect.node.classList.add(\"apexcharts-backgroundBar\");\n        }\n    }\n    /** @param {{ barWidth?: any, barXPosition?: any, y1?: any, y2?: any, yRatio?: any, strokeWidth?: any, isReversed?: any, series?: any, seriesGroup?: any, realIndex?: any, i?: any, j?: any, w?: any }} opts */ getColumnPaths({ barWidth: barWidth, barXPosition: barXPosition, y1: y1, y2: y2, strokeWidth: strokeWidth, isReversed: isReversed, series: series, seriesGroup: seriesGroup, realIndex: realIndex, i: i2, j: j, w: w2 }) {\n        var _a, _b, _c;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n        strokeWidth = Array.isArray(strokeWidth) ? strokeWidth[realIndex] : strokeWidth;\n        if (!strokeWidth) strokeWidth = 0;\n        let bW = barWidth;\n        let bXP = barXPosition;\n        if ((_a = w2.config.series[realIndex].data[j]) == null ? void 0 : _a.columnWidthOffset) {\n            bXP = barXPosition - w2.config.series[realIndex].data[j].columnWidthOffset / 2;\n            bW = barWidth + w2.config.series[realIndex].data[j].columnWidthOffset;\n        }\n        const strokeCenter = strokeWidth / 2;\n        const x1 = bXP + strokeCenter;\n        const x2 = bXP + bW - strokeCenter;\n        const direction = (series[i2][j] >= 0 ? 1 : -1) * (isReversed ? -1 : 1);\n        y1 += 1e-3 - strokeCenter * direction;\n        y2 += 1e-3 + strokeCenter * direction;\n        const sl = graphics.line(x2, y1);\n        const closing = w2.config.plotOptions.bar.borderRadiusApplication === \"around\" || this.arrBorderRadius[realIndex][j] === \"both\" ? \" Z\" : \" z\";\n        let pathTo = graphics.move(x1, y1) + graphics.line(x1, y2) + graphics.line(x2, y2) + sl + closing;\n        if (this.arrBorderRadius[realIndex][j] !== \"none\") pathTo = graphics.roundPathCorners(pathTo, w2.config.plotOptions.bar.borderRadius);\n        let pathFrom = null;\n        const morphFrom = (_c = (_b = this.barCtx.ctx) == null ? void 0 : _b.morphTypeChange) == null ? void 0 : _c.getInitialPathFor(realIndex, j);\n        if (morphFrom) pathFrom = morphFrom;\n        else if (w2.globals.previousPaths.length > 0) pathFrom = this.barCtx.getPreviousPath(realIndex, j, pathTo);\n        if (pathFrom == null) pathFrom = graphics.move(x1, y1) + graphics.line(x1, y1) + sl + sl + sl + sl + sl + graphics.line(x1, y1) + closing;\n        if (w2.config.chart.stacked) {\n            let _ctx = this.barCtx;\n            _ctx = this.barCtx[seriesGroup];\n            _ctx.yArrj.push(y2 - strokeCenter * direction);\n            _ctx.yArrjF.push(Math.abs(y1 - y2 + strokeWidth * direction));\n            _ctx.yArrjVal.push(this.barCtx.series[i2][j]);\n        }\n        return {\n            pathTo: pathTo,\n            pathFrom: pathFrom\n        };\n    }\n    /**\n   * Build a trapezoidal funnel-stage path. Used when\n   * `plotOptions.funnel.shape === 'trapezoid'` is active alongside `isFunnel`.\n   *\n   * Each stage is a 4-corner polygon whose top width matches the current\n   * stage's value and bottom width matches the next stage's value, producing\n   * continuous sloped sides between consecutive stages.\n   *\n   * For the last stage, the bottom width is configurable:\n   * - `lastShape: 'flat'`  → bottom width = top width (parallel sides)\n   * - `lastShape: 'taper'` → bottom width = 0 (taper to a point)\n   *\n   * @param {{ barYPosition: number, barHeight: number, series: any[][], i: number, j: number, realIndex: number, strokeWidth: number, w: any }} opts\n   */ getFunnelTrapezoidPaths({ barYPosition: barYPosition, barHeight: barHeight, series: series, i: i2, j: j, realIndex: realIndex, strokeWidth: strokeWidth, w: w2 }) {\n        var _a, _b;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n        const center = w2.layout.gridWidth / 2;\n        const halfWidthFor = (v2)=>Math.abs(v2 / this.barCtx.invertedYRatio) / 2;\n        const topHalf = halfWidthFor(series[i2][j]);\n        const lastIdx = series[i2].length - 1;\n        const isLast = j === lastIdx;\n        const lastShape = w2.config.plotOptions.funnel.lastShape === \"taper\" ? \"taper\" : \"flat\";\n        let bottomHalf;\n        if (isLast) bottomHalf = lastShape === \"taper\" ? 0 : topHalf;\n        else bottomHalf = halfWidthFor(series[i2][j + 1]);\n        const strokeCenter = strokeWidth / 2;\n        const y1 = barYPosition + strokeCenter;\n        const y2 = barYPosition + barHeight - strokeCenter;\n        const topLeftX = center - topHalf;\n        const topRightX = center + topHalf;\n        const bottomLeftX = center - bottomHalf;\n        const bottomRightX = center + bottomHalf;\n        const pathTo = graphics.move(topLeftX, y1) + graphics.line(topRightX, y1) + graphics.line(bottomRightX, y2) + graphics.line(bottomLeftX, y2) + \" Z\";\n        let pathFrom = null;\n        const morphFrom = (_b = (_a = this.barCtx.ctx) == null ? void 0 : _a.morphTypeChange) == null ? void 0 : _b.getInitialPathFor(realIndex, j);\n        if (morphFrom) pathFrom = morphFrom;\n        else if (w2.globals.previousPaths.length > 0) pathFrom = this.barCtx.getPreviousPath(realIndex, j, pathTo);\n        if (pathFrom == null) pathFrom = graphics.move(center, y1) + graphics.line(center, y1) + graphics.line(center, y2) + graphics.line(center, y2) + \" Z\";\n        return {\n            pathTo: pathTo,\n            pathFrom: pathFrom,\n            // x is the right edge of the wider (top) side — used by dataLabel\n            // positioning helpers that expect a \"right\" reference.\n            x: topRightX,\n            x1: topLeftX,\n            barXPosition: center\n        };\n    }\n    /**\n   * Pre-compute the per-segment layout for a value-proportional pyramid.\n   *\n   * Each segment is a horizontal slice of a triangle whose apex sits at the\n   * top of the plot area (width = 0) and whose base spans `gridWidth` at the\n   * bottom. The vertical extent of each slice is its share of the total\n   * series value, so areas track value contribution and segments share\n   * edges (no gaps). The first data point is the apex, the last is the base.\n   *\n   * @param {any[]} seriesData - 1D array of values for a single series row\n   * @returns {{ y: number, height: number, topHalf: number, bottomHalf: number }[]}\n   */ computePyramidLayout(seriesData) {\n        const w2 = this.w;\n        const gridHeight = w2.layout.gridHeight;\n        const gridWidth = w2.layout.gridWidth;\n        const values = seriesData.map(/** @param {any} v */ (v2)=>Math.abs(Number(v2) || 0));\n        const total = values.reduce(/** @param {number} a @param {number} b */ (a2, b2)=>a2 + b2, 0);\n        if (total === 0 || gridHeight <= 0) return values.map(()=>({\n                y: 0,\n                height: 0,\n                topHalf: 0,\n                bottomHalf: 0\n            }));\n        const halfWidth = gridWidth / 2;\n        let cumulative = 0;\n        const layout = [];\n        for(let j = 0; j < values.length; j++){\n            const topRatio = cumulative / total;\n            cumulative += values[j];\n            const bottomRatio = cumulative / total;\n            const topY = topRatio * gridHeight;\n            const bottomY = bottomRatio * gridHeight;\n            layout.push({\n                y: topY,\n                height: bottomY - topY,\n                topHalf: topRatio * halfWidth,\n                bottomHalf: bottomRatio * halfWidth\n            });\n        }\n        return layout;\n    }\n    /**\n   * Build a single pyramid stage path. Geometry is precomputed by\n   * `computePyramidLayout`; this method only renders that geometry into an\n   * SVG path string plus a `pathFrom` for entry/morph animations.\n   *\n   * @param {{ barYPosition: number, barHeight: number, topHalf: number, bottomHalf: number, realIndex: number, j: number, strokeWidth: number, w: any }} opts\n   */ getPyramidPaths({ barYPosition: barYPosition, barHeight: barHeight, topHalf: topHalf, bottomHalf: bottomHalf, realIndex: realIndex, j: j, strokeWidth: strokeWidth, w: w2 }) {\n        var _a, _b;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n        const center = w2.layout.gridWidth / 2;\n        const strokeCenter = strokeWidth / 2;\n        const y1 = barYPosition + strokeCenter;\n        const y2 = barYPosition + barHeight - strokeCenter;\n        const topLeftX = center - topHalf;\n        const topRightX = center + topHalf;\n        const bottomLeftX = center - bottomHalf;\n        const bottomRightX = center + bottomHalf;\n        const pathTo = graphics.move(topLeftX, y1) + graphics.line(topRightX, y1) + graphics.line(bottomRightX, y2) + graphics.line(bottomLeftX, y2) + \" Z\";\n        let pathFrom = null;\n        const morphFrom = (_b = (_a = this.barCtx.ctx) == null ? void 0 : _a.morphTypeChange) == null ? void 0 : _b.getInitialPathFor(realIndex, j);\n        if (morphFrom) pathFrom = morphFrom;\n        else if (w2.globals.previousPaths.length > 0) pathFrom = this.barCtx.getPreviousPath(realIndex, j, pathTo);\n        if (pathFrom == null) pathFrom = graphics.move(center, y1) + graphics.line(center, y1) + graphics.line(center, y2) + graphics.line(center, y2) + \" Z\";\n        return {\n            pathTo: pathTo,\n            pathFrom: pathFrom,\n            x: topRightX,\n            x1: topLeftX,\n            barXPosition: center\n        };\n    }\n    /** @param {{ barYPosition?: any, barHeight?: any, x1?: any, x2?: any, strokeWidth?: any, isReversed?: any, series?: any, seriesGroup?: any, realIndex?: any, i?: any, j?: any, w?: any }} opts */ getBarpaths({ barYPosition: barYPosition, barHeight: barHeight, x1: x1, x2: x2, strokeWidth: strokeWidth, isReversed: isReversed, series: series, seriesGroup: seriesGroup, realIndex: realIndex, i: i2, j: j, w: w2 }) {\n        var _a, _b, _c;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n        strokeWidth = Array.isArray(strokeWidth) ? strokeWidth[realIndex] : strokeWidth;\n        if (!strokeWidth) strokeWidth = 0;\n        let bYP = barYPosition;\n        let bH = barHeight;\n        if ((_a = w2.config.series[realIndex].data[j]) == null ? void 0 : _a.barHeightOffset) {\n            bYP = barYPosition - w2.config.series[realIndex].data[j].barHeightOffset / 2;\n            bH = barHeight + w2.config.series[realIndex].data[j].barHeightOffset;\n        }\n        const strokeCenter = strokeWidth / 2;\n        const y1 = bYP + strokeCenter;\n        const y2 = bYP + bH - strokeCenter;\n        const direction = (series[i2][j] >= 0 ? 1 : -1) * (isReversed ? -1 : 1);\n        x1 += 1e-3 + strokeCenter * direction;\n        x2 += 1e-3 - strokeCenter * direction;\n        const isFunnel = this.barCtx.isFunnel;\n        const fromX = isFunnel ? (x1 + x2) / 2 : x1;\n        const sl = graphics.line(x1, y2);\n        const closing = w2.config.plotOptions.bar.borderRadiusApplication === \"around\" || this.arrBorderRadius[realIndex][j] === \"both\" ? \" Z\" : \" z\";\n        let pathTo = graphics.move(x1, y1) + graphics.line(x2, y1) + graphics.line(x2, y2) + sl + closing;\n        if (this.arrBorderRadius[realIndex][j] !== \"none\") pathTo = graphics.roundPathCorners(pathTo, w2.config.plotOptions.bar.borderRadius);\n        let pathFrom = null;\n        const morphFrom = (_c = (_b = this.barCtx.ctx) == null ? void 0 : _b.morphTypeChange) == null ? void 0 : _c.getInitialPathFor(realIndex, j);\n        if (morphFrom) pathFrom = morphFrom;\n        else if (w2.globals.previousPaths.length > 0) pathFrom = this.barCtx.getPreviousPath(realIndex, j, pathTo);\n        if (pathFrom == null) {\n            const slFrom = isFunnel ? graphics.line(fromX, y2) : sl;\n            pathFrom = graphics.move(fromX, y1) + graphics.line(fromX, y1) + slFrom + slFrom + slFrom + slFrom + slFrom + graphics.line(fromX, y1) + closing;\n        }\n        if (w2.config.chart.stacked) {\n            let _ctx = this.barCtx;\n            _ctx = this.barCtx[seriesGroup];\n            _ctx.xArrj.push(x2 + strokeCenter * direction);\n            _ctx.xArrjF.push(Math.abs(x1 - x2 - strokeWidth * direction));\n            _ctx.xArrjVal.push(this.barCtx.series[i2][j]);\n        }\n        return {\n            pathTo: pathTo,\n            pathFrom: pathFrom\n        };\n    }\n    /**\n   * @param {number} value\n   * @param {number} zeroW\n   */ getXForValue(value, zeroW, zeroPositionForNull = true) {\n        let xForVal = zeroPositionForNull ? zeroW : null;\n        if (typeof value !== \"undefined\" && value !== null) xForVal = zeroW + value / this.barCtx.invertedYRatio - (this.barCtx.isReversed ? value / this.barCtx.invertedYRatio : 0) * 2;\n        return xForVal;\n    }\n    /**\n   * @param {number} value\n   * @param {number} zeroH\n   * @param {number} translationsIndex\n   */ getYForValue(value, zeroH, translationsIndex, zeroPositionForNull = true) {\n        let yForVal = zeroPositionForNull ? zeroH : null;\n        if (typeof value !== \"undefined\" && value !== null) yForVal = zeroH - value / this.barCtx.yRatio[translationsIndex] + (this.barCtx.isReversed ? value / this.barCtx.yRatio[translationsIndex] : 0) * 2;\n        return yForVal;\n    }\n    /**\n   * @param {string} type\n   * @param {number} zeroW\n   * @param {number} zeroH\n   * @param {number} i\n   * @param {number} j\n   * @param {number} translationsIndex\n   */ getGoalValues(type, zeroW, zeroH, i2, j, translationsIndex) {\n        const w2 = this.w;\n        const goals = [];\n        const pushGoal = (value, attrs)=>{\n            goals.push({\n                [type]: type === \"x\" ? this.getXForValue(value, zeroW, false) : this.getYForValue(value, zeroH, translationsIndex, false),\n                attrs: attrs\n            });\n        };\n        if (w2.seriesData.seriesGoals[i2] && w2.seriesData.seriesGoals[i2][j] && Array.isArray(w2.seriesData.seriesGoals[i2][j])) w2.seriesData.seriesGoals[i2][j].forEach((goal)=>{\n            pushGoal(goal.value, goal);\n        });\n        if (this.barCtx.barOptions.isDumbbell && w2.rangeData.seriesRange.length) {\n            const colors = this.barCtx.barOptions.dumbbellColors ? this.barCtx.barOptions.dumbbellColors : w2.globals.colors;\n            const commonAttrs = {\n                strokeHeight: type === \"x\" ? 0 : w2.globals.markers.size[i2],\n                strokeWidth: type === \"x\" ? w2.globals.markers.size[i2] : 0,\n                strokeDashArray: 0,\n                strokeLineCap: \"round\",\n                strokeColor: Array.isArray(colors[i2]) ? colors[i2][0] : colors[i2]\n            };\n            pushGoal(w2.rangeData.seriesRangeStart[i2][j], commonAttrs);\n            pushGoal(w2.rangeData.seriesRangeEnd[i2][j], $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, commonAttrs), {\n                strokeColor: Array.isArray(colors[i2]) ? colors[i2][1] : colors[i2]\n            }));\n        }\n        return goals;\n    }\n    /** @param {{barXPosition: any, barYPosition: any, goalX: any, goalY: any, barWidth: any, barHeight: any}} opts */ drawGoalLine({ barXPosition: barXPosition, barYPosition: barYPosition, goalX: goalX, goalY: goalY, barWidth: barWidth, barHeight: barHeight }) {\n        const hasGoals = Array.isArray(goalX) && goalX.length > 0 || Array.isArray(goalY) && goalY.length > 0;\n        if (!hasGoals) return null;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n        const lineGroup = graphics.group({\n            className: \"apexcharts-bar-goals-groups\"\n        });\n        lineGroup.node.classList.add(\"apexcharts-element-hidden\");\n        this.barCtx.w.globals.delayedElements.push({\n            el: lineGroup.node\n        });\n        lineGroup.attr(\"clip-path\", `url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);\n        let line = null;\n        if (this.barCtx.isHorizontal) {\n            if (Array.isArray(goalX)) goalX.forEach((goal)=>{\n                if (goal.x >= -1 && goal.x <= graphics.w.layout.gridWidth + 1) {\n                    const sHeight = typeof goal.attrs.strokeHeight !== \"undefined\" ? goal.attrs.strokeHeight : barHeight / 2;\n                    const y = barYPosition + sHeight + barHeight / 2;\n                    line = graphics.drawLine(goal.x, y - sHeight * 2, goal.x, y, goal.attrs.strokeColor ? goal.attrs.strokeColor : void 0, goal.attrs.strokeDashArray, goal.attrs.strokeWidth ? goal.attrs.strokeWidth : 2, goal.attrs.strokeLineCap);\n                    lineGroup.add(line);\n                }\n            });\n        } else if (Array.isArray(goalY)) goalY.forEach((goal)=>{\n            if (goal.y >= -1 && goal.y <= graphics.w.layout.gridHeight + 1) {\n                const sWidth = typeof goal.attrs.strokeWidth !== \"undefined\" ? goal.attrs.strokeWidth : barWidth / 2;\n                const x = barXPosition + sWidth + barWidth / 2;\n                line = graphics.drawLine(x - sWidth * 2, goal.y, x, goal.y, goal.attrs.strokeColor ? goal.attrs.strokeColor : void 0, goal.attrs.strokeDashArray, goal.attrs.strokeHeight ? goal.attrs.strokeHeight : 2, goal.attrs.strokeLineCap);\n                lineGroup.add(line);\n            }\n        });\n        return lineGroup;\n    }\n    /** @param {{prevPaths: any, currPaths: any, color: any, realIndex: any, j: any}} opts */ drawBarShadow({ prevPaths: prevPaths, currPaths: currPaths, color: color, realIndex: realIndex, j: j }) {\n        const w2 = this.w;\n        const { x: prevX2, x1: prevX1, barYPosition: prevY1 } = prevPaths;\n        const { x: currX2, x1: currX1, barYPosition: currY1 } = currPaths;\n        const prevY2 = prevY1 + currPaths.barHeight;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.barCtx.w);\n        const utils = new $e4b487e979d7c06d$var$Utils$1();\n        const shadowPath = graphics.move(prevX1, prevY2) + graphics.line(prevX2, prevY2) + graphics.line(currX2, currY1) + graphics.line(currX1, currY1) + graphics.line(prevX1, prevY2) + (w2.config.plotOptions.bar.borderRadiusApplication === \"around\" || this.arrBorderRadius[realIndex][j] === \"both\" ? \" Z\" : \" z\");\n        return graphics.drawPath({\n            d: shadowPath,\n            fill: utils.shadeColor(0.5, $e4b487e979d7c06d$var$Utils$1.rgb2hex(color)),\n            stroke: \"none\",\n            strokeWidth: 0,\n            fillOpacity: 1,\n            classes: \"apexcharts-bar-shadow apexcharts-decoration-element\"\n        });\n    }\n    /** @param {{i: any, j: any}} opts */ getZeroValueEncounters({ i: i2, j: j }) {\n        var _a;\n        const w2 = this.w;\n        let nonZeroColumns = 0;\n        let zeroEncounters = 0;\n        const seriesIndices = w2.config.plotOptions.bar.horizontal ? w2.seriesData.series.map((_, _i)=>_i) : ((_a = w2.globals.columnSeries) == null ? void 0 : _a.i.map((_i)=>_i)) || [];\n        seriesIndices.forEach((_si)=>{\n            const val = w2.globals.seriesPercent[_si][j];\n            if (val) nonZeroColumns++;\n            if (_si < i2 && val === 0) zeroEncounters++;\n        });\n        return {\n            nonZeroColumns: nonZeroColumns,\n            zeroEncounters: zeroEncounters\n        };\n    }\n    /**\n   * Index of the series group `seriesIndex` belongs to within\n   * `w.labelData.seriesGroups`, or -1 when the chart has no groups.\n   *\n   * Unlike `getGroupIndex` this is a pure lookup: it never appends to\n   * `columnGroupIndices`, so it is safe to call from positioning/label code\n   * that must not perturb the draw order bookkeeping.\n   * @param {number} seriesIndex\n   * @returns {number}\n   */ getSeriesGroupIndex(seriesIndex) {\n        const w2 = this.w;\n        return w2.labelData.seriesGroups.findIndex((group)=>group.indexOf(w2.seriesData.seriesNames[seriesIndex]) > -1);\n    }\n    /**\n   * @param {number} seriesIndex\n   */ getGroupIndex(seriesIndex) {\n        const w2 = this.w;\n        const groupIndex = w2.labelData.seriesGroups.findIndex((group)=>// w.config.series[i].name may be undefined, so use\n            // w.seriesData.seriesNames[i], which has default names for those\n            // series. w.labelData.seriesGroups[] uses the same default naming.\n            group.indexOf(w2.seriesData.seriesNames[seriesIndex]) > -1);\n        const cGI = this.barCtx.columnGroupIndices;\n        let columnGroupIndex = cGI.indexOf(groupIndex);\n        if (columnGroupIndex < 0) {\n            cGI.push(groupIndex);\n            columnGroupIndex = cGI.length - 1;\n        }\n        return {\n            groupIndex: groupIndex,\n            columnGroupIndex: columnGroupIndex\n        };\n    }\n};\nclass $e4b487e979d7c06d$var$Bar {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   * @param {import('../types/internal').XYRatios} xyRatios\n   */ constructor(w2, ctx, xyRatios){\n        this.ctx = ctx;\n        this.w = w2;\n        this.barOptions = w2.config.plotOptions.bar;\n        this.isHorizontal = this.barOptions.horizontal;\n        this.strokeWidth = w2.config.stroke.width;\n        this.isNullValue = false;\n        this.isRangeBar = w2.rangeData.seriesRange.length && this.isHorizontal;\n        this.isVerticalGroupedRangeBar = !w2.globals.isBarHorizontal && w2.rangeData.seriesRange.length && w2.config.plotOptions.bar.rangeBarGroupRows;\n        this.isFunnel = this.barOptions.isFunnel;\n        this.isPyramid = this.barOptions.isPyramid;\n        this.pyramidLayout = null;\n        this.xyRatios = xyRatios;\n        this.xRatio = 0;\n        this.yRatio = [];\n        this.invertedXRatio = 0;\n        this.invertedYRatio = 0;\n        this.baseLineY = [];\n        this.baseLineInvertedY = 0;\n        if (this.xyRatios !== null) {\n            this.xRatio = xyRatios.xRatio;\n            this.yRatio = xyRatios.yRatio;\n            this.invertedXRatio = xyRatios.invertedXRatio;\n            this.invertedYRatio = xyRatios.invertedYRatio;\n            this.baseLineY = xyRatios.baseLineY;\n            this.baseLineInvertedY = xyRatios.baseLineInvertedY;\n        }\n        this.yaxisIndex = 0;\n        this.translationsIndex = 0;\n        this.seriesLen = 0;\n        this.pathArr = [];\n        this._prevKeyed = null;\n        this._ltCache = null;\n        this._layoutShiftCache = null;\n        this.series = [];\n        this.elSeries = null;\n        this.visibleI = 0;\n        this.isReversed = false;\n        const ser = new $e4b487e979d7c06d$var$Series(this.w);\n        this.lastActiveBarSerieIndex = ser.getActiveConfigSeriesIndex(\"desc\", [\n            \"bar\",\n            \"column\"\n        ]);\n        this.lastActiveBarSerieIndexByGroup = ser.getActiveConfigSeriesIndexByGroup([\n            \"bar\",\n            \"column\"\n        ]);\n        this.columnGroupIndices = [];\n        const barSeriesIndices = ser.getBarSeriesIndices();\n        const coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n        this.stackedSeriesTotals = coreUtils.getStackedSeriesTotals(this.w.config.series.map((s2, i2)=>{\n            return barSeriesIndices.indexOf(i2) === -1 ? i2 : -1;\n        }).filter((s2)=>{\n            return s2 !== -1;\n        }));\n        this.barHelpers = new $e4b487e979d7c06d$var$Helpers$1(this);\n    }\n    /** primary draw method which is called on bar object\n   * @memberof Bar\n   * @param {any[]} series - user supplied series values\n   * @param {number} seriesIndex - the index by which series will be drawn on the svg\n   * @return {Element} element which is supplied to parent chart draw method for appending\n   **/ draw(series, seriesIndex) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n        series = coreUtils.getLogSeries(series);\n        this.series = series;\n        this.yRatio = coreUtils.getLogYRatios(this.yRatio);\n        this.barHelpers.initVariables(series);\n        const ret = graphics.group({\n            class: \"apexcharts-bar-series apexcharts-plot-series\"\n        });\n        if (w2.config.dataLabels.enabled) {\n            if (this.totalItems > this.barOptions.dataLabels.maxItems) console.warn(\"WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts\");\n        }\n        for(let i2 = 0, bc = 0; i2 < series.length; i2++, bc++){\n            let x, y;\n            const yArrj = [];\n            const xArrj = [];\n            const realIndex = w2.globals.comboCharts ? /** @type {any} */ seriesIndex[i2] : i2;\n            const { columnGroupIndex: columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);\n            const elSeries = graphics.group({\n                class: `apexcharts-series`,\n                rel: i2 + 1,\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n                \"data:realIndex\": realIndex\n            });\n            $e4b487e979d7c06d$var$Series.addCollapsedClassToSeries(this.w, elSeries, realIndex);\n            if (series[i2].length > 0) this.visibleI = this.visibleI + 1;\n            if (this.yRatio.length > 1) {\n                this.yaxisIndex = w2.globals.seriesYAxisReverseMap[realIndex];\n                this.translationsIndex = realIndex;\n            }\n            const translationsIndex = this.translationsIndex;\n            this.isReversed = w2.config.yaxis[this.yaxisIndex] && w2.config.yaxis[this.yaxisIndex].reversed;\n            if (this.isPyramid) this.pyramidLayout = this.barHelpers.computePyramidLayout(series[i2]);\n            const initPositions = this.barHelpers.initialPositions(realIndex);\n            const { y: initY, yDivision: yDivision, zeroW: // yDivision is the GRIDHEIGHT divided by number of datapoints (bars)\n            zeroW, // zeroW is the baseline where 0 meets x axis\n            x: initX, xDivision: xDivision, zeroH: // xDivision is the GRIDWIDTH divided by number of datapoints (columns)\n            zeroH } = initPositions;\n            let barHeight = initPositions.barHeight;\n            let barWidth = initPositions.barWidth;\n            y = initY;\n            x = initX;\n            if (!this.isHorizontal) xArrj.push(x + (barWidth != null ? barWidth : 0) / 2);\n            const elDataLabelsWrap = graphics.group({\n                class: \"apexcharts-datalabels\",\n                \"data:realIndex\": realIndex\n            });\n            w2.globals.delayedElements.push({\n                el: elDataLabelsWrap.node,\n                // On a layout-changing update the labels must stay hidden through the\n                // reflow morph (the updateOptions flow otherwise reveals them at\n                // frame 0, where they float over sliding bars). When dataLabels.animate\n                // is on the labels instead RIDE the morph (see DataLabelTransition), so\n                // keep them visible: holding would hide the very motion we want to show.\n                holdUntilComplete: !((_a = w2.config.dataLabels.animate) == null ? void 0 : _a.enabled) && this.isLengthTransition(realIndex)\n            });\n            elDataLabelsWrap.node.classList.add(\"apexcharts-element-hidden\");\n            const elGoalsMarkers = graphics.group({\n                class: \"apexcharts-bar-goals-markers\"\n            });\n            const elBarShadows = graphics.group({\n                class: \"apexcharts-bar-shadows\"\n            });\n            w2.globals.delayedElements.push({\n                el: elBarShadows.node\n            });\n            elBarShadows.node.classList.add(\"apexcharts-element-hidden\");\n            for(let j = 0; j < series[i2].length; j++){\n                const strokeWidth = this.barHelpers.getStrokeWidth(i2, j, realIndex);\n                let paths = /** @type {any} */ null;\n                const pathsParams = {\n                    indexes: {\n                        i: i2,\n                        j: j,\n                        realIndex: realIndex,\n                        translationsIndex: translationsIndex,\n                        bc: bc\n                    },\n                    x: x,\n                    y: y,\n                    strokeWidth: strokeWidth,\n                    elSeries: elSeries\n                };\n                if (this.isHorizontal) {\n                    paths = this.drawBarPaths($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, pathsParams), {\n                        barHeight: barHeight,\n                        zeroW: zeroW,\n                        yDivision: yDivision\n                    }));\n                    barWidth = this.series[i2][j] / this.invertedYRatio;\n                } else {\n                    paths = this.drawColumnPaths($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, pathsParams), {\n                        xDivision: xDivision,\n                        barWidth: barWidth,\n                        zeroH: zeroH\n                    }));\n                    barHeight = this.series[i2][j] / this.yRatio[translationsIndex];\n                }\n                const pathFill = this.barHelpers.getPathFillColor(series, i2, j, realIndex);\n                if (this.isFunnel && !this.isPyramid && this.barOptions.isFunnel3d && ((_b = w2.config.plotOptions.funnel) == null ? void 0 : _b.shape) !== \"trapezoid\" && this.pathArr.length && j > 0) {\n                    const barShadow = this.barHelpers.drawBarShadow({\n                        color: typeof pathFill.color === \"string\" && ((_c = pathFill.color) == null ? void 0 : _c.indexOf(\"url\")) === -1 ? pathFill.color : $e4b487e979d7c06d$var$Utils$1.hexToRgba(w2.globals.colors[i2]),\n                        prevPaths: this.pathArr[this.pathArr.length - 1],\n                        currPaths: paths,\n                        realIndex: realIndex,\n                        j: j\n                    });\n                    elBarShadows.add(barShadow);\n                    if (w2.config.chart.dropShadow.enabled) {\n                        const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n                        filters.dropShadow(barShadow, w2.config.chart.dropShadow, realIndex);\n                    }\n                }\n                this.pathArr.push(paths);\n                const barGoalLine = this.barHelpers.drawGoalLine({\n                    barXPosition: paths.barXPosition,\n                    barYPosition: paths.barYPosition,\n                    goalX: paths.goalX,\n                    goalY: paths.goalY,\n                    barHeight: barHeight,\n                    barWidth: barWidth\n                });\n                if (barGoalLine) elGoalsMarkers.add(barGoalLine);\n                y = paths.y;\n                x = paths.x;\n                if (j > 0) xArrj.push(x + (barWidth != null ? barWidth : 0) / 2);\n                yArrj.push(y);\n                this.renderSeries($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({\n                    realIndex: realIndex,\n                    pathFill: pathFill.color\n                }, pathFill.useRangeColor ? {\n                    lineFill: pathFill.color\n                } : {}), {\n                    j: j,\n                    i: i2,\n                    columnGroupIndex: columnGroupIndex,\n                    pathFrom: paths.pathFrom,\n                    pathTo: paths.pathTo,\n                    strokeWidth: strokeWidth,\n                    elSeries: elSeries,\n                    x: x,\n                    y: y,\n                    series: series,\n                    barHeight: Math.abs(paths.barHeight ? paths.barHeight : barHeight),\n                    barWidth: Math.abs(paths.barWidth ? paths.barWidth : barWidth),\n                    elDataLabelsWrap: elDataLabelsWrap,\n                    elGoalsMarkers: elGoalsMarkers,\n                    elBarShadows: elBarShadows,\n                    visibleSeries: this.visibleI,\n                    type: \"bar\"\n                }));\n            }\n            w2.globals.seriesXvalues[realIndex] = xArrj;\n            w2.globals.seriesYvalues[realIndex] = yArrj;\n            if (w2.globals.previousPaths.length > 0) {\n                const newKeys = [];\n                for(let j = 0; j < series[i2].length; j++)newKeys.push($e4b487e979d7c06d$var$datumKey(w2, realIndex, j));\n                $e4b487e979d7c06d$var$renderBarExitGhosts({\n                    w: w2,\n                    elSeries: elSeries,\n                    record: this._prevRecord(realIndex),\n                    newKeys: newKeys,\n                    isHorizontal: this.isHorizontal,\n                    speed: w2.config.chart.animations.dynamicAnimation.speed\n                });\n            }\n            ret.add(elSeries);\n        }\n        return ret;\n    }\n    /** @param {{ realIndex?: any, pathFill?: any, lineFill?: any, j?: any, i?: any, columnGroupIndex?: any, pathFrom?: any, pathTo?: any, strokeWidth?: any, elSeries?: any, x?: any, y?: any, y1?: any, y2?: any, series?: any, barHeight?: any, barWidth?: any, barXPosition?: any, barYPosition?: any, elDataLabelsWrap?: any, elGoalsMarkers?: any, elBarShadows?: any, visibleSeries?: any, type?: any, classes?: any }} opts */ renderSeries({ realIndex: realIndex, pathFill: pathFill, lineFill: lineFill, j: j, i: i2, columnGroupIndex: columnGroupIndex, pathFrom: pathFrom, pathTo: pathTo, strokeWidth: strokeWidth, elSeries: elSeries, x: x, y: // x pos\n    y, y1: // y pos\n    y1, y2: // absolute value\n    y2, series: // absolute value\n    series, barHeight: barHeight, barWidth: barWidth, barXPosition: barXPosition, barYPosition: barYPosition, elDataLabelsWrap: elDataLabelsWrap, elGoalsMarkers: elGoalsMarkers, elBarShadows: elBarShadows, visibleSeries: visibleSeries, type: type, classes: classes }) {\n        var _a;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n        const emit = $e4b487e979d7c06d$var$seriesEmitter(this.ctx, graphics);\n        let skipDrawing = false;\n        if (!elSeries._bindingsDelegated) {\n            elSeries._bindingsDelegated = true;\n            graphics.setupEventDelegation(elSeries, `.apexcharts-${type}-area`);\n        }\n        if (!lineFill) {\n            let fetchColor = function(i3) {\n                const exp = w2.config.stroke.colors;\n                let c2;\n                if (Array.isArray(exp) && exp.length > 0) {\n                    c2 = exp[i3];\n                    if (!c2) c2 = \"\";\n                    if (typeof c2 === \"function\") return c2({\n                        value: w2.seriesData.series[i3][j],\n                        dataPointIndex: j,\n                        w: w2\n                    });\n                }\n                return c2;\n            };\n            const checkAvailableColor = typeof w2.globals.stroke.colors[realIndex] === \"function\" ? fetchColor(realIndex) : w2.globals.stroke.colors[realIndex];\n            lineFill = this.barOptions.distributed ? w2.globals.stroke.colors[j] : checkAvailableColor;\n        }\n        const barDataLabels = new $e4b487e979d7c06d$var$BarDataLabels(this);\n        const dataLabelsObj = /** @type {any} */ barDataLabels.handleBarDataLabels({\n            x: x,\n            y: y,\n            y1: y1,\n            y2: y2,\n            i: i2,\n            j: j,\n            series: series,\n            realIndex: realIndex,\n            columnGroupIndex: columnGroupIndex,\n            barHeight: barHeight,\n            barWidth: barWidth,\n            barXPosition: barXPosition,\n            barYPosition: barYPosition,\n            visibleSeries: visibleSeries\n        });\n        if (!w2.globals.isBarHorizontal) {\n            if (dataLabelsObj.dataLabelsPos.dataLabelsX + Math.max(barWidth, w2.globals.barPadForNumericAxis) < 0 || dataLabelsObj.dataLabelsPos.dataLabelsX - Math.max(barWidth, w2.globals.barPadForNumericAxis) > w2.layout.gridWidth) skipDrawing = true;\n        }\n        if (/** @type {Record<string,any>} */ w2.config.series[i2].data[j] && /** @type {Record<string,any>} */ w2.config.series[i2].data[j].strokeColor) lineFill = /** @type {Record<string,any>} */ w2.config.series[i2].data[j].strokeColor;\n        if (this.isNullValue) pathFill = \"none\";\n        const animCfg = w2.config.chart.animations;\n        const gradCfg = animCfg.animateGradually;\n        const staggerEnabled = gradCfg && gradCfg.enabled !== false && !(w2.globals.dataChanged && this.isLayoutShift(realIndex));\n        let delay = 0;\n        if (staggerEnabled) {\n            const totalBars = w2.globals.dataPoints || 1;\n            const configStep = gradCfg.delay || 0;\n            const baseDelayMs = Math.min(configStep, animCfg.speed * 0.5 / Math.max(1, totalBars));\n            let delayMs = $e4b487e979d7c06d$var$computeStagger({\n                style: \"sequential\",\n                index: j,\n                baseDelay: baseDelayMs\n            });\n            if (w2.config.chart.stacked) delayMs += i2 * baseDelayMs * 0.5;\n            const delayFactor = configStep || 1;\n            delay = delayMs / delayFactor;\n        }\n        if (!skipDrawing) {\n            const morphActive = ((_a = this.ctx.morphTypeChange) == null ? void 0 : _a.isActive()) === true;\n            const dataChangeSpeed = morphActive ? this.ctx.morphTypeChange.getSpeed() : w2.config.chart.animations.dynamicAnimation.speed;\n            const pieceClaimed = morphActive && this.ctx.morphTypeChange.claimsTargetMark(realIndex, j);\n            if (pieceClaimed) {\n                pathFrom = pathTo;\n                delay = 0;\n            }\n            const renderedPath = /** @type {any} */ emit.renderPaths({\n                i: i2,\n                j: j,\n                realIndex: realIndex,\n                pathFrom: pathFrom,\n                pathTo: pathTo,\n                stroke: lineFill,\n                strokeWidth: strokeWidth,\n                strokeLineCap: w2.config.stroke.lineCap,\n                fill: pathFill,\n                animationDelay: delay,\n                initialSpeed: w2.config.chart.animations.speed,\n                dataChangeSpeed: dataChangeSpeed,\n                // `classes` is optional: boxPlot, violin and candlestick call\n                // renderSeries without it, and interpolating it unguarded stamped a\n                // literal \"undefined\" into every one of their marks' class lists.\n                className: `apexcharts-${type}-area${classes ? ` ${classes}` : \"\"}`,\n                chartType: type,\n                bindEventsOnPaths: false\n            });\n            renderedPath.attr(\"clip-path\", `url(#gridRectBarMask${w2.globals.cuid})`);\n            if (pieceClaimed) {\n                renderedPath.node.setAttribute(\"opacity\", \"0\");\n                renderedPath.node.setAttribute(\"data-piece-hidden\", \"1\");\n            }\n            const forecast = w2.config.forecastDataPoints;\n            if (forecast.count > 0) {\n                if (j >= w2.globals.dataPoints - forecast.count) {\n                    renderedPath.node.setAttribute(\"stroke-dasharray\", forecast.dashArray);\n                    renderedPath.node.setAttribute(\"stroke-width\", forecast.strokeWidth);\n                    renderedPath.node.setAttribute(\"fill-opacity\", forecast.fillOpacity);\n                }\n            }\n            if (typeof y1 !== \"undefined\" && typeof y2 !== \"undefined\") {\n                renderedPath.attr(\"data-range-y1\", y1);\n                renderedPath.attr(\"data-range-y2\", y2);\n            }\n            const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n            filters.setSelectionFilter(renderedPath, realIndex, j);\n            elSeries.add(renderedPath);\n            renderedPath.attr({\n                cy: dataLabelsObj.dataLabelsPos.bcy,\n                cx: dataLabelsObj.dataLabelsPos.bcx,\n                j: j,\n                val: w2.seriesData.series[i2][j],\n                barHeight: barHeight,\n                barWidth: barWidth,\n                // Datum identity for the next update's keyed join (see\n                // LengthTransition): survivors match by key, not array position.\n                \"data:pathKey\": $e4b487e979d7c06d$var$datumKey(w2, realIndex, j)\n            });\n            if (emit.kind === \"canvas\") {\n                if (!w2.globals.barCanvasCoords) w2.globals.barCanvasCoords = {};\n                if (!w2.globals.barCanvasCoords[realIndex]) w2.globals.barCanvasCoords[realIndex] = {};\n                w2.globals.barCanvasCoords[realIndex][j] = {\n                    cx: dataLabelsObj.dataLabelsPos.bcx,\n                    cy: dataLabelsObj.dataLabelsPos.bcy,\n                    barWidth: barWidth\n                };\n            }\n            if (dataLabelsObj.dataLabels !== null) elDataLabelsWrap.add(dataLabelsObj.dataLabels);\n            if (dataLabelsObj.totalDataLabels) elDataLabelsWrap.add(dataLabelsObj.totalDataLabels);\n            elSeries.add(elDataLabelsWrap);\n            if (elGoalsMarkers) elSeries.add(elGoalsMarkers);\n            if (elBarShadows) elSeries.add(elBarShadows);\n        }\n        return elSeries;\n    }\n    /** @param {{indexes: any, barHeight: any, strokeWidth: any, zeroW: any, x: any, y: any, yDivision: any, elSeries: any}} opts */ drawBarPaths({ indexes: indexes, barHeight: barHeight, strokeWidth: strokeWidth, zeroW: zeroW, x: x, y: y, yDivision: yDivision, elSeries: elSeries }) {\n        const w2 = this.w;\n        const i2 = indexes.i;\n        const j = indexes.j;\n        let barYPosition;\n        if (w2.axisFlags.isXNumeric) {\n            y = (w2.seriesData.seriesX[i2][j] - w2.globals.minX) / this.invertedXRatio - barHeight;\n            barYPosition = y + barHeight * this.visibleI;\n        } else if (w2.config.plotOptions.bar.hideZeroBarsWhenGrouped) {\n            const { nonZeroColumns: nonZeroColumns, zeroEncounters: zeroEncounters } = this.barHelpers.getZeroValueEncounters({\n                i: i2,\n                j: j\n            });\n            if (nonZeroColumns > 0) barHeight = this.seriesLen * barHeight / nonZeroColumns;\n            barYPosition = y + barHeight * this.visibleI;\n            barYPosition -= barHeight * zeroEncounters;\n        } else barYPosition = y + barHeight * this.visibleI;\n        const useTrapezoid = this.isFunnel && w2.config.plotOptions.funnel.shape === \"trapezoid\";\n        const pyramidSeg = this.isPyramid && this.pyramidLayout ? this.pyramidLayout[j] : null;\n        const usePyramid = !!pyramidSeg;\n        if (pyramidSeg) {\n            barYPosition = pyramidSeg.y;\n            barHeight = pyramidSeg.height;\n        } else if (this.isFunnel && !useTrapezoid) {\n            const _zeroW = zeroW != null ? zeroW : 0;\n            zeroW = _zeroW - /** @type {number} */ /** @type {any} */ (this.barHelpers.getXForValue(/** @type {any} */ this.series[i2][j], _zeroW) - _zeroW) / 2;\n        }\n        x = this.barHelpers.getXForValue(/** @type {any} */ this.series[i2][j], zeroW != null ? zeroW : 0);\n        let paths;\n        if (pyramidSeg) paths = /** @type {any} */ this.barHelpers.getPyramidPaths({\n            barYPosition: barYPosition,\n            barHeight: barHeight,\n            topHalf: pyramidSeg.topHalf,\n            bottomHalf: pyramidSeg.bottomHalf,\n            realIndex: indexes.realIndex,\n            j: j,\n            strokeWidth: strokeWidth,\n            w: w2\n        });\n        else if (useTrapezoid) paths = /** @type {any} */ this.barHelpers.getFunnelTrapezoidPaths({\n            barYPosition: barYPosition,\n            barHeight: barHeight,\n            series: /** @type {any} */ this.series,\n            i: i2,\n            j: j,\n            realIndex: indexes.realIndex,\n            strokeWidth: strokeWidth,\n            w: w2\n        });\n        else paths = /** @type {any} */ this.barHelpers.getBarpaths({\n            barYPosition: barYPosition,\n            barHeight: barHeight,\n            x1: zeroW,\n            x2: x,\n            strokeWidth: strokeWidth,\n            isReversed: this.isReversed,\n            series: this.series,\n            realIndex: indexes.realIndex,\n            i: i2,\n            j: j,\n            w: w2\n        });\n        if (useTrapezoid || usePyramid) {\n            zeroW = paths.x1;\n            x = paths.x;\n        }\n        if (!w2.axisFlags.isXNumeric && !usePyramid) y = y + yDivision;\n        if (usePyramid) y = barYPosition;\n        this.barHelpers.barBackground({\n            j: j,\n            i: i2,\n            y1: barYPosition - barHeight * this.visibleI,\n            y2: barHeight * this.seriesLen,\n            elSeries: elSeries\n        });\n        return {\n            pathTo: paths.pathTo,\n            pathFrom: paths.pathFrom,\n            x1: zeroW,\n            x: x,\n            y: y,\n            goalX: this.barHelpers.getGoalValues(\"x\", zeroW, /** @type {any} */ null, indexes.realIndex, j, 0),\n            barYPosition: barYPosition,\n            barHeight: barHeight\n        };\n    }\n    /** @param {{indexes: any, x: any, y: any, xDivision: any, barWidth: any, zeroH: any, strokeWidth: any, elSeries: any}} opts */ drawColumnPaths({ indexes: indexes, x: x, y: y, xDivision: xDivision, barWidth: barWidth, zeroH: zeroH, strokeWidth: strokeWidth, elSeries: elSeries }) {\n        const w2 = this.w;\n        const realIndex = indexes.realIndex;\n        const translationsIndex = indexes.translationsIndex;\n        const i2 = indexes.i;\n        const j = indexes.j;\n        const bc = indexes.bc;\n        let barXPosition;\n        if (w2.axisFlags.isXNumeric) {\n            const xForNumericX = this.getBarXForNumericXAxis({\n                x: x,\n                j: j,\n                realIndex: realIndex,\n                barWidth: barWidth\n            });\n            x = xForNumericX.x;\n            barXPosition = xForNumericX.barXPosition;\n        } else if (w2.config.plotOptions.bar.hideZeroBarsWhenGrouped) {\n            const { nonZeroColumns: nonZeroColumns, zeroEncounters: zeroEncounters } = this.barHelpers.getZeroValueEncounters({\n                i: i2,\n                j: j\n            });\n            if (nonZeroColumns > 0) barWidth = this.seriesLen * barWidth / nonZeroColumns;\n            barXPosition = x + barWidth * this.visibleI;\n            barXPosition -= barWidth * zeroEncounters;\n        } else barXPosition = x + barWidth * this.visibleI;\n        y = this.barHelpers.getYForValue(/** @type {any} */ this.series[i2][j], zeroH, translationsIndex);\n        const paths = /** @type {any} */ this.barHelpers.getColumnPaths({\n            barXPosition: barXPosition,\n            barWidth: barWidth,\n            y1: zeroH,\n            y2: y,\n            strokeWidth: strokeWidth,\n            isReversed: this.isReversed,\n            series: this.series,\n            realIndex: realIndex,\n            i: i2,\n            j: j,\n            w: w2\n        });\n        if (!w2.axisFlags.isXNumeric) x = x + xDivision;\n        this.barHelpers.barBackground({\n            bc: bc,\n            j: j,\n            i: i2,\n            x1: barXPosition - strokeWidth / 2 - barWidth * this.visibleI,\n            x2: barWidth * this.seriesLen + strokeWidth / 2,\n            elSeries: elSeries\n        });\n        return {\n            pathTo: paths.pathTo,\n            pathFrom: paths.pathFrom,\n            x: x,\n            y: y,\n            goalY: this.barHelpers.getGoalValues(\"y\", /** @type {any} */ null, zeroH, realIndex, j, translationsIndex),\n            barXPosition: barXPosition,\n            barWidth: barWidth\n        };\n    }\n    /** @param {{x: any, barWidth: any, realIndex: any, j: any}} opts */ getBarXForNumericXAxis({ x: x, barWidth: barWidth, realIndex: realIndex, j: j }) {\n        const w2 = this.w;\n        let sxI = realIndex;\n        if (!w2.seriesData.seriesX[realIndex].length) sxI = w2.globals.maxValsInArrayIndex;\n        if ($e4b487e979d7c06d$var$Utils$1.isNumber(w2.seriesData.seriesX[sxI][j])) x = $e4b487e979d7c06d$var$AxisMapping.dataXToPx(w2, w2.seriesData.seriesX[sxI][j]) - barWidth * this.seriesLen / 2;\n        return {\n            barXPosition: x + ($e4b487e979d7c06d$var$isHistogramOverlay(w2) ? 0 : barWidth * this.visibleI),\n            x: x\n        };\n    }\n    /**\n   * The captured previous-render record for a series (last match wins, same\n   * as the historical scan order).\n   *\n   * @param {number} realIndex\n   * @returns {any | null}\n   */ _prevRecord(realIndex) {\n        const w2 = this.w;\n        let record = null;\n        for(let pp = 0; pp < w2.globals.previousPaths.length; pp++){\n            const gpp = w2.globals.previousPaths[pp];\n            if (gpp.paths && gpp.paths.length > 0 && parseInt(gpp.realIndex, 10) === parseInt(String(realIndex), 10)) record = gpp;\n        }\n        return record;\n    }\n    /**\n   * Previous paths of a series re-keyed by datum key (stamped as\n   * `data:pathKey` on each bar path and captured by Series.getPreviousPaths).\n   * Returns null when the previous render carries no keys (so the caller\n   * falls back to positional matching).\n   *\n   * @param {number} realIndex\n   * @returns {Map<string, {d: string}> | null}\n   */ _prevKeyedPaths(realIndex) {\n        if (!this._prevKeyed) this._prevKeyed = {};\n        if (this._prevKeyed[realIndex] !== void 0) return this._prevKeyed[realIndex];\n        const record = this._prevRecord(realIndex);\n        let map = null;\n        if (record && record.paths.every((p2)=>p2.key != null)) {\n            const keyed = /* @__PURE__ */ new Map();\n            record.paths.forEach((p2)=>{\n                keyed.set(p2.key, p2);\n            });\n            map = keyed;\n        }\n        this._prevKeyed[realIndex] = map;\n        return map;\n    }\n    /**\n   * Whether this series' update changes its datum layout (points entered,\n   * exited, or changed identity). Layout-changing updates run all survivors\n   * on one shared clock (no per-bar stagger) so the reflow reads as a single\n   * coordinated motion; pure value updates keep the stagger.\n   *\n   * @param {number} realIndex\n   * @returns {boolean}\n   */ isLengthTransition(realIndex) {\n        var _a, _b;\n        if (!this._ltCache) this._ltCache = {};\n        if (this._ltCache[realIndex] !== void 0) return this._ltCache[realIndex];\n        const w2 = this.w;\n        let result = false;\n        if ($e4b487e979d7c06d$var$lengthTransitionEnabled(w2) && w2.globals.previousPaths.length > 0) {\n            const record = this._prevRecord(realIndex);\n            const dataLen = (_b = (_a = w2.seriesData.series[realIndex]) == null ? void 0 : _a.length) != null ? _b : 0;\n            if (!record) result = dataLen > 0;\n            else if (record.paths.length !== dataLen) result = true;\n            else {\n                const keyed = this._prevKeyedPaths(realIndex);\n                if (keyed) {\n                    for(let j = 0; j < dataLen; j++)if (!keyed.has($e4b487e979d7c06d$var$datumKey(w2, realIndex, j))) {\n                        result = true;\n                        break;\n                    }\n                }\n            }\n        }\n        this._ltCache[realIndex] = result;\n        return result;\n    }\n    /**\n   * Whether this update moves survivors to new slots: a length change\n   * (enter/exit, via isLengthTransition) OR a pure reorder (a \"bar chart race\"\n   * swap, same datum set in a new order). Used to drop the per-bar stagger so\n   * all bars slide on one shared clock, staying locked to the axis/data labels.\n   * Broader than isLengthTransition, which is deliberately enter/exit-only\n   * (exit ghosts / baseline enters must not fire on a plain reorder).\n   * @param {number} realIndex\n   */ isLayoutShift(realIndex) {\n        if (this.isLengthTransition(realIndex)) return true;\n        if (!this._layoutShiftCache) this._layoutShiftCache = {};\n        if (this._layoutShiftCache[realIndex] !== void 0) return this._layoutShiftCache[realIndex];\n        const sj = $e4b487e979d7c06d$var$seriesJoin(this.w, realIndex, true, true);\n        const result = !!(sj && sj.join.changed);\n        this._layoutShiftCache[realIndex] = result;\n        return result;\n    }\n    /**\n   * Resolve `pathFrom` for a bar on data update, joining old and new datums\n   * by KEY (category label / x value) so survivors keep their identity across\n   * inserts, prepends, and removals. Three outcomes:\n   *\n   *  - survivor with stable shape → the previous `d` (smooth reflow morph);\n   *  - survivor whose command count changed (corner state flipped, e.g. bar\n   *    became new top-of-stack) → `pathTo` (pathFrom === pathTo, a snap);\n   *  - genuinely new datum (key absent from the previous render, or the whole\n   *    series is new) → null, telling the path builder to use its\n   *    grow-from-baseline enter path.\n   *\n   * Falls back to positional (index j) matching when the previous render\n   * carries no datum keys.\n   *\n   * @param {number} realIndex - stable series index from `data:realIndex`\n   * @param {number} j - data-point index within the series\n   * @param {string} pathTo - the freshly-built path for this bar (post-roundPathCorners)\n   * @returns {string | null}\n   **/ getPreviousPath(realIndex, j, pathTo) {\n        const w2 = this.w;\n        const record = this._prevRecord(realIndex);\n        if (!record) return $e4b487e979d7c06d$var$lengthTransitionEnabled(w2) ? null : pathTo;\n        let oldD = null;\n        let isNewDatum = false;\n        const keyed = this._prevKeyedPaths(realIndex);\n        if (keyed) {\n            const prev = keyed.get($e4b487e979d7c06d$var$datumKey(w2, realIndex, j));\n            if (prev) oldD = prev.d;\n            else isNewDatum = true;\n        } else if (typeof record.paths[j] !== \"undefined\") oldD = record.paths[j].d;\n        else isNewDatum = true;\n        if (oldD && $e4b487e979d7c06d$var$Bar.pathCommandCount(oldD) === $e4b487e979d7c06d$var$Bar.pathCommandCount(pathTo)) return oldD;\n        if (isNewDatum && $e4b487e979d7c06d$var$lengthTransitionEnabled(w2)) return null;\n        return pathTo;\n    }\n    /**\n   * Count SVG path commands (M, L, C, Q, Z, etc.). Used to detect whether\n   * two paths can be morphed safely — SVG.js requires matching command counts.\n   *\n   * @param {string} d\n   * @returns {number}\n   */ static pathCommandCount(d) {\n        if (!d) return 0;\n        const matches = d.match(/[A-Za-z]/g);\n        return matches ? matches.length : 0;\n    }\n}\nclass $e4b487e979d7c06d$var$BarStacked extends $e4b487e979d7c06d$var$Bar {\n    /**\n   * @param {any[]} series\n   * @param {number} seriesIndex\n   */ draw(series, seriesIndex) {\n        const w2 = this.w;\n        this.graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        this.bar = new $e4b487e979d7c06d$var$Bar(this.w, this.ctx, this.xyRatios);\n        const coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n        series = coreUtils.getLogSeries(series);\n        this.yRatio = coreUtils.getLogYRatios(this.yRatio);\n        this.barHelpers.initVariables(series);\n        if (w2.config.chart.stackType === \"100%\") series = w2.globals.comboCharts ? /** @type {any} */ seriesIndex.map((_)=>w2.globals.seriesPercent[_]) : w2.globals.seriesPercent.slice();\n        this.series = series;\n        this.barHelpers.initializeStackedPrevVars(this);\n        const ret = this.graphics.group({\n            class: \"apexcharts-bar-series apexcharts-plot-series\"\n        });\n        let x = 0;\n        let y = 0;\n        for(let i2 = 0, bc = 0; i2 < series.length; i2++, bc++){\n            const realIndex = w2.globals.comboCharts ? /** @type {any} */ seriesIndex[i2] : i2;\n            const { groupIndex: groupIndex, columnGroupIndex: columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);\n            this.groupCtx = /** @type {any} */ this[/** @type {any} */ w2.labelData.seriesGroups[groupIndex]];\n            const xArrValues = [];\n            const yArrValues = [];\n            let translationsIndex = 0;\n            if (this.yRatio.length > 1) {\n                this.yaxisIndex = /** @type {any} */ w2.globals.seriesYAxisReverseMap[realIndex][0];\n                translationsIndex = realIndex;\n            }\n            this.isReversed = w2.config.yaxis[this.yaxisIndex] && w2.config.yaxis[this.yaxisIndex].reversed;\n            let elSeries = this.graphics.group({\n                class: `apexcharts-series`,\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n                rel: i2 + 1,\n                \"data:realIndex\": realIndex\n            });\n            $e4b487e979d7c06d$var$Series.addCollapsedClassToSeries(this.w, elSeries, realIndex);\n            const elDataLabelsWrap = this.graphics.group({\n                class: \"apexcharts-datalabels\",\n                \"data:realIndex\": realIndex\n            });\n            const elGoalsMarkers = this.graphics.group({\n                class: \"apexcharts-bar-goals-markers\"\n            });\n            const initPositions = this.initialPositions(x, y, void 0, void 0, void 0, void 0, translationsIndex);\n            const { xDivision: xDivision, yDivision: // xDivision is the GRIDWIDTH divided by number of datapoints (columns)\n            yDivision, zeroH: // yDivision is the GRIDHEIGHT divided by number of datapoints (bars)\n            zeroH, zeroW: // zeroH is the baseline where 0 meets y axis\n            zeroW } = initPositions;\n            let barHeight = initPositions.barHeight;\n            let barWidth = initPositions.barWidth;\n            y = initPositions.y;\n            x = initPositions.x;\n            w2.globals.barHeight = barHeight;\n            w2.globals.barWidth = barWidth;\n            this.barHelpers.initializeStackedXYVars(this);\n            if (this.groupCtx.prevY.length === 1 && /**\n       * @param {number} val\n       */ this.groupCtx.prevY[0].every((val)=>isNaN(val))) {\n                this.groupCtx.prevY[0] = this.groupCtx.prevY[0].map(()=>zeroH);\n                this.groupCtx.prevYF[0] = this.groupCtx.prevYF[0].map(()=>0);\n            }\n            for(let j = 0; j < w2.globals.dataPoints; j++){\n                const strokeWidth = this.barHelpers.getStrokeWidth(i2, j, realIndex);\n                const commonPathOpts = {\n                    indexes: {\n                        i: i2,\n                        j: j,\n                        realIndex: realIndex,\n                        translationsIndex: translationsIndex,\n                        bc: bc\n                    },\n                    strokeWidth: strokeWidth,\n                    x: x,\n                    y: y,\n                    elSeries: elSeries,\n                    columnGroupIndex: columnGroupIndex,\n                    seriesGroup: w2.labelData.seriesGroups[groupIndex]\n                };\n                let paths = /** @type {any} */ null;\n                if (this.isHorizontal) {\n                    paths = this.drawStackedBarPaths($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, commonPathOpts), {\n                        zeroW: zeroW,\n                        barHeight: barHeight,\n                        yDivision: yDivision\n                    }));\n                    barWidth = this.series[i2][j] / this.invertedYRatio;\n                } else {\n                    paths = this.drawStackedColumnPaths($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, commonPathOpts), {\n                        xDivision: xDivision,\n                        barWidth: barWidth,\n                        zeroH: zeroH\n                    }));\n                    barHeight = this.series[i2][j] / this.yRatio[translationsIndex];\n                }\n                const barGoalLine = this.barHelpers.drawGoalLine({\n                    barXPosition: paths.barXPosition,\n                    barYPosition: paths.barYPosition,\n                    goalX: paths.goalX,\n                    goalY: paths.goalY,\n                    barHeight: barHeight,\n                    barWidth: barWidth\n                });\n                if (barGoalLine) elGoalsMarkers.add(barGoalLine);\n                y = paths.y;\n                x = paths.x;\n                xArrValues.push(x);\n                yArrValues.push(y);\n                const pathFill = this.barHelpers.getPathFillColor(series, i2, j, realIndex);\n                let classes = \"\";\n                const flipClass = w2.globals.isBarHorizontal ? \"apexcharts-flip-x\" : \"apexcharts-flip-y\";\n                if (this.barHelpers.arrBorderRadius[realIndex][j] === \"bottom\" && w2.seriesData.series[realIndex][j] > 0 || this.barHelpers.arrBorderRadius[realIndex][j] === \"top\" && w2.seriesData.series[realIndex][j] < 0) classes = flipClass;\n                elSeries = this.renderSeries($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({\n                    realIndex: realIndex,\n                    pathFill: pathFill.color\n                }, pathFill.useRangeColor ? {\n                    lineFill: pathFill.color\n                } : {}), {\n                    j: j,\n                    i: i2,\n                    columnGroupIndex: columnGroupIndex,\n                    pathFrom: paths.pathFrom,\n                    pathTo: paths.pathTo,\n                    strokeWidth: strokeWidth,\n                    elSeries: elSeries,\n                    x: x,\n                    y: y,\n                    series: series,\n                    barHeight: barHeight,\n                    barWidth: barWidth,\n                    elDataLabelsWrap: elDataLabelsWrap,\n                    elGoalsMarkers: elGoalsMarkers,\n                    type: \"bar\",\n                    visibleSeries: columnGroupIndex,\n                    classes: classes\n                }));\n            }\n            w2.globals.seriesXvalues[realIndex] = xArrValues;\n            w2.globals.seriesYvalues[realIndex] = yArrValues;\n            this.groupCtx.prevY.push(this.groupCtx.yArrj);\n            this.groupCtx.prevYF.push(this.groupCtx.yArrjF);\n            this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal);\n            this.groupCtx.prevX.push(this.groupCtx.xArrj);\n            this.groupCtx.prevXF.push(this.groupCtx.xArrjF);\n            this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal);\n            ret.add(elSeries);\n        }\n        return ret;\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   * @param {number | undefined} xDivision\n   * @param {number | undefined} yDivision\n   * @param {number | undefined} zeroH\n   * @param {number | undefined} zeroW\n   * @param {number} translationsIndex\n   */ initialPositions(x, y, xDivision, yDivision, zeroH, zeroW, translationsIndex) {\n        const w2 = this.w;\n        let barHeight, barWidth;\n        if (this.isHorizontal) {\n            yDivision = w2.layout.gridHeight / w2.globals.dataPoints;\n            const userBarHeight = w2.config.plotOptions.bar.barHeight;\n            if (String(userBarHeight).indexOf(\"%\") === -1) barHeight = parseInt(userBarHeight, 10);\n            else barHeight = yDivision * parseInt(userBarHeight, 10) / 100;\n            zeroW = w2.globals.padHorizontal + (this.isReversed ? w2.layout.gridWidth - this.baseLineInvertedY : this.baseLineInvertedY);\n            y = (yDivision - barHeight) / 2;\n        } else {\n            xDivision = w2.layout.gridWidth / w2.globals.dataPoints;\n            barWidth = xDivision;\n            const userColumnWidth = w2.config.plotOptions.bar.columnWidth;\n            if (w2.axisFlags.isXNumeric && w2.globals.dataPoints > 1) {\n                xDivision = w2.globals.minXDiff / this.xRatio;\n                barWidth = xDivision * parseInt(this.barOptions.columnWidth, 10) / 100;\n            } else if (String(userColumnWidth).indexOf(\"%\") === -1) barWidth = parseInt(userColumnWidth, 10);\n            else barWidth *= parseInt(userColumnWidth, 10) / 100;\n            if (this.isReversed) zeroH = this.baseLineY[translationsIndex];\n            else zeroH = w2.layout.gridHeight - this.baseLineY[translationsIndex];\n            x = w2.globals.padHorizontal + (xDivision - barWidth) / 2;\n        }\n        const subDivisions = w2.globals.barGroups.length || 1;\n        return {\n            x: x,\n            y: y,\n            yDivision: yDivision,\n            xDivision: xDivision,\n            barHeight: (barHeight != null ? barHeight : 0) / subDivisions,\n            barWidth: (barWidth != null ? barWidth : 0) / subDivisions,\n            zeroH: zeroH,\n            zeroW: zeroW\n        };\n    }\n    /** @param {{indexes: any, barHeight: any, strokeWidth: any, zeroW: any, x: any, y: any, columnGroupIndex: any, seriesGroup: any, yDivision: any, elSeries: any}} opts */ drawStackedBarPaths({ indexes: indexes, barHeight: barHeight, strokeWidth: strokeWidth, zeroW: zeroW, x: x, y: y, columnGroupIndex: columnGroupIndex, seriesGroup: seriesGroup, yDivision: yDivision, elSeries: elSeries }) {\n        var _a, _b, _c, _d, _e;\n        const w2 = this.w;\n        const barYPosition = y + columnGroupIndex * barHeight;\n        let barXPosition;\n        const i2 = indexes.i;\n        const j = indexes.j;\n        const realIndex = indexes.realIndex;\n        const translationsIndex = indexes.translationsIndex;\n        let prevBarW = 0;\n        for(let k = 0; k < this.groupCtx.prevXF.length; k++)prevBarW = prevBarW + this.groupCtx.prevXF[k][j];\n        let gsi = i2;\n        if (/** @type {Record<string,any>} */ w2.config.series[realIndex].name) gsi = seriesGroup.indexOf(/** @type {Record<string,any>} */ w2.config.series[realIndex].name);\n        if (gsi > 0) {\n            let bXP = zeroW;\n            if (this.groupCtx.prevXVal[gsi - 1][j] < 0) bXP = /** @type {any} */ ((_a = this.series[i2]) == null ? void 0 : _a[j]) >= 0 ? this.groupCtx.prevX[gsi - 1][j] + prevBarW - (this.isReversed ? prevBarW : 0) * 2 : this.groupCtx.prevX[gsi - 1][j];\n            else if (this.groupCtx.prevXVal[gsi - 1][j] >= 0) bXP = /** @type {any} */ ((_b = this.series[i2]) == null ? void 0 : _b[j]) >= 0 ? this.groupCtx.prevX[gsi - 1][j] : this.groupCtx.prevX[gsi - 1][j] - prevBarW + (this.isReversed ? prevBarW : 0) * 2;\n            barXPosition = bXP;\n        } else barXPosition = zeroW;\n        if (/** @type {any} */ ((_c = this.series[i2]) == null ? void 0 : _c[j]) === null) x = barXPosition;\n        else x = barXPosition + /** @type {any} */ ((_d = this.series[i2]) == null ? void 0 : _d[j]) / this.invertedYRatio - (this.isReversed ? /** @type {any} */ ((_e = this.series[i2]) == null ? void 0 : _e[j]) / this.invertedYRatio : 0) * 2;\n        const paths = this.barHelpers.getBarpaths({\n            barYPosition: barYPosition,\n            barHeight: barHeight,\n            x1: barXPosition,\n            x2: x,\n            strokeWidth: strokeWidth,\n            isReversed: this.isReversed,\n            series: this.series,\n            realIndex: indexes.realIndex,\n            seriesGroup: seriesGroup,\n            i: i2,\n            j: j,\n            w: w2\n        });\n        this.barHelpers.barBackground({\n            j: j,\n            i: i2,\n            y1: barYPosition,\n            y2: barHeight,\n            elSeries: elSeries\n        });\n        y = y + yDivision;\n        return {\n            pathTo: paths.pathTo,\n            pathFrom: paths.pathFrom,\n            goalX: this.barHelpers.getGoalValues(\"x\", zeroW, /** @type {any} */ null, realIndex, j, translationsIndex),\n            barXPosition: barXPosition,\n            barYPosition: barYPosition,\n            x: x,\n            y: y\n        };\n    }\n    /** @param {{indexes: any, x: any, y: any, xDivision: any, barWidth: any, zeroH: any, columnGroupIndex: any, seriesGroup: any, elSeries: any}} opts */ drawStackedColumnPaths({ indexes: indexes, x: x, y: y, xDivision: xDivision, barWidth: barWidth, zeroH: zeroH, columnGroupIndex: columnGroupIndex, seriesGroup: seriesGroup, elSeries: elSeries }) {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n        const w2 = this.w;\n        const i2 = indexes.i;\n        const j = indexes.j;\n        const bc = indexes.bc;\n        const realIndex = indexes.realIndex;\n        const translationsIndex = indexes.translationsIndex;\n        if (w2.axisFlags.isXNumeric) {\n            let seriesVal = w2.seriesData.seriesX[realIndex][j];\n            if (!seriesVal) seriesVal = 0;\n            x = (seriesVal - w2.globals.minX) / this.xRatio - barWidth / 2 * w2.globals.barGroups.length;\n        }\n        const barXPosition = x + columnGroupIndex * barWidth;\n        let barYPosition;\n        let prevBarH = 0;\n        for(let k = 0; k < this.groupCtx.prevYF.length; k++)prevBarH = prevBarH + (!isNaN(this.groupCtx.prevYF[k][j]) ? this.groupCtx.prevYF[k][j] : 0);\n        let gsi = i2;\n        if (seriesGroup) gsi = seriesGroup.indexOf(w2.seriesData.seriesNames[realIndex]);\n        if (gsi > 0 && !w2.axisFlags.isXNumeric || gsi > 0 && w2.axisFlags.isXNumeric && w2.seriesData.seriesX[realIndex - 1][j] === w2.seriesData.seriesX[realIndex][j]) {\n            let bYP;\n            let prevYValue;\n            const p2 = Math.min(this.yRatio.length + 1, realIndex + 1);\n            if (this.groupCtx.prevY[gsi - 1] !== void 0 && this.groupCtx.prevY[gsi - 1].length) {\n                for(let ii = 1; ii < p2; ii++)if (!isNaN((_a = this.groupCtx.prevY[gsi - ii]) == null ? void 0 : _a[j])) {\n                    prevYValue = this.groupCtx.prevY[gsi - ii][j];\n                    break;\n                }\n            }\n            for(let ii = 1; ii < p2; ii++){\n                if (((_b = this.groupCtx.prevYVal[gsi - ii]) == null ? void 0 : _b[j]) < 0) {\n                    bYP = /** @type {any} */ ((_c = this.series[i2]) == null ? void 0 : _c[j]) >= 0 ? prevYValue - prevBarH + (this.isReversed ? prevBarH : 0) * 2 : prevYValue;\n                    break;\n                } else if (((_d = this.groupCtx.prevYVal[gsi - ii]) == null ? void 0 : _d[j]) >= 0) {\n                    bYP = /** @type {any} */ ((_e = this.series[i2]) == null ? void 0 : _e[j]) >= 0 ? prevYValue : prevYValue + prevBarH - (this.isReversed ? prevBarH : 0) * 2;\n                    break;\n                }\n            }\n            if (typeof bYP === \"undefined\") bYP = w2.layout.gridHeight;\n            if (/**\n         * @param {number} val\n         */ ((_f = this.groupCtx.prevYF[0]) == null ? void 0 : _f.every((val)=>val === 0)) && this.groupCtx.prevYF.slice(1, gsi).every((arr)=>arr.every((val)=>isNaN(val)))) barYPosition = zeroH;\n            else barYPosition = bYP;\n        } else barYPosition = zeroH;\n        if (/** @type {any} */ (_g = this.series[i2]) == null ? void 0 : _g[j]) y = barYPosition - /** @type {any} */ ((_h = this.series[i2]) == null ? void 0 : _h[j]) / this.yRatio[translationsIndex] + (this.isReversed ? /** @type {any} */ ((_i = this.series[i2]) == null ? void 0 : _i[j]) / this.yRatio[translationsIndex] : 0) * 2;\n        else y = barYPosition;\n        const paths = this.barHelpers.getColumnPaths({\n            barXPosition: barXPosition,\n            barWidth: barWidth,\n            y1: barYPosition,\n            y2: y,\n            yRatio: this.yRatio[translationsIndex],\n            strokeWidth: this.strokeWidth,\n            isReversed: this.isReversed,\n            series: this.series,\n            seriesGroup: seriesGroup,\n            realIndex: indexes.realIndex,\n            i: i2,\n            j: j,\n            w: w2\n        });\n        this.barHelpers.barBackground({\n            bc: bc,\n            j: j,\n            i: i2,\n            x1: barXPosition,\n            x2: barWidth,\n            elSeries: elSeries\n        });\n        return {\n            pathTo: paths.pathTo,\n            pathFrom: paths.pathFrom,\n            goalY: this.barHelpers.getGoalValues(\"y\", /** @type {any} */ null, zeroH, realIndex, j, 0),\n            barXPosition: barXPosition,\n            x: w2.axisFlags.isXNumeric ? x : x + xDivision,\n            y: y\n        };\n    }\n}\nfunction $e4b487e979d7c06d$var$buildJitterGroups({ w: w2, points: points, seedA: seedA, seedB: seedB, center: center, halfExtent: halfExtent, alongFn: alongFn, isHorizontal: isHorizontal, options: options2, clampAt: clampAt }) {\n    const opts = options2;\n    if (!opts || opts.show === false) return [];\n    if (!points || !points.length) return [];\n    const maxPoints = opts.maxPoints || 3e3;\n    const stride = points.length > maxPoints ? Math.ceil(points.length / maxPoints) : 1;\n    const r2 = opts.size != null ? opts.size : 2.5;\n    const jitterFrac = opts.jitter != null ? opts.jitter : 0.5;\n    const jitterPx = halfExtent * jitterFrac;\n    const constrain = opts.constrainToViolin !== false && typeof clampAt === \"function\";\n    const isSquare = opts.shape === \"square\";\n    const scale = opts.colorScale;\n    const useScale = scale && Array.isArray(scale.colors) && scale.colors.length > 0;\n    const steps = useScale ? Math.max(2, scale.steps || 24) : 1;\n    const sMin = useScale && scale.min != null ? scale.min : w2.globals.minY;\n    const sMax = useScale && scale.max != null ? scale.max : w2.globals.maxY;\n    const span = sMax - sMin || 1;\n    const buckets = useScale ? new Array(steps).fill(\"\") : [\n        \"\"\n    ];\n    for(let k = 0; k < points.length; k += stride){\n        const v2 = points[k];\n        const a2 = alongFn(v2);\n        let off = ($e4b487e979d7c06d$var$hash01(seedA * 7919 + seedB * 100003 + k) - 0.5) * 2 * jitterPx;\n        if (constrain) {\n            const cap = /** @type {(v:number)=>number} */ clampAt(v2);\n            if (off > cap) off = cap;\n            if (off < -cap) off = -cap;\n        }\n        const px = isHorizontal ? a2 : center + off;\n        const py = isHorizontal ? center + off : a2;\n        const sub = isSquare ? $e4b487e979d7c06d$var$squareSubPath(px, py, r2) : $e4b487e979d7c06d$var$circleSubPath(px, py, r2);\n        if (useScale) {\n            let t2 = (v2 - sMin) / span;\n            if (t2 < 0) t2 = 0;\n            if (t2 > 1) t2 = 1;\n            buckets[Math.round(t2 * (steps - 1))] += sub;\n        } else buckets[0] += sub;\n    }\n    if (!useScale) return buckets[0] ? [\n        {\n            fill: null,\n            d: buckets[0]\n        }\n    ] : [];\n    const groups = [];\n    for(let b2 = 0; b2 < steps; b2++){\n        if (!buckets[b2]) continue;\n        groups.push({\n            fill: $e4b487e979d7c06d$var$rampColorAt(scale.colors, b2 / (steps - 1)),\n            d: buckets[b2]\n        });\n    }\n    return groups;\n}\nfunction $e4b487e979d7c06d$var$renderJitter({ graphics: graphics, w: w2, elSeries: elSeries, pointsByCat: pointsByCat, options: options2, distributed: distributed, realIndex: realIndex, wrapClass: wrapClass, pointClass: pointClass }) {\n    if (!options2 || options2.show === false || !pointsByCat.length) return;\n    const pOpacity = options2.opacity != null ? options2.opacity : 0.9;\n    const strokeColor = options2.strokeColor != null ? options2.strokeColor : \"#fff\";\n    const strokeW = options2.strokeWidth != null ? options2.strokeWidth : 1;\n    const willAnimateIn = w2.config.chart.animations.enabled && !w2.globals.resized && !w2.globals.dataChanged;\n    const elPointsWrap = graphics.group({\n        class: willAnimateIn ? `${wrapClass} apexcharts-element-hidden` : wrapClass\n    });\n    if (willAnimateIn) w2.globals.delayedElements.push({\n        el: elPointsWrap.node\n    });\n    pointsByCat.forEach(({ groups: groups, j: j })=>{\n        const catColor = distributed ? w2.globals.colors[j] : w2.globals.colors[realIndex];\n        const fc = options2.fillColor;\n        const defaultFill = fc === \"series\" ? catColor : fc === \"series-dark\" ? $e4b487e979d7c06d$var$darkenColor(catColor, 0.45) : fc || $e4b487e979d7c06d$var$darkenColor(catColor, 0.45);\n        groups.forEach((g2)=>{\n            const elPoints = graphics.drawPath({\n                d: g2.d,\n                fill: g2.fill != null ? g2.fill : defaultFill,\n                stroke: strokeW > 0 ? strokeColor : \"none\",\n                strokeWidth: strokeW,\n                fillOpacity: pOpacity,\n                classes: pointClass\n            });\n            elPoints.attr(\"data:realIndex\", realIndex);\n            elPoints.attr(\"j\", j);\n            elPoints.attr(\"clip-path\", `url(#gridRectBarMask${w2.globals.cuid})`);\n            elPoints.node.style.pointerEvents = \"none\";\n            elPointsWrap.add(elPoints);\n        });\n    });\n    elSeries.add(elPointsWrap);\n}\nfunction $e4b487e979d7c06d$var$darkenColor(color, amount) {\n    const rgb = $e4b487e979d7c06d$var$Utils$1.parseHex(color);\n    if (!rgb) return color;\n    const f = Math.max(0, 1 - amount);\n    return `rgb(${Math.round(rgb[0] * f)},${Math.round(rgb[1] * f)},${Math.round(rgb[2] * f)})`;\n}\nfunction $e4b487e979d7c06d$var$rampColorAt(colors, t2) {\n    if (!colors.length) return \"#000\";\n    if (colors.length === 1) return colors[0];\n    const x = Math.max(0, Math.min(1, t2)) * (colors.length - 1);\n    const i2 = Math.floor(x);\n    const frac = x - i2;\n    const c0 = $e4b487e979d7c06d$var$Utils$1.parseHex(colors[i2]) || [\n        0,\n        0,\n        0\n    ];\n    const c1 = $e4b487e979d7c06d$var$Utils$1.parseHex(colors[Math.min(i2 + 1, colors.length - 1)]) || c0;\n    const mix = (a2, b2)=>Math.round(a2 + (b2 - a2) * frac);\n    return `rgb(${mix(c0[0], c1[0])},${mix(c0[1], c1[1])},${mix(c0[2], c1[2])})`;\n}\nfunction $e4b487e979d7c06d$var$hash01(n2) {\n    let h2 = (n2 ^ 2654435769) >>> 0;\n    h2 = Math.imul(h2 ^ h2 >>> 16, 73244475);\n    h2 = Math.imul(h2 ^ h2 >>> 16, 73244475);\n    return ((h2 ^ h2 >>> 16) >>> 0) / 4294967296;\n}\nfunction $e4b487e979d7c06d$var$circleSubPath(px, py, r2) {\n    return `M ${px - r2} ${py} a ${r2} ${r2} 0 1 0 ${2 * r2} 0 a ${r2} ${r2} 0 1 0 ${-2 * r2} 0 `;\n}\nfunction $e4b487e979d7c06d$var$squareSubPath(px, py, r2) {\n    return `M ${px - r2} ${py - r2} h ${2 * r2} v ${2 * r2} h ${-2 * r2} z `;\n}\nclass $e4b487e979d7c06d$var$BoxCandleStick extends $e4b487e979d7c06d$var$Bar {\n    /**\n   * @param {any[]} series\n   * @param {string} ctype\n   * @param {number} seriesIndex\n   */ // @ts-ignore -- BoxCandleStick.draw has an extra ctype param compared to Bar.draw\n    draw(series, ctype, seriesIndex) {\n        var _a;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const type = w2.globals.comboCharts ? ctype : w2.config.chart.type;\n        const fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        this.candlestickOptions = this.w.config.plotOptions.candlestick;\n        this.boxOptions = this.w.config.plotOptions.boxPlot;\n        this.isHorizontal = w2.config.plotOptions.bar.horizontal;\n        this.isOHLC = this.candlestickOptions && this.candlestickOptions.type === \"ohlc\";\n        this.coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n        series = this.coreUtils.getLogSeries(series);\n        this.series = series;\n        this.yRatio = this.coreUtils.getLogYRatios(this.yRatio);\n        this.barHelpers.initVariables(series);\n        const ret = graphics.group({\n            class: `apexcharts-${type}-series apexcharts-plot-series`\n        });\n        for(let i2 = 0; i2 < series.length; i2++){\n            this.isBoxPlot = w2.config.chart.type === \"boxPlot\" || /** @type {Record<string,any>} */ w2.config.series[i2].type === \"boxPlot\";\n            let x;\n            let y;\n            const yArrj = [];\n            const xArrj = [];\n            const realIndex = w2.globals.comboCharts ? /** @type {any} */ seriesIndex[i2] : i2;\n            const { columnGroupIndex: columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);\n            const elSeries = graphics.group({\n                class: `apexcharts-series`,\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n                rel: i2 + 1,\n                \"data:realIndex\": realIndex\n            });\n            $e4b487e979d7c06d$var$Series.addCollapsedClassToSeries(this.w, elSeries, realIndex);\n            if (series[i2].length > 0) this.visibleI = this.visibleI + 1;\n            let translationsIndex = 0;\n            if (this.yRatio.length > 1) {\n                this.yaxisIndex = /** @type {any} */ w2.globals.seriesYAxisReverseMap[realIndex][0];\n                translationsIndex = realIndex;\n            }\n            const initPositions = this.barHelpers.initialPositions(realIndex);\n            const { y: initY, barHeight: barHeight, yDivision: yDivision, zeroW: // yDivision is the GRIDHEIGHT divided by number of datapoints (bars)\n            zeroW, // zeroW is the baseline where 0 meets x axis\n            x: initX, barWidth: barWidth, xDivision: xDivision, zeroH: // xDivision is the GRIDWIDTH divided by number of datapoints (columns)\n            zeroH } = initPositions;\n            y = initY;\n            x = initX;\n            xArrj.push(x + (barWidth != null ? barWidth : 0) / 2);\n            const elDataLabelsWrap = graphics.group({\n                class: \"apexcharts-datalabels\",\n                \"data:realIndex\": realIndex\n            });\n            const elGoalsMarkers = graphics.group({\n                class: \"apexcharts-bar-goals-markers\"\n            });\n            const boxPointsOpts = this.isBoxPlot ? this.boxOptions.points : null;\n            const pointsByCat = [];\n            const gridW = w2.layout.gridWidth;\n            const cullBuffer = barWidth != null ? barWidth : 0;\n            for(let j = 0; j < w2.globals.dataPoints; j++){\n                const strokeWidth = this.barHelpers.getStrokeWidth(i2, j, realIndex);\n                let paths = /** @type {any} */ null;\n                const pathsParams = {\n                    indexes: {\n                        i: i2,\n                        j: j,\n                        realIndex: realIndex,\n                        translationsIndex: translationsIndex\n                    },\n                    x: x,\n                    y: y,\n                    strokeWidth: strokeWidth,\n                    elSeries: elSeries\n                };\n                if (this.isHorizontal) paths = this.drawHorizontalBoxPaths($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, pathsParams), {\n                    yDivision: yDivision,\n                    barHeight: barHeight,\n                    zeroW: zeroW\n                }));\n                else paths = this.drawVerticalBoxPaths($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, pathsParams), {\n                    xDivision: xDivision,\n                    barWidth: barWidth,\n                    zeroH: zeroH,\n                    cullBounds: {\n                        lo: -cullBuffer,\n                        hi: gridW + cullBuffer\n                    }\n                }));\n                y = paths.y;\n                x = paths.x;\n                if (j > 0) xArrj.push(x + (barWidth != null ? barWidth : 0) / 2);\n                yArrj.push(y);\n                if (paths.culled) continue;\n                const barGoalLine = this.barHelpers.drawGoalLine({\n                    barXPosition: paths.barXPosition,\n                    barYPosition: paths.barYPosition,\n                    goalX: paths.goalX,\n                    goalY: paths.goalY,\n                    barHeight: barHeight,\n                    barWidth: barWidth\n                });\n                if (barGoalLine) elGoalsMarkers.add(barGoalLine);\n                paths.pathTo.forEach((pathTo, pi)=>{\n                    const lineFill = !this.isBoxPlot && this.candlestickOptions.wick.useFillColor ? paths.color[pi] : w2.globals.stroke.colors[i2];\n                    const pathFill = fill.fillPath({\n                        seriesNumber: realIndex,\n                        dataPointIndex: j,\n                        color: paths.color[pi],\n                        value: series[i2][j]\n                    });\n                    this.renderSeries({\n                        realIndex: realIndex,\n                        pathFill: pathFill,\n                        lineFill: lineFill,\n                        j: j,\n                        i: i2,\n                        pathFrom: paths.pathFrom,\n                        pathTo: pathTo,\n                        strokeWidth: strokeWidth,\n                        elSeries: elSeries,\n                        x: x,\n                        y: y,\n                        series: series,\n                        columnGroupIndex: columnGroupIndex,\n                        barHeight: barHeight,\n                        barWidth: barWidth,\n                        elDataLabelsWrap: elDataLabelsWrap,\n                        elGoalsMarkers: elGoalsMarkers,\n                        visibleSeries: this.visibleI,\n                        type: w2.config.chart.type\n                    });\n                });\n                if (boxPointsOpts && boxPointsOpts.show !== false) {\n                    const pts = (_a = w2.candleData.seriesBoxPoints[realIndex]) == null ? void 0 : _a[j];\n                    if (pts && pts.length) {\n                        const logVal = (v2)=>/** @type {any} */ this.coreUtils.getLogValAtSeriesIndex(v2, realIndex);\n                        let center, halfExtent, alongFn;\n                        if (this.isHorizontal) {\n                            const yRatio = this.invertedYRatio;\n                            const bh = barHeight != null ? barHeight : 0;\n                            const z = zeroW != null ? zeroW : 0;\n                            center = paths.barYPosition + bh / 2;\n                            halfExtent = bh / 2;\n                            alongFn = (v2)=>z + logVal(v2) / yRatio;\n                        } else {\n                            const yRatio = this.yRatio[translationsIndex];\n                            const bw = barWidth != null ? barWidth : 0;\n                            const z = zeroH != null ? zeroH : 0;\n                            center = paths.barXPosition + bw / 2;\n                            halfExtent = bw / 2;\n                            alongFn = (v2)=>z - logVal(v2) / yRatio;\n                        }\n                        const groups = $e4b487e979d7c06d$var$buildJitterGroups({\n                            w: w2,\n                            points: pts,\n                            seedA: realIndex,\n                            seedB: j,\n                            center: center,\n                            halfExtent: halfExtent,\n                            alongFn: alongFn,\n                            isHorizontal: this.isHorizontal,\n                            options: boxPointsOpts\n                        });\n                        if (groups.length) pointsByCat.push({\n                            groups: groups,\n                            j: j\n                        });\n                    }\n                }\n            }\n            if (boxPointsOpts) $e4b487e979d7c06d$var$renderJitter({\n                graphics: graphics,\n                w: w2,\n                elSeries: elSeries,\n                pointsByCat: pointsByCat,\n                options: boxPointsOpts,\n                distributed: w2.config.plotOptions.bar.distributed,\n                realIndex: realIndex,\n                wrapClass: \"apexcharts-boxPlot-points-wrap\",\n                pointClass: \"apexcharts-boxPlot-points\"\n            });\n            w2.globals.seriesXvalues[realIndex] = xArrj;\n            w2.globals.seriesYvalues[realIndex] = yArrj;\n            ret.add(elSeries);\n        }\n        return ret;\n    }\n    /** @param {{indexes: any, x: any, xDivision: any, barWidth: any, zeroH: any, strokeWidth: any, cullBounds?: {lo: number, hi: number}|null}} opts */ drawVerticalBoxPaths({ indexes: indexes, x: x, xDivision: xDivision, barWidth: barWidth, zeroH: zeroH, strokeWidth: strokeWidth, cullBounds: cullBounds = null }) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const i2 = indexes.i;\n        const j = indexes.j;\n        const { colors: candleColors } = w2.config.plotOptions.candlestick;\n        const { colors: boxColors } = this.boxOptions;\n        const realIndex = indexes.realIndex;\n        const getColor = (color2)=>Array.isArray(color2) ? color2[realIndex] : color2;\n        const colorPos = getColor(candleColors.upward);\n        const colorNeg = getColor(candleColors.downward);\n        const yRatio = this.yRatio[indexes.translationsIndex];\n        const ohlc = this.getOHLCValue(realIndex, j);\n        let l1 = zeroH;\n        let l2 = zeroH;\n        let color = ohlc.o < ohlc.c ? [\n            colorPos\n        ] : [\n            colorNeg\n        ];\n        if (this.isBoxPlot) color = [\n            getColor(boxColors.lower),\n            getColor(boxColors.upper)\n        ];\n        let y1 = Math.min(ohlc.o, ohlc.c);\n        let y2 = Math.max(ohlc.o, ohlc.c);\n        let m2 = ohlc.m;\n        if (w2.axisFlags.isXNumeric) x = (w2.seriesData.seriesX[realIndex][j] - w2.globals.minX) / this.xRatio - barWidth / 2;\n        const barXPosition = x + barWidth * this.visibleI;\n        if (typeof /** @type {any} */ ((_a = this.series[i2]) == null ? void 0 : _a[j]) === \"undefined\" || /** @type {any} */ ((_b = this.series[i2]) == null ? void 0 : _b[j]) === null) {\n            y1 = zeroH;\n            y2 = zeroH;\n        } else {\n            y1 = zeroH - y1 / yRatio;\n            y2 = zeroH - y2 / yRatio;\n            l1 = zeroH - ohlc.h / yRatio;\n            l2 = zeroH - ohlc.l / yRatio;\n            m2 = zeroH - ohlc.m / yRatio;\n        }\n        if (cullBounds && (barXPosition + barWidth < cullBounds.lo || barXPosition > cullBounds.hi)) return {\n            pathTo: null,\n            pathFrom: null,\n            x: w2.axisFlags.isXNumeric ? x : x + xDivision,\n            y: y2,\n            barXPosition: barXPosition,\n            color: color,\n            culled: true\n        };\n        let pathTo;\n        if (this.isOHLC) {\n            const centerX = barXPosition + barWidth / 2;\n            const openY = zeroH - ohlc.o / yRatio;\n            const closeY = zeroH - ohlc.c / yRatio;\n            pathTo = [\n                graphics.move(centerX, l1) + graphics.line(centerX, l2) + graphics.move(centerX, openY) + graphics.line(barXPosition, openY) + graphics.move(centerX, closeY) + graphics.line(barXPosition + barWidth, closeY)\n            ];\n        } else if (this.isBoxPlot) pathTo = [\n            graphics.move(barXPosition, y1) + graphics.line(barXPosition + barWidth / 2, y1) + graphics.line(barXPosition + barWidth / 2, l1) + graphics.line(barXPosition + barWidth / 4, l1) + graphics.line(barXPosition + barWidth - barWidth / 4, l1) + graphics.line(barXPosition + barWidth / 2, l1) + graphics.line(barXPosition + barWidth / 2, y1) + graphics.line(barXPosition + barWidth, y1) + graphics.line(barXPosition + barWidth, m2) + graphics.line(barXPosition, m2) + graphics.line(barXPosition, y1 + strokeWidth / 2),\n            graphics.move(barXPosition, m2) + graphics.line(barXPosition + barWidth, m2) + graphics.line(barXPosition + barWidth, y2) + graphics.line(barXPosition + barWidth / 2, y2) + graphics.line(barXPosition + barWidth / 2, l2) + graphics.line(barXPosition + barWidth - barWidth / 4, l2) + graphics.line(barXPosition + barWidth / 4, l2) + graphics.line(barXPosition + barWidth / 2, l2) + graphics.line(barXPosition + barWidth / 2, y2) + graphics.line(barXPosition, y2) + graphics.line(barXPosition, m2) + \"z\"\n        ];\n        else pathTo = [\n            graphics.move(barXPosition, y2) + graphics.line(barXPosition + barWidth / 2, y2) + graphics.line(barXPosition + barWidth / 2, l1) + graphics.line(barXPosition + barWidth / 2, y2) + graphics.line(barXPosition + barWidth, y2) + graphics.line(barXPosition + barWidth, y1) + graphics.line(barXPosition + barWidth / 2, y1) + graphics.line(barXPosition + barWidth / 2, l2) + graphics.line(barXPosition + barWidth / 2, y1) + graphics.line(barXPosition, y1) + graphics.line(barXPosition, y2 - strokeWidth / 2)\n        ];\n        let pathFrom = null;\n        const morphFrom = (_d = (_c = this.ctx) == null ? void 0 : _c.morphTypeChange) == null ? void 0 : _d.getInitialPathFor(realIndex, j);\n        if (morphFrom) pathFrom = morphFrom;\n        else if (w2.globals.previousPaths.length > 0) pathFrom = this.getPreviousPath(realIndex, j, pathTo[0]);\n        if (pathFrom == null) pathFrom = graphics.move(barXPosition + barWidth / 2, y1) + graphics.move(barXPosition, y1);\n        if (!w2.axisFlags.isXNumeric) x = x + xDivision;\n        return {\n            pathTo: pathTo,\n            pathFrom: pathFrom,\n            x: x,\n            y: y2,\n            goalY: this.barHelpers.getGoalValues(\"y\", /** @type {any} */ null, zeroH, realIndex, j, indexes.translationsIndex),\n            barXPosition: barXPosition,\n            color: color\n        };\n    }\n    /** @param {{indexes: any, y: any, yDivision: any, barHeight: any, zeroW: any, strokeWidth: any}} opts */ drawHorizontalBoxPaths({ indexes: indexes, y: y, yDivision: yDivision, barHeight: barHeight, zeroW: zeroW, strokeWidth: strokeWidth }) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const i2 = indexes.i;\n        const j = indexes.j;\n        const realIndex = indexes.realIndex;\n        const { colors: candleColors } = w2.config.plotOptions.candlestick;\n        const { colors: boxColors } = this.boxOptions;\n        const getColor = (color2)=>Array.isArray(color2) ? color2[realIndex] : color2;\n        const yRatio = this.invertedYRatio;\n        const ohlc = this.getOHLCValue(realIndex, j);\n        let color = ohlc.o < ohlc.c ? [\n            getColor(candleColors.upward)\n        ] : [\n            getColor(candleColors.downward)\n        ];\n        if (this.isBoxPlot) color = [\n            getColor(boxColors.lower),\n            getColor(boxColors.upper)\n        ];\n        let l1 = zeroW;\n        let l2 = zeroW;\n        let x1 = Math.min(ohlc.o, ohlc.c);\n        let x2 = Math.max(ohlc.o, ohlc.c);\n        let m2 = ohlc.m;\n        if (w2.axisFlags.isXNumeric) y = (w2.seriesData.seriesX[realIndex][j] - w2.globals.minX) / this.invertedXRatio - barHeight / 2;\n        const barYPosition = y + barHeight * this.visibleI;\n        if (typeof /** @type {any} */ ((_a = this.series[i2]) == null ? void 0 : _a[j]) === \"undefined\" || /** @type {any} */ ((_b = this.series[i2]) == null ? void 0 : _b[j]) === null) {\n            x1 = zeroW;\n            x2 = zeroW;\n        } else {\n            x1 = zeroW + x1 / yRatio;\n            x2 = zeroW + x2 / yRatio;\n            l1 = zeroW + ohlc.h / yRatio;\n            l2 = zeroW + ohlc.l / yRatio;\n            m2 = zeroW + ohlc.m / yRatio;\n        }\n        const pathTo = [\n            graphics.move(x1, barYPosition) + graphics.line(x1, barYPosition + barHeight / 2) + graphics.line(l1, barYPosition + barHeight / 2) + graphics.line(l1, barYPosition + barHeight / 2 - barHeight / 4) + graphics.line(l1, barYPosition + barHeight / 2 + barHeight / 4) + graphics.line(l1, barYPosition + barHeight / 2) + graphics.line(x1, barYPosition + barHeight / 2) + graphics.line(x1, barYPosition + barHeight) + graphics.line(m2, barYPosition + barHeight) + graphics.line(m2, barYPosition) + graphics.line(x1 + strokeWidth / 2, barYPosition),\n            graphics.move(m2, barYPosition) + graphics.line(m2, barYPosition + barHeight) + graphics.line(x2, barYPosition + barHeight) + graphics.line(x2, barYPosition + barHeight / 2) + graphics.line(l2, barYPosition + barHeight / 2) + graphics.line(l2, barYPosition + barHeight - barHeight / 4) + graphics.line(l2, barYPosition + barHeight / 4) + graphics.line(l2, barYPosition + barHeight / 2) + graphics.line(x2, barYPosition + barHeight / 2) + graphics.line(x2, barYPosition) + graphics.line(m2, barYPosition) + \"z\"\n        ];\n        let pathFrom = null;\n        const morphFrom = (_d = (_c = this.ctx) == null ? void 0 : _c.morphTypeChange) == null ? void 0 : _d.getInitialPathFor(realIndex, j);\n        if (morphFrom) pathFrom = morphFrom;\n        else if (w2.globals.previousPaths.length > 0) pathFrom = this.getPreviousPath(realIndex, j, pathTo[0]);\n        if (pathFrom == null) pathFrom = graphics.move(x1, barYPosition + barHeight / 2) + graphics.move(x1, barYPosition);\n        if (!w2.axisFlags.isXNumeric) y = y + yDivision;\n        return {\n            pathTo: pathTo,\n            pathFrom: pathFrom,\n            x: x2,\n            y: y,\n            goalX: this.barHelpers.getGoalValues(\"x\", zeroW, /** @type {any} */ null, realIndex, j, 0),\n            barYPosition: barYPosition,\n            color: color\n        };\n    }\n    /**\n   * @param {number} i\n   * @param {number} j\n   */ getOHLCValue(i2, j) {\n        const w2 = this.w;\n        const coreUtils = this.coreUtils;\n        const getCandleVal = (arr)=>arr[i2] && arr[i2][j] != null ? /** @type {any} */ coreUtils.getLogValAtSeriesIndex(arr[i2][j], i2) : 0;\n        const h2 = getCandleVal(w2.candleData.seriesCandleH);\n        const o2 = getCandleVal(w2.candleData.seriesCandleO);\n        const m2 = getCandleVal(w2.candleData.seriesCandleM);\n        const c2 = getCandleVal(w2.candleData.seriesCandleC);\n        const l2 = getCandleVal(w2.candleData.seriesCandleL);\n        return {\n            o: this.isBoxPlot ? h2 : o2,\n            h: this.isBoxPlot ? o2 : h2,\n            m: m2,\n            l: this.isBoxPlot ? c2 : l2,\n            c: this.isBoxPlot ? l2 : c2\n        };\n    }\n}\nconst $e4b487e979d7c06d$var$tangents = (points)=>{\n    const m2 = $e4b487e979d7c06d$var$finiteDifferences(points);\n    const n2 = points.length - 1;\n    const \\u03B5 = 1e-6;\n    const tgts = [];\n    let a2, b2, d, s2;\n    for(let i2 = 0; i2 < n2; i2++){\n        d = $e4b487e979d7c06d$var$slope(points[i2], points[i2 + 1]);\n        if (Math.abs(d) < \\u03B5) m2[i2] = m2[i2 + 1] = 0;\n        else {\n            a2 = m2[i2] / d;\n            b2 = m2[i2 + 1] / d;\n            s2 = a2 * a2 + b2 * b2;\n            if (s2 > 9) {\n                s2 = d * 3 / Math.sqrt(s2);\n                m2[i2] = s2 * a2;\n                m2[i2 + 1] = s2 * b2;\n            }\n        }\n    }\n    for(let i2 = 0; i2 <= n2; i2++){\n        s2 = (points[Math.min(n2, i2 + 1)][0] - points[Math.max(0, i2 - 1)][0]) / (6 * (1 + m2[i2] * m2[i2]));\n        tgts.push([\n            s2 || 0,\n            m2[i2] * s2 || 0\n        ]);\n    }\n    return tgts;\n};\nconst $e4b487e979d7c06d$var$svgPath = (points)=>{\n    let p2 = \"\";\n    for(let i2 = 0; i2 < points.length; i2++){\n        const point = points[i2];\n        const n2 = point.length;\n        if (n2 > 4) {\n            p2 += `C${point[0]}, ${point[1]}`;\n            p2 += `, ${point[2]}, ${point[3]}`;\n            p2 += `, ${point[4]}, ${point[5]}`;\n        } else if (n2 > 2) {\n            p2 += `S${point[0]}, ${point[1]}`;\n            p2 += `, ${point[2]}, ${point[3]}`;\n        }\n    }\n    return p2;\n};\nconst $e4b487e979d7c06d$var$spline = {\n    /**\n   * Convert 'points' to bezier\n   * @param {any[]} points\n   * @returns {any[]}\n   */ points (points) {\n        const tgts = $e4b487e979d7c06d$var$tangents(points);\n        const p2 = points[1];\n        const p0 = points[0];\n        const pts = [];\n        const t2 = tgts[1];\n        const t0 = tgts[0];\n        pts.push(p0, [\n            p0[0] + t0[0],\n            p0[1] + t0[1],\n            p2[0] - t2[0],\n            p2[1] - t2[1],\n            p2[0],\n            p2[1]\n        ]);\n        for(let i2 = 2, n2 = tgts.length; i2 < n2; i2++){\n            const p3 = points[i2];\n            const t3 = tgts[i2];\n            pts.push([\n                p3[0] - t3[0],\n                p3[1] - t3[1],\n                p3[0],\n                p3[1]\n            ]);\n        }\n        return pts;\n    },\n    /**\n   * Slice out a segment of 'points'\n   * @param {any[]} points\n   * @param {Number} start\n   * @param {Number} end\n   * @returns {any[]}\n   */ slice (points, start, end) {\n        const pts = points.slice(start, end);\n        if (start) {\n            if (end - start > 1 && pts[1].length < 6) {\n                const n2 = pts[0].length;\n                pts[1] = [\n                    pts[0][n2 - 2] * 2 - pts[0][n2 - 4],\n                    pts[0][n2 - 1] * 2 - pts[0][n2 - 3]\n                ].concat(pts[1]);\n            }\n            pts[0] = pts[0].slice(-2);\n        }\n        return pts;\n    }\n};\nfunction $e4b487e979d7c06d$var$slope(p0, p1) {\n    return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}\nfunction $e4b487e979d7c06d$var$finiteDifferences(points) {\n    const m2 = [];\n    let p0 = points[0];\n    let p1 = points[1];\n    let d = m2[0] = $e4b487e979d7c06d$var$slope(p0, p1);\n    let i2 = 1;\n    for(let n2 = points.length - 1; i2 < n2; i2++){\n        p0 = p1;\n        p1 = points[i2 + 1];\n        m2[i2] = (d + (d = $e4b487e979d7c06d$var$slope(p0, p1))) * 0.5;\n    }\n    m2[i2] = d;\n    return m2;\n}\nclass $e4b487e979d7c06d$var$Violin extends $e4b487e979d7c06d$var$Bar {\n    /**\n   * @param {any[]} series\n   * @param {string} ctype\n   * @param {number} [seriesIndex]\n   */ // @ts-ignore -- Violin.draw has extra ctype param compared to Bar.draw\n    draw(series, ctype, seriesIndex) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        this.violinOptions = w2.config.plotOptions.violin;\n        this.pointsOptions = this.violinOptions.points;\n        this.bandwidthScale = this.violinOptions.bandwidthScale || 1;\n        this.normalize = this.violinOptions.normalize || \"individual\";\n        this.distributed = w2.config.plotOptions.bar.distributed;\n        this.isHorizontal = w2.config.plotOptions.bar.horizontal;\n        this.coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n        series = this.coreUtils.getLogSeries(series);\n        this.series = series;\n        this.yRatio = this.coreUtils.getLogYRatios(this.yRatio);\n        this.barHelpers.initVariables(series);\n        const ret = graphics.group({\n            class: \"apexcharts-violin-series apexcharts-plot-series\"\n        });\n        for(let i2 = 0; i2 < series.length; i2++){\n            let x;\n            let y;\n            const yArrj = [];\n            const xArrj = [];\n            const realIndex = w2.globals.comboCharts ? /** @type {any} */ seriesIndex[i2] : i2;\n            const { columnGroupIndex: columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);\n            const elSeries = graphics.group({\n                class: \"apexcharts-series\",\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n                rel: i2 + 1,\n                \"data:realIndex\": realIndex\n            });\n            $e4b487e979d7c06d$var$Series.addCollapsedClassToSeries(this.w, elSeries, realIndex);\n            if (series[i2].length > 0) this.visibleI = this.visibleI + 1;\n            let translationsIndex = 0;\n            if (this.yRatio.length > 1) {\n                this.yaxisIndex = /** @type {any} */ w2.globals.seriesYAxisReverseMap[realIndex][0];\n                translationsIndex = realIndex;\n            }\n            const initPositions = this.barHelpers.initialPositions(realIndex);\n            const { y: initY, barHeight: barHeight, yDivision: yDivision, zeroW: zeroW, x: initX, barWidth: barWidth, xDivision: xDivision, zeroH: zeroH } = initPositions;\n            y = initY;\n            x = initX;\n            xArrj.push(x + (barWidth != null ? barWidth : 0) / 2);\n            const elDataLabelsWrap = graphics.group({\n                class: \"apexcharts-datalabels\",\n                \"data:realIndex\": realIndex\n            });\n            this.seriesMaxWeight = 0;\n            if (this.normalize === \"group\") {\n                const dens = w2.violinData.seriesViolinDensity[realIndex] || [];\n                dens.forEach((d)=>{\n                    if (d && d.maxWeight > this.seriesMaxWeight) this.seriesMaxWeight = d.maxWeight;\n                });\n            }\n            const pointsByViolin = [];\n            for(let j = 0; j < w2.globals.dataPoints; j++){\n                const strokeWidth = this.barHelpers.getStrokeWidth(i2, j, realIndex);\n                const paths = this.isHorizontal ? this.drawHorizontalViolin({\n                    indexes: {\n                        i: i2,\n                        j: j,\n                        realIndex: realIndex,\n                        translationsIndex: translationsIndex\n                    },\n                    y: y,\n                    yDivision: yDivision,\n                    barHeight: barHeight,\n                    zeroW: zeroW\n                }) : this.drawVerticalViolin({\n                    indexes: {\n                        i: i2,\n                        j: j,\n                        realIndex: realIndex,\n                        translationsIndex: translationsIndex\n                    },\n                    x: x,\n                    xDivision: xDivision,\n                    barWidth: barWidth,\n                    zeroH: zeroH\n                });\n                x = paths.x;\n                y = paths.y;\n                if (j > 0) xArrj.push(paths.center);\n                yArrj.push(paths.alongRepresentative);\n                const pointGroups = this.buildPointsSubPath({\n                    realIndex: realIndex,\n                    j: j,\n                    center: paths.center,\n                    halfExtent: paths.halfExtent,\n                    alongFn: paths.alongFn,\n                    density: paths.density,\n                    maxWeight: paths.maxWeight\n                });\n                if (pointGroups.length) pointsByViolin.push({\n                    groups: pointGroups,\n                    j: j\n                });\n                const pathFill = fill.fillPath({\n                    // distributed → color per category (data point) instead of per series\n                    seriesNumber: this.distributed ? j : realIndex,\n                    dataPointIndex: j,\n                    color: this.distributed ? w2.globals.colors[j] : void 0,\n                    value: series[i2][j]\n                });\n                this.renderSeries({\n                    realIndex: realIndex,\n                    pathFill: pathFill,\n                    lineFill: w2.globals.stroke.colors[realIndex],\n                    j: j,\n                    i: i2,\n                    pathFrom: paths.pathFrom,\n                    pathTo: paths.pathTo,\n                    strokeWidth: strokeWidth,\n                    elSeries: elSeries,\n                    x: x,\n                    y: y,\n                    series: series,\n                    columnGroupIndex: columnGroupIndex,\n                    barHeight: barHeight,\n                    barWidth: barWidth,\n                    elDataLabelsWrap: elDataLabelsWrap,\n                    visibleSeries: this.visibleI,\n                    type: \"violin\"\n                });\n                const bodyEl = elSeries.node.querySelector(`path.apexcharts-violin-area[j='${j}']`);\n                if (bodyEl && isFinite(paths.alongRepresentative)) bodyEl.setAttribute(this.isHorizontal ? \"cx\" : \"cy\", `${paths.alongRepresentative}`);\n            }\n            $e4b487e979d7c06d$var$renderJitter({\n                graphics: graphics,\n                w: w2,\n                elSeries: elSeries,\n                pointsByCat: pointsByViolin,\n                options: this.pointsOptions,\n                distributed: this.distributed,\n                realIndex: realIndex,\n                wrapClass: \"apexcharts-violin-points-wrap\",\n                pointClass: \"apexcharts-violin-points\"\n            });\n            w2.globals.seriesXvalues[realIndex] = xArrj;\n            w2.globals.seriesYvalues[realIndex] = yArrj;\n            ret.add(elSeries);\n        }\n        return ret;\n    }\n    /** @param {{indexes: any, x: any, xDivision: any, barWidth: any, zeroH: any}} opts */ drawVerticalViolin({ indexes: indexes, x: x, xDivision: xDivision, barWidth: barWidth, zeroH: zeroH }) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        const { realIndex: realIndex, j: j, translationsIndex: translationsIndex } = indexes;\n        const yRatio = this.yRatio[translationsIndex];\n        if (w2.axisFlags.isXNumeric) x = (w2.seriesData.seriesX[realIndex][j] - w2.globals.minX) / this.xRatio - barWidth / 2;\n        const barXPosition = x + barWidth * this.visibleI;\n        const center = barXPosition + barWidth / 2;\n        const halfExtent = barWidth / 2;\n        const density = this.getDensity(realIndex, j);\n        const maxWeight = this.effectiveMaxWeight(density);\n        const alongFn = (v2)=>zeroH - this.logVal(v2, realIndex) / yRatio;\n        const pathTo = this.buildBodyPath({\n            nodes: density.nodes,\n            center: center,\n            halfExtent: halfExtent,\n            maxWeight: maxWeight,\n            vertical: true,\n            alongFn: alongFn,\n            collapsed: false\n        });\n        let pathFrom = null;\n        const morphFrom = (_b = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange) == null ? void 0 : _b.getInitialPathFor(realIndex, j);\n        if (morphFrom) pathFrom = morphFrom;\n        else if (w2.globals.previousPaths.length > 0) pathFrom = this.getPreviousPath(realIndex, j, pathTo);\n        if (pathFrom == null) pathFrom = this.buildBodyPath({\n            nodes: density.nodes,\n            center: center,\n            halfExtent: halfExtent,\n            maxWeight: maxWeight,\n            vertical: true,\n            alongFn: alongFn,\n            collapsed: true\n        });\n        if (!w2.axisFlags.isXNumeric) x = x + xDivision;\n        return {\n            pathTo: pathTo,\n            pathFrom: pathFrom,\n            x: x,\n            y: zeroH,\n            center: center,\n            halfExtent: halfExtent,\n            alongFn: alongFn,\n            density: density,\n            maxWeight: maxWeight,\n            alongRepresentative: alongFn((_c = this.series[indexes.i][j]) != null ? _c : 0)\n        };\n    }\n    /** @param {{indexes: any, y: any, yDivision: any, barHeight: any, zeroW: any}} opts */ drawHorizontalViolin({ indexes: indexes, y: y, yDivision: yDivision, barHeight: barHeight, zeroW: zeroW }) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        const { realIndex: realIndex, j: j } = indexes;\n        const yRatio = this.invertedYRatio;\n        if (w2.axisFlags.isXNumeric) y = (w2.seriesData.seriesX[realIndex][j] - w2.globals.minX) / this.invertedXRatio - barHeight / 2;\n        const barYPosition = y + barHeight * this.visibleI;\n        const center = barYPosition + barHeight / 2;\n        const halfExtent = barHeight / 2;\n        const density = this.getDensity(realIndex, j);\n        const maxWeight = this.effectiveMaxWeight(density);\n        const alongFn = (v2)=>zeroW + this.logVal(v2, realIndex) / yRatio;\n        const pathTo = this.buildBodyPath({\n            nodes: density.nodes,\n            center: center,\n            halfExtent: halfExtent,\n            maxWeight: maxWeight,\n            vertical: false,\n            alongFn: alongFn,\n            collapsed: false\n        });\n        let pathFrom = null;\n        const morphFrom = (_b = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange) == null ? void 0 : _b.getInitialPathFor(realIndex, j);\n        if (morphFrom) pathFrom = morphFrom;\n        else if (w2.globals.previousPaths.length > 0) pathFrom = this.getPreviousPath(realIndex, j, pathTo);\n        if (pathFrom == null) pathFrom = this.buildBodyPath({\n            nodes: density.nodes,\n            center: center,\n            halfExtent: halfExtent,\n            maxWeight: maxWeight,\n            vertical: false,\n            alongFn: alongFn,\n            collapsed: true\n        });\n        if (!w2.axisFlags.isXNumeric) y = y + yDivision;\n        return {\n            pathTo: pathTo,\n            pathFrom: pathFrom,\n            x: zeroW,\n            y: y,\n            center: center,\n            halfExtent: halfExtent,\n            alongFn: alongFn,\n            maxWeight: maxWeight,\n            density: density,\n            alongRepresentative: alongFn((_c = this.series[indexes.i][j]) != null ? _c : 0)\n        };\n    }\n    /**\n   * Read the parsed density for one violin and return sorted, de-duplicated\n   * nodes (strictly increasing value — a hard requirement for the spline).\n   * @param {number} realIndex\n   * @param {number} j\n   */ getDensity(realIndex, j) {\n        var _a;\n        const w2 = this.w;\n        const d = (_a = w2.violinData.seriesViolinDensity[realIndex]) == null ? void 0 : _a[j];\n        if (!d || !d.values.length) return {\n            nodes: [],\n            maxWeight: 0\n        };\n        const order = d.values.map((_, k)=>k);\n        order.sort((a2, b2)=>d.values[a2] - d.values[b2]);\n        const nodes = [];\n        let prevV = null;\n        for (const k of order){\n            const v2 = d.values[k];\n            if (prevV !== null && v2 === prevV) continue;\n            nodes.push({\n                v: v2,\n                w: d.weights[k]\n            });\n            prevV = v2;\n        }\n        return {\n            nodes: nodes,\n            maxWeight: d.maxWeight\n        };\n    }\n    /**\n   * The peak weight used to scale a violin's width: its own ('individual') or\n   * the densest violin in the series ('group', preserving relative widths).\n   * @param {{maxWeight:number}} density\n   */ effectiveMaxWeight(density) {\n        return this.normalize === \"group\" && this.seriesMaxWeight > 0 ? this.seriesMaxWeight : density.maxWeight;\n    }\n    /**\n   * Build the closed, smooth violin outline. The value axis is the monotonic\n   * parameter for the spline (vertical → Y, horizontal → X); the spline is fed\n   * with that axis first and the control points swapped back to screen space.\n   *\n   * @param {{nodes:{v:number,w:number}[], center:number, halfExtent:number, maxWeight:number, vertical:boolean, alongFn:(v:number)=>number, collapsed:boolean}} opts\n   */ buildBodyPath({ nodes: nodes, center: center, halfExtent: halfExtent, maxWeight: maxWeight, vertical: vertical, alongFn: alongFn, collapsed: collapsed }) {\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        if (nodes.length === 0) {\n            const a2 = alongFn(0);\n            return vertical ? graphics.move(center, a2) + graphics.line(center, a2) : graphics.move(a2, center) + graphics.line(a2, center);\n        }\n        const wpxOf = (weight)=>{\n            if (collapsed || maxWeight <= 0) return 0;\n            const wp = weight / maxWeight * halfExtent * this.bandwidthScale;\n            return Math.min(halfExtent, Math.max(0, wp));\n        };\n        const rightPts = [];\n        const leftPts = [];\n        for(let k = 0; k < nodes.length; k++){\n            const a2 = alongFn(nodes[k].v);\n            const wp = wpxOf(nodes[k].w);\n            if (vertical) {\n                rightPts.push([\n                    center + wp,\n                    a2\n                ]);\n                leftPts.push([\n                    center - wp,\n                    a2\n                ]);\n            } else {\n                rightPts.push([\n                    a2,\n                    center + wp\n                ]);\n                leftPts.push([\n                    a2,\n                    center - wp\n                ]);\n            }\n        }\n        leftPts.reverse();\n        return this.smoothSegment(rightPts, vertical, false) + this.smoothSegment(leftPts, vertical, true) + \"z\";\n    }\n    /**\n   * Emit one edge as a smooth (monotone-cubic) path segment, or a polyline\n   * when there are too few nodes for a spline.\n   *\n   * @param {[number,number][]} screenPts ordered screen points for this edge\n   * @param {boolean} monotonicIsY true when the value axis is vertical\n   * @param {boolean} continued false → start with M; true → start with L (joins the previous edge)\n   */ smoothSegment(screenPts, monotonicIsY, continued) {\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const first = screenPts[0];\n        let d = continued ? graphics.line(first[0], first[1]) : graphics.move(first[0], first[1]);\n        const usePolyline = screenPts.length < 3 || !this.strictlyMonotonic(screenPts, monotonicIsY);\n        if (usePolyline) {\n            for(let k = 1; k < screenPts.length; k++)d += graphics.line(screenPts[k][0], screenPts[k][1]);\n            return d;\n        }\n        const input = screenPts.map(([px, py])=>monotonicIsY ? [\n                py,\n                px\n            ] : [\n                px,\n                py\n            ]);\n        const bez = $e4b487e979d7c06d$var$spline.points(input);\n        const out = monotonicIsY ? bez.map($e4b487e979d7c06d$var$swapPairs) : bez;\n        d += $e4b487e979d7c06d$var$svgPath(out);\n        return d;\n    }\n    /**\n   * @param {[number,number][]} screenPts\n   * @param {boolean} monotonicIsY\n   */ strictlyMonotonic(screenPts, monotonicIsY) {\n        const axis = monotonicIsY ? 1 : 0;\n        for(let k = 1; k < screenPts.length; k++){\n            if (screenPts[k][axis] === screenPts[k - 1][axis]) return false;\n        }\n        return true;\n    }\n    /**\n   * Build the jitter sub-paths for one violin, grouped for rendering. Returns\n   * `[]` when points are hidden or absent. Normally one group (single dot\n   * colour); with `points.colorScale` the dots are bucketed by value into shade\n   * groups, each carrying its ramp colour. Offsets are a deterministic index\n   * hash (SSR-safe); points beyond maxPoints are stride-thinned.\n   *\n   * @param {{realIndex:number, j:number, center:number, halfExtent:number, alongFn:(v:number)=>number, density:{nodes:{v:number,w:number}[], maxWeight:number}, maxWeight:number}} opts\n   * @returns {{fill:string|null, d:string}[]}\n   */ buildPointsSubPath({ realIndex: realIndex, j: j, center: center, halfExtent: halfExtent, alongFn: alongFn, density: density, maxWeight: maxWeight }) {\n        var _a;\n        return $e4b487e979d7c06d$var$buildJitterGroups({\n            w: this.w,\n            points: (_a = this.w.violinData.seriesViolinPoints[realIndex]) == null ? void 0 : _a[j],\n            seedA: realIndex,\n            seedB: j,\n            center: center,\n            halfExtent: halfExtent,\n            alongFn: alongFn,\n            isHorizontal: this.isHorizontal,\n            options: this.pointsOptions,\n            // Violin clamps jitter to the density half-width at each value so dots\n            // stay inside the shape.\n            clampAt: (v2)=>this.halfWidthAtValue(v2, density, halfExtent, maxWeight)\n        });\n    }\n    /**\n   * Density half-width (pixels) at a given value — used to keep jitter inside\n   * the violin. Linear interpolation between the two nearest density nodes.\n   * @param {number} value\n   * @param {{nodes:{v:number,w:number}[], maxWeight:number}} density\n   * @param {number} halfExtent\n   * @param {number} [maxWeightOverride] use the group max for 'group' normalize\n   */ halfWidthAtValue(value, density, halfExtent, maxWeightOverride) {\n        const { nodes: nodes } = density;\n        const maxWeight = maxWeightOverride != null ? maxWeightOverride : density.maxWeight;\n        if (!nodes.length || maxWeight <= 0) return 0;\n        const toPx = (weight)=>Math.min(halfExtent, weight / maxWeight * halfExtent * this.bandwidthScale);\n        if (value <= nodes[0].v) return toPx(nodes[0].w);\n        if (value >= nodes[nodes.length - 1].v) return toPx(nodes[nodes.length - 1].w);\n        for(let k = 1; k < nodes.length; k++)if (value <= nodes[k].v) {\n            const a2 = nodes[k - 1];\n            const b2 = nodes[k];\n            const t2 = b2.v === a2.v ? 0 : (value - a2.v) / (b2.v - a2.v);\n            return toPx(a2.w + (b2.w - a2.w) * t2);\n        }\n        return 0;\n    }\n    /**\n   * Apply the y-axis log transform to a value when that axis is logarithmic,\n   * mirroring BoxCandleStick. Linear axes return the value unchanged.\n   * @param {number} value\n   * @param {number} realIndex\n   */ logVal(value, realIndex) {\n        return /** @type {any} */ this.coreUtils.getLogValAtSeriesIndex(value, realIndex);\n    }\n}\nfunction $e4b487e979d7c06d$var$swapPairs(arr) {\n    const out = [];\n    for(let k = 0; k < arr.length; k += 2)out.push(arr[k + 1], arr[k]);\n    return out;\n}\nclass $e4b487e979d7c06d$var$TreemapHelpers {\n    /**\n   * @param {import('../../../types/internal').ChartStateW} w\n   * @param {import('../../../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.ctx = ctx;\n        this.w = w2;\n    }\n    checkColorRange() {\n        const w2 = this.w;\n        let negRange = false;\n        const chartOpts = w2.config.plotOptions[w2.config.chart.type];\n        if (chartOpts.colorScale.ranges.length > 0) chartOpts.colorScale.ranges.map((range)=>{\n            if (range.from <= 0) negRange = true;\n        });\n        return negRange;\n    }\n    /**\n   * @param {string} chartType\n   * @param {number} i\n   * @param {number} j\n   * @param {any} negRange\n   */ getShadeColor(chartType, i2, j, negRange) {\n        const w2 = this.w;\n        let colorShadePercent = 1;\n        const shadeIntensity = w2.config.plotOptions[chartType].shadeIntensity;\n        const colorProps = this.determineColor(chartType, i2, j);\n        if (/** @type {any} */ w2.globals.hasNegs || negRange) {\n            if (w2.config.plotOptions[chartType].reverseNegativeShade) {\n                if (colorProps.percent < 0) colorShadePercent = colorProps.percent / 100 * (shadeIntensity * 1.25);\n                else colorShadePercent = (1 - colorProps.percent / 100) * (shadeIntensity * 1.25);\n            } else if (colorProps.percent <= 0) colorShadePercent = 1 - (1 + colorProps.percent / 100) * shadeIntensity;\n            else colorShadePercent = (1 - colorProps.percent / 100) * shadeIntensity;\n        } else {\n            colorShadePercent = 1 - colorProps.percent / 100;\n            if (chartType === \"treemap\") colorShadePercent = (1 - colorProps.percent / 100) * (shadeIntensity * 1.25);\n        }\n        let color = colorProps.color;\n        const utils = new $e4b487e979d7c06d$var$Utils$1();\n        if (w2.config.plotOptions[chartType].enableShades) {\n            if (this.w.config.theme.mode === \"dark\") {\n                const shadeColor = utils.shadeColor(colorShadePercent * -1, colorProps.color);\n                color = $e4b487e979d7c06d$var$Utils$1.hexToRgba($e4b487e979d7c06d$var$Utils$1.isColorHex(shadeColor) ? shadeColor : $e4b487e979d7c06d$var$Utils$1.rgb2hex(shadeColor), w2.config.fill.opacity);\n            } else {\n                const shadeColor = utils.shadeColor(colorShadePercent, colorProps.color);\n                color = $e4b487e979d7c06d$var$Utils$1.hexToRgba($e4b487e979d7c06d$var$Utils$1.isColorHex(shadeColor) ? shadeColor : $e4b487e979d7c06d$var$Utils$1.rgb2hex(shadeColor), w2.config.fill.opacity);\n            }\n        }\n        return {\n            color: color,\n            colorProps: colorProps\n        };\n    }\n    /**\n   * @param {string} chartType\n   * @param {number} i\n   * @param {number} j\n   */ determineColor(chartType, i2, j) {\n        const w2 = this.w;\n        const val = w2.seriesData.series[i2][j];\n        const chartOpts = w2.config.plotOptions[chartType];\n        let seriesNumber = chartOpts.colorScale.inverse ? j : i2;\n        if (chartOpts.distributed && w2.config.chart.type === \"treemap\") seriesNumber = j;\n        let color = w2.globals.colors[seriesNumber];\n        let foreColor = null;\n        let min;\n        let max;\n        if (!chartOpts.distributed && chartType === \"heatmap\") {\n            min = w2.globals.minY;\n            max = w2.globals.maxY;\n        } else {\n            const row = w2.seriesData.series[i2];\n            min = row.length ? row[0] : 0;\n            max = min;\n            for(let k = 1; k < row.length; k++){\n                if (row[k] < min) min = row[k];\n                if (row[k] > max) max = row[k];\n            }\n        }\n        if (typeof chartOpts.colorScale.min !== \"undefined\") {\n            min = chartOpts.colorScale.min < w2.globals.minY ? chartOpts.colorScale.min : w2.globals.minY;\n            max = chartOpts.colorScale.max > w2.globals.maxY ? chartOpts.colorScale.max : w2.globals.maxY;\n        }\n        const total = Math.abs(max) + Math.abs(min);\n        let percent = total === 0 ? 0 : 100 * val / total;\n        if (chartOpts.colorScale.ranges.length > 0) {\n            const colorRange = chartOpts.colorScale.ranges;\n            colorRange.map((range)=>{\n                if (val >= range.from && val <= range.to) {\n                    color = range.color;\n                    foreColor = range.foreColor ? range.foreColor : null;\n                    min = range.from;\n                    max = range.to;\n                    const rTotal = Math.abs(max) + Math.abs(min);\n                    percent = rTotal === 0 ? 0 : 100 * val / rTotal;\n                }\n            });\n        }\n        return {\n            color: color,\n            foreColor: foreColor,\n            percent: percent\n        };\n    }\n    /** @param {{ text?: any, x?: any, y?: any, i?: any, j?: any, colorProps?: any, fontSize?: any, series?: any }} opts */ calculateDataLabels({ text: text, x: x, y: y, i: i2, j: j, colorProps: colorProps, fontSize: fontSize }) {\n        const w2 = this.w;\n        const dataLabelsConfig = w2.config.dataLabels;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const dataLabels = new $e4b487e979d7c06d$var$DataLabels(this.w, this.ctx);\n        let elDataLabelsWrap = null;\n        if (dataLabelsConfig.enabled) {\n            elDataLabelsWrap = graphics.group({\n                class: \"apexcharts-data-labels\"\n            });\n            const offX = $e4b487e979d7c06d$var$resolveDataLabelOffset(dataLabelsConfig.offsetX, w2, i2, j);\n            const offY = $e4b487e979d7c06d$var$resolveDataLabelOffset(dataLabelsConfig.offsetY, w2, i2, j);\n            const dataLabelsX = x + offX;\n            const dataLabelsY = y + parseFloat(dataLabelsConfig.style.fontSize) / 3 + offY;\n            dataLabels.plotDataLabelsText({\n                x: dataLabelsX,\n                y: dataLabelsY,\n                text: text,\n                i: i2,\n                j: j,\n                color: colorProps.foreColor,\n                parent: elDataLabelsWrap,\n                fontSize: fontSize,\n                dataLabelsConfig: dataLabelsConfig\n            });\n        }\n        return elDataLabelsWrap;\n    }\n}\nclass $e4b487e979d7c06d$var$HeatMap {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   * @param {import('../types/internal').XYRatios} xyRatios\n   */ constructor(w2, ctx, xyRatios){\n        this.ctx = ctx;\n        this.w = w2;\n        this.xRatio = xyRatios.xRatio;\n        this.yRatio = xyRatios.yRatio;\n        this.dynamicAnim = this.w.config.chart.animations.dynamicAnimation;\n        this.helpers = new $e4b487e979d7c06d$var$TreemapHelpers(w2, ctx);\n        this.rectRadius = this.w.config.plotOptions.heatmap.radius;\n        this.strokeWidth = this.w.config.stroke.show ? this.w.config.stroke.width : 0;\n    }\n    /**\n   * @param {any[]} series\n   */ draw(series) {\n        var _a, _b;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n        const emit = $e4b487e979d7c06d$var$seriesEmitter(this.ctx, graphics);\n        const useCanvas = emit !== graphics && typeof emit.drawRectCell === \"function\";\n        const ret = graphics.group({\n            class: \"apexcharts-heatmap\"\n        });\n        ret.attr(\"clip-path\", `url(#gridRectMask${w2.globals.cuid})`);\n        const xDivision = w2.layout.gridWidth / w2.globals.dataPoints;\n        const yDivision = w2.layout.gridHeight / w2.seriesData.series.length;\n        const isContinuousX = (w2.config.xaxis.type === \"numeric\" || w2.config.xaxis.type === \"datetime\") && w2.axisFlags.isXNumeric && this.xRatio > 0;\n        let binPx = xDivision;\n        if (isContinuousX) {\n            const diff = w2.globals.minXDiff;\n            binPx = Number.isFinite(diff) && diff > 0 ? diff / this.xRatio : xDivision;\n        }\n        const cellFillOpacity = Array.isArray(w2.config.fill.opacity) ? (_a = w2.config.fill.opacity[0]) != null ? _a : 1 : (_b = w2.config.fill.opacity) != null ? _b : 1;\n        let y1 = 0;\n        let rev = false;\n        this.negRange = this.helpers.checkColorRange();\n        const heatSeries = series.slice();\n        if (w2.config.yaxis[0].reversed) {\n            rev = true;\n            heatSeries.reverse();\n        }\n        for(let i2 = rev ? 0 : heatSeries.length - 1; rev ? i2 < heatSeries.length : i2 >= 0; rev ? i2++ : i2--){\n            const elSeries = graphics.group({\n                class: `apexcharts-series apexcharts-heatmap-series`,\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[i2]),\n                rel: i2 + 1,\n                \"data:realIndex\": i2\n            });\n            $e4b487e979d7c06d$var$Series.addCollapsedClassToSeries(this.w, elSeries, i2);\n            if (!useCanvas) graphics.setupEventDelegation(elSeries, \".apexcharts-heatmap-rect\");\n            if (w2.config.chart.dropShadow.enabled) {\n                const shadow = w2.config.chart.dropShadow;\n                const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n                filters.dropShadow(elSeries, shadow, i2);\n            }\n            let x1 = 0;\n            const shadeIntensity = w2.config.plotOptions.heatmap.shadeIntensity;\n            let j = 0;\n            for(let dIndex = 0; dIndex < w2.globals.dataPoints; dIndex++){\n                if (!isContinuousX && w2.seriesData.seriesX.length && !w2.globals.allSeriesHasEqualX) {\n                    if (w2.globals.minX + w2.globals.minXDiff * dIndex < w2.seriesData.seriesX[i2][j]) {\n                        x1 = x1 + xDivision;\n                        continue;\n                    }\n                }\n                if (j >= heatSeries[i2].length) break;\n                const cellW = isContinuousX ? binPx : xDivision;\n                if (isContinuousX) {\n                    const xVal = w2.seriesData.seriesX[i2] ? w2.seriesData.seriesX[i2][j] : null;\n                    if (xVal == null || xVal !== xVal) {\n                        j++;\n                        continue;\n                    }\n                    x1 = (xVal - w2.globals.minX) / this.xRatio - binPx / 2;\n                }\n                const heatColor = this.helpers.getShadeColor(w2.config.chart.type, i2, j, this.negRange);\n                let color = heatColor.color;\n                const heatColorProps = heatColor.colorProps;\n                if (w2.config.fill.type === \"image\") {\n                    const fill = new $e4b487e979d7c06d$var$Fill(this.w);\n                    color = fill.fillPath({\n                        seriesNumber: i2,\n                        dataPointIndex: j,\n                        opacity: /** @type {any} */ w2.globals.hasNegs ? heatColorProps.percent < 0 ? 1 - (1 + heatColorProps.percent / 100) : shadeIntensity + heatColorProps.percent / 100 : heatColorProps.percent / 100,\n                        patternID: $e4b487e979d7c06d$var$Utils$1.randomId(),\n                        width: w2.config.fill.image.width ? w2.config.fill.image.width : cellW,\n                        height: w2.config.fill.image.height ? w2.config.fill.image.height : yDivision\n                    });\n                }\n                const radius = this.rectRadius;\n                const stroke = w2.config.plotOptions.heatmap.useFillColorAsStroke ? color : w2.globals.stroke.colors[0];\n                if (useCanvas) emit.drawRectCell(x1, y1, cellW, yDivision, {\n                    fill: color,\n                    fillOpacity: cellFillOpacity,\n                    stroke: stroke,\n                    strokeWidth: this.strokeWidth,\n                    radius: radius,\n                    seriesIndex: i2,\n                    dataPointIndex: j\n                });\n                else {\n                    const rect = graphics.drawRect(x1, y1, cellW, yDivision, radius);\n                    rect.attr({\n                        cx: x1,\n                        cy: y1\n                    });\n                    rect.node.classList.add(\"apexcharts-heatmap-rect\");\n                    elSeries.add(rect);\n                    rect.attr({\n                        fill: color,\n                        i: i2,\n                        index: i2,\n                        j: j,\n                        val: series[i2][j],\n                        \"stroke-width\": this.strokeWidth,\n                        stroke: stroke,\n                        color: color\n                    });\n                    if (w2.config.chart.animations.enabled && !w2.globals.dataChanged) {\n                        let speed = 1;\n                        if (!w2.globals.resized) speed = w2.config.chart.animations.speed;\n                        this.animateHeatMap(rect, x1, y1, cellW, yDivision, speed, i2, j);\n                    }\n                    if (w2.globals.dataChanged) {\n                        let speed = 1;\n                        if (this.dynamicAnim.enabled && w2.globals.shouldAnimate) {\n                            speed = this.dynamicAnim.speed;\n                            let colorFrom = w2.globals.previousPaths[i2] && w2.globals.previousPaths[i2][j] && w2.globals.previousPaths[i2][j].color;\n                            if (!colorFrom) colorFrom = \"rgba(255, 255, 255, 0)\";\n                            this.animateHeatColor(rect, $e4b487e979d7c06d$var$Utils$1.isColorHex(colorFrom) ? colorFrom : $e4b487e979d7c06d$var$Utils$1.rgb2hex(colorFrom), $e4b487e979d7c06d$var$Utils$1.isColorHex(color) ? color : $e4b487e979d7c06d$var$Utils$1.rgb2hex(color), speed);\n                        }\n                    }\n                }\n                const formatter = w2.config.dataLabels.formatter;\n                const formattedText = formatter(w2.seriesData.series[i2][j], {\n                    value: w2.seriesData.series[i2][j],\n                    seriesIndex: i2,\n                    dataPointIndex: j,\n                    w: w2\n                });\n                const dataLabels = this.helpers.calculateDataLabels({\n                    text: formattedText,\n                    x: x1 + cellW / 2,\n                    y: y1 + yDivision / 2,\n                    i: i2,\n                    j: j,\n                    colorProps: heatColorProps,\n                    series: heatSeries\n                });\n                if (dataLabels !== null) elSeries.add(dataLabels);\n                if (!isContinuousX) x1 = x1 + xDivision;\n                j++;\n            }\n            y1 = y1 + yDivision;\n            ret.add(elSeries);\n        }\n        const yAxisScale = /** @type {any[]} */ w2.globals.yAxisScale[0].result.slice();\n        if (w2.config.yaxis[0].reversed) yAxisScale.unshift(\"\");\n        else yAxisScale.push(\"\");\n        w2.globals.yAxisScale[0].result = yAxisScale;\n        return ret;\n    }\n    /**\n   * @param {any} el\n   * @param {number} x\n   * @param {number} y\n   * @param {number} width\n   * @param {number} height\n   * @param {number} speed\n   * @param {number} [row] - series index (heatmap row)\n   * @param {number} [col] - data point index (heatmap column)\n   */ animateHeatMap(el, x, y, width, height, speed, row = 0, col = 0) {\n        const w2 = this.w;\n        const animations = new $e4b487e979d7c06d$var$Animations(this.w);\n        const animCfg = w2.config.chart.animations;\n        const gradCfg = animCfg.animateGradually;\n        const staggerEnabled = gradCfg && gradCfg.enabled !== false;\n        let delay = 0;\n        if (staggerEnabled) {\n            const seriesCount = (w2.seriesData.series || []).length || 1;\n            const pointsCount = w2.globals.dataPoints || 1;\n            const maxDiag = seriesCount + pointsCount - 2;\n            const baseDelay = Math.min(gradCfg.delay || 0, speed * 0.5 / Math.max(1, maxDiag));\n            delay = $e4b487e979d7c06d$var$computeStagger({\n                style: \"diagonal\",\n                index: col,\n                row: row,\n                col: col,\n                baseDelay: baseDelay\n            });\n        }\n        animations.animateRect(el, {\n            x: x + width / 2,\n            y: y + height / 2,\n            width: 0,\n            height: 0\n        }, {\n            x: x,\n            y: y,\n            width: width,\n            height: height\n        }, speed, ()=>{\n            animations.animationCompleted(el);\n        }, delay);\n    }\n    /**\n   * @param {any} el\n   * @param {string} colorFrom\n   * @param {string} colorTo\n   * @param {number} speed\n   */ animateHeatColor(el, colorFrom, colorTo, speed) {\n        el.attr({\n            fill: colorFrom\n        }).animate(speed).attr({\n            fill: colorTo\n        });\n    }\n}\nclass $e4b487e979d7c06d$var$Helpers5 {\n    /**\n   * @param {import('../../../charts/Line').default} lineCtx\n   */ constructor(lineCtx){\n        this.w = lineCtx.w;\n        this.lineCtx = lineCtx;\n    }\n    /**\n   * @param {number} i\n   * @param {any[]} series\n   */ sameValueSeriesFix(i2, series) {\n        const w2 = this.w;\n        if (w2.config.fill.type === \"gradient\" || w2.config.fill.type[i2] === \"gradient\") {\n            const coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.lineCtx.w);\n            if (coreUtils.seriesHaveSameValues(i2)) {\n                const gSeries = series[i2].slice();\n                gSeries[gSeries.length - 1] = gSeries[gSeries.length - 1] + 1e-6;\n                series[i2] = gSeries;\n            }\n        }\n        return series;\n    }\n    /** @param {{series: any, realIndex: any, x: any, y: any, i: any, j: any, prevY: any}} opts */ calculatePoints({ series: series, realIndex: realIndex, x: x, y: y, i: i2, j: j, prevY: prevY }) {\n        const w2 = this.w;\n        const ptX = [];\n        const ptY = [];\n        let xPT1st = this.lineCtx.categoryAxisCorrection + w2.config.markers.offsetX;\n        if (w2.axisFlags.isXNumeric) xPT1st = (w2.seriesData.seriesX[realIndex][0] - w2.globals.minX) / this.lineCtx.xRatio + w2.config.markers.offsetX;\n        if (j === 0) {\n            ptX.push(xPT1st);\n            ptY.push($e4b487e979d7c06d$var$Utils$1.isNumber(series[i2][0]) ? prevY + w2.config.markers.offsetY : null);\n        }\n        ptX.push(x + w2.config.markers.offsetX);\n        ptY.push($e4b487e979d7c06d$var$Utils$1.isNumber(series[i2][j + 1]) ? y + w2.config.markers.offsetY : null);\n        return {\n            x: ptX,\n            y: ptY\n        };\n    }\n    /** @param {{pathFromLine: any, pathFromArea: any, realIndex: any}} opts */ checkPreviousPaths({ pathFromLine: pathFromLine, pathFromArea: pathFromArea, realIndex: realIndex }) {\n        const w2 = this.w;\n        for(let pp = 0; pp < w2.globals.previousPaths.length; pp++){\n            const gpp = w2.globals.previousPaths[pp];\n            if ((gpp.type === \"line\" || gpp.type === \"area\") && gpp.paths.length > 0 && parseInt(gpp.realIndex, 10) === parseInt(realIndex, 10)) {\n                if (gpp.type === \"line\") {\n                    this.lineCtx.appendPathFrom = false;\n                    pathFromLine = w2.globals.previousPaths[pp].paths[0].d;\n                } else if (gpp.type === \"area\") {\n                    this.lineCtx.appendPathFrom = false;\n                    pathFromArea = w2.globals.previousPaths[pp].paths[0].d;\n                    if (w2.config.stroke.show && w2.globals.previousPaths[pp].paths[1]) pathFromLine = w2.globals.previousPaths[pp].paths[1].d;\n                }\n            }\n        }\n        return {\n            pathFromLine: pathFromLine,\n            pathFromArea: pathFromArea\n        };\n    }\n    /** @param {{i: any, realIndex: any, series: any, prevY: any, lineYPosition: any, translationsIndex: any}} opts */ determineFirstPrevY({ i: i2, realIndex: realIndex, series: series, prevY: prevY, lineYPosition: lineYPosition, translationsIndex: translationsIndex }) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        const stackSeries = w2.config.chart.stacked && !w2.globals.comboCharts || w2.config.chart.stacked && w2.globals.comboCharts && (!this.w.config.chart.stackOnlyBar || /** @type {any} */ ((_a = this.w.config.series[realIndex]) == null ? void 0 : _a.type) === \"bar\" || /** @type {any} */ ((_b = this.w.config.series[realIndex]) == null ? void 0 : _b.type) === \"column\");\n        if (typeof ((_c = series[i2]) == null ? void 0 : _c[0]) !== \"undefined\") {\n            if (stackSeries) {\n                if (i2 > 0) lineYPosition = this.lineCtx.prevSeriesY[i2 - 1][0];\n                else lineYPosition = this.lineCtx.zeroY;\n            } else lineYPosition = this.lineCtx.zeroY;\n            prevY = lineYPosition - series[i2][0] / this.lineCtx.yRatio[translationsIndex] + (this.lineCtx.isReversed ? series[i2][0] / this.lineCtx.yRatio[translationsIndex] : 0) * 2;\n        } else if (stackSeries && i2 > 0 && typeof series[i2][0] === \"undefined\") {\n            for(let s2 = i2 - 1; s2 >= 0; s2--)if (series[s2][0] !== null && typeof series[s2][0] !== \"undefined\") {\n                lineYPosition = this.lineCtx.prevSeriesY[s2][0];\n                prevY = lineYPosition;\n                break;\n            }\n        }\n        return {\n            prevY: prevY,\n            lineYPosition: lineYPosition\n        };\n    }\n}\nclass $e4b487e979d7c06d$var$Line {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   * @param {import('../types/internal').XYRatios} xyRatios\n   * @param {boolean} isPointsChart\n   */ constructor(w2, ctx, xyRatios, isPointsChart){\n        this.ctx = ctx;\n        this.w = w2;\n        this.xyRatios = xyRatios;\n        this.xRatio = 0;\n        this.yRatio = [];\n        this.zRatio = 0;\n        this.baseLineY = [];\n        this.pointsChart = !(this.w.config.chart.type !== \"bubble\" && this.w.config.chart.type !== \"scatter\") || isPointsChart;\n        this.scatter = new $e4b487e979d7c06d$var$Scatter(this.w, this.ctx);\n        this.noNegatives = this.w.globals.minX === Number.MAX_VALUE;\n        this.lineHelpers = new $e4b487e979d7c06d$var$Helpers5(this);\n        this.markers = new $e4b487e979d7c06d$var$Markers(this.w, this.ctx);\n        this.prevSeriesY = [];\n        this.categoryAxisCorrection = 0;\n        this.yaxisIndex = 0;\n        this.xDivision = 0;\n        this.zeroY = 0;\n        this.areaBottomY = 0;\n        this.strokeWidth = 0;\n        this.isReversed = false;\n        this.appendPathFrom = false;\n        this.elSeries = null;\n        this.elPointsMain = null;\n        this.elDataLabelsWrap = null;\n        this._elLastPointsWrap = null;\n    }\n    /**\n   * @param {any[]} series\n   * @param {string} ctype\n   * @param {number} seriesIndex\n   * @param {any} seriesRangeEnd\n   */ draw(series, ctype, seriesIndex, seriesRangeEnd) {\n        var _a;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const type = w2.globals.comboCharts ? ctype : w2.config.chart.type;\n        const ret = graphics.group({\n            class: `apexcharts-${type}-series apexcharts-plot-series`\n        });\n        const coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n        this.yRatio = this.xyRatios.yRatio;\n        this.zRatio = this.xyRatios.zRatio;\n        this.xRatio = this.xyRatios.xRatio;\n        this.baseLineY = this.xyRatios.baseLineY;\n        series = coreUtils.getLogSeries(series);\n        this.yRatio = coreUtils.getLogYRatios(this.yRatio);\n        this.prevSeriesY = [];\n        const allSeries = [];\n        for(let i2 = 0; i2 < series.length; i2++){\n            series = this.lineHelpers.sameValueSeriesFix(i2, series);\n            const realIndex = w2.globals.comboCharts ? /** @type {any} */ seriesIndex[i2] : i2;\n            const translationsIndex = this.yRatio.length > 1 ? realIndex : 0;\n            this._initSerieVariables(series, i2, realIndex);\n            const yArrj = [];\n            const y2Arrj = [];\n            const xArrj = [];\n            let x = w2.globals.padHorizontal + this.categoryAxisCorrection;\n            const y = 1;\n            const linePaths = [];\n            const areaPaths = [];\n            $e4b487e979d7c06d$var$Series.addCollapsedClassToSeries(this.w, this.elSeries, realIndex);\n            if (w2.axisFlags.isXNumeric && w2.seriesData.seriesX.length > 0) x = (w2.seriesData.seriesX[realIndex][0] - w2.globals.minX) / this.xRatio;\n            xArrj.push(x);\n            const pX = x;\n            let pY2;\n            const prevX = pX;\n            let prevY = this.zeroY;\n            let prevY2 = this.zeroY;\n            const lineYPosition = 0;\n            const firstPrevY = this.lineHelpers.determineFirstPrevY({\n                i: i2,\n                realIndex: realIndex,\n                series: series,\n                prevY: prevY,\n                lineYPosition: lineYPosition,\n                translationsIndex: translationsIndex\n            });\n            prevY = firstPrevY.prevY;\n            if (w2.config.stroke.curve === \"monotoneCubic\" && series[i2][0] === null) yArrj.push(null);\n            else yArrj.push(prevY);\n            const pY = prevY;\n            let firstPrevY2;\n            if (type === \"rangeArea\") {\n                firstPrevY2 = this.lineHelpers.determineFirstPrevY({\n                    i: i2,\n                    realIndex: realIndex,\n                    series: seriesRangeEnd,\n                    prevY: prevY2,\n                    lineYPosition: lineYPosition,\n                    translationsIndex: translationsIndex\n                });\n                prevY2 = firstPrevY2.prevY;\n                pY2 = prevY2;\n                y2Arrj.push(yArrj[0] !== null ? prevY2 : null);\n            }\n            const pathsFrom = this._calculatePathsFrom({\n                type: type,\n                series: series,\n                i: i2,\n                realIndex: realIndex,\n                translationsIndex: translationsIndex,\n                prevX: prevX,\n                prevY: prevY,\n                prevY2: prevY2\n            });\n            const rYArrj = [\n                yArrj[0]\n            ];\n            const rY2Arrj = [\n                y2Arrj[0]\n            ];\n            const iteratingOpts = {\n                type: type,\n                series: series,\n                realIndex: realIndex,\n                translationsIndex: translationsIndex,\n                i: i2,\n                x: x,\n                y: y,\n                pX: pX,\n                pY: pY,\n                pathsFrom: pathsFrom,\n                linePaths: linePaths,\n                areaPaths: areaPaths,\n                seriesIndex: seriesIndex,\n                lineYPosition: lineYPosition,\n                xArrj: xArrj,\n                yArrj: yArrj,\n                y2Arrj: y2Arrj,\n                seriesRangeEnd: seriesRangeEnd\n            };\n            const paths = this._iterateOverDataPoints($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, iteratingOpts), {\n                iterations: type === \"rangeArea\" ? series[i2].length - 1 : void 0,\n                isRangeStart: true\n            }));\n            if (type === \"rangeArea\") {\n                const pathsFrom2 = this._calculatePathsFrom({\n                    series: seriesRangeEnd,\n                    i: i2,\n                    realIndex: realIndex,\n                    prevX: prevX,\n                    prevY: prevY2\n                });\n                const rangePaths = this._iterateOverDataPoints($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, iteratingOpts), {\n                    series: seriesRangeEnd,\n                    xArrj: [\n                        x\n                    ],\n                    yArrj: rYArrj,\n                    y2Arrj: rY2Arrj,\n                    pY: pY2,\n                    areaPaths: paths.areaPaths,\n                    pathsFrom: pathsFrom2,\n                    iterations: seriesRangeEnd[i2].length - 1,\n                    isRangeStart: false\n                }));\n                const segments = paths.linePaths.length / 2;\n                for(let s2 = 0; s2 < segments; s2++)paths.linePaths[s2] = rangePaths.linePaths[s2 + segments] + paths.linePaths[s2];\n                paths.linePaths.splice(segments);\n                paths.pathFromLine = rangePaths.pathFromLine + paths.pathFromLine;\n            } else if (!/z\\s*$/i.test(paths.pathFromArea)) paths.pathFromArea += \"z\";\n            this._handlePaths({\n                type: type,\n                realIndex: realIndex,\n                i: i2,\n                paths: paths\n            });\n            this.elSeries.add(this.elPointsMain);\n            this.elSeries.add(this.elDataLabelsWrap);\n            allSeries.push(this.elSeries);\n        }\n        if (typeof /** @type {Record<string,any>} */ ((_a = w2.config.series[0]) == null ? void 0 : _a.zIndex) !== \"undefined\") allSeries.sort((a2, b2)=>Number(a2.node.getAttribute(\"zIndex\")) - Number(b2.node.getAttribute(\"zIndex\")));\n        if (w2.config.chart.stacked) for(let s2 = allSeries.length - 1; s2 >= 0; s2--)ret.add(allSeries[s2]);\n        else for(let s2 = 0; s2 < allSeries.length; s2++)ret.add(allSeries[s2]);\n        return ret;\n    }\n    /**\n   * @param {any[]} series\n   * @param {number} i\n   * @param {number} realIndex\n   */ _initSerieVariables(series, i2, realIndex) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        this.xDivision = w2.layout.gridWidth / (w2.globals.dataPoints - (w2.config.xaxis.tickPlacement === \"on\" ? 1 : 0));\n        this.strokeWidth = Array.isArray(w2.config.stroke.width) ? w2.config.stroke.width[realIndex] : w2.config.stroke.width;\n        let translationsIndex = 0;\n        if (this.yRatio.length > 1) {\n            this.yaxisIndex = w2.globals.seriesYAxisReverseMap[realIndex];\n            translationsIndex = realIndex;\n        }\n        this.isReversed = w2.config.yaxis[this.yaxisIndex] && w2.config.yaxis[this.yaxisIndex].reversed;\n        this.zeroY = w2.layout.gridHeight - this.baseLineY[translationsIndex] - (this.isReversed ? w2.layout.gridHeight : 0) + (this.isReversed ? this.baseLineY[translationsIndex] * 2 : 0);\n        this.areaBottomY = this.zeroY;\n        if (this.zeroY > w2.layout.gridHeight || w2.config.plotOptions.area.fillTo === \"end\") this.areaBottomY = w2.layout.gridHeight;\n        this.categoryAxisCorrection = this.xDivision / 2;\n        const seriesItem = /** @type {Record<string,any>} */ w2.config.series[realIndex];\n        this.elSeries = graphics.group({\n            class: `apexcharts-series`,\n            zIndex: typeof seriesItem.zIndex !== \"undefined\" ? seriesItem.zIndex : realIndex,\n            seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[realIndex])\n        });\n        this.elPointsMain = graphics.group({\n            class: \"apexcharts-series-markers-wrap\",\n            \"data:realIndex\": realIndex\n        });\n        this.markers.resetSeriesWrapCache();\n        this._elLastPointsWrap = null;\n        if (w2.globals.hasNullValues) {\n            const firstPoint = this.markers.plotChartMarkers({\n                pointsPos: {\n                    x: [\n                        0\n                    ],\n                    y: [\n                        w2.layout.gridHeight + w2.globals.markers.largestSize\n                    ]\n                },\n                seriesIndex: i2,\n                j: 0,\n                pSize: 0.1,\n                alwaysDrawMarker: true,\n                isVirtualPoint: true\n            });\n            if (firstPoint !== null) this.elPointsMain.add(firstPoint);\n        }\n        this.elDataLabelsWrap = graphics.group({\n            class: \"apexcharts-datalabels\",\n            \"data:realIndex\": realIndex\n        });\n        const longestSeries = series[i2].length === w2.globals.dataPoints;\n        this.elSeries.attr({\n            \"data:longestSeries\": longestSeries,\n            rel: i2 + 1,\n            \"data:realIndex\": realIndex\n        });\n        this.appendPathFrom = true;\n    }\n    /** @param {{ type?: any, series?: any, i?: any, realIndex?: any, translationsIndex?: any, prevX?: any, prevY?: any, prevY2?: any }} opts */ _calculatePathsFrom({ type: type, series: series, i: i2, realIndex: realIndex, translationsIndex: translationsIndex, prevX: prevX, prevY: prevY, prevY2: prevY2 }) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        let linePath, areaPath, pathFromLine, pathFromArea;\n        if (series[i2][0] === null) {\n            for(let s2 = 0; s2 < series[i2].length; s2++)if (series[i2][s2] !== null) {\n                prevX = this.xDivision * s2;\n                prevY = this.zeroY - series[i2][s2] / this.yRatio[translationsIndex];\n                linePath = graphics.move(prevX, prevY);\n                areaPath = graphics.move(prevX, this.areaBottomY);\n                break;\n            }\n        } else {\n            linePath = graphics.move(prevX, prevY);\n            if (type === \"rangeArea\") linePath = graphics.move(prevX, prevY2) + graphics.line(prevX, prevY);\n            areaPath = graphics.move(prevX, this.areaBottomY) + graphics.line(prevX, prevY);\n        }\n        pathFromLine = graphics.move(0, this.areaBottomY) + graphics.line(0, this.areaBottomY);\n        pathFromArea = graphics.move(0, this.areaBottomY) + graphics.line(0, this.areaBottomY);\n        if (w2.globals.previousPaths.length > 0) {\n            const pathFrom = this.lineHelpers.checkPreviousPaths({\n                pathFromLine: pathFromLine,\n                pathFromArea: pathFromArea,\n                realIndex: realIndex\n            });\n            pathFromLine = pathFrom.pathFromLine;\n            pathFromArea = pathFrom.pathFromArea;\n        }\n        return {\n            prevX: prevX,\n            prevY: prevY,\n            linePath: linePath,\n            areaPath: areaPath,\n            pathFromLine: pathFromLine,\n            pathFromArea: pathFromArea\n        };\n    }\n    /** @param {{type: any, realIndex: any, i: any, paths: any}} opts */ _handlePaths({ type: type, realIndex: realIndex, i: i2, paths: paths }) {\n        var _a, _b, _c, _d, _e, _f, _g;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const emit = $e4b487e979d7c06d$var$seriesEmitter(this.ctx, graphics);\n        const fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        this.prevSeriesY.push(paths.yArrj);\n        let streamScroll = null;\n        if ((type === \"line\" || type === \"area\") && w2.globals.dataChanged) streamScroll = $e4b487e979d7c06d$var$detectStreamScroll(w2, realIndex, paths.xArrj, paths.yArrj);\n        let reconcile = null;\n        if (!streamScroll && (type === \"line\" || type === \"area\")) reconcile = $e4b487e979d7c06d$var$reconcileSeriesPaths(w2, {\n            type: type,\n            realIndex: realIndex,\n            pathFromLine: paths.pathFromLine,\n            pathFromArea: paths.pathFromArea,\n            linePaths: paths.linePaths,\n            areaPaths: paths.areaPaths\n        });\n        w2.globals.seriesXvalues[realIndex] = paths.xArrj;\n        w2.globals.seriesYvalues[realIndex] = paths.yArrj;\n        const forecast = w2.config.forecastDataPoints;\n        if (forecast.count > 0 && type !== \"rangeArea\") {\n            const forecastCutoff = w2.globals.seriesXvalues[realIndex][w2.globals.seriesXvalues[realIndex].length - forecast.count - 1];\n            const elForecastMask = graphics.drawRect(forecastCutoff, 0, w2.layout.gridWidth, w2.layout.gridHeight, 0);\n            w2.dom.elForecastMask.appendChild(elForecastMask.node);\n            const elNonForecastMask = graphics.drawRect(0, 0, forecastCutoff, w2.layout.gridHeight, 0);\n            w2.dom.elNonForecastMask.appendChild(elNonForecastMask.node);\n        }\n        if (!this.pointsChart) {\n            w2.globals.delayedElements.push({\n                el: this.elPointsMain.node,\n                index: realIndex\n            });\n            $e4b487e979d7c06d$var$tweenSeriesMarkers(w2, {\n                elPointsMain: this.elPointsMain,\n                realIndex: realIndex,\n                speed: w2.config.chart.animations.dynamicAnimation.speed\n            });\n            if ($e4b487e979d7c06d$var$seriesJoin(w2, realIndex) && ((_a = this.elDataLabelsWrap) == null ? void 0 : _a.node)) {\n                this.elDataLabelsWrap.node.classList.add(\"apexcharts-element-hidden\");\n                w2.globals.delayedElements.push({\n                    el: this.elDataLabelsWrap.node,\n                    holdUntilComplete: true\n                });\n            }\n        } else $e4b487e979d7c06d$var$tweenSeriesMarkers(w2, {\n            elPointsMain: this.elPointsMain,\n            realIndex: realIndex,\n            speed: w2.config.chart.animations.dynamicAnimation.speed\n        });\n        const defaultRenderedPathOptions = {\n            i: i2,\n            realIndex: realIndex,\n            animationDelay: i2,\n            initialSpeed: w2.config.chart.animations.speed,\n            dataChangeSpeed: w2.config.chart.animations.dynamicAnimation.speed,\n            className: `apexcharts-${type}`\n        };\n        const numericXY = paths.numericXY;\n        if (type === \"area\") {\n            const pathFill = fill.fillPath({\n                seriesNumber: realIndex\n            });\n            for(let p2 = 0; p2 < paths.areaPaths.length; p2++){\n                const renderedPath = emit.renderPaths($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, defaultRenderedPathOptions), {\n                    pathFrom: streamScroll ? $e4b487e979d7c06d$var$projectPathToPrevFrame(paths.areaPaths[p2], streamScroll) : (_c = (_b = reconcile == null ? void 0 : reconcile.area) == null ? void 0 : _b.from) != null ? _c : paths.pathFromArea,\n                    pathTo: paths.areaPaths[p2],\n                    pathToNumeric: numericXY ? {\n                        xs: numericXY.xs,\n                        ys: numericXY.ys,\n                        closeY: numericXY.areaCloseY\n                    } : void 0,\n                    pathToInterp: (_d = reconcile == null ? void 0 : reconcile.area) == null ? void 0 : _d.toInterp,\n                    scrollMorph: !!streamScroll,\n                    stroke: \"none\",\n                    strokeWidth: 0,\n                    strokeLineCap: null,\n                    fill: pathFill\n                }));\n                this.elSeries.add(renderedPath);\n            }\n        }\n        if (w2.config.stroke.show && !this.pointsChart) {\n            let lineFill = null;\n            if (type === \"line\") lineFill = fill.fillPath({\n                seriesNumber: realIndex,\n                i: i2\n            });\n            else if (w2.config.stroke.fill.type === \"solid\") lineFill = w2.globals.stroke.colors[realIndex];\n            else {\n                const prevFill = w2.config.fill;\n                w2.config.fill = w2.config.stroke.fill;\n                lineFill = fill.fillPath({\n                    seriesNumber: realIndex,\n                    i: i2\n                });\n                w2.config.fill = prevFill;\n            }\n            for(let p2 = 0; p2 < paths.linePaths.length; p2++){\n                let pathFill = lineFill;\n                if (type === \"rangeArea\") pathFill = fill.fillPath({\n                    seriesNumber: realIndex\n                });\n                const linePathCommonOpts = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, defaultRenderedPathOptions), {\n                    pathFrom: streamScroll ? $e4b487e979d7c06d$var$projectPathToPrevFrame(paths.linePaths[p2], streamScroll) : (_f = (_e = reconcile == null ? void 0 : reconcile.line) == null ? void 0 : _e.from) != null ? _f : paths.pathFromLine,\n                    pathTo: paths.linePaths[p2],\n                    pathToNumeric: numericXY ? {\n                        xs: numericXY.xs,\n                        ys: numericXY.ys\n                    } : void 0,\n                    pathToInterp: (_g = reconcile == null ? void 0 : reconcile.line) == null ? void 0 : _g.toInterp,\n                    scrollMorph: !!streamScroll,\n                    stroke: lineFill,\n                    strokeWidth: this.strokeWidth,\n                    strokeLineCap: w2.config.stroke.lineCap,\n                    fill: type === \"rangeArea\" ? pathFill : \"none\"\n                });\n                const renderedPath = emit.renderPaths(linePathCommonOpts);\n                this.elSeries.add(renderedPath);\n                renderedPath.attr(\"fill-rule\", `evenodd`);\n                if (forecast.count > 0 && type !== \"rangeArea\") {\n                    const renderedForecastPath = emit.renderPaths(linePathCommonOpts);\n                    renderedForecastPath.node.setAttribute(\"stroke-dasharray\", forecast.dashArray);\n                    if (forecast.strokeWidth) renderedForecastPath.node.setAttribute(\"stroke-width\", forecast.strokeWidth);\n                    this.elSeries.add(renderedForecastPath);\n                    renderedForecastPath.attr(\"clip-path\", `url(#forecastMask${w2.globals.cuid})`);\n                    renderedPath.attr(\"clip-path\", `url(#nonForecastMask${w2.globals.cuid})`);\n                }\n            }\n        }\n    }\n    _iterateOverDataPoints({ type: type, series: series, iterations: iterations, realIndex: realIndex, translationsIndex: translationsIndex, i: i2, x: x, y: y, pX: pX, pY: pY, pathsFrom: pathsFrom, linePaths: linePaths, areaPaths: areaPaths, seriesIndex: seriesIndex, lineYPosition: lineYPosition, xArrj: xArrj, yArrj: yArrj, y2Arrj: y2Arrj, isRangeStart: isRangeStart, seriesRangeEnd: seriesRangeEnd }) {\n        var _a, _b;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const yRatio = this.yRatio;\n        let { prevY: prevY, linePath: linePath, areaPath: areaPath, pathFromLine: pathFromLine, pathFromArea: pathFromArea } = pathsFrom;\n        const minY = $e4b487e979d7c06d$var$Utils$1.isNumber(w2.globals.minYArr[realIndex]) ? w2.globals.minYArr[realIndex] : w2.globals.minY;\n        if (!iterations) iterations = w2.globals.dataPoints > 1 ? w2.globals.dataPoints - 1 : w2.globals.dataPoints;\n        const getY = (_y, lineYPos)=>{\n            return lineYPos - _y / yRatio[translationsIndex] + (this.isReversed ? _y / yRatio[translationsIndex] : 0) * 2;\n        };\n        let y2 = y;\n        const stackSeries = w2.config.chart.stacked && !w2.globals.comboCharts || w2.config.chart.stacked && w2.globals.comboCharts && (!this.w.config.chart.stackOnlyBar || /** @type {Record<string,any>} */ ((_a = this.w.config.series[realIndex]) == null ? void 0 : _a.type) === \"bar\" || /** @type {Record<string,any>} */ ((_b = this.w.config.series[realIndex]) == null ? void 0 : _b.type) === \"column\");\n        let curve = w2.config.stroke.curve;\n        if (Array.isArray(curve)) {\n            if (Array.isArray(seriesIndex)) curve = curve[seriesIndex[i2]];\n            else curve = curve[i2];\n        }\n        let pathState = 0;\n        let segmentStartX;\n        const jitterPx = this.pointsChart ? this._scatterJitterPx(realIndex) : null;\n        if (curve === \"straight\" && !this.pointsChart) {\n            const fast = this._fastStraightPath({\n                type: type,\n                series: series,\n                i: i2,\n                realIndex: realIndex,\n                translationsIndex: translationsIndex,\n                iterations: iterations,\n                x: x,\n                y: y,\n                pX: pX,\n                pY: pY,\n                pathsFrom: pathsFrom,\n                linePaths: linePaths,\n                areaPaths: areaPaths,\n                xArrj: xArrj,\n                yArrj: yArrj,\n                y2Arrj: y2Arrj,\n                stackSeries: stackSeries\n            });\n            if (fast) return fast;\n        }\n        for(let j = 0; j < iterations; j++){\n            if (series[i2].length === 0) break;\n            const isNull = typeof series[i2][j + 1] === \"undefined\" || series[i2][j + 1] === null;\n            if (w2.axisFlags.isXNumeric) {\n                let sX = w2.seriesData.seriesX[realIndex][j + 1];\n                if (typeof w2.seriesData.seriesX[realIndex][j + 1] === \"undefined\") sX = w2.seriesData.seriesX[realIndex][iterations - 1];\n                x = (sX - w2.globals.minX) / this.xRatio;\n            } else x = x + this.xDivision;\n            if (stackSeries) {\n                if (i2 > 0 && w2.globals.collapsedSeries.length < w2.config.series.length - 1) {\n                    const prevIndex = (pi)=>{\n                        var _a2;\n                        for(let pii = pi; pii >= 0; pii--){\n                            const ri = (_a2 = seriesIndex == null ? void 0 : seriesIndex[pii]) != null ? _a2 : pii;\n                            if (w2.globals.collapsedSeriesIndices.indexOf(ri) === -1 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(ri) === -1) return pii;\n                        }\n                        return -1;\n                    };\n                    const pIdx = prevIndex(i2 - 1);\n                    lineYPosition = pIdx < 0 ? this.zeroY : this.prevSeriesY[pIdx][j + 1];\n                } else lineYPosition = this.zeroY;\n            } else lineYPosition = this.zeroY;\n            if (isNull) y = getY(minY, lineYPosition);\n            else {\n                y = getY(series[i2][j + 1], lineYPosition);\n                if (type === \"rangeArea\") y2 = getY(seriesRangeEnd[i2][j + 1], lineYPosition);\n            }\n            let xj = x;\n            let yj = y;\n            if (jitterPx) {\n                const seed = realIndex * 100003 + (j + 1);\n                if (jitterPx.x) xj = x + ($e4b487e979d7c06d$var$hash01(seed * 7919 + 13) - 0.5) * 2 * jitterPx.x;\n                if (jitterPx.y) yj = y + ($e4b487e979d7c06d$var$hash01(seed * 6271 + 97) - 0.5) * 2 * jitterPx.y;\n            }\n            xArrj.push(series[i2][j + 1] === null ? null : xj);\n            if (isNull && (w2.config.stroke.curve === \"smooth\" || w2.config.stroke.curve === \"monotoneCubic\")) {\n                yArrj.push(null);\n                y2Arrj.push(null);\n            } else {\n                yArrj.push(yj);\n                y2Arrj.push(y2);\n            }\n            const pointsPos = this.lineHelpers.calculatePoints({\n                series: series,\n                x: xj,\n                y: yj,\n                realIndex: realIndex,\n                i: i2,\n                j: j,\n                prevY: prevY\n            });\n            const calculatedPaths = this._createPaths({\n                type: type,\n                series: series,\n                i: i2,\n                j: j,\n                x: x,\n                y: y,\n                y2: y2,\n                xArrj: xArrj,\n                yArrj: yArrj,\n                y2Arrj: y2Arrj,\n                pX: pX,\n                pY: pY,\n                pathState: pathState,\n                segmentStartX: segmentStartX,\n                linePath: linePath,\n                areaPath: areaPath,\n                linePaths: linePaths,\n                areaPaths: areaPaths,\n                curve: curve,\n                isRangeStart: isRangeStart\n            });\n            areaPaths = calculatedPaths.areaPaths;\n            linePaths = calculatedPaths.linePaths;\n            pX = calculatedPaths.pX;\n            pY = calculatedPaths.pY;\n            pathState = calculatedPaths.pathState;\n            segmentStartX = calculatedPaths.segmentStartX;\n            areaPath = calculatedPaths.areaPath;\n            linePath = calculatedPaths.linePath;\n            if (this.appendPathFrom && !w2.globals.hasNullValues && !(curve === \"monotoneCubic\" && type === \"rangeArea\")) {\n                pathFromLine += graphics.line(x, this.areaBottomY);\n                pathFromArea += graphics.line(x, this.areaBottomY);\n            }\n            this.handleNullDataPoints(series, pointsPos, i2, j, realIndex);\n            this._handleMarkersAndLabels({\n                type: type,\n                pointsPos: pointsPos,\n                i: i2,\n                j: j,\n                realIndex: realIndex,\n                isRangeStart: isRangeStart\n            });\n        }\n        return {\n            yArrj: yArrj,\n            xArrj: xArrj,\n            pathFromArea: pathFromArea,\n            areaPaths: areaPaths,\n            pathFromLine: pathFromLine,\n            linePaths: linePaths,\n            linePath: linePath,\n            areaPath: areaPath\n        };\n    }\n    /** @param {{type: any, pointsPos: any, isRangeStart: any, i: any, j: any, realIndex: any}} opts */ _handleMarkersAndLabels({ type: type, pointsPos: pointsPos, isRangeStart: isRangeStart, i: i2, j: j, realIndex: realIndex }) {\n        const w2 = this.w;\n        const dataLabels = new $e4b487e979d7c06d$var$DataLabels(this.w, this.ctx);\n        if (!this.pointsChart) {\n            const useProgressive = !w2.globals.dataChanged && !w2.globals.resized;\n            if (!useProgressive && w2.seriesData.series[i2].length > 1) this.elPointsMain.node.classList.add(\"apexcharts-element-hidden\");\n            const elPointsWrap = this.markers.plotChartMarkers({\n                pointsPos: pointsPos,\n                seriesIndex: realIndex,\n                j: j + 1\n            });\n            if (elPointsWrap !== null && elPointsWrap !== this._elLastPointsWrap) {\n                this.elPointsMain.add(elPointsWrap);\n                this._elLastPointsWrap = elPointsWrap;\n            }\n        } else this.scatter.draw(this.elSeries, j, {\n            realIndex: realIndex,\n            pointsPos: pointsPos,\n            zRatio: this.zRatio,\n            elParent: this.elPointsMain\n        });\n        const drawnLabels = dataLabels.drawDataLabel({\n            type: type,\n            isRangeStart: isRangeStart,\n            pos: pointsPos,\n            i: realIndex,\n            j: j + 1\n        });\n        if (drawnLabels !== null) this.elDataLabelsWrap.add(drawnLabels);\n    }\n    /**\n   * Max scatter-jitter offsets in pixels for this series, or null when jitter is\n   * off. The config offsets are in axis units (x: 1 = one category step / x-data\n   * unit, y: 1 = one y-data unit); convert each to pixels using the chart's\n   * ratios. The actual per-point offset is a deterministic fraction of these\n   * (see Scatter.drawPoint).\n   * @param {number} realIndex\n   * @returns {{ x: number, y: number } | null}\n   */ _scatterJitterPx(realIndex) {\n        var _a;\n        const w2 = this.w;\n        const jt = (_a = w2.config.plotOptions.scatter) == null ? void 0 : _a.jitter;\n        if (!jt || !jt.enabled || !jt.x && !jt.y) return null;\n        const xUnitPx = w2.axisFlags.isXNumeric && this.xRatio ? 1 / this.xRatio : this.xDivision;\n        const ti = this.yRatio.length > 1 ? realIndex : 0;\n        const yUnitPx = this.yRatio[ti] ? 1 / this.yRatio[ti] : 0;\n        return {\n            x: (jt.x || 0) * xUnitPx,\n            y: (jt.y || 0) * yUnitPx\n        };\n    }\n    /**\n   * Numeric geometry fast path for plain straight line/area series (the\n   * render-2026 perf work). Eligibility is strict: everything the per-point\n   * slow loop can do beyond plain geometry (null gaps, markers, data labels,\n   * discrete markers, stacking, combos, range areas) bails to the state\n   * machine. When eligible it produces the SAME outputs as the slow loop\n   * (byte-identical d strings via join, the same xArrj/yArrj/y2Arrj\n   * pushes, and the same pointsArray tooltip cache) in one tight loop.\n   * In canvas mode it additionally emits typed-array coordinates so the\n   * renderer can paint via moveTo/lineTo without a Path2D d-string parse.\n   *\n   * @param {{type: any, series: any, i: number, realIndex: number,\n   *   translationsIndex: number, iterations: number, x: number, y: number,\n   *   pX: number, pY: number, pathsFrom: any, linePaths: any[],\n   *   areaPaths: any[], xArrj: any[], yArrj: any[], y2Arrj: any[],\n   *   stackSeries: boolean}} opts\n   * @returns {any} the _iterateOverDataPoints result, or null when ineligible\n   */ _fastStraightPath({ type: type, series: series, i: i2, realIndex: realIndex, translationsIndex: translationsIndex, iterations: iterations, x: x, y: y, pX: pX, pY: pY, pathsFrom: pathsFrom, linePaths: linePaths, areaPaths: areaPaths, xArrj: xArrj, yArrj: yArrj, y2Arrj: y2Arrj, stackSeries: stackSeries }) {\n        const w2 = this.w;\n        if (type !== \"line\" && type !== \"area\") return null;\n        if (w2.globals.comboCharts || stackSeries) return null;\n        if (w2.config.dataLabels.enabled) return null;\n        if (w2.config.markers.discrete.length) return null;\n        if (w2.globals.markers.size[realIndex] > 0) return null;\n        const s2 = series[i2];\n        const n2 = s2.length;\n        if (!iterations || n2 < 2 || n2 - 1 !== iterations) return null;\n        for(let k = 0; k <= iterations; k++){\n            const v2 = s2[k];\n            if (v2 === null || typeof v2 === \"undefined\") return null;\n        }\n        const isXNumeric = w2.axisFlags.isXNumeric;\n        const sx = isXNumeric ? w2.seriesData.seriesX[realIndex] : null;\n        if (isXNumeric && (!sx || sx.length < n2)) return null;\n        const yR = this.yRatio[translationsIndex];\n        const isReversed = this.isReversed;\n        const zeroY = this.zeroY;\n        const bottomY = this.areaBottomY;\n        const xRatio = this.xRatio;\n        const minX = w2.globals.minX;\n        const xDivision = this.xDivision;\n        const offX = w2.config.markers.offsetX;\n        const offY = w2.config.markers.offsetY;\n        const appendFrom = this.appendPathFrom && !w2.globals.hasNullValues;\n        let { pathFromLine: pathFromLine, pathFromArea: pathFromArea } = pathsFrom;\n        const r2 = this.ctx && this.ctx.renderer;\n        const canvasMode = !!(r2 && r2.kind && r2.kind !== \"svg\");\n        const buildStrings = !canvasMode || w2.globals.dataChanged && !!w2.globals.prevStreamFrame;\n        const nxs = canvasMode ? new Float64Array(n2) : null;\n        const nys = canvasMode ? new Float64Array(n2) : null;\n        if (nxs && nys) {\n            nxs[0] = pX;\n            nys[0] = pY;\n        }\n        if (typeof w2.globals.pointsArray[realIndex] === \"undefined\") w2.globals.pointsArray[realIndex] = [];\n        const pts = w2.globals.pointsArray[realIndex];\n        const xPT1st = sx ? (sx[0] - minX) / xRatio + offX : this.categoryAxisCorrection + offX;\n        pts.push([\n            xPT1st,\n            pathsFrom.prevY + offY\n        ]);\n        const parts = buildStrings ? new Array(iterations + 1) : [];\n        if (buildStrings) parts[0] = \"M \" + pX + \" \" + pY;\n        const fromParts = buildStrings && appendFrom ? new Array(iterations) : null;\n        let xv = x;\n        let xj = pX;\n        let yj = pY;\n        for(let j = 0; j < iterations; j++){\n            if (sx) xj = (sx[j + 1] - minX) / xRatio;\n            else {\n                xv = xv + xDivision;\n                xj = xv;\n            }\n            const v2 = s2[j + 1];\n            yj = zeroY - v2 / yR + (isReversed ? v2 / yR : 0) * 2;\n            xArrj.push(xj);\n            yArrj.push(yj);\n            y2Arrj.push(y);\n            pts.push([\n                xj + offX,\n                yj + offY\n            ]);\n            if (buildStrings) {\n                parts[j + 1] = \" L \" + xj + \" \" + yj;\n                if (fromParts) fromParts[j] = \" L \" + xj + \" \" + bottomY;\n            }\n            if (nxs && nys) {\n                nxs[j + 1] = xj;\n                nys[j + 1] = yj;\n            }\n        }\n        let linePath = \"\";\n        let areaPath = \"\";\n        if (buildStrings) {\n            linePath = parts.join(\"\");\n            areaPath = linePath + \" L \" + xj + \" \" + bottomY + \" L \" + pX + \" \" + bottomY + \"z\";\n        }\n        if (fromParts) {\n            const fromAppend = fromParts.join(\"\");\n            pathFromLine += fromAppend;\n            pathFromArea += fromAppend;\n        } else if (!buildStrings && appendFrom) {\n            pathFromLine += \" L \" + xj + \" \" + bottomY;\n            pathFromArea += \" L \" + xj + \" \" + bottomY;\n        }\n        linePaths.push(linePath);\n        areaPaths.push(areaPath);\n        return {\n            yArrj: yArrj,\n            xArrj: xArrj,\n            pathFromArea: pathFromArea,\n            areaPaths: areaPaths,\n            pathFromLine: pathFromLine,\n            linePaths: linePaths,\n            linePath: linePath,\n            areaPath: areaPath,\n            numericXY: nxs ? {\n                xs: nxs,\n                ys: nys,\n                areaCloseY: bottomY\n            } : void 0\n        };\n    }\n    /** @param {{type: any, series: any, i: any, j: any, x: any, y: any, xArrj: any, yArrj: any, y2: any, y2Arrj: any, pX: any, pY: any, pathState: any, segmentStartX: any, linePath: any, areaPath: any, linePaths: any, areaPaths: any, curve: any, isRangeStart: any}} opts */ _createPaths({ type: type, series: series, i: i2, j: j, x: x, y: y, xArrj: xArrj, yArrj: yArrj, y2: y2, y2Arrj: y2Arrj, pX: pX, pY: pY, pathState: pathState, segmentStartX: segmentStartX, linePath: linePath, areaPath: areaPath, linePaths: linePaths, areaPaths: areaPaths, curve: curve, isRangeStart: isRangeStart }) {\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const areaBottomY = this.areaBottomY;\n        const rangeArea = type === \"rangeArea\";\n        const isLowerRangeAreaPath = type === \"rangeArea\" && isRangeStart;\n        switch(curve){\n            case \"monotoneCubic\":\n                {\n                    const yAj = isRangeStart ? yArrj : y2Arrj;\n                    const getSmoothInputs = (xArr, yArr)=>{\n                        return xArr.map((_, i3)=>{\n                            return [\n                                _,\n                                yArr[i3]\n                            ];\n                        }).filter((_)=>_[1] !== null);\n                    };\n                    const getSegmentLengths = (yArr)=>{\n                        const segLens = [];\n                        let count = 0;\n                        yArr.forEach((_)=>{\n                            if (_ !== null) count++;\n                            else if (count > 0) {\n                                segLens.push(count);\n                                count = 0;\n                            }\n                        });\n                        if (count > 0) segLens.push(count);\n                        return segLens;\n                    };\n                    const getSegments = (yArr, points)=>{\n                        const segLens = getSegmentLengths(yArr);\n                        const segments = [];\n                        for(let i3 = 0, len = 0; i3 < segLens.length; len += segLens[i3++])segments[i3] = $e4b487e979d7c06d$var$spline.slice(points, len, len + segLens[i3]);\n                        return segments;\n                    };\n                    switch(pathState){\n                        case 0:\n                            if (yAj[j + 1] === null) break;\n                            pathState = 1;\n                        // falls through\n                        case 1:\n                            if (!(rangeArea ? xArrj.length === series[i2].length : j === series[i2].length - 2)) break;\n                        // falls through\n                        case 2:\n                            {\n                                const _xAj = isRangeStart ? xArrj : xArrj.slice().reverse();\n                                const _yAj = isRangeStart ? yAj : yAj.slice().reverse();\n                                const smoothInputs = getSmoothInputs(_xAj, _yAj);\n                                const points = smoothInputs.length > 1 ? $e4b487e979d7c06d$var$spline.points(smoothInputs) : smoothInputs;\n                                let smoothInputsLower = [];\n                                if (rangeArea) {\n                                    if (isLowerRangeAreaPath) areaPaths = smoothInputs;\n                                    else smoothInputsLower = areaPaths.reverse();\n                                }\n                                let segmentCount = 0;\n                                let smoothInputsIndex = 0;\n                                getSegments(_yAj, points).forEach((_)=>{\n                                    segmentCount++;\n                                    const svgPoints = $e4b487e979d7c06d$var$svgPath(_);\n                                    const _start = smoothInputsIndex;\n                                    smoothInputsIndex += _.length;\n                                    const _end = smoothInputsIndex - 1;\n                                    if (isLowerRangeAreaPath) linePath = graphics.move(smoothInputs[_start][0], smoothInputs[_start][1]) + svgPoints;\n                                    else if (rangeArea) linePath = graphics.move(smoothInputsLower[_start][0], smoothInputsLower[_start][1]) + graphics.line(smoothInputs[_start][0], smoothInputs[_start][1]) + svgPoints + graphics.line(smoothInputsLower[_end][0], smoothInputsLower[_end][1]);\n                                    else {\n                                        linePath = graphics.move(smoothInputs[_start][0], smoothInputs[_start][1]) + svgPoints;\n                                        areaPath = linePath + graphics.line(smoothInputs[_end][0], areaBottomY) + graphics.line(smoothInputs[_start][0], areaBottomY) + \"z\";\n                                        areaPaths.push(areaPath);\n                                    }\n                                    linePaths.push(linePath);\n                                });\n                                if (rangeArea && segmentCount > 1 && !isLowerRangeAreaPath) {\n                                    const upperLinePaths = linePaths.slice(segmentCount).reverse();\n                                    linePaths.splice(segmentCount);\n                                    upperLinePaths.forEach((u)=>linePaths.push(u));\n                                }\n                                pathState = 0;\n                                break;\n                            }\n                    }\n                    break;\n                }\n            case \"smooth\":\n                {\n                    const length = (x - pX) * 0.35;\n                    if (series[i2][j] === null) pathState = 0;\n                    else switch(pathState){\n                        case 0:\n                            segmentStartX = pX;\n                            if (isLowerRangeAreaPath) linePath = graphics.move(pX, y2Arrj[j]) + graphics.line(pX, pY);\n                            else linePath = graphics.move(pX, pY);\n                            areaPath = graphics.move(pX, pY);\n                            if (series[i2][j + 1] === null || typeof series[i2][j + 1] === \"undefined\") {\n                                linePaths.push(linePath);\n                                areaPaths.push(areaPath);\n                                break;\n                            }\n                            pathState = 1;\n                            if (j < series[i2].length - 2) {\n                                const p2 = graphics.curve(pX + length, pY, x - length, y, x, y);\n                                linePath += p2;\n                                areaPath += p2;\n                                break;\n                            }\n                        // falls through\n                        case 1:\n                            if (series[i2][j + 1] === null) {\n                                if (isLowerRangeAreaPath) linePath += graphics.line(pX, y2);\n                                else linePath += graphics.move(pX, pY);\n                                areaPath += graphics.line(pX, areaBottomY) + graphics.line(segmentStartX, areaBottomY) + \"z\";\n                                linePaths.push(linePath);\n                                areaPaths.push(areaPath);\n                                pathState = -1;\n                            } else {\n                                const p2 = graphics.curve(pX + length, pY, x - length, y, x, y);\n                                linePath += p2;\n                                areaPath += p2;\n                                if (j >= series[i2].length - 2) {\n                                    if (isLowerRangeAreaPath) linePath += graphics.curve(x, y, x, y, x, y2) + graphics.move(x, y2);\n                                    areaPath += graphics.curve(x, y, x, y, x, areaBottomY) + graphics.line(segmentStartX, areaBottomY) + \"z\";\n                                    linePaths.push(linePath);\n                                    areaPaths.push(areaPath);\n                                    pathState = -1;\n                                }\n                            }\n                            break;\n                    }\n                    pX = x;\n                    pY = y;\n                    break;\n                }\n            default:\n                {\n                    const pathToPoint = (curve2, x2, y3)=>{\n                        let path = \"\";\n                        switch(curve2){\n                            case \"stepline\":\n                                path = graphics.line(x2, null, \"H\") + graphics.line(null, y3, \"V\");\n                                break;\n                            case \"linestep\":\n                                path = graphics.line(null, y3, \"V\") + graphics.line(x2, null, \"H\");\n                                break;\n                            case \"straight\":\n                                path = graphics.line(x2, y3);\n                                break;\n                        }\n                        return path;\n                    };\n                    if (series[i2][j] === null) pathState = 0;\n                    else switch(pathState){\n                        case 0:\n                            segmentStartX = pX;\n                            if (isLowerRangeAreaPath) linePath = graphics.move(pX, y2Arrj[j]) + graphics.line(pX, pY);\n                            else linePath = graphics.move(pX, pY);\n                            areaPath = graphics.move(pX, pY);\n                            if (series[i2][j + 1] === null || typeof series[i2][j + 1] === \"undefined\") {\n                                linePaths.push(linePath);\n                                areaPaths.push(areaPath);\n                                break;\n                            }\n                            pathState = 1;\n                            if (j < series[i2].length - 2) {\n                                const p2 = pathToPoint(curve, x, y);\n                                linePath += p2;\n                                areaPath += p2;\n                                break;\n                            }\n                        // falls through\n                        case 1:\n                            if (series[i2][j + 1] === null) {\n                                if (isLowerRangeAreaPath) linePath += graphics.line(pX, y2);\n                                else linePath += graphics.move(pX, pY);\n                                areaPath += graphics.line(pX, areaBottomY) + graphics.line(segmentStartX, areaBottomY) + \"z\";\n                                linePaths.push(linePath);\n                                areaPaths.push(areaPath);\n                                pathState = -1;\n                            } else {\n                                const p2 = pathToPoint(curve, x, y);\n                                linePath += p2;\n                                areaPath += p2;\n                                if (j >= series[i2].length - 2) {\n                                    if (isLowerRangeAreaPath) linePath += graphics.line(x, y2);\n                                    areaPath += graphics.line(x, areaBottomY) + graphics.line(segmentStartX, areaBottomY) + \"z\";\n                                    linePaths.push(linePath);\n                                    areaPaths.push(areaPath);\n                                    pathState = -1;\n                                }\n                            }\n                            break;\n                    }\n                    pX = x;\n                    pY = y;\n                    break;\n                }\n        }\n        return {\n            linePaths: linePaths,\n            areaPaths: areaPaths,\n            pX: pX,\n            pY: pY,\n            pathState: pathState,\n            segmentStartX: segmentStartX,\n            linePath: linePath,\n            areaPath: areaPath\n        };\n    }\n    /**\n   * @param {any[]} series\n   * @param {any} pointsPos\n   * @param {number} i\n   * @param {number} j\n   * @param {number} realIndex\n   */ handleNullDataPoints(series, pointsPos, i2, j, realIndex) {\n        const w2 = this.w;\n        if (series[i2][j] === null && w2.config.markers.showNullDataPoints || series[i2].length === 1) {\n            let pSize = this.strokeWidth - w2.config.markers.strokeWidth / 2;\n            if (!(pSize > 0)) pSize = 0;\n            const elPointsWrap = this.markers.plotChartMarkers({\n                pointsPos: pointsPos,\n                seriesIndex: realIndex,\n                j: j + 1,\n                pSize: pSize,\n                alwaysDrawMarker: true\n            });\n            if (elPointsWrap !== null) this.elPointsMain.add(elPointsWrap);\n        }\n    }\n}\nfunction $e4b487e979d7c06d$var$drawOuterLabel(w2, spec) {\n    const { lines: lines, lineHeight: lineHeight, anchor: anchor, elbow: elbow, labelX: labelX, labelY: labelY, side: side, connector: connector, style: style, foreColor: foreColor } = spec;\n    const graphics = new $e4b487e979d7c06d$var$Graphics(w2);\n    const group = graphics.group({\n        class: spec.groupClass || \"apexcharts-outer-label-group\"\n    });\n    if (connector.show) {\n        const d = `M ${anchor.x} ${anchor.y} L ${elbow.x} ${elbow.y} L ${labelX} ${labelY}`;\n        const line = graphics.drawPath({\n            d: d,\n            stroke: connector.color,\n            strokeWidth: connector.width,\n            fill: \"none\",\n            strokeLinecap: \"round\"\n        });\n        line.node.classList.add(spec.connectorClass || \"apexcharts-outer-label-connector\");\n        group.add(line);\n    }\n    const textX = side === \"right\" ? labelX + 4 : labelX - 4;\n    const n2 = lines.length;\n    const startY = labelY - (n2 - 1) * lineHeight / 2;\n    const elText = graphics.drawText({\n        x: textX,\n        y: startY,\n        text: n2 === 1 ? lines[0] : lines,\n        textAnchor: side === \"right\" ? \"start\" : \"end\",\n        fontSize: style.fontSize,\n        fontFamily: style.fontFamily,\n        fontWeight: style.fontWeight,\n        foreColor: foreColor,\n        dominantBaseline: \"central\",\n        cssClass: spec.textClass || \"apexcharts-outer-label\"\n    });\n    if (n2 > 1) {\n        const tspans = elText.node.getElementsByTagName(\"tspan\");\n        for(let li = 0; li < tspans.length; li++){\n            tspans[li].setAttribute(\"x\", `${textX}`);\n            tspans[li].setAttribute(\"dy\", li === 0 ? \"0\" : `${lineHeight}`);\n        }\n    }\n    group.add(elText);\n    return group;\n}\nfunction $e4b487e979d7c06d$var$measureLabelWidth(w2, labels, style = {}) {\n    const graphics = new $e4b487e979d7c06d$var$Graphics(w2);\n    const fontSize = style.fontSize || \"12px\";\n    const px = parseFloat(fontSize) || 12;\n    let max = 0;\n    labels.forEach((text)=>{\n        if (text == null || text === \"\") return;\n        const str = `${text}`;\n        const measured = graphics.getTextRects(str, fontSize, style.fontFamily, \"\").width;\n        max = Math.max(max, measured > 0 ? measured : str.length * px * 0.58);\n    });\n    return max;\n}\nfunction $e4b487e979d7c06d$var$spaceOutLabels(items, minGap, maxY, minY) {\n    const col = items.slice().sort((a2, b2)=>a2.idealY - b2.idealY);\n    col.forEach((l2)=>{\n        l2.labelY = l2.idealY;\n    });\n    for(let k = 1; k < col.length; k++)if (col[k].labelY - col[k - 1].labelY < minGap) col[k].labelY = col[k - 1].labelY + minGap;\n    const last = col[col.length - 1];\n    const overflow = last ? last.labelY - maxY : 0;\n    if (overflow > 0) for(let k = col.length - 1; k >= 0; k--){\n        col[k].labelY -= overflow;\n        if (k < col.length - 1 && col[k + 1].labelY - col[k].labelY < minGap) col[k].labelY = col[k + 1].labelY - minGap;\n    }\n    if (minY != null && col.length && col[0].labelY < minY) {\n        const shift = minY - col[0].labelY;\n        for(let k = 0; k < col.length; k++)col[k].labelY += shift;\n    }\n}\nclass $e4b487e979d7c06d$var$CircularChartsHelpers {\n    /**\n   * @param {import('../../../types/internal').ChartStateW} w\n   */ constructor(w2){\n        this.w = w2;\n    }\n    /**\n   * @param {number} x\n   * @param {number} y\n   * @param {number} i\n   * @param {string | number} text\n   */ drawYAxisTexts(x, y, i2, text) {\n        const w2 = this.w;\n        const yaxisConfig = w2.config.yaxis[0];\n        const formatter = w2.formatters.yLabelFormatters[0];\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const yaxisLabel = graphics.drawText({\n            x: x + yaxisConfig.labels.offsetX,\n            y: y + yaxisConfig.labels.offsetY,\n            text: formatter(text, i2),\n            textAnchor: \"middle\",\n            fontSize: yaxisConfig.labels.style.fontSize,\n            fontFamily: yaxisConfig.labels.style.fontFamily,\n            foreColor: Array.isArray(yaxisConfig.labels.style.colors) ? yaxisConfig.labels.style.colors[i2] : yaxisConfig.labels.style.colors\n        });\n        return yaxisLabel;\n    }\n    /**\n   * Widest rendered width among the given label strings. Used to reserve\n   * horizontal room for outer (name) labels so the pie can shrink to fit them.\n   * @param {string[]} labels\n   * @param {{ fontSize?: string, fontFamily?: string }} style\n   * @returns {number}\n   */ getMaxLabelWidth(labels, { fontSize: fontSize, fontFamily: fontFamily } = {}) {\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        let maxWidth = 0;\n        labels.forEach((text)=>{\n            if (text === null || typeof text === \"undefined\" || text === \"\") return;\n            const rect = graphics.getTextRects(`${text}`, fontSize || \"12px\", fontFamily, \"\");\n            maxWidth = Math.max(maxWidth, rect.width);\n        });\n        return maxWidth;\n    }\n    /**\n   * Draw a single outer (name) label: an optional leader line from the slice\n   * edge (anchor -> radial elbow -> label) plus the name text (one or more\n   * lines, e.g. name + percent). Geometry is computed by the caller (Pie.js)\n   * so it can run a de-overlap pass first. The text block is vertically\n   * centered on `labelY`, which is where the connector terminates.\n   * @param {{\n   *   lines: string[],\n   *   lineHeight: number,\n   *   anchor: { x: number, y: number },\n   *   elbow: { x: number, y: number },\n   *   labelX: number,\n   *   labelY: number,\n   *   side: 'left' | 'right',\n   *   connector: { show: boolean, width: number, color: string },\n   *   style: { fontSize?: string, fontFamily?: string, fontWeight?: string | number },\n   *   foreColor: string,\n   * }} opts\n   */ drawExternalLabel(opts) {\n        return $e4b487e979d7c06d$var$drawOuterLabel(this.w, $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, opts), {\n            groupClass: \"apexcharts-pie-name-label-group\",\n            textClass: \"apexcharts-pie-name-label\",\n            connectorClass: \"apexcharts-pie-label-connector\"\n        }));\n    }\n}\nconst $e4b487e979d7c06d$var$D2R$1 = Math.PI / 180;\nconst $e4b487e979d7c06d$var$R2D$1 = 180 / Math.PI;\nfunction $e4b487e979d7c06d$var$arcPoint(cx, cy, radius, deg) {\n    return {\n        x: cx + radius * Math.cos((deg - 90) * $e4b487e979d7c06d$var$D2R$1),\n        y: cy + radius * Math.sin((deg - 90) * $e4b487e979d7c06d$var$D2R$1)\n    };\n}\nconst $e4b487e979d7c06d$var$xy = (p2)=>`${p2.x} ${p2.y}`;\nfunction $e4b487e979d7c06d$var$roundedDonutSegmentPath({ cx: cx, cy: cy, rIn: rIn, rOut: rOut, a0: a0, a1: a1, r: r2, spanDeg: spanDeg }) {\n    const ptAt = (radius, deg)=>$e4b487e979d7c06d$var$arcPoint(cx, cy, radius, deg);\n    const degOut = r2 / rOut * $e4b487e979d7c06d$var$R2D$1;\n    const degIn = r2 / rIn * $e4b487e979d7c06d$var$R2D$1;\n    const oStart = ptAt(rOut, a0 + degOut);\n    const oEnd = ptAt(rOut, a1 - degOut);\n    const largeOut = spanDeg - 2 * degOut > 180 ? 1 : 0;\n    const ocEnd = ptAt(rOut, a1);\n    const rEndOut = ptAt(rOut - r2, a1);\n    const ocStart = ptAt(rOut, a0);\n    const rStartOut = ptAt(rOut - r2, a0);\n    const iEnd = ptAt(rIn, a1 - degIn);\n    const iStart = ptAt(rIn, a0 + degIn);\n    const largeIn = spanDeg - 2 * degIn > 180 ? 1 : 0;\n    const icEnd = ptAt(rIn, a1);\n    const rEndIn = ptAt(rIn + r2, a1);\n    const icStart = ptAt(rIn, a0);\n    const rStartIn = ptAt(rIn + r2, a0);\n    return [\n        \"M\",\n        $e4b487e979d7c06d$var$xy(oStart),\n        \"A\",\n        rOut,\n        rOut,\n        0,\n        largeOut,\n        1,\n        $e4b487e979d7c06d$var$xy(oEnd),\n        \"Q\",\n        $e4b487e979d7c06d$var$xy(ocEnd),\n        $e4b487e979d7c06d$var$xy(rEndOut),\n        \"L\",\n        $e4b487e979d7c06d$var$xy(rEndIn),\n        \"Q\",\n        $e4b487e979d7c06d$var$xy(icEnd),\n        $e4b487e979d7c06d$var$xy(iEnd),\n        \"A\",\n        rIn,\n        rIn,\n        0,\n        largeIn,\n        0,\n        $e4b487e979d7c06d$var$xy(iStart),\n        \"Q\",\n        $e4b487e979d7c06d$var$xy(icStart),\n        $e4b487e979d7c06d$var$xy(rStartIn),\n        \"L\",\n        $e4b487e979d7c06d$var$xy(rStartOut),\n        \"Q\",\n        $e4b487e979d7c06d$var$xy(ocStart),\n        $e4b487e979d7c06d$var$xy(oStart),\n        \"Z\"\n    ].join(\" \");\n}\nfunction $e4b487e979d7c06d$var$roundedPieSegmentPath({ cx: cx, cy: cy, rOut: rOut, a0: a0, a1: a1, r: r2, spanDeg: spanDeg }) {\n    const ptAt = (radius, deg)=>$e4b487e979d7c06d$var$arcPoint(cx, cy, radius, deg);\n    const degOut = r2 / rOut * $e4b487e979d7c06d$var$R2D$1;\n    const oStart = ptAt(rOut, a0 + degOut);\n    const oEnd = ptAt(rOut, a1 - degOut);\n    const largeOut = spanDeg - 2 * degOut > 180 ? 1 : 0;\n    const ocEnd = ptAt(rOut, a1);\n    const rEndOut = ptAt(rOut - r2, a1);\n    const ocStart = ptAt(rOut, a0);\n    const rStartOut = ptAt(rOut - r2, a0);\n    return [\n        \"M\",\n        $e4b487e979d7c06d$var$xy(oStart),\n        \"A\",\n        rOut,\n        rOut,\n        0,\n        largeOut,\n        1,\n        $e4b487e979d7c06d$var$xy(oEnd),\n        \"Q\",\n        $e4b487e979d7c06d$var$xy(ocEnd),\n        $e4b487e979d7c06d$var$xy(rEndOut),\n        \"L\",\n        `${cx} ${cy}`,\n        \"L\",\n        $e4b487e979d7c06d$var$xy(rStartOut),\n        \"Q\",\n        $e4b487e979d7c06d$var$xy(ocStart),\n        $e4b487e979d7c06d$var$xy(oStart),\n        \"Z\"\n    ].join(\" \");\n}\nfunction $e4b487e979d7c06d$var$sharpDonutSegmentPath({ cx: cx, cy: cy, rIn: rIn, rOut: rOut, a0: a0, a1: a1, spanDeg: spanDeg }) {\n    const ptAt = (radius, deg)=>$e4b487e979d7c06d$var$arcPoint(cx, cy, radius, deg);\n    const largeArc = spanDeg > 180 ? 1 : 0;\n    const A = ptAt(rOut, a0);\n    const B = ptAt(rOut, a1);\n    const C = ptAt(rIn, a1);\n    const Din = ptAt(rIn, a0);\n    return [\n        \"M\",\n        $e4b487e979d7c06d$var$xy(A),\n        \"A\",\n        rOut,\n        rOut,\n        0,\n        largeArc,\n        1,\n        $e4b487e979d7c06d$var$xy(B),\n        \"L\",\n        $e4b487e979d7c06d$var$xy(C),\n        \"A\",\n        rIn,\n        rIn,\n        0,\n        largeArc,\n        0,\n        $e4b487e979d7c06d$var$xy(Din),\n        \"Z\"\n    ].join(\" \");\n}\nconst $e4b487e979d7c06d$var$SLICE_OFFSET_TRANSITION = \"transform 320ms cubic-bezier(0.25, 0.8, 0.3, 1)\";\nconst $e4b487e979d7c06d$var$HOVER_OUTLINE_TRANSITION = \"opacity 180ms ease-out\";\nclass $e4b487e979d7c06d$var$Pie {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.ctx = ctx;\n        this.w = w2;\n        this.chartType = this.w.config.chart.type;\n        this.initialAnim = this.w.config.chart.animations.enabled;\n        this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;\n        this.animBeginArr = [\n            0\n        ];\n        this.animDur = 0;\n        this.donutDataLabels = this.w.config.plotOptions.pie.donut.labels;\n        this.lineColorArr = w2.globals.stroke.colors !== void 0 ? w2.globals.stroke.colors : w2.globals.colors;\n        this.defaultSize = Math.min(w2.layout.gridWidth, w2.layout.gridHeight);\n        this.centerY = this.defaultSize / 2;\n        this.centerX = w2.layout.gridWidth / 2;\n        if (w2.config.chart.type === \"radialBar\") this.fullAngle = 360;\n        else this.fullAngle = Math.abs(w2.config.plotOptions.pie.endAngle - w2.config.plotOptions.pie.startAngle);\n        this.initialAngle = w2.config.plotOptions.pie.startAngle % this.fullAngle;\n        w2.globals.radialSize = this.defaultSize / 2.05 - w2.config.stroke.width - (!w2.config.chart.sparkline.enabled ? w2.config.chart.dropShadow.blur : 0);\n        this.externalCfg = w2.config.plotOptions.pie.dataLabels.external;\n        const dlStyle = w2.config.dataLabels.style;\n        this.externalLabelStyle = {\n            fontSize: this.externalCfg.fontSize || dlStyle.fontSize,\n            fontFamily: this.externalCfg.fontFamily || dlStyle.fontFamily,\n            fontWeight: this.externalCfg.fontWeight || dlStyle.fontWeight\n        };\n        this.externalLabels = [];\n        this.externalLabelMaxLines = 1;\n        this.externalLabelLineH = parseFloat(this.externalLabelStyle.fontSize) || 12;\n        w2.globals.pieExternalLabelMarginY = 0;\n        this.showExternalLabels = this.externalCfg.show && this.chartType !== \"polarArea\";\n        if (this.showExternalLabels && !w2.globals.noData) this.reserveExternalLabelSpace();\n        this.donutSize = w2.globals.radialSize * parseInt(w2.config.plotOptions.pie.donut.size, 10) / 100;\n        const scaleSize = w2.config.plotOptions.pie.customScale;\n        const halfW = w2.layout.gridWidth / 2;\n        const halfH = w2.layout.gridHeight / 2;\n        this.translateX = halfW - halfW * scaleSize;\n        this.translateY = halfH - halfH * scaleSize;\n        this.dataLabelsGroup = new $e4b487e979d7c06d$var$Graphics(this.w).group({\n            class: \"apexcharts-datalabels-group\",\n            transform: `translate(${this.translateX}, ${this.translateY}) scale(${scaleSize})`\n        });\n        this.maxY = 0;\n        this.sliceLabels = [];\n        this.sliceSizes = [];\n        this.prevSliceSizes = [];\n        this.sliceLabelGroups = {};\n        this.externalLabelGroups = {};\n        this.elHoverOutline = null;\n        this.elHoverOutlinePath = null;\n        this.hoverOutlineIndex = -1;\n        this.prevSectorAngleArr = [];\n    }\n    /**\n   * The text shown in an outer (name) label for slice `i`. Applies the\n   * user `name.formatter` if provided, otherwise the raw series name. The\n   * formatter may return a string or an array of strings (one per line, e.g.\n   * `[name, percent]`); normalize via `getExternalLabelLines`.\n   * @param {number} i\n   * @returns {string | string[]}\n   */ getExternalLabelText(i2) {\n        var _a, _b, _c;\n        const w2 = this.w;\n        const name2 = w2.seriesData.seriesNames[i2];\n        const fn = this.externalCfg.formatter;\n        if (typeof fn === \"function\") return fn(name2, {\n            seriesIndex: i2,\n            percent: (_b = (_a = w2.globals.seriesPercent) == null ? void 0 : _a[i2]) == null ? void 0 : _b[0],\n            value: (_c = w2.globals.seriesTotals) == null ? void 0 : _c[i2],\n            w: w2\n        });\n        return name2 == null ? \"\" : `${name2}`;\n    }\n    /**\n   * Outer label content for slice `i` normalized to an array of line strings.\n   * Supports a formatter returning an array, or a string with `\\n` separators.\n   * @param {number} i\n   * @returns {string[]}\n   */ getExternalLabelLines(i2) {\n        const raw = this.getExternalLabelText(i2);\n        const arr = Array.isArray(raw) ? raw : `${raw == null ? \"\" : raw}`.split(\"\\n\");\n        return arr.map((l2)=>l2 == null ? \"\" : `${l2}`);\n    }\n    /**\n   * Shrink the pie radius (and reposition its center) so outer name labels and\n   * their connector lines fit inside the chart area without clipping. Stores\n   * the reserved vertical band on `w.globals.pieExternalLabelMarginY` so\n   * Core.resizeNonAxisCharts can grow the SVG height to match.\n   */ reserveExternalLabelSpace() {\n        const w2 = this.w;\n        const helpers = new $e4b487e979d7c06d$var$CircularChartsHelpers(w2);\n        const lineSets = (w2.seriesData.seriesNames || []).map((_, i2)=>this.getExternalLabelLines(i2));\n        const maxLabelWidth = helpers.getMaxLabelWidth(lineSets.flat(), {\n            fontSize: this.externalLabelStyle.fontSize,\n            fontFamily: this.externalLabelStyle.fontFamily\n        });\n        this.externalLabelMaxLines = lineSets.reduce((m2, s2)=>Math.max(m2, s2.length), 1);\n        this.externalLabelLineH = Math.round((parseFloat(this.externalLabelStyle.fontSize) || 12) * 1.35);\n        const cn = this.externalCfg.connector;\n        const blockHeight = this.externalLabelMaxLines * this.externalLabelLineH;\n        const mh = maxLabelWidth + (cn.length || 0) + (cn.gap || 0) + 12;\n        const mv = blockHeight / 2 + (cn.gap || 0) + 6;\n        const fitted = Math.min(w2.globals.radialSize, w2.layout.gridWidth / 2 - mh, w2.layout.gridHeight / 2 - mv);\n        w2.globals.radialSize = Math.max(fitted, this.defaultSize * 0.15);\n        w2.globals.pieExternalLabelMarginY = mv;\n        const heightStr = w2.config.chart.height ? String(w2.config.chart.height) : \"\";\n        const userSetFixedHeight = heightStr !== \"\" && heightStr !== \"auto\";\n        this.centerY = userSetFixedHeight ? w2.layout.gridHeight / 2 : w2.globals.radialSize + mv;\n    }\n    /**\n   * @param {any[]} series\n   */ draw(series) {\n        var _a;\n        const self = this;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const elPie = graphics.group({\n            class: \"apexcharts-pie\"\n        });\n        if (w2.globals.noData) return elPie;\n        let total = 0;\n        for(let k = 0; k < series.length; k++)total += $e4b487e979d7c06d$var$Utils$1.negToZero(series[k]);\n        const sectorAngleArr = [];\n        const elSeries = graphics.group();\n        if (total === 0) total = 1e-5;\n        series.forEach((m2)=>{\n            this.maxY = Math.max(this.maxY, m2);\n        });\n        if (w2.config.yaxis[0].max) this.maxY = w2.config.yaxis[0].max;\n        if (w2.config.grid.position === \"back\" && this.chartType === \"polarArea\") this.drawPolarElements(elPie);\n        const collapsedIdx = w2.globals.collapsedSeriesIndices || [];\n        let polarVisible = 1;\n        if (this.chartType === \"polarArea\") {\n            let visible = 0;\n            for(let k = 0; k < series.length; k++)if (collapsedIdx.indexOf(k) === -1) visible++;\n            polarVisible = Math.max(1, visible);\n        }\n        for(let i2 = 0; i2 < series.length; i2++){\n            const angle = this.fullAngle * $e4b487e979d7c06d$var$Utils$1.negToZero(series[i2]) / total;\n            sectorAngleArr.push(angle);\n            if (this.chartType === \"polarArea\") {\n                sectorAngleArr[i2] = collapsedIdx.indexOf(i2) > -1 ? 0 : this.fullAngle / polarVisible;\n                this.sliceSizes.push(w2.globals.radialSize * series[i2] / (this.maxY || 1));\n            } else this.sliceSizes.push(w2.globals.radialSize);\n        }\n        const morphActive = ((_a = this.ctx.morphTypeChange) == null ? void 0 : _a.isActive()) === true;\n        if (w2.globals.dataChanged && !morphActive) {\n            if (this.chartType === \"polarArea\") {\n                const prevValues = w2.globals.previousPaths;\n                const stash = w2.globals.prevPolarAngles;\n                if (Array.isArray(stash) && stash.length === prevValues.length) this.prevSectorAngleArr = stash.slice();\n                else for(let i2 = 0; i2 < prevValues.length; i2++)this.prevSectorAngleArr.push(this.fullAngle / Math.max(1, prevValues.length));\n                let prevMaxY = 0;\n                for(let k = 0; k < prevValues.length; k++)prevMaxY = Math.max(prevMaxY, $e4b487e979d7c06d$var$Utils$1.negToZero(prevValues[k]));\n                if (w2.config.yaxis[0].max) prevMaxY = w2.config.yaxis[0].max;\n                this.prevSliceSizes = prevValues.map((v2)=>w2.globals.radialSize * $e4b487e979d7c06d$var$Utils$1.negToZero(v2) / (prevMaxY || 1));\n            } else {\n                let prevTotal = 0;\n                for(let k = 0; k < w2.globals.previousPaths.length; k++)prevTotal += $e4b487e979d7c06d$var$Utils$1.negToZero(w2.globals.previousPaths[k]);\n                let previousAngle;\n                for(let i2 = 0; i2 < w2.globals.previousPaths.length; i2++){\n                    previousAngle = this.fullAngle * $e4b487e979d7c06d$var$Utils$1.negToZero(w2.globals.previousPaths[i2]) / prevTotal;\n                    this.prevSectorAngleArr.push(previousAngle);\n                }\n            }\n        }\n        if (this.chartType === \"polarArea\") w2.globals.prevPolarAngles = sectorAngleArr.slice();\n        if (this.donutSize < 0) this.donutSize = 0;\n        if (this.chartType === \"donut\") {\n            const circle = graphics.drawCircle(this.donutSize);\n            circle.attr({\n                cx: this.centerX,\n                cy: this.centerY,\n                fill: w2.config.plotOptions.pie.donut.background ? w2.config.plotOptions.pie.donut.background : \"transparent\"\n            });\n            elSeries.add(circle);\n        }\n        const elG = self.drawArcs(sectorAngleArr, series);\n        this.sliceLabels.forEach((s2)=>{\n            elG.add(s2);\n        });\n        elSeries.attr({\n            transform: `translate(${this.translateX}, ${this.translateY}) scale(${w2.config.plotOptions.pie.customScale})`\n        });\n        elSeries.add(elG);\n        elPie.add(elSeries);\n        if (this.donutDataLabels.show) {\n            const shouldFadeInLabels = this.initialAnim && !w2.globals.resized && !w2.globals.dataChanged && this.animDur > 0;\n            const dataLabels = this.renderInnerDataLabels(this.dataLabelsGroup, this.donutDataLabels, {\n                hollowSize: this.donutSize,\n                centerX: this.centerX,\n                centerY: this.centerY,\n                opacity: shouldFadeInLabels ? 0 : this.donutDataLabels.show\n            });\n            if (shouldFadeInLabels) {\n                const labelsNode = this.dataLabelsGroup.node;\n                labelsNode.style.transition = \"opacity 280ms ease-out\";\n                setTimeout(()=>{\n                    labelsNode.style.opacity = \"1\";\n                }, this.animDur);\n            }\n            elPie.add(dataLabels);\n        }\n        if (w2.config.grid.position === \"front\" && this.chartType === \"polarArea\") this.drawPolarElements(elPie);\n        return elPie;\n    }\n    // core function for drawing pie arcs\n    /**\n   * @param {any[]} sectorAngleArr\n   * @param {any[]} series\n   */ drawArcs(sectorAngleArr, series) {\n        var _a, _b, _c, _d, _e;\n        const w2 = this.w;\n        const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        const g2 = graphics.group({\n            class: \"apexcharts-slices\"\n        });\n        this.elHoverOutline = graphics.group({\n            class: \"apexcharts-pie-hover-outline\"\n        });\n        this.elHoverOutline.node.style.pointerEvents = \"none\";\n        this.elHoverOutline.node.style.opacity = \"0\";\n        if (w2.config.chart.animations.enabled) this.elHoverOutline.node.style.transition = $e4b487e979d7c06d$var$HOVER_OUTLINE_TRANSITION;\n        g2.add(this.elHoverOutline);\n        let startAngle = this.initialAngle;\n        let prevStartAngle = this.initialAngle;\n        let endAngle = this.initialAngle;\n        let prevEndAngle = this.initialAngle;\n        this.strokeWidth = w2.config.stroke.show ? w2.config.stroke.width : 0;\n        const morphActive = ((_a = this.ctx.morphTypeChange) == null ? void 0 : _a.isActive()) === true;\n        for(let i2 = 0; i2 < sectorAngleArr.length; i2++){\n            const elPieArc = graphics.group({\n                class: `apexcharts-series apexcharts-pie-series`,\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[i2]),\n                rel: i2 + 1,\n                \"data:realIndex\": i2\n            });\n            g2.add(elPieArc);\n            startAngle = endAngle;\n            prevStartAngle = prevEndAngle;\n            endAngle = startAngle + sectorAngleArr[i2];\n            prevEndAngle = prevStartAngle + this.prevSectorAngleArr[i2];\n            const angle = endAngle < startAngle ? this.fullAngle + endAngle - startAngle : endAngle - startAngle;\n            const pathFill = fill.fillPath({\n                seriesNumber: i2,\n                size: this.sliceSizes[i2],\n                value: series[i2]\n            });\n            const morphFrom = morphActive ? this.ctx.morphTypeChange.getInitialPathFor(i2, 0) : null;\n            const prevSize = this.chartType === \"polarArea\" && w2.globals.dataChanged && !morphActive ? this.prevSliceSizes[i2] || 0 : void 0;\n            const path = morphFrom || this.getChangedPath(prevStartAngle, prevEndAngle, prevSize);\n            const elPath = graphics.drawPath({\n                d: path,\n                // Pie/donut/polarArea data is a single series, so a user-supplied\n                // `stroke.colors` shorter than the slice count is NOT padded by the\n                // theme engine (unlike fill colors, which cycle). Without this, only\n                // slice 0 gets the requested color and the rest fall back to a grey\n                // default. Cycle the array — matching fill-color behaviour — so a\n                // single `stroke.colors: ['#fff']` borders every slice as expected.\n                stroke: Array.isArray(this.lineColorArr) ? (_b = this.lineColorArr[i2]) != null ? _b : this.lineColorArr[i2 % this.lineColorArr.length] : this.lineColorArr,\n                strokeWidth: 0,\n                fill: pathFill,\n                fillOpacity: w2.config.fill.opacity,\n                classes: `apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`\n            });\n            elPath.attr({\n                index: 0,\n                j: i2\n            });\n            filters.setSelectionFilter(elPath, 0, i2);\n            if (w2.config.chart.dropShadow.enabled) {\n                const shadow = w2.config.chart.dropShadow;\n                filters.dropShadow(elPath, shadow, i2);\n            }\n            this.addListeners(elPath, this.donutDataLabels, i2);\n            let labelPosition = {\n                x: 0,\n                y: 0\n            };\n            const midAngle = (startAngle + angle / 2) % this.fullAngle;\n            let arcCenter = {\n                x: this.centerX,\n                y: this.centerY\n            };\n            if (this.chartType === \"pie\" || this.chartType === \"polarArea\") {\n                labelPosition = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(this.centerX, this.centerY, w2.globals.radialSize / 1.25 + w2.config.plotOptions.pie.dataLabels.offset, midAngle);\n                arcCenter = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(this.centerX, this.centerY, w2.globals.radialSize / 2, midAngle);\n            } else if (this.chartType === \"donut\") {\n                labelPosition = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(this.centerX, this.centerY, (w2.globals.radialSize + this.donutSize) / 2 + w2.config.plotOptions.pie.dataLabels.offset, midAngle);\n                arcCenter = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(this.centerX, this.centerY, (w2.globals.radialSize + this.donutSize) / 2, midAngle);\n            }\n            $e4b487e979d7c06d$var$Graphics.setAttrs(elPath.node, {\n                \"data:angle\": angle,\n                \"data:startAngle\": startAngle,\n                \"data:strokeWidth\": this.strokeWidth,\n                \"data:value\": series[i2],\n                \"data:cx\": arcCenter.x,\n                \"data:cy\": arcCenter.y\n            });\n            elPieArc.add(elPath);\n            let pieceClaimed = false;\n            if (morphActive) {\n                const finalD = this.getPiePath({\n                    me: this,\n                    startAngle: startAngle,\n                    angle: angle,\n                    size: this.sliceSizes[i2]\n                });\n                elPath.node.setAttribute(\"data:pathFinal\", finalD);\n                pieceClaimed = ((_d = (_c = this.ctx.morphTypeChange).claimsTargetMark) == null ? void 0 : _d.call(_c, i2, 0)) === true;\n                if (pieceClaimed) {\n                    elPath.attr({\n                        d: finalD\n                    });\n                    elPath.node.setAttribute(\"data:pathOrig\", finalD);\n                    elPath.node.setAttribute(\"opacity\", \"0\");\n                    elPath.node.setAttribute(\"data-piece-hidden\", \"1\");\n                }\n            }\n            let dur = 0;\n            if (this.initialAnim && !w2.globals.resized && !w2.globals.dataChanged) {\n                dur = angle / this.fullAngle * w2.config.chart.animations.speed;\n                if (dur === 0) dur = 1;\n                this.animDur = dur + this.animDur;\n                this.animBeginArr.push(this.animDur);\n            } else this.animBeginArr.push(0);\n            if (pieceClaimed) ;\n            else if (morphActive && morphFrom) {\n                const targetD = this.getPiePath({\n                    me: this,\n                    startAngle: startAngle,\n                    angle: angle,\n                    size: this.sliceSizes[i2]\n                });\n                const morphSpeed = this.ctx.morphTypeChange.getSpeed();\n                const animations = this.ctx.animations;\n                elPath.node.setAttribute(\"data:pathOrig\", targetD);\n                const morphRunner = elPath.animate(morphSpeed).plot(targetD, \"polygons\").attr({\n                    \"stroke-width\": this.strokeWidth\n                });\n                if (morphRunner && typeof morphRunner.after === \"function\") morphRunner.after(()=>animations.animationCompleted(elPath));\n                else animations.animationCompleted(elPath);\n            } else if (this.dynamicAnim && w2.globals.dataChanged) this.animatePaths(elPath, {\n                size: this.sliceSizes[i2],\n                prevSize: prevSize,\n                endAngle: endAngle,\n                startAngle: startAngle,\n                prevStartAngle: prevStartAngle,\n                prevEndAngle: prevEndAngle,\n                animateStartingPos: true,\n                i: i2,\n                animBeginArr: this.animBeginArr,\n                shouldSetPrevPaths: true,\n                dur: w2.config.chart.animations.dynamicAnimation.speed\n            });\n            else this.animatePaths(elPath, {\n                size: this.sliceSizes[i2],\n                endAngle: endAngle,\n                startAngle: startAngle,\n                i: i2,\n                totalItems: sectorAngleArr.length - 1,\n                animBeginArr: this.animBeginArr,\n                dur: dur\n            });\n            if (this.getExpandOffset() > 0) elPath.node.addEventListener(\"mouseup\", this.pieClicked.bind(this, i2));\n            else if (i2 === 0 && $e4b487e979d7c06d$var$Filters.drilldownBlocksSliceOffset(w2)) (_e = this.ctx.drilldown) == null || _e.warnSliceOffsetDisabled();\n            if (typeof w2.interact.selectedDataPoints[0] !== \"undefined\" && w2.interact.selectedDataPoints[0].indexOf(i2) > -1) {\n                if (this.initialAnim && !w2.globals.resized && !w2.globals.dataChanged && this.animDur > 0) {\n                    const _this = this;\n                    const _i = i2;\n                    setTimeout(()=>_this.pieClicked(_i, {\n                            animate: false\n                        }), this.animDur);\n                } else this.pieClicked(i2, {\n                    animate: false\n                });\n            }\n            if (w2.config.dataLabels.enabled) {\n                const xPos = labelPosition.x;\n                const yPos = labelPosition.y;\n                let text = 100 * angle / this.fullAngle + \"%\";\n                if (angle !== 0 && w2.config.plotOptions.pie.dataLabels.minAngleToShowLabel < sectorAngleArr[i2]) {\n                    const formatter = w2.config.dataLabels.formatter;\n                    if (formatter !== void 0) text = formatter(w2.globals.seriesPercent[i2][0], {\n                        seriesIndex: i2,\n                        w: w2\n                    });\n                    const foreColor = w2.globals.dataLabels.style.colors[i2];\n                    const elPieLabelWrap = graphics.group({\n                        class: `apexcharts-datalabels`\n                    });\n                    const elPieLabel = graphics.drawText({\n                        x: xPos,\n                        y: yPos,\n                        text: text,\n                        textAnchor: \"middle\",\n                        fontSize: w2.config.dataLabels.style.fontSize,\n                        fontFamily: w2.config.dataLabels.style.fontFamily,\n                        fontWeight: w2.config.dataLabels.style.fontWeight,\n                        foreColor: foreColor\n                    });\n                    elPieLabelWrap.add(elPieLabel);\n                    if (w2.config.dataLabels.dropShadow.enabled) {\n                        const textShadow = w2.config.dataLabels.dropShadow;\n                        filters.dropShadow(elPieLabel, textShadow);\n                    }\n                    elPieLabel.node.classList.add(\"apexcharts-pie-label\");\n                    if (w2.config.chart.animations.animate && w2.globals.resized === false) {\n                        elPieLabel.node.classList.add(\"apexcharts-pie-label-delay\");\n                        elPieLabel.node.style.animationDelay = w2.config.chart.animations.speed / 940 + \"s\";\n                    }\n                    this.sliceLabels.push(elPieLabelWrap);\n                    this.sliceLabelGroups[i2] = elPieLabelWrap.node;\n                }\n            }\n            if (this.showExternalLabels && angle !== 0) {\n                const lines = this.getExternalLabelLines(i2);\n                if (lines.some((l2)=>l2 !== \"\")) {\n                    const anchor = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(this.centerX, this.centerY, w2.globals.radialSize, midAngle);\n                    const elbow = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(this.centerX, this.centerY, w2.globals.radialSize + (this.externalCfg.connector.gap || 0), midAngle);\n                    const isRight = elbow.x >= this.centerX;\n                    const baseLabelX = isRight ? elbow.x + (this.externalCfg.connector.length || 0) : elbow.x - (this.externalCfg.connector.length || 0);\n                    this.externalLabels.push({\n                        i: i2,\n                        lines: lines,\n                        anchor: anchor,\n                        elbow: elbow,\n                        side: isRight ? \"right\" : \"left\",\n                        labelX: baseLabelX + parseFloat(this.externalCfg.offsetX || 0),\n                        idealY: elbow.y + parseFloat(this.externalCfg.offsetY || 0),\n                        connectorColor: this.externalCfg.connector.color || w2.globals.colors[i2],\n                        foreColor: this.externalCfg.color || w2.config.chart.foreColor\n                    });\n                }\n            }\n        }\n        if (this.showExternalLabels && this.externalLabels.length) {\n            this.placeExternalLabels();\n            const revealOnAnimEnd = $e4b487e979d7c06d$var$Environment.isBrowser() && (morphActive || this.dynamicAnim && w2.globals.dataChanged || this.initialAnim && !w2.globals.resized && !w2.globals.dataChanged);\n            this.externalLabels.forEach((lbl)=>{\n                const group = new $e4b487e979d7c06d$var$CircularChartsHelpers(w2).drawExternalLabel({\n                    lines: lbl.lines,\n                    lineHeight: this.externalLabelLineH,\n                    anchor: lbl.anchor,\n                    elbow: lbl.elbow,\n                    labelX: lbl.labelX,\n                    labelY: lbl.labelY,\n                    side: lbl.side,\n                    connector: {\n                        show: this.externalCfg.connector.show,\n                        width: this.externalCfg.connector.width,\n                        color: lbl.connectorColor\n                    },\n                    style: this.externalLabelStyle,\n                    foreColor: lbl.foreColor\n                });\n                if (revealOnAnimEnd) {\n                    group.node.classList.add(\"apexcharts-element-hidden\");\n                    w2.globals.delayedElements.push({\n                        el: group.node\n                    });\n                }\n                this.externalLabelGroups[lbl.i] = group.node;\n                g2.add(group);\n            });\n        }\n        return g2;\n    }\n    /**\n   * Vertical de-overlap for outer (name) labels: per side, sort by ideal y and\n   * push neighbours apart so they keep at least one line-height of spacing.\n   * Mutates each entry's `labelY`. Connector lines re-route to the moved y.\n   */ placeExternalLabels() {\n        const w2 = this.w;\n        const lineHeight = this.externalLabelMaxLines * this.externalLabelLineH + 2;\n        const maxY = this.centerY + w2.globals.radialSize + w2.globals.pieExternalLabelMarginY;\n        [\n            \"left\",\n            \"right\"\n        ].forEach((side)=>{\n            $e4b487e979d7c06d$var$spaceOutLabels(this.externalLabels.filter((l2)=>l2.side === side), lineHeight, maxY);\n        });\n    }\n    /**\n   * @param {any} elPath\n   * @param {Record<string, any>} dataLabels\n   * @param {number} [i] slice index, for the hover outline band\n   */ addListeners(elPath, dataLabels, i2) {\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n        elPath.node.addEventListener(\"mouseenter\", graphics.pathMouseEnter.bind(graphics, elPath));\n        elPath.node.addEventListener(\"mouseleave\", graphics.pathMouseLeave.bind(graphics, elPath));\n        elPath.node.addEventListener(\"mouseleave\", this.revertDataLabelsInner.bind(this));\n        if (typeof i2 === \"number\") {\n            elPath.node.addEventListener(\"mouseenter\", this.showHoverOutline.bind(this, i2));\n            elPath.node.addEventListener(\"mouseleave\", this.hideHoverOutline.bind(this));\n        }\n        elPath.node.addEventListener(\"mousedown\", graphics.pathMouseDown.bind(graphics, elPath));\n        if (!this.donutDataLabels.total.showAlways) {\n            elPath.node.addEventListener(\"mouseenter\", this.printDataLabelsInner.bind(this, elPath.node, dataLabels));\n            elPath.node.addEventListener(\"mousedown\", this.printDataLabelsInner.bind(this, elPath.node, dataLabels));\n        }\n    }\n    // This function can be used for other circle charts too\n    /**\n   * @param {any} el\n   * @param {Record<string, any>} opts\n   */ animatePaths(el, opts) {\n        const w2 = this.w;\n        const me = this;\n        let angle = opts.endAngle < opts.startAngle ? this.fullAngle + opts.endAngle - opts.startAngle : opts.endAngle - opts.startAngle;\n        let prevAngle = angle;\n        let fromStartAngle = opts.startAngle;\n        const toStartAngle = opts.startAngle;\n        if (opts.prevStartAngle !== void 0 && opts.prevEndAngle !== void 0) {\n            fromStartAngle = opts.prevEndAngle;\n            prevAngle = opts.prevEndAngle < opts.prevStartAngle ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle : opts.prevEndAngle - opts.prevStartAngle;\n        }\n        if (opts.i === w2.config.series.length - 1) {\n            if (angle + toStartAngle > this.fullAngle) opts.endAngle = opts.endAngle - (angle + toStartAngle);\n            else if (angle + toStartAngle < this.fullAngle) opts.endAngle = opts.endAngle + (this.fullAngle - (angle + toStartAngle));\n        }\n        if (angle === this.fullAngle) angle = this.fullAngle - 0.01;\n        me.animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts);\n    }\n    /**\n   * @param {any} el\n   * @param {number} fromStartAngle\n   * @param {number} toStartAngle\n   * @param {number} angle\n   * @param {number} prevAngle\n   * @param {Record<string, any>} opts\n   */ animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts) {\n        const me = this;\n        const w2 = this.w;\n        const animations = new $e4b487e979d7c06d$var$Animations(this.w);\n        const size = opts.size;\n        let path;\n        if (isNaN(fromStartAngle) || isNaN(prevAngle)) {\n            fromStartAngle = toStartAngle;\n            prevAngle = angle;\n            opts.dur = 0;\n        }\n        let currAngle = angle;\n        let startAngle = toStartAngle;\n        const fromAngle = fromStartAngle < toStartAngle ? this.fullAngle + fromStartAngle - toStartAngle : fromStartAngle - toStartAngle;\n        const hasPrevSize = typeof opts.prevSize === \"number\";\n        if (w2.globals.dataChanged && opts.shouldSetPrevPaths) {\n            if (opts.prevEndAngle) {\n                path = me.getPiePath({\n                    me: me,\n                    startAngle: opts.prevStartAngle,\n                    angle: opts.prevEndAngle < opts.prevStartAngle ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle : opts.prevEndAngle - opts.prevStartAngle,\n                    size: hasPrevSize ? opts.prevSize : size\n                });\n                el.attr({\n                    d: path\n                });\n            }\n        }\n        if (opts.dur !== 0) el.animate(opts.dur, opts.animBeginArr[opts.i]).after(/** @this {any} */ function() {\n            if (me.chartType === \"pie\" || me.chartType === \"donut\" || me.chartType === \"polarArea\") this.animate(w2.config.chart.animations.dynamicAnimation.speed).attr({\n                \"stroke-width\": me.strokeWidth\n            });\n            if (opts.i === w2.config.series.length - 1) animations.animationCompleted(el);\n        }).during((pos)=>{\n            currAngle = fromAngle + (angle - fromAngle) * pos;\n            if (opts.animateStartingPos) {\n                currAngle = prevAngle + (angle - prevAngle) * pos;\n                startAngle = fromStartAngle - prevAngle + (toStartAngle - (fromStartAngle - prevAngle)) * pos;\n            }\n            path = me.getPiePath({\n                me: me,\n                startAngle: startAngle,\n                angle: currAngle,\n                size: hasPrevSize ? opts.prevSize + (size - opts.prevSize) * pos : size\n            });\n            el.node.setAttribute(\"data:pathOrig\", path);\n            el.attr({\n                d: path\n            });\n        });\n        else {\n            path = me.getPiePath({\n                me: me,\n                startAngle: startAngle,\n                angle: angle,\n                size: size\n            });\n            if (!opts.isTrack) w2.globals.animationEnded = true;\n            el.node.setAttribute(\"data:pathOrig\", path);\n            el.attr({\n                d: path,\n                \"stroke-width\": me.strokeWidth\n            });\n        }\n    }\n    /**\n   * Toggle slice `i` in or out of the pie. Only one slice sits outside at a\n   * time. Bound to `mouseup` on each slice, and also reached from the\n   * `toggleDataPointSelection` API and from the pre-selected-slice pass in\n   * drawArcs (which passes `animate: false` so the slice is already parked by\n   * the time the first frame is painted).\n   * @param {number} i\n   * @param {{animate?: boolean}} [opts] a MouseEvent when called as a listener,\n   *   which carries no `animate`, so real clicks animate\n   */ pieClicked(i2, opts) {\n        const w2 = this.w;\n        const me = this;\n        const animate = !(opts && opts.animate === false);\n        const elPath = w2.dom.Paper.findOne(`.apexcharts-${me.chartType.toLowerCase()}-slice-${i2}`);\n        if (!elPath) return;\n        if (elPath.attr(\"data:pieClicked\") === \"true\") {\n            elPath.attr({\n                \"data:pieClicked\": \"false\"\n            });\n            this.revertDataLabelsInner();\n            this.offsetSlice(i2, 0, animate);\n            return;\n        }\n        const allEls = w2.dom.baseEl.getElementsByClassName(\"apexcharts-pie-area\");\n        Array.prototype.forEach.call(allEls, (pieSlice)=>{\n            const wasOut = pieSlice.getAttribute(\"data:pieClicked\") === \"true\";\n            pieSlice.setAttribute(\"data:pieClicked\", \"false\");\n            if (wasOut) this.offsetSlice(parseInt(pieSlice.getAttribute(\"j\"), 10), 0, animate);\n        });\n        w2.interact.capturedDataPointIndex = i2;\n        elPath.attr(\"data:pieClicked\", \"true\");\n        this.offsetSlice(i2, this.getExpandOffset(), animate);\n    }\n    /**\n   * How far a clicked slice slides out, in px. 0 when the pull-out is off, when\n   * drilldown owns the click, and always for polarArea: there the radius\n   * encodes the value, so moving a slice outward would read as a bigger number.\n   * @returns {number}\n   */ getExpandOffset() {\n        const pie = this.w.config.plotOptions.pie;\n        if (!pie.expandOnClick || this.chartType === \"polarArea\") return 0;\n        if ($e4b487e979d7c06d$var$Filters.drilldownBlocksSliceOffset(this.w)) return 0;\n        const offset = Number(pie.expandOffset);\n        return Number.isFinite(offset) && offset > 0 ? offset : 0;\n    }\n    /**\n   * Every node that has to travel with slice `i`: the slice path itself plus\n   * its labels, which live in sibling groups so they paint above all slices.\n   * @param {number} i\n   * @returns {SVGElement[]}\n   */ getSliceMovers(i2) {\n        const elPath = this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`);\n        return [\n            elPath ? elPath.node : null,\n            this.sliceLabelGroups[i2],\n            this.externalLabelGroups[i2],\n            // The hover band, when it is this slice's: clicking a slice you are\n            // hovering has to take its outline along, or the band is left behind\n            // sitting in the gap the slice just opened.\n            this.hoverOutlineIndex === i2 && this.elHoverOutlinePath ? this.elHoverOutlinePath.node : null\n        ].filter(Boolean);\n    }\n    /**\n   * Slide slice `i` `dist` px out of the pie along its own mid-angle, or back\n   * to its resting place when `dist` is 0.\n   *\n   * The slice is *translated*, never re-drawn: the arc keeps the exact radius\n   * and span it had, so the pulled-out slice still encodes the same quantity\n   * (growing the radius, as this used to, quietly inflates it) and a clean gap\n   * opens between it and the rest of the pie.\n   * @param {number} i\n   * @param {number} dist\n   * @param {boolean} [animate] false to park it instantly, with no transition\n   */ offsetSlice(i2, dist, animate = true) {\n        const w2 = this.w;\n        const elPath = w2.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`);\n        if (!elPath) return;\n        const { dx: dx, dy: dy } = this.getSliceOffsetVector(i2, dist);\n        const transform = `translate(${dx} ${dy})`;\n        const transition = animate && w2.config.chart.animations.enabled ? $e4b487e979d7c06d$var$SLICE_OFFSET_TRANSITION : \"\";\n        this.getSliceMovers(i2).forEach((node)=>{\n            node.style.transition = transition;\n            node.setAttribute(\"transform\", transform);\n        });\n    }\n    /**\n   * The px vector `dist` along slice `i`'s mid-angle. Zero for a slice that\n   * fills the pie: there is no \"outside\" for it to move to, and sliding it\n   * would just shift the whole chart sideways.\n   * @param {number} i\n   * @param {number} dist\n   * @returns {{dx: number, dy: number}}\n   */ getSliceOffsetVector(i2, dist) {\n        const elPath = this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`);\n        const angle = elPath ? parseFloat(elPath.attr(\"data:angle\")) : NaN;\n        if (!dist || !Number.isFinite(angle) || angle >= this.fullAngle) return {\n            dx: 0,\n            dy: 0\n        };\n        const startAngle = parseFloat(elPath.attr(\"data:startAngle\"));\n        const midRad = Math.PI * (startAngle + angle / 2 - 90) / 180;\n        return {\n            dx: dist * Math.cos(midRad),\n            dy: dist * Math.sin(midRad)\n        };\n    }\n    /**\n   * Fade in the hover outline: a translucent band traced just outside the rim\n   * of slice `i`, in the slice's own colour. It replaces lightening the slice\n   * (see Filters.hoverOutlineOwnsHoverState) so a hovered slice keeps the\n   * colour the legend and the data labels claim it has.\n   * @param {number} i\n   */ showHoverOutline(i2) {\n        const w2 = this.w;\n        if (!$e4b487e979d7c06d$var$Filters.hoverOutlineOwnsHoverState(w2)) return;\n        if (!this.elHoverOutline) return;\n        const path = this.getHoverOutlinePath(i2);\n        if (!path) return;\n        const cfg = w2.config.plotOptions.pie.hoverOutline;\n        const fill = cfg.color || w2.globals.colors[i2];\n        if (!this.elHoverOutlinePath) {\n            const graphics = new $e4b487e979d7c06d$var$Graphics(w2);\n            this.elHoverOutlinePath = graphics.drawPath({\n                d: path,\n                fill: fill,\n                strokeWidth: 0,\n                classes: \"apexcharts-pie-hover-outline-band\"\n            });\n            this.elHoverOutline.add(this.elHoverOutlinePath);\n        }\n        this.elHoverOutlinePath.attr({\n            d: path,\n            fill: fill,\n            \"fill-opacity\": cfg.opacity\n        });\n        const { dx: dx, dy: dy } = this.getSliceOffsetVector(i2, this.isSliceOut(i2) ? this.getExpandOffset() : 0);\n        this.elHoverOutlinePath.node.style.transition = \"\";\n        this.elHoverOutlinePath.node.setAttribute(\"transform\", `translate(${dx} ${dy})`);\n        this.hoverOutlineIndex = i2;\n        this.elHoverOutline.node.style.opacity = \"1\";\n    }\n    /** Fade the hover outline back out, leaving the band node in place. */ hideHoverOutline() {\n        if (this.elHoverOutline) this.elHoverOutline.node.style.opacity = \"0\";\n    }\n    /** @param {number} i @returns {boolean} */ isSliceOut(i2) {\n        const elPath = this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`);\n        return !!elPath && elPath.attr(\"data:pieClicked\") === \"true\";\n    }\n    /**\n   * Band geometry for the hover outline of slice `i`: an annulus from the\n   * slice rim (plus the stroke and the configured clearance) outward, over the\n   * same angular extent the slice is actually drawn over, so it lines up with\n   * both slice edges even with `spacing` insetting them. Rounded into a pill\n   * when the band is thick enough for the fillets to fit.\n   * @param {number} i\n   * @returns {string | null}\n   */ getHoverOutlinePath(i2) {\n        const w2 = this.w;\n        const cfg = w2.config.plotOptions.pie.hoverOutline;\n        const elPath = w2.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`);\n        if (!elPath) return null;\n        const angle = parseFloat(elPath.attr(\"data:angle\"));\n        if (!Number.isFinite(angle) || angle <= 0) return null;\n        const size = this.sliceSizes[i2];\n        const thickness = Number(cfg.size);\n        if (!Number.isFinite(size) || !Number.isFinite(thickness) || thickness <= 0) return null;\n        const { startDeg: startDeg, spanDeg: spanDeg } = this.getSliceExtent({\n            me: this,\n            startAngle: parseFloat(elPath.attr(\"data:startAngle\")),\n            angle: angle,\n            size: size\n        });\n        if (!(spanDeg > 0)) return null;\n        const rIn = size + (this.strokeWidth || 0) / 2 + (Number(cfg.gap) || 0);\n        const rOut = rIn + thickness;\n        const geo = {\n            cx: this.centerX,\n            cy: this.centerY,\n            rIn: rIn,\n            rOut: rOut,\n            a0: startDeg,\n            a1: startDeg + spanDeg,\n            spanDeg: spanDeg\n        };\n        const r2 = Math.min(thickness / 2, spanDeg * Math.PI / 180 / 2 * rIn);\n        return r2 > 0.5 ? $e4b487e979d7c06d$var$roundedDonutSegmentPath($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, geo), {\n            r: r2\n        })) : $e4b487e979d7c06d$var$sharpDonutSegmentPath(geo);\n    }\n    /**\n   * @param {number} prevStartAngle\n   * @param {number} prevEndAngle\n   */ /**\n   * @param {number} prevStartAngle\n   * @param {number} prevEndAngle\n   * @param {number} [prevSize] - polarArea passes its previous slice radius,\n   *   so the pre-animation frame sits at the previous VALUE too, not just the\n   *   previous angles.\n   */ getChangedPath(prevStartAngle, prevEndAngle, prevSize) {\n        let path = \"\";\n        if (this.dynamicAnim && this.w.globals.dataChanged) path = this.getPiePath({\n            me: this,\n            startAngle: prevStartAngle,\n            angle: prevEndAngle - prevStartAngle,\n            // @ts-ignore — size is set dynamically during draw()\n            size: typeof prevSize === \"number\" ? prevSize : this.size\n        });\n        return path;\n    }\n    /**\n   * The angular extent a slice is actually drawn over: the raw start / span\n   * clamped so a full circle never overlaps itself, then inset by\n   * `plotOptions.pie.spacing`. Shared by getPiePath and the hover outline, so\n   * the band lines up with the slice edges instead of with the un-inset angles\n   * cached on the path node.\n   * @param {{me: any, startAngle: number, angle: number, size: number}} opts\n   * @returns {{startDeg: number, spanDeg: number, endDeg: number}}\n   */ getSliceExtent({ me: me, startAngle: startAngle, angle: angle, size: size }) {\n        const w2 = this.w;\n        let startDeg = startAngle;\n        let endDeg = angle + startAngle;\n        if (Math.ceil(endDeg) >= this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle) endDeg = this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle - 0.01;\n        let spanDeg = endDeg - startDeg;\n        const isSliceType = me.chartType === \"pie\" || me.chartType === \"donut\" || me.chartType === \"polarArea\";\n        const spacing = w2.config.plotOptions.pie.spacing;\n        if (isSliceType && spacing > 0 && spanDeg > 0) {\n            const rRef = me.chartType === \"donut\" ? (size + me.donutSize) / 2 : size;\n            const gapDeg = rRef > 0 ? spacing / rRef * (180 / Math.PI) : 0;\n            const inset = Math.min(gapDeg / 2, Math.max(0, spanDeg / 2 - 0.5));\n            startDeg += inset;\n            spanDeg -= 2 * inset;\n        }\n        endDeg = startDeg + spanDeg;\n        if (Math.ceil(endDeg) > this.fullAngle) endDeg -= this.fullAngle;\n        return {\n            startDeg: startDeg,\n            spanDeg: spanDeg,\n            endDeg: endDeg\n        };\n    }\n    /** @param {{me: any, startAngle: any, angle: any, size: any}} opts */ getPiePath({ me: me, startAngle: startAngle, angle: angle, size: size }) {\n        let path;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const { startDeg: startDeg, spanDeg: spanDeg, endDeg: endDeg } = this.getSliceExtent({\n            me: me,\n            startAngle: startAngle,\n            angle: angle,\n            size: size\n        });\n        const isSliceType = me.chartType === \"pie\" || me.chartType === \"donut\" || me.chartType === \"polarArea\";\n        const startRadians = Math.PI * (startDeg - 90) / 180;\n        const borderRadius = w2.config.plotOptions.pie.borderRadius;\n        if (borderRadius > 0 && isSliceType) {\n            const roundedPath = this.getRoundedSlicePath({\n                me: me,\n                startDeg: startDeg,\n                spanDeg: spanDeg,\n                size: size,\n                borderRadius: borderRadius\n            });\n            if (roundedPath) return roundedPath;\n        }\n        const endRadians = Math.PI * (endDeg - 90) / 180;\n        const x1 = me.centerX + size * Math.cos(startRadians);\n        const y1 = me.centerY + size * Math.sin(startRadians);\n        const x2 = me.centerX + size * Math.cos(endRadians);\n        const y2 = me.centerY + size * Math.sin(endRadians);\n        const startInner = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(me.centerX, me.centerY, me.donutSize, endDeg);\n        const endInner = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(me.centerX, me.centerY, me.donutSize, startDeg);\n        const largeArc = spanDeg > 180 ? 1 : 0;\n        const pathBeginning = [\n            \"M\",\n            x1,\n            y1,\n            \"A\",\n            size,\n            size,\n            0,\n            largeArc,\n            1,\n            x2,\n            y2\n        ];\n        if (me.chartType === \"donut\") path = [\n            ...pathBeginning,\n            \"L\",\n            startInner.x,\n            startInner.y,\n            \"A\",\n            me.donutSize,\n            me.donutSize,\n            0,\n            largeArc,\n            0,\n            endInner.x,\n            endInner.y,\n            \"L\",\n            x1,\n            y1,\n            \"z\"\n        ].join(\" \");\n        else if (me.chartType === \"pie\" || me.chartType === \"polarArea\") path = [\n            ...pathBeginning,\n            \"L\",\n            me.centerX,\n            me.centerY,\n            \"L\",\n            x1,\n            y1\n        ].join(\" \");\n        else path = [\n            ...pathBeginning\n        ].join(\" \");\n        return graphics.roundPathCorners(path, this.strokeWidth * 2);\n    }\n    /**\n   * Build a slice path with rounded corners (plotOptions.pie.borderRadius).\n   *\n   * The generic roundPathCorners() only rounds line->line joins, but a slice\n   * corner is an arc<->line join, so we construct the fillets explicitly here:\n   * every corner is inset by the (clamped) radius along both the arc and the\n   * radial edge, and a quadratic Bezier with its control point at the original\n   * sharp corner bridges the two inset points. Donut slices round all four\n   * corners; pie / polarArea slices round the two outer corners and keep the\n   * center apex sharp.\n   *\n   * Returns null when the slice is too small to round meaningfully, so the\n   * caller can fall back to a sharp-corner path.\n   *\n   * @param {{me: any, startDeg: number, spanDeg: number, size: number, borderRadius: number}} opts\n   * @returns {string | null}\n   */ getRoundedSlicePath({ me: me, startDeg: startDeg, spanDeg: spanDeg, size: size, borderRadius: borderRadius }) {\n        if (!(spanDeg > 0)) return null;\n        const D2R2 = Math.PI / 180;\n        const cx = me.centerX;\n        const cy = me.centerY;\n        const isDonut = me.chartType === \"donut\";\n        const rOut = size;\n        const rIn = isDonut ? me.donutSize : 0;\n        const spanRad = spanDeg * D2R2;\n        let r2 = borderRadius;\n        r2 = Math.min(r2, spanRad * rOut / 2);\n        if (isDonut) {\n            r2 = Math.min(r2, spanRad * rIn / 2);\n            r2 = Math.min(r2, (rOut - rIn) / 2);\n        } else r2 = Math.min(r2, rOut / 2);\n        if (!(r2 > 0.5)) return null;\n        const a0 = startDeg;\n        const a1 = startDeg + spanDeg;\n        if (isDonut) return $e4b487e979d7c06d$var$roundedDonutSegmentPath({\n            cx: cx,\n            cy: cy,\n            rIn: rIn,\n            rOut: rOut,\n            a0: a0,\n            a1: a1,\n            r: r2,\n            spanDeg: spanDeg\n        });\n        return $e4b487e979d7c06d$var$roundedPieSegmentPath({\n            cx: cx,\n            cy: cy,\n            rOut: rOut,\n            a0: a0,\n            a1: a1,\n            r: r2,\n            spanDeg: spanDeg\n        });\n    }\n    /**\n   * @param {any} parent\n   */ drawPolarElements(parent) {\n        const w2 = this.w;\n        const scale = new $e4b487e979d7c06d$var$Scales(this.w);\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const helpers = new $e4b487e979d7c06d$var$CircularChartsHelpers(this.w);\n        const gCircles = graphics.group();\n        const gYAxis = graphics.group();\n        const yScale = scale.niceScale(0, Math.ceil(this.maxY), 0);\n        const yTexts = yScale.result.reverse();\n        const len = yScale.result.length;\n        this.maxY = yScale.niceMax;\n        let circleSize = w2.globals.radialSize;\n        const diff = circleSize / (len - 1);\n        for(let i2 = 0; i2 < len - 1; i2++){\n            const circle = graphics.drawCircle(circleSize);\n            circle.attr({\n                cx: this.centerX,\n                cy: this.centerY,\n                fill: \"none\",\n                \"stroke-width\": w2.config.plotOptions.polarArea.rings.strokeWidth,\n                stroke: w2.config.plotOptions.polarArea.rings.strokeColor\n            });\n            if (w2.config.yaxis[0].show) {\n                const yLabel = helpers.drawYAxisTexts(this.centerX, this.centerY - circleSize + parseInt(w2.config.yaxis[0].labels.style.fontSize, 10) / 2, i2, yTexts[i2]);\n                gYAxis.add(yLabel);\n            }\n            gCircles.add(circle);\n            circleSize = circleSize - diff;\n        }\n        this.drawSpokes(parent);\n        parent.add(gCircles);\n        parent.add(gYAxis);\n    }\n    /**\n   * @param {any} dataLabelsGroup\n   * @param {Record<string, any>} dataLabelsConfig\n   * @param {Record<string, any>} opts\n   */ renderInnerDataLabels(dataLabelsGroup, dataLabelsConfig, opts) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const showTotal = dataLabelsConfig.total.show;\n        dataLabelsGroup.node.innerHTML = \"\";\n        dataLabelsGroup.node.style.opacity = opts.opacity;\n        const x = opts.centerX;\n        const y = !this.donutDataLabels.total.label ? opts.centerY - opts.centerY / 6 : opts.centerY;\n        let labelColor, valueColor;\n        if (dataLabelsConfig.name.color === void 0) labelColor = w2.globals.colors[0];\n        else labelColor = dataLabelsConfig.name.color;\n        let labelFontSize = dataLabelsConfig.name.fontSize;\n        let labelFontFamily = dataLabelsConfig.name.fontFamily;\n        let labelFontWeight = dataLabelsConfig.name.fontWeight;\n        if (dataLabelsConfig.value.color === void 0) valueColor = w2.config.chart.foreColor;\n        else valueColor = dataLabelsConfig.value.color;\n        const lbFormatter = dataLabelsConfig.value.formatter;\n        let val = \"\";\n        let name2 = \"\";\n        if (showTotal) {\n            labelColor = dataLabelsConfig.total.color;\n            labelFontSize = dataLabelsConfig.total.fontSize;\n            labelFontFamily = dataLabelsConfig.total.fontFamily;\n            labelFontWeight = dataLabelsConfig.total.fontWeight;\n            name2 = !this.donutDataLabels.total.label ? \"\" : dataLabelsConfig.total.label;\n            val = dataLabelsConfig.total.formatter(w2);\n        } else if (w2.seriesData.series.length === 1) {\n            val = lbFormatter(w2.seriesData.series[0], w2);\n            name2 = w2.seriesData.seriesNames[0];\n        }\n        if (name2) name2 = dataLabelsConfig.name.formatter(name2, dataLabelsConfig.total.show, w2);\n        if (dataLabelsConfig.name.show) {\n            const elLabel = graphics.drawText({\n                x: x,\n                y: y + parseFloat(dataLabelsConfig.name.offsetY),\n                text: name2,\n                textAnchor: \"middle\",\n                foreColor: labelColor,\n                fontSize: labelFontSize,\n                fontWeight: labelFontWeight,\n                fontFamily: labelFontFamily\n            });\n            elLabel.node.classList.add(\"apexcharts-datalabel-label\");\n            dataLabelsGroup.add(elLabel);\n        }\n        if (dataLabelsConfig.value.show) {\n            const valOffset = dataLabelsConfig.name.show ? parseFloat(dataLabelsConfig.value.offsetY) + 16 : dataLabelsConfig.value.offsetY;\n            const elValue = graphics.drawText({\n                x: x,\n                y: y + valOffset,\n                text: val,\n                textAnchor: \"middle\",\n                foreColor: valueColor,\n                fontWeight: dataLabelsConfig.value.fontWeight,\n                fontSize: dataLabelsConfig.value.fontSize,\n                fontFamily: dataLabelsConfig.value.fontFamily\n            });\n            elValue.node.classList.add(\"apexcharts-datalabel-value\");\n            dataLabelsGroup.add(elValue);\n        }\n        return dataLabelsGroup;\n    }\n    /**\n   *\n   * @param {string} name - The name of the series\n   * @param {string} val - The value of that series\n   * @param {any} el - Optional el (indicates which series was hovered/clicked). If this param is not present, means we need to show total\n   * @param {Record<string, any>} labelsConfig\n   */ printInnerLabels(labelsConfig, name2, val, el) {\n        const w2 = this.w;\n        let labelColor;\n        if (el) {\n            if (labelsConfig.name.color === void 0) labelColor = w2.globals.colors[parseInt(el.parentNode.getAttribute(\"rel\"), 10) - 1];\n            else labelColor = labelsConfig.name.color;\n        } else if (w2.seriesData.series.length > 1 && labelsConfig.total.show) labelColor = labelsConfig.total.color;\n        const elLabel = w2.dom.baseEl.querySelector(\".apexcharts-datalabel-label\");\n        const elValue = w2.dom.baseEl.querySelector(\".apexcharts-datalabel-value\");\n        const lbFormatter = labelsConfig.value.formatter;\n        val = lbFormatter(val, w2);\n        if (!el && typeof labelsConfig.total.formatter === \"function\") val = labelsConfig.total.formatter(w2);\n        const isTotal = name2 === labelsConfig.total.label;\n        name2 = !this.donutDataLabels.total.label ? \"\" : labelsConfig.name.formatter(name2, isTotal, w2);\n        if (elLabel !== null) elLabel.textContent = name2;\n        if (elValue !== null) elValue.textContent = val;\n        if (elLabel !== null) {\n            const elLabelEl = /** @type {HTMLElement} */ elLabel;\n            elLabelEl.style.fill = labelColor;\n        }\n    }\n    /**\n   * @param {any} el\n   * @param {Record<string, any>} dataLabelsConfig\n   */ printDataLabelsInner(el, dataLabelsConfig) {\n        const w2 = this.w;\n        const val = el.getAttribute(\"data:value\");\n        const name2 = w2.seriesData.seriesNames[parseInt(el.parentNode.getAttribute(\"rel\"), 10) - 1];\n        if (w2.seriesData.series.length > 1) this.printInnerLabels(dataLabelsConfig, name2, val, el);\n        const dataLabelsGroup = w2.dom.baseEl.querySelector(\".apexcharts-datalabels-group\");\n        if (dataLabelsGroup !== null) {\n            const dataLabelsGroupEl = /** @type {HTMLElement} */ dataLabelsGroup;\n            dataLabelsGroupEl.style.opacity = \"1\";\n        }\n    }\n    /**\n   * @param {any} parent\n   */ drawSpokes(parent) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const spokeConfig = w2.config.plotOptions.polarArea.spokes;\n        if (spokeConfig.strokeWidth === 0) return;\n        const spokes = [];\n        const angleDivision = 360 / w2.seriesData.series.length;\n        for(let i2 = 0; i2 < w2.seriesData.series.length; i2++)spokes.push($e4b487e979d7c06d$var$Utils$1.polarToCartesian(this.centerX, this.centerY, w2.globals.radialSize, w2.config.plotOptions.pie.startAngle + angleDivision * i2));\n        spokes.forEach((p2, i2)=>{\n            const line = graphics.drawLine(p2.x, p2.y, this.centerX, this.centerY, Array.isArray(spokeConfig.connectorColors) ? spokeConfig.connectorColors[i2] : spokeConfig.connectorColors);\n            parent.add(line);\n        });\n    }\n    revertDataLabelsInner() {\n        const w2 = this.w;\n        if (this.donutDataLabels.show) {\n            const dataLabelsGroup = w2.dom.Paper.findOne(`.apexcharts-datalabels-group`);\n            const dataLabels = this.renderInnerDataLabels(dataLabelsGroup, this.donutDataLabels, {\n                hollowSize: this.donutSize,\n                centerX: this.centerX,\n                centerY: this.centerY,\n                opacity: this.donutDataLabels.show\n            });\n            const elPie = w2.dom.Paper.findOne(\".apexcharts-radialbar, .apexcharts-pie\");\n            elPie.add(dataLabels);\n        }\n    }\n}\nconst $e4b487e979d7c06d$var$RADAR_HIT_AREA_SIZE = 5;\nclass $e4b487e979d7c06d$var$Radar {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.ctx = ctx;\n        this.w = w2;\n        this.chartType = this.w.config.chart.type;\n        this.initialAnim = this.w.config.chart.animations.enabled;\n        this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;\n        this.animDur = 0;\n        this.graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        this.lineColorArr = w2.globals.stroke.colors !== void 0 ? w2.globals.stroke.colors : w2.globals.colors;\n        this.defaultSize = w2.globals.svgHeight < w2.globals.svgWidth ? w2.layout.gridHeight : w2.layout.gridWidth;\n        this.isLog = w2.config.yaxis[0].logarithmic;\n        this.logBase = w2.config.yaxis[0].logBase;\n        this.coreUtils = new $e4b487e979d7c06d$var$CoreUtils(this.w);\n        this.maxValue = this.isLog ? this.coreUtils.getLogVal(this.logBase, w2.globals.maxY, 0) : w2.globals.maxY;\n        this.minValue = this.isLog ? this.coreUtils.getLogVal(this.logBase, this.w.globals.minY, 0) : w2.globals.minY;\n        this.polygons = w2.config.plotOptions.radar.polygons;\n        this.strokeWidth = w2.config.stroke.show ? w2.config.stroke.width : 0;\n        this.size = this.defaultSize / 2.1 - this.strokeWidth - w2.config.chart.dropShadow.blur;\n        if (w2.config.xaxis.labels.show) this.size = this.size - w2.layout.xAxisLabelsWidth / 1.75;\n        if (w2.config.plotOptions.radar.size !== void 0) this.size = w2.config.plotOptions.radar.size;\n        this.dataRadiusOfPercent = /** @type {any} */ [];\n        this.dataRadius = /** @type {any} */ [];\n        this.angleArr = /** @type {any} */ [];\n        this.dataPointsLen = 0;\n        this.disAngle = 0;\n        this.yaxisLabelsTextsPos = [];\n    }\n    /**\n   * @param {any[]} series\n   */ draw(series) {\n        const w2 = this.w;\n        const fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        const allSeries = [];\n        const dataLabels = new $e4b487e979d7c06d$var$DataLabels(this.w, this.ctx);\n        if (series.length) this.dataPointsLen = series[w2.globals.maxValsInArrayIndex].length;\n        this.disAngle = Math.PI * 2 / this.dataPointsLen;\n        const halfW = w2.layout.gridWidth / 2;\n        const halfH = w2.layout.gridHeight / 2;\n        const translateX = halfW + w2.config.plotOptions.radar.offsetX;\n        const translateY = halfH + w2.config.plotOptions.radar.offsetY;\n        const ret = this.graphics.group({\n            class: \"apexcharts-radar-series apexcharts-plot-series\",\n            transform: `translate(${translateX || 0}, ${translateY || 0})`\n        });\n        let dataPointsPos = [];\n        let elPointsMain = null;\n        let elDataPointsMain = null;\n        this.yaxisLabels = this.graphics.group({\n            class: \"apexcharts-yaxis\"\n        });\n        series.forEach((s2, i2)=>{\n            const longestSeries = s2.length === w2.globals.dataPoints;\n            const elSeries = this.graphics.group().attr({\n                class: `apexcharts-series`,\n                \"data:longestSeries\": longestSeries,\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[i2]),\n                rel: i2 + 1,\n                \"data:realIndex\": i2\n            });\n            this.dataRadiusOfPercent[i2] = [];\n            this.dataRadius[i2] = [];\n            this.angleArr[i2] = [];\n            s2.forEach((dv, j)=>{\n                const range = Math.abs(this.maxValue - this.minValue);\n                dv = dv - this.minValue;\n                if (this.isLog) dv = this.coreUtils.getLogVal(this.logBase, dv, 0);\n                this.dataRadiusOfPercent[i2][j] = dv / range;\n                this.dataRadius[i2][j] = this.dataRadiusOfPercent[i2][j] * this.size;\n                this.angleArr[i2][j] = j * this.disAngle;\n            });\n            dataPointsPos = this.getDataPointsPos(this.dataRadius[i2], this.angleArr[i2]);\n            const paths = this.createPaths(dataPointsPos, {\n                x: 0,\n                y: 0\n            });\n            elPointsMain = this.graphics.group({\n                class: \"apexcharts-series-markers-wrap apexcharts-element-hidden\"\n            });\n            elDataPointsMain = this.graphics.group({\n                class: `apexcharts-datalabels`,\n                \"data:realIndex\": i2\n            });\n            w2.globals.delayedElements.push({\n                el: elPointsMain.node,\n                index: i2\n            });\n            const defaultRenderedPathOptions = {\n                i: i2,\n                realIndex: i2,\n                animationDelay: i2,\n                initialSpeed: w2.config.chart.animations.speed,\n                dataChangeSpeed: w2.config.chart.animations.dynamicAnimation.speed,\n                className: `apexcharts-radar`,\n                shouldClipToGrid: false,\n                bindEventsOnPaths: false,\n                stroke: w2.globals.stroke.colors[i2],\n                strokeLineCap: w2.config.stroke.lineCap\n            };\n            let pathFrom = null;\n            if (w2.globals.previousPaths.length > 0) pathFrom = this.getPreviousPath(i2);\n            for(let p2 = 0; p2 < paths.linePathsTo.length; p2++){\n                const renderedLinePath = this.graphics.renderPaths($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, defaultRenderedPathOptions), {\n                    pathFrom: pathFrom === null ? paths.linePathsFrom[p2] : pathFrom,\n                    pathTo: paths.linePathsTo[p2],\n                    strokeWidth: Array.isArray(this.strokeWidth) ? this.strokeWidth[i2] : this.strokeWidth,\n                    fill: \"none\",\n                    drawShadow: false\n                }));\n                elSeries.add(renderedLinePath);\n                const pathFill = fill.fillPath({\n                    seriesNumber: i2\n                });\n                const renderedAreaPath = this.graphics.renderPaths($e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues({}, defaultRenderedPathOptions), {\n                    pathFrom: pathFrom === null ? paths.areaPathsFrom[p2] : pathFrom,\n                    pathTo: paths.areaPathsTo[p2],\n                    strokeWidth: 0,\n                    fill: pathFill,\n                    drawShadow: false,\n                    // Radial mask: the area fill blooms outward from the radar's center\n                    // (in this group's local coords) instead of the default L→R rect wipe.\n                    drawMask: {\n                        type: \"radial\",\n                        cx: 0,\n                        cy: 0,\n                        r: this.size\n                    }\n                }));\n                if (w2.config.chart.dropShadow.enabled) {\n                    const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n                    const shadow = w2.config.chart.dropShadow;\n                    filters.dropShadow(renderedAreaPath, Object.assign({}, shadow, {\n                        noUserSpaceOnUse: true\n                    }), i2);\n                }\n                elSeries.add(renderedAreaPath);\n            }\n            s2.forEach((sj, j)=>{\n                const markers = new $e4b487e979d7c06d$var$Markers(this.w, this.ctx);\n                const opts = markers.getMarkerConfig({\n                    cssClass: \"apexcharts-marker\",\n                    seriesIndex: i2,\n                    dataPointIndex: j\n                });\n                if (!opts.pSize) {\n                    opts.pSize = $e4b487e979d7c06d$var$RADAR_HIT_AREA_SIZE;\n                    opts.pointFillColor = \"transparent\";\n                    opts.pointStrokeColor = \"transparent\";\n                    opts.pointStrokeWidth = 0;\n                }\n                const point = this.graphics.drawMarker(dataPointsPos[j].x, dataPointsPos[j].y, opts);\n                point.attr(\"rel\", j);\n                point.attr(\"j\", j);\n                point.attr(\"index\", i2);\n                point.node.setAttribute(\"default-marker-size\", opts.pSize);\n                const elPointsWrap = this.graphics.group({\n                    class: \"apexcharts-series-markers\"\n                });\n                if (elPointsWrap) elPointsWrap.add(point);\n                elPointsMain.add(elPointsWrap);\n                elSeries.add(elPointsMain);\n                const dataLabelsConfig = w2.config.dataLabels;\n                if (dataLabelsConfig.enabled) {\n                    const text = dataLabelsConfig.formatter(w2.seriesData.series[i2][j], {\n                        seriesIndex: i2,\n                        dataPointIndex: j,\n                        w: w2\n                    });\n                    dataLabels.plotDataLabelsText({\n                        x: dataPointsPos[j].x,\n                        y: dataPointsPos[j].y,\n                        text: text,\n                        textAnchor: \"middle\",\n                        i: i2,\n                        j: i2,\n                        // `j` above is the series index (kept for the color lookup), so\n                        // pass the real data point index for per-point offsets\n                        seriesIndex: i2,\n                        dataPointIndex: j,\n                        parent: elDataPointsMain,\n                        offsetCorrection: false,\n                        dataLabelsConfig: $e4b487e979d7c06d$var$__spreadValues({}, dataLabelsConfig)\n                    });\n                }\n                elSeries.add(elDataPointsMain);\n            });\n            allSeries.push(elSeries);\n        });\n        this.drawPolygons({\n            parent: ret\n        });\n        if (w2.config.xaxis.labels.show) {\n            const xaxisTexts = this.drawXAxisTexts();\n            ret.add(xaxisTexts);\n        }\n        allSeries.forEach((elS)=>{\n            ret.add(elS);\n        });\n        ret.add(this.yaxisLabels);\n        return ret;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ drawPolygons(opts) {\n        const w2 = this.w;\n        const { parent: parent } = opts;\n        const helpers = new $e4b487e979d7c06d$var$CircularChartsHelpers(this.w);\n        const yaxisTexts = w2.globals.yAxisScale[0].result.reverse();\n        const layers = yaxisTexts.length;\n        const radiusSizes = [];\n        const layerDis = this.size / (layers - 1);\n        for(let i2 = 0; i2 < layers; i2++)radiusSizes[i2] = layerDis * i2;\n        radiusSizes.reverse();\n        const polygonStrings = [];\n        const lines = [];\n        radiusSizes.forEach((radiusSize, r2)=>{\n            const polygon = $e4b487e979d7c06d$var$Utils$1.getPolygonPos(radiusSize, this.dataPointsLen);\n            let string = \"\";\n            polygon.forEach((p2, i2)=>{\n                if (r2 === 0) {\n                    const line = this.graphics.drawLine(p2.x, p2.y, 0, 0, Array.isArray(this.polygons.connectorColors) ? this.polygons.connectorColors[i2] : this.polygons.connectorColors);\n                    lines.push(line);\n                }\n                if (i2 === 0) this.yaxisLabelsTextsPos.push({\n                    x: p2.x,\n                    y: p2.y\n                });\n                string += p2.x + \",\" + p2.y + \" \";\n            });\n            polygonStrings.push(string);\n        });\n        polygonStrings.forEach((p2, i2)=>{\n            const strokeColors = this.polygons.strokeColors;\n            const strokeWidth = this.polygons.strokeWidth;\n            const polygon = this.graphics.drawPolygon(p2, Array.isArray(strokeColors) ? strokeColors[i2] : strokeColors, Array.isArray(strokeWidth) ? strokeWidth[i2] : strokeWidth, w2.globals.radarPolygons.fill.colors[i2]);\n            parent.add(polygon);\n        });\n        lines.forEach((l2)=>{\n            parent.add(l2);\n        });\n        if (w2.config.yaxis[0].show) this.yaxisLabelsTextsPos.forEach((p2, i2)=>{\n            const yText = helpers.drawYAxisTexts(p2.x, p2.y, i2, yaxisTexts[i2]);\n            this.yaxisLabels.add(yText);\n        });\n    }\n    drawXAxisTexts() {\n        const w2 = this.w;\n        const xaxisLabelsConfig = w2.config.xaxis.labels;\n        const elXAxisWrap = this.graphics.group({\n            class: \"apexcharts-xaxis\"\n        });\n        const polygonPos = $e4b487e979d7c06d$var$Utils$1.getPolygonPos(this.size, this.dataPointsLen);\n        w2.labelData.labels.forEach((label, i2)=>{\n            const formatter = w2.config.xaxis.labels.formatter;\n            const dataLabels = new $e4b487e979d7c06d$var$DataLabels(this.w, this.ctx);\n            if (polygonPos[i2]) {\n                const textPos = this.getTextPos(polygonPos[i2], this.size);\n                const text = formatter(label, {\n                    seriesIndex: -1,\n                    dataPointIndex: i2,\n                    w: w2\n                });\n                const dataLabelText = dataLabels.plotDataLabelsText({\n                    x: textPos.newX,\n                    y: textPos.newY,\n                    text: text,\n                    textAnchor: textPos.textAnchor,\n                    i: i2,\n                    j: i2,\n                    parent: elXAxisWrap,\n                    className: \"apexcharts-xaxis-label\",\n                    color: Array.isArray(xaxisLabelsConfig.style.colors) && xaxisLabelsConfig.style.colors[i2] ? xaxisLabelsConfig.style.colors[i2] : \"#a8a8a8\",\n                    dataLabelsConfig: $e4b487e979d7c06d$var$__spreadValues({\n                        textAnchor: textPos.textAnchor,\n                        dropShadow: {\n                            enabled: false\n                        }\n                    }, xaxisLabelsConfig),\n                    offsetCorrection: false\n                });\n                dataLabelText.on(\"click\", (e2)=>{\n                    if (typeof w2.config.chart.events.xAxisLabelClick === \"function\") {\n                        const opts = Object.assign({}, w2, {\n                            labelIndex: i2\n                        });\n                        w2.config.chart.events.xAxisLabelClick(e2, this.ctx, opts);\n                    }\n                });\n            }\n        });\n        return elXAxisWrap;\n    }\n    /**\n   * @param {Array<Record<string, any>>} pos\n   * @param {Record<string, any>} origin\n   */ createPaths(pos, origin) {\n        const linePathsTo = [];\n        let linePathsFrom = [];\n        const areaPathsTo = [];\n        let areaPathsFrom = [];\n        if (pos.length) {\n            linePathsFrom = [\n                this.graphics.move(origin.x, origin.y)\n            ];\n            areaPathsFrom = [\n                this.graphics.move(origin.x, origin.y)\n            ];\n            let linePathTo = this.graphics.move(pos[0].x, pos[0].y);\n            let areaPathTo = this.graphics.move(pos[0].x, pos[0].y);\n            pos.forEach((p2, i2)=>{\n                linePathTo += this.graphics.line(p2.x, p2.y);\n                areaPathTo += this.graphics.line(p2.x, p2.y);\n                if (i2 === pos.length - 1) {\n                    linePathTo += \"Z\";\n                    areaPathTo += \"Z\";\n                }\n            });\n            linePathsTo.push(linePathTo);\n            areaPathsTo.push(areaPathTo);\n        }\n        return {\n            linePathsFrom: linePathsFrom,\n            linePathsTo: linePathsTo,\n            areaPathsFrom: areaPathsFrom,\n            areaPathsTo: areaPathsTo\n        };\n    }\n    /**\n   * @param {Record<string, any>} pos\n   * @param {number} polygonSize\n   */ getTextPos(pos, polygonSize) {\n        const limit = 10;\n        let textAnchor = \"middle\";\n        let newX = pos.x;\n        let newY = pos.y;\n        if (Math.abs(pos.x) >= limit) {\n            if (pos.x > 0) {\n                textAnchor = \"start\";\n                newX += 10;\n            } else if (pos.x < 0) {\n                textAnchor = \"end\";\n                newX -= 10;\n            }\n        } else textAnchor = \"middle\";\n        if (Math.abs(pos.y) >= polygonSize - limit) {\n            if (pos.y < 0) newY -= 10;\n            else if (pos.y > 0) newY += 10;\n        }\n        return {\n            textAnchor: textAnchor,\n            newX: newX,\n            newY: newY\n        };\n    }\n    /**\n   * @param {number} realIndex\n   */ getPreviousPath(realIndex) {\n        const w2 = this.w;\n        let pathFrom = null;\n        for(let pp = 0; pp < w2.globals.previousPaths.length; pp++){\n            const gpp = w2.globals.previousPaths[pp];\n            if (gpp.paths.length > 0 && parseInt(gpp.realIndex, 10) === parseInt(String(realIndex), 10)) {\n                if (typeof w2.globals.previousPaths[pp].paths[0] !== \"undefined\") pathFrom = w2.globals.previousPaths[pp].paths[0].d;\n            }\n        }\n        return pathFrom;\n    }\n    /**\n   * @param {any[]} dataRadiusArr\n   * @param {any[]} angleArr\n   */ getDataPointsPos(dataRadiusArr, angleArr, dataPointsLen = this.dataPointsLen) {\n        dataRadiusArr = dataRadiusArr || [];\n        angleArr = angleArr || [];\n        const dataPointsPosArray = [];\n        for(let j = 0; j < dataPointsLen; j++){\n            const curPointPos = {};\n            curPointPos.x = dataRadiusArr[j] * Math.sin(angleArr[j]);\n            curPointPos.y = -dataRadiusArr[j] * Math.cos(angleArr[j]);\n            dataPointsPosArray.push(curPointPos);\n        }\n        return dataPointsPosArray;\n    }\n}\nclass $e4b487e979d7c06d$var$Radial extends $e4b487e979d7c06d$var$Pie {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        super(w2, ctx);\n        this.ctx = ctx;\n        this.w = w2;\n        this.animBeginArr = [\n            0\n        ];\n        this.animDur = 0;\n        this.startAngle = w2.config.plotOptions.radialBar.startAngle;\n        this.endAngle = w2.config.plotOptions.radialBar.endAngle;\n        this.totalAngle = Math.abs(w2.config.plotOptions.radialBar.endAngle - w2.config.plotOptions.radialBar.startAngle);\n        this.trackStartAngle = w2.config.plotOptions.radialBar.track.startAngle;\n        this.trackEndAngle = w2.config.plotOptions.radialBar.track.endAngle;\n        this.barLabels = this.w.config.plotOptions.radialBar.barLabels;\n        this.donutDataLabels = this.w.config.plotOptions.radialBar.dataLabels;\n        this.radialDataLabels = this.donutDataLabels;\n        if (!this.trackStartAngle) this.trackStartAngle = this.startAngle;\n        if (!this.trackEndAngle) this.trackEndAngle = this.endAngle;\n        if (this.endAngle === 360) this.endAngle = 359.99;\n        this.margin = parseInt(w2.config.plotOptions.radialBar.track.margin, 10);\n        this.onBarLabelClick = this.onBarLabelClick.bind(this);\n    }\n    /**\n   * @param {any[]} series\n   */ draw(series) {\n        var _a;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const ret = graphics.group({\n            class: \"apexcharts-radialbar\"\n        });\n        if (w2.globals.noData) return ret;\n        const elSeries = graphics.group();\n        const centerY = this.defaultSize / 2;\n        const centerX = w2.layout.gridWidth / 2;\n        let size = this.defaultSize / 2.05;\n        if (!w2.config.chart.sparkline.enabled) size = size - w2.config.stroke.width - w2.config.chart.dropShadow.blur;\n        const colorArr = w2.globals.fill.colors;\n        const rb = w2.config.plotOptions.radialBar;\n        const hasBands = Array.isArray(rb.bands) && rb.bands.length > 0;\n        const hideTrack = hasBands && rb.bandsStyle && rb.bandsStyle.hideTrackWhenPresent;\n        const isNeedleShape = rb.shape === \"needle\";\n        if (rb.track.show && !hideTrack) {\n            const elTracks = this.drawTracks({\n                size: size,\n                centerX: centerX,\n                centerY: centerY,\n                colorArr: colorArr,\n                series: series\n            });\n            elSeries.add(elTracks);\n        }\n        if (hasBands) {\n            const elBands = this.drawBands({\n                size: size,\n                centerX: centerX,\n                centerY: centerY,\n                series: series\n            });\n            elSeries.add(elBands);\n        }\n        const elG = this.drawArcs({\n            size: size,\n            centerX: centerX,\n            centerY: centerY,\n            colorArr: colorArr,\n            series: series,\n            // When `needle.showValueArc` is true, render both the filled value-arc\n            // and the needle on top — required for gauges that want a progress\n            // ring with a pointer indicator (default still hides the arc when in\n            // needle shape, preserving prior behavior).\n            skipValueArc: isNeedleShape && !((_a = rb.needle) == null ? void 0 : _a.showValueArc)\n        });\n        if (rb.ticks && rb.ticks.show) {\n            const elTicks = this.drawTicks({\n                size: size,\n                centerX: centerX,\n                centerY: centerY,\n                series: series\n            });\n            const isInitialMount = this.initialAnim && !w2.globals.dataChanged && !w2.globals.resized;\n            if (isInitialMount && $e4b487e979d7c06d$var$Environment.isBrowser() && w2.globals.shouldAnimate) {\n                const ticksNode = elTicks.node;\n                ticksNode.style.opacity = \"0\";\n                ticksNode.style.transition = \"opacity 280ms ease-out\";\n                const sweepDur = w2.config.chart.animations.speed || 800;\n                setTimeout(()=>{\n                    ticksNode.style.opacity = \"1\";\n                }, sweepDur);\n            }\n            elSeries.add(elTicks);\n        }\n        if (isNeedleShape) {\n            const elNeedle = this.drawNeedle({\n                size: size,\n                centerX: centerX,\n                centerY: centerY,\n                series: series\n            });\n            elSeries.add(elNeedle);\n        }\n        let totalAngle = 360;\n        if (w2.config.plotOptions.radialBar.startAngle < 0) totalAngle = this.totalAngle;\n        const angleRatio = (360 - totalAngle) / 360;\n        w2.globals.radialSize = size - size * angleRatio;\n        if (this.radialDataLabels.value.show) {\n            const offset = Math.max(this.radialDataLabels.value.offsetY, this.radialDataLabels.name.offsetY);\n            w2.globals.radialSize += offset * angleRatio;\n        }\n        elSeries.add(elG.g);\n        if (w2.config.plotOptions.radialBar.hollow.position === \"front\") {\n            elG.g.add(elG.elHollow);\n            if (elG.dataLabels) elG.g.add(elG.dataLabels);\n        }\n        ret.add(elSeries);\n        return ret;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ drawTracks(opts) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const g2 = graphics.group({\n            class: \"apexcharts-tracks\"\n        });\n        const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n        const fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        const strokeWidth = this.getStrokeWidth(opts);\n        opts.size = opts.size - strokeWidth / 2;\n        for(let i2 = 0; i2 < opts.series.length; i2++){\n            const elRadialBarTrack = graphics.group({\n                class: \"apexcharts-radialbar-track apexcharts-track\"\n            });\n            g2.add(elRadialBarTrack);\n            elRadialBarTrack.attr({\n                rel: i2 + 1\n            });\n            opts.size = opts.size - strokeWidth - this.margin;\n            const trackConfig = w2.config.plotOptions.radialBar.track;\n            const pathFill = fill.fillPath({\n                seriesNumber: 0,\n                size: opts.size,\n                fillColors: Array.isArray(trackConfig.background) ? trackConfig.background[i2] : trackConfig.background,\n                solid: true\n            });\n            const startAngle = this.trackStartAngle;\n            let endAngle = this.trackEndAngle;\n            if (Math.abs(endAngle) + Math.abs(startAngle) >= 360) endAngle = 360 - Math.abs(this.startAngle) - 0.1;\n            const elPath = graphics.drawPath({\n                d: \"\",\n                stroke: pathFill,\n                strokeWidth: strokeWidth * parseInt(trackConfig.strokeWidth, 10) / 100,\n                fill: \"none\",\n                strokeOpacity: trackConfig.opacity,\n                classes: \"apexcharts-radialbar-area\"\n            });\n            if (trackConfig.dropShadow.enabled) {\n                const shadow = trackConfig.dropShadow;\n                filters.dropShadow(elPath, shadow);\n            }\n            elRadialBarTrack.add(elPath);\n            elPath.attr(\"id\", \"apexcharts-radialbarTrack-\" + i2);\n            this.animatePaths(elPath, {\n                centerX: opts.centerX,\n                centerY: opts.centerY,\n                endAngle: endAngle,\n                startAngle: startAngle,\n                size: opts.size,\n                i: i2,\n                totalItems: 2,\n                animBeginArr: 0,\n                dur: 0,\n                isTrack: true\n            });\n        }\n        return g2;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ drawArcs(opts) {\n        var _a;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n        const g2 = graphics.group();\n        const strokeWidth = this.getStrokeWidth(opts);\n        opts.size = opts.size - strokeWidth / 2;\n        let hollowFillID = w2.config.plotOptions.radialBar.hollow.background;\n        const hollowSize = opts.size - strokeWidth * opts.series.length - this.margin * opts.series.length - strokeWidth * parseInt(w2.config.plotOptions.radialBar.track.strokeWidth, 10) / 100 / 2;\n        const hollowRadius = hollowSize - w2.config.plotOptions.radialBar.hollow.margin;\n        if (w2.config.plotOptions.radialBar.hollow.image !== void 0) hollowFillID = this.drawHollowImage(opts, g2, hollowSize, hollowFillID);\n        const elHollow = this.drawHollow({\n            size: hollowRadius,\n            centerX: opts.centerX,\n            centerY: opts.centerY,\n            fill: hollowFillID ? hollowFillID : \"transparent\"\n        });\n        if (w2.config.plotOptions.radialBar.hollow.dropShadow.enabled) {\n            const shadow = w2.config.plotOptions.radialBar.hollow.dropShadow;\n            filters.dropShadow(elHollow, shadow);\n        }\n        let shown = 1;\n        if (!this.radialDataLabels.total.show && w2.seriesData.series.length > 1) shown = 0;\n        let dataLabels = null;\n        if (this.radialDataLabels.show) {\n            const dataLabelsGroup = w2.dom.Paper.findOne(`.apexcharts-datalabels-group`);\n            dataLabels = this.renderInnerDataLabels(dataLabelsGroup, this.radialDataLabels, {\n                hollowSize: hollowSize,\n                centerX: opts.centerX,\n                centerY: opts.centerY,\n                opacity: shown\n            });\n        }\n        if (w2.config.plotOptions.radialBar.hollow.position === \"back\") {\n            g2.add(elHollow);\n            if (dataLabels) g2.add(dataLabels);\n        }\n        let reverseLoop = false;\n        if (w2.config.plotOptions.radialBar.inverseOrder) reverseLoop = true;\n        const morphActive = ((_a = this.ctx.morphTypeChange) == null ? void 0 : _a.isActive()) === true;\n        for(let i2 = reverseLoop ? opts.series.length - 1 : 0; reverseLoop ? i2 >= 0 : i2 < opts.series.length; reverseLoop ? i2-- : i2++){\n            const elRadialBarArc = graphics.group({\n                class: `apexcharts-series apexcharts-radial-series`,\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[i2])\n            });\n            g2.add(elRadialBarArc);\n            elRadialBarArc.attr({\n                rel: i2 + 1,\n                \"data:realIndex\": i2\n            });\n            $e4b487e979d7c06d$var$Series.addCollapsedClassToSeries(this.w, elRadialBarArc, i2);\n            opts.size = opts.size - strokeWidth - this.margin;\n            const pathFill = fill.fillPath({\n                seriesNumber: i2,\n                size: opts.size,\n                value: opts.series[i2]\n            });\n            const startAngle = this.startAngle;\n            let prevStartAngle;\n            const rb = w2.config.plotOptions.radialBar;\n            const domainMin = typeof rb.min === \"number\" ? rb.min : 0;\n            const domainMax = typeof rb.max === \"number\" ? rb.max : 100;\n            const domainSpan = domainMax === domainMin ? 1 : domainMax - domainMin;\n            const valueToFraction = (v2)=>{\n                const clamped = Math.min(Math.max(v2, domainMin), domainMax);\n                return Math.max(0, (clamped - domainMin) / domainSpan);\n            };\n            const dataValue = valueToFraction($e4b487e979d7c06d$var$Utils$1.negToZero(opts.series[i2]));\n            let endAngle = Math.round(this.totalAngle * dataValue) + this.startAngle;\n            let prevEndAngle;\n            if (w2.globals.dataChanged) {\n                prevStartAngle = this.startAngle;\n                prevEndAngle = Math.round(this.totalAngle * valueToFraction($e4b487e979d7c06d$var$Utils$1.negToZero(w2.globals.previousPaths[i2]))) + prevStartAngle;\n            }\n            const currFullAngle = Math.abs(endAngle) + Math.abs(startAngle);\n            if (currFullAngle > 360) endAngle = endAngle - 0.01;\n            const prevFullAngle = Math.abs(prevEndAngle) + Math.abs(prevStartAngle);\n            if (prevFullAngle > 360) prevEndAngle = prevEndAngle - 0.01;\n            const angle = endAngle - startAngle;\n            const dashArray = Array.isArray(w2.config.stroke.dashArray) ? w2.config.stroke.dashArray[i2] : w2.config.stroke.dashArray;\n            const morphFrom = morphActive ? this.ctx.morphTypeChange.getInitialPathFor(i2, 0) : null;\n            const morphFromType = morphActive ? this.ctx.morphTypeChange.getFromType() : null;\n            const morphFromFilled = !!morphFrom && (morphFromType === \"bar\" || morphFromType === \"funnel\" || morphFromType === \"pyramid\" || morphFromType === \"pie\" || morphFromType === \"donut\" || morphFromType === \"polarArea\");\n            const elPath = graphics.drawPath({\n                d: morphFrom || \"\",\n                stroke: morphFromFilled ? \"transparent\" : opts.skipValueArc ? \"transparent\" : pathFill,\n                strokeWidth: morphFromFilled ? 0 : opts.skipValueArc ? 0 : strokeWidth,\n                fill: morphFromFilled ? pathFill : \"none\",\n                fillOpacity: w2.config.fill.opacity,\n                classes: \"apexcharts-radialbar-area apexcharts-radialbar-slice-\" + i2,\n                strokeDashArray: dashArray\n            });\n            const radialMidAngle = startAngle + angle / 2;\n            const radialArcCenter = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(opts.centerX, opts.centerY, opts.size, radialMidAngle);\n            $e4b487e979d7c06d$var$Graphics.setAttrs(elPath.node, {\n                \"data:angle\": angle,\n                \"data:value\": opts.series[i2],\n                \"data:cx\": radialArcCenter.x,\n                \"data:cy\": radialArcCenter.y\n            });\n            if (w2.config.chart.dropShadow.enabled) {\n                const shadow = w2.config.chart.dropShadow;\n                filters.dropShadow(elPath, shadow, i2);\n            }\n            filters.setSelectionFilter(elPath, 0, i2);\n            this.addListeners(elPath, this.radialDataLabels);\n            elRadialBarArc.add(elPath);\n            elPath.attr({\n                index: 0,\n                j: i2\n            });\n            if (this.barLabels.enabled) {\n                const barStartCords = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(opts.centerX, opts.centerY, opts.size, startAngle);\n                const text = this.barLabels.formatter(w2.seriesData.seriesNames[i2], {\n                    seriesIndex: i2,\n                    w: w2\n                });\n                const classes = [\n                    \"apexcharts-radialbar-label\"\n                ];\n                if (!this.barLabels.onClick) classes.push(\"apexcharts-no-click\");\n                let textColor = this.barLabels.useSeriesColors ? w2.globals.colors[i2] : w2.config.chart.foreColor;\n                if (!textColor) textColor = w2.config.chart.foreColor;\n                const x = barStartCords.x + this.barLabels.offsetX;\n                const y = barStartCords.y + this.barLabels.offsetY;\n                const elText = graphics.drawText({\n                    x: x,\n                    y: y,\n                    text: text,\n                    textAnchor: \"end\",\n                    dominantBaseline: \"middle\",\n                    fontFamily: this.barLabels.fontFamily,\n                    fontWeight: this.barLabels.fontWeight,\n                    fontSize: this.barLabels.fontSize,\n                    foreColor: textColor,\n                    cssClass: classes.join(\" \")\n                });\n                elText.on(\"click\", this.onBarLabelClick);\n                elText.attr({\n                    rel: i2 + 1\n                });\n                if (startAngle !== 0) elText.attr({\n                    \"transform-origin\": `${x} ${y}`,\n                    transform: `rotate(${startAngle} 0 0)`\n                });\n                elRadialBarArc.add(elText);\n            }\n            let dur = 0;\n            if (this.initialAnim && !w2.globals.resized && !w2.globals.dataChanged) dur = w2.config.chart.animations.speed;\n            if (w2.globals.dataChanged) dur = w2.config.chart.animations.dynamicAnimation.speed;\n            this.animDur = dur / (opts.series.length * 1.2) + this.animDur;\n            this.animBeginArr.push(this.animDur);\n            if (morphActive && morphFrom) {\n                const morphSpeed = this.ctx.morphTypeChange.getSpeed();\n                const actualArcD = this.getPiePath({\n                    me: this,\n                    startAngle: startAngle,\n                    angle: angle,\n                    size: opts.size\n                });\n                if (morphFromFilled) {\n                    const targetD = this.ctx.morphTypeChange.buildRingSegmentPath(opts.centerX, opts.centerY, opts.size, strokeWidth, startAngle, startAngle + angle);\n                    elPath.animate(morphSpeed).plot(targetD, \"polygons\").after(/** @this {any} */ function() {\n                        this.attr({\n                            d: actualArcD,\n                            fill: \"none\",\n                            stroke: opts.skipValueArc ? \"transparent\" : pathFill,\n                            \"stroke-width\": opts.skipValueArc ? 0 : strokeWidth\n                        });\n                    });\n                } else elPath.animate(morphSpeed).plot(actualArcD, \"polygons\").attr({\n                    \"stroke-width\": strokeWidth\n                });\n            } else this.animatePaths(elPath, {\n                centerX: opts.centerX,\n                centerY: opts.centerY,\n                endAngle: endAngle,\n                startAngle: startAngle,\n                prevEndAngle: prevEndAngle,\n                prevStartAngle: prevStartAngle,\n                size: opts.size,\n                i: i2,\n                totalItems: 2,\n                animBeginArr: this.animBeginArr,\n                dur: dur,\n                shouldSetPrevPaths: true\n            });\n        }\n        return {\n            g: g2,\n            elHollow: elHollow,\n            dataLabels: dataLabels\n        };\n    }\n    /**\n   * Map a domain value (between `min` and `max`) to the corresponding angle\n   * in the gauge's `startAngle`..`endAngle` range. Values outside the\n   * domain are clamped.\n   *\n   * @param {number} value\n   * @returns {number}\n   */ _angleAtValue(value) {\n        const rb = this.w.config.plotOptions.radialBar;\n        const min = typeof rb.min === \"number\" ? rb.min : 0;\n        const max = typeof rb.max === \"number\" ? rb.max : 100;\n        const safeMax = max === min ? min + 1 : max;\n        const clamped = Math.max(min, Math.min(safeMax, Number(value)));\n        const t2 = (clamped - min) / (safeMax - min);\n        return this.startAngle + t2 * (this.endAngle - this.startAngle);\n    }\n    /**\n   * Build an SVG arc path from `startAngle` to `endAngle` at radius `r`\n   * around `(cx, cy)`. Angles are in degrees, with 0° at the top.\n   * Used by drawBands; mirrors the `M ... A ... ` form used elsewhere.\n   *\n   * @param {number} cx\n   * @param {number} cy\n   * @param {number} r\n   * @param {number} startAngle\n   * @param {number} endAngle\n   * @returns {string}\n   */ _describeArc(cx, cy, r2, startAngle, endAngle) {\n        const start = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(cx, cy, r2, endAngle);\n        const end = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(cx, cy, r2, startAngle);\n        const sweep = endAngle - startAngle;\n        const largeArc = Math.abs(sweep) > 180 ? 1 : 0;\n        return `M ${start.x} ${start.y} A ${r2} ${r2} 0 ${largeArc} 0 ${end.x} ${end.y}`;\n    }\n    /**\n   * Draw threshold bands as colored arc segments along the gauge arc.\n   * Bands sit behind the value-arc and tick marks. Used for gauges that\n   * indicate ranges like 0-30 critical / 30-70 warning / 70-100 healthy.\n   *\n   * @param {Record<string, any>} opts\n   */ drawBands(opts) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const rb = w2.config.plotOptions.radialBar;\n        const bands = rb.bands || [];\n        const g2 = graphics.group({\n            class: \"apexcharts-gauge-bands\"\n        });\n        const strokeWidth = this.getStrokeWidth(opts);\n        const radius = opts.size - strokeWidth / 2 - strokeWidth - this.margin;\n        const bandStroke = strokeWidth * parseInt(rb.bandsStyle.strokeWidth, 10) / 100;\n        const min = typeof rb.min === \"number\" ? rb.min : 0;\n        const max = typeof rb.max === \"number\" ? rb.max : 100;\n        const gapDeg = max === min ? 0 : (rb.bandsStyle.gap || 0) * ((this.endAngle - this.startAngle) / (max - min));\n        for(let b2 = 0; b2 < bands.length; b2++){\n            const band = bands[b2];\n            if (band.from === void 0 || band.to === void 0) continue;\n            const a1 = this._angleAtValue(band.from);\n            const a2 = this._angleAtValue(band.to);\n            const startA = Math.min(a1, a2) + gapDeg / 2;\n            const endA = Math.max(a1, a2) - gapDeg / 2;\n            if (endA - startA <= 0) continue;\n            const elBand = graphics.drawPath({\n                d: this._describeArc(opts.centerX, opts.centerY, radius, startA, endA),\n                stroke: band.color || \"#ccc\",\n                strokeWidth: bandStroke,\n                fill: \"none\",\n                strokeLinecap: rb.bandsStyle.linecap || \"butt\",\n                classes: \"apexcharts-gauge-band\"\n            });\n            elBand.node.setAttribute(\"data-band-index\", String(b2));\n            g2.add(elBand);\n        }\n        return g2;\n    }\n    /**\n   * Draw tick marks (major + minor) along the gauge arc, with optional\n   * value labels at each major tick.\n   *\n   * @param {Record<string, any>} opts\n   */ drawTicks(opts) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const rb = w2.config.plotOptions.radialBar;\n        const ticks = rb.ticks;\n        const g2 = graphics.group({\n            class: \"apexcharts-gauge-ticks\"\n        });\n        const strokeWidth = this.getStrokeWidth(opts);\n        const radius = opts.size - strokeWidth / 2 - strokeWidth - this.margin;\n        const min = typeof rb.min === \"number\" ? rb.min : 0;\n        const max = typeof rb.max === \"number\" ? rb.max : 100;\n        const majorCount = Math.max(2, (_b = (_a = ticks.major) == null ? void 0 : _a.count) != null ? _b : 11);\n        const minorCount = Math.max(0, (_d = (_c = ticks.minor) == null ? void 0 : _c.count) != null ? _d : 0);\n        const drawTickAt = (value, cfg, isMajor)=>{\n            var _a2, _b2, _c2;\n            const angle = this._angleAtValue(value);\n            const length = (_a2 = cfg.length) != null ? _a2 : 8;\n            const inner = cfg.placement === \"inside\" ? radius - length : radius;\n            const outer = cfg.placement === \"inside\" ? radius : radius + length;\n            const p1 = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(opts.centerX, opts.centerY, inner, angle);\n            const p2 = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(opts.centerX, opts.centerY, outer, angle);\n            const line = graphics.drawLine(p1.x, p1.y, p2.x, p2.y, cfg.color || (isMajor ? \"#666\" : \"#999\"), 0, cfg.width || (isMajor ? 2 : 1));\n            g2.add(line);\n            if (isMajor && ((_b2 = ticks.labels) == null ? void 0 : _b2.show)) {\n                const labelRadius = (cfg.placement === \"inside\" ? inner : outer) + (cfg.placement === \"inside\" ? -1 : 1) * ((_c2 = ticks.labels.offset) != null ? _c2 : 6);\n                const labelPos = $e4b487e979d7c06d$var$Utils$1.polarToCartesian(opts.centerX, opts.centerY, labelRadius, angle);\n                const labelText = typeof ticks.labels.formatter === \"function\" ? ticks.labels.formatter(value) : String(value);\n                const elText = graphics.drawText({\n                    x: labelPos.x,\n                    y: labelPos.y,\n                    text: labelText,\n                    textAnchor: \"middle\",\n                    dominantBaseline: \"middle\",\n                    fontFamily: ticks.labels.fontFamily,\n                    fontSize: ticks.labels.fontSize,\n                    fontWeight: ticks.labels.fontWeight,\n                    foreColor: ticks.labels.color,\n                    cssClass: \"apexcharts-gauge-tick-label\"\n                });\n                g2.add(elText);\n            }\n        };\n        for(let m2 = 0; m2 < majorCount; m2++){\n            const t2 = m2 / (majorCount - 1);\n            const value = min + t2 * (max - min);\n            drawTickAt(value, ticks.major || {}, true);\n            if (m2 < majorCount - 1 && minorCount > 0) for(let n2 = 1; n2 <= minorCount; n2++){\n                const tMinor = (m2 + n2 / (minorCount + 1)) / (majorCount - 1);\n                const minorValue = min + tMinor * (max - min);\n                drawTickAt(minorValue, ticks.minor || {}, false);\n            }\n        }\n        return g2;\n    }\n    /**\n   * Draw a rotating needle pointing at the current series value. Only\n   * called when `plotOptions.radialBar.shape === 'needle'`. The needle is\n   * a tapered polygon inside a `<g>` whose rotation transform is animated\n   * from `startAngle` to the value's angle.\n   *\n   * Renders a single needle for the first series value (gauge use case).\n   * Additional series are ignored — drilled-down multi-series gauges are\n   * out of scope for this iteration.\n   *\n   * @param {Record<string, any>} opts\n   */ drawNeedle(opts) {\n        var _a, _b, _c, _d, _e;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const rb = w2.config.plotOptions.radialBar;\n        const cfg = rb.needle || {};\n        const g2 = graphics.group({\n            class: \"apexcharts-gauge-needle\"\n        });\n        if (!opts.series || opts.series.length === 0) return g2;\n        const strokeWidth = this.getStrokeWidth(opts);\n        const arcRadius = opts.size - strokeWidth / 2 - strokeWidth - this.margin;\n        const length = typeof cfg.length === \"string\" && cfg.length.endsWith(\"%\") ? arcRadius * parseInt(cfg.length, 10) / 100 : Number(cfg.length || arcRadius * 0.85);\n        const baseW = (_a = cfg.baseWidth) != null ? _a : 4;\n        const tipW = (_b = cfg.tipWidth) != null ? _b : 1;\n        const color = cfg.color || \"#333\";\n        const cx = opts.centerX;\n        const needleOffsetY = Number((_c = cfg.offsetY) != null ? _c : 0);\n        const cy = opts.centerY + needleOffsetY;\n        const path = `M ${cx + baseW / 2} ${cy} A ${baseW / 2} ${baseW / 2} 0 0 1 ${cx - baseW / 2} ${cy} L ${cx - tipW / 2} ${cy - length} L ${cx + tipW / 2} ${cy - length} Z`;\n        const elNeedle = graphics.drawPath({\n            d: path,\n            stroke: color,\n            strokeWidth: 0,\n            fill: color,\n            classes: \"apexcharts-gauge-needle-shape\"\n        });\n        g2.add(elNeedle);\n        const value = Number(opts.series[0]);\n        const targetAngle = this._angleAtValue(value);\n        const isInitialMount = this.initialAnim && !w2.globals.dataChanged && !w2.globals.resized;\n        const ctx = /** @type {any} */ this.ctx;\n        const fromAngle = typeof ctx._lastNeedleAngle === \"number\" ? ctx._lastNeedleAngle : this.startAngle;\n        ctx._lastNeedleAngle = targetAngle;\n        const shouldAnimate = $e4b487e979d7c06d$var$Environment.isBrowser() && w2.globals.shouldAnimate && (isInitialMount || w2.globals.dataChanged);\n        if (shouldAnimate && fromAngle !== targetAngle) {\n            const node = g2.node;\n            node.setAttribute(\"transform-origin\", `${cx} ${cy}`);\n            node.setAttribute(\"transform\", `rotate(${fromAngle})`);\n            const speed = ((_d = cfg.animation) == null ? void 0 : _d.duration) && Number(cfg.animation.duration) || cfg.animationSpeed && Number(cfg.animationSpeed) || ((_e = w2.config.chart.animations.dynamicAnimation) == null ? void 0 : _e.speed) || w2.config.chart.animations.speed || 800;\n            const c1 = 1.70158;\n            const c3 = c1 + 1;\n            const easeOutBack2 = (t2)=>1 + c3 * Math.pow(t2 - 1, 3) + c1 * Math.pow(t2 - 1, 2);\n            const easeOutCubic2 = (t2)=>1 - Math.pow(1 - t2, 3);\n            const ease = isInitialMount ? easeOutBack2 : easeOutCubic2;\n            if (w2.globals.radialNeedleRAF != null) {\n                $e4b487e979d7c06d$var$BrowserAPIs.cancelAnimationFrame(w2.globals.radialNeedleRAF);\n                w2.globals.radialNeedleRAF = null;\n            }\n            const startAt = performance.now();\n            const step = (now)=>{\n                if (this.w.globals.isDestroyed) {\n                    w2.globals.radialNeedleRAF = null;\n                    return;\n                }\n                const t2 = Math.max(0, Math.min(1, (now - startAt) / speed));\n                const angle = fromAngle + (targetAngle - fromAngle) * ease(t2);\n                node.setAttribute(\"transform\", `rotate(${angle})`);\n                if (t2 < 1) w2.globals.radialNeedleRAF = $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n                else w2.globals.radialNeedleRAF = null;\n            };\n            w2.globals.radialNeedleRAF = $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(step);\n        } else g2.attr({\n            \"transform-origin\": `${cx} ${cy}`,\n            transform: `rotate(${targetAngle})`\n        });\n        return g2;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ drawHollow(opts) {\n        var _a;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const hollow = this.w.config.plotOptions.radialBar.hollow;\n        const circle = graphics.drawCircle(opts.size * 2);\n        const attrs = {\n            class: \"apexcharts-radialbar-hollow\",\n            cx: opts.centerX,\n            cy: opts.centerY,\n            r: opts.size,\n            fill: opts.fill\n        };\n        if (hollow.stroke || hollow.strokeDasharray) {\n            attrs.stroke = hollow.stroke || \"transparent\";\n            attrs[\"stroke-width\"] = (_a = hollow.strokeWidth) != null ? _a : 1;\n            if (hollow.strokeDasharray) attrs[\"stroke-dasharray\"] = hollow.strokeDasharray;\n        }\n        circle.attr(attrs);\n        return circle;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   * @param {any} g\n   * @param {number} hollowSize\n   * @param {string} hollowFillID\n   */ drawHollowImage(opts, g2, hollowSize, hollowFillID) {\n        const w2 = this.w;\n        const fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        const randID = $e4b487e979d7c06d$var$Utils$1.randomId();\n        const hollowFillImg = w2.config.plotOptions.radialBar.hollow.image;\n        if (w2.config.plotOptions.radialBar.hollow.imageClipped) {\n            fill.clippedImgArea({\n                width: hollowSize,\n                height: hollowSize,\n                image: hollowFillImg,\n                patternID: `pattern${w2.globals.cuid}${randID}`\n            });\n            hollowFillID = `url(#pattern${w2.globals.cuid}${randID})`;\n        } else {\n            const imgWidth = w2.config.plotOptions.radialBar.hollow.imageWidth;\n            const imgHeight = w2.config.plotOptions.radialBar.hollow.imageHeight;\n            if (imgWidth === void 0 && imgHeight === void 0) {\n                const image = w2.dom.Paper.image(hollowFillImg, /** @this {any} */ function(loader) {\n                    this.move(opts.centerX - loader.width / 2 + w2.config.plotOptions.radialBar.hollow.imageOffsetX, opts.centerY - loader.height / 2 + w2.config.plotOptions.radialBar.hollow.imageOffsetY);\n                });\n                g2.add(image);\n            } else {\n                const image = w2.dom.Paper.image(hollowFillImg, /** @this {any} */ function() {\n                    this.move(opts.centerX - imgWidth / 2 + w2.config.plotOptions.radialBar.hollow.imageOffsetX, opts.centerY - imgHeight / 2 + w2.config.plotOptions.radialBar.hollow.imageOffsetY);\n                    this.size(imgWidth, imgHeight);\n                });\n                g2.add(image);\n            }\n        }\n        return hollowFillID;\n    }\n    /**\n   * @param {Record<string, any>} opts\n   */ getStrokeWidth(opts) {\n        const w2 = this.w;\n        return opts.size * (100 - parseInt(w2.config.plotOptions.radialBar.hollow.size, 10)) / 100 / (opts.series.length + 1) - this.margin;\n    }\n    /**\n   * @param {Event} e\n   */ onBarLabelClick(e2) {\n        var _a;\n        const target = /** @type {Element} */ e2.target;\n        const seriesIndex = parseInt((_a = target.getAttribute(\"rel\")) != null ? _a : \"\", 10) - 1;\n        const legendClick = this.barLabels.onClick;\n        const w2 = this.w;\n        if (legendClick) legendClick(w2.seriesData.seriesNames[seriesIndex], {\n            w: w2,\n            seriesIndex: seriesIndex\n        });\n    }\n}\nclass $e4b487e979d7c06d$var$RangeBar extends $e4b487e979d7c06d$var$Bar {\n    /**\n   * @param {any[]} series\n   * @param {number} seriesIndex\n   */ draw(series, seriesIndex) {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        this.rangeBarOptions = this.w.config.plotOptions.rangeBar;\n        this.series = series;\n        this.seriesRangeStart = w2.rangeData.seriesRangeStart;\n        this.seriesRangeEnd = w2.rangeData.seriesRangeEnd;\n        this.barHelpers.initVariables(series);\n        const ret = graphics.group({\n            class: \"apexcharts-rangebar-series apexcharts-plot-series\"\n        });\n        for(let i2 = 0; i2 < series.length; i2++){\n            let x, y;\n            const realIndex = w2.globals.comboCharts ? /** @type {any} */ seriesIndex[i2] : i2;\n            const { columnGroupIndex: columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);\n            const elSeries = graphics.group({\n                class: `apexcharts-series`,\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n                rel: i2 + 1,\n                \"data:realIndex\": realIndex\n            });\n            $e4b487e979d7c06d$var$Series.addCollapsedClassToSeries(this.w, elSeries, realIndex);\n            if (series[i2].length > 0) this.visibleI = this.visibleI + 1;\n            let translationsIndex = 0;\n            if (this.yRatio.length > 1) {\n                this.yaxisIndex = /** @type {any} */ w2.globals.seriesYAxisReverseMap[realIndex][0];\n                translationsIndex = realIndex;\n            }\n            const initPositions = this.barHelpers.initialPositions(realIndex);\n            const { y: initY, zeroW: zeroW, // zeroW is the baseline where 0 meets x axis\n            x: initX, zeroH: zeroH } = initPositions;\n            let barWidth = (_a = initPositions.barWidth) != null ? _a : 0;\n            let barHeight = (_b = initPositions.barHeight) != null ? _b : 0;\n            const yDivision = (_c = initPositions.yDivision) != null ? _c : 0;\n            const xDivision = (_d = initPositions.xDivision) != null ? _d : 0;\n            y = initY;\n            x = initX;\n            const elDataLabelsWrap = graphics.group({\n                class: \"apexcharts-datalabels\",\n                \"data:realIndex\": realIndex\n            });\n            const elGoalsMarkers = graphics.group({\n                class: \"apexcharts-rangebar-goals-markers\"\n            });\n            for(let j = 0; j < w2.globals.dataPoints; j++){\n                const strokeWidth = this.barHelpers.getStrokeWidth(i2, j, realIndex);\n                const y1 = this.seriesRangeStart[i2][j];\n                const y2 = this.seriesRangeEnd[i2][j];\n                let paths = /** @type {any} */ null;\n                let barXPosition = null;\n                let barYPosition = null;\n                const params = {\n                    x: x,\n                    y: y,\n                    strokeWidth: strokeWidth,\n                    elSeries: elSeries\n                };\n                let seriesLen = this.seriesLen;\n                if (w2.config.plotOptions.bar.rangeBarGroupRows) seriesLen = 1;\n                if (typeof /** @type {Record<string,any>} */ ((_e = w2.config.series[i2].data) == null ? void 0 : _e[j]) === \"undefined\") break;\n                if (this.isHorizontal) {\n                    barYPosition = y + barHeight * /** @type {any} */ this.visibleI;\n                    const srty = (yDivision - barHeight * seriesLen) / 2;\n                    if (/** @type {Record<string,any>} */ (_g = (_f = w2.config.series[i2].data) == null ? void 0 : _f[j]) == null ? void 0 : _g.x) {\n                        const positions = this.detectOverlappingBars({\n                            i: i2,\n                            j: j,\n                            barYPosition: barYPosition,\n                            srty: srty,\n                            barHeight: barHeight,\n                            yDivision: yDivision,\n                            initPositions: initPositions\n                        });\n                        barHeight = positions.barHeight;\n                        barYPosition = positions.barYPosition;\n                    }\n                    paths = this.drawRangeBarPaths($e4b487e979d7c06d$var$__spreadValues({\n                        indexes: {\n                            i: i2,\n                            j: j,\n                            realIndex: realIndex\n                        },\n                        barHeight: barHeight,\n                        barYPosition: barYPosition,\n                        zeroW: zeroW,\n                        yDivision: yDivision,\n                        y1: y1,\n                        y2: y2\n                    }, params));\n                    barWidth = paths.barWidth;\n                } else {\n                    if (w2.axisFlags.isXNumeric) x = (w2.seriesData.seriesX[i2][j] - w2.globals.minX) / this.xRatio - barWidth / 2;\n                    barXPosition = x + barWidth * /** @type {any} */ this.visibleI;\n                    const srtx = (xDivision - barWidth * seriesLen) / 2;\n                    if (/** @type {Record<string,any>} */ (_i = (_h = w2.config.series[i2].data) == null ? void 0 : _h[j]) == null ? void 0 : _i.x) {\n                        const positions = this.detectOverlappingBars({\n                            i: i2,\n                            j: j,\n                            barXPosition: barXPosition,\n                            srtx: srtx,\n                            barWidth: barWidth,\n                            xDivision: xDivision,\n                            initPositions: initPositions\n                        });\n                        barWidth = positions.barWidth;\n                        barXPosition = positions.barXPosition;\n                    }\n                    paths = this.drawRangeColumnPaths($e4b487e979d7c06d$var$__spreadValues({\n                        indexes: {\n                            i: i2,\n                            j: j,\n                            realIndex: realIndex,\n                            translationsIndex: translationsIndex\n                        },\n                        barWidth: barWidth,\n                        barXPosition: barXPosition,\n                        zeroH: zeroH,\n                        xDivision: xDivision\n                    }, params));\n                    barHeight = paths.barHeight;\n                }\n                const barGoalLine = this.barHelpers.drawGoalLine({\n                    barXPosition: paths.barXPosition,\n                    barYPosition: barYPosition,\n                    goalX: paths.goalX,\n                    goalY: paths.goalY,\n                    barHeight: barHeight,\n                    barWidth: barWidth\n                });\n                if (barGoalLine) elGoalsMarkers.add(barGoalLine);\n                y = paths.y;\n                x = paths.x;\n                const pathFill = this.barHelpers.getPathFillColor(series, i2, j, realIndex);\n                this.renderSeries({\n                    realIndex: realIndex,\n                    pathFill: pathFill.color,\n                    lineFill: pathFill.useRangeColor ? pathFill.color : w2.globals.stroke.colors[realIndex],\n                    j: j,\n                    i: i2,\n                    x: x,\n                    y: y,\n                    y1: y1,\n                    y2: y2,\n                    pathFrom: paths.pathFrom,\n                    pathTo: paths.pathTo,\n                    strokeWidth: strokeWidth,\n                    elSeries: elSeries,\n                    series: series,\n                    barHeight: barHeight,\n                    barWidth: barWidth,\n                    barXPosition: barXPosition,\n                    barYPosition: barYPosition,\n                    columnGroupIndex: columnGroupIndex,\n                    elDataLabelsWrap: elDataLabelsWrap,\n                    elGoalsMarkers: elGoalsMarkers,\n                    visibleSeries: this.visibleI,\n                    type: \"rangebar\"\n                });\n            }\n            ret.add(elSeries);\n        }\n        return ret;\n    }\n    /** @param {{ i?: any, j?: any, barYPosition?: any, barXPosition?: any, srty?: any, srtx?: any, barHeight?: any, barWidth?: any, yDivision?: any, xDivision?: any, initPositions?: any }} opts */ detectOverlappingBars({ i: i2, j: j, barYPosition: barYPosition, barXPosition: barXPosition, srty: srty, srtx: srtx, barHeight: barHeight, barWidth: barWidth, yDivision: yDivision, xDivision: xDivision, initPositions: initPositions }) {\n        var _a, _b, _c, _d;\n        const w2 = this.w;\n        let overlaps = [];\n        const rangeName = (_b = (_a = w2.globals.seriesRangeName) == null ? void 0 : _a[i2]) == null ? void 0 : _b[j];\n        const x = /** @type {Record<string,any>} */ (_d = (_c = w2.config.series[i2].data) == null ? void 0 : _c[j]) == null ? void 0 : _d.x;\n        const labelX = Array.isArray(x) ? x.join(\" \") : x;\n        const rowIndex = w2.labelData.labels.map((_)=>Array.isArray(_) ? _.join(\" \") : _).indexOf(labelX);\n        const overlappedIndex = w2.rangeData.seriesRange[i2].findIndex((tx)=>{\n            var _a2;\n            return tx.x === labelX && ((_a2 = tx.overlaps) == null ? void 0 : _a2.size) > 0;\n        });\n        if (this.isHorizontal) {\n            if (w2.config.plotOptions.bar.rangeBarGroupRows) barYPosition = srty + yDivision * rowIndex;\n            else barYPosition = srty + barHeight * this.visibleI + yDivision * rowIndex;\n            if (overlappedIndex > -1 && !w2.config.plotOptions.bar.rangeBarOverlap) {\n                overlaps = Array.from(/** @type {any} */ w2.rangeData.seriesRange[i2][overlappedIndex].overlaps);\n                if (overlaps.indexOf(rangeName) > -1) {\n                    barHeight = initPositions.barHeight / overlaps.length;\n                    barYPosition = barHeight * this.visibleI + yDivision * (100 - parseInt(this.barOptions.barHeight, 10)) / 100 / 2 + barHeight * (this.visibleI + overlaps.indexOf(rangeName)) + yDivision * rowIndex;\n                }\n            }\n        } else {\n            if (rowIndex > -1 && !w2.labelData.timescaleLabels.length) {\n                if (w2.config.plotOptions.bar.rangeBarGroupRows) barXPosition = srtx + xDivision * rowIndex;\n                else barXPosition = srtx + barWidth * this.visibleI + xDivision * rowIndex;\n            }\n            if (overlappedIndex > -1 && !w2.config.plotOptions.bar.rangeBarOverlap) {\n                overlaps = Array.from(/** @type {any} */ w2.rangeData.seriesRange[i2][overlappedIndex].overlaps);\n                if (overlaps.indexOf(rangeName) > -1) {\n                    barWidth = initPositions.barWidth / overlaps.length;\n                    barXPosition = barWidth * this.visibleI + xDivision * (100 - parseInt(this.barOptions.barWidth, 10)) / 100 / 2 + barWidth * (this.visibleI + overlaps.indexOf(rangeName)) + xDivision * rowIndex;\n                }\n            }\n        }\n        return {\n            barYPosition: barYPosition,\n            barXPosition: barXPosition,\n            barHeight: barHeight,\n            barWidth: barWidth\n        };\n    }\n    /** @param {{indexes: any, x: any, xDivision: any, barWidth: any, barXPosition: any, zeroH: any}} opts */ drawRangeColumnPaths({ indexes: indexes, x: x, xDivision: xDivision, barWidth: barWidth, barXPosition: barXPosition, zeroH: zeroH }) {\n        var _a, _b;\n        const w2 = this.w;\n        const { i: i2, j: j, realIndex: realIndex, translationsIndex: translationsIndex } = indexes;\n        const yRatio = this.yRatio[translationsIndex];\n        const range = this.getRangeValue(realIndex, j);\n        let y1 = Math.min(range.start, range.end);\n        let y2 = Math.max(range.start, range.end);\n        if (typeof /** @type {any} */ ((_a = this.series[i2]) == null ? void 0 : _a[j]) === \"undefined\" || /** @type {any} */ ((_b = this.series[i2]) == null ? void 0 : _b[j]) === null) y1 = zeroH;\n        else {\n            y1 = zeroH - y1 / yRatio;\n            y2 = zeroH - y2 / yRatio;\n        }\n        const barHeight = Math.abs(y2 - y1);\n        const paths = this.barHelpers.getColumnPaths({\n            barXPosition: barXPosition,\n            barWidth: barWidth,\n            y1: y1,\n            y2: y2,\n            strokeWidth: this.strokeWidth,\n            series: this.seriesRangeEnd,\n            realIndex: realIndex,\n            i: realIndex,\n            j: j,\n            w: w2\n        });\n        if (!w2.axisFlags.isXNumeric) x = x + xDivision;\n        else {\n            const xForNumericXAxis = this.getBarXForNumericXAxis({\n                x: x,\n                j: j,\n                realIndex: realIndex,\n                barWidth: barWidth\n            });\n            x = xForNumericXAxis.x;\n            barXPosition = xForNumericXAxis.barXPosition;\n        }\n        return {\n            pathTo: paths.pathTo,\n            pathFrom: paths.pathFrom,\n            barHeight: barHeight,\n            x: x,\n            y: range.start < 0 && range.end < 0 ? y1 : y2,\n            goalY: this.barHelpers.getGoalValues(\"y\", /** @type {any} */ null, zeroH, realIndex, j, translationsIndex),\n            barXPosition: barXPosition\n        };\n    }\n    /**\n   * @param {number} val\n   */ preventBarOverflow(val) {\n        const w2 = this.w;\n        if (val < 0) val = 0;\n        if (val > w2.layout.gridWidth) val = w2.layout.gridWidth;\n        return val;\n    }\n    /** @param {{indexes: any, y: any, y1: any, y2: any, yDivision: any, barHeight: any, barYPosition: any, zeroW: any}} opts */ drawRangeBarPaths({ indexes: indexes, y: y, y1: y1, y2: y2, yDivision: yDivision, barHeight: barHeight, barYPosition: barYPosition, zeroW: zeroW }) {\n        const w2 = this.w;\n        const { realIndex: realIndex, j: j } = indexes;\n        const x1 = this.preventBarOverflow(zeroW + y1 / this.invertedYRatio);\n        const x2 = this.preventBarOverflow(zeroW + y2 / this.invertedYRatio);\n        const range = this.getRangeValue(realIndex, j);\n        const barWidth = Math.abs(x2 - x1);\n        const paths = this.barHelpers.getBarpaths({\n            barYPosition: barYPosition,\n            barHeight: barHeight,\n            x1: x1,\n            x2: x2,\n            strokeWidth: this.strokeWidth,\n            series: this.seriesRangeEnd,\n            i: realIndex,\n            realIndex: realIndex,\n            j: j,\n            w: w2\n        });\n        if (!w2.axisFlags.isXNumeric) y = y + yDivision;\n        return {\n            pathTo: paths.pathTo,\n            pathFrom: paths.pathFrom,\n            barWidth: barWidth,\n            x: range.start < 0 && range.end < 0 ? x1 : x2,\n            goalX: this.barHelpers.getGoalValues(\"x\", zeroW, /** @type {any} */ null, realIndex, j, 0),\n            y: y\n        };\n    }\n    /**\n   * @param {number} i\n   * @param {number} j\n   */ getRangeValue(i2, j) {\n        const w2 = this.w;\n        return {\n            start: w2.rangeData.seriesRangeStart[i2][j],\n            end: w2.rangeData.seriesRangeEnd[i2][j]\n        };\n    }\n}\nfunction $e4b487e979d7c06d$var$normalize(data, area) {\n    let sum = 0;\n    for(let i2 = 0; i2 < data.length; i2++)sum += data[i2];\n    const multiplier = area / sum;\n    const result = new Array(data.length);\n    for(let i2 = 0; i2 < data.length; i2++)result[i2] = data[i2] * multiplier;\n    return result;\n}\nfunction $e4b487e979d7c06d$var$calculateRatio(rowMin, rowMax, rowSum, length) {\n    const lengthSq = length * length;\n    const sumSq = rowSum * rowSum;\n    return Math.max(lengthSq * rowMax / sumSq, sumSq / (lengthSq * rowMin));\n}\nfunction $e4b487e979d7c06d$var$improvesRatio(rowLen, rowMin, rowMax, rowSum, nextNode, length) {\n    if (rowLen === 0) return true;\n    const currentRatio = $e4b487e979d7c06d$var$calculateRatio(rowMin, rowMax, rowSum, length);\n    const newRatio = $e4b487e979d7c06d$var$calculateRatio(Math.min(rowMin, nextNode), Math.max(rowMax, nextNode), rowSum + nextNode, length);\n    return currentRatio >= newRatio;\n}\nfunction $e4b487e979d7c06d$var$emitCoordinates(coords, row, rowLen, rowSum, xoffset, yoffset, width, height) {\n    if (width >= height) {\n        const areaWidth = rowSum / height;\n        let subY = yoffset;\n        for(let i2 = 0; i2 < rowLen; i2++){\n            const h2 = row[i2] / areaWidth;\n            coords.push([\n                xoffset,\n                subY,\n                xoffset + areaWidth,\n                subY + h2\n            ]);\n            subY += h2;\n        }\n    } else {\n        const areaHeight = rowSum / width;\n        let subX = xoffset;\n        for(let i2 = 0; i2 < rowLen; i2++){\n            const w2 = row[i2] / areaHeight;\n            coords.push([\n                subX,\n                yoffset,\n                subX + w2,\n                yoffset + areaHeight\n            ]);\n            subX += w2;\n        }\n    }\n}\nfunction $e4b487e979d7c06d$var$squarify(data, xoffset, yoffset, width, height) {\n    const coords = [];\n    const n2 = data.length;\n    if (n2 === 0) return coords;\n    const row = new Array(n2);\n    let rowLen = 0;\n    let rowSum = 0;\n    let rowMin = Infinity;\n    let rowMax = -Infinity;\n    let i2 = 0;\n    while(i2 < n2){\n        const length = Math.min(width, height);\n        const val = data[i2];\n        if ($e4b487e979d7c06d$var$improvesRatio(rowLen, rowMin, rowMax, rowSum, val, length)) {\n            row[rowLen] = val;\n            rowLen++;\n            rowSum += val;\n            if (val < rowMin) rowMin = val;\n            if (val > rowMax) rowMax = val;\n            i2++;\n        } else {\n            $e4b487e979d7c06d$var$emitCoordinates(coords, row, rowLen, rowSum, xoffset, yoffset, width, height);\n            if (width >= height) {\n                const areaWidth = rowSum / height;\n                xoffset += areaWidth;\n                width -= areaWidth;\n            } else {\n                const areaHeight = rowSum / width;\n                yoffset += areaHeight;\n                height -= areaHeight;\n            }\n            rowLen = 0;\n            rowSum = 0;\n            rowMin = Infinity;\n            rowMax = -Infinity;\n        }\n    }\n    if (rowLen > 0) $e4b487e979d7c06d$var$emitCoordinates(coords, row, rowLen, rowSum, xoffset, yoffset, width, height);\n    return coords;\n}\nfunction $e4b487e979d7c06d$var$generate(data, width, height) {\n    const n2 = data.length;\n    const sums = new Array(n2);\n    for(let i2 = 0; i2 < n2; i2++){\n        let s2 = 0;\n        const series = data[i2];\n        for(let j = 0; j < series.length; j++)s2 += series[j];\n        sums[i2] = s2;\n    }\n    const seriesRects = $e4b487e979d7c06d$var$squarify($e4b487e979d7c06d$var$normalize(sums, width * height), 0, 0, width, height);\n    const results = new Array(n2);\n    for(let i2 = 0; i2 < n2; i2++){\n        const rect = seriesRects[i2];\n        const rx = rect[0];\n        const ry = rect[1];\n        const rw = rect[2] - rx;\n        const rh = rect[3] - ry;\n        results[i2] = $e4b487e979d7c06d$var$squarify($e4b487e979d7c06d$var$normalize(data[i2], rw * rh), rx, ry, rw, rh);\n    }\n    return results;\n}\nfunction $e4b487e979d7c06d$var$computeArea(node) {\n    const kids = node.children;\n    if (kids && kids.length) {\n        let s2 = 0;\n        for(let i2 = 0; i2 < kids.length; i2++)s2 += $e4b487e979d7c06d$var$computeArea(kids[i2]);\n        node._area = s2;\n        return s2;\n    }\n    const v2 = Number(node.value);\n    const a2 = isNaN(v2) ? 0 : Math.abs(v2);\n    node._area = a2;\n    return a2;\n}\nfunction $e4b487e979d7c06d$var$layoutLevel(nodes, xoffset, yoffset, width, height, depth, padding, header) {\n    const n2 = nodes.length;\n    if (n2 === 0 || width <= 0 || height <= 0) return;\n    const areas = new Array(n2);\n    let total = 0;\n    for(let i2 = 0; i2 < n2; i2++){\n        areas[i2] = nodes[i2]._area;\n        total += areas[i2];\n    }\n    if (total <= 0) return;\n    const rects = $e4b487e979d7c06d$var$squarify($e4b487e979d7c06d$var$normalize(areas, width * height), xoffset, yoffset, width, height);\n    for(let i2 = 0; i2 < n2; i2++){\n        const node = nodes[i2];\n        const r2 = rects[i2];\n        if (!r2) continue;\n        node.rect = r2;\n        node.depth = depth;\n        const kids = node.children;\n        if (!kids || !kids.length) continue;\n        const rw = r2[2] - r2[0];\n        const rh = r2[3] - r2[1];\n        let pad = Math.max(0, padding(node, depth, rw, rh) || 0);\n        if (pad * 2 >= rw || pad * 2 >= rh) pad = 0;\n        let head = Math.max(0, header(node, depth, rw, rh) || 0);\n        if (head > 0 && rh - pad * 2 - head < head) head = 0;\n        node.headerHeight = head;\n        $e4b487e979d7c06d$var$layoutLevel(kids, r2[0] + pad, r2[1] + head + pad, rw - pad * 2, rh - head - pad * 2, depth + 1, padding, header);\n    }\n}\nfunction $e4b487e979d7c06d$var$generateNested(nodes, width, height, opts = {}) {\n    if (!Array.isArray(nodes) || nodes.length === 0) return nodes || [];\n    const padding = opts.padding || (()=>0);\n    const header = opts.header || (()=>0);\n    for(let i2 = 0; i2 < nodes.length; i2++)$e4b487e979d7c06d$var$computeArea(nodes[i2]);\n    $e4b487e979d7c06d$var$layoutLevel(nodes, 0, 0, width, height, 0, padding, header);\n    return nodes;\n}\nconst $e4b487e979d7c06d$var$TreemapSquared = {\n    generate: $e4b487e979d7c06d$var$generate,\n    generateNested: $e4b487e979d7c06d$var$generateNested\n};\nconst $e4b487e979d7c06d$var$areaOf = (r2)=>(r2[2] - r2[0]) * (r2[3] - r2[1]);\nclass $e4b487e979d7c06d$var$TreemapChart {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.ctx = ctx;\n        this.w = w2;\n        this.strokeWidth = this.w.config.stroke.width;\n        this.helpers = new $e4b487e979d7c06d$var$TreemapHelpers(w2, ctx);\n        this.dynamicAnim = this.w.config.chart.animations.dynamicAnimation;\n        this.labels = [];\n        this.roots = [];\n        this.drawn = [];\n        this.nested = false;\n        this.showParents = false;\n        this.scale = null;\n        this._levelCache = null;\n        this._total = null;\n        this._avgLabelSize = null;\n        this._tooltipEl = null;\n        this._tipOwned = false;\n        this._morphLeafIndex = 0;\n    }\n    /**\n   * @param {any[]} series\n   */ draw(series) {\n        var _a;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n        const fill = new $e4b487e979d7c06d$var$Fill(this.w);\n        const ret = graphics.group({\n            class: \"apexcharts-treemap\"\n        });\n        if (w2.globals.noData) return ret;\n        series.forEach((s2)=>{\n            s2.map((v2)=>{\n                return Math.abs(v2);\n            });\n        });\n        this.negRange = this.helpers.checkColorRange();\n        w2.config.series.forEach((s2, i2)=>{\n            s2.data.forEach((l2)=>{\n                if (!Array.isArray(this.labels[i2])) this.labels[i2] = [];\n                this.labels[i2].push(l2.x);\n            });\n        });\n        const tree = $e4b487e979d7c06d$var$getTreemapRoots(w2);\n        this.nested = tree.nested;\n        this.roots = tree.roots;\n        this.scale = $e4b487e979d7c06d$var$buildContinuousScale(w2);\n        const drawn = tree.roots.length === 1 ? tree.roots[0].children || [] : tree.roots;\n        this.drawn = drawn;\n        const parentsCfg = w2.config.plotOptions.treemap.parents;\n        this.showParents = parentsCfg.show === true || parentsCfg.show !== false && this.nested;\n        const focus = this._resolveFocus(drawn);\n        const layoutRoots = focus ? [\n            focus\n        ] : drawn;\n        $e4b487e979d7c06d$var$TreemapSquared.generateNested(layoutRoots, w2.layout.gridWidth, w2.layout.gridHeight, {\n            padding: (node, depth, rw, rh)=>this.showParents ? this._levelPadding(depth, rw, rh) : 0,\n            header: (node, depth, rw, rh)=>this.showParents ? this._levelHeader(node, depth, rw, rh) : 0\n        });\n        const morphSrc = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange;\n        const morphActive = !!morphSrc && typeof morphSrc.isActive === \"function\" && morphSrc.isActive() && typeof morphSrc.getInitialPathAt === \"function\";\n        this._morphLeafIndex = 0;\n        const leavesBySeries = this._leavesBySeries(layoutRoots, w2.config.series.length);\n        const parentsBySeries = this.showParents ? this._parentsBySeries(layoutRoots, w2.config.series.length) : [];\n        leavesBySeries.forEach((node, i2)=>{\n            var _a2;\n            const elSeries = graphics.group({\n                class: `apexcharts-series apexcharts-treemap-series`,\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[i2]),\n                rel: i2 + 1,\n                \"data:realIndex\": i2\n            });\n            graphics.setupEventDelegation(elSeries, \".apexcharts-treemap-rect\");\n            if (w2.config.chart.dropShadow.enabled) {\n                const shadow = w2.config.chart.dropShadow;\n                const filters = new $e4b487e979d7c06d$var$Filters(this.w);\n                filters.dropShadow(ret, shadow, i2);\n            }\n            const elDataLabelWrap = graphics.group({\n                class: \"apexcharts-data-labels\"\n            });\n            const bounds = {\n                xMin: Infinity,\n                yMin: Infinity,\n                xMax: -Infinity,\n                yMax: -Infinity\n            };\n            if (this.showParents) (parentsBySeries[i2] || []).forEach((p2)=>{\n                this._drawParent(elSeries, p2, i2);\n            });\n            const animCfg = w2.config.chart.animations;\n            const gradCfg = animCfg.animateGradually;\n            const cascadeEnabled = gradCfg && gradCfg.enabled !== false;\n            const cascadeDelays = new Array(node.length).fill(0);\n            if (cascadeEnabled) {\n                const tileCount = node.length || 1;\n                const baseDelay = Math.min(gradCfg.delay || 0, animCfg.speed * 0.5 / tileCount);\n                const ranked = node.map(/** @param {any} leaf @param {number} k */ (leaf, k)=>({\n                        j: k,\n                        area: leaf.rect ? $e4b487e979d7c06d$var$areaOf(leaf.rect) : 0\n                    })).sort(/** @param {{j: number, area: number}} a @param {{j: number, area: number}} b */ (a2, b2)=>b2.area - a2.area);\n                ranked.forEach(/** @param {{j: number, area: number}} item @param {number} rank */ (item, rank)=>{\n                    cascadeDelays[item.j] = rank * baseDelay;\n                });\n            }\n            node.forEach((leaf, k)=>{\n                const r2 = leaf.rect;\n                if (!r2) return;\n                const j = leaf._di;\n                const x1 = r2[0];\n                const y1 = r2[1];\n                const x2 = r2[2];\n                const y2 = r2[3];\n                bounds.xMin = Math.min(bounds.xMin, x1);\n                bounds.yMin = Math.min(bounds.yMin, y1);\n                bounds.xMax = Math.max(bounds.xMax, x2);\n                bounds.yMax = Math.max(bounds.yMax, y2);\n                const colorProps = this._leafColor(i2, j);\n                const color = colorProps.color;\n                const pathFill = fill.fillPath({\n                    color: color,\n                    seriesNumber: i2,\n                    dataPointIndex: j\n                });\n                const morphFrom = morphActive ? this._morphSourceForLeaf(leaf) : null;\n                const elRect = morphFrom ? graphics.drawPath({\n                    d: this._tilePath(x1, y1, x2, y2),\n                    fill: \"#fff\",\n                    stroke: w2.config.plotOptions.treemap.useFillColorAsStroke ? color : w2.globals.stroke.colors[i2],\n                    strokeWidth: this.strokeWidth,\n                    fillOpacity: 1\n                }) : graphics.drawRect(x1, y1, x2 - x1, y2 - y1, w2.config.plotOptions.treemap.borderRadius, \"#fff\", 1, this.strokeWidth, w2.config.plotOptions.treemap.useFillColorAsStroke ? color : w2.globals.stroke.colors[i2]);\n                elRect.attr({\n                    cx: x1,\n                    cy: y1,\n                    index: i2,\n                    i: i2,\n                    j: j,\n                    width: x2 - x1,\n                    height: y2 - y1,\n                    fill: pathFill\n                });\n                elRect.node.classList.add(\"apexcharts-treemap-rect\");\n                elRect.node.setAttribute(\"data:key\", $e4b487e979d7c06d$var$morphKey(leaf._key));\n                let fromRect = {\n                    x: x1 + (x2 - x1) / 2,\n                    y: y1 + (y2 - y1) / 2,\n                    width: 0,\n                    height: 0\n                };\n                const toRect = {\n                    x: x1,\n                    y: y1,\n                    width: x2 - x1,\n                    height: y2 - y1\n                };\n                if (morphFrom) this._morphTile(elRect, morphFrom, this._tilePath(x1, y1, x2, y2), this.ctx.morphTypeChange.getSpeed(), i2, j);\n                else if (w2.config.chart.animations.enabled && !w2.globals.dataChanged) {\n                    let speed = 1;\n                    if (!w2.globals.resized) speed = w2.config.chart.animations.speed;\n                    this.animateTreemap(elRect, fromRect, toRect, speed, // Ranked by draw order, not by data index — the cascade is about\n                    // what is on screen.\n                    cascadeDelays[k] || 0);\n                }\n                if (w2.globals.dataChanged) {\n                    let speed = 1;\n                    if (this.dynamicAnim.enabled && w2.globals.shouldAnimate) {\n                        speed = this.dynamicAnim.speed;\n                        if (w2.globals.previousPaths[i2] && /** @type {Record<string,any>} */ w2.globals.previousPaths[i2][j] && /** @type {Record<string,any>} */ w2.globals.previousPaths[i2][j].rect) fromRect = /** @type {Record<string,any>} */ w2.globals.previousPaths[i2][j].rect;\n                        this.animateTreemap(elRect, fromRect, toRect, speed);\n                    }\n                }\n                let fontSize = this.getFontSize(r2);\n                if (w2.config.plotOptions.treemap.dataLabels.format === \"truncate\") fontSize = parseInt(String(w2.config.dataLabels.style.fontSize), 10);\n                let dataLabels = null;\n                if (w2.config.dataLabels.enabled && this._labelCanShow(fontSize, x2 - x1, y2 - y1)) {\n                    let formattedText = w2.config.dataLabels.formatter(this.labels[i2][j], {\n                        value: w2.seriesData.series[i2][j],\n                        seriesIndex: i2,\n                        dataPointIndex: j,\n                        w: w2\n                    });\n                    if (w2.config.plotOptions.treemap.dataLabels.format === \"truncate\") formattedText = this.truncateLabels(String(formattedText), fontSize, x1, y1, x2, y2);\n                    if (w2.seriesData.series[i2][j]) dataLabels = this.helpers.calculateDataLabels({\n                        text: formattedText,\n                        x: (x1 + x2) / 2,\n                        y: (y1 + y2) / 2 + this.strokeWidth / 2 + fontSize / 3,\n                        i: i2,\n                        j: j,\n                        colorProps: colorProps,\n                        fontSize: fontSize,\n                        series: series\n                    });\n                    if (w2.config.dataLabels.enabled && dataLabels) this.rotateToFitLabel(dataLabels, fontSize, formattedText, x1, y1, x2, y2);\n                }\n                elSeries.add(elRect);\n                if (dataLabels !== null) elSeries.add(dataLabels);\n            });\n            const seriesTitle = w2.config.plotOptions.treemap.seriesTitle;\n            if (!this.showParents && w2.config.series.length > 1 && seriesTitle && seriesTitle.show) {\n                const sName = /** @type {Record<string,any>} */ w2.config.series[i2].name || \"\";\n                if (sName && bounds.xMin < Infinity && bounds.yMin < Infinity) {\n                    const { offsetX: offsetX, offsetY: offsetY, borderColor: borderColor, borderWidth: borderWidth, borderRadius: borderRadius, style: style } = seriesTitle;\n                    const textColor = style.color || w2.config.chart.foreColor;\n                    const padding = {\n                        left: style.padding.left,\n                        right: style.padding.right,\n                        top: style.padding.top,\n                        bottom: style.padding.bottom\n                    };\n                    const textSize = graphics.getTextRects(sName, style.fontSize, style.fontFamily);\n                    const labelRectWidth = textSize.width + padding.left + padding.right;\n                    const labelRectHeight = textSize.height + padding.top + padding.bottom;\n                    const labelX = bounds.xMin + (offsetX || 0);\n                    const labelY = bounds.yMin + (offsetY || 0);\n                    const elLabelRect = graphics.drawRect(labelX, labelY, labelRectWidth, labelRectHeight, borderRadius, style.background, 1, borderWidth, borderColor);\n                    const elLabelText = graphics.drawText({\n                        x: labelX + padding.left,\n                        y: labelY + padding.top + ((_a2 = textSize == null ? void 0 : textSize.height) != null ? _a2 : 0) * 0.75,\n                        text: sName,\n                        fontSize: style.fontSize,\n                        fontFamily: style.fontFamily,\n                        fontWeight: style.fontWeight,\n                        foreColor: textColor,\n                        cssClass: style.cssClass || \"\"\n                    });\n                    elSeries.add(elLabelRect);\n                    elSeries.add(elLabelText);\n                }\n            }\n            elSeries.add(elDataLabelWrap);\n            ret.add(elSeries);\n        });\n        this._renderBreadcrumb();\n        return ret;\n    }\n    // ----------------------------------------------------------------- levels\n    /**\n   * Per-level config: `plotOptions.treemap.parents` is the base, and\n   * `plotOptions.treemap.levels[depth]` overrides it. Depth 0 is the outermost\n   * group actually drawn (the series, unless a single series was unwrapped).\n   * @param {number} depth\n   * @returns {any}\n   */ _levelCfg(depth) {\n        if (!this._levelCache) this._levelCache = [];\n        if (this._levelCache[depth]) return this._levelCache[depth];\n        const tm = this.w.config.plotOptions.treemap;\n        const base = tm.parents || {};\n        const lvl = (tm.levels || [])[depth] || {};\n        const merged = $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({}, base), lvl), {\n            header: $e4b487e979d7c06d$var$__spreadProps($e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({}, base.header || {}), lvl.header || {}), {\n                style: $e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({}, (base.header || {}).style || {}), (lvl.header || {}).style || {})\n            }),\n            hover: $e4b487e979d7c06d$var$__spreadValues($e4b487e979d7c06d$var$__spreadValues({}, base.hover || {}), lvl.hover || {})\n        });\n        this._levelCache[depth] = merged;\n        return merged;\n    }\n    /**\n   * The inset between a parent's edge and its children, at this depth.\n   * @param {number} depth\n   * @param {number} _rw\n   * @param {number} _rh\n   * @returns {number}\n   */ _levelPadding(depth, _rw, _rh) {\n        const cfg = this._levelCfg(depth);\n        return Number(cfg.padding) || 0;\n    }\n    /**\n   * The header strip height at this depth, or 0 when the tile is too small to\n   * carry one. The geometry library clamps against its own box; this is the\n   * legibility rule, which needs the font size and so lives here.\n   * @param {any} node\n   * @param {number} depth\n   * @param {number} rw\n   * @param {number} rh\n   * @returns {number}\n   */ _levelHeader(node, depth, rw, rh) {\n        const cfg = this._levelCfg(depth);\n        const header = cfg.header || {};\n        if (header.show === false) return 0;\n        const h2 = Number(header.height);\n        if (!Number.isFinite(h2) || h2 <= 0) return 0;\n        const minWidth = Number(header.minWidth) || 40;\n        if (rw < minWidth) return 0;\n        if (rh < h2 * 2) return 0;\n        return h2;\n    }\n    // ------------------------------------------------------------------ nodes\n    /**\n   * Leaves of the drawn tree, bucketed by the series they came from and kept in\n   * depth-first order.\n   * @param {any[]} roots\n   * @param {number} seriesCount\n   * @returns {any[][]}\n   */ _leavesBySeries(roots, seriesCount) {\n        const out = new Array(Math.max(1, seriesCount));\n        for(let i2 = 0; i2 < out.length; i2++)out[i2] = [];\n        const walk = (node)=>{\n            if (node.children && node.children.length) node.children.forEach(walk);\n            else {\n                const si = node._si || 0;\n                if (out[si]) out[si].push(node);\n            }\n        };\n        roots.forEach(walk);\n        return out;\n    }\n    /**\n   * Non-leaf nodes of the drawn tree, bucketed by series, shallowest first so a\n   * container is painted before anything nested inside it.\n   * @param {any[]} roots\n   * @param {number} seriesCount\n   * @returns {any[][]}\n   */ _parentsBySeries(roots, seriesCount) {\n        const out = new Array(Math.max(1, seriesCount));\n        for(let i2 = 0; i2 < out.length; i2++)out[i2] = [];\n        const walk = (node)=>{\n            if (!node.children || !node.children.length) return;\n            const si = node._si || 0;\n            if (out[si]) out[si].push(node);\n            node.children.forEach(walk);\n        };\n        roots.forEach(walk);\n        out.forEach((list)=>list.sort((a2, b2)=>(a2.depth || 0) - (b2.depth || 0)));\n        return out;\n    }\n    // ---------------------------------------------------------------- colours\n    /**\n   * A leaf's fill.\n   *\n   * Continuous colour (a datum carrying a second metric) takes over when it is\n   * configured, because shading a tile by its own area value is precisely what\n   * that mode replaces. Everything else - `colorScale.ranges`, `enableShades`,\n   * `distributed`, negative handling - is the path it always was.\n   *\n   * The shape of the return value matches `Helpers.getShadeColor` so the\n   * caller cannot tell the two apart.\n   *\n   * @param {number} i\n   * @param {number} j\n   * @returns {any}\n   */ _leafColor(i2, j) {\n        const w2 = this.w;\n        if (this.scale) {\n            const cv = $e4b487e979d7c06d$var$colorValueOf(w2, i2, j);\n            if (cv != null) {\n                const color = this.scale.at(cv);\n                return {\n                    color: color,\n                    // The discrete path has never supplied a label colour, so only the\n                    // continuous path sets one: a diverging ramp runs right through the\n                    // middle of the luminance range and a fixed light-or-dark label\n                    // would be unreadable at one end or the other.\n                    foreColor: $e4b487e979d7c06d$var$readableOn(color),\n                    colorProps: {\n                        color: color,\n                        foreColor: $e4b487e979d7c06d$var$readableOn(color),\n                        percent: 0\n                    }\n                };\n            }\n        }\n        return this.helpers.getShadeColor(w2.config.chart.type, i2, j, this.negRange);\n    }\n    // ---------------------------------------------------------------- parents\n    /**\n   * Resolved container/header colours for a level. Parent marks are chrome, not\n   * data, so they default to a neutral tint of the background rather than to a\n   * series colour: with continuous colour on the leaves, a coloured container\n   * would read as another data value.\n   * @param {number} depth\n   * @returns {any}\n   */ _parentChrome(depth) {\n        const w2 = this.w;\n        const cfg = this._levelCfg(depth);\n        const dark = w2.config.theme.mode === \"dark\";\n        const header = cfg.header || {};\n        const hstyle = header.style || {};\n        const step = Math.min(depth, 3);\n        const base = dark ? 255 : 0;\n        const rgb = `${base},${base},${base}`;\n        return {\n            fill: cfg.fill || `rgba(${rgb},${(dark ? 0.04 : 0.03) + step * 0.02})`,\n            fillOpacity: cfg.fillOpacity == null ? 1 : cfg.fillOpacity,\n            borderColor: cfg.borderColor || `rgba(${rgb},${dark ? 0.18 : 0.14})`,\n            borderWidth: cfg.borderWidth == null ? 1 : cfg.borderWidth,\n            borderRadius: cfg.borderRadius == null ? w2.config.plotOptions.treemap.borderRadius : cfg.borderRadius,\n            headerBg: hstyle.background || `rgba(${rgb},${dark ? 0.1 : 0.07})`,\n            headerColor: hstyle.color || (dark ? \"#e8e8e8\" : w2.config.chart.foreColor),\n            headerFontSize: hstyle.fontSize || \"12px\",\n            headerFontFamily: hstyle.fontFamily || w2.config.chart.fontFamily,\n            headerFontWeight: hstyle.fontWeight == null ? 600 : hstyle.fontWeight,\n            hoverColor: cfg.hover && cfg.hover.color || (dark ? \"rgba(255,255,255,0.85)\" : \"rgba(0,0,0,0.7)\"),\n            hoverWidth: cfg.hover && cfg.hover.width || 2,\n            hoverShow: !(cfg.hover && cfg.hover.show === false)\n        };\n    }\n    /**\n   * Draw one parent as a real mark: a container rect, and the header strip the\n   * layout already reserved room for.\n   *\n   * The container is `pointer-events: none` over its interior so the tiles\n   * inside it keep receiving hover; only the padding gutter and the header\n   * strip belong to the parent.\n   *\n   * @param {any} elSeries\n   * @param {any} node\n   * @param {number} i seriesIndex\n   */ _drawParent(elSeries, node, i2) {\n        var _a;\n        const r2 = node.rect;\n        if (!r2) return;\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w, this.ctx);\n        const depth = node.depth || 0;\n        const cfg = this._levelCfg(depth);\n        const chrome = this._parentChrome(depth);\n        const x1 = r2[0];\n        const y1 = r2[1];\n        const width = r2[2] - r2[0];\n        const height = r2[3] - r2[1];\n        if (width <= 0 || height <= 0) return;\n        const elGroup = graphics.group({\n            class: \"apexcharts-treemap-parent\",\n            \"data:depth\": depth,\n            \"data:name\": $e4b487e979d7c06d$var$Utils$1.escapeString(node.name)\n        });\n        const key = $e4b487e979d7c06d$var$morphKey(node._key);\n        const morphFrom = this._morphKeyed() ? this.ctx.morphTypeChange.getInitialPathForKey(key) : null;\n        const elRect = morphFrom ? graphics.drawPath({\n            d: this._tilePath(x1, y1, x1 + width, y1 + height),\n            fill: chrome.fill,\n            stroke: chrome.borderColor,\n            strokeWidth: chrome.borderWidth,\n            fillOpacity: chrome.fillOpacity\n        }) : graphics.drawRect(x1, y1, width, height, chrome.borderRadius, chrome.fill, chrome.fillOpacity, chrome.borderWidth, chrome.borderColor);\n        elRect.node.classList.add(\"apexcharts-treemap-parent-rect\");\n        elRect.node.setAttribute(\"data:key\", key);\n        elRect.node.setAttribute(\"data:depth\", String(depth));\n        if (morphFrom) this._morphTile(elRect, morphFrom, this._tilePath(x1, y1, x1 + width, y1 + height), this.ctx.morphTypeChange.getSpeed(), i2, depth);\n        elGroup.add(elRect);\n        const headerHeight = node.headerHeight || 0;\n        let headerText = \"\";\n        if (headerHeight > 0) {\n            const header = cfg.header || {};\n            const elHeaderRect = graphics.drawRect(x1, y1, width, headerHeight, 0, chrome.headerBg, 1, 0, \"transparent\");\n            elHeaderRect.node.classList.add(\"apexcharts-treemap-parent-header\");\n            elGroup.add(elHeaderRect);\n            let text = String((_a = node.name) != null ? _a : \"\");\n            if (typeof header.formatter === \"function\") text = String(header.formatter(node.name, {\n                value: node.value,\n                depth: depth,\n                seriesIndex: i2,\n                node: node,\n                w: w2\n            }));\n            else if (header.showValue) text = `${text}  ${this._formatValue(node.value)}`;\n            headerText = text;\n            const offsetX = Number(header.offsetX) || 0;\n            const align = header.align || \"left\";\n            const pad = 6;\n            const maxWidth = Math.max(0, width - pad * 2 - Math.abs(offsetX));\n            const fontSize = parseFloat(String(chrome.headerFontSize)) || 12;\n            const clipped = graphics.getTextBasedOnMaxWidth({\n                text: text,\n                maxWidth: maxWidth,\n                fontSize: fontSize\n            });\n            if (clipped) {\n                let tx = x1 + pad + offsetX;\n                let anchor = \"start\";\n                if (align === \"center\") {\n                    tx = x1 + width / 2 + offsetX;\n                    anchor = \"middle\";\n                } else if (align === \"right\") {\n                    tx = x1 + width - pad + offsetX;\n                    anchor = \"end\";\n                }\n                const elText = graphics.drawText({\n                    x: tx,\n                    y: y1 + headerHeight / 2 + fontSize / 3 + (Number(header.offsetY) || 0),\n                    text: clipped,\n                    textAnchor: anchor,\n                    fontSize: chrome.headerFontSize,\n                    fontFamily: chrome.headerFontFamily,\n                    fontWeight: chrome.headerFontWeight,\n                    foreColor: chrome.headerColor,\n                    cssClass: `apexcharts-treemap-parent-label ${header.style && header.style.cssClass || \"\"}`\n                });\n                elText.node.setAttribute(\"pointer-events\", \"none\");\n                elGroup.add(elText);\n            }\n            this._attachParentEvents(elHeaderRect.node, node, chrome, elRect);\n            this._makeParentAccessible(elHeaderRect.node, node, chrome, elRect, headerText);\n        }\n        this._attachParentEvents(elRect.node, node, chrome, elRect);\n        elGroup.node.setAttribute(\"role\", \"group\");\n        elGroup.node.setAttribute(\"aria-label\", this._parentLabel(node, headerText));\n        elSeries.add(elGroup);\n    }\n    /**\n   * The spoken description of a branch: what it is, how big, and how much of\n   * the chart it accounts for.\n   *\n   * Starts from the header's own rendered text when there is one (before\n   * clipping), so the accessible name contains the visible label rather than a\n   * differently-formatted number - a formatter that renders \"$3.25T\" must not\n   * be announced as \"3246\".\n   *\n   * @param {any} node\n   * @param {string} [visibleText] the header text, formatter applied, unclipped\n   * @returns {string}\n   */ _parentLabel(node, visibleText) {\n        const total = this._drawnTotal();\n        const pct = total > 0 ? (node._area / total * 100).toFixed(1) : \"0\";\n        const n2 = this._countLeaves(node);\n        const lead = visibleText && String(visibleText).trim() ? String(visibleText).replace(/\\s+/g, \" \").trim() : `${node.name}, ${this._formatValue(node._area)}`;\n        return `${lead}, ${n2} ${n2 === 1 ? \"item\" : \"items\"}, ${pct}% of total`;\n    }\n    /**\n   * Make a branch reachable and operable from the keyboard.\n   *\n   * Only the header strip takes focus, and only while click-to-zoom is live: a\n   * treemap can hold hundreds of tiles, and making every mark a tab stop would\n   * bury the chart's own controls behind a few hundred presses. Tabbing the\n   * groups and pressing Enter is the same path the mouse takes, and the\n   * breadcrumb is already real buttons, so the way back is reachable too.\n   *\n   * @param {any} el\n   * @param {any} node\n   * @param {any} chrome\n   * @param {any} elRect\n   * @param {string} [visibleText] the header's rendered text, unclipped\n   */ _makeParentAccessible(el, node, chrome, elRect, visibleText) {\n        if (!el || !el.setAttribute) return;\n        if (!this._zoomEnabled()) return;\n        el.setAttribute(\"role\", \"button\");\n        el.setAttribute(\"tabindex\", \"0\");\n        el.setAttribute(\"aria-label\", `${this._parentLabel(node, visibleText)}. Zoom in`);\n        el.setAttribute(\"aria-expanded\", \"false\");\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser() || !el.addEventListener) return;\n        el.addEventListener(\"focus\", ()=>{\n            elRect.node.setAttribute(\"stroke\", chrome.hoverColor);\n            elRect.node.setAttribute(\"stroke-width\", String(chrome.hoverWidth + 1));\n        });\n        el.addEventListener(\"blur\", ()=>{\n            elRect.node.setAttribute(\"stroke\", chrome.borderColor);\n            elRect.node.setAttribute(\"stroke-width\", String(chrome.borderWidth));\n        });\n        el.addEventListener(\"keydown\", (e2)=>{\n            if (e2.key !== \"Enter\" && e2.key !== \" \" && e2.key !== \"Spacebar\") return;\n            e2.preventDefault();\n            this._zoomTo(node, true);\n        });\n    }\n    /**\n   * Hover outline, aggregate tooltip and click-to-zoom for a parent mark.\n   * @param {any} el the element receiving the pointer\n   * @param {any} node\n   * @param {any} chrome\n   * @param {any} elRect the container rect to outline\n   */ _attachParentEvents(el, node, chrome, elRect) {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser() || !el || !el.addEventListener) return;\n        const w2 = this.w;\n        if (chrome.hoverShow) {\n            el.addEventListener(\"mouseenter\", ()=>{\n                elRect.node.setAttribute(\"stroke\", chrome.hoverColor);\n                elRect.node.setAttribute(\"stroke-width\", String(chrome.hoverWidth));\n            });\n            el.addEventListener(\"mouseleave\", ()=>{\n                elRect.node.setAttribute(\"stroke\", chrome.borderColor);\n                elRect.node.setAttribute(\"stroke-width\", String(chrome.borderWidth));\n            });\n        }\n        if (w2.config.tooltip.enabled) {\n            el.addEventListener(\"mouseenter\", (e2)=>this._showParentTooltip(e2, node));\n            el.addEventListener(\"mousemove\", (e2)=>this._positionTooltip(e2));\n            el.addEventListener(\"mouseleave\", ()=>this._hideParentTooltip());\n        }\n        if (this._zoomEnabled()) {\n            el.style.cursor = \"pointer\";\n            el.addEventListener(\"click\", ()=>this._zoomTo(node));\n        }\n    }\n    // ------------------------------------------------------------------- zoom\n    /**\n   * Click-to-zoom is live only when nothing else already owns the click.\n   *\n   * The drilldown feature is the other way into a hierarchy on a treemap, and\n   * the two are different models of the same gesture: drilldown replaces the\n   * view one level at a time, zoom reframes a tree that stays whole. Running\n   * both would fight over the same click and over the one breadcrumb slot in\n   * the wrap, so drilldown wins where it is active and this stands down.\n   * @returns {boolean}\n   */ _zoomEnabled() {\n        const w2 = this.w;\n        const z = w2.config.plotOptions.treemap.zoom;\n        if (!z || !z.enabled || !this.showParents) return false;\n        const dd = w2.config.drilldown;\n        if (dd && dd.enabled && Array.isArray(dd.series) && dd.series.length) {\n            if (!this._warnedZoomConflict) {\n                this._warnedZoomConflict = true;\n                console.warn(\"ApexCharts treemap: `plotOptions.treemap.zoom` and the drilldown feature both navigate the hierarchy, so zoom is ignored here. Drop `drilldown.series` to zoom a nested treemap instead.\");\n            }\n            return false;\n        }\n        return true;\n    }\n    /**\n   * The focused branch for this render, looked up by the key stashed on the\n   * last click. Keys are rebuilt identically from the same data, so the focus\n   * survives a re-render; a key that no longer resolves (the data changed under\n   * it) simply falls back to the whole tree.\n   * @param {any[]} drawn\n   * @returns {any}\n   */ _resolveFocus(drawn) {\n        const key = this.w.globals.treemapFocusKey;\n        if (!key || !this._zoomEnabled()) return null;\n        let found = null;\n        const walk = (node)=>{\n            if (found) return;\n            if (node._key === key) {\n                found = node;\n                return;\n            }\n            if (node.children) node.children.forEach(walk);\n        };\n        drawn.forEach(walk);\n        return found && found.children && found.children.length ? found : null;\n    }\n    /**\n   * @param {any} node\n   * @param {boolean} [restoreFocus] move focus into the new view once it is\n   *   drawn. A zoom re-renders the chart, which destroys the element the\n   *   keyboard user was standing on; without this they would be returned to the\n   *   top of the document.\n   */ _zoomTo(node, restoreFocus = false) {\n        const w2 = this.w;\n        if (!node || !node.children || !node.children.length) return;\n        const next = w2.globals.treemapFocusKey === node._key ? null : node._key;\n        w2.globals.treemapFocusKey = next;\n        this._hideParentTooltip();\n        const done = this.ctx.update();\n        if (!restoreFocus || !done || typeof done.then !== \"function\") return;\n        done.then(()=>{\n            if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n            const crumb = /** @type {any} */ w2.dom.baseEl.querySelector(\".apexcharts-breadcrumb .apexcharts-breadcrumb-item\");\n            if (crumb && crumb.focus) {\n                crumb.focus();\n                return;\n            }\n            const header = /** @type {any} */ w2.dom.baseEl.querySelector(\".apexcharts-treemap-parent-header[tabindex]\");\n            if (header && header.focus) header.focus();\n        });\n    }\n    /**\n   * Outermost drawn group -> focus chain, for the breadcrumb.\n   *\n   * Stops at a drawn root rather than walking all the way to `_parent === null`:\n   * when a single series was unwrapped, the series node is still every level-0\n   * node's parent, and it is not a level the reader ever sees.\n   */ _focusChain() {\n        const chain = [];\n        const drawnRoots = new Set(this.drawn || []);\n        let n2 = this._resolveFocus(this.drawn || []);\n        while(n2){\n            chain.unshift(n2);\n            if (drawnRoots.has(n2)) break;\n            n2 = n2._parent;\n        }\n        return chain;\n    }\n    /** The breadcrumb config: a treemap-local override on the shared block. */ _breadcrumbCfg() {\n        const z = this.w.config.plotOptions.treemap.zoom;\n        return $e4b487e979d7c06d$var$breadcrumbConfig(this.w, z && z.breadcrumb);\n    }\n    /**\n   * Breadcrumb back out of a zoom. Markup, config and accessible semantics are\n   * the shared ones, so a zoomed treemap and a drilled-in chart present the\n   * same affordance.\n   */ _renderBreadcrumb() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const w2 = this.w;\n        if (!w2.dom.elWrap) return;\n        $e4b487e979d7c06d$var$clearBreadcrumb(w2);\n        if (!this._zoomEnabled()) return;\n        const chain = this._focusChain();\n        if (!chain.length) return;\n        const nav = $e4b487e979d7c06d$var$renderBreadcrumb(w2, {\n            ariaLabel: \"Treemap breadcrumb\",\n            config: this._breadcrumbCfg(),\n            compact: true,\n            crumbs: [\n                {\n                    label: \"All\",\n                    data: null\n                }\n            ].concat(chain.map((n2)=>({\n                    label: n2.name,\n                    data: n2\n                }))),\n            onNavigate: (_i, crumb)=>{\n                w2.globals.treemapFocusKey = crumb.data ? crumb.data._key : null;\n                this._hideParentTooltip();\n                this.ctx.update();\n            }\n        });\n        if (!nav) return;\n        this._placeBreadcrumb(nav);\n        $e4b487e979d7c06d$var$avoidChromeOverlap(w2, nav);\n    }\n    /**\n   * Sit the breadcrumb in the band the layout reserved for it\n   * (Dimensions.gridPadForBreadcrumb), just above the grid.\n   *\n   * The fallback below should never fire: the reserve is unconditional once\n   * zoom is enabled. It stays for the cases the reserve cannot cover - a\n   * responsive override that turns zoom on after layout, or a host stylesheet\n   * that grows the font - where a readable chip over the tiles beats a\n   * breadcrumb clipped by the plot.\n   *\n   * @param {any} nav\n   */ _placeBreadcrumb(nav) {\n        var _a, _b;\n        const w2 = this.w;\n        const gridTop = w2.layout.translateY || 0;\n        const dimHelpers = (_b = (_a = this.ctx) == null ? void 0 : _a.dimensions) == null ? void 0 : _b.dimHelpers;\n        const titleArea = dimHelpers ? dimHelpers.getTitleSubtitleCoords(\"title\").height + dimHelpers.getTitleSubtitleCoords(\"subtitle\").height : 0;\n        const navH = nav.getBoundingClientRect().height || $e4b487e979d7c06d$var$BREADCRUMB_HEIGHT;\n        if (gridTop - titleArea >= navH + 1) {\n            nav.style.top = `${gridTop - navH - 1}px`;\n            return;\n        }\n        nav.style.top = `${titleArea}px`;\n        const dark = w2.config.theme.mode === \"dark\";\n        nav.style.background = dark ? \"rgba(20,24,30,0.82)\" : \"rgba(255,255,255,0.86)\";\n        nav.style.borderRadius = \"4px\";\n    }\n    // ---------------------------------------------------------------- tooltip\n    /**\n   * A parent is not a row in the series matrix, so the shared tooltip - which\n   * addresses everything by (seriesIndex, dataPointIndex) - has nothing to look\n   * up. It writes into the same tooltip element instead, so the aggregate looks\n   * like every other tooltip in the chart.\n   * @param {MouseEvent} e\n   * @param {any} node\n   */ _showParentTooltip(e2, node) {\n        const w2 = this.w;\n        const t2 = this._tip();\n        if (!t2) return;\n        const total = this._drawnTotal();\n        const parentVal = node._parent ? node._parent._area : total;\n        const pctTotal = total > 0 ? (node._area / total * 100).toFixed(1) : \"0.0\";\n        const pctParent = parentVal > 0 ? (node._area / parentVal * 100).toFixed(1) : pctTotal;\n        const cfg = this.w.config.plotOptions.treemap.parents;\n        const custom = cfg && cfg.tooltip && cfg.tooltip.formatter;\n        const leafCount = this._countLeaves(node);\n        let html;\n        if (typeof custom === \"function\") html = custom({\n            name: node.name,\n            value: node._area,\n            depth: node.depth || 0,\n            leafCount: leafCount,\n            percentOfParent: Number(pctParent),\n            percentOfTotal: Number(pctTotal),\n            node: node,\n            w: w2\n        });\n        else {\n            const marker = this._parentChrome(node.depth || 0).headerBg;\n            const groupBg = w2.config.tooltip.fillSeriesColor ? `background-color:${marker};` : \"\";\n            html = `<div class=\"apexcharts-tooltip-series-group apexcharts-active\" style=\"display:flex;${groupBg}\"><div class=\"apexcharts-tooltip-text\"><div class=\"apexcharts-tooltip-y-group\"><span class=\"apexcharts-tooltip-text-y-label\">${$e4b487e979d7c06d$var$Utils$1.escapeString(node.name)}: </span><span class=\"apexcharts-tooltip-text-y-value\">${this._formatValue(node._area)}</span></div><div class=\"apexcharts-tooltip-y-group\"><span class=\"apexcharts-tooltip-text-y-label\">${leafCount} items, </span><span class=\"apexcharts-tooltip-text-y-value\">${pctParent}% of parent, ${pctTotal}% of total</span></div></div></div>`;\n        }\n        t2.innerHTML = html;\n        t2.classList.add(\"apexcharts-active\");\n        t2.style.opacity = \"1\";\n        this._tipOwned = true;\n        this._positionTooltip(e2);\n    }\n    /** @returns {any} */ _tip() {\n        if (!this._tooltipEl) this._tooltipEl = this.w.dom.baseEl.querySelector(\".apexcharts-tooltip\");\n        return this._tooltipEl;\n    }\n    /**\n   * Position beside the cursor, flipping to the opposite side when the box\n   * would overflow the chart wrap, and clamping inside it either way.\n   * @param {MouseEvent} e\n   */ _positionTooltip(e2) {\n        const t2 = this._tip();\n        if (!t2 || !this._tipOwned) return;\n        const rect = this.w.dom.elWrap.getBoundingClientRect();\n        const tw = t2.offsetWidth;\n        const th = t2.offsetHeight;\n        const pad = 12;\n        let x = e2.clientX - rect.left + pad;\n        if (x + tw > rect.width) x = e2.clientX - rect.left - tw - pad;\n        x = Math.max(0, Math.min(x, rect.width - tw));\n        let y = e2.clientY - rect.top + pad;\n        if (y + th > rect.height) y = e2.clientY - rect.top - th - pad;\n        y = Math.max(0, Math.min(y, rect.height - th));\n        t2.style.left = x + \"px\";\n        t2.style.top = y + \"px\";\n    }\n    _hideParentTooltip() {\n        const t2 = this._tip();\n        if (!t2 || !this._tipOwned) return;\n        this._tipOwned = false;\n        t2.classList.remove(\"apexcharts-active\");\n        t2.style.opacity = \"0\";\n    }\n    /**\n   * The whole tree's area, zoomed in or not: \"% of total\" has to mean the same\n   * thing at every zoom level, otherwise the branch you just zoomed into\n   * reports 100%.\n   * @returns {number}\n   */ _drawnTotal() {\n        if (this._total == null) this._total = (this.drawn || []).reduce((s2, r2)=>s2 + this._subtreeArea(r2), 0);\n        return this._total || 0;\n    }\n    /**\n   * A node's area, computed the same way the layout does it. Zooming lays out\n   * only the focused branch, so every other branch reaches here without the\n   * `_area` the layout would otherwise have left on it.\n   * @param {any} node\n   * @returns {number}\n   */ _subtreeArea(node) {\n        if (node._area != null) return node._area;\n        const kids = node.children;\n        if (kids && kids.length) {\n            let s2 = 0;\n            for(let i2 = 0; i2 < kids.length; i2++)s2 += this._subtreeArea(kids[i2]);\n            return s2;\n        }\n        const v2 = Number(node.value);\n        return isNaN(v2) ? 0 : Math.abs(v2);\n    }\n    /**\n   * @param {any} node\n   * @returns {number}\n   */ _countLeaves(node) {\n        if (!node.children || !node.children.length) return 1;\n        return node.children.reduce((s2, c2)=>s2 + this._countLeaves(c2), 0);\n    }\n    /**\n   * Format an aggregate the way the chart formats its own y values, so a\n   * parent's total reads like the tiles it contains.\n   * @param {number} v\n   * @returns {string}\n   */ _formatValue(v2) {\n        var _a, _b, _c, _d, _e;\n        const w2 = this.w;\n        const fmt = ((_b = (_a = w2.config.tooltip) == null ? void 0 : _a.y) == null ? void 0 : _b.formatter) || ((_e = (_d = (_c = w2.config.yaxis) == null ? void 0 : _c[0]) == null ? void 0 : _d.labels) == null ? void 0 : _e.formatter);\n        if (typeof fmt === \"function\") try {\n            return String(fmt(v2, {\n                seriesIndex: 0,\n                dataPointIndex: 0,\n                w: w2\n            }));\n        } catch (_) {}\n        return String(v2);\n    }\n    /**\n   * Whether a tile could show a label at all, decided from geometry alone so\n   * nothing has to be measured to find out.\n   *\n   * Two rules, both about legibility rather than about saving work:\n   *   - a tile that cannot hold one character in EITHER orientation has no\n   *     label to draw, rotated or not\n   *   - below `dataLabels.minFontSize` the text is decoration, not information\n   *\n   * Together these keep a dense treemap from spending its whole render\n   * measuring text nobody can read.\n   *\n   * @param {number} fontSize\n   * @param {number} tileWidth\n   * @param {number} tileHeight\n   * @returns {boolean}\n   */ _labelCanShow(fontSize, tileWidth, tileHeight) {\n        if (!Number.isFinite(fontSize) || fontSize <= 0) return false;\n        const cfg = this.w.config.plotOptions.treemap.dataLabels;\n        const min = cfg && cfg.minFontSize != null ? Number(cfg.minFontSize) : 0;\n        if (fontSize < min) return false;\n        return Math.max(tileWidth, tileHeight) >= fontSize;\n    }\n    /**\n   * Mean label length across the whole chart.\n   *\n   * It scales every tile's font size, and it is the same number for all of\n   * them, so it is computed once per draw. It used to be recomputed inside\n   * `getFontSize`, which runs per tile: two full walks of every label, per\n   * label, which is quadratic and was the entire cost of a large treemap (a\n   * 10k-tile chart spent ~9s here).\n   *\n   * @returns {number}\n   */ _averageLabelSize() {\n        if (this._avgLabelSize != null) return this._avgLabelSize;\n        function totalLabelLength(arr) {\n            let i2, total = 0;\n            if (Array.isArray(arr[0])) for(i2 = 0; i2 < arr.length; i2++)total += totalLabelLength(arr[i2]);\n            else for(i2 = 0; i2 < arr.length; i2++)total += arr[i2].length;\n            return total;\n        }\n        function countLabels(arr) {\n            let i2, total = 0;\n            if (Array.isArray(arr[0])) for(i2 = 0; i2 < arr.length; i2++)total += countLabels(arr[i2]);\n            else for(i2 = 0; i2 < arr.length; i2++)total += 1;\n            return total;\n        }\n        this._avgLabelSize = totalLabelLength(this.labels) / countLabels(this.labels);\n        return this._avgLabelSize;\n    }\n    // This calculates a font-size based upon\n    // average label length and the size of the box\n    /**\n   * @param {number[]} coordinates\n   */ getFontSize(coordinates) {\n        const w2 = this.w;\n        const averagelabelsize = this._averageLabelSize();\n        function fontSize(width, height) {\n            const area = width * height;\n            const arearoot = Math.pow(area, 0.5);\n            return Math.min(arearoot / averagelabelsize, parseInt(w2.config.dataLabels.style.fontSize, 10));\n        }\n        return fontSize(coordinates[2] - coordinates[0], coordinates[3] - coordinates[1]);\n    }\n    /**\n   * @param {any} elText\n   * @param {string | number} fontSize\n   * @param {string} text\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x2\n   * @param {number} y2\n   */ rotateToFitLabel(elText, fontSize, text, x1, y1, x2, y2) {\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const textRect = graphics.getTextRects(text, String(fontSize));\n        if (textRect.width + this.w.config.stroke.width + 5 > x2 - x1 && textRect.width <= y2 - y1) {\n            const labelRotatingCenter = graphics.rotateAroundCenter(elText.node);\n            elText.node.setAttribute(\"transform\", `rotate(-90 ${labelRotatingCenter.x} ${labelRotatingCenter.y}) translate(${textRect.height / 3})`);\n        }\n    }\n    // This is an alternative label formatting method that uses a\n    // consistent font size, and trims the edge of long labels\n    /**\n   * @param {string} text\n   * @param {number} fontSize\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x2\n   * @param {number} y2\n   */ truncateLabels(text, fontSize, x1, y1, x2, y2) {\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        const textRect = graphics.getTextRects(text, String(fontSize));\n        const labelMaxWidth = textRect.width + this.w.config.stroke.width + 5 > x2 - x1 && y2 - y1 > x2 - x1 ? y2 - y1 : x2 - x1;\n        const truncatedText = graphics.getTextBasedOnMaxWidth({\n            text: text,\n            maxWidth: labelMaxWidth,\n            fontSize: fontSize\n        });\n        if (text.length !== truncatedText.length && labelMaxWidth / fontSize < 5) return \"\";\n        else return truncatedText;\n    }\n    /**\n   * True when the active cross-type morph can pair marks by branch identity\n   * rather than by draw order.\n   * @returns {boolean}\n   */ _morphKeyed() {\n        var _a;\n        const m2 = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange;\n        return !!(m2 && typeof m2.hasKeyedMarks === \"function\" && m2.hasKeyedMarks() && typeof m2.getInitialPathForKey === \"function\");\n    }\n    /**\n   * The captured shape a LEAF tile unrolls from, or null when the outgoing\n   * chart had nothing to give it.\n   *\n   * Branch identity first, so a tile unrolls from the arc that stood for the\n   * same row rather than the k-th one. That key can find nothing even when\n   * both sides carry keys, and a FLAT treemap taking from a nested sunburst is\n   * exactly that case: its tiles are keyed at depth one ('/0:Tops') while the\n   * arcs are keyed at the depth they actually sit ('/0:Apparel/0:Tops'), so no\n   * key ever matches. Draw order is the fallback, the same one the mirror\n   * direction has always had (Sunburst._morphSourceFor), and without it\n   * treemap -> sunburst read as a morph while the return trip grew from\n   * nothing.\n   *\n   * Leaves only. A container taking a leaf's path by position would unroll\n   * from a different branch entirely, so `_morphParent` stays key-or-nothing.\n   *\n   * @param {any} leaf\n   * @returns {string | null}\n   */ _morphSourceForLeaf(leaf) {\n        var _a;\n        const morph = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange;\n        if (!morph || typeof morph.getInitialPathAt !== \"function\") return null;\n        if (this._morphKeyed()) {\n            const keyed = morph.getInitialPathForKey($e4b487e979d7c06d$var$morphKey(leaf._key));\n            if (keyed) return keyed;\n        }\n        return morph.getInitialPathAt(this._morphLeafIndex++);\n    }\n    /**\n   * A tile as closed path data, for the cross-type morph (a <rect> cannot hold\n   * an arc, so a morphing tile is drawn as a <path>).\n   * @param {number} x1 @param {number} y1 @param {number} x2 @param {number} y2\n   * @returns {string}\n   */ _tilePath(x1, y1, x2, y2) {\n        return `M ${x1} ${y1} L ${x2} ${y1} L ${x2} ${y2} L ${x1} ${y2} Z`;\n    }\n    /**\n   * Tween a tile's path data from a captured shape (a sunburst arc) into its\n   * rectangle.\n   *\n   * Routed through Animations.morphSVG, the same call every other morphing\n   * renderer makes: it already selects the polygon-resample algorithm while a\n   * cross-type morph is active, which is what tweens between shapes as\n   * different as an arc and a rectangle. Reaching for the interpolator directly\n   * would also add a name to a module the split bundles share, which breaks\n   * them.\n   *\n   * @param {any} el\n   * @param {string} fromD\n   * @param {string} toD\n   * @param {number} speed\n   * @param {number} i\n   * @param {number} j\n   */ _morphTile(el, fromD, toD, speed, i2, j) {\n        const animations = new $e4b487e979d7c06d$var$Animations(this.w, this.ctx);\n        animations.morphSVG(el, i2, j, \"none\", fromD, toD, speed, 0);\n    }\n    /**\n   * @param {any} el\n   * @param {Record<string, any>} fromRect\n   * @param {Record<string, any>} toRect\n   * @param {number} speed\n   * @param {number} [delay] - per-tile cascade delay in ms\n   */ animateTreemap(el, fromRect, toRect, speed, delay = 0) {\n        const animations = new $e4b487e979d7c06d$var$Animations(this.w);\n        animations.animateRect(el, fromRect, toRect, speed, ()=>{\n            animations.animationCompleted(el);\n        }, delay);\n    }\n}\nconst $e4b487e979d7c06d$var$GOLDEN_ANGLE = Math.PI * (3 - Math.sqrt(5));\nfunction $e4b487e979d7c06d$var$easeOutCubic(t2) {\n    return 1 - Math.pow(1 - t2, 3);\n}\nfunction $e4b487e979d7c06d$var$easeOutBack(s2) {\n    return (t2)=>1 + (s2 + 1) * Math.pow(t2 - 1, 3) + s2 * Math.pow(t2 - 1, 2);\n}\nfunction $e4b487e979d7c06d$var$easeInOutCubic(t2) {\n    return t2 < 0.5 ? 4 * t2 * t2 * t2 : 1 - Math.pow(-2 * t2 + 2, 3) / 2;\n}\nconst $e4b487e979d7c06d$var$SPRING_REFERENCE_SPEED = 800;\nconst $e4b487e979d7c06d$var$MAX_FRAME_STEP = 0.25;\nfunction $e4b487e979d7c06d$var$springParams(preset, speed) {\n    const [stiffness, damping] = $e4b487e979d7c06d$var$L(/** @type {import('apex-commons').SpringPreset|undefined} */ preset);\n    const scale = $e4b487e979d7c06d$var$SPRING_REFERENCE_SPEED / Math.max(1, speed);\n    return [\n        stiffness * scale * scale,\n        damping * scale\n    ];\n}\nclass $e4b487e979d7c06d$var$Unit {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.ctx = ctx;\n        this.w = w2;\n        this._lastDotR = 1;\n        this._gridTrack = null;\n        this._gridDenom = 1;\n        this._scatterAxis = null;\n    }\n    /**\n   * @param {any[]} series - flat count array (non-axis / pie-shaped data)\n   * @returns {any} the chart's root group element\n   */ draw(series) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(w2, this.ctx);\n        const ret = graphics.group({\n            class: \"apexcharts-unit\"\n        });\n        if (w2.globals.noData || !Array.isArray(series) || series.length === 0) return ret;\n        const opts = w2.config.plotOptions.unit;\n        const layout = opts.layout === \"packed\" ? \"packed\" : opts.layout === \"columns\" ? \"columns\" : opts.layout === \"grid\" ? \"grid\" : opts.layout === \"scatter\" ? \"scatter\" : opts.layout === \"arc\" ? \"arc\" : opts.layout === \"custom\" ? \"custom\" : \"grouped\";\n        const transition = opts.transition;\n        const flow = transition === \"flow\";\n        const identity = transition === \"identity\";\n        const unitValue = opts.unitValue > 0 ? opts.unitValue : 1;\n        let counts = series.map((v2)=>{\n            const n2 = Math.abs($e4b487e979d7c06d$var$Utils$1.parseNumber(v2)) / unitValue;\n            return n2 > 0 ? Math.max(1, Math.round(n2)) : 0;\n        });\n        counts = this._applyMaxUnits(counts, opts.maxUnits);\n        const total = counts.reduce((a2, b2)=>a2 + b2, 0);\n        const clusters = layout === \"packed\" ? this._layoutPacked(counts, opts) : layout === \"columns\" ? this._layoutColumns(counts, opts) : layout === \"grid\" ? this._layoutGrid(counts, opts) : layout === \"scatter\" ? this._layoutScatter(opts) : layout === \"arc\" ? this._layoutArc(counts, opts) : layout === \"custom\" ? this._layoutCustom(counts, opts) : this._layoutGrouped(counts, opts);\n        const gridSplit = layout === \"grid\" && !!(opts.grid && opts.grid.split);\n        if (gridSplit) this._drawGridTrack(ret, graphics, opts);\n        if (layout === \"scatter\") this._drawScatterAxes(ret, graphics);\n        const dotR = this._lastDotR;\n        const animate = this._shouldAnimate();\n        const morph = this.ctx && this.ctx.morphTypeChange;\n        const morphActive = animate && !!morph && typeof morph.isActive === \"function\" && morph.isActive() && typeof morph.getInitialCenterFor === \"function\";\n        const perRowBurst = morphActive && typeof morph.getInitialSlotFor === \"function\";\n        const pieceTakeover = morphActive && typeof morph.usesPieceTakeover === \"function\" && morph.usesPieceTakeover();\n        const prev = animate && !morphActive && this.ctx ? this.ctx._unitPrevDots : null;\n        const nextPrev = /* @__PURE__ */ new Map();\n        const animDots = [];\n        const unitData = w2.seriesData.unitData || [];\n        const sizeStats = this._bubbleStats(unitData, opts, dotR);\n        let gIndex = 0;\n        clusters.forEach((cluster)=>{\n            const color = w2.globals.colors[cluster.i] || w2.globals.colors[0] || \"#008FFB\";\n            const elSeries = graphics.group({\n                class: \"apexcharts-series\",\n                seriesName: $e4b487e979d7c06d$var$Utils$1.escapeString(w2.seriesData.seriesNames[cluster.i] || `series-${cluster.i + 1}`),\n                rel: cluster.i + 1,\n                \"data:realIndex\": cluster.i\n            });\n            const burst = morphActive && !perRowBurst ? morph.getInitialCenterFor(cluster.i) : null;\n            const burstCount = cluster.dots.length;\n            const catData = unitData[cluster.i];\n            cluster.dots.forEach((d, j)=>{\n                const datum = catData ? catData[j] : void 0;\n                const dotFill = datum && typeof datum === \"object\" && datum.fillColor ? datum.fillColor : color;\n                const rj = d.r != null ? d.r : sizeStats ? this._radiusForValue(this._unitValueOf(datum), sizeStats) : dotR;\n                const el = this._drawDot(graphics, opts, rj, dotFill, cluster.i, j);\n                elSeries.add(el);\n                let key;\n                if (identity) {\n                    const id = datum && typeof datum === \"object\" ? datum.id != null ? datum.id : datum.name : void 0;\n                    key = id != null ? `id:${id}` : `g:${gIndex}`;\n                } else if (flow) key = String(gIndex);\n                else if (d.slot != null) key = `slot:${d.slot}`;\n                else key = `${cluster.i}:${j}`;\n                gIndex++;\n                nextPrev.set(key, {\n                    x: d.x,\n                    y: d.y,\n                    fill: dotFill,\n                    r: rj\n                });\n                if (pieceTakeover) {\n                    this._placeDot(el.node, opts, d.x, d.y);\n                    el.node.setAttribute(\"opacity\", \"0\");\n                    el.node.setAttribute(\"data-piece-hidden\", \"1\");\n                } else if (animate) {\n                    const from = prev && prev.get(key);\n                    const anchor = from || (perRowBurst ? morph.getInitialSlotFor(cluster.i, j, burstCount) : burst);\n                    const enter = opts.gather && opts.gather.enter || \"burst\";\n                    const inPlace = gridSplit || enter === \"fade\" || enter === \"rise\";\n                    const cx0 = anchor ? anchor.x : inPlace ? d.x : cluster.cx;\n                    const cy0 = anchor ? anchor.y : enter === \"rise\" && !gridSplit ? d.y + 14 : inPlace ? d.y : cluster.cy;\n                    el.node.style.opacity = anchor ? \"1\" : \"0\";\n                    this._placeDot(el.node, opts, cx0, cy0);\n                    animDots.push({\n                        node: el.node,\n                        x: d.x,\n                        y: d.y,\n                        cx0: cx0,\n                        cy0: cy0,\n                        key: // Carries live spring state (position AND velocity) forward when\n                        // this render interrupted one still in flight.\n                        key,\n                        // Radius tween: an identity-kept dot grows/shrinks from its previous\n                        // size to its new one (e.g. bubble sizing turning on) instead of\n                        // snapping. Enters/uniform updates keep r0 === r1 (no-op).\n                        r0: from && from.r != null ? from.r : rj,\n                        r1: rj,\n                        // Colour tween: a dot that flows into a differently coloured group\n                        // recolours as it travels rather than snapping at the first frame.\n                        fill0: from ? from.fill : dotFill,\n                        fill1: dotFill,\n                        delay: 0,\n                        // assigned below (staggered by global order)\n                        isEnter: !anchor\n                    });\n                } else this._placeDot(el.node, opts, d.x, d.y);\n            });\n            if ((layout === \"grouped\" || layout === \"columns\" || gridSplit) && opts.clusterLabels && opts.clusterLabels.show && counts[cluster.i] > 0) {\n                const labelTotal = gridSplit ? this._gridDenom : total;\n                this._drawClusterLabel(elSeries, cluster, counts[cluster.i], labelTotal, opts, color);\n            }\n            ret.add(elSeries);\n        });\n        if (this._outerLabelsOn(opts)) this._drawOuterLabels(ret, clusters, counts, total, opts, animate && !prev);\n        if (prev) {\n            const exits = this._collectExits(prev, nextPrev, opts);\n            if (exits.length) {\n                const exitGroup = graphics.group({\n                    class: \"apexcharts-unit-exits\"\n                });\n                ret.add(exitGroup);\n                this._runExits(exitGroup, exits, opts);\n            }\n        }\n        if (this.ctx) this.ctx._unitPrevDots = nextPrev;\n        if (this.ctx && (!animate || morphActive)) this.ctx._unitSprings = null;\n        if (animate && animDots.length) this._runGather(animDots);\n        return ret;\n    }\n    /**\n   * Cap total dots to `maxUnits`, scaling every category down proportionally\n   * (a non-zero category keeps at least one dot). Warns once when it clips.\n   * @param {number[]} counts\n   * @param {number} maxUnits\n   * @returns {number[]}\n   */ _applyMaxUnits(counts, maxUnits) {\n        const total = counts.reduce((a2, b2)=>a2 + b2, 0);\n        if (!maxUnits || maxUnits <= 0 || total <= maxUnits) return counts;\n        const scale = maxUnits / total;\n        console.warn(`[ApexCharts] unit chart: ${total} dots exceeds maxUnits (${maxUnits}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`);\n        return counts.map((c2)=>c2 > 0 ? Math.max(1, Math.round(c2 * scale)) : 0);\n    }\n    /**\n   * `layout: 'custom'`. Positions come from a caller-supplied provider rather\n   * than from a generator in this file.\n   *\n   * The provider is the whole extension point: `(objects, rect) => [{id, x, y,\n   * r?}]`. Everything downstream is unchanged, which is the point - the engine\n   * already tweens position, radius and colour, and already keeps a mark's\n   * identity across a relayout, so an arbitrary new arrangement needs no new\n   * transition code. A silhouette, a hex grid, a timeline, or a projection\n   * handed over by ApexMaps are all just this function.\n   *\n   * Marks the provider omits are dropped, so they animate out through the\n   * existing exit path. Ids matching no mark are ignored.\n   *\n   * @param {number[]} counts\n   * @param {any} opts\n   */ _layoutCustom(counts, opts) {\n        const w2 = this.w;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const total = counts.reduce((a2, b2)=>a2 + b2, 0);\n        const provider = this._resolveLayoutProvider(opts);\n        if (!provider) {\n            console.warn(`[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'.`);\n            return this._layoutGrouped(counts, opts);\n        }\n        const gutter = this._outerLabelsOn(opts) ? this._outerLabelGutter(counts, opts) : 0;\n        this._lastOuterGutter = gutter;\n        const rect = {\n            x: gutter,\n            y: 0,\n            width: Math.max(1, gw - gutter * 2),\n            height: gh\n        };\n        const availR = Math.sqrt(rect.width * rect.height / Math.PI);\n        const step = this._resolveStep(opts, availR, total);\n        this._lastDotR = this._dotRadiusFromStep(step, opts);\n        const dotR = this._lastDotR;\n        const objects = this._layoutObjects(counts, dotR);\n        let placed;\n        try {\n            placed = provider(objects, rect);\n        } catch (e2) {\n            console.warn(\"[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.\", e2);\n            return this._layoutGrouped(counts, opts);\n        }\n        if (!Array.isArray(placed)) {\n            console.warn(\"[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'.\");\n            return this._layoutGrouped(counts, opts);\n        }\n        const byId = /* @__PURE__ */ new Map();\n        placed.forEach((p2)=>{\n            if (!p2 || !isFinite(p2.x) || !isFinite(p2.y)) return;\n            byId.set(String(p2.id), {\n                x: p2.x,\n                y: p2.y,\n                r: typeof p2.r === \"number\" && p2.r > 0 ? p2.r : void 0\n            });\n        });\n        const clusters = counts.map((_, i2)=>({\n                i: i2,\n                cx: gw / 2,\n                cy: gh / 2,\n                outerR: dotR,\n                dots: []\n            }));\n        objects.forEach((o2)=>{\n            const hit = byId.get(o2.id);\n            if (!hit) return;\n            clusters[o2.seriesIndex].dots.push({\n                x: hit.x,\n                y: hit.y,\n                r: hit.r\n            });\n        });\n        clusters.forEach((c2)=>{\n            if (!c2.dots.length) return;\n            let sx = 0;\n            let sy = 0;\n            c2.dots.forEach((d)=>{\n                sx += d.x;\n                sy += d.y;\n            });\n            c2.cx = sx / c2.dots.length;\n            c2.cy = sy / c2.dots.length;\n            let far = 0;\n            c2.dots.forEach((d)=>{\n                far = Math.max(far, Math.hypot(d.x - c2.cx, d.y - c2.cy));\n            });\n            c2.outerR = far + dotR;\n        });\n        return clusters;\n    }\n    /**\n   * One entry per mark, in global draw order, for a layout provider.\n   *\n   * `id` is the datum's own id/name where the per-unit object form supplies\n   * one, so a provider can address a specific unit (\"Texas\", \"employee 41\")\n   * rather than a positional slot. It falls back to `\"<category>:<index>\"`.\n   *\n   * @param {number[]} counts\n   * @param {number} dotR the radius the engine would use, so a provider that\n   *   packs by size does not have to rediscover it\n   * @returns {{id:string,index:number,seriesIndex:number,dataPointIndex:number,label:string,value:number|undefined,datum:any,r:number}[]}\n   */ _layoutObjects(counts, dotR) {\n        const w2 = this.w;\n        const unitData = w2.seriesData.unitData || [];\n        const names = w2.seriesData.seriesNames || [];\n        const objects = [];\n        let index = 0;\n        counts.forEach((n2, i2)=>{\n            var _a;\n            const catData = unitData[i2];\n            for(let j = 0; j < n2; j++){\n                const datum = catData ? catData[j] : void 0;\n                const id = datum && typeof datum === \"object\" && (datum.id != null || datum.name != null) ? String(datum.id != null ? datum.id : datum.name) : `${i2}:${j}`;\n                objects.push({\n                    id: id,\n                    index: index,\n                    seriesIndex: i2,\n                    dataPointIndex: j,\n                    label: names[i2],\n                    // Normalised at the boundary: internally \"no value\" is null, but the\n                    // public object shape uses an absent property.\n                    value: (_a = this._unitValueOf(datum)) != null ? _a : void 0,\n                    datum: datum,\n                    r: dotR\n                });\n                index++;\n            }\n        });\n        return objects;\n    }\n    /**\n   * Resolve `plotOptions.unit.positions` to a provider function: either the\n   * function itself, or the name of one registered through\n   * `ApexCharts.registerUnitLayout`.\n   * @param {any} opts\n   * @returns {Function|null}\n   */ _resolveLayoutProvider(opts) {\n        const positions = opts.positions;\n        if (typeof positions === \"function\") return positions;\n        if (typeof positions === \"string\" && positions) {\n            const found = $e4b487e979d7c06d$var$getUnitLayout(positions);\n            if (found) return found;\n            console.warn(`[ApexCharts] unit chart: no layout named \"${positions}\" is registered. Register one with ApexCharts.registerUnitLayout(\"${positions}\", fn).`);\n        }\n        return null;\n    }\n    /**\n   * Lay out each category as its own cluster in a horizontal row. All clusters\n   * share one dot radius (so dot size is comparable across clusters); the blob\n   * radius encodes the count.\n   * @param {number[]} counts\n   * @param {any} opts\n   */ _layoutGrouped(counts, opts) {\n        const w2 = this.w;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const labelSpace = opts.clusterLabels && opts.clusterLabels.show ? 30 : 6;\n        const visible = counts.map((_, i2)=>i2).filter((i2)=>counts[i2] > 0);\n        const Kv = Math.max(1, visible.length);\n        const slotOf = new Array(counts.length).fill(-1);\n        visible.forEach((i2, s2)=>slotOf[i2] = s2);\n        const cellW = gw / Kv;\n        const availH = gh - labelSpace;\n        const maxCount = Math.max(1, ...counts);\n        const pad = Math.min(cellW, availH) * 0.08;\n        const availR = Math.max(4, Math.min(cellW, availH) / 2 - pad);\n        const step = this._resolveStep(opts, availR, maxCount);\n        this._lastDotR = this._dotRadiusFromStep(step, opts);\n        const dotR = this._lastDotR;\n        const cy = labelSpace + availH / 2;\n        const outerRs = counts.map((n2)=>step * Math.sqrt(Math.max(1, n2)) + dotR);\n        const cellCentre = (i2)=>slotOf[i2] >= 0 ? cellW * (slotOf[i2] + 0.5) : gw / 2;\n        let centers = counts.map((_, i2)=>cellCentre(i2));\n        const visOuter = visible.map((i2)=>outerRs[i2]);\n        let overlap = false;\n        for(let s2 = 1; s2 < Kv; s2++)if (centers[visible[s2]] - centers[visible[s2 - 1]] < visOuter[s2] + visOuter[s2 - 1]) {\n            overlap = true;\n            break;\n        }\n        if (overlap) {\n            const gap = Math.max(2 * dotR, 8);\n            const totalW = visOuter.reduce((a2, r2)=>a2 + 2 * r2, 0) + gap * (Kv - 1);\n            let visCenters;\n            if (totalW <= gw) {\n                let x = (gw - totalW) / 2;\n                visCenters = visOuter.map((r2)=>{\n                    const c2 = x + r2;\n                    x += 2 * r2 + gap;\n                    return c2;\n                });\n            } else if (Kv === 1) visCenters = [\n                gw / 2\n            ];\n            else {\n                const lo = visOuter[0];\n                const hi = gw - visOuter[Kv - 1];\n                visCenters = visOuter.map((_, s2)=>lo + (hi - lo) * s2 / (Kv - 1));\n            }\n            centers = counts.map((_, i2)=>slotOf[i2] >= 0 ? visCenters[slotOf[i2]] : gw / 2);\n        }\n        return counts.map((n2, i2)=>({\n                i: i2,\n                cx: centers[i2],\n                cy: cy,\n                outerR: outerRs[i2],\n                dots: this._spiral(centers[i2], cy, n2, step, 0)\n            }));\n    }\n    /**\n   * Lay out all categories into ONE packed blob. Dots are assigned spiral\n   * indices in category order (smallest-first when sortByGroup), so the\n   * minority group nests in the centre.\n   * @param {number[]} counts\n   * @param {any} opts\n   */ _layoutPacked(counts, opts) {\n        const w2 = this.w;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const labelSpace = 6;\n        const total = Math.max(1, counts.reduce((a2, b2)=>a2 + b2, 0));\n        const availR = Math.max(4, Math.min(gw, gh - labelSpace) / 2 - Math.min(gw, gh) * 0.06);\n        const step = this._resolveStep(opts, availR, total);\n        this._lastDotR = this._dotRadiusFromStep(step, opts);\n        const cx = gw / 2;\n        const cy = labelSpace + (gh - labelSpace) / 2;\n        const order = counts.map((_, i2)=>i2);\n        if (opts.sortByGroup !== false) order.sort((a2, b2)=>counts[a2] - counts[b2]);\n        const clusters = counts.map((_, i2)=>({\n                i: i2,\n                cx: cx,\n                cy: cy,\n                outerR: step * Math.sqrt(total) + this._lastDotR,\n                /** @type {{x:number,y:number,slot?:number}[]} */ dots: []\n            }));\n        let gi = 0;\n        order.forEach((catI)=>{\n            for(let j = 0; j < counts[catI]; j++){\n                const r2 = step * Math.sqrt(gi + 0.5);\n                const theta = gi * $e4b487e979d7c06d$var$GOLDEN_ANGLE;\n                clusters[catI].dots.push({\n                    x: cx + r2 * Math.cos(theta),\n                    y: cy + r2 * Math.sin(theta),\n                    slot: gi\n                });\n                gi++;\n            }\n        });\n        return clusters;\n    }\n    /**\n   * Lay out all marks as a PARLIAMENT / hemicycle: seats in concentric arced\n   * rows across an annulus, filled in category (party) order so each category\n   * forms a contiguous angular wedge (the classic seating chart). `arc` controls\n   * the sweep (`startAngle`/`endAngle`, radialBar convention: 0 = top, clockwise;\n   * default a top semicircle), the donut hole (`innerRadiusRatio`) and the row\n   * count (`rows`, or 'auto'). Like `packed` this is ONE shared shape coloured by\n   * category, so seats key by physical slot: a seat-count change recolours the\n   * party boundary in place and only the rim adds / removes seats.\n   * @param {number[]} counts\n   * @param {any} opts\n   */ _layoutArc(counts, opts) {\n        const w2 = this.w;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const total = Math.max(1, counts.reduce((a2, b3)=>a2 + b3, 0));\n        const acfg = opts.arc || {};\n        const startDeg = typeof acfg.startAngle === \"number\" ? acfg.startAngle : -90;\n        const endDeg = typeof acfg.endAngle === \"number\" ? acfg.endAngle : 90;\n        const a0 = startDeg * Math.PI / 180;\n        const a1 = endDeg * Math.PI / 180;\n        const span = a1 - a0 || Math.PI;\n        const innerRatio = Math.max(0, Math.min(0.95, typeof acfg.innerRadiusRatio === \"number\" ? acfg.innerRadiusRatio : 0.4));\n        const ux = (a2)=>Math.sin(a2);\n        const uy = (a2)=>-Math.cos(a2);\n        const b2 = this._arcBounds(a0, a1);\n        const pad = Math.min(gw, gh) * 0.04;\n        const boxW = Math.max(1e-6, b2.maxX - b2.minX);\n        const boxH = Math.max(1e-6, b2.maxY - b2.minY);\n        const r1 = Math.max(4, Math.min((gw - 2 * pad) / boxW, (gh - 2 * pad) / boxH));\n        const r0 = r1 * innerRatio;\n        const cx = gw / 2 - (b2.minX + b2.maxX) / 2 * r1;\n        const cy = gh / 2 - (b2.minY + b2.maxY) / 2 * r1;\n        const alloc = this._arcAllocate(total, r0, r1, span, opts);\n        this._lastDotR = alloc.dotR;\n        const seats = [];\n        for(let r2 = 0; r2 < alloc.R; r2++){\n            const rho = alloc.radii[r2];\n            const n2 = alloc.seatsPerRow[r2];\n            for(let k = 0; k < n2; k++){\n                const a2 = n2 === 1 ? (a0 + a1) / 2 : a0 + span * (k + 0.5) / n2;\n                seats.push({\n                    a: a2,\n                    x: cx + rho * ux(a2),\n                    y: cy + rho * uy(a2)\n                });\n            }\n        }\n        seats.sort((s1, s2)=>s1.a - s2.a);\n        const clusters = counts.map((_, i2)=>({\n                i: i2,\n                cx: cx,\n                cy: cy,\n                outerR: r1,\n                /** @type {{x:number,y:number,slot?:number}[]} */ dots: []\n            }));\n        let ci = 0;\n        let used = 0;\n        seats.forEach((s2, slot)=>{\n            while(ci < counts.length && used >= counts[ci]){\n                ci++;\n                used = 0;\n            }\n            if (ci >= counts.length) return;\n            clusters[ci].dots.push({\n                x: s2.x,\n                y: s2.y,\n                slot: slot\n            });\n            used++;\n        });\n        return clusters;\n    }\n    /**\n   * Bounding box of the outer arc (radius 1) over [a0, a1], including the centre\n   * and every cardinal angle (multiple of 90deg) inside the range, so a\n   * semicircle / full circle / arbitrary sweep is all bounded correctly.\n   * @param {number} a0 @param {number} a1\n   * @returns {{minX:number,maxX:number,minY:number,maxY:number}}\n   */ _arcBounds(a0, a1) {\n        const ux = (a2)=>Math.sin(a2);\n        const uy = (a2)=>-Math.cos(a2);\n        const lo = Math.min(a0, a1);\n        const hi = Math.max(a0, a1);\n        const xs = [\n            0,\n            ux(a0),\n            ux(a1)\n        ];\n        const ys = [\n            0,\n            uy(a0),\n            uy(a1)\n        ];\n        const q = Math.PI / 2;\n        for(let k = Math.ceil(lo / q); k * q <= hi; k++){\n            xs.push(ux(k * q));\n            ys.push(uy(k * q));\n        }\n        return {\n            minX: Math.min(...xs),\n            maxX: Math.max(...xs),\n            minY: Math.min(...ys),\n            maxY: Math.max(...ys)\n        };\n    }\n    /**\n   * Allocate `total` seats across concentric rows of the annulus [r0, r1] sweeping\n   * `span` radians: seats per row are proportional to the row radius (a longer arc\n   * holds more), summed EXACTLY to total by largest remainder. Row count is\n   * `arc.rows` if given, else derived from a fixed dot size, else auto-searched to\n   * maximise the dot radius (the largest dots that still pack without overlap,\n   * mirroring `size:'auto'` elsewhere).\n   * @param {number} total @param {number} r0 @param {number} r1 @param {number} span @param {any} opts\n   * @returns {{R:number, radii:number[], seatsPerRow:number[], dotR:number}}\n   */ _arcAllocate(total, r0, r1, span, opts) {\n        const spacing = opts.spacing > 0 ? opts.spacing : 1.05;\n        const absSpan = Math.abs(span) || Math.PI;\n        const fixed = this._fixedRadius(opts);\n        const evalR = (R)=>{\n            R = Math.max(1, Math.round(R));\n            const radii = [];\n            for(let r2 = 0; r2 < R; r2++)radii.push(R === 1 ? (r0 + r1) / 2 : r0 + (r1 - r0) * (r2 / (R - 1)));\n            const weightSum = radii.reduce((a2, x)=>a2 + x, 0) || 1;\n            const raw = radii.map((rho)=>total * rho / weightSum);\n            const seatsPerRow = raw.map((x)=>Math.floor(x));\n            let left = total - seatsPerRow.reduce((a2, x)=>a2 + x, 0);\n            raw.map((x, idx)=>({\n                    idx: idx,\n                    frac: x - Math.floor(x)\n                })).sort((p2, qq)=>qq.frac - p2.frac).forEach((o2)=>{\n                if (left > 0) {\n                    seatsPerRow[o2.idx]++;\n                    left--;\n                }\n            });\n            while(left > 0){\n                seatsPerRow[R - 1]++;\n                left--;\n            }\n            const radialPitch = R === 1 ? r1 - r0 || r1 : (r1 - r0) / (R - 1);\n            let minArcPitch = Infinity;\n            for(let r2 = 0; r2 < R; r2++){\n                const n2 = seatsPerRow[r2];\n                if (n2 <= 0) continue;\n                const arcPitch = radii[r2] * absSpan / n2;\n                if (arcPitch < minArcPitch) minArcPitch = arcPitch;\n            }\n            const pitch = Math.min(radialPitch, minArcPitch);\n            return {\n                R: R,\n                radii: radii,\n                seatsPerRow: seatsPerRow,\n                dotR: Math.max(1, pitch / (2 * spacing))\n            };\n        };\n        const arcRows = opts.arc && opts.arc.rows;\n        let res;\n        if (typeof arcRows === \"number\" && arcRows >= 1) res = evalR(arcRows);\n        else if (fixed) {\n            const pitch = 2 * fixed * spacing;\n            res = evalR((r1 - r0) / pitch + 1);\n        } else {\n            const maxR = Math.max(1, Math.min(40, Math.ceil(Math.sqrt(total)) + 6));\n            res = evalR(1);\n            for(let R = 2; R <= maxR; R++){\n                const cand = evalR(R);\n                if (cand.dotR > res.dotR) res = cand;\n            }\n        }\n        if (fixed) res.dotR = fixed;\n        return res;\n    }\n    /**\n   * Lay out each category as a vertical BAR built from stacked dots (a unit /\n   * waffle column). Every bar shares one dot size and one width (the same\n   * number of dot columns); the bar's HEIGHT encodes its count. Dots fill each\n   * bar bottom-up, row by row. This is the \"dot bar\" state the circle layouts\n   * morph into: with `transition:'flow'` the dots glide straight from their\n   * circle slots into these bar slots (see the storyboard sample).\n   * @param {number[]} counts\n   * @param {any} opts\n   */ _layoutColumns(counts, opts) {\n        const w2 = this.w;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const labelsOn = !!(opts.clusterLabels && opts.clusterLabels.show);\n        const labelsBelow = labelsOn && opts.clusterLabels.position === \"bottom\";\n        const topPad = labelsOn && !labelsBelow ? 30 : 6;\n        const visible = counts.map((_, i2)=>i2).filter((i2)=>counts[i2] > 0);\n        const Kv = Math.max(1, visible.length);\n        const slotOf = new Array(counts.length).fill(-1);\n        visible.forEach((i2, s2)=>slotOf[i2] = s2);\n        const cellW = gw / Kv;\n        const barW = cellW * 0.62;\n        const bottomPad = Math.max(8, gh * 0.04) + (labelsBelow ? 30 : 0);\n        const availH = Math.max(4, gh - topPad - bottomPad);\n        const maxCount = Math.max(1, ...counts);\n        const spacing = opts.spacing > 0 ? opts.spacing : 1;\n        const colSize = opts.columns ? opts.columns.size : void 0;\n        let fixed;\n        if (opts.shape !== \"image\" && colSize === \"auto\") fixed = null;\n        else if (opts.shape !== \"image\" && typeof colSize === \"number\" && colSize > 0) fixed = colSize;\n        else fixed = this._fixedRadius(opts);\n        let cols = 1;\n        let pitch = 0;\n        if (fixed) {\n            pitch = 2 * fixed * spacing;\n            this._lastDotR = fixed;\n            const rowsCap = Math.max(1, Math.floor(availH / pitch));\n            const maxColsByWidth = Math.max(1, Math.floor(barW / pitch));\n            cols = Math.max(1, Math.min(maxColsByWidth, Math.ceil(maxCount / rowsCap)));\n        } else {\n            let best = 0;\n            const maxCols = Math.max(1, Math.min(40, Math.round(barW / 4)));\n            for(let c2 = 1; c2 <= maxCols; c2++){\n                const rows = Math.ceil(maxCount / c2);\n                const d = Math.min(barW / c2, availH / rows);\n                if (d > best) {\n                    best = d;\n                    cols = c2;\n                }\n            }\n            pitch = best;\n            this._lastDotR = Math.max(1, pitch / (2 * spacing));\n        }\n        const r2 = this._lastDotR;\n        const maxRows = Math.ceil(maxCount / cols);\n        const tallestBarH = Math.min(availH, maxRows * pitch);\n        const bottom = topPad + (availH + tallestBarH) / 2;\n        return counts.map((n2, i2)=>{\n            const cx = slotOf[i2] >= 0 ? cellW * (slotOf[i2] + 0.5) : gw / 2;\n            const rows = Math.ceil(Math.max(1, n2) / cols);\n            const barH = rows * pitch;\n            const left = cx - cols * pitch / 2 + pitch / 2;\n            const dots = [];\n            for(let j = 0; j < n2; j++){\n                const rowIdx = Math.floor(j / cols);\n                const colIdx = j % cols;\n                dots.push({\n                    x: left + colIdx * pitch,\n                    y: bottom - r2 - rowIdx * pitch\n                });\n            }\n            return {\n                i: i2,\n                cx: cx,\n                cy: bottom - barH / 2,\n                outerR: barH / 2,\n                // Flag read by _drawClusterLabel: a bar takes a straight label (above\n                // or below per clusterLabels.position), never a curved arc.\n                flat: true,\n                dots: dots\n            };\n        });\n    }\n    /**\n   * Lay out ALL categories into ONE regular lattice - a waffle / grid. Dots take\n   * sequential slots in DECLARED category order and fill row-major, `columns`\n   * wide, so each category owns a contiguous band of cells: a part-to-whole\n   * square \"pie\". `grid.total` (optional) re-allocates the cells to a fixed\n   * budget (e.g. 100) by largest remainder, so the grid reads as exact\n   * percentages regardless of the raw totals; without it there is one cell per\n   * unit (respecting unitValue / maxUnits). `grid.fillFrom` picks the first row.\n   * The category bands follow the legend order (no smallest-first sort), and\n   * each physical slot is keyed so a proportion change recolours boundary cells\n   * in place rather than reshuffling the whole grid.\n   * @param {number[]} counts\n   * @param {any} opts\n   */ _layoutGrid(counts, opts) {\n        if (opts.grid && opts.grid.split) return this._layoutGridSplit(counts, opts);\n        this._gridTrack = null;\n        const w2 = this.w;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const gcfg = opts.grid || {};\n        const cols = Math.max(1, Math.round(gcfg.columns > 0 ? gcfg.columns : 10));\n        const fillFrom = gcfg.fillFrom === \"top\" ? \"top\" : \"bottom\";\n        const cells = gcfg.total > 0 ? this._largestRemainder(counts, Math.round(gcfg.total)) : counts.slice();\n        const totalCells = cells.reduce((a2, b2)=>a2 + b2, 0);\n        const rows = Math.max(1, Math.ceil(Math.max(1, totalCells) / cols));\n        const labelSpace = 6;\n        const spacing = opts.spacing > 0 ? opts.spacing : 1;\n        const availW = Math.max(4, gw);\n        const availH = Math.max(4, gh - labelSpace);\n        const fixed = this._fixedRadius(opts);\n        let pitch = 0;\n        if (fixed) {\n            pitch = 2 * fixed * spacing;\n            this._lastDotR = fixed;\n        } else {\n            pitch = Math.min(availW / cols, availH / rows);\n            this._lastDotR = Math.max(1, pitch / (2 * spacing));\n        }\n        const blockW = cols * pitch;\n        const blockH = rows * pitch;\n        const originX = (gw - blockW) / 2 + pitch / 2;\n        const topY = labelSpace + (availH - blockH) / 2;\n        const rowY = (rowIdx)=>fillFrom === \"bottom\" ? topY + blockH - pitch / 2 - rowIdx * pitch : topY + pitch / 2 + rowIdx * pitch;\n        const clusters = counts.map((_, i2)=>({\n                i: i2,\n                cx: gw / 2,\n                cy: labelSpace + availH / 2,\n                outerR: Math.max(blockW, blockH) / 2,\n                /** @type {{x:number,y:number,slot?:number}[]} */ dots: []\n            }));\n        let k = 0;\n        for(let ci = 0; ci < cells.length; ci++)for(let j = 0; j < cells[ci]; j++){\n            const col = k % cols;\n            const rowIdx = Math.floor(k / cols);\n            clusters[ci].dots.push({\n                x: originX + col * pitch,\n                y: rowY(rowIdx),\n                slot: k\n            });\n            k++;\n        }\n        return clusters;\n    }\n    /**\n   * Small-multiple (\"trellis\") waffles: ONE mini-waffle per category, laid out\n   * in a near-square grid of tiles. Each tile has `grid.total` cells (default\n   * 100 -> a 10x10 tile) and fills a fraction of them equal to the category's\n   * value over a denominator (`grid.max`, else the largest count so the leader\n   * fills its tile and every other tile stays proportionally full - no empty\n   * tiles for arbitrary data). The unfilled cells are drawn as a faint TRACK\n   * backdrop (see _drawGridTrack) so each tile reads as a part-to-whole \"of N\".\n   * Only VISIBLE (non-zero) categories claim a tile, so a legend hide drops the\n   * tile and the rest re-flow. Each filled cell is keyed by a physical\n   * `tile*cells + localCell` slot, so a value change grows/shrinks a tile's fill\n   * in place instead of reshuffling.\n   * @param {number[]} counts @param {any} opts\n   */ _layoutGridSplit(counts, opts) {\n        const w2 = this.w;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const gcfg = opts.grid || {};\n        const cols = Math.max(1, Math.round(gcfg.columns > 0 ? gcfg.columns : 10));\n        const fillFrom = gcfg.fillFrom === \"top\" ? \"top\" : \"bottom\";\n        const cellsPerTile = Math.max(1, Math.round(gcfg.total > 0 ? gcfg.total : 100));\n        const rowsPerTile = Math.max(1, Math.ceil(cellsPerTile / cols));\n        const visible = counts.map((_, i2)=>i2).filter((i2)=>counts[i2] > 0);\n        const K = Math.max(1, visible.length);\n        const denom = gcfg.max > 0 ? gcfg.max : Math.max(1, ...counts);\n        const tileCols = Math.max(1, Math.round(gcfg.tileColumns > 0 ? gcfg.tileColumns : Math.ceil(Math.sqrt(K))));\n        const tileRows = Math.max(1, Math.ceil(K / tileCols));\n        const labelsOn = !(opts.clusterLabels && opts.clusterLabels.show === false);\n        const labelsBelow = labelsOn && opts.clusterLabels && opts.clusterLabels.position === \"bottom\";\n        const topBand = labelsOn && !labelsBelow ? 22 : 4;\n        const botBand = labelsOn && labelsBelow ? 22 : 4;\n        const tileW = gw / tileCols;\n        const tileH = gh / tileRows;\n        const availTileW = Math.max(4, tileW * 0.86);\n        const availTileH = Math.max(4, tileH - topBand - botBand);\n        const spacing = opts.spacing > 0 ? opts.spacing : 1;\n        const fixed = this._fixedRadius(opts);\n        let pitch = 0;\n        if (fixed) {\n            pitch = 2 * fixed * spacing;\n            this._lastDotR = fixed;\n        } else {\n            pitch = Math.min(availTileW / cols, availTileH / rowsPerTile);\n            this._lastDotR = Math.max(1, pitch / (2 * spacing));\n        }\n        const blockW = cols * pitch;\n        const blockH = rowsPerTile * pitch;\n        const rowY = (topY, rowIdx)=>fillFrom === \"bottom\" ? topY + blockH - pitch / 2 - rowIdx * pitch : topY + pitch / 2 + rowIdx * pitch;\n        const track = [];\n        const clusters = [];\n        visible.forEach((ci, t2)=>{\n            const tc = t2 % tileCols;\n            const tr = Math.floor(t2 / tileCols);\n            const tileX = tc * tileW;\n            const tileYtop = tr * tileH;\n            const originX = tileX + (tileW - blockW) / 2 + pitch / 2;\n            const topY = tileYtop + topBand + (availTileH - blockH) / 2;\n            const cellXY = (k)=>({\n                    x: originX + k % cols * pitch,\n                    y: rowY(topY, Math.floor(k / cols))\n                });\n            for(let k = 0; k < cellsPerTile; k++)track.push(cellXY(k));\n            const filled = Math.max(0, Math.min(cellsPerTile, Math.round(counts[ci] / denom * cellsPerTile)));\n            const dots = [];\n            for(let k = 0; k < filled; k++){\n                const p2 = cellXY(k);\n                dots.push({\n                    x: p2.x,\n                    y: p2.y,\n                    slot: t2 * cellsPerTile + k\n                });\n            }\n            clusters.push({\n                i: ci,\n                cx: tileX + tileW / 2,\n                cy: topY + blockH / 2,\n                outerR: blockH / 2,\n                // Straight per-tile label (never a curved arc), placed by position.\n                flat: true,\n                split: true,\n                dots: dots\n            });\n        });\n        this._gridDenom = denom;\n        this._gridTrack = {\n            cells: track\n        };\n        return clusters;\n    }\n    /**\n   * Draw the faint \"track\" backdrop for the small-multiple grid: every cell of\n   * every tile's full lattice, so the filled (coloured) cells drawn on top read\n   * as a fraction of the whole. Static (redrawn each render, never animated);\n   * painted BEHIND the series groups. `grid.trackColor` overrides the default\n   * theme-neutral grey.\n   * @param {any} ret @param {Graphics} graphics @param {any} opts\n   */ _drawGridTrack(ret, graphics, opts) {\n        const track = this._gridTrack;\n        if (!track || !track.cells || !track.cells.length) return;\n        const r2 = this._lastDotR;\n        const gcfg = opts.grid || {};\n        const trackColor = gcfg.trackColor || \"rgba(128,128,128,0.14)\";\n        const g2 = graphics.group({\n            class: \"apexcharts-unit-track\"\n        });\n        track.cells.forEach((c2)=>{\n            let el;\n            if (opts.shape === \"square\") {\n                const side = r2 * 2;\n                el = graphics.drawRect(0, 0, side, side, opts.borderRadius || 0, trackColor, 1, 0, \"none\");\n                el.node.setAttribute(\"fill\", trackColor);\n                el.node.setAttribute(\"x\", String(c2.x - r2));\n                el.node.setAttribute(\"y\", String(c2.y - r2));\n            } else {\n                el = graphics.drawCircle(r2, {\n                    fill: trackColor,\n                    \"stroke-width\": 0,\n                    stroke: \"none\"\n                });\n                el.node.setAttribute(\"fill\", trackColor);\n                el.node.setAttribute(\"cx\", String(c2.x));\n                el.node.setAttribute(\"cy\", String(c2.y));\n            }\n            el.node.classList.add(\"apexcharts-unit-track-cell\");\n            g2.add(el);\n        });\n        ret.add(g2);\n    }\n    /**\n   * Scatter / beeswarm layout: position every unit on a real numeric X value\n   * axis by its own value (`_unitValueOf`), laned by category on Y. Within a\n   * lane an anti-overlap \"swarm\" pack (or a random jitter) spreads the dots off\n   * the centre line so equal / close values do not stack on top of each other.\n   * This is the unit chart's answer to \"put these on axes\": one dot per datum,\n   * placed by data, with a drawn value axis + category lanes (see\n   * _drawScatterAxes). Needs the per-unit object form (each datum a numeric\n   * `value`/`y`); flat counts have no per-unit value, so their lanes stay empty.\n   * @param {any} opts\n   */ _layoutScatter(opts) {\n        const w2 = this.w;\n        const scfg = opts.scatter || {};\n        if (scfg.y === \"value\") return this._layoutScatter2D(opts);\n        if (scfg.orientation === \"vertical\") return this._layoutScatterVertical(opts);\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const unitData = w2.seriesData.unitData || [];\n        const names = w2.seriesData.seriesNames || [];\n        const valueOf = (d)=>this._unitValueOf(d);\n        const sizeStats = this._scatterSizeStats(scfg, unitData);\n        const catVals = unitData.map((cat)=>Array.isArray(cat) ? cat.map(valueOf) : []);\n        const isNum = (v2)=>v2 != null && isFinite(v2);\n        const visible = catVals.map((_, i2)=>i2).filter((i2)=>catVals[i2].some(isNum));\n        const Kv = Math.max(1, visible.length);\n        let vmin = Infinity;\n        let vmax = -Infinity;\n        catVals.forEach((vs)=>vs.forEach((v2)=>{\n                if (v2 != null && isFinite(v2)) {\n                    if (v2 < vmin) vmin = v2;\n                    if (v2 > vmax) vmax = v2;\n                }\n            }));\n        if (vmin === Infinity) {\n            vmin = 0;\n            vmax = 1;\n        }\n        const tickAmount = Math.max(2, Math.round(scfg.tickAmount > 0 ? scfg.tickAmount : 5));\n        const domain = this._scatterValueDomain(scfg, vmin, vmax, tickAmount);\n        const xMin = domain.min;\n        const xMax = domain.max;\n        const xSpan = xMax - xMin || 1;\n        const laneW = scfg.laneLabelWidth != null ? Math.max(0, scfg.laneLabelWidth) : Kv > 1 ? 92 : 8;\n        const bottomGutter = 30 + (scfg.xTitle ? 20 : 0);\n        const plotL = laneW;\n        const plotR = gw - 8;\n        const plotT = 10;\n        const plotB = gh - bottomGutter;\n        const plotW = Math.max(4, plotR - plotL);\n        const plotH = Math.max(4, plotB - plotT);\n        const plotX = (v2)=>plotL + (v2 - xMin) / xSpan * plotW;\n        const laneH = plotH / Kv;\n        const laneCy = (slot)=>plotT + laneH * (slot + 0.5);\n        let r2 = 0;\n        const fixed = this._fixedRadius(opts);\n        if (fixed) r2 = fixed;\n        else {\n            const maxLane = Math.max(1, ...visible.map((i2)=>catVals[i2].filter(isNum).length));\n            r2 = Math.max(2, Math.min(6, laneH * 0.12, plotW / (2.5 * Math.sqrt(maxLane))));\n        }\n        this._lastDotR = r2;\n        const spacing = opts.spacing > 0 ? opts.spacing : 1;\n        const step = Math.max(0.5, r2 * spacing);\n        const jitter = scfg.spread === \"jitter\";\n        const clusters = [];\n        const lanes = [];\n        const maxR = sizeStats ? sizeStats.rMax : r2;\n        visible.forEach((ci, slot)=>{\n            const cy = laneCy(slot);\n            lanes.push({\n                i: ci,\n                cy: cy,\n                name: names[ci] || `series-${ci + 1}`\n            });\n            const cat = unitData[ci] || [];\n            const pts = cat.map((d, j)=>{\n                const v2 = valueOf(d);\n                const p2 = {\n                    j: j,\n                    px: plotX(isNum(v2) ? v2 : xMin),\n                    y: cy\n                };\n                if (sizeStats) p2.r = this._scatterRadius(d, sizeStats, r2);\n                return p2;\n            });\n            if (jitter) {\n                const halfLane = Math.max(maxR, laneH / 2 - maxR);\n                pts.forEach((p2, k)=>{\n                    const t2 = (k * 9301 + 49297) % 233280 / 233280;\n                    p2.y = cy + (t2 * 2 - 1) * halfLane;\n                });\n            } else this._beeswarm(pts, cy, r2, step, maxR);\n            clusters.push({\n                i: ci,\n                cx: (plotL + plotR) / 2,\n                cy: cy,\n                outerR: laneH / 2,\n                dots: pts.map((p2)=>({\n                        x: p2.px,\n                        y: p2.y,\n                        r: p2.r\n                    }))\n            });\n        });\n        const ticks = domain.ticks;\n        this._scatterAxis = {\n            mode: \"1d\",\n            plotL: plotL,\n            plotR: plotR,\n            plotT: plotT,\n            plotB: plotB,\n            xMin: xMin,\n            xMax: xMax,\n            plotX: plotX,\n            ticks: ticks,\n            lanes: lanes,\n            xTitle: scfg.xTitle,\n            formatter: typeof scfg.xFormatter === \"function\" ? scfg.xFormatter : null,\n            gridlines: scfg.gridlines !== false\n        };\n        return clusters;\n    }\n    /**\n   * Vertical beeswarm: the transpose of _layoutScatter. The value runs UP the Y\n   * axis and each category is a column (lane) across X; the swarm pack spreads\n   * dots horizontally off each column's centre line. The value-axis config keys\n   * (`xMin`/`xMax`/`xTitle`/`xFormatter`/`tickAmount`) still describe the value\n   * axis (now Y), so flipping `orientation` keeps the same value settings.\n   * @param {any} opts\n   */ _layoutScatterVertical(opts) {\n        const w2 = this.w;\n        const scfg = opts.scatter || {};\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const unitData = w2.seriesData.unitData || [];\n        const names = w2.seriesData.seriesNames || [];\n        const valueOf = (d)=>this._unitValueOf(d);\n        const sizeStats = this._scatterSizeStats(scfg, unitData);\n        const catVals = unitData.map((cat)=>Array.isArray(cat) ? cat.map(valueOf) : []);\n        const isNum = (v2)=>v2 != null && isFinite(v2);\n        const visible = catVals.map((_, i2)=>i2).filter((i2)=>catVals[i2].some(isNum));\n        const Kv = Math.max(1, visible.length);\n        let vmin = Infinity;\n        let vmax = -Infinity;\n        catVals.forEach((vs)=>vs.forEach((v2)=>{\n                if (v2 != null && isFinite(v2)) {\n                    if (v2 < vmin) vmin = v2;\n                    if (v2 > vmax) vmax = v2;\n                }\n            }));\n        if (vmin === Infinity) {\n            vmin = 0;\n            vmax = 1;\n        }\n        const tickAmount = Math.max(2, Math.round(scfg.tickAmount > 0 ? scfg.tickAmount : 5));\n        const domain = this._scatterValueDomain(scfg, vmin, vmax, tickAmount);\n        const vMin = domain.min;\n        const vMax = domain.max;\n        const vSpan = vMax - vMin || 1;\n        const leftGutter = 46 + (scfg.xTitle ? 18 : 0);\n        const bottomGutter = Kv > 1 ? 26 : 10;\n        const plotL = leftGutter;\n        const plotR = gw - 10;\n        const plotT = 10;\n        const plotB = gh - bottomGutter;\n        const plotW = Math.max(4, plotR - plotL);\n        const plotH = Math.max(4, plotB - plotT);\n        const plotY = (v2)=>plotB - (v2 - vMin) / vSpan * plotH;\n        const laneW = plotW / Kv;\n        const laneCx = (slot)=>plotL + laneW * (slot + 0.5);\n        let r2 = 0;\n        const fixed = this._fixedRadius(opts);\n        if (fixed) r2 = fixed;\n        else {\n            const maxLane = Math.max(1, ...visible.map((i2)=>catVals[i2].filter(isNum).length));\n            r2 = Math.max(2, Math.min(6, laneW * 0.12, plotH / (2.5 * Math.sqrt(maxLane))));\n        }\n        this._lastDotR = r2;\n        const spacing = opts.spacing > 0 ? opts.spacing : 1;\n        const step = Math.max(0.5, r2 * spacing);\n        const jitter = scfg.spread === \"jitter\";\n        const clusters = [];\n        const lanes = [];\n        const maxR = sizeStats ? sizeStats.rMax : r2;\n        visible.forEach((ci, slot)=>{\n            const cx = laneCx(slot);\n            lanes.push({\n                i: ci,\n                cx: cx,\n                name: names[ci] || `series-${ci + 1}`\n            });\n            const cat = unitData[ci] || [];\n            const pts = cat.map((d, j)=>{\n                const v2 = valueOf(d);\n                const p2 = {\n                    j: j,\n                    py: plotY(isNum(v2) ? v2 : vMin),\n                    x: cx\n                };\n                if (sizeStats) p2.r = this._scatterRadius(d, sizeStats, r2);\n                return p2;\n            });\n            if (jitter) {\n                const halfLane = Math.max(maxR, laneW / 2 - maxR);\n                pts.forEach((p2, k)=>{\n                    const t2 = (k * 9301 + 49297) % 233280 / 233280;\n                    p2.x = cx + (t2 * 2 - 1) * halfLane;\n                });\n            } else this._beeswarm(pts, cx, r2, step, maxR, true);\n            clusters.push({\n                i: ci,\n                cx: cx,\n                cy: (plotT + plotB) / 2,\n                outerR: laneW / 2,\n                dots: pts.map((p2)=>({\n                        x: p2.x,\n                        y: p2.py,\n                        r: p2.r\n                    }))\n            });\n        });\n        const ticks = domain.ticks;\n        this._scatterAxis = {\n            mode: \"1d\",\n            orientation: \"vertical\",\n            plotL: plotL,\n            plotR: plotR,\n            plotT: plotT,\n            plotB: plotB,\n            vMin: vMin,\n            vMax: vMax,\n            plotY: plotY,\n            ticks: ticks,\n            lanes: lanes,\n            valueTitle: scfg.xTitle,\n            formatter: typeof scfg.xFormatter === \"function\" ? scfg.xFormatter : null,\n            gridlines: scfg.gridlines !== false\n        };\n        return clusters;\n    }\n    /**\n   * 2D value-value scatter: each datum is a point at (`x`, `y`) on two numeric\n   * axes (a scatter / bubble plot in the unit family - premium, keyed\n   * transitions, per-unit colour/tooltip). Category = colour (one series group\n   * per category). With `scatter.sizeRange` set, each dot is a BUBBLE scaled (by\n   * area) from its `sizeField` (default 'z'). Needs the object form with numeric\n   * `x` + `y`.\n   * @param {any} opts\n   */ _layoutScatter2D(opts) {\n        const w2 = this.w;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const scfg = opts.scatter || {};\n        const unitData = w2.seriesData.unitData || [];\n        const isNum = (v2)=>typeof v2 === \"number\" && isFinite(v2);\n        const xOf = (d)=>d && typeof d === \"object\" ? d.x : null;\n        const yOf = (d)=>d && typeof d === \"object\" ? d.y != null ? d.y : d.value : null;\n        const visible = unitData.map((_, i2)=>i2).filter((i2)=>(unitData[i2] || []).some((d)=>isNum(xOf(d)) && isNum(yOf(d))));\n        let xmn = Infinity;\n        let xmx = -Infinity;\n        let ymn = Infinity;\n        let ymx = -Infinity;\n        unitData.forEach((cat)=>(cat || []).forEach((d)=>{\n                const x = xOf(d);\n                const y = yOf(d);\n                if (isNum(x) && isNum(y)) {\n                    if (x < xmn) xmn = x;\n                    if (x > xmx) xmx = x;\n                    if (y < ymn) ymn = y;\n                    if (y > ymx) ymx = y;\n                }\n            }));\n        if (xmn === Infinity) {\n            xmn = 0;\n            xmx = 1;\n            ymn = 0;\n            ymx = 1;\n        }\n        const xTicksN = Math.max(2, Math.round(scfg.tickAmount > 0 ? scfg.tickAmount : 5));\n        const yTicksN = Math.max(2, Math.round(scfg.yTickAmount > 0 ? scfg.yTickAmount : 5));\n        const nx = this._niceScale(scfg.xMin != null ? scfg.xMin : xmn, scfg.xMax != null ? scfg.xMax : xmx, xTicksN);\n        const ny = this._niceScale(scfg.yMin != null ? scfg.yMin : ymn, scfg.yMax != null ? scfg.yMax : ymx, yTicksN);\n        const xMin = scfg.xMin != null ? scfg.xMin : nx.min;\n        const xMax = scfg.xMax != null ? scfg.xMax : nx.max;\n        const yMin = scfg.yMin != null ? scfg.yMin : ny.min;\n        const yMax = scfg.yMax != null ? scfg.yMax : ny.max;\n        const xSpan = xMax - xMin || 1;\n        const ySpan = yMax - yMin || 1;\n        const leftGutter = 46 + (scfg.yTitle ? 18 : 0);\n        const bottomGutter = 30 + (scfg.xTitle ? 20 : 0);\n        const plotL = leftGutter;\n        const plotR = gw - 12;\n        const plotT = 10;\n        const plotB = gh - bottomGutter;\n        const plotW = Math.max(4, plotR - plotL);\n        const plotH = Math.max(4, plotB - plotT);\n        const plotX = (v2)=>plotL + (v2 - xMin) / xSpan * plotW;\n        const plotY = (v2)=>plotB - (v2 - yMin) / ySpan * plotH;\n        const sizeStats = this._scatterSizeStats(scfg, unitData);\n        const baseR = this._fixedRadius(opts) || 5;\n        this._lastDotR = baseR;\n        const clusters = [];\n        visible.forEach((ci)=>{\n            const cat = unitData[ci] || [];\n            const dots = cat.map((d)=>{\n                const x = xOf(d);\n                const y = yOf(d);\n                return {\n                    x: plotX(isNum(x) ? x : xMin),\n                    y: plotY(isNum(y) ? y : yMin),\n                    r: sizeStats ? this._scatterRadius(d, sizeStats, baseR) : void 0\n                };\n            });\n            clusters.push({\n                i: ci,\n                cx: (plotL + plotR) / 2,\n                cy: (plotT + plotB) / 2,\n                outerR: plotH / 2,\n                dots: dots\n            });\n        });\n        const mkTicks = (lo, hi, span, spacing, pinned, n2)=>{\n            const out = [];\n            if (pinned) for(let k = 0; k < n2; k++)out.push(lo + span * k / (n2 - 1));\n            else {\n                const sp = spacing || span / Math.max(1, n2 - 1);\n                for(let v2 = lo; v2 <= hi + sp * 0.5; v2 += sp)out.push(Math.abs(v2) < sp * 1e-9 ? 0 : v2);\n            }\n            return out;\n        };\n        this._scatterAxis = {\n            mode: \"2d\",\n            plotL: plotL,\n            plotR: plotR,\n            plotT: plotT,\n            plotB: plotB,\n            plotX: plotX,\n            plotY: plotY,\n            xTicks: mkTicks(xMin, xMax, xSpan, nx.spacing, scfg.xMin != null || scfg.xMax != null, xTicksN),\n            yTicks: mkTicks(yMin, yMax, ySpan, ny.spacing, scfg.yMin != null || scfg.yMax != null, yTicksN),\n            xTitle: scfg.xTitle,\n            yTitle: scfg.yTitle,\n            xFormatter: typeof scfg.xFormatter === \"function\" ? scfg.xFormatter : null,\n            yFormatter: typeof scfg.yFormatter === \"function\" ? scfg.yFormatter : null,\n            gridlines: scfg.gridlines !== false\n        };\n        return clusters;\n    }\n    /**\n   * Bubble size stats for the scatter layout, or null when `scatter.sizeRange`\n   * is not a `[minR, maxR]` pair. Reads the global range of each datum's\n   * `sizeField` (default 'z') so a value maps to a radius (area scale) in\n   * _scatterRadius.\n   * @param {any} scfg @param {any[][]} unitData\n   * @returns {{zmin:number,zmax:number,rMin:number,rMax:number,field:string}|null}\n   */ _scatterSizeStats(scfg, unitData) {\n        const range = scfg && scfg.sizeRange;\n        if (!Array.isArray(range) || range.length < 2) return null;\n        const rMin = Math.max(0.5, +range[0]);\n        const rMax = Math.max(rMin, +range[1]);\n        const field = scfg.sizeField || \"z\";\n        let zmin = Infinity;\n        let zmax = -Infinity;\n        unitData.forEach((cat)=>(cat || []).forEach((d)=>{\n                const z = d && typeof d === \"object\" ? d[field] : null;\n                if (typeof z === \"number\" && isFinite(z)) {\n                    if (z < zmin) zmin = z;\n                    if (z > zmax) zmax = z;\n                }\n            }));\n        if (zmin === Infinity) return null;\n        return {\n            zmin: zmin,\n            zmax: zmax,\n            rMin: rMin,\n            rMax: rMax,\n            field: field\n        };\n    }\n    /**\n   * Radius for one datum under the bubble size stats: area proportional to the\n   * `sizeField` value (so radius grows with sqrt), between rMin and rMax. A\n   * missing value collapses to rMin.\n   * @param {any} d\n   * @param {{zmin:number,zmax:number,rMin:number,rMax:number,field:string}} st\n   * @param {number} fallback @returns {number}\n   */ _scatterRadius(d, st, fallback) {\n        if (!st) return fallback;\n        const z = d && typeof d === \"object\" ? d[st.field] : null;\n        if (typeof z !== \"number\" || !isFinite(z)) return st.rMin;\n        const t2 = st.zmax > st.zmin ? (z - st.zmin) / (st.zmax - st.zmin) : 1;\n        const tc = Math.max(0, Math.min(1, t2));\n        const aMin = st.rMin * st.rMin;\n        const aMax = st.rMax * st.rMax;\n        return Math.sqrt(aMin + tc * (aMax - aMin));\n    }\n    /**\n   * One-dimensional anti-overlap \"beeswarm\" pack: given points with a fixed x\n   * (`px`) and a lane centre `cy`, assign each a y so no two dots overlap (centre\n   * distance >= r_i + r_j). Greedy in ascending-x order, trying offsets 0, +step,\n   * -step, +2step ... and taking the SMALLEST that clears every already-placed\n   * neighbour still within reach in x. No-overlap always wins: a very dense lane\n   * grows a taller swarm rather than stacking dots (offsets are not hard-clamped\n   * to the lane). Each point may carry its own radius `r` (bubble beeswarm),\n   * else `rFallback` applies; `maxR` bounds the value-window break. Deterministic\n   * (no physics, no randomness).\n   *\n   * Orientation-agnostic: the \"fixed\" axis is the value axis and the \"spread\"\n   * axis is the lane thickness. Horizontal (default): fixed = `px`, spread = `y`\n   * (mutates `.y`). Vertical: fixed = `py`, spread = `x` (mutates `.x`).\n   * @param {any[]} pts @param {number} center lane centre on the spread axis\n   * @param {number} rFallback @param {number} step @param {number} [maxR]\n   * @param {boolean} [vertical]\n   */ _beeswarm(pts, center, rFallback, step, maxR, vertical = false) {\n        const fk = vertical ? \"py\" : \"px\";\n        const sk = vertical ? \"x\" : \"y\";\n        const order = pts.slice().sort((a2, b2)=>a2[fk] - b2[fk]);\n        const placed = [];\n        const rCap = maxR != null ? maxR : rFallback;\n        order.forEach((p2)=>{\n            const pr = p2.r != null ? p2.r : rFallback;\n            let chosen = 0;\n            for(let k = 0; k < 2e3; k++){\n                const off = k === 0 ? 0 : Math.ceil(k / 2) * step * (k % 2 ? 1 : -1);\n                const s2 = center + off;\n                let ok = true;\n                for(let m2 = placed.length - 1; m2 >= 0; m2--){\n                    const q = placed[m2];\n                    const df = p2[fk] - q.f;\n                    if (df > pr + rCap) break;\n                    const need = pr + q.r;\n                    const ds = s2 - q.s;\n                    if (df * df + ds * ds < need * need) {\n                        ok = false;\n                        break;\n                    }\n                }\n                if (ok) {\n                    chosen = off;\n                    break;\n                }\n            }\n            p2[sk] = center + chosen;\n            placed.push({\n                f: p2[fk],\n                s: p2[sk],\n                r: pr\n            });\n        });\n    }\n    /**\n   * Value-axis domain + ticks for a 1D beeswarm. The domain ALWAYS contains\n   * every datum: a swarm that clips a dot outside the plot box is a bug, so an\n   * explicit `xMin`/`xMax` only FRAMES the axis and is extended by whole\n   * tick-steps whenever the data would otherwise overflow. Orientation-agnostic:\n   * the same value axis is X for a horizontal swarm and Y for a vertical one.\n   * @param {any} scfg scatter config\n   * @param {number} vmin data minimum @param {number} vmax data maximum\n   * @param {number} tickAmount desired tick count\n   * @returns {{ min:number, max:number, ticks:number[] }}\n   */ _scatterValueDomain(scfg, vmin, vmax, tickAmount) {\n        const buildTicks = (min, max, spacing2)=>{\n            const ticks = [];\n            for(let v2 = min; v2 <= max + spacing2 * 0.5; v2 += spacing2)ticks.push(Math.abs(v2) < spacing2 * 1e-9 ? 0 : v2);\n            return ticks;\n        };\n        if (scfg.xMin != null || scfg.xMax != null) {\n            let min = scfg.xMin != null ? scfg.xMin : vmin;\n            let max = scfg.xMax != null ? scfg.xMax : vmax;\n            if (!(max > min)) max = min + 1;\n            const spacing2 = (max - min) / Math.max(1, tickAmount - 1);\n            if (vmin < min) min -= Math.ceil((min - vmin) / spacing2) * spacing2;\n            if (vmax > max) max += Math.ceil((vmax - max) / spacing2) * spacing2;\n            return {\n                min: min,\n                max: max,\n                ticks: buildTicks(min, max, spacing2)\n            };\n        }\n        const nice = this._niceScale(vmin, vmax, tickAmount);\n        const spacing = nice.spacing || (nice.max - nice.min) / Math.max(1, tickAmount - 1);\n        return {\n            min: nice.min,\n            max: nice.max,\n            ticks: buildTicks(nice.min, nice.max, spacing)\n        };\n    }\n    /**\n   * A \"nice\" numeric scale [min, max] + tick spacing covering [dataMin, dataMax]\n   * with about `ticks` ticks, using rounded 1/2/5 x 10^n steps. Homegrown (no\n   * dependency) - lean-core.\n   * @param {number} dataMin @param {number} dataMax @param {number} ticks\n   * @returns {{min:number,max:number,spacing:number}}\n   */ _niceScale(dataMin, dataMax, ticks) {\n        const lo = dataMin;\n        let hi = dataMax;\n        if (!(hi > lo)) hi = lo + 1;\n        const range = this._niceNum(hi - lo, false);\n        const spacing = this._niceNum(range / Math.max(1, ticks - 1), true);\n        return {\n            min: Math.floor(lo / spacing) * spacing,\n            max: Math.ceil(hi / spacing) * spacing,\n            spacing: spacing\n        };\n    }\n    /**\n   * Round a range to a \"nice\" 1/2/5 x 10^n number (Heckbert's loose/round label\n   * algorithm).\n   * @param {number} range @param {boolean} round @returns {number}\n   */ _niceNum(range, round) {\n        const rng = range > 0 ? range : 1;\n        const exp = Math.floor(Math.log(rng) / Math.LN10);\n        const frac = rng / Math.pow(10, exp);\n        let nf;\n        if (round) nf = frac < 1.5 ? 1 : frac < 3 ? 2 : frac < 7 ? 5 : 10;\n        else nf = frac <= 1 ? 1 : frac <= 2 ? 2 : frac <= 5 ? 5 : 10;\n        return nf * Math.pow(10, exp);\n    }\n    /**\n   * Draw the scatter chrome behind the dots, from the geometry the layout\n   * stashed on `this._scatterAxis`. 1D (beeswarm): vertical X gridlines +\n   * baseline + tick labels (+ x title) + a per-lane category label in the\n   * category colour. 2D: both X + Y gridlines, both axes' tick labels, and\n   * rotated/placed axis titles (no lane labels - category is colour). Browser-\n   * only (SSR renders the dots without the chrome, as with cluster labels).\n   * @param {any} ret @param {Graphics} graphics\n   */ _drawScatterAxes(ret, graphics) {\n        const w2 = this.w;\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const ax = this._scatterAxis;\n        if (!ax) return;\n        const NS = \"http://www.w3.org/2000/svg\";\n        const g2 = graphics.group({\n            class: \"apexcharts-unit-axis\"\n        });\n        const gridColor = w2.config.grid && w2.config.grid.borderColor || \"rgba(128,128,128,0.18)\";\n        const axisColor = \"rgba(128,128,128,0.5)\";\n        const cfgColors = w2.config.xaxis && w2.config.xaxis.labels && w2.config.xaxis.labels.style && w2.config.xaxis.labels.style.colors;\n        const configuredLabelColor = Array.isArray(cfgColors) ? cfgColors[0] : cfgColors;\n        const labelColor = configuredLabelColor || \"rgba(120,130,140,0.9)\";\n        const line = (x1, y1, x2, y2, stroke)=>{\n            const l2 = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"line\");\n            l2.setAttribute(\"x1\", String(x1));\n            l2.setAttribute(\"y1\", String(y1));\n            l2.setAttribute(\"x2\", String(x2));\n            l2.setAttribute(\"y2\", String(y2));\n            l2.setAttribute(\"stroke\", stroke);\n            l2.setAttribute(\"shape-rendering\", \"crispEdges\");\n            g2.node.appendChild(l2);\n        };\n        const text = (str, x, y, anchor, fill, size, weight, cls)=>{\n            const t2 = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"text\");\n            t2.setAttribute(\"class\", cls);\n            t2.setAttribute(\"x\", String(x));\n            t2.setAttribute(\"y\", String(y));\n            t2.setAttribute(\"text-anchor\", anchor);\n            t2.setAttribute(\"dominant-baseline\", \"middle\");\n            t2.setAttribute(\"font-size\", `${size}px`);\n            t2.setAttribute(\"font-family\", w2.config.chart.fontFamily || \"inherit\");\n            t2.setAttribute(\"font-weight\", String(weight));\n            t2.setAttribute(\"fill\", fill);\n            t2.textContent = str;\n            g2.node.appendChild(t2);\n        };\n        if (ax.mode === \"2d\") {\n            ax.yTicks.forEach((v2)=>{\n                const y = ax.plotY(v2);\n                if (ax.gridlines) line(ax.plotL, y, ax.plotR, y, gridColor);\n                const label = ax.yFormatter ? String(ax.yFormatter(v2)) : this._formatTick(v2);\n                text(label, ax.plotL - 8, y, \"end\", labelColor, 11, 400, \"apexcharts-unit-tick\");\n            });\n            ax.xTicks.forEach((v2)=>{\n                const x = ax.plotX(v2);\n                if (ax.gridlines) line(x, ax.plotT, x, ax.plotB, gridColor);\n                const label = ax.xFormatter ? String(ax.xFormatter(v2)) : this._formatTick(v2);\n                text(label, x, ax.plotB + 14, \"middle\", labelColor, 11, 400, \"apexcharts-unit-tick\");\n            });\n            line(ax.plotL, ax.plotB, ax.plotR, ax.plotB, axisColor);\n            line(ax.plotL, ax.plotT, ax.plotL, ax.plotB, axisColor);\n            if (ax.xTitle) text(String(ax.xTitle), (ax.plotL + ax.plotR) / 2, ax.plotB + 32, \"middle\", labelColor, 12, 600, \"apexcharts-unit-axis-title\");\n            if (ax.yTitle) {\n                const yt = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"text\");\n                yt.setAttribute(\"class\", \"apexcharts-unit-axis-title\");\n                const tx = 14;\n                const ty = (ax.plotT + ax.plotB) / 2;\n                yt.setAttribute(\"x\", String(tx));\n                yt.setAttribute(\"y\", String(ty));\n                yt.setAttribute(\"text-anchor\", \"middle\");\n                yt.setAttribute(\"font-size\", \"12px\");\n                yt.setAttribute(\"font-family\", w2.config.chart.fontFamily || \"inherit\");\n                yt.setAttribute(\"font-weight\", \"600\");\n                yt.setAttribute(\"fill\", labelColor);\n                yt.setAttribute(\"transform\", `rotate(-90 ${tx} ${ty})`);\n                yt.textContent = String(ax.yTitle);\n                g2.node.appendChild(yt);\n            }\n            ret.add(g2);\n            return;\n        }\n        if (ax.orientation === \"vertical\") {\n            ax.ticks.forEach((v2)=>{\n                const y = ax.plotY(v2);\n                if (ax.gridlines) line(ax.plotL, y, ax.plotR, y, gridColor);\n                const label = ax.formatter ? String(ax.formatter(v2)) : this._formatTick(v2);\n                text(label, ax.plotL - 8, y, \"end\", labelColor, 11, 400, \"apexcharts-unit-tick\");\n            });\n            line(ax.plotL, ax.plotT, ax.plotL, ax.plotB, axisColor);\n            if (ax.valueTitle) {\n                const yt = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"text\");\n                yt.setAttribute(\"class\", \"apexcharts-unit-axis-title\");\n                const tx = 14;\n                const ty = (ax.plotT + ax.plotB) / 2;\n                yt.setAttribute(\"x\", String(tx));\n                yt.setAttribute(\"y\", String(ty));\n                yt.setAttribute(\"text-anchor\", \"middle\");\n                yt.setAttribute(\"font-size\", \"12px\");\n                yt.setAttribute(\"font-family\", w2.config.chart.fontFamily || \"inherit\");\n                yt.setAttribute(\"font-weight\", \"600\");\n                yt.setAttribute(\"fill\", labelColor);\n                yt.setAttribute(\"transform\", `rotate(-90 ${tx} ${ty})`);\n                yt.textContent = String(ax.valueTitle);\n                g2.node.appendChild(yt);\n            }\n            ax.lanes.forEach((lane)=>{\n                const color = configuredLabelColor || w2.globals.colors[lane.i] || w2.globals.colors[0] || \"#008FFB\";\n                text(lane.name, lane.cx, ax.plotB + 16, \"middle\", color, 12, 600, \"apexcharts-unit-lane-label\");\n            });\n            ret.add(g2);\n            return;\n        }\n        ax.ticks.forEach((v2, idx)=>{\n            const x = ax.plotX(v2);\n            if (ax.gridlines) line(x, ax.plotT, x, ax.plotB, gridColor);\n            const label = ax.formatter ? String(ax.formatter(v2)) : this._formatTick(v2);\n            const anchor = idx === 0 ? \"start\" : idx === ax.ticks.length - 1 ? \"end\" : \"middle\";\n            text(label, x, ax.plotB + 14, anchor, labelColor, 11, 400, \"apexcharts-unit-tick\");\n        });\n        line(ax.plotL, ax.plotB, ax.plotR, ax.plotB, axisColor);\n        if (ax.xTitle) text(String(ax.xTitle), (ax.plotL + ax.plotR) / 2, ax.plotB + 32, \"middle\", labelColor, 12, 600, \"apexcharts-unit-axis-title\");\n        if (ax.plotL > 12) ax.lanes.forEach((lane)=>{\n            const color = configuredLabelColor || w2.globals.colors[lane.i] || w2.globals.colors[0] || \"#008FFB\";\n            text(lane.name, ax.plotL - 8, lane.cy, \"end\", color, 12, 600, \"apexcharts-unit-lane-label\");\n        });\n        ret.add(g2);\n    }\n    /**\n   * Compact tick-value formatting: integers as-is, otherwise trimmed to a short\n   * decimal; large magnitudes get a k/M suffix.\n   * @param {number} v @returns {string}\n   */ _formatTick(v2) {\n        if (!isFinite(v2)) return \"\";\n        const a2 = Math.abs(v2);\n        if (a2 >= 1e6) return `${+(v2 / 1e6).toFixed(1)}M`;\n        if (a2 >= 1e4) return `${+(v2 / 1e3).toFixed(1)}k`;\n        if (Number.isInteger(v2)) return String(v2);\n        return String(+v2.toFixed(2));\n    }\n    /**\n   * Distribute `total` whole cells across `counts` in proportion to each value,\n   * using the largest-remainder method so the parts sum to exactly `total`\n   * (used by the grid/waffle percentage mode).\n   * @param {number[]} counts @param {number} total @returns {number[]}\n   */ _largestRemainder(counts, total) {\n        const sum = counts.reduce((a2, b2)=>a2 + b2, 0);\n        if (sum <= 0 || total <= 0) return counts.map(()=>0);\n        const exact = counts.map((c2)=>c2 / sum * total);\n        const floors = exact.map((v2)=>Math.floor(v2));\n        const used = floors.reduce((a2, b2)=>a2 + b2, 0);\n        const remaining = Math.max(0, total - used);\n        const byFrac = exact.map((v2, i2)=>({\n                i: i2,\n                frac: v2 - Math.floor(v2)\n            })).sort((a2, b2)=>b2.frac - a2.frac);\n        const out = floors.slice();\n        for(let n2 = 0; n2 < remaining && n2 < byFrac.length; n2++)out[byFrac[n2].i]++;\n        return out;\n    }\n    /**\n   * Phyllotaxis (sunflower) placement for `n` points around (cx, cy).\n   * @param {number} cx @param {number} cy @param {number} n\n   * @param {number} step @param {number} startIndex\n   * @returns {{x:number,y:number}[]}\n   */ _spiral(cx, cy, n2, step, startIndex) {\n        const pts = [];\n        for(let k = 0; k < n2; k++){\n            const idx = startIndex + k;\n            const r2 = step * Math.sqrt(idx + 0.5);\n            const theta = idx * $e4b487e979d7c06d$var$GOLDEN_ANGLE;\n            pts.push({\n                x: cx + r2 * Math.cos(theta),\n                y: cy + r2 * Math.sin(theta)\n            });\n        }\n        return pts;\n    }\n    /**\n   * A fixed dot radius, if the shape/size implies one: an explicit numeric\n   * `size`, or an `image` shape (sized by its own width/height). Returns null\n   * when dots should auto-size to fit the plot.\n   * @param {any} opts @returns {number | null}\n   */ _fixedRadius(opts) {\n        if (opts.shape === \"image\" && opts.image) return Math.max(opts.image.width || 20, opts.image.height || 20) / 2;\n        if (this._bubbleActive(opts) && typeof opts.sizeByValue.maxRadius === \"number\") return opts.sizeByValue.maxRadius > 0 ? opts.sizeByValue.maxRadius : null;\n        if (typeof opts.size === \"number\" && opts.size > 0) return opts.size;\n        return null;\n    }\n    /**\n   * Whether opt-in bubble sizing applies: enabled, and the shape is a circle\n   * (squares/images keep a uniform size).\n   * @param {any} opts @returns {boolean}\n   */ _bubbleActive(opts) {\n        const sbv = opts.sizeByValue;\n        return !!(sbv && sbv.enabled && opts.shape !== \"image\" && opts.shape !== \"square\");\n    }\n    /**\n   * This datum's numeric value for sizing / tooltip: the number itself, or an\n   * object's `value` / `y`. Null when there is no usable number.\n   * @param {any} d @returns {number | null}\n   */ _unitValueOf(d) {\n        if (typeof d === \"number\") return d;\n        if (d && typeof d === \"object\") {\n            const v2 = d.value != null ? d.value : d.y;\n            return typeof v2 === \"number\" ? v2 : null;\n        }\n        return null;\n    }\n    /**\n   * Radius for one bubble given the value stats. Default 'area' scaling makes\n   * a bubble's AREA proportional to its value (radius grows with sqrt); 'linear'\n   * scales the radius directly. Missing values collapse to the min radius.\n   * @param {number|null} v\n   * @param {{min:number,max:number,minR:number,maxR:number,scale:string}} stats\n   * @returns {number}\n   */ _radiusForValue(v2, stats) {\n        if (v2 == null || !isFinite(v2)) return stats.minR;\n        const t2 = stats.max > stats.min ? (v2 - stats.min) / (stats.max - stats.min) : 1;\n        const tc = Math.max(0, Math.min(1, t2));\n        if (stats.scale === \"linear\") return stats.minR + tc * (stats.maxR - stats.minR);\n        const aMin = stats.minR * stats.minR;\n        const aMax = stats.maxR * stats.maxR;\n        return Math.sqrt(aMin + tc * (aMax - aMin));\n    }\n    /**\n   * Value stats + radius bounds for bubble sizing, or null when it does not\n   * apply (disabled, non-circle shape, or no per-unit values). `maxR` is the\n   * reference radius the layout already spaced the lattice for; `minR` defaults\n   * to ~35% of it.\n   * @param {any[][]} unitData @param {any} opts @param {number} refR\n   * @returns {{min:number,max:number,minR:number,maxR:number,scale:string}|null}\n   */ _bubbleStats(unitData, opts, refR) {\n        if (!this._bubbleActive(opts)) return null;\n        let vmin = Infinity;\n        let vmax = -Infinity;\n        unitData.forEach((cat)=>{\n            if (!cat) return;\n            cat.forEach((d)=>{\n                const v2 = this._unitValueOf(d);\n                if (v2 != null && isFinite(v2)) {\n                    if (v2 < vmin) vmin = v2;\n                    if (v2 > vmax) vmax = v2;\n                }\n            });\n        });\n        if (vmin === Infinity || vmax < vmin) return null;\n        const sbv = opts.sizeByValue;\n        const maxR = refR;\n        const minR = Math.max(1, Math.min(maxR, typeof sbv.minRadius === \"number\" ? sbv.minRadius : maxR * 0.35));\n        return {\n            min: vmin,\n            max: vmax,\n            minR: minR,\n            maxR: maxR,\n            scale: sbv.scale === \"linear\" ? \"linear\" : \"area\"\n        };\n    }\n    /**\n   * Radial step between successive spiral shells. A fixed radius derives the\n   * step directly; 'auto' derives it so a cluster of `count` dots fits `availR`.\n   * @param {any} opts @param {number} availR @param {number} count\n   * @returns {number}\n   */ _resolveStep(opts, availR, count) {\n        const spacing = opts.spacing > 0 ? opts.spacing : 1;\n        const fixed = this._fixedRadius(opts);\n        if (fixed) return 2 * fixed * spacing;\n        return availR / (Math.sqrt(Math.max(1, count)) + 0.5);\n    }\n    /**\n   * @param {number} step @param {any} opts\n   * @returns {number}\n   */ _dotRadiusFromStep(step, opts) {\n        const spacing = opts.spacing > 0 ? opts.spacing : 1;\n        const fixed = this._fixedRadius(opts);\n        if (fixed) return fixed;\n        return Math.max(1, step / (2 * spacing));\n    }\n    /**\n   * Corner-anchored shapes (square, image) position by their top-left x/y;\n   * circles position by their centre cx/cy.\n   * @param {any} opts @returns {boolean}\n   */ _isCorner(opts) {\n        return opts.shape === \"square\" || opts.shape === \"image\";\n    }\n    /**\n   * Half-width/height used to convert a centre point to a corner shape's x/y.\n   * @param {any} opts @returns {{hx:number, hy:number}}\n   */ _halfExtent(opts) {\n        if (opts.shape === \"image\" && opts.image) return {\n            hx: (opts.image.width || 20) / 2,\n            hy: (opts.image.height || 20) / 2\n        };\n        const r2 = this._lastDotR;\n        return {\n            hx: r2,\n            hy: r2\n        };\n    }\n    /**\n   * Draw one dot (circle, square, or image icon) with the category fill +\n   * stroke, tagged so the shared non-axis tooltip and hover reuse work.\n   * @param {Graphics} graphics @param {any} opts @param {number} dotR\n   * @param {string} color @param {number} i @param {number} j\n   * @returns {any}\n   */ _drawDot(graphics, opts, dotR, color, i2, j) {\n        const w2 = this.w;\n        const strokeW = w2.config.stroke.show ? w2.config.stroke.width : 0;\n        const strokeColor = Array.isArray(w2.globals.stroke.colors) ? w2.globals.stroke.colors[i2] || \"none\" : \"none\";\n        const fillOpacity = typeof w2.config.fill.opacity === \"number\" ? w2.config.fill.opacity : 1;\n        let el;\n        if (opts.shape === \"image\" && opts.image && opts.image.src) {\n            const iw = opts.image.width || 20;\n            const ih = opts.image.height || 20;\n            el = w2.dom.Paper.image(opts.image.src);\n            el.node.setAttribute(\"width\", String(iw));\n            el.node.setAttribute(\"height\", String(ih));\n            el.node.setAttribute(\"preserveAspectRatio\", \"xMidYMid meet\");\n            if (opts.image.tint) el.node.setAttribute(\"filter\", `url(#${this._tintFilter(color)})`);\n        } else if (opts.shape === \"square\") {\n            const side = dotR * 2;\n            el = graphics.drawRect(0, 0, side, side, opts.borderRadius || 0, color, 1, strokeW, strokeColor);\n            el.node.setAttribute(\"fill\", color);\n            if (fillOpacity < 1) el.node.setAttribute(\"fill-opacity\", String(fillOpacity));\n        } else {\n            el = graphics.drawCircle(dotR, {\n                fill: color,\n                \"stroke-width\": strokeW,\n                stroke: strokeColor\n            });\n            el.node.setAttribute(\"fill\", color);\n            if (fillOpacity < 1) el.node.setAttribute(\"fill-opacity\", String(fillOpacity));\n        }\n        el.node.classList.add(\"apexcharts-unit-area\");\n        el.node.setAttribute(\"i\", String(i2));\n        el.node.setAttribute(\"j\", String(j));\n        return el;\n    }\n    /**\n   * Ensure (once per colour) an SVG recolour filter exists in the chart's defs\n   * and return its id. The filter floods `color` and clips it to the source\n   * graphic's alpha (feComposite operator=\"in\"), so an `<image>` referencing a\n   * monochrome icon is repainted in `color` while keeping its silhouette. Reused\n   * across every dot of the same colour.\n   * @param {string} color @returns {string}\n   */ _tintFilter(color) {\n        const w2 = this.w;\n        const NS = \"http://www.w3.org/2000/svg\";\n        const safe = String(color).replace(/[^a-zA-Z0-9]/g, \"\");\n        const id = `apexcharts-unit-tint-${w2.globals.chartID}-${safe}`;\n        const svg = w2.dom.Paper.node;\n        if (svg.querySelector(`#${id}`)) return id;\n        let defs = svg.querySelector(\"defs\");\n        if (!defs) {\n            defs = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"defs\");\n            svg.insertBefore(defs, svg.firstChild);\n        }\n        const filter = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"filter\");\n        filter.setAttribute(\"id\", id);\n        filter.setAttribute(\"x\", \"0%\");\n        filter.setAttribute(\"y\", \"0%\");\n        filter.setAttribute(\"width\", \"100%\");\n        filter.setAttribute(\"height\", \"100%\");\n        const flood = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"feFlood\");\n        flood.setAttribute(\"flood-color\", color);\n        flood.setAttribute(\"result\", \"flood\");\n        const comp = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"feComposite\");\n        comp.setAttribute(\"in\", \"flood\");\n        comp.setAttribute(\"in2\", \"SourceAlpha\");\n        comp.setAttribute(\"operator\", \"in\");\n        filter.appendChild(flood);\n        filter.appendChild(comp);\n        defs.appendChild(filter);\n        return id;\n    }\n    /**\n   * Position a non-animated dot at (x, y). Circles use cx/cy at the centre;\n   * corner shapes (square, image) use x/y at the top-left.\n   * @param {SVGElement} node @param {any} opts @param {number} x @param {number} y\n   */ _placeDot(node, opts, x, y) {\n        if (this._isCorner(opts)) {\n            const { hx: hx, hy: hy } = this._halfExtent(opts);\n            node.setAttribute(\"x\", String(x - hx));\n            node.setAttribute(\"y\", String(y - hy));\n        } else {\n            node.setAttribute(\"cx\", String(x));\n            node.setAttribute(\"cy\", String(y));\n        }\n    }\n    /**\n   * Parse a `#rgb` / `#rrggbb` / `rgb()` / `rgba()` colour to `[r, g, b]`, or\n   * null if it cannot be parsed (the colour tween is then skipped).\n   * @param {string} str @returns {number[] | null}\n   */ _rgb(str) {\n        if (typeof str !== \"string\") return null;\n        let s2 = str.trim();\n        if (s2[0] === \"#\") {\n            if (s2.length === 4) s2 = \"#\" + s2[1] + s2[1] + s2[2] + s2[2] + s2[3] + s2[3];\n            const n2 = parseInt(s2.slice(1, 7), 16);\n            if (isNaN(n2)) return null;\n            return [\n                n2 >> 16 & 255,\n                n2 >> 8 & 255,\n                n2 & 255\n            ];\n        }\n        const m2 = s2.match(/rgba?\\(([^)]+)\\)/);\n        if (m2) {\n            const p2 = m2[1].split(\",\").map((x)=>parseFloat(x));\n            if (p2.length >= 3 && p2.every((v2)=>!isNaN(v2))) return [\n                p2[0],\n                p2[1],\n                p2[2]\n            ];\n        }\n        return null;\n    }\n    /**\n   * Whether to run the gather / transition animation. Runs on the initial mount\n   * and on data-driven updates (keyed old->new tween or cross-type burst).\n   * Skipped: in SSR, when animations are off, when the caller passed\n   * `animate:false` (shouldAnimate === false), on a PURE window resize (resized\n   * with no data change - re-gathering on every resize would be jarring), and\n   * when the user prefers reduced motion.\n   *\n   * Note: `w.globals.resized` is set true on every update (not just window\n   * resize), so it must be paired with `!dataChanged` to isolate a real resize.\n   * @returns {boolean}\n   */ _shouldAnimate() {\n        const w2 = this.w;\n        const anim = w2.config.chart.animations;\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return false;\n        if (!anim || anim.enabled === false) return false;\n        if (w2.globals.shouldAnimate === false) return false;\n        if (w2.globals.resized && !w2.globals.dataChanged) return false;\n        if (anim.respectReducedMotion && $e4b487e979d7c06d$var$prefersReducedMotion()) return false;\n        return true;\n    }\n    /**\n   * Give every dot an x/y spring, reusing the live springs of a gather this\n   * render just cancelled.\n   *\n   * The reuse is the whole point of the spring path. A carried spring holds a\n   * dot's real on-screen position AND its velocity, so an interrupted gather\n   * resumes from there. Without it the dot restarts from `cx0`, which on an\n   * update is the slot it was still travelling towards - so every interruption\n   * teleports it forward and then re-animates from a standstill. A dragged\n   * slider or a scrubbed storyboard interrupts on almost every frame, which is\n   * where that reads worst.\n   *\n   * Springs left over from a completed gather are at rest on their targets, so\n   * carrying them is identical to making fresh ones. Only an interrupted flight\n   * carries anything.\n   *\n   * @param {UnitAnimDot[]} dots\n   * @param {any} gcfg plotOptions.unit.gather\n   * @param {number} speed chart.animations.speed, in ms\n   * @param {any} opts plotOptions.unit\n   */ _seedSprings(dots, gcfg, speed, opts) {\n        const [stiffness, damping] = $e4b487e979d7c06d$var$springParams(gcfg.spring, speed);\n        const live = this.ctx ? this.ctx._unitSprings : null;\n        const springs = /* @__PURE__ */ new Map();\n        for(let k = 0; k < dots.length; k++){\n            const d = dots[k];\n            const carried = live && !d.isEnter && d.key != null ? live.get(d.key) : null;\n            const sx = carried ? carried.x : $e4b487e979d7c06d$var$v(d.cx0, stiffness, damping);\n            const sy = carried ? carried.y : $e4b487e979d7c06d$var$v(d.cy0, stiffness, damping);\n            if (carried) {\n                sx.stiffness = stiffness;\n                sy.stiffness = stiffness;\n                sx.damping = damping;\n                sy.damping = damping;\n                d.cx0 = sx.value;\n                d.cy0 = sy.value;\n                this._placeDot(d.node, opts, d.cx0, d.cy0);\n                if (sx.velocity !== 0 || sy.velocity !== 0) d.delay = 0;\n            }\n            d.sx = sx;\n            d.sy = sy;\n            if (d.key != null) springs.set(d.key, {\n                x: sx,\n                y: sy\n            });\n        }\n        if (this.ctx) this.ctx._unitSprings = springs;\n    }\n    /**\n   * One rAF loop that tweens every dot from its start (cx0/cy0 - either the\n   * cluster centre on first mount / for entering dots, or its previous slot on\n   * an update) to its target slot, staggered by index. Entering dots fade in;\n   * moving dots stay opaque. Dots whose group colour changed (a 'flow' regroup)\n   * cross-fade their fill from the old colour to the new one over the same ease;\n   * dots whose radius changed (bubble sizing) grow/shrink over it too (circles).\n   *\n   * Position travels on a spring by default (`gather.motion`), so a gather\n   * interrupted by the next render resumes from where the dots actually are,\n   * carrying their velocity, rather than restarting from a standstill. Colour,\n   * radius and opacity stay on a fixed-duration ease either way: those are 0..1\n   * quantities, and the shared solver's rest thresholds are absolute (0.05 in\n   * caller units), which is negligible for pixels but 5% of a unit interval.\n   * @param {UnitAnimDot[]} dots\n   */ _runGather(dots) {\n        const w$1 = this.w;\n        const opts = w$1.config.plotOptions.unit;\n        const speed = Math.max(1, w$1.config.chart.animations.speed || 800);\n        const corner = this._isCorner(opts);\n        const { hx: hx, hy: hy } = this._halfExtent(opts);\n        const maxDelay = Math.min(speed * 0.6, 450);\n        const n2 = dots.length;\n        for(let k = 0; k < n2; k++)dots[k].delay = n2 > 1 ? k / (n2 - 1) * maxDelay : 0;\n        const cxAttr = corner ? \"x\" : \"cx\";\n        const cyAttr = corner ? \"y\" : \"cy\";\n        const offX = corner ? hx : 0;\n        const offY = corner ? hy : 0;\n        const gcfg = opts.gather || {};\n        const motion = gcfg.motion || \"auto\";\n        const useSpring = motion === \"spring\" || motion === \"auto\" && (!gcfg.easing || gcfg.easing === \"outCubic\");\n        if (useSpring) this._seedSprings(dots, gcfg, speed, opts);\n        else if (this.ctx) this.ctx._unitSprings = null;\n        if (corner) for(let k = 0; k < n2; k++){\n            dots[k].node.setAttribute(cxAttr, String(dots[k].cx0 - offX));\n            dots[k].node.setAttribute(cyAttr, String(dots[k].cy0 - offY));\n        }\n        if (!corner) for(let k = 0; k < n2; k++){\n            const d = dots[k];\n            if (d.r0 != null && d.r1 != null && d.r0 !== d.r1) d.node.setAttribute(\"r\", String(d.r0));\n        }\n        for(let k = 0; k < n2; k++){\n            const d = dots[k];\n            if (d.fill0 && d.fill1 && d.fill0 !== d.fill1) {\n                d._c0 = this._rgb(d.fill0);\n                d._c1 = this._rgb(d.fill1);\n            }\n        }\n        const easePos = gcfg.easing === \"outBack\" ? $e4b487e979d7c06d$var$easeOutBack(typeof gcfg.overshoot === \"number\" ? gcfg.overshoot : 1.70158) : gcfg.easing === \"inOutCubic\" ? $e4b487e979d7c06d$var$easeInOutCubic : $e4b487e979d7c06d$var$easeOutCubic;\n        if (this.w.globals.unitGatherRAF != null) {\n            $e4b487e979d7c06d$var$BrowserAPIs.cancelAnimationFrame(this.w.globals.unitGatherRAF);\n            this.w.globals.unitGatherRAF = null;\n        }\n        const start = performance.now();\n        let last = start;\n        const stepFn = (now)=>{\n            if (this.w.globals.isDestroyed) {\n                this.w.globals.unitGatherRAF = null;\n                return;\n            }\n            const dt = Math.min($e4b487e979d7c06d$var$MAX_FRAME_STEP, Math.max(0, (now - last) / 1e3));\n            last = now;\n            let done = true;\n            for(let k = 0; k < n2; k++){\n                const d = dots[k];\n                const elapsed = now - start - d.delay;\n                const t2 = Math.max(0, Math.min(1, elapsed / speed));\n                const ec = $e4b487e979d7c06d$var$easeOutCubic(t2);\n                let cx, cy;\n                if (d.sx && d.sy) {\n                    if (elapsed >= 0 && !d.released) {\n                        $e4b487e979d7c06d$var$w(d.sx, d.x);\n                        $e4b487e979d7c06d$var$w(d.sy, d.y);\n                        d.released = true;\n                    }\n                    const restX = $e4b487e979d7c06d$var$b(d.sx, dt);\n                    const restY = $e4b487e979d7c06d$var$b(d.sy, dt);\n                    if (!d.released || !restX || !restY) done = false;\n                    cx = d.sx.value;\n                    cy = d.sy.value;\n                } else {\n                    const e2 = easePos(t2);\n                    cx = d.cx0 + (d.x - d.cx0) * e2;\n                    cy = d.cy0 + (d.y - d.cy0) * e2;\n                }\n                d.node.setAttribute(cxAttr, String(cx - offX));\n                d.node.setAttribute(cyAttr, String(cy - offY));\n                if (d.isEnter) d.node.style.opacity = String(Math.min(1, t2 * 2.5));\n                if (d._c0 && d._c1) {\n                    const cr = Math.round(d._c0[0] + (d._c1[0] - d._c0[0]) * ec);\n                    const cg = Math.round(d._c0[1] + (d._c1[1] - d._c0[1]) * ec);\n                    const cb = Math.round(d._c0[2] + (d._c1[2] - d._c0[2]) * ec);\n                    d.node.setAttribute(\"fill\", `rgb(${cr},${cg},${cb})`);\n                }\n                if (!corner && d.r0 != null && d.r1 != null && d.r0 !== d.r1) d.node.setAttribute(\"r\", String(d.r0 + (d.r1 - d.r0) * ec));\n                if (t2 < 1) done = false;\n            }\n            if (done) {\n                for(let k = 0; k < n2; k++){\n                    const d = dots[k];\n                    d.node.style.opacity = \"\";\n                    if (d._c1 && d.fill1) d.node.setAttribute(\"fill\", d.fill1);\n                    if (!corner && d.r0 != null && d.r1 != null && d.r0 !== d.r1) d.node.setAttribute(\"r\", String(d.r1));\n                }\n                this.w.globals.unitGatherRAF = null;\n            } else this.w.globals.unitGatherRAF = $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(stepFn);\n        };\n        this.w.globals.unitGatherRAF = $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(stepFn);\n    }\n    /**\n   * Keys present in the previous render but not the current one, resolved back\n   * to their old slot {x, y, fill}. These are the dots that must animate out.\n   * @param {Map<string, {x:number,y:number,fill:string}>} prev\n   * @param {Map<string, {x:number,y:number,fill:string}>} nextPrev\n   * @param {any} opts\n   * @returns {{x:number,y:number,fill:string}[]}\n   */ _collectExits(prev, nextPrev, opts) {\n        const cap = Math.max(0, opts.maxUnits || 5e3);\n        const exits = [];\n        for (const [key, slot] of prev)if (!nextPrev.has(key)) {\n            exits.push(slot);\n            if (exits.length >= cap) break;\n        }\n        return exits;\n    }\n    /**\n   * Animate the exit ghosts out, then remove them. Layouts whose positions carry\n   * data (a waffle / grid lattice, or a scatter / beeswarm on real axes) fade\n   * their ghosts OUT IN PLACE - drifting them toward the plot centre would drag\n   * cells across tiles or bubbles across the plane, which reads as wrong. The\n   * blob / bar layouts keep the gentle inward collapse so a removal reads as\n   * motion rather than a pop.\n   * @param {any} group @param {{x:number,y:number,fill:string}[]} exits @param {any} opts\n   */ _runExits(group, exits, opts) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(w2, this.ctx);\n        const dotR = this._lastDotR;\n        const cx = w2.layout.gridWidth / 2;\n        const cy = w2.layout.gridHeight / 2;\n        const drift = opts.layout === \"grid\" || opts.layout === \"scatter\" || opts.layout === \"arc\" || opts.layout === \"custom\" ? 0 : 0.35;\n        const ghosts = [];\n        exits.forEach((slot)=>{\n            const el = this._drawDot(graphics, opts, dotR, slot.fill, 0, 0);\n            el.node.classList.add(\"apexcharts-unit-exit\");\n            this._placeDot(el.node, opts, slot.x, slot.y);\n            group.add(el);\n            ghosts.push({\n                node: el.node,\n                x0: slot.x,\n                y0: slot.y\n            });\n        });\n        if (!this._shouldAnimate()) {\n            ghosts.forEach((g2)=>g2.node.remove());\n            return;\n        }\n        const speed = Math.max(1, w2.config.chart.animations.speed || 800);\n        const corner = this._isCorner(opts);\n        const { hx: hx, hy: hy } = this._halfExtent(opts);\n        const offX = corner ? hx : 0;\n        const offY = corner ? hy : 0;\n        const cxAttr = corner ? \"x\" : \"cx\";\n        const cyAttr = corner ? \"y\" : \"cy\";\n        if (this.w.globals.unitExitRAF != null) {\n            $e4b487e979d7c06d$var$BrowserAPIs.cancelAnimationFrame(this.w.globals.unitExitRAF);\n            this.w.globals.unitExitRAF = null;\n        }\n        const start = performance.now();\n        const stepFn = (now)=>{\n            if (this.w.globals.isDestroyed) {\n                this.w.globals.unitExitRAF = null;\n                return;\n            }\n            const t2 = Math.max(0, Math.min(1, (now - start) / speed));\n            const e2 = $e4b487e979d7c06d$var$easeOutCubic(t2);\n            for(let k = 0; k < ghosts.length; k++){\n                const g2 = ghosts[k];\n                if (drift) {\n                    const x = g2.x0 + (cx - g2.x0) * e2 * drift;\n                    const y = g2.y0 + (cy - g2.y0) * e2 * drift;\n                    g2.node.setAttribute(cxAttr, String(x - offX));\n                    g2.node.setAttribute(cyAttr, String(y - offY));\n                }\n                g2.node.style.opacity = String(1 - e2);\n            }\n            if (t2 < 1) this.w.globals.unitExitRAF = $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(stepFn);\n            else {\n                this.w.globals.unitExitRAF = null;\n                group.node && group.node.remove();\n            }\n        };\n        this.w.globals.unitExitRAF = $e4b487e979d7c06d$var$BrowserAPIs.requestAnimationFrame(stepFn);\n    }\n    /**\n   * Are outer (name) labels on? Only for `layout: 'custom'`: they name a colour\n   * BAND, so they need categories that occupy their own part of the shape. The\n   * generated layouts (`packed`, `grid`) interleave categories, and the blob /\n   * bar / arc layouts already carry a label of their own.\n   * @param {any} opts\n   */ _outerLabelsOn(opts) {\n        const cfg = opts.clusterLabels;\n        return !!(opts.layout === \"custom\" && cfg && cfg.show !== false && cfg.external && cfg.external.show);\n    }\n    /**\n   * One outer label's text, as lines. Two lines by default (name, then share),\n   * which is what makes the label readable at a distance from the band it names.\n   * A `clusterLabels.formatter` may return \"\\n\"-separated text to control the\n   * split, or a single line.\n   * @param {number} i @param {number} value @param {number} total @param {any} opts\n   * @returns {string[]}\n   */ _outerLabelLines(i2, value, total, opts) {\n        const w2 = this.w;\n        const name2 = w2.seriesData.seriesNames[i2] || `series-${i2 + 1}`;\n        const percent = total > 0 ? value / total * 100 : 0;\n        const cfg = opts.clusterLabels;\n        const text = typeof cfg.formatter === \"function\" ? cfg.formatter(name2, {\n            seriesIndex: i2,\n            value: value,\n            percent: percent,\n            w: w2\n        }) : `${name2}\n${percent.toFixed(1)}%`;\n        return String(text).split(\"\\n\");\n    }\n    /**\n   * Room one side has to give up: the widest label, plus the leader line, plus a\n   * little air. Capped at a quarter of the plot so one long category name shrinks\n   * its own label into the gutter instead of starving the shape.\n   * @param {number[]} counts @param {any} opts\n   * @returns {number}\n   */ _outerLabelGutter(counts, opts) {\n        const w2 = this.w;\n        const cfg = opts.clusterLabels;\n        const conn = cfg.external.connector || {};\n        const total = counts.reduce((a2, b2)=>a2 + b2, 0);\n        const lines = [];\n        counts.forEach((c2, i2)=>{\n            if (c2 > 0) lines.push(...this._outerLabelLines(i2, c2, total, opts));\n        });\n        if (!lines.length) return 0;\n        const width = $e4b487e979d7c06d$var$measureLabelWidth(w2, lines, {\n            fontSize: cfg.fontSize,\n            fontFamily: cfg.fontFamily || w2.config.chart.fontFamily\n        });\n        const gap = conn.gap != null ? conn.gap : 8;\n        const length = conn.length != null ? conn.length : 22;\n        const room = width + gap + length + 8 + Math.abs(parseFloat(cfg.external.offsetX) || 0);\n        return Math.min(room, w2.layout.gridWidth * 0.25);\n    }\n    /**\n   * Plan and draw the outer labels. A band's anchor is one of its own dots - the\n   * outermost on the label's side, preferring dots near the band's middle - so\n   * the leader line lands on the crowd rather than on a bounding box the viewer\n   * cannot see.\n   *\n   * Sides: a silhouette ordered by rows stacks its categories vertically, so\n   * their centroids share an x and the labels have to alternate left/right down\n   * the shape. One ordered by columns spreads them horizontally, so each label\n   * goes to the side its band is already on.\n   *\n   * @param {any} ret @param {{ i:number, cx:number, cy:number, dots:{x:number,y:number,r?:number}[] }[]} clusters\n   * @param {number[]} counts @param {number} total @param {any} opts\n   * @param {boolean} gathering true only when the dots are flying in from the\n   *   centre (first render / cross-type morph). On an update the crowd is already\n   *   on screen, so the labels must not wait for anything.\n   */ _drawOuterLabels(ret, clusters, counts, total, opts, gathering) {\n        const w2 = this.w;\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const cfg = opts.clusterLabels;\n        const ext = cfg.external;\n        const conn = ext.connector || {};\n        const gap = conn.gap != null ? conn.gap : 8;\n        const length = conn.length != null ? conn.length : 22;\n        const offsetX = parseFloat(ext.offsetX) || 0;\n        const offsetY = parseFloat(ext.offsetY) || 0;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        const dotR = this._lastDotR;\n        const live = clusters.filter((c2)=>c2.dots.length > 0);\n        if (!live.length) return;\n        let spreadX = 0;\n        let spreadY = 0;\n        if (live.length > 1) {\n            const xs = live.map((c2)=>c2.cx);\n            const ys = live.map((c2)=>c2.cy);\n            spreadX = Math.max(...xs) - Math.min(...xs);\n            spreadY = Math.max(...ys) - Math.min(...ys);\n        }\n        const bandedByX = spreadX > spreadY;\n        const fontSize = parseFloat(cfg.fontSize) || 13;\n        const lineHeight = Math.round(fontSize * 1.35);\n        const items = [];\n        live.slice().sort((a2, b2)=>a2.cy - b2.cy).forEach((c2, k)=>{\n            const lines = this._outerLabelLines(c2.i, counts[c2.i], total, opts);\n            if (!lines.some((l2)=>l2 !== \"\")) return;\n            const side = bandedByX ? c2.cx >= gw / 2 ? \"right\" : \"left\" : k % 2 === 0 ? \"right\" : \"left\";\n            const dir = side === \"right\" ? 1 : -1;\n            let best = c2.dots[0];\n            let bestScore = -Infinity;\n            c2.dots.forEach((d)=>{\n                const score = dir * d.x - 0.75 * Math.abs(d.y - c2.cy);\n                if (score > bestScore) {\n                    bestScore = score;\n                    best = d;\n                }\n            });\n            const anchor = {\n                x: best.x + dir * (best.r || dotR),\n                y: best.y\n            };\n            const elbow = {\n                x: anchor.x + dir * gap,\n                y: anchor.y\n            };\n            items.push({\n                i: c2.i,\n                lines: lines,\n                anchor: anchor,\n                elbow: elbow,\n                labelX: elbow.x + dir * length + offsetX,\n                idealY: anchor.y + offsetY,\n                labelY: anchor.y + offsetY,\n                side: side\n            });\n        });\n        if (!items.length) return;\n        const maxLines = items.reduce((m2, it)=>Math.max(m2, it.lines.length), 1);\n        const block = maxLines * lineHeight;\n        const half = block / 2;\n        [\n            \"left\",\n            \"right\"\n        ].forEach((side)=>{\n            $e4b487e979d7c06d$var$spaceOutLabels(items.filter((it)=>it.side === side), block + 2, gh - half, half);\n        });\n        const group = new $e4b487e979d7c06d$var$Graphics(w2, this.ctx).group({\n            class: \"apexcharts-unit-outer-labels\"\n        });\n        if (gathering) {\n            const speed = Math.max(1, w2.config.chart.animations.speed || 800);\n            group.node.classList.add(\"apexcharts-unit-label-delay\");\n            group.node.style.animationDelay = `${Math.min(speed * 0.45, 600) / 1e3}s`;\n        }\n        items.forEach((it)=>{\n            const color = w2.globals.colors[it.i] || w2.globals.colors[0] || \"#008FFB\";\n            group.add($e4b487e979d7c06d$var$drawOuterLabel(w2, {\n                lines: it.lines,\n                lineHeight: lineHeight,\n                anchor: it.anchor,\n                elbow: it.elbow,\n                labelX: it.labelX,\n                labelY: it.labelY,\n                side: it.side,\n                connector: {\n                    show: conn.show !== false,\n                    width: conn.width != null ? conn.width : 1.5,\n                    color: conn.color || color\n                },\n                style: {\n                    fontSize: cfg.fontSize,\n                    fontFamily: cfg.fontFamily || w2.config.chart.fontFamily,\n                    fontWeight: cfg.fontWeight\n                },\n                foreColor: cfg.color || w2.config.chart.foreColor,\n                groupClass: \"apexcharts-unit-outer-label-group\",\n                textClass: \"apexcharts-unit-outer-label\",\n                connectorClass: \"apexcharts-unit-label-connector\"\n            }));\n        });\n        ret.add(group);\n    }\n    /**\n   * A cluster label placed above (default) or below the cluster/bar. A TOP label\n   * over a wide grouped/packed blob rides a curved arc (invisible arc path +\n   * <textPath>, centred at 50% offset); a bottom label, a 'columns' bar, or a\n   * cluster too small for the arc gets a straight centred label instead.\n   * `clusterLabels.position` = 'top' | 'bottom'; `offsetY` pushes it further from\n   * the blob in either direction.\n   * @param {any} elSeries @param {{ i:number, cx:number, cy:number, outerR:number, flat?:boolean }} cluster\n   * @param {number} value @param {number} total @param {any} opts @param {string} color\n   */ _drawClusterLabel(elSeries, cluster, value, total, opts, color) {\n        const w2 = this.w;\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const NS = \"http://www.w3.org/2000/svg\";\n        const name2 = w2.seriesData.seriesNames[cluster.i] || `series-${cluster.i + 1}`;\n        const percent = total > 0 ? value / total * 100 : 0;\n        const cfg = opts.clusterLabels;\n        const fontSize = parseFloat(cfg.fontSize) || 13;\n        let text;\n        if (typeof cfg.formatter === \"function\") text = cfg.formatter(name2, {\n            seriesIndex: cluster.i,\n            value: value,\n            percent: percent,\n            w: w2\n        });\n        else text = `${name2} (${percent.toFixed(1)}%)`;\n        const str = typeof text === \"string\" ? text : String(text);\n        const textEl = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"text\");\n        textEl.setAttribute(\"class\", \"apexcharts-unit-label\");\n        textEl.setAttribute(\"text-anchor\", \"middle\");\n        textEl.setAttribute(\"font-size\", `${fontSize}px`);\n        textEl.setAttribute(\"font-family\", cfg.fontFamily || w2.config.chart.fontFamily || \"inherit\");\n        textEl.setAttribute(\"font-weight\", String(cfg.fontWeight || 600));\n        textEl.setAttribute(\"fill\", cfg.color || color);\n        const bottom = cfg.position === \"bottom\";\n        const R = cluster.outerR + fontSize * 0.6 + 3 + (cfg.offsetY || 0);\n        const estWidth = str.length * fontSize * 0.55;\n        const curved = !bottom && !cluster.flat && cfg.curved !== false && estWidth <= Math.PI * R * 0.95;\n        if (curved) {\n            const yMid = cluster.cy;\n            const x1 = cluster.cx - R;\n            const x2 = cluster.cx + R;\n            const d = `M ${x1} ${yMid} A ${R} ${R} 0 0 1 ${x2} ${yMid}`;\n            const arcId = `apexcharts-unit-label-${w2.globals.chartID}-${cluster.i}`;\n            const pathEl = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"path\");\n            pathEl.setAttribute(\"id\", arcId);\n            pathEl.setAttribute(\"d\", d);\n            pathEl.setAttribute(\"fill\", \"none\");\n            pathEl.setAttribute(\"stroke\", \"none\");\n            const tp = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS(NS, \"textPath\");\n            tp.setAttribute(\"href\", `#${arcId}`);\n            tp.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\", `#${arcId}`);\n            tp.setAttribute(\"startOffset\", \"50%\");\n            tp.textContent = str;\n            textEl.appendChild(tp);\n            elSeries.node.appendChild(pathEl);\n        } else {\n            textEl.setAttribute(\"x\", String(cluster.cx));\n            const y = bottom ? cluster.cy + cluster.outerR + fontSize + 6 + (cfg.offsetY || 0) : cluster.cy - cluster.outerR - 6 - (cfg.offsetY || 0);\n            textEl.setAttribute(\"y\", String(y));\n            textEl.textContent = str;\n        }\n        elSeries.node.appendChild(textEl);\n    }\n}\nconst $e4b487e979d7c06d$var$D2R = Math.PI / 180;\nconst $e4b487e979d7c06d$var$R2D = 180 / Math.PI;\nconst $e4b487e979d7c06d$var$SVGNS = \"http://www.w3.org/2000/svg\";\nconst $e4b487e979d7c06d$var$XHTML = \"http://www.w3.org/1999/xhtml\";\nconst $e4b487e979d7c06d$var$lerp = (a2, b2, t2)=>a2 + (b2 - a2) * t2;\nclass $e4b487e979d7c06d$var$SunburstChart {\n    /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */ constructor(w2, ctx){\n        this.ctx = ctx;\n        this.w = w2;\n        const cnf = w2.config;\n        this.cfg = cnf.plotOptions.sunburst;\n        this.strokeWidth = cnf.stroke.show ? cnf.stroke.width : 0;\n        this.strokeColor = Array.isArray(cnf.stroke.colors) ? cnf.stroke.colors[0] : cnf.stroke.colors || \"#fff\";\n        this.startAngle = this.cfg.startAngle;\n        this.endAngle = this.cfg.endAngle;\n        this.maxDepth = 0;\n        this.centerX = 0;\n        this.centerY = 0;\n        this.maxRadius = 0;\n        this.total = 1;\n        this._focusMaxDepth = 0;\n        this._focus = null;\n        this._zoomGen = 0;\n        this._roots = [];\n        this._nodesAll = [];\n        this._innerR = ()=>0;\n        this._outerR = ()=>0;\n        this._tooltipEl = null;\n        this._lblSeq = 0;\n        this._morphLeafIndex = 0;\n        this._graphics = null;\n        this._ringsG = null;\n        this._labelsG = null;\n    }\n    /**\n   * @param {any[]} series  flattened top-level values (geometry comes from the\n   *   config hierarchy; kept for the standard draw(series) signature + noData)\n   * @returns {any} SVG group\n   */ draw(series) {\n        const w2 = this.w;\n        const graphics = new $e4b487e979d7c06d$var$Graphics(this.w);\n        this._graphics = graphics;\n        const g2 = graphics.group({\n            class: \"apexcharts-sunburst\"\n        });\n        if (w2.globals.noData || !series || !series.length) return g2;\n        const gw = w2.layout.gridWidth;\n        const gh = w2.layout.gridHeight;\n        this.centerX = gw / 2 + (this.cfg.offsetX || 0);\n        this.centerY = gh / 2 + (this.cfg.offsetY || 0);\n        this.maxRadius = Math.min(gw, gh) / 2.05 - this.strokeWidth - (!w2.config.chart.sparkline.enabled ? w2.config.chart.dropShadow.blur : 0);\n        if (this.maxRadius < 5) return g2;\n        this._roots = this._buildHierarchy();\n        if (!this._roots.length) return g2;\n        this._roots.forEach((r2)=>this._fillValues(r2));\n        this._validateStrict();\n        this._nodesAll = [];\n        const colors = w2.globals.colors || [];\n        this._roots.forEach((r2, i2)=>{\n            this._colorPass(r2, r2.color || colors[i2 % colors.length] || \"#008FFB\");\n        });\n        this.total = this._roots.reduce((s2, r2)=>s2 + Math.max(0, r2.value), 0) || 1;\n        this._ringsG = graphics.group({\n            class: \"apexcharts-sunburst-rings\"\n        });\n        this._labelsG = graphics.group({\n            class: \"apexcharts-sunburst-labels\"\n        });\n        g2.add(this._ringsG);\n        g2.add(this._labelsG);\n        this._focus = null;\n        this._relayout(this._focus);\n        const anims = w2.config.chart.animations;\n        let mode = \"none\";\n        if (anims.enabled) {\n            if (w2.globals.dataChanged) {\n                if (anims.dynamicAnimation.enabled) mode = \"update\";\n            } else if (!w2.globals.resized) mode = \"intro\";\n        }\n        this._applyLayout(mode);\n        this._renderBreadcrumb();\n        return g2;\n    }\n    // ------------------------------------------------------------------ data\n    /**\n   * Resolve the config into root nodes `{ name, value, color?, children? }`.\n   * Each datum may carry `children` (native) or `drilldown: '<id>'` (adapter).\n   * Shared with the treemap - see charts/common/Hierarchy.\n   * @returns {any[]}\n   */ _buildHierarchy() {\n        return $e4b487e979d7c06d$var$buildHierarchy(this.w);\n    }\n    /**\n   * Fill a parent's value from its children when missing.\n   * @param {any} node\n   */ _fillValues(node) {\n        $e4b487e979d7c06d$var$fillValues(node);\n    }\n    /**\n   * With `partition: 'strict'`, warn (once) when a parent's value does not\n   * match the sum of its children. The angles are still normalized to fill the\n   * wedge (strict rendering is a P3 refinement); this just surfaces the data\n   * mismatch.\n   */ _validateStrict() {\n        if (this.cfg.partition !== \"strict\") return;\n        let warned = false;\n        const walk = (node)=>{\n            if (node.children && node.children.length) {\n                const sum = node.children.reduce((s2, c2)=>s2 + Math.max(0, c2.value || 0), 0);\n                if (!warned && node.value != null && Math.abs(sum - node.value) > 0.5) {\n                    console.warn(`ApexCharts sunburst: partition 'strict' but \"${node.name}\" (${node.value}) != sum of its children (${sum}). Angles are normalized to fill the wedge.`);\n                    warned = true;\n                }\n                node.children.forEach(walk);\n            }\n        };\n        this._roots.forEach(walk);\n    }\n    /**\n   * Assign a colour to every node (explicit `color` wins, else the parent's\n   * colour tinted lighter). Done once so zoom preserves colours.\n   * @param {any} node\n   * @param {string} color\n   */ _colorPass(node, color) {\n        node._color = node.color || color;\n        this._nodesAll.push(node);\n        if (node.children) node.children.forEach((c2)=>this._colorPass(c2, c2.color || this._lighten(node._color, this.cfg.tint)));\n    }\n    // ---------------------------------------------------------------- layout\n    /**\n   * Recompute visibility + angles + radii for a focus node (null = whole tree).\n   * @param {any} focus\n   */ _relayout(focus) {\n        this._nodesAll.forEach((n2)=>{\n            n2._show = false;\n        });\n        this._focusMaxDepth = 0;\n        if (!focus) {\n            const total = this._roots.reduce((s2, r2)=>s2 + Math.max(0, r2.value), 0) || 1;\n            let a2 = this.startAngle;\n            this._roots.forEach((r2)=>{\n                const span = (this.endAngle - this.startAngle) * Math.max(0, r2.value) / total;\n                this._placeVis(r2, 0, a2, a2 + span, null);\n                a2 += span;\n            });\n        } else this._placeVis(focus, 0, this.startAngle, this.endAngle, focus._parent);\n        const hole = this._parseSize(this.cfg.innerSize, this.maxRadius);\n        const ringCount = this._focusMaxDepth + 1;\n        const band = (this.maxRadius - hole) / ringCount;\n        const radialGap = ringCount > 1 ? 1 : 0;\n        this._innerR = (vd)=>hole + vd * band + (vd > 0 ? radialGap / 2 : 0);\n        this._outerR = (vd)=>hole + (vd + 1) * band - radialGap / 2;\n        this._nodesAll.forEach((n2)=>{\n            if (!n2._show) return;\n            n2._iR = this._innerR(n2._vDepth);\n            n2._oR = n2._leaf && this.cfg.leaf === \"extend\" && n2._vDepth < this._focusMaxDepth ? this.maxRadius : this._outerR(n2._vDepth);\n        });\n    }\n    /**\n   * @param {any} node\n   * @param {number} vDepth\n   * @param {number} a0\n   * @param {number} a1\n   * @param {any} parent\n   */ _placeVis(node, vDepth, a0, a1, parent) {\n        node._show = true;\n        node._vDepth = vDepth;\n        node._a0 = a0;\n        node._a1 = a1;\n        node._parent = parent;\n        node._leaf = !(node.children && node.children.length);\n        if (vDepth > this._focusMaxDepth) this._focusMaxDepth = vDepth;\n        if (!node._leaf) {\n            const total = node.children.reduce((s2, c2)=>s2 + Math.max(0, c2.value), 0) || 1;\n            let a2 = a0;\n            node.children.forEach((c2)=>{\n                const span = (a1 - a0) * Math.max(0, c2.value) / total;\n                this._placeVis(c2, vDepth + 1, a2, a2 + span, node);\n                a2 += span;\n            });\n        }\n    }\n    // --------------------------------------------------------------- render\n    /**\n   * Create / update / remove arc elements to match the current layout, with an\n   * animation appropriate to the transition:\n   *   intro  — pie/donut-style angular clock sweep from startAngle to endAngle\n   *            (all rings reveal together as the sweep line passes them)\n   *   update — morph every arc from its previous on-screen geometry (matched\n   *            by node key across the re-render); new arcs unfurl in place\n   *   zoom   — tween angles + radii between focus layouts (same instance)\n   * @param {'intro'|'zoom'|'update'|'none'} mode\n   */ _applyLayout(mode) {\n        var _a;\n        const w2 = this.w;\n        const anims = w2.config.chart.animations;\n        const dur = !anims.enabled ? 0 : mode === \"none\" ? 0 : mode === \"update\" ? anims.dynamicAnimation.speed || 350 : anims.speed || 500;\n        const gen = ++this._zoomGen;\n        const morph = /** @type {any} */ (_a = this.ctx) == null ? void 0 : _a.morphTypeChange;\n        const morphActive = !!morph && typeof morph.isActive === \"function\" && morph.isActive() && typeof morph.getInitialPathAt === \"function\";\n        const morphDur = morphActive ? morph.getSpeed() : 0;\n        this._morphLeafIndex = 0;\n        const prev = mode === \"update\" ? /** @type {any} */ this.ctx._sunburstPrevGeoms : null;\n        this._nodesAll.forEach((node)=>{\n            if (node._show) {\n                const target = {\n                    a0: node._a0,\n                    a1: node._a1,\n                    iR: node._iR,\n                    oR: node._oR\n                };\n                if (!node._el) node._el = this._createArcEl(node);\n                const morphFrom = morphActive ? this._morphSourceFor(node) : null;\n                if (morphFrom && morphDur > 0) this._morphArcFrom(node, morphFrom, target, morphDur, gen);\n                else if ((mode === \"intro\" || morphActive) && dur > 0) this._sweepArc(node, target, morphActive ? morphDur : dur, gen);\n                else {\n                    let from;\n                    let isNew = false;\n                    if (node._cur) from = node._cur;\n                    else if (prev && prev.get(node._key)) from = prev.get(node._key);\n                    else {\n                        const mid = (target.a0 + target.a1) / 2;\n                        from = {\n                            a0: mid,\n                            a1: mid,\n                            iR: target.iR,\n                            oR: target.iR\n                        };\n                        isNew = true;\n                    }\n                    this._animateArc(node, from, target, dur, false, isNew, gen);\n                }\n            } else if (node._el && node._cur) {\n                const mid = (node._cur.a0 + node._cur.a1) / 2;\n                const target = {\n                    a0: mid,\n                    a1: mid,\n                    iR: node._cur.iR,\n                    oR: node._cur.iR\n                };\n                this._animateArc(node, node._cur, target, dur, true, false, gen);\n            }\n        });\n        const geoms = /* @__PURE__ */ new Map();\n        this._nodesAll.forEach((n2)=>{\n            if (n2._show) geoms.set(n2._key, {\n                a0: n2._a0,\n                a1: n2._a1,\n                iR: n2._iR,\n                oR: n2._oR\n            });\n        });\n        this.ctx._sunburstPrevGeoms = geoms;\n        this._renderLabels(dur);\n    }\n    /**\n   * The captured mark this leaf should unroll from, or null when the node is\n   * the outgoing chart had nothing to give it.\n   *\n   * When both charts carry branch keys the pairing is by identity, so EVERY\n   * ring finds the tile that stood for the same branch and the inner rings\n   * unroll instead of appearing from nothing.\n   *\n   * Without keys (a flat treemap, or an older config) only leaves pair, and\n   * they consume the captured paths in draw order - the order the outgoing\n   * renderer laid its own marks out in, so tile k pairs with leaf k.\n   *\n   * @param {any} node\n   * @returns {string | null}\n   */ _morphSourceFor(node) {\n        const ctx = /** @type {any} */ this.ctx;\n        const morph = ctx && ctx.morphTypeChange;\n        if (!morph) return null;\n        if (typeof morph.hasKeyedMarks === \"function\" && morph.hasKeyedMarks() && typeof morph.getInitialPathForKey === \"function\") return morph.getInitialPathForKey($e4b487e979d7c06d$var$morphKey(node._key));\n        if (node.children && node.children.length) return null;\n        return morph.getInitialPathAt(this._morphLeafIndex++);\n    }\n    /**\n   * Unroll an arc from an arbitrary captured shape.\n   *\n   * `_animateArc` interpolates arc PARAMETERS (angles and radii), which cannot\n   * express a rectangle, so this one tweens the path data itself through\n   * Animations.morphSVG - the same call every other morphing renderer makes,\n   * which already selects the polygon-resample algorithm while a cross-type\n   * morph is active.\n   *\n   * @param {any} node\n   * @param {string} fromD\n   * @param {{a0:number,a1:number,iR:number,oR:number}} target\n   * @param {number} dur\n   * @param {number} gen\n   */ _morphArcFrom(node, fromD, target, dur, gen) {\n        const el = node._el;\n        const toD = this._arcPath(target.iR, target.oR, target.a0, target.a1, this.cfg.borderRadius);\n        el.node.style.display = \"\";\n        el.attr({\n            d: fromD,\n            opacity: 1\n        });\n        node._cur = target;\n        if (this._zoomGen !== gen) return;\n        new $e4b487e979d7c06d$var$Animations(this.w, /** @type {any} */ this.ctx).morphSVG(el, 0, // Not a (series, point) index: an arc has no j, and passing a number here\n        // would make morphSVG treat it as the last point of a series and fire the\n        // chart's animation-completed hook.\n        /** @type {any} */ null, node._color, fromD, toD, dur, 0);\n    }\n    /**\n   * Pie/donut-style intro: a clock sweep from startAngle to endAngle. Each\n   * arc's end angle is clamped to the sweep line, so arcs appear in angular\n   * order and grow until complete — the whole hierarchy unwipes together.\n   * @param {any} node\n   * @param {{a0:number,a1:number,iR:number,oR:number}} target\n   * @param {number} dur\n   * @param {number} gen  layout generation; frames stop once superseded\n   */ _sweepArc(node, target, dur, gen) {\n        const el = node._el;\n        const br = this.cfg.borderRadius;\n        const s0 = this.startAngle;\n        const s1 = this.endAngle;\n        el.node.style.display = \"\";\n        el.attr({\n            d: \"\",\n            opacity: 1\n        });\n        el.animate(dur).during((pos)=>{\n            if (this._zoomGen !== gen) return;\n            const sweep = s0 + (s1 - s0) * pos;\n            if (sweep <= target.a0 + 0.01) {\n                el.attr({\n                    d: \"\"\n                });\n                return;\n            }\n            const a1 = Math.min(target.a1, sweep);\n            el.attr({\n                d: this._arcPath(target.iR, target.oR, target.a0, a1, br)\n            });\n            node._cur = {\n                a0: target.a0,\n                a1: a1,\n                iR: target.iR,\n                oR: target.oR\n            };\n        }).after(()=>{\n            if (this._zoomGen !== gen) return;\n            node._cur = target;\n        });\n    }\n    /**\n   * @param {any} node\n   * @returns {any} svg.js path element\n   */ _createArcEl(node) {\n        const path = this._graphics.drawPath({\n            d: \"\",\n            fill: node._color,\n            stroke: this.strokeColor,\n            strokeWidth: this.strokeWidth,\n            fillOpacity: 1,\n            classes: \"apexcharts-sunburst-arc\"\n        });\n        const el = path.node;\n        el.setAttribute(\"data:name\", node.name);\n        el.setAttribute(\"data:value\", String(node.value));\n        el.setAttribute(\"data:key\", $e4b487e979d7c06d$var$morphKey(node._key));\n        el.setAttribute(\"data:leaf\", String(!(node.children && node.children.length)));\n        this._attachTooltip(el, node);\n        if ($e4b487e979d7c06d$var$Environment.isBrowser()) {\n            el.addEventListener(\"click\", ()=>this._zoomTo(node));\n            el.style.cursor = \"pointer\";\n        }\n        this._ringsG.add(path);\n        return path;\n    }\n    /**\n   * @param {any} node\n   * @param {{a0:number,a1:number,iR:number,oR:number}} from\n   * @param {{a0:number,a1:number,iR:number,oR:number}} to\n   * @param {number} dur\n   * @param {boolean} hide    shrink + fade out, then hide\n   * @param {boolean} fadeIn  fade 0 -> 1 (new arcs only; morphs stay opaque)\n   * @param {number} gen  layout generation; frames stop once superseded\n   */ _animateArc(node, from, to, dur, hide, fadeIn2, gen) {\n        const el = node._el;\n        const br = this.cfg.borderRadius;\n        el.attr({\n            fill: node._color\n        });\n        if (dur === 0) {\n            el.attr({\n                d: this._arcPath(to.iR, to.oR, to.a0, to.a1, br),\n                opacity: hide ? 0 : 1\n            });\n            el.node.style.display = hide ? \"none\" : \"\";\n            node._cur = hide ? null : to;\n            return;\n        }\n        el.node.style.display = \"\";\n        const startOp = hide ? Number(el.attr(\"opacity\")) || 1 : fadeIn2 ? 0 : 1;\n        const endOp = hide ? 0 : 1;\n        el.attr({\n            opacity: startOp\n        });\n        el.animate(dur).during((pos)=>{\n            if (this._zoomGen !== gen) return;\n            const a0 = $e4b487e979d7c06d$var$lerp(from.a0, to.a0, pos);\n            const a1 = $e4b487e979d7c06d$var$lerp(from.a1, to.a1, pos);\n            const iR = $e4b487e979d7c06d$var$lerp(from.iR, to.iR, pos);\n            const oR = $e4b487e979d7c06d$var$lerp(from.oR, to.oR, pos);\n            el.attr({\n                d: this._arcPath(iR, oR, a0, a1, br),\n                opacity: $e4b487e979d7c06d$var$lerp(startOp, endOp, pos)\n            });\n            node._cur = {\n                a0: a0,\n                a1: a1,\n                iR: iR,\n                oR: oR\n            };\n        }).after(()=>{\n            if (this._zoomGen !== gen) return;\n            if (hide) {\n                el.node.style.display = \"none\";\n                node._cur = null;\n            } else node._cur = to;\n        });\n    }\n    // ---------------------------------------------------------------- labels\n    /**\n   * Labels are overlays on animated paths, so they reveal gradually AFTER the\n   * arcs settle (repo convention: overlays never pop in over a moving path).\n   * @param {number} dur  arc animation duration (0 = instant labels)\n   */ _renderLabels(dur) {\n        const labelsG = this._labelsG;\n        while(labelsG.node.firstChild)labelsG.node.removeChild(labelsG.node.firstChild);\n        if (!this.cfg.dataLabels.show) return;\n        this._nodesAll.forEach((node)=>{\n            if (!node._show) return;\n            if (node._a1 - node._a0 < this.cfg.dataLabels.minAngleToShow) return;\n            this._renderCurvedLabel(node);\n        });\n        if (dur > 0) {\n            labelsG.attr({\n                opacity: 0\n            });\n            labelsG.animate(250, dur).attr({\n                opacity: 1\n            });\n        } else labelsG.attr({\n            opacity: 1\n        });\n    }\n    /**\n   * Curved label along the arc's mid-radius (flipped on the bottom half so it\n   * stays upright). Raw SVG <textPath> — svg.js has no first-class textPath.\n   * @param {any} node\n   */ _renderCurvedLabel(node) {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const style = this.cfg.dataLabels.style;\n        const w2 = this.w;\n        const r2 = (node._iR + node._oR) / 2;\n        const mid = (node._a0 + node._a1) / 2;\n        const flip = mid > 90 && mid < 270;\n        const padDeg = Math.min(r2 > 0 ? 4 / r2 * $e4b487e979d7c06d$var$R2D : 0, (node._a1 - node._a0) / 2);\n        const from = flip ? node._a1 - padDeg : node._a0 + padDeg;\n        const to = flip ? node._a0 + padDeg : node._a1 - padDeg;\n        const p1 = this._ptAt(r2, from);\n        const p2 = this._ptAt(r2, to);\n        const largeArc = Math.abs(to - from) > 180 ? 1 : 0;\n        const sweep = flip ? 0 : 1;\n        const id = `apx-sb-lbl-${w2.globals.cuid}-${this._lblSeq++}`;\n        const guide = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS, \"path\");\n        guide.setAttribute(\"id\", id);\n        guide.setAttribute(\"d\", `M ${p1.x} ${p1.y} A ${r2} ${r2} 0 ${largeArc} ${sweep} ${p2.x} ${p2.y}`);\n        guide.setAttribute(\"fill\", \"none\");\n        guide.setAttribute(\"stroke\", \"none\");\n        const colors = style.colors;\n        const fill = (Array.isArray(colors) ? colors[0] : colors) || \"#fff\";\n        const text = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS, \"text\");\n        text.setAttribute(\"font-size\", style.fontSize || \"12px\");\n        if (style.fontFamily) text.setAttribute(\"font-family\", style.fontFamily);\n        text.setAttribute(\"font-weight\", String(style.fontWeight || 400));\n        text.setAttribute(\"fill\", fill);\n        text.setAttribute(\"dominant-baseline\", \"central\");\n        text.style.pointerEvents = \"none\";\n        const tp = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$SVGNS, \"textPath\");\n        tp.setAttribute(\"href\", \"#\" + id);\n        tp.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\", \"#\" + id);\n        tp.setAttribute(\"startOffset\", \"50%\");\n        tp.setAttribute(\"text-anchor\", \"middle\");\n        tp.textContent = this._truncate(node.name, r2, node._a1 - node._a0, style.fontSize);\n        text.appendChild(tp);\n        this._labelsG.node.appendChild(guide);\n        this._labelsG.node.appendChild(text);\n    }\n    /**\n   * Trim a label to the arc length available at its radius.\n   * @param {string} name\n   * @param {number} r\n   * @param {number} spanDeg\n   * @param {string} fontSize\n   * @returns {string}\n   */ _truncate(name2, r2, spanDeg, fontSize) {\n        const arcLen = r2 * spanDeg * $e4b487e979d7c06d$var$D2R - 8;\n        const charW = (parseFloat(fontSize) || 12) * 0.58;\n        const maxChars = Math.floor(arcLen / charW);\n        if (maxChars >= name2.length) return name2;\n        if (maxChars <= 1) return \"\";\n        return name2.slice(0, Math.max(1, maxChars - 1)) + \"\\u2026\";\n    }\n    // ----------------------------------------------------------------- zoom\n    /**\n   * Focus a node (zoom in), or zoom out one level when the current focus (the\n   * innermost ring) is clicked.\n   * @param {any} node\n   */ _zoomTo(node) {\n        if (this.cfg.zoomOnClick === false) return;\n        const nextFocus = node === this._focus ? node._parent || null : node;\n        if (nextFocus === this._focus) return;\n        this._focus = nextFocus && !(nextFocus.children && nextFocus.children.length) ? nextFocus._parent || null : nextFocus;\n        this._relayout(this._focus);\n        this._applyLayout(\"zoom\");\n        this._renderBreadcrumb();\n    }\n    /** Root -> focus chain of nodes. */ _focusChain() {\n        const chain = [];\n        let n2 = this._focus;\n        while(n2){\n            chain.unshift(n2);\n            n2 = n2._parent;\n        }\n        return chain;\n    }\n    /**\n   * Minimal self-contained breadcrumb (reuses the shared `.apexcharts-breadcrumb`\n   * CSS classes, but does NOT depend on the drilldown feature).\n   */ _renderBreadcrumb() {\n        if (!$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        const w2 = this.w;\n        const elWrap = w2.dom.elWrap;\n        if (!elWrap) return;\n        const existing = elWrap.querySelector(\".apexcharts-breadcrumb\");\n        if (existing && existing.parentNode) existing.parentNode.removeChild(existing);\n        if (!this._focus) return;\n        const nav = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML, \"nav\");\n        nav.setAttribute(\"class\", \"apexcharts-breadcrumb\");\n        nav.setAttribute(\"aria-label\", \"Sunburst breadcrumb\");\n        nav.style.position = \"absolute\";\n        nav.style.top = \"0px\";\n        nav.style.left = \"0px\";\n        const crumbs = [\n            {\n                name: \"All\",\n                node: null\n            }\n        ].concat(this._focusChain().map((n2)=>({\n                name: n2.name,\n                node: n2\n            })));\n        crumbs.forEach((crumb, i2)=>{\n            if (i2 > 0) {\n                const sep = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML, \"span\");\n                sep.setAttribute(\"class\", \"apexcharts-breadcrumb-separator\");\n                sep.textContent = \" / \";\n                nav.appendChild(sep);\n            }\n            const isCurrent = i2 === crumbs.length - 1;\n            if (isCurrent) {\n                const cur = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML, \"span\");\n                cur.setAttribute(\"class\", \"apexcharts-breadcrumb-item apexcharts-breadcrumb-current\");\n                cur.textContent = crumb.name;\n                nav.appendChild(cur);\n            } else {\n                const btn = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML, \"button\");\n                btn.setAttribute(\"type\", \"button\");\n                btn.setAttribute(\"class\", \"apexcharts-breadcrumb-item\");\n                if (i2 === 0) {\n                    const arrow = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML, \"span\");\n                    arrow.setAttribute(\"class\", \"apexcharts-breadcrumb-arrow\");\n                    arrow.textContent = \"\\u2190\";\n                    btn.appendChild(arrow);\n                }\n                const text = $e4b487e979d7c06d$var$BrowserAPIs.createElementNS($e4b487e979d7c06d$var$XHTML, \"span\");\n                text.setAttribute(\"class\", \"apexcharts-breadcrumb-label\");\n                text.textContent = crumb.name;\n                btn.appendChild(text);\n                btn.addEventListener(\"click\", ()=>{\n                    this._focus = crumb.node;\n                    this._relayout(this._focus);\n                    this._applyLayout(\"zoom\");\n                    this._renderBreadcrumb();\n                });\n                nav.appendChild(btn);\n            }\n        });\n        elWrap.appendChild(nav);\n        this._avoidChromeOverlap(nav);\n    }\n    /**\n   * The breadcrumb is an absolute overlay at top-left, so it can sit on top of\n   * a left-aligned title (or subtitle). After mounting, push it below any chart\n   * chrome it intersects. (Duplicated from drilldown's Breadcrumb on purpose —\n   * sunburst must not import the drilldown feature.)\n   * @param {any} nav\n   */ /**\n   * Shared with the treemap - see charts/common/Breadcrumb.\n   * @param {any} nav\n   */ _avoidChromeOverlap(nav) {\n        $e4b487e979d7c06d$var$avoidChromeOverlap(this.w, nav);\n    }\n    // ------------------------------------------------------------ geometry\n    /**\n   * @param {number} r\n   * @param {number} deg  0 = top, clockwise\n   * @returns {{x: number, y: number}}\n   */ _ptAt(r2, deg) {\n        return {\n            x: this.centerX + r2 * Math.cos((deg - 90) * $e4b487e979d7c06d$var$D2R),\n            y: this.centerY + r2 * Math.sin((deg - 90) * $e4b487e979d7c06d$var$D2R)\n        };\n    }\n    /**\n   * Rounded donut-segment path (inner radius always > 0). Applies `spacing`\n   * (angular gap) and `borderRadius` (corner rounding), both clamped so a thin\n   * arc never inverts.\n   * @param {number} iR\n   * @param {number} oR\n   * @param {number} a0\n   * @param {number} a1\n   * @param {number} borderRadius\n   * @returns {string}\n   */ _arcPath(iR, oR, a0, a1, borderRadius) {\n        if (oR <= iR + 0.01) return \"\";\n        let spanDeg = a1 - a0;\n        const spacing = this.cfg.spacing;\n        if (spacing > 0 && spanDeg > 0 && oR > 0) {\n            const gapDeg = spacing / oR * $e4b487e979d7c06d$var$R2D;\n            const inset = Math.min(gapDeg / 2, Math.max(0, spanDeg / 2 - 0.25));\n            a0 += inset;\n            a1 -= inset;\n            spanDeg = a1 - a0;\n        }\n        if (spanDeg <= 0) return \"\";\n        const spanRad = spanDeg * $e4b487e979d7c06d$var$D2R;\n        const cx = this.centerX;\n        const cy = this.centerY;\n        let r2 = borderRadius;\n        r2 = Math.min(r2, spanRad * iR / 2, spanRad * oR / 2, (oR - iR) / 2);\n        if (!(r2 > 0.5)) return $e4b487e979d7c06d$var$sharpDonutSegmentPath({\n            cx: cx,\n            cy: cy,\n            rIn: iR,\n            rOut: oR,\n            a0: a0,\n            a1: a1,\n            spanDeg: spanDeg\n        });\n        return $e4b487e979d7c06d$var$roundedDonutSegmentPath({\n            cx: cx,\n            cy: cy,\n            rIn: iR,\n            rOut: oR,\n            a0: a0,\n            a1: a1,\n            r: r2,\n            spanDeg: spanDeg\n        });\n    }\n    // ------------------------------------------------------------- tooltip\n    /** @returns {any} */ _tip() {\n        if (!this._tooltipEl) this._tooltipEl = this.w.dom.baseEl.querySelector(\".apexcharts-tooltip\");\n        return this._tooltipEl;\n    }\n    /**\n   * @param {any} el\n   * @param {any} node\n   */ _attachTooltip(el, node) {\n        if (!this.w.config.tooltip.enabled || !$e4b487e979d7c06d$var$Environment.isBrowser()) return;\n        el.addEventListener(\"mouseenter\", (e2)=>this._showTooltip(e2, node));\n        el.addEventListener(\"mousemove\", (e2)=>this._positionTooltip(e2));\n        el.addEventListener(\"mouseleave\", ()=>this._hideTooltip());\n    }\n    /**\n   * @param {MouseEvent} e\n   * @param {any} node\n   */ _showTooltip(e2, node) {\n        const t2 = this._tip();\n        if (!t2) return;\n        const w2 = this.w;\n        const pctTotal = (node.value / this.total * 100).toFixed(1);\n        const parentVal = node._parent ? node._parent.value : this.total;\n        const pctParent = parentVal > 0 ? (node.value / parentVal * 100).toFixed(1) : pctTotal;\n        const groupBg = w2.config.tooltip.fillSeriesColor ? `background-color:${node._color};` : \"\";\n        t2.innerHTML = `<div class=\"apexcharts-tooltip-series-group apexcharts-active\" style=\"display:flex;${groupBg}\"><span class=\"apexcharts-tooltip-marker\" style=\"background-color:${node._color}\"></span><div class=\"apexcharts-tooltip-text\"><div class=\"apexcharts-tooltip-y-group\"><span class=\"apexcharts-tooltip-text-y-label\">${node.name}: </span><span class=\"apexcharts-tooltip-text-y-value\">${node.value} (${pctParent}% of parent, ${pctTotal}% of total)</span></div></div></div>`;\n        t2.classList.add(\"apexcharts-active\");\n        t2.style.opacity = \"1\";\n        this._positionTooltip(e2);\n    }\n    /**\n   * Position beside the cursor, flipping to the opposite side when the box\n   * would overflow the chart wrap, and clamping inside it either way.\n   * @param {MouseEvent} e\n   */ _positionTooltip(e2) {\n        const t2 = this._tip();\n        if (!t2) return;\n        const rect = this.w.dom.elWrap.getBoundingClientRect();\n        const tw = t2.offsetWidth;\n        const th = t2.offsetHeight;\n        const pad = 12;\n        let x = e2.clientX - rect.left + pad;\n        if (x + tw > rect.width) x = e2.clientX - rect.left - tw - pad;\n        x = Math.max(0, Math.min(x, rect.width - tw));\n        let y = e2.clientY - rect.top + pad;\n        if (y + th > rect.height) y = e2.clientY - rect.top - th - pad;\n        y = Math.max(0, Math.min(y, rect.height - th));\n        t2.style.left = x + \"px\";\n        t2.style.top = y + \"px\";\n    }\n    _hideTooltip() {\n        const t2 = this._tip();\n        if (!t2) return;\n        t2.classList.remove(\"apexcharts-active\");\n        t2.style.opacity = \"0\";\n    }\n    // --------------------------------------------------------------- utils\n    /**\n   * @param {string|number} size\n   * @param {number} max\n   * @returns {number}\n   */ _parseSize(size, max) {\n        if (typeof size === \"number\") return size;\n        const s2 = String(size).trim();\n        if (s2.endsWith(\"%\")) return parseFloat(s2) / 100 * max;\n        const n2 = parseFloat(s2);\n        return isNaN(n2) ? 0.15 * max : n2;\n    }\n    /**\n   * Blend a hex colour toward white by `amount` (0..1). Non-hex returned as-is.\n   * @param {string} color\n   * @param {number} amount\n   * @returns {string}\n   */ _lighten(color, amount) {\n        if (typeof color !== \"string\" || color[0] !== \"#\") return color;\n        let hex = color.slice(1);\n        if (hex.length === 3) hex = hex.split(\"\").map((c2)=>c2 + c2).join(\"\");\n        if (hex.length !== 6) return color;\n        const num = parseInt(hex, 16);\n        if (isNaN(num)) return color;\n        let rC = num >> 16 & 255;\n        let gC = num >> 8 & 255;\n        let bC = num & 255;\n        rC = Math.round(rC + (255 - rC) * amount);\n        gC = Math.round(gC + (255 - gC) * amount);\n        bC = Math.round(bC + (255 - bC) * amount);\n        return \"#\" + (16777216 + (rC << 16) + (gC << 8) + bC).toString(16).slice(1);\n    }\n}\n$e4b487e979d7c06d$export$2e2bcd8739ae039.use({\n    line: $e4b487e979d7c06d$var$Line,\n    area: $e4b487e979d7c06d$var$Line,\n    scatter: $e4b487e979d7c06d$var$Line,\n    bubble: $e4b487e979d7c06d$var$Line,\n    rangeArea: $e4b487e979d7c06d$var$Line,\n    bar: $e4b487e979d7c06d$var$Bar,\n    column: $e4b487e979d7c06d$var$Bar,\n    barStacked: $e4b487e979d7c06d$var$BarStacked,\n    rangeBar: $e4b487e979d7c06d$var$RangeBar,\n    candlestick: $e4b487e979d7c06d$var$BoxCandleStick,\n    boxPlot: $e4b487e979d7c06d$var$BoxCandleStick,\n    violin: $e4b487e979d7c06d$var$Violin,\n    pie: $e4b487e979d7c06d$var$Pie,\n    donut: $e4b487e979d7c06d$var$Pie,\n    polarArea: $e4b487e979d7c06d$var$Pie,\n    radialBar: $e4b487e979d7c06d$var$Radial,\n    radar: $e4b487e979d7c06d$var$Radar,\n    heatmap: $e4b487e979d7c06d$var$HeatMap,\n    treemap: $e4b487e979d7c06d$var$TreemapChart,\n    unit: $e4b487e979d7c06d$var$Unit,\n    sunburst: $e4b487e979d7c06d$var$SunburstChart\n});\n\n\n//---------------------------------------------------------------------\n//\n// QR Code Generator for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n//  http://www.opensource.org/licenses/mit-license.php\n//\n// The word 'QR Code' is registered trademark of\n// DENSO WAVE INCORPORATED\n//  http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n//---------------------------------------------------------------------\n// qrcode\n//---------------------------------------------------------------------\n/**\n * qrcode\n * @param typeNumber 1 to 40\n * @param errorCorrectionLevel 'L','M','Q','H'\n */ const $bd33f692cf9f4068$export$5f3279733515fed0 = function(typeNumber, errorCorrectionLevel) {\n    const PAD0 = 0xEC;\n    const PAD1 = 0x11;\n    let _typeNumber = typeNumber;\n    const _errorCorrectionLevel = $bd33f692cf9f4068$var$QRErrorCorrectionLevel[errorCorrectionLevel];\n    let _modules = null;\n    let _moduleCount = 0;\n    let _dataCache = null;\n    const _dataList = [];\n    const _this = {};\n    const makeImpl = function(test, maskPattern) {\n        _moduleCount = _typeNumber * 4 + 17;\n        _modules = function(moduleCount) {\n            const modules = new Array(moduleCount);\n            for(let row = 0; row < moduleCount; row += 1){\n                modules[row] = new Array(moduleCount);\n                for(let col = 0; col < moduleCount; col += 1)modules[row][col] = null;\n            }\n            return modules;\n        }(_moduleCount);\n        setupPositionProbePattern(0, 0);\n        setupPositionProbePattern(_moduleCount - 7, 0);\n        setupPositionProbePattern(0, _moduleCount - 7);\n        setupPositionAdjustPattern();\n        setupTimingPattern();\n        setupTypeInfo(test, maskPattern);\n        if (_typeNumber >= 7) setupTypeNumber(test);\n        if (_dataCache == null) _dataCache = createData(_typeNumber, _errorCorrectionLevel, _dataList);\n        mapData(_dataCache, maskPattern);\n    };\n    const setupPositionProbePattern = function(row, col) {\n        for(let r = -1; r <= 7; r += 1){\n            if (row + r <= -1 || _moduleCount <= row + r) continue;\n            for(let c = -1; c <= 7; c += 1){\n                if (col + c <= -1 || _moduleCount <= col + c) continue;\n                if (0 <= r && r <= 6 && (c == 0 || c == 6) || 0 <= c && c <= 6 && (r == 0 || r == 6) || 2 <= r && r <= 4 && 2 <= c && c <= 4) _modules[row + r][col + c] = true;\n                else _modules[row + r][col + c] = false;\n            }\n        }\n    };\n    const getBestMaskPattern = function() {\n        let minLostPoint = 0;\n        let pattern = 0;\n        for(let i = 0; i < 8; i += 1){\n            makeImpl(true, i);\n            const lostPoint = $bd33f692cf9f4068$var$QRUtil.getLostPoint(_this);\n            if (i == 0 || minLostPoint > lostPoint) {\n                minLostPoint = lostPoint;\n                pattern = i;\n            }\n        }\n        return pattern;\n    };\n    const setupTimingPattern = function() {\n        for(let r = 8; r < _moduleCount - 8; r += 1){\n            if (_modules[r][6] != null) continue;\n            _modules[r][6] = r % 2 == 0;\n        }\n        for(let c = 8; c < _moduleCount - 8; c += 1){\n            if (_modules[6][c] != null) continue;\n            _modules[6][c] = c % 2 == 0;\n        }\n    };\n    const setupPositionAdjustPattern = function() {\n        const pos = $bd33f692cf9f4068$var$QRUtil.getPatternPosition(_typeNumber);\n        for(let i = 0; i < pos.length; i += 1)for(let j = 0; j < pos.length; j += 1){\n            const row = pos[i];\n            const col = pos[j];\n            if (_modules[row][col] != null) continue;\n            for(let r = -2; r <= 2; r += 1){\n                for(let c = -2; c <= 2; c += 1)if (r == -2 || r == 2 || c == -2 || c == 2 || r == 0 && c == 0) _modules[row + r][col + c] = true;\n                else _modules[row + r][col + c] = false;\n            }\n        }\n    };\n    const setupTypeNumber = function(test) {\n        const bits = $bd33f692cf9f4068$var$QRUtil.getBCHTypeNumber(_typeNumber);\n        for(let i = 0; i < 18; i += 1){\n            const mod = !test && (bits >> i & 1) == 1;\n            _modules[Math.floor(i / 3)][i % 3 + _moduleCount - 8 - 3] = mod;\n        }\n        for(let i = 0; i < 18; i += 1){\n            const mod = !test && (bits >> i & 1) == 1;\n            _modules[i % 3 + _moduleCount - 8 - 3][Math.floor(i / 3)] = mod;\n        }\n    };\n    const setupTypeInfo = function(test, maskPattern) {\n        const data = _errorCorrectionLevel << 3 | maskPattern;\n        const bits = $bd33f692cf9f4068$var$QRUtil.getBCHTypeInfo(data);\n        // vertical\n        for(let i = 0; i < 15; i += 1){\n            const mod = !test && (bits >> i & 1) == 1;\n            if (i < 6) _modules[i][8] = mod;\n            else if (i < 8) _modules[i + 1][8] = mod;\n            else _modules[_moduleCount - 15 + i][8] = mod;\n        }\n        // horizontal\n        for(let i = 0; i < 15; i += 1){\n            const mod = !test && (bits >> i & 1) == 1;\n            if (i < 8) _modules[8][_moduleCount - i - 1] = mod;\n            else if (i < 9) _modules[8][15 - i - 1 + 1] = mod;\n            else _modules[8][15 - i - 1] = mod;\n        }\n        // fixed module\n        _modules[_moduleCount - 8][8] = !test;\n    };\n    const mapData = function(data, maskPattern) {\n        let inc = -1;\n        let row = _moduleCount - 1;\n        let bitIndex = 7;\n        let byteIndex = 0;\n        const maskFunc = $bd33f692cf9f4068$var$QRUtil.getMaskFunction(maskPattern);\n        for(let col = _moduleCount - 1; col > 0; col -= 2){\n            if (col == 6) col -= 1;\n            while(true){\n                for(let c = 0; c < 2; c += 1)if (_modules[row][col - c] == null) {\n                    let dark = false;\n                    if (byteIndex < data.length) dark = (data[byteIndex] >>> bitIndex & 1) == 1;\n                    const mask = maskFunc(row, col - c);\n                    if (mask) dark = !dark;\n                    _modules[row][col - c] = dark;\n                    bitIndex -= 1;\n                    if (bitIndex == -1) {\n                        byteIndex += 1;\n                        bitIndex = 7;\n                    }\n                }\n                row += inc;\n                if (row < 0 || _moduleCount <= row) {\n                    row -= inc;\n                    inc = -inc;\n                    break;\n                }\n            }\n        }\n    };\n    const createBytes = function(buffer, rsBlocks) {\n        let offset = 0;\n        let maxDcCount = 0;\n        let maxEcCount = 0;\n        const dcdata = new Array(rsBlocks.length);\n        const ecdata = new Array(rsBlocks.length);\n        for(let r = 0; r < rsBlocks.length; r += 1){\n            const dcCount = rsBlocks[r].dataCount;\n            const ecCount = rsBlocks[r].totalCount - dcCount;\n            maxDcCount = Math.max(maxDcCount, dcCount);\n            maxEcCount = Math.max(maxEcCount, ecCount);\n            dcdata[r] = new Array(dcCount);\n            for(let i = 0; i < dcdata[r].length; i += 1)dcdata[r][i] = 0xff & buffer.getBuffer()[i + offset];\n            offset += dcCount;\n            const rsPoly = $bd33f692cf9f4068$var$QRUtil.getErrorCorrectPolynomial(ecCount);\n            const rawPoly = $bd33f692cf9f4068$var$qrPolynomial(dcdata[r], rsPoly.getLength() - 1);\n            const modPoly = rawPoly.mod(rsPoly);\n            ecdata[r] = new Array(rsPoly.getLength() - 1);\n            for(let i = 0; i < ecdata[r].length; i += 1){\n                const modIndex = i + modPoly.getLength() - ecdata[r].length;\n                ecdata[r][i] = modIndex >= 0 ? modPoly.getAt(modIndex) : 0;\n            }\n        }\n        let totalCodeCount = 0;\n        for(let i = 0; i < rsBlocks.length; i += 1)totalCodeCount += rsBlocks[i].totalCount;\n        const data = new Array(totalCodeCount);\n        let index = 0;\n        for(let i = 0; i < maxDcCount; i += 1){\n            for(let r = 0; r < rsBlocks.length; r += 1)if (i < dcdata[r].length) {\n                data[index] = dcdata[r][i];\n                index += 1;\n            }\n        }\n        for(let i = 0; i < maxEcCount; i += 1){\n            for(let r = 0; r < rsBlocks.length; r += 1)if (i < ecdata[r].length) {\n                data[index] = ecdata[r][i];\n                index += 1;\n            }\n        }\n        return data;\n    };\n    const createData = function(typeNumber, errorCorrectionLevel, dataList) {\n        const rsBlocks = $bd33f692cf9f4068$var$QRRSBlock.getRSBlocks(typeNumber, errorCorrectionLevel);\n        const buffer = $bd33f692cf9f4068$var$qrBitBuffer();\n        for(let i = 0; i < dataList.length; i += 1){\n            const data = dataList[i];\n            buffer.put(data.getMode(), 4);\n            buffer.put(data.getLength(), $bd33f692cf9f4068$var$QRUtil.getLengthInBits(data.getMode(), typeNumber));\n            data.write(buffer);\n        }\n        // calc num max data.\n        let totalDataCount = 0;\n        for(let i = 0; i < rsBlocks.length; i += 1)totalDataCount += rsBlocks[i].dataCount;\n        if (buffer.getLengthInBits() > totalDataCount * 8) throw 'code length overflow. (' + buffer.getLengthInBits() + '>' + totalDataCount * 8 + ')';\n        // end code\n        if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) buffer.put(0, 4);\n        // padding\n        while(buffer.getLengthInBits() % 8 != 0)buffer.putBit(false);\n        // padding\n        while(true){\n            if (buffer.getLengthInBits() >= totalDataCount * 8) break;\n            buffer.put(PAD0, 8);\n            if (buffer.getLengthInBits() >= totalDataCount * 8) break;\n            buffer.put(PAD1, 8);\n        }\n        return createBytes(buffer, rsBlocks);\n    };\n    _this.addData = function(data, mode) {\n        mode = mode || 'Byte';\n        let newData = null;\n        switch(mode){\n            case 'Numeric':\n                newData = $bd33f692cf9f4068$var$qrNumber(data);\n                break;\n            case 'Alphanumeric':\n                newData = $bd33f692cf9f4068$var$qrAlphaNum(data);\n                break;\n            case 'Byte':\n                newData = $bd33f692cf9f4068$var$qr8BitByte(data);\n                break;\n            case 'Kanji':\n                newData = $bd33f692cf9f4068$var$qrKanji(data);\n                break;\n            default:\n                throw 'mode:' + mode;\n        }\n        _dataList.push(newData);\n        _dataCache = null;\n    };\n    _this.isDark = function(row, col) {\n        if (row < 0 || _moduleCount <= row || col < 0 || _moduleCount <= col) throw row + ',' + col;\n        return _modules[row][col];\n    };\n    _this.getModuleCount = function() {\n        return _moduleCount;\n    };\n    _this.make = function() {\n        if (_typeNumber < 1) {\n            let typeNumber = 1;\n            for(; typeNumber < 40; typeNumber++){\n                const rsBlocks = $bd33f692cf9f4068$var$QRRSBlock.getRSBlocks(typeNumber, _errorCorrectionLevel);\n                const buffer = $bd33f692cf9f4068$var$qrBitBuffer();\n                for(let i = 0; i < _dataList.length; i++){\n                    const data = _dataList[i];\n                    buffer.put(data.getMode(), 4);\n                    buffer.put(data.getLength(), $bd33f692cf9f4068$var$QRUtil.getLengthInBits(data.getMode(), typeNumber));\n                    data.write(buffer);\n                }\n                let totalDataCount = 0;\n                for(let i = 0; i < rsBlocks.length; i++)totalDataCount += rsBlocks[i].dataCount;\n                if (buffer.getLengthInBits() <= totalDataCount * 8) break;\n            }\n            _typeNumber = typeNumber;\n        }\n        makeImpl(false, getBestMaskPattern());\n    };\n    _this.createTableTag = function(cellSize, margin) {\n        cellSize = cellSize || 2;\n        margin = typeof margin == 'undefined' ? cellSize * 4 : margin;\n        let qrHtml = '';\n        qrHtml += '<table style=\"';\n        qrHtml += ' border-width: 0px; border-style: none;';\n        qrHtml += ' border-collapse: collapse;';\n        qrHtml += ' padding: 0px; margin: ' + margin + 'px;';\n        qrHtml += '\">';\n        qrHtml += '<tbody>';\n        for(let r = 0; r < _this.getModuleCount(); r += 1){\n            qrHtml += '<tr>';\n            for(let c = 0; c < _this.getModuleCount(); c += 1){\n                qrHtml += '<td style=\"';\n                qrHtml += ' border-width: 0px; border-style: none;';\n                qrHtml += ' border-collapse: collapse;';\n                qrHtml += ' padding: 0px; margin: 0px;';\n                qrHtml += ' width: ' + cellSize + 'px;';\n                qrHtml += ' height: ' + cellSize + 'px;';\n                qrHtml += ' background-color: ';\n                qrHtml += _this.isDark(r, c) ? '#000000' : '#ffffff';\n                qrHtml += ';';\n                qrHtml += '\"/>';\n            }\n            qrHtml += '</tr>';\n        }\n        qrHtml += '</tbody>';\n        qrHtml += '</table>';\n        return qrHtml;\n    };\n    _this.createSvgTag = function(cellSize, margin, alt, title) {\n        let opts = {};\n        if (typeof arguments[0] == 'object') {\n            // Called by options.\n            opts = arguments[0];\n            // overwrite cellSize and margin.\n            cellSize = opts.cellSize;\n            margin = opts.margin;\n            alt = opts.alt;\n            title = opts.title;\n        }\n        cellSize = cellSize || 2;\n        margin = typeof margin == 'undefined' ? cellSize * 4 : margin;\n        // Compose alt property surrogate\n        alt = typeof alt === 'string' ? {\n            text: alt\n        } : alt || {};\n        alt.text = alt.text || null;\n        alt.id = alt.text ? alt.id || 'qrcode-description' : null;\n        // Compose title property surrogate\n        title = typeof title === 'string' ? {\n            text: title\n        } : title || {};\n        title.text = title.text || null;\n        title.id = title.text ? title.id || 'qrcode-title' : null;\n        const size = _this.getModuleCount() * cellSize + margin * 2;\n        let c, mc, r, mr, qrSvg = '', rect;\n        rect = 'l' + cellSize + ',0 0,' + cellSize + ' -' + cellSize + ',0 0,-' + cellSize + 'z ';\n        qrSvg += '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"';\n        qrSvg += !opts.scalable ? ' width=\"' + size + 'px\" height=\"' + size + 'px\"' : '';\n        qrSvg += ' viewBox=\"0 0 ' + size + ' ' + size + '\" ';\n        qrSvg += ' preserveAspectRatio=\"xMinYMin meet\"';\n        qrSvg += title.text || alt.text ? ' role=\"img\" aria-labelledby=\"' + escapeXml([\n            title.id,\n            alt.id\n        ].join(' ').trim()) + '\"' : '';\n        qrSvg += '>';\n        qrSvg += title.text ? '<title id=\"' + escapeXml(title.id) + '\">' + escapeXml(title.text) + '</title>' : '';\n        qrSvg += alt.text ? '<description id=\"' + escapeXml(alt.id) + '\">' + escapeXml(alt.text) + '</description>' : '';\n        qrSvg += '<rect width=\"100%\" height=\"100%\" fill=\"white\" cx=\"0\" cy=\"0\"/>';\n        qrSvg += '<path d=\"';\n        for(r = 0; r < _this.getModuleCount(); r += 1){\n            mr = r * cellSize + margin;\n            for(c = 0; c < _this.getModuleCount(); c += 1)if (_this.isDark(r, c)) {\n                mc = c * cellSize + margin;\n                qrSvg += 'M' + mc + ',' + mr + rect;\n            }\n        }\n        qrSvg += '\" stroke=\"transparent\" fill=\"black\"/>';\n        qrSvg += '</svg>';\n        return qrSvg;\n    };\n    _this.createDataURL = function(cellSize, margin) {\n        cellSize = cellSize || 2;\n        margin = typeof margin == 'undefined' ? cellSize * 4 : margin;\n        const size = _this.getModuleCount() * cellSize + margin * 2;\n        const min = margin;\n        const max = size - margin;\n        return $bd33f692cf9f4068$var$createDataURL(size, size, function(x, y) {\n            if (min <= x && x < max && min <= y && y < max) {\n                const c = Math.floor((x - min) / cellSize);\n                const r = Math.floor((y - min) / cellSize);\n                return _this.isDark(r, c) ? 0 : 1;\n            } else return 1;\n        });\n    };\n    _this.createImgTag = function(cellSize, margin, alt) {\n        cellSize = cellSize || 2;\n        margin = typeof margin == 'undefined' ? cellSize * 4 : margin;\n        const size = _this.getModuleCount() * cellSize + margin * 2;\n        let img = '';\n        img += '<img';\n        img += '\\u0020src=\"';\n        img += _this.createDataURL(cellSize, margin);\n        img += '\"';\n        img += '\\u0020width=\"';\n        img += size;\n        img += '\"';\n        img += '\\u0020height=\"';\n        img += size;\n        img += '\"';\n        if (alt) {\n            img += '\\u0020alt=\"';\n            img += escapeXml(alt);\n            img += '\"';\n        }\n        img += '/>';\n        return img;\n    };\n    const escapeXml = function(s) {\n        let escaped = '';\n        for(let i = 0; i < s.length; i += 1){\n            const c = s.charAt(i);\n            switch(c){\n                case '<':\n                    escaped += '&lt;';\n                    break;\n                case '>':\n                    escaped += '&gt;';\n                    break;\n                case '&':\n                    escaped += '&amp;';\n                    break;\n                case '\"':\n                    escaped += '&quot;';\n                    break;\n                default:\n                    escaped += c;\n                    break;\n            }\n        }\n        return escaped;\n    };\n    const _createHalfASCII = function(margin) {\n        const cellSize = 1;\n        margin = typeof margin == 'undefined' ? cellSize * 2 : margin;\n        const size = _this.getModuleCount() * cellSize + margin * 2;\n        const min = margin;\n        const max = size - margin;\n        let y, x, r1, r2, p;\n        const blocks = {\n            \"\\u2588\\u2588\": \"\\u2588\",\n            \"\\u2588 \": \"\\u2580\",\n            \" \\u2588\": \"\\u2584\",\n            '  ': ' '\n        };\n        const blocksLastLineNoMargin = {\n            \"\\u2588\\u2588\": \"\\u2580\",\n            \"\\u2588 \": \"\\u2580\",\n            \" \\u2588\": ' ',\n            '  ': ' '\n        };\n        let ascii = '';\n        for(y = 0; y < size; y += 2){\n            r1 = Math.floor((y - min) / cellSize);\n            r2 = Math.floor((y + 1 - min) / cellSize);\n            for(x = 0; x < size; x += 1){\n                p = \"\\u2588\";\n                if (min <= x && x < max && min <= y && y < max && _this.isDark(r1, Math.floor((x - min) / cellSize))) p = ' ';\n                if (min <= x && x < max && min <= y + 1 && y + 1 < max && _this.isDark(r2, Math.floor((x - min) / cellSize))) p += ' ';\n                else p += \"\\u2588\";\n                // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.\n                ascii += margin < 1 && y + 1 >= max ? blocksLastLineNoMargin[p] : blocks[p];\n            }\n            ascii += '\\n';\n        }\n        if (size % 2 && margin > 0) return ascii.substring(0, ascii.length - size - 1) + Array(size + 1).join(\"\\u2580\");\n        return ascii.substring(0, ascii.length - 1);\n    };\n    _this.createASCII = function(cellSize, margin) {\n        cellSize = cellSize || 1;\n        if (cellSize < 2) return _createHalfASCII(margin);\n        cellSize -= 1;\n        margin = typeof margin == 'undefined' ? cellSize * 2 : margin;\n        const size = _this.getModuleCount() * cellSize + margin * 2;\n        const min = margin;\n        const max = size - margin;\n        let y, x, r, p;\n        const white = Array(cellSize + 1).join(\"\\u2588\\u2588\");\n        const black = Array(cellSize + 1).join('  ');\n        let ascii = '';\n        let line = '';\n        for(y = 0; y < size; y += 1){\n            r = Math.floor((y - min) / cellSize);\n            line = '';\n            for(x = 0; x < size; x += 1){\n                p = 1;\n                if (min <= x && x < max && min <= y && y < max && _this.isDark(r, Math.floor((x - min) / cellSize))) p = 0;\n                // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.\n                line += p ? white : black;\n            }\n            for(r = 0; r < cellSize; r += 1)ascii += line + '\\n';\n        }\n        return ascii.substring(0, ascii.length - 1);\n    };\n    _this.renderTo2dContext = function(context, cellSize) {\n        cellSize = cellSize || 2;\n        const length = _this.getModuleCount();\n        for(let row = 0; row < length; row++)for(let col = 0; col < length; col++){\n            context.fillStyle = _this.isDark(row, col) ? 'black' : 'white';\n            context.fillRect(col * cellSize, row * cellSize, cellSize, cellSize);\n        }\n    };\n    return _this;\n};\n//---------------------------------------------------------------------\n// qrcode.stringToBytes\n//---------------------------------------------------------------------\n$bd33f692cf9f4068$export$5f3279733515fed0.stringToBytes = function(s) {\n    const bytes = [];\n    for(let i = 0; i < s.length; i += 1){\n        const c = s.charCodeAt(i);\n        bytes.push(c & 0xff);\n    }\n    return bytes;\n};\n//---------------------------------------------------------------------\n// qrcode.createStringToBytes\n//---------------------------------------------------------------------\n/**\n * @param unicodeData base64 string of byte array.\n * [16bit Unicode],[16bit Bytes], ...\n * @param numChars\n */ $bd33f692cf9f4068$export$5f3279733515fed0.createStringToBytes = function(unicodeData, numChars) {\n    // create conversion map.\n    const unicodeMap = function() {\n        const bin = $bd33f692cf9f4068$var$base64DecodeInputStream(unicodeData);\n        const read = function() {\n            const b = bin.read();\n            if (b == -1) throw 'eof';\n            return b;\n        };\n        let count = 0;\n        const unicodeMap = {};\n        while(true){\n            const b0 = bin.read();\n            if (b0 == -1) break;\n            const b1 = read();\n            const b2 = read();\n            const b3 = read();\n            const k = String.fromCharCode(b0 << 8 | b1);\n            const v = b2 << 8 | b3;\n            unicodeMap[k] = v;\n            count += 1;\n        }\n        if (count != numChars) throw count + ' != ' + numChars;\n        return unicodeMap;\n    }();\n    const unknownChar = '?'.charCodeAt(0);\n    return function(s) {\n        const bytes = [];\n        for(let i = 0; i < s.length; i += 1){\n            const c = s.charCodeAt(i);\n            if (c < 128) bytes.push(c);\n            else {\n                const b = unicodeMap[s.charAt(i)];\n                if (typeof b == 'number') {\n                    if ((b & 0xff) == b) // 1byte\n                    bytes.push(b);\n                    else {\n                        // 2bytes\n                        bytes.push(b >>> 8);\n                        bytes.push(b & 0xff);\n                    }\n                } else bytes.push(unknownChar);\n            }\n        }\n        return bytes;\n    };\n};\n//---------------------------------------------------------------------\n// QRMode\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$QRMode = {\n    MODE_NUMBER: 1,\n    MODE_ALPHA_NUM: 2,\n    MODE_8BIT_BYTE: 4,\n    MODE_KANJI: 8\n};\n//---------------------------------------------------------------------\n// QRErrorCorrectionLevel\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$QRErrorCorrectionLevel = {\n    L: 1,\n    M: 0,\n    Q: 3,\n    H: 2\n};\n//---------------------------------------------------------------------\n// QRMaskPattern\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$QRMaskPattern = {\n    PATTERN000: 0,\n    PATTERN001: 1,\n    PATTERN010: 2,\n    PATTERN011: 3,\n    PATTERN100: 4,\n    PATTERN101: 5,\n    PATTERN110: 6,\n    PATTERN111: 7\n};\n//---------------------------------------------------------------------\n// QRUtil\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$QRUtil = function() {\n    const PATTERN_POSITION_TABLE = [\n        [],\n        [\n            6,\n            18\n        ],\n        [\n            6,\n            22\n        ],\n        [\n            6,\n            26\n        ],\n        [\n            6,\n            30\n        ],\n        [\n            6,\n            34\n        ],\n        [\n            6,\n            22,\n            38\n        ],\n        [\n            6,\n            24,\n            42\n        ],\n        [\n            6,\n            26,\n            46\n        ],\n        [\n            6,\n            28,\n            50\n        ],\n        [\n            6,\n            30,\n            54\n        ],\n        [\n            6,\n            32,\n            58\n        ],\n        [\n            6,\n            34,\n            62\n        ],\n        [\n            6,\n            26,\n            46,\n            66\n        ],\n        [\n            6,\n            26,\n            48,\n            70\n        ],\n        [\n            6,\n            26,\n            50,\n            74\n        ],\n        [\n            6,\n            30,\n            54,\n            78\n        ],\n        [\n            6,\n            30,\n            56,\n            82\n        ],\n        [\n            6,\n            30,\n            58,\n            86\n        ],\n        [\n            6,\n            34,\n            62,\n            90\n        ],\n        [\n            6,\n            28,\n            50,\n            72,\n            94\n        ],\n        [\n            6,\n            26,\n            50,\n            74,\n            98\n        ],\n        [\n            6,\n            30,\n            54,\n            78,\n            102\n        ],\n        [\n            6,\n            28,\n            54,\n            80,\n            106\n        ],\n        [\n            6,\n            32,\n            58,\n            84,\n            110\n        ],\n        [\n            6,\n            30,\n            58,\n            86,\n            114\n        ],\n        [\n            6,\n            34,\n            62,\n            90,\n            118\n        ],\n        [\n            6,\n            26,\n            50,\n            74,\n            98,\n            122\n        ],\n        [\n            6,\n            30,\n            54,\n            78,\n            102,\n            126\n        ],\n        [\n            6,\n            26,\n            52,\n            78,\n            104,\n            130\n        ],\n        [\n            6,\n            30,\n            56,\n            82,\n            108,\n            134\n        ],\n        [\n            6,\n            34,\n            60,\n            86,\n            112,\n            138\n        ],\n        [\n            6,\n            30,\n            58,\n            86,\n            114,\n            142\n        ],\n        [\n            6,\n            34,\n            62,\n            90,\n            118,\n            146\n        ],\n        [\n            6,\n            30,\n            54,\n            78,\n            102,\n            126,\n            150\n        ],\n        [\n            6,\n            24,\n            50,\n            76,\n            102,\n            128,\n            154\n        ],\n        [\n            6,\n            28,\n            54,\n            80,\n            106,\n            132,\n            158\n        ],\n        [\n            6,\n            32,\n            58,\n            84,\n            110,\n            136,\n            162\n        ],\n        [\n            6,\n            26,\n            54,\n            82,\n            110,\n            138,\n            166\n        ],\n        [\n            6,\n            30,\n            58,\n            86,\n            114,\n            142,\n            170\n        ]\n    ];\n    const G15 = 1335;\n    const G18 = 7973;\n    const G15_MASK = 21522;\n    const _this = {};\n    const getBCHDigit = function(data) {\n        let digit = 0;\n        while(data != 0){\n            digit += 1;\n            data >>>= 1;\n        }\n        return digit;\n    };\n    _this.getBCHTypeInfo = function(data) {\n        let d = data << 10;\n        while(getBCHDigit(d) - getBCHDigit(G15) >= 0)d ^= G15 << getBCHDigit(d) - getBCHDigit(G15);\n        return (data << 10 | d) ^ G15_MASK;\n    };\n    _this.getBCHTypeNumber = function(data) {\n        let d = data << 12;\n        while(getBCHDigit(d) - getBCHDigit(G18) >= 0)d ^= G18 << getBCHDigit(d) - getBCHDigit(G18);\n        return data << 12 | d;\n    };\n    _this.getPatternPosition = function(typeNumber) {\n        return PATTERN_POSITION_TABLE[typeNumber - 1];\n    };\n    _this.getMaskFunction = function(maskPattern) {\n        switch(maskPattern){\n            case $bd33f692cf9f4068$var$QRMaskPattern.PATTERN000:\n                return function(i, j) {\n                    return (i + j) % 2 == 0;\n                };\n            case $bd33f692cf9f4068$var$QRMaskPattern.PATTERN001:\n                return function(i, j) {\n                    return i % 2 == 0;\n                };\n            case $bd33f692cf9f4068$var$QRMaskPattern.PATTERN010:\n                return function(i, j) {\n                    return j % 3 == 0;\n                };\n            case $bd33f692cf9f4068$var$QRMaskPattern.PATTERN011:\n                return function(i, j) {\n                    return (i + j) % 3 == 0;\n                };\n            case $bd33f692cf9f4068$var$QRMaskPattern.PATTERN100:\n                return function(i, j) {\n                    return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;\n                };\n            case $bd33f692cf9f4068$var$QRMaskPattern.PATTERN101:\n                return function(i, j) {\n                    return i * j % 2 + i * j % 3 == 0;\n                };\n            case $bd33f692cf9f4068$var$QRMaskPattern.PATTERN110:\n                return function(i, j) {\n                    return (i * j % 2 + i * j % 3) % 2 == 0;\n                };\n            case $bd33f692cf9f4068$var$QRMaskPattern.PATTERN111:\n                return function(i, j) {\n                    return (i * j % 3 + (i + j) % 2) % 2 == 0;\n                };\n            default:\n                throw 'bad maskPattern:' + maskPattern;\n        }\n    };\n    _this.getErrorCorrectPolynomial = function(errorCorrectLength) {\n        let a = $bd33f692cf9f4068$var$qrPolynomial([\n            1\n        ], 0);\n        for(let i = 0; i < errorCorrectLength; i += 1)a = a.multiply($bd33f692cf9f4068$var$qrPolynomial([\n            1,\n            $bd33f692cf9f4068$var$QRMath.gexp(i)\n        ], 0));\n        return a;\n    };\n    _this.getLengthInBits = function(mode, type) {\n        if (1 <= type && type < 10) // 1 - 9\n        switch(mode){\n            case $bd33f692cf9f4068$var$QRMode.MODE_NUMBER:\n                return 10;\n            case $bd33f692cf9f4068$var$QRMode.MODE_ALPHA_NUM:\n                return 9;\n            case $bd33f692cf9f4068$var$QRMode.MODE_8BIT_BYTE:\n                return 8;\n            case $bd33f692cf9f4068$var$QRMode.MODE_KANJI:\n                return 8;\n            default:\n                throw 'mode:' + mode;\n        }\n        else if (type < 27) // 10 - 26\n        switch(mode){\n            case $bd33f692cf9f4068$var$QRMode.MODE_NUMBER:\n                return 12;\n            case $bd33f692cf9f4068$var$QRMode.MODE_ALPHA_NUM:\n                return 11;\n            case $bd33f692cf9f4068$var$QRMode.MODE_8BIT_BYTE:\n                return 16;\n            case $bd33f692cf9f4068$var$QRMode.MODE_KANJI:\n                return 10;\n            default:\n                throw 'mode:' + mode;\n        }\n        else if (type < 41) // 27 - 40\n        switch(mode){\n            case $bd33f692cf9f4068$var$QRMode.MODE_NUMBER:\n                return 14;\n            case $bd33f692cf9f4068$var$QRMode.MODE_ALPHA_NUM:\n                return 13;\n            case $bd33f692cf9f4068$var$QRMode.MODE_8BIT_BYTE:\n                return 16;\n            case $bd33f692cf9f4068$var$QRMode.MODE_KANJI:\n                return 12;\n            default:\n                throw 'mode:' + mode;\n        }\n        else throw 'type:' + type;\n    };\n    _this.getLostPoint = function(qrcode) {\n        const moduleCount = qrcode.getModuleCount();\n        let lostPoint = 0;\n        // LEVEL1\n        for(let row = 0; row < moduleCount; row += 1)for(let col = 0; col < moduleCount; col += 1){\n            let sameCount = 0;\n            const dark = qrcode.isDark(row, col);\n            for(let r = -1; r <= 1; r += 1){\n                if (row + r < 0 || moduleCount <= row + r) continue;\n                for(let c = -1; c <= 1; c += 1){\n                    if (col + c < 0 || moduleCount <= col + c) continue;\n                    if (r == 0 && c == 0) continue;\n                    if (dark == qrcode.isDark(row + r, col + c)) sameCount += 1;\n                }\n            }\n            if (sameCount > 5) lostPoint += 3 + sameCount - 5;\n        }\n        // LEVEL2\n        for(let row = 0; row < moduleCount - 1; row += 1)for(let col = 0; col < moduleCount - 1; col += 1){\n            let count = 0;\n            if (qrcode.isDark(row, col)) count += 1;\n            if (qrcode.isDark(row + 1, col)) count += 1;\n            if (qrcode.isDark(row, col + 1)) count += 1;\n            if (qrcode.isDark(row + 1, col + 1)) count += 1;\n            if (count == 0 || count == 4) lostPoint += 3;\n        }\n        // LEVEL3\n        for(let row = 0; row < moduleCount; row += 1){\n            for(let col = 0; col < moduleCount - 6; col += 1)if (qrcode.isDark(row, col) && !qrcode.isDark(row, col + 1) && qrcode.isDark(row, col + 2) && qrcode.isDark(row, col + 3) && qrcode.isDark(row, col + 4) && !qrcode.isDark(row, col + 5) && qrcode.isDark(row, col + 6)) lostPoint += 40;\n        }\n        for(let col = 0; col < moduleCount; col += 1){\n            for(let row = 0; row < moduleCount - 6; row += 1)if (qrcode.isDark(row, col) && !qrcode.isDark(row + 1, col) && qrcode.isDark(row + 2, col) && qrcode.isDark(row + 3, col) && qrcode.isDark(row + 4, col) && !qrcode.isDark(row + 5, col) && qrcode.isDark(row + 6, col)) lostPoint += 40;\n        }\n        // LEVEL4\n        let darkCount = 0;\n        for(let col = 0; col < moduleCount; col += 1){\n            for(let row = 0; row < moduleCount; row += 1)if (qrcode.isDark(row, col)) darkCount += 1;\n        }\n        const ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;\n        lostPoint += ratio * 10;\n        return lostPoint;\n    };\n    return _this;\n}();\n//---------------------------------------------------------------------\n// QRMath\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$QRMath = function() {\n    const EXP_TABLE = new Array(256);\n    const LOG_TABLE = new Array(256);\n    // initialize tables\n    for(let i = 0; i < 8; i += 1)EXP_TABLE[i] = 1 << i;\n    for(let i = 8; i < 256; i += 1)EXP_TABLE[i] = EXP_TABLE[i - 4] ^ EXP_TABLE[i - 5] ^ EXP_TABLE[i - 6] ^ EXP_TABLE[i - 8];\n    for(let i = 0; i < 255; i += 1)LOG_TABLE[EXP_TABLE[i]] = i;\n    const _this = {};\n    _this.glog = function(n) {\n        if (n < 1) throw 'glog(' + n + ')';\n        return LOG_TABLE[n];\n    };\n    _this.gexp = function(n) {\n        while(n < 0)n += 255;\n        while(n >= 256)n -= 255;\n        return EXP_TABLE[n];\n    };\n    return _this;\n}();\n//---------------------------------------------------------------------\n// qrPolynomial\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$qrPolynomial = function(num, shift) {\n    if (typeof num.length == 'undefined') throw num.length + '/' + shift;\n    const _num = function() {\n        let offset = 0;\n        while(offset < num.length && num[offset] == 0)offset += 1;\n        const _num = new Array(num.length - offset + shift);\n        for(let i = 0; i < num.length - offset; i += 1)_num[i] = num[i + offset];\n        return _num;\n    }();\n    const _this = {};\n    _this.getAt = function(index) {\n        return _num[index];\n    };\n    _this.getLength = function() {\n        return _num.length;\n    };\n    _this.multiply = function(e) {\n        const num = new Array(_this.getLength() + e.getLength() - 1);\n        for(let i = 0; i < _this.getLength(); i += 1)for(let j = 0; j < e.getLength(); j += 1)num[i + j] ^= $bd33f692cf9f4068$var$QRMath.gexp($bd33f692cf9f4068$var$QRMath.glog(_this.getAt(i)) + $bd33f692cf9f4068$var$QRMath.glog(e.getAt(j)));\n        return $bd33f692cf9f4068$var$qrPolynomial(num, 0);\n    };\n    _this.mod = function(e) {\n        if (_this.getLength() - e.getLength() < 0) return _this;\n        const ratio = $bd33f692cf9f4068$var$QRMath.glog(_this.getAt(0)) - $bd33f692cf9f4068$var$QRMath.glog(e.getAt(0));\n        const num = new Array(_this.getLength());\n        for(let i = 0; i < _this.getLength(); i += 1)num[i] = _this.getAt(i);\n        for(let i = 0; i < e.getLength(); i += 1)num[i] ^= $bd33f692cf9f4068$var$QRMath.gexp($bd33f692cf9f4068$var$QRMath.glog(e.getAt(i)) + ratio);\n        // recursive call\n        return $bd33f692cf9f4068$var$qrPolynomial(num, 0).mod(e);\n    };\n    return _this;\n};\n//---------------------------------------------------------------------\n// QRRSBlock\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$QRRSBlock = function() {\n    const RS_BLOCK_TABLE = [\n        // L\n        // M\n        // Q\n        // H\n        // 1\n        [\n            1,\n            26,\n            19\n        ],\n        [\n            1,\n            26,\n            16\n        ],\n        [\n            1,\n            26,\n            13\n        ],\n        [\n            1,\n            26,\n            9\n        ],\n        // 2\n        [\n            1,\n            44,\n            34\n        ],\n        [\n            1,\n            44,\n            28\n        ],\n        [\n            1,\n            44,\n            22\n        ],\n        [\n            1,\n            44,\n            16\n        ],\n        // 3\n        [\n            1,\n            70,\n            55\n        ],\n        [\n            1,\n            70,\n            44\n        ],\n        [\n            2,\n            35,\n            17\n        ],\n        [\n            2,\n            35,\n            13\n        ],\n        // 4\n        [\n            1,\n            100,\n            80\n        ],\n        [\n            2,\n            50,\n            32\n        ],\n        [\n            2,\n            50,\n            24\n        ],\n        [\n            4,\n            25,\n            9\n        ],\n        // 5\n        [\n            1,\n            134,\n            108\n        ],\n        [\n            2,\n            67,\n            43\n        ],\n        [\n            2,\n            33,\n            15,\n            2,\n            34,\n            16\n        ],\n        [\n            2,\n            33,\n            11,\n            2,\n            34,\n            12\n        ],\n        // 6\n        [\n            2,\n            86,\n            68\n        ],\n        [\n            4,\n            43,\n            27\n        ],\n        [\n            4,\n            43,\n            19\n        ],\n        [\n            4,\n            43,\n            15\n        ],\n        // 7\n        [\n            2,\n            98,\n            78\n        ],\n        [\n            4,\n            49,\n            31\n        ],\n        [\n            2,\n            32,\n            14,\n            4,\n            33,\n            15\n        ],\n        [\n            4,\n            39,\n            13,\n            1,\n            40,\n            14\n        ],\n        // 8\n        [\n            2,\n            121,\n            97\n        ],\n        [\n            2,\n            60,\n            38,\n            2,\n            61,\n            39\n        ],\n        [\n            4,\n            40,\n            18,\n            2,\n            41,\n            19\n        ],\n        [\n            4,\n            40,\n            14,\n            2,\n            41,\n            15\n        ],\n        // 9\n        [\n            2,\n            146,\n            116\n        ],\n        [\n            3,\n            58,\n            36,\n            2,\n            59,\n            37\n        ],\n        [\n            4,\n            36,\n            16,\n            4,\n            37,\n            17\n        ],\n        [\n            4,\n            36,\n            12,\n            4,\n            37,\n            13\n        ],\n        // 10\n        [\n            2,\n            86,\n            68,\n            2,\n            87,\n            69\n        ],\n        [\n            4,\n            69,\n            43,\n            1,\n            70,\n            44\n        ],\n        [\n            6,\n            43,\n            19,\n            2,\n            44,\n            20\n        ],\n        [\n            6,\n            43,\n            15,\n            2,\n            44,\n            16\n        ],\n        // 11\n        [\n            4,\n            101,\n            81\n        ],\n        [\n            1,\n            80,\n            50,\n            4,\n            81,\n            51\n        ],\n        [\n            4,\n            50,\n            22,\n            4,\n            51,\n            23\n        ],\n        [\n            3,\n            36,\n            12,\n            8,\n            37,\n            13\n        ],\n        // 12\n        [\n            2,\n            116,\n            92,\n            2,\n            117,\n            93\n        ],\n        [\n            6,\n            58,\n            36,\n            2,\n            59,\n            37\n        ],\n        [\n            4,\n            46,\n            20,\n            6,\n            47,\n            21\n        ],\n        [\n            7,\n            42,\n            14,\n            4,\n            43,\n            15\n        ],\n        // 13\n        [\n            4,\n            133,\n            107\n        ],\n        [\n            8,\n            59,\n            37,\n            1,\n            60,\n            38\n        ],\n        [\n            8,\n            44,\n            20,\n            4,\n            45,\n            21\n        ],\n        [\n            12,\n            33,\n            11,\n            4,\n            34,\n            12\n        ],\n        // 14\n        [\n            3,\n            145,\n            115,\n            1,\n            146,\n            116\n        ],\n        [\n            4,\n            64,\n            40,\n            5,\n            65,\n            41\n        ],\n        [\n            11,\n            36,\n            16,\n            5,\n            37,\n            17\n        ],\n        [\n            11,\n            36,\n            12,\n            5,\n            37,\n            13\n        ],\n        // 15\n        [\n            5,\n            109,\n            87,\n            1,\n            110,\n            88\n        ],\n        [\n            5,\n            65,\n            41,\n            5,\n            66,\n            42\n        ],\n        [\n            5,\n            54,\n            24,\n            7,\n            55,\n            25\n        ],\n        [\n            11,\n            36,\n            12,\n            7,\n            37,\n            13\n        ],\n        // 16\n        [\n            5,\n            122,\n            98,\n            1,\n            123,\n            99\n        ],\n        [\n            7,\n            73,\n            45,\n            3,\n            74,\n            46\n        ],\n        [\n            15,\n            43,\n            19,\n            2,\n            44,\n            20\n        ],\n        [\n            3,\n            45,\n            15,\n            13,\n            46,\n            16\n        ],\n        // 17\n        [\n            1,\n            135,\n            107,\n            5,\n            136,\n            108\n        ],\n        [\n            10,\n            74,\n            46,\n            1,\n            75,\n            47\n        ],\n        [\n            1,\n            50,\n            22,\n            15,\n            51,\n            23\n        ],\n        [\n            2,\n            42,\n            14,\n            17,\n            43,\n            15\n        ],\n        // 18\n        [\n            5,\n            150,\n            120,\n            1,\n            151,\n            121\n        ],\n        [\n            9,\n            69,\n            43,\n            4,\n            70,\n            44\n        ],\n        [\n            17,\n            50,\n            22,\n            1,\n            51,\n            23\n        ],\n        [\n            2,\n            42,\n            14,\n            19,\n            43,\n            15\n        ],\n        // 19\n        [\n            3,\n            141,\n            113,\n            4,\n            142,\n            114\n        ],\n        [\n            3,\n            70,\n            44,\n            11,\n            71,\n            45\n        ],\n        [\n            17,\n            47,\n            21,\n            4,\n            48,\n            22\n        ],\n        [\n            9,\n            39,\n            13,\n            16,\n            40,\n            14\n        ],\n        // 20\n        [\n            3,\n            135,\n            107,\n            5,\n            136,\n            108\n        ],\n        [\n            3,\n            67,\n            41,\n            13,\n            68,\n            42\n        ],\n        [\n            15,\n            54,\n            24,\n            5,\n            55,\n            25\n        ],\n        [\n            15,\n            43,\n            15,\n            10,\n            44,\n            16\n        ],\n        // 21\n        [\n            4,\n            144,\n            116,\n            4,\n            145,\n            117\n        ],\n        [\n            17,\n            68,\n            42\n        ],\n        [\n            17,\n            50,\n            22,\n            6,\n            51,\n            23\n        ],\n        [\n            19,\n            46,\n            16,\n            6,\n            47,\n            17\n        ],\n        // 22\n        [\n            2,\n            139,\n            111,\n            7,\n            140,\n            112\n        ],\n        [\n            17,\n            74,\n            46\n        ],\n        [\n            7,\n            54,\n            24,\n            16,\n            55,\n            25\n        ],\n        [\n            34,\n            37,\n            13\n        ],\n        // 23\n        [\n            4,\n            151,\n            121,\n            5,\n            152,\n            122\n        ],\n        [\n            4,\n            75,\n            47,\n            14,\n            76,\n            48\n        ],\n        [\n            11,\n            54,\n            24,\n            14,\n            55,\n            25\n        ],\n        [\n            16,\n            45,\n            15,\n            14,\n            46,\n            16\n        ],\n        // 24\n        [\n            6,\n            147,\n            117,\n            4,\n            148,\n            118\n        ],\n        [\n            6,\n            73,\n            45,\n            14,\n            74,\n            46\n        ],\n        [\n            11,\n            54,\n            24,\n            16,\n            55,\n            25\n        ],\n        [\n            30,\n            46,\n            16,\n            2,\n            47,\n            17\n        ],\n        // 25\n        [\n            8,\n            132,\n            106,\n            4,\n            133,\n            107\n        ],\n        [\n            8,\n            75,\n            47,\n            13,\n            76,\n            48\n        ],\n        [\n            7,\n            54,\n            24,\n            22,\n            55,\n            25\n        ],\n        [\n            22,\n            45,\n            15,\n            13,\n            46,\n            16\n        ],\n        // 26\n        [\n            10,\n            142,\n            114,\n            2,\n            143,\n            115\n        ],\n        [\n            19,\n            74,\n            46,\n            4,\n            75,\n            47\n        ],\n        [\n            28,\n            50,\n            22,\n            6,\n            51,\n            23\n        ],\n        [\n            33,\n            46,\n            16,\n            4,\n            47,\n            17\n        ],\n        // 27\n        [\n            8,\n            152,\n            122,\n            4,\n            153,\n            123\n        ],\n        [\n            22,\n            73,\n            45,\n            3,\n            74,\n            46\n        ],\n        [\n            8,\n            53,\n            23,\n            26,\n            54,\n            24\n        ],\n        [\n            12,\n            45,\n            15,\n            28,\n            46,\n            16\n        ],\n        // 28\n        [\n            3,\n            147,\n            117,\n            10,\n            148,\n            118\n        ],\n        [\n            3,\n            73,\n            45,\n            23,\n            74,\n            46\n        ],\n        [\n            4,\n            54,\n            24,\n            31,\n            55,\n            25\n        ],\n        [\n            11,\n            45,\n            15,\n            31,\n            46,\n            16\n        ],\n        // 29\n        [\n            7,\n            146,\n            116,\n            7,\n            147,\n            117\n        ],\n        [\n            21,\n            73,\n            45,\n            7,\n            74,\n            46\n        ],\n        [\n            1,\n            53,\n            23,\n            37,\n            54,\n            24\n        ],\n        [\n            19,\n            45,\n            15,\n            26,\n            46,\n            16\n        ],\n        // 30\n        [\n            5,\n            145,\n            115,\n            10,\n            146,\n            116\n        ],\n        [\n            19,\n            75,\n            47,\n            10,\n            76,\n            48\n        ],\n        [\n            15,\n            54,\n            24,\n            25,\n            55,\n            25\n        ],\n        [\n            23,\n            45,\n            15,\n            25,\n            46,\n            16\n        ],\n        // 31\n        [\n            13,\n            145,\n            115,\n            3,\n            146,\n            116\n        ],\n        [\n            2,\n            74,\n            46,\n            29,\n            75,\n            47\n        ],\n        [\n            42,\n            54,\n            24,\n            1,\n            55,\n            25\n        ],\n        [\n            23,\n            45,\n            15,\n            28,\n            46,\n            16\n        ],\n        // 32\n        [\n            17,\n            145,\n            115\n        ],\n        [\n            10,\n            74,\n            46,\n            23,\n            75,\n            47\n        ],\n        [\n            10,\n            54,\n            24,\n            35,\n            55,\n            25\n        ],\n        [\n            19,\n            45,\n            15,\n            35,\n            46,\n            16\n        ],\n        // 33\n        [\n            17,\n            145,\n            115,\n            1,\n            146,\n            116\n        ],\n        [\n            14,\n            74,\n            46,\n            21,\n            75,\n            47\n        ],\n        [\n            29,\n            54,\n            24,\n            19,\n            55,\n            25\n        ],\n        [\n            11,\n            45,\n            15,\n            46,\n            46,\n            16\n        ],\n        // 34\n        [\n            13,\n            145,\n            115,\n            6,\n            146,\n            116\n        ],\n        [\n            14,\n            74,\n            46,\n            23,\n            75,\n            47\n        ],\n        [\n            44,\n            54,\n            24,\n            7,\n            55,\n            25\n        ],\n        [\n            59,\n            46,\n            16,\n            1,\n            47,\n            17\n        ],\n        // 35\n        [\n            12,\n            151,\n            121,\n            7,\n            152,\n            122\n        ],\n        [\n            12,\n            75,\n            47,\n            26,\n            76,\n            48\n        ],\n        [\n            39,\n            54,\n            24,\n            14,\n            55,\n            25\n        ],\n        [\n            22,\n            45,\n            15,\n            41,\n            46,\n            16\n        ],\n        // 36\n        [\n            6,\n            151,\n            121,\n            14,\n            152,\n            122\n        ],\n        [\n            6,\n            75,\n            47,\n            34,\n            76,\n            48\n        ],\n        [\n            46,\n            54,\n            24,\n            10,\n            55,\n            25\n        ],\n        [\n            2,\n            45,\n            15,\n            64,\n            46,\n            16\n        ],\n        // 37\n        [\n            17,\n            152,\n            122,\n            4,\n            153,\n            123\n        ],\n        [\n            29,\n            74,\n            46,\n            14,\n            75,\n            47\n        ],\n        [\n            49,\n            54,\n            24,\n            10,\n            55,\n            25\n        ],\n        [\n            24,\n            45,\n            15,\n            46,\n            46,\n            16\n        ],\n        // 38\n        [\n            4,\n            152,\n            122,\n            18,\n            153,\n            123\n        ],\n        [\n            13,\n            74,\n            46,\n            32,\n            75,\n            47\n        ],\n        [\n            48,\n            54,\n            24,\n            14,\n            55,\n            25\n        ],\n        [\n            42,\n            45,\n            15,\n            32,\n            46,\n            16\n        ],\n        // 39\n        [\n            20,\n            147,\n            117,\n            4,\n            148,\n            118\n        ],\n        [\n            40,\n            75,\n            47,\n            7,\n            76,\n            48\n        ],\n        [\n            43,\n            54,\n            24,\n            22,\n            55,\n            25\n        ],\n        [\n            10,\n            45,\n            15,\n            67,\n            46,\n            16\n        ],\n        // 40\n        [\n            19,\n            148,\n            118,\n            6,\n            149,\n            119\n        ],\n        [\n            18,\n            75,\n            47,\n            31,\n            76,\n            48\n        ],\n        [\n            34,\n            54,\n            24,\n            34,\n            55,\n            25\n        ],\n        [\n            20,\n            45,\n            15,\n            61,\n            46,\n            16\n        ]\n    ];\n    const qrRSBlock = function(totalCount, dataCount) {\n        const _this = {};\n        _this.totalCount = totalCount;\n        _this.dataCount = dataCount;\n        return _this;\n    };\n    const _this = {};\n    const getRsBlockTable = function(typeNumber, errorCorrectionLevel) {\n        switch(errorCorrectionLevel){\n            case $bd33f692cf9f4068$var$QRErrorCorrectionLevel.L:\n                return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];\n            case $bd33f692cf9f4068$var$QRErrorCorrectionLevel.M:\n                return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];\n            case $bd33f692cf9f4068$var$QRErrorCorrectionLevel.Q:\n                return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];\n            case $bd33f692cf9f4068$var$QRErrorCorrectionLevel.H:\n                return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];\n            default:\n                return undefined;\n        }\n    };\n    _this.getRSBlocks = function(typeNumber, errorCorrectionLevel) {\n        const rsBlock = getRsBlockTable(typeNumber, errorCorrectionLevel);\n        if (typeof rsBlock == 'undefined') throw 'bad rs block @ typeNumber:' + typeNumber + '/errorCorrectionLevel:' + errorCorrectionLevel;\n        const length = rsBlock.length / 3;\n        const list = [];\n        for(let i = 0; i < length; i += 1){\n            const count = rsBlock[i * 3 + 0];\n            const totalCount = rsBlock[i * 3 + 1];\n            const dataCount = rsBlock[i * 3 + 2];\n            for(let j = 0; j < count; j += 1)list.push(qrRSBlock(totalCount, dataCount));\n        }\n        return list;\n    };\n    return _this;\n}();\n//---------------------------------------------------------------------\n// qrBitBuffer\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$qrBitBuffer = function() {\n    const _buffer = [];\n    let _length = 0;\n    const _this = {};\n    _this.getBuffer = function() {\n        return _buffer;\n    };\n    _this.getAt = function(index) {\n        const bufIndex = Math.floor(index / 8);\n        return (_buffer[bufIndex] >>> 7 - index % 8 & 1) == 1;\n    };\n    _this.put = function(num, length) {\n        for(let i = 0; i < length; i += 1)_this.putBit((num >>> length - i - 1 & 1) == 1);\n    };\n    _this.getLengthInBits = function() {\n        return _length;\n    };\n    _this.putBit = function(bit) {\n        const bufIndex = Math.floor(_length / 8);\n        if (_buffer.length <= bufIndex) _buffer.push(0);\n        if (bit) _buffer[bufIndex] |= 0x80 >>> _length % 8;\n        _length += 1;\n    };\n    return _this;\n};\n//---------------------------------------------------------------------\n// qrNumber\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$qrNumber = function(data) {\n    const _mode = $bd33f692cf9f4068$var$QRMode.MODE_NUMBER;\n    const _data = data;\n    const _this = {};\n    _this.getMode = function() {\n        return _mode;\n    };\n    _this.getLength = function(buffer) {\n        return _data.length;\n    };\n    _this.write = function(buffer) {\n        const data = _data;\n        let i = 0;\n        while(i + 2 < data.length){\n            buffer.put(strToNum(data.substring(i, i + 3)), 10);\n            i += 3;\n        }\n        if (i < data.length) {\n            if (data.length - i == 1) buffer.put(strToNum(data.substring(i, i + 1)), 4);\n            else if (data.length - i == 2) buffer.put(strToNum(data.substring(i, i + 2)), 7);\n        }\n    };\n    const strToNum = function(s) {\n        let num = 0;\n        for(let i = 0; i < s.length; i += 1)num = num * 10 + chatToNum(s.charAt(i));\n        return num;\n    };\n    const chatToNum = function(c) {\n        if ('0' <= c && c <= '9') return c.charCodeAt(0) - '0'.charCodeAt(0);\n        throw 'illegal char :' + c;\n    };\n    return _this;\n};\n//---------------------------------------------------------------------\n// qrAlphaNum\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$qrAlphaNum = function(data) {\n    const _mode = $bd33f692cf9f4068$var$QRMode.MODE_ALPHA_NUM;\n    const _data = data;\n    const _this = {};\n    _this.getMode = function() {\n        return _mode;\n    };\n    _this.getLength = function(buffer) {\n        return _data.length;\n    };\n    _this.write = function(buffer) {\n        const s = _data;\n        let i = 0;\n        while(i + 1 < s.length){\n            buffer.put(getCode(s.charAt(i)) * 45 + getCode(s.charAt(i + 1)), 11);\n            i += 2;\n        }\n        if (i < s.length) buffer.put(getCode(s.charAt(i)), 6);\n    };\n    const getCode = function(c) {\n        if ('0' <= c && c <= '9') return c.charCodeAt(0) - '0'.charCodeAt(0);\n        else if ('A' <= c && c <= 'Z') return c.charCodeAt(0) - 'A'.charCodeAt(0) + 10;\n        else switch(c){\n            case '\\u0020':\n                return 36;\n            case '$':\n                return 37;\n            case '%':\n                return 38;\n            case '*':\n                return 39;\n            case '+':\n                return 40;\n            case '-':\n                return 41;\n            case '.':\n                return 42;\n            case '/':\n                return 43;\n            case ':':\n                return 44;\n            default:\n                throw 'illegal char :' + c;\n        }\n    };\n    return _this;\n};\n//---------------------------------------------------------------------\n// qr8BitByte\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$qr8BitByte = function(data) {\n    const _mode = $bd33f692cf9f4068$var$QRMode.MODE_8BIT_BYTE;\n    const _data = data;\n    const _bytes = $bd33f692cf9f4068$export$5f3279733515fed0.stringToBytes(data);\n    const _this = {};\n    _this.getMode = function() {\n        return _mode;\n    };\n    _this.getLength = function(buffer) {\n        return _bytes.length;\n    };\n    _this.write = function(buffer) {\n        for(let i = 0; i < _bytes.length; i += 1)buffer.put(_bytes[i], 8);\n    };\n    return _this;\n};\n//---------------------------------------------------------------------\n// qrKanji\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$qrKanji = function(data) {\n    const _mode = $bd33f692cf9f4068$var$QRMode.MODE_KANJI;\n    const _data = data;\n    const stringToBytes = $bd33f692cf9f4068$export$5f3279733515fed0.stringToBytes;\n    !function(c, code) {\n        // self test for sjis support.\n        const test = stringToBytes(c);\n        if (test.length != 2 || (test[0] << 8 | test[1]) != code) throw 'sjis not supported.';\n    }('\\u53cb', 0x9746);\n    const _bytes = stringToBytes(data);\n    const _this = {};\n    _this.getMode = function() {\n        return _mode;\n    };\n    _this.getLength = function(buffer) {\n        return ~~(_bytes.length / 2);\n    };\n    _this.write = function(buffer) {\n        const data = _bytes;\n        let i = 0;\n        while(i + 1 < data.length){\n            let c = (0xff & data[i]) << 8 | 0xff & data[i + 1];\n            if (0x8140 <= c && c <= 0x9FFC) c -= 0x8140;\n            else if (0xE040 <= c && c <= 0xEBBF) c -= 0xC140;\n            else throw 'illegal char at ' + (i + 1) + '/' + c;\n            c = (c >>> 8 & 0xff) * 0xC0 + (c & 0xff);\n            buffer.put(c, 13);\n            i += 2;\n        }\n        if (i < data.length) throw 'illegal char at ' + (i + 1);\n    };\n    return _this;\n};\n//=====================================================================\n// GIF Support etc.\n//\n//---------------------------------------------------------------------\n// byteArrayOutputStream\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$byteArrayOutputStream = function() {\n    const _bytes = [];\n    const _this = {};\n    _this.writeByte = function(b) {\n        _bytes.push(b & 0xff);\n    };\n    _this.writeShort = function(i) {\n        _this.writeByte(i);\n        _this.writeByte(i >>> 8);\n    };\n    _this.writeBytes = function(b, off, len) {\n        off = off || 0;\n        len = len || b.length;\n        for(let i = 0; i < len; i += 1)_this.writeByte(b[i + off]);\n    };\n    _this.writeString = function(s) {\n        for(let i = 0; i < s.length; i += 1)_this.writeByte(s.charCodeAt(i));\n    };\n    _this.toByteArray = function() {\n        return _bytes;\n    };\n    _this.toString = function() {\n        let s = '';\n        s += '[';\n        for(let i = 0; i < _bytes.length; i += 1){\n            if (i > 0) s += ',';\n            s += _bytes[i];\n        }\n        s += ']';\n        return s;\n    };\n    return _this;\n};\n//---------------------------------------------------------------------\n// base64EncodeOutputStream\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$base64EncodeOutputStream = function() {\n    let _buffer = 0;\n    let _buflen = 0;\n    let _length = 0;\n    let _base64 = '';\n    const _this = {};\n    const writeEncoded = function(b) {\n        _base64 += String.fromCharCode(encode(b & 0x3f));\n    };\n    const encode = function(n) {\n        if (n < 0) throw 'n:' + n;\n        else if (n < 26) return 0x41 + n;\n        else if (n < 52) return 0x61 + (n - 26);\n        else if (n < 62) return 0x30 + (n - 52);\n        else if (n == 62) return 0x2b;\n        else if (n == 63) return 0x2f;\n        else throw 'n:' + n;\n    };\n    _this.writeByte = function(n) {\n        _buffer = _buffer << 8 | n & 0xff;\n        _buflen += 8;\n        _length += 1;\n        while(_buflen >= 6){\n            writeEncoded(_buffer >>> _buflen - 6);\n            _buflen -= 6;\n        }\n    };\n    _this.flush = function() {\n        if (_buflen > 0) {\n            writeEncoded(_buffer << 6 - _buflen);\n            _buffer = 0;\n            _buflen = 0;\n        }\n        if (_length % 3 != 0) {\n            // padding\n            const padlen = 3 - _length % 3;\n            for(let i = 0; i < padlen; i += 1)_base64 += '=';\n        }\n    };\n    _this.toString = function() {\n        return _base64;\n    };\n    return _this;\n};\n//---------------------------------------------------------------------\n// base64DecodeInputStream\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$base64DecodeInputStream = function(str) {\n    const _str = str;\n    let _pos = 0;\n    let _buffer = 0;\n    let _buflen = 0;\n    const _this = {};\n    _this.read = function() {\n        while(_buflen < 8){\n            if (_pos >= _str.length) {\n                if (_buflen == 0) return -1;\n                throw 'unexpected end of file./' + _buflen;\n            }\n            const c = _str.charAt(_pos);\n            _pos += 1;\n            if (c == '=') {\n                _buflen = 0;\n                return -1;\n            } else if (c.match(/^\\s$/)) continue;\n            _buffer = _buffer << 6 | decode(c.charCodeAt(0));\n            _buflen += 6;\n        }\n        const n = _buffer >>> _buflen - 8 & 0xff;\n        _buflen -= 8;\n        return n;\n    };\n    const decode = function(c) {\n        if (0x41 <= c && c <= 0x5a) return c - 0x41;\n        else if (0x61 <= c && c <= 0x7a) return c - 0x61 + 26;\n        else if (0x30 <= c && c <= 0x39) return c - 0x30 + 52;\n        else if (c == 0x2b) return 62;\n        else if (c == 0x2f) return 63;\n        else throw 'c:' + c;\n    };\n    return _this;\n};\n//---------------------------------------------------------------------\n// gifImage (B/W)\n//---------------------------------------------------------------------\nconst $bd33f692cf9f4068$var$gifImage = function(width, height) {\n    const _width = width;\n    const _height = height;\n    const _data = new Array(width * height);\n    const _this = {};\n    _this.setPixel = function(x, y, pixel) {\n        _data[y * _width + x] = pixel;\n    };\n    _this.write = function(out) {\n        //---------------------------------\n        // GIF Signature\n        out.writeString('GIF87a');\n        //---------------------------------\n        // Screen Descriptor\n        out.writeShort(_width);\n        out.writeShort(_height);\n        out.writeByte(0x80); // 2bit\n        out.writeByte(0);\n        out.writeByte(0);\n        //---------------------------------\n        // Global Color Map\n        // black\n        out.writeByte(0x00);\n        out.writeByte(0x00);\n        out.writeByte(0x00);\n        // white\n        out.writeByte(0xff);\n        out.writeByte(0xff);\n        out.writeByte(0xff);\n        //---------------------------------\n        // Image Descriptor\n        out.writeString(',');\n        out.writeShort(0);\n        out.writeShort(0);\n        out.writeShort(_width);\n        out.writeShort(_height);\n        out.writeByte(0);\n        //---------------------------------\n        // Local Color Map\n        //---------------------------------\n        // Raster Data\n        const lzwMinCodeSize = 2;\n        const raster = getLZWRaster(lzwMinCodeSize);\n        out.writeByte(lzwMinCodeSize);\n        let offset = 0;\n        while(raster.length - offset > 255){\n            out.writeByte(255);\n            out.writeBytes(raster, offset, 255);\n            offset += 255;\n        }\n        out.writeByte(raster.length - offset);\n        out.writeBytes(raster, offset, raster.length - offset);\n        out.writeByte(0x00);\n        //---------------------------------\n        // GIF Terminator\n        out.writeString(';');\n    };\n    const bitOutputStream = function(out) {\n        const _out = out;\n        let _bitLength = 0;\n        let _bitBuffer = 0;\n        const _this = {};\n        _this.write = function(data, length) {\n            if (data >>> length != 0) throw 'length over';\n            while(_bitLength + length >= 8){\n                _out.writeByte(0xff & (data << _bitLength | _bitBuffer));\n                length -= 8 - _bitLength;\n                data >>>= 8 - _bitLength;\n                _bitBuffer = 0;\n                _bitLength = 0;\n            }\n            _bitBuffer = data << _bitLength | _bitBuffer;\n            _bitLength = _bitLength + length;\n        };\n        _this.flush = function() {\n            if (_bitLength > 0) _out.writeByte(_bitBuffer);\n        };\n        return _this;\n    };\n    const getLZWRaster = function(lzwMinCodeSize) {\n        const clearCode = 1 << lzwMinCodeSize;\n        const endCode = (1 << lzwMinCodeSize) + 1;\n        let bitLength = lzwMinCodeSize + 1;\n        // Setup LZWTable\n        const table = lzwTable();\n        for(let i = 0; i < clearCode; i += 1)table.add(String.fromCharCode(i));\n        table.add(String.fromCharCode(clearCode));\n        table.add(String.fromCharCode(endCode));\n        const byteOut = $bd33f692cf9f4068$var$byteArrayOutputStream();\n        const bitOut = bitOutputStream(byteOut);\n        // clear code\n        bitOut.write(clearCode, bitLength);\n        let dataIndex = 0;\n        let s = String.fromCharCode(_data[dataIndex]);\n        dataIndex += 1;\n        while(dataIndex < _data.length){\n            const c = String.fromCharCode(_data[dataIndex]);\n            dataIndex += 1;\n            if (table.contains(s + c)) s = s + c;\n            else {\n                bitOut.write(table.indexOf(s), bitLength);\n                if (table.size() < 0xfff) {\n                    if (table.size() == 1 << bitLength) bitLength += 1;\n                    table.add(s + c);\n                }\n                s = c;\n            }\n        }\n        bitOut.write(table.indexOf(s), bitLength);\n        // end code\n        bitOut.write(endCode, bitLength);\n        bitOut.flush();\n        return byteOut.toByteArray();\n    };\n    const lzwTable = function() {\n        const _map = {};\n        let _size = 0;\n        const _this = {};\n        _this.add = function(key) {\n            if (_this.contains(key)) throw 'dup key:' + key;\n            _map[key] = _size;\n            _size += 1;\n        };\n        _this.size = function() {\n            return _size;\n        };\n        _this.indexOf = function(key) {\n            return _map[key];\n        };\n        _this.contains = function(key) {\n            return typeof _map[key] != 'undefined';\n        };\n        return _this;\n    };\n    return _this;\n};\nconst $bd33f692cf9f4068$var$createDataURL = function(width, height, getPixel) {\n    const gif = $bd33f692cf9f4068$var$gifImage(width, height);\n    for(let y = 0; y < height; y += 1)for(let x = 0; x < width; x += 1)gif.setPixel(x, y, getPixel(x, y));\n    const b = $bd33f692cf9f4068$var$byteArrayOutputStream();\n    gif.write(b);\n    const base64 = $bd33f692cf9f4068$var$base64EncodeOutputStream();\n    const bytes = b.toByteArray();\n    for(let i = 0; i < bytes.length; i += 1)base64.writeByte(bytes[i]);\n    base64.flush();\n    return 'data:image/gif;base64,' + base64;\n};\nvar $bd33f692cf9f4068$export$2e2bcd8739ae039 = $bd33f692cf9f4068$export$5f3279733515fed0;\nconst $bd33f692cf9f4068$export$c8dd6bc66a63753c = $bd33f692cf9f4068$export$5f3279733515fed0.stringToBytes;\n\n\n// packages/collapse/src/index.js\nfunction $21b57f0df60ff3c3$export$ec45920981e0ca9b(Alpine) {\n    Alpine.directive(\"collapse\", collapse);\n    collapse.inline = (el, { modifiers: modifiers })=>{\n        if (!modifiers.includes(\"min\")) return;\n        el._x_doShow = ()=>{};\n        el._x_doHide = ()=>{};\n    };\n    function collapse(el, { modifiers: modifiers }) {\n        let duration = $21b57f0df60ff3c3$var$modifierValue(modifiers, \"duration\", 250) / 1e3;\n        let floor = $21b57f0df60ff3c3$var$modifierValue(modifiers, \"min\", 0);\n        let fullyHide = !modifiers.includes(\"min\");\n        if (!el._x_isShown) el.style.height = `${floor}px`;\n        if (!el._x_isShown && fullyHide) el.hidden = true;\n        if (!el._x_isShown) el.style.overflow = \"hidden\";\n        let setFunction = (el2, styles)=>{\n            let revertFunction = Alpine.setStyles(el2, styles);\n            return styles.height ? ()=>{} : revertFunction;\n        };\n        let transitionStyles = {\n            transitionProperty: \"height\",\n            transitionDuration: `${duration}s`,\n            transitionTimingFunction: \"cubic-bezier(0.4, 0.0, 0.2, 1)\"\n        };\n        el._x_transition = {\n            in (before = ()=>{}, after = ()=>{}) {\n                if (fullyHide) el.hidden = false;\n                if (fullyHide) el.style.display = null;\n                let current = el.getBoundingClientRect().height;\n                el.style.height = \"auto\";\n                let full = el.getBoundingClientRect().height;\n                if (current === full) current = floor;\n                Alpine.transition(el, Alpine.setStyles, {\n                    during: transitionStyles,\n                    start: {\n                        height: current + \"px\"\n                    },\n                    end: {\n                        height: full + \"px\"\n                    }\n                }, ()=>el._x_isShown = true, ()=>{\n                    if (Math.abs(el.getBoundingClientRect().height - full) < 1) el.style.overflow = null;\n                });\n            },\n            out (before = ()=>{}, after = ()=>{}) {\n                let full = el.getBoundingClientRect().height;\n                Alpine.transition(el, setFunction, {\n                    during: transitionStyles,\n                    start: {\n                        height: full + \"px\"\n                    },\n                    end: {\n                        height: floor + \"px\"\n                    }\n                }, ()=>el.style.overflow = \"hidden\", ()=>{\n                    el._x_isShown = false;\n                    if (el.style.height == `${floor}px` && fullyHide) {\n                        el.style.display = \"none\";\n                        el.hidden = true;\n                    }\n                });\n            }\n        };\n    }\n}\nfunction $21b57f0df60ff3c3$var$modifierValue(modifiers, key, fallback) {\n    if (modifiers.indexOf(key) === -1) return fallback;\n    const rawValue = modifiers[modifiers.indexOf(key) + 1];\n    if (!rawValue) return fallback;\n    if (key === \"duration\") {\n        let match = rawValue.match(/([0-9]+)ms/);\n        if (match) return match[1];\n    }\n    if (key === \"min\") {\n        let match = rawValue.match(/([0-9]+)px/);\n        if (match) return match[1];\n    }\n    return rawValue;\n}\n// packages/collapse/builds/module.js\nvar $21b57f0df60ff3c3$export$2e2bcd8739ae039 = $21b57f0df60ff3c3$export$ec45920981e0ca9b;\n\n\n\nvar $ojnWK = parcelRequire(\"ojnWK\");\n// packages/intersect/src/index.js\nfunction $d09a060543d6a2e2$export$1f4807a235930d45(Alpine) {\n    Alpine.directive(\"intersect\", Alpine.skipDuringClone((el, { value: value, expression: expression, modifiers: modifiers }, { evaluateLater: evaluateLater, cleanup: cleanup })=>{\n        let evaluate = evaluateLater(expression);\n        let threshold = $d09a060543d6a2e2$var$getThreshold(modifiers);\n        let options = {\n            rootMargin: $d09a060543d6a2e2$var$getRootMargin(modifiers),\n            threshold: threshold,\n            root: modifiers.includes(\"parent\") ? el.parentElement : null\n        };\n        if (modifiers.includes(\"dwell\")) {\n            $d09a060543d6a2e2$var$observeForDwell(el, value, modifiers, evaluate, cleanup, options, threshold);\n            return;\n        }\n        let observer = new IntersectionObserver((entries)=>{\n            entries.forEach((entry)=>{\n                if (entry.isIntersecting === (value === \"leave\")) return;\n                evaluate();\n                modifiers.includes(\"once\") && observer.disconnect();\n            });\n        }, options);\n        observer.observe(el);\n        cleanup(()=>{\n            observer.disconnect();\n        });\n    }));\n}\nfunction $d09a060543d6a2e2$var$observeForDwell(el, value, modifiers, evaluate, cleanup, options, threshold) {\n    let dwellTimeout;\n    let lastEntry;\n    let hasEvaluated = false;\n    let isConfirmingDwell = false;\n    let duration = $d09a060543d6a2e2$var$getDwellDuration(modifiers);\n    let observer;\n    let clearDwellTimeout = ()=>{\n        clearTimeout(dwellTimeout);\n        dwellTimeout = void 0;\n    };\n    let completeDwell = ()=>{\n        isConfirmingDwell = false;\n        if (!lastEntry || document.hidden || !$d09a060543d6a2e2$var$meetsDwellThreshold(lastEntry, value, threshold)) return;\n        hasEvaluated = true;\n        evaluate();\n        if (modifiers.includes(\"once\")) {\n            observer.disconnect();\n            document.removeEventListener(\"visibilitychange\", handleVisibilityChange);\n        }\n    };\n    let observe = ()=>{\n        observer && observer.disconnect();\n        observer = new IntersectionObserver(handleEntries, options);\n        observer.observe(el);\n    };\n    let confirmDwell = ()=>{\n        dwellTimeout = void 0;\n        if (document.hidden) return;\n        let pendingEntries = observer.takeRecords();\n        if (pendingEntries.some((entry)=>!$d09a060543d6a2e2$var$meetsDwellThreshold(entry, value, threshold))) {\n            handleEntries(pendingEntries);\n            return;\n        }\n        isConfirmingDwell = true;\n        lastEntry = void 0;\n        observe();\n    };\n    let beginDwell = ()=>{\n        if (dwellTimeout !== void 0 || hasEvaluated || document.hidden || !lastEntry) return;\n        if (!$d09a060543d6a2e2$var$meetsDwellThreshold(lastEntry, value, threshold)) return;\n        dwellTimeout = setTimeout(confirmDwell, duration);\n    };\n    let handleEntries = (entries)=>{\n        entries.forEach((entry)=>{\n            lastEntry = entry;\n            if (!$d09a060543d6a2e2$var$meetsDwellThreshold(entry, value, threshold)) {\n                clearDwellTimeout();\n                hasEvaluated = false;\n                isConfirmingDwell = false;\n                return;\n            }\n            if (isConfirmingDwell) {\n                completeDwell();\n                return;\n            }\n            beginDwell();\n        });\n    };\n    let handleVisibilityChange = ()=>{\n        if (document.hidden) {\n            clearDwellTimeout();\n            lastEntry = void 0;\n            hasEvaluated = false;\n            isConfirmingDwell = false;\n            observer.disconnect();\n            return;\n        }\n        observe();\n    };\n    observe();\n    document.addEventListener(\"visibilitychange\", handleVisibilityChange);\n    cleanup(()=>{\n        clearDwellTimeout();\n        observer.disconnect();\n        document.removeEventListener(\"visibilitychange\", handleVisibilityChange);\n    });\n}\nfunction $d09a060543d6a2e2$var$meetsDwellThreshold(entry, value, threshold) {\n    let meetsThreshold = threshold === 0 ? entry.isIntersecting : entry.isIntersecting && entry.intersectionRatio >= threshold;\n    return value === \"leave\" ? !meetsThreshold : meetsThreshold;\n}\nfunction $d09a060543d6a2e2$var$getDwellDuration(modifiers) {\n    let rawDuration = modifiers[modifiers.indexOf(\"dwell\") + 1] || \"\";\n    let match = rawDuration.match(/^([0-9]+)(ms)?$/);\n    return match ? Number(match[1]) : 250;\n}\nfunction $d09a060543d6a2e2$var$getThreshold(modifiers) {\n    if (modifiers.includes(\"full\")) return 0.99;\n    if (modifiers.includes(\"half\")) return 0.5;\n    if (!modifiers.includes(\"threshold\")) return 0;\n    let threshold = modifiers[modifiers.indexOf(\"threshold\") + 1];\n    if (threshold === \"100\") return 1;\n    if (threshold === \"0\") return 0;\n    return Number(`.${threshold}`);\n}\nfunction $d09a060543d6a2e2$var$getLengthValue(rawValue) {\n    let match = rawValue.match(/^(-?[0-9]+)(px|%)?$/);\n    return match ? match[1] + (match[2] || \"px\") : void 0;\n}\nfunction $d09a060543d6a2e2$var$getRootMargin(modifiers) {\n    const key = \"margin\";\n    const fallback = \"0px 0px 0px 0px\";\n    const index = modifiers.indexOf(key);\n    if (index === -1) return fallback;\n    let values = [];\n    for(let i = 1; i < 5; i++)values.push($d09a060543d6a2e2$var$getLengthValue(modifiers[index + i] || \"\"));\n    values = values.filter((v)=>v !== void 0);\n    return values.length ? values.join(\" \").trim() : fallback;\n}\n// packages/intersect/builds/module.js\nvar $d09a060543d6a2e2$export$2e2bcd8739ae039 = $d09a060543d6a2e2$export$1f4807a235930d45;\n\n\n// packages/mask/src/index.js\nfunction $cf417a97d74b93bb$export$d99f0801a68bbcf1(Alpine) {\n    Alpine.directive(\"mask\", (el, { value: value, expression: expression }, { effect: effect, evaluateLater: evaluateLater, cleanup: cleanup })=>{\n        let templateFn = ()=>expression;\n        let lastInputValue = \"\";\n        let undoModelUpdate = ()=>{};\n        queueMicrotask(()=>{\n            if ([\n                \"function\",\n                \"dynamic\"\n            ].includes(value)) {\n                let evaluator = evaluateLater(expression);\n                effect(()=>{\n                    templateFn = (input)=>{\n                        let result;\n                        Alpine.dontAutoEvaluateFunctions(()=>{\n                            evaluator((value2)=>{\n                                result = typeof value2 === \"function\" ? value2(input) : value2;\n                            }, {\n                                scope: {\n                                    // These are \"magics\" we'll make available to the x-mask:function:\n                                    \"$input\": input,\n                                    \"$money\": $cf417a97d74b93bb$var$formatMoney.bind({\n                                        el: el\n                                    })\n                                }\n                            });\n                        });\n                        return result;\n                    };\n                    processInputValue(el, false);\n                });\n            } else processInputValue(el, false);\n            if (el._x_model) {\n                if (el._x_model.get() !== el.value) {\n                    if (!(el._x_model.get() === null && el.value === \"\")) el._x_model.set(el.value);\n                }\n                let updater = el._x_forceModelUpdate;\n                let update = (value2)=>{\n                    if (value2 === void 0) {\n                        lastInputValue = \"\";\n                        return updater(value2);\n                    }\n                    value2 = String(value2);\n                    let template = templateFn(value2);\n                    if (template && template !== \"false\") value2 = $cf417a97d74b93bb$export$193046f9d1fa1ed1(template, value2);\n                    lastInputValue = value2;\n                    updater(value2);\n                    el._x_model.set(value2);\n                };\n                el._x_forceModelUpdate = update;\n                undoModelUpdate = ()=>{\n                    if (el._x_forceModelUpdate === update) el._x_forceModelUpdate = updater;\n                };\n            }\n        });\n        const controller = new AbortController();\n        cleanup(()=>{\n            controller.abort();\n            undoModelUpdate();\n        });\n        el.addEventListener(\"input\", ()=>processInputValue(el), {\n            signal: controller.signal,\n            // Setting this as a capture phase listener to ensure it runs\n            // before wire:model or x-model added as a latent binding...\n            capture: true\n        });\n        el.addEventListener(\"blur\", ()=>processInputValue(el, false), {\n            signal: controller.signal\n        });\n        function processInputValue(el2, shouldRestoreCursor = true) {\n            let input = el2.value;\n            let template = templateFn(input);\n            if (!template || template === \"false\") return false;\n            if (lastInputValue.length - el2.value.length === 1) return lastInputValue = el2.value;\n            let setInput = ()=>{\n                lastInputValue = el2.value = $cf417a97d74b93bb$export$193046f9d1fa1ed1(template, input);\n            };\n            if (shouldRestoreCursor) $cf417a97d74b93bb$var$restoreCursorPosition(el2, template, ()=>{\n                setInput();\n            });\n            else setInput();\n        }\n    }).before(\"model\");\n}\nfunction $cf417a97d74b93bb$var$restoreCursorPosition(el, template, callback) {\n    let cursorPosition = el.selectionStart;\n    let unformattedValue = el.value;\n    callback();\n    let beforeLeftOfCursorBeforeFormatting = unformattedValue.slice(0, cursorPosition);\n    let newPosition = $cf417a97d74b93bb$export$193046f9d1fa1ed1(template, beforeLeftOfCursorBeforeFormatting).length;\n    el.setSelectionRange(newPosition, newPosition);\n}\nvar $cf417a97d74b93bb$var$regexes = {\n    \"9\": /[0-9]/,\n    \"a\": /[a-zA-Z]/,\n    \"*\": /[a-zA-Z0-9]/\n};\nfunction $cf417a97d74b93bb$export$193046f9d1fa1ed1(template, input) {\n    let templateMark = 0;\n    let inputMark = 0;\n    let output = \"\";\n    while(templateMark < template.length && inputMark < input.length){\n        let templateChar = template[templateMark];\n        let inputChar = input[inputMark];\n        if (templateChar in $cf417a97d74b93bb$var$regexes) {\n            if ($cf417a97d74b93bb$var$regexes[templateChar].test(inputChar)) {\n                output += inputChar;\n                templateMark++;\n            }\n            inputMark++;\n        } else {\n            output += templateChar;\n            templateMark++;\n            if (templateChar === input[inputMark]) inputMark++;\n        }\n    }\n    return output;\n}\nfunction $cf417a97d74b93bb$var$formatMoney(input, delimiter = \".\", thousands, precision = 2) {\n    if (input === \"-\") return \"-\";\n    if (/^\\D+$/.test(input)) return \"9\";\n    if (thousands === null || thousands === void 0) thousands = delimiter === \",\" ? \".\" : \",\";\n    let addThousands = (input2, thousands2)=>{\n        let output = \"\";\n        let counter = 0;\n        for(let i = input2.length - 1; i >= 0; i--){\n            if (input2[i] === thousands2) continue;\n            if (counter === 3) {\n                output = input2[i] + thousands2 + output;\n                counter = 0;\n            } else output = input2[i] + output;\n            counter++;\n        }\n        return output;\n    };\n    let minus = input.startsWith(\"-\") ? \"-\" : \"\";\n    let strippedInput = input.replaceAll(new RegExp(`[^0-9\\\\${delimiter}]`, \"g\"), \"\");\n    let template = Array.from({\n        length: strippedInput.split(delimiter)[0].length\n    }).fill(\"9\").join(\"\");\n    template = `${minus}${addThousands(template, thousands)}`;\n    if (precision > 0 && input.includes(delimiter)) template += `${delimiter}` + \"9\".repeat(precision);\n    queueMicrotask(()=>{\n        if (this.el.value.endsWith(delimiter)) return;\n        if (this.el.value[this.el.selectionStart - 1] === delimiter) this.el.setSelectionRange(this.el.selectionStart - 1, this.el.selectionStart - 1);\n    });\n    return template;\n}\n// packages/mask/builds/module.js\nvar $cf417a97d74b93bb$export$2e2bcd8739ae039 = $cf417a97d74b93bb$export$d99f0801a68bbcf1;\n\n\n// packages/morph/src/morph.js\nfunction $85572a2cec6fb903$var$morph(from, toHtml, options) {\n    $85572a2cec6fb903$var$monkeyPatchDomSetAttributeToAllowAtSymbols();\n    let context = $85572a2cec6fb903$var$createMorphContext(options);\n    let toEl = typeof toHtml === \"string\" ? $85572a2cec6fb903$var$createElement(toHtml) : toHtml;\n    if (window.Alpine && window.Alpine.closestDataStack && !from._x_dataStack) {\n        toEl._x_dataStack = window.Alpine.closestDataStack(from);\n        toEl._x_dataStack && window.Alpine.cloneNode(from, toEl);\n    }\n    context.patch(from, toEl);\n    return from;\n}\nfunction $85572a2cec6fb903$var$morphBetween(startMarker, endMarker, toHtml, options = {}) {\n    $85572a2cec6fb903$var$monkeyPatchDomSetAttributeToAllowAtSymbols();\n    let context = $85572a2cec6fb903$var$createMorphContext(options);\n    let fromContainer = startMarker.parentNode;\n    let fromBlock = new $85572a2cec6fb903$var$Block(startMarker, endMarker);\n    let toContainer = typeof toHtml === \"string\" ? (()=>{\n        let container = document.createElement(\"div\");\n        container.insertAdjacentHTML(\"beforeend\", toHtml);\n        return container;\n    })() : toHtml;\n    let toStartMarker = document.createComment(\"[morph-start]\");\n    let toEndMarker = document.createComment(\"[morph-end]\");\n    toContainer.insertBefore(toStartMarker, toContainer.firstChild);\n    toContainer.appendChild(toEndMarker);\n    let toBlock = new $85572a2cec6fb903$var$Block(toStartMarker, toEndMarker);\n    if (window.Alpine && window.Alpine.closestDataStack) {\n        toContainer._x_dataStack = window.Alpine.closestDataStack(fromContainer);\n        toContainer._x_dataStack && window.Alpine.cloneNode(fromContainer, toContainer);\n    }\n    context.patchChildren(fromBlock, toBlock);\n}\nfunction $85572a2cec6fb903$var$createMorphContext(options = {}) {\n    let defaultGetKey = (el)=>el.getAttribute(\"key\");\n    let noop = ()=>{};\n    let context = {\n        key: options.key || defaultGetKey,\n        lookahead: options.lookahead || false,\n        updating: options.updating || noop,\n        updated: options.updated || noop,\n        removing: options.removing || noop,\n        removed: options.removed || noop,\n        adding: options.adding || noop,\n        added: options.added || noop\n    };\n    context.patch = function(from, to) {\n        if (context.differentElementNamesTypesOrKeys(from, to)) return context.swapElements(from, to);\n        let updateChildrenOnly = false;\n        let skipChildren = false;\n        let skipUntil = (predicate)=>context.skipUntilCondition = predicate;\n        if ($85572a2cec6fb903$var$shouldSkipChildren(context.updating, ()=>skipChildren = true, skipUntil, from, to, ()=>updateChildrenOnly = true)) return;\n        if (from.nodeType === 1 && window.Alpine) {\n            window.Alpine.cloneNode(from, to);\n            if (from._x_teleport && to._x_teleport) context.patch(from._x_teleport, to._x_teleport);\n        }\n        if ($85572a2cec6fb903$var$textOrComment(to)) {\n            context.patchNodeValue(from, to);\n            context.updated(from, to);\n            return;\n        }\n        if (!updateChildrenOnly) context.patchAttributes(from, to);\n        context.updated(from, to);\n        if (!skipChildren) context.patchChildren(from, to);\n    };\n    context.differentElementNamesTypesOrKeys = function(from, to) {\n        return from.nodeType != to.nodeType || from.nodeName != to.nodeName || context.getKey(from) != context.getKey(to);\n    };\n    context.swapElements = function(from, to) {\n        if ($85572a2cec6fb903$var$shouldSkip(context.removing, from)) return;\n        let toCloned = to.cloneNode(true);\n        if ($85572a2cec6fb903$var$shouldSkip(context.adding, toCloned)) return;\n        from.replaceWith(toCloned);\n        context.removed(from);\n        context.added(toCloned);\n    };\n    context.patchNodeValue = function(from, to) {\n        let value = to.nodeValue;\n        if (from.nodeValue !== value) from.nodeValue = value;\n    };\n    context.patchAttributes = function(from, to) {\n        if (from._x_transitioning) return;\n        if (from._x_isShown && !to._x_isShown) return;\n        if (!from._x_isShown && to._x_isShown) return;\n        let domAttributes = Array.from(from.attributes);\n        let toAttributes = Array.from(to.attributes);\n        for(let i = domAttributes.length - 1; i >= 0; i--){\n            let name = domAttributes[i].name;\n            if (!to.hasAttribute(name)) {\n                if (name === \"open\" && from.nodeName === \"DIALOG\" && from.open) from.close();\n                else from.removeAttribute(name);\n            }\n        }\n        for(let i = toAttributes.length - 1; i >= 0; i--){\n            let name = toAttributes[i].name;\n            let value = toAttributes[i].value;\n            if (from.getAttribute(name) !== value) from.setAttribute(name, value);\n        }\n    };\n    context.patchChildren = function(from, to) {\n        let fromKeys = context.keyToMap(from.children);\n        let fromKeyHoldovers = {};\n        let currentTo = $85572a2cec6fb903$var$getFirstNode(to);\n        let currentFrom = $85572a2cec6fb903$var$getFirstNode(from);\n        while(currentTo){\n            $85572a2cec6fb903$var$seedingMatchingId(currentTo, currentFrom);\n            let toKey = context.getKey(currentTo);\n            let fromKey = context.getKey(currentFrom);\n            if (context.skipUntilCondition) {\n                let fromDone = !currentFrom || context.skipUntilCondition(currentFrom);\n                let toDone = !currentTo || context.skipUntilCondition(currentTo);\n                if (fromDone && toDone) context.skipUntilCondition = null;\n                else {\n                    if (!fromDone) currentFrom = currentFrom && $85572a2cec6fb903$var$getNextSibling(from, currentFrom);\n                    if (!toDone) currentTo = currentTo && $85572a2cec6fb903$var$getNextSibling(to, currentTo);\n                    continue;\n                }\n            }\n            if (!currentFrom) {\n                if (toKey && fromKeyHoldovers[toKey]) {\n                    let holdover = fromKeyHoldovers[toKey];\n                    from.appendChild(holdover);\n                    currentFrom = holdover;\n                    fromKey = context.getKey(currentFrom);\n                } else {\n                    if (!$85572a2cec6fb903$var$shouldSkip(context.adding, currentTo)) {\n                        let clone = currentTo.cloneNode(true);\n                        from.appendChild(clone);\n                        context.added(clone);\n                    }\n                    currentTo = $85572a2cec6fb903$var$getNextSibling(to, currentTo);\n                    continue;\n                }\n            }\n            let isIf = (node)=>node && node.nodeType === 8 && node.textContent === \"[if BLOCK]><![endif]\";\n            let isEnd = (node)=>node && node.nodeType === 8 && node.textContent === \"[if ENDBLOCK]><![endif]\";\n            if (isIf(currentTo) && isIf(currentFrom)) {\n                let nestedIfCount = 0;\n                let fromBlockStart = currentFrom;\n                while(currentFrom){\n                    let next = $85572a2cec6fb903$var$getNextSibling(from, currentFrom);\n                    if (isIf(next)) nestedIfCount++;\n                    else if (isEnd(next) && nestedIfCount > 0) nestedIfCount--;\n                    else if (isEnd(next) && nestedIfCount === 0) {\n                        currentFrom = next;\n                        break;\n                    }\n                    currentFrom = next;\n                }\n                let fromBlockEnd = currentFrom;\n                nestedIfCount = 0;\n                let toBlockStart = currentTo;\n                while(currentTo){\n                    let next = $85572a2cec6fb903$var$getNextSibling(to, currentTo);\n                    if (isIf(next)) nestedIfCount++;\n                    else if (isEnd(next) && nestedIfCount > 0) nestedIfCount--;\n                    else if (isEnd(next) && nestedIfCount === 0) {\n                        currentTo = next;\n                        break;\n                    }\n                    currentTo = next;\n                }\n                let toBlockEnd = currentTo;\n                let fromBlock = new $85572a2cec6fb903$var$Block(fromBlockStart, fromBlockEnd);\n                let toBlock = new $85572a2cec6fb903$var$Block(toBlockStart, toBlockEnd);\n                context.patchChildren(fromBlock, toBlock);\n                continue;\n            }\n            if (currentFrom.nodeType === 1 && context.lookahead && !currentFrom.isEqualNode(currentTo)) {\n                let nextToElementSibling = $85572a2cec6fb903$var$getNextSibling(to, currentTo);\n                let found = false;\n                while(!found && nextToElementSibling){\n                    if (nextToElementSibling.nodeType === 1 && currentFrom.isEqualNode(nextToElementSibling)) {\n                        found = true;\n                        currentFrom = context.addNodeBefore(from, currentTo, currentFrom);\n                        fromKey = context.getKey(currentFrom);\n                    }\n                    nextToElementSibling = $85572a2cec6fb903$var$getNextSibling(to, nextToElementSibling);\n                }\n            }\n            if (toKey !== fromKey) {\n                if (!toKey && fromKey) {\n                    fromKeyHoldovers[fromKey] = currentFrom;\n                    currentFrom = context.addNodeBefore(from, currentTo, currentFrom);\n                    fromKeyHoldovers[fromKey].remove();\n                    currentFrom = $85572a2cec6fb903$var$getNextSibling(from, currentFrom);\n                    currentTo = $85572a2cec6fb903$var$getNextSibling(to, currentTo);\n                    continue;\n                }\n                if (toKey && !fromKey) {\n                    if (fromKeys[toKey]) {\n                        currentFrom.replaceWith(fromKeys[toKey]);\n                        currentFrom = fromKeys[toKey];\n                        fromKey = context.getKey(currentFrom);\n                    }\n                }\n                if (toKey && fromKey) {\n                    let fromKeyNode = fromKeys[toKey];\n                    if (fromKeyNode) {\n                        fromKeyHoldovers[fromKey] = currentFrom;\n                        currentFrom.replaceWith(fromKeyNode);\n                        currentFrom = fromKeyNode;\n                        fromKey = context.getKey(currentFrom);\n                    } else {\n                        fromKeyHoldovers[fromKey] = currentFrom;\n                        currentFrom = context.addNodeBefore(from, currentTo, currentFrom);\n                        fromKeyHoldovers[fromKey].remove();\n                        currentFrom = $85572a2cec6fb903$var$getNextSibling(from, currentFrom);\n                        currentTo = $85572a2cec6fb903$var$getNextSibling(to, currentTo);\n                        continue;\n                    }\n                }\n            }\n            let currentFromNext = currentFrom && $85572a2cec6fb903$var$getNextSibling(from, currentFrom);\n            context.patch(currentFrom, currentTo);\n            if (currentFrom._x_lastRenderedEl) currentFromNext = $85572a2cec6fb903$var$getNextSibling(from, currentFrom._x_lastRenderedEl);\n            currentTo = currentTo && $85572a2cec6fb903$var$getNextSibling(to, currentTo);\n            currentFrom = currentFromNext;\n        }\n        let removals = [];\n        while(currentFrom){\n            if (!$85572a2cec6fb903$var$shouldSkip(context.removing, currentFrom)) removals.push(currentFrom);\n            currentFrom = $85572a2cec6fb903$var$getNextSibling(from, currentFrom);\n        }\n        while(removals.length){\n            let domForRemoval = removals.shift();\n            domForRemoval.remove();\n            context.removed(domForRemoval);\n        }\n    };\n    context.getKey = function(el) {\n        return el && el.nodeType === 1 && context.key(el);\n    };\n    context.keyToMap = function(els) {\n        let map = {};\n        for (let el of els){\n            let theKey = context.getKey(el);\n            if (theKey) map[theKey] = el;\n        }\n        return map;\n    };\n    context.addNodeBefore = function(parent, node, beforeMe) {\n        if (!$85572a2cec6fb903$var$shouldSkip(context.adding, node)) {\n            let clone = node.cloneNode(true);\n            parent.insertBefore(clone, beforeMe);\n            context.added(clone);\n            return clone;\n        }\n        return node;\n    };\n    return context;\n}\n$85572a2cec6fb903$var$morph.step = ()=>{};\n$85572a2cec6fb903$var$morph.log = ()=>{};\nfunction $85572a2cec6fb903$var$shouldSkip(hook, ...args) {\n    let skip = false;\n    hook(...args, ()=>skip = true);\n    return skip;\n}\nfunction $85572a2cec6fb903$var$shouldSkipChildren(hook, skipChildren, skipUntil, ...args) {\n    let skip = false;\n    hook(...args, ()=>skip = true, skipChildren, skipUntil);\n    return skip;\n}\nvar $85572a2cec6fb903$var$patched = false;\nfunction $85572a2cec6fb903$var$createElement(html) {\n    const template = document.createElement(\"template\");\n    template.innerHTML = html;\n    return template.content.firstElementChild;\n}\nfunction $85572a2cec6fb903$var$textOrComment(el) {\n    return el.nodeType === 3 || el.nodeType === 8;\n}\nvar $85572a2cec6fb903$var$Block = class {\n    constructor(start, end){\n        this.startComment = start;\n        this.endComment = end;\n    }\n    get children() {\n        let children = [];\n        let currentNode = this.startComment.nextSibling;\n        while(currentNode && currentNode !== this.endComment){\n            children.push(currentNode);\n            currentNode = currentNode.nextSibling;\n        }\n        return children;\n    }\n    appendChild(child) {\n        this.endComment.before(child);\n    }\n    get firstChild() {\n        let first = this.startComment.nextSibling;\n        if (first === this.endComment) return;\n        return first;\n    }\n    nextNode(reference) {\n        let next = reference.nextSibling;\n        if (next === this.endComment) return;\n        return next;\n    }\n    insertBefore(newNode, reference) {\n        reference.before(newNode);\n        return newNode;\n    }\n};\nfunction $85572a2cec6fb903$var$getFirstNode(parent) {\n    return parent.firstChild;\n}\nfunction $85572a2cec6fb903$var$getNextSibling(parent, reference) {\n    let next;\n    if (parent instanceof $85572a2cec6fb903$var$Block) next = parent.nextNode(reference);\n    else next = reference.nextSibling;\n    return next;\n}\nfunction $85572a2cec6fb903$var$monkeyPatchDomSetAttributeToAllowAtSymbols() {\n    if ($85572a2cec6fb903$var$patched) return;\n    $85572a2cec6fb903$var$patched = true;\n    let original = Element.prototype.setAttribute;\n    let hostDiv = document.createElement(\"div\");\n    Element.prototype.setAttribute = function newSetAttribute(name, value) {\n        if (!name.includes(\"@\")) return original.call(this, name, value);\n        let escapedValue = value.replace(/&/g, \"&amp;\").replace(/\"/g, \"&quot;\");\n        hostDiv.innerHTML = `<span ${name}=\"${escapedValue}\"></span>`;\n        let attr = hostDiv.firstElementChild.getAttributeNode(name);\n        hostDiv.firstElementChild.removeAttributeNode(attr);\n        this.setAttributeNode(attr);\n    };\n}\nfunction $85572a2cec6fb903$var$seedingMatchingId(to, from) {\n    let fromId = from && from._x_bindings && from._x_bindings.id;\n    if (!fromId) return;\n    if (!to.setAttribute) return;\n    to.setAttribute(\"id\", fromId);\n    to.id = fromId;\n}\n// packages/morph/src/index.js\nfunction $85572a2cec6fb903$export$2e5e8c41f5d4e7c7(Alpine) {\n    Alpine.morph = $85572a2cec6fb903$var$morph;\n    Alpine.morphBetween = $85572a2cec6fb903$var$morphBetween;\n}\n// packages/morph/builds/module.js\nvar $85572a2cec6fb903$export$2e2bcd8739ae039 = $85572a2cec6fb903$export$2e5e8c41f5d4e7c7;\n\n\n// packages/persist/src/index.js\nfunction $dc5e95bf63b2a32e$export$9a6132153fba2e0(Alpine) {\n    let persist = ()=>{\n        let alias;\n        let storage;\n        try {\n            storage = localStorage;\n        } catch (e) {\n            console.error(e);\n            console.warn(\"Alpine: $persist is using temporary storage since localStorage is unavailable.\");\n            let dummy = /* @__PURE__ */ new Map();\n            storage = {\n                getItem: (key)=>dummy.has(key) ? dummy.get(key) : null,\n                setItem: dummy.set.bind(dummy)\n            };\n        }\n        return Alpine.interceptor((initialValue, getter, setter, path, key, cleanup = ()=>{})=>{\n            let lookup = alias || `_x_${path}`;\n            let initial = $dc5e95bf63b2a32e$var$storageHas(lookup, storage) ? $dc5e95bf63b2a32e$var$storageGet(lookup, storage) : initialValue;\n            setter(initial);\n            let effect = Alpine.effect(()=>{\n                let value = getter();\n                $dc5e95bf63b2a32e$var$storageSet(lookup, value, storage);\n                setter(value);\n            });\n            cleanup(()=>Alpine.release(effect));\n            return initial;\n        }, (func)=>{\n            func.as = (key)=>{\n                alias = key;\n                return func;\n            }, func.using = (target)=>{\n                storage = target;\n                return func;\n            };\n        });\n    };\n    Object.defineProperty(Alpine, \"$persist\", {\n        get: ()=>persist()\n    });\n    Alpine.magic(\"persist\", persist);\n    Alpine.persist = (key, { get: get, set: set }, storage = localStorage)=>{\n        let initial = $dc5e95bf63b2a32e$var$storageHas(key, storage) ? $dc5e95bf63b2a32e$var$storageGet(key, storage) : get();\n        set(initial);\n        Alpine.effect(()=>{\n            let value = get();\n            $dc5e95bf63b2a32e$var$storageSet(key, value, storage);\n            set(value);\n        });\n    };\n}\nfunction $dc5e95bf63b2a32e$var$storageHas(key, storage) {\n    let value = storage.getItem(key);\n    return value !== null && value !== void 0;\n}\nfunction $dc5e95bf63b2a32e$var$storageGet(key, storage) {\n    let value = storage.getItem(key);\n    if (value === void 0) return;\n    return JSON.parse(value);\n}\nfunction $dc5e95bf63b2a32e$var$storageSet(key, value, storage) {\n    if (value === void 0) {\n        storage.removeItem?.(key);\n        return;\n    }\n    storage.setItem(key, JSON.stringify(value));\n}\n// packages/persist/builds/module.js\nvar $dc5e95bf63b2a32e$export$2e2bcd8739ae039 = $dc5e95bf63b2a32e$export$9a6132153fba2e0;\n\n\n\nvar $a9mZZ = parcelRequire(\"a9mZZ\");\n// packages/ui/src/list-context.js\nfunction $182977f45aac8dca$var$generateContext(Alpine2, multiple, orientation, activateSelectedOrFirst) {\n    return {\n        /**\n     * Main state...\n     */ items: [],\n        activeKey: $182977f45aac8dca$var$switchboard(),\n        orderedKeys: [],\n        activatedByKeyPress: false,\n        /**\n     *  Initialization...\n     */ activateSelectedOrFirst: Alpine2.debounce(function() {\n            activateSelectedOrFirst(false);\n        }),\n        registerItemsQueue: [],\n        registerItem (key, el, value, disabled) {\n            if (this.registerItemsQueue.length === 0) queueMicrotask(()=>{\n                if (this.registerItemsQueue.length > 0) {\n                    this.items = this.items.concat(this.registerItemsQueue);\n                    this.registerItemsQueue = [];\n                    this.reorderKeys();\n                    this.activateSelectedOrFirst();\n                }\n            });\n            let item = {\n                key: key,\n                el: el,\n                value: value,\n                disabled: disabled\n            };\n            this.registerItemsQueue.push(item);\n        },\n        unregisterKeysQueue: [],\n        unregisterItem (key) {\n            if (this.unregisterKeysQueue.length === 0) queueMicrotask(()=>{\n                if (this.unregisterKeysQueue.length > 0) {\n                    this.items = this.items.filter((i)=>!this.unregisterKeysQueue.includes(i.key));\n                    this.orderedKeys = this.orderedKeys.filter((i)=>!this.unregisterKeysQueue.includes(i));\n                    this.unregisterKeysQueue = [];\n                    this.reorderKeys();\n                    this.activateSelectedOrFirst();\n                }\n            });\n            this.unregisterKeysQueue.push(key);\n        },\n        getItemByKey (key) {\n            return this.items.find((i)=>i.key === key);\n        },\n        getItemByValue (value) {\n            return this.items.find((i)=>Alpine2.raw(i.value) === Alpine2.raw(value));\n        },\n        getItemByEl (el) {\n            return this.items.find((i)=>i.el === el);\n        },\n        getItemsByValues (values) {\n            let rawValues = values.map((i)=>Alpine2.raw(i));\n            let filteredValue = this.items.filter((i)=>rawValues.includes(Alpine2.raw(i.value)));\n            filteredValue = filteredValue.slice().sort((a, b)=>{\n                let position = a.el.compareDocumentPosition(b.el);\n                if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;\n                if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;\n                return 0;\n            });\n            return filteredValue;\n        },\n        getActiveItem () {\n            if (!this.hasActive()) return null;\n            let item = this.items.find((i)=>i.key === this.activeKey.get());\n            if (!item) this.deactivateKey(this.activeKey.get());\n            return item;\n        },\n        activateItem (item) {\n            if (!item) return;\n            this.activateKey(item.key);\n        },\n        /**\n     * Handle elements...\n     */ reorderKeys: Alpine2.debounce(function() {\n            this.orderedKeys = this.items.map((i)=>i.key);\n            this.orderedKeys = this.orderedKeys.slice().sort((a, z)=>{\n                if (a === null || z === null) return 0;\n                let aEl = this.items.find((i)=>i.key === a).el;\n                let zEl = this.items.find((i)=>i.key === z).el;\n                let position = aEl.compareDocumentPosition(zEl);\n                if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;\n                if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;\n                return 0;\n            });\n            if (!this.orderedKeys.includes(this.activeKey.get())) this.deactivateKey(this.activeKey.get());\n        }),\n        getActiveKey () {\n            return this.activeKey.get();\n        },\n        activeEl () {\n            if (!this.activeKey.get()) return;\n            return this.items.find((i)=>i.key === this.activeKey.get()).el;\n        },\n        isActiveEl (el) {\n            let key = this.items.find((i)=>i.el === el);\n            return this.activeKey.is(key);\n        },\n        activateEl (el) {\n            let item = this.items.find((i)=>i.el === el);\n            this.activateKey(item.key);\n        },\n        isDisabledEl (el) {\n            return this.items.find((i)=>i.el === el).disabled;\n        },\n        get isScrollingTo () {\n            return this.scrollingCount > 0;\n        },\n        scrollingCount: 0,\n        activateAndScrollToKey (key, activatedByKeyPress) {\n            if (!this.getItemByKey(key)) return;\n            this.scrollingCount++;\n            this.activateKey(key, activatedByKeyPress);\n            let targetEl = this.items.find((i)=>i.key === key).el;\n            targetEl.scrollIntoView({\n                block: \"nearest\"\n            });\n            setTimeout(()=>{\n                this.scrollingCount--;\n            }, 25);\n        },\n        /**\n     * Handle disabled keys...\n     */ isDisabled (key) {\n            let item = this.items.find((i)=>i.key === key);\n            if (!item) return false;\n            return item.disabled;\n        },\n        get nonDisabledOrderedKeys () {\n            return this.orderedKeys.filter((i)=>!this.isDisabled(i));\n        },\n        /**\n     * Handle activated keys...\n     */ hasActive () {\n            return !!this.activeKey.get();\n        },\n        /**\n     * Return true if the latest active element was activated\n     * by the user (i.e. using the arrow keys) and false if was\n     * activated automatically by alpine (i.e. first element automatically\n     * activated after filtering the list)\n     */ wasActivatedByKeyPress () {\n            return this.activatedByKeyPress;\n        },\n        isActiveKey (key) {\n            return this.activeKey.is(key);\n        },\n        activateKey (key, activatedByKeyPress = false) {\n            if (this.isDisabled(key)) return;\n            this.activeKey.set(key);\n            this.activatedByKeyPress = activatedByKeyPress;\n        },\n        deactivateKey (key) {\n            if (this.activeKey.get() === key) {\n                this.activeKey.set(null);\n                this.activatedByKeyPress = false;\n            }\n        },\n        deactivate () {\n            if (!this.activeKey.get()) return;\n            if (this.isScrollingTo) return;\n            this.activeKey.set(null);\n            this.activatedByKeyPress = false;\n        },\n        /**\n     * Handle active key traversal...\n     */ nextKey () {\n            if (!this.activeKey.get()) return;\n            let index = this.nonDisabledOrderedKeys.findIndex((i)=>i === this.activeKey.get());\n            return this.nonDisabledOrderedKeys[index + 1];\n        },\n        prevKey () {\n            if (!this.activeKey.get()) return;\n            let index = this.nonDisabledOrderedKeys.findIndex((i)=>i === this.activeKey.get());\n            return this.nonDisabledOrderedKeys[index - 1];\n        },\n        firstKey () {\n            return this.nonDisabledOrderedKeys[0];\n        },\n        lastKey () {\n            return this.nonDisabledOrderedKeys[this.nonDisabledOrderedKeys.length - 1];\n        },\n        searchQuery: \"\",\n        clearSearch: Alpine2.debounce(function() {\n            this.searchQuery = \"\";\n        }, 350),\n        searchKey (query) {\n            this.clearSearch();\n            this.searchQuery += query;\n            let foundKey;\n            for(let key in this.items){\n                let content = this.items[key].el.textContent.trim().toLowerCase();\n                if (content.startsWith(this.searchQuery)) {\n                    foundKey = this.items[key].key;\n                    break;\n                }\n            }\n            if (!this.nonDisabledOrderedKeys.includes(foundKey)) return;\n            return foundKey;\n        },\n        activateByKeyEvent (e, searchable = false, isOpen = ()=>false, open = ()=>{}, setIsTyping) {\n            let targetKey, hasActive;\n            setIsTyping(true);\n            let activatedByKeyPress = true;\n            switch(e.key){\n                case [\n                    \"ArrowDown\",\n                    \"ArrowRight\"\n                ][orientation === \"vertical\" ? 0 : 1]:\n                    e.preventDefault();\n                    e.stopPropagation();\n                    setIsTyping(false);\n                    if (!isOpen()) {\n                        open();\n                        break;\n                    }\n                    this.reorderKeys();\n                    hasActive = this.hasActive();\n                    targetKey = hasActive ? this.nextKey() : this.firstKey();\n                    break;\n                case [\n                    \"ArrowUp\",\n                    \"ArrowLeft\"\n                ][orientation === \"vertical\" ? 0 : 1]:\n                    e.preventDefault();\n                    e.stopPropagation();\n                    setIsTyping(false);\n                    if (!isOpen()) {\n                        open();\n                        break;\n                    }\n                    this.reorderKeys();\n                    hasActive = this.hasActive();\n                    targetKey = hasActive ? this.prevKey() : this.lastKey();\n                    break;\n                case \"Home\":\n                case \"PageUp\":\n                    if (e.key == \"Home\" && e.shiftKey) return;\n                    e.preventDefault();\n                    e.stopPropagation();\n                    setIsTyping(false);\n                    this.reorderKeys();\n                    hasActive = this.hasActive();\n                    targetKey = this.firstKey();\n                    break;\n                case \"End\":\n                case \"PageDown\":\n                    if (e.key == \"End\" && e.shiftKey) return;\n                    e.preventDefault();\n                    e.stopPropagation();\n                    setIsTyping(false);\n                    this.reorderKeys();\n                    hasActive = this.hasActive();\n                    targetKey = this.lastKey();\n                    break;\n                default:\n                    activatedByKeyPress = this.activatedByKeyPress;\n                    if (searchable && e.key.length === 1) targetKey = this.searchKey(e.key);\n                    break;\n            }\n            if (targetKey) this.activateAndScrollToKey(targetKey, activatedByKeyPress);\n        }\n    };\n}\nfunction $182977f45aac8dca$var$renderHiddenInputs(Alpine2, el, name, value) {\n    let newInputs = $182977f45aac8dca$var$generateInputs(name, value);\n    newInputs.forEach((i)=>i._x_hiddenInput = true);\n    newInputs.forEach((i)=>i._x_ignore = true);\n    let children = el.children;\n    let oldInputs = [];\n    for(let i = 0; i < children.length; i++){\n        let child = children[i];\n        if (child._x_hiddenInput) oldInputs.push(child);\n        else break;\n    }\n    Alpine2.mutateDom(()=>{\n        oldInputs.forEach((i)=>i.remove());\n        newInputs.reverse().forEach((i)=>el.prepend(i));\n    });\n}\nfunction $182977f45aac8dca$var$generateInputs(name, value, carry = []) {\n    if ($182977f45aac8dca$var$isObjectOrArray(value)) for(let key in value)carry = carry.concat($182977f45aac8dca$var$generateInputs(`${name}[${key}]`, value[key]));\n    else {\n        let el = document.createElement(\"input\");\n        el.setAttribute(\"type\", \"hidden\");\n        el.setAttribute(\"name\", name);\n        el.setAttribute(\"value\", \"\" + value);\n        return [\n            el\n        ];\n    }\n    return carry;\n}\nfunction $182977f45aac8dca$var$isObjectOrArray(subject) {\n    return typeof subject === \"object\" && subject !== null;\n}\nfunction $182977f45aac8dca$var$switchboard(value) {\n    let lookup = {};\n    let current;\n    let changeTracker = Alpine.reactive({\n        state: false\n    });\n    let get = ()=>{\n        changeTracker.state;\n        return current;\n    };\n    let set = (newValue)=>{\n        if (newValue === current) return;\n        if (current !== void 0) lookup[current].state = false;\n        current = newValue;\n        if (lookup[newValue] === void 0) lookup[newValue] = Alpine.reactive({\n            state: true\n        });\n        else lookup[newValue].state = true;\n        changeTracker.state = !changeTracker.state;\n    };\n    let is = (comparisonValue)=>{\n        if (lookup[comparisonValue] === void 0) {\n            lookup[comparisonValue] = Alpine.reactive({\n                state: false\n            });\n            return lookup[comparisonValue].state;\n        }\n        return !!lookup[comparisonValue].state;\n    };\n    value === void 0 || set(value);\n    return {\n        get: get,\n        set: set,\n        is: is\n    };\n}\n// packages/ui/src/combobox.js\nfunction $182977f45aac8dca$var$combobox_default(Alpine2) {\n    Alpine2.directive(\"combobox\", (el, directive, { evaluate: evaluate })=>{\n        if (directive.value === \"input\") $182977f45aac8dca$var$handleInput(el, Alpine2);\n        else if (directive.value === \"button\") $182977f45aac8dca$var$handleButton(el, Alpine2);\n        else if (directive.value === \"label\") $182977f45aac8dca$var$handleLabel(el, Alpine2);\n        else if (directive.value === \"options\") $182977f45aac8dca$var$handleOptions(el, Alpine2);\n        else if (directive.value === \"option\") $182977f45aac8dca$var$handleOption(el, Alpine2, directive, evaluate);\n        else $182977f45aac8dca$var$handleRoot(el, Alpine2);\n    }).before(\"bind\");\n    Alpine2.magic(\"combobox\", (el)=>{\n        let data = Alpine2.$data(el);\n        return {\n            get value () {\n                return data.__value;\n            },\n            get isOpen () {\n                return data.__isOpen;\n            },\n            get isDisabled () {\n                return data.__isDisabled;\n            },\n            get activeOption () {\n                let active = data.__context?.getActiveItem();\n                return active && active.value;\n            },\n            get activeIndex () {\n                let active = data.__context?.getActiveItem();\n                if (active) return Object.values(Alpine2.raw(data.__context.items)).findIndex((i)=>Alpine2.raw(active) == Alpine2.raw(i));\n                return null;\n            }\n        };\n    });\n    Alpine2.magic(\"comboboxOption\", (el)=>{\n        let data = Alpine2.$data(el);\n        let optionEl = Alpine2.findClosest(el, (i)=>{\n            return i.hasAttribute(\"x-combobox:option\");\n        });\n        if (!optionEl) throw \"No x-combobox:option directive found...\";\n        return {\n            get isActive () {\n                return data.__context.isActiveKey(Alpine2.$data(optionEl).__optionKey);\n            },\n            get isSelected () {\n                return data.__isSelected(optionEl);\n            },\n            get isDisabled () {\n                return data.__context.isDisabled(Alpine2.$data(optionEl).__optionKey);\n            }\n        };\n    });\n}\nfunction $182977f45aac8dca$var$handleRoot(el, Alpine2) {\n    Alpine2.bind(el, {\n        // Setup...\n        \"x-id\" () {\n            return [\n                \"alpine-combobox-button\",\n                \"alpine-combobox-options\",\n                \"alpine-combobox-label\"\n            ];\n        },\n        \"x-modelable\": \"__value\",\n        // Initialize...\n        \"x-data\" () {\n            return {\n                /**\n         * Combobox state...\n         */ __ready: false,\n                __value: null,\n                __isOpen: false,\n                __context: void 0,\n                __isMultiple: void 0,\n                __isStatic: false,\n                __isDisabled: void 0,\n                __displayValue: void 0,\n                __compareBy: null,\n                __inputName: null,\n                __isTyping: false,\n                __hold: false,\n                /**\n         * Combobox initialization...\n         */ init () {\n                    this.__isMultiple = Alpine2.extractProp(el, \"multiple\", false);\n                    this.__isDisabled = Alpine2.extractProp(el, \"disabled\", false);\n                    this.__inputName = Alpine2.extractProp(el, \"name\", null);\n                    this.__nullable = Alpine2.extractProp(el, \"nullable\", false);\n                    this.__compareBy = Alpine2.extractProp(el, \"by\");\n                    this.__context = $182977f45aac8dca$var$generateContext(Alpine2, this.__isMultiple, \"vertical\", ()=>this.__activateSelectedOrFirst());\n                    let defaultValue = Alpine2.extractProp(el, \"default-value\", this.__isMultiple ? [] : null);\n                    this.__value = defaultValue;\n                    queueMicrotask(()=>{\n                        Alpine2.effect(()=>{\n                            this.__inputName && $182977f45aac8dca$var$renderHiddenInputs(Alpine2, this.$el, this.__inputName, this.__value);\n                        });\n                        Alpine2.effect(()=>!this.__isMultiple && this.__resetInput());\n                    });\n                },\n                __startTyping () {\n                    this.__isTyping = true;\n                },\n                __stopTyping () {\n                    this.__isTyping = false;\n                },\n                __resetInput () {\n                    let input = this.$refs.__input;\n                    if (!input) return;\n                    let value = this.__getCurrentValue();\n                    input.value = value;\n                },\n                __getCurrentValue () {\n                    if (!this.$refs.__input) return \"\";\n                    if (!this.__value) return \"\";\n                    if (this.__displayValue) return this.__displayValue(this.__value);\n                    if (typeof this.__value === \"string\") return this.__value;\n                    return \"\";\n                },\n                __open () {\n                    if (this.__isOpen) return;\n                    this.__isOpen = true;\n                    let input = this.$refs.__input;\n                    if (input) {\n                        let value = input.value;\n                        let { selectionStart: selectionStart, selectionEnd: selectionEnd, selectionDirection: selectionDirection } = input;\n                        input.value = \"\";\n                        input.dispatchEvent(new Event(\"change\"));\n                        input.value = value;\n                        if (selectionDirection !== null) input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n                        else input.setSelectionRange(selectionStart, selectionEnd);\n                    }\n                    let nextTick = (callback)=>requestAnimationFrame(()=>requestAnimationFrame(callback));\n                    nextTick(()=>{\n                        this.$refs.__input.focus({\n                            preventScroll: true\n                        });\n                        this.__activateSelectedOrFirst();\n                    });\n                },\n                __close () {\n                    this.__isOpen = false;\n                    this.__context.deactivate();\n                },\n                __activateSelectedOrFirst (activateSelected = true) {\n                    if (!this.__isOpen) return;\n                    if (this.__context.hasActive() && this.__context.wasActivatedByKeyPress()) return;\n                    let firstSelectedValue;\n                    if (this.__isMultiple) {\n                        let selectedItem = this.__context.getItemsByValues(this.__value);\n                        firstSelectedValue = selectedItem.length ? selectedItem[0].value : null;\n                    } else firstSelectedValue = this.__value;\n                    let firstSelected = null;\n                    if (activateSelected && firstSelectedValue) firstSelected = this.__context.getItemByValue(firstSelectedValue);\n                    if (firstSelected) {\n                        this.__context.activateAndScrollToKey(firstSelected.key);\n                        return;\n                    }\n                    this.__context.activateAndScrollToKey(this.__context.firstKey());\n                },\n                __selectActive () {\n                    let active = this.__context.getActiveItem();\n                    if (active) this.__toggleSelected(active.value);\n                },\n                __selectOption (el2) {\n                    let item = this.__context.getItemByEl(el2);\n                    if (item) this.__toggleSelected(item.value);\n                },\n                __isSelected (el2) {\n                    let item = this.__context.getItemByEl(el2);\n                    if (!item) return false;\n                    if (item.value === null || item.value === void 0) return false;\n                    return this.__hasSelected(item.value);\n                },\n                __toggleSelected (value) {\n                    if (!this.__isMultiple) {\n                        this.__value = value;\n                        return;\n                    }\n                    let index = this.__value.findIndex((j)=>this.__compare(j, value));\n                    if (index === -1) this.__value.push(value);\n                    else this.__value.splice(index, 1);\n                },\n                __hasSelected (value) {\n                    if (!this.__isMultiple) return this.__compare(this.__value, value);\n                    return this.__value.some((i)=>this.__compare(i, value));\n                },\n                __compare (a, b) {\n                    let by = this.__compareBy;\n                    if (!by) by = (a2, b2)=>Alpine2.raw(a2) === Alpine2.raw(b2);\n                    if (typeof by === \"string\") {\n                        let property = by;\n                        by = (a2, b2)=>{\n                            if (!a2 || typeof a2 !== \"object\" || !b2 || typeof b2 !== \"object\") return Alpine2.raw(a2) === Alpine2.raw(b2);\n                            return a2[property] === b2[property];\n                        };\n                    }\n                    return by(a, b);\n                }\n            };\n        },\n        // Register event listeners..\n        \"@mousedown.window\" (e) {\n            if (!!!this.$refs.__input.contains(e.target) && !this.$refs.__button.contains(e.target) && !this.$refs.__options.contains(e.target)) {\n                this.__close();\n                this.__resetInput();\n            }\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleInput(el, Alpine2) {\n    Alpine2.bind(el, {\n        // Setup...\n        \"x-ref\": \"__input\",\n        \":id\" () {\n            return this.$id(\"alpine-combobox-input\");\n        },\n        // Accessibility attributes...\n        \"role\": \"combobox\",\n        \"tabindex\": \"0\",\n        \"aria-autocomplete\": \"list\",\n        // We need to defer this evaluation a bit because $refs that get declared later\n        // in the DOM aren't available yet when x-ref is the result of an Alpine.bind object.\n        async \":aria-controls\" () {\n            return await $182977f45aac8dca$var$microtask(()=>this.$refs.__options && this.$refs.__options.id);\n        },\n        \":aria-expanded\" () {\n            return this.$data.__isDisabled ? void 0 : this.$data.__isOpen;\n        },\n        \":aria-multiselectable\" () {\n            return this.$data.__isMultiple ? true : void 0;\n        },\n        \":aria-activedescendant\" () {\n            if (!this.$data.__context.hasActive()) return;\n            let active = this.$data.__context.getActiveItem();\n            return active ? active.el.id : null;\n        },\n        \":aria-labelledby\" () {\n            return this.$refs.__label ? this.$refs.__label.id : this.$refs.__button ? this.$refs.__button.id : null;\n        },\n        // Initialize...\n        \"x-init\" () {\n            let displayValueFn = Alpine2.extractProp(this.$el, \"display-value\");\n            if (displayValueFn) this.$data.__displayValue = displayValueFn;\n        },\n        // Register listeners...\n        \"@input.stop\" (e) {\n            if (this.$data.__isTyping) {\n                this.$data.__open();\n                this.$dispatch(\"change\");\n            }\n        },\n        \"@blur\" () {\n            this.$data.__stopTyping(false);\n        },\n        \"@keydown\" (e) {\n            queueMicrotask(()=>this.$data.__context.activateByKeyEvent(e, false, ()=>this.$data.__isOpen, ()=>this.$data.__open(), (state)=>this.$data.__isTyping = state));\n        },\n        \"@keydown.enter.prevent.stop\" () {\n            this.$data.__selectActive();\n            this.$data.__stopTyping();\n            if (!this.$data.__isMultiple) {\n                this.$data.__close();\n                this.$data.__resetInput();\n            }\n        },\n        \"@keydown.escape.prevent\" (e) {\n            if (!this.$data.__static) e.stopPropagation();\n            this.$data.__stopTyping();\n            this.$data.__close();\n            this.$data.__resetInput();\n        },\n        \"@keydown.tab\" () {\n            this.$data.__stopTyping();\n            if (this.$data.__isOpen) this.$data.__close();\n            this.$data.__resetInput();\n        },\n        \"@keydown.backspace\" (e) {\n            if (this.$data.__isMultiple) return;\n            if (!this.$data.__nullable) return;\n            let input = e.target;\n            requestAnimationFrame(()=>{\n                if (input.value === \"\") {\n                    this.$data.__value = null;\n                    let options = this.$refs.__options;\n                    if (options) options.scrollTop = 0;\n                    this.$data.__context.deactivate();\n                }\n            });\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleButton(el, Alpine2) {\n    Alpine2.bind(el, {\n        // Setup...\n        \"x-ref\": \"__button\",\n        \":id\" () {\n            return this.$id(\"alpine-combobox-button\");\n        },\n        // Accessibility attributes...\n        \"aria-haspopup\": \"true\",\n        // We need to defer this evaluation a bit because $refs that get declared later\n        // in the DOM aren't available yet when x-ref is the result of an Alpine.bind object.\n        async \":aria-controls\" () {\n            return await $182977f45aac8dca$var$microtask(()=>this.$refs.__options && this.$refs.__options.id);\n        },\n        \":aria-labelledby\" () {\n            return this.$refs.__label ? [\n                this.$refs.__label.id,\n                this.$el.id\n            ].join(\" \") : null;\n        },\n        \":aria-expanded\" () {\n            return this.$data.__isDisabled ? null : this.$data.__isOpen;\n        },\n        \":disabled\" () {\n            return this.$data.__isDisabled;\n        },\n        \"tabindex\": \"-1\",\n        // Initialize....\n        \"x-init\" () {\n            if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\")) this.$el.type = \"button\";\n        },\n        // Register listeners...\n        \"@click\" (e) {\n            if (this.$data.__isDisabled) return;\n            if (this.$data.__isOpen) {\n                this.$data.__close();\n                this.$data.__resetInput();\n            } else {\n                e.preventDefault();\n                this.$data.__open();\n            }\n            this.$nextTick(()=>this.$refs.__input.focus({\n                    preventScroll: true\n                }));\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleLabel(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-ref\": \"__label\",\n        \":id\" () {\n            return this.$id(\"alpine-combobox-label\");\n        },\n        \"@click\" () {\n            this.$refs.__input.focus({\n                preventScroll: true\n            });\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleOptions(el, Alpine2) {\n    Alpine2.bind(el, {\n        // Setup...\n        \"x-ref\": \"__options\",\n        \":id\" () {\n            return this.$id(\"alpine-combobox-options\");\n        },\n        // Accessibility attributes...\n        \"role\": \"listbox\",\n        \":aria-labelledby\" () {\n            return this.$refs.__label ? this.$refs.__label.id : this.$refs.__button ? this.$refs.__button.id : null;\n        },\n        // Initialize...\n        \"x-init\" () {\n            this.$data.__isStatic = Alpine2.bound(this.$el, \"static\", false);\n            if (Alpine2.bound(this.$el, \"hold\")) this.$data.__hold = true;\n        },\n        \"x-show\" () {\n            return this.$data.__isStatic ? true : this.$data.__isOpen;\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleOption(el, Alpine2) {\n    Alpine2.bind(el, {\n        // Setup...\n        \"x-id\" () {\n            return [\n                \"alpine-combobox-option\"\n            ];\n        },\n        \":id\" () {\n            return this.$id(\"alpine-combobox-option\");\n        },\n        // Accessibility attributes...\n        \"role\": \"option\",\n        \":tabindex\" () {\n            return this.$comboboxOption.isDisabled ? void 0 : \"-1\";\n        },\n        // Only the active element should have aria-selected=\"true\"...\n        \"x-effect\" () {\n            this.$comboboxOption.isSelected ? el.setAttribute(\"aria-selected\", true) : el.setAttribute(\"aria-selected\", false);\n        },\n        \":aria-disabled\" () {\n            return this.$comboboxOption.isDisabled;\n        },\n        // Initialize...\n        \"x-data\" () {\n            return {\n                \"__optionKey\": null,\n                init () {\n                    this.__optionKey = (Math.random() + 1).toString(36).substring(7);\n                    let value = Alpine2.extractProp(this.$el, \"value\");\n                    let disabled = Alpine2.extractProp(this.$el, \"disabled\", false, false);\n                    this.__context.registerItem(this.__optionKey, this.$el, value, disabled);\n                },\n                destroy () {\n                    this.__context.unregisterItem(this.__optionKey);\n                }\n            };\n        },\n        // Register listeners...\n        \"@click\" () {\n            if (this.$comboboxOption.isDisabled) return;\n            this.__selectOption(this.$el);\n            if (!this.__isMultiple) {\n                this.__close();\n                this.__resetInput();\n            }\n            this.$nextTick(()=>this.$refs.__input.focus({\n                    preventScroll: true\n                }));\n        },\n        \"@mouseenter\" (e) {\n            this.__context.activateEl(this.$el);\n        },\n        \"@mousemove\" (e) {\n            if (this.__context.isActiveEl(this.$el)) return;\n            this.__context.activateEl(this.$el);\n        },\n        \"@mouseleave\" (e) {\n            if (this.__hold) return;\n            this.__context.deactivate();\n        }\n    });\n}\nfunction $182977f45aac8dca$var$microtask(callback) {\n    return new Promise((resolve)=>queueMicrotask(()=>resolve(callback())));\n}\n// packages/ui/src/dialog.js\nfunction $182977f45aac8dca$var$dialog_default(Alpine2) {\n    Alpine2.directive(\"dialog\", (el, directive)=>{\n        if (directive.value === \"overlay\") $182977f45aac8dca$var$handleOverlay(el, Alpine2);\n        else if (directive.value === \"panel\") $182977f45aac8dca$var$handlePanel(el, Alpine2);\n        else if (directive.value === \"title\") $182977f45aac8dca$var$handleTitle(el, Alpine2);\n        else if (directive.value === \"description\") $182977f45aac8dca$var$handleDescription(el, Alpine2);\n        else $182977f45aac8dca$var$handleRoot2(el, Alpine2);\n    });\n    Alpine2.magic(\"dialog\", (el)=>{\n        let $data = Alpine2.$data(el);\n        return {\n            // Kept here for legacy. Remove after out of beta.\n            get open () {\n                return $data.__isOpen;\n            },\n            get isOpen () {\n                return $data.__isOpen;\n            },\n            close () {\n                $data.__close();\n            }\n        };\n    });\n}\nfunction $182977f45aac8dca$var$handleRoot2(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-data\" () {\n            return {\n                init () {\n                    Alpine2.bound(el, \"open\") !== void 0 && Alpine2.effect(()=>{\n                        this.__isOpenState = Alpine2.bound(el, \"open\");\n                    });\n                    if (Alpine2.bound(el, \"initial-focus\") !== void 0) this.$watch(\"__isOpenState\", ()=>{\n                        if (!this.__isOpenState) return;\n                        setTimeout(()=>{\n                            Alpine2.bound(el, \"initial-focus\").focus();\n                        }, 0);\n                    });\n                },\n                __isOpenState: false,\n                __close () {\n                    if (Alpine2.bound(el, \"open\")) this.$dispatch(\"close\");\n                    else this.__isOpenState = false;\n                },\n                get __isOpen () {\n                    return Alpine2.bound(el, \"static\", this.__isOpenState);\n                }\n            };\n        },\n        \"x-modelable\": \"__isOpenState\",\n        \"x-id\" () {\n            return [\n                \"alpine-dialog-title\",\n                \"alpine-dialog-description\"\n            ];\n        },\n        \"x-show\" () {\n            return this.__isOpen;\n        },\n        \"x-trap.inert.noscroll\" () {\n            return this.__isOpen;\n        },\n        \"@keydown.escape\" () {\n            this.__close();\n        },\n        \":aria-labelledby\" () {\n            return this.$id(\"alpine-dialog-title\");\n        },\n        \":aria-describedby\" () {\n            return this.$id(\"alpine-dialog-description\");\n        },\n        \"role\": \"dialog\",\n        \"aria-modal\": \"true\"\n    });\n}\nfunction $182977f45aac8dca$var$handleOverlay(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            if (this.$data.__isOpen === void 0) console.warn('\"x-dialog:overlay\" is missing a parent element with \"x-dialog\".');\n        },\n        \"x-show\" () {\n            return this.__isOpen;\n        },\n        \"@click.prevent.stop\" () {\n            this.$data.__close();\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handlePanel(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"@click.outside\" () {\n            this.$data.__close();\n        },\n        \"x-show\" () {\n            return this.$data.__isOpen;\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleTitle(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            if (this.$data.__isOpen === void 0) console.warn('\"x-dialog:title\" is missing a parent element with \"x-dialog\".');\n        },\n        \":id\" () {\n            return this.$id(\"alpine-dialog-title\");\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleDescription(el, Alpine2) {\n    Alpine2.bind(el, {\n        \":id\" () {\n            return this.$id(\"alpine-dialog-description\");\n        }\n    });\n}\n// packages/ui/src/disclosure.js\nfunction $182977f45aac8dca$var$disclosure_default(Alpine2) {\n    Alpine2.directive(\"disclosure\", (el, directive)=>{\n        if (!directive.value) $182977f45aac8dca$var$handleRoot3(el, Alpine2);\n        else if (directive.value === \"panel\") $182977f45aac8dca$var$handlePanel2(el, Alpine2);\n        else if (directive.value === \"button\") $182977f45aac8dca$var$handleButton2(el, Alpine2);\n    }).before(\"bind\");\n    Alpine2.magic(\"disclosure\", (el)=>{\n        let $data = Alpine2.$data(el);\n        return {\n            get isOpen () {\n                return $data.__isOpen;\n            },\n            close () {\n                $data.__close();\n            }\n        };\n    });\n}\nfunction $182977f45aac8dca$var$handleRoot3(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-modelable\": \"__isOpen\",\n        \"x-data\" () {\n            return {\n                // The panel will call this...\n                // We can't do this inside a microtask in x-init because, when default-open is set to \"true\",\n                // It will cause the panel to transition in for the first time, instead of showing instantly...\n                __determineDefaultOpenState () {\n                    let defaultIsOpen = Boolean(Alpine2.bound(this.$el, \"default-open\", false));\n                    if (defaultIsOpen) this.__isOpen = defaultIsOpen;\n                },\n                __isOpen: false,\n                __close () {\n                    this.__isOpen = false;\n                },\n                __toggle () {\n                    this.__isOpen = !this.__isOpen;\n                }\n            };\n        },\n        \"x-id\" () {\n            return [\n                \"alpine-disclosure-panel\"\n            ];\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleButton2(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\")) this.$el.type = \"button\";\n        },\n        \"@click\" () {\n            this.$data.__isOpen = !this.$data.__isOpen;\n        },\n        \":aria-expanded\" () {\n            return this.$data.__isOpen;\n        },\n        \":aria-controls\" () {\n            return this.$data.$id(\"alpine-disclosure-panel\");\n        },\n        \"@keydown.space.prevent.stop\" () {\n            this.$data.__toggle();\n        },\n        \"@keydown.enter.prevent.stop\" () {\n            this.$data.__toggle();\n        },\n        // Required for firefox, event.preventDefault() in handleKeyDown for\n        // the Space key doesn't cancel the handleKeyUp, which in turn\n        // triggers a *click*.\n        \"@keyup.space.prevent\" () {}\n    });\n}\nfunction $182977f45aac8dca$var$handlePanel2(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            this.$data.__determineDefaultOpenState();\n        },\n        \"x-show\" () {\n            return this.$data.__isOpen;\n        },\n        \":id\" () {\n            return this.$data.$id(\"alpine-disclosure-panel\");\n        }\n    });\n}\n// packages/ui/src/listbox.js\nfunction $182977f45aac8dca$var$listbox_default(Alpine2) {\n    Alpine2.directive(\"listbox\", (el, directive)=>{\n        if (!directive.value) $182977f45aac8dca$var$handleRoot4(el, Alpine2);\n        else if (directive.value === \"label\") $182977f45aac8dca$var$handleLabel2(el, Alpine2);\n        else if (directive.value === \"button\") $182977f45aac8dca$var$handleButton3(el, Alpine2);\n        else if (directive.value === \"options\") $182977f45aac8dca$var$handleOptions2(el, Alpine2);\n        else if (directive.value === \"option\") $182977f45aac8dca$var$handleOption2(el, Alpine2);\n    }).before(\"bind\");\n    Alpine2.magic(\"listbox\", (el)=>{\n        let data = Alpine2.$data(el);\n        return {\n            // @deprecated:\n            get selected () {\n                return data.__value;\n            },\n            // @deprecated:\n            get active () {\n                let active = data.__context.getActiveItem();\n                return active && active.value;\n            },\n            get value () {\n                return data.__value;\n            },\n            get isOpen () {\n                return data.__isOpen;\n            },\n            get isDisabled () {\n                return data.__isDisabled;\n            },\n            get activeOption () {\n                let active = data.__context.getActiveItem();\n                return active && active.value;\n            },\n            get activeIndex () {\n                let active = data.__context.getActiveItem();\n                return active && active.key;\n            }\n        };\n    });\n    Alpine2.magic(\"listboxOption\", (el)=>{\n        let data = Alpine2.$data(el);\n        let optionEl = Alpine2.findClosest(el, (i)=>{\n            return i.hasAttribute(\"x-listbox:option\");\n        });\n        if (!optionEl) throw \"No x-listbox:option directive found...\";\n        return {\n            get isActive () {\n                return data.__context.isActiveKey(Alpine2.$data(optionEl).__optionKey);\n            },\n            get isSelected () {\n                return data.__isSelected(optionEl);\n            },\n            get isDisabled () {\n                return data.__context.isDisabled(Alpine2.$data(optionEl).__optionKey);\n            }\n        };\n    });\n}\nfunction $182977f45aac8dca$var$handleRoot4(el, Alpine2) {\n    Alpine2.bind(el, {\n        // Setup...\n        \"x-id\" () {\n            return [\n                \"alpine-listbox-button\",\n                \"alpine-listbox-options\",\n                \"alpine-listbox-label\"\n            ];\n        },\n        \"x-modelable\": \"__value\",\n        // Initialize...\n        \"x-data\" () {\n            return {\n                /**\n         * Listbox state...\n         */ __ready: false,\n                __value: null,\n                __isOpen: false,\n                __context: void 0,\n                __isMultiple: void 0,\n                __isStatic: false,\n                __isDisabled: void 0,\n                __compareBy: null,\n                __inputName: null,\n                __orientation: \"vertical\",\n                __hold: false,\n                /**\n         * Listbox initialization...\n         */ init () {\n                    this.__isMultiple = Alpine2.extractProp(el, \"multiple\", false);\n                    this.__isDisabled = Alpine2.extractProp(el, \"disabled\", false);\n                    this.__inputName = Alpine2.extractProp(el, \"name\", null);\n                    this.__compareBy = Alpine2.extractProp(el, \"by\");\n                    this.__orientation = Alpine2.extractProp(el, \"horizontal\", false) ? \"horizontal\" : \"vertical\";\n                    this.__context = $182977f45aac8dca$var$generateContext(Alpine2, this.__isMultiple, this.__orientation, ()=>this.__activateSelectedOrFirst());\n                    let defaultValue = Alpine2.extractProp(el, \"default-value\", this.__isMultiple ? [] : null);\n                    this.__value = defaultValue;\n                    queueMicrotask(()=>{\n                        Alpine2.effect(()=>{\n                            this.__inputName && $182977f45aac8dca$var$renderHiddenInputs(Alpine2, this.$el, this.__inputName, this.__value);\n                        });\n                        Alpine2.effect(()=>{\n                            this.__resetInput();\n                        });\n                    });\n                },\n                __resetInput () {\n                    let input = this.$refs.__input;\n                    if (!input) return;\n                    let value = this.$data.__getCurrentValue();\n                    input.value = value;\n                },\n                __getCurrentValue () {\n                    if (!this.$refs.__input) return \"\";\n                    if (!this.__value) return \"\";\n                    if (this.$data.__displayValue && this.__value !== void 0) return this.$data.__displayValue(this.__value);\n                    if (typeof this.__value === \"string\") return this.__value;\n                    return \"\";\n                },\n                __open () {\n                    if (this.__isOpen) return;\n                    this.__isOpen = true;\n                    this.__activateSelectedOrFirst();\n                    let nextTick = (callback)=>requestAnimationFrame(()=>requestAnimationFrame(callback));\n                    nextTick(()=>this.$refs.__options.focus({\n                            preventScroll: true\n                        }));\n                },\n                __close () {\n                    this.__isOpen = false;\n                    this.__context.deactivate();\n                    this.$nextTick(()=>this.$refs.__button.focus({\n                            preventScroll: true\n                        }));\n                },\n                __activateSelectedOrFirst (activateSelected = true) {\n                    if (!this.__isOpen) return;\n                    if (this.__context.getActiveKey()) {\n                        this.__context.activateAndScrollToKey(this.__context.getActiveKey());\n                        return;\n                    }\n                    let firstSelectedValue;\n                    if (this.__isMultiple) firstSelectedValue = this.__value.find((i)=>{\n                        return !!this.__context.getItemByValue(i);\n                    });\n                    else firstSelectedValue = this.__value;\n                    if (activateSelected && firstSelectedValue) {\n                        let firstSelected = this.__context.getItemByValue(firstSelectedValue);\n                        firstSelected && this.__context.activateAndScrollToKey(firstSelected.key);\n                    } else this.__context.activateAndScrollToKey(this.__context.firstKey());\n                },\n                __selectActive () {\n                    let active = this.$data.__context.getActiveItem();\n                    if (active) this.__toggleSelected(active.value);\n                },\n                __selectOption (el2) {\n                    let item = this.__context.getItemByEl(el2);\n                    if (item) this.__toggleSelected(item.value);\n                },\n                __isSelected (el2) {\n                    let item = this.__context.getItemByEl(el2);\n                    if (!item) return false;\n                    if (item.value === null || item.value === void 0) return false;\n                    return this.__hasSelected(item.value);\n                },\n                __toggleSelected (value) {\n                    if (!this.__isMultiple) {\n                        this.__value = value;\n                        return;\n                    }\n                    let index = this.__value.findIndex((j)=>this.__compare(j, value));\n                    if (index === -1) this.__value.push(value);\n                    else this.__value.splice(index, 1);\n                },\n                __hasSelected (value) {\n                    if (!this.__isMultiple) return this.__compare(this.__value, value);\n                    return this.__value.some((i)=>this.__compare(i, value));\n                },\n                __compare (a, b) {\n                    let by = this.__compareBy;\n                    if (!by) by = (a2, b2)=>Alpine2.raw(a2) === Alpine2.raw(b2);\n                    if (typeof by === \"string\") {\n                        let property = by;\n                        by = (a2, b2)=>{\n                            if (!a2 || typeof a2 !== \"object\" || !b2 || typeof b2 !== \"object\") return Alpine2.raw(a2) === Alpine2.raw(b2);\n                            return a2[property] === b2[property];\n                        };\n                    }\n                    return by(a, b);\n                }\n            };\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleLabel2(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-ref\": \"__label\",\n        \":id\" () {\n            return this.$id(\"alpine-listbox-label\");\n        },\n        \"@click\" () {\n            this.$refs.__button.focus({\n                preventScroll: true\n            });\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleButton3(el, Alpine2) {\n    Alpine2.bind(el, {\n        // Setup...\n        \"x-ref\": \"__button\",\n        \":id\" () {\n            return this.$id(\"alpine-listbox-button\");\n        },\n        // Accessibility attributes...\n        \"aria-haspopup\": \"true\",\n        \":aria-labelledby\" () {\n            return this.$id(\"alpine-listbox-label\");\n        },\n        \":aria-expanded\" () {\n            return this.$data.__isOpen;\n        },\n        \":aria-controls\" () {\n            return this.$data.__isOpen && this.$id(\"alpine-listbox-options\");\n        },\n        // Initialize....\n        \"x-init\" () {\n            if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\")) this.$el.type = \"button\";\n        },\n        // Register listeners...\n        \"@click\" () {\n            this.$data.__open();\n        },\n        \"@keydown\" (e) {\n            if ([\n                \"ArrowDown\",\n                \"ArrowUp\",\n                \"ArrowLeft\",\n                \"ArrowRight\"\n            ].includes(e.key)) {\n                e.stopPropagation();\n                e.preventDefault();\n                this.$data.__open();\n            }\n        },\n        \"@keydown.space.stop.prevent\" () {\n            this.$data.__open();\n        },\n        \"@keydown.enter.stop.prevent\" () {\n            this.$data.__open();\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleOptions2(el, Alpine2) {\n    Alpine2.bind(el, {\n        // Setup...\n        \"x-ref\": \"__options\",\n        \":id\" () {\n            return this.$id(\"alpine-listbox-options\");\n        },\n        // Accessibility attributes...\n        \"role\": \"listbox\",\n        tabindex: \"0\",\n        \":aria-orientation\" () {\n            return this.$data.__orientation;\n        },\n        \":aria-labelledby\" () {\n            return this.$id(\"alpine-listbox-button\");\n        },\n        \":aria-activedescendant\" () {\n            if (!this.$data.__context.hasActive()) return;\n            let active = this.$data.__context.getActiveItem();\n            return active ? active.el.id : null;\n        },\n        // Initialize...\n        \"x-init\" () {\n            this.$data.__isStatic = Alpine2.extractProp(this.$el, \"static\", false);\n            if (Alpine2.bound(this.$el, \"hold\")) this.$data.__hold = true;\n        },\n        \"x-show\" () {\n            return this.$data.__isStatic ? true : this.$data.__isOpen;\n        },\n        \"x-trap\" () {\n            return this.$data.__isOpen;\n        },\n        \"@click.outside\" () {\n            this.$data.__close();\n        },\n        \"@keydown.escape.stop.prevent\" () {\n            this.$data.__close();\n        },\n        \"@focus\" () {\n            this.$data.__activateSelectedOrFirst();\n        },\n        \"@keydown\" (e) {\n            queueMicrotask(()=>this.$data.__context.activateByKeyEvent(e, true, ()=>this.$data.__isOpen, ()=>this.$data.__open(), ()=>{}));\n        },\n        \"@keydown.enter.stop.prevent\" () {\n            this.$data.__selectActive();\n            this.$data.__isMultiple || this.$data.__close();\n        },\n        \"@keydown.space.stop.prevent\" () {\n            this.$data.__selectActive();\n            this.$data.__isMultiple || this.$data.__close();\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleOption2(el, Alpine2) {\n    Alpine2.bind(el, ()=>{\n        return {\n            \"x-id\" () {\n                return [\n                    \"alpine-listbox-option\"\n                ];\n            },\n            \":id\" () {\n                return this.$id(\"alpine-listbox-option\");\n            },\n            // Accessibility attributes...\n            \"role\": \"option\",\n            \":tabindex\" () {\n                return this.$listboxOption.isDisabled ? false : \"-1\";\n            },\n            \":aria-selected\" () {\n                return this.$listboxOption.isSelected;\n            },\n            // Initialize...\n            \"x-data\" () {\n                return {\n                    \"__optionKey\": null,\n                    init () {\n                        this.__optionKey = (Math.random() + 1).toString(36).substring(7);\n                        let value = Alpine2.extractProp(el, \"value\");\n                        let disabled = Alpine2.extractProp(el, \"disabled\", false, false);\n                        this.$data.__context.registerItem(this.__optionKey, el, value, disabled);\n                    },\n                    destroy () {\n                        this.$data.__context.unregisterItem(this.__optionKey);\n                    }\n                };\n            },\n            // Register listeners...\n            \"@click\" () {\n                if (this.$listboxOption.isDisabled) return;\n                this.$data.__selectOption(el);\n                this.$data.__isMultiple || this.$data.__close();\n            },\n            \"@mouseenter\" () {\n                this.$data.__context.activateEl(el);\n            },\n            \"@mouseleave\" () {\n                this.$data.__hold || this.$data.__context.deactivate();\n            }\n        };\n    });\n}\n// packages/ui/src/popover.js\nfunction $182977f45aac8dca$var$popover_default(Alpine2) {\n    Alpine2.directive(\"popover\", (el, directive)=>{\n        if (!directive.value) $182977f45aac8dca$var$handleRoot5(el, Alpine2);\n        else if (directive.value === \"overlay\") $182977f45aac8dca$var$handleOverlay2(el, Alpine2);\n        else if (directive.value === \"button\") $182977f45aac8dca$var$handleButton4(el, Alpine2);\n        else if (directive.value === \"panel\") $182977f45aac8dca$var$handlePanel3(el, Alpine2);\n        else if (directive.value === \"group\") $182977f45aac8dca$var$handleGroup(el, Alpine2);\n    });\n    Alpine2.magic(\"popover\", (el)=>{\n        let $data = Alpine2.$data(el);\n        return {\n            get isOpen () {\n                return $data.__isOpenState;\n            },\n            open () {\n                $data.__open();\n            },\n            close () {\n                $data.__close();\n            }\n        };\n    });\n}\nfunction $182977f45aac8dca$var$handleRoot5(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-id\" () {\n            return [\n                \"alpine-popover-button\",\n                \"alpine-popover-panel\"\n            ];\n        },\n        \"x-modelable\": \"__isOpenState\",\n        \"x-data\" () {\n            return {\n                init () {\n                    if (this.$data.__groupEl) this.$data.__groupEl.addEventListener(\"__close-others\", ({ detail: detail })=>{\n                        if (detail.el.isSameNode(this.$el)) return;\n                        this.__close(false);\n                    });\n                },\n                __buttonEl: void 0,\n                __panelEl: void 0,\n                __isStatic: false,\n                get __isOpen () {\n                    if (this.__isStatic) return true;\n                    return this.__isOpenState;\n                },\n                __isOpenState: false,\n                __open () {\n                    this.__isOpenState = true;\n                    this.$dispatch(\"__close-others\", {\n                        el: this.$el\n                    });\n                },\n                __toggle () {\n                    this.__isOpenState ? this.__close() : this.__open();\n                },\n                __close (el2) {\n                    if (this.__isStatic) return;\n                    this.__isOpenState = false;\n                    if (el2 === false) return;\n                    el2 = el2 || this.$data.__buttonEl;\n                    if (document.activeElement.isSameNode(el2)) return;\n                    setTimeout(()=>el2.focus());\n                },\n                __contains (outer, inner) {\n                    return !!Alpine2.findClosest(inner, (el2)=>el2.isSameNode(outer));\n                }\n            };\n        },\n        \"@keydown.escape.stop.prevent\" () {\n            this.__close();\n        },\n        \"@focusin.window\" () {\n            if (this.$data.__groupEl) {\n                if (!this.$data.__contains(this.$data.__groupEl, document.activeElement)) this.$data.__close(false);\n                return;\n            }\n            if (!this.$data.__contains(this.$el, document.activeElement)) this.$data.__close(false);\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleButton4(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-ref\": \"button\",\n        \":id\" () {\n            return this.$id(\"alpine-popover-button\");\n        },\n        \":aria-expanded\" () {\n            return this.$data.__isOpen;\n        },\n        \":aria-controls\" () {\n            return this.$data.__isOpen && this.$id(\"alpine-popover-panel\");\n        },\n        \"x-init\" () {\n            if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\")) this.$el.type = \"button\";\n            this.$data.__buttonEl = this.$el;\n        },\n        \"@click\" () {\n            this.$data.__toggle();\n        },\n        \"@keydown.tab\" (e) {\n            if (!e.shiftKey && this.$data.__isOpen) {\n                let firstFocusableEl = this.$focus.within(this.$data.__panelEl).getFirst();\n                if (firstFocusableEl) {\n                    e.preventDefault();\n                    e.stopPropagation();\n                    this.$focus.focus(firstFocusableEl);\n                }\n            }\n        },\n        \"@keyup.tab\" (e) {\n            if (this.$data.__isOpen) {\n                let lastEl = this.$focus.previouslyFocused();\n                if (!lastEl) return;\n                if (// Make sure the last focused wasn't part of this popover.\n                !this.$data.__buttonEl.contains(lastEl) && !this.$data.__panelEl.contains(lastEl) && lastEl && this.$el.compareDocumentPosition(lastEl) & Node.DOCUMENT_POSITION_FOLLOWING) {\n                    e.preventDefault();\n                    e.stopPropagation();\n                    this.$focus.within(this.$data.__panelEl).last();\n                }\n            }\n        },\n        \"@keydown.space.stop.prevent\" () {\n            this.$data.__toggle();\n        },\n        \"@keydown.enter.stop.prevent\" () {\n            this.$data.__toggle();\n        },\n        // This is to stop Firefox from firing a \"click\".\n        \"@keyup.space.stop.prevent\" () {}\n    });\n}\nfunction $182977f45aac8dca$var$handlePanel3(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            this.$data.__isStatic = Alpine2.bound(this.$el, \"static\", false);\n            this.$data.__panelEl = this.$el;\n        },\n        \"x-effect\" () {\n            this.$data.__isOpen && Alpine2.bound(el, \"focus\") && this.$focus.first();\n        },\n        \"x-ref\": \"panel\",\n        \":id\" () {\n            return this.$id(\"alpine-popover-panel\");\n        },\n        \"x-show\" () {\n            return this.$data.__isOpen;\n        },\n        \"@mousedown.window\" ($event) {\n            if (!this.$data.__isOpen) return;\n            if (this.$data.__contains(this.$data.__buttonEl, $event.target)) return;\n            if (this.$data.__contains(this.$el, $event.target)) return;\n            if (!this.$focus.focusable($event.target)) this.$data.__close();\n        },\n        \"@keydown.tab\" (e) {\n            if (e.shiftKey && this.$focus.isFirst(e.target)) {\n                e.preventDefault();\n                e.stopPropagation();\n                Alpine2.bound(el, \"focus\") ? this.$data.__close() : this.$data.__buttonEl.focus();\n            } else if (!e.shiftKey && this.$focus.isLast(e.target)) {\n                e.preventDefault();\n                e.stopPropagation();\n                let els = this.$focus.within(document).all();\n                let buttonIdx = els.indexOf(this.$data.__buttonEl);\n                let nextEls = els.splice(buttonIdx + 1).filter((el2)=>!this.$el.contains(el2));\n                nextEls[0].focus();\n                Alpine2.bound(el, \"focus\") && this.$data.__close(false);\n            }\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleGroup(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-ref\": \"container\",\n        \"x-data\" () {\n            return {\n                __groupEl: this.$el\n            };\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleOverlay2(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-show\" () {\n            return this.$data.__isOpen;\n        }\n    });\n}\n// packages/ui/src/menu.js\nfunction $182977f45aac8dca$var$menu_default(Alpine2) {\n    Alpine2.directive(\"menu\", (el, directive)=>{\n        if (!directive.value) $182977f45aac8dca$var$handleRoot6(el, Alpine2);\n        else if (directive.value === \"items\") $182977f45aac8dca$var$handleItems(el, Alpine2);\n        else if (directive.value === \"item\") $182977f45aac8dca$var$handleItem(el, Alpine2);\n        else if (directive.value === \"button\") $182977f45aac8dca$var$handleButton5(el, Alpine2);\n    }).before(\"bind\");\n    Alpine2.magic(\"menuItem\", (el)=>{\n        let $data = Alpine2.$data(el);\n        return {\n            get isActive () {\n                return $data.__activeEl == $data.__itemEl;\n            },\n            get isDisabled () {\n                return $data.__itemEl.__isDisabled.value;\n            }\n        };\n    });\n}\nfunction $182977f45aac8dca$var$handleRoot6(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-id\" () {\n            return [\n                \"alpine-menu-button\",\n                \"alpine-menu-items\"\n            ];\n        },\n        \"x-modelable\": \"__isOpen\",\n        \"x-data\" () {\n            return {\n                __itemEls: [],\n                __activeEl: null,\n                __isOpen: false,\n                __open (activationStrategy) {\n                    this.__isOpen = true;\n                    let nextTick = (callback)=>requestAnimationFrame(()=>requestAnimationFrame(callback));\n                    nextTick(()=>{\n                        this.$refs.__items.focus({\n                            preventScroll: true\n                        });\n                        activationStrategy && activationStrategy(Alpine2, this.$refs.__items, (el2)=>el2.__activate());\n                    });\n                },\n                __close (focusAfter = true) {\n                    this.__isOpen = false;\n                    focusAfter && this.$nextTick(()=>this.$refs.__button.focus({\n                            preventScroll: true\n                        }));\n                },\n                __contains (outer, inner) {\n                    return !!Alpine2.findClosest(inner, (el2)=>el2.isSameNode(outer));\n                }\n            };\n        },\n        \"@focusin.window\" () {\n            if (!this.$data.__contains(this.$el, document.activeElement)) this.$data.__close(false);\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleButton5(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-ref\": \"__button\",\n        \"aria-haspopup\": \"true\",\n        \":aria-labelledby\" () {\n            return this.$id(\"alpine-menu-label\");\n        },\n        \":id\" () {\n            return this.$id(\"alpine-menu-button\");\n        },\n        \":aria-expanded\" () {\n            return this.$data.__isOpen;\n        },\n        \":aria-controls\" () {\n            return this.$data.__isOpen && this.$id(\"alpine-menu-items\");\n        },\n        \"x-init\" () {\n            if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\")) this.$el.type = \"button\";\n        },\n        \"@click\" () {\n            this.$data.__open();\n        },\n        \"@keydown.down.stop.prevent\" () {\n            this.$data.__open();\n        },\n        \"@keydown.up.stop.prevent\" () {\n            this.$data.__open($182977f45aac8dca$var$dom.last);\n        },\n        \"@keydown.space.stop.prevent\" () {\n            this.$data.__open();\n        },\n        \"@keydown.enter.stop.prevent\" () {\n            this.$data.__open();\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleItems(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-ref\": \"__items\",\n        \"aria-orientation\": \"vertical\",\n        \"role\": \"menu\",\n        \":id\" () {\n            return this.$id(\"alpine-menu-items\");\n        },\n        \":aria-labelledby\" () {\n            return this.$id(\"alpine-menu-button\");\n        },\n        \":aria-activedescendant\" () {\n            return this.$data.__activeEl && this.$data.__activeEl.id;\n        },\n        \"x-show\" () {\n            return this.$data.__isOpen;\n        },\n        \"tabindex\": \"0\",\n        \"@click.outside\" () {\n            this.$data.__close();\n        },\n        \"@keydown\" (e) {\n            $182977f45aac8dca$var$dom.search(Alpine2, this.$refs.__items, e.key, (el2)=>el2.__activate());\n        },\n        \"@keydown.down.stop.prevent\" () {\n            if (this.$data.__activeEl) $182977f45aac8dca$var$dom.next(Alpine2, this.$data.__activeEl, (el2)=>el2.__activate());\n            else $182977f45aac8dca$var$dom.first(Alpine2, this.$refs.__items, (el2)=>el2.__activate());\n        },\n        \"@keydown.up.stop.prevent\" () {\n            if (this.$data.__activeEl) $182977f45aac8dca$var$dom.previous(Alpine2, this.$data.__activeEl, (el2)=>el2.__activate());\n            else $182977f45aac8dca$var$dom.last(Alpine2, this.$refs.__items, (el2)=>el2.__activate());\n        },\n        \"@keydown.home.stop.prevent\" () {\n            $182977f45aac8dca$var$dom.first(Alpine2, this.$refs.__items, (el2)=>el2.__activate());\n        },\n        \"@keydown.end.stop.prevent\" () {\n            $182977f45aac8dca$var$dom.last(Alpine2, this.$refs.__items, (el2)=>el2.__activate());\n        },\n        \"@keydown.page-up.stop.prevent\" () {\n            $182977f45aac8dca$var$dom.first(Alpine2, this.$refs.__items, (el2)=>el2.__activate());\n        },\n        \"@keydown.page-down.stop.prevent\" () {\n            $182977f45aac8dca$var$dom.last(Alpine2, this.$refs.__items, (el2)=>el2.__activate());\n        },\n        \"@keydown.escape.stop.prevent\" () {\n            this.$data.__close();\n        },\n        \"@keydown.space.stop.prevent\" () {\n            this.$data.__activeEl && this.$data.__activeEl.click();\n        },\n        \"@keydown.enter.stop.prevent\" () {\n            this.$data.__activeEl && this.$data.__activeEl.click();\n        },\n        // Required for firefox, event.preventDefault() in handleKeyDown for\n        // the Space key doesn't cancel the handleKeyUp, which in turn\n        // triggers a *click*.\n        \"@keyup.space.prevent\" () {}\n    });\n}\nfunction $182977f45aac8dca$var$handleItem(el, Alpine2) {\n    Alpine2.bind(el, ()=>{\n        return {\n            \"x-data\" () {\n                return {\n                    __itemEl: this.$el,\n                    init () {\n                        let els = Alpine2.raw(this.$data.__itemEls);\n                        let inserted = false;\n                        for(let i = 0; i < els.length; i++)if (els[i].compareDocumentPosition(this.$el) & Node.DOCUMENT_POSITION_PRECEDING) {\n                            els.splice(i, 0, this.$el);\n                            inserted = true;\n                            break;\n                        }\n                        if (!inserted) els.push(this.$el);\n                        this.$el.__activate = ()=>{\n                            this.$data.__activeEl = this.$el;\n                            this.$el.scrollIntoView({\n                                block: \"nearest\"\n                            });\n                        };\n                        this.$el.__deactivate = ()=>{\n                            this.$data.__activeEl = null;\n                        };\n                        this.$el.__isDisabled = Alpine2.reactive({\n                            value: false\n                        });\n                        queueMicrotask(()=>{\n                            this.$el.__isDisabled.value = Alpine2.bound(this.$el, \"disabled\", false);\n                        });\n                    },\n                    destroy () {\n                        let els = this.$data.__itemEls;\n                        els.splice(els.indexOf(this.$el), 1);\n                    }\n                };\n            },\n            \"x-id\" () {\n                return [\n                    \"alpine-menu-item\"\n                ];\n            },\n            \":id\" () {\n                return this.$id(\"alpine-menu-item\");\n            },\n            \":tabindex\" () {\n                return this.__itemEl.__isDisabled.value ? false : \"-1\";\n            },\n            \"role\": \"menuitem\",\n            \"@mousemove\" () {\n                this.__itemEl.__isDisabled.value || this.$menuItem.isActive || this.__itemEl.__activate();\n            },\n            \"@mouseleave\" () {\n                this.__itemEl.__isDisabled.value || !this.$menuItem.isActive || this.__itemEl.__deactivate();\n            }\n        };\n    });\n}\nvar $182977f45aac8dca$var$dom = {\n    first (Alpine2, parent, receive = (i)=>i, fallback = ()=>{}) {\n        let first = Alpine2.$data(parent).__itemEls[0];\n        if (!first) return fallback();\n        if (first.tagName.toLowerCase() === \"template\") return this.next(Alpine2, first, receive);\n        if (first.__isDisabled.value) return this.next(Alpine2, first, receive);\n        return receive(first);\n    },\n    last (Alpine2, parent, receive = (i)=>i, fallback = ()=>{}) {\n        let last = Alpine2.$data(parent).__itemEls.slice(-1)[0];\n        if (!last) return fallback();\n        if (last.__isDisabled.value) return this.previous(Alpine2, last, receive);\n        return receive(last);\n    },\n    next (Alpine2, el, receive = (i)=>i, fallback = ()=>{}) {\n        if (!el) return fallback();\n        let els = Alpine2.$data(el).__itemEls;\n        let next = els[els.indexOf(el) + 1];\n        if (!next) return fallback();\n        if (next.__isDisabled.value || next.tagName.toLowerCase() === \"template\") return this.next(Alpine2, next, receive, fallback);\n        return receive(next);\n    },\n    previous (Alpine2, el, receive = (i)=>i, fallback = ()=>{}) {\n        if (!el) return fallback();\n        let els = Alpine2.$data(el).__itemEls;\n        let prev = els[els.indexOf(el) - 1];\n        if (!prev) return fallback();\n        if (prev.__isDisabled.value || prev.tagName.toLowerCase() === \"template\") return this.previous(Alpine2, prev, receive, fallback);\n        return receive(prev);\n    },\n    searchQuery: \"\",\n    debouncedClearSearch: void 0,\n    clearSearch (Alpine2) {\n        if (!this.debouncedClearSearch) this.debouncedClearSearch = Alpine2.debounce(function() {\n            this.searchQuery = \"\";\n        }, 350);\n        this.debouncedClearSearch();\n    },\n    search (Alpine2, parent, key, receiver) {\n        if (key.length > 1) return;\n        this.searchQuery += key;\n        let els = Alpine2.raw(Alpine2.$data(parent).__itemEls);\n        let el = els.find((el2)=>{\n            return el2.textContent.trim().toLowerCase().startsWith(this.searchQuery);\n        });\n        el && !el.__isDisabled.value && receiver(el);\n        this.clearSearch(Alpine2);\n    }\n};\n// packages/ui/src/switch.js\nfunction $182977f45aac8dca$var$switch_default(Alpine2) {\n    Alpine2.directive(\"switch\", (el, directive)=>{\n        if (directive.value === \"group\") $182977f45aac8dca$var$handleGroup2(el, Alpine2);\n        else if (directive.value === \"label\") $182977f45aac8dca$var$handleLabel3(el, Alpine2);\n        else if (directive.value === \"description\") $182977f45aac8dca$var$handleDescription2(el, Alpine2);\n        else $182977f45aac8dca$var$handleRoot7(el, Alpine2);\n    }).before(\"bind\");\n    Alpine2.magic(\"switch\", (el)=>{\n        let $data = Alpine2.$data(el);\n        return {\n            get isChecked () {\n                return $data.__value === true;\n            }\n        };\n    });\n}\nfunction $182977f45aac8dca$var$handleGroup2(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-id\" () {\n            return [\n                \"alpine-switch-label\",\n                \"alpine-switch-description\"\n            ];\n        },\n        \"x-data\" () {\n            return {\n                __hasLabel: false,\n                __hasDescription: false,\n                __switchEl: void 0\n            };\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleRoot7(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-modelable\": \"__value\",\n        \"x-data\" () {\n            return {\n                init () {\n                    queueMicrotask(()=>{\n                        this.__value = Alpine2.bound(this.$el, \"default-checked\", false);\n                        this.__inputName = Alpine2.bound(this.$el, \"name\", false);\n                        this.__inputValue = Alpine2.bound(this.$el, \"value\", \"on\");\n                        this.__inputId = \"alpine-switch-\" + Date.now();\n                    });\n                },\n                __value: void 0,\n                __inputName: void 0,\n                __inputValue: void 0,\n                __inputId: void 0,\n                __toggle () {\n                    this.__value = !this.__value;\n                }\n            };\n        },\n        \"x-effect\" () {\n            let value = this.__value;\n            if (!this.__inputName) return;\n            let nextEl = this.$el.nextElementSibling;\n            if (nextEl && String(nextEl.id) === String(this.__inputId)) nextEl.remove();\n            if (value) {\n                let input = document.createElement(\"input\");\n                input.type = \"hidden\";\n                input.value = this.__inputValue;\n                input.name = this.__inputName;\n                input.id = this.__inputId;\n                this.$el.after(input);\n            }\n        },\n        \"x-init\" () {\n            if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\")) this.$el.type = \"button\";\n            this.$data.__switchEl = this.$el;\n        },\n        \"role\": \"switch\",\n        \"tabindex\": \"0\",\n        \":aria-checked\" () {\n            return !!this.__value;\n        },\n        \":aria-labelledby\" () {\n            return this.$data.__hasLabel && this.$id(\"alpine-switch-label\");\n        },\n        \":aria-describedby\" () {\n            return this.$data.__hasDescription && this.$id(\"alpine-switch-description\");\n        },\n        \"@click.prevent\" () {\n            this.__toggle();\n        },\n        \"@keyup\" (e) {\n            if (e.key !== \"Tab\") e.preventDefault();\n            if (e.key === \" \") this.__toggle();\n        },\n        // This is needed so that we can \"cancel\" the click event when we use the `Enter` key on a button.\n        \"@keypress.prevent\" () {}\n    });\n}\nfunction $182977f45aac8dca$var$handleLabel3(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            this.$data.__hasLabel = true;\n        },\n        \":id\" () {\n            return this.$id(\"alpine-switch-label\");\n        },\n        \"@click\" () {\n            this.$data.__switchEl.click();\n            this.$data.__switchEl.focus({\n                preventScroll: true\n            });\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleDescription2(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            this.$data.__hasDescription = true;\n        },\n        \":id\" () {\n            return this.$id(\"alpine-switch-description\");\n        }\n    });\n}\n// packages/ui/src/radio.js\nfunction $182977f45aac8dca$var$radio_default(Alpine2) {\n    Alpine2.directive(\"radio\", (el, directive)=>{\n        if (!directive.value) $182977f45aac8dca$var$handleRoot8(el, Alpine2);\n        else if (directive.value === \"option\") $182977f45aac8dca$var$handleOption3(el, Alpine2);\n        else if (directive.value === \"label\") $182977f45aac8dca$var$handleLabel4(el, Alpine2);\n        else if (directive.value === \"description\") $182977f45aac8dca$var$handleDescription3(el, Alpine2);\n    }).before(\"bind\");\n    Alpine2.magic(\"radioOption\", (el)=>{\n        let $data = Alpine2.$data(el);\n        return {\n            get isActive () {\n                return $data.__option === $data.__active;\n            },\n            get isChecked () {\n                return $data.__option === $data.__value;\n            },\n            get isDisabled () {\n                let disabled = $data.__disabled;\n                if ($data.__rootDisabled) return true;\n                return disabled;\n            }\n        };\n    });\n}\nfunction $182977f45aac8dca$var$handleRoot8(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-modelable\": \"__value\",\n        \"x-data\" () {\n            return {\n                init () {\n                    queueMicrotask(()=>{\n                        this.__rootDisabled = Alpine2.bound(el, \"disabled\", false);\n                        this.__value = Alpine2.bound(this.$el, \"default-value\", false);\n                        this.__inputName = Alpine2.bound(this.$el, \"name\", false);\n                        this.__inputId = \"alpine-radio-\" + Date.now();\n                    });\n                    this.$nextTick(()=>{\n                        let walker = document.createTreeWalker(this.$el, NodeFilter.SHOW_ELEMENT, {\n                            acceptNode: (node)=>{\n                                if (node.getAttribute(\"role\") === \"radio\") return NodeFilter.FILTER_REJECT;\n                                if (node.hasAttribute(\"role\")) return NodeFilter.FILTER_SKIP;\n                                return NodeFilter.FILTER_ACCEPT;\n                            }\n                        }, false);\n                        while(walker.nextNode())walker.currentNode.setAttribute(\"role\", \"none\");\n                    });\n                },\n                __value: void 0,\n                __active: void 0,\n                __rootEl: this.$el,\n                __optionValues: [],\n                __disabledOptions: /* @__PURE__ */ new Set(),\n                __optionElsByValue: /* @__PURE__ */ new Map(),\n                __hasLabel: false,\n                __hasDescription: false,\n                __rootDisabled: false,\n                __inputName: void 0,\n                __inputId: void 0,\n                __change (value) {\n                    if (this.__rootDisabled) return;\n                    this.__value = value;\n                },\n                __addOption (option, el2, disabled) {\n                    let options = Alpine2.raw(this.__optionValues);\n                    let els = options.map((i)=>this.__optionElsByValue.get(i));\n                    let inserted = false;\n                    for(let i = 0; i < els.length; i++)if (els[i].compareDocumentPosition(el2) & Node.DOCUMENT_POSITION_PRECEDING) {\n                        options.splice(i, 0, option);\n                        this.__optionElsByValue.set(option, el2);\n                        inserted = true;\n                        break;\n                    }\n                    if (!inserted) {\n                        options.push(option);\n                        this.__optionElsByValue.set(option, el2);\n                    }\n                    disabled && this.__disabledOptions.add(option);\n                },\n                __isFirstOption (option) {\n                    return this.__optionValues.indexOf(option) === 0;\n                },\n                __setActive (option) {\n                    this.__active = option;\n                },\n                __focusOptionNext () {\n                    let option = this.__active;\n                    let all = this.__optionValues.filter((i)=>!this.__disabledOptions.has(i));\n                    let index = all.indexOf(option);\n                    let next = all[(index + 1 + all.length) % all.length];\n                    this.__optionElsByValue.get(next).focus();\n                    this.__change(next);\n                },\n                __focusOptionPrev () {\n                    let option = this.__active;\n                    let all = this.__optionValues.filter((i)=>!this.__disabledOptions.has(i));\n                    let index = all.indexOf(option);\n                    let prev = all[(index - 1 + all.length) % all.length];\n                    this.__optionElsByValue.get(prev).focus();\n                    this.__change(prev);\n                }\n            };\n        },\n        \"x-effect\" () {\n            let value = this.__value;\n            if (!this.__inputName) return;\n            let nextEl = this.$el.nextElementSibling;\n            if (nextEl && String(nextEl.id) === String(this.__inputId)) nextEl.remove();\n            if (value) {\n                let input = document.createElement(\"input\");\n                input.type = \"hidden\";\n                input.value = value;\n                input.name = this.__inputName;\n                input.id = this.__inputId;\n                this.$el.after(input);\n            }\n        },\n        \"role\": \"radiogroup\",\n        \"x-id\" () {\n            return [\n                \"alpine-radio-label\",\n                \"alpine-radio-description\"\n            ];\n        },\n        \":aria-labelledby\" () {\n            return this.__hasLabel && this.$id(\"alpine-radio-label\");\n        },\n        \":aria-describedby\" () {\n            return this.__hasDescription && this.$id(\"alpine-radio-description\");\n        },\n        \"@keydown.up.prevent.stop\" () {\n            this.__focusOptionPrev();\n        },\n        \"@keydown.left.prevent.stop\" () {\n            this.__focusOptionPrev();\n        },\n        \"@keydown.down.prevent.stop\" () {\n            this.__focusOptionNext();\n        },\n        \"@keydown.right.prevent.stop\" () {\n            this.__focusOptionNext();\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleOption3(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-data\" () {\n            return {\n                init () {\n                    queueMicrotask(()=>{\n                        this.__disabled = Alpine2.bound(el, \"disabled\", false);\n                        this.__option = Alpine2.bound(el, \"value\");\n                        this.$data.__addOption(this.__option, this.$el, this.__disabled);\n                    });\n                },\n                __option: void 0,\n                __disabled: false,\n                __hasLabel: false,\n                __hasDescription: false\n            };\n        },\n        \"x-id\" () {\n            return [\n                \"alpine-radio-label\",\n                \"alpine-radio-description\"\n            ];\n        },\n        \"role\": \"radio\",\n        \":aria-checked\" () {\n            return this.$radioOption.isChecked;\n        },\n        \":aria-disabled\" () {\n            return this.$radioOption.isDisabled;\n        },\n        \":aria-labelledby\" () {\n            return this.__hasLabel && this.$id(\"alpine-radio-label\");\n        },\n        \":aria-describedby\" () {\n            return this.__hasDescription && this.$id(\"alpine-radio-description\");\n        },\n        \":tabindex\" () {\n            if (this.$radioOption.isDisabled) return -1;\n            if (this.$radioOption.isChecked) return 0;\n            if (!this.$data.__value && this.$data.__isFirstOption(this.$data.__option)) return 0;\n            return -1;\n        },\n        \"@click\" () {\n            if (this.$radioOption.isDisabled) return;\n            this.$data.__change(this.$data.__option);\n            this.$el.focus();\n        },\n        \"@focus\" () {\n            if (this.$radioOption.isDisabled) return;\n            this.$data.__setActive(this.$data.__option);\n        },\n        \"@blur\" () {\n            if (this.$data.__active === this.$data.__option) this.$data.__setActive(void 0);\n        },\n        \"@keydown.space.stop.prevent\" () {\n            this.$data.__change(this.$data.__option);\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleLabel4(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            this.$data.__hasLabel = true;\n        },\n        \":id\" () {\n            return this.$id(\"alpine-radio-label\");\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleDescription3(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            this.$data.__hasDescription = true;\n        },\n        \":id\" () {\n            return this.$id(\"alpine-radio-description\");\n        }\n    });\n}\n// packages/ui/src/tabs.js\nfunction $182977f45aac8dca$var$tabs_default(Alpine2) {\n    Alpine2.directive(\"tabs\", (el, directive)=>{\n        if (!directive.value) $182977f45aac8dca$var$handleRoot9(el, Alpine2);\n        else if (directive.value === \"list\") $182977f45aac8dca$var$handleList(el, Alpine2);\n        else if (directive.value === \"tab\") $182977f45aac8dca$var$handleTab(el, Alpine2);\n        else if (directive.value === \"panels\") $182977f45aac8dca$var$handlePanels(el, Alpine2);\n        else if (directive.value === \"panel\") $182977f45aac8dca$var$handlePanel4(el, Alpine2);\n    }).before(\"bind\");\n    Alpine2.magic(\"tab\", (el)=>{\n        let $data = Alpine2.$data(el);\n        return {\n            get isSelected () {\n                return $data.__selectedIndex === $data.__tabs.indexOf($data.__tabEl);\n            },\n            get isDisabled () {\n                return $data.__isDisabled;\n            }\n        };\n    });\n    Alpine2.magic(\"panel\", (el)=>{\n        let $data = Alpine2.$data(el);\n        return {\n            get isSelected () {\n                return $data.__selectedIndex === $data.__panels.indexOf($data.__panelEl);\n            }\n        };\n    });\n}\nfunction $182977f45aac8dca$var$handleRoot9(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-modelable\": \"__selectedIndex\",\n        \"x-data\" () {\n            return {\n                init () {\n                    queueMicrotask(()=>{\n                        let defaultIndex = this.__selectedIndex || Number(Alpine2.bound(this.$el, \"default-index\", 0));\n                        let tabs = this.__activeTabs();\n                        let clamp = (number, min, max)=>Math.min(Math.max(number, min), max);\n                        this.__selectedIndex = clamp(defaultIndex, 0, tabs.length - 1);\n                        Alpine2.effect(()=>{\n                            this.__manualActivation = Alpine2.bound(this.$el, \"manual\", false);\n                        });\n                    });\n                },\n                __tabs: [],\n                __panels: [],\n                __selectedIndex: null,\n                __tabGroupEl: void 0,\n                __manualActivation: false,\n                __addTab (el2) {\n                    this.__tabs.push(el2);\n                },\n                __addPanel (el2) {\n                    this.__panels.push(el2);\n                },\n                __selectTab (el2) {\n                    this.__selectedIndex = this.__tabs.indexOf(el2);\n                },\n                __activeTabs () {\n                    return this.__tabs.filter((i)=>!i.__disabled);\n                }\n            };\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleList(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            this.$data.__tabGroupEl = this.$el;\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handleTab(el, Alpine2) {\n    Alpine2.bind(el, {\n        \"x-init\" () {\n            if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\")) this.$el.type = \"button\";\n        },\n        \"x-data\" () {\n            return {\n                init () {\n                    this.__tabEl = this.$el;\n                    this.$data.__addTab(this.$el);\n                    this.__tabEl.__disabled = Alpine2.bound(this.$el, \"disabled\", false);\n                    this.__isDisabled = this.__tabEl.__disabled;\n                },\n                __tabEl: void 0,\n                __isDisabled: false\n            };\n        },\n        \"@click\" () {\n            if (this.$el.__disabled) return;\n            this.$data.__selectTab(this.$el);\n            this.$el.focus();\n        },\n        \"@keydown.enter.prevent.stop\" () {\n            this.__selectTab(this.$el);\n        },\n        \"@keydown.space.prevent.stop\" () {\n            this.__selectTab(this.$el);\n        },\n        \"@keydown.home.prevent.stop\" () {\n            this.$focus.within(this.$data.__activeTabs()).first();\n        },\n        \"@keydown.page-up.prevent.stop\" () {\n            this.$focus.within(this.$data.__activeTabs()).first();\n        },\n        \"@keydown.end.prevent.stop\" () {\n            this.$focus.within(this.$data.__activeTabs()).last();\n        },\n        \"@keydown.page-down.prevent.stop\" () {\n            this.$focus.within(this.$data.__activeTabs()).last();\n        },\n        \"@keydown.down.prevent.stop\" () {\n            this.$focus.within(this.$data.__activeTabs()).withWrapAround().next();\n        },\n        \"@keydown.right.prevent.stop\" () {\n            this.$focus.within(this.$data.__activeTabs()).withWrapAround().next();\n        },\n        \"@keydown.up.prevent.stop\" () {\n            this.$focus.within(this.$data.__activeTabs()).withWrapAround().prev();\n        },\n        \"@keydown.left.prevent.stop\" () {\n            this.$focus.within(this.$data.__activeTabs()).withWrapAround().prev();\n        },\n        \":tabindex\" () {\n            return this.$tab.isSelected ? 0 : -1;\n        },\n        // This is important because we want to only focus the tab when it gets focus\n        // OR it finished the click event (mouseup). However, if you perform a `click`,\n        // then you will first get the `focus` and then get the `click` event.\n        // See https://github.com/tailwindlabs/headlessui/pull/1192\n        \"@mousedown\" (event) {\n            event.preventDefault();\n        },\n        \"@focus\" () {\n            if (this.$data.__manualActivation) this.$el.focus();\n            else {\n                if (this.$el.__disabled) return;\n                this.$data.__selectTab(this.$el);\n                this.$el.focus();\n            }\n        }\n    });\n}\nfunction $182977f45aac8dca$var$handlePanels(el, Alpine2) {\n    Alpine2.bind(el, {\n    });\n}\nfunction $182977f45aac8dca$var$handlePanel4(el, Alpine2) {\n    Alpine2.bind(el, {\n        \":tabindex\" () {\n            return this.$panel.isSelected ? 0 : -1;\n        },\n        \"x-data\" () {\n            return {\n                init () {\n                    this.__panelEl = this.$el;\n                    this.$data.__addPanel(this.$el);\n                },\n                __panelEl: void 0\n            };\n        },\n        \"x-show\" () {\n            return this.$panel.isSelected;\n        }\n    });\n}\n// packages/ui/src/index.js\nfunction $182977f45aac8dca$export$5525e5ba287fa6f5(Alpine2) {\n    $182977f45aac8dca$var$combobox_default(Alpine2);\n    $182977f45aac8dca$var$dialog_default(Alpine2);\n    $182977f45aac8dca$var$disclosure_default(Alpine2);\n    $182977f45aac8dca$var$listbox_default(Alpine2);\n    $182977f45aac8dca$var$menu_default(Alpine2);\n    $182977f45aac8dca$var$switch_default(Alpine2);\n    $182977f45aac8dca$var$popover_default(Alpine2);\n    $182977f45aac8dca$var$radio_default(Alpine2);\n    $182977f45aac8dca$var$tabs_default(Alpine2);\n}\n// packages/ui/builds/module.js\nvar $182977f45aac8dca$export$2e2bcd8739ae039 = $182977f45aac8dca$export$5525e5ba287fa6f5;\n\n\n// packages/alpinejs/src/scheduler.js\nvar $f347e48613385d9c$var$flushPending = false;\nvar $f347e48613385d9c$var$flushing = false;\nvar $f347e48613385d9c$var$queue = [];\nvar $f347e48613385d9c$var$lastFlushedIndex = -1;\nvar $f347e48613385d9c$var$queueNeedsSort = false;\nvar $f347e48613385d9c$var$transactionActive = false;\nfunction $f347e48613385d9c$var$scheduler(callback) {\n    $f347e48613385d9c$var$queueJob(callback);\n}\nfunction $f347e48613385d9c$var$startTransaction() {\n    $f347e48613385d9c$var$transactionActive = true;\n}\nfunction $f347e48613385d9c$var$commitTransaction() {\n    $f347e48613385d9c$var$transactionActive = false;\n    $f347e48613385d9c$var$queueFlush();\n}\nfunction $f347e48613385d9c$var$queueJob(job) {\n    if (!$f347e48613385d9c$var$queue.includes(job)) {\n        $f347e48613385d9c$var$queue.push(job);\n        if (job._x_schedulerPriority !== void 0) $f347e48613385d9c$var$queueNeedsSort = true;\n    }\n    $f347e48613385d9c$var$queueFlush();\n}\nfunction $f347e48613385d9c$var$dequeueJob(job) {\n    let index = $f347e48613385d9c$var$queue.indexOf(job);\n    if (index !== -1 && index > $f347e48613385d9c$var$lastFlushedIndex) $f347e48613385d9c$var$queue.splice(index, 1);\n}\nfunction $f347e48613385d9c$var$queueFlush() {\n    if (!$f347e48613385d9c$var$flushing && !$f347e48613385d9c$var$flushPending) {\n        if ($f347e48613385d9c$var$transactionActive) return;\n        $f347e48613385d9c$var$flushPending = true;\n        queueMicrotask($f347e48613385d9c$var$flushJobs);\n    }\n}\nfunction $f347e48613385d9c$var$flushJobs() {\n    $f347e48613385d9c$var$flushPending = false;\n    $f347e48613385d9c$var$flushing = true;\n    for(let i = 0; i < $f347e48613385d9c$var$queue.length; i++){\n        if ($f347e48613385d9c$var$queueNeedsSort) $f347e48613385d9c$var$sortPendingJobs(i);\n        $f347e48613385d9c$var$queue[i]();\n        $f347e48613385d9c$var$lastFlushedIndex = i;\n    }\n    $f347e48613385d9c$var$queue.length = 0;\n    $f347e48613385d9c$var$lastFlushedIndex = -1;\n    $f347e48613385d9c$var$queueNeedsSort = false;\n    $f347e48613385d9c$var$flushing = false;\n}\nfunction $f347e48613385d9c$var$sortPendingJobs(start2) {\n    let depths = /* @__PURE__ */ new Map();\n    let sorted = $f347e48613385d9c$var$queue.slice(start2).sort((a, b)=>$f347e48613385d9c$var$compareJobs(a, b, depths));\n    for(let i = 0; i < sorted.length; i++)$f347e48613385d9c$var$queue[start2 + i] = sorted[i];\n    $f347e48613385d9c$var$queueNeedsSort = false;\n}\nfunction $f347e48613385d9c$var$compareJobs(a, b, depths) {\n    if (!$f347e48613385d9c$var$isStructural(a)) return $f347e48613385d9c$var$isStructural(b) ? 1 : 0;\n    if (!$f347e48613385d9c$var$isStructural(b)) return -1;\n    let depthDifference = $f347e48613385d9c$var$getElementDepth(a._x_schedulerPriority.el, depths) - $f347e48613385d9c$var$getElementDepth(b._x_schedulerPriority.el, depths);\n    return depthDifference || a._x_schedulerPriority.order - b._x_schedulerPriority.order;\n}\nfunction $f347e48613385d9c$var$isStructural(job) {\n    return job._x_schedulerPriority !== void 0;\n}\nfunction $f347e48613385d9c$var$getElementDepth(el, depths) {\n    if (depths.has(el)) return depths.get(el);\n    let depth = 0;\n    let owner = el;\n    while(el){\n        depth++;\n        if (el._x_teleportBack) el = el._x_teleportBack;\n        else if (typeof ShadowRoot === \"function\" && el.parentNode instanceof ShadowRoot) el = el.parentNode.host;\n        else el = el.parentElement;\n    }\n    depths.set(owner, depth);\n    return depth;\n}\n// packages/alpinejs/src/reactivity.js\nvar $f347e48613385d9c$var$reactive;\nvar $f347e48613385d9c$var$effect;\nvar $f347e48613385d9c$var$release;\nvar $f347e48613385d9c$var$raw;\nvar $f347e48613385d9c$var$nextStructuralEffectOrder = 0;\nvar $f347e48613385d9c$var$shouldSchedule = true;\nfunction $f347e48613385d9c$var$disableEffectScheduling(callback) {\n    $f347e48613385d9c$var$shouldSchedule = false;\n    callback();\n    $f347e48613385d9c$var$shouldSchedule = true;\n}\nfunction $f347e48613385d9c$var$setReactivityEngine(engine) {\n    $f347e48613385d9c$var$reactive = engine.reactive;\n    $f347e48613385d9c$var$release = engine.release;\n    $f347e48613385d9c$var$effect = (callback)=>engine.effect(callback, {\n            scheduler: (task)=>{\n                if ($f347e48613385d9c$var$shouldSchedule) $f347e48613385d9c$var$scheduler(task);\n                else task();\n            }\n        });\n    $f347e48613385d9c$var$raw = engine.raw;\n}\nfunction $f347e48613385d9c$var$overrideEffect(override) {\n    $f347e48613385d9c$var$effect = override;\n}\nfunction $f347e48613385d9c$var$elementBoundEffect(el) {\n    let cleanup = ()=>{};\n    let wrappedEffect = (callback, options)=>{\n        let priority = options?.priority === \"structural\" ? $f347e48613385d9c$var$nextStructuralEffectOrder++ : void 0;\n        let effectReference = $f347e48613385d9c$var$effect(callback);\n        if (priority !== void 0 && effectReference !== void 0) effectReference._x_schedulerPriority = {\n            el: el,\n            order: priority\n        };\n        if (!el._x_effects) {\n            el._x_effects = /* @__PURE__ */ new Set();\n            el._x_runEffects = ()=>{\n                el._x_effects.forEach((i)=>i());\n            };\n        }\n        el._x_effects.add(effectReference);\n        cleanup = ()=>{\n            if (effectReference === void 0) return;\n            el._x_effects.delete(effectReference);\n            $f347e48613385d9c$var$release(effectReference);\n        };\n        return effectReference;\n    };\n    return [\n        wrappedEffect,\n        ()=>{\n            cleanup();\n        }\n    ];\n}\nfunction $f347e48613385d9c$var$watch(getter, callback) {\n    let firstTime = true;\n    let oldValue;\n    let oldValueJSON;\n    let effectReference = $f347e48613385d9c$var$effect(()=>{\n        let value = getter();\n        let newJSON = JSON.stringify(value);\n        if (!firstTime) {\n            if (typeof value === \"object\" || value !== oldValue) {\n                let previousValue = typeof oldValue === \"object\" ? JSON.parse(oldValueJSON) : oldValue;\n                queueMicrotask(()=>{\n                    callback(value, previousValue);\n                });\n            }\n        }\n        oldValue = value;\n        oldValueJSON = newJSON;\n        firstTime = false;\n    });\n    return ()=>{\n        $f347e48613385d9c$var$dequeueJob(effectReference);\n        $f347e48613385d9c$var$release(effectReference);\n    };\n}\nasync function $f347e48613385d9c$var$transaction(callback) {\n    $f347e48613385d9c$var$startTransaction();\n    try {\n        await callback();\n        await Promise.resolve();\n    } finally{\n        $f347e48613385d9c$var$commitTransaction();\n    }\n}\n// packages/alpinejs/src/mutation.js\nvar $f347e48613385d9c$var$onAttributeAddeds = [];\nvar $f347e48613385d9c$var$onElRemoveds = [];\nvar $f347e48613385d9c$var$onElAddeds = [];\nfunction $f347e48613385d9c$var$onElAdded(callback) {\n    $f347e48613385d9c$var$onElAddeds.push(callback);\n}\nfunction $f347e48613385d9c$var$onElRemoved(el, callback) {\n    if (typeof callback === \"function\") {\n        if (!el._x_cleanups) el._x_cleanups = [];\n        el._x_cleanups.push(callback);\n    } else {\n        callback = el;\n        $f347e48613385d9c$var$onElRemoveds.push(callback);\n    }\n}\nfunction $f347e48613385d9c$var$onAttributesAdded(callback) {\n    $f347e48613385d9c$var$onAttributeAddeds.push(callback);\n}\nfunction $f347e48613385d9c$var$onAttributeRemoved(el, name, callback) {\n    if (!el._x_attributeCleanups) el._x_attributeCleanups = {};\n    if (!el._x_attributeCleanups[name]) el._x_attributeCleanups[name] = [];\n    el._x_attributeCleanups[name].push(callback);\n}\nfunction $f347e48613385d9c$var$cleanupAttributes(el, names) {\n    if (!el._x_attributeCleanups) return;\n    Object.entries(el._x_attributeCleanups).forEach(([name, value])=>{\n        if (names === void 0 || names.includes(name)) {\n            value.forEach((i)=>i());\n            delete el._x_attributeCleanups[name];\n        }\n    });\n}\nfunction $f347e48613385d9c$var$cleanupElement(el) {\n    el._x_effects?.forEach($f347e48613385d9c$var$dequeueJob);\n    while(el._x_cleanups?.length)el._x_cleanups.pop()();\n}\nvar $f347e48613385d9c$var$observer = new MutationObserver($f347e48613385d9c$var$onMutate);\nvar $f347e48613385d9c$var$currentlyObserving = false;\nfunction $f347e48613385d9c$var$startObservingMutations() {\n    $f347e48613385d9c$var$observer.observe(document, {\n        subtree: true,\n        childList: true,\n        attributes: true,\n        attributeOldValue: true\n    });\n    $f347e48613385d9c$var$currentlyObserving = true;\n}\nfunction $f347e48613385d9c$var$stopObservingMutations() {\n    $f347e48613385d9c$var$flushObserver();\n    $f347e48613385d9c$var$observer.disconnect();\n    $f347e48613385d9c$var$currentlyObserving = false;\n}\nvar $f347e48613385d9c$var$queuedMutations = [];\nfunction $f347e48613385d9c$var$flushObserver() {\n    let records = $f347e48613385d9c$var$observer.takeRecords();\n    $f347e48613385d9c$var$queuedMutations.push(()=>records.length > 0 && $f347e48613385d9c$var$onMutate(records));\n    let queueLengthWhenTriggered = $f347e48613385d9c$var$queuedMutations.length;\n    queueMicrotask(()=>{\n        if ($f347e48613385d9c$var$queuedMutations.length === queueLengthWhenTriggered) while($f347e48613385d9c$var$queuedMutations.length > 0)$f347e48613385d9c$var$queuedMutations.shift()();\n    });\n}\nfunction $f347e48613385d9c$var$flushPendingMutations() {\n    while($f347e48613385d9c$var$queuedMutations.length > 0)$f347e48613385d9c$var$queuedMutations.shift()();\n    let records = $f347e48613385d9c$var$observer.takeRecords();\n    if (records.length > 0) $f347e48613385d9c$var$onMutate(records);\n}\nfunction $f347e48613385d9c$var$mutateDom(callback) {\n    if (!$f347e48613385d9c$var$currentlyObserving) return callback();\n    $f347e48613385d9c$var$stopObservingMutations();\n    try {\n        return callback();\n    } finally{\n        $f347e48613385d9c$var$startObservingMutations();\n    }\n}\nvar $f347e48613385d9c$var$isCollecting = false;\nvar $f347e48613385d9c$var$deferredMutations = [];\nfunction $f347e48613385d9c$var$deferMutations() {\n    $f347e48613385d9c$var$isCollecting = true;\n}\nfunction $f347e48613385d9c$var$flushAndStopDeferringMutations() {\n    $f347e48613385d9c$var$isCollecting = false;\n    $f347e48613385d9c$var$onMutate($f347e48613385d9c$var$deferredMutations);\n    $f347e48613385d9c$var$deferredMutations = [];\n}\nfunction $f347e48613385d9c$var$onMutate(mutations) {\n    if ($f347e48613385d9c$var$isCollecting) {\n        $f347e48613385d9c$var$deferredMutations = $f347e48613385d9c$var$deferredMutations.concat(mutations);\n        return;\n    }\n    let addedNodes = [];\n    let removedNodes = /* @__PURE__ */ new Set();\n    let addedAttributes = /* @__PURE__ */ new Map();\n    let removedAttributes = /* @__PURE__ */ new Map();\n    for(let i = 0; i < mutations.length; i++){\n        if (mutations[i].target._x_ignoreMutationObserver) continue;\n        if (mutations[i].type === \"childList\") {\n            mutations[i].removedNodes.forEach((node)=>{\n                if (node.nodeType !== 1) return;\n                if (!node._x_marker) return;\n                removedNodes.add(node);\n            });\n            mutations[i].addedNodes.forEach((node)=>{\n                if (node.nodeType !== 1) return;\n                if (removedNodes.has(node)) {\n                    removedNodes.delete(node);\n                    return;\n                }\n                if (node._x_marker) return;\n                addedNodes.push(node);\n            });\n        }\n        if (mutations[i].type === \"attributes\") {\n            let el = mutations[i].target;\n            let name = mutations[i].attributeName;\n            let oldValue = mutations[i].oldValue;\n            let add = ()=>{\n                if (!addedAttributes.has(el)) addedAttributes.set(el, []);\n                addedAttributes.get(el).push({\n                    name: name,\n                    value: el.getAttribute(name)\n                });\n            };\n            let remove2 = ()=>{\n                if (!removedAttributes.has(el)) removedAttributes.set(el, []);\n                removedAttributes.get(el).push(name);\n            };\n            if (el.hasAttribute(name) && oldValue === null) add();\n            else if (el.hasAttribute(name)) {\n                remove2();\n                add();\n            } else remove2();\n        }\n    }\n    removedAttributes.forEach((attrs, el)=>{\n        $f347e48613385d9c$var$cleanupAttributes(el, attrs);\n    });\n    addedAttributes.forEach((attrs, el)=>{\n        $f347e48613385d9c$var$onAttributeAddeds.forEach((i)=>i(el, attrs));\n    });\n    for (let node of removedNodes){\n        if (addedNodes.some((i)=>i.contains(node))) continue;\n        $f347e48613385d9c$var$onElRemoveds.forEach((i)=>i(node));\n    }\n    for (let node of addedNodes){\n        if (!node.isConnected) continue;\n        $f347e48613385d9c$var$onElAddeds.forEach((i)=>i(node));\n    }\n    addedNodes = null;\n    removedNodes = null;\n    addedAttributes = null;\n    removedAttributes = null;\n}\n// packages/alpinejs/src/scope.js\nfunction $f347e48613385d9c$var$scope(node) {\n    return $f347e48613385d9c$var$mergeProxies($f347e48613385d9c$var$closestDataStack(node));\n}\nfunction $f347e48613385d9c$var$addScopeToNode(node, data2, referenceNode) {\n    node._x_dataStack = [\n        data2,\n        ...$f347e48613385d9c$var$closestDataStack(referenceNode || node)\n    ];\n    return ()=>{\n        node._x_dataStack = node._x_dataStack.filter((i)=>i !== data2);\n    };\n}\nfunction $f347e48613385d9c$var$closestDataStack(node) {\n    if (node._x_dataStack) return node._x_dataStack;\n    if (typeof ShadowRoot === \"function\" && node instanceof ShadowRoot) return $f347e48613385d9c$var$closestDataStack(node.host);\n    if (!node.parentNode) return [];\n    return $f347e48613385d9c$var$closestDataStack(node.parentNode);\n}\nfunction $f347e48613385d9c$var$mergeProxies(objects) {\n    return new Proxy({\n        objects: objects\n    }, $f347e48613385d9c$var$mergeProxyTrap);\n}\nfunction $f347e48613385d9c$var$keyInPrototypeChain(obj, key) {\n    if (obj === null || obj === Object.prototype) return null;\n    if (Object.prototype.hasOwnProperty.call(obj, key)) return obj;\n    return $f347e48613385d9c$var$keyInPrototypeChain(Object.getPrototypeOf(obj), key);\n}\nvar $f347e48613385d9c$var$mergeProxyTrap = {\n    ownKeys ({ objects: objects }) {\n        return Array.from(new Set(objects.flatMap((i)=>Object.keys(i))));\n    },\n    has ({ objects: objects }, name) {\n        if (name == Symbol.unscopables) return false;\n        return objects.some((obj)=>Object.prototype.hasOwnProperty.call(obj, name) || Reflect.has(obj, name));\n    },\n    get ({ objects: objects }, name, thisProxy) {\n        if (name == \"toJSON\") return $f347e48613385d9c$var$collapseProxies;\n        return Reflect.get(objects.find((obj)=>Reflect.has(obj, name)) || {}, name, thisProxy);\n    },\n    set ({ objects: objects }, name, value, thisProxy) {\n        let target;\n        for (const obj of objects){\n            target = $f347e48613385d9c$var$keyInPrototypeChain(obj, name);\n            if (target) break;\n        }\n        if (!target) target = objects[objects.length - 1];\n        const descriptor = Object.getOwnPropertyDescriptor(target, name);\n        if (descriptor?.set && descriptor?.get) return descriptor.set.call(thisProxy, value) || true;\n        return Reflect.set(target, name, value);\n    }\n};\nfunction $f347e48613385d9c$var$collapseProxies() {\n    let keys = Reflect.ownKeys(this);\n    return keys.reduce((acc, key)=>{\n        acc[key] = Reflect.get(this, key);\n        return acc;\n    }, {});\n}\n// packages/alpinejs/src/interceptor.js\nfunction $f347e48613385d9c$var$initInterceptors(data2, cleanup = ()=>{}) {\n    let isObject3 = (val)=>typeof val === \"object\" && !Array.isArray(val) && val !== null;\n    let recurse = (obj, basePath = \"\")=>{\n        Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value: value, enumerable: enumerable }])=>{\n            if (enumerable === false || value === void 0) return;\n            if (typeof value === \"object\" && value !== null && value.__v_skip) return;\n            let path = basePath === \"\" ? key : `${basePath}.${key}`;\n            if (typeof value === \"object\" && value !== null && value._x_interceptor) obj[key] = value.initialize(data2, path, key, cleanup);\n            else if (isObject3(value) && value !== obj && !(value instanceof Element)) recurse(value, path);\n        });\n    };\n    return recurse(data2);\n}\nfunction $f347e48613385d9c$var$interceptor(callback, mutateObj = ()=>{}) {\n    let obj = {\n        initialValue: void 0,\n        _x_interceptor: true,\n        initialize (data2, path, key, cleanup) {\n            return callback(this.initialValue, ()=>$f347e48613385d9c$var$get(data2, path), (value)=>$f347e48613385d9c$var$set(data2, path, value), path, key, cleanup);\n        }\n    };\n    mutateObj(obj);\n    return (initialValue)=>{\n        if (typeof initialValue === \"object\" && initialValue !== null && initialValue._x_interceptor) {\n            let initialize = obj.initialize.bind(obj);\n            obj.initialize = (data2, path, key, cleanup)=>{\n                let innerValue = initialValue.initialize(data2, path, key, cleanup);\n                obj.initialValue = innerValue;\n                return initialize(data2, path, key, cleanup);\n            };\n        } else obj.initialValue = initialValue;\n        return obj;\n    };\n}\nfunction $f347e48613385d9c$var$get(obj, path) {\n    return path.split(\".\").reduce((carry, segment)=>carry[segment], obj);\n}\nfunction $f347e48613385d9c$var$set(obj, path, value) {\n    if (typeof path === \"string\") path = path.split(\".\");\n    if (path.length === 1) obj[path[0]] = value;\n    else if (path.length === 0) throw error;\n    else {\n        if (obj[path[0]]) return $f347e48613385d9c$var$set(obj[path[0]], path.slice(1), value);\n        else {\n            obj[path[0]] = {};\n            return $f347e48613385d9c$var$set(obj[path[0]], path.slice(1), value);\n        }\n    }\n}\n// packages/alpinejs/src/magics.js\nvar $f347e48613385d9c$var$magics = {};\nfunction $f347e48613385d9c$var$magic(name, callback) {\n    $f347e48613385d9c$var$magics[name] = callback;\n}\nfunction $f347e48613385d9c$var$injectMagics(obj, el) {\n    let memoizedUtilities = $f347e48613385d9c$var$getUtilities(el);\n    Object.entries($f347e48613385d9c$var$magics).forEach(([name, callback])=>{\n        Object.defineProperty(obj, `$${name}`, {\n            get () {\n                return callback(el, memoizedUtilities);\n            },\n            enumerable: false\n        });\n    });\n    return obj;\n}\nfunction $f347e48613385d9c$var$getUtilities(el) {\n    let [utilities, cleanup] = $f347e48613385d9c$var$getElementBoundUtilities(el);\n    let utils = {\n        interceptor: $f347e48613385d9c$var$interceptor,\n        ...utilities\n    };\n    $f347e48613385d9c$var$onElRemoved(el, cleanup);\n    return utils;\n}\n// packages/alpinejs/src/utils/error.js\nfunction $f347e48613385d9c$var$tryCatch(el, expression, callback, ...args) {\n    try {\n        return callback(...args);\n    } catch (e) {\n        $f347e48613385d9c$var$handleError(e, el, expression);\n    }\n}\nfunction $f347e48613385d9c$var$handleError(...args) {\n    return $f347e48613385d9c$var$errorHandler(...args);\n}\nvar $f347e48613385d9c$var$errorHandler = $f347e48613385d9c$var$normalErrorHandler;\nfunction $f347e48613385d9c$var$setErrorHandler(handler4) {\n    $f347e48613385d9c$var$errorHandler = handler4;\n}\nfunction $f347e48613385d9c$var$normalErrorHandler(error2, el, expression) {\n    error2 = Object.assign(error2 ?? {\n        message: \"No error message given.\"\n    }, {\n        el: el,\n        expression: expression\n    });\n    console.warn(`Alpine Expression Error: ${error2.message}\n\n${expression ? 'Expression: \"' + expression + '\"\\n\\n' : \"\"}`, el);\n    setTimeout(()=>{\n        throw error2;\n    }, 0);\n}\n// packages/alpinejs/src/evaluator.js\nvar $f347e48613385d9c$var$shouldAutoEvaluateFunctions = true;\nfunction $f347e48613385d9c$var$dontAutoEvaluateFunctions(callback) {\n    let cache = $f347e48613385d9c$var$shouldAutoEvaluateFunctions;\n    $f347e48613385d9c$var$shouldAutoEvaluateFunctions = false;\n    let result = callback();\n    $f347e48613385d9c$var$shouldAutoEvaluateFunctions = cache;\n    return result;\n}\nfunction $f347e48613385d9c$var$evaluate(el, expression, extras = {}) {\n    let result;\n    $f347e48613385d9c$var$evaluateLater(el, expression)((value)=>result = value, extras);\n    return result;\n}\nfunction $f347e48613385d9c$var$evaluateLater(...args) {\n    return $f347e48613385d9c$var$theEvaluatorFunction(...args);\n}\nvar $f347e48613385d9c$var$theEvaluatorFunction = ()=>{};\nfunction $f347e48613385d9c$var$setEvaluator(newEvaluator) {\n    $f347e48613385d9c$var$theEvaluatorFunction = newEvaluator;\n}\nvar $f347e48613385d9c$var$theRawEvaluatorFunction;\nfunction $f347e48613385d9c$var$setRawEvaluator(newEvaluator) {\n    $f347e48613385d9c$var$theRawEvaluatorFunction = newEvaluator;\n}\nfunction $f347e48613385d9c$var$normalEvaluator(el, expression) {\n    let overriddenMagics = {};\n    $f347e48613385d9c$var$injectMagics(overriddenMagics, el);\n    let dataStack = [\n        overriddenMagics,\n        ...$f347e48613385d9c$var$closestDataStack(el)\n    ];\n    let evaluator = typeof expression === \"function\" ? $f347e48613385d9c$var$generateEvaluatorFromFunction(dataStack, expression) : $f347e48613385d9c$var$generateEvaluatorFromString(dataStack, expression, el);\n    return $f347e48613385d9c$var$tryCatch.bind(null, el, expression, evaluator);\n}\nfunction $f347e48613385d9c$var$generateEvaluatorFromFunction(dataStack, func) {\n    return (receiver = ()=>{}, { scope: scope2 = {}, params: params = [], context: context } = {})=>{\n        if (!$f347e48613385d9c$var$shouldAutoEvaluateFunctions) {\n            $f347e48613385d9c$var$runIfTypeOfFunction(receiver, func, $f347e48613385d9c$var$mergeProxies([\n                scope2,\n                ...dataStack\n            ]), params);\n            return;\n        }\n        let result = func.apply($f347e48613385d9c$var$mergeProxies([\n            scope2,\n            ...dataStack\n        ]), params);\n        $f347e48613385d9c$var$runIfTypeOfFunction(receiver, result);\n    };\n}\nvar $f347e48613385d9c$var$evaluatorMemo = {};\nfunction $f347e48613385d9c$var$generateFunctionFromString(expression, el) {\n    if ($f347e48613385d9c$var$evaluatorMemo[expression]) return $f347e48613385d9c$var$evaluatorMemo[expression];\n    let AsyncFunction = Object.getPrototypeOf(async function() {}).constructor;\n    let rightSideSafeExpression = /^[\\n\\s]*if.*\\(.*\\)/.test(expression.trim()) || /^(let|const)\\s/.test(expression.trim()) ? `(async()=>{ ${expression} })()` : expression;\n    const safeAsyncFunction = ()=>{\n        try {\n            let func2 = new AsyncFunction([\n                \"__self\",\n                \"scope\"\n            ], `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`);\n            Object.defineProperty(func2, \"name\", {\n                value: `[Alpine] ${expression}`\n            });\n            return func2;\n        } catch (error2) {\n            $f347e48613385d9c$var$handleError(error2, el, expression);\n            return Promise.resolve();\n        }\n    };\n    let func = safeAsyncFunction();\n    $f347e48613385d9c$var$evaluatorMemo[expression] = func;\n    return func;\n}\nfunction $f347e48613385d9c$var$generateEvaluatorFromString(dataStack, expression, el) {\n    let func = $f347e48613385d9c$var$generateFunctionFromString(expression, el);\n    return (receiver = ()=>{}, { scope: scope2 = {}, params: params = [], context: context } = {})=>{\n        func.result = void 0;\n        func.finished = false;\n        let completeScope = $f347e48613385d9c$var$mergeProxies([\n            scope2,\n            ...dataStack\n        ]);\n        if (typeof func === \"function\") {\n            let promise = func.call(context, func, completeScope).catch((error2)=>$f347e48613385d9c$var$handleError(error2, el, expression));\n            if (func.finished) {\n                $f347e48613385d9c$var$runIfTypeOfFunction(receiver, func.result, completeScope, params, el);\n                func.result = void 0;\n            } else promise.then((result)=>{\n                $f347e48613385d9c$var$runIfTypeOfFunction(receiver, result, completeScope, params, el);\n            }).catch((error2)=>$f347e48613385d9c$var$handleError(error2, el, expression)).finally(()=>func.result = void 0);\n        }\n    };\n}\nfunction $f347e48613385d9c$var$runIfTypeOfFunction(receiver, value, scope2, params, el) {\n    if ($f347e48613385d9c$var$shouldAutoEvaluateFunctions && typeof value === \"function\") {\n        let result = value.apply(scope2, params);\n        if (result instanceof Promise) result.then((i)=>$f347e48613385d9c$var$runIfTypeOfFunction(receiver, i, scope2, params)).catch((error2)=>$f347e48613385d9c$var$handleError(error2, el, value));\n        else receiver(result);\n    } else if (typeof value === \"object\" && value instanceof Promise) value.then((i)=>receiver(i));\n    else receiver(value);\n}\nfunction $f347e48613385d9c$var$evaluateRaw(...args) {\n    return $f347e48613385d9c$var$theRawEvaluatorFunction(...args);\n}\nfunction $f347e48613385d9c$var$normalRawEvaluator(el, expression, extras = {}) {\n    let overriddenMagics = {};\n    $f347e48613385d9c$var$injectMagics(overriddenMagics, el);\n    let dataStack = [\n        overriddenMagics,\n        ...$f347e48613385d9c$var$closestDataStack(el)\n    ];\n    let scope2 = $f347e48613385d9c$var$mergeProxies([\n        extras.scope ?? {},\n        ...dataStack\n    ]);\n    let params = extras.params ?? [];\n    if (expression.includes(\"await\")) {\n        let AsyncFunction = Object.getPrototypeOf(async function() {}).constructor;\n        let rightSideSafeExpression = /^[\\n\\s]*if.*\\(.*\\)/.test(expression.trim()) || /^(let|const)\\s/.test(expression.trim()) ? `(async()=>{ ${expression} })()` : expression;\n        let func = new AsyncFunction([\n            \"scope\"\n        ], `with (scope) { let __result = ${rightSideSafeExpression}; return __result }`);\n        let result = func.call(extras.context, scope2);\n        return result;\n    } else {\n        let rightSideSafeExpression = /^[\\n\\s]*if.*\\(.*\\)/.test(expression.trim()) || /^(let|const)\\s/.test(expression.trim()) ? `(()=>{ ${expression} })()` : expression;\n        let func = new Function([\n            \"scope\"\n        ], `with (scope) { let __result = ${rightSideSafeExpression}; return __result }`);\n        let result = func.call(extras.context, scope2);\n        if (typeof result === \"function\" && $f347e48613385d9c$var$shouldAutoEvaluateFunctions) return result.apply(scope2, params);\n        return result;\n    }\n}\n// packages/alpinejs/src/directives.js\nvar $f347e48613385d9c$var$prefixAsString = \"x-\";\nfunction $f347e48613385d9c$var$prefix(subject = \"\") {\n    return $f347e48613385d9c$var$prefixAsString + subject;\n}\nfunction $f347e48613385d9c$var$setPrefix(newPrefix) {\n    $f347e48613385d9c$var$prefixAsString = newPrefix;\n}\nvar $f347e48613385d9c$var$directiveHandlers = {};\nfunction $f347e48613385d9c$var$directive(name, callback) {\n    $f347e48613385d9c$var$directiveHandlers[name] = callback;\n    return {\n        before (directive2) {\n            if (!$f347e48613385d9c$var$directiveHandlers[directive2]) {\n                console.warn(String.raw`Cannot find directive \\`${directive2}\\`. \\`${name}\\` will use the default order of execution`);\n                return;\n            }\n            const pos = $f347e48613385d9c$var$directiveOrder.indexOf(directive2);\n            $f347e48613385d9c$var$directiveOrder.splice(pos >= 0 ? pos : $f347e48613385d9c$var$directiveOrder.indexOf(\"DEFAULT\"), 0, name);\n        }\n    };\n}\nfunction $f347e48613385d9c$var$directiveExists(name) {\n    return Object.keys($f347e48613385d9c$var$directiveHandlers).includes(name);\n}\nfunction $f347e48613385d9c$var$directives(el, attributes, originalAttributeOverride) {\n    attributes = Array.from(attributes);\n    if (el._x_virtualDirectives) {\n        let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value])=>({\n                name: name,\n                value: value\n            }));\n        let staticAttributes = $f347e48613385d9c$var$attributesOnly(vAttributes);\n        vAttributes = vAttributes.map((attribute)=>{\n            if (staticAttributes.find((attr)=>attr.name === attribute.name)) return {\n                name: `x-bind:${attribute.name}`,\n                value: `\"${attribute.value}\"`\n            };\n            return attribute;\n        });\n        attributes = attributes.concat(vAttributes);\n    }\n    let transformedAttributeMap = {};\n    let directives2 = attributes.map($f347e48613385d9c$var$toTransformedAttributes((newName, oldName)=>transformedAttributeMap[newName] = oldName)).filter($f347e48613385d9c$var$outNonAlpineAttributes).map($f347e48613385d9c$var$toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort($f347e48613385d9c$var$byPriority);\n    return directives2.map((directive2)=>{\n        return $f347e48613385d9c$var$getDirectiveHandler(el, directive2);\n    });\n}\nfunction $f347e48613385d9c$var$attributesOnly(attributes) {\n    return Array.from(attributes).map($f347e48613385d9c$var$toTransformedAttributes()).filter((attr)=>!$f347e48613385d9c$var$outNonAlpineAttributes(attr));\n}\nvar $f347e48613385d9c$var$isDeferringHandlers = false;\nvar $f347e48613385d9c$var$directiveHandlerStacks = /* @__PURE__ */ new Map();\nvar $f347e48613385d9c$var$currentHandlerStackKey = Symbol();\nfunction $f347e48613385d9c$var$deferHandlingDirectives(callback) {\n    $f347e48613385d9c$var$isDeferringHandlers = true;\n    let key = Symbol();\n    $f347e48613385d9c$var$currentHandlerStackKey = key;\n    $f347e48613385d9c$var$directiveHandlerStacks.set(key, []);\n    let flushHandlers = ()=>{\n        while($f347e48613385d9c$var$directiveHandlerStacks.get(key).length)$f347e48613385d9c$var$directiveHandlerStacks.get(key).shift()();\n        $f347e48613385d9c$var$directiveHandlerStacks.delete(key);\n    };\n    let stopDeferring = ()=>{\n        $f347e48613385d9c$var$isDeferringHandlers = false;\n        flushHandlers();\n    };\n    callback(flushHandlers);\n    stopDeferring();\n}\nfunction $f347e48613385d9c$var$getElementBoundUtilities(el) {\n    let cleanups = [];\n    let cleanup = (callback)=>cleanups.push(callback);\n    let [effect3, cleanupEffect2] = $f347e48613385d9c$var$elementBoundEffect(el);\n    cleanups.push(cleanupEffect2);\n    let utilities = {\n        Alpine: $f347e48613385d9c$var$alpine_default,\n        effect: effect3,\n        cleanup: cleanup,\n        evaluateLater: $f347e48613385d9c$var$evaluateLater.bind($f347e48613385d9c$var$evaluateLater, el),\n        evaluate: $f347e48613385d9c$var$evaluate.bind($f347e48613385d9c$var$evaluate, el)\n    };\n    let doCleanup = ()=>cleanups.forEach((i)=>i());\n    return [\n        utilities,\n        doCleanup\n    ];\n}\nfunction $f347e48613385d9c$var$getDirectiveHandler(el, directive2) {\n    let noop = ()=>{};\n    let handler4 = $f347e48613385d9c$var$directiveHandlers[directive2.type] || noop;\n    let [utilities, cleanup] = $f347e48613385d9c$var$getElementBoundUtilities(el);\n    $f347e48613385d9c$var$onAttributeRemoved(el, directive2.original, cleanup);\n    let fullHandler = ()=>{\n        if (el._x_ignore || el._x_ignoreSelf) return;\n        handler4.inline && handler4.inline(el, directive2, utilities);\n        handler4 = handler4.bind(handler4, el, directive2, utilities);\n        $f347e48613385d9c$var$isDeferringHandlers ? $f347e48613385d9c$var$directiveHandlerStacks.get($f347e48613385d9c$var$currentHandlerStackKey).push(handler4) : handler4();\n    };\n    fullHandler.runCleanups = cleanup;\n    return fullHandler;\n}\nvar $f347e48613385d9c$var$startingWith = (subject, replacement)=>({ name: name, value: value })=>{\n        if (name.startsWith(subject)) name = name.replace(subject, replacement);\n        return {\n            name: name,\n            value: value\n        };\n    };\nvar $f347e48613385d9c$var$into = (i)=>i;\nfunction $f347e48613385d9c$var$toTransformedAttributes(callback = ()=>{}) {\n    return ({ name: name, value: value })=>{\n        let { name: newName, value: newValue } = $f347e48613385d9c$var$attributeTransformers.reduce((carry, transform)=>{\n            return transform(carry);\n        }, {\n            name: name,\n            value: value\n        });\n        if (newName !== name) callback(newName, name);\n        return {\n            name: newName,\n            value: newValue\n        };\n    };\n}\nvar $f347e48613385d9c$var$attributeTransformers = [];\nfunction $f347e48613385d9c$var$mapAttributes(callback) {\n    $f347e48613385d9c$var$attributeTransformers.push(callback);\n}\nfunction $f347e48613385d9c$var$outNonAlpineAttributes({ name: name }) {\n    return $f347e48613385d9c$var$alpineAttributeRegex().test(name);\n}\nvar $f347e48613385d9c$var$alpineAttributeRegex = ()=>new RegExp(`^${$f347e48613385d9c$var$prefixAsString}([^:^.]+)\\\\b`);\nfunction $f347e48613385d9c$var$toParsedDirectives(transformedAttributeMap, originalAttributeOverride) {\n    return ({ name: name, value: value })=>{\n        if (name === value) value = \"\";\n        let typeMatch = name.match($f347e48613385d9c$var$alpineAttributeRegex());\n        let valueMatch = name.match(/:([a-zA-Z0-9\\-_:]+)/);\n        let modifiers = name.match(/\\.[^.\\]]+(?=[^\\]]*$)/g) || [];\n        let original = originalAttributeOverride || transformedAttributeMap[name] || name;\n        return {\n            type: typeMatch ? typeMatch[1] : null,\n            value: valueMatch ? valueMatch[1] : null,\n            modifiers: modifiers.map((i)=>i.replace(\".\", \"\")),\n            expression: value,\n            original: original\n        };\n    };\n}\nvar $f347e48613385d9c$var$DEFAULT = \"DEFAULT\";\nvar $f347e48613385d9c$var$directiveOrder = [\n    \"ignore\",\n    \"ref\",\n    \"id\",\n    \"data\",\n    \"anchor\",\n    \"bind\",\n    \"init\",\n    \"for\",\n    \"model\",\n    \"modelable\",\n    \"transition\",\n    \"show\",\n    \"if\",\n    $f347e48613385d9c$var$DEFAULT,\n    \"teleport\"\n];\nfunction $f347e48613385d9c$var$byPriority(a, b) {\n    let typeA = $f347e48613385d9c$var$directiveOrder.indexOf(a.type) === -1 ? $f347e48613385d9c$var$DEFAULT : a.type;\n    let typeB = $f347e48613385d9c$var$directiveOrder.indexOf(b.type) === -1 ? $f347e48613385d9c$var$DEFAULT : b.type;\n    return $f347e48613385d9c$var$directiveOrder.indexOf(typeA) - $f347e48613385d9c$var$directiveOrder.indexOf(typeB);\n}\n// packages/alpinejs/src/utils/walk.js\nfunction $f347e48613385d9c$var$walk(el, callback) {\n    if (typeof ShadowRoot === \"function\" && el instanceof ShadowRoot) {\n        Array.from(el.children).forEach((el2)=>$f347e48613385d9c$var$walk(el2, callback));\n        return;\n    }\n    let skip = false;\n    callback(el, ()=>skip = true);\n    if (skip) return;\n    let node = el.firstElementChild;\n    while(node){\n        $f347e48613385d9c$var$walk(node, callback, false);\n        node = node.nextElementSibling;\n    }\n}\n// packages/alpinejs/src/clone.js\nvar $f347e48613385d9c$var$isCloning = false;\nfunction $f347e48613385d9c$var$skipDuringClone(callback, fallback = ()=>{}) {\n    return (...args)=>$f347e48613385d9c$var$isCloning ? fallback(...args) : callback(...args);\n}\nfunction $f347e48613385d9c$var$onlyDuringClone(callback) {\n    return (...args)=>$f347e48613385d9c$var$isCloning && callback(...args);\n}\nvar $f347e48613385d9c$var$interceptors = [];\nfunction $f347e48613385d9c$var$interceptClone(callback) {\n    $f347e48613385d9c$var$interceptors.push(callback);\n}\nfunction $f347e48613385d9c$var$cloneNode(from, to) {\n    $f347e48613385d9c$var$interceptors.forEach((i)=>i(from, to));\n    $f347e48613385d9c$var$isCloning = true;\n    $f347e48613385d9c$var$dontRegisterReactiveSideEffects(()=>{\n        $f347e48613385d9c$var$initTree(to, (el, callback)=>{\n            callback(el, ()=>{});\n        });\n    });\n    $f347e48613385d9c$var$isCloning = false;\n}\nvar $f347e48613385d9c$var$isCloningLegacy = false;\nfunction $f347e48613385d9c$var$clone(oldEl, newEl) {\n    if (!newEl._x_dataStack) newEl._x_dataStack = oldEl._x_dataStack;\n    $f347e48613385d9c$var$isCloning = true;\n    $f347e48613385d9c$var$isCloningLegacy = true;\n    $f347e48613385d9c$var$dontRegisterReactiveSideEffects(()=>{\n        $f347e48613385d9c$var$cloneTree(newEl);\n    });\n    $f347e48613385d9c$var$isCloning = false;\n    $f347e48613385d9c$var$isCloningLegacy = false;\n}\nfunction $f347e48613385d9c$var$cloneTree(el) {\n    let hasRunThroughFirstEl = false;\n    let shallowWalker = (el2, callback)=>{\n        $f347e48613385d9c$var$walk(el2, (el3, skip)=>{\n            if (hasRunThroughFirstEl && $f347e48613385d9c$var$isRoot(el3)) return skip();\n            hasRunThroughFirstEl = true;\n            callback(el3, skip);\n        });\n    };\n    $f347e48613385d9c$var$initTree(el, shallowWalker);\n}\nfunction $f347e48613385d9c$var$dontRegisterReactiveSideEffects(callback) {\n    let cache = $f347e48613385d9c$var$effect;\n    $f347e48613385d9c$var$overrideEffect((callback2, el)=>{\n        let storedEffect = cache(callback2);\n        $f347e48613385d9c$var$release(storedEffect);\n        return ()=>{};\n    });\n    callback();\n    $f347e48613385d9c$var$overrideEffect(cache);\n}\n// packages/alpinejs/src/deferInit.js\nvar $f347e48613385d9c$var$activeDefers = 0;\nfunction $f347e48613385d9c$var$deferInit(el, promise) {\n    let record = el._x_deferInit;\n    if (!record) {\n        record = el._x_deferInit = {\n            pending: 0,\n            ownsIgnore: !el._x_ignore,\n            queuedAttributes: /* @__PURE__ */ new Map()\n        };\n        if (record.ownsIgnore) el._x_ignore = true;\n        $f347e48613385d9c$var$activeDefers++;\n    }\n    record.pending++;\n    Promise.resolve(promise).catch((error2)=>{\n        try {\n            $f347e48613385d9c$var$handleError(error2, el);\n        } catch (error3) {\n            setTimeout(()=>{\n                throw error3;\n            }, 0);\n        }\n    }).then(()=>$f347e48613385d9c$var$settle(el, record));\n}\nfunction $f347e48613385d9c$var$settle(el, record) {\n    record.pending--;\n    if (record.pending > 0) return;\n    $f347e48613385d9c$var$flushPendingMutations();\n    if (record.pending > 0) return;\n    if (el._x_deferInit !== record) return;\n    delete el._x_deferInit;\n    if (record.ownsIgnore) delete el._x_ignore;\n    $f347e48613385d9c$var$activeDefers--;\n    if (!el.isConnected) return;\n    $f347e48613385d9c$var$replayQueuedAttributes(record);\n    $f347e48613385d9c$var$initTree(el);\n}\nfunction $f347e48613385d9c$var$queueAttributesForDeferredTree(el, attrs) {\n    if ($f347e48613385d9c$var$activeDefers === 0) return false;\n    let root = $f347e48613385d9c$var$findClosest(el, (i)=>i._x_deferInit);\n    if (!root) return false;\n    $f347e48613385d9c$var$queueInto(root._x_deferInit, el, attrs.map(({ name: name })=>name));\n    return true;\n}\nfunction $f347e48613385d9c$var$queueInto(record, el, names) {\n    let entry = record.queuedAttributes.get(el);\n    if (!entry || entry.marker !== el._x_marker) {\n        entry = {\n            marker: el._x_marker,\n            names: /* @__PURE__ */ new Set()\n        };\n        record.queuedAttributes.set(el, entry);\n    }\n    names.forEach((name)=>entry.names.add(name));\n}\nfunction $f347e48613385d9c$var$replayQueuedAttributes(record) {\n    record.queuedAttributes.forEach((entry, el)=>{\n        if (!el.isConnected) return;\n        if (!el._x_marker) return;\n        if (el._x_marker !== entry.marker) return;\n        let suspendedAncestor = $f347e48613385d9c$var$findClosest(el, (i)=>i._x_deferInit);\n        if (suspendedAncestor) {\n            $f347e48613385d9c$var$queueInto(suspendedAncestor._x_deferInit, el, Array.from(entry.names));\n            return;\n        }\n        let attrs = Array.from(entry.names).filter((name)=>el.hasAttribute(name)).map((name)=>({\n                name: name,\n                value: el.getAttribute(name)\n            }));\n        if (attrs.length === 0) return;\n        $f347e48613385d9c$var$directives(el, attrs).forEach((handle)=>handle());\n    });\n}\n$f347e48613385d9c$var$interceptClone((from, to)=>{\n    if ($f347e48613385d9c$var$activeDefers === 0) return;\n    if (!from || from.nodeType !== 1 || !to || to.nodeType !== 1) return;\n    if ($f347e48613385d9c$var$findClosest(from, (i)=>i._x_deferInit)) to._x_ignore = true;\n});\n// packages/alpinejs/src/utils/dispatch.js\nfunction $f347e48613385d9c$var$dispatch(el, name, detail = {}, options = {}) {\n    return el.dispatchEvent(new CustomEvent(name, {\n        detail: detail,\n        bubbles: true,\n        // Allows events to pass the shadow DOM barrier.\n        composed: true,\n        cancelable: true,\n        // Allows overriding the default event options.\n        ...options\n    }));\n}\n// packages/alpinejs/src/utils/warn.js\nfunction $f347e48613385d9c$var$warn(message, ...args) {\n    console.warn(`Alpine Warning: ${message}`, ...args);\n}\n// packages/alpinejs/src/lifecycle.js\nvar $f347e48613385d9c$var$started = false;\nfunction $f347e48613385d9c$var$start() {\n    if ($f347e48613385d9c$var$started) $f347e48613385d9c$var$warn(\"Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.\");\n    $f347e48613385d9c$var$started = true;\n    if (!document.body) $f347e48613385d9c$var$warn(\"Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?\");\n    $f347e48613385d9c$var$dispatch(document, \"alpine:init\");\n    $f347e48613385d9c$var$dispatch(document, \"alpine:initializing\");\n    $f347e48613385d9c$var$startObservingMutations();\n    $f347e48613385d9c$var$onElAdded((el)=>$f347e48613385d9c$var$initTree(el, $f347e48613385d9c$var$walk));\n    $f347e48613385d9c$var$onElRemoved((el)=>$f347e48613385d9c$var$destroyTree(el));\n    $f347e48613385d9c$var$onAttributesAdded((el, attrs)=>{\n        if ($f347e48613385d9c$var$queueAttributesForDeferredTree(el, attrs)) return;\n        $f347e48613385d9c$var$directives(el, attrs).forEach((handle)=>handle());\n    });\n    let outNestedComponents = (el)=>!$f347e48613385d9c$var$closestRoot(el.parentElement, true);\n    Array.from(document.querySelectorAll($f347e48613385d9c$var$allSelectors().join(\",\"))).filter(outNestedComponents).forEach((el)=>{\n        $f347e48613385d9c$var$initTree(el);\n    });\n    $f347e48613385d9c$var$dispatch(document, \"alpine:initialized\");\n    setTimeout(()=>{\n        $f347e48613385d9c$var$warnAboutMissingPlugins();\n    });\n}\nvar $f347e48613385d9c$var$rootSelectorCallbacks = [];\nvar $f347e48613385d9c$var$initSelectorCallbacks = [];\nfunction $f347e48613385d9c$var$rootSelectors() {\n    return $f347e48613385d9c$var$rootSelectorCallbacks.map((fn)=>fn());\n}\nfunction $f347e48613385d9c$var$allSelectors() {\n    return $f347e48613385d9c$var$rootSelectorCallbacks.concat($f347e48613385d9c$var$initSelectorCallbacks).map((fn)=>fn());\n}\nfunction $f347e48613385d9c$var$addRootSelector(selectorCallback) {\n    $f347e48613385d9c$var$rootSelectorCallbacks.push(selectorCallback);\n}\nfunction $f347e48613385d9c$var$addInitSelector(selectorCallback) {\n    $f347e48613385d9c$var$initSelectorCallbacks.push(selectorCallback);\n}\nfunction $f347e48613385d9c$var$closestRoot(el, includeInitSelectors = false) {\n    return $f347e48613385d9c$var$findClosest(el, (element)=>{\n        const selectors = includeInitSelectors ? $f347e48613385d9c$var$allSelectors() : $f347e48613385d9c$var$rootSelectors();\n        if (selectors.some((selector)=>element.matches(selector))) return true;\n    });\n}\nfunction $f347e48613385d9c$var$findClosest(el, callback) {\n    if (!el) return;\n    if (callback(el)) return el;\n    if (el._x_teleportBack) return $f347e48613385d9c$var$findClosest(el._x_teleportBack, callback);\n    if (el.parentNode instanceof ShadowRoot) return $f347e48613385d9c$var$findClosest(el.parentNode.host, callback);\n    if (!el.parentElement) return;\n    return $f347e48613385d9c$var$findClosest(el.parentElement, callback);\n}\nfunction $f347e48613385d9c$var$isRoot(el) {\n    return $f347e48613385d9c$var$rootSelectors().some((selector)=>el.matches(selector));\n}\nvar $f347e48613385d9c$var$initInterceptors2 = [];\nfunction $f347e48613385d9c$var$interceptInit(callback) {\n    $f347e48613385d9c$var$initInterceptors2.push(callback);\n}\nvar $f347e48613385d9c$var$markerDispenser = 1;\nfunction $f347e48613385d9c$var$initTree(el, walker = $f347e48613385d9c$var$walk, intercept = ()=>{}) {\n    if ($f347e48613385d9c$var$findClosest(el, (i)=>i._x_ignore)) return;\n    $f347e48613385d9c$var$deferHandlingDirectives(()=>{\n        walker(el, (el2, skip)=>{\n            if (el2._x_marker) return;\n            intercept(el2, skip);\n            $f347e48613385d9c$var$initInterceptors2.forEach((i)=>i(el2, skip));\n            $f347e48613385d9c$var$directives(el2, el2.attributes).forEach((handle)=>handle());\n            if (!el2._x_ignore) el2._x_marker = $f347e48613385d9c$var$markerDispenser++;\n            el2._x_ignore && skip();\n        });\n    });\n}\nfunction $f347e48613385d9c$var$destroyTree(root, walker = $f347e48613385d9c$var$walk) {\n    walker(root, (el)=>{\n        $f347e48613385d9c$var$cleanupElement(el);\n        $f347e48613385d9c$var$cleanupAttributes(el);\n        delete el._x_marker;\n    });\n}\nfunction $f347e48613385d9c$var$warnAboutMissingPlugins() {\n    let pluginDirectives = [\n        [\n            \"ui\",\n            \"dialog\",\n            [\n                \"[x-dialog], [x-popover]\"\n            ]\n        ],\n        [\n            \"anchor\",\n            \"anchor\",\n            [\n                \"[x-anchor]\"\n            ]\n        ],\n        [\n            \"sort\",\n            \"sort\",\n            [\n                \"[x-sort]\"\n            ]\n        ]\n    ];\n    pluginDirectives.forEach(([plugin2, directive2, selectors])=>{\n        if ($f347e48613385d9c$var$directiveExists(directive2)) return;\n        selectors.some((selector)=>{\n            if (document.querySelector(selector)) {\n                $f347e48613385d9c$var$warn(`found \"${selector}\", but missing ${plugin2} plugin`);\n                return true;\n            }\n        });\n    });\n}\n// packages/alpinejs/src/nextTick.js\nvar $f347e48613385d9c$var$tickStack = [];\nvar $f347e48613385d9c$var$isHolding = false;\nfunction $f347e48613385d9c$var$nextTick(callback = ()=>{}) {\n    queueMicrotask(()=>{\n        $f347e48613385d9c$var$isHolding || setTimeout(()=>{\n            $f347e48613385d9c$var$releaseNextTicks();\n        });\n    });\n    return new Promise((res)=>{\n        $f347e48613385d9c$var$tickStack.push(()=>{\n            callback();\n            res();\n        });\n    });\n}\nfunction $f347e48613385d9c$var$releaseNextTicks() {\n    $f347e48613385d9c$var$isHolding = false;\n    while($f347e48613385d9c$var$tickStack.length)$f347e48613385d9c$var$tickStack.shift()();\n}\nfunction $f347e48613385d9c$var$holdNextTicks() {\n    $f347e48613385d9c$var$isHolding = true;\n}\n// packages/alpinejs/src/utils/classes.js\nfunction $f347e48613385d9c$var$setClasses(el, value) {\n    if (Array.isArray(value)) return $f347e48613385d9c$var$setClassesFromString(el, value.join(\" \"));\n    else if (typeof value === \"object\" && value !== null) return $f347e48613385d9c$var$setClassesFromObject(el, value);\n    else if (typeof value === \"function\") return $f347e48613385d9c$var$setClasses(el, value());\n    return $f347e48613385d9c$var$setClassesFromString(el, value);\n}\nfunction $f347e48613385d9c$var$splitClasses(classString) {\n    return classString.split(/\\s/).filter(Boolean);\n}\nfunction $f347e48613385d9c$var$setClassesFromString(el, classString) {\n    let missingClasses = (classString2)=>$f347e48613385d9c$var$splitClasses(classString2).filter((i)=>!el.classList.contains(i)).filter(Boolean);\n    let addClassesAndReturnUndo = (classes)=>{\n        el.classList.add(...classes);\n        return ()=>{\n            el.classList.remove(...classes);\n        };\n    };\n    classString = classString === true ? classString = \"\" : classString || \"\";\n    return addClassesAndReturnUndo(missingClasses(classString));\n}\nfunction $f347e48613385d9c$var$setClassesFromObject(el, classObject) {\n    let forAdd = Object.entries(classObject).flatMap(([classString, bool])=>bool ? $f347e48613385d9c$var$splitClasses(classString) : false).filter(Boolean);\n    let forRemove = Object.entries(classObject).flatMap(([classString, bool])=>!bool ? $f347e48613385d9c$var$splitClasses(classString) : false).filter(Boolean);\n    let added = [];\n    let removed = [];\n    forRemove.forEach((i)=>{\n        if (el.classList.contains(i)) {\n            el.classList.remove(i);\n            removed.push(i);\n        }\n    });\n    forAdd.forEach((i)=>{\n        if (!el.classList.contains(i)) {\n            el.classList.add(i);\n            added.push(i);\n        }\n    });\n    return ()=>{\n        removed.forEach((i)=>el.classList.add(i));\n        added.forEach((i)=>el.classList.remove(i));\n    };\n}\n// packages/alpinejs/src/utils/styles.js\nfunction $f347e48613385d9c$var$setStyles(el, value) {\n    if (typeof value === \"object\" && value !== null) return $f347e48613385d9c$var$setStylesFromObject(el, value);\n    return $f347e48613385d9c$var$setStylesFromString(el, value);\n}\nfunction $f347e48613385d9c$var$setStylesFromObject(el, value) {\n    let previousStyles = {};\n    Object.entries(value).forEach(([key, value2])=>{\n        previousStyles[key] = el.style[key];\n        if (!key.startsWith(\"--\")) key = $f347e48613385d9c$var$kebabCase(key);\n        el.style.setProperty(key, value2);\n    });\n    setTimeout(()=>{\n        if (el.style.length === 0) el.removeAttribute(\"style\");\n    });\n    return ()=>{\n        $f347e48613385d9c$var$setStyles(el, previousStyles);\n    };\n}\nfunction $f347e48613385d9c$var$setStylesFromString(el, value) {\n    let cache = el.getAttribute(\"style\", value);\n    el.setAttribute(\"style\", value);\n    return ()=>{\n        el.setAttribute(\"style\", cache || \"\");\n    };\n}\nfunction $f347e48613385d9c$var$kebabCase(subject) {\n    return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n// packages/alpinejs/src/utils/once.js\nfunction $f347e48613385d9c$var$once(callback, fallback = ()=>{}) {\n    let called = false;\n    return function() {\n        if (!called) {\n            called = true;\n            callback.apply(this, arguments);\n        } else fallback.apply(this, arguments);\n    };\n}\n// packages/alpinejs/src/directives/x-transition.js\n$f347e48613385d9c$var$directive(\"transition\", (el, { value: value, modifiers: modifiers, expression: expression }, { evaluate: evaluate2 })=>{\n    if (typeof expression === \"function\") expression = evaluate2(expression);\n    if (expression === false) return;\n    if (!expression || typeof expression === \"boolean\") $f347e48613385d9c$var$registerTransitionsFromHelper(el, modifiers, value);\n    else $f347e48613385d9c$var$registerTransitionsFromClassString(el, expression, value);\n});\nfunction $f347e48613385d9c$var$registerTransitionsFromClassString(el, classString, stage) {\n    $f347e48613385d9c$var$registerTransitionObject(el, $f347e48613385d9c$var$setClasses, \"\");\n    let directiveStorageMap = {\n        \"enter\": (classes)=>{\n            el._x_transition.enter.during = classes;\n        },\n        \"enter-start\": (classes)=>{\n            el._x_transition.enter.start = classes;\n        },\n        \"enter-end\": (classes)=>{\n            el._x_transition.enter.end = classes;\n        },\n        \"leave\": (classes)=>{\n            el._x_transition.leave.during = classes;\n        },\n        \"leave-start\": (classes)=>{\n            el._x_transition.leave.start = classes;\n        },\n        \"leave-end\": (classes)=>{\n            el._x_transition.leave.end = classes;\n        }\n    };\n    directiveStorageMap[stage](classString);\n}\nfunction $f347e48613385d9c$var$registerTransitionsFromHelper(el, modifiers, stage) {\n    $f347e48613385d9c$var$registerTransitionObject(el, $f347e48613385d9c$var$setStyles);\n    let doesntSpecify = !modifiers.includes(\"in\") && !modifiers.includes(\"out\") && !stage;\n    let transitioningIn = doesntSpecify || modifiers.includes(\"in\") || [\n        \"enter\"\n    ].includes(stage);\n    let transitioningOut = doesntSpecify || modifiers.includes(\"out\") || [\n        \"leave\"\n    ].includes(stage);\n    if (modifiers.includes(\"in\") && !doesntSpecify) modifiers = modifiers.filter((i, index)=>index < modifiers.indexOf(\"out\"));\n    if (modifiers.includes(\"out\") && !doesntSpecify) modifiers = modifiers.filter((i, index)=>index > modifiers.indexOf(\"out\"));\n    let wantsAll = !modifiers.includes(\"opacity\") && !modifiers.includes(\"scale\");\n    let wantsOpacity = wantsAll || modifiers.includes(\"opacity\");\n    let wantsScale = wantsAll || modifiers.includes(\"scale\");\n    let opacityValue = wantsOpacity ? 0 : 1;\n    let scaleValue = wantsScale ? $f347e48613385d9c$var$modifierValue(modifiers, \"scale\", 95) / 100 : 1;\n    let delay = $f347e48613385d9c$var$modifierValue(modifiers, \"delay\", 0) / 1e3;\n    let origin = $f347e48613385d9c$var$modifierValue(modifiers, \"origin\", \"center\");\n    let property = \"opacity, transform\";\n    let durationIn = $f347e48613385d9c$var$modifierValue(modifiers, \"duration\", 150) / 1e3;\n    let durationOut = $f347e48613385d9c$var$modifierValue(modifiers, \"duration\", 75) / 1e3;\n    let easing = `cubic-bezier(0.4, 0.0, 0.2, 1)`;\n    if (transitioningIn) {\n        el._x_transition.enter.during = {\n            transformOrigin: origin,\n            transitionDelay: `${delay}s`,\n            transitionProperty: property,\n            transitionDuration: `${durationIn}s`,\n            transitionTimingFunction: easing\n        };\n        el._x_transition.enter.start = {\n            opacity: opacityValue,\n            transform: `scale(${scaleValue})`\n        };\n        el._x_transition.enter.end = {\n            opacity: 1,\n            transform: `scale(1)`\n        };\n    }\n    if (transitioningOut) {\n        el._x_transition.leave.during = {\n            transformOrigin: origin,\n            transitionDelay: `${delay}s`,\n            transitionProperty: property,\n            transitionDuration: `${durationOut}s`,\n            transitionTimingFunction: easing\n        };\n        el._x_transition.leave.start = {\n            opacity: 1,\n            transform: `scale(1)`\n        };\n        el._x_transition.leave.end = {\n            opacity: opacityValue,\n            transform: `scale(${scaleValue})`\n        };\n    }\n}\nfunction $f347e48613385d9c$var$registerTransitionObject(el, setFunction, defaultValue = {}) {\n    if (!el._x_transition) el._x_transition = {\n        enter: {\n            during: defaultValue,\n            start: defaultValue,\n            end: defaultValue\n        },\n        leave: {\n            during: defaultValue,\n            start: defaultValue,\n            end: defaultValue\n        },\n        in (before = ()=>{}, after = ()=>{}) {\n            $f347e48613385d9c$var$transition(el, setFunction, {\n                during: this.enter.during,\n                start: this.enter.start,\n                end: this.enter.end\n            }, before, after);\n        },\n        out (before = ()=>{}, after = ()=>{}) {\n            $f347e48613385d9c$var$transition(el, setFunction, {\n                during: this.leave.during,\n                start: this.leave.start,\n                end: this.leave.end\n            }, before, after);\n        }\n    };\n}\nwindow.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value, show, hide) {\n    const nextTick2 = document.visibilityState === \"visible\" ? requestAnimationFrame : setTimeout;\n    let clickAwayCompatibleShow = ()=>nextTick2(show);\n    if (value) {\n        if (el._x_transition && (el._x_transition.enter || el._x_transition.leave)) el._x_transition.enter && (Object.entries(el._x_transition.enter.during).length || Object.entries(el._x_transition.enter.start).length || Object.entries(el._x_transition.enter.end).length) ? el._x_transition.in(show) : clickAwayCompatibleShow();\n        else el._x_transition ? el._x_transition.in(show) : clickAwayCompatibleShow();\n        return;\n    }\n    el._x_hidePromise = el._x_transition ? new Promise((resolve, reject)=>{\n        el._x_transition.out(()=>{}, ()=>resolve(hide));\n        el._x_transitioning && el._x_transitioning.beforeCancel(()=>reject({\n                isFromCancelledTransition: true\n            }));\n    }) : Promise.resolve(hide);\n    queueMicrotask(()=>{\n        let closest = $f347e48613385d9c$var$closestHide(el);\n        if (closest) {\n            if (!closest._x_hideChildren) closest._x_hideChildren = [];\n            closest._x_hideChildren.push(el);\n        } else nextTick2(()=>{\n            let hideAfterChildren = (el2)=>{\n                let carry = Promise.all([\n                    el2._x_hidePromise,\n                    ...(el2._x_hideChildren || []).map(hideAfterChildren)\n                ]).then(([i])=>i?.());\n                delete el2._x_hidePromise;\n                delete el2._x_hideChildren;\n                return carry;\n            };\n            hideAfterChildren(el).catch((e)=>{\n                if (!e.isFromCancelledTransition) throw e;\n            });\n        });\n    });\n};\nfunction $f347e48613385d9c$var$closestHide(el) {\n    let parent = el.parentNode;\n    if (!parent) return;\n    return parent._x_hidePromise ? parent : $f347e48613385d9c$var$closestHide(parent);\n}\nfunction $f347e48613385d9c$var$transition(el, setFunction, { during: during, start: start2, end: end } = {}, before = ()=>{}, after = ()=>{}) {\n    if (el._x_transitioning) el._x_transitioning.cancel();\n    if (Object.keys(during).length === 0 && Object.keys(start2).length === 0 && Object.keys(end).length === 0) {\n        before();\n        after();\n        return;\n    }\n    let undoStart, undoDuring, undoEnd;\n    $f347e48613385d9c$var$performTransition(el, {\n        start () {\n            undoStart = setFunction(el, start2);\n        },\n        during () {\n            undoDuring = setFunction(el, during);\n        },\n        before: before,\n        end () {\n            undoStart();\n            undoEnd = setFunction(el, end);\n        },\n        after: after,\n        cleanup () {\n            undoDuring();\n            undoEnd();\n        }\n    });\n}\nfunction $f347e48613385d9c$var$performTransition(el, stages) {\n    let interrupted, reachedBefore, reachedEnd;\n    let finish = $f347e48613385d9c$var$once(()=>{\n        $f347e48613385d9c$var$mutateDom(()=>{\n            interrupted = true;\n            if (!reachedBefore) stages.before();\n            if (!reachedEnd) {\n                stages.end();\n                $f347e48613385d9c$var$releaseNextTicks();\n            }\n            stages.after();\n            if (el.isConnected) stages.cleanup();\n            delete el._x_transitioning;\n        });\n    });\n    el._x_transitioning = {\n        beforeCancels: [],\n        beforeCancel (callback) {\n            this.beforeCancels.push(callback);\n        },\n        cancel: $f347e48613385d9c$var$once(function() {\n            while(this.beforeCancels.length)this.beforeCancels.shift()();\n            finish();\n        }),\n        finish: finish\n    };\n    $f347e48613385d9c$var$mutateDom(()=>{\n        stages.start();\n        stages.during();\n    });\n    $f347e48613385d9c$var$holdNextTicks();\n    requestAnimationFrame(()=>{\n        if (interrupted) return;\n        let duration = Number(getComputedStyle(el).transitionDuration.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n        let delay = Number(getComputedStyle(el).transitionDelay.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n        if (duration === 0) duration = Number(getComputedStyle(el).animationDuration.replace(\"s\", \"\")) * 1e3;\n        $f347e48613385d9c$var$mutateDom(()=>{\n            stages.before();\n        });\n        reachedBefore = true;\n        requestAnimationFrame(()=>{\n            if (interrupted) return;\n            $f347e48613385d9c$var$mutateDom(()=>{\n                stages.end();\n            });\n            $f347e48613385d9c$var$releaseNextTicks();\n            setTimeout(el._x_transitioning.finish, duration + delay);\n            reachedEnd = true;\n        });\n    });\n}\nfunction $f347e48613385d9c$var$modifierValue(modifiers, key, fallback) {\n    if (modifiers.indexOf(key) === -1) return fallback;\n    const rawValue = modifiers[modifiers.indexOf(key) + 1];\n    if (!rawValue) return fallback;\n    if (key === \"scale\") {\n        if (isNaN(rawValue)) return fallback;\n    }\n    if (key === \"duration\" || key === \"delay\") {\n        let match = rawValue.match(/([0-9]+)ms/);\n        if (match) return match[1];\n    }\n    if (key === \"origin\") {\n        if ([\n            \"top\",\n            \"right\",\n            \"left\",\n            \"center\",\n            \"bottom\"\n        ].includes(modifiers[modifiers.indexOf(key) + 2])) return [\n            rawValue,\n            modifiers[modifiers.indexOf(key) + 2]\n        ].join(\" \");\n    }\n    return rawValue;\n}\n// packages/alpinejs/src/utils/bind.js\nfunction $f347e48613385d9c$var$bind(el, name, value, modifiers = []) {\n    if (!el._x_bindings) el._x_bindings = $f347e48613385d9c$var$reactive({});\n    el._x_bindings[name] = value;\n    name = modifiers.includes(\"camel\") ? $f347e48613385d9c$var$camelCase(name) : name;\n    switch(name){\n        case \"value\":\n            $f347e48613385d9c$var$bindInputValue(el, value);\n            break;\n        case \"style\":\n            $f347e48613385d9c$var$bindStyles(el, value);\n            break;\n        case \"class\":\n            $f347e48613385d9c$var$bindClasses(el, value);\n            break;\n        case \"selected\":\n        case \"checked\":\n            $f347e48613385d9c$var$bindAttributeAndProperty(el, name, value);\n            break;\n        default:\n            $f347e48613385d9c$var$bindAttribute(el, name, value);\n            break;\n    }\n}\nfunction $f347e48613385d9c$var$bindInputValue(el, value) {\n    if ($f347e48613385d9c$var$isRadio(el)) {\n        if (el.attributes.value === void 0) el.value = value;\n    } else if ($f347e48613385d9c$var$isCheckbox(el)) {\n        if (Number.isInteger(value)) el.value = value;\n        else if (!Array.isArray(value) && typeof value !== \"boolean\" && ![\n            null,\n            void 0\n        ].includes(value)) el.value = String(value);\n        else if (Array.isArray(value)) el.checked = value.some((val)=>$f347e48613385d9c$var$checkedAttrLooseCompare(val, el.value));\n        else el.checked = !!value;\n    } else if (el.tagName === \"SELECT\") $f347e48613385d9c$var$updateSelect(el, value);\n    else if (el.tagName === \"OPTION\") $f347e48613385d9c$var$bindAttribute(el, \"value\", value);\n    else {\n        if (el.value === value && (typeof value !== \"object\" || value === null)) return;\n        el.value = value === void 0 ? \"\" : value;\n    }\n}\nfunction $f347e48613385d9c$var$bindClasses(el, value) {\n    if (el._x_undoAddedClasses) el._x_undoAddedClasses();\n    el._x_undoAddedClasses = $f347e48613385d9c$var$setClasses(el, value);\n}\nfunction $f347e48613385d9c$var$bindStyles(el, value) {\n    if (el._x_undoAddedStyles) el._x_undoAddedStyles();\n    el._x_undoAddedStyles = $f347e48613385d9c$var$setStyles(el, value);\n}\nfunction $f347e48613385d9c$var$bindAttributeAndProperty(el, name, value) {\n    $f347e48613385d9c$var$bindAttribute(el, name, value);\n    $f347e48613385d9c$var$setPropertyIfChanged(el, name, value);\n}\nfunction $f347e48613385d9c$var$bindAttribute(el, name, value) {\n    if ([\n        null,\n        void 0,\n        false\n    ].includes(value) && $f347e48613385d9c$var$attributeShouldntBePreservedIfFalsy(name)) el.removeAttribute(name);\n    else {\n        if ($f347e48613385d9c$var$isBooleanAttr(name)) value = name;\n        if ($f347e48613385d9c$var$isObjectAttr(value)) value = JSON.stringify(value);\n        $f347e48613385d9c$var$setIfChanged(el, name, value);\n    }\n}\nfunction $f347e48613385d9c$var$setIfChanged(el, attrName, value) {\n    if (el.getAttribute(attrName) != value) el.setAttribute(attrName, value);\n}\nfunction $f347e48613385d9c$var$setPropertyIfChanged(el, propName, value) {\n    if (el[propName] !== value) el[propName] = value;\n}\nfunction $f347e48613385d9c$var$updateSelect(el, value) {\n    const arrayWrappedValue = [].concat(value).map((value2)=>{\n        return value2 + \"\";\n    });\n    Array.from(el.options).forEach((option)=>{\n        option.selected = arrayWrappedValue.includes(option.value);\n    });\n}\nfunction $f347e48613385d9c$var$camelCase(subject) {\n    return subject.toLowerCase().replace(/-(\\w)/g, (match, char)=>char.toUpperCase());\n}\nfunction $f347e48613385d9c$var$checkedAttrLooseCompare(valueA, valueB) {\n    return valueA == valueB;\n}\nfunction $f347e48613385d9c$var$safeParseBoolean(rawValue) {\n    if ([\n        1,\n        \"1\",\n        \"true\",\n        \"on\",\n        \"yes\",\n        true\n    ].includes(rawValue)) return true;\n    if ([\n        0,\n        \"0\",\n        \"false\",\n        \"off\",\n        \"no\",\n        false\n    ].includes(rawValue)) return false;\n    return rawValue ? Boolean(rawValue) : null;\n}\nvar $f347e48613385d9c$var$booleanAttributes = /* @__PURE__ */ new Set([\n    \"allowfullscreen\",\n    \"async\",\n    \"autofocus\",\n    \"autoplay\",\n    \"checked\",\n    \"controls\",\n    \"default\",\n    \"defer\",\n    \"disabled\",\n    \"formnovalidate\",\n    \"inert\",\n    \"ismap\",\n    \"itemscope\",\n    \"loop\",\n    \"multiple\",\n    \"muted\",\n    \"nomodule\",\n    \"novalidate\",\n    \"open\",\n    \"playsinline\",\n    \"readonly\",\n    \"required\",\n    \"reversed\",\n    \"selected\",\n    \"shadowrootclonable\",\n    \"shadowrootdelegatesfocus\",\n    \"shadowrootserializable\"\n]);\nfunction $f347e48613385d9c$var$isBooleanAttr(attrName) {\n    return $f347e48613385d9c$var$booleanAttributes.has(attrName);\n}\nfunction $f347e48613385d9c$var$attributeShouldntBePreservedIfFalsy(name) {\n    return ![\n        \"aria-pressed\",\n        \"aria-checked\",\n        \"aria-expanded\",\n        \"aria-selected\"\n    ].includes(name);\n}\nfunction $f347e48613385d9c$var$isObjectAttr(value) {\n    return typeof value === \"object\" && value !== null;\n}\nfunction $f347e48613385d9c$var$getBinding(el, name, fallback) {\n    if (el._x_bindings && el._x_bindings[name] !== void 0) return el._x_bindings[name];\n    return $f347e48613385d9c$var$getAttributeBinding(el, name, fallback);\n}\nfunction $f347e48613385d9c$var$extractProp(el, name, fallback, extract = true) {\n    if (el._x_bindings && el._x_bindings[name] !== void 0) return el._x_bindings[name];\n    if (el._x_inlineBindings && el._x_inlineBindings[name] !== void 0) {\n        let binding = el._x_inlineBindings[name];\n        binding.extract = extract;\n        return $f347e48613385d9c$var$dontAutoEvaluateFunctions(()=>{\n            return $f347e48613385d9c$var$evaluate(el, binding.expression);\n        });\n    }\n    return $f347e48613385d9c$var$getAttributeBinding(el, name, fallback);\n}\nfunction $f347e48613385d9c$var$getAttributeBinding(el, name, fallback) {\n    let attr = el.getAttribute(name);\n    if (attr === null) return typeof fallback === \"function\" ? fallback() : fallback;\n    if (attr === \"\") return true;\n    if ($f347e48613385d9c$var$isBooleanAttr(name)) return !![\n        name,\n        \"true\"\n    ].includes(attr);\n    return attr;\n}\nfunction $f347e48613385d9c$var$isCheckbox(el) {\n    return el.type === \"checkbox\" || el.localName === \"ui-checkbox\" || el.localName === \"ui-switch\";\n}\nfunction $f347e48613385d9c$var$isRadio(el) {\n    return el.type === \"radio\" || el.localName === \"ui-radio\";\n}\n// packages/alpinejs/src/utils/debounce.js\nfunction $f347e48613385d9c$var$debounce(func, wait) {\n    let timeout;\n    return function() {\n        const context = this, args = arguments;\n        const later = function() {\n            timeout = null;\n            func.apply(context, args);\n        };\n        clearTimeout(timeout);\n        timeout = setTimeout(later, wait);\n    };\n}\n// packages/alpinejs/src/utils/throttle.js\nfunction $f347e48613385d9c$var$throttle(func, limit) {\n    let inThrottle;\n    return function() {\n        let context = this, args = arguments;\n        if (!inThrottle) {\n            func.apply(context, args);\n            inThrottle = true;\n            setTimeout(()=>inThrottle = false, limit);\n        }\n    };\n}\n// packages/alpinejs/src/entangle.js\nfunction $f347e48613385d9c$var$entangle({ get: outerGet, set: outerSet }, { get: innerGet, set: innerSet }) {\n    let firstRun = true;\n    let outerHash;\n    let innerHash;\n    let reference = $f347e48613385d9c$var$effect(()=>{\n        let outer = outerGet();\n        let inner = innerGet();\n        if (firstRun) {\n            innerSet($f347e48613385d9c$var$cloneIfObject(outer));\n            firstRun = false;\n        } else {\n            let outerHashLatest = JSON.stringify(outer);\n            let innerHashLatest = JSON.stringify(inner);\n            if (outerHashLatest !== outerHash) innerSet($f347e48613385d9c$var$cloneIfObject(outer));\n            else if (outerHashLatest !== innerHashLatest) outerSet($f347e48613385d9c$var$cloneIfObject(inner));\n        }\n        outerHash = JSON.stringify(outerGet());\n        innerHash = JSON.stringify(innerGet());\n    });\n    return ()=>{\n        $f347e48613385d9c$var$dequeueJob(reference);\n        $f347e48613385d9c$var$release(reference);\n    };\n}\nfunction $f347e48613385d9c$var$cloneIfObject(value) {\n    return typeof value === \"object\" ? JSON.parse(JSON.stringify(value)) : value;\n}\n// packages/alpinejs/src/plugin.js\nfunction $f347e48613385d9c$var$plugin(callback) {\n    let callbacks = Array.isArray(callback) ? callback : [\n        callback\n    ];\n    callbacks.forEach((i)=>i($f347e48613385d9c$var$alpine_default));\n}\n// packages/alpinejs/src/store.js\nvar $f347e48613385d9c$var$stores = {};\nvar $f347e48613385d9c$var$isReactive = false;\nfunction $f347e48613385d9c$var$store(name, value) {\n    if (!$f347e48613385d9c$var$isReactive) {\n        $f347e48613385d9c$var$stores = $f347e48613385d9c$var$reactive($f347e48613385d9c$var$stores);\n        $f347e48613385d9c$var$isReactive = true;\n    }\n    if (value === void 0) return $f347e48613385d9c$var$stores[name];\n    $f347e48613385d9c$var$stores[name] = value;\n    if (typeof value === \"object\" && value !== null && value._x_interceptor) $f347e48613385d9c$var$stores[name] = value.initialize($f347e48613385d9c$var$stores, name, name, ()=>{});\n    else $f347e48613385d9c$var$initInterceptors($f347e48613385d9c$var$stores[name]);\n    if (typeof value === \"object\" && value !== null && value.hasOwnProperty(\"init\") && typeof value.init === \"function\") $f347e48613385d9c$var$stores[name].init();\n}\nfunction $f347e48613385d9c$var$getStores() {\n    return $f347e48613385d9c$var$stores;\n}\n// packages/alpinejs/src/binds.js\nvar $f347e48613385d9c$var$binds = {};\nfunction $f347e48613385d9c$var$bind2(name, bindings) {\n    let getBindings = typeof bindings !== \"function\" ? ()=>bindings : bindings;\n    if (name instanceof Element) return $f347e48613385d9c$var$applyBindingsObject(name, getBindings());\n    else $f347e48613385d9c$var$binds[name] = getBindings;\n    return ()=>{};\n}\nfunction $f347e48613385d9c$var$injectBindingProviders(obj) {\n    Object.entries($f347e48613385d9c$var$binds).forEach(([name, callback])=>{\n        Object.defineProperty(obj, name, {\n            get () {\n                return (...args)=>{\n                    return callback(...args);\n                };\n            }\n        });\n    });\n    return obj;\n}\nfunction $f347e48613385d9c$var$applyBindingsObject(el, obj, original) {\n    let cleanupRunners = [];\n    while(cleanupRunners.length)cleanupRunners.pop()();\n    let attributes = Object.entries(obj).map(([name, value])=>({\n            name: name,\n            value: value\n        }));\n    let staticAttributes = $f347e48613385d9c$var$attributesOnly(attributes);\n    attributes = attributes.map((attribute)=>{\n        if (staticAttributes.find((attr)=>attr.name === attribute.name)) return {\n            name: `x-bind:${attribute.name}`,\n            value: `\"${attribute.value}\"`\n        };\n        return attribute;\n    });\n    $f347e48613385d9c$var$directives(el, attributes, original).map((handle)=>{\n        cleanupRunners.push(handle.runCleanups);\n        handle();\n    });\n    return ()=>{\n        while(cleanupRunners.length)cleanupRunners.pop()();\n    };\n}\n// packages/alpinejs/src/datas.js\nvar $f347e48613385d9c$var$datas = {};\nfunction $f347e48613385d9c$var$data(name, callback) {\n    $f347e48613385d9c$var$datas[name] = callback;\n}\nfunction $f347e48613385d9c$var$injectDataProviders(obj, context) {\n    Object.entries($f347e48613385d9c$var$datas).forEach(([name, callback])=>{\n        Object.defineProperty(obj, name, {\n            get () {\n                return (...args)=>{\n                    return callback.bind(context)(...args);\n                };\n            },\n            enumerable: false\n        });\n    });\n    return obj;\n}\n// packages/alpinejs/src/alpine.js\nvar $f347e48613385d9c$var$Alpine = {\n    get reactive () {\n        return $f347e48613385d9c$var$reactive;\n    },\n    get release () {\n        return $f347e48613385d9c$var$release;\n    },\n    get effect () {\n        return $f347e48613385d9c$var$effect;\n    },\n    get raw () {\n        return $f347e48613385d9c$var$raw;\n    },\n    get transaction () {\n        return $f347e48613385d9c$var$transaction;\n    },\n    version: \"3.17.5\",\n    flushAndStopDeferringMutations: $f347e48613385d9c$var$flushAndStopDeferringMutations,\n    dontAutoEvaluateFunctions: $f347e48613385d9c$var$dontAutoEvaluateFunctions,\n    disableEffectScheduling: $f347e48613385d9c$var$disableEffectScheduling,\n    startObservingMutations: $f347e48613385d9c$var$startObservingMutations,\n    stopObservingMutations: $f347e48613385d9c$var$stopObservingMutations,\n    setReactivityEngine: $f347e48613385d9c$var$setReactivityEngine,\n    onAttributeRemoved: $f347e48613385d9c$var$onAttributeRemoved,\n    onAttributesAdded: $f347e48613385d9c$var$onAttributesAdded,\n    closestDataStack: $f347e48613385d9c$var$closestDataStack,\n    skipDuringClone: $f347e48613385d9c$var$skipDuringClone,\n    onlyDuringClone: $f347e48613385d9c$var$onlyDuringClone,\n    addRootSelector: $f347e48613385d9c$var$addRootSelector,\n    addInitSelector: $f347e48613385d9c$var$addInitSelector,\n    setErrorHandler: $f347e48613385d9c$var$setErrorHandler,\n    interceptClone: $f347e48613385d9c$var$interceptClone,\n    addScopeToNode: $f347e48613385d9c$var$addScopeToNode,\n    deferMutations: $f347e48613385d9c$var$deferMutations,\n    mapAttributes: $f347e48613385d9c$var$mapAttributes,\n    evaluateLater: $f347e48613385d9c$var$evaluateLater,\n    interceptInit: $f347e48613385d9c$var$interceptInit,\n    initInterceptors: $f347e48613385d9c$var$initInterceptors,\n    injectMagics: $f347e48613385d9c$var$injectMagics,\n    setEvaluator: $f347e48613385d9c$var$setEvaluator,\n    setRawEvaluator: $f347e48613385d9c$var$setRawEvaluator,\n    mergeProxies: $f347e48613385d9c$var$mergeProxies,\n    extractProp: $f347e48613385d9c$var$extractProp,\n    findClosest: $f347e48613385d9c$var$findClosest,\n    onElRemoved: $f347e48613385d9c$var$onElRemoved,\n    closestRoot: $f347e48613385d9c$var$closestRoot,\n    destroyTree: $f347e48613385d9c$var$destroyTree,\n    interceptor: $f347e48613385d9c$var$interceptor,\n    transition: // INTERNAL: not public API and is subject to change without major release.\n    $f347e48613385d9c$var$transition,\n    setStyles: // INTERNAL\n    $f347e48613385d9c$var$setStyles,\n    mutateDom: // INTERNAL\n    $f347e48613385d9c$var$mutateDom,\n    deferInit: $f347e48613385d9c$var$deferInit,\n    directive: $f347e48613385d9c$var$directive,\n    entangle: $f347e48613385d9c$var$entangle,\n    throttle: $f347e48613385d9c$var$throttle,\n    debounce: $f347e48613385d9c$var$debounce,\n    evaluate: $f347e48613385d9c$var$evaluate,\n    evaluateRaw: $f347e48613385d9c$var$evaluateRaw,\n    initTree: $f347e48613385d9c$var$initTree,\n    nextTick: $f347e48613385d9c$var$nextTick,\n    prefixed: $f347e48613385d9c$var$prefix,\n    prefix: $f347e48613385d9c$var$setPrefix,\n    plugin: $f347e48613385d9c$var$plugin,\n    magic: $f347e48613385d9c$var$magic,\n    store: $f347e48613385d9c$var$store,\n    start: $f347e48613385d9c$var$start,\n    clone: $f347e48613385d9c$var$clone,\n    cloneNode: // INTERNAL\n    $f347e48613385d9c$var$cloneNode,\n    // INTERNAL\n    bound: $f347e48613385d9c$var$getBinding,\n    $data: $f347e48613385d9c$var$scope,\n    watch: $f347e48613385d9c$var$watch,\n    walk: $f347e48613385d9c$var$walk,\n    data: $f347e48613385d9c$var$data,\n    bind: $f347e48613385d9c$var$bind2\n};\nvar $f347e48613385d9c$var$alpine_default = $f347e48613385d9c$var$Alpine;\n// node_modules/@vue/shared/dist/shared.esm-bundler.js\nfunction $f347e48613385d9c$var$makeMap(str) {\n    const map = /* @__PURE__ */ Object.create(null);\n    for (const key of str.split(\",\"))map[key] = 1;\n    return (val)=>val in map;\n}\nvar $f347e48613385d9c$var$EMPTY_OBJ = Object.freeze({});\nvar $f347e48613385d9c$var$EMPTY_ARR = Object.freeze([]);\nvar $f347e48613385d9c$var$extend = Object.assign;\nvar $f347e48613385d9c$var$hasOwnProperty = Object.prototype.hasOwnProperty;\nvar $f347e48613385d9c$var$hasOwn = (val, key)=>$f347e48613385d9c$var$hasOwnProperty.call(val, key);\nvar $f347e48613385d9c$var$isArray = Array.isArray;\nvar $f347e48613385d9c$var$isMap = (val)=>$f347e48613385d9c$var$toTypeString(val) === \"[object Map]\";\nvar $f347e48613385d9c$var$isString = (val)=>typeof val === \"string\";\nvar $f347e48613385d9c$var$isSymbol = (val)=>typeof val === \"symbol\";\nvar $f347e48613385d9c$var$isObject = (val)=>val !== null && typeof val === \"object\";\nvar $f347e48613385d9c$var$objectToString = Object.prototype.toString;\nvar $f347e48613385d9c$var$toTypeString = (value)=>$f347e48613385d9c$var$objectToString.call(value);\nvar $f347e48613385d9c$var$toRawType = (value)=>{\n    return $f347e48613385d9c$var$toTypeString(value).slice(8, -1);\n};\nvar $f347e48613385d9c$var$isIntegerKey = (key)=>$f347e48613385d9c$var$isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nvar $f347e48613385d9c$var$cacheStringFunction = (fn)=>{\n    const cache = /* @__PURE__ */ Object.create(null);\n    return (str)=>{\n        const hit = cache[str];\n        return hit || (cache[str] = fn(str));\n    };\n};\nvar $f347e48613385d9c$var$camelizeRE = /-\\w/g;\nvar $f347e48613385d9c$var$camelize = $f347e48613385d9c$var$cacheStringFunction((str)=>{\n    return str.replace($f347e48613385d9c$var$camelizeRE, (c)=>c.slice(1).toUpperCase());\n});\nvar $f347e48613385d9c$var$hyphenateRE = /\\B([A-Z])/g;\nvar $f347e48613385d9c$var$hyphenate = $f347e48613385d9c$var$cacheStringFunction((str)=>str.replace($f347e48613385d9c$var$hyphenateRE, \"-$1\").toLowerCase());\nvar $f347e48613385d9c$var$capitalize = $f347e48613385d9c$var$cacheStringFunction((str)=>{\n    return str.charAt(0).toUpperCase() + str.slice(1);\n});\nvar $f347e48613385d9c$var$toHandlerKey = $f347e48613385d9c$var$cacheStringFunction((str)=>{\n    const s = str ? `on${$f347e48613385d9c$var$capitalize(str)}` : ``;\n    return s;\n});\nvar $f347e48613385d9c$var$hasChanged = (value, oldValue)=>!Object.is(value, oldValue);\nvar $f347e48613385d9c$var$specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nvar $f347e48613385d9c$var$isBooleanAttr2 = /* @__PURE__ */ $f347e48613385d9c$var$makeMap($f347e48613385d9c$var$specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);\n// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js\nfunction $f347e48613385d9c$var$warn2(msg, ...args) {\n    console.warn(`[Vue warn] ${msg}`, ...args);\n}\nvar $f347e48613385d9c$var$activeEffectScope;\nvar $f347e48613385d9c$var$activeSub;\nvar $f347e48613385d9c$var$pausedQueueEffects = /* @__PURE__ */ new WeakSet();\nvar $f347e48613385d9c$var$ReactiveEffect = class {\n    constructor(fn){\n        this.fn = fn;\n        this.deps = void 0;\n        this.depsTail = void 0;\n        this.flags = 5;\n        this.next = void 0;\n        this.cleanup = void 0;\n        this.scheduler = void 0;\n        if ($f347e48613385d9c$var$activeEffectScope) {\n            if ($f347e48613385d9c$var$activeEffectScope.active) $f347e48613385d9c$var$activeEffectScope.effects.push(this);\n            else this.flags &= -2;\n        }\n    }\n    pause() {\n        this.flags |= 64;\n    }\n    resume() {\n        if (this.flags & 64) {\n            this.flags &= -65;\n            if ($f347e48613385d9c$var$pausedQueueEffects.has(this)) {\n                $f347e48613385d9c$var$pausedQueueEffects.delete(this);\n                this.trigger();\n            }\n        }\n    }\n    /**\n   * @internal\n   */ notify() {\n        if (this.flags & 2 && !(this.flags & 32)) return;\n        if (!(this.flags & 8)) $f347e48613385d9c$var$batch(this);\n    }\n    run() {\n        if (!(this.flags & 1)) return this.fn();\n        this.flags |= 2;\n        $f347e48613385d9c$var$cleanupEffect(this);\n        $f347e48613385d9c$var$prepareDeps(this);\n        const prevEffect = $f347e48613385d9c$var$activeSub;\n        const prevShouldTrack = $f347e48613385d9c$var$shouldTrack;\n        $f347e48613385d9c$var$activeSub = this;\n        $f347e48613385d9c$var$shouldTrack = true;\n        try {\n            return this.fn();\n        } finally{\n            if ($f347e48613385d9c$var$activeSub !== this) $f347e48613385d9c$var$warn2(\"Active effect was not restored correctly - this is likely a Vue internal bug.\");\n            $f347e48613385d9c$var$cleanupDeps(this);\n            $f347e48613385d9c$var$activeSub = prevEffect;\n            $f347e48613385d9c$var$shouldTrack = prevShouldTrack;\n            this.flags &= -3;\n        }\n    }\n    stop() {\n        if (this.flags & 1) {\n            for(let link = this.deps; link; link = link.nextDep)$f347e48613385d9c$var$removeSub(link);\n            this.deps = this.depsTail = void 0;\n            $f347e48613385d9c$var$cleanupEffect(this);\n            this.onStop && this.onStop();\n            this.flags &= -2;\n        }\n    }\n    trigger() {\n        if (this.flags & 64) $f347e48613385d9c$var$pausedQueueEffects.add(this);\n        else if (this.scheduler) this.scheduler();\n        else this.runIfDirty();\n    }\n    /**\n   * @internal\n   */ runIfDirty() {\n        if ($f347e48613385d9c$var$isDirty(this)) this.run();\n    }\n    get dirty() {\n        return $f347e48613385d9c$var$isDirty(this);\n    }\n};\nvar $f347e48613385d9c$var$batchDepth = 0;\nvar $f347e48613385d9c$var$batchedSub;\nvar $f347e48613385d9c$var$batchedComputed;\nfunction $f347e48613385d9c$var$batch(sub, isComputed = false) {\n    sub.flags |= 8;\n    if (isComputed) {\n        sub.next = $f347e48613385d9c$var$batchedComputed;\n        $f347e48613385d9c$var$batchedComputed = sub;\n        return;\n    }\n    sub.next = $f347e48613385d9c$var$batchedSub;\n    $f347e48613385d9c$var$batchedSub = sub;\n}\nfunction $f347e48613385d9c$var$startBatch() {\n    $f347e48613385d9c$var$batchDepth++;\n}\nfunction $f347e48613385d9c$var$endBatch() {\n    if (--$f347e48613385d9c$var$batchDepth > 0) return;\n    if ($f347e48613385d9c$var$batchedComputed) {\n        let e = $f347e48613385d9c$var$batchedComputed;\n        $f347e48613385d9c$var$batchedComputed = void 0;\n        while(e){\n            const next = e.next;\n            e.next = void 0;\n            e.flags &= -9;\n            e = next;\n        }\n    }\n    let error2;\n    while($f347e48613385d9c$var$batchedSub){\n        let e = $f347e48613385d9c$var$batchedSub;\n        $f347e48613385d9c$var$batchedSub = void 0;\n        while(e){\n            const next = e.next;\n            e.next = void 0;\n            e.flags &= -9;\n            if (e.flags & 1) try {\n                e.trigger();\n            } catch (err) {\n                if (!error2) error2 = err;\n            }\n            e = next;\n        }\n    }\n    if (error2) throw error2;\n}\nfunction $f347e48613385d9c$var$prepareDeps(sub) {\n    for(let link = sub.deps; link; link = link.nextDep){\n        link.version = -1;\n        link.prevActiveLink = link.dep.activeLink;\n        link.dep.activeLink = link;\n    }\n}\nfunction $f347e48613385d9c$var$cleanupDeps(sub) {\n    let head;\n    let tail = sub.depsTail;\n    let link = tail;\n    while(link){\n        const prev = link.prevDep;\n        if (link.version === -1) {\n            if (link === tail) tail = prev;\n            $f347e48613385d9c$var$removeSub(link);\n            $f347e48613385d9c$var$removeDep(link);\n        } else head = link;\n        link.dep.activeLink = link.prevActiveLink;\n        link.prevActiveLink = void 0;\n        link = prev;\n    }\n    sub.deps = head;\n    sub.depsTail = tail;\n}\nfunction $f347e48613385d9c$var$isDirty(sub) {\n    for(let link = sub.deps; link; link = link.nextDep){\n        if (link.dep.version !== link.version || link.dep.computed && ($f347e48613385d9c$var$refreshComputed(link.dep.computed) || link.dep.version !== link.version)) return true;\n    }\n    if (sub._dirty) return true;\n    return false;\n}\nfunction $f347e48613385d9c$var$refreshComputed(computed) {\n    if (computed.flags & 4 && !(computed.flags & 16)) return;\n    computed.flags &= -17;\n    if (computed.globalVersion === $f347e48613385d9c$var$globalVersion) return;\n    computed.globalVersion = $f347e48613385d9c$var$globalVersion;\n    if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !$f347e48613385d9c$var$isDirty(computed))) return;\n    computed.flags |= 2;\n    const dep = computed.dep;\n    const prevSub = $f347e48613385d9c$var$activeSub;\n    const prevShouldTrack = $f347e48613385d9c$var$shouldTrack;\n    $f347e48613385d9c$var$activeSub = computed;\n    $f347e48613385d9c$var$shouldTrack = true;\n    try {\n        $f347e48613385d9c$var$prepareDeps(computed);\n        const value = computed.fn(computed._value);\n        if (dep.version === 0 || $f347e48613385d9c$var$hasChanged(value, computed._value)) {\n            computed.flags |= 128;\n            computed._value = value;\n            dep.version++;\n        }\n    } catch (err) {\n        dep.version++;\n        throw err;\n    } finally{\n        $f347e48613385d9c$var$activeSub = prevSub;\n        $f347e48613385d9c$var$shouldTrack = prevShouldTrack;\n        $f347e48613385d9c$var$cleanupDeps(computed);\n        computed.flags &= -3;\n    }\n}\nfunction $f347e48613385d9c$var$removeSub(link, soft = false) {\n    const { dep: dep, prevSub: prevSub, nextSub: nextSub } = link;\n    if (prevSub) {\n        prevSub.nextSub = nextSub;\n        link.prevSub = void 0;\n    }\n    if (nextSub) {\n        nextSub.prevSub = prevSub;\n        link.nextSub = void 0;\n    }\n    if (dep.subsHead === link) dep.subsHead = nextSub;\n    if (dep.subs === link) {\n        dep.subs = prevSub;\n        if (!prevSub && dep.computed) {\n            dep.computed.flags &= -5;\n            for(let l = dep.computed.deps; l; l = l.nextDep)$f347e48613385d9c$var$removeSub(l, true);\n        }\n    }\n    if (!soft && !--dep.sc && dep.map) dep.map.delete(dep.key);\n}\nfunction $f347e48613385d9c$var$removeDep(link) {\n    const { prevDep: prevDep, nextDep: nextDep } = link;\n    if (prevDep) {\n        prevDep.nextDep = nextDep;\n        link.prevDep = void 0;\n    }\n    if (nextDep) {\n        nextDep.prevDep = prevDep;\n        link.nextDep = void 0;\n    }\n}\nfunction $f347e48613385d9c$var$effect2(fn, options) {\n    if (fn.effect instanceof $f347e48613385d9c$var$ReactiveEffect) fn = fn.effect.fn;\n    const e = new $f347e48613385d9c$var$ReactiveEffect(fn);\n    if (options) $f347e48613385d9c$var$extend(e, options);\n    try {\n        e.run();\n    } catch (err) {\n        e.stop();\n        throw err;\n    }\n    const runner = e.run.bind(e);\n    runner.effect = e;\n    return runner;\n}\nfunction $f347e48613385d9c$var$stop(runner) {\n    runner.effect.stop();\n}\nvar $f347e48613385d9c$var$shouldTrack = true;\nvar $f347e48613385d9c$var$trackStack = [];\nfunction $f347e48613385d9c$var$pauseTracking() {\n    $f347e48613385d9c$var$trackStack.push($f347e48613385d9c$var$shouldTrack);\n    $f347e48613385d9c$var$shouldTrack = false;\n}\nfunction $f347e48613385d9c$var$resetTracking() {\n    const last = $f347e48613385d9c$var$trackStack.pop();\n    $f347e48613385d9c$var$shouldTrack = last === void 0 ? true : last;\n}\nfunction $f347e48613385d9c$var$cleanupEffect(e) {\n    const { cleanup: cleanup } = e;\n    e.cleanup = void 0;\n    if (cleanup) {\n        const prevSub = $f347e48613385d9c$var$activeSub;\n        $f347e48613385d9c$var$activeSub = void 0;\n        try {\n            cleanup();\n        } finally{\n            $f347e48613385d9c$var$activeSub = prevSub;\n        }\n    }\n}\nvar $f347e48613385d9c$var$globalVersion = 0;\nvar $f347e48613385d9c$var$Link = class {\n    constructor(sub, dep){\n        this.sub = sub;\n        this.dep = dep;\n        this.version = dep.version;\n        this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n    }\n};\nvar $f347e48613385d9c$var$Dep = class {\n    // TODO isolatedDeclarations \"__v_skip\"\n    constructor(computed){\n        this.computed = computed;\n        this.version = 0;\n        this.activeLink = void 0;\n        this.subs = void 0;\n        this.map = void 0;\n        this.key = void 0;\n        this.sc = 0;\n        this.__v_skip = true;\n        this.subsHead = void 0;\n    }\n    track(debugInfo) {\n        if (!$f347e48613385d9c$var$activeSub || !$f347e48613385d9c$var$shouldTrack || $f347e48613385d9c$var$activeSub === this.computed) return;\n        let link = this.activeLink;\n        if (link === void 0 || link.sub !== $f347e48613385d9c$var$activeSub) {\n            link = this.activeLink = new $f347e48613385d9c$var$Link($f347e48613385d9c$var$activeSub, this);\n            if (!$f347e48613385d9c$var$activeSub.deps) $f347e48613385d9c$var$activeSub.deps = $f347e48613385d9c$var$activeSub.depsTail = link;\n            else {\n                link.prevDep = $f347e48613385d9c$var$activeSub.depsTail;\n                $f347e48613385d9c$var$activeSub.depsTail.nextDep = link;\n                $f347e48613385d9c$var$activeSub.depsTail = link;\n            }\n            $f347e48613385d9c$var$addSub(link);\n        } else if (link.version === -1) {\n            link.version = this.version;\n            if (link.nextDep) {\n                const next = link.nextDep;\n                next.prevDep = link.prevDep;\n                if (link.prevDep) link.prevDep.nextDep = next;\n                link.prevDep = $f347e48613385d9c$var$activeSub.depsTail;\n                link.nextDep = void 0;\n                $f347e48613385d9c$var$activeSub.depsTail.nextDep = link;\n                $f347e48613385d9c$var$activeSub.depsTail = link;\n                if ($f347e48613385d9c$var$activeSub.deps === link) $f347e48613385d9c$var$activeSub.deps = next;\n            }\n        }\n        if ($f347e48613385d9c$var$activeSub.onTrack) $f347e48613385d9c$var$activeSub.onTrack($f347e48613385d9c$var$extend({\n            effect: $f347e48613385d9c$var$activeSub\n        }, debugInfo));\n        return link;\n    }\n    trigger(debugInfo) {\n        this.version++;\n        $f347e48613385d9c$var$globalVersion++;\n        this.notify(debugInfo);\n    }\n    notify(debugInfo) {\n        $f347e48613385d9c$var$startBatch();\n        try {\n            for(let head = this.subsHead; head; head = head.nextSub)if (head.sub.onTrigger && !(head.sub.flags & 8)) head.sub.onTrigger($f347e48613385d9c$var$extend({\n                effect: head.sub\n            }, debugInfo));\n            for(let link = this.subs; link; link = link.prevSub)if (link.sub.notify()) link.sub.dep.notify();\n        } finally{\n            $f347e48613385d9c$var$endBatch();\n        }\n    }\n};\nfunction $f347e48613385d9c$var$addSub(link) {\n    link.dep.sc++;\n    if (link.sub.flags & 4) {\n        const computed = link.dep.computed;\n        if (computed && !link.dep.subs) {\n            computed.flags |= 20;\n            for(let l = computed.deps; l; l = l.nextDep)$f347e48613385d9c$var$addSub(l);\n        }\n        const currentTail = link.dep.subs;\n        if (currentTail !== link) {\n            link.prevSub = currentTail;\n            if (currentTail) currentTail.nextSub = link;\n        }\n        if (link.dep.subsHead === void 0) link.dep.subsHead = link;\n        link.dep.subs = link;\n    }\n}\nvar $f347e48613385d9c$var$targetMap = /* @__PURE__ */ new WeakMap();\nvar $f347e48613385d9c$var$ITERATE_KEY = /* @__PURE__ */ Symbol(\"Object iterate\");\nvar $f347e48613385d9c$var$MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(\"Map keys iterate\");\nvar $f347e48613385d9c$var$ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(\"Array iterate\");\nfunction $f347e48613385d9c$var$track(target, type, key) {\n    if ($f347e48613385d9c$var$shouldTrack && $f347e48613385d9c$var$activeSub) {\n        let depsMap = $f347e48613385d9c$var$targetMap.get(target);\n        if (!depsMap) $f347e48613385d9c$var$targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n        let dep = depsMap.get(key);\n        if (!dep) {\n            depsMap.set(key, dep = new $f347e48613385d9c$var$Dep());\n            dep.map = depsMap;\n            dep.key = key;\n        }\n        dep.track({\n            target: target,\n            type: type,\n            key: key\n        });\n    }\n}\nfunction $f347e48613385d9c$var$trigger(target, type, key, newValue, oldValue, oldTarget) {\n    const depsMap = $f347e48613385d9c$var$targetMap.get(target);\n    if (!depsMap) {\n        $f347e48613385d9c$var$globalVersion++;\n        return;\n    }\n    const run = (dep)=>{\n        if (dep) dep.trigger({\n            target: target,\n            type: type,\n            key: key,\n            newValue: newValue,\n            oldValue: oldValue,\n            oldTarget: oldTarget\n        });\n    };\n    $f347e48613385d9c$var$startBatch();\n    if (type === \"clear\") depsMap.forEach(run);\n    else {\n        const targetIsArray = $f347e48613385d9c$var$isArray(target);\n        const isArrayIndex = targetIsArray && $f347e48613385d9c$var$isIntegerKey(key);\n        if (targetIsArray && key === \"length\") {\n            const newLength = Number(newValue);\n            depsMap.forEach((dep, key2)=>{\n                if (key2 === \"length\" || key2 === $f347e48613385d9c$var$ARRAY_ITERATE_KEY || !$f347e48613385d9c$var$isSymbol(key2) && key2 >= newLength) run(dep);\n            });\n        } else {\n            if (key !== void 0 || depsMap.has(void 0)) run(depsMap.get(key));\n            if (isArrayIndex) run(depsMap.get($f347e48613385d9c$var$ARRAY_ITERATE_KEY));\n            switch(type){\n                case \"add\":\n                    if (!targetIsArray) {\n                        run(depsMap.get($f347e48613385d9c$var$ITERATE_KEY));\n                        if ($f347e48613385d9c$var$isMap(target)) run(depsMap.get($f347e48613385d9c$var$MAP_KEY_ITERATE_KEY));\n                    } else if (isArrayIndex) run(depsMap.get(\"length\"));\n                    break;\n                case \"delete\":\n                    if (!targetIsArray) {\n                        run(depsMap.get($f347e48613385d9c$var$ITERATE_KEY));\n                        if ($f347e48613385d9c$var$isMap(target)) run(depsMap.get($f347e48613385d9c$var$MAP_KEY_ITERATE_KEY));\n                    }\n                    break;\n                case \"set\":\n                    if ($f347e48613385d9c$var$isMap(target)) run(depsMap.get($f347e48613385d9c$var$ITERATE_KEY));\n                    break;\n            }\n        }\n    }\n    $f347e48613385d9c$var$endBatch();\n}\nfunction $f347e48613385d9c$var$reactiveReadArray(array) {\n    const raw2 = $f347e48613385d9c$var$toRaw(array);\n    if (raw2 === array) return raw2;\n    $f347e48613385d9c$var$track(raw2, \"iterate\", $f347e48613385d9c$var$ARRAY_ITERATE_KEY);\n    return $f347e48613385d9c$var$isShallow(array) ? raw2 : raw2.map($f347e48613385d9c$var$toReactive);\n}\nfunction $f347e48613385d9c$var$shallowReadArray(arr) {\n    $f347e48613385d9c$var$track(arr = $f347e48613385d9c$var$toRaw(arr), \"iterate\", $f347e48613385d9c$var$ARRAY_ITERATE_KEY);\n    return arr;\n}\nfunction $f347e48613385d9c$var$toWrapped(target, item) {\n    if ($f347e48613385d9c$var$isReadonly(target)) return $f347e48613385d9c$var$isReactive2(target) ? $f347e48613385d9c$var$toReadonly($f347e48613385d9c$var$toReactive(item)) : $f347e48613385d9c$var$toReadonly(item);\n    return $f347e48613385d9c$var$toReactive(item);\n}\nvar $f347e48613385d9c$var$arrayInstrumentations = {\n    __proto__: null,\n    [Symbol.iterator] () {\n        return $f347e48613385d9c$var$iterator(this, Symbol.iterator, (item)=>$f347e48613385d9c$var$toWrapped(this, item));\n    },\n    concat (...args) {\n        return $f347e48613385d9c$var$reactiveReadArray(this).concat(...args.map((x)=>$f347e48613385d9c$var$isArray(x) ? $f347e48613385d9c$var$reactiveReadArray(x) : x));\n    },\n    entries () {\n        return $f347e48613385d9c$var$iterator(this, \"entries\", (value)=>{\n            value[1] = $f347e48613385d9c$var$toWrapped(this, value[1]);\n            return value;\n        });\n    },\n    every (fn, thisArg) {\n        return $f347e48613385d9c$var$apply(this, \"every\", fn, thisArg, void 0, arguments);\n    },\n    filter (fn, thisArg) {\n        return $f347e48613385d9c$var$apply(this, \"filter\", fn, thisArg, (v)=>v.map((item)=>$f347e48613385d9c$var$toWrapped(this, item)), arguments);\n    },\n    find (fn, thisArg) {\n        return $f347e48613385d9c$var$apply(this, \"find\", fn, thisArg, (item)=>$f347e48613385d9c$var$toWrapped(this, item), arguments);\n    },\n    findIndex (fn, thisArg) {\n        return $f347e48613385d9c$var$apply(this, \"findIndex\", fn, thisArg, void 0, arguments);\n    },\n    findLast (fn, thisArg) {\n        return $f347e48613385d9c$var$apply(this, \"findLast\", fn, thisArg, (item)=>$f347e48613385d9c$var$toWrapped(this, item), arguments);\n    },\n    findLastIndex (fn, thisArg) {\n        return $f347e48613385d9c$var$apply(this, \"findLastIndex\", fn, thisArg, void 0, arguments);\n    },\n    // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement\n    forEach (fn, thisArg) {\n        return $f347e48613385d9c$var$apply(this, \"forEach\", fn, thisArg, void 0, arguments);\n    },\n    includes (...args) {\n        return $f347e48613385d9c$var$searchProxy(this, \"includes\", args);\n    },\n    indexOf (...args) {\n        return $f347e48613385d9c$var$searchProxy(this, \"indexOf\", args);\n    },\n    join (separator) {\n        return $f347e48613385d9c$var$reactiveReadArray(this).join(separator);\n    },\n    // keys() iterator only reads `length`, no optimization required\n    lastIndexOf (...args) {\n        return $f347e48613385d9c$var$searchProxy(this, \"lastIndexOf\", args);\n    },\n    map (fn, thisArg) {\n        return $f347e48613385d9c$var$apply(this, \"map\", fn, thisArg, void 0, arguments);\n    },\n    pop () {\n        return $f347e48613385d9c$var$noTracking(this, \"pop\");\n    },\n    push (...args) {\n        return $f347e48613385d9c$var$noTracking(this, \"push\", args);\n    },\n    reduce (fn, ...args) {\n        return $f347e48613385d9c$var$reduce(this, \"reduce\", fn, args);\n    },\n    reduceRight (fn, ...args) {\n        return $f347e48613385d9c$var$reduce(this, \"reduceRight\", fn, args);\n    },\n    shift () {\n        return $f347e48613385d9c$var$noTracking(this, \"shift\");\n    },\n    // slice could use ARRAY_ITERATE but also seems to beg for range tracking\n    some (fn, thisArg) {\n        return $f347e48613385d9c$var$apply(this, \"some\", fn, thisArg, void 0, arguments);\n    },\n    splice (...args) {\n        return $f347e48613385d9c$var$noTracking(this, \"splice\", args);\n    },\n    toReversed () {\n        return $f347e48613385d9c$var$reactiveReadArray(this).toReversed();\n    },\n    toSorted (comparer) {\n        return $f347e48613385d9c$var$reactiveReadArray(this).toSorted(comparer);\n    },\n    toSpliced (...args) {\n        return $f347e48613385d9c$var$reactiveReadArray(this).toSpliced(...args);\n    },\n    unshift (...args) {\n        return $f347e48613385d9c$var$noTracking(this, \"unshift\", args);\n    },\n    values () {\n        return $f347e48613385d9c$var$iterator(this, \"values\", (item)=>$f347e48613385d9c$var$toWrapped(this, item));\n    }\n};\nfunction $f347e48613385d9c$var$iterator(self2, method, wrapValue) {\n    const arr = $f347e48613385d9c$var$shallowReadArray(self2);\n    const iter = arr[method]();\n    if (arr !== self2 && !$f347e48613385d9c$var$isShallow(self2)) {\n        iter._next = iter.next;\n        iter.next = ()=>{\n            const result = iter._next();\n            if (!result.done) result.value = wrapValue(result.value);\n            return result;\n        };\n    }\n    return iter;\n}\nvar $f347e48613385d9c$var$arrayProto = Array.prototype;\nfunction $f347e48613385d9c$var$apply(self2, method, fn, thisArg, wrappedRetFn, args) {\n    const arr = $f347e48613385d9c$var$shallowReadArray(self2);\n    const needsWrap = arr !== self2 && !$f347e48613385d9c$var$isShallow(self2);\n    const methodFn = arr[method];\n    if (methodFn !== $f347e48613385d9c$var$arrayProto[method]) {\n        const result2 = methodFn.apply(self2, args);\n        return needsWrap ? $f347e48613385d9c$var$toReactive(result2) : result2;\n    }\n    let wrappedFn = fn;\n    if (arr !== self2) {\n        if (needsWrap) wrappedFn = function(item, index) {\n            return fn.call(this, $f347e48613385d9c$var$toWrapped(self2, item), index, self2);\n        };\n        else if (fn.length > 2) wrappedFn = function(item, index) {\n            return fn.call(this, item, index, self2);\n        };\n    }\n    const result = methodFn.call(arr, wrappedFn, thisArg);\n    return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;\n}\nfunction $f347e48613385d9c$var$reduce(self2, method, fn, args) {\n    const arr = $f347e48613385d9c$var$shallowReadArray(self2);\n    const needsWrap = arr !== self2 && !$f347e48613385d9c$var$isShallow(self2);\n    let wrappedFn = fn;\n    let wrapInitialAccumulator = false;\n    if (arr !== self2) {\n        if (needsWrap) {\n            wrapInitialAccumulator = args.length === 0;\n            wrappedFn = function(acc, item, index) {\n                if (wrapInitialAccumulator) {\n                    wrapInitialAccumulator = false;\n                    acc = $f347e48613385d9c$var$toWrapped(self2, acc);\n                }\n                return fn.call(this, acc, $f347e48613385d9c$var$toWrapped(self2, item), index, self2);\n            };\n        } else if (fn.length > 3) wrappedFn = function(acc, item, index) {\n            return fn.call(this, acc, item, index, self2);\n        };\n    }\n    const result = arr[method](wrappedFn, ...args);\n    return wrapInitialAccumulator ? $f347e48613385d9c$var$toWrapped(self2, result) : result;\n}\nfunction $f347e48613385d9c$var$searchProxy(self2, method, args) {\n    const arr = $f347e48613385d9c$var$toRaw(self2);\n    $f347e48613385d9c$var$track(arr, \"iterate\", $f347e48613385d9c$var$ARRAY_ITERATE_KEY);\n    const res = arr[method](...args);\n    if ((res === -1 || res === false) && $f347e48613385d9c$var$isProxy(args[0])) {\n        args[0] = $f347e48613385d9c$var$toRaw(args[0]);\n        return arr[method](...args);\n    }\n    return res;\n}\nfunction $f347e48613385d9c$var$noTracking(self2, method, args = []) {\n    $f347e48613385d9c$var$pauseTracking();\n    $f347e48613385d9c$var$startBatch();\n    const res = $f347e48613385d9c$var$toRaw(self2)[method].apply(self2, args);\n    $f347e48613385d9c$var$endBatch();\n    $f347e48613385d9c$var$resetTracking();\n    return res;\n}\nvar $f347e48613385d9c$var$isNonTrackableKeys = /* @__PURE__ */ $f347e48613385d9c$var$makeMap(`__proto__,__v_isRef,__isVue`);\nvar $f347e48613385d9c$var$builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key)=>key !== \"arguments\" && key !== \"caller\").map((key)=>Symbol[key]).filter($f347e48613385d9c$var$isSymbol));\nfunction $f347e48613385d9c$var$hasOwnProperty2(key) {\n    if (!$f347e48613385d9c$var$isSymbol(key)) key = String(key);\n    const obj = $f347e48613385d9c$var$toRaw(this);\n    $f347e48613385d9c$var$track(obj, \"has\", key);\n    return obj.hasOwnProperty(key);\n}\nvar $f347e48613385d9c$var$BaseReactiveHandler = class {\n    constructor(_isReadonly = false, _isShallow = false){\n        this._isReadonly = _isReadonly;\n        this._isShallow = _isShallow;\n    }\n    get(target, key, receiver) {\n        if (key === \"__v_skip\") return target[\"__v_skip\"];\n        const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n        if (key === \"__v_isReactive\") return !isReadonly2;\n        else if (key === \"__v_isReadonly\") return isReadonly2;\n        else if (key === \"__v_isShallow\") return isShallow2;\n        else if (key === \"__v_raw\") {\n            if (receiver === (isReadonly2 ? isShallow2 ? $f347e48613385d9c$var$shallowReadonlyMap : $f347e48613385d9c$var$readonlyMap : isShallow2 ? $f347e48613385d9c$var$shallowReactiveMap : $f347e48613385d9c$var$reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n            // this means the receiver is a user proxy of the reactive proxy\n            Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) return target;\n            return;\n        }\n        const targetIsArray = $f347e48613385d9c$var$isArray(target);\n        if (!isReadonly2) {\n            let fn;\n            if (targetIsArray && (fn = $f347e48613385d9c$var$arrayInstrumentations[key])) return fn;\n            if (key === \"hasOwnProperty\") return $f347e48613385d9c$var$hasOwnProperty2;\n        }\n        const res = Reflect.get(target, key, // if this is a proxy wrapping a ref, return methods using the raw ref\n        // as receiver so that we don't have to call `toRaw` on the ref in all\n        // its class methods\n        $f347e48613385d9c$var$isRef(target) ? target : receiver);\n        if ($f347e48613385d9c$var$isSymbol(key) ? $f347e48613385d9c$var$builtInSymbols.has(key) : $f347e48613385d9c$var$isNonTrackableKeys(key)) return res;\n        if (!isReadonly2) $f347e48613385d9c$var$track(target, \"get\", key);\n        if (isShallow2) return res;\n        if ($f347e48613385d9c$var$isRef(res)) {\n            const value = targetIsArray && $f347e48613385d9c$var$isIntegerKey(key) ? res : res.value;\n            return isReadonly2 && $f347e48613385d9c$var$isObject(value) ? $f347e48613385d9c$var$readonly(value) : value;\n        }\n        if ($f347e48613385d9c$var$isObject(res)) return isReadonly2 ? $f347e48613385d9c$var$readonly(res) : $f347e48613385d9c$var$reactive2(res);\n        return res;\n    }\n};\nvar $f347e48613385d9c$var$MutableReactiveHandler = class extends $f347e48613385d9c$var$BaseReactiveHandler {\n    constructor(isShallow2 = false){\n        super(false, isShallow2);\n    }\n    set(target, key, value, receiver) {\n        let oldValue = target[key];\n        const isArrayWithIntegerKey = $f347e48613385d9c$var$isArray(target) && $f347e48613385d9c$var$isIntegerKey(key);\n        if (!this._isShallow) {\n            const isOldValueReadonly = $f347e48613385d9c$var$isReadonly(oldValue);\n            if (!$f347e48613385d9c$var$isShallow(value) && !$f347e48613385d9c$var$isReadonly(value)) {\n                oldValue = $f347e48613385d9c$var$toRaw(oldValue);\n                value = $f347e48613385d9c$var$toRaw(value);\n            }\n            if (!isArrayWithIntegerKey && $f347e48613385d9c$var$isRef(oldValue) && !$f347e48613385d9c$var$isRef(value)) {\n                if (isOldValueReadonly) {\n                    $f347e48613385d9c$var$warn2(`Set operation on key \"${String(key)}\" failed: target is readonly.`, target[key]);\n                    return true;\n                } else {\n                    oldValue.value = value;\n                    return true;\n                }\n            }\n        }\n        const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : $f347e48613385d9c$var$hasOwn(target, key);\n        const result = Reflect.set(target, key, value, $f347e48613385d9c$var$isRef(target) ? target : receiver);\n        if (target === $f347e48613385d9c$var$toRaw(receiver) && result) {\n            if (!hadKey) $f347e48613385d9c$var$trigger(target, \"add\", key, value);\n            else if ($f347e48613385d9c$var$hasChanged(value, oldValue)) $f347e48613385d9c$var$trigger(target, \"set\", key, value, oldValue);\n        }\n        return result;\n    }\n    deleteProperty(target, key) {\n        const hadKey = $f347e48613385d9c$var$hasOwn(target, key);\n        const oldValue = target[key];\n        const result = Reflect.deleteProperty(target, key);\n        if (result && hadKey) $f347e48613385d9c$var$trigger(target, \"delete\", key, void 0, oldValue);\n        return result;\n    }\n    has(target, key) {\n        const result = Reflect.has(target, key);\n        if (!$f347e48613385d9c$var$isSymbol(key) || !$f347e48613385d9c$var$builtInSymbols.has(key)) $f347e48613385d9c$var$track(target, \"has\", key);\n        return result;\n    }\n    ownKeys(target) {\n        $f347e48613385d9c$var$track(target, \"iterate\", $f347e48613385d9c$var$isArray(target) ? \"length\" : $f347e48613385d9c$var$ITERATE_KEY);\n        return Reflect.ownKeys(target);\n    }\n};\nvar $f347e48613385d9c$var$ReadonlyReactiveHandler = class extends $f347e48613385d9c$var$BaseReactiveHandler {\n    constructor(isShallow2 = false){\n        super(true, isShallow2);\n    }\n    set(target, key) {\n        $f347e48613385d9c$var$warn2(`Set operation on key \"${String(key)}\" failed: target is readonly.`, target);\n        return true;\n    }\n    deleteProperty(target, key) {\n        $f347e48613385d9c$var$warn2(`Delete operation on key \"${String(key)}\" failed: target is readonly.`, target);\n        return true;\n    }\n};\nvar $f347e48613385d9c$var$mutableHandlers = /* @__PURE__ */ new $f347e48613385d9c$var$MutableReactiveHandler();\nvar $f347e48613385d9c$var$readonlyHandlers = /* @__PURE__ */ new $f347e48613385d9c$var$ReadonlyReactiveHandler();\nvar $f347e48613385d9c$var$toShallow = (value)=>value;\nvar $f347e48613385d9c$var$getProto = (v)=>Reflect.getPrototypeOf(v);\nfunction $f347e48613385d9c$var$createIterableMethod(method, isReadonly2, isShallow2) {\n    return function(...args) {\n        const target = this[\"__v_raw\"];\n        const rawTarget = $f347e48613385d9c$var$toRaw(target);\n        const targetIsMap = $f347e48613385d9c$var$isMap(rawTarget);\n        const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n        const isKeyOnly = method === \"keys\" && targetIsMap;\n        const innerIterator = target[method](...args);\n        const wrap = isShallow2 ? $f347e48613385d9c$var$toShallow : isReadonly2 ? $f347e48613385d9c$var$toReadonly : $f347e48613385d9c$var$toReactive;\n        !isReadonly2 && $f347e48613385d9c$var$track(rawTarget, \"iterate\", isKeyOnly ? $f347e48613385d9c$var$MAP_KEY_ITERATE_KEY : $f347e48613385d9c$var$ITERATE_KEY);\n        return $f347e48613385d9c$var$extend(// inheriting all iterator properties\n        Object.create(innerIterator), {\n            // iterator protocol\n            next () {\n                const { value: value, done: done } = innerIterator.next();\n                return done ? {\n                    value: value,\n                    done: done\n                } : {\n                    value: isPair ? [\n                        wrap(value[0]),\n                        wrap(value[1])\n                    ] : wrap(value),\n                    done: done\n                };\n            }\n        });\n    };\n}\nfunction $f347e48613385d9c$var$createReadonlyMethod(type) {\n    return function(...args) {\n        {\n            const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n            $f347e48613385d9c$var$warn2(`${$f347e48613385d9c$var$capitalize(type)} operation ${key}failed: target is readonly.`, $f347e48613385d9c$var$toRaw(this));\n        }\n        return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n    };\n}\nfunction $f347e48613385d9c$var$createInstrumentations(readonly2, shallow) {\n    const instrumentations = {\n        get (key) {\n            const target = this[\"__v_raw\"];\n            const rawTarget = $f347e48613385d9c$var$toRaw(target);\n            const rawKey = $f347e48613385d9c$var$toRaw(key);\n            if (!readonly2) {\n                if ($f347e48613385d9c$var$hasChanged(key, rawKey)) $f347e48613385d9c$var$track(rawTarget, \"get\", key);\n                $f347e48613385d9c$var$track(rawTarget, \"get\", rawKey);\n            }\n            const { has: has } = $f347e48613385d9c$var$getProto(rawTarget);\n            const wrap = shallow ? $f347e48613385d9c$var$toShallow : readonly2 ? $f347e48613385d9c$var$toReadonly : $f347e48613385d9c$var$toReactive;\n            if (has.call(rawTarget, key)) return wrap(target.get(key));\n            else if (has.call(rawTarget, rawKey)) return wrap(target.get(rawKey));\n            else if (target !== rawTarget) target.get(key);\n        },\n        get size () {\n            const target = this[\"__v_raw\"];\n            !readonly2 && $f347e48613385d9c$var$track($f347e48613385d9c$var$toRaw(target), \"iterate\", $f347e48613385d9c$var$ITERATE_KEY);\n            return target.size;\n        },\n        has (key) {\n            const target = this[\"__v_raw\"];\n            const rawTarget = $f347e48613385d9c$var$toRaw(target);\n            const rawKey = $f347e48613385d9c$var$toRaw(key);\n            if (!readonly2) {\n                if ($f347e48613385d9c$var$hasChanged(key, rawKey)) $f347e48613385d9c$var$track(rawTarget, \"has\", key);\n                $f347e48613385d9c$var$track(rawTarget, \"has\", rawKey);\n            }\n            return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n        },\n        forEach (callback, thisArg) {\n            const observed = this;\n            const target = observed[\"__v_raw\"];\n            const rawTarget = $f347e48613385d9c$var$toRaw(target);\n            const wrap = shallow ? $f347e48613385d9c$var$toShallow : readonly2 ? $f347e48613385d9c$var$toReadonly : $f347e48613385d9c$var$toReactive;\n            !readonly2 && $f347e48613385d9c$var$track(rawTarget, \"iterate\", $f347e48613385d9c$var$ITERATE_KEY);\n            return target.forEach((value, key)=>{\n                return callback.call(thisArg, wrap(value), wrap(key), observed);\n            });\n        }\n    };\n    $f347e48613385d9c$var$extend(instrumentations, readonly2 ? {\n        add: $f347e48613385d9c$var$createReadonlyMethod(\"add\"),\n        set: $f347e48613385d9c$var$createReadonlyMethod(\"set\"),\n        delete: $f347e48613385d9c$var$createReadonlyMethod(\"delete\"),\n        clear: $f347e48613385d9c$var$createReadonlyMethod(\"clear\")\n    } : {\n        add (value) {\n            const target = $f347e48613385d9c$var$toRaw(this);\n            const proto = $f347e48613385d9c$var$getProto(target);\n            const rawValue = $f347e48613385d9c$var$toRaw(value);\n            const valueToAdd = !shallow && !$f347e48613385d9c$var$isShallow(value) && !$f347e48613385d9c$var$isReadonly(value) ? rawValue : value;\n            const hadKey = proto.has.call(target, valueToAdd) || $f347e48613385d9c$var$hasChanged(value, valueToAdd) && proto.has.call(target, value) || $f347e48613385d9c$var$hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);\n            if (!hadKey) {\n                target.add(valueToAdd);\n                $f347e48613385d9c$var$trigger(target, \"add\", valueToAdd, valueToAdd);\n            }\n            return this;\n        },\n        set (key, value) {\n            if (!shallow && !$f347e48613385d9c$var$isShallow(value) && !$f347e48613385d9c$var$isReadonly(value)) value = $f347e48613385d9c$var$toRaw(value);\n            const target = $f347e48613385d9c$var$toRaw(this);\n            const { has: has, get: get2 } = $f347e48613385d9c$var$getProto(target);\n            let hadKey = has.call(target, key);\n            if (!hadKey) {\n                key = $f347e48613385d9c$var$toRaw(key);\n                hadKey = has.call(target, key);\n            } else $f347e48613385d9c$var$checkIdentityKeys(target, has, key);\n            const oldValue = get2.call(target, key);\n            target.set(key, value);\n            if (!hadKey) $f347e48613385d9c$var$trigger(target, \"add\", key, value);\n            else if ($f347e48613385d9c$var$hasChanged(value, oldValue)) $f347e48613385d9c$var$trigger(target, \"set\", key, value, oldValue);\n            return this;\n        },\n        delete (key) {\n            const target = $f347e48613385d9c$var$toRaw(this);\n            const { has: has, get: get2 } = $f347e48613385d9c$var$getProto(target);\n            let hadKey = has.call(target, key);\n            if (!hadKey) {\n                key = $f347e48613385d9c$var$toRaw(key);\n                hadKey = has.call(target, key);\n            } else $f347e48613385d9c$var$checkIdentityKeys(target, has, key);\n            const oldValue = get2 ? get2.call(target, key) : void 0;\n            const result = target.delete(key);\n            if (hadKey) $f347e48613385d9c$var$trigger(target, \"delete\", key, void 0, oldValue);\n            return result;\n        },\n        clear () {\n            const target = $f347e48613385d9c$var$toRaw(this);\n            const hadItems = target.size !== 0;\n            const oldTarget = $f347e48613385d9c$var$isMap(target) ? new Map(target) : new Set(target);\n            const result = target.clear();\n            if (hadItems) $f347e48613385d9c$var$trigger(target, \"clear\", void 0, void 0, oldTarget);\n            return result;\n        }\n    });\n    const iteratorMethods = [\n        \"keys\",\n        \"values\",\n        \"entries\",\n        Symbol.iterator\n    ];\n    iteratorMethods.forEach((method)=>{\n        instrumentations[method] = $f347e48613385d9c$var$createIterableMethod(method, readonly2, shallow);\n    });\n    return instrumentations;\n}\nfunction $f347e48613385d9c$var$createInstrumentationGetter(isReadonly2, shallow) {\n    const instrumentations = $f347e48613385d9c$var$createInstrumentations(isReadonly2, shallow);\n    return (target, key, receiver)=>{\n        if (key === \"__v_isReactive\") return !isReadonly2;\n        else if (key === \"__v_isReadonly\") return isReadonly2;\n        else if (key === \"__v_raw\") return target;\n        return Reflect.get($f347e48613385d9c$var$hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);\n    };\n}\nvar $f347e48613385d9c$var$mutableCollectionHandlers = {\n    get: /* @__PURE__ */ $f347e48613385d9c$var$createInstrumentationGetter(false, false)\n};\nvar $f347e48613385d9c$var$readonlyCollectionHandlers = {\n    get: /* @__PURE__ */ $f347e48613385d9c$var$createInstrumentationGetter(true, false)\n};\nfunction $f347e48613385d9c$var$checkIdentityKeys(target, has, key) {\n    const rawKey = $f347e48613385d9c$var$toRaw(key);\n    if (rawKey !== key && has.call(target, rawKey)) {\n        const type = $f347e48613385d9c$var$toRawType(target);\n        $f347e48613385d9c$var$warn2(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);\n    }\n}\nvar $f347e48613385d9c$var$reactiveMap = /* @__PURE__ */ new WeakMap();\nvar $f347e48613385d9c$var$shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nvar $f347e48613385d9c$var$readonlyMap = /* @__PURE__ */ new WeakMap();\nvar $f347e48613385d9c$var$shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction $f347e48613385d9c$var$targetTypeMap(rawType) {\n    switch(rawType){\n        case \"Object\":\n        case \"Array\":\n            return 1;\n        case \"Map\":\n        case \"Set\":\n        case \"WeakMap\":\n        case \"WeakSet\":\n            return 2;\n        default:\n            return 0;\n    }\n}\nfunction $f347e48613385d9c$var$reactive2(target) {\n    if (/* @__PURE__ */ $f347e48613385d9c$var$isReadonly(target)) return target;\n    return $f347e48613385d9c$var$createReactiveObject(target, false, $f347e48613385d9c$var$mutableHandlers, $f347e48613385d9c$var$mutableCollectionHandlers, $f347e48613385d9c$var$reactiveMap);\n}\nfunction $f347e48613385d9c$var$readonly(target) {\n    return $f347e48613385d9c$var$createReactiveObject(target, true, $f347e48613385d9c$var$readonlyHandlers, $f347e48613385d9c$var$readonlyCollectionHandlers, $f347e48613385d9c$var$readonlyMap);\n}\nfunction $f347e48613385d9c$var$createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n    if (!$f347e48613385d9c$var$isObject(target)) {\n        $f347e48613385d9c$var$warn2(`value cannot be made ${isReadonly2 ? \"readonly\" : \"reactive\"}: ${String(target)}`);\n        return target;\n    }\n    if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) return target;\n    if (target[\"__v_skip\"] || !Object.isExtensible(target)) return target;\n    const existingProxy = proxyMap.get(target);\n    if (existingProxy) return existingProxy;\n    const targetType = $f347e48613385d9c$var$targetTypeMap($f347e48613385d9c$var$toRawType(target));\n    if (targetType === 0) return target;\n    const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);\n    proxyMap.set(target, proxy);\n    return proxy;\n}\nfunction $f347e48613385d9c$var$isReactive2(value) {\n    if (/* @__PURE__ */ $f347e48613385d9c$var$isReadonly(value)) return /* @__PURE__ */ $f347e48613385d9c$var$isReactive2(value[\"__v_raw\"]);\n    return !!(value && value[\"__v_isReactive\"]);\n}\nfunction $f347e48613385d9c$var$isReadonly(value) {\n    return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction $f347e48613385d9c$var$isShallow(value) {\n    return !!(value && value[\"__v_isShallow\"]);\n}\nfunction $f347e48613385d9c$var$isProxy(value) {\n    return value ? !!value[\"__v_raw\"] : false;\n}\nfunction $f347e48613385d9c$var$toRaw(observed) {\n    const raw2 = observed && observed[\"__v_raw\"];\n    return raw2 ? /* @__PURE__ */ $f347e48613385d9c$var$toRaw(raw2) : observed;\n}\nvar $f347e48613385d9c$var$toReactive = (value)=>$f347e48613385d9c$var$isObject(value) ? /* @__PURE__ */ $f347e48613385d9c$var$reactive2(value) : value;\nvar $f347e48613385d9c$var$toReadonly = (value)=>$f347e48613385d9c$var$isObject(value) ? /* @__PURE__ */ $f347e48613385d9c$var$readonly(value) : value;\nfunction $f347e48613385d9c$var$isRef(r) {\n    return r ? r[\"__v_isRef\"] === true : false;\n}\n// packages/alpinejs/src/magics/$nextTick.js\n$f347e48613385d9c$var$magic(\"nextTick\", ()=>$f347e48613385d9c$var$nextTick);\n// packages/alpinejs/src/magics/$dispatch.js\n$f347e48613385d9c$var$magic(\"dispatch\", (el)=>$f347e48613385d9c$var$dispatch.bind($f347e48613385d9c$var$dispatch, el));\n// packages/alpinejs/src/magics/$watch.js\n$f347e48613385d9c$var$magic(\"watch\", (el, { evaluateLater: evaluateLater2, cleanup: cleanup })=>(key, callback)=>{\n        let evaluate2 = evaluateLater2(key);\n        let getter = ()=>{\n            let value;\n            evaluate2((i)=>value = i);\n            return value;\n        };\n        let unwatch = $f347e48613385d9c$var$watch(getter, callback);\n        cleanup(unwatch);\n    });\n// packages/alpinejs/src/magics/$store.js\n$f347e48613385d9c$var$magic(\"store\", $f347e48613385d9c$var$getStores);\n// packages/alpinejs/src/magics/$data.js\n$f347e48613385d9c$var$magic(\"data\", (el)=>$f347e48613385d9c$var$scope(el));\n// packages/alpinejs/src/magics/$root.js\n$f347e48613385d9c$var$magic(\"root\", (el)=>$f347e48613385d9c$var$closestRoot(el));\n// packages/alpinejs/src/magics/$refs.js\n$f347e48613385d9c$var$magic(\"refs\", (el)=>{\n    if (el._x_refs_proxy) return el._x_refs_proxy;\n    el._x_refs_proxy = $f347e48613385d9c$var$mergeProxies($f347e48613385d9c$var$getArrayOfRefObject(el));\n    return el._x_refs_proxy;\n});\nfunction $f347e48613385d9c$var$getArrayOfRefObject(el) {\n    let refObjects = [];\n    $f347e48613385d9c$var$findClosest(el, (i)=>{\n        if (i._x_refs) refObjects.push(i._x_refs);\n    });\n    return refObjects;\n}\n// packages/alpinejs/src/ids.js\nvar $f347e48613385d9c$var$globalIdMemo = {};\nfunction $f347e48613385d9c$var$findAndIncrementId(name) {\n    if (!$f347e48613385d9c$var$globalIdMemo[name]) $f347e48613385d9c$var$globalIdMemo[name] = 0;\n    return ++$f347e48613385d9c$var$globalIdMemo[name];\n}\nfunction $f347e48613385d9c$var$closestIdRoot(el, name) {\n    return $f347e48613385d9c$var$findClosest(el, (element)=>{\n        if (element._x_ids && element._x_ids[name]) return true;\n    });\n}\nfunction $f347e48613385d9c$var$setIdRoot(el, name) {\n    if (!el._x_ids) el._x_ids = {};\n    if (!el._x_ids[name]) el._x_ids[name] = $f347e48613385d9c$var$findAndIncrementId(name);\n}\n// packages/alpinejs/src/magics/$id.js\n$f347e48613385d9c$var$magic(\"id\", (el, { cleanup: cleanup })=>(name, key = null)=>{\n        let cacheKey = `${name}${key ? `-${key}` : \"\"}`;\n        return $f347e48613385d9c$var$cacheIdByNameOnElement(el, cacheKey, cleanup, ()=>{\n            let root = $f347e48613385d9c$var$closestIdRoot(el, name);\n            let id = root ? root._x_ids[name] : $f347e48613385d9c$var$findAndIncrementId(name);\n            return key ? `${name}-${id}-${key}` : `${name}-${id}`;\n        });\n    });\n$f347e48613385d9c$var$interceptClone((from, to)=>{\n    if (from._x_id) to._x_id = from._x_id;\n});\nfunction $f347e48613385d9c$var$cacheIdByNameOnElement(el, cacheKey, cleanup, callback) {\n    if (!el._x_id) el._x_id = {};\n    if (el._x_id[cacheKey]) return el._x_id[cacheKey];\n    let output = callback();\n    el._x_id[cacheKey] = output;\n    cleanup(()=>{\n        delete el._x_id[cacheKey];\n    });\n    return output;\n}\n// packages/alpinejs/src/magics/$el.js\n$f347e48613385d9c$var$magic(\"el\", (el)=>el);\n// packages/alpinejs/src/magics/index.js\n$f347e48613385d9c$var$warnMissingPluginMagic(\"Focus\", \"focus\", \"focus\");\n$f347e48613385d9c$var$warnMissingPluginMagic(\"Persist\", \"persist\", \"persist\");\nfunction $f347e48613385d9c$var$warnMissingPluginMagic(name, magicName, slug) {\n    $f347e48613385d9c$var$magic(magicName, (el)=>$f347e48613385d9c$var$warn(`You can't use [$${magicName}] without first installing the \"${name}\" plugin here: https://alpinejs.dev/plugins/${slug}`, el));\n}\n// packages/alpinejs/src/directives/x-modelable.js\n$f347e48613385d9c$var$directive(\"modelable\", (el, { expression: expression }, { effect: effect3, evaluateLater: evaluateLater2, cleanup: cleanup })=>{\n    let func = evaluateLater2(expression);\n    let innerGet = ()=>{\n        let result;\n        func((i)=>result = i);\n        return result;\n    };\n    let evaluateInnerSet = evaluateLater2(`${expression} = __placeholder`);\n    let innerSet = (val)=>evaluateInnerSet(()=>{}, {\n            scope: {\n                \"__placeholder\": val\n            }\n        });\n    let initialValue = innerGet();\n    innerSet(initialValue);\n    queueMicrotask(()=>{\n        if (!el._x_model) return;\n        el._x_removeModelListeners[\"default\"]();\n        let outerGet = el._x_model.get;\n        let outerSet = el._x_model.setWithModifiers;\n        let releaseEntanglement = $f347e48613385d9c$var$entangle({\n            get () {\n                return outerGet();\n            },\n            set (value) {\n                outerSet(value);\n            }\n        }, {\n            get () {\n                return innerGet();\n            },\n            set (value) {\n                innerSet(value);\n            }\n        });\n        cleanup(releaseEntanglement);\n    });\n});\n// packages/alpinejs/src/directives/x-teleport.js\n$f347e48613385d9c$var$directive(\"teleport\", (el, { modifiers: modifiers, expression: expression }, { cleanup: cleanup })=>{\n    if (el.tagName.toLowerCase() !== \"template\") $f347e48613385d9c$var$warn(\"x-teleport can only be used on a <template> tag\", el);\n    let target = $f347e48613385d9c$var$getTarget(expression);\n    let clone2 = el.content.cloneNode(true).firstElementChild;\n    el._x_teleport = clone2;\n    clone2._x_teleportBack = el;\n    el.setAttribute(\"data-teleport-template\", true);\n    clone2.setAttribute(\"data-teleport-target\", true);\n    if (el._x_forwardEvents) el._x_forwardEvents.forEach((eventName)=>{\n        clone2.addEventListener(eventName, (e)=>{\n            e.stopPropagation();\n            el.dispatchEvent(new e.constructor(e.type, e));\n        });\n    });\n    $f347e48613385d9c$var$addScopeToNode(clone2, {}, el);\n    let placeInDom = (clone3, target2, modifiers2)=>{\n        if (modifiers2.includes(\"prepend\")) target2.parentNode.insertBefore(clone3, target2);\n        else if (modifiers2.includes(\"append\")) target2.parentNode.insertBefore(clone3, target2.nextSibling);\n        else target2.appendChild(clone3);\n    };\n    $f347e48613385d9c$var$mutateDom(()=>{\n        $f347e48613385d9c$var$skipDuringClone(()=>{\n            placeInDom(clone2, target, modifiers);\n            $f347e48613385d9c$var$initTree(clone2);\n        })();\n    });\n    el._x_teleportPutBack = ()=>{\n        let target2 = $f347e48613385d9c$var$getTarget(expression);\n        $f347e48613385d9c$var$mutateDom(()=>{\n            placeInDom(el._x_teleport, target2, modifiers);\n        });\n    };\n    cleanup(()=>$f347e48613385d9c$var$mutateDom(()=>{\n            clone2.remove();\n            $f347e48613385d9c$var$destroyTree(clone2);\n        }));\n});\nvar $f347e48613385d9c$var$teleportContainerDuringClone = document.createElement(\"div\");\nfunction $f347e48613385d9c$var$getTarget(expression) {\n    let target = $f347e48613385d9c$var$skipDuringClone(()=>{\n        return document.querySelector(expression);\n    }, ()=>{\n        return $f347e48613385d9c$var$teleportContainerDuringClone;\n    })();\n    if (!target) $f347e48613385d9c$var$warn(`Cannot find x-teleport element for selector: \"${expression}\"`);\n    return target;\n}\n// packages/alpinejs/src/directives/x-ignore.js\nvar $f347e48613385d9c$var$handler = ()=>{};\n$f347e48613385d9c$var$handler.inline = (el, { modifiers: modifiers }, { cleanup: cleanup })=>{\n    modifiers.includes(\"self\") ? el._x_ignoreSelf = true : el._x_ignore = true;\n    cleanup(()=>{\n        modifiers.includes(\"self\") ? delete el._x_ignoreSelf : delete el._x_ignore;\n    });\n};\n$f347e48613385d9c$var$directive(\"ignore\", $f347e48613385d9c$var$handler);\n// packages/alpinejs/src/directives/x-effect.js\n$f347e48613385d9c$var$directive(\"effect\", $f347e48613385d9c$var$skipDuringClone((el, { expression: expression }, { effect: effect3 })=>{\n    effect3($f347e48613385d9c$var$evaluateLater(el, expression));\n}));\n// packages/alpinejs/src/utils/on.js\nfunction $f347e48613385d9c$var$on(el, event, modifiers, callback) {\n    let listenerTarget = el;\n    let handler4 = (e)=>callback(e);\n    let options = {};\n    let wrapHandler = (callback2, wrapper)=>(e)=>wrapper(callback2, e);\n    if (modifiers.includes(\"dot\")) event = $f347e48613385d9c$var$dotSyntax(event);\n    if (modifiers.includes(\"camel\")) event = $f347e48613385d9c$var$camelCase2(event);\n    if (modifiers.includes(\"capture\")) options.capture = true;\n    if (modifiers.includes(\"window\")) listenerTarget = window;\n    if (modifiers.includes(\"document\")) listenerTarget = document;\n    if (modifiers.includes(\"passive\")) options.passive = modifiers[modifiers.indexOf(\"passive\") + 1] !== \"false\";\n    handler4 = $f347e48613385d9c$var$addDebounceOrThrottle(modifiers, handler4);\n    if (modifiers.includes(\"prevent\")) handler4 = wrapHandler(handler4, (next, e)=>{\n        e.preventDefault();\n        next(e);\n    });\n    if (modifiers.includes(\"stop\")) handler4 = wrapHandler(handler4, (next, e)=>{\n        e.stopPropagation();\n        next(e);\n    });\n    if (modifiers.includes(\"once\")) handler4 = wrapHandler(handler4, (next, e)=>{\n        next(e);\n        listenerTarget.removeEventListener(event, handler4, options);\n    });\n    if (modifiers.includes(\"away\") || modifiers.includes(\"outside\")) {\n        listenerTarget = document;\n        handler4 = wrapHandler(handler4, (next, e)=>{\n            if (el.contains(e.target)) return;\n            if (e.target.isConnected === false) return;\n            if (el.offsetWidth < 1 && el.offsetHeight < 1) return;\n            if (el._x_isShown === false) return;\n            next(e);\n        });\n    }\n    if (modifiers.includes(\"self\")) handler4 = wrapHandler(handler4, (next, e)=>{\n        e.target === el && next(e);\n    });\n    if (event === \"submit\") handler4 = wrapHandler(handler4, (next, e)=>{\n        if (e.target._x_pendingModelUpdates) e.target._x_pendingModelUpdates.forEach((fn)=>fn());\n        next(e);\n    });\n    if ($f347e48613385d9c$var$isKeyEvent(event) || $f347e48613385d9c$var$isClickEvent(event)) handler4 = wrapHandler(handler4, (next, e)=>{\n        if ($f347e48613385d9c$var$isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers)) return;\n        next(e);\n    });\n    listenerTarget.addEventListener(event, handler4, options);\n    return ()=>{\n        listenerTarget.removeEventListener(event, handler4, options);\n    };\n}\nfunction $f347e48613385d9c$var$addDebounceOrThrottle(modifiers, handler4) {\n    if (modifiers.includes(\"debounce\")) {\n        let nextModifier = modifiers[modifiers.indexOf(\"debounce\") + 1] || \"invalid-wait\";\n        let wait = $f347e48613385d9c$var$isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n        handler4 = $f347e48613385d9c$var$debounce(handler4, wait);\n    }\n    if (modifiers.includes(\"throttle\")) {\n        let nextModifier = modifiers[modifiers.indexOf(\"throttle\") + 1] || \"invalid-wait\";\n        let wait = $f347e48613385d9c$var$isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n        handler4 = $f347e48613385d9c$var$throttle(handler4, wait);\n    }\n    return handler4;\n}\nfunction $f347e48613385d9c$var$dotSyntax(subject) {\n    return subject.replace(/-/g, \".\");\n}\nfunction $f347e48613385d9c$var$camelCase2(subject) {\n    return subject.toLowerCase().replace(/-(\\w)/g, (match, char)=>char.toUpperCase());\n}\nfunction $f347e48613385d9c$var$isNumeric(subject) {\n    return !Array.isArray(subject) && !isNaN(subject);\n}\nfunction $f347e48613385d9c$var$kebabCase2(subject) {\n    if ([\n        \" \",\n        \"_\"\n    ].includes(subject)) return subject;\n    return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[_\\s]/, \"-\").toLowerCase();\n}\nfunction $f347e48613385d9c$var$isKeyEvent(event) {\n    return [\n        \"keydown\",\n        \"keyup\"\n    ].includes(event);\n}\nfunction $f347e48613385d9c$var$isClickEvent(event) {\n    return [\n        \"contextmenu\",\n        \"click\",\n        \"mouse\"\n    ].some((i)=>event.includes(i));\n}\nvar $f347e48613385d9c$var$nonKeyModifiers = [\n    // x-on's own modifiers:\n    \"window\",\n    \"document\",\n    \"prevent\",\n    \"stop\",\n    \"once\",\n    \"capture\",\n    \"self\",\n    \"away\",\n    \"outside\",\n    \"passive\",\n    \"dot\",\n    \"camel\",\n    \"preserve-scroll\",\n    // x-model's own modifiers:\n    \"blur\",\n    \"change\",\n    \"lazy\",\n    \"number\",\n    \"boolean\",\n    \"trim\",\n    \"fill\",\n    \"unintrusive\",\n    \"parent\"\n];\nfunction $f347e48613385d9c$var$isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers) {\n    let keyModifiers = modifiers.filter((modifier, index)=>{\n        if (modifier === \"false\" && modifiers[index - 1] === \"passive\") return false;\n        return !$f347e48613385d9c$var$nonKeyModifiers.includes(modifier);\n    });\n    if (keyModifiers.includes(\"debounce\")) {\n        let debounceIndex = keyModifiers.indexOf(\"debounce\");\n        keyModifiers.splice(debounceIndex, $f347e48613385d9c$var$isNumeric((keyModifiers[debounceIndex + 1] || \"invalid-wait\").split(\"ms\")[0]) ? 2 : 1);\n    }\n    if (keyModifiers.includes(\"throttle\")) {\n        let debounceIndex = keyModifiers.indexOf(\"throttle\");\n        keyModifiers.splice(debounceIndex, $f347e48613385d9c$var$isNumeric((keyModifiers[debounceIndex + 1] || \"invalid-wait\").split(\"ms\")[0]) ? 2 : 1);\n    }\n    if (keyModifiers.length === 0) return false;\n    if (keyModifiers.length === 1 && $f347e48613385d9c$var$keyToModifiers(e.key).includes(keyModifiers[0])) return false;\n    const systemKeyModifiers = [\n        \"ctrl\",\n        \"shift\",\n        \"alt\",\n        \"meta\",\n        \"cmd\",\n        \"super\"\n    ];\n    const selectedSystemKeyModifiers = systemKeyModifiers.filter((modifier)=>keyModifiers.includes(modifier));\n    keyModifiers = keyModifiers.filter((i)=>!selectedSystemKeyModifiers.includes(i));\n    if (selectedSystemKeyModifiers.length > 0) {\n        const activelyPressedKeyModifiers = selectedSystemKeyModifiers.filter((modifier)=>{\n            if (modifier === \"cmd\" || modifier === \"super\") modifier = \"meta\";\n            return e[`${modifier}Key`];\n        });\n        if (activelyPressedKeyModifiers.length === selectedSystemKeyModifiers.length) {\n            if ($f347e48613385d9c$var$isClickEvent(e.type)) return false;\n            if ($f347e48613385d9c$var$keyToModifiers(e.key).includes(keyModifiers[0])) return false;\n        }\n    }\n    return true;\n}\nfunction $f347e48613385d9c$var$keyToModifiers(key) {\n    if (!key) return [];\n    key = $f347e48613385d9c$var$kebabCase2(key);\n    let modifierToKeyMap = {\n        \"ctrl\": \"control\",\n        \"slash\": \"/\",\n        \"space\": \" \",\n        \"spacebar\": \" \",\n        \"cmd\": \"meta\",\n        \"esc\": \"escape\",\n        \"up\": \"arrow-up\",\n        \"down\": \"arrow-down\",\n        \"left\": \"arrow-left\",\n        \"right\": \"arrow-right\",\n        \"period\": \".\",\n        \"comma\": \",\",\n        \"equal\": \"=\",\n        \"minus\": \"-\",\n        \"underscore\": \"_\"\n    };\n    modifierToKeyMap[key] = key;\n    return Object.keys(modifierToKeyMap).map((modifier)=>{\n        if (modifierToKeyMap[modifier] === key) return modifier;\n    }).filter((modifier)=>modifier);\n}\n// packages/alpinejs/src/directives/x-model.js\n$f347e48613385d9c$var$directive(\"model\", (el, { modifiers: modifiers, expression: expression }, { effect: effect3, cleanup: cleanup })=>{\n    let scopeTarget = el;\n    if (modifiers.includes(\"parent\")) scopeTarget = $f347e48613385d9c$var$findClosest(el, (element)=>element !== el);\n    let evaluateGet = $f347e48613385d9c$var$evaluateLater(scopeTarget, expression);\n    let evaluateSet;\n    if (typeof expression === \"string\") evaluateSet = $f347e48613385d9c$var$evaluateLater(scopeTarget, `${expression} = __placeholder`);\n    else if (typeof expression === \"function\" && typeof expression() === \"string\") evaluateSet = $f347e48613385d9c$var$evaluateLater(scopeTarget, `${expression()} = __placeholder`);\n    else evaluateSet = ()=>{};\n    let getValue = ()=>{\n        let result;\n        evaluateGet((value)=>result = value);\n        return $f347e48613385d9c$var$isGetterSetter(result) ? result.get() : result;\n    };\n    let setValue = (value)=>{\n        let result;\n        evaluateGet((value2)=>result = value2);\n        if ($f347e48613385d9c$var$isGetterSetter(result)) result.set(value);\n        else evaluateSet(()=>{}, {\n            scope: {\n                \"__placeholder\": value\n            }\n        });\n    };\n    if (typeof expression === \"string\" && el.type === \"radio\") $f347e48613385d9c$var$mutateDom(()=>{\n        if (!el.hasAttribute(\"name\")) el.setAttribute(\"name\", expression);\n    });\n    let hasChangeModifier = modifiers.includes(\"change\") || modifiers.includes(\"lazy\");\n    let hasBlurModifier = modifiers.includes(\"blur\");\n    let hasEnterModifier = modifiers.includes(\"enter\");\n    let hasExplicitEventModifiers = hasChangeModifier || hasBlurModifier || hasEnterModifier;\n    let removeListener;\n    if ($f347e48613385d9c$var$isCloning) removeListener = ()=>{};\n    else if (hasExplicitEventModifiers) {\n        let listeners = [];\n        let syncValue = (e)=>setValue($f347e48613385d9c$var$getInputValue(el, modifiers, e, getValue()));\n        if (hasChangeModifier) listeners.push($f347e48613385d9c$var$on(el, \"change\", modifiers, syncValue));\n        if (hasBlurModifier) {\n            listeners.push($f347e48613385d9c$var$on(el, \"blur\", modifiers, syncValue));\n            if (el.form) {\n                let form = el.form;\n                let syncCallback = ()=>syncValue({\n                        target: el\n                    });\n                if (!form._x_pendingModelUpdates) form._x_pendingModelUpdates = [];\n                form._x_pendingModelUpdates.push(syncCallback);\n                cleanup(()=>{\n                    if (form._x_pendingModelUpdates) form._x_pendingModelUpdates.splice(form._x_pendingModelUpdates.indexOf(syncCallback), 1);\n                });\n            }\n        }\n        if (hasEnterModifier) listeners.push($f347e48613385d9c$var$on(el, \"keydown\", modifiers, (e)=>{\n            if (e.key === \"Enter\") syncValue(e);\n        }));\n        removeListener = ()=>listeners.forEach((remove2)=>remove2());\n    } else {\n        let event = el.tagName.toLowerCase() === \"select\" || [\n            \"checkbox\",\n            \"radio\"\n        ].includes(el.type) ? \"change\" : \"input\";\n        removeListener = $f347e48613385d9c$var$on(el, event, modifiers, (e)=>{\n            setValue($f347e48613385d9c$var$getInputValue(el, modifiers, e, getValue()));\n        });\n    }\n    if (modifiers.includes(\"fill\")) {\n        if ([\n            void 0,\n            null,\n            \"\"\n        ].includes(getValue()) || $f347e48613385d9c$var$isCheckbox(el) && Array.isArray(getValue()) || el.tagName.toLowerCase() === \"select\" && el.multiple) setValue($f347e48613385d9c$var$getInputValue(el, modifiers, {\n            target: el\n        }, getValue()));\n    }\n    if (!el._x_removeModelListeners) el._x_removeModelListeners = {};\n    el._x_removeModelListeners[\"default\"] = removeListener;\n    cleanup(()=>el._x_removeModelListeners[\"default\"]());\n    if (el.form) {\n        let removeResetListener = $f347e48613385d9c$var$on(el.form, \"reset\", [], (e)=>{\n            $f347e48613385d9c$var$nextTick(()=>el._x_model && el._x_model.set($f347e48613385d9c$var$getInputValue(el, modifiers, {\n                    target: el\n                }, getValue())));\n        });\n        cleanup(()=>removeResetListener());\n    }\n    el._x_model = {\n        get () {\n            return getValue();\n        },\n        set (value) {\n            setValue(value);\n        },\n        setWithModifiers: $f347e48613385d9c$var$addDebounceOrThrottle(modifiers, setValue)\n    };\n    el._x_forceModelUpdate = (value)=>{\n        if (value === void 0 && typeof expression === \"string\" && expression.match(/\\./)) value = \"\";\n        $f347e48613385d9c$var$mutateDom(()=>{\n            if ($f347e48613385d9c$var$isCheckbox(el)) {\n                if (Array.isArray(value)) el.checked = value.some((val)=>val == el.value);\n                else el.checked = !!value;\n            } else if ($f347e48613385d9c$var$isRadio(el)) {\n                if (typeof value === \"boolean\") el.checked = $f347e48613385d9c$var$safeParseBoolean(el.value) === value;\n                else el.checked = el.value == value;\n            } else $f347e48613385d9c$var$bind(el, \"value\", value);\n        });\n    };\n    if (el.tagName === \"SELECT\") {\n        let observer2 = new MutationObserver(()=>{\n            el._x_forceModelUpdate(getValue());\n        });\n        observer2.observe(el, {\n            childList: true\n        });\n        cleanup(()=>observer2.disconnect());\n    }\n    effect3(()=>{\n        let value = getValue();\n        if (modifiers.includes(\"unintrusive\") && document.activeElement.isSameNode(el)) return;\n        el._x_forceModelUpdate(value);\n    });\n});\nfunction $f347e48613385d9c$var$getInputValue(el, modifiers, event, currentValue) {\n    return $f347e48613385d9c$var$mutateDom(()=>{\n        if (event instanceof CustomEvent && event.detail !== void 0) return event.detail !== null && event.detail !== void 0 ? event.detail : event.target.value;\n        else if ($f347e48613385d9c$var$isCheckbox(el)) {\n            if (Array.isArray(currentValue)) {\n                let newValue = null;\n                if (modifiers.includes(\"number\")) newValue = $f347e48613385d9c$var$safeParseNumber(event.target.value);\n                else if (modifiers.includes(\"boolean\")) newValue = $f347e48613385d9c$var$safeParseBoolean(event.target.value);\n                else newValue = event.target.value;\n                return event.target.checked ? currentValue.includes(newValue) ? currentValue : currentValue.concat([\n                    newValue\n                ]) : currentValue.filter((el2)=>!$f347e48613385d9c$var$checkedAttrLooseCompare2(el2, newValue));\n            } else return event.target.checked;\n        } else if (el.tagName.toLowerCase() === \"select\" && el.multiple) {\n            if (modifiers.includes(\"number\")) return Array.from(event.target.selectedOptions).map((option)=>{\n                let rawValue = option.value || option.text;\n                return $f347e48613385d9c$var$safeParseNumber(rawValue);\n            });\n            else if (modifiers.includes(\"boolean\")) return Array.from(event.target.selectedOptions).map((option)=>{\n                let rawValue = option.value || option.text;\n                return $f347e48613385d9c$var$safeParseBoolean(rawValue);\n            });\n            return Array.from(event.target.selectedOptions).map((option)=>{\n                return option.value || option.text;\n            });\n        } else {\n            let newValue;\n            if ($f347e48613385d9c$var$isRadio(el)) {\n                if (event.target.checked) newValue = event.target.value;\n                else newValue = currentValue;\n            } else newValue = event.target.value;\n            if (modifiers.includes(\"number\")) return $f347e48613385d9c$var$safeParseNumber(newValue);\n            else if (modifiers.includes(\"boolean\")) return $f347e48613385d9c$var$safeParseBoolean(newValue);\n            else if (modifiers.includes(\"trim\")) return newValue.trim();\n            else return newValue;\n        }\n    });\n}\nfunction $f347e48613385d9c$var$safeParseNumber(rawValue) {\n    let number = rawValue ? parseFloat(rawValue) : null;\n    return $f347e48613385d9c$var$isNumeric2(number) ? number : rawValue;\n}\nfunction $f347e48613385d9c$var$checkedAttrLooseCompare2(valueA, valueB) {\n    return valueA == valueB;\n}\nfunction $f347e48613385d9c$var$isNumeric2(subject) {\n    return !Array.isArray(subject) && !isNaN(subject);\n}\nfunction $f347e48613385d9c$var$isGetterSetter(value) {\n    return value !== null && typeof value === \"object\" && typeof value.get === \"function\" && typeof value.set === \"function\";\n}\n// packages/alpinejs/src/directives/x-cloak.js\n$f347e48613385d9c$var$directive(\"cloak\", (el)=>{\n    if ($f347e48613385d9c$var$isCloning) return el.removeAttribute($f347e48613385d9c$var$prefix(\"cloak\"));\n    queueMicrotask(()=>$f347e48613385d9c$var$mutateDom(()=>el.removeAttribute($f347e48613385d9c$var$prefix(\"cloak\"))));\n});\n// packages/alpinejs/src/directives/x-init.js\n$f347e48613385d9c$var$addInitSelector(()=>`[${$f347e48613385d9c$var$prefix(\"init\")}]`);\n$f347e48613385d9c$var$directive(\"init\", $f347e48613385d9c$var$skipDuringClone((el, { expression: expression }, { evaluate: evaluate2 })=>{\n    if (typeof expression === \"string\") return !!expression.trim() && evaluate2(expression, {}, false);\n    return evaluate2(expression, {}, false);\n}));\n// packages/alpinejs/src/directives/x-text.js\n$f347e48613385d9c$var$directive(\"text\", (el, { expression: expression }, { effect: effect3, evaluateLater: evaluateLater2 })=>{\n    let evaluate2 = evaluateLater2(expression);\n    effect3(()=>{\n        evaluate2((value)=>{\n            $f347e48613385d9c$var$mutateDom(()=>{\n                el.textContent = value;\n            });\n        });\n    });\n});\n// packages/alpinejs/src/directives/x-html.js\n$f347e48613385d9c$var$directive(\"html\", (el, { expression: expression }, { effect: effect3, evaluateLater: evaluateLater2 })=>{\n    let evaluate2 = evaluateLater2(expression);\n    effect3(()=>{\n        evaluate2((value)=>{\n            $f347e48613385d9c$var$mutateDom(()=>{\n                Array.from(el.children).forEach((child)=>$f347e48613385d9c$var$destroyTree(child));\n                el.innerHTML = value ?? \"\";\n                el._x_ignoreSelf = true;\n                $f347e48613385d9c$var$initTree(el);\n                delete el._x_ignoreSelf;\n            });\n        });\n    }, {\n        priority: \"structural\"\n    });\n});\n// packages/alpinejs/src/directives/x-bind.js\n$f347e48613385d9c$var$mapAttributes($f347e48613385d9c$var$startingWith(\":\", $f347e48613385d9c$var$into($f347e48613385d9c$var$prefix(\"bind:\"))));\nvar $f347e48613385d9c$var$handler2 = (el, { value: value, modifiers: modifiers, expression: expression, original: original }, { effect: effect3, cleanup: cleanup })=>{\n    if (!value) {\n        let bindingProviders = {};\n        $f347e48613385d9c$var$injectBindingProviders(bindingProviders);\n        let getBindings = $f347e48613385d9c$var$evaluateLater(el, expression);\n        getBindings((bindings)=>{\n            $f347e48613385d9c$var$applyBindingsObject(el, bindings, original);\n        }, {\n            scope: bindingProviders\n        });\n        return;\n    }\n    if (value === \"key\") return $f347e48613385d9c$var$storeKeyForXFor(el, expression);\n    if (el._x_inlineBindings && el._x_inlineBindings[value] && el._x_inlineBindings[value].extract) return;\n    let evaluate2 = $f347e48613385d9c$var$evaluateLater(el, expression);\n    effect3(()=>evaluate2((result)=>{\n            if (result === void 0 && typeof expression === \"string\" && expression.match(/\\./)) result = \"\";\n            $f347e48613385d9c$var$mutateDom(()=>$f347e48613385d9c$var$bind(el, value, result, modifiers));\n        }));\n    cleanup(()=>{\n        el._x_undoAddedClasses && el._x_undoAddedClasses();\n        el._x_undoAddedStyles && el._x_undoAddedStyles();\n    });\n};\n$f347e48613385d9c$var$handler2.inline = (el, { value: value, modifiers: modifiers, expression: expression })=>{\n    if (!value) return;\n    if (!el._x_inlineBindings) el._x_inlineBindings = {};\n    el._x_inlineBindings[value] = {\n        expression: expression,\n        extract: false\n    };\n};\n$f347e48613385d9c$var$directive(\"bind\", $f347e48613385d9c$var$handler2);\nfunction $f347e48613385d9c$var$storeKeyForXFor(el, expression) {\n    el._x_keyExpression = expression;\n}\n// packages/alpinejs/src/directives/x-data.js\n$f347e48613385d9c$var$addRootSelector(()=>`[${$f347e48613385d9c$var$prefix(\"data\")}]`);\nvar $f347e48613385d9c$var$dataForReconciliation = Symbol();\n$f347e48613385d9c$var$directive(\"data\", (el, { expression: expression }, { cleanup: cleanup })=>{\n    if ($f347e48613385d9c$var$shouldSkipRegisteringDataDuringClone(el)) return;\n    let dataToReconcile = el[$f347e48613385d9c$var$dataForReconciliation];\n    if (dataToReconcile?.expression === expression) return;\n    expression = expression === \"\" ? \"{}\" : expression;\n    let magicContext = {};\n    $f347e48613385d9c$var$injectMagics(magicContext, el);\n    let dataProviderContext = {};\n    $f347e48613385d9c$var$injectDataProviders(dataProviderContext, magicContext);\n    let data2 = $f347e48613385d9c$var$evaluate(el, expression, {\n        scope: dataProviderContext\n    });\n    if (data2 === void 0 || data2 === true) data2 = {};\n    $f347e48613385d9c$var$injectMagics(data2, el);\n    let reactiveData;\n    if (dataToReconcile?.reactiveData) {\n        reactiveData = dataToReconcile.reactiveData;\n        $f347e48613385d9c$var$reconcileData(reactiveData, data2);\n        let initialized = {\n            expression: expression\n        };\n        el[$f347e48613385d9c$var$dataForReconciliation] = initialized;\n        queueMicrotask(()=>{\n            if (el[$f347e48613385d9c$var$dataForReconciliation] === initialized) delete el[$f347e48613385d9c$var$dataForReconciliation];\n        });\n    } else reactiveData = $f347e48613385d9c$var$reactive(data2);\n    $f347e48613385d9c$var$initInterceptors(reactiveData, cleanup);\n    let undo = $f347e48613385d9c$var$addScopeToNode(el, reactiveData);\n    $f347e48613385d9c$var$skipDuringClone(()=>{\n        reactiveData[\"init\"] && $f347e48613385d9c$var$evaluate(el, reactiveData[\"init\"]);\n    })();\n    cleanup(()=>{\n        reactiveData[\"destroy\"] && $f347e48613385d9c$var$evaluate(el, reactiveData[\"destroy\"]);\n        undo();\n        let removed = {\n            reactiveData: reactiveData\n        };\n        el[$f347e48613385d9c$var$dataForReconciliation] = removed;\n        queueMicrotask(()=>{\n            if (el[$f347e48613385d9c$var$dataForReconciliation] === removed) delete el[$f347e48613385d9c$var$dataForReconciliation];\n        });\n    });\n});\nfunction $f347e48613385d9c$var$reconcileData(target, source) {\n    Object.keys(source).forEach((key)=>{\n        let descriptor = Object.getOwnPropertyDescriptor(source, key);\n        let existingDescriptor = Object.getOwnPropertyDescriptor(target, key);\n        if (descriptor.get || descriptor.set || existingDescriptor?.get || existingDescriptor?.set) {\n            if (existingDescriptor) delete target[key];\n            if (!existingDescriptor) target[key] = void 0;\n            descriptor.get || descriptor.set ? Object.defineProperty(target, key, descriptor) : target[key] = source[key];\n        } else target[key] = source[key];\n    });\n    Object.keys(target).filter((key)=>!Object.prototype.hasOwnProperty.call(source, key)).forEach((key)=>delete target[key]);\n}\n$f347e48613385d9c$var$interceptClone((from, to)=>{\n    if (from._x_dataStack) {\n        to._x_dataStack = from._x_dataStack;\n        to.setAttribute(\"data-has-alpine-state\", true);\n    }\n});\nfunction $f347e48613385d9c$var$shouldSkipRegisteringDataDuringClone(el) {\n    if (!$f347e48613385d9c$var$isCloning) return false;\n    if ($f347e48613385d9c$var$isCloningLegacy) return true;\n    return el.hasAttribute(\"data-has-alpine-state\");\n}\n// packages/alpinejs/src/directives/x-show.js\n$f347e48613385d9c$var$directive(\"show\", (el, { modifiers: modifiers, expression: expression }, { effect: effect3 })=>{\n    let evaluate2 = $f347e48613385d9c$var$evaluateLater(el, expression);\n    if (!el._x_doHide) el._x_doHide = ()=>{\n        $f347e48613385d9c$var$mutateDom(()=>{\n            el.style.setProperty(\"display\", \"none\", modifiers.includes(\"important\") ? \"important\" : void 0);\n        });\n    };\n    if (!el._x_doShow) el._x_doShow = ()=>{\n        $f347e48613385d9c$var$mutateDom(()=>{\n            if (el.style.length === 1 && el.style.display === \"none\") el.removeAttribute(\"style\");\n            else el.style.removeProperty(\"display\");\n        });\n    };\n    let hide = ()=>{\n        el._x_doHide();\n        el._x_isShown = false;\n    };\n    let show = ()=>{\n        el._x_doShow();\n        el._x_isShown = true;\n    };\n    let clickAwayCompatibleShow = ()=>setTimeout(show);\n    let toggle = $f347e48613385d9c$var$once((value)=>value ? show() : hide(), (value)=>{\n        if (typeof el._x_toggleAndCascadeWithTransitions === \"function\") el._x_toggleAndCascadeWithTransitions(el, value, show, hide);\n        else value ? clickAwayCompatibleShow() : hide();\n    });\n    let oldValue;\n    let firstTime = true;\n    effect3(()=>evaluate2((value)=>{\n            if (!firstTime && value === oldValue) return;\n            if (modifiers.includes(\"immediate\")) value ? clickAwayCompatibleShow() : hide();\n            toggle(value);\n            oldValue = value;\n            firstTime = false;\n        }));\n});\n// packages/alpinejs/src/directives/x-for.js\n$f347e48613385d9c$var$directive(\"for\", $f347e48613385d9c$var$skipDuringClone((el, { expression: expression }, { effect: effect3, cleanup: cleanup })=>{\n    let iteratorNames = $f347e48613385d9c$var$parseForExpression(expression);\n    let evaluateItems = $f347e48613385d9c$var$evaluateLater(el, iteratorNames.items);\n    let evaluateKey = $f347e48613385d9c$var$evaluateLater(el, // the x-bind:key expression is stored for our use instead of evaluated.\n    el._x_keyExpression || \"index\");\n    el._x_lookup = /* @__PURE__ */ new Map();\n    effect3(()=>$f347e48613385d9c$var$loop(el, iteratorNames, evaluateItems, evaluateKey), {\n        priority: \"structural\"\n    });\n    cleanup(()=>{\n        el._x_lookup.forEach((el2)=>$f347e48613385d9c$var$mutateDom(()=>{\n                $f347e48613385d9c$var$destroyTree(el2);\n                el2.remove();\n            }));\n        delete el._x_lookup;\n        delete el._x_lastRenderedEl;\n    });\n}));\nfunction $f347e48613385d9c$var$refreshScope(scope2) {\n    return (newScope)=>{\n        Object.entries(newScope).forEach(([key, value])=>{\n            scope2[key] = value;\n        });\n    };\n}\nfunction $f347e48613385d9c$var$loop(templateEl, iteratorNames, evaluateItems, evaluateKey) {\n    evaluateItems((items)=>{\n        if ($f347e48613385d9c$var$isNumeric3(items)) items = Array.from({\n            length: items\n        }, (_, i)=>i + 1);\n        if (items === void 0 || items === null) items = [];\n        if (items instanceof Set) items = Array.from(items);\n        if (items instanceof Map) items = Array.from(items);\n        let oldLookup = templateEl._x_lookup;\n        let lookup = /* @__PURE__ */ new Map();\n        templateEl._x_lookup = lookup;\n        let hasStringKeys = $f347e48613385d9c$var$isObject2(items);\n        let scopeEntries = Object.entries(items).map(([index, item])=>{\n            if (!hasStringKeys) index = parseInt(index);\n            let scope2 = $f347e48613385d9c$var$getIterationScopeVariables(iteratorNames, item, index, items);\n            let key;\n            evaluateKey((innerKey)=>{\n                if (typeof innerKey === \"object\") $f347e48613385d9c$var$warn(\"x-for key cannot be an object, it must be a string or an integer\", templateEl);\n                if (oldLookup.has(innerKey)) {\n                    lookup.set(innerKey, oldLookup.get(innerKey));\n                    oldLookup.delete(innerKey);\n                }\n                key = innerKey;\n            }, {\n                scope: {\n                    index: index,\n                    ...scope2\n                }\n            });\n            return [\n                key,\n                scope2\n            ];\n        });\n        $f347e48613385d9c$var$mutateDom(()=>{\n            oldLookup.forEach((el)=>{\n                $f347e48613385d9c$var$destroyTree(el);\n                el.remove();\n            });\n            let added = /* @__PURE__ */ new Set();\n            let prev = templateEl;\n            scopeEntries.forEach(([key, scope2])=>{\n                if (lookup.has(key)) {\n                    let el = lookup.get(key);\n                    el._x_refreshXForScope(scope2);\n                    if (prev.nextElementSibling !== el) {\n                        if (prev.nextElementSibling) el.replaceWith(prev.nextElementSibling);\n                        prev.after(el);\n                    }\n                    prev = el;\n                    if (el._x_currentIfEl) {\n                        if (el.nextElementSibling !== el._x_currentIfEl) prev.after(el._x_currentIfEl);\n                        prev = el._x_currentIfEl;\n                    }\n                    return;\n                }\n                if (templateEl.content.children.length > 1) $f347e48613385d9c$var$warn(\"x-for templates require a single root element, additional elements will be ignored.\", templateEl);\n                let clone2 = document.importNode(templateEl.content, true).firstElementChild;\n                let reactiveScope = $f347e48613385d9c$var$reactive(scope2);\n                $f347e48613385d9c$var$addScopeToNode(clone2, reactiveScope, templateEl);\n                clone2._x_refreshXForScope = $f347e48613385d9c$var$refreshScope(reactiveScope);\n                lookup.set(key, clone2);\n                added.add(clone2);\n                prev.after(clone2);\n                prev = clone2;\n            });\n            added.forEach((clone2)=>$f347e48613385d9c$var$initTree(clone2));\n            if (prev !== templateEl) templateEl._x_lastRenderedEl = prev;\n            else delete templateEl._x_lastRenderedEl;\n        });\n    });\n}\nfunction $f347e48613385d9c$var$parseForExpression(expression) {\n    let forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\n    let stripParensRE = /^\\s*\\(|\\)\\s*$/g;\n    let forAliasRE = /([\\s\\S]*?)\\b(?:in|of)\\b([\\s\\S]*)/;\n    let inMatch = expression.match(forAliasRE);\n    if (!inMatch) return;\n    let res = {};\n    res.items = inMatch[2].trim();\n    let item = inMatch[1].replace(stripParensRE, \"\").trim();\n    let iteratorMatch = item.match(forIteratorRE);\n    if (iteratorMatch) {\n        res.item = item.replace(forIteratorRE, \"\").trim();\n        res.index = iteratorMatch[1].trim();\n        if (iteratorMatch[2]) res.collection = iteratorMatch[2].trim();\n    } else res.item = item;\n    return res;\n}\nfunction $f347e48613385d9c$var$getIterationScopeVariables(iteratorNames, item, index, items) {\n    let scopeVariables = {};\n    if (/^\\[.*\\]$/.test(iteratorNames.item) && Array.isArray(item)) {\n        let names = iteratorNames.item.replace(\"[\", \"\").replace(\"]\", \"\").split(\",\").map((i)=>i.trim());\n        names.forEach((name, i)=>{\n            scopeVariables[name] = item[i];\n        });\n    } else if (/^\\{.*\\}$/.test(iteratorNames.item) && !Array.isArray(item) && typeof item === \"object\") {\n        let names = iteratorNames.item.replace(\"{\", \"\").replace(\"}\", \"\").split(\",\").map((i)=>i.trim());\n        names.forEach((name)=>{\n            scopeVariables[name] = item[name];\n        });\n    } else scopeVariables[iteratorNames.item] = item;\n    if (iteratorNames.index) scopeVariables[iteratorNames.index] = index;\n    if (iteratorNames.collection) scopeVariables[iteratorNames.collection] = items;\n    return scopeVariables;\n}\nfunction $f347e48613385d9c$var$isNumeric3(subject) {\n    return typeof subject !== \"object\" && !isNaN(subject);\n}\nfunction $f347e48613385d9c$var$isObject2(subject) {\n    return typeof subject === \"object\" && !Array.isArray(subject);\n}\n// packages/alpinejs/src/directives/x-ref.js\nfunction $f347e48613385d9c$var$handler3() {}\n$f347e48613385d9c$var$handler3.inline = (el, { expression: expression }, { cleanup: cleanup })=>{\n    let root = $f347e48613385d9c$var$closestRoot(el);\n    if (!root) return;\n    if (!root._x_refs) root._x_refs = {};\n    root._x_refs[expression] = el;\n    cleanup(()=>delete root._x_refs[expression]);\n};\n$f347e48613385d9c$var$directive(\"ref\", $f347e48613385d9c$var$handler3);\n// packages/alpinejs/src/directives/x-if.js\n$f347e48613385d9c$var$directive(\"if\", $f347e48613385d9c$var$skipDuringClone((el, { expression: expression }, { effect: effect3, cleanup: cleanup })=>{\n    if (el.tagName.toLowerCase() !== \"template\") $f347e48613385d9c$var$warn(\"x-if can only be used on a <template> tag\", el);\n    let evaluate2 = $f347e48613385d9c$var$evaluateLater(el, expression);\n    let show = ()=>{\n        if (el._x_currentIfEl) return el._x_currentIfEl;\n        let clone2 = el.content.cloneNode(true).firstElementChild;\n        $f347e48613385d9c$var$addScopeToNode(clone2, {}, el);\n        $f347e48613385d9c$var$mutateDom(()=>{\n            el.after(clone2);\n            $f347e48613385d9c$var$initTree(clone2);\n        });\n        el._x_currentIfEl = clone2;\n        el._x_lastRenderedEl = clone2;\n        el._x_undoIf = ()=>{\n            $f347e48613385d9c$var$mutateDom(()=>{\n                $f347e48613385d9c$var$destroyTree(clone2);\n                clone2.remove();\n            });\n            delete el._x_currentIfEl;\n            delete el._x_lastRenderedEl;\n        };\n        return clone2;\n    };\n    let hide = ()=>{\n        if (!el._x_undoIf) return;\n        el._x_undoIf();\n        delete el._x_undoIf;\n    };\n    effect3(()=>evaluate2((value)=>{\n            value ? show() : hide();\n        }), {\n        priority: \"structural\"\n    });\n    cleanup(()=>el._x_undoIf && el._x_undoIf());\n}));\n// packages/alpinejs/src/directives/x-id.js\n$f347e48613385d9c$var$directive(\"id\", (el, { expression: expression }, { evaluate: evaluate2 })=>{\n    let names = evaluate2(expression);\n    names.forEach((name)=>$f347e48613385d9c$var$setIdRoot(el, name));\n});\n$f347e48613385d9c$var$interceptClone((from, to)=>{\n    if (from._x_ids) to._x_ids = from._x_ids;\n});\n// packages/alpinejs/src/directives/x-on.js\n$f347e48613385d9c$var$mapAttributes($f347e48613385d9c$var$startingWith(\"@\", $f347e48613385d9c$var$into($f347e48613385d9c$var$prefix(\"on:\"))));\n$f347e48613385d9c$var$directive(\"on\", $f347e48613385d9c$var$skipDuringClone((el, { value: value, modifiers: modifiers, expression: expression }, { cleanup: cleanup })=>{\n    let evaluate2 = expression ? $f347e48613385d9c$var$evaluateLater(el, expression) : ()=>{};\n    if (el.tagName.toLowerCase() === \"template\") {\n        if (!el._x_forwardEvents) el._x_forwardEvents = [];\n        if (!el._x_forwardEvents.includes(value)) el._x_forwardEvents.push(value);\n    }\n    let removeListener = $f347e48613385d9c$var$on(el, value, modifiers, (e)=>{\n        evaluate2(()=>{}, {\n            scope: {\n                \"$event\": e\n            },\n            params: [\n                e\n            ]\n        });\n    });\n    cleanup(()=>removeListener());\n}));\n// packages/alpinejs/src/directives/index.js\n$f347e48613385d9c$var$warnMissingPluginDirective(\"Collapse\", \"collapse\", \"collapse\");\n$f347e48613385d9c$var$warnMissingPluginDirective(\"Intersect\", \"intersect\", \"intersect\");\n$f347e48613385d9c$var$warnMissingPluginDirective(\"Focus\", \"trap\", \"focus\");\n$f347e48613385d9c$var$warnMissingPluginDirective(\"Mask\", \"mask\", \"mask\");\nfunction $f347e48613385d9c$var$warnMissingPluginDirective(name, directiveName, slug) {\n    $f347e48613385d9c$var$directive(directiveName, (el)=>$f347e48613385d9c$var$warn(`You can't use [x-${directiveName}] without first installing the \"${name}\" plugin here: https://alpinejs.dev/plugins/${slug}`, el));\n}\n// packages/alpinejs/src/index.js\n$f347e48613385d9c$var$alpine_default.setEvaluator($f347e48613385d9c$var$normalEvaluator);\n$f347e48613385d9c$var$alpine_default.setRawEvaluator($f347e48613385d9c$var$normalRawEvaluator);\n$f347e48613385d9c$var$alpine_default.setReactivityEngine({\n    reactive: $f347e48613385d9c$var$reactive2,\n    // Since Vue 3.2, the scheduler is called with no arguments, so we wrap\n    // the effect to hand Alpine's scheduler the runner it expects to queue.\n    effect: (callback, options = {})=>{\n        let runner;\n        runner = $f347e48613385d9c$var$effect2(callback, {\n            scheduler: ()=>{\n                if (!runner) return;\n                options.scheduler ? options.scheduler(runner) : runner();\n            }\n        });\n        return runner;\n    },\n    release: $f347e48613385d9c$var$stop,\n    raw: $f347e48613385d9c$var$toRaw\n});\nvar $f347e48613385d9c$export$b7ee041e4ad2afec = $f347e48613385d9c$var$alpine_default;\n// packages/alpinejs/builds/module.js\nvar $f347e48613385d9c$export$2e2bcd8739ae039 = $f347e48613385d9c$export$b7ee041e4ad2afec;\n /*! Bundled license information:\n\n@vue/shared/dist/shared.esm-bundler.js:\n  (**\n  * @vue/shared v3.5.41\n  * (c) 2018-present Yuxi (Evan) You and Vue contributors\n  * @license MIT\n  **)\n\n@vue/reactivity/dist/reactivity.esm-bundler.js:\n  (**\n  * @vue/reactivity v3.5.41\n  * (c) 2018-present Yuxi (Evan) You and Vue contributors\n  * @license MIT\n  **)\n*/ \n\n\nvar $lrtgD = parcelRequire(\"lrtgD\");\n\nvar $hHqg9 = parcelRequire(\"hHqg9\");\n\nvar $bV58F = parcelRequire(\"bV58F\");\n\nvar $busg4 = parcelRequire(\"busg4\");\n\nvar $dWz0N = parcelRequire(\"dWz0N\");\n\nvar $cSEGC = parcelRequire(\"cSEGC\");\n\nvar $8DTOO = parcelRequire(\"8DTOO\");\n\nvar $7A7V9 = parcelRequire(\"7A7V9\");\n\nvar $bKHmb = parcelRequire(\"bKHmb\");\n\nvar $aFSg5 = parcelRequire(\"aFSg5\");\n\nvar $b4EcM = parcelRequire(\"b4EcM\");\n\nvar $1c3wp = parcelRequire(\"1c3wp\");\n\nvar $6ZBMV = parcelRequire(\"6ZBMV\");\n\nvar $eokEX = parcelRequire(\"eokEX\");\n\nvar $d6Hx1 = parcelRequire(\"d6Hx1\");\n\nvar $F4g3Q = parcelRequire(\"F4g3Q\");\n\nvar $lbjQh = parcelRequire(\"lbjQh\");\n\nvar $ak9J4 = parcelRequire(\"ak9J4\");\n\nvar $lWvX9 = parcelRequire(\"lWvX9\");\n\nvar $jwT4P = parcelRequire(\"jwT4P\");\n\nvar $dgpCO = parcelRequire(\"dgpCO\");\n\nvar $kXOQU = parcelRequire(\"kXOQU\");\n\nvar $55buA = parcelRequire(\"55buA\");\n\nvar $fZuEE = parcelRequire(\"fZuEE\");\nvar $37e295d5e2f3bd20$exports = {};\n\"use strict\";\nvar $37e295d5e2f3bd20$var$__importDefault = $37e295d5e2f3bd20$exports && $37e295d5e2f3bd20$exports.__importDefault || function(mod) {\n    return mod && mod.__esModule ? mod : {\n        \"default\": mod\n    };\n};\nObject.defineProperty($37e295d5e2f3bd20$exports, \"__esModule\", {\n    value: true\n});\n$37e295d5e2f3bd20$exports.POPULAR_TLDS = $37e295d5e2f3bd20$exports.POPULAR_DOMAINS = $37e295d5e2f3bd20$exports.run = void 0;\n\nconst $37e295d5e2f3bd20$var$run_1 = $37e295d5e2f3bd20$var$__importDefault((parcelRequire(\"QGjLH\")));\n$37e295d5e2f3bd20$exports.run = $37e295d5e2f3bd20$var$run_1.default;\n\nvar $2ffcM = parcelRequire(\"2ffcM\");\nObject.defineProperty($37e295d5e2f3bd20$exports, \"POPULAR_DOMAINS\", {\n    enumerable: true,\n    get: function() {\n        return $2ffcM.POPULAR_DOMAINS;\n    }\n});\nObject.defineProperty($37e295d5e2f3bd20$exports, \"POPULAR_TLDS\", {\n    enumerable: true,\n    get: function() {\n        return $2ffcM.POPULAR_TLDS;\n    }\n});\nconst $37e295d5e2f3bd20$var$MailSpellChecker = {\n    run: $37e295d5e2f3bd20$var$run_1.default,\n    POPULAR_DOMAINS: $2ffcM.POPULAR_DOMAINS,\n    POPULAR_TLDS: $2ffcM.POPULAR_TLDS\n};\n$37e295d5e2f3bd20$exports.default = $37e295d5e2f3bd20$var$MailSpellChecker;\n\n\nvar $2bd4b9c31e857ffa$var$Events = /** @class */ function() {\n    function Events(eventType, eventFunctions) {\n        if (eventFunctions === void 0) eventFunctions = [];\n        this._eventType = eventType;\n        this._eventFunctions = eventFunctions;\n    }\n    Events.prototype.init = function() {\n        var _this = this;\n        this._eventFunctions.forEach(function(eventFunction) {\n            if (typeof window !== 'undefined') window.addEventListener(_this._eventType, eventFunction);\n        });\n    };\n    return Events;\n}();\nvar $2bd4b9c31e857ffa$export$2e2bcd8739ae039 = $2bd4b9c31e857ffa$var$Events;\n\n\nvar $5d5682da381fac09$var$Instances = /** @class */ function() {\n    function Instances() {\n        this._instances = {\n            Accordion: {},\n            Carousel: {},\n            Collapse: {},\n            Dial: {},\n            Dismiss: {},\n            Drawer: {},\n            Dropdown: {},\n            Modal: {},\n            Popover: {},\n            Tabs: {},\n            Tooltip: {},\n            InputCounter: {},\n            CopyClipboard: {},\n            Datepicker: {}\n        };\n    }\n    Instances.prototype.addInstance = function(component, instance, id, override) {\n        if (override === void 0) override = false;\n        if (!this._instances[component]) {\n            console.warn(\"Flowbite: Component \".concat(component, \" does not exist.\"));\n            return false;\n        }\n        if (this._instances[component][id] && !override) {\n            console.warn(\"Flowbite: Instance with ID \".concat(id, \" already exists.\"));\n            return;\n        }\n        if (override && this._instances[component][id]) this._instances[component][id].destroyAndRemoveInstance();\n        this._instances[component][id ? id : this._generateRandomId()] = instance;\n    };\n    Instances.prototype.getAllInstances = function() {\n        return this._instances;\n    };\n    Instances.prototype.getInstances = function(component) {\n        if (!this._instances[component]) {\n            console.warn(\"Flowbite: Component \".concat(component, \" does not exist.\"));\n            return false;\n        }\n        return this._instances[component];\n    };\n    Instances.prototype.getInstance = function(component, id) {\n        if (!this._componentAndInstanceCheck(component, id)) return;\n        if (!this._instances[component][id]) {\n            console.warn(\"Flowbite: Instance with ID \".concat(id, \" does not exist.\"));\n            return;\n        }\n        return this._instances[component][id];\n    };\n    Instances.prototype.destroyAndRemoveInstance = function(component, id) {\n        if (!this._componentAndInstanceCheck(component, id)) return;\n        this.destroyInstanceObject(component, id);\n        this.removeInstance(component, id);\n    };\n    Instances.prototype.removeInstance = function(component, id) {\n        if (!this._componentAndInstanceCheck(component, id)) return;\n        delete this._instances[component][id];\n    };\n    Instances.prototype.destroyInstanceObject = function(component, id) {\n        if (!this._componentAndInstanceCheck(component, id)) return;\n        this._instances[component][id].destroy();\n    };\n    Instances.prototype.instanceExists = function(component, id) {\n        if (!this._instances[component]) return false;\n        if (!this._instances[component][id]) return false;\n        return true;\n    };\n    Instances.prototype._generateRandomId = function() {\n        return Math.random().toString(36).substr(2, 9);\n    };\n    Instances.prototype._componentAndInstanceCheck = function(component, id) {\n        if (!this._instances[component]) {\n            console.warn(\"Flowbite: Component \".concat(component, \" does not exist.\"));\n            return false;\n        }\n        if (!this._instances[component][id]) {\n            console.warn(\"Flowbite: Instance with ID \".concat(id, \" does not exist.\"));\n            return false;\n        }\n        return true;\n    };\n    return Instances;\n}();\nvar $5d5682da381fac09$var$instances = new $5d5682da381fac09$var$Instances();\nvar $5d5682da381fac09$export$2e2bcd8739ae039 = $5d5682da381fac09$var$instances;\nif (typeof window !== 'undefined') window.FlowbiteInstances = $5d5682da381fac09$var$instances;\n\n\nvar $d93a619a461d9c03$var$__assign = undefined && undefined.__assign || function() {\n    $d93a619a461d9c03$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $d93a619a461d9c03$var$__assign.apply(this, arguments);\n};\nvar $d93a619a461d9c03$var$Default = {\n    alwaysOpen: false,\n    activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n    inactiveClasses: 'text-gray-500 dark:text-gray-400',\n    onOpen: function() {},\n    onClose: function() {},\n    onToggle: function() {}\n};\nvar $d93a619a461d9c03$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $d93a619a461d9c03$var$Accordion = /** @class */ function() {\n    function Accordion(accordionEl, items, options, instanceOptions) {\n        if (accordionEl === void 0) accordionEl = null;\n        if (items === void 0) items = [];\n        if (options === void 0) options = $d93a619a461d9c03$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $d93a619a461d9c03$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : accordionEl.id;\n        this._accordionEl = accordionEl;\n        this._items = items;\n        this._options = $d93a619a461d9c03$var$__assign($d93a619a461d9c03$var$__assign({}, $d93a619a461d9c03$var$Default), options);\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Accordion', this, this._instanceId, instanceOptions.override);\n    }\n    Accordion.prototype.init = function() {\n        var _this = this;\n        if (this._items.length && !this._initialized) {\n            // show accordion item based on click\n            this._items.forEach(function(item) {\n                if (item.active) _this.open(item.id);\n                var clickHandler = function() {\n                    _this.toggle(item.id);\n                };\n                item.triggerEl.addEventListener('click', clickHandler);\n                // Store the clickHandler in a property of the item for removal later\n                item.clickHandler = clickHandler;\n            });\n            this._initialized = true;\n        }\n    };\n    Accordion.prototype.destroy = function() {\n        if (this._items.length && this._initialized) {\n            this._items.forEach(function(item) {\n                item.triggerEl.removeEventListener('click', item.clickHandler);\n                // Clean up by deleting the clickHandler property from the item\n                delete item.clickHandler;\n            });\n            this._initialized = false;\n        }\n    };\n    Accordion.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Accordion', this._instanceId);\n    };\n    Accordion.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Accordion.prototype.getItem = function(id) {\n        return this._items.filter(function(item) {\n            return item.id === id;\n        })[0];\n    };\n    Accordion.prototype.open = function(id) {\n        var _a, _b;\n        var _this = this;\n        var item = this.getItem(id);\n        // don't hide other accordions if always open\n        if (!this._options.alwaysOpen) this._items.map(function(i) {\n            var _a, _b;\n            if (i !== item) {\n                (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' '));\n                (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' '));\n                i.targetEl.classList.add('hidden');\n                i.triggerEl.setAttribute('aria-expanded', 'false');\n                i.active = false;\n                // rotate icon if set\n                if (i.iconEl) i.iconEl.classList.add('rotate-180');\n            }\n        });\n        // show active item\n        (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' '));\n        (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' '));\n        item.triggerEl.setAttribute('aria-expanded', 'true');\n        item.targetEl.classList.remove('hidden');\n        item.active = true;\n        // rotate icon if set\n        if (item.iconEl) item.iconEl.classList.remove('rotate-180');\n        // callback function\n        this._options.onOpen(this, item);\n    };\n    Accordion.prototype.toggle = function(id) {\n        var item = this.getItem(id);\n        if (item.active) this.close(id);\n        else this.open(id);\n        // callback function\n        this._options.onToggle(this, item);\n    };\n    Accordion.prototype.close = function(id) {\n        var _a, _b;\n        var item = this.getItem(id);\n        (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' '));\n        (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' '));\n        item.targetEl.classList.add('hidden');\n        item.triggerEl.setAttribute('aria-expanded', 'false');\n        item.active = false;\n        // rotate icon if set\n        if (item.iconEl) item.iconEl.classList.add('rotate-180');\n        // callback function\n        this._options.onClose(this, item);\n    };\n    Accordion.prototype.updateOnOpen = function(callback) {\n        this._options.onOpen = callback;\n    };\n    Accordion.prototype.updateOnClose = function(callback) {\n        this._options.onClose = callback;\n    };\n    Accordion.prototype.updateOnToggle = function(callback) {\n        this._options.onToggle = callback;\n    };\n    return Accordion;\n}();\nfunction $d93a619a461d9c03$export$226c1dc98323ee4d() {\n    document.querySelectorAll('[data-accordion]').forEach(function($accordionEl) {\n        var alwaysOpen = $accordionEl.getAttribute('data-accordion');\n        var activeClasses = $accordionEl.getAttribute('data-active-classes');\n        var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes');\n        var items = [];\n        $accordionEl.querySelectorAll('[data-accordion-target]').forEach(function($triggerEl) {\n            // Consider only items that directly belong to $accordionEl\n            // (to make nested accordions work).\n            if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n                var item = {\n                    id: $triggerEl.getAttribute('data-accordion-target'),\n                    triggerEl: $triggerEl,\n                    targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')),\n                    iconEl: $triggerEl.querySelector('[data-accordion-icon]'),\n                    active: $triggerEl.getAttribute('aria-expanded') === 'true' ? true : false\n                };\n                items.push(item);\n            }\n        });\n        new $d93a619a461d9c03$var$Accordion($accordionEl, items, {\n            alwaysOpen: alwaysOpen === 'open' ? true : false,\n            activeClasses: activeClasses ? activeClasses : $d93a619a461d9c03$var$Default.activeClasses,\n            inactiveClasses: inactiveClasses ? inactiveClasses : $d93a619a461d9c03$var$Default.inactiveClasses\n        });\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Accordion = $d93a619a461d9c03$var$Accordion;\n    window.initAccordions = $d93a619a461d9c03$export$226c1dc98323ee4d;\n}\nvar $d93a619a461d9c03$export$2e2bcd8739ae039 = $d93a619a461d9c03$var$Accordion;\n\n\n\nvar $fc7ccf099a511882$var$__assign = undefined && undefined.__assign || function() {\n    $fc7ccf099a511882$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $fc7ccf099a511882$var$__assign.apply(this, arguments);\n};\nvar $fc7ccf099a511882$var$Default = {\n    onCollapse: function() {},\n    onExpand: function() {},\n    onToggle: function() {}\n};\nvar $fc7ccf099a511882$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $fc7ccf099a511882$var$Collapse = /** @class */ function() {\n    function Collapse(targetEl, triggerEl, options, instanceOptions) {\n        if (targetEl === void 0) targetEl = null;\n        if (triggerEl === void 0) triggerEl = null;\n        if (options === void 0) options = $fc7ccf099a511882$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $fc7ccf099a511882$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = $fc7ccf099a511882$var$__assign($fc7ccf099a511882$var$__assign({}, $fc7ccf099a511882$var$Default), options);\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Collapse', this, this._instanceId, instanceOptions.override);\n    }\n    Collapse.prototype.init = function() {\n        var _this = this;\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            if (this._triggerEl.hasAttribute('aria-expanded')) this._visible = this._triggerEl.getAttribute('aria-expanded') === 'true';\n            else // fix until v2 not to break previous single collapses which became dismiss\n            this._visible = !this._targetEl.classList.contains('hidden');\n            this._clickHandler = function() {\n                _this.toggle();\n            };\n            this._triggerEl.addEventListener('click', this._clickHandler);\n            this._initialized = true;\n        }\n    };\n    Collapse.prototype.destroy = function() {\n        if (this._triggerEl && this._initialized) {\n            this._triggerEl.removeEventListener('click', this._clickHandler);\n            this._initialized = false;\n        }\n    };\n    Collapse.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Collapse', this._instanceId);\n    };\n    Collapse.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Collapse.prototype.collapse = function() {\n        this._targetEl.classList.add('hidden');\n        if (this._triggerEl) this._triggerEl.setAttribute('aria-expanded', 'false');\n        this._visible = false;\n        // callback function\n        this._options.onCollapse(this);\n    };\n    Collapse.prototype.expand = function() {\n        this._targetEl.classList.remove('hidden');\n        if (this._triggerEl) this._triggerEl.setAttribute('aria-expanded', 'true');\n        this._visible = true;\n        // callback function\n        this._options.onExpand(this);\n    };\n    Collapse.prototype.toggle = function() {\n        if (this._visible) this.collapse();\n        else this.expand();\n        // callback function\n        this._options.onToggle(this);\n    };\n    Collapse.prototype.updateOnCollapse = function(callback) {\n        this._options.onCollapse = callback;\n    };\n    Collapse.prototype.updateOnExpand = function(callback) {\n        this._options.onExpand = callback;\n    };\n    Collapse.prototype.updateOnToggle = function(callback) {\n        this._options.onToggle = callback;\n    };\n    return Collapse;\n}();\nfunction $fc7ccf099a511882$export$355ba5a528b4009a() {\n    document.querySelectorAll('[data-collapse-toggle]').forEach(function($triggerEl) {\n        var targetId = $triggerEl.getAttribute('data-collapse-toggle');\n        var $targetEl = document.getElementById(targetId);\n        // check if the target element exists\n        if ($targetEl) {\n            if (!(0, $5d5682da381fac09$export$2e2bcd8739ae039).instanceExists('Collapse', $targetEl.getAttribute('id'))) new $fc7ccf099a511882$var$Collapse($targetEl, $triggerEl);\n            else // if instance exists already for the same target element then create a new one with a different trigger element\n            new $fc7ccf099a511882$var$Collapse($targetEl, $triggerEl, {}, {\n                id: $targetEl.getAttribute('id') + '_' + (0, $5d5682da381fac09$export$2e2bcd8739ae039)._generateRandomId()\n            });\n        } else console.error(\"The target element with id \\\"\".concat(targetId, \"\\\" does not exist. Please check the data-collapse-toggle attribute.\"));\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Collapse = $fc7ccf099a511882$var$Collapse;\n    window.initCollapses = $fc7ccf099a511882$export$355ba5a528b4009a;\n}\nvar $fc7ccf099a511882$export$2e2bcd8739ae039 = $fc7ccf099a511882$var$Collapse;\n\n\n\nvar $c1b11beef829dd56$var$__assign = undefined && undefined.__assign || function() {\n    $c1b11beef829dd56$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $c1b11beef829dd56$var$__assign.apply(this, arguments);\n};\nvar $c1b11beef829dd56$var$Default = {\n    defaultPosition: 0,\n    indicators: {\n        items: [],\n        activeClasses: 'bg-white dark:bg-gray-800',\n        inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800'\n    },\n    interval: 3000,\n    onNext: function() {},\n    onPrev: function() {},\n    onChange: function() {}\n};\nvar $c1b11beef829dd56$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $c1b11beef829dd56$var$Carousel = /** @class */ function() {\n    function Carousel(carouselEl, items, options, instanceOptions) {\n        if (carouselEl === void 0) carouselEl = null;\n        if (items === void 0) items = [];\n        if (options === void 0) options = $c1b11beef829dd56$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $c1b11beef829dd56$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : carouselEl.id;\n        this._carouselEl = carouselEl;\n        this._items = items;\n        this._options = $c1b11beef829dd56$var$__assign($c1b11beef829dd56$var$__assign($c1b11beef829dd56$var$__assign({}, $c1b11beef829dd56$var$Default), options), {\n            indicators: $c1b11beef829dd56$var$__assign($c1b11beef829dd56$var$__assign({}, $c1b11beef829dd56$var$Default.indicators), options.indicators)\n        });\n        this._activeItem = this.getItem(this._options.defaultPosition);\n        this._indicators = this._options.indicators.items;\n        this._intervalDuration = this._options.interval;\n        this._intervalInstance = null;\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Carousel', this, this._instanceId, instanceOptions.override);\n    }\n    /**\n     * initialize carousel and items based on active one\n     */ Carousel.prototype.init = function() {\n        var _this = this;\n        if (this._items.length && !this._initialized) {\n            this._items.map(function(item) {\n                item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform');\n            });\n            // if no active item is set then first position is default\n            if (this.getActiveItem()) this.slideTo(this.getActiveItem().position);\n            else this.slideTo(0);\n            this._indicators.map(function(indicator, position) {\n                indicator.el.addEventListener('click', function() {\n                    _this.slideTo(position);\n                });\n            });\n            this._initialized = true;\n        }\n    };\n    Carousel.prototype.destroy = function() {\n        if (this._initialized) this._initialized = false;\n    };\n    Carousel.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Carousel', this._instanceId);\n    };\n    Carousel.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Carousel.prototype.getItem = function(position) {\n        return this._items[position];\n    };\n    /**\n     * Slide to the element based on id\n     * @param {*} position\n     */ Carousel.prototype.slideTo = function(position) {\n        var nextItem = this._items[position];\n        var rotationItems = {\n            left: nextItem.position === 0 ? this._items[this._items.length - 1] : this._items[nextItem.position - 1],\n            middle: nextItem,\n            right: nextItem.position === this._items.length - 1 ? this._items[0] : this._items[nextItem.position + 1]\n        };\n        this._rotate(rotationItems);\n        this._setActiveItem(nextItem);\n        if (this._intervalInstance) {\n            this.pause();\n            this.cycle();\n        }\n        this._options.onChange(this);\n    };\n    /**\n     * Based on the currently active item it will go to the next position\n     */ Carousel.prototype.next = function() {\n        var activeItem = this.getActiveItem();\n        var nextItem = null;\n        // check if last item\n        if (activeItem.position === this._items.length - 1) nextItem = this._items[0];\n        else nextItem = this._items[activeItem.position + 1];\n        this.slideTo(nextItem.position);\n        // callback function\n        this._options.onNext(this);\n    };\n    /**\n     * Based on the currently active item it will go to the previous position\n     */ Carousel.prototype.prev = function() {\n        var activeItem = this.getActiveItem();\n        var prevItem = null;\n        // check if first item\n        if (activeItem.position === 0) prevItem = this._items[this._items.length - 1];\n        else prevItem = this._items[activeItem.position - 1];\n        this.slideTo(prevItem.position);\n        // callback function\n        this._options.onPrev(this);\n    };\n    /**\n     * This method applies the transform classes based on the left, middle, and right rotation carousel items\n     * @param {*} rotationItems\n     */ Carousel.prototype._rotate = function(rotationItems) {\n        // reset\n        this._items.map(function(item) {\n            item.el.classList.add('hidden');\n        });\n        // Handling the case when there is only one item\n        if (this._items.length === 1) {\n            rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10');\n            rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n            return;\n        }\n        // left item (previously active)\n        rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20');\n        rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n        // currently active item\n        rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10');\n        rotationItems.middle.el.classList.add('translate-x-0', 'z-30');\n        // right item (upcoming active)\n        rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-30');\n        rotationItems.right.el.classList.add('translate-x-full', 'z-20');\n    };\n    /**\n     * Set an interval to cycle through the carousel items\n     */ Carousel.prototype.cycle = function() {\n        var _this = this;\n        if (typeof window !== 'undefined') this._intervalInstance = window.setInterval(function() {\n            _this.next();\n        }, this._intervalDuration);\n    };\n    /**\n     * Clears the cycling interval\n     */ Carousel.prototype.pause = function() {\n        clearInterval(this._intervalInstance);\n    };\n    /**\n     * Get the currently active item\n     */ Carousel.prototype.getActiveItem = function() {\n        return this._activeItem;\n    };\n    /**\n     * Set the currently active item and data attribute\n     * @param {*} position\n     */ Carousel.prototype._setActiveItem = function(item) {\n        var _a, _b;\n        var _this = this;\n        this._activeItem = item;\n        var position = item.position;\n        // update the indicators if available\n        if (this._indicators.length) {\n            this._indicators.map(function(indicator) {\n                var _a, _b;\n                indicator.el.setAttribute('aria-current', 'false');\n                (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' '));\n                (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' '));\n            });\n            (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' '));\n            (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' '));\n            this._indicators[position].el.setAttribute('aria-current', 'true');\n        }\n    };\n    Carousel.prototype.updateOnNext = function(callback) {\n        this._options.onNext = callback;\n    };\n    Carousel.prototype.updateOnPrev = function(callback) {\n        this._options.onPrev = callback;\n    };\n    Carousel.prototype.updateOnChange = function(callback) {\n        this._options.onChange = callback;\n    };\n    return Carousel;\n}();\nfunction $c1b11beef829dd56$export$3ab77386b16b9e58() {\n    document.querySelectorAll('[data-carousel]').forEach(function($carouselEl) {\n        var interval = $carouselEl.getAttribute('data-carousel-interval');\n        var slide = $carouselEl.getAttribute('data-carousel') === 'slide' ? true : false;\n        var items = [];\n        var defaultPosition = 0;\n        if ($carouselEl.querySelectorAll('[data-carousel-item]').length) Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function($carouselItemEl, position) {\n            items.push({\n                position: position,\n                el: $carouselItemEl\n            });\n            if ($carouselItemEl.getAttribute('data-carousel-item') === 'active') defaultPosition = position;\n        });\n        var indicators = [];\n        if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function($indicatorEl) {\n            indicators.push({\n                position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')),\n                el: $indicatorEl\n            });\n        });\n        var carousel = new $c1b11beef829dd56$var$Carousel($carouselEl, items, {\n            defaultPosition: defaultPosition,\n            indicators: {\n                items: indicators\n            },\n            interval: interval ? interval : $c1b11beef829dd56$var$Default.interval\n        });\n        if (slide) carousel.cycle();\n        // check for controls\n        var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]');\n        var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]');\n        if (carouselNextEl) carouselNextEl.addEventListener('click', function() {\n            carousel.next();\n        });\n        if (carouselPrevEl) carouselPrevEl.addEventListener('click', function() {\n            carousel.prev();\n        });\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Carousel = $c1b11beef829dd56$var$Carousel;\n    window.initCarousels = $c1b11beef829dd56$export$3ab77386b16b9e58;\n}\nvar $c1b11beef829dd56$export$2e2bcd8739ae039 = $c1b11beef829dd56$var$Carousel;\n\n\n\nvar $6d6d37a8acee51c1$var$__assign = undefined && undefined.__assign || function() {\n    $6d6d37a8acee51c1$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $6d6d37a8acee51c1$var$__assign.apply(this, arguments);\n};\nvar $6d6d37a8acee51c1$var$Default = {\n    transition: 'transition-opacity',\n    duration: 300,\n    timing: 'ease-out',\n    onHide: function() {}\n};\nvar $6d6d37a8acee51c1$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $6d6d37a8acee51c1$var$Dismiss = /** @class */ function() {\n    function Dismiss(targetEl, triggerEl, options, instanceOptions) {\n        if (targetEl === void 0) targetEl = null;\n        if (triggerEl === void 0) triggerEl = null;\n        if (options === void 0) options = $6d6d37a8acee51c1$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $6d6d37a8acee51c1$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = $6d6d37a8acee51c1$var$__assign($6d6d37a8acee51c1$var$__assign({}, $6d6d37a8acee51c1$var$Default), options);\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Dismiss', this, this._instanceId, instanceOptions.override);\n    }\n    Dismiss.prototype.init = function() {\n        var _this = this;\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._clickHandler = function() {\n                _this.hide();\n            };\n            this._triggerEl.addEventListener('click', this._clickHandler);\n            this._initialized = true;\n        }\n    };\n    Dismiss.prototype.destroy = function() {\n        if (this._triggerEl && this._initialized) {\n            this._triggerEl.removeEventListener('click', this._clickHandler);\n            this._initialized = false;\n        }\n    };\n    Dismiss.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Dismiss', this._instanceId);\n    };\n    Dismiss.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Dismiss.prototype.hide = function() {\n        var _this = this;\n        this._targetEl.classList.add(this._options.transition, \"duration-\".concat(this._options.duration), this._options.timing, 'opacity-0');\n        setTimeout(function() {\n            _this._targetEl.classList.add('hidden');\n        }, this._options.duration);\n        // callback function\n        this._options.onHide(this, this._targetEl);\n    };\n    Dismiss.prototype.updateOnHide = function(callback) {\n        this._options.onHide = callback;\n    };\n    return Dismiss;\n}();\nfunction $6d6d37a8acee51c1$export$69c84787a503daef() {\n    document.querySelectorAll('[data-dismiss-target]').forEach(function($triggerEl) {\n        var targetId = $triggerEl.getAttribute('data-dismiss-target');\n        var $dismissEl = document.querySelector(targetId);\n        if ($dismissEl) new $6d6d37a8acee51c1$var$Dismiss($dismissEl, $triggerEl);\n        else console.error(\"The dismiss element with id \\\"\".concat(targetId, \"\\\" does not exist. Please check the data-dismiss-target attribute.\"));\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Dismiss = $6d6d37a8acee51c1$var$Dismiss;\n    window.initDismisses = $6d6d37a8acee51c1$export$69c84787a503daef;\n}\nvar $6d6d37a8acee51c1$export$2e2bcd8739ae039 = $6d6d37a8acee51c1$var$Dismiss;\n\n\nfunction $df9341392e6ed7b1$export$2e2bcd8739ae039(node) {\n    if (node == null) return window;\n    if (node.toString() !== '[object Window]') {\n        var ownerDocument = node.ownerDocument;\n        return ownerDocument ? ownerDocument.defaultView || window : window;\n    }\n    return node;\n}\n\n\nfunction $d98cb23738a6d9d0$export$45a5e7f76e0caa8d(node) {\n    var OwnElement = (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(node).Element;\n    return node instanceof OwnElement || node instanceof Element;\n}\nfunction $d98cb23738a6d9d0$export$1b3bfaa9684536aa(node) {\n    var OwnElement = (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(node).HTMLElement;\n    return node instanceof OwnElement || node instanceof HTMLElement;\n}\nfunction $d98cb23738a6d9d0$export$af51f0f06c0f328a(node) {\n    // IE 11 has no ShadowRoot\n    if (typeof ShadowRoot === 'undefined') return false;\n    var OwnElement = (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(node).ShadowRoot;\n    return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\n\nvar $7e23bad950468b82$export$8960430cfd85939f = Math.max;\nvar $7e23bad950468b82$export$96ec731ed4dcb222 = Math.min;\nvar $7e23bad950468b82$export$2077e0241d6afd3c = Math.round;\n\n\n\nfunction $90ccbd5892233dd2$export$2e2bcd8739ae039() {\n    var uaData = navigator.userAgentData;\n    if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) return uaData.brands.map(function(item) {\n        return item.brand + \"/\" + item.version;\n    }).join(' ');\n    return navigator.userAgent;\n}\n\n\nfunction $993d40d65cc118cd$export$2e2bcd8739ae039() {\n    return !/^((?!chrome|android).)*safari/i.test((0, $90ccbd5892233dd2$export$2e2bcd8739ae039)());\n}\n\n\nfunction $84019ab652aa921b$export$2e2bcd8739ae039(element, includeScale, isFixedStrategy) {\n    if (includeScale === void 0) includeScale = false;\n    if (isFixedStrategy === void 0) isFixedStrategy = false;\n    var clientRect = element.getBoundingClientRect();\n    var scaleX = 1;\n    var scaleY = 1;\n    if (includeScale && (0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(element)) {\n        scaleX = element.offsetWidth > 0 ? (0, $7e23bad950468b82$export$2077e0241d6afd3c)(clientRect.width) / element.offsetWidth || 1 : 1;\n        scaleY = element.offsetHeight > 0 ? (0, $7e23bad950468b82$export$2077e0241d6afd3c)(clientRect.height) / element.offsetHeight || 1 : 1;\n    }\n    var _ref = (0, $d98cb23738a6d9d0$export$45a5e7f76e0caa8d)(element) ? (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(element) : window, visualViewport = _ref.visualViewport;\n    var addVisualOffsets = !(0, $993d40d65cc118cd$export$2e2bcd8739ae039)() && isFixedStrategy;\n    var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n    var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n    var width = clientRect.width / scaleX;\n    var height = clientRect.height / scaleY;\n    return {\n        width: width,\n        height: height,\n        top: y,\n        right: x + width,\n        bottom: y + height,\n        left: x,\n        x: x,\n        y: y\n    };\n}\n\n\n\nfunction $68a584be1dc90596$export$2e2bcd8739ae039(node) {\n    var win = (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(node);\n    var scrollLeft = win.pageXOffset;\n    var scrollTop = win.pageYOffset;\n    return {\n        scrollLeft: scrollLeft,\n        scrollTop: scrollTop\n    };\n}\n\n\n\n\nfunction $9102221f9e13ae54$export$2e2bcd8739ae039(element) {\n    return {\n        scrollLeft: element.scrollLeft,\n        scrollTop: element.scrollTop\n    };\n}\n\n\nfunction $ca14c6927ef497ac$export$2e2bcd8739ae039(node) {\n    if (node === (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(node) || !(0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(node)) return (0, $68a584be1dc90596$export$2e2bcd8739ae039)(node);\n    else return (0, $9102221f9e13ae54$export$2e2bcd8739ae039)(node);\n}\n\n\nfunction $4f30cf0ce50e075e$export$2e2bcd8739ae039(element) {\n    return element ? (element.nodeName || '').toLowerCase() : null;\n}\n\n\n\n\n\nfunction $433af39bc2fae35d$export$2e2bcd8739ae039(element) {\n    // $FlowFixMe[incompatible-return]: assume body is always available\n    return (((0, $d98cb23738a6d9d0$export$45a5e7f76e0caa8d)(element) ? element.ownerDocument : element.document) || window.document).documentElement;\n}\n\n\n\nfunction $943aee5c7065ad53$export$2e2bcd8739ae039(element) {\n    // If <html> has a CSS width greater than the viewport, then this will be\n    // incorrect for RTL.\n    // Popper 1 is broken in this case and never had a bug report so let's assume\n    // it's not an issue. I don't think anyone ever specifies width on <html>\n    // anyway.\n    // Browsers where the left scrollbar doesn't cause an issue report `0` for\n    // this (e.g. Edge 2019, IE11, Safari)\n    return (0, $84019ab652aa921b$export$2e2bcd8739ae039)((0, $433af39bc2fae35d$export$2e2bcd8739ae039)(element)).left + (0, $68a584be1dc90596$export$2e2bcd8739ae039)(element).scrollLeft;\n}\n\n\n\n\nfunction $41cae7042543c5d5$export$2e2bcd8739ae039(element) {\n    return (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(element).getComputedStyle(element);\n}\n\n\nfunction $18583dfdff147fd4$export$2e2bcd8739ae039(element) {\n    // Firefox wants us to check `-x` and `-y` variations as well\n    var _getComputedStyle = (0, $41cae7042543c5d5$export$2e2bcd8739ae039)(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;\n    return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}\n\n\n\nfunction $34abf65a06d63352$var$isElementScaled(element) {\n    var rect = element.getBoundingClientRect();\n    var scaleX = (0, $7e23bad950468b82$export$2077e0241d6afd3c)(rect.width) / element.offsetWidth || 1;\n    var scaleY = (0, $7e23bad950468b82$export$2077e0241d6afd3c)(rect.height) / element.offsetHeight || 1;\n    return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\nfunction $34abf65a06d63352$export$2e2bcd8739ae039(elementOrVirtualElement, offsetParent, isFixed) {\n    if (isFixed === void 0) isFixed = false;\n    var isOffsetParentAnElement = (0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(offsetParent);\n    var offsetParentIsScaled = (0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(offsetParent) && $34abf65a06d63352$var$isElementScaled(offsetParent);\n    var documentElement = (0, $433af39bc2fae35d$export$2e2bcd8739ae039)(offsetParent);\n    var rect = (0, $84019ab652aa921b$export$2e2bcd8739ae039)(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n    var scroll = {\n        scrollLeft: 0,\n        scrollTop: 0\n    };\n    var offsets = {\n        x: 0,\n        y: 0\n    };\n    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n        if ((0, $4f30cf0ce50e075e$export$2e2bcd8739ae039)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n        (0, $18583dfdff147fd4$export$2e2bcd8739ae039)(documentElement)) scroll = (0, $ca14c6927ef497ac$export$2e2bcd8739ae039)(offsetParent);\n        if ((0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(offsetParent)) {\n            offsets = (0, $84019ab652aa921b$export$2e2bcd8739ae039)(offsetParent, true);\n            offsets.x += offsetParent.clientLeft;\n            offsets.y += offsetParent.clientTop;\n        } else if (documentElement) offsets.x = (0, $943aee5c7065ad53$export$2e2bcd8739ae039)(documentElement);\n    }\n    return {\n        x: rect.left + scroll.scrollLeft - offsets.x,\n        y: rect.top + scroll.scrollTop - offsets.y,\n        width: rect.width,\n        height: rect.height\n    };\n}\n\n\n\nfunction $30ced62b744c6cfe$export$2e2bcd8739ae039(element) {\n    var clientRect = (0, $84019ab652aa921b$export$2e2bcd8739ae039)(element); // Use the clientRect sizes if it's not been transformed.\n    // Fixes https://github.com/popperjs/popper-core/issues/1223\n    var width = element.offsetWidth;\n    var height = element.offsetHeight;\n    if (Math.abs(clientRect.width - width) <= 1) width = clientRect.width;\n    if (Math.abs(clientRect.height - height) <= 1) height = clientRect.height;\n    return {\n        x: element.offsetLeft,\n        y: element.offsetTop,\n        width: width,\n        height: height\n    };\n}\n\n\n\n\n\nfunction $17f6a21d28fc02f5$export$2e2bcd8739ae039(element) {\n    if ((0, $4f30cf0ce50e075e$export$2e2bcd8739ae039)(element) === 'html') return element;\n    return(// $FlowFixMe[incompatible-return]\n    // $FlowFixMe[prop-missing]\n    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n    element.parentNode || ((0, $d98cb23738a6d9d0$export$af51f0f06c0f328a)(element) ? element.host : null) || // ShadowRoot detected\n    // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n    (0, $433af39bc2fae35d$export$2e2bcd8739ae039)(element) // fallback\n    );\n}\n\n\n\n\n\nfunction $3eb5703c925e0e5d$export$2e2bcd8739ae039(node) {\n    if ([\n        'html',\n        'body',\n        '#document'\n    ].indexOf((0, $4f30cf0ce50e075e$export$2e2bcd8739ae039)(node)) >= 0) // $FlowFixMe[incompatible-return]: assume body is always available\n    return node.ownerDocument.body;\n    if ((0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(node) && (0, $18583dfdff147fd4$export$2e2bcd8739ae039)(node)) return node;\n    return $3eb5703c925e0e5d$export$2e2bcd8739ae039((0, $17f6a21d28fc02f5$export$2e2bcd8739ae039)(node));\n}\n\n\n\n\n\nfunction $a621d360f1a81b88$export$2e2bcd8739ae039(element, list) {\n    var _element$ownerDocumen;\n    if (list === void 0) list = [];\n    var scrollParent = (0, $3eb5703c925e0e5d$export$2e2bcd8739ae039)(element);\n    var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n    var win = (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(scrollParent);\n    var target = isBody ? [\n        win\n    ].concat(win.visualViewport || [], (0, $18583dfdff147fd4$export$2e2bcd8739ae039)(scrollParent) ? scrollParent : []) : scrollParent;\n    var updatedList = list.concat(target);\n    return isBody ? updatedList : updatedList.concat($a621d360f1a81b88$export$2e2bcd8739ae039((0, $17f6a21d28fc02f5$export$2e2bcd8739ae039)(target)));\n}\n\n\n\n\n\n\n\nfunction $6829c22fb01dde5a$export$2e2bcd8739ae039(element) {\n    return [\n        'table',\n        'td',\n        'th'\n    ].indexOf((0, $4f30cf0ce50e075e$export$2e2bcd8739ae039)(element)) >= 0;\n}\n\n\n\n\nfunction $a56b734280245ffb$var$getTrueOffsetParent(element) {\n    if (!(0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(element) || // https://github.com/popperjs/popper-core/issues/837\n    (0, $41cae7042543c5d5$export$2e2bcd8739ae039)(element).position === 'fixed') return null;\n    return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\nfunction $a56b734280245ffb$var$getContainingBlock(element) {\n    var isFirefox = /firefox/i.test((0, $90ccbd5892233dd2$export$2e2bcd8739ae039)());\n    var isIE = /Trident/i.test((0, $90ccbd5892233dd2$export$2e2bcd8739ae039)());\n    if (isIE && (0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(element)) {\n        // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n        var elementCss = (0, $41cae7042543c5d5$export$2e2bcd8739ae039)(element);\n        if (elementCss.position === 'fixed') return null;\n    }\n    var currentNode = (0, $17f6a21d28fc02f5$export$2e2bcd8739ae039)(element);\n    if ((0, $d98cb23738a6d9d0$export$af51f0f06c0f328a)(currentNode)) currentNode = currentNode.host;\n    while((0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(currentNode) && [\n        'html',\n        'body'\n    ].indexOf((0, $4f30cf0ce50e075e$export$2e2bcd8739ae039)(currentNode)) < 0){\n        var css = (0, $41cae7042543c5d5$export$2e2bcd8739ae039)(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n        // create a containing block.\n        // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n        if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || [\n            'transform',\n            'perspective'\n        ].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') return currentNode;\n        else currentNode = currentNode.parentNode;\n    }\n    return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\nfunction $a56b734280245ffb$export$2e2bcd8739ae039(element) {\n    var window = (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(element);\n    var offsetParent = $a56b734280245ffb$var$getTrueOffsetParent(element);\n    while(offsetParent && (0, $6829c22fb01dde5a$export$2e2bcd8739ae039)(offsetParent) && (0, $41cae7042543c5d5$export$2e2bcd8739ae039)(offsetParent).position === 'static')offsetParent = $a56b734280245ffb$var$getTrueOffsetParent(offsetParent);\n    if (offsetParent && ((0, $4f30cf0ce50e075e$export$2e2bcd8739ae039)(offsetParent) === 'html' || (0, $4f30cf0ce50e075e$export$2e2bcd8739ae039)(offsetParent) === 'body' && (0, $41cae7042543c5d5$export$2e2bcd8739ae039)(offsetParent).position === 'static')) return window;\n    return offsetParent || $a56b734280245ffb$var$getContainingBlock(element) || window;\n}\n\n\nvar $f5c54167a3c62105$export$1e95b668f3b82d = 'top';\nvar $f5c54167a3c62105$export$40e543e69a8b3fbb = 'bottom';\nvar $f5c54167a3c62105$export$79ffe56a765070d2 = 'right';\nvar $f5c54167a3c62105$export$eabcd2c8791e7bf4 = 'left';\nvar $f5c54167a3c62105$export$dfb5619354ba860 = 'auto';\nvar $f5c54167a3c62105$export$aec2ce47c367b8c3 = [\n    $f5c54167a3c62105$export$1e95b668f3b82d,\n    $f5c54167a3c62105$export$40e543e69a8b3fbb,\n    $f5c54167a3c62105$export$79ffe56a765070d2,\n    $f5c54167a3c62105$export$eabcd2c8791e7bf4\n];\nvar $f5c54167a3c62105$export$b3571188c770cc5a = 'start';\nvar $f5c54167a3c62105$export$bd5df0f255a350f8 = 'end';\nvar $f5c54167a3c62105$export$390fd549c5303b4d = 'clippingParents';\nvar $f5c54167a3c62105$export$d7b7311ec04a3e8f = 'viewport';\nvar $f5c54167a3c62105$export$ae5ab1c730825774 = 'popper';\nvar $f5c54167a3c62105$export$ca50aac9f3ba507f = 'reference';\nvar $f5c54167a3c62105$export$368f9a87e87fa4e1 = /*#__PURE__*/ $f5c54167a3c62105$export$aec2ce47c367b8c3.reduce(function(acc, placement) {\n    return acc.concat([\n        placement + \"-\" + $f5c54167a3c62105$export$b3571188c770cc5a,\n        placement + \"-\" + $f5c54167a3c62105$export$bd5df0f255a350f8\n    ]);\n}, []);\nvar $f5c54167a3c62105$export$803cd8101b6c182b = /*#__PURE__*/ [].concat($f5c54167a3c62105$export$aec2ce47c367b8c3, [\n    $f5c54167a3c62105$export$dfb5619354ba860\n]).reduce(function(acc, placement) {\n    return acc.concat([\n        placement,\n        placement + \"-\" + $f5c54167a3c62105$export$b3571188c770cc5a,\n        placement + \"-\" + $f5c54167a3c62105$export$bd5df0f255a350f8\n    ]);\n}, []); // modifiers that need to read the DOM\nvar $f5c54167a3c62105$export$421679a7c3d56e = 'beforeRead';\nvar $f5c54167a3c62105$export$aafa59e2e03f2942 = 'read';\nvar $f5c54167a3c62105$export$6964f6c886723980 = 'afterRead'; // pure-logic modifiers\nvar $f5c54167a3c62105$export$c65e99957a05207c = 'beforeMain';\nvar $f5c54167a3c62105$export$f22da7240b7add18 = 'main';\nvar $f5c54167a3c62105$export$bab79516f2d662fe = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\nvar $f5c54167a3c62105$export$8d4d2d70e7d46032 = 'beforeWrite';\nvar $f5c54167a3c62105$export$68d8715fc104d294 = 'write';\nvar $f5c54167a3c62105$export$70a6e5159acce2e6 = 'afterWrite';\nvar $f5c54167a3c62105$export$d087d3878fdf71d5 = [\n    $f5c54167a3c62105$export$421679a7c3d56e,\n    $f5c54167a3c62105$export$aafa59e2e03f2942,\n    $f5c54167a3c62105$export$6964f6c886723980,\n    $f5c54167a3c62105$export$c65e99957a05207c,\n    $f5c54167a3c62105$export$f22da7240b7add18,\n    $f5c54167a3c62105$export$bab79516f2d662fe,\n    $f5c54167a3c62105$export$8d4d2d70e7d46032,\n    $f5c54167a3c62105$export$68d8715fc104d294,\n    $f5c54167a3c62105$export$70a6e5159acce2e6\n];\n\n\nfunction $0baf5472b5ad4a5a$var$order(modifiers) {\n    var map = new Map();\n    var visited = new Set();\n    var result = [];\n    modifiers.forEach(function(modifier) {\n        map.set(modifier.name, modifier);\n    }); // On visiting object, check for its dependencies and visit them recursively\n    function sort(modifier) {\n        visited.add(modifier.name);\n        var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n        requires.forEach(function(dep) {\n            if (!visited.has(dep)) {\n                var depModifier = map.get(dep);\n                if (depModifier) sort(depModifier);\n            }\n        });\n        result.push(modifier);\n    }\n    modifiers.forEach(function(modifier) {\n        if (!visited.has(modifier.name)) // check for visited object\n        sort(modifier);\n    });\n    return result;\n}\nfunction $0baf5472b5ad4a5a$export$2e2bcd8739ae039(modifiers) {\n    // order based on dependencies\n    var orderedModifiers = $0baf5472b5ad4a5a$var$order(modifiers); // order based on phase\n    return (0, $f5c54167a3c62105$export$d087d3878fdf71d5).reduce(function(acc, phase) {\n        return acc.concat(orderedModifiers.filter(function(modifier) {\n            return modifier.phase === phase;\n        }));\n    }, []);\n}\n\n\nfunction $9b65b878009bf47f$export$2e2bcd8739ae039(fn) {\n    var pending;\n    return function() {\n        if (!pending) pending = new Promise(function(resolve) {\n            Promise.resolve().then(function() {\n                pending = undefined;\n                resolve(fn());\n            });\n        });\n        return pending;\n    };\n}\n\n\nfunction $46d929ffbbd3136a$export$2e2bcd8739ae039(modifiers) {\n    var merged = modifiers.reduce(function(merged, current) {\n        var existing = merged[current.name];\n        merged[current.name] = existing ? Object.assign({}, existing, current, {\n            options: Object.assign({}, existing.options, current.options),\n            data: Object.assign({}, existing.data, current.data)\n        }) : current;\n        return merged;\n    }, {}); // IE11 does not support Object.values\n    return Object.keys(merged).map(function(key) {\n        return merged[key];\n    });\n}\n\n\n\n\nvar $b3c2fd6800546b4b$var$DEFAULT_OPTIONS = {\n    placement: 'bottom',\n    modifiers: [],\n    strategy: 'absolute'\n};\nfunction $b3c2fd6800546b4b$var$areValidElements() {\n    for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key];\n    return !args.some(function(element) {\n        return !(element && typeof element.getBoundingClientRect === 'function');\n    });\n}\nfunction $b3c2fd6800546b4b$export$ed5e13716264f202(generatorOptions) {\n    if (generatorOptions === void 0) generatorOptions = {};\n    var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? $b3c2fd6800546b4b$var$DEFAULT_OPTIONS : _generatorOptions$def2;\n    return function createPopper(reference, popper, options) {\n        if (options === void 0) options = defaultOptions;\n        var state = {\n            placement: 'bottom',\n            orderedModifiers: [],\n            options: Object.assign({}, $b3c2fd6800546b4b$var$DEFAULT_OPTIONS, defaultOptions),\n            modifiersData: {},\n            elements: {\n                reference: reference,\n                popper: popper\n            },\n            attributes: {},\n            styles: {}\n        };\n        var effectCleanupFns = [];\n        var isDestroyed = false;\n        var instance = {\n            state: state,\n            setOptions: function setOptions(setOptionsAction) {\n                var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n                cleanupModifierEffects();\n                state.options = Object.assign({}, defaultOptions, state.options, options);\n                state.scrollParents = {\n                    reference: (0, $d98cb23738a6d9d0$export$45a5e7f76e0caa8d)(reference) ? (0, $a621d360f1a81b88$export$2e2bcd8739ae039)(reference) : reference.contextElement ? (0, $a621d360f1a81b88$export$2e2bcd8739ae039)(reference.contextElement) : [],\n                    popper: (0, $a621d360f1a81b88$export$2e2bcd8739ae039)(popper)\n                }; // Orders the modifiers based on their dependencies and `phase`\n                // properties\n                var orderedModifiers = (0, $0baf5472b5ad4a5a$export$2e2bcd8739ae039)((0, $46d929ffbbd3136a$export$2e2bcd8739ae039)([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n                state.orderedModifiers = orderedModifiers.filter(function(m) {\n                    return m.enabled;\n                });\n                runModifierEffects();\n                return instance.update();\n            },\n            // Sync update – it will always be executed, even if not necessary. This\n            // is useful for low frequency updates where sync behavior simplifies the\n            // logic.\n            // For high frequency updates (e.g. `resize` and `scroll` events), always\n            // prefer the async Popper#update method\n            forceUpdate: function forceUpdate() {\n                if (isDestroyed) return;\n                var _state$elements = state.elements, reference = _state$elements.reference, popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n                // anymore\n                if (!$b3c2fd6800546b4b$var$areValidElements(reference, popper)) return;\n                 // Store the reference and popper rects to be read by modifiers\n                state.rects = {\n                    reference: (0, $34abf65a06d63352$export$2e2bcd8739ae039)(reference, (0, $a56b734280245ffb$export$2e2bcd8739ae039)(popper), state.options.strategy === 'fixed'),\n                    popper: (0, $30ced62b744c6cfe$export$2e2bcd8739ae039)(popper)\n                }; // Modifiers have the ability to reset the current update cycle. The\n                // most common use case for this is the `flip` modifier changing the\n                // placement, which then needs to re-run all the modifiers, because the\n                // logic was previously ran for the previous placement and is therefore\n                // stale/incorrect\n                state.reset = false;\n                state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n                // is filled with the initial data specified by the modifier. This means\n                // it doesn't persist and is fresh on each update.\n                // To ensure persistent data, use `${name}#persistent`\n                state.orderedModifiers.forEach(function(modifier) {\n                    return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n                });\n                for(var index = 0; index < state.orderedModifiers.length; index++){\n                    if (state.reset === true) {\n                        state.reset = false;\n                        index = -1;\n                        continue;\n                    }\n                    var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;\n                    if (typeof fn === 'function') state = fn({\n                        state: state,\n                        options: _options,\n                        name: name,\n                        instance: instance\n                    }) || state;\n                }\n            },\n            // Async and optimistically optimized update – it will not be executed if\n            // not necessary (debounced to run at most once-per-tick)\n            update: (0, $9b65b878009bf47f$export$2e2bcd8739ae039)(function() {\n                return new Promise(function(resolve) {\n                    instance.forceUpdate();\n                    resolve(state);\n                });\n            }),\n            destroy: function destroy() {\n                cleanupModifierEffects();\n                isDestroyed = true;\n            }\n        };\n        if (!$b3c2fd6800546b4b$var$areValidElements(reference, popper)) return instance;\n        instance.setOptions(options).then(function(state) {\n            if (!isDestroyed && options.onFirstUpdate) options.onFirstUpdate(state);\n        }); // Modifiers have the ability to execute arbitrary code before the first\n        // update cycle runs. They will be executed in the same order as the update\n        // cycle. This is useful when a modifier adds some persistent data that\n        // other modifiers need to use, but the modifier is run after the dependent\n        // one.\n        function runModifierEffects() {\n            state.orderedModifiers.forEach(function(_ref) {\n                var name = _ref.name, _ref$options = _ref.options, options = _ref$options === void 0 ? {} : _ref$options, effect = _ref.effect;\n                if (typeof effect === 'function') {\n                    var cleanupFn = effect({\n                        state: state,\n                        name: name,\n                        instance: instance,\n                        options: options\n                    });\n                    var noopFn = function noopFn() {};\n                    effectCleanupFns.push(cleanupFn || noopFn);\n                }\n            });\n        }\n        function cleanupModifierEffects() {\n            effectCleanupFns.forEach(function(fn) {\n                return fn();\n            });\n            effectCleanupFns = [];\n        }\n        return instance;\n    };\n}\nvar $b3c2fd6800546b4b$export$8f7491d57c8f97a9 = /*#__PURE__*/ $b3c2fd6800546b4b$export$ed5e13716264f202(); // eslint-disable-next-line import/no-unused-modules\n\n\n\nvar $ff355aafd082b0cd$var$passive = {\n    passive: true\n};\nfunction $ff355aafd082b0cd$var$effect(_ref) {\n    var state = _ref.state, instance = _ref.instance, options = _ref.options;\n    var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize;\n    var window = (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(state.elements.popper);\n    var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n    if (scroll) scrollParents.forEach(function(scrollParent) {\n        scrollParent.addEventListener('scroll', instance.update, $ff355aafd082b0cd$var$passive);\n    });\n    if (resize) window.addEventListener('resize', instance.update, $ff355aafd082b0cd$var$passive);\n    return function() {\n        if (scroll) scrollParents.forEach(function(scrollParent) {\n            scrollParent.removeEventListener('scroll', instance.update, $ff355aafd082b0cd$var$passive);\n        });\n        if (resize) window.removeEventListener('resize', instance.update, $ff355aafd082b0cd$var$passive);\n    };\n} // eslint-disable-next-line import/no-unused-modules\nvar $ff355aafd082b0cd$export$2e2bcd8739ae039 = {\n    name: 'eventListeners',\n    enabled: true,\n    phase: 'write',\n    fn: function fn() {},\n    effect: $ff355aafd082b0cd$var$effect,\n    data: {}\n};\n\n\n\nfunction $afe288682115fde3$export$2e2bcd8739ae039(placement) {\n    return placement.split('-')[0];\n}\n\n\nfunction $7b08f0526e425773$export$2e2bcd8739ae039(placement) {\n    return placement.split('-')[1];\n}\n\n\nfunction $b518c35b71cf930f$export$2e2bcd8739ae039(placement) {\n    return [\n        'top',\n        'bottom'\n    ].indexOf(placement) >= 0 ? 'x' : 'y';\n}\n\n\n\nfunction $03cba2f7a1498b5f$export$2e2bcd8739ae039(_ref) {\n    var reference = _ref.reference, element = _ref.element, placement = _ref.placement;\n    var basePlacement = placement ? (0, $afe288682115fde3$export$2e2bcd8739ae039)(placement) : null;\n    var variation = placement ? (0, $7b08f0526e425773$export$2e2bcd8739ae039)(placement) : null;\n    var commonX = reference.x + reference.width / 2 - element.width / 2;\n    var commonY = reference.y + reference.height / 2 - element.height / 2;\n    var offsets;\n    switch(basePlacement){\n        case 0, $f5c54167a3c62105$export$1e95b668f3b82d:\n            offsets = {\n                x: commonX,\n                y: reference.y - element.height\n            };\n            break;\n        case 0, $f5c54167a3c62105$export$40e543e69a8b3fbb:\n            offsets = {\n                x: commonX,\n                y: reference.y + reference.height\n            };\n            break;\n        case 0, $f5c54167a3c62105$export$79ffe56a765070d2:\n            offsets = {\n                x: reference.x + reference.width,\n                y: commonY\n            };\n            break;\n        case 0, $f5c54167a3c62105$export$eabcd2c8791e7bf4:\n            offsets = {\n                x: reference.x - element.width,\n                y: commonY\n            };\n            break;\n        default:\n            offsets = {\n                x: reference.x,\n                y: reference.y\n            };\n    }\n    var mainAxis = basePlacement ? (0, $b518c35b71cf930f$export$2e2bcd8739ae039)(basePlacement) : null;\n    if (mainAxis != null) {\n        var len = mainAxis === 'y' ? 'height' : 'width';\n        switch(variation){\n            case 0, $f5c54167a3c62105$export$b3571188c770cc5a:\n                offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n                break;\n            case 0, $f5c54167a3c62105$export$bd5df0f255a350f8:\n                offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n                break;\n            default:\n        }\n    }\n    return offsets;\n}\n\n\nfunction $e92fb10df1450f31$var$popperOffsets(_ref) {\n    var state = _ref.state, name = _ref.name;\n    // Offsets are the actual position the popper needs to have to be\n    // properly positioned near its reference element\n    // This is the most basic placement, and will be adjusted by\n    // the modifiers in the next step\n    state.modifiersData[name] = (0, $03cba2f7a1498b5f$export$2e2bcd8739ae039)({\n        reference: state.rects.reference,\n        element: state.rects.popper,\n        strategy: 'absolute',\n        placement: state.placement\n    });\n} // eslint-disable-next-line import/no-unused-modules\nvar $e92fb10df1450f31$export$2e2bcd8739ae039 = {\n    name: 'popperOffsets',\n    enabled: true,\n    phase: 'read',\n    fn: $e92fb10df1450f31$var$popperOffsets,\n    data: {}\n};\n\n\n\n\n\n\n\n\n\n\nvar $c8f8eadcf7685dc5$var$unsetSides = {\n    top: 'auto',\n    right: 'auto',\n    bottom: 'auto',\n    left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\nfunction $c8f8eadcf7685dc5$var$roundOffsetsByDPR(_ref, win) {\n    var x = _ref.x, y = _ref.y;\n    var dpr = win.devicePixelRatio || 1;\n    return {\n        x: (0, $7e23bad950468b82$export$2077e0241d6afd3c)(x * dpr) / dpr || 0,\n        y: (0, $7e23bad950468b82$export$2077e0241d6afd3c)(y * dpr) / dpr || 0\n    };\n}\nfunction $c8f8eadcf7685dc5$export$378fa78a8fea596f(_ref2) {\n    var _Object$assign2;\n    var popper = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed;\n    var _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y = _offsets$y === void 0 ? 0 : _offsets$y;\n    var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n        x: x,\n        y: y\n    }) : {\n        x: x,\n        y: y\n    };\n    x = _ref3.x;\n    y = _ref3.y;\n    var hasX = offsets.hasOwnProperty('x');\n    var hasY = offsets.hasOwnProperty('y');\n    var sideX = (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4);\n    var sideY = (0, $f5c54167a3c62105$export$1e95b668f3b82d);\n    var win = window;\n    if (adaptive) {\n        var offsetParent = (0, $a56b734280245ffb$export$2e2bcd8739ae039)(popper);\n        var heightProp = 'clientHeight';\n        var widthProp = 'clientWidth';\n        if (offsetParent === (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(popper)) {\n            offsetParent = (0, $433af39bc2fae35d$export$2e2bcd8739ae039)(popper);\n            if ((0, $41cae7042543c5d5$export$2e2bcd8739ae039)(offsetParent).position !== 'static' && position === 'absolute') {\n                heightProp = 'scrollHeight';\n                widthProp = 'scrollWidth';\n            }\n        } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n        offsetParent;\n        if (placement === (0, $f5c54167a3c62105$export$1e95b668f3b82d) || (placement === (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4) || placement === (0, $f5c54167a3c62105$export$79ffe56a765070d2)) && variation === (0, $f5c54167a3c62105$export$bd5df0f255a350f8)) {\n            sideY = (0, $f5c54167a3c62105$export$40e543e69a8b3fbb);\n            var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp];\n            y -= offsetY - popperRect.height;\n            y *= gpuAcceleration ? 1 : -1;\n        }\n        if (placement === (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4) || (placement === (0, $f5c54167a3c62105$export$1e95b668f3b82d) || placement === (0, $f5c54167a3c62105$export$40e543e69a8b3fbb)) && variation === (0, $f5c54167a3c62105$export$bd5df0f255a350f8)) {\n            sideX = (0, $f5c54167a3c62105$export$79ffe56a765070d2);\n            var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : offsetParent[widthProp];\n            x -= offsetX - popperRect.width;\n            x *= gpuAcceleration ? 1 : -1;\n        }\n    }\n    var commonStyles = Object.assign({\n        position: position\n    }, adaptive && $c8f8eadcf7685dc5$var$unsetSides);\n    var _ref4 = roundOffsets === true ? $c8f8eadcf7685dc5$var$roundOffsetsByDPR({\n        x: x,\n        y: y\n    }, (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(popper)) : {\n        x: x,\n        y: y\n    };\n    x = _ref4.x;\n    y = _ref4.y;\n    if (gpuAcceleration) {\n        var _Object$assign;\n        return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n    }\n    return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\nfunction $c8f8eadcf7685dc5$var$computeStyles(_ref5) {\n    var state = _ref5.state, options = _ref5.options;\n    var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n    var commonStyles = {\n        placement: (0, $afe288682115fde3$export$2e2bcd8739ae039)(state.placement),\n        variation: (0, $7b08f0526e425773$export$2e2bcd8739ae039)(state.placement),\n        popper: state.elements.popper,\n        popperRect: state.rects.popper,\n        gpuAcceleration: gpuAcceleration,\n        isFixed: state.options.strategy === 'fixed'\n    };\n    if (state.modifiersData.popperOffsets != null) state.styles.popper = Object.assign({}, state.styles.popper, $c8f8eadcf7685dc5$export$378fa78a8fea596f(Object.assign({}, commonStyles, {\n        offsets: state.modifiersData.popperOffsets,\n        position: state.options.strategy,\n        adaptive: adaptive,\n        roundOffsets: roundOffsets\n    })));\n    if (state.modifiersData.arrow != null) state.styles.arrow = Object.assign({}, state.styles.arrow, $c8f8eadcf7685dc5$export$378fa78a8fea596f(Object.assign({}, commonStyles, {\n        offsets: state.modifiersData.arrow,\n        position: 'absolute',\n        adaptive: false,\n        roundOffsets: roundOffsets\n    })));\n    state.attributes.popper = Object.assign({}, state.attributes.popper, {\n        'data-popper-placement': state.placement\n    });\n} // eslint-disable-next-line import/no-unused-modules\nvar $c8f8eadcf7685dc5$export$2e2bcd8739ae039 = {\n    name: 'computeStyles',\n    enabled: true,\n    phase: 'beforeWrite',\n    fn: $c8f8eadcf7685dc5$var$computeStyles,\n    data: {}\n};\n\n\n\n\n// and applies them to the HTMLElements such as popper and arrow\nfunction $83c1fc4c4e58d7dd$var$applyStyles(_ref) {\n    var state = _ref.state;\n    Object.keys(state.elements).forEach(function(name) {\n        var style = state.styles[name] || {};\n        var attributes = state.attributes[name] || {};\n        var element = state.elements[name]; // arrow is optional + virtual elements\n        if (!(0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(element) || !(0, $4f30cf0ce50e075e$export$2e2bcd8739ae039)(element)) return;\n         // Flow doesn't support to extend this property, but it's the most\n        // effective way to apply styles to an HTMLElement\n        // $FlowFixMe[cannot-write]\n        Object.assign(element.style, style);\n        Object.keys(attributes).forEach(function(name) {\n            var value = attributes[name];\n            if (value === false) element.removeAttribute(name);\n            else element.setAttribute(name, value === true ? '' : value);\n        });\n    });\n}\nfunction $83c1fc4c4e58d7dd$var$effect(_ref2) {\n    var state = _ref2.state;\n    var initialStyles = {\n        popper: {\n            position: state.options.strategy,\n            left: '0',\n            top: '0',\n            margin: '0'\n        },\n        arrow: {\n            position: 'absolute'\n        },\n        reference: {}\n    };\n    Object.assign(state.elements.popper.style, initialStyles.popper);\n    state.styles = initialStyles;\n    if (state.elements.arrow) Object.assign(state.elements.arrow.style, initialStyles.arrow);\n    return function() {\n        Object.keys(state.elements).forEach(function(name) {\n            var element = state.elements[name];\n            var attributes = state.attributes[name] || {};\n            var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n            var style = styleProperties.reduce(function(style, property) {\n                style[property] = '';\n                return style;\n            }, {}); // arrow is optional + virtual elements\n            if (!(0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(element) || !(0, $4f30cf0ce50e075e$export$2e2bcd8739ae039)(element)) return;\n            Object.assign(element.style, style);\n            Object.keys(attributes).forEach(function(attribute) {\n                element.removeAttribute(attribute);\n            });\n        });\n    };\n} // eslint-disable-next-line import/no-unused-modules\nvar $83c1fc4c4e58d7dd$export$2e2bcd8739ae039 = {\n    name: 'applyStyles',\n    enabled: true,\n    phase: 'write',\n    fn: $83c1fc4c4e58d7dd$var$applyStyles,\n    effect: $83c1fc4c4e58d7dd$var$effect,\n    requires: [\n        'computeStyles'\n    ]\n};\n\n\n\n\nfunction $7c04da2e958a3fe8$export$7fa02d8595b015ed(placement, rects, offset) {\n    var basePlacement = (0, $afe288682115fde3$export$2e2bcd8739ae039)(placement);\n    var invertDistance = [\n        (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4),\n        (0, $f5c54167a3c62105$export$1e95b668f3b82d)\n    ].indexOf(basePlacement) >= 0 ? -1 : 1;\n    var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n        placement: placement\n    })) : offset, skidding = _ref[0], distance = _ref[1];\n    skidding = skidding || 0;\n    distance = (distance || 0) * invertDistance;\n    return [\n        (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4),\n        (0, $f5c54167a3c62105$export$79ffe56a765070d2)\n    ].indexOf(basePlacement) >= 0 ? {\n        x: distance,\n        y: skidding\n    } : {\n        x: skidding,\n        y: distance\n    };\n}\nfunction $7c04da2e958a3fe8$var$offset(_ref2) {\n    var state = _ref2.state, options = _ref2.options, name = _ref2.name;\n    var _options$offset = options.offset, offset = _options$offset === void 0 ? [\n        0,\n        0\n    ] : _options$offset;\n    var data = (0, $f5c54167a3c62105$export$803cd8101b6c182b).reduce(function(acc, placement) {\n        acc[placement] = $7c04da2e958a3fe8$export$7fa02d8595b015ed(placement, state.rects, offset);\n        return acc;\n    }, {});\n    var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;\n    if (state.modifiersData.popperOffsets != null) {\n        state.modifiersData.popperOffsets.x += x;\n        state.modifiersData.popperOffsets.y += y;\n    }\n    state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\nvar $7c04da2e958a3fe8$export$2e2bcd8739ae039 = {\n    name: 'offset',\n    enabled: true,\n    phase: 'main',\n    requires: [\n        'popperOffsets'\n    ],\n    fn: $7c04da2e958a3fe8$var$offset\n};\n\n\nvar $825ae98fe4f5d029$var$hash = {\n    left: 'right',\n    right: 'left',\n    bottom: 'top',\n    top: 'bottom'\n};\nfunction $825ae98fe4f5d029$export$2e2bcd8739ae039(placement) {\n    return placement.replace(/left|right|bottom|top/g, function(matched) {\n        return $825ae98fe4f5d029$var$hash[matched];\n    });\n}\n\n\n\nvar $76c023b5f4bd6339$var$hash = {\n    start: 'end',\n    end: 'start'\n};\nfunction $76c023b5f4bd6339$export$2e2bcd8739ae039(placement) {\n    return placement.replace(/start|end/g, function(matched) {\n        return $76c023b5f4bd6339$var$hash[matched];\n    });\n}\n\n\n\n\n\n\n\nfunction $7b0a0ce1fa68929f$export$2e2bcd8739ae039(element, strategy) {\n    var win = (0, $df9341392e6ed7b1$export$2e2bcd8739ae039)(element);\n    var html = (0, $433af39bc2fae35d$export$2e2bcd8739ae039)(element);\n    var visualViewport = win.visualViewport;\n    var width = html.clientWidth;\n    var height = html.clientHeight;\n    var x = 0;\n    var y = 0;\n    if (visualViewport) {\n        width = visualViewport.width;\n        height = visualViewport.height;\n        var layoutViewport = (0, $993d40d65cc118cd$export$2e2bcd8739ae039)();\n        if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n            x = visualViewport.offsetLeft;\n            y = visualViewport.offsetTop;\n        }\n    }\n    return {\n        width: width,\n        height: height,\n        x: x + (0, $943aee5c7065ad53$export$2e2bcd8739ae039)(element),\n        y: y\n    };\n}\n\n\n\n\n\n\n\nfunction $3e70615fb3e74824$export$2e2bcd8739ae039(element) {\n    var _element$ownerDocumen;\n    var html = (0, $433af39bc2fae35d$export$2e2bcd8739ae039)(element);\n    var winScroll = (0, $68a584be1dc90596$export$2e2bcd8739ae039)(element);\n    var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n    var width = (0, $7e23bad950468b82$export$8960430cfd85939f)(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n    var height = (0, $7e23bad950468b82$export$8960430cfd85939f)(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n    var x = -winScroll.scrollLeft + (0, $943aee5c7065ad53$export$2e2bcd8739ae039)(element);\n    var y = -winScroll.scrollTop;\n    if ((0, $41cae7042543c5d5$export$2e2bcd8739ae039)(body || html).direction === 'rtl') x += (0, $7e23bad950468b82$export$8960430cfd85939f)(html.clientWidth, body ? body.clientWidth : 0) - width;\n    return {\n        width: width,\n        height: height,\n        x: x,\n        y: y\n    };\n}\n\n\n\n\n\n\n\n\n\n\nfunction $d63950b756706495$export$2e2bcd8739ae039(parent, child) {\n    var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n    if (parent.contains(child)) return true;\n    else if (rootNode && (0, $d98cb23738a6d9d0$export$af51f0f06c0f328a)(rootNode)) {\n        var next = child;\n        do {\n            if (next && parent.isSameNode(next)) return true;\n             // $FlowFixMe[prop-missing]: need a better way to handle this...\n            next = next.parentNode || next.host;\n        }while (next);\n    } // Give up, the result is false\n    return false;\n}\n\n\n\nfunction $b0d5f0927fb8bf5c$export$2e2bcd8739ae039(rect) {\n    return Object.assign({}, rect, {\n        left: rect.x,\n        top: rect.y,\n        right: rect.x + rect.width,\n        bottom: rect.y + rect.height\n    });\n}\n\n\n\nfunction $631049efb60e96c6$var$getInnerBoundingClientRect(element, strategy) {\n    var rect = (0, $84019ab652aa921b$export$2e2bcd8739ae039)(element, false, strategy === 'fixed');\n    rect.top = rect.top + element.clientTop;\n    rect.left = rect.left + element.clientLeft;\n    rect.bottom = rect.top + element.clientHeight;\n    rect.right = rect.left + element.clientWidth;\n    rect.width = element.clientWidth;\n    rect.height = element.clientHeight;\n    rect.x = rect.left;\n    rect.y = rect.top;\n    return rect;\n}\nfunction $631049efb60e96c6$var$getClientRectFromMixedType(element, clippingParent, strategy) {\n    return clippingParent === (0, $f5c54167a3c62105$export$d7b7311ec04a3e8f) ? (0, $b0d5f0927fb8bf5c$export$2e2bcd8739ae039)((0, $7b0a0ce1fa68929f$export$2e2bcd8739ae039)(element, strategy)) : (0, $d98cb23738a6d9d0$export$45a5e7f76e0caa8d)(clippingParent) ? $631049efb60e96c6$var$getInnerBoundingClientRect(clippingParent, strategy) : (0, $b0d5f0927fb8bf5c$export$2e2bcd8739ae039)((0, $3e70615fb3e74824$export$2e2bcd8739ae039)((0, $433af39bc2fae35d$export$2e2bcd8739ae039)(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\nfunction $631049efb60e96c6$var$getClippingParents(element) {\n    var clippingParents = (0, $a621d360f1a81b88$export$2e2bcd8739ae039)((0, $17f6a21d28fc02f5$export$2e2bcd8739ae039)(element));\n    var canEscapeClipping = [\n        'absolute',\n        'fixed'\n    ].indexOf((0, $41cae7042543c5d5$export$2e2bcd8739ae039)(element).position) >= 0;\n    var clipperElement = canEscapeClipping && (0, $d98cb23738a6d9d0$export$1b3bfaa9684536aa)(element) ? (0, $a56b734280245ffb$export$2e2bcd8739ae039)(element) : element;\n    if (!(0, $d98cb23738a6d9d0$export$45a5e7f76e0caa8d)(clipperElement)) return [];\n     // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n    return clippingParents.filter(function(clippingParent) {\n        return (0, $d98cb23738a6d9d0$export$45a5e7f76e0caa8d)(clippingParent) && (0, $d63950b756706495$export$2e2bcd8739ae039)(clippingParent, clipperElement) && (0, $4f30cf0ce50e075e$export$2e2bcd8739ae039)(clippingParent) !== 'body';\n    });\n} // Gets the maximum area that the element is visible in due to any number of\nfunction $631049efb60e96c6$export$2e2bcd8739ae039(element, boundary, rootBoundary, strategy) {\n    var mainClippingParents = boundary === 'clippingParents' ? $631049efb60e96c6$var$getClippingParents(element) : [].concat(boundary);\n    var clippingParents = [].concat(mainClippingParents, [\n        rootBoundary\n    ]);\n    var firstClippingParent = clippingParents[0];\n    var clippingRect = clippingParents.reduce(function(accRect, clippingParent) {\n        var rect = $631049efb60e96c6$var$getClientRectFromMixedType(element, clippingParent, strategy);\n        accRect.top = (0, $7e23bad950468b82$export$8960430cfd85939f)(rect.top, accRect.top);\n        accRect.right = (0, $7e23bad950468b82$export$96ec731ed4dcb222)(rect.right, accRect.right);\n        accRect.bottom = (0, $7e23bad950468b82$export$96ec731ed4dcb222)(rect.bottom, accRect.bottom);\n        accRect.left = (0, $7e23bad950468b82$export$8960430cfd85939f)(rect.left, accRect.left);\n        return accRect;\n    }, $631049efb60e96c6$var$getClientRectFromMixedType(element, firstClippingParent, strategy));\n    clippingRect.width = clippingRect.right - clippingRect.left;\n    clippingRect.height = clippingRect.bottom - clippingRect.top;\n    clippingRect.x = clippingRect.left;\n    clippingRect.y = clippingRect.top;\n    return clippingRect;\n}\n\n\n\n\n\n\n\n\nfunction $683c5e26d5f8bfe5$export$2e2bcd8739ae039() {\n    return {\n        top: 0,\n        right: 0,\n        bottom: 0,\n        left: 0\n    };\n}\n\n\nfunction $387b887da02b7e69$export$2e2bcd8739ae039(paddingObject) {\n    return Object.assign({}, (0, $683c5e26d5f8bfe5$export$2e2bcd8739ae039)(), paddingObject);\n}\n\n\nfunction $4d11a6decde23bf9$export$2e2bcd8739ae039(value, keys) {\n    return keys.reduce(function(hashMap, key) {\n        hashMap[key] = value;\n        return hashMap;\n    }, {});\n}\n\n\nfunction $f765731200b57f98$export$2e2bcd8739ae039(state, options) {\n    if (options === void 0) options = {};\n    var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? (0, $f5c54167a3c62105$export$390fd549c5303b4d) : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? (0, $f5c54167a3c62105$export$d7b7311ec04a3e8f) : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? (0, $f5c54167a3c62105$export$ae5ab1c730825774) : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding;\n    var paddingObject = (0, $387b887da02b7e69$export$2e2bcd8739ae039)(typeof padding !== 'number' ? padding : (0, $4d11a6decde23bf9$export$2e2bcd8739ae039)(padding, (0, $f5c54167a3c62105$export$aec2ce47c367b8c3)));\n    var altContext = elementContext === (0, $f5c54167a3c62105$export$ae5ab1c730825774) ? (0, $f5c54167a3c62105$export$ca50aac9f3ba507f) : (0, $f5c54167a3c62105$export$ae5ab1c730825774);\n    var popperRect = state.rects.popper;\n    var element = state.elements[altBoundary ? altContext : elementContext];\n    var clippingClientRect = (0, $631049efb60e96c6$export$2e2bcd8739ae039)((0, $d98cb23738a6d9d0$export$45a5e7f76e0caa8d)(element) ? element : element.contextElement || (0, $433af39bc2fae35d$export$2e2bcd8739ae039)(state.elements.popper), boundary, rootBoundary, strategy);\n    var referenceClientRect = (0, $84019ab652aa921b$export$2e2bcd8739ae039)(state.elements.reference);\n    var popperOffsets = (0, $03cba2f7a1498b5f$export$2e2bcd8739ae039)({\n        reference: referenceClientRect,\n        element: popperRect,\n        strategy: 'absolute',\n        placement: placement\n    });\n    var popperClientRect = (0, $b0d5f0927fb8bf5c$export$2e2bcd8739ae039)(Object.assign({}, popperRect, popperOffsets));\n    var elementClientRect = elementContext === (0, $f5c54167a3c62105$export$ae5ab1c730825774) ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n    // 0 or negative = within the clipping rect\n    var overflowOffsets = {\n        top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n        bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n        left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n        right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n    };\n    var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n    if (elementContext === (0, $f5c54167a3c62105$export$ae5ab1c730825774) && offsetData) {\n        var offset = offsetData[placement];\n        Object.keys(overflowOffsets).forEach(function(key) {\n            var multiply = [\n                (0, $f5c54167a3c62105$export$79ffe56a765070d2),\n                (0, $f5c54167a3c62105$export$40e543e69a8b3fbb)\n            ].indexOf(key) >= 0 ? 1 : -1;\n            var axis = [\n                (0, $f5c54167a3c62105$export$1e95b668f3b82d),\n                (0, $f5c54167a3c62105$export$40e543e69a8b3fbb)\n            ].indexOf(key) >= 0 ? 'y' : 'x';\n            overflowOffsets[key] += offset[axis] * multiply;\n        });\n    }\n    return overflowOffsets;\n}\n\n\n\n\n\n\nfunction $dbd70d4ba9902caa$export$2e2bcd8739ae039(state, options) {\n    if (options === void 0) options = {};\n    var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? (0, $f5c54167a3c62105$export$803cd8101b6c182b) : _options$allowedAutoP;\n    var variation = (0, $7b08f0526e425773$export$2e2bcd8739ae039)(placement);\n    var placements = variation ? flipVariations ? (0, $f5c54167a3c62105$export$368f9a87e87fa4e1) : (0, $f5c54167a3c62105$export$368f9a87e87fa4e1).filter(function(placement) {\n        return (0, $7b08f0526e425773$export$2e2bcd8739ae039)(placement) === variation;\n    }) : (0, $f5c54167a3c62105$export$aec2ce47c367b8c3);\n    var allowedPlacements = placements.filter(function(placement) {\n        return allowedAutoPlacements.indexOf(placement) >= 0;\n    });\n    if (allowedPlacements.length === 0) allowedPlacements = placements;\n     // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n    var overflows = allowedPlacements.reduce(function(acc, placement) {\n        acc[placement] = (0, $f765731200b57f98$export$2e2bcd8739ae039)(state, {\n            placement: placement,\n            boundary: boundary,\n            rootBoundary: rootBoundary,\n            padding: padding\n        })[(0, $afe288682115fde3$export$2e2bcd8739ae039)(placement)];\n        return acc;\n    }, {});\n    return Object.keys(overflows).sort(function(a, b) {\n        return overflows[a] - overflows[b];\n    });\n}\n\n\n\n\nfunction $b1f32a1d9525a032$var$getExpandedFallbackPlacements(placement) {\n    if ((0, $afe288682115fde3$export$2e2bcd8739ae039)(placement) === (0, $f5c54167a3c62105$export$dfb5619354ba860)) return [];\n    var oppositePlacement = (0, $825ae98fe4f5d029$export$2e2bcd8739ae039)(placement);\n    return [\n        (0, $76c023b5f4bd6339$export$2e2bcd8739ae039)(placement),\n        oppositePlacement,\n        (0, $76c023b5f4bd6339$export$2e2bcd8739ae039)(oppositePlacement)\n    ];\n}\nfunction $b1f32a1d9525a032$var$flip(_ref) {\n    var state = _ref.state, options = _ref.options, name = _ref.name;\n    if (state.modifiersData[name]._skip) return;\n    var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements;\n    var preferredPlacement = state.options.placement;\n    var basePlacement = (0, $afe288682115fde3$export$2e2bcd8739ae039)(preferredPlacement);\n    var isBasePlacement = basePlacement === preferredPlacement;\n    var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [\n        (0, $825ae98fe4f5d029$export$2e2bcd8739ae039)(preferredPlacement)\n    ] : $b1f32a1d9525a032$var$getExpandedFallbackPlacements(preferredPlacement));\n    var placements = [\n        preferredPlacement\n    ].concat(fallbackPlacements).reduce(function(acc, placement) {\n        return acc.concat((0, $afe288682115fde3$export$2e2bcd8739ae039)(placement) === (0, $f5c54167a3c62105$export$dfb5619354ba860) ? (0, $dbd70d4ba9902caa$export$2e2bcd8739ae039)(state, {\n            placement: placement,\n            boundary: boundary,\n            rootBoundary: rootBoundary,\n            padding: padding,\n            flipVariations: flipVariations,\n            allowedAutoPlacements: allowedAutoPlacements\n        }) : placement);\n    }, []);\n    var referenceRect = state.rects.reference;\n    var popperRect = state.rects.popper;\n    var checksMap = new Map();\n    var makeFallbackChecks = true;\n    var firstFittingPlacement = placements[0];\n    for(var i = 0; i < placements.length; i++){\n        var placement = placements[i];\n        var _basePlacement = (0, $afe288682115fde3$export$2e2bcd8739ae039)(placement);\n        var isStartVariation = (0, $7b08f0526e425773$export$2e2bcd8739ae039)(placement) === (0, $f5c54167a3c62105$export$b3571188c770cc5a);\n        var isVertical = [\n            (0, $f5c54167a3c62105$export$1e95b668f3b82d),\n            (0, $f5c54167a3c62105$export$40e543e69a8b3fbb)\n        ].indexOf(_basePlacement) >= 0;\n        var len = isVertical ? 'width' : 'height';\n        var overflow = (0, $f765731200b57f98$export$2e2bcd8739ae039)(state, {\n            placement: placement,\n            boundary: boundary,\n            rootBoundary: rootBoundary,\n            altBoundary: altBoundary,\n            padding: padding\n        });\n        var mainVariationSide = isVertical ? isStartVariation ? (0, $f5c54167a3c62105$export$79ffe56a765070d2) : (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4) : isStartVariation ? (0, $f5c54167a3c62105$export$40e543e69a8b3fbb) : (0, $f5c54167a3c62105$export$1e95b668f3b82d);\n        if (referenceRect[len] > popperRect[len]) mainVariationSide = (0, $825ae98fe4f5d029$export$2e2bcd8739ae039)(mainVariationSide);\n        var altVariationSide = (0, $825ae98fe4f5d029$export$2e2bcd8739ae039)(mainVariationSide);\n        var checks = [];\n        if (checkMainAxis) checks.push(overflow[_basePlacement] <= 0);\n        if (checkAltAxis) checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n        if (checks.every(function(check) {\n            return check;\n        })) {\n            firstFittingPlacement = placement;\n            makeFallbackChecks = false;\n            break;\n        }\n        checksMap.set(placement, checks);\n    }\n    if (makeFallbackChecks) {\n        // `2` may be desired in some cases – research later\n        var numberOfChecks = flipVariations ? 3 : 1;\n        var _loop = function _loop(_i) {\n            var fittingPlacement = placements.find(function(placement) {\n                var checks = checksMap.get(placement);\n                if (checks) return checks.slice(0, _i).every(function(check) {\n                    return check;\n                });\n            });\n            if (fittingPlacement) {\n                firstFittingPlacement = fittingPlacement;\n                return \"break\";\n            }\n        };\n        for(var _i = numberOfChecks; _i > 0; _i--){\n            var _ret = _loop(_i);\n            if (_ret === \"break\") break;\n        }\n    }\n    if (state.placement !== firstFittingPlacement) {\n        state.modifiersData[name]._skip = true;\n        state.placement = firstFittingPlacement;\n        state.reset = true;\n    }\n} // eslint-disable-next-line import/no-unused-modules\nvar $b1f32a1d9525a032$export$2e2bcd8739ae039 = {\n    name: 'flip',\n    enabled: true,\n    phase: 'main',\n    fn: $b1f32a1d9525a032$var$flip,\n    requiresIfExists: [\n        'offset'\n    ],\n    data: {\n        _skip: false\n    }\n};\n\n\n\n\n\nfunction $d8b68132b61080af$export$2e2bcd8739ae039(axis) {\n    return axis === 'x' ? 'y' : 'x';\n}\n\n\n\nfunction $b6f0b0266e764faa$export$f28d906d67a997f3(min, value, max) {\n    return (0, $7e23bad950468b82$export$8960430cfd85939f)(min, (0, $7e23bad950468b82$export$96ec731ed4dcb222)(value, max));\n}\nfunction $b6f0b0266e764faa$export$86c8af6d3ef0b4a(min, value, max) {\n    var v = $b6f0b0266e764faa$export$f28d906d67a997f3(min, value, max);\n    return v > max ? max : v;\n}\n\n\n\n\n\n\n\n\nfunction $3295dac8746ffe59$var$preventOverflow(_ref) {\n    var state = _ref.state, options = _ref.options, name = _ref.name;\n    var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n    var overflow = (0, $f765731200b57f98$export$2e2bcd8739ae039)(state, {\n        boundary: boundary,\n        rootBoundary: rootBoundary,\n        padding: padding,\n        altBoundary: altBoundary\n    });\n    var basePlacement = (0, $afe288682115fde3$export$2e2bcd8739ae039)(state.placement);\n    var variation = (0, $7b08f0526e425773$export$2e2bcd8739ae039)(state.placement);\n    var isBasePlacement = !variation;\n    var mainAxis = (0, $b518c35b71cf930f$export$2e2bcd8739ae039)(basePlacement);\n    var altAxis = (0, $d8b68132b61080af$export$2e2bcd8739ae039)(mainAxis);\n    var popperOffsets = state.modifiersData.popperOffsets;\n    var referenceRect = state.rects.reference;\n    var popperRect = state.rects.popper;\n    var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n        placement: state.placement\n    })) : tetherOffset;\n    var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n        mainAxis: tetherOffsetValue,\n        altAxis: tetherOffsetValue\n    } : Object.assign({\n        mainAxis: 0,\n        altAxis: 0\n    }, tetherOffsetValue);\n    var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n    var data = {\n        x: 0,\n        y: 0\n    };\n    if (!popperOffsets) return;\n    if (checkMainAxis) {\n        var _offsetModifierState$;\n        var mainSide = mainAxis === 'y' ? (0, $f5c54167a3c62105$export$1e95b668f3b82d) : (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4);\n        var altSide = mainAxis === 'y' ? (0, $f5c54167a3c62105$export$40e543e69a8b3fbb) : (0, $f5c54167a3c62105$export$79ffe56a765070d2);\n        var len = mainAxis === 'y' ? 'height' : 'width';\n        var offset = popperOffsets[mainAxis];\n        var min = offset + overflow[mainSide];\n        var max = offset - overflow[altSide];\n        var additive = tether ? -popperRect[len] / 2 : 0;\n        var minLen = variation === (0, $f5c54167a3c62105$export$b3571188c770cc5a) ? referenceRect[len] : popperRect[len];\n        var maxLen = variation === (0, $f5c54167a3c62105$export$b3571188c770cc5a) ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n        // outside the reference bounds\n        var arrowElement = state.elements.arrow;\n        var arrowRect = tether && arrowElement ? (0, $30ced62b744c6cfe$export$2e2bcd8739ae039)(arrowElement) : {\n            width: 0,\n            height: 0\n        };\n        var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : (0, $683c5e26d5f8bfe5$export$2e2bcd8739ae039)();\n        var arrowPaddingMin = arrowPaddingObject[mainSide];\n        var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n        // to include its full size in the calculation. If the reference is small\n        // and near the edge of a boundary, the popper can overflow even if the\n        // reference is not overflowing as well (e.g. virtual elements with no\n        // width or height)\n        var arrowLen = (0, $b6f0b0266e764faa$export$f28d906d67a997f3)(0, referenceRect[len], arrowRect[len]);\n        var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n        var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n        var arrowOffsetParent = state.elements.arrow && (0, $a56b734280245ffb$export$2e2bcd8739ae039)(state.elements.arrow);\n        var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n        var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n        var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n        var tetherMax = offset + maxOffset - offsetModifierValue;\n        var preventedOffset = (0, $b6f0b0266e764faa$export$f28d906d67a997f3)(tether ? (0, $7e23bad950468b82$export$96ec731ed4dcb222)(min, tetherMin) : min, offset, tether ? (0, $7e23bad950468b82$export$8960430cfd85939f)(max, tetherMax) : max);\n        popperOffsets[mainAxis] = preventedOffset;\n        data[mainAxis] = preventedOffset - offset;\n    }\n    if (checkAltAxis) {\n        var _offsetModifierState$2;\n        var _mainSide = mainAxis === 'x' ? (0, $f5c54167a3c62105$export$1e95b668f3b82d) : (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4);\n        var _altSide = mainAxis === 'x' ? (0, $f5c54167a3c62105$export$40e543e69a8b3fbb) : (0, $f5c54167a3c62105$export$79ffe56a765070d2);\n        var _offset = popperOffsets[altAxis];\n        var _len = altAxis === 'y' ? 'height' : 'width';\n        var _min = _offset + overflow[_mainSide];\n        var _max = _offset - overflow[_altSide];\n        var isOriginSide = [\n            (0, $f5c54167a3c62105$export$1e95b668f3b82d),\n            (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4)\n        ].indexOf(basePlacement) !== -1;\n        var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n        var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n        var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n        var _preventedOffset = tether && isOriginSide ? (0, $b6f0b0266e764faa$export$86c8af6d3ef0b4a)(_tetherMin, _offset, _tetherMax) : (0, $b6f0b0266e764faa$export$f28d906d67a997f3)(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n        popperOffsets[altAxis] = _preventedOffset;\n        data[altAxis] = _preventedOffset - _offset;\n    }\n    state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\nvar $3295dac8746ffe59$export$2e2bcd8739ae039 = {\n    name: 'preventOverflow',\n    enabled: true,\n    phase: 'main',\n    fn: $3295dac8746ffe59$var$preventOverflow,\n    requiresIfExists: [\n        'offset'\n    ]\n};\n\n\n\n\n\n\n\n\n\n\n\nvar $1992f2d714808ab6$var$toPaddingObject = function toPaddingObject(padding, state) {\n    padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n        placement: state.placement\n    })) : padding;\n    return (0, $387b887da02b7e69$export$2e2bcd8739ae039)(typeof padding !== 'number' ? padding : (0, $4d11a6decde23bf9$export$2e2bcd8739ae039)(padding, (0, $f5c54167a3c62105$export$aec2ce47c367b8c3)));\n};\nfunction $1992f2d714808ab6$var$arrow(_ref) {\n    var _state$modifiersData$;\n    var state = _ref.state, name = _ref.name, options = _ref.options;\n    var arrowElement = state.elements.arrow;\n    var popperOffsets = state.modifiersData.popperOffsets;\n    var basePlacement = (0, $afe288682115fde3$export$2e2bcd8739ae039)(state.placement);\n    var axis = (0, $b518c35b71cf930f$export$2e2bcd8739ae039)(basePlacement);\n    var isVertical = [\n        (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4),\n        (0, $f5c54167a3c62105$export$79ffe56a765070d2)\n    ].indexOf(basePlacement) >= 0;\n    var len = isVertical ? 'height' : 'width';\n    if (!arrowElement || !popperOffsets) return;\n    var paddingObject = $1992f2d714808ab6$var$toPaddingObject(options.padding, state);\n    var arrowRect = (0, $30ced62b744c6cfe$export$2e2bcd8739ae039)(arrowElement);\n    var minProp = axis === 'y' ? (0, $f5c54167a3c62105$export$1e95b668f3b82d) : (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4);\n    var maxProp = axis === 'y' ? (0, $f5c54167a3c62105$export$40e543e69a8b3fbb) : (0, $f5c54167a3c62105$export$79ffe56a765070d2);\n    var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n    var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n    var arrowOffsetParent = (0, $a56b734280245ffb$export$2e2bcd8739ae039)(arrowElement);\n    var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n    var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n    // outside of the popper bounds\n    var min = paddingObject[minProp];\n    var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n    var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n    var offset = (0, $b6f0b0266e764faa$export$f28d906d67a997f3)(min, center, max); // Prevents breaking syntax highlighting...\n    var axisProp = axis;\n    state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\nfunction $1992f2d714808ab6$var$effect(_ref2) {\n    var state = _ref2.state, options = _ref2.options;\n    var _options$element = options.element, arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n    if (arrowElement == null) return;\n     // CSS selector\n    if (typeof arrowElement === 'string') {\n        arrowElement = state.elements.popper.querySelector(arrowElement);\n        if (!arrowElement) return;\n    }\n    if (!(0, $d63950b756706495$export$2e2bcd8739ae039)(state.elements.popper, arrowElement)) return;\n    state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\nvar $1992f2d714808ab6$export$2e2bcd8739ae039 = {\n    name: 'arrow',\n    enabled: true,\n    phase: 'main',\n    fn: $1992f2d714808ab6$var$arrow,\n    effect: $1992f2d714808ab6$var$effect,\n    requires: [\n        'popperOffsets'\n    ],\n    requiresIfExists: [\n        'preventOverflow'\n    ]\n};\n\n\n\n\nfunction $174d14927bb4f43b$var$getSideOffsets(overflow, rect, preventedOffsets) {\n    if (preventedOffsets === void 0) preventedOffsets = {\n        x: 0,\n        y: 0\n    };\n    return {\n        top: overflow.top - rect.height - preventedOffsets.y,\n        right: overflow.right - rect.width + preventedOffsets.x,\n        bottom: overflow.bottom - rect.height + preventedOffsets.y,\n        left: overflow.left - rect.width - preventedOffsets.x\n    };\n}\nfunction $174d14927bb4f43b$var$isAnySideFullyClipped(overflow) {\n    return [\n        (0, $f5c54167a3c62105$export$1e95b668f3b82d),\n        (0, $f5c54167a3c62105$export$79ffe56a765070d2),\n        (0, $f5c54167a3c62105$export$40e543e69a8b3fbb),\n        (0, $f5c54167a3c62105$export$eabcd2c8791e7bf4)\n    ].some(function(side) {\n        return overflow[side] >= 0;\n    });\n}\nfunction $174d14927bb4f43b$var$hide(_ref) {\n    var state = _ref.state, name = _ref.name;\n    var referenceRect = state.rects.reference;\n    var popperRect = state.rects.popper;\n    var preventedOffsets = state.modifiersData.preventOverflow;\n    var referenceOverflow = (0, $f765731200b57f98$export$2e2bcd8739ae039)(state, {\n        elementContext: 'reference'\n    });\n    var popperAltOverflow = (0, $f765731200b57f98$export$2e2bcd8739ae039)(state, {\n        altBoundary: true\n    });\n    var referenceClippingOffsets = $174d14927bb4f43b$var$getSideOffsets(referenceOverflow, referenceRect);\n    var popperEscapeOffsets = $174d14927bb4f43b$var$getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n    var isReferenceHidden = $174d14927bb4f43b$var$isAnySideFullyClipped(referenceClippingOffsets);\n    var hasPopperEscaped = $174d14927bb4f43b$var$isAnySideFullyClipped(popperEscapeOffsets);\n    state.modifiersData[name] = {\n        referenceClippingOffsets: referenceClippingOffsets,\n        popperEscapeOffsets: popperEscapeOffsets,\n        isReferenceHidden: isReferenceHidden,\n        hasPopperEscaped: hasPopperEscaped\n    };\n    state.attributes.popper = Object.assign({}, state.attributes.popper, {\n        'data-popper-reference-hidden': isReferenceHidden,\n        'data-popper-escaped': hasPopperEscaped\n    });\n} // eslint-disable-next-line import/no-unused-modules\nvar $174d14927bb4f43b$export$2e2bcd8739ae039 = {\n    name: 'hide',\n    enabled: true,\n    phase: 'main',\n    requiresIfExists: [\n        'preventOverflow'\n    ],\n    fn: $174d14927bb4f43b$var$hide\n};\n\n\n\n\nvar $1bf0bf541303046d$export$d34966752335dd47 = [\n    (0, $ff355aafd082b0cd$export$2e2bcd8739ae039),\n    (0, $e92fb10df1450f31$export$2e2bcd8739ae039),\n    (0, $c8f8eadcf7685dc5$export$2e2bcd8739ae039),\n    (0, $83c1fc4c4e58d7dd$export$2e2bcd8739ae039),\n    (0, $7c04da2e958a3fe8$export$2e2bcd8739ae039),\n    (0, $b1f32a1d9525a032$export$2e2bcd8739ae039),\n    (0, $3295dac8746ffe59$export$2e2bcd8739ae039),\n    (0, $1992f2d714808ab6$export$2e2bcd8739ae039),\n    (0, $174d14927bb4f43b$export$2e2bcd8739ae039)\n];\nvar $1bf0bf541303046d$export$8f7491d57c8f97a9 = /*#__PURE__*/ (0, $b3c2fd6800546b4b$export$ed5e13716264f202)({\n    defaultModifiers: $1bf0bf541303046d$export$d34966752335dd47\n}); // eslint-disable-next-line import/no-unused-modules\n\n\n\nvar $9d7e083df5284b15$var$__assign = undefined && undefined.__assign || function() {\n    $9d7e083df5284b15$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $9d7e083df5284b15$var$__assign.apply(this, arguments);\n};\nvar $9d7e083df5284b15$var$__spreadArray = undefined && undefined.__spreadArray || function(to, from, pack) {\n    if (pack || arguments.length === 2) {\n        for(var i = 0, l = from.length, ar; i < l; i++)if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar $9d7e083df5284b15$var$Default = {\n    placement: 'bottom',\n    triggerType: 'click',\n    offsetSkidding: 0,\n    offsetDistance: 10,\n    delay: 300,\n    ignoreClickOutsideClass: false,\n    onShow: function() {},\n    onHide: function() {},\n    onToggle: function() {}\n};\nvar $9d7e083df5284b15$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $9d7e083df5284b15$var$Dropdown = /** @class */ function() {\n    function Dropdown(targetElement, triggerElement, options, instanceOptions) {\n        if (targetElement === void 0) targetElement = null;\n        if (triggerElement === void 0) triggerElement = null;\n        if (options === void 0) options = $9d7e083df5284b15$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $9d7e083df5284b15$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : targetElement.id;\n        this._targetEl = targetElement;\n        this._triggerEl = triggerElement;\n        this._options = $9d7e083df5284b15$var$__assign($9d7e083df5284b15$var$__assign({}, $9d7e083df5284b15$var$Default), options);\n        this._popperInstance = null;\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Dropdown', this, this._instanceId, instanceOptions.override);\n    }\n    Dropdown.prototype.init = function() {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._popperInstance = this._createPopperInstance();\n            this._setupEventListeners();\n            this._initialized = true;\n        }\n    };\n    Dropdown.prototype.destroy = function() {\n        var _this = this;\n        var triggerEvents = this._getTriggerEvents();\n        // Remove click event listeners for trigger element\n        if (this._options.triggerType === 'click') triggerEvents.showEvents.forEach(function(ev) {\n            _this._triggerEl.removeEventListener(ev, _this._clickHandler);\n        });\n        // Remove hover event listeners for trigger and target elements\n        if (this._options.triggerType === 'hover') {\n            triggerEvents.showEvents.forEach(function(ev) {\n                _this._triggerEl.removeEventListener(ev, _this._hoverShowTriggerElHandler);\n                _this._targetEl.removeEventListener(ev, _this._hoverShowTargetElHandler);\n            });\n            triggerEvents.hideEvents.forEach(function(ev) {\n                _this._triggerEl.removeEventListener(ev, _this._hoverHideHandler);\n                _this._targetEl.removeEventListener(ev, _this._hoverHideHandler);\n            });\n        }\n        this._popperInstance.destroy();\n        this._initialized = false;\n    };\n    Dropdown.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Dropdown', this._instanceId);\n    };\n    Dropdown.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Dropdown.prototype._setupEventListeners = function() {\n        var _this = this;\n        var triggerEvents = this._getTriggerEvents();\n        this._clickHandler = function() {\n            _this.toggle();\n        };\n        // click event handling for trigger element\n        if (this._options.triggerType === 'click') triggerEvents.showEvents.forEach(function(ev) {\n            _this._triggerEl.addEventListener(ev, _this._clickHandler);\n        });\n        this._hoverShowTriggerElHandler = function(ev) {\n            if (ev.type === 'click') _this.toggle();\n            else setTimeout(function() {\n                _this.show();\n            }, _this._options.delay);\n        };\n        this._hoverShowTargetElHandler = function() {\n            _this.show();\n        };\n        this._hoverHideHandler = function() {\n            setTimeout(function() {\n                if (!_this._targetEl.matches(':hover')) _this.hide();\n            }, _this._options.delay);\n        };\n        // hover event handling for trigger element\n        if (this._options.triggerType === 'hover') {\n            triggerEvents.showEvents.forEach(function(ev) {\n                _this._triggerEl.addEventListener(ev, _this._hoverShowTriggerElHandler);\n                _this._targetEl.addEventListener(ev, _this._hoverShowTargetElHandler);\n            });\n            triggerEvents.hideEvents.forEach(function(ev) {\n                _this._triggerEl.addEventListener(ev, _this._hoverHideHandler);\n                _this._targetEl.addEventListener(ev, _this._hoverHideHandler);\n            });\n        }\n    };\n    Dropdown.prototype._createPopperInstance = function() {\n        return (0, $1bf0bf541303046d$export$8f7491d57c8f97a9)(this._triggerEl, this._targetEl, {\n            placement: this._options.placement,\n            modifiers: [\n                {\n                    name: 'offset',\n                    options: {\n                        offset: [\n                            this._options.offsetSkidding,\n                            this._options.offsetDistance\n                        ]\n                    }\n                }\n            ]\n        });\n    };\n    Dropdown.prototype._setupClickOutsideListener = function() {\n        var _this = this;\n        this._clickOutsideEventListener = function(ev) {\n            _this._handleClickOutside(ev, _this._targetEl);\n        };\n        document.body.addEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Dropdown.prototype._removeClickOutsideListener = function() {\n        document.body.removeEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Dropdown.prototype._handleClickOutside = function(ev, targetEl) {\n        var clickedEl = ev.target;\n        // Ignore clicks on the trigger element (ie. a datepicker input)\n        var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n        var isIgnored = false;\n        if (ignoreClickOutsideClass) {\n            var ignoredClickOutsideEls = document.querySelectorAll(\".\".concat(ignoreClickOutsideClass));\n            ignoredClickOutsideEls.forEach(function(el) {\n                if (el.contains(clickedEl)) {\n                    isIgnored = true;\n                    return;\n                }\n            });\n        }\n        // Ignore clicks on the target element (ie. dropdown itself)\n        if (clickedEl !== targetEl && !targetEl.contains(clickedEl) && !this._triggerEl.contains(clickedEl) && !isIgnored && this.isVisible()) this.hide();\n    };\n    Dropdown.prototype._getTriggerEvents = function() {\n        switch(this._options.triggerType){\n            case 'hover':\n                return {\n                    showEvents: [\n                        'mouseenter',\n                        'click'\n                    ],\n                    hideEvents: [\n                        'mouseleave'\n                    ]\n                };\n            case 'click':\n                return {\n                    showEvents: [\n                        'click'\n                    ],\n                    hideEvents: []\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: []\n                };\n            default:\n                return {\n                    showEvents: [\n                        'click'\n                    ],\n                    hideEvents: []\n                };\n        }\n    };\n    Dropdown.prototype.toggle = function() {\n        if (this.isVisible()) this.hide();\n        else this.show();\n        this._options.onToggle(this);\n    };\n    Dropdown.prototype.isVisible = function() {\n        return this._visible;\n    };\n    Dropdown.prototype.show = function() {\n        this._targetEl.classList.remove('hidden');\n        this._targetEl.classList.add('block');\n        this._targetEl.removeAttribute('aria-hidden');\n        // Enable the event listeners\n        this._popperInstance.setOptions(function(options) {\n            return $9d7e083df5284b15$var$__assign($9d7e083df5284b15$var$__assign({}, options), {\n                modifiers: $9d7e083df5284b15$var$__spreadArray($9d7e083df5284b15$var$__spreadArray([], options.modifiers, true), [\n                    {\n                        name: 'eventListeners',\n                        enabled: true\n                    }\n                ], false)\n            });\n        });\n        this._setupClickOutsideListener();\n        // Update its position\n        this._popperInstance.update();\n        this._visible = true;\n        // callback function\n        this._options.onShow(this);\n    };\n    Dropdown.prototype.hide = function() {\n        this._targetEl.classList.remove('block');\n        this._targetEl.classList.add('hidden');\n        this._targetEl.setAttribute('aria-hidden', 'true');\n        // Disable the event listeners\n        this._popperInstance.setOptions(function(options) {\n            return $9d7e083df5284b15$var$__assign($9d7e083df5284b15$var$__assign({}, options), {\n                modifiers: $9d7e083df5284b15$var$__spreadArray($9d7e083df5284b15$var$__spreadArray([], options.modifiers, true), [\n                    {\n                        name: 'eventListeners',\n                        enabled: false\n                    }\n                ], false)\n            });\n        });\n        this._visible = false;\n        this._removeClickOutsideListener();\n        // callback function\n        this._options.onHide(this);\n    };\n    Dropdown.prototype.updateOnShow = function(callback) {\n        this._options.onShow = callback;\n    };\n    Dropdown.prototype.updateOnHide = function(callback) {\n        this._options.onHide = callback;\n    };\n    Dropdown.prototype.updateOnToggle = function(callback) {\n        this._options.onToggle = callback;\n    };\n    return Dropdown;\n}();\nfunction $9d7e083df5284b15$export$8cb65a02593bf108() {\n    document.querySelectorAll('[data-dropdown-toggle]').forEach(function($triggerEl) {\n        var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n        var $dropdownEl = document.getElementById(dropdownId);\n        if ($dropdownEl) {\n            var placement = $triggerEl.getAttribute('data-dropdown-placement');\n            var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding');\n            var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance');\n            var triggerType = $triggerEl.getAttribute('data-dropdown-trigger');\n            var delay = $triggerEl.getAttribute('data-dropdown-delay');\n            var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class');\n            new $9d7e083df5284b15$var$Dropdown($dropdownEl, $triggerEl, {\n                placement: placement ? placement : $9d7e083df5284b15$var$Default.placement,\n                triggerType: triggerType ? triggerType : $9d7e083df5284b15$var$Default.triggerType,\n                offsetSkidding: offsetSkidding ? parseInt(offsetSkidding) : $9d7e083df5284b15$var$Default.offsetSkidding,\n                offsetDistance: offsetDistance ? parseInt(offsetDistance) : $9d7e083df5284b15$var$Default.offsetDistance,\n                delay: delay ? parseInt(delay) : $9d7e083df5284b15$var$Default.delay,\n                ignoreClickOutsideClass: ignoreClickOutsideClass ? ignoreClickOutsideClass : $9d7e083df5284b15$var$Default.ignoreClickOutsideClass\n            });\n        } else console.error(\"The dropdown element with id \\\"\".concat(dropdownId, \"\\\" does not exist. Please check the data-dropdown-toggle attribute.\"));\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Dropdown = $9d7e083df5284b15$var$Dropdown;\n    window.initDropdowns = $9d7e083df5284b15$export$8cb65a02593bf108;\n}\nvar $9d7e083df5284b15$export$2e2bcd8739ae039 = $9d7e083df5284b15$var$Dropdown;\n\n\n\nvar $eaca6a069237aaf5$var$__assign = undefined && undefined.__assign || function() {\n    $eaca6a069237aaf5$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $eaca6a069237aaf5$var$__assign.apply(this, arguments);\n};\nvar $eaca6a069237aaf5$var$Default = {\n    placement: 'center',\n    backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40',\n    backdrop: 'dynamic',\n    closable: true,\n    onHide: function() {},\n    onShow: function() {},\n    onToggle: function() {}\n};\nvar $eaca6a069237aaf5$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $eaca6a069237aaf5$var$Modal = /** @class */ function() {\n    function Modal(targetEl, options, instanceOptions) {\n        if (targetEl === void 0) targetEl = null;\n        if (options === void 0) options = $eaca6a069237aaf5$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $eaca6a069237aaf5$var$DefaultInstanceOptions;\n        this._eventListenerInstances = [];\n        this._instanceId = instanceOptions.id ? instanceOptions.id : targetEl.id;\n        this._targetEl = targetEl;\n        this._options = $eaca6a069237aaf5$var$__assign($eaca6a069237aaf5$var$__assign({}, $eaca6a069237aaf5$var$Default), options);\n        this._isHidden = true;\n        this._backdropEl = null;\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Modal', this, this._instanceId, instanceOptions.override);\n    }\n    Modal.prototype.init = function() {\n        var _this = this;\n        if (this._targetEl && !this._initialized) {\n            this._getPlacementClasses().map(function(c) {\n                _this._targetEl.classList.add(c);\n            });\n            this._initialized = true;\n        }\n    };\n    Modal.prototype.destroy = function() {\n        if (this._initialized) {\n            this.removeAllEventListenerInstances();\n            this._destroyBackdropEl();\n            this._initialized = false;\n        }\n    };\n    Modal.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Modal', this._instanceId);\n    };\n    Modal.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Modal.prototype._createBackdrop = function() {\n        var _a;\n        if (this._isHidden) {\n            var backdropEl = document.createElement('div');\n            (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' '));\n            document.querySelector('body').append(backdropEl);\n            this._backdropEl = backdropEl;\n        }\n    };\n    Modal.prototype._destroyBackdropEl = function() {\n        if (!this._isHidden && this._backdropEl) {\n            this._backdropEl.remove();\n            this._backdropEl = null;\n        }\n    };\n    Modal.prototype._setupModalCloseEventListeners = function() {\n        var _this = this;\n        if (this._options.backdrop === 'dynamic') {\n            this._clickOutsideEventListener = function(ev) {\n                _this._handleOutsideClick(ev.target);\n            };\n            this._targetEl.addEventListener('click', this._clickOutsideEventListener, true);\n        }\n        this._keydownEventListener = function(ev) {\n            if (ev.key === 'Escape') _this.hide();\n        };\n        document.body.addEventListener('keydown', this._keydownEventListener, true);\n    };\n    Modal.prototype._removeModalCloseEventListeners = function() {\n        if (this._options.backdrop === 'dynamic') this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true);\n        document.body.removeEventListener('keydown', this._keydownEventListener, true);\n    };\n    Modal.prototype._handleOutsideClick = function(target) {\n        if (target === this._targetEl || target === this._backdropEl && this.isVisible()) this.hide();\n    };\n    Modal.prototype._getPlacementClasses = function() {\n        switch(this._options.placement){\n            // top\n            case 'top-left':\n                return [\n                    'justify-start',\n                    'items-start'\n                ];\n            case 'top-center':\n                return [\n                    'justify-center',\n                    'items-start'\n                ];\n            case 'top-right':\n                return [\n                    'justify-end',\n                    'items-start'\n                ];\n            // center\n            case 'center-left':\n                return [\n                    'justify-start',\n                    'items-center'\n                ];\n            case 'center':\n                return [\n                    'justify-center',\n                    'items-center'\n                ];\n            case 'center-right':\n                return [\n                    'justify-end',\n                    'items-center'\n                ];\n            // bottom\n            case 'bottom-left':\n                return [\n                    'justify-start',\n                    'items-end'\n                ];\n            case 'bottom-center':\n                return [\n                    'justify-center',\n                    'items-end'\n                ];\n            case 'bottom-right':\n                return [\n                    'justify-end',\n                    'items-end'\n                ];\n            default:\n                return [\n                    'justify-center',\n                    'items-center'\n                ];\n        }\n    };\n    Modal.prototype.toggle = function() {\n        if (this._isHidden) this.show();\n        else this.hide();\n        // callback function\n        this._options.onToggle(this);\n    };\n    Modal.prototype.show = function() {\n        if (this.isHidden) {\n            this._targetEl.classList.add('flex');\n            this._targetEl.classList.remove('hidden');\n            this._targetEl.setAttribute('aria-modal', 'true');\n            this._targetEl.setAttribute('role', 'dialog');\n            this._targetEl.removeAttribute('aria-hidden');\n            this._createBackdrop();\n            this._isHidden = false;\n            // Add keyboard event listener to the document\n            if (this._options.closable) this._setupModalCloseEventListeners();\n            // prevent body scroll\n            document.body.classList.add('overflow-hidden');\n            // callback function\n            this._options.onShow(this);\n        }\n    };\n    Modal.prototype.hide = function() {\n        if (this.isVisible) {\n            this._targetEl.classList.add('hidden');\n            this._targetEl.classList.remove('flex');\n            this._targetEl.setAttribute('aria-hidden', 'true');\n            this._targetEl.removeAttribute('aria-modal');\n            this._targetEl.removeAttribute('role');\n            this._destroyBackdropEl();\n            this._isHidden = true;\n            // re-apply body scroll\n            document.body.classList.remove('overflow-hidden');\n            if (this._options.closable) this._removeModalCloseEventListeners();\n            // callback function\n            this._options.onHide(this);\n        }\n    };\n    Modal.prototype.isVisible = function() {\n        return !this._isHidden;\n    };\n    Modal.prototype.isHidden = function() {\n        return this._isHidden;\n    };\n    Modal.prototype.addEventListenerInstance = function(element, type, handler) {\n        this._eventListenerInstances.push({\n            element: element,\n            type: type,\n            handler: handler\n        });\n    };\n    Modal.prototype.removeAllEventListenerInstances = function() {\n        this._eventListenerInstances.map(function(eventListenerInstance) {\n            eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler);\n        });\n        this._eventListenerInstances = [];\n    };\n    Modal.prototype.getAllEventListenerInstances = function() {\n        return this._eventListenerInstances;\n    };\n    Modal.prototype.updateOnShow = function(callback) {\n        this._options.onShow = callback;\n    };\n    Modal.prototype.updateOnHide = function(callback) {\n        this._options.onHide = callback;\n    };\n    Modal.prototype.updateOnToggle = function(callback) {\n        this._options.onToggle = callback;\n    };\n    return Modal;\n}();\nfunction $eaca6a069237aaf5$export$e14d3bc873a8b9b1() {\n    // initiate modal based on data-modal-target\n    document.querySelectorAll('[data-modal-target]').forEach(function($triggerEl) {\n        var modalId = $triggerEl.getAttribute('data-modal-target');\n        var $modalEl = document.getElementById(modalId);\n        if ($modalEl) {\n            var placement = $modalEl.getAttribute('data-modal-placement');\n            var backdrop = $modalEl.getAttribute('data-modal-backdrop');\n            new $eaca6a069237aaf5$var$Modal($modalEl, {\n                placement: placement ? placement : $eaca6a069237aaf5$var$Default.placement,\n                backdrop: backdrop ? backdrop : $eaca6a069237aaf5$var$Default.backdrop\n            });\n        } else console.error(\"Modal with id \".concat(modalId, \" does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.\"));\n    });\n    // toggle modal visibility\n    document.querySelectorAll('[data-modal-toggle]').forEach(function($triggerEl) {\n        var modalId = $triggerEl.getAttribute('data-modal-toggle');\n        var $modalEl = document.getElementById(modalId);\n        if ($modalEl) {\n            var modal_1 = (0, $5d5682da381fac09$export$2e2bcd8739ae039).getInstance('Modal', modalId);\n            if (modal_1) {\n                var toggleModal = function() {\n                    modal_1.toggle();\n                };\n                $triggerEl.addEventListener('click', toggleModal);\n                modal_1.addEventListenerInstance($triggerEl, 'click', toggleModal);\n            } else console.error(\"Modal with id \".concat(modalId, \" has not been initialized. Please initialize it using the data-modal-target attribute.\"));\n        } else console.error(\"Modal with id \".concat(modalId, \" does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?\"));\n    });\n    // show modal on click if exists based on id\n    document.querySelectorAll('[data-modal-show]').forEach(function($triggerEl) {\n        var modalId = $triggerEl.getAttribute('data-modal-show');\n        var $modalEl = document.getElementById(modalId);\n        if ($modalEl) {\n            var modal_2 = (0, $5d5682da381fac09$export$2e2bcd8739ae039).getInstance('Modal', modalId);\n            if (modal_2) {\n                var showModal = function() {\n                    modal_2.show();\n                };\n                $triggerEl.addEventListener('click', showModal);\n                modal_2.addEventListenerInstance($triggerEl, 'click', showModal);\n            } else console.error(\"Modal with id \".concat(modalId, \" has not been initialized. Please initialize it using the data-modal-target attribute.\"));\n        } else console.error(\"Modal with id \".concat(modalId, \" does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?\"));\n    });\n    // hide modal on click if exists based on id\n    document.querySelectorAll('[data-modal-hide]').forEach(function($triggerEl) {\n        var modalId = $triggerEl.getAttribute('data-modal-hide');\n        var $modalEl = document.getElementById(modalId);\n        if ($modalEl) {\n            var modal_3 = (0, $5d5682da381fac09$export$2e2bcd8739ae039).getInstance('Modal', modalId);\n            if (modal_3) {\n                var hideModal = function() {\n                    modal_3.hide();\n                };\n                $triggerEl.addEventListener('click', hideModal);\n                modal_3.addEventListenerInstance($triggerEl, 'click', hideModal);\n            } else console.error(\"Modal with id \".concat(modalId, \" has not been initialized. Please initialize it using the data-modal-target attribute.\"));\n        } else console.error(\"Modal with id \".concat(modalId, \" does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?\"));\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Modal = $eaca6a069237aaf5$var$Modal;\n    window.initModals = $eaca6a069237aaf5$export$e14d3bc873a8b9b1;\n}\nvar $eaca6a069237aaf5$export$2e2bcd8739ae039 = $eaca6a069237aaf5$var$Modal;\n\n\n\nvar $48c8331f22e653e8$var$__assign = undefined && undefined.__assign || function() {\n    $48c8331f22e653e8$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $48c8331f22e653e8$var$__assign.apply(this, arguments);\n};\nvar $48c8331f22e653e8$var$Default = {\n    placement: 'left',\n    bodyScrolling: false,\n    backdrop: true,\n    edge: false,\n    edgeOffset: 'bottom-[60px]',\n    backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n    onShow: function() {},\n    onHide: function() {},\n    onToggle: function() {}\n};\nvar $48c8331f22e653e8$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $48c8331f22e653e8$var$Drawer = /** @class */ function() {\n    function Drawer(targetEl, options, instanceOptions) {\n        if (targetEl === void 0) targetEl = null;\n        if (options === void 0) options = $48c8331f22e653e8$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $48c8331f22e653e8$var$DefaultInstanceOptions;\n        this._eventListenerInstances = [];\n        this._instanceId = instanceOptions.id ? instanceOptions.id : targetEl.id;\n        this._targetEl = targetEl;\n        this._options = $48c8331f22e653e8$var$__assign($48c8331f22e653e8$var$__assign({}, $48c8331f22e653e8$var$Default), options);\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Drawer', this, this._instanceId, instanceOptions.override);\n    }\n    Drawer.prototype.init = function() {\n        var _this = this;\n        // set initial accessibility attributes\n        if (this._targetEl && !this._initialized) {\n            this._targetEl.setAttribute('aria-hidden', 'true');\n            this._targetEl.classList.add('transition-transform');\n            // set base placement classes\n            this._getPlacementClasses(this._options.placement).base.map(function(c) {\n                _this._targetEl.classList.add(c);\n            });\n            this._handleEscapeKey = function(event) {\n                if (event.key === 'Escape') // if 'Escape' key is pressed\n                {\n                    if (_this.isVisible()) // if the Drawer is visible\n                    _this.hide(); // hide the Drawer\n                }\n            };\n            // add keyboard event listener to document\n            document.addEventListener('keydown', this._handleEscapeKey);\n            this._initialized = true;\n        }\n    };\n    Drawer.prototype.destroy = function() {\n        if (this._initialized) {\n            this.removeAllEventListenerInstances();\n            this._destroyBackdropEl();\n            // Remove the keyboard event listener\n            document.removeEventListener('keydown', this._handleEscapeKey);\n            this._initialized = false;\n        }\n    };\n    Drawer.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Drawer', this._instanceId);\n    };\n    Drawer.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Drawer.prototype.hide = function() {\n        var _this = this;\n        // based on the edge option show placement classes\n        if (this._options.edge) {\n            this._getPlacementClasses(this._options.placement + '-edge').active.map(function(c) {\n                _this._targetEl.classList.remove(c);\n            });\n            this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function(c) {\n                _this._targetEl.classList.add(c);\n            });\n        } else {\n            this._getPlacementClasses(this._options.placement).active.map(function(c) {\n                _this._targetEl.classList.remove(c);\n            });\n            this._getPlacementClasses(this._options.placement).inactive.map(function(c) {\n                _this._targetEl.classList.add(c);\n            });\n        }\n        // set accessibility attributes\n        this._targetEl.setAttribute('aria-hidden', 'true');\n        this._targetEl.removeAttribute('aria-modal');\n        this._targetEl.removeAttribute('role');\n        // enable body scroll\n        if (!this._options.bodyScrolling) document.body.classList.remove('overflow-hidden');\n        // destroy backdrop\n        if (this._options.backdrop) this._destroyBackdropEl();\n        this._visible = false;\n        // callback function\n        this._options.onHide(this);\n    };\n    Drawer.prototype.show = function() {\n        var _this = this;\n        if (this._options.edge) {\n            this._getPlacementClasses(this._options.placement + '-edge').active.map(function(c) {\n                _this._targetEl.classList.add(c);\n            });\n            this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function(c) {\n                _this._targetEl.classList.remove(c);\n            });\n        } else {\n            this._getPlacementClasses(this._options.placement).active.map(function(c) {\n                _this._targetEl.classList.add(c);\n            });\n            this._getPlacementClasses(this._options.placement).inactive.map(function(c) {\n                _this._targetEl.classList.remove(c);\n            });\n        }\n        // set accessibility attributes\n        this._targetEl.setAttribute('aria-modal', 'true');\n        this._targetEl.setAttribute('role', 'dialog');\n        this._targetEl.removeAttribute('aria-hidden');\n        // disable body scroll\n        if (!this._options.bodyScrolling) document.body.classList.add('overflow-hidden');\n        // show backdrop\n        if (this._options.backdrop) this._createBackdrop();\n        this._visible = true;\n        // callback function\n        this._options.onShow(this);\n    };\n    Drawer.prototype.toggle = function() {\n        if (this.isVisible()) this.hide();\n        else this.show();\n    };\n    Drawer.prototype._createBackdrop = function() {\n        var _a;\n        var _this = this;\n        if (!this._visible) {\n            var backdropEl = document.createElement('div');\n            backdropEl.setAttribute('drawer-backdrop', '');\n            (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' '));\n            document.querySelector('body').append(backdropEl);\n            backdropEl.addEventListener('click', function() {\n                _this.hide();\n            });\n        }\n    };\n    Drawer.prototype._destroyBackdropEl = function() {\n        if (this._visible && document.querySelector('[drawer-backdrop]') !== null) document.querySelector('[drawer-backdrop]').remove();\n    };\n    Drawer.prototype._getPlacementClasses = function(placement) {\n        switch(placement){\n            case 'top':\n                return {\n                    base: [\n                        'top-0',\n                        'left-0',\n                        'right-0'\n                    ],\n                    active: [\n                        'transform-none'\n                    ],\n                    inactive: [\n                        '-translate-y-full'\n                    ]\n                };\n            case 'right':\n                return {\n                    base: [\n                        'right-0',\n                        'top-0'\n                    ],\n                    active: [\n                        'transform-none'\n                    ],\n                    inactive: [\n                        'translate-x-full'\n                    ]\n                };\n            case 'bottom':\n                return {\n                    base: [\n                        'bottom-0',\n                        'left-0',\n                        'right-0'\n                    ],\n                    active: [\n                        'transform-none'\n                    ],\n                    inactive: [\n                        'translate-y-full'\n                    ]\n                };\n            case 'left':\n                return {\n                    base: [\n                        'left-0',\n                        'top-0'\n                    ],\n                    active: [\n                        'transform-none'\n                    ],\n                    inactive: [\n                        '-translate-x-full'\n                    ]\n                };\n            case 'bottom-edge':\n                return {\n                    base: [\n                        'left-0',\n                        'top-0'\n                    ],\n                    active: [\n                        'transform-none'\n                    ],\n                    inactive: [\n                        'translate-y-full',\n                        this._options.edgeOffset\n                    ]\n                };\n            default:\n                return {\n                    base: [\n                        'left-0',\n                        'top-0'\n                    ],\n                    active: [\n                        'transform-none'\n                    ],\n                    inactive: [\n                        '-translate-x-full'\n                    ]\n                };\n        }\n    };\n    Drawer.prototype.isHidden = function() {\n        return !this._visible;\n    };\n    Drawer.prototype.isVisible = function() {\n        return this._visible;\n    };\n    Drawer.prototype.addEventListenerInstance = function(element, type, handler) {\n        this._eventListenerInstances.push({\n            element: element,\n            type: type,\n            handler: handler\n        });\n    };\n    Drawer.prototype.removeAllEventListenerInstances = function() {\n        this._eventListenerInstances.map(function(eventListenerInstance) {\n            eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler);\n        });\n        this._eventListenerInstances = [];\n    };\n    Drawer.prototype.getAllEventListenerInstances = function() {\n        return this._eventListenerInstances;\n    };\n    Drawer.prototype.updateOnShow = function(callback) {\n        this._options.onShow = callback;\n    };\n    Drawer.prototype.updateOnHide = function(callback) {\n        this._options.onHide = callback;\n    };\n    Drawer.prototype.updateOnToggle = function(callback) {\n        this._options.onToggle = callback;\n    };\n    return Drawer;\n}();\nfunction $48c8331f22e653e8$export$319df2b10e87c8ec() {\n    document.querySelectorAll('[data-drawer-target]').forEach(function($triggerEl) {\n        // mandatory\n        var drawerId = $triggerEl.getAttribute('data-drawer-target');\n        var $drawerEl = document.getElementById(drawerId);\n        if ($drawerEl) {\n            var placement = $triggerEl.getAttribute('data-drawer-placement');\n            var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling');\n            var backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n            var edge = $triggerEl.getAttribute('data-drawer-edge');\n            var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset');\n            new $48c8331f22e653e8$var$Drawer($drawerEl, {\n                placement: placement ? placement : $48c8331f22e653e8$var$Default.placement,\n                bodyScrolling: bodyScrolling ? bodyScrolling === 'true' ? true : false : $48c8331f22e653e8$var$Default.bodyScrolling,\n                backdrop: backdrop ? backdrop === 'true' ? true : false : $48c8331f22e653e8$var$Default.backdrop,\n                edge: edge ? edge === 'true' ? true : false : $48c8331f22e653e8$var$Default.edge,\n                edgeOffset: edgeOffset ? edgeOffset : $48c8331f22e653e8$var$Default.edgeOffset\n            });\n        } else console.error(\"Drawer with id \".concat(drawerId, \" not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?\"));\n    });\n    document.querySelectorAll('[data-drawer-toggle]').forEach(function($triggerEl) {\n        var drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n        var $drawerEl = document.getElementById(drawerId);\n        if ($drawerEl) {\n            var drawer_1 = (0, $5d5682da381fac09$export$2e2bcd8739ae039).getInstance('Drawer', drawerId);\n            if (drawer_1) {\n                var toggleDrawer = function() {\n                    drawer_1.toggle();\n                };\n                $triggerEl.addEventListener('click', toggleDrawer);\n                drawer_1.addEventListenerInstance($triggerEl, 'click', toggleDrawer);\n            } else console.error(\"Drawer with id \".concat(drawerId, \" has not been initialized. Please initialize it using the data-drawer-target attribute.\"));\n        } else console.error(\"Drawer with id \".concat(drawerId, \" not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?\"));\n    });\n    document.querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]').forEach(function($triggerEl) {\n        var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') ? $triggerEl.getAttribute('data-drawer-dismiss') : $triggerEl.getAttribute('data-drawer-hide');\n        var $drawerEl = document.getElementById(drawerId);\n        if ($drawerEl) {\n            var drawer_2 = (0, $5d5682da381fac09$export$2e2bcd8739ae039).getInstance('Drawer', drawerId);\n            if (drawer_2) {\n                var hideDrawer = function() {\n                    drawer_2.hide();\n                };\n                $triggerEl.addEventListener('click', hideDrawer);\n                drawer_2.addEventListenerInstance($triggerEl, 'click', hideDrawer);\n            } else console.error(\"Drawer with id \".concat(drawerId, \" has not been initialized. Please initialize it using the data-drawer-target attribute.\"));\n        } else console.error(\"Drawer with id \".concat(drawerId, \" not found. Are you sure that the data-drawer-target attribute points to the correct drawer id\"));\n    });\n    document.querySelectorAll('[data-drawer-show]').forEach(function($triggerEl) {\n        var drawerId = $triggerEl.getAttribute('data-drawer-show');\n        var $drawerEl = document.getElementById(drawerId);\n        if ($drawerEl) {\n            var drawer_3 = (0, $5d5682da381fac09$export$2e2bcd8739ae039).getInstance('Drawer', drawerId);\n            if (drawer_3) {\n                var showDrawer = function() {\n                    drawer_3.show();\n                };\n                $triggerEl.addEventListener('click', showDrawer);\n                drawer_3.addEventListenerInstance($triggerEl, 'click', showDrawer);\n            } else console.error(\"Drawer with id \".concat(drawerId, \" has not been initialized. Please initialize it using the data-drawer-target attribute.\"));\n        } else console.error(\"Drawer with id \".concat(drawerId, \" not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?\"));\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Drawer = $48c8331f22e653e8$var$Drawer;\n    window.initDrawers = $48c8331f22e653e8$export$319df2b10e87c8ec;\n}\nvar $48c8331f22e653e8$export$2e2bcd8739ae039 = $48c8331f22e653e8$var$Drawer;\n\n\n\nvar $d9a3b96db6d5dbb4$var$__assign = undefined && undefined.__assign || function() {\n    $d9a3b96db6d5dbb4$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $d9a3b96db6d5dbb4$var$__assign.apply(this, arguments);\n};\nvar $d9a3b96db6d5dbb4$var$Default = {\n    defaultTabId: null,\n    activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n    inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n    onShow: function() {}\n};\nvar $d9a3b96db6d5dbb4$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $d9a3b96db6d5dbb4$var$Tabs = /** @class */ function() {\n    function Tabs(tabsEl, items, options, instanceOptions) {\n        if (tabsEl === void 0) tabsEl = null;\n        if (items === void 0) items = [];\n        if (options === void 0) options = $d9a3b96db6d5dbb4$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $d9a3b96db6d5dbb4$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id;\n        this._tabsEl = tabsEl;\n        this._items = items;\n        this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n        this._options = $d9a3b96db6d5dbb4$var$__assign($d9a3b96db6d5dbb4$var$__assign({}, $d9a3b96db6d5dbb4$var$Default), options);\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Tabs', this, this._instanceId, instanceOptions.override);\n    }\n    Tabs.prototype.init = function() {\n        var _this = this;\n        if (this._items.length && !this._initialized) {\n            // set the first tab as active if not set by explicitly\n            if (!this._activeTab) this.setActiveTab(this._items[0]);\n            // force show the first default tab\n            this.show(this._activeTab.id, true);\n            // show tab content based on click\n            this._items.map(function(tab) {\n                tab.triggerEl.addEventListener('click', function(event) {\n                    event.preventDefault();\n                    _this.show(tab.id);\n                });\n            });\n        }\n    };\n    Tabs.prototype.destroy = function() {\n        if (this._initialized) this._initialized = false;\n    };\n    Tabs.prototype.removeInstance = function() {\n        this.destroy();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Tabs', this._instanceId);\n    };\n    Tabs.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Tabs.prototype.getActiveTab = function() {\n        return this._activeTab;\n    };\n    Tabs.prototype.setActiveTab = function(tab) {\n        this._activeTab = tab;\n    };\n    Tabs.prototype.getTab = function(id) {\n        return this._items.filter(function(t) {\n            return t.id === id;\n        })[0];\n    };\n    Tabs.prototype.show = function(id, forceShow) {\n        var _a, _b;\n        var _this = this;\n        if (forceShow === void 0) forceShow = false;\n        var tab = this.getTab(id);\n        // don't do anything if already active\n        if (tab === this._activeTab && !forceShow) return;\n        // hide other tabs\n        this._items.map(function(t) {\n            var _a, _b;\n            if (t !== tab) {\n                (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' '));\n                (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' '));\n                t.targetEl.classList.add('hidden');\n                t.triggerEl.setAttribute('aria-selected', 'false');\n            }\n        });\n        // show active tab\n        (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' '));\n        (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' '));\n        tab.triggerEl.setAttribute('aria-selected', 'true');\n        tab.targetEl.classList.remove('hidden');\n        this.setActiveTab(tab);\n        // callback function\n        this._options.onShow(this, tab);\n    };\n    Tabs.prototype.updateOnShow = function(callback) {\n        this._options.onShow = callback;\n    };\n    return Tabs;\n}();\nfunction $d9a3b96db6d5dbb4$export$c92e8f569ad2976f() {\n    document.querySelectorAll('[data-tabs-toggle]').forEach(function($parentEl) {\n        var tabItems = [];\n        var activeClasses = $parentEl.getAttribute('data-tabs-active-classes');\n        var inactiveClasses = $parentEl.getAttribute('data-tabs-inactive-classes');\n        var defaultTabId = null;\n        $parentEl.querySelectorAll('[role=\"tab\"]').forEach(function($triggerEl) {\n            var isActive = $triggerEl.getAttribute('aria-selected') === 'true';\n            var tab = {\n                id: $triggerEl.getAttribute('data-tabs-target'),\n                triggerEl: $triggerEl,\n                targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target'))\n            };\n            tabItems.push(tab);\n            if (isActive) defaultTabId = tab.id;\n        });\n        new $d9a3b96db6d5dbb4$var$Tabs($parentEl, tabItems, {\n            defaultTabId: defaultTabId,\n            activeClasses: activeClasses ? activeClasses : $d9a3b96db6d5dbb4$var$Default.activeClasses,\n            inactiveClasses: inactiveClasses ? inactiveClasses : $d9a3b96db6d5dbb4$var$Default.inactiveClasses\n        });\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Tabs = $d9a3b96db6d5dbb4$var$Tabs;\n    window.initTabs = $d9a3b96db6d5dbb4$export$c92e8f569ad2976f;\n}\nvar $d9a3b96db6d5dbb4$export$2e2bcd8739ae039 = $d9a3b96db6d5dbb4$var$Tabs;\n\n\n\n\nvar $91c32ed640e0fec6$var$__assign = undefined && undefined.__assign || function() {\n    $91c32ed640e0fec6$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $91c32ed640e0fec6$var$__assign.apply(this, arguments);\n};\nvar $91c32ed640e0fec6$var$__spreadArray = undefined && undefined.__spreadArray || function(to, from, pack) {\n    if (pack || arguments.length === 2) {\n        for(var i = 0, l = from.length, ar; i < l; i++)if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar $91c32ed640e0fec6$var$Default = {\n    placement: 'top',\n    triggerType: 'hover',\n    onShow: function() {},\n    onHide: function() {},\n    onToggle: function() {}\n};\nvar $91c32ed640e0fec6$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $91c32ed640e0fec6$var$Tooltip = /** @class */ function() {\n    function Tooltip(targetEl, triggerEl, options, instanceOptions) {\n        if (targetEl === void 0) targetEl = null;\n        if (triggerEl === void 0) triggerEl = null;\n        if (options === void 0) options = $91c32ed640e0fec6$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $91c32ed640e0fec6$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = $91c32ed640e0fec6$var$__assign($91c32ed640e0fec6$var$__assign({}, $91c32ed640e0fec6$var$Default), options);\n        this._popperInstance = null;\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Tooltip', this, this._instanceId, instanceOptions.override);\n    }\n    Tooltip.prototype.init = function() {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._setupEventListeners();\n            this._popperInstance = this._createPopperInstance();\n            this._initialized = true;\n        }\n    };\n    Tooltip.prototype.destroy = function() {\n        var _this = this;\n        if (this._initialized) {\n            // remove event listeners associated with the trigger element\n            var triggerEvents = this._getTriggerEvents();\n            triggerEvents.showEvents.forEach(function(ev) {\n                _this._triggerEl.removeEventListener(ev, _this._showHandler);\n            });\n            triggerEvents.hideEvents.forEach(function(ev) {\n                _this._triggerEl.removeEventListener(ev, _this._hideHandler);\n            });\n            // remove event listeners for keydown\n            this._removeKeydownListener();\n            // remove event listeners for click outside\n            this._removeClickOutsideListener();\n            // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n            if (this._popperInstance) this._popperInstance.destroy();\n            this._initialized = false;\n        }\n    };\n    Tooltip.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Tooltip', this._instanceId);\n    };\n    Tooltip.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Tooltip.prototype._setupEventListeners = function() {\n        var _this = this;\n        var triggerEvents = this._getTriggerEvents();\n        this._showHandler = function() {\n            _this.show();\n        };\n        this._hideHandler = function() {\n            _this.hide();\n        };\n        triggerEvents.showEvents.forEach(function(ev) {\n            _this._triggerEl.addEventListener(ev, _this._showHandler);\n        });\n        triggerEvents.hideEvents.forEach(function(ev) {\n            _this._triggerEl.addEventListener(ev, _this._hideHandler);\n        });\n    };\n    Tooltip.prototype._createPopperInstance = function() {\n        return (0, $1bf0bf541303046d$export$8f7491d57c8f97a9)(this._triggerEl, this._targetEl, {\n            placement: this._options.placement,\n            modifiers: [\n                {\n                    name: 'offset',\n                    options: {\n                        offset: [\n                            0,\n                            8\n                        ]\n                    }\n                }\n            ]\n        });\n    };\n    Tooltip.prototype._getTriggerEvents = function() {\n        switch(this._options.triggerType){\n            case 'hover':\n                return {\n                    showEvents: [\n                        'mouseenter',\n                        'focus'\n                    ],\n                    hideEvents: [\n                        'mouseleave',\n                        'blur'\n                    ]\n                };\n            case 'click':\n                return {\n                    showEvents: [\n                        'click',\n                        'focus'\n                    ],\n                    hideEvents: [\n                        'focusout',\n                        'blur'\n                    ]\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: []\n                };\n            default:\n                return {\n                    showEvents: [\n                        'mouseenter',\n                        'focus'\n                    ],\n                    hideEvents: [\n                        'mouseleave',\n                        'blur'\n                    ]\n                };\n        }\n    };\n    Tooltip.prototype._setupKeydownListener = function() {\n        var _this = this;\n        this._keydownEventListener = function(ev) {\n            if (ev.key === 'Escape') _this.hide();\n        };\n        document.body.addEventListener('keydown', this._keydownEventListener, true);\n    };\n    Tooltip.prototype._removeKeydownListener = function() {\n        document.body.removeEventListener('keydown', this._keydownEventListener, true);\n    };\n    Tooltip.prototype._setupClickOutsideListener = function() {\n        var _this = this;\n        this._clickOutsideEventListener = function(ev) {\n            _this._handleClickOutside(ev, _this._targetEl);\n        };\n        document.body.addEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Tooltip.prototype._removeClickOutsideListener = function() {\n        document.body.removeEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Tooltip.prototype._handleClickOutside = function(ev, targetEl) {\n        var clickedEl = ev.target;\n        if (clickedEl !== targetEl && !targetEl.contains(clickedEl) && !this._triggerEl.contains(clickedEl) && this.isVisible()) this.hide();\n    };\n    Tooltip.prototype.isVisible = function() {\n        return this._visible;\n    };\n    Tooltip.prototype.toggle = function() {\n        if (this.isVisible()) this.hide();\n        else this.show();\n    };\n    Tooltip.prototype.show = function() {\n        this._targetEl.classList.remove('opacity-0', 'invisible');\n        this._targetEl.classList.add('opacity-100', 'visible');\n        // Enable the event listeners\n        this._popperInstance.setOptions(function(options) {\n            return $91c32ed640e0fec6$var$__assign($91c32ed640e0fec6$var$__assign({}, options), {\n                modifiers: $91c32ed640e0fec6$var$__spreadArray($91c32ed640e0fec6$var$__spreadArray([], options.modifiers, true), [\n                    {\n                        name: 'eventListeners',\n                        enabled: true\n                    }\n                ], false)\n            });\n        });\n        // handle click outside\n        this._setupClickOutsideListener();\n        // handle esc keydown\n        this._setupKeydownListener();\n        // Update its position\n        this._popperInstance.update();\n        // set visibility\n        this._visible = true;\n        // callback function\n        this._options.onShow(this);\n    };\n    Tooltip.prototype.hide = function() {\n        this._targetEl.classList.remove('opacity-100', 'visible');\n        this._targetEl.classList.add('opacity-0', 'invisible');\n        // Disable the event listeners\n        this._popperInstance.setOptions(function(options) {\n            return $91c32ed640e0fec6$var$__assign($91c32ed640e0fec6$var$__assign({}, options), {\n                modifiers: $91c32ed640e0fec6$var$__spreadArray($91c32ed640e0fec6$var$__spreadArray([], options.modifiers, true), [\n                    {\n                        name: 'eventListeners',\n                        enabled: false\n                    }\n                ], false)\n            });\n        });\n        // handle click outside\n        this._removeClickOutsideListener();\n        // handle esc keydown\n        this._removeKeydownListener();\n        // set visibility\n        this._visible = false;\n        // callback function\n        this._options.onHide(this);\n    };\n    Tooltip.prototype.updateOnShow = function(callback) {\n        this._options.onShow = callback;\n    };\n    Tooltip.prototype.updateOnHide = function(callback) {\n        this._options.onHide = callback;\n    };\n    Tooltip.prototype.updateOnToggle = function(callback) {\n        this._options.onToggle = callback;\n    };\n    return Tooltip;\n}();\nfunction $91c32ed640e0fec6$export$8f2a38c1f9d9dc3e() {\n    document.querySelectorAll('[data-tooltip-target]').forEach(function($triggerEl) {\n        var tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n        var $tooltipEl = document.getElementById(tooltipId);\n        if ($tooltipEl) {\n            var triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n            var placement = $triggerEl.getAttribute('data-tooltip-placement');\n            new $91c32ed640e0fec6$var$Tooltip($tooltipEl, $triggerEl, {\n                placement: placement ? placement : $91c32ed640e0fec6$var$Default.placement,\n                triggerType: triggerType ? triggerType : $91c32ed640e0fec6$var$Default.triggerType\n            });\n        } else console.error(\"The tooltip element with id \\\"\".concat(tooltipId, \"\\\" does not exist. Please check the data-tooltip-target attribute.\"));\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Tooltip = $91c32ed640e0fec6$var$Tooltip;\n    window.initTooltips = $91c32ed640e0fec6$export$8f2a38c1f9d9dc3e;\n}\nvar $91c32ed640e0fec6$export$2e2bcd8739ae039 = $91c32ed640e0fec6$var$Tooltip;\n\n\n\n\nvar $6aca18f5cd7d8b7b$var$__assign = undefined && undefined.__assign || function() {\n    $6aca18f5cd7d8b7b$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $6aca18f5cd7d8b7b$var$__assign.apply(this, arguments);\n};\nvar $6aca18f5cd7d8b7b$var$__spreadArray = undefined && undefined.__spreadArray || function(to, from, pack) {\n    if (pack || arguments.length === 2) {\n        for(var i = 0, l = from.length, ar; i < l; i++)if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar $6aca18f5cd7d8b7b$var$Default = {\n    placement: 'top',\n    offset: 10,\n    triggerType: 'hover',\n    onShow: function() {},\n    onHide: function() {},\n    onToggle: function() {}\n};\nvar $6aca18f5cd7d8b7b$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $6aca18f5cd7d8b7b$var$Popover = /** @class */ function() {\n    function Popover(targetEl, triggerEl, options, instanceOptions) {\n        if (targetEl === void 0) targetEl = null;\n        if (triggerEl === void 0) triggerEl = null;\n        if (options === void 0) options = $6aca18f5cd7d8b7b$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $6aca18f5cd7d8b7b$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = $6aca18f5cd7d8b7b$var$__assign($6aca18f5cd7d8b7b$var$__assign({}, $6aca18f5cd7d8b7b$var$Default), options);\n        this._popperInstance = null;\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Popover', this, instanceOptions.id ? instanceOptions.id : this._targetEl.id, instanceOptions.override);\n    }\n    Popover.prototype.init = function() {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._setupEventListeners();\n            this._popperInstance = this._createPopperInstance();\n            this._initialized = true;\n        }\n    };\n    Popover.prototype.destroy = function() {\n        var _this = this;\n        if (this._initialized) {\n            // remove event listeners associated with the trigger element and target element\n            var triggerEvents = this._getTriggerEvents();\n            triggerEvents.showEvents.forEach(function(ev) {\n                _this._triggerEl.removeEventListener(ev, _this._showHandler);\n                _this._targetEl.removeEventListener(ev, _this._showHandler);\n            });\n            triggerEvents.hideEvents.forEach(function(ev) {\n                _this._triggerEl.removeEventListener(ev, _this._hideHandler);\n                _this._targetEl.removeEventListener(ev, _this._hideHandler);\n            });\n            // remove event listeners for keydown\n            this._removeKeydownListener();\n            // remove event listeners for click outside\n            this._removeClickOutsideListener();\n            // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n            if (this._popperInstance) this._popperInstance.destroy();\n            this._initialized = false;\n        }\n    };\n    Popover.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Popover', this._instanceId);\n    };\n    Popover.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Popover.prototype._setupEventListeners = function() {\n        var _this = this;\n        var triggerEvents = this._getTriggerEvents();\n        this._showHandler = function() {\n            _this.show();\n        };\n        this._hideHandler = function() {\n            setTimeout(function() {\n                if (!_this._targetEl.matches(':hover')) _this.hide();\n            }, 100);\n        };\n        triggerEvents.showEvents.forEach(function(ev) {\n            _this._triggerEl.addEventListener(ev, _this._showHandler);\n            _this._targetEl.addEventListener(ev, _this._showHandler);\n        });\n        triggerEvents.hideEvents.forEach(function(ev) {\n            _this._triggerEl.addEventListener(ev, _this._hideHandler);\n            _this._targetEl.addEventListener(ev, _this._hideHandler);\n        });\n    };\n    Popover.prototype._createPopperInstance = function() {\n        return (0, $1bf0bf541303046d$export$8f7491d57c8f97a9)(this._triggerEl, this._targetEl, {\n            placement: this._options.placement,\n            modifiers: [\n                {\n                    name: 'offset',\n                    options: {\n                        offset: [\n                            0,\n                            this._options.offset\n                        ]\n                    }\n                }\n            ]\n        });\n    };\n    Popover.prototype._getTriggerEvents = function() {\n        switch(this._options.triggerType){\n            case 'hover':\n                return {\n                    showEvents: [\n                        'mouseenter',\n                        'focus'\n                    ],\n                    hideEvents: [\n                        'mouseleave',\n                        'blur'\n                    ]\n                };\n            case 'click':\n                return {\n                    showEvents: [\n                        'click',\n                        'focus'\n                    ],\n                    hideEvents: [\n                        'focusout',\n                        'blur'\n                    ]\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: []\n                };\n            default:\n                return {\n                    showEvents: [\n                        'mouseenter',\n                        'focus'\n                    ],\n                    hideEvents: [\n                        'mouseleave',\n                        'blur'\n                    ]\n                };\n        }\n    };\n    Popover.prototype._setupKeydownListener = function() {\n        var _this = this;\n        this._keydownEventListener = function(ev) {\n            if (ev.key === 'Escape') _this.hide();\n        };\n        document.body.addEventListener('keydown', this._keydownEventListener, true);\n    };\n    Popover.prototype._removeKeydownListener = function() {\n        document.body.removeEventListener('keydown', this._keydownEventListener, true);\n    };\n    Popover.prototype._setupClickOutsideListener = function() {\n        var _this = this;\n        this._clickOutsideEventListener = function(ev) {\n            _this._handleClickOutside(ev, _this._targetEl);\n        };\n        document.body.addEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Popover.prototype._removeClickOutsideListener = function() {\n        document.body.removeEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Popover.prototype._handleClickOutside = function(ev, targetEl) {\n        var clickedEl = ev.target;\n        if (clickedEl !== targetEl && !targetEl.contains(clickedEl) && !this._triggerEl.contains(clickedEl) && this.isVisible()) this.hide();\n    };\n    Popover.prototype.isVisible = function() {\n        return this._visible;\n    };\n    Popover.prototype.toggle = function() {\n        if (this.isVisible()) this.hide();\n        else this.show();\n        this._options.onToggle(this);\n    };\n    Popover.prototype.show = function() {\n        this._targetEl.classList.remove('opacity-0', 'invisible');\n        this._targetEl.classList.add('opacity-100', 'visible');\n        // Enable the event listeners\n        this._popperInstance.setOptions(function(options) {\n            return $6aca18f5cd7d8b7b$var$__assign($6aca18f5cd7d8b7b$var$__assign({}, options), {\n                modifiers: $6aca18f5cd7d8b7b$var$__spreadArray($6aca18f5cd7d8b7b$var$__spreadArray([], options.modifiers, true), [\n                    {\n                        name: 'eventListeners',\n                        enabled: true\n                    }\n                ], false)\n            });\n        });\n        // handle click outside\n        this._setupClickOutsideListener();\n        // handle esc keydown\n        this._setupKeydownListener();\n        // Update its position\n        this._popperInstance.update();\n        // set visibility to true\n        this._visible = true;\n        // callback function\n        this._options.onShow(this);\n    };\n    Popover.prototype.hide = function() {\n        this._targetEl.classList.remove('opacity-100', 'visible');\n        this._targetEl.classList.add('opacity-0', 'invisible');\n        // Disable the event listeners\n        this._popperInstance.setOptions(function(options) {\n            return $6aca18f5cd7d8b7b$var$__assign($6aca18f5cd7d8b7b$var$__assign({}, options), {\n                modifiers: $6aca18f5cd7d8b7b$var$__spreadArray($6aca18f5cd7d8b7b$var$__spreadArray([], options.modifiers, true), [\n                    {\n                        name: 'eventListeners',\n                        enabled: false\n                    }\n                ], false)\n            });\n        });\n        // handle click outside\n        this._removeClickOutsideListener();\n        // handle esc keydown\n        this._removeKeydownListener();\n        // set visibility to false\n        this._visible = false;\n        // callback function\n        this._options.onHide(this);\n    };\n    Popover.prototype.updateOnShow = function(callback) {\n        this._options.onShow = callback;\n    };\n    Popover.prototype.updateOnHide = function(callback) {\n        this._options.onHide = callback;\n    };\n    Popover.prototype.updateOnToggle = function(callback) {\n        this._options.onToggle = callback;\n    };\n    return Popover;\n}();\nfunction $6aca18f5cd7d8b7b$export$200409e83b2a0dd4() {\n    document.querySelectorAll('[data-popover-target]').forEach(function($triggerEl) {\n        var popoverID = $triggerEl.getAttribute('data-popover-target');\n        var $popoverEl = document.getElementById(popoverID);\n        if ($popoverEl) {\n            var triggerType = $triggerEl.getAttribute('data-popover-trigger');\n            var placement = $triggerEl.getAttribute('data-popover-placement');\n            var offset = $triggerEl.getAttribute('data-popover-offset');\n            new $6aca18f5cd7d8b7b$var$Popover($popoverEl, $triggerEl, {\n                placement: placement ? placement : $6aca18f5cd7d8b7b$var$Default.placement,\n                offset: offset ? parseInt(offset) : $6aca18f5cd7d8b7b$var$Default.offset,\n                triggerType: triggerType ? triggerType : $6aca18f5cd7d8b7b$var$Default.triggerType\n            });\n        } else console.error(\"The popover element with id \\\"\".concat(popoverID, \"\\\" does not exist. Please check the data-popover-target attribute.\"));\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Popover = $6aca18f5cd7d8b7b$var$Popover;\n    window.initPopovers = $6aca18f5cd7d8b7b$export$200409e83b2a0dd4;\n}\nvar $6aca18f5cd7d8b7b$export$2e2bcd8739ae039 = $6aca18f5cd7d8b7b$var$Popover;\n\n\n\nvar $027785b5e7762569$var$__assign = undefined && undefined.__assign || function() {\n    $027785b5e7762569$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $027785b5e7762569$var$__assign.apply(this, arguments);\n};\nvar $027785b5e7762569$var$Default = {\n    triggerType: 'hover',\n    onShow: function() {},\n    onHide: function() {},\n    onToggle: function() {}\n};\nvar $027785b5e7762569$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $027785b5e7762569$var$Dial = /** @class */ function() {\n    function Dial(parentEl, triggerEl, targetEl, options, instanceOptions) {\n        if (parentEl === void 0) parentEl = null;\n        if (triggerEl === void 0) triggerEl = null;\n        if (targetEl === void 0) targetEl = null;\n        if (options === void 0) options = $027785b5e7762569$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $027785b5e7762569$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : targetEl.id;\n        this._parentEl = parentEl;\n        this._triggerEl = triggerEl;\n        this._targetEl = targetEl;\n        this._options = $027785b5e7762569$var$__assign($027785b5e7762569$var$__assign({}, $027785b5e7762569$var$Default), options);\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Dial', this, this._instanceId, instanceOptions.override);\n    }\n    Dial.prototype.init = function() {\n        var _this = this;\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType);\n            this._showEventHandler = function() {\n                _this.show();\n            };\n            triggerEventTypes.showEvents.forEach(function(ev) {\n                _this._triggerEl.addEventListener(ev, _this._showEventHandler);\n                _this._targetEl.addEventListener(ev, _this._showEventHandler);\n            });\n            this._hideEventHandler = function() {\n                if (!_this._parentEl.matches(':hover')) _this.hide();\n            };\n            triggerEventTypes.hideEvents.forEach(function(ev) {\n                _this._parentEl.addEventListener(ev, _this._hideEventHandler);\n            });\n            this._initialized = true;\n        }\n    };\n    Dial.prototype.destroy = function() {\n        var _this = this;\n        if (this._initialized) {\n            var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType);\n            triggerEventTypes.showEvents.forEach(function(ev) {\n                _this._triggerEl.removeEventListener(ev, _this._showEventHandler);\n                _this._targetEl.removeEventListener(ev, _this._showEventHandler);\n            });\n            triggerEventTypes.hideEvents.forEach(function(ev) {\n                _this._parentEl.removeEventListener(ev, _this._hideEventHandler);\n            });\n            this._initialized = false;\n        }\n    };\n    Dial.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Dial', this._instanceId);\n    };\n    Dial.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Dial.prototype.hide = function() {\n        this._targetEl.classList.add('hidden');\n        if (this._triggerEl) this._triggerEl.setAttribute('aria-expanded', 'false');\n        this._visible = false;\n        // callback function\n        this._options.onHide(this);\n    };\n    Dial.prototype.show = function() {\n        this._targetEl.classList.remove('hidden');\n        if (this._triggerEl) this._triggerEl.setAttribute('aria-expanded', 'true');\n        this._visible = true;\n        // callback function\n        this._options.onShow(this);\n    };\n    Dial.prototype.toggle = function() {\n        if (this._visible) this.hide();\n        else this.show();\n    };\n    Dial.prototype.isHidden = function() {\n        return !this._visible;\n    };\n    Dial.prototype.isVisible = function() {\n        return this._visible;\n    };\n    Dial.prototype._getTriggerEventTypes = function(triggerType) {\n        switch(triggerType){\n            case 'hover':\n                return {\n                    showEvents: [\n                        'mouseenter',\n                        'focus'\n                    ],\n                    hideEvents: [\n                        'mouseleave',\n                        'blur'\n                    ]\n                };\n            case 'click':\n                return {\n                    showEvents: [\n                        'click',\n                        'focus'\n                    ],\n                    hideEvents: [\n                        'focusout',\n                        'blur'\n                    ]\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: []\n                };\n            default:\n                return {\n                    showEvents: [\n                        'mouseenter',\n                        'focus'\n                    ],\n                    hideEvents: [\n                        'mouseleave',\n                        'blur'\n                    ]\n                };\n        }\n    };\n    Dial.prototype.updateOnShow = function(callback) {\n        this._options.onShow = callback;\n    };\n    Dial.prototype.updateOnHide = function(callback) {\n        this._options.onHide = callback;\n    };\n    Dial.prototype.updateOnToggle = function(callback) {\n        this._options.onToggle = callback;\n    };\n    return Dial;\n}();\nfunction $027785b5e7762569$export$33aa68e0bfaa065d() {\n    document.querySelectorAll('[data-dial-init]').forEach(function($parentEl) {\n        var $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n        if ($triggerEl) {\n            var dialId = $triggerEl.getAttribute('data-dial-toggle');\n            var $dialEl = document.getElementById(dialId);\n            if ($dialEl) {\n                var triggerType = $triggerEl.getAttribute('data-dial-trigger');\n                new $027785b5e7762569$var$Dial($parentEl, $triggerEl, $dialEl, {\n                    triggerType: triggerType ? triggerType : $027785b5e7762569$var$Default.triggerType\n                });\n            } else console.error(\"Dial with id \".concat(dialId, \" does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?\"));\n        } else console.error(\"Dial with id \".concat($parentEl.id, \" does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?\"));\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Dial = $027785b5e7762569$var$Dial;\n    window.initDials = $027785b5e7762569$export$33aa68e0bfaa065d;\n}\nvar $027785b5e7762569$export$2e2bcd8739ae039 = $027785b5e7762569$var$Dial;\n\n\n\nvar $5252bf9f038f0bda$var$__assign = undefined && undefined.__assign || function() {\n    $5252bf9f038f0bda$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $5252bf9f038f0bda$var$__assign.apply(this, arguments);\n};\nvar $5252bf9f038f0bda$var$Default = {\n    minValue: null,\n    maxValue: null,\n    onIncrement: function() {},\n    onDecrement: function() {}\n};\nvar $5252bf9f038f0bda$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $5252bf9f038f0bda$var$InputCounter = /** @class */ function() {\n    function InputCounter(targetEl, incrementEl, decrementEl, options, instanceOptions) {\n        if (targetEl === void 0) targetEl = null;\n        if (incrementEl === void 0) incrementEl = null;\n        if (decrementEl === void 0) decrementEl = null;\n        if (options === void 0) options = $5252bf9f038f0bda$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $5252bf9f038f0bda$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : targetEl.id;\n        this._targetEl = targetEl;\n        this._incrementEl = incrementEl;\n        this._decrementEl = decrementEl;\n        this._options = $5252bf9f038f0bda$var$__assign($5252bf9f038f0bda$var$__assign({}, $5252bf9f038f0bda$var$Default), options);\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('InputCounter', this, this._instanceId, instanceOptions.override);\n    }\n    InputCounter.prototype.init = function() {\n        var _this = this;\n        if (this._targetEl && !this._initialized) {\n            this._inputHandler = function(event) {\n                var target = event.target;\n                // check if the value is numeric\n                if (!/^\\d*$/.test(target.value)) // Regex to check if the value is numeric\n                target.value = target.value.replace(/[^\\d]/g, ''); // Remove non-numeric characters\n                // check for max value\n                if (_this._options.maxValue !== null && parseInt(target.value) > _this._options.maxValue) target.value = _this._options.maxValue.toString();\n                // check for min value\n                if (_this._options.minValue !== null && parseInt(target.value) < _this._options.minValue) target.value = _this._options.minValue.toString();\n            };\n            this._incrementClickHandler = function() {\n                _this.increment();\n            };\n            this._decrementClickHandler = function() {\n                _this.decrement();\n            };\n            // Add event listener to restrict input to numeric values only\n            this._targetEl.addEventListener('input', this._inputHandler);\n            if (this._incrementEl) this._incrementEl.addEventListener('click', this._incrementClickHandler);\n            if (this._decrementEl) this._decrementEl.addEventListener('click', this._decrementClickHandler);\n            this._initialized = true;\n        }\n    };\n    InputCounter.prototype.destroy = function() {\n        if (this._targetEl && this._initialized) {\n            this._targetEl.removeEventListener('input', this._inputHandler);\n            if (this._incrementEl) this._incrementEl.removeEventListener('click', this._incrementClickHandler);\n            if (this._decrementEl) this._decrementEl.removeEventListener('click', this._decrementClickHandler);\n            this._initialized = false;\n        }\n    };\n    InputCounter.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('InputCounter', this._instanceId);\n    };\n    InputCounter.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    InputCounter.prototype.getCurrentValue = function() {\n        return parseInt(this._targetEl.value) || 0;\n    };\n    InputCounter.prototype.increment = function() {\n        // don't increment if the value is already at the maximum value\n        if (this._options.maxValue !== null && this.getCurrentValue() >= this._options.maxValue) return;\n        this._targetEl.value = (this.getCurrentValue() + 1).toString();\n        this._options.onIncrement(this);\n    };\n    InputCounter.prototype.decrement = function() {\n        // don't decrement if the value is already at the minimum value\n        if (this._options.minValue !== null && this.getCurrentValue() <= this._options.minValue) return;\n        this._targetEl.value = (this.getCurrentValue() - 1).toString();\n        this._options.onDecrement(this);\n    };\n    InputCounter.prototype.updateOnIncrement = function(callback) {\n        this._options.onIncrement = callback;\n    };\n    InputCounter.prototype.updateOnDecrement = function(callback) {\n        this._options.onDecrement = callback;\n    };\n    return InputCounter;\n}();\nfunction $5252bf9f038f0bda$export$4352dd3b7a1676ab() {\n    document.querySelectorAll('[data-input-counter]').forEach(function($targetEl) {\n        var targetId = $targetEl.id;\n        var $incrementEl = document.querySelector('[data-input-counter-increment=\"' + targetId + '\"]');\n        var $decrementEl = document.querySelector('[data-input-counter-decrement=\"' + targetId + '\"]');\n        var minValue = $targetEl.getAttribute('data-input-counter-min');\n        var maxValue = $targetEl.getAttribute('data-input-counter-max');\n        // check if the target element exists\n        if ($targetEl) {\n            if (!(0, $5d5682da381fac09$export$2e2bcd8739ae039).instanceExists('InputCounter', $targetEl.getAttribute('id'))) new $5252bf9f038f0bda$var$InputCounter($targetEl, $incrementEl ? $incrementEl : null, $decrementEl ? $decrementEl : null, {\n                minValue: minValue ? parseInt(minValue) : null,\n                maxValue: maxValue ? parseInt(maxValue) : null\n            });\n        } else console.error(\"The target element with id \\\"\".concat(targetId, \"\\\" does not exist. Please check the data-input-counter attribute.\"));\n    });\n}\nif (typeof window !== 'undefined') {\n    window.InputCounter = $5252bf9f038f0bda$var$InputCounter;\n    window.initInputCounters = $5252bf9f038f0bda$export$4352dd3b7a1676ab;\n}\nvar $5252bf9f038f0bda$export$2e2bcd8739ae039 = $5252bf9f038f0bda$var$InputCounter;\n\n\n\nvar $d10e6c36a2232fe1$var$__assign = undefined && undefined.__assign || function() {\n    $d10e6c36a2232fe1$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $d10e6c36a2232fe1$var$__assign.apply(this, arguments);\n};\nvar $d10e6c36a2232fe1$var$Default = {\n    htmlEntities: false,\n    contentType: 'input',\n    onCopy: function() {}\n};\nvar $d10e6c36a2232fe1$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $d10e6c36a2232fe1$var$CopyClipboard = /** @class */ function() {\n    function CopyClipboard(triggerEl, targetEl, options, instanceOptions) {\n        if (triggerEl === void 0) triggerEl = null;\n        if (targetEl === void 0) targetEl = null;\n        if (options === void 0) options = $d10e6c36a2232fe1$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $d10e6c36a2232fe1$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : targetEl.id;\n        this._triggerEl = triggerEl;\n        this._targetEl = targetEl;\n        this._options = $d10e6c36a2232fe1$var$__assign($d10e6c36a2232fe1$var$__assign({}, $d10e6c36a2232fe1$var$Default), options);\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('CopyClipboard', this, this._instanceId, instanceOptions.override);\n    }\n    CopyClipboard.prototype.init = function() {\n        var _this = this;\n        if (this._targetEl && this._triggerEl && !this._initialized) {\n            this._triggerElClickHandler = function() {\n                _this.copy();\n            };\n            // clicking on the trigger element should copy the value of the target element\n            if (this._triggerEl) this._triggerEl.addEventListener('click', this._triggerElClickHandler);\n            this._initialized = true;\n        }\n    };\n    CopyClipboard.prototype.destroy = function() {\n        if (this._triggerEl && this._targetEl && this._initialized) {\n            if (this._triggerEl) this._triggerEl.removeEventListener('click', this._triggerElClickHandler);\n            this._initialized = false;\n        }\n    };\n    CopyClipboard.prototype.removeInstance = function() {\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('CopyClipboard', this._instanceId);\n    };\n    CopyClipboard.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    CopyClipboard.prototype.getTargetValue = function() {\n        if (this._options.contentType === 'input') return this._targetEl.value;\n        if (this._options.contentType === 'innerHTML') return this._targetEl.innerHTML;\n        if (this._options.contentType === 'textContent') return this._targetEl.textContent.replace(/\\s+/g, ' ').trim();\n    };\n    CopyClipboard.prototype.copy = function() {\n        var textToCopy = this.getTargetValue();\n        // Check if HTMLEntities option is enabled\n        if (this._options.htmlEntities) // Encode the text using HTML entities\n        textToCopy = this.decodeHTML(textToCopy);\n        // Create a temporary textarea element\n        var tempTextArea = document.createElement('textarea');\n        tempTextArea.value = textToCopy;\n        document.body.appendChild(tempTextArea);\n        // Select the text inside the textarea and copy it to the clipboard\n        tempTextArea.select();\n        document.execCommand('copy');\n        // Remove the temporary textarea\n        document.body.removeChild(tempTextArea);\n        // Callback function\n        this._options.onCopy(this);\n        return textToCopy;\n    };\n    // Function to encode text into HTML entities\n    CopyClipboard.prototype.decodeHTML = function(html) {\n        var textarea = document.createElement('textarea');\n        textarea.innerHTML = html;\n        return textarea.textContent;\n    };\n    CopyClipboard.prototype.updateOnCopyCallback = function(callback) {\n        this._options.onCopy = callback;\n    };\n    return CopyClipboard;\n}();\nfunction $d10e6c36a2232fe1$export$ad4117886fd6cf74() {\n    document.querySelectorAll('[data-copy-to-clipboard-target]').forEach(function($triggerEl) {\n        var targetId = $triggerEl.getAttribute('data-copy-to-clipboard-target');\n        var $targetEl = document.getElementById(targetId);\n        var contentType = $triggerEl.getAttribute('data-copy-to-clipboard-content-type');\n        var htmlEntities = $triggerEl.getAttribute('data-copy-to-clipboard-html-entities');\n        // check if the target element exists\n        if ($targetEl) {\n            if (!(0, $5d5682da381fac09$export$2e2bcd8739ae039).instanceExists('CopyClipboard', $targetEl.getAttribute('id'))) new $d10e6c36a2232fe1$var$CopyClipboard($triggerEl, $targetEl, {\n                htmlEntities: htmlEntities && htmlEntities === 'true' ? true : $d10e6c36a2232fe1$var$Default.htmlEntities,\n                contentType: contentType ? contentType : $d10e6c36a2232fe1$var$Default.contentType\n            });\n        } else console.error(\"The target element with id \\\"\".concat(targetId, \"\\\" does not exist. Please check the data-copy-to-clipboard-target attribute.\"));\n    });\n}\nif (typeof window !== 'undefined') {\n    window.CopyClipboard = $d10e6c36a2232fe1$var$CopyClipboard;\n    window.initClipboards = $d10e6c36a2232fe1$export$ad4117886fd6cf74;\n}\nvar $d10e6c36a2232fe1$export$2e2bcd8739ae039 = $d10e6c36a2232fe1$var$CopyClipboard;\n\n\n\nfunction $7c39ee59de2954f9$var$_arrayLikeToArray(r, a) {\n    (null == a || a > r.length) && (a = r.length);\n    for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];\n    return n;\n}\nfunction $7c39ee59de2954f9$var$_arrayWithHoles(r) {\n    if (Array.isArray(r)) return r;\n}\nfunction $7c39ee59de2954f9$var$_arrayWithoutHoles(r) {\n    if (Array.isArray(r)) return $7c39ee59de2954f9$var$_arrayLikeToArray(r);\n}\nfunction $7c39ee59de2954f9$var$_assertThisInitialized(e) {\n    if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n    return e;\n}\nfunction $7c39ee59de2954f9$var$_callSuper(t, o, e) {\n    return o = $7c39ee59de2954f9$var$_getPrototypeOf(o), $7c39ee59de2954f9$var$_possibleConstructorReturn(t, $7c39ee59de2954f9$var$_isNativeReflectConstruct() ? Reflect.construct(o, e || [], $7c39ee59de2954f9$var$_getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nfunction $7c39ee59de2954f9$var$_classCallCheck(a, n) {\n    if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction $7c39ee59de2954f9$var$_defineProperties(e, r) {\n    for(var t = 0; t < r.length; t++){\n        var o = r[t];\n        o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, $7c39ee59de2954f9$var$_toPropertyKey(o.key), o);\n    }\n}\nfunction $7c39ee59de2954f9$var$_createClass(e, r, t) {\n    return r && $7c39ee59de2954f9$var$_defineProperties(e.prototype, r), t && $7c39ee59de2954f9$var$_defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n        writable: !1\n    }), e;\n}\nfunction $7c39ee59de2954f9$var$_get() {\n    return $7c39ee59de2954f9$var$_get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e, t, r) {\n        var p = $7c39ee59de2954f9$var$_superPropBase(e, t);\n        if (p) {\n            var n = Object.getOwnPropertyDescriptor(p, t);\n            return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n        }\n    }, $7c39ee59de2954f9$var$_get.apply(null, arguments);\n}\nfunction $7c39ee59de2954f9$var$_getPrototypeOf(t) {\n    return $7c39ee59de2954f9$var$_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {\n        return t.__proto__ || Object.getPrototypeOf(t);\n    }, $7c39ee59de2954f9$var$_getPrototypeOf(t);\n}\nfunction $7c39ee59de2954f9$var$_inherits(t, e) {\n    if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n    t.prototype = Object.create(e && e.prototype, {\n        constructor: {\n            value: t,\n            writable: !0,\n            configurable: !0\n        }\n    }), Object.defineProperty(t, \"prototype\", {\n        writable: !1\n    }), e && $7c39ee59de2954f9$var$_setPrototypeOf(t, e);\n}\nfunction $7c39ee59de2954f9$var$_isNativeReflectConstruct() {\n    try {\n        var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));\n    } catch (t) {}\n    return ($7c39ee59de2954f9$var$_isNativeReflectConstruct = function() {\n        return !!t;\n    })();\n}\nfunction $7c39ee59de2954f9$var$_iterableToArray(r) {\n    if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction $7c39ee59de2954f9$var$_iterableToArrayLimit(r, l) {\n    var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n    if (null != t) {\n        var e, n, i, u, a = [], f = !0, o = !1;\n        try {\n            if (i = (t = t.call(r)).next, 0 === l) {\n                if (Object(t) !== t) return;\n                f = !1;\n            } else for(; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n        } catch (r) {\n            o = !0, n = r;\n        } finally{\n            try {\n                if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n            } finally{\n                if (o) throw n;\n            }\n        }\n        return a;\n    }\n}\nfunction $7c39ee59de2954f9$var$_nonIterableRest() {\n    throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction $7c39ee59de2954f9$var$_nonIterableSpread() {\n    throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction $7c39ee59de2954f9$var$_possibleConstructorReturn(t, e) {\n    if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n    if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n    return $7c39ee59de2954f9$var$_assertThisInitialized(t);\n}\nfunction $7c39ee59de2954f9$var$_setPrototypeOf(t, e) {\n    return $7c39ee59de2954f9$var$_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {\n        return t.__proto__ = e, t;\n    }, $7c39ee59de2954f9$var$_setPrototypeOf(t, e);\n}\nfunction $7c39ee59de2954f9$var$_slicedToArray(r, e) {\n    return $7c39ee59de2954f9$var$_arrayWithHoles(r) || $7c39ee59de2954f9$var$_iterableToArrayLimit(r, e) || $7c39ee59de2954f9$var$_unsupportedIterableToArray(r, e) || $7c39ee59de2954f9$var$_nonIterableRest();\n}\nfunction $7c39ee59de2954f9$var$_superPropBase(t, o) {\n    for(; !({}).hasOwnProperty.call(t, o) && null !== (t = $7c39ee59de2954f9$var$_getPrototypeOf(t)););\n    return t;\n}\nfunction $7c39ee59de2954f9$var$_toConsumableArray(r) {\n    return $7c39ee59de2954f9$var$_arrayWithoutHoles(r) || $7c39ee59de2954f9$var$_iterableToArray(r) || $7c39ee59de2954f9$var$_unsupportedIterableToArray(r) || $7c39ee59de2954f9$var$_nonIterableSpread();\n}\nfunction $7c39ee59de2954f9$var$_toPrimitive(t, r) {\n    if (\"object\" != typeof t || !t) return t;\n    var e = t[Symbol.toPrimitive];\n    if (void 0 !== e) {\n        var i = e.call(t, r || \"default\");\n        if (\"object\" != typeof i) return i;\n        throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n    }\n    return (\"string\" === r ? String : Number)(t);\n}\nfunction $7c39ee59de2954f9$var$_toPropertyKey(t) {\n    var i = $7c39ee59de2954f9$var$_toPrimitive(t, \"string\");\n    return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction $7c39ee59de2954f9$var$_typeof(o) {\n    \"@babel/helpers - typeof\";\n    return $7c39ee59de2954f9$var$_typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(o) {\n        return typeof o;\n    } : function(o) {\n        return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n    }, $7c39ee59de2954f9$var$_typeof(o);\n}\nfunction $7c39ee59de2954f9$var$_unsupportedIterableToArray(r, a) {\n    if (r) {\n        if (\"string\" == typeof r) return $7c39ee59de2954f9$var$_arrayLikeToArray(r, a);\n        var t = ({}).toString.call(r).slice(8, -1);\n        return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? $7c39ee59de2954f9$var$_arrayLikeToArray(r, a) : void 0;\n    }\n}\nfunction $7c39ee59de2954f9$var$hasProperty(obj, prop) {\n    return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction $7c39ee59de2954f9$var$lastItemOf(arr) {\n    return arr[arr.length - 1];\n}\n// push only the items not included in the array\nfunction $7c39ee59de2954f9$var$pushUnique(arr) {\n    for(var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)items[_key - 1] = arguments[_key];\n    items.forEach(function(item) {\n        if (arr.includes(item)) return;\n        arr.push(item);\n    });\n    return arr;\n}\nfunction $7c39ee59de2954f9$var$stringToArray(str, separator) {\n    // convert empty string to an empty array\n    return str ? str.split(separator) : [];\n}\nfunction $7c39ee59de2954f9$var$isInRange(testVal, min, max) {\n    var minOK = min === undefined || testVal >= min;\n    var maxOK = max === undefined || testVal <= max;\n    return minOK && maxOK;\n}\nfunction $7c39ee59de2954f9$var$limitToRange(val, min, max) {\n    if (val < min) return min;\n    if (val > max) return max;\n    return val;\n}\nfunction $7c39ee59de2954f9$var$createTagRepeat(tagName, repeat) {\n    var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n    var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n    var openTagSrc = Object.keys(attributes).reduce(function(src, attr) {\n        var val = attributes[attr];\n        if (typeof val === 'function') val = val(index);\n        return \"\".concat(src, \" \").concat(attr, \"=\\\"\").concat(val, \"\\\"\");\n    }, tagName);\n    html += \"<\".concat(openTagSrc, \"></\").concat(tagName, \">\");\n    var next = index + 1;\n    return next < repeat ? $7c39ee59de2954f9$var$createTagRepeat(tagName, repeat, attributes, next, html) : html;\n}\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nfunction $7c39ee59de2954f9$var$optimizeTemplateHTML(html) {\n    return html.replace(/>\\s+/g, '>').replace(/\\s+</, '<');\n}\nfunction $7c39ee59de2954f9$var$stripTime(timeValue) {\n    return new Date(timeValue).setHours(0, 0, 0, 0);\n}\nfunction $7c39ee59de2954f9$var$today() {\n    return new Date().setHours(0, 0, 0, 0);\n}\n// Get the time value of the start of given date or year, month and day\nfunction $7c39ee59de2954f9$var$dateValue() {\n    switch(arguments.length){\n        case 0:\n            return $7c39ee59de2954f9$var$today();\n        case 1:\n            return $7c39ee59de2954f9$var$stripTime(arguments.length <= 0 ? undefined : arguments[0]);\n    }\n    // use setFullYear() to keep 2-digit year from being mapped to 1900-1999\n    var newDate = new Date(0);\n    newDate.setFullYear.apply(newDate, arguments);\n    return newDate.setHours(0, 0, 0, 0);\n}\nfunction $7c39ee59de2954f9$var$addDays(date, amount) {\n    var newDate = new Date(date);\n    return newDate.setDate(newDate.getDate() + amount);\n}\nfunction $7c39ee59de2954f9$var$addWeeks(date, amount) {\n    return $7c39ee59de2954f9$var$addDays(date, amount * 7);\n}\nfunction $7c39ee59de2954f9$var$addMonths(date, amount) {\n    // If the day of the date is not in the new month, the last day of the new\n    // month will be returned. e.g. Jan 31 + 1 month → Feb 28 (not Mar 03)\n    var newDate = new Date(date);\n    var monthsToSet = newDate.getMonth() + amount;\n    var expectedMonth = monthsToSet % 12;\n    if (expectedMonth < 0) expectedMonth += 12;\n    var time = newDate.setMonth(monthsToSet);\n    return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time;\n}\nfunction $7c39ee59de2954f9$var$addYears(date, amount) {\n    // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the\n    // new year will be returned.\n    var newDate = new Date(date);\n    var expectedMonth = newDate.getMonth();\n    var time = newDate.setFullYear(newDate.getFullYear() + amount);\n    return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time;\n}\n// Calculate the distance bettwen 2 days of the week\nfunction $7c39ee59de2954f9$var$dayDiff(day, from) {\n    return (day - from + 7) % 7;\n}\n// Get the date of the specified day of the week of given base date\nfunction $7c39ee59de2954f9$var$dayOfTheWeekOf(baseDate, dayOfWeek) {\n    var weekStart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n    var baseDay = new Date(baseDate).getDay();\n    return $7c39ee59de2954f9$var$addDays(baseDate, $7c39ee59de2954f9$var$dayDiff(dayOfWeek, weekStart) - $7c39ee59de2954f9$var$dayDiff(baseDay, weekStart));\n}\n// Get the ISO week of a date\nfunction $7c39ee59de2954f9$var$getWeek(date) {\n    // start of ISO week is Monday\n    var thuOfTheWeek = $7c39ee59de2954f9$var$dayOfTheWeekOf(date, 4, 1);\n    // 1st week == the week where the 4th of January is in\n    var firstThu = $7c39ee59de2954f9$var$dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n    return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nfunction $7c39ee59de2954f9$var$startOfYearPeriod(date, years) {\n    /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ var year = new Date(date).getFullYear();\n    return Math.floor(year / years) * years;\n}\n// pattern for format parts\nvar $7c39ee59de2954f9$var$reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nvar $7c39ee59de2954f9$var$reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n// cache for persed formats\nvar $7c39ee59de2954f9$var$knownFormats = {};\n// parse funtions for date parts\nvar $7c39ee59de2954f9$var$parseFns = {\n    y: function y(date, year) {\n        return new Date(date).setFullYear(parseInt(year, 10));\n    },\n    m: function m(date, month, locale) {\n        var newDate = new Date(date);\n        var monthIndex = parseInt(month, 10) - 1;\n        if (isNaN(monthIndex)) {\n            if (!month) return NaN;\n            var monthName = month.toLowerCase();\n            var compareNames = function compareNames(name) {\n                return name.toLowerCase().startsWith(monthName);\n            };\n            // compare with both short and full names because some locales have periods\n            // in the short names (not equal to the first X letters of the full names)\n            monthIndex = locale.monthsShort.findIndex(compareNames);\n            if (monthIndex < 0) monthIndex = locale.months.findIndex(compareNames);\n            if (monthIndex < 0) return NaN;\n        }\n        newDate.setMonth(monthIndex);\n        return newDate.getMonth() !== $7c39ee59de2954f9$var$normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime();\n    },\n    d: function d(date, day) {\n        return new Date(date).setDate(parseInt(day, 10));\n    }\n};\n// format functions for date parts\nvar $7c39ee59de2954f9$var$formatFns = {\n    d: function d(date) {\n        return date.getDate();\n    },\n    dd: function dd(date) {\n        return $7c39ee59de2954f9$var$padZero(date.getDate(), 2);\n    },\n    D: function D(date, locale) {\n        return locale.daysShort[date.getDay()];\n    },\n    DD: function DD(date, locale) {\n        return locale.days[date.getDay()];\n    },\n    m: function m(date) {\n        return date.getMonth() + 1;\n    },\n    mm: function mm(date) {\n        return $7c39ee59de2954f9$var$padZero(date.getMonth() + 1, 2);\n    },\n    M: function M(date, locale) {\n        return locale.monthsShort[date.getMonth()];\n    },\n    MM: function MM(date, locale) {\n        return locale.months[date.getMonth()];\n    },\n    y: function y(date) {\n        return date.getFullYear();\n    },\n    yy: function yy(date) {\n        return $7c39ee59de2954f9$var$padZero(date.getFullYear(), 2).slice(-2);\n    },\n    yyyy: function yyyy(date) {\n        return $7c39ee59de2954f9$var$padZero(date.getFullYear(), 4);\n    }\n};\n// get month index in normal range (0 - 11) from any number\nfunction $7c39ee59de2954f9$var$normalizeMonth(monthIndex) {\n    return monthIndex > -1 ? monthIndex % 12 : $7c39ee59de2954f9$var$normalizeMonth(monthIndex + 12);\n}\nfunction $7c39ee59de2954f9$var$padZero(num, length) {\n    return num.toString().padStart(length, '0');\n}\nfunction $7c39ee59de2954f9$var$parseFormatString(format) {\n    if (typeof format !== 'string') throw new Error(\"Invalid date format.\");\n    if (format in $7c39ee59de2954f9$var$knownFormats) return $7c39ee59de2954f9$var$knownFormats[format];\n    // sprit the format string into parts and seprators\n    var separators = format.split($7c39ee59de2954f9$var$reFormatTokens);\n    var parts = format.match(new RegExp($7c39ee59de2954f9$var$reFormatTokens, 'g'));\n    if (separators.length === 0 || !parts) throw new Error(\"Invalid date format.\");\n    // collect format functions used in the format\n    var partFormatters = parts.map(function(token) {\n        return $7c39ee59de2954f9$var$formatFns[token];\n    });\n    // collect parse function keys used in the format\n    // iterate over parseFns' keys in order to keep the order of the keys.\n    var partParserKeys = Object.keys($7c39ee59de2954f9$var$parseFns).reduce(function(keys, key) {\n        var token = parts.find(function(part) {\n            return part[0] !== 'D' && part[0].toLowerCase() === key;\n        });\n        if (token) keys.push(key);\n        return keys;\n    }, []);\n    return $7c39ee59de2954f9$var$knownFormats[format] = {\n        parser: function parser(dateStr, locale) {\n            var dateParts = dateStr.split($7c39ee59de2954f9$var$reNonDateParts).reduce(function(dtParts, part, index) {\n                if (part.length > 0 && parts[index]) {\n                    var token = parts[index][0];\n                    if (token === 'M') dtParts.m = part;\n                    else if (token !== 'D') dtParts[token] = part;\n                }\n                return dtParts;\n            }, {});\n            // iterate over partParserkeys so that the parsing is made in the oder\n            // of year, month and day to prevent the day parser from correcting last\n            // day of month wrongly\n            return partParserKeys.reduce(function(origDate, key) {\n                var newDate = $7c39ee59de2954f9$var$parseFns[key](origDate, dateParts[key], locale);\n                // ingnore the part failed to parse\n                return isNaN(newDate) ? origDate : newDate;\n            }, $7c39ee59de2954f9$var$today());\n        },\n        formatter: function formatter(date, locale) {\n            var dateStr = partFormatters.reduce(function(str, fn, index) {\n                return str += \"\".concat(separators[index]).concat(fn(date, locale));\n            }, '');\n            // separators' length is always parts' length + 1,\n            return dateStr += $7c39ee59de2954f9$var$lastItemOf(separators);\n        }\n    };\n}\nfunction $7c39ee59de2954f9$var$parseDate(dateStr, format, locale) {\n    if (dateStr instanceof Date || typeof dateStr === 'number') {\n        var date = $7c39ee59de2954f9$var$stripTime(dateStr);\n        return isNaN(date) ? undefined : date;\n    }\n    if (!dateStr) return undefined;\n    if (dateStr === 'today') return $7c39ee59de2954f9$var$today();\n    if (format && format.toValue) {\n        var _date = format.toValue(dateStr, format, locale);\n        return isNaN(_date) ? undefined : $7c39ee59de2954f9$var$stripTime(_date);\n    }\n    return $7c39ee59de2954f9$var$parseFormatString(format).parser(dateStr, locale);\n}\nfunction $7c39ee59de2954f9$var$formatDate(date, format, locale) {\n    if (isNaN(date) || !date && date !== 0) return '';\n    var dateObj = typeof date === 'number' ? new Date(date) : date;\n    if (format.toDisplay) return format.toDisplay(dateObj, format, locale);\n    return $7c39ee59de2954f9$var$parseFormatString(format).formatter(dateObj, locale);\n}\nvar $7c39ee59de2954f9$var$listenerRegistry = new WeakMap();\nvar $7c39ee59de2954f9$var$_EventTarget$prototyp = EventTarget.prototype, $7c39ee59de2954f9$var$addEventListener = $7c39ee59de2954f9$var$_EventTarget$prototyp.addEventListener, $7c39ee59de2954f9$var$removeEventListener = $7c39ee59de2954f9$var$_EventTarget$prototyp.removeEventListener;\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n//   - each definition must be a flat array of event target and the arguments\n//     used to call addEventListener() on the target\nfunction $7c39ee59de2954f9$var$registerListeners(keyObj, listeners) {\n    var registered = $7c39ee59de2954f9$var$listenerRegistry.get(keyObj);\n    if (!registered) {\n        registered = [];\n        $7c39ee59de2954f9$var$listenerRegistry.set(keyObj, registered);\n    }\n    listeners.forEach(function(listener) {\n        $7c39ee59de2954f9$var$addEventListener.call.apply($7c39ee59de2954f9$var$addEventListener, $7c39ee59de2954f9$var$_toConsumableArray(listener));\n        registered.push(listener);\n    });\n}\nfunction $7c39ee59de2954f9$var$unregisterListeners(keyObj) {\n    var listeners = $7c39ee59de2954f9$var$listenerRegistry.get(keyObj);\n    if (!listeners) return;\n    listeners.forEach(function(listener) {\n        $7c39ee59de2954f9$var$removeEventListener.call.apply($7c39ee59de2954f9$var$removeEventListener, $7c39ee59de2954f9$var$_toConsumableArray(listener));\n    });\n    $7c39ee59de2954f9$var$listenerRegistry[\"delete\"](keyObj);\n}\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n    var $7c39ee59de2954f9$var$getComposedPath = function getComposedPath(node) {\n        var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n        path.push(node);\n        var parent;\n        if (node.parentNode) parent = node.parentNode;\n        else if (node.host) // ShadowRoot\n        parent = node.host;\n        else if (node.defaultView) // Document\n        parent = node.defaultView;\n        return parent ? getComposedPath(parent, path) : path;\n    };\n    Event.prototype.composedPath = function() {\n        return $7c39ee59de2954f9$var$getComposedPath(this.target);\n    };\n}\nfunction $7c39ee59de2954f9$var$findFromPath(path, criteria, currentTarget) {\n    var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n    var el = path[index];\n    if (criteria(el)) return el;\n    else if (el === currentTarget || !el.parentElement) // stop when reaching currentTarget or <html>\n    return;\n    return $7c39ee59de2954f9$var$findFromPath(path, criteria, currentTarget, index + 1);\n}\n// Search for the actual target of a delegated event\nfunction $7c39ee59de2954f9$var$findElementInEventPath(ev, selector) {\n    var criteria = typeof selector === 'function' ? selector : function(el) {\n        return el.matches(selector);\n    };\n    return $7c39ee59de2954f9$var$findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n// default locales\nvar $7c39ee59de2954f9$var$locales = {\n    en: {\n        days: [\n            \"Sunday\",\n            \"Monday\",\n            \"Tuesday\",\n            \"Wednesday\",\n            \"Thursday\",\n            \"Friday\",\n            \"Saturday\"\n        ],\n        daysShort: [\n            \"Sun\",\n            \"Mon\",\n            \"Tue\",\n            \"Wed\",\n            \"Thu\",\n            \"Fri\",\n            \"Sat\"\n        ],\n        daysMin: [\n            \"Su\",\n            \"Mo\",\n            \"Tu\",\n            \"We\",\n            \"Th\",\n            \"Fr\",\n            \"Sa\"\n        ],\n        months: [\n            \"January\",\n            \"February\",\n            \"March\",\n            \"April\",\n            \"May\",\n            \"June\",\n            \"July\",\n            \"August\",\n            \"September\",\n            \"October\",\n            \"November\",\n            \"December\"\n        ],\n        monthsShort: [\n            \"Jan\",\n            \"Feb\",\n            \"Mar\",\n            \"Apr\",\n            \"May\",\n            \"Jun\",\n            \"Jul\",\n            \"Aug\",\n            \"Sep\",\n            \"Oct\",\n            \"Nov\",\n            \"Dec\"\n        ],\n        today: \"Today\",\n        clear: \"Clear\",\n        titleFormat: \"MM y\"\n    }\n};\n// config options updatable by setOptions() and their default values\nvar $7c39ee59de2954f9$var$defaultOptions = {\n    autohide: false,\n    beforeShowDay: null,\n    beforeShowDecade: null,\n    beforeShowMonth: null,\n    beforeShowYear: null,\n    calendarWeeks: false,\n    clearBtn: false,\n    dateDelimiter: ',',\n    datesDisabled: [],\n    daysOfWeekDisabled: [],\n    daysOfWeekHighlighted: [],\n    defaultViewDate: undefined,\n    // placeholder, defaults to today() by the program\n    disableTouchKeyboard: false,\n    format: 'mm/dd/yyyy',\n    language: 'en',\n    maxDate: null,\n    maxNumberOfDates: 1,\n    maxView: 3,\n    minDate: null,\n    nextArrow: '<svg class=\"w-4 h-4 rtl:rotate-180 text-gray-800 dark:text-white\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 14 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M1 5h12m0 0L9 1m4 4L9 9\"/></svg>',\n    orientation: 'auto',\n    pickLevel: 0,\n    prevArrow: '<svg class=\"w-4 h-4 rtl:rotate-180 text-gray-800 dark:text-white\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 14 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 5H1m0 0 4 4M1 5l4-4\"/></svg>',\n    showDaysOfWeek: true,\n    showOnClick: true,\n    showOnFocus: true,\n    startView: 0,\n    title: '',\n    todayBtn: false,\n    todayBtnMode: 0,\n    todayHighlight: false,\n    updateOnBlur: true,\n    weekStart: 0\n};\nvar $7c39ee59de2954f9$var$range = null;\nfunction $7c39ee59de2954f9$var$parseHTML(html) {\n    if ($7c39ee59de2954f9$var$range == null) $7c39ee59de2954f9$var$range = document.createRange();\n    return $7c39ee59de2954f9$var$range.createContextualFragment(html);\n}\nfunction $7c39ee59de2954f9$var$hideElement(el) {\n    if (el.style.display === 'none') return;\n    // back up the existing display setting in data-style-display\n    if (el.style.display) el.dataset.styleDisplay = el.style.display;\n    el.style.display = 'none';\n}\nfunction $7c39ee59de2954f9$var$showElement(el) {\n    if (el.style.display !== 'none') return;\n    if (el.dataset.styleDisplay) {\n        // restore backed-up dispay property\n        el.style.display = el.dataset.styleDisplay;\n        delete el.dataset.styleDisplay;\n    } else el.style.display = '';\n}\nfunction $7c39ee59de2954f9$var$emptyChildNodes(el) {\n    if (el.firstChild) {\n        el.removeChild(el.firstChild);\n        $7c39ee59de2954f9$var$emptyChildNodes(el);\n    }\n}\nfunction $7c39ee59de2954f9$var$replaceChildNodes(el, newChildNodes) {\n    $7c39ee59de2954f9$var$emptyChildNodes(el);\n    if (newChildNodes instanceof DocumentFragment) el.appendChild(newChildNodes);\n    else if (typeof newChildNodes === 'string') el.appendChild($7c39ee59de2954f9$var$parseHTML(newChildNodes));\n    else if (typeof newChildNodes.forEach === 'function') newChildNodes.forEach(function(node) {\n        el.appendChild(node);\n    });\n}\nvar $7c39ee59de2954f9$var$defaultLang = $7c39ee59de2954f9$var$defaultOptions.language, $7c39ee59de2954f9$var$defaultFormat = $7c39ee59de2954f9$var$defaultOptions.format, $7c39ee59de2954f9$var$defaultWeekStart = $7c39ee59de2954f9$var$defaultOptions.weekStart;\n// Reducer function to filter out invalid day-of-week from the input\nfunction $7c39ee59de2954f9$var$sanitizeDOW(dow, day) {\n    return dow.length < 6 && day >= 0 && day < 7 ? $7c39ee59de2954f9$var$pushUnique(dow, day) : dow;\n}\nfunction $7c39ee59de2954f9$var$calcEndOfWeek(startOfWeek) {\n    return (startOfWeek + 6) % 7;\n}\n// validate input date. if invalid, fallback to the original value\nfunction $7c39ee59de2954f9$var$validateDate(value, format, locale, origValue) {\n    var date = $7c39ee59de2954f9$var$parseDate(value, format, locale);\n    return date !== undefined ? date : origValue;\n}\n// Validate viewId. if invalid, fallback to the original value\nfunction $7c39ee59de2954f9$var$validateViewId(value, origValue) {\n    var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n    var viewId = parseInt(value, 10);\n    return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n// Create Datepicker configuration to set\nfunction $7c39ee59de2954f9$var$processOptions(options, datepicker) {\n    var inOpts = Object.assign({}, options);\n    var config = {};\n    var locales = datepicker.constructor.locales;\n    var _ref = datepicker.config || {}, format = _ref.format, language = _ref.language, locale = _ref.locale, maxDate = _ref.maxDate, maxView = _ref.maxView, minDate = _ref.minDate, pickLevel = _ref.pickLevel, startView = _ref.startView, weekStart = _ref.weekStart;\n    if (inOpts.language) {\n        var lang;\n        if (inOpts.language !== language) {\n            if (locales[inOpts.language]) lang = inOpts.language;\n            else {\n                // Check if langauge + region tag can fallback to the one without\n                // region (e.g. fr-CA → fr)\n                lang = inOpts.language.split('-')[0];\n                if (locales[lang] === undefined) lang = false;\n            }\n        }\n        delete inOpts.language;\n        if (lang) {\n            language = config.language = lang;\n            // update locale as well when updating language\n            var origLocale = locale || locales[$7c39ee59de2954f9$var$defaultLang];\n            // use default language's properties for the fallback\n            locale = Object.assign({\n                format: $7c39ee59de2954f9$var$defaultFormat,\n                weekStart: $7c39ee59de2954f9$var$defaultWeekStart\n            }, locales[$7c39ee59de2954f9$var$defaultLang]);\n            if (language !== $7c39ee59de2954f9$var$defaultLang) Object.assign(locale, locales[language]);\n            config.locale = locale;\n            // if format and/or weekStart are the same as old locale's defaults,\n            // update them to new locale's defaults\n            if (format === origLocale.format) format = config.format = locale.format;\n            if (weekStart === origLocale.weekStart) {\n                weekStart = config.weekStart = locale.weekStart;\n                config.weekEnd = $7c39ee59de2954f9$var$calcEndOfWeek(locale.weekStart);\n            }\n        }\n    }\n    if (inOpts.format) {\n        var hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n        var hasToValue = typeof inOpts.format.toValue === 'function';\n        var validFormatString = $7c39ee59de2954f9$var$reFormatTokens.test(inOpts.format);\n        if (hasToDisplay && hasToValue || validFormatString) format = config.format = inOpts.format;\n        delete inOpts.format;\n    }\n    //*** dates ***//\n    // while min and maxDate for \"no limit\" in the options are better to be null\n    // (especially when updating), the ones in the config have to be undefined\n    // because null is treated as 0 (= unix epoch) when comparing with time value\n    var minDt = minDate;\n    var maxDt = maxDate;\n    if (inOpts.minDate !== undefined) {\n        minDt = inOpts.minDate === null ? $7c39ee59de2954f9$var$dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n         : $7c39ee59de2954f9$var$validateDate(inOpts.minDate, format, locale, minDt);\n        delete inOpts.minDate;\n    }\n    if (inOpts.maxDate !== undefined) {\n        maxDt = inOpts.maxDate === null ? undefined : $7c39ee59de2954f9$var$validateDate(inOpts.maxDate, format, locale, maxDt);\n        delete inOpts.maxDate;\n    }\n    if (maxDt < minDt) {\n        minDate = config.minDate = maxDt;\n        maxDate = config.maxDate = minDt;\n    } else {\n        if (minDate !== minDt) minDate = config.minDate = minDt;\n        if (maxDate !== maxDt) maxDate = config.maxDate = maxDt;\n    }\n    if (inOpts.datesDisabled) {\n        config.datesDisabled = inOpts.datesDisabled.reduce(function(dates, dt) {\n            var date = $7c39ee59de2954f9$var$parseDate(dt, format, locale);\n            return date !== undefined ? $7c39ee59de2954f9$var$pushUnique(dates, date) : dates;\n        }, []);\n        delete inOpts.datesDisabled;\n    }\n    if (inOpts.defaultViewDate !== undefined) {\n        var viewDate = $7c39ee59de2954f9$var$parseDate(inOpts.defaultViewDate, format, locale);\n        if (viewDate !== undefined) config.defaultViewDate = viewDate;\n        delete inOpts.defaultViewDate;\n    }\n    //*** days of week ***//\n    if (inOpts.weekStart !== undefined) {\n        var wkStart = Number(inOpts.weekStart) % 7;\n        if (!isNaN(wkStart)) {\n            weekStart = config.weekStart = wkStart;\n            config.weekEnd = $7c39ee59de2954f9$var$calcEndOfWeek(wkStart);\n        }\n        delete inOpts.weekStart;\n    }\n    if (inOpts.daysOfWeekDisabled) {\n        config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce($7c39ee59de2954f9$var$sanitizeDOW, []);\n        delete inOpts.daysOfWeekDisabled;\n    }\n    if (inOpts.daysOfWeekHighlighted) {\n        config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce($7c39ee59de2954f9$var$sanitizeDOW, []);\n        delete inOpts.daysOfWeekHighlighted;\n    }\n    //*** multi date ***//\n    if (inOpts.maxNumberOfDates !== undefined) {\n        var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n        if (maxNumberOfDates >= 0) {\n            config.maxNumberOfDates = maxNumberOfDates;\n            config.multidate = maxNumberOfDates !== 1;\n        }\n        delete inOpts.maxNumberOfDates;\n    }\n    if (inOpts.dateDelimiter) {\n        config.dateDelimiter = String(inOpts.dateDelimiter);\n        delete inOpts.dateDelimiter;\n    }\n    //*** pick level & view ***//\n    var newPickLevel = pickLevel;\n    if (inOpts.pickLevel !== undefined) {\n        newPickLevel = $7c39ee59de2954f9$var$validateViewId(inOpts.pickLevel, 2);\n        delete inOpts.pickLevel;\n    }\n    if (newPickLevel !== pickLevel) pickLevel = config.pickLevel = newPickLevel;\n    var newMaxView = maxView;\n    if (inOpts.maxView !== undefined) {\n        newMaxView = $7c39ee59de2954f9$var$validateViewId(inOpts.maxView, maxView);\n        delete inOpts.maxView;\n    }\n    // ensure max view >= pick level\n    newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n    if (newMaxView !== maxView) maxView = config.maxView = newMaxView;\n    var newStartView = startView;\n    if (inOpts.startView !== undefined) {\n        newStartView = $7c39ee59de2954f9$var$validateViewId(inOpts.startView, newStartView);\n        delete inOpts.startView;\n    }\n    // ensure pick level <= start view <= max view\n    if (newStartView < pickLevel) newStartView = pickLevel;\n    else if (newStartView > maxView) newStartView = maxView;\n    if (newStartView !== startView) config.startView = newStartView;\n    //*** template ***//\n    if (inOpts.prevArrow) {\n        var prevArrow = $7c39ee59de2954f9$var$parseHTML(inOpts.prevArrow);\n        if (prevArrow.childNodes.length > 0) config.prevArrow = prevArrow.childNodes;\n        delete inOpts.prevArrow;\n    }\n    if (inOpts.nextArrow) {\n        var nextArrow = $7c39ee59de2954f9$var$parseHTML(inOpts.nextArrow);\n        if (nextArrow.childNodes.length > 0) config.nextArrow = nextArrow.childNodes;\n        delete inOpts.nextArrow;\n    }\n    //*** misc ***//\n    if (inOpts.disableTouchKeyboard !== undefined) {\n        config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n        delete inOpts.disableTouchKeyboard;\n    }\n    if (inOpts.orientation) {\n        var orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n        config.orientation = {\n            x: orientation.find(function(x) {\n                return x === 'left' || x === 'right';\n            }) || 'auto',\n            y: orientation.find(function(y) {\n                return y === 'top' || y === 'bottom';\n            }) || 'auto'\n        };\n        delete inOpts.orientation;\n    }\n    if (inOpts.todayBtnMode !== undefined) {\n        switch(inOpts.todayBtnMode){\n            case 0:\n            case 1:\n                config.todayBtnMode = inOpts.todayBtnMode;\n        }\n        delete inOpts.todayBtnMode;\n    }\n    //*** copy the rest ***//\n    Object.keys(inOpts).forEach(function(key) {\n        if (inOpts[key] !== undefined && $7c39ee59de2954f9$var$hasProperty($7c39ee59de2954f9$var$defaultOptions, key)) config[key] = inOpts[key];\n    });\n    return config;\n}\nvar $7c39ee59de2954f9$var$pickerTemplate = $7c39ee59de2954f9$var$optimizeTemplateHTML(\"<div class=\\\"datepicker hidden\\\">\\n  <div class=\\\"datepicker-picker inline-block rounded-lg bg-white dark:bg-gray-700 shadow-lg p-4\\\">\\n    <div class=\\\"datepicker-header\\\">\\n      <div class=\\\"datepicker-title bg-white dark:bg-gray-700 dark:text-white px-2 py-3 text-center font-semibold\\\"></div>\\n      <div class=\\\"datepicker-controls flex justify-between mb-2\\\">\\n        <button type=\\\"button\\\" class=\\\"bg-white dark:bg-gray-700 rounded-lg text-gray-500 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-white text-lg p-2.5 focus:outline-none focus:ring-2 focus:ring-gray-200 prev-btn\\\"></button>\\n        <button type=\\\"button\\\" class=\\\"text-sm rounded-lg text-gray-900 dark:text-white bg-white dark:bg-gray-700 font-semibold py-2.5 px-5 hover:bg-gray-100 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-200 view-switch\\\"></button>\\n        <button type=\\\"button\\\" class=\\\"bg-white dark:bg-gray-700 rounded-lg text-gray-500 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-white text-lg p-2.5 focus:outline-none focus:ring-2 focus:ring-gray-200 next-btn\\\"></button>\\n      </div>\\n    </div>\\n    <div class=\\\"datepicker-main p-1\\\"></div>\\n    <div class=\\\"datepicker-footer\\\">\\n      <div class=\\\"datepicker-controls flex space-x-2 rtl:space-x-reverse mt-2\\\">\\n        <button type=\\\"button\\\" class=\\\"%buttonClass% today-btn text-white bg-blue-700 !bg-primary-700 dark:bg-blue-600 dark:!bg-primary-600 hover:bg-blue-800 hover:!bg-primary-800 dark:hover:bg-blue-700 dark:hover:!bg-primary-700 focus:ring-4 focus:ring-blue-300 focus:!ring-primary-300 font-medium rounded-lg text-sm px-5 py-2 text-center w-1/2\\\"></button>\\n        <button type=\\\"button\\\" class=\\\"%buttonClass% clear-btn text-gray-900 dark:text-white bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600 focus:ring-4 focus:ring-blue-300 focus:!ring-primary-300 font-medium rounded-lg text-sm px-5 py-2 text-center w-1/2\\\"></button>\\n      </div>\\n    </div>\\n  </div>\\n</div>\");\nvar $7c39ee59de2954f9$var$daysTemplate = $7c39ee59de2954f9$var$optimizeTemplateHTML(\"<div class=\\\"days\\\">\\n  <div class=\\\"days-of-week grid grid-cols-7 mb-1\\\">\".concat($7c39ee59de2954f9$var$createTagRepeat('span', 7, {\n    \"class\": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"</div>\\n  <div class=\\\"datepicker-grid w-64 grid grid-cols-7\\\">\").concat($7c39ee59de2954f9$var$createTagRepeat('span', 42, {\n    \"class\": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'\n}), \"</div>\\n</div>\"));\nvar $7c39ee59de2954f9$var$calendarWeeksTemplate = $7c39ee59de2954f9$var$optimizeTemplateHTML(\"<div class=\\\"calendar-weeks\\\">\\n  <div class=\\\"days-of-week flex\\\"><span class=\\\"dow h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400\\\"></span></div>\\n  <div class=\\\"weeks\\\">\".concat($7c39ee59de2954f9$var$createTagRepeat('span', 6, {\n    \"class\": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"</div>\\n</div>\"));\n// Base class of the view classes\nvar $7c39ee59de2954f9$var$View = /*#__PURE__*/ function() {\n    function View(picker, config) {\n        $7c39ee59de2954f9$var$_classCallCheck(this, View);\n        Object.assign(this, config, {\n            picker: picker,\n            element: $7c39ee59de2954f9$var$parseHTML(\"<div class=\\\"datepicker-view flex\\\"></div>\").firstChild,\n            selected: []\n        });\n        this.init(this.picker.datepicker.config);\n    }\n    return $7c39ee59de2954f9$var$_createClass(View, [\n        {\n            key: \"init\",\n            value: function init(options) {\n                if (options.pickLevel !== undefined) this.isMinView = this.id === options.pickLevel;\n                this.setOptions(options);\n                this.updateFocus();\n                this.updateSelection();\n            }\n        },\n        {\n            key: \"performBeforeHook\",\n            value: function performBeforeHook(el, current, timeValue) {\n                var result = this.beforeShow(new Date(timeValue));\n                switch($7c39ee59de2954f9$var$_typeof(result)){\n                    case 'boolean':\n                        result = {\n                            enabled: result\n                        };\n                        break;\n                    case 'string':\n                        result = {\n                            classes: result\n                        };\n                }\n                if (result) {\n                    if (result.enabled === false) {\n                        el.classList.add('disabled');\n                        $7c39ee59de2954f9$var$pushUnique(this.disabled, current);\n                    }\n                    if (result.classes) {\n                        var _el$classList;\n                        var extraClasses = result.classes.split(/\\s+/);\n                        (_el$classList = el.classList).add.apply(_el$classList, $7c39ee59de2954f9$var$_toConsumableArray(extraClasses));\n                        if (extraClasses.includes('disabled')) $7c39ee59de2954f9$var$pushUnique(this.disabled, current);\n                    }\n                    if (result.content) $7c39ee59de2954f9$var$replaceChildNodes(el, result.content);\n                }\n            }\n        }\n    ]);\n}();\nvar $7c39ee59de2954f9$var$DaysView = /*#__PURE__*/ function(_View) {\n    function DaysView(picker) {\n        $7c39ee59de2954f9$var$_classCallCheck(this, DaysView);\n        return $7c39ee59de2954f9$var$_callSuper(this, DaysView, [\n            picker,\n            {\n                id: 0,\n                name: 'days',\n                cellClass: 'day'\n            }\n        ]);\n    }\n    $7c39ee59de2954f9$var$_inherits(DaysView, _View);\n    return $7c39ee59de2954f9$var$_createClass(DaysView, [\n        {\n            key: \"init\",\n            value: function init(options) {\n                var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n                if (onConstruction) {\n                    var inner = $7c39ee59de2954f9$var$parseHTML($7c39ee59de2954f9$var$daysTemplate).firstChild;\n                    this.dow = inner.firstChild;\n                    this.grid = inner.lastChild;\n                    this.element.appendChild(inner);\n                }\n                $7c39ee59de2954f9$var$_get($7c39ee59de2954f9$var$_getPrototypeOf(DaysView.prototype), \"init\", this).call(this, options);\n            }\n        },\n        {\n            key: \"setOptions\",\n            value: function setOptions(options) {\n                var _this = this;\n                var updateDOW;\n                if ($7c39ee59de2954f9$var$hasProperty(options, 'minDate')) this.minDate = options.minDate;\n                if ($7c39ee59de2954f9$var$hasProperty(options, 'maxDate')) this.maxDate = options.maxDate;\n                if (options.datesDisabled) this.datesDisabled = options.datesDisabled;\n                if (options.daysOfWeekDisabled) {\n                    this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n                    updateDOW = true;\n                }\n                if (options.daysOfWeekHighlighted) this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n                if (options.todayHighlight !== undefined) this.todayHighlight = options.todayHighlight;\n                if (options.weekStart !== undefined) {\n                    this.weekStart = options.weekStart;\n                    this.weekEnd = options.weekEnd;\n                    updateDOW = true;\n                }\n                if (options.locale) {\n                    var locale = this.locale = options.locale;\n                    this.dayNames = locale.daysMin;\n                    this.switchLabelFormat = locale.titleFormat;\n                    updateDOW = true;\n                }\n                if (options.beforeShowDay !== undefined) this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined;\n                if (options.calendarWeeks !== undefined) {\n                    if (options.calendarWeeks && !this.calendarWeeks) {\n                        var weeksElem = $7c39ee59de2954f9$var$parseHTML($7c39ee59de2954f9$var$calendarWeeksTemplate).firstChild;\n                        this.calendarWeeks = {\n                            element: weeksElem,\n                            dow: weeksElem.firstChild,\n                            weeks: weeksElem.lastChild\n                        };\n                        this.element.insertBefore(weeksElem, this.element.firstChild);\n                    } else if (this.calendarWeeks && !options.calendarWeeks) {\n                        this.element.removeChild(this.calendarWeeks.element);\n                        this.calendarWeeks = null;\n                    }\n                }\n                if (options.showDaysOfWeek !== undefined) {\n                    if (options.showDaysOfWeek) {\n                        $7c39ee59de2954f9$var$showElement(this.dow);\n                        if (this.calendarWeeks) $7c39ee59de2954f9$var$showElement(this.calendarWeeks.dow);\n                    } else {\n                        $7c39ee59de2954f9$var$hideElement(this.dow);\n                        if (this.calendarWeeks) $7c39ee59de2954f9$var$hideElement(this.calendarWeeks.dow);\n                    }\n                }\n                // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n                if (updateDOW) Array.from(this.dow.children).forEach(function(el, index) {\n                    var dow = (_this.weekStart + index) % 7;\n                    el.textContent = _this.dayNames[dow];\n                    el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n                });\n            }\n        },\n        {\n            key: \"updateFocus\",\n            value: function updateFocus() {\n                var viewDate = new Date(this.picker.viewDate);\n                var viewYear = viewDate.getFullYear();\n                var viewMonth = viewDate.getMonth();\n                var firstOfMonth = $7c39ee59de2954f9$var$dateValue(viewYear, viewMonth, 1);\n                var start = $7c39ee59de2954f9$var$dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n                this.first = firstOfMonth;\n                this.last = $7c39ee59de2954f9$var$dateValue(viewYear, viewMonth + 1, 0);\n                this.start = start;\n                this.focused = this.picker.viewDate;\n            }\n        },\n        {\n            key: \"updateSelection\",\n            value: function updateSelection() {\n                var _this$picker$datepick = this.picker.datepicker, dates = _this$picker$datepick.dates, rangepicker = _this$picker$datepick.rangepicker;\n                this.selected = dates;\n                if (rangepicker) this.range = rangepicker.dates;\n            }\n        },\n        {\n            key: \"render\",\n            value: function render() {\n                var _this2 = this;\n                // update today marker on ever render\n                this.today = this.todayHighlight ? $7c39ee59de2954f9$var$today() : undefined;\n                // refresh disabled dates on every render in order to clear the ones added\n                // by beforeShow hook at previous render\n                this.disabled = $7c39ee59de2954f9$var$_toConsumableArray(this.datesDisabled);\n                var switchLabel = $7c39ee59de2954f9$var$formatDate(this.focused, this.switchLabelFormat, this.locale);\n                this.picker.setViewSwitchLabel(switchLabel);\n                this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n                this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n                if (this.calendarWeeks) {\n                    // start of the UTC week (Monday) of the 1st of the month\n                    var startOfWeek = $7c39ee59de2954f9$var$dayOfTheWeekOf(this.first, 1, 1);\n                    Array.from(this.calendarWeeks.weeks.children).forEach(function(el, index) {\n                        el.textContent = $7c39ee59de2954f9$var$getWeek($7c39ee59de2954f9$var$addWeeks(startOfWeek, index));\n                    });\n                }\n                Array.from(this.grid.children).forEach(function(el, index) {\n                    var classList = el.classList;\n                    var current = $7c39ee59de2954f9$var$addDays(_this2.start, index);\n                    var date = new Date(current);\n                    var day = date.getDay();\n                    el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n                    el.dataset.date = current;\n                    el.textContent = date.getDate();\n                    if (current < _this2.first) classList.add('prev', 'text-gray-500', 'dark:text-white');\n                    else if (current > _this2.last) classList.add('next', 'text-gray-500', 'dark:text-white');\n                    if (_this2.today === current) classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n                    if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) {\n                        classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n                        classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n                    }\n                    if (_this2.daysOfWeekDisabled.includes(day)) {\n                        classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n                        classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n                        $7c39ee59de2954f9$var$pushUnique(_this2.disabled, current);\n                    }\n                    if (_this2.daysOfWeekHighlighted.includes(day)) classList.add('highlighted');\n                    if (_this2.range) {\n                        var _this2$range = $7c39ee59de2954f9$var$_slicedToArray(_this2.range, 2), rangeStart = _this2$range[0], rangeEnd = _this2$range[1];\n                        if (current > rangeStart && current < rangeEnd) {\n                            classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n                            classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg');\n                        }\n                        if (current === rangeStart) {\n                            classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n                            classList.remove('rounded-lg', 'rounded-r-lg');\n                        }\n                        if (current === rangeEnd) {\n                            classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n                            classList.remove('rounded-lg', 'rounded-l-lg');\n                        }\n                    }\n                    if (_this2.selected.includes(current)) {\n                        classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n                        classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n                    }\n                    if (current === _this2.focused) classList.add('focused');\n                    if (_this2.beforeShow) _this2.performBeforeHook(el, current, current);\n                });\n            }\n        },\n        {\n            key: \"refresh\",\n            value: function refresh() {\n                var _this3 = this;\n                var _ref = this.range || [], _ref2 = $7c39ee59de2954f9$var$_slicedToArray(_ref, 2), rangeStart = _ref2[0], rangeEnd = _ref2[1];\n                this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function(el) {\n                    el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused');\n                    el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n                });\n                Array.from(this.grid.children).forEach(function(el) {\n                    var current = Number(el.dataset.date);\n                    var classList = el.classList;\n                    classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg');\n                    if (current > rangeStart && current < rangeEnd) {\n                        classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n                        classList.remove('rounded-lg');\n                    }\n                    if (current === rangeStart) {\n                        classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n                        classList.remove('rounded-lg');\n                    }\n                    if (current === rangeEnd) {\n                        classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n                        classList.remove('rounded-lg');\n                    }\n                    if (_this3.selected.includes(current)) {\n                        classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n                        classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n                    }\n                    if (current === _this3.focused) classList.add('focused');\n                });\n            }\n        },\n        {\n            key: \"refreshFocus\",\n            value: function refreshFocus() {\n                var index = Math.round((this.focused - this.start) / 86400000);\n                this.grid.querySelectorAll('.focused').forEach(function(el) {\n                    el.classList.remove('focused');\n                });\n                this.grid.children[index].classList.add('focused');\n            }\n        }\n    ]);\n}($7c39ee59de2954f9$var$View);\nfunction $7c39ee59de2954f9$var$computeMonthRange(range, thisYear) {\n    if (!range || !range[0] || !range[1]) return;\n    var _range = $7c39ee59de2954f9$var$_slicedToArray(range, 2), _range$ = $7c39ee59de2954f9$var$_slicedToArray(_range[0], 2), startY = _range$[0], startM = _range$[1], _range$2 = $7c39ee59de2954f9$var$_slicedToArray(_range[1], 2), endY = _range$2[0], endM = _range$2[1];\n    if (startY > thisYear || endY < thisYear) return;\n    return [\n        startY === thisYear ? startM : -1,\n        endY === thisYear ? endM : 12\n    ];\n}\nvar $7c39ee59de2954f9$var$MonthsView = /*#__PURE__*/ function(_View) {\n    function MonthsView(picker) {\n        $7c39ee59de2954f9$var$_classCallCheck(this, MonthsView);\n        return $7c39ee59de2954f9$var$_callSuper(this, MonthsView, [\n            picker,\n            {\n                id: 1,\n                name: 'months',\n                cellClass: 'month'\n            }\n        ]);\n    }\n    $7c39ee59de2954f9$var$_inherits(MonthsView, _View);\n    return $7c39ee59de2954f9$var$_createClass(MonthsView, [\n        {\n            key: \"init\",\n            value: function init(options) {\n                var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n                if (onConstruction) {\n                    this.grid = this.element;\n                    this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n                    this.grid.appendChild($7c39ee59de2954f9$var$parseHTML($7c39ee59de2954f9$var$createTagRepeat('span', 12, {\n                        'data-month': function dataMonth(ix) {\n                            return ix;\n                        }\n                    })));\n                }\n                $7c39ee59de2954f9$var$_get($7c39ee59de2954f9$var$_getPrototypeOf(MonthsView.prototype), \"init\", this).call(this, options);\n            }\n        },\n        {\n            key: \"setOptions\",\n            value: function setOptions(options) {\n                if (options.locale) this.monthNames = options.locale.monthsShort;\n                if ($7c39ee59de2954f9$var$hasProperty(options, 'minDate')) {\n                    if (options.minDate === undefined) this.minYear = this.minMonth = this.minDate = undefined;\n                    else {\n                        var minDateObj = new Date(options.minDate);\n                        this.minYear = minDateObj.getFullYear();\n                        this.minMonth = minDateObj.getMonth();\n                        this.minDate = minDateObj.setDate(1);\n                    }\n                }\n                if ($7c39ee59de2954f9$var$hasProperty(options, 'maxDate')) {\n                    if (options.maxDate === undefined) this.maxYear = this.maxMonth = this.maxDate = undefined;\n                    else {\n                        var maxDateObj = new Date(options.maxDate);\n                        this.maxYear = maxDateObj.getFullYear();\n                        this.maxMonth = maxDateObj.getMonth();\n                        this.maxDate = $7c39ee59de2954f9$var$dateValue(this.maxYear, this.maxMonth + 1, 0);\n                    }\n                }\n                if (options.beforeShowMonth !== undefined) this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined;\n            }\n        },\n        {\n            key: \"updateFocus\",\n            value: function updateFocus() {\n                var viewDate = new Date(this.picker.viewDate);\n                this.year = viewDate.getFullYear();\n                this.focused = viewDate.getMonth();\n            }\n        },\n        {\n            key: \"updateSelection\",\n            value: function updateSelection() {\n                var _this$picker$datepick = this.picker.datepicker, dates = _this$picker$datepick.dates, rangepicker = _this$picker$datepick.rangepicker;\n                this.selected = dates.reduce(function(selected, timeValue) {\n                    var date = new Date(timeValue);\n                    var year = date.getFullYear();\n                    var month = date.getMonth();\n                    if (selected[year] === undefined) selected[year] = [\n                        month\n                    ];\n                    else $7c39ee59de2954f9$var$pushUnique(selected[year], month);\n                    return selected;\n                }, {});\n                if (rangepicker && rangepicker.dates) this.range = rangepicker.dates.map(function(timeValue) {\n                    var date = new Date(timeValue);\n                    return isNaN(date) ? undefined : [\n                        date.getFullYear(),\n                        date.getMonth()\n                    ];\n                });\n            }\n        },\n        {\n            key: \"render\",\n            value: function render() {\n                var _this = this;\n                // refresh disabled months on every render in order to clear the ones added\n                // by beforeShow hook at previous render\n                this.disabled = [];\n                this.picker.setViewSwitchLabel(this.year);\n                this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n                this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n                var selected = this.selected[this.year] || [];\n                var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n                var isMinYear = this.year === this.minYear;\n                var isMaxYear = this.year === this.maxYear;\n                var range = $7c39ee59de2954f9$var$computeMonthRange(this.range, this.year);\n                Array.from(this.grid.children).forEach(function(el, index) {\n                    var classList = el.classList;\n                    var date = $7c39ee59de2954f9$var$dateValue(_this.year, index, 1);\n                    el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this.cellClass);\n                    if (_this.isMinView) el.dataset.date = date;\n                    // reset text on every render to clear the custom content set\n                    // by beforeShow hook at previous render\n                    el.textContent = _this.monthNames[index];\n                    if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) classList.add('disabled');\n                    if (range) {\n                        var _range2 = $7c39ee59de2954f9$var$_slicedToArray(range, 2), rangeStart = _range2[0], rangeEnd = _range2[1];\n                        if (index > rangeStart && index < rangeEnd) classList.add('range');\n                        if (index === rangeStart) classList.add('range-start');\n                        if (index === rangeEnd) classList.add('range-end');\n                    }\n                    if (selected.includes(index)) {\n                        classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n                        classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n                    }\n                    if (index === _this.focused) classList.add('focused');\n                    if (_this.beforeShow) _this.performBeforeHook(el, index, date);\n                });\n            }\n        },\n        {\n            key: \"refresh\",\n            value: function refresh() {\n                var _this2 = this;\n                var selected = this.selected[this.year] || [];\n                var _ref = $7c39ee59de2954f9$var$computeMonthRange(this.range, this.year) || [], _ref2 = $7c39ee59de2954f9$var$_slicedToArray(_ref, 2), rangeStart = _ref2[0], rangeEnd = _ref2[1];\n                this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function(el) {\n                    el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused');\n                    el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n                });\n                Array.from(this.grid.children).forEach(function(el, index) {\n                    var classList = el.classList;\n                    if (index > rangeStart && index < rangeEnd) classList.add('range');\n                    if (index === rangeStart) classList.add('range-start');\n                    if (index === rangeEnd) classList.add('range-end');\n                    if (selected.includes(index)) {\n                        classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n                        classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n                    }\n                    if (index === _this2.focused) classList.add('focused');\n                });\n            }\n        },\n        {\n            key: \"refreshFocus\",\n            value: function refreshFocus() {\n                this.grid.querySelectorAll('.focused').forEach(function(el) {\n                    el.classList.remove('focused');\n                });\n                this.grid.children[this.focused].classList.add('focused');\n            }\n        }\n    ]);\n}($7c39ee59de2954f9$var$View);\nfunction $7c39ee59de2954f9$var$toTitleCase(word) {\n    return $7c39ee59de2954f9$var$_toConsumableArray(word).reduce(function(str, ch, ix) {\n        return str += ix ? ch : ch.toUpperCase();\n    }, '');\n}\n// Class representing the years and decades view elements\nvar $7c39ee59de2954f9$var$YearsView = /*#__PURE__*/ function(_View) {\n    function YearsView(picker, config) {\n        $7c39ee59de2954f9$var$_classCallCheck(this, YearsView);\n        return $7c39ee59de2954f9$var$_callSuper(this, YearsView, [\n            picker,\n            config\n        ]);\n    }\n    $7c39ee59de2954f9$var$_inherits(YearsView, _View);\n    return $7c39ee59de2954f9$var$_createClass(YearsView, [\n        {\n            key: \"init\",\n            value: function init(options) {\n                var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n                if (onConstruction) {\n                    this.navStep = this.step * 10;\n                    this.beforeShowOption = \"beforeShow\".concat($7c39ee59de2954f9$var$toTitleCase(this.cellClass));\n                    this.grid = this.element;\n                    this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n                    this.grid.appendChild($7c39ee59de2954f9$var$parseHTML($7c39ee59de2954f9$var$createTagRepeat('span', 12)));\n                }\n                $7c39ee59de2954f9$var$_get($7c39ee59de2954f9$var$_getPrototypeOf(YearsView.prototype), \"init\", this).call(this, options);\n            }\n        },\n        {\n            key: \"setOptions\",\n            value: function setOptions(options) {\n                if ($7c39ee59de2954f9$var$hasProperty(options, 'minDate')) {\n                    if (options.minDate === undefined) this.minYear = this.minDate = undefined;\n                    else {\n                        this.minYear = $7c39ee59de2954f9$var$startOfYearPeriod(options.minDate, this.step);\n                        this.minDate = $7c39ee59de2954f9$var$dateValue(this.minYear, 0, 1);\n                    }\n                }\n                if ($7c39ee59de2954f9$var$hasProperty(options, 'maxDate')) {\n                    if (options.maxDate === undefined) this.maxYear = this.maxDate = undefined;\n                    else {\n                        this.maxYear = $7c39ee59de2954f9$var$startOfYearPeriod(options.maxDate, this.step);\n                        this.maxDate = $7c39ee59de2954f9$var$dateValue(this.maxYear, 11, 31);\n                    }\n                }\n                if (options[this.beforeShowOption] !== undefined) {\n                    var beforeShow = options[this.beforeShowOption];\n                    this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n                }\n            }\n        },\n        {\n            key: \"updateFocus\",\n            value: function updateFocus() {\n                var viewDate = new Date(this.picker.viewDate);\n                var first = $7c39ee59de2954f9$var$startOfYearPeriod(viewDate, this.navStep);\n                var last = first + 9 * this.step;\n                this.first = first;\n                this.last = last;\n                this.start = first - this.step;\n                this.focused = $7c39ee59de2954f9$var$startOfYearPeriod(viewDate, this.step);\n            }\n        },\n        {\n            key: \"updateSelection\",\n            value: function updateSelection() {\n                var _this = this;\n                var _this$picker$datepick = this.picker.datepicker, dates = _this$picker$datepick.dates, rangepicker = _this$picker$datepick.rangepicker;\n                this.selected = dates.reduce(function(years, timeValue) {\n                    return $7c39ee59de2954f9$var$pushUnique(years, $7c39ee59de2954f9$var$startOfYearPeriod(timeValue, _this.step));\n                }, []);\n                if (rangepicker && rangepicker.dates) this.range = rangepicker.dates.map(function(timeValue) {\n                    if (timeValue !== undefined) return $7c39ee59de2954f9$var$startOfYearPeriod(timeValue, _this.step);\n                });\n            }\n        },\n        {\n            key: \"render\",\n            value: function render() {\n                var _this2 = this;\n                // refresh disabled years on every render in order to clear the ones added\n                // by beforeShow hook at previous render\n                this.disabled = [];\n                this.picker.setViewSwitchLabel(\"\".concat(this.first, \"-\").concat(this.last));\n                this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n                this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n                Array.from(this.grid.children).forEach(function(el, index) {\n                    var classList = el.classList;\n                    var current = _this2.start + index * _this2.step;\n                    var date = $7c39ee59de2954f9$var$dateValue(current, 0, 1);\n                    el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n                    if (_this2.isMinView) el.dataset.date = date;\n                    el.textContent = el.dataset.year = current;\n                    if (index === 0) classList.add('prev');\n                    else if (index === 11) classList.add('next');\n                    if (current < _this2.minYear || current > _this2.maxYear) classList.add('disabled');\n                    if (_this2.range) {\n                        var _this2$range = $7c39ee59de2954f9$var$_slicedToArray(_this2.range, 2), rangeStart = _this2$range[0], rangeEnd = _this2$range[1];\n                        if (current > rangeStart && current < rangeEnd) classList.add('range');\n                        if (current === rangeStart) classList.add('range-start');\n                        if (current === rangeEnd) classList.add('range-end');\n                    }\n                    if (_this2.selected.includes(current)) {\n                        classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n                        classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n                    }\n                    if (current === _this2.focused) classList.add('focused');\n                    if (_this2.beforeShow) _this2.performBeforeHook(el, current, date);\n                });\n            }\n        },\n        {\n            key: \"refresh\",\n            value: function refresh() {\n                var _this3 = this;\n                var _ref = this.range || [], _ref2 = $7c39ee59de2954f9$var$_slicedToArray(_ref, 2), rangeStart = _ref2[0], rangeEnd = _ref2[1];\n                this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function(el) {\n                    el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused');\n                });\n                Array.from(this.grid.children).forEach(function(el) {\n                    var current = Number(el.textContent);\n                    var classList = el.classList;\n                    if (current > rangeStart && current < rangeEnd) classList.add('range');\n                    if (current === rangeStart) classList.add('range-start');\n                    if (current === rangeEnd) classList.add('range-end');\n                    if (_this3.selected.includes(current)) {\n                        classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n                        classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n                    }\n                    if (current === _this3.focused) classList.add('focused');\n                });\n            }\n        },\n        {\n            key: \"refreshFocus\",\n            value: function refreshFocus() {\n                var index = Math.round((this.focused - this.start) / this.step);\n                this.grid.querySelectorAll('.focused').forEach(function(el) {\n                    el.classList.remove('focused');\n                });\n                this.grid.children[index].classList.add('focused');\n            }\n        }\n    ]);\n}($7c39ee59de2954f9$var$View);\nfunction $7c39ee59de2954f9$var$triggerDatepickerEvent(datepicker, type) {\n    var detail = {\n        date: datepicker.getDate(),\n        viewDate: new Date(datepicker.picker.viewDate),\n        viewId: datepicker.picker.currentView.id,\n        datepicker: datepicker\n    };\n    datepicker.element.dispatchEvent(new CustomEvent(type, {\n        detail: detail\n    }));\n}\n// direction: -1 (to previous), 1 (to next)\nfunction $7c39ee59de2954f9$var$goToPrevOrNext(datepicker, direction) {\n    var _datepicker$config = datepicker.config, minDate = _datepicker$config.minDate, maxDate = _datepicker$config.maxDate;\n    var _datepicker$picker = datepicker.picker, currentView = _datepicker$picker.currentView, viewDate = _datepicker$picker.viewDate;\n    var newViewDate;\n    switch(currentView.id){\n        case 0:\n            newViewDate = $7c39ee59de2954f9$var$addMonths(viewDate, direction);\n            break;\n        case 1:\n            newViewDate = $7c39ee59de2954f9$var$addYears(viewDate, direction);\n            break;\n        default:\n            newViewDate = $7c39ee59de2954f9$var$addYears(viewDate, direction * currentView.navStep);\n    }\n    newViewDate = $7c39ee59de2954f9$var$limitToRange(newViewDate, minDate, maxDate);\n    datepicker.picker.changeFocus(newViewDate).render();\n}\nfunction $7c39ee59de2954f9$var$switchView(datepicker) {\n    var viewId = datepicker.picker.currentView.id;\n    if (viewId === datepicker.config.maxView) return;\n    datepicker.picker.changeView(viewId + 1).render();\n}\nfunction $7c39ee59de2954f9$var$unfocus(datepicker) {\n    if (datepicker.config.updateOnBlur) datepicker.update({\n        autohide: true\n    });\n    else {\n        datepicker.refresh('input');\n        datepicker.hide();\n    }\n}\nfunction $7c39ee59de2954f9$var$goToSelectedMonthOrYear(datepicker, selection) {\n    var picker = datepicker.picker;\n    var viewDate = new Date(picker.viewDate);\n    var viewId = picker.currentView.id;\n    var newDate = viewId === 1 ? $7c39ee59de2954f9$var$addMonths(viewDate, selection - viewDate.getMonth()) : $7c39ee59de2954f9$var$addYears(viewDate, selection - viewDate.getFullYear());\n    picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\nfunction $7c39ee59de2954f9$var$onClickTodayBtn(datepicker) {\n    var picker = datepicker.picker;\n    var currentDate = $7c39ee59de2954f9$var$today();\n    if (datepicker.config.todayBtnMode === 1) {\n        if (datepicker.config.autohide) {\n            datepicker.setDate(currentDate);\n            return;\n        }\n        datepicker.setDate(currentDate, {\n            render: false\n        });\n        picker.update();\n    }\n    if (picker.viewDate !== currentDate) picker.changeFocus(currentDate);\n    picker.changeView(0).render();\n}\nfunction $7c39ee59de2954f9$var$onClickClearBtn(datepicker) {\n    datepicker.setDate({\n        clear: true\n    });\n}\nfunction $7c39ee59de2954f9$var$onClickViewSwitch(datepicker) {\n    $7c39ee59de2954f9$var$switchView(datepicker);\n}\nfunction $7c39ee59de2954f9$var$onClickPrevBtn(datepicker) {\n    $7c39ee59de2954f9$var$goToPrevOrNext(datepicker, -1);\n}\nfunction $7c39ee59de2954f9$var$onClickNextBtn(datepicker) {\n    $7c39ee59de2954f9$var$goToPrevOrNext(datepicker, 1);\n}\n// For the picker's main block to delegete the events from `datepicker-cell`s\nfunction $7c39ee59de2954f9$var$onClickView(datepicker, ev) {\n    var target = $7c39ee59de2954f9$var$findElementInEventPath(ev, '.datepicker-cell');\n    if (!target || target.classList.contains('disabled')) return;\n    var _datepicker$picker$cu = datepicker.picker.currentView, id = _datepicker$picker$cu.id, isMinView = _datepicker$picker$cu.isMinView;\n    if (isMinView) datepicker.setDate(Number(target.dataset.date));\n    else if (id === 1) $7c39ee59de2954f9$var$goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n    else $7c39ee59de2954f9$var$goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n}\nfunction $7c39ee59de2954f9$var$onClickPicker(datepicker) {\n    if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) datepicker.inputField.focus();\n}\nfunction $7c39ee59de2954f9$var$processPickerOptions(picker, options) {\n    if (options.title !== undefined) {\n        if (options.title) {\n            picker.controls.title.textContent = options.title;\n            $7c39ee59de2954f9$var$showElement(picker.controls.title);\n        } else {\n            picker.controls.title.textContent = '';\n            $7c39ee59de2954f9$var$hideElement(picker.controls.title);\n        }\n    }\n    if (options.prevArrow) {\n        var prevBtn = picker.controls.prevBtn;\n        $7c39ee59de2954f9$var$emptyChildNodes(prevBtn);\n        options.prevArrow.forEach(function(node) {\n            prevBtn.appendChild(node.cloneNode(true));\n        });\n    }\n    if (options.nextArrow) {\n        var nextBtn = picker.controls.nextBtn;\n        $7c39ee59de2954f9$var$emptyChildNodes(nextBtn);\n        options.nextArrow.forEach(function(node) {\n            nextBtn.appendChild(node.cloneNode(true));\n        });\n    }\n    if (options.locale) {\n        picker.controls.todayBtn.textContent = options.locale.today;\n        picker.controls.clearBtn.textContent = options.locale.clear;\n    }\n    if (options.todayBtn !== undefined) {\n        if (options.todayBtn) $7c39ee59de2954f9$var$showElement(picker.controls.todayBtn);\n        else $7c39ee59de2954f9$var$hideElement(picker.controls.todayBtn);\n    }\n    if ($7c39ee59de2954f9$var$hasProperty(options, 'minDate') || $7c39ee59de2954f9$var$hasProperty(options, 'maxDate')) {\n        var _picker$datepicker$co = picker.datepicker.config, minDate = _picker$datepicker$co.minDate, maxDate = _picker$datepicker$co.maxDate;\n        picker.controls.todayBtn.disabled = !$7c39ee59de2954f9$var$isInRange($7c39ee59de2954f9$var$today(), minDate, maxDate);\n    }\n    if (options.clearBtn !== undefined) {\n        if (options.clearBtn) $7c39ee59de2954f9$var$showElement(picker.controls.clearBtn);\n        else $7c39ee59de2954f9$var$hideElement(picker.controls.clearBtn);\n    }\n}\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction $7c39ee59de2954f9$var$computeResetViewDate(datepicker) {\n    var dates = datepicker.dates, config = datepicker.config;\n    var viewDate = dates.length > 0 ? $7c39ee59de2954f9$var$lastItemOf(dates) : config.defaultViewDate;\n    return $7c39ee59de2954f9$var$limitToRange(viewDate, config.minDate, config.maxDate);\n}\n// Change current view's view date\nfunction $7c39ee59de2954f9$var$setViewDate(picker, newDate) {\n    var oldViewDate = new Date(picker.viewDate);\n    var newViewDate = new Date(newDate);\n    var _picker$currentView = picker.currentView, id = _picker$currentView.id, year = _picker$currentView.year, first = _picker$currentView.first, last = _picker$currentView.last;\n    var viewYear = newViewDate.getFullYear();\n    picker.viewDate = newDate;\n    if (viewYear !== oldViewDate.getFullYear()) $7c39ee59de2954f9$var$triggerDatepickerEvent(picker.datepicker, 'changeYear');\n    if (newViewDate.getMonth() !== oldViewDate.getMonth()) $7c39ee59de2954f9$var$triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n    // return whether the new date is in different period on time from the one\n    // displayed in the current view\n    // when true, the view needs to be re-rendered on the next UI refresh.\n    switch(id){\n        case 0:\n            return newDate < first || newDate > last;\n        case 1:\n            return viewYear !== year;\n        default:\n            return viewYear < first || viewYear > last;\n    }\n}\nfunction $7c39ee59de2954f9$var$getTextDirection(el) {\n    return window.getComputedStyle(el).direction;\n}\n// Class representing the picker UI\nvar $7c39ee59de2954f9$var$Picker = /*#__PURE__*/ function() {\n    function Picker(datepicker) {\n        $7c39ee59de2954f9$var$_classCallCheck(this, Picker);\n        this.datepicker = datepicker;\n        var template = $7c39ee59de2954f9$var$pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n        var element = this.element = $7c39ee59de2954f9$var$parseHTML(template).firstChild;\n        var _element$firstChild$c = $7c39ee59de2954f9$var$_slicedToArray(element.firstChild.children, 3), header = _element$firstChild$c[0], main = _element$firstChild$c[1], footer = _element$firstChild$c[2];\n        var title = header.firstElementChild;\n        var _header$lastElementCh = $7c39ee59de2954f9$var$_slicedToArray(header.lastElementChild.children, 3), prevBtn = _header$lastElementCh[0], viewSwitch = _header$lastElementCh[1], nextBtn = _header$lastElementCh[2];\n        var _footer$firstChild$ch = $7c39ee59de2954f9$var$_slicedToArray(footer.firstChild.children, 2), todayBtn = _footer$firstChild$ch[0], clearBtn = _footer$firstChild$ch[1];\n        var controls = {\n            title: title,\n            prevBtn: prevBtn,\n            viewSwitch: viewSwitch,\n            nextBtn: nextBtn,\n            todayBtn: todayBtn,\n            clearBtn: clearBtn\n        };\n        this.main = main;\n        this.controls = controls;\n        var elementClass = datepicker.inline ? 'inline' : 'dropdown';\n        element.classList.add(\"datepicker-\".concat(elementClass));\n        elementClass === 'dropdown' && element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2');\n        $7c39ee59de2954f9$var$processPickerOptions(this, datepicker.config);\n        this.viewDate = $7c39ee59de2954f9$var$computeResetViewDate(datepicker);\n        // set up event listeners\n        $7c39ee59de2954f9$var$registerListeners(datepicker, [\n            [\n                element,\n                'click',\n                $7c39ee59de2954f9$var$onClickPicker.bind(null, datepicker),\n                {\n                    capture: true\n                }\n            ],\n            [\n                main,\n                'click',\n                $7c39ee59de2954f9$var$onClickView.bind(null, datepicker)\n            ],\n            [\n                controls.viewSwitch,\n                'click',\n                $7c39ee59de2954f9$var$onClickViewSwitch.bind(null, datepicker)\n            ],\n            [\n                controls.prevBtn,\n                'click',\n                $7c39ee59de2954f9$var$onClickPrevBtn.bind(null, datepicker)\n            ],\n            [\n                controls.nextBtn,\n                'click',\n                $7c39ee59de2954f9$var$onClickNextBtn.bind(null, datepicker)\n            ],\n            [\n                controls.todayBtn,\n                'click',\n                $7c39ee59de2954f9$var$onClickTodayBtn.bind(null, datepicker)\n            ],\n            [\n                controls.clearBtn,\n                'click',\n                $7c39ee59de2954f9$var$onClickClearBtn.bind(null, datepicker)\n            ]\n        ]);\n        // set up views\n        this.views = [\n            new $7c39ee59de2954f9$var$DaysView(this),\n            new $7c39ee59de2954f9$var$MonthsView(this),\n            new $7c39ee59de2954f9$var$YearsView(this, {\n                id: 2,\n                name: 'years',\n                cellClass: 'year',\n                step: 1\n            }),\n            new $7c39ee59de2954f9$var$YearsView(this, {\n                id: 3,\n                name: 'decades',\n                cellClass: 'decade',\n                step: 10\n            })\n        ];\n        this.currentView = this.views[datepicker.config.startView];\n        this.currentView.render();\n        this.main.appendChild(this.currentView.element);\n        datepicker.config.container.appendChild(this.element);\n    }\n    return $7c39ee59de2954f9$var$_createClass(Picker, [\n        {\n            key: \"setOptions\",\n            value: function setOptions(options) {\n                $7c39ee59de2954f9$var$processPickerOptions(this, options);\n                this.views.forEach(function(view) {\n                    view.init(options, false);\n                });\n                this.currentView.render();\n            }\n        },\n        {\n            key: \"detach\",\n            value: function detach() {\n                this.datepicker.config.container.removeChild(this.element);\n            }\n        },\n        {\n            key: \"show\",\n            value: function show() {\n                if (this.active) return;\n                this.element.classList.add('active', 'block');\n                this.element.classList.remove('hidden');\n                this.active = true;\n                var datepicker = this.datepicker;\n                if (!datepicker.inline) {\n                    // ensure picker's direction matches input's\n                    var inputDirection = $7c39ee59de2954f9$var$getTextDirection(datepicker.inputField);\n                    if (inputDirection !== $7c39ee59de2954f9$var$getTextDirection(datepicker.config.container)) this.element.dir = inputDirection;\n                    else if (this.element.dir) this.element.removeAttribute('dir');\n                    this.place();\n                    if (datepicker.config.disableTouchKeyboard) datepicker.inputField.blur();\n                }\n                $7c39ee59de2954f9$var$triggerDatepickerEvent(datepicker, 'show');\n            }\n        },\n        {\n            key: \"hide\",\n            value: function hide() {\n                if (!this.active) return;\n                this.datepicker.exitEditMode();\n                this.element.classList.remove('active', 'block');\n                this.element.classList.add('active', 'block', 'hidden');\n                this.active = false;\n                $7c39ee59de2954f9$var$triggerDatepickerEvent(this.datepicker, 'hide');\n            }\n        },\n        {\n            key: \"place\",\n            value: function place() {\n                var _this$element = this.element, classList = _this$element.classList, style = _this$element.style;\n                var _this$datepicker = this.datepicker, config = _this$datepicker.config, inputField = _this$datepicker.inputField;\n                var container = config.container;\n                var _this$element$getBoun = this.element.getBoundingClientRect(), calendarWidth = _this$element$getBoun.width, calendarHeight = _this$element$getBoun.height;\n                var _container$getBoundin = container.getBoundingClientRect(), containerLeft = _container$getBoundin.left, containerTop = _container$getBoundin.top, containerWidth = _container$getBoundin.width;\n                var _inputField$getBoundi = inputField.getBoundingClientRect(), inputLeft = _inputField$getBoundi.left, inputTop = _inputField$getBoundi.top, inputWidth = _inputField$getBoundi.width, inputHeight = _inputField$getBoundi.height;\n                var _config$orientation = config.orientation, orientX = _config$orientation.x, orientY = _config$orientation.y;\n                var scrollTop;\n                var left;\n                var top;\n                if (container === document.body) {\n                    scrollTop = window.scrollY;\n                    left = inputLeft + window.scrollX;\n                    top = inputTop + scrollTop;\n                } else {\n                    scrollTop = container.scrollTop;\n                    left = inputLeft - containerLeft;\n                    top = inputTop - containerTop + scrollTop;\n                }\n                if (orientX === 'auto') {\n                    if (left < 0) {\n                        // align to the left and move into visible area if input's left edge < window's\n                        orientX = 'left';\n                        left = 10;\n                    } else if (left + calendarWidth > containerWidth) // align to the right if canlendar's right edge > container's\n                    orientX = 'right';\n                    else orientX = $7c39ee59de2954f9$var$getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n                }\n                if (orientX === 'right') left -= calendarWidth - inputWidth;\n                if (orientY === 'auto') orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n                if (orientY === 'top') top -= calendarHeight;\n                else top += inputHeight;\n                classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left');\n                classList.add(\"datepicker-orient-\".concat(orientY), \"datepicker-orient-\".concat(orientX));\n                style.top = top ? \"\".concat(top, \"px\") : top;\n                style.left = left ? \"\".concat(left, \"px\") : left;\n            }\n        },\n        {\n            key: \"setViewSwitchLabel\",\n            value: function setViewSwitchLabel(labelText) {\n                this.controls.viewSwitch.textContent = labelText;\n            }\n        },\n        {\n            key: \"setPrevBtnDisabled\",\n            value: function setPrevBtnDisabled(disabled) {\n                this.controls.prevBtn.disabled = disabled;\n            }\n        },\n        {\n            key: \"setNextBtnDisabled\",\n            value: function setNextBtnDisabled(disabled) {\n                this.controls.nextBtn.disabled = disabled;\n            }\n        },\n        {\n            key: \"changeView\",\n            value: function changeView(viewId) {\n                var oldView = this.currentView;\n                var newView = this.views[viewId];\n                if (newView.id !== oldView.id) {\n                    this.currentView = newView;\n                    this._renderMethod = 'render';\n                    $7c39ee59de2954f9$var$triggerDatepickerEvent(this.datepicker, 'changeView');\n                    this.main.replaceChild(newView.element, oldView.element);\n                }\n                return this;\n            }\n        },\n        {\n            key: \"changeFocus\",\n            value: function changeFocus(newViewDate) {\n                this._renderMethod = $7c39ee59de2954f9$var$setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n                this.views.forEach(function(view) {\n                    view.updateFocus();\n                });\n                return this;\n            }\n        },\n        {\n            key: \"update\",\n            value: function update() {\n                var newViewDate = $7c39ee59de2954f9$var$computeResetViewDate(this.datepicker);\n                this._renderMethod = $7c39ee59de2954f9$var$setViewDate(this, newViewDate) ? 'render' : 'refresh';\n                this.views.forEach(function(view) {\n                    view.updateFocus();\n                    view.updateSelection();\n                });\n                return this;\n            }\n        },\n        {\n            key: \"render\",\n            value: function render() {\n                var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n                var renderMethod = quickRender && this._renderMethod || 'render';\n                delete this._renderMethod;\n                this.currentView[renderMethod]();\n            }\n        }\n    ]);\n}();\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n//   - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n//   - args: time value; retun: true if unavailable\nfunction $7c39ee59de2954f9$var$findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n    if (!$7c39ee59de2954f9$var$isInRange(date, min, max)) return;\n    if (testFn(date)) {\n        var newDate = addFn(date, increase);\n        return $7c39ee59de2954f9$var$findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n    }\n    return date;\n}\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction $7c39ee59de2954f9$var$moveByArrowKey(datepicker, ev, direction, vertical) {\n    var picker = datepicker.picker;\n    var currentView = picker.currentView;\n    var step = currentView.step || 1;\n    var viewDate = picker.viewDate;\n    var addFn;\n    var testFn;\n    switch(currentView.id){\n        case 0:\n            if (vertical) viewDate = $7c39ee59de2954f9$var$addDays(viewDate, direction * 7);\n            else if (ev.ctrlKey || ev.metaKey) viewDate = $7c39ee59de2954f9$var$addYears(viewDate, direction);\n            else viewDate = $7c39ee59de2954f9$var$addDays(viewDate, direction);\n            addFn = $7c39ee59de2954f9$var$addDays;\n            testFn = function testFn(date) {\n                return currentView.disabled.includes(date);\n            };\n            break;\n        case 1:\n            viewDate = $7c39ee59de2954f9$var$addMonths(viewDate, vertical ? direction * 4 : direction);\n            addFn = $7c39ee59de2954f9$var$addMonths;\n            testFn = function testFn(date) {\n                var dt = new Date(date);\n                var year = currentView.year, disabled = currentView.disabled;\n                return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n            };\n            break;\n        default:\n            viewDate = $7c39ee59de2954f9$var$addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n            addFn = $7c39ee59de2954f9$var$addYears;\n            testFn = function testFn(date) {\n                return currentView.disabled.includes($7c39ee59de2954f9$var$startOfYearPeriod(date, step));\n            };\n    }\n    viewDate = $7c39ee59de2954f9$var$findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate);\n    if (viewDate !== undefined) picker.changeFocus(viewDate).render();\n}\nfunction $7c39ee59de2954f9$var$onKeydown(datepicker, ev) {\n    if (ev.key === 'Tab') {\n        $7c39ee59de2954f9$var$unfocus(datepicker);\n        return;\n    }\n    var picker = datepicker.picker;\n    var _picker$currentView = picker.currentView, id = _picker$currentView.id, isMinView = _picker$currentView.isMinView;\n    if (!picker.active) switch(ev.key){\n        case 'ArrowDown':\n        case 'Escape':\n            picker.show();\n            break;\n        case 'Enter':\n            datepicker.update();\n            break;\n        default:\n            return;\n    }\n    else if (datepicker.editMode) switch(ev.key){\n        case 'Escape':\n            picker.hide();\n            break;\n        case 'Enter':\n            datepicker.exitEditMode({\n                update: true,\n                autohide: datepicker.config.autohide\n            });\n            break;\n        default:\n            return;\n    }\n    else switch(ev.key){\n        case 'Escape':\n            picker.hide();\n            break;\n        case 'ArrowLeft':\n            if (ev.ctrlKey || ev.metaKey) $7c39ee59de2954f9$var$goToPrevOrNext(datepicker, -1);\n            else if (ev.shiftKey) {\n                datepicker.enterEditMode();\n                return;\n            } else $7c39ee59de2954f9$var$moveByArrowKey(datepicker, ev, -1, false);\n            break;\n        case 'ArrowRight':\n            if (ev.ctrlKey || ev.metaKey) $7c39ee59de2954f9$var$goToPrevOrNext(datepicker, 1);\n            else if (ev.shiftKey) {\n                datepicker.enterEditMode();\n                return;\n            } else $7c39ee59de2954f9$var$moveByArrowKey(datepicker, ev, 1, false);\n            break;\n        case 'ArrowUp':\n            if (ev.ctrlKey || ev.metaKey) $7c39ee59de2954f9$var$switchView(datepicker);\n            else if (ev.shiftKey) {\n                datepicker.enterEditMode();\n                return;\n            } else $7c39ee59de2954f9$var$moveByArrowKey(datepicker, ev, -1, true);\n            break;\n        case 'ArrowDown':\n            if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n                datepicker.enterEditMode();\n                return;\n            }\n            $7c39ee59de2954f9$var$moveByArrowKey(datepicker, ev, 1, true);\n            break;\n        case 'Enter':\n            if (isMinView) datepicker.setDate(picker.viewDate);\n            else picker.changeView(id - 1).render();\n            break;\n        case 'Backspace':\n        case 'Delete':\n            datepicker.enterEditMode();\n            return;\n        default:\n            if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) datepicker.enterEditMode();\n            return;\n    }\n    ev.preventDefault();\n    ev.stopPropagation();\n}\nfunction $7c39ee59de2954f9$var$onFocus(datepicker) {\n    if (datepicker.config.showOnFocus && !datepicker._showing) datepicker.show();\n}\n// for the prevention for entering edit mode while getting focus on click\nfunction $7c39ee59de2954f9$var$onMousedown(datepicker, ev) {\n    var el = ev.target;\n    if (datepicker.picker.active || datepicker.config.showOnClick) {\n        el._active = el === document.activeElement;\n        el._clicking = setTimeout(function() {\n            delete el._active;\n            delete el._clicking;\n        }, 2000);\n    }\n}\nfunction $7c39ee59de2954f9$var$onClickInput(datepicker, ev) {\n    var el = ev.target;\n    if (!el._clicking) return;\n    clearTimeout(el._clicking);\n    delete el._clicking;\n    if (el._active) datepicker.enterEditMode();\n    delete el._active;\n    if (datepicker.config.showOnClick) datepicker.show();\n}\nfunction $7c39ee59de2954f9$var$onPaste(datepicker, ev) {\n    if (ev.clipboardData.types.includes('text/plain')) datepicker.enterEditMode();\n}\n// for the `document` to delegate the events from outside the picker/input field\nfunction $7c39ee59de2954f9$var$onClickOutside(datepicker, ev) {\n    var element = datepicker.element;\n    if (element !== document.activeElement) return;\n    var pickerElem = datepicker.picker.element;\n    if ($7c39ee59de2954f9$var$findElementInEventPath(ev, function(el) {\n        return el === element || el === pickerElem;\n    })) return;\n    $7c39ee59de2954f9$var$unfocus(datepicker);\n}\nfunction $7c39ee59de2954f9$var$stringifyDates(dates, config) {\n    return dates.map(function(dt) {\n        return $7c39ee59de2954f9$var$formatDate(dt, config.format, config.locale);\n    }).join(config.dateDelimiter);\n}\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction $7c39ee59de2954f9$var$processInputDates(datepicker, inputDates) {\n    var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    var config = datepicker.config, origDates = datepicker.dates, rangepicker = datepicker.rangepicker;\n    if (inputDates.length === 0) // empty input is considered valid unless origiDates is passed\n    return clear ? [] : undefined;\n    var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n    var newDates = inputDates.reduce(function(dates, dt) {\n        var date = $7c39ee59de2954f9$var$parseDate(dt, config.format, config.locale);\n        if (date === undefined) return dates;\n        if (config.pickLevel > 0) {\n            // adjust to 1st of the month/Jan 1st of the year\n            // or to the last day of the monh/Dec 31st of the year if the datepicker\n            // is the range-end picker of a rangepicker\n            var _dt = new Date(date);\n            if (config.pickLevel === 1) date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1);\n            else date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1);\n        }\n        if ($7c39ee59de2954f9$var$isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) dates.push(date);\n        return dates;\n    }, []);\n    if (newDates.length === 0) return;\n    if (config.multidate && !clear) // get the synmetric difference between origDates and newDates\n    newDates = newDates.reduce(function(dates, date) {\n        if (!origDates.includes(date)) dates.push(date);\n        return dates;\n    }, origDates.filter(function(date) {\n        return !newDates.includes(date);\n    }));\n    // do length check always because user can input multiple dates regardless of the mode\n    return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates;\n}\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction $7c39ee59de2954f9$var$refreshUI(datepicker) {\n    var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n    var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n    var config = datepicker.config, picker = datepicker.picker, inputField = datepicker.inputField;\n    if (mode & 2) {\n        var newView = picker.active ? config.pickLevel : config.startView;\n        picker.update().changeView(newView).render(quickRender);\n    }\n    if (mode & 1 && inputField) inputField.value = $7c39ee59de2954f9$var$stringifyDates(datepicker.dates, config);\n}\nfunction $7c39ee59de2954f9$var$_setDate(datepicker, inputDates, options) {\n    var clear = options.clear, render = options.render, autohide = options.autohide;\n    if (render === undefined) render = true;\n    if (!render) autohide = false;\n    else if (autohide === undefined) autohide = datepicker.config.autohide;\n    var newDates = $7c39ee59de2954f9$var$processInputDates(datepicker, inputDates, clear);\n    if (!newDates) return;\n    if (newDates.toString() !== datepicker.dates.toString()) {\n        datepicker.dates = newDates;\n        $7c39ee59de2954f9$var$refreshUI(datepicker, render ? 3 : 1);\n        $7c39ee59de2954f9$var$triggerDatepickerEvent(datepicker, 'changeDate');\n    } else $7c39ee59de2954f9$var$refreshUI(datepicker, 1);\n    if (autohide) datepicker.hide();\n}\n/**\r\n * Class representing a date picker\r\n */ var $7c39ee59de2954f9$export$7235422eca03ec90 = /*#__PURE__*/ function() {\n    /**\r\n   * Create a date picker\r\n   * @param  {Element} element - element to bind a date picker\r\n   * @param  {Object} [options] - config options\r\n   * @param  {DateRangePicker} [rangepicker] - DateRangePicker instance the\r\n   * date picker belongs to. Use this only when creating date picker as a part\r\n   * of date range picker\r\n   */ function Datepicker(element) {\n        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n        $7c39ee59de2954f9$var$_classCallCheck(this, Datepicker);\n        element.datepicker = this;\n        this.element = element;\n        // set up config\n        var config = this.config = Object.assign({\n            buttonClass: options.buttonClass && String(options.buttonClass) || 'button',\n            container: document.body,\n            defaultViewDate: $7c39ee59de2954f9$var$today(),\n            maxDate: undefined,\n            minDate: undefined\n        }, $7c39ee59de2954f9$var$processOptions($7c39ee59de2954f9$var$defaultOptions, this));\n        this._options = options;\n        Object.assign(config, $7c39ee59de2954f9$var$processOptions(options, this));\n        // configure by type\n        var inline = this.inline = element.tagName !== 'INPUT';\n        var inputField;\n        var initialDates;\n        if (inline) {\n            config.container = element;\n            initialDates = $7c39ee59de2954f9$var$stringToArray(element.dataset.date, config.dateDelimiter);\n            delete element.dataset.date;\n        } else {\n            var container = options.container ? document.querySelector(options.container) : null;\n            if (container) config.container = container;\n            inputField = this.inputField = element;\n            inputField.classList.add('datepicker-input');\n            initialDates = $7c39ee59de2954f9$var$stringToArray(inputField.value, config.dateDelimiter);\n        }\n        if (rangepicker) {\n            // check validiry\n            var index = rangepicker.inputs.indexOf(inputField);\n            var datepickers = rangepicker.datepickers;\n            if (index < 0 || index > 1 || !Array.isArray(datepickers)) throw Error('Invalid rangepicker object.');\n            // attach itaelf to the rangepicker here so that processInputDates() can\n            // determine if this is the range-end picker of the rangepicker while\n            // setting inital values when pickLevel > 0\n            datepickers[index] = this;\n            // add getter for rangepicker\n            Object.defineProperty(this, 'rangepicker', {\n                get: function get() {\n                    return rangepicker;\n                }\n            });\n        }\n        // set initial dates\n        this.dates = [];\n        // process initial value\n        var inputDateValues = $7c39ee59de2954f9$var$processInputDates(this, initialDates);\n        if (inputDateValues && inputDateValues.length > 0) this.dates = inputDateValues;\n        if (inputField) inputField.value = $7c39ee59de2954f9$var$stringifyDates(this.dates, config);\n        var picker = this.picker = new $7c39ee59de2954f9$var$Picker(this);\n        if (inline) this.show();\n        else {\n            // set up event listeners in other modes\n            var onMousedownDocument = $7c39ee59de2954f9$var$onClickOutside.bind(null, this);\n            var listeners = [\n                [\n                    inputField,\n                    'keydown',\n                    $7c39ee59de2954f9$var$onKeydown.bind(null, this)\n                ],\n                [\n                    inputField,\n                    'focus',\n                    $7c39ee59de2954f9$var$onFocus.bind(null, this)\n                ],\n                [\n                    inputField,\n                    'mousedown',\n                    $7c39ee59de2954f9$var$onMousedown.bind(null, this)\n                ],\n                [\n                    inputField,\n                    'click',\n                    $7c39ee59de2954f9$var$onClickInput.bind(null, this)\n                ],\n                [\n                    inputField,\n                    'paste',\n                    $7c39ee59de2954f9$var$onPaste.bind(null, this)\n                ],\n                [\n                    document,\n                    'mousedown',\n                    onMousedownDocument\n                ],\n                [\n                    document,\n                    'touchstart',\n                    onMousedownDocument\n                ],\n                [\n                    window,\n                    'resize',\n                    picker.place.bind(picker)\n                ]\n            ];\n            $7c39ee59de2954f9$var$registerListeners(this, listeners);\n        }\n    }\n    /**\r\n   * Format Date object or time value in given format and language\r\n   * @param  {Date|Number} date - date or time value to format\r\n   * @param  {String|Object} format - format string or object that contains\r\n   * toDisplay() custom formatter, whose signature is\r\n   * - args:\r\n   *   - date: {Date} - Date instance of the date passed to the method\r\n   *   - format: {Object} - the format object passed to the method\r\n   *   - locale: {Object} - locale for the language specified by `lang`\r\n   * - return:\r\n   *     {String} formatted date\r\n   * @param  {String} [lang=en] - language code for the locale to use\r\n   * @return {String} formatted date\r\n   */ return $7c39ee59de2954f9$var$_createClass(Datepicker, [\n        {\n            key: \"active\",\n            get: /**\r\n     * @type {Boolean} - Whether the picker element is shown. `true` whne shown\r\n     */ function get() {\n                return !!(this.picker && this.picker.active);\n            }\n        },\n        {\n            key: \"pickerElement\",\n            get: function get() {\n                return this.picker ? this.picker.element : undefined;\n            }\n        },\n        {\n            key: \"setOptions\",\n            value: function setOptions(options) {\n                var picker = this.picker;\n                var newOptions = $7c39ee59de2954f9$var$processOptions(options, this);\n                Object.assign(this._options, options);\n                Object.assign(this.config, newOptions);\n                picker.setOptions(newOptions);\n                $7c39ee59de2954f9$var$refreshUI(this, 3);\n            }\n        },\n        {\n            key: \"show\",\n            value: function show() {\n                if (this.inputField) {\n                    if (this.inputField.disabled) return;\n                    if (this.inputField !== document.activeElement) {\n                        this._showing = true;\n                        this.inputField.focus();\n                        delete this._showing;\n                    }\n                }\n                this.picker.show();\n            }\n        },\n        {\n            key: \"hide\",\n            value: function hide() {\n                if (this.inline) return;\n                this.picker.hide();\n                this.picker.update().changeView(this.config.startView).render();\n            }\n        },\n        {\n            key: \"destroy\",\n            value: function destroy() {\n                this.hide();\n                $7c39ee59de2954f9$var$unregisterListeners(this);\n                this.picker.detach();\n                if (!this.inline) this.inputField.classList.remove('datepicker-input');\n                delete this.element.datepicker;\n                return this;\n            }\n        },\n        {\n            key: \"getDate\",\n            value: function getDate() {\n                var _this = this;\n                var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n                var callback = format ? function(date) {\n                    return $7c39ee59de2954f9$var$formatDate(date, format, _this.config.locale);\n                } : function(date) {\n                    return new Date(date);\n                };\n                if (this.config.multidate) return this.dates.map(callback);\n                if (this.dates.length > 0) return callback(this.dates[0]);\n            }\n        },\n        {\n            key: \"setDate\",\n            value: function setDate() {\n                for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key];\n                var dates = [].concat(args);\n                var opts = {};\n                var lastArg = $7c39ee59de2954f9$var$lastItemOf(args);\n                if ($7c39ee59de2954f9$var$_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) Object.assign(opts, dates.pop());\n                var inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n                $7c39ee59de2954f9$var$_setDate(this, inputDates, opts);\n            }\n        },\n        {\n            key: \"update\",\n            value: function update() {\n                var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n                if (this.inline) return;\n                var opts = {\n                    clear: true,\n                    autohide: !!(options && options.autohide)\n                };\n                var inputDates = $7c39ee59de2954f9$var$stringToArray(this.inputField.value, this.config.dateDelimiter);\n                $7c39ee59de2954f9$var$_setDate(this, inputDates, opts);\n            }\n        },\n        {\n            key: \"refresh\",\n            value: function refresh() {\n                var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n                var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n                if (target && typeof target !== 'string') {\n                    forceRender = target;\n                    target = undefined;\n                }\n                var mode;\n                if (target === 'picker') mode = 2;\n                else if (target === 'input') mode = 1;\n                else mode = 3;\n                $7c39ee59de2954f9$var$refreshUI(this, mode, !forceRender);\n            }\n        },\n        {\n            key: \"enterEditMode\",\n            value: function enterEditMode() {\n                if (this.inline || !this.picker.active || this.editMode) return;\n                this.editMode = true;\n                this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700');\n            }\n        },\n        {\n            key: \"exitEditMode\",\n            value: function exitEditMode() {\n                var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n                if (this.inline || !this.editMode) return;\n                var opts = Object.assign({\n                    update: false\n                }, options);\n                delete this.editMode;\n                this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700');\n                if (opts.update) this.update(opts);\n            }\n        }\n    ], [\n        {\n            key: \"formatDate\",\n            value: function formatDate$1(date, format, lang) {\n                return $7c39ee59de2954f9$var$formatDate(date, format, lang && $7c39ee59de2954f9$var$locales[lang] || $7c39ee59de2954f9$var$locales.en);\n            }\n        },\n        {\n            key: \"parseDate\",\n            value: function parseDate$1(dateStr, format, lang) {\n                return $7c39ee59de2954f9$var$parseDate(dateStr, format, lang && $7c39ee59de2954f9$var$locales[lang] || $7c39ee59de2954f9$var$locales.en);\n            }\n        },\n        {\n            key: \"locales\",\n            get: function get() {\n                return $7c39ee59de2954f9$var$locales;\n            }\n        }\n    ]);\n}();\n// filter out the config options inapproprite to pass to Datepicker\nfunction $7c39ee59de2954f9$var$filterOptions(options) {\n    var newOpts = Object.assign({}, options);\n    delete newOpts.inputs;\n    delete newOpts.allowOneSidedRange;\n    delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n    return newOpts;\n}\nfunction $7c39ee59de2954f9$var$setupDatepicker(rangepicker, changeDateListener, el, options) {\n    $7c39ee59de2954f9$var$registerListeners(rangepicker, [\n        [\n            el,\n            'changeDate',\n            changeDateListener\n        ]\n    ]);\n    new $7c39ee59de2954f9$export$7235422eca03ec90(el, options, rangepicker);\n}\nfunction $7c39ee59de2954f9$var$onChangeDate(rangepicker, ev) {\n    // to prevent both datepickers trigger the other side's update each other\n    if (rangepicker._updating) return;\n    rangepicker._updating = true;\n    var target = ev.target;\n    if (target.datepicker === undefined) return;\n    var datepickers = rangepicker.datepickers;\n    var setDateOptions = {\n        render: false\n    };\n    var changedSide = rangepicker.inputs.indexOf(target);\n    var otherSide = changedSide === 0 ? 1 : 0;\n    var changedDate = datepickers[changedSide].dates[0];\n    var otherDate = datepickers[otherSide].dates[0];\n    if (changedDate !== undefined && otherDate !== undefined) {\n        // if the start of the range > the end, swap them\n        if (changedSide === 0 && changedDate > otherDate) {\n            datepickers[0].setDate(otherDate, setDateOptions);\n            datepickers[1].setDate(changedDate, setDateOptions);\n        } else if (changedSide === 1 && changedDate < otherDate) {\n            datepickers[0].setDate(changedDate, setDateOptions);\n            datepickers[1].setDate(otherDate, setDateOptions);\n        }\n    } else if (!rangepicker.allowOneSidedRange) // to prevent the range from becoming one-sided, copy changed side's\n    // selection (no matter if it's empty) to the other side\n    {\n        if (changedDate !== undefined || otherDate !== undefined) {\n            setDateOptions.clear = true;\n            datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n        }\n    }\n    datepickers[0].picker.update().render();\n    datepickers[1].picker.update().render();\n    delete rangepicker._updating;\n}\n/**\r\n * Class representing a date range picker\r\n */ var $7c39ee59de2954f9$export$17334619f3ac2224 = /*#__PURE__*/ function() {\n    /**\r\n   * Create a date range picker\r\n   * @param  {Element} element - element to bind a date range picker\r\n   * @param  {Object} [options] - config options\r\n   */ function DateRangePicker(element) {\n        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        $7c39ee59de2954f9$var$_classCallCheck(this, DateRangePicker);\n        var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input'));\n        if (inputs.length < 2) return;\n        element.rangepicker = this;\n        this.element = element;\n        this.inputs = inputs.slice(0, 2);\n        this.allowOneSidedRange = !!options.allowOneSidedRange;\n        var changeDateListener = $7c39ee59de2954f9$var$onChangeDate.bind(null, this);\n        var cleanOptions = $7c39ee59de2954f9$var$filterOptions(options);\n        // in order for initial date setup to work right when pcicLvel > 0,\n        // let Datepicker constructor add the instance to the rangepicker\n        var datepickers = [];\n        Object.defineProperty(this, 'datepickers', {\n            get: function get() {\n                return datepickers;\n            }\n        });\n        $7c39ee59de2954f9$var$setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n        $7c39ee59de2954f9$var$setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n        Object.freeze(datepickers);\n        // normalize the range if inital dates are given\n        if (datepickers[0].dates.length > 0) $7c39ee59de2954f9$var$onChangeDate(this, {\n            target: this.inputs[0]\n        });\n        else if (datepickers[1].dates.length > 0) $7c39ee59de2954f9$var$onChangeDate(this, {\n            target: this.inputs[1]\n        });\n    }\n    /**\r\n   * @type {Array} - selected date of the linked date pickers\r\n   */ return $7c39ee59de2954f9$var$_createClass(DateRangePicker, [\n        {\n            key: \"dates\",\n            get: function get() {\n                return this.datepickers.length === 2 ? [\n                    this.datepickers[0].dates[0],\n                    this.datepickers[1].dates[0]\n                ] : undefined;\n            }\n        },\n        {\n            key: \"setOptions\",\n            value: function setOptions(options) {\n                this.allowOneSidedRange = !!options.allowOneSidedRange;\n                var cleanOptions = $7c39ee59de2954f9$var$filterOptions(options);\n                this.datepickers[0].setOptions(cleanOptions);\n                this.datepickers[1].setOptions(cleanOptions);\n            }\n        },\n        {\n            key: \"destroy\",\n            value: function destroy() {\n                this.datepickers[0].destroy();\n                this.datepickers[1].destroy();\n                $7c39ee59de2954f9$var$unregisterListeners(this);\n                delete this.element.rangepicker;\n            }\n        },\n        {\n            key: \"getDates\",\n            value: function getDates() {\n                var _this = this;\n                var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n                var callback = format ? function(date) {\n                    return $7c39ee59de2954f9$var$formatDate(date, format, _this.datepickers[0].config.locale);\n                } : function(date) {\n                    return new Date(date);\n                };\n                return this.dates.map(function(date) {\n                    return date === undefined ? date : callback(date);\n                });\n            }\n        },\n        {\n            key: \"setDates\",\n            value: function setDates(rangeStart, rangeEnd) {\n                var _this$datepickers = $7c39ee59de2954f9$var$_slicedToArray(this.datepickers, 2), datepicker0 = _this$datepickers[0], datepicker1 = _this$datepickers[1];\n                var origDates = this.dates;\n                // If range normalization runs on every change, we can't set a new range\n                // that starts after the end of the current range correctly because the\n                // normalization process swaps start↔︎end right after setting the new start\n                // date. To prevent this, the normalization process needs to run once after\n                // both of the new dates are set.\n                this._updating = true;\n                datepicker0.setDate(rangeStart);\n                datepicker1.setDate(rangeEnd);\n                delete this._updating;\n                if (datepicker1.dates[0] !== origDates[1]) $7c39ee59de2954f9$var$onChangeDate(this, {\n                    target: this.inputs[1]\n                });\n                else if (datepicker0.dates[0] !== origDates[0]) $7c39ee59de2954f9$var$onChangeDate(this, {\n                    target: this.inputs[0]\n                });\n            }\n        }\n    ]);\n}();\n\n\nvar $b94af47b4b1b850b$var$__assign = undefined && undefined.__assign || function() {\n    $b94af47b4b1b850b$var$__assign = Object.assign || function(t) {\n        for(var s, i = 1, n = arguments.length; i < n; i++){\n            s = arguments[i];\n            for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return $b94af47b4b1b850b$var$__assign.apply(this, arguments);\n};\nvar $b94af47b4b1b850b$var$Default = {\n    defaultDatepickerId: null,\n    autohide: false,\n    format: 'mm/dd/yyyy',\n    maxDate: null,\n    minDate: null,\n    orientation: 'bottom',\n    buttons: false,\n    autoSelectToday: 0,\n    title: null,\n    language: 'en',\n    rangePicker: false,\n    onShow: function() {},\n    onHide: function() {}\n};\nvar $b94af47b4b1b850b$var$DefaultInstanceOptions = {\n    id: null,\n    override: true\n};\nvar $b94af47b4b1b850b$var$Datepicker = /** @class */ function() {\n    function Datepicker(datepickerEl, options, instanceOptions) {\n        if (datepickerEl === void 0) datepickerEl = null;\n        if (options === void 0) options = $b94af47b4b1b850b$var$Default;\n        if (instanceOptions === void 0) instanceOptions = $b94af47b4b1b850b$var$DefaultInstanceOptions;\n        this._instanceId = instanceOptions.id ? instanceOptions.id : datepickerEl.id;\n        this._datepickerEl = datepickerEl;\n        this._datepickerInstance = null;\n        this._options = $b94af47b4b1b850b$var$__assign($b94af47b4b1b850b$var$__assign({}, $b94af47b4b1b850b$var$Default), options);\n        this._initialized = false;\n        this.init();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).addInstance('Datepicker', this, this._instanceId, instanceOptions.override);\n    }\n    Datepicker.prototype.init = function() {\n        if (this._datepickerEl && !this._initialized) {\n            if (this._options.rangePicker) this._datepickerInstance = new (0, $7c39ee59de2954f9$export$17334619f3ac2224)(this._datepickerEl, this._getDatepickerOptions(this._options));\n            else this._datepickerInstance = new (0, $7c39ee59de2954f9$export$7235422eca03ec90)(this._datepickerEl, this._getDatepickerOptions(this._options));\n            this._initialized = true;\n        }\n    };\n    Datepicker.prototype.destroy = function() {\n        if (this._initialized) {\n            this._initialized = false;\n            this._datepickerInstance.destroy();\n        }\n    };\n    Datepicker.prototype.removeInstance = function() {\n        this.destroy();\n        (0, $5d5682da381fac09$export$2e2bcd8739ae039).removeInstance('Datepicker', this._instanceId);\n    };\n    Datepicker.prototype.destroyAndRemoveInstance = function() {\n        this.destroy();\n        this.removeInstance();\n    };\n    Datepicker.prototype.getDatepickerInstance = function() {\n        return this._datepickerInstance;\n    };\n    Datepicker.prototype.getDate = function() {\n        if (this._options.rangePicker && this._datepickerInstance instanceof (0, $7c39ee59de2954f9$export$17334619f3ac2224)) return this._datepickerInstance.getDates();\n        if (!this._options.rangePicker && this._datepickerInstance instanceof (0, $7c39ee59de2954f9$export$7235422eca03ec90)) return this._datepickerInstance.getDate();\n    };\n    Datepicker.prototype.setDate = function(date) {\n        if (this._options.rangePicker && this._datepickerInstance instanceof (0, $7c39ee59de2954f9$export$17334619f3ac2224)) return this._datepickerInstance.setDates(date);\n        if (!this._options.rangePicker && this._datepickerInstance instanceof (0, $7c39ee59de2954f9$export$7235422eca03ec90)) return this._datepickerInstance.setDate(date);\n    };\n    Datepicker.prototype.show = function() {\n        this._datepickerInstance.show();\n        this._options.onShow(this);\n    };\n    Datepicker.prototype.hide = function() {\n        this._datepickerInstance.hide();\n        this._options.onHide(this);\n    };\n    Datepicker.prototype._getDatepickerOptions = function(options) {\n        var datepickerOptions = {};\n        if (options.buttons) {\n            datepickerOptions.todayBtn = true;\n            datepickerOptions.clearBtn = true;\n            if (options.autoSelectToday) datepickerOptions.todayBtnMode = 1;\n        }\n        if (options.autohide) datepickerOptions.autohide = true;\n        if (options.format) datepickerOptions.format = options.format;\n        if (options.maxDate) datepickerOptions.maxDate = options.maxDate;\n        if (options.minDate) datepickerOptions.minDate = options.minDate;\n        if (options.orientation) datepickerOptions.orientation = options.orientation;\n        if (options.title) datepickerOptions.title = options.title;\n        if (options.language) datepickerOptions.language = options.language;\n        return datepickerOptions;\n    };\n    Datepicker.prototype.updateOnShow = function(callback) {\n        this._options.onShow = callback;\n    };\n    Datepicker.prototype.updateOnHide = function(callback) {\n        this._options.onHide = callback;\n    };\n    return Datepicker;\n}();\nfunction $b94af47b4b1b850b$export$81c9f52a292162ae() {\n    document.querySelectorAll('[datepicker], [inline-datepicker], [date-rangepicker]').forEach(function($datepickerEl) {\n        if ($datepickerEl) {\n            var buttons = $datepickerEl.hasAttribute('datepicker-buttons');\n            var autoselectToday = $datepickerEl.hasAttribute('datepicker-autoselect-today');\n            var autohide = $datepickerEl.hasAttribute('datepicker-autohide');\n            var format = $datepickerEl.getAttribute('datepicker-format');\n            var maxDate = $datepickerEl.getAttribute('datepicker-max-date');\n            var minDate = $datepickerEl.getAttribute('datepicker-min-date');\n            var orientation_1 = $datepickerEl.getAttribute('datepicker-orientation');\n            var title = $datepickerEl.getAttribute('datepicker-title');\n            var language = $datepickerEl.getAttribute('datepicker-language');\n            var rangePicker = $datepickerEl.hasAttribute('date-rangepicker');\n            new $b94af47b4b1b850b$var$Datepicker($datepickerEl, {\n                buttons: buttons ? buttons : $b94af47b4b1b850b$var$Default.buttons,\n                autoSelectToday: autoselectToday ? autoselectToday : $b94af47b4b1b850b$var$Default.autoSelectToday,\n                autohide: autohide ? autohide : $b94af47b4b1b850b$var$Default.autohide,\n                format: format ? format : $b94af47b4b1b850b$var$Default.format,\n                maxDate: maxDate ? maxDate : $b94af47b4b1b850b$var$Default.maxDate,\n                minDate: minDate ? minDate : $b94af47b4b1b850b$var$Default.minDate,\n                orientation: orientation_1 ? orientation_1 : $b94af47b4b1b850b$var$Default.orientation,\n                title: title ? title : $b94af47b4b1b850b$var$Default.title,\n                language: language ? language : $b94af47b4b1b850b$var$Default.language,\n                rangePicker: rangePicker ? rangePicker : $b94af47b4b1b850b$var$Default.rangePicker\n            });\n        } else console.error(\"The datepicker element does not exist. Please check the datepicker attribute.\");\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Datepicker = $b94af47b4b1b850b$var$Datepicker;\n    window.initDatepickers = $b94af47b4b1b850b$export$81c9f52a292162ae;\n}\nvar $b94af47b4b1b850b$export$2e2bcd8739ae039 = $b94af47b4b1b850b$var$Datepicker;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction $60d1a2d369db67b0$export$4cd50b9c69a85fd5() {\n    (0, $d93a619a461d9c03$export$226c1dc98323ee4d)();\n    (0, $fc7ccf099a511882$export$355ba5a528b4009a)();\n    (0, $c1b11beef829dd56$export$3ab77386b16b9e58)();\n    (0, $6d6d37a8acee51c1$export$69c84787a503daef)();\n    (0, $9d7e083df5284b15$export$8cb65a02593bf108)();\n    (0, $eaca6a069237aaf5$export$e14d3bc873a8b9b1)();\n    (0, $48c8331f22e653e8$export$319df2b10e87c8ec)();\n    (0, $d9a3b96db6d5dbb4$export$c92e8f569ad2976f)();\n    (0, $91c32ed640e0fec6$export$8f2a38c1f9d9dc3e)();\n    (0, $6aca18f5cd7d8b7b$export$200409e83b2a0dd4)();\n    (0, $027785b5e7762569$export$33aa68e0bfaa065d)();\n    (0, $5252bf9f038f0bda$export$4352dd3b7a1676ab)();\n    (0, $d10e6c36a2232fe1$export$ad4117886fd6cf74)();\n    (0, $b94af47b4b1b850b$export$81c9f52a292162ae)();\n}\nif (typeof window !== 'undefined') window.initFlowbite = $60d1a2d369db67b0$export$4cd50b9c69a85fd5;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// setup events for data attributes\nvar $948592d8c330c4e7$var$events = new (0, $2bd4b9c31e857ffa$export$2e2bcd8739ae039)('load', [\n    (0, $d93a619a461d9c03$export$226c1dc98323ee4d),\n    (0, $fc7ccf099a511882$export$355ba5a528b4009a),\n    (0, $c1b11beef829dd56$export$3ab77386b16b9e58),\n    (0, $6d6d37a8acee51c1$export$69c84787a503daef),\n    (0, $9d7e083df5284b15$export$8cb65a02593bf108),\n    (0, $eaca6a069237aaf5$export$e14d3bc873a8b9b1),\n    (0, $48c8331f22e653e8$export$319df2b10e87c8ec),\n    (0, $d9a3b96db6d5dbb4$export$c92e8f569ad2976f),\n    (0, $91c32ed640e0fec6$export$8f2a38c1f9d9dc3e),\n    (0, $6aca18f5cd7d8b7b$export$200409e83b2a0dd4),\n    (0, $027785b5e7762569$export$33aa68e0bfaa065d),\n    (0, $5252bf9f038f0bda$export$4352dd3b7a1676ab),\n    (0, $d10e6c36a2232fe1$export$ad4117886fd6cf74),\n    (0, $b94af47b4b1b850b$export$81c9f52a292162ae)\n]);\n$948592d8c330c4e7$var$events.init();\n\n\n(0, (/*@__PURE__*/$parcel$interopDefault($jhwMH))).extend((0, (/*@__PURE__*/$parcel$interopDefault($jSNlv))));\n(0, (/*@__PURE__*/$parcel$interopDefault($jhwMH))).extend((0, (/*@__PURE__*/$parcel$interopDefault($6N7gE))));\n(0, (/*@__PURE__*/$parcel$interopDefault($jhwMH))).extend((0, (/*@__PURE__*/$parcel$interopDefault($17sxp))));\nwindow.dayjs = (0, (/*@__PURE__*/$parcel$interopDefault($jhwMH)));\nwindow.ApexCharts = (0, $e4b487e979d7c06d$export$2e2bcd8739ae039);\nwindow.qrCodeGenerator = (0, $bd33f692cf9f4068$export$2e2bcd8739ae039);\nwindow.emailSpellChecker = (0, (/*@__PURE__*/$parcel$interopDefault($37e295d5e2f3bd20$exports)));\nwindow.urlParam = (0, $kXOQU.urlParam);\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).plugin((0, $ojnWK.default));\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).plugin((0, $182977f45aac8dca$export$2e2bcd8739ae039));\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).plugin((0, $85572a2cec6fb903$export$2e2bcd8739ae039));\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).plugin((0, $cf417a97d74b93bb$export$2e2bcd8739ae039));\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).plugin((0, $21b57f0df60ff3c3$export$2e2bcd8739ae039));\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).plugin((0, $dc5e95bf63b2a32e$export$2e2bcd8739ae039));\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).plugin((0, $a9mZZ.default));\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).plugin((0, $d09a060543d6a2e2$export$2e2bcd8739ae039));\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).store(\"filterFields\", {\n    fields: [],\n    add (field) {\n        this.fields.push(field);\n    },\n    remove (field) {\n        const index = this.fields.indexOf(field);\n        this.fields.splice(index, 1);\n    },\n    has (field) {\n        return this.fields.includes(field) ? true : false;\n    },\n    flush () {\n        this.fields = [];\n    }\n});\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).store(\"hrisLibrarySorting\", {\n    emails: '',\n    forms: '',\n    documents: '',\n    emailsLayout: 'card',\n    formsLayout: 'card',\n    documentsLayout: 'card',\n    init () {\n        try {\n            // Load sorting preferences\n            const savedSort = localStorage.getItem('hris_assets_sorting');\n            if (savedSort) {\n                const data = JSON.parse(savedSort);\n                this.emails = data.emails || '';\n                this.forms = data.forms || '';\n                this.documents = data.documents || '';\n            }\n            // Load layout preferences separately\n            const savedLayout = localStorage.getItem('hris_assets_layout');\n            if (savedLayout) {\n                const data = JSON.parse(savedLayout);\n                this.emailsLayout = data.emails || 'card';\n                this.formsLayout = data.forms || 'card';\n                this.documentsLayout = data.documents || 'card';\n            }\n        } catch (e) {\n        // Invalid JSON, ignore and use defaults\n        }\n    },\n    getCurrentSort (section) {\n        return this[section] || '';\n    },\n    setSort (section, value) {\n        this[section] = value || '';\n        this._saveSorting();\n    },\n    getCurrentLayout (section) {\n        return this[section + 'Layout'] || 'card';\n    },\n    setLayout (section, layout) {\n        this[section + 'Layout'] = layout || 'card';\n        this._saveLayout();\n    },\n    _saveSorting () {\n        try {\n            localStorage.setItem('hris_assets_sorting', JSON.stringify({\n                emails: this.emails,\n                forms: this.forms,\n                documents: this.documents\n            }));\n        } catch (e) {\n        // localStorage failed, ignore\n        }\n    },\n    _saveLayout () {\n        try {\n            localStorage.setItem('hris_assets_layout', JSON.stringify({\n                emails: this.emailsLayout,\n                forms: this.formsLayout,\n                documents: this.documentsLayout\n            }));\n        } catch (e) {\n        // localStorage failed, ignore\n        }\n    }\n});\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).store(\"hrisOnboardingTaskSectionCollapse\", {\n    // Initialize from localStorage\n    init () {\n        try {\n            const saved = localStorage.getItem('hris_onboarding_task_section_collapse');\n            if (saved) {\n                const data = JSON.parse(saved);\n                Object.keys(data).forEach((key)=>{\n                    this[key] = data[key];\n                });\n            }\n        } catch (e) {\n        // localStorage failed, ignore\n        }\n    },\n    // Save all state to localStorage\n    _saveAll () {\n        try {\n            const data = {};\n            Object.keys(this).forEach((key)=>{\n                if (!key.startsWith('_') && typeof this[key] !== 'function' && key !== 'init') data[key] = this[key];\n            });\n            localStorage.setItem('hris_onboarding_task_section_collapse', JSON.stringify(data));\n        } catch (e) {\n        // localStorage failed, ignore\n        }\n    },\n    // Check if section is expanded (with default fallback)\n    isExpanded (key, defaultExpanded = false) {\n        return this[key] ?? defaultExpanded;\n    },\n    // Toggle section state\n    toggle (key, defaultExpanded = false) {\n        const currentState = this[key] ?? defaultExpanded;\n        this[key] = !currentState;\n        this._saveAll();\n    },\n    // Explicitly set state\n    setExpanded (key, isExpanded) {\n        this[key] = isExpanded;\n        this._saveAll();\n    }\n});\nconst $f9ccc1fa0d22629a$var$HRIS_LIBRARY_FORM_REPORTING_DEFAULT_FIELDS = [\n    \"template\",\n    \"department\",\n    \"team\",\n    \"job_title\"\n];\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).store(\"hrisLibraryFormReportingColumns\", {\n    fields: [\n        ...$f9ccc1fa0d22629a$var$HRIS_LIBRARY_FORM_REPORTING_DEFAULT_FIELDS\n    ],\n    init () {\n        try {\n            const saved = localStorage.getItem('hris_library_form_reporting_columns');\n            if (saved) {\n                const data = JSON.parse(saved);\n                this.fields = data.fields || [\n                    ...$f9ccc1fa0d22629a$var$HRIS_LIBRARY_FORM_REPORTING_DEFAULT_FIELDS\n                ];\n            }\n        } catch (e) {\n        // localStorage failed, ignore\n        }\n    },\n    _save () {\n        try {\n            localStorage.setItem('hris_library_form_reporting_columns', JSON.stringify({\n                fields: this.fields\n            }));\n        } catch (e) {\n        // localStorage failed, ignore\n        }\n    },\n    hasField (fieldName) {\n        return this.fields.includes(fieldName);\n    },\n    toggleField (fieldName) {\n        if (this.hasField(fieldName)) this.fields = this.fields.filter((f)=>f !== fieldName);\n        else this.fields.push(fieldName);\n        this._save();\n    },\n    reset () {\n        this.fields = [\n            ...$f9ccc1fa0d22629a$var$HRIS_LIBRARY_FORM_REPORTING_DEFAULT_FIELDS\n        ];\n        this._save();\n    }\n});\n// Pessimistic settings store for the candidate listing page.\n// Missing keys are treated as `false` via `get(key)`. Toggling persists to localStorage.\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).store(\"candidate_listing_settings\", {\n    init () {\n        try {\n            const saved = localStorage.getItem('candidate_listing_settings');\n            if (saved) {\n                const data = JSON.parse(saved);\n                Object.keys(data).forEach((key)=>{\n                    this[key] = data[key];\n                });\n            }\n        } catch (e) {\n        // localStorage failed, ignore\n        }\n    },\n    get (key) {\n        return this[key] ?? false;\n    },\n    set (key, value) {\n        this[key] = value;\n        this._save();\n    },\n    toggle (key) {\n        this.set(key, !this.get(key));\n    },\n    _save () {\n        try {\n            const data = {};\n            Object.keys(this).forEach((k)=>{\n                if (!k.startsWith('_') && typeof this[k] !== 'function' && k !== 'init' && k !== 'get' && k !== 'set' && k !== 'toggle') data[k] = this[k];\n            });\n            localStorage.setItem('candidate_listing_settings', JSON.stringify(data));\n        } catch (e) {\n        // localStorage failed, ignore\n        }\n    }\n});\n// Initialize the store from localStorage\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).store(\"hrisOnboardingTaskSectionCollapse\").init();\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).store(\"hrisLibrarySorting\").init();\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).store(\"hrisLibraryFormReportingColumns\").init();\n(0, $f347e48613385d9c$export$2e2bcd8739ae039).store(\"candidate_listing_settings\").init();\nwindow.Alpine = (0, $f347e48613385d9c$export$2e2bcd8739ae039);\nwindow.Alpine.data(\"wysiwyg\", (0, $eokEX.default));\nwindow.Alpine.data(\"combobox\", (0, $cSEGC.default));\nwindow.Alpine.data(\"file_input\", (0, $8DTOO.default));\nwindow.Alpine.data(\"multi_file_input\", (0, $7A7V9.default));\nwindow.Alpine.data(\"workflow\", (0, $b4EcM.default));\nwindow.Alpine.data(\"organization_sortable\", (0, $1c3wp.default));\nwindow.Alpine.data(\"job_form\", (0, $aFSg5.default));\nwindow.Alpine.data(\"options_editor\", (0, $lrtgD.default));\nwindow.Alpine.data(\"conditionalFieldConfig\", (0, $hHqg9.default));\nwindow.Alpine.data(\"phone_input\", (0, $bKHmb.default));\nwindow.Alpine.data(\"filter\", (0, $busg4.default));\nwindow.Alpine.data(\"reportingViews\", (0, $dWz0N.default));\nwindow.Alpine.data(\"command_palette\", (0, $bV58F.default));\nwindow.Alpine.data(\"availability_calendar\", (0, $d6Hx1.default));\nwindow.Alpine.data(\"job_list_filter\", (0, $F4g3Q.default));\nwindow.Alpine.data(\"scorecard_weights\", (0, $lbjQh.createScorecardWeightsComponent));\nwindow.Alpine.data(\"conditionBuilder\", (0, $ak9J4.default));\nwindow.Alpine.data(\"mention_comment_form\", (0, $6ZBMV.default));\nwindow.Alpine.data(\"applications_list\", (0, $lWvX9.default));\nwindow.Alpine.data(\"jobApplicationsMobile\", (0, $jwT4P.default));\nwindow.Alpine.data(\"interviewsNav\", (0, $dgpCO.interviewsNav));\nwindow.Alpine.data(\"notesEditor\", (0, $dgpCO.notesEditor));\nwindow.Alpine.data(\"interviewChat\", (0, $dgpCO.interviewChat));\nwindow.Alpine.data(\"organization_user_list\", (0, $55buA.default));\nwindow.Alpine.data(\"whats_new\", (0, $fZuEE.default));\n// Alpine's x-teleport clones tooltips into <body>, carrying their scope only as\n// internal references. htmx history snapshots the whole <body>, so a restored page\n// contains those clones as scopeless orphans that Alpine would re-init and throw\n// \"ReferenceError: tooltipVisible is not defined\" for (one per tooltip). Purge them\n// synchronously on restore — Alpine skips disconnected nodes, and the restored\n// source elements re-init and re-create their own clones anyway.\ndocument.addEventListener(\"htmx:historyRestore\", ()=>{\n    document.querySelectorAll(\"[data-tooltip-teleport]\").forEach((el)=>el.remove());\n});\nwindow.Alpine.start();\n\n\nparcelRequire(\"7iEKJ\");\n})();\n//# sourceMappingURL=index.js.map\n","parcelRequire.extendImportMap({\"jZLek\":\"htmlToMjml.39067302.js\",\"3nQvj\":\"htmlToMjml.e61db9ad.js\",\"4vlhK\":\"mjml-browser.9a86831a.js\"});","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),Y=_.prototype;return O.prototype=Y,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){Y[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_utc=i()}(this,(function(){\"use strict\";var t=\"minute\",i=/[+-]\\d\\d(?::?\\d\\d)?/g,e=/([+-]|\\d\\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var r=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),r.call(this,t)};var o=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else o.call(this)};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if(\"string\"==typeof s&&(s=function(t){void 0===t&&(t=\"\");var s=t.match(i);if(!s)return null;var f=(\"\"+s[0]).match(e)||[\"-\",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:\"+\"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s;if(0===u)return this.utc(f);var r=this.clone();if(f)return r.$offset=u,r.$u=!1,r;var o=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(r=this.local().add(u+o,t)).$offset=u,r.$x.$localOffset=o,r};var h=u.format;u.format=function(t){var i=t||(this.$u?\"YYYY-MM-DDTHH:mm:ss[Z]\":\"\");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return\"s\"===t&&this.$offset?n(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d/,r=/\\d\\d/,i=/\\d\\d?/,o=/\\d*[^-_:/,()\\s\\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[i,f(\"seconds\")],ss:[i,f(\"seconds\")],m:[i,f(\"minutes\")],mm:[i,f(\"minutes\")],H:[i,f(\"hours\")],h:[i,f(\"hours\")],HH:[i,f(\"hours\")],hh:[i,f(\"hours\")],D:[i,f(\"day\")],DD:[r,f(\"day\")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],w:[i,f(\"week\")],ww:[r,f(\"week\")],M:[i,f(\"month\")],MM:[r,f(\"month\")],MMM:[o,function(e){var t=u(\"months\"),n=(u(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,f(\"year\")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\\d{4}/,f(\"year\")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\\[|\\]$/g,\"\")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if(\"string\"==typeof i)r+=i.length;else{var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,\"\")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if(\"string\"==typeof a){var f=!0===o[2],h=!0===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if([\"x\",\"X\"].indexOf(t)>-1)return new Date((\"X\"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date(\"\")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));","!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrBefore=i()}(this,(function(){\"use strict\";return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)}}}));","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n  (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n    ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n    : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Print warning and recommend using `buffer` v4.x which has an Object\n *               implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n    typeof console.error === 'function') {\n  console.error(\n    'This browser lacks typed array (Uint8Array) support which is required by ' +\n    '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n  )\n}\n\nfunction typedArraySupport () {\n  // Can typed array instances can be augmented?\n  try {\n    const arr = new Uint8Array(1)\n    const proto = { foo: function () { return 42 } }\n    Object.setPrototypeOf(proto, Uint8Array.prototype)\n    Object.setPrototypeOf(arr, proto)\n    return arr.foo() === 42\n  } catch (e) {\n    return false\n  }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.buffer\n  }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.byteOffset\n  }\n})\n\nfunction createBuffer (length) {\n  if (length > K_MAX_LENGTH) {\n    throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n  }\n  // Return an augmented `Uint8Array` instance\n  const buf = new Uint8Array(length)\n  Object.setPrototypeOf(buf, Buffer.prototype)\n  return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new TypeError(\n        'The \"string\" argument must be of type string. Received type number'\n      )\n    }\n    return allocUnsafe(arg)\n  }\n  return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n  if (typeof value === 'string') {\n    return fromString(value, encodingOrOffset)\n  }\n\n  if (ArrayBuffer.isView(value)) {\n    return fromArrayView(value)\n  }\n\n  if (value == null) {\n    throw new TypeError(\n      'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n      'or Array-like Object. Received type ' + (typeof value)\n    )\n  }\n\n  if (isInstance(value, ArrayBuffer) ||\n      (value && isInstance(value.buffer, ArrayBuffer))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof SharedArrayBuffer !== 'undefined' &&\n      (isInstance(value, SharedArrayBuffer) ||\n      (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'number') {\n    throw new TypeError(\n      'The \"value\" argument must not be of type number. Received type number'\n    )\n  }\n\n  const valueOf = value.valueOf && value.valueOf()\n  if (valueOf != null && valueOf !== value) {\n    return Buffer.from(valueOf, encodingOrOffset, length)\n  }\n\n  const b = fromObject(value)\n  if (b) return b\n\n  if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n      typeof value[Symbol.toPrimitive] === 'function') {\n    return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n  }\n\n  throw new TypeError(\n    'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n    'or Array-like Object. Received type ' + (typeof value)\n  )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be of type number')\n  } else if (size < 0) {\n    throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n  }\n}\n\nfunction alloc (size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpreted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(size).fill(fill, encoding)\n      : createBuffer(size).fill(fill)\n  }\n  return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n  assertSize(size)\n  return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('Unknown encoding: ' + encoding)\n  }\n\n  const length = byteLength(string, encoding) | 0\n  let buf = createBuffer(length)\n\n  const actual = buf.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    buf = buf.slice(0, actual)\n  }\n\n  return buf\n}\n\nfunction fromArrayLike (array) {\n  const length = array.length < 0 ? 0 : checked(array.length) | 0\n  const buf = createBuffer(length)\n  for (let i = 0; i < length; i += 1) {\n    buf[i] = array[i] & 255\n  }\n  return buf\n}\n\nfunction fromArrayView (arrayView) {\n  if (isInstance(arrayView, Uint8Array)) {\n    const copy = new Uint8Array(arrayView)\n    return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n  }\n  return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\"offset\" is outside of buffer bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\"length\" is outside of buffer bounds')\n  }\n\n  let buf\n  if (byteOffset === undefined && length === undefined) {\n    buf = new Uint8Array(array)\n  } else if (length === undefined) {\n    buf = new Uint8Array(array, byteOffset)\n  } else {\n    buf = new Uint8Array(array, byteOffset, length)\n  }\n\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(buf, Buffer.prototype)\n\n  return buf\n}\n\nfunction fromObject (obj) {\n  if (Buffer.isBuffer(obj)) {\n    const len = checked(obj.length) | 0\n    const buf = createBuffer(len)\n\n    if (buf.length === 0) {\n      return buf\n    }\n\n    obj.copy(buf, 0, 0, len)\n    return buf\n  }\n\n  if (obj.length !== undefined) {\n    if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n      return createBuffer(0)\n    }\n    return fromArrayLike(obj)\n  }\n\n  if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n    return fromArrayLike(obj.data)\n  }\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= K_MAX_LENGTH) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return b != null && b._isBuffer === true &&\n    b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n  if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n  if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError(\n      'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n    )\n  }\n\n  if (a === b) return 0\n\n  let x = a.length\n  let y = b.length\n\n  for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!Array.isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  let i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  const buffer = Buffer.allocUnsafe(length)\n  let pos = 0\n  for (i = 0; i < list.length; ++i) {\n    let buf = list[i]\n    if (isInstance(buf, Uint8Array)) {\n      if (pos + buf.length > buffer.length) {\n        if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n        buf.copy(buffer, pos)\n      } else {\n        Uint8Array.prototype.set.call(\n          buffer,\n          buf,\n          pos\n        )\n      }\n    } else if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    } else {\n      buf.copy(buffer, pos)\n    }\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    throw new TypeError(\n      'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n      'Received type ' + typeof string\n    )\n  }\n\n  const len = string.length\n  const mustMatch = (arguments.length > 2 && arguments[2] === true)\n  if (!mustMatch && len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  let loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) {\n          return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n        }\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  let loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  const i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  const len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (let i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  const len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (let i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  const len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (let i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  const length = this.length\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  let str = ''\n  const max = exports.INSPECT_MAX_BYTES\n  str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n  if (this.length > max) str += ' ... '\n  return '<Buffer ' + str + '>'\n}\nif (customInspectSymbol) {\n  Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (isInstance(target, Uint8Array)) {\n    target = Buffer.from(target, target.offset, target.byteLength)\n  }\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError(\n      'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n      'Received type ' + (typeof target)\n    )\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  let x = thisEnd - thisStart\n  let y = end - start\n  const len = Math.min(x, y)\n\n  const thisCopy = this.slice(thisStart, thisEnd)\n  const targetCopy = target.slice(start, end)\n\n  for (let i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset // Coerce to Number.\n  if (numberIsNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  let indexSize = 1\n  let arrLength = arr.length\n  let valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  let i\n  if (dir) {\n    let foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      let found = true\n      for (let j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  const remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  const strLen = string.length\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  let i\n  for (i = 0; i < length; ++i) {\n    const parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (numberIsNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset >>> 0\n    if (isFinite(length)) {\n      length = length >>> 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  const remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  let loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return asciiWrite(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  const res = []\n\n  let i = start\n  while (i < end) {\n    const firstByte = buf[i]\n    let codePoint = null\n    let bytesPerSequence = (firstByte > 0xEF)\n      ? 4\n      : (firstByte > 0xDF)\n          ? 3\n          : (firstByte > 0xBF)\n              ? 2\n              : 1\n\n    if (i + bytesPerSequence <= end) {\n      let secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  const len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  let res = ''\n  let i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  let ret = ''\n  end = Math.min(buf.length, end)\n\n  for (let i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  let ret = ''\n  end = Math.min(buf.length, end)\n\n  for (let i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  const len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  let out = ''\n  for (let i = start; i < end; ++i) {\n    out += hexSliceLookupTable[buf[i]]\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  const bytes = buf.slice(start, end)\n  let res = ''\n  // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n  for (let i = 0; i < bytes.length - 1; i += 2) {\n    res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  const len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  const newBuf = this.subarray(start, end)\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let val = this[offset]\n  let mul = 1\n  let i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  let val = this[offset + --byteLength]\n  let mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const lo = first +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 24\n\n  const hi = this[++offset] +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    last * 2 ** 24\n\n  return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const hi = first * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    this[++offset]\n\n  const lo = this[++offset] * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    last\n\n  return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let val = this[offset]\n  let mul = 1\n  let i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let i = byteLength\n  let mul = 1\n  let val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  const val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  const val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const val = this[offset + 4] +\n    this[offset + 5] * 2 ** 8 +\n    this[offset + 6] * 2 ** 16 +\n    (last << 24) // Overflow\n\n  return (BigInt(val) << BigInt(32)) +\n    BigInt(first +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const val = (first << 24) + // Overflow\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    this[++offset]\n\n  return (BigInt(val) << BigInt(32)) +\n    BigInt(this[++offset] * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    const maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  let mul = 1\n  let i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    const maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  let i = byteLength - 1\n  let mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset + 3] = (value >>> 24)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 1] = (value >>> 8)\n  this[offset] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n  checkIntBI(value, min, max, buf, offset, 7)\n\n  let lo = Number(value & BigInt(0xffffffff))\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n  checkIntBI(value, min, max, buf, offset, 7)\n\n  let lo = Number(value & BigInt(0xffffffff))\n  buf[offset + 7] = lo\n  lo = lo >> 8\n  buf[offset + 6] = lo\n  lo = lo >> 8\n  buf[offset + 5] = lo\n  lo = lo >> 8\n  buf[offset + 4] = lo\n  let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n  buf[offset + 3] = hi\n  hi = hi >> 8\n  buf[offset + 2] = hi\n  hi = hi >> 8\n  buf[offset + 1] = hi\n  hi = hi >> 8\n  buf[offset] = hi\n  return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n  return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n  return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    const limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  let i = 0\n  let mul = 1\n  let sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    const limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  let i = byteLength - 1\n  let mul = 1\n  let sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 3] = (value >>> 24)\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n  return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n  return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  const len = end - start\n\n  if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n    // Use built-in when available, missing from IE11\n    this.copyWithin(targetStart, start, end)\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, end),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n    if (val.length === 1) {\n      const code = val.charCodeAt(0)\n      if ((encoding === 'utf8' && code < 128) ||\n          encoding === 'latin1') {\n        // Fast path: If `val` fits into a single byte, use that numeric value.\n        val = code\n      }\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  } else if (typeof val === 'boolean') {\n    val = Number(val)\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  let i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    const bytes = Buffer.isBuffer(val)\n      ? val\n      : Buffer.from(val, encoding)\n    const len = bytes.length\n    if (len === 0) {\n      throw new TypeError('The value \"' + val +\n        '\" is invalid for argument \"value\"')\n    }\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n  errors[sym] = class NodeError extends Base {\n    constructor () {\n      super()\n\n      Object.defineProperty(this, 'message', {\n        value: getMessage.apply(this, arguments),\n        writable: true,\n        configurable: true\n      })\n\n      // Add the error code to the name to include it in the stack trace.\n      this.name = `${this.name} [${sym}]`\n      // Access the stack to generate the error message including the error code\n      // from the name.\n      this.stack // eslint-disable-line no-unused-expressions\n      // Reset the name to the actual name.\n      delete this.name\n    }\n\n    get code () {\n      return sym\n    }\n\n    set code (value) {\n      Object.defineProperty(this, 'code', {\n        configurable: true,\n        enumerable: true,\n        value,\n        writable: true\n      })\n    }\n\n    toString () {\n      return `${this.name} [${sym}]: ${this.message}`\n    }\n  }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n  function (name) {\n    if (name) {\n      return `${name} is outside of buffer bounds`\n    }\n\n    return 'Attempt to access memory outside buffer bounds'\n  }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n  function (name, actual) {\n    return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n  }, TypeError)\nE('ERR_OUT_OF_RANGE',\n  function (str, range, input) {\n    let msg = `The value of \"${str}\" is out of range.`\n    let received = input\n    if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n      received = addNumericalSeparator(String(input))\n    } else if (typeof input === 'bigint') {\n      received = String(input)\n      if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n        received = addNumericalSeparator(received)\n      }\n      received += 'n'\n    }\n    msg += ` It must be ${range}. Received ${received}`\n    return msg\n  }, RangeError)\n\nfunction addNumericalSeparator (val) {\n  let res = ''\n  let i = val.length\n  const start = val[0] === '-' ? 1 : 0\n  for (; i >= start + 4; i -= 3) {\n    res = `_${val.slice(i - 3, i)}${res}`\n  }\n  return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n  validateNumber(offset, 'offset')\n  if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n    boundsError(offset, buf.length - (byteLength + 1))\n  }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n  if (value > max || value < min) {\n    const n = typeof min === 'bigint' ? 'n' : ''\n    let range\n    if (byteLength > 3) {\n      if (min === 0 || min === BigInt(0)) {\n        range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n      } else {\n        range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n                `${(byteLength + 1) * 8 - 1}${n}`\n      }\n    } else {\n      range = `>= ${min}${n} and <= ${max}${n}`\n    }\n    throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n  }\n  checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n  if (typeof value !== 'number') {\n    throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n  }\n}\n\nfunction boundsError (value, length, type) {\n  if (Math.floor(value) !== value) {\n    validateNumber(value, type)\n    throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n  }\n\n  if (length < 0) {\n    throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n  }\n\n  throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n                                    `>= ${type ? 1 : 0} and <= ${length}`,\n                                    value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node takes equal signs as end of the Base64 encoding\n  str = str.split('=')[0]\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = str.trim().replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  let codePoint\n  const length = string.length\n  let leadSurrogate = null\n  const bytes = []\n\n  for (let i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  const byteArray = []\n  for (let i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  let c, hi, lo\n  const byteArray = []\n  for (let i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  let i\n  for (i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n  return obj instanceof type ||\n    (obj != null && obj.constructor != null && obj.constructor.name != null &&\n      obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n  // For IE11 support\n  return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n  const alphabet = '0123456789abcdef'\n  const table = new Array(256)\n  for (let i = 0; i < 16; ++i) {\n    const i16 = i * 16\n    for (let j = 0; j < 16; ++j) {\n      table[i16 + j] = alphabet[i] + alphabet[j]\n    }\n  }\n  return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n  return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n  throw new Error('BigInt not supported')\n}\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  var i\n  for (i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","// node_modules/tabbable/dist/index.esm.js\nvar candidateSelectors = [\"input:not([inert]):not([inert] *)\", \"select:not([inert]):not([inert] *)\", \"textarea:not([inert]):not([inert] *)\", \"a[href]:not([inert]):not([inert] *)\", \"button:not([inert]):not([inert] *)\", \"[tabindex]:not(slot):not([inert]):not([inert] *)\", \"audio[controls]:not([inert]):not([inert] *)\", \"video[controls]:not([inert]):not([inert] *)\", '[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)', \"details>summary:first-of-type:not([inert]):not([inert] *)\", \"details:not([inert]):not([inert] *)\"];\nvar candidateSelector = /* @__PURE__ */ candidateSelectors.join(\",\");\nvar NoElement = typeof Element === \"undefined\";\nvar matches = NoElement ? function() {\n} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function(element) {\n  var _element$getRootNode;\n  return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function(element) {\n  return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\nvar _isInert = function isInert(node, lookUp) {\n  var _node$getAttribute;\n  if (lookUp === void 0) {\n    lookUp = true;\n  }\n  var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, \"inert\");\n  var inert = inertAtt === \"\" || inertAtt === \"true\";\n  var result = inert || lookUp && node && // closest does not exist on shadow roots, so we fall back to a manual\n  // lookup upward, in case it is not defined.\n  (typeof node.closest === \"function\" ? node.closest(\"[inert]\") : _isInert(node.parentNode));\n  return result;\n};\nvar isContentEditable = function isContentEditable2(node) {\n  var _node$getAttribute2;\n  var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, \"contenteditable\");\n  return attValue === \"\" || attValue === \"true\";\n};\nvar getCandidates = function getCandidates2(el, includeContainer, filter) {\n  if (_isInert(el)) {\n    return [];\n  }\n  var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n  if (includeContainer && matches.call(el, candidateSelector)) {\n    candidates.unshift(el);\n  }\n  candidates = candidates.filter(filter);\n  return candidates;\n};\nvar _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n  var candidates = [];\n  var elementsToCheck = Array.from(elements);\n  while (elementsToCheck.length) {\n    var element = elementsToCheck.shift();\n    if (_isInert(element, false)) {\n      continue;\n    }\n    if (element.tagName === \"SLOT\") {\n      var assigned = element.assignedElements();\n      var content = assigned.length ? assigned : element.children;\n      var nestedCandidates = _getCandidatesIteratively(content, true, options);\n      if (options.flatten) {\n        candidates.push.apply(candidates, nestedCandidates);\n      } else {\n        candidates.push({\n          scopeParent: element,\n          candidates: nestedCandidates\n        });\n      }\n    } else {\n      var validCandidate = matches.call(element, candidateSelector);\n      if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n        candidates.push(element);\n      }\n      var shadowRoot = element.shadowRoot || // check for an undisclosed shadow\n      typeof options.getShadowRoot === \"function\" && options.getShadowRoot(element);\n      var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n      if (shadowRoot && validShadowRoot) {\n        var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n        if (options.flatten) {\n          candidates.push.apply(candidates, _nestedCandidates);\n        } else {\n          candidates.push({\n            scopeParent: element,\n            candidates: _nestedCandidates\n          });\n        }\n      } else {\n        elementsToCheck.unshift.apply(elementsToCheck, element.children);\n      }\n    }\n  }\n  return candidates;\n};\nvar hasTabIndex = function hasTabIndex2(node) {\n  return !isNaN(parseInt(node.getAttribute(\"tabindex\"), 10));\n};\nvar getTabIndex = function getTabIndex2(node) {\n  if (!node) {\n    throw new Error(\"No node provided\");\n  }\n  if (node.tabIndex < 0) {\n    if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n      return 0;\n    }\n  }\n  return node.tabIndex;\n};\nvar getSortOrderTabIndex = function getSortOrderTabIndex2(node, isScope) {\n  var tabIndex = getTabIndex(node);\n  if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n    return 0;\n  }\n  return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables2(a, b) {\n  return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput2(node) {\n  return node.tagName === \"INPUT\";\n};\nvar isHiddenInput = function isHiddenInput2(node) {\n  return isInput(node) && node.type === \"hidden\";\n};\nvar isDetailsWithSummary = function isDetailsWithSummary2(node) {\n  var r = node.tagName === \"DETAILS\" && Array.prototype.slice.apply(node.children).some(function(child) {\n    return child.tagName === \"SUMMARY\";\n  });\n  return r;\n};\nvar getCheckedRadio = function getCheckedRadio2(nodes, form) {\n  for (var i = 0; i < nodes.length; i++) {\n    if (nodes[i].checked && nodes[i].form === form) {\n      return nodes[i];\n    }\n  }\n};\nvar isTabbableRadio = function isTabbableRadio2(node) {\n  if (!node.name) {\n    return true;\n  }\n  var radioScope = node.form || getRootNode(node);\n  var queryRadios = function queryRadios2(name) {\n    return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n  };\n  var radioSet;\n  if (typeof window !== \"undefined\" && typeof window.CSS !== \"undefined\" && typeof window.CSS.escape === \"function\") {\n    radioSet = queryRadios(window.CSS.escape(node.name));\n  } else {\n    try {\n      radioSet = queryRadios(node.name);\n    } catch (err) {\n      console.error(\"Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s\", err.message);\n      return false;\n    }\n  }\n  var checked = getCheckedRadio(radioSet, node.form);\n  return !checked || checked === node;\n};\nvar isRadio = function isRadio2(node) {\n  return isInput(node) && node.type === \"radio\";\n};\nvar isNonTabbableRadio = function isNonTabbableRadio2(node) {\n  return isRadio(node) && !isTabbableRadio(node);\n};\nvar isNodeAttached = function isNodeAttached2(node) {\n  var _nodeRoot;\n  var nodeRoot = node && getRootNode(node);\n  var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n  var attached = false;\n  if (nodeRoot && nodeRoot !== node) {\n    var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n    attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n    while (!attached && nodeRootHost) {\n      var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n      nodeRoot = getRootNode(nodeRootHost);\n      nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n      attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n    }\n  }\n  return attached;\n};\nvar isZeroArea = function isZeroArea2(node) {\n  var _node$getBoundingClie = node.getBoundingClientRect(), width = _node$getBoundingClie.width, height = _node$getBoundingClie.height;\n  return width === 0 && height === 0;\n};\nvar isHidden = function isHidden2(node, _ref) {\n  var displayCheck = _ref.displayCheck, getShadowRoot = _ref.getShadowRoot;\n  if (displayCheck === \"full-native\") {\n    if (\"checkVisibility\" in node) {\n      var visible = node.checkVisibility({\n        // Checking opacity might be desirable for some use cases, but natively,\n        // opacity zero elements _are_ focusable and tabbable.\n        checkOpacity: false,\n        opacityProperty: false,\n        contentVisibilityAuto: true,\n        visibilityProperty: true,\n        // This is an alias for `visibilityProperty`. Contemporary browsers\n        // support both. However, this alias has wider browser support (Chrome\n        // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so\n        // we include it anyway.\n        checkVisibilityCSS: true\n      });\n      return !visible;\n    }\n  }\n  if (getComputedStyle(node).visibility === \"hidden\") {\n    return true;\n  }\n  var isDirectSummary = matches.call(node, \"details>summary:first-of-type\");\n  var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n  if (matches.call(nodeUnderDetails, \"details:not([open]) *\")) {\n    return true;\n  }\n  if (!displayCheck || displayCheck === \"full\" || // full-native can run this branch when it falls through in case\n  // Element#checkVisibility is unsupported\n  displayCheck === \"full-native\" || displayCheck === \"legacy-full\") {\n    if (typeof getShadowRoot === \"function\") {\n      var originalNode = node;\n      while (node) {\n        var parentElement = node.parentElement;\n        var rootNode = getRootNode(node);\n        if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true) {\n          return isZeroArea(node);\n        } else if (node.assignedSlot) {\n          node = node.assignedSlot;\n        } else if (!parentElement && rootNode !== node.ownerDocument) {\n          node = rootNode.host;\n        } else {\n          node = parentElement;\n        }\n      }\n      node = originalNode;\n    }\n    if (isNodeAttached(node)) {\n      return !node.getClientRects().length;\n    }\n    if (displayCheck !== \"legacy-full\") {\n      return true;\n    }\n  } else if (displayCheck === \"non-zero-area\") {\n    return isZeroArea(node);\n  }\n  return false;\n};\nvar isDisabledFromFieldset = function isDisabledFromFieldset2(node) {\n  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n    var parentNode = node.parentElement;\n    while (parentNode) {\n      if (parentNode.tagName === \"FIELDSET\" && parentNode.disabled) {\n        for (var i = 0; i < parentNode.children.length; i++) {\n          var child = parentNode.children.item(i);\n          if (child.tagName === \"LEGEND\") {\n            return matches.call(parentNode, \"fieldset[disabled] *\") ? true : !child.contains(node);\n          }\n        }\n        return true;\n      }\n      parentNode = parentNode.parentElement;\n    }\n  }\n  return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable2(options, node) {\n  if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus\n  isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n    return false;\n  }\n  return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable2(options, node) {\n  if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n    return false;\n  }\n  return true;\n};\nvar isShadowRootTabbable = function isShadowRootTabbable2(shadowHostNode) {\n  var tabIndex = parseInt(shadowHostNode.getAttribute(\"tabindex\"), 10);\n  if (isNaN(tabIndex) || tabIndex >= 0) {\n    return true;\n  }\n  return false;\n};\nvar _sortByOrder = function sortByOrder(candidates) {\n  var regularTabbables = [];\n  var orderedTabbables = [];\n  candidates.forEach(function(item, i) {\n    var isScope = !!item.scopeParent;\n    var element = isScope ? item.scopeParent : item;\n    var candidateTabindex = getSortOrderTabIndex(element, isScope);\n    var elements = isScope ? _sortByOrder(item.candidates) : element;\n    if (candidateTabindex === 0) {\n      isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n    } else {\n      orderedTabbables.push({\n        documentOrder: i,\n        tabIndex: candidateTabindex,\n        item,\n        isScope,\n        content: elements\n      });\n    }\n  });\n  return orderedTabbables.sort(sortOrderedTabbables).reduce(function(acc, sortable) {\n    sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n    return acc;\n  }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable2(container, options) {\n  options = options || {};\n  var candidates;\n  if (options.getShadowRoot) {\n    candidates = _getCandidatesIteratively([container], options.includeContainer, {\n      filter: isNodeMatchingSelectorTabbable.bind(null, options),\n      flatten: false,\n      getShadowRoot: options.getShadowRoot,\n      shadowRootFilter: isShadowRootTabbable\n    });\n  } else {\n    candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n  }\n  return _sortByOrder(candidates);\n};\nvar focusable = function focusable2(container, options) {\n  options = options || {};\n  var candidates;\n  if (options.getShadowRoot) {\n    candidates = _getCandidatesIteratively([container], options.includeContainer, {\n      filter: isNodeMatchingSelectorFocusable.bind(null, options),\n      flatten: true,\n      getShadowRoot: options.getShadowRoot\n    });\n  } else {\n    candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n  }\n  return candidates;\n};\nvar isTabbable = function isTabbable2(node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error(\"No node provided\");\n  }\n  if (matches.call(node, candidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* @__PURE__ */ candidateSelectors.concat(\"iframe:not([inert]):not([inert] *)\").join(\",\");\nvar isFocusable = function isFocusable2(node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error(\"No node provided\");\n  }\n  if (matches.call(node, focusableCandidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorFocusable(options, node);\n};\n\n// node_modules/focus-trap/dist/focus-trap.esm.js\nfunction _arrayLikeToArray(r, a) {\n  (null == a || a > r.length) && (a = r.length);\n  for (var e = 0, n = Array(a); e < a; e++)\n    n[e] = r[e];\n  return n;\n}\nfunction _arrayWithoutHoles(r) {\n  if (Array.isArray(r))\n    return _arrayLikeToArray(r);\n}\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) {\n  try {\n    var i = n[a](c), u = i.value;\n  } catch (n2) {\n    return void e(n2);\n  }\n  i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n  return function() {\n    var t = this, e = arguments;\n    return new Promise(function(r, o) {\n      var a = n.apply(t, e);\n      function _next(n2) {\n        asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n2);\n      }\n      function _throw(n2) {\n        asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n2);\n      }\n      _next(void 0);\n    });\n  };\n}\nfunction _createForOfIteratorHelper(r, e) {\n  var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n  if (!t) {\n    if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {\n      t && (r = t);\n      var n = 0, F = function() {\n      };\n      return {\n        s: F,\n        n: function() {\n          return n >= r.length ? {\n            done: true\n          } : {\n            done: false,\n            value: r[n++]\n          };\n        },\n        e: function(r2) {\n          throw r2;\n        },\n        f: F\n      };\n    }\n    throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n  var o, a = true, u = false;\n  return {\n    s: function() {\n      t = t.call(r);\n    },\n    n: function() {\n      var r2 = t.next();\n      return a = r2.done, r2;\n    },\n    e: function(r2) {\n      u = true, o = r2;\n    },\n    f: function() {\n      try {\n        a || null == t.return || t.return();\n      } finally {\n        if (u)\n          throw o;\n      }\n    }\n  };\n}\nfunction _defineProperty(e, r, t) {\n  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n    value: t,\n    enumerable: true,\n    configurable: true,\n    writable: true\n  }) : e[r] = t, e;\n}\nfunction _iterableToArray(r) {\n  if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"])\n    return Array.from(r);\n}\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction ownKeys(e, r) {\n  var t = Object.keys(e);\n  if (Object.getOwnPropertySymbols) {\n    var o = Object.getOwnPropertySymbols(e);\n    r && (o = o.filter(function(r2) {\n      return Object.getOwnPropertyDescriptor(e, r2).enumerable;\n    })), t.push.apply(t, o);\n  }\n  return t;\n}\nfunction _objectSpread2(e) {\n  for (var r = 1; r < arguments.length; r++) {\n    var t = null != arguments[r] ? arguments[r] : {};\n    r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {\n      _defineProperty(e, r2, t[r2]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {\n      Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));\n    });\n  }\n  return e;\n}\nfunction _regenerator() {\n  var e, t, r = \"function\" == typeof Symbol ? Symbol : {}, n = r.iterator || \"@@iterator\", o = r.toStringTag || \"@@toStringTag\";\n  function i(r2, n2, o2, i2) {\n    var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);\n    return _regeneratorDefine(u2, \"_invoke\", function(r3, n3, o3) {\n      var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = {\n        p: 0,\n        n: 0,\n        v: e,\n        a: d,\n        f: d.bind(e, 4),\n        d: function(t2, r4) {\n          return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;\n        }\n      };\n      function d(r4, n4) {\n        for (c3 = r4, u3 = n4, t = 0; !y && f2 && !o4 && t < p.length; t++) {\n          var o4, i4 = p[t], d2 = G.p, l = i4[2];\n          r4 > 3 ? (o4 = l === n4) && (u3 = i4[(c3 = i4[4]) ? 5 : (c3 = 3, 3)], i4[4] = i4[5] = e) : i4[0] <= d2 && ((o4 = r4 < 2 && d2 < i4[1]) ? (c3 = 0, G.v = n4, G.n = i4[1]) : d2 < l && (o4 = r4 < 3 || i4[0] > n4 || n4 > l) && (i4[4] = r4, i4[5] = n4, G.n = l, c3 = 0));\n        }\n        if (o4 || r4 > 1)\n          return a;\n        throw y = true, n4;\n      }\n      return function(o4, p2, l) {\n        if (f2 > 1)\n          throw TypeError(\"Generator is already running\");\n        for (y && 1 === p2 && d(p2, l), c3 = p2, u3 = l; (t = c3 < 2 ? e : u3) || !y; ) {\n          i3 || (c3 ? c3 < 3 ? (c3 > 1 && (G.n = -1), d(c3, u3)) : G.n = u3 : G.v = u3);\n          try {\n            if (f2 = 2, i3) {\n              if (c3 || (o4 = \"next\"), t = i3[o4]) {\n                if (!(t = t.call(i3, u3)))\n                  throw TypeError(\"iterator result is not an object\");\n                if (!t.done)\n                  return t;\n                u3 = t.value, c3 < 2 && (c3 = 0);\n              } else\n                1 === c3 && (t = i3.return) && t.call(i3), c3 < 2 && (u3 = TypeError(\"The iterator does not provide a '\" + o4 + \"' method\"), c3 = 1);\n              i3 = e;\n            } else if ((t = (y = G.n < 0) ? u3 : r3.call(n3, G)) !== a)\n              break;\n          } catch (t2) {\n            i3 = e, c3 = 1, u3 = t2;\n          } finally {\n            f2 = 1;\n          }\n        }\n        return {\n          value: t,\n          done: y\n        };\n      };\n    }(r2, o2, i2), true), u2;\n  }\n  var a = {};\n  function Generator() {\n  }\n  function GeneratorFunction() {\n  }\n  function GeneratorFunctionPrototype() {\n  }\n  t = Object.getPrototypeOf;\n  var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function() {\n    return this;\n  }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);\n  function f(e2) {\n    return Object.setPrototypeOf ? Object.setPrototypeOf(e2, GeneratorFunctionPrototype) : (e2.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e2, o, \"GeneratorFunction\")), e2.prototype = Object.create(u), e2;\n  }\n  return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, \"constructor\", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", _regeneratorDefine(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), _regeneratorDefine(u), _regeneratorDefine(u, o, \"Generator\"), _regeneratorDefine(u, n, function() {\n    return this;\n  }), _regeneratorDefine(u, \"toString\", function() {\n    return \"[object Generator]\";\n  }), (_regenerator = function() {\n    return {\n      w: i,\n      m: f\n    };\n  })();\n}\nfunction _regeneratorDefine(e, r, n, t) {\n  var i = Object.defineProperty;\n  try {\n    i({}, \"\", {});\n  } catch (e2) {\n    i = 0;\n  }\n  _regeneratorDefine = function(e2, r2, n2, t2) {\n    function o(r3, n3) {\n      _regeneratorDefine(e2, r3, function(e3) {\n        return this._invoke(r3, n3, e3);\n      });\n    }\n    r2 ? i ? i(e2, r2, {\n      value: n2,\n      enumerable: !t2,\n      configurable: !t2,\n      writable: !t2\n    }) : e2[r2] = n2 : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2));\n  }, _regeneratorDefine(e, r, n, t);\n}\nfunction _toConsumableArray(r) {\n  return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n  if (\"object\" != typeof t || !t)\n    return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r);\n    if (\"object\" != typeof i)\n      return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n  var i = _toPrimitive(t, \"string\");\n  return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _unsupportedIterableToArray(r, a) {\n  if (r) {\n    if (\"string\" == typeof r)\n      return _arrayLikeToArray(r, a);\n    var t = {}.toString.call(r).slice(8, -1);\n    return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n  }\n}\nvar activeFocusTraps = {\n  // Returns the trap from the top of the stack.\n  getActiveTrap: function getActiveTrap(trapStack) {\n    if ((trapStack === null || trapStack === void 0 ? void 0 : trapStack.length) > 0) {\n      return trapStack[trapStack.length - 1];\n    }\n    return null;\n  },\n  // Pauses the currently active trap, then adds a new trap to the stack.\n  activateTrap: function activateTrap(trapStack, trap) {\n    var activeTrap = activeFocusTraps.getActiveTrap(trapStack);\n    if (trap !== activeTrap) {\n      activeFocusTraps.pauseTrap(trapStack);\n    }\n    var trapIndex = trapStack.indexOf(trap);\n    if (trapIndex === -1) {\n      trapStack.push(trap);\n    } else {\n      trapStack.splice(trapIndex, 1);\n      trapStack.push(trap);\n    }\n  },\n  // Removes the trap from the top of the stack, then unpauses the next trap down.\n  deactivateTrap: function deactivateTrap(trapStack, trap) {\n    var trapIndex = trapStack.indexOf(trap);\n    if (trapIndex !== -1) {\n      trapStack.splice(trapIndex, 1);\n    }\n    activeFocusTraps.unpauseTrap(trapStack);\n  },\n  // Pauses the trap at the top of the stack.\n  pauseTrap: function pauseTrap(trapStack) {\n    var activeTrap = activeFocusTraps.getActiveTrap(trapStack);\n    activeTrap === null || activeTrap === void 0 || activeTrap._setPausedState(true);\n  },\n  // Unpauses the trap at the top of the stack.\n  unpauseTrap: function unpauseTrap(trapStack) {\n    var activeTrap = activeFocusTraps.getActiveTrap(trapStack);\n    if (activeTrap && !activeTrap._isManuallyPaused()) {\n      activeTrap._setPausedState(false);\n    }\n  }\n};\nvar isSelectableInput = function isSelectableInput2(node) {\n  return node.tagName && node.tagName.toLowerCase() === \"input\" && typeof node.select === \"function\";\n};\nvar isEscapeEvent = function isEscapeEvent2(e) {\n  return (e === null || e === void 0 ? void 0 : e.key) === \"Escape\" || (e === null || e === void 0 ? void 0 : e.key) === \"Esc\" || (e === null || e === void 0 ? void 0 : e.keyCode) === 27;\n};\nvar isTabEvent = function isTabEvent2(e) {\n  return (e === null || e === void 0 ? void 0 : e.key) === \"Tab\" || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;\n};\nvar isKeyForward = function isKeyForward2(e) {\n  return isTabEvent(e) && !e.shiftKey;\n};\nvar isKeyBackward = function isKeyBackward2(e) {\n  return isTabEvent(e) && e.shiftKey;\n};\nvar delay = function delay2(fn) {\n  return setTimeout(fn, 0);\n};\nvar valueOrHandler = function valueOrHandler2(value) {\n  for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    params[_key - 1] = arguments[_key];\n  }\n  return typeof value === \"function\" ? value.apply(void 0, params) : value;\n};\nvar getActualTarget = function getActualTarget2(event) {\n  return event.target.shadowRoot && typeof event.composedPath === \"function\" ? event.composedPath()[0] : event.target;\n};\nvar internalTrapStack = [];\nvar createFocusTrap = function createFocusTrap2(elements, userOptions) {\n  var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;\n  var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || internalTrapStack;\n  var config = _objectSpread2({\n    returnFocusOnDeactivate: true,\n    escapeDeactivates: true,\n    delayInitialFocus: true,\n    isolateSubtrees: false,\n    isKeyForward,\n    isKeyBackward\n  }, userOptions);\n  var state = {\n    // containers given to createFocusTrap()\n    /** @type {Array<HTMLElement>} */\n    containers: [],\n    // list of objects identifying tabbable nodes in `containers` in the trap\n    // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n    //  is active, but the trap should never get to a state where there isn't at least one group\n    //  with at least one tabbable node in it (that would lead to an error condition that would\n    //  result in an error being thrown)\n    /** @type {Array<{\n     *    container: HTMLElement,\n     *    tabbableNodes: Array<HTMLElement>, // empty if none\n     *    focusableNodes: Array<HTMLElement>, // empty if none\n     *    posTabIndexesFound: boolean,\n     *    firstTabbableNode: HTMLElement|undefined,\n     *    lastTabbableNode: HTMLElement|undefined,\n     *    firstDomTabbableNode: HTMLElement|undefined,\n     *    lastDomTabbableNode: HTMLElement|undefined,\n     *    nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n     *  }>}\n     */\n    containerGroups: [],\n    // same order/length as `containers` list\n    // references to objects in `containerGroups`, but only those that actually have\n    //  tabbable nodes in them\n    // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n    //  the same length\n    tabbableGroups: [],\n    // references to nodes that are siblings to the ancestors of this trap's containers.\n    /** @type {Set<HTMLElement>} */\n    adjacentElements: /* @__PURE__ */ new Set(),\n    // references to nodes that were inert or aria-hidden before the trap was activated.\n    /** @type {Set<HTMLElement>} */\n    alreadySilent: /* @__PURE__ */ new Set(),\n    nodeFocusedBeforeActivation: null,\n    mostRecentlyFocusedNode: null,\n    active: false,\n    paused: false,\n    manuallyPaused: false,\n    // timer ID for when delayInitialFocus is true and initial focus in this trap\n    //  has been delayed during activation\n    delayInitialFocusTimer: void 0,\n    // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any\n    recentNavEvent: void 0\n  };\n  var trap;\n  var getOption = function getOption2(configOverrideOptions, optionName, configOptionName) {\n    return configOverrideOptions && configOverrideOptions[optionName] !== void 0 ? configOverrideOptions[optionName] : config[configOptionName || optionName];\n  };\n  var findContainerIndex = function findContainerIndex2(element, event) {\n    var composedPath = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === \"function\" ? event.composedPath() : void 0;\n    return state.containerGroups.findIndex(function(_ref) {\n      var container = _ref.container, tabbableNodes = _ref.tabbableNodes;\n      return container.contains(element) || // fall back to explicit tabbable search which will take into consideration any\n      //  web components if the `tabbableOptions.getShadowRoot` option was used for\n      //  the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n      //  look inside web components even if open)\n      (composedPath === null || composedPath === void 0 ? void 0 : composedPath.includes(container)) || tabbableNodes.find(function(node) {\n        return node === element;\n      });\n    });\n  };\n  var getNodeForOption = function getNodeForOption2(optionName) {\n    var _ref2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref2$hasFallback = _ref2.hasFallback, hasFallback = _ref2$hasFallback === void 0 ? false : _ref2$hasFallback, _ref2$params = _ref2.params, params = _ref2$params === void 0 ? [] : _ref2$params;\n    var optionValue = config[optionName];\n    if (typeof optionValue === \"function\") {\n      optionValue = optionValue.apply(void 0, _toConsumableArray(params));\n    }\n    if (optionValue === true) {\n      optionValue = void 0;\n    }\n    if (!optionValue) {\n      if (optionValue === void 0 || optionValue === false) {\n        return optionValue;\n      }\n      throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n    }\n    var node = optionValue;\n    if (typeof optionValue === \"string\") {\n      try {\n        node = doc.querySelector(optionValue);\n      } catch (err) {\n        throw new Error(\"`\".concat(optionName, '` appears to be an invalid selector; error=\"').concat(err.message, '\"'));\n      }\n      if (!node) {\n        if (!hasFallback) {\n          throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n        }\n      }\n    }\n    return node;\n  };\n  var getInitialFocusNode = function getInitialFocusNode2() {\n    var node = getNodeForOption(\"initialFocus\", {\n      hasFallback: true\n    });\n    if (node === false) {\n      return false;\n    }\n    if (node === void 0 || node && !isFocusable(node, config.tabbableOptions)) {\n      if (findContainerIndex(doc.activeElement) >= 0) {\n        node = doc.activeElement;\n      } else {\n        var firstTabbableGroup = state.tabbableGroups[0];\n        var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n        node = firstTabbableNode || getNodeForOption(\"fallbackFocus\");\n      }\n    } else if (node === null) {\n      node = getNodeForOption(\"fallbackFocus\");\n    }\n    if (!node) {\n      throw new Error(\"Your focus-trap needs to have at least one focusable element\");\n    }\n    return node;\n  };\n  var updateTabbableNodes = function updateTabbableNodes2() {\n    state.containerGroups = state.containers.map(function(container) {\n      var tabbableNodes = tabbable(container, config.tabbableOptions);\n      var focusableNodes = focusable(container, config.tabbableOptions);\n      var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : void 0;\n      var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : void 0;\n      var firstDomTabbableNode = focusableNodes.find(function(node) {\n        return isTabbable(node);\n      });\n      var lastDomTabbableNode = focusableNodes.slice().reverse().find(function(node) {\n        return isTabbable(node);\n      });\n      var posTabIndexesFound = !!tabbableNodes.find(function(node) {\n        return getTabIndex(node) > 0;\n      });\n      return {\n        container,\n        tabbableNodes,\n        focusableNodes,\n        /** True if at least one node with positive `tabindex` was found in this container. */\n        posTabIndexesFound,\n        /** First tabbable node in container, __tabindex__ order; `undefined` if none. */\n        firstTabbableNode,\n        /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */\n        lastTabbableNode,\n        // NOTE: DOM order is NOT NECESSARILY \"document position\" order, but figuring that out\n        //  would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n        //  because that API doesn't work with Shadow DOM as well as it should (@see\n        //  https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,\n        //  to address an edge case related to positive tabindex support, this seems like a much easier,\n        //  \"close enough most of the time\" alternative for positive tabindexes which should generally\n        //  be avoided anyway...\n        /** First tabbable node in container, __DOM__ order; `undefined` if none. */\n        firstDomTabbableNode,\n        /** Last tabbable node in container, __DOM__ order; `undefined` if none. */\n        lastDomTabbableNode,\n        /**\n         * Finds the __tabbable__ node that follows the given node in the specified direction,\n         *  in this container, if any.\n         * @param {HTMLElement} node\n         * @param {boolean} [forward] True if going in forward tab order; false if going\n         *  in reverse.\n         * @returns {HTMLElement|undefined} The next tabbable node, if any.\n         */\n        nextTabbableNode: function nextTabbableNode(node) {\n          var forward = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;\n          var nodeIdx = tabbableNodes.indexOf(node);\n          if (nodeIdx < 0) {\n            if (forward) {\n              return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function(el) {\n                return isTabbable(el);\n              });\n            }\n            return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function(el) {\n              return isTabbable(el);\n            });\n          }\n          return tabbableNodes[nodeIdx + (forward ? 1 : -1)];\n        }\n      };\n    });\n    state.tabbableGroups = state.containerGroups.filter(function(group) {\n      return group.tabbableNodes.length > 0;\n    });\n    if (state.tabbableGroups.length <= 0 && !getNodeForOption(\"fallbackFocus\")) {\n      throw new Error(\"Your focus-trap must have at least one container with at least one tabbable node in it at all times\");\n    }\n    if (state.containerGroups.find(function(g) {\n      return g.posTabIndexesFound;\n    }) && state.containerGroups.length > 1) {\n      throw new Error(\"At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.\");\n    }\n  };\n  var _getActiveElement = function getActiveElement(el) {\n    var activeElement = el.activeElement;\n    if (!activeElement) {\n      return;\n    }\n    if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) {\n      return _getActiveElement(activeElement.shadowRoot);\n    }\n    return activeElement;\n  };\n  var _tryFocus = function tryFocus(node) {\n    if (node === false) {\n      return;\n    }\n    if (node === _getActiveElement(document)) {\n      return;\n    }\n    if (!node || !node.focus) {\n      _tryFocus(getInitialFocusNode());\n      return;\n    }\n    node.focus({\n      preventScroll: !!config.preventScroll\n    });\n    state.mostRecentlyFocusedNode = node;\n    if (isSelectableInput(node)) {\n      node.select();\n    }\n  };\n  var getReturnFocusNode = function getReturnFocusNode2(previousActiveElement) {\n    var node = getNodeForOption(\"setReturnFocus\", {\n      params: [previousActiveElement]\n    });\n    return node ? node : node === false ? false : previousActiveElement;\n  };\n  var findNextNavNode = function findNextNavNode2(_ref3) {\n    var target = _ref3.target, event = _ref3.event, _ref3$isBackward = _ref3.isBackward, isBackward = _ref3$isBackward === void 0 ? false : _ref3$isBackward;\n    target = target || getActualTarget(event);\n    updateTabbableNodes();\n    var destinationNode = null;\n    if (state.tabbableGroups.length > 0) {\n      var containerIndex = findContainerIndex(target, event);\n      var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : void 0;\n      if (containerIndex < 0) {\n        if (isBackward) {\n          destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;\n        } else {\n          destinationNode = state.tabbableGroups[0].firstTabbableNode;\n        }\n      } else if (isBackward) {\n        var startOfGroupIndex = state.tabbableGroups.findIndex(function(_ref4) {\n          var firstTabbableNode = _ref4.firstTabbableNode;\n          return target === firstTabbableNode;\n        });\n        if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {\n          startOfGroupIndex = containerIndex;\n        }\n        if (startOfGroupIndex >= 0) {\n          var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;\n          var destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;\n        } else if (!isTabEvent(event)) {\n          destinationNode = containerGroup.nextTabbableNode(target, false);\n        }\n      } else {\n        var lastOfGroupIndex = state.tabbableGroups.findIndex(function(_ref5) {\n          var lastTabbableNode = _ref5.lastTabbableNode;\n          return target === lastTabbableNode;\n        });\n        if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {\n          lastOfGroupIndex = containerIndex;\n        }\n        if (lastOfGroupIndex >= 0) {\n          var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;\n          var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];\n          destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;\n        } else if (!isTabEvent(event)) {\n          destinationNode = containerGroup.nextTabbableNode(target);\n        }\n      }\n    } else {\n      destinationNode = getNodeForOption(\"fallbackFocus\");\n    }\n    return destinationNode;\n  };\n  var checkPointerDown = function checkPointerDown2(e) {\n    var target = getActualTarget(e);\n    if (findContainerIndex(target, e) >= 0) {\n      return;\n    }\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      trap.deactivate({\n        // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n        //  which will result in the outside click setting focus to the node\n        //  that was clicked (and if not focusable, to \"nothing\"); by setting\n        //  `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n        //  on activation (or the configured `setReturnFocus` node), whether the\n        //  outside click was on a focusable node or not\n        returnFocus: config.returnFocusOnDeactivate\n      });\n      return;\n    }\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      return;\n    }\n    e.preventDefault();\n  };\n  var checkFocusIn = function checkFocusIn2(event) {\n    var target = getActualTarget(event);\n    var targetContained = findContainerIndex(target, event) >= 0;\n    if (targetContained || target instanceof Document) {\n      if (targetContained) {\n        state.mostRecentlyFocusedNode = target;\n      }\n    } else {\n      event.stopImmediatePropagation();\n      var nextNode;\n      var navAcrossContainers = true;\n      if (state.mostRecentlyFocusedNode) {\n        if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {\n          var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);\n          var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;\n          if (tabbableNodes.length > 0) {\n            var mruTabIdx = tabbableNodes.findIndex(function(node) {\n              return node === state.mostRecentlyFocusedNode;\n            });\n            if (mruTabIdx >= 0) {\n              if (config.isKeyForward(state.recentNavEvent)) {\n                if (mruTabIdx + 1 < tabbableNodes.length) {\n                  nextNode = tabbableNodes[mruTabIdx + 1];\n                  navAcrossContainers = false;\n                }\n              } else {\n                if (mruTabIdx - 1 >= 0) {\n                  nextNode = tabbableNodes[mruTabIdx - 1];\n                  navAcrossContainers = false;\n                }\n              }\n            }\n          }\n        } else {\n          if (!state.containerGroups.some(function(g) {\n            return g.tabbableNodes.some(function(n) {\n              return getTabIndex(n) > 0;\n            });\n          })) {\n            navAcrossContainers = false;\n          }\n        }\n      } else {\n        navAcrossContainers = false;\n      }\n      if (navAcrossContainers) {\n        nextNode = findNextNavNode({\n          // move FROM the MRU node, not event-related node (which will be the node that is\n          //  outside the trap causing the focus escape we're trying to fix)\n          target: state.mostRecentlyFocusedNode,\n          isBackward: config.isKeyBackward(state.recentNavEvent)\n        });\n      }\n      if (nextNode) {\n        _tryFocus(nextNode);\n      } else {\n        _tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n      }\n    }\n    state.recentNavEvent = void 0;\n  };\n  var checkKeyNav = function checkKeyNav2(event) {\n    var isBackward = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n    state.recentNavEvent = event;\n    var destinationNode = findNextNavNode({\n      event,\n      isBackward\n    });\n    if (destinationNode) {\n      if (isTabEvent(event)) {\n        event.preventDefault();\n      }\n      _tryFocus(destinationNode);\n    }\n  };\n  var checkTabKey = function checkTabKey2(event) {\n    if (config.isKeyForward(event) || config.isKeyBackward(event)) {\n      checkKeyNav(event, config.isKeyBackward(event));\n    }\n  };\n  var checkEscapeKey = function checkEscapeKey2(event) {\n    if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {\n      event.preventDefault();\n      trap.deactivate();\n    }\n  };\n  var checkClick = function checkClick2(e) {\n    var target = getActualTarget(e);\n    if (findContainerIndex(target, e) >= 0) {\n      return;\n    }\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      return;\n    }\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      return;\n    }\n    e.preventDefault();\n    e.stopImmediatePropagation();\n  };\n  var addListeners = function addListeners2() {\n    if (!state.active) {\n      return Promise.resolve();\n    }\n    activeFocusTraps.activateTrap(trapStack, trap);\n    var promise;\n    if (config.delayInitialFocus) {\n      promise = new Promise(function(resolve) {\n        state.delayInitialFocusTimer = delay(function() {\n          _tryFocus(getInitialFocusNode());\n          resolve();\n        });\n      });\n    } else {\n      promise = Promise.resolve();\n      _tryFocus(getInitialFocusNode());\n    }\n    doc.addEventListener(\"focusin\", checkFocusIn, true);\n    doc.addEventListener(\"mousedown\", checkPointerDown, {\n      capture: true,\n      passive: false\n    });\n    doc.addEventListener(\"touchstart\", checkPointerDown, {\n      capture: true,\n      passive: false\n    });\n    doc.addEventListener(\"click\", checkClick, {\n      capture: true,\n      passive: false\n    });\n    doc.addEventListener(\"keydown\", checkTabKey, {\n      capture: true,\n      passive: false\n    });\n    doc.addEventListener(\"keydown\", checkEscapeKey);\n    return promise;\n  };\n  var collectAdjacentElements = function collectAdjacentElements2(containers) {\n    if (state.active && !state.paused) {\n      trap._setSubtreeIsolation(false);\n    }\n    state.adjacentElements.clear();\n    state.alreadySilent.clear();\n    var containerAncestors = /* @__PURE__ */ new Set();\n    var adjacentElements = /* @__PURE__ */ new Set();\n    var _iterator = _createForOfIteratorHelper(containers), _step;\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done; ) {\n        var container = _step.value;\n        containerAncestors.add(container);\n        var insideShadowRoot = typeof ShadowRoot !== \"undefined\" && container.getRootNode() instanceof ShadowRoot;\n        var current = container;\n        while (current) {\n          containerAncestors.add(current);\n          var parent = current.parentElement;\n          var siblings = [];\n          if (parent) {\n            siblings = parent.children;\n          } else if (!parent && insideShadowRoot) {\n            siblings = current.getRootNode().children;\n            parent = current.getRootNode().host;\n            insideShadowRoot = typeof ShadowRoot !== \"undefined\" && parent.getRootNode() instanceof ShadowRoot;\n          }\n          var _iterator2 = _createForOfIteratorHelper(siblings), _step2;\n          try {\n            for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {\n              var child = _step2.value;\n              adjacentElements.add(child);\n            }\n          } catch (err) {\n            _iterator2.e(err);\n          } finally {\n            _iterator2.f();\n          }\n          current = parent;\n        }\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n    containerAncestors.forEach(function(el) {\n      adjacentElements[\"delete\"](el);\n    });\n    state.adjacentElements = adjacentElements;\n  };\n  var removeListeners = function removeListeners2() {\n    if (!state.active) {\n      return;\n    }\n    doc.removeEventListener(\"focusin\", checkFocusIn, true);\n    doc.removeEventListener(\"mousedown\", checkPointerDown, true);\n    doc.removeEventListener(\"touchstart\", checkPointerDown, true);\n    doc.removeEventListener(\"click\", checkClick, true);\n    doc.removeEventListener(\"keydown\", checkTabKey, true);\n    doc.removeEventListener(\"keydown\", checkEscapeKey);\n    return trap;\n  };\n  var checkDomRemoval = function checkDomRemoval2(mutations) {\n    var isFocusedNodeRemoved = mutations.some(function(mutation) {\n      var removedNodes = Array.from(mutation.removedNodes);\n      return removedNodes.some(function(node) {\n        return node === state.mostRecentlyFocusedNode;\n      });\n    });\n    if (isFocusedNodeRemoved) {\n      _tryFocus(getInitialFocusNode());\n    }\n  };\n  var mutationObserver = typeof window !== \"undefined\" && \"MutationObserver\" in window ? new MutationObserver(checkDomRemoval) : void 0;\n  var updateObservedNodes = function updateObservedNodes2() {\n    if (!mutationObserver) {\n      return;\n    }\n    mutationObserver.disconnect();\n    if (state.active && !state.paused) {\n      state.containers.map(function(container) {\n        mutationObserver.observe(container, {\n          subtree: true,\n          childList: true\n        });\n      });\n    }\n  };\n  trap = {\n    get active() {\n      return state.active;\n    },\n    get paused() {\n      return state.paused;\n    },\n    activate: function activate(activateOptions) {\n      if (state.active) {\n        return this;\n      }\n      var onActivate = getOption(activateOptions, \"onActivate\");\n      var onPostActivate = getOption(activateOptions, \"onPostActivate\");\n      var checkCanFocusTrap = getOption(activateOptions, \"checkCanFocusTrap\");\n      var preexistingTrap = activeFocusTraps.getActiveTrap(trapStack);\n      var revertState = false;\n      if (preexistingTrap && !preexistingTrap.paused) {\n        var _preexistingTrap$_set;\n        (_preexistingTrap$_set = preexistingTrap._setSubtreeIsolation) === null || _preexistingTrap$_set === void 0 || _preexistingTrap$_set.call(preexistingTrap, false);\n        revertState = true;\n      }\n      try {\n        if (!checkCanFocusTrap) {\n          updateTabbableNodes();\n        }\n        state.active = true;\n        state.paused = false;\n        state.nodeFocusedBeforeActivation = _getActiveElement(doc);\n        onActivate === null || onActivate === void 0 || onActivate();\n        var finishActivation = /* @__PURE__ */ function() {\n          var _ref6 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee() {\n            return _regenerator().w(function(_context) {\n              while (1)\n                switch (_context.n) {\n                  case 0:\n                    if (checkCanFocusTrap) {\n                      updateTabbableNodes();\n                    }\n                    _context.n = 1;\n                    return addListeners();\n                  case 1:\n                    trap._setSubtreeIsolation(true);\n                    updateObservedNodes();\n                    onPostActivate === null || onPostActivate === void 0 || onPostActivate();\n                  case 2:\n                    return _context.a(2);\n                }\n            }, _callee);\n          }));\n          return function finishActivation2() {\n            return _ref6.apply(this, arguments);\n          };\n        }();\n        if (checkCanFocusTrap) {\n          checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);\n          return this;\n        }\n        finishActivation();\n      } catch (error) {\n        if (preexistingTrap === activeFocusTraps.getActiveTrap(trapStack) && revertState) {\n          var _preexistingTrap$_set2;\n          (_preexistingTrap$_set2 = preexistingTrap._setSubtreeIsolation) === null || _preexistingTrap$_set2 === void 0 || _preexistingTrap$_set2.call(preexistingTrap, true);\n        }\n        throw error;\n      }\n      return this;\n    },\n    deactivate: function deactivate(deactivateOptions) {\n      if (!state.active) {\n        return this;\n      }\n      var options = _objectSpread2({\n        onDeactivate: config.onDeactivate,\n        onPostDeactivate: config.onPostDeactivate,\n        checkCanReturnFocus: config.checkCanReturnFocus\n      }, deactivateOptions);\n      clearTimeout(state.delayInitialFocusTimer);\n      state.delayInitialFocusTimer = void 0;\n      if (!state.paused) {\n        trap._setSubtreeIsolation(false);\n      }\n      state.alreadySilent.clear();\n      removeListeners();\n      state.active = false;\n      state.paused = false;\n      updateObservedNodes();\n      activeFocusTraps.deactivateTrap(trapStack, trap);\n      var onDeactivate = getOption(options, \"onDeactivate\");\n      var onPostDeactivate = getOption(options, \"onPostDeactivate\");\n      var checkCanReturnFocus = getOption(options, \"checkCanReturnFocus\");\n      var returnFocus = getOption(options, \"returnFocus\", \"returnFocusOnDeactivate\");\n      onDeactivate === null || onDeactivate === void 0 || onDeactivate();\n      var finishDeactivation = function finishDeactivation2() {\n        delay(function() {\n          if (returnFocus) {\n            _tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n          }\n          onPostDeactivate === null || onPostDeactivate === void 0 || onPostDeactivate();\n        });\n      };\n      if (returnFocus && checkCanReturnFocus) {\n        checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);\n        return this;\n      }\n      finishDeactivation();\n      return this;\n    },\n    pause: function pause(pauseOptions) {\n      if (!state.active) {\n        return this;\n      }\n      state.manuallyPaused = true;\n      return this._setPausedState(true, pauseOptions);\n    },\n    unpause: function unpause(unpauseOptions) {\n      if (!state.active) {\n        return this;\n      }\n      state.manuallyPaused = false;\n      if (trapStack[trapStack.length - 1] !== this) {\n        return this;\n      }\n      return this._setPausedState(false, unpauseOptions);\n    },\n    updateContainerElements: function updateContainerElements(containerElements) {\n      var elementsAsArray = [].concat(containerElements).filter(Boolean);\n      state.containers = elementsAsArray.map(function(element) {\n        return typeof element === \"string\" ? doc.querySelector(element) : element;\n      });\n      if (config.isolateSubtrees) {\n        collectAdjacentElements(state.containers);\n      }\n      if (state.active) {\n        updateTabbableNodes();\n        if (!state.paused) {\n          trap._setSubtreeIsolation(true);\n        }\n      }\n      updateObservedNodes();\n      return this;\n    }\n  };\n  Object.defineProperties(trap, {\n    _isManuallyPaused: {\n      value: function value() {\n        return state.manuallyPaused;\n      }\n    },\n    _setPausedState: {\n      value: function value(paused, options) {\n        if (state.paused === paused) {\n          return this;\n        }\n        state.paused = paused;\n        if (paused) {\n          var onPause = getOption(options, \"onPause\");\n          var onPostPause = getOption(options, \"onPostPause\");\n          onPause === null || onPause === void 0 || onPause();\n          removeListeners();\n          trap._setSubtreeIsolation(false);\n          updateObservedNodes();\n          onPostPause === null || onPostPause === void 0 || onPostPause();\n        } else {\n          var onUnpause = getOption(options, \"onUnpause\");\n          var onPostUnpause = getOption(options, \"onPostUnpause\");\n          onUnpause === null || onUnpause === void 0 || onUnpause();\n          var finishUnpause = /* @__PURE__ */ function() {\n            var _ref7 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee2() {\n              return _regenerator().w(function(_context2) {\n                while (1)\n                  switch (_context2.n) {\n                    case 0:\n                      updateTabbableNodes();\n                      _context2.n = 1;\n                      return addListeners();\n                    case 1:\n                      trap._setSubtreeIsolation(true);\n                      updateObservedNodes();\n                      onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();\n                    case 2:\n                      return _context2.a(2);\n                  }\n              }, _callee2);\n            }));\n            return function finishUnpause2() {\n              return _ref7.apply(this, arguments);\n            };\n          }();\n          finishUnpause();\n        }\n        return this;\n      }\n    },\n    _setSubtreeIsolation: {\n      value: function value(isEnabled) {\n        if (config.isolateSubtrees) {\n          state.adjacentElements.forEach(function(el) {\n            var _el$getAttribute;\n            if (isEnabled) {\n              switch (config.isolateSubtrees) {\n                case \"aria-hidden\":\n                  if (el.ariaHidden === \"true\" || ((_el$getAttribute = el.getAttribute(\"aria-hidden\")) === null || _el$getAttribute === void 0 ? void 0 : _el$getAttribute.toLowerCase()) === \"true\") {\n                    state.alreadySilent.add(el);\n                  }\n                  el.setAttribute(\"aria-hidden\", \"true\");\n                  break;\n                default:\n                  if (el.inert || el.hasAttribute(\"inert\")) {\n                    state.alreadySilent.add(el);\n                  }\n                  el.setAttribute(\"inert\", true);\n                  break;\n              }\n            } else {\n              if (state.alreadySilent.has(el))\n                ;\n              else {\n                switch (config.isolateSubtrees) {\n                  case \"aria-hidden\":\n                    el.removeAttribute(\"aria-hidden\");\n                    break;\n                  default:\n                    el.removeAttribute(\"inert\");\n                    break;\n                }\n              }\n            }\n          });\n        }\n      }\n    }\n  });\n  trap.updateContainerElements(elements);\n  return trap;\n};\n\n// packages/focus/src/index.js\nfunction src_default(Alpine) {\n  let lastFocused;\n  let currentFocused;\n  window.addEventListener(\"focusin\", () => {\n    lastFocused = currentFocused;\n    currentFocused = document.activeElement;\n  });\n  Alpine.magic(\"focus\", (el) => {\n    let within = el;\n    return {\n      __noscroll: false,\n      __wrapAround: false,\n      within(el2) {\n        within = el2;\n        return this;\n      },\n      withoutScrolling() {\n        this.__noscroll = true;\n        return this;\n      },\n      noscroll() {\n        this.__noscroll = true;\n        return this;\n      },\n      withWrapAround() {\n        this.__wrapAround = true;\n        return this;\n      },\n      wrap() {\n        return this.withWrapAround();\n      },\n      focusable(el2) {\n        return isFocusable(el2);\n      },\n      previouslyFocused() {\n        return lastFocused;\n      },\n      lastFocused() {\n        return lastFocused;\n      },\n      focused() {\n        return currentFocused;\n      },\n      focusables() {\n        if (Array.isArray(within))\n          return within;\n        return focusable(within, { displayCheck: \"none\" });\n      },\n      all() {\n        return this.focusables();\n      },\n      isFirst(el2) {\n        let els = this.all();\n        return els[0] && els[0].isSameNode(el2);\n      },\n      isLast(el2) {\n        let els = this.all();\n        return els.length && els.slice(-1)[0].isSameNode(el2);\n      },\n      getFirst() {\n        return this.all()[0];\n      },\n      getLast() {\n        return this.all().slice(-1)[0];\n      },\n      getNext() {\n        let list = this.all();\n        let current = document.activeElement;\n        if (list.indexOf(current) === -1)\n          return;\n        if (this.__wrapAround && list.indexOf(current) === list.length - 1) {\n          return list[0];\n        }\n        return list[list.indexOf(current) + 1];\n      },\n      getPrevious() {\n        let list = this.all();\n        let current = document.activeElement;\n        if (list.indexOf(current) === -1)\n          return;\n        if (this.__wrapAround && list.indexOf(current) === 0) {\n          return list.slice(-1)[0];\n        }\n        return list[list.indexOf(current) - 1];\n      },\n      first() {\n        this.focus(this.getFirst());\n      },\n      last() {\n        this.focus(this.getLast());\n      },\n      next() {\n        this.focus(this.getNext());\n      },\n      previous() {\n        this.focus(this.getPrevious());\n      },\n      prev() {\n        return this.previous();\n      },\n      focus(el2) {\n        if (!el2)\n          return;\n        setTimeout(() => {\n          if (!el2.hasAttribute(\"tabindex\"))\n            el2.setAttribute(\"tabindex\", \"0\");\n          el2.focus({ preventScroll: this.__noscroll });\n        });\n      }\n    };\n  });\n  Alpine.directive(\"trap\", Alpine.skipDuringClone(\n    (el, { expression, modifiers }, { effect, evaluateLater, cleanup }) => {\n      let evaluator = evaluateLater(expression);\n      let oldValue = false;\n      let options = {\n        escapeDeactivates: false,\n        allowOutsideClick: true,\n        fallbackFocus: () => el\n      };\n      let undoInert = () => {\n      };\n      if (modifiers.includes(\"noautofocus\")) {\n        options.initialFocus = false;\n      } else {\n        let autofocusEl = el.querySelector(\"[autofocus]\");\n        if (autofocusEl)\n          options.initialFocus = autofocusEl;\n      }\n      if (modifiers.includes(\"inert\")) {\n        options.onPostActivate = () => {\n          Alpine.nextTick(() => {\n            undoInert = setInert(el);\n          });\n        };\n      }\n      let trap = createFocusTrap(el, options);\n      let undoDisableScrolling = () => {\n      };\n      const releaseFocus = () => {\n        undoInert();\n        undoInert = () => {\n        };\n        undoDisableScrolling();\n        undoDisableScrolling = () => {\n        };\n        trap.deactivate({\n          returnFocus: !modifiers.includes(\"noreturn\")\n        });\n      };\n      effect(() => evaluator((value) => {\n        if (oldValue === value)\n          return;\n        if (value && !oldValue) {\n          if (modifiers.includes(\"noscroll\"))\n            undoDisableScrolling = disableScrolling();\n          setTimeout(() => {\n            trap.activate();\n          }, 15);\n        }\n        if (!value && oldValue) {\n          releaseFocus();\n        }\n        oldValue = !!value;\n      }));\n      cleanup(releaseFocus);\n    },\n    // When cloning, we only want to add aria-hidden attributes to the\n    // DOM and not try to actually trap, as trapping can mess with the\n    // live DOM and isn't just isolated to the cloned DOM.\n    (el, { expression, modifiers }, { evaluate }) => {\n      if (modifiers.includes(\"inert\") && evaluate(expression))\n        setInert(el);\n    }\n  ));\n}\nfunction setInert(el) {\n  let undos = [];\n  crawlSiblingsUp(el, (sibling) => {\n    let cache = sibling.hasAttribute(\"aria-hidden\");\n    sibling.setAttribute(\"aria-hidden\", \"true\");\n    undos.push(() => cache || sibling.removeAttribute(\"aria-hidden\"));\n  });\n  return () => {\n    while (undos.length)\n      undos.pop()();\n  };\n}\nfunction crawlSiblingsUp(el, callback) {\n  if (el.isSameNode(document.body) || !el.parentNode)\n    return;\n  Array.from(el.parentNode.children).forEach((sibling) => {\n    if (sibling.isSameNode(el)) {\n      crawlSiblingsUp(el.parentNode, callback);\n    } else {\n      callback(sibling);\n    }\n  });\n}\nfunction disableScrolling() {\n  let overflow = document.documentElement.style.overflow;\n  let paddingRight = document.documentElement.style.paddingRight;\n  let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n  let scrollbarGutter = window.getComputedStyle(document.documentElement).scrollbarGutter;\n  document.documentElement.style.overflow = \"hidden\";\n  if (scrollbarGutter && scrollbarGutter !== \"auto\") {\n    return () => {\n      document.documentElement.style.overflow = overflow;\n    };\n  }\n  document.documentElement.style.paddingRight = `${scrollbarWidth}px`;\n  return () => {\n    document.documentElement.style.overflow = overflow;\n    document.documentElement.style.paddingRight = paddingRight;\n  };\n}\n\n// packages/focus/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default,\n  src_default as focus\n};\n/*! Bundled license information:\n\ntabbable/dist/index.esm.js:\n  (*!\n  * tabbable 6.4.0\n  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n  *)\n\nfocus-trap/dist/focus-trap.esm.js:\n  (*!\n  * focus-trap 8.0.0\n  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE\n  *)\n  (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE *)\n*/\n","// node_modules/sortablejs/modular/sortable.esm.js\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) {\n      symbols = symbols.filter(function(sym) {\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function(key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function(key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n  return target;\n}\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function(obj2) {\n      return typeof obj2;\n    };\n  } else {\n    _typeof = function(obj2) {\n      return obj2 && typeof Symbol === \"function\" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? \"symbol\" : typeof obj2;\n    };\n  }\n  return _typeof(obj);\n}\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nfunction _extends() {\n  _extends = Object.assign || function(target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null)\n    return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0)\n      continue;\n    target[key] = source[key];\n  }\n  return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null)\n    return {};\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n  var key, i;\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0)\n        continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key))\n        continue;\n      target[key] = source[key];\n    }\n  }\n  return target;\n}\nvar version = \"1.15.2\";\nfunction userAgent(pattern) {\n  if (typeof window !== \"undefined\" && window.navigator) {\n    return !!/* @__PURE__ */ navigator.userAgent.match(pattern);\n  }\n}\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\nvar captureMode = {\n  capture: false,\n  passive: false\n};\nfunction on(el, event, fn) {\n  el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction off(el, event, fn) {\n  el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction matches(el, selector) {\n  if (!selector)\n    return;\n  selector[0] === \">\" && (selector = selector.substring(1));\n  if (el) {\n    try {\n      if (el.matches) {\n        return el.matches(selector);\n      } else if (el.msMatchesSelector) {\n        return el.msMatchesSelector(selector);\n      } else if (el.webkitMatchesSelector) {\n        return el.webkitMatchesSelector(selector);\n      }\n    } catch (_) {\n      return false;\n    }\n  }\n  return false;\n}\nfunction getParentOrHost(el) {\n  return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\nfunction closest(el, selector, ctx, includeCTX) {\n  if (el) {\n    ctx = ctx || document;\n    do {\n      if (selector != null && (selector[0] === \">\" ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n        return el;\n      }\n      if (el === ctx)\n        break;\n    } while (el = getParentOrHost(el));\n  }\n  return null;\n}\nvar R_SPACE = /\\s+/g;\nfunction toggleClass(el, name, state) {\n  if (el && name) {\n    if (el.classList) {\n      el.classList[state ? \"add\" : \"remove\"](name);\n    } else {\n      var className = (\" \" + el.className + \" \").replace(R_SPACE, \" \").replace(\" \" + name + \" \", \" \");\n      el.className = (className + (state ? \" \" + name : \"\")).replace(R_SPACE, \" \");\n    }\n  }\n}\nfunction css(el, prop, val) {\n  var style = el && el.style;\n  if (style) {\n    if (val === void 0) {\n      if (document.defaultView && document.defaultView.getComputedStyle) {\n        val = document.defaultView.getComputedStyle(el, \"\");\n      } else if (el.currentStyle) {\n        val = el.currentStyle;\n      }\n      return prop === void 0 ? val : val[prop];\n    } else {\n      if (!(prop in style) && prop.indexOf(\"webkit\") === -1) {\n        prop = \"-webkit-\" + prop;\n      }\n      style[prop] = val + (typeof val === \"string\" ? \"\" : \"px\");\n    }\n  }\n}\nfunction matrix(el, selfOnly) {\n  var appliedTransforms = \"\";\n  if (typeof el === \"string\") {\n    appliedTransforms = el;\n  } else {\n    do {\n      var transform = css(el, \"transform\");\n      if (transform && transform !== \"none\") {\n        appliedTransforms = transform + \" \" + appliedTransforms;\n      }\n    } while (!selfOnly && (el = el.parentNode));\n  }\n  var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n  return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction find(ctx, tagName, iterator) {\n  if (ctx) {\n    var list = ctx.getElementsByTagName(tagName), i = 0, n = list.length;\n    if (iterator) {\n      for (; i < n; i++) {\n        iterator(list[i], i);\n      }\n    }\n    return list;\n  }\n  return [];\n}\nfunction getWindowScrollingElement() {\n  var scrollingElement = document.scrollingElement;\n  if (scrollingElement) {\n    return scrollingElement;\n  } else {\n    return document.documentElement;\n  }\n}\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n  if (!el.getBoundingClientRect && el !== window)\n    return;\n  var elRect, top, left, bottom, right, height, width;\n  if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n    elRect = el.getBoundingClientRect();\n    top = elRect.top;\n    left = elRect.left;\n    bottom = elRect.bottom;\n    right = elRect.right;\n    height = elRect.height;\n    width = elRect.width;\n  } else {\n    top = 0;\n    left = 0;\n    bottom = window.innerHeight;\n    right = window.innerWidth;\n    height = window.innerHeight;\n    width = window.innerWidth;\n  }\n  if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n    container = container || el.parentNode;\n    if (!IE11OrLess) {\n      do {\n        if (container && container.getBoundingClientRect && (css(container, \"transform\") !== \"none\" || relativeToNonStaticParent && css(container, \"position\") !== \"static\")) {\n          var containerRect = container.getBoundingClientRect();\n          top -= containerRect.top + parseInt(css(container, \"border-top-width\"));\n          left -= containerRect.left + parseInt(css(container, \"border-left-width\"));\n          bottom = top + elRect.height;\n          right = left + elRect.width;\n          break;\n        }\n      } while (container = container.parentNode);\n    }\n  }\n  if (undoScale && el !== window) {\n    var elMatrix = matrix(container || el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d;\n    if (elMatrix) {\n      top /= scaleY;\n      left /= scaleX;\n      width /= scaleX;\n      height /= scaleY;\n      bottom = top + height;\n      right = left + width;\n    }\n  }\n  return {\n    top,\n    left,\n    bottom,\n    right,\n    width,\n    height\n  };\n}\nfunction isScrolledPast(el, elSide, parentSide) {\n  var parent = getParentAutoScrollElement(el, true), elSideVal = getRect(el)[elSide];\n  while (parent) {\n    var parentSideVal = getRect(parent)[parentSide], visible = void 0;\n    if (parentSide === \"top\" || parentSide === \"left\") {\n      visible = elSideVal >= parentSideVal;\n    } else {\n      visible = elSideVal <= parentSideVal;\n    }\n    if (!visible)\n      return parent;\n    if (parent === getWindowScrollingElement())\n      break;\n    parent = getParentAutoScrollElement(parent, false);\n  }\n  return false;\n}\nfunction getChild(el, childNum, options, includeDragEl) {\n  var currentChild = 0, i = 0, children = el.children;\n  while (i < children.length) {\n    if (children[i].style.display !== \"none\" && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n      if (currentChild === childNum) {\n        return children[i];\n      }\n      currentChild++;\n    }\n    i++;\n  }\n  return null;\n}\nfunction lastChild(el, selector) {\n  var last = el.lastElementChild;\n  while (last && (last === Sortable.ghost || css(last, \"display\") === \"none\" || selector && !matches(last, selector))) {\n    last = last.previousElementSibling;\n  }\n  return last || null;\n}\nfunction index(el, selector) {\n  var index2 = 0;\n  if (!el || !el.parentNode) {\n    return -1;\n  }\n  while (el = el.previousElementSibling) {\n    if (el.nodeName.toUpperCase() !== \"TEMPLATE\" && el !== Sortable.clone && (!selector || matches(el, selector))) {\n      index2++;\n    }\n  }\n  return index2;\n}\nfunction getRelativeScrollOffset(el) {\n  var offsetLeft = 0, offsetTop = 0, winScroller = getWindowScrollingElement();\n  if (el) {\n    do {\n      var elMatrix = matrix(el), scaleX = elMatrix.a, scaleY = elMatrix.d;\n      offsetLeft += el.scrollLeft * scaleX;\n      offsetTop += el.scrollTop * scaleY;\n    } while (el !== winScroller && (el = el.parentNode));\n  }\n  return [offsetLeft, offsetTop];\n}\nfunction indexOfObject(arr, obj) {\n  for (var i in arr) {\n    if (!arr.hasOwnProperty(i))\n      continue;\n    for (var key in obj) {\n      if (obj.hasOwnProperty(key) && obj[key] === arr[i][key])\n        return Number(i);\n    }\n  }\n  return -1;\n}\nfunction getParentAutoScrollElement(el, includeSelf) {\n  if (!el || !el.getBoundingClientRect)\n    return getWindowScrollingElement();\n  var elem = el;\n  var gotSelf = false;\n  do {\n    if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n      var elemCSS = css(elem);\n      if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == \"auto\" || elemCSS.overflowX == \"scroll\") || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == \"auto\" || elemCSS.overflowY == \"scroll\")) {\n        if (!elem.getBoundingClientRect || elem === document.body)\n          return getWindowScrollingElement();\n        if (gotSelf || includeSelf)\n          return elem;\n        gotSelf = true;\n      }\n    }\n  } while (elem = elem.parentNode);\n  return getWindowScrollingElement();\n}\nfunction extend(dst, src) {\n  if (dst && src) {\n    for (var key in src) {\n      if (src.hasOwnProperty(key)) {\n        dst[key] = src[key];\n      }\n    }\n  }\n  return dst;\n}\nfunction isRectEqual(rect1, rect2) {\n  return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\nvar _throttleTimeout;\nfunction throttle(callback, ms) {\n  return function() {\n    if (!_throttleTimeout) {\n      var args = arguments, _this = this;\n      if (args.length === 1) {\n        callback.call(_this, args[0]);\n      } else {\n        callback.apply(_this, args);\n      }\n      _throttleTimeout = setTimeout(function() {\n        _throttleTimeout = void 0;\n      }, ms);\n    }\n  };\n}\nfunction cancelThrottle() {\n  clearTimeout(_throttleTimeout);\n  _throttleTimeout = void 0;\n}\nfunction scrollBy(el, x, y) {\n  el.scrollLeft += x;\n  el.scrollTop += y;\n}\nfunction clone(el) {\n  var Polymer = window.Polymer;\n  var $ = window.jQuery || window.Zepto;\n  if (Polymer && Polymer.dom) {\n    return Polymer.dom(el).cloneNode(true);\n  } else if ($) {\n    return $(el).clone(true)[0];\n  } else {\n    return el.cloneNode(true);\n  }\n}\nfunction getChildContainingRectFromElement(container, options, ghostEl2) {\n  var rect = {};\n  Array.from(container.children).forEach(function(child) {\n    var _rect$left, _rect$top, _rect$right, _rect$bottom;\n    if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl2)\n      return;\n    var childRect = getRect(child);\n    rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);\n    rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);\n    rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);\n    rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);\n  });\n  rect.width = rect.right - rect.left;\n  rect.height = rect.bottom - rect.top;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\nvar expando = \"Sortable\" + new Date().getTime();\nfunction AnimationStateManager() {\n  var animationStates = [], animationCallbackId;\n  return {\n    captureAnimationState: function captureAnimationState() {\n      animationStates = [];\n      if (!this.options.animation)\n        return;\n      var children = [].slice.call(this.el.children);\n      children.forEach(function(child) {\n        if (css(child, \"display\") === \"none\" || child === Sortable.ghost)\n          return;\n        animationStates.push({\n          target: child,\n          rect: getRect(child)\n        });\n        var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);\n        if (child.thisAnimationDuration) {\n          var childMatrix = matrix(child, true);\n          if (childMatrix) {\n            fromRect.top -= childMatrix.f;\n            fromRect.left -= childMatrix.e;\n          }\n        }\n        child.fromRect = fromRect;\n      });\n    },\n    addAnimationState: function addAnimationState(state) {\n      animationStates.push(state);\n    },\n    removeAnimationState: function removeAnimationState(target) {\n      animationStates.splice(indexOfObject(animationStates, {\n        target\n      }), 1);\n    },\n    animateAll: function animateAll(callback) {\n      var _this = this;\n      if (!this.options.animation) {\n        clearTimeout(animationCallbackId);\n        if (typeof callback === \"function\")\n          callback();\n        return;\n      }\n      var animating = false, animationTime = 0;\n      animationStates.forEach(function(state) {\n        var time = 0, target = state.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state.rect, targetMatrix = matrix(target, true);\n        if (targetMatrix) {\n          toRect.top -= targetMatrix.f;\n          toRect.left -= targetMatrix.e;\n        }\n        target.toRect = toRect;\n        if (target.thisAnimationDuration) {\n          if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n          (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n            time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n          }\n        }\n        if (!isRectEqual(toRect, fromRect)) {\n          target.prevFromRect = fromRect;\n          target.prevToRect = toRect;\n          if (!time) {\n            time = _this.options.animation;\n          }\n          _this.animate(target, animatingRect, toRect, time);\n        }\n        if (time) {\n          animating = true;\n          animationTime = Math.max(animationTime, time);\n          clearTimeout(target.animationResetTimer);\n          target.animationResetTimer = setTimeout(function() {\n            target.animationTime = 0;\n            target.prevFromRect = null;\n            target.fromRect = null;\n            target.prevToRect = null;\n            target.thisAnimationDuration = null;\n          }, time);\n          target.thisAnimationDuration = time;\n        }\n      });\n      clearTimeout(animationCallbackId);\n      if (!animating) {\n        if (typeof callback === \"function\")\n          callback();\n      } else {\n        animationCallbackId = setTimeout(function() {\n          if (typeof callback === \"function\")\n            callback();\n        }, animationTime);\n      }\n      animationStates = [];\n    },\n    animate: function animate(target, currentRect, toRect, duration) {\n      if (duration) {\n        css(target, \"transition\", \"\");\n        css(target, \"transform\", \"\");\n        var elMatrix = matrix(this.el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d, translateX = (currentRect.left - toRect.left) / (scaleX || 1), translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n        target.animatingX = !!translateX;\n        target.animatingY = !!translateY;\n        css(target, \"transform\", \"translate3d(\" + translateX + \"px,\" + translateY + \"px,0)\");\n        this.forRepaintDummy = repaint(target);\n        css(target, \"transition\", \"transform \" + duration + \"ms\" + (this.options.easing ? \" \" + this.options.easing : \"\"));\n        css(target, \"transform\", \"translate3d(0,0,0)\");\n        typeof target.animated === \"number\" && clearTimeout(target.animated);\n        target.animated = setTimeout(function() {\n          css(target, \"transition\", \"\");\n          css(target, \"transform\", \"\");\n          target.animated = false;\n          target.animatingX = false;\n          target.animatingY = false;\n        }, duration);\n      }\n    }\n  };\n}\nfunction repaint(target) {\n  return target.offsetWidth;\n}\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n  return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\nvar plugins = [];\nvar defaults = {\n  initializeByDefault: true\n};\nvar PluginManager = {\n  mount: function mount(plugin) {\n    for (var option2 in defaults) {\n      if (defaults.hasOwnProperty(option2) && !(option2 in plugin)) {\n        plugin[option2] = defaults[option2];\n      }\n    }\n    plugins.forEach(function(p) {\n      if (p.pluginName === plugin.pluginName) {\n        throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n      }\n    });\n    plugins.push(plugin);\n  },\n  pluginEvent: function pluginEvent(eventName, sortable, evt) {\n    var _this = this;\n    this.eventCanceled = false;\n    evt.cancel = function() {\n      _this.eventCanceled = true;\n    };\n    var eventNameGlobal = eventName + \"Global\";\n    plugins.forEach(function(plugin) {\n      if (!sortable[plugin.pluginName])\n        return;\n      if (sortable[plugin.pluginName][eventNameGlobal]) {\n        sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n          sortable\n        }, evt));\n      }\n      if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n        sortable[plugin.pluginName][eventName](_objectSpread2({\n          sortable\n        }, evt));\n      }\n    });\n  },\n  initializePlugins: function initializePlugins(sortable, el, defaults2, options) {\n    plugins.forEach(function(plugin) {\n      var pluginName = plugin.pluginName;\n      if (!sortable.options[pluginName] && !plugin.initializeByDefault)\n        return;\n      var initialized = new plugin(sortable, el, sortable.options);\n      initialized.sortable = sortable;\n      initialized.options = sortable.options;\n      sortable[pluginName] = initialized;\n      _extends(defaults2, initialized.defaults);\n    });\n    for (var option2 in sortable.options) {\n      if (!sortable.options.hasOwnProperty(option2))\n        continue;\n      var modified = this.modifyOption(sortable, option2, sortable.options[option2]);\n      if (typeof modified !== \"undefined\") {\n        sortable.options[option2] = modified;\n      }\n    }\n  },\n  getEventProperties: function getEventProperties(name, sortable) {\n    var eventProperties = {};\n    plugins.forEach(function(plugin) {\n      if (typeof plugin.eventProperties !== \"function\")\n        return;\n      _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n    });\n    return eventProperties;\n  },\n  modifyOption: function modifyOption(sortable, name, value) {\n    var modifiedValue;\n    plugins.forEach(function(plugin) {\n      if (!sortable[plugin.pluginName])\n        return;\n      if (plugin.optionListeners && typeof plugin.optionListeners[name] === \"function\") {\n        modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n      }\n    });\n    return modifiedValue;\n  }\n};\nfunction dispatchEvent(_ref) {\n  var sortable = _ref.sortable, rootEl2 = _ref.rootEl, name = _ref.name, targetEl = _ref.targetEl, cloneEl2 = _ref.cloneEl, toEl = _ref.toEl, fromEl = _ref.fromEl, oldIndex2 = _ref.oldIndex, newIndex2 = _ref.newIndex, oldDraggableIndex2 = _ref.oldDraggableIndex, newDraggableIndex2 = _ref.newDraggableIndex, originalEvent = _ref.originalEvent, putSortable2 = _ref.putSortable, extraEventProperties = _ref.extraEventProperties;\n  sortable = sortable || rootEl2 && rootEl2[expando];\n  if (!sortable)\n    return;\n  var evt, options = sortable.options, onName = \"on\" + name.charAt(0).toUpperCase() + name.substr(1);\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent(name, {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent(\"Event\");\n    evt.initEvent(name, true, true);\n  }\n  evt.to = toEl || rootEl2;\n  evt.from = fromEl || rootEl2;\n  evt.item = targetEl || rootEl2;\n  evt.clone = cloneEl2;\n  evt.oldIndex = oldIndex2;\n  evt.newIndex = newIndex2;\n  evt.oldDraggableIndex = oldDraggableIndex2;\n  evt.newDraggableIndex = newDraggableIndex2;\n  evt.originalEvent = originalEvent;\n  evt.pullMode = putSortable2 ? putSortable2.lastPutMode : void 0;\n  var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n  for (var option2 in allEventProperties) {\n    evt[option2] = allEventProperties[option2];\n  }\n  if (rootEl2) {\n    rootEl2.dispatchEvent(evt);\n  }\n  if (options[onName]) {\n    options[onName].call(sortable, evt);\n  }\n}\nvar _excluded = [\"evt\"];\nvar pluginEvent2 = function pluginEvent3(eventName, sortable) {\n  var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, originalEvent = _ref.evt, data = _objectWithoutProperties(_ref, _excluded);\n  PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n    dragEl,\n    parentEl,\n    ghostEl,\n    rootEl,\n    nextEl,\n    lastDownEl,\n    cloneEl,\n    cloneHidden,\n    dragStarted: moved,\n    putSortable,\n    activeSortable: Sortable.active,\n    originalEvent,\n    oldIndex,\n    oldDraggableIndex,\n    newIndex,\n    newDraggableIndex,\n    hideGhostForTarget: _hideGhostForTarget,\n    unhideGhostForTarget: _unhideGhostForTarget,\n    cloneNowHidden: function cloneNowHidden() {\n      cloneHidden = true;\n    },\n    cloneNowShown: function cloneNowShown() {\n      cloneHidden = false;\n    },\n    dispatchSortableEvent: function dispatchSortableEvent(name) {\n      _dispatchEvent({\n        sortable,\n        name,\n        originalEvent\n      });\n    }\n  }, data));\n};\nfunction _dispatchEvent(info) {\n  dispatchEvent(_objectSpread2({\n    putSortable,\n    cloneEl,\n    targetEl: dragEl,\n    rootEl,\n    oldIndex,\n    oldDraggableIndex,\n    newIndex,\n    newDraggableIndex\n  }, info));\n}\nvar dragEl;\nvar parentEl;\nvar ghostEl;\nvar rootEl;\nvar nextEl;\nvar lastDownEl;\nvar cloneEl;\nvar cloneHidden;\nvar oldIndex;\nvar newIndex;\nvar oldDraggableIndex;\nvar newDraggableIndex;\nvar activeGroup;\nvar putSortable;\nvar awaitingDragStarted = false;\nvar ignoreNextClick = false;\nvar sortables = [];\nvar tapEvt;\nvar touchEvt;\nvar lastDx;\nvar lastDy;\nvar tapDistanceLeft;\nvar tapDistanceTop;\nvar moved;\nvar lastTarget;\nvar lastDirection;\nvar pastFirstInvertThresh = false;\nvar isCircumstantialInvert = false;\nvar targetMoveDistance;\nvar ghostRelativeParent;\nvar ghostRelativeParentInitialScroll = [];\nvar _silent = false;\nvar savedInputChecked = [];\nvar documentExists = typeof document !== \"undefined\";\nvar PositionGhostAbsolutely = IOS;\nvar CSSFloatProperty = Edge || IE11OrLess ? \"cssFloat\" : \"float\";\nvar supportDraggable = documentExists && !ChromeForAndroid && !IOS && \"draggable\" in document.createElement(\"div\");\nvar supportCssPointerEvents = function() {\n  if (!documentExists)\n    return;\n  if (IE11OrLess) {\n    return false;\n  }\n  var el = document.createElement(\"x\");\n  el.style.cssText = \"pointer-events:auto\";\n  return el.style.pointerEvents === \"auto\";\n}();\nvar _detectDirection = function _detectDirection2(el, options) {\n  var elCSS = css(el), elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), child1 = getChild(el, 0, options), child2 = getChild(el, 1, options), firstChildCSS = child1 && css(child1), secondChildCSS = child2 && css(child2), firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width, secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n  if (elCSS.display === \"flex\") {\n    return elCSS.flexDirection === \"column\" || elCSS.flexDirection === \"column-reverse\" ? \"vertical\" : \"horizontal\";\n  }\n  if (elCSS.display === \"grid\") {\n    return elCSS.gridTemplateColumns.split(\" \").length <= 1 ? \"vertical\" : \"horizontal\";\n  }\n  if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== \"none\") {\n    var touchingSideChild2 = firstChildCSS[\"float\"] === \"left\" ? \"left\" : \"right\";\n    return child2 && (secondChildCSS.clear === \"both\" || secondChildCSS.clear === touchingSideChild2) ? \"vertical\" : \"horizontal\";\n  }\n  return child1 && (firstChildCSS.display === \"block\" || firstChildCSS.display === \"flex\" || firstChildCSS.display === \"table\" || firstChildCSS.display === \"grid\" || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === \"none\" || child2 && elCSS[CSSFloatProperty] === \"none\" && firstChildWidth + secondChildWidth > elWidth) ? \"vertical\" : \"horizontal\";\n};\nvar _dragElInRowColumn = function _dragElInRowColumn2(dragRect, targetRect, vertical) {\n  var dragElS1Opp = vertical ? dragRect.left : dragRect.top, dragElS2Opp = vertical ? dragRect.right : dragRect.bottom, dragElOppLength = vertical ? dragRect.width : dragRect.height, targetS1Opp = vertical ? targetRect.left : targetRect.top, targetS2Opp = vertical ? targetRect.right : targetRect.bottom, targetOppLength = vertical ? targetRect.width : targetRect.height;\n  return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n};\nvar _detectNearestEmptySortable = function _detectNearestEmptySortable2(x, y) {\n  var ret;\n  sortables.some(function(sortable) {\n    var threshold = sortable[expando].options.emptyInsertThreshold;\n    if (!threshold || lastChild(sortable))\n      return;\n    var rect = getRect(sortable), insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold, insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n    if (insideHorizontally && insideVertically) {\n      return ret = sortable;\n    }\n  });\n  return ret;\n};\nvar _prepareGroup = function _prepareGroup2(options) {\n  function toFn(value, pull) {\n    return function(to, from, dragEl2, evt) {\n      var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n      if (value == null && (pull || sameGroup)) {\n        return true;\n      } else if (value == null || value === false) {\n        return false;\n      } else if (pull && value === \"clone\") {\n        return value;\n      } else if (typeof value === \"function\") {\n        return toFn(value(to, from, dragEl2, evt), pull)(to, from, dragEl2, evt);\n      } else {\n        var otherGroup = (pull ? to : from).options.group.name;\n        return value === true || typeof value === \"string\" && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n      }\n    };\n  }\n  var group = {};\n  var originalGroup = options.group;\n  if (!originalGroup || _typeof(originalGroup) != \"object\") {\n    originalGroup = {\n      name: originalGroup\n    };\n  }\n  group.name = originalGroup.name;\n  group.checkPull = toFn(originalGroup.pull, true);\n  group.checkPut = toFn(originalGroup.put);\n  group.revertClone = originalGroup.revertClone;\n  options.group = group;\n};\nvar _hideGhostForTarget = function _hideGhostForTarget2() {\n  if (!supportCssPointerEvents && ghostEl) {\n    css(ghostEl, \"display\", \"none\");\n  }\n};\nvar _unhideGhostForTarget = function _unhideGhostForTarget2() {\n  if (!supportCssPointerEvents && ghostEl) {\n    css(ghostEl, \"display\", \"\");\n  }\n};\nif (documentExists && !ChromeForAndroid) {\n  document.addEventListener(\"click\", function(evt) {\n    if (ignoreNextClick) {\n      evt.preventDefault();\n      evt.stopPropagation && evt.stopPropagation();\n      evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n      ignoreNextClick = false;\n      return false;\n    }\n  }, true);\n}\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent2(evt) {\n  if (dragEl) {\n    evt = evt.touches ? evt.touches[0] : evt;\n    var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n    if (nearest) {\n      var event = {};\n      for (var i in evt) {\n        if (evt.hasOwnProperty(i)) {\n          event[i] = evt[i];\n        }\n      }\n      event.target = event.rootEl = nearest;\n      event.preventDefault = void 0;\n      event.stopPropagation = void 0;\n      nearest[expando]._onDragOver(event);\n    }\n  }\n};\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl2(evt) {\n  if (dragEl) {\n    dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n  }\n};\nfunction Sortable(el, options) {\n  if (!(el && el.nodeType && el.nodeType === 1)) {\n    throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n  }\n  this.el = el;\n  this.options = options = _extends({}, options);\n  el[expando] = this;\n  var defaults2 = {\n    group: null,\n    sort: true,\n    disabled: false,\n    store: null,\n    handle: null,\n    draggable: /^[uo]l$/i.test(el.nodeName) ? \">li\" : \">*\",\n    swapThreshold: 1,\n    // percentage; 0 <= x <= 1\n    invertSwap: false,\n    // invert always\n    invertedSwapThreshold: null,\n    // will be set to same as swapThreshold if default\n    removeCloneOnHide: true,\n    direction: function direction() {\n      return _detectDirection(el, this.options);\n    },\n    ghostClass: \"sortable-ghost\",\n    chosenClass: \"sortable-chosen\",\n    dragClass: \"sortable-drag\",\n    ignore: \"a, img\",\n    filter: null,\n    preventOnFilter: true,\n    animation: 0,\n    easing: null,\n    setData: function setData(dataTransfer, dragEl2) {\n      dataTransfer.setData(\"Text\", dragEl2.textContent);\n    },\n    dropBubble: false,\n    dragoverBubble: false,\n    dataIdAttr: \"data-id\",\n    delay: 0,\n    delayOnTouchOnly: false,\n    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n    forceFallback: false,\n    fallbackClass: \"sortable-fallback\",\n    fallbackOnBody: false,\n    fallbackTolerance: 0,\n    fallbackOffset: {\n      x: 0,\n      y: 0\n    },\n    supportPointer: Sortable.supportPointer !== false && \"PointerEvent\" in window && !Safari,\n    emptyInsertThreshold: 5\n  };\n  PluginManager.initializePlugins(this, el, defaults2);\n  for (var name in defaults2) {\n    !(name in options) && (options[name] = defaults2[name]);\n  }\n  _prepareGroup(options);\n  for (var fn in this) {\n    if (fn.charAt(0) === \"_\" && typeof this[fn] === \"function\") {\n      this[fn] = this[fn].bind(this);\n    }\n  }\n  this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n  if (this.nativeDraggable) {\n    this.options.touchStartThreshold = 1;\n  }\n  if (options.supportPointer) {\n    on(el, \"pointerdown\", this._onTapStart);\n  } else {\n    on(el, \"mousedown\", this._onTapStart);\n    on(el, \"touchstart\", this._onTapStart);\n  }\n  if (this.nativeDraggable) {\n    on(el, \"dragover\", this);\n    on(el, \"dragenter\", this);\n  }\n  sortables.push(this.el);\n  options.store && options.store.get && this.sort(options.store.get(this) || []);\n  _extends(this, AnimationStateManager());\n}\nSortable.prototype = /** @lends Sortable.prototype */\n{\n  constructor: Sortable,\n  _isOutsideThisEl: function _isOutsideThisEl(target) {\n    if (!this.el.contains(target) && target !== this.el) {\n      lastTarget = null;\n    }\n  },\n  _getDirection: function _getDirection(evt, target) {\n    return typeof this.options.direction === \"function\" ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n  },\n  _onTapStart: function _onTapStart(evt) {\n    if (!evt.cancelable)\n      return;\n    var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === \"touch\" && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter = options.filter;\n    _saveInputCheckedState(el);\n    if (dragEl) {\n      return;\n    }\n    if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n      return;\n    }\n    if (originalTarget.isContentEditable) {\n      return;\n    }\n    if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === \"SELECT\") {\n      return;\n    }\n    target = closest(target, options.draggable, el, false);\n    if (target && target.animated) {\n      return;\n    }\n    if (lastDownEl === target) {\n      return;\n    }\n    oldIndex = index(target);\n    oldDraggableIndex = index(target, options.draggable);\n    if (typeof filter === \"function\") {\n      if (filter.call(this, evt, target, this)) {\n        _dispatchEvent({\n          sortable: _this,\n          rootEl: originalTarget,\n          name: \"filter\",\n          targetEl: target,\n          toEl: el,\n          fromEl: el\n        });\n        pluginEvent2(\"filter\", _this, {\n          evt\n        });\n        preventOnFilter && evt.cancelable && evt.preventDefault();\n        return;\n      }\n    } else if (filter) {\n      filter = filter.split(\",\").some(function(criteria) {\n        criteria = closest(originalTarget, criteria.trim(), el, false);\n        if (criteria) {\n          _dispatchEvent({\n            sortable: _this,\n            rootEl: criteria,\n            name: \"filter\",\n            targetEl: target,\n            fromEl: el,\n            toEl: el\n          });\n          pluginEvent2(\"filter\", _this, {\n            evt\n          });\n          return true;\n        }\n      });\n      if (filter) {\n        preventOnFilter && evt.cancelable && evt.preventDefault();\n        return;\n      }\n    }\n    if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n      return;\n    }\n    this._prepareDragStart(evt, touch, target);\n  },\n  _prepareDragStart: function _prepareDragStart(evt, touch, target) {\n    var _this = this, el = _this.el, options = _this.options, ownerDocument = el.ownerDocument, dragStartFn;\n    if (target && !dragEl && target.parentNode === el) {\n      var dragRect = getRect(target);\n      rootEl = el;\n      dragEl = target;\n      parentEl = dragEl.parentNode;\n      nextEl = dragEl.nextSibling;\n      lastDownEl = target;\n      activeGroup = options.group;\n      Sortable.dragged = dragEl;\n      tapEvt = {\n        target: dragEl,\n        clientX: (touch || evt).clientX,\n        clientY: (touch || evt).clientY\n      };\n      tapDistanceLeft = tapEvt.clientX - dragRect.left;\n      tapDistanceTop = tapEvt.clientY - dragRect.top;\n      this._lastX = (touch || evt).clientX;\n      this._lastY = (touch || evt).clientY;\n      dragEl.style[\"will-change\"] = \"all\";\n      dragStartFn = function dragStartFn2() {\n        pluginEvent2(\"delayEnded\", _this, {\n          evt\n        });\n        if (Sortable.eventCanceled) {\n          _this._onDrop();\n          return;\n        }\n        _this._disableDelayedDragEvents();\n        if (!FireFox && _this.nativeDraggable) {\n          dragEl.draggable = true;\n        }\n        _this._triggerDragStart(evt, touch);\n        _dispatchEvent({\n          sortable: _this,\n          name: \"choose\",\n          originalEvent: evt\n        });\n        toggleClass(dragEl, options.chosenClass, true);\n      };\n      options.ignore.split(\",\").forEach(function(criteria) {\n        find(dragEl, criteria.trim(), _disableDraggable);\n      });\n      on(ownerDocument, \"dragover\", nearestEmptyInsertDetectEvent);\n      on(ownerDocument, \"mousemove\", nearestEmptyInsertDetectEvent);\n      on(ownerDocument, \"touchmove\", nearestEmptyInsertDetectEvent);\n      on(ownerDocument, \"mouseup\", _this._onDrop);\n      on(ownerDocument, \"touchend\", _this._onDrop);\n      on(ownerDocument, \"touchcancel\", _this._onDrop);\n      if (FireFox && this.nativeDraggable) {\n        this.options.touchStartThreshold = 4;\n        dragEl.draggable = true;\n      }\n      pluginEvent2(\"delayStart\", this, {\n        evt\n      });\n      if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n        if (Sortable.eventCanceled) {\n          this._onDrop();\n          return;\n        }\n        on(ownerDocument, \"mouseup\", _this._disableDelayedDrag);\n        on(ownerDocument, \"touchend\", _this._disableDelayedDrag);\n        on(ownerDocument, \"touchcancel\", _this._disableDelayedDrag);\n        on(ownerDocument, \"mousemove\", _this._delayedDragTouchMoveHandler);\n        on(ownerDocument, \"touchmove\", _this._delayedDragTouchMoveHandler);\n        options.supportPointer && on(ownerDocument, \"pointermove\", _this._delayedDragTouchMoveHandler);\n        _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n      } else {\n        dragStartFn();\n      }\n    }\n  },\n  _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(e) {\n    var touch = e.touches ? e.touches[0] : e;\n    if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n      this._disableDelayedDrag();\n    }\n  },\n  _disableDelayedDrag: function _disableDelayedDrag() {\n    dragEl && _disableDraggable(dragEl);\n    clearTimeout(this._dragStartTimer);\n    this._disableDelayedDragEvents();\n  },\n  _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, \"mouseup\", this._disableDelayedDrag);\n    off(ownerDocument, \"touchend\", this._disableDelayedDrag);\n    off(ownerDocument, \"touchcancel\", this._disableDelayedDrag);\n    off(ownerDocument, \"mousemove\", this._delayedDragTouchMoveHandler);\n    off(ownerDocument, \"touchmove\", this._delayedDragTouchMoveHandler);\n    off(ownerDocument, \"pointermove\", this._delayedDragTouchMoveHandler);\n  },\n  _triggerDragStart: function _triggerDragStart(evt, touch) {\n    touch = touch || evt.pointerType == \"touch\" && evt;\n    if (!this.nativeDraggable || touch) {\n      if (this.options.supportPointer) {\n        on(document, \"pointermove\", this._onTouchMove);\n      } else if (touch) {\n        on(document, \"touchmove\", this._onTouchMove);\n      } else {\n        on(document, \"mousemove\", this._onTouchMove);\n      }\n    } else {\n      on(dragEl, \"dragend\", this);\n      on(rootEl, \"dragstart\", this._onDragStart);\n    }\n    try {\n      if (document.selection) {\n        _nextTick(function() {\n          document.selection.empty();\n        });\n      } else {\n        window.getSelection().removeAllRanges();\n      }\n    } catch (err) {\n    }\n  },\n  _dragStarted: function _dragStarted(fallback, evt) {\n    awaitingDragStarted = false;\n    if (rootEl && dragEl) {\n      pluginEvent2(\"dragStarted\", this, {\n        evt\n      });\n      if (this.nativeDraggable) {\n        on(document, \"dragover\", _checkOutsideTargetEl);\n      }\n      var options = this.options;\n      !fallback && toggleClass(dragEl, options.dragClass, false);\n      toggleClass(dragEl, options.ghostClass, true);\n      Sortable.active = this;\n      fallback && this._appendGhost();\n      _dispatchEvent({\n        sortable: this,\n        name: \"start\",\n        originalEvent: evt\n      });\n    } else {\n      this._nulling();\n    }\n  },\n  _emulateDragOver: function _emulateDragOver() {\n    if (touchEvt) {\n      this._lastX = touchEvt.clientX;\n      this._lastY = touchEvt.clientY;\n      _hideGhostForTarget();\n      var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n      var parent = target;\n      while (target && target.shadowRoot) {\n        target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n        if (target === parent)\n          break;\n        parent = target;\n      }\n      dragEl.parentNode[expando]._isOutsideThisEl(target);\n      if (parent) {\n        do {\n          if (parent[expando]) {\n            var inserted = void 0;\n            inserted = parent[expando]._onDragOver({\n              clientX: touchEvt.clientX,\n              clientY: touchEvt.clientY,\n              target,\n              rootEl: parent\n            });\n            if (inserted && !this.options.dragoverBubble) {\n              break;\n            }\n          }\n          target = parent;\n        } while (parent = parent.parentNode);\n      }\n      _unhideGhostForTarget();\n    }\n  },\n  _onTouchMove: function _onTouchMove(evt) {\n    if (tapEvt) {\n      var options = this.options, fallbackTolerance = options.fallbackTolerance, fallbackOffset = options.fallbackOffset, touch = evt.touches ? evt.touches[0] : evt, ghostMatrix = ghostEl && matrix(ghostEl, true), scaleX = ghostEl && ghostMatrix && ghostMatrix.a, scaleY = ghostEl && ghostMatrix && ghostMatrix.d, relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent), dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1), dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n      if (!Sortable.active && !awaitingDragStarted) {\n        if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n          return;\n        }\n        this._onDragStart(evt, true);\n      }\n      if (ghostEl) {\n        if (ghostMatrix) {\n          ghostMatrix.e += dx - (lastDx || 0);\n          ghostMatrix.f += dy - (lastDy || 0);\n        } else {\n          ghostMatrix = {\n            a: 1,\n            b: 0,\n            c: 0,\n            d: 1,\n            e: dx,\n            f: dy\n          };\n        }\n        var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n        css(ghostEl, \"webkitTransform\", cssMatrix);\n        css(ghostEl, \"mozTransform\", cssMatrix);\n        css(ghostEl, \"msTransform\", cssMatrix);\n        css(ghostEl, \"transform\", cssMatrix);\n        lastDx = dx;\n        lastDy = dy;\n        touchEvt = touch;\n      }\n      evt.cancelable && evt.preventDefault();\n    }\n  },\n  _appendGhost: function _appendGhost() {\n    if (!ghostEl) {\n      var container = this.options.fallbackOnBody ? document.body : rootEl, rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container), options = this.options;\n      if (PositionGhostAbsolutely) {\n        ghostRelativeParent = container;\n        while (css(ghostRelativeParent, \"position\") === \"static\" && css(ghostRelativeParent, \"transform\") === \"none\" && ghostRelativeParent !== document) {\n          ghostRelativeParent = ghostRelativeParent.parentNode;\n        }\n        if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n          if (ghostRelativeParent === document)\n            ghostRelativeParent = getWindowScrollingElement();\n          rect.top += ghostRelativeParent.scrollTop;\n          rect.left += ghostRelativeParent.scrollLeft;\n        } else {\n          ghostRelativeParent = getWindowScrollingElement();\n        }\n        ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n      }\n      ghostEl = dragEl.cloneNode(true);\n      toggleClass(ghostEl, options.ghostClass, false);\n      toggleClass(ghostEl, options.fallbackClass, true);\n      toggleClass(ghostEl, options.dragClass, true);\n      css(ghostEl, \"transition\", \"\");\n      css(ghostEl, \"transform\", \"\");\n      css(ghostEl, \"box-sizing\", \"border-box\");\n      css(ghostEl, \"margin\", 0);\n      css(ghostEl, \"top\", rect.top);\n      css(ghostEl, \"left\", rect.left);\n      css(ghostEl, \"width\", rect.width);\n      css(ghostEl, \"height\", rect.height);\n      css(ghostEl, \"opacity\", \"0.8\");\n      css(ghostEl, \"position\", PositionGhostAbsolutely ? \"absolute\" : \"fixed\");\n      css(ghostEl, \"zIndex\", \"100000\");\n      css(ghostEl, \"pointerEvents\", \"none\");\n      Sortable.ghost = ghostEl;\n      container.appendChild(ghostEl);\n      css(ghostEl, \"transform-origin\", tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + \"% \" + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + \"%\");\n    }\n  },\n  _onDragStart: function _onDragStart(evt, fallback) {\n    var _this = this;\n    var dataTransfer = evt.dataTransfer;\n    var options = _this.options;\n    pluginEvent2(\"dragStart\", this, {\n      evt\n    });\n    if (Sortable.eventCanceled) {\n      this._onDrop();\n      return;\n    }\n    pluginEvent2(\"setupClone\", this);\n    if (!Sortable.eventCanceled) {\n      cloneEl = clone(dragEl);\n      cloneEl.removeAttribute(\"id\");\n      cloneEl.draggable = false;\n      cloneEl.style[\"will-change\"] = \"\";\n      this._hideClone();\n      toggleClass(cloneEl, this.options.chosenClass, false);\n      Sortable.clone = cloneEl;\n    }\n    _this.cloneId = _nextTick(function() {\n      pluginEvent2(\"clone\", _this);\n      if (Sortable.eventCanceled)\n        return;\n      if (!_this.options.removeCloneOnHide) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      }\n      _this._hideClone();\n      _dispatchEvent({\n        sortable: _this,\n        name: \"clone\"\n      });\n    });\n    !fallback && toggleClass(dragEl, options.dragClass, true);\n    if (fallback) {\n      ignoreNextClick = true;\n      _this._loopId = setInterval(_this._emulateDragOver, 50);\n    } else {\n      off(document, \"mouseup\", _this._onDrop);\n      off(document, \"touchend\", _this._onDrop);\n      off(document, \"touchcancel\", _this._onDrop);\n      if (dataTransfer) {\n        dataTransfer.effectAllowed = \"move\";\n        options.setData && options.setData.call(_this, dataTransfer, dragEl);\n      }\n      on(document, \"drop\", _this);\n      css(dragEl, \"transform\", \"translateZ(0)\");\n    }\n    awaitingDragStarted = true;\n    _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n    on(document, \"selectstart\", _this);\n    moved = true;\n    if (Safari) {\n      css(document.body, \"user-select\", \"none\");\n    }\n  },\n  // Returns true - if no further action is needed (either inserted or another condition)\n  _onDragOver: function _onDragOver(evt) {\n    var el = this.el, target = evt.target, dragRect, targetRect, revert, options = this.options, group = options.group, activeSortable = Sortable.active, isOwner = activeGroup === group, canSort = options.sort, fromSortable = putSortable || activeSortable, vertical, _this = this, completedFired = false;\n    if (_silent)\n      return;\n    function dragOverEvent(name, extra) {\n      pluginEvent2(name, _this, _objectSpread2({\n        evt,\n        isOwner,\n        axis: vertical ? \"vertical\" : \"horizontal\",\n        revert,\n        dragRect,\n        targetRect,\n        canSort,\n        fromSortable,\n        target,\n        completed,\n        onMove: function onMove(target2, after2) {\n          return _onMove(rootEl, el, dragEl, dragRect, target2, getRect(target2), evt, after2);\n        },\n        changed\n      }, extra));\n    }\n    function capture() {\n      dragOverEvent(\"dragOverAnimationCapture\");\n      _this.captureAnimationState();\n      if (_this !== fromSortable) {\n        fromSortable.captureAnimationState();\n      }\n    }\n    function completed(insertion) {\n      dragOverEvent(\"dragOverCompleted\", {\n        insertion\n      });\n      if (insertion) {\n        if (isOwner) {\n          activeSortable._hideClone();\n        } else {\n          activeSortable._showClone(_this);\n        }\n        if (_this !== fromSortable) {\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n          toggleClass(dragEl, options.ghostClass, true);\n        }\n        if (putSortable !== _this && _this !== Sortable.active) {\n          putSortable = _this;\n        } else if (_this === Sortable.active && putSortable) {\n          putSortable = null;\n        }\n        if (fromSortable === _this) {\n          _this._ignoreWhileAnimating = target;\n        }\n        _this.animateAll(function() {\n          dragOverEvent(\"dragOverAnimationComplete\");\n          _this._ignoreWhileAnimating = null;\n        });\n        if (_this !== fromSortable) {\n          fromSortable.animateAll();\n          fromSortable._ignoreWhileAnimating = null;\n        }\n      }\n      if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n        lastTarget = null;\n      }\n      if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n        dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n        !insertion && nearestEmptyInsertDetectEvent(evt);\n      }\n      !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n      return completedFired = true;\n    }\n    function changed() {\n      newIndex = index(dragEl);\n      newDraggableIndex = index(dragEl, options.draggable);\n      _dispatchEvent({\n        sortable: _this,\n        name: \"change\",\n        toEl: el,\n        newIndex,\n        newDraggableIndex,\n        originalEvent: evt\n      });\n    }\n    if (evt.preventDefault !== void 0) {\n      evt.cancelable && evt.preventDefault();\n    }\n    target = closest(target, options.draggable, el, true);\n    dragOverEvent(\"dragOver\");\n    if (Sortable.eventCanceled)\n      return completedFired;\n    if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n      return completed(false);\n    }\n    ignoreNextClick = false;\n    if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n      vertical = this._getDirection(evt, target) === \"vertical\";\n      dragRect = getRect(dragEl);\n      dragOverEvent(\"dragOverValid\");\n      if (Sortable.eventCanceled)\n        return completedFired;\n      if (revert) {\n        parentEl = rootEl;\n        capture();\n        this._hideClone();\n        dragOverEvent(\"revert\");\n        if (!Sortable.eventCanceled) {\n          if (nextEl) {\n            rootEl.insertBefore(dragEl, nextEl);\n          } else {\n            rootEl.appendChild(dragEl);\n          }\n        }\n        return completed(true);\n      }\n      var elLastChild = lastChild(el, options.draggable);\n      if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n        if (elLastChild === dragEl) {\n          return completed(false);\n        }\n        if (elLastChild && el === evt.target) {\n          target = elLastChild;\n        }\n        if (target) {\n          targetRect = getRect(target);\n        }\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n          capture();\n          if (elLastChild && elLastChild.nextSibling) {\n            el.insertBefore(dragEl, elLastChild.nextSibling);\n          } else {\n            el.appendChild(dragEl);\n          }\n          parentEl = el;\n          changed();\n          return completed(true);\n        }\n      } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n        var firstChild = getChild(el, 0, options, true);\n        if (firstChild === dragEl) {\n          return completed(false);\n        }\n        target = firstChild;\n        targetRect = getRect(target);\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n          capture();\n          el.insertBefore(dragEl, firstChild);\n          parentEl = el;\n          changed();\n          return completed(true);\n        }\n      } else if (target.parentNode === el) {\n        targetRect = getRect(target);\n        var direction = 0, targetBeforeFirstSwap, differentLevel = dragEl.parentNode !== el, differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical), side1 = vertical ? \"top\" : \"left\", scrolledPastTop = isScrolledPast(target, \"top\", \"top\") || isScrolledPast(dragEl, \"top\", \"top\"), scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n        if (lastTarget !== target) {\n          targetBeforeFirstSwap = targetRect[side1];\n          pastFirstInvertThresh = false;\n          isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n        }\n        direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n        var sibling;\n        if (direction !== 0) {\n          var dragIndex = index(dragEl);\n          do {\n            dragIndex -= direction;\n            sibling = parentEl.children[dragIndex];\n          } while (sibling && (css(sibling, \"display\") === \"none\" || sibling === ghostEl));\n        }\n        if (direction === 0 || sibling === target) {\n          return completed(false);\n        }\n        lastTarget = target;\n        lastDirection = direction;\n        var nextSibling = target.nextElementSibling, after = false;\n        after = direction === 1;\n        var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n        if (moveVector !== false) {\n          if (moveVector === 1 || moveVector === -1) {\n            after = moveVector === 1;\n          }\n          _silent = true;\n          setTimeout(_unsilent, 30);\n          capture();\n          if (after && !nextSibling) {\n            el.appendChild(dragEl);\n          } else {\n            target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n          }\n          if (scrolledPastTop) {\n            scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n          }\n          parentEl = dragEl.parentNode;\n          if (targetBeforeFirstSwap !== void 0 && !isCircumstantialInvert) {\n            targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n          }\n          changed();\n          return completed(true);\n        }\n      }\n      if (el.contains(dragEl)) {\n        return completed(false);\n      }\n    }\n    return false;\n  },\n  _ignoreWhileAnimating: null,\n  _offMoveEvents: function _offMoveEvents() {\n    off(document, \"mousemove\", this._onTouchMove);\n    off(document, \"touchmove\", this._onTouchMove);\n    off(document, \"pointermove\", this._onTouchMove);\n    off(document, \"dragover\", nearestEmptyInsertDetectEvent);\n    off(document, \"mousemove\", nearestEmptyInsertDetectEvent);\n    off(document, \"touchmove\", nearestEmptyInsertDetectEvent);\n  },\n  _offUpEvents: function _offUpEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, \"mouseup\", this._onDrop);\n    off(ownerDocument, \"touchend\", this._onDrop);\n    off(ownerDocument, \"pointerup\", this._onDrop);\n    off(ownerDocument, \"touchcancel\", this._onDrop);\n    off(document, \"selectstart\", this);\n  },\n  _onDrop: function _onDrop(evt) {\n    var el = this.el, options = this.options;\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    pluginEvent2(\"drop\", this, {\n      evt\n    });\n    parentEl = dragEl && dragEl.parentNode;\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    if (Sortable.eventCanceled) {\n      this._nulling();\n      return;\n    }\n    awaitingDragStarted = false;\n    isCircumstantialInvert = false;\n    pastFirstInvertThresh = false;\n    clearInterval(this._loopId);\n    clearTimeout(this._dragStartTimer);\n    _cancelNextTick(this.cloneId);\n    _cancelNextTick(this._dragStartId);\n    if (this.nativeDraggable) {\n      off(document, \"drop\", this);\n      off(el, \"dragstart\", this._onDragStart);\n    }\n    this._offMoveEvents();\n    this._offUpEvents();\n    if (Safari) {\n      css(document.body, \"user-select\", \"\");\n    }\n    css(dragEl, \"transform\", \"\");\n    if (evt) {\n      if (moved) {\n        evt.cancelable && evt.preventDefault();\n        !options.dropBubble && evt.stopPropagation();\n      }\n      ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== \"clone\") {\n        cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n      }\n      if (dragEl) {\n        if (this.nativeDraggable) {\n          off(dragEl, \"dragend\", this);\n        }\n        _disableDraggable(dragEl);\n        dragEl.style[\"will-change\"] = \"\";\n        if (moved && !awaitingDragStarted) {\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n        }\n        toggleClass(dragEl, this.options.chosenClass, false);\n        _dispatchEvent({\n          sortable: this,\n          name: \"unchoose\",\n          toEl: parentEl,\n          newIndex: null,\n          newDraggableIndex: null,\n          originalEvent: evt\n        });\n        if (rootEl !== parentEl) {\n          if (newIndex >= 0) {\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: \"add\",\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n            _dispatchEvent({\n              sortable: this,\n              name: \"remove\",\n              toEl: parentEl,\n              originalEvent: evt\n            });\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: \"sort\",\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n            _dispatchEvent({\n              sortable: this,\n              name: \"sort\",\n              toEl: parentEl,\n              originalEvent: evt\n            });\n          }\n          putSortable && putSortable.save();\n        } else {\n          if (newIndex !== oldIndex) {\n            if (newIndex >= 0) {\n              _dispatchEvent({\n                sortable: this,\n                name: \"update\",\n                toEl: parentEl,\n                originalEvent: evt\n              });\n              _dispatchEvent({\n                sortable: this,\n                name: \"sort\",\n                toEl: parentEl,\n                originalEvent: evt\n              });\n            }\n          }\n        }\n        if (Sortable.active) {\n          if (newIndex == null || newIndex === -1) {\n            newIndex = oldIndex;\n            newDraggableIndex = oldDraggableIndex;\n          }\n          _dispatchEvent({\n            sortable: this,\n            name: \"end\",\n            toEl: parentEl,\n            originalEvent: evt\n          });\n          this.save();\n        }\n      }\n    }\n    this._nulling();\n  },\n  _nulling: function _nulling() {\n    pluginEvent2(\"nulling\", this);\n    rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n    savedInputChecked.forEach(function(el) {\n      el.checked = true;\n    });\n    savedInputChecked.length = lastDx = lastDy = 0;\n  },\n  handleEvent: function handleEvent(evt) {\n    switch (evt.type) {\n      case \"drop\":\n      case \"dragend\":\n        this._onDrop(evt);\n        break;\n      case \"dragenter\":\n      case \"dragover\":\n        if (dragEl) {\n          this._onDragOver(evt);\n          _globalDragOver(evt);\n        }\n        break;\n      case \"selectstart\":\n        evt.preventDefault();\n        break;\n    }\n  },\n  /**\n   * Serializes the item into an array of string.\n   * @returns {String[]}\n   */\n  toArray: function toArray() {\n    var order = [], el, children = this.el.children, i = 0, n = children.length, options = this.options;\n    for (; i < n; i++) {\n      el = children[i];\n      if (closest(el, options.draggable, this.el, false)) {\n        order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n      }\n    }\n    return order;\n  },\n  /**\n   * Sorts the elements according to the array.\n   * @param  {String[]}  order  order of the items\n   */\n  sort: function sort(order, useAnimation) {\n    var items = {}, rootEl2 = this.el;\n    this.toArray().forEach(function(id, i) {\n      var el = rootEl2.children[i];\n      if (closest(el, this.options.draggable, rootEl2, false)) {\n        items[id] = el;\n      }\n    }, this);\n    useAnimation && this.captureAnimationState();\n    order.forEach(function(id) {\n      if (items[id]) {\n        rootEl2.removeChild(items[id]);\n        rootEl2.appendChild(items[id]);\n      }\n    });\n    useAnimation && this.animateAll();\n  },\n  /**\n   * Save the current sorting\n   */\n  save: function save() {\n    var store = this.options.store;\n    store && store.set && store.set(this);\n  },\n  /**\n   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n   * @param   {HTMLElement}  el\n   * @param   {String}       [selector]  default: `options.draggable`\n   * @returns {HTMLElement|null}\n   */\n  closest: function closest$1(el, selector) {\n    return closest(el, selector || this.options.draggable, this.el, false);\n  },\n  /**\n   * Set/get option\n   * @param   {string} name\n   * @param   {*}      [value]\n   * @returns {*}\n   */\n  option: function option(name, value) {\n    var options = this.options;\n    if (value === void 0) {\n      return options[name];\n    } else {\n      var modifiedValue = PluginManager.modifyOption(this, name, value);\n      if (typeof modifiedValue !== \"undefined\") {\n        options[name] = modifiedValue;\n      } else {\n        options[name] = value;\n      }\n      if (name === \"group\") {\n        _prepareGroup(options);\n      }\n    }\n  },\n  /**\n   * Destroy\n   */\n  destroy: function destroy() {\n    pluginEvent2(\"destroy\", this);\n    var el = this.el;\n    el[expando] = null;\n    off(el, \"mousedown\", this._onTapStart);\n    off(el, \"touchstart\", this._onTapStart);\n    off(el, \"pointerdown\", this._onTapStart);\n    if (this.nativeDraggable) {\n      off(el, \"dragover\", this);\n      off(el, \"dragenter\", this);\n    }\n    Array.prototype.forEach.call(el.querySelectorAll(\"[draggable]\"), function(el2) {\n      el2.removeAttribute(\"draggable\");\n    });\n    this._onDrop();\n    this._disableDelayedDragEvents();\n    sortables.splice(sortables.indexOf(this.el), 1);\n    this.el = el = null;\n  },\n  _hideClone: function _hideClone() {\n    if (!cloneHidden) {\n      pluginEvent2(\"hideClone\", this);\n      if (Sortable.eventCanceled)\n        return;\n      css(cloneEl, \"display\", \"none\");\n      if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n        cloneEl.parentNode.removeChild(cloneEl);\n      }\n      cloneHidden = true;\n    }\n  },\n  _showClone: function _showClone(putSortable2) {\n    if (putSortable2.lastPutMode !== \"clone\") {\n      this._hideClone();\n      return;\n    }\n    if (cloneHidden) {\n      pluginEvent2(\"showClone\", this);\n      if (Sortable.eventCanceled)\n        return;\n      if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      } else if (nextEl) {\n        rootEl.insertBefore(cloneEl, nextEl);\n      } else {\n        rootEl.appendChild(cloneEl);\n      }\n      if (this.options.group.revertClone) {\n        this.animate(dragEl, cloneEl);\n      }\n      css(cloneEl, \"display\", \"\");\n      cloneHidden = false;\n    }\n  }\n};\nfunction _globalDragOver(evt) {\n  if (evt.dataTransfer) {\n    evt.dataTransfer.dropEffect = \"move\";\n  }\n  evt.cancelable && evt.preventDefault();\n}\nfunction _onMove(fromEl, toEl, dragEl2, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n  var evt, sortable = fromEl[expando], onMoveFn = sortable.options.onMove, retVal;\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent(\"move\", {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent(\"Event\");\n    evt.initEvent(\"move\", true, true);\n  }\n  evt.to = toEl;\n  evt.from = fromEl;\n  evt.dragged = dragEl2;\n  evt.draggedRect = dragRect;\n  evt.related = targetEl || toEl;\n  evt.relatedRect = targetRect || getRect(toEl);\n  evt.willInsertAfter = willInsertAfter;\n  evt.originalEvent = originalEvent;\n  fromEl.dispatchEvent(evt);\n  if (onMoveFn) {\n    retVal = onMoveFn.call(sortable, evt, originalEvent);\n  }\n  return retVal;\n}\nfunction _disableDraggable(el) {\n  el.draggable = false;\n}\nfunction _unsilent() {\n  _silent = false;\n}\nfunction _ghostIsFirst(evt, vertical, sortable) {\n  var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));\n  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n  var spacer = 10;\n  return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction _ghostIsLast(evt, vertical, sortable) {\n  var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));\n  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n  var spacer = 10;\n  return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n  var mouseOnAxis = vertical ? evt.clientY : evt.clientX, targetLength = vertical ? targetRect.height : targetRect.width, targetS1 = vertical ? targetRect.top : targetRect.left, targetS2 = vertical ? targetRect.bottom : targetRect.right, invert = false;\n  if (!invertSwap) {\n    if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n      if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n        pastFirstInvertThresh = true;\n      }\n      if (!pastFirstInvertThresh) {\n        if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance : mouseOnAxis > targetS2 - targetMoveDistance) {\n          return -lastDirection;\n        }\n      } else {\n        invert = true;\n      }\n    } else {\n      if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n        return _getInsertDirection(target);\n      }\n    }\n  }\n  invert = invert || invertSwap;\n  if (invert) {\n    if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n      return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n    }\n  }\n  return 0;\n}\nfunction _getInsertDirection(target) {\n  if (index(dragEl) < index(target)) {\n    return 1;\n  } else {\n    return -1;\n  }\n}\nfunction _generateId(el) {\n  var str = el.tagName + el.className + el.src + el.href + el.textContent, i = str.length, sum = 0;\n  while (i--) {\n    sum += str.charCodeAt(i);\n  }\n  return sum.toString(36);\n}\nfunction _saveInputCheckedState(root) {\n  savedInputChecked.length = 0;\n  var inputs = root.getElementsByTagName(\"input\");\n  var idx = inputs.length;\n  while (idx--) {\n    var el = inputs[idx];\n    el.checked && savedInputChecked.push(el);\n  }\n}\nfunction _nextTick(fn) {\n  return setTimeout(fn, 0);\n}\nfunction _cancelNextTick(id) {\n  return clearTimeout(id);\n}\nif (documentExists) {\n  on(document, \"touchmove\", function(evt) {\n    if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n      evt.preventDefault();\n    }\n  });\n}\nSortable.utils = {\n  on,\n  off,\n  css,\n  find,\n  is: function is(el, selector) {\n    return !!closest(el, selector, el, false);\n  },\n  extend,\n  throttle,\n  closest,\n  toggleClass,\n  clone,\n  index,\n  nextTick: _nextTick,\n  cancelNextTick: _cancelNextTick,\n  detectDirection: _detectDirection,\n  getChild\n};\nSortable.get = function(element) {\n  return element[expando];\n};\nSortable.mount = function() {\n  for (var _len = arguments.length, plugins2 = new Array(_len), _key = 0; _key < _len; _key++) {\n    plugins2[_key] = arguments[_key];\n  }\n  if (plugins2[0].constructor === Array)\n    plugins2 = plugins2[0];\n  plugins2.forEach(function(plugin) {\n    if (!plugin.prototype || !plugin.prototype.constructor) {\n      throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n    }\n    if (plugin.utils)\n      Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n    PluginManager.mount(plugin);\n  });\n};\nSortable.create = function(el, options) {\n  return new Sortable(el, options);\n};\nSortable.version = version;\nvar autoScrolls = [];\nvar scrollEl;\nvar scrollRootEl;\nvar scrolling = false;\nvar lastAutoScrollX;\nvar lastAutoScrollY;\nvar touchEvt$1;\nvar pointerElemChangedInterval;\nfunction AutoScrollPlugin() {\n  function AutoScroll() {\n    this.defaults = {\n      scroll: true,\n      forceAutoScrollFallback: false,\n      scrollSensitivity: 30,\n      scrollSpeed: 10,\n      bubbleScroll: true\n    };\n    for (var fn in this) {\n      if (fn.charAt(0) === \"_\" && typeof this[fn] === \"function\") {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n  }\n  AutoScroll.prototype = {\n    dragStarted: function dragStarted(_ref) {\n      var originalEvent = _ref.originalEvent;\n      if (this.sortable.nativeDraggable) {\n        on(document, \"dragover\", this._handleAutoScroll);\n      } else {\n        if (this.options.supportPointer) {\n          on(document, \"pointermove\", this._handleFallbackAutoScroll);\n        } else if (originalEvent.touches) {\n          on(document, \"touchmove\", this._handleFallbackAutoScroll);\n        } else {\n          on(document, \"mousemove\", this._handleFallbackAutoScroll);\n        }\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref2) {\n      var originalEvent = _ref2.originalEvent;\n      if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n        this._handleAutoScroll(originalEvent);\n      }\n    },\n    drop: function drop3() {\n      if (this.sortable.nativeDraggable) {\n        off(document, \"dragover\", this._handleAutoScroll);\n      } else {\n        off(document, \"pointermove\", this._handleFallbackAutoScroll);\n        off(document, \"touchmove\", this._handleFallbackAutoScroll);\n        off(document, \"mousemove\", this._handleFallbackAutoScroll);\n      }\n      clearPointerElemChangedInterval();\n      clearAutoScrolls();\n      cancelThrottle();\n    },\n    nulling: function nulling() {\n      touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n      autoScrolls.length = 0;\n    },\n    _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n      this._handleAutoScroll(evt, true);\n    },\n    _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n      var _this = this;\n      var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, elem = document.elementFromPoint(x, y);\n      touchEvt$1 = evt;\n      if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n        autoScroll(evt, this.options, elem, fallback);\n        var ogElemScroller = getParentAutoScrollElement(elem, true);\n        if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n          pointerElemChangedInterval && clearPointerElemChangedInterval();\n          pointerElemChangedInterval = setInterval(function() {\n            var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n            if (newElem !== ogElemScroller) {\n              ogElemScroller = newElem;\n              clearAutoScrolls();\n            }\n            autoScroll(evt, _this.options, newElem, fallback);\n          }, 10);\n          lastAutoScrollX = x;\n          lastAutoScrollY = y;\n        }\n      } else {\n        if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n          clearAutoScrolls();\n          return;\n        }\n        autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n      }\n    }\n  };\n  return _extends(AutoScroll, {\n    pluginName: \"scroll\",\n    initializeByDefault: true\n  });\n}\nfunction clearAutoScrolls() {\n  autoScrolls.forEach(function(autoScroll2) {\n    clearInterval(autoScroll2.pid);\n  });\n  autoScrolls = [];\n}\nfunction clearPointerElemChangedInterval() {\n  clearInterval(pointerElemChangedInterval);\n}\nvar autoScroll = throttle(function(evt, options, rootEl2, isFallback) {\n  if (!options.scroll)\n    return;\n  var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = getWindowScrollingElement();\n  var scrollThisInstance = false, scrollCustomFn;\n  if (scrollRootEl !== rootEl2) {\n    scrollRootEl = rootEl2;\n    clearAutoScrolls();\n    scrollEl = options.scroll;\n    scrollCustomFn = options.scrollFn;\n    if (scrollEl === true) {\n      scrollEl = getParentAutoScrollElement(rootEl2, true);\n    }\n  }\n  var layersOut = 0;\n  var currentParent = scrollEl;\n  do {\n    var el = currentParent, rect = getRect(el), top = rect.top, bottom = rect.bottom, left = rect.left, right = rect.right, width = rect.width, height = rect.height, canScrollX = void 0, canScrollY = void 0, scrollWidth = el.scrollWidth, scrollHeight = el.scrollHeight, elCSS = css(el), scrollPosX = el.scrollLeft, scrollPosY = el.scrollTop;\n    if (el === winScroller) {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === \"auto\" || elCSS.overflowX === \"scroll\" || elCSS.overflowX === \"visible\");\n      canScrollY = height < scrollHeight && (elCSS.overflowY === \"auto\" || elCSS.overflowY === \"scroll\" || elCSS.overflowY === \"visible\");\n    } else {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === \"auto\" || elCSS.overflowX === \"scroll\");\n      canScrollY = height < scrollHeight && (elCSS.overflowY === \"auto\" || elCSS.overflowY === \"scroll\");\n    }\n    var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n    var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n    if (!autoScrolls[layersOut]) {\n      for (var i = 0; i <= layersOut; i++) {\n        if (!autoScrolls[i]) {\n          autoScrolls[i] = {};\n        }\n      }\n    }\n    if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n      autoScrolls[layersOut].el = el;\n      autoScrolls[layersOut].vx = vx;\n      autoScrolls[layersOut].vy = vy;\n      clearInterval(autoScrolls[layersOut].pid);\n      if (vx != 0 || vy != 0) {\n        scrollThisInstance = true;\n        autoScrolls[layersOut].pid = setInterval(function() {\n          if (isFallback && this.layer === 0) {\n            Sortable.active._onTouchMove(touchEvt$1);\n          }\n          var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n          var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n          if (typeof scrollCustomFn === \"function\") {\n            if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== \"continue\") {\n              return;\n            }\n          }\n          scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n        }.bind({\n          layer: layersOut\n        }), 24);\n      }\n    }\n    layersOut++;\n  } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n  scrolling = scrollThisInstance;\n}, 30);\nvar drop = function drop2(_ref) {\n  var originalEvent = _ref.originalEvent, putSortable2 = _ref.putSortable, dragEl2 = _ref.dragEl, activeSortable = _ref.activeSortable, dispatchSortableEvent = _ref.dispatchSortableEvent, hideGhostForTarget = _ref.hideGhostForTarget, unhideGhostForTarget = _ref.unhideGhostForTarget;\n  if (!originalEvent)\n    return;\n  var toSortable = putSortable2 || activeSortable;\n  hideGhostForTarget();\n  var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n  var target = document.elementFromPoint(touch.clientX, touch.clientY);\n  unhideGhostForTarget();\n  if (toSortable && !toSortable.el.contains(target)) {\n    dispatchSortableEvent(\"spill\");\n    this.onSpill({\n      dragEl: dragEl2,\n      putSortable: putSortable2\n    });\n  }\n};\nfunction Revert() {\n}\nRevert.prototype = {\n  startIndex: null,\n  dragStart: function dragStart(_ref2) {\n    var oldDraggableIndex2 = _ref2.oldDraggableIndex;\n    this.startIndex = oldDraggableIndex2;\n  },\n  onSpill: function onSpill(_ref3) {\n    var dragEl2 = _ref3.dragEl, putSortable2 = _ref3.putSortable;\n    this.sortable.captureAnimationState();\n    if (putSortable2) {\n      putSortable2.captureAnimationState();\n    }\n    var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n    if (nextSibling) {\n      this.sortable.el.insertBefore(dragEl2, nextSibling);\n    } else {\n      this.sortable.el.appendChild(dragEl2);\n    }\n    this.sortable.animateAll();\n    if (putSortable2) {\n      putSortable2.animateAll();\n    }\n  },\n  drop\n};\n_extends(Revert, {\n  pluginName: \"revertOnSpill\"\n});\nfunction Remove() {\n}\nRemove.prototype = {\n  onSpill: function onSpill2(_ref4) {\n    var dragEl2 = _ref4.dragEl, putSortable2 = _ref4.putSortable;\n    var parentSortable = putSortable2 || this.sortable;\n    parentSortable.captureAnimationState();\n    dragEl2.parentNode && dragEl2.parentNode.removeChild(dragEl2);\n    parentSortable.animateAll();\n  },\n  drop\n};\n_extends(Remove, {\n  pluginName: \"removeOnSpill\"\n});\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\nvar sortable_esm_default = Sortable;\n\n// packages/alpinejs/src/utils/walk.js\nfunction walk(el, callback) {\n  if (typeof ShadowRoot === \"function\" && el instanceof ShadowRoot) {\n    Array.from(el.children).forEach((el2) => walk(el2, callback));\n    return;\n  }\n  let skip = false;\n  callback(el, () => skip = true);\n  if (skip)\n    return;\n  let node = el.firstElementChild;\n  while (node) {\n    walk(node, callback, false);\n    node = node.nextElementSibling;\n  }\n}\n\n// packages/sort/src/index.js\nfunction src_default(Alpine) {\n  Alpine.directive(\"sort\", (el, { value, modifiers, expression }, { effect, evaluate, cleanup }) => {\n    if (value === \"config\") {\n      return;\n    }\n    if (value === \"handle\") {\n      return;\n    }\n    if (value === \"group\") {\n      return;\n    }\n    if (value === \"key\" || value === \"item\") {\n      if ([void 0, null, \"\"].includes(expression))\n        return;\n      el._x_sort_key = evaluate(expression);\n      return;\n    }\n    let handleSelector = \"[x-sort\\\\:handle],[wire\\\\:sort\\\\:handle]\";\n    let preferences = {\n      hideGhost: !modifiers.includes(\"ghost\"),\n      useHandles: !!el.querySelector(handleSelector) || Array.from(el.querySelectorAll(\"template:not(svg template)\")).some((tmpl) => tmpl.content?.querySelector(handleSelector)),\n      group: getGroupName(el, modifiers)\n    };\n    let handleSort = generateSortHandler(expression, evaluate);\n    let config = getConfigurationOverrides(el, modifiers, evaluate);\n    let sortable = initSortable(el, config, preferences, (key, position) => {\n      handleSort(key, position);\n    });\n    cleanup(() => sortable.destroy());\n  });\n}\nfunction generateSortHandler(expression, evaluate) {\n  if ([void 0, null, \"\"].includes(expression))\n    return () => {\n    };\n  return (key, position) => {\n    evaluate(expression, { scope: {\n      // Supporting both `$item` AND `$key` ($key for BC)...\n      $key: key,\n      $item: key,\n      $position: position\n    }, params: [\n      key,\n      position\n    ] });\n  };\n}\nfunction getConfigurationOverrides(el, modifiers, evaluate) {\n  if (el.hasAttribute(\"x-sort:config\")) {\n    return evaluate(el.getAttribute(\"x-sort:config\"));\n  }\n  if (el.hasAttribute(\"wire:sort:config\")) {\n    return evaluate(el.getAttribute(\"wire:sort:config\"));\n  }\n  return {};\n}\nfunction initSortable(el, config, preferences, handle) {\n  let ghostRef;\n  let options = {\n    animation: 150,\n    handle: preferences.useHandles ? \"[x-sort\\\\:handle],[wire\\\\:sort\\\\:handle]\" : null,\n    group: preferences.group,\n    scroll: true,\n    forceAutoScrollFallback: true,\n    scrollSensitivity: 50,\n    // This is here so that if a div containing inputs or buttons has x-sort:ignore, it will not prevent interaction...\n    preventOnFilter: false,\n    filter(e) {\n      if (e.target.hasAttribute(\"x-sort:ignore\") || e.target.hasAttribute(\"wire:sort:ignore\"))\n        return true;\n      if (e.target.closest(\"[x-sort\\\\:ignore]\") || e.target.closest(\"[wire\\\\:sort\\\\:ignore]\"))\n        return true;\n      if (!el.querySelector(\"[x-sort\\\\:item],[wire\\\\:sort\\\\:item]\"))\n        return false;\n      let itemHasAttribute = e.target.closest(\"[x-sort\\\\:item],[wire\\\\:sort\\\\:item]\");\n      return itemHasAttribute ? false : true;\n    },\n    onSort(e) {\n      if (e.from !== e.to) {\n        if (e.to !== e.target) {\n          return;\n        }\n      }\n      let key = void 0;\n      walk(e.item, (el2, skip) => {\n        if (key !== void 0)\n          return;\n        if (el2._x_sort_key) {\n          key = el2._x_sort_key;\n          skip();\n        }\n      });\n      let position = e.newIndex;\n      if (key !== void 0 || key !== null) {\n        handle(key, position);\n      }\n    },\n    onStart() {\n      document.body.classList.add(\"sorting\");\n      ghostRef = document.querySelector(\".sortable-ghost\");\n      if (preferences.hideGhost && ghostRef)\n        ghostRef.style.opacity = \"0\";\n    },\n    onEnd() {\n      document.body.classList.remove(\"sorting\");\n      if (preferences.hideGhost && ghostRef)\n        ghostRef.style.opacity = \"1\";\n      ghostRef = void 0;\n      keepElementsWithinMorphMarkers(el);\n    }\n  };\n  return new sortable_esm_default(el, { ...options, ...config });\n}\nfunction keepElementsWithinMorphMarkers(el) {\n  let cursor = el.firstChild;\n  while (cursor.nextSibling) {\n    if (cursor.textContent.trim() === \"[if ENDBLOCK]><![endif]\") {\n      el.append(cursor);\n      break;\n    }\n    cursor = cursor.nextSibling;\n  }\n}\nfunction getGroupName(el, modifiers) {\n  if (el.hasAttribute(\"x-sort:group\")) {\n    return el.getAttribute(\"x-sort:group\");\n  }\n  if (el.hasAttribute(\"wire:sort:group\")) {\n    return el.getAttribute(\"wire:sort:group\");\n  }\n  return modifiers.indexOf(\"group\") !== -1 ? modifiers[modifiers.indexOf(\"group\") + 1] : null;\n}\n\n// packages/sort/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default,\n  src_default as sort\n};\n/*! Bundled license information:\n\nsortablejs/modular/sortable.esm.js:\n  (**!\n   * Sortable 1.15.2\n   * @author\tRubaXa   <trash@rubaxa.org>\n   * @author\towenm    <owen23355@gmail.com>\n   * @license MIT\n   *)\n*/\n","export default ({ options }) => ({\n  options,\n  newOption: \"\",\n  editingIndex: null,\n  editingText: \"\",\n  entryMode: \"single\", // 'single' or 'bulk'\n  bulkText: \"\",\n  // Check if there are unsaved edits (option being edited but not confirmed)\n  hasUnsavedEdits() {\n    return this.editingIndex !== null;\n  },\n  addOption() {\n    if (this.newOption.trim() === \"\") return;\n    const uniqueId =\n      this.slugify(this.newOption) + \"-\" + Math.floor(Math.random() * 10000);\n    const newOptionObj = {\n      text: this.newOption,\n      value: uniqueId,\n      order: this.options.length + 1,\n    };\n    this.options.push(newOptionObj);\n    this.newOption = \"\";\n  },\n  deleteOption(index) {\n    // Event filtering\n    if (document.activeElement != this.$el) return;\n    this.options.splice(index, 1);\n    this.options.forEach((option, idx) => (option.order = idx + 1));\n  },\n  startEdit(index) {\n    this.editingIndex = index;\n    this.editingText = this.options[index].text;\n    this.$dispatch(\"options-editor-editing-changed\", { isEditing: true });\n  },\n  saveEdit() {\n    if (this.editingIndex === null) return;\n    if (this.editingText.trim() === \"\") return;\n    this.options[this.editingIndex].text = this.editingText.trim();\n    this.cancelEdit();\n  },\n  cancelEdit() {\n    this.editingIndex = null;\n    this.editingText = \"\";\n    this.$dispatch(\"options-editor-editing-changed\", { isEditing: false });\n  },\n  dragStart(event, index) {\n    event.dataTransfer.setData(\"optionIndex\", index);\n  },\n  drop(event, dropIndex) {\n    const dragIndex = event.dataTransfer.getData(\"optionIndex\");\n    const draggedItem = this.options.splice(dragIndex, 1)[0];\n    this.options.splice(dropIndex, 0, draggedItem);\n    this.options.forEach((option, idx) => (option.order = idx + 1));\n  },\n  slugify(text) {\n    return text\n      .toString()\n      .toLowerCase()\n      .replace(/\\s+/g, \"-\")\n      .replace(/[^\\w\\-]+/g, \"\")\n      .replace(/\\-\\-+/g, \"-\")\n      .replace(/^-+/, \"\")\n      .replace(/-+$/, \"\");\n  },\n  addBulkOptions() {\n    const lines = this.bulkText\n      .split(\"\\n\")\n      .map((line) => line.trim())\n      .filter((line) => line !== \"\");\n\n    const existingTexts = this.options.map((o) => o.text.toLowerCase());\n\n    lines.forEach((text) => {\n      if (!existingTexts.includes(text.toLowerCase())) {\n        const uniqueId =\n          this.slugify(text) + \"-\" + Math.floor(Math.random() * 10000);\n        this.options.push({\n          text: text,\n          value: uniqueId,\n          order: this.options.length + 1,\n        });\n        existingTexts.push(text.toLowerCase());\n      }\n    });\n\n    this.bulkText = \"\";\n    this.entryMode = \"single\";\n  },\n  serializedOptions() {\n    return JSON.stringify(this.options);\n  },\n});\n","export default ({\n  formId,\n  isConditional,\n  fieldId,\n  fieldValue,\n  formType = \"information_form\",\n  jobId = null,\n}) => ({\n  isConditional: isConditional,\n  selectedFieldId: fieldId,\n  conditionalValue: fieldValue,\n  availableOptions: [],\n  formType: formType,\n  jobId: jobId,\n  formId: formId,\n  init() {\n    if (this.selectedFieldId) {\n      this.loadOptions();\n    }\n  },\n  getOptionsUrl() {\n    if (this.formType === \"application_form\" && this.jobId) {\n      return `/jobs/${this.jobId}/form/fields/${this.selectedFieldId}/options/`;\n    }\n    return `/organization/information-forms/${this.formId}/fields/${this.selectedFieldId}/options/`;\n  },\n  async loadOptions() {\n    if (!this.selectedFieldId) {\n      this.availableOptions = [];\n      this.conditionalValue = \"\";\n      return;\n    }\n    try {\n      const response = await fetch(this.getOptionsUrl());\n      const data = await response.json();\n      this.availableOptions = data.options.map((opt) => [opt.value, opt.text]);\n      if (\n        !this.availableOptions.find((opt) => opt[0] === this.conditionalValue)\n      ) {\n        this.conditionalValue = \"\";\n      }\n    } catch (e) {\n      console.error(\"Failed to load field options:\", e);\n      this.availableOptions = [];\n    }\n  },\n});\n","export default () => ({\n  search: \"\",\n  searchUrl: \"\",\n  isCommandPaletteOpen: false,\n  closingCallback: () => {},\n  handleOpen(e) {\n    if (e.detail.search_url) {\n      this.searchUrl = e.detail.search_url;\n      this.search = e.detail.search || \"\";\n      this.isCommandPaletteOpen = true;\n      this.closingCallback = e.detail.closingCallback || this.closingCallback;\n    }\n    if (this.search) {\n      this.searchData();\n    }\n  },\n  handleClose(e) {\n    this.isCommandPaletteOpen = false;\n    this.closingCallback();\n  },\n  updateURL() {\n    let baseUrl = this.searchUrl;\n    // Prepend a placeholder domain to form a full URL for parsing\n    const placeholderDomain = \"https://placeholder.com\";\n    let url;\n\n    try {\n      url = new URL(placeholderDomain + baseUrl);\n    } catch (e) {\n      console.error(\"Invalid URL provided.\");\n      return;\n    }\n\n    // Set or update the \"search\" query parameter\n    if (this.search) {\n      url.searchParams.set(\"search\", this.search);\n    } else {\n      url.searchParams.delete(\"search\");\n    }\n\n    // Remove the placeholder domain from the final URL string\n    return url.toString().replace(placeholderDomain, \"\");\n  },\n  searchData() {\n    let newUrl = this.updateURL();\n    htmx.ajax(\"GET\", newUrl, {\n      target: \"#candidate_palette_results\",\n      swap: \"innerHTML\",\n    });\n  },\n});\n","/** Filter component\n * Alpine properties\n * $popover\n * $store: filterFields\n *\n */\n\n// Maps filter type → URL param key\nconst ATS_APPLICATIONS_FILTER_TYPE_TO_PARAM_KEY = {\n  custom: 'custom_field_responses',\n  org_custom: 'org_custom_field_responses',\n  scorecard: 'scorecard_field_responses',\n  case: 'case_responses',\n  assessment: 'assessment_responses',\n  videointerview: 'videointerview_responses',\n  custom_form_field: 'custom_form_field_responses',\n  hirex_video_interview: 'hirex_video_interview_responses',\n};\n\nexport default ({\n  fieldName, // string\n  fieldId, // string\n  fieldInitializedWithData, // bool\n  resetFromParent, // bool\n  type, // string\n  url, // string\n  target, // string\n  initialOpenState, // boolean\n  queryParam, // callable. returns string\n  isEmpty, // callable. returns boolean\n  displayText, // callable. returns string\n  initFromURL, // callable\n  cleanValue, // callable\n  labelText, // callable. returns string\n}) => ({\n  // Props\n  fieldName,\n  fieldId,\n  fieldInitializedWithData,\n  resetFromParent,\n  type,\n  url,\n  target: target || \"#candidates_table_wrapper\",\n  initialOpenState,\n\n  // Unimplemented methods. Should be implemented later.\n  queryParam,\n  isEmpty, // Returns true if input field value is empty\n  displayText, // Returns displayed text\n  initFromURL,\n  cleanValue, // Cleans the field value\n  labelText, // Returns label text\n\n  // State\n  panelLocked: false,\n  submitted: false,\n  filterScopedRequestInProgress: false,\n  timeoutId: null,\n\n  // Filter URL helpers\n  getFilterParamKey(filterType) {\n    return ATS_APPLICATIONS_FILTER_TYPE_TO_PARAM_KEY[filterType] || null;\n  },\n  getFilterResponsesFromUrl(filterType) {\n    const paramKey = this.getFilterParamKey(filterType);\n    if (!paramKey) return [];\n    const params = new URLSearchParams(window.location.search);\n    if (!params.has(paramKey)) return [];\n    return JSON.parse(params.get(paramKey)) || [];\n  },\n  findFilterResponseForField(filterType, filterFieldId) {\n    return this.getFilterResponsesFromUrl(filterType).find(r => r.field_id == filterFieldId) || null;\n  },\n  findFilterResponsesForField(filterType, filterFieldId) {\n    return this.getFilterResponsesFromUrl(filterType).filter(r => r.field_id == filterFieldId);\n  },\n  updateFilterJsonResponses(params, filterType, filterFieldId, newEntries) {\n    const paramKey = this.getFilterParamKey(filterType);\n    if (!paramKey) return;\n\n    let responses = [];\n    if (params.has(paramKey)) {\n      responses = JSON.parse(params.get(paramKey));\n    }\n    responses = responses.filter(r => r.field_id != filterFieldId);\n    responses.push(...newEntries);\n\n    if (responses.length > 0) {\n      params.set(paramKey, JSON.stringify(responses));\n    } else {\n      params.delete(paramKey);\n    }\n  },\n\n  // Common methods.\n  hide() {\n    this.__wrapper.classList.add(\"hidden\");\n  },\n  remove() {\n    this.__wrapper.remove();\n  },\n  initializeButton() {\n    this.initialOpenState && this.$popover.open();\n    this.$watch(\"$popover.isOpen\", (value) => {\n      if (this.submitted) {\n        this.submitted = false;\n      } else {\n        if (!value && !this.panelLocked) {\n          if (this.fieldInitializedWithData) {\n            this.resetFromParent = true;\n            this.cleanValue();\n            this.initFromURL();\n          } else {\n            this.$store.filterFields.remove(this.fieldId);\n            this.remove();\n          }\n        } else if (!value && this.panelLocked) {\n          this.$popover.open();\n        }\n      }\n    });\n  },\n\n  // Event listeners\n  openFilterPanelListener: {\n    /** Opens the panel on `open-filter-panel` event if `fieldId` matches with the event detail.\n     *\n     */\n    [\"x-on:open-filter-panel.window\"]() {\n      this.$event.detail === this.fieldId && this.$popover.open();\n    },\n  },\n\n  get __wrapper() {\n    return this.$root.parentElement;\n  },\n});\n","/**\n * Reporting \"Saved Views\" controller (Hiring Overview).\n *\n * Model: Saved View + dirty state (Ashby/Linear/Amplitude pattern).\n *\n * The URL is the single source of truth for filters. `filter_preset` is only a pointer to the\n * saved view the live filters were derived from, never the source of the filters themselves.\n *\n * Responsibilities:\n *  - derive the active view + \"modified\" (dirty) state by comparing live URL filters against the\n *    saved view's stored filters,\n *  - repair the desync bug: never leave a `filter_preset` pointer in the URL once the live filters\n *    are empty (e.g. after the user clears every pill one by one).\n *\n * Pills own their own URL writes (htmx hx-push-url), so this controller only observes URL changes\n * (`popstate` for back/forward, `htmx:pushedIntoHistory` for pill apply/remove) and reconciles.\n */\n\n// Params that live in the query string but are not user filters.\nconst NON_FILTER_PARAMS = [\"filter_preset\", \"page\"];\n\nfunction liveSearchParams() {\n  const params = new URLSearchParams(window.location.search);\n  NON_FILTER_PARAMS.forEach((key) => params.delete(key));\n  return params;\n}\n\n// Canonicalize a single value so dirty-compare ignores selection order of ||| multi-values.\nfunction canon(value) {\n  if (typeof value === \"string\" && value.includes(\"|||\")) {\n    return value.split(\"|||\").filter(Boolean).sort().join(\"|||\");\n  }\n  return value;\n}\n\nfunction filtersEqual(a, b) {\n  const ka = Object.keys(a).sort();\n  const kb = Object.keys(b).sort();\n  if (ka.length !== kb.length) return false;\n  if (ka.some((k, i) => k !== kb[i])) return false;\n  return ka.every((k) => canon(a[k]) === canon(b[k]));\n}\n\nexport default ({ presets = [], activeId = \"\" } = {}) => ({\n  presets,\n  activeId,\n  // Bumped on every URL change so the x-show/x-text getters below recompute (window.location\n  // is not reactive on its own).\n  urlTick: 0,\n  showSaveForm: false,\n\n  init() {\n    this.reconcile();\n    const onChange = () => {\n      this.urlTick++;\n      this.reconcile();\n    };\n    window.addEventListener(\"popstate\", onChange);\n    window.addEventListener(\"htmx:pushedIntoHistory\", onChange);\n  },\n\n  /** Keep the URL honest: drop a dangling `filter_preset` once no filters remain. */\n  reconcile() {\n    this.activeId = this.urlPresetId();\n    if (this.activeId && this.isEmpty()) {\n      this.dropPointer();\n    }\n  },\n\n  // --- URL readers ---\n  urlPresetId() {\n    return new URLSearchParams(window.location.search).get(\"filter_preset\") || \"\";\n  },\n  liveFilters() {\n    this.urlTick; // register reactive dependency\n    const dict = {};\n    for (const [key, value] of liveSearchParams()) {\n      if (value) dict[key] = value;\n    }\n    return dict;\n  },\n  isEmpty() {\n    return Object.keys(this.liveFilters()).length === 0;\n  },\n  hasFilters() {\n    return !this.isEmpty();\n  },\n\n  // --- active view + dirty state ---\n  get activePreset() {\n    this.urlTick;\n    return this.presets.find((p) => p.id === this.activeId) || null;\n  },\n  get hasActiveView() {\n    return this.activePreset !== null;\n  },\n  get isDirty() {\n    const preset = this.activePreset;\n    if (!preset) return false;\n    return !filtersEqual(this.liveFilters(), preset.filters || {});\n  },\n  get activeName() {\n    return this.activePreset ? this.activePreset.name : \"\";\n  },\n\n  // --- actions ---\n  /** Remove only the pointer from the URL, leaving the live filters untouched. */\n  dropPointer() {\n    const url = new URL(window.location.href);\n    url.searchParams.delete(\"filter_preset\");\n    window.history.replaceState({}, \"\", url);\n    this.activeId = \"\";\n  },\n  /** Snapshot the live query string into a form's hidden query_params input before it submits. */\n  attachQueryParams(form) {\n    const input = form.querySelector('input[name=\"query_params\"]');\n    if (input) input.value = window.location.search.slice(1);\n  },\n  openSaveForm() {\n    this.showSaveForm = true;\n  },\n  closeSaveForm() {\n    this.showSaveForm = false;\n  },\n});\n","export default ({\n  modelValue = null,  // Changed from initialValue to modelValue to match Alpine's conventions\n  choices = [],\n  htmlName = '',\n  label = ''\n}) => ({\n  // Props\n  modelValue,\n  label,\n  choices,\n  htmlName,\n\n  updateDropdownPosition() {\n    const dropdown = this.$refs.dropdown;\n    const container = this.$refs.comboboxContainer;\n    if (!dropdown || !container) return;\n\n    const containerRect = container.getBoundingClientRect();\n    const dropdownHeight = dropdown.offsetHeight || 240; // max-h-60 = 240px fallback\n    const gap = 8; // 8px gap\n    const viewportHeight = window.innerHeight;\n\n    // Calculate available space below and above the input\n    const spaceBelow = viewportHeight - containerRect.bottom - gap;\n    const spaceAbove = containerRect.top - gap;\n\n    // Determine if we should show above or below\n    const shouldShowAbove = spaceBelow < dropdownHeight && spaceAbove > spaceBelow;\n\n    dropdown.style.left = `${containerRect.left}px`;\n    dropdown.style.width = `${containerRect.width}px`;\n    dropdown.style.minWidth = `${containerRect.width}px`;\n\n    if (shouldShowAbove) {\n      // Position above the input\n      dropdown.style.top = 'auto';\n      dropdown.style.bottom = `${viewportHeight - containerRect.top + gap}px`;\n      dropdown.style.maxHeight = `${Math.min(spaceAbove, 240)}px`;\n    } else {\n      // Position below the input (default)\n      dropdown.style.bottom = 'auto';\n      dropdown.style.top = `${containerRect.bottom + gap}px`;\n      dropdown.style.maxHeight = `${Math.min(spaceBelow, 240)}px`;\n    }\n  },\n\n  // Called when dropdown opens\n  onDropdownOpen() {\n    this.$nextTick(() => this.updateDropdownPosition());\n  },\n\n  // State\n  init() {\n    this.selected = this.modelValue;  // Initialize selected in init()\n    this.query = '';\n    this.scrollHandler = null;\n    this.resizeHandler = null;\n    this.positionCheckInterval = null;\n\n    // Watch for selection changes and dispatch change event on hidden input\n    this.$watch('selected', (value) => {\n      this.$nextTick(() => {\n        const hiddenInput = this.$el.querySelector(`input[name=\"${this.htmlName}\"]`);\n        if (hiddenInput) {\n          hiddenInput.dispatchEvent(new Event('change', { bubbles: true }));\n        }\n      });\n    });\n  },\n\n  // Add scroll listeners when dropdown opens\n  addScrollListeners() {\n    if (this.positionCheckInterval) return; // Prevent duplicate intervals\n\n    // Use requestAnimationFrame for smooth position tracking\n    const checkPosition = () => {\n      this.updateDropdownPosition();\n      this.positionCheckInterval = requestAnimationFrame(checkPosition);\n    };\n\n    this.positionCheckInterval = requestAnimationFrame(checkPosition);\n  },\n\n  // Remove scroll listeners when dropdown closes\n  removeScrollListeners() {\n    if (this.positionCheckInterval) {\n      cancelAnimationFrame(this.positionCheckInterval);\n      this.positionCheckInterval = null;\n    }\n  },\n\n  selected: null,  // Declare selected before using it\n  query: '',\n\n  // Computed\n  get filteredOptions() {\n    return this.query === ''\n      ? this.choices\n      : this.choices.filter((option) => {\n        return option.label.toLowerCase().includes(this.query.toLowerCase())\n      })\n  },\n\n  // Methods\n  handleQueryChange(event) {\n    this.query = event.target.value;\n  },\n});\n","/**\n * File upload handler with IndexedDB persistence\n * @typedef {Object} FileUploadState\n * @property {string} storageKey - Unique identifier for the file in IndexedDB\n * @property {string} fieldId - Field ID for predictable storage key on form re-render\n * @property {string} fileName - Name of the uploaded file\n * @property {string} fileTempURL - Temp URL of the file to let user download\n * @property {string|null} fileData - Base64 data URL of the file content\n */\n\n/**\n * Creates a new file upload handler instance\n * @param {Object} params - Initialization parameters\n * @param {string} [params.storageKey] - Initial storage key, typically provided by server\n * @param {string} [params.fieldId] - Field ID for predictable storage lookup on re-render\n * @param {number} [params.maxFileSize=5] - Maximum file size in MB (defaults to 5MB)\n * @returns {FileUploadState} File upload state and methods\n */\nexport default ({ storageKey, maxFileSize = 5, fieldId = null, doNotRestore = false }) => ({\n  storageKey,\n  fieldId,\n  doNotRestore,\n  fileName: \"\",\n  fileTempURL: \"\",\n  fileData: null,\n  isDragging: false,\n  DB_NAME: \"FileUploadDB\",\n  STORE_NAME: \"files\",\n  maxFileSize,\n\n  /**\n   * Opens IndexedDB connection\n   * @returns {Promise<IDBDatabase>}\n   */\n  async openDB() {\n    return new Promise((resolve, reject) => {\n      const request = indexedDB.open(this.DB_NAME, 1);\n\n      request.onerror = () => reject(request.error);\n      request.onsuccess = () => resolve(request.result);\n\n      request.onupgradeneeded = (event) => {\n        const db = event.target.result;\n        if (!db.objectStoreNames.contains(this.STORE_NAME)) {\n          const store = db.createObjectStore(this.STORE_NAME, {\n            keyPath: \"key\",\n          });\n          // Add timestamp index for expire policy if needed\n          store.createIndex(\"timestamp\", \"timestamp\", { unique: false });\n        }\n      };\n    });\n  },\n\n  /**\n   * Cleans up database, removing old content-based files but keeping field-based files\n   * @param {string} currentKey - Key of the file to keep\n   * @returns {Promise<void>}\n   */\n  async cleanupDB(currentKey) {\n    const db = await this.openDB();\n    return new Promise((resolve, reject) => {\n      const transaction = db.transaction([this.STORE_NAME], \"readwrite\");\n      const store = transaction.objectStore(this.STORE_NAME);\n\n      // Get all keys and delete old content-based files (not field-based)\n      const request = store.getAllKeys();\n\n      request.onsuccess = () => {\n        const keys = request.result;\n        keys.forEach((key) => {\n          // Keep current file and all field-based files (for multi-file forms)\n          const isFieldBased = key.startsWith(\"__hrx_file_field__\");\n          if (key !== currentKey && !isFieldBased) {\n            store.delete(key);\n          }\n        });\n      };\n\n      request.onerror = () => reject(request.error);\n      transaction.oncomplete = () => {\n        db.close();\n        resolve();\n      };\n    });\n  },\n\n  /**\n   * Saves file data to IndexedDB and cleans up old files\n   * @param {string} key - Storage key\n   * @param {Object} data - File data to store\n   * @returns {Promise<void>}\n   */\n  async saveToDB(key, data) {\n    const db = await this.openDB();\n    return new Promise((resolve, reject) => {\n      const transaction = db.transaction([this.STORE_NAME], \"readwrite\");\n      const store = transaction.objectStore(this.STORE_NAME);\n\n      // Add timestamp to data\n      const fileData = {\n        key,\n        ...data,\n        timestamp: new Date().getTime(),\n      };\n\n      const request = store.put(fileData);\n\n      request.onerror = () => reject(request.error);\n      request.onsuccess = async () => {\n        try {\n          // Clean up old files after successful save\n          await this.cleanupDB(key);\n          resolve();\n        } catch (e) {\n          console.warn(\"Error during cleanup:\", e);\n          resolve(); // Still resolve as the file was saved successfully\n        }\n      };\n\n      transaction.oncomplete = () => db.close();\n    });\n  },\n\n  /**\n   * Retrieves file data from IndexedDB\n   * @param {string} key - Storage key to retrieve\n   * @returns {Promise<Object|null>}\n   */\n  async getFromDB(key) {\n    const db = await this.openDB();\n    return new Promise((resolve, reject) => {\n      const transaction = db.transaction([this.STORE_NAME], \"readonly\");\n      const store = transaction.objectStore(this.STORE_NAME);\n\n      const request = store.get(key);\n\n      request.onerror = () => reject(request.error);\n      request.onsuccess = () => resolve(request.result);\n\n      transaction.oncomplete = () => db.close();\n    });\n  },\n\n  /**\n   * Removes file data from IndexedDB\n   * @param {string} key - Storage key to remove\n   * @returns {Promise<void>}\n   */\n  async removeFromDB(key) {\n    const db = await this.openDB();\n    return new Promise((resolve, reject) => {\n      const transaction = db.transaction([this.STORE_NAME], \"readwrite\");\n      const store = transaction.objectStore(this.STORE_NAME);\n\n      const request = store.delete(key);\n\n      request.onerror = () => reject(request.error);\n      request.onsuccess = () => resolve();\n\n      transaction.oncomplete = () => db.close();\n    });\n  },\n\n  /**\n   * Generates a predictable storage key from field ID\n   * @param {string} fieldId - Field ID for the file input\n   * @returns {string} Storage key prefixed with '__hrx_file_field__'\n   */\n  getFieldStorageKey(fieldId) {\n    return `__hrx_file_field__${fieldId}`;\n  },\n\n  /**\n   * Generates a unique storage key from file data\n   * @param {string} fileData - Base64 data URL of file content\n   * @returns {Promise<string>} Storage key prefixed with '__hrx_file__'\n   */\n  async generateStorageKey(fileData) {\n    // Convert the complete data URL string to bytes for hashing\n    const encoder = new TextEncoder();\n    const data = encoder.encode(fileData);\n\n    // Generate SHA-256 hash of the data\n    const hashBuffer = await crypto.subtle.digest(\"SHA-256\", data);\n\n    // Convert hash buffer to hexadecimal string\n    const hashArray = Array.from(new Uint8Array(hashBuffer));\n    const hashHex = hashArray\n      .map((b) => b.toString(16).padStart(2, \"0\"))\n      .join(\"\");\n\n    return `__hrx_file__${hashHex}`;\n  },\n\n  /**\n   * Restores file from saved data\n   * @param {Object} savedFile - Saved file data from IndexedDB\n   * @returns {void}\n   */\n  restoreFile(savedFile) {\n    this.fileName = savedFile.name;\n    this.fileTempURL = URL.createObjectURL(\n      this.base64ToFile(savedFile.data, savedFile.name, savedFile.type),\n    );\n    this.fileData = savedFile.data;\n\n    // Create and assign file to input\n    const dataTransfer = new DataTransfer();\n    const file = this.base64ToFile(\n      savedFile.data,\n      savedFile.name,\n      savedFile.type,\n    );\n    dataTransfer.items.add(file);\n    this.$refs.input.files = dataTransfer.files;\n\n    // Notify listeners that file is attached\n    document.dispatchEvent(new Event(\"file_attached\"));\n  },\n\n  /**\n   * Initializes the file input with data from IndexedDB if available\n   * @returns {Promise<void>}\n   */\n  async init() {\n    // First, try to look up by fieldId (works on form re-render after validation error)\n    if (this.fieldId) {\n      try {\n        const fieldKey = this.getFieldStorageKey(this.fieldId);\n        const savedFile = await this.getFromDB(fieldKey);\n        if (savedFile && !this.doNotRestore) {\n          this.storageKey = fieldKey;\n          this.restoreFile(savedFile);\n          return;\n        }\n      } catch (e) {\n        console.warn(\"Error retrieving file by field ID:\", e);\n      }\n    }\n\n    // Fall back to storageKey lookup (for server-provided files)\n    if (this.storageKey) {\n      try {\n        const savedFile = await this.getFromDB(this.storageKey);\n        if (savedFile) {\n          this.restoreFile(savedFile);\n        }\n      } catch (e) {\n        console.warn(\"Error retrieving file data:\", e);\n        await this.removeFromDB(this.storageKey);\n      }\n    }\n  },\n\n  /**\n   * Handles file upload events\n   * @returns {Promise<void>}\n   */\n  async fileHandler() {\n    let file = this.$refs.input.files[0];\n    if (file) {\n      // Check file size limit (configurable, defaults to 5MB)\n      if (file.size / 1024 / 1024 > this.maxFileSize) {\n        alert(\n          `File size exceeds ${this.maxFileSize}MB. Please upload a file up to ${this.maxFileSize}MB.`,\n        );\n        // Clear all file data\n        this.$refs.input.value = \"\";\n        if (this.storageKey) {\n          await this.removeFromDB(this.storageKey);\n        }\n        // Also clear field-based storage\n        if (this.fieldId) {\n          await this.removeFromDB(this.getFieldStorageKey(this.fieldId));\n        }\n        this.fileName = \"\";\n        this.fileTempURL = null;\n        this.fileData = null;\n        this.storageKey = null;\n      } else {\n        this.fileName = file.name;\n        this.fileTempURL = URL.createObjectURL(file);\n\n        // Convert file to data URL and save to IndexedDB\n        const reader = new FileReader();\n        reader.onload = async (e) => {\n          // Store the data URL (format: \"data:mime/type;base64,...\")\n          this.fileData = e.target.result;\n\n          const fileData = {\n            name: file.name,\n            type: file.type,\n            data: this.fileData,\n          };\n\n          try {\n            // Save with field-based key for predictable retrieval on form re-render\n            if (this.fieldId) {\n              const fieldKey = this.getFieldStorageKey(this.fieldId);\n              await this.saveToDB(fieldKey, fileData);\n              this.storageKey = fieldKey;\n            } else {\n              // Fall back to content-based key if no fieldId\n              this.storageKey = await this.generateStorageKey(this.fileData);\n              await this.saveToDB(this.storageKey, fileData);\n            }\n            document.dispatchEvent(new Event(\"file_attached\"));\n          } catch (e) {\n            console.error(\"Error saving file:\", e);\n            alert(\"Error saving file. Please try again.\");\n          }\n        };\n        reader.readAsDataURL(file);\n      }\n    }\n  },\n\n  /**\n   * Handles dragover event to allow drop\n   * @param {DragEvent} event\n   * @returns {void}\n   */\n  handleDragOver(event) {\n    event.preventDefault();\n    this.isDragging = true;\n  },\n\n  /**\n   * Handles dragleave event to reset visual state\n   * @param {DragEvent} event\n   * @returns {void}\n   */\n  handleDragLeave(event) {\n    event.preventDefault();\n    this.isDragging = false;\n  },\n\n  /**\n   * Handles drop event to process the dropped file\n   * @param {DragEvent} event\n   * @returns {Promise<void>}\n   */\n  async handleDrop(event) {\n    event.preventDefault();\n    this.isDragging = false;\n\n    const droppedFiles = event.dataTransfer.files;\n    if (droppedFiles.length === 0) {\n      return;\n    }\n\n    // Only take the first file\n    const dataTransfer = new DataTransfer();\n    dataTransfer.items.add(droppedFiles[0]);\n    this.$refs.input.files = dataTransfer.files;\n\n    await this.fileHandler();\n  },\n\n  /**\n   * Converts base64 data URL back to a File object\n   * @param {string} base64Data - Base64 data URL of file content\n   * @param {string} filename - Name of the file\n   * @param {string} type - MIME type of the file\n   * @returns {File} Reconstructed File object\n   */\n  base64ToFile(base64Data, filename, type) {\n    // Extract base64 data from data URL and convert to binary\n    const binaryString = window.atob(base64Data.split(\",\")[1]);\n    const bytes = new Uint8Array(binaryString.length);\n\n    // Convert binary string to byte array\n    for (let i = 0; i < binaryString.length; i++) {\n      bytes[i] = binaryString.charCodeAt(i);\n    }\n\n    // Create Blob and File objects from binary data\n    const blob = new Blob([bytes], { type: type });\n    return new File([blob], filename, { type: type });\n  },\n});\n","/**\n * Multi-file upload handler with drag-and-drop support\n * No IndexedDB persistence — files live only in the current form session.\n *\n * @param {Object} params\n * @param {number} [params.maxFiles=20] - Maximum number of files allowed\n * @param {number} [params.maxFileSize=5] - Maximum file size in MB per file\n * @param {number} [params.maxTotalSize=100] - Maximum total size in MB for all files combined\n * @param {string} [params.accept] - Accepted file types (MIME types or extensions)\n * @returns {Object} Alpine.js data object\n */\nexport default ({ maxFiles = 20, maxFileSize = 5, maxTotalSize = 100, accept = \"\" }) => ({\n  files: [],\n  maxFiles,\n  maxFileSize,\n  maxTotalSize,\n  accept,\n  isDragging: false,\n  errors: [],\n\n  init() {\n    this.$watch(\"files\", (value) => {\n      this.$dispatch(\"files-updated\", { files: [...value] });\n    });\n  },\n\n  /**\n   * Resets all files by removing them one by one (same as clicking each X button)\n   */\n  reset() {\n    while (this.files.length > 0) {\n      this.removeFile(0);\n    }\n  },\n\n  /**\n   * Validates a file against size and type constraints\n   * @param {File} file\n   * @returns {string|null} Error message or null if valid\n   */\n  validateFile(file) {\n    if (file.size / 1024 / 1024 > this.maxFileSize) {\n      return `\"${file.name}\" exceeds ${this.maxFileSize}MB limit.`;\n    }\n    if (this.accept) {\n      const acceptedTypes = this.accept.split(\",\").map((t) => t.trim());\n      const fileExtension = \".\" + file.name.split(\".\").pop().toLowerCase();\n      const matches = acceptedTypes.some((type) => {\n        if (type.startsWith(\".\")) {\n          return fileExtension === type.toLowerCase();\n        }\n        if (type.endsWith(\"/*\")) {\n          const category = type.split(\"/\")[0];\n          return file.type.startsWith(category + \"/\");\n        }\n        return file.type === type;\n      });\n      if (!matches) {\n        return `\"${file.name}\" is not an accepted file type.`;\n      }\n    }\n    return null;\n  },\n\n  /**\n   * Processes an array of files, validates and adds them\n   * @param {FileList|Array<File>} fileList\n   */\n  /**\n   * Returns the current total size of all files in bytes\n   */\n  get totalSize() {\n    return this.files.reduce((sum, entry) => sum + entry.size, 0);\n  },\n\n  addFiles(fileList) {\n    this.errors = [];\n    const errors = [];\n    const filesToAdd = Array.from(fileList);\n\n    for (const file of filesToAdd) {\n      if (this.files.length >= this.maxFiles) {\n        errors.push(`Maximum ${this.maxFiles} files allowed.`);\n        break;\n      }\n\n      if ((this.totalSize + file.size) / 1024 / 1024 > this.maxTotalSize) {\n        errors.push(`Total upload size would exceed ${this.maxTotalSize}MB limit.`);\n        break;\n      }\n\n      const error = this.validateFile(file);\n      if (error) {\n        errors.push(error);\n        continue;\n      }\n\n      this.files.push({\n        name: file.name,\n        size: file.size,\n        tempURL: URL.createObjectURL(file),\n        file: file,\n      });\n    }\n\n    if (errors.length > 0) {\n      this.errors = errors;\n    }\n\n    this.syncInputFiles();\n  },\n\n  /**\n   * Handles file input change event\n   */\n  fileHandler() {\n    const inputFiles = this.$refs.input.files;\n    if (inputFiles.length > 0) {\n      this.addFiles(inputFiles);\n    }\n  },\n\n  /**\n   * Handles dragover event\n   * @param {DragEvent} event\n   */\n  handleDragOver(event) {\n    event.preventDefault();\n    this.isDragging = true;\n  },\n\n  /**\n   * Handles dragleave event\n   */\n  handleDragLeave() {\n    this.isDragging = false;\n  },\n\n  /**\n   * Handles drop event\n   * @param {DragEvent} event\n   */\n  handleDrop(event) {\n    event.preventDefault();\n    this.isDragging = false;\n    const droppedFiles = event.dataTransfer.files;\n    if (droppedFiles.length > 0) {\n      this.addFiles(droppedFiles);\n    }\n  },\n\n  /**\n   * Removes a file at the given index\n   * @param {number} index\n   */\n  removeFile(index) {\n    const removed = this.files.splice(index, 1);\n    if (removed.length > 0) {\n      URL.revokeObjectURL(removed[0].tempURL);\n    }\n    this.syncInputFiles();\n  },\n\n  /**\n   * Syncs the internal files array to the hidden file input\n   */\n  syncInputFiles() {\n    const dataTransfer = new DataTransfer();\n    for (const entry of this.files) {\n      dataTransfer.items.add(entry.file);\n    }\n    this.$refs.input.files = dataTransfer.files;\n  },\n\n  /**\n   * Formats file size for display\n   * @param {number} bytes\n   * @returns {string}\n   */\n  formatSize(bytes) {\n    if (bytes < 1024) {\n      return bytes + \" B\";\n    }\n    if (bytes < 1024 * 1024) {\n      return (bytes / 1024).toFixed(1) + \" KB\";\n    }\n    return (bytes / (1024 * 1024)).toFixed(1) + \" MB\";\n  },\n});\n","export default ({ inputId, inputName, initialCountry = \"auto\" }) => ({\n  // Props\n  inputId,\n  inputName,\n\n  // State\n  invalid: false,\n  errorText: \"\",\n  input: null,\n  iti: null,\n  maskPattern: \"999999999999999\",\n  nationalMode: true,\n  placeholderNumberType: \"MOBILE\",\n\n  // Handlers\n  reset() {\n    this.errorText = \"\";\n    this.invalid = false;\n  },\n  getExampleNumber() {\n    if (!window.intlTelInputUtils) {\n      return null;\n    }\n    return window.intlTelInputUtils.getExampleNumber(\n      this.iti.getSelectedCountryData().iso2,\n      this.nationalMode,\n      intlTelInputUtils.numberType[this.placeholderNumberType],\n    );\n  },\n  generateMaskPattern(exampleNumber) {\n    const startsWithZero = exampleNumber.startsWith(\"0\");\n    if (startsWithZero) {\n      return \"0\" + exampleNumber.substring(1).replace(/\\d/g, \"9\");\n    } else {\n      return exampleNumber.replace(/\\d/g, \"9\");\n    }\n  },\n  updateMask() {\n    const example = this.getExampleNumber();\n    if (example) {\n      this.maskPattern = this.generateMaskPattern(example);\n    }\n    // Exception for Indonesia\n    // Indonesian phone numbers might be 13 digit\n    // Remove the mask, and let validation work.\n    if (example === \"0812-345-678\") {\n      this.maskPattern = \"999999999999999\";\n    }\n    console.log(this.maskPattern);\n  },\n  handler(event) {\n    // Listener is on window, so every htmx:before-request on the page fires here.\n    // Only validate when the request originates from the form containing this input,\n    // otherwise an invalid stored phone (e.g. rendered disabled in candidate detail)\n    // would preventDefault unrelated htmx actions and brick the whole page.\n    if (!this.input || this.input.disabled) return;\n    const form = this.input.closest(\"form\");\n    if (!form || event.target !== form) return;\n\n    this.reset();\n    if (this.input.value.trim() && this.iti) {\n      if (!window.intlTelInputUtils) {\n        // If utils not loaded, wait for promise and retry handler\n        this.iti.promise.then(() => {\n          this.handler(event);\n        });\n        return; // Stop current execution\n      }\n\n      if (!this.iti.isValidNumber()) {\n        this.invalid = true;\n        const example = this.getExampleNumber();\n        // Handle case where getExampleNumber returned null\n        this.errorText = example\n          ? `Enter a valid phone number (e.g. ${example}).`\n          : `Enter a valid phone number.`;\n        event.preventDefault();\n        this.input.focus();\n      }\n    }\n  },\n  init() {\n    this.input = document.querySelector(`#${this.inputId}`);\n\n    const config = {\n      utilsScript:\n        \"https://fastly.jsdelivr.net/npm/intl-tel-input@20.3.0/build/js/utils.js\",\n      preferredCountries: [],\n      separateDialCode: false,\n      showFlags: true,\n      nationalMode: this.nationalMode,\n      hiddenInput: function(telInputName) {\n        return { phone: inputName };\n      },\n      initialCountry: initialCountry,\n      placeholderNumberType: this.placeholderNumberType,\n      customPlaceholder: function(\n        selectedCountryPlaceholder,\n        selectedCountryData,\n      ) {\n        if (selectedCountryData.name === \"Turkey\") {\n          return \"05__ ___ __ __\";\n        } else {\n          return selectedCountryPlaceholder;\n        }\n      },\n    };\n\n    // Only use geoIpLookup when no country was provided server-side.\n    // This avoids unnecessary external API calls when we already have the\n    // country from Cloudflare's CF-IPCountry header or organization settings.\n    if (initialCountry === \"auto\") {\n      config.geoIpLookup = (callback) => {\n        fetch(\"https://ipapi.co/json\")\n          .then((res) => res.json())\n          .then((data) => callback(data.country_code))\n          .catch(() => callback(\"us\"));\n      };\n    }\n\n    this.iti = window.intlTelInput(this.input, config);\n    this.iti.promise.then(() => {\n      this.updateMask();\n      this.input.addEventListener(\"countrychange\", () => {\n        this.updateMask();\n      });\n    });\n  },\n});\n\nfunction testPhoneNumberInput() {\n  const iti = window.intlTelInputGlobals.getInstance(\n    document.querySelector(\"#id_phone_number\"),\n  );\n  const allCountries = window.intlTelInputGlobals.getCountryData();\n  const form = document.querySelector(\"form\");\n  form.setAttribute(\"hx-swap\", \"none\");\n  form.first_name.value = \"John\";\n  form.last_name.value = \"Doe\";\n  form.email.value = \"john.doe@example.com\";\n\n  allCountries.forEach((countryData, index) => {\n    setTimeout(() => {\n      // Set the country\n      iti.setCountry(countryData.iso2);\n\n      // Generate a valid phone number for this country\n      const exampleNumber = intlTelInputUtils.getExampleNumber(\n        countryData.iso2,\n        true,\n        intlTelInputUtils.numberType.MOBILE,\n      );\n\n      // Set the number in the input\n      iti.setNumber(exampleNumber);\n\n      // Submit the form\n      htmx.trigger(form, \"submit\");\n\n      // Log the action\n      console.log(\n        `Tested country: ${countryData.name}, Phone: ${exampleNumber}`,\n      );\n    }, 3000 * index);\n  });\n}\n","const sanitizeHtmlStyles = (html) => {\n  if (!html) return html;\n  // Remove whitespace between p tags (e.g. </p> <p> -> </p><p>)\n  return html.replace(/<\\/p>\\s+<p>/g, \"</p><p>\");\n};\n\n// Check if HTML content is visually empty (only contains tags/whitespace)\nconst isHtmlVisuallyEmpty = (html) => {\n  if (!html) return true;\n  // Remove all HTML tags\n  const textOnly = html.replace(/<[^>]*>/g, \"\");\n  // Remove whitespace entities and whitespace\n  const normalized = textOnly.replace(/&nbsp;/g, \" \").trim();\n  return normalized.length === 0;\n};\n\nexport default () => {\n  const beforeUnloadHandler = (event) => {\n    event.preventDefault();\n    event.returnValue = true;\n  };\n  const htmxBeforeRequestHandler = (event) => {\n    // Determine if the event target is a navigation request.\n    const isNavigationRequest =\n      event.detail.boosted && event.target.tagName === \"A\";\n\n    if (isNavigationRequest) {\n      const isConfirmed = confirm(\n        \"You have unsaved changes. Are you sure you want to navigate away?\",\n      );\n      if (!isConfirmed) {\n        event.preventDefault(); // Prevent navigation\n      }\n    }\n  };\n\n  const rawFormData = JSON.parse(\n    document.querySelector(\"#form_data\").textContent,\n  );\n  rawFormData.description = sanitizeHtmlStyles(rawFormData.description);\n\n  const rawInitialFormData = JSON.parse(\n    document.querySelector(\"#form_data\").textContent,\n  );\n  rawInitialFormData.description = sanitizeHtmlStyles(\n    rawInitialFormData.description,\n  );\n\n  return {\n    // State\n    formData: rawFormData,\n    initialFormData: rawInitialFormData,\n\n    // Methods\n    init() {\n      // Watch form data and add beforeUnloadHandler callback to beforeunload event when form state is dirty\n      // This will prevent unintended data loss and provide better UX\n      this.$watch(\"formData\", () => {\n        if (this.checkFormState(this.formData, this.initialFormData)) {\n          window.addEventListener(\"beforeunload\", beforeUnloadHandler);\n          window.addEventListener(\n            \"htmx:beforeRequest\",\n            htmxBeforeRequestHandler,\n          );\n        } else {\n          window.removeEventListener(\"beforeunload\", beforeUnloadHandler);\n          window.removeEventListener(\n            \"htmx:beforeRequest\",\n            htmxBeforeRequestHandler,\n          );\n        }\n      });\n      // we should handle saving, because it runs destroy in some conditions\n      window.addEventListener(\"htmx:beforeRequest\", (event) => {\n        const isSaveRequest =\n          event.detail.elt.id == \"job-settings-update-button-main\" ||\n          event.detail.elt.id == \"job-settings-update-button-flyout\";\n\n        if (isSaveRequest) {\n          window.removeEventListener(\"beforeunload\", beforeUnloadHandler);\n          window.removeEventListener(\n            \"htmx:beforeRequest\",\n            htmxBeforeRequestHandler,\n          );\n        }\n      });\n    },\n    // we should also handle organic destroy(navigating instead of saving)\n    destroy() {\n      // Remove the beforeUnloadHandler callback from beforeunload when component lifecycle ends\n      window.removeEventListener(\"beforeunload\", beforeUnloadHandler);\n      window.removeEventListener(\n        \"htmx:beforeRequest\",\n        htmxBeforeRequestHandler,\n      );\n    },\n    /**\n     * Recursively checks if two objects (obj1 and obj2) are deeply equal.\n     */\n    isDeepEqual(obj1, obj2) {\n      // Fast equality check for identical references or primitives\n      if (obj1 === obj2) {\n        return true;\n      }\n      // Check if either argument is not an object or is null\n      if (\n        typeof obj1 !== \"object\" ||\n        obj1 === null ||\n        typeof obj2 !== \"object\" ||\n        obj2 === null\n      ) {\n        return false;\n      }\n      // Get the keys of both objects\n      const keys1 = Object.keys(obj1);\n      const keys2 = Object.keys(obj2);\n      // If the number of properties is different, objects are not equal\n      if (keys1.length !== keys2.length) {\n        return false;\n      }\n      // Check each property in obj1 to ensure it exists and is equal in obj2\n      for (let key of keys1) {\n        if (!keys2.includes(key)) {\n          return false;\n        }\n        // Special handling for functions and deeper dive into nested objects\n        if (\n          typeof obj1[key] === \"function\" ||\n          typeof obj2[key] === \"function\"\n        ) {\n          if (obj1[key].toString() !== obj2[key].toString()) {\n            return false;\n          }\n        } else if (!this.isDeepEqual(obj1[key], obj2[key])) {\n          return false;\n        }\n      }\n\n      return true;\n    },\n    /**\n     * Determines the dirty state of the form by comparing formData and initialFormData.\n     */\n    checkFormState(formData, initialFormData) {\n      // Create normalized copies for comparison\n      const normalizedFormData = { ...formData };\n      const normalizedInitialFormData = { ...initialFormData };\n\n      // Normalize success_message: treat empty-looking HTML as equivalent to empty string\n      if (isHtmlVisuallyEmpty(normalizedFormData.success_message)) {\n        normalizedFormData.success_message = \"\";\n      }\n      if (isHtmlVisuallyEmpty(normalizedInitialFormData.success_message)) {\n        normalizedInitialFormData.success_message = \"\";\n      }\n\n      const isDirty = !this.isDeepEqual(\n        normalizedFormData,\n        normalizedInitialFormData,\n      );\n      return isDirty;\n    },\n  };\n};\n","import Cookies from \"js-cookie\";\n\nexport default ({ stagesData, url, pipeline, job = null, canManagePipeline = true }) => ({\n  // Props\n  stagesData,\n  url,\n  pipeline,\n  job,\n  canManagePipeline,\n  errors: {},\n\n  // State\n  editingStageId: null,\n  newStageAdded: false,\n  isModalOpen: false,\n  selectedStage: null,\n  deletedStageId: null,\n  stageApplicationCount: null,\n  requestInProgress: false,\n\n  getCsrf() {\n    return JSON.parse(document.querySelector(\"body\").getAttribute(\"hx-headers\"))[\"X-CSRFToken\"];\n  },\n\n  // Handlers\n  addStage(stageType) {\n    if (!this.newStageAdded) {\n      const stageTypeIndex = this.stagesData.findIndex(\n        (typeData) => typeData.stage_type.value === stageType,\n      );\n\n      const newStage = {\n        id: 0,\n        color: \"#94A3B8\",\n        name: \"\",\n        description: \"\",\n        order: null,\n        stage_type: stageType,\n      };\n\n      // Add the new stage to the end of its group\n      this.stagesData[stageTypeIndex].stages.push(newStage);\n\n      this.newStageAdded = true;\n      this.editingStageId = 0;\n\n      // Re-assign order for every stage\n      this.reassignOrders();\n    }\n  },\n  reassignOrders() {\n    let order = 1;\n    this.stagesData.forEach((stageTypeData) => {\n      stageTypeData.stages.forEach((stage) => {\n        stage.order = order;\n        order++;\n      });\n    });\n  },\n  removeNewStage() {\n    this.stagesData.forEach((stageTypeData) => {\n      const newStageIndex = stageTypeData.stages.findIndex(\n        (stage) => stage.id === 0,\n      );\n      if (newStageIndex !== -1) {\n        stageTypeData.stages.splice(newStageIndex, 1);\n        this.newStageAdded = false;\n      }\n    });\n  },\n  formHandler(stageData) {\n    this.requestInProgress = true;\n    // Form validation\n    if (!stageData.name) {\n      stageData.errors = {\n        name: [\"This field is required.\"],\n      };\n      return;\n    }\n    // Add pipeline and stage_type to each stage\n    this.stagesData.forEach((group) => {\n      group.stages.forEach((stage) => {\n        stage.pipeline = this.pipeline;\n        stage.stage_type = group.stage_type.value;\n      });\n    });\n    // Convert the entire stagesData state into a JSON string\n    const payload = JSON.stringify({\n      pipeline: this.pipeline,\n      stagesData: this.stagesData,\n    });\n\n    fetch(this.url, {\n      method: \"POST\",\n      headers: {\n        \"X-CSRFToken\": this.getCsrf(),\n        \"Content-Type\": \"application/json\",\n      },\n      body: payload,\n    })\n      .then(async (response) => {\n        this.requestInProgress = false;\n        if (!response.ok) {\n          const errorData = await response.json();\n          const error = new Error(response.statusText);\n          error.errors = errorData;\n          throw error;\n        }\n        return response.json();\n      })\n      .then((data) => {\n        this.stagesData = data.data; // Update the state\n        this.editingStageId = null;\n        this.newStageAdded = false;\n        this.derived = true;\n      })\n      .catch((error) => {\n        console.error(\"Error:\", error);\n        stageData.errors = error.errors.errors;\n      });\n  },\n  getStageApplicationCount(stageId) {\n    if (window.fromOrg) {\n      return new Promise((resolve, reject) => {\n        resolve(0);\n      });\n    }\n    let applicationCount = fetch(\n      `/jobs/${this.job}/stages/${stageId}/application_count/`,\n      {\n        method: \"GET\",\n      },\n    )\n      .then(async (response) => {\n        if (!response.ok) {\n          throw new Error(\"Network response was not ok \" + response.statusText);\n        }\n        return response.json();\n      })\n      .then((data) => {\n        return data.data.application_count;\n      })\n      .catch((error) => {\n        console.error(\"Error:\", error);\n      });\n    return applicationCount;\n  },\n  deleteStage(stageId) {\n    this.getStageApplicationCount(stageId).then((data) => {\n      if (data === 0) {\n        this.executeDeleteStage(stageId, null);\n      } else {\n        this.deletedStageId = stageId;\n        this.stageApplicationCount = data;\n        this.isModalOpen = true;\n      }\n    });\n  },\n  executeDeleteStage(stageId, newStageId) {\n    this.requestInProgress = true;\n\n    fetch(url, {\n      method: \"DELETE\",\n      headers: {\n        \"X-CSRFToken\": this.getCsrf(),\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify({\n        id: stageId,\n        newStageId: newStageId,\n      }),\n    })\n      .then(async (response) => {\n        this.requestInProgress = false;\n        if (!response.ok) {\n          throw new Error(\"Network response was not ok \" + response.statusText);\n        }\n        return response.json();\n      })\n      .then((data) => {\n        this.stagesData = data.data; // Update the state\n        this.derived = true;\n      })\n      .catch((error) => {\n        console.error(\"Error:\", error);\n      });\n  },\n  confirmStageSelection() {\n    if (parseInt(this.selectedStage) === this.deletedStageId) {\n      alert(\"Cannot move applications to the stage being deleted.\");\n      return;\n    }\n    if (this.selectedStage) {\n      this.executeDeleteStage(this.deletedStageId, this.selectedStage);\n      this.isModalOpen = false;\n      this.selectedStage = null;\n      this.deletedStageId = null;\n    } else {\n      alert(\"Please select a stage.\");\n    }\n  },\n  getNewOrderingDataFromHtml() {\n    let newOrderingData = [];\n    const baseStages = document.querySelectorAll(\".sortable\");\n    let counter = 0;\n    baseStages.forEach((stage, index) => {\n      let currentStage = {\n        order: counter + 1,\n        stage_type: {\n          value: stage.dataset.stageTypeId,\n          label: stage.dataset.stageTypeLabel,\n        },\n        stages: []\n      }\n      stage.querySelectorAll(\".stage\").forEach((stage, stageIndex) => {\n\n        let stageData = {\n          id: stage.dataset.stageId,\n          order: counter + 1,\n          name: stage.dataset.stageName,\n          color: stage.dataset.colorCode,\n          description: stage.dataset.stageDescription,\n          pipeline: this.pipeline,\n          stage_type: stage.dataset.stageType,\n        }\n        currentStage.stages.push(stageData);\n        counter++;\n      });\n      newOrderingData.push(currentStage);\n    });\n    return newOrderingData;\n  },\n  updateOrder() {\n    this.requestInProgress = true;\n    this.stagesData = this.getNewOrderingDataFromHtml();\n    const payload = JSON.stringify({\n      pipeline: this.pipeline,\n      stagesData: this.stagesData\n    });\n\n    fetch(this.url, {\n      method: \"POST\",\n      headers: {\n        \"X-CSRFToken\": this.getCsrf(),\n        \"Content-Type\": \"application/json\",\n      },\n      body: payload,\n    })\n      .then(async (response) => {\n        this.requestInProgress = false;\n        if (!response.ok) {\n          const errorData = await response.json();\n          const error = new Error(response.statusText);\n          error.errors = errorData;\n          throw error;\n        }\n        return response.json();\n      })\n      .then((data) => {\n        this.stagesData = data.data; // Update the state\n        this.derived = true;\n      }).then(\n    )\n      .catch((error) => {\n        console.error(\"Error:\", error);\n      });\n  },\n\n});\n","/*! js-cookie v3.0.8 | MIT */\n;\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define(factory) :\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {\n    var current = global.Cookies;\n    var exports = global.Cookies = factory();\n    exports.noConflict = function () { global.Cookies = current; return exports; };\n  })());\n})(this, (function () { 'use strict';\n\n  function assign (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (key === '__proto__') continue\n        target[key] = source[key];\n      }\n    }\n    return target\n  }\n\n  var defaultConverter = {\n    read: function (value) {\n      if (value[0] === '\"') {\n        value = value.slice(1, -1);\n      }\n      return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n    },\n    write: function (value) {\n      return encodeURIComponent(value).replace(\n        /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n        decodeURIComponent\n      )\n    }\n  };\n\n  function init(converter, defaultAttributes) {\n    function set(name, value, attributes) {\n      if (typeof document === 'undefined') {\n        return\n      }\n\n      attributes = assign({}, defaultAttributes, attributes);\n\n      if (typeof attributes.expires === 'number') {\n        attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n      }\n      if (attributes.expires) {\n        attributes.expires = attributes.expires.toUTCString();\n      }\n\n      name = encodeURIComponent(name)\n        .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n        .replace(/[()]/g, escape);\n\n      var stringifiedAttributes = '';\n      for (var attributeName in attributes) {\n        if (!attributes[attributeName]) {\n          continue\n        }\n\n        stringifiedAttributes += '; ' + attributeName;\n\n        if (attributes[attributeName] === true) {\n          continue\n        }\n\n        // Considers RFC 6265 section 5.2:\n        // ...\n        // 3.  If the remaining unparsed-attributes contains a %x3B (\";\")\n        //     character:\n        // Consume the characters of the unparsed-attributes up to,\n        // not including, the first %x3B (\";\") character.\n        // ...\n        stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n      }\n\n      return (document.cookie =\n        name + '=' + converter.write(value, name) + stringifiedAttributes)\n    }\n\n    function get(name) {\n      if (typeof document === 'undefined' || (arguments.length && !name)) {\n        return\n      }\n\n      // To prevent the for loop in the first place assign an empty array\n      // in case there are no cookies at all.\n      var cookies = document.cookie ? document.cookie.split('; ') : [];\n      var jar = {};\n      for (var i = 0; i < cookies.length; i++) {\n        var parts = cookies[i].split('=');\n        var value = parts.slice(1).join('=');\n\n        try {\n          var found = decodeURIComponent(parts[0]);\n          if (!(found in jar)) jar[found] = converter.read(value, found);\n          if (name === found) {\n            break\n          }\n        } catch (_e) {\n          // Do nothing...\n        }\n      }\n\n      return name ? jar[name] : jar\n    }\n\n    return Object.create(\n      {\n        set: set,\n        get: get,\n        remove: function (name, attributes) {\n          set(\n            name,\n            '',\n            assign({}, attributes, {\n              expires: -1\n            })\n          );\n        },\n        withAttributes: function (attributes) {\n          return init(this.converter, assign({}, this.attributes, attributes))\n        },\n        withConverter: function (converter) {\n          return init(assign({}, this.converter, converter), this.attributes)\n        }\n      },\n      {\n        attributes: { value: Object.freeze(defaultAttributes) },\n        converter: { value: Object.freeze(converter) }\n      }\n    )\n  }\n\n  var api = init(defaultConverter, { path: '/' });\n\n  return api;\n\n}));\n","import Cookies from \"js-cookie\";\n\nexport default ({\n  rejectReasons,\n  sortableUpdateUrl,\n  availableCurrencies = [],\n  isCurrencyModalOpen = false,\n  currencyToDelete = null,\n  currencyUsageCount = 0,\n  selectedReplacementCurrency = \"\",\n}) => ({\n  // Props\n  rejectReasons,\n  sortableUpdateUrl,\n  availableCurrencies,\n\n  // State\n  isModalOpen: false,\n  rejectReasonApplicationCount: 0,\n  selectedRejectReason: null,\n  deletedRejectReasonId: null,\n  sortableDeleteUrl: null,\n  requestInProgress: false,\n  editingSortableItemId: null,\n\n  // Currency migration state\n  isCurrencyModalOpen,\n  currencyToDelete,\n  currencyUsageCount,\n  selectedReplacementCurrency,\n\n  init() {\n    // Watch `editingSortableItemId` value and notify others of its state\n    // This will help the Sortable instances to disable themselves based\n    // on `editingSortableItemId` value.\n    this.$watch(\"editingSortableItemId\", (value) => {\n      this.$dispatch(\"editingSortableItem\", { value });\n    });\n  },\n\n  // \"Show\" link of the inline \"added\" message: scroll to the new row and flash it\n  showCreatedItem(id) {\n    const el = document.getElementById(\"sortable-item-\" + id);\n    if (!el) return;\n    el.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n    el.classList.remove(\"row-highlight\");\n    void el.offsetWidth; // restart the animation on repeated clicks\n    el.classList.add(\"row-highlight\");\n  },\n\n  updateSortableItem() {\n    let formDiv = document.getElementById(\n      \"editingForm-\" + this.editingSortableItemId,\n    );\n    let inputs = [\n      ...formDiv.getElementsByTagName(\"input\"),\n      ...formDiv.getElementsByTagName(\"select\"),\n    ];\n    let data = {};\n\n    inputs.forEach((input) => {\n      data[input.name] = input.value;\n      data[\"id\"] = input.parentElement.parentElement.dataset.itemId;\n    });\n\n    // send request with ajax\n    fetch(this.sortableUpdateUrl, {\n      method: \"POST\",\n      headers: {\n        \"X-CSRFToken\": Cookies.get(\"csrftoken\"),\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify(data),\n    })\n      .then(async (response) => {\n        if (!response.ok) {\n          throw new Error(\"Network response was not ok \" + response.statusText);\n        }\n        location.reload();\n      })\n      .catch((error) => {\n        console.error(\"Error:\", error);\n      });\n  },\n\n  getRejectReasonApplicationCount(rejectReasonUrl) {\n    let applicationCount = fetch(rejectReasonUrl, {\n      method: \"GET\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    })\n      .then(async (response) => {\n        if (!response.ok) {\n          throw new Error(\"Network response was not ok \" + response.statusText);\n        }\n        return response.json();\n      })\n      .then((data) => {\n        return data.data.application_count;\n      })\n      .catch((error) => {\n        console.error(\"Error:\", error);\n      });\n    return applicationCount;\n  },\n  executeDeleteRejectReason(deletedRejectReasonId, newRejectReasonId) {\n    fetch(this.sortableDeleteUrl, {\n      method: \"DELETE\",\n      headers: {\n        \"X-CSRFToken\": Cookies.get(\"csrftoken\"),\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify({\n        deletedRejectReasonId: deletedRejectReasonId,\n        newRejectReasonId: newRejectReasonId,\n      }),\n    })\n      .then(async (response) => {\n        if (!response.ok) {\n          throw new Error(\"Network response was not ok \" + response.statusText);\n        }\n      })\n      .catch((error) => {\n        console.error(\"Error:\", error);\n      });\n  },\n  async deleteRejectReason(\n    rejectReasonUrl,\n    sortableDeleteUrl,\n    deletedRejectReasonId,\n  ) {\n    let applicationCount =\n      await this.getRejectReasonApplicationCount(rejectReasonUrl);\n    this.sortableDeleteUrl = sortableDeleteUrl;\n\n    if (applicationCount === 0) {\n      const hiddenDeleteBtn = document.getElementById(\n        \"hiddenBtn-\" + deletedRejectReasonId,\n      );\n      if (hiddenDeleteBtn) {\n        hiddenDeleteBtn.click();\n      } else {\n        // The hidden HTMX delete button is swapped out via\n        // hx-swap=\"outerHTML\" on delete/reorder, so getElementById can\n        // return null. Fall back to issuing the delete directly instead\n        // of throwing on a null `.click()`.\n        this.executeSimpleDelete(sortableDeleteUrl);\n      }\n    } else {\n      this.isModalOpen = true;\n      this.rejectReasonApplicationCount = applicationCount;\n      this.deletedRejectReasonId = deletedRejectReasonId;\n    }\n  },\n  executeSimpleDelete(sortableDeleteUrl) {\n    fetch(sortableDeleteUrl, {\n      method: \"DELETE\",\n      headers: {\n        \"X-CSRFToken\": Cookies.get(\"csrftoken\"),\n        \"Content-Type\": \"application/json\",\n      },\n    })\n      .then(async (response) => {\n        if (!response.ok) {\n          throw new Error(\"Network response was not ok \" + response.statusText);\n        }\n        location.reload();\n      })\n      .catch((error) => {\n        console.error(\"Error:\", error);\n      });\n  },\n  confirmRejectReasonSelection() {\n    if (this.selectedRejectReason) {\n      this.executeDeleteRejectReason(\n        this.deletedRejectReasonId,\n        this.selectedRejectReason,\n      );\n      this.isModalOpen = false;\n      this.selectedRejectReason = null;\n      this.deletedRejectReasonId = null;\n      location.reload();\n    } else {\n      alert(\"Please select a reject reason.\");\n    }\n  },\n\n  // Currency migration methods\n  checkCurrencyUsage(currencyId) {\n    const usageUrl = `/organization/currencies/${currencyId}/usage/`;\n    fetch(usageUrl)\n      .then((r) => r.json())\n      .then((data) => {\n        if (data.can_delete) {\n          // Direct delete - no usage\n          fetch(`/organization/currencies/${currencyId}/delete/`, {\n            method: \"DELETE\",\n            headers: {\n              \"X-CSRFToken\": Cookies.get(\"csrftoken\"),\n            },\n          })\n            .then((r) => {\n              if (r.ok) {\n                // Success - refresh currency list\n                htmx.ajax(\"GET\", \"/organization/currencies/\", {\n                  target: \"#currencies\",\n                  swap: \"outerHTML\",\n                });\n              } else {\n                return r.text().then((text) => {\n                  alert(text);\n                });\n              }\n            })\n            .catch((err) => {\n              console.error(\"Error deleting currency:\", err);\n              alert(\"Error deleting currency. Please try again.\");\n            });\n        } else {\n          // Show migration modal\n          this.currencyToDelete = this.availableCurrencies.find(\n            (c) => c.id === currencyId,\n          );\n          this.currencyUsageCount = data.total_count;\n          this.isCurrencyModalOpen = true;\n        }\n      })\n      .catch((err) => {\n        console.error(\"Error checking currency usage:\", err);\n        alert(\"Error checking currency usage. Please try again.\");\n      });\n  },\n\n  confirmCurrencyMigration() {\n    const formData = new FormData();\n    formData.append(\"new_currency_id\", this.selectedReplacementCurrency);\n    formData.append(\"csrfmiddlewaretoken\", Cookies.get(\"csrftoken\"));\n\n    fetch(`/organization/currencies/${this.currencyToDelete.id}/delete/`, {\n      method: \"POST\",\n      body: formData,\n    })\n      .then((r) => {\n        if (r.ok) {\n          // Success - refresh currency list\n          htmx.ajax(\"GET\", \"/organization/currencies/\", {\n            target: \"#currencies\",\n            swap: \"outerHTML\",\n          });\n          this.isCurrencyModalOpen = false;\n          this.selectedReplacementCurrency = \"\";\n        } else {\n          return r.text().then((text) => {\n            alert(text);\n          });\n        }\n      })\n      .catch((err) => {\n        console.error(\"Error migrating currency:\", err);\n        alert(\"Error migrating currency. Please try again.\");\n      });\n  },\n});\n","const MENTION_PATTERN = /@([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+)/g;\n\nconst MIRROR_STYLE_PROPS = [\n  \"fontFamily\",\n  \"fontSize\",\n  \"fontWeight\",\n  \"lineHeight\",\n  \"letterSpacing\",\n  \"wordSpacing\",\n  \"textIndent\",\n  \"paddingTop\",\n  \"paddingLeft\",\n  \"paddingRight\",\n  \"paddingBottom\",\n  \"borderTopWidth\",\n  \"borderLeftWidth\",\n  \"borderRightWidth\",\n  \"borderBottomWidth\",\n  \"boxSizing\",\n  \"tabSize\",\n];\n\nexport default ({\n  initialVisibleToUsers = [],\n  mentionableUsers = [],\n  possibleCSRFError = false,\n  postLabels = {\n    everyone: \"Post to everyone\",\n    one: \"Post to {name}\",\n    many: \"Post to {name} and {count} more\",\n  },\n}) => ({\n  visible_to_users: initialVisibleToUsers,\n  mentionableUsers,\n  possibleCSRFError,\n  mentionMode: false,\n  mentionQuery: \"\",\n  mentionStartIndex: -1,\n  mentionActiveIndex: 0,\n  mentionDropdownTop: 0,\n  mentionDropdownLeft: 0,\n  commentText: \"\",\n\n  get mentionedUsers() {\n    const matches = [...this.commentText.matchAll(MENTION_PATTERN)];\n    const emails = matches.map((m) => m[1].toLowerCase());\n    return this.mentionableUsers.filter((u) =>\n      emails.includes(u.email.toLowerCase())\n    );\n  },\n\n  get mentionedNotInVisible() {\n    if (this.visible_to_users.length === 0) return [];\n    const visibleIds = new Set(this.visible_to_users.map((u) => u.id));\n    return this.mentionedUsers.filter((u) => !visibleIds.has(u.id));\n  },\n\n  get filteredMentions() {\n    const q = this.mentionQuery.toLowerCase();\n    if (!q) return this.mentionableUsers;\n    return this.mentionableUsers.filter(\n      (u) =>\n        u.name.toLowerCase().includes(q) || u.email.toLowerCase().includes(q)\n    );\n  },\n\n  get postButtonText() {\n    const count = this.visible_to_users.length;\n    // Translated labels come from the template, e.g. \"{name} kişisine gönder\".\n    const name = this.visible_to_users[0]?.name ?? \"\";\n    if (count === 0) return postLabels.everyone;\n    if (count === 1) return postLabels.one.replace(\"{name}\", name);\n    return postLabels.many.replace(\"{name}\", name).replace(\"{count}\", count - 1);\n  },\n\n  getCaretCoordinates() {\n    const ta = this.$refs.commentTextarea.querySelector(\"textarea\");\n    const mirror = this.$refs.mentionMirror;\n    if (!ta || !mirror) return;\n\n    const style = window.getComputedStyle(ta);\n    MIRROR_STYLE_PROPS.forEach((p) => {\n      mirror.style[p] = style[p];\n    });\n    mirror.style.width = ta.offsetWidth + \"px\";\n    mirror.style.overflowY = \"hidden\";\n    mirror.style.whiteSpace = \"pre-wrap\";\n    mirror.style.wordWrap = \"break-word\";\n\n    const textBefore = ta.value.substring(0, ta.selectionStart);\n    mirror.textContent = textBefore;\n\n    const marker = document.createElement(\"span\");\n    marker.textContent = \"|\";\n    mirror.appendChild(marker);\n\n    const maxLeft = ta.offsetWidth - 288;\n    this.mentionDropdownTop = marker.offsetTop + marker.offsetHeight - ta.scrollTop;\n    this.mentionDropdownLeft = Math.max(0, Math.min(marker.offsetLeft, maxLeft));\n\n    mirror.textContent = \"\";\n  },\n\n  insertMention(user) {\n    const ta = this.$refs.commentTextarea.querySelector(\"textarea\");\n    const before = ta.value.slice(0, this.mentionStartIndex);\n    const after = ta.value.slice(ta.selectionStart);\n    const insertion = \"@\" + user.email + \" \";\n    ta.value = before + insertion + after;\n    const newCursor = before.length + insertion.length;\n    ta.setSelectionRange(newCursor, newCursor);\n    this.exitMentionMode();\n    ta.focus();\n    ta.dispatchEvent(new Event(\"input\"));\n  },\n\n  exitMentionMode() {\n    this.mentionMode = false;\n    this.mentionQuery = \"\";\n    this.mentionStartIndex = -1;\n    this.mentionActiveIndex = 0;\n  },\n\n  handleMentionInput(event) {\n    const ta = event.target;\n    const pos = ta.selectionStart;\n    const val = ta.value;\n    this.commentText = val;\n\n    if (!this.mentionMode) {\n      if (pos > 0 && val[pos - 1] === \"@\") {\n        const charBefore = pos >= 2 ? val[pos - 2] : null;\n        if (charBefore === null || charBefore === \" \" || charBefore === \"\\n\" || charBefore === \"\\r\") {\n          this.mentionMode = true;\n          this.mentionStartIndex = pos - 1;\n          this.mentionQuery = \"\";\n          this.mentionActiveIndex = 0;\n          this.$nextTick(() => this.getCaretCoordinates());\n        }\n      }\n    } else {\n      if (pos <= this.mentionStartIndex) {\n        this.exitMentionMode();\n        return;\n      }\n      const query = val.slice(this.mentionStartIndex + 1, pos);\n      if (query.includes(\" \") || query.includes(\"\\n\")) {\n        this.exitMentionMode();\n        return;\n      }\n      this.mentionQuery = query;\n      this.mentionActiveIndex = Math.min(\n        this.mentionActiveIndex,\n        Math.max(this.filteredMentions.length - 1, 0)\n      );\n      this.$nextTick(() => this.getCaretCoordinates());\n    }\n  },\n\n  scrollActiveIntoView() {\n    this.$nextTick(() => {\n      const dropdown = this.$refs.mentionDropdown;\n      if (!dropdown) return;\n      const active = dropdown.querySelector(\"[data-mention-active]\");\n      if (active) active.scrollIntoView({ block: \"nearest\" });\n    });\n  },\n\n  handleMentionKeydown(event) {\n    if (!this.mentionMode || this.filteredMentions.length === 0) return;\n\n    if (event.key === \"ArrowDown\") {\n      event.preventDefault();\n      this.mentionActiveIndex = (this.mentionActiveIndex + 1) % this.filteredMentions.length;\n      this.scrollActiveIntoView();\n    } else if (event.key === \"ArrowUp\") {\n      event.preventDefault();\n      this.mentionActiveIndex =\n        (this.mentionActiveIndex - 1 + this.filteredMentions.length) % this.filteredMentions.length;\n      this.scrollActiveIntoView();\n    } else if (event.key === \"Enter\") {\n      event.preventDefault();\n      this.insertMention(this.filteredMentions[this.mentionActiveIndex]);\n    } else if (event.key === \"Escape\") {\n      event.preventDefault();\n      this.exitMentionMode();\n    }\n  },\n});\n","import { Editor } from \"@tiptap/core\";\nimport { Color } from \"@tiptap/extension-color\";\nimport Highlight from \"@tiptap/extension-highlight\";\nimport Image from \"@tiptap/extension-image\";\nimport Link from \"@tiptap/extension-link\";\nimport TextAlign from \"@tiptap/extension-text-align\";\nimport { TextStyle } from \"@tiptap/extension-text-style\";\nimport Underline from \"@tiptap/extension-underline\";\nimport StarterKit from \"@tiptap/starter-kit\";\nimport VariableSuggestion from \"./variableSuggestion\";\nimport VariableNode from \"./variableNode\";\nimport { createImageResizer, IMAGE_ALIGNMENT_STYLES } from \"./imageResizer\";\nimport { decideEmailImageWidth, stripSizeDeclarations } from \"./emailImageWidth.mjs\";\nimport EmailExtensions from \"./emailTableExtension\";\nimport \"./wysiwyg.scss\";\n\nexport default ({ content, previewFillers = {}, usableVariables = [], recognizableVariables = usableVariables, imageUploadActive = false, enableHeadings = false, enableColor = false, enableHighlight = false, emailColumnWidth = 0, previewLayoutPrefix = \"\", previewLayoutSuffix = \"\", mjmlStamp = \"\" }) => {\n  let editor;\n  let imageResizer = null;\n  const hasMjmlStamp = (html) => Boolean(mjmlStamp) && html.includes(mjmlStamp);\n\n  return {\n    updatedAt: Date.now(),\n    // A body qualifies for MJML when it starts empty or already carries the stamp.\n    // Pre-stamp rows never qualify, so old data is sent exactly as stored. No stamp = not an email editor.\n    mjmlEligible: Boolean(mjmlStamp) && (!content.trim() || hasMjmlStamp(content)),\n    previewIsMjml: false,\n    // srcs already asked for their natural width, so a broken image is probed once, not on every keystroke\n    probedImageSrcs: new Set(),\n    activeTab: \"write\",\n    previewContent: \"\",\n    previewFillers: previewFillers,\n    usableVariables: usableVariables,\n    // Superset of usableVariables: also turns saved {{ x }} text into nodes for variables the picker doesn't offer.\n    recognizableVariables: recognizableVariables,\n    isUploading: false,\n    uploadError: \"\",\n    imageUploadActive: imageUploadActive,\n    enableHeadings: enableHeadings,\n    enableColor: enableColor,\n    enableHighlight: enableHighlight,\n    // Onboarding email layout (header/footer/shell) wrapped around the preview only, never the saved body.\n    previewLayoutPrefix: previewLayoutPrefix,\n    previewLayoutSuffix: previewLayoutSuffix,\n    colorPopoverVisible: false,\n    customColorHex: \"\",\n    activeColor: null,\n    highlightPopoverVisible: false,\n    customHighlightHex: \"\",\n    activeHighlight: null,\n    linkPopoverVisible: false,\n    linkUrl: \"\",\n    linkText: \"\",\n    isEditingLink: false,\n    // Saved selection to persist across focus changes\n    savedSelectionFrom: null,\n    savedSelectionTo: null,\n    savedSelectedText: \"\",\n    init() {\n      const _this = this;\n\n      // Clean up any existing editor from HTMX history cache restoration\n      // When HTMX restores from cache, the DOM already has the editor content\n      // and toolbar, but Alpine re-initializes, creating duplicates\n      const existingProseMirror = this.$refs.element?.querySelector('.ProseMirror');\n      if (existingProseMirror) {\n        existingProseMirror.remove();\n      }\n\n      // Also clean up existing toolbar (.menu) created by x-if template\n      // Navigate up from $refs.element to find the wysiwyg-container\n      const container = this.$refs.element?.closest('.wysiwyg-container');\n      if (container) {\n        const existingMenus = container.querySelectorAll('.menu');\n        existingMenus.forEach(menu => menu.remove());\n      }\n\n      editor = new Editor({\n        element: this.$refs.element,\n        extensions: [\n          StarterKit.configure({\n            bulletList: {\n              keepMarks: true,\n              keepAttributes: false,\n            },\n            hardBreak: false,\n            heading: enableHeadings ? {\n              levels: [1, 2, 3]\n            } : false\n          }),\n          Underline,\n          ...EmailExtensions,\n          Link.configure({\n            openOnClick: false,\n          }),\n          // Extend TextAlign to use align=\"center\" attribute instead of style=\"text-align: center\"\n          // This is more compatible with email clients and our HTML sanitizer\n          TextAlign.extend({\n            addGlobalAttributes() {\n              return [\n                {\n                  types: [\"heading\", \"paragraph\"],\n                  attributes: {\n                    textAlign: {\n                      default: null,\n                      parseHTML: element => element.getAttribute('align') || element.style.textAlign || null,\n                      renderHTML: attributes => {\n                        if (!attributes.textAlign) {\n                          return {};\n                        }\n                        // Use align attribute instead of inline style\n                        return { align: attributes.textAlign };\n                      },\n                    },\n                  },\n                },\n              ];\n            },\n          }).configure({\n            types: [\"heading\", \"paragraph\"],\n          }),\n          Image.configure({\n            HTMLAttributes: {\n              class: \"max-w-full h-auto rounded-lg shadow-xs\",\n            },\n            allowBase64: true,\n            inline: true,\n          }).extend({\n            addAttributes() {\n              return {\n                ...this.parent?.(),\n                width: {\n                  default: null,\n                  parseHTML: element => element.getAttribute('width') || element.getAttribute('data-width'),\n                  renderHTML: attributes => {\n                    if (!attributes.width) return {};\n                    return { width: attributes.width, 'data-width': attributes.width };\n                  },\n                },\n                height: {\n                  default: null,\n                  parseHTML: element => element.getAttribute('height') || element.getAttribute('data-height'),\n                  renderHTML: attributes => {\n                    if (!attributes.height) return {};\n                    return { height: attributes.height, 'data-height': attributes.height };\n                  },\n                },\n                style: {\n                  default: null,\n                  parseHTML: element => element.getAttribute('style'),\n                  renderHTML: attributes => {\n                    if (!attributes.style) return {};\n                    return { style: attributes.style };\n                  },\n                },\n                class: {\n                  default: null,\n                  parseHTML: element => element.getAttribute('class'),\n                  renderHTML: attributes => {\n                    if (!attributes.class) return {};\n                    return { class: attributes.class };\n                  },\n                },\n                // Outlook's Word engine ignores `float`; this attribute is what\n                // wraps text beside an image there. Written only for wrapped\n                // images, see WRAP_ALIGN_ATTRIBUTES in imageResizer.\n                align: {\n                  default: null,\n                  parseHTML: element => element.getAttribute('align'),\n                  renderHTML: attributes => {\n                    if (!attributes.align) return {};\n                    return { align: attributes.align };\n                  },\n                },\n              };\n            },\n            addNodeView() {\n              return ({ node, HTMLAttributes }) => {\n                const img = document.createElement('img');\n\n                // Set all attributes\n                Object.entries(HTMLAttributes).forEach(([key, value]) => {\n                  if (value !== null && value !== undefined) {\n                    img.setAttribute(key, value);\n                  }\n                });\n\n                // Apply stored dimensions if they exist\n                if (node.attrs.width && node.attrs.height) {\n                  img.style.width = `${node.attrs.width}px`;\n                  img.style.height = `${node.attrs.height}px`;\n                }\n\n                return {\n                  dom: img,\n                  update: (updatedNode) => {\n                    if (updatedNode.type.name !== 'image') return false;\n\n                    // Mirror every attribute, removals included: the width sweep sets\n                    // width while clearing height and rewriting style, and a DOM that\n                    // keeps the old values is what the MutationObserver serializes\n                    // into the form's hidden input.\n                    const a = updatedNode.attrs;\n                    const sync = (name, value) => {\n                      if (value === null || value === undefined || value === '') img.removeAttribute(name);\n                      else img.setAttribute(name, value);\n                    };\n                    sync('src', a.src); sync('alt', a.alt); sync('title', a.title);\n                    sync('class', a.class); sync('style', a.style);\n                    sync('width', a.width); sync('data-width', a.width);\n                    sync('height', a.height); sync('data-height', a.height);\n                    if (a.width && a.height) {\n                      img.style.width = `${a.width}px`;\n                      img.style.height = `${a.height}px`;\n                    }\n\n                    return true;\n                  }\n                };\n              };\n            },\n          }),\n          VariableNode,\n          VariableSuggestion.configure({ variables: this.usableVariables }),\n          ...(enableColor ? [TextStyle, Color] : []),\n          ...(enableHighlight ? [Highlight.configure({ multicolor: true })] : []),\n        ],\n        editorProps: {\n          attributes: {\n            class:\n              \"format lg:format-lg dark:format-invert focus:outline-hidden format-blue max-w-none\",\n          },\n          handleDrop(view, event, slice, moved) {\n            if (\n              !moved &&\n              event.dataTransfer &&\n              event.dataTransfer.files &&\n              event.dataTransfer.files[0] &&\n              imageUploadActive\n            ) {\n              const file = event.dataTransfer.files[0];\n              if (file.type.startsWith(\"image/\")) {\n                event.preventDefault();\n                _this.handleImageUpload(file);\n                return true;\n              }\n            }\n            return false;\n          },\n          handlePaste(view, event, slice) {\n            if (imageUploadActive) {\n              const items = Array.from(event.clipboardData?.items || []);\n              for (const item of items) {\n                if (item.type.startsWith(\"image/\")) {\n                  event.preventDefault();\n                  const file = item.getAsFile();\n                  _this.handleImageUpload(file);\n                  return true;\n                }\n              }\n            }\n            return false;\n          },\n        },\n        content: content,\n        onCreate({ editor }) {\n          _this.updatedAt = Date.now();\n\n          // Convert existing {{ variable_name }} text to variable nodes\n          _this.convertExistingVariablesToNodes(editor);\n        },\n        onUpdate({ editor }) {\n          _this.updatedAt = Date.now();\n          _this.capEmailImageWidths();\n        },\n        onSelectionUpdate({ editor }) {\n          _this.updatedAt = Date.now();\n        },\n      });\n\n      // Setup image resize functionality\n      imageResizer = createImageResizer(editor, this.$refs.element, emailColumnWidth);\n\n      // Setup link click handler\n      this.$refs.element.addEventListener('click', (event) => {\n        const target = event.target.closest('a[href]');\n        if (target && editor.isEditable) {\n          event.preventDefault();\n\n          // Get the start and end positions of the link element\n          const startPos = editor.view.posAtDOM(target, 0);\n          const endPos = editor.view.posAtDOM(target, target.childNodes.length);\n\n          // Select the entire link\n          editor.commands.setTextSelection({ from: startPos, to: endPos });\n\n          // Show the popover\n          this.showLinkPopover();\n        }\n      });\n\n    },\n    isLoaded() {\n      return editor;\n    },\n    isActive(type, opts = {}) {\n      return editor.isActive(type, opts);\n    },\n    toggleHeading(opts) {\n      editor.chain().toggleHeading(opts).focus().run();\n    },\n    toggleBold() {\n      editor.chain().focus().toggleBold().run();\n    },\n    toggleItalic() {\n      editor.chain().focus().toggleItalic().run();\n    },\n    toggleUnderline() {\n      editor.chain().focus().toggleUnderline().run();\n    },\n    toggleStrike() {\n      editor.chain().focus().toggleStrike().run();\n    },\n    showColorPopover() {\n      this.activeColor = editor.getAttributes(\"textStyle\").color || null;\n      this.customColorHex = this.activeColor || \"\";\n      this.colorPopoverVisible = true;\n    },\n    hideColorPopover() {\n      this.colorPopoverVisible = false;\n      this.customColorHex = \"\";\n    },\n    setColor(hex) {\n      if (!hex) return;\n      editor.chain().focus().setColor(hex).run();\n      this.activeColor = hex;\n      this.hideColorPopover();\n    },\n    unsetColor() {\n      editor.chain().focus().unsetColor().run();\n      this.activeColor = null;\n      this.hideColorPopover();\n    },\n    applyCustomColor() {\n      const raw = (this.customColorHex || \"\").trim();\n      const hex = raw.startsWith(\"#\") ? raw : `#${raw}`;\n      if (!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(hex)) return;\n      this.setColor(hex);\n    },\n    currentColor(_updatedAt) {\n      if (!editor) return null;\n      return editor.getAttributes(\"textStyle\").color || null;\n    },\n    showHighlightPopover() {\n      this.activeHighlight = editor.getAttributes(\"highlight\").color || null;\n      this.customHighlightHex = this.activeHighlight || \"\";\n      this.highlightPopoverVisible = true;\n    },\n    hideHighlightPopover() {\n      this.highlightPopoverVisible = false;\n      this.customHighlightHex = \"\";\n    },\n    setHighlight(hex) {\n      if (!hex) return;\n      // setHighlight, not toggleHighlight: picking a swatch on already-highlighted text should recolor, not clear.\n      editor.chain().focus().setHighlight({ color: hex }).run();\n      this.activeHighlight = hex;\n      this.hideHighlightPopover();\n    },\n    unsetHighlight() {\n      editor.chain().focus().unsetHighlight().run();\n      this.activeHighlight = null;\n      this.hideHighlightPopover();\n    },\n    applyCustomHighlight() {\n      const raw = (this.customHighlightHex || \"\").trim();\n      const hex = raw.startsWith(\"#\") ? raw : `#${raw}`;\n      if (!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(hex)) return;\n      this.setHighlight(hex);\n    },\n    currentHighlight(_updatedAt) {\n      if (!editor) return null;\n      return editor.getAttributes(\"highlight\").color || null;\n    },\n    showLinkPopover() {\n      // Get the current selection or cursor position\n      const { from, to } = editor.state.selection;\n\n      // Try to get link attributes at the current position\n      let { href } = editor.getAttributes('link');\n      let selectedText = \"\";\n      let selectionFrom = from;\n      let selectionTo = to;\n\n      // If we don't have a link at cursor, check if we're inside a link\n      if (!href) {\n        // Look for a link mark at the current position\n        const $pos = editor.state.doc.resolve(from);\n        const marks = $pos.marks();\n        const linkMark = marks.find(mark => mark.type.name === 'link');\n\n        if (linkMark) {\n          href = linkMark.attrs.href;\n        }\n      }\n\n      // Get the selected text or the text content of the link\n      if (from !== to) {\n        // There's a selection\n        selectedText = editor.state.doc.textBetween(from, to);\n        selectionFrom = from;\n        selectionTo = to;\n      } else if (href) {\n        // We're at a cursor position in a link, get the full link text\n        const $pos = editor.state.doc.resolve(from);\n        const marks = $pos.marks();\n        const linkMark = marks.find(mark => mark.type.name === 'link');\n\n        if (linkMark) {\n          // Find the range of this link\n          let linkStart = from;\n          let linkEnd = from;\n\n          // Search backwards for link start\n          for (let i = from - 1; i >= 0; i--) {\n            const pos = editor.state.doc.resolve(i);\n            const posMarks = pos.marks();\n            const hasLinkMark = posMarks.find(mark => mark.type.name === 'link' && mark.attrs.href === href);\n            if (hasLinkMark) {\n              linkStart = i;\n            } else {\n              break;\n            }\n          }\n\n          // Search forwards for link end\n          for (let i = from; i < editor.state.doc.content.size; i++) {\n            const pos = editor.state.doc.resolve(i);\n            const posMarks = pos.marks();\n            const hasLinkMark = posMarks.find(mark => mark.type.name === 'link' && mark.attrs.href === href);\n            if (hasLinkMark) {\n              linkEnd = i + 1;\n            } else {\n              break;\n            }\n          }\n\n          selectedText = editor.state.doc.textBetween(linkStart, linkEnd);\n          selectionFrom = linkStart;\n          selectionTo = linkEnd;\n        }\n      }\n\n      // Save the selection so it persists when popover inputs are focused\n      this.savedSelectionFrom = selectionFrom;\n      this.savedSelectionTo = selectionTo;\n      this.savedSelectedText = selectedText;\n\n      this.linkUrl = href || \"\";\n      this.linkText = selectedText || \"\";\n      this.isEditingLink = !!href;\n      this.linkPopoverVisible = true;\n\n      // Focus the URL input after showing the popover\n      this.$nextTick(() => {\n        this.$refs.linkUrlInput?.focus();\n      });\n    },\n    hideLinkPopover() {\n      this.linkPopoverVisible = false;\n      this.linkUrl = \"\";\n      this.linkText = \"\";\n      this.isEditingLink = false;\n      // Clear saved selection\n      this.savedSelectionFrom = null;\n      this.savedSelectionTo = null;\n      this.savedSelectedText = \"\";\n    },\n    applyLink() {\n      if (!this.linkUrl.trim()) return;\n\n      let url = this.linkUrl.trim();\n      // Add protocol if missing, but skip template variables\n      if (!url.match(/^https?:\\/\\//) && !url.match(/^\\{\\{\\s*.*\\s*\\}\\}$/)) {\n        url = 'https://' + url;\n      }\n\n      // Use saved selection instead of current editor selection (which may have been lost)\n      const from = this.savedSelectionFrom;\n      const to = this.savedSelectionTo;\n      const hasSelection = from !== null && to !== null && from !== to;\n      const originalText = this.savedSelectedText;\n      const newLinkText = this.linkText.trim();\n\n      // Restore the selection before applying changes\n      if (hasSelection) {\n        editor.chain().focus().setTextSelection({ from, to }).run();\n      } else {\n        editor.chain().focus().run();\n      }\n\n      if (hasSelection && newLinkText && newLinkText !== originalText) {\n        // Selection exists but link text was changed - replace text and apply link\n        editor.chain()\n          .focus()\n          .deleteSelection()\n          .insertContent(`<a href=\"${url}\">${newLinkText}</a>`)\n          .run();\n      } else if (hasSelection) {\n        // Selection exists and text unchanged (or empty) - just update the URL\n        editor.chain().focus().setLink({ href: url }).run();\n      } else if (newLinkText) {\n        // No selection but we have link text - insert new link\n        editor.chain().focus().insertContent(`<a href=\"${url}\">${newLinkText}</a>`).run();\n      } else {\n        // No selection and no link text - try to set link (will fail gracefully if nothing selected)\n        editor.chain().focus().setLink({ href: url }).run();\n      }\n\n      this.hideLinkPopover();\n    },\n    removeLink() {\n      const from = this.savedSelectionFrom;\n      const to = this.savedSelectionTo;\n      const hasSelection = from !== null && to !== null && from !== to;\n\n      if (hasSelection) {\n        editor.chain().focus().setTextSelection({ from, to }).unsetLink().run();\n      } else {\n        editor.chain().focus().unsetLink().run();\n      }\n      this.hideLinkPopover();\n    },\n    setTextAlign(align) {\n      editor.chain().focus().setTextAlign(align).run();\n    },\n    toggleBulletList() {\n      editor.chain().focus().toggleBulletList().run();\n    },\n    toggleOrderedList() {\n      editor.chain().focus().toggleOrderedList().run();\n    },\n    toggleBlockquote() {\n      editor.chain().focus().toggleBlockquote().run();\n    },\n    setHorizontalRule() {\n      editor.chain().focus().setHorizontalRule().run();\n    },\n    insertVariable(variable) {\n      if (editor) {\n        const cleanVariable = variable.replace(/^\\s*\\{\\{\\s*/, '').replace(/\\s*\\}\\}\\s*$/, '');\n        editor.chain().focus().insertVariable(cleanVariable).run();\n      }\n    },\n    handleContentImported() {\n      if (editor) {\n        this.convertExistingVariablesToNodes(editor);\n      }\n    },\n    convertExistingVariablesToNodes(editor) {\n      if (!editor || !this.recognizableVariables.length) return;\n\n      // Process the document in multiple passes to avoid position conflicts\n      let hasChanges = true;\n      while (hasChanges) {\n        hasChanges = false;\n\n        const { state } = editor;\n        const { doc } = state;\n        let tr = state.tr;\n\n        // Find the first text node with a variable pattern\n        doc.descendants((node, pos) => {\n          if (hasChanges) return false; // Skip if we already found one to replace\n\n          if (node.isText && node.text) {\n            const text = node.text;\n            const variableRegex = /\\{\\{\\s*(\\w+)\\s*\\}\\}/;\n            const match = variableRegex.exec(text);\n\n            if (match) {\n              const fullMatch = match[0];\n              const variableName = match[1];\n\n              // Check if this is a valid variable\n              if (this.recognizableVariables.some(v => v.replace(/^\\s*\\{\\{\\s*/, '').replace(/\\s*\\}\\}\\s*$/, '') === variableName)) {\n                const from = pos + match.index;\n                const to = pos + match.index + fullMatch.length;\n\n                tr = tr.replaceWith(\n                  from,\n                  to,\n                  editor.schema.nodes.variable.create({ variable: variableName })\n                );\n\n                hasChanges = true;\n                editor.view.dispatch(tr);\n                return false; // Stop iteration\n              }\n            }\n          }\n        });\n      }\n    },\n    insertImageFromFile() {\n      const input = document.createElement(\"input\");\n      input.type = \"file\";\n      input.accept = \"image/*\";\n      input.onchange = (e) => {\n        const file = e.target.files?.[0];\n        if (file) {\n          this.handleImageUpload(file);\n        }\n      };\n      input.click();\n    },\n    handleImageUpload(file) {\n      if (!file.type.startsWith(\"image/\")) {\n        this.uploadError = \"Please select an image file\";\n        setTimeout(() => {\n          this.uploadError = \"\";\n        }, 3000);\n        return;\n      }\n\n      const maxSize = 5 * 1024 * 1024;\n      if (file.size > maxSize) {\n        this.uploadError = \"Image size must be less than 5MB\";\n        setTimeout(() => {\n          this.uploadError = \"\";\n        }, 3000);\n        return;\n      }\n\n      this.isUploading = true;\n      this.uploadError = \"\";\n\n      // Create a temporary form to use HTMX for the upload\n      const tempForm = document.createElement(\"form\");\n      tempForm.style.display = \"none\";\n      tempForm.setAttribute(\"enctype\", \"multipart/form-data\");\n\n      const formData = new FormData();\n      formData.append(\"image\", file);\n\n      // Convert FormData to form inputs\n      for (let [key, value] of formData.entries()) {\n        if (value instanceof File) {\n          const input = document.createElement(\"input\");\n          input.type = \"file\";\n          input.name = key;\n          input.files = this.createFileList(value);\n          tempForm.appendChild(input);\n        } else {\n          const input = document.createElement(\"input\");\n          input.type = \"hidden\";\n          input.name = key;\n          input.value = value;\n          tempForm.appendChild(input);\n        }\n      }\n\n      document.body.appendChild(tempForm);\n\n      // Set up event listeners for HTMX response\n      const handleSuccess = (evt) => {\n        if (evt.detail.elt === tempForm) {\n          try {\n            const data = JSON.parse(evt.detail.xhr.responseText);\n            if (data.success) {\n              // Outlook has no max-width, so a real width attribute is the only\n              // cap it honours. Only for editors whose output is emailed, only\n              // when the upload reported a size, and never upscaling: a small\n              // logo keeps its own width.\n              // Own line, left: a style-less image would sit in the text line,\n              // which is never what someone who just pasted a picture wants.\n              const attrs = { src: data.url, alt: file.name, style: IMAGE_ALIGNMENT_STYLES.left };\n              if (emailColumnWidth && data.width) {\n                attrs.width = Math.min(data.width, emailColumnWidth);\n              }\n              editor.chain().focus().setImage(attrs).run();\n            } else {\n              this.uploadError = data.error || \"Upload failed\";\n              setTimeout(() => {\n                this.uploadError = \"\";\n              }, 5000);\n            }\n          } catch (error) {\n            console.error(\"Upload error:\", error);\n            this.uploadError = \"Failed to parse response\";\n            setTimeout(() => {\n              this.uploadError = \"\";\n            }, 5000);\n          }\n          cleanup();\n        }\n      };\n\n      const handleError = (evt) => {\n        if (evt.detail.elt === tempForm) {\n          console.error(\"Upload error:\", evt.detail);\n          this.uploadError = \"Network error during upload\";\n\n          setTimeout(() => {\n            this.uploadError = \"\";\n          }, 5000);\n          cleanup();\n        }\n      };\n\n      const cleanup = () => {\n        this.isUploading = false;\n        document.removeEventListener(\"htmx:afterRequest\", handleSuccess);\n        document.removeEventListener(\"htmx:responseError\", handleError);\n        if (document.body.contains(tempForm)) {\n          document.body.removeChild(tempForm);\n        }\n      };\n\n      // Add event listeners\n      document.addEventListener(\"htmx:afterRequest\", handleSuccess);\n      document.addEventListener(\"htmx:responseError\", handleError);\n\n      // Use HTMX to submit the form\n      htmx.ajax(\"POST\", \"/shared/upload-image/\", {\n        source: tempForm,\n        swap: \"none\",\n      });\n    },\n    createFileList(file) {\n      const dt = new DataTransfer();\n      dt.items.add(file);\n      return dt.files;\n    },\n    // Import HTML and paste bypass the upload callback, so their images arrive\n    // without the width attribute Outlook needs, or with one wider than the\n    // column. After every change, an email image with no width gets\n    // min(natural width, column) once the browser has it, and a wider one is\n    // capped. Inline width/height go with it: in Outlook the inline size wins.\n    capEmailImageWidths() {\n      if (!emailColumnWidth || !editor) return;\n      // The decision table lives in emailImageWidth.js, one cell per\n      // attribute x inline-width combination, mirrored by the backfill command.\n      const sized = (node, width) => ({ ...node.attrs, width, height: null, style: stripSizeDeclarations(node.attrs.style) });\n      // Capping is per node, in one transaction: two copies of one src may carry different widths.\n      const tr = editor.state.tr;\n      let changed = false;\n      const probes = new Set();\n      editor.state.doc.descendants((node, pos) => {\n        if (node.type.name !== \"image\" || !node.attrs.src) return;\n        const decision = decideEmailImageWidth(node.attrs.width, node.attrs.style, emailColumnWidth);\n        if (decision.action === \"set\") {\n          tr.setNodeMarkup(pos, undefined, sized(node, decision.width));\n          changed = true;\n        } else if (decision.action === \"probe\" && !this.probedImageSrcs.has(node.attrs.src)) {\n          probes.add(node.attrs.src);\n        }\n      });\n      if (changed) editor.view.dispatch(tr);\n      // The natural width arrives later, so it is applied by src, and only to the\n      // copies that still have no width by then.\n      for (const src of probes) {\n        this.probedImageSrcs.add(src);\n        const probe = new window.Image();\n        probe.onload = () => {\n          if (!probe.naturalWidth) return;\n          const width = Math.min(probe.naturalWidth, emailColumnWidth);\n          const later = editor.state.tr;\n          let any = false;\n          editor.state.doc.descendants((node, pos) => {\n            if (node.type.name !== \"image\" || node.attrs.src !== src) return;\n            if (decideEmailImageWidth(node.attrs.width, node.attrs.style, emailColumnWidth).action !== \"probe\") return;\n            later.setNodeMarkup(pos, undefined, sized(node, width));\n            any = true;\n          });\n          if (any) editor.view.dispatch(later);\n        };\n        probe.src = src;\n      }\n    },\n    // Set content from external source (e.g., when switching from GrapeJS editor)\n    setContent(html) {\n      if (!editor) return;\n\n      // Set the content in TipTap editor\n      editor.commands.setContent(html, false);\n      // New content, new images: measure them even if an earlier template used the same URLs.\n      this.probedImageSrcs.clear();\n      this.capEmailImageWidths();\n\n      // Convert any {{ variable }} text patterns to variable nodes\n      this.convertExistingVariablesToNodes(editor);\n\n      // Loaded templates carry their own verdict; the editor drops the comment, so read it here.\n      this.mjmlEligible = hasMjmlStamp(html);\n\n      // Trigger update\n      this.updatedAt = Date.now();\n    },\n\n    // Import HTML: whatever it carried, the body now goes out as pasted, never through MJML.\n    importContent(html) {\n      this.setContent(html);\n      this.mjmlEligible = false;\n    },\n\n    getRawHTML() {\n      // Get raw HTML for saving to database - convert variable nodes back to clean {{ variable_name }} format\n      if (!editor) return \"\";\n\n      let html = editor.getHTML();\n\n      // Parse HTML to DOM for proper manipulation\n      const parser = new DOMParser();\n      const doc = parser.parseFromString(html, \"text/html\");\n\n      // Normalize paragraph spacing for email clients\n      const paragraphs = doc.querySelectorAll('p');\n      paragraphs.forEach(p => {\n        // Add <br> to empty paragraphs for proper email rendering\n        if (!p.textContent.trim() && p.childNodes.length === 0) {\n          p.innerHTML = '<br>';\n        }\n\n        // Add inline CSS to normalize spacing across email clients\n        const existingStyle = p.getAttribute('style') || '';\n        const emailResetStyle = 'margin: 0; padding: 0; line-height: 1.5;';\n\n        // Merge existing styles with email reset styles\n        if (existingStyle) {\n          // If there are existing styles, merge them (email reset takes precedence for spacing)\n          const combinedStyle = existingStyle.replace(/margin[^;]*;?/gi, '').replace(/padding[^;]*;?/gi, '').replace(/line-height[^;]*;?/gi, '');\n          p.setAttribute('style', emailResetStyle + ' ' + combinedStyle.trim());\n        } else {\n          p.setAttribute('style', emailResetStyle);\n        }\n      });\n\n      // Find all variable spans and replace them with their data-variable values\n      const variableSpans = doc.querySelectorAll('span.wysiwyg-variable[data-variable]');\n      variableSpans.forEach(span => {\n        const variableValue = span.getAttribute('data-variable');\n        if (variableValue) {\n          const textNode = doc.createTextNode(`{{ ${variableValue} }}`);\n          span.parentNode.replaceChild(textNode, span);\n        }\n      });\n\n      // Auto-wrap {{ link }} variables with <a> tags for better email rendering\n      let htmlContent = doc.body.innerHTML;\n\n      // More robust link wrapping: only wrap {{ link }} that aren't already in <a> tags\n      const linkPattern = /\\{\\{\\s*link\\s*\\}\\}/g;\n      const matches = [...htmlContent.matchAll(linkPattern)];\n\n      // Process matches in reverse order to avoid position shifts\n      for (const match of matches.reverse()) {\n        const start = match.index;\n        const end = start + match[0].length;\n        const beforeText = htmlContent.substring(0, start);\n        const afterText = htmlContent.substring(end);\n\n        // Check if we're inside an existing <a> tag\n        const lastAOpen = beforeText.lastIndexOf('<a ');\n        const lastAClose = beforeText.lastIndexOf('</a>');\n        const isInsideATag = lastAOpen > lastAClose && lastAOpen !== -1;\n\n        // Check if this is part of href=\"{{ link }}\"\n        const isInHref = beforeText.endsWith('href=\"') && afterText.startsWith('\"');\n\n        // Only wrap if not already inside an <a> tag and not in href attribute\n        if (!isInsideATag && !isInHref) {\n          const wrappedLink = '<a href=\"{{ link }}\">{{ link }}</a>';\n          htmlContent = beforeText + wrappedLink + afterText;\n        }\n      }\n\n      return this.mjmlEligible && htmlContent ? mjmlStamp + htmlContent : htmlContent;\n    },\n\n    async renderPreview() {\n      this.previewIsMjml = this.mjmlEligible;\n      if (!this.previewIsMjml) {\n        this.previewContent = this.getContent();\n        return;\n      }\n      let body;\n      try {\n        body = await this.compileMjml(this.getPreviewBody());\n      } catch (error) {\n        // A broken compiler must not leave the preview empty; fall back to the plain one.\n        console.warn(\"wysiwyg.mjml_preview.failed\", error);\n        this.previewIsMjml = false;\n        this.previewContent = this.getContent();\n        return;\n      }\n      this.previewContent = this.previewLayoutPrefix ? this.previewLayoutPrefix + body + this.previewLayoutSuffix : body;\n    },\n\n    // Browser-only: the server still sends the stored HTML untouched.\n    // Both modules load on first preview only, so the 3MB compiler stays out of the page bundle.\n    async compileMjml(html) {\n      const [{ htmlToMjml }, mjmlModule] = await Promise.all([import(\"./htmlToMjml.mjs\"), import(\"mjml-browser\")]);\n      // Parcel hands the UMD bundle over as module.exports itself, so there is no `default`.\n      const mjml2html = typeof mjmlModule === \"function\" ? mjmlModule : mjmlModule.default;\n      const { html: compiled, errors = [] } = await mjml2html(htmlToMjml(html), { validationLevel: \"soft\" });\n      if (errors.length) console.warn(\"wysiwyg.mjml_preview\", errors);\n      // Keep MJML's <style> blocks next to its body so the layout wrap can go around it.\n      const doc = new DOMParser().parseFromString(compiled, \"text/html\");\n      const styles = [...doc.head.querySelectorAll(\"style\")].map((style) => style.outerHTML).join(\"\");\n      return styles + doc.body.innerHTML;\n    },\n\n    getContent() {\n      let finalContent = this.getPreviewBody();\n\n      // Wrap with the onboarding email layout so the preview mirrors the actually-sent email.\n      if (this.previewLayoutPrefix) {\n        finalContent = this.previewLayoutPrefix + finalContent + this.previewLayoutSuffix;\n      }\n\n      return finalContent;\n    },\n\n    getPreviewBody() {\n      // Local, not this.previewContent: the MJML path awaits after this, and Alpine would render the scratch value.\n      const parser = new DOMParser();\n      const doc = parser.parseFromString(editor ? editor.getHTML() : \"\", \"text/html\");\n\n      const childrenToReturn = [];\n      const children = doc.body.children;\n\n      // well, we can't forEach this, we gotta use a for loop\n      for (let i = 0; i < children.length; i++) {\n        const child = children[i];\n        // each child is a node, a html node, we can use the tagName property to get the type of the node\n        // Images are inline, so an image-only paragraph has empty textContent - don't treat it as blank.\n        if (child.tagName === \"P\" && !child.textContent && !child.querySelector(\"img\")) {\n          // For empty paragraphs in preview, use simple br instead of ProseMirror trailing break\n          child.innerHTML = '<br>';\n          childrenToReturn.push(child);\n        } else {\n          // Handle images for preview mode\n          this.processImagesForPreview(child);\n          // Handle variables for preview mode\n          this.processVariablesForPreview(child);\n          childrenToReturn.push(child);\n        }\n      }\n\n      // Convert back to string and replace variables with styled spans for preview\n      let finalContent = childrenToReturn\n        .map((child) => child.outerHTML)\n        .join(\"\");\n\n      // Replace {{ variable_name }} with styled spans for preview\n      return this.replaceVariablesForPreview(finalContent);\n    },\n\n    processImagesForPreview(element) {\n      // Find all images in the current element and its children\n      const images = element.tagName === \"IMG\" ? [element] : element.querySelectorAll('img');\n\n      images.forEach(img => {\n        // Just add basic responsive constraints - don't touch anything else!\n        img.classList.add('wysiwyg-preview-image');\n      });\n    },\n\n    processVariablesForPreview(element) {\n      // Find all variable nodes in the current element and its children\n      const variables = element.classList && element.classList.contains('wysiwyg-variable')\n        ? [element]\n        : element.querySelectorAll('.wysiwyg-variable[data-variable]');\n\n      variables.forEach(variable => {\n        const variableName = variable.getAttribute('data-variable');\n\n        // Remove variable styling classes to unstyled variables in preview\n        variable.classList.remove('wysiwyg-variable');\n        variable.removeAttribute('data-variable');\n\n        if (variableName && this.previewFillers[variableName]) {\n          // Replace the entire variable node content with the preview value\n          variable.innerHTML = this.previewFillers[variableName];\n        } else {\n          // Keep the original {{ variable_name }} format but without styling\n          variable.innerHTML = `{{ ${variableName} }}`;\n        }\n      });\n    },\n\n    replaceVariablesForPreview(content) {\n      // Replace {{ variable_name }} with styled spans\n      return content.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (_, variableName) => {\n        const previewValue =\n          this.previewFillers[variableName] || `{{ ${variableName} }}`;\n        return previewValue;\n      });\n    },\n\n    destroy() {\n      if (imageResizer) {\n        imageResizer.destroy();\n        imageResizer = null;\n      }\n      if (editor) {\n        editor.destroy();\n        editor = null;\n      }\n    },\n  };\n};\n","import { Plugin, PluginKey, TextSelection, Selection, AllSelection, NodeSelection, EditorState } from '@tiptap/pm/state';\nimport { EditorView } from '@tiptap/pm/view';\nimport { keymap } from '@tiptap/pm/keymap';\nimport { Schema, DOMSerializer, Fragment, Node as Node$1, DOMParser, Slice } from '@tiptap/pm/model';\nimport { liftTarget, ReplaceStep, ReplaceAroundStep, joinPoint, Transform, canSplit, canJoin, findWrapping } from '@tiptap/pm/transform';\nimport { createParagraphNear as createParagraphNear$1, deleteSelection as deleteSelection$1, exitCode as exitCode$1, joinUp as joinUp$1, joinDown as joinDown$1, joinBackward as joinBackward$1, joinForward as joinForward$1, joinTextblockBackward as joinTextblockBackward$1, joinTextblockForward as joinTextblockForward$1, lift as lift$1, liftEmptyBlock as liftEmptyBlock$1, newlineInCode as newlineInCode$1, selectNodeBackward as selectNodeBackward$1, selectNodeForward as selectNodeForward$1, selectParentNode as selectParentNode$1, selectTextblockEnd as selectTextblockEnd$1, selectTextblockStart as selectTextblockStart$1, setBlockType, wrapIn as wrapIn$1 } from '@tiptap/pm/commands';\nimport { liftListItem as liftListItem$1, sinkListItem as sinkListItem$1, wrapInList as wrapInList$1 } from '@tiptap/pm/schema-list';\n\n/**\n * Takes a Transaction & Editor State and turns it into a chainable state object\n * @param config The transaction and state to create the chainable state from\n * @returns A chainable Editor state object\n */\nfunction createChainableState(config) {\n    const { state, transaction } = config;\n    let { selection } = transaction;\n    let { doc } = transaction;\n    let { storedMarks } = transaction;\n    return {\n        ...state,\n        apply: state.apply.bind(state),\n        applyTransaction: state.applyTransaction.bind(state),\n        plugins: state.plugins,\n        schema: state.schema,\n        reconfigure: state.reconfigure.bind(state),\n        toJSON: state.toJSON.bind(state),\n        get storedMarks() {\n            return storedMarks;\n        },\n        get selection() {\n            return selection;\n        },\n        get doc() {\n            return doc;\n        },\n        get tr() {\n            selection = transaction.selection;\n            doc = transaction.doc;\n            storedMarks = transaction.storedMarks;\n            return transaction;\n        },\n    };\n}\n\nclass CommandManager {\n    constructor(props) {\n        this.editor = props.editor;\n        this.rawCommands = this.editor.extensionManager.commands;\n        this.customState = props.state;\n    }\n    get hasCustomState() {\n        return !!this.customState;\n    }\n    get state() {\n        return this.customState || this.editor.state;\n    }\n    get commands() {\n        const { rawCommands, editor, state } = this;\n        const { view } = editor;\n        const { tr } = state;\n        const props = this.buildProps(tr);\n        return Object.fromEntries(Object.entries(rawCommands).map(([name, command]) => {\n            const method = (...args) => {\n                const callback = command(...args)(props);\n                if (!tr.getMeta('preventDispatch') && !this.hasCustomState) {\n                    view.dispatch(tr);\n                }\n                return callback;\n            };\n            return [name, method];\n        }));\n    }\n    get chain() {\n        return () => this.createChain();\n    }\n    get can() {\n        return () => this.createCan();\n    }\n    createChain(startTr, shouldDispatch = true) {\n        const { rawCommands, editor, state } = this;\n        const { view } = editor;\n        const callbacks = [];\n        const hasStartTransaction = !!startTr;\n        const tr = startTr || state.tr;\n        const run = () => {\n            if (!hasStartTransaction\n                && shouldDispatch\n                && !tr.getMeta('preventDispatch')\n                && !this.hasCustomState) {\n                view.dispatch(tr);\n            }\n            return callbacks.every(callback => callback === true);\n        };\n        const chain = {\n            ...Object.fromEntries(Object.entries(rawCommands).map(([name, command]) => {\n                const chainedCommand = (...args) => {\n                    const props = this.buildProps(tr, shouldDispatch);\n                    const callback = command(...args)(props);\n                    callbacks.push(callback);\n                    return chain;\n                };\n                return [name, chainedCommand];\n            })),\n            run,\n        };\n        return chain;\n    }\n    createCan(startTr) {\n        const { rawCommands, state } = this;\n        const dispatch = false;\n        const tr = startTr || state.tr;\n        const props = this.buildProps(tr, dispatch);\n        const formattedCommands = Object.fromEntries(Object.entries(rawCommands).map(([name, command]) => {\n            return [name, (...args) => command(...args)({ ...props, dispatch: undefined })];\n        }));\n        return {\n            ...formattedCommands,\n            chain: () => this.createChain(tr, dispatch),\n        };\n    }\n    buildProps(tr, shouldDispatch = true) {\n        const { rawCommands, editor, state } = this;\n        const { view } = editor;\n        const props = {\n            tr,\n            editor,\n            view,\n            state: createChainableState({\n                state,\n                transaction: tr,\n            }),\n            dispatch: shouldDispatch ? () => undefined : undefined,\n            chain: () => this.createChain(tr, shouldDispatch),\n            can: () => this.createCan(tr),\n            get commands() {\n                return Object.fromEntries(Object.entries(rawCommands).map(([name, command]) => {\n                    return [name, (...args) => command(...args)(props)];\n                }));\n            },\n        };\n        return props;\n    }\n}\n\nclass EventEmitter {\n    constructor() {\n        this.callbacks = {};\n    }\n    on(event, fn) {\n        if (!this.callbacks[event]) {\n            this.callbacks[event] = [];\n        }\n        this.callbacks[event].push(fn);\n        return this;\n    }\n    emit(event, ...args) {\n        const callbacks = this.callbacks[event];\n        if (callbacks) {\n            callbacks.forEach(callback => callback.apply(this, args));\n        }\n        return this;\n    }\n    off(event, fn) {\n        const callbacks = this.callbacks[event];\n        if (callbacks) {\n            if (fn) {\n                this.callbacks[event] = callbacks.filter(callback => callback !== fn);\n            }\n            else {\n                delete this.callbacks[event];\n            }\n        }\n        return this;\n    }\n    once(event, fn) {\n        const onceFn = (...args) => {\n            this.off(event, onceFn);\n            fn.apply(this, args);\n        };\n        return this.on(event, onceFn);\n    }\n    removeAllListeners() {\n        this.callbacks = {};\n    }\n}\n\n/**\n * Returns a field from an extension\n * @param extension The Tiptap extension\n * @param field The field, for example `renderHTML` or `priority`\n * @param context The context object that should be passed as `this` into the function\n * @returns The field value\n */\nfunction getExtensionField(extension, field, context) {\n    if (extension.config[field] === undefined && extension.parent) {\n        return getExtensionField(extension.parent, field, context);\n    }\n    if (typeof extension.config[field] === 'function') {\n        const value = extension.config[field].bind({\n            ...context,\n            parent: extension.parent\n                ? getExtensionField(extension.parent, field, context)\n                : null,\n        });\n        return value;\n    }\n    return extension.config[field];\n}\n\nfunction splitExtensions(extensions) {\n    const baseExtensions = extensions.filter(extension => extension.type === 'extension');\n    const nodeExtensions = extensions.filter(extension => extension.type === 'node');\n    const markExtensions = extensions.filter(extension => extension.type === 'mark');\n    return {\n        baseExtensions,\n        nodeExtensions,\n        markExtensions,\n    };\n}\n\n/**\n * Get a list of all extension attributes defined in `addAttribute` and `addGlobalAttribute`.\n * @param extensions List of extensions\n */\nfunction getAttributesFromExtensions(extensions) {\n    const extensionAttributes = [];\n    const { nodeExtensions, markExtensions } = splitExtensions(extensions);\n    const nodeAndMarkExtensions = [...nodeExtensions, ...markExtensions];\n    const defaultAttribute = {\n        default: null,\n        rendered: true,\n        renderHTML: null,\n        parseHTML: null,\n        keepOnSplit: true,\n        isRequired: false,\n    };\n    extensions.forEach(extension => {\n        const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage,\n            extensions: nodeAndMarkExtensions,\n        };\n        const addGlobalAttributes = getExtensionField(extension, 'addGlobalAttributes', context);\n        if (!addGlobalAttributes) {\n            return;\n        }\n        const globalAttributes = addGlobalAttributes();\n        globalAttributes.forEach(globalAttribute => {\n            globalAttribute.types.forEach(type => {\n                Object\n                    .entries(globalAttribute.attributes)\n                    .forEach(([name, attribute]) => {\n                    extensionAttributes.push({\n                        type,\n                        name,\n                        attribute: {\n                            ...defaultAttribute,\n                            ...attribute,\n                        },\n                    });\n                });\n            });\n        });\n    });\n    nodeAndMarkExtensions.forEach(extension => {\n        const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage,\n        };\n        const addAttributes = getExtensionField(extension, 'addAttributes', context);\n        if (!addAttributes) {\n            return;\n        }\n        // TODO: remove `as Attributes`\n        const attributes = addAttributes();\n        Object\n            .entries(attributes)\n            .forEach(([name, attribute]) => {\n            const mergedAttr = {\n                ...defaultAttribute,\n                ...attribute,\n            };\n            if (typeof (mergedAttr === null || mergedAttr === void 0 ? void 0 : mergedAttr.default) === 'function') {\n                mergedAttr.default = mergedAttr.default();\n            }\n            if ((mergedAttr === null || mergedAttr === void 0 ? void 0 : mergedAttr.isRequired) && (mergedAttr === null || mergedAttr === void 0 ? void 0 : mergedAttr.default) === undefined) {\n                delete mergedAttr.default;\n            }\n            extensionAttributes.push({\n                type: extension.name,\n                name,\n                attribute: mergedAttr,\n            });\n        });\n    });\n    return extensionAttributes;\n}\n\nfunction getNodeType(nameOrType, schema) {\n    if (typeof nameOrType === 'string') {\n        if (!schema.nodes[nameOrType]) {\n            throw Error(`There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`);\n        }\n        return schema.nodes[nameOrType];\n    }\n    return nameOrType;\n}\n\nfunction mergeAttributes(...objects) {\n    return objects\n        .filter(item => !!item)\n        .reduce((items, item) => {\n        const mergedAttributes = { ...items };\n        Object.entries(item).forEach(([key, value]) => {\n            const exists = mergedAttributes[key];\n            if (!exists) {\n                mergedAttributes[key] = value;\n                return;\n            }\n            if (key === 'class') {\n                const valueClasses = value ? String(value).split(' ') : [];\n                const existingClasses = mergedAttributes[key] ? mergedAttributes[key].split(' ') : [];\n                const insertClasses = valueClasses.filter(valueClass => !existingClasses.includes(valueClass));\n                mergedAttributes[key] = [...existingClasses, ...insertClasses].join(' ');\n            }\n            else if (key === 'style') {\n                const newStyles = value ? value.split(';').map((style) => style.trim()).filter(Boolean) : [];\n                const existingStyles = mergedAttributes[key] ? mergedAttributes[key].split(';').map((style) => style.trim()).filter(Boolean) : [];\n                const styleMap = new Map();\n                existingStyles.forEach(style => {\n                    const [property, val] = style.split(':').map(part => part.trim());\n                    styleMap.set(property, val);\n                });\n                newStyles.forEach(style => {\n                    const [property, val] = style.split(':').map(part => part.trim());\n                    styleMap.set(property, val);\n                });\n                mergedAttributes[key] = Array.from(styleMap.entries()).map(([property, val]) => `${property}: ${val}`).join('; ');\n            }\n            else {\n                mergedAttributes[key] = value;\n            }\n        });\n        return mergedAttributes;\n    }, {});\n}\n\nfunction getRenderedAttributes(nodeOrMark, extensionAttributes) {\n    return extensionAttributes\n        .filter(attribute => attribute.type === nodeOrMark.type.name)\n        .filter(item => item.attribute.rendered)\n        .map(item => {\n        if (!item.attribute.renderHTML) {\n            return {\n                [item.name]: nodeOrMark.attrs[item.name],\n            };\n        }\n        return item.attribute.renderHTML(nodeOrMark.attrs) || {};\n    })\n        .reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {});\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nfunction isFunction(value) {\n    return typeof value === 'function';\n}\n\n/**\n * Optionally calls `value` as a function.\n * Otherwise it is returned directly.\n * @param value Function or any value.\n * @param context Optional context to bind to function.\n * @param props Optional props to pass to function.\n */\nfunction callOrReturn(value, context = undefined, ...props) {\n    if (isFunction(value)) {\n        if (context) {\n            return value.bind(context)(...props);\n        }\n        return value(...props);\n    }\n    return value;\n}\n\nfunction isEmptyObject(value = {}) {\n    return Object.keys(value).length === 0 && value.constructor === Object;\n}\n\nfunction fromString(value) {\n    if (typeof value !== 'string') {\n        return value;\n    }\n    if (value.match(/^[+-]?(?:\\d*\\.)?\\d+$/)) {\n        return Number(value);\n    }\n    if (value === 'true') {\n        return true;\n    }\n    if (value === 'false') {\n        return false;\n    }\n    return value;\n}\n\n/**\n * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`).\n * Cancels when `getAttrs` returned `false`.\n * @param parseRule ProseMirror ParseRule\n * @param extensionAttributes List of attributes to inject\n */\nfunction injectExtensionAttributesToParseRule(parseRule, extensionAttributes) {\n    if ('style' in parseRule) {\n        return parseRule;\n    }\n    return {\n        ...parseRule,\n        getAttrs: (node) => {\n            const oldAttributes = parseRule.getAttrs ? parseRule.getAttrs(node) : parseRule.attrs;\n            if (oldAttributes === false) {\n                return false;\n            }\n            const newAttributes = extensionAttributes.reduce((items, item) => {\n                const value = item.attribute.parseHTML\n                    ? item.attribute.parseHTML(node)\n                    : fromString((node).getAttribute(item.name));\n                if (value === null || value === undefined) {\n                    return items;\n                }\n                return {\n                    ...items,\n                    [item.name]: value,\n                };\n            }, {});\n            return { ...oldAttributes, ...newAttributes };\n        },\n    };\n}\n\nfunction cleanUpSchemaItem(data) {\n    return Object.fromEntries(\n    // @ts-ignore\n    Object.entries(data).filter(([key, value]) => {\n        if (key === 'attrs' && isEmptyObject(value)) {\n            return false;\n        }\n        return value !== null && value !== undefined;\n    }));\n}\n/**\n * Creates a new Prosemirror schema based on the given extensions.\n * @param extensions An array of Tiptap extensions\n * @param editor The editor instance\n * @returns A Prosemirror schema\n */\nfunction getSchemaByResolvedExtensions(extensions, editor) {\n    var _a;\n    const allAttributes = getAttributesFromExtensions(extensions);\n    const { nodeExtensions, markExtensions } = splitExtensions(extensions);\n    const topNode = (_a = nodeExtensions.find(extension => getExtensionField(extension, 'topNode'))) === null || _a === void 0 ? void 0 : _a.name;\n    const nodes = Object.fromEntries(nodeExtensions.map(extension => {\n        const extensionAttributes = allAttributes.filter(attribute => attribute.type === extension.name);\n        const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage,\n            editor,\n        };\n        const extraNodeFields = extensions.reduce((fields, e) => {\n            const extendNodeSchema = getExtensionField(e, 'extendNodeSchema', context);\n            return {\n                ...fields,\n                ...(extendNodeSchema ? extendNodeSchema(extension) : {}),\n            };\n        }, {});\n        const schema = cleanUpSchemaItem({\n            ...extraNodeFields,\n            content: callOrReturn(getExtensionField(extension, 'content', context)),\n            marks: callOrReturn(getExtensionField(extension, 'marks', context)),\n            group: callOrReturn(getExtensionField(extension, 'group', context)),\n            inline: callOrReturn(getExtensionField(extension, 'inline', context)),\n            atom: callOrReturn(getExtensionField(extension, 'atom', context)),\n            selectable: callOrReturn(getExtensionField(extension, 'selectable', context)),\n            draggable: callOrReturn(getExtensionField(extension, 'draggable', context)),\n            code: callOrReturn(getExtensionField(extension, 'code', context)),\n            whitespace: callOrReturn(getExtensionField(extension, 'whitespace', context)),\n            linebreakReplacement: callOrReturn(getExtensionField(extension, 'linebreakReplacement', context)),\n            defining: callOrReturn(getExtensionField(extension, 'defining', context)),\n            isolating: callOrReturn(getExtensionField(extension, 'isolating', context)),\n            attrs: Object.fromEntries(extensionAttributes.map(extensionAttribute => {\n                var _a;\n                return [extensionAttribute.name, { default: (_a = extensionAttribute === null || extensionAttribute === void 0 ? void 0 : extensionAttribute.attribute) === null || _a === void 0 ? void 0 : _a.default }];\n            })),\n        });\n        const parseHTML = callOrReturn(getExtensionField(extension, 'parseHTML', context));\n        if (parseHTML) {\n            schema.parseDOM = parseHTML.map(parseRule => injectExtensionAttributesToParseRule(parseRule, extensionAttributes));\n        }\n        const renderHTML = getExtensionField(extension, 'renderHTML', context);\n        if (renderHTML) {\n            schema.toDOM = node => renderHTML({\n                node,\n                HTMLAttributes: getRenderedAttributes(node, extensionAttributes),\n            });\n        }\n        const renderText = getExtensionField(extension, 'renderText', context);\n        if (renderText) {\n            schema.toText = renderText;\n        }\n        return [extension.name, schema];\n    }));\n    const marks = Object.fromEntries(markExtensions.map(extension => {\n        const extensionAttributes = allAttributes.filter(attribute => attribute.type === extension.name);\n        const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage,\n            editor,\n        };\n        const extraMarkFields = extensions.reduce((fields, e) => {\n            const extendMarkSchema = getExtensionField(e, 'extendMarkSchema', context);\n            return {\n                ...fields,\n                ...(extendMarkSchema ? extendMarkSchema(extension) : {}),\n            };\n        }, {});\n        const schema = cleanUpSchemaItem({\n            ...extraMarkFields,\n            inclusive: callOrReturn(getExtensionField(extension, 'inclusive', context)),\n            excludes: callOrReturn(getExtensionField(extension, 'excludes', context)),\n            group: callOrReturn(getExtensionField(extension, 'group', context)),\n            spanning: callOrReturn(getExtensionField(extension, 'spanning', context)),\n            code: callOrReturn(getExtensionField(extension, 'code', context)),\n            attrs: Object.fromEntries(extensionAttributes.map(extensionAttribute => {\n                var _a;\n                return [extensionAttribute.name, { default: (_a = extensionAttribute === null || extensionAttribute === void 0 ? void 0 : extensionAttribute.attribute) === null || _a === void 0 ? void 0 : _a.default }];\n            })),\n        });\n        const parseHTML = callOrReturn(getExtensionField(extension, 'parseHTML', context));\n        if (parseHTML) {\n            schema.parseDOM = parseHTML.map(parseRule => injectExtensionAttributesToParseRule(parseRule, extensionAttributes));\n        }\n        const renderHTML = getExtensionField(extension, 'renderHTML', context);\n        if (renderHTML) {\n            schema.toDOM = mark => renderHTML({\n                mark,\n                HTMLAttributes: getRenderedAttributes(mark, extensionAttributes),\n            });\n        }\n        return [extension.name, schema];\n    }));\n    return new Schema({\n        topNode,\n        nodes,\n        marks,\n    });\n}\n\n/**\n * Tries to get a node or mark type by its name.\n * @param name The name of the node or mark type\n * @param schema The Prosemiror schema to search in\n * @returns The node or mark type, or null if it doesn't exist\n */\nfunction getSchemaTypeByName(name, schema) {\n    return schema.nodes[name] || schema.marks[name] || null;\n}\n\nfunction isExtensionRulesEnabled(extension, enabled) {\n    if (Array.isArray(enabled)) {\n        return enabled.some(enabledExtension => {\n            const name = typeof enabledExtension === 'string'\n                ? enabledExtension\n                : enabledExtension.name;\n            return name === extension.name;\n        });\n    }\n    return enabled;\n}\n\nfunction getHTMLFromFragment(fragment, schema) {\n    const documentFragment = DOMSerializer.fromSchema(schema).serializeFragment(fragment);\n    const temporaryDocument = document.implementation.createHTMLDocument();\n    const container = temporaryDocument.createElement('div');\n    container.appendChild(documentFragment);\n    return container.innerHTML;\n}\n\n/**\n * Returns the text content of a resolved prosemirror position\n * @param $from The resolved position to get the text content from\n * @param maxMatch The maximum number of characters to match\n * @returns The text content\n */\nconst getTextContentFromNodes = ($from, maxMatch = 500) => {\n    let textBefore = '';\n    const sliceEndPos = $from.parentOffset;\n    $from.parent.nodesBetween(Math.max(0, sliceEndPos - maxMatch), sliceEndPos, (node, pos, parent, index) => {\n        var _a, _b;\n        const chunk = ((_b = (_a = node.type.spec).toText) === null || _b === void 0 ? void 0 : _b.call(_a, {\n            node,\n            pos,\n            parent,\n            index,\n        }))\n            || node.textContent\n            || '%leaf%';\n        textBefore += node.isAtom && !node.isText ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos));\n    });\n    return textBefore;\n};\n\nfunction isRegExp(value) {\n    return Object.prototype.toString.call(value) === '[object RegExp]';\n}\n\nclass InputRule {\n    constructor(config) {\n        this.find = config.find;\n        this.handler = config.handler;\n    }\n}\nconst inputRuleMatcherHandler = (text, find) => {\n    if (isRegExp(find)) {\n        return find.exec(text);\n    }\n    const inputRuleMatch = find(text);\n    if (!inputRuleMatch) {\n        return null;\n    }\n    const result = [inputRuleMatch.text];\n    result.index = inputRuleMatch.index;\n    result.input = text;\n    result.data = inputRuleMatch.data;\n    if (inputRuleMatch.replaceWith) {\n        if (!inputRuleMatch.text.includes(inputRuleMatch.replaceWith)) {\n            console.warn('[tiptap warn]: \"inputRuleMatch.replaceWith\" must be part of \"inputRuleMatch.text\".');\n        }\n        result.push(inputRuleMatch.replaceWith);\n    }\n    return result;\n};\nfunction run$1(config) {\n    var _a;\n    const { editor, from, to, text, rules, plugin, } = config;\n    const { view } = editor;\n    if (view.composing) {\n        return false;\n    }\n    const $from = view.state.doc.resolve(from);\n    if (\n    // check for code node\n    $from.parent.type.spec.code\n        // check for code mark\n        || !!((_a = ($from.nodeBefore || $from.nodeAfter)) === null || _a === void 0 ? void 0 : _a.marks.find(mark => mark.type.spec.code))) {\n        return false;\n    }\n    let matched = false;\n    const textBefore = getTextContentFromNodes($from) + text;\n    rules.forEach(rule => {\n        if (matched) {\n            return;\n        }\n        const match = inputRuleMatcherHandler(textBefore, rule.find);\n        if (!match) {\n            return;\n        }\n        const tr = view.state.tr;\n        const state = createChainableState({\n            state: view.state,\n            transaction: tr,\n        });\n        const range = {\n            from: from - (match[0].length - text.length),\n            to,\n        };\n        const { commands, chain, can } = new CommandManager({\n            editor,\n            state,\n        });\n        const handler = rule.handler({\n            state,\n            range,\n            match,\n            commands,\n            chain,\n            can,\n        });\n        // stop if there are no changes\n        if (handler === null || !tr.steps.length) {\n            return;\n        }\n        // store transform as meta data\n        // so we can undo input rules within the `undoInputRules` command\n        tr.setMeta(plugin, {\n            transform: tr,\n            from,\n            to,\n            text,\n        });\n        view.dispatch(tr);\n        matched = true;\n    });\n    return matched;\n}\n/**\n * Create an input rules plugin. When enabled, it will cause text\n * input that matches any of the given rules to trigger the rule’s\n * action.\n */\nfunction inputRulesPlugin(props) {\n    const { editor, rules } = props;\n    const plugin = new Plugin({\n        state: {\n            init() {\n                return null;\n            },\n            apply(tr, prev, state) {\n                const stored = tr.getMeta(plugin);\n                if (stored) {\n                    return stored;\n                }\n                // if InputRule is triggered by insertContent()\n                const simulatedInputMeta = tr.getMeta('applyInputRules');\n                const isSimulatedInput = !!simulatedInputMeta;\n                if (isSimulatedInput) {\n                    setTimeout(() => {\n                        let { text } = simulatedInputMeta;\n                        if (typeof text === 'string') {\n                            text = text;\n                        }\n                        else {\n                            text = getHTMLFromFragment(Fragment.from(text), state.schema);\n                        }\n                        const { from } = simulatedInputMeta;\n                        const to = from + text.length;\n                        run$1({\n                            editor,\n                            from,\n                            to,\n                            text,\n                            rules,\n                            plugin,\n                        });\n                    });\n                }\n                return tr.selectionSet || tr.docChanged ? null : prev;\n            },\n        },\n        props: {\n            handleTextInput(view, from, to, text) {\n                return run$1({\n                    editor,\n                    from,\n                    to,\n                    text,\n                    rules,\n                    plugin,\n                });\n            },\n            handleDOMEvents: {\n                compositionend: view => {\n                    setTimeout(() => {\n                        const { $cursor } = view.state.selection;\n                        if ($cursor) {\n                            run$1({\n                                editor,\n                                from: $cursor.pos,\n                                to: $cursor.pos,\n                                text: '',\n                                rules,\n                                plugin,\n                            });\n                        }\n                    });\n                    return false;\n                },\n            },\n            // add support for input rules to trigger on enter\n            // this is useful for example for code blocks\n            handleKeyDown(view, event) {\n                if (event.key !== 'Enter') {\n                    return false;\n                }\n                const { $cursor } = view.state.selection;\n                if ($cursor) {\n                    return run$1({\n                        editor,\n                        from: $cursor.pos,\n                        to: $cursor.pos,\n                        text: '\\n',\n                        rules,\n                        plugin,\n                    });\n                }\n                return false;\n            },\n        },\n        // @ts-ignore\n        isInputRules: true,\n    });\n    return plugin;\n}\n\n// see: https://github.com/mesqueeb/is-what/blob/88d6e4ca92fb2baab6003c54e02eedf4e729e5ab/src/index.ts\nfunction getType(value) {\n    return Object.prototype.toString.call(value).slice(8, -1);\n}\nfunction isPlainObject(value) {\n    if (getType(value) !== 'Object') {\n        return false;\n    }\n    return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype;\n}\n\nfunction mergeDeep(target, source) {\n    const output = { ...target };\n    if (isPlainObject(target) && isPlainObject(source)) {\n        Object.keys(source).forEach(key => {\n            if (isPlainObject(source[key]) && isPlainObject(target[key])) {\n                output[key] = mergeDeep(target[key], source[key]);\n            }\n            else {\n                output[key] = source[key];\n            }\n        });\n    }\n    return output;\n}\n\n/**\n * The Mark class is used to create custom mark extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nclass Mark {\n    constructor(config = {}) {\n        this.type = 'mark';\n        this.name = 'mark';\n        this.parent = null;\n        this.child = null;\n        this.config = {\n            name: this.name,\n            defaultOptions: {},\n        };\n        this.config = {\n            ...this.config,\n            ...config,\n        };\n        this.name = this.config.name;\n        if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) {\n            console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${this.name}\".`);\n        }\n        // TODO: remove `addOptions` fallback\n        this.options = this.config.defaultOptions;\n        if (this.config.addOptions) {\n            this.options = callOrReturn(getExtensionField(this, 'addOptions', {\n                name: this.name,\n            }));\n        }\n        this.storage = callOrReturn(getExtensionField(this, 'addStorage', {\n            name: this.name,\n            options: this.options,\n        })) || {};\n    }\n    static create(config = {}) {\n        return new Mark(config);\n    }\n    configure(options = {}) {\n        // return a new instance so we can use the same extension\n        // with different calls of `configure`\n        const extension = this.extend({\n            ...this.config,\n            addOptions: () => {\n                return mergeDeep(this.options, options);\n            },\n        });\n        // Always preserve the current name\n        extension.name = this.name;\n        // Set the parent to be our parent\n        extension.parent = this.parent;\n        return extension;\n    }\n    extend(extendedConfig = {}) {\n        const extension = new Mark(extendedConfig);\n        extension.parent = this;\n        this.child = extension;\n        extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name;\n        if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) {\n            console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${extension.name}\".`);\n        }\n        extension.options = callOrReturn(getExtensionField(extension, 'addOptions', {\n            name: extension.name,\n        }));\n        extension.storage = callOrReturn(getExtensionField(extension, 'addStorage', {\n            name: extension.name,\n            options: extension.options,\n        }));\n        return extension;\n    }\n    static handleExit({ editor, mark }) {\n        const { tr } = editor.state;\n        const currentPos = editor.state.selection.$from;\n        const isAtEnd = currentPos.pos === currentPos.end();\n        if (isAtEnd) {\n            const currentMarks = currentPos.marks();\n            const isInMark = !!currentMarks.find(m => (m === null || m === void 0 ? void 0 : m.type.name) === mark.name);\n            if (!isInMark) {\n                return false;\n            }\n            const removeMark = currentMarks.find(m => (m === null || m === void 0 ? void 0 : m.type.name) === mark.name);\n            if (removeMark) {\n                tr.removeStoredMark(removeMark);\n            }\n            tr.insertText(' ', currentPos.pos);\n            editor.view.dispatch(tr);\n            return true;\n        }\n        return false;\n    }\n}\n\nfunction isNumber(value) {\n    return typeof value === 'number';\n}\n\n/**\n * Paste rules are used to react to pasted content.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nclass PasteRule {\n    constructor(config) {\n        this.find = config.find;\n        this.handler = config.handler;\n    }\n}\nconst pasteRuleMatcherHandler = (text, find, event) => {\n    if (isRegExp(find)) {\n        return [...text.matchAll(find)];\n    }\n    const matches = find(text, event);\n    if (!matches) {\n        return [];\n    }\n    return matches.map(pasteRuleMatch => {\n        const result = [pasteRuleMatch.text];\n        result.index = pasteRuleMatch.index;\n        result.input = text;\n        result.data = pasteRuleMatch.data;\n        if (pasteRuleMatch.replaceWith) {\n            if (!pasteRuleMatch.text.includes(pasteRuleMatch.replaceWith)) {\n                console.warn('[tiptap warn]: \"pasteRuleMatch.replaceWith\" must be part of \"pasteRuleMatch.text\".');\n            }\n            result.push(pasteRuleMatch.replaceWith);\n        }\n        return result;\n    });\n};\nfunction run(config) {\n    const { editor, state, from, to, rule, pasteEvent, dropEvent, } = config;\n    const { commands, chain, can } = new CommandManager({\n        editor,\n        state,\n    });\n    const handlers = [];\n    state.doc.nodesBetween(from, to, (node, pos) => {\n        if (!node.isTextblock || node.type.spec.code) {\n            return;\n        }\n        const resolvedFrom = Math.max(from, pos);\n        const resolvedTo = Math.min(to, pos + node.content.size);\n        const textToMatch = node.textBetween(resolvedFrom - pos, resolvedTo - pos, undefined, '\\ufffc');\n        const matches = pasteRuleMatcherHandler(textToMatch, rule.find, pasteEvent);\n        matches.forEach(match => {\n            if (match.index === undefined) {\n                return;\n            }\n            const start = resolvedFrom + match.index + 1;\n            const end = start + match[0].length;\n            const range = {\n                from: state.tr.mapping.map(start),\n                to: state.tr.mapping.map(end),\n            };\n            const handler = rule.handler({\n                state,\n                range,\n                match,\n                commands,\n                chain,\n                can,\n                pasteEvent,\n                dropEvent,\n            });\n            handlers.push(handler);\n        });\n    });\n    const success = handlers.every(handler => handler !== null);\n    return success;\n}\n// When dragging across editors, must get another editor instance to delete selection content.\nlet tiptapDragFromOtherEditor = null;\nconst createClipboardPasteEvent = (text) => {\n    var _a;\n    const event = new ClipboardEvent('paste', {\n        clipboardData: new DataTransfer(),\n    });\n    (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.setData('text/html', text);\n    return event;\n};\n/**\n * Create an paste rules plugin. When enabled, it will cause pasted\n * text that matches any of the given rules to trigger the rule’s\n * action.\n */\nfunction pasteRulesPlugin(props) {\n    const { editor, rules } = props;\n    let dragSourceElement = null;\n    let isPastedFromProseMirror = false;\n    let isDroppedFromProseMirror = false;\n    let pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null;\n    let dropEvent;\n    try {\n        dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;\n    }\n    catch {\n        dropEvent = null;\n    }\n    const processEvent = ({ state, from, to, rule, pasteEvt, }) => {\n        const tr = state.tr;\n        const chainableState = createChainableState({\n            state,\n            transaction: tr,\n        });\n        const handler = run({\n            editor,\n            state: chainableState,\n            from: Math.max(from - 1, 0),\n            to: to.b - 1,\n            rule,\n            pasteEvent: pasteEvt,\n            dropEvent,\n        });\n        if (!handler || !tr.steps.length) {\n            return;\n        }\n        try {\n            dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;\n        }\n        catch {\n            dropEvent = null;\n        }\n        pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null;\n        return tr;\n    };\n    const plugins = rules.map(rule => {\n        return new Plugin({\n            // we register a global drag handler to track the current drag source element\n            view(view) {\n                const handleDragstart = (event) => {\n                    var _a;\n                    dragSourceElement = ((_a = view.dom.parentElement) === null || _a === void 0 ? void 0 : _a.contains(event.target))\n                        ? view.dom.parentElement\n                        : null;\n                    if (dragSourceElement) {\n                        tiptapDragFromOtherEditor = editor;\n                    }\n                };\n                const handleDragend = () => {\n                    if (tiptapDragFromOtherEditor) {\n                        tiptapDragFromOtherEditor = null;\n                    }\n                };\n                window.addEventListener('dragstart', handleDragstart);\n                window.addEventListener('dragend', handleDragend);\n                return {\n                    destroy() {\n                        window.removeEventListener('dragstart', handleDragstart);\n                        window.removeEventListener('dragend', handleDragend);\n                    },\n                };\n            },\n            props: {\n                handleDOMEvents: {\n                    drop: (view, event) => {\n                        isDroppedFromProseMirror = dragSourceElement === view.dom.parentElement;\n                        dropEvent = event;\n                        if (!isDroppedFromProseMirror) {\n                            const dragFromOtherEditor = tiptapDragFromOtherEditor;\n                            if (dragFromOtherEditor === null || dragFromOtherEditor === void 0 ? void 0 : dragFromOtherEditor.isEditable) {\n                                // setTimeout to avoid the wrong content after drop, timeout arg can't be empty or 0\n                                setTimeout(() => {\n                                    const selection = dragFromOtherEditor.state.selection;\n                                    if (selection) {\n                                        dragFromOtherEditor.commands.deleteRange({ from: selection.from, to: selection.to });\n                                    }\n                                }, 10);\n                            }\n                        }\n                        return false;\n                    },\n                    paste: (_view, event) => {\n                        var _a;\n                        const html = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text/html');\n                        pasteEvent = event;\n                        isPastedFromProseMirror = !!(html === null || html === void 0 ? void 0 : html.includes('data-pm-slice'));\n                        return false;\n                    },\n                },\n            },\n            appendTransaction: (transactions, oldState, state) => {\n                const transaction = transactions[0];\n                const isPaste = transaction.getMeta('uiEvent') === 'paste' && !isPastedFromProseMirror;\n                const isDrop = transaction.getMeta('uiEvent') === 'drop' && !isDroppedFromProseMirror;\n                // if PasteRule is triggered by insertContent()\n                const simulatedPasteMeta = transaction.getMeta('applyPasteRules');\n                const isSimulatedPaste = !!simulatedPasteMeta;\n                if (!isPaste && !isDrop && !isSimulatedPaste) {\n                    return;\n                }\n                // Handle simulated paste\n                if (isSimulatedPaste) {\n                    let { text } = simulatedPasteMeta;\n                    if (typeof text === 'string') {\n                        text = text;\n                    }\n                    else {\n                        text = getHTMLFromFragment(Fragment.from(text), state.schema);\n                    }\n                    const { from } = simulatedPasteMeta;\n                    const to = from + text.length;\n                    const pasteEvt = createClipboardPasteEvent(text);\n                    return processEvent({\n                        rule,\n                        state,\n                        from,\n                        to: { b: to },\n                        pasteEvt,\n                    });\n                }\n                // handle actual paste/drop\n                const from = oldState.doc.content.findDiffStart(state.doc.content);\n                const to = oldState.doc.content.findDiffEnd(state.doc.content);\n                // stop if there is no changed range\n                if (!isNumber(from) || !to || from === to.b) {\n                    return;\n                }\n                return processEvent({\n                    rule,\n                    state,\n                    from,\n                    to,\n                    pasteEvt: pasteEvent,\n                });\n            },\n        });\n    });\n    return plugins;\n}\n\nfunction findDuplicates(items) {\n    const filtered = items.filter((el, index) => items.indexOf(el) !== index);\n    return Array.from(new Set(filtered));\n}\n\nclass ExtensionManager {\n    constructor(extensions, editor) {\n        this.splittableMarks = [];\n        this.editor = editor;\n        this.extensions = ExtensionManager.resolve(extensions);\n        this.schema = getSchemaByResolvedExtensions(this.extensions, editor);\n        this.setupExtensions();\n    }\n    /**\n     * Returns a flattened and sorted extension list while\n     * also checking for duplicated extensions and warns the user.\n     * @param extensions An array of Tiptap extensions\n     * @returns An flattened and sorted array of Tiptap extensions\n     */\n    static resolve(extensions) {\n        const resolvedExtensions = ExtensionManager.sort(ExtensionManager.flatten(extensions));\n        const duplicatedNames = findDuplicates(resolvedExtensions.map(extension => extension.name));\n        if (duplicatedNames.length) {\n            console.warn(`[tiptap warn]: Duplicate extension names found: [${duplicatedNames\n                .map(item => `'${item}'`)\n                .join(', ')}]. This can lead to issues.`);\n        }\n        return resolvedExtensions;\n    }\n    /**\n     * Create a flattened array of extensions by traversing the `addExtensions` field.\n     * @param extensions An array of Tiptap extensions\n     * @returns A flattened array of Tiptap extensions\n     */\n    static flatten(extensions) {\n        return (extensions\n            .map(extension => {\n            const context = {\n                name: extension.name,\n                options: extension.options,\n                storage: extension.storage,\n            };\n            const addExtensions = getExtensionField(extension, 'addExtensions', context);\n            if (addExtensions) {\n                return [extension, ...this.flatten(addExtensions())];\n            }\n            return extension;\n        })\n            // `Infinity` will break TypeScript so we set a number that is probably high enough\n            .flat(10));\n    }\n    /**\n     * Sort extensions by priority.\n     * @param extensions An array of Tiptap extensions\n     * @returns A sorted array of Tiptap extensions by priority\n     */\n    static sort(extensions) {\n        const defaultPriority = 100;\n        return extensions.sort((a, b) => {\n            const priorityA = getExtensionField(a, 'priority') || defaultPriority;\n            const priorityB = getExtensionField(b, 'priority') || defaultPriority;\n            if (priorityA > priorityB) {\n                return -1;\n            }\n            if (priorityA < priorityB) {\n                return 1;\n            }\n            return 0;\n        });\n    }\n    /**\n     * Get all commands from the extensions.\n     * @returns An object with all commands where the key is the command name and the value is the command function\n     */\n    get commands() {\n        return this.extensions.reduce((commands, extension) => {\n            const context = {\n                name: extension.name,\n                options: extension.options,\n                storage: extension.storage,\n                editor: this.editor,\n                type: getSchemaTypeByName(extension.name, this.schema),\n            };\n            const addCommands = getExtensionField(extension, 'addCommands', context);\n            if (!addCommands) {\n                return commands;\n            }\n            return {\n                ...commands,\n                ...addCommands(),\n            };\n        }, {});\n    }\n    /**\n     * Get all registered Prosemirror plugins from the extensions.\n     * @returns An array of Prosemirror plugins\n     */\n    get plugins() {\n        const { editor } = this;\n        // With ProseMirror, first plugins within an array are executed first.\n        // In Tiptap, we provide the ability to override plugins,\n        // so it feels more natural to run plugins at the end of an array first.\n        // That’s why we have to reverse the `extensions` array and sort again\n        // based on the `priority` option.\n        const extensions = ExtensionManager.sort([...this.extensions].reverse());\n        const inputRules = [];\n        const pasteRules = [];\n        const allPlugins = extensions\n            .map(extension => {\n            const context = {\n                name: extension.name,\n                options: extension.options,\n                storage: extension.storage,\n                editor,\n                type: getSchemaTypeByName(extension.name, this.schema),\n            };\n            const plugins = [];\n            const addKeyboardShortcuts = getExtensionField(extension, 'addKeyboardShortcuts', context);\n            let defaultBindings = {};\n            // bind exit handling\n            if (extension.type === 'mark' && getExtensionField(extension, 'exitable', context)) {\n                defaultBindings.ArrowRight = () => Mark.handleExit({ editor, mark: extension });\n            }\n            if (addKeyboardShortcuts) {\n                const bindings = Object.fromEntries(Object.entries(addKeyboardShortcuts()).map(([shortcut, method]) => {\n                    return [shortcut, () => method({ editor })];\n                }));\n                defaultBindings = { ...defaultBindings, ...bindings };\n            }\n            const keyMapPlugin = keymap(defaultBindings);\n            plugins.push(keyMapPlugin);\n            const addInputRules = getExtensionField(extension, 'addInputRules', context);\n            if (isExtensionRulesEnabled(extension, editor.options.enableInputRules) && addInputRules) {\n                inputRules.push(...addInputRules());\n            }\n            const addPasteRules = getExtensionField(extension, 'addPasteRules', context);\n            if (isExtensionRulesEnabled(extension, editor.options.enablePasteRules) && addPasteRules) {\n                pasteRules.push(...addPasteRules());\n            }\n            const addProseMirrorPlugins = getExtensionField(extension, 'addProseMirrorPlugins', context);\n            if (addProseMirrorPlugins) {\n                const proseMirrorPlugins = addProseMirrorPlugins();\n                plugins.push(...proseMirrorPlugins);\n            }\n            return plugins;\n        })\n            .flat();\n        return [\n            inputRulesPlugin({\n                editor,\n                rules: inputRules,\n            }),\n            ...pasteRulesPlugin({\n                editor,\n                rules: pasteRules,\n            }),\n            ...allPlugins,\n        ];\n    }\n    /**\n     * Get all attributes from the extensions.\n     * @returns An array of attributes\n     */\n    get attributes() {\n        return getAttributesFromExtensions(this.extensions);\n    }\n    /**\n     * Get all node views from the extensions.\n     * @returns An object with all node views where the key is the node name and the value is the node view function\n     */\n    get nodeViews() {\n        const { editor } = this;\n        const { nodeExtensions } = splitExtensions(this.extensions);\n        return Object.fromEntries(nodeExtensions\n            .filter(extension => !!getExtensionField(extension, 'addNodeView'))\n            .map(extension => {\n            const extensionAttributes = this.attributes.filter(attribute => attribute.type === extension.name);\n            const context = {\n                name: extension.name,\n                options: extension.options,\n                storage: extension.storage,\n                editor,\n                type: getNodeType(extension.name, this.schema),\n            };\n            const addNodeView = getExtensionField(extension, 'addNodeView', context);\n            if (!addNodeView) {\n                return [];\n            }\n            const nodeview = (node, view, getPos, decorations, innerDecorations) => {\n                const HTMLAttributes = getRenderedAttributes(node, extensionAttributes);\n                return addNodeView()({\n                    // pass-through\n                    node,\n                    view,\n                    getPos: getPos,\n                    decorations,\n                    innerDecorations,\n                    // tiptap-specific\n                    editor,\n                    extension,\n                    HTMLAttributes,\n                });\n            };\n            return [extension.name, nodeview];\n        }));\n    }\n    /**\n     * Go through all extensions, create extension storages & setup marks\n     * & bind editor event listener.\n     */\n    setupExtensions() {\n        this.extensions.forEach(extension => {\n            var _a;\n            // store extension storage in editor\n            this.editor.extensionStorage[extension.name] = extension.storage;\n            const context = {\n                name: extension.name,\n                options: extension.options,\n                storage: extension.storage,\n                editor: this.editor,\n                type: getSchemaTypeByName(extension.name, this.schema),\n            };\n            if (extension.type === 'mark') {\n                const keepOnSplit = (_a = callOrReturn(getExtensionField(extension, 'keepOnSplit', context))) !== null && _a !== void 0 ? _a : true;\n                if (keepOnSplit) {\n                    this.splittableMarks.push(extension.name);\n                }\n            }\n            const onBeforeCreate = getExtensionField(extension, 'onBeforeCreate', context);\n            const onCreate = getExtensionField(extension, 'onCreate', context);\n            const onUpdate = getExtensionField(extension, 'onUpdate', context);\n            const onSelectionUpdate = getExtensionField(extension, 'onSelectionUpdate', context);\n            const onTransaction = getExtensionField(extension, 'onTransaction', context);\n            const onFocus = getExtensionField(extension, 'onFocus', context);\n            const onBlur = getExtensionField(extension, 'onBlur', context);\n            const onDestroy = getExtensionField(extension, 'onDestroy', context);\n            if (onBeforeCreate) {\n                this.editor.on('beforeCreate', onBeforeCreate);\n            }\n            if (onCreate) {\n                this.editor.on('create', onCreate);\n            }\n            if (onUpdate) {\n                this.editor.on('update', onUpdate);\n            }\n            if (onSelectionUpdate) {\n                this.editor.on('selectionUpdate', onSelectionUpdate);\n            }\n            if (onTransaction) {\n                this.editor.on('transaction', onTransaction);\n            }\n            if (onFocus) {\n                this.editor.on('focus', onFocus);\n            }\n            if (onBlur) {\n                this.editor.on('blur', onBlur);\n            }\n            if (onDestroy) {\n                this.editor.on('destroy', onDestroy);\n            }\n        });\n    }\n}\n\n/**\n * The Extension class is the base class for all extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nclass Extension {\n    constructor(config = {}) {\n        this.type = 'extension';\n        this.name = 'extension';\n        this.parent = null;\n        this.child = null;\n        this.config = {\n            name: this.name,\n            defaultOptions: {},\n        };\n        this.config = {\n            ...this.config,\n            ...config,\n        };\n        this.name = this.config.name;\n        if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) {\n            console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${this.name}\".`);\n        }\n        // TODO: remove `addOptions` fallback\n        this.options = this.config.defaultOptions;\n        if (this.config.addOptions) {\n            this.options = callOrReturn(getExtensionField(this, 'addOptions', {\n                name: this.name,\n            }));\n        }\n        this.storage = callOrReturn(getExtensionField(this, 'addStorage', {\n            name: this.name,\n            options: this.options,\n        })) || {};\n    }\n    static create(config = {}) {\n        return new Extension(config);\n    }\n    configure(options = {}) {\n        // return a new instance so we can use the same extension\n        // with different calls of `configure`\n        const extension = this.extend({\n            ...this.config,\n            addOptions: () => {\n                return mergeDeep(this.options, options);\n            },\n        });\n        // Always preserve the current name\n        extension.name = this.name;\n        // Set the parent to be our parent\n        extension.parent = this.parent;\n        return extension;\n    }\n    extend(extendedConfig = {}) {\n        const extension = new Extension({ ...this.config, ...extendedConfig });\n        extension.parent = this;\n        this.child = extension;\n        extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name;\n        if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) {\n            console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${extension.name}\".`);\n        }\n        extension.options = callOrReturn(getExtensionField(extension, 'addOptions', {\n            name: extension.name,\n        }));\n        extension.storage = callOrReturn(getExtensionField(extension, 'addStorage', {\n            name: extension.name,\n            options: extension.options,\n        }));\n        return extension;\n    }\n}\n\n/**\n * Gets the text between two positions in a Prosemirror node\n * and serializes it using the given text serializers and block separator (see getText)\n * @param startNode The Prosemirror node to start from\n * @param range The range of the text to get\n * @param options Options for the text serializer & block separator\n * @returns The text between the two positions\n */\nfunction getTextBetween(startNode, range, options) {\n    const { from, to } = range;\n    const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {};\n    let text = '';\n    startNode.nodesBetween(from, to, (node, pos, parent, index) => {\n        var _a;\n        if (node.isBlock && pos > from) {\n            text += blockSeparator;\n        }\n        const textSerializer = textSerializers === null || textSerializers === void 0 ? void 0 : textSerializers[node.type.name];\n        if (textSerializer) {\n            if (parent) {\n                text += textSerializer({\n                    node,\n                    pos,\n                    parent,\n                    index,\n                    range,\n                });\n            }\n            // do not descend into child nodes when there exists a serializer\n            return false;\n        }\n        if (node.isText) {\n            text += (_a = node === null || node === void 0 ? void 0 : node.text) === null || _a === void 0 ? void 0 : _a.slice(Math.max(from, pos) - pos, to - pos); // eslint-disable-line\n        }\n    });\n    return text;\n}\n\n/**\n * Find text serializers `toText` in a Prosemirror schema\n * @param schema The Prosemirror schema to search in\n * @returns A record of text serializers by node name\n */\nfunction getTextSerializersFromSchema(schema) {\n    return Object.fromEntries(Object.entries(schema.nodes)\n        .filter(([, node]) => node.spec.toText)\n        .map(([name, node]) => [name, node.spec.toText]));\n}\n\nconst ClipboardTextSerializer = Extension.create({\n    name: 'clipboardTextSerializer',\n    addOptions() {\n        return {\n            blockSeparator: undefined,\n        };\n    },\n    addProseMirrorPlugins() {\n        return [\n            new Plugin({\n                key: new PluginKey('clipboardTextSerializer'),\n                props: {\n                    clipboardTextSerializer: () => {\n                        const { editor } = this;\n                        const { state, schema } = editor;\n                        const { doc, selection } = state;\n                        const { ranges } = selection;\n                        const from = Math.min(...ranges.map(range => range.$from.pos));\n                        const to = Math.max(...ranges.map(range => range.$to.pos));\n                        const textSerializers = getTextSerializersFromSchema(schema);\n                        const range = { from, to };\n                        return getTextBetween(doc, range, {\n                            ...(this.options.blockSeparator !== undefined\n                                ? { blockSeparator: this.options.blockSeparator }\n                                : {}),\n                            textSerializers,\n                        });\n                    },\n                },\n            }),\n        ];\n    },\n});\n\nconst blur = () => ({ editor, view }) => {\n    requestAnimationFrame(() => {\n        var _a;\n        if (!editor.isDestroyed) {\n            view.dom.blur();\n            // Browsers should remove the caret on blur but safari does not.\n            // See: https://github.com/ueberdosis/tiptap/issues/2405\n            (_a = window === null || window === void 0 ? void 0 : window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n        }\n    });\n    return true;\n};\n\nconst clearContent = (emitUpdate = false) => ({ commands }) => {\n    return commands.setContent('', emitUpdate);\n};\n\nconst clearNodes = () => ({ state, tr, dispatch }) => {\n    const { selection } = tr;\n    const { ranges } = selection;\n    if (!dispatch) {\n        return true;\n    }\n    ranges.forEach(({ $from, $to }) => {\n        state.doc.nodesBetween($from.pos, $to.pos, (node, pos) => {\n            if (node.type.isText) {\n                return;\n            }\n            const { doc, mapping } = tr;\n            const $mappedFrom = doc.resolve(mapping.map(pos));\n            const $mappedTo = doc.resolve(mapping.map(pos + node.nodeSize));\n            const nodeRange = $mappedFrom.blockRange($mappedTo);\n            if (!nodeRange) {\n                return;\n            }\n            const targetLiftDepth = liftTarget(nodeRange);\n            if (node.type.isTextblock) {\n                const { defaultType } = $mappedFrom.parent.contentMatchAt($mappedFrom.index());\n                tr.setNodeMarkup(nodeRange.start, defaultType);\n            }\n            if (targetLiftDepth || targetLiftDepth === 0) {\n                tr.lift(nodeRange, targetLiftDepth);\n            }\n        });\n    });\n    return true;\n};\n\nconst command = fn => props => {\n    return fn(props);\n};\n\nconst createParagraphNear = () => ({ state, dispatch }) => {\n    return createParagraphNear$1(state, dispatch);\n};\n\nconst cut = (originRange, targetPos) => ({ editor, tr }) => {\n    const { state } = editor;\n    const contentSlice = state.doc.slice(originRange.from, originRange.to);\n    tr.deleteRange(originRange.from, originRange.to);\n    const newPos = tr.mapping.map(targetPos);\n    tr.insert(newPos, contentSlice.content);\n    tr.setSelection(new TextSelection(tr.doc.resolve(Math.max(newPos - 1, 0))));\n    return true;\n};\n\nconst deleteCurrentNode = () => ({ tr, dispatch }) => {\n    const { selection } = tr;\n    const currentNode = selection.$anchor.node();\n    // if there is content inside the current node, break out of this command\n    if (currentNode.content.size > 0) {\n        return false;\n    }\n    const $pos = tr.selection.$anchor;\n    for (let depth = $pos.depth; depth > 0; depth -= 1) {\n        const node = $pos.node(depth);\n        if (node.type === currentNode.type) {\n            if (dispatch) {\n                const from = $pos.before(depth);\n                const to = $pos.after(depth);\n                tr.delete(from, to).scrollIntoView();\n            }\n            return true;\n        }\n    }\n    return false;\n};\n\nconst deleteNode = typeOrName => ({ tr, state, dispatch }) => {\n    const type = getNodeType(typeOrName, state.schema);\n    const $pos = tr.selection.$anchor;\n    for (let depth = $pos.depth; depth > 0; depth -= 1) {\n        const node = $pos.node(depth);\n        if (node.type === type) {\n            if (dispatch) {\n                const from = $pos.before(depth);\n                const to = $pos.after(depth);\n                tr.delete(from, to).scrollIntoView();\n            }\n            return true;\n        }\n    }\n    return false;\n};\n\nconst deleteRange = range => ({ tr, dispatch }) => {\n    const { from, to } = range;\n    if (dispatch) {\n        tr.delete(from, to);\n    }\n    return true;\n};\n\nconst deleteSelection = () => ({ state, dispatch }) => {\n    return deleteSelection$1(state, dispatch);\n};\n\nconst enter = () => ({ commands }) => {\n    return commands.keyboardShortcut('Enter');\n};\n\nconst exitCode = () => ({ state, dispatch }) => {\n    return exitCode$1(state, dispatch);\n};\n\n/**\n * Check if object1 includes object2\n * @param object1 Object\n * @param object2 Object\n */\nfunction objectIncludes(object1, object2, options = { strict: true }) {\n    const keys = Object.keys(object2);\n    if (!keys.length) {\n        return true;\n    }\n    return keys.every(key => {\n        if (options.strict) {\n            return object2[key] === object1[key];\n        }\n        if (isRegExp(object2[key])) {\n            return object2[key].test(object1[key]);\n        }\n        return object2[key] === object1[key];\n    });\n}\n\nfunction findMarkInSet(marks, type, attributes = {}) {\n    return marks.find(item => {\n        return (item.type === type\n            && objectIncludes(\n            // Only check equality for the attributes that are provided\n            Object.fromEntries(Object.keys(attributes).map(k => [k, item.attrs[k]])), attributes));\n    });\n}\nfunction isMarkInSet(marks, type, attributes = {}) {\n    return !!findMarkInSet(marks, type, attributes);\n}\n/**\n * Get the range of a mark at a resolved position.\n */\nfunction getMarkRange(\n/**\n * The position to get the mark range for.\n */\n$pos, \n/**\n * The mark type to get the range for.\n */\ntype, \n/**\n * The attributes to match against.\n * If not provided, only the first mark at the position will be matched.\n */\nattributes) {\n    var _a;\n    if (!$pos || !type) {\n        return;\n    }\n    let start = $pos.parent.childAfter($pos.parentOffset);\n    // If the cursor is at the start of a text node that does not have the mark, look backward\n    if (!start.node || !start.node.marks.some(mark => mark.type === type)) {\n        start = $pos.parent.childBefore($pos.parentOffset);\n    }\n    // If there is no text node with the mark even backward, return undefined\n    if (!start.node || !start.node.marks.some(mark => mark.type === type)) {\n        return;\n    }\n    // Default to only matching against the first mark's attributes\n    attributes = attributes || ((_a = start.node.marks[0]) === null || _a === void 0 ? void 0 : _a.attrs);\n    // We now know that the cursor is either at the start, middle or end of a text node with the specified mark\n    // so we can look it up on the targeted mark\n    const mark = findMarkInSet([...start.node.marks], type, attributes);\n    if (!mark) {\n        return;\n    }\n    let startIndex = start.index;\n    let startPos = $pos.start() + start.offset;\n    let endIndex = startIndex + 1;\n    let endPos = startPos + start.node.nodeSize;\n    while (startIndex > 0\n        && isMarkInSet([...$pos.parent.child(startIndex - 1).marks], type, attributes)) {\n        startIndex -= 1;\n        startPos -= $pos.parent.child(startIndex).nodeSize;\n    }\n    while (endIndex < $pos.parent.childCount\n        && isMarkInSet([...$pos.parent.child(endIndex).marks], type, attributes)) {\n        endPos += $pos.parent.child(endIndex).nodeSize;\n        endIndex += 1;\n    }\n    return {\n        from: startPos,\n        to: endPos,\n    };\n}\n\nfunction getMarkType(nameOrType, schema) {\n    if (typeof nameOrType === 'string') {\n        if (!schema.marks[nameOrType]) {\n            throw Error(`There is no mark type named '${nameOrType}'. Maybe you forgot to add the extension?`);\n        }\n        return schema.marks[nameOrType];\n    }\n    return nameOrType;\n}\n\nconst extendMarkRange = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => {\n    const type = getMarkType(typeOrName, state.schema);\n    const { doc, selection } = tr;\n    const { $from, from, to } = selection;\n    if (dispatch) {\n        const range = getMarkRange($from, type, attributes);\n        if (range && range.from <= from && range.to >= to) {\n            const newSelection = TextSelection.create(doc, range.from, range.to);\n            tr.setSelection(newSelection);\n        }\n    }\n    return true;\n};\n\nconst first = commands => props => {\n    const items = typeof commands === 'function'\n        ? commands(props)\n        : commands;\n    for (let i = 0; i < items.length; i += 1) {\n        if (items[i](props)) {\n            return true;\n        }\n    }\n    return false;\n};\n\nfunction isTextSelection(value) {\n    return value instanceof TextSelection;\n}\n\nfunction minMax(value = 0, min = 0, max = 0) {\n    return Math.min(Math.max(value, min), max);\n}\n\nfunction resolveFocusPosition(doc, position = null) {\n    if (!position) {\n        return null;\n    }\n    const selectionAtStart = Selection.atStart(doc);\n    const selectionAtEnd = Selection.atEnd(doc);\n    if (position === 'start' || position === true) {\n        return selectionAtStart;\n    }\n    if (position === 'end') {\n        return selectionAtEnd;\n    }\n    const minPos = selectionAtStart.from;\n    const maxPos = selectionAtEnd.to;\n    if (position === 'all') {\n        return TextSelection.create(doc, minMax(0, minPos, maxPos), minMax(doc.content.size, minPos, maxPos));\n    }\n    return TextSelection.create(doc, minMax(position, minPos, maxPos), minMax(position, minPos, maxPos));\n}\n\nfunction isAndroid() {\n    return navigator.platform === 'Android' || /android/i.test(navigator.userAgent);\n}\n\nfunction isiOS() {\n    return [\n        'iPad Simulator',\n        'iPhone Simulator',\n        'iPod Simulator',\n        'iPad',\n        'iPhone',\n        'iPod',\n    ].includes(navigator.platform)\n        // iPad on iOS 13 detection\n        || (navigator.userAgent.includes('Mac') && 'ontouchend' in document);\n}\n\nconst focus = (position = null, options = {}) => ({ editor, view, tr, dispatch, }) => {\n    options = {\n        scrollIntoView: true,\n        ...options,\n    };\n    const delayedFocus = () => {\n        // focus within `requestAnimationFrame` breaks focus on iOS and Android\n        // so we have to call this\n        if (isiOS() || isAndroid()) {\n            view.dom.focus();\n        }\n        // For React we have to focus asynchronously. Otherwise wild things happen.\n        // see: https://github.com/ueberdosis/tiptap/issues/1520\n        requestAnimationFrame(() => {\n            if (!editor.isDestroyed) {\n                view.focus();\n                if (options === null || options === void 0 ? void 0 : options.scrollIntoView) {\n                    editor.commands.scrollIntoView();\n                }\n            }\n        });\n    };\n    if ((view.hasFocus() && position === null) || position === false) {\n        return true;\n    }\n    // we don’t try to resolve a NodeSelection or CellSelection\n    if (dispatch && position === null && !isTextSelection(editor.state.selection)) {\n        delayedFocus();\n        return true;\n    }\n    // pass through tr.doc instead of editor.state.doc\n    // since transactions could change the editors state before this command has been run\n    const selection = resolveFocusPosition(tr.doc, position) || editor.state.selection;\n    const isSameSelection = editor.state.selection.eq(selection);\n    if (dispatch) {\n        if (!isSameSelection) {\n            tr.setSelection(selection);\n        }\n        // `tr.setSelection` resets the stored marks\n        // so we’ll restore them if the selection is the same as before\n        if (isSameSelection && tr.storedMarks) {\n            tr.setStoredMarks(tr.storedMarks);\n        }\n        delayedFocus();\n    }\n    return true;\n};\n\nconst forEach = (items, fn) => props => {\n    return items.every((item, index) => fn(item, { ...props, index }));\n};\n\nconst insertContent = (value, options) => ({ tr, commands }) => {\n    return commands.insertContentAt({ from: tr.selection.from, to: tr.selection.to }, value, options);\n};\n\nconst removeWhitespaces = (node) => {\n    const children = node.childNodes;\n    for (let i = children.length - 1; i >= 0; i -= 1) {\n        const child = children[i];\n        if (child.nodeType === 3 && child.nodeValue && /^(\\n\\s\\s|\\n)$/.test(child.nodeValue)) {\n            node.removeChild(child);\n        }\n        else if (child.nodeType === 1) {\n            removeWhitespaces(child);\n        }\n    }\n    return node;\n};\nfunction elementFromString(value) {\n    // add a wrapper to preserve leading and trailing whitespace\n    const wrappedValue = `<body>${value}</body>`;\n    const html = new window.DOMParser().parseFromString(wrappedValue, 'text/html').body;\n    return removeWhitespaces(html);\n}\n\n/**\n * Takes a JSON or HTML content and creates a Prosemirror node or fragment from it.\n * @param content The JSON or HTML content to create the node from\n * @param schema The Prosemirror schema to use for the node\n * @param options Options for the parser\n * @returns The created Prosemirror node or fragment\n */\nfunction createNodeFromContent(content, schema, options) {\n    if (content instanceof Node$1 || content instanceof Fragment) {\n        return content;\n    }\n    options = {\n        slice: true,\n        parseOptions: {},\n        ...options,\n    };\n    const isJSONContent = typeof content === 'object' && content !== null;\n    const isTextContent = typeof content === 'string';\n    if (isJSONContent) {\n        try {\n            const isArrayContent = Array.isArray(content) && content.length > 0;\n            // if the JSON Content is an array of nodes, create a fragment for each node\n            if (isArrayContent) {\n                return Fragment.fromArray(content.map(item => schema.nodeFromJSON(item)));\n            }\n            const node = schema.nodeFromJSON(content);\n            if (options.errorOnInvalidContent) {\n                node.check();\n            }\n            return node;\n        }\n        catch (error) {\n            if (options.errorOnInvalidContent) {\n                throw new Error('[tiptap error]: Invalid JSON content', { cause: error });\n            }\n            console.warn('[tiptap warn]: Invalid content.', 'Passed value:', content, 'Error:', error);\n            return createNodeFromContent('', schema, options);\n        }\n    }\n    if (isTextContent) {\n        // Check for invalid content\n        if (options.errorOnInvalidContent) {\n            let hasInvalidContent = false;\n            let invalidContent = '';\n            // A copy of the current schema with a catch-all node at the end\n            const contentCheckSchema = new Schema({\n                topNode: schema.spec.topNode,\n                marks: schema.spec.marks,\n                // Prosemirror's schemas are executed such that: the last to execute, matches last\n                // This means that we can add a catch-all node at the end of the schema to catch any content that we don't know how to handle\n                nodes: schema.spec.nodes.append({\n                    __tiptap__private__unknown__catch__all__node: {\n                        content: 'inline*',\n                        group: 'block',\n                        parseDOM: [\n                            {\n                                tag: '*',\n                                getAttrs: e => {\n                                    // If this is ever called, we know that the content has something that we don't know how to handle in the schema\n                                    hasInvalidContent = true;\n                                    // Try to stringify the element for a more helpful error message\n                                    invalidContent = typeof e === 'string' ? e : e.outerHTML;\n                                    return null;\n                                },\n                            },\n                        ],\n                    },\n                }),\n            });\n            if (options.slice) {\n                DOMParser.fromSchema(contentCheckSchema).parseSlice(elementFromString(content), options.parseOptions);\n            }\n            else {\n                DOMParser.fromSchema(contentCheckSchema).parse(elementFromString(content), options.parseOptions);\n            }\n            if (options.errorOnInvalidContent && hasInvalidContent) {\n                throw new Error('[tiptap error]: Invalid HTML content', { cause: new Error(`Invalid element found: ${invalidContent}`) });\n            }\n        }\n        const parser = DOMParser.fromSchema(schema);\n        if (options.slice) {\n            return parser.parseSlice(elementFromString(content), options.parseOptions).content;\n        }\n        return parser.parse(elementFromString(content), options.parseOptions);\n    }\n    return createNodeFromContent('', schema, options);\n}\n\n// source: https://github.com/ProseMirror/prosemirror-state/blob/master/src/selection.js#L466\nfunction selectionToInsertionEnd(tr, startLen, bias) {\n    const last = tr.steps.length - 1;\n    if (last < startLen) {\n        return;\n    }\n    const step = tr.steps[last];\n    if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) {\n        return;\n    }\n    const map = tr.mapping.maps[last];\n    let end = 0;\n    map.forEach((_from, _to, _newFrom, newTo) => {\n        if (end === 0) {\n            end = newTo;\n        }\n    });\n    tr.setSelection(Selection.near(tr.doc.resolve(end), bias));\n}\n\nconst isFragment = (nodeOrFragment) => {\n    return !('type' in nodeOrFragment);\n};\nconst insertContentAt = (position, value, options) => ({ tr, dispatch, editor }) => {\n    var _a;\n    if (dispatch) {\n        options = {\n            parseOptions: editor.options.parseOptions,\n            updateSelection: true,\n            applyInputRules: false,\n            applyPasteRules: false,\n            ...options,\n        };\n        let content;\n        const emitContentError = (error) => {\n            editor.emit('contentError', {\n                editor,\n                error,\n                disableCollaboration: () => {\n                    if (editor.storage.collaboration) {\n                        editor.storage.collaboration.isDisabled = true;\n                    }\n                },\n            });\n        };\n        const parseOptions = {\n            preserveWhitespace: 'full',\n            ...options.parseOptions,\n        };\n        // If `emitContentError` is enabled, we want to check the content for errors\n        // but ignore them (do not remove the invalid content from the document)\n        if (!options.errorOnInvalidContent && !editor.options.enableContentCheck && editor.options.emitContentError) {\n            try {\n                createNodeFromContent(value, editor.schema, {\n                    parseOptions,\n                    errorOnInvalidContent: true,\n                });\n            }\n            catch (e) {\n                emitContentError(e);\n            }\n        }\n        try {\n            content = createNodeFromContent(value, editor.schema, {\n                parseOptions,\n                errorOnInvalidContent: (_a = options.errorOnInvalidContent) !== null && _a !== void 0 ? _a : editor.options.enableContentCheck,\n            });\n        }\n        catch (e) {\n            emitContentError(e);\n            return false;\n        }\n        let { from, to } = typeof position === 'number' ? { from: position, to: position } : { from: position.from, to: position.to };\n        let isOnlyTextContent = true;\n        let isOnlyBlockContent = true;\n        const nodes = isFragment(content) ? content : [content];\n        nodes.forEach(node => {\n            // check if added node is valid\n            node.check();\n            isOnlyTextContent = isOnlyTextContent ? node.isText && node.marks.length === 0 : false;\n            isOnlyBlockContent = isOnlyBlockContent ? node.isBlock : false;\n        });\n        // check if we can replace the wrapping node by\n        // the newly inserted content\n        // example:\n        // replace an empty paragraph by an inserted image\n        // instead of inserting the image below the paragraph\n        if (from === to && isOnlyBlockContent) {\n            const { parent } = tr.doc.resolve(from);\n            const isEmptyTextBlock = parent.isTextblock && !parent.type.spec.code && !parent.childCount;\n            if (isEmptyTextBlock) {\n                from -= 1;\n                to += 1;\n            }\n        }\n        let newContent;\n        // if there is only plain text we have to use `insertText`\n        // because this will keep the current marks\n        if (isOnlyTextContent) {\n            // if value is string, we can use it directly\n            // otherwise if it is an array, we have to join it\n            if (Array.isArray(value)) {\n                newContent = value.map(v => v.text || '').join('');\n            }\n            else if (value instanceof Fragment) {\n                let text = '';\n                value.forEach(node => {\n                    if (node.text) {\n                        text += node.text;\n                    }\n                });\n                newContent = text;\n            }\n            else if (typeof value === 'object' && !!value && !!value.text) {\n                newContent = value.text;\n            }\n            else {\n                newContent = value;\n            }\n            tr.insertText(newContent, from, to);\n        }\n        else {\n            newContent = content;\n            tr.replaceWith(from, to, newContent);\n        }\n        // set cursor at end of inserted content\n        if (options.updateSelection) {\n            selectionToInsertionEnd(tr, tr.steps.length - 1, -1);\n        }\n        if (options.applyInputRules) {\n            tr.setMeta('applyInputRules', { from, text: newContent });\n        }\n        if (options.applyPasteRules) {\n            tr.setMeta('applyPasteRules', { from, text: newContent });\n        }\n    }\n    return true;\n};\n\nconst joinUp = () => ({ state, dispatch }) => {\n    return joinUp$1(state, dispatch);\n};\nconst joinDown = () => ({ state, dispatch }) => {\n    return joinDown$1(state, dispatch);\n};\nconst joinBackward = () => ({ state, dispatch }) => {\n    return joinBackward$1(state, dispatch);\n};\nconst joinForward = () => ({ state, dispatch }) => {\n    return joinForward$1(state, dispatch);\n};\n\nconst joinItemBackward = () => ({ state, dispatch, tr, }) => {\n    try {\n        const point = joinPoint(state.doc, state.selection.$from.pos, -1);\n        if (point === null || point === undefined) {\n            return false;\n        }\n        tr.join(point, 2);\n        if (dispatch) {\n            dispatch(tr);\n        }\n        return true;\n    }\n    catch {\n        return false;\n    }\n};\n\nconst joinItemForward = () => ({ state, dispatch, tr, }) => {\n    try {\n        const point = joinPoint(state.doc, state.selection.$from.pos, +1);\n        if (point === null || point === undefined) {\n            return false;\n        }\n        tr.join(point, 2);\n        if (dispatch) {\n            dispatch(tr);\n        }\n        return true;\n    }\n    catch {\n        return false;\n    }\n};\n\nconst joinTextblockBackward = () => ({ state, dispatch }) => {\n    return joinTextblockBackward$1(state, dispatch);\n};\n\nconst joinTextblockForward = () => ({ state, dispatch }) => {\n    return joinTextblockForward$1(state, dispatch);\n};\n\nfunction isMacOS() {\n    return typeof navigator !== 'undefined'\n        ? /Mac/.test(navigator.platform)\n        : false;\n}\n\nfunction normalizeKeyName(name) {\n    const parts = name.split(/-(?!$)/);\n    let result = parts[parts.length - 1];\n    if (result === 'Space') {\n        result = ' ';\n    }\n    let alt;\n    let ctrl;\n    let shift;\n    let meta;\n    for (let i = 0; i < parts.length - 1; i += 1) {\n        const mod = parts[i];\n        if (/^(cmd|meta|m)$/i.test(mod)) {\n            meta = true;\n        }\n        else if (/^a(lt)?$/i.test(mod)) {\n            alt = true;\n        }\n        else if (/^(c|ctrl|control)$/i.test(mod)) {\n            ctrl = true;\n        }\n        else if (/^s(hift)?$/i.test(mod)) {\n            shift = true;\n        }\n        else if (/^mod$/i.test(mod)) {\n            if (isiOS() || isMacOS()) {\n                meta = true;\n            }\n            else {\n                ctrl = true;\n            }\n        }\n        else {\n            throw new Error(`Unrecognized modifier name: ${mod}`);\n        }\n    }\n    if (alt) {\n        result = `Alt-${result}`;\n    }\n    if (ctrl) {\n        result = `Ctrl-${result}`;\n    }\n    if (meta) {\n        result = `Meta-${result}`;\n    }\n    if (shift) {\n        result = `Shift-${result}`;\n    }\n    return result;\n}\nconst keyboardShortcut = name => ({ editor, view, tr, dispatch, }) => {\n    const keys = normalizeKeyName(name).split(/-(?!$)/);\n    const key = keys.find(item => !['Alt', 'Ctrl', 'Meta', 'Shift'].includes(item));\n    const event = new KeyboardEvent('keydown', {\n        key: key === 'Space'\n            ? ' '\n            : key,\n        altKey: keys.includes('Alt'),\n        ctrlKey: keys.includes('Ctrl'),\n        metaKey: keys.includes('Meta'),\n        shiftKey: keys.includes('Shift'),\n        bubbles: true,\n        cancelable: true,\n    });\n    const capturedTransaction = editor.captureTransaction(() => {\n        view.someProp('handleKeyDown', f => f(view, event));\n    });\n    capturedTransaction === null || capturedTransaction === void 0 ? void 0 : capturedTransaction.steps.forEach(step => {\n        const newStep = step.map(tr.mapping);\n        if (newStep && dispatch) {\n            tr.maybeStep(newStep);\n        }\n    });\n    return true;\n};\n\nfunction isNodeActive(state, typeOrName, attributes = {}) {\n    const { from, to, empty } = state.selection;\n    const type = typeOrName ? getNodeType(typeOrName, state.schema) : null;\n    const nodeRanges = [];\n    state.doc.nodesBetween(from, to, (node, pos) => {\n        if (node.isText) {\n            return;\n        }\n        const relativeFrom = Math.max(from, pos);\n        const relativeTo = Math.min(to, pos + node.nodeSize);\n        nodeRanges.push({\n            node,\n            from: relativeFrom,\n            to: relativeTo,\n        });\n    });\n    const selectionRange = to - from;\n    const matchedNodeRanges = nodeRanges\n        .filter(nodeRange => {\n        if (!type) {\n            return true;\n        }\n        return type.name === nodeRange.node.type.name;\n    })\n        .filter(nodeRange => objectIncludes(nodeRange.node.attrs, attributes, { strict: false }));\n    if (empty) {\n        return !!matchedNodeRanges.length;\n    }\n    const range = matchedNodeRanges.reduce((sum, nodeRange) => sum + nodeRange.to - nodeRange.from, 0);\n    return range >= selectionRange;\n}\n\nconst lift = (typeOrName, attributes = {}) => ({ state, dispatch }) => {\n    const type = getNodeType(typeOrName, state.schema);\n    const isActive = isNodeActive(state, type, attributes);\n    if (!isActive) {\n        return false;\n    }\n    return lift$1(state, dispatch);\n};\n\nconst liftEmptyBlock = () => ({ state, dispatch }) => {\n    return liftEmptyBlock$1(state, dispatch);\n};\n\nconst liftListItem = typeOrName => ({ state, dispatch }) => {\n    const type = getNodeType(typeOrName, state.schema);\n    return liftListItem$1(type)(state, dispatch);\n};\n\nconst newlineInCode = () => ({ state, dispatch }) => {\n    return newlineInCode$1(state, dispatch);\n};\n\n/**\n * Get the type of a schema item by its name.\n * @param name The name of the schema item\n * @param schema The Prosemiror schema to search in\n * @returns The type of the schema item (`node` or `mark`), or null if it doesn't exist\n */\nfunction getSchemaTypeNameByName(name, schema) {\n    if (schema.nodes[name]) {\n        return 'node';\n    }\n    if (schema.marks[name]) {\n        return 'mark';\n    }\n    return null;\n}\n\n/**\n * Remove a property or an array of properties from an object\n * @param obj Object\n * @param key Key to remove\n */\nfunction deleteProps(obj, propOrProps) {\n    const props = typeof propOrProps === 'string'\n        ? [propOrProps]\n        : propOrProps;\n    return Object\n        .keys(obj)\n        .reduce((newObj, prop) => {\n        if (!props.includes(prop)) {\n            newObj[prop] = obj[prop];\n        }\n        return newObj;\n    }, {});\n}\n\nconst resetAttributes = (typeOrName, attributes) => ({ tr, state, dispatch }) => {\n    let nodeType = null;\n    let markType = null;\n    const schemaType = getSchemaTypeNameByName(typeof typeOrName === 'string' ? typeOrName : typeOrName.name, state.schema);\n    if (!schemaType) {\n        return false;\n    }\n    if (schemaType === 'node') {\n        nodeType = getNodeType(typeOrName, state.schema);\n    }\n    if (schemaType === 'mark') {\n        markType = getMarkType(typeOrName, state.schema);\n    }\n    if (dispatch) {\n        tr.selection.ranges.forEach(range => {\n            state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => {\n                if (nodeType && nodeType === node.type) {\n                    tr.setNodeMarkup(pos, undefined, deleteProps(node.attrs, attributes));\n                }\n                if (markType && node.marks.length) {\n                    node.marks.forEach(mark => {\n                        if (markType === mark.type) {\n                            tr.addMark(pos, pos + node.nodeSize, markType.create(deleteProps(mark.attrs, attributes)));\n                        }\n                    });\n                }\n            });\n        });\n    }\n    return true;\n};\n\nconst scrollIntoView = () => ({ tr, dispatch }) => {\n    if (dispatch) {\n        tr.scrollIntoView();\n    }\n    return true;\n};\n\nconst selectAll = () => ({ tr, dispatch }) => {\n    if (dispatch) {\n        const selection = new AllSelection(tr.doc);\n        tr.setSelection(selection);\n    }\n    return true;\n};\n\nconst selectNodeBackward = () => ({ state, dispatch }) => {\n    return selectNodeBackward$1(state, dispatch);\n};\n\nconst selectNodeForward = () => ({ state, dispatch }) => {\n    return selectNodeForward$1(state, dispatch);\n};\n\nconst selectParentNode = () => ({ state, dispatch }) => {\n    return selectParentNode$1(state, dispatch);\n};\n\n// @ts-ignore\n// TODO: add types to @types/prosemirror-commands\nconst selectTextblockEnd = () => ({ state, dispatch }) => {\n    return selectTextblockEnd$1(state, dispatch);\n};\n\n// @ts-ignore\n// TODO: add types to @types/prosemirror-commands\nconst selectTextblockStart = () => ({ state, dispatch }) => {\n    return selectTextblockStart$1(state, dispatch);\n};\n\n/**\n * Create a new Prosemirror document node from content.\n * @param content The JSON or HTML content to create the document from\n * @param schema The Prosemirror schema to use for the document\n * @param parseOptions Options for the parser\n * @returns The created Prosemirror document node\n */\nfunction createDocument(content, schema, parseOptions = {}, options = {}) {\n    return createNodeFromContent(content, schema, {\n        slice: false,\n        parseOptions,\n        errorOnInvalidContent: options.errorOnInvalidContent,\n    });\n}\n\nconst setContent = (content, emitUpdate = false, parseOptions = {}, options = {}) => ({ editor, tr, dispatch, commands, }) => {\n    var _a, _b;\n    const { doc } = tr;\n    // This is to keep backward compatibility with the previous behavior\n    // TODO remove this in the next major version\n    if (parseOptions.preserveWhitespace !== 'full') {\n        const document = createDocument(content, editor.schema, parseOptions, {\n            errorOnInvalidContent: (_a = options.errorOnInvalidContent) !== null && _a !== void 0 ? _a : editor.options.enableContentCheck,\n        });\n        if (dispatch) {\n            tr.replaceWith(0, doc.content.size, document).setMeta('preventUpdate', !emitUpdate);\n        }\n        return true;\n    }\n    if (dispatch) {\n        tr.setMeta('preventUpdate', !emitUpdate);\n    }\n    return commands.insertContentAt({ from: 0, to: doc.content.size }, content, {\n        parseOptions,\n        errorOnInvalidContent: (_b = options.errorOnInvalidContent) !== null && _b !== void 0 ? _b : editor.options.enableContentCheck,\n    });\n};\n\nfunction getMarkAttributes(state, typeOrName) {\n    const type = getMarkType(typeOrName, state.schema);\n    const { from, to, empty } = state.selection;\n    const marks = [];\n    if (empty) {\n        if (state.storedMarks) {\n            marks.push(...state.storedMarks);\n        }\n        marks.push(...state.selection.$head.marks());\n    }\n    else {\n        state.doc.nodesBetween(from, to, node => {\n            marks.push(...node.marks);\n        });\n    }\n    const mark = marks.find(markItem => markItem.type.name === type.name);\n    if (!mark) {\n        return {};\n    }\n    return { ...mark.attrs };\n}\n\n/**\n * Returns a new `Transform` based on all steps of the passed transactions.\n * @param oldDoc The Prosemirror node to start from\n * @param transactions The transactions to combine\n * @returns A new `Transform` with all steps of the passed transactions\n */\nfunction combineTransactionSteps(oldDoc, transactions) {\n    const transform = new Transform(oldDoc);\n    transactions.forEach(transaction => {\n        transaction.steps.forEach(step => {\n            transform.step(step);\n        });\n    });\n    return transform;\n}\n\n/**\n * Gets the default block type at a given match\n * @param match The content match to get the default block type from\n * @returns The default block type or null\n */\nfunction defaultBlockAt(match) {\n    for (let i = 0; i < match.edgeCount; i += 1) {\n        const { type } = match.edge(i);\n        if (type.isTextblock && !type.hasRequiredAttrs()) {\n            return type;\n        }\n    }\n    return null;\n}\n\n/**\n * Find children inside a Prosemirror node that match a predicate.\n * @param node The Prosemirror node to search in\n * @param predicate The predicate to match\n * @returns An array of nodes with their positions\n */\nfunction findChildren(node, predicate) {\n    const nodesWithPos = [];\n    node.descendants((child, pos) => {\n        if (predicate(child)) {\n            nodesWithPos.push({\n                node: child,\n                pos,\n            });\n        }\n    });\n    return nodesWithPos;\n}\n\n/**\n * Same as `findChildren` but searches only within a `range`.\n * @param node The Prosemirror node to search in\n * @param range The range to search in\n * @param predicate The predicate to match\n * @returns An array of nodes with their positions\n */\nfunction findChildrenInRange(node, range, predicate) {\n    const nodesWithPos = [];\n    // if (range.from === range.to) {\n    //   const nodeAt = node.nodeAt(range.from)\n    //   if (nodeAt) {\n    //     nodesWithPos.push({\n    //       node: nodeAt,\n    //       pos: range.from,\n    //     })\n    //   }\n    // }\n    node.nodesBetween(range.from, range.to, (child, pos) => {\n        if (predicate(child)) {\n            nodesWithPos.push({\n                node: child,\n                pos,\n            });\n        }\n    });\n    return nodesWithPos;\n}\n\n/**\n * Finds the closest parent node to a resolved position that matches a predicate.\n * @param $pos The resolved position to search from\n * @param predicate The predicate to match\n * @returns The closest parent node to the resolved position that matches the predicate\n * @example ```js\n * findParentNodeClosestToPos($from, node => node.type.name === 'paragraph')\n * ```\n */\nfunction findParentNodeClosestToPos($pos, predicate) {\n    for (let i = $pos.depth; i > 0; i -= 1) {\n        const node = $pos.node(i);\n        if (predicate(node)) {\n            return {\n                pos: i > 0 ? $pos.before(i) : 0,\n                start: $pos.start(i),\n                depth: i,\n                node,\n            };\n        }\n    }\n}\n\n/**\n * Finds the closest parent node to the current selection that matches a predicate.\n * @param predicate The predicate to match\n * @returns A command that finds the closest parent node to the current selection that matches the predicate\n * @example ```js\n * findParentNode(node => node.type.name === 'paragraph')\n * ```\n */\nfunction findParentNode(predicate) {\n    return (selection) => findParentNodeClosestToPos(selection.$from, predicate);\n}\n\nfunction getSchema(extensions, editor) {\n    const resolvedExtensions = ExtensionManager.resolve(extensions);\n    return getSchemaByResolvedExtensions(resolvedExtensions, editor);\n}\n\n/**\n * Generate HTML from a JSONContent\n * @param doc The JSONContent to generate HTML from\n * @param extensions The extensions to use for the schema\n * @returns The generated HTML\n */\nfunction generateHTML(doc, extensions) {\n    const schema = getSchema(extensions);\n    const contentNode = Node$1.fromJSON(schema, doc);\n    return getHTMLFromFragment(contentNode.content, schema);\n}\n\n/**\n * Generate JSONContent from HTML\n * @param html The HTML to generate JSONContent from\n * @param extensions The extensions to use for the schema\n * @returns The generated JSONContent\n */\nfunction generateJSON(html, extensions) {\n    const schema = getSchema(extensions);\n    const dom = elementFromString(html);\n    return DOMParser.fromSchema(schema).parse(dom).toJSON();\n}\n\n/**\n * Gets the text of a Prosemirror node\n * @param node The Prosemirror node\n * @param options Options for the text serializer & block separator\n * @returns The text of the node\n * @example ```js\n * const text = getText(node, { blockSeparator: '\\n' })\n * ```\n */\nfunction getText(node, options) {\n    const range = {\n        from: 0,\n        to: node.content.size,\n    };\n    return getTextBetween(node, range, options);\n}\n\n/**\n * Generate raw text from a JSONContent\n * @param doc The JSONContent to generate text from\n * @param extensions The extensions to use for the schema\n * @param options Options for the text generation f.e. blockSeparator or textSerializers\n * @returns The generated text\n */\nfunction generateText(doc, extensions, options) {\n    const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {};\n    const schema = getSchema(extensions);\n    const contentNode = Node$1.fromJSON(schema, doc);\n    return getText(contentNode, {\n        blockSeparator,\n        textSerializers: {\n            ...getTextSerializersFromSchema(schema),\n            ...textSerializers,\n        },\n    });\n}\n\nfunction getNodeAttributes(state, typeOrName) {\n    const type = getNodeType(typeOrName, state.schema);\n    const { from, to } = state.selection;\n    const nodes = [];\n    state.doc.nodesBetween(from, to, node => {\n        nodes.push(node);\n    });\n    const node = nodes.reverse().find(nodeItem => nodeItem.type.name === type.name);\n    if (!node) {\n        return {};\n    }\n    return { ...node.attrs };\n}\n\n/**\n * Get node or mark attributes by type or name on the current editor state\n * @param state The current editor state\n * @param typeOrName The node or mark type or name\n * @returns The attributes of the node or mark or an empty object\n */\nfunction getAttributes(state, typeOrName) {\n    const schemaType = getSchemaTypeNameByName(typeof typeOrName === 'string' ? typeOrName : typeOrName.name, state.schema);\n    if (schemaType === 'node') {\n        return getNodeAttributes(state, typeOrName);\n    }\n    if (schemaType === 'mark') {\n        return getMarkAttributes(state, typeOrName);\n    }\n    return {};\n}\n\n/**\n * Removes duplicated values within an array.\n * Supports numbers, strings and objects.\n */\nfunction removeDuplicates(array, by = JSON.stringify) {\n    const seen = {};\n    return array.filter(item => {\n        const key = by(item);\n        return Object.prototype.hasOwnProperty.call(seen, key)\n            ? false\n            : (seen[key] = true);\n    });\n}\n\n/**\n * Removes duplicated ranges and ranges that are\n * fully captured by other ranges.\n */\nfunction simplifyChangedRanges(changes) {\n    const uniqueChanges = removeDuplicates(changes);\n    return uniqueChanges.length === 1\n        ? uniqueChanges\n        : uniqueChanges.filter((change, index) => {\n            const rest = uniqueChanges.filter((_, i) => i !== index);\n            return !rest.some(otherChange => {\n                return change.oldRange.from >= otherChange.oldRange.from\n                    && change.oldRange.to <= otherChange.oldRange.to\n                    && change.newRange.from >= otherChange.newRange.from\n                    && change.newRange.to <= otherChange.newRange.to;\n            });\n        });\n}\n/**\n * Returns a list of changed ranges\n * based on the first and last state of all steps.\n */\nfunction getChangedRanges(transform) {\n    const { mapping, steps } = transform;\n    const changes = [];\n    mapping.maps.forEach((stepMap, index) => {\n        const ranges = [];\n        // This accounts for step changes where no range was actually altered\n        // e.g. when setting a mark, node attribute, etc.\n        // @ts-ignore\n        if (!stepMap.ranges.length) {\n            const { from, to } = steps[index];\n            if (from === undefined || to === undefined) {\n                return;\n            }\n            ranges.push({ from, to });\n        }\n        else {\n            stepMap.forEach((from, to) => {\n                ranges.push({ from, to });\n            });\n        }\n        ranges.forEach(({ from, to }) => {\n            const newStart = mapping.slice(index).map(from, -1);\n            const newEnd = mapping.slice(index).map(to);\n            const oldStart = mapping.invert().map(newStart, -1);\n            const oldEnd = mapping.invert().map(newEnd);\n            changes.push({\n                oldRange: {\n                    from: oldStart,\n                    to: oldEnd,\n                },\n                newRange: {\n                    from: newStart,\n                    to: newEnd,\n                },\n            });\n        });\n    });\n    return simplifyChangedRanges(changes);\n}\n\nfunction getDebugJSON(node, startOffset = 0) {\n    const isTopNode = node.type === node.type.schema.topNodeType;\n    const increment = isTopNode ? 0 : 1;\n    const from = startOffset;\n    const to = from + node.nodeSize;\n    const marks = node.marks.map(mark => {\n        const output = {\n            type: mark.type.name,\n        };\n        if (Object.keys(mark.attrs).length) {\n            output.attrs = { ...mark.attrs };\n        }\n        return output;\n    });\n    const attrs = { ...node.attrs };\n    const output = {\n        type: node.type.name,\n        from,\n        to,\n    };\n    if (Object.keys(attrs).length) {\n        output.attrs = attrs;\n    }\n    if (marks.length) {\n        output.marks = marks;\n    }\n    if (node.content.childCount) {\n        output.content = [];\n        node.forEach((child, offset) => {\n            var _a;\n            (_a = output.content) === null || _a === void 0 ? void 0 : _a.push(getDebugJSON(child, startOffset + offset + increment));\n        });\n    }\n    if (node.text) {\n        output.text = node.text;\n    }\n    return output;\n}\n\nfunction getMarksBetween(from, to, doc) {\n    const marks = [];\n    // get all inclusive marks on empty selection\n    if (from === to) {\n        doc\n            .resolve(from)\n            .marks()\n            .forEach(mark => {\n            const $pos = doc.resolve(from);\n            const range = getMarkRange($pos, mark.type);\n            if (!range) {\n                return;\n            }\n            marks.push({\n                mark,\n                ...range,\n            });\n        });\n    }\n    else {\n        doc.nodesBetween(from, to, (node, pos) => {\n            if (!node || (node === null || node === void 0 ? void 0 : node.nodeSize) === undefined) {\n                return;\n            }\n            marks.push(...node.marks.map(mark => ({\n                from: pos,\n                to: pos + node.nodeSize,\n                mark,\n            })));\n        });\n    }\n    return marks;\n}\n\n/**\n * Finds the first node of a given type or name in the current selection.\n * @param state The editor state.\n * @param typeOrName The node type or name.\n * @param pos The position to start searching from.\n * @param maxDepth The maximum depth to search.\n * @returns The node and the depth as an array.\n */\nconst getNodeAtPosition = (state, typeOrName, pos, maxDepth = 20) => {\n    const $pos = state.doc.resolve(pos);\n    let currentDepth = maxDepth;\n    let node = null;\n    while (currentDepth > 0 && node === null) {\n        const currentNode = $pos.node(currentDepth);\n        if ((currentNode === null || currentNode === void 0 ? void 0 : currentNode.type.name) === typeOrName) {\n            node = currentNode;\n        }\n        else {\n            currentDepth -= 1;\n        }\n    }\n    return [node, currentDepth];\n};\n\n/**\n * Return attributes of an extension that should be splitted by keepOnSplit flag\n * @param extensionAttributes Array of extension attributes\n * @param typeName The type of the extension\n * @param attributes The attributes of the extension\n * @returns The splitted attributes\n */\nfunction getSplittedAttributes(extensionAttributes, typeName, attributes) {\n    return Object.fromEntries(Object\n        .entries(attributes)\n        .filter(([name]) => {\n        const extensionAttribute = extensionAttributes.find(item => {\n            return item.type === typeName && item.name === name;\n        });\n        if (!extensionAttribute) {\n            return false;\n        }\n        return extensionAttribute.attribute.keepOnSplit;\n    }));\n}\n\nfunction isMarkActive(state, typeOrName, attributes = {}) {\n    const { empty, ranges } = state.selection;\n    const type = typeOrName ? getMarkType(typeOrName, state.schema) : null;\n    if (empty) {\n        return !!(state.storedMarks || state.selection.$from.marks())\n            .filter(mark => {\n            if (!type) {\n                return true;\n            }\n            return type.name === mark.type.name;\n        })\n            .find(mark => objectIncludes(mark.attrs, attributes, { strict: false }));\n    }\n    let selectionRange = 0;\n    const markRanges = [];\n    ranges.forEach(({ $from, $to }) => {\n        const from = $from.pos;\n        const to = $to.pos;\n        state.doc.nodesBetween(from, to, (node, pos) => {\n            if (!node.isText && !node.marks.length) {\n                return;\n            }\n            const relativeFrom = Math.max(from, pos);\n            const relativeTo = Math.min(to, pos + node.nodeSize);\n            const range = relativeTo - relativeFrom;\n            selectionRange += range;\n            markRanges.push(...node.marks.map(mark => ({\n                mark,\n                from: relativeFrom,\n                to: relativeTo,\n            })));\n        });\n    });\n    if (selectionRange === 0) {\n        return false;\n    }\n    // calculate range of matched mark\n    const matchedRange = markRanges\n        .filter(markRange => {\n        if (!type) {\n            return true;\n        }\n        return type.name === markRange.mark.type.name;\n    })\n        .filter(markRange => objectIncludes(markRange.mark.attrs, attributes, { strict: false }))\n        .reduce((sum, markRange) => sum + markRange.to - markRange.from, 0);\n    // calculate range of marks that excludes the searched mark\n    // for example `code` doesn’t allow any other marks\n    const excludedRange = markRanges\n        .filter(markRange => {\n        if (!type) {\n            return true;\n        }\n        return markRange.mark.type !== type && markRange.mark.type.excludes(type);\n    })\n        .reduce((sum, markRange) => sum + markRange.to - markRange.from, 0);\n    // we only include the result of `excludedRange`\n    // if there is a match at all\n    const range = matchedRange > 0 ? matchedRange + excludedRange : matchedRange;\n    return range >= selectionRange;\n}\n\nfunction isActive(state, name, attributes = {}) {\n    if (!name) {\n        return isNodeActive(state, null, attributes) || isMarkActive(state, null, attributes);\n    }\n    const schemaType = getSchemaTypeNameByName(name, state.schema);\n    if (schemaType === 'node') {\n        return isNodeActive(state, name, attributes);\n    }\n    if (schemaType === 'mark') {\n        return isMarkActive(state, name, attributes);\n    }\n    return false;\n}\n\nconst isAtEndOfNode = (state, nodeType) => {\n    const { $from, $to, $anchor } = state.selection;\n    if (nodeType) {\n        const parentNode = findParentNode(node => node.type.name === nodeType)(state.selection);\n        if (!parentNode) {\n            return false;\n        }\n        const $parentPos = state.doc.resolve(parentNode.pos + 1);\n        if ($anchor.pos + 1 === $parentPos.end()) {\n            return true;\n        }\n        return false;\n    }\n    if ($to.parentOffset < $to.parent.nodeSize - 2 || $from.pos !== $to.pos) {\n        return false;\n    }\n    return true;\n};\n\nconst isAtStartOfNode = (state) => {\n    const { $from, $to } = state.selection;\n    if ($from.parentOffset > 0 || $from.pos !== $to.pos) {\n        return false;\n    }\n    return true;\n};\n\nfunction isList(name, extensions) {\n    const { nodeExtensions } = splitExtensions(extensions);\n    const extension = nodeExtensions.find(item => item.name === name);\n    if (!extension) {\n        return false;\n    }\n    const context = {\n        name: extension.name,\n        options: extension.options,\n        storage: extension.storage,\n    };\n    const group = callOrReturn(getExtensionField(extension, 'group', context));\n    if (typeof group !== 'string') {\n        return false;\n    }\n    return group.split(' ').includes('list');\n}\n\n/**\n * Returns true if the given prosemirror node is empty.\n */\nfunction isNodeEmpty(node, { checkChildren = true, ignoreWhitespace = false, } = {}) {\n    var _a;\n    if (ignoreWhitespace) {\n        if (node.type.name === 'hardBreak') {\n            // Hard breaks are considered empty\n            return true;\n        }\n        if (node.isText) {\n            return /^\\s*$/m.test((_a = node.text) !== null && _a !== void 0 ? _a : '');\n        }\n    }\n    if (node.isText) {\n        return !node.text;\n    }\n    if (node.isAtom || node.isLeaf) {\n        return false;\n    }\n    if (node.content.childCount === 0) {\n        return true;\n    }\n    if (checkChildren) {\n        let isContentEmpty = true;\n        node.content.forEach(childNode => {\n            if (isContentEmpty === false) {\n                // Exit early for perf\n                return;\n            }\n            if (!isNodeEmpty(childNode, { ignoreWhitespace, checkChildren })) {\n                isContentEmpty = false;\n            }\n        });\n        return isContentEmpty;\n    }\n    return false;\n}\n\nfunction isNodeSelection(value) {\n    return value instanceof NodeSelection;\n}\n\nfunction posToDOMRect(view, from, to) {\n    const minPos = 0;\n    const maxPos = view.state.doc.content.size;\n    const resolvedFrom = minMax(from, minPos, maxPos);\n    const resolvedEnd = minMax(to, minPos, maxPos);\n    const start = view.coordsAtPos(resolvedFrom);\n    const end = view.coordsAtPos(resolvedEnd, -1);\n    const top = Math.min(start.top, end.top);\n    const bottom = Math.max(start.bottom, end.bottom);\n    const left = Math.min(start.left, end.left);\n    const right = Math.max(start.right, end.right);\n    const width = right - left;\n    const height = bottom - top;\n    const x = left;\n    const y = top;\n    const data = {\n        top,\n        bottom,\n        left,\n        right,\n        width,\n        height,\n        x,\n        y,\n    };\n    return {\n        ...data,\n        toJSON: () => data,\n    };\n}\n\n/**\n * The actual implementation of the rewriteUnknownContent function\n */\nfunction rewriteUnknownContentInner({ json, validMarks, validNodes, options, rewrittenContent = [], }) {\n    if (json.marks && Array.isArray(json.marks)) {\n        json.marks = json.marks.filter(mark => {\n            const name = typeof mark === 'string' ? mark : mark.type;\n            if (validMarks.has(name)) {\n                return true;\n            }\n            rewrittenContent.push({\n                original: JSON.parse(JSON.stringify(mark)),\n                unsupported: name,\n            });\n            // Just ignore any unknown marks\n            return false;\n        });\n    }\n    if (json.content && Array.isArray(json.content)) {\n        json.content = json.content\n            .map(value => rewriteUnknownContentInner({\n            json: value,\n            validMarks,\n            validNodes,\n            options,\n            rewrittenContent,\n        }).json)\n            .filter(a => a !== null && a !== undefined);\n    }\n    if (json.type && !validNodes.has(json.type)) {\n        rewrittenContent.push({\n            original: JSON.parse(JSON.stringify(json)),\n            unsupported: json.type,\n        });\n        if (json.content && Array.isArray(json.content) && ((options === null || options === void 0 ? void 0 : options.fallbackToParagraph) !== false)) {\n            // Just treat it like a paragraph and hope for the best\n            json.type = 'paragraph';\n            return {\n                json,\n                rewrittenContent,\n            };\n        }\n        // or just omit it entirely\n        return {\n            json: null,\n            rewrittenContent,\n        };\n    }\n    return { json, rewrittenContent };\n}\n/**\n * Rewrite unknown nodes and marks within JSON content\n * Allowing for user within the editor\n */\nfunction rewriteUnknownContent(\n/**\n * The JSON content to clean of unknown nodes and marks\n */\njson, \n/**\n * The schema to use for validation\n */\nschema, \n/**\n * Options for the cleaning process\n */\noptions) {\n    return rewriteUnknownContentInner({\n        json,\n        validNodes: new Set(Object.keys(schema.nodes)),\n        validMarks: new Set(Object.keys(schema.marks)),\n        options,\n    });\n}\n\nfunction canSetMark(state, tr, newMarkType) {\n    var _a;\n    const { selection } = tr;\n    let cursor = null;\n    if (isTextSelection(selection)) {\n        cursor = selection.$cursor;\n    }\n    if (cursor) {\n        const currentMarks = (_a = state.storedMarks) !== null && _a !== void 0 ? _a : cursor.marks();\n        // There can be no current marks that exclude the new mark\n        return (!!newMarkType.isInSet(currentMarks)\n            || !currentMarks.some(mark => mark.type.excludes(newMarkType)));\n    }\n    const { ranges } = selection;\n    return ranges.some(({ $from, $to }) => {\n        let someNodeSupportsMark = $from.depth === 0\n            ? state.doc.inlineContent && state.doc.type.allowsMarkType(newMarkType)\n            : false;\n        state.doc.nodesBetween($from.pos, $to.pos, (node, _pos, parent) => {\n            // If we already found a mark that we can enable, return false to bypass the remaining search\n            if (someNodeSupportsMark) {\n                return false;\n            }\n            if (node.isInline) {\n                const parentAllowsMarkType = !parent || parent.type.allowsMarkType(newMarkType);\n                const currentMarksAllowMarkType = !!newMarkType.isInSet(node.marks)\n                    || !node.marks.some(otherMark => otherMark.type.excludes(newMarkType));\n                someNodeSupportsMark = parentAllowsMarkType && currentMarksAllowMarkType;\n            }\n            return !someNodeSupportsMark;\n        });\n        return someNodeSupportsMark;\n    });\n}\nconst setMark = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => {\n    const { selection } = tr;\n    const { empty, ranges } = selection;\n    const type = getMarkType(typeOrName, state.schema);\n    if (dispatch) {\n        if (empty) {\n            const oldAttributes = getMarkAttributes(state, type);\n            tr.addStoredMark(type.create({\n                ...oldAttributes,\n                ...attributes,\n            }));\n        }\n        else {\n            ranges.forEach(range => {\n                const from = range.$from.pos;\n                const to = range.$to.pos;\n                state.doc.nodesBetween(from, to, (node, pos) => {\n                    const trimmedFrom = Math.max(pos, from);\n                    const trimmedTo = Math.min(pos + node.nodeSize, to);\n                    const someHasMark = node.marks.find(mark => mark.type === type);\n                    // if there is already a mark of this type\n                    // we know that we have to merge its attributes\n                    // otherwise we add a fresh new mark\n                    if (someHasMark) {\n                        node.marks.forEach(mark => {\n                            if (type === mark.type) {\n                                tr.addMark(trimmedFrom, trimmedTo, type.create({\n                                    ...mark.attrs,\n                                    ...attributes,\n                                }));\n                            }\n                        });\n                    }\n                    else {\n                        tr.addMark(trimmedFrom, trimmedTo, type.create(attributes));\n                    }\n                });\n            });\n        }\n    }\n    return canSetMark(state, tr, type);\n};\n\nconst setMeta = (key, value) => ({ tr }) => {\n    tr.setMeta(key, value);\n    return true;\n};\n\nconst setNode = (typeOrName, attributes = {}) => ({ state, dispatch, chain }) => {\n    const type = getNodeType(typeOrName, state.schema);\n    let attributesToCopy;\n    if (state.selection.$anchor.sameParent(state.selection.$head)) {\n        // only copy attributes if the selection is pointing to a node of the same type\n        attributesToCopy = state.selection.$anchor.parent.attrs;\n    }\n    // TODO: use a fallback like insertContent?\n    if (!type.isTextblock) {\n        console.warn('[tiptap warn]: Currently \"setNode()\" only supports text block nodes.');\n        return false;\n    }\n    return (chain()\n        // try to convert node to default node if needed\n        .command(({ commands }) => {\n        const canSetBlock = setBlockType(type, { ...attributesToCopy, ...attributes })(state);\n        if (canSetBlock) {\n            return true;\n        }\n        return commands.clearNodes();\n    })\n        .command(({ state: updatedState }) => {\n        return setBlockType(type, { ...attributesToCopy, ...attributes })(updatedState, dispatch);\n    })\n        .run());\n};\n\nconst setNodeSelection = position => ({ tr, dispatch }) => {\n    if (dispatch) {\n        const { doc } = tr;\n        const from = minMax(position, 0, doc.content.size);\n        const selection = NodeSelection.create(doc, from);\n        tr.setSelection(selection);\n    }\n    return true;\n};\n\nconst setTextSelection = position => ({ tr, dispatch }) => {\n    if (dispatch) {\n        const { doc } = tr;\n        const { from, to } = typeof position === 'number' ? { from: position, to: position } : position;\n        const minPos = TextSelection.atStart(doc).from;\n        const maxPos = TextSelection.atEnd(doc).to;\n        const resolvedFrom = minMax(from, minPos, maxPos);\n        const resolvedEnd = minMax(to, minPos, maxPos);\n        const selection = TextSelection.create(doc, resolvedFrom, resolvedEnd);\n        tr.setSelection(selection);\n    }\n    return true;\n};\n\nconst sinkListItem = typeOrName => ({ state, dispatch }) => {\n    const type = getNodeType(typeOrName, state.schema);\n    return sinkListItem$1(type)(state, dispatch);\n};\n\nfunction ensureMarks(state, splittableMarks) {\n    const marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks());\n    if (marks) {\n        const filteredMarks = marks.filter(mark => splittableMarks === null || splittableMarks === void 0 ? void 0 : splittableMarks.includes(mark.type.name));\n        state.tr.ensureMarks(filteredMarks);\n    }\n}\nconst splitBlock = ({ keepMarks = true } = {}) => ({ tr, state, dispatch, editor, }) => {\n    const { selection, doc } = tr;\n    const { $from, $to } = selection;\n    const extensionAttributes = editor.extensionManager.attributes;\n    const newAttributes = getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs);\n    if (selection instanceof NodeSelection && selection.node.isBlock) {\n        if (!$from.parentOffset || !canSplit(doc, $from.pos)) {\n            return false;\n        }\n        if (dispatch) {\n            if (keepMarks) {\n                ensureMarks(state, editor.extensionManager.splittableMarks);\n            }\n            tr.split($from.pos).scrollIntoView();\n        }\n        return true;\n    }\n    if (!$from.parent.isBlock) {\n        return false;\n    }\n    const atEnd = $to.parentOffset === $to.parent.content.size;\n    const deflt = $from.depth === 0\n        ? undefined\n        : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));\n    let types = atEnd && deflt\n        ? [\n            {\n                type: deflt,\n                attrs: newAttributes,\n            },\n        ]\n        : undefined;\n    let can = canSplit(tr.doc, tr.mapping.map($from.pos), 1, types);\n    if (!types\n        && !can\n        && canSplit(tr.doc, tr.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : undefined)) {\n        can = true;\n        types = deflt\n            ? [\n                {\n                    type: deflt,\n                    attrs: newAttributes,\n                },\n            ]\n            : undefined;\n    }\n    if (dispatch) {\n        if (can) {\n            if (selection instanceof TextSelection) {\n                tr.deleteSelection();\n            }\n            tr.split(tr.mapping.map($from.pos), 1, types);\n            if (deflt && !atEnd && !$from.parentOffset && $from.parent.type !== deflt) {\n                const first = tr.mapping.map($from.before());\n                const $first = tr.doc.resolve(first);\n                if ($from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt)) {\n                    tr.setNodeMarkup(tr.mapping.map($from.before()), deflt);\n                }\n            }\n        }\n        if (keepMarks) {\n            ensureMarks(state, editor.extensionManager.splittableMarks);\n        }\n        tr.scrollIntoView();\n    }\n    return can;\n};\n\nconst splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr, state, dispatch, editor, }) => {\n    var _a;\n    const type = getNodeType(typeOrName, state.schema);\n    const { $from, $to } = state.selection;\n    // @ts-ignore\n    // eslint-disable-next-line\n    const node = state.selection.node;\n    if ((node && node.isBlock) || $from.depth < 2 || !$from.sameParent($to)) {\n        return false;\n    }\n    const grandParent = $from.node(-1);\n    if (grandParent.type !== type) {\n        return false;\n    }\n    const extensionAttributes = editor.extensionManager.attributes;\n    if ($from.parent.content.size === 0 && $from.node(-1).childCount === $from.indexAfter(-1)) {\n        // In an empty block. If this is a nested list, the wrapping\n        // list item should be split. Otherwise, bail out and let next\n        // command handle lifting.\n        if ($from.depth === 2\n            || $from.node(-3).type !== type\n            || $from.index(-2) !== $from.node(-2).childCount - 1) {\n            return false;\n        }\n        if (dispatch) {\n            let wrap = Fragment.empty;\n            // eslint-disable-next-line\n            const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;\n            // Build a fragment containing empty versions of the structure\n            // from the outer list item to the parent node of the cursor\n            for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1) {\n                wrap = Fragment.from($from.node(d).copy(wrap));\n            }\n            // eslint-disable-next-line\n            const depthAfter = $from.indexAfter(-1) < $from.node(-2).childCount ? 1 : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3;\n            // Add a second list item with an empty default start node\n            const newNextTypeAttributes = {\n                ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs),\n                ...overrideAttrs,\n            };\n            const nextType = ((_a = type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.createAndFill(newNextTypeAttributes)) || undefined;\n            wrap = wrap.append(Fragment.from(type.createAndFill(null, nextType) || undefined));\n            const start = $from.before($from.depth - (depthBefore - 1));\n            tr.replace(start, $from.after(-depthAfter), new Slice(wrap, 4 - depthBefore, 0));\n            let sel = -1;\n            tr.doc.nodesBetween(start, tr.doc.content.size, (n, pos) => {\n                if (sel > -1) {\n                    return false;\n                }\n                if (n.isTextblock && n.content.size === 0) {\n                    sel = pos + 1;\n                }\n            });\n            if (sel > -1) {\n                tr.setSelection(TextSelection.near(tr.doc.resolve(sel)));\n            }\n            tr.scrollIntoView();\n        }\n        return true;\n    }\n    const nextType = $to.pos === $from.end() ? grandParent.contentMatchAt(0).defaultType : null;\n    const newTypeAttributes = {\n        ...getSplittedAttributes(extensionAttributes, grandParent.type.name, grandParent.attrs),\n        ...overrideAttrs,\n    };\n    const newNextTypeAttributes = {\n        ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs),\n        ...overrideAttrs,\n    };\n    tr.delete($from.pos, $to.pos);\n    const types = nextType\n        ? [\n            { type, attrs: newTypeAttributes },\n            { type: nextType, attrs: newNextTypeAttributes },\n        ]\n        : [{ type, attrs: newTypeAttributes }];\n    if (!canSplit(tr.doc, $from.pos, 2)) {\n        return false;\n    }\n    if (dispatch) {\n        const { selection, storedMarks } = state;\n        const { splittableMarks } = editor.extensionManager;\n        const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks());\n        tr.split($from.pos, 2, types).scrollIntoView();\n        if (!marks || !dispatch) {\n            return true;\n        }\n        const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name));\n        tr.ensureMarks(filteredMarks);\n    }\n    return true;\n};\n\nconst joinListBackwards = (tr, listType) => {\n    const list = findParentNode(node => node.type === listType)(tr.selection);\n    if (!list) {\n        return true;\n    }\n    const before = tr.doc.resolve(Math.max(0, list.pos - 1)).before(list.depth);\n    if (before === undefined) {\n        return true;\n    }\n    const nodeBefore = tr.doc.nodeAt(before);\n    const canJoinBackwards = list.node.type === (nodeBefore === null || nodeBefore === void 0 ? void 0 : nodeBefore.type) && canJoin(tr.doc, list.pos);\n    if (!canJoinBackwards) {\n        return true;\n    }\n    tr.join(list.pos);\n    return true;\n};\nconst joinListForwards = (tr, listType) => {\n    const list = findParentNode(node => node.type === listType)(tr.selection);\n    if (!list) {\n        return true;\n    }\n    const after = tr.doc.resolve(list.start).after(list.depth);\n    if (after === undefined) {\n        return true;\n    }\n    const nodeAfter = tr.doc.nodeAt(after);\n    const canJoinForwards = list.node.type === (nodeAfter === null || nodeAfter === void 0 ? void 0 : nodeAfter.type) && canJoin(tr.doc, after);\n    if (!canJoinForwards) {\n        return true;\n    }\n    tr.join(after);\n    return true;\n};\nconst toggleList = (listTypeOrName, itemTypeOrName, keepMarks, attributes = {}) => ({ editor, tr, state, dispatch, chain, commands, can, }) => {\n    const { extensions, splittableMarks } = editor.extensionManager;\n    const listType = getNodeType(listTypeOrName, state.schema);\n    const itemType = getNodeType(itemTypeOrName, state.schema);\n    const { selection, storedMarks } = state;\n    const { $from, $to } = selection;\n    const range = $from.blockRange($to);\n    const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks());\n    if (!range) {\n        return false;\n    }\n    const parentList = findParentNode(node => isList(node.type.name, extensions))(selection);\n    if (range.depth >= 1 && parentList && range.depth - parentList.depth <= 1) {\n        // remove list\n        if (parentList.node.type === listType) {\n            return commands.liftListItem(itemType);\n        }\n        // change list type\n        if (isList(parentList.node.type.name, extensions)\n            && listType.validContent(parentList.node.content)\n            && dispatch) {\n            return chain()\n                .command(() => {\n                tr.setNodeMarkup(parentList.pos, listType);\n                return true;\n            })\n                .command(() => joinListBackwards(tr, listType))\n                .command(() => joinListForwards(tr, listType))\n                .run();\n        }\n    }\n    if (!keepMarks || !marks || !dispatch) {\n        return chain()\n            // try to convert node to default node if needed\n            .command(() => {\n            const canWrapInList = can().wrapInList(listType, attributes);\n            if (canWrapInList) {\n                return true;\n            }\n            return commands.clearNodes();\n        })\n            .wrapInList(listType, attributes)\n            .command(() => joinListBackwards(tr, listType))\n            .command(() => joinListForwards(tr, listType))\n            .run();\n    }\n    return (chain()\n        // try to convert node to default node if needed\n        .command(() => {\n        const canWrapInList = can().wrapInList(listType, attributes);\n        const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name));\n        tr.ensureMarks(filteredMarks);\n        if (canWrapInList) {\n            return true;\n        }\n        return commands.clearNodes();\n    })\n        .wrapInList(listType, attributes)\n        .command(() => joinListBackwards(tr, listType))\n        .command(() => joinListForwards(tr, listType))\n        .run());\n};\n\nconst toggleMark = (typeOrName, attributes = {}, options = {}) => ({ state, commands }) => {\n    const { extendEmptyMarkRange = false } = options;\n    const type = getMarkType(typeOrName, state.schema);\n    const isActive = isMarkActive(state, type, attributes);\n    if (isActive) {\n        return commands.unsetMark(type, { extendEmptyMarkRange });\n    }\n    return commands.setMark(type, attributes);\n};\n\nconst toggleNode = (typeOrName, toggleTypeOrName, attributes = {}) => ({ state, commands }) => {\n    const type = getNodeType(typeOrName, state.schema);\n    const toggleType = getNodeType(toggleTypeOrName, state.schema);\n    const isActive = isNodeActive(state, type, attributes);\n    let attributesToCopy;\n    if (state.selection.$anchor.sameParent(state.selection.$head)) {\n        // only copy attributes if the selection is pointing to a node of the same type\n        attributesToCopy = state.selection.$anchor.parent.attrs;\n    }\n    if (isActive) {\n        return commands.setNode(toggleType, attributesToCopy);\n    }\n    // If the node is not active, we want to set the new node type with the given attributes\n    // Copying over the attributes from the current node if the selection is pointing to a node of the same type\n    return commands.setNode(type, { ...attributesToCopy, ...attributes });\n};\n\nconst toggleWrap = (typeOrName, attributes = {}) => ({ state, commands }) => {\n    const type = getNodeType(typeOrName, state.schema);\n    const isActive = isNodeActive(state, type, attributes);\n    if (isActive) {\n        return commands.lift(type);\n    }\n    return commands.wrapIn(type, attributes);\n};\n\nconst undoInputRule = () => ({ state, dispatch }) => {\n    const plugins = state.plugins;\n    for (let i = 0; i < plugins.length; i += 1) {\n        const plugin = plugins[i];\n        let undoable;\n        // @ts-ignore\n        // eslint-disable-next-line\n        if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) {\n            if (dispatch) {\n                const tr = state.tr;\n                const toUndo = undoable.transform;\n                for (let j = toUndo.steps.length - 1; j >= 0; j -= 1) {\n                    tr.step(toUndo.steps[j].invert(toUndo.docs[j]));\n                }\n                if (undoable.text) {\n                    const marks = tr.doc.resolve(undoable.from).marks();\n                    tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks));\n                }\n                else {\n                    tr.delete(undoable.from, undoable.to);\n                }\n            }\n            return true;\n        }\n    }\n    return false;\n};\n\nconst unsetAllMarks = () => ({ tr, dispatch }) => {\n    const { selection } = tr;\n    const { empty, ranges } = selection;\n    if (empty) {\n        return true;\n    }\n    if (dispatch) {\n        ranges.forEach(range => {\n            tr.removeMark(range.$from.pos, range.$to.pos);\n        });\n    }\n    return true;\n};\n\nconst unsetMark = (typeOrName, options = {}) => ({ tr, state, dispatch }) => {\n    var _a;\n    const { extendEmptyMarkRange = false } = options;\n    const { selection } = tr;\n    const type = getMarkType(typeOrName, state.schema);\n    const { $from, empty, ranges } = selection;\n    if (!dispatch) {\n        return true;\n    }\n    if (empty && extendEmptyMarkRange) {\n        let { from, to } = selection;\n        const attrs = (_a = $from.marks().find(mark => mark.type === type)) === null || _a === void 0 ? void 0 : _a.attrs;\n        const range = getMarkRange($from, type, attrs);\n        if (range) {\n            from = range.from;\n            to = range.to;\n        }\n        tr.removeMark(from, to, type);\n    }\n    else {\n        ranges.forEach(range => {\n            tr.removeMark(range.$from.pos, range.$to.pos, type);\n        });\n    }\n    tr.removeStoredMark(type);\n    return true;\n};\n\nconst updateAttributes = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => {\n    let nodeType = null;\n    let markType = null;\n    const schemaType = getSchemaTypeNameByName(typeof typeOrName === 'string' ? typeOrName : typeOrName.name, state.schema);\n    if (!schemaType) {\n        return false;\n    }\n    if (schemaType === 'node') {\n        nodeType = getNodeType(typeOrName, state.schema);\n    }\n    if (schemaType === 'mark') {\n        markType = getMarkType(typeOrName, state.schema);\n    }\n    if (dispatch) {\n        tr.selection.ranges.forEach((range) => {\n            const from = range.$from.pos;\n            const to = range.$to.pos;\n            let lastPos;\n            let lastNode;\n            let trimmedFrom;\n            let trimmedTo;\n            if (tr.selection.empty) {\n                state.doc.nodesBetween(from, to, (node, pos) => {\n                    if (nodeType && nodeType === node.type) {\n                        trimmedFrom = Math.max(pos, from);\n                        trimmedTo = Math.min(pos + node.nodeSize, to);\n                        lastPos = pos;\n                        lastNode = node;\n                    }\n                });\n            }\n            else {\n                state.doc.nodesBetween(from, to, (node, pos) => {\n                    if (pos < from && nodeType && nodeType === node.type) {\n                        trimmedFrom = Math.max(pos, from);\n                        trimmedTo = Math.min(pos + node.nodeSize, to);\n                        lastPos = pos;\n                        lastNode = node;\n                    }\n                    if (pos >= from && pos <= to) {\n                        if (nodeType && nodeType === node.type) {\n                            tr.setNodeMarkup(pos, undefined, {\n                                ...node.attrs,\n                                ...attributes,\n                            });\n                        }\n                        if (markType && node.marks.length) {\n                            node.marks.forEach((mark) => {\n                                if (markType === mark.type) {\n                                    const trimmedFrom2 = Math.max(pos, from);\n                                    const trimmedTo2 = Math.min(pos + node.nodeSize, to);\n                                    tr.addMark(trimmedFrom2, trimmedTo2, markType.create({\n                                        ...mark.attrs,\n                                        ...attributes,\n                                    }));\n                                }\n                            });\n                        }\n                    }\n                });\n            }\n            if (lastNode) {\n                if (lastPos !== undefined) {\n                    tr.setNodeMarkup(lastPos, undefined, {\n                        ...lastNode.attrs,\n                        ...attributes,\n                    });\n                }\n                if (markType && lastNode.marks.length) {\n                    lastNode.marks.forEach((mark) => {\n                        if (markType === mark.type) {\n                            tr.addMark(trimmedFrom, trimmedTo, markType.create({\n                                ...mark.attrs,\n                                ...attributes,\n                            }));\n                        }\n                    });\n                }\n            }\n        });\n    }\n    return true;\n};\n\nconst wrapIn = (typeOrName, attributes = {}) => ({ state, dispatch }) => {\n    const type = getNodeType(typeOrName, state.schema);\n    return wrapIn$1(type, attributes)(state, dispatch);\n};\n\nconst wrapInList = (typeOrName, attributes = {}) => ({ state, dispatch }) => {\n    const type = getNodeType(typeOrName, state.schema);\n    return wrapInList$1(type, attributes)(state, dispatch);\n};\n\nvar commands = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  blur: blur,\n  clearContent: clearContent,\n  clearNodes: clearNodes,\n  command: command,\n  createParagraphNear: createParagraphNear,\n  cut: cut,\n  deleteCurrentNode: deleteCurrentNode,\n  deleteNode: deleteNode,\n  deleteRange: deleteRange,\n  deleteSelection: deleteSelection,\n  enter: enter,\n  exitCode: exitCode,\n  extendMarkRange: extendMarkRange,\n  first: first,\n  focus: focus,\n  forEach: forEach,\n  insertContent: insertContent,\n  insertContentAt: insertContentAt,\n  joinBackward: joinBackward,\n  joinDown: joinDown,\n  joinForward: joinForward,\n  joinItemBackward: joinItemBackward,\n  joinItemForward: joinItemForward,\n  joinTextblockBackward: joinTextblockBackward,\n  joinTextblockForward: joinTextblockForward,\n  joinUp: joinUp,\n  keyboardShortcut: keyboardShortcut,\n  lift: lift,\n  liftEmptyBlock: liftEmptyBlock,\n  liftListItem: liftListItem,\n  newlineInCode: newlineInCode,\n  resetAttributes: resetAttributes,\n  scrollIntoView: scrollIntoView,\n  selectAll: selectAll,\n  selectNodeBackward: selectNodeBackward,\n  selectNodeForward: selectNodeForward,\n  selectParentNode: selectParentNode,\n  selectTextblockEnd: selectTextblockEnd,\n  selectTextblockStart: selectTextblockStart,\n  setContent: setContent,\n  setMark: setMark,\n  setMeta: setMeta,\n  setNode: setNode,\n  setNodeSelection: setNodeSelection,\n  setTextSelection: setTextSelection,\n  sinkListItem: sinkListItem,\n  splitBlock: splitBlock,\n  splitListItem: splitListItem,\n  toggleList: toggleList,\n  toggleMark: toggleMark,\n  toggleNode: toggleNode,\n  toggleWrap: toggleWrap,\n  undoInputRule: undoInputRule,\n  unsetAllMarks: unsetAllMarks,\n  unsetMark: unsetMark,\n  updateAttributes: updateAttributes,\n  wrapIn: wrapIn,\n  wrapInList: wrapInList\n});\n\nconst Commands = Extension.create({\n    name: 'commands',\n    addCommands() {\n        return {\n            ...commands,\n        };\n    },\n});\n\nconst Drop = Extension.create({\n    name: 'drop',\n    addProseMirrorPlugins() {\n        return [\n            new Plugin({\n                key: new PluginKey('tiptapDrop'),\n                props: {\n                    handleDrop: (_, e, slice, moved) => {\n                        this.editor.emit('drop', {\n                            editor: this.editor,\n                            event: e,\n                            slice,\n                            moved,\n                        });\n                    },\n                },\n            }),\n        ];\n    },\n});\n\nconst Editable = Extension.create({\n    name: 'editable',\n    addProseMirrorPlugins() {\n        return [\n            new Plugin({\n                key: new PluginKey('editable'),\n                props: {\n                    editable: () => this.editor.options.editable,\n                },\n            }),\n        ];\n    },\n});\n\nconst focusEventsPluginKey = new PluginKey('focusEvents');\nconst FocusEvents = Extension.create({\n    name: 'focusEvents',\n    addProseMirrorPlugins() {\n        const { editor } = this;\n        return [\n            new Plugin({\n                key: focusEventsPluginKey,\n                props: {\n                    handleDOMEvents: {\n                        focus: (view, event) => {\n                            editor.isFocused = true;\n                            const transaction = editor.state.tr\n                                .setMeta('focus', { event })\n                                .setMeta('addToHistory', false);\n                            view.dispatch(transaction);\n                            return false;\n                        },\n                        blur: (view, event) => {\n                            editor.isFocused = false;\n                            const transaction = editor.state.tr\n                                .setMeta('blur', { event })\n                                .setMeta('addToHistory', false);\n                            view.dispatch(transaction);\n                            return false;\n                        },\n                    },\n                },\n            }),\n        ];\n    },\n});\n\nconst Keymap = Extension.create({\n    name: 'keymap',\n    addKeyboardShortcuts() {\n        const handleBackspace = () => this.editor.commands.first(({ commands }) => [\n            () => commands.undoInputRule(),\n            // maybe convert first text block node to default node\n            () => commands.command(({ tr }) => {\n                const { selection, doc } = tr;\n                const { empty, $anchor } = selection;\n                const { pos, parent } = $anchor;\n                const $parentPos = $anchor.parent.isTextblock && pos > 0 ? tr.doc.resolve(pos - 1) : $anchor;\n                const parentIsIsolating = $parentPos.parent.type.spec.isolating;\n                const parentPos = $anchor.pos - $anchor.parentOffset;\n                const isAtStart = (parentIsIsolating && $parentPos.parent.childCount === 1)\n                    ? parentPos === $anchor.pos\n                    : Selection.atStart(doc).from === pos;\n                if (!empty\n                    || !parent.type.isTextblock\n                    || parent.textContent.length\n                    || !isAtStart\n                    || (isAtStart && $anchor.parent.type.name === 'paragraph') // prevent clearNodes when no nodes to clear, otherwise history stack is appended\n                ) {\n                    return false;\n                }\n                return commands.clearNodes();\n            }),\n            () => commands.deleteSelection(),\n            () => commands.joinBackward(),\n            () => commands.selectNodeBackward(),\n        ]);\n        const handleDelete = () => this.editor.commands.first(({ commands }) => [\n            () => commands.deleteSelection(),\n            () => commands.deleteCurrentNode(),\n            () => commands.joinForward(),\n            () => commands.selectNodeForward(),\n        ]);\n        const handleEnter = () => this.editor.commands.first(({ commands }) => [\n            () => commands.newlineInCode(),\n            () => commands.createParagraphNear(),\n            () => commands.liftEmptyBlock(),\n            () => commands.splitBlock(),\n        ]);\n        const baseKeymap = {\n            Enter: handleEnter,\n            'Mod-Enter': () => this.editor.commands.exitCode(),\n            Backspace: handleBackspace,\n            'Mod-Backspace': handleBackspace,\n            'Shift-Backspace': handleBackspace,\n            Delete: handleDelete,\n            'Mod-Delete': handleDelete,\n            'Mod-a': () => this.editor.commands.selectAll(),\n        };\n        const pcKeymap = {\n            ...baseKeymap,\n        };\n        const macKeymap = {\n            ...baseKeymap,\n            'Ctrl-h': handleBackspace,\n            'Alt-Backspace': handleBackspace,\n            'Ctrl-d': handleDelete,\n            'Ctrl-Alt-Backspace': handleDelete,\n            'Alt-Delete': handleDelete,\n            'Alt-d': handleDelete,\n            'Ctrl-a': () => this.editor.commands.selectTextblockStart(),\n            'Ctrl-e': () => this.editor.commands.selectTextblockEnd(),\n        };\n        if (isiOS() || isMacOS()) {\n            return macKeymap;\n        }\n        return pcKeymap;\n    },\n    addProseMirrorPlugins() {\n        return [\n            // With this plugin we check if the whole document was selected and deleted.\n            // In this case we will additionally call `clearNodes()` to convert e.g. a heading\n            // to a paragraph if necessary.\n            // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well\n            // with many other commands.\n            new Plugin({\n                key: new PluginKey('clearDocument'),\n                appendTransaction: (transactions, oldState, newState) => {\n                    if (transactions.some(tr => tr.getMeta('composition'))) {\n                        return;\n                    }\n                    const docChanges = transactions.some(transaction => transaction.docChanged)\n                        && !oldState.doc.eq(newState.doc);\n                    const ignoreTr = transactions.some(transaction => transaction.getMeta('preventClearDocument'));\n                    if (!docChanges || ignoreTr) {\n                        return;\n                    }\n                    const { empty, from, to } = oldState.selection;\n                    const allFrom = Selection.atStart(oldState.doc).from;\n                    const allEnd = Selection.atEnd(oldState.doc).to;\n                    const allWasSelected = from === allFrom && to === allEnd;\n                    if (empty || !allWasSelected) {\n                        return;\n                    }\n                    const isEmpty = isNodeEmpty(newState.doc);\n                    if (!isEmpty) {\n                        return;\n                    }\n                    const tr = newState.tr;\n                    const state = createChainableState({\n                        state: newState,\n                        transaction: tr,\n                    });\n                    const { commands } = new CommandManager({\n                        editor: this.editor,\n                        state,\n                    });\n                    commands.clearNodes();\n                    if (!tr.steps.length) {\n                        return;\n                    }\n                    return tr;\n                },\n            }),\n        ];\n    },\n});\n\nconst Paste = Extension.create({\n    name: 'paste',\n    addProseMirrorPlugins() {\n        return [\n            new Plugin({\n                key: new PluginKey('tiptapPaste'),\n                props: {\n                    handlePaste: (_view, e, slice) => {\n                        this.editor.emit('paste', {\n                            editor: this.editor,\n                            event: e,\n                            slice,\n                        });\n                    },\n                },\n            }),\n        ];\n    },\n});\n\nconst Tabindex = Extension.create({\n    name: 'tabindex',\n    addProseMirrorPlugins() {\n        return [\n            new Plugin({\n                key: new PluginKey('tabindex'),\n                props: {\n                    attributes: () => (this.editor.isEditable ? { tabindex: '0' } : {}),\n                },\n            }),\n        ];\n    },\n});\n\nvar index = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  ClipboardTextSerializer: ClipboardTextSerializer,\n  Commands: Commands,\n  Drop: Drop,\n  Editable: Editable,\n  FocusEvents: FocusEvents,\n  Keymap: Keymap,\n  Paste: Paste,\n  Tabindex: Tabindex,\n  focusEventsPluginKey: focusEventsPluginKey\n});\n\nclass NodePos {\n    get name() {\n        return this.node.type.name;\n    }\n    constructor(pos, editor, isBlock = false, node = null) {\n        this.currentNode = null;\n        this.actualDepth = null;\n        this.isBlock = isBlock;\n        this.resolvedPos = pos;\n        this.editor = editor;\n        this.currentNode = node;\n    }\n    get node() {\n        return this.currentNode || this.resolvedPos.node();\n    }\n    get element() {\n        return this.editor.view.domAtPos(this.pos).node;\n    }\n    get depth() {\n        var _a;\n        return (_a = this.actualDepth) !== null && _a !== void 0 ? _a : this.resolvedPos.depth;\n    }\n    get pos() {\n        return this.resolvedPos.pos;\n    }\n    get content() {\n        return this.node.content;\n    }\n    set content(content) {\n        let from = this.from;\n        let to = this.to;\n        if (this.isBlock) {\n            if (this.content.size === 0) {\n                console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);\n                return;\n            }\n            from = this.from + 1;\n            to = this.to - 1;\n        }\n        this.editor.commands.insertContentAt({ from, to }, content);\n    }\n    get attributes() {\n        return this.node.attrs;\n    }\n    get textContent() {\n        return this.node.textContent;\n    }\n    get size() {\n        return this.node.nodeSize;\n    }\n    get from() {\n        if (this.isBlock) {\n            return this.pos;\n        }\n        return this.resolvedPos.start(this.resolvedPos.depth);\n    }\n    get range() {\n        return {\n            from: this.from,\n            to: this.to,\n        };\n    }\n    get to() {\n        if (this.isBlock) {\n            return this.pos + this.size;\n        }\n        return this.resolvedPos.end(this.resolvedPos.depth) + (this.node.isText ? 0 : 1);\n    }\n    get parent() {\n        if (this.depth === 0) {\n            return null;\n        }\n        const parentPos = this.resolvedPos.start(this.resolvedPos.depth - 1);\n        const $pos = this.resolvedPos.doc.resolve(parentPos);\n        return new NodePos($pos, this.editor);\n    }\n    get before() {\n        let $pos = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2));\n        if ($pos.depth !== this.depth) {\n            $pos = this.resolvedPos.doc.resolve(this.from - 3);\n        }\n        return new NodePos($pos, this.editor);\n    }\n    get after() {\n        let $pos = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1));\n        if ($pos.depth !== this.depth) {\n            $pos = this.resolvedPos.doc.resolve(this.to + 3);\n        }\n        return new NodePos($pos, this.editor);\n    }\n    get children() {\n        const children = [];\n        this.node.content.forEach((node, offset) => {\n            const isBlock = node.isBlock && !node.isTextblock;\n            const isNonTextAtom = node.isAtom && !node.isText;\n            const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1);\n            // Check if targetPos is within valid document range\n            if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) {\n                return;\n            }\n            const $pos = this.resolvedPos.doc.resolve(targetPos);\n            if (!isBlock && $pos.depth <= this.depth) {\n                return;\n            }\n            const childNodePos = new NodePos($pos, this.editor, isBlock, isBlock ? node : null);\n            if (isBlock) {\n                childNodePos.actualDepth = this.depth + 1;\n            }\n            children.push(new NodePos($pos, this.editor, isBlock, isBlock ? node : null));\n        });\n        return children;\n    }\n    get firstChild() {\n        return this.children[0] || null;\n    }\n    get lastChild() {\n        const children = this.children;\n        return children[children.length - 1] || null;\n    }\n    closest(selector, attributes = {}) {\n        let node = null;\n        let currentNode = this.parent;\n        while (currentNode && !node) {\n            if (currentNode.node.type.name === selector) {\n                if (Object.keys(attributes).length > 0) {\n                    const nodeAttributes = currentNode.node.attrs;\n                    const attrKeys = Object.keys(attributes);\n                    for (let index = 0; index < attrKeys.length; index += 1) {\n                        const key = attrKeys[index];\n                        if (nodeAttributes[key] !== attributes[key]) {\n                            break;\n                        }\n                    }\n                }\n                else {\n                    node = currentNode;\n                }\n            }\n            currentNode = currentNode.parent;\n        }\n        return node;\n    }\n    querySelector(selector, attributes = {}) {\n        return this.querySelectorAll(selector, attributes, true)[0] || null;\n    }\n    querySelectorAll(selector, attributes = {}, firstItemOnly = false) {\n        let nodes = [];\n        if (!this.children || this.children.length === 0) {\n            return nodes;\n        }\n        const attrKeys = Object.keys(attributes);\n        /**\n         * Finds all children recursively that match the selector and attributes\n         * If firstItemOnly is true, it will return the first item found\n         */\n        this.children.forEach(childPos => {\n            // If we already found a node and we only want the first item, we dont need to keep going\n            if (firstItemOnly && nodes.length > 0) {\n                return;\n            }\n            if (childPos.node.type.name === selector) {\n                const doesAllAttributesMatch = attrKeys.every(key => attributes[key] === childPos.node.attrs[key]);\n                if (doesAllAttributesMatch) {\n                    nodes.push(childPos);\n                }\n            }\n            // If we already found a node and we only want the first item, we can stop here and skip the recursion\n            if (firstItemOnly && nodes.length > 0) {\n                return;\n            }\n            nodes = nodes.concat(childPos.querySelectorAll(selector, attributes, firstItemOnly));\n        });\n        return nodes;\n    }\n    setAttribute(attributes) {\n        const { tr } = this.editor.state;\n        tr.setNodeMarkup(this.from, undefined, {\n            ...this.node.attrs,\n            ...attributes,\n        });\n        this.editor.view.dispatch(tr);\n    }\n}\n\nconst style = `.ProseMirror {\n  position: relative;\n}\n\n.ProseMirror {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  white-space: break-spaces;\n  -webkit-font-variant-ligatures: none;\n  font-variant-ligatures: none;\n  font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n  white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n  white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n  white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n  display: inline !important;\n  border: none !important;\n  margin: 0 !important;\n  width: 0 !important;\n  height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n  display: none;\n  pointer-events: none;\n  position: absolute;\n  margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n  content: \"\";\n  display: block;\n  position: absolute;\n  top: -2px;\n  width: 20px;\n  border-top: 1px solid black;\n  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n  to {\n    visibility: hidden;\n  }\n}\n\n.ProseMirror-hideselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection * {\n  caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n  display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n  opacity: 0\n}`;\n\nfunction createStyleTag(style, nonce, suffix) {\n    const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ''}]`);\n    if (tiptapStyleTag !== null) {\n        return tiptapStyleTag;\n    }\n    const styleNode = document.createElement('style');\n    if (nonce) {\n        styleNode.setAttribute('nonce', nonce);\n    }\n    styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ''}`, '');\n    styleNode.innerHTML = style;\n    document.getElementsByTagName('head')[0].appendChild(styleNode);\n    return styleNode;\n}\n\nclass Editor extends EventEmitter {\n    constructor(options = {}) {\n        super();\n        this.isFocused = false;\n        /**\n         * The editor is considered initialized after the `create` event has been emitted.\n         */\n        this.isInitialized = false;\n        this.extensionStorage = {};\n        this.options = {\n            element: document.createElement('div'),\n            content: '',\n            injectCSS: true,\n            injectNonce: undefined,\n            extensions: [],\n            autofocus: false,\n            editable: true,\n            editorProps: {},\n            parseOptions: {},\n            coreExtensionOptions: {},\n            enableInputRules: true,\n            enablePasteRules: true,\n            enableCoreExtensions: true,\n            enableContentCheck: false,\n            emitContentError: false,\n            onBeforeCreate: () => null,\n            onCreate: () => null,\n            onUpdate: () => null,\n            onSelectionUpdate: () => null,\n            onTransaction: () => null,\n            onFocus: () => null,\n            onBlur: () => null,\n            onDestroy: () => null,\n            onContentError: ({ error }) => { throw error; },\n            onPaste: () => null,\n            onDrop: () => null,\n        };\n        this.isCapturingTransaction = false;\n        this.capturedTransaction = null;\n        this.setOptions(options);\n        this.createExtensionManager();\n        this.createCommandManager();\n        this.createSchema();\n        this.on('beforeCreate', this.options.onBeforeCreate);\n        this.emit('beforeCreate', { editor: this });\n        this.on('contentError', this.options.onContentError);\n        this.createView();\n        this.injectCSS();\n        this.on('create', this.options.onCreate);\n        this.on('update', this.options.onUpdate);\n        this.on('selectionUpdate', this.options.onSelectionUpdate);\n        this.on('transaction', this.options.onTransaction);\n        this.on('focus', this.options.onFocus);\n        this.on('blur', this.options.onBlur);\n        this.on('destroy', this.options.onDestroy);\n        this.on('drop', ({ event, slice, moved }) => this.options.onDrop(event, slice, moved));\n        this.on('paste', ({ event, slice }) => this.options.onPaste(event, slice));\n        window.setTimeout(() => {\n            if (this.isDestroyed) {\n                return;\n            }\n            this.commands.focus(this.options.autofocus);\n            this.emit('create', { editor: this });\n            this.isInitialized = true;\n        }, 0);\n    }\n    /**\n     * Returns the editor storage.\n     */\n    get storage() {\n        return this.extensionStorage;\n    }\n    /**\n     * An object of all registered commands.\n     */\n    get commands() {\n        return this.commandManager.commands;\n    }\n    /**\n     * Create a command chain to call multiple commands at once.\n     */\n    chain() {\n        return this.commandManager.chain();\n    }\n    /**\n     * Check if a command or a command chain can be executed. Without executing it.\n     */\n    can() {\n        return this.commandManager.can();\n    }\n    /**\n     * Inject CSS styles.\n     */\n    injectCSS() {\n        if (this.options.injectCSS && document) {\n            this.css = createStyleTag(style, this.options.injectNonce);\n        }\n    }\n    /**\n     * Update editor options.\n     *\n     * @param options A list of options\n     */\n    setOptions(options = {}) {\n        this.options = {\n            ...this.options,\n            ...options,\n        };\n        if (!this.view || !this.state || this.isDestroyed) {\n            return;\n        }\n        if (this.options.editorProps) {\n            this.view.setProps(this.options.editorProps);\n        }\n        this.view.updateState(this.state);\n    }\n    /**\n     * Update editable state of the editor.\n     */\n    setEditable(editable, emitUpdate = true) {\n        this.setOptions({ editable });\n        if (emitUpdate) {\n            this.emit('update', { editor: this, transaction: this.state.tr });\n        }\n    }\n    /**\n     * Returns whether the editor is editable.\n     */\n    get isEditable() {\n        // since plugins are applied after creating the view\n        // `editable` is always `true` for one tick.\n        // that’s why we also have to check for `options.editable`\n        return this.options.editable && this.view && this.view.editable;\n    }\n    /**\n     * Returns the editor state.\n     */\n    get state() {\n        return this.view.state;\n    }\n    /**\n     * Register a ProseMirror plugin.\n     *\n     * @param plugin A ProseMirror plugin\n     * @param handlePlugins Control how to merge the plugin into the existing plugins.\n     * @returns The new editor state\n     */\n    registerPlugin(plugin, handlePlugins) {\n        const plugins = isFunction(handlePlugins)\n            ? handlePlugins(plugin, [...this.state.plugins])\n            : [...this.state.plugins, plugin];\n        const state = this.state.reconfigure({ plugins });\n        this.view.updateState(state);\n        return state;\n    }\n    /**\n     * Unregister a ProseMirror plugin.\n     *\n     * @param nameOrPluginKeyToRemove The plugins name\n     * @returns The new editor state or undefined if the editor is destroyed\n     */\n    unregisterPlugin(nameOrPluginKeyToRemove) {\n        if (this.isDestroyed) {\n            return undefined;\n        }\n        const prevPlugins = this.state.plugins;\n        let plugins = prevPlugins;\n        [].concat(nameOrPluginKeyToRemove).forEach(nameOrPluginKey => {\n            // @ts-ignore\n            const name = typeof nameOrPluginKey === 'string' ? `${nameOrPluginKey}$` : nameOrPluginKey.key;\n            // @ts-ignore\n            plugins = plugins.filter(plugin => !plugin.key.startsWith(name));\n        });\n        if (prevPlugins.length === plugins.length) {\n            // No plugin was removed, so we don’t need to update the state\n            return undefined;\n        }\n        const state = this.state.reconfigure({\n            plugins,\n        });\n        this.view.updateState(state);\n        return state;\n    }\n    /**\n     * Creates an extension manager.\n     */\n    createExtensionManager() {\n        var _a, _b;\n        const coreExtensions = this.options.enableCoreExtensions ? [\n            Editable,\n            ClipboardTextSerializer.configure({\n                blockSeparator: (_b = (_a = this.options.coreExtensionOptions) === null || _a === void 0 ? void 0 : _a.clipboardTextSerializer) === null || _b === void 0 ? void 0 : _b.blockSeparator,\n            }),\n            Commands,\n            FocusEvents,\n            Keymap,\n            Tabindex,\n            Drop,\n            Paste,\n        ].filter(ext => {\n            if (typeof this.options.enableCoreExtensions === 'object') {\n                return this.options.enableCoreExtensions[ext.name] !== false;\n            }\n            return true;\n        }) : [];\n        const allExtensions = [...coreExtensions, ...this.options.extensions].filter(extension => {\n            return ['extension', 'node', 'mark'].includes(extension === null || extension === void 0 ? void 0 : extension.type);\n        });\n        this.extensionManager = new ExtensionManager(allExtensions, this);\n    }\n    /**\n     * Creates an command manager.\n     */\n    createCommandManager() {\n        this.commandManager = new CommandManager({\n            editor: this,\n        });\n    }\n    /**\n     * Creates a ProseMirror schema.\n     */\n    createSchema() {\n        this.schema = this.extensionManager.schema;\n    }\n    /**\n     * Creates a ProseMirror view.\n     */\n    createView() {\n        var _a;\n        let doc;\n        try {\n            doc = createDocument(this.options.content, this.schema, this.options.parseOptions, { errorOnInvalidContent: this.options.enableContentCheck });\n        }\n        catch (e) {\n            if (!(e instanceof Error) || !['[tiptap error]: Invalid JSON content', '[tiptap error]: Invalid HTML content'].includes(e.message)) {\n                // Not the content error we were expecting\n                throw e;\n            }\n            this.emit('contentError', {\n                editor: this,\n                error: e,\n                disableCollaboration: () => {\n                    if (this.storage.collaboration) {\n                        this.storage.collaboration.isDisabled = true;\n                    }\n                    // To avoid syncing back invalid content, reinitialize the extensions without the collaboration extension\n                    this.options.extensions = this.options.extensions.filter(extension => extension.name !== 'collaboration');\n                    // Restart the initialization process by recreating the extension manager with the new set of extensions\n                    this.createExtensionManager();\n                },\n            });\n            // Content is invalid, but attempt to create it anyway, stripping out the invalid parts\n            doc = createDocument(this.options.content, this.schema, this.options.parseOptions, { errorOnInvalidContent: false });\n        }\n        const selection = resolveFocusPosition(doc, this.options.autofocus);\n        this.view = new EditorView(this.options.element, {\n            ...this.options.editorProps,\n            attributes: {\n                // add `role=\"textbox\"` to the editor element\n                role: 'textbox',\n                ...(_a = this.options.editorProps) === null || _a === void 0 ? void 0 : _a.attributes,\n            },\n            dispatchTransaction: this.dispatchTransaction.bind(this),\n            state: EditorState.create({\n                doc,\n                selection: selection || undefined,\n            }),\n        });\n        // `editor.view` is not yet available at this time.\n        // Therefore we will add all plugins and node views directly afterwards.\n        const newState = this.state.reconfigure({\n            plugins: this.extensionManager.plugins,\n        });\n        this.view.updateState(newState);\n        this.createNodeViews();\n        this.prependClass();\n        // Let’s store the editor instance in the DOM element.\n        // So we’ll have access to it for tests.\n        // @ts-ignore\n        const dom = this.view.dom;\n        dom.editor = this;\n    }\n    /**\n     * Creates all node views.\n     */\n    createNodeViews() {\n        if (this.view.isDestroyed) {\n            return;\n        }\n        this.view.setProps({\n            nodeViews: this.extensionManager.nodeViews,\n        });\n    }\n    /**\n     * Prepend class name to element.\n     */\n    prependClass() {\n        this.view.dom.className = `tiptap ${this.view.dom.className}`;\n    }\n    captureTransaction(fn) {\n        this.isCapturingTransaction = true;\n        fn();\n        this.isCapturingTransaction = false;\n        const tr = this.capturedTransaction;\n        this.capturedTransaction = null;\n        return tr;\n    }\n    /**\n     * The callback over which to send transactions (state updates) produced by the view.\n     *\n     * @param transaction An editor state transaction\n     */\n    dispatchTransaction(transaction) {\n        // if the editor / the view of the editor was destroyed\n        // the transaction should not be dispatched as there is no view anymore.\n        if (this.view.isDestroyed) {\n            return;\n        }\n        if (this.isCapturingTransaction) {\n            if (!this.capturedTransaction) {\n                this.capturedTransaction = transaction;\n                return;\n            }\n            transaction.steps.forEach(step => { var _a; return (_a = this.capturedTransaction) === null || _a === void 0 ? void 0 : _a.step(step); });\n            return;\n        }\n        const state = this.state.apply(transaction);\n        const selectionHasChanged = !this.state.selection.eq(state.selection);\n        this.emit('beforeTransaction', {\n            editor: this,\n            transaction,\n            nextState: state,\n        });\n        this.view.updateState(state);\n        this.emit('transaction', {\n            editor: this,\n            transaction,\n        });\n        if (selectionHasChanged) {\n            this.emit('selectionUpdate', {\n                editor: this,\n                transaction,\n            });\n        }\n        const focus = transaction.getMeta('focus');\n        const blur = transaction.getMeta('blur');\n        if (focus) {\n            this.emit('focus', {\n                editor: this,\n                event: focus.event,\n                transaction,\n            });\n        }\n        if (blur) {\n            this.emit('blur', {\n                editor: this,\n                event: blur.event,\n                transaction,\n            });\n        }\n        if (!transaction.docChanged || transaction.getMeta('preventUpdate')) {\n            return;\n        }\n        this.emit('update', {\n            editor: this,\n            transaction,\n        });\n    }\n    /**\n     * Get attributes of the currently selected node or mark.\n     */\n    getAttributes(nameOrType) {\n        return getAttributes(this.state, nameOrType);\n    }\n    isActive(nameOrAttributes, attributesOrUndefined) {\n        const name = typeof nameOrAttributes === 'string' ? nameOrAttributes : null;\n        const attributes = typeof nameOrAttributes === 'string' ? attributesOrUndefined : nameOrAttributes;\n        return isActive(this.state, name, attributes);\n    }\n    /**\n     * Get the document as JSON.\n     */\n    getJSON() {\n        return this.state.doc.toJSON();\n    }\n    /**\n     * Get the document as HTML.\n     */\n    getHTML() {\n        return getHTMLFromFragment(this.state.doc.content, this.schema);\n    }\n    /**\n     * Get the document as text.\n     */\n    getText(options) {\n        const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {};\n        return getText(this.state.doc, {\n            blockSeparator,\n            textSerializers: {\n                ...getTextSerializersFromSchema(this.schema),\n                ...textSerializers,\n            },\n        });\n    }\n    /**\n     * Check if there is no content.\n     */\n    get isEmpty() {\n        return isNodeEmpty(this.state.doc);\n    }\n    /**\n     * Get the number of characters for the current document.\n     *\n     * @deprecated\n     */\n    getCharacterCount() {\n        console.warn('[tiptap warn]: \"editor.getCharacterCount()\" is deprecated. Please use \"editor.storage.characterCount.characters()\" instead.');\n        return this.state.doc.content.size - 2;\n    }\n    /**\n     * Destroy the editor.\n     */\n    destroy() {\n        this.emit('destroy');\n        if (this.view) {\n            // Cleanup our reference to prevent circular references which caused memory leaks\n            // @ts-ignore\n            const dom = this.view.dom;\n            if (dom && dom.editor) {\n                delete dom.editor;\n            }\n            this.view.destroy();\n        }\n        this.removeAllListeners();\n    }\n    /**\n     * Check if the editor is already destroyed.\n     */\n    get isDestroyed() {\n        var _a;\n        // @ts-ignore\n        return !((_a = this.view) === null || _a === void 0 ? void 0 : _a.docView);\n    }\n    $node(selector, attributes) {\n        var _a;\n        return ((_a = this.$doc) === null || _a === void 0 ? void 0 : _a.querySelector(selector, attributes)) || null;\n    }\n    $nodes(selector, attributes) {\n        var _a;\n        return ((_a = this.$doc) === null || _a === void 0 ? void 0 : _a.querySelectorAll(selector, attributes)) || null;\n    }\n    $pos(pos) {\n        const $pos = this.state.doc.resolve(pos);\n        return new NodePos($pos, this);\n    }\n    get $doc() {\n        return this.$pos(0);\n    }\n}\n\n/**\n * Build an input rule that adds a mark when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nfunction markInputRule(config) {\n    return new InputRule({\n        find: config.find,\n        handler: ({ state, range, match }) => {\n            const attributes = callOrReturn(config.getAttributes, undefined, match);\n            if (attributes === false || attributes === null) {\n                return null;\n            }\n            const { tr } = state;\n            const captureGroup = match[match.length - 1];\n            const fullMatch = match[0];\n            if (captureGroup) {\n                const startSpaces = fullMatch.search(/\\S/);\n                const textStart = range.from + fullMatch.indexOf(captureGroup);\n                const textEnd = textStart + captureGroup.length;\n                const excludedMarks = getMarksBetween(range.from, range.to, state.doc)\n                    .filter(item => {\n                    // @ts-ignore\n                    const excluded = item.mark.type.excluded;\n                    return excluded.find(type => type === config.type && type !== item.mark.type);\n                })\n                    .filter(item => item.to > textStart);\n                if (excludedMarks.length) {\n                    return null;\n                }\n                if (textEnd < range.to) {\n                    tr.delete(textEnd, range.to);\n                }\n                if (textStart > range.from) {\n                    tr.delete(range.from + startSpaces, textStart);\n                }\n                const markEnd = range.from + startSpaces + captureGroup.length;\n                tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {}));\n                tr.removeStoredMark(config.type);\n            }\n        },\n    });\n}\n\n/**\n * Build an input rule that adds a node when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nfunction nodeInputRule(config) {\n    return new InputRule({\n        find: config.find,\n        handler: ({ state, range, match }) => {\n            const attributes = callOrReturn(config.getAttributes, undefined, match) || {};\n            const { tr } = state;\n            const start = range.from;\n            let end = range.to;\n            const newNode = config.type.create(attributes);\n            if (match[1]) {\n                const offset = match[0].lastIndexOf(match[1]);\n                let matchStart = start + offset;\n                if (matchStart > end) {\n                    matchStart = end;\n                }\n                else {\n                    end = matchStart + match[1].length;\n                }\n                // insert last typed character\n                const lastChar = match[0][match[0].length - 1];\n                tr.insertText(lastChar, start + match[0].length - 1);\n                // insert node from input rule\n                tr.replaceWith(matchStart, end, newNode);\n            }\n            else if (match[0]) {\n                const insertionStart = config.type.isInline ? start : start - 1;\n                tr.insert(insertionStart, config.type.create(attributes)).delete(tr.mapping.map(start), tr.mapping.map(end));\n            }\n            tr.scrollIntoView();\n        },\n    });\n}\n\n/**\n * Build an input rule that changes the type of a textblock when the\n * matched text is typed into it. When using a regular expresion you’ll\n * probably want the regexp to start with `^`, so that the pattern can\n * only occur at the start of a textblock.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nfunction textblockTypeInputRule(config) {\n    return new InputRule({\n        find: config.find,\n        handler: ({ state, range, match }) => {\n            const $start = state.doc.resolve(range.from);\n            const attributes = callOrReturn(config.getAttributes, undefined, match) || {};\n            if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), config.type)) {\n                return null;\n            }\n            state.tr\n                .delete(range.from, range.to)\n                .setBlockType(range.from, range.from, config.type, attributes);\n        },\n    });\n}\n\n/**\n * Build an input rule that replaces text when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nfunction textInputRule(config) {\n    return new InputRule({\n        find: config.find,\n        handler: ({ state, range, match }) => {\n            let insert = config.replace;\n            let start = range.from;\n            const end = range.to;\n            if (match[1]) {\n                const offset = match[0].lastIndexOf(match[1]);\n                insert += match[0].slice(offset + match[1].length);\n                start += offset;\n                const cutOff = start - end;\n                if (cutOff > 0) {\n                    insert = match[0].slice(offset - cutOff, offset) + insert;\n                    start = end;\n                }\n            }\n            state.tr.insertText(insert, start, end);\n        },\n    });\n}\n\n/**\n * Build an input rule for automatically wrapping a textblock when a\n * given string is typed. When using a regular expresion you’ll\n * probably want the regexp to start with `^`, so that the pattern can\n * only occur at the start of a textblock.\n *\n * `type` is the type of node to wrap in.\n *\n * By default, if there’s a node with the same type above the newly\n * wrapped node, the rule will try to join those\n * two nodes. You can pass a join predicate, which takes a regular\n * expression match and the node before the wrapped node, and can\n * return a boolean to indicate whether a join should happen.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nfunction wrappingInputRule(config) {\n    return new InputRule({\n        find: config.find,\n        handler: ({ state, range, match, chain, }) => {\n            const attributes = callOrReturn(config.getAttributes, undefined, match) || {};\n            const tr = state.tr.delete(range.from, range.to);\n            const $start = tr.doc.resolve(range.from);\n            const blockRange = $start.blockRange();\n            const wrapping = blockRange && findWrapping(blockRange, config.type, attributes);\n            if (!wrapping) {\n                return null;\n            }\n            tr.wrap(blockRange, wrapping);\n            if (config.keepMarks && config.editor) {\n                const { selection, storedMarks } = state;\n                const { splittableMarks } = config.editor.extensionManager;\n                const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks());\n                if (marks) {\n                    const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name));\n                    tr.ensureMarks(filteredMarks);\n                }\n            }\n            if (config.keepAttributes) {\n                /** If the nodeType is `bulletList` or `orderedList` set the `nodeType` as `listItem` */\n                const nodeType = config.type.name === 'bulletList' || config.type.name === 'orderedList' ? 'listItem' : 'taskList';\n                chain().updateAttributes(nodeType, attributes).run();\n            }\n            const before = tr.doc.resolve(range.from - 1).nodeBefore;\n            if (before\n                && before.type === config.type\n                && canJoin(tr.doc, range.from - 1)\n                && (!config.joinPredicate || config.joinPredicate(match, before))) {\n                tr.join(range.from - 1);\n            }\n        },\n    });\n}\n\n/**\n * The Node class is used to create custom node extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nclass Node {\n    constructor(config = {}) {\n        this.type = 'node';\n        this.name = 'node';\n        this.parent = null;\n        this.child = null;\n        this.config = {\n            name: this.name,\n            defaultOptions: {},\n        };\n        this.config = {\n            ...this.config,\n            ...config,\n        };\n        this.name = this.config.name;\n        if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) {\n            console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${this.name}\".`);\n        }\n        // TODO: remove `addOptions` fallback\n        this.options = this.config.defaultOptions;\n        if (this.config.addOptions) {\n            this.options = callOrReturn(getExtensionField(this, 'addOptions', {\n                name: this.name,\n            }));\n        }\n        this.storage = callOrReturn(getExtensionField(this, 'addStorage', {\n            name: this.name,\n            options: this.options,\n        })) || {};\n    }\n    static create(config = {}) {\n        return new Node(config);\n    }\n    configure(options = {}) {\n        // return a new instance so we can use the same extension\n        // with different calls of `configure`\n        const extension = this.extend({\n            ...this.config,\n            addOptions: () => {\n                return mergeDeep(this.options, options);\n            },\n        });\n        // Always preserve the current name\n        extension.name = this.name;\n        // Set the parent to be our parent\n        extension.parent = this.parent;\n        return extension;\n    }\n    extend(extendedConfig = {}) {\n        const extension = new Node(extendedConfig);\n        extension.parent = this;\n        this.child = extension;\n        extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name;\n        if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) {\n            console.warn(`[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${extension.name}\".`);\n        }\n        extension.options = callOrReturn(getExtensionField(extension, 'addOptions', {\n            name: extension.name,\n        }));\n        extension.storage = callOrReturn(getExtensionField(extension, 'addStorage', {\n            name: extension.name,\n            options: extension.options,\n        }));\n        return extension;\n    }\n}\n\n/**\n * Node views are used to customize the rendered DOM structure of a node.\n * @see https://tiptap.dev/guide/node-views\n */\nclass NodeView {\n    constructor(component, props, options) {\n        this.isDragging = false;\n        this.component = component;\n        this.editor = props.editor;\n        this.options = {\n            stopEvent: null,\n            ignoreMutation: null,\n            ...options,\n        };\n        this.extension = props.extension;\n        this.node = props.node;\n        this.decorations = props.decorations;\n        this.innerDecorations = props.innerDecorations;\n        this.view = props.view;\n        this.HTMLAttributes = props.HTMLAttributes;\n        this.getPos = props.getPos;\n        this.mount();\n    }\n    mount() {\n        // eslint-disable-next-line\n        return;\n    }\n    get dom() {\n        return this.editor.view.dom;\n    }\n    get contentDOM() {\n        return null;\n    }\n    onDragStart(event) {\n        var _a, _b, _c, _d, _e, _f, _g;\n        const { view } = this.editor;\n        const target = event.target;\n        // get the drag handle element\n        // `closest` is not available for text nodes so we may have to use its parent\n        const dragHandle = target.nodeType === 3\n            ? (_a = target.parentElement) === null || _a === void 0 ? void 0 : _a.closest('[data-drag-handle]')\n            : target.closest('[data-drag-handle]');\n        if (!this.dom || ((_b = this.contentDOM) === null || _b === void 0 ? void 0 : _b.contains(target)) || !dragHandle) {\n            return;\n        }\n        let x = 0;\n        let y = 0;\n        // calculate offset for drag element if we use a different drag handle element\n        if (this.dom !== dragHandle) {\n            const domBox = this.dom.getBoundingClientRect();\n            const handleBox = dragHandle.getBoundingClientRect();\n            // In React, we have to go through nativeEvent to reach offsetX/offsetY.\n            const offsetX = (_c = event.offsetX) !== null && _c !== void 0 ? _c : (_d = event.nativeEvent) === null || _d === void 0 ? void 0 : _d.offsetX;\n            const offsetY = (_e = event.offsetY) !== null && _e !== void 0 ? _e : (_f = event.nativeEvent) === null || _f === void 0 ? void 0 : _f.offsetY;\n            x = handleBox.x - domBox.x + offsetX;\n            y = handleBox.y - domBox.y + offsetY;\n        }\n        const clonedNode = this.dom.cloneNode(true);\n        (_g = event.dataTransfer) === null || _g === void 0 ? void 0 : _g.setDragImage(clonedNode, x, y);\n        const pos = this.getPos();\n        if (typeof pos !== 'number') {\n            return;\n        }\n        // we need to tell ProseMirror that we want to move the whole node\n        // so we create a NodeSelection\n        const selection = NodeSelection.create(view.state.doc, pos);\n        const transaction = view.state.tr.setSelection(selection);\n        view.dispatch(transaction);\n    }\n    stopEvent(event) {\n        var _a;\n        if (!this.dom) {\n            return false;\n        }\n        if (typeof this.options.stopEvent === 'function') {\n            return this.options.stopEvent({ event });\n        }\n        const target = event.target;\n        const isInElement = this.dom.contains(target) && !((_a = this.contentDOM) === null || _a === void 0 ? void 0 : _a.contains(target));\n        // any event from child nodes should be handled by ProseMirror\n        if (!isInElement) {\n            return false;\n        }\n        const isDragEvent = event.type.startsWith('drag');\n        const isDropEvent = event.type === 'drop';\n        const isInput = ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA'].includes(target.tagName) || target.isContentEditable;\n        // any input event within node views should be ignored by ProseMirror\n        if (isInput && !isDropEvent && !isDragEvent) {\n            return true;\n        }\n        const { isEditable } = this.editor;\n        const { isDragging } = this;\n        const isDraggable = !!this.node.type.spec.draggable;\n        const isSelectable = NodeSelection.isSelectable(this.node);\n        const isCopyEvent = event.type === 'copy';\n        const isPasteEvent = event.type === 'paste';\n        const isCutEvent = event.type === 'cut';\n        const isClickEvent = event.type === 'mousedown';\n        // ProseMirror tries to drag selectable nodes\n        // even if `draggable` is set to `false`\n        // this fix prevents that\n        if (!isDraggable && isSelectable && isDragEvent && event.target === this.dom) {\n            event.preventDefault();\n        }\n        if (isDraggable && isDragEvent && !isDragging && event.target === this.dom) {\n            event.preventDefault();\n            return false;\n        }\n        // we have to store that dragging started\n        if (isDraggable && isEditable && !isDragging && isClickEvent) {\n            const dragHandle = target.closest('[data-drag-handle]');\n            const isValidDragHandle = dragHandle && (this.dom === dragHandle || this.dom.contains(dragHandle));\n            if (isValidDragHandle) {\n                this.isDragging = true;\n                document.addEventListener('dragend', () => {\n                    this.isDragging = false;\n                }, { once: true });\n                document.addEventListener('drop', () => {\n                    this.isDragging = false;\n                }, { once: true });\n                document.addEventListener('mouseup', () => {\n                    this.isDragging = false;\n                }, { once: true });\n            }\n        }\n        // these events are handled by prosemirror\n        if (isDragging\n            || isDropEvent\n            || isCopyEvent\n            || isPasteEvent\n            || isCutEvent\n            || (isClickEvent && isSelectable)) {\n            return false;\n        }\n        return true;\n    }\n    /**\n     * Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view.\n     * @return `false` if the editor should re-read the selection or re-parse the range around the mutation\n     * @return `true` if it can safely be ignored.\n     */\n    ignoreMutation(mutation) {\n        if (!this.dom || !this.contentDOM) {\n            return true;\n        }\n        if (typeof this.options.ignoreMutation === 'function') {\n            return this.options.ignoreMutation({ mutation });\n        }\n        // a leaf/atom node is like a black box for ProseMirror\n        // and should be fully handled by the node view\n        if (this.node.isLeaf || this.node.isAtom) {\n            return true;\n        }\n        // ProseMirror should handle any selections\n        if (mutation.type === 'selection') {\n            return false;\n        }\n        // try to prevent a bug on iOS and Android that will break node views on enter\n        // this is because ProseMirror can’t preventDispatch on enter\n        // this will lead to a re-render of the node view on enter\n        // see: https://github.com/ueberdosis/tiptap/issues/1214\n        // see: https://github.com/ueberdosis/tiptap/issues/2534\n        if (this.dom.contains(mutation.target)\n            && mutation.type === 'childList'\n            && (isiOS() || isAndroid())\n            && this.editor.isFocused) {\n            const changedNodes = [\n                ...Array.from(mutation.addedNodes),\n                ...Array.from(mutation.removedNodes),\n            ];\n            // we’ll check if every changed node is contentEditable\n            // to make sure it’s probably mutated by ProseMirror\n            if (changedNodes.every(node => node.isContentEditable)) {\n                return false;\n            }\n        }\n        // we will allow mutation contentDOM with attributes\n        // so we can for example adding classes within our node view\n        if (this.contentDOM === mutation.target && mutation.type === 'attributes') {\n            return true;\n        }\n        // ProseMirror should handle any changes within contentDOM\n        if (this.contentDOM.contains(mutation.target)) {\n            return false;\n        }\n        return true;\n    }\n    /**\n     * Update the attributes of the prosemirror node.\n     */\n    updateAttributes(attributes) {\n        this.editor.commands.command(({ tr }) => {\n            const pos = this.getPos();\n            if (typeof pos !== 'number') {\n                return false;\n            }\n            tr.setNodeMarkup(pos, undefined, {\n                ...this.node.attrs,\n                ...attributes,\n            });\n            return true;\n        });\n    }\n    /**\n     * Delete the node.\n     */\n    deleteNode() {\n        const from = this.getPos();\n        if (typeof from !== 'number') {\n            return;\n        }\n        const to = from + this.node.nodeSize;\n        this.editor.commands.deleteRange({ from, to });\n    }\n}\n\n/**\n * Build an paste rule that adds a mark when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nfunction markPasteRule(config) {\n    return new PasteRule({\n        find: config.find,\n        handler: ({ state, range, match, pasteEvent, }) => {\n            const attributes = callOrReturn(config.getAttributes, undefined, match, pasteEvent);\n            if (attributes === false || attributes === null) {\n                return null;\n            }\n            const { tr } = state;\n            const captureGroup = match[match.length - 1];\n            const fullMatch = match[0];\n            let markEnd = range.to;\n            if (captureGroup) {\n                const startSpaces = fullMatch.search(/\\S/);\n                const textStart = range.from + fullMatch.indexOf(captureGroup);\n                const textEnd = textStart + captureGroup.length;\n                const excludedMarks = getMarksBetween(range.from, range.to, state.doc)\n                    .filter(item => {\n                    // @ts-ignore\n                    const excluded = item.mark.type.excluded;\n                    return excluded.find(type => type === config.type && type !== item.mark.type);\n                })\n                    .filter(item => item.to > textStart);\n                if (excludedMarks.length) {\n                    return null;\n                }\n                if (textEnd < range.to) {\n                    tr.delete(textEnd, range.to);\n                }\n                if (textStart > range.from) {\n                    tr.delete(range.from + startSpaces, textStart);\n                }\n                markEnd = range.from + startSpaces + captureGroup.length;\n                tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {}));\n                tr.removeStoredMark(config.type);\n            }\n        },\n    });\n}\n\nfunction canInsertNode(state, nodeType) {\n    const { selection } = state;\n    const { $from } = selection;\n    // Special handling for NodeSelection\n    if (selection instanceof NodeSelection) {\n        const index = $from.index();\n        const parent = $from.parent;\n        // Can we replace the selected node with the horizontal rule?\n        return parent.canReplaceWith(index, index + 1, nodeType);\n    }\n    // Default: check if we can insert at the current position\n    let depth = $from.depth;\n    while (depth >= 0) {\n        const index = $from.index(depth);\n        const parent = $from.node(depth);\n        const match = parent.contentMatchAt(index);\n        if (match.matchType(nodeType)) {\n            return true;\n        }\n        depth -= 1;\n    }\n    return false;\n}\n\n// source: https://stackoverflow.com/a/6969486\nfunction escapeForRegEx(string) {\n    return string.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nfunction isString(value) {\n    return typeof value === 'string';\n}\n\n/**\n * Build an paste rule that adds a node when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nfunction nodePasteRule(config) {\n    return new PasteRule({\n        find: config.find,\n        handler({ match, chain, range, pasteEvent, }) {\n            const attributes = callOrReturn(config.getAttributes, undefined, match, pasteEvent);\n            const content = callOrReturn(config.getContent, undefined, attributes);\n            if (attributes === false || attributes === null) {\n                return null;\n            }\n            const node = { type: config.type.name, attrs: attributes };\n            if (content) {\n                node.content = content;\n            }\n            if (match.input) {\n                chain().deleteRange(range).insertContentAt(range.from, node);\n            }\n        },\n    });\n}\n\n/**\n * Build an paste rule that replaces text when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nfunction textPasteRule(config) {\n    return new PasteRule({\n        find: config.find,\n        handler: ({ state, range, match }) => {\n            let insert = config.replace;\n            let start = range.from;\n            const end = range.to;\n            if (match[1]) {\n                const offset = match[0].lastIndexOf(match[1]);\n                insert += match[0].slice(offset + match[1].length);\n                start += offset;\n                const cutOff = start - end;\n                if (cutOff > 0) {\n                    insert = match[0].slice(offset - cutOff, offset) + insert;\n                    start = end;\n                }\n            }\n            state.tr.insertText(insert, start, end);\n        },\n    });\n}\n\nclass Tracker {\n    constructor(transaction) {\n        this.transaction = transaction;\n        this.currentStep = this.transaction.steps.length;\n    }\n    map(position) {\n        let deleted = false;\n        const mappedPosition = this.transaction.steps\n            .slice(this.currentStep)\n            .reduce((newPosition, step) => {\n            const mapResult = step.getMap().mapResult(newPosition);\n            if (mapResult.deleted) {\n                deleted = true;\n            }\n            return mapResult.pos;\n        }, position);\n        return {\n            position: mappedPosition,\n            deleted,\n        };\n    }\n}\n\nexport { CommandManager, Editor, Extension, InputRule, Mark, Node, NodePos, NodeView, PasteRule, Tracker, callOrReturn, canInsertNode, combineTransactionSteps, createChainableState, createDocument, createNodeFromContent, createStyleTag, defaultBlockAt, deleteProps, elementFromString, escapeForRegEx, index as extensions, findChildren, findChildrenInRange, findDuplicates, findParentNode, findParentNodeClosestToPos, fromString, generateHTML, generateJSON, generateText, getAttributes, getAttributesFromExtensions, getChangedRanges, getDebugJSON, getExtensionField, getHTMLFromFragment, getMarkAttributes, getMarkRange, getMarkType, getMarksBetween, getNodeAtPosition, getNodeAttributes, getNodeType, getRenderedAttributes, getSchema, getSchemaByResolvedExtensions, getSchemaTypeByName, getSchemaTypeNameByName, getSplittedAttributes, getText, getTextBetween, getTextContentFromNodes, getTextSerializersFromSchema, injectExtensionAttributesToParseRule, inputRulesPlugin, isActive, isAtEndOfNode, isAtStartOfNode, isEmptyObject, isExtensionRulesEnabled, isFunction, isList, isMacOS, isMarkActive, isNodeActive, isNodeEmpty, isNodeSelection, isNumber, isPlainObject, isRegExp, isString, isTextSelection, isiOS, markInputRule, markPasteRule, mergeAttributes, mergeDeep, minMax, nodeInputRule, nodePasteRule, objectIncludes, pasteRulesPlugin, posToDOMRect, removeDuplicates, resolveFocusPosition, rewriteUnknownContent, selectionToInsertionEnd, splitExtensions, textInputRule, textPasteRule, textblockTypeInputRule, wrappingInputRule };\n//# sourceMappingURL=index.js.map\n","import { EditorState, Transaction } from '@tiptap/pm/state'\n\n/**\n * Takes a Transaction & Editor State and turns it into a chainable state object\n * @param config The transaction and state to create the chainable state from\n * @returns A chainable Editor state object\n */\nexport function createChainableState(config: {\n  transaction: Transaction\n  state: EditorState\n}): EditorState {\n  const { state, transaction } = config\n  let { selection } = transaction\n  let { doc } = transaction\n  let { storedMarks } = transaction\n\n  return {\n    ...state,\n    apply: state.apply.bind(state),\n    applyTransaction: state.applyTransaction.bind(state),\n    plugins: state.plugins,\n    schema: state.schema,\n    reconfigure: state.reconfigure.bind(state),\n    toJSON: state.toJSON.bind(state),\n    get storedMarks() {\n      return storedMarks\n    },\n    get selection() {\n      return selection\n    },\n    get doc() {\n      return doc\n    },\n    get tr() {\n      selection = transaction.selection\n      doc = transaction.doc\n      storedMarks = transaction.storedMarks\n\n      return transaction\n    },\n  }\n}\n","import { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { Editor } from './Editor.js'\nimport { createChainableState } from './helpers/createChainableState.js'\nimport {\n  AnyCommands, CanCommands, ChainedCommands, CommandProps, SingleCommands,\n} from './types.js'\n\nexport class CommandManager {\n  editor: Editor\n\n  rawCommands: AnyCommands\n\n  customState?: EditorState\n\n  constructor(props: { editor: Editor; state?: EditorState }) {\n    this.editor = props.editor\n    this.rawCommands = this.editor.extensionManager.commands\n    this.customState = props.state\n  }\n\n  get hasCustomState(): boolean {\n    return !!this.customState\n  }\n\n  get state(): EditorState {\n    return this.customState || this.editor.state\n  }\n\n  get commands(): SingleCommands {\n    const { rawCommands, editor, state } = this\n    const { view } = editor\n    const { tr } = state\n    const props = this.buildProps(tr)\n\n    return Object.fromEntries(\n      Object.entries(rawCommands).map(([name, command]) => {\n        const method = (...args: any[]) => {\n          const callback = command(...args)(props)\n\n          if (!tr.getMeta('preventDispatch') && !this.hasCustomState) {\n            view.dispatch(tr)\n          }\n\n          return callback\n        }\n\n        return [name, method]\n      }),\n    ) as unknown as SingleCommands\n  }\n\n  get chain(): () => ChainedCommands {\n    return () => this.createChain()\n  }\n\n  get can(): () => CanCommands {\n    return () => this.createCan()\n  }\n\n  public createChain(startTr?: Transaction, shouldDispatch = true): ChainedCommands {\n    const { rawCommands, editor, state } = this\n    const { view } = editor\n    const callbacks: boolean[] = []\n    const hasStartTransaction = !!startTr\n    const tr = startTr || state.tr\n\n    const run = () => {\n      if (\n        !hasStartTransaction\n        && shouldDispatch\n        && !tr.getMeta('preventDispatch')\n        && !this.hasCustomState\n      ) {\n        view.dispatch(tr)\n      }\n\n      return callbacks.every(callback => callback === true)\n    }\n\n    const chain = {\n      ...Object.fromEntries(\n        Object.entries(rawCommands).map(([name, command]) => {\n          const chainedCommand = (...args: never[]) => {\n            const props = this.buildProps(tr, shouldDispatch)\n            const callback = command(...args)(props)\n\n            callbacks.push(callback)\n\n            return chain\n          }\n\n          return [name, chainedCommand]\n        }),\n      ),\n      run,\n    } as unknown as ChainedCommands\n\n    return chain\n  }\n\n  public createCan(startTr?: Transaction): CanCommands {\n    const { rawCommands, state } = this\n    const dispatch = false\n    const tr = startTr || state.tr\n    const props = this.buildProps(tr, dispatch)\n    const formattedCommands = Object.fromEntries(\n      Object.entries(rawCommands).map(([name, command]) => {\n        return [name, (...args: never[]) => command(...args)({ ...props, dispatch: undefined })]\n      }),\n    ) as unknown as SingleCommands\n\n    return {\n      ...formattedCommands,\n      chain: () => this.createChain(tr, dispatch),\n    } as CanCommands\n  }\n\n  public buildProps(tr: Transaction, shouldDispatch = true): CommandProps {\n    const { rawCommands, editor, state } = this\n    const { view } = editor\n\n    const props: CommandProps = {\n      tr,\n      editor,\n      view,\n      state: createChainableState({\n        state,\n        transaction: tr,\n      }),\n      dispatch: shouldDispatch ? () => undefined : undefined,\n      chain: () => this.createChain(tr, shouldDispatch),\n      can: () => this.createCan(tr),\n      get commands() {\n        return Object.fromEntries(\n          Object.entries(rawCommands).map(([name, command]) => {\n            return [name, (...args: never[]) => command(...args)(props)]\n          }),\n        ) as unknown as SingleCommands\n      },\n    }\n\n    return props\n  }\n}\n","type StringKeyOf<T> = Extract<keyof T, string>\ntype CallbackType<\n  T extends Record<string, any>,\n  EventName extends StringKeyOf<T>,\n> = T[EventName] extends any[] ? T[EventName] : [T[EventName]]\ntype CallbackFunction<\n  T extends Record<string, any>,\n  EventName extends StringKeyOf<T>,\n> = (...props: CallbackType<T, EventName>) => any\n\nexport class EventEmitter<T extends Record<string, any>> {\n\n  private callbacks: { [key: string]: Array<(...args: any[])=>void> } = {}\n\n  public on<EventName extends StringKeyOf<T>>(event: EventName, fn: CallbackFunction<T, EventName>): this {\n    if (!this.callbacks[event]) {\n      this.callbacks[event] = []\n    }\n\n    this.callbacks[event].push(fn)\n\n    return this\n  }\n\n  public emit<EventName extends StringKeyOf<T>>(event: EventName, ...args: CallbackType<T, EventName>): this {\n    const callbacks = this.callbacks[event]\n\n    if (callbacks) {\n      callbacks.forEach(callback => callback.apply(this, args))\n    }\n\n    return this\n  }\n\n  public off<EventName extends StringKeyOf<T>>(event: EventName, fn?: CallbackFunction<T, EventName>): this {\n    const callbacks = this.callbacks[event]\n\n    if (callbacks) {\n      if (fn) {\n        this.callbacks[event] = callbacks.filter(callback => callback !== fn)\n      } else {\n        delete this.callbacks[event]\n      }\n    }\n\n    return this\n  }\n\n  public once<EventName extends StringKeyOf<T>>(event: EventName, fn: CallbackFunction<T, EventName>): this {\n    const onceFn = (...args: CallbackType<T, EventName>) => {\n      this.off(event, onceFn)\n      fn.apply(this, args)\n    }\n\n    return this.on(event, onceFn)\n  }\n\n  public removeAllListeners(): void {\n    this.callbacks = {}\n  }\n}\n","import { AnyExtension, MaybeThisParameterType, RemoveThis } from '../types.js'\n\n/**\n * Returns a field from an extension\n * @param extension The Tiptap extension\n * @param field The field, for example `renderHTML` or `priority`\n * @param context The context object that should be passed as `this` into the function\n * @returns The field value\n */\nexport function getExtensionField<T = any>(\n  extension: AnyExtension,\n  field: string,\n  context?: Omit<MaybeThisParameterType<T>, 'parent'>,\n): RemoveThis<T> {\n\n  if (extension.config[field] === undefined && extension.parent) {\n    return getExtensionField(extension.parent, field, context)\n  }\n\n  if (typeof extension.config[field] === 'function') {\n    const value = extension.config[field].bind({\n      ...context,\n      parent: extension.parent\n        ? getExtensionField(extension.parent, field, context)\n        : null,\n    })\n\n    return value\n  }\n\n  return extension.config[field]\n}\n","import { Extension } from '../Extension.js'\nimport { Mark } from '../Mark.js'\nimport { Node } from '../Node.js'\nimport { Extensions } from '../types.js'\n\nexport function splitExtensions(extensions: Extensions) {\n  const baseExtensions = extensions.filter(extension => extension.type === 'extension') as Extension[]\n  const nodeExtensions = extensions.filter(extension => extension.type === 'node') as Node[]\n  const markExtensions = extensions.filter(extension => extension.type === 'mark') as Mark[]\n\n  return {\n    baseExtensions,\n    nodeExtensions,\n    markExtensions,\n  }\n}\n","import { MarkConfig, NodeConfig } from '../index.js'\nimport {\n  AnyConfig,\n  Attribute,\n  Attributes,\n  ExtensionAttribute,\n  Extensions,\n} from '../types.js'\nimport { getExtensionField } from './getExtensionField.js'\nimport { splitExtensions } from './splitExtensions.js'\n\n/**\n * Get a list of all extension attributes defined in `addAttribute` and `addGlobalAttribute`.\n * @param extensions List of extensions\n */\nexport function getAttributesFromExtensions(extensions: Extensions): ExtensionAttribute[] {\n  const extensionAttributes: ExtensionAttribute[] = []\n  const { nodeExtensions, markExtensions } = splitExtensions(extensions)\n  const nodeAndMarkExtensions = [...nodeExtensions, ...markExtensions]\n  const defaultAttribute: Required<Attribute> = {\n    default: null,\n    rendered: true,\n    renderHTML: null,\n    parseHTML: null,\n    keepOnSplit: true,\n    isRequired: false,\n  }\n\n  extensions.forEach(extension => {\n    const context = {\n      name: extension.name,\n      options: extension.options,\n      storage: extension.storage,\n      extensions: nodeAndMarkExtensions,\n    }\n\n    const addGlobalAttributes = getExtensionField<AnyConfig['addGlobalAttributes']>(\n      extension,\n      'addGlobalAttributes',\n      context,\n    )\n\n    if (!addGlobalAttributes) {\n      return\n    }\n\n    const globalAttributes = addGlobalAttributes()\n\n    globalAttributes.forEach(globalAttribute => {\n      globalAttribute.types.forEach(type => {\n        Object\n          .entries(globalAttribute.attributes)\n          .forEach(([name, attribute]) => {\n            extensionAttributes.push({\n              type,\n              name,\n              attribute: {\n                ...defaultAttribute,\n                ...attribute,\n              },\n            })\n          })\n      })\n    })\n  })\n\n  nodeAndMarkExtensions.forEach(extension => {\n    const context = {\n      name: extension.name,\n      options: extension.options,\n      storage: extension.storage,\n    }\n\n    const addAttributes = getExtensionField<NodeConfig['addAttributes'] | MarkConfig['addAttributes']>(\n      extension,\n      'addAttributes',\n      context,\n    )\n\n    if (!addAttributes) {\n      return\n    }\n\n    // TODO: remove `as Attributes`\n    const attributes = addAttributes() as Attributes\n\n    Object\n      .entries(attributes)\n      .forEach(([name, attribute]) => {\n        const mergedAttr = {\n          ...defaultAttribute,\n          ...attribute,\n        }\n\n        if (typeof mergedAttr?.default === 'function') {\n          mergedAttr.default = mergedAttr.default()\n        }\n\n        if (mergedAttr?.isRequired && mergedAttr?.default === undefined) {\n          delete mergedAttr.default\n        }\n\n        extensionAttributes.push({\n          type: extension.name,\n          name,\n          attribute: mergedAttr,\n        })\n      })\n  })\n\n  return extensionAttributes\n}\n","import { NodeType, Schema } from '@tiptap/pm/model'\n\nexport function getNodeType(nameOrType: string | NodeType, schema: Schema): NodeType {\n  if (typeof nameOrType === 'string') {\n    if (!schema.nodes[nameOrType]) {\n      throw Error(\n        `There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`,\n      )\n    }\n\n    return schema.nodes[nameOrType]\n  }\n\n  return nameOrType\n}\n","export function mergeAttributes(...objects: Record<string, any>[]): Record<string, any> {\n  return objects\n    .filter(item => !!item)\n    .reduce((items, item) => {\n      const mergedAttributes = { ...items }\n\n      Object.entries(item).forEach(([key, value]) => {\n        const exists = mergedAttributes[key]\n\n        if (!exists) {\n          mergedAttributes[key] = value\n\n          return\n        }\n\n        if (key === 'class') {\n          const valueClasses: string[] = value ? String(value).split(' ') : []\n          const existingClasses: string[] = mergedAttributes[key] ? mergedAttributes[key].split(' ') : []\n\n          const insertClasses = valueClasses.filter(\n            valueClass => !existingClasses.includes(valueClass),\n          )\n\n          mergedAttributes[key] = [...existingClasses, ...insertClasses].join(' ')\n        } else if (key === 'style') {\n          const newStyles: string[] = value ? value.split(';').map((style: string) => style.trim()).filter(Boolean) : []\n          const existingStyles: string[] = mergedAttributes[key] ? mergedAttributes[key].split(';').map((style: string) => style.trim()).filter(Boolean) : []\n\n          const styleMap = new Map<string, string>()\n\n          existingStyles.forEach(style => {\n            const [property, val] = style.split(':').map(part => part.trim())\n\n            styleMap.set(property, val)\n          })\n\n          newStyles.forEach(style => {\n            const [property, val] = style.split(':').map(part => part.trim())\n\n            styleMap.set(property, val)\n          })\n\n          mergedAttributes[key] = Array.from(styleMap.entries()).map(([property, val]) => `${property}: ${val}`).join('; ')\n        } else {\n          mergedAttributes[key] = value\n        }\n      })\n\n      return mergedAttributes\n    }, {})\n}\n","import { Mark, Node } from '@tiptap/pm/model'\n\nimport { ExtensionAttribute } from '../types.js'\nimport { mergeAttributes } from '../utilities/mergeAttributes.js'\n\nexport function getRenderedAttributes(\n  nodeOrMark: Node | Mark,\n  extensionAttributes: ExtensionAttribute[],\n): Record<string, any> {\n  return extensionAttributes\n    .filter(\n      attribute => attribute.type === nodeOrMark.type.name,\n    )\n    .filter(item => item.attribute.rendered)\n    .map(item => {\n      if (!item.attribute.renderHTML) {\n        return {\n          [item.name]: nodeOrMark.attrs[item.name],\n        }\n      }\n\n      return item.attribute.renderHTML(nodeOrMark.attrs) || {}\n    })\n    .reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {})\n}\n","// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport function isFunction(value: any): value is Function {\n  return typeof value === 'function'\n}\n","import { MaybeReturnType } from '../types.js'\nimport { isFunction } from './isFunction.js'\n\n/**\n * Optionally calls `value` as a function.\n * Otherwise it is returned directly.\n * @param value Function or any value.\n * @param context Optional context to bind to function.\n * @param props Optional props to pass to function.\n */\nexport function callOrReturn<T>(value: T, context: any = undefined, ...props: any[]): MaybeReturnType<T> {\n  if (isFunction(value)) {\n    if (context) {\n      return value.bind(context)(...props)\n    }\n\n    return value(...props)\n  }\n\n  return value as MaybeReturnType<T>\n}\n","export function isEmptyObject(value = {}): boolean {\n  return Object.keys(value).length === 0 && value.constructor === Object\n}\n","export function fromString(value: any): any {\n  if (typeof value !== 'string') {\n    return value\n  }\n\n  if (value.match(/^[+-]?(?:\\d*\\.)?\\d+$/)) {\n    return Number(value)\n  }\n\n  if (value === 'true') {\n    return true\n  }\n\n  if (value === 'false') {\n    return false\n  }\n\n  return value\n}\n","import { ParseRule } from '@tiptap/pm/model'\n\nimport { ExtensionAttribute } from '../types.js'\nimport { fromString } from '../utilities/fromString.js'\n\n/**\n * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`).\n * Cancels when `getAttrs` returned `false`.\n * @param parseRule ProseMirror ParseRule\n * @param extensionAttributes List of attributes to inject\n */\nexport function injectExtensionAttributesToParseRule(\n  parseRule: ParseRule,\n  extensionAttributes: ExtensionAttribute[],\n): ParseRule {\n  if ('style' in parseRule) {\n    return parseRule\n  }\n\n  return {\n    ...parseRule,\n    getAttrs: (node: HTMLElement) => {\n      const oldAttributes = parseRule.getAttrs ? parseRule.getAttrs(node) : parseRule.attrs\n\n      if (oldAttributes === false) {\n        return false\n      }\n\n      const newAttributes = extensionAttributes.reduce((items, item) => {\n        const value = item.attribute.parseHTML\n          ? item.attribute.parseHTML(node)\n          : fromString((node).getAttribute(item.name))\n\n        if (value === null || value === undefined) {\n          return items\n        }\n\n        return {\n          ...items,\n          [item.name]: value,\n        }\n      }, {})\n\n      return { ...oldAttributes, ...newAttributes }\n    },\n  }\n}\n","import {\n  MarkSpec, NodeSpec, Schema, TagParseRule,\n} from '@tiptap/pm/model'\n\nimport { Editor, MarkConfig, NodeConfig } from '../index.js'\nimport { AnyConfig, Extensions } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\nimport { isEmptyObject } from '../utilities/isEmptyObject.js'\nimport { getAttributesFromExtensions } from './getAttributesFromExtensions.js'\nimport { getExtensionField } from './getExtensionField.js'\nimport { getRenderedAttributes } from './getRenderedAttributes.js'\nimport { injectExtensionAttributesToParseRule } from './injectExtensionAttributesToParseRule.js'\nimport { splitExtensions } from './splitExtensions.js'\n\nfunction cleanUpSchemaItem<T>(data: T) {\n  return Object.fromEntries(\n    // @ts-ignore\n    Object.entries(data).filter(([key, value]) => {\n      if (key === 'attrs' && isEmptyObject(value as object | undefined)) {\n        return false\n      }\n\n      return value !== null && value !== undefined\n    }),\n  ) as T\n}\n\n/**\n * Creates a new Prosemirror schema based on the given extensions.\n * @param extensions An array of Tiptap extensions\n * @param editor The editor instance\n * @returns A Prosemirror schema\n */\nexport function getSchemaByResolvedExtensions(extensions: Extensions, editor?: Editor): Schema {\n  const allAttributes = getAttributesFromExtensions(extensions)\n  const { nodeExtensions, markExtensions } = splitExtensions(extensions)\n  const topNode = nodeExtensions.find(extension => getExtensionField(extension, 'topNode'))?.name\n\n  const nodes = Object.fromEntries(\n    nodeExtensions.map(extension => {\n      const extensionAttributes = allAttributes.filter(\n        attribute => attribute.type === extension.name,\n      )\n      const context = {\n        name: extension.name,\n        options: extension.options,\n        storage: extension.storage,\n        editor,\n      }\n\n      const extraNodeFields = extensions.reduce((fields, e) => {\n        const extendNodeSchema = getExtensionField<AnyConfig['extendNodeSchema']>(\n          e,\n          'extendNodeSchema',\n          context,\n        )\n\n        return {\n          ...fields,\n          ...(extendNodeSchema ? extendNodeSchema(extension) : {}),\n        }\n      }, {})\n\n      const schema: NodeSpec = cleanUpSchemaItem({\n        ...extraNodeFields,\n        content: callOrReturn(\n          getExtensionField<NodeConfig['content']>(extension, 'content', context),\n        ),\n        marks: callOrReturn(getExtensionField<NodeConfig['marks']>(extension, 'marks', context)),\n        group: callOrReturn(getExtensionField<NodeConfig['group']>(extension, 'group', context)),\n        inline: callOrReturn(getExtensionField<NodeConfig['inline']>(extension, 'inline', context)),\n        atom: callOrReturn(getExtensionField<NodeConfig['atom']>(extension, 'atom', context)),\n        selectable: callOrReturn(\n          getExtensionField<NodeConfig['selectable']>(extension, 'selectable', context),\n        ),\n        draggable: callOrReturn(\n          getExtensionField<NodeConfig['draggable']>(extension, 'draggable', context),\n        ),\n        code: callOrReturn(getExtensionField<NodeConfig['code']>(extension, 'code', context)),\n        whitespace: callOrReturn(getExtensionField<NodeConfig['whitespace']>(extension, 'whitespace', context)),\n        linebreakReplacement: callOrReturn(getExtensionField<NodeConfig['linebreakReplacement']>(extension, 'linebreakReplacement', context)),\n        defining: callOrReturn(\n          getExtensionField<NodeConfig['defining']>(extension, 'defining', context),\n        ),\n        isolating: callOrReturn(\n          getExtensionField<NodeConfig['isolating']>(extension, 'isolating', context),\n        ),\n        attrs: Object.fromEntries(\n          extensionAttributes.map(extensionAttribute => {\n            return [extensionAttribute.name, { default: extensionAttribute?.attribute?.default }]\n          }),\n        ),\n      })\n\n      const parseHTML = callOrReturn(\n        getExtensionField<NodeConfig['parseHTML']>(extension, 'parseHTML', context),\n      )\n\n      if (parseHTML) {\n        schema.parseDOM = parseHTML.map(parseRule => injectExtensionAttributesToParseRule(parseRule, extensionAttributes)) as TagParseRule[]\n      }\n\n      const renderHTML = getExtensionField<NodeConfig['renderHTML']>(\n        extension,\n        'renderHTML',\n        context,\n      )\n\n      if (renderHTML) {\n        schema.toDOM = node => renderHTML({\n          node,\n          HTMLAttributes: getRenderedAttributes(node, extensionAttributes),\n        })\n      }\n\n      const renderText = getExtensionField<NodeConfig['renderText']>(\n        extension,\n        'renderText',\n        context,\n      )\n\n      if (renderText) {\n        schema.toText = renderText\n      }\n\n      return [extension.name, schema]\n    }),\n  )\n\n  const marks = Object.fromEntries(\n    markExtensions.map(extension => {\n      const extensionAttributes = allAttributes.filter(\n        attribute => attribute.type === extension.name,\n      )\n      const context = {\n        name: extension.name,\n        options: extension.options,\n        storage: extension.storage,\n        editor,\n      }\n\n      const extraMarkFields = extensions.reduce((fields, e) => {\n        const extendMarkSchema = getExtensionField<AnyConfig['extendMarkSchema']>(\n          e,\n          'extendMarkSchema',\n          context,\n        )\n\n        return {\n          ...fields,\n          ...(extendMarkSchema ? extendMarkSchema(extension as any) : {}),\n        }\n      }, {})\n\n      const schema: MarkSpec = cleanUpSchemaItem({\n        ...extraMarkFields,\n        inclusive: callOrReturn(\n          getExtensionField<MarkConfig['inclusive']>(extension, 'inclusive', context),\n        ),\n        excludes: callOrReturn(\n          getExtensionField<MarkConfig['excludes']>(extension, 'excludes', context),\n        ),\n        group: callOrReturn(getExtensionField<MarkConfig['group']>(extension, 'group', context)),\n        spanning: callOrReturn(\n          getExtensionField<MarkConfig['spanning']>(extension, 'spanning', context),\n        ),\n        code: callOrReturn(getExtensionField<MarkConfig['code']>(extension, 'code', context)),\n        attrs: Object.fromEntries(\n          extensionAttributes.map(extensionAttribute => {\n            return [extensionAttribute.name, { default: extensionAttribute?.attribute?.default }]\n          }),\n        ),\n      })\n\n      const parseHTML = callOrReturn(\n        getExtensionField<MarkConfig['parseHTML']>(extension, 'parseHTML', context),\n      )\n\n      if (parseHTML) {\n        schema.parseDOM = parseHTML.map(parseRule => injectExtensionAttributesToParseRule(parseRule, extensionAttributes))\n      }\n\n      const renderHTML = getExtensionField<MarkConfig['renderHTML']>(\n        extension,\n        'renderHTML',\n        context,\n      )\n\n      if (renderHTML) {\n        schema.toDOM = mark => renderHTML({\n          mark,\n          HTMLAttributes: getRenderedAttributes(mark, extensionAttributes),\n        })\n      }\n\n      return [extension.name, schema]\n    }),\n  )\n\n  return new Schema({\n    topNode,\n    nodes,\n    marks,\n  })\n}\n","import { MarkType, NodeType, Schema } from '@tiptap/pm/model'\n\n/**\n * Tries to get a node or mark type by its name.\n * @param name The name of the node or mark type\n * @param schema The Prosemiror schema to search in\n * @returns The node or mark type, or null if it doesn't exist\n */\nexport function getSchemaTypeByName(name: string, schema: Schema): NodeType | MarkType | null {\n  return schema.nodes[name] || schema.marks[name] || null\n}\n","import { AnyExtension, EnableRules } from '../types.js'\n\nexport function isExtensionRulesEnabled(extension: AnyExtension, enabled: EnableRules): boolean {\n  if (Array.isArray(enabled)) {\n    return enabled.some(enabledExtension => {\n      const name = typeof enabledExtension === 'string'\n        ? enabledExtension\n        : enabledExtension.name\n\n      return name === extension.name\n    })\n  }\n\n  return enabled\n}\n","import { DOMSerializer, Fragment, Schema } from '@tiptap/pm/model'\n\nexport function getHTMLFromFragment(fragment: Fragment, schema: Schema): string {\n  const documentFragment = DOMSerializer.fromSchema(schema).serializeFragment(fragment)\n\n  const temporaryDocument = document.implementation.createHTMLDocument()\n  const container = temporaryDocument.createElement('div')\n\n  container.appendChild(documentFragment)\n\n  return container.innerHTML\n}\n","import { ResolvedPos } from '@tiptap/pm/model'\n\n/**\n * Returns the text content of a resolved prosemirror position\n * @param $from The resolved position to get the text content from\n * @param maxMatch The maximum number of characters to match\n * @returns The text content\n */\nexport const getTextContentFromNodes = ($from: ResolvedPos, maxMatch = 500) => {\n  let textBefore = ''\n\n  const sliceEndPos = $from.parentOffset\n\n  $from.parent.nodesBetween(\n    Math.max(0, sliceEndPos - maxMatch),\n    sliceEndPos,\n    (node, pos, parent, index) => {\n      const chunk = node.type.spec.toText?.({\n        node,\n        pos,\n        parent,\n        index,\n      })\n        || node.textContent\n        || '%leaf%'\n\n      textBefore += node.isAtom && !node.isText ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos))\n    },\n  )\n\n  return textBefore\n}\n","export function isRegExp(value: any): value is RegExp {\n  return Object.prototype.toString.call(value) === '[object RegExp]'\n}\n","import { Fragment, Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { EditorState, Plugin, TextSelection } from '@tiptap/pm/state'\n\nimport { CommandManager } from './CommandManager.js'\nimport { Editor } from './Editor.js'\nimport { createChainableState } from './helpers/createChainableState.js'\nimport { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js'\nimport { getTextContentFromNodes } from './helpers/getTextContentFromNodes.js'\nimport {\n  CanCommands,\n  ChainedCommands,\n  ExtendedRegExpMatchArray,\n  Range,\n  SingleCommands,\n} from './types.js'\nimport { isRegExp } from './utilities/isRegExp.js'\n\nexport type InputRuleMatch = {\n  index: number;\n  text: string;\n  replaceWith?: string;\n  match?: RegExpMatchArray;\n  data?: Record<string, any>;\n};\n\nexport type InputRuleFinder = RegExp | ((text: string) => InputRuleMatch | null);\n\nexport class InputRule {\n  find: InputRuleFinder\n\n  handler: (props: {\n    state: EditorState;\n    range: Range;\n    match: ExtendedRegExpMatchArray;\n    commands: SingleCommands;\n    chain: () => ChainedCommands;\n    can: () => CanCommands;\n  }) => void | null\n\n  constructor(config: {\n    find: InputRuleFinder;\n    handler: (props: {\n      state: EditorState;\n      range: Range;\n      match: ExtendedRegExpMatchArray;\n      commands: SingleCommands;\n      chain: () => ChainedCommands;\n      can: () => CanCommands;\n    }) => void | null;\n  }) {\n    this.find = config.find\n    this.handler = config.handler\n  }\n}\n\nconst inputRuleMatcherHandler = (\n  text: string,\n  find: InputRuleFinder,\n): ExtendedRegExpMatchArray | null => {\n  if (isRegExp(find)) {\n    return find.exec(text)\n  }\n\n  const inputRuleMatch = find(text)\n\n  if (!inputRuleMatch) {\n    return null\n  }\n\n  const result: ExtendedRegExpMatchArray = [inputRuleMatch.text]\n\n  result.index = inputRuleMatch.index\n  result.input = text\n  result.data = inputRuleMatch.data\n\n  if (inputRuleMatch.replaceWith) {\n    if (!inputRuleMatch.text.includes(inputRuleMatch.replaceWith)) {\n      console.warn(\n        '[tiptap warn]: \"inputRuleMatch.replaceWith\" must be part of \"inputRuleMatch.text\".',\n      )\n    }\n\n    result.push(inputRuleMatch.replaceWith)\n  }\n\n  return result\n}\n\nfunction run(config: {\n  editor: Editor;\n  from: number;\n  to: number;\n  text: string;\n  rules: InputRule[];\n  plugin: Plugin;\n}): boolean {\n  const {\n    editor, from, to, text, rules, plugin,\n  } = config\n  const { view } = editor\n\n  if (view.composing) {\n    return false\n  }\n\n  const $from = view.state.doc.resolve(from)\n\n  if (\n    // check for code node\n    $from.parent.type.spec.code\n    // check for code mark\n    || !!($from.nodeBefore || $from.nodeAfter)?.marks.find(mark => mark.type.spec.code)\n  ) {\n    return false\n  }\n\n  let matched = false\n\n  const textBefore = getTextContentFromNodes($from) + text\n\n  rules.forEach(rule => {\n    if (matched) {\n      return\n    }\n\n    const match = inputRuleMatcherHandler(textBefore, rule.find)\n\n    if (!match) {\n      return\n    }\n\n    const tr = view.state.tr\n    const state = createChainableState({\n      state: view.state,\n      transaction: tr,\n    })\n    const range = {\n      from: from - (match[0].length - text.length),\n      to,\n    }\n\n    const { commands, chain, can } = new CommandManager({\n      editor,\n      state,\n    })\n\n    const handler = rule.handler({\n      state,\n      range,\n      match,\n      commands,\n      chain,\n      can,\n    })\n\n    // stop if there are no changes\n    if (handler === null || !tr.steps.length) {\n      return\n    }\n\n    // store transform as meta data\n    // so we can undo input rules within the `undoInputRules` command\n    tr.setMeta(plugin, {\n      transform: tr,\n      from,\n      to,\n      text,\n    })\n\n    view.dispatch(tr)\n    matched = true\n  })\n\n  return matched\n}\n\n/**\n * Create an input rules plugin. When enabled, it will cause text\n * input that matches any of the given rules to trigger the rule’s\n * action.\n */\nexport function inputRulesPlugin(props: { editor: Editor; rules: InputRule[] }): Plugin {\n  const { editor, rules } = props\n  const plugin = new Plugin({\n    state: {\n      init() {\n        return null\n      },\n      apply(tr, prev, state) {\n        const stored = tr.getMeta(plugin)\n\n        if (stored) {\n          return stored\n        }\n\n        // if InputRule is triggered by insertContent()\n        const simulatedInputMeta = tr.getMeta('applyInputRules') as\n          | undefined\n          | {\n              from: number;\n              text: string | ProseMirrorNode | Fragment;\n            }\n        const isSimulatedInput = !!simulatedInputMeta\n\n        if (isSimulatedInput) {\n          setTimeout(() => {\n            let { text } = simulatedInputMeta\n\n            if (typeof text === 'string') {\n              text = text as string\n            } else {\n              text = getHTMLFromFragment(Fragment.from(text), state.schema)\n            }\n\n            const { from } = simulatedInputMeta\n            const to = from + text.length\n\n            run({\n              editor,\n              from,\n              to,\n              text,\n              rules,\n              plugin,\n            })\n          })\n        }\n\n        return tr.selectionSet || tr.docChanged ? null : prev\n      },\n    },\n\n    props: {\n      handleTextInput(view, from, to, text) {\n        return run({\n          editor,\n          from,\n          to,\n          text,\n          rules,\n          plugin,\n        })\n      },\n\n      handleDOMEvents: {\n        compositionend: view => {\n          setTimeout(() => {\n            const { $cursor } = view.state.selection as TextSelection\n\n            if ($cursor) {\n              run({\n                editor,\n                from: $cursor.pos,\n                to: $cursor.pos,\n                text: '',\n                rules,\n                plugin,\n              })\n            }\n          })\n\n          return false\n        },\n      },\n\n      // add support for input rules to trigger on enter\n      // this is useful for example for code blocks\n      handleKeyDown(view, event) {\n        if (event.key !== 'Enter') {\n          return false\n        }\n\n        const { $cursor } = view.state.selection as TextSelection\n\n        if ($cursor) {\n          return run({\n            editor,\n            from: $cursor.pos,\n            to: $cursor.pos,\n            text: '\\n',\n            rules,\n            plugin,\n          })\n        }\n\n        return false\n      },\n    },\n\n    // @ts-ignore\n    isInputRules: true,\n  }) as Plugin\n\n  return plugin\n}\n","// see: https://github.com/mesqueeb/is-what/blob/88d6e4ca92fb2baab6003c54e02eedf4e729e5ab/src/index.ts\n\nfunction getType(value: any): string {\n  return Object.prototype.toString.call(value).slice(8, -1)\n}\n\nexport function isPlainObject(value: any): value is Record<string, any> {\n  if (getType(value) !== 'Object') {\n    return false\n  }\n\n  return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype\n}\n","import { isPlainObject } from './isPlainObject.js'\n\nexport function mergeDeep(target: Record<string, any>, source: Record<string, any>): Record<string, any> {\n  const output = { ...target }\n\n  if (isPlainObject(target) && isPlainObject(source)) {\n    Object.keys(source).forEach(key => {\n      if (isPlainObject(source[key]) && isPlainObject(target[key])) {\n        output[key] = mergeDeep(target[key], source[key])\n      } else {\n        output[key] = source[key]\n      }\n    })\n  }\n\n  return output\n}\n","import {\n  DOMOutputSpec, Mark as ProseMirrorMark, MarkSpec, MarkType,\n} from '@tiptap/pm/model'\nimport { Plugin, Transaction } from '@tiptap/pm/state'\n\nimport { Editor } from './Editor.js'\nimport { getExtensionField } from './helpers/getExtensionField.js'\nimport { MarkConfig } from './index.js'\nimport { InputRule } from './InputRule.js'\nimport { Node } from './Node.js'\nimport { PasteRule } from './PasteRule.js'\nimport {\n  AnyConfig,\n  Attributes,\n  Extensions,\n  GlobalAttributes,\n  KeyboardShortcutCommand,\n  ParentConfig,\n  RawCommands,\n} from './types.js'\nimport { callOrReturn } from './utilities/callOrReturn.js'\nimport { mergeDeep } from './utilities/mergeDeep.js'\n\ndeclare module '@tiptap/core' {\n  export interface MarkConfig<Options = any, Storage = any> {\n    // @ts-ignore - this is a dynamic key\n    [key: string]: any\n\n    /**\n     * The extension name - this must be unique.\n     * It will be used to identify the extension.\n     *\n     * @example 'myExtension'\n     */\n    name: string\n\n    /**\n     * The priority of your extension. The higher, the earlier it will be called\n     * and will take precedence over other extensions with a lower priority.\n     * @default 100\n     * @example 101\n     */\n    priority?: number\n\n    /**\n     * The default options for this extension.\n     * @example\n     * defaultOptions: {\n     *   myOption: 'foo',\n     *   myOtherOption: 10,\n     * }\n     */\n    defaultOptions?: Options\n\n    /**\n     * This method will add options to this extension\n     * @see https://tiptap.dev/guide/custom-extensions#settings\n     * @example\n     * addOptions() {\n     *  return {\n     *    myOption: 'foo',\n     *    myOtherOption: 10,\n     * }\n     */\n    addOptions?: (this: {\n      name: string\n      parent: Exclude<ParentConfig<MarkConfig<Options, Storage>>['addOptions'], undefined>\n    }) => Options\n\n    /**\n     * The default storage this extension can save data to.\n     * @see https://tiptap.dev/guide/custom-extensions#storage\n     * @example\n     * defaultStorage: {\n     *   prefetchedUsers: [],\n     *   loading: false,\n     * }\n     */\n    addStorage?: (this: {\n      name: string\n      options: Options\n      parent: Exclude<ParentConfig<MarkConfig<Options, Storage>>['addStorage'], undefined>\n    }) => Storage\n\n    /**\n     * This function adds globalAttributes to specific nodes.\n     * @see https://tiptap.dev/guide/custom-extensions#global-attributes\n     * @example\n     * addGlobalAttributes() {\n     *   return [\n     *     {\n             // Extend the following extensions\n     *       types: [\n     *         'heading',\n     *         'paragraph',\n     *       ],\n     *       // … with those attributes\n     *       attributes: {\n     *         textAlign: {\n     *           default: 'left',\n     *           renderHTML: attributes => ({\n     *             style: `text-align: ${attributes.textAlign}`,\n     *           }),\n     *           parseHTML: element => element.style.textAlign || 'left',\n     *         },\n     *       },\n     *     },\n     *   ]\n     * }\n     */\n    addGlobalAttributes?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      extensions: (Node | Mark)[]\n      parent: ParentConfig<MarkConfig<Options, Storage>>['addGlobalAttributes']\n    }) => GlobalAttributes\n\n    /**\n     * This function adds commands to the editor\n     * @see https://tiptap.dev/guide/custom-extensions#keyboard-shortcuts\n     * @example\n     * addCommands() {\n     *   return {\n     *     myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(),\n     *   }\n     * }\n     */\n    addCommands?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      type: MarkType\n      parent: ParentConfig<MarkConfig<Options, Storage>>['addCommands']\n    }) => Partial<RawCommands>\n\n    /**\n     * This function registers keyboard shortcuts.\n     * @see https://tiptap.dev/guide/custom-extensions#keyboard-shortcuts\n     * @example\n     * addKeyboardShortcuts() {\n     *   return {\n     *     'Mod-l': () => this.editor.commands.toggleBulletList(),\n     *   }\n     * },\n     */\n    addKeyboardShortcuts?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      type: MarkType\n      parent: ParentConfig<MarkConfig<Options, Storage>>['addKeyboardShortcuts']\n    }) => {\n      [key: string]: KeyboardShortcutCommand\n    }\n\n    /**\n     * This function adds input rules to the editor.\n     * @see https://tiptap.dev/guide/custom-extensions#input-rules\n     * @example\n     * addInputRules() {\n     *   return [\n     *     markInputRule({\n     *       find: inputRegex,\n     *       type: this.type,\n     *     }),\n     *   ]\n     * },\n     */\n    addInputRules?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      type: MarkType\n      parent: ParentConfig<MarkConfig<Options, Storage>>['addInputRules']\n    }) => InputRule[]\n\n    /**\n     * This function adds paste rules to the editor.\n     * @see https://tiptap.dev/guide/custom-extensions#paste-rules\n     * @example\n     * addPasteRules() {\n     *   return [\n     *     markPasteRule({\n     *       find: pasteRegex,\n     *       type: this.type,\n     *     }),\n     *   ]\n     * },\n     */\n    addPasteRules?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      type: MarkType\n      parent: ParentConfig<MarkConfig<Options, Storage>>['addPasteRules']\n    }) => PasteRule[]\n\n    /**\n     * This function adds Prosemirror plugins to the editor\n     * @see https://tiptap.dev/guide/custom-extensions#prosemirror-plugins\n     * @example\n     * addProseMirrorPlugins() {\n     *   return [\n     *     customPlugin(),\n     *   ]\n     * }\n     */\n    addProseMirrorPlugins?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      type: MarkType\n      parent: ParentConfig<MarkConfig<Options, Storage>>['addProseMirrorPlugins']\n    }) => Plugin[]\n\n    /**\n     * This function adds additional extensions to the editor. This is useful for\n     * building extension kits.\n     * @example\n     * addExtensions() {\n     *   return [\n     *     BulletList,\n     *     OrderedList,\n     *     ListItem\n     *   ]\n     * }\n     */\n    addExtensions?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      parent: ParentConfig<MarkConfig<Options, Storage>>['addExtensions']\n    }) => Extensions\n\n    /**\n     * This function extends the schema of the node.\n     * @example\n     * extendNodeSchema() {\n     *   return {\n     *     group: 'inline',\n     *     selectable: false,\n     *   }\n     * }\n     */\n    extendNodeSchema?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            parent: ParentConfig<MarkConfig<Options, Storage>>['extendNodeSchema']\n          },\n          extension: Node,\n        ) => Record<string, any>)\n      | null\n\n    /**\n     * This function extends the schema of the mark.\n     * @example\n     * extendMarkSchema() {\n     *   return {\n     *     group: 'inline',\n     *     selectable: false,\n     *   }\n     * }\n     */\n    extendMarkSchema?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            parent: ParentConfig<MarkConfig<Options, Storage>>['extendMarkSchema']\n          },\n          extension: Mark,\n        ) => Record<string, any>)\n      | null\n\n    /**\n     * The editor is not ready yet.\n     */\n    onBeforeCreate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: MarkType\n          parent: ParentConfig<MarkConfig<Options, Storage>>['onBeforeCreate']\n        }) => void)\n      | null\n\n    /**\n     * The editor is ready.\n     */\n    onCreate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: MarkType\n          parent: ParentConfig<MarkConfig<Options, Storage>>['onCreate']\n        }) => void)\n      | null\n\n    /**\n     * The content has changed.\n     */\n    onUpdate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: MarkType\n          parent: ParentConfig<MarkConfig<Options, Storage>>['onUpdate']\n        }) => void)\n      | null\n\n    /**\n     * The selection has changed.\n     */\n    onSelectionUpdate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: MarkType\n          parent: ParentConfig<MarkConfig<Options, Storage>>['onSelectionUpdate']\n        }) => void)\n      | null\n\n    /**\n     * The editor state has changed.\n     */\n    onTransaction?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            editor: Editor\n            type: MarkType\n            parent: ParentConfig<MarkConfig<Options, Storage>>['onTransaction']\n          },\n          props: {\n            editor: Editor\n            transaction: Transaction\n          },\n        ) => void)\n      | null\n\n    /**\n     * The editor is focused.\n     */\n    onFocus?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            editor: Editor\n            type: MarkType\n            parent: ParentConfig<MarkConfig<Options, Storage>>['onFocus']\n          },\n          props: {\n            event: FocusEvent\n          },\n        ) => void)\n      | null\n\n    /**\n     * The editor isn’t focused anymore.\n     */\n    onBlur?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            editor: Editor\n            type: MarkType\n            parent: ParentConfig<MarkConfig<Options, Storage>>['onBlur']\n          },\n          props: {\n            event: FocusEvent\n          },\n        ) => void)\n      | null\n\n    /**\n     * The editor is destroyed.\n     */\n    onDestroy?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: MarkType\n          parent: ParentConfig<MarkConfig<Options, Storage>>['onDestroy']\n        }) => void)\n      | null\n\n    /**\n     * Keep mark after split node\n     */\n    keepOnSplit?: boolean | (() => boolean)\n\n    /**\n     * Inclusive\n     */\n    inclusive?:\n      | MarkSpec['inclusive']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<MarkConfig<Options, Storage>>['inclusive']\n          editor?: Editor\n        }) => MarkSpec['inclusive'])\n\n    /**\n     * Excludes\n     */\n    excludes?:\n      | MarkSpec['excludes']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<MarkConfig<Options, Storage>>['excludes']\n          editor?: Editor\n        }) => MarkSpec['excludes'])\n\n    /**\n     * Marks this Mark as exitable\n     */\n    exitable?: boolean | (() => boolean)\n\n    /**\n     * Group\n     */\n    group?:\n      | MarkSpec['group']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<MarkConfig<Options, Storage>>['group']\n          editor?: Editor\n        }) => MarkSpec['group'])\n\n    /**\n     * Spanning\n     */\n    spanning?:\n      | MarkSpec['spanning']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<MarkConfig<Options, Storage>>['spanning']\n          editor?: Editor\n        }) => MarkSpec['spanning'])\n\n    /**\n     * Code\n     */\n    code?:\n      | boolean\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<MarkConfig<Options, Storage>>['code']\n          editor?: Editor\n        }) => boolean)\n\n    /**\n     * Parse HTML\n     */\n    parseHTML?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      parent: ParentConfig<MarkConfig<Options, Storage>>['parseHTML']\n      editor?: Editor\n    }) => MarkSpec['parseDOM']\n\n    /**\n     * Render HTML\n     */\n    renderHTML?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            parent: ParentConfig<MarkConfig<Options, Storage>>['renderHTML']\n            editor?: Editor\n          },\n          props: {\n            mark: ProseMirrorMark\n            HTMLAttributes: Record<string, any>\n          },\n        ) => DOMOutputSpec)\n      | null\n\n    /**\n     * Attributes\n     */\n    addAttributes?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      parent: ParentConfig<MarkConfig<Options, Storage>>['addAttributes']\n      editor?: Editor\n    // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n    }) => Attributes | {}\n  }\n}\n\n/**\n * The Mark class is used to create custom mark extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nexport class Mark<Options = any, Storage = any> {\n  type = 'mark'\n\n  name = 'mark'\n\n  parent: Mark | null = null\n\n  child: Mark | null = null\n\n  options: Options\n\n  storage: Storage\n\n  config: MarkConfig = {\n    name: this.name,\n    defaultOptions: {},\n  }\n\n  constructor(config: Partial<MarkConfig<Options, Storage>> = {}) {\n    this.config = {\n      ...this.config,\n      ...config,\n    }\n\n    this.name = this.config.name\n\n    if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) {\n      console.warn(\n        `[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${this.name}\".`,\n      )\n    }\n\n    // TODO: remove `addOptions` fallback\n    this.options = this.config.defaultOptions\n\n    if (this.config.addOptions) {\n      this.options = callOrReturn(\n        getExtensionField<AnyConfig['addOptions']>(this, 'addOptions', {\n          name: this.name,\n        }),\n      )\n    }\n\n    this.storage = callOrReturn(\n      getExtensionField<AnyConfig['addStorage']>(this, 'addStorage', {\n        name: this.name,\n        options: this.options,\n      }),\n    ) || {}\n  }\n\n  static create<O = any, S = any>(config: Partial<MarkConfig<O, S>> = {}) {\n    return new Mark<O, S>(config)\n  }\n\n  configure(options: Partial<Options> = {}) {\n    // return a new instance so we can use the same extension\n    // with different calls of `configure`\n    const extension = this.extend<Options, Storage>({\n      ...this.config,\n      addOptions: () => {\n        return mergeDeep(this.options as Record<string, any>, options) as Options\n      },\n    })\n\n    // Always preserve the current name\n    extension.name = this.name\n    // Set the parent to be our parent\n    extension.parent = this.parent\n\n    return extension\n  }\n\n  extend<ExtendedOptions = Options, ExtendedStorage = Storage>(\n    extendedConfig: Partial<MarkConfig<ExtendedOptions, ExtendedStorage>> = {},\n  ) {\n    const extension = new Mark<ExtendedOptions, ExtendedStorage>(extendedConfig)\n\n    extension.parent = this\n\n    this.child = extension\n\n    extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name\n\n    if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) {\n      console.warn(\n        `[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${extension.name}\".`,\n      )\n    }\n\n    extension.options = callOrReturn(\n      getExtensionField<AnyConfig['addOptions']>(extension, 'addOptions', {\n        name: extension.name,\n      }),\n    )\n\n    extension.storage = callOrReturn(\n      getExtensionField<AnyConfig['addStorage']>(extension, 'addStorage', {\n        name: extension.name,\n        options: extension.options,\n      }),\n    )\n\n    return extension\n  }\n\n  static handleExit({ editor, mark }: { editor: Editor; mark: Mark }) {\n    const { tr } = editor.state\n    const currentPos = editor.state.selection.$from\n    const isAtEnd = currentPos.pos === currentPos.end()\n\n    if (isAtEnd) {\n      const currentMarks = currentPos.marks()\n      const isInMark = !!currentMarks.find(m => m?.type.name === mark.name)\n\n      if (!isInMark) {\n        return false\n      }\n\n      const removeMark = currentMarks.find(m => m?.type.name === mark.name)\n\n      if (removeMark) {\n        tr.removeStoredMark(removeMark)\n      }\n      tr.insertText(' ', currentPos.pos)\n\n      editor.view.dispatch(tr)\n\n      return true\n    }\n\n    return false\n  }\n}\n","export function isNumber(value: any): value is number {\n  return typeof value === 'number'\n}\n","import { Fragment, Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { EditorState, Plugin } from '@tiptap/pm/state'\n\nimport { CommandManager } from './CommandManager.js'\nimport { Editor } from './Editor.js'\nimport { createChainableState } from './helpers/createChainableState.js'\nimport { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js'\nimport {\n  CanCommands,\n  ChainedCommands,\n  ExtendedRegExpMatchArray,\n  Range,\n  SingleCommands,\n} from './types.js'\nimport { isNumber } from './utilities/isNumber.js'\nimport { isRegExp } from './utilities/isRegExp.js'\n\nexport type PasteRuleMatch = {\n  index: number;\n  text: string;\n  replaceWith?: string;\n  match?: RegExpMatchArray;\n  data?: Record<string, any>;\n};\n\nexport type PasteRuleFinder =\n  | RegExp\n  | ((text: string, event?: ClipboardEvent | null) => PasteRuleMatch[] | null | undefined);\n\n/**\n * Paste rules are used to react to pasted content.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nexport class PasteRule {\n  find: PasteRuleFinder\n\n  handler: (props: {\n    state: EditorState;\n    range: Range;\n    match: ExtendedRegExpMatchArray;\n    commands: SingleCommands;\n    chain: () => ChainedCommands;\n    can: () => CanCommands;\n    pasteEvent: ClipboardEvent | null;\n    dropEvent: DragEvent | null;\n  }) => void | null\n\n  constructor(config: {\n    find: PasteRuleFinder;\n    handler: (props: {\n      can: () => CanCommands;\n      chain: () => ChainedCommands;\n      commands: SingleCommands;\n      dropEvent: DragEvent | null;\n      match: ExtendedRegExpMatchArray;\n      pasteEvent: ClipboardEvent | null;\n      range: Range;\n      state: EditorState;\n    }) => void | null;\n  }) {\n    this.find = config.find\n    this.handler = config.handler\n  }\n}\n\nconst pasteRuleMatcherHandler = (\n  text: string,\n  find: PasteRuleFinder,\n  event?: ClipboardEvent | null,\n): ExtendedRegExpMatchArray[] => {\n  if (isRegExp(find)) {\n    return [...text.matchAll(find)]\n  }\n\n  const matches = find(text, event)\n\n  if (!matches) {\n    return []\n  }\n\n  return matches.map(pasteRuleMatch => {\n    const result: ExtendedRegExpMatchArray = [pasteRuleMatch.text]\n\n    result.index = pasteRuleMatch.index\n    result.input = text\n    result.data = pasteRuleMatch.data\n\n    if (pasteRuleMatch.replaceWith) {\n      if (!pasteRuleMatch.text.includes(pasteRuleMatch.replaceWith)) {\n        console.warn(\n          '[tiptap warn]: \"pasteRuleMatch.replaceWith\" must be part of \"pasteRuleMatch.text\".',\n        )\n      }\n\n      result.push(pasteRuleMatch.replaceWith)\n    }\n\n    return result\n  })\n}\n\nfunction run(config: {\n  editor: Editor;\n  state: EditorState;\n  from: number;\n  to: number;\n  rule: PasteRule;\n  pasteEvent: ClipboardEvent | null;\n  dropEvent: DragEvent | null;\n}): boolean {\n  const {\n    editor, state, from, to, rule, pasteEvent, dropEvent,\n  } = config\n\n  const { commands, chain, can } = new CommandManager({\n    editor,\n    state,\n  })\n\n  const handlers: (void | null)[] = []\n\n  state.doc.nodesBetween(from, to, (node, pos) => {\n    if (!node.isTextblock || node.type.spec.code) {\n      return\n    }\n\n    const resolvedFrom = Math.max(from, pos)\n    const resolvedTo = Math.min(to, pos + node.content.size)\n    const textToMatch = node.textBetween(resolvedFrom - pos, resolvedTo - pos, undefined, '\\ufffc')\n\n    const matches = pasteRuleMatcherHandler(textToMatch, rule.find, pasteEvent)\n\n    matches.forEach(match => {\n      if (match.index === undefined) {\n        return\n      }\n\n      const start = resolvedFrom + match.index + 1\n      const end = start + match[0].length\n      const range = {\n        from: state.tr.mapping.map(start),\n        to: state.tr.mapping.map(end),\n      }\n\n      const handler = rule.handler({\n        state,\n        range,\n        match,\n        commands,\n        chain,\n        can,\n        pasteEvent,\n        dropEvent,\n      })\n\n      handlers.push(handler)\n    })\n  })\n\n  const success = handlers.every(handler => handler !== null)\n\n  return success\n}\n\n// When dragging across editors, must get another editor instance to delete selection content.\nlet tiptapDragFromOtherEditor: Editor | null = null\n\nconst createClipboardPasteEvent = (text: string) => {\n  const event = new ClipboardEvent('paste', {\n    clipboardData: new DataTransfer(),\n  })\n\n  event.clipboardData?.setData('text/html', text)\n\n  return event\n}\n\n/**\n * Create an paste rules plugin. When enabled, it will cause pasted\n * text that matches any of the given rules to trigger the rule’s\n * action.\n */\nexport function pasteRulesPlugin(props: { editor: Editor; rules: PasteRule[] }): Plugin[] {\n  const { editor, rules } = props\n  let dragSourceElement: Element | null = null\n  let isPastedFromProseMirror = false\n  let isDroppedFromProseMirror = false\n  let pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null\n  let dropEvent: DragEvent | null\n\n  try {\n    dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null\n  } catch {\n    dropEvent = null\n  }\n\n  const processEvent = ({\n    state,\n    from,\n    to,\n    rule,\n    pasteEvt,\n  }: {\n    state: EditorState;\n    from: number;\n    to: { b: number };\n    rule: PasteRule;\n    pasteEvt: ClipboardEvent | null;\n  }) => {\n    const tr = state.tr\n    const chainableState = createChainableState({\n      state,\n      transaction: tr,\n    })\n\n    const handler = run({\n      editor,\n      state: chainableState,\n      from: Math.max(from - 1, 0),\n      to: to.b - 1,\n      rule,\n      pasteEvent: pasteEvt,\n      dropEvent,\n    })\n\n    if (!handler || !tr.steps.length) {\n      return\n    }\n\n    try {\n      dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null\n    } catch {\n      dropEvent = null\n    }\n    pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null\n\n    return tr\n  }\n\n  const plugins = rules.map(rule => {\n    return new Plugin({\n      // we register a global drag handler to track the current drag source element\n      view(view) {\n        const handleDragstart = (event: DragEvent) => {\n          dragSourceElement = view.dom.parentElement?.contains(event.target as Element)\n            ? view.dom.parentElement\n            : null\n\n          if (dragSourceElement) {\n            tiptapDragFromOtherEditor = editor\n          }\n        }\n\n        const handleDragend = () => {\n          if (tiptapDragFromOtherEditor) {\n            tiptapDragFromOtherEditor = null\n          }\n        }\n\n        window.addEventListener('dragstart', handleDragstart)\n        window.addEventListener('dragend', handleDragend)\n\n        return {\n          destroy() {\n            window.removeEventListener('dragstart', handleDragstart)\n            window.removeEventListener('dragend', handleDragend)\n          },\n        }\n      },\n\n      props: {\n        handleDOMEvents: {\n          drop: (view, event: Event) => {\n            isDroppedFromProseMirror = dragSourceElement === view.dom.parentElement\n            dropEvent = event as DragEvent\n\n            if (!isDroppedFromProseMirror) {\n              const dragFromOtherEditor = tiptapDragFromOtherEditor\n\n              if (dragFromOtherEditor?.isEditable) {\n                // setTimeout to avoid the wrong content after drop, timeout arg can't be empty or 0\n                setTimeout(() => {\n                  const selection = dragFromOtherEditor.state.selection\n\n                  if (selection) {\n                    dragFromOtherEditor.commands.deleteRange({ from: selection.from, to: selection.to })\n                  }\n                }, 10)\n              }\n            }\n            return false\n          },\n\n          paste: (_view, event: Event) => {\n            const html = (event as ClipboardEvent).clipboardData?.getData('text/html')\n\n            pasteEvent = event as ClipboardEvent\n\n            isPastedFromProseMirror = !!html?.includes('data-pm-slice')\n\n            return false\n          },\n        },\n      },\n\n      appendTransaction: (transactions, oldState, state) => {\n        const transaction = transactions[0]\n        const isPaste = transaction.getMeta('uiEvent') === 'paste' && !isPastedFromProseMirror\n        const isDrop = transaction.getMeta('uiEvent') === 'drop' && !isDroppedFromProseMirror\n\n        // if PasteRule is triggered by insertContent()\n        const simulatedPasteMeta = transaction.getMeta('applyPasteRules') as\n          | undefined\n          | { from: number; text: string | ProseMirrorNode | Fragment }\n        const isSimulatedPaste = !!simulatedPasteMeta\n\n        if (!isPaste && !isDrop && !isSimulatedPaste) {\n          return\n        }\n\n        // Handle simulated paste\n        if (isSimulatedPaste) {\n          let { text } = simulatedPasteMeta\n\n          if (typeof text === 'string') {\n            text = text as string\n          } else {\n            text = getHTMLFromFragment(Fragment.from(text), state.schema)\n          }\n\n          const { from } = simulatedPasteMeta\n          const to = from + text.length\n\n          const pasteEvt = createClipboardPasteEvent(text)\n\n          return processEvent({\n            rule,\n            state,\n            from,\n            to: { b: to },\n            pasteEvt,\n          })\n        }\n\n        // handle actual paste/drop\n        const from = oldState.doc.content.findDiffStart(state.doc.content)\n        const to = oldState.doc.content.findDiffEnd(state.doc.content)\n\n        // stop if there is no changed range\n        if (!isNumber(from) || !to || from === to.b) {\n          return\n        }\n\n        return processEvent({\n          rule,\n          state,\n          from,\n          to,\n          pasteEvt: pasteEvent,\n        })\n      },\n    })\n  })\n\n  return plugins\n}\n","export function findDuplicates(items: any[]): any[] {\n  const filtered = items.filter((el, index) => items.indexOf(el) !== index)\n\n  return Array.from(new Set(filtered))\n}\n","import { keymap } from '@tiptap/pm/keymap'\nimport { Schema } from '@tiptap/pm/model'\nimport { Plugin } from '@tiptap/pm/state'\nimport { NodeViewConstructor } from '@tiptap/pm/view'\n\nimport type { Editor } from './Editor.js'\nimport { getAttributesFromExtensions } from './helpers/getAttributesFromExtensions.js'\nimport { getExtensionField } from './helpers/getExtensionField.js'\nimport { getNodeType } from './helpers/getNodeType.js'\nimport { getRenderedAttributes } from './helpers/getRenderedAttributes.js'\nimport { getSchemaByResolvedExtensions } from './helpers/getSchemaByResolvedExtensions.js'\nimport { getSchemaTypeByName } from './helpers/getSchemaTypeByName.js'\nimport { isExtensionRulesEnabled } from './helpers/isExtensionRulesEnabled.js'\nimport { splitExtensions } from './helpers/splitExtensions.js'\nimport type { NodeConfig } from './index.js'\nimport { InputRule, inputRulesPlugin } from './InputRule.js'\nimport { Mark } from './Mark.js'\nimport { PasteRule, pasteRulesPlugin } from './PasteRule.js'\nimport { AnyConfig, Extensions, RawCommands } from './types.js'\nimport { callOrReturn } from './utilities/callOrReturn.js'\nimport { findDuplicates } from './utilities/findDuplicates.js'\n\nexport class ExtensionManager {\n  editor: Editor\n\n  schema: Schema\n\n  extensions: Extensions\n\n  splittableMarks: string[] = []\n\n  constructor(extensions: Extensions, editor: Editor) {\n    this.editor = editor\n    this.extensions = ExtensionManager.resolve(extensions)\n    this.schema = getSchemaByResolvedExtensions(this.extensions, editor)\n    this.setupExtensions()\n  }\n\n  /**\n   * Returns a flattened and sorted extension list while\n   * also checking for duplicated extensions and warns the user.\n   * @param extensions An array of Tiptap extensions\n   * @returns An flattened and sorted array of Tiptap extensions\n   */\n  static resolve(extensions: Extensions): Extensions {\n    const resolvedExtensions = ExtensionManager.sort(ExtensionManager.flatten(extensions))\n    const duplicatedNames = findDuplicates(resolvedExtensions.map(extension => extension.name))\n\n    if (duplicatedNames.length) {\n      console.warn(\n        `[tiptap warn]: Duplicate extension names found: [${duplicatedNames\n          .map(item => `'${item}'`)\n          .join(', ')}]. This can lead to issues.`,\n      )\n    }\n\n    return resolvedExtensions\n  }\n\n  /**\n   * Create a flattened array of extensions by traversing the `addExtensions` field.\n   * @param extensions An array of Tiptap extensions\n   * @returns A flattened array of Tiptap extensions\n   */\n  static flatten(extensions: Extensions): Extensions {\n    return (\n      extensions\n        .map(extension => {\n          const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage,\n          }\n\n          const addExtensions = getExtensionField<AnyConfig['addExtensions']>(\n            extension,\n            'addExtensions',\n            context,\n          )\n\n          if (addExtensions) {\n            return [extension, ...this.flatten(addExtensions())]\n          }\n\n          return extension\n        })\n        // `Infinity` will break TypeScript so we set a number that is probably high enough\n        .flat(10)\n    )\n  }\n\n  /**\n   * Sort extensions by priority.\n   * @param extensions An array of Tiptap extensions\n   * @returns A sorted array of Tiptap extensions by priority\n   */\n  static sort(extensions: Extensions): Extensions {\n    const defaultPriority = 100\n\n    return extensions.sort((a, b) => {\n      const priorityA = getExtensionField<AnyConfig['priority']>(a, 'priority') || defaultPriority\n      const priorityB = getExtensionField<AnyConfig['priority']>(b, 'priority') || defaultPriority\n\n      if (priorityA > priorityB) {\n        return -1\n      }\n\n      if (priorityA < priorityB) {\n        return 1\n      }\n\n      return 0\n    })\n  }\n\n  /**\n   * Get all commands from the extensions.\n   * @returns An object with all commands where the key is the command name and the value is the command function\n   */\n  get commands(): RawCommands {\n    return this.extensions.reduce((commands, extension) => {\n      const context = {\n        name: extension.name,\n        options: extension.options,\n        storage: extension.storage,\n        editor: this.editor,\n        type: getSchemaTypeByName(extension.name, this.schema),\n      }\n\n      const addCommands = getExtensionField<AnyConfig['addCommands']>(\n        extension,\n        'addCommands',\n        context,\n      )\n\n      if (!addCommands) {\n        return commands\n      }\n\n      return {\n        ...commands,\n        ...addCommands(),\n      }\n    }, {} as RawCommands)\n  }\n\n  /**\n   * Get all registered Prosemirror plugins from the extensions.\n   * @returns An array of Prosemirror plugins\n   */\n  get plugins(): Plugin[] {\n    const { editor } = this\n\n    // With ProseMirror, first plugins within an array are executed first.\n    // In Tiptap, we provide the ability to override plugins,\n    // so it feels more natural to run plugins at the end of an array first.\n    // That’s why we have to reverse the `extensions` array and sort again\n    // based on the `priority` option.\n    const extensions = ExtensionManager.sort([...this.extensions].reverse())\n\n    const inputRules: InputRule[] = []\n    const pasteRules: PasteRule[] = []\n\n    const allPlugins = extensions\n      .map(extension => {\n        const context = {\n          name: extension.name,\n          options: extension.options,\n          storage: extension.storage,\n          editor,\n          type: getSchemaTypeByName(extension.name, this.schema),\n        }\n\n        const plugins: Plugin[] = []\n\n        const addKeyboardShortcuts = getExtensionField<AnyConfig['addKeyboardShortcuts']>(\n          extension,\n          'addKeyboardShortcuts',\n          context,\n        )\n\n        let defaultBindings: Record<string, () => boolean> = {}\n\n        // bind exit handling\n        if (extension.type === 'mark' && getExtensionField<AnyConfig['exitable']>(extension, 'exitable', context)) {\n          defaultBindings.ArrowRight = () => Mark.handleExit({ editor, mark: extension as Mark })\n        }\n\n        if (addKeyboardShortcuts) {\n          const bindings = Object.fromEntries(\n            Object.entries(addKeyboardShortcuts()).map(([shortcut, method]) => {\n              return [shortcut, () => method({ editor })]\n            }),\n          )\n\n          defaultBindings = { ...defaultBindings, ...bindings }\n        }\n\n        const keyMapPlugin = keymap(defaultBindings)\n\n        plugins.push(keyMapPlugin)\n\n        const addInputRules = getExtensionField<AnyConfig['addInputRules']>(\n          extension,\n          'addInputRules',\n          context,\n        )\n\n        if (isExtensionRulesEnabled(extension, editor.options.enableInputRules) && addInputRules) {\n          inputRules.push(...addInputRules())\n        }\n\n        const addPasteRules = getExtensionField<AnyConfig['addPasteRules']>(\n          extension,\n          'addPasteRules',\n          context,\n        )\n\n        if (isExtensionRulesEnabled(extension, editor.options.enablePasteRules) && addPasteRules) {\n          pasteRules.push(...addPasteRules())\n        }\n\n        const addProseMirrorPlugins = getExtensionField<AnyConfig['addProseMirrorPlugins']>(\n          extension,\n          'addProseMirrorPlugins',\n          context,\n        )\n\n        if (addProseMirrorPlugins) {\n          const proseMirrorPlugins = addProseMirrorPlugins()\n\n          plugins.push(...proseMirrorPlugins)\n        }\n\n        return plugins\n      })\n      .flat()\n\n    return [\n      inputRulesPlugin({\n        editor,\n        rules: inputRules,\n      }),\n      ...pasteRulesPlugin({\n        editor,\n        rules: pasteRules,\n      }),\n      ...allPlugins,\n    ]\n  }\n\n  /**\n   * Get all attributes from the extensions.\n   * @returns An array of attributes\n   */\n  get attributes() {\n    return getAttributesFromExtensions(this.extensions)\n  }\n\n  /**\n   * Get all node views from the extensions.\n   * @returns An object with all node views where the key is the node name and the value is the node view function\n   */\n  get nodeViews(): Record<string, NodeViewConstructor> {\n    const { editor } = this\n    const { nodeExtensions } = splitExtensions(this.extensions)\n\n    return Object.fromEntries(\n      nodeExtensions\n        .filter(extension => !!getExtensionField(extension, 'addNodeView'))\n        .map(extension => {\n          const extensionAttributes = this.attributes.filter(\n            attribute => attribute.type === extension.name,\n          )\n          const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage,\n            editor,\n            type: getNodeType(extension.name, this.schema),\n          }\n          const addNodeView = getExtensionField<NodeConfig['addNodeView']>(\n            extension,\n            'addNodeView',\n            context,\n          )\n\n          if (!addNodeView) {\n            return []\n          }\n\n          const nodeview: NodeViewConstructor = (\n            node,\n            view,\n            getPos,\n            decorations,\n            innerDecorations,\n          ) => {\n            const HTMLAttributes = getRenderedAttributes(node, extensionAttributes)\n\n            return addNodeView()({\n              // pass-through\n              node,\n              view,\n              getPos: getPos as () => number,\n              decorations,\n              innerDecorations,\n              // tiptap-specific\n              editor,\n              extension,\n              HTMLAttributes,\n            })\n          }\n\n          return [extension.name, nodeview]\n        }),\n    )\n  }\n\n  /**\n   * Go through all extensions, create extension storages & setup marks\n   * & bind editor event listener.\n   */\n  private setupExtensions() {\n    this.extensions.forEach(extension => {\n      // store extension storage in editor\n      this.editor.extensionStorage[extension.name] = extension.storage\n\n      const context = {\n        name: extension.name,\n        options: extension.options,\n        storage: extension.storage,\n        editor: this.editor,\n        type: getSchemaTypeByName(extension.name, this.schema),\n      }\n\n      if (extension.type === 'mark') {\n        const keepOnSplit = callOrReturn(getExtensionField(extension, 'keepOnSplit', context)) ?? true\n\n        if (keepOnSplit) {\n          this.splittableMarks.push(extension.name)\n        }\n      }\n\n      const onBeforeCreate = getExtensionField<AnyConfig['onBeforeCreate']>(\n        extension,\n        'onBeforeCreate',\n        context,\n      )\n      const onCreate = getExtensionField<AnyConfig['onCreate']>(extension, 'onCreate', context)\n      const onUpdate = getExtensionField<AnyConfig['onUpdate']>(extension, 'onUpdate', context)\n      const onSelectionUpdate = getExtensionField<AnyConfig['onSelectionUpdate']>(\n        extension,\n        'onSelectionUpdate',\n        context,\n      )\n      const onTransaction = getExtensionField<AnyConfig['onTransaction']>(\n        extension,\n        'onTransaction',\n        context,\n      )\n      const onFocus = getExtensionField<AnyConfig['onFocus']>(extension, 'onFocus', context)\n      const onBlur = getExtensionField<AnyConfig['onBlur']>(extension, 'onBlur', context)\n      const onDestroy = getExtensionField<AnyConfig['onDestroy']>(extension, 'onDestroy', context)\n\n      if (onBeforeCreate) {\n        this.editor.on('beforeCreate', onBeforeCreate)\n      }\n\n      if (onCreate) {\n        this.editor.on('create', onCreate)\n      }\n\n      if (onUpdate) {\n        this.editor.on('update', onUpdate)\n      }\n\n      if (onSelectionUpdate) {\n        this.editor.on('selectionUpdate', onSelectionUpdate)\n      }\n\n      if (onTransaction) {\n        this.editor.on('transaction', onTransaction)\n      }\n\n      if (onFocus) {\n        this.editor.on('focus', onFocus)\n      }\n\n      if (onBlur) {\n        this.editor.on('blur', onBlur)\n      }\n\n      if (onDestroy) {\n        this.editor.on('destroy', onDestroy)\n      }\n    })\n  }\n}\n","import { Plugin, Transaction } from '@tiptap/pm/state'\n\nimport { Editor } from './Editor.js'\nimport { getExtensionField } from './helpers/getExtensionField.js'\nimport { ExtensionConfig } from './index.js'\nimport { InputRule } from './InputRule.js'\nimport { Mark } from './Mark.js'\nimport { Node } from './Node.js'\nimport { PasteRule } from './PasteRule.js'\nimport {\n  AnyConfig,\n  Extensions,\n  GlobalAttributes,\n  KeyboardShortcutCommand,\n  ParentConfig,\n  RawCommands,\n} from './types.js'\nimport { callOrReturn } from './utilities/callOrReturn.js'\nimport { mergeDeep } from './utilities/mergeDeep.js'\n\ndeclare module '@tiptap/core' {\n  interface ExtensionConfig<Options = any, Storage = any> {\n    // @ts-ignore - this is a dynamic key\n    [key: string]: any\n\n    /**\n     * The extension name - this must be unique.\n     * It will be used to identify the extension.\n     *\n     * @example 'myExtension'\n     */\n    name: string\n\n    /**\n     * The priority of your extension. The higher, the earlier it will be called\n     * and will take precedence over other extensions with a lower priority.\n     * @default 100\n     * @example 101\n     */\n    priority?: number\n\n    /**\n     * The default options for this extension.\n     * @example\n     * defaultOptions: {\n     *   myOption: 'foo',\n     *   myOtherOption: 10,\n     * }\n     */\n    defaultOptions?: Options\n\n    /**\n     * This method will add options to this extension\n     * @see https://tiptap.dev/docs/editor/guide/custom-extensions#settings\n     * @example\n     * addOptions() {\n     *  return {\n     *    myOption: 'foo',\n     *    myOtherOption: 10,\n     * }\n     */\n    addOptions?: (this: {\n      name: string\n      parent: Exclude<ParentConfig<ExtensionConfig<Options, Storage>>['addOptions'], undefined>\n    }) => Options\n\n    /**\n     * The default storage this extension can save data to.\n     * @see https://tiptap.dev/docs/editor/guide/custom-extensions#storage\n     * @example\n     * defaultStorage: {\n     *   prefetchedUsers: [],\n     *   loading: false,\n     * }\n     */\n    addStorage?: (this: {\n      name: string\n      options: Options\n      parent: Exclude<ParentConfig<ExtensionConfig<Options, Storage>>['addStorage'], undefined>\n    }) => Storage\n\n    /**\n     * This function adds globalAttributes to specific nodes.\n     * @see https://tiptap.dev/docs/editor/guide/custom-extensions#global-attributes\n     * @example\n     * addGlobalAttributes() {\n     *   return [\n     *     {\n             // Extend the following extensions\n     *       types: [\n     *         'heading',\n     *         'paragraph',\n     *       ],\n     *       // … with those attributes\n     *       attributes: {\n     *         textAlign: {\n     *           default: 'left',\n     *           renderHTML: attributes => ({\n     *             style: `text-align: ${attributes.textAlign}`,\n     *           }),\n     *           parseHTML: element => element.style.textAlign || 'left',\n     *         },\n     *       },\n     *     },\n     *   ]\n     * }\n     */\n    addGlobalAttributes?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      extensions: (Node | Mark)[]\n      parent: ParentConfig<ExtensionConfig<Options, Storage>>['addGlobalAttributes']\n    }) => GlobalAttributes\n\n    /**\n     * This function adds commands to the editor\n     * @see https://tiptap.dev/docs/editor/guide/custom-extensions#commands\n     * @example\n     * addCommands() {\n     *   return {\n     *     myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(),\n     *   }\n     * }\n     */\n    addCommands?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      parent: ParentConfig<ExtensionConfig<Options, Storage>>['addCommands']\n    }) => Partial<RawCommands>\n\n    /**\n     * This function registers keyboard shortcuts.\n     * @see https://tiptap.dev/docs/editor/guide/custom-extensions#keyboard-shortcuts\n     * @example\n     * addKeyboardShortcuts() {\n     *   return {\n     *     'Mod-l': () => this.editor.commands.toggleBulletList(),\n     *   }\n     * },\n     */\n    addKeyboardShortcuts?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      parent: ParentConfig<ExtensionConfig<Options, Storage>>['addKeyboardShortcuts']\n    }) => {\n      [key: string]: KeyboardShortcutCommand\n    }\n\n    /**\n     * This function adds input rules to the editor.\n     * @see https://tiptap.dev/docs/editor/guide/custom-extensions#input-rules\n     * @example\n     * addInputRules() {\n     *   return [\n     *     markInputRule({\n     *       find: inputRegex,\n     *       type: this.type,\n     *     }),\n     *   ]\n     * },\n     */\n    addInputRules?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      parent: ParentConfig<ExtensionConfig<Options, Storage>>['addInputRules']\n    }) => InputRule[]\n\n    /**\n     * This function adds paste rules to the editor.\n     * @see https://tiptap.dev/docs/editor/guide/custom-extensions#paste-rules\n     * @example\n     * addPasteRules() {\n     *   return [\n     *     markPasteRule({\n     *       find: pasteRegex,\n     *       type: this.type,\n     *     }),\n     *   ]\n     * },\n     */\n    addPasteRules?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      parent: ParentConfig<ExtensionConfig<Options, Storage>>['addPasteRules']\n    }) => PasteRule[]\n\n    /**\n     * This function adds Prosemirror plugins to the editor\n     * @see https://tiptap.dev/docs/editor/guide/custom-extensions#prosemirror-plugins\n     * @example\n     * addProseMirrorPlugins() {\n     *   return [\n     *     customPlugin(),\n     *   ]\n     * }\n     */\n    addProseMirrorPlugins?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      parent: ParentConfig<ExtensionConfig<Options, Storage>>['addProseMirrorPlugins']\n    }) => Plugin[]\n\n    /**\n     * This function adds additional extensions to the editor. This is useful for\n     * building extension kits.\n     * @example\n     * addExtensions() {\n     *   return [\n     *     BulletList,\n     *     OrderedList,\n     *     ListItem\n     *   ]\n     * }\n     */\n    addExtensions?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      parent: ParentConfig<ExtensionConfig<Options, Storage>>['addExtensions']\n    }) => Extensions\n\n    /**\n     * This function extends the schema of the node.\n     * @example\n     * extendNodeSchema() {\n     *   return {\n     *     group: 'inline',\n     *     selectable: false,\n     *   }\n     * }\n     */\n    extendNodeSchema?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            parent: ParentConfig<ExtensionConfig<Options, Storage>>['extendNodeSchema']\n          },\n          extension: Node,\n        ) => Record<string, any>)\n      | null\n\n    /**\n     * This function extends the schema of the mark.\n     * @example\n     * extendMarkSchema() {\n     *   return {\n     *     group: 'inline',\n     *     selectable: false,\n     *   }\n     * }\n     */\n    extendMarkSchema?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            parent: ParentConfig<ExtensionConfig<Options, Storage>>['extendMarkSchema']\n          },\n          extension: Mark,\n        ) => Record<string, any>)\n      | null\n\n    /**\n     * The editor is not ready yet.\n     */\n    onBeforeCreate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          parent: ParentConfig<ExtensionConfig<Options, Storage>>['onBeforeCreate']\n        }) => void)\n      | null\n\n    /**\n     * The editor is ready.\n     */\n    onCreate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          parent: ParentConfig<ExtensionConfig<Options, Storage>>['onCreate']\n        }) => void)\n      | null\n\n    /**\n     * The content has changed.\n     */\n    onUpdate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          parent: ParentConfig<ExtensionConfig<Options, Storage>>['onUpdate']\n        }) => void)\n      | null\n\n    /**\n     * The selection has changed.\n     */\n    onSelectionUpdate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          parent: ParentConfig<ExtensionConfig<Options, Storage>>['onSelectionUpdate']\n        }) => void)\n      | null\n\n    /**\n     * The editor state has changed.\n     */\n    onTransaction?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            editor: Editor\n            parent: ParentConfig<ExtensionConfig<Options, Storage>>['onTransaction']\n          },\n          props: {\n            editor: Editor\n            transaction: Transaction\n          },\n        ) => void)\n      | null\n\n    /**\n     * The editor is focused.\n     */\n    onFocus?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            editor: Editor\n            parent: ParentConfig<ExtensionConfig<Options, Storage>>['onFocus']\n          },\n          props: {\n            event: FocusEvent\n          },\n        ) => void)\n      | null\n\n    /**\n     * The editor isn’t focused anymore.\n     */\n    onBlur?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            editor: Editor\n            parent: ParentConfig<ExtensionConfig<Options, Storage>>['onBlur']\n          },\n          props: {\n            event: FocusEvent\n          },\n        ) => void)\n      | null\n\n    /**\n     * The editor is destroyed.\n     */\n    onDestroy?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          parent: ParentConfig<ExtensionConfig<Options, Storage>>['onDestroy']\n        }) => void)\n      | null\n  }\n}\n\n/**\n * The Extension class is the base class for all extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nexport class Extension<Options = any, Storage = any> {\n  type = 'extension'\n\n  name = 'extension'\n\n  parent: Extension | null = null\n\n  child: Extension | null = null\n\n  options: Options\n\n  storage: Storage\n\n  config: ExtensionConfig = {\n    name: this.name,\n    defaultOptions: {},\n  }\n\n  constructor(config: Partial<ExtensionConfig<Options, Storage>> = {}) {\n    this.config = {\n      ...this.config,\n      ...config,\n    }\n\n    this.name = this.config.name\n\n    if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) {\n      console.warn(\n        `[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${this.name}\".`,\n      )\n    }\n\n    // TODO: remove `addOptions` fallback\n    this.options = this.config.defaultOptions\n\n    if (this.config.addOptions) {\n      this.options = callOrReturn(\n        getExtensionField<AnyConfig['addOptions']>(this, 'addOptions', {\n          name: this.name,\n        }),\n      )\n    }\n\n    this.storage = callOrReturn(\n      getExtensionField<AnyConfig['addStorage']>(this, 'addStorage', {\n        name: this.name,\n        options: this.options,\n      }),\n    ) || {}\n  }\n\n  static create<O = any, S = any>(config: Partial<ExtensionConfig<O, S>> = {}) {\n    return new Extension<O, S>(config)\n  }\n\n  configure(options: Partial<Options> = {}) {\n    // return a new instance so we can use the same extension\n    // with different calls of `configure`\n    const extension = this.extend<Options, Storage>({\n      ...this.config,\n      addOptions: () => {\n        return mergeDeep(this.options as Record<string, any>, options) as Options\n      },\n    })\n\n    // Always preserve the current name\n    extension.name = this.name\n    // Set the parent to be our parent\n    extension.parent = this.parent\n\n    return extension\n  }\n\n  extend<ExtendedOptions = Options, ExtendedStorage = Storage>(\n    extendedConfig: Partial<ExtensionConfig<ExtendedOptions, ExtendedStorage>> = {},\n  ) {\n    const extension = new Extension<ExtendedOptions, ExtendedStorage>({ ...this.config, ...extendedConfig })\n\n    extension.parent = this\n\n    this.child = extension\n\n    extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name\n\n    if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) {\n      console.warn(\n        `[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${extension.name}\".`,\n      )\n    }\n\n    extension.options = callOrReturn(\n      getExtensionField<AnyConfig['addOptions']>(extension, 'addOptions', {\n        name: extension.name,\n      }),\n    )\n\n    extension.storage = callOrReturn(\n      getExtensionField<AnyConfig['addStorage']>(extension, 'addStorage', {\n        name: extension.name,\n        options: extension.options,\n      }),\n    )\n\n    return extension\n  }\n}\n","import { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { Range, TextSerializer } from '../types.js'\n\n/**\n * Gets the text between two positions in a Prosemirror node\n * and serializes it using the given text serializers and block separator (see getText)\n * @param startNode The Prosemirror node to start from\n * @param range The range of the text to get\n * @param options Options for the text serializer & block separator\n * @returns The text between the two positions\n */\nexport function getTextBetween(\n  startNode: ProseMirrorNode,\n  range: Range,\n  options?: {\n    blockSeparator?: string\n    textSerializers?: Record<string, TextSerializer>\n  },\n): string {\n  const { from, to } = range\n  const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {}\n  let text = ''\n\n  startNode.nodesBetween(from, to, (node, pos, parent, index) => {\n    if (node.isBlock && pos > from) {\n      text += blockSeparator\n    }\n\n    const textSerializer = textSerializers?.[node.type.name]\n\n    if (textSerializer) {\n      if (parent) {\n        text += textSerializer({\n          node,\n          pos,\n          parent,\n          index,\n          range,\n        })\n      }\n      // do not descend into child nodes when there exists a serializer\n      return false\n    }\n\n    if (node.isText) {\n      text += node?.text?.slice(Math.max(from, pos) - pos, to - pos) // eslint-disable-line\n    }\n  })\n\n  return text\n}\n","import { Schema } from '@tiptap/pm/model'\n\nimport { TextSerializer } from '../types.js'\n\n/**\n * Find text serializers `toText` in a Prosemirror schema\n * @param schema The Prosemirror schema to search in\n * @returns A record of text serializers by node name\n */\nexport function getTextSerializersFromSchema(schema: Schema): Record<string, TextSerializer> {\n  return Object.fromEntries(\n    Object.entries(schema.nodes)\n      .filter(([, node]) => node.spec.toText)\n      .map(([name, node]) => [name, node.spec.toText]),\n  )\n}\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\nimport { getTextBetween } from '../helpers/getTextBetween.js'\nimport { getTextSerializersFromSchema } from '../helpers/getTextSerializersFromSchema.js'\n\nexport type ClipboardTextSerializerOptions = {\n  blockSeparator?: string,\n}\n\nexport const ClipboardTextSerializer = Extension.create<ClipboardTextSerializerOptions>({\n  name: 'clipboardTextSerializer',\n\n  addOptions() {\n    return {\n      blockSeparator: undefined,\n    }\n  },\n\n  addProseMirrorPlugins() {\n    return [\n      new Plugin({\n        key: new PluginKey('clipboardTextSerializer'),\n        props: {\n          clipboardTextSerializer: () => {\n            const { editor } = this\n            const { state, schema } = editor\n            const { doc, selection } = state\n            const { ranges } = selection\n            const from = Math.min(...ranges.map(range => range.$from.pos))\n            const to = Math.max(...ranges.map(range => range.$to.pos))\n            const textSerializers = getTextSerializersFromSchema(schema)\n            const range = { from, to }\n\n            return getTextBetween(doc, range, {\n              ...(this.options.blockSeparator !== undefined\n                ? { blockSeparator: this.options.blockSeparator }\n                : {}),\n              textSerializers,\n            })\n          },\n        },\n      }),\n    ]\n  },\n})\n","import { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    blur: {\n      /**\n       * Removes focus from the editor.\n       * @example editor.commands.blur()\n       */\n      blur: () => ReturnType,\n    }\n  }\n}\n\nexport const blur: RawCommands['blur'] = () => ({ editor, view }) => {\n  requestAnimationFrame(() => {\n    if (!editor.isDestroyed) {\n      (view.dom as HTMLElement).blur()\n\n      // Browsers should remove the caret on blur but safari does not.\n      // See: https://github.com/ueberdosis/tiptap/issues/2405\n      window?.getSelection()?.removeAllRanges()\n    }\n  })\n\n  return true\n}\n","import { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    clearContent: {\n      /**\n       * Clear the whole document.\n       * @param emitUpdate Whether to emit an update event.\n       * @example editor.commands.clearContent()\n       */\n      clearContent: (emitUpdate?: boolean) => ReturnType,\n    }\n  }\n}\n\nexport const clearContent: RawCommands['clearContent'] = (emitUpdate = false) => ({ commands }) => {\n  return commands.setContent('', emitUpdate)\n}\n","import { liftTarget } from '@tiptap/pm/transform'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    clearNodes: {\n      /**\n       * Normalize nodes to a simple paragraph.\n       * @example editor.commands.clearNodes()\n       */\n      clearNodes: () => ReturnType,\n    }\n  }\n}\n\nexport const clearNodes: RawCommands['clearNodes'] = () => ({ state, tr, dispatch }) => {\n  const { selection } = tr\n  const { ranges } = selection\n\n  if (!dispatch) {\n    return true\n  }\n\n  ranges.forEach(({ $from, $to }) => {\n    state.doc.nodesBetween($from.pos, $to.pos, (node, pos) => {\n      if (node.type.isText) {\n        return\n      }\n\n      const { doc, mapping } = tr\n      const $mappedFrom = doc.resolve(mapping.map(pos))\n      const $mappedTo = doc.resolve(mapping.map(pos + node.nodeSize))\n      const nodeRange = $mappedFrom.blockRange($mappedTo)\n\n      if (!nodeRange) {\n        return\n      }\n\n      const targetLiftDepth = liftTarget(nodeRange)\n\n      if (node.type.isTextblock) {\n        const { defaultType } = $mappedFrom.parent.contentMatchAt($mappedFrom.index())\n\n        tr.setNodeMarkup(nodeRange.start, defaultType)\n      }\n\n      if (targetLiftDepth || targetLiftDepth === 0) {\n        tr.lift(nodeRange, targetLiftDepth)\n      }\n    })\n  })\n\n  return true\n}\n","import { Command, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    command: {\n      /**\n       * Define a command inline.\n       * @param fn The command function.\n       * @example\n       * editor.commands.command(({ tr, state }) => {\n       *   ...\n       *   return true\n       * })\n       */\n      command: (fn: (props: Parameters<Command>[0]) => boolean) => ReturnType,\n    }\n  }\n}\n\nexport const command: RawCommands['command'] = fn => props => {\n  return fn(props)\n}\n","import { createParagraphNear as originalCreateParagraphNear } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    createParagraphNear: {\n      /**\n       * Create a paragraph nearby.\n       * @example editor.commands.createParagraphNear()\n       */\n      createParagraphNear: () => ReturnType\n    }\n  }\n}\n\nexport const createParagraphNear: RawCommands['createParagraphNear'] = () => ({ state, dispatch }) => {\n  return originalCreateParagraphNear(state, dispatch)\n}\n","import { TextSelection } from '@tiptap/pm/state'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    cut: {\n      /**\n       * Cuts content from a range and inserts it at a given position.\n       * @param range The range to cut.\n       * @param range.from The start position of the range.\n       * @param range.to The end position of the range.\n       * @param targetPos The position to insert the content at.\n       * @example editor.commands.cut({ from: 1, to: 3 }, 5)\n       */\n      cut: ({ from, to }: { from: number, to: number }, targetPos: number) => ReturnType,\n    }\n  }\n}\n\nexport const cut: RawCommands['cut'] = (originRange, targetPos) => ({ editor, tr }) => {\n  const { state } = editor\n\n  const contentSlice = state.doc.slice(originRange.from, originRange.to)\n\n  tr.deleteRange(originRange.from, originRange.to)\n  const newPos = tr.mapping.map(targetPos)\n\n  tr.insert(newPos, contentSlice.content)\n\n  tr.setSelection(new TextSelection(tr.doc.resolve(Math.max(newPos - 1, 0))))\n\n  return true\n}\n","import { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    deleteCurrentNode: {\n      /**\n       * Delete the node that currently has the selection anchor.\n       * @example editor.commands.deleteCurrentNode()\n       */\n      deleteCurrentNode: () => ReturnType,\n    }\n  }\n}\n\nexport const deleteCurrentNode: RawCommands['deleteCurrentNode'] = () => ({ tr, dispatch }) => {\n  const { selection } = tr\n  const currentNode = selection.$anchor.node()\n\n  // if there is content inside the current node, break out of this command\n  if (currentNode.content.size > 0) {\n    return false\n  }\n\n  const $pos = tr.selection.$anchor\n\n  for (let depth = $pos.depth; depth > 0; depth -= 1) {\n    const node = $pos.node(depth)\n\n    if (node.type === currentNode.type) {\n      if (dispatch) {\n        const from = $pos.before(depth)\n        const to = $pos.after(depth)\n\n        tr.delete(from, to).scrollIntoView()\n      }\n\n      return true\n    }\n  }\n\n  return false\n}\n","import { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    deleteNode: {\n      /**\n       * Delete a node with a given type or name.\n       * @param typeOrName The type or name of the node.\n       * @example editor.commands.deleteNode('paragraph')\n       */\n      deleteNode: (typeOrName: string | NodeType) => ReturnType,\n    }\n  }\n}\n\nexport const deleteNode: RawCommands['deleteNode'] = typeOrName => ({ tr, state, dispatch }) => {\n  const type = getNodeType(typeOrName, state.schema)\n  const $pos = tr.selection.$anchor\n\n  for (let depth = $pos.depth; depth > 0; depth -= 1) {\n    const node = $pos.node(depth)\n\n    if (node.type === type) {\n      if (dispatch) {\n        const from = $pos.before(depth)\n        const to = $pos.after(depth)\n\n        tr.delete(from, to).scrollIntoView()\n      }\n\n      return true\n    }\n  }\n\n  return false\n}\n","import { Range, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    deleteRange: {\n      /**\n       * Delete a given range.\n       * @param range The range to delete.\n       * @example editor.commands.deleteRange({ from: 1, to: 3 })\n       */\n      deleteRange: (range: Range) => ReturnType,\n    }\n  }\n}\n\nexport const deleteRange: RawCommands['deleteRange'] = range => ({ tr, dispatch }) => {\n  const { from, to } = range\n\n  if (dispatch) {\n    tr.delete(from, to)\n  }\n\n  return true\n}\n","import { deleteSelection as originalDeleteSelection } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    deleteSelection: {\n      /**\n       * Delete the selection, if there is one.\n       * @example editor.commands.deleteSelection()\n       */\n      deleteSelection: () => ReturnType\n    }\n  }\n}\n\nexport const deleteSelection: RawCommands['deleteSelection'] = () => ({ state, dispatch }) => {\n  return originalDeleteSelection(state, dispatch)\n}\n","import { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    enter: {\n      /**\n       * Trigger enter.\n       * @example editor.commands.enter()\n       */\n      enter: () => ReturnType,\n    }\n  }\n}\n\nexport const enter: RawCommands['enter'] = () => ({ commands }) => {\n  return commands.keyboardShortcut('Enter')\n}\n","import { exitCode as originalExitCode } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    exitCode: {\n      /**\n       * Exit from a code block.\n       * @example editor.commands.exitCode()\n       */\n      exitCode: () => ReturnType\n    }\n  }\n}\n\nexport const exitCode: RawCommands['exitCode'] = () => ({ state, dispatch }) => {\n  return originalExitCode(state, dispatch)\n}\n","import { isRegExp } from './isRegExp.js'\n\n/**\n * Check if object1 includes object2\n * @param object1 Object\n * @param object2 Object\n */\nexport function objectIncludes(\n  object1: Record<string, any>,\n  object2: Record<string, any>,\n  options: { strict: boolean } = { strict: true },\n): boolean {\n  const keys = Object.keys(object2)\n\n  if (!keys.length) {\n    return true\n  }\n\n  return keys.every(key => {\n    if (options.strict) {\n      return object2[key] === object1[key]\n    }\n\n    if (isRegExp(object2[key])) {\n      return object2[key].test(object1[key])\n    }\n\n    return object2[key] === object1[key]\n  })\n}\n","import { Mark as ProseMirrorMark, MarkType, ResolvedPos } from '@tiptap/pm/model'\n\nimport { Range } from '../types.js'\nimport { objectIncludes } from '../utilities/objectIncludes.js'\n\nfunction findMarkInSet(\n  marks: ProseMirrorMark[],\n  type: MarkType,\n  attributes: Record<string, any> = {},\n): ProseMirrorMark | undefined {\n  return marks.find(item => {\n    return (\n      item.type === type\n      && objectIncludes(\n        // Only check equality for the attributes that are provided\n        Object.fromEntries(Object.keys(attributes).map(k => [k, item.attrs[k]])),\n        attributes,\n      )\n    )\n  })\n}\n\nfunction isMarkInSet(\n  marks: ProseMirrorMark[],\n  type: MarkType,\n  attributes: Record<string, any> = {},\n): boolean {\n  return !!findMarkInSet(marks, type, attributes)\n}\n\n/**\n * Get the range of a mark at a resolved position.\n */\nexport function getMarkRange(\n  /**\n   * The position to get the mark range for.\n   */\n  $pos: ResolvedPos,\n  /**\n   * The mark type to get the range for.\n   */\n  type: MarkType,\n  /**\n   * The attributes to match against.\n   * If not provided, only the first mark at the position will be matched.\n   */\n  attributes?: Record<string, any>,\n): Range | void {\n  if (!$pos || !type) {\n    return\n  }\n  let start = $pos.parent.childAfter($pos.parentOffset)\n\n  // If the cursor is at the start of a text node that does not have the mark, look backward\n  if (!start.node || !start.node.marks.some(mark => mark.type === type)) {\n    start = $pos.parent.childBefore($pos.parentOffset)\n  }\n\n  // If there is no text node with the mark even backward, return undefined\n  if (!start.node || !start.node.marks.some(mark => mark.type === type)) {\n    return\n  }\n\n  // Default to only matching against the first mark's attributes\n  attributes = attributes || start.node.marks[0]?.attrs\n\n  // We now know that the cursor is either at the start, middle or end of a text node with the specified mark\n  // so we can look it up on the targeted mark\n  const mark = findMarkInSet([...start.node.marks], type, attributes)\n\n  if (!mark) {\n    return\n  }\n\n  let startIndex = start.index\n  let startPos = $pos.start() + start.offset\n  let endIndex = startIndex + 1\n  let endPos = startPos + start.node.nodeSize\n\n  while (\n    startIndex > 0\n    && isMarkInSet([...$pos.parent.child(startIndex - 1).marks], type, attributes)\n  ) {\n    startIndex -= 1\n    startPos -= $pos.parent.child(startIndex).nodeSize\n  }\n\n  while (\n    endIndex < $pos.parent.childCount\n    && isMarkInSet([...$pos.parent.child(endIndex).marks], type, attributes)\n  ) {\n    endPos += $pos.parent.child(endIndex).nodeSize\n    endIndex += 1\n  }\n\n  return {\n    from: startPos,\n    to: endPos,\n  }\n}\n","import { MarkType, Schema } from '@tiptap/pm/model'\n\nexport function getMarkType(nameOrType: string | MarkType, schema: Schema): MarkType {\n  if (typeof nameOrType === 'string') {\n    if (!schema.marks[nameOrType]) {\n      throw Error(\n        `There is no mark type named '${nameOrType}'. Maybe you forgot to add the extension?`,\n      )\n    }\n\n    return schema.marks[nameOrType]\n  }\n\n  return nameOrType\n}\n","import { MarkType } from '@tiptap/pm/model'\nimport { TextSelection } from '@tiptap/pm/state'\n\nimport { getMarkRange } from '../helpers/getMarkRange.js'\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    extendMarkRange: {\n      /**\n       * Extends the text selection to the current mark by type or name.\n       * @param typeOrName The type or name of the mark.\n       * @param attributes The attributes of the mark.\n       * @example editor.commands.extendMarkRange('bold')\n       * @example editor.commands.extendMarkRange('mention', { userId: \"1\" })\n       */\n      extendMarkRange: (\n        /**\n         * The type or name of the mark.\n         */\n        typeOrName: string | MarkType,\n\n        /**\n         * The attributes of the mark.\n         */\n        attributes?: Record<string, any>,\n      ) => ReturnType\n    }\n  }\n}\n\nexport const extendMarkRange: RawCommands['extendMarkRange'] = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => {\n  const type = getMarkType(typeOrName, state.schema)\n  const { doc, selection } = tr\n  const { $from, from, to } = selection\n\n  if (dispatch) {\n    const range = getMarkRange($from, type, attributes)\n\n    if (range && range.from <= from && range.to >= to) {\n      const newSelection = TextSelection.create(doc, range.from, range.to)\n\n      tr.setSelection(newSelection)\n    }\n  }\n\n  return true\n}\n","import { Command, CommandProps, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    first: {\n      /**\n       * Runs one command after the other and stops at the first which returns true.\n       * @param commands The commands to run.\n       * @example editor.commands.first([command1, command2])\n       */\n      first: (commands: Command[] | ((props: CommandProps) => Command[])) => ReturnType,\n    }\n  }\n}\n\nexport const first: RawCommands['first'] = commands => props => {\n  const items = typeof commands === 'function'\n    ? commands(props)\n    : commands\n\n  for (let i = 0; i < items.length; i += 1) {\n    if (items[i](props)) {\n      return true\n    }\n  }\n\n  return false\n}\n","import { TextSelection } from '@tiptap/pm/state'\n\nexport function isTextSelection(value: unknown): value is TextSelection {\n  return value instanceof TextSelection\n}\n","export function minMax(value = 0, min = 0, max = 0): number {\n  return Math.min(Math.max(value, min), max)\n}\n","import { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Selection, TextSelection } from '@tiptap/pm/state'\n\nimport { FocusPosition } from '../types.js'\nimport { minMax } from '../utilities/minMax.js'\n\nexport function resolveFocusPosition(\n  doc: ProseMirrorNode,\n  position: FocusPosition = null,\n): Selection | null {\n  if (!position) {\n    return null\n  }\n\n  const selectionAtStart = Selection.atStart(doc)\n  const selectionAtEnd = Selection.atEnd(doc)\n\n  if (position === 'start' || position === true) {\n    return selectionAtStart\n  }\n\n  if (position === 'end') {\n    return selectionAtEnd\n  }\n\n  const minPos = selectionAtStart.from\n  const maxPos = selectionAtEnd.to\n\n  if (position === 'all') {\n    return TextSelection.create(\n      doc,\n      minMax(0, minPos, maxPos),\n      minMax(doc.content.size, minPos, maxPos),\n    )\n  }\n\n  return TextSelection.create(\n    doc,\n    minMax(position, minPos, maxPos),\n    minMax(position, minPos, maxPos),\n  )\n}\n","export function isAndroid(): boolean {\n  return navigator.platform === 'Android' || /android/i.test(navigator.userAgent)\n}\n","export function isiOS(): boolean {\n  return [\n    'iPad Simulator',\n    'iPhone Simulator',\n    'iPod Simulator',\n    'iPad',\n    'iPhone',\n    'iPod',\n  ].includes(navigator.platform)\n  // iPad on iOS 13 detection\n  || (navigator.userAgent.includes('Mac') && 'ontouchend' in document)\n}\n","import { isTextSelection } from '../helpers/isTextSelection.js'\nimport { resolveFocusPosition } from '../helpers/resolveFocusPosition.js'\nimport { FocusPosition, RawCommands } from '../types.js'\nimport { isAndroid } from '../utilities/isAndroid.js'\nimport { isiOS } from '../utilities/isiOS.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    focus: {\n      /**\n       * Focus the editor at the given position.\n       * @param position The position to focus at.\n       * @param options.scrollIntoView Scroll the focused position into view after focusing\n       * @example editor.commands.focus()\n       * @example editor.commands.focus(32, { scrollIntoView: false })\n       */\n      focus: (\n        /**\n         * The position to focus at.\n         */\n        position?: FocusPosition,\n\n        /**\n         * Optional options\n         * @default { scrollIntoView: true }\n         */\n        options?: {\n          scrollIntoView?: boolean,\n        },\n      ) => ReturnType,\n    }\n  }\n}\n\nexport const focus: RawCommands['focus'] = (position = null, options = {}) => ({\n  editor,\n  view,\n  tr,\n  dispatch,\n}) => {\n  options = {\n    scrollIntoView: true,\n    ...options,\n  }\n\n  const delayedFocus = () => {\n    // focus within `requestAnimationFrame` breaks focus on iOS and Android\n    // so we have to call this\n    if (isiOS() || isAndroid()) {\n      (view.dom as HTMLElement).focus()\n    }\n\n    // For React we have to focus asynchronously. Otherwise wild things happen.\n    // see: https://github.com/ueberdosis/tiptap/issues/1520\n    requestAnimationFrame(() => {\n      if (!editor.isDestroyed) {\n        view.focus()\n\n        if (options?.scrollIntoView) {\n          editor.commands.scrollIntoView()\n        }\n      }\n    })\n  }\n\n  if ((view.hasFocus() && position === null) || position === false) {\n    return true\n  }\n\n  // we don’t try to resolve a NodeSelection or CellSelection\n  if (dispatch && position === null && !isTextSelection(editor.state.selection)) {\n    delayedFocus()\n    return true\n  }\n\n  // pass through tr.doc instead of editor.state.doc\n  // since transactions could change the editors state before this command has been run\n  const selection = resolveFocusPosition(tr.doc, position) || editor.state.selection\n  const isSameSelection = editor.state.selection.eq(selection)\n\n  if (dispatch) {\n    if (!isSameSelection) {\n      tr.setSelection(selection)\n    }\n\n    // `tr.setSelection` resets the stored marks\n    // so we’ll restore them if the selection is the same as before\n    if (isSameSelection && tr.storedMarks) {\n      tr.setStoredMarks(tr.storedMarks)\n    }\n\n    delayedFocus()\n  }\n\n  return true\n}\n","import { CommandProps, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    forEach: {\n      /**\n       * Loop through an array of items.\n       */\n      forEach: <T>(\n        items: T[],\n        fn: (\n          item: T,\n          props: CommandProps & {\n            index: number,\n          },\n        ) => boolean,\n      ) => ReturnType,\n    }\n  }\n}\n\nexport const forEach: RawCommands['forEach'] = (items, fn) => props => {\n  return items.every((item, index) => fn(item, { ...props, index }))\n}\n","import { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model'\n\nimport { Content, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    insertContent: {\n      /**\n       * Insert a node or string of HTML at the current position.\n       * @example editor.commands.insertContent('<h1>Example</h1>')\n       * @example editor.commands.insertContent('<h1>Example</h1>', { updateSelection: false })\n       */\n      insertContent: (\n        /**\n         * The ProseMirror content to insert.\n         */\n        value: Content | ProseMirrorNode | Fragment,\n\n        /**\n         * Optional options\n         */\n        options?: {\n          /**\n           * Options for parsing the content.\n           */\n          parseOptions?: ParseOptions;\n\n          /**\n           * Whether to update the selection after inserting the content.\n           */\n          updateSelection?: boolean;\n          applyInputRules?: boolean;\n          applyPasteRules?: boolean;\n        }\n      ) => ReturnType;\n    };\n  }\n}\n\nexport const insertContent: RawCommands['insertContent'] = (value, options) => ({ tr, commands }) => {\n  return commands.insertContentAt(\n    { from: tr.selection.from, to: tr.selection.to },\n    value,\n    options,\n  )\n}\n","const removeWhitespaces = (node: HTMLElement) => {\n  const children = node.childNodes\n\n  for (let i = children.length - 1; i >= 0; i -= 1) {\n    const child = children[i]\n\n    if (child.nodeType === 3 && child.nodeValue && /^(\\n\\s\\s|\\n)$/.test(child.nodeValue)) {\n      node.removeChild(child)\n    } else if (child.nodeType === 1) {\n      removeWhitespaces(child as HTMLElement)\n    }\n  }\n\n  return node\n}\n\nexport function elementFromString(value: string): HTMLElement {\n  // add a wrapper to preserve leading and trailing whitespace\n  const wrappedValue = `<body>${value}</body>`\n\n  const html = new window.DOMParser().parseFromString(wrappedValue, 'text/html').body\n\n  return removeWhitespaces(html)\n}\n","import {\n  DOMParser,\n  Fragment,\n  Node as ProseMirrorNode,\n  ParseOptions,\n  Schema,\n} from '@tiptap/pm/model'\n\nimport { Content } from '../types.js'\nimport { elementFromString } from '../utilities/elementFromString.js'\n\nexport type CreateNodeFromContentOptions = {\n  slice?: boolean\n  parseOptions?: ParseOptions\n  errorOnInvalidContent?: boolean\n}\n\n/**\n * Takes a JSON or HTML content and creates a Prosemirror node or fragment from it.\n * @param content The JSON or HTML content to create the node from\n * @param schema The Prosemirror schema to use for the node\n * @param options Options for the parser\n * @returns The created Prosemirror node or fragment\n */\nexport function createNodeFromContent(\n  content: Content | ProseMirrorNode | Fragment,\n  schema: Schema,\n  options?: CreateNodeFromContentOptions,\n): ProseMirrorNode | Fragment {\n  if (content instanceof ProseMirrorNode || content instanceof Fragment) {\n    return content\n  }\n  options = {\n    slice: true,\n    parseOptions: {},\n    ...options,\n  }\n\n  const isJSONContent = typeof content === 'object' && content !== null\n  const isTextContent = typeof content === 'string'\n\n  if (isJSONContent) {\n    try {\n      const isArrayContent = Array.isArray(content) && content.length > 0\n\n      // if the JSON Content is an array of nodes, create a fragment for each node\n      if (isArrayContent) {\n        return Fragment.fromArray(content.map(item => schema.nodeFromJSON(item)))\n      }\n\n      const node = schema.nodeFromJSON(content)\n\n      if (options.errorOnInvalidContent) {\n        node.check()\n      }\n\n      return node\n    } catch (error) {\n      if (options.errorOnInvalidContent) {\n        throw new Error('[tiptap error]: Invalid JSON content', { cause: error as Error })\n      }\n\n      console.warn('[tiptap warn]: Invalid content.', 'Passed value:', content, 'Error:', error)\n\n      return createNodeFromContent('', schema, options)\n    }\n  }\n\n  if (isTextContent) {\n\n    // Check for invalid content\n    if (options.errorOnInvalidContent) {\n      let hasInvalidContent = false\n      let invalidContent = ''\n\n      // A copy of the current schema with a catch-all node at the end\n      const contentCheckSchema = new Schema({\n        topNode: schema.spec.topNode,\n        marks: schema.spec.marks,\n        // Prosemirror's schemas are executed such that: the last to execute, matches last\n        // This means that we can add a catch-all node at the end of the schema to catch any content that we don't know how to handle\n        nodes: schema.spec.nodes.append({\n          __tiptap__private__unknown__catch__all__node: {\n            content: 'inline*',\n            group: 'block',\n            parseDOM: [\n              {\n                tag: '*',\n                getAttrs: e => {\n                  // If this is ever called, we know that the content has something that we don't know how to handle in the schema\n                  hasInvalidContent = true\n                  // Try to stringify the element for a more helpful error message\n                  invalidContent = typeof e === 'string' ? e : e.outerHTML\n                  return null\n                },\n              },\n            ],\n          },\n        }),\n      })\n\n      if (options.slice) {\n        DOMParser.fromSchema(contentCheckSchema).parseSlice(elementFromString(content), options.parseOptions)\n      } else {\n        DOMParser.fromSchema(contentCheckSchema).parse(elementFromString(content), options.parseOptions)\n      }\n\n      if (options.errorOnInvalidContent && hasInvalidContent) {\n        throw new Error('[tiptap error]: Invalid HTML content', { cause: new Error(`Invalid element found: ${invalidContent}`) })\n      }\n    }\n\n    const parser = DOMParser.fromSchema(schema)\n\n    if (options.slice) {\n      return parser.parseSlice(elementFromString(content), options.parseOptions).content\n    }\n\n    return parser.parse(elementFromString(content), options.parseOptions)\n\n  }\n\n  return createNodeFromContent('', schema, options)\n}\n","import { Selection, Transaction } from '@tiptap/pm/state'\nimport { ReplaceAroundStep, ReplaceStep } from '@tiptap/pm/transform'\n\n// source: https://github.com/ProseMirror/prosemirror-state/blob/master/src/selection.js#L466\nexport function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number) {\n  const last = tr.steps.length - 1\n\n  if (last < startLen) {\n    return\n  }\n\n  const step = tr.steps[last]\n\n  if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) {\n    return\n  }\n\n  const map = tr.mapping.maps[last]\n  let end = 0\n\n  map.forEach((_from, _to, _newFrom, newTo) => {\n    if (end === 0) {\n      end = newTo\n    }\n  })\n\n  tr.setSelection(Selection.near(tr.doc.resolve(end), bias))\n}\n","import { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model'\n\nimport { createNodeFromContent } from '../helpers/createNodeFromContent.js'\nimport { selectionToInsertionEnd } from '../helpers/selectionToInsertionEnd.js'\nimport { Content, Range, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    insertContentAt: {\n      /**\n       * Insert a node or string of HTML at a specific position.\n       * @example editor.commands.insertContentAt(0, '<h1>Example</h1>')\n       */\n      insertContentAt: (\n        /**\n         * The position to insert the content at.\n         */\n        position: number | Range,\n\n        /**\n         * The ProseMirror content to insert.\n         */\n        value: Content | ProseMirrorNode | Fragment,\n\n        /**\n         * Optional options\n         */\n        options?: {\n          /**\n           * Options for parsing the content.\n           */\n          parseOptions?: ParseOptions\n\n          /**\n           * Whether to update the selection after inserting the content.\n           */\n          updateSelection?: boolean\n\n          /**\n           * Whether to apply input rules after inserting the content.\n           */\n          applyInputRules?: boolean\n\n          /**\n           * Whether to apply paste rules after inserting the content.\n           */\n          applyPasteRules?: boolean\n\n          /**\n           * Whether to throw an error if the content is invalid.\n           */\n          errorOnInvalidContent?: boolean\n        },\n      ) => ReturnType\n    }\n  }\n}\n\nconst isFragment = (nodeOrFragment: ProseMirrorNode | Fragment): nodeOrFragment is Fragment => {\n  return !('type' in nodeOrFragment)\n}\n\nexport const insertContentAt: RawCommands['insertContentAt'] = (position, value, options) => ({ tr, dispatch, editor }) => {\n  if (dispatch) {\n    options = {\n      parseOptions: editor.options.parseOptions,\n      updateSelection: true,\n      applyInputRules: false,\n      applyPasteRules: false,\n      ...options,\n    }\n\n    let content: Fragment | ProseMirrorNode\n\n    const emitContentError = (error: Error) => {\n      editor.emit('contentError', {\n        editor,\n        error,\n        disableCollaboration: () => {\n          if (editor.storage.collaboration) {\n            editor.storage.collaboration.isDisabled = true\n          }\n        },\n      })\n    }\n\n    const parseOptions: ParseOptions = {\n      preserveWhitespace: 'full',\n      ...options.parseOptions,\n    }\n\n    // If `emitContentError` is enabled, we want to check the content for errors\n    // but ignore them (do not remove the invalid content from the document)\n    if (!options.errorOnInvalidContent && !editor.options.enableContentCheck && editor.options.emitContentError) {\n      try {\n        createNodeFromContent(value, editor.schema, {\n          parseOptions,\n          errorOnInvalidContent: true,\n        })\n      } catch (e) {\n        emitContentError(e as Error)\n      }\n    }\n\n    try {\n      content = createNodeFromContent(value, editor.schema, {\n        parseOptions,\n        errorOnInvalidContent: options.errorOnInvalidContent ?? editor.options.enableContentCheck,\n      })\n    } catch (e) {\n      emitContentError(e as Error)\n      return false\n    }\n\n    let { from, to } = typeof position === 'number' ? { from: position, to: position } : { from: position.from, to: position.to }\n\n    let isOnlyTextContent = true\n    let isOnlyBlockContent = true\n    const nodes = isFragment(content) ? content : [content]\n\n    nodes.forEach(node => {\n      // check if added node is valid\n      node.check()\n\n      isOnlyTextContent = isOnlyTextContent ? node.isText && node.marks.length === 0 : false\n\n      isOnlyBlockContent = isOnlyBlockContent ? node.isBlock : false\n    })\n\n    // check if we can replace the wrapping node by\n    // the newly inserted content\n    // example:\n    // replace an empty paragraph by an inserted image\n    // instead of inserting the image below the paragraph\n    if (from === to && isOnlyBlockContent) {\n      const { parent } = tr.doc.resolve(from)\n      const isEmptyTextBlock = parent.isTextblock && !parent.type.spec.code && !parent.childCount\n\n      if (isEmptyTextBlock) {\n        from -= 1\n        to += 1\n      }\n    }\n\n    let newContent\n\n    // if there is only plain text we have to use `insertText`\n    // because this will keep the current marks\n    if (isOnlyTextContent) {\n      // if value is string, we can use it directly\n      // otherwise if it is an array, we have to join it\n      if (Array.isArray(value)) {\n        newContent = value.map(v => v.text || '').join('')\n      } else if (value instanceof Fragment) {\n        let text = ''\n\n        value.forEach(node => {\n          if (node.text) {\n            text += node.text\n          }\n        })\n\n        newContent = text\n      } else if (typeof value === 'object' && !!value && !!value.text) {\n        newContent = value.text\n      } else {\n        newContent = value as string\n      }\n\n      tr.insertText(newContent, from, to)\n    } else {\n      newContent = content\n\n      tr.replaceWith(from, to, newContent)\n    }\n\n    // set cursor at end of inserted content\n    if (options.updateSelection) {\n      selectionToInsertionEnd(tr, tr.steps.length - 1, -1)\n    }\n\n    if (options.applyInputRules) {\n      tr.setMeta('applyInputRules', { from, text: newContent })\n    }\n\n    if (options.applyPasteRules) {\n      tr.setMeta('applyPasteRules', { from, text: newContent })\n    }\n  }\n\n  return true\n}\n","import {\n  joinBackward as originalJoinBackward,\n  joinDown as originalJoinDown,\n  joinForward as originalJoinForward,\n  joinUp as originalJoinUp,\n} from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    joinUp: {\n      /**\n       * Join the selected block or, if there is a text selection, the closest ancestor block of the selection that can be joined, with the sibling above it.\n       * @example editor.commands.joinUp()\n       */\n      joinUp: () => ReturnType\n    }\n    joinDown: {\n      /**\n       * Join the selected block, or the closest ancestor of the selection that can be joined, with the sibling after it.\n       * @example editor.commands.joinDown()\n       */\n      joinDown: () => ReturnType\n    }\n    joinBackward: {\n      /**\n       * If the selection is empty and at the start of a textblock, try to reduce the distance between that block and the one before it—if there's a block directly before it that can be joined, join them.\n       * If not, try to move the selected block closer to the next one in the document structure by lifting it out of its\n       * parent or moving it into a parent of the previous block. Will use the view for accurate (bidi-aware) start-of-textblock detection if given.\n       * @example editor.commands.joinBackward()\n       */\n      joinBackward: () => ReturnType\n    }\n    joinForward: {\n      /**\n       * If the selection is empty and the cursor is at the end of a textblock, try to reduce or remove the boundary between that block and the one after it,\n       * either by joining them or by moving the other block closer to this one in the tree structure.\n       * Will use the view for accurate start-of-textblock detection if given.\n       * @example editor.commands.joinForward()\n       */\n      joinForward: () => ReturnType\n    }\n  }\n}\n\nexport const joinUp: RawCommands['joinUp'] = () => ({ state, dispatch }) => {\n  return originalJoinUp(state, dispatch)\n}\n\nexport const joinDown: RawCommands['joinDown'] = () => ({ state, dispatch }) => {\n  return originalJoinDown(state, dispatch)\n}\n\nexport const joinBackward: RawCommands['joinBackward'] = () => ({ state, dispatch }) => {\n  return originalJoinBackward(state, dispatch)\n}\n\nexport const joinForward: RawCommands['joinForward'] = () => ({ state, dispatch }) => {\n  return originalJoinForward(state, dispatch)\n}\n","import { joinPoint } from '@tiptap/pm/transform'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    joinItemBackward: {\n      /**\n       * Join two items backward.\n       * @example editor.commands.joinItemBackward()\n       */\n      joinItemBackward: () => ReturnType\n    }\n  }\n}\n\nexport const joinItemBackward: RawCommands['joinItemBackward'] = () => ({\n  state,\n  dispatch,\n  tr,\n}) => {\n  try {\n    const point = joinPoint(state.doc, state.selection.$from.pos, -1)\n\n    if (point === null || point === undefined) {\n      return false\n    }\n\n    tr.join(point, 2)\n\n    if (dispatch) {\n      dispatch(tr)\n    }\n\n    return true\n  } catch {\n    return false\n  }\n}\n","import { joinPoint } from '@tiptap/pm/transform'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    joinItemForward: {\n      /**\n       * Join two items Forwards.\n       * @example editor.commands.joinItemForward()\n       */\n      joinItemForward: () => ReturnType\n    }\n  }\n}\n\nexport const joinItemForward: RawCommands['joinItemForward'] = () => ({\n  state,\n  dispatch,\n  tr,\n}) => {\n  try {\n    const point = joinPoint(state.doc, state.selection.$from.pos, +1)\n\n    if (point === null || point === undefined) {\n      return false\n    }\n\n    tr.join(point, 2)\n\n    if (dispatch) {\n      dispatch(tr)\n    }\n\n    return true\n  } catch {\n    return false\n  }\n}\n","import { joinTextblockBackward as originalCommand } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    joinTextblockBackward: {\n      /**\n       * A more limited form of joinBackward that only tries to join the current textblock to the one before it, if the cursor is at the start of a textblock.\n       */\n      joinTextblockBackward: () => ReturnType\n    }\n  }\n}\n\nexport const joinTextblockBackward: RawCommands['joinTextblockBackward'] = () => ({ state, dispatch }) => {\n  return originalCommand(state, dispatch)\n}\n","import { joinTextblockForward as originalCommand } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    joinTextblockForward: {\n      /**\n       * A more limited form of joinForward that only tries to join the current textblock to the one after it, if the cursor is at the end of a textblock.\n       */\n      joinTextblockForward: () => ReturnType\n    }\n  }\n}\n\nexport const joinTextblockForward: RawCommands['joinTextblockForward'] = () => ({ state, dispatch }) => {\n  return originalCommand(state, dispatch)\n}\n","export function isMacOS(): boolean {\n  return typeof navigator !== 'undefined'\n    ? /Mac/.test(navigator.platform)\n    : false\n}\n","import { RawCommands } from '../types.js'\nimport { isiOS } from '../utilities/isiOS.js'\nimport { isMacOS } from '../utilities/isMacOS.js'\n\nfunction normalizeKeyName(name: string) {\n  const parts = name.split(/-(?!$)/)\n  let result = parts[parts.length - 1]\n\n  if (result === 'Space') {\n    result = ' '\n  }\n\n  let alt\n  let ctrl\n  let shift\n  let meta\n\n  for (let i = 0; i < parts.length - 1; i += 1) {\n    const mod = parts[i]\n\n    if (/^(cmd|meta|m)$/i.test(mod)) {\n      meta = true\n    } else if (/^a(lt)?$/i.test(mod)) {\n      alt = true\n    } else if (/^(c|ctrl|control)$/i.test(mod)) {\n      ctrl = true\n    } else if (/^s(hift)?$/i.test(mod)) {\n      shift = true\n    } else if (/^mod$/i.test(mod)) {\n      if (isiOS() || isMacOS()) {\n        meta = true\n      } else {\n        ctrl = true\n      }\n    } else {\n      throw new Error(`Unrecognized modifier name: ${mod}`)\n    }\n  }\n\n  if (alt) {\n    result = `Alt-${result}`\n  }\n\n  if (ctrl) {\n    result = `Ctrl-${result}`\n  }\n\n  if (meta) {\n    result = `Meta-${result}`\n  }\n\n  if (shift) {\n    result = `Shift-${result}`\n  }\n\n  return result\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    keyboardShortcut: {\n      /**\n       * Trigger a keyboard shortcut.\n       * @param name The name of the keyboard shortcut.\n       * @example editor.commands.keyboardShortcut('Mod-b')\n       */\n      keyboardShortcut: (name: string) => ReturnType,\n    }\n  }\n}\n\nexport const keyboardShortcut: RawCommands['keyboardShortcut'] = name => ({\n  editor,\n  view,\n  tr,\n  dispatch,\n}) => {\n  const keys = normalizeKeyName(name).split(/-(?!$)/)\n  const key = keys.find(item => !['Alt', 'Ctrl', 'Meta', 'Shift'].includes(item))\n  const event = new KeyboardEvent('keydown', {\n    key: key === 'Space'\n      ? ' '\n      : key,\n    altKey: keys.includes('Alt'),\n    ctrlKey: keys.includes('Ctrl'),\n    metaKey: keys.includes('Meta'),\n    shiftKey: keys.includes('Shift'),\n    bubbles: true,\n    cancelable: true,\n  })\n\n  const capturedTransaction = editor.captureTransaction(() => {\n    view.someProp('handleKeyDown', f => f(view, event))\n  })\n\n  capturedTransaction?.steps.forEach(step => {\n    const newStep = step.map(tr.mapping)\n\n    if (newStep && dispatch) {\n      tr.maybeStep(newStep)\n    }\n  })\n\n  return true\n}\n","import { NodeType } from '@tiptap/pm/model'\nimport { EditorState } from '@tiptap/pm/state'\n\nimport { NodeRange } from '../types.js'\nimport { objectIncludes } from '../utilities/objectIncludes.js'\nimport { getNodeType } from './getNodeType.js'\n\nexport function isNodeActive(\n  state: EditorState,\n  typeOrName: NodeType | string | null,\n  attributes: Record<string, any> = {},\n): boolean {\n  const { from, to, empty } = state.selection\n  const type = typeOrName ? getNodeType(typeOrName, state.schema) : null\n\n  const nodeRanges: NodeRange[] = []\n\n  state.doc.nodesBetween(from, to, (node, pos) => {\n    if (node.isText) {\n      return\n    }\n\n    const relativeFrom = Math.max(from, pos)\n    const relativeTo = Math.min(to, pos + node.nodeSize)\n\n    nodeRanges.push({\n      node,\n      from: relativeFrom,\n      to: relativeTo,\n    })\n  })\n\n  const selectionRange = to - from\n  const matchedNodeRanges = nodeRanges\n    .filter(nodeRange => {\n      if (!type) {\n        return true\n      }\n\n      return type.name === nodeRange.node.type.name\n    })\n    .filter(nodeRange => objectIncludes(nodeRange.node.attrs, attributes, { strict: false }))\n\n  if (empty) {\n    return !!matchedNodeRanges.length\n  }\n\n  const range = matchedNodeRanges.reduce((sum, nodeRange) => sum + nodeRange.to - nodeRange.from, 0)\n\n  return range >= selectionRange\n}\n","import { lift as originalLift } from '@tiptap/pm/commands'\nimport { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isNodeActive } from '../helpers/isNodeActive.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    lift: {\n      /**\n       * Removes an existing wrap if possible lifting the node out of it\n       * @param typeOrName The type or name of the node.\n       * @param attributes The attributes of the node.\n       * @example editor.commands.lift('paragraph')\n       * @example editor.commands.lift('heading', { level: 1 })\n       */\n      lift: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType\n    }\n  }\n}\n\nexport const lift: RawCommands['lift'] = (typeOrName, attributes = {}) => ({ state, dispatch }) => {\n  const type = getNodeType(typeOrName, state.schema)\n  const isActive = isNodeActive(state, type, attributes)\n\n  if (!isActive) {\n    return false\n  }\n\n  return originalLift(state, dispatch)\n}\n","import { liftEmptyBlock as originalLiftEmptyBlock } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    liftEmptyBlock: {\n      /**\n       * If the cursor is in an empty textblock that can be lifted, lift the block.\n       * @example editor.commands.liftEmptyBlock()\n       */\n      liftEmptyBlock: () => ReturnType,\n    }\n  }\n}\n\nexport const liftEmptyBlock: RawCommands['liftEmptyBlock'] = () => ({ state, dispatch }) => {\n  return originalLiftEmptyBlock(state, dispatch)\n}\n","import { NodeType } from '@tiptap/pm/model'\nimport { liftListItem as originalLiftListItem } from '@tiptap/pm/schema-list'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    liftListItem: {\n      /**\n       * Create a command to lift the list item around the selection up into a wrapping list.\n       * @param typeOrName The type or name of the node.\n       * @example editor.commands.liftListItem('listItem')\n       */\n      liftListItem: (typeOrName: string | NodeType) => ReturnType\n    }\n  }\n}\n\nexport const liftListItem: RawCommands['liftListItem'] = typeOrName => ({ state, dispatch }) => {\n  const type = getNodeType(typeOrName, state.schema)\n\n  return originalLiftListItem(type)(state, dispatch)\n}\n","import { newlineInCode as originalNewlineInCode } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    newlineInCode: {\n      /**\n       * Add a newline character in code.\n       * @example editor.commands.newlineInCode()\n       */\n      newlineInCode: () => ReturnType\n    }\n  }\n}\n\nexport const newlineInCode: RawCommands['newlineInCode'] = () => ({ state, dispatch }) => {\n  return originalNewlineInCode(state, dispatch)\n}\n","import { Schema } from '@tiptap/pm/model'\n\n/**\n * Get the type of a schema item by its name.\n * @param name The name of the schema item\n * @param schema The Prosemiror schema to search in\n * @returns The type of the schema item (`node` or `mark`), or null if it doesn't exist\n */\nexport function getSchemaTypeNameByName(name: string, schema: Schema): 'node' | 'mark' | null {\n  if (schema.nodes[name]) {\n    return 'node'\n  }\n\n  if (schema.marks[name]) {\n    return 'mark'\n  }\n\n  return null\n}\n","/**\n * Remove a property or an array of properties from an object\n * @param obj Object\n * @param key Key to remove\n */\nexport function deleteProps(obj: Record<string, any>, propOrProps: string | string[]): Record<string, any> {\n  const props = typeof propOrProps === 'string'\n    ? [propOrProps]\n    : propOrProps\n\n  return Object\n    .keys(obj)\n    .reduce((newObj: Record<string, any>, prop) => {\n      if (!props.includes(prop)) {\n        newObj[prop] = obj[prop]\n      }\n\n      return newObj\n    }, {})\n}\n","import { MarkType, NodeType } from '@tiptap/pm/model'\n\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName.js'\nimport { RawCommands } from '../types.js'\nimport { deleteProps } from '../utilities/deleteProps.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    resetAttributes: {\n      /**\n       * Resets some node attributes to the default value.\n       * @param typeOrName The type or name of the node.\n       * @param attributes The attributes of the node to reset.\n       * @example editor.commands.resetAttributes('heading', 'level')\n       */\n      resetAttributes: (\n        typeOrName: string | NodeType | MarkType,\n        attributes: string | string[],\n      ) => ReturnType\n    }\n  }\n}\n\nexport const resetAttributes: RawCommands['resetAttributes'] = (typeOrName, attributes) => ({ tr, state, dispatch }) => {\n  let nodeType: NodeType | null = null\n  let markType: MarkType | null = null\n\n  const schemaType = getSchemaTypeNameByName(\n    typeof typeOrName === 'string' ? typeOrName : typeOrName.name,\n    state.schema,\n  )\n\n  if (!schemaType) {\n    return false\n  }\n\n  if (schemaType === 'node') {\n    nodeType = getNodeType(typeOrName as NodeType, state.schema)\n  }\n\n  if (schemaType === 'mark') {\n    markType = getMarkType(typeOrName as MarkType, state.schema)\n  }\n\n  if (dispatch) {\n    tr.selection.ranges.forEach(range => {\n      state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => {\n        if (nodeType && nodeType === node.type) {\n          tr.setNodeMarkup(pos, undefined, deleteProps(node.attrs, attributes))\n        }\n\n        if (markType && node.marks.length) {\n          node.marks.forEach(mark => {\n            if (markType === mark.type) {\n              tr.addMark(\n                pos,\n                pos + node.nodeSize,\n                markType.create(deleteProps(mark.attrs, attributes)),\n              )\n            }\n          })\n        }\n      })\n    })\n  }\n\n  return true\n}\n","import { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    scrollIntoView: {\n      /**\n       * Scroll the selection into view.\n       * @example editor.commands.scrollIntoView()\n       */\n      scrollIntoView: () => ReturnType,\n    }\n  }\n}\n\nexport const scrollIntoView: RawCommands['scrollIntoView'] = () => ({ tr, dispatch }) => {\n  if (dispatch) {\n    tr.scrollIntoView()\n  }\n\n  return true\n}\n","import { AllSelection } from '@tiptap/pm/state'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    selectAll: {\n      /**\n       * Select the whole document.\n       * @example editor.commands.selectAll()\n       */\n      selectAll: () => ReturnType,\n    }\n  }\n}\n\nexport const selectAll: RawCommands['selectAll'] = () => ({ tr, dispatch }) => {\n  if (dispatch) {\n    const selection = new AllSelection(tr.doc)\n\n    tr.setSelection(selection)\n  }\n\n  return true\n}\n","import { selectNodeBackward as originalSelectNodeBackward } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    selectNodeBackward: {\n      /**\n       * Select a node backward.\n       * @example editor.commands.selectNodeBackward()\n       */\n      selectNodeBackward: () => ReturnType\n    }\n  }\n}\n\nexport const selectNodeBackward: RawCommands['selectNodeBackward'] = () => ({ state, dispatch }) => {\n  return originalSelectNodeBackward(state, dispatch)\n}\n","import { selectNodeForward as originalSelectNodeForward } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    selectNodeForward: {\n      /**\n       * Select a node forward.\n       * @example editor.commands.selectNodeForward()\n       */\n      selectNodeForward: () => ReturnType\n    }\n  }\n}\n\nexport const selectNodeForward: RawCommands['selectNodeForward'] = () => ({ state, dispatch }) => {\n  return originalSelectNodeForward(state, dispatch)\n}\n","import { selectParentNode as originalSelectParentNode } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    selectParentNode: {\n      /**\n       * Select the parent node.\n       * @example editor.commands.selectParentNode()\n       */\n      selectParentNode: () => ReturnType\n    }\n  }\n}\n\nexport const selectParentNode: RawCommands['selectParentNode'] = () => ({ state, dispatch }) => {\n  return originalSelectParentNode(state, dispatch)\n}\n","// @ts-ignore\n// TODO: add types to @types/prosemirror-commands\nimport { selectTextblockEnd as originalSelectTextblockEnd } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    selectTextblockEnd: {\n      /**\n       * Moves the cursor to the end of current text block.\n       * @example editor.commands.selectTextblockEnd()\n       */\n      selectTextblockEnd: () => ReturnType\n    }\n  }\n}\n\nexport const selectTextblockEnd: RawCommands['selectTextblockEnd'] = () => ({ state, dispatch }) => {\n  return originalSelectTextblockEnd(state, dispatch)\n}\n","// @ts-ignore\n// TODO: add types to @types/prosemirror-commands\nimport { selectTextblockStart as originalSelectTextblockStart } from '@tiptap/pm/commands'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    selectTextblockStart: {\n      /**\n       * Moves the cursor to the start of current text block.\n       * @example editor.commands.selectTextblockStart()\n       */\n      selectTextblockStart: () => ReturnType\n    }\n  }\n}\n\nexport const selectTextblockStart: RawCommands['selectTextblockStart'] = () => ({ state, dispatch }) => {\n  return originalSelectTextblockStart(state, dispatch)\n}\n","import {\n  Fragment, Node as ProseMirrorNode, ParseOptions, Schema,\n} from '@tiptap/pm/model'\n\nimport { Content } from '../types.js'\nimport { createNodeFromContent } from './createNodeFromContent.js'\n\n/**\n * Create a new Prosemirror document node from content.\n * @param content The JSON or HTML content to create the document from\n * @param schema The Prosemirror schema to use for the document\n * @param parseOptions Options for the parser\n * @returns The created Prosemirror document node\n */\nexport function createDocument(\n  content: Content | ProseMirrorNode | Fragment,\n  schema: Schema,\n  parseOptions: ParseOptions = {},\n  options: { errorOnInvalidContent?: boolean } = {},\n): ProseMirrorNode {\n  return createNodeFromContent(content, schema, {\n    slice: false,\n    parseOptions,\n    errorOnInvalidContent: options.errorOnInvalidContent,\n  }) as ProseMirrorNode\n}\n","import { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model'\n\nimport { createDocument } from '../helpers/createDocument.js'\nimport { Content, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    setContent: {\n      /**\n       * Replace the whole document with new content.\n       * @param content The new content.\n       * @param emitUpdate Whether to emit an update event.\n       * @param parseOptions Options for parsing the content.\n       * @example editor.commands.setContent('<p>Example text</p>')\n       */\n      setContent: (\n        /**\n         * The new content.\n         */\n        content: Content | Fragment | ProseMirrorNode,\n\n        /**\n         * Whether to emit an update event.\n         * @default false\n         */\n        emitUpdate?: boolean,\n\n        /**\n         * Options for parsing the content.\n         * @default {}\n         */\n        parseOptions?: ParseOptions,\n        /**\n         * Options for `setContent`.\n         */\n        options?: {\n          /**\n           * Whether to throw an error if the content is invalid.\n           */\n          errorOnInvalidContent?: boolean;\n        }\n      ) => ReturnType;\n    };\n  }\n}\n\nexport const setContent: RawCommands['setContent'] = (content, emitUpdate = false, parseOptions = {}, options = {}) => ({\n  editor, tr, dispatch, commands,\n}) => {\n  const { doc } = tr\n\n  // This is to keep backward compatibility with the previous behavior\n  // TODO remove this in the next major version\n  if (parseOptions.preserveWhitespace !== 'full') {\n    const document = createDocument(content, editor.schema, parseOptions, {\n      errorOnInvalidContent: options.errorOnInvalidContent ?? editor.options.enableContentCheck,\n    })\n\n    if (dispatch) {\n      tr.replaceWith(0, doc.content.size, document).setMeta('preventUpdate', !emitUpdate)\n    }\n    return true\n  }\n\n  if (dispatch) {\n    tr.setMeta('preventUpdate', !emitUpdate)\n  }\n\n  return commands.insertContentAt({ from: 0, to: doc.content.size }, content, {\n    parseOptions,\n    errorOnInvalidContent: options.errorOnInvalidContent ?? editor.options.enableContentCheck,\n  })\n}\n","import { Mark, MarkType } from '@tiptap/pm/model'\nimport { EditorState } from '@tiptap/pm/state'\n\nimport { getMarkType } from './getMarkType.js'\n\nexport function getMarkAttributes(\n  state: EditorState,\n  typeOrName: string | MarkType,\n): Record<string, any> {\n  const type = getMarkType(typeOrName, state.schema)\n  const { from, to, empty } = state.selection\n  const marks: Mark[] = []\n\n  if (empty) {\n    if (state.storedMarks) {\n      marks.push(...state.storedMarks)\n    }\n\n    marks.push(...state.selection.$head.marks())\n  } else {\n    state.doc.nodesBetween(from, to, node => {\n      marks.push(...node.marks)\n    })\n  }\n\n  const mark = marks.find(markItem => markItem.type.name === type.name)\n\n  if (!mark) {\n    return {}\n  }\n\n  return { ...mark.attrs }\n}\n","import { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Transaction } from '@tiptap/pm/state'\nimport { Transform } from '@tiptap/pm/transform'\n\n/**\n * Returns a new `Transform` based on all steps of the passed transactions.\n * @param oldDoc The Prosemirror node to start from\n * @param transactions The transactions to combine\n * @returns A new `Transform` with all steps of the passed transactions\n */\nexport function combineTransactionSteps(\n  oldDoc: ProseMirrorNode,\n  transactions: Transaction[],\n): Transform {\n  const transform = new Transform(oldDoc)\n\n  transactions.forEach(transaction => {\n    transaction.steps.forEach(step => {\n      transform.step(step)\n    })\n  })\n\n  return transform\n}\n","import { ContentMatch, NodeType } from '@tiptap/pm/model'\n\n/**\n * Gets the default block type at a given match\n * @param match The content match to get the default block type from\n * @returns The default block type or null\n */\nexport function defaultBlockAt(match: ContentMatch): NodeType | null {\n  for (let i = 0; i < match.edgeCount; i += 1) {\n    const { type } = match.edge(i)\n\n    if (type.isTextblock && !type.hasRequiredAttrs()) {\n      return type\n    }\n  }\n\n  return null\n}\n","import { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { NodeWithPos, Predicate } from '../types.js'\n\n/**\n * Find children inside a Prosemirror node that match a predicate.\n * @param node The Prosemirror node to search in\n * @param predicate The predicate to match\n * @returns An array of nodes with their positions\n */\nexport function findChildren(node: ProseMirrorNode, predicate: Predicate): NodeWithPos[] {\n  const nodesWithPos: NodeWithPos[] = []\n\n  node.descendants((child, pos) => {\n    if (predicate(child)) {\n      nodesWithPos.push({\n        node: child,\n        pos,\n      })\n    }\n  })\n\n  return nodesWithPos\n}\n","import { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { NodeWithPos, Predicate, Range } from '../types.js'\n\n/**\n * Same as `findChildren` but searches only within a `range`.\n * @param node The Prosemirror node to search in\n * @param range The range to search in\n * @param predicate The predicate to match\n * @returns An array of nodes with their positions\n */\nexport function findChildrenInRange(\n  node: ProseMirrorNode,\n  range: Range,\n  predicate: Predicate,\n): NodeWithPos[] {\n  const nodesWithPos: NodeWithPos[] = []\n\n  // if (range.from === range.to) {\n  //   const nodeAt = node.nodeAt(range.from)\n\n  //   if (nodeAt) {\n  //     nodesWithPos.push({\n  //       node: nodeAt,\n  //       pos: range.from,\n  //     })\n  //   }\n  // }\n\n  node.nodesBetween(range.from, range.to, (child, pos) => {\n    if (predicate(child)) {\n      nodesWithPos.push({\n        node: child,\n        pos,\n      })\n    }\n  })\n\n  return nodesWithPos\n}\n","import { Node as ProseMirrorNode, ResolvedPos } from '@tiptap/pm/model'\n\nimport { Predicate } from '../types.js'\n\n/**\n * Finds the closest parent node to a resolved position that matches a predicate.\n * @param $pos The resolved position to search from\n * @param predicate The predicate to match\n * @returns The closest parent node to the resolved position that matches the predicate\n * @example ```js\n * findParentNodeClosestToPos($from, node => node.type.name === 'paragraph')\n * ```\n */\nexport function findParentNodeClosestToPos(\n  $pos: ResolvedPos,\n  predicate: Predicate,\n):\n  | {\n      pos: number\n      start: number\n      depth: number\n      node: ProseMirrorNode\n    }\n  | undefined {\n  for (let i = $pos.depth; i > 0; i -= 1) {\n    const node = $pos.node(i)\n\n    if (predicate(node)) {\n      return {\n        pos: i > 0 ? $pos.before(i) : 0,\n        start: $pos.start(i),\n        depth: i,\n        node,\n      }\n    }\n  }\n}\n","import { Selection } from '@tiptap/pm/state'\n\nimport { Predicate } from '../types.js'\nimport { findParentNodeClosestToPos } from './findParentNodeClosestToPos.js'\n\n/**\n * Finds the closest parent node to the current selection that matches a predicate.\n * @param predicate The predicate to match\n * @returns A command that finds the closest parent node to the current selection that matches the predicate\n * @example ```js\n * findParentNode(node => node.type.name === 'paragraph')\n * ```\n */\nexport function findParentNode(predicate: Predicate) {\n  return (selection: Selection) => findParentNodeClosestToPos(selection.$from, predicate)\n}\n","import { Schema } from '@tiptap/pm/model'\n\nimport { Editor } from '../Editor.js'\nimport { ExtensionManager } from '../ExtensionManager.js'\nimport { Extensions } from '../types.js'\nimport { getSchemaByResolvedExtensions } from './getSchemaByResolvedExtensions.js'\n\nexport function getSchema(extensions: Extensions, editor?: Editor): Schema {\n  const resolvedExtensions = ExtensionManager.resolve(extensions)\n\n  return getSchemaByResolvedExtensions(resolvedExtensions, editor)\n}\n","import { Node } from '@tiptap/pm/model'\n\nimport { Extensions, JSONContent } from '../types.js'\nimport { getHTMLFromFragment } from './getHTMLFromFragment.js'\nimport { getSchema } from './getSchema.js'\n\n/**\n * Generate HTML from a JSONContent\n * @param doc The JSONContent to generate HTML from\n * @param extensions The extensions to use for the schema\n * @returns The generated HTML\n */\nexport function generateHTML(doc: JSONContent, extensions: Extensions): string {\n  const schema = getSchema(extensions)\n  const contentNode = Node.fromJSON(schema, doc)\n\n  return getHTMLFromFragment(contentNode.content, schema)\n}\n","import { DOMParser } from '@tiptap/pm/model'\n\nimport { Extensions } from '../types.js'\nimport { elementFromString } from '../utilities/elementFromString.js'\nimport { getSchema } from './getSchema.js'\n\n/**\n * Generate JSONContent from HTML\n * @param html The HTML to generate JSONContent from\n * @param extensions The extensions to use for the schema\n * @returns The generated JSONContent\n */\nexport function generateJSON(html: string, extensions: Extensions): Record<string, any> {\n  const schema = getSchema(extensions)\n  const dom = elementFromString(html)\n\n  return DOMParser.fromSchema(schema).parse(dom).toJSON()\n}\n","import { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { TextSerializer } from '../types.js'\nimport { getTextBetween } from './getTextBetween.js'\n\n/**\n * Gets the text of a Prosemirror node\n * @param node The Prosemirror node\n * @param options Options for the text serializer & block separator\n * @returns The text of the node\n * @example ```js\n * const text = getText(node, { blockSeparator: '\\n' })\n * ```\n */\nexport function getText(\n  node: ProseMirrorNode,\n  options?: {\n    blockSeparator?: string\n    textSerializers?: Record<string, TextSerializer>\n  },\n) {\n  const range = {\n    from: 0,\n    to: node.content.size,\n  }\n\n  return getTextBetween(node, range, options)\n}\n","import { Node } from '@tiptap/pm/model'\n\nimport { Extensions, JSONContent, TextSerializer } from '../types.js'\nimport { getSchema } from './getSchema.js'\nimport { getText } from './getText.js'\nimport { getTextSerializersFromSchema } from './getTextSerializersFromSchema.js'\n\n/**\n * Generate raw text from a JSONContent\n * @param doc The JSONContent to generate text from\n * @param extensions The extensions to use for the schema\n * @param options Options for the text generation f.e. blockSeparator or textSerializers\n * @returns The generated text\n */\nexport function generateText(\n  doc: JSONContent,\n  extensions: Extensions,\n  options?: {\n    blockSeparator?: string\n    textSerializers?: Record<string, TextSerializer>\n  },\n): string {\n  const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {}\n  const schema = getSchema(extensions)\n  const contentNode = Node.fromJSON(schema, doc)\n\n  return getText(contentNode, {\n    blockSeparator,\n    textSerializers: {\n      ...getTextSerializersFromSchema(schema),\n      ...textSerializers,\n    },\n  })\n}\n","import { Node, NodeType } from '@tiptap/pm/model'\nimport { EditorState } from '@tiptap/pm/state'\n\nimport { getNodeType } from './getNodeType.js'\n\nexport function getNodeAttributes(\n  state: EditorState,\n  typeOrName: string | NodeType,\n): Record<string, any> {\n  const type = getNodeType(typeOrName, state.schema)\n  const { from, to } = state.selection\n  const nodes: Node[] = []\n\n  state.doc.nodesBetween(from, to, node => {\n    nodes.push(node)\n  })\n\n  const node = nodes.reverse().find(nodeItem => nodeItem.type.name === type.name)\n\n  if (!node) {\n    return {}\n  }\n\n  return { ...node.attrs }\n}\n","import { MarkType, NodeType } from '@tiptap/pm/model'\nimport { EditorState } from '@tiptap/pm/state'\n\nimport { getMarkAttributes } from './getMarkAttributes.js'\nimport { getNodeAttributes } from './getNodeAttributes.js'\nimport { getSchemaTypeNameByName } from './getSchemaTypeNameByName.js'\n\n/**\n * Get node or mark attributes by type or name on the current editor state\n * @param state The current editor state\n * @param typeOrName The node or mark type or name\n * @returns The attributes of the node or mark or an empty object\n */\nexport function getAttributes(\n  state: EditorState,\n  typeOrName: string | NodeType | MarkType,\n): Record<string, any> {\n  const schemaType = getSchemaTypeNameByName(\n    typeof typeOrName === 'string' ? typeOrName : typeOrName.name,\n    state.schema,\n  )\n\n  if (schemaType === 'node') {\n    return getNodeAttributes(state, typeOrName as NodeType)\n  }\n\n  if (schemaType === 'mark') {\n    return getMarkAttributes(state, typeOrName as MarkType)\n  }\n\n  return {}\n}\n","/**\n * Removes duplicated values within an array.\n * Supports numbers, strings and objects.\n */\nexport function removeDuplicates<T>(array: T[], by = JSON.stringify): T[] {\n  const seen: Record<any, any> = {}\n\n  return array.filter(item => {\n    const key = by(item)\n\n    return Object.prototype.hasOwnProperty.call(seen, key)\n      ? false\n      : (seen[key] = true)\n  })\n}\n","import { Step, Transform } from '@tiptap/pm/transform'\n\nimport { Range } from '../types.js'\nimport { removeDuplicates } from '../utilities/removeDuplicates.js'\n\nexport type ChangedRange = {\n  oldRange: Range,\n  newRange: Range,\n}\n\n/**\n * Removes duplicated ranges and ranges that are\n * fully captured by other ranges.\n */\nfunction simplifyChangedRanges(changes: ChangedRange[]): ChangedRange[] {\n  const uniqueChanges = removeDuplicates(changes)\n\n  return uniqueChanges.length === 1\n    ? uniqueChanges\n    : uniqueChanges.filter((change, index) => {\n      const rest = uniqueChanges.filter((_, i) => i !== index)\n\n      return !rest.some(otherChange => {\n        return change.oldRange.from >= otherChange.oldRange.from\n          && change.oldRange.to <= otherChange.oldRange.to\n          && change.newRange.from >= otherChange.newRange.from\n          && change.newRange.to <= otherChange.newRange.to\n      })\n    })\n}\n\n/**\n * Returns a list of changed ranges\n * based on the first and last state of all steps.\n */\nexport function getChangedRanges(transform: Transform): ChangedRange[] {\n  const { mapping, steps } = transform\n  const changes: ChangedRange[] = []\n\n  mapping.maps.forEach((stepMap, index) => {\n    const ranges: Range[] = []\n\n    // This accounts for step changes where no range was actually altered\n    // e.g. when setting a mark, node attribute, etc.\n    // @ts-ignore\n    if (!stepMap.ranges.length) {\n      const { from, to } = steps[index] as Step & {\n        from?: number,\n        to?: number,\n      }\n\n      if (from === undefined || to === undefined) {\n        return\n      }\n\n      ranges.push({ from, to })\n    } else {\n      stepMap.forEach((from, to) => {\n        ranges.push({ from, to })\n      })\n    }\n\n    ranges.forEach(({ from, to }) => {\n      const newStart = mapping.slice(index).map(from, -1)\n      const newEnd = mapping.slice(index).map(to)\n      const oldStart = mapping.invert().map(newStart, -1)\n      const oldEnd = mapping.invert().map(newEnd)\n\n      changes.push({\n        oldRange: {\n          from: oldStart,\n          to: oldEnd,\n        },\n        newRange: {\n          from: newStart,\n          to: newEnd,\n        },\n      })\n    })\n  })\n\n  return simplifyChangedRanges(changes)\n}\n","import { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { JSONContent } from '../types.js'\n\ninterface DebugJSONContent extends JSONContent {\n  from: number\n  to: number\n}\n\nexport function getDebugJSON(node: ProseMirrorNode, startOffset = 0): DebugJSONContent {\n  const isTopNode = node.type === node.type.schema.topNodeType\n  const increment = isTopNode ? 0 : 1\n  const from = startOffset\n  const to = from + node.nodeSize\n  const marks = node.marks.map(mark => {\n    const output: { type: string; attrs?: Record<string, any> } = {\n      type: mark.type.name,\n    }\n\n    if (Object.keys(mark.attrs).length) {\n      output.attrs = { ...mark.attrs }\n    }\n\n    return output\n  })\n  const attrs = { ...node.attrs }\n  const output: DebugJSONContent = {\n    type: node.type.name,\n    from,\n    to,\n  }\n\n  if (Object.keys(attrs).length) {\n    output.attrs = attrs\n  }\n\n  if (marks.length) {\n    output.marks = marks\n  }\n\n  if (node.content.childCount) {\n    output.content = []\n\n    node.forEach((child, offset) => {\n      output.content?.push(getDebugJSON(child, startOffset + offset + increment))\n    })\n  }\n\n  if (node.text) {\n    output.text = node.text\n  }\n\n  return output\n}\n","import { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { MarkRange } from '../types.js'\nimport { getMarkRange } from './getMarkRange.js'\n\nexport function getMarksBetween(from: number, to: number, doc: ProseMirrorNode): MarkRange[] {\n  const marks: MarkRange[] = []\n\n  // get all inclusive marks on empty selection\n  if (from === to) {\n    doc\n      .resolve(from)\n      .marks()\n      .forEach(mark => {\n        const $pos = doc.resolve(from)\n        const range = getMarkRange($pos, mark.type)\n\n        if (!range) {\n          return\n        }\n\n        marks.push({\n          mark,\n          ...range,\n        })\n      })\n  } else {\n    doc.nodesBetween(from, to, (node, pos) => {\n      if (!node || node?.nodeSize === undefined) {\n        return\n      }\n\n      marks.push(\n        ...node.marks.map(mark => ({\n          from: pos,\n          to: pos + node.nodeSize,\n          mark,\n        })),\n      )\n    })\n  }\n\n  return marks\n}\n","import { Node, NodeType } from '@tiptap/pm/model'\nimport { EditorState } from '@tiptap/pm/state'\n\n/**\n * Finds the first node of a given type or name in the current selection.\n * @param state The editor state.\n * @param typeOrName The node type or name.\n * @param pos The position to start searching from.\n * @param maxDepth The maximum depth to search.\n * @returns The node and the depth as an array.\n */\nexport const getNodeAtPosition = (state: EditorState, typeOrName: string | NodeType, pos: number, maxDepth = 20) => {\n  const $pos = state.doc.resolve(pos)\n\n  let currentDepth = maxDepth\n  let node: Node | null = null\n\n  while (currentDepth > 0 && node === null) {\n    const currentNode = $pos.node(currentDepth)\n\n    if (currentNode?.type.name === typeOrName) {\n      node = currentNode\n    } else {\n      currentDepth -= 1\n    }\n  }\n\n  return [node, currentDepth] as [Node | null, number]\n}\n","import { ExtensionAttribute } from '../types.js'\n\n/**\n * Return attributes of an extension that should be splitted by keepOnSplit flag\n * @param extensionAttributes Array of extension attributes\n * @param typeName The type of the extension\n * @param attributes The attributes of the extension\n * @returns The splitted attributes\n */\nexport function getSplittedAttributes(\n  extensionAttributes: ExtensionAttribute[],\n  typeName: string,\n  attributes: Record<string, any>,\n): Record<string, any> {\n  return Object.fromEntries(Object\n    .entries(attributes)\n    .filter(([name]) => {\n      const extensionAttribute = extensionAttributes.find(item => {\n        return item.type === typeName && item.name === name\n      })\n\n      if (!extensionAttribute) {\n        return false\n      }\n\n      return extensionAttribute.attribute.keepOnSplit\n    }))\n}\n","import { MarkType } from '@tiptap/pm/model'\nimport { EditorState } from '@tiptap/pm/state'\n\nimport { MarkRange } from '../types.js'\nimport { objectIncludes } from '../utilities/objectIncludes.js'\nimport { getMarkType } from './getMarkType.js'\n\nexport function isMarkActive(\n  state: EditorState,\n  typeOrName: MarkType | string | null,\n  attributes: Record<string, any> = {},\n): boolean {\n  const { empty, ranges } = state.selection\n  const type = typeOrName ? getMarkType(typeOrName, state.schema) : null\n\n  if (empty) {\n    return !!(state.storedMarks || state.selection.$from.marks())\n      .filter(mark => {\n        if (!type) {\n          return true\n        }\n\n        return type.name === mark.type.name\n      })\n      .find(mark => objectIncludes(mark.attrs, attributes, { strict: false }))\n  }\n\n  let selectionRange = 0\n  const markRanges: MarkRange[] = []\n\n  ranges.forEach(({ $from, $to }) => {\n    const from = $from.pos\n    const to = $to.pos\n\n    state.doc.nodesBetween(from, to, (node, pos) => {\n      if (!node.isText && !node.marks.length) {\n        return\n      }\n\n      const relativeFrom = Math.max(from, pos)\n      const relativeTo = Math.min(to, pos + node.nodeSize)\n      const range = relativeTo - relativeFrom\n\n      selectionRange += range\n\n      markRanges.push(\n        ...node.marks.map(mark => ({\n          mark,\n          from: relativeFrom,\n          to: relativeTo,\n        })),\n      )\n    })\n  })\n\n  if (selectionRange === 0) {\n    return false\n  }\n\n  // calculate range of matched mark\n  const matchedRange = markRanges\n    .filter(markRange => {\n      if (!type) {\n        return true\n      }\n\n      return type.name === markRange.mark.type.name\n    })\n    .filter(markRange => objectIncludes(markRange.mark.attrs, attributes, { strict: false }))\n    .reduce((sum, markRange) => sum + markRange.to - markRange.from, 0)\n\n  // calculate range of marks that excludes the searched mark\n  // for example `code` doesn’t allow any other marks\n  const excludedRange = markRanges\n    .filter(markRange => {\n      if (!type) {\n        return true\n      }\n\n      return markRange.mark.type !== type && markRange.mark.type.excludes(type)\n    })\n    .reduce((sum, markRange) => sum + markRange.to - markRange.from, 0)\n\n  // we only include the result of `excludedRange`\n  // if there is a match at all\n  const range = matchedRange > 0 ? matchedRange + excludedRange : matchedRange\n\n  return range >= selectionRange\n}\n","import { EditorState } from '@tiptap/pm/state'\n\nimport { getSchemaTypeNameByName } from './getSchemaTypeNameByName.js'\nimport { isMarkActive } from './isMarkActive.js'\nimport { isNodeActive } from './isNodeActive.js'\n\nexport function isActive(\n  state: EditorState,\n  name: string | null,\n  attributes: Record<string, any> = {},\n): boolean {\n  if (!name) {\n    return isNodeActive(state, null, attributes) || isMarkActive(state, null, attributes)\n  }\n\n  const schemaType = getSchemaTypeNameByName(name, state.schema)\n\n  if (schemaType === 'node') {\n    return isNodeActive(state, name, attributes)\n  }\n\n  if (schemaType === 'mark') {\n    return isMarkActive(state, name, attributes)\n  }\n\n  return false\n}\n","import { EditorState } from '@tiptap/pm/state'\n\nimport { findParentNode } from './findParentNode.js'\n\nexport const isAtEndOfNode = (state: EditorState, nodeType?: string) => {\n  const { $from, $to, $anchor } = state.selection\n\n  if (nodeType) {\n    const parentNode = findParentNode(node => node.type.name === nodeType)(state.selection)\n\n    if (!parentNode) {\n      return false\n    }\n\n    const $parentPos = state.doc.resolve(parentNode.pos + 1)\n\n    if ($anchor.pos + 1 === $parentPos.end()) {\n      return true\n    }\n\n    return false\n  }\n\n  if ($to.parentOffset < $to.parent.nodeSize - 2 || $from.pos !== $to.pos) {\n    return false\n  }\n\n  return true\n}\n","import { EditorState } from '@tiptap/pm/state'\n\nexport const isAtStartOfNode = (state: EditorState) => {\n  const { $from, $to } = state.selection\n\n  if ($from.parentOffset > 0 || $from.pos !== $to.pos) {\n    return false\n  }\n\n  return true\n}\n","import { getExtensionField } from '../helpers/getExtensionField.js'\nimport { NodeConfig } from '../index.js'\nimport { Extensions } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\nimport { splitExtensions } from './splitExtensions.js'\n\nexport function isList(name: string, extensions: Extensions): boolean {\n  const { nodeExtensions } = splitExtensions(extensions)\n  const extension = nodeExtensions.find(item => item.name === name)\n\n  if (!extension) {\n    return false\n  }\n\n  const context = {\n    name: extension.name,\n    options: extension.options,\n    storage: extension.storage,\n  }\n  const group = callOrReturn(getExtensionField<NodeConfig['group']>(extension, 'group', context))\n\n  if (typeof group !== 'string') {\n    return false\n  }\n\n  return group.split(' ').includes('list')\n}\n","import { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\n/**\n * Returns true if the given prosemirror node is empty.\n */\nexport function isNodeEmpty(\n  node: ProseMirrorNode,\n  {\n    checkChildren = true,\n    ignoreWhitespace = false,\n  }: {\n    /**\n     * When true (default), it will also check if all children are empty.\n     */\n    checkChildren?: boolean;\n    /**\n     * When true, it will ignore whitespace when checking for emptiness.\n     */\n    ignoreWhitespace?: boolean;\n  } = {},\n): boolean {\n  if (ignoreWhitespace) {\n    if (node.type.name === 'hardBreak') {\n      // Hard breaks are considered empty\n      return true\n    }\n    if (node.isText) {\n      return /^\\s*$/m.test(node.text ?? '')\n    }\n  }\n\n  if (node.isText) {\n    return !node.text\n  }\n\n  if (node.isAtom || node.isLeaf) {\n    return false\n  }\n\n  if (node.content.childCount === 0) {\n    return true\n  }\n\n  if (checkChildren) {\n    let isContentEmpty = true\n\n    node.content.forEach(childNode => {\n      if (isContentEmpty === false) {\n        // Exit early for perf\n        return\n      }\n\n      if (!isNodeEmpty(childNode, { ignoreWhitespace, checkChildren })) {\n        isContentEmpty = false\n      }\n    })\n\n    return isContentEmpty\n  }\n\n  return false\n}\n","import { NodeSelection } from '@tiptap/pm/state'\n\nexport function isNodeSelection(value: unknown): value is NodeSelection {\n  return value instanceof NodeSelection\n}\n","import { EditorView } from '@tiptap/pm/view'\n\nimport { minMax } from '../utilities/minMax.js'\n\nexport function posToDOMRect(view: EditorView, from: number, to: number): DOMRect {\n  const minPos = 0\n  const maxPos = view.state.doc.content.size\n  const resolvedFrom = minMax(from, minPos, maxPos)\n  const resolvedEnd = minMax(to, minPos, maxPos)\n  const start = view.coordsAtPos(resolvedFrom)\n  const end = view.coordsAtPos(resolvedEnd, -1)\n  const top = Math.min(start.top, end.top)\n  const bottom = Math.max(start.bottom, end.bottom)\n  const left = Math.min(start.left, end.left)\n  const right = Math.max(start.right, end.right)\n  const width = right - left\n  const height = bottom - top\n  const x = left\n  const y = top\n  const data = {\n    top,\n    bottom,\n    left,\n    right,\n    width,\n    height,\n    x,\n    y,\n  }\n\n  return {\n    ...data,\n    toJSON: () => data,\n  }\n}\n","import type { Schema } from '@tiptap/pm/model'\n\nimport type { JSONContent } from '../types.js'\n\ntype RewriteUnknownContentOptions = {\n  /**\n   * If true, unknown nodes will be treated as paragraphs\n   * @default true\n   */\n  fallbackToParagraph?: boolean;\n};\n\ntype RewrittenContent = {\n  /**\n   * The original JSON content that was rewritten\n   */\n  original: JSONContent;\n  /**\n   * The name of the node or mark that was unsupported\n   */\n  unsupported: string;\n}[];\n\n/**\n * The actual implementation of the rewriteUnknownContent function\n */\nfunction rewriteUnknownContentInner({\n  json,\n  validMarks,\n  validNodes,\n  options,\n  rewrittenContent = [],\n}: {\n  json: JSONContent;\n  validMarks: Set<string>;\n  validNodes: Set<string>;\n  options?: RewriteUnknownContentOptions;\n  rewrittenContent?: RewrittenContent;\n}): {\n  /**\n   * The cleaned JSON content\n   */\n  json: JSONContent | null;\n  /**\n   * The array of nodes and marks that were rewritten\n   */\n  rewrittenContent: RewrittenContent;\n} {\n  if (json.marks && Array.isArray(json.marks)) {\n    json.marks = json.marks.filter(mark => {\n      const name = typeof mark === 'string' ? mark : mark.type\n\n      if (validMarks.has(name)) {\n        return true\n      }\n\n      rewrittenContent.push({\n        original: JSON.parse(JSON.stringify(mark)),\n        unsupported: name,\n      })\n      // Just ignore any unknown marks\n      return false\n    })\n  }\n\n  if (json.content && Array.isArray(json.content)) {\n    json.content = json.content\n      .map(\n        value => rewriteUnknownContentInner({\n          json: value,\n          validMarks,\n          validNodes,\n          options,\n          rewrittenContent,\n        }).json,\n      )\n      .filter(a => a !== null && a !== undefined)\n  }\n\n  if (json.type && !validNodes.has(json.type)) {\n    rewrittenContent.push({\n      original: JSON.parse(JSON.stringify(json)),\n      unsupported: json.type,\n    })\n\n    if (json.content && Array.isArray(json.content) && (options?.fallbackToParagraph !== false)) {\n      // Just treat it like a paragraph and hope for the best\n      json.type = 'paragraph'\n\n      return {\n        json,\n        rewrittenContent,\n      }\n    }\n\n    // or just omit it entirely\n    return {\n      json: null,\n      rewrittenContent,\n    }\n  }\n\n  return { json, rewrittenContent }\n}\n\n/**\n * Rewrite unknown nodes and marks within JSON content\n * Allowing for user within the editor\n */\nexport function rewriteUnknownContent(\n  /**\n   * The JSON content to clean of unknown nodes and marks\n   */\n  json: JSONContent,\n  /**\n   * The schema to use for validation\n   */\n  schema: Schema,\n  /**\n   * Options for the cleaning process\n   */\n  options?: RewriteUnknownContentOptions,\n): {\n  /**\n   * The cleaned JSON content\n   */\n  json: JSONContent | null;\n  /**\n   * The array of nodes and marks that were rewritten\n   */\n  rewrittenContent: {\n    /**\n     * The original JSON content that was rewritten\n     */\n    original: JSONContent;\n    /**\n     * The name of the node or mark that was unsupported\n     */\n    unsupported: string;\n  }[];\n} {\n  return rewriteUnknownContentInner({\n    json,\n    validNodes: new Set(Object.keys(schema.nodes)),\n    validMarks: new Set(Object.keys(schema.marks)),\n    options,\n  })\n}\n","import { MarkType, ResolvedPos } from '@tiptap/pm/model'\nimport { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getMarkAttributes } from '../helpers/getMarkAttributes.js'\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { isTextSelection } from '../helpers/index.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    setMark: {\n      /**\n       * Add a mark with new attributes.\n       * @param typeOrName The mark type or name.\n       * @example editor.commands.setMark('bold', { level: 1 })\n       */\n      setMark: (typeOrName: string | MarkType, attributes?: Record<string, any>) => ReturnType\n    }\n  }\n}\n\nfunction canSetMark(state: EditorState, tr: Transaction, newMarkType: MarkType) {\n  const { selection } = tr\n  let cursor: ResolvedPos | null = null\n\n  if (isTextSelection(selection)) {\n    cursor = selection.$cursor\n  }\n\n  if (cursor) {\n    const currentMarks = state.storedMarks ?? cursor.marks()\n\n    // There can be no current marks that exclude the new mark\n    return (\n      !!newMarkType.isInSet(currentMarks)\n      || !currentMarks.some(mark => mark.type.excludes(newMarkType))\n    )\n  }\n\n  const { ranges } = selection\n\n  return ranges.some(({ $from, $to }) => {\n    let someNodeSupportsMark = $from.depth === 0\n      ? state.doc.inlineContent && state.doc.type.allowsMarkType(newMarkType)\n      : false\n\n    state.doc.nodesBetween($from.pos, $to.pos, (node, _pos, parent) => {\n      // If we already found a mark that we can enable, return false to bypass the remaining search\n      if (someNodeSupportsMark) {\n        return false\n      }\n\n      if (node.isInline) {\n        const parentAllowsMarkType = !parent || parent.type.allowsMarkType(newMarkType)\n        const currentMarksAllowMarkType = !!newMarkType.isInSet(node.marks)\n          || !node.marks.some(otherMark => otherMark.type.excludes(newMarkType))\n\n        someNodeSupportsMark = parentAllowsMarkType && currentMarksAllowMarkType\n      }\n      return !someNodeSupportsMark\n    })\n\n    return someNodeSupportsMark\n  })\n}\nexport const setMark: RawCommands['setMark'] = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => {\n  const { selection } = tr\n  const { empty, ranges } = selection\n  const type = getMarkType(typeOrName, state.schema)\n\n  if (dispatch) {\n    if (empty) {\n      const oldAttributes = getMarkAttributes(state, type)\n\n      tr.addStoredMark(\n        type.create({\n          ...oldAttributes,\n          ...attributes,\n        }),\n      )\n    } else {\n      ranges.forEach(range => {\n        const from = range.$from.pos\n        const to = range.$to.pos\n\n        state.doc.nodesBetween(from, to, (node, pos) => {\n          const trimmedFrom = Math.max(pos, from)\n          const trimmedTo = Math.min(pos + node.nodeSize, to)\n          const someHasMark = node.marks.find(mark => mark.type === type)\n\n          // if there is already a mark of this type\n          // we know that we have to merge its attributes\n          // otherwise we add a fresh new mark\n          if (someHasMark) {\n            node.marks.forEach(mark => {\n              if (type === mark.type) {\n                tr.addMark(\n                  trimmedFrom,\n                  trimmedTo,\n                  type.create({\n                    ...mark.attrs,\n                    ...attributes,\n                  }),\n                )\n              }\n            })\n          } else {\n            tr.addMark(trimmedFrom, trimmedTo, type.create(attributes))\n          }\n        })\n      })\n    }\n  }\n\n  return canSetMark(state, tr, type)\n}\n","import type { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    setMeta: {\n      /**\n       * Store a metadata property in the current transaction.\n       * @param key The key of the metadata property.\n       * @param value The value to store.\n       * @example editor.commands.setMeta('foo', 'bar')\n       */\n      setMeta: (key: string | Plugin | PluginKey, value: any) => ReturnType,\n    }\n  }\n}\n\nexport const setMeta: RawCommands['setMeta'] = (key, value) => ({ tr }) => {\n  tr.setMeta(key, value)\n\n  return true\n}\n","import { setBlockType } from '@tiptap/pm/commands'\nimport { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    setNode: {\n      /**\n       * Replace a given range with a node.\n       * @param typeOrName The type or name of the node\n       * @param attributes The attributes of the node\n       * @example editor.commands.setNode('paragraph')\n       */\n      setNode: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType\n    }\n  }\n}\n\nexport const setNode: RawCommands['setNode'] = (typeOrName, attributes = {}) => ({ state, dispatch, chain }) => {\n  const type = getNodeType(typeOrName, state.schema)\n\n  let attributesToCopy: Record<string, any> | undefined\n\n  if (state.selection.$anchor.sameParent(state.selection.$head)) {\n    // only copy attributes if the selection is pointing to a node of the same type\n    attributesToCopy = state.selection.$anchor.parent.attrs\n  }\n\n  // TODO: use a fallback like insertContent?\n  if (!type.isTextblock) {\n    console.warn('[tiptap warn]: Currently \"setNode()\" only supports text block nodes.')\n\n    return false\n  }\n\n  return (\n    chain()\n    // try to convert node to default node if needed\n      .command(({ commands }) => {\n        const canSetBlock = setBlockType(type, { ...attributesToCopy, ...attributes })(state)\n\n        if (canSetBlock) {\n          return true\n        }\n\n        return commands.clearNodes()\n      })\n      .command(({ state: updatedState }) => {\n        return setBlockType(type, { ...attributesToCopy, ...attributes })(updatedState, dispatch)\n      })\n      .run()\n  )\n}\n","import { NodeSelection } from '@tiptap/pm/state'\n\nimport { RawCommands } from '../types.js'\nimport { minMax } from '../utilities/minMax.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    setNodeSelection: {\n      /**\n       * Creates a NodeSelection.\n       * @param position - Position of the node.\n       * @example editor.commands.setNodeSelection(10)\n       */\n      setNodeSelection: (position: number) => ReturnType\n    }\n  }\n}\n\nexport const setNodeSelection: RawCommands['setNodeSelection'] = position => ({ tr, dispatch }) => {\n  if (dispatch) {\n    const { doc } = tr\n    const from = minMax(position, 0, doc.content.size)\n    const selection = NodeSelection.create(doc, from)\n\n    tr.setSelection(selection)\n  }\n\n  return true\n}\n","import { TextSelection } from '@tiptap/pm/state'\n\nimport { Range, RawCommands } from '../types.js'\nimport { minMax } from '../utilities/minMax.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    setTextSelection: {\n      /**\n       * Creates a TextSelection.\n       * @param position The position of the selection.\n       * @example editor.commands.setTextSelection(10)\n       */\n      setTextSelection: (position: number | Range) => ReturnType\n    }\n  }\n}\n\nexport const setTextSelection: RawCommands['setTextSelection'] = position => ({ tr, dispatch }) => {\n  if (dispatch) {\n    const { doc } = tr\n    const { from, to } = typeof position === 'number' ? { from: position, to: position } : position\n    const minPos = TextSelection.atStart(doc).from\n    const maxPos = TextSelection.atEnd(doc).to\n    const resolvedFrom = minMax(from, minPos, maxPos)\n    const resolvedEnd = minMax(to, minPos, maxPos)\n    const selection = TextSelection.create(doc, resolvedFrom, resolvedEnd)\n\n    tr.setSelection(selection)\n  }\n\n  return true\n}\n","import { NodeType } from '@tiptap/pm/model'\nimport { sinkListItem as originalSinkListItem } from '@tiptap/pm/schema-list'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    sinkListItem: {\n      /**\n       * Sink the list item down into an inner list.\n       * @param typeOrName The type or name of the node.\n       * @example editor.commands.sinkListItem('listItem')\n       */\n      sinkListItem: (typeOrName: string | NodeType) => ReturnType\n    }\n  }\n}\n\nexport const sinkListItem: RawCommands['sinkListItem'] = typeOrName => ({ state, dispatch }) => {\n  const type = getNodeType(typeOrName, state.schema)\n\n  return originalSinkListItem(type)(state, dispatch)\n}\n","import { EditorState, NodeSelection, TextSelection } from '@tiptap/pm/state'\nimport { canSplit } from '@tiptap/pm/transform'\n\nimport { defaultBlockAt } from '../helpers/defaultBlockAt.js'\nimport { getSplittedAttributes } from '../helpers/getSplittedAttributes.js'\nimport { RawCommands } from '../types.js'\n\nfunction ensureMarks(state: EditorState, splittableMarks?: string[]) {\n  const marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks())\n\n  if (marks) {\n    const filteredMarks = marks.filter(mark => splittableMarks?.includes(mark.type.name))\n\n    state.tr.ensureMarks(filteredMarks)\n  }\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    splitBlock: {\n      /**\n       * Forks a new node from an existing node.\n       * @param options.keepMarks Keep marks from the previous node.\n       * @example editor.commands.splitBlock()\n       * @example editor.commands.splitBlock({ keepMarks: true })\n       */\n      splitBlock: (options?: { keepMarks?: boolean }) => ReturnType\n    }\n  }\n}\n\nexport const splitBlock: RawCommands['splitBlock'] = ({ keepMarks = true } = {}) => ({\n  tr, state, dispatch, editor,\n}) => {\n  const { selection, doc } = tr\n  const { $from, $to } = selection\n  const extensionAttributes = editor.extensionManager.attributes\n  const newAttributes = getSplittedAttributes(\n    extensionAttributes,\n    $from.node().type.name,\n    $from.node().attrs,\n  )\n\n  if (selection instanceof NodeSelection && selection.node.isBlock) {\n    if (!$from.parentOffset || !canSplit(doc, $from.pos)) {\n      return false\n    }\n\n    if (dispatch) {\n      if (keepMarks) {\n        ensureMarks(state, editor.extensionManager.splittableMarks)\n      }\n\n      tr.split($from.pos).scrollIntoView()\n    }\n\n    return true\n  }\n\n  if (!$from.parent.isBlock) {\n    return false\n  }\n\n  const atEnd = $to.parentOffset === $to.parent.content.size\n\n  const deflt = $from.depth === 0\n    ? undefined\n    : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)))\n\n  let types = atEnd && deflt\n    ? [\n      {\n        type: deflt,\n        attrs: newAttributes,\n      },\n    ]\n    : undefined\n\n  let can = canSplit(tr.doc, tr.mapping.map($from.pos), 1, types)\n\n  if (\n    !types\n      && !can\n      && canSplit(tr.doc, tr.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : undefined)\n  ) {\n    can = true\n    types = deflt\n      ? [\n        {\n          type: deflt,\n          attrs: newAttributes,\n        },\n      ]\n      : undefined\n  }\n\n  if (dispatch) {\n    if (can) {\n      if (selection instanceof TextSelection) {\n        tr.deleteSelection()\n      }\n\n      tr.split(tr.mapping.map($from.pos), 1, types)\n\n      if (deflt && !atEnd && !$from.parentOffset && $from.parent.type !== deflt) {\n        const first = tr.mapping.map($from.before())\n        const $first = tr.doc.resolve(first)\n\n        if ($from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt)) {\n          tr.setNodeMarkup(tr.mapping.map($from.before()), deflt)\n        }\n      }\n    }\n\n    if (keepMarks) {\n      ensureMarks(state, editor.extensionManager.splittableMarks)\n    }\n\n    tr.scrollIntoView()\n  }\n\n  return can\n}\n","import {\n  Fragment, Node as ProseMirrorNode, NodeType, Slice,\n} from '@tiptap/pm/model'\nimport { TextSelection } from '@tiptap/pm/state'\nimport { canSplit } from '@tiptap/pm/transform'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { getSplittedAttributes } from '../helpers/getSplittedAttributes.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    splitListItem: {\n      /**\n       * Splits one list item into two list items.\n       * @param typeOrName The type or name of the node.\n       * @param overrideAttrs The attributes to ensure on the new node.\n       * @example editor.commands.splitListItem('listItem')\n       */\n      splitListItem: (typeOrName: string | NodeType, overrideAttrs?: Record<string, any>) => ReturnType\n    }\n  }\n}\n\nexport const splitListItem: RawCommands['splitListItem'] = (typeOrName, overrideAttrs = {}) => ({\n  tr, state, dispatch, editor,\n}) => {\n  const type = getNodeType(typeOrName, state.schema)\n  const { $from, $to } = state.selection\n\n  // @ts-ignore\n  // eslint-disable-next-line\n    const node: ProseMirrorNode = state.selection.node\n\n  if ((node && node.isBlock) || $from.depth < 2 || !$from.sameParent($to)) {\n    return false\n  }\n\n  const grandParent = $from.node(-1)\n\n  if (grandParent.type !== type) {\n    return false\n  }\n\n  const extensionAttributes = editor.extensionManager.attributes\n\n  if ($from.parent.content.size === 0 && $from.node(-1).childCount === $from.indexAfter(-1)) {\n    // In an empty block. If this is a nested list, the wrapping\n    // list item should be split. Otherwise, bail out and let next\n    // command handle lifting.\n    if (\n      $from.depth === 2\n        || $from.node(-3).type !== type\n        || $from.index(-2) !== $from.node(-2).childCount - 1\n    ) {\n      return false\n    }\n\n    if (dispatch) {\n      let wrap = Fragment.empty\n      // eslint-disable-next-line\n        const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3\n\n      // Build a fragment containing empty versions of the structure\n      // from the outer list item to the parent node of the cursor\n      for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1) {\n        wrap = Fragment.from($from.node(d).copy(wrap))\n      }\n\n      // eslint-disable-next-line\n        const depthAfter = $from.indexAfter(-1) < $from.node(-2).childCount ? 1 : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3\n\n      // Add a second list item with an empty default start node\n      const newNextTypeAttributes = {\n        ...getSplittedAttributes(\n          extensionAttributes,\n          $from.node().type.name,\n          $from.node().attrs,\n        ),\n        ...overrideAttrs,\n      }\n      const nextType = type.contentMatch.defaultType?.createAndFill(newNextTypeAttributes) || undefined\n\n      wrap = wrap.append(Fragment.from(type.createAndFill(null, nextType) || undefined))\n\n      const start = $from.before($from.depth - (depthBefore - 1))\n\n      tr.replace(start, $from.after(-depthAfter), new Slice(wrap, 4 - depthBefore, 0))\n\n      let sel = -1\n\n      tr.doc.nodesBetween(start, tr.doc.content.size, (n, pos) => {\n        if (sel > -1) {\n          return false\n        }\n\n        if (n.isTextblock && n.content.size === 0) {\n          sel = pos + 1\n        }\n      })\n\n      if (sel > -1) {\n        tr.setSelection(TextSelection.near(tr.doc.resolve(sel)))\n      }\n\n      tr.scrollIntoView()\n    }\n\n    return true\n  }\n\n  const nextType = $to.pos === $from.end() ? grandParent.contentMatchAt(0).defaultType : null\n\n  const newTypeAttributes = {\n    ...getSplittedAttributes(\n      extensionAttributes,\n      grandParent.type.name,\n      grandParent.attrs,\n    ),\n    ...overrideAttrs,\n  }\n  const newNextTypeAttributes = {\n    ...getSplittedAttributes(\n      extensionAttributes,\n      $from.node().type.name,\n      $from.node().attrs,\n    ),\n    ...overrideAttrs,\n  }\n\n  tr.delete($from.pos, $to.pos)\n\n  const types = nextType\n    ? [\n      { type, attrs: newTypeAttributes },\n      { type: nextType, attrs: newNextTypeAttributes },\n    ]\n    : [{ type, attrs: newTypeAttributes }]\n\n  if (!canSplit(tr.doc, $from.pos, 2)) {\n    return false\n  }\n\n  if (dispatch) {\n    const { selection, storedMarks } = state\n    const { splittableMarks } = editor.extensionManager\n    const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n    tr.split($from.pos, 2, types).scrollIntoView()\n\n    if (!marks || !dispatch) {\n      return true\n    }\n\n    const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name))\n\n    tr.ensureMarks(filteredMarks)\n  }\n\n  return true\n}\n","import { NodeType } from '@tiptap/pm/model'\nimport { Transaction } from '@tiptap/pm/state'\nimport { canJoin } from '@tiptap/pm/transform'\n\nimport { findParentNode } from '../helpers/findParentNode.js'\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isList } from '../helpers/isList.js'\nimport { RawCommands } from '../types.js'\n\nconst joinListBackwards = (tr: Transaction, listType: NodeType): boolean => {\n  const list = findParentNode(node => node.type === listType)(tr.selection)\n\n  if (!list) {\n    return true\n  }\n\n  const before = tr.doc.resolve(Math.max(0, list.pos - 1)).before(list.depth)\n\n  if (before === undefined) {\n    return true\n  }\n\n  const nodeBefore = tr.doc.nodeAt(before)\n  const canJoinBackwards = list.node.type === nodeBefore?.type && canJoin(tr.doc, list.pos)\n\n  if (!canJoinBackwards) {\n    return true\n  }\n\n  tr.join(list.pos)\n\n  return true\n}\n\nconst joinListForwards = (tr: Transaction, listType: NodeType): boolean => {\n  const list = findParentNode(node => node.type === listType)(tr.selection)\n\n  if (!list) {\n    return true\n  }\n\n  const after = tr.doc.resolve(list.start).after(list.depth)\n\n  if (after === undefined) {\n    return true\n  }\n\n  const nodeAfter = tr.doc.nodeAt(after)\n  const canJoinForwards = list.node.type === nodeAfter?.type && canJoin(tr.doc, after)\n\n  if (!canJoinForwards) {\n    return true\n  }\n\n  tr.join(after)\n\n  return true\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    toggleList: {\n      /**\n       * Toggle between different list types.\n       * @param listTypeOrName The type or name of the list.\n       * @param itemTypeOrName The type or name of the list item.\n       * @param keepMarks Keep marks when toggling.\n       * @param attributes Attributes for the new list.\n       * @example editor.commands.toggleList('bulletList', 'listItem')\n       */\n      toggleList: (listTypeOrName: string | NodeType, itemTypeOrName: string | NodeType, keepMarks?: boolean, attributes?: Record<string, any>) => ReturnType;\n    }\n  }\n}\n\nexport const toggleList: RawCommands['toggleList'] = (listTypeOrName, itemTypeOrName, keepMarks, attributes = {}) => ({\n  editor, tr, state, dispatch, chain, commands, can,\n}) => {\n  const { extensions, splittableMarks } = editor.extensionManager\n  const listType = getNodeType(listTypeOrName, state.schema)\n  const itemType = getNodeType(itemTypeOrName, state.schema)\n  const { selection, storedMarks } = state\n  const { $from, $to } = selection\n  const range = $from.blockRange($to)\n\n  const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n  if (!range) {\n    return false\n  }\n\n  const parentList = findParentNode(node => isList(node.type.name, extensions))(selection)\n\n  if (range.depth >= 1 && parentList && range.depth - parentList.depth <= 1) {\n    // remove list\n    if (parentList.node.type === listType) {\n      return commands.liftListItem(itemType)\n    }\n\n    // change list type\n    if (\n      isList(parentList.node.type.name, extensions)\n        && listType.validContent(parentList.node.content)\n        && dispatch\n    ) {\n      return chain()\n        .command(() => {\n          tr.setNodeMarkup(parentList.pos, listType)\n\n          return true\n        })\n        .command(() => joinListBackwards(tr, listType))\n        .command(() => joinListForwards(tr, listType))\n        .run()\n    }\n  }\n  if (!keepMarks || !marks || !dispatch) {\n\n    return chain()\n      // try to convert node to default node if needed\n      .command(() => {\n        const canWrapInList = can().wrapInList(listType, attributes)\n\n        if (canWrapInList) {\n          return true\n        }\n\n        return commands.clearNodes()\n      })\n      .wrapInList(listType, attributes)\n      .command(() => joinListBackwards(tr, listType))\n      .command(() => joinListForwards(tr, listType))\n      .run()\n  }\n\n  return (\n    chain()\n    // try to convert node to default node if needed\n      .command(() => {\n        const canWrapInList = can().wrapInList(listType, attributes)\n\n        const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name))\n\n        tr.ensureMarks(filteredMarks)\n\n        if (canWrapInList) {\n          return true\n        }\n\n        return commands.clearNodes()\n      })\n      .wrapInList(listType, attributes)\n      .command(() => joinListBackwards(tr, listType))\n      .command(() => joinListForwards(tr, listType))\n      .run()\n  )\n}\n","import { MarkType } from '@tiptap/pm/model'\n\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { isMarkActive } from '../helpers/isMarkActive.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    toggleMark: {\n      /**\n       * Toggle a mark on and off.\n       * @param typeOrName The mark type or name.\n       * @param attributes The attributes of the mark.\n       * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.\n       * @example editor.commands.toggleMark('bold')\n       */\n      toggleMark: (\n        /**\n         * The mark type or name.\n         */\n        typeOrName: string | MarkType,\n\n        /**\n         * The attributes of the mark.\n         */\n        attributes?: Record<string, any>,\n\n        options?: {\n          /**\n           * Removes the mark even across the current selection. Defaults to `false`.\n           */\n          extendEmptyMarkRange?: boolean\n        },\n      ) => ReturnType\n    }\n  }\n}\n\nexport const toggleMark: RawCommands['toggleMark'] = (typeOrName, attributes = {}, options = {}) => ({ state, commands }) => {\n  const { extendEmptyMarkRange = false } = options\n  const type = getMarkType(typeOrName, state.schema)\n  const isActive = isMarkActive(state, type, attributes)\n\n  if (isActive) {\n    return commands.unsetMark(type, { extendEmptyMarkRange })\n  }\n\n  return commands.setMark(type, attributes)\n}\n","import { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isNodeActive } from '../helpers/isNodeActive.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    toggleNode: {\n      /**\n       * Toggle a node with another node.\n       * @param typeOrName The type or name of the node.\n       * @param toggleTypeOrName The type or name of the node to toggle.\n       * @param attributes The attributes of the node.\n       * @example editor.commands.toggleNode('heading', 'paragraph')\n       */\n      toggleNode: (\n        typeOrName: string | NodeType,\n        toggleTypeOrName: string | NodeType,\n        attributes?: Record<string, any>,\n      ) => ReturnType\n    }\n  }\n}\n\nexport const toggleNode: RawCommands['toggleNode'] = (typeOrName, toggleTypeOrName, attributes = {}) => ({ state, commands }) => {\n  const type = getNodeType(typeOrName, state.schema)\n  const toggleType = getNodeType(toggleTypeOrName, state.schema)\n  const isActive = isNodeActive(state, type, attributes)\n\n  let attributesToCopy: Record<string, any> | undefined\n\n  if (state.selection.$anchor.sameParent(state.selection.$head)) {\n    // only copy attributes if the selection is pointing to a node of the same type\n    attributesToCopy = state.selection.$anchor.parent.attrs\n  }\n\n  if (isActive) {\n    return commands.setNode(toggleType, attributesToCopy)\n  }\n\n  // If the node is not active, we want to set the new node type with the given attributes\n  // Copying over the attributes from the current node if the selection is pointing to a node of the same type\n  return commands.setNode(type, { ...attributesToCopy, ...attributes })\n}\n","import { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isNodeActive } from '../helpers/isNodeActive.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    toggleWrap: {\n      /**\n       * Wraps nodes in another node, or removes an existing wrap.\n       * @param typeOrName The type or name of the node.\n       * @param attributes The attributes of the node.\n       * @example editor.commands.toggleWrap('blockquote')\n       */\n      toggleWrap: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType\n    }\n  }\n}\n\nexport const toggleWrap: RawCommands['toggleWrap'] = (typeOrName, attributes = {}) => ({ state, commands }) => {\n  const type = getNodeType(typeOrName, state.schema)\n  const isActive = isNodeActive(state, type, attributes)\n\n  if (isActive) {\n    return commands.lift(type)\n  }\n\n  return commands.wrapIn(type, attributes)\n}\n","import { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    undoInputRule: {\n      /**\n       * Undo an input rule.\n       * @example editor.commands.undoInputRule()\n       */\n      undoInputRule: () => ReturnType,\n    }\n  }\n}\n\nexport const undoInputRule: RawCommands['undoInputRule'] = () => ({ state, dispatch }) => {\n  const plugins = state.plugins\n\n  for (let i = 0; i < plugins.length; i += 1) {\n    const plugin = plugins[i]\n    let undoable\n\n    // @ts-ignore\n    // eslint-disable-next-line\n    if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) {\n      if (dispatch) {\n        const tr = state.tr\n        const toUndo = undoable.transform\n\n        for (let j = toUndo.steps.length - 1; j >= 0; j -= 1) {\n          tr.step(toUndo.steps[j].invert(toUndo.docs[j]))\n        }\n\n        if (undoable.text) {\n          const marks = tr.doc.resolve(undoable.from).marks()\n\n          tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks))\n        } else {\n          tr.delete(undoable.from, undoable.to)\n        }\n      }\n\n      return true\n    }\n  }\n\n  return false\n}\n","import { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    unsetAllMarks: {\n      /**\n       * Remove all marks in the current selection.\n       * @example editor.commands.unsetAllMarks()\n       */\n      unsetAllMarks: () => ReturnType,\n    }\n  }\n}\n\nexport const unsetAllMarks: RawCommands['unsetAllMarks'] = () => ({ tr, dispatch }) => {\n  const { selection } = tr\n  const { empty, ranges } = selection\n\n  if (empty) {\n    return true\n  }\n\n  if (dispatch) {\n    ranges.forEach(range => {\n      tr.removeMark(range.$from.pos, range.$to.pos)\n    })\n  }\n\n  return true\n}\n","import { MarkType } from '@tiptap/pm/model'\n\nimport { getMarkRange } from '../helpers/getMarkRange.js'\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    unsetMark: {\n      /**\n       * Remove all marks in the current selection.\n       * @param typeOrName The mark type or name.\n       * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.\n       * @example editor.commands.unsetMark('bold')\n       */\n      unsetMark: (\n        /**\n         * The mark type or name.\n         */\n        typeOrName: string | MarkType,\n\n        options?: {\n          /**\n           * Removes the mark even across the current selection. Defaults to `false`.\n           */\n          extendEmptyMarkRange?: boolean\n        },\n      ) => ReturnType\n    }\n  }\n}\n\nexport const unsetMark: RawCommands['unsetMark'] = (typeOrName, options = {}) => ({ tr, state, dispatch }) => {\n  const { extendEmptyMarkRange = false } = options\n  const { selection } = tr\n  const type = getMarkType(typeOrName, state.schema)\n  const { $from, empty, ranges } = selection\n\n  if (!dispatch) {\n    return true\n  }\n\n  if (empty && extendEmptyMarkRange) {\n    let { from, to } = selection\n    const attrs = $from.marks().find(mark => mark.type === type)?.attrs\n    const range = getMarkRange($from, type, attrs)\n\n    if (range) {\n      from = range.from\n      to = range.to\n    }\n\n    tr.removeMark(from, to, type)\n  } else {\n    ranges.forEach(range => {\n      tr.removeMark(range.$from.pos, range.$to.pos, type)\n    })\n  }\n\n  tr.removeStoredMark(type)\n\n  return true\n}\n","import {\n  Mark, MarkType, Node, NodeType,\n} from '@tiptap/pm/model'\nimport { SelectionRange } from '@tiptap/pm/state'\n\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    updateAttributes: {\n      /**\n       * Update attributes of a node or mark.\n       * @param typeOrName The type or name of the node or mark.\n       * @param attributes The attributes of the node or mark.\n       * @example editor.commands.updateAttributes('mention', { userId: \"2\" })\n       */\n      updateAttributes: (\n        /**\n         * The type or name of the node or mark.\n         */\n        typeOrName: string | NodeType | MarkType,\n\n        /**\n         * The attributes of the node or mark.\n         */\n        attributes: Record<string, any>,\n      ) => ReturnType\n    }\n  }\n}\n\nexport const updateAttributes: RawCommands['updateAttributes'] = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => {\n\n  let nodeType: NodeType | null = null\n  let markType: MarkType | null = null\n\n  const schemaType = getSchemaTypeNameByName(\n    typeof typeOrName === 'string' ? typeOrName : typeOrName.name,\n    state.schema,\n  )\n\n  if (!schemaType) {\n    return false\n  }\n\n  if (schemaType === 'node') {\n    nodeType = getNodeType(typeOrName as NodeType, state.schema)\n  }\n\n  if (schemaType === 'mark') {\n    markType = getMarkType(typeOrName as MarkType, state.schema)\n  }\n\n  if (dispatch) {\n    tr.selection.ranges.forEach((range: SelectionRange) => {\n\n      const from = range.$from.pos\n      const to = range.$to.pos\n\n      let lastPos: number | undefined\n      let lastNode: Node | undefined\n      let trimmedFrom: number\n      let trimmedTo: number\n\n      if (tr.selection.empty) {\n        state.doc.nodesBetween(from, to, (node: Node, pos: number) => {\n\n          if (nodeType && nodeType === node.type) {\n            trimmedFrom = Math.max(pos, from)\n            trimmedTo = Math.min(pos + node.nodeSize, to)\n            lastPos = pos\n            lastNode = node\n          }\n        })\n      } else {\n        state.doc.nodesBetween(from, to, (node: Node, pos: number) => {\n\n          if (pos < from && nodeType && nodeType === node.type) {\n            trimmedFrom = Math.max(pos, from)\n            trimmedTo = Math.min(pos + node.nodeSize, to)\n            lastPos = pos\n            lastNode = node\n          }\n\n          if (pos >= from && pos <= to) {\n\n            if (nodeType && nodeType === node.type) {\n              tr.setNodeMarkup(pos, undefined, {\n                ...node.attrs,\n                ...attributes,\n              })\n            }\n\n            if (markType && node.marks.length) {\n              node.marks.forEach((mark: Mark) => {\n\n                if (markType === mark.type) {\n                  const trimmedFrom2 = Math.max(pos, from)\n                  const trimmedTo2 = Math.min(pos + node.nodeSize, to)\n\n                  tr.addMark(\n                    trimmedFrom2,\n                    trimmedTo2,\n                    markType.create({\n                      ...mark.attrs,\n                      ...attributes,\n                    }),\n                  )\n                }\n              })\n            }\n          }\n        })\n      }\n\n      if (lastNode) {\n\n        if (lastPos !== undefined) {\n          tr.setNodeMarkup(lastPos, undefined, {\n            ...lastNode.attrs,\n            ...attributes,\n          })\n        }\n\n        if (markType && lastNode.marks.length) {\n          lastNode.marks.forEach((mark: Mark) => {\n\n            if (markType === mark.type) {\n              tr.addMark(\n                trimmedFrom,\n                trimmedTo,\n                markType.create({\n                  ...mark.attrs,\n                  ...attributes,\n                }),\n              )\n            }\n          })\n        }\n      }\n    })\n  }\n\n  return true\n}\n","import { wrapIn as originalWrapIn } from '@tiptap/pm/commands'\nimport { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    wrapIn: {\n      /**\n       * Wraps nodes in another node.\n       * @param typeOrName The type or name of the node.\n       * @param attributes The attributes of the node.\n       * @example editor.commands.wrapIn('blockquote')\n       */\n      wrapIn: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType\n    }\n  }\n}\n\nexport const wrapIn: RawCommands['wrapIn'] = (typeOrName, attributes = {}) => ({ state, dispatch }) => {\n  const type = getNodeType(typeOrName, state.schema)\n\n  return originalWrapIn(type, attributes)(state, dispatch)\n}\n","import { NodeType } from '@tiptap/pm/model'\nimport { wrapInList as originalWrapInList } from '@tiptap/pm/schema-list'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    wrapInList: {\n      /**\n       * Wrap a node in a list.\n       * @param typeOrName The type or name of the node.\n       * @param attributes The attributes of the node.\n       * @example editor.commands.wrapInList('bulletList')\n       */\n      wrapInList: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType\n    }\n  }\n}\n\nexport const wrapInList: RawCommands['wrapInList'] = (typeOrName, attributes = {}) => ({ state, dispatch }) => {\n  const type = getNodeType(typeOrName, state.schema)\n\n  return originalWrapInList(type, attributes)(state, dispatch)\n}\n","import * as commands from '../commands/index.js'\nimport { Extension } from '../Extension.js'\n\nexport * from '../commands/index.js'\n\nexport const Commands = Extension.create({\n  name: 'commands',\n\n  addCommands() {\n    return {\n      ...commands,\n    }\n  },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const Drop = Extension.create({\n  name: 'drop',\n\n  addProseMirrorPlugins() {\n    return [\n      new Plugin({\n        key: new PluginKey('tiptapDrop'),\n\n        props: {\n          handleDrop: (_, e, slice, moved) => {\n            this.editor.emit('drop', {\n              editor: this.editor,\n              event: e,\n              slice,\n              moved,\n            })\n          },\n        },\n      }),\n    ]\n  },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const Editable = Extension.create({\n  name: 'editable',\n\n  addProseMirrorPlugins() {\n    return [\n      new Plugin({\n        key: new PluginKey('editable'),\n        props: {\n          editable: () => this.editor.options.editable,\n        },\n      }),\n    ]\n  },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const focusEventsPluginKey = new PluginKey('focusEvents')\n\nexport const FocusEvents = Extension.create({\n  name: 'focusEvents',\n\n  addProseMirrorPlugins() {\n    const { editor } = this\n\n    return [\n      new Plugin({\n        key: focusEventsPluginKey,\n        props: {\n          handleDOMEvents: {\n            focus: (view, event: Event) => {\n              editor.isFocused = true\n\n              const transaction = editor.state.tr\n                .setMeta('focus', { event })\n                .setMeta('addToHistory', false)\n\n              view.dispatch(transaction)\n\n              return false\n            },\n            blur: (view, event: Event) => {\n              editor.isFocused = false\n\n              const transaction = editor.state.tr\n                .setMeta('blur', { event })\n                .setMeta('addToHistory', false)\n\n              view.dispatch(transaction)\n\n              return false\n            },\n          },\n        },\n      }),\n    ]\n  },\n})\n","import { Plugin, PluginKey, Selection } from '@tiptap/pm/state'\n\nimport { CommandManager } from '../CommandManager.js'\nimport { Extension } from '../Extension.js'\nimport { createChainableState } from '../helpers/createChainableState.js'\nimport { isNodeEmpty } from '../helpers/isNodeEmpty.js'\nimport { isiOS } from '../utilities/isiOS.js'\nimport { isMacOS } from '../utilities/isMacOS.js'\n\nexport const Keymap = Extension.create({\n  name: 'keymap',\n\n  addKeyboardShortcuts() {\n    const handleBackspace = () => this.editor.commands.first(({ commands }) => [\n      () => commands.undoInputRule(),\n\n      // maybe convert first text block node to default node\n      () => commands.command(({ tr }) => {\n        const { selection, doc } = tr\n        const { empty, $anchor } = selection\n        const { pos, parent } = $anchor\n        const $parentPos = $anchor.parent.isTextblock && pos > 0 ? tr.doc.resolve(pos - 1) : $anchor\n        const parentIsIsolating = $parentPos.parent.type.spec.isolating\n\n        const parentPos = $anchor.pos - $anchor.parentOffset\n\n        const isAtStart = (parentIsIsolating && $parentPos.parent.childCount === 1)\n          ? parentPos === $anchor.pos\n          : Selection.atStart(doc).from === pos\n\n        if (\n          !empty\n          || !parent.type.isTextblock\n          || parent.textContent.length\n          || !isAtStart\n          || (isAtStart && $anchor.parent.type.name === 'paragraph') // prevent clearNodes when no nodes to clear, otherwise history stack is appended\n        ) {\n          return false\n        }\n\n        return commands.clearNodes()\n      }),\n\n      () => commands.deleteSelection(),\n      () => commands.joinBackward(),\n      () => commands.selectNodeBackward(),\n    ])\n\n    const handleDelete = () => this.editor.commands.first(({ commands }) => [\n      () => commands.deleteSelection(),\n      () => commands.deleteCurrentNode(),\n      () => commands.joinForward(),\n      () => commands.selectNodeForward(),\n    ])\n\n    const handleEnter = () => this.editor.commands.first(({ commands }) => [\n      () => commands.newlineInCode(),\n      () => commands.createParagraphNear(),\n      () => commands.liftEmptyBlock(),\n      () => commands.splitBlock(),\n    ])\n\n    const baseKeymap = {\n      Enter: handleEnter,\n      'Mod-Enter': () => this.editor.commands.exitCode(),\n      Backspace: handleBackspace,\n      'Mod-Backspace': handleBackspace,\n      'Shift-Backspace': handleBackspace,\n      Delete: handleDelete,\n      'Mod-Delete': handleDelete,\n      'Mod-a': () => this.editor.commands.selectAll(),\n    }\n\n    const pcKeymap = {\n      ...baseKeymap,\n    }\n\n    const macKeymap = {\n      ...baseKeymap,\n      'Ctrl-h': handleBackspace,\n      'Alt-Backspace': handleBackspace,\n      'Ctrl-d': handleDelete,\n      'Ctrl-Alt-Backspace': handleDelete,\n      'Alt-Delete': handleDelete,\n      'Alt-d': handleDelete,\n      'Ctrl-a': () => this.editor.commands.selectTextblockStart(),\n      'Ctrl-e': () => this.editor.commands.selectTextblockEnd(),\n    }\n\n    if (isiOS() || isMacOS()) {\n      return macKeymap\n    }\n\n    return pcKeymap\n  },\n\n  addProseMirrorPlugins() {\n    return [\n      // With this plugin we check if the whole document was selected and deleted.\n      // In this case we will additionally call `clearNodes()` to convert e.g. a heading\n      // to a paragraph if necessary.\n      // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well\n      // with many other commands.\n      new Plugin({\n        key: new PluginKey('clearDocument'),\n        appendTransaction: (transactions, oldState, newState) => {\n          if (transactions.some(tr => tr.getMeta('composition'))) {\n            return\n          }\n\n          const docChanges = transactions.some(transaction => transaction.docChanged)\n            && !oldState.doc.eq(newState.doc)\n\n          const ignoreTr = transactions.some(transaction => transaction.getMeta('preventClearDocument'))\n\n          if (!docChanges || ignoreTr) {\n            return\n          }\n\n          const { empty, from, to } = oldState.selection\n          const allFrom = Selection.atStart(oldState.doc).from\n          const allEnd = Selection.atEnd(oldState.doc).to\n          const allWasSelected = from === allFrom && to === allEnd\n\n          if (empty || !allWasSelected) {\n            return\n          }\n\n          const isEmpty = isNodeEmpty(newState.doc)\n\n          if (!isEmpty) {\n            return\n          }\n\n          const tr = newState.tr\n          const state = createChainableState({\n            state: newState,\n            transaction: tr,\n          })\n          const { commands } = new CommandManager({\n            editor: this.editor,\n            state,\n          })\n\n          commands.clearNodes()\n\n          if (!tr.steps.length) {\n            return\n          }\n\n          return tr\n        },\n      }),\n    ]\n  },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const Paste = Extension.create({\n  name: 'paste',\n\n  addProseMirrorPlugins() {\n\n    return [\n      new Plugin({\n        key: new PluginKey('tiptapPaste'),\n\n        props: {\n          handlePaste: (_view, e, slice) => {\n            this.editor.emit('paste', {\n              editor: this.editor,\n              event: e,\n              slice,\n            })\n          },\n        },\n      }),\n    ]\n  },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const Tabindex = Extension.create({\n  name: 'tabindex',\n\n  addProseMirrorPlugins() {\n    return [\n      new Plugin({\n        key: new PluginKey('tabindex'),\n        props: {\n          attributes: (): { [name: string]: string; } => (this.editor.isEditable ? { tabindex: '0' } : {}),\n        },\n      }),\n    ]\n  },\n})\n","import {\n  Fragment, Node, ResolvedPos,\n} from '@tiptap/pm/model'\n\nimport { Editor } from './Editor.js'\nimport { Content, Range } from './types.js'\n\nexport class NodePos {\n  private resolvedPos: ResolvedPos\n\n  private isBlock: boolean\n\n  private editor: Editor\n\n  private get name(): string {\n    return this.node.type.name\n  }\n\n  constructor(pos: ResolvedPos, editor: Editor, isBlock = false, node: Node | null = null) {\n    this.isBlock = isBlock\n    this.resolvedPos = pos\n    this.editor = editor\n    this.currentNode = node\n  }\n\n  private currentNode: Node | null = null\n\n  get node(): Node {\n    return this.currentNode || this.resolvedPos.node()\n  }\n\n  get element(): HTMLElement {\n    return this.editor.view.domAtPos(this.pos).node as HTMLElement\n  }\n\n  public actualDepth: number | null = null\n\n  get depth(): number {\n    return this.actualDepth ?? this.resolvedPos.depth\n  }\n\n  get pos(): number {\n    return this.resolvedPos.pos\n  }\n\n  get content(): Fragment {\n    return this.node.content\n  }\n\n  set content(content: Content) {\n    let from = this.from\n    let to = this.to\n\n    if (this.isBlock) {\n      if (this.content.size === 0) {\n        console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`)\n        return\n      }\n\n      from = this.from + 1\n      to = this.to - 1\n    }\n\n    this.editor.commands.insertContentAt({ from, to }, content)\n  }\n\n  get attributes(): { [key: string]: any } {\n    return this.node.attrs\n  }\n\n  get textContent(): string {\n    return this.node.textContent\n  }\n\n  get size(): number {\n    return this.node.nodeSize\n  }\n\n  get from(): number {\n    if (this.isBlock) {\n      return this.pos\n    }\n\n    return this.resolvedPos.start(this.resolvedPos.depth)\n  }\n\n  get range(): Range {\n    return {\n      from: this.from,\n      to: this.to,\n    }\n  }\n\n  get to(): number {\n    if (this.isBlock) {\n      return this.pos + this.size\n    }\n\n    return this.resolvedPos.end(this.resolvedPos.depth) + (this.node.isText ? 0 : 1)\n  }\n\n  get parent(): NodePos | null {\n    if (this.depth === 0) {\n      return null\n    }\n\n    const parentPos = this.resolvedPos.start(this.resolvedPos.depth - 1)\n    const $pos = this.resolvedPos.doc.resolve(parentPos)\n\n    return new NodePos($pos, this.editor)\n  }\n\n  get before(): NodePos | null {\n    let $pos = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2))\n\n    if ($pos.depth !== this.depth) {\n      $pos = this.resolvedPos.doc.resolve(this.from - 3)\n    }\n\n    return new NodePos($pos, this.editor)\n  }\n\n  get after(): NodePos | null {\n    let $pos = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1))\n\n    if ($pos.depth !== this.depth) {\n      $pos = this.resolvedPos.doc.resolve(this.to + 3)\n    }\n\n    return new NodePos($pos, this.editor)\n  }\n\n  get children(): NodePos[] {\n    const children: NodePos[] = []\n\n    this.node.content.forEach((node, offset) => {\n      const isBlock = node.isBlock && !node.isTextblock\n      const isNonTextAtom = node.isAtom && !node.isText\n\n      const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1)\n\n      // Check if targetPos is within valid document range\n      if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) {\n        return\n      }\n\n      const $pos = this.resolvedPos.doc.resolve(targetPos)\n\n      if (!isBlock && $pos.depth <= this.depth) {\n        return\n      }\n\n      const childNodePos = new NodePos($pos, this.editor, isBlock, isBlock ? node : null)\n\n      if (isBlock) {\n        childNodePos.actualDepth = this.depth + 1\n      }\n\n      children.push(new NodePos($pos, this.editor, isBlock, isBlock ? node : null))\n    })\n\n    return children\n  }\n\n  get firstChild(): NodePos | null {\n    return this.children[0] || null\n  }\n\n  get lastChild(): NodePos | null {\n    const children = this.children\n\n    return children[children.length - 1] || null\n  }\n\n  closest(selector: string, attributes: { [key: string]: any } = {}): NodePos | null {\n    let node: NodePos | null = null\n    let currentNode = this.parent\n\n    while (currentNode && !node) {\n      if (currentNode.node.type.name === selector) {\n        if (Object.keys(attributes).length > 0) {\n          const nodeAttributes = currentNode.node.attrs\n          const attrKeys = Object.keys(attributes)\n\n          for (let index = 0; index < attrKeys.length; index += 1) {\n            const key = attrKeys[index]\n\n            if (nodeAttributes[key] !== attributes[key]) {\n              break\n            }\n          }\n        } else {\n          node = currentNode\n        }\n      }\n\n      currentNode = currentNode.parent\n    }\n\n    return node\n  }\n\n  querySelector(selector: string, attributes: { [key: string]: any } = {}): NodePos | null {\n    return this.querySelectorAll(selector, attributes, true)[0] || null\n  }\n\n  querySelectorAll(selector: string, attributes: { [key: string]: any } = {}, firstItemOnly = false): NodePos[] {\n    let nodes: NodePos[] = []\n\n    if (!this.children || this.children.length === 0) {\n      return nodes\n    }\n    const attrKeys = Object.keys(attributes)\n\n    /**\n     * Finds all children recursively that match the selector and attributes\n     * If firstItemOnly is true, it will return the first item found\n     */\n    this.children.forEach(childPos => {\n      // If we already found a node and we only want the first item, we dont need to keep going\n      if (firstItemOnly && nodes.length > 0) {\n        return\n      }\n\n      if (childPos.node.type.name === selector) {\n        const doesAllAttributesMatch = attrKeys.every(key => attributes[key] === childPos.node.attrs[key])\n\n        if (doesAllAttributesMatch) {\n          nodes.push(childPos)\n        }\n      }\n\n      // If we already found a node and we only want the first item, we can stop here and skip the recursion\n      if (firstItemOnly && nodes.length > 0) {\n        return\n      }\n\n      nodes = nodes.concat(childPos.querySelectorAll(selector, attributes, firstItemOnly))\n    })\n\n    return nodes\n  }\n\n  setAttribute(attributes: { [key: string]: any }) {\n    const { tr } = this.editor.state\n\n    tr.setNodeMarkup(this.from, undefined, {\n      ...this.node.attrs,\n      ...attributes,\n    })\n\n    this.editor.view.dispatch(tr)\n  }\n}\n","export const style = `.ProseMirror {\n  position: relative;\n}\n\n.ProseMirror {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  white-space: break-spaces;\n  -webkit-font-variant-ligatures: none;\n  font-variant-ligatures: none;\n  font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n  white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n  white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n  white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n  display: inline !important;\n  border: none !important;\n  margin: 0 !important;\n  width: 0 !important;\n  height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n  display: none;\n  pointer-events: none;\n  position: absolute;\n  margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n  content: \"\";\n  display: block;\n  position: absolute;\n  top: -2px;\n  width: 20px;\n  border-top: 1px solid black;\n  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n  to {\n    visibility: hidden;\n  }\n}\n\n.ProseMirror-hideselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection * {\n  caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n  display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n  opacity: 0\n}`\n","export function createStyleTag(style: string, nonce?: string, suffix?: string): HTMLStyleElement {\n  const tiptapStyleTag = (<HTMLStyleElement>document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ''}]`))\n\n  if (tiptapStyleTag !== null) {\n    return tiptapStyleTag\n  }\n\n  const styleNode = document.createElement('style')\n\n  if (nonce) {\n    styleNode.setAttribute('nonce', nonce)\n  }\n\n  styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ''}`, '')\n  styleNode.innerHTML = style\n  document.getElementsByTagName('head')[0].appendChild(styleNode)\n\n  return styleNode\n}\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n  MarkType,\n  Node as ProseMirrorNode,\n  NodeType,\n  Schema,\n} from '@tiptap/pm/model'\nimport {\n  EditorState, Plugin, PluginKey, Transaction,\n} from '@tiptap/pm/state'\nimport { EditorView } from '@tiptap/pm/view'\n\nimport { CommandManager } from './CommandManager.js'\nimport { EventEmitter } from './EventEmitter.js'\nimport { ExtensionManager } from './ExtensionManager.js'\nimport {\n  ClipboardTextSerializer, Commands, Drop, Editable, FocusEvents, Keymap, Paste,\n  Tabindex,\n} from './extensions/index.js'\nimport { createDocument } from './helpers/createDocument.js'\nimport { getAttributes } from './helpers/getAttributes.js'\nimport { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js'\nimport { getText } from './helpers/getText.js'\nimport { getTextSerializersFromSchema } from './helpers/getTextSerializersFromSchema.js'\nimport { isActive } from './helpers/isActive.js'\nimport { isNodeEmpty } from './helpers/isNodeEmpty.js'\nimport { resolveFocusPosition } from './helpers/resolveFocusPosition.js'\nimport { NodePos } from './NodePos.js'\nimport { style } from './style.js'\nimport {\n  CanCommands,\n  ChainedCommands,\n  EditorEvents,\n  EditorOptions,\n  JSONContent,\n  SingleCommands,\n  TextSerializer,\n} from './types.js'\nimport { createStyleTag } from './utilities/createStyleTag.js'\nimport { isFunction } from './utilities/isFunction.js'\n\nexport * as extensions from './extensions/index.js'\n\n// @ts-ignore\nexport interface TiptapEditorHTMLElement extends HTMLElement {\n  editor?: Editor\n}\n\nexport class Editor extends EventEmitter<EditorEvents> {\n  private commandManager!: CommandManager\n\n  public extensionManager!: ExtensionManager\n\n  private css!: HTMLStyleElement\n\n  public schema!: Schema\n\n  public view!: EditorView\n\n  public isFocused = false\n\n  /**\n   * The editor is considered initialized after the `create` event has been emitted.\n   */\n  public isInitialized = false\n\n  public extensionStorage: Record<string, any> = {}\n\n  public options: EditorOptions = {\n    element: document.createElement('div'),\n    content: '',\n    injectCSS: true,\n    injectNonce: undefined,\n    extensions: [],\n    autofocus: false,\n    editable: true,\n    editorProps: {},\n    parseOptions: {},\n    coreExtensionOptions: {},\n    enableInputRules: true,\n    enablePasteRules: true,\n    enableCoreExtensions: true,\n    enableContentCheck: false,\n    emitContentError: false,\n    onBeforeCreate: () => null,\n    onCreate: () => null,\n    onUpdate: () => null,\n    onSelectionUpdate: () => null,\n    onTransaction: () => null,\n    onFocus: () => null,\n    onBlur: () => null,\n    onDestroy: () => null,\n    onContentError: ({ error }) => { throw error },\n    onPaste: () => null,\n    onDrop: () => null,\n  }\n\n  constructor(options: Partial<EditorOptions> = {}) {\n    super()\n    this.setOptions(options)\n    this.createExtensionManager()\n    this.createCommandManager()\n    this.createSchema()\n    this.on('beforeCreate', this.options.onBeforeCreate)\n    this.emit('beforeCreate', { editor: this })\n    this.on('contentError', this.options.onContentError)\n    this.createView()\n    this.injectCSS()\n    this.on('create', this.options.onCreate)\n    this.on('update', this.options.onUpdate)\n    this.on('selectionUpdate', this.options.onSelectionUpdate)\n    this.on('transaction', this.options.onTransaction)\n    this.on('focus', this.options.onFocus)\n    this.on('blur', this.options.onBlur)\n    this.on('destroy', this.options.onDestroy)\n    this.on('drop', ({ event, slice, moved }) => this.options.onDrop(event, slice, moved))\n    this.on('paste', ({ event, slice }) => this.options.onPaste(event, slice))\n\n    window.setTimeout(() => {\n      if (this.isDestroyed) {\n        return\n      }\n\n      this.commands.focus(this.options.autofocus)\n      this.emit('create', { editor: this })\n      this.isInitialized = true\n    }, 0)\n  }\n\n  /**\n   * Returns the editor storage.\n   */\n  public get storage(): Record<string, any> {\n    return this.extensionStorage\n  }\n\n  /**\n   * An object of all registered commands.\n   */\n  public get commands(): SingleCommands {\n    return this.commandManager.commands\n  }\n\n  /**\n   * Create a command chain to call multiple commands at once.\n   */\n  public chain(): ChainedCommands {\n    return this.commandManager.chain()\n  }\n\n  /**\n   * Check if a command or a command chain can be executed. Without executing it.\n   */\n  public can(): CanCommands {\n    return this.commandManager.can()\n  }\n\n  /**\n   * Inject CSS styles.\n   */\n  private injectCSS(): void {\n    if (this.options.injectCSS && document) {\n      this.css = createStyleTag(style, this.options.injectNonce)\n    }\n  }\n\n  /**\n   * Update editor options.\n   *\n   * @param options A list of options\n   */\n  public setOptions(options: Partial<EditorOptions> = {}): void {\n    this.options = {\n      ...this.options,\n      ...options,\n    }\n\n    if (!this.view || !this.state || this.isDestroyed) {\n      return\n    }\n\n    if (this.options.editorProps) {\n      this.view.setProps(this.options.editorProps)\n    }\n\n    this.view.updateState(this.state)\n  }\n\n  /**\n   * Update editable state of the editor.\n   */\n  public setEditable(editable: boolean, emitUpdate = true): void {\n    this.setOptions({ editable })\n\n    if (emitUpdate) {\n      this.emit('update', { editor: this, transaction: this.state.tr })\n    }\n  }\n\n  /**\n   * Returns whether the editor is editable.\n   */\n  public get isEditable(): boolean {\n    // since plugins are applied after creating the view\n    // `editable` is always `true` for one tick.\n    // that’s why we also have to check for `options.editable`\n    return this.options.editable && this.view && this.view.editable\n  }\n\n  /**\n   * Returns the editor state.\n   */\n  public get state(): EditorState {\n    return this.view.state\n  }\n\n  /**\n   * Register a ProseMirror plugin.\n   *\n   * @param plugin A ProseMirror plugin\n   * @param handlePlugins Control how to merge the plugin into the existing plugins.\n   * @returns The new editor state\n   */\n  public registerPlugin(\n    plugin: Plugin,\n    handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[],\n  ): EditorState {\n    const plugins = isFunction(handlePlugins)\n      ? handlePlugins(plugin, [...this.state.plugins])\n      : [...this.state.plugins, plugin]\n\n    const state = this.state.reconfigure({ plugins })\n\n    this.view.updateState(state)\n\n    return state\n  }\n\n  /**\n   * Unregister a ProseMirror plugin.\n   *\n   * @param nameOrPluginKeyToRemove The plugins name\n   * @returns The new editor state or undefined if the editor is destroyed\n   */\n  public unregisterPlugin(nameOrPluginKeyToRemove: string | PluginKey | (string | PluginKey)[]): EditorState | undefined {\n    if (this.isDestroyed) {\n      return undefined\n    }\n\n    const prevPlugins = this.state.plugins\n    let plugins = prevPlugins;\n\n    ([] as (string | PluginKey)[]).concat(nameOrPluginKeyToRemove).forEach(nameOrPluginKey => {\n      // @ts-ignore\n      const name = typeof nameOrPluginKey === 'string' ? `${nameOrPluginKey}$` : nameOrPluginKey.key\n\n      // @ts-ignore\n      plugins = plugins.filter(plugin => !plugin.key.startsWith(name))\n    })\n\n    if (prevPlugins.length === plugins.length) {\n      // No plugin was removed, so we don’t need to update the state\n      return undefined\n    }\n\n    const state = this.state.reconfigure({\n      plugins,\n    })\n\n    this.view.updateState(state)\n\n    return state\n  }\n\n  /**\n   * Creates an extension manager.\n   */\n  private createExtensionManager(): void {\n\n    const coreExtensions = this.options.enableCoreExtensions ? [\n      Editable,\n      ClipboardTextSerializer.configure({\n        blockSeparator: this.options.coreExtensionOptions?.clipboardTextSerializer?.blockSeparator,\n      }),\n      Commands,\n      FocusEvents,\n      Keymap,\n      Tabindex,\n      Drop,\n      Paste,\n    ].filter(ext => {\n      if (typeof this.options.enableCoreExtensions === 'object') {\n        return this.options.enableCoreExtensions[ext.name as keyof typeof this.options.enableCoreExtensions] !== false\n      }\n      return true\n    }) : []\n    const allExtensions = [...coreExtensions, ...this.options.extensions].filter(extension => {\n      return ['extension', 'node', 'mark'].includes(extension?.type)\n    })\n\n    this.extensionManager = new ExtensionManager(allExtensions, this)\n  }\n\n  /**\n   * Creates an command manager.\n   */\n  private createCommandManager(): void {\n    this.commandManager = new CommandManager({\n      editor: this,\n    })\n  }\n\n  /**\n   * Creates a ProseMirror schema.\n   */\n  private createSchema(): void {\n    this.schema = this.extensionManager.schema\n  }\n\n  /**\n   * Creates a ProseMirror view.\n   */\n  private createView(): void {\n    let doc: ProseMirrorNode\n\n    try {\n      doc = createDocument(\n        this.options.content,\n        this.schema,\n        this.options.parseOptions,\n        { errorOnInvalidContent: this.options.enableContentCheck },\n      )\n    } catch (e) {\n      if (!(e instanceof Error) || !['[tiptap error]: Invalid JSON content', '[tiptap error]: Invalid HTML content'].includes(e.message)) {\n        // Not the content error we were expecting\n        throw e\n      }\n      this.emit('contentError', {\n        editor: this,\n        error: e as Error,\n        disableCollaboration: () => {\n          if (this.storage.collaboration) {\n            this.storage.collaboration.isDisabled = true\n          }\n          // To avoid syncing back invalid content, reinitialize the extensions without the collaboration extension\n          this.options.extensions = this.options.extensions.filter(extension => extension.name !== 'collaboration')\n\n          // Restart the initialization process by recreating the extension manager with the new set of extensions\n          this.createExtensionManager()\n        },\n      })\n\n      // Content is invalid, but attempt to create it anyway, stripping out the invalid parts\n      doc = createDocument(\n        this.options.content,\n        this.schema,\n        this.options.parseOptions,\n        { errorOnInvalidContent: false },\n      )\n    }\n    const selection = resolveFocusPosition(doc, this.options.autofocus)\n\n    this.view = new EditorView(this.options.element, {\n      ...this.options.editorProps,\n      attributes: {\n        // add `role=\"textbox\"` to the editor element\n        role: 'textbox',\n        ...this.options.editorProps?.attributes,\n      },\n      dispatchTransaction: this.dispatchTransaction.bind(this),\n      state: EditorState.create({\n        doc,\n        selection: selection || undefined,\n      }),\n    })\n\n    // `editor.view` is not yet available at this time.\n    // Therefore we will add all plugins and node views directly afterwards.\n    const newState = this.state.reconfigure({\n      plugins: this.extensionManager.plugins,\n    })\n\n    this.view.updateState(newState)\n\n    this.createNodeViews()\n    this.prependClass()\n\n    // Let’s store the editor instance in the DOM element.\n    // So we’ll have access to it for tests.\n    // @ts-ignore\n    const dom = this.view.dom as TiptapEditorHTMLElement\n\n    dom.editor = this\n  }\n\n  /**\n   * Creates all node views.\n   */\n  public createNodeViews(): void {\n    if (this.view.isDestroyed) {\n      return\n    }\n\n    this.view.setProps({\n      nodeViews: this.extensionManager.nodeViews,\n    })\n  }\n\n  /**\n   * Prepend class name to element.\n   */\n  public prependClass(): void {\n    this.view.dom.className = `tiptap ${this.view.dom.className}`\n  }\n\n  public isCapturingTransaction = false\n\n  private capturedTransaction: Transaction | null = null\n\n  public captureTransaction(fn: () => void) {\n    this.isCapturingTransaction = true\n    fn()\n    this.isCapturingTransaction = false\n\n    const tr = this.capturedTransaction\n\n    this.capturedTransaction = null\n\n    return tr\n  }\n\n  /**\n   * The callback over which to send transactions (state updates) produced by the view.\n   *\n   * @param transaction An editor state transaction\n   */\n  private dispatchTransaction(transaction: Transaction): void {\n    // if the editor / the view of the editor was destroyed\n    // the transaction should not be dispatched as there is no view anymore.\n    if (this.view.isDestroyed) {\n      return\n    }\n\n    if (this.isCapturingTransaction) {\n      if (!this.capturedTransaction) {\n        this.capturedTransaction = transaction\n\n        return\n      }\n\n      transaction.steps.forEach(step => this.capturedTransaction?.step(step))\n\n      return\n    }\n\n    const state = this.state.apply(transaction)\n    const selectionHasChanged = !this.state.selection.eq(state.selection)\n\n    this.emit('beforeTransaction', {\n      editor: this,\n      transaction,\n      nextState: state,\n    })\n    this.view.updateState(state)\n    this.emit('transaction', {\n      editor: this,\n      transaction,\n    })\n\n    if (selectionHasChanged) {\n      this.emit('selectionUpdate', {\n        editor: this,\n        transaction,\n      })\n    }\n\n    const focus = transaction.getMeta('focus')\n    const blur = transaction.getMeta('blur')\n\n    if (focus) {\n      this.emit('focus', {\n        editor: this,\n        event: focus.event,\n        transaction,\n      })\n    }\n\n    if (blur) {\n      this.emit('blur', {\n        editor: this,\n        event: blur.event,\n        transaction,\n      })\n    }\n\n    if (!transaction.docChanged || transaction.getMeta('preventUpdate')) {\n      return\n    }\n\n    this.emit('update', {\n      editor: this,\n      transaction,\n    })\n  }\n\n  /**\n   * Get attributes of the currently selected node or mark.\n   */\n  public getAttributes(nameOrType: string | NodeType | MarkType): Record<string, any> {\n    return getAttributes(this.state, nameOrType)\n  }\n\n  /**\n   * Returns if the currently selected node or mark is active.\n   *\n   * @param name Name of the node or mark\n   * @param attributes Attributes of the node or mark\n   */\n  public isActive(name: string, attributes?: {}): boolean\n  public isActive(attributes: {}): boolean\n  public isActive(nameOrAttributes: string, attributesOrUndefined?: {}): boolean {\n    const name = typeof nameOrAttributes === 'string' ? nameOrAttributes : null\n\n    const attributes = typeof nameOrAttributes === 'string' ? attributesOrUndefined : nameOrAttributes\n\n    return isActive(this.state, name, attributes)\n  }\n\n  /**\n   * Get the document as JSON.\n   */\n  public getJSON(): JSONContent {\n    return this.state.doc.toJSON()\n  }\n\n  /**\n   * Get the document as HTML.\n   */\n  public getHTML(): string {\n    return getHTMLFromFragment(this.state.doc.content, this.schema)\n  }\n\n  /**\n   * Get the document as text.\n   */\n  public getText(options?: {\n    blockSeparator?: string\n    textSerializers?: Record<string, TextSerializer>\n  }): string {\n    const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {}\n\n    return getText(this.state.doc, {\n      blockSeparator,\n      textSerializers: {\n        ...getTextSerializersFromSchema(this.schema),\n        ...textSerializers,\n      },\n    })\n  }\n\n  /**\n   * Check if there is no content.\n   */\n  public get isEmpty(): boolean {\n    return isNodeEmpty(this.state.doc)\n  }\n\n  /**\n   * Get the number of characters for the current document.\n   *\n   * @deprecated\n   */\n  public getCharacterCount(): number {\n    console.warn(\n      '[tiptap warn]: \"editor.getCharacterCount()\" is deprecated. Please use \"editor.storage.characterCount.characters()\" instead.',\n    )\n\n    return this.state.doc.content.size - 2\n  }\n\n  /**\n   * Destroy the editor.\n   */\n  public destroy(): void {\n    this.emit('destroy')\n\n    if (this.view) {\n      // Cleanup our reference to prevent circular references which caused memory leaks\n      // @ts-ignore\n      const dom = this.view.dom as TiptapEditorHTMLElement\n\n      if (dom && dom.editor) {\n        delete dom.editor\n      }\n      this.view.destroy()\n    }\n\n    this.removeAllListeners()\n  }\n\n  /**\n   * Check if the editor is already destroyed.\n   */\n  public get isDestroyed(): boolean {\n    // @ts-ignore\n    return !this.view?.docView\n  }\n\n  public $node(selector: string, attributes?: { [key: string]: any }): NodePos | null {\n    return this.$doc?.querySelector(selector, attributes) || null\n  }\n\n  public $nodes(selector: string, attributes?: { [key: string]: any }): NodePos[] | null {\n    return this.$doc?.querySelectorAll(selector, attributes) || null\n  }\n\n  public $pos(pos: number) {\n    const $pos = this.state.doc.resolve(pos)\n\n    return new NodePos($pos, this)\n  }\n\n  get $doc() {\n    return this.$pos(0)\n  }\n}\n","import { MarkType } from '@tiptap/pm/model'\n\nimport { getMarksBetween } from '../helpers/getMarksBetween.js'\nimport { InputRule, InputRuleFinder } from '../InputRule.js'\nimport { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule that adds a mark when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function markInputRule(config: {\n  find: InputRuleFinder\n  type: MarkType\n  getAttributes?:\n    | Record<string, any>\n    | ((match: ExtendedRegExpMatchArray) => Record<string, any>)\n    | false\n    | null\n}) {\n  return new InputRule({\n    find: config.find,\n    handler: ({ state, range, match }) => {\n      const attributes = callOrReturn(config.getAttributes, undefined, match)\n\n      if (attributes === false || attributes === null) {\n        return null\n      }\n\n      const { tr } = state\n      const captureGroup = match[match.length - 1]\n      const fullMatch = match[0]\n\n      if (captureGroup) {\n        const startSpaces = fullMatch.search(/\\S/)\n        const textStart = range.from + fullMatch.indexOf(captureGroup)\n        const textEnd = textStart + captureGroup.length\n\n        const excludedMarks = getMarksBetween(range.from, range.to, state.doc)\n          .filter(item => {\n            // @ts-ignore\n            const excluded = item.mark.type.excluded as MarkType[]\n\n            return excluded.find(type => type === config.type && type !== item.mark.type)\n          })\n          .filter(item => item.to > textStart)\n\n        if (excludedMarks.length) {\n          return null\n        }\n\n        if (textEnd < range.to) {\n          tr.delete(textEnd, range.to)\n        }\n\n        if (textStart > range.from) {\n          tr.delete(range.from + startSpaces, textStart)\n        }\n\n        const markEnd = range.from + startSpaces + captureGroup.length\n\n        tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {}))\n\n        tr.removeStoredMark(config.type)\n      }\n    },\n  })\n}\n","import { NodeType } from '@tiptap/pm/model'\n\nimport { InputRule, InputRuleFinder } from '../InputRule.js'\nimport { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule that adds a node when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function nodeInputRule(config: {\n  /**\n   * The regex to match.\n   */\n  find: InputRuleFinder\n\n  /**\n   * The node type to add.\n   */\n  type: NodeType\n\n  /**\n   * A function that returns the attributes for the node\n   * can also be an object of attributes\n   */\n  getAttributes?:\n    | Record<string, any>\n    | ((match: ExtendedRegExpMatchArray) => Record<string, any>)\n    | false\n    | null\n}) {\n  return new InputRule({\n    find: config.find,\n    handler: ({ state, range, match }) => {\n      const attributes = callOrReturn(config.getAttributes, undefined, match) || {}\n      const { tr } = state\n      const start = range.from\n      let end = range.to\n\n      const newNode = config.type.create(attributes)\n\n      if (match[1]) {\n        const offset = match[0].lastIndexOf(match[1])\n        let matchStart = start + offset\n\n        if (matchStart > end) {\n          matchStart = end\n        } else {\n          end = matchStart + match[1].length\n        }\n\n        // insert last typed character\n        const lastChar = match[0][match[0].length - 1]\n\n        tr.insertText(lastChar, start + match[0].length - 1)\n\n        // insert node from input rule\n        tr.replaceWith(matchStart, end, newNode)\n      } else if (match[0]) {\n        const insertionStart = config.type.isInline ? start : start - 1\n\n        tr.insert(insertionStart, config.type.create(attributes)).delete(\n          tr.mapping.map(start),\n          tr.mapping.map(end),\n        )\n      }\n\n      tr.scrollIntoView()\n    },\n  })\n}\n","import { NodeType } from '@tiptap/pm/model'\n\nimport { InputRule, InputRuleFinder } from '../InputRule.js'\nimport { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule that changes the type of a textblock when the\n * matched text is typed into it. When using a regular expresion you’ll\n * probably want the regexp to start with `^`, so that the pattern can\n * only occur at the start of a textblock.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function textblockTypeInputRule(config: {\n  find: InputRuleFinder\n  type: NodeType\n  getAttributes?:\n    | Record<string, any>\n    | ((match: ExtendedRegExpMatchArray) => Record<string, any>)\n    | false\n    | null\n}) {\n  return new InputRule({\n    find: config.find,\n    handler: ({ state, range, match }) => {\n      const $start = state.doc.resolve(range.from)\n      const attributes = callOrReturn(config.getAttributes, undefined, match) || {}\n\n      if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), config.type)) {\n        return null\n      }\n\n      state.tr\n        .delete(range.from, range.to)\n        .setBlockType(range.from, range.from, config.type, attributes)\n    },\n  })\n}\n","import { InputRule, InputRuleFinder } from '../InputRule.js'\n\n/**\n * Build an input rule that replaces text when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function textInputRule(config: {\n  find: InputRuleFinder,\n  replace: string,\n}) {\n  return new InputRule({\n    find: config.find,\n    handler: ({ state, range, match }) => {\n      let insert = config.replace\n      let start = range.from\n      const end = range.to\n\n      if (match[1]) {\n        const offset = match[0].lastIndexOf(match[1])\n\n        insert += match[0].slice(offset + match[1].length)\n        start += offset\n\n        const cutOff = start - end\n\n        if (cutOff > 0) {\n          insert = match[0].slice(offset - cutOff, offset) + insert\n          start = end\n        }\n      }\n\n      state.tr.insertText(insert, start, end)\n    },\n  })\n}\n","import { Node as ProseMirrorNode, NodeType } from '@tiptap/pm/model'\nimport { canJoin, findWrapping } from '@tiptap/pm/transform'\n\nimport { Editor } from '../Editor.js'\nimport { InputRule, InputRuleFinder } from '../InputRule.js'\nimport { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule for automatically wrapping a textblock when a\n * given string is typed. When using a regular expresion you’ll\n * probably want the regexp to start with `^`, so that the pattern can\n * only occur at the start of a textblock.\n *\n * `type` is the type of node to wrap in.\n *\n * By default, if there’s a node with the same type above the newly\n * wrapped node, the rule will try to join those\n * two nodes. You can pass a join predicate, which takes a regular\n * expression match and the node before the wrapped node, and can\n * return a boolean to indicate whether a join should happen.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function wrappingInputRule(config: {\n  find: InputRuleFinder,\n  type: NodeType,\n  keepMarks?: boolean,\n  keepAttributes?: boolean,\n  editor?: Editor\n  getAttributes?:\n  | Record<string, any>\n  | ((match: ExtendedRegExpMatchArray) => Record<string, any>)\n  | false\n  | null\n  ,\n  joinPredicate?: (match: ExtendedRegExpMatchArray, node: ProseMirrorNode) => boolean,\n}) {\n  return new InputRule({\n    find: config.find,\n    handler: ({\n      state, range, match, chain,\n    }) => {\n      const attributes = callOrReturn(config.getAttributes, undefined, match) || {}\n      const tr = state.tr.delete(range.from, range.to)\n      const $start = tr.doc.resolve(range.from)\n      const blockRange = $start.blockRange()\n      const wrapping = blockRange && findWrapping(blockRange, config.type, attributes)\n\n      if (!wrapping) {\n        return null\n      }\n\n      tr.wrap(blockRange, wrapping)\n\n      if (config.keepMarks && config.editor) {\n        const { selection, storedMarks } = state\n        const { splittableMarks } = config.editor.extensionManager\n        const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n        if (marks) {\n          const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name))\n\n          tr.ensureMarks(filteredMarks)\n        }\n      }\n      if (config.keepAttributes) {\n        /** If the nodeType is `bulletList` or `orderedList` set the `nodeType` as `listItem` */\n        const nodeType = config.type.name === 'bulletList' || config.type.name === 'orderedList' ? 'listItem' : 'taskList'\n\n        chain().updateAttributes(nodeType, attributes).run()\n      }\n\n      const before = tr.doc.resolve(range.from - 1).nodeBefore\n\n      if (\n        before\n        && before.type === config.type\n        && canJoin(tr.doc, range.from - 1)\n        && (!config.joinPredicate || config.joinPredicate(match, before))\n      ) {\n        tr.join(range.from - 1)\n      }\n    },\n  })\n}\n","import {\n  DOMOutputSpec, Node as ProseMirrorNode, NodeSpec, NodeType,\n} from '@tiptap/pm/model'\nimport { Plugin, Transaction } from '@tiptap/pm/state'\n\nimport { Editor } from './Editor.js'\nimport { getExtensionField } from './helpers/getExtensionField.js'\nimport { NodeConfig } from './index.js'\nimport { InputRule } from './InputRule.js'\nimport { Mark } from './Mark.js'\nimport { PasteRule } from './PasteRule.js'\nimport {\n  AnyConfig,\n  Attributes,\n  Extensions,\n  GlobalAttributes,\n  KeyboardShortcutCommand,\n  NodeViewRenderer,\n  ParentConfig,\n  RawCommands,\n} from './types.js'\nimport { callOrReturn } from './utilities/callOrReturn.js'\nimport { mergeDeep } from './utilities/mergeDeep.js'\n\ndeclare module '@tiptap/core' {\n  interface NodeConfig<Options = any, Storage = any> {\n    // @ts-ignore - this is a dynamic key\n    [key: string]: any\n\n    /**\n     * The extension name - this must be unique.\n     * It will be used to identify the extension.\n     *\n     * @example 'myExtension'\n     */\n    name: string\n\n    /**\n     * The priority of your extension. The higher, the earlier it will be called\n     * and will take precedence over other extensions with a lower priority.\n     * @default 100\n     * @example 101\n     */\n    priority?: number\n\n    /**\n     * The default options for this extension.\n     * @example\n     * defaultOptions: {\n     *   myOption: 'foo',\n     *   myOtherOption: 10,\n     * }\n     */\n    defaultOptions?: Options\n\n    /**\n     * This method will add options to this extension\n     * @see https://tiptap.dev/guide/custom-extensions#settings\n     * @example\n     * addOptions() {\n     *  return {\n     *    myOption: 'foo',\n     *    myOtherOption: 10,\n     * }\n     */\n    addOptions?: (this: {\n      name: string\n      parent: Exclude<ParentConfig<NodeConfig<Options, Storage>>['addOptions'], undefined>\n    }) => Options\n\n    /**\n     * The default storage this extension can save data to.\n     * @see https://tiptap.dev/guide/custom-extensions#storage\n     * @example\n     * defaultStorage: {\n     *   prefetchedUsers: [],\n     *   loading: false,\n     * }\n     */\n    addStorage?: (this: {\n      name: string\n      options: Options\n      parent: Exclude<ParentConfig<NodeConfig<Options, Storage>>['addStorage'], undefined>\n    }) => Storage\n\n    /**\n     * This function adds globalAttributes to specific nodes.\n     * @see https://tiptap.dev/guide/custom-extensions#global-attributes\n     * @example\n     * addGlobalAttributes() {\n     *   return [\n     *     {\n             // Extend the following extensions\n     *       types: [\n     *         'heading',\n     *         'paragraph',\n     *       ],\n     *       // … with those attributes\n     *       attributes: {\n     *         textAlign: {\n     *           default: 'left',\n     *           renderHTML: attributes => ({\n     *             style: `text-align: ${attributes.textAlign}`,\n     *           }),\n     *           parseHTML: element => element.style.textAlign || 'left',\n     *         },\n     *       },\n     *     },\n     *   ]\n     * }\n     */\n    addGlobalAttributes?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      extensions: (Node | Mark)[]\n      parent: ParentConfig<NodeConfig<Options, Storage>>['addGlobalAttributes']\n    }) => GlobalAttributes\n\n    /**\n     * This function adds commands to the editor\n     * @see https://tiptap.dev/guide/custom-extensions#keyboard-shortcuts\n     * @example\n     * addCommands() {\n     *   return {\n     *     myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(),\n     *   }\n     * }\n     */\n    addCommands?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      type: NodeType\n      parent: ParentConfig<NodeConfig<Options, Storage>>['addCommands']\n    }) => Partial<RawCommands>\n\n    /**\n     * This function registers keyboard shortcuts.\n     * @see https://tiptap.dev/guide/custom-extensions#keyboard-shortcuts\n     * @example\n     * addKeyboardShortcuts() {\n     *   return {\n     *     'Mod-l': () => this.editor.commands.toggleBulletList(),\n     *   }\n     * },\n     */\n    addKeyboardShortcuts?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      type: NodeType\n      parent: ParentConfig<NodeConfig<Options, Storage>>['addKeyboardShortcuts']\n    }) => {\n      [key: string]: KeyboardShortcutCommand\n    }\n\n    /**\n     * This function adds input rules to the editor.\n     * @see https://tiptap.dev/guide/custom-extensions#input-rules\n     * @example\n     * addInputRules() {\n     *   return [\n     *     markInputRule({\n     *       find: inputRegex,\n     *       type: this.type,\n     *     }),\n     *   ]\n     * },\n     */\n    addInputRules?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      type: NodeType\n      parent: ParentConfig<NodeConfig<Options, Storage>>['addInputRules']\n    }) => InputRule[]\n\n    /**\n     * This function adds paste rules to the editor.\n     * @see https://tiptap.dev/guide/custom-extensions#paste-rules\n     * @example\n     * addPasteRules() {\n     *   return [\n     *     markPasteRule({\n     *       find: pasteRegex,\n     *       type: this.type,\n     *     }),\n     *   ]\n     * },\n     */\n    addPasteRules?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      type: NodeType\n      parent: ParentConfig<NodeConfig<Options, Storage>>['addPasteRules']\n    }) => PasteRule[]\n\n    /**\n     * This function adds Prosemirror plugins to the editor\n     * @see https://tiptap.dev/guide/custom-extensions#prosemirror-plugins\n     * @example\n     * addProseMirrorPlugins() {\n     *   return [\n     *     customPlugin(),\n     *   ]\n     * }\n     */\n    addProseMirrorPlugins?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      editor: Editor\n      type: NodeType\n      parent: ParentConfig<NodeConfig<Options, Storage>>['addProseMirrorPlugins']\n    }) => Plugin[]\n\n    /**\n     * This function adds additional extensions to the editor. This is useful for\n     * building extension kits.\n     * @example\n     * addExtensions() {\n     *   return [\n     *     BulletList,\n     *     OrderedList,\n     *     ListItem\n     *   ]\n     * }\n     */\n    addExtensions?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      parent: ParentConfig<NodeConfig<Options, Storage>>['addExtensions']\n    }) => Extensions\n\n    /**\n     * This function extends the schema of the node.\n     * @example\n     * extendNodeSchema() {\n     *   return {\n     *     group: 'inline',\n     *     selectable: false,\n     *   }\n     * }\n     */\n    extendNodeSchema?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            parent: ParentConfig<NodeConfig<Options, Storage>>['extendNodeSchema']\n          },\n          extension: Node,\n        ) => Record<string, any>)\n      | null\n\n    /**\n     * This function extends the schema of the mark.\n     * @example\n     * extendMarkSchema() {\n     *   return {\n     *     group: 'inline',\n     *     selectable: false,\n     *   }\n     * }\n     */\n    extendMarkSchema?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            parent: ParentConfig<NodeConfig<Options, Storage>>['extendMarkSchema']\n            editor?: Editor\n          },\n          extension: Node,\n        ) => Record<string, any>)\n      | null\n\n    /**\n     * The editor is not ready yet.\n     */\n    onBeforeCreate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: NodeType\n          parent: ParentConfig<NodeConfig<Options, Storage>>['onBeforeCreate']\n        }) => void)\n      | null\n\n    /**\n     * The editor is ready.\n     */\n    onCreate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: NodeType\n          parent: ParentConfig<NodeConfig<Options, Storage>>['onCreate']\n        }) => void)\n      | null\n\n    /**\n     * The content has changed.\n     */\n    onUpdate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: NodeType\n          parent: ParentConfig<NodeConfig<Options, Storage>>['onUpdate']\n        }) => void)\n      | null\n\n    /**\n     * The selection has changed.\n     */\n    onSelectionUpdate?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: NodeType\n          parent: ParentConfig<NodeConfig<Options, Storage>>['onSelectionUpdate']\n        }) => void)\n      | null\n\n    /**\n     * The editor state has changed.\n     */\n    onTransaction?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            editor: Editor\n            type: NodeType\n            parent: ParentConfig<NodeConfig<Options, Storage>>['onTransaction']\n          },\n          props: {\n            editor: Editor\n            transaction: Transaction\n          },\n        ) => void)\n      | null\n\n    /**\n     * The editor is focused.\n     */\n    onFocus?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            editor: Editor\n            type: NodeType\n            parent: ParentConfig<NodeConfig<Options, Storage>>['onFocus']\n          },\n          props: {\n            event: FocusEvent\n          },\n        ) => void)\n      | null\n\n    /**\n     * The editor isn’t focused anymore.\n     */\n    onBlur?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            editor: Editor\n            type: NodeType\n            parent: ParentConfig<NodeConfig<Options, Storage>>['onBlur']\n          },\n          props: {\n            event: FocusEvent\n          },\n        ) => void)\n      | null\n\n    /**\n     * The editor is destroyed.\n     */\n    onDestroy?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: NodeType\n          parent: ParentConfig<NodeConfig<Options, Storage>>['onDestroy']\n        }) => void)\n      | null\n\n    /**\n     * Node View\n     */\n    addNodeView?:\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          editor: Editor\n          type: NodeType\n          parent: ParentConfig<NodeConfig<Options, Storage>>['addNodeView']\n        }) => NodeViewRenderer)\n      | null\n\n    /**\n     * Defines if this node should be a top level node (doc)\n     * @default false\n     * @example true\n     */\n    topNode?: boolean\n\n    /**\n     * The content expression for this node, as described in the [schema\n     * guide](/docs/guide/#schema.content_expressions). When not given,\n     * the node does not allow any content.\n     *\n     * You can read more about it on the Prosemirror documentation here\n     * @see https://prosemirror.net/docs/guide/#schema.content_expressions\n     * @default undefined\n     * @example content: 'block+'\n     * @example content: 'headline paragraph block*'\n     */\n    content?:\n      | NodeSpec['content']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['content']\n          editor?: Editor\n        }) => NodeSpec['content'])\n\n    /**\n     * The marks that are allowed inside of this node. May be a\n     * space-separated string referring to mark names or groups, `\"_\"`\n     * to explicitly allow all marks, or `\"\"` to disallow marks. When\n     * not given, nodes with inline content default to allowing all\n     * marks, other nodes default to not allowing marks.\n     *\n     * @example marks: 'strong em'\n     */\n    marks?:\n      | NodeSpec['marks']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['marks']\n          editor?: Editor\n        }) => NodeSpec['marks'])\n\n    /**\n     * The group or space-separated groups to which this node belongs,\n     * which can be referred to in the content expressions for the\n     * schema.\n     *\n     * By default Tiptap uses the groups 'block' and 'inline' for nodes. You\n     * can also use custom groups if you want to group specific nodes together\n     * and handle them in your schema.\n     * @example group: 'block'\n     * @example group: 'inline'\n     * @example group: 'customBlock' // this uses a custom group\n     */\n    group?:\n      | NodeSpec['group']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['group']\n          editor?: Editor\n        }) => NodeSpec['group'])\n\n    /**\n     * Should be set to true for inline nodes. (Implied for text nodes.)\n     */\n    inline?:\n      | NodeSpec['inline']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['inline']\n          editor?: Editor\n        }) => NodeSpec['inline'])\n\n    /**\n     * Can be set to true to indicate that, though this isn't a [leaf\n     * node](https://prosemirror.net/docs/ref/#model.NodeType.isLeaf), it doesn't have directly editable\n     * content and should be treated as a single unit in the view.\n     *\n     * @example atom: true\n     */\n    atom?:\n      | NodeSpec['atom']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['atom']\n          editor?: Editor\n        }) => NodeSpec['atom'])\n\n    /**\n     * Controls whether nodes of this type can be selected as a [node\n     * selection](https://prosemirror.net/docs/ref/#state.NodeSelection). Defaults to true for non-text\n     * nodes.\n     *\n     * @default true\n     * @example selectable: false\n     */\n    selectable?:\n      | NodeSpec['selectable']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['selectable']\n          editor?: Editor\n        }) => NodeSpec['selectable'])\n\n    /**\n     * Determines whether nodes of this type can be dragged without\n     * being selected. Defaults to false.\n     *\n     * @default: false\n     * @example: draggable: true\n     */\n    draggable?:\n      | NodeSpec['draggable']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['draggable']\n          editor?: Editor\n        }) => NodeSpec['draggable'])\n\n    /**\n     * Can be used to indicate that this node contains code, which\n     * causes some commands to behave differently.\n     */\n    code?:\n      | NodeSpec['code']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['code']\n          editor?: Editor\n        }) => NodeSpec['code'])\n\n    /**\n     * Controls way whitespace in this a node is parsed. The default is\n     * `\"normal\"`, which causes the [DOM parser](https://prosemirror.net/docs/ref/#model.DOMParser) to\n     * collapse whitespace in normal mode, and normalize it (replacing\n     * newlines and such with spaces) otherwise. `\"pre\"` causes the\n     * parser to preserve spaces inside the node. When this option isn't\n     * given, but [`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) is true, `whitespace`\n     * will default to `\"pre\"`. Note that this option doesn't influence\n     * the way the node is rendered—that should be handled by `toDOM`\n     * and/or styling.\n     */\n    whitespace?:\n      | NodeSpec['whitespace']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['whitespace']\n          editor?: Editor\n        }) => NodeSpec['whitespace'])\n\n    /**\n     * Allows a **single** node to be set as linebreak equivalent (e.g. hardBreak).\n     * When converting between block types that have whitespace set to \"pre\"\n     * and don't support the linebreak node (e.g. codeBlock) and other block types\n     * that do support the linebreak node (e.g. paragraphs) - this node will be used\n     * as the linebreak instead of stripping the newline.\n     *\n     * See [linebreakReplacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement).\n     */\n    linebreakReplacement?:\n      | NodeSpec['linebreakReplacement']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['linebreakReplacement']\n          editor?: Editor\n        }) => NodeSpec['linebreakReplacement'])\n\n    /**\n     * When enabled, enables both\n     * [`definingAsContext`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext) and\n     * [`definingForContent`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).\n     *\n     * @default false\n     * @example isolating: true\n     */\n    defining?:\n      | NodeSpec['defining']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['defining']\n          editor?: Editor\n        }) => NodeSpec['defining'])\n\n    /**\n     * When enabled (default is false), the sides of nodes of this type\n     * count as boundaries that regular editing operations, like\n     * backspacing or lifting, won't cross. An example of a node that\n     * should probably have this enabled is a table cell.\n     */\n    isolating?:\n      | NodeSpec['isolating']\n      | ((this: {\n          name: string\n          options: Options\n          storage: Storage\n          parent: ParentConfig<NodeConfig<Options, Storage>>['isolating']\n          editor?: Editor\n        }) => NodeSpec['isolating'])\n\n    /**\n     * Associates DOM parser information with this node, which can be\n     * used by [`DOMParser.fromSchema`](https://prosemirror.net/docs/ref/#model.DOMParser^fromSchema) to\n     * automatically derive a parser. The `node` field in the rules is\n     * implied (the name of this node will be filled in automatically).\n     * If you supply your own parser, you do not need to also specify\n     * parsing rules in your schema.\n     *\n     * @example parseHTML: [{ tag: 'div', attrs: { 'data-id': 'my-block' } }]\n     */\n    parseHTML?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      parent: ParentConfig<NodeConfig<Options, Storage>>['parseHTML']\n      editor?: Editor\n    }) => NodeSpec['parseDOM']\n\n    /**\n     * A description of a DOM structure. Can be either a string, which is\n     * interpreted as a text node, a DOM node, which is interpreted as\n     * itself, a `{dom, contentDOM}` object, or an array.\n     *\n     * An array describes a DOM element. The first value in the array\n     * should be a string—the name of the DOM element, optionally prefixed\n     * by a namespace URL and a space. If the second element is plain\n     * object, it is interpreted as a set of attributes for the element.\n     * Any elements after that (including the 2nd if it's not an attribute\n     * object) are interpreted as children of the DOM elements, and must\n     * either be valid `DOMOutputSpec` values, or the number zero.\n     *\n     * The number zero (pronounced “hole”) is used to indicate the place\n     * where a node's child nodes should be inserted. If it occurs in an\n     * output spec, it should be the only child element in its parent\n     * node.\n     *\n     * @example toDOM: ['div[data-id=\"my-block\"]', { class: 'my-block' }, 0]\n     */\n    renderHTML?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            parent: ParentConfig<NodeConfig<Options, Storage>>['renderHTML']\n            editor?: Editor\n          },\n          props: {\n            node: ProseMirrorNode\n            HTMLAttributes: Record<string, any>\n          },\n        ) => DOMOutputSpec)\n      | null\n\n    /**\n     * renders the node as text\n     * @example renderText: () => 'foo\n     */\n    renderText?:\n      | ((\n          this: {\n            name: string\n            options: Options\n            storage: Storage\n            parent: ParentConfig<NodeConfig<Options, Storage>>['renderText']\n            editor?: Editor\n          },\n          props: {\n            node: ProseMirrorNode\n            pos: number\n            parent: ProseMirrorNode\n            index: number\n          },\n        ) => string)\n      | null\n\n    /**\n     * Add attributes to the node\n     * @example addAttributes: () => ({ class: 'foo' })\n     */\n    addAttributes?: (this: {\n      name: string\n      options: Options\n      storage: Storage\n      parent: ParentConfig<NodeConfig<Options, Storage>>['addAttributes']\n      editor?: Editor\n    // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n    }) => Attributes | {}\n  }\n}\n\n/**\n * The Node class is used to create custom node extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nexport class Node<Options = any, Storage = any> {\n  type = 'node'\n\n  name = 'node'\n\n  parent: Node | null = null\n\n  child: Node | null = null\n\n  options: Options\n\n  storage: Storage\n\n  config: NodeConfig = {\n    name: this.name,\n    defaultOptions: {},\n  }\n\n  constructor(config: Partial<NodeConfig<Options, Storage>> = {}) {\n    this.config = {\n      ...this.config,\n      ...config,\n    }\n\n    this.name = this.config.name\n\n    if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) {\n      console.warn(\n        `[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${this.name}\".`,\n      )\n    }\n\n    // TODO: remove `addOptions` fallback\n    this.options = this.config.defaultOptions\n\n    if (this.config.addOptions) {\n      this.options = callOrReturn(\n        getExtensionField<AnyConfig['addOptions']>(this, 'addOptions', {\n          name: this.name,\n        }),\n      )\n    }\n\n    this.storage = callOrReturn(\n      getExtensionField<AnyConfig['addStorage']>(this, 'addStorage', {\n        name: this.name,\n        options: this.options,\n      }),\n    ) || {}\n  }\n\n  static create<O = any, S = any>(config: Partial<NodeConfig<O, S>> = {}) {\n    return new Node<O, S>(config)\n  }\n\n  configure(options: Partial<Options> = {}) {\n    // return a new instance so we can use the same extension\n    // with different calls of `configure`\n    const extension = this.extend<Options, Storage>({\n      ...this.config,\n      addOptions: () => {\n        return mergeDeep(this.options as Record<string, any>, options) as Options\n      },\n    })\n\n    // Always preserve the current name\n    extension.name = this.name\n    // Set the parent to be our parent\n    extension.parent = this.parent\n\n    return extension\n  }\n\n  extend<ExtendedOptions = Options, ExtendedStorage = Storage>(\n    extendedConfig: Partial<NodeConfig<ExtendedOptions, ExtendedStorage>> = {},\n  ) {\n    const extension = new Node<ExtendedOptions, ExtendedStorage>(extendedConfig)\n\n    extension.parent = this\n\n    this.child = extension\n\n    extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name\n\n    if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) {\n      console.warn(\n        `[tiptap warn]: BREAKING CHANGE: \"defaultOptions\" is deprecated. Please use \"addOptions\" instead. Found in extension: \"${extension.name}\".`,\n      )\n    }\n\n    extension.options = callOrReturn(\n      getExtensionField<AnyConfig['addOptions']>(extension, 'addOptions', {\n        name: extension.name,\n      }),\n    )\n\n    extension.storage = callOrReturn(\n      getExtensionField<AnyConfig['addStorage']>(extension, 'addStorage', {\n        name: extension.name,\n        options: extension.options,\n      }),\n    )\n\n    return extension\n  }\n}\n","import { NodeSelection } from '@tiptap/pm/state'\nimport { NodeView as ProseMirrorNodeView, ViewMutationRecord } from '@tiptap/pm/view'\n\nimport { Editor as CoreEditor } from './Editor.js'\nimport { DecorationWithType, NodeViewRendererOptions, NodeViewRendererProps } from './types.js'\nimport { isAndroid } from './utilities/isAndroid.js'\nimport { isiOS } from './utilities/isiOS.js'\n\n/**\n * Node views are used to customize the rendered DOM structure of a node.\n * @see https://tiptap.dev/guide/node-views\n */\nexport class NodeView<\n  Component,\n  NodeEditor extends CoreEditor = CoreEditor,\n  Options extends NodeViewRendererOptions = NodeViewRendererOptions,\n> implements ProseMirrorNodeView {\n  component: Component\n\n  editor: NodeEditor\n\n  options: Options\n\n  extension: NodeViewRendererProps['extension']\n\n  node: NodeViewRendererProps['node']\n\n  decorations: NodeViewRendererProps['decorations']\n\n  innerDecorations: NodeViewRendererProps['innerDecorations']\n\n  view: NodeViewRendererProps['view']\n\n  getPos: NodeViewRendererProps['getPos']\n\n  HTMLAttributes: NodeViewRendererProps['HTMLAttributes']\n\n  isDragging = false\n\n  constructor(component: Component, props: NodeViewRendererProps, options?: Partial<Options>) {\n    this.component = component\n    this.editor = props.editor as NodeEditor\n    this.options = {\n      stopEvent: null,\n      ignoreMutation: null,\n      ...options,\n    } as Options\n    this.extension = props.extension\n    this.node = props.node\n    this.decorations = props.decorations as DecorationWithType[]\n    this.innerDecorations = props.innerDecorations\n    this.view = props.view\n    this.HTMLAttributes = props.HTMLAttributes\n    this.getPos = props.getPos\n    this.mount()\n  }\n\n  mount() {\n    // eslint-disable-next-line\n    return\n  }\n\n  get dom(): HTMLElement {\n    return this.editor.view.dom as HTMLElement\n  }\n\n  get contentDOM(): HTMLElement | null {\n    return null\n  }\n\n  onDragStart(event: DragEvent) {\n    const { view } = this.editor\n    const target = event.target as HTMLElement\n\n    // get the drag handle element\n    // `closest` is not available for text nodes so we may have to use its parent\n    const dragHandle = target.nodeType === 3\n      ? target.parentElement?.closest('[data-drag-handle]')\n      : target.closest('[data-drag-handle]')\n\n    if (!this.dom || this.contentDOM?.contains(target) || !dragHandle) {\n      return\n    }\n\n    let x = 0\n    let y = 0\n\n    // calculate offset for drag element if we use a different drag handle element\n    if (this.dom !== dragHandle) {\n      const domBox = this.dom.getBoundingClientRect()\n      const handleBox = dragHandle.getBoundingClientRect()\n\n      // In React, we have to go through nativeEvent to reach offsetX/offsetY.\n      const offsetX = event.offsetX ?? (event as any).nativeEvent?.offsetX\n      const offsetY = event.offsetY ?? (event as any).nativeEvent?.offsetY\n\n      x = handleBox.x - domBox.x + offsetX\n      y = handleBox.y - domBox.y + offsetY\n    }\n\n    const clonedNode = this.dom.cloneNode(true) as HTMLElement\n\n    event.dataTransfer?.setDragImage(clonedNode, x, y)\n\n    const pos = this.getPos()\n\n    if (typeof pos !== 'number') {\n      return\n    }\n    // we need to tell ProseMirror that we want to move the whole node\n    // so we create a NodeSelection\n    const selection = NodeSelection.create(view.state.doc, pos)\n    const transaction = view.state.tr.setSelection(selection)\n\n    view.dispatch(transaction)\n  }\n\n  stopEvent(event: Event) {\n    if (!this.dom) {\n      return false\n    }\n\n    if (typeof this.options.stopEvent === 'function') {\n      return this.options.stopEvent({ event })\n    }\n\n    const target = event.target as HTMLElement\n    const isInElement = this.dom.contains(target) && !this.contentDOM?.contains(target)\n\n    // any event from child nodes should be handled by ProseMirror\n    if (!isInElement) {\n      return false\n    }\n\n    const isDragEvent = event.type.startsWith('drag')\n    const isDropEvent = event.type === 'drop'\n    const isInput = ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA'].includes(target.tagName) || target.isContentEditable\n\n    // any input event within node views should be ignored by ProseMirror\n    if (isInput && !isDropEvent && !isDragEvent) {\n      return true\n    }\n\n    const { isEditable } = this.editor\n    const { isDragging } = this\n    const isDraggable = !!this.node.type.spec.draggable\n    const isSelectable = NodeSelection.isSelectable(this.node)\n    const isCopyEvent = event.type === 'copy'\n    const isPasteEvent = event.type === 'paste'\n    const isCutEvent = event.type === 'cut'\n    const isClickEvent = event.type === 'mousedown'\n\n    // ProseMirror tries to drag selectable nodes\n    // even if `draggable` is set to `false`\n    // this fix prevents that\n    if (!isDraggable && isSelectable && isDragEvent && event.target === this.dom) {\n      event.preventDefault()\n    }\n\n    if (isDraggable && isDragEvent && !isDragging && event.target === this.dom) {\n      event.preventDefault()\n      return false\n    }\n\n    // we have to store that dragging started\n    if (isDraggable && isEditable && !isDragging && isClickEvent) {\n      const dragHandle = target.closest('[data-drag-handle]')\n      const isValidDragHandle = dragHandle && (this.dom === dragHandle || this.dom.contains(dragHandle))\n\n      if (isValidDragHandle) {\n        this.isDragging = true\n\n        document.addEventListener(\n          'dragend',\n          () => {\n            this.isDragging = false\n          },\n          { once: true },\n        )\n\n        document.addEventListener(\n          'drop',\n          () => {\n            this.isDragging = false\n          },\n          { once: true },\n        )\n\n        document.addEventListener(\n          'mouseup',\n          () => {\n            this.isDragging = false\n          },\n          { once: true },\n        )\n      }\n    }\n\n    // these events are handled by prosemirror\n    if (\n      isDragging\n      || isDropEvent\n      || isCopyEvent\n      || isPasteEvent\n      || isCutEvent\n      || (isClickEvent && isSelectable)\n    ) {\n      return false\n    }\n\n    return true\n  }\n\n  /**\n   * Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view.\n   * @return `false` if the editor should re-read the selection or re-parse the range around the mutation\n   * @return `true` if it can safely be ignored.\n   */\n  ignoreMutation(mutation: ViewMutationRecord) {\n    if (!this.dom || !this.contentDOM) {\n      return true\n    }\n\n    if (typeof this.options.ignoreMutation === 'function') {\n      return this.options.ignoreMutation({ mutation })\n    }\n\n    // a leaf/atom node is like a black box for ProseMirror\n    // and should be fully handled by the node view\n    if (this.node.isLeaf || this.node.isAtom) {\n      return true\n    }\n\n    // ProseMirror should handle any selections\n    if (mutation.type === 'selection') {\n      return false\n    }\n\n    // try to prevent a bug on iOS and Android that will break node views on enter\n    // this is because ProseMirror can’t preventDispatch on enter\n    // this will lead to a re-render of the node view on enter\n    // see: https://github.com/ueberdosis/tiptap/issues/1214\n    // see: https://github.com/ueberdosis/tiptap/issues/2534\n    if (\n      this.dom.contains(mutation.target)\n      && mutation.type === 'childList'\n      && (isiOS() || isAndroid())\n      && this.editor.isFocused\n    ) {\n      const changedNodes = [\n        ...Array.from(mutation.addedNodes),\n        ...Array.from(mutation.removedNodes),\n      ] as HTMLElement[]\n\n      // we’ll check if every changed node is contentEditable\n      // to make sure it’s probably mutated by ProseMirror\n      if (changedNodes.every(node => node.isContentEditable)) {\n        return false\n      }\n    }\n\n    // we will allow mutation contentDOM with attributes\n    // so we can for example adding classes within our node view\n    if (this.contentDOM === mutation.target && mutation.type === 'attributes') {\n      return true\n    }\n\n    // ProseMirror should handle any changes within contentDOM\n    if (this.contentDOM.contains(mutation.target)) {\n      return false\n    }\n\n    return true\n  }\n\n  /**\n   * Update the attributes of the prosemirror node.\n   */\n  updateAttributes(attributes: Record<string, any>): void {\n    this.editor.commands.command(({ tr }) => {\n      const pos = this.getPos()\n\n      if (typeof pos !== 'number') {\n        return false\n      }\n\n      tr.setNodeMarkup(pos, undefined, {\n        ...this.node.attrs,\n        ...attributes,\n      })\n\n      return true\n    })\n  }\n\n  /**\n   * Delete the node.\n   */\n  deleteNode(): void {\n    const from = this.getPos()\n\n    if (typeof from !== 'number') {\n      return\n    }\n    const to = from + this.node.nodeSize\n\n    this.editor.commands.deleteRange({ from, to })\n  }\n}\n","import { MarkType } from '@tiptap/pm/model'\n\nimport { getMarksBetween } from '../helpers/getMarksBetween.js'\nimport { PasteRule, PasteRuleFinder } from '../PasteRule.js'\nimport { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an paste rule that adds a mark when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nexport function markPasteRule(config: {\n  find: PasteRuleFinder\n  type: MarkType\n  getAttributes?:\n    | Record<string, any>\n    | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record<string, any>)\n    | false\n    | null\n}) {\n  return new PasteRule({\n    find: config.find,\n    handler: ({\n      state, range, match, pasteEvent,\n    }) => {\n      const attributes = callOrReturn(config.getAttributes, undefined, match, pasteEvent)\n\n      if (attributes === false || attributes === null) {\n        return null\n      }\n\n      const { tr } = state\n      const captureGroup = match[match.length - 1]\n      const fullMatch = match[0]\n      let markEnd = range.to\n\n      if (captureGroup) {\n        const startSpaces = fullMatch.search(/\\S/)\n        const textStart = range.from + fullMatch.indexOf(captureGroup)\n        const textEnd = textStart + captureGroup.length\n\n        const excludedMarks = getMarksBetween(range.from, range.to, state.doc)\n          .filter(item => {\n            // @ts-ignore\n            const excluded = item.mark.type.excluded as MarkType[]\n\n            return excluded.find(type => type === config.type && type !== item.mark.type)\n          })\n          .filter(item => item.to > textStart)\n\n        if (excludedMarks.length) {\n          return null\n        }\n\n        if (textEnd < range.to) {\n          tr.delete(textEnd, range.to)\n        }\n\n        if (textStart > range.from) {\n          tr.delete(range.from + startSpaces, textStart)\n        }\n\n        markEnd = range.from + startSpaces + captureGroup.length\n\n        tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {}))\n\n        tr.removeStoredMark(config.type)\n      }\n    },\n  })\n}\n","import type { NodeType } from '@tiptap/pm/model'\nimport { type EditorState, NodeSelection } from '@tiptap/pm/state'\n\nexport function canInsertNode(state: EditorState, nodeType: NodeType): boolean {\n  const { selection } = state\n  const { $from } = selection\n\n  // Special handling for NodeSelection\n  if (selection instanceof NodeSelection) {\n    const index = $from.index()\n    const parent = $from.parent\n\n    // Can we replace the selected node with the horizontal rule?\n    return parent.canReplaceWith(index, index + 1, nodeType)\n  }\n\n  // Default: check if we can insert at the current position\n  let depth = $from.depth\n\n  while (depth >= 0) {\n    const index = $from.index(depth)\n    const parent = $from.node(depth)\n    const match = parent.contentMatchAt(index)\n\n    if (match.matchType(nodeType)) {\n      return true\n    }\n    depth -= 1\n  }\n  return false\n}\n","// source: https://stackoverflow.com/a/6969486\nexport function escapeForRegEx(string: string): string {\n  return string.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&')\n}\n","export function isString(value: any): value is string {\n  return typeof value === 'string'\n}\n","import { NodeType } from '@tiptap/pm/model'\n\nimport { PasteRule, PasteRuleFinder } from '../PasteRule.js'\nimport { ExtendedRegExpMatchArray, JSONContent } from '../types.js'\nimport { callOrReturn } from '../utilities/index.js'\n\n/**\n * Build an paste rule that adds a node when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nexport function nodePasteRule(config: {\n  find: PasteRuleFinder\n  type: NodeType\n  getAttributes?:\n    | Record<string, any>\n    | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record<string, any>)\n    | false\n    | null\n  getContent?:\n    | JSONContent[]\n    | ((attrs: Record<string, any>) => JSONContent[])\n    | false\n    | null\n}) {\n  return new PasteRule({\n    find: config.find,\n    handler({\n      match, chain, range, pasteEvent,\n    }) {\n      const attributes = callOrReturn(config.getAttributes, undefined, match, pasteEvent)\n      const content = callOrReturn(config.getContent, undefined, attributes)\n\n      if (attributes === false || attributes === null) {\n        return null\n      }\n\n      const node = { type: config.type.name, attrs: attributes } as JSONContent\n\n      if (content) {\n        node.content = content\n      }\n\n      if (match.input) {\n        chain().deleteRange(range).insertContentAt(range.from, node)\n      }\n    },\n  })\n}\n","import { PasteRule, PasteRuleFinder } from '../PasteRule.js'\n\n/**\n * Build an paste rule that replaces text when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nexport function textPasteRule(config: {\n  find: PasteRuleFinder,\n  replace: string,\n}) {\n  return new PasteRule({\n    find: config.find,\n    handler: ({ state, range, match }) => {\n      let insert = config.replace\n      let start = range.from\n      const end = range.to\n\n      if (match[1]) {\n        const offset = match[0].lastIndexOf(match[1])\n\n        insert += match[0].slice(offset + match[1].length)\n        start += offset\n\n        const cutOff = start - end\n\n        if (cutOff > 0) {\n          insert = match[0].slice(offset - cutOff, offset) + insert\n          start = end\n        }\n      }\n\n      state.tr.insertText(insert, start, end)\n    },\n  })\n}\n","import { Transaction } from '@tiptap/pm/state'\n\nexport interface TrackerResult {\n  position: number\n  deleted: boolean\n}\n\nexport class Tracker {\n  transaction: Transaction\n\n  currentStep: number\n\n  constructor(transaction: Transaction) {\n    this.transaction = transaction\n    this.currentStep = this.transaction.steps.length\n  }\n\n  map(position: number): TrackerResult {\n    let deleted = false\n\n    const mappedPosition = this.transaction.steps\n      .slice(this.currentStep)\n      .reduce((newPosition, step) => {\n        const mapResult = step.getMap().mapResult(newPosition)\n\n        if (mapResult.deleted) {\n          deleted = true\n        }\n\n        return mapResult.pos\n      }, position)\n\n    return {\n      position: mappedPosition,\n      deleted,\n    }\n  }\n}\n","// state/index.ts\nexport * from \"prosemirror-state\";\n","import { Slice, Fragment, Mark, Node } from 'prosemirror-model';\nimport { ReplaceStep, ReplaceAroundStep, Transform } from 'prosemirror-transform';\n\nconst classesById = Object.create(null);\n/**\nSuperclass for editor selections. Every selection type should\nextend this. Should not be instantiated directly.\n*/\nclass Selection {\n    /**\n    Initialize a selection with the head and anchor and ranges. If no\n    ranges are given, constructs a single range across `$anchor` and\n    `$head`.\n    */\n    constructor(\n    /**\n    The resolved anchor of the selection (the side that stays in\n    place when the selection is modified).\n    */\n    $anchor, \n    /**\n    The resolved head of the selection (the side that moves when\n    the selection is modified).\n    */\n    $head, ranges) {\n        this.$anchor = $anchor;\n        this.$head = $head;\n        this.ranges = ranges || [new SelectionRange($anchor.min($head), $anchor.max($head))];\n    }\n    /**\n    The selection's anchor, as an unresolved position.\n    */\n    get anchor() { return this.$anchor.pos; }\n    /**\n    The selection's head.\n    */\n    get head() { return this.$head.pos; }\n    /**\n    The lower bound of the selection's main range.\n    */\n    get from() { return this.$from.pos; }\n    /**\n    The upper bound of the selection's main range.\n    */\n    get to() { return this.$to.pos; }\n    /**\n    The resolved lower  bound of the selection's main range.\n    */\n    get $from() {\n        return this.ranges[0].$from;\n    }\n    /**\n    The resolved upper bound of the selection's main range.\n    */\n    get $to() {\n        return this.ranges[0].$to;\n    }\n    /**\n    Indicates whether the selection contains any content.\n    */\n    get empty() {\n        let ranges = this.ranges;\n        for (let i = 0; i < ranges.length; i++)\n            if (ranges[i].$from.pos != ranges[i].$to.pos)\n                return false;\n        return true;\n    }\n    /**\n    Get the content of this selection as a slice.\n    */\n    content() {\n        return this.$from.doc.slice(this.from, this.to, true);\n    }\n    /**\n    Replace the selection with a slice or, if no slice is given,\n    delete the selection. Will append to the given transaction.\n    */\n    replace(tr, content = Slice.empty) {\n        // Put the new selection at the position after the inserted\n        // content. When that ended in an inline node, search backwards,\n        // to get the position after that node. If not, search forward.\n        let lastNode = content.content.lastChild, lastParent = null;\n        for (let i = 0; i < content.openEnd; i++) {\n            lastParent = lastNode;\n            lastNode = lastNode.lastChild;\n        }\n        let mapFrom = tr.steps.length, ranges = this.ranges;\n        for (let i = 0; i < ranges.length; i++) {\n            let { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom);\n            tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), i ? Slice.empty : content);\n            if (i == 0)\n                selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1);\n        }\n    }\n    /**\n    Replace the selection with the given node, appending the changes\n    to the given transaction.\n    */\n    replaceWith(tr, node) {\n        let mapFrom = tr.steps.length, ranges = this.ranges;\n        for (let i = 0; i < ranges.length; i++) {\n            let { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom);\n            let from = mapping.map($from.pos), to = mapping.map($to.pos);\n            if (i) {\n                tr.deleteRange(from, to);\n            }\n            else {\n                tr.replaceRangeWith(from, to, node);\n                selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1);\n            }\n        }\n    }\n    /**\n    Find a valid cursor or leaf node selection starting at the given\n    position and searching back if `dir` is negative, and forward if\n    positive. When `textOnly` is true, only consider cursor\n    selections. Will return null when no valid selection position is\n    found.\n    */\n    static findFrom($pos, dir, textOnly = false) {\n        let inner = $pos.parent.inlineContent ? new TextSelection($pos)\n            : findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly);\n        if (inner)\n            return inner;\n        for (let depth = $pos.depth - 1; depth >= 0; depth--) {\n            let found = dir < 0\n                ? findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly)\n                : findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly);\n            if (found)\n                return found;\n        }\n        return null;\n    }\n    /**\n    Find a valid cursor or leaf node selection near the given\n    position. Searches forward first by default, but if `bias` is\n    negative, it will search backwards first.\n    */\n    static near($pos, bias = 1) {\n        return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new AllSelection($pos.node(0));\n    }\n    /**\n    Find the cursor or leaf node selection closest to the start of\n    the given document. Will return an\n    [`AllSelection`](https://prosemirror.net/docs/ref/#state.AllSelection) if no valid position\n    exists.\n    */\n    static atStart(doc) {\n        return findSelectionIn(doc, doc, 0, 0, 1) || new AllSelection(doc);\n    }\n    /**\n    Find the cursor or leaf node selection closest to the end of the\n    given document.\n    */\n    static atEnd(doc) {\n        return findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new AllSelection(doc);\n    }\n    /**\n    Deserialize the JSON representation of a selection. Must be\n    implemented for custom classes (as a static class method).\n    */\n    static fromJSON(doc, json) {\n        if (!json || !json.type)\n            throw new RangeError(\"Invalid input for Selection.fromJSON\");\n        let cls = classesById[json.type];\n        if (!cls)\n            throw new RangeError(`No selection type ${json.type} defined`);\n        return cls.fromJSON(doc, json);\n    }\n    /**\n    To be able to deserialize selections from JSON, custom selection\n    classes must register themselves with an ID string, so that they\n    can be disambiguated. Try to pick something that's unlikely to\n    clash with classes from other modules.\n    */\n    static jsonID(id, selectionClass) {\n        if (id in classesById)\n            throw new RangeError(\"Duplicate use of selection JSON ID \" + id);\n        classesById[id] = selectionClass;\n        selectionClass.prototype.jsonID = id;\n        return selectionClass;\n    }\n    /**\n    Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,\n    which is a value that can be mapped without having access to a\n    current document, and later resolved to a real selection for a\n    given document again. (This is used mostly by the history to\n    track and restore old selections.) The default implementation of\n    this method just converts the selection to a text selection and\n    returns the bookmark for that.\n    */\n    getBookmark() {\n        return TextSelection.between(this.$anchor, this.$head).getBookmark();\n    }\n}\nSelection.prototype.visible = true;\n/**\nRepresents a selected range in a document.\n*/\nclass SelectionRange {\n    /**\n    Create a range.\n    */\n    constructor(\n    /**\n    The lower bound of the range.\n    */\n    $from, \n    /**\n    The upper bound of the range.\n    */\n    $to) {\n        this.$from = $from;\n        this.$to = $to;\n    }\n}\nlet warnedAboutTextSelection = false;\nfunction checkTextSelection($pos) {\n    if (!warnedAboutTextSelection && !$pos.parent.inlineContent) {\n        warnedAboutTextSelection = true;\n        console[\"warn\"](\"TextSelection endpoint not pointing into a node with inline content (\" + $pos.parent.type.name + \")\");\n    }\n}\n/**\nA text selection represents a classical editor selection, with a\nhead (the moving side) and anchor (immobile side), both of which\npoint into textblock nodes. It can be empty (a regular cursor\nposition).\n*/\nclass TextSelection extends Selection {\n    /**\n    Construct a text selection between the given points.\n    */\n    constructor($anchor, $head = $anchor) {\n        checkTextSelection($anchor);\n        checkTextSelection($head);\n        super($anchor, $head);\n    }\n    /**\n    Returns a resolved position if this is a cursor selection (an\n    empty text selection), and null otherwise.\n    */\n    get $cursor() { return this.$anchor.pos == this.$head.pos ? this.$head : null; }\n    map(doc, mapping) {\n        let $head = doc.resolve(mapping.map(this.head));\n        if (!$head.parent.inlineContent)\n            return Selection.near($head);\n        let $anchor = doc.resolve(mapping.map(this.anchor));\n        return new TextSelection($anchor.parent.inlineContent ? $anchor : $head, $head);\n    }\n    replace(tr, content = Slice.empty) {\n        super.replace(tr, content);\n        if (content == Slice.empty) {\n            let marks = this.$from.marksAcross(this.$to);\n            if (marks)\n                tr.ensureMarks(marks);\n        }\n    }\n    eq(other) {\n        return other instanceof TextSelection && other.anchor == this.anchor && other.head == this.head;\n    }\n    getBookmark() {\n        return new TextBookmark(this.anchor, this.head);\n    }\n    toJSON() {\n        return { type: \"text\", anchor: this.anchor, head: this.head };\n    }\n    /**\n    @internal\n    */\n    static fromJSON(doc, json) {\n        if (typeof json.anchor != \"number\" || typeof json.head != \"number\")\n            throw new RangeError(\"Invalid input for TextSelection.fromJSON\");\n        return new TextSelection(doc.resolve(json.anchor), doc.resolve(json.head));\n    }\n    /**\n    Create a text selection from non-resolved positions.\n    */\n    static create(doc, anchor, head = anchor) {\n        let $anchor = doc.resolve(anchor);\n        return new this($anchor, head == anchor ? $anchor : doc.resolve(head));\n    }\n    /**\n    Return a text selection that spans the given positions or, if\n    they aren't text positions, find a text selection near them.\n    `bias` determines whether the method searches forward (default)\n    or backwards (negative number) first. Will fall back to calling\n    [`Selection.near`](https://prosemirror.net/docs/ref/#state.Selection^near) when the document\n    doesn't contain a valid text position.\n    */\n    static between($anchor, $head, bias) {\n        let dPos = $anchor.pos - $head.pos;\n        if (!bias || dPos)\n            bias = dPos >= 0 ? 1 : -1;\n        if (!$head.parent.inlineContent) {\n            let found = Selection.findFrom($head, bias, true) || Selection.findFrom($head, -bias, true);\n            if (found)\n                $head = found.$head;\n            else\n                return Selection.near($head, bias);\n        }\n        if (!$anchor.parent.inlineContent) {\n            if (dPos == 0) {\n                $anchor = $head;\n            }\n            else {\n                $anchor = (Selection.findFrom($anchor, -bias, true) || Selection.findFrom($anchor, bias, true)).$anchor;\n                if (($anchor.pos < $head.pos) != (dPos < 0))\n                    $anchor = $head;\n            }\n        }\n        return new TextSelection($anchor, $head);\n    }\n}\nSelection.jsonID(\"text\", TextSelection);\nclass TextBookmark {\n    constructor(anchor, head) {\n        this.anchor = anchor;\n        this.head = head;\n    }\n    map(mapping) {\n        return new TextBookmark(mapping.map(this.anchor), mapping.map(this.head));\n    }\n    resolve(doc) {\n        return TextSelection.between(doc.resolve(this.anchor), doc.resolve(this.head));\n    }\n}\n/**\nA node selection is a selection that points at a single node. All\nnodes marked [selectable](https://prosemirror.net/docs/ref/#model.NodeSpec.selectable) can be the\ntarget of a node selection. In such a selection, `from` and `to`\npoint directly before and after the selected node, `anchor` equals\n`from`, and `head` equals `to`..\n*/\nclass NodeSelection extends Selection {\n    /**\n    Create a node selection. Does not verify the validity of its\n    argument.\n    */\n    constructor($pos) {\n        let node = $pos.nodeAfter;\n        let $end = $pos.node(0).resolve($pos.pos + node.nodeSize);\n        super($pos, $end);\n        this.node = node;\n    }\n    map(doc, mapping) {\n        let { deleted, pos } = mapping.mapResult(this.anchor);\n        let $pos = doc.resolve(pos);\n        if (deleted)\n            return Selection.near($pos);\n        return new NodeSelection($pos);\n    }\n    content() {\n        return new Slice(Fragment.from(this.node), 0, 0);\n    }\n    eq(other) {\n        return other instanceof NodeSelection && other.anchor == this.anchor;\n    }\n    toJSON() {\n        return { type: \"node\", anchor: this.anchor };\n    }\n    getBookmark() { return new NodeBookmark(this.anchor); }\n    /**\n    @internal\n    */\n    static fromJSON(doc, json) {\n        if (typeof json.anchor != \"number\")\n            throw new RangeError(\"Invalid input for NodeSelection.fromJSON\");\n        return new NodeSelection(doc.resolve(json.anchor));\n    }\n    /**\n    Create a node selection from non-resolved positions.\n    */\n    static create(doc, from) {\n        return new NodeSelection(doc.resolve(from));\n    }\n    /**\n    Determines whether the given node may be selected as a node\n    selection.\n    */\n    static isSelectable(node) {\n        return !node.isText && node.type.spec.selectable !== false;\n    }\n}\nNodeSelection.prototype.visible = false;\nSelection.jsonID(\"node\", NodeSelection);\nclass NodeBookmark {\n    constructor(anchor) {\n        this.anchor = anchor;\n    }\n    map(mapping) {\n        let { deleted, pos } = mapping.mapResult(this.anchor);\n        return deleted ? new TextBookmark(pos, pos) : new NodeBookmark(pos);\n    }\n    resolve(doc) {\n        let $pos = doc.resolve(this.anchor), node = $pos.nodeAfter;\n        if (node && NodeSelection.isSelectable(node))\n            return new NodeSelection($pos);\n        return Selection.near($pos);\n    }\n}\n/**\nA selection type that represents selecting the whole document\n(which can not necessarily be expressed with a text selection, when\nthere are for example leaf block nodes at the start or end of the\ndocument).\n*/\nclass AllSelection extends Selection {\n    /**\n    Create an all-selection over the given document.\n    */\n    constructor(doc) {\n        super(doc.resolve(0), doc.resolve(doc.content.size));\n    }\n    replace(tr, content = Slice.empty) {\n        if (content == Slice.empty) {\n            tr.delete(0, tr.doc.content.size);\n            let sel = Selection.atStart(tr.doc);\n            if (!sel.eq(tr.selection))\n                tr.setSelection(sel);\n        }\n        else {\n            super.replace(tr, content);\n        }\n    }\n    toJSON() { return { type: \"all\" }; }\n    /**\n    @internal\n    */\n    static fromJSON(doc) { return new AllSelection(doc); }\n    map(doc) { return new AllSelection(doc); }\n    eq(other) { return other instanceof AllSelection; }\n    getBookmark() { return AllBookmark; }\n}\nSelection.jsonID(\"all\", AllSelection);\nconst AllBookmark = {\n    map() { return this; },\n    resolve(doc) { return new AllSelection(doc); }\n};\n// FIXME we'll need some awareness of text direction when scanning for selections\n// Try to find a selection inside the given node. `pos` points at the\n// position where the search starts. When `text` is true, only return\n// text selections.\nfunction findSelectionIn(doc, node, pos, index, dir, text = false) {\n    if (node.inlineContent)\n        return TextSelection.create(doc, pos);\n    for (let i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir) {\n        let child = node.child(i);\n        if (!child.isAtom) {\n            let inner = findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text);\n            if (inner)\n                return inner;\n        }\n        else if (!text && NodeSelection.isSelectable(child)) {\n            return NodeSelection.create(doc, pos - (dir < 0 ? child.nodeSize : 0));\n        }\n        pos += child.nodeSize * dir;\n    }\n    return null;\n}\nfunction selectionToInsertionEnd(tr, startLen, bias) {\n    let last = tr.steps.length - 1;\n    if (last < startLen)\n        return;\n    let step = tr.steps[last];\n    if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep))\n        return;\n    let map = tr.mapping.maps[last], end;\n    map.forEach((_from, _to, _newFrom, newTo) => { if (end == null)\n        end = newTo; });\n    tr.setSelection(Selection.near(tr.doc.resolve(end), bias));\n}\n\nconst UPDATED_SEL = 1, UPDATED_MARKS = 2, UPDATED_SCROLL = 4;\n/**\nAn editor state transaction, which can be applied to a state to\ncreate an updated state. Use\n[`EditorState.tr`](https://prosemirror.net/docs/ref/#state.EditorState.tr) to create an instance.\n\nTransactions track changes to the document (they are a subclass of\n[`Transform`](https://prosemirror.net/docs/ref/#transform.Transform)), but also other state changes,\nlike selection updates and adjustments of the set of [stored\nmarks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks). In addition, you can store\nmetadata properties in a transaction, which are extra pieces of\ninformation that client code or plugins can use to describe what a\ntransaction represents, so that they can update their [own\nstate](https://prosemirror.net/docs/ref/#state.StateField) accordingly.\n\nThe [editor view](https://prosemirror.net/docs/ref/#view.EditorView) uses a few metadata\nproperties: it will attach a property `\"pointer\"` with the value\n`true` to selection transactions directly caused by mouse or touch\ninput, a `\"composition\"` property holding an ID identifying the\ncomposition that caused it to transactions caused by composed DOM\ninput, and a `\"uiEvent\"` property of that may be `\"paste\"`,\n`\"cut\"`, or `\"drop\"`.\n*/\nclass Transaction extends Transform {\n    /**\n    @internal\n    */\n    constructor(state) {\n        super(state.doc);\n        // The step count for which the current selection is valid.\n        this.curSelectionFor = 0;\n        // Bitfield to track which aspects of the state were updated by\n        // this transaction.\n        this.updated = 0;\n        // Object used to store metadata properties for the transaction.\n        this.meta = Object.create(null);\n        this.time = Date.now();\n        this.curSelection = state.selection;\n        this.storedMarks = state.storedMarks;\n    }\n    /**\n    The transaction's current selection. This defaults to the editor\n    selection [mapped](https://prosemirror.net/docs/ref/#state.Selection.map) through the steps in the\n    transaction, but can be overwritten with\n    [`setSelection`](https://prosemirror.net/docs/ref/#state.Transaction.setSelection).\n    */\n    get selection() {\n        if (this.curSelectionFor < this.steps.length) {\n            this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor));\n            this.curSelectionFor = this.steps.length;\n        }\n        return this.curSelection;\n    }\n    /**\n    Update the transaction's current selection. Will determine the\n    selection that the editor gets when the transaction is applied.\n    */\n    setSelection(selection) {\n        if (selection.$from.doc != this.doc)\n            throw new RangeError(\"Selection passed to setSelection must point at the current document\");\n        this.curSelection = selection;\n        this.curSelectionFor = this.steps.length;\n        this.updated = (this.updated | UPDATED_SEL) & ~UPDATED_MARKS;\n        this.storedMarks = null;\n        return this;\n    }\n    /**\n    Whether the selection was explicitly updated by this transaction.\n    */\n    get selectionSet() {\n        return (this.updated & UPDATED_SEL) > 0;\n    }\n    /**\n    Set the current stored marks.\n    */\n    setStoredMarks(marks) {\n        this.storedMarks = marks;\n        this.updated |= UPDATED_MARKS;\n        return this;\n    }\n    /**\n    Make sure the current stored marks or, if that is null, the marks\n    at the selection, match the given set of marks. Does nothing if\n    this is already the case.\n    */\n    ensureMarks(marks) {\n        if (!Mark.sameSet(this.storedMarks || this.selection.$from.marks(), marks))\n            this.setStoredMarks(marks);\n        return this;\n    }\n    /**\n    Add a mark to the set of stored marks.\n    */\n    addStoredMark(mark) {\n        return this.ensureMarks(mark.addToSet(this.storedMarks || this.selection.$head.marks()));\n    }\n    /**\n    Remove a mark or mark type from the set of stored marks.\n    */\n    removeStoredMark(mark) {\n        return this.ensureMarks(mark.removeFromSet(this.storedMarks || this.selection.$head.marks()));\n    }\n    /**\n    Whether the stored marks were explicitly set for this transaction.\n    */\n    get storedMarksSet() {\n        return (this.updated & UPDATED_MARKS) > 0;\n    }\n    /**\n    @internal\n    */\n    addStep(step, doc) {\n        super.addStep(step, doc);\n        this.updated = this.updated & ~UPDATED_MARKS;\n        this.storedMarks = null;\n    }\n    /**\n    Update the timestamp for the transaction.\n    */\n    setTime(time) {\n        this.time = time;\n        return this;\n    }\n    /**\n    Replace the current selection with the given slice.\n    */\n    replaceSelection(slice) {\n        this.selection.replace(this, slice);\n        return this;\n    }\n    /**\n    Replace the selection with the given node. When `inheritMarks` is\n    true and the content is inline, it inherits the marks from the\n    place where it is inserted.\n    */\n    replaceSelectionWith(node, inheritMarks = true) {\n        let selection = this.selection;\n        if (inheritMarks)\n            node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : (selection.$from.marksAcross(selection.$to) || Mark.none)));\n        selection.replaceWith(this, node);\n        return this;\n    }\n    /**\n    Delete the selection.\n    */\n    deleteSelection() {\n        this.selection.replace(this);\n        return this;\n    }\n    /**\n    Replace the given range, or the selection if no range is given,\n    with a text node containing the given string.\n    */\n    insertText(text, from, to) {\n        let schema = this.doc.type.schema;\n        if (from == null) {\n            if (!text)\n                return this.deleteSelection();\n            return this.replaceSelectionWith(schema.text(text), true);\n        }\n        else {\n            if (to == null)\n                to = from;\n            to = to == null ? from : to;\n            if (!text)\n                return this.deleteRange(from, to);\n            let marks = this.storedMarks;\n            if (!marks) {\n                let $from = this.doc.resolve(from);\n                marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));\n            }\n            this.replaceRangeWith(from, to, schema.text(text, marks));\n            if (!this.selection.empty)\n                this.setSelection(Selection.near(this.selection.$to));\n            return this;\n        }\n    }\n    /**\n    Store a metadata property in this transaction, keyed either by\n    name or by plugin.\n    */\n    setMeta(key, value) {\n        this.meta[typeof key == \"string\" ? key : key.key] = value;\n        return this;\n    }\n    /**\n    Retrieve a metadata property for a given name or plugin.\n    */\n    getMeta(key) {\n        return this.meta[typeof key == \"string\" ? key : key.key];\n    }\n    /**\n    Returns true if this transaction doesn't contain any metadata,\n    and can thus safely be extended.\n    */\n    get isGeneric() {\n        for (let _ in this.meta)\n            return false;\n        return true;\n    }\n    /**\n    Indicate that the editor should scroll the selection into view\n    when updated to the state produced by this transaction.\n    */\n    scrollIntoView() {\n        this.updated |= UPDATED_SCROLL;\n        return this;\n    }\n    /**\n    True when this transaction has had `scrollIntoView` called on it.\n    */\n    get scrolledIntoView() {\n        return (this.updated & UPDATED_SCROLL) > 0;\n    }\n}\n\nfunction bind(f, self) {\n    return !self || !f ? f : f.bind(self);\n}\nclass FieldDesc {\n    constructor(name, desc, self) {\n        this.name = name;\n        this.init = bind(desc.init, self);\n        this.apply = bind(desc.apply, self);\n    }\n}\nconst baseFields = [\n    new FieldDesc(\"doc\", {\n        init(config) { return config.doc || config.schema.topNodeType.createAndFill(); },\n        apply(tr) { return tr.doc; }\n    }),\n    new FieldDesc(\"selection\", {\n        init(config, instance) { return config.selection || Selection.atStart(instance.doc); },\n        apply(tr) { return tr.selection; }\n    }),\n    new FieldDesc(\"storedMarks\", {\n        init(config) { return config.storedMarks || null; },\n        apply(tr, _marks, _old, state) { return state.selection.$cursor ? tr.storedMarks : null; }\n    }),\n    new FieldDesc(\"scrollToSelection\", {\n        init() { return 0; },\n        apply(tr, prev) { return tr.scrolledIntoView ? prev + 1 : prev; }\n    })\n];\n// Object wrapping the part of a state object that stays the same\n// across transactions. Stored in the state's `config` property.\nclass Configuration {\n    constructor(schema, plugins) {\n        this.schema = schema;\n        this.plugins = [];\n        this.pluginsByKey = Object.create(null);\n        this.fields = baseFields.slice();\n        if (plugins)\n            plugins.forEach(plugin => {\n                if (this.pluginsByKey[plugin.key])\n                    throw new RangeError(\"Adding different instances of a keyed plugin (\" + plugin.key + \")\");\n                this.plugins.push(plugin);\n                this.pluginsByKey[plugin.key] = plugin;\n                if (plugin.spec.state)\n                    this.fields.push(new FieldDesc(plugin.key, plugin.spec.state, plugin));\n            });\n    }\n}\n/**\nThe state of a ProseMirror editor is represented by an object of\nthis type. A state is a persistent data structure—it isn't\nupdated, but rather a new state value is computed from an old one\nusing the [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) method.\n\nA state holds a number of built-in fields, and plugins can\n[define](https://prosemirror.net/docs/ref/#state.PluginSpec.state) additional fields.\n*/\nclass EditorState {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    @internal\n    */\n    config) {\n        this.config = config;\n    }\n    /**\n    The schema of the state's document.\n    */\n    get schema() {\n        return this.config.schema;\n    }\n    /**\n    The plugins that are active in this state.\n    */\n    get plugins() {\n        return this.config.plugins;\n    }\n    /**\n    Apply the given transaction to produce a new state.\n    */\n    apply(tr) {\n        return this.applyTransaction(tr).state;\n    }\n    /**\n    @internal\n    */\n    filterTransaction(tr, ignore = -1) {\n        for (let i = 0; i < this.config.plugins.length; i++)\n            if (i != ignore) {\n                let plugin = this.config.plugins[i];\n                if (plugin.spec.filterTransaction && !plugin.spec.filterTransaction.call(plugin, tr, this))\n                    return false;\n            }\n        return true;\n    }\n    /**\n    Verbose variant of [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) that\n    returns the precise transactions that were applied (which might\n    be influenced by the [transaction\n    hooks](https://prosemirror.net/docs/ref/#state.PluginSpec.filterTransaction) of\n    plugins) along with the new state.\n    */\n    applyTransaction(rootTr) {\n        if (!this.filterTransaction(rootTr))\n            return { state: this, transactions: [] };\n        let trs = [rootTr], newState = this.applyInner(rootTr), seen = null;\n        // This loop repeatedly gives plugins a chance to respond to\n        // transactions as new transactions are added, making sure to only\n        // pass the transactions the plugin did not see before.\n        for (;;) {\n            let haveNew = false;\n            for (let i = 0; i < this.config.plugins.length; i++) {\n                let plugin = this.config.plugins[i];\n                if (plugin.spec.appendTransaction) {\n                    let n = seen ? seen[i].n : 0, oldState = seen ? seen[i].state : this;\n                    let tr = n < trs.length &&\n                        plugin.spec.appendTransaction.call(plugin, n ? trs.slice(n) : trs, oldState, newState);\n                    if (tr && newState.filterTransaction(tr, i)) {\n                        tr.setMeta(\"appendedTransaction\", rootTr);\n                        if (!seen) {\n                            seen = [];\n                            for (let j = 0; j < this.config.plugins.length; j++)\n                                seen.push(j < i ? { state: newState, n: trs.length } : { state: this, n: 0 });\n                        }\n                        trs.push(tr);\n                        newState = newState.applyInner(tr);\n                        haveNew = true;\n                    }\n                    if (seen)\n                        seen[i] = { state: newState, n: trs.length };\n                }\n            }\n            if (!haveNew)\n                return { state: newState, transactions: trs };\n        }\n    }\n    /**\n    @internal\n    */\n    applyInner(tr) {\n        if (!tr.before.eq(this.doc))\n            throw new RangeError(\"Applying a mismatched transaction\");\n        let newInstance = new EditorState(this.config), fields = this.config.fields;\n        for (let i = 0; i < fields.length; i++) {\n            let field = fields[i];\n            newInstance[field.name] = field.apply(tr, this[field.name], this, newInstance);\n        }\n        return newInstance;\n    }\n    /**\n    Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.\n    */\n    get tr() { return new Transaction(this); }\n    /**\n    Create a new state.\n    */\n    static create(config) {\n        let $config = new Configuration(config.doc ? config.doc.type.schema : config.schema, config.plugins);\n        let instance = new EditorState($config);\n        for (let i = 0; i < $config.fields.length; i++)\n            instance[$config.fields[i].name] = $config.fields[i].init(config, instance);\n        return instance;\n    }\n    /**\n    Create a new state based on this one, but with an adjusted set\n    of active plugins. State fields that exist in both sets of\n    plugins are kept unchanged. Those that no longer exist are\n    dropped, and those that are new are initialized using their\n    [`init`](https://prosemirror.net/docs/ref/#state.StateField.init) method, passing in the new\n    configuration object..\n    */\n    reconfigure(config) {\n        let $config = new Configuration(this.schema, config.plugins);\n        let fields = $config.fields, instance = new EditorState($config);\n        for (let i = 0; i < fields.length; i++) {\n            let name = fields[i].name;\n            instance[name] = this.hasOwnProperty(name) ? this[name] : fields[i].init(config, instance);\n        }\n        return instance;\n    }\n    /**\n    Serialize this state to JSON. If you want to serialize the state\n    of plugins, pass an object mapping property names to use in the\n    resulting JSON object to plugin objects. The argument may also be\n    a string or number, in which case it is ignored, to support the\n    way `JSON.stringify` calls `toString` methods.\n    */\n    toJSON(pluginFields) {\n        let result = { doc: this.doc.toJSON(), selection: this.selection.toJSON() };\n        if (this.storedMarks)\n            result.storedMarks = this.storedMarks.map(m => m.toJSON());\n        if (pluginFields && typeof pluginFields == 'object')\n            for (let prop in pluginFields) {\n                if (prop == \"doc\" || prop == \"selection\")\n                    throw new RangeError(\"The JSON fields `doc` and `selection` are reserved\");\n                let plugin = pluginFields[prop], state = plugin.spec.state;\n                if (state && state.toJSON)\n                    result[prop] = state.toJSON.call(plugin, this[plugin.key]);\n            }\n        return result;\n    }\n    /**\n    Deserialize a JSON representation of a state. `config` should\n    have at least a `schema` field, and should contain array of\n    plugins to initialize the state with. `pluginFields` can be used\n    to deserialize the state of plugins, by associating plugin\n    instances with the property names they use in the JSON object.\n    */\n    static fromJSON(config, json, pluginFields) {\n        if (!json)\n            throw new RangeError(\"Invalid input for EditorState.fromJSON\");\n        if (!config.schema)\n            throw new RangeError(\"Required config field 'schema' missing\");\n        let $config = new Configuration(config.schema, config.plugins);\n        let instance = new EditorState($config);\n        $config.fields.forEach(field => {\n            if (field.name == \"doc\") {\n                instance.doc = Node.fromJSON(config.schema, json.doc);\n            }\n            else if (field.name == \"selection\") {\n                instance.selection = Selection.fromJSON(instance.doc, json.selection);\n            }\n            else if (field.name == \"storedMarks\") {\n                if (json.storedMarks)\n                    instance.storedMarks = json.storedMarks.map(config.schema.markFromJSON);\n            }\n            else {\n                if (pluginFields)\n                    for (let prop in pluginFields) {\n                        let plugin = pluginFields[prop], state = plugin.spec.state;\n                        if (plugin.key == field.name && state && state.fromJSON &&\n                            Object.prototype.hasOwnProperty.call(json, prop)) {\n                            instance[field.name] = state.fromJSON.call(plugin, config, json[prop], instance);\n                            return;\n                        }\n                    }\n                instance[field.name] = field.init(config, instance);\n            }\n        });\n        return instance;\n    }\n}\n\nfunction bindProps(obj, self, target) {\n    for (let prop in obj) {\n        let val = obj[prop];\n        if (val instanceof Function)\n            val = val.bind(self);\n        else if (prop == \"handleDOMEvents\")\n            val = bindProps(val, self, {});\n        target[prop] = val;\n    }\n    return target;\n}\n/**\nPlugins bundle functionality that can be added to an editor.\nThey are part of the [editor state](https://prosemirror.net/docs/ref/#state.EditorState) and\nmay influence that state and the view that contains it.\n*/\nclass Plugin {\n    /**\n    Create a plugin.\n    */\n    constructor(\n    /**\n    The plugin's [spec object](https://prosemirror.net/docs/ref/#state.PluginSpec).\n    */\n    spec) {\n        this.spec = spec;\n        /**\n        The [props](https://prosemirror.net/docs/ref/#view.EditorProps) exported by this plugin.\n        */\n        this.props = {};\n        if (spec.props)\n            bindProps(spec.props, this, this.props);\n        this.key = spec.key ? spec.key.key : createKey(\"plugin\");\n    }\n    /**\n    Extract the plugin's state field from an editor state.\n    */\n    getState(state) { return state[this.key]; }\n}\nconst keys = Object.create(null);\nfunction createKey(name) {\n    if (name in keys)\n        return name + \"$\" + ++keys[name];\n    keys[name] = 0;\n    return name + \"$\";\n}\n/**\nA key is used to [tag](https://prosemirror.net/docs/ref/#state.PluginSpec.key) plugins in a way\nthat makes it possible to find them, given an editor state.\nAssigning a key does mean only one plugin of that type can be\nactive in a state.\n*/\nclass PluginKey {\n    /**\n    Create a plugin key.\n    */\n    constructor(name = \"key\") { this.key = createKey(name); }\n    /**\n    Get the active plugin with this key, if any, from an editor\n    state.\n    */\n    get(state) { return state.config.pluginsByKey[this.key]; }\n    /**\n    Get the plugin's state from an editor state.\n    */\n    getState(state) { return state[this.key]; }\n}\n\nexport { AllSelection, EditorState, NodeSelection, Plugin, PluginKey, Selection, SelectionRange, TextSelection, Transaction };\n","import OrderedMap from 'orderedmap';\n\nfunction findDiffStart(a, b, pos) {\n    for (let i = 0;; i++) {\n        if (i == a.childCount || i == b.childCount)\n            return a.childCount == b.childCount ? null : pos;\n        let childA = a.child(i), childB = b.child(i);\n        if (childA == childB) {\n            pos += childA.nodeSize;\n            continue;\n        }\n        if (!childA.sameMarkup(childB))\n            return pos;\n        if (childA.isText && childA.text != childB.text) {\n            let tA = childA.text, tB = childB.text, j = 0;\n            for (; tA[j] == tB[j]; j++)\n                pos++;\n            if (j && j < tA.length && j < tB.length && surrogateHigh(tA.charCodeAt(j - 1)) && surrogateLow(tA.charCodeAt(j)))\n                pos--;\n            return pos;\n        }\n        if (childA.content.size || childB.content.size) {\n            let inner = findDiffStart(childA.content, childB.content, pos + 1);\n            if (inner != null)\n                return inner;\n        }\n        pos += childA.nodeSize;\n    }\n}\nfunction findDiffEnd(a, b, posA, posB) {\n    for (let iA = a.childCount, iB = b.childCount;;) {\n        if (iA == 0 || iB == 0)\n            return iA == iB ? null : { a: posA, b: posB };\n        let childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize;\n        if (childA == childB) {\n            posA -= size;\n            posB -= size;\n            continue;\n        }\n        if (!childA.sameMarkup(childB))\n            return { a: posA, b: posB };\n        if (childA.isText && childA.text != childB.text) {\n            let tA = childA.text, tB = childB.text, iA = tA.length, iB = tB.length;\n            while (iA > 0 && iB > 0 && tA[iA - 1] == tB[iB - 1]) {\n                iA--;\n                iB--;\n                posA--;\n                posB--;\n            }\n            if (iA && iB && iA < tA.length && surrogateHigh(tA.charCodeAt(iA - 1)) && surrogateLow(tA.charCodeAt(iA))) {\n                posA++;\n                posB++;\n            }\n            return { a: posA, b: posB };\n        }\n        if (childA.content.size || childB.content.size) {\n            let inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n            if (inner)\n                return inner;\n        }\n        posA -= size;\n        posB -= size;\n    }\n}\nfunction surrogateLow(ch) { return ch >= 0xDC00 && ch < 0xE000; }\nfunction surrogateHigh(ch) { return ch >= 0xD800 && ch < 0xDC00; }\n\n/**\nA fragment represents a node's collection of child nodes.\n\nLike nodes, fragments are persistent data structures, and you\nshould not mutate them or their content. Rather, you create new\ninstances whenever needed. The API tries to make this easy.\n*/\nclass Fragment {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    The child nodes in this fragment.\n    */\n    content, size) {\n        this.content = content;\n        this.size = size || 0;\n        if (size == null)\n            for (let i = 0; i < content.length; i++)\n                this.size += content[i].nodeSize;\n    }\n    /**\n    Invoke a callback for all descendant nodes between the given two\n    positions (relative to start of this fragment). Doesn't descend\n    into a node when the callback returns `false`.\n    */\n    nodesBetween(from, to, f, nodeStart = 0, parent) {\n        for (let i = 0, pos = 0; pos < to; i++) {\n            let child = this.content[i], end = pos + child.nodeSize;\n            if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) {\n                let start = pos + 1;\n                child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start);\n            }\n            pos = end;\n        }\n    }\n    /**\n    Call the given callback for every descendant node. `pos` will be\n    relative to the start of the fragment. The callback may return\n    `false` to prevent traversal of a given node's children.\n    */\n    descendants(f) {\n        this.nodesBetween(0, this.size, f);\n    }\n    /**\n    Extract the text between `from` and `to`. See the same method on\n    [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween).\n    */\n    textBetween(from, to, blockSeparator, leafText) {\n        let text = \"\", first = true;\n        this.nodesBetween(from, to, (node, pos) => {\n            let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos)\n                : !node.isLeaf ? \"\"\n                    : leafText ? (typeof leafText === \"function\" ? leafText(node) : leafText)\n                        : node.type.spec.leafText ? node.type.spec.leafText(node)\n                            : \"\";\n            if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) {\n                if (first)\n                    first = false;\n                else\n                    text += blockSeparator;\n            }\n            text += nodeText;\n        }, 0);\n        return text;\n    }\n    /**\n    Create a new fragment containing the combined content of this\n    fragment and the other.\n    */\n    append(other) {\n        if (!other.size)\n            return this;\n        if (!this.size)\n            return other;\n        let last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0;\n        if (last.isText && last.sameMarkup(first)) {\n            content[content.length - 1] = last.withText(last.text + first.text);\n            i = 1;\n        }\n        for (; i < other.content.length; i++)\n            content.push(other.content[i]);\n        return new Fragment(content, this.size + other.size);\n    }\n    /**\n    Cut out the sub-fragment between the two given positions.\n    */\n    cut(from, to = this.size) {\n        if (from == 0 && to == this.size)\n            return this;\n        let result = [], size = 0;\n        if (to > from)\n            for (let i = 0, pos = 0; pos < to; i++) {\n                let child = this.content[i], end = pos + child.nodeSize;\n                if (end > from) {\n                    if (pos < from || end > to) {\n                        if (child.isText)\n                            child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));\n                        else\n                            child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1));\n                    }\n                    result.push(child);\n                    size += child.nodeSize;\n                }\n                pos = end;\n            }\n        return new Fragment(result, size);\n    }\n    /**\n    @internal\n    */\n    cutByIndex(from, to) {\n        if (from == to)\n            return Fragment.empty;\n        if (from == 0 && to == this.content.length)\n            return this;\n        return new Fragment(this.content.slice(from, to));\n    }\n    /**\n    Create a new fragment in which the node at the given index is\n    replaced by the given node.\n    */\n    replaceChild(index, node) {\n        let current = this.content[index];\n        if (current == node)\n            return this;\n        let copy = this.content.slice();\n        let size = this.size + node.nodeSize - current.nodeSize;\n        copy[index] = node;\n        return new Fragment(copy, size);\n    }\n    /**\n    Create a new fragment by prepending the given node to this\n    fragment.\n    */\n    addToStart(node) {\n        return new Fragment([node].concat(this.content), this.size + node.nodeSize);\n    }\n    /**\n    Create a new fragment by appending the given node to this\n    fragment.\n    */\n    addToEnd(node) {\n        return new Fragment(this.content.concat(node), this.size + node.nodeSize);\n    }\n    /**\n    Compare this fragment to another one.\n    */\n    eq(other) {\n        if (this.content.length != other.content.length)\n            return false;\n        for (let i = 0; i < this.content.length; i++)\n            if (!this.content[i].eq(other.content[i]))\n                return false;\n        return true;\n    }\n    /**\n    The first child of the fragment, or `null` if it is empty.\n    */\n    get firstChild() { return this.content.length ? this.content[0] : null; }\n    /**\n    The last child of the fragment, or `null` if it is empty.\n    */\n    get lastChild() { return this.content.length ? this.content[this.content.length - 1] : null; }\n    /**\n    The number of child nodes in this fragment.\n    */\n    get childCount() { return this.content.length; }\n    /**\n    Get the child node at the given index. Raise an error when the\n    index is out of range.\n    */\n    child(index) {\n        let found = this.content[index];\n        if (!found)\n            throw new RangeError(\"Index \" + index + \" out of range for \" + this);\n        return found;\n    }\n    /**\n    Get the child node at the given index, if it exists.\n    */\n    maybeChild(index) {\n        return this.content[index] || null;\n    }\n    /**\n    Call `f` for every child node, passing the node, its offset\n    into this parent node, and its index.\n    */\n    forEach(f) {\n        for (let i = 0, p = 0; i < this.content.length; i++) {\n            let child = this.content[i];\n            f(child, p, i);\n            p += child.nodeSize;\n        }\n    }\n    /**\n    Find the first position at which this fragment and another\n    fragment differ, or `null` if they are the same.\n    */\n    findDiffStart(other, pos = 0) {\n        return findDiffStart(this, other, pos);\n    }\n    /**\n    Find the first position, searching from the end, at which this\n    fragment and the given fragment differ, or `null` if they are\n    the same. Since this position will not be the same in both\n    nodes, an object with two separate positions is returned.\n    */\n    findDiffEnd(other, pos = this.size, otherPos = other.size) {\n        return findDiffEnd(this, other, pos, otherPos);\n    }\n    /**\n    Find the index and inner offset corresponding to a given relative\n    position in this fragment. The result object will be reused\n    (overwritten) the next time the function is called. @internal\n    */\n    findIndex(pos) {\n        if (pos == 0)\n            return retIndex(0, pos);\n        if (pos == this.size)\n            return retIndex(this.content.length, pos);\n        if (pos > this.size || pos < 0)\n            throw new RangeError(`Position ${pos} outside of fragment (${this})`);\n        for (let i = 0, curPos = 0;; i++) {\n            let cur = this.child(i), end = curPos + cur.nodeSize;\n            if (end >= pos) {\n                if (end == pos)\n                    return retIndex(i + 1, end);\n                return retIndex(i, curPos);\n            }\n            curPos = end;\n        }\n    }\n    /**\n    Return a debugging string that describes this fragment.\n    */\n    toString() { return \"<\" + this.toStringInner() + \">\"; }\n    /**\n    @internal\n    */\n    toStringInner() { return this.content.join(\", \"); }\n    /**\n    Create a JSON-serializeable representation of this fragment.\n    */\n    toJSON() {\n        return this.content.length ? this.content.map(n => n.toJSON()) : null;\n    }\n    /**\n    Deserialize a fragment from its JSON representation.\n    */\n    static fromJSON(schema, value) {\n        if (!value)\n            return Fragment.empty;\n        if (!Array.isArray(value))\n            throw new RangeError(\"Invalid input for Fragment.fromJSON\");\n        return Fragment.fromArray(value.map(schema.nodeFromJSON));\n    }\n    /**\n    Build a fragment from an array of nodes. Ensures that adjacent\n    text nodes with the same marks are joined together.\n    */\n    static fromArray(array) {\n        if (!array.length)\n            return Fragment.empty;\n        let joined, size = 0;\n        for (let i = 0; i < array.length; i++) {\n            let node = array[i];\n            size += node.nodeSize;\n            if (i && node.isText && array[i - 1].sameMarkup(node)) {\n                if (!joined)\n                    joined = array.slice(0, i);\n                joined[joined.length - 1] = node\n                    .withText(joined[joined.length - 1].text + node.text);\n            }\n            else if (joined) {\n                joined.push(node);\n            }\n        }\n        return new Fragment(joined || array, size);\n    }\n    /**\n    Create a fragment from something that can be interpreted as a\n    set of nodes. For `null`, it returns the empty fragment. For a\n    fragment, the fragment itself. For a node or array of nodes, a\n    fragment containing those nodes.\n    */\n    static from(nodes) {\n        if (!nodes)\n            return Fragment.empty;\n        if (nodes instanceof Fragment)\n            return nodes;\n        if (Array.isArray(nodes))\n            return this.fromArray(nodes);\n        if (nodes.attrs)\n            return new Fragment([nodes], nodes.nodeSize);\n        throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" +\n            (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"));\n    }\n}\n/**\nAn empty fragment. Intended to be reused whenever a node doesn't\ncontain anything (rather than allocating a new empty fragment for\neach leaf node).\n*/\nFragment.empty = new Fragment([], 0);\nconst found = { index: 0, offset: 0 };\nfunction retIndex(index, offset) {\n    found.index = index;\n    found.offset = offset;\n    return found;\n}\n\nfunction compareDeep(a, b) {\n    if (a === b)\n        return true;\n    if (!(a && typeof a == \"object\") ||\n        !(b && typeof b == \"object\"))\n        return false;\n    let array = Array.isArray(a);\n    if (Array.isArray(b) != array)\n        return false;\n    if (array) {\n        if (a.length != b.length)\n            return false;\n        for (let i = 0; i < a.length; i++)\n            if (!compareDeep(a[i], b[i]))\n                return false;\n    }\n    else {\n        for (let p in a)\n            if (!(p in b) || !compareDeep(a[p], b[p]))\n                return false;\n        for (let p in b)\n            if (!(p in a))\n                return false;\n    }\n    return true;\n}\n\n/**\nA mark is a piece of information that can be attached to a node,\nsuch as it being emphasized, in code font, or a link. It has a\ntype and optionally a set of attributes that provide further\ninformation (such as the target of the link). Marks are created\nthrough a `Schema`, which controls which types exist and which\nattributes they have.\n*/\nclass Mark {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    The type of this mark.\n    */\n    type, \n    /**\n    The attributes associated with this mark.\n    */\n    attrs) {\n        this.type = type;\n        this.attrs = attrs;\n    }\n    /**\n    Given a set of marks, create a new set which contains this one as\n    well, in the right position. If this mark is already in the set,\n    the set itself is returned. If any marks that are set to be\n    [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present,\n    those are replaced by this one.\n    */\n    addToSet(set) {\n        let copy, placed = false;\n        for (let i = 0; i < set.length; i++) {\n            let other = set[i];\n            if (this.eq(other))\n                return set;\n            if (this.type.excludes(other.type)) {\n                if (!copy)\n                    copy = set.slice(0, i);\n            }\n            else if (other.type.excludes(this.type)) {\n                return set;\n            }\n            else {\n                if (!placed && other.type.rank > this.type.rank) {\n                    if (!copy)\n                        copy = set.slice(0, i);\n                    copy.push(this);\n                    placed = true;\n                }\n                if (copy)\n                    copy.push(other);\n            }\n        }\n        if (!copy)\n            copy = set.slice();\n        if (!placed)\n            copy.push(this);\n        return copy;\n    }\n    /**\n    Remove this mark from the given set, returning a new set. If this\n    mark is not in the set, the set itself is returned.\n    */\n    removeFromSet(set) {\n        for (let i = 0; i < set.length; i++)\n            if (this.eq(set[i]))\n                return set.slice(0, i).concat(set.slice(i + 1));\n        return set;\n    }\n    /**\n    Test whether this mark is in the given set of marks.\n    */\n    isInSet(set) {\n        for (let i = 0; i < set.length; i++)\n            if (this.eq(set[i]))\n                return true;\n        return false;\n    }\n    /**\n    Test whether this mark has the same type and attributes as\n    another mark.\n    */\n    eq(other) {\n        return this == other ||\n            (this.type == other.type && compareDeep(this.attrs, other.attrs));\n    }\n    /**\n    Convert this mark to a JSON-serializeable representation.\n    */\n    toJSON() {\n        let obj = { type: this.type.name };\n        for (let _ in this.attrs) {\n            obj.attrs = this.attrs;\n            break;\n        }\n        return obj;\n    }\n    /**\n    Deserialize a mark from JSON.\n    */\n    static fromJSON(schema, json) {\n        if (!json)\n            throw new RangeError(\"Invalid input for Mark.fromJSON\");\n        let type = schema.marks[json.type];\n        if (!type)\n            throw new RangeError(`There is no mark type ${json.type} in this schema`);\n        let mark = type.create(json.attrs);\n        return mark;\n    }\n    /**\n    Test whether two sets of marks are identical.\n    */\n    static sameSet(a, b) {\n        if (a == b)\n            return true;\n        if (a.length != b.length)\n            return false;\n        for (let i = 0; i < a.length; i++)\n            if (!a[i].eq(b[i]))\n                return false;\n        return true;\n    }\n    /**\n    Create a properly sorted mark set from null, a single mark, or an\n    unsorted array of marks.\n    */\n    static setFrom(marks) {\n        if (!marks || Array.isArray(marks) && marks.length == 0)\n            return Mark.none;\n        if (marks instanceof Mark)\n            return [marks];\n        let copy = marks.slice();\n        copy.sort((a, b) => a.type.rank - b.type.rank);\n        return copy;\n    }\n}\n/**\nThe empty set of marks.\n*/\nMark.none = [];\n\n/**\nError type raised by [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) when\ngiven an invalid replacement.\n*/\nclass ReplaceError extends Error {\n}\n/**\nA slice represents a piece cut out of a larger document. It\nstores not only a fragment, but also the depth up to which nodes on\nboth side are ‘open’ (cut through).\n*/\nclass Slice {\n    /**\n    Create a slice. When specifying a non-zero open depth, you must\n    make sure that there are nodes of at least that depth at the\n    appropriate side of the fragment—i.e. if the fragment is an\n    empty paragraph node, `openStart` and `openEnd` can't be greater\n    than 1.\n    \n    It is not necessary for the content of open nodes to conform to\n    the schema's content constraints, though it should be a valid\n    start/end/middle for such a node, depending on which sides are\n    open.\n    */\n    constructor(\n    /**\n    The slice's content.\n    */\n    content, \n    /**\n    The open depth at the start of the fragment.\n    */\n    openStart, \n    /**\n    The open depth at the end.\n    */\n    openEnd) {\n        this.content = content;\n        this.openStart = openStart;\n        this.openEnd = openEnd;\n    }\n    /**\n    The size this slice would add when inserted into a document.\n    */\n    get size() {\n        return this.content.size - this.openStart - this.openEnd;\n    }\n    /**\n    @internal\n    */\n    insertAt(pos, fragment) {\n        let content = insertInto(this.content, pos + this.openStart, fragment, this.openStart + 1, this.openEnd + 1);\n        return content && new Slice(content, this.openStart, this.openEnd);\n    }\n    /**\n    @internal\n    */\n    removeBetween(from, to) {\n        return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd);\n    }\n    /**\n    Tests whether this slice is equal to another slice.\n    */\n    eq(other) {\n        return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd;\n    }\n    /**\n    @internal\n    */\n    toString() {\n        return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\";\n    }\n    /**\n    Convert a slice to a JSON-serializable representation.\n    */\n    toJSON() {\n        if (!this.content.size)\n            return null;\n        let json = { content: this.content.toJSON() };\n        if (this.openStart > 0)\n            json.openStart = this.openStart;\n        if (this.openEnd > 0)\n            json.openEnd = this.openEnd;\n        return json;\n    }\n    /**\n    Deserialize a slice from its JSON representation.\n    */\n    static fromJSON(schema, json) {\n        if (!json)\n            return Slice.empty;\n        let openStart = json.openStart || 0, openEnd = json.openEnd || 0;\n        if (typeof openStart != \"number\" || typeof openEnd != \"number\")\n            throw new RangeError(\"Invalid input for Slice.fromJSON\");\n        return new Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd);\n    }\n    /**\n    Create a slice from a fragment by taking the maximum possible\n    open value on both side of the fragment.\n    */\n    static maxOpen(fragment, openIsolating = true) {\n        let openStart = 0, openEnd = 0;\n        for (let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild)\n            openStart++;\n        for (let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild)\n            openEnd++;\n        return new Slice(fragment, openStart, openEnd);\n    }\n}\n/**\nThe empty slice.\n*/\nSlice.empty = new Slice(Fragment.empty, 0, 0);\nfunction removeRange(content, from, to) {\n    let { index, offset } = content.findIndex(from), child = content.maybeChild(index);\n    let { index: indexTo, offset: offsetTo } = content.findIndex(to);\n    if (offset == from || child.isText) {\n        if (offsetTo != to && !content.child(indexTo).isText)\n            throw new RangeError(\"Removing non-flat range\");\n        return content.cut(0, from).append(content.cut(to));\n    }\n    if (index != indexTo)\n        throw new RangeError(\"Removing non-flat range\");\n    return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)));\n}\nfunction insertInto(content, dist, insert, openStart, openEnd, parent) {\n    let { index, offset } = content.findIndex(dist), child = content.maybeChild(index);\n    if (offset == dist || child.isText) {\n        if (parent && openStart <= 0 && openEnd <= 0 && !parent.canReplace(index, index, insert))\n            return null;\n        return content.cut(0, dist).append(insert).append(content.cut(dist));\n    }\n    let inner = insertInto(child.content, dist - offset - 1, insert, index == 0 ? openStart - 1 : 0, index == content.childCount - 1 ? openEnd - 1 : 0, child);\n    return inner && content.replaceChild(index, child.copy(inner));\n}\nfunction replace($from, $to, slice) {\n    if (slice.openStart > $from.depth)\n        throw new ReplaceError(\"Inserted content deeper than insertion position\");\n    if ($from.depth - slice.openStart != $to.depth - slice.openEnd)\n        throw new ReplaceError(\"Inconsistent open depths\");\n    return replaceOuter($from, $to, slice, 0);\n}\nfunction replaceOuter($from, $to, slice, depth) {\n    let index = $from.index(depth), node = $from.node(depth);\n    if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n        let inner = replaceOuter($from, $to, slice, depth + 1);\n        return node.copy(node.content.replaceChild(index, inner));\n    }\n    else if (!slice.content.size) {\n        return close(node, replaceTwoWay($from, $to, depth));\n    }\n    else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { // Simple, flat case\n        let parent = $from.parent, content = parent.content;\n        return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)));\n    }\n    else {\n        let { start, end } = prepareSliceForReplace(slice, $from);\n        return close(node, replaceThreeWay($from, start, end, $to, depth));\n    }\n}\nfunction checkJoin(main, sub) {\n    if (!sub.type.compatibleContent(main.type))\n        throw new ReplaceError(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name);\n}\nfunction joinable($before, $after, depth) {\n    let node = $before.node(depth);\n    checkJoin(node, $after.node(depth));\n    return node;\n}\nfunction addNode(child, target) {\n    let last = target.length - 1;\n    if (last >= 0 && child.isText && child.sameMarkup(target[last]))\n        target[last] = child.withText(target[last].text + child.text);\n    else\n        target.push(child);\n}\nfunction addRange($start, $end, depth, target) {\n    let node = ($end || $start).node(depth);\n    let startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount;\n    if ($start) {\n        startIndex = $start.index(depth);\n        if ($start.depth > depth) {\n            startIndex++;\n        }\n        else if ($start.textOffset) {\n            addNode($start.nodeAfter, target);\n            startIndex++;\n        }\n    }\n    for (let i = startIndex; i < endIndex; i++)\n        addNode(node.child(i), target);\n    if ($end && $end.depth == depth && $end.textOffset)\n        addNode($end.nodeBefore, target);\n}\nfunction close(node, content) {\n    if (!node.type.validContent(content))\n        throw new ReplaceError(\"Invalid content for node \" + node.type.name);\n    return node.copy(content);\n}\nfunction replaceThreeWay($from, $start, $end, $to, depth) {\n    let openStart = $from.depth > depth && joinable($from, $start, depth + 1);\n    let openEnd = $to.depth > depth && joinable($end, $to, depth + 1);\n    let content = [];\n    addRange(null, $from, depth, content);\n    if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n        checkJoin(openStart, openEnd);\n        addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n    }\n    else {\n        if (openStart)\n            addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content);\n        addRange($start, $end, depth, content);\n        if (openEnd)\n            addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);\n    }\n    addRange($to, null, depth, content);\n    return new Fragment(content);\n}\nfunction replaceTwoWay($from, $to, depth) {\n    let content = [];\n    addRange(null, $from, depth, content);\n    if ($from.depth > depth) {\n        let type = joinable($from, $to, depth + 1);\n        addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);\n    }\n    addRange($to, null, depth, content);\n    return new Fragment(content);\n}\nfunction prepareSliceForReplace(slice, $along) {\n    let extra = $along.depth - slice.openStart, parent = $along.node(extra);\n    let node = parent.copy(slice.content);\n    for (let i = extra - 1; i >= 0; i--)\n        node = $along.node(i).copy(Fragment.from(node));\n    return { start: node.resolveNoCache(slice.openStart + extra),\n        end: node.resolveNoCache(node.content.size - slice.openEnd - extra) };\n}\n\n/**\nYou can [_resolve_](https://prosemirror.net/docs/ref/#model.Node.resolve) a position to get more\ninformation about it. Objects of this class represent such a\nresolved position, providing various pieces of context\ninformation, and some helper methods.\n\nThroughout this interface, methods that take an optional `depth`\nparameter will interpret undefined as `this.depth` and negative\nnumbers as `this.depth + value`.\n*/\nclass ResolvedPos {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    The position that was resolved.\n    */\n    pos, \n    /**\n    @internal\n    */\n    path, \n    /**\n    The offset this position has into its parent node.\n    */\n    parentOffset) {\n        this.pos = pos;\n        this.path = path;\n        this.parentOffset = parentOffset;\n        this.depth = path.length / 3 - 1;\n    }\n    /**\n    @internal\n    */\n    resolveDepth(val) {\n        if (val == null)\n            return this.depth;\n        if (val < 0)\n            return this.depth + val;\n        return val;\n    }\n    /**\n    The parent node that the position points into. Note that even if\n    a position points into a text node, that node is not considered\n    the parent—text nodes are ‘flat’ in this model, and have no content.\n    */\n    get parent() { return this.node(this.depth); }\n    /**\n    The root node in which the position was resolved.\n    */\n    get doc() { return this.node(0); }\n    /**\n    The ancestor node at the given level. `p.node(p.depth)` is the\n    same as `p.parent`.\n    */\n    node(depth) { return this.path[this.resolveDepth(depth) * 3]; }\n    /**\n    The index into the ancestor at the given level. If this points\n    at the 3rd node in the 2nd paragraph on the top level, for\n    example, `p.index(0)` is 1 and `p.index(1)` is 2.\n    */\n    index(depth) { return this.path[this.resolveDepth(depth) * 3 + 1]; }\n    /**\n    The index pointing after this position into the ancestor at the\n    given level.\n    */\n    indexAfter(depth) {\n        depth = this.resolveDepth(depth);\n        return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1);\n    }\n    /**\n    The (absolute) position at the start of the node at the given\n    level.\n    */\n    start(depth) {\n        depth = this.resolveDepth(depth);\n        return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n    }\n    /**\n    The (absolute) position at the end of the node at the given\n    level.\n    */\n    end(depth) {\n        depth = this.resolveDepth(depth);\n        return this.start(depth) + this.node(depth).content.size;\n    }\n    /**\n    The (absolute) position directly before the wrapping node at the\n    given level, or, when `depth` is `this.depth + 1`, the original\n    position.\n    */\n    before(depth) {\n        depth = this.resolveDepth(depth);\n        if (!depth)\n            throw new RangeError(\"There is no position before the top-level node\");\n        return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1];\n    }\n    /**\n    The (absolute) position directly after the wrapping node at the\n    given level, or the original position when `depth` is `this.depth + 1`.\n    */\n    after(depth) {\n        depth = this.resolveDepth(depth);\n        if (!depth)\n            throw new RangeError(\"There is no position after the top-level node\");\n        return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize;\n    }\n    /**\n    When this position points into a text node, this returns the\n    distance between the position and the start of the text node.\n    Will be zero for positions that point between nodes.\n    */\n    get textOffset() { return this.pos - this.path[this.path.length - 1]; }\n    /**\n    Get the node directly after the position, if any. If the position\n    points into a text node, only the part of that node after the\n    position is returned.\n    */\n    get nodeAfter() {\n        let parent = this.parent, index = this.index(this.depth);\n        if (index == parent.childCount)\n            return null;\n        let dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index);\n        return dOff ? parent.child(index).cut(dOff) : child;\n    }\n    /**\n    Get the node directly before the position, if any. If the\n    position points into a text node, only the part of that node\n    before the position is returned.\n    */\n    get nodeBefore() {\n        let index = this.index(this.depth);\n        let dOff = this.pos - this.path[this.path.length - 1];\n        if (dOff)\n            return this.parent.child(index).cut(0, dOff);\n        return index == 0 ? null : this.parent.child(index - 1);\n    }\n    /**\n    Get the position at the given index in the parent node at the\n    given depth (which defaults to `this.depth`).\n    */\n    posAtIndex(index, depth) {\n        depth = this.resolveDepth(depth);\n        let node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n        for (let i = 0; i < index; i++)\n            pos += node.child(i).nodeSize;\n        return pos;\n    }\n    /**\n    Get the marks at this position, factoring in the surrounding\n    marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the\n    position is at the start of a non-empty node, the marks of the\n    node after it (if any) are returned.\n    */\n    marks() {\n        let parent = this.parent, index = this.index();\n        // In an empty parent, return the empty array\n        if (parent.content.size == 0)\n            return Mark.none;\n        // When inside a text node, just return the text node's marks\n        if (this.textOffset)\n            return parent.child(index).marks;\n        let main = parent.maybeChild(index - 1), other = parent.maybeChild(index);\n        // If the `after` flag is true of there is no node before, make\n        // the node after this position the main reference.\n        if (!main) {\n            let tmp = main;\n            main = other;\n            other = tmp;\n        }\n        // Use all marks in the main node, except those that have\n        // `inclusive` set to false and are not present in the other node.\n        let marks = main.marks;\n        for (var i = 0; i < marks.length; i++)\n            if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks)))\n                marks = marks[i--].removeFromSet(marks);\n        return marks;\n    }\n    /**\n    Get the marks after the current position, if any, except those\n    that are non-inclusive and not present at position `$end`. This\n    is mostly useful for getting the set of marks to preserve after a\n    deletion. Will return `null` if this position is at the end of\n    its parent node or its parent node isn't a textblock (in which\n    case no marks should be preserved).\n    */\n    marksAcross($end) {\n        let after = this.parent.maybeChild(this.index());\n        if (!after || !after.isInline)\n            return null;\n        let marks = after.marks, next = $end.parent.maybeChild($end.index());\n        for (var i = 0; i < marks.length; i++)\n            if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks)))\n                marks = marks[i--].removeFromSet(marks);\n        return marks;\n    }\n    /**\n    The depth up to which this position and the given (non-resolved)\n    position share the same parent nodes.\n    */\n    sharedDepth(pos) {\n        for (let depth = this.depth; depth > 0; depth--)\n            if (this.start(depth) <= pos && this.end(depth) >= pos)\n                return depth;\n        return 0;\n    }\n    /**\n    Returns a range based on the place where this position and the\n    given position diverge around block content. If both point into\n    the same textblock, for example, a range around that textblock\n    will be returned. If they point into different blocks, the range\n    around those blocks in their shared ancestor is returned. You can\n    pass in an optional predicate that will be called with a parent\n    node to see if a range into that parent is acceptable.\n    */\n    blockRange(other = this, pred) {\n        if (other.pos < this.pos)\n            return other.blockRange(this);\n        for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)\n            if (other.pos <= this.end(d) && (!pred || pred(this.node(d))))\n                return new NodeRange(this, other, d);\n        return null;\n    }\n    /**\n    Query whether the given position shares the same parent node.\n    */\n    sameParent(other) {\n        return this.pos - this.parentOffset == other.pos - other.parentOffset;\n    }\n    /**\n    Return the greater of this and the given position.\n    */\n    max(other) {\n        return other.pos > this.pos ? other : this;\n    }\n    /**\n    Return the smaller of this and the given position.\n    */\n    min(other) {\n        return other.pos < this.pos ? other : this;\n    }\n    /**\n    @internal\n    */\n    toString() {\n        let str = \"\";\n        for (let i = 1; i <= this.depth; i++)\n            str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1);\n        return str + \":\" + this.parentOffset;\n    }\n    /**\n    @internal\n    */\n    static resolve(doc, pos) {\n        if (!(pos >= 0 && pos <= doc.content.size))\n            throw new RangeError(\"Position \" + pos + \" out of range\");\n        let path = [];\n        let start = 0, parentOffset = pos;\n        for (let node = doc;;) {\n            let { index, offset } = node.content.findIndex(parentOffset);\n            let rem = parentOffset - offset;\n            path.push(node, index, start + offset);\n            if (!rem)\n                break;\n            node = node.child(index);\n            if (node.isText)\n                break;\n            parentOffset = rem - 1;\n            start += offset + 1;\n        }\n        return new ResolvedPos(pos, path, parentOffset);\n    }\n    /**\n    @internal\n    */\n    static resolveCached(doc, pos) {\n        let cache = resolveCache.get(doc);\n        if (cache) {\n            for (let i = 0; i < cache.elts.length; i++) {\n                let elt = cache.elts[i];\n                if (elt.pos == pos)\n                    return elt;\n            }\n        }\n        else {\n            resolveCache.set(doc, cache = new ResolveCache);\n        }\n        let result = cache.elts[cache.i] = ResolvedPos.resolve(doc, pos);\n        cache.i = (cache.i + 1) % resolveCacheSize;\n        return result;\n    }\n}\nclass ResolveCache {\n    constructor() {\n        this.elts = [];\n        this.i = 0;\n    }\n}\nconst resolveCacheSize = 12, resolveCache = new WeakMap();\n/**\nRepresents a flat range of content, i.e. one that starts and\nends in the same node.\n*/\nclass NodeRange {\n    /**\n    Construct a node range. `$from` and `$to` should point into the\n    same node until at least the given `depth`, since a node range\n    denotes an adjacent set of nodes in a single parent node.\n    */\n    constructor(\n    /**\n    A resolved position along the start of the content. May have a\n    `depth` greater than this object's `depth` property, since\n    these are the positions that were used to compute the range,\n    not re-resolved positions directly at its boundaries.\n    */\n    $from, \n    /**\n    A position along the end of the content. See\n    caveat for [`$from`](https://prosemirror.net/docs/ref/#model.NodeRange.$from).\n    */\n    $to, \n    /**\n    The depth of the node that this range points into.\n    */\n    depth) {\n        this.$from = $from;\n        this.$to = $to;\n        this.depth = depth;\n    }\n    /**\n    The position at the start of the range.\n    */\n    get start() { return this.$from.before(this.depth + 1); }\n    /**\n    The position at the end of the range.\n    */\n    get end() { return this.$to.after(this.depth + 1); }\n    /**\n    The parent node that the range points into.\n    */\n    get parent() { return this.$from.node(this.depth); }\n    /**\n    The start index of the range in the parent node.\n    */\n    get startIndex() { return this.$from.index(this.depth); }\n    /**\n    The end index of the range in the parent node.\n    */\n    get endIndex() { return this.$to.indexAfter(this.depth); }\n}\n\nconst emptyAttrs = Object.create(null);\n/**\nThis class represents a node in the tree that makes up a\nProseMirror document. So a document is an instance of `Node`, with\nchildren that are also instances of `Node`.\n\nNodes are persistent data structures. Instead of changing them, you\ncreate new ones with the content you want. Old ones keep pointing\nat the old document shape. This is made cheaper by sharing\nstructure between the old and new data as much as possible, which a\ntree shape like this (without back pointers) makes easy.\n\n**Do not** directly mutate the properties of a `Node` object. See\n[the guide](https://prosemirror.net/docs/guide/#doc) for more information.\n*/\nclass Node {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    The type of node that this is.\n    */\n    type, \n    /**\n    An object mapping attribute names to values. The kind of\n    attributes allowed and required are\n    [determined](https://prosemirror.net/docs/ref/#model.NodeSpec.attrs) by the node type.\n    */\n    attrs, \n    // A fragment holding the node's children.\n    content, \n    /**\n    The marks (things like whether it is emphasized or part of a\n    link) applied to this node.\n    */\n    marks = Mark.none) {\n        this.type = type;\n        this.attrs = attrs;\n        this.marks = marks;\n        this.content = content || Fragment.empty;\n    }\n    /**\n    The array of this node's child nodes.\n    */\n    get children() { return this.content.content; }\n    /**\n    The size of this node, as defined by the integer-based [indexing\n    scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the\n    amount of characters. For other leaf nodes, it is one. For\n    non-leaf nodes, it is the size of the content plus two (the\n    start and end token).\n    */\n    get nodeSize() { return this.isLeaf ? 1 : 2 + this.content.size; }\n    /**\n    The number of children that the node has.\n    */\n    get childCount() { return this.content.childCount; }\n    /**\n    Get the child node at the given index. Raises an error when the\n    index is out of range.\n    */\n    child(index) { return this.content.child(index); }\n    /**\n    Get the child node at the given index, if it exists.\n    */\n    maybeChild(index) { return this.content.maybeChild(index); }\n    /**\n    Call `f` for every child node, passing the node, its offset\n    into this parent node, and its index.\n    */\n    forEach(f) { this.content.forEach(f); }\n    /**\n    Invoke a callback for all descendant nodes recursively overlapping\n    the given two positions that are relative to start of this\n    node's content. This includes all ancestors of the nodes\n    containing the two positions. The callback is invoked with the\n    node, its position relative to the original node (method receiver),\n    its parent node, and its child index. When the callback returns\n    false for a given node, that node's children will not be\n    recursed over. The last parameter can be used to specify a\n    starting position to count from.\n    */\n    nodesBetween(from, to, f, startPos = 0) {\n        this.content.nodesBetween(from, to, f, startPos, this);\n    }\n    /**\n    Call the given callback for every descendant node. Doesn't\n    descend into a node when the callback returns `false`.\n    */\n    descendants(f) {\n        this.nodesBetween(0, this.content.size, f);\n    }\n    /**\n    Concatenates all the text nodes found in this fragment and its\n    children.\n    */\n    get textContent() {\n        return (this.isLeaf && this.type.spec.leafText)\n            ? this.type.spec.leafText(this)\n            : this.textBetween(0, this.content.size, \"\");\n    }\n    /**\n    Get all text between positions `from` and `to`. When\n    `blockSeparator` is given, it will be inserted to separate text\n    from different block nodes. If `leafText` is given, it'll be\n    inserted for every non-text leaf node encountered, otherwise\n    [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec.leafText) will be used.\n    */\n    textBetween(from, to, blockSeparator, leafText) {\n        return this.content.textBetween(from, to, blockSeparator, leafText);\n    }\n    /**\n    Returns this node's first child, or `null` if there are no\n    children.\n    */\n    get firstChild() { return this.content.firstChild; }\n    /**\n    Returns this node's last child, or `null` if there are no\n    children.\n    */\n    get lastChild() { return this.content.lastChild; }\n    /**\n    Test whether two nodes represent the same piece of document.\n    */\n    eq(other) {\n        return this == other || (this.sameMarkup(other) && this.content.eq(other.content));\n    }\n    /**\n    Compare the markup (type, attributes, and marks) of this node to\n    those of another. Returns `true` if both have the same markup.\n    */\n    sameMarkup(other) {\n        return this.hasMarkup(other.type, other.attrs, other.marks);\n    }\n    /**\n    Check whether this node's markup correspond to the given type,\n    attributes, and marks.\n    */\n    hasMarkup(type, attrs, marks) {\n        return this.type == type &&\n            compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) &&\n            Mark.sameSet(this.marks, marks || Mark.none);\n    }\n    /**\n    Create a new node with the same markup as this node, containing\n    the given content (or empty, if no content is given).\n    */\n    copy(content = null) {\n        if (content == this.content)\n            return this;\n        return new Node(this.type, this.attrs, content, this.marks);\n    }\n    /**\n    Create a copy of this node, with the given set of marks instead\n    of the node's own marks.\n    */\n    mark(marks) {\n        return marks == this.marks ? this : new Node(this.type, this.attrs, this.content, marks);\n    }\n    /**\n    Create a copy of this node with only the content between the\n    given positions. If `to` is not given, it defaults to the end of\n    the node.\n    */\n    cut(from, to = this.content.size) {\n        if (from == 0 && to == this.content.size)\n            return this;\n        return this.copy(this.content.cut(from, to));\n    }\n    /**\n    Cut out the part of the document between the given positions, and\n    return it as a `Slice` object.\n    */\n    slice(from, to = this.content.size, includeParents = false) {\n        if (from == to)\n            return Slice.empty;\n        let $from = this.resolve(from), $to = this.resolve(to);\n        let depth = includeParents ? 0 : $from.sharedDepth(to);\n        let start = $from.start(depth), node = $from.node(depth);\n        let content = node.content.cut($from.pos - start, $to.pos - start);\n        return new Slice(content, $from.depth - depth, $to.depth - depth);\n    }\n    /**\n    Replace the part of the document between the given positions with\n    the given slice. The slice must 'fit', meaning its open sides\n    must be able to connect to the surrounding content, and its\n    content nodes must be valid children for the node they are placed\n    into. If any of this is violated, an error of type\n    [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.\n    */\n    replace(from, to, slice) {\n        return replace(this.resolve(from), this.resolve(to), slice);\n    }\n    /**\n    Find the node directly after the given position.\n    */\n    nodeAt(pos) {\n        for (let node = this;;) {\n            let { index, offset } = node.content.findIndex(pos);\n            node = node.maybeChild(index);\n            if (!node)\n                return null;\n            if (offset == pos || node.isText)\n                return node;\n            pos -= offset + 1;\n        }\n    }\n    /**\n    Find the (direct) child node after the given offset, if any,\n    and return it along with its index and offset relative to this\n    node.\n    */\n    childAfter(pos) {\n        let { index, offset } = this.content.findIndex(pos);\n        return { node: this.content.maybeChild(index), index, offset };\n    }\n    /**\n    Find the (direct) child node before the given offset, if any,\n    and return it along with its index and offset relative to this\n    node.\n    */\n    childBefore(pos) {\n        if (pos == 0)\n            return { node: null, index: 0, offset: 0 };\n        let { index, offset } = this.content.findIndex(pos);\n        if (offset < pos)\n            return { node: this.content.child(index), index, offset };\n        let node = this.content.child(index - 1);\n        return { node, index: index - 1, offset: offset - node.nodeSize };\n    }\n    /**\n    Resolve the given position in the document, returning an\n    [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.\n    */\n    resolve(pos) { return ResolvedPos.resolveCached(this, pos); }\n    /**\n    @internal\n    */\n    resolveNoCache(pos) { return ResolvedPos.resolve(this, pos); }\n    /**\n    Test whether a given mark or mark type occurs in this document\n    between the two given positions.\n    */\n    rangeHasMark(from, to, type) {\n        let found = false;\n        if (to > from)\n            this.nodesBetween(from, to, node => {\n                if (type.isInSet(node.marks))\n                    found = true;\n                return !found;\n            });\n        return found;\n    }\n    /**\n    True when this is a block (non-inline node)\n    */\n    get isBlock() { return this.type.isBlock; }\n    /**\n    True when this is a textblock node, a block node with inline\n    content.\n    */\n    get isTextblock() { return this.type.isTextblock; }\n    /**\n    True when this node allows inline content.\n    */\n    get inlineContent() { return this.type.inlineContent; }\n    /**\n    True when this is an inline node (a text node or a node that can\n    appear among text).\n    */\n    get isInline() { return this.type.isInline; }\n    /**\n    True when this is a text node.\n    */\n    get isText() { return this.type.isText; }\n    /**\n    True when this is a leaf node.\n    */\n    get isLeaf() { return this.type.isLeaf; }\n    /**\n    True when this is an atom, i.e. when it does not have directly\n    editable content. This is usually the same as `isLeaf`, but can\n    be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom)\n    on a node's spec (typically used when the node is displayed as\n    an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)).\n    */\n    get isAtom() { return this.type.isAtom; }\n    /**\n    Return a string representation of this node for debugging\n    purposes.\n    */\n    toString() {\n        if (this.type.spec.toDebugString)\n            return this.type.spec.toDebugString(this);\n        let name = this.type.name;\n        if (this.content.size)\n            name += \"(\" + this.content.toStringInner() + \")\";\n        return wrapMarks(this.marks, name);\n    }\n    /**\n    Get the content match in this node at the given index.\n    */\n    contentMatchAt(index) {\n        let match = this.type.contentMatch.matchFragment(this.content, 0, index);\n        if (!match)\n            throw new Error(\"Called contentMatchAt on a node with invalid content\");\n        return match;\n    }\n    /**\n    Test whether replacing the range between `from` and `to` (by\n    child index) with the given replacement fragment (which defaults\n    to the empty fragment) would leave the node's content valid. You\n    can optionally pass `start` and `end` indices into the\n    replacement fragment.\n    */\n    canReplace(from, to, replacement = Fragment.empty, start = 0, end = replacement.childCount) {\n        let one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n        let two = one && one.matchFragment(this.content, to);\n        if (!two || !two.validEnd)\n            return false;\n        for (let i = start; i < end; i++)\n            if (!this.type.allowsMarks(replacement.child(i).marks))\n                return false;\n        return true;\n    }\n    /**\n    Test whether replacing the range `from` to `to` (by index) with\n    a node of the given type would leave the node's content valid.\n    */\n    canReplaceWith(from, to, type, marks) {\n        if (marks && !this.type.allowsMarks(marks))\n            return false;\n        let start = this.contentMatchAt(from).matchType(type);\n        let end = start && start.matchFragment(this.content, to);\n        return end ? end.validEnd : false;\n    }\n    /**\n    Test whether the given node's content could be appended to this\n    node. If that node is empty, this will only return true if there\n    is at least one node type that can appear in both nodes (to avoid\n    merging completely incompatible nodes).\n    */\n    canAppend(other) {\n        if (other.content.size)\n            return this.canReplace(this.childCount, this.childCount, other.content);\n        else\n            return this.type.compatibleContent(other.type);\n    }\n    /**\n    Check whether this node and its descendants conform to the\n    schema, and raise an exception when they do not.\n    */\n    check() {\n        this.type.checkContent(this.content);\n        checkAttrs(this.type.attrs, this.attrs, \"node\", this.type.name);\n        let copy = Mark.none;\n        for (let i = 0; i < this.marks.length; i++) {\n            let mark = this.marks[i];\n            checkAttrs(mark.type.attrs, mark.attrs, \"mark\", mark.type.name);\n            copy = mark.addToSet(copy);\n        }\n        if (!Mark.sameSet(copy, this.marks))\n            throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(m => m.type.name)}`);\n        this.content.forEach(node => node.check());\n    }\n    /**\n    Return a JSON-serializeable representation of this node.\n    */\n    toJSON() {\n        let obj = { type: this.type.name };\n        for (let _ in this.attrs) {\n            obj.attrs = this.attrs;\n            break;\n        }\n        if (this.content.size)\n            obj.content = this.content.toJSON();\n        if (this.marks.length)\n            obj.marks = this.marks.map(n => n.toJSON());\n        return obj;\n    }\n    /**\n    Deserialize a node from its JSON representation.\n    */\n    static fromJSON(schema, json) {\n        if (!json)\n            throw new RangeError(\"Invalid input for Node.fromJSON\");\n        let marks = undefined;\n        if (json.marks) {\n            if (!Array.isArray(json.marks))\n                throw new RangeError(\"Invalid mark data for Node.fromJSON\");\n            marks = json.marks.map(schema.markFromJSON);\n        }\n        if (json.type == \"text\") {\n            if (typeof json.text != \"string\")\n                throw new RangeError(\"Invalid text node in JSON\");\n            return schema.text(json.text, marks);\n        }\n        let content = Fragment.fromJSON(schema, json.content);\n        let node = schema.nodeType(json.type).create(json.attrs, content, marks);\n        return node;\n    }\n}\nNode.prototype.text = undefined;\nclass TextNode extends Node {\n    /**\n    @internal\n    */\n    constructor(type, attrs, content, marks) {\n        super(type, attrs, null, marks);\n        if (!content)\n            throw new RangeError(\"Empty text nodes are not allowed\");\n        this.text = content;\n    }\n    toString() {\n        if (this.type.spec.toDebugString)\n            return this.type.spec.toDebugString(this);\n        return wrapMarks(this.marks, JSON.stringify(this.text));\n    }\n    get textContent() { return this.text; }\n    textBetween(from, to) { return this.text.slice(from, to); }\n    get nodeSize() { return this.text.length; }\n    mark(marks) {\n        return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks);\n    }\n    withText(text) {\n        if (text == this.text)\n            return this;\n        return new TextNode(this.type, this.attrs, text, this.marks);\n    }\n    cut(from = 0, to = this.text.length) {\n        if (from == 0 && to == this.text.length)\n            return this;\n        return this.withText(this.text.slice(from, to));\n    }\n    eq(other) {\n        return this.sameMarkup(other) && this.text == other.text;\n    }\n    toJSON() {\n        let base = super.toJSON();\n        base.text = this.text;\n        return base;\n    }\n}\nfunction wrapMarks(marks, str) {\n    for (let i = marks.length - 1; i >= 0; i--)\n        str = marks[i].type.name + \"(\" + str + \")\";\n    return str;\n}\nfunction checkAttrs(attrs, values, type, name) {\n    for (let attr in values)\n        if (!(attr in attrs))\n            throw new RangeError(`Unsupported attribute ${attr} for ${type} of type ${name}`);\n    for (let attr in attrs) {\n        if (attrs[attr].validate)\n            attrs[attr].validate(values[attr]);\n    }\n}\n\n/**\nInstances of this class represent a match state of a node type's\n[content expression](https://prosemirror.net/docs/ref/#model.NodeSpec.content), and can be used to\nfind out whether further content matches here, and whether a given\nposition is a valid end of the node.\n*/\nclass ContentMatch {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    True when this match state represents a valid end of the node.\n    */\n    validEnd) {\n        this.validEnd = validEnd;\n        /**\n        @internal\n        */\n        this.next = [];\n        /**\n        @internal\n        */\n        this.wrapCache = [];\n    }\n    /**\n    @internal\n    */\n    static parse(string, nodeTypes) {\n        let stream = new TokenStream(string, nodeTypes);\n        if (stream.next == null)\n            return ContentMatch.empty;\n        let expr = parseExpr(stream);\n        if (stream.next)\n            stream.err(\"Unexpected trailing text\");\n        let match = dfa(nfa(expr));\n        checkForDeadEnds(match, stream);\n        return match;\n    }\n    /**\n    Match a node type, returning a match after that node if\n    successful.\n    */\n    matchType(type) {\n        for (let i = 0; i < this.next.length; i++)\n            if (this.next[i].type == type)\n                return this.next[i].next;\n        return null;\n    }\n    /**\n    Try to match a fragment. Returns the resulting match when\n    successful.\n    */\n    matchFragment(frag, start = 0, end = frag.childCount) {\n        let cur = this;\n        for (let i = start; cur && i < end; i++)\n            cur = cur.matchType(frag.child(i).type);\n        return cur;\n    }\n    /**\n    @internal\n    */\n    get inlineContent() {\n        return this.next.length != 0 && this.next[0].type.isInline;\n    }\n    /**\n    Get the first matching node type at this match position that can\n    be generated.\n    */\n    get defaultType() {\n        for (let i = 0; i < this.next.length; i++) {\n            let { type } = this.next[i];\n            if (!(type.isText || type.hasRequiredAttrs()))\n                return type;\n        }\n        return null;\n    }\n    /**\n    @internal\n    */\n    compatible(other) {\n        for (let i = 0; i < this.next.length; i++)\n            for (let j = 0; j < other.next.length; j++)\n                if (this.next[i].type == other.next[j].type)\n                    return true;\n        return false;\n    }\n    /**\n    Try to match the given fragment, and if that fails, see if it can\n    be made to match by inserting nodes in front of it. When\n    successful, return a fragment of inserted nodes (which may be\n    empty if nothing had to be inserted). When `toEnd` is true, only\n    return a fragment if the resulting match goes to the end of the\n    content expression.\n    */\n    fillBefore(after, toEnd = false, startIndex = 0) {\n        let seen = [this];\n        function search(match, types) {\n            let finished = match.matchFragment(after, startIndex);\n            if (finished && (!toEnd || finished.validEnd))\n                return Fragment.from(types.map(tp => tp.createAndFill()));\n            for (let i = 0; i < match.next.length; i++) {\n                let { type, next } = match.next[i];\n                if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n                    seen.push(next);\n                    let found = search(next, types.concat(type));\n                    if (found)\n                        return found;\n                }\n            }\n            return null;\n        }\n        return search(this, []);\n    }\n    /**\n    Find a set of wrapping node types that would allow a node of the\n    given type to appear at this position. The result may be empty\n    (when it fits directly) and will be null when no such wrapping\n    exists.\n    */\n    findWrapping(target) {\n        for (let i = 0; i < this.wrapCache.length; i += 2)\n            if (this.wrapCache[i] == target)\n                return this.wrapCache[i + 1];\n        let computed = this.computeWrapping(target);\n        this.wrapCache.push(target, computed);\n        return computed;\n    }\n    /**\n    @internal\n    */\n    computeWrapping(target) {\n        let seen = Object.create(null), active = [{ match: this, type: null, via: null }];\n        while (active.length) {\n            let current = active.shift(), match = current.match;\n            if (match.matchType(target)) {\n                let result = [];\n                for (let obj = current; obj.type; obj = obj.via)\n                    result.push(obj.type);\n                return result.reverse();\n            }\n            for (let i = 0; i < match.next.length; i++) {\n                let { type, next } = match.next[i];\n                if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) {\n                    active.push({ match: type.contentMatch, type, via: current });\n                    seen[type.name] = true;\n                }\n            }\n        }\n        return null;\n    }\n    /**\n    The number of outgoing edges this node has in the finite\n    automaton that describes the content expression.\n    */\n    get edgeCount() {\n        return this.next.length;\n    }\n    /**\n    Get the _n_​th outgoing edge from this node in the finite\n    automaton that describes the content expression.\n    */\n    edge(n) {\n        if (n >= this.next.length)\n            throw new RangeError(`There's no ${n}th edge in this content match`);\n        return this.next[n];\n    }\n    /**\n    @internal\n    */\n    toString() {\n        let seen = [];\n        function scan(m) {\n            seen.push(m);\n            for (let i = 0; i < m.next.length; i++)\n                if (seen.indexOf(m.next[i].next) == -1)\n                    scan(m.next[i].next);\n        }\n        scan(this);\n        return seen.map((m, i) => {\n            let out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n            for (let i = 0; i < m.next.length; i++)\n                out += (i ? \", \" : \"\") + m.next[i].type.name + \"->\" + seen.indexOf(m.next[i].next);\n            return out;\n        }).join(\"\\n\");\n    }\n}\n/**\n@internal\n*/\nContentMatch.empty = new ContentMatch(true);\nclass TokenStream {\n    constructor(string, nodeTypes) {\n        this.string = string;\n        this.nodeTypes = nodeTypes;\n        this.inline = null;\n        this.pos = 0;\n        this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n        if (this.tokens[this.tokens.length - 1] == \"\")\n            this.tokens.pop();\n        if (this.tokens[0] == \"\")\n            this.tokens.shift();\n    }\n    get next() { return this.tokens[this.pos]; }\n    eat(tok) { return this.next == tok && (this.pos++ || true); }\n    err(str) { throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\"); }\n}\nfunction parseExpr(stream) {\n    let exprs = [];\n    do {\n        exprs.push(parseExprSeq(stream));\n    } while (stream.eat(\"|\"));\n    return exprs.length == 1 ? exprs[0] : { type: \"choice\", exprs };\n}\nfunction parseExprSeq(stream) {\n    let exprs = [];\n    do {\n        exprs.push(parseExprSubscript(stream));\n    } while (stream.next && stream.next != \")\" && stream.next != \"|\");\n    return exprs.length == 1 ? exprs[0] : { type: \"seq\", exprs };\n}\nfunction parseExprSubscript(stream) {\n    let expr = parseExprAtom(stream);\n    for (;;) {\n        if (stream.eat(\"+\"))\n            expr = { type: \"plus\", expr };\n        else if (stream.eat(\"*\"))\n            expr = { type: \"star\", expr };\n        else if (stream.eat(\"?\"))\n            expr = { type: \"opt\", expr };\n        else if (stream.eat(\"{\"))\n            expr = parseExprRange(stream, expr);\n        else\n            break;\n    }\n    return expr;\n}\nfunction parseNum(stream) {\n    if (/\\D/.test(stream.next))\n        stream.err(\"Expected number, got '\" + stream.next + \"'\");\n    let result = Number(stream.next);\n    stream.pos++;\n    return result;\n}\nfunction parseExprRange(stream, expr) {\n    let min = parseNum(stream), max = min;\n    if (stream.eat(\",\")) {\n        if (stream.next != \"}\")\n            max = parseNum(stream);\n        else\n            max = -1;\n    }\n    if (!stream.eat(\"}\"))\n        stream.err(\"Unclosed braced range\");\n    return { type: \"range\", min, max, expr };\n}\nfunction resolveName(stream, name) {\n    let types = stream.nodeTypes, type = types[name];\n    if (type)\n        return [type];\n    let result = [];\n    for (let typeName in types) {\n        let type = types[typeName];\n        if (type.isInGroup(name))\n            result.push(type);\n    }\n    if (result.length == 0)\n        stream.err(\"No node type or group '\" + name + \"' found\");\n    return result;\n}\nfunction parseExprAtom(stream) {\n    if (stream.eat(\"(\")) {\n        let expr = parseExpr(stream);\n        if (!stream.eat(\")\"))\n            stream.err(\"Missing closing paren\");\n        return expr;\n    }\n    else if (!/\\W/.test(stream.next)) {\n        let exprs = resolveName(stream, stream.next).map(type => {\n            if (stream.inline == null)\n                stream.inline = type.isInline;\n            else if (stream.inline != type.isInline)\n                stream.err(\"Mixing inline and block content\");\n            return { type: \"name\", value: type };\n        });\n        stream.pos++;\n        return exprs.length == 1 ? exprs[0] : { type: \"choice\", exprs };\n    }\n    else {\n        stream.err(\"Unexpected token '\" + stream.next + \"'\");\n    }\n}\n// Construct an NFA from an expression as returned by the parser. The\n// NFA is represented as an array of states, which are themselves\n// arrays of edges, which are `{term, to}` objects. The first state is\n// the entry state and the last node is the success state.\n//\n// Note that unlike typical NFAs, the edge ordering in this one is\n// significant, in that it is used to contruct filler content when\n// necessary.\nfunction nfa(expr) {\n    let nfa = [[]];\n    connect(compile(expr, 0), node());\n    return nfa;\n    function node() { return nfa.push([]) - 1; }\n    function edge(from, to, term) {\n        let edge = { term, to };\n        nfa[from].push(edge);\n        return edge;\n    }\n    function connect(edges, to) {\n        edges.forEach(edge => edge.to = to);\n    }\n    function compile(expr, from) {\n        if (expr.type == \"choice\") {\n            return expr.exprs.reduce((out, expr) => out.concat(compile(expr, from)), []);\n        }\n        else if (expr.type == \"seq\") {\n            for (let i = 0;; i++) {\n                let next = compile(expr.exprs[i], from);\n                if (i == expr.exprs.length - 1)\n                    return next;\n                connect(next, from = node());\n            }\n        }\n        else if (expr.type == \"star\") {\n            let loop = node();\n            edge(from, loop);\n            connect(compile(expr.expr, loop), loop);\n            return [edge(loop)];\n        }\n        else if (expr.type == \"plus\") {\n            let loop = node();\n            connect(compile(expr.expr, from), loop);\n            connect(compile(expr.expr, loop), loop);\n            return [edge(loop)];\n        }\n        else if (expr.type == \"opt\") {\n            return [edge(from)].concat(compile(expr.expr, from));\n        }\n        else if (expr.type == \"range\") {\n            let cur = from;\n            for (let i = 0; i < expr.min; i++) {\n                let next = node();\n                connect(compile(expr.expr, cur), next);\n                cur = next;\n            }\n            if (expr.max == -1) {\n                connect(compile(expr.expr, cur), cur);\n            }\n            else {\n                for (let i = expr.min; i < expr.max; i++) {\n                    let next = node();\n                    edge(cur, next);\n                    connect(compile(expr.expr, cur), next);\n                    cur = next;\n                }\n            }\n            return [edge(cur)];\n        }\n        else if (expr.type == \"name\") {\n            return [edge(from, undefined, expr.value)];\n        }\n        else {\n            throw new Error(\"Unknown expr type\");\n        }\n    }\n}\nfunction cmp(a, b) { return b - a; }\n// Get the set of nodes reachable by null edges from `node`. Omit\n// nodes with only a single null-out-edge, since they may lead to\n// needless duplicated nodes.\nfunction nullFrom(nfa, node) {\n    let result = [];\n    scan(node);\n    return result.sort(cmp);\n    function scan(node) {\n        let edges = nfa[node];\n        if (edges.length == 1 && !edges[0].term)\n            return scan(edges[0].to);\n        result.push(node);\n        for (let i = 0; i < edges.length; i++) {\n            let { term, to } = edges[i];\n            if (!term && result.indexOf(to) == -1)\n                scan(to);\n        }\n    }\n}\n// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set\n// of state objects (`ContentMatch` instances) with transitions\n// between them.\nfunction dfa(nfa) {\n    let labeled = Object.create(null);\n    return explore(nullFrom(nfa, 0));\n    function explore(states) {\n        let out = [];\n        states.forEach(node => {\n            nfa[node].forEach(({ term, to }) => {\n                if (!term)\n                    return;\n                let set;\n                for (let i = 0; i < out.length; i++)\n                    if (out[i][0] == term)\n                        set = out[i][1];\n                nullFrom(nfa, to).forEach(node => {\n                    if (!set)\n                        out.push([term, set = []]);\n                    if (set.indexOf(node) == -1)\n                        set.push(node);\n                });\n            });\n        });\n        let state = labeled[states.join(\",\")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1);\n        for (let i = 0; i < out.length; i++) {\n            let states = out[i][1].sort(cmp);\n            state.next.push({ type: out[i][0], next: labeled[states.join(\",\")] || explore(states) });\n        }\n        return state;\n    }\n}\nfunction checkForDeadEnds(match, stream) {\n    for (let i = 0, work = [match]; i < work.length; i++) {\n        let state = work[i], dead = !state.validEnd, nodes = [];\n        for (let j = 0; j < state.next.length; j++) {\n            let { type, next } = state.next[j];\n            nodes.push(type.name);\n            if (dead && !(type.isText || type.hasRequiredAttrs()))\n                dead = false;\n            if (work.indexOf(next) == -1)\n                work.push(next);\n        }\n        if (dead)\n            stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position (see https://prosemirror.net/docs/guide/#generatable)\");\n    }\n}\n\n// For node types where all attrs have a default value (or which don't\n// have any attributes), build up a single reusable default attribute\n// object, and use it for all nodes that don't specify specific\n// attributes.\nfunction defaultAttrs(attrs) {\n    let defaults = Object.create(null);\n    for (let attrName in attrs) {\n        let attr = attrs[attrName];\n        if (!attr.hasDefault)\n            return null;\n        defaults[attrName] = attr.default;\n    }\n    return defaults;\n}\nfunction computeAttrs(attrs, value) {\n    let built = Object.create(null);\n    for (let name in attrs) {\n        let attr = attrs[name];\n        let given = value && value[name];\n        if (given === undefined) {\n            if (attr.hasDefault)\n                given = attr.default;\n            else\n                throw new RangeError(\"No value supplied for attribute \" + name);\n        }\n        else if (attr.validate) {\n            attr.validate(given);\n        }\n        built[name] = given;\n    }\n    return built;\n}\nfunction initAttrs(typeName, attrs) {\n    let result = Object.create(null);\n    if (attrs)\n        for (let name in attrs)\n            result[name] = new Attribute(typeName, name, attrs[name]);\n    return result;\n}\n/**\nNode types are objects allocated once per `Schema` and used to\n[tag](https://prosemirror.net/docs/ref/#model.Node.type) `Node` instances. They contain information\nabout the node type, such as its name and what kind of node it\nrepresents.\n*/\nclass NodeType {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    The name the node type has in this schema.\n    */\n    name, \n    /**\n    A link back to the `Schema` the node type belongs to.\n    */\n    schema, \n    /**\n    The spec that this type is based on\n    */\n    spec) {\n        this.name = name;\n        this.schema = schema;\n        this.spec = spec;\n        /**\n        The set of marks allowed in this node. `null` means all marks\n        are allowed.\n        */\n        this.markSet = null;\n        this.groups = spec.group ? spec.group.split(\" \") : [];\n        this.attrs = initAttrs(name, spec.attrs);\n        this.defaultAttrs = defaultAttrs(this.attrs);\n        this.contentMatch = null;\n        this.inlineContent = null;\n        this.isBlock = !(spec.inline || name == \"text\");\n        this.isText = name == \"text\";\n    }\n    /**\n    True if this is an inline type.\n    */\n    get isInline() { return !this.isBlock; }\n    /**\n    True if this is a textblock type, a block that contains inline\n    content.\n    */\n    get isTextblock() { return this.isBlock && this.inlineContent; }\n    /**\n    True for node types that allow no content.\n    */\n    get isLeaf() { return this.contentMatch == ContentMatch.empty; }\n    /**\n    True when this node is an atom, i.e. when it does not have\n    directly editable content.\n    */\n    get isAtom() { return this.isLeaf || !!this.spec.atom; }\n    /**\n    Return true when this node type is part of the given\n    [group](https://prosemirror.net/docs/ref/#model.NodeSpec.group).\n    */\n    isInGroup(group) {\n        return this.groups.indexOf(group) > -1;\n    }\n    /**\n    The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option.\n    */\n    get whitespace() {\n        return this.spec.whitespace || (this.spec.code ? \"pre\" : \"normal\");\n    }\n    /**\n    Tells you whether this node type has any required attributes.\n    */\n    hasRequiredAttrs() {\n        for (let n in this.attrs)\n            if (this.attrs[n].isRequired)\n                return true;\n        return false;\n    }\n    /**\n    Indicates whether this node allows some of the same content as\n    the given node type.\n    */\n    compatibleContent(other) {\n        return this == other || this.contentMatch.compatible(other.contentMatch);\n    }\n    /**\n    @internal\n    */\n    computeAttrs(attrs) {\n        if (!attrs && this.defaultAttrs)\n            return this.defaultAttrs;\n        else\n            return computeAttrs(this.attrs, attrs);\n    }\n    /**\n    Create a `Node` of this type. The given attributes are\n    checked and defaulted (you can pass `null` to use the type's\n    defaults entirely, if no required attributes exist). `content`\n    may be a `Fragment`, a node, an array of nodes, or\n    `null`. Similarly `marks` may be `null` to default to the empty\n    set of marks.\n    */\n    create(attrs = null, content, marks) {\n        if (this.isText)\n            throw new Error(\"NodeType.create can't construct text nodes\");\n        return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks));\n    }\n    /**\n    Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content\n    against the node type's content restrictions, and throw an error\n    if it doesn't match.\n    */\n    createChecked(attrs = null, content, marks) {\n        content = Fragment.from(content);\n        this.checkContent(content);\n        return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));\n    }\n    /**\n    Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is\n    necessary to add nodes to the start or end of the given fragment\n    to make it fit the node. If no fitting wrapping can be found,\n    return null. Note that, due to the fact that required nodes can\n    always be created, this will always succeed if you pass null or\n    `Fragment.empty` as content.\n    */\n    createAndFill(attrs = null, content, marks) {\n        attrs = this.computeAttrs(attrs);\n        content = Fragment.from(content);\n        if (content.size) {\n            let before = this.contentMatch.fillBefore(content);\n            if (!before)\n                return null;\n            content = before.append(content);\n        }\n        let matched = this.contentMatch.matchFragment(content);\n        let after = matched && matched.fillBefore(Fragment.empty, true);\n        if (!after)\n            return null;\n        return new Node(this, attrs, content.append(after), Mark.setFrom(marks));\n    }\n    /**\n    Returns true if the given fragment is valid content for this node\n    type.\n    */\n    validContent(content) {\n        let result = this.contentMatch.matchFragment(content);\n        if (!result || !result.validEnd)\n            return false;\n        for (let i = 0; i < content.childCount; i++)\n            if (!this.allowsMarks(content.child(i).marks))\n                return false;\n        return true;\n    }\n    /**\n    Throws a RangeError if the given fragment is not valid content for this\n    node type.\n    @internal\n    */\n    checkContent(content) {\n        if (!this.validContent(content))\n            throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`);\n    }\n    /**\n    @internal no longer useful, but called by old prosemirror-view versions\n    */\n    checkAttrs(attrs) { }\n    /**\n    Check whether the given mark type is allowed in this node.\n    */\n    allowsMarkType(markType) {\n        return this.markSet == null || this.markSet.indexOf(markType) > -1;\n    }\n    /**\n    Test whether the given set of marks are allowed in this node.\n    */\n    allowsMarks(marks) {\n        if (this.markSet == null)\n            return true;\n        for (let i = 0; i < marks.length; i++)\n            if (!this.allowsMarkType(marks[i].type))\n                return false;\n        return true;\n    }\n    /**\n    Removes the marks that are not allowed in this node from the given set.\n    */\n    allowedMarks(marks) {\n        if (this.markSet == null)\n            return marks;\n        let copy;\n        for (let i = 0; i < marks.length; i++) {\n            if (!this.allowsMarkType(marks[i].type)) {\n                if (!copy)\n                    copy = marks.slice(0, i);\n            }\n            else if (copy) {\n                copy.push(marks[i]);\n            }\n        }\n        return !copy ? marks : copy.length ? copy : Mark.none;\n    }\n    /**\n    @internal\n    */\n    static compile(nodes, schema) {\n        let result = Object.create(null);\n        nodes.forEach((name, spec) => result[name] = new NodeType(name, schema, spec));\n        let topType = schema.spec.topNode || \"doc\";\n        if (!result[topType])\n            throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\");\n        if (!result.text)\n            throw new RangeError(\"Every schema needs a 'text' type\");\n        for (let _ in result.text.attrs)\n            throw new RangeError(\"The text node type should not have attributes\");\n        return result;\n    }\n}\nfunction validateType(typeName, attrName, type) {\n    let types = type.split(\"|\");\n    return (value) => {\n        let name = value === null ? \"null\" : typeof value;\n        if (types.indexOf(name) < 0)\n            throw new RangeError(`Expected value of type ${types} for attribute ${attrName} on type ${typeName}, got ${name}`);\n    };\n}\n// Attribute descriptors\nclass Attribute {\n    constructor(typeName, attrName, options) {\n        this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n        this.default = options.default;\n        this.validate = typeof options.validate == \"string\" ? validateType(typeName, attrName, options.validate) : options.validate;\n    }\n    get isRequired() {\n        return !this.hasDefault;\n    }\n}\n// Marks\n/**\nLike nodes, marks (which are associated with nodes to signify\nthings like emphasis or being part of a link) are\n[tagged](https://prosemirror.net/docs/ref/#model.Mark.type) with type objects, which are\ninstantiated once per `Schema`.\n*/\nclass MarkType {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    The name of the mark type.\n    */\n    name, \n    /**\n    @internal\n    */\n    rank, \n    /**\n    The schema that this mark type instance is part of.\n    */\n    schema, \n    /**\n    The spec on which the type is based.\n    */\n    spec) {\n        this.name = name;\n        this.rank = rank;\n        this.schema = schema;\n        this.spec = spec;\n        this.attrs = initAttrs(name, spec.attrs);\n        this.excluded = null;\n        let defaults = defaultAttrs(this.attrs);\n        this.instance = defaults ? new Mark(this, defaults) : null;\n    }\n    /**\n    Create a mark of this type. `attrs` may be `null` or an object\n    containing only some of the mark's attributes. The others, if\n    they have defaults, will be added.\n    */\n    create(attrs = null) {\n        if (!attrs && this.instance)\n            return this.instance;\n        return new Mark(this, computeAttrs(this.attrs, attrs));\n    }\n    /**\n    @internal\n    */\n    static compile(marks, schema) {\n        let result = Object.create(null), rank = 0;\n        marks.forEach((name, spec) => result[name] = new MarkType(name, rank++, schema, spec));\n        return result;\n    }\n    /**\n    When there is a mark of this type in the given set, a new set\n    without it is returned. Otherwise, the input set is returned.\n    */\n    removeFromSet(set) {\n        for (var i = 0; i < set.length; i++)\n            if (set[i].type == this) {\n                set = set.slice(0, i).concat(set.slice(i + 1));\n                i--;\n            }\n        return set;\n    }\n    /**\n    Tests whether there is a mark of this type in the given set.\n    */\n    isInSet(set) {\n        for (let i = 0; i < set.length; i++)\n            if (set[i].type == this)\n                return set[i];\n    }\n    /**\n    Queries whether a given mark type is\n    [excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one.\n    */\n    excludes(other) {\n        return this.excluded.indexOf(other) > -1;\n    }\n}\n/**\nA document schema. Holds [node](https://prosemirror.net/docs/ref/#model.NodeType) and [mark\ntype](https://prosemirror.net/docs/ref/#model.MarkType) objects for the nodes and marks that may\noccur in conforming documents, and provides functionality for\ncreating and deserializing such documents.\n\nWhen given, the type parameters provide the names of the nodes and\nmarks in this schema.\n*/\nclass Schema {\n    /**\n    Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).\n    */\n    constructor(spec) {\n        /**\n        The [linebreak\n        replacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement) node defined\n        in this schema, if any.\n        */\n        this.linebreakReplacement = null;\n        /**\n        An object for storing whatever values modules may want to\n        compute and cache per schema. (If you want to store something\n        in it, try to use property names unlikely to clash.)\n        */\n        this.cached = Object.create(null);\n        let instanceSpec = this.spec = {};\n        for (let prop in spec)\n            instanceSpec[prop] = spec[prop];\n        instanceSpec.nodes = OrderedMap.from(spec.nodes),\n            instanceSpec.marks = OrderedMap.from(spec.marks || {}),\n            this.nodes = NodeType.compile(this.spec.nodes, this);\n        this.marks = MarkType.compile(this.spec.marks, this);\n        let contentExprCache = Object.create(null);\n        for (let prop in this.nodes) {\n            if (prop in this.marks)\n                throw new RangeError(prop + \" can not be both a node and a mark\");\n            let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n            type.contentMatch = contentExprCache[contentExpr] ||\n                (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n            type.inlineContent = type.contentMatch.inlineContent;\n            if (type.spec.linebreakReplacement) {\n                if (this.linebreakReplacement)\n                    throw new RangeError(\"Multiple linebreak nodes defined\");\n                if (!type.isInline || !type.isLeaf)\n                    throw new RangeError(\"Linebreak replacement nodes must be inline leaf nodes\");\n                this.linebreakReplacement = type;\n            }\n            type.markSet = markExpr == \"_\" ? null :\n                markExpr ? gatherMarks(this, markExpr.split(\" \")) :\n                    markExpr == \"\" || !type.inlineContent ? [] : null;\n        }\n        for (let prop in this.marks) {\n            let type = this.marks[prop], excl = type.spec.excludes;\n            type.excluded = excl == null ? [type] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n        }\n        this.nodeFromJSON = json => Node.fromJSON(this, json);\n        this.markFromJSON = json => Mark.fromJSON(this, json);\n        this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n        this.cached.wrappings = Object.create(null);\n    }\n    /**\n    Create a node in this schema. The `type` may be a string or a\n    `NodeType` instance. Attributes will be extended with defaults,\n    `content` may be a `Fragment`, `null`, a `Node`, or an array of\n    nodes.\n    */\n    node(type, attrs = null, content, marks) {\n        if (typeof type == \"string\")\n            type = this.nodeType(type);\n        else if (!(type instanceof NodeType))\n            throw new RangeError(\"Invalid node type: \" + type);\n        else if (type.schema != this)\n            throw new RangeError(\"Node type from different schema used (\" + type.name + \")\");\n        return type.createChecked(attrs, content, marks);\n    }\n    /**\n    Create a text node in the schema. Empty text nodes are not\n    allowed.\n    */\n    text(text, marks) {\n        let type = this.nodes.text;\n        return new TextNode(type, type.defaultAttrs, text, Mark.setFrom(marks));\n    }\n    /**\n    Create a mark with the given type and attributes.\n    */\n    mark(type, attrs) {\n        if (typeof type == \"string\")\n            type = this.marks[type];\n        return type.create(attrs);\n    }\n    /**\n    @internal\n    */\n    nodeType(name) {\n        let found = this.nodes[name];\n        if (!found)\n            throw new RangeError(\"Unknown node type: \" + name);\n        return found;\n    }\n}\nfunction gatherMarks(schema, marks) {\n    let found = [];\n    for (let i = 0; i < marks.length; i++) {\n        let name = marks[i], mark = schema.marks[name], ok = mark;\n        if (mark) {\n            found.push(mark);\n        }\n        else {\n            for (let prop in schema.marks) {\n                let mark = schema.marks[prop];\n                if (name == \"_\" || (mark.spec.group && mark.spec.group.split(\" \").indexOf(name) > -1))\n                    found.push(ok = mark);\n            }\n        }\n        if (!ok)\n            throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\");\n    }\n    return found;\n}\n\nfunction isTagRule(rule) { return rule.tag != null; }\nfunction isStyleRule(rule) { return rule.style != null; }\n/**\nA DOM parser represents a strategy for parsing DOM content into a\nProseMirror document conforming to a given schema. Its behavior is\ndefined by an array of [rules](https://prosemirror.net/docs/ref/#model.ParseRule).\n*/\nclass DOMParser {\n    /**\n    Create a parser that targets the given schema, using the given\n    parsing rules.\n    */\n    constructor(\n    /**\n    The schema into which the parser parses.\n    */\n    schema, \n    /**\n    The set of [parse rules](https://prosemirror.net/docs/ref/#model.ParseRule) that the parser\n    uses, in order of precedence.\n    */\n    rules) {\n        this.schema = schema;\n        this.rules = rules;\n        /**\n        @internal\n        */\n        this.tags = [];\n        /**\n        @internal\n        */\n        this.styles = [];\n        let matchedStyles = this.matchedStyles = [];\n        rules.forEach(rule => {\n            if (isTagRule(rule)) {\n                this.tags.push(rule);\n            }\n            else if (isStyleRule(rule)) {\n                let prop = /[^=]*/.exec(rule.style)[0];\n                if (matchedStyles.indexOf(prop) < 0)\n                    matchedStyles.push(prop);\n                this.styles.push(rule);\n            }\n        });\n        // Only normalize list elements when lists in the schema can't directly contain themselves\n        this.normalizeLists = !this.tags.some(r => {\n            if (!/^(ul|ol)\\b/.test(r.tag) || !r.node)\n                return false;\n            let node = schema.nodes[r.node];\n            return node.contentMatch.matchType(node);\n        });\n    }\n    /**\n    Parse a document from the content of a DOM node.\n    */\n    parse(dom, options = {}) {\n        let context = new ParseContext(this, options, false);\n        context.addAll(dom, Mark.none, options.from, options.to);\n        return context.finish();\n    }\n    /**\n    Parses the content of the given DOM node, like\n    [`parse`](https://prosemirror.net/docs/ref/#model.DOMParser.parse), and takes the same set of\n    options. But unlike that method, which produces a whole node,\n    this one returns a slice that is open at the sides, meaning that\n    the schema constraints aren't applied to the start of nodes to\n    the left of the input and the end of nodes at the end.\n    */\n    parseSlice(dom, options = {}) {\n        let context = new ParseContext(this, options, true);\n        context.addAll(dom, Mark.none, options.from, options.to);\n        return Slice.maxOpen(context.finish());\n    }\n    /**\n    @internal\n    */\n    matchTag(dom, context, after) {\n        for (let i = after ? this.tags.indexOf(after) + 1 : 0; i < this.tags.length; i++) {\n            let rule = this.tags[i];\n            if (matches(dom, rule.tag) &&\n                (rule.namespace === undefined || dom.namespaceURI == rule.namespace) &&\n                (!rule.context || context.matchesContext(rule.context))) {\n                if (rule.getAttrs) {\n                    let result = rule.getAttrs(dom);\n                    if (result === false)\n                        continue;\n                    rule.attrs = result || undefined;\n                }\n                return rule;\n            }\n        }\n    }\n    /**\n    @internal\n    */\n    matchStyle(prop, value, context, after) {\n        for (let i = after ? this.styles.indexOf(after) + 1 : 0; i < this.styles.length; i++) {\n            let rule = this.styles[i], style = rule.style;\n            if (style.indexOf(prop) != 0 ||\n                rule.context && !context.matchesContext(rule.context) ||\n                // Test that the style string either precisely matches the prop,\n                // or has an '=' sign after the prop, followed by the given\n                // value.\n                style.length > prop.length &&\n                    (style.charCodeAt(prop.length) != 61 || style.slice(prop.length + 1) != value))\n                continue;\n            if (rule.getAttrs) {\n                let result = rule.getAttrs(value);\n                if (result === false)\n                    continue;\n                rule.attrs = result || undefined;\n            }\n            return rule;\n        }\n    }\n    /**\n    @internal\n    */\n    static schemaRules(schema) {\n        let result = [];\n        function insert(rule) {\n            let priority = rule.priority == null ? 50 : rule.priority, i = 0;\n            for (; i < result.length; i++) {\n                let next = result[i], nextPriority = next.priority == null ? 50 : next.priority;\n                if (nextPriority < priority)\n                    break;\n            }\n            result.splice(i, 0, rule);\n        }\n        for (let name in schema.marks) {\n            let rules = schema.marks[name].spec.parseDOM;\n            if (rules)\n                rules.forEach(rule => {\n                    insert(rule = copy(rule));\n                    if (!(rule.mark || rule.ignore || rule.clearMark))\n                        rule.mark = name;\n                });\n        }\n        for (let name in schema.nodes) {\n            let rules = schema.nodes[name].spec.parseDOM;\n            if (rules)\n                rules.forEach(rule => {\n                    insert(rule = copy(rule));\n                    if (!(rule.node || rule.ignore || rule.mark))\n                        rule.node = name;\n                });\n        }\n        return result;\n    }\n    /**\n    Construct a DOM parser using the parsing rules listed in a\n    schema's [node specs](https://prosemirror.net/docs/ref/#model.NodeSpec.parseDOM), reordered by\n    [priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).\n    */\n    static fromSchema(schema) {\n        return schema.cached.domParser ||\n            (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema)));\n    }\n}\nconst blockTags = {\n    address: true, article: true, aside: true, blockquote: true, body: true, canvas: true,\n    dd: true, div: true, dl: true, fieldset: true, figcaption: true, figure: true,\n    footer: true, form: true, h1: true, h2: true, h3: true, h4: true, h5: true,\n    h6: true, header: true, hgroup: true, hr: true, li: true, noscript: true, ol: true,\n    output: true, p: true, pre: true, section: true, table: true, tfoot: true, ul: true\n};\nconst ignoreTags = {\n    head: true, noscript: true, object: true, script: true, style: true, title: true\n};\nconst listTags = { ol: true, ul: true };\n// Using a bitfield for node context options\nconst OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;\nfunction wsOptionsFor(type, preserveWhitespace, base) {\n    if (preserveWhitespace != null)\n        return (preserveWhitespace ? OPT_PRESERVE_WS : 0) |\n            (preserveWhitespace === \"full\" ? OPT_PRESERVE_WS_FULL : 0);\n    return type && type.whitespace == \"pre\" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base & ~OPT_OPEN_LEFT;\n}\nclass NodeContext {\n    constructor(type, attrs, marks, solid, match, options) {\n        this.type = type;\n        this.attrs = attrs;\n        this.marks = marks;\n        this.solid = solid;\n        this.options = options;\n        this.content = [];\n        // Marks applied to the node's children\n        this.activeMarks = Mark.none;\n        this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch);\n    }\n    findWrapping(node) {\n        if (!this.match) {\n            if (!this.type)\n                return [];\n            let fill = this.type.contentMatch.fillBefore(Fragment.from(node));\n            if (fill) {\n                this.match = this.type.contentMatch.matchFragment(fill);\n            }\n            else {\n                let start = this.type.contentMatch, wrap;\n                if (wrap = start.findWrapping(node.type)) {\n                    this.match = start;\n                    return wrap;\n                }\n                else {\n                    return null;\n                }\n            }\n        }\n        return this.match.findWrapping(node.type);\n    }\n    finish(openEnd) {\n        if (!(this.options & OPT_PRESERVE_WS)) { // Strip trailing whitespace\n            let last = this.content[this.content.length - 1], m;\n            if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n                let text = last;\n                if (last.text.length == m[0].length)\n                    this.content.pop();\n                else\n                    this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m[0].length));\n            }\n        }\n        let content = Fragment.from(this.content);\n        if (!openEnd && this.match)\n            content = content.append(this.match.fillBefore(Fragment.empty, true));\n        return this.type ? this.type.create(this.attrs, content, this.marks) : content;\n    }\n    inlineContext(node) {\n        if (this.type)\n            return this.type.inlineContent;\n        if (this.content.length)\n            return this.content[0].isInline;\n        return node.parentNode && !blockTags.hasOwnProperty(node.parentNode.nodeName.toLowerCase());\n    }\n}\nclass ParseContext {\n    constructor(\n    // The parser we are using.\n    parser, \n    // The options passed to this parse.\n    options, isOpen) {\n        this.parser = parser;\n        this.options = options;\n        this.isOpen = isOpen;\n        this.open = 0;\n        this.localPreserveWS = false;\n        let topNode = options.topNode, topContext;\n        let topOptions = wsOptionsFor(null, options.preserveWhitespace, 0) | (isOpen ? OPT_OPEN_LEFT : 0);\n        if (topNode)\n            topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, true, options.topMatch || topNode.type.contentMatch, topOptions);\n        else if (isOpen)\n            topContext = new NodeContext(null, null, Mark.none, true, null, topOptions);\n        else\n            topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, true, null, topOptions);\n        this.nodes = [topContext];\n        this.find = options.findPositions;\n        this.needsBlock = false;\n    }\n    get top() {\n        return this.nodes[this.open];\n    }\n    // Add a DOM node to the content. Text is inserted as text node,\n    // otherwise, the node is passed to `addElement` or, if it has a\n    // `style` attribute, `addElementWithStyles`.\n    addDOM(dom, marks) {\n        if (dom.nodeType == 3)\n            this.addTextNode(dom, marks);\n        else if (dom.nodeType == 1)\n            this.addElement(dom, marks);\n    }\n    addTextNode(dom, marks) {\n        let value = dom.nodeValue;\n        let top = this.top, preserveWS = (top.options & OPT_PRESERVE_WS_FULL) ? \"full\"\n            : this.localPreserveWS || (top.options & OPT_PRESERVE_WS) > 0;\n        let { schema } = this.parser;\n        if (preserveWS === \"full\" ||\n            top.inlineContext(dom) ||\n            /[^ \\t\\r\\n\\u000c]/.test(value)) {\n            if (!preserveWS) {\n                value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \");\n                // If this starts with whitespace, and there is no node before it, or\n                // a hard break, or a text node that ends with whitespace, strip the\n                // leading space.\n                if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n                    let nodeBefore = top.content[top.content.length - 1];\n                    let domNodeBefore = dom.previousSibling;\n                    if (!nodeBefore ||\n                        (domNodeBefore && domNodeBefore.nodeName == 'BR') ||\n                        (nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)))\n                        value = value.slice(1);\n                }\n            }\n            else if (preserveWS === \"full\") {\n                value = value.replace(/\\r\\n?/g, \"\\n\");\n            }\n            else if (schema.linebreakReplacement && /[\\r\\n]/.test(value) && this.top.findWrapping(schema.linebreakReplacement.create())) {\n                let lines = value.split(/\\r?\\n|\\r/);\n                for (let i = 0; i < lines.length; i++) {\n                    if (i)\n                        this.insertNode(schema.linebreakReplacement.create(), marks, true);\n                    if (lines[i])\n                        this.insertNode(schema.text(lines[i]), marks, !/\\S/.test(lines[i]));\n                }\n                value = \"\";\n            }\n            else {\n                value = value.replace(/\\r?\\n|\\r/g, \" \");\n            }\n            if (value)\n                this.insertNode(schema.text(value), marks, !/\\S/.test(value));\n            this.findInText(dom);\n        }\n        else {\n            this.findInside(dom);\n        }\n    }\n    // Try to find a handler for the given tag and use that to parse. If\n    // none is found, the element's content nodes are added directly.\n    addElement(dom, marks, matchAfter) {\n        let outerWS = this.localPreserveWS, top = this.top;\n        if (dom.tagName == \"PRE\" || /pre/.test(dom.style && dom.style.whiteSpace))\n            this.localPreserveWS = true;\n        let name = dom.nodeName.toLowerCase(), ruleID;\n        if (listTags.hasOwnProperty(name) && this.parser.normalizeLists)\n            normalizeList(dom);\n        let rule = (this.options.ruleFromNode && this.options.ruleFromNode(dom)) ||\n            (ruleID = this.parser.matchTag(dom, this, matchAfter));\n        out: if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) {\n            this.findInside(dom);\n            this.ignoreFallback(dom, marks);\n        }\n        else if (!rule || rule.skip || rule.closeParent) {\n            if (rule && rule.closeParent)\n                this.open = Math.max(0, this.open - 1);\n            else if (rule && rule.skip.nodeType)\n                dom = rule.skip;\n            let sync, oldNeedsBlock = this.needsBlock;\n            if (blockTags.hasOwnProperty(name)) {\n                if (top.content.length && top.content[0].isInline && this.open) {\n                    this.open--;\n                    top = this.top;\n                }\n                sync = true;\n                if (!top.type)\n                    this.needsBlock = true;\n            }\n            else if (!dom.firstChild) {\n                this.leafFallback(dom, marks);\n                break out;\n            }\n            let innerMarks = rule && rule.skip ? marks : this.readStyles(dom, marks);\n            if (innerMarks)\n                this.addAll(dom, innerMarks);\n            if (sync)\n                this.sync(top);\n            this.needsBlock = oldNeedsBlock;\n        }\n        else {\n            let innerMarks = this.readStyles(dom, marks);\n            if (innerMarks)\n                this.addElementByRule(dom, rule, innerMarks, rule.consuming === false ? ruleID : undefined);\n        }\n        this.localPreserveWS = outerWS;\n    }\n    // Called for leaf DOM nodes that would otherwise be ignored\n    leafFallback(dom, marks) {\n        if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent)\n            this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\"), marks);\n    }\n    // Called for ignored nodes\n    ignoreFallback(dom, marks) {\n        // Ignored BR nodes should at least create an inline context\n        if (dom.nodeName == \"BR\" && (!this.top.type || !this.top.type.inlineContent))\n            this.findPlace(this.parser.schema.text(\"-\"), marks, true);\n    }\n    // Run any style parser associated with the node's styles. Either\n    // return an updated array of marks, or null to indicate some of the\n    // styles had a rule with `ignore` set.\n    readStyles(dom, marks) {\n        let styles = dom.style;\n        // Because many properties will only show up in 'normalized' form\n        // in `style.item` (i.e. text-decoration becomes\n        // text-decoration-line, text-decoration-color, etc), we directly\n        // query the styles mentioned in our rules instead of iterating\n        // over the items.\n        if (styles && styles.length)\n            for (let i = 0; i < this.parser.matchedStyles.length; i++) {\n                let name = this.parser.matchedStyles[i], value = styles.getPropertyValue(name);\n                if (value)\n                    for (let after = undefined;;) {\n                        let rule = this.parser.matchStyle(name, value, this, after);\n                        if (!rule)\n                            break;\n                        if (rule.ignore)\n                            return null;\n                        if (rule.clearMark)\n                            marks = marks.filter(m => !rule.clearMark(m));\n                        else\n                            marks = marks.concat(this.parser.schema.marks[rule.mark].create(rule.attrs));\n                        if (rule.consuming === false)\n                            after = rule;\n                        else\n                            break;\n                    }\n            }\n        return marks;\n    }\n    // Look up a handler for the given node. If none are found, return\n    // false. Otherwise, apply it, use its return value to drive the way\n    // the node's content is wrapped, and return true.\n    addElementByRule(dom, rule, marks, continueAfter) {\n        let sync, nodeType;\n        if (rule.node) {\n            nodeType = this.parser.schema.nodes[rule.node];\n            if (!nodeType.isLeaf) {\n                let inner = this.enter(nodeType, rule.attrs || null, marks, rule.preserveWhitespace);\n                if (inner) {\n                    sync = true;\n                    marks = inner;\n                }\n            }\n            else if (!this.insertNode(nodeType.create(rule.attrs), marks, dom.nodeName == \"BR\")) {\n                this.leafFallback(dom, marks);\n            }\n        }\n        else {\n            let markType = this.parser.schema.marks[rule.mark];\n            marks = marks.concat(markType.create(rule.attrs));\n        }\n        let startIn = this.top;\n        if (nodeType && nodeType.isLeaf) {\n            this.findInside(dom);\n        }\n        else if (continueAfter) {\n            this.addElement(dom, marks, continueAfter);\n        }\n        else if (rule.getContent) {\n            this.findInside(dom);\n            rule.getContent(dom, this.parser.schema).forEach(node => this.insertNode(node, marks, false));\n        }\n        else {\n            let contentDOM = dom;\n            if (typeof rule.contentElement == \"string\")\n                contentDOM = dom.querySelector(rule.contentElement);\n            else if (typeof rule.contentElement == \"function\")\n                contentDOM = rule.contentElement(dom);\n            else if (rule.contentElement)\n                contentDOM = rule.contentElement;\n            this.findAround(dom, contentDOM, true);\n            this.addAll(contentDOM, marks);\n            this.findAround(dom, contentDOM, false);\n        }\n        if (sync && this.sync(startIn))\n            this.open--;\n    }\n    // Add all child nodes between `startIndex` and `endIndex` (or the\n    // whole node, if not given). If `sync` is passed, use it to\n    // synchronize after every block element.\n    addAll(parent, marks, startIndex, endIndex) {\n        let index = startIndex || 0;\n        for (let dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild, end = endIndex == null ? null : parent.childNodes[endIndex]; dom != end; dom = dom.nextSibling, ++index) {\n            this.findAtPoint(parent, index);\n            this.addDOM(dom, marks);\n        }\n        this.findAtPoint(parent, index);\n    }\n    // Try to find a way to fit the given node type into the current\n    // context. May add intermediate wrappers and/or leave non-solid\n    // nodes that we're in.\n    findPlace(node, marks, cautious) {\n        let route, sync;\n        for (let depth = this.open, penalty = 0; depth >= 0; depth--) {\n            let cx = this.nodes[depth];\n            let found = cx.findWrapping(node);\n            if (found && (!route || route.length > found.length + penalty)) {\n                route = found;\n                sync = cx;\n                if (!found.length)\n                    break;\n            }\n            if (cx.solid) {\n                if (cautious)\n                    break;\n                penalty += 2;\n            }\n        }\n        if (!route)\n            return null;\n        this.sync(sync);\n        for (let i = 0; i < route.length; i++)\n            marks = this.enterInner(route[i], null, marks, false);\n        return marks;\n    }\n    // Try to insert the given node, adjusting the context when needed.\n    insertNode(node, marks, cautious) {\n        if (node.isInline && this.needsBlock && !this.top.type) {\n            let block = this.textblockFromContext();\n            if (block)\n                marks = this.enterInner(block, null, marks);\n        }\n        let innerMarks = this.findPlace(node, marks, cautious);\n        if (innerMarks) {\n            this.closeExtra();\n            let top = this.top;\n            if (top.match)\n                top.match = top.match.matchType(node.type);\n            let nodeMarks = Mark.none;\n            for (let m of innerMarks.concat(node.marks))\n                if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, node.type))\n                    nodeMarks = m.addToSet(nodeMarks);\n            top.content.push(node.mark(nodeMarks));\n            return true;\n        }\n        return false;\n    }\n    // Try to start a node of the given type, adjusting the context when\n    // necessary.\n    enter(type, attrs, marks, preserveWS) {\n        let innerMarks = this.findPlace(type.create(attrs), marks, false);\n        if (innerMarks)\n            innerMarks = this.enterInner(type, attrs, marks, true, preserveWS);\n        return innerMarks;\n    }\n    // Open a node of the given type\n    enterInner(type, attrs, marks, solid = false, preserveWS) {\n        this.closeExtra();\n        let top = this.top;\n        top.match = top.match && top.match.matchType(type);\n        let options = wsOptionsFor(type, preserveWS, top.options);\n        if ((top.options & OPT_OPEN_LEFT) && top.content.length == 0)\n            options |= OPT_OPEN_LEFT;\n        let applyMarks = Mark.none;\n        marks = marks.filter(m => {\n            if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, type)) {\n                applyMarks = m.addToSet(applyMarks);\n                return false;\n            }\n            return true;\n        });\n        this.nodes.push(new NodeContext(type, attrs, applyMarks, solid, null, options));\n        this.open++;\n        return marks;\n    }\n    // Make sure all nodes above this.open are finished and added to\n    // their parents\n    closeExtra(openEnd = false) {\n        let i = this.nodes.length - 1;\n        if (i > this.open) {\n            for (; i > this.open; i--)\n                this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd));\n            this.nodes.length = this.open + 1;\n        }\n    }\n    finish() {\n        this.open = 0;\n        this.closeExtra(this.isOpen);\n        return this.nodes[0].finish(!!(this.isOpen || this.options.topOpen));\n    }\n    sync(to) {\n        for (let i = this.open; i >= 0; i--) {\n            if (this.nodes[i] == to) {\n                this.open = i;\n                return true;\n            }\n            else if (this.localPreserveWS) {\n                this.nodes[i].options |= OPT_PRESERVE_WS;\n            }\n        }\n        return false;\n    }\n    get currentPos() {\n        this.closeExtra();\n        let pos = 0;\n        for (let i = this.open; i >= 0; i--) {\n            let content = this.nodes[i].content;\n            for (let j = content.length - 1; j >= 0; j--)\n                pos += content[j].nodeSize;\n            if (i)\n                pos++;\n        }\n        return pos;\n    }\n    findAtPoint(parent, offset) {\n        if (this.find)\n            for (let i = 0; i < this.find.length; i++) {\n                if (this.find[i].node == parent && this.find[i].offset == offset)\n                    this.find[i].pos = this.currentPos;\n            }\n    }\n    findInside(parent) {\n        if (this.find)\n            for (let i = 0; i < this.find.length; i++) {\n                if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node))\n                    this.find[i].pos = this.currentPos;\n            }\n    }\n    findAround(parent, content, before) {\n        if (parent != content && this.find)\n            for (let i = 0; i < this.find.length; i++) {\n                if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n                    let pos = content.compareDocumentPosition(this.find[i].node);\n                    if (pos & (before ? 2 : 4))\n                        this.find[i].pos = this.currentPos;\n                }\n            }\n    }\n    findInText(textNode) {\n        if (this.find)\n            for (let i = 0; i < this.find.length; i++) {\n                if (this.find[i].node == textNode)\n                    this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset);\n            }\n    }\n    // Determines whether the given context string matches this context.\n    matchesContext(context) {\n        if (context.indexOf(\"|\") > -1)\n            return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this);\n        let parts = context.split(\"/\");\n        let option = this.options.context;\n        let useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n        let minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n        let match = (i, depth) => {\n            for (; i >= 0; i--) {\n                let part = parts[i];\n                if (part == \"\") {\n                    if (i == parts.length - 1 || i == 0)\n                        continue;\n                    for (; depth >= minDepth; depth--)\n                        if (match(i - 1, depth))\n                            return true;\n                    return false;\n                }\n                else {\n                    let next = depth > 0 || (depth == 0 && useRoot) ? this.nodes[depth].type\n                        : option && depth >= minDepth ? option.node(depth - minDepth).type\n                            : null;\n                    if (!next || (next.name != part && !next.isInGroup(part)))\n                        return false;\n                    depth--;\n                }\n            }\n            return true;\n        };\n        return match(parts.length - 1, this.open);\n    }\n    textblockFromContext() {\n        let $context = this.options.context;\n        if ($context)\n            for (let d = $context.depth; d >= 0; d--) {\n                let deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n                if (deflt && deflt.isTextblock && deflt.defaultAttrs)\n                    return deflt;\n            }\n        for (let name in this.parser.schema.nodes) {\n            let type = this.parser.schema.nodes[name];\n            if (type.isTextblock && type.defaultAttrs)\n                return type;\n        }\n    }\n}\n// Kludge to work around directly nested list nodes produced by some\n// tools and allowed by browsers to mean that the nested list is\n// actually part of the list item above it.\nfunction normalizeList(dom) {\n    for (let child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n        let name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n        if (name && listTags.hasOwnProperty(name) && prevItem) {\n            prevItem.appendChild(child);\n            child = prevItem;\n        }\n        else if (name == \"li\") {\n            prevItem = child;\n        }\n        else if (name) {\n            prevItem = null;\n        }\n    }\n}\n// Apply a CSS selector.\nfunction matches(dom, selector) {\n    return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector);\n}\nfunction copy(obj) {\n    let copy = {};\n    for (let prop in obj)\n        copy[prop] = obj[prop];\n    return copy;\n}\n// Used when finding a mark at the top level of a fragment parse.\n// Checks whether it would be reasonable to apply a given mark type to\n// a given node, by looking at the way the mark occurs in the schema.\nfunction markMayApply(markType, nodeType) {\n    let nodes = nodeType.schema.nodes;\n    for (let name in nodes) {\n        let parent = nodes[name];\n        if (!parent.allowsMarkType(markType))\n            continue;\n        let seen = [], scan = (match) => {\n            seen.push(match);\n            for (let i = 0; i < match.edgeCount; i++) {\n                let { type, next } = match.edge(i);\n                if (type == nodeType)\n                    return true;\n                if (seen.indexOf(next) < 0 && scan(next))\n                    return true;\n            }\n        };\n        if (scan(parent.contentMatch))\n            return true;\n    }\n}\n\n/**\nA DOM serializer knows how to convert ProseMirror nodes and\nmarks of various types to DOM nodes.\n*/\nclass DOMSerializer {\n    /**\n    Create a serializer. `nodes` should map node names to functions\n    that take a node and return a description of the corresponding\n    DOM. `marks` does the same for mark names, but also gets an\n    argument that tells it whether the mark's content is block or\n    inline content (for typical use, it'll always be inline). A mark\n    serializer may be `null` to indicate that marks of that type\n    should not be serialized.\n    */\n    constructor(\n    /**\n    The node serialization functions.\n    */\n    nodes, \n    /**\n    The mark serialization functions.\n    */\n    marks) {\n        this.nodes = nodes;\n        this.marks = marks;\n    }\n    /**\n    Serialize the content of this fragment to a DOM fragment. When\n    not in the browser, the `document` option, containing a DOM\n    document, should be passed so that the serializer can create\n    nodes.\n    */\n    serializeFragment(fragment, options = {}, target) {\n        if (!target)\n            target = doc(options).createDocumentFragment();\n        let top = target, active = [];\n        fragment.forEach(node => {\n            if (active.length || node.marks.length) {\n                let keep = 0, rendered = 0;\n                while (keep < active.length && rendered < node.marks.length) {\n                    let next = node.marks[rendered];\n                    if (!this.marks[next.type.name]) {\n                        rendered++;\n                        continue;\n                    }\n                    if (!next.eq(active[keep][0]) || next.type.spec.spanning === false)\n                        break;\n                    keep++;\n                    rendered++;\n                }\n                while (keep < active.length)\n                    top = active.pop()[1];\n                while (rendered < node.marks.length) {\n                    let add = node.marks[rendered++];\n                    let markDOM = this.serializeMark(add, node.isInline, options);\n                    if (markDOM) {\n                        active.push([add, top]);\n                        top.appendChild(markDOM.dom);\n                        top = markDOM.contentDOM || markDOM.dom;\n                    }\n                }\n            }\n            top.appendChild(this.serializeNodeInner(node, options));\n        });\n        return target;\n    }\n    /**\n    @internal\n    */\n    serializeNodeInner(node, options) {\n        if (node.isText)\n            return doc(options).createTextNode(node.text);\n        let { dom, contentDOM } = renderSpec(doc(options), this.nodes[node.type.name](node), null, node.attrs);\n        if (contentDOM) {\n            if (node.isLeaf)\n                throw new RangeError(\"Content hole not allowed in a leaf node spec\");\n            this.serializeFragment(node.content, options, contentDOM);\n        }\n        return dom;\n    }\n    /**\n    Serialize this node to a DOM node. This can be useful when you\n    need to serialize a part of a document, as opposed to the whole\n    document. To serialize a whole document, use\n    [`serializeFragment`](https://prosemirror.net/docs/ref/#model.DOMSerializer.serializeFragment) on\n    its [content](https://prosemirror.net/docs/ref/#model.Node.content).\n    */\n    serializeNode(node, options = {}) {\n        let dom = this.serializeNodeInner(node, options);\n        for (let i = node.marks.length - 1; i >= 0; i--) {\n            let wrap = this.serializeMark(node.marks[i], node.isInline, options);\n            if (wrap) {\n                (wrap.contentDOM || wrap.dom).appendChild(dom);\n                dom = wrap.dom;\n            }\n        }\n        return dom;\n    }\n    /**\n    @internal\n    */\n    serializeMark(mark, inline, options = {}) {\n        let toDOM = this.marks[mark.type.name];\n        return toDOM && renderSpec(doc(options), toDOM(mark, inline), null, mark.attrs);\n    }\n    static renderSpec(doc, structure, xmlNS = null, blockArraysIn) {\n        // Kludge for backwards-compatibility with accidental original behavious\n        if (typeof structure == \"string\")\n            return { dom: doc.createTextNode(structure) };\n        return renderSpec(doc, structure, xmlNS, blockArraysIn);\n    }\n    /**\n    Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)\n    properties in a schema's node and mark specs.\n    */\n    static fromSchema(schema) {\n        return schema.cached.domSerializer ||\n            (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema)));\n    }\n    /**\n    Gather the serializers in a schema's node specs into an object.\n    This can be useful as a base to build a custom serializer from.\n    */\n    static nodesFromSchema(schema) {\n        let result = gatherToDOM(schema.nodes);\n        if (!result.text)\n            result.text = node => node.text;\n        return result;\n    }\n    /**\n    Gather the serializers in a schema's mark specs into an object.\n    */\n    static marksFromSchema(schema) {\n        return gatherToDOM(schema.marks);\n    }\n}\nfunction gatherToDOM(obj) {\n    let result = {};\n    for (let name in obj) {\n        let toDOM = obj[name].spec.toDOM;\n        if (toDOM)\n            result[name] = toDOM;\n    }\n    return result;\n}\nfunction doc(options) {\n    return options.document || window.document;\n}\nconst suspiciousAttributeCache = new WeakMap();\nfunction suspiciousAttributes(attrs) {\n    let value = suspiciousAttributeCache.get(attrs);\n    if (value === undefined)\n        suspiciousAttributeCache.set(attrs, value = suspiciousAttributesInner(attrs));\n    return value;\n}\nfunction suspiciousAttributesInner(attrs) {\n    let result = null;\n    function scan(value) {\n        if (value && typeof value == \"object\") {\n            if (Array.isArray(value)) {\n                if (typeof value[0] == \"string\") {\n                    if (!result)\n                        result = [];\n                    result.push(value);\n                }\n                else {\n                    for (let i = 0; i < value.length; i++)\n                        scan(value[i]);\n                }\n            }\n            else {\n                for (let prop in value)\n                    scan(value[prop]);\n            }\n        }\n    }\n    scan(attrs);\n    return result;\n}\nfunction renderSpec(doc, structure, xmlNS, blockArraysIn) {\n    if (structure.nodeType == 1)\n        return { dom: structure };\n    if (structure.dom && structure.dom.nodeType == 1)\n        return structure;\n    let tagName = structure[0], suspicious;\n    if (typeof tagName != \"string\")\n        throw new RangeError(\"Invalid array passed to renderSpec\");\n    if (blockArraysIn && (suspicious = suspiciousAttributes(blockArraysIn)) &&\n        suspicious.indexOf(structure) > -1)\n        throw new RangeError(\"Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.\");\n    let space = tagName.indexOf(\" \");\n    if (space > 0) {\n        xmlNS = tagName.slice(0, space);\n        tagName = tagName.slice(space + 1);\n    }\n    let contentDOM;\n    let dom = (xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName));\n    let attrs = structure[1], start = 1;\n    if (attrs && typeof attrs == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n        start = 2;\n        for (let name in attrs)\n            if (attrs[name] != null) {\n                let space = name.indexOf(\" \");\n                if (space > 0)\n                    dom.setAttributeNS(name.slice(0, space), name.slice(space + 1), attrs[name]);\n                else if (name == \"style\" && dom.style)\n                    dom.style.cssText = attrs[name];\n                else\n                    dom.setAttribute(name, attrs[name]);\n            }\n    }\n    for (let i = start; i < structure.length; i++) {\n        let child = structure[i];\n        if (child === 0) {\n            if (i < structure.length - 1 || i > start)\n                throw new RangeError(\"Content hole must be the only child of its parent node\");\n            return { dom, contentDOM: dom };\n        }\n        else if (typeof child == \"string\") {\n            dom.appendChild(doc.createTextNode(child));\n        }\n        else {\n            let { dom: inner, contentDOM: innerContent } = renderSpec(doc, child, xmlNS, blockArraysIn);\n            dom.appendChild(inner);\n            if (innerContent) {\n                if (contentDOM)\n                    throw new RangeError(\"Multiple content holes\");\n                contentDOM = innerContent;\n            }\n        }\n    }\n    return { dom, contentDOM };\n}\n\nexport { ContentMatch, DOMParser, DOMSerializer, Fragment, Mark, MarkType, Node, NodeRange, NodeType, ReplaceError, ResolvedPos, Schema, Slice };\n","// ::- Persistent data structure representing an ordered mapping from\n// strings to values, with some convenient update methods.\nfunction OrderedMap(content) {\n  this.content = content;\n}\n\nOrderedMap.prototype = {\n  constructor: OrderedMap,\n\n  find: function(key) {\n    for (var i = 0; i < this.content.length; i += 2)\n      if (this.content[i] === key) return i\n    return -1\n  },\n\n  // :: (string) → ?any\n  // Retrieve the value stored under `key`, or return undefined when\n  // no such key exists.\n  get: function(key) {\n    var found = this.find(key);\n    return found == -1 ? undefined : this.content[found + 1]\n  },\n\n  // :: (string, any, ?string) → OrderedMap\n  // Create a new map by replacing the value of `key` with a new\n  // value, or adding a binding to the end of the map. If `newKey` is\n  // given, the key of the binding will be replaced with that key.\n  update: function(key, value, newKey) {\n    var self = newKey && newKey != key ? this.remove(newKey) : this;\n    var found = self.find(key), content = self.content.slice();\n    if (found == -1) {\n      content.push(newKey || key, value);\n    } else {\n      content[found + 1] = value;\n      if (newKey) content[found] = newKey;\n    }\n    return new OrderedMap(content)\n  },\n\n  // :: (string) → OrderedMap\n  // Return a map with the given key removed, if it existed.\n  remove: function(key) {\n    var found = this.find(key);\n    if (found == -1) return this\n    var content = this.content.slice();\n    content.splice(found, 2);\n    return new OrderedMap(content)\n  },\n\n  // :: (string, any) → OrderedMap\n  // Add a new key to the start of the map.\n  addToStart: function(key, value) {\n    return new OrderedMap([key, value].concat(this.remove(key).content))\n  },\n\n  // :: (string, any) → OrderedMap\n  // Add a new key to the end of the map.\n  addToEnd: function(key, value) {\n    var content = this.remove(key).content.slice();\n    content.push(key, value);\n    return new OrderedMap(content)\n  },\n\n  // :: (string, string, any) → OrderedMap\n  // Add a key after the given key. If `place` is not found, the new\n  // key is added to the end.\n  addBefore: function(place, key, value) {\n    var without = this.remove(key), content = without.content.slice();\n    var found = without.find(place);\n    content.splice(found == -1 ? content.length : found, 0, key, value);\n    return new OrderedMap(content)\n  },\n\n  // :: ((key: string, value: any))\n  // Call the given function for each key/value pair in the map, in\n  // order.\n  forEach: function(f) {\n    for (var i = 0; i < this.content.length; i += 2)\n      f(this.content[i], this.content[i + 1]);\n  },\n\n  // :: (union<Object, OrderedMap>) → OrderedMap\n  // Create a new map by prepending the keys in this map that don't\n  // appear in `map` before the keys in `map`.\n  prepend: function(map) {\n    map = OrderedMap.from(map);\n    if (!map.size) return this\n    return new OrderedMap(map.content.concat(this.subtract(map).content))\n  },\n\n  // :: (union<Object, OrderedMap>) → OrderedMap\n  // Create a new map by appending the keys in this map that don't\n  // appear in `map` after the keys in `map`.\n  append: function(map) {\n    map = OrderedMap.from(map);\n    if (!map.size) return this\n    return new OrderedMap(this.subtract(map).content.concat(map.content))\n  },\n\n  // :: (union<Object, OrderedMap>) → OrderedMap\n  // Create a map containing all the keys in this map that don't\n  // appear in `map`.\n  subtract: function(map) {\n    var result = this;\n    map = OrderedMap.from(map);\n    for (var i = 0; i < map.content.length; i += 2)\n      result = result.remove(map.content[i]);\n    return result\n  },\n\n  // :: () → Object\n  // Turn ordered map into a plain object.\n  toObject: function() {\n    var result = {};\n    this.forEach(function(key, value) { result[key] = value; });\n    return result\n  },\n\n  // :: number\n  // The amount of keys in this map.\n  get size() {\n    return this.content.length >> 1\n  }\n};\n\n// :: (?union<Object, OrderedMap>) → OrderedMap\n// Return a map with the given content. If null, create an empty\n// map. If given an ordered map, return that map itself. If given an\n// object, create a map from the object's properties.\nOrderedMap.from = function(value) {\n  if (value instanceof OrderedMap) return value\n  var content = [];\n  if (value) for (var prop in value) content.push(prop, value[prop]);\n  return new OrderedMap(content)\n};\n\nexport default OrderedMap;\n","import { ReplaceError, Slice, Fragment, MarkType, Mark } from 'prosemirror-model';\n\n// Recovery values encode a range index and an offset. They are\n// represented as numbers, because tons of them will be created when\n// mapping, for example, a large number of decorations. The number's\n// lower 16 bits provide the index, the remaining bits the offset.\n//\n// Note: We intentionally don't use bit shift operators to en- and\n// decode these, since those clip to 32 bits, which we might in rare\n// cases want to overflow. A 64-bit float can represent 48-bit\n// integers precisely.\nconst lower16 = 0xffff;\nconst factor16 = Math.pow(2, 16);\nfunction makeRecover(index, offset) { return index + offset * factor16; }\nfunction recoverIndex(value) { return value & lower16; }\nfunction recoverOffset(value) { return (value - (value & lower16)) / factor16; }\nconst DEL_BEFORE = 1, DEL_AFTER = 2, DEL_ACROSS = 4, DEL_SIDE = 8;\n/**\nAn object representing a mapped position with extra\ninformation.\n*/\nclass MapResult {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    The mapped version of the position.\n    */\n    pos, \n    /**\n    @internal\n    */\n    delInfo, \n    /**\n    @internal\n    */\n    recover) {\n        this.pos = pos;\n        this.delInfo = delInfo;\n        this.recover = recover;\n    }\n    /**\n    Tells you whether the position was deleted, that is, whether the\n    step removed the token on the side queried (via the `assoc`)\n    argument from the document.\n    */\n    get deleted() { return (this.delInfo & DEL_SIDE) > 0; }\n    /**\n    Tells you whether the token before the mapped position was deleted.\n    */\n    get deletedBefore() { return (this.delInfo & (DEL_BEFORE | DEL_ACROSS)) > 0; }\n    /**\n    True when the token after the mapped position was deleted.\n    */\n    get deletedAfter() { return (this.delInfo & (DEL_AFTER | DEL_ACROSS)) > 0; }\n    /**\n    Tells whether any of the steps mapped through deletes across the\n    position (including both the token before and after the\n    position).\n    */\n    get deletedAcross() { return (this.delInfo & DEL_ACROSS) > 0; }\n}\n/**\nA map describing the deletions and insertions made by a step, which\ncan be used to find the correspondence between positions in the\npre-step version of a document and the same position in the\npost-step version.\n*/\nclass StepMap {\n    /**\n    Create a position map. The modifications to the document are\n    represented as an array of numbers, in which each group of three\n    represents a modified chunk as `[start, oldSize, newSize]`.\n    */\n    constructor(\n    /**\n    @internal\n    */\n    ranges, \n    /**\n    @internal\n    */\n    inverted = false) {\n        this.ranges = ranges;\n        this.inverted = inverted;\n        if (!ranges.length && StepMap.empty)\n            return StepMap.empty;\n    }\n    /**\n    @internal\n    */\n    recover(value) {\n        let diff = 0, index = recoverIndex(value);\n        if (!this.inverted)\n            for (let i = 0; i < index; i++)\n                diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];\n        return this.ranges[index * 3] + diff + recoverOffset(value);\n    }\n    mapResult(pos, assoc = 1) { return this._map(pos, assoc, false); }\n    map(pos, assoc = 1) { return this._map(pos, assoc, true); }\n    /**\n    @internal\n    */\n    _map(pos, assoc, simple) {\n        let diff = 0, oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n        for (let i = 0; i < this.ranges.length; i += 3) {\n            let start = this.ranges[i] - (this.inverted ? diff : 0);\n            if (start > pos)\n                break;\n            let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex], end = start + oldSize;\n            if (pos <= end) {\n                let side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;\n                let result = start + diff + (side < 0 ? 0 : newSize);\n                if (simple)\n                    return result;\n                let recover = pos == (assoc < 0 ? start : end) ? null : makeRecover(i / 3, pos - start);\n                let del = pos == start ? DEL_AFTER : pos == end ? DEL_BEFORE : DEL_ACROSS;\n                if (assoc < 0 ? pos != start : pos != end)\n                    del |= DEL_SIDE;\n                return new MapResult(result, del, recover);\n            }\n            diff += newSize - oldSize;\n        }\n        return simple ? pos + diff : new MapResult(pos + diff, 0, null);\n    }\n    /**\n    @internal\n    */\n    touches(pos, recover) {\n        let diff = 0, index = recoverIndex(recover);\n        let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n        for (let i = 0; i < this.ranges.length; i += 3) {\n            let start = this.ranges[i] - (this.inverted ? diff : 0);\n            if (start > pos)\n                break;\n            let oldSize = this.ranges[i + oldIndex], end = start + oldSize;\n            if (pos <= end && i == index * 3)\n                return true;\n            diff += this.ranges[i + newIndex] - oldSize;\n        }\n        return false;\n    }\n    /**\n    Calls the given function on each of the changed ranges included in\n    this map.\n    */\n    forEach(f) {\n        let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n        for (let i = 0, diff = 0; i < this.ranges.length; i += 3) {\n            let start = this.ranges[i], oldStart = start - (this.inverted ? diff : 0), newStart = start + (this.inverted ? 0 : diff);\n            let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex];\n            f(oldStart, oldStart + oldSize, newStart, newStart + newSize);\n            diff += newSize - oldSize;\n        }\n    }\n    /**\n    Create an inverted version of this map. The result can be used to\n    map positions in the post-step document to the pre-step document.\n    */\n    invert() {\n        return new StepMap(this.ranges, !this.inverted);\n    }\n    /**\n    @internal\n    */\n    toString() {\n        return (this.inverted ? \"-\" : \"\") + JSON.stringify(this.ranges);\n    }\n    /**\n    Create a map that moves all positions by offset `n` (which may be\n    negative). This can be useful when applying steps meant for a\n    sub-document to a larger document, or vice-versa.\n    */\n    static offset(n) {\n        return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]);\n    }\n}\n/**\nA StepMap that contains no changed ranges.\n*/\nStepMap.empty = new StepMap([]);\n/**\nA mapping represents a pipeline of zero or more [step\nmaps](https://prosemirror.net/docs/ref/#transform.StepMap). It has special provisions for losslessly\nhandling mapping positions through a series of steps in which some\nsteps are inverted versions of earlier steps. (This comes up when\n‘[rebasing](/docs/guide/#transform.rebasing)’ steps for\ncollaboration or history management.)\n*/\nclass Mapping {\n    /**\n    Create a new mapping with the given position maps.\n    */\n    constructor(\n    /**\n    The step maps in this mapping.\n    */\n    maps = [], \n    /**\n    @internal\n    */\n    mirror, \n    /**\n    The starting position in the `maps` array, used when `map` or\n    `mapResult` is called.\n    */\n    from = 0, \n    /**\n    The end position in the `maps` array.\n    */\n    to = maps.length) {\n        this.maps = maps;\n        this.mirror = mirror;\n        this.from = from;\n        this.to = to;\n    }\n    /**\n    Create a mapping that maps only through a part of this one.\n    */\n    slice(from = 0, to = this.maps.length) {\n        return new Mapping(this.maps, this.mirror, from, to);\n    }\n    /**\n    @internal\n    */\n    copy() {\n        return new Mapping(this.maps.slice(), this.mirror && this.mirror.slice(), this.from, this.to);\n    }\n    /**\n    Add a step map to the end of this mapping. If `mirrors` is\n    given, it should be the index of the step map that is the mirror\n    image of this one.\n    */\n    appendMap(map, mirrors) {\n        this.to = this.maps.push(map);\n        if (mirrors != null)\n            this.setMirror(this.maps.length - 1, mirrors);\n    }\n    /**\n    Add all the step maps in a given mapping to this one (preserving\n    mirroring information).\n    */\n    appendMapping(mapping) {\n        for (let i = 0, startSize = this.maps.length; i < mapping.maps.length; i++) {\n            let mirr = mapping.getMirror(i);\n            this.appendMap(mapping.maps[i], mirr != null && mirr < i ? startSize + mirr : undefined);\n        }\n    }\n    /**\n    Finds the offset of the step map that mirrors the map at the\n    given offset, in this mapping (as per the second argument to\n    `appendMap`).\n    */\n    getMirror(n) {\n        if (this.mirror)\n            for (let i = 0; i < this.mirror.length; i++)\n                if (this.mirror[i] == n)\n                    return this.mirror[i + (i % 2 ? -1 : 1)];\n    }\n    /**\n    @internal\n    */\n    setMirror(n, m) {\n        if (!this.mirror)\n            this.mirror = [];\n        this.mirror.push(n, m);\n    }\n    /**\n    Append the inverse of the given mapping to this one.\n    */\n    appendMappingInverted(mapping) {\n        for (let i = mapping.maps.length - 1, totalSize = this.maps.length + mapping.maps.length; i >= 0; i--) {\n            let mirr = mapping.getMirror(i);\n            this.appendMap(mapping.maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : undefined);\n        }\n    }\n    /**\n    Create an inverted version of this mapping.\n    */\n    invert() {\n        let inverse = new Mapping;\n        inverse.appendMappingInverted(this);\n        return inverse;\n    }\n    /**\n    Map a position through this mapping.\n    */\n    map(pos, assoc = 1) {\n        if (this.mirror)\n            return this._map(pos, assoc, true);\n        for (let i = this.from; i < this.to; i++)\n            pos = this.maps[i].map(pos, assoc);\n        return pos;\n    }\n    /**\n    Map a position through this mapping, returning a mapping\n    result.\n    */\n    mapResult(pos, assoc = 1) { return this._map(pos, assoc, false); }\n    /**\n    @internal\n    */\n    _map(pos, assoc, simple) {\n        let delInfo = 0;\n        for (let i = this.from; i < this.to; i++) {\n            let map = this.maps[i], result = map.mapResult(pos, assoc);\n            if (result.recover != null) {\n                let corr = this.getMirror(i);\n                if (corr != null && corr > i && corr < this.to) {\n                    i = corr;\n                    pos = this.maps[corr].recover(result.recover);\n                    continue;\n                }\n            }\n            delInfo |= result.delInfo;\n            pos = result.pos;\n        }\n        return simple ? pos : new MapResult(pos, delInfo, null);\n    }\n}\n\nconst stepsByID = Object.create(null);\n/**\nA step object represents an atomic change. It generally applies\nonly to the document it was created for, since the positions\nstored in it will only make sense for that document.\n\nNew steps are defined by creating classes that extend `Step`,\noverriding the `apply`, `invert`, `map`, `getMap` and `fromJSON`\nmethods, and registering your class with a unique\nJSON-serialization identifier using\n[`Step.jsonID`](https://prosemirror.net/docs/ref/#transform.Step^jsonID).\n*/\nclass Step {\n    /**\n    Get the step map that represents the changes made by this step,\n    and which can be used to transform between positions in the old\n    and the new document.\n    */\n    getMap() { return StepMap.empty; }\n    /**\n    Try to merge this step with another one, to be applied directly\n    after it. Returns the merged step when possible, null if the\n    steps can't be merged.\n    */\n    merge(other) { return null; }\n    /**\n    Deserialize a step from its JSON representation. Will call\n    through to the step class' own implementation of this method.\n    */\n    static fromJSON(schema, json) {\n        if (!json || !json.stepType)\n            throw new RangeError(\"Invalid input for Step.fromJSON\");\n        let type = stepsByID[json.stepType];\n        if (!type)\n            throw new RangeError(`No step type ${json.stepType} defined`);\n        return type.fromJSON(schema, json);\n    }\n    /**\n    To be able to serialize steps to JSON, each step needs a string\n    ID to attach to its JSON representation. Use this method to\n    register an ID for your step classes. Try to pick something\n    that's unlikely to clash with steps from other modules.\n    */\n    static jsonID(id, stepClass) {\n        if (id in stepsByID)\n            throw new RangeError(\"Duplicate use of step JSON ID \" + id);\n        stepsByID[id] = stepClass;\n        stepClass.prototype.jsonID = id;\n        return stepClass;\n    }\n}\n/**\nThe result of [applying](https://prosemirror.net/docs/ref/#transform.Step.apply) a step. Contains either a\nnew document or a failure value.\n*/\nclass StepResult {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    The transformed document, if successful.\n    */\n    doc, \n    /**\n    The failure message, if unsuccessful.\n    */\n    failed) {\n        this.doc = doc;\n        this.failed = failed;\n    }\n    /**\n    Create a successful step result.\n    */\n    static ok(doc) { return new StepResult(doc, null); }\n    /**\n    Create a failed step result.\n    */\n    static fail(message) { return new StepResult(null, message); }\n    /**\n    Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given\n    arguments. Create a successful result if it succeeds, and a\n    failed one if it throws a `ReplaceError`.\n    */\n    static fromReplace(doc, from, to, slice) {\n        try {\n            return StepResult.ok(doc.replace(from, to, slice));\n        }\n        catch (e) {\n            if (e instanceof ReplaceError)\n                return StepResult.fail(e.message);\n            throw e;\n        }\n    }\n}\n\nfunction mapFragment(fragment, f, parent) {\n    let mapped = [];\n    for (let i = 0; i < fragment.childCount; i++) {\n        let child = fragment.child(i);\n        if (child.content.size)\n            child = child.copy(mapFragment(child.content, f, child));\n        if (child.isInline)\n            child = f(child, parent, i);\n        mapped.push(child);\n    }\n    return Fragment.fromArray(mapped);\n}\n/**\nAdd a mark to all inline content between two positions.\n*/\nclass AddMarkStep extends Step {\n    /**\n    Create a mark step.\n    */\n    constructor(\n    /**\n    The start of the marked range.\n    */\n    from, \n    /**\n    The end of the marked range.\n    */\n    to, \n    /**\n    The mark to add.\n    */\n    mark) {\n        super();\n        this.from = from;\n        this.to = to;\n        this.mark = mark;\n    }\n    apply(doc) {\n        let oldSlice = doc.slice(this.from, this.to), $from = doc.resolve(this.from);\n        let parent = $from.node($from.sharedDepth(this.to));\n        let slice = new Slice(mapFragment(oldSlice.content, (node, parent) => {\n            if (!node.isAtom || !parent.type.allowsMarkType(this.mark.type))\n                return node;\n            return node.mark(this.mark.addToSet(node.marks));\n        }, parent), oldSlice.openStart, oldSlice.openEnd);\n        return StepResult.fromReplace(doc, this.from, this.to, slice);\n    }\n    invert() {\n        return new RemoveMarkStep(this.from, this.to, this.mark);\n    }\n    map(mapping) {\n        let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n        if (from.deleted && to.deleted || from.pos >= to.pos)\n            return null;\n        return new AddMarkStep(from.pos, to.pos, this.mark);\n    }\n    merge(other) {\n        if (other instanceof AddMarkStep &&\n            other.mark.eq(this.mark) &&\n            this.from <= other.to && this.to >= other.from)\n            return new AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n        return null;\n    }\n    toJSON() {\n        return { stepType: \"addMark\", mark: this.mark.toJSON(),\n            from: this.from, to: this.to };\n    }\n    /**\n    @internal\n    */\n    static fromJSON(schema, json) {\n        if (typeof json.from != \"number\" || typeof json.to != \"number\")\n            throw new RangeError(\"Invalid input for AddMarkStep.fromJSON\");\n        return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n    }\n}\nStep.jsonID(\"addMark\", AddMarkStep);\n/**\nRemove a mark from all inline content between two positions.\n*/\nclass RemoveMarkStep extends Step {\n    /**\n    Create a mark-removing step.\n    */\n    constructor(\n    /**\n    The start of the unmarked range.\n    */\n    from, \n    /**\n    The end of the unmarked range.\n    */\n    to, \n    /**\n    The mark to remove.\n    */\n    mark) {\n        super();\n        this.from = from;\n        this.to = to;\n        this.mark = mark;\n    }\n    apply(doc) {\n        let oldSlice = doc.slice(this.from, this.to);\n        let slice = new Slice(mapFragment(oldSlice.content, node => {\n            return node.mark(this.mark.removeFromSet(node.marks));\n        }, doc), oldSlice.openStart, oldSlice.openEnd);\n        return StepResult.fromReplace(doc, this.from, this.to, slice);\n    }\n    invert() {\n        return new AddMarkStep(this.from, this.to, this.mark);\n    }\n    map(mapping) {\n        let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n        if (from.deleted && to.deleted || from.pos >= to.pos)\n            return null;\n        return new RemoveMarkStep(from.pos, to.pos, this.mark);\n    }\n    merge(other) {\n        if (other instanceof RemoveMarkStep &&\n            other.mark.eq(this.mark) &&\n            this.from <= other.to && this.to >= other.from)\n            return new RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n        return null;\n    }\n    toJSON() {\n        return { stepType: \"removeMark\", mark: this.mark.toJSON(),\n            from: this.from, to: this.to };\n    }\n    /**\n    @internal\n    */\n    static fromJSON(schema, json) {\n        if (typeof json.from != \"number\" || typeof json.to != \"number\")\n            throw new RangeError(\"Invalid input for RemoveMarkStep.fromJSON\");\n        return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n    }\n}\nStep.jsonID(\"removeMark\", RemoveMarkStep);\n/**\nAdd a mark to a specific node.\n*/\nclass AddNodeMarkStep extends Step {\n    /**\n    Create a node mark step.\n    */\n    constructor(\n    /**\n    The position of the target node.\n    */\n    pos, \n    /**\n    The mark to add.\n    */\n    mark) {\n        super();\n        this.pos = pos;\n        this.mark = mark;\n    }\n    apply(doc) {\n        let node = doc.nodeAt(this.pos);\n        if (!node)\n            return StepResult.fail(\"No node at mark step's position\");\n        let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));\n        return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n    }\n    invert(doc) {\n        let node = doc.nodeAt(this.pos);\n        if (node) {\n            let newSet = this.mark.addToSet(node.marks);\n            if (newSet.length == node.marks.length) {\n                for (let i = 0; i < node.marks.length; i++)\n                    if (!node.marks[i].isInSet(newSet))\n                        return new AddNodeMarkStep(this.pos, node.marks[i]);\n                return new AddNodeMarkStep(this.pos, this.mark);\n            }\n        }\n        return new RemoveNodeMarkStep(this.pos, this.mark);\n    }\n    map(mapping) {\n        let pos = mapping.mapResult(this.pos, 1);\n        return pos.deletedAfter ? null : new AddNodeMarkStep(pos.pos, this.mark);\n    }\n    toJSON() {\n        return { stepType: \"addNodeMark\", pos: this.pos, mark: this.mark.toJSON() };\n    }\n    /**\n    @internal\n    */\n    static fromJSON(schema, json) {\n        if (typeof json.pos != \"number\")\n            throw new RangeError(\"Invalid input for AddNodeMarkStep.fromJSON\");\n        return new AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark));\n    }\n}\nStep.jsonID(\"addNodeMark\", AddNodeMarkStep);\n/**\nRemove a mark from a specific node.\n*/\nclass RemoveNodeMarkStep extends Step {\n    /**\n    Create a mark-removing step.\n    */\n    constructor(\n    /**\n    The position of the target node.\n    */\n    pos, \n    /**\n    The mark to remove.\n    */\n    mark) {\n        super();\n        this.pos = pos;\n        this.mark = mark;\n    }\n    apply(doc) {\n        let node = doc.nodeAt(this.pos);\n        if (!node)\n            return StepResult.fail(\"No node at mark step's position\");\n        let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));\n        return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n    }\n    invert(doc) {\n        let node = doc.nodeAt(this.pos);\n        if (!node || !this.mark.isInSet(node.marks))\n            return this;\n        return new AddNodeMarkStep(this.pos, this.mark);\n    }\n    map(mapping) {\n        let pos = mapping.mapResult(this.pos, 1);\n        return pos.deletedAfter ? null : new RemoveNodeMarkStep(pos.pos, this.mark);\n    }\n    toJSON() {\n        return { stepType: \"removeNodeMark\", pos: this.pos, mark: this.mark.toJSON() };\n    }\n    /**\n    @internal\n    */\n    static fromJSON(schema, json) {\n        if (typeof json.pos != \"number\")\n            throw new RangeError(\"Invalid input for RemoveNodeMarkStep.fromJSON\");\n        return new RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark));\n    }\n}\nStep.jsonID(\"removeNodeMark\", RemoveNodeMarkStep);\n\n/**\nReplace a part of the document with a slice of new content.\n*/\nclass ReplaceStep extends Step {\n    /**\n    The given `slice` should fit the 'gap' between `from` and\n    `to`—the depths must line up, and the surrounding nodes must be\n    able to be joined with the open sides of the slice. When\n    `structure` is true, the step will fail if the content between\n    from and to is not just a sequence of closing and then opening\n    tokens (this is to guard against rebased replace steps\n    overwriting something they weren't supposed to).\n    */\n    constructor(\n    /**\n    The start position of the replaced range.\n    */\n    from, \n    /**\n    The end position of the replaced range.\n    */\n    to, \n    /**\n    The slice to insert.\n    */\n    slice, \n    /**\n    @internal\n    */\n    structure = false) {\n        super();\n        this.from = from;\n        this.to = to;\n        this.slice = slice;\n        this.structure = structure;\n    }\n    apply(doc) {\n        if (this.structure && contentBetween(doc, this.from, this.to))\n            return StepResult.fail(\"Structure replace would overwrite content\");\n        return StepResult.fromReplace(doc, this.from, this.to, this.slice);\n    }\n    getMap() {\n        return new StepMap([this.from, this.to - this.from, this.slice.size]);\n    }\n    invert(doc) {\n        return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to));\n    }\n    map(mapping) {\n        let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n        if (from.deletedAcross && to.deletedAcross)\n            return null;\n        return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice);\n    }\n    merge(other) {\n        if (!(other instanceof ReplaceStep) || other.structure || this.structure)\n            return null;\n        if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {\n            let slice = this.slice.size + other.slice.size == 0 ? Slice.empty\n                : new Slice(this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);\n            return new ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure);\n        }\n        else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {\n            let slice = this.slice.size + other.slice.size == 0 ? Slice.empty\n                : new Slice(other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);\n            return new ReplaceStep(other.from, this.to, slice, this.structure);\n        }\n        else {\n            return null;\n        }\n    }\n    toJSON() {\n        let json = { stepType: \"replace\", from: this.from, to: this.to };\n        if (this.slice.size)\n            json.slice = this.slice.toJSON();\n        if (this.structure)\n            json.structure = true;\n        return json;\n    }\n    /**\n    @internal\n    */\n    static fromJSON(schema, json) {\n        if (typeof json.from != \"number\" || typeof json.to != \"number\")\n            throw new RangeError(\"Invalid input for ReplaceStep.fromJSON\");\n        return new ReplaceStep(json.from, json.to, Slice.fromJSON(schema, json.slice), !!json.structure);\n    }\n}\nStep.jsonID(\"replace\", ReplaceStep);\n/**\nReplace a part of the document with a slice of content, but\npreserve a range of the replaced content by moving it into the\nslice.\n*/\nclass ReplaceAroundStep extends Step {\n    /**\n    Create a replace-around step with the given range and gap.\n    `insert` should be the point in the slice into which the content\n    of the gap should be moved. `structure` has the same meaning as\n    it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class.\n    */\n    constructor(\n    /**\n    The start position of the replaced range.\n    */\n    from, \n    /**\n    The end position of the replaced range.\n    */\n    to, \n    /**\n    The start of preserved range.\n    */\n    gapFrom, \n    /**\n    The end of preserved range.\n    */\n    gapTo, \n    /**\n    The slice to insert.\n    */\n    slice, \n    /**\n    The position in the slice where the preserved range should be\n    inserted.\n    */\n    insert, \n    /**\n    @internal\n    */\n    structure = false) {\n        super();\n        this.from = from;\n        this.to = to;\n        this.gapFrom = gapFrom;\n        this.gapTo = gapTo;\n        this.slice = slice;\n        this.insert = insert;\n        this.structure = structure;\n    }\n    apply(doc) {\n        if (this.structure && (contentBetween(doc, this.from, this.gapFrom) ||\n            contentBetween(doc, this.gapTo, this.to)))\n            return StepResult.fail(\"Structure gap-replace would overwrite content\");\n        let gap = doc.slice(this.gapFrom, this.gapTo);\n        if (gap.openStart || gap.openEnd)\n            return StepResult.fail(\"Gap is not a flat range\");\n        let inserted = this.slice.insertAt(this.insert, gap.content);\n        if (!inserted)\n            return StepResult.fail(\"Content does not fit in gap\");\n        return StepResult.fromReplace(doc, this.from, this.to, inserted);\n    }\n    getMap() {\n        return new StepMap([this.from, this.gapFrom - this.from, this.insert,\n            this.gapTo, this.to - this.gapTo, this.slice.size - this.insert]);\n    }\n    invert(doc) {\n        let gap = this.gapTo - this.gapFrom;\n        return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);\n    }\n    map(mapping) {\n        let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n        let gapFrom = this.from == this.gapFrom ? from.pos : mapping.map(this.gapFrom, -1);\n        let gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1);\n        if ((from.deletedAcross && to.deletedAcross) || gapFrom < from.pos || gapTo > to.pos)\n            return null;\n        return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);\n    }\n    toJSON() {\n        let json = { stepType: \"replaceAround\", from: this.from, to: this.to,\n            gapFrom: this.gapFrom, gapTo: this.gapTo, insert: this.insert };\n        if (this.slice.size)\n            json.slice = this.slice.toJSON();\n        if (this.structure)\n            json.structure = true;\n        return json;\n    }\n    /**\n    @internal\n    */\n    static fromJSON(schema, json) {\n        if (typeof json.from != \"number\" || typeof json.to != \"number\" ||\n            typeof json.gapFrom != \"number\" || typeof json.gapTo != \"number\" || typeof json.insert != \"number\")\n            throw new RangeError(\"Invalid input for ReplaceAroundStep.fromJSON\");\n        return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, Slice.fromJSON(schema, json.slice), json.insert, !!json.structure);\n    }\n}\nStep.jsonID(\"replaceAround\", ReplaceAroundStep);\nfunction contentBetween(doc, from, to) {\n    let $from = doc.resolve(from), dist = to - from, depth = $from.depth;\n    while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {\n        depth--;\n        dist--;\n    }\n    if (dist > 0) {\n        let next = $from.node(depth).maybeChild($from.indexAfter(depth));\n        while (dist > 0) {\n            if (!next || next.isLeaf)\n                return true;\n            next = next.firstChild;\n            dist--;\n        }\n    }\n    return false;\n}\n\nfunction addMark(tr, from, to, mark) {\n    let removed = [], added = [];\n    let removing, adding;\n    tr.doc.nodesBetween(from, to, (node, pos, parent) => {\n        if (!node.isInline)\n            return;\n        let marks = node.marks;\n        if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {\n            let start = Math.max(pos, from), end = Math.min(pos + node.nodeSize, to);\n            let newSet = mark.addToSet(marks);\n            for (let i = 0; i < marks.length; i++) {\n                if (!marks[i].isInSet(newSet)) {\n                    if (removing && removing.to == start && removing.mark.eq(marks[i]))\n                        removing.to = end;\n                    else\n                        removed.push(removing = new RemoveMarkStep(start, end, marks[i]));\n                }\n            }\n            if (adding && adding.to == start)\n                adding.to = end;\n            else\n                added.push(adding = new AddMarkStep(start, end, mark));\n        }\n    });\n    removed.forEach(s => tr.step(s));\n    added.forEach(s => tr.step(s));\n}\nfunction removeMark(tr, from, to, mark) {\n    let matched = [], step = 0;\n    tr.doc.nodesBetween(from, to, (node, pos) => {\n        if (!node.isInline)\n            return;\n        step++;\n        let toRemove = null;\n        if (mark instanceof MarkType) {\n            let set = node.marks, found;\n            while (found = mark.isInSet(set)) {\n                (toRemove || (toRemove = [])).push(found);\n                set = found.removeFromSet(set);\n            }\n        }\n        else if (mark) {\n            if (mark.isInSet(node.marks))\n                toRemove = [mark];\n        }\n        else {\n            toRemove = node.marks;\n        }\n        if (toRemove && toRemove.length) {\n            let end = Math.min(pos + node.nodeSize, to);\n            for (let i = 0; i < toRemove.length; i++) {\n                let style = toRemove[i], found;\n                for (let j = 0; j < matched.length; j++) {\n                    let m = matched[j];\n                    if (m.step == step - 1 && style.eq(matched[j].style))\n                        found = m;\n                }\n                if (found) {\n                    found.to = end;\n                    found.step = step;\n                }\n                else {\n                    matched.push({ style, from: Math.max(pos, from), to: end, step });\n                }\n            }\n        }\n    });\n    matched.forEach(m => tr.step(new RemoveMarkStep(m.from, m.to, m.style)));\n}\nfunction clearIncompatible(tr, pos, parentType, match = parentType.contentMatch, clearNewlines = true) {\n    let node = tr.doc.nodeAt(pos);\n    let replSteps = [], cur = pos + 1;\n    for (let i = 0; i < node.childCount; i++) {\n        let child = node.child(i), end = cur + child.nodeSize;\n        let allowed = match.matchType(child.type);\n        if (!allowed) {\n            replSteps.push(new ReplaceStep(cur, end, Slice.empty));\n        }\n        else {\n            match = allowed;\n            for (let j = 0; j < child.marks.length; j++)\n                if (!parentType.allowsMarkType(child.marks[j].type))\n                    tr.step(new RemoveMarkStep(cur, end, child.marks[j]));\n            if (clearNewlines && child.isText && parentType.whitespace != \"pre\") {\n                let m, newline = /\\r?\\n|\\r/g, slice;\n                while (m = newline.exec(child.text)) {\n                    if (!slice)\n                        slice = new Slice(Fragment.from(parentType.schema.text(\" \", parentType.allowedMarks(child.marks))), 0, 0);\n                    replSteps.push(new ReplaceStep(cur + m.index, cur + m.index + m[0].length, slice));\n                }\n            }\n        }\n        cur = end;\n    }\n    if (!match.validEnd) {\n        let fill = match.fillBefore(Fragment.empty, true);\n        tr.replace(cur, cur, new Slice(fill, 0, 0));\n    }\n    for (let i = replSteps.length - 1; i >= 0; i--)\n        tr.step(replSteps[i]);\n}\n\nfunction canCut(node, start, end) {\n    return (start == 0 || node.canReplace(start, node.childCount)) &&\n        (end == node.childCount || node.canReplace(0, end));\n}\n/**\nTry to find a target depth to which the content in the given range\ncan be lifted. Will not go across\n[isolating](https://prosemirror.net/docs/ref/#model.NodeSpec.isolating) parent nodes.\n*/\nfunction liftTarget(range) {\n    let parent = range.parent;\n    let content = parent.content.cutByIndex(range.startIndex, range.endIndex);\n    for (let depth = range.depth;; --depth) {\n        let node = range.$from.node(depth);\n        let index = range.$from.index(depth), endIndex = range.$to.indexAfter(depth);\n        if (depth < range.depth && node.canReplace(index, endIndex, content))\n            return depth;\n        if (depth == 0 || node.type.spec.isolating || !canCut(node, index, endIndex))\n            break;\n    }\n    return null;\n}\nfunction lift(tr, range, target) {\n    let { $from, $to, depth } = range;\n    let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);\n    let start = gapStart, end = gapEnd;\n    let before = Fragment.empty, openStart = 0;\n    for (let d = depth, splitting = false; d > target; d--)\n        if (splitting || $from.index(d) > 0) {\n            splitting = true;\n            before = Fragment.from($from.node(d).copy(before));\n            openStart++;\n        }\n        else {\n            start--;\n        }\n    let after = Fragment.empty, openEnd = 0;\n    for (let d = depth, splitting = false; d > target; d--)\n        if (splitting || $to.after(d + 1) < $to.end(d)) {\n            splitting = true;\n            after = Fragment.from($to.node(d).copy(after));\n            openEnd++;\n        }\n        else {\n            end++;\n        }\n    tr.step(new ReplaceAroundStep(start, end, gapStart, gapEnd, new Slice(before.append(after), openStart, openEnd), before.size - openStart, true));\n}\n/**\nTry to find a valid way to wrap the content in the given range in a\nnode of the given type. May introduce extra nodes around and inside\nthe wrapper node, if necessary. Returns null if no valid wrapping\ncould be found. When `innerRange` is given, that range's content is\nused as the content to fit into the wrapping, instead of the\ncontent of `range`.\n*/\nfunction findWrapping(range, nodeType, attrs = null, innerRange = range) {\n    let around = findWrappingOutside(range, nodeType);\n    let inner = around && findWrappingInside(innerRange, nodeType);\n    if (!inner)\n        return null;\n    return around.map(withAttrs)\n        .concat({ type: nodeType, attrs }).concat(inner.map(withAttrs));\n}\nfunction withAttrs(type) { return { type, attrs: null }; }\nfunction findWrappingOutside(range, type) {\n    let { parent, startIndex, endIndex } = range;\n    let around = parent.contentMatchAt(startIndex).findWrapping(type);\n    if (!around)\n        return null;\n    let outer = around.length ? around[0] : type;\n    return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;\n}\nfunction findWrappingInside(range, type) {\n    let { parent, startIndex, endIndex } = range;\n    let inner = parent.child(startIndex);\n    let inside = type.contentMatch.findWrapping(inner.type);\n    if (!inside)\n        return null;\n    let lastType = inside.length ? inside[inside.length - 1] : type;\n    let innerMatch = lastType.contentMatch;\n    for (let i = startIndex; innerMatch && i < endIndex; i++)\n        innerMatch = innerMatch.matchType(parent.child(i).type);\n    if (!innerMatch || !innerMatch.validEnd)\n        return null;\n    return inside;\n}\nfunction wrap(tr, range, wrappers) {\n    let content = Fragment.empty;\n    for (let i = wrappers.length - 1; i >= 0; i--) {\n        if (content.size) {\n            let match = wrappers[i].type.contentMatch.matchFragment(content);\n            if (!match || !match.validEnd)\n                throw new RangeError(\"Wrapper type given to Transform.wrap does not form valid content of its parent wrapper\");\n        }\n        content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));\n    }\n    let start = range.start, end = range.end;\n    tr.step(new ReplaceAroundStep(start, end, start, end, new Slice(content, 0, 0), wrappers.length, true));\n}\nfunction setBlockType(tr, from, to, type, attrs) {\n    if (!type.isTextblock)\n        throw new RangeError(\"Type given to setBlockType should be a textblock\");\n    let mapFrom = tr.steps.length;\n    tr.doc.nodesBetween(from, to, (node, pos) => {\n        let attrsHere = typeof attrs == \"function\" ? attrs(node) : attrs;\n        if (node.isTextblock && !node.hasMarkup(type, attrsHere) &&\n            canChangeType(tr.doc, tr.mapping.slice(mapFrom).map(pos), type)) {\n            let convertNewlines = null;\n            if (type.schema.linebreakReplacement) {\n                let pre = type.whitespace == \"pre\", supportLinebreak = !!type.contentMatch.matchType(type.schema.linebreakReplacement);\n                if (pre && !supportLinebreak)\n                    convertNewlines = false;\n                else if (!pre && supportLinebreak)\n                    convertNewlines = true;\n            }\n            // Ensure all markup that isn't allowed in the new node type is cleared\n            if (convertNewlines === false)\n                replaceLinebreaks(tr, node, pos, mapFrom);\n            clearIncompatible(tr, tr.mapping.slice(mapFrom).map(pos, 1), type, undefined, convertNewlines === null);\n            let mapping = tr.mapping.slice(mapFrom);\n            let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);\n            tr.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));\n            if (convertNewlines === true)\n                replaceNewlines(tr, node, pos, mapFrom);\n            return false;\n        }\n    });\n}\nfunction replaceNewlines(tr, node, pos, mapFrom) {\n    node.forEach((child, offset) => {\n        if (child.isText) {\n            let m, newline = /\\r?\\n|\\r/g;\n            while (m = newline.exec(child.text)) {\n                let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset + m.index);\n                tr.replaceWith(start, start + 1, node.type.schema.linebreakReplacement.create());\n            }\n        }\n    });\n}\nfunction replaceLinebreaks(tr, node, pos, mapFrom) {\n    node.forEach((child, offset) => {\n        if (child.type == child.type.schema.linebreakReplacement) {\n            let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset);\n            tr.replaceWith(start, start + 1, node.type.schema.text(\"\\n\"));\n        }\n    });\n}\nfunction canChangeType(doc, pos, type) {\n    let $pos = doc.resolve(pos), index = $pos.index();\n    return $pos.parent.canReplaceWith(index, index + 1, type);\n}\n/**\nChange the type, attributes, and/or marks of the node at `pos`.\nWhen `type` isn't given, the existing node type is preserved,\n*/\nfunction setNodeMarkup(tr, pos, type, attrs, marks) {\n    let node = tr.doc.nodeAt(pos);\n    if (!node)\n        throw new RangeError(\"No node at given position\");\n    if (!type)\n        type = node.type;\n    let newNode = type.create(attrs, null, marks || node.marks);\n    if (node.isLeaf)\n        return tr.replaceWith(pos, pos + node.nodeSize, newNode);\n    if (!type.validContent(node.content))\n        throw new RangeError(\"Invalid content for node type \" + type.name);\n    tr.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(Fragment.from(newNode), 0, 0), 1, true));\n}\n/**\nCheck whether splitting at the given position is allowed.\n*/\nfunction canSplit(doc, pos, depth = 1, typesAfter) {\n    let $pos = doc.resolve(pos), base = $pos.depth - depth;\n    let innerType = (typesAfter && typesAfter[typesAfter.length - 1]) || $pos.parent;\n    if (base < 0 || $pos.parent.type.spec.isolating ||\n        !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) ||\n        !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount)))\n        return false;\n    for (let d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {\n        let node = $pos.node(d), index = $pos.index(d);\n        if (node.type.spec.isolating)\n            return false;\n        let rest = node.content.cutByIndex(index, node.childCount);\n        let overrideChild = typesAfter && typesAfter[i + 1];\n        if (overrideChild)\n            rest = rest.replaceChild(0, overrideChild.type.create(overrideChild.attrs));\n        let after = (typesAfter && typesAfter[i]) || node;\n        if (!node.canReplace(index + 1, node.childCount) || !after.type.validContent(rest))\n            return false;\n    }\n    let index = $pos.indexAfter(base);\n    let baseType = typesAfter && typesAfter[0];\n    return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type);\n}\nfunction split(tr, pos, depth = 1, typesAfter) {\n    let $pos = tr.doc.resolve(pos), before = Fragment.empty, after = Fragment.empty;\n    for (let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {\n        before = Fragment.from($pos.node(d).copy(before));\n        let typeAfter = typesAfter && typesAfter[i];\n        after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));\n    }\n    tr.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));\n}\n/**\nTest whether the blocks before and after a given position can be\njoined.\n*/\nfunction canJoin(doc, pos) {\n    let $pos = doc.resolve(pos), index = $pos.index();\n    return joinable($pos.nodeBefore, $pos.nodeAfter) &&\n        $pos.parent.canReplace(index, index + 1);\n}\nfunction canAppendWithSubstitutedLinebreaks(a, b) {\n    if (!b.content.size)\n        a.type.compatibleContent(b.type);\n    let match = a.contentMatchAt(a.childCount);\n    let { linebreakReplacement } = a.type.schema;\n    for (let i = 0; i < b.childCount; i++) {\n        let child = b.child(i);\n        let type = child.type == linebreakReplacement ? a.type.schema.nodes.text : child.type;\n        match = match.matchType(type);\n        if (!match)\n            return false;\n        if (!a.type.allowsMarks(child.marks))\n            return false;\n    }\n    return match.validEnd;\n}\nfunction joinable(a, b) {\n    return !!(a && b && !a.isLeaf && canAppendWithSubstitutedLinebreaks(a, b));\n}\n/**\nFind an ancestor of the given position that can be joined to the\nblock before (or after if `dir` is positive). Returns the joinable\npoint, if any.\n*/\nfunction joinPoint(doc, pos, dir = -1) {\n    let $pos = doc.resolve(pos);\n    for (let d = $pos.depth;; d--) {\n        let before, after, index = $pos.index(d);\n        if (d == $pos.depth) {\n            before = $pos.nodeBefore;\n            after = $pos.nodeAfter;\n        }\n        else if (dir > 0) {\n            before = $pos.node(d + 1);\n            index++;\n            after = $pos.node(d).maybeChild(index);\n        }\n        else {\n            before = $pos.node(d).maybeChild(index - 1);\n            after = $pos.node(d + 1);\n        }\n        if (before && !before.isTextblock && joinable(before, after) &&\n            $pos.node(d).canReplace(index, index + 1))\n            return pos;\n        if (d == 0)\n            break;\n        pos = dir < 0 ? $pos.before(d) : $pos.after(d);\n    }\n}\nfunction join(tr, pos, depth) {\n    let convertNewlines = null;\n    let { linebreakReplacement } = tr.doc.type.schema;\n    let $before = tr.doc.resolve(pos - depth), beforeType = $before.node().type;\n    if (linebreakReplacement && beforeType.inlineContent) {\n        let pre = beforeType.whitespace == \"pre\";\n        let supportLinebreak = !!beforeType.contentMatch.matchType(linebreakReplacement);\n        if (pre && !supportLinebreak)\n            convertNewlines = false;\n        else if (!pre && supportLinebreak)\n            convertNewlines = true;\n    }\n    let mapFrom = tr.steps.length;\n    if (convertNewlines === false) {\n        let $after = tr.doc.resolve(pos + depth);\n        replaceLinebreaks(tr, $after.node(), $after.before(), mapFrom);\n    }\n    if (beforeType.inlineContent)\n        clearIncompatible(tr, pos + depth - 1, beforeType, $before.node().contentMatchAt($before.index()), convertNewlines == null);\n    let mapping = tr.mapping.slice(mapFrom), start = mapping.map(pos - depth);\n    tr.step(new ReplaceStep(start, mapping.map(pos + depth, -1), Slice.empty, true));\n    if (convertNewlines === true) {\n        let $full = tr.doc.resolve(start);\n        replaceNewlines(tr, $full.node(), $full.before(), tr.steps.length);\n    }\n    return tr;\n}\n/**\nTry to find a point where a node of the given type can be inserted\nnear `pos`, by searching up the node hierarchy when `pos` itself\nisn't a valid place but is at the start or end of a node. Return\nnull if no position was found.\n*/\nfunction insertPoint(doc, pos, nodeType) {\n    let $pos = doc.resolve(pos);\n    if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType))\n        return pos;\n    if ($pos.parentOffset == 0)\n        for (let d = $pos.depth - 1; d >= 0; d--) {\n            let index = $pos.index(d);\n            if ($pos.node(d).canReplaceWith(index, index, nodeType))\n                return $pos.before(d + 1);\n            if (index > 0)\n                return null;\n        }\n    if ($pos.parentOffset == $pos.parent.content.size)\n        for (let d = $pos.depth - 1; d >= 0; d--) {\n            let index = $pos.indexAfter(d);\n            if ($pos.node(d).canReplaceWith(index, index, nodeType))\n                return $pos.after(d + 1);\n            if (index < $pos.node(d).childCount)\n                return null;\n        }\n    return null;\n}\n/**\nFinds a position at or around the given position where the given\nslice can be inserted. Will look at parent nodes' nearest boundary\nand try there, even if the original position wasn't directly at the\nstart or end of that node. Returns null when no position was found.\n*/\nfunction dropPoint(doc, pos, slice) {\n    let $pos = doc.resolve(pos);\n    if (!slice.content.size)\n        return pos;\n    let content = slice.content;\n    for (let i = 0; i < slice.openStart; i++)\n        content = content.firstChild.content;\n    for (let pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {\n        for (let d = $pos.depth; d >= 0; d--) {\n            let bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;\n            let insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);\n            let parent = $pos.node(d), fits = false;\n            if (pass == 1) {\n                fits = parent.canReplace(insertPos, insertPos, content);\n            }\n            else {\n                let wrapping = parent.contentMatchAt(insertPos).findWrapping(content.firstChild.type);\n                fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);\n            }\n            if (fits)\n                return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);\n        }\n    }\n    return null;\n}\n\n/**\n‘Fit’ a slice into a given position in the document, producing a\n[step](https://prosemirror.net/docs/ref/#transform.Step) that inserts it. Will return null if\nthere's no meaningful way to insert the slice here, or inserting it\nwould be a no-op (an empty slice over an empty range).\n*/\nfunction replaceStep(doc, from, to = from, slice = Slice.empty) {\n    if (from == to && !slice.size)\n        return null;\n    let $from = doc.resolve(from), $to = doc.resolve(to);\n    // Optimization -- avoid work if it's obvious that it's not needed.\n    if (fitsTrivially($from, $to, slice))\n        return new ReplaceStep(from, to, slice);\n    return new Fitter($from, $to, slice).fit();\n}\nfunction fitsTrivially($from, $to, slice) {\n    return !slice.openStart && !slice.openEnd && $from.start() == $to.start() &&\n        $from.parent.canReplace($from.index(), $to.index(), slice.content);\n}\n// Algorithm for 'placing' the elements of a slice into a gap:\n//\n// We consider the content of each node that is open to the left to be\n// independently placeable. I.e. in <p(\"foo\"), p(\"bar\")>, when the\n// paragraph on the left is open, \"foo\" can be placed (somewhere on\n// the left side of the replacement gap) independently from p(\"bar\").\n//\n// This class tracks the state of the placement progress in the\n// following properties:\n//\n//  - `frontier` holds a stack of `{type, match}` objects that\n//    represent the open side of the replacement. It starts at\n//    `$from`, then moves forward as content is placed, and is finally\n//    reconciled with `$to`.\n//\n//  - `unplaced` is a slice that represents the content that hasn't\n//    been placed yet.\n//\n//  - `placed` is a fragment of placed content. Its open-start value\n//    is implicit in `$from`, and its open-end value in `frontier`.\nclass Fitter {\n    constructor($from, $to, unplaced) {\n        this.$from = $from;\n        this.$to = $to;\n        this.unplaced = unplaced;\n        this.frontier = [];\n        this.placed = Fragment.empty;\n        for (let i = 0; i <= $from.depth; i++) {\n            let node = $from.node(i);\n            this.frontier.push({\n                type: node.type,\n                match: node.contentMatchAt($from.indexAfter(i))\n            });\n        }\n        for (let i = $from.depth; i > 0; i--)\n            this.placed = Fragment.from($from.node(i).copy(this.placed));\n    }\n    get depth() { return this.frontier.length - 1; }\n    fit() {\n        // As long as there's unplaced content, try to place some of it.\n        // If that fails, either increase the open score of the unplaced\n        // slice, or drop nodes from it, and then try again.\n        while (this.unplaced.size) {\n            let fit = this.findFittable();\n            if (fit)\n                this.placeNodes(fit);\n            else\n                this.openMore() || this.dropNode();\n        }\n        // When there's inline content directly after the frontier _and_\n        // directly after `this.$to`, we must generate a `ReplaceAround`\n        // step that pulls that content into the node after the frontier.\n        // That means the fitting must be done to the end of the textblock\n        // node after `this.$to`, not `this.$to` itself.\n        let moveInline = this.mustMoveInline(), placedSize = this.placed.size - this.depth - this.$from.depth;\n        let $from = this.$from, $to = this.close(moveInline < 0 ? this.$to : $from.doc.resolve(moveInline));\n        if (!$to)\n            return null;\n        // If closing to `$to` succeeded, create a step\n        let content = this.placed, openStart = $from.depth, openEnd = $to.depth;\n        while (openStart && openEnd && content.childCount == 1) { // Normalize by dropping open parent nodes\n            content = content.firstChild.content;\n            openStart--;\n            openEnd--;\n        }\n        let slice = new Slice(content, openStart, openEnd);\n        if (moveInline > -1)\n            return new ReplaceAroundStep($from.pos, moveInline, this.$to.pos, this.$to.end(), slice, placedSize);\n        if (slice.size || $from.pos != this.$to.pos) // Don't generate no-op steps\n            return new ReplaceStep($from.pos, $to.pos, slice);\n        return null;\n    }\n    // Find a position on the start spine of `this.unplaced` that has\n    // content that can be moved somewhere on the frontier. Returns two\n    // depths, one for the slice and one for the frontier.\n    findFittable() {\n        let startDepth = this.unplaced.openStart;\n        for (let cur = this.unplaced.content, d = 0, openEnd = this.unplaced.openEnd; d < startDepth; d++) {\n            let node = cur.firstChild;\n            if (cur.childCount > 1)\n                openEnd = 0;\n            if (node.type.spec.isolating && openEnd <= d) {\n                startDepth = d;\n                break;\n            }\n            cur = node.content;\n        }\n        // Only try wrapping nodes (pass 2) after finding a place without\n        // wrapping failed.\n        for (let pass = 1; pass <= 2; pass++) {\n            for (let sliceDepth = pass == 1 ? startDepth : this.unplaced.openStart; sliceDepth >= 0; sliceDepth--) {\n                let fragment, parent = null;\n                if (sliceDepth) {\n                    parent = contentAt(this.unplaced.content, sliceDepth - 1).firstChild;\n                    fragment = parent.content;\n                }\n                else {\n                    fragment = this.unplaced.content;\n                }\n                let first = fragment.firstChild;\n                for (let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {\n                    let { type, match } = this.frontier[frontierDepth], wrap, inject = null;\n                    // In pass 1, if the next node matches, or there is no next\n                    // node but the parents look compatible, we've found a\n                    // place.\n                    if (pass == 1 && (first ? match.matchType(first.type) || (inject = match.fillBefore(Fragment.from(first), false))\n                        : parent && type.compatibleContent(parent.type)))\n                        return { sliceDepth, frontierDepth, parent, inject };\n                    // In pass 2, look for a set of wrapping nodes that make\n                    // `first` fit here.\n                    else if (pass == 2 && first && (wrap = match.findWrapping(first.type)))\n                        return { sliceDepth, frontierDepth, parent, wrap };\n                    // Don't continue looking further up if the parent node\n                    // would fit here.\n                    if (parent && match.matchType(parent.type))\n                        break;\n                }\n            }\n        }\n    }\n    openMore() {\n        let { content, openStart, openEnd } = this.unplaced;\n        let inner = contentAt(content, openStart);\n        if (!inner.childCount || inner.firstChild.isLeaf)\n            return false;\n        this.unplaced = new Slice(content, openStart + 1, Math.max(openEnd, inner.size + openStart >= content.size - openEnd ? openStart + 1 : 0));\n        return true;\n    }\n    dropNode() {\n        let { content, openStart, openEnd } = this.unplaced;\n        let inner = contentAt(content, openStart);\n        if (inner.childCount <= 1 && openStart > 0) {\n            let openAtEnd = content.size - openStart <= openStart + inner.size;\n            this.unplaced = new Slice(dropFromFragment(content, openStart - 1, 1), openStart - 1, openAtEnd ? openStart - 1 : openEnd);\n        }\n        else {\n            this.unplaced = new Slice(dropFromFragment(content, openStart, 1), openStart, openEnd);\n        }\n    }\n    // Move content from the unplaced slice at `sliceDepth` to the\n    // frontier node at `frontierDepth`. Close that frontier node when\n    // applicable.\n    placeNodes({ sliceDepth, frontierDepth, parent, inject, wrap }) {\n        while (this.depth > frontierDepth)\n            this.closeFrontierNode();\n        if (wrap)\n            for (let i = 0; i < wrap.length; i++)\n                this.openFrontierNode(wrap[i]);\n        let slice = this.unplaced, fragment = parent ? parent.content : slice.content;\n        let openStart = slice.openStart - sliceDepth;\n        let taken = 0, add = [];\n        let { match, type } = this.frontier[frontierDepth];\n        if (inject) {\n            for (let i = 0; i < inject.childCount; i++)\n                add.push(inject.child(i));\n            match = match.matchFragment(inject);\n        }\n        // Computes the amount of (end) open nodes at the end of the\n        // fragment. When 0, the parent is open, but no more. When\n        // negative, nothing is open.\n        let openEndCount = (fragment.size + sliceDepth) - (slice.content.size - slice.openEnd);\n        // Scan over the fragment, fitting as many child nodes as\n        // possible.\n        while (taken < fragment.childCount) {\n            let next = fragment.child(taken), matches = match.matchType(next.type);\n            if (!matches)\n                break;\n            taken++;\n            if (taken > 1 || openStart == 0 || next.content.size) { // Drop empty open nodes\n                match = matches;\n                add.push(closeNodeStart(next.mark(type.allowedMarks(next.marks)), taken == 1 ? openStart : 0, taken == fragment.childCount ? openEndCount : -1));\n            }\n        }\n        let toEnd = taken == fragment.childCount;\n        if (!toEnd)\n            openEndCount = -1;\n        this.placed = addToFragment(this.placed, frontierDepth, Fragment.from(add));\n        this.frontier[frontierDepth].match = match;\n        // If the parent types match, and the entire node was moved, and\n        // it's not open, close this frontier node right away.\n        if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)\n            this.closeFrontierNode();\n        // Add new frontier nodes for any open nodes at the end.\n        for (let i = 0, cur = fragment; i < openEndCount; i++) {\n            let node = cur.lastChild;\n            this.frontier.push({ type: node.type, match: node.contentMatchAt(node.childCount) });\n            cur = node.content;\n        }\n        // Update `this.unplaced`. Drop the entire node from which we\n        // placed it we got to its end, otherwise just drop the placed\n        // nodes.\n        this.unplaced = !toEnd ? new Slice(dropFromFragment(slice.content, sliceDepth, taken), slice.openStart, slice.openEnd)\n            : sliceDepth == 0 ? Slice.empty\n                : new Slice(dropFromFragment(slice.content, sliceDepth - 1, 1), sliceDepth - 1, openEndCount < 0 ? slice.openEnd : sliceDepth - 1);\n    }\n    mustMoveInline() {\n        if (!this.$to.parent.isTextblock)\n            return -1;\n        let top = this.frontier[this.depth], level;\n        if (!top.type.isTextblock || !contentAfterFits(this.$to, this.$to.depth, top.type, top.match, false) ||\n            (this.$to.depth == this.depth && (level = this.findCloseLevel(this.$to)) && level.depth == this.depth))\n            return -1;\n        let { depth } = this.$to, after = this.$to.after(depth);\n        while (depth > 1 && after == this.$to.end(--depth))\n            ++after;\n        return after;\n    }\n    findCloseLevel($to) {\n        scan: for (let i = Math.min(this.depth, $to.depth); i >= 0; i--) {\n            let { match, type } = this.frontier[i];\n            let dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));\n            let fit = contentAfterFits($to, i, type, match, dropInner);\n            if (!fit)\n                continue;\n            for (let d = i - 1; d >= 0; d--) {\n                let { match, type } = this.frontier[d];\n                let matches = contentAfterFits($to, d, type, match, true);\n                if (!matches || matches.childCount)\n                    continue scan;\n            }\n            return { depth: i, fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to };\n        }\n    }\n    close($to) {\n        let close = this.findCloseLevel($to);\n        if (!close)\n            return null;\n        while (this.depth > close.depth)\n            this.closeFrontierNode();\n        if (close.fit.childCount)\n            this.placed = addToFragment(this.placed, close.depth, close.fit);\n        $to = close.move;\n        for (let d = close.depth + 1; d <= $to.depth; d++) {\n            let node = $to.node(d), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));\n            this.openFrontierNode(node.type, node.attrs, add);\n        }\n        return $to;\n    }\n    openFrontierNode(type, attrs = null, content) {\n        let top = this.frontier[this.depth];\n        top.match = top.match.matchType(type);\n        this.placed = addToFragment(this.placed, this.depth, Fragment.from(type.create(attrs, content)));\n        this.frontier.push({ type, match: type.contentMatch });\n    }\n    closeFrontierNode() {\n        let open = this.frontier.pop();\n        let add = open.match.fillBefore(Fragment.empty, true);\n        if (add.childCount)\n            this.placed = addToFragment(this.placed, this.frontier.length, add);\n    }\n}\nfunction dropFromFragment(fragment, depth, count) {\n    if (depth == 0)\n        return fragment.cutByIndex(count, fragment.childCount);\n    return fragment.replaceChild(0, fragment.firstChild.copy(dropFromFragment(fragment.firstChild.content, depth - 1, count)));\n}\nfunction addToFragment(fragment, depth, content) {\n    if (depth == 0)\n        return fragment.append(content);\n    return fragment.replaceChild(fragment.childCount - 1, fragment.lastChild.copy(addToFragment(fragment.lastChild.content, depth - 1, content)));\n}\nfunction contentAt(fragment, depth) {\n    for (let i = 0; i < depth; i++)\n        fragment = fragment.firstChild.content;\n    return fragment;\n}\nfunction closeNodeStart(node, openStart, openEnd) {\n    if (openStart <= 0)\n        return node;\n    let frag = node.content;\n    if (openStart > 1)\n        frag = frag.replaceChild(0, closeNodeStart(frag.firstChild, openStart - 1, frag.childCount == 1 ? openEnd - 1 : 0));\n    if (openStart > 0) {\n        frag = node.type.contentMatch.fillBefore(frag).append(frag);\n        if (openEnd <= 0)\n            frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment.empty, true));\n    }\n    return node.copy(frag);\n}\nfunction contentAfterFits($to, depth, type, match, open) {\n    let node = $to.node(depth), index = open ? $to.indexAfter(depth) : $to.index(depth);\n    if (index == node.childCount && !type.compatibleContent(node.type))\n        return null;\n    let fit = match.fillBefore(node.content, true, index);\n    return fit && !invalidMarks(type, node.content, index) ? fit : null;\n}\nfunction invalidMarks(type, fragment, start) {\n    for (let i = start; i < fragment.childCount; i++)\n        if (!type.allowsMarks(fragment.child(i).marks))\n            return true;\n    return false;\n}\nfunction definesContent(type) {\n    return type.spec.defining || type.spec.definingForContent;\n}\nfunction replaceRange(tr, from, to, slice) {\n    if (!slice.size)\n        return tr.deleteRange(from, to);\n    let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);\n    if (fitsTrivially($from, $to, slice))\n        return tr.step(new ReplaceStep(from, to, slice));\n    let targetDepths = coveredDepths($from, tr.doc.resolve(to));\n    // Can't replace the whole document, so remove 0 if it's present\n    if (targetDepths[targetDepths.length - 1] == 0)\n        targetDepths.pop();\n    // Negative numbers represent not expansion over the whole node at\n    // that depth, but replacing from $from.before(-D) to $to.pos.\n    let preferredTarget = -($from.depth + 1);\n    targetDepths.unshift(preferredTarget);\n    // This loop picks a preferred target depth, if one of the covering\n    // depths is not outside of a defining node, and adds negative\n    // depths for any depth that has $from at its start and does not\n    // cross a defining node.\n    for (let d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {\n        let spec = $from.node(d).type.spec;\n        if (spec.defining || spec.definingAsContext || spec.isolating)\n            break;\n        if (targetDepths.indexOf(d) > -1)\n            preferredTarget = d;\n        else if ($from.before(d) == pos)\n            targetDepths.splice(1, 0, -d);\n    }\n    // Try to fit each possible depth of the slice into each possible\n    // target depth, starting with the preferred depths.\n    let preferredTargetIndex = targetDepths.indexOf(preferredTarget);\n    let leftNodes = [], preferredDepth = slice.openStart;\n    for (let content = slice.content, i = 0;; i++) {\n        let node = content.firstChild;\n        leftNodes.push(node);\n        if (i == slice.openStart)\n            break;\n        content = node.content;\n    }\n    // Back up preferredDepth to cover defining textblocks directly\n    // above it, possibly skipping a non-defining textblock.\n    for (let d = preferredDepth - 1; d >= 0; d--) {\n        let leftNode = leftNodes[d], def = definesContent(leftNode.type);\n        if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1)))\n            preferredDepth = d;\n        else if (def || !leftNode.type.isTextblock)\n            break;\n    }\n    for (let j = slice.openStart; j >= 0; j--) {\n        let openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);\n        let insert = leftNodes[openDepth];\n        if (!insert)\n            continue;\n        for (let i = 0; i < targetDepths.length; i++) {\n            // Loop over possible expansion levels, starting with the\n            // preferred one\n            let targetDepth = targetDepths[(i + preferredTargetIndex) % targetDepths.length], expand = true;\n            if (targetDepth < 0) {\n                expand = false;\n                targetDepth = -targetDepth;\n            }\n            let parent = $from.node(targetDepth - 1), index = $from.index(targetDepth - 1);\n            if (parent.canReplaceWith(index, index, insert.type, insert.marks))\n                return tr.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to, new Slice(closeFragment(slice.content, 0, slice.openStart, openDepth), openDepth, slice.openEnd));\n        }\n    }\n    let startSteps = tr.steps.length;\n    for (let i = targetDepths.length - 1; i >= 0; i--) {\n        tr.replace(from, to, slice);\n        if (tr.steps.length > startSteps)\n            break;\n        let depth = targetDepths[i];\n        if (depth < 0)\n            continue;\n        from = $from.before(depth);\n        to = $to.after(depth);\n    }\n}\nfunction closeFragment(fragment, depth, oldOpen, newOpen, parent) {\n    if (depth < oldOpen) {\n        let first = fragment.firstChild;\n        fragment = fragment.replaceChild(0, first.copy(closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));\n    }\n    if (depth > newOpen) {\n        let match = parent.contentMatchAt(0);\n        let start = match.fillBefore(fragment).append(fragment);\n        fragment = start.append(match.matchFragment(start).fillBefore(Fragment.empty, true));\n    }\n    return fragment;\n}\nfunction replaceRangeWith(tr, from, to, node) {\n    if (!node.isInline && from == to && tr.doc.resolve(from).parent.content.size) {\n        let point = insertPoint(tr.doc, from, node.type);\n        if (point != null)\n            from = to = point;\n    }\n    tr.replaceRange(from, to, new Slice(Fragment.from(node), 0, 0));\n}\nfunction deleteRange(tr, from, to) {\n    let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);\n    let covered = coveredDepths($from, $to);\n    for (let i = 0; i < covered.length; i++) {\n        let depth = covered[i], last = i == covered.length - 1;\n        if ((last && depth == 0) || $from.node(depth).type.contentMatch.validEnd)\n            return tr.delete($from.start(depth), $to.end(depth));\n        if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1))))\n            return tr.delete($from.before(depth), $to.after(depth));\n    }\n    for (let d = 1; d <= $from.depth && d <= $to.depth; d++) {\n        if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d &&\n            $from.start(d - 1) == $to.start(d - 1) && $from.node(d - 1).canReplace($from.index(d - 1), $to.index(d - 1)))\n            return tr.delete($from.before(d), to);\n    }\n    tr.delete(from, to);\n}\n// Returns an array of all depths for which $from - $to spans the\n// whole content of the nodes at that depth.\nfunction coveredDepths($from, $to) {\n    let result = [], minDepth = Math.min($from.depth, $to.depth);\n    for (let d = minDepth; d >= 0; d--) {\n        let start = $from.start(d);\n        if (start < $from.pos - ($from.depth - d) ||\n            $to.end(d) > $to.pos + ($to.depth - d) ||\n            $from.node(d).type.spec.isolating ||\n            $to.node(d).type.spec.isolating)\n            break;\n        if (start == $to.start(d) ||\n            (d == $from.depth && d == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent &&\n                d && $to.start(d - 1) == start - 1))\n            result.push(d);\n    }\n    return result;\n}\n\n/**\nUpdate an attribute in a specific node.\n*/\nclass AttrStep extends Step {\n    /**\n    Construct an attribute step.\n    */\n    constructor(\n    /**\n    The position of the target node.\n    */\n    pos, \n    /**\n    The attribute to set.\n    */\n    attr, \n    // The attribute's new value.\n    value) {\n        super();\n        this.pos = pos;\n        this.attr = attr;\n        this.value = value;\n    }\n    apply(doc) {\n        let node = doc.nodeAt(this.pos);\n        if (!node)\n            return StepResult.fail(\"No node at attribute step's position\");\n        let attrs = Object.create(null);\n        for (let name in node.attrs)\n            attrs[name] = node.attrs[name];\n        attrs[this.attr] = this.value;\n        let updated = node.type.create(attrs, null, node.marks);\n        return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n    }\n    getMap() {\n        return StepMap.empty;\n    }\n    invert(doc) {\n        return new AttrStep(this.pos, this.attr, doc.nodeAt(this.pos).attrs[this.attr]);\n    }\n    map(mapping) {\n        let pos = mapping.mapResult(this.pos, 1);\n        return pos.deletedAfter ? null : new AttrStep(pos.pos, this.attr, this.value);\n    }\n    toJSON() {\n        return { stepType: \"attr\", pos: this.pos, attr: this.attr, value: this.value };\n    }\n    static fromJSON(schema, json) {\n        if (typeof json.pos != \"number\" || typeof json.attr != \"string\")\n            throw new RangeError(\"Invalid input for AttrStep.fromJSON\");\n        return new AttrStep(json.pos, json.attr, json.value);\n    }\n}\nStep.jsonID(\"attr\", AttrStep);\n/**\nUpdate an attribute in the doc node.\n*/\nclass DocAttrStep extends Step {\n    /**\n    Construct an attribute step.\n    */\n    constructor(\n    /**\n    The attribute to set.\n    */\n    attr, \n    // The attribute's new value.\n    value) {\n        super();\n        this.attr = attr;\n        this.value = value;\n    }\n    apply(doc) {\n        let attrs = Object.create(null);\n        for (let name in doc.attrs)\n            attrs[name] = doc.attrs[name];\n        attrs[this.attr] = this.value;\n        let updated = doc.type.create(attrs, doc.content, doc.marks);\n        return StepResult.ok(updated);\n    }\n    getMap() {\n        return StepMap.empty;\n    }\n    invert(doc) {\n        return new DocAttrStep(this.attr, doc.attrs[this.attr]);\n    }\n    map(mapping) {\n        return this;\n    }\n    toJSON() {\n        return { stepType: \"docAttr\", attr: this.attr, value: this.value };\n    }\n    static fromJSON(schema, json) {\n        if (typeof json.attr != \"string\")\n            throw new RangeError(\"Invalid input for DocAttrStep.fromJSON\");\n        return new DocAttrStep(json.attr, json.value);\n    }\n}\nStep.jsonID(\"docAttr\", DocAttrStep);\n\n/**\n@internal\n*/\nlet TransformError = class extends Error {\n};\nTransformError = function TransformError(message) {\n    let err = Error.call(this, message);\n    err.__proto__ = TransformError.prototype;\n    return err;\n};\nTransformError.prototype = Object.create(Error.prototype);\nTransformError.prototype.constructor = TransformError;\nTransformError.prototype.name = \"TransformError\";\n/**\nAbstraction to build up and track an array of\n[steps](https://prosemirror.net/docs/ref/#transform.Step) representing a document transformation.\n\nMost transforming methods return the `Transform` object itself, so\nthat they can be chained.\n*/\nclass Transform {\n    /**\n    Create a transform that starts with the given document.\n    */\n    constructor(\n    /**\n    The current document (the result of applying the steps in the\n    transform).\n    */\n    doc) {\n        this.doc = doc;\n        /**\n        The steps in this transform.\n        */\n        this.steps = [];\n        /**\n        The documents before each of the steps.\n        */\n        this.docs = [];\n        /**\n        A mapping with the maps for each of the steps in this transform.\n        */\n        this.mapping = new Mapping;\n    }\n    /**\n    The starting document.\n    */\n    get before() { return this.docs.length ? this.docs[0] : this.doc; }\n    /**\n    Apply a new step in this transform, saving the result. Throws an\n    error when the step fails.\n    */\n    step(step) {\n        let result = this.maybeStep(step);\n        if (result.failed)\n            throw new TransformError(result.failed);\n        return this;\n    }\n    /**\n    Try to apply a step in this transformation, ignoring it if it\n    fails. Returns the step result.\n    */\n    maybeStep(step) {\n        let result = step.apply(this.doc);\n        if (!result.failed)\n            this.addStep(step, result.doc);\n        return result;\n    }\n    /**\n    True when the document has been changed (when there are any\n    steps).\n    */\n    get docChanged() {\n        return this.steps.length > 0;\n    }\n    /**\n    @internal\n    */\n    addStep(step, doc) {\n        this.docs.push(this.doc);\n        this.steps.push(step);\n        this.mapping.appendMap(step.getMap());\n        this.doc = doc;\n    }\n    /**\n    Replace the part of the document between `from` and `to` with the\n    given `slice`.\n    */\n    replace(from, to = from, slice = Slice.empty) {\n        let step = replaceStep(this.doc, from, to, slice);\n        if (step)\n            this.step(step);\n        return this;\n    }\n    /**\n    Replace the given range with the given content, which may be a\n    fragment, node, or array of nodes.\n    */\n    replaceWith(from, to, content) {\n        return this.replace(from, to, new Slice(Fragment.from(content), 0, 0));\n    }\n    /**\n    Delete the content between the given positions.\n    */\n    delete(from, to) {\n        return this.replace(from, to, Slice.empty);\n    }\n    /**\n    Insert the given content at the given position.\n    */\n    insert(pos, content) {\n        return this.replaceWith(pos, pos, content);\n    }\n    /**\n    Replace a range of the document with a given slice, using\n    `from`, `to`, and the slice's\n    [`openStart`](https://prosemirror.net/docs/ref/#model.Slice.openStart) property as hints, rather\n    than fixed start and end points. This method may grow the\n    replaced area or close open nodes in the slice in order to get a\n    fit that is more in line with WYSIWYG expectations, by dropping\n    fully covered parent nodes of the replaced region when they are\n    marked [non-defining as\n    context](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext), or including an\n    open parent node from the slice that _is_ marked as [defining\n    its content](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).\n    \n    This is the method, for example, to handle paste. The similar\n    [`replace`](https://prosemirror.net/docs/ref/#transform.Transform.replace) method is a more\n    primitive tool which will _not_ move the start and end of its given\n    range, and is useful in situations where you need more precise\n    control over what happens.\n    */\n    replaceRange(from, to, slice) {\n        replaceRange(this, from, to, slice);\n        return this;\n    }\n    /**\n    Replace the given range with a node, but use `from` and `to` as\n    hints, rather than precise positions. When from and to are the same\n    and are at the start or end of a parent node in which the given\n    node doesn't fit, this method may _move_ them out towards a parent\n    that does allow the given node to be placed. When the given range\n    completely covers a parent node, this method may completely replace\n    that parent node.\n    */\n    replaceRangeWith(from, to, node) {\n        replaceRangeWith(this, from, to, node);\n        return this;\n    }\n    /**\n    Delete the given range, expanding it to cover fully covered\n    parent nodes until a valid replace is found.\n    */\n    deleteRange(from, to) {\n        deleteRange(this, from, to);\n        return this;\n    }\n    /**\n    Split the content in the given range off from its parent, if there\n    is sibling content before or after it, and move it up the tree to\n    the depth specified by `target`. You'll probably want to use\n    [`liftTarget`](https://prosemirror.net/docs/ref/#transform.liftTarget) to compute `target`, to make\n    sure the lift is valid.\n    */\n    lift(range, target) {\n        lift(this, range, target);\n        return this;\n    }\n    /**\n    Join the blocks around the given position. If depth is 2, their\n    last and first siblings are also joined, and so on.\n    */\n    join(pos, depth = 1) {\n        join(this, pos, depth);\n        return this;\n    }\n    /**\n    Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.\n    The wrappers are assumed to be valid in this position, and should\n    probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).\n    */\n    wrap(range, wrappers) {\n        wrap(this, range, wrappers);\n        return this;\n    }\n    /**\n    Set the type of all textblocks (partly) between `from` and `to` to\n    the given node type with the given attributes.\n    */\n    setBlockType(from, to = from, type, attrs = null) {\n        setBlockType(this, from, to, type, attrs);\n        return this;\n    }\n    /**\n    Change the type, attributes, and/or marks of the node at `pos`.\n    When `type` isn't given, the existing node type is preserved,\n    */\n    setNodeMarkup(pos, type, attrs = null, marks) {\n        setNodeMarkup(this, pos, type, attrs, marks);\n        return this;\n    }\n    /**\n    Set a single attribute on a given node to a new value.\n    The `pos` addresses the document content. Use `setDocAttribute`\n    to set attributes on the document itself.\n    */\n    setNodeAttribute(pos, attr, value) {\n        this.step(new AttrStep(pos, attr, value));\n        return this;\n    }\n    /**\n    Set a single attribute on the document to a new value.\n    */\n    setDocAttribute(attr, value) {\n        this.step(new DocAttrStep(attr, value));\n        return this;\n    }\n    /**\n    Add a mark to the node at position `pos`.\n    */\n    addNodeMark(pos, mark) {\n        this.step(new AddNodeMarkStep(pos, mark));\n        return this;\n    }\n    /**\n    Remove a mark (or a mark of the given type) from the node at\n    position `pos`.\n    */\n    removeNodeMark(pos, mark) {\n        if (!(mark instanceof Mark)) {\n            let node = this.doc.nodeAt(pos);\n            if (!node)\n                throw new RangeError(\"No node at position \" + pos);\n            mark = mark.isInSet(node.marks);\n            if (!mark)\n                return this;\n        }\n        this.step(new RemoveNodeMarkStep(pos, mark));\n        return this;\n    }\n    /**\n    Split the node at the given position, and optionally, if `depth` is\n    greater than one, any number of nodes above that. By default, the\n    parts split off will inherit the node type of the original node.\n    This can be changed by passing an array of types and attributes to\n    use after the split.\n    */\n    split(pos, depth = 1, typesAfter) {\n        split(this, pos, depth, typesAfter);\n        return this;\n    }\n    /**\n    Add the given mark to the inline content between `from` and `to`.\n    */\n    addMark(from, to, mark) {\n        addMark(this, from, to, mark);\n        return this;\n    }\n    /**\n    Remove marks from inline nodes between `from` and `to`. When\n    `mark` is a single mark, remove precisely that mark. When it is\n    a mark type, remove all marks of that type. When it is null,\n    remove all marks of any type.\n    */\n    removeMark(from, to, mark) {\n        removeMark(this, from, to, mark);\n        return this;\n    }\n    /**\n    Removes all marks and nodes from the content of the node at\n    `pos` that don't match the given new parent node type. Accepts\n    an optional starting [content match](https://prosemirror.net/docs/ref/#model.ContentMatch) as\n    third argument.\n    */\n    clearIncompatible(pos, parentType, match) {\n        clearIncompatible(this, pos, parentType, match);\n        return this;\n    }\n}\n\nexport { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, MapResult, Mapping, RemoveMarkStep, RemoveNodeMarkStep, ReplaceAroundStep, ReplaceStep, Step, StepMap, StepResult, Transform, TransformError, canJoin, canSplit, dropPoint, findWrapping, insertPoint, joinPoint, liftTarget, replaceStep };\n","// view/index.ts\nexport * from \"prosemirror-view\";\n","import { TextSelection, NodeSelection, Selection, AllSelection } from 'prosemirror-state';\nimport { DOMSerializer, Fragment, Mark, Slice, DOMParser } from 'prosemirror-model';\nimport { dropPoint } from 'prosemirror-transform';\n\nconst domIndex = function (node) {\n    for (var index = 0;; index++) {\n        node = node.previousSibling;\n        if (!node)\n            return index;\n    }\n};\nconst parentNode = function (node) {\n    let parent = node.assignedSlot || node.parentNode;\n    return parent && parent.nodeType == 11 ? parent.host : parent;\n};\nlet reusedRange = null;\n// Note that this will always return the same range, because DOM range\n// objects are every expensive, and keep slowing down subsequent DOM\n// updates, for some reason.\nconst textRange = function (node, from, to) {\n    let range = reusedRange || (reusedRange = document.createRange());\n    range.setEnd(node, to == null ? node.nodeValue.length : to);\n    range.setStart(node, from || 0);\n    return range;\n};\nconst clearReusedRange = function () {\n    reusedRange = null;\n};\n// Scans forward and backward through DOM positions equivalent to the\n// given one to see if the two are in the same place (i.e. after a\n// text node vs at the end of that text node)\nconst isEquivalentPosition = function (node, off, targetNode, targetOff) {\n    return targetNode && (scanFor(node, off, targetNode, targetOff, -1) ||\n        scanFor(node, off, targetNode, targetOff, 1));\n};\nconst atomElements = /^(img|br|input|textarea|hr)$/i;\nfunction scanFor(node, off, targetNode, targetOff, dir) {\n    var _a;\n    for (;;) {\n        if (node == targetNode && off == targetOff)\n            return true;\n        if (off == (dir < 0 ? 0 : nodeSize(node))) {\n            let parent = node.parentNode;\n            if (!parent || !isElt(parent) || hasBlockDesc(node) || atomElements.test(node.nodeName) ||\n                node.contentEditable == \"false\")\n                return false;\n            off = domIndex(node) + (dir < 0 ? 0 : 1);\n            node = parent;\n        }\n        else if (isElt(node)) {\n            let child = node.childNodes[off + (dir < 0 ? -1 : 0)];\n            if (isElt(child) && child.contentEditable == \"false\") {\n                if ((_a = child.pmViewDesc) === null || _a === void 0 ? void 0 : _a.ignoreForSelection)\n                    off += dir;\n                else\n                    return false;\n            }\n            else {\n                node = child;\n                off = dir < 0 ? nodeSize(node) : 0;\n            }\n        }\n        else {\n            return false;\n        }\n    }\n}\nfunction nodeSize(node) {\n    return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;\n}\nfunction isElt(node) { return node.nodeType == 1; }\nfunction isText(node) { return node.nodeType == 3; }\nfunction contains(parent, child) {\n    return child ? parent.contains(isElt(child) ? child : child.parentNode) : false;\n}\nfunction textNodeBefore$1(node, offset) {\n    for (;;) {\n        if (isText(node) && offset)\n            return node;\n        if (isElt(node) && offset > 0) {\n            if (node.contentEditable == \"false\")\n                return null;\n            node = node.childNodes[offset - 1];\n            offset = nodeSize(node);\n        }\n        else if (node.parentNode && !hasBlockDesc(node)) {\n            offset = domIndex(node);\n            node = node.parentNode;\n        }\n        else {\n            return null;\n        }\n    }\n}\nfunction textNodeAfter$1(node, offset) {\n    for (;;) {\n        if (isText(node) && offset < node.nodeValue.length)\n            return node;\n        if (isElt(node) && offset < node.childNodes.length) {\n            if (node.contentEditable == \"false\")\n                return null;\n            node = node.childNodes[offset];\n            offset = 0;\n        }\n        else if (node.parentNode && !hasBlockDesc(node)) {\n            offset = domIndex(node) + 1;\n            node = node.parentNode;\n        }\n        else {\n            return null;\n        }\n    }\n}\nfunction isOnEdge(node, offset, parent) {\n    for (let atStart = offset == 0, atEnd = offset == nodeSize(node); atStart || atEnd;) {\n        if (node == parent)\n            return true;\n        let index = domIndex(node);\n        node = node.parentNode;\n        if (!node)\n            return false;\n        atStart = atStart && index == 0;\n        atEnd = atEnd && index == nodeSize(node);\n    }\n}\nfunction hasBlockDesc(dom) {\n    let desc;\n    for (let cur = dom; cur; cur = cur.parentNode)\n        if (desc = cur.pmViewDesc)\n            break;\n    return desc && desc.node && desc.node.isBlock && (desc.dom == dom || desc.contentDOM == dom);\n}\n// Work around Chrome issue https://bugs.chromium.org/p/chromium/issues/detail?id=447523\n// (isCollapsed inappropriately returns true in shadow dom)\nconst selectionCollapsed = function (domSel) {\n    return domSel.focusNode && isEquivalentPosition(domSel.focusNode, domSel.focusOffset, domSel.anchorNode, domSel.anchorOffset);\n};\nfunction keyEvent(keyCode, key) {\n    let event = document.createEvent(\"Event\");\n    event.initEvent(\"keydown\", true, true);\n    event.keyCode = keyCode;\n    event.key = event.code = key;\n    return event;\n}\nfunction deepActiveElement(doc) {\n    let elt = doc.activeElement;\n    while (elt && elt.shadowRoot)\n        elt = elt.shadowRoot.activeElement;\n    return elt;\n}\nfunction caretFromPoint(doc, x, y) {\n    if (doc.caretPositionFromPoint) {\n        try { // Firefox throws for this call in hard-to-predict circumstances (#994)\n            let pos = doc.caretPositionFromPoint(x, y);\n            // Clip the offset, because Chrome will return a text offset\n            // into <input> nodes, which can't be treated as a regular DOM\n            // offset\n            if (pos)\n                return { node: pos.offsetNode, offset: Math.min(nodeSize(pos.offsetNode), pos.offset) };\n        }\n        catch (_) { }\n    }\n    if (doc.caretRangeFromPoint) {\n        let range = doc.caretRangeFromPoint(x, y);\n        if (range)\n            return { node: range.startContainer, offset: Math.min(nodeSize(range.startContainer), range.startOffset) };\n    }\n}\n\nconst nav = typeof navigator != \"undefined\" ? navigator : null;\nconst doc = typeof document != \"undefined\" ? document : null;\nconst agent = (nav && nav.userAgent) || \"\";\nconst ie_edge = /Edge\\/(\\d+)/.exec(agent);\nconst ie_upto10 = /MSIE \\d/.exec(agent);\nconst ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(agent);\nconst ie = !!(ie_upto10 || ie_11up || ie_edge);\nconst ie_version = ie_upto10 ? document.documentMode : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : 0;\nconst gecko = !ie && /gecko\\/(\\d+)/i.test(agent);\ngecko && +(/Firefox\\/(\\d+)/.exec(agent) || [0, 0])[1];\nconst _chrome = !ie && /Chrome\\/(\\d+)/.exec(agent);\nconst chrome = !!_chrome;\nconst chrome_version = _chrome ? +_chrome[1] : 0;\nconst safari = !ie && !!nav && /Apple Computer/.test(nav.vendor);\n// Is true for both iOS and iPadOS for convenience\nconst ios = safari && (/Mobile\\/\\w+/.test(agent) || !!nav && nav.maxTouchPoints > 2);\nconst mac = ios || (nav ? /Mac/.test(nav.platform) : false);\nconst windows = nav ? /Win/.test(nav.platform) : false;\nconst android = /Android \\d/.test(agent);\nconst webkit = !!doc && \"webkitFontSmoothing\" in doc.documentElement.style;\nconst webkit_version = webkit ? +(/\\bAppleWebKit\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;\n\nfunction windowRect(doc) {\n    let vp = doc.defaultView && doc.defaultView.visualViewport;\n    if (vp)\n        return {\n            left: 0, right: vp.width,\n            top: 0, bottom: vp.height\n        };\n    return { left: 0, right: doc.documentElement.clientWidth,\n        top: 0, bottom: doc.documentElement.clientHeight };\n}\nfunction getSide(value, side) {\n    return typeof value == \"number\" ? value : value[side];\n}\nfunction clientRect(node) {\n    let rect = node.getBoundingClientRect();\n    // Adjust for elements with style \"transform: scale()\"\n    let scaleX = (rect.width / node.offsetWidth) || 1;\n    let scaleY = (rect.height / node.offsetHeight) || 1;\n    // Make sure scrollbar width isn't included in the rectangle\n    return { left: rect.left, right: rect.left + node.clientWidth * scaleX,\n        top: rect.top, bottom: rect.top + node.clientHeight * scaleY };\n}\nfunction scrollRectIntoView(view, rect, startDOM) {\n    // Skip empty rects with all sides at 0, for example, when the element has no CSS box (display: none)\n    if (!nonZero(rect) && rect.left == 0)\n        return;\n    let scrollThreshold = view.someProp(\"scrollThreshold\") || 0, scrollMargin = view.someProp(\"scrollMargin\") || 5;\n    let doc = view.dom.ownerDocument;\n    for (let parent = startDOM || view.dom;;) {\n        if (!parent)\n            break;\n        if (!isElt(parent)) {\n            parent = parentNode(parent);\n            continue;\n        }\n        let atTop = parent == doc.body;\n        let bounding = atTop ? windowRect(doc) : clientRect(parent);\n        let moveX = 0, moveY = 0;\n        if (rect.top < bounding.top + getSide(scrollThreshold, \"top\"))\n            moveY = -(bounding.top - rect.top + getSide(scrollMargin, \"top\"));\n        else if (rect.bottom > bounding.bottom - getSide(scrollThreshold, \"bottom\"))\n            moveY = rect.bottom - rect.top > bounding.bottom - bounding.top\n                ? rect.top + getSide(scrollMargin, \"top\") - bounding.top\n                : rect.bottom - bounding.bottom + getSide(scrollMargin, \"bottom\");\n        if (rect.left < bounding.left + getSide(scrollThreshold, \"left\"))\n            moveX = -(bounding.left - rect.left + getSide(scrollMargin, \"left\"));\n        else if (rect.right > bounding.right - getSide(scrollThreshold, \"right\"))\n            moveX = rect.right - bounding.right + getSide(scrollMargin, \"right\");\n        if (moveX || moveY) {\n            if (atTop) {\n                doc.defaultView.scrollBy(moveX, moveY);\n            }\n            else {\n                let startX = parent.scrollLeft, startY = parent.scrollTop;\n                if (moveY)\n                    parent.scrollTop += moveY;\n                if (moveX)\n                    parent.scrollLeft += moveX;\n                let dX = parent.scrollLeft - startX, dY = parent.scrollTop - startY;\n                rect = { left: rect.left - dX, top: rect.top - dY, right: rect.right - dX, bottom: rect.bottom - dY };\n            }\n        }\n        let pos = atTop ? \"fixed\" : getComputedStyle(parent).position;\n        if (/^(fixed|sticky)$/.test(pos))\n            break;\n        parent = pos == \"absolute\" ? parent.offsetParent : parentNode(parent);\n    }\n}\n// Store the scroll position of the editor's parent nodes, along with\n// the top position of an element near the top of the editor, which\n// will be used to make sure the visible viewport remains stable even\n// when the size of the content above changes.\nfunction storeScrollPos(view) {\n    let rect = view.dom.getBoundingClientRect(), startY = Math.max(0, rect.top);\n    let refDOM, refTop;\n    for (let x = (rect.left + rect.right) / 2, y = startY + 1; y < Math.min(innerHeight, rect.bottom); y += 5) {\n        let dom = view.root.elementFromPoint(x, y);\n        if (!dom || dom == view.dom || !view.dom.contains(dom))\n            continue;\n        let localRect = dom.getBoundingClientRect();\n        if (localRect.top >= startY - 20) {\n            refDOM = dom;\n            refTop = localRect.top;\n            break;\n        }\n    }\n    return { refDOM: refDOM, refTop: refTop, stack: scrollStack(view.dom) };\n}\nfunction scrollStack(dom) {\n    let stack = [], doc = dom.ownerDocument;\n    for (let cur = dom; cur; cur = parentNode(cur)) {\n        stack.push({ dom: cur, top: cur.scrollTop, left: cur.scrollLeft });\n        if (dom == doc)\n            break;\n    }\n    return stack;\n}\n// Reset the scroll position of the editor's parent nodes to that what\n// it was before, when storeScrollPos was called.\nfunction resetScrollPos({ refDOM, refTop, stack }) {\n    let newRefTop = refDOM ? refDOM.getBoundingClientRect().top : 0;\n    restoreScrollStack(stack, newRefTop == 0 ? 0 : newRefTop - refTop);\n}\nfunction restoreScrollStack(stack, dTop) {\n    for (let i = 0; i < stack.length; i++) {\n        let { dom, top, left } = stack[i];\n        if (dom.scrollTop != top + dTop)\n            dom.scrollTop = top + dTop;\n        if (dom.scrollLeft != left)\n            dom.scrollLeft = left;\n    }\n}\nlet preventScrollSupported = null;\n// Feature-detects support for .focus({preventScroll: true}), and uses\n// a fallback kludge when not supported.\nfunction focusPreventScroll(dom) {\n    if (dom.setActive)\n        return dom.setActive(); // in IE\n    if (preventScrollSupported)\n        return dom.focus(preventScrollSupported);\n    let stored = scrollStack(dom);\n    dom.focus(preventScrollSupported == null ? {\n        get preventScroll() {\n            preventScrollSupported = { preventScroll: true };\n            return true;\n        }\n    } : undefined);\n    if (!preventScrollSupported) {\n        preventScrollSupported = false;\n        restoreScrollStack(stored, 0);\n    }\n}\nfunction findOffsetInNode(node, coords) {\n    let closest;\n    let dxClosest = 2e8, coordsClosest, offset = 0;\n    let rowBot = coords.top, rowTop = coords.top;\n    let firstBelow, coordsBelow;\n    for (let child = node.firstChild, childIndex = 0; child; child = child.nextSibling, childIndex++) {\n        let rects;\n        if (isElt(child))\n            rects = child.getClientRects();\n        else if (isText(child))\n            rects = textRange(child).getClientRects();\n        else\n            continue;\n        for (let i = 0; i < rects.length; i++) {\n            let rect = rects[i];\n            if (rect.top <= rowBot && rect.bottom >= rowTop) {\n                rowBot = Math.max(rect.bottom, rowBot);\n                rowTop = Math.min(rect.top, rowTop);\n                let dx = rect.left > coords.left ? rect.left - coords.left\n                    : rect.right < coords.left ? coords.left - rect.right : 0;\n                if (dx < dxClosest) {\n                    closest = child;\n                    dxClosest = dx;\n                    coordsClosest = dx && isText(closest) ? {\n                        left: rect.right < coords.left ? rect.right : rect.left,\n                        top: coords.top\n                    } : coords;\n                    if (isElt(child) && dx)\n                        offset = childIndex + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0);\n                    continue;\n                }\n            }\n            else if (rect.top > coords.top && !firstBelow && rect.left <= coords.left && rect.right >= coords.left) {\n                firstBelow = child;\n                coordsBelow = { left: Math.max(rect.left, Math.min(rect.right, coords.left)), top: rect.top };\n            }\n            if (!closest && (coords.left >= rect.right && coords.top >= rect.top ||\n                coords.left >= rect.left && coords.top >= rect.bottom))\n                offset = childIndex + 1;\n        }\n    }\n    if (!closest && firstBelow) {\n        closest = firstBelow;\n        coordsClosest = coordsBelow;\n        dxClosest = 0;\n    }\n    if (closest && isText(closest))\n        return findOffsetInText(closest, coordsClosest);\n    if (!closest || dxClosest)\n        return { node, offset };\n    return findOffsetInNode(closest, coordsClosest);\n}\nfunction findOffsetInText(node, coords) {\n    let len = node.nodeValue.length;\n    let range = document.createRange(), result;\n    for (let i = 0; i < len; i++) {\n        range.setEnd(node, i + 1);\n        range.setStart(node, i);\n        let rect = singleRect(range, 1);\n        if (rect.top == rect.bottom)\n            continue;\n        if (inRect(coords, rect)) {\n            result = { node, offset: i + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0) };\n            break;\n        }\n    }\n    range.detach();\n    return result || { node, offset: 0 };\n}\nfunction inRect(coords, rect) {\n    return coords.left >= rect.left - 1 && coords.left <= rect.right + 1 &&\n        coords.top >= rect.top - 1 && coords.top <= rect.bottom + 1;\n}\nfunction targetKludge(dom, coords) {\n    let parent = dom.parentNode;\n    if (parent && /^li$/i.test(parent.nodeName) && coords.left < dom.getBoundingClientRect().left)\n        return parent;\n    return dom;\n}\nfunction posFromElement(view, elt, coords) {\n    let { node, offset } = findOffsetInNode(elt, coords), bias = -1;\n    if (isElt(node) && !node.firstChild) {\n        let rect = node.getBoundingClientRect();\n        bias = rect.left != rect.right && coords.left > (rect.left + rect.right) / 2 ? 1 : -1;\n    }\n    return view.docView.posFromDOM(node, offset, bias);\n}\nfunction posFromCaret(view, node, offset, coords) {\n    // Browser (in caretPosition/RangeFromPoint) will agressively\n    // normalize towards nearby inline nodes. Since we are interested in\n    // positions between block nodes too, we first walk up the hierarchy\n    // of nodes to see if there are block nodes that the coordinates\n    // fall outside of. If so, we take the position before/after that\n    // block. If not, we call `posFromDOM` on the raw node/offset.\n    let outsideBlock = -1;\n    for (let cur = node, sawBlock = false;;) {\n        if (cur == view.dom)\n            break;\n        let desc = view.docView.nearestDesc(cur, true), rect;\n        if (!desc)\n            return null;\n        if (isElt(desc.dom) && (desc.node.isBlock && desc.parent || !desc.contentDOM) &&\n            // Ignore elements with zero-size bounding rectangles\n            ((rect = desc.dom.getBoundingClientRect()).width || rect.height)) {\n            if (desc.node.isBlock && desc.parent && !/^T(R|BODY|HEAD|FOOT)$/.test(desc.dom.nodeName)) {\n                // Only apply the horizontal test to the innermost block. Vertical for any parent.\n                if (!sawBlock && rect.left > coords.left || rect.top > coords.top)\n                    outsideBlock = desc.posBefore;\n                else if (!sawBlock && rect.right < coords.left || rect.bottom < coords.top)\n                    outsideBlock = desc.posAfter;\n                sawBlock = true;\n            }\n            if (!desc.contentDOM && outsideBlock < 0 && !desc.node.isText) {\n                // If we are inside a leaf, return the side of the leaf closer to the coords\n                let before = desc.node.isBlock ? coords.top < (rect.top + rect.bottom) / 2\n                    : coords.left < (rect.left + rect.right) / 2;\n                return before ? desc.posBefore : desc.posAfter;\n            }\n        }\n        cur = desc.dom.parentNode;\n    }\n    return outsideBlock > -1 ? outsideBlock : view.docView.posFromDOM(node, offset, -1);\n}\nfunction elementFromPoint(element, coords, box) {\n    let len = element.childNodes.length;\n    if (len && box.top < box.bottom) {\n        for (let startI = Math.max(0, Math.min(len - 1, Math.floor(len * (coords.top - box.top) / (box.bottom - box.top)) - 2)), i = startI;;) {\n            let child = element.childNodes[i];\n            if (isElt(child)) {\n                let rects = child.getClientRects();\n                for (let j = 0; j < rects.length; j++) {\n                    let rect = rects[j];\n                    if (inRect(coords, rect))\n                        return elementFromPoint(child, coords, rect);\n                }\n            }\n            if ((i = (i + 1) % len) == startI)\n                break;\n        }\n    }\n    return element;\n}\n// Given an x,y position on the editor, get the position in the document.\nfunction posAtCoords(view, coords) {\n    let doc = view.dom.ownerDocument, node, offset = 0;\n    let caret = caretFromPoint(doc, coords.left, coords.top);\n    if (caret)\n        ({ node, offset } = caret);\n    let elt = (view.root.elementFromPoint ? view.root : doc)\n        .elementFromPoint(coords.left, coords.top);\n    let pos;\n    if (!elt || !view.dom.contains(elt)) {\n        let box = view.dom.getBoundingClientRect();\n        if (!inRect(coords, box))\n            return null;\n        elt = elementFromPoint(view.dom, coords, box);\n        if (!elt)\n            return null;\n    }\n    // Safari's caretRangeFromPoint returns nonsense when on a draggable element\n    if (safari) {\n        for (let p = elt; node && p; p = parentNode(p))\n            if (p.draggable)\n                node = undefined;\n    }\n    elt = targetKludge(elt, coords);\n    if (node) {\n        if (gecko && isElt(node)) {\n            // Firefox will sometimes return offsets into <input> nodes, which\n            // have no actual children, from caretPositionFromPoint (#953)\n            offset = Math.min(offset, node.childNodes.length);\n            // It'll also move the returned position before image nodes,\n            // even if those are behind it.\n            if (offset < node.childNodes.length) {\n                let next = node.childNodes[offset], box;\n                if (next.nodeName == \"IMG\" && (box = next.getBoundingClientRect()).right <= coords.left &&\n                    box.bottom > coords.top)\n                    offset++;\n            }\n        }\n        let prev;\n        // When clicking above the right side of an uneditable node, Chrome will report a cursor position after that node.\n        if (webkit && offset && isElt(node) && isElt(prev = node.childNodes[offset - 1]) &&\n            prev.contentEditable == \"false\" && prev.getBoundingClientRect().top >= coords.top)\n            offset--;\n        // Suspiciously specific kludge to work around caret*FromPoint\n        // never returning a position at the end of the document\n        if (node == view.dom && offset == node.childNodes.length - 1 && isElt(node.lastChild) &&\n            coords.top > node.lastChild.getBoundingClientRect().bottom)\n            pos = view.state.doc.content.size;\n        // Ignore positions directly after a BR, since caret*FromPoint\n        // 'round up' positions that would be more accurately placed\n        // before the BR node.\n        else if (offset == 0 || !isElt(node) || node.childNodes[offset - 1].nodeName != \"BR\")\n            pos = posFromCaret(view, node, offset, coords);\n    }\n    if (pos == null)\n        pos = posFromElement(view, elt, coords);\n    let desc = view.docView.nearestDesc(elt, true);\n    return { pos, inside: desc ? desc.posAtStart - desc.border : -1 };\n}\nfunction nonZero(rect) {\n    return rect.top < rect.bottom || rect.left < rect.right;\n}\nfunction singleRect(target, bias) {\n    let rects = target.getClientRects();\n    if (rects.length) {\n        let first = rects[bias < 0 ? 0 : rects.length - 1];\n        if (nonZero(first))\n            return first;\n    }\n    return Array.prototype.find.call(rects, nonZero) || target.getBoundingClientRect();\n}\nconst BIDI = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n// Given a position in the document model, get a bounding box of the\n// character at that position, relative to the window.\nfunction coordsAtPos(view, pos, side) {\n    let { node, offset, atom } = view.docView.domFromPos(pos, side < 0 ? -1 : 1);\n    let supportEmptyRange = webkit || gecko;\n    if (isText(node)) {\n        // These browsers support querying empty text ranges. Prefer that in\n        // bidi context or when at the end of a node.\n        if (supportEmptyRange && (BIDI.test(node.nodeValue) || (side < 0 ? !offset : offset == node.nodeValue.length))) {\n            let rect = singleRect(textRange(node, offset, offset), side);\n            // Firefox returns bad results (the position before the space)\n            // when querying a position directly after line-broken\n            // whitespace. Detect this situation and and kludge around it\n            if (gecko && offset && /\\s/.test(node.nodeValue[offset - 1]) && offset < node.nodeValue.length) {\n                let rectBefore = singleRect(textRange(node, offset - 1, offset - 1), -1);\n                if (rectBefore.top == rect.top) {\n                    let rectAfter = singleRect(textRange(node, offset, offset + 1), -1);\n                    if (rectAfter.top != rect.top)\n                        return flattenV(rectAfter, rectAfter.left < rectBefore.left);\n                }\n            }\n            return rect;\n        }\n        else {\n            let from = offset, to = offset, takeSide = side < 0 ? 1 : -1;\n            if (side < 0 && !offset) {\n                to++;\n                takeSide = -1;\n            }\n            else if (side >= 0 && offset == node.nodeValue.length) {\n                from--;\n                takeSide = 1;\n            }\n            else if (side < 0) {\n                from--;\n            }\n            else {\n                to++;\n            }\n            return flattenV(singleRect(textRange(node, from, to), takeSide), takeSide < 0);\n        }\n    }\n    let $dom = view.state.doc.resolve(pos - (atom || 0));\n    // Return a horizontal line in block context\n    if (!$dom.parent.inlineContent) {\n        if (atom == null && offset && (side < 0 || offset == nodeSize(node))) {\n            let before = node.childNodes[offset - 1];\n            if (isElt(before))\n                return flattenH(before.getBoundingClientRect(), false);\n        }\n        if (atom == null && offset < nodeSize(node)) {\n            let after = node.childNodes[offset];\n            if (isElt(after))\n                return flattenH(after.getBoundingClientRect(), true);\n        }\n        return flattenH(node.getBoundingClientRect(), side >= 0);\n    }\n    // Inline, not in text node (this is not Bidi-safe)\n    if (atom == null && offset && (side < 0 || offset == nodeSize(node))) {\n        let before = node.childNodes[offset - 1];\n        let target = isText(before) ? textRange(before, nodeSize(before) - (supportEmptyRange ? 0 : 1))\n            // BR nodes tend to only return the rectangle before them.\n            // Only use them if they are the last element in their parent\n            : isElt(before) && (before.nodeName != \"BR\" || !before.nextSibling) ? before : null;\n        if (target)\n            return flattenV(singleRect(target, 1), false);\n    }\n    if (atom == null && offset < nodeSize(node)) {\n        let after = node.childNodes[offset];\n        while (after.pmViewDesc && after.pmViewDesc.ignoreForCoords)\n            after = after.nextSibling;\n        let target = !after ? null : isText(after) ? textRange(after, 0, (supportEmptyRange ? 0 : 1))\n            : isElt(after) ? after : null;\n        if (target)\n            return flattenV(singleRect(target, -1), true);\n    }\n    // All else failed, just try to get a rectangle for the target node\n    return flattenV(singleRect(isText(node) ? textRange(node) : node, -side), side >= 0);\n}\nfunction flattenV(rect, left) {\n    if (rect.width == 0)\n        return rect;\n    let x = left ? rect.left : rect.right;\n    return { top: rect.top, bottom: rect.bottom, left: x, right: x };\n}\nfunction flattenH(rect, top) {\n    if (rect.height == 0)\n        return rect;\n    let y = top ? rect.top : rect.bottom;\n    return { top: y, bottom: y, left: rect.left, right: rect.right };\n}\nfunction withFlushedState(view, state, f) {\n    let viewState = view.state, active = view.root.activeElement;\n    if (viewState != state)\n        view.updateState(state);\n    if (active != view.dom)\n        view.focus();\n    try {\n        return f();\n    }\n    finally {\n        if (viewState != state)\n            view.updateState(viewState);\n        if (active != view.dom && active)\n            active.focus();\n    }\n}\n// Whether vertical position motion in a given direction\n// from a position would leave a text block.\nfunction endOfTextblockVertical(view, state, dir) {\n    let sel = state.selection;\n    let $pos = dir == \"up\" ? sel.$from : sel.$to;\n    return withFlushedState(view, state, () => {\n        let { node: dom } = view.docView.domFromPos($pos.pos, dir == \"up\" ? -1 : 1);\n        for (;;) {\n            let nearest = view.docView.nearestDesc(dom, true);\n            if (!nearest)\n                break;\n            if (nearest.node.isBlock) {\n                dom = nearest.contentDOM || nearest.dom;\n                break;\n            }\n            dom = nearest.dom.parentNode;\n        }\n        let coords = coordsAtPos(view, $pos.pos, 1);\n        for (let child = dom.firstChild; child; child = child.nextSibling) {\n            let boxes;\n            if (isElt(child))\n                boxes = child.getClientRects();\n            else if (isText(child))\n                boxes = textRange(child, 0, child.nodeValue.length).getClientRects();\n            else\n                continue;\n            for (let i = 0; i < boxes.length; i++) {\n                let box = boxes[i];\n                if (box.bottom > box.top + 1 &&\n                    (dir == \"up\" ? coords.top - box.top > (box.bottom - coords.top) * 2\n                        : box.bottom - coords.bottom > (coords.bottom - box.top) * 2))\n                    return false;\n            }\n        }\n        return true;\n    });\n}\nconst maybeRTL = /[\\u0590-\\u08ac]/;\nfunction endOfTextblockHorizontal(view, state, dir) {\n    let { $head } = state.selection;\n    if (!$head.parent.isTextblock)\n        return false;\n    let offset = $head.parentOffset, atStart = !offset, atEnd = offset == $head.parent.content.size;\n    let sel = view.domSelection();\n    if (!sel)\n        return $head.pos == $head.start() || $head.pos == $head.end();\n    // If the textblock is all LTR, or the browser doesn't support\n    // Selection.modify (Edge), fall back to a primitive approach\n    if (!maybeRTL.test($head.parent.textContent) || !sel.modify)\n        return dir == \"left\" || dir == \"backward\" ? atStart : atEnd;\n    return withFlushedState(view, state, () => {\n        // This is a huge hack, but appears to be the best we can\n        // currently do: use `Selection.modify` to move the selection by\n        // one character, and see if that moves the cursor out of the\n        // textblock (or doesn't move it at all, when at the start/end of\n        // the document).\n        let { focusNode: oldNode, focusOffset: oldOff, anchorNode, anchorOffset } = view.domSelectionRange();\n        let oldBidiLevel = sel.caretBidiLevel // Only for Firefox\n        ;\n        sel.modify(\"move\", dir, \"character\");\n        let parentDOM = $head.depth ? view.docView.domAfterPos($head.before()) : view.dom;\n        let { focusNode: newNode, focusOffset: newOff } = view.domSelectionRange();\n        let result = newNode && !contains(parentDOM, newNode) || (oldNode == newNode && oldOff == newOff);\n        // Restore the previous selection\n        try {\n            sel.collapse(anchorNode, anchorOffset);\n            if (oldNode && (oldNode != anchorNode || oldOff != anchorOffset) && sel.extend)\n                sel.extend(oldNode, oldOff);\n        }\n        catch (_) { }\n        if (oldBidiLevel != null)\n            sel.caretBidiLevel = oldBidiLevel;\n        return result;\n    });\n}\nlet cachedState = null;\nlet cachedDir = null;\nlet cachedResult = false;\nfunction endOfTextblock(view, state, dir) {\n    if (cachedState == state && cachedDir == dir)\n        return cachedResult;\n    cachedState = state;\n    cachedDir = dir;\n    return cachedResult = dir == \"up\" || dir == \"down\"\n        ? endOfTextblockVertical(view, state, dir)\n        : endOfTextblockHorizontal(view, state, dir);\n}\n\n// View descriptions are data structures that describe the DOM that is\n// used to represent the editor's content. They are used for:\n//\n// - Incremental redrawing when the document changes\n//\n// - Figuring out what part of the document a given DOM position\n//   corresponds to\n//\n// - Wiring in custom implementations of the editing interface for a\n//   given node\n//\n// They form a doubly-linked mutable tree, starting at `view.docView`.\nconst NOT_DIRTY = 0, CHILD_DIRTY = 1, CONTENT_DIRTY = 2, NODE_DIRTY = 3;\n// Superclass for the various kinds of descriptions. Defines their\n// basic structure and shared methods.\nclass ViewDesc {\n    constructor(parent, children, dom, \n    // This is the node that holds the child views. It may be null for\n    // descs that don't have children.\n    contentDOM) {\n        this.parent = parent;\n        this.children = children;\n        this.dom = dom;\n        this.contentDOM = contentDOM;\n        this.dirty = NOT_DIRTY;\n        // An expando property on the DOM node provides a link back to its\n        // description.\n        dom.pmViewDesc = this;\n    }\n    // Used to check whether a given description corresponds to a\n    // widget/mark/node.\n    matchesWidget(widget) { return false; }\n    matchesMark(mark) { return false; }\n    matchesNode(node, outerDeco, innerDeco) { return false; }\n    matchesHack(nodeName) { return false; }\n    // When parsing in-editor content (in domchange.js), we allow\n    // descriptions to determine the parse rules that should be used to\n    // parse them.\n    parseRule(addedNodes) { return null; }\n    // Used by the editor's event handler to ignore events that come\n    // from certain descs.\n    stopEvent(event) { return false; }\n    // The size of the content represented by this desc.\n    get size() {\n        let size = 0;\n        for (let i = 0; i < this.children.length; i++)\n            size += this.children[i].size;\n        return size;\n    }\n    // For block nodes, this represents the space taken up by their\n    // start/end tokens.\n    get border() { return 0; }\n    destroy() {\n        this.parent = undefined;\n        if (this.dom.pmViewDesc == this)\n            this.dom.pmViewDesc = undefined;\n        for (let i = 0; i < this.children.length; i++)\n            this.children[i].destroy();\n    }\n    posBeforeChild(child) {\n        for (let i = 0, pos = this.posAtStart;; i++) {\n            let cur = this.children[i];\n            if (cur == child)\n                return pos;\n            pos += cur.size;\n        }\n    }\n    get posBefore() {\n        return this.parent.posBeforeChild(this);\n    }\n    get posAtStart() {\n        return this.parent ? this.parent.posBeforeChild(this) + this.border : 0;\n    }\n    get posAfter() {\n        return this.posBefore + this.size;\n    }\n    get posAtEnd() {\n        return this.posAtStart + this.size - 2 * this.border;\n    }\n    localPosFromDOM(dom, offset, bias) {\n        // If the DOM position is in the content, use the child desc after\n        // it to figure out a position.\n        if (this.contentDOM && contains(this.contentDOM, dom)) {\n            if (bias < 0) {\n                let domBefore, desc;\n                if (dom == this.contentDOM) {\n                    domBefore = dom.childNodes[offset - 1];\n                }\n                else {\n                    while (dom.parentNode != this.contentDOM)\n                        dom = dom.parentNode;\n                    domBefore = dom.previousSibling;\n                }\n                while (domBefore && !((desc = domBefore.pmViewDesc) && desc.parent == this))\n                    domBefore = domBefore.previousSibling;\n                return domBefore ? this.posBeforeChild(desc) + desc.size : this.posAtStart;\n            }\n            else {\n                let domAfter, desc;\n                if (dom == this.contentDOM) {\n                    domAfter = dom.childNodes[offset];\n                }\n                else {\n                    while (dom.parentNode != this.contentDOM)\n                        dom = dom.parentNode;\n                    domAfter = dom.nextSibling;\n                }\n                while (domAfter && !((desc = domAfter.pmViewDesc) && desc.parent == this))\n                    domAfter = domAfter.nextSibling;\n                return domAfter ? this.posBeforeChild(desc) : this.posAtEnd;\n            }\n        }\n        // Otherwise, use various heuristics, falling back on the bias\n        // parameter, to determine whether to return the position at the\n        // start or at the end of this view desc.\n        let atEnd;\n        if (dom == this.dom && this.contentDOM) {\n            atEnd = offset > domIndex(this.contentDOM);\n        }\n        else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM)) {\n            atEnd = !!(dom.compareDocumentPosition(this.contentDOM) & 4);\n        }\n        else if (this.dom.firstChild) {\n            if (offset == 0)\n                for (let search = dom;; search = search.parentNode) {\n                    if (search == this.dom) {\n                        atEnd = false;\n                        break;\n                    }\n                    if (search.previousSibling)\n                        break;\n                }\n            if (atEnd == null && offset == dom.childNodes.length)\n                for (let search = dom;; search = search.parentNode) {\n                    if (search == this.dom) {\n                        atEnd = true;\n                        break;\n                    }\n                    if (search.nextSibling)\n                        break;\n                }\n        }\n        return (atEnd == null ? bias > 0 : atEnd) ? this.posAtEnd : this.posAtStart;\n    }\n    nearestDesc(dom, onlyNodes = false) {\n        for (let first = true, cur = dom; cur; cur = cur.parentNode) {\n            let desc = this.getDesc(cur), nodeDOM;\n            if (desc && (!onlyNodes || desc.node)) {\n                // If dom is outside of this desc's nodeDOM, don't count it.\n                if (first && (nodeDOM = desc.nodeDOM) &&\n                    !(isElt(nodeDOM) ? contains(nodeDOM, dom) : nodeDOM == dom))\n                    first = false;\n                else\n                    return desc;\n            }\n        }\n    }\n    getDesc(dom) {\n        let desc = dom.pmViewDesc;\n        for (let cur = desc; cur; cur = cur.parent)\n            if (cur == this)\n                return desc;\n    }\n    posFromDOM(dom, offset, bias) {\n        for (let scan = dom; scan; scan = scan.parentNode) {\n            let desc = this.getDesc(scan);\n            if (desc)\n                return desc.localPosFromDOM(dom, offset, bias);\n        }\n        return -1;\n    }\n    // Find the desc for the node after the given pos, if any. (When a\n    // parent node overrode rendering, there might not be one.)\n    descAt(pos) {\n        for (let i = 0, offset = 0; i < this.children.length; i++) {\n            let child = this.children[i], end = offset + child.size;\n            if (offset == pos && end != offset) {\n                while (!child.border && child.children.length) {\n                    for (let i = 0; i < child.children.length; i++) {\n                        let inner = child.children[i];\n                        if (inner.size) {\n                            child = inner;\n                            break;\n                        }\n                    }\n                }\n                return child;\n            }\n            if (pos < end)\n                return child.descAt(pos - offset - child.border);\n            offset = end;\n        }\n    }\n    domFromPos(pos, side) {\n        if (!this.contentDOM)\n            return { node: this.dom, offset: 0, atom: pos + 1 };\n        // First find the position in the child array\n        let i = 0, offset = 0;\n        for (let curPos = 0; i < this.children.length; i++) {\n            let child = this.children[i], end = curPos + child.size;\n            if (end > pos) {\n                offset = pos - curPos;\n                break;\n            }\n            curPos = end;\n        }\n        // If this points into the middle of a child, call through\n        if (offset)\n            return this.children[i].domFromPos(offset - this.children[i].border, side);\n        // Go back if there were any zero-length widgets with side >= 0 before this point\n        for (; i > 0; i--) {\n            let prev = this.children[i - 1];\n            if (prev.size || !(prev instanceof BufferHackViewDesc || prev instanceof WidgetViewDesc && prev.side >= 0))\n                break;\n        }\n        // Scan towards the first useable node\n        if (side <= 0) {\n            let prev, enter = true;\n            for (;; i--, enter = false) {\n                prev = i ? this.children[i - 1] : null;\n                if (!prev || prev.dom.parentNode == this.contentDOM)\n                    break;\n            }\n            if (prev && side && enter && !prev.border && !prev.domAtom)\n                return prev.domFromPos(prev.size, side);\n            return { node: this.contentDOM, offset: prev ? domIndex(prev.dom) + 1 : 0 };\n        }\n        else {\n            let next, enter = true;\n            for (;; i++, enter = false) {\n                next = i < this.children.length ? this.children[i] : null;\n                if (!next || next.dom.parentNode == this.contentDOM)\n                    break;\n            }\n            if (next && enter && !next.border && !next.domAtom)\n                return next.domFromPos(0, side);\n            return { node: this.contentDOM, offset: next ? domIndex(next.dom) : this.contentDOM.childNodes.length };\n        }\n    }\n    // Used to find a DOM range in a single parent for a given changed\n    // range.\n    parseRange(from, to, base = 0) {\n        if (this.children.length == 0)\n            return { node: this.contentDOM, from, to, fromOffset: 0, toOffset: this.contentDOM.childNodes.length };\n        let fromOffset = -1, toOffset = -1;\n        for (let offset = base, i = 0;; i++) {\n            let child = this.children[i], end = offset + child.size;\n            if (fromOffset == -1 && from <= end) {\n                let childBase = offset + child.border;\n                // FIXME maybe descend mark views to parse a narrower range?\n                if (from >= childBase && to <= end - child.border && child.node &&\n                    child.contentDOM && this.contentDOM.contains(child.contentDOM))\n                    return child.parseRange(from, to, childBase);\n                from = offset;\n                for (let j = i; j > 0; j--) {\n                    let prev = this.children[j - 1];\n                    if (prev.size && prev.dom.parentNode == this.contentDOM && !prev.emptyChildAt(1)) {\n                        fromOffset = domIndex(prev.dom) + 1;\n                        break;\n                    }\n                    from -= prev.size;\n                }\n                if (fromOffset == -1)\n                    fromOffset = 0;\n            }\n            if (fromOffset > -1 && (end > to || i == this.children.length - 1)) {\n                to = end;\n                for (let j = i + 1; j < this.children.length; j++) {\n                    let next = this.children[j];\n                    if (next.size && next.dom.parentNode == this.contentDOM && !next.emptyChildAt(-1)) {\n                        toOffset = domIndex(next.dom);\n                        break;\n                    }\n                    to += next.size;\n                }\n                if (toOffset == -1)\n                    toOffset = this.contentDOM.childNodes.length;\n                break;\n            }\n            offset = end;\n        }\n        return { node: this.contentDOM, from, to, fromOffset, toOffset };\n    }\n    emptyChildAt(side) {\n        if (this.border || !this.contentDOM || !this.children.length)\n            return false;\n        let child = this.children[side < 0 ? 0 : this.children.length - 1];\n        return child.size == 0 || child.emptyChildAt(side);\n    }\n    domAfterPos(pos) {\n        let { node, offset } = this.domFromPos(pos, 0);\n        if (!isElt(node) || offset == node.childNodes.length)\n            throw new RangeError(\"No node after pos \" + pos);\n        return node.childNodes[offset];\n    }\n    // View descs are responsible for setting any selection that falls\n    // entirely inside of them, so that custom implementations can do\n    // custom things with the selection. Note that this falls apart when\n    // a selection starts in such a node and ends in another, in which\n    // case we just use whatever domFromPos produces as a best effort.\n    setSelection(anchor, head, view, force = false) {\n        // If the selection falls entirely in a child, give it to that child\n        let from = Math.min(anchor, head), to = Math.max(anchor, head);\n        for (let i = 0, offset = 0; i < this.children.length; i++) {\n            let child = this.children[i], end = offset + child.size;\n            if (from > offset && to < end)\n                return child.setSelection(anchor - offset - child.border, head - offset - child.border, view, force);\n            offset = end;\n        }\n        let anchorDOM = this.domFromPos(anchor, anchor ? -1 : 1);\n        let headDOM = head == anchor ? anchorDOM : this.domFromPos(head, head ? -1 : 1);\n        let domSel = view.root.getSelection();\n        let selRange = view.domSelectionRange();\n        let brKludge = false;\n        // On Firefox, using Selection.collapse to put the cursor after a\n        // BR node for some reason doesn't always work (#1073). On Safari,\n        // the cursor sometimes inexplicable visually lags behind its\n        // reported position in such situations (#1092).\n        if ((gecko || safari) && anchor == head) {\n            let { node, offset } = anchorDOM;\n            if (isText(node)) {\n                brKludge = !!(offset && node.nodeValue[offset - 1] == \"\\n\");\n                // Issue #1128\n                if (brKludge && offset == node.nodeValue.length) {\n                    for (let scan = node, after; scan; scan = scan.parentNode) {\n                        if (after = scan.nextSibling) {\n                            if (after.nodeName == \"BR\")\n                                anchorDOM = headDOM = { node: after.parentNode, offset: domIndex(after) + 1 };\n                            break;\n                        }\n                        let desc = scan.pmViewDesc;\n                        if (desc && desc.node && desc.node.isBlock)\n                            break;\n                    }\n                }\n            }\n            else {\n                let prev = node.childNodes[offset - 1];\n                brKludge = prev && (prev.nodeName == \"BR\" || prev.contentEditable == \"false\");\n            }\n        }\n        // Firefox can act strangely when the selection is in front of an\n        // uneditable node. See #1163 and https://bugzilla.mozilla.org/show_bug.cgi?id=1709536\n        if (gecko && selRange.focusNode && selRange.focusNode != headDOM.node && isElt(selRange.focusNode)) {\n            let after = selRange.focusNode.childNodes[selRange.focusOffset];\n            if (after && after.contentEditable == \"false\")\n                force = true;\n        }\n        if (!(force || brKludge && safari) &&\n            isEquivalentPosition(anchorDOM.node, anchorDOM.offset, selRange.anchorNode, selRange.anchorOffset) &&\n            isEquivalentPosition(headDOM.node, headDOM.offset, selRange.focusNode, selRange.focusOffset))\n            return;\n        // Selection.extend can be used to create an 'inverted' selection\n        // (one where the focus is before the anchor), but not all\n        // browsers support it yet.\n        let domSelExtended = false;\n        if ((domSel.extend || anchor == head) && !(brKludge && gecko)) {\n            domSel.collapse(anchorDOM.node, anchorDOM.offset);\n            try {\n                if (anchor != head)\n                    domSel.extend(headDOM.node, headDOM.offset);\n                domSelExtended = true;\n            }\n            catch (_) {\n                // In some cases with Chrome the selection is empty after calling\n                // collapse, even when it should be valid. This appears to be a bug, but\n                // it is difficult to isolate. If this happens fallback to the old path\n                // without using extend.\n                // Similarly, this could crash on Safari if the editor is hidden, and\n                // there was no selection.\n            }\n        }\n        if (!domSelExtended) {\n            if (anchor > head) {\n                let tmp = anchorDOM;\n                anchorDOM = headDOM;\n                headDOM = tmp;\n            }\n            let range = document.createRange();\n            range.setEnd(headDOM.node, headDOM.offset);\n            range.setStart(anchorDOM.node, anchorDOM.offset);\n            domSel.removeAllRanges();\n            domSel.addRange(range);\n        }\n    }\n    ignoreMutation(mutation) {\n        return !this.contentDOM && mutation.type != \"selection\";\n    }\n    get contentLost() {\n        return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM);\n    }\n    // Remove a subtree of the element tree that has been touched\n    // by a DOM change, so that the next update will redraw it.\n    markDirty(from, to) {\n        for (let offset = 0, i = 0; i < this.children.length; i++) {\n            let child = this.children[i], end = offset + child.size;\n            if (offset == end ? from <= end && to >= offset : from < end && to > offset) {\n                let startInside = offset + child.border, endInside = end - child.border;\n                if (from >= startInside && to <= endInside) {\n                    this.dirty = from == offset || to == end ? CONTENT_DIRTY : CHILD_DIRTY;\n                    if (from == startInside && to == endInside &&\n                        (child.contentLost || child.dom.parentNode != this.contentDOM))\n                        child.dirty = NODE_DIRTY;\n                    else\n                        child.markDirty(from - startInside, to - startInside);\n                    return;\n                }\n                else {\n                    child.dirty = child.dom == child.contentDOM && child.dom.parentNode == this.contentDOM && !child.children.length\n                        ? CONTENT_DIRTY : NODE_DIRTY;\n                }\n            }\n            offset = end;\n        }\n        this.dirty = CONTENT_DIRTY;\n    }\n    markParentsDirty() {\n        let level = 1;\n        for (let node = this.parent; node; node = node.parent, level++) {\n            let dirty = level == 1 ? CONTENT_DIRTY : CHILD_DIRTY;\n            if (node.dirty < dirty)\n                node.dirty = dirty;\n        }\n    }\n    get domAtom() { return false; }\n    get ignoreForCoords() { return false; }\n    get ignoreForSelection() { return false; }\n    isText(text) { return false; }\n}\n// A widget desc represents a widget decoration, which is a DOM node\n// drawn between the document nodes.\nclass WidgetViewDesc extends ViewDesc {\n    constructor(parent, widget, view, pos) {\n        let self, dom = widget.type.toDOM;\n        if (typeof dom == \"function\")\n            dom = dom(view, () => {\n                if (!self)\n                    return pos;\n                if (self.parent)\n                    return self.parent.posBeforeChild(self);\n            });\n        if (!widget.type.spec.raw) {\n            let elt = isElt(dom) ? dom : document.createElement(\"span\");\n            if (elt != dom)\n                elt.appendChild(dom);\n            if (!elt.hasAttribute(\"contenteditable\"))\n                elt.contentEditable = \"false\";\n            elt.classList.add(\"ProseMirror-widget\");\n        }\n        super(parent, [], dom, null);\n        this.widget = widget;\n        this.widget = widget;\n        self = this;\n    }\n    matchesWidget(widget) {\n        return this.dirty == NOT_DIRTY && widget.type.eq(this.widget.type);\n    }\n    parseRule() { return { ignore: true }; }\n    stopEvent(event) {\n        let stop = this.widget.spec.stopEvent;\n        return stop ? stop(event) : false;\n    }\n    ignoreMutation(mutation) {\n        return mutation.type != \"selection\" || this.widget.spec.ignoreSelection;\n    }\n    destroy() {\n        this.widget.type.destroy(this.dom);\n        super.destroy();\n    }\n    get domAtom() { return true; }\n    get ignoreForSelection() { return !!this.widget.type.spec.relaxedSide; }\n    get side() { return this.widget.type.side; }\n}\nclass CompositionViewDesc extends ViewDesc {\n    constructor(parent, dom, textDOM, text) {\n        super(parent, [], dom, null);\n        this.textDOM = textDOM;\n        this.text = text;\n    }\n    get size() { return this.text.length; }\n    localPosFromDOM(dom, offset) {\n        if (dom != this.textDOM)\n            return this.posAtStart + (offset ? this.size : 0);\n        return this.posAtStart + offset;\n    }\n    domFromPos(pos) {\n        return { node: this.textDOM, offset: pos };\n    }\n    ignoreMutation(mut) {\n        return mut.type === 'characterData' && mut.target.nodeValue == mut.oldValue;\n    }\n}\n// A mark desc represents a mark. May have multiple children,\n// depending on how the mark is split. Note that marks are drawn using\n// a fixed nesting order, for simplicity and predictability, so in\n// some cases they will be split more often than would appear\n// necessary.\nclass MarkViewDesc extends ViewDesc {\n    constructor(parent, mark, dom, contentDOM, spec) {\n        super(parent, [], dom, contentDOM);\n        this.mark = mark;\n        this.spec = spec;\n    }\n    static create(parent, mark, inline, view) {\n        let custom = view.nodeViews[mark.type.name];\n        let spec = custom && custom(mark, view, inline);\n        if (!spec || !spec.dom)\n            spec = DOMSerializer.renderSpec(document, mark.type.spec.toDOM(mark, inline), null, mark.attrs);\n        return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom, spec);\n    }\n    parseRule() {\n        if ((this.dirty & NODE_DIRTY) || this.mark.type.spec.reparseInView)\n            return null;\n        return { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };\n    }\n    matchesMark(mark) { return this.dirty != NODE_DIRTY && this.mark.eq(mark); }\n    markDirty(from, to) {\n        super.markDirty(from, to);\n        // Move dirty info to nearest node view\n        if (this.dirty != NOT_DIRTY) {\n            let parent = this.parent;\n            while (!parent.node)\n                parent = parent.parent;\n            if (parent.dirty < this.dirty)\n                parent.dirty = this.dirty;\n            this.dirty = NOT_DIRTY;\n        }\n    }\n    slice(from, to, view) {\n        let copy = MarkViewDesc.create(this.parent, this.mark, true, view);\n        let nodes = this.children, size = this.size;\n        if (to < size)\n            nodes = replaceNodes(nodes, to, size, view);\n        if (from > 0)\n            nodes = replaceNodes(nodes, 0, from, view);\n        for (let i = 0; i < nodes.length; i++)\n            nodes[i].parent = copy;\n        copy.children = nodes;\n        return copy;\n    }\n    ignoreMutation(mutation) {\n        return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : super.ignoreMutation(mutation);\n    }\n    destroy() {\n        if (this.spec.destroy)\n            this.spec.destroy();\n        super.destroy();\n    }\n}\n// Node view descs are the main, most common type of view desc, and\n// correspond to an actual node in the document. Unlike mark descs,\n// they populate their child array themselves.\nclass NodeViewDesc extends ViewDesc {\n    constructor(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM) {\n        super(parent, [], dom, contentDOM);\n        this.node = node;\n        this.outerDeco = outerDeco;\n        this.innerDeco = innerDeco;\n        this.nodeDOM = nodeDOM;\n    }\n    // By default, a node is rendered using the `toDOM` method from the\n    // node type spec. But client code can use the `nodeViews` spec to\n    // supply a custom node view, which can influence various aspects of\n    // the way the node works.\n    //\n    // (Using subclassing for this was intentionally decided against,\n    // since it'd require exposing a whole slew of finicky\n    // implementation details to the user code that they probably will\n    // never need.)\n    static create(parent, node, outerDeco, innerDeco, view, pos) {\n        let custom = view.nodeViews[node.type.name], descObj;\n        let spec = custom && custom(node, view, () => {\n            // (This is a function that allows the custom view to find its\n            // own position)\n            if (!descObj)\n                return pos;\n            if (descObj.parent)\n                return descObj.parent.posBeforeChild(descObj);\n        }, outerDeco, innerDeco);\n        let dom = spec && spec.dom, contentDOM = spec && spec.contentDOM;\n        if (node.isText) {\n            if (!dom)\n                dom = document.createTextNode(node.text);\n            else if (!isText(dom))\n                throw new RangeError(\"Text must be rendered as a DOM text node\");\n        }\n        else if (!dom) {\n            let spec = DOMSerializer.renderSpec(document, node.type.spec.toDOM(node), null, node.attrs);\n            ({ dom, contentDOM } = spec);\n        }\n        if (!contentDOM && !node.isText && dom.nodeName != \"BR\") { // Chrome gets confused by <br contenteditable=false>\n            if (!dom.hasAttribute(\"contenteditable\"))\n                dom.contentEditable = \"false\";\n            if (node.type.spec.draggable)\n                dom.draggable = true;\n        }\n        let nodeDOM = dom;\n        dom = applyOuterDeco(dom, outerDeco, node);\n        if (spec)\n            return descObj = new CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM, spec);\n        else if (node.isText)\n            return new TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM);\n        else\n            return new NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM);\n    }\n    parseRule(addedNodes) {\n        // Experimental kludge to allow opt-in re-parsing of nodes\n        if (this.node.type.spec.reparseInView)\n            return null;\n        // FIXME the assumption that this can always return the current\n        // attrs means that if the user somehow manages to change the\n        // attrs in the dom, that won't be picked up. Not entirely sure\n        // whether this is a problem\n        let rule = { node: this.node.type.name, attrs: this.node.attrs };\n        if (this.node.type.whitespace == \"pre\")\n            rule.preserveWhitespace = \"full\";\n        if (!this.contentDOM) {\n            rule.getContent = () => this.node.content;\n        }\n        else if (!this.contentLost) {\n            rule.contentElement = this.contentDOM;\n        }\n        else {\n            // Chrome likes to randomly recreate parent nodes when\n            // backspacing things. When that happens, this tries to find the\n            // new parent.\n            for (let i = this.children.length - 1; i >= 0; i--) {\n                let child = this.children[i];\n                if (this.dom.contains(child.dom.parentNode)) {\n                    rule.contentElement = child.dom.parentNode;\n                    break;\n                }\n            }\n            if (!rule.contentElement) {\n                let found = addedNodes &&\n                    addedNodes.find(n => isElt(n) && addedNodes.indexOf(n.parentNode) < 0 && this.dom.contains(n));\n                if (found)\n                    rule.contentElement = found;\n                else\n                    rule.getContent = () => Fragment.empty;\n            }\n        }\n        return rule;\n    }\n    matchesNode(node, outerDeco, innerDeco) {\n        return this.dirty == NOT_DIRTY && node.eq(this.node) &&\n            sameOuterDeco(outerDeco, this.outerDeco) && innerDeco.eq(this.innerDeco);\n    }\n    get size() { return this.node.nodeSize; }\n    get border() { return this.node.isLeaf ? 0 : 1; }\n    // Syncs `this.children` to match `this.node.content` and the local\n    // decorations, possibly introducing nesting for marks. Then, in a\n    // separate step, syncs the DOM inside `this.contentDOM` to\n    // `this.children`.\n    updateChildren(view, pos) {\n        let inline = this.node.inlineContent, off = pos;\n        let composition = view.composing ? this.localCompositionInfo(view, pos) : null;\n        let localComposition = composition && composition.pos > -1 ? composition : null;\n        let compositionInChild = composition && composition.pos < 0;\n        let updater = new ViewTreeUpdater(this, localComposition && localComposition.node, view);\n        let addBuffers = this.node.inlineContent, atBufferPos = addBuffers && this.node.isBlock;\n        iterDeco(this.node, this.innerDeco, (widget, i, insideNode) => {\n            if (widget.spec.marks)\n                updater.syncToMarks(widget.spec.marks, inline, view, i);\n            else if (widget.type.side >= 0 && !insideNode)\n                updater.syncToMarks(i == this.node.childCount ? Mark.none : this.node.child(i).marks, inline, view, i);\n            // If the next node is a desc matching this widget, reuse it,\n            // otherwise insert the widget as a new view desc.\n            updater.placeWidget(widget, view, off);\n        }, (child, outerDeco, innerDeco, i) => {\n            // Make sure the wrapping mark descs match the node's marks.\n            updater.syncToMarks(child.marks, inline, view, i);\n            if (atBufferPos && child.isAtom && !child.isText)\n                updater.addHackNode(\"IMG\", updater.top);\n            // Try several strategies for drawing this node\n            let compIndex;\n            if (updater.findNodeMatch(child, outerDeco, innerDeco, i)) ;\n            else if (compositionInChild && view.state.selection.from > off &&\n                view.state.selection.to < off + child.nodeSize &&\n                (compIndex = updater.findIndexWithChild(composition.node)) > -1 &&\n                updater.updateNodeAt(child, outerDeco, innerDeco, compIndex, view)) ;\n            else if (updater.updateNextNode(child, outerDeco, innerDeco, view, i, off)) ;\n            else {\n                // Add it as a new view\n                updater.addNode(child, outerDeco, innerDeco, view, off);\n            }\n            off += child.nodeSize;\n            if (addBuffers)\n                atBufferPos = child.isAtom && !child.isText;\n        });\n        // Drop all remaining descs after the current position.\n        updater.syncToMarks([], inline, view, 0);\n        if (this.node.isTextblock)\n            updater.addTextblockHacks();\n        updater.destroyRest();\n        // Sync the DOM if anything changed\n        if (updater.changed || this.dirty == CONTENT_DIRTY) {\n            // May have to protect focused DOM from being changed if a composition is active\n            if (localComposition)\n                this.protectLocalComposition(view, localComposition);\n            renderDescs(this.contentDOM, this.children, view);\n            if (ios)\n                iosHacks(this.dom);\n        }\n    }\n    localCompositionInfo(view, pos) {\n        // Only do something if both the selection and a focused text node\n        // are inside of this node\n        let { from, to } = view.state.selection;\n        if (!(view.state.selection instanceof TextSelection) || from < pos || to > pos + this.node.content.size)\n            return null;\n        let textNode = view.input.compositionNode;\n        if (!textNode || !this.dom.contains(textNode.parentNode))\n            return null;\n        if (this.node.inlineContent) {\n            // Find the text in the focused node in the node, stop if it's not\n            // there (may have been modified through other means, in which\n            // case it should overwritten)\n            let text = textNode.nodeValue;\n            let textPos = findTextInFragment(this.node.content, text, from - pos, to - pos);\n            return textPos < 0 ? null : { node: textNode, pos: textPos, text };\n        }\n        else {\n            return { node: textNode, pos: -1, text: \"\" };\n        }\n    }\n    protectLocalComposition(view, { node, pos, text }) {\n        // The node is already part of a local view desc, leave it there\n        if (this.getDesc(node))\n            return;\n        // Create a composition view for the orphaned nodes\n        let topNode = node;\n        for (;; topNode = topNode.parentNode) {\n            if (topNode.parentNode == this.contentDOM)\n                break;\n            while (topNode.previousSibling)\n                topNode.parentNode.removeChild(topNode.previousSibling);\n            while (topNode.nextSibling)\n                topNode.parentNode.removeChild(topNode.nextSibling);\n            if (topNode.pmViewDesc)\n                topNode.pmViewDesc = undefined;\n        }\n        let desc = new CompositionViewDesc(this, topNode, node, text);\n        view.input.compositionNodes.push(desc);\n        // Patch up this.children to contain the composition view\n        this.children = replaceNodes(this.children, pos, pos + text.length, view, desc);\n    }\n    // If this desc must be updated to match the given node decoration,\n    // do so and return true.\n    update(node, outerDeco, innerDeco, view) {\n        if (this.dirty == NODE_DIRTY ||\n            !node.sameMarkup(this.node))\n            return false;\n        this.updateInner(node, outerDeco, innerDeco, view);\n        return true;\n    }\n    updateInner(node, outerDeco, innerDeco, view) {\n        this.updateOuterDeco(outerDeco);\n        this.node = node;\n        this.innerDeco = innerDeco;\n        if (this.contentDOM)\n            this.updateChildren(view, this.posAtStart);\n        this.dirty = NOT_DIRTY;\n    }\n    updateOuterDeco(outerDeco) {\n        if (sameOuterDeco(outerDeco, this.outerDeco))\n            return;\n        let needsWrap = !isElt(this.nodeDOM);\n        let oldDOM = this.dom;\n        this.dom = patchOuterDeco(this.dom, this.nodeDOM, computeOuterDeco(this.outerDeco, this.node, needsWrap), computeOuterDeco(outerDeco, this.node, needsWrap));\n        if (this.dom != oldDOM) {\n            oldDOM.pmViewDesc = undefined;\n            this.dom.pmViewDesc = this;\n        }\n        this.outerDeco = outerDeco;\n    }\n    // Mark this node as being the selected node.\n    selectNode() {\n        if (isElt(this.nodeDOM)) {\n            this.nodeDOM.classList.add(\"ProseMirror-selectednode\");\n            if (this.contentDOM || !this.node.type.spec.draggable)\n                this.nodeDOM.draggable = true;\n        }\n    }\n    // Remove selected node marking from this node.\n    deselectNode() {\n        if (isElt(this.nodeDOM)) {\n            this.nodeDOM.classList.remove(\"ProseMirror-selectednode\");\n            if (this.contentDOM || !this.node.type.spec.draggable)\n                this.nodeDOM.removeAttribute(\"draggable\");\n        }\n    }\n    get domAtom() { return this.node.isAtom; }\n}\n// Create a view desc for the top-level document node, to be exported\n// and used by the view class.\nfunction docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n    applyOuterDeco(dom, outerDeco, doc);\n    let docView = new NodeViewDesc(undefined, doc, outerDeco, innerDeco, dom, dom, dom);\n    if (docView.contentDOM)\n        docView.updateChildren(view, 0);\n    return docView;\n}\nclass TextViewDesc extends NodeViewDesc {\n    constructor(parent, node, outerDeco, innerDeco, dom, nodeDOM) {\n        super(parent, node, outerDeco, innerDeco, dom, null, nodeDOM);\n    }\n    parseRule() {\n        let skip = this.nodeDOM.parentNode;\n        while (skip && skip != this.dom && !skip.pmIsDeco)\n            skip = skip.parentNode;\n        return { skip: (skip || true) };\n    }\n    update(node, outerDeco, innerDeco, view) {\n        if (this.dirty == NODE_DIRTY || (this.dirty != NOT_DIRTY && !this.inParent()) ||\n            !node.sameMarkup(this.node))\n            return false;\n        this.updateOuterDeco(outerDeco);\n        if ((this.dirty != NOT_DIRTY || node.text != this.node.text) && node.text != this.nodeDOM.nodeValue) {\n            this.nodeDOM.nodeValue = node.text;\n            if (view.trackWrites == this.nodeDOM)\n                view.trackWrites = null;\n        }\n        this.node = node;\n        this.dirty = NOT_DIRTY;\n        return true;\n    }\n    inParent() {\n        let parentDOM = this.parent.contentDOM;\n        for (let n = this.nodeDOM; n; n = n.parentNode)\n            if (n == parentDOM)\n                return true;\n        return false;\n    }\n    domFromPos(pos) {\n        return { node: this.nodeDOM, offset: pos };\n    }\n    localPosFromDOM(dom, offset, bias) {\n        if (dom == this.nodeDOM)\n            return this.posAtStart + Math.min(offset, this.node.text.length);\n        return super.localPosFromDOM(dom, offset, bias);\n    }\n    ignoreMutation(mutation) {\n        return mutation.type != \"characterData\" && mutation.type != \"selection\";\n    }\n    slice(from, to, _view) {\n        let node = this.node.cut(from, to), dom = document.createTextNode(node.text);\n        return new TextViewDesc(this.parent, node, this.outerDeco, this.innerDeco, dom, dom);\n    }\n    markDirty(from, to) {\n        super.markDirty(from, to);\n        if (this.dom != this.nodeDOM && (from == 0 || to == this.nodeDOM.nodeValue.length))\n            this.dirty = NODE_DIRTY;\n    }\n    get domAtom() { return false; }\n    isText(text) { return this.node.text == text; }\n}\n// A dummy desc used to tag extra BR or IMG nodes created to work\n// around contentEditable terribleness.\nclass BufferHackViewDesc extends ViewDesc {\n    parseRule() { return { ignore: true }; }\n    matchesHack(nodeName) { return this.dirty == NOT_DIRTY && this.dom.nodeName == nodeName; }\n    get domAtom() { return true; }\n    get ignoreForCoords() { return this.dom.nodeName == \"IMG\"; }\n}\n// A separate subclass is used for customized node views, so that the\n// extra checks only have to be made for nodes that are actually\n// customized.\nclass CustomNodeViewDesc extends NodeViewDesc {\n    constructor(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec) {\n        super(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM);\n        this.spec = spec;\n    }\n    // A custom `update` method gets to decide whether the update goes\n    // through. If it does, and there's a `contentDOM` node, our logic\n    // updates the children.\n    update(node, outerDeco, innerDeco, view) {\n        if (this.dirty == NODE_DIRTY)\n            return false;\n        if (this.spec.update && (this.node.type == node.type || this.spec.multiType)) {\n            let result = this.spec.update(node, outerDeco, innerDeco);\n            if (result)\n                this.updateInner(node, outerDeco, innerDeco, view);\n            return result;\n        }\n        else if (!this.contentDOM && !node.isLeaf) {\n            return false;\n        }\n        else {\n            return super.update(node, outerDeco, innerDeco, view);\n        }\n    }\n    selectNode() {\n        this.spec.selectNode ? this.spec.selectNode() : super.selectNode();\n    }\n    deselectNode() {\n        this.spec.deselectNode ? this.spec.deselectNode() : super.deselectNode();\n    }\n    setSelection(anchor, head, view, force) {\n        this.spec.setSelection ? this.spec.setSelection(anchor, head, view.root)\n            : super.setSelection(anchor, head, view, force);\n    }\n    destroy() {\n        if (this.spec.destroy)\n            this.spec.destroy();\n        super.destroy();\n    }\n    stopEvent(event) {\n        return this.spec.stopEvent ? this.spec.stopEvent(event) : false;\n    }\n    ignoreMutation(mutation) {\n        return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : super.ignoreMutation(mutation);\n    }\n}\n// Sync the content of the given DOM node with the nodes associated\n// with the given array of view descs, recursing into mark descs\n// because this should sync the subtree for a whole node at a time.\nfunction renderDescs(parentDOM, descs, view) {\n    let dom = parentDOM.firstChild, written = false;\n    for (let i = 0; i < descs.length; i++) {\n        let desc = descs[i], childDOM = desc.dom;\n        if (childDOM.parentNode == parentDOM) {\n            while (childDOM != dom) {\n                dom = rm(dom);\n                written = true;\n            }\n            dom = dom.nextSibling;\n        }\n        else {\n            written = true;\n            parentDOM.insertBefore(childDOM, dom);\n        }\n        if (desc instanceof MarkViewDesc) {\n            let pos = dom ? dom.previousSibling : parentDOM.lastChild;\n            renderDescs(desc.contentDOM, desc.children, view);\n            dom = pos ? pos.nextSibling : parentDOM.firstChild;\n        }\n    }\n    while (dom) {\n        dom = rm(dom);\n        written = true;\n    }\n    if (written && view.trackWrites == parentDOM)\n        view.trackWrites = null;\n}\nconst OuterDecoLevel = function (nodeName) {\n    if (nodeName)\n        this.nodeName = nodeName;\n};\nOuterDecoLevel.prototype = Object.create(null);\nconst noDeco = [new OuterDecoLevel];\nfunction computeOuterDeco(outerDeco, node, needsWrap) {\n    if (outerDeco.length == 0)\n        return noDeco;\n    let top = needsWrap ? noDeco[0] : new OuterDecoLevel, result = [top];\n    for (let i = 0; i < outerDeco.length; i++) {\n        let attrs = outerDeco[i].type.attrs;\n        if (!attrs)\n            continue;\n        if (attrs.nodeName)\n            result.push(top = new OuterDecoLevel(attrs.nodeName));\n        for (let name in attrs) {\n            let val = attrs[name];\n            if (val == null)\n                continue;\n            if (needsWrap && result.length == 1)\n                result.push(top = new OuterDecoLevel(node.isInline ? \"span\" : \"div\"));\n            if (name == \"class\")\n                top.class = (top.class ? top.class + \" \" : \"\") + val;\n            else if (name == \"style\")\n                top.style = (top.style ? top.style + \";\" : \"\") + val;\n            else if (name != \"nodeName\")\n                top[name] = val;\n        }\n    }\n    return result;\n}\nfunction patchOuterDeco(outerDOM, nodeDOM, prevComputed, curComputed) {\n    // Shortcut for trivial case\n    if (prevComputed == noDeco && curComputed == noDeco)\n        return nodeDOM;\n    let curDOM = nodeDOM;\n    for (let i = 0; i < curComputed.length; i++) {\n        let deco = curComputed[i], prev = prevComputed[i];\n        if (i) {\n            let parent;\n            if (prev && prev.nodeName == deco.nodeName && curDOM != outerDOM &&\n                (parent = curDOM.parentNode) && parent.nodeName.toLowerCase() == deco.nodeName) {\n                curDOM = parent;\n            }\n            else {\n                parent = document.createElement(deco.nodeName);\n                parent.pmIsDeco = true;\n                parent.appendChild(curDOM);\n                prev = noDeco[0];\n                curDOM = parent;\n            }\n        }\n        patchAttributes(curDOM, prev || noDeco[0], deco);\n    }\n    return curDOM;\n}\nfunction patchAttributes(dom, prev, cur) {\n    for (let name in prev)\n        if (name != \"class\" && name != \"style\" && name != \"nodeName\" && !(name in cur))\n            dom.removeAttribute(name);\n    for (let name in cur)\n        if (name != \"class\" && name != \"style\" && name != \"nodeName\" && cur[name] != prev[name])\n            dom.setAttribute(name, cur[name]);\n    if (prev.class != cur.class) {\n        let prevList = prev.class ? prev.class.split(\" \").filter(Boolean) : [];\n        let curList = cur.class ? cur.class.split(\" \").filter(Boolean) : [];\n        for (let i = 0; i < prevList.length; i++)\n            if (curList.indexOf(prevList[i]) == -1)\n                dom.classList.remove(prevList[i]);\n        for (let i = 0; i < curList.length; i++)\n            if (prevList.indexOf(curList[i]) == -1)\n                dom.classList.add(curList[i]);\n        if (dom.classList.length == 0)\n            dom.removeAttribute(\"class\");\n    }\n    if (prev.style != cur.style) {\n        if (prev.style) {\n            let prop = /\\s*([\\w\\-\\xa1-\\uffff]+)\\s*:(?:\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|\\(.*?\\)|[^;])*/g, m;\n            while (m = prop.exec(prev.style))\n                dom.style.removeProperty(m[1]);\n        }\n        if (cur.style)\n            dom.style.cssText += cur.style;\n    }\n}\nfunction applyOuterDeco(dom, deco, node) {\n    return patchOuterDeco(dom, dom, noDeco, computeOuterDeco(deco, node, !isElt(dom)));\n}\nfunction sameOuterDeco(a, b) {\n    if (a.length != b.length)\n        return false;\n    for (let i = 0; i < a.length; i++)\n        if (!a[i].type.eq(b[i].type))\n            return false;\n    return true;\n}\n// Remove a DOM node and return its next sibling.\nfunction rm(dom) {\n    let next = dom.nextSibling;\n    dom.parentNode.removeChild(dom);\n    return next;\n}\n// Helper class for incrementally updating a tree of mark descs and\n// the widget and node descs inside of them.\nclass ViewTreeUpdater {\n    constructor(top, lock, view) {\n        this.lock = lock;\n        this.view = view;\n        // Index into `this.top`'s child array, represents the current\n        // update position.\n        this.index = 0;\n        // When entering a mark, the current top and index are pushed\n        // onto this.\n        this.stack = [];\n        // Tracks whether anything was changed\n        this.changed = false;\n        this.top = top;\n        this.preMatch = preMatch(top.node.content, top);\n    }\n    // Destroy and remove the children between the given indices in\n    // `this.top`.\n    destroyBetween(start, end) {\n        if (start == end)\n            return;\n        for (let i = start; i < end; i++)\n            this.top.children[i].destroy();\n        this.top.children.splice(start, end - start);\n        this.changed = true;\n    }\n    // Destroy all remaining children in `this.top`.\n    destroyRest() {\n        this.destroyBetween(this.index, this.top.children.length);\n    }\n    // Sync the current stack of mark descs with the given array of\n    // marks, reusing existing mark descs when possible.\n    syncToMarks(marks, inline, view, parentIndex) {\n        let keep = 0, depth = this.stack.length >> 1;\n        let maxKeep = Math.min(depth, marks.length);\n        while (keep < maxKeep &&\n            (keep == depth - 1 ? this.top : this.stack[(keep + 1) << 1])\n                .matchesMark(marks[keep]) && marks[keep].type.spec.spanning !== false)\n            keep++;\n        while (keep < depth) {\n            this.destroyRest();\n            this.top.dirty = NOT_DIRTY;\n            this.index = this.stack.pop();\n            this.top = this.stack.pop();\n            depth--;\n        }\n        while (depth < marks.length) {\n            this.stack.push(this.top, this.index + 1);\n            let found = -1, scanTo = this.top.children.length;\n            if (parentIndex < this.preMatch.index)\n                scanTo = Math.min(this.index + 3, scanTo);\n            for (let i = this.index; i < scanTo; i++) {\n                let next = this.top.children[i];\n                if (next.matchesMark(marks[depth]) && !this.isLocked(next.dom)) {\n                    found = i;\n                    break;\n                }\n            }\n            // When nothing matches, try to update the mark view at this position\n            // in place, so a custom mark view can adapt to a changed mark without\n            // re-creating its DOM.\n            if (found < 0 && this.index < this.top.children.length) {\n                let cur = this.top.children[this.index];\n                if (cur instanceof MarkViewDesc && cur.dirty != NODE_DIRTY &&\n                    cur.mark.type == marks[depth].type && cur.spec.update &&\n                    !this.isLocked(cur.dom) && cur.spec.update(marks[depth])) {\n                    cur.mark = marks[depth];\n                    found = this.index;\n                    this.changed = true;\n                }\n            }\n            if (found > -1) {\n                if (found > this.index) {\n                    this.changed = true;\n                    this.destroyBetween(this.index, found);\n                }\n                this.top = this.top.children[this.index];\n            }\n            else {\n                let markDesc = MarkViewDesc.create(this.top, marks[depth], inline, view);\n                this.top.children.splice(this.index, 0, markDesc);\n                this.top = markDesc;\n                this.changed = true;\n            }\n            this.index = 0;\n            depth++;\n        }\n    }\n    // Try to find a node desc matching the given data. Skip over it and\n    // return true when successful.\n    findNodeMatch(node, outerDeco, innerDeco, index) {\n        let found = -1, targetDesc;\n        if (index >= this.preMatch.index &&\n            (targetDesc = this.preMatch.matches[index - this.preMatch.index]).parent == this.top &&\n            targetDesc.matchesNode(node, outerDeco, innerDeco)) {\n            found = this.top.children.indexOf(targetDesc, this.index);\n        }\n        else {\n            for (let i = this.index, e = Math.min(this.top.children.length, i + 5); i < e; i++) {\n                let child = this.top.children[i];\n                if (child.matchesNode(node, outerDeco, innerDeco) && !this.preMatch.matched.has(child)) {\n                    found = i;\n                    break;\n                }\n            }\n        }\n        if (found < 0)\n            return false;\n        this.destroyBetween(this.index, found);\n        this.index++;\n        return true;\n    }\n    updateNodeAt(node, outerDeco, innerDeco, index, view) {\n        let child = this.top.children[index];\n        if (child.dirty == NODE_DIRTY && child.dom == child.contentDOM)\n            child.dirty = CONTENT_DIRTY;\n        if (!child.update(node, outerDeco, innerDeco, view))\n            return false;\n        this.destroyBetween(this.index, index);\n        this.index++;\n        return true;\n    }\n    findIndexWithChild(domNode) {\n        for (;;) {\n            let parent = domNode.parentNode;\n            if (!parent)\n                return -1;\n            if (parent == this.top.contentDOM) {\n                let desc = domNode.pmViewDesc;\n                if (desc)\n                    for (let i = this.index; i < this.top.children.length; i++) {\n                        if (this.top.children[i] == desc)\n                            return i;\n                    }\n                return -1;\n            }\n            domNode = parent;\n        }\n    }\n    // Try to update the next node, if any, to the given data. Checks\n    // pre-matches to avoid overwriting nodes that could still be used.\n    updateNextNode(node, outerDeco, innerDeco, view, index, pos) {\n        for (let i = this.index; i < this.top.children.length; i++) {\n            let next = this.top.children[i];\n            if (next instanceof NodeViewDesc) {\n                let preMatch = this.preMatch.matched.get(next);\n                if (preMatch != null && preMatch != index)\n                    return false;\n                let nextDOM = next.dom, updated;\n                // Can't update if nextDOM is or contains this.lock, except if\n                // it's a text node whose content already matches the new text\n                // and whose decorations match the new ones.\n                let locked = this.isLocked(nextDOM) &&\n                    !(node.isText && next.node && next.node.isText && next.nodeDOM.nodeValue == node.text &&\n                        next.dirty != NODE_DIRTY && sameOuterDeco(outerDeco, next.outerDeco));\n                if (!locked && next.update(node, outerDeco, innerDeco, view)) {\n                    this.destroyBetween(this.index, i);\n                    if (next.dom != nextDOM)\n                        this.changed = true;\n                    this.index++;\n                    return true;\n                }\n                else if (!locked && (updated = this.recreateWrapper(next, node, outerDeco, innerDeco, view, pos))) {\n                    this.destroyBetween(this.index, i);\n                    this.top.children[this.index] = updated;\n                    if (updated.contentDOM) {\n                        updated.dirty = CONTENT_DIRTY;\n                        updated.updateChildren(view, pos + 1);\n                        updated.dirty = NOT_DIRTY;\n                    }\n                    this.changed = true;\n                    this.index++;\n                    return true;\n                }\n                break;\n            }\n        }\n        return false;\n    }\n    // When a node with content is replaced by a different node with\n    // identical content, move over its children.\n    recreateWrapper(next, node, outerDeco, innerDeco, view, pos) {\n        if (next.dirty || node.isAtom || !next.children.length ||\n            !next.node.content.eq(node.content) ||\n            !sameOuterDeco(outerDeco, next.outerDeco) || !innerDeco.eq(next.innerDeco))\n            return null;\n        let wrapper = NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos);\n        if (wrapper.contentDOM) {\n            wrapper.children = next.children;\n            next.children = [];\n            for (let ch of wrapper.children)\n                ch.parent = wrapper;\n        }\n        next.destroy();\n        return wrapper;\n    }\n    // Insert the node as a newly created node desc.\n    addNode(node, outerDeco, innerDeco, view, pos) {\n        let desc = NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos);\n        if (desc.contentDOM)\n            desc.updateChildren(view, pos + 1);\n        this.top.children.splice(this.index++, 0, desc);\n        this.changed = true;\n    }\n    placeWidget(widget, view, pos) {\n        let next = this.index < this.top.children.length ? this.top.children[this.index] : null;\n        if (next && next.matchesWidget(widget) &&\n            (widget == next.widget || !next.widget.type.toDOM.parentNode)) {\n            this.index++;\n        }\n        else {\n            let desc = new WidgetViewDesc(this.top, widget, view, pos);\n            this.top.children.splice(this.index++, 0, desc);\n            this.changed = true;\n        }\n    }\n    // Make sure a textblock looks and behaves correctly in\n    // contentEditable.\n    addTextblockHacks() {\n        let lastChild = this.top.children[this.index - 1], parent = this.top;\n        while (lastChild instanceof MarkViewDesc) {\n            parent = lastChild;\n            lastChild = parent.children[parent.children.length - 1];\n        }\n        if (!lastChild || // Empty textblock\n            !(lastChild instanceof TextViewDesc) ||\n            /\\n$/.test(lastChild.node.text) ||\n            (this.view.requiresGeckoHackNode && /\\s$/.test(lastChild.node.text))) {\n            // Avoid bugs in Safari's cursor drawing (#1165) and Chrome's mouse selection (#1152)\n            if ((safari || chrome) && lastChild && lastChild.dom.contentEditable == \"false\")\n                this.addHackNode(\"IMG\", parent);\n            this.addHackNode(\"BR\", this.top);\n        }\n    }\n    addHackNode(nodeName, parent) {\n        if (parent == this.top && this.index < parent.children.length && parent.children[this.index].matchesHack(nodeName)) {\n            this.index++;\n        }\n        else {\n            let dom = document.createElement(nodeName);\n            if (nodeName == \"IMG\") {\n                dom.className = \"ProseMirror-separator\";\n                dom.alt = \"\";\n            }\n            if (nodeName == \"BR\")\n                dom.className = \"ProseMirror-trailingBreak\";\n            let hack = new BufferHackViewDesc(this.top, [], dom, null);\n            if (parent != this.top)\n                parent.children.push(hack);\n            else\n                parent.children.splice(this.index++, 0, hack);\n            this.changed = true;\n        }\n    }\n    isLocked(node) {\n        return this.lock && (node == this.lock || isElt(node) && node.contains(this.lock.parentNode));\n    }\n}\n// Iterate from the end of the fragment and array of descs to find\n// directly matching ones, in order to avoid overeagerly reusing those\n// for other nodes.\nfunction preMatch(frag, parentDesc) {\n    let curDesc = parentDesc, descI = curDesc.children.length;\n    let fI = frag.childCount, matched = new Map, matches = [];\n    outer: while (fI > 0) {\n        let desc;\n        for (;;) {\n            if (descI) {\n                let next = curDesc.children[descI - 1];\n                if (next instanceof MarkViewDesc) {\n                    curDesc = next;\n                    descI = next.children.length;\n                }\n                else {\n                    desc = next;\n                    descI--;\n                    break;\n                }\n            }\n            else if (curDesc == parentDesc) {\n                break outer;\n            }\n            else {\n                descI = curDesc.parent.children.indexOf(curDesc);\n                curDesc = curDesc.parent;\n            }\n        }\n        let node = desc.node;\n        if (!node)\n            continue;\n        if (node != frag.child(fI - 1))\n            break;\n        --fI;\n        matched.set(desc, fI);\n        matches.push(desc);\n    }\n    return { index: fI, matched, matches: matches.reverse() };\n}\nfunction compareSide(a, b) {\n    return a.type.side - b.type.side;\n}\n// This function abstracts iterating over the nodes and decorations in\n// a fragment. Calls `onNode` for each node, with its local and child\n// decorations. Splits text nodes when there is a decoration starting\n// or ending inside of them. Calls `onWidget` for each widget.\nfunction iterDeco(parent, deco, onWidget, onNode) {\n    let locals = deco.locals(parent), offset = 0;\n    // Simple, cheap variant for when there are no local decorations\n    if (locals.length == 0) {\n        for (let i = 0; i < parent.childCount; i++) {\n            let child = parent.child(i);\n            onNode(child, locals, deco.forChild(offset, child), i);\n            offset += child.nodeSize;\n        }\n        return;\n    }\n    let decoIndex = 0, active = [], restNode = null;\n    for (let parentIndex = 0;;) {\n        let widget, widgets;\n        while (decoIndex < locals.length && locals[decoIndex].to == offset) {\n            let next = locals[decoIndex++];\n            if (next.widget) {\n                if (!widget)\n                    widget = next;\n                else\n                    (widgets || (widgets = [widget])).push(next);\n            }\n        }\n        if (widget) {\n            if (widgets) {\n                widgets.sort(compareSide);\n                for (let i = 0; i < widgets.length; i++)\n                    onWidget(widgets[i], parentIndex, !!restNode);\n            }\n            else {\n                onWidget(widget, parentIndex, !!restNode);\n            }\n        }\n        let child, index;\n        if (restNode) {\n            index = -1;\n            child = restNode;\n            restNode = null;\n        }\n        else if (parentIndex < parent.childCount) {\n            index = parentIndex;\n            child = parent.child(parentIndex++);\n        }\n        else {\n            break;\n        }\n        for (let i = 0; i < active.length; i++)\n            if (active[i].to <= offset)\n                active.splice(i--, 1);\n        while (decoIndex < locals.length && locals[decoIndex].from <= offset && locals[decoIndex].to > offset)\n            active.push(locals[decoIndex++]);\n        let end = offset + child.nodeSize;\n        if (child.isText) {\n            let cutAt = end;\n            if (decoIndex < locals.length && locals[decoIndex].from < cutAt)\n                cutAt = locals[decoIndex].from;\n            for (let i = 0; i < active.length; i++)\n                if (active[i].to < cutAt)\n                    cutAt = active[i].to;\n            if (cutAt < end) {\n                restNode = child.cut(cutAt - offset);\n                child = child.cut(0, cutAt - offset);\n                end = cutAt;\n                index = -1;\n            }\n        }\n        else {\n            while (decoIndex < locals.length && locals[decoIndex].to < end)\n                decoIndex++;\n        }\n        let outerDeco = child.isInline && !child.isLeaf ? active.filter(d => !d.inline) : active.slice();\n        onNode(child, outerDeco, deco.forChild(offset, child), index);\n        offset = end;\n    }\n}\n// List markers in Mobile Safari will mysteriously disappear\n// sometimes. This works around that.\nfunction iosHacks(dom) {\n    if (dom.nodeName == \"UL\" || dom.nodeName == \"OL\") {\n        let oldCSS = dom.style.cssText;\n        dom.style.cssText = oldCSS + \"; list-style: square !important\";\n        window.getComputedStyle(dom).listStyle;\n        dom.style.cssText = oldCSS;\n    }\n}\n// Find a piece of text in an inline fragment, overlapping from-to\nfunction findTextInFragment(frag, text, from, to) {\n    for (let i = 0, pos = 0; i < frag.childCount && pos <= to;) {\n        let child = frag.child(i++), childStart = pos;\n        pos += child.nodeSize;\n        if (!child.isText)\n            continue;\n        let str = child.text;\n        while (i < frag.childCount) {\n            let next = frag.child(i++);\n            pos += next.nodeSize;\n            if (!next.isText)\n                break;\n            str += next.text;\n        }\n        if (pos >= from) {\n            if (pos >= to && str.slice(to - text.length - childStart, to - childStart) == text)\n                return to - text.length;\n            let found = childStart < to ? str.lastIndexOf(text, to - childStart - 1) : -1;\n            if (found >= 0 && found + text.length + childStart >= from)\n                return childStart + found;\n            if (from == to && str.length >= (to + text.length) - childStart &&\n                str.slice(to - childStart, to - childStart + text.length) == text)\n                return to;\n        }\n    }\n    return -1;\n}\n// Replace range from-to in an array of view descs with replacement\n// (may be null to just delete). This goes very much against the grain\n// of the rest of this code, which tends to create nodes with the\n// right shape in one go, rather than messing with them after\n// creation, but is necessary in the composition hack.\nfunction replaceNodes(nodes, from, to, view, replacement) {\n    let result = [];\n    for (let i = 0, off = 0; i < nodes.length; i++) {\n        let child = nodes[i], start = off, end = off += child.size;\n        if (start >= to || end <= from) {\n            result.push(child);\n        }\n        else {\n            if (start < from)\n                result.push(child.slice(0, from - start, view));\n            if (replacement) {\n                result.push(replacement);\n                replacement = undefined;\n            }\n            if (end > to)\n                result.push(child.slice(to - start, child.size, view));\n        }\n    }\n    return result;\n}\n\nfunction selectionFromDOM(view, origin = null) {\n    let domSel = view.domSelectionRange(), doc = view.state.doc;\n    if (!domSel.focusNode)\n        return null;\n    let nearestDesc = view.docView.nearestDesc(domSel.focusNode), inWidget = nearestDesc && nearestDesc.size == 0;\n    let head = view.docView.posFromDOM(domSel.focusNode, domSel.focusOffset, 1);\n    if (head < 0)\n        return null;\n    let $head = doc.resolve(head), anchor, selection;\n    if (selectionCollapsed(domSel)) {\n        anchor = head;\n        while (nearestDesc && !nearestDesc.node)\n            nearestDesc = nearestDesc.parent;\n        if (nearestDesc && nearestDesc.node.isAtom && NodeSelection.isSelectable(nearestDesc.node) &&\n            nearestDesc.parent &&\n            !(nearestDesc.node.isInline && isOnEdge(domSel.focusNode, domSel.focusOffset, nearestDesc.dom))) {\n            let pos = nearestDesc.posBefore;\n            selection = new NodeSelection(head == pos ? $head : doc.resolve(pos));\n        }\n        else if (gecko && origin == \"key\" && head > view.state.selection.to &&\n            isElt(domSel.focusNode) && domSel.focusOffset == domSel.focusNode.childNodes.length &&\n            nearestDesc && nearestDesc.posAtStart > view.state.selection.to) {\n            // Firefox will jump across scrollable wrapper nodes on keyboard\n            // cursor motion (#1594). This tries to detect this situation\n            // and work around it.\n            for (let scan = domSel.focusNode;; scan = scan.parentNode) {\n                if (getComputedStyle(scan).overflow != \"visible\") {\n                    selection = Selection.findFrom(doc.resolve(nearestDesc.posAtStart), 1);\n                    break;\n                }\n                if (scan == nearestDesc.dom || scan.nextSibling || !scan.parentNode || !isElt(scan.parentNode))\n                    break;\n            }\n        }\n    }\n    else {\n        if (domSel instanceof view.dom.ownerDocument.defaultView.Selection && domSel.rangeCount > 1) {\n            let min = head, max = head;\n            for (let i = 0; i < domSel.rangeCount; i++) {\n                let range = domSel.getRangeAt(i);\n                min = Math.min(min, view.docView.posFromDOM(range.startContainer, range.startOffset, 1));\n                max = Math.max(max, view.docView.posFromDOM(range.endContainer, range.endOffset, -1));\n            }\n            if (min < 0)\n                return null;\n            [anchor, head] = max == view.state.selection.anchor ? [max, min] : [min, max];\n            $head = doc.resolve(head);\n        }\n        else {\n            anchor = view.docView.posFromDOM(domSel.anchorNode, domSel.anchorOffset, 1);\n        }\n        if (anchor < 0)\n            return null;\n    }\n    let $anchor = doc.resolve(anchor);\n    if (!selection) {\n        let bias = origin == \"pointer\" || (view.state.selection.head < $head.pos && !inWidget) ? 1 : -1;\n        selection = selectionBetween(view, $anchor, $head, bias);\n    }\n    return selection;\n}\nfunction editorOwnsSelection(view) {\n    return view.editable ? view.hasFocus() :\n        hasSelection(view) && document.activeElement && document.activeElement.contains(view.dom);\n}\nfunction selectionToDOM(view, force = false) {\n    let sel = view.state.selection;\n    syncNodeSelection(view, sel);\n    if (!editorOwnsSelection(view))\n        return;\n    // Need to delay selection normalization during a native selection\n    // drag on Chrome, or it will cause further dragging to glitch.\n    let mouseDown = view.input.mouseDown;\n    if (!force && chrome && mouseDown) {\n        let domSel = view.domSelectionRange(), curSel = view.domObserver.currentSelection;\n        if (domSel.anchorNode && curSel.anchorNode &&\n            isEquivalentPosition(domSel.anchorNode, domSel.anchorOffset, curSel.anchorNode, curSel.anchorOffset) &&\n            mouseDown.delaySelUpdate()) {\n            view.domObserver.setCurSelection();\n            return;\n        }\n    }\n    view.domObserver.disconnectSelection();\n    if (view.cursorWrapper) {\n        selectCursorWrapper(view);\n    }\n    else {\n        let { anchor, head } = sel, resetEditableFrom, resetEditableTo;\n        if (brokenSelectBetweenUneditable && !(sel instanceof TextSelection)) {\n            if (!sel.$from.parent.inlineContent)\n                resetEditableFrom = temporarilyEditableNear(view, sel.from);\n            if (!sel.empty && !sel.$from.parent.inlineContent)\n                resetEditableTo = temporarilyEditableNear(view, sel.to);\n        }\n        view.docView.setSelection(anchor, head, view, force);\n        if (brokenSelectBetweenUneditable) {\n            if (resetEditableFrom)\n                resetEditable(resetEditableFrom);\n            if (resetEditableTo)\n                resetEditable(resetEditableTo);\n        }\n        if (sel.visible) {\n            view.dom.classList.remove(\"ProseMirror-hideselection\");\n        }\n        else {\n            view.dom.classList.add(\"ProseMirror-hideselection\");\n            if (\"onselectionchange\" in document)\n                removeClassOnSelectionChange(view);\n        }\n    }\n    view.domObserver.setCurSelection();\n    view.domObserver.connectSelection();\n}\n// Kludge to work around Webkit not allowing a selection to start/end\n// between non-editable block nodes. We briefly make something\n// editable, set the selection, then set it uneditable again.\nconst brokenSelectBetweenUneditable = safari || chrome && chrome_version < 63;\nfunction temporarilyEditableNear(view, pos) {\n    let { node, offset } = view.docView.domFromPos(pos, 0);\n    let after = offset < node.childNodes.length ? node.childNodes[offset] : null;\n    let before = offset ? node.childNodes[offset - 1] : null;\n    if (safari && after && after.contentEditable == \"false\")\n        return setEditable(after);\n    if ((!after || after.contentEditable == \"false\") &&\n        (!before || before.contentEditable == \"false\")) {\n        if (after)\n            return setEditable(after);\n        else if (before)\n            return setEditable(before);\n    }\n}\nfunction setEditable(element) {\n    element.contentEditable = \"true\";\n    if (safari && element.draggable) {\n        element.draggable = false;\n        element.wasDraggable = true;\n    }\n    return element;\n}\nfunction resetEditable(element) {\n    element.contentEditable = \"false\";\n    if (element.wasDraggable) {\n        element.draggable = true;\n        element.wasDraggable = null;\n    }\n}\nfunction removeClassOnSelectionChange(view) {\n    let doc = view.dom.ownerDocument;\n    doc.removeEventListener(\"selectionchange\", view.input.hideSelectionGuard);\n    let domSel = view.domSelectionRange();\n    let node = domSel.anchorNode, offset = domSel.anchorOffset;\n    doc.addEventListener(\"selectionchange\", view.input.hideSelectionGuard = () => {\n        if (domSel.anchorNode != node || domSel.anchorOffset != offset) {\n            doc.removeEventListener(\"selectionchange\", view.input.hideSelectionGuard);\n            setTimeout(() => {\n                if (!editorOwnsSelection(view) || view.state.selection.visible)\n                    view.dom.classList.remove(\"ProseMirror-hideselection\");\n            }, 20);\n        }\n    });\n}\nfunction selectCursorWrapper(view) {\n    let domSel = view.domSelection();\n    if (!domSel)\n        return;\n    let node = view.cursorWrapper.dom, img = node.nodeName == \"IMG\";\n    if (img)\n        domSel.collapse(node.parentNode, domIndex(node) + 1);\n    else\n        domSel.collapse(node, 0);\n    // Kludge to kill 'control selection' in IE11 when selecting an\n    // invisible cursor wrapper, since that would result in those weird\n    // resize handles and a selection that considers the absolutely\n    // positioned wrapper, rather than the root editable node, the\n    // focused element.\n    if (!img && !view.state.selection.visible && ie && ie_version <= 11) {\n        node.disabled = true;\n        node.disabled = false;\n    }\n}\nfunction syncNodeSelection(view, sel) {\n    if (sel instanceof NodeSelection) {\n        let desc = view.docView.descAt(sel.from);\n        if (desc != view.lastSelectedViewDesc) {\n            clearNodeSelection(view);\n            if (desc)\n                desc.selectNode();\n            view.lastSelectedViewDesc = desc;\n        }\n    }\n    else {\n        clearNodeSelection(view);\n    }\n}\n// Clear all DOM statefulness of the last node selection.\nfunction clearNodeSelection(view) {\n    if (view.lastSelectedViewDesc) {\n        if (view.lastSelectedViewDesc.parent)\n            view.lastSelectedViewDesc.deselectNode();\n        view.lastSelectedViewDesc = undefined;\n    }\n}\nfunction selectionBetween(view, $anchor, $head, bias) {\n    return view.someProp(\"createSelectionBetween\", f => f(view, $anchor, $head))\n        || TextSelection.between($anchor, $head, bias);\n}\nfunction hasFocusAndSelection(view) {\n    if (view.editable && !view.hasFocus())\n        return false;\n    return hasSelection(view);\n}\nfunction hasSelection(view) {\n    let sel = view.domSelectionRange();\n    if (!sel.anchorNode)\n        return false;\n    try {\n        // Firefox will raise 'permission denied' errors when accessing\n        // properties of `sel.anchorNode` when it's in a generated CSS\n        // element.\n        return contains(view.dom, sel.anchorNode) && (view.editable || contains(view.dom, sel.focusNode));\n    }\n    catch (_) {\n        return false;\n    }\n}\nfunction anchorInRightPlace(view) {\n    let anchorDOM = view.docView.domFromPos(view.state.selection.anchor, 0);\n    let domSel = view.domSelectionRange();\n    return isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset);\n}\n\nfunction moveSelectionBlock(state, dir) {\n    let { $anchor, $head } = state.selection;\n    let $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);\n    let $start = !$side.parent.inlineContent ? $side : $side.depth ? state.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;\n    return $start && Selection.findFrom($start, dir);\n}\nfunction apply(view, sel) {\n    view.dispatch(view.state.tr.setSelection(sel).scrollIntoView());\n    return true;\n}\nfunction selectHorizontally(view, dir, mods) {\n    let sel = view.state.selection;\n    if (sel instanceof TextSelection) {\n        if (mods.indexOf(\"s\") > -1) {\n            let { $head } = sel, node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter;\n            if (!node || node.isText || !node.isLeaf)\n                return false;\n            let $newHead = view.state.doc.resolve($head.pos + node.nodeSize * (dir < 0 ? -1 : 1));\n            return apply(view, new TextSelection(sel.$anchor, $newHead));\n        }\n        else if (!sel.empty) {\n            return false;\n        }\n        else if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\")) {\n            let next = moveSelectionBlock(view.state, dir);\n            if (next && (next instanceof NodeSelection))\n                return apply(view, next);\n            return false;\n        }\n        else if (!(mac && mods.indexOf(\"m\") > -1)) {\n            let $head = sel.$head, node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter, desc;\n            if (!node || node.isText)\n                return false;\n            let nodePos = dir < 0 ? $head.pos - node.nodeSize : $head.pos;\n            if (!(node.isAtom || (desc = view.docView.descAt(nodePos)) && !desc.contentDOM))\n                return false;\n            if (NodeSelection.isSelectable(node)) {\n                return apply(view, new NodeSelection(dir < 0 ? view.state.doc.resolve($head.pos - node.nodeSize) : $head));\n            }\n            else {\n                // Chrome and Safari will introduce extra pointless cursor\n                // positions around inline uneditable nodes (#937), and\n                // Firefox will sometimes just plain refuse to move across\n                // them (#1592), so in this situation we move the cursor\n                // ourselves.\n                return apply(view, new TextSelection(view.state.doc.resolve(dir < 0 ? nodePos : nodePos + node.nodeSize)));\n            }\n        }\n    }\n    else if (sel instanceof NodeSelection && sel.node.isInline) {\n        return apply(view, new TextSelection(dir > 0 ? sel.$to : sel.$from));\n    }\n    else {\n        let next = moveSelectionBlock(view.state, dir);\n        if (next)\n            return apply(view, next);\n        return false;\n    }\n}\nfunction isIgnorable(dom, dir) {\n    let desc = dom.pmViewDesc;\n    return desc ? desc.size == 0 && (dir < 0 || dom.nextSibling || dom.nodeName != \"BR\")\n        : isElt(dom) && dom.contentEditable == \"false\";\n}\nfunction skipIgnoredNodes(view, dir) {\n    return dir < 0 ? skipIgnoredNodesBefore(view) : skipIgnoredNodesAfter(view);\n}\n// Make sure the cursor isn't directly after one or more ignored\n// nodes, which will confuse the browser's cursor motion logic.\nfunction skipIgnoredNodesBefore(view) {\n    let sel = view.domSelectionRange();\n    let node = sel.focusNode, offset = sel.focusOffset;\n    if (!node)\n        return;\n    let moveNode, moveOffset, force = false;\n    // Gecko will do odd things when the selection is directly in front\n    // of a non-editable node, so in that case, move it into the next\n    // node if possible. Issue prosemirror/prosemirror#832.\n    if (gecko && isElt(node) && offset < nodeSize(node) && isIgnorable(node.childNodes[offset], -1))\n        force = true;\n    for (;;) {\n        if (offset > 0) {\n            if (!isElt(node))\n                break;\n            let before = node.childNodes[offset - 1];\n            if (isIgnorable(before, -1)) {\n                moveNode = node;\n                moveOffset = --offset;\n            }\n            else if (isText(before)) {\n                node = before;\n                offset = node.nodeValue.length;\n            }\n            else {\n                break;\n            }\n        }\n        else if (isBlockNode(node)) {\n            break;\n        }\n        else {\n            let prev = node.previousSibling;\n            while (prev && isIgnorable(prev, -1)) {\n                moveNode = node.parentNode;\n                moveOffset = domIndex(prev);\n                prev = prev.previousSibling;\n            }\n            if (!prev) {\n                node = node.parentNode;\n                if (node == view.dom)\n                    break;\n                offset = 0;\n            }\n            else {\n                node = prev;\n                offset = nodeSize(node);\n            }\n        }\n    }\n    if (force)\n        setSelFocus(view, node, offset);\n    else if (moveNode)\n        setSelFocus(view, moveNode, moveOffset);\n}\n// Make sure the cursor isn't directly before one or more ignored\n// nodes.\nfunction skipIgnoredNodesAfter(view) {\n    let sel = view.domSelectionRange();\n    let node = sel.focusNode, offset = sel.focusOffset;\n    if (!node)\n        return;\n    let len = nodeSize(node);\n    let moveNode, moveOffset;\n    for (;;) {\n        if (offset < len) {\n            if (!isElt(node))\n                break;\n            let after = node.childNodes[offset];\n            if (isIgnorable(after, 1)) {\n                moveNode = node;\n                moveOffset = ++offset;\n            }\n            else {\n                break;\n            }\n        }\n        else if (isBlockNode(node)) {\n            break;\n        }\n        else {\n            let next = node.nextSibling;\n            while (next && isIgnorable(next, 1)) {\n                moveNode = next.parentNode;\n                moveOffset = domIndex(next) + 1;\n                next = next.nextSibling;\n            }\n            if (!next) {\n                node = node.parentNode;\n                if (node == view.dom)\n                    break;\n                offset = len = 0;\n            }\n            else {\n                node = next;\n                offset = 0;\n                len = nodeSize(node);\n            }\n        }\n    }\n    if (moveNode)\n        setSelFocus(view, moveNode, moveOffset);\n}\nfunction isBlockNode(dom) {\n    let desc = dom.pmViewDesc;\n    return desc && desc.node && desc.node.isBlock;\n}\nfunction textNodeAfter(node, offset) {\n    while (node && offset == node.childNodes.length && !hasBlockDesc(node)) {\n        offset = domIndex(node) + 1;\n        node = node.parentNode;\n    }\n    while (node && offset < node.childNodes.length) {\n        let next = node.childNodes[offset];\n        if (isText(next))\n            return next;\n        if (isElt(next) && next.contentEditable == \"false\")\n            break;\n        node = next;\n        offset = 0;\n    }\n}\nfunction textNodeBefore(node, offset) {\n    while (node && !offset && !hasBlockDesc(node)) {\n        offset = domIndex(node);\n        node = node.parentNode;\n    }\n    while (node && offset) {\n        let next = node.childNodes[offset - 1];\n        if (isText(next))\n            return next;\n        if (isElt(next) && next.contentEditable == \"false\")\n            break;\n        node = next;\n        offset = node.childNodes.length;\n    }\n}\nfunction setSelFocus(view, node, offset) {\n    if (!isText(node)) {\n        let before, after;\n        if (after = textNodeAfter(node, offset)) {\n            node = after;\n            offset = 0;\n        }\n        else if (before = textNodeBefore(node, offset)) {\n            node = before;\n            offset = before.nodeValue.length;\n        }\n    }\n    let sel = view.domSelection();\n    if (!sel)\n        return;\n    if (selectionCollapsed(sel)) {\n        let range = document.createRange();\n        range.setEnd(node, offset);\n        range.setStart(node, offset);\n        sel.removeAllRanges();\n        sel.addRange(range);\n    }\n    else if (sel.extend) {\n        sel.extend(node, offset);\n    }\n    view.domObserver.setCurSelection();\n    let { state } = view;\n    // If no state update ends up happening, reset the selection.\n    setTimeout(() => {\n        if (view.state == state)\n            selectionToDOM(view);\n    }, 50);\n}\nfunction findDirection(view, pos) {\n    let $pos = view.state.doc.resolve(pos);\n    if (!(chrome || windows) && $pos.parent.inlineContent) {\n        let coords = view.coordsAtPos(pos);\n        if (pos > $pos.start()) {\n            let before = view.coordsAtPos(pos - 1);\n            let mid = (before.top + before.bottom) / 2;\n            if (mid > coords.top && mid < coords.bottom && Math.abs(before.left - coords.left) > 1)\n                return before.left < coords.left ? \"ltr\" : \"rtl\";\n        }\n        if (pos < $pos.end()) {\n            let after = view.coordsAtPos(pos + 1);\n            let mid = (after.top + after.bottom) / 2;\n            if (mid > coords.top && mid < coords.bottom && Math.abs(after.left - coords.left) > 1)\n                return after.left > coords.left ? \"ltr\" : \"rtl\";\n        }\n    }\n    let computed = getComputedStyle(view.dom).direction;\n    return computed == \"rtl\" ? \"rtl\" : \"ltr\";\n}\n// Check whether vertical selection motion would involve node\n// selections. If so, apply it (if not, the result is left to the\n// browser)\nfunction selectVertically(view, dir, mods) {\n    let sel = view.state.selection;\n    if (sel instanceof TextSelection && !sel.empty || mods.indexOf(\"s\") > -1)\n        return false;\n    if (mac && mods.indexOf(\"m\") > -1)\n        return false;\n    let { $from, $to } = sel;\n    if (!$from.parent.inlineContent || view.endOfTextblock(dir < 0 ? \"up\" : \"down\")) {\n        let next = moveSelectionBlock(view.state, dir);\n        if (next && (next instanceof NodeSelection))\n            return apply(view, next);\n    }\n    if (!$from.parent.inlineContent) {\n        let side = dir < 0 ? $from : $to;\n        let beyond = sel instanceof AllSelection ? Selection.near(side, dir) : Selection.findFrom(side, dir);\n        return beyond ? apply(view, beyond) : false;\n    }\n    return false;\n}\nfunction stopNativeHorizontalDelete(view, dir) {\n    if (!(view.state.selection instanceof TextSelection))\n        return true;\n    let { $head, $anchor, empty } = view.state.selection;\n    if (!$head.sameParent($anchor))\n        return true;\n    if (!empty)\n        return false;\n    if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\"))\n        return true;\n    let nextNode = !$head.textOffset && (dir < 0 ? $head.nodeBefore : $head.nodeAfter);\n    if (nextNode && !nextNode.isText) {\n        let tr = view.state.tr;\n        if (dir < 0)\n            tr.delete($head.pos - nextNode.nodeSize, $head.pos);\n        else\n            tr.delete($head.pos, $head.pos + nextNode.nodeSize);\n        view.dispatch(tr);\n        return true;\n    }\n    return false;\n}\nfunction switchEditable(view, node, state) {\n    view.domObserver.stop();\n    node.contentEditable = state;\n    view.domObserver.start();\n}\n// Issue #867 / #1090 / https://bugs.chromium.org/p/chromium/issues/detail?id=903821\n// In which Safari (and at some point in the past, Chrome) does really\n// wrong things when the down arrow is pressed when the cursor is\n// directly at the start of a textblock and has an uneditable node\n// after it\nfunction safariDownArrowBug(view) {\n    if (!safari || view.state.selection.$head.parentOffset > 0)\n        return false;\n    let { focusNode, focusOffset } = view.domSelectionRange();\n    if (focusNode && isElt(focusNode) && focusOffset == 0 &&\n        focusNode.firstChild && isElt(focusNode.firstChild) && focusNode.firstChild.contentEditable == \"false\") {\n        let child = focusNode.firstChild;\n        switchEditable(view, child, \"true\");\n        setTimeout(() => switchEditable(view, child, \"false\"), 20);\n    }\n    return false;\n}\n// A backdrop key mapping used to make sure we always suppress keys\n// that have a dangerous default effect, even if the commands they are\n// bound to return false, and to make sure that cursor-motion keys\n// find a cursor (as opposed to a node selection) when pressed. For\n// cursor-motion keys, the code in the handlers also takes care of\n// block selections.\nfunction getMods(event) {\n    let result = \"\";\n    if (event.ctrlKey)\n        result += \"c\";\n    if (event.metaKey)\n        result += \"m\";\n    if (event.altKey)\n        result += \"a\";\n    if (event.shiftKey)\n        result += \"s\";\n    return result;\n}\nfunction captureKeyDown(view, event) {\n    let code = event.keyCode, mods = getMods(event);\n    if (code == 8 || (mac && code == 72 && mods == \"c\")) { // Backspace, Ctrl-h on Mac\n        return stopNativeHorizontalDelete(view, -1) || skipIgnoredNodes(view, -1);\n    }\n    else if ((code == 46 && !event.shiftKey) || (mac && code == 68 && mods == \"c\")) { // Delete, Ctrl-d on Mac\n        return stopNativeHorizontalDelete(view, 1) || skipIgnoredNodes(view, 1);\n    }\n    else if (code == 13 || code == 27) { // Enter, Esc\n        return true;\n    }\n    else if (code == 37 || (mac && code == 66 && mods == \"c\")) { // Left arrow, Ctrl-b on Mac\n        let dir = code == 37 ? (findDirection(view, view.state.selection.from) == \"ltr\" ? -1 : 1) : -1;\n        return selectHorizontally(view, dir, mods) || skipIgnoredNodes(view, dir);\n    }\n    else if (code == 39 || (mac && code == 70 && mods == \"c\")) { // Right arrow, Ctrl-f on Mac\n        let dir = code == 39 ? (findDirection(view, view.state.selection.from) == \"ltr\" ? 1 : -1) : 1;\n        return selectHorizontally(view, dir, mods) || skipIgnoredNodes(view, dir);\n    }\n    else if (code == 38 || (mac && code == 80 && mods == \"c\")) { // Up arrow, Ctrl-p on Mac\n        return selectVertically(view, -1, mods) || skipIgnoredNodes(view, -1);\n    }\n    else if (code == 40 || (mac && code == 78 && mods == \"c\")) { // Down arrow, Ctrl-n on Mac\n        return safariDownArrowBug(view) || selectVertically(view, 1, mods) || skipIgnoredNodes(view, 1);\n    }\n    else if (mods == (mac ? \"m\" : \"c\") &&\n        (code == 66 || code == 73 || code == 89 || code == 90)) { // Mod-[biyz]\n        return true;\n    }\n    return false;\n}\n\nfunction serializeForClipboard(view, slice) {\n    view.someProp(\"transformCopied\", f => { slice = f(slice, view); });\n    let context = [], { content, openStart, openEnd } = slice;\n    while (openStart > 1 && openEnd > 1 && content.childCount == 1 && content.firstChild.childCount == 1) {\n        openStart--;\n        openEnd--;\n        let node = content.firstChild;\n        context.push(node.type.name, node.attrs != node.type.defaultAttrs ? node.attrs : null);\n        content = node.content;\n    }\n    let serializer = view.someProp(\"clipboardSerializer\") || DOMSerializer.fromSchema(view.state.schema);\n    let doc = detachedDoc(), wrap = doc.createElement(\"div\");\n    wrap.appendChild(serializer.serializeFragment(content, { document: doc }));\n    let firstChild = wrap.firstChild, needsWrap, wrappers = 0;\n    while (firstChild && isElt(firstChild) && (needsWrap = wrapMap[firstChild.nodeName.toLowerCase()])) {\n        for (let i = needsWrap.length - 1; i >= 0; i--) {\n            let wrapper = doc.createElement(needsWrap[i]);\n            while (wrap.firstChild)\n                wrapper.appendChild(wrap.firstChild);\n            wrap.appendChild(wrapper);\n            wrappers++;\n        }\n        firstChild = wrap.firstChild;\n    }\n    if (firstChild && isElt(firstChild))\n        firstChild.setAttribute(\"data-pm-slice\", `${openStart} ${openEnd}${wrappers ? ` -${wrappers}` : \"\"} ${JSON.stringify(context)}`);\n    let text = view.someProp(\"clipboardTextSerializer\", f => f(slice, view)) ||\n        slice.content.textBetween(0, slice.content.size, \"\\n\\n\");\n    return { dom: wrap, text, slice };\n}\n// Read a slice of content from the clipboard (or drop data).\nfunction parseFromClipboard(view, text, html, plainText, $context) {\n    let inCode = $context.parent.type.spec.code;\n    let dom, slice;\n    if (!html && !text)\n        return null;\n    let asText = !!text && (plainText || inCode || !html);\n    if (asText) {\n        view.someProp(\"transformPastedText\", f => { text = f(text, inCode || plainText, view); });\n        if (inCode) {\n            slice = new Slice(Fragment.from(view.state.schema.text(text.replace(/\\r\\n?/g, \"\\n\"))), 0, 0);\n            view.someProp(\"transformPasted\", f => { slice = f(slice, view, true); });\n            return slice;\n        }\n        let parsed = view.someProp(\"clipboardTextParser\", f => f(text, $context, plainText, view));\n        if (parsed) {\n            slice = parsed;\n        }\n        else {\n            let marks = $context.marks();\n            let { schema } = view.state, serializer = DOMSerializer.fromSchema(schema);\n            dom = document.createElement(\"div\");\n            text.split(/(?:\\r\\n?|\\n)+/).forEach(block => {\n                let p = dom.appendChild(document.createElement(\"p\"));\n                if (block)\n                    p.appendChild(serializer.serializeNode(schema.text(block, marks)));\n            });\n        }\n    }\n    else {\n        view.someProp(\"transformPastedHTML\", f => { html = f(html, view); });\n        dom = readHTML(html);\n        if (webkit)\n            restoreReplacedSpaces(dom);\n    }\n    let contextNode = dom && dom.querySelector(\"[data-pm-slice]\");\n    let sliceData = contextNode && /^(\\d+) (\\d+)(?: -(\\d+))? (.*)/.exec(contextNode.getAttribute(\"data-pm-slice\") || \"\");\n    if (sliceData && sliceData[3])\n        for (let i = +sliceData[3]; i > 0; i--) {\n            let child = dom.firstChild;\n            while (child && !isElt(child))\n                child = child.nextSibling;\n            if (!child)\n                break;\n            dom = child;\n        }\n    if (!slice) {\n        let parser = view.someProp(\"clipboardParser\") || view.someProp(\"domParser\") || DOMParser.fromSchema(view.state.schema);\n        slice = parser.parseSlice(dom, {\n            preserveWhitespace: !!(asText || sliceData),\n            context: $context,\n            ruleFromNode(dom) {\n                if (dom.nodeName == \"BR\" && !dom.nextSibling &&\n                    dom.parentNode && !inlineParents.test(dom.parentNode.nodeName))\n                    return { ignore: true };\n                return null;\n            }\n        });\n    }\n    if (sliceData) {\n        slice = addContext(closeSlice(slice, +sliceData[1], +sliceData[2]), sliceData[4]);\n    }\n    else { // HTML wasn't created by ProseMirror. Make sure top-level siblings are coherent\n        slice = Slice.maxOpen(normalizeSiblings(slice.content, $context), true);\n        if (slice.openStart || slice.openEnd) {\n            let openStart = 0, openEnd = 0;\n            for (let node = slice.content.firstChild; openStart < slice.openStart && !node.type.spec.isolating; openStart++, node = node.firstChild) { }\n            for (let node = slice.content.lastChild; openEnd < slice.openEnd && !node.type.spec.isolating; openEnd++, node = node.lastChild) { }\n            slice = closeSlice(slice, openStart, openEnd);\n        }\n    }\n    view.someProp(\"transformPasted\", f => { slice = f(slice, view, asText); });\n    return slice;\n}\nconst inlineParents = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;\n// Takes a slice parsed with parseSlice, which means there hasn't been\n// any content-expression checking done on the top nodes, tries to\n// find a parent node in the current context that might fit the nodes,\n// and if successful, rebuilds the slice so that it fits into that parent.\n//\n// This addresses the problem that Transform.replace expects a\n// coherent slice, and will fail to place a set of siblings that don't\n// fit anywhere in the schema.\nfunction normalizeSiblings(fragment, $context) {\n    if (fragment.childCount < 2)\n        return fragment;\n    for (let d = $context.depth; d >= 0; d--) {\n        let parent = $context.node(d);\n        let match = parent.contentMatchAt($context.index(d));\n        let lastWrap, result = [];\n        fragment.forEach(node => {\n            if (!result)\n                return;\n            let wrap = match.findWrapping(node.type), inLast;\n            if (!wrap)\n                return result = null;\n            if (inLast = result.length && lastWrap.length && addToSibling(wrap, lastWrap, node, result[result.length - 1], 0)) {\n                result[result.length - 1] = inLast;\n            }\n            else {\n                if (result.length)\n                    result[result.length - 1] = closeRight(result[result.length - 1], lastWrap.length);\n                let wrapped = withWrappers(node, wrap);\n                result.push(wrapped);\n                match = match.matchType(wrapped.type);\n                lastWrap = wrap;\n            }\n        });\n        if (result)\n            return Fragment.from(result);\n    }\n    return fragment;\n}\nfunction withWrappers(node, wrap, from = 0) {\n    for (let i = wrap.length - 1; i >= from; i--)\n        node = wrap[i].create(null, Fragment.from(node));\n    return node;\n}\n// Used to group adjacent nodes wrapped in similar parents by\n// normalizeSiblings into the same parent node\nfunction addToSibling(wrap, lastWrap, node, sibling, depth) {\n    if (depth < wrap.length && depth < lastWrap.length && wrap[depth] == lastWrap[depth]) {\n        let inner = addToSibling(wrap, lastWrap, node, sibling.lastChild, depth + 1);\n        if (inner)\n            return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));\n        let match = sibling.contentMatchAt(sibling.childCount);\n        if (match.matchType(depth == wrap.length - 1 ? node.type : wrap[depth + 1]))\n            return sibling.copy(sibling.content.append(Fragment.from(withWrappers(node, wrap, depth + 1))));\n    }\n}\nfunction closeRight(node, depth) {\n    if (depth == 0)\n        return node;\n    let fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));\n    let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment.empty, true);\n    return node.copy(fragment.append(fill));\n}\nfunction closeRange(fragment, side, from, to, depth, openEnd) {\n    let node = side < 0 ? fragment.firstChild : fragment.lastChild, inner = node.content;\n    if (fragment.childCount > 1)\n        openEnd = 0;\n    if (depth < to - 1)\n        inner = closeRange(inner, side, from, to, depth + 1, openEnd);\n    if (depth >= from)\n        inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner)\n            : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment.empty, true));\n    return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));\n}\nfunction closeSlice(slice, openStart, openEnd) {\n    if (openStart < slice.openStart)\n        slice = new Slice(closeRange(slice.content, -1, openStart, slice.openStart, 0, slice.openEnd), openStart, slice.openEnd);\n    if (openEnd < slice.openEnd)\n        slice = new Slice(closeRange(slice.content, 1, openEnd, slice.openEnd, 0, 0), slice.openStart, openEnd);\n    return slice;\n}\n// Trick from jQuery -- some elements must be wrapped in other\n// elements for innerHTML to work. I.e. if you do `div.innerHTML =\n// \"<td>..</td>\"` the table cells are ignored.\nconst wrapMap = {\n    thead: [\"table\"],\n    tbody: [\"table\"],\n    tfoot: [\"table\"],\n    caption: [\"table\"],\n    colgroup: [\"table\"],\n    col: [\"table\", \"colgroup\"],\n    tr: [\"table\", \"tbody\"],\n    td: [\"table\", \"tbody\", \"tr\"],\n    th: [\"table\", \"tbody\", \"tr\"]\n};\nfunction detachedDoc() {\n    return document.implementation.createHTMLDocument(\"title\");\n}\nlet _policy = null;\nfunction maybeWrapTrusted(html) {\n    let trustedTypes = window.trustedTypes;\n    if (!trustedTypes)\n        return html;\n    // With the require-trusted-types-for CSP, Chrome will block\n    // innerHTML, even on a detached document. This wraps the string in\n    // a way that makes the browser allow us to use its parser again.\n    if (!_policy) {\n        if (_policy = trustedTypes.defaultPolicy)\n            try {\n                return _policy.createHTML(html);\n            }\n            catch (_a) { }\n        _policy = trustedTypes.createPolicy(\"ProseMirrorClipboard\", { createHTML: (s) => s });\n    }\n    return _policy.createHTML(html);\n}\nfunction readHTML(html) {\n    let metas = /^(\\s*<meta [^>]*>)*/.exec(html);\n    if (metas)\n        html = html.slice(metas[0].length);\n    let doc = detachedDoc(), elt = doc.body;\n    let firstTag = /<([a-z][^>\\s]+)/i.exec(html), wrap;\n    if (wrap = firstTag && wrapMap[firstTag[1].toLowerCase()])\n        html = wrap.map(n => \"<\" + n + \">\").join(\"\") + html + wrap.map(n => \"</\" + n + \">\").reverse().join(\"\");\n    elt.innerHTML = maybeWrapTrusted(html);\n    if (wrap)\n        for (let i = 0; i < wrap.length; i++)\n            elt = elt.querySelector(wrap[i]) || elt;\n    // Inline styles defined in the pasted content, so that parse rules pick them up\n    for (let i = 0; i < doc.styleSheets.length; i++) {\n        let style = doc.styleSheets[i];\n        for (let j = 0; j < style.rules.length; j++) {\n            let rule = style.rules[j];\n            if (rule instanceof CSSStyleRule) {\n                let matches = elt.querySelectorAll(rule.selectorText);\n                for (let k = 0; k < matches.length; k++)\n                    matches[k].style.cssText += rule.style.cssText;\n            }\n        }\n    }\n    return elt;\n}\n// Webkit browsers do some hard-to-predict replacement of regular\n// spaces with non-breaking spaces when putting content on the\n// clipboard. This tries to convert such non-breaking spaces (which\n// will be wrapped in a plain span on Chrome, a span with class\n// Apple-converted-space on Safari) back to regular spaces.\nfunction restoreReplacedSpaces(dom) {\n    let nodes = dom.querySelectorAll(chrome ? \"span:not([class]):not([style])\" : \"span.Apple-converted-space\");\n    for (let i = 0; i < nodes.length; i++) {\n        let node = nodes[i];\n        if (node.childNodes.length == 1 && node.textContent == \"\\u00a0\" && node.parentNode)\n            node.parentNode.replaceChild(dom.ownerDocument.createTextNode(\" \"), node);\n    }\n}\nfunction addContext(slice, context) {\n    if (!slice.size)\n        return slice;\n    let schema = slice.content.firstChild.type.schema, array;\n    try {\n        array = JSON.parse(context);\n    }\n    catch (e) {\n        return slice;\n    }\n    let { content, openStart, openEnd } = slice;\n    for (let i = array.length - 2; i >= 0; i -= 2) {\n        let type = schema.nodes[array[i]];\n        if (!type || type.hasRequiredAttrs())\n            break;\n        try {\n            content = Fragment.from(type.create(array[i + 1], content));\n        }\n        catch (e) {\n            break;\n        }\n        openStart++;\n        openEnd++;\n    }\n    return new Slice(content, openStart, openEnd);\n}\n\n// A collection of DOM events that occur within the editor, and callback functions\n// to invoke when the event fires.\nconst handlers = {};\nconst editHandlers = {};\nconst passiveHandlers = { touchstart: true, touchmove: true };\nclass InputState {\n    constructor() {\n        this.shiftKey = false;\n        this.mouseDown = null;\n        this.lastKeyCode = null;\n        this.lastKeyCodeTime = 0;\n        this.lastClick = { time: 0, x: 0, y: 0, type: \"\", button: 0 };\n        this.lastSelectionOrigin = null;\n        this.lastSelectionTime = 0;\n        this.lastIOSEnter = 0;\n        this.lastIOSEnterFallbackTimeout = -1;\n        this.lastFocus = 0;\n        this.lastTouch = 0;\n        this.lastChromeDelete = 0;\n        this.composing = false;\n        this.compositionNode = null;\n        this.composingTimeout = -1;\n        this.compositionNodes = [];\n        this.compositionEndedAt = -2e8;\n        this.compositionID = 1;\n        this.badSafariComposition = false;\n        // Set to a composition ID when there are pending changes at compositionend\n        this.compositionPendingChanges = 0;\n        this.domChangeCount = 0;\n        this.eventHandlers = Object.create(null);\n        this.hideSelectionGuard = null;\n    }\n}\nfunction initInput(view) {\n    for (let event in handlers) {\n        let handler = handlers[event];\n        view.dom.addEventListener(event, view.input.eventHandlers[event] = (event) => {\n            if (eventBelongsToView(view, event) && !runCustomHandler(view, event) &&\n                (view.editable || !(event.type in editHandlers)))\n                handler(view, event);\n        }, passiveHandlers[event] ? { passive: true } : undefined);\n    }\n    // On Safari, for reasons beyond my understanding, adding an input\n    // event handler makes an issue where the composition vanishes when\n    // you press enter go away.\n    if (safari)\n        view.dom.addEventListener(\"input\", () => null);\n    ensureListeners(view);\n}\nfunction setSelectionOrigin(view, origin) {\n    view.input.lastSelectionOrigin = origin;\n    view.input.lastSelectionTime = Date.now();\n}\nfunction destroyInput(view) {\n    if (view.input.mouseDown)\n        view.input.mouseDown.done();\n    view.domObserver.stop();\n    for (let type in view.input.eventHandlers)\n        view.dom.removeEventListener(type, view.input.eventHandlers[type]);\n    clearTimeout(view.input.composingTimeout);\n    clearTimeout(view.input.lastIOSEnterFallbackTimeout);\n}\nfunction ensureListeners(view) {\n    view.someProp(\"handleDOMEvents\", currentHandlers => {\n        for (let type in currentHandlers)\n            if (!view.input.eventHandlers[type])\n                view.dom.addEventListener(type, view.input.eventHandlers[type] = event => runCustomHandler(view, event));\n    });\n}\nfunction runCustomHandler(view, event) {\n    return view.someProp(\"handleDOMEvents\", handlers => {\n        let handler = handlers[event.type];\n        return handler ? handler(view, event) || event.defaultPrevented : false;\n    });\n}\nfunction eventBelongsToView(view, event) {\n    if (!event.bubbles)\n        return true;\n    if (event.defaultPrevented)\n        return false;\n    for (let node = event.target; node != view.dom; node = node.parentNode)\n        if (!node || node.nodeType == 11 ||\n            (node.pmViewDesc && node.pmViewDesc.stopEvent(event)))\n            return false;\n    return true;\n}\nfunction dispatchEvent(view, event) {\n    if (!runCustomHandler(view, event) && handlers[event.type] &&\n        (view.editable || !(event.type in editHandlers)))\n        handlers[event.type](view, event);\n}\neditHandlers.keydown = (view, _event) => {\n    let event = _event;\n    view.input.shiftKey = event.keyCode == 16 || event.shiftKey;\n    if (inOrNearComposition(view))\n        return;\n    view.input.lastKeyCode = event.keyCode;\n    view.input.lastKeyCodeTime = Date.now();\n    // Suppress enter key events on Chrome Android, because those tend\n    // to be part of a confused sequence of composition events fired,\n    // and handling them eagerly tends to corrupt the input.\n    if (android && chrome && event.keyCode == 13)\n        return;\n    if (event.keyCode != 229)\n        view.domObserver.forceFlush();\n    // On iOS, if we preventDefault enter key presses, the virtual\n    // keyboard gets confused. So the hack here is to set a flag that\n    // makes the DOM change code recognize that what just happens should\n    // be replaced by whatever the Enter key handlers do.\n    if (ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {\n        let now = Date.now();\n        view.input.lastIOSEnter = now;\n        view.input.lastIOSEnterFallbackTimeout = setTimeout(() => {\n            if (view.input.lastIOSEnter == now) {\n                view.someProp(\"handleKeyDown\", f => f(view, keyEvent(13, \"Enter\")));\n                view.input.lastIOSEnter = 0;\n            }\n        }, 200);\n    }\n    else if (view.someProp(\"handleKeyDown\", f => f(view, event)) || captureKeyDown(view, event)) {\n        event.preventDefault();\n    }\n    else {\n        setSelectionOrigin(view, \"key\");\n    }\n};\neditHandlers.keyup = (view, event) => {\n    if (event.keyCode == 16)\n        view.input.shiftKey = false;\n};\neditHandlers.keypress = (view, _event) => {\n    let event = _event;\n    if (inOrNearComposition(view) || !event.charCode ||\n        event.ctrlKey && !event.altKey || mac && event.metaKey)\n        return;\n    if (view.someProp(\"handleKeyPress\", f => f(view, event))) {\n        event.preventDefault();\n        return;\n    }\n    let sel = view.state.selection;\n    if (!(sel instanceof TextSelection) || !sel.$from.sameParent(sel.$to)) {\n        let text = String.fromCharCode(event.charCode);\n        let deflt = () => view.state.tr.insertText(text).scrollIntoView();\n        if (!/[\\r\\n]/.test(text) && !view.someProp(\"handleTextInput\", f => f(view, sel.$from.pos, sel.$to.pos, text, deflt)))\n            view.dispatch(deflt());\n        event.preventDefault();\n    }\n};\nfunction eventCoords(event) { return { left: event.clientX, top: event.clientY }; }\nfunction isNear(event, click) {\n    let dx = click.x - event.clientX, dy = click.y - event.clientY;\n    return dx * dx + dy * dy < 100;\n}\nfunction runHandlerOnContext(view, propName, pos, inside, event) {\n    if (inside == -1)\n        return false;\n    let $pos = view.state.doc.resolve(inside);\n    for (let i = $pos.depth + 1; i > 0; i--) {\n        if (view.someProp(propName, f => i > $pos.depth ? f(view, pos, $pos.nodeAfter, $pos.before(i), event, true)\n            : f(view, pos, $pos.node(i), $pos.before(i), event, false)))\n            return true;\n    }\n    return false;\n}\nfunction updateSelection(view, selection, origin) {\n    if (!view.focused)\n        view.focus();\n    if (view.state.selection.eq(selection))\n        return;\n    let tr = view.state.tr.setSelection(selection);\n    tr.setMeta(\"pointer\", true);\n    view.dispatch(tr);\n}\nfunction selectClickedLeaf(view, inside) {\n    if (inside == -1)\n        return false;\n    let $pos = view.state.doc.resolve(inside), node = $pos.nodeAfter;\n    if (node && node.isAtom && NodeSelection.isSelectable(node)) {\n        updateSelection(view, new NodeSelection($pos));\n        return true;\n    }\n    return false;\n}\nfunction selectClickedNode(view, inside) {\n    if (inside == -1)\n        return false;\n    let sel = view.state.selection, selectedNode, selectAt;\n    if (sel instanceof NodeSelection)\n        selectedNode = sel.node;\n    let $pos = view.state.doc.resolve(inside);\n    for (let i = $pos.depth + 1; i > 0; i--) {\n        let node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n        if (NodeSelection.isSelectable(node)) {\n            if (selectedNode && sel.$from.depth > 0 &&\n                i >= sel.$from.depth && $pos.before(sel.$from.depth + 1) == sel.$from.pos)\n                selectAt = $pos.before(sel.$from.depth);\n            else\n                selectAt = $pos.before(i);\n            break;\n        }\n    }\n    if (selectAt != null) {\n        updateSelection(view, NodeSelection.create(view.state.doc, selectAt));\n        return true;\n    }\n    else {\n        return false;\n    }\n}\nfunction handleSingleClick(view, pos, inside, event, selectNode) {\n    return runHandlerOnContext(view, \"handleClickOn\", pos, inside, event) ||\n        view.someProp(\"handleClick\", f => f(view, pos, event)) ||\n        (selectNode ? selectClickedNode(view, inside) : selectClickedLeaf(view, inside));\n}\nfunction handleDoubleClick(view, pos, inside, event) {\n    return runHandlerOnContext(view, \"handleDoubleClickOn\", pos, inside, event) ||\n        view.someProp(\"handleDoubleClick\", f => f(view, pos, event));\n}\nfunction handleTripleClick(view, pos, inside, event) {\n    return runHandlerOnContext(view, \"handleTripleClickOn\", pos, inside, event) ||\n        view.someProp(\"handleTripleClick\", f => f(view, pos, event)) ||\n        defaultTripleClick(view, inside, event);\n}\nfunction defaultTripleClick(view, inside, event) {\n    if (event.button != 0)\n        return false;\n    let selection = selectionForTripleClick(view, inside, true), doc = view.state.doc;\n    if (!selection)\n        return false;\n    updateSelection(view, selection);\n    if (selection instanceof TextSelection && doc.eq(view.state.doc))\n        view.input.mouseDown = new TripleClickDrag(view, selection);\n    return true;\n}\nfunction selectionForTripleClick(view, inside, selectNodes) {\n    let doc = view.state.doc;\n    if (inside == -1)\n        return doc.inlineContent ? TextSelection.create(doc, 0, doc.content.size) : null;\n    let $pos = doc.resolve(inside);\n    for (let i = $pos.depth + 1; i > 0; i--) {\n        let node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n        let nodePos = $pos.before(i);\n        if (node.inlineContent)\n            return TextSelection.create(doc, nodePos + 1, nodePos + 1 + node.content.size);\n        else if (selectNodes && NodeSelection.isSelectable(node))\n            return NodeSelection.create(doc, nodePos);\n    }\n    return null;\n}\nfunction forceDOMFlush(view) {\n    return endComposition(view);\n}\nconst selectNodeModifier = mac ? \"metaKey\" : \"ctrlKey\";\nhandlers.mousedown = (view, _event) => {\n    let event = _event;\n    view.input.shiftKey = event.shiftKey;\n    let flushed = forceDOMFlush(view);\n    let now = Date.now(), type = \"singleClick\";\n    if (now - view.input.lastClick.time < 500 && isNear(event, view.input.lastClick) && !event[selectNodeModifier] &&\n        view.input.lastClick.button == event.button) {\n        if (view.input.lastClick.type == \"singleClick\")\n            type = \"doubleClick\";\n        else if (view.input.lastClick.type == \"doubleClick\")\n            type = \"tripleClick\";\n    }\n    view.input.lastClick = { time: now, x: event.clientX, y: event.clientY, type, button: event.button };\n    if (view.input.mouseDown)\n        view.input.mouseDown.done();\n    let pos = view.posAtCoords(eventCoords(event));\n    if (!pos)\n        return;\n    if (type == \"singleClick\") {\n        view.input.mouseDown = new LeftMouseDown(view, pos, event, !!flushed);\n    }\n    else if ((type == \"doubleClick\" ? handleDoubleClick : handleTripleClick)(view, pos.pos, pos.inside, event)) {\n        event.preventDefault();\n    }\n    else {\n        setSelectionOrigin(view, \"pointer\");\n    }\n};\nclass MouseDown {\n    constructor(view) {\n        this.view = view;\n        this.mightDrag = null;\n        view.root.addEventListener(\"mouseup\", this.up = this.up.bind(this));\n        view.root.addEventListener(\"mousemove\", this.move = this.move.bind(this));\n    }\n    up(event) {\n        this.done();\n    }\n    move(event) {\n        if (event.buttons == 0)\n            this.done();\n    }\n    done() {\n        this.view.root.removeEventListener(\"mouseup\", this.up);\n        this.view.root.removeEventListener(\"mousemove\", this.move);\n        if (this.view.input.mouseDown == this)\n            this.view.input.mouseDown = null;\n    }\n    delaySelUpdate() { return false; }\n}\nclass LeftMouseDown extends MouseDown {\n    constructor(view, pos, event, flushed) {\n        super(view);\n        this.pos = pos;\n        this.event = event;\n        this.flushed = flushed;\n        this.delayedSelectionSync = false;\n        this.startDoc = view.state.doc;\n        this.selectNode = !!event[selectNodeModifier];\n        this.allowDefault = event.shiftKey;\n        let targetNode, targetPos;\n        if (pos.inside > -1) {\n            targetNode = view.state.doc.nodeAt(pos.inside);\n            targetPos = pos.inside;\n        }\n        else {\n            let $pos = view.state.doc.resolve(pos.pos);\n            targetNode = $pos.parent;\n            targetPos = $pos.depth ? $pos.before() : 0;\n        }\n        const target = flushed ? null : event.target;\n        const targetDesc = target ? view.docView.nearestDesc(target, true) : null;\n        this.target = targetDesc && isElt(targetDesc.nodeDOM) ? targetDesc.nodeDOM : null;\n        let { selection } = view.state;\n        if (event.button == 0 &&\n            (targetNode.type.spec.draggable && targetNode.type.spec.selectable !== false ||\n                selection instanceof NodeSelection && selection.from <= targetPos && selection.to > targetPos))\n            this.mightDrag = {\n                node: targetNode,\n                pos: targetPos,\n                addAttr: !!(this.target && !this.target.draggable),\n                setUneditable: !!(this.target && gecko && !this.target.hasAttribute(\"contentEditable\"))\n            };\n        if (this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable)) {\n            this.view.domObserver.stop();\n            if (this.mightDrag.addAttr)\n                this.target.draggable = true;\n            if (this.mightDrag.setUneditable)\n                setTimeout(() => {\n                    if (this.view.input.mouseDown == this)\n                        this.target.setAttribute(\"contentEditable\", \"false\");\n                }, 20);\n            this.view.domObserver.start();\n        }\n        setSelectionOrigin(view, \"pointer\");\n    }\n    done() {\n        super.done();\n        if (this.mightDrag && this.target) {\n            this.view.domObserver.stop();\n            if (this.mightDrag.addAttr)\n                this.target.removeAttribute(\"draggable\");\n            if (this.mightDrag.setUneditable)\n                this.target.removeAttribute(\"contentEditable\");\n            this.view.domObserver.start();\n        }\n        if (this.delayedSelectionSync)\n            setTimeout(() => {\n                if (!this.view.isDestroyed)\n                    selectionToDOM(this.view);\n            });\n    }\n    up(event) {\n        this.done();\n        if (!this.view.dom.contains(event.target))\n            return;\n        let pos = this.pos;\n        if (this.view.state.doc != this.startDoc)\n            pos = this.view.posAtCoords(eventCoords(event));\n        this.updateAllowDefault(event);\n        if (this.allowDefault || !pos) {\n            setSelectionOrigin(this.view, \"pointer\");\n        }\n        else if (handleSingleClick(this.view, pos.pos, pos.inside, event, this.selectNode)) {\n            event.preventDefault();\n        }\n        else if (event.button == 0 &&\n            (this.flushed ||\n                // Safari ignores clicks on draggable elements\n                (safari && this.mightDrag && !this.mightDrag.node.isAtom) ||\n                // Chrome will sometimes treat a node selection as a\n                // cursor, but still report that the node is selected\n                // when asked through getSelection. You'll then get a\n                // situation where clicking at the point where that\n                // (hidden) cursor is doesn't change the selection, and\n                // thus doesn't get a reaction from ProseMirror. This\n                // works around that.\n                (chrome && !this.view.state.selection.visible &&\n                    Math.min(Math.abs(pos.pos - this.view.state.selection.from), Math.abs(pos.pos - this.view.state.selection.to)) <= 2))) {\n            updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)));\n            event.preventDefault();\n        }\n        else {\n            setSelectionOrigin(this.view, \"pointer\");\n        }\n    }\n    move(event) {\n        this.updateAllowDefault(event);\n        setSelectionOrigin(this.view, \"pointer\");\n        super.move(event);\n    }\n    updateAllowDefault(event) {\n        if (!this.allowDefault && (Math.abs(this.event.x - event.clientX) > 4 ||\n            Math.abs(this.event.y - event.clientY) > 4))\n            this.allowDefault = true;\n    }\n    delaySelUpdate() {\n        if (!this.allowDefault)\n            return false;\n        this.delayedSelectionSync = true;\n        return true;\n    }\n}\nclass TripleClickDrag extends MouseDown {\n    constructor(view, startSelection) {\n        super(view);\n        this.startSelection = startSelection;\n        this.startDoc = view.state.doc;\n    }\n    move(event) {\n        if (event.buttons == 0 || this.view.isDestroyed || !this.view.state.doc.eq(this.startDoc)) {\n            this.done();\n            return;\n        }\n        event.preventDefault();\n        setSelectionOrigin(this.view, \"pointer\");\n        let pos = this.view.posAtCoords(eventCoords(event));\n        let target = pos && selectionForTripleClick(this.view, pos.inside, false);\n        if (!target)\n            return;\n        let { doc } = this.view.state, start = this.startSelection;\n        let [anchor, head] = target.from < start.from ? [start.to, target.from] : [start.from, target.to];\n        updateSelection(this.view, TextSelection.create(doc, anchor, head));\n    }\n}\nhandlers.touchstart = view => {\n    view.input.lastTouch = Date.now();\n    forceDOMFlush(view);\n    setSelectionOrigin(view, \"pointer\");\n};\nhandlers.touchmove = view => {\n    view.input.lastTouch = Date.now();\n    setSelectionOrigin(view, \"pointer\");\n};\nhandlers.contextmenu = view => forceDOMFlush(view);\nfunction inOrNearComposition(view, event) {\n    if (view.composing)\n        return true;\n    // See https://www.stum.de/2016/06/24/handling-ime-events-in-javascript/.\n    // On Japanese input method editors (IMEs), the Enter key is used to confirm character\n    // selection. On Safari, when Enter is pressed, compositionend and keydown events are\n    // emitted. The keydown event triggers newline insertion, which we don't want.\n    // This method returns true if the keydown event should be ignored.\n    // We only ignore it once, as pressing Enter a second time *should* insert a newline.\n    // Furthermore, the keydown event timestamp must be close to the compositionEndedAt timestamp.\n    // This guards against the case where compositionend is triggered without the keyboard\n    // (e.g. character confirmation may be done with the mouse), and keydown is triggered\n    // afterwards- we wouldn't want to ignore the keydown event in this case.\n    if (safari && Math.abs(Date.now() - view.input.compositionEndedAt) < 500) {\n        view.input.compositionEndedAt = -2e8;\n        return true;\n    }\n    return false;\n}\n// Drop active composition after 5 seconds of inactivity on Android\nconst timeoutComposition = android ? 5000 : -1;\neditHandlers.compositionstart = editHandlers.compositionupdate = view => {\n    if (!view.composing) {\n        view.domObserver.flush();\n        let { state } = view, $pos = state.selection.$to;\n        if (state.selection instanceof TextSelection && state.selection.empty &&\n            (state.storedMarks ||\n                (!$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(m => m.type.spec.inclusive === false)) ||\n                chrome && windows && selectionBeforeUneditable(view))) { // Issue #1500\n            // Need to wrap the cursor in mark nodes different from the ones in the DOM context\n            view.markCursor = view.state.storedMarks || $pos.marks();\n            endComposition(view, true);\n            view.markCursor = null;\n        }\n        else {\n            endComposition(view, !state.selection.empty);\n            // In firefox, if the cursor is after but outside a marked node,\n            // the inserted text won't inherit the marks. So this moves it\n            // inside if necessary.\n            if (gecko && state.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {\n                let sel = view.domSelectionRange();\n                for (let node = sel.focusNode, offset = sel.focusOffset; node && isElt(node) && offset != 0;) {\n                    let before = offset < 0 ? node.lastChild : node.childNodes[offset - 1];\n                    if (!before)\n                        break;\n                    if (isText(before)) {\n                        let sel = view.domSelection();\n                        if (sel)\n                            sel.collapse(before, before.nodeValue.length);\n                        break;\n                    }\n                    else {\n                        node = before;\n                        offset = -1;\n                    }\n                }\n            }\n        }\n        view.input.composing = true;\n    }\n    scheduleComposeEnd(view, timeoutComposition);\n};\nfunction selectionBeforeUneditable(view) {\n    let { focusNode, focusOffset } = view.domSelectionRange();\n    if (!focusNode || !isElt(focusNode) || focusOffset >= focusNode.childNodes.length)\n        return false;\n    let next = focusNode.childNodes[focusOffset];\n    return isElt(next) && next.contentEditable == \"false\";\n}\neditHandlers.compositionend = (view, event) => {\n    if (view.composing) {\n        view.input.composing = false;\n        view.input.compositionEndedAt = Date.now();\n        view.input.compositionPendingChanges = view.domObserver.pendingRecords().length ? view.input.compositionID : 0;\n        view.input.compositionNode = null;\n        if (view.input.badSafariComposition)\n            view.domObserver.forceFlush();\n        else if (view.input.compositionPendingChanges)\n            Promise.resolve().then(() => view.domObserver.flush());\n        view.input.compositionID++;\n        scheduleComposeEnd(view, 20);\n    }\n};\nfunction scheduleComposeEnd(view, delay) {\n    clearTimeout(view.input.composingTimeout);\n    if (delay > -1)\n        view.input.composingTimeout = setTimeout(() => endComposition(view), delay);\n}\nfunction clearComposition(view) {\n    if (view.composing) {\n        view.input.composing = false;\n        view.input.compositionEndedAt = Date.now();\n    }\n    while (view.input.compositionNodes.length > 0)\n        view.input.compositionNodes.pop().markParentsDirty();\n}\nfunction findCompositionNode(view) {\n    let sel = view.domSelectionRange();\n    if (!sel.focusNode)\n        return null;\n    let textBefore = textNodeBefore$1(sel.focusNode, sel.focusOffset);\n    let textAfter = textNodeAfter$1(sel.focusNode, sel.focusOffset);\n    if (textBefore && textAfter && textBefore != textAfter) {\n        let descAfter = textAfter.pmViewDesc, lastChanged = view.domObserver.lastChangedTextNode;\n        if (textBefore == lastChanged || textAfter == lastChanged)\n            return lastChanged;\n        if (!descAfter || !descAfter.isText(textAfter.nodeValue)) {\n            return textAfter;\n        }\n        else if (view.input.compositionNode == textAfter) {\n            let descBefore = textBefore.pmViewDesc;\n            if (!(!descBefore || !descBefore.isText(textBefore.nodeValue)))\n                return textAfter;\n        }\n    }\n    return textBefore || textAfter;\n}\n/**\n@internal\n*/\nfunction endComposition(view, restarting = false) {\n    if (android && view.domObserver.flushingSoon >= 0)\n        return;\n    view.domObserver.forceFlush();\n    clearComposition(view);\n    if (restarting || view.docView && view.docView.dirty) {\n        let sel = selectionFromDOM(view), cur = view.state.selection;\n        if (sel && !sel.eq(cur))\n            view.dispatch(view.state.tr.setSelection(sel));\n        else if ((view.markCursor || restarting) && !cur.$from.node(cur.$from.sharedDepth(cur.to)).inlineContent)\n            view.dispatch(view.state.tr.deleteSelection());\n        else\n            view.updateState(view.state);\n        return true;\n    }\n    return false;\n}\nfunction captureCopy(view, dom) {\n    // The extra wrapper is somehow necessary on IE/Edge to prevent the\n    // content from being mangled when it is put onto the clipboard\n    if (!view.dom.parentNode)\n        return;\n    let wrap = view.dom.parentNode.appendChild(document.createElement(\"div\"));\n    wrap.appendChild(dom);\n    wrap.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n    let sel = getSelection(), range = document.createRange();\n    range.selectNodeContents(dom);\n    // Done because IE will fire a selectionchange moving the selection\n    // to its start when removeAllRanges is called and the editor still\n    // has focus (which will mess up the editor's selection state).\n    view.dom.blur();\n    sel.removeAllRanges();\n    sel.addRange(range);\n    setTimeout(() => {\n        if (wrap.parentNode)\n            wrap.parentNode.removeChild(wrap);\n        view.focus();\n    }, 50);\n}\n// This is very crude, but unfortunately both these browsers _pretend_\n// that they have a clipboard API—all the objects and methods are\n// there, they just don't work, and they are hard to test.\nconst brokenClipboardAPI = (ie && ie_version < 15) ||\n    (ios && webkit_version < 604);\nhandlers.copy = editHandlers.cut = (view, _event) => {\n    let event = _event;\n    let sel = view.state.selection, cut = event.type == \"cut\";\n    if (sel.empty)\n        return;\n    // IE and Edge's clipboard interface is completely broken\n    let data = brokenClipboardAPI ? null : event.clipboardData;\n    let slice = sel.content(), { dom, text } = serializeForClipboard(view, slice);\n    if (data) {\n        event.preventDefault();\n        data.clearData();\n        data.setData(\"text/html\", dom.innerHTML);\n        data.setData(\"text/plain\", text);\n    }\n    else {\n        captureCopy(view, dom);\n    }\n    if (cut)\n        view.dispatch(view.state.tr.deleteSelection().scrollIntoView().setMeta(\"uiEvent\", \"cut\"));\n};\nfunction sliceSingleNode(slice) {\n    return slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1 ? slice.content.firstChild : null;\n}\nfunction capturePaste(view, event) {\n    if (!view.dom.parentNode)\n        return;\n    let plainText = view.input.shiftKey || view.state.selection.$from.parent.type.spec.code;\n    let target = view.dom.parentNode.appendChild(document.createElement(plainText ? \"textarea\" : \"div\"));\n    if (!plainText)\n        target.contentEditable = \"true\";\n    target.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n    target.focus();\n    let plain = view.input.shiftKey && view.input.lastKeyCode != 45;\n    setTimeout(() => {\n        view.focus();\n        if (target.parentNode)\n            target.parentNode.removeChild(target);\n        if (plainText)\n            doPaste(view, target.value, null, plain, event);\n        else\n            doPaste(view, target.textContent, target.innerHTML, plain, event);\n    }, 50);\n}\nfunction doPaste(view, text, html, preferPlain, event) {\n    let slice = parseFromClipboard(view, text, html, preferPlain, view.state.selection.$from);\n    if (view.someProp(\"handlePaste\", f => f(view, event, slice || Slice.empty)))\n        return true;\n    if (!slice)\n        return false;\n    let singleNode = sliceSingleNode(slice);\n    let tr = singleNode\n        ? view.state.tr.replaceSelectionWith(singleNode, preferPlain)\n        : view.state.tr.replaceSelection(slice);\n    view.dispatch(tr.scrollIntoView().setMeta(\"paste\", true).setMeta(\"uiEvent\", \"paste\"));\n    return true;\n}\nfunction getText(clipboardData) {\n    let text = clipboardData.getData(\"text/plain\") || clipboardData.getData(\"Text\");\n    if (text)\n        return text;\n    let uris = clipboardData.getData(\"text/uri-list\");\n    return uris ? uris.replace(/\\r?\\n/g, \" \") : \"\";\n}\neditHandlers.paste = (view, _event) => {\n    let event = _event;\n    // Handling paste from JavaScript during composition is very poorly\n    // handled by browsers, so as a dodgy but preferable kludge, we just\n    // let the browser do its native thing there, except on Android,\n    // where the editor is almost always composing.\n    if (view.composing && !android)\n        return;\n    let data = brokenClipboardAPI ? null : event.clipboardData;\n    let plain = view.input.shiftKey && view.input.lastKeyCode != 45;\n    if (data && doPaste(view, getText(data), data.getData(\"text/html\"), plain, event))\n        event.preventDefault();\n    else\n        capturePaste(view, event);\n};\nclass Dragging {\n    constructor(slice, move, node) {\n        this.slice = slice;\n        this.move = move;\n        this.node = node;\n    }\n}\nconst dragCopyModifier = mac ? \"altKey\" : \"ctrlKey\";\nfunction dragMoves(view, event) {\n    let copy;\n    view.someProp(\"dragCopies\", test => { copy = copy || test(event); });\n    return copy != null ? !copy : !event[dragCopyModifier];\n}\nhandlers.dragstart = (view, _event) => {\n    let event = _event;\n    let mouseDown = view.input.mouseDown;\n    if (mouseDown)\n        mouseDown.done();\n    if (!event.dataTransfer)\n        return;\n    let sel = view.state.selection;\n    let pos = sel.empty ? null : view.posAtCoords(eventCoords(event));\n    let node;\n    if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to)) ;\n    else if (mouseDown && mouseDown.mightDrag) {\n        node = NodeSelection.create(view.state.doc, mouseDown.mightDrag.pos);\n    }\n    else if (event.target && isElt(event.target)) {\n        let desc = view.docView.nearestDesc(event.target, true);\n        if (desc && desc.node.type.spec.draggable && desc != view.docView)\n            node = NodeSelection.create(view.state.doc, desc.posBefore);\n    }\n    let draggedSlice = (node || view.state.selection).content();\n    let { dom, text, slice } = serializeForClipboard(view, draggedSlice);\n    // Pre-120 Chrome versions clear files when calling `clearData` (#1472)\n    if (!event.dataTransfer.files.length || !chrome || chrome_version > 120)\n        event.dataTransfer.clearData();\n    event.dataTransfer.setData(brokenClipboardAPI ? \"Text\" : \"text/html\", dom.innerHTML);\n    // See https://code.haverbeke.berlin/prosemirror/prosemirror/issues/1156\n    event.dataTransfer.effectAllowed = \"copyMove\";\n    if (!brokenClipboardAPI)\n        event.dataTransfer.setData(\"text/plain\", text);\n    view.dragging = new Dragging(slice, dragMoves(view, event), node);\n};\nhandlers.dragend = view => {\n    let dragging = view.dragging;\n    window.setTimeout(() => {\n        if (view.dragging == dragging)\n            view.dragging = null;\n    }, 50);\n};\neditHandlers.dragover = editHandlers.dragenter = (_, e) => e.preventDefault();\neditHandlers.drop = (view, event) => {\n    try {\n        handleDrop(view, event, view.dragging);\n    }\n    finally {\n        view.dragging = null;\n    }\n};\nfunction handleDrop(view, event, dragging) {\n    if (!event.dataTransfer)\n        return;\n    let eventPos = view.posAtCoords(eventCoords(event));\n    if (!eventPos)\n        return;\n    let $mouse = view.state.doc.resolve(eventPos.pos);\n    let slice = dragging && dragging.slice;\n    if (slice) {\n        view.someProp(\"transformPasted\", f => { slice = f(slice, view, false); });\n    }\n    else {\n        slice = parseFromClipboard(view, getText(event.dataTransfer), brokenClipboardAPI ? null : event.dataTransfer.getData(\"text/html\"), false, $mouse);\n    }\n    let move = !!(dragging && dragMoves(view, event));\n    if (view.someProp(\"handleDrop\", f => f(view, event, slice || Slice.empty, move))) {\n        event.preventDefault();\n        return;\n    }\n    if (!slice)\n        return;\n    event.preventDefault();\n    let insertPos = slice ? dropPoint(view.state.doc, $mouse.pos, slice) : $mouse.pos;\n    if (insertPos == null)\n        insertPos = $mouse.pos;\n    let tr = view.state.tr;\n    if (move) {\n        let { node } = dragging;\n        if (node)\n            node.replace(tr);\n        else\n            tr.deleteSelection();\n    }\n    let pos = tr.mapping.map(insertPos);\n    let isNode = slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1;\n    let beforeInsert = tr.doc;\n    if (isNode)\n        tr.replaceRangeWith(pos, pos, slice.content.firstChild);\n    else\n        tr.replaceRange(pos, pos, slice);\n    if (tr.doc.eq(beforeInsert))\n        return;\n    let $pos = tr.doc.resolve(pos);\n    if (isNode && NodeSelection.isSelectable(slice.content.firstChild) &&\n        $pos.nodeAfter && $pos.nodeAfter.sameMarkup(slice.content.firstChild)) {\n        tr.setSelection(new NodeSelection($pos));\n    }\n    else {\n        let end = tr.mapping.map(insertPos);\n        tr.mapping.maps[tr.mapping.maps.length - 1].forEach((_from, _to, _newFrom, newTo) => end = newTo);\n        tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(end)));\n    }\n    view.focus();\n    view.dispatch(tr.setMeta(\"uiEvent\", \"drop\"));\n}\nhandlers.focus = view => {\n    view.input.lastFocus = Date.now();\n    if (!view.focused) {\n        view.domObserver.stop();\n        view.dom.classList.add(\"ProseMirror-focused\");\n        view.domObserver.start();\n        view.focused = true;\n        setTimeout(() => {\n            if (view.docView && view.hasFocus() && !view.domObserver.currentSelection.eq(view.domSelectionRange()))\n                selectionToDOM(view);\n        }, 20);\n    }\n};\nhandlers.blur = (view, _event) => {\n    let event = _event;\n    if (view.focused) {\n        view.domObserver.stop();\n        view.dom.classList.remove(\"ProseMirror-focused\");\n        view.domObserver.start();\n        if (event.relatedTarget && view.dom.contains(event.relatedTarget))\n            view.domObserver.currentSelection.clear();\n        view.focused = false;\n    }\n};\nhandlers.beforeinput = (view, _event) => {\n    let event = _event;\n    // We should probably do more with beforeinput events, but support\n    // is so spotty that I'm still waiting to see where they are going.\n    // Very specific hack to deal with backspace sometimes failing on\n    // Chrome and Firefox Android when after an uneditable node.\n    if (android && event.inputType == \"deleteContentBackward\") {\n        view.domObserver.flushSoon();\n        let { domChangeCount } = view.input;\n        setTimeout(() => {\n            if (view.input.domChangeCount != domChangeCount)\n                return; // Event already had some effect\n            // This bug tends to close the virtual keyboard, so we refocus\n            view.dom.blur();\n            view.focus();\n            if (view.someProp(\"handleKeyDown\", f => f(view, keyEvent(8, \"Backspace\"))))\n                return;\n            let { $cursor } = view.state.selection;\n            // Crude approximation of backspace behavior when no command handled it\n            if ($cursor && $cursor.pos > 0)\n                view.dispatch(view.state.tr.delete($cursor.pos - 1, $cursor.pos).scrollIntoView());\n        }, 50);\n    }\n};\n// Make sure all handlers get registered\nfor (let prop in editHandlers)\n    handlers[prop] = editHandlers[prop];\n\nfunction compareObjs(a, b) {\n    if (a == b)\n        return true;\n    for (let p in a)\n        if (a[p] !== b[p])\n            return false;\n    for (let p in b)\n        if (!(p in a))\n            return false;\n    return true;\n}\nclass WidgetType {\n    constructor(toDOM, spec) {\n        this.toDOM = toDOM;\n        this.spec = spec || noSpec;\n        this.side = this.spec.side || 0;\n    }\n    map(mapping, span, offset, oldOffset) {\n        let { pos, deleted } = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1);\n        return deleted ? null : new Decoration(pos - offset, pos - offset, this);\n    }\n    valid() { return true; }\n    eq(other) {\n        return this == other ||\n            (other instanceof WidgetType &&\n                (this.spec.key && this.spec.key == other.spec.key ||\n                    this.toDOM == other.toDOM && compareObjs(this.spec, other.spec)));\n    }\n    destroy(node) {\n        if (this.spec.destroy)\n            this.spec.destroy(node);\n    }\n}\nclass InlineType {\n    constructor(attrs, spec) {\n        this.attrs = attrs;\n        this.spec = spec || noSpec;\n    }\n    map(mapping, span, offset, oldOffset) {\n        let from = mapping.map(span.from + oldOffset, this.spec.inclusiveStart ? -1 : 1) - offset;\n        let to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset;\n        return from >= to ? null : new Decoration(from, to, this);\n    }\n    valid(_, span) { return span.from < span.to; }\n    eq(other) {\n        return this == other ||\n            (other instanceof InlineType && compareObjs(this.attrs, other.attrs) &&\n                compareObjs(this.spec, other.spec));\n    }\n    static is(span) { return span.type instanceof InlineType; }\n    destroy() { }\n}\nclass NodeType {\n    constructor(attrs, spec) {\n        this.attrs = attrs;\n        this.spec = spec || noSpec;\n    }\n    map(mapping, span, offset, oldOffset) {\n        let from = mapping.mapResult(span.from + oldOffset, 1);\n        if (from.deleted)\n            return null;\n        let to = mapping.mapResult(span.to + oldOffset, -1);\n        if (to.deleted || to.pos <= from.pos)\n            return null;\n        return new Decoration(from.pos - offset, to.pos - offset, this);\n    }\n    valid(node, span) {\n        let { index, offset } = node.content.findIndex(span.from), child;\n        return offset == span.from && !(child = node.child(index)).isText && offset + child.nodeSize == span.to;\n    }\n    eq(other) {\n        return this == other ||\n            (other instanceof NodeType && compareObjs(this.attrs, other.attrs) &&\n                compareObjs(this.spec, other.spec));\n    }\n    destroy() { }\n}\n/**\nDecoration objects can be provided to the view through the\n[`decorations` prop](https://prosemirror.net/docs/ref/#view.EditorProps.decorations). They come in\nseveral variants—see the static members of this class for details.\n*/\nclass Decoration {\n    /**\n    @internal\n    */\n    constructor(\n    /**\n    The start position of the decoration.\n    */\n    from, \n    /**\n    The end position. Will be the same as `from` for [widget\n    decorations](https://prosemirror.net/docs/ref/#view.Decoration^widget).\n    */\n    to, \n    /**\n    @internal\n    */\n    type) {\n        this.from = from;\n        this.to = to;\n        this.type = type;\n    }\n    /**\n    @internal\n    */\n    copy(from, to) {\n        return new Decoration(from, to, this.type);\n    }\n    /**\n    @internal\n    */\n    eq(other, offset = 0) {\n        return this.type.eq(other.type) && this.from + offset == other.from && this.to + offset == other.to;\n    }\n    /**\n    @internal\n    */\n    map(mapping, offset, oldOffset) {\n        return this.type.map(mapping, this, offset, oldOffset);\n    }\n    /**\n    Creates a widget decoration, which is a DOM node that's shown in\n    the document at the given position. It is recommended that you\n    delay rendering the widget by passing a function that will be\n    called when the widget is actually drawn in a view, but you can\n    also directly pass a DOM node. `getPos` can be used to find the\n    widget's current document position.\n    */\n    static widget(pos, toDOM, spec) {\n        return new Decoration(pos, pos, new WidgetType(toDOM, spec));\n    }\n    /**\n    Creates an inline decoration, which adds the given attributes to\n    each inline node between `from` and `to`.\n    */\n    static inline(from, to, attrs, spec) {\n        return new Decoration(from, to, new InlineType(attrs, spec));\n    }\n    /**\n    Creates a node decoration. `from` and `to` should point precisely\n    before and after a node in the document. That node, and only that\n    node, will receive the given attributes.\n    */\n    static node(from, to, attrs, spec) {\n        return new Decoration(from, to, new NodeType(attrs, spec));\n    }\n    /**\n    The spec provided when creating this decoration. Can be useful\n    if you've stored extra information in that object.\n    */\n    get spec() { return this.type.spec; }\n    /**\n    @internal\n    */\n    get inline() { return this.type instanceof InlineType; }\n    /**\n    @internal\n    */\n    get widget() { return this.type instanceof WidgetType; }\n}\nconst none = [], noSpec = {};\n/**\nA collection of [decorations](https://prosemirror.net/docs/ref/#view.Decoration), organized in such\na way that the drawing algorithm can efficiently use and compare\nthem. This is a persistent data structure—it is not modified,\nupdates create a new value.\n*/\nclass DecorationSet {\n    /**\n    @internal\n    */\n    constructor(local, children) {\n        this.local = local.length ? local : none;\n        this.children = children.length ? children : none;\n    }\n    /**\n    Create a set of decorations, using the structure of the given\n    document. This will consume (modify) the `decorations` array, so\n    you must make a copy if you want need to preserve that.\n    */\n    static create(doc, decorations) {\n        return decorations.length ? buildTree(decorations, doc, 0, noSpec) : empty;\n    }\n    /**\n    Find all decorations in this set which touch the given range\n    (including decorations that start or end directly at the\n    boundaries) and match the given predicate on their spec. When\n    `start` and `end` are omitted, all decorations in the set are\n    considered. When `predicate` isn't given, all decorations are\n    assumed to match.\n    */\n    find(start, end, predicate) {\n        let result = [];\n        this.findInner(start == null ? 0 : start, end == null ? 1e9 : end, result, 0, predicate);\n        return result;\n    }\n    findInner(start, end, result, offset, predicate) {\n        for (let i = 0; i < this.local.length; i++) {\n            let span = this.local[i];\n            if (span.from <= end && span.to >= start && (!predicate || predicate(span.spec)))\n                result.push(span.copy(span.from + offset, span.to + offset));\n        }\n        for (let i = 0; i < this.children.length; i += 3) {\n            if (this.children[i] < end && this.children[i + 1] > start) {\n                let childOff = this.children[i] + 1;\n                this.children[i + 2].findInner(start - childOff, end - childOff, result, offset + childOff, predicate);\n            }\n        }\n    }\n    /**\n    Map the set of decorations in response to a change in the\n    document.\n    */\n    map(mapping, doc, options) {\n        if (this == empty || mapping.maps.length == 0)\n            return this;\n        return this.mapInner(mapping, doc, 0, 0, options || noSpec);\n    }\n    /**\n    @internal\n    */\n    mapInner(mapping, node, offset, oldOffset, options) {\n        let newLocal;\n        for (let i = 0; i < this.local.length; i++) {\n            let mapped = this.local[i].map(mapping, offset, oldOffset);\n            if (mapped && mapped.type.valid(node, mapped))\n                (newLocal || (newLocal = [])).push(mapped);\n            else if (options.onRemove)\n                options.onRemove(this.local[i].spec);\n        }\n        if (this.children.length)\n            return mapChildren(this.children, newLocal || [], mapping, node, offset, oldOffset, options);\n        else\n            return newLocal ? new DecorationSet(newLocal.sort(byPos), none) : empty;\n    }\n    /**\n    Add the given array of decorations to the ones in the set,\n    producing a new set. Consumes the `decorations` array. Needs\n    access to the current document to create the appropriate tree\n    structure.\n    */\n    add(doc, decorations) {\n        if (!decorations.length)\n            return this;\n        if (this == empty)\n            return DecorationSet.create(doc, decorations);\n        return this.addInner(doc, decorations, 0);\n    }\n    addInner(doc, decorations, offset) {\n        let children, childIndex = 0;\n        doc.forEach((childNode, childOffset) => {\n            let baseOffset = childOffset + offset, found;\n            if (!(found = takeSpansForNode(decorations, childNode, baseOffset)))\n                return;\n            if (!children)\n                children = this.children.slice();\n            while (childIndex < children.length && children[childIndex] < childOffset)\n                childIndex += 3;\n            if (children[childIndex] == childOffset)\n                children[childIndex + 2] = children[childIndex + 2].addInner(childNode, found, baseOffset + 1);\n            else\n                children.splice(childIndex, 0, childOffset, childOffset + childNode.nodeSize, buildTree(found, childNode, baseOffset + 1, noSpec));\n            childIndex += 3;\n        });\n        let local = moveSpans(childIndex ? withoutNulls(decorations) : decorations, -offset);\n        for (let i = 0; i < local.length; i++)\n            if (!local[i].type.valid(doc, local[i]))\n                local.splice(i--, 1);\n        return new DecorationSet(local.length ? this.local.concat(local).sort(byPos) : this.local, children || this.children);\n    }\n    /**\n    Create a new set that contains the decorations in this set, minus\n    the ones in the given array.\n    */\n    remove(decorations) {\n        if (decorations.length == 0 || this == empty)\n            return this;\n        return this.removeInner(decorations, 0);\n    }\n    removeInner(decorations, offset) {\n        let children = this.children, local = this.local;\n        for (let i = 0; i < children.length; i += 3) {\n            let found;\n            let from = children[i] + offset, to = children[i + 1] + offset;\n            for (let j = 0, span; j < decorations.length; j++)\n                if (span = decorations[j]) {\n                    if (span.from > from && span.to < to) {\n                        decorations[j] = null;\n                        (found || (found = [])).push(span);\n                    }\n                }\n            if (!found)\n                continue;\n            if (children == this.children)\n                children = this.children.slice();\n            let removed = children[i + 2].removeInner(found, from + 1);\n            if (removed != empty) {\n                children[i + 2] = removed;\n            }\n            else {\n                children.splice(i, 3);\n                i -= 3;\n            }\n        }\n        if (local.length)\n            for (let i = 0, span; i < decorations.length; i++)\n                if (span = decorations[i]) {\n                    for (let j = 0; j < local.length; j++)\n                        if (local[j].eq(span, offset)) {\n                            if (local == this.local)\n                                local = this.local.slice();\n                            local.splice(j--, 1);\n                        }\n                }\n        if (children == this.children && local == this.local)\n            return this;\n        return local.length || children.length ? new DecorationSet(local, children) : empty;\n    }\n    forChild(offset, node) {\n        if (this == empty)\n            return this;\n        if (node.isLeaf)\n            return DecorationSet.empty;\n        let child, local;\n        for (let i = 0; i < this.children.length; i += 3)\n            if (this.children[i] >= offset) {\n                if (this.children[i] == offset)\n                    child = this.children[i + 2];\n                break;\n            }\n        let start = offset + 1, end = start + node.content.size;\n        for (let i = 0; i < this.local.length; i++) {\n            let dec = this.local[i];\n            if (dec.from < end && dec.to > start && (dec.type instanceof InlineType)) {\n                let from = Math.max(start, dec.from) - start, to = Math.min(end, dec.to) - start;\n                if (from < to)\n                    (local || (local = [])).push(dec.copy(from, to));\n            }\n        }\n        if (local) {\n            let localSet = new DecorationSet(local.sort(byPos), none);\n            return child ? new DecorationGroup([localSet, child]) : localSet;\n        }\n        return child || empty;\n    }\n    /**\n    @internal\n    */\n    eq(other) {\n        if (this == other)\n            return true;\n        if (!(other instanceof DecorationSet) ||\n            this.local.length != other.local.length ||\n            this.children.length != other.children.length)\n            return false;\n        for (let i = 0; i < this.local.length; i++)\n            if (!this.local[i].eq(other.local[i]))\n                return false;\n        for (let i = 0; i < this.children.length; i += 3)\n            if (this.children[i] != other.children[i] ||\n                this.children[i + 1] != other.children[i + 1] ||\n                !this.children[i + 2].eq(other.children[i + 2]))\n                return false;\n        return true;\n    }\n    /**\n    @internal\n    */\n    locals(node) {\n        return removeOverlap(this.localsInner(node));\n    }\n    /**\n    @internal\n    */\n    localsInner(node) {\n        if (this == empty)\n            return none;\n        if (node.inlineContent || !this.local.some(InlineType.is))\n            return this.local;\n        let result = [];\n        for (let i = 0; i < this.local.length; i++) {\n            if (!(this.local[i].type instanceof InlineType))\n                result.push(this.local[i]);\n        }\n        return result;\n    }\n    forEachSet(f) { f(this); }\n}\n/**\nThe empty set of decorations.\n*/\nDecorationSet.empty = new DecorationSet([], []);\n/**\n@internal\n*/\nDecorationSet.removeOverlap = removeOverlap;\nconst empty = DecorationSet.empty;\n// An abstraction that allows the code dealing with decorations to\n// treat multiple DecorationSet objects as if it were a single object\n// with (a subset of) the same interface.\nclass DecorationGroup {\n    constructor(members) {\n        this.members = members;\n    }\n    map(mapping, doc) {\n        const mappedDecos = this.members.map(member => member.map(mapping, doc, noSpec));\n        return DecorationGroup.from(mappedDecos);\n    }\n    forChild(offset, child) {\n        if (child.isLeaf)\n            return DecorationSet.empty;\n        let found = [];\n        for (let i = 0; i < this.members.length; i++) {\n            let result = this.members[i].forChild(offset, child);\n            if (result == empty)\n                continue;\n            if (result instanceof DecorationGroup)\n                found = found.concat(result.members);\n            else\n                found.push(result);\n        }\n        return DecorationGroup.from(found);\n    }\n    eq(other) {\n        if (!(other instanceof DecorationGroup) ||\n            other.members.length != this.members.length)\n            return false;\n        for (let i = 0; i < this.members.length; i++)\n            if (!this.members[i].eq(other.members[i]))\n                return false;\n        return true;\n    }\n    locals(node) {\n        let result, sorted = true;\n        for (let i = 0; i < this.members.length; i++) {\n            let locals = this.members[i].localsInner(node);\n            if (!locals.length)\n                continue;\n            if (!result) {\n                result = locals;\n            }\n            else {\n                if (sorted) {\n                    result = result.slice();\n                    sorted = false;\n                }\n                for (let j = 0; j < locals.length; j++)\n                    result.push(locals[j]);\n            }\n        }\n        return result ? removeOverlap(sorted ? result : result.sort(byPos)) : none;\n    }\n    // Create a group for the given array of decoration sets, or return\n    // a single set when possible.\n    static from(members) {\n        switch (members.length) {\n            case 0: return empty;\n            case 1: return members[0];\n            default: return new DecorationGroup(members.every(m => m instanceof DecorationSet) ? members :\n                members.reduce((r, m) => r.concat(m instanceof DecorationSet ? m : m.members), []));\n        }\n    }\n    forEachSet(f) {\n        for (let i = 0; i < this.members.length; i++)\n            this.members[i].forEachSet(f);\n    }\n}\nfunction mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) {\n    let children = oldChildren.slice();\n    // Mark the children that are directly touched by changes, and\n    // move those that are after the changes.\n    for (let i = 0, baseOffset = oldOffset; i < mapping.maps.length; i++) {\n        let moved = 0;\n        mapping.maps[i].forEach((oldStart, oldEnd, newStart, newEnd) => {\n            let dSize = (newEnd - newStart) - (oldEnd - oldStart);\n            for (let i = 0; i < children.length; i += 3) {\n                let end = children[i + 1];\n                if (end < 0 || oldStart > end + baseOffset - moved)\n                    continue;\n                let start = children[i] + baseOffset - moved;\n                if (oldEnd >= start) {\n                    children[i + 1] = oldStart <= start ? -2 : -1;\n                }\n                else if (oldStart >= baseOffset && dSize) {\n                    children[i] += dSize;\n                    children[i + 1] += dSize;\n                }\n            }\n            moved += dSize;\n        });\n        baseOffset = mapping.maps[i].map(baseOffset, -1);\n    }\n    // Find the child nodes that still correspond to a single node,\n    // recursively call mapInner on them and update their positions.\n    let mustRebuild = false;\n    for (let i = 0; i < children.length; i += 3)\n        if (children[i + 1] < 0) { // Touched nodes\n            if (children[i + 1] == -2) {\n                mustRebuild = true;\n                children[i + 1] = -1;\n                continue;\n            }\n            let from = mapping.map(oldChildren[i] + oldOffset), fromLocal = from - offset;\n            if (fromLocal < 0 || fromLocal >= node.content.size) {\n                mustRebuild = true;\n                continue;\n            }\n            // Must read oldChildren because children was tagged with -1\n            let to = mapping.map(oldChildren[i + 1] + oldOffset, -1), toLocal = to - offset;\n            let { index, offset: childOffset } = node.content.findIndex(fromLocal);\n            let childNode = node.maybeChild(index);\n            if (childNode && childOffset == fromLocal && childOffset + childNode.nodeSize == toLocal) {\n                let mapped = children[i + 2]\n                    .mapInner(mapping, childNode, from + 1, oldChildren[i] + oldOffset + 1, options);\n                if (mapped != empty) {\n                    children[i] = fromLocal;\n                    children[i + 1] = toLocal;\n                    children[i + 2] = mapped;\n                }\n                else {\n                    children[i + 1] = -2;\n                    mustRebuild = true;\n                }\n            }\n            else {\n                mustRebuild = true;\n            }\n        }\n    // Remaining children must be collected and rebuilt into the appropriate structure\n    if (mustRebuild) {\n        let decorations = mapAndGatherRemainingDecorations(children, oldChildren, newLocal, mapping, offset, oldOffset, options);\n        let built = buildTree(decorations, node, 0, options);\n        newLocal = built.local;\n        for (let i = 0; i < children.length; i += 3)\n            if (children[i + 1] < 0) {\n                children.splice(i, 3);\n                i -= 3;\n            }\n        for (let i = 0, j = 0; i < built.children.length; i += 3) {\n            let from = built.children[i];\n            while (j < children.length && children[j] < from)\n                j += 3;\n            children.splice(j, 0, built.children[i], built.children[i + 1], built.children[i + 2]);\n        }\n    }\n    return new DecorationSet(newLocal.sort(byPos), children);\n}\nfunction moveSpans(spans, offset) {\n    if (!offset || !spans.length)\n        return spans;\n    let result = [];\n    for (let i = 0; i < spans.length; i++) {\n        let span = spans[i];\n        result.push(new Decoration(span.from + offset, span.to + offset, span.type));\n    }\n    return result;\n}\nfunction mapAndGatherRemainingDecorations(children, oldChildren, decorations, mapping, offset, oldOffset, options) {\n    // Gather all decorations from the remaining marked children\n    function gather(set, oldOffset) {\n        for (let i = 0; i < set.local.length; i++) {\n            let mapped = set.local[i].map(mapping, offset, oldOffset);\n            if (mapped)\n                decorations.push(mapped);\n            else if (options.onRemove)\n                options.onRemove(set.local[i].spec);\n        }\n        for (let i = 0; i < set.children.length; i += 3)\n            gather(set.children[i + 2], set.children[i] + oldOffset + 1);\n    }\n    for (let i = 0; i < children.length; i += 3)\n        if (children[i + 1] == -1)\n            gather(children[i + 2], oldChildren[i] + oldOffset + 1);\n    return decorations;\n}\nfunction takeSpansForNode(spans, node, offset) {\n    if (node.isLeaf)\n        return null;\n    let end = offset + node.nodeSize, found = null;\n    for (let i = 0, span; i < spans.length; i++) {\n        if ((span = spans[i]) && span.from > offset && span.to < end) {\n            (found || (found = [])).push(span);\n            spans[i] = null;\n        }\n    }\n    return found;\n}\nfunction withoutNulls(array) {\n    let result = [];\n    for (let i = 0; i < array.length; i++)\n        if (array[i] != null)\n            result.push(array[i]);\n    return result;\n}\n// Build up a tree that corresponds to a set of decorations. `offset`\n// is a base offset that should be subtracted from the `from` and `to`\n// positions in the spans (so that we don't have to allocate new spans\n// for recursive calls).\nfunction buildTree(spans, node, offset, options) {\n    let children = [], hasNulls = false;\n    node.forEach((childNode, localStart) => {\n        let found = takeSpansForNode(spans, childNode, localStart + offset);\n        if (found) {\n            hasNulls = true;\n            let subtree = buildTree(found, childNode, offset + localStart + 1, options);\n            if (subtree != empty)\n                children.push(localStart, localStart + childNode.nodeSize, subtree);\n        }\n    });\n    let locals = moveSpans(hasNulls ? withoutNulls(spans) : spans, -offset).sort(byPos);\n    for (let i = 0; i < locals.length; i++)\n        if (!locals[i].type.valid(node, locals[i])) {\n            if (options.onRemove)\n                options.onRemove(locals[i].spec);\n            locals.splice(i--, 1);\n        }\n    return locals.length || children.length ? new DecorationSet(locals, children) : empty;\n}\n// Used to sort decorations so that ones with a low start position\n// come first, and within a set with the same start position, those\n// with an smaller end position come first.\nfunction byPos(a, b) {\n    return a.from - b.from || a.to - b.to;\n}\n// Scan a sorted array of decorations for partially overlapping spans,\n// and split those so that only fully overlapping spans are left (to\n// make subsequent rendering easier). Will return the input array if\n// no partially overlapping spans are found (the common case).\nfunction removeOverlap(spans) {\n    let working = spans;\n    for (let i = 0; i < working.length - 1; i++) {\n        let span = working[i];\n        if (span.from != span.to)\n            for (let j = i + 1; j < working.length; j++) {\n                let next = working[j];\n                if (next.from == span.from) {\n                    if (next.to != span.to) {\n                        if (working == spans)\n                            working = spans.slice();\n                        // Followed by a partially overlapping larger span. Split that\n                        // span.\n                        working[j] = next.copy(next.from, span.to);\n                        insertAhead(working, j + 1, next.copy(span.to, next.to));\n                    }\n                    continue;\n                }\n                else {\n                    if (next.from < span.to) {\n                        if (working == spans)\n                            working = spans.slice();\n                        // The end of this one overlaps with a subsequent span. Split\n                        // this one.\n                        working[i] = span.copy(span.from, next.from);\n                        insertAhead(working, j, span.copy(next.from, span.to));\n                    }\n                    break;\n                }\n            }\n    }\n    return working;\n}\nfunction insertAhead(array, i, deco) {\n    while (i < array.length && byPos(deco, array[i]) > 0)\n        i++;\n    array.splice(i, 0, deco);\n}\n// Get the decorations associated with the current props of a view.\nfunction viewDecorations(view) {\n    let found = [];\n    view.someProp(\"decorations\", f => {\n        let result = f(view.state);\n        if (result && result != empty)\n            found.push(result);\n    });\n    if (view.cursorWrapper)\n        found.push(DecorationSet.create(view.state.doc, [view.cursorWrapper.deco]));\n    return DecorationGroup.from(found);\n}\n\nconst observeOptions = {\n    childList: true,\n    characterData: true,\n    characterDataOldValue: true,\n    attributes: true,\n    attributeOldValue: true,\n    subtree: true\n};\n// IE11 has very broken mutation observers, so we also listen to DOMCharacterDataModified\nconst useCharData = ie && ie_version <= 11;\nclass SelectionState {\n    constructor() {\n        this.anchorNode = null;\n        this.anchorOffset = 0;\n        this.focusNode = null;\n        this.focusOffset = 0;\n    }\n    set(sel) {\n        this.anchorNode = sel.anchorNode;\n        this.anchorOffset = sel.anchorOffset;\n        this.focusNode = sel.focusNode;\n        this.focusOffset = sel.focusOffset;\n    }\n    clear() {\n        this.anchorNode = this.focusNode = null;\n    }\n    eq(sel) {\n        return sel.anchorNode == this.anchorNode && sel.anchorOffset == this.anchorOffset &&\n            sel.focusNode == this.focusNode && sel.focusOffset == this.focusOffset;\n    }\n}\nclass DOMObserver {\n    constructor(view, handleDOMChange) {\n        this.view = view;\n        this.handleDOMChange = handleDOMChange;\n        this.queue = [];\n        this.flushingSoon = -1;\n        this.observer = null;\n        this.currentSelection = new SelectionState;\n        this.onCharData = null;\n        this.suppressingSelectionUpdates = false;\n        this.lastChangedTextNode = null;\n        this.observer = window.MutationObserver &&\n            new window.MutationObserver(mutations => {\n                for (let i = 0; i < mutations.length; i++)\n                    this.queue.push(mutations[i]);\n                if (ie && ie_version <= 11 && mutations.some(m => m.type == \"childList\" && m.removedNodes.length ||\n                    m.type == \"characterData\" && m.oldValue.length > m.target.nodeValue.length)) {\n                    // IE11 will sometimes (on backspacing out a single character\n                    // text node after a BR node) call the observer callback\n                    // before actually updating the DOM, which will cause\n                    // ProseMirror to miss the change (see #930)\n                    this.flushSoon();\n                }\n                else if (safari && view.composing && mutations.some(m => m.type == \"childList\" && m.target.nodeName == \"TR\")) {\n                    // Safari does weird stuff when finishing a composition in a\n                    // table cell, which tends to involve inserting inappropriate\n                    // nodes in the table row.\n                    view.input.badSafariComposition = true;\n                    this.flushSoon();\n                }\n                else {\n                    this.flush();\n                }\n            });\n        if (useCharData) {\n            this.onCharData = e => {\n                this.queue.push({ target: e.target, type: \"characterData\", oldValue: e.prevValue });\n                this.flushSoon();\n            };\n        }\n        this.onSelectionChange = this.onSelectionChange.bind(this);\n    }\n    flushSoon() {\n        if (this.flushingSoon < 0)\n            this.flushingSoon = window.setTimeout(() => { this.flushingSoon = -1; this.flush(); }, 20);\n    }\n    forceFlush() {\n        if (this.flushingSoon > -1) {\n            window.clearTimeout(this.flushingSoon);\n            this.flushingSoon = -1;\n            this.flush();\n        }\n    }\n    start() {\n        if (this.observer) {\n            this.observer.takeRecords();\n            this.observer.observe(this.view.dom, observeOptions);\n        }\n        if (this.onCharData)\n            this.view.dom.addEventListener(\"DOMCharacterDataModified\", this.onCharData);\n        this.connectSelection();\n    }\n    stop() {\n        if (this.observer) {\n            let take = this.observer.takeRecords();\n            if (take.length) {\n                for (let i = 0; i < take.length; i++)\n                    this.queue.push(take[i]);\n                window.setTimeout(() => this.flush(), 20);\n            }\n            this.observer.disconnect();\n        }\n        if (this.onCharData)\n            this.view.dom.removeEventListener(\"DOMCharacterDataModified\", this.onCharData);\n        this.disconnectSelection();\n    }\n    connectSelection() {\n        this.view.dom.ownerDocument.addEventListener(\"selectionchange\", this.onSelectionChange);\n    }\n    disconnectSelection() {\n        this.view.dom.ownerDocument.removeEventListener(\"selectionchange\", this.onSelectionChange);\n    }\n    suppressSelectionUpdates() {\n        this.suppressingSelectionUpdates = true;\n        setTimeout(() => this.suppressingSelectionUpdates = false, 50);\n    }\n    onSelectionChange() {\n        if (!hasFocusAndSelection(this.view))\n            return;\n        if (this.suppressingSelectionUpdates)\n            return selectionToDOM(this.view);\n        // Deletions on IE11 fire their events in the wrong order, giving\n        // us a selection change event before the DOM changes are\n        // reported.\n        if (ie && ie_version <= 11 && !this.view.state.selection.empty) {\n            let sel = this.view.domSelectionRange();\n            // Selection.isCollapsed isn't reliable on IE\n            if (sel.focusNode && isEquivalentPosition(sel.focusNode, sel.focusOffset, sel.anchorNode, sel.anchorOffset))\n                return this.flushSoon();\n        }\n        this.flush();\n    }\n    setCurSelection() {\n        this.currentSelection.set(this.view.domSelectionRange());\n    }\n    ignoreSelectionChange(sel) {\n        if (!sel.focusNode)\n            return true;\n        let ancestors = new Set, container;\n        for (let scan = sel.focusNode; scan; scan = parentNode(scan))\n            ancestors.add(scan);\n        for (let scan = sel.anchorNode; scan; scan = parentNode(scan))\n            if (ancestors.has(scan)) {\n                container = scan;\n                break;\n            }\n        let desc = container && this.view.docView.nearestDesc(container);\n        if (desc && desc.ignoreMutation({\n            type: \"selection\",\n            target: isText(container) ? container.parentNode : container\n        })) {\n            this.setCurSelection();\n            return true;\n        }\n    }\n    pendingRecords() {\n        if (this.observer)\n            for (let mut of this.observer.takeRecords())\n                this.queue.push(mut);\n        return this.queue;\n    }\n    flush() {\n        let { view } = this;\n        if (!view.docView || this.flushingSoon > -1)\n            return;\n        let mutations = this.pendingRecords();\n        if (mutations.length)\n            this.queue = [];\n        let sel = view.domSelectionRange();\n        let newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasFocusAndSelection(view) && !this.ignoreSelectionChange(sel);\n        let from = -1, to = -1, typeOver = false, added = [];\n        if (view.editable) {\n            for (let i = 0; i < mutations.length; i++) {\n                let result = this.registerMutation(mutations[i], added);\n                if (result) {\n                    from = from < 0 ? result.from : Math.min(result.from, from);\n                    to = to < 0 ? result.to : Math.max(result.to, to);\n                    if (result.typeOver)\n                        typeOver = true;\n                }\n            }\n        }\n        if (added.some(n => n.nodeName == \"BR\") &&\n            (view.input.lastKeyCode == 8 || view.input.lastKeyCode == 46 ||\n                chrome && (view.composing || view.input.compositionEndedAt > Date.now() - 50) &&\n                    mutations.some(m => m.type == \"childList\" && m.removedNodes.length))) {\n            // Browsers sometimes insert a bogus break node if you\n            // backspace out the last bit of text before an inline-flex node (#1552)\n            for (let node of added)\n                if (node.nodeName == \"BR\" && node.parentNode) {\n                    let after = node.nextSibling;\n                    while (after && isElt(after)) {\n                        if (after.contentEditable == \"false\") {\n                            node.parentNode.removeChild(node);\n                            break;\n                        }\n                        after = after.firstChild;\n                    }\n                }\n        }\n        else if (gecko && added.length) {\n            let brs = added.filter(n => n.nodeName == \"BR\");\n            if (brs.length == 2) {\n                let [a, b] = brs;\n                if (a.parentNode && a.parentNode.parentNode == b.parentNode)\n                    b.remove();\n                else\n                    a.remove();\n            }\n            else {\n                let { focusNode } = this.currentSelection;\n                for (let br of brs) {\n                    let parent = br.parentNode;\n                    if (parent && parent.nodeName == \"LI\" && (!focusNode || blockParent(view, focusNode) != parent))\n                        br.remove();\n                }\n            }\n        }\n        let readSel = null;\n        // If it looks like the browser has reset the selection to the\n        // start of the document after focus, restore the selection from\n        // the state\n        if (from < 0 && newSel && view.input.lastFocus > Date.now() - 200 &&\n            Math.max(view.input.lastTouch, view.input.lastClick.time) < Date.now() - 300 &&\n            selectionCollapsed(sel) && (readSel = selectionFromDOM(view)) &&\n            readSel.eq(Selection.near(view.state.doc.resolve(0), 1))) {\n            view.input.lastFocus = 0;\n            selectionToDOM(view);\n            this.currentSelection.set(sel);\n            view.scrollToSelection();\n        }\n        else if (from > -1 || newSel) {\n            if (from > -1) {\n                view.docView.markDirty(from, to);\n                checkCSS(view);\n            }\n            if (view.input.badSafariComposition) {\n                view.input.badSafariComposition = false;\n                fixUpBadSafariComposition(view, added);\n            }\n            this.handleDOMChange(from, to, typeOver, added);\n            if (view.docView && view.docView.dirty)\n                view.updateState(view.state);\n            else if (!this.currentSelection.eq(sel))\n                selectionToDOM(view);\n            this.currentSelection.set(sel);\n        }\n    }\n    registerMutation(mut, added) {\n        // Ignore mutations inside nodes that were already noted as inserted\n        if (added.indexOf(mut.target) > -1)\n            return null;\n        let desc = this.view.docView.nearestDesc(mut.target);\n        if (mut.type == \"attributes\" &&\n            (desc == this.view.docView || mut.attributeName == \"contenteditable\" ||\n                // Firefox sometimes fires spurious events for null/empty styles\n                (mut.attributeName == \"style\" && !mut.oldValue && !mut.target.getAttribute(\"style\"))))\n            return null;\n        if (!desc || desc.ignoreMutation(mut))\n            return null;\n        if (mut.type == \"childList\") {\n            for (let i = 0; i < mut.addedNodes.length; i++) {\n                let node = mut.addedNodes[i];\n                added.push(node);\n                if (isText(node))\n                    this.lastChangedTextNode = node;\n            }\n            if (desc.contentDOM && desc.contentDOM != desc.dom && !desc.contentDOM.contains(mut.target))\n                return { from: desc.posBefore, to: desc.posAfter };\n            let prev = mut.previousSibling, next = mut.nextSibling;\n            if (ie && ie_version <= 11 && mut.addedNodes.length) {\n                // IE11 gives us incorrect next/prev siblings for some\n                // insertions, so if there are added nodes, recompute those\n                for (let i = 0; i < mut.addedNodes.length; i++) {\n                    let { previousSibling, nextSibling } = mut.addedNodes[i];\n                    if (!previousSibling || Array.prototype.indexOf.call(mut.addedNodes, previousSibling) < 0)\n                        prev = previousSibling;\n                    if (!nextSibling || Array.prototype.indexOf.call(mut.addedNodes, nextSibling) < 0)\n                        next = nextSibling;\n                }\n            }\n            let fromOffset = prev && prev.parentNode == mut.target\n                ? domIndex(prev) + 1 : 0;\n            let from = desc.localPosFromDOM(mut.target, fromOffset, -1);\n            let toOffset = next && next.parentNode == mut.target\n                ? domIndex(next) : mut.target.childNodes.length;\n            let to = desc.localPosFromDOM(mut.target, toOffset, 1);\n            return { from, to };\n        }\n        else if (mut.type == \"attributes\") {\n            return { from: desc.posAtStart - desc.border, to: desc.posAtEnd + desc.border };\n        }\n        else { // \"characterData\"\n            this.lastChangedTextNode = mut.target;\n            return {\n                from: desc.posAtStart,\n                to: desc.posAtEnd,\n                // An event was generated for a text change that didn't change\n                // any text. Mark the dom change to fall back to assuming the\n                // selection was typed over with an identical value if it can't\n                // find another change.\n                typeOver: mut.target.nodeValue == mut.oldValue\n            };\n        }\n    }\n}\nlet cssChecked = new WeakMap();\nlet cssCheckWarned = false;\nfunction checkCSS(view) {\n    if (cssChecked.has(view))\n        return;\n    cssChecked.set(view, null);\n    if (['normal', 'nowrap', 'pre-line'].indexOf(getComputedStyle(view.dom).whiteSpace) !== -1) {\n        view.requiresGeckoHackNode = gecko;\n        if (cssCheckWarned)\n            return;\n        console[\"warn\"](\"ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.\");\n        cssCheckWarned = true;\n    }\n}\nfunction rangeToSelectionRange(view, range) {\n    let anchorNode = range.startContainer, anchorOffset = range.startOffset;\n    let focusNode = range.endContainer, focusOffset = range.endOffset;\n    let currentAnchor = view.domAtPos(view.state.selection.anchor);\n    // Since such a range doesn't distinguish between anchor and head,\n    // use a heuristic that flips it around if its end matches the\n    // current anchor.\n    if (isEquivalentPosition(currentAnchor.node, currentAnchor.offset, focusNode, focusOffset))\n        [anchorNode, anchorOffset, focusNode, focusOffset] = [focusNode, focusOffset, anchorNode, anchorOffset];\n    return { anchorNode, anchorOffset, focusNode, focusOffset };\n}\n// Used to work around a Safari Selection/shadow DOM bug\n// Based on https://github.com/codemirror/dev/issues/414 fix\nfunction safariShadowSelectionRange(view, selection) {\n    if (selection.getComposedRanges) {\n        let range = selection.getComposedRanges(view.root)[0];\n        if (range)\n            return rangeToSelectionRange(view, range);\n    }\n    let found;\n    function read(event) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n        found = event.getTargetRanges()[0];\n    }\n    // Because Safari (at least in 2018-2022) doesn't provide regular\n    // access to the selection inside a shadowRoot, we have to perform a\n    // ridiculous hack to get at it—using `execCommand` to trigger a\n    // `beforeInput` event so that we can read the target range from the\n    // event.\n    view.dom.addEventListener(\"beforeinput\", read, true);\n    document.execCommand(\"indent\");\n    view.dom.removeEventListener(\"beforeinput\", read, true);\n    return found ? rangeToSelectionRange(view, found) : null;\n}\nfunction blockParent(view, node) {\n    for (let p = node.parentNode; p && p != view.dom; p = p.parentNode) {\n        let desc = view.docView.nearestDesc(p, true);\n        if (desc && desc.node.isBlock)\n            return p;\n    }\n    return null;\n}\n// Kludge for a Safari bug where, on ending a composition in an\n// otherwise empty table cell, it randomly moves the composed text\n// into the table row around that cell, greatly confusing everything\n// (#188).\nfunction fixUpBadSafariComposition(view, addedNodes) {\n    var _a;\n    let { focusNode, focusOffset } = view.domSelectionRange();\n    for (let node of addedNodes) {\n        if (((_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.nodeName) == \"TR\") {\n            let nextCell = node.nextSibling;\n            while (nextCell && (nextCell.nodeName != \"TD\" && nextCell.nodeName != \"TH\"))\n                nextCell = nextCell.nextSibling;\n            if (nextCell) {\n                let parent = nextCell;\n                for (;;) {\n                    let first = parent.firstChild;\n                    if (!first || !isElt(first) || first.contentEditable == \"false\" || /^(BR|IMG)$/.test(first.nodeName))\n                        break;\n                    parent = first;\n                }\n                parent.insertBefore(node, parent.firstChild);\n                if (focusNode == node)\n                    view.domSelection().collapse(node, focusOffset);\n            }\n            else {\n                node.parentNode.removeChild(node);\n            }\n        }\n    }\n}\n\n// Note that all referencing and parsing is done with the\n// start-of-operation selection and document, since that's the one\n// that the DOM represents. If any changes came in in the meantime,\n// the modification is mapped over those before it is applied, in\n// readDOMChange.\nfunction parseBetween(view, from_, to_, addedNodes) {\n    let { node: parent, fromOffset, toOffset, from, to } = view.docView.parseRange(from_, to_);\n    let domSel = view.domSelectionRange();\n    let find;\n    let anchor = domSel.anchorNode;\n    if (anchor && contains(view.dom, anchor)) {\n        find = [{ node: anchor, offset: domSel.anchorOffset }];\n        if (!selectionCollapsed(domSel))\n            find.push({ node: domSel.focusNode, offset: domSel.focusOffset });\n    }\n    // Work around issue in Chrome where backspacing sometimes replaces\n    // the deleted content with a random BR node (issues #799, #831)\n    if (chrome && view.input.lastKeyCode === 8) {\n        for (let off = toOffset; off > fromOffset; off--) {\n            let node = parent.childNodes[off - 1], desc = node.pmViewDesc;\n            if (node.nodeName == \"BR\" && !desc) {\n                toOffset = off;\n                break;\n            }\n            if (!desc || desc.size)\n                break;\n        }\n    }\n    let startDoc = view.state.doc;\n    let parser = view.someProp(\"domParser\") || DOMParser.fromSchema(view.state.schema);\n    let $from = startDoc.resolve(from);\n    let sel = null, doc = parser.parse(parent, {\n        topNode: $from.parent,\n        topMatch: $from.parent.contentMatchAt($from.index()),\n        topOpen: true,\n        from: fromOffset,\n        to: toOffset,\n        preserveWhitespace: $from.parent.type.whitespace == \"pre\" ? \"full\" : true,\n        findPositions: find,\n        ruleFromNode: ruleFromNode(addedNodes),\n        context: $from\n    });\n    if (find && find[0].pos != null) {\n        let anchor = find[0].pos, head = find[1] && find[1].pos;\n        if (head == null)\n            head = anchor;\n        sel = { anchor: anchor + from, head: head + from };\n    }\n    return { doc, sel, from, to };\n}\nconst ruleFromNode = (added) => (dom) => {\n    let desc = dom.pmViewDesc;\n    if (desc) {\n        return desc.parseRule(added);\n    }\n    else if (dom.nodeName == \"BR\" && dom.parentNode) {\n        // Safari replaces the list item or table cell with a BR\n        // directly in the list node (?!) if you delete the last\n        // character in a list item or table cell (#708, #862)\n        if (safari && /^(ul|ol)$/i.test(dom.parentNode.nodeName)) {\n            let skip = document.createElement(\"div\");\n            skip.appendChild(document.createElement(\"li\"));\n            return { skip };\n        }\n        else if (dom.parentNode.lastChild == dom || safari && /^(tr|table)$/i.test(dom.parentNode.nodeName)) {\n            return { ignore: true };\n        }\n    }\n    else if (dom.nodeName == \"IMG\" && dom.getAttribute(\"mark-placeholder\")) {\n        return { ignore: true };\n    }\n    return null;\n};\nconst isInline = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;\nfunction readDOMChange(view, from, to, typeOver, addedNodes) {\n    let compositionID = view.input.compositionPendingChanges || (view.composing ? view.input.compositionID : 0);\n    view.input.compositionPendingChanges = 0;\n    if (from < 0) {\n        let origin = view.input.lastSelectionTime > Date.now() - 50 ? view.input.lastSelectionOrigin : null;\n        let newSel = selectionFromDOM(view, origin);\n        if (newSel && !view.state.selection.eq(newSel)) {\n            if (chrome && android &&\n                view.input.lastKeyCode === 13 && Date.now() - 100 < view.input.lastKeyCodeTime &&\n                view.someProp(\"handleKeyDown\", f => f(view, keyEvent(13, \"Enter\"))))\n                return;\n            let tr = view.state.tr.setSelection(newSel);\n            if (origin == \"pointer\")\n                tr.setMeta(\"pointer\", true);\n            else if (origin == \"key\")\n                tr.scrollIntoView();\n            if (compositionID)\n                tr.setMeta(\"composition\", compositionID);\n            view.dispatch(tr);\n        }\n        return;\n    }\n    let $before = view.state.doc.resolve(from);\n    let shared = $before.sharedDepth(to);\n    from = $before.before(shared + 1);\n    to = view.state.doc.resolve(to).after(shared + 1);\n    let sel = view.state.selection;\n    let parse = parseBetween(view, from, to, addedNodes);\n    let doc = view.state.doc, compare = doc.slice(parse.from, parse.to);\n    let preferredPos, preferredSide;\n    // Prefer anchoring to end when Backspace is pressed\n    if (view.input.lastKeyCode === 8 && Date.now() - 100 < view.input.lastKeyCodeTime) {\n        preferredPos = view.state.selection.to;\n        preferredSide = \"end\";\n    }\n    else {\n        preferredPos = view.state.selection.from;\n        preferredSide = \"start\";\n    }\n    view.input.lastKeyCode = null;\n    let change = findDiff(compare.content, parse.doc.content, parse.from, preferredPos, preferredSide);\n    if (change)\n        view.input.domChangeCount++;\n    if ((ios && view.input.lastIOSEnter > Date.now() - 225 || android) &&\n        addedNodes.some(n => isElt(n) && !isInline.test(n.nodeName)) &&\n        (!change || change.endA >= change.endB) &&\n        view.someProp(\"handleKeyDown\", f => f(view, keyEvent(13, \"Enter\")))) {\n        view.input.lastIOSEnter = 0;\n        return;\n    }\n    if (!change) {\n        if (typeOver && sel instanceof TextSelection && !sel.empty && sel.$head.sameParent(sel.$anchor) &&\n            !view.composing && !(parse.sel && parse.sel.anchor != parse.sel.head)) {\n            change = { start: sel.from, endA: sel.to, endB: sel.to };\n        }\n        else {\n            if (parse.sel) {\n                let sel = resolveSelection(view, view.state.doc, parse.sel);\n                if (sel && !sel.eq(view.state.selection)) {\n                    let tr = view.state.tr.setSelection(sel);\n                    if (compositionID)\n                        tr.setMeta(\"composition\", compositionID);\n                    view.dispatch(tr);\n                }\n            }\n            return;\n        }\n    }\n    // Handle the case where overwriting a selection by typing matches\n    // the start or end of the selected content, creating a change\n    // that's smaller than what was actually overwritten.\n    if (view.state.selection.from < view.state.selection.to &&\n        change.start == change.endB &&\n        view.state.selection instanceof TextSelection) {\n        if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2 &&\n            view.state.selection.from >= parse.from) {\n            change.start = view.state.selection.from;\n        }\n        else if (change.endA < view.state.selection.to && change.endA >= view.state.selection.to - 2 &&\n            view.state.selection.to <= parse.to) {\n            change.endB += (view.state.selection.to - change.endA);\n            change.endA = view.state.selection.to;\n        }\n    }\n    // IE11 will insert a non-breaking space _ahead_ of the space after\n    // the cursor space when adding a space before another space. When\n    // that happened, adjust the change to cover the space instead.\n    if (ie && ie_version <= 11 && change.endB == change.start + 1 &&\n        change.endA == change.start && change.start > parse.from &&\n        parse.doc.textBetween(change.start - parse.from - 1, change.start - parse.from + 1) == \" \\u00a0\") {\n        change.start--;\n        change.endA--;\n        change.endB--;\n    }\n    let $from = parse.doc.resolveNoCache(change.start - parse.from);\n    let $to = parse.doc.resolveNoCache(change.endB - parse.from);\n    let $fromA = doc.resolve(change.start);\n    let inlineChange = $from.sameParent($to) && $from.parent.inlineContent && $fromA.end() >= change.endA;\n    // If this looks like the effect of pressing Enter (or was recorded\n    // as being an iOS enter press), just dispatch an Enter key instead.\n    if (((ios && view.input.lastIOSEnter > Date.now() - 225 &&\n        (!inlineChange || addedNodes.some(n => n.nodeName == \"DIV\" || n.nodeName == \"P\"))) ||\n        (!inlineChange && looksLikeEnter(parse.doc, $from.pos, $to.pos))) &&\n        view.someProp(\"handleKeyDown\", f => f(view, keyEvent(13, \"Enter\")))) {\n        view.input.lastIOSEnter = 0;\n        return;\n    }\n    // Same for backspace\n    if (view.state.selection.anchor > change.start &&\n        looksLikeBackspace(doc, change.start, change.endA, $from, $to) &&\n        view.someProp(\"handleKeyDown\", f => f(view, keyEvent(8, \"Backspace\")))) {\n        if (android && chrome)\n            view.domObserver.suppressSelectionUpdates(); // #820\n        return;\n    }\n    // Chrome will occasionally, during composition, delete the\n    // entire composition and then immediately insert it again. This is\n    // used to detect that situation.\n    if (chrome && change.endB == change.start)\n        view.input.lastChromeDelete = Date.now();\n    // This tries to detect Android virtual keyboard\n    // enter-and-pick-suggestion action. That sometimes (see issue\n    // #1059) first fires a DOM mutation, before moving the selection to\n    // the newly created block. And then, because ProseMirror cleans up\n    // the DOM selection, it gives up moving the selection entirely,\n    // leaving the cursor in the wrong place. When that happens, we drop\n    // the new paragraph from the initial change, and fire a simulated\n    // enter key afterwards.\n    if (android && !inlineChange && $from.start() != $to.start() && $to.parentOffset == 0 && $from.depth == $to.depth &&\n        parse.sel && parse.sel.anchor == parse.sel.head && parse.sel.head == change.endA) {\n        change.endB -= 2;\n        $to = parse.doc.resolveNoCache(change.endB - parse.from);\n        setTimeout(() => {\n            view.someProp(\"handleKeyDown\", function (f) { return f(view, keyEvent(13, \"Enter\")); });\n        }, 20);\n    }\n    let chFrom = change.start, chTo = change.endA;\n    let mkTr = (base) => {\n        let tr = base || view.state.tr.replace(chFrom, chTo, parse.doc.slice(change.start - parse.from, change.endB - parse.from));\n        if (parse.sel) {\n            let sel = resolveSelection(view, tr.doc, parse.sel);\n            // Chrome will sometimes, during composition, report the\n            // selection in the wrong place. If it looks like that is\n            // happening, don't update the selection.\n            // Edge just doesn't move the cursor forward when you start typing\n            // in an empty block or between br nodes.\n            if (sel && !(chrome && view.composing && sel.empty &&\n                (change.start != change.endB || view.input.lastChromeDelete < Date.now() - 100) &&\n                (sel.head == chFrom || sel.head == tr.mapping.map(chTo) - 1) ||\n                ie && sel.empty && sel.head == chFrom))\n                tr.setSelection(sel);\n        }\n        if (compositionID)\n            tr.setMeta(\"composition\", compositionID);\n        return tr.scrollIntoView();\n    };\n    let markChange;\n    if (inlineChange) {\n        if ($from.pos == $to.pos) { // Deletion\n            // IE11 sometimes weirdly moves the DOM selection around after\n            // backspacing out the first element in a textblock\n            if (ie && ie_version <= 11 && $from.parentOffset == 0) {\n                view.domObserver.suppressSelectionUpdates();\n                setTimeout(() => selectionToDOM(view), 20);\n            }\n            let tr = mkTr(view.state.tr.delete(chFrom, chTo));\n            let marks = doc.resolve(change.start).marksAcross(doc.resolve(change.endA));\n            if (marks)\n                tr.ensureMarks(marks);\n            view.dispatch(tr);\n        }\n        else if ( // Adding or removing a mark\n        change.endA == change.endB &&\n            (markChange = isMarkChange($from.parent.content.cut($from.parentOffset, $to.parentOffset), $fromA.parent.content.cut($fromA.parentOffset, change.endA - $fromA.start())))) {\n            let tr = mkTr(view.state.tr);\n            if (markChange.type == \"add\")\n                tr.addMark(chFrom, chTo, markChange.mark);\n            else\n                tr.removeMark(chFrom, chTo, markChange.mark);\n            view.dispatch(tr);\n        }\n        else if ($from.parent.child($from.index()).isText && $from.index() == $to.index() - ($to.textOffset ? 0 : 1)) {\n            // Both positions in the same text node -- simply insert text\n            let text = $from.parent.textBetween($from.parentOffset, $to.parentOffset);\n            let deflt = () => mkTr(view.state.tr.insertText(text, chFrom, chTo));\n            if (!view.someProp(\"handleTextInput\", f => f(view, chFrom, chTo, text, deflt)))\n                view.dispatch(deflt());\n        }\n        else {\n            view.dispatch(mkTr());\n        }\n    }\n    else {\n        view.dispatch(mkTr());\n    }\n}\nfunction resolveSelection(view, doc, parsedSel) {\n    if (Math.max(parsedSel.anchor, parsedSel.head) > doc.content.size)\n        return null;\n    return selectionBetween(view, doc.resolve(parsedSel.anchor), doc.resolve(parsedSel.head));\n}\n// Given two same-length, non-empty fragments of inline content,\n// determine whether the first could be created from the second by\n// removing or adding a single mark type.\nfunction isMarkChange(cur, prev) {\n    let curMarks = cur.firstChild.marks, prevMarks = prev.firstChild.marks;\n    let added = curMarks, removed = prevMarks, type, mark, update;\n    for (let i = 0; i < prevMarks.length; i++)\n        added = prevMarks[i].removeFromSet(added);\n    for (let i = 0; i < curMarks.length; i++)\n        removed = curMarks[i].removeFromSet(removed);\n    if (added.length == 1 && removed.length == 0) {\n        mark = added[0];\n        type = \"add\";\n        update = (node) => node.mark(mark.addToSet(node.marks));\n    }\n    else if (added.length == 0 && removed.length == 1) {\n        mark = removed[0];\n        type = \"remove\";\n        update = (node) => node.mark(mark.removeFromSet(node.marks));\n    }\n    else {\n        return null;\n    }\n    let updated = [];\n    for (let i = 0; i < prev.childCount; i++)\n        updated.push(update(prev.child(i)));\n    if (Fragment.from(updated).eq(cur))\n        return { mark, type };\n}\nfunction looksLikeBackspace(old, start, end, $newStart, $newEnd) {\n    if ( // The content must have shrunk\n    end - start <= $newEnd.pos - $newStart.pos ||\n        // newEnd must point directly at or after the end of the block that newStart points into\n        skipClosingAndOpening($newStart, true, false) < $newEnd.pos)\n        return false;\n    let $start = old.resolve(start);\n    // Handle the case where, rather than joining blocks, the change just removed an entire block\n    if (!$newStart.parent.isTextblock) {\n        let after = $start.nodeAfter;\n        return after != null && end == start + after.nodeSize;\n    }\n    // Start must be at the end of a block\n    if ($start.parentOffset < $start.parent.content.size || !$start.parent.isTextblock)\n        return false;\n    let $next = old.resolve(skipClosingAndOpening($start, true, true));\n    // The next textblock must start before end and end near it\n    if (!$next.parent.isTextblock || $next.pos > end ||\n        skipClosingAndOpening($next, true, false) < end)\n        return false;\n    // The fragments after the join point must match\n    return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content);\n}\nfunction looksLikeEnter(content, from, to) {\n    let newTextlines = 0, newLeaves = 0;\n    content.nodesBetween(from, to, (node, pos) => {\n        if (node.isTextblock && pos >= from && pos < to)\n            newTextlines++;\n        else if (node.isText ? /\\S/.test(node.text.slice(Math.max(0, from - pos), Math.min(node.nodeSize, to - pos))) : node.isLeaf)\n            newLeaves++;\n    });\n    return newLeaves == 0 && newTextlines == 1;\n}\nfunction skipClosingAndOpening($pos, fromEnd, mayOpen) {\n    let depth = $pos.depth, end = fromEnd ? $pos.end() : $pos.pos;\n    while (depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)) {\n        depth--;\n        end++;\n        fromEnd = false;\n    }\n    if (mayOpen) {\n        let next = $pos.node(depth).maybeChild($pos.indexAfter(depth));\n        while (next && !next.isLeaf) {\n            next = next.firstChild;\n            end++;\n        }\n    }\n    return end;\n}\nfunction findDiff(a, b, pos, preferredPos, preferredSide) {\n    let start = a.findDiffStart(b, pos), lenA = pos + a.size, lenB = pos + b.size;\n    if (start == null)\n        return null;\n    let { a: endA, b: endB } = a.findDiffEnd(b, lenA, lenB);\n    if (preferredSide == \"end\") {\n        let adjust = Math.max(0, start - Math.min(endA, endB));\n        preferredPos -= endA + adjust - start;\n    }\n    if (endA < start && lenA < lenB) {\n        let move = preferredPos <= start && preferredPos >= endA ? start - preferredPos : 0;\n        start -= move;\n        endB = start + (endB - endA);\n        endA = start;\n    }\n    else if (endB < start) {\n        let move = preferredPos <= start && preferredPos >= endB ? start - preferredPos : 0;\n        start -= move;\n        endA = start + (endA - endB);\n        endB = start;\n    }\n    return { start, endA, endB };\n}\n\n/**\n@internal\n*/\nconst __parseFromClipboard = parseFromClipboard;\n/**\n@internal\n*/\nconst __endComposition = endComposition;\n/**\nAn editor view manages the DOM structure that represents an\neditable document. Its state and behavior are determined by its\n[props](https://prosemirror.net/docs/ref/#view.DirectEditorProps).\n*/\nclass EditorView {\n    /**\n    Create a view. `place` may be a DOM node that the editor should\n    be appended to, a function that will place it into the document,\n    or an object whose `mount` property holds the node to use as the\n    document container. If it is `null`, the editor will not be\n    added to the document.\n    */\n    constructor(place, props) {\n        this._root = null;\n        /**\n        @internal\n        */\n        this.focused = false;\n        /**\n        Kludge used to work around a Chrome bug @internal\n        */\n        this.trackWrites = null;\n        this.mounted = false;\n        /**\n        @internal\n        */\n        this.markCursor = null;\n        /**\n        @internal\n        */\n        this.cursorWrapper = null;\n        /**\n        @internal\n        */\n        this.lastSelectedViewDesc = undefined;\n        /**\n        @internal\n        */\n        this.input = new InputState;\n        this.prevDirectPlugins = [];\n        this.pluginViews = [];\n        /**\n        Holds `true` when a hack node is needed in Firefox to prevent the\n        [space is eaten issue](https://code.haverbeke.berlin/prosemirror/prosemirror/issues/651)\n        @internal\n        */\n        this.requiresGeckoHackNode = false;\n        /**\n        When editor content is being dragged, this object contains\n        information about the dragged slice and whether it is being\n        copied or moved. At any other time, it is null.\n        */\n        this.dragging = null;\n        this._props = props;\n        this.state = props.state;\n        this.directPlugins = props.plugins || [];\n        this.directPlugins.forEach(checkStateComponent);\n        this.dispatch = this.dispatch.bind(this);\n        this.dom = (place && place.mount) || document.createElement(\"div\");\n        if (place) {\n            if (place.appendChild)\n                place.appendChild(this.dom);\n            else if (typeof place == \"function\")\n                place(this.dom);\n            else if (place.mount)\n                this.mounted = true;\n        }\n        this.editable = getEditable(this);\n        updateCursorWrapper(this);\n        this.nodeViews = buildNodeViews(this);\n        this.docView = docViewDesc(this.state.doc, computeDocDeco(this), viewDecorations(this), this.dom, this);\n        this.domObserver = new DOMObserver(this, (from, to, typeOver, added) => readDOMChange(this, from, to, typeOver, added));\n        this.domObserver.start();\n        initInput(this);\n        this.updatePluginViews();\n    }\n    /**\n    Holds `true` when a\n    [composition](https://w3c.github.io/uievents/#events-compositionevents)\n    is active.\n    */\n    get composing() { return this.input.composing; }\n    /**\n    The view's current [props](https://prosemirror.net/docs/ref/#view.EditorProps).\n    */\n    get props() {\n        if (this._props.state != this.state) {\n            let prev = this._props;\n            this._props = {};\n            for (let name in prev)\n                this._props[name] = prev[name];\n            this._props.state = this.state;\n        }\n        return this._props;\n    }\n    /**\n    Update the view's props. Will immediately cause an update to\n    the DOM.\n    */\n    update(props) {\n        if (props.handleDOMEvents != this._props.handleDOMEvents)\n            ensureListeners(this);\n        let prevProps = this._props;\n        this._props = props;\n        if (props.plugins) {\n            props.plugins.forEach(checkStateComponent);\n            this.directPlugins = props.plugins;\n        }\n        this.updateStateInner(props.state, prevProps);\n    }\n    /**\n    Update the view by updating existing props object with the object\n    given as argument. Equivalent to `view.update(Object.assign({},\n    view.props, props))`.\n    */\n    setProps(props) {\n        let updated = {};\n        for (let name in this._props)\n            updated[name] = this._props[name];\n        updated.state = this.state;\n        for (let name in props)\n            updated[name] = props[name];\n        this.update(updated);\n    }\n    /**\n    Update the editor's `state` prop, without touching any of the\n    other props.\n    */\n    updateState(state) {\n        this.updateStateInner(state, this._props);\n    }\n    updateStateInner(state, prevProps) {\n        var _a;\n        let prev = this.state, redraw = false, updateSel = false;\n        // When stored marks are added, stop composition, so that they can\n        // be displayed.\n        if (state.storedMarks && this.composing) {\n            clearComposition(this);\n            updateSel = true;\n        }\n        this.state = state;\n        let pluginsChanged = prev.plugins != state.plugins || this._props.plugins != prevProps.plugins;\n        if (pluginsChanged || this._props.plugins != prevProps.plugins || this._props.nodeViews != prevProps.nodeViews) {\n            let nodeViews = buildNodeViews(this);\n            if (changedNodeViews(nodeViews, this.nodeViews)) {\n                this.nodeViews = nodeViews;\n                redraw = true;\n            }\n        }\n        if (pluginsChanged || prevProps.handleDOMEvents != this._props.handleDOMEvents) {\n            ensureListeners(this);\n        }\n        this.editable = getEditable(this);\n        updateCursorWrapper(this);\n        let innerDeco = viewDecorations(this), outerDeco = computeDocDeco(this);\n        let scroll = prev.plugins != state.plugins && !prev.doc.eq(state.doc) ? \"reset\"\n            : state.scrollToSelection > prev.scrollToSelection ? \"to selection\" : \"preserve\";\n        let updateDoc = redraw || !this.docView.matchesNode(state.doc, outerDeco, innerDeco);\n        if (updateDoc || !state.selection.eq(prev.selection))\n            updateSel = true;\n        let oldScrollPos = scroll == \"preserve\" && updateSel && this.dom.style.overflowAnchor == null && storeScrollPos(this);\n        if (updateSel) {\n            this.domObserver.stop();\n            // Work around an issue in Chrome, IE, and Edge where changing\n            // the DOM around an active selection puts it into a broken\n            // state where the thing the user sees differs from the\n            // selection reported by the Selection object (#710, #973,\n            // #1011, #1013, #1035).\n            let forceSelUpdate = updateDoc && (ie || chrome) && !this.composing &&\n                !prev.selection.empty && !state.selection.empty && selectionContextChanged(prev.selection, state.selection);\n            if (updateDoc) {\n                // If the node that the selection points into is written to,\n                // Chrome sometimes starts misreporting the selection, so this\n                // tracks that and forces a selection reset when our update\n                // did write to the node.\n                let chromeKludge = chrome ? (this.trackWrites = this.domSelectionRange().focusNode) : null;\n                if (this.composing)\n                    this.input.compositionNode = findCompositionNode(this);\n                if (redraw || !this.docView.update(state.doc, outerDeco, innerDeco, this)) {\n                    this.docView.updateOuterDeco(outerDeco);\n                    this.docView.destroy();\n                    this.docView = docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);\n                }\n                if (chromeKludge && (!this.trackWrites || !this.dom.contains(this.trackWrites)))\n                    forceSelUpdate = true;\n            }\n            // Work around for an issue where an update arriving right between\n            // a DOM selection change and the \"selectionchange\" event for it\n            // can cause a spurious DOM selection update, disrupting mouse\n            // drag selection.\n            let mouseDown = this.input.mouseDown;\n            if (forceSelUpdate ||\n                !(mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) &&\n                    anchorInRightPlace(this) && mouseDown.delaySelUpdate())) {\n                selectionToDOM(this, forceSelUpdate);\n            }\n            else {\n                syncNodeSelection(this, state.selection);\n                this.domObserver.setCurSelection();\n            }\n            this.domObserver.start();\n        }\n        this.updatePluginViews(prev);\n        if (((_a = this.dragging) === null || _a === void 0 ? void 0 : _a.node) && !prev.doc.eq(state.doc))\n            this.updateDraggedNode(this.dragging, prev);\n        if (scroll == \"reset\") {\n            this.dom.scrollTop = 0;\n        }\n        else if (scroll == \"to selection\") {\n            this.scrollToSelection();\n        }\n        else if (oldScrollPos) {\n            resetScrollPos(oldScrollPos);\n        }\n    }\n    /**\n    @internal\n    */\n    scrollToSelection() {\n        let startDOM = this.domSelectionRange().focusNode;\n        if (!startDOM || !contains(this.dom, startDOM)) ;\n        else if (this.someProp(\"handleScrollToSelection\", f => f(this))) ;\n        else if (this.state.selection instanceof NodeSelection) {\n            let target = this.docView.domAfterPos(this.state.selection.from);\n            if (isElt(target))\n                scrollRectIntoView(this, target.getBoundingClientRect(), startDOM);\n        }\n        else {\n            scrollRectIntoView(this, this.coordsAtPos(this.state.selection.head, 1), startDOM);\n        }\n    }\n    destroyPluginViews() {\n        let view;\n        while (view = this.pluginViews.pop())\n            if (view.destroy)\n                view.destroy();\n    }\n    updatePluginViews(prevState) {\n        if (!prevState || prevState.plugins != this.state.plugins || this.directPlugins != this.prevDirectPlugins) {\n            this.prevDirectPlugins = this.directPlugins;\n            this.destroyPluginViews();\n            for (let i = 0; i < this.directPlugins.length; i++) {\n                let plugin = this.directPlugins[i];\n                if (plugin.spec.view)\n                    this.pluginViews.push(plugin.spec.view(this));\n            }\n            for (let i = 0; i < this.state.plugins.length; i++) {\n                let plugin = this.state.plugins[i];\n                if (plugin.spec.view)\n                    this.pluginViews.push(plugin.spec.view(this));\n            }\n        }\n        else {\n            for (let i = 0; i < this.pluginViews.length; i++) {\n                let pluginView = this.pluginViews[i];\n                if (pluginView.update)\n                    pluginView.update(this, prevState);\n            }\n        }\n    }\n    updateDraggedNode(dragging, prev) {\n        let sel = dragging.node, found = -1;\n        if (sel.from < this.state.doc.content.size && this.state.doc.nodeAt(sel.from) == sel.node) {\n            found = sel.from;\n        }\n        else {\n            let movedPos = sel.from + (this.state.doc.content.size - prev.doc.content.size);\n            let moved = movedPos > 0 && movedPos < this.state.doc.content.size && this.state.doc.nodeAt(movedPos);\n            if (moved == sel.node)\n                found = movedPos;\n        }\n        this.dragging = new Dragging(dragging.slice, dragging.move, found < 0 ? undefined : NodeSelection.create(this.state.doc, found));\n    }\n    someProp(propName, f) {\n        let prop = this._props && this._props[propName], value;\n        if (prop != null && (value = f ? f(prop) : prop))\n            return value;\n        for (let i = 0; i < this.directPlugins.length; i++) {\n            let prop = this.directPlugins[i].props[propName];\n            if (prop != null && (value = f ? f(prop) : prop))\n                return value;\n        }\n        let plugins = this.state.plugins;\n        if (plugins)\n            for (let i = 0; i < plugins.length; i++) {\n                let prop = plugins[i].props[propName];\n                if (prop != null && (value = f ? f(prop) : prop))\n                    return value;\n            }\n    }\n    /**\n    Query whether the view has focus.\n    */\n    hasFocus() {\n        // Work around IE not handling focus correctly if resize handles are shown.\n        // If the cursor is inside an element with resize handles, activeElement\n        // will be that element instead of this.dom.\n        if (ie) {\n            // If activeElement is within this.dom, and there are no other elements\n            // setting `contenteditable` to false in between, treat it as focused.\n            let node = this.root.activeElement;\n            if (node == this.dom)\n                return true;\n            if (!node || !this.dom.contains(node))\n                return false;\n            while (node && this.dom != node && this.dom.contains(node)) {\n                if (node.contentEditable == 'false')\n                    return false;\n                node = node.parentElement;\n            }\n            return true;\n        }\n        return this.root.activeElement == this.dom;\n    }\n    /**\n    Focus the editor.\n    */\n    focus() {\n        this.domObserver.stop();\n        if (this.editable)\n            focusPreventScroll(this.dom);\n        selectionToDOM(this);\n        this.domObserver.start();\n    }\n    /**\n    Get the document root in which the editor exists. This will\n    usually be the top-level `document`, but might be a [shadow\n    DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM)\n    root if the editor is inside one.\n    */\n    get root() {\n        let cached = this._root;\n        if (cached == null)\n            for (let search = this.dom.parentNode; search; search = search.parentNode) {\n                if (search.nodeType == 9 || (search.nodeType == 11 && search.host)) {\n                    if (!search.getSelection)\n                        Object.getPrototypeOf(search).getSelection = () => search.ownerDocument.getSelection();\n                    return this._root = search;\n                }\n            }\n        return cached || document;\n    }\n    /**\n    When an existing editor view is moved to a new document or\n    shadow tree, call this to make it recompute its root.\n    */\n    updateRoot() {\n        this._root = null;\n    }\n    /**\n    Given a pair of viewport coordinates, return the document\n    position that corresponds to them. May return null if the given\n    coordinates aren't inside of the editor. When an object is\n    returned, its `pos` property is the position nearest to the\n    coordinates, and its `inside` property holds the position of the\n    inner node that the position falls inside of, or -1 if it is at\n    the top level, not in any node.\n    */\n    posAtCoords(coords) {\n        return posAtCoords(this, coords);\n    }\n    /**\n    Returns the viewport rectangle at a given document position.\n    `left` and `right` will be the same number, as this returns a\n    flat cursor-ish rectangle. If the position is between two things\n    that aren't directly adjacent, `side` determines which element\n    is used. When < 0, the element before the position is used,\n    otherwise the element after.\n    */\n    coordsAtPos(pos, side = 1) {\n        return coordsAtPos(this, pos, side);\n    }\n    /**\n    Find the DOM position that corresponds to the given document\n    position. When `side` is negative, find the position as close as\n    possible to the content before the position. When positive,\n    prefer positions close to the content after the position. When\n    zero, prefer as shallow a position as possible.\n    \n    Note that you should **not** mutate the editor's internal DOM,\n    only inspect it (and even that is usually not necessary).\n    */\n    domAtPos(pos, side = 0) {\n        return this.docView.domFromPos(pos, side);\n    }\n    /**\n    Find the DOM node that represents the document node after the\n    given position. May return `null` when the position doesn't point\n    in front of a node or if the node is inside an opaque node view.\n    \n    This is intended to be able to call things like\n    `getBoundingClientRect` on that DOM node. Do **not** mutate the\n    editor DOM directly, or add styling this way, since that will be\n    immediately overriden by the editor as it redraws the node.\n    */\n    nodeDOM(pos) {\n        let desc = this.docView.descAt(pos);\n        return desc ? desc.nodeDOM : null;\n    }\n    /**\n    Find the document position that corresponds to a given DOM\n    position. (Whenever possible, it is preferable to inspect the\n    document structure directly, rather than poking around in the\n    DOM, but sometimes—for example when interpreting an event\n    target—you don't have a choice.)\n    \n    The `bias` parameter can be used to influence which side of a DOM\n    node to use when the position is inside a leaf node.\n    */\n    posAtDOM(node, offset, bias = -1) {\n        let pos = this.docView.posFromDOM(node, offset, bias);\n        if (pos == null)\n            throw new RangeError(\"DOM position not inside the editor\");\n        return pos;\n    }\n    /**\n    Find out whether the selection is at the end of a textblock when\n    moving in a given direction. When, for example, given `\"left\"`,\n    it will return true if moving left from the current cursor\n    position would leave that position's parent textblock. Will apply\n    to the view's current state by default, but it is possible to\n    pass a different state.\n    */\n    endOfTextblock(dir, state) {\n        return endOfTextblock(this, state || this.state, dir);\n    }\n    /**\n    Run the editor's paste logic with the given HTML string. The\n    `event`, if given, will be passed to the\n    [`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.\n    */\n    pasteHTML(html, event) {\n        return doPaste(this, \"\", html, false, event || new ClipboardEvent(\"paste\"));\n    }\n    /**\n    Run the editor's paste logic with the given plain-text input.\n    */\n    pasteText(text, event) {\n        return doPaste(this, text, null, true, event || new ClipboardEvent(\"paste\"));\n    }\n    /**\n    Serialize the given slice as it would be if it was copied from\n    this editor. Returns a DOM element that contains a\n    representation of the slice as its children, a textual\n    representation, and the transformed slice (which can be\n    different from the given input due to hooks like\n    [`transformCopied`](https://prosemirror.net/docs/ref/#view.EditorProps.transformCopied)).\n    */\n    serializeForClipboard(slice) {\n        return serializeForClipboard(this, slice);\n    }\n    /**\n    Removes the editor from the DOM and destroys all [node\n    views](https://prosemirror.net/docs/ref/#view.NodeView).\n    */\n    destroy() {\n        if (!this.docView)\n            return;\n        destroyInput(this);\n        this.destroyPluginViews();\n        if (this.mounted) {\n            this.docView.update(this.state.doc, [], viewDecorations(this), this);\n            this.dom.textContent = \"\";\n        }\n        else if (this.dom.parentNode) {\n            this.dom.parentNode.removeChild(this.dom);\n        }\n        this.docView.destroy();\n        this.docView = null;\n        clearReusedRange();\n    }\n    /**\n    This is true when the view has been\n    [destroyed](https://prosemirror.net/docs/ref/#view.EditorView.destroy) (and thus should not be\n    used anymore).\n    */\n    get isDestroyed() {\n        return this.docView == null;\n    }\n    /**\n    Used for testing.\n    */\n    dispatchEvent(event) {\n        return dispatchEvent(this, event);\n    }\n    /**\n    @internal\n    */\n    domSelectionRange() {\n        let sel = this.dom.isConnected !== false && this.domSelection();\n        if (!sel)\n            return { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };\n        return safari && this.root.nodeType === 11 &&\n            deepActiveElement(this.dom.ownerDocument) == this.dom && safariShadowSelectionRange(this, sel) || sel;\n    }\n    /**\n    @internal\n    */\n    domSelection() {\n        return this.root.getSelection();\n    }\n}\nEditorView.prototype.dispatch = function (tr) {\n    let dispatchTransaction = this._props.dispatchTransaction;\n    if (dispatchTransaction)\n        dispatchTransaction.call(this, tr);\n    else\n        this.updateState(this.state.apply(tr));\n};\nfunction computeDocDeco(view) {\n    let attrs = Object.create(null);\n    attrs.class = \"ProseMirror\";\n    attrs.contenteditable = String(view.editable);\n    view.someProp(\"attributes\", value => {\n        if (typeof value == \"function\")\n            value = value(view.state);\n        if (value)\n            for (let attr in value) {\n                if (attr == \"class\")\n                    attrs.class += \" \" + value[attr];\n                else if (attr == \"style\")\n                    attrs.style = (attrs.style ? attrs.style + \";\" : \"\") + value[attr];\n                else if (!attrs[attr] && attr != \"contenteditable\" && attr != \"nodeName\")\n                    attrs[attr] = String(value[attr]);\n            }\n    });\n    if (!attrs.translate)\n        attrs.translate = \"no\";\n    return [Decoration.node(0, view.state.doc.content.size, attrs)];\n}\nfunction updateCursorWrapper(view) {\n    if (view.markCursor) {\n        let dom = document.createElement(\"img\");\n        dom.className = \"ProseMirror-separator\";\n        dom.setAttribute(\"mark-placeholder\", \"true\");\n        dom.setAttribute(\"alt\", \"\");\n        view.cursorWrapper = { dom, deco: Decoration.widget(view.state.selection.from, dom, { raw: true, marks: view.markCursor }) };\n    }\n    else {\n        view.cursorWrapper = null;\n    }\n}\nfunction getEditable(view) {\n    return !view.someProp(\"editable\", value => value(view.state) === false);\n}\nfunction selectionContextChanged(sel1, sel2) {\n    let depth = Math.min(sel1.$anchor.sharedDepth(sel1.head), sel2.$anchor.sharedDepth(sel2.head));\n    return sel1.$anchor.start(depth) != sel2.$anchor.start(depth);\n}\nfunction buildNodeViews(view) {\n    let result = Object.create(null);\n    function add(obj) {\n        for (let prop in obj)\n            if (!Object.prototype.hasOwnProperty.call(result, prop))\n                result[prop] = obj[prop];\n    }\n    view.someProp(\"nodeViews\", add);\n    view.someProp(\"markViews\", add);\n    return result;\n}\nfunction changedNodeViews(a, b) {\n    let nA = 0, nB = 0;\n    for (let prop in a) {\n        if (a[prop] != b[prop])\n            return true;\n        nA++;\n    }\n    for (let _ in b)\n        nB++;\n    return nA != nB;\n}\nfunction checkStateComponent(plugin) {\n    if (plugin.spec.state || plugin.spec.filterTransaction || plugin.spec.appendTransaction)\n        throw new RangeError(\"Plugins passed directly to the view must not have a state component\");\n}\n\nexport { Decoration, DecorationSet, EditorView, __endComposition, __parseFromClipboard };\n","// keymap/index.ts\nexport * from \"prosemirror-keymap\";\n","import { keyName, base } from 'w3c-keyname';\nimport { Plugin } from 'prosemirror-state';\n\nconst mac = typeof navigator != \"undefined\" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : false;\nfunction normalizeKeyName(name) {\n    let parts = name.split(/-(?!$)/), result = parts[parts.length - 1];\n    if (result == \"Space\")\n        result = \" \";\n    let alt, ctrl, shift, meta;\n    for (let i = 0; i < parts.length - 1; i++) {\n        let mod = parts[i];\n        if (/^(cmd|meta|m)$/i.test(mod))\n            meta = true;\n        else if (/^a(lt)?$/i.test(mod))\n            alt = true;\n        else if (/^(c|ctrl|control)$/i.test(mod))\n            ctrl = true;\n        else if (/^s(hift)?$/i.test(mod))\n            shift = true;\n        else if (/^mod$/i.test(mod)) {\n            if (mac)\n                meta = true;\n            else\n                ctrl = true;\n        }\n        else\n            throw new Error(\"Unrecognized modifier name: \" + mod);\n    }\n    if (alt)\n        result = \"Alt-\" + result;\n    if (ctrl)\n        result = \"Ctrl-\" + result;\n    if (meta)\n        result = \"Meta-\" + result;\n    if (shift)\n        result = \"Shift-\" + result;\n    return result;\n}\nfunction normalize(map) {\n    let copy = Object.create(null);\n    for (let prop in map)\n        copy[normalizeKeyName(prop)] = map[prop];\n    return copy;\n}\nfunction modifiers(name, event, shift = true) {\n    if (event.altKey)\n        name = \"Alt-\" + name;\n    if (event.ctrlKey)\n        name = \"Ctrl-\" + name;\n    if (event.metaKey)\n        name = \"Meta-\" + name;\n    if (shift && event.shiftKey)\n        name = \"Shift-\" + name;\n    return name;\n}\n/**\nCreate a keymap plugin for the given set of bindings.\n\nBindings should map key names to [command](https://prosemirror.net/docs/ref/#commands)-style\nfunctions, which will be called with `(EditorState, dispatch,\nEditorView)` arguments, and should return true when they've handled\nthe key. Note that the view argument isn't part of the command\nprotocol, but can be used as an escape hatch if a binding needs to\ndirectly interact with the UI.\n\nKey names may be strings like `\"Shift-Ctrl-Enter\"`—a key\nidentifier prefixed with zero or more modifiers. Key identifiers\nare based on the strings that can appear in\n[`KeyEvent.key`](https:developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).\nUse lowercase letters to refer to letter keys (or uppercase letters\nif you want shift to be held). You may use `\"Space\"` as an alias\nfor the `\" \"` name.\n\nModifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or\n`a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or\n`Meta-`) are recognized. For characters that are created by holding\nshift, the `Shift-` prefix is implied, and should not be added\nexplicitly.\n\nYou can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on\nother platforms.\n\nYou can add multiple keymap plugins to an editor. The order in\nwhich they appear determines their precedence (the ones early in\nthe array get to dispatch first).\n*/\nfunction keymap(bindings) {\n    return new Plugin({ props: { handleKeyDown: keydownHandler(bindings) } });\n}\n/**\nGiven a set of bindings (using the same format as\n[`keymap`](https://prosemirror.net/docs/ref/#keymap.keymap)), return a [keydown\nhandler](https://prosemirror.net/docs/ref/#view.EditorProps.handleKeyDown) that handles them.\n*/\nfunction keydownHandler(bindings) {\n    let map = normalize(bindings);\n    return function (view, event) {\n        let name = keyName(event), baseName, direct = map[modifiers(name, event)];\n        if (direct && direct(view.state, view.dispatch, view))\n            return true;\n        // A character key\n        if (name.length == 1 && name != \" \") {\n            if (event.shiftKey) {\n                // In case the name was already modified by shift, try looking\n                // it up without its shift modifier\n                let noShift = map[modifiers(name, event, false)];\n                if (noShift && noShift(view.state, view.dispatch, view))\n                    return true;\n            }\n            if ((event.shiftKey || event.altKey || event.metaKey || name.charCodeAt(0) > 127) &&\n                (baseName = base[event.keyCode]) && baseName != name) {\n                // Try falling back to the keyCode when there's a modifier\n                // active or the character produced isn't ASCII, and our table\n                // produces a different name from the the keyCode. See #668,\n                // #1060\n                let fromCode = map[modifiers(baseName, event)];\n                if (fromCode && fromCode(view.state, view.dispatch, view))\n                    return true;\n            }\n        }\n        return false;\n    };\n}\n\nexport { keydownHandler, keymap };\n","export var base = {\n  8: \"Backspace\",\n  9: \"Tab\",\n  10: \"Enter\",\n  12: \"NumLock\",\n  13: \"Enter\",\n  16: \"Shift\",\n  17: \"Control\",\n  18: \"Alt\",\n  20: \"CapsLock\",\n  27: \"Escape\",\n  32: \" \",\n  33: \"PageUp\",\n  34: \"PageDown\",\n  35: \"End\",\n  36: \"Home\",\n  37: \"ArrowLeft\",\n  38: \"ArrowUp\",\n  39: \"ArrowRight\",\n  40: \"ArrowDown\",\n  44: \"PrintScreen\",\n  45: \"Insert\",\n  46: \"Delete\",\n  59: \";\",\n  61: \"=\",\n  91: \"Meta\",\n  92: \"Meta\",\n  106: \"*\",\n  107: \"+\",\n  108: \",\",\n  109: \"-\",\n  110: \".\",\n  111: \"/\",\n  144: \"NumLock\",\n  145: \"ScrollLock\",\n  160: \"Shift\",\n  161: \"Shift\",\n  162: \"Control\",\n  163: \"Control\",\n  164: \"Alt\",\n  165: \"Alt\",\n  173: \"-\",\n  186: \";\",\n  187: \"=\",\n  188: \",\",\n  189: \"-\",\n  190: \".\",\n  191: \"/\",\n  192: \"`\",\n  219: \"[\",\n  220: \"\\\\\",\n  221: \"]\",\n  222: \"'\"\n}\n\nexport var shift = {\n  48: \")\",\n  49: \"!\",\n  50: \"@\",\n  51: \"#\",\n  52: \"$\",\n  53: \"%\",\n  54: \"^\",\n  55: \"&\",\n  56: \"*\",\n  57: \"(\",\n  59: \":\",\n  61: \"+\",\n  173: \"_\",\n  186: \":\",\n  187: \"+\",\n  188: \"<\",\n  189: \"_\",\n  190: \">\",\n  191: \"?\",\n  192: \"~\",\n  219: \"{\",\n  220: \"|\",\n  221: \"}\",\n  222: \"\\\"\"\n}\n\nvar mac = typeof navigator != \"undefined\" && /Mac/.test(navigator.platform)\nvar ie = typeof navigator != \"undefined\" && /MSIE \\d|Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent)\n\n// Fill in the digit keys\nfor (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i)\n\n// The function keys\nfor (var i = 1; i <= 24; i++) base[i + 111] = \"F\" + i\n\n// And the alphabetic keys\nfor (var i = 65; i <= 90; i++) {\n  base[i] = String.fromCharCode(i + 32)\n  shift[i] = String.fromCharCode(i)\n}\n\n// For each code that doesn't have a shift-equivalent, copy the base name\nfor (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code]\n\nexport function keyName(event) {\n  // On macOS, keys held with Shift and Cmd don't reflect the effect of Shift in `.key`.\n  // On IE, shift effect is never included in `.key`.\n  var ignoreKey = mac && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey ||\n      ie && event.shiftKey && event.key && event.key.length == 1 ||\n      event.key == \"Unidentified\"\n  var name = (!ignoreKey && event.key) ||\n    (event.shiftKey ? shift : base)[event.keyCode] ||\n    event.key || \"Unidentified\"\n  // Edge sometimes produces wrong names (Issue #3)\n  if (name == \"Esc\") name = \"Escape\"\n  if (name == \"Del\") name = \"Delete\"\n  // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/\n  if (name == \"Left\") name = \"ArrowLeft\"\n  if (name == \"Up\") name = \"ArrowUp\"\n  if (name == \"Right\") name = \"ArrowRight\"\n  if (name == \"Down\") name = \"ArrowDown\"\n  return name\n}\n","// model/index.ts\nexport * from \"prosemirror-model\";\n","// transform/index.ts\nexport * from \"prosemirror-transform\";\n","// commands/index.ts\nexport * from \"prosemirror-commands\";\n","import { liftTarget, replaceStep, ReplaceStep, canJoin, joinPoint, canSplit, ReplaceAroundStep, findWrapping } from 'prosemirror-transform';\nimport { Slice, Fragment } from 'prosemirror-model';\nimport { NodeSelection, Selection, TextSelection, AllSelection, SelectionRange } from 'prosemirror-state';\n\n/**\nDelete the selection, if there is one.\n*/\nconst deleteSelection = (state, dispatch) => {\n    if (state.selection.empty)\n        return false;\n    if (dispatch)\n        dispatch(state.tr.deleteSelection().scrollIntoView());\n    return true;\n};\nfunction atBlockStart(state, view) {\n    let { $cursor } = state.selection;\n    if (!$cursor || (view ? !view.endOfTextblock(\"backward\", state)\n        : $cursor.parentOffset > 0))\n        return null;\n    return $cursor;\n}\n/**\nIf the selection is empty and at the start of a textblock, try to\nreduce the distance between that block and the one before it—if\nthere's a block directly before it that can be joined, join them.\nIf not, try to move the selected block closer to the next one in\nthe document structure by lifting it out of its parent or moving it\ninto a parent of the previous block. Will use the view for accurate\n(bidi-aware) start-of-textblock detection if given.\n*/\nconst joinBackward = (state, dispatch, view) => {\n    let $cursor = atBlockStart(state, view);\n    if (!$cursor)\n        return false;\n    let $cut = findCutBefore($cursor);\n    // If there is no node before this, try to lift\n    if (!$cut) {\n        let range = $cursor.blockRange(), target = range && liftTarget(range);\n        if (target == null)\n            return false;\n        if (dispatch)\n            dispatch(state.tr.lift(range, target).scrollIntoView());\n        return true;\n    }\n    let before = $cut.nodeBefore;\n    // Apply the joining algorithm\n    if (deleteBarrier(state, $cut, dispatch, -1))\n        return true;\n    // If the node below has no content and the node above is\n    // selectable, delete the node below and select the one above.\n    if ($cursor.parent.content.size == 0 &&\n        (textblockAt(before, \"end\") || NodeSelection.isSelectable(before))) {\n        for (let depth = $cursor.depth;; depth--) {\n            let delStep = replaceStep(state.doc, $cursor.before(depth), $cursor.after(depth), Slice.empty);\n            if (delStep && delStep.slice.size < delStep.to - delStep.from) {\n                if (dispatch) {\n                    let tr = state.tr.step(delStep);\n                    tr.setSelection(textblockAt(before, \"end\")\n                        ? Selection.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos, -1)), -1)\n                        : NodeSelection.create(tr.doc, $cut.pos - before.nodeSize));\n                    dispatch(tr.scrollIntoView());\n                }\n                return true;\n            }\n            if (depth == 1 || $cursor.node(depth - 1).childCount > 1)\n                break;\n        }\n    }\n    // If the node before is an atom, delete it\n    if (before.isAtom && $cut.depth == $cursor.depth - 1) {\n        if (dispatch)\n            dispatch(state.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView());\n        return true;\n    }\n    return false;\n};\n/**\nA more limited form of [`joinBackward`]($commands.joinBackward)\nthat only tries to join the current textblock to the one before\nit, if the cursor is at the start of a textblock.\n*/\nconst joinTextblockBackward = (state, dispatch, view) => {\n    let $cursor = atBlockStart(state, view);\n    if (!$cursor)\n        return false;\n    let $cut = findCutBefore($cursor);\n    return $cut ? joinTextblocksAround(state, $cut, dispatch) : false;\n};\n/**\nA more limited form of [`joinForward`]($commands.joinForward)\nthat only tries to join the current textblock to the one after\nit, if the cursor is at the end of a textblock.\n*/\nconst joinTextblockForward = (state, dispatch, view) => {\n    let $cursor = atBlockEnd(state, view);\n    if (!$cursor)\n        return false;\n    let $cut = findCutAfter($cursor);\n    return $cut ? joinTextblocksAround(state, $cut, dispatch) : false;\n};\nfunction joinTextblocksAround(state, $cut, dispatch) {\n    let before = $cut.nodeBefore, beforeText = before, beforePos = $cut.pos - 1;\n    for (; !beforeText.isTextblock; beforePos--) {\n        if (beforeText.type.spec.isolating)\n            return false;\n        let child = beforeText.lastChild;\n        if (!child)\n            return false;\n        beforeText = child;\n    }\n    let after = $cut.nodeAfter, afterText = after, afterPos = $cut.pos + 1;\n    for (; !afterText.isTextblock; afterPos++) {\n        if (afterText.type.spec.isolating)\n            return false;\n        let child = afterText.firstChild;\n        if (!child)\n            return false;\n        afterText = child;\n    }\n    let step = replaceStep(state.doc, beforePos, afterPos, Slice.empty);\n    if (!step || step.from != beforePos ||\n        step instanceof ReplaceStep && step.slice.size >= afterPos - beforePos)\n        return false;\n    if (dispatch) {\n        let tr = state.tr.step(step);\n        tr.setSelection(TextSelection.create(tr.doc, beforePos));\n        dispatch(tr.scrollIntoView());\n    }\n    return true;\n}\nfunction textblockAt(node, side, only = false) {\n    for (let scan = node; scan; scan = (side == \"start\" ? scan.firstChild : scan.lastChild)) {\n        if (scan.isTextblock)\n            return true;\n        if (only && scan.childCount != 1)\n            return false;\n    }\n    return false;\n}\n/**\nWhen the selection is empty and at the start of a textblock, select\nthe node before that textblock, if possible. This is intended to be\nbound to keys like backspace, after\n[`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) or other deleting\ncommands, as a fall-back behavior when the schema doesn't allow\ndeletion at the selected point.\n*/\nconst selectNodeBackward = (state, dispatch, view) => {\n    let { $head, empty } = state.selection, $cut = $head;\n    if (!empty)\n        return false;\n    if ($head.parent.isTextblock) {\n        if (view ? !view.endOfTextblock(\"backward\", state) : $head.parentOffset > 0)\n            return false;\n        $cut = findCutBefore($head);\n    }\n    let node = $cut && $cut.nodeBefore;\n    if (!node || !NodeSelection.isSelectable(node))\n        return false;\n    if (dispatch)\n        dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut.pos - node.nodeSize)).scrollIntoView());\n    return true;\n};\nfunction findCutBefore($pos) {\n    if (!$pos.parent.type.spec.isolating)\n        for (let i = $pos.depth - 1; i >= 0; i--) {\n            if ($pos.index(i) > 0)\n                return $pos.doc.resolve($pos.before(i + 1));\n            if ($pos.node(i).type.spec.isolating)\n                break;\n        }\n    return null;\n}\nfunction atBlockEnd(state, view) {\n    let { $cursor } = state.selection;\n    if (!$cursor || (view ? !view.endOfTextblock(\"forward\", state)\n        : $cursor.parentOffset < $cursor.parent.content.size))\n        return null;\n    return $cursor;\n}\n/**\nIf the selection is empty and the cursor is at the end of a\ntextblock, try to reduce or remove the boundary between that block\nand the one after it, either by joining them or by moving the other\nblock closer to this one in the tree structure. Will use the view\nfor accurate start-of-textblock detection if given.\n*/\nconst joinForward = (state, dispatch, view) => {\n    let $cursor = atBlockEnd(state, view);\n    if (!$cursor)\n        return false;\n    let $cut = findCutAfter($cursor);\n    // If there is no node after this, there's nothing to do\n    if (!$cut)\n        return false;\n    let after = $cut.nodeAfter;\n    // Try the joining algorithm\n    if (deleteBarrier(state, $cut, dispatch, 1))\n        return true;\n    // If the node above has no content and the node below is\n    // selectable, delete the node above and select the one below.\n    if ($cursor.parent.content.size == 0 &&\n        (textblockAt(after, \"start\") || NodeSelection.isSelectable(after))) {\n        let delStep = replaceStep(state.doc, $cursor.before(), $cursor.after(), Slice.empty);\n        if (delStep && delStep.slice.size < delStep.to - delStep.from) {\n            if (dispatch) {\n                let tr = state.tr.step(delStep);\n                tr.setSelection(textblockAt(after, \"start\") ? Selection.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos)), 1)\n                    : NodeSelection.create(tr.doc, tr.mapping.map($cut.pos)));\n                dispatch(tr.scrollIntoView());\n            }\n            return true;\n        }\n    }\n    // If the next node is an atom, delete it\n    if (after.isAtom && $cut.depth == $cursor.depth - 1) {\n        if (dispatch)\n            dispatch(state.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView());\n        return true;\n    }\n    return false;\n};\n/**\nWhen the selection is empty and at the end of a textblock, select\nthe node coming after that textblock, if possible. This is intended\nto be bound to keys like delete, after\n[`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward) and similar deleting\ncommands, to provide a fall-back behavior when the schema doesn't\nallow deletion at the selected point.\n*/\nconst selectNodeForward = (state, dispatch, view) => {\n    let { $head, empty } = state.selection, $cut = $head;\n    if (!empty)\n        return false;\n    if ($head.parent.isTextblock) {\n        if (view ? !view.endOfTextblock(\"forward\", state) : $head.parentOffset < $head.parent.content.size)\n            return false;\n        $cut = findCutAfter($head);\n    }\n    let node = $cut && $cut.nodeAfter;\n    if (!node || !NodeSelection.isSelectable(node))\n        return false;\n    if (dispatch)\n        dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut.pos)).scrollIntoView());\n    return true;\n};\nfunction findCutAfter($pos) {\n    if (!$pos.parent.type.spec.isolating)\n        for (let i = $pos.depth - 1; i >= 0; i--) {\n            let parent = $pos.node(i);\n            if ($pos.index(i) + 1 < parent.childCount)\n                return $pos.doc.resolve($pos.after(i + 1));\n            if (parent.type.spec.isolating)\n                break;\n        }\n    return null;\n}\n/**\nJoin the selected block or, if there is a text selection, the\nclosest ancestor block of the selection that can be joined, with\nthe sibling above it.\n*/\nconst joinUp = (state, dispatch) => {\n    let sel = state.selection, nodeSel = sel instanceof NodeSelection, point;\n    if (nodeSel) {\n        if (sel.node.isTextblock || !canJoin(state.doc, sel.from))\n            return false;\n        point = sel.from;\n    }\n    else {\n        point = joinPoint(state.doc, sel.from, -1);\n        if (point == null)\n            return false;\n    }\n    if (dispatch) {\n        let tr = state.tr.join(point);\n        if (nodeSel)\n            tr.setSelection(NodeSelection.create(tr.doc, point - state.doc.resolve(point).nodeBefore.nodeSize));\n        dispatch(tr.scrollIntoView());\n    }\n    return true;\n};\n/**\nJoin the selected block, or the closest ancestor of the selection\nthat can be joined, with the sibling after it.\n*/\nconst joinDown = (state, dispatch) => {\n    let sel = state.selection, point;\n    if (sel instanceof NodeSelection) {\n        if (sel.node.isTextblock || !canJoin(state.doc, sel.to))\n            return false;\n        point = sel.to;\n    }\n    else {\n        point = joinPoint(state.doc, sel.to, 1);\n        if (point == null)\n            return false;\n    }\n    if (dispatch)\n        dispatch(state.tr.join(point).scrollIntoView());\n    return true;\n};\n/**\nLift the selected block, or the closest ancestor block of the\nselection that can be lifted, out of its parent node.\n*/\nconst lift = (state, dispatch) => {\n    let { $from, $to } = state.selection;\n    let range = $from.blockRange($to), target = range && liftTarget(range);\n    if (target == null)\n        return false;\n    if (dispatch)\n        dispatch(state.tr.lift(range, target).scrollIntoView());\n    return true;\n};\n/**\nIf the selection is in a node whose type has a truthy\n[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, replace the\nselection with a newline character.\n*/\nconst newlineInCode = (state, dispatch) => {\n    let { $head, $anchor } = state.selection;\n    if (!$head.parent.type.spec.code || !$head.sameParent($anchor))\n        return false;\n    if (dispatch)\n        dispatch(state.tr.insertText(\"\\n\").scrollIntoView());\n    return true;\n};\nfunction defaultBlockAt(match) {\n    for (let i = 0; i < match.edgeCount; i++) {\n        let { type } = match.edge(i);\n        if (type.isTextblock && !type.hasRequiredAttrs())\n            return type;\n    }\n    return null;\n}\n/**\nWhen the selection is in a node with a truthy\n[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, create a\ndefault block after the code block, and move the cursor there.\n*/\nconst exitCode = (state, dispatch) => {\n    let { $head, $anchor } = state.selection;\n    if (!$head.parent.type.spec.code || !$head.sameParent($anchor))\n        return false;\n    let above = $head.node(-1), after = $head.indexAfter(-1), type = defaultBlockAt(above.contentMatchAt(after));\n    if (!type || !above.canReplaceWith(after, after, type))\n        return false;\n    if (dispatch) {\n        let pos = $head.after(), tr = state.tr.replaceWith(pos, pos, type.createAndFill());\n        tr.setSelection(Selection.near(tr.doc.resolve(pos), 1));\n        dispatch(tr.scrollIntoView());\n    }\n    return true;\n};\n/**\nIf a block node is selected, create an empty paragraph before (if\nit is its parent's first child) or after it.\n*/\nconst createParagraphNear = (state, dispatch) => {\n    let sel = state.selection, { $from, $to } = sel;\n    if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent)\n        return false;\n    let type = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter()));\n    if (!type || !type.isTextblock)\n        return false;\n    if (dispatch) {\n        let side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos;\n        let tr = state.tr.insert(side, type.createAndFill());\n        tr.setSelection(TextSelection.create(tr.doc, side + 1));\n        dispatch(tr.scrollIntoView());\n    }\n    return true;\n};\n/**\nIf the cursor is in an empty textblock that can be lifted, lift the\nblock.\n*/\nconst liftEmptyBlock = (state, dispatch) => {\n    let { $cursor } = state.selection;\n    if (!$cursor || $cursor.parent.content.size)\n        return false;\n    if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) {\n        let before = $cursor.before();\n        if (canSplit(state.doc, before)) {\n            if (dispatch)\n                dispatch(state.tr.split(before).scrollIntoView());\n            return true;\n        }\n    }\n    let range = $cursor.blockRange(), target = range && liftTarget(range);\n    if (target == null)\n        return false;\n    if (dispatch)\n        dispatch(state.tr.lift(range, target).scrollIntoView());\n    return true;\n};\n/**\nCreate a variant of [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock) that uses\na custom function to determine the type of the newly split off block.\n*/\nfunction splitBlockAs(splitNode) {\n    return (state, dispatch) => {\n        let { $from, $to } = state.selection;\n        if (state.selection instanceof NodeSelection && state.selection.node.isBlock) {\n            if (!$from.parentOffset || !canSplit(state.doc, $from.pos))\n                return false;\n            if (dispatch)\n                dispatch(state.tr.split($from.pos).scrollIntoView());\n            return true;\n        }\n        if (!$from.depth)\n            return false;\n        let types = [];\n        let splitDepth, deflt, atEnd = false, atStart = false;\n        for (let d = $from.depth;; d--) {\n            let node = $from.node(d);\n            if (node.isBlock) {\n                atEnd = $from.end(d) == $from.pos + ($from.depth - d);\n                atStart = $from.start(d) == $from.pos - ($from.depth - d);\n                deflt = defaultBlockAt($from.node(d - 1).contentMatchAt($from.indexAfter(d - 1)));\n                let splitType = splitNode && splitNode($to.parent, atEnd, $from);\n                types.unshift(splitType || (atEnd && deflt ? { type: deflt } : null));\n                splitDepth = d;\n                break;\n            }\n            else {\n                if (d == 1)\n                    return false;\n                types.unshift(null);\n            }\n        }\n        let tr = state.tr;\n        if (state.selection instanceof TextSelection || state.selection instanceof AllSelection)\n            tr.deleteSelection();\n        let splitPos = tr.mapping.map($from.pos);\n        let can = canSplit(tr.doc, splitPos, types.length, types);\n        if (!can) {\n            types[0] = deflt ? { type: deflt } : null;\n            can = canSplit(tr.doc, splitPos, types.length, types);\n        }\n        tr.split(splitPos, types.length, types);\n        if (!atEnd && atStart && $from.node(splitDepth).type != deflt) {\n            let first = tr.mapping.map($from.before(splitDepth)), $first = tr.doc.resolve(first);\n            if (deflt && $from.node(splitDepth - 1).canReplaceWith($first.index(), $first.index() + 1, deflt))\n                tr.setNodeMarkup(tr.mapping.map($from.before(splitDepth)), deflt);\n        }\n        if (dispatch)\n            dispatch(tr.scrollIntoView());\n        return true;\n    };\n}\n/**\nSplit the parent block of the selection. If the selection is a text\nselection, also delete its content.\n*/\nconst splitBlock = splitBlockAs();\n/**\nActs like [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock), but without\nresetting the set of active marks at the cursor.\n*/\nconst splitBlockKeepMarks = (state, dispatch) => {\n    return splitBlock(state, dispatch && (tr => {\n        let marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks());\n        if (marks)\n            tr.ensureMarks(marks);\n        dispatch(tr);\n    }));\n};\n/**\nMove the selection to the node wrapping the current selection, if\nany. (Will not select the document node.)\n*/\nconst selectParentNode = (state, dispatch) => {\n    let { $from, to } = state.selection, pos;\n    let same = $from.sharedDepth(to);\n    if (same == 0)\n        return false;\n    pos = $from.before(same);\n    if (dispatch)\n        dispatch(state.tr.setSelection(NodeSelection.create(state.doc, pos)));\n    return true;\n};\n/**\nSelect the whole document.\n*/\nconst selectAll = (state, dispatch) => {\n    if (dispatch)\n        dispatch(state.tr.setSelection(new AllSelection(state.doc)));\n    return true;\n};\nfunction joinMaybeClear(state, $pos, dispatch) {\n    let before = $pos.nodeBefore, after = $pos.nodeAfter, index = $pos.index();\n    if (!before || !after || !before.type.compatibleContent(after.type))\n        return false;\n    if (!before.content.size && $pos.parent.canReplace(index - 1, index)) {\n        if (dispatch)\n            dispatch(state.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView());\n        return true;\n    }\n    if (!$pos.parent.canReplace(index, index + 1) || !(after.isTextblock || canJoin(state.doc, $pos.pos)))\n        return false;\n    if (dispatch)\n        dispatch(state.tr.join($pos.pos).scrollIntoView());\n    return true;\n}\nfunction deleteBarrier(state, $cut, dispatch, dir) {\n    let before = $cut.nodeBefore, after = $cut.nodeAfter, conn, match;\n    let isolated = before.type.spec.isolating || after.type.spec.isolating;\n    if (!isolated && joinMaybeClear(state, $cut, dispatch))\n        return true;\n    let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1);\n    if (canDelAfter &&\n        (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) &&\n        match.matchType(conn[0] || after.type).validEnd) {\n        if (dispatch) {\n            let end = $cut.pos + after.nodeSize, wrap = Fragment.empty;\n            for (let i = conn.length - 1; i >= 0; i--)\n                wrap = Fragment.from(conn[i].create(null, wrap));\n            wrap = Fragment.from(before.copy(wrap));\n            let tr = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap, 1, 0), conn.length, true));\n            let $joinAt = tr.doc.resolve(end + 2 * conn.length);\n            if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type &&\n                canJoin(tr.doc, $joinAt.pos))\n                tr.join($joinAt.pos);\n            dispatch(tr.scrollIntoView());\n        }\n        return true;\n    }\n    let selAfter = after.type.spec.isolating || (dir > 0 && isolated) ? null : Selection.findFrom($cut, 1);\n    let range = selAfter && selAfter.$from.blockRange(selAfter.$to), target = range && liftTarget(range);\n    if (target != null && target >= $cut.depth) {\n        if (dispatch)\n            dispatch(state.tr.lift(range, target).scrollIntoView());\n        return true;\n    }\n    if (canDelAfter && textblockAt(after, \"start\", true) && textblockAt(before, \"end\")) {\n        let at = before, wrap = [];\n        for (;;) {\n            wrap.push(at);\n            if (at.isTextblock)\n                break;\n            at = at.lastChild;\n        }\n        let afterText = after, afterDepth = 1;\n        for (; !afterText.isTextblock; afterText = afterText.firstChild)\n            afterDepth++;\n        if (at.canReplace(at.childCount, at.childCount, afterText.content)) {\n            if (dispatch) {\n                let end = Fragment.empty;\n                for (let i = wrap.length - 1; i >= 0; i--)\n                    end = Fragment.from(wrap[i].copy(end));\n                let tr = state.tr.step(new ReplaceAroundStep($cut.pos - wrap.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end, wrap.length, 0), 0, true));\n                dispatch(tr.scrollIntoView());\n            }\n            return true;\n        }\n    }\n    return false;\n}\nfunction selectTextblockSide(side) {\n    return function (state, dispatch) {\n        let sel = state.selection, $pos = side < 0 ? sel.$from : sel.$to;\n        let depth = $pos.depth;\n        while ($pos.node(depth).isInline) {\n            if (!depth)\n                return false;\n            depth--;\n        }\n        if (!$pos.node(depth).isTextblock)\n            return false;\n        if (dispatch)\n            dispatch(state.tr.setSelection(TextSelection.create(state.doc, side < 0 ? $pos.start(depth) : $pos.end(depth))));\n        return true;\n    };\n}\n/**\nMoves the cursor to the start of current text block.\n*/\nconst selectTextblockStart = selectTextblockSide(-1);\n/**\nMoves the cursor to the end of current text block.\n*/\nconst selectTextblockEnd = selectTextblockSide(1);\n// Parameterized commands\n/**\nWrap the selection in a node of the given type with the given\nattributes.\n*/\nfunction wrapIn(nodeType, attrs = null) {\n    return function (state, dispatch) {\n        let { $from, $to } = state.selection;\n        let range = $from.blockRange($to), wrapping = range && findWrapping(range, nodeType, attrs);\n        if (!wrapping)\n            return false;\n        if (dispatch)\n            dispatch(state.tr.wrap(range, wrapping).scrollIntoView());\n        return true;\n    };\n}\n/**\nReturns a command that tries to set the selected textblocks to the\ngiven node type with the given attributes.\n*/\nfunction setBlockType(nodeType, attrs = null) {\n    return function (state, dispatch) {\n        let applicable = false;\n        for (let i = 0; i < state.selection.ranges.length && !applicable; i++) {\n            let { $from: { pos: from }, $to: { pos: to } } = state.selection.ranges[i];\n            state.doc.nodesBetween(from, to, (node, pos) => {\n                if (applicable)\n                    return false;\n                if (!node.isTextblock || node.hasMarkup(nodeType, attrs))\n                    return;\n                if (node.type == nodeType) {\n                    applicable = true;\n                }\n                else {\n                    let $pos = state.doc.resolve(pos), index = $pos.index();\n                    applicable = $pos.parent.canReplaceWith(index, index + 1, nodeType);\n                }\n            });\n        }\n        if (!applicable)\n            return false;\n        if (dispatch) {\n            let tr = state.tr;\n            for (let i = 0; i < state.selection.ranges.length; i++) {\n                let { $from: { pos: from }, $to: { pos: to } } = state.selection.ranges[i];\n                tr.setBlockType(from, to, nodeType, attrs);\n            }\n            dispatch(tr.scrollIntoView());\n        }\n        return true;\n    };\n}\nfunction markApplies(doc, ranges, type, enterAtoms) {\n    for (let i = 0; i < ranges.length; i++) {\n        let { $from, $to } = ranges[i];\n        let can = $from.depth == 0 ? doc.inlineContent && doc.type.allowsMarkType(type) : false;\n        doc.nodesBetween($from.pos, $to.pos, (node, pos) => {\n            if (can || !enterAtoms && node.isAtom && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos)\n                return false;\n            can = node.inlineContent && node.type.allowsMarkType(type);\n        });\n        if (can)\n            return true;\n    }\n    return false;\n}\nfunction removeInlineAtoms(ranges) {\n    let result = [];\n    for (let i = 0; i < ranges.length; i++) {\n        let { $from, $to } = ranges[i];\n        $from.doc.nodesBetween($from.pos, $to.pos, (node, pos) => {\n            if (node.isAtom && node.content.size && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos) {\n                if (pos + 1 > $from.pos)\n                    result.push(new SelectionRange($from, $from.doc.resolve(pos + 1)));\n                $from = $from.doc.resolve(pos + 1 + node.content.size);\n                return false;\n            }\n        });\n        if ($from.pos < $to.pos)\n            result.push(new SelectionRange($from, $to));\n    }\n    return result;\n}\n/**\nCreate a command function that toggles the given mark with the\ngiven attributes. Will return `false` when the current selection\ndoesn't support that mark. This will remove the mark if any marks\nof that type exist in the selection, or add it otherwise. If the\nselection is empty, this applies to the [stored\nmarks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks) instead of a range of the\ndocument.\n*/\nfunction toggleMark(markType, attrs = null, options) {\n    let removeWhenPresent = (options && options.removeWhenPresent) !== false;\n    let enterAtoms = (options && options.enterInlineAtoms) !== false;\n    return function (state, dispatch) {\n        let { empty, $cursor, ranges } = state.selection;\n        if ((empty && !$cursor) || !markApplies(state.doc, ranges, markType, enterAtoms))\n            return false;\n        if (dispatch) {\n            if ($cursor) {\n                if (markType.isInSet(state.storedMarks || $cursor.marks()))\n                    dispatch(state.tr.removeStoredMark(markType));\n                else\n                    dispatch(state.tr.addStoredMark(markType.create(attrs)));\n            }\n            else {\n                let add, tr = state.tr;\n                if (!enterAtoms)\n                    ranges = removeInlineAtoms(ranges);\n                if (removeWhenPresent) {\n                    add = !ranges.some(r => state.doc.rangeHasMark(r.$from.pos, r.$to.pos, markType));\n                }\n                else {\n                    add = !ranges.every(r => {\n                        let missing = false;\n                        tr.doc.nodesBetween(r.$from.pos, r.$to.pos, (node, pos, parent) => {\n                            if (missing)\n                                return false;\n                            missing = !markType.isInSet(node.marks) && !!parent && parent.type.allowsMarkType(markType) &&\n                                !(node.isText && /^\\s*$/.test(node.textBetween(Math.max(0, r.$from.pos - pos), Math.min(node.nodeSize, r.$to.pos - pos))));\n                        });\n                        return !missing;\n                    });\n                }\n                for (let i = 0; i < ranges.length; i++) {\n                    let { $from, $to } = ranges[i];\n                    if (!add) {\n                        tr.removeMark($from.pos, $to.pos, markType);\n                    }\n                    else {\n                        let from = $from.pos, to = $to.pos, start = $from.nodeAfter, end = $to.nodeBefore;\n                        let spaceStart = start && start.isText ? /^\\s*/.exec(start.text)[0].length : 0;\n                        let spaceEnd = end && end.isText ? /\\s*$/.exec(end.text)[0].length : 0;\n                        if (from + spaceStart < to) {\n                            from += spaceStart;\n                            to -= spaceEnd;\n                        }\n                        tr.addMark(from, to, markType.create(attrs));\n                    }\n                }\n                dispatch(tr.scrollIntoView());\n            }\n        }\n        return true;\n    };\n}\nfunction wrapDispatchForJoin(dispatch, isJoinable) {\n    return (tr) => {\n        if (!tr.isGeneric)\n            return dispatch(tr);\n        let ranges = [];\n        for (let i = 0; i < tr.mapping.maps.length; i++) {\n            let map = tr.mapping.maps[i];\n            for (let j = 0; j < ranges.length; j++)\n                ranges[j] = map.map(ranges[j]);\n            map.forEach((_s, _e, from, to) => ranges.push(from, to));\n        }\n        // Figure out which joinable points exist inside those ranges,\n        // by checking all node boundaries in their parent nodes.\n        let joinable = [];\n        for (let i = 0; i < ranges.length; i += 2) {\n            let from = ranges[i], to = ranges[i + 1];\n            let $from = tr.doc.resolve(from), depth = $from.sharedDepth(to), parent = $from.node(depth);\n            for (let index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index) {\n                let after = parent.maybeChild(index);\n                if (!after)\n                    break;\n                if (index && joinable.indexOf(pos) == -1) {\n                    let before = parent.child(index - 1);\n                    if (before.type == after.type && isJoinable(before, after))\n                        joinable.push(pos);\n                }\n                pos += after.nodeSize;\n            }\n        }\n        // Join the joinable points\n        joinable.sort((a, b) => a - b);\n        for (let i = joinable.length - 1; i >= 0; i--) {\n            if (canJoin(tr.doc, joinable[i]))\n                tr.join(joinable[i]);\n        }\n        dispatch(tr);\n    };\n}\n/**\nWrap a command so that, when it produces a transform that causes\ntwo joinable nodes to end up next to each other, those are joined.\nNodes are considered joinable when they are of the same type and\nwhen the `isJoinable` predicate returns true for them or, if an\narray of strings was passed, if their node type name is in that\narray.\n*/\nfunction autoJoin(command, isJoinable) {\n    let canJoin = Array.isArray(isJoinable) ? (node) => isJoinable.indexOf(node.type.name) > -1\n        : isJoinable;\n    return (state, dispatch, view) => command(state, dispatch && wrapDispatchForJoin(dispatch, canJoin), view);\n}\n/**\nCombine a number of command functions into a single function (which\ncalls them one by one until one returns true).\n*/\nfunction chainCommands(...commands) {\n    return function (state, dispatch, view) {\n        for (let i = 0; i < commands.length; i++)\n            if (commands[i](state, dispatch, view))\n                return true;\n        return false;\n    };\n}\nlet backspace = chainCommands(deleteSelection, joinBackward, selectNodeBackward);\nlet del = chainCommands(deleteSelection, joinForward, selectNodeForward);\n/**\nA basic keymap containing bindings not specific to any schema.\nBinds the following keys (when multiple commands are listed, they\nare chained with [`chainCommands`](https://prosemirror.net/docs/ref/#commands.chainCommands)):\n\n* **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock`\n* **Mod-Enter** to `exitCode`\n* **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward`\n* **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n* **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n* **Mod-a** to `selectAll`\n*/\nconst pcBaseKeymap = {\n    \"Enter\": chainCommands(newlineInCode, createParagraphNear, liftEmptyBlock, splitBlock),\n    \"Mod-Enter\": exitCode,\n    \"Backspace\": backspace,\n    \"Mod-Backspace\": backspace,\n    \"Shift-Backspace\": backspace,\n    \"Delete\": del,\n    \"Mod-Delete\": del,\n    \"Mod-a\": selectAll\n};\n/**\nA copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace,\n**Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and\n**Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** like\nCtrl-Delete.\n*/\nconst macBaseKeymap = {\n    \"Ctrl-h\": pcBaseKeymap[\"Backspace\"],\n    \"Alt-Backspace\": pcBaseKeymap[\"Mod-Backspace\"],\n    \"Ctrl-d\": pcBaseKeymap[\"Delete\"],\n    \"Ctrl-Alt-Backspace\": pcBaseKeymap[\"Mod-Delete\"],\n    \"Alt-Delete\": pcBaseKeymap[\"Mod-Delete\"],\n    \"Alt-d\": pcBaseKeymap[\"Mod-Delete\"],\n    \"Ctrl-a\": selectTextblockStart,\n    \"Ctrl-e\": selectTextblockEnd\n};\nfor (let key in pcBaseKeymap)\n    macBaseKeymap[key] = pcBaseKeymap[key];\nconst mac = typeof navigator != \"undefined\" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform)\n    // @ts-ignore\n    : typeof os != \"undefined\" && os.platform ? os.platform() == \"darwin\" : false;\n/**\nDepending on the detected platform, this will hold\n[`pcBasekeymap`](https://prosemirror.net/docs/ref/#commands.pcBaseKeymap) or\n[`macBaseKeymap`](https://prosemirror.net/docs/ref/#commands.macBaseKeymap).\n*/\nconst baseKeymap = mac ? macBaseKeymap : pcBaseKeymap;\n\nexport { autoJoin, baseKeymap, chainCommands, createParagraphNear, deleteSelection, exitCode, joinBackward, joinDown, joinForward, joinTextblockBackward, joinTextblockForward, joinUp, lift, liftEmptyBlock, macBaseKeymap, newlineInCode, pcBaseKeymap, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, setBlockType, splitBlock, splitBlockAs, splitBlockKeepMarks, toggleMark, wrapIn };\n","// schema-list/index.ts\nexport * from \"prosemirror-schema-list\";\n","import { findWrapping, ReplaceAroundStep, canSplit, liftTarget, canJoin } from 'prosemirror-transform';\nimport { NodeRange, Fragment, Slice } from 'prosemirror-model';\nimport { Selection } from 'prosemirror-state';\n\nconst olDOM = [\"ol\", 0], ulDOM = [\"ul\", 0], liDOM = [\"li\", 0];\n/**\nAn ordered list [node spec](https://prosemirror.net/docs/ref/#model.NodeSpec). Has a single\nattribute, `order`, which determines the number at which the list\nstarts counting, and defaults to 1. Represented as an `<ol>`\nelement.\n*/\nconst orderedList = {\n    attrs: { order: { default: 1, validate: \"number\" } },\n    parseDOM: [{ tag: \"ol\", getAttrs(dom) {\n                return { order: dom.hasAttribute(\"start\") ? +dom.getAttribute(\"start\") : 1 };\n            } }],\n    toDOM(node) {\n        return node.attrs.order == 1 ? olDOM : [\"ol\", { start: node.attrs.order }, 0];\n    }\n};\n/**\nA bullet list node spec, represented in the DOM as `<ul>`.\n*/\nconst bulletList = {\n    parseDOM: [{ tag: \"ul\" }],\n    toDOM() { return ulDOM; }\n};\n/**\nA list item (`<li>`) spec.\n*/\nconst listItem = {\n    parseDOM: [{ tag: \"li\" }],\n    toDOM() { return liDOM; },\n    defining: true\n};\nfunction add(obj, props) {\n    let copy = {};\n    for (let prop in obj)\n        copy[prop] = obj[prop];\n    for (let prop in props)\n        copy[prop] = props[prop];\n    return copy;\n}\n/**\nConvenience function for adding list-related node types to a map\nspecifying the nodes for a schema. Adds\n[`orderedList`](https://prosemirror.net/docs/ref/#schema-list.orderedList) as `\"ordered_list\"`,\n[`bulletList`](https://prosemirror.net/docs/ref/#schema-list.bulletList) as `\"bullet_list\"`, and\n[`listItem`](https://prosemirror.net/docs/ref/#schema-list.listItem) as `\"list_item\"`.\n\n`itemContent` determines the content expression for the list items.\nIf you want the commands defined in this module to apply to your\nlist structure, it should have a shape like `\"paragraph block*\"` or\n`\"paragraph (ordered_list | bullet_list)*\"`. `listGroup` can be\ngiven to assign a group name to the list node types, for example\n`\"block\"`.\n*/\nfunction addListNodes(nodes, itemContent, listGroup) {\n    return nodes.append({\n        ordered_list: add(orderedList, { content: \"list_item+\", group: listGroup }),\n        bullet_list: add(bulletList, { content: \"list_item+\", group: listGroup }),\n        list_item: add(listItem, { content: itemContent })\n    });\n}\n/**\nReturns a command function that wraps the selection in a list with\nthe given type an attributes. If `dispatch` is null, only return a\nvalue to indicate whether this is possible, but don't actually\nperform the change.\n*/\nfunction wrapInList(listType, attrs = null) {\n    return function (state, dispatch) {\n        let { $from, $to } = state.selection;\n        let range = $from.blockRange($to), doJoin = false, outerRange = range;\n        if (!range)\n            return false;\n        // This is at the top of an existing list item\n        if (range.depth >= 2 && $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex == 0) {\n            // Don't do anything if this is the top of the list\n            if ($from.index(range.depth - 1) == 0)\n                return false;\n            let $insert = state.doc.resolve(range.start - 2);\n            outerRange = new NodeRange($insert, $insert, range.depth);\n            if (range.endIndex < range.parent.childCount)\n                range = new NodeRange($from, state.doc.resolve($to.end(range.depth)), range.depth);\n            doJoin = true;\n        }\n        let wrap = findWrapping(outerRange, listType, attrs, range);\n        if (!wrap)\n            return false;\n        if (dispatch)\n            dispatch(doWrapInList(state.tr, range, wrap, doJoin, listType).scrollIntoView());\n        return true;\n    };\n}\nfunction doWrapInList(tr, range, wrappers, joinBefore, listType) {\n    let content = Fragment.empty;\n    for (let i = wrappers.length - 1; i >= 0; i--)\n        content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));\n    tr.step(new ReplaceAroundStep(range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new Slice(content, 0, 0), wrappers.length, true));\n    let found = 0;\n    for (let i = 0; i < wrappers.length; i++)\n        if (wrappers[i].type == listType)\n            found = i + 1;\n    let splitDepth = wrappers.length - found;\n    let splitPos = range.start + wrappers.length - (joinBefore ? 2 : 0), parent = range.parent;\n    for (let i = range.startIndex, e = range.endIndex, first = true; i < e; i++, first = false) {\n        if (!first && canSplit(tr.doc, splitPos, splitDepth)) {\n            tr.split(splitPos, splitDepth);\n            splitPos += 2 * splitDepth;\n        }\n        splitPos += parent.child(i).nodeSize;\n    }\n    return tr;\n}\n/**\nBuild a command that splits a non-empty textblock at the top level\nof a list item by also splitting that list item.\n*/\nfunction splitListItem(itemType, itemAttrs) {\n    return function (state, dispatch) {\n        let { $from, $to, node } = state.selection;\n        if ((node && node.isBlock) || $from.depth < 2 || !$from.sameParent($to))\n            return false;\n        let grandParent = $from.node(-1);\n        if (grandParent.type != itemType)\n            return false;\n        if ($from.parent.content.size == 0 && $from.node(-1).childCount == $from.indexAfter(-1)) {\n            // In an empty block. If this is a nested list, the wrapping\n            // list item should be split. Otherwise, bail out and let next\n            // command handle lifting.\n            if ($from.depth == 3 || $from.node(-3).type != itemType ||\n                $from.index(-2) != $from.node(-2).childCount - 1)\n                return false;\n            if (dispatch) {\n                let wrap = Fragment.empty;\n                let depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;\n                // Build a fragment containing empty versions of the structure\n                // from the outer list item to the parent node of the cursor\n                for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d--)\n                    wrap = Fragment.from($from.node(d).copy(wrap));\n                let depthAfter = $from.indexAfter(-1) < $from.node(-2).childCount ? 1\n                    : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3;\n                // Add a second list item with an empty default start node\n                wrap = wrap.append(Fragment.from(itemType.createAndFill()));\n                let start = $from.before($from.depth - (depthBefore - 1));\n                let tr = state.tr.replace(start, $from.after(-depthAfter), new Slice(wrap, 4 - depthBefore, 0));\n                let sel = -1;\n                tr.doc.nodesBetween(start, tr.doc.content.size, (node, pos) => {\n                    if (sel > -1)\n                        return false;\n                    if (node.isTextblock && node.content.size == 0)\n                        sel = pos + 1;\n                });\n                if (sel > -1)\n                    tr.setSelection(Selection.near(tr.doc.resolve(sel)));\n                dispatch(tr.scrollIntoView());\n            }\n            return true;\n        }\n        let nextType = $to.pos == $from.end() ? grandParent.contentMatchAt(0).defaultType : null;\n        let tr = state.tr.delete($from.pos, $to.pos);\n        let types = nextType ? [itemAttrs ? { type: itemType, attrs: itemAttrs } : null, { type: nextType }] : undefined;\n        if (!canSplit(tr.doc, $from.pos, 2, types))\n            return false;\n        if (dispatch)\n            dispatch(tr.split($from.pos, 2, types).scrollIntoView());\n        return true;\n    };\n}\n/**\nActs like [`splitListItem`](https://prosemirror.net/docs/ref/#schema-list.splitListItem), but\nwithout resetting the set of active marks at the cursor.\n*/\nfunction splitListItemKeepMarks(itemType, itemAttrs) {\n    let split = splitListItem(itemType, itemAttrs);\n    return (state, dispatch) => {\n        return split(state, dispatch && (tr => {\n            let marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks());\n            if (marks)\n                tr.ensureMarks(marks);\n            dispatch(tr);\n        }));\n    };\n}\n/**\nCreate a command to lift the list item around the selection up into\na wrapping list.\n*/\nfunction liftListItem(itemType) {\n    return function (state, dispatch) {\n        let { $from, $to } = state.selection;\n        let range = $from.blockRange($to, node => node.childCount > 0 && node.firstChild.type == itemType);\n        if (!range)\n            return false;\n        if (!dispatch)\n            return true;\n        if ($from.node(range.depth - 1).type == itemType) // Inside a parent list\n            return liftToOuterList(state, dispatch, itemType, range);\n        else // Outer list node\n            return liftOutOfList(state, dispatch, range);\n    };\n}\nfunction liftToOuterList(state, dispatch, itemType, range) {\n    let tr = state.tr, end = range.end, endOfList = range.$to.end(range.depth);\n    if (end < endOfList) {\n        // There are siblings after the lifted items, which must become\n        // children of the last item\n        tr.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice(Fragment.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));\n        range = new NodeRange(tr.doc.resolve(range.$from.pos), tr.doc.resolve(endOfList), range.depth);\n    }\n    const target = liftTarget(range);\n    if (target == null)\n        return false;\n    tr.lift(range, target);\n    let after = tr.mapping.map(end, -1) - 1;\n    if (canJoin(tr.doc, after))\n        tr.join(after);\n    dispatch(tr.scrollIntoView());\n    return true;\n}\nfunction liftOutOfList(state, dispatch, range) {\n    let tr = state.tr, list = range.parent;\n    // Merge the list items into a single big item\n    for (let pos = range.end, i = range.endIndex - 1, e = range.startIndex; i > e; i--) {\n        pos -= list.child(i).nodeSize;\n        tr.delete(pos - 1, pos + 1);\n    }\n    let $start = tr.doc.resolve(range.start), item = $start.nodeAfter;\n    if (tr.mapping.map(range.end) != range.start + $start.nodeAfter.nodeSize)\n        return false;\n    let atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;\n    let parent = $start.node(-1), indexBefore = $start.index(-1);\n    if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment.empty : Fragment.from(list))))\n        return false;\n    let start = $start.pos, end = start + item.nodeSize;\n    // Strip off the surrounding list. At the sides where we're not at\n    // the end of the list, the existing list is closed. At sides where\n    // this is the end, it is overwritten to its end.\n    tr.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice((atStart ? Fragment.empty : Fragment.from(list.copy(Fragment.empty)))\n        .append(atEnd ? Fragment.empty : Fragment.from(list.copy(Fragment.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));\n    dispatch(tr.scrollIntoView());\n    return true;\n}\n/**\nCreate a command to sink the list item around the selection down\ninto an inner list.\n*/\nfunction sinkListItem(itemType) {\n    return function (state, dispatch) {\n        let { $from, $to } = state.selection;\n        let range = $from.blockRange($to, node => node.childCount > 0 && node.firstChild.type == itemType);\n        if (!range)\n            return false;\n        let startIndex = range.startIndex;\n        if (startIndex == 0)\n            return false;\n        let parent = range.parent, nodeBefore = parent.child(startIndex - 1);\n        if (nodeBefore.type != itemType)\n            return false;\n        if (dispatch) {\n            let nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;\n            let inner = Fragment.from(nestedBefore ? itemType.create() : null);\n            let slice = new Slice(Fragment.from(itemType.create(null, Fragment.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);\n            let before = range.start, after = range.end;\n            dispatch(state.tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after, before, after, slice, 1, true))\n                .scrollIntoView());\n        }\n        return true;\n    };\n}\n\nexport { addListNodes, bulletList, liftListItem, listItem, orderedList, sinkListItem, splitListItem, splitListItemKeepMarks, wrapInList };\n","import '@tiptap/extension-text-style';\nimport { Extension } from '@tiptap/core';\n\n/**\n * This extension allows you to color your text.\n * @see https://tiptap.dev/api/extensions/color\n */\nconst Color = Extension.create({\n    name: 'color',\n    addOptions() {\n        return {\n            types: ['textStyle'],\n        };\n    },\n    addGlobalAttributes() {\n        return [\n            {\n                types: this.options.types,\n                attributes: {\n                    color: {\n                        default: null,\n                        parseHTML: element => { var _a; return (_a = element.style.color) === null || _a === void 0 ? void 0 : _a.replace(/['\"]+/g, ''); },\n                        renderHTML: attributes => {\n                            if (!attributes.color) {\n                                return {};\n                            }\n                            return {\n                                style: `color: ${attributes.color}`,\n                            };\n                        },\n                    },\n                },\n            },\n        ];\n    },\n    addCommands() {\n        return {\n            setColor: color => ({ chain }) => {\n                return chain()\n                    .setMark('textStyle', { color })\n                    .run();\n            },\n            unsetColor: () => ({ chain }) => {\n                return chain()\n                    .setMark('textStyle', { color: null })\n                    .removeEmptyTextStyle()\n                    .run();\n            },\n        };\n    },\n});\n\nexport { Color, Color as default };\n//# sourceMappingURL=index.js.map\n","import '@tiptap/extension-text-style'\n\nimport { Extension } from '@tiptap/core'\n\nexport type ColorOptions = {\n  /**\n   * The types where the color can be applied\n   * @default ['textStyle']\n   * @example ['heading', 'paragraph']\n  */\n  types: string[],\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    color: {\n      /**\n       * Set the text color\n       * @param color The color to set\n       * @example editor.commands.setColor('red')\n       */\n      setColor: (color: string) => ReturnType,\n\n      /**\n       * Unset the text color\n       * @example editor.commands.unsetColor()\n       */\n      unsetColor: () => ReturnType,\n    }\n  }\n}\n\n/**\n * This extension allows you to color your text.\n * @see https://tiptap.dev/api/extensions/color\n */\nexport const Color = Extension.create<ColorOptions>({\n  name: 'color',\n\n  addOptions() {\n    return {\n      types: ['textStyle'],\n    }\n  },\n\n  addGlobalAttributes() {\n    return [\n      {\n        types: this.options.types,\n        attributes: {\n          color: {\n            default: null,\n            parseHTML: element => element.style.color?.replace(/['\"]+/g, ''),\n            renderHTML: attributes => {\n              if (!attributes.color) {\n                return {}\n              }\n\n              return {\n                style: `color: ${attributes.color}`,\n              }\n            },\n          },\n        },\n      },\n    ]\n  },\n\n  addCommands() {\n    return {\n      setColor: color => ({ chain }) => {\n        return chain()\n          .setMark('textStyle', { color })\n          .run()\n      },\n      unsetColor: () => ({ chain }) => {\n        return chain()\n          .setMark('textStyle', { color: null })\n          .removeEmptyTextStyle()\n          .run()\n      },\n    }\n  },\n})\n","import { Mark, mergeAttributes } from '@tiptap/core';\n\nconst mergeNestedSpanStyles = (element) => {\n    if (!element.children.length) {\n        return;\n    }\n    const childSpans = element.querySelectorAll('span');\n    if (!childSpans) {\n        return;\n    }\n    childSpans.forEach(childSpan => {\n        var _a, _b;\n        const childStyle = childSpan.getAttribute('style');\n        const closestParentSpanStyleOfChild = (_b = (_a = childSpan.parentElement) === null || _a === void 0 ? void 0 : _a.closest('span')) === null || _b === void 0 ? void 0 : _b.getAttribute('style');\n        childSpan.setAttribute('style', `${closestParentSpanStyleOfChild};${childStyle}`);\n    });\n};\n/**\n * This extension allows you to create text styles. It is required by default\n * for the `textColor` and `backgroundColor` extensions.\n * @see https://www.tiptap.dev/api/marks/text-style\n */\nconst TextStyle = Mark.create({\n    name: 'textStyle',\n    priority: 101,\n    addOptions() {\n        return {\n            HTMLAttributes: {},\n            mergeNestedSpanStyles: false,\n        };\n    },\n    parseHTML() {\n        return [\n            {\n                tag: 'span',\n                getAttrs: element => {\n                    const hasStyles = element.hasAttribute('style');\n                    if (!hasStyles) {\n                        return false;\n                    }\n                    if (this.options.mergeNestedSpanStyles) {\n                        mergeNestedSpanStyles(element);\n                    }\n                    return {};\n                },\n            },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['span', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            removeEmptyTextStyle: () => ({ tr }) => {\n                const { selection } = tr;\n                // Gather all of the nodes within the selection range.\n                // We would need to go through each node individually\n                // to check if it has any inline style attributes.\n                // Otherwise, calling commands.unsetMark(this.name)\n                // removes everything from all the nodes\n                // within the selection range.\n                tr.doc.nodesBetween(selection.from, selection.to, (node, pos) => {\n                    // Check if it's a paragraph element, if so, skip this node as we apply\n                    // the text style to inline text nodes only (span).\n                    if (node.isTextblock) {\n                        return true;\n                    }\n                    // Check if the node has no inline style attributes.\n                    // Filter out non-`textStyle` marks.\n                    if (!node.marks.filter(mark => mark.type === this.type).some(mark => Object.values(mark.attrs).some(value => !!value))) {\n                        // Proceed with the removal of the `textStyle` mark for this node only\n                        tr.removeMark(pos, pos + node.nodeSize, this.type);\n                    }\n                });\n                return true;\n            },\n        };\n    },\n});\n\nexport { TextStyle, TextStyle as default };\n//# sourceMappingURL=index.js.map\n","import {\n  Mark,\n  mergeAttributes,\n} from '@tiptap/core'\n\nexport interface TextStyleOptions {\n  /**\n   * HTML attributes to add to the span element.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n  /**\n   * When enabled, merges the styles of nested spans into the child span during HTML parsing.\n   * This prioritizes the style of the child span.\n   * Used when parsing content created in other editors.\n   * (Fix for ProseMirror's default behavior.)\n   * @default false\n   */\n  mergeNestedSpanStyles: boolean,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    textStyle: {\n      /**\n       * Remove spans without inline style attributes.\n       * @example editor.commands.removeEmptyTextStyle()\n       */\n      removeEmptyTextStyle: () => ReturnType,\n    }\n  }\n}\n\nconst mergeNestedSpanStyles = (element: HTMLElement) => {\n  if (!element.children.length) { return }\n  const childSpans = element.querySelectorAll('span')\n\n  if (!childSpans) { return }\n\n  childSpans.forEach(childSpan => {\n    const childStyle = childSpan.getAttribute('style')\n    const closestParentSpanStyleOfChild = childSpan.parentElement?.closest('span')?.getAttribute('style')\n\n    childSpan.setAttribute('style', `${closestParentSpanStyleOfChild};${childStyle}`)\n\n  })\n}\n\n/**\n * This extension allows you to create text styles. It is required by default\n * for the `textColor` and `backgroundColor` extensions.\n * @see https://www.tiptap.dev/api/marks/text-style\n */\nexport const TextStyle = Mark.create<TextStyleOptions>({\n  name: 'textStyle',\n\n  priority: 101,\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n      mergeNestedSpanStyles: false,\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 'span',\n        getAttrs: element => {\n          const hasStyles = (element as HTMLElement).hasAttribute('style')\n\n          if (!hasStyles) {\n            return false\n          }\n          if (this.options.mergeNestedSpanStyles) { mergeNestedSpanStyles(element) }\n\n          return {}\n        },\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['span', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      removeEmptyTextStyle: () => ({ tr }) => {\n\n        const { selection } = tr\n\n        // Gather all of the nodes within the selection range.\n        // We would need to go through each node individually\n        // to check if it has any inline style attributes.\n        // Otherwise, calling commands.unsetMark(this.name)\n        // removes everything from all the nodes\n        // within the selection range.\n        tr.doc.nodesBetween(selection.from, selection.to, (node, pos) => {\n\n          // Check if it's a paragraph element, if so, skip this node as we apply\n          // the text style to inline text nodes only (span).\n          if (node.isTextblock) {\n            return true\n          }\n\n          // Check if the node has no inline style attributes.\n          // Filter out non-`textStyle` marks.\n          if (\n            !node.marks.filter(mark => mark.type === this.type).some(mark => Object.values(mark.attrs).some(value => !!value))) {\n            // Proceed with the removal of the `textStyle` mark for this node only\n            tr.removeMark(pos, pos + node.nodeSize, this.type)\n          }\n        })\n\n        return true\n      },\n    }\n  },\n\n})\n","import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Matches a highlight to a ==highlight== on input.\n */\nconst inputRegex = /(?:^|\\s)(==(?!\\s+==)((?:[^=]+))==(?!\\s+==))$/;\n/**\n * Matches a highlight to a ==highlight== on paste.\n */\nconst pasteRegex = /(?:^|\\s)(==(?!\\s+==)((?:[^=]+))==(?!\\s+==))/g;\n/**\n * This extension allows you to highlight text.\n * @see https://www.tiptap.dev/api/marks/highlight\n */\nconst Highlight = Mark.create({\n    name: 'highlight',\n    addOptions() {\n        return {\n            multicolor: false,\n            HTMLAttributes: {},\n        };\n    },\n    addAttributes() {\n        if (!this.options.multicolor) {\n            return {};\n        }\n        return {\n            color: {\n                default: null,\n                parseHTML: element => element.getAttribute('data-color') || element.style.backgroundColor,\n                renderHTML: attributes => {\n                    if (!attributes.color) {\n                        return {};\n                    }\n                    return {\n                        'data-color': attributes.color,\n                        style: `background-color: ${attributes.color}; color: inherit`,\n                    };\n                },\n            },\n        };\n    },\n    parseHTML() {\n        return [\n            {\n                tag: 'mark',\n            },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['mark', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            setHighlight: attributes => ({ commands }) => {\n                return commands.setMark(this.name, attributes);\n            },\n            toggleHighlight: attributes => ({ commands }) => {\n                return commands.toggleMark(this.name, attributes);\n            },\n            unsetHighlight: () => ({ commands }) => {\n                return commands.unsetMark(this.name);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-Shift-h': () => this.editor.commands.toggleHighlight(),\n        };\n    },\n    addInputRules() {\n        return [\n            markInputRule({\n                find: inputRegex,\n                type: this.type,\n            }),\n        ];\n    },\n    addPasteRules() {\n        return [\n            markPasteRule({\n                find: pasteRegex,\n                type: this.type,\n            }),\n        ];\n    },\n});\n\nexport { Highlight, Highlight as default, inputRegex, pasteRegex };\n//# sourceMappingURL=index.js.map\n","import {\n  Mark,\n  markInputRule,\n  markPasteRule,\n  mergeAttributes,\n} from '@tiptap/core'\n\nexport interface HighlightOptions {\n  /**\n   * Allow multiple highlight colors\n   * @default false\n   * @example true\n   */\n  multicolor: boolean,\n\n  /**\n   * HTML attributes to add to the highlight element.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    highlight: {\n      /**\n       * Set a highlight mark\n       * @param attributes The highlight attributes\n       * @example editor.commands.setHighlight({ color: 'red' })\n       */\n      setHighlight: (attributes?: { color: string }) => ReturnType,\n      /**\n       * Toggle a highlight mark\n       * @param attributes The highlight attributes\n       * @example editor.commands.toggleHighlight({ color: 'red' })\n       */\n      toggleHighlight: (attributes?: { color: string }) => ReturnType,\n      /**\n       * Unset a highlight mark\n       * @example editor.commands.unsetHighlight()\n       */\n      unsetHighlight: () => ReturnType,\n    }\n  }\n}\n\n/**\n * Matches a highlight to a ==highlight== on input.\n */\nexport const inputRegex = /(?:^|\\s)(==(?!\\s+==)((?:[^=]+))==(?!\\s+==))$/\n\n/**\n * Matches a highlight to a ==highlight== on paste.\n */\nexport const pasteRegex = /(?:^|\\s)(==(?!\\s+==)((?:[^=]+))==(?!\\s+==))/g\n\n/**\n * This extension allows you to highlight text.\n * @see https://www.tiptap.dev/api/marks/highlight\n */\nexport const Highlight = Mark.create<HighlightOptions>({\n  name: 'highlight',\n\n  addOptions() {\n    return {\n      multicolor: false,\n      HTMLAttributes: {},\n    }\n  },\n\n  addAttributes() {\n    if (!this.options.multicolor) {\n      return {}\n    }\n\n    return {\n      color: {\n        default: null,\n        parseHTML: element => element.getAttribute('data-color') || element.style.backgroundColor,\n        renderHTML: attributes => {\n          if (!attributes.color) {\n            return {}\n          }\n\n          return {\n            'data-color': attributes.color,\n            style: `background-color: ${attributes.color}; color: inherit`,\n          }\n        },\n      },\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 'mark',\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['mark', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setHighlight: attributes => ({ commands }) => {\n        return commands.setMark(this.name, attributes)\n      },\n      toggleHighlight: attributes => ({ commands }) => {\n        return commands.toggleMark(this.name, attributes)\n      },\n      unsetHighlight: () => ({ commands }) => {\n        return commands.unsetMark(this.name)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-Shift-h': () => this.editor.commands.toggleHighlight(),\n    }\n  },\n\n  addInputRules() {\n    return [\n      markInputRule({\n        find: inputRegex,\n        type: this.type,\n      }),\n    ]\n  },\n\n  addPasteRules() {\n    return [\n      markPasteRule({\n        find: pasteRegex,\n        type: this.type,\n      }),\n    ]\n  },\n})\n","import { Node, mergeAttributes, nodeInputRule } from '@tiptap/core';\n\n/**\n * Matches an image to a ![image](src \"title\") on input.\n */\nconst inputRegex = /(?:^|\\s)(!\\[(.+|:?)]\\((\\S+)(?:(?:\\s+)[\"'](\\S+)[\"'])?\\))$/;\n/**\n * This extension allows you to insert images.\n * @see https://www.tiptap.dev/api/nodes/image\n */\nconst Image = Node.create({\n    name: 'image',\n    addOptions() {\n        return {\n            inline: false,\n            allowBase64: false,\n            HTMLAttributes: {},\n        };\n    },\n    inline() {\n        return this.options.inline;\n    },\n    group() {\n        return this.options.inline ? 'inline' : 'block';\n    },\n    draggable: true,\n    addAttributes() {\n        return {\n            src: {\n                default: null,\n            },\n            alt: {\n                default: null,\n            },\n            title: {\n                default: null,\n            },\n        };\n    },\n    parseHTML() {\n        return [\n            {\n                tag: this.options.allowBase64\n                    ? 'img[src]'\n                    : 'img[src]:not([src^=\"data:\"])',\n            },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['img', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n    },\n    addCommands() {\n        return {\n            setImage: options => ({ commands }) => {\n                return commands.insertContent({\n                    type: this.name,\n                    attrs: options,\n                });\n            },\n        };\n    },\n    addInputRules() {\n        return [\n            nodeInputRule({\n                find: inputRegex,\n                type: this.type,\n                getAttributes: match => {\n                    const [, , alt, src, title] = match;\n                    return { src, alt, title };\n                },\n            }),\n        ];\n    },\n});\n\nexport { Image, Image as default, inputRegex };\n//# sourceMappingURL=index.js.map\n","import {\n  mergeAttributes,\n  Node,\n  nodeInputRule,\n} from '@tiptap/core'\n\nexport interface ImageOptions {\n  /**\n   * Controls if the image node should be inline or not.\n   * @default false\n   * @example true\n   */\n  inline: boolean,\n\n  /**\n   * Controls if base64 images are allowed. Enable this if you want to allow\n   * base64 image urls in the `src` attribute.\n   * @default false\n   * @example true\n   */\n  allowBase64: boolean,\n\n  /**\n   * HTML attributes to add to the image element.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    image: {\n      /**\n       * Add an image\n       * @param options The image attributes\n       * @example\n       * editor\n       *   .commands\n       *   .setImage({ src: 'https://tiptap.dev/logo.png', alt: 'tiptap', title: 'tiptap logo' })\n       */\n      setImage: (options: { src: string, alt?: string, title?: string }) => ReturnType,\n    }\n  }\n}\n\n/**\n * Matches an image to a ![image](src \"title\") on input.\n */\nexport const inputRegex = /(?:^|\\s)(!\\[(.+|:?)]\\((\\S+)(?:(?:\\s+)[\"'](\\S+)[\"'])?\\))$/\n\n/**\n * This extension allows you to insert images.\n * @see https://www.tiptap.dev/api/nodes/image\n */\nexport const Image = Node.create<ImageOptions>({\n  name: 'image',\n\n  addOptions() {\n    return {\n      inline: false,\n      allowBase64: false,\n      HTMLAttributes: {},\n    }\n  },\n\n  inline() {\n    return this.options.inline\n  },\n\n  group() {\n    return this.options.inline ? 'inline' : 'block'\n  },\n\n  draggable: true,\n\n  addAttributes() {\n    return {\n      src: {\n        default: null,\n      },\n      alt: {\n        default: null,\n      },\n      title: {\n        default: null,\n      },\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: this.options.allowBase64\n          ? 'img[src]'\n          : 'img[src]:not([src^=\"data:\"])',\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['img', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]\n  },\n\n  addCommands() {\n    return {\n      setImage: options => ({ commands }) => {\n        return commands.insertContent({\n          type: this.name,\n          attrs: options,\n        })\n      },\n    }\n  },\n\n  addInputRules() {\n    return [\n      nodeInputRule({\n        find: inputRegex,\n        type: this.type,\n        getAttributes: match => {\n          const [,, alt, src, title] = match\n\n          return { src, alt, title }\n        },\n      }),\n    ]\n  },\n})\n","import { combineTransactionSteps, getChangedRanges, findChildrenInRange, getMarksBetween, getAttributes, Mark, mergeAttributes, markPasteRule } from '@tiptap/core';\nimport { tokenize, find, registerCustomProtocol, reset } from 'linkifyjs';\nimport { Plugin, PluginKey } from '@tiptap/pm/state';\n\n// From DOMPurify\n// https://github.com/cure53/DOMPurify/blob/main/src/regexp.ts\nconst UNICODE_WHITESPACE_PATTERN = '[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]';\nconst UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN);\nconst UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`);\nconst UNICODE_WHITESPACE_REGEX_GLOBAL = new RegExp(UNICODE_WHITESPACE_PATTERN, 'g');\n\n/**\n * Check if the provided tokens form a valid link structure, which can either be a single link token\n * or a link token surrounded by parentheses or square brackets.\n *\n * This ensures that only complete and valid text is hyperlinked, preventing cases where a valid\n * top-level domain (TLD) is immediately followed by an invalid character, like a number. For\n * example, with the `find` method from Linkify, entering `example.com1` would result in\n * `example.com` being linked and the trailing `1` left as plain text. By using the `tokenize`\n * method, we can perform more comprehensive validation on the input text.\n */\nfunction isValidLinkStructure(tokens) {\n    if (tokens.length === 1) {\n        return tokens[0].isLink;\n    }\n    if (tokens.length === 3 && tokens[1].isLink) {\n        return ['()', '[]'].includes(tokens[0].value + tokens[2].value);\n    }\n    return false;\n}\n/**\n * This plugin allows you to automatically add links to your editor.\n * @param options The plugin options\n * @returns The plugin instance\n */\nfunction autolink(options) {\n    return new Plugin({\n        key: new PluginKey('autolink'),\n        appendTransaction: (transactions, oldState, newState) => {\n            /**\n             * Does the transaction change the document?\n             */\n            const docChanges = transactions.some(transaction => transaction.docChanged) && !oldState.doc.eq(newState.doc);\n            /**\n             * Prevent autolink if the transaction is not a document change or if the transaction has the meta `preventAutolink`.\n             */\n            const preventAutolink = transactions.some(transaction => transaction.getMeta('preventAutolink'));\n            /**\n             * Prevent autolink if the transaction is not a document change\n             * or if the transaction has the meta `preventAutolink`.\n             */\n            if (!docChanges || preventAutolink) {\n                return;\n            }\n            const { tr } = newState;\n            const transform = combineTransactionSteps(oldState.doc, [...transactions]);\n            const changes = getChangedRanges(transform);\n            changes.forEach(({ newRange }) => {\n                // Now let’s see if we can add new links.\n                const nodesInChangedRanges = findChildrenInRange(newState.doc, newRange, node => node.isTextblock);\n                let textBlock;\n                let textBeforeWhitespace;\n                if (nodesInChangedRanges.length > 1) {\n                    // Grab the first node within the changed ranges (ex. the first of two paragraphs when hitting enter).\n                    textBlock = nodesInChangedRanges[0];\n                    textBeforeWhitespace = newState.doc.textBetween(textBlock.pos, textBlock.pos + textBlock.node.nodeSize, undefined, ' ');\n                }\n                else if (nodesInChangedRanges.length) {\n                    const endText = newState.doc.textBetween(newRange.from, newRange.to, ' ', ' ');\n                    if (!UNICODE_WHITESPACE_REGEX_END.test(endText)) {\n                        return;\n                    }\n                    textBlock = nodesInChangedRanges[0];\n                    textBeforeWhitespace = newState.doc.textBetween(textBlock.pos, newRange.to, undefined, ' ');\n                }\n                if (textBlock && textBeforeWhitespace) {\n                    const wordsBeforeWhitespace = textBeforeWhitespace.split(UNICODE_WHITESPACE_REGEX).filter(Boolean);\n                    if (wordsBeforeWhitespace.length <= 0) {\n                        return false;\n                    }\n                    const lastWordBeforeSpace = wordsBeforeWhitespace[wordsBeforeWhitespace.length - 1];\n                    const lastWordAndBlockOffset = textBlock.pos + textBeforeWhitespace.lastIndexOf(lastWordBeforeSpace);\n                    if (!lastWordBeforeSpace) {\n                        return false;\n                    }\n                    const linksBeforeSpace = tokenize(lastWordBeforeSpace).map(t => t.toObject(options.defaultProtocol));\n                    if (!isValidLinkStructure(linksBeforeSpace)) {\n                        return false;\n                    }\n                    linksBeforeSpace\n                        .filter(link => link.isLink)\n                        // Calculate link position.\n                        .map(link => ({\n                        ...link,\n                        from: lastWordAndBlockOffset + link.start + 1,\n                        to: lastWordAndBlockOffset + link.end + 1,\n                    }))\n                        // ignore link inside code mark\n                        .filter(link => {\n                        if (!newState.schema.marks.code) {\n                            return true;\n                        }\n                        return !newState.doc.rangeHasMark(link.from, link.to, newState.schema.marks.code);\n                    })\n                        // validate link\n                        .filter(link => options.validate(link.value))\n                        // check whether should autolink\n                        .filter(link => options.shouldAutoLink(link.value))\n                        // Add link mark.\n                        .forEach(link => {\n                        if (getMarksBetween(link.from, link.to, newState.doc).some(item => item.mark.type === options.type)) {\n                            return;\n                        }\n                        tr.addMark(link.from, link.to, options.type.create({\n                            href: link.href,\n                        }));\n                    });\n                }\n            });\n            if (!tr.steps.length) {\n                return;\n            }\n            return tr;\n        },\n    });\n}\n\nfunction clickHandler(options) {\n    return new Plugin({\n        key: new PluginKey('handleClickLink'),\n        props: {\n            handleClick: (view, pos, event) => {\n                var _a, _b;\n                if (event.button !== 0) {\n                    return false;\n                }\n                if (!view.editable) {\n                    return false;\n                }\n                let a = event.target;\n                const els = [];\n                while (a.nodeName !== 'DIV') {\n                    els.push(a);\n                    a = a.parentNode;\n                }\n                if (!els.find(value => value.nodeName === 'A')) {\n                    return false;\n                }\n                const attrs = getAttributes(view.state, options.type.name);\n                const link = event.target;\n                const href = (_a = link === null || link === void 0 ? void 0 : link.href) !== null && _a !== void 0 ? _a : attrs.href;\n                const target = (_b = link === null || link === void 0 ? void 0 : link.target) !== null && _b !== void 0 ? _b : attrs.target;\n                if (link && href) {\n                    window.open(href, target);\n                    return true;\n                }\n                return false;\n            },\n        },\n    });\n}\n\nfunction pasteHandler(options) {\n    return new Plugin({\n        key: new PluginKey('handlePasteLink'),\n        props: {\n            handlePaste: (view, event, slice) => {\n                const { state } = view;\n                const { selection } = state;\n                const { empty } = selection;\n                if (empty) {\n                    return false;\n                }\n                let textContent = '';\n                slice.content.forEach(node => {\n                    textContent += node.textContent;\n                });\n                const link = find(textContent, { defaultProtocol: options.defaultProtocol }).find(item => item.isLink && item.value === textContent);\n                if (!textContent || !link) {\n                    return false;\n                }\n                return options.editor.commands.setMark(options.type, {\n                    href: link.href,\n                });\n            },\n        },\n    });\n}\n\nconst pasteRegex = /https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z]{2,}\\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi;\nfunction isAllowedUri(uri, protocols) {\n    const allowedProtocols = [\n        'http',\n        'https',\n        'ftp',\n        'ftps',\n        'mailto',\n        'tel',\n        'callto',\n        'sms',\n        'cid',\n        'xmpp',\n    ];\n    if (protocols) {\n        protocols.forEach(protocol => {\n            const nextProtocol = typeof protocol === 'string' ? protocol : protocol.scheme;\n            if (nextProtocol) {\n                allowedProtocols.push(nextProtocol);\n            }\n        });\n    }\n    return (!uri\n        || uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, '').match(new RegExp(\n        // eslint-disable-next-line no-useless-escape\n        `^(?:(?:${allowedProtocols.join('|')}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`, 'i')));\n}\n/**\n * This extension allows you to create links.\n * @see https://www.tiptap.dev/api/marks/link\n */\nconst Link = Mark.create({\n    name: 'link',\n    priority: 1000,\n    keepOnSplit: false,\n    exitable: true,\n    onCreate() {\n        if (this.options.validate && !this.options.shouldAutoLink) {\n            // Copy the validate function to the shouldAutoLink option\n            this.options.shouldAutoLink = this.options.validate;\n            console.warn('The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.');\n        }\n        this.options.protocols.forEach(protocol => {\n            if (typeof protocol === 'string') {\n                registerCustomProtocol(protocol);\n                return;\n            }\n            registerCustomProtocol(protocol.scheme, protocol.optionalSlashes);\n        });\n    },\n    onDestroy() {\n        reset();\n    },\n    inclusive() {\n        return this.options.autolink;\n    },\n    addOptions() {\n        return {\n            openOnClick: true,\n            linkOnPaste: true,\n            autolink: true,\n            protocols: [],\n            defaultProtocol: 'http',\n            HTMLAttributes: {\n                target: '_blank',\n                rel: 'noopener noreferrer nofollow',\n                class: null,\n            },\n            isAllowedUri: (url, ctx) => !!isAllowedUri(url, ctx.protocols),\n            validate: url => !!url,\n            shouldAutoLink: url => !!url,\n        };\n    },\n    addAttributes() {\n        return {\n            href: {\n                default: null,\n                parseHTML(element) {\n                    return element.getAttribute('href');\n                },\n            },\n            target: {\n                default: this.options.HTMLAttributes.target,\n            },\n            rel: {\n                default: this.options.HTMLAttributes.rel,\n            },\n            class: {\n                default: this.options.HTMLAttributes.class,\n            },\n        };\n    },\n    parseHTML() {\n        return [\n            {\n                tag: 'a[href]',\n                getAttrs: dom => {\n                    const href = dom.getAttribute('href');\n                    // prevent XSS attacks\n                    if (!href\n                        || !this.options.isAllowedUri(href, {\n                            defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n                            protocols: this.options.protocols,\n                            defaultProtocol: this.options.defaultProtocol,\n                        })) {\n                        return false;\n                    }\n                    return null;\n                },\n            },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        // prevent XSS attacks\n        if (!this.options.isAllowedUri(HTMLAttributes.href, {\n            defaultValidate: href => !!isAllowedUri(href, this.options.protocols),\n            protocols: this.options.protocols,\n            defaultProtocol: this.options.defaultProtocol,\n        })) {\n            // strip out the href\n            return [\n                'a',\n                mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: '' }),\n                0,\n            ];\n        }\n        return ['a', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            setLink: attributes => ({ chain }) => {\n                const { href } = attributes;\n                if (!this.options.isAllowedUri(href, {\n                    defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n                    protocols: this.options.protocols,\n                    defaultProtocol: this.options.defaultProtocol,\n                })) {\n                    return false;\n                }\n                return chain().setMark(this.name, attributes).setMeta('preventAutolink', true).run();\n            },\n            toggleLink: attributes => ({ chain }) => {\n                const { href } = attributes;\n                if (!this.options.isAllowedUri(href, {\n                    defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n                    protocols: this.options.protocols,\n                    defaultProtocol: this.options.defaultProtocol,\n                })) {\n                    return false;\n                }\n                return chain()\n                    .toggleMark(this.name, attributes, { extendEmptyMarkRange: true })\n                    .setMeta('preventAutolink', true)\n                    .run();\n            },\n            unsetLink: () => ({ chain }) => {\n                return chain()\n                    .unsetMark(this.name, { extendEmptyMarkRange: true })\n                    .setMeta('preventAutolink', true)\n                    .run();\n            },\n        };\n    },\n    addPasteRules() {\n        return [\n            markPasteRule({\n                find: text => {\n                    const foundLinks = [];\n                    if (text) {\n                        const { protocols, defaultProtocol } = this.options;\n                        const links = find(text).filter(item => item.isLink\n                            && this.options.isAllowedUri(item.value, {\n                                defaultValidate: href => !!isAllowedUri(href, protocols),\n                                protocols,\n                                defaultProtocol,\n                            }));\n                        if (links.length) {\n                            links.forEach(link => foundLinks.push({\n                                text: link.value,\n                                data: {\n                                    href: link.href,\n                                },\n                                index: link.start,\n                            }));\n                        }\n                    }\n                    return foundLinks;\n                },\n                type: this.type,\n                getAttributes: match => {\n                    var _a;\n                    return {\n                        href: (_a = match.data) === null || _a === void 0 ? void 0 : _a.href,\n                    };\n                },\n            }),\n        ];\n    },\n    addProseMirrorPlugins() {\n        const plugins = [];\n        const { protocols, defaultProtocol } = this.options;\n        if (this.options.autolink) {\n            plugins.push(autolink({\n                type: this.type,\n                defaultProtocol: this.options.defaultProtocol,\n                validate: url => this.options.isAllowedUri(url, {\n                    defaultValidate: href => !!isAllowedUri(href, protocols),\n                    protocols,\n                    defaultProtocol,\n                }),\n                shouldAutoLink: this.options.shouldAutoLink,\n            }));\n        }\n        if (this.options.openOnClick === true) {\n            plugins.push(clickHandler({\n                type: this.type,\n            }));\n        }\n        if (this.options.linkOnPaste) {\n            plugins.push(pasteHandler({\n                editor: this.editor,\n                defaultProtocol: this.options.defaultProtocol,\n                type: this.type,\n            }));\n        }\n        return plugins;\n    },\n});\n\nexport { Link, Link as default, isAllowedUri, pasteRegex };\n//# sourceMappingURL=index.js.map\n","// From DOMPurify\n// https://github.com/cure53/DOMPurify/blob/main/src/regexp.ts\nexport const UNICODE_WHITESPACE_PATTERN = '[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]'\n\nexport const UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN)\nexport const UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`)\nexport const UNICODE_WHITESPACE_REGEX_GLOBAL = new RegExp(UNICODE_WHITESPACE_PATTERN, 'g')\n","import {\n  combineTransactionSteps,\n  findChildrenInRange,\n  getChangedRanges,\n  getMarksBetween,\n  NodeWithPos,\n} from '@tiptap/core'\nimport { MarkType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { MultiToken, tokenize } from 'linkifyjs'\n\nimport { UNICODE_WHITESPACE_REGEX, UNICODE_WHITESPACE_REGEX_END } from './whitespace.js'\n\n/**\n * Check if the provided tokens form a valid link structure, which can either be a single link token\n * or a link token surrounded by parentheses or square brackets.\n *\n * This ensures that only complete and valid text is hyperlinked, preventing cases where a valid\n * top-level domain (TLD) is immediately followed by an invalid character, like a number. For\n * example, with the `find` method from Linkify, entering `example.com1` would result in\n * `example.com` being linked and the trailing `1` left as plain text. By using the `tokenize`\n * method, we can perform more comprehensive validation on the input text.\n */\nfunction isValidLinkStructure(tokens: Array<ReturnType<MultiToken['toObject']>>) {\n  if (tokens.length === 1) {\n    return tokens[0].isLink\n  }\n\n  if (tokens.length === 3 && tokens[1].isLink) {\n    return ['()', '[]'].includes(tokens[0].value + tokens[2].value)\n  }\n\n  return false\n}\n\ntype AutolinkOptions = {\n  type: MarkType\n  defaultProtocol: string\n  validate: (url: string) => boolean\n  shouldAutoLink: (url: string) => boolean\n}\n\n/**\n * This plugin allows you to automatically add links to your editor.\n * @param options The plugin options\n * @returns The plugin instance\n */\nexport function autolink(options: AutolinkOptions): Plugin {\n  return new Plugin({\n    key: new PluginKey('autolink'),\n    appendTransaction: (transactions, oldState, newState) => {\n      /**\n       * Does the transaction change the document?\n       */\n      const docChanges = transactions.some(transaction => transaction.docChanged) && !oldState.doc.eq(newState.doc)\n\n      /**\n       * Prevent autolink if the transaction is not a document change or if the transaction has the meta `preventAutolink`.\n       */\n      const preventAutolink = transactions.some(transaction => transaction.getMeta('preventAutolink'))\n\n      /**\n       * Prevent autolink if the transaction is not a document change\n       * or if the transaction has the meta `preventAutolink`.\n       */\n      if (!docChanges || preventAutolink) {\n        return\n      }\n\n      const { tr } = newState\n      const transform = combineTransactionSteps(oldState.doc, [...transactions])\n      const changes = getChangedRanges(transform)\n\n      changes.forEach(({ newRange }) => {\n        // Now let’s see if we can add new links.\n        const nodesInChangedRanges = findChildrenInRange(\n          newState.doc,\n          newRange,\n          node => node.isTextblock,\n        )\n\n        let textBlock: NodeWithPos | undefined\n        let textBeforeWhitespace: string | undefined\n\n        if (nodesInChangedRanges.length > 1) {\n          // Grab the first node within the changed ranges (ex. the first of two paragraphs when hitting enter).\n          textBlock = nodesInChangedRanges[0]\n          textBeforeWhitespace = newState.doc.textBetween(\n            textBlock.pos,\n            textBlock.pos + textBlock.node.nodeSize,\n            undefined,\n            ' ',\n          )\n        } else if (nodesInChangedRanges.length) {\n          const endText = newState.doc.textBetween(newRange.from, newRange.to, ' ', ' ')\n\n          if (!UNICODE_WHITESPACE_REGEX_END.test(endText)) {\n            return\n          }\n          textBlock = nodesInChangedRanges[0]\n          textBeforeWhitespace = newState.doc.textBetween(\n            textBlock.pos,\n            newRange.to,\n            undefined,\n            ' ',\n          )\n        }\n\n        if (textBlock && textBeforeWhitespace) {\n          const wordsBeforeWhitespace = textBeforeWhitespace.split(UNICODE_WHITESPACE_REGEX).filter(Boolean)\n\n          if (wordsBeforeWhitespace.length <= 0) {\n            return false\n          }\n\n          const lastWordBeforeSpace = wordsBeforeWhitespace[wordsBeforeWhitespace.length - 1]\n          const lastWordAndBlockOffset = textBlock.pos + textBeforeWhitespace.lastIndexOf(lastWordBeforeSpace)\n\n          if (!lastWordBeforeSpace) {\n            return false\n          }\n\n          const linksBeforeSpace = tokenize(lastWordBeforeSpace).map(t => t.toObject(options.defaultProtocol))\n\n          if (!isValidLinkStructure(linksBeforeSpace)) {\n            return false\n          }\n\n          linksBeforeSpace\n            .filter(link => link.isLink)\n            // Calculate link position.\n            .map(link => ({\n              ...link,\n              from: lastWordAndBlockOffset + link.start + 1,\n              to: lastWordAndBlockOffset + link.end + 1,\n            }))\n            // ignore link inside code mark\n            .filter(link => {\n              if (!newState.schema.marks.code) {\n                return true\n              }\n\n              return !newState.doc.rangeHasMark(\n                link.from,\n                link.to,\n                newState.schema.marks.code,\n              )\n            })\n            // validate link\n            .filter(link => options.validate(link.value))\n            // check whether should autolink\n            .filter(link => options.shouldAutoLink(link.value))\n            // Add link mark.\n            .forEach(link => {\n              if (getMarksBetween(link.from, link.to, newState.doc).some(item => item.mark.type === options.type)) {\n                return\n              }\n\n              tr.addMark(\n                link.from,\n                link.to,\n                options.type.create({\n                  href: link.href,\n                }),\n              )\n            })\n        }\n      })\n\n      if (!tr.steps.length) {\n        return\n      }\n\n      return tr\n    },\n  })\n}\n","import { getAttributes } from '@tiptap/core'\nimport { MarkType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\ntype ClickHandlerOptions = {\n  type: MarkType;\n}\n\nexport function clickHandler(options: ClickHandlerOptions): Plugin {\n  return new Plugin({\n    key: new PluginKey('handleClickLink'),\n    props: {\n      handleClick: (view, pos, event) => {\n        if (event.button !== 0) {\n          return false\n        }\n\n        if (!view.editable) {\n          return false\n        }\n\n        let a = event.target as HTMLElement\n        const els = []\n\n        while (a.nodeName !== 'DIV') {\n          els.push(a)\n          a = a.parentNode as HTMLElement\n        }\n\n        if (!els.find(value => value.nodeName === 'A')) {\n          return false\n        }\n\n        const attrs = getAttributes(view.state, options.type.name)\n        const link = (event.target as HTMLAnchorElement)\n\n        const href = link?.href ?? attrs.href\n        const target = link?.target ?? attrs.target\n\n        if (link && href) {\n          window.open(href, target)\n\n          return true\n        }\n\n        return false\n      },\n    },\n  })\n}\n","import { Editor } from '@tiptap/core'\nimport { MarkType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { find } from 'linkifyjs'\n\ntype PasteHandlerOptions = {\n  editor: Editor\n  defaultProtocol: string\n  type: MarkType\n}\n\nexport function pasteHandler(options: PasteHandlerOptions): Plugin {\n  return new Plugin({\n    key: new PluginKey('handlePasteLink'),\n    props: {\n      handlePaste: (view, event, slice) => {\n        const { state } = view\n        const { selection } = state\n        const { empty } = selection\n\n        if (empty) {\n          return false\n        }\n\n        let textContent = ''\n\n        slice.content.forEach(node => {\n          textContent += node.textContent\n        })\n\n        const link = find(textContent, { defaultProtocol: options.defaultProtocol }).find(item => item.isLink && item.value === textContent)\n\n        if (!textContent || !link) {\n          return false\n        }\n\n        return options.editor.commands.setMark(options.type, {\n          href: link.href,\n        })\n      },\n    },\n  })\n}\n","import {\n  Mark, markPasteRule, mergeAttributes, PasteRuleMatch,\n} from '@tiptap/core'\nimport { Plugin } from '@tiptap/pm/state'\nimport { find, registerCustomProtocol, reset } from 'linkifyjs'\n\nimport { autolink } from './helpers/autolink.js'\nimport { clickHandler } from './helpers/clickHandler.js'\nimport { pasteHandler } from './helpers/pasteHandler.js'\nimport { UNICODE_WHITESPACE_REGEX_GLOBAL } from './helpers/whitespace.js'\n\nexport interface LinkProtocolOptions {\n  /**\n   * The protocol scheme to be registered.\n   * @default '''\n   * @example 'ftp'\n   * @example 'git'\n   */\n  scheme: string;\n\n  /**\n   * If enabled, it allows optional slashes after the protocol.\n   * @default false\n   * @example true\n   */\n  optionalSlashes?: boolean;\n}\n\nexport const pasteRegex = /https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z]{2,}\\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi\n\n/**\n * @deprecated The default behavior is now to open links when the editor is not editable.\n */\ntype DeprecatedOpenWhenNotEditable = 'whenNotEditable';\n\nexport interface LinkOptions {\n  /**\n   * If enabled, the extension will automatically add links as you type.\n   * @default true\n   * @example false\n   */\n  autolink: boolean;\n\n  /**\n   * An array of custom protocols to be registered with linkifyjs.\n   * @default []\n   * @example ['ftp', 'git']\n   */\n  protocols: Array<LinkProtocolOptions | string>;\n\n  /**\n   * Default protocol to use when no protocol is specified.\n   * @default 'http'\n   */\n  defaultProtocol: string;\n  /**\n   * If enabled, links will be opened on click.\n   * @default true\n   * @example false\n   */\n  openOnClick: boolean | DeprecatedOpenWhenNotEditable;\n  /**\n   * Adds a link to the current selection if the pasted content only contains an url.\n   * @default true\n   * @example false\n   */\n  linkOnPaste: boolean;\n\n  /**\n   * HTML attributes to add to the link element.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>;\n\n  /**\n   * @deprecated Use the `shouldAutoLink` option instead.\n   * A validation function that modifies link verification for the auto linker.\n   * @param url - The url to be validated.\n   * @returns - True if the url is valid, false otherwise.\n   */\n  validate: (url: string) => boolean;\n\n  /**\n   * A validation function which is used for configuring link verification for preventing XSS attacks.\n   * Only modify this if you know what you're doing.\n   *\n   * @returns {boolean} `true` if the URL is valid, `false` otherwise.\n   *\n   * @example\n   * isAllowedUri: (url, { defaultValidate, protocols, defaultProtocol }) => {\n   * return url.startsWith('./') || defaultValidate(url)\n   * }\n   */\n  isAllowedUri: (\n    /**\n     * The URL to be validated.\n     */\n    url: string,\n    ctx: {\n      /**\n       * The default validation function.\n       */\n      defaultValidate: (url: string) => boolean;\n      /**\n       * An array of allowed protocols for the URL (e.g., \"http\", \"https\"). As defined in the `protocols` option.\n       */\n      protocols: Array<LinkProtocolOptions | string>;\n      /**\n       * A string that represents the default protocol (e.g., 'http'). As defined in the `defaultProtocol` option.\n       */\n      defaultProtocol: string;\n    }\n  ) => boolean;\n\n  /**\n   * Determines whether a valid link should be automatically linked in the content.\n   *\n   * @param {string} url - The URL that has already been validated.\n   * @returns {boolean} - True if the link should be auto-linked; false if it should not be auto-linked.\n   */\n  shouldAutoLink: (url: string) => boolean;\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    link: {\n      /**\n       * Set a link mark\n       * @param attributes The link attributes\n       * @example editor.commands.setLink({ href: 'https://tiptap.dev' })\n       */\n      setLink: (attributes: {\n        href: string;\n        target?: string | null;\n        rel?: string | null;\n        class?: string | null;\n      }) => ReturnType;\n      /**\n       * Toggle a link mark\n       * @param attributes The link attributes\n       * @example editor.commands.toggleLink({ href: 'https://tiptap.dev' })\n       */\n      toggleLink: (attributes: {\n        href: string;\n        target?: string | null;\n        rel?: string | null;\n        class?: string | null;\n      }) => ReturnType;\n      /**\n       * Unset a link mark\n       * @example editor.commands.unsetLink()\n       */\n      unsetLink: () => ReturnType;\n    };\n  }\n}\n\nexport function isAllowedUri(uri: string | undefined, protocols?: LinkOptions['protocols']) {\n  const allowedProtocols: string[] = [\n    'http',\n    'https',\n    'ftp',\n    'ftps',\n    'mailto',\n    'tel',\n    'callto',\n    'sms',\n    'cid',\n    'xmpp',\n  ]\n\n  if (protocols) {\n    protocols.forEach(protocol => {\n      const nextProtocol = typeof protocol === 'string' ? protocol : protocol.scheme\n\n      if (nextProtocol) {\n        allowedProtocols.push(nextProtocol)\n      }\n    })\n  }\n\n  return (\n    !uri\n    || uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, '').match(\n      new RegExp(\n        // eslint-disable-next-line no-useless-escape\n        `^(?:(?:${allowedProtocols.join('|')}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,\n        'i',\n      ),\n    )\n  )\n}\n\n/**\n * This extension allows you to create links.\n * @see https://www.tiptap.dev/api/marks/link\n */\nexport const Link = Mark.create<LinkOptions>({\n  name: 'link',\n\n  priority: 1000,\n\n  keepOnSplit: false,\n\n  exitable: true,\n\n  onCreate() {\n    if (this.options.validate && !this.options.shouldAutoLink) {\n      // Copy the validate function to the shouldAutoLink option\n      this.options.shouldAutoLink = this.options.validate\n      console.warn(\n        'The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.',\n      )\n    }\n    this.options.protocols.forEach(protocol => {\n      if (typeof protocol === 'string') {\n        registerCustomProtocol(protocol)\n        return\n      }\n      registerCustomProtocol(protocol.scheme, protocol.optionalSlashes)\n    })\n  },\n\n  onDestroy() {\n    reset()\n  },\n\n  inclusive() {\n    return this.options.autolink\n  },\n\n  addOptions() {\n    return {\n      openOnClick: true,\n      linkOnPaste: true,\n      autolink: true,\n      protocols: [],\n      defaultProtocol: 'http',\n      HTMLAttributes: {\n        target: '_blank',\n        rel: 'noopener noreferrer nofollow',\n        class: null,\n      },\n      isAllowedUri: (url, ctx) => !!isAllowedUri(url, ctx.protocols),\n      validate: url => !!url,\n      shouldAutoLink: url => !!url,\n    }\n  },\n\n  addAttributes() {\n    return {\n      href: {\n        default: null,\n        parseHTML(element) {\n          return element.getAttribute('href')\n        },\n      },\n      target: {\n        default: this.options.HTMLAttributes.target,\n      },\n      rel: {\n        default: this.options.HTMLAttributes.rel,\n      },\n      class: {\n        default: this.options.HTMLAttributes.class,\n      },\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 'a[href]',\n        getAttrs: dom => {\n          const href = (dom as HTMLElement).getAttribute('href')\n\n          // prevent XSS attacks\n          if (\n            !href\n            || !this.options.isAllowedUri(href, {\n              defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n              protocols: this.options.protocols,\n              defaultProtocol: this.options.defaultProtocol,\n            })\n          ) {\n            return false\n          }\n          return null\n        },\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    // prevent XSS attacks\n    if (\n      !this.options.isAllowedUri(HTMLAttributes.href, {\n        defaultValidate: href => !!isAllowedUri(href, this.options.protocols),\n        protocols: this.options.protocols,\n        defaultProtocol: this.options.defaultProtocol,\n      })\n    ) {\n      // strip out the href\n      return [\n        'a',\n        mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: '' }),\n        0,\n      ]\n    }\n\n    return ['a', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setLink:\n        attributes => ({ chain }) => {\n          const { href } = attributes\n\n          if (!this.options.isAllowedUri(href, {\n            defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n            protocols: this.options.protocols,\n            defaultProtocol: this.options.defaultProtocol,\n          })) {\n            return false\n          }\n\n          return chain().setMark(this.name, attributes).setMeta('preventAutolink', true).run()\n        },\n\n      toggleLink:\n        attributes => ({ chain }) => {\n          const { href } = attributes\n\n          if (!this.options.isAllowedUri(href, {\n            defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n            protocols: this.options.protocols,\n            defaultProtocol: this.options.defaultProtocol,\n          })) {\n            return false\n          }\n\n          return chain()\n            .toggleMark(this.name, attributes, { extendEmptyMarkRange: true })\n            .setMeta('preventAutolink', true)\n            .run()\n        },\n\n      unsetLink:\n        () => ({ chain }) => {\n          return chain()\n            .unsetMark(this.name, { extendEmptyMarkRange: true })\n            .setMeta('preventAutolink', true)\n            .run()\n        },\n    }\n  },\n\n  addPasteRules() {\n    return [\n      markPasteRule({\n        find: text => {\n          const foundLinks: PasteRuleMatch[] = []\n\n          if (text) {\n            const { protocols, defaultProtocol } = this.options\n            const links = find(text).filter(\n              item => item.isLink\n                && this.options.isAllowedUri(item.value, {\n                  defaultValidate: href => !!isAllowedUri(href, protocols),\n                  protocols,\n                  defaultProtocol,\n                }),\n            )\n\n            if (links.length) {\n              links.forEach(link => foundLinks.push({\n                text: link.value,\n                data: {\n                  href: link.href,\n                },\n                index: link.start,\n              }))\n            }\n          }\n\n          return foundLinks\n        },\n        type: this.type,\n        getAttributes: match => {\n          return {\n            href: match.data?.href,\n          }\n        },\n      }),\n    ]\n  },\n\n  addProseMirrorPlugins() {\n    const plugins: Plugin[] = []\n    const { protocols, defaultProtocol } = this.options\n\n    if (this.options.autolink) {\n      plugins.push(\n        autolink({\n          type: this.type,\n          defaultProtocol: this.options.defaultProtocol,\n          validate: url => this.options.isAllowedUri(url, {\n            defaultValidate: href => !!isAllowedUri(href, protocols),\n            protocols,\n            defaultProtocol,\n          }),\n          shouldAutoLink: this.options.shouldAutoLink,\n        }),\n      )\n    }\n\n    if (this.options.openOnClick === true) {\n      plugins.push(\n        clickHandler({\n          type: this.type,\n        }),\n      )\n    }\n\n    if (this.options.linkOnPaste) {\n      plugins.push(\n        pasteHandler({\n          editor: this.editor,\n          defaultProtocol: this.options.defaultProtocol,\n          type: this.type,\n        }),\n      )\n    }\n\n    return plugins\n  },\n})\n","// THIS FILE IS AUTOMATICALLY GENERATED DO NOT EDIT DIRECTLY\n// See update-tlds.js for encoding/decoding format\n// https://data.iana.org/TLD/tlds-alpha-by-domain.txt\nconst encodedTlds = 'aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2';\n// Internationalized domain names containing non-ASCII\nconst encodedUtlds = 'ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2';\n\n/**\n * Finite State Machine generation utilities\n */\n\n/**\n * @template T\n * @typedef {{ [group: string]: T[] }} Collections\n */\n\n/**\n * @typedef {{ [group: string]: true }} Flags\n */\n\n// Keys in scanner Collections instances\nconst numeric = 'numeric';\nconst ascii = 'ascii';\nconst alpha = 'alpha';\nconst asciinumeric = 'asciinumeric';\nconst alphanumeric = 'alphanumeric';\nconst domain = 'domain';\nconst emoji = 'emoji';\nconst scheme = 'scheme';\nconst slashscheme = 'slashscheme';\nconst whitespace = 'whitespace';\n\n/**\n * @template T\n * @param {string} name\n * @param {Collections<T>} groups to register in\n * @returns {T[]} Current list of tokens in the given collection\n */\nfunction registerGroup(name, groups) {\n  if (!(name in groups)) {\n    groups[name] = [];\n  }\n  return groups[name];\n}\n\n/**\n * @template T\n * @param {T} t token to add\n * @param {Collections<T>} groups\n * @param {Flags} flags\n */\nfunction addToGroups(t, flags, groups) {\n  if (flags[numeric]) {\n    flags[asciinumeric] = true;\n    flags[alphanumeric] = true;\n  }\n  if (flags[ascii]) {\n    flags[asciinumeric] = true;\n    flags[alpha] = true;\n  }\n  if (flags[asciinumeric]) {\n    flags[alphanumeric] = true;\n  }\n  if (flags[alpha]) {\n    flags[alphanumeric] = true;\n  }\n  if (flags[alphanumeric]) {\n    flags[domain] = true;\n  }\n  if (flags[emoji]) {\n    flags[domain] = true;\n  }\n  for (const k in flags) {\n    const group = registerGroup(k, groups);\n    if (group.indexOf(t) < 0) {\n      group.push(t);\n    }\n  }\n}\n\n/**\n * @template T\n * @param {T} t token to check\n * @param {Collections<T>} groups\n * @returns {Flags} group flags that contain this token\n */\nfunction flagsForToken(t, groups) {\n  const result = {};\n  for (const c in groups) {\n    if (groups[c].indexOf(t) >= 0) {\n      result[c] = true;\n    }\n  }\n  return result;\n}\n\n/**\n * @template T\n * @typedef {null | T } Transition\n */\n\n/**\n * Define a basic state machine state. j is the list of character transitions,\n * jr is the list of regex-match transitions, jd is the default state to\n * transition to t is the accepting token type, if any. If this is the terminal\n * state, then it does not emit a token.\n *\n * The template type T represents the type of the token this state accepts. This\n * should be a string (such as of the token exports in `text.js`) or a\n * MultiToken subclass (from `multi.js`)\n *\n * @template T\n * @param {T} [token] Token that this state emits\n */\nfunction State(token = null) {\n  // this.n = null; // DEBUG: State name\n  /** @type {{ [input: string]: State<T> }} j */\n  this.j = {}; // IMPLEMENTATION 1\n  // this.j = []; // IMPLEMENTATION 2\n  /** @type {[RegExp, State<T>][]} jr */\n  this.jr = [];\n  /** @type {?State<T>} jd */\n  this.jd = null;\n  /** @type {?T} t */\n  this.t = token;\n}\n\n/**\n * Scanner token groups\n * @type Collections<string>\n */\nState.groups = {};\nState.prototype = {\n  accepts() {\n    return !!this.t;\n  },\n  /**\n   * Follow an existing transition from the given input to the next state.\n   * Does not mutate.\n   * @param {string} input character or token type to transition on\n   * @returns {?State<T>} the next state, if any\n   */\n  go(input) {\n    const state = this;\n    const nextState = state.j[input];\n    if (nextState) {\n      return nextState;\n    }\n    for (let i = 0; i < state.jr.length; i++) {\n      const regex = state.jr[i][0];\n      const nextState = state.jr[i][1]; // note: might be empty to prevent default jump\n      if (nextState && regex.test(input)) {\n        return nextState;\n      }\n    }\n    // Nowhere left to jump! Return default, if any\n    return state.jd;\n  },\n  /**\n   * Whether the state has a transition for the given input. Set the second\n   * argument to true to only look for an exact match (and not a default or\n   * regular-expression-based transition)\n   * @param {string} input\n   * @param {boolean} exactOnly\n   */\n  has(input, exactOnly = false) {\n    return exactOnly ? input in this.j : !!this.go(input);\n  },\n  /**\n   * Short for \"transition all\"; create a transition from the array of items\n   * in the given list to the same final resulting state.\n   * @param {string | string[]} inputs Group of inputs to transition on\n   * @param {Transition<T> | State<T>} [next] Transition options\n   * @param {Flags} [flags] Collections flags to add token to\n   * @param {Collections<T>} [groups] Master list of token groups\n   */\n  ta(inputs, next, flags, groups) {\n    for (let i = 0; i < inputs.length; i++) {\n      this.tt(inputs[i], next, flags, groups);\n    }\n  },\n  /**\n   * Short for \"take regexp transition\"; defines a transition for this state\n   * when it encounters a token which matches the given regular expression\n   * @param {RegExp} regexp Regular expression transition (populate first)\n   * @param {T | State<T>} [next] Transition options\n   * @param {Flags} [flags] Collections flags to add token to\n   * @param {Collections<T>} [groups] Master list of token groups\n   * @returns {State<T>} taken after the given input\n   */\n  tr(regexp, next, flags, groups) {\n    groups = groups || State.groups;\n    let nextState;\n    if (next && next.j) {\n      nextState = next;\n    } else {\n      // Token with maybe token groups\n      nextState = new State(next);\n      if (flags && groups) {\n        addToGroups(next, flags, groups);\n      }\n    }\n    this.jr.push([regexp, nextState]);\n    return nextState;\n  },\n  /**\n   * Short for \"take transitions\", will take as many sequential transitions as\n   * the length of the given input and returns the\n   * resulting final state.\n   * @param {string | string[]} input\n   * @param {T | State<T>} [next] Transition options\n   * @param {Flags} [flags] Collections flags to add token to\n   * @param {Collections<T>} [groups] Master list of token groups\n   * @returns {State<T>} taken after the given input\n   */\n  ts(input, next, flags, groups) {\n    let state = this;\n    const len = input.length;\n    if (!len) {\n      return state;\n    }\n    for (let i = 0; i < len - 1; i++) {\n      state = state.tt(input[i]);\n    }\n    return state.tt(input[len - 1], next, flags, groups);\n  },\n  /**\n   * Short for \"take transition\", this is a method for building/working with\n   * state machines.\n   *\n   * If a state already exists for the given input, returns it.\n   *\n   * If a token is specified, that state will emit that token when reached by\n   * the linkify engine.\n   *\n   * If no state exists, it will be initialized with some default transitions\n   * that resemble existing default transitions.\n   *\n   * If a state is given for the second argument, that state will be\n   * transitioned to on the given input regardless of what that input\n   * previously did.\n   *\n   * Specify a token group flags to define groups that this token belongs to.\n   * The token will be added to corresponding entires in the given groups\n   * object.\n   *\n   * @param {string} input character, token type to transition on\n   * @param {T | State<T>} [next] Transition options\n   * @param {Flags} [flags] Collections flags to add token to\n   * @param {Collections<T>} [groups] Master list of groups\n   * @returns {State<T>} taken after the given input\n   */\n  tt(input, next, flags, groups) {\n    groups = groups || State.groups;\n    const state = this;\n\n    // Check if existing state given, just a basic transition\n    if (next && next.j) {\n      state.j[input] = next;\n      return next;\n    }\n    const t = next;\n\n    // Take the transition with the usual default mechanisms and use that as\n    // a template for creating the next state\n    let nextState,\n      templateState = state.go(input);\n    if (templateState) {\n      nextState = new State();\n      Object.assign(nextState.j, templateState.j);\n      nextState.jr.push.apply(nextState.jr, templateState.jr);\n      nextState.jd = templateState.jd;\n      nextState.t = templateState.t;\n    } else {\n      nextState = new State();\n    }\n    if (t) {\n      // Ensure newly token is in the same groups as the old token\n      if (groups) {\n        if (nextState.t && typeof nextState.t === 'string') {\n          const allFlags = Object.assign(flagsForToken(nextState.t, groups), flags);\n          addToGroups(t, allFlags, groups);\n        } else if (flags) {\n          addToGroups(t, flags, groups);\n        }\n      }\n      nextState.t = t; // overwrite anything that was previously there\n    }\n    state.j[input] = nextState;\n    return nextState;\n  }\n};\n\n// Helper functions to improve minification (not exported outside linkifyjs module)\n\n/**\n * @template T\n * @param {State<T>} state\n * @param {string | string[]} input\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */\nconst ta = (state, input, next, flags, groups) => state.ta(input, next, flags, groups);\n\n/**\n * @template T\n * @param {State<T>} state\n * @param {RegExp} regexp\n * @param {T | State<T>} [next]\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */\nconst tr = (state, regexp, next, flags, groups) => state.tr(regexp, next, flags, groups);\n\n/**\n * @template T\n * @param {State<T>} state\n * @param {string | string[]} input\n * @param {T | State<T>} [next]\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */\nconst ts = (state, input, next, flags, groups) => state.ts(input, next, flags, groups);\n\n/**\n * @template T\n * @param {State<T>} state\n * @param {string} input\n * @param {T | State<T>} [next]\n * @param {Collections<T>} [groups]\n * @param {Flags} [flags]\n */\nconst tt = (state, input, next, flags, groups) => state.tt(input, next, flags, groups);\n\n/******************************************************************************\nText Tokens\nIdentifiers for token outputs from the regexp scanner\n******************************************************************************/\n\n// A valid web domain token\nconst WORD = 'WORD'; // only contains a-z\nconst UWORD = 'UWORD'; // contains letters other than a-z, used for IDN\nconst ASCIINUMERICAL = 'ASCIINUMERICAL'; // contains a-z, 0-9\nconst ALPHANUMERICAL = 'ALPHANUMERICAL'; // contains numbers and letters other than a-z, used for IDN\n\n// Special case of word\nconst LOCALHOST = 'LOCALHOST';\n\n// Valid top-level domain, special case of WORD (see tlds.js)\nconst TLD = 'TLD';\n\n// Valid IDN TLD, special case of UWORD (see tlds.js)\nconst UTLD = 'UTLD';\n\n// The scheme portion of a web URI protocol. Supported types include: `mailto`,\n// `file`, and user-defined custom protocols. Limited to schemes that contain\n// only letters\nconst SCHEME = 'SCHEME';\n\n// Similar to SCHEME, except makes distinction for schemes that must always be\n// followed by `://`, not just `:`. Supported types include `http`, `https`,\n// `ftp`, `ftps`\nconst SLASH_SCHEME = 'SLASH_SCHEME';\n\n// Any sequence of digits 0-9\nconst NUM = 'NUM';\n\n// Any number of consecutive whitespace characters that are not newline\nconst WS = 'WS';\n\n// New line (unix style)\nconst NL = 'NL'; // \\n\n\n// Opening/closing bracket classes\n// TODO: Rename OPEN -> LEFT and CLOSE -> RIGHT in v5 to fit with Unicode names\n// Also rename angle brackes to LESSTHAN and GREATER THAN\nconst OPENBRACE = 'OPENBRACE'; // {\nconst CLOSEBRACE = 'CLOSEBRACE'; // }\nconst OPENBRACKET = 'OPENBRACKET'; // [\nconst CLOSEBRACKET = 'CLOSEBRACKET'; // ]\nconst OPENPAREN = 'OPENPAREN'; // (\nconst CLOSEPAREN = 'CLOSEPAREN'; // )\nconst OPENANGLEBRACKET = 'OPENANGLEBRACKET'; // <\nconst CLOSEANGLEBRACKET = 'CLOSEANGLEBRACKET'; // >\nconst FULLWIDTHLEFTPAREN = 'FULLWIDTHLEFTPAREN'; // （\nconst FULLWIDTHRIGHTPAREN = 'FULLWIDTHRIGHTPAREN'; // ）\nconst LEFTCORNERBRACKET = 'LEFTCORNERBRACKET'; // 「\nconst RIGHTCORNERBRACKET = 'RIGHTCORNERBRACKET'; // 」\nconst LEFTWHITECORNERBRACKET = 'LEFTWHITECORNERBRACKET'; // 『\nconst RIGHTWHITECORNERBRACKET = 'RIGHTWHITECORNERBRACKET'; // 』\nconst FULLWIDTHLESSTHAN = 'FULLWIDTHLESSTHAN'; // ＜\nconst FULLWIDTHGREATERTHAN = 'FULLWIDTHGREATERTHAN'; // ＞\n\n// Various symbols\nconst AMPERSAND = 'AMPERSAND'; // &\nconst APOSTROPHE = 'APOSTROPHE'; // '\nconst ASTERISK = 'ASTERISK'; // *\nconst AT = 'AT'; // @\nconst BACKSLASH = 'BACKSLASH'; // \\\nconst BACKTICK = 'BACKTICK'; // `\nconst CARET = 'CARET'; // ^\nconst COLON = 'COLON'; // :\nconst COMMA = 'COMMA'; // ,\nconst DOLLAR = 'DOLLAR'; // $\nconst DOT = 'DOT'; // .\nconst EQUALS = 'EQUALS'; // =\nconst EXCLAMATION = 'EXCLAMATION'; // !\nconst HYPHEN = 'HYPHEN'; // -\nconst PERCENT = 'PERCENT'; // %\nconst PIPE = 'PIPE'; // |\nconst PLUS = 'PLUS'; // +\nconst POUND = 'POUND'; // #\nconst QUERY = 'QUERY'; // ?\nconst QUOTE = 'QUOTE'; // \"\nconst FULLWIDTHMIDDLEDOT = 'FULLWIDTHMIDDLEDOT'; // ・\n\nconst SEMI = 'SEMI'; // ;\nconst SLASH = 'SLASH'; // /\nconst TILDE = 'TILDE'; // ~\nconst UNDERSCORE = 'UNDERSCORE'; // _\n\n// Emoji symbol\nconst EMOJI$1 = 'EMOJI';\n\n// Default token - anything that is not one of the above\nconst SYM = 'SYM';\n\nvar tk = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tALPHANUMERICAL: ALPHANUMERICAL,\n\tAMPERSAND: AMPERSAND,\n\tAPOSTROPHE: APOSTROPHE,\n\tASCIINUMERICAL: ASCIINUMERICAL,\n\tASTERISK: ASTERISK,\n\tAT: AT,\n\tBACKSLASH: BACKSLASH,\n\tBACKTICK: BACKTICK,\n\tCARET: CARET,\n\tCLOSEANGLEBRACKET: CLOSEANGLEBRACKET,\n\tCLOSEBRACE: CLOSEBRACE,\n\tCLOSEBRACKET: CLOSEBRACKET,\n\tCLOSEPAREN: CLOSEPAREN,\n\tCOLON: COLON,\n\tCOMMA: COMMA,\n\tDOLLAR: DOLLAR,\n\tDOT: DOT,\n\tEMOJI: EMOJI$1,\n\tEQUALS: EQUALS,\n\tEXCLAMATION: EXCLAMATION,\n\tFULLWIDTHGREATERTHAN: FULLWIDTHGREATERTHAN,\n\tFULLWIDTHLEFTPAREN: FULLWIDTHLEFTPAREN,\n\tFULLWIDTHLESSTHAN: FULLWIDTHLESSTHAN,\n\tFULLWIDTHMIDDLEDOT: FULLWIDTHMIDDLEDOT,\n\tFULLWIDTHRIGHTPAREN: FULLWIDTHRIGHTPAREN,\n\tHYPHEN: HYPHEN,\n\tLEFTCORNERBRACKET: LEFTCORNERBRACKET,\n\tLEFTWHITECORNERBRACKET: LEFTWHITECORNERBRACKET,\n\tLOCALHOST: LOCALHOST,\n\tNL: NL,\n\tNUM: NUM,\n\tOPENANGLEBRACKET: OPENANGLEBRACKET,\n\tOPENBRACE: OPENBRACE,\n\tOPENBRACKET: OPENBRACKET,\n\tOPENPAREN: OPENPAREN,\n\tPERCENT: PERCENT,\n\tPIPE: PIPE,\n\tPLUS: PLUS,\n\tPOUND: POUND,\n\tQUERY: QUERY,\n\tQUOTE: QUOTE,\n\tRIGHTCORNERBRACKET: RIGHTCORNERBRACKET,\n\tRIGHTWHITECORNERBRACKET: RIGHTWHITECORNERBRACKET,\n\tSCHEME: SCHEME,\n\tSEMI: SEMI,\n\tSLASH: SLASH,\n\tSLASH_SCHEME: SLASH_SCHEME,\n\tSYM: SYM,\n\tTILDE: TILDE,\n\tTLD: TLD,\n\tUNDERSCORE: UNDERSCORE,\n\tUTLD: UTLD,\n\tUWORD: UWORD,\n\tWORD: WORD,\n\tWS: WS\n});\n\n// Note that these two Unicode ones expand into a really big one with Babel\nconst ASCII_LETTER = /[a-z]/;\nconst LETTER = /\\p{L}/u; // Any Unicode character with letter data type\nconst EMOJI = /\\p{Emoji}/u; // Any Unicode emoji character\nconst EMOJI_VARIATION$1 = /\\ufe0f/;\nconst DIGIT = /\\d/;\nconst SPACE = /\\s/;\n\nvar regexp = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tASCII_LETTER: ASCII_LETTER,\n\tDIGIT: DIGIT,\n\tEMOJI: EMOJI,\n\tEMOJI_VARIATION: EMOJI_VARIATION$1,\n\tLETTER: LETTER,\n\tSPACE: SPACE\n});\n\n/**\n\tThe scanner provides an interface that takes a string of text as input, and\n\toutputs an array of tokens instances that can be used for easy URL parsing.\n*/\n\nconst CR = '\\r'; // carriage-return character\nconst LF = '\\n'; // line-feed character\nconst EMOJI_VARIATION = '\\ufe0f'; // Variation selector, follows heart and others\nconst EMOJI_JOINER = '\\u200d'; // zero-width joiner\nconst OBJECT_REPLACEMENT = '\\ufffc'; // whitespace placeholder that sometimes appears in rich text editors\n\nlet tlds = null,\n  utlds = null; // don't change so only have to be computed once\n\n/**\n * Scanner output token:\n * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD')\n * - `v` is the value of the token (e.g., '123', '❤️', 'com')\n * - `s` is the start index of the token in the original string\n * - `e` is the end index of the token in the original string\n * @typedef {{t: string, v: string, s: number, e: number}} Token\n */\n\n/**\n * @template T\n * @typedef {{ [collection: string]: T[] }} Collections\n */\n\n/**\n * Initialize the scanner character-based state machine for the given start\n * state\n * @param {[string, boolean][]} customSchemes List of custom schemes, where each\n * item is a length-2 tuple with the first element set to the string scheme, and\n * the second element set to `true` if the `://` after the scheme is optional\n */\nfunction init$2(customSchemes = []) {\n  // Frequently used states (name argument removed during minification)\n  /** @type Collections<string> */\n  const groups = {}; // of tokens\n  State.groups = groups;\n  /** @type State<string> */\n  const Start = new State();\n  if (tlds == null) {\n    tlds = decodeTlds(encodedTlds);\n  }\n  if (utlds == null) {\n    utlds = decodeTlds(encodedUtlds);\n  }\n\n  // States for special URL symbols that accept immediately after start\n  tt(Start, \"'\", APOSTROPHE);\n  tt(Start, '{', OPENBRACE);\n  tt(Start, '}', CLOSEBRACE);\n  tt(Start, '[', OPENBRACKET);\n  tt(Start, ']', CLOSEBRACKET);\n  tt(Start, '(', OPENPAREN);\n  tt(Start, ')', CLOSEPAREN);\n  tt(Start, '<', OPENANGLEBRACKET);\n  tt(Start, '>', CLOSEANGLEBRACKET);\n  tt(Start, '（', FULLWIDTHLEFTPAREN);\n  tt(Start, '）', FULLWIDTHRIGHTPAREN);\n  tt(Start, '「', LEFTCORNERBRACKET);\n  tt(Start, '」', RIGHTCORNERBRACKET);\n  tt(Start, '『', LEFTWHITECORNERBRACKET);\n  tt(Start, '』', RIGHTWHITECORNERBRACKET);\n  tt(Start, '＜', FULLWIDTHLESSTHAN);\n  tt(Start, '＞', FULLWIDTHGREATERTHAN);\n  tt(Start, '&', AMPERSAND);\n  tt(Start, '*', ASTERISK);\n  tt(Start, '@', AT);\n  tt(Start, '`', BACKTICK);\n  tt(Start, '^', CARET);\n  tt(Start, ':', COLON);\n  tt(Start, ',', COMMA);\n  tt(Start, '$', DOLLAR);\n  tt(Start, '.', DOT);\n  tt(Start, '=', EQUALS);\n  tt(Start, '!', EXCLAMATION);\n  tt(Start, '-', HYPHEN);\n  tt(Start, '%', PERCENT);\n  tt(Start, '|', PIPE);\n  tt(Start, '+', PLUS);\n  tt(Start, '#', POUND);\n  tt(Start, '?', QUERY);\n  tt(Start, '\"', QUOTE);\n  tt(Start, '/', SLASH);\n  tt(Start, ';', SEMI);\n  tt(Start, '~', TILDE);\n  tt(Start, '_', UNDERSCORE);\n  tt(Start, '\\\\', BACKSLASH);\n  tt(Start, '・', FULLWIDTHMIDDLEDOT);\n  const Num = tr(Start, DIGIT, NUM, {\n    [numeric]: true\n  });\n  tr(Num, DIGIT, Num);\n  const Asciinumeric = tr(Num, ASCII_LETTER, ASCIINUMERICAL, {\n    [asciinumeric]: true\n  });\n  const Alphanumeric = tr(Num, LETTER, ALPHANUMERICAL, {\n    [alphanumeric]: true\n  });\n\n  // State which emits a word token\n  const Word = tr(Start, ASCII_LETTER, WORD, {\n    [ascii]: true\n  });\n  tr(Word, DIGIT, Asciinumeric);\n  tr(Word, ASCII_LETTER, Word);\n  tr(Asciinumeric, DIGIT, Asciinumeric);\n  tr(Asciinumeric, ASCII_LETTER, Asciinumeric);\n\n  // Same as previous, but specific to non-fsm.ascii alphabet words\n  const UWord = tr(Start, LETTER, UWORD, {\n    [alpha]: true\n  });\n  tr(UWord, ASCII_LETTER); // Non-accepting\n  tr(UWord, DIGIT, Alphanumeric);\n  tr(UWord, LETTER, UWord);\n  tr(Alphanumeric, DIGIT, Alphanumeric);\n  tr(Alphanumeric, ASCII_LETTER); // Non-accepting\n  tr(Alphanumeric, LETTER, Alphanumeric); // Non-accepting\n\n  // Whitespace jumps\n  // Tokens of only non-newline whitespace are arbitrarily long\n  // If any whitespace except newline, more whitespace!\n  const Nl = tt(Start, LF, NL, {\n    [whitespace]: true\n  });\n  const Cr = tt(Start, CR, WS, {\n    [whitespace]: true\n  });\n  const Ws = tr(Start, SPACE, WS, {\n    [whitespace]: true\n  });\n  tt(Start, OBJECT_REPLACEMENT, Ws);\n  tt(Cr, LF, Nl); // \\r\\n\n  tt(Cr, OBJECT_REPLACEMENT, Ws);\n  tr(Cr, SPACE, Ws);\n  tt(Ws, CR); // non-accepting state to avoid mixing whitespaces\n  tt(Ws, LF); // non-accepting state to avoid mixing whitespaces\n  tr(Ws, SPACE, Ws);\n  tt(Ws, OBJECT_REPLACEMENT, Ws);\n\n  // Emoji tokens. They are not grouped by the scanner except in cases where a\n  // zero-width joiner is present\n  const Emoji = tr(Start, EMOJI, EMOJI$1, {\n    [emoji]: true\n  });\n  tt(Emoji, '#'); // no transition, emoji regex seems to match #\n  tr(Emoji, EMOJI, Emoji);\n  tt(Emoji, EMOJI_VARIATION, Emoji);\n  // tt(Start, EMOJI_VARIATION, Emoji); // This one is sketchy\n\n  const EmojiJoiner = tt(Emoji, EMOJI_JOINER);\n  tt(EmojiJoiner, '#');\n  tr(EmojiJoiner, EMOJI, Emoji);\n  // tt(EmojiJoiner, EMOJI_VARIATION, Emoji); // also sketchy\n\n  // Generates states for top-level domains\n  // Note that this is most accurate when tlds are in alphabetical order\n  const wordjr = [[ASCII_LETTER, Word], [DIGIT, Asciinumeric]];\n  const uwordjr = [[ASCII_LETTER, null], [LETTER, UWord], [DIGIT, Alphanumeric]];\n  for (let i = 0; i < tlds.length; i++) {\n    fastts(Start, tlds[i], TLD, WORD, wordjr);\n  }\n  for (let i = 0; i < utlds.length; i++) {\n    fastts(Start, utlds[i], UTLD, UWORD, uwordjr);\n  }\n  addToGroups(TLD, {\n    tld: true,\n    ascii: true\n  }, groups);\n  addToGroups(UTLD, {\n    utld: true,\n    alpha: true\n  }, groups);\n\n  // Collect the states generated by different protocols. NOTE: If any new TLDs\n  // get added that are also protocols, set the token to be the same as the\n  // protocol to ensure parsing works as expected.\n  fastts(Start, 'file', SCHEME, WORD, wordjr);\n  fastts(Start, 'mailto', SCHEME, WORD, wordjr);\n  fastts(Start, 'http', SLASH_SCHEME, WORD, wordjr);\n  fastts(Start, 'https', SLASH_SCHEME, WORD, wordjr);\n  fastts(Start, 'ftp', SLASH_SCHEME, WORD, wordjr);\n  fastts(Start, 'ftps', SLASH_SCHEME, WORD, wordjr);\n  addToGroups(SCHEME, {\n    scheme: true,\n    ascii: true\n  }, groups);\n  addToGroups(SLASH_SCHEME, {\n    slashscheme: true,\n    ascii: true\n  }, groups);\n\n  // Register custom schemes. Assumes each scheme is asciinumeric with hyphens\n  customSchemes = customSchemes.sort((a, b) => a[0] > b[0] ? 1 : -1);\n  for (let i = 0; i < customSchemes.length; i++) {\n    const sch = customSchemes[i][0];\n    const optionalSlashSlash = customSchemes[i][1];\n    const flags = optionalSlashSlash ? {\n      [scheme]: true\n    } : {\n      [slashscheme]: true\n    };\n    if (sch.indexOf('-') >= 0) {\n      flags[domain] = true;\n    } else if (!ASCII_LETTER.test(sch)) {\n      flags[numeric] = true; // numbers only\n    } else if (DIGIT.test(sch)) {\n      flags[asciinumeric] = true;\n    } else {\n      flags[ascii] = true;\n    }\n    ts(Start, sch, sch, flags);\n  }\n\n  // Localhost token\n  ts(Start, 'localhost', LOCALHOST, {\n    ascii: true\n  });\n\n  // Set default transition for start state (some symbol)\n  Start.jd = new State(SYM);\n  return {\n    start: Start,\n    tokens: Object.assign({\n      groups\n    }, tk)\n  };\n}\n\n/**\n\tGiven a string, returns an array of TOKEN instances representing the\n\tcomposition of that string.\n\n\t@method run\n\t@param {State<string>} start scanner starting state\n\t@param {string} str input string to scan\n\t@return {Token[]} list of tokens, each with a type and value\n*/\nfunction run$1(start, str) {\n  // State machine is not case sensitive, so input is tokenized in lowercased\n  // form (still returns regular case). Uses selective `toLowerCase` because\n  // lowercasing the entire string causes the length and character position to\n  // vary in some non-English strings with V8-based runtimes.\n  const iterable = stringToArray(str.replace(/[A-Z]/g, c => c.toLowerCase()));\n  const charCount = iterable.length; // <= len if there are emojis, etc\n  const tokens = []; // return value\n\n  // cursor through the string itself, accounting for characters that have\n  // width with length 2 such as emojis\n  let cursor = 0;\n\n  // Cursor through the array-representation of the string\n  let charCursor = 0;\n\n  // Tokenize the string\n  while (charCursor < charCount) {\n    let state = start;\n    let nextState = null;\n    let tokenLength = 0;\n    let latestAccepting = null;\n    let sinceAccepts = -1;\n    let charsSinceAccepts = -1;\n    while (charCursor < charCount && (nextState = state.go(iterable[charCursor]))) {\n      state = nextState;\n\n      // Keep track of the latest accepting state\n      if (state.accepts()) {\n        sinceAccepts = 0;\n        charsSinceAccepts = 0;\n        latestAccepting = state;\n      } else if (sinceAccepts >= 0) {\n        sinceAccepts += iterable[charCursor].length;\n        charsSinceAccepts++;\n      }\n      tokenLength += iterable[charCursor].length;\n      cursor += iterable[charCursor].length;\n      charCursor++;\n    }\n\n    // Roll back to the latest accepting state\n    cursor -= sinceAccepts;\n    charCursor -= charsSinceAccepts;\n    tokenLength -= sinceAccepts;\n\n    // No more jumps, just make a new token from the last accepting one\n    tokens.push({\n      t: latestAccepting.t,\n      // token type/name\n      v: str.slice(cursor - tokenLength, cursor),\n      // string value\n      s: cursor - tokenLength,\n      // start index\n      e: cursor // end index (excluding)\n    });\n  }\n  return tokens;\n}\n\n/**\n * Convert a String to an Array of characters, taking into account that some\n * characters like emojis take up two string indexes.\n *\n * Adapted from core-js (MIT license)\n * https://github.com/zloirock/core-js/blob/2d69cf5f99ab3ea3463c395df81e5a15b68f49d9/packages/core-js/internals/string-multibyte.js\n *\n * @function stringToArray\n * @param {string} str\n * @returns {string[]}\n */\nfunction stringToArray(str) {\n  const result = [];\n  const len = str.length;\n  let index = 0;\n  while (index < len) {\n    let first = str.charCodeAt(index);\n    let second;\n    let char = first < 0xd800 || first > 0xdbff || index + 1 === len || (second = str.charCodeAt(index + 1)) < 0xdc00 || second > 0xdfff ? str[index] // single character\n    : str.slice(index, index + 2); // two-index characters\n    result.push(char);\n    index += char.length;\n  }\n  return result;\n}\n\n/**\n * Fast version of ts function for when transition defaults are well known\n * @param {State<string>} state\n * @param {string} input\n * @param {string} t\n * @param {string} defaultt\n * @param {[RegExp, State<string>][]} jr\n * @returns {State<string>}\n */\nfunction fastts(state, input, t, defaultt, jr) {\n  let next;\n  const len = input.length;\n  for (let i = 0; i < len - 1; i++) {\n    const char = input[i];\n    if (state.j[char]) {\n      next = state.j[char];\n    } else {\n      next = new State(defaultt);\n      next.jr = jr.slice();\n      state.j[char] = next;\n    }\n    state = next;\n  }\n  next = new State(t);\n  next.jr = jr.slice();\n  state.j[input[len - 1]] = next;\n  return next;\n}\n\n/**\n * Converts a string of Top-Level Domain names encoded in update-tlds.js back\n * into a list of strings.\n * @param {str} encoded encoded TLDs string\n * @returns {str[]} original TLDs list\n */\nfunction decodeTlds(encoded) {\n  const words = [];\n  const stack = [];\n  let i = 0;\n  let digits = '0123456789';\n  while (i < encoded.length) {\n    let popDigitCount = 0;\n    while (digits.indexOf(encoded[i + popDigitCount]) >= 0) {\n      popDigitCount++; // encountered some digits, have to pop to go one level up trie\n    }\n    if (popDigitCount > 0) {\n      words.push(stack.join('')); // whatever preceded the pop digits must be a word\n      for (let popCount = parseInt(encoded.substring(i, i + popDigitCount), 10); popCount > 0; popCount--) {\n        stack.pop();\n      }\n      i += popDigitCount;\n    } else {\n      stack.push(encoded[i]); // drop down a level into the trie\n      i++;\n    }\n  }\n  return words;\n}\n\n/**\n * An object where each key is a valid DOM Event Name such as `click` or `focus`\n * and each value is an event handler function.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/Element#events\n * @typedef {?{ [event: string]: Function }} EventListeners\n */\n\n/**\n * All formatted properties required to render a link, including `tagName`,\n * `attributes`, `content` and `eventListeners`.\n * @typedef {{ tagName: any, attributes: {[attr: string]: any}, content: string,\n * eventListeners: EventListeners }} IntermediateRepresentation\n */\n\n/**\n * Specify either an object described by the template type `O` or a function.\n *\n * The function takes a string value (usually the link's href attribute), the\n * link type (`'url'`, `'hashtag`', etc.) and an internal token representation\n * of the link. It should return an object of the template type `O`\n * @template O\n * @typedef {O | ((value: string, type: string, token: MultiToken) => O)} OptObj\n */\n\n/**\n * Specify either a function described by template type `F` or an object.\n *\n * Each key in the object should be a link type (`'url'`, `'hashtag`', etc.). Each\n * value should be a function with template type `F` that is called when the\n * corresponding link type is encountered.\n * @template F\n * @typedef {F | { [type: string]: F}} OptFn\n */\n\n/**\n * Specify either a value with template type `V`, a function that returns `V` or\n * an object where each value resolves to `V`.\n *\n * The function takes a string value (usually the link's href attribute), the\n * link type (`'url'`, `'hashtag`', etc.) and an internal token representation\n * of the link. It should return an object of the template type `V`\n *\n * For the object, each key should be a link type (`'url'`, `'hashtag`', etc.).\n * Each value should either have type `V` or a function that returns V. This\n * function similarly takes a string value and a token.\n *\n * Example valid types for `Opt<string>`:\n *\n * ```js\n * 'hello'\n * (value, type, token) => 'world'\n * { url: 'hello', email: (value, token) => 'world'}\n * ```\n * @template V\n * @typedef {V | ((value: string, type: string, token: MultiToken) => V) | { [type: string]: V | ((value: string, token: MultiToken) => V) }} Opt\n */\n\n/**\n * See available options: https://linkify.js.org/docs/options.html\n * @typedef {{\n * \tdefaultProtocol?: string,\n *  events?: OptObj<EventListeners>,\n * \tformat?: Opt<string>,\n * \tformatHref?: Opt<string>,\n * \tnl2br?: boolean,\n * \ttagName?: Opt<any>,\n * \ttarget?: Opt<string>,\n * \trel?: Opt<string>,\n * \tvalidate?: Opt<boolean>,\n * \ttruncate?: Opt<number>,\n * \tclassName?: Opt<string>,\n * \tattributes?: OptObj<({ [attr: string]: any })>,\n *  ignoreTags?: string[],\n * \trender?: OptFn<((ir: IntermediateRepresentation) => any)>\n * }} Opts\n */\n\n/**\n * @type Required<Opts>\n */\nconst defaults = {\n  defaultProtocol: 'http',\n  events: null,\n  format: noop,\n  formatHref: noop,\n  nl2br: false,\n  tagName: 'a',\n  target: null,\n  rel: null,\n  validate: true,\n  truncate: Infinity,\n  className: null,\n  attributes: null,\n  ignoreTags: [],\n  render: null\n};\n\n/**\n * Utility class for linkify interfaces to apply specified\n * {@link Opts formatting and rendering options}.\n *\n * @param {Opts | Options} [opts] Option value overrides.\n * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For\n *   internal use) default render function that determines how to generate an\n *   HTML element based on a link token's derived tagName, attributes and HTML.\n *   Similar to render option\n */\nfunction Options(opts, defaultRender = null) {\n  let o = Object.assign({}, defaults);\n  if (opts) {\n    o = Object.assign(o, opts instanceof Options ? opts.o : opts);\n  }\n\n  // Ensure all ignored tags are uppercase\n  const ignoredTags = o.ignoreTags;\n  const uppercaseIgnoredTags = [];\n  for (let i = 0; i < ignoredTags.length; i++) {\n    uppercaseIgnoredTags.push(ignoredTags[i].toUpperCase());\n  }\n  /** @protected */\n  this.o = o;\n  if (defaultRender) {\n    this.defaultRender = defaultRender;\n  }\n  this.ignoreTags = uppercaseIgnoredTags;\n}\nOptions.prototype = {\n  o: defaults,\n  /**\n   * @type string[]\n   */\n  ignoreTags: [],\n  /**\n   * @param {IntermediateRepresentation} ir\n   * @returns {any}\n   */\n  defaultRender(ir) {\n    return ir;\n  },\n  /**\n   * Returns true or false based on whether a token should be displayed as a\n   * link based on the user options.\n   * @param {MultiToken} token\n   * @returns {boolean}\n   */\n  check(token) {\n    return this.get('validate', token.toString(), token);\n  },\n  // Private methods\n\n  /**\n   * Resolve an option's value based on the value of the option and the given\n   * params. If operator and token are specified and the target option is\n   * callable, automatically calls the function with the given argument.\n   * @template {keyof Opts} K\n   * @param {K} key Name of option to use\n   * @param {string} [operator] will be passed to the target option if it's a\n   * function. If not specified, RAW function value gets returned\n   * @param {MultiToken} [token] The token from linkify.tokenize\n   * @returns {Opts[K] | any}\n   */\n  get(key, operator, token) {\n    const isCallable = operator != null;\n    let option = this.o[key];\n    if (!option) {\n      return option;\n    }\n    if (typeof option === 'object') {\n      option = token.t in option ? option[token.t] : defaults[key];\n      if (typeof option === 'function' && isCallable) {\n        option = option(operator, token);\n      }\n    } else if (typeof option === 'function' && isCallable) {\n      option = option(operator, token.t, token);\n    }\n    return option;\n  },\n  /**\n   * @template {keyof Opts} L\n   * @param {L} key Name of options object to use\n   * @param {string} [operator]\n   * @param {MultiToken} [token]\n   * @returns {Opts[L] | any}\n   */\n  getObj(key, operator, token) {\n    let obj = this.o[key];\n    if (typeof obj === 'function' && operator != null) {\n      obj = obj(operator, token.t, token);\n    }\n    return obj;\n  },\n  /**\n   * Convert the given token to a rendered element that may be added to the\n   * calling-interface's DOM\n   * @param {MultiToken} token Token to render to an HTML element\n   * @returns {any} Render result; e.g., HTML string, DOM element, React\n   *   Component, etc.\n   */\n  render(token) {\n    const ir = token.render(this); // intermediate representation\n    const renderFn = this.get('render', null, token) || this.defaultRender;\n    return renderFn(ir, token.t, token);\n  }\n};\nfunction noop(val) {\n  return val;\n}\n\nvar options = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tOptions: Options,\n\tdefaults: defaults\n});\n\n/******************************************************************************\n\tMulti-Tokens\n\tTokens composed of arrays of TextTokens\n******************************************************************************/\n\n/**\n * @param {string} value\n * @param {Token[]} tokens\n */\nfunction MultiToken(value, tokens) {\n  this.t = 'token';\n  this.v = value;\n  this.tk = tokens;\n}\n\n/**\n * Abstract class used for manufacturing tokens of text tokens. That is rather\n * than the value for a token being a small string of text, it's value an array\n * of text tokens.\n *\n * Used for grouping together URLs, emails, hashtags, and other potential\n * creations.\n * @class MultiToken\n * @property {string} t\n * @property {string} v\n * @property {Token[]} tk\n * @abstract\n */\nMultiToken.prototype = {\n  isLink: false,\n  /**\n   * Return the string this token represents.\n   * @return {string}\n   */\n  toString() {\n    return this.v;\n  },\n  /**\n   * What should the value for this token be in the `href` HTML attribute?\n   * Returns the `.toString` value by default.\n   * @param {string} [scheme]\n   * @return {string}\n   */\n  toHref(scheme) {\n    return this.toString();\n  },\n  /**\n   * @param {Options} options Formatting options\n   * @returns {string}\n   */\n  toFormattedString(options) {\n    const val = this.toString();\n    const truncate = options.get('truncate', val, this);\n    const formatted = options.get('format', val, this);\n    return truncate && formatted.length > truncate ? formatted.substring(0, truncate) + '…' : formatted;\n  },\n  /**\n   *\n   * @param {Options} options\n   * @returns {string}\n   */\n  toFormattedHref(options) {\n    return options.get('formatHref', this.toHref(options.get('defaultProtocol')), this);\n  },\n  /**\n   * The start index of this token in the original input string\n   * @returns {number}\n   */\n  startIndex() {\n    return this.tk[0].s;\n  },\n  /**\n   * The end index of this token in the original input string (up to this\n   * index but not including it)\n   * @returns {number}\n   */\n  endIndex() {\n    return this.tk[this.tk.length - 1].e;\n  },\n  /**\n  \tReturns an object  of relevant values for this token, which includes keys\n  \t* type - Kind of token ('url', 'email', etc.)\n  \t* value - Original text\n  \t* href - The value that should be added to the anchor tag's href\n  \t\tattribute\n  \t\t@method toObject\n  \t@param {string} [protocol] `'http'` by default\n  */\n  toObject(protocol = defaults.defaultProtocol) {\n    return {\n      type: this.t,\n      value: this.toString(),\n      isLink: this.isLink,\n      href: this.toHref(protocol),\n      start: this.startIndex(),\n      end: this.endIndex()\n    };\n  },\n  /**\n   *\n   * @param {Options} options Formatting option\n   */\n  toFormattedObject(options) {\n    return {\n      type: this.t,\n      value: this.toFormattedString(options),\n      isLink: this.isLink,\n      href: this.toFormattedHref(options),\n      start: this.startIndex(),\n      end: this.endIndex()\n    };\n  },\n  /**\n   * Whether this token should be rendered as a link according to the given options\n   * @param {Options} options\n   * @returns {boolean}\n   */\n  validate(options) {\n    return options.get('validate', this.toString(), this);\n  },\n  /**\n   * Return an object that represents how this link should be rendered.\n   * @param {Options} options Formattinng options\n   */\n  render(options) {\n    const token = this;\n    const href = this.toHref(options.get('defaultProtocol'));\n    const formattedHref = options.get('formatHref', href, this);\n    const tagName = options.get('tagName', href, token);\n    const content = this.toFormattedString(options);\n    const attributes = {};\n    const className = options.get('className', href, token);\n    const target = options.get('target', href, token);\n    const rel = options.get('rel', href, token);\n    const attrs = options.getObj('attributes', href, token);\n    const eventListeners = options.getObj('events', href, token);\n    attributes.href = formattedHref;\n    if (className) {\n      attributes.class = className;\n    }\n    if (target) {\n      attributes.target = target;\n    }\n    if (rel) {\n      attributes.rel = rel;\n    }\n    if (attrs) {\n      Object.assign(attributes, attrs);\n    }\n    return {\n      tagName,\n      attributes,\n      content,\n      eventListeners\n    };\n  }\n};\n\n/**\n * Create a new token that can be emitted by the parser state machine\n * @param {string} type readable type of the token\n * @param {object} props properties to assign or override, including isLink = true or false\n * @returns {new (value: string, tokens: Token[]) => MultiToken} new token class\n */\nfunction createTokenClass(type, props) {\n  class Token extends MultiToken {\n    constructor(value, tokens) {\n      super(value, tokens);\n      this.t = type;\n    }\n  }\n  for (const p in props) {\n    Token.prototype[p] = props[p];\n  }\n  Token.t = type;\n  return Token;\n}\n\n/**\n\tRepresents a list of tokens making up a valid email address\n*/\nconst Email = createTokenClass('email', {\n  isLink: true,\n  toHref() {\n    return 'mailto:' + this.toString();\n  }\n});\n\n/**\n\tRepresents some plain text\n*/\nconst Text = createTokenClass('text');\n\n/**\n\tMulti-linebreak token - represents a line break\n\t@class Nl\n*/\nconst Nl = createTokenClass('nl');\n\n/**\n\tRepresents a list of text tokens making up a valid URL\n\t@class Url\n*/\nconst Url = createTokenClass('url', {\n  isLink: true,\n  /**\n  \tLowercases relevant parts of the domain and adds the protocol if\n  \trequired. Note that this will not escape unsafe HTML characters in the\n  \tURL.\n  \t\t@param {string} [scheme] default scheme (e.g., 'https')\n  \t@return {string} the full href\n  */\n  toHref(scheme = defaults.defaultProtocol) {\n    // Check if already has a prefix scheme\n    return this.hasProtocol() ? this.v : `${scheme}://${this.v}`;\n  },\n  /**\n   * Check whether this URL token has a protocol\n   * @return {boolean}\n   */\n  hasProtocol() {\n    const tokens = this.tk;\n    return tokens.length >= 2 && tokens[0].t !== LOCALHOST && tokens[1].t === COLON;\n  }\n});\n\nvar multi = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tBase: MultiToken,\n\tEmail: Email,\n\tMultiToken: MultiToken,\n\tNl: Nl,\n\tText: Text,\n\tUrl: Url,\n\tcreateTokenClass: createTokenClass\n});\n\n/**\n\tNot exactly parser, more like the second-stage scanner (although we can\n\ttheoretically hotswap the code here with a real parser in the future... but\n\tfor a little URL-finding utility abstract syntax trees may be a little\n\toverkill).\n\n\tURL format: http://en.wikipedia.org/wiki/URI_scheme\n\tEmail format: http://en.wikipedia.org/wiki/EmailAddress (links to RFC in\n\treference)\n\n\t@module linkify\n\t@submodule parser\n\t@main run\n*/\n\nconst makeState = arg => new State(arg);\n\n/**\n * Generate the parser multi token-based state machine\n * @param {{ groups: Collections<string> }} tokens\n */\nfunction init$1({\n  groups\n}) {\n  // Types of characters the URL can definitely end in\n  const qsAccepting = groups.domain.concat([AMPERSAND, ASTERISK, AT, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, NUM, PERCENT, PIPE, PLUS, POUND, SLASH, SYM, TILDE, UNDERSCORE]);\n\n  // Types of tokens that can follow a URL and be part of the query string\n  // but cannot be the very last characters\n  // Characters that cannot appear in the URL at all should be excluded\n  const qsNonAccepting = [APOSTROPHE, COLON, COMMA, DOT, EXCLAMATION, PERCENT, QUERY, QUOTE, SEMI, OPENANGLEBRACKET, CLOSEANGLEBRACKET, OPENBRACE, CLOSEBRACE, CLOSEBRACKET, OPENBRACKET, OPENPAREN, CLOSEPAREN, FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN, LEFTCORNERBRACKET, RIGHTCORNERBRACKET, LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET, FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN];\n\n  // For addresses without the mailto prefix\n  // Tokens allowed in the localpart of the email\n  const localpartAccepting = [AMPERSAND, APOSTROPHE, ASTERISK, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, OPENBRACE, CLOSEBRACE, PERCENT, PIPE, PLUS, POUND, QUERY, SLASH, SYM, TILDE, UNDERSCORE];\n\n  // The universal starting state.\n  /**\n   * @type State<Token>\n   */\n  const Start = makeState();\n  const Localpart = tt(Start, TILDE); // Local part of the email address\n  ta(Localpart, localpartAccepting, Localpart);\n  ta(Localpart, groups.domain, Localpart);\n  const Domain = makeState(),\n    Scheme = makeState(),\n    SlashScheme = makeState();\n  ta(Start, groups.domain, Domain); // parsed string ends with a potential domain name (A)\n  ta(Start, groups.scheme, Scheme); // e.g., 'mailto'\n  ta(Start, groups.slashscheme, SlashScheme); // e.g., 'http'\n\n  ta(Domain, localpartAccepting, Localpart);\n  ta(Domain, groups.domain, Domain);\n  const LocalpartAt = tt(Domain, AT); // Local part of the email address plus @\n\n  tt(Localpart, AT, LocalpartAt); // close to an email address now\n\n  // Local part of an email address can be e.g. 'http' or 'mailto'\n  tt(Scheme, AT, LocalpartAt);\n  tt(SlashScheme, AT, LocalpartAt);\n  const LocalpartDot = tt(Localpart, DOT); // Local part of the email address plus '.' (localpart cannot end in .)\n  ta(LocalpartDot, localpartAccepting, Localpart);\n  ta(LocalpartDot, groups.domain, Localpart);\n  const EmailDomain = makeState();\n  ta(LocalpartAt, groups.domain, EmailDomain); // parsed string starts with local email info + @ with a potential domain name\n  ta(EmailDomain, groups.domain, EmailDomain);\n  const EmailDomainDot = tt(EmailDomain, DOT); // domain followed by DOT\n  ta(EmailDomainDot, groups.domain, EmailDomain);\n  const Email$1 = makeState(Email); // Possible email address (could have more tlds)\n  ta(EmailDomainDot, groups.tld, Email$1);\n  ta(EmailDomainDot, groups.utld, Email$1);\n  tt(LocalpartAt, LOCALHOST, Email$1);\n\n  // Hyphen can jump back to a domain name\n  const EmailDomainHyphen = tt(EmailDomain, HYPHEN); // parsed string starts with local email info + @ with a potential domain name\n  tt(EmailDomainHyphen, HYPHEN, EmailDomainHyphen);\n  ta(EmailDomainHyphen, groups.domain, EmailDomain);\n  ta(Email$1, groups.domain, EmailDomain);\n  tt(Email$1, DOT, EmailDomainDot);\n  tt(Email$1, HYPHEN, EmailDomainHyphen);\n\n  // Final possible email states\n  const EmailColon = tt(Email$1, COLON); // URL followed by colon (potential port number here)\n  /*const EmailColonPort = */\n  ta(EmailColon, groups.numeric, Email); // URL followed by colon and port number\n\n  // Account for dots and hyphens. Hyphens are usually parts of domain names\n  // (but not TLDs)\n  const DomainHyphen = tt(Domain, HYPHEN); // domain followed by hyphen\n  const DomainDot = tt(Domain, DOT); // domain followed by DOT\n  tt(DomainHyphen, HYPHEN, DomainHyphen);\n  ta(DomainHyphen, groups.domain, Domain);\n  ta(DomainDot, localpartAccepting, Localpart);\n  ta(DomainDot, groups.domain, Domain);\n  const DomainDotTld = makeState(Url); // Simplest possible URL with no query string\n  ta(DomainDot, groups.tld, DomainDotTld);\n  ta(DomainDot, groups.utld, DomainDotTld);\n  ta(DomainDotTld, groups.domain, Domain);\n  ta(DomainDotTld, localpartAccepting, Localpart);\n  tt(DomainDotTld, DOT, DomainDot);\n  tt(DomainDotTld, HYPHEN, DomainHyphen);\n  tt(DomainDotTld, AT, LocalpartAt);\n  const DomainDotTldColon = tt(DomainDotTld, COLON); // URL followed by colon (potential port number here)\n  const DomainDotTldColonPort = makeState(Url); // TLD followed by a port number\n  ta(DomainDotTldColon, groups.numeric, DomainDotTldColonPort);\n\n  // Long URL with optional port and maybe query string\n  const Url$1 = makeState(Url);\n\n  // URL with extra symbols at the end, followed by an opening bracket\n  const UrlNonaccept = makeState(); // URL followed by some symbols (will not be part of the final URL)\n\n  // Query strings\n  ta(Url$1, qsAccepting, Url$1);\n  ta(Url$1, qsNonAccepting, UrlNonaccept);\n  ta(UrlNonaccept, qsAccepting, Url$1);\n  ta(UrlNonaccept, qsNonAccepting, UrlNonaccept);\n\n  // Become real URLs after `SLASH` or `COLON NUM SLASH`\n  // Here works with or without scheme:// prefix\n  tt(DomainDotTld, SLASH, Url$1);\n  tt(DomainDotTldColonPort, SLASH, Url$1);\n\n  // Note that domains that begin with schemes are treated slighly differently\n  const SchemeColon = tt(Scheme, COLON); // e.g., 'mailto:'\n  const SlashSchemeColon = tt(SlashScheme, COLON); // e.g., 'http:'\n  const SlashSchemeColonSlash = tt(SlashSchemeColon, SLASH); // e.g., 'http:/'\n\n  const UriPrefix = tt(SlashSchemeColonSlash, SLASH); // e.g., 'http://'\n\n  // Scheme states can transition to domain states\n  ta(Scheme, groups.domain, Domain);\n  tt(Scheme, DOT, DomainDot);\n  tt(Scheme, HYPHEN, DomainHyphen);\n  ta(SlashScheme, groups.domain, Domain);\n  tt(SlashScheme, DOT, DomainDot);\n  tt(SlashScheme, HYPHEN, DomainHyphen);\n\n  // Force URL with scheme prefix followed by anything sane\n  ta(SchemeColon, groups.domain, Url$1);\n  tt(SchemeColon, SLASH, Url$1);\n  tt(SchemeColon, QUERY, Url$1);\n  ta(UriPrefix, groups.domain, Url$1);\n  ta(UriPrefix, qsAccepting, Url$1);\n  tt(UriPrefix, SLASH, Url$1);\n  const bracketPairs = [[OPENBRACE, CLOSEBRACE],\n  // {}\n  [OPENBRACKET, CLOSEBRACKET],\n  // []\n  [OPENPAREN, CLOSEPAREN],\n  // ()\n  [OPENANGLEBRACKET, CLOSEANGLEBRACKET],\n  // <>\n  [FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN],\n  // （）\n  [LEFTCORNERBRACKET, RIGHTCORNERBRACKET],\n  // 「」\n  [LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET],\n  // 『』\n  [FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN] // ＜＞\n  ];\n  for (let i = 0; i < bracketPairs.length; i++) {\n    const [OPEN, CLOSE] = bracketPairs[i];\n    const UrlOpen = tt(Url$1, OPEN); // URL followed by open bracket\n\n    // Continue not accepting for open brackets\n    tt(UrlNonaccept, OPEN, UrlOpen);\n\n    // Closing bracket component. This character WILL be included in the URL\n    tt(UrlOpen, CLOSE, Url$1);\n\n    // URL that beings with an opening bracket, followed by a symbols.\n    // Note that the final state can still be `UrlOpen` (if the URL has a\n    // single opening bracket for some reason).\n    const UrlOpenQ = makeState(Url);\n    ta(UrlOpen, qsAccepting, UrlOpenQ);\n    const UrlOpenSyms = makeState(); // UrlOpen followed by some symbols it cannot end it\n    ta(UrlOpen, qsNonAccepting);\n\n    // URL that begins with an opening bracket, followed by some symbols\n    ta(UrlOpenQ, qsAccepting, UrlOpenQ);\n    ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms);\n    ta(UrlOpenSyms, qsAccepting, UrlOpenQ);\n    ta(UrlOpenSyms, qsNonAccepting, UrlOpenSyms);\n\n    // Close brace/bracket to become regular URL\n    tt(UrlOpenQ, CLOSE, Url$1);\n    tt(UrlOpenSyms, CLOSE, Url$1);\n  }\n  tt(Start, LOCALHOST, DomainDotTld); // localhost is a valid URL state\n  tt(Start, NL, Nl); // single new line\n\n  return {\n    start: Start,\n    tokens: tk\n  };\n}\n\n/**\n * Run the parser state machine on a list of scanned string-based tokens to\n * create a list of multi tokens, each of which represents a URL, email address,\n * plain text, etc.\n *\n * @param {State<MultiToken>} start parser start state\n * @param {string} input the original input used to generate the given tokens\n * @param {Token[]} tokens list of scanned tokens\n * @returns {MultiToken[]}\n */\nfunction run(start, input, tokens) {\n  let len = tokens.length;\n  let cursor = 0;\n  let multis = [];\n  let textTokens = [];\n  while (cursor < len) {\n    let state = start;\n    let secondState = null;\n    let nextState = null;\n    let multiLength = 0;\n    let latestAccepting = null;\n    let sinceAccepts = -1;\n    while (cursor < len && !(secondState = state.go(tokens[cursor].t))) {\n      // Starting tokens with nowhere to jump to.\n      // Consider these to be just plain text\n      textTokens.push(tokens[cursor++]);\n    }\n    while (cursor < len && (nextState = secondState || state.go(tokens[cursor].t))) {\n      // Get the next state\n      secondState = null;\n      state = nextState;\n\n      // Keep track of the latest accepting state\n      if (state.accepts()) {\n        sinceAccepts = 0;\n        latestAccepting = state;\n      } else if (sinceAccepts >= 0) {\n        sinceAccepts++;\n      }\n      cursor++;\n      multiLength++;\n    }\n    if (sinceAccepts < 0) {\n      // No accepting state was found, part of a regular text token add\n      // the first text token to the text tokens array and try again from\n      // the next\n      cursor -= multiLength;\n      if (cursor < len) {\n        textTokens.push(tokens[cursor]);\n        cursor++;\n      }\n    } else {\n      // Accepting state!\n      // First close off the textTokens (if available)\n      if (textTokens.length > 0) {\n        multis.push(initMultiToken(Text, input, textTokens));\n        textTokens = [];\n      }\n\n      // Roll back to the latest accepting state\n      cursor -= sinceAccepts;\n      multiLength -= sinceAccepts;\n\n      // Create a new multitoken\n      const Multi = latestAccepting.t;\n      const subtokens = tokens.slice(cursor - multiLength, cursor);\n      multis.push(initMultiToken(Multi, input, subtokens));\n    }\n  }\n\n  // Finally close off the textTokens (if available)\n  if (textTokens.length > 0) {\n    multis.push(initMultiToken(Text, input, textTokens));\n  }\n  return multis;\n}\n\n/**\n * Utility function for instantiating a new multitoken with all the relevant\n * fields during parsing.\n * @param {new (value: string, tokens: Token[]) => MultiToken} Multi class to instantiate\n * @param {string} input original input string\n * @param {Token[]} tokens consecutive tokens scanned from input string\n * @returns {MultiToken}\n */\nfunction initMultiToken(Multi, input, tokens) {\n  const startIdx = tokens[0].s;\n  const endIdx = tokens[tokens.length - 1].e;\n  const value = input.slice(startIdx, endIdx);\n  return new Multi(value, tokens);\n}\n\nconst warn = typeof console !== 'undefined' && console && console.warn || (() => {});\nconst warnAdvice = 'until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.';\n\n// Side-effect initialization state\nconst INIT = {\n  scanner: null,\n  parser: null,\n  tokenQueue: [],\n  pluginQueue: [],\n  customSchemes: [],\n  initialized: false\n};\n\n/**\n * @typedef {{\n * \tstart: State<string>,\n * \ttokens: { groups: Collections<string> } & typeof tk\n * }} ScannerInit\n */\n\n/**\n * @typedef {{\n * \tstart: State<MultiToken>,\n * \ttokens: typeof multi\n * }} ParserInit\n */\n\n/**\n * @typedef {(arg: { scanner: ScannerInit }) => void} TokenPlugin\n */\n\n/**\n * @typedef {(arg: { scanner: ScannerInit, parser: ParserInit }) => void} Plugin\n */\n\n/**\n * De-register all plugins and reset the internal state-machine. Used for\n * testing; not required in practice.\n * @private\n */\nfunction reset() {\n  State.groups = {};\n  INIT.scanner = null;\n  INIT.parser = null;\n  INIT.tokenQueue = [];\n  INIT.pluginQueue = [];\n  INIT.customSchemes = [];\n  INIT.initialized = false;\n  return INIT;\n}\n\n/**\n * Register a token plugin to allow the scanner to recognize additional token\n * types before the parser state machine is constructed from the results.\n * @param {string} name of plugin to register\n * @param {TokenPlugin} plugin function that accepts the scanner state machine\n * and available scanner tokens and collections and extends the state machine to\n * recognize additional tokens or groups.\n */\nfunction registerTokenPlugin(name, plugin) {\n  if (typeof plugin !== 'function') {\n    throw new Error(`linkifyjs: Invalid token plugin ${plugin} (expects function)`);\n  }\n  for (let i = 0; i < INIT.tokenQueue.length; i++) {\n    if (name === INIT.tokenQueue[i][0]) {\n      warn(`linkifyjs: token plugin \"${name}\" already registered - will be overwritten`);\n      INIT.tokenQueue[i] = [name, plugin];\n      return;\n    }\n  }\n  INIT.tokenQueue.push([name, plugin]);\n  if (INIT.initialized) {\n    warn(`linkifyjs: already initialized - will not register token plugin \"${name}\" ${warnAdvice}`);\n  }\n}\n\n/**\n * Register a linkify plugin\n * @param {string} name of plugin to register\n * @param {Plugin} plugin function that accepts the parser state machine and\n * extends the parser to recognize additional link types\n */\nfunction registerPlugin(name, plugin) {\n  if (typeof plugin !== 'function') {\n    throw new Error(`linkifyjs: Invalid plugin ${plugin} (expects function)`);\n  }\n  for (let i = 0; i < INIT.pluginQueue.length; i++) {\n    if (name === INIT.pluginQueue[i][0]) {\n      warn(`linkifyjs: plugin \"${name}\" already registered - will be overwritten`);\n      INIT.pluginQueue[i] = [name, plugin];\n      return;\n    }\n  }\n  INIT.pluginQueue.push([name, plugin]);\n  if (INIT.initialized) {\n    warn(`linkifyjs: already initialized - will not register plugin \"${name}\" ${warnAdvice}`);\n  }\n}\n\n/**\n * Detect URLs with the following additional protocol. Anything with format\n * \"protocol://...\" will be considered a link. If `optionalSlashSlash` is set to\n * `true`, anything with format \"protocol:...\" will be considered a link.\n * @param {string} scheme\n * @param {boolean} [optionalSlashSlash]\n */\nfunction registerCustomProtocol(scheme, optionalSlashSlash = false) {\n  if (INIT.initialized) {\n    warn(`linkifyjs: already initialized - will not register custom scheme \"${scheme}\" ${warnAdvice}`);\n  }\n  if (!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme)) {\n    throw new Error(`linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or \"-\"\n2. Cannot start or end with \"-\"\n3. \"-\" cannot repeat`);\n  }\n  INIT.customSchemes.push([scheme, optionalSlashSlash]);\n}\n\n/**\n * Initialize the linkify state machine. Called automatically the first time\n * linkify is called on a string, but may be called manually as well.\n */\nfunction init() {\n  // Initialize scanner state machine and plugins\n  INIT.scanner = init$2(INIT.customSchemes);\n  for (let i = 0; i < INIT.tokenQueue.length; i++) {\n    INIT.tokenQueue[i][1]({\n      scanner: INIT.scanner\n    });\n  }\n\n  // Initialize parser state machine and plugins\n  INIT.parser = init$1(INIT.scanner.tokens);\n  for (let i = 0; i < INIT.pluginQueue.length; i++) {\n    INIT.pluginQueue[i][1]({\n      scanner: INIT.scanner,\n      parser: INIT.parser\n    });\n  }\n  INIT.initialized = true;\n  return INIT;\n}\n\n/**\n * Parse a string into tokens that represent linkable and non-linkable sub-components\n * @param {string} str\n * @return {MultiToken[]} tokens\n */\nfunction tokenize(str) {\n  if (!INIT.initialized) {\n    init();\n  }\n  return run(INIT.parser.start, str, run$1(INIT.scanner.start, str));\n}\ntokenize.scan = run$1; // for testing\n\n/**\n * Find a list of linkable items in the given string.\n * @param {string} str string to find links in\n * @param {string | Opts} [type] either formatting options or specific type of\n * links to find, e.g., 'url' or 'email'\n * @param {Opts} [opts] formatting options for final output. Cannot be specified\n * if opts already provided in `type` argument\n */\nfunction find(str, type = null, opts = null) {\n  if (type && typeof type === 'object') {\n    if (opts) {\n      throw Error(`linkifyjs: Invalid link type ${type}; must be a string`);\n    }\n    opts = type;\n    type = null;\n  }\n  const options = new Options(opts);\n  const tokens = tokenize(str);\n  const filtered = [];\n  for (let i = 0; i < tokens.length; i++) {\n    const token = tokens[i];\n    if (token.isLink && (!type || token.t === type) && options.check(token)) {\n      filtered.push(token.toFormattedObject(options));\n    }\n  }\n  return filtered;\n}\n\n/**\n * Is the given string valid linkable text of some sort. Note that this does not\n * trim the text for you.\n *\n * Optionally pass in a second `type` param, which is the type of link to test\n * for.\n *\n * For example,\n *\n *     linkify.test(str, 'email');\n *\n * Returns `true` if str is a valid email.\n * @param {string} str string to test for links\n * @param {string} [type] optional specific link type to look for\n * @returns boolean true/false\n */\nfunction test(str, type = null) {\n  const tokens = tokenize(str);\n  return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].t === type);\n}\n\nexport { MultiToken, Options, State, createTokenClass, find, init, multi, options, regexp, registerCustomProtocol, registerPlugin, registerTokenPlugin, reset, stringToArray, test, multi as text, tokenize };\n","import { Extension } from '@tiptap/core';\n\n/**\n * This extension allows you to align text.\n * @see https://www.tiptap.dev/api/extensions/text-align\n */\nconst TextAlign = Extension.create({\n    name: 'textAlign',\n    addOptions() {\n        return {\n            types: [],\n            alignments: ['left', 'center', 'right', 'justify'],\n            defaultAlignment: null,\n        };\n    },\n    addGlobalAttributes() {\n        return [\n            {\n                types: this.options.types,\n                attributes: {\n                    textAlign: {\n                        default: this.options.defaultAlignment,\n                        parseHTML: element => {\n                            const alignment = element.style.textAlign;\n                            return this.options.alignments.includes(alignment) ? alignment : this.options.defaultAlignment;\n                        },\n                        renderHTML: attributes => {\n                            if (!attributes.textAlign) {\n                                return {};\n                            }\n                            return { style: `text-align: ${attributes.textAlign}` };\n                        },\n                    },\n                },\n            },\n        ];\n    },\n    addCommands() {\n        return {\n            setTextAlign: (alignment) => ({ commands }) => {\n                if (!this.options.alignments.includes(alignment)) {\n                    return false;\n                }\n                return this.options.types\n                    .map(type => commands.updateAttributes(type, { textAlign: alignment }))\n                    .every(response => response);\n            },\n            unsetTextAlign: () => ({ commands }) => {\n                return this.options.types\n                    .map(type => commands.resetAttributes(type, 'textAlign'))\n                    .every(response => response);\n            },\n            toggleTextAlign: alignment => ({ editor, commands }) => {\n                if (!this.options.alignments.includes(alignment)) {\n                    return false;\n                }\n                if (editor.isActive({ textAlign: alignment })) {\n                    return commands.unsetTextAlign();\n                }\n                return commands.setTextAlign(alignment);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-Shift-l': () => this.editor.commands.setTextAlign('left'),\n            'Mod-Shift-e': () => this.editor.commands.setTextAlign('center'),\n            'Mod-Shift-r': () => this.editor.commands.setTextAlign('right'),\n            'Mod-Shift-j': () => this.editor.commands.setTextAlign('justify'),\n        };\n    },\n});\n\nexport { TextAlign, TextAlign as default };\n//# sourceMappingURL=index.js.map\n","import { Extension } from '@tiptap/core'\n\nexport interface TextAlignOptions {\n  /**\n   * The types where the text align attribute can be applied.\n   * @default []\n   * @example ['heading', 'paragraph']\n   */\n  types: string[],\n\n  /**\n   * The alignments which are allowed.\n   * @default ['left', 'center', 'right', 'justify']\n   * @example ['left', 'right']\n   */\n  alignments: string[],\n\n  /**\n   * The default alignment.\n   * @default null\n   * @example 'center'\n   */\n  defaultAlignment: string | null,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    textAlign: {\n      /**\n       * Set the text align attribute\n       * @param alignment The alignment\n       * @example editor.commands.setTextAlign('left')\n       */\n      setTextAlign: (alignment: string) => ReturnType,\n      /**\n       * Unset the text align attribute\n       * @example editor.commands.unsetTextAlign()\n       */\n      unsetTextAlign: () => ReturnType,\n      /**\n       * Toggle the text align attribute\n       * @param alignment The alignment\n       * @example editor.commands.toggleTextAlign('right')\n       */\n      toggleTextAlign: (alignment: string) => ReturnType,\n    }\n  }\n}\n\n/**\n * This extension allows you to align text.\n * @see https://www.tiptap.dev/api/extensions/text-align\n */\nexport const TextAlign = Extension.create<TextAlignOptions>({\n  name: 'textAlign',\n\n  addOptions() {\n    return {\n      types: [],\n      alignments: ['left', 'center', 'right', 'justify'],\n      defaultAlignment: null,\n    }\n  },\n\n  addGlobalAttributes() {\n    return [\n      {\n        types: this.options.types,\n        attributes: {\n          textAlign: {\n            default: this.options.defaultAlignment,\n            parseHTML: element => {\n              const alignment = element.style.textAlign\n\n              return this.options.alignments.includes(alignment) ? alignment : this.options.defaultAlignment\n            },\n            renderHTML: attributes => {\n              if (!attributes.textAlign) {\n                return {}\n              }\n\n              return { style: `text-align: ${attributes.textAlign}` }\n            },\n          },\n        },\n      },\n    ]\n  },\n\n  addCommands() {\n    return {\n      setTextAlign: (alignment: string) => ({ commands }) => {\n        if (!this.options.alignments.includes(alignment)) {\n          return false\n        }\n\n        return this.options.types\n          .map(type => commands.updateAttributes(type, { textAlign: alignment }))\n          .every(response => response)\n      },\n\n      unsetTextAlign: () => ({ commands }) => {\n        return this.options.types\n          .map(type => commands.resetAttributes(type, 'textAlign'))\n          .every(response => response)\n      },\n\n      toggleTextAlign: alignment => ({ editor, commands }) => {\n        if (!this.options.alignments.includes(alignment)) {\n          return false\n        }\n\n        if (editor.isActive({ textAlign: alignment })) {\n          return commands.unsetTextAlign()\n        }\n        return commands.setTextAlign(alignment)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-Shift-l': () => this.editor.commands.setTextAlign('left'),\n      'Mod-Shift-e': () => this.editor.commands.setTextAlign('center'),\n      'Mod-Shift-r': () => this.editor.commands.setTextAlign('right'),\n      'Mod-Shift-j': () => this.editor.commands.setTextAlign('justify'),\n    }\n  },\n})\n","import { Mark, mergeAttributes } from '@tiptap/core';\n\n/**\n * This extension allows you to create underline text.\n * @see https://www.tiptap.dev/api/marks/underline\n */\nconst Underline = Mark.create({\n    name: 'underline',\n    addOptions() {\n        return {\n            HTMLAttributes: {},\n        };\n    },\n    parseHTML() {\n        return [\n            {\n                tag: 'u',\n            },\n            {\n                style: 'text-decoration',\n                consuming: false,\n                getAttrs: style => (style.includes('underline') ? {} : false),\n            },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['u', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            setUnderline: () => ({ commands }) => {\n                return commands.setMark(this.name);\n            },\n            toggleUnderline: () => ({ commands }) => {\n                return commands.toggleMark(this.name);\n            },\n            unsetUnderline: () => ({ commands }) => {\n                return commands.unsetMark(this.name);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-u': () => this.editor.commands.toggleUnderline(),\n            'Mod-U': () => this.editor.commands.toggleUnderline(),\n        };\n    },\n});\n\nexport { Underline, Underline as default };\n//# sourceMappingURL=index.js.map\n","import { Mark, mergeAttributes } from '@tiptap/core'\n\nexport interface UnderlineOptions {\n  /**\n   * HTML attributes to add to the underline element.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    underline: {\n      /**\n       * Set an underline mark\n       * @example editor.commands.setUnderline()\n       */\n      setUnderline: () => ReturnType,\n      /**\n       * Toggle an underline mark\n       * @example editor.commands.toggleUnderline()\n       */\n      toggleUnderline: () => ReturnType,\n      /**\n       * Unset an underline mark\n       * @example editor.commands.unsetUnderline()\n       */\n      unsetUnderline: () => ReturnType,\n    }\n  }\n}\n\n/**\n * This extension allows you to create underline text.\n * @see https://www.tiptap.dev/api/marks/underline\n */\nexport const Underline = Mark.create<UnderlineOptions>({\n  name: 'underline',\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 'u',\n      },\n      {\n        style: 'text-decoration',\n        consuming: false,\n        getAttrs: style => ((style as string).includes('underline') ? {} : false),\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['u', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setUnderline: () => ({ commands }) => {\n        return commands.setMark(this.name)\n      },\n      toggleUnderline: () => ({ commands }) => {\n        return commands.toggleMark(this.name)\n      },\n      unsetUnderline: () => ({ commands }) => {\n        return commands.unsetMark(this.name)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-u': () => this.editor.commands.toggleUnderline(),\n      'Mod-U': () => this.editor.commands.toggleUnderline(),\n    }\n  },\n})\n","import { Extension } from '@tiptap/core';\nimport { Blockquote } from '@tiptap/extension-blockquote';\nimport { Bold } from '@tiptap/extension-bold';\nimport { BulletList } from '@tiptap/extension-bullet-list';\nimport { Code } from '@tiptap/extension-code';\nimport { CodeBlock } from '@tiptap/extension-code-block';\nimport { Document } from '@tiptap/extension-document';\nimport { Dropcursor } from '@tiptap/extension-dropcursor';\nimport { Gapcursor } from '@tiptap/extension-gapcursor';\nimport { HardBreak } from '@tiptap/extension-hard-break';\nimport { Heading } from '@tiptap/extension-heading';\nimport { History } from '@tiptap/extension-history';\nimport { HorizontalRule } from '@tiptap/extension-horizontal-rule';\nimport { Italic } from '@tiptap/extension-italic';\nimport { ListItem } from '@tiptap/extension-list-item';\nimport { OrderedList } from '@tiptap/extension-ordered-list';\nimport { Paragraph } from '@tiptap/extension-paragraph';\nimport { Strike } from '@tiptap/extension-strike';\nimport { Text } from '@tiptap/extension-text';\n\n/**\n * The starter kit is a collection of essential editor extensions.\n *\n * It’s a good starting point for building your own editor.\n */\nconst StarterKit = Extension.create({\n    name: 'starterKit',\n    addExtensions() {\n        const extensions = [];\n        if (this.options.bold !== false) {\n            extensions.push(Bold.configure(this.options.bold));\n        }\n        if (this.options.blockquote !== false) {\n            extensions.push(Blockquote.configure(this.options.blockquote));\n        }\n        if (this.options.bulletList !== false) {\n            extensions.push(BulletList.configure(this.options.bulletList));\n        }\n        if (this.options.code !== false) {\n            extensions.push(Code.configure(this.options.code));\n        }\n        if (this.options.codeBlock !== false) {\n            extensions.push(CodeBlock.configure(this.options.codeBlock));\n        }\n        if (this.options.document !== false) {\n            extensions.push(Document.configure(this.options.document));\n        }\n        if (this.options.dropcursor !== false) {\n            extensions.push(Dropcursor.configure(this.options.dropcursor));\n        }\n        if (this.options.gapcursor !== false) {\n            extensions.push(Gapcursor.configure(this.options.gapcursor));\n        }\n        if (this.options.hardBreak !== false) {\n            extensions.push(HardBreak.configure(this.options.hardBreak));\n        }\n        if (this.options.heading !== false) {\n            extensions.push(Heading.configure(this.options.heading));\n        }\n        if (this.options.history !== false) {\n            extensions.push(History.configure(this.options.history));\n        }\n        if (this.options.horizontalRule !== false) {\n            extensions.push(HorizontalRule.configure(this.options.horizontalRule));\n        }\n        if (this.options.italic !== false) {\n            extensions.push(Italic.configure(this.options.italic));\n        }\n        if (this.options.listItem !== false) {\n            extensions.push(ListItem.configure(this.options.listItem));\n        }\n        if (this.options.orderedList !== false) {\n            extensions.push(OrderedList.configure(this.options.orderedList));\n        }\n        if (this.options.paragraph !== false) {\n            extensions.push(Paragraph.configure(this.options.paragraph));\n        }\n        if (this.options.strike !== false) {\n            extensions.push(Strike.configure(this.options.strike));\n        }\n        if (this.options.text !== false) {\n            extensions.push(Text.configure(this.options.text));\n        }\n        return extensions;\n    },\n});\n\nexport { StarterKit, StarterKit as default };\n//# sourceMappingURL=index.js.map\n","import { Extension } from '@tiptap/core'\nimport { Blockquote, BlockquoteOptions } from '@tiptap/extension-blockquote'\nimport { Bold, BoldOptions } from '@tiptap/extension-bold'\nimport { BulletList, BulletListOptions } from '@tiptap/extension-bullet-list'\nimport { Code, CodeOptions } from '@tiptap/extension-code'\nimport { CodeBlock, CodeBlockOptions } from '@tiptap/extension-code-block'\nimport { Document } from '@tiptap/extension-document'\nimport { Dropcursor, DropcursorOptions } from '@tiptap/extension-dropcursor'\nimport { Gapcursor } from '@tiptap/extension-gapcursor'\nimport { HardBreak, HardBreakOptions } from '@tiptap/extension-hard-break'\nimport { Heading, HeadingOptions } from '@tiptap/extension-heading'\nimport { History, HistoryOptions } from '@tiptap/extension-history'\nimport { HorizontalRule, HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'\nimport { Italic, ItalicOptions } from '@tiptap/extension-italic'\nimport { ListItem, ListItemOptions } from '@tiptap/extension-list-item'\nimport { OrderedList, OrderedListOptions } from '@tiptap/extension-ordered-list'\nimport { Paragraph, ParagraphOptions } from '@tiptap/extension-paragraph'\nimport { Strike, StrikeOptions } from '@tiptap/extension-strike'\nimport { Text } from '@tiptap/extension-text'\n\nexport interface StarterKitOptions {\n  /**\n   * If set to false, the blockquote extension will not be registered\n   * @example blockquote: false\n   */\n  blockquote: Partial<BlockquoteOptions> | false,\n\n  /**\n   * If set to false, the bold extension will not be registered\n   * @example bold: false\n   */\n  bold: Partial<BoldOptions> | false,\n\n  /**\n   * If set to false, the bulletList extension will not be registered\n   * @example bulletList: false\n   */\n  bulletList: Partial<BulletListOptions> | false,\n\n  /**\n   * If set to false, the code extension will not be registered\n   * @example code: false\n   */\n  code: Partial<CodeOptions> | false,\n\n  /**\n   * If set to false, the codeBlock extension will not be registered\n   * @example codeBlock: false\n   */\n  codeBlock: Partial<CodeBlockOptions> | false,\n\n  /**\n   * If set to false, the document extension will not be registered\n   * @example document: false\n   */\n  document: false,\n\n  /**\n   * If set to false, the dropcursor extension will not be registered\n   * @example dropcursor: false\n   */\n  dropcursor: Partial<DropcursorOptions> | false,\n\n  /**\n   * If set to false, the gapcursor extension will not be registered\n   * @example gapcursor: false\n   */\n  gapcursor: false,\n\n  /**\n   * If set to false, the hardBreak extension will not be registered\n   * @example hardBreak: false\n   */\n  hardBreak: Partial<HardBreakOptions> | false,\n\n  /**\n   * If set to false, the heading extension will not be registered\n   * @example heading: false\n   */\n  heading: Partial<HeadingOptions> | false,\n\n  /**\n   * If set to false, the history extension will not be registered\n   * @example history: false\n   */\n  history: Partial<HistoryOptions> | false,\n\n  /**\n   * If set to false, the horizontalRule extension will not be registered\n   * @example horizontalRule: false\n   */\n  horizontalRule: Partial<HorizontalRuleOptions> | false,\n\n  /**\n   * If set to false, the italic extension will not be registered\n   * @example italic: false\n   */\n  italic: Partial<ItalicOptions> | false,\n\n  /**\n   * If set to false, the listItem extension will not be registered\n   * @example listItem: false\n   */\n  listItem: Partial<ListItemOptions> | false,\n\n  /**\n   * If set to false, the orderedList extension will not be registered\n   * @example orderedList: false\n   */\n  orderedList: Partial<OrderedListOptions> | false,\n\n  /**\n   * If set to false, the paragraph extension will not be registered\n   * @example paragraph: false\n   */\n  paragraph: Partial<ParagraphOptions> | false,\n\n  /**\n   * If set to false, the strike extension will not be registered\n   * @example strike: false\n   */\n  strike: Partial<StrikeOptions> | false,\n\n  /**\n   * If set to false, the text extension will not be registered\n   * @example text: false\n   */\n  text: false,\n}\n\n/**\n * The starter kit is a collection of essential editor extensions.\n *\n * It’s a good starting point for building your own editor.\n */\nexport const StarterKit = Extension.create<StarterKitOptions>({\n  name: 'starterKit',\n\n  addExtensions() {\n    const extensions = []\n\n    if (this.options.bold !== false) {\n      extensions.push(Bold.configure(this.options.bold))\n    }\n\n    if (this.options.blockquote !== false) {\n      extensions.push(Blockquote.configure(this.options.blockquote))\n    }\n\n    if (this.options.bulletList !== false) {\n      extensions.push(BulletList.configure(this.options.bulletList))\n    }\n\n    if (this.options.code !== false) {\n      extensions.push(Code.configure(this.options.code))\n    }\n\n    if (this.options.codeBlock !== false) {\n      extensions.push(CodeBlock.configure(this.options.codeBlock))\n    }\n\n    if (this.options.document !== false) {\n      extensions.push(Document.configure(this.options.document))\n    }\n\n    if (this.options.dropcursor !== false) {\n      extensions.push(Dropcursor.configure(this.options.dropcursor))\n    }\n\n    if (this.options.gapcursor !== false) {\n      extensions.push(Gapcursor.configure(this.options.gapcursor))\n    }\n\n    if (this.options.hardBreak !== false) {\n      extensions.push(HardBreak.configure(this.options.hardBreak))\n    }\n\n    if (this.options.heading !== false) {\n      extensions.push(Heading.configure(this.options.heading))\n    }\n\n    if (this.options.history !== false) {\n      extensions.push(History.configure(this.options.history))\n    }\n\n    if (this.options.horizontalRule !== false) {\n      extensions.push(HorizontalRule.configure(this.options.horizontalRule))\n    }\n\n    if (this.options.italic !== false) {\n      extensions.push(Italic.configure(this.options.italic))\n    }\n\n    if (this.options.listItem !== false) {\n      extensions.push(ListItem.configure(this.options.listItem))\n    }\n\n    if (this.options.orderedList !== false) {\n      extensions.push(OrderedList.configure(this.options.orderedList))\n    }\n\n    if (this.options.paragraph !== false) {\n      extensions.push(Paragraph.configure(this.options.paragraph))\n    }\n\n    if (this.options.strike !== false) {\n      extensions.push(Strike.configure(this.options.strike))\n    }\n\n    if (this.options.text !== false) {\n      extensions.push(Text.configure(this.options.text))\n    }\n\n    return extensions\n  },\n})\n","import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core';\n\n/**\n * Matches a blockquote to a `>` as input.\n */\nconst inputRegex = /^\\s*>\\s$/;\n/**\n * This extension allows you to create blockquotes.\n * @see https://tiptap.dev/api/nodes/blockquote\n */\nconst Blockquote = Node.create({\n    name: 'blockquote',\n    addOptions() {\n        return {\n            HTMLAttributes: {},\n        };\n    },\n    content: 'block+',\n    group: 'block',\n    defining: true,\n    parseHTML() {\n        return [\n            { tag: 'blockquote' },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['blockquote', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            setBlockquote: () => ({ commands }) => {\n                return commands.wrapIn(this.name);\n            },\n            toggleBlockquote: () => ({ commands }) => {\n                return commands.toggleWrap(this.name);\n            },\n            unsetBlockquote: () => ({ commands }) => {\n                return commands.lift(this.name);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-Shift-b': () => this.editor.commands.toggleBlockquote(),\n        };\n    },\n    addInputRules() {\n        return [\n            wrappingInputRule({\n                find: inputRegex,\n                type: this.type,\n            }),\n        ];\n    },\n});\n\nexport { Blockquote, Blockquote as default, inputRegex };\n//# sourceMappingURL=index.js.map\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nexport interface BlockquoteOptions {\n  /**\n   * HTML attributes to add to the blockquote element\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    blockQuote: {\n      /**\n       * Set a blockquote node\n       */\n      setBlockquote: () => ReturnType,\n      /**\n       * Toggle a blockquote node\n       */\n      toggleBlockquote: () => ReturnType,\n      /**\n       * Unset a blockquote node\n       */\n      unsetBlockquote: () => ReturnType,\n    }\n  }\n}\n\n/**\n * Matches a blockquote to a `>` as input.\n */\nexport const inputRegex = /^\\s*>\\s$/\n\n/**\n * This extension allows you to create blockquotes.\n * @see https://tiptap.dev/api/nodes/blockquote\n */\nexport const Blockquote = Node.create<BlockquoteOptions>({\n\n  name: 'blockquote',\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n    }\n  },\n\n  content: 'block+',\n\n  group: 'block',\n\n  defining: true,\n\n  parseHTML() {\n    return [\n      { tag: 'blockquote' },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['blockquote', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setBlockquote: () => ({ commands }) => {\n        return commands.wrapIn(this.name)\n      },\n      toggleBlockquote: () => ({ commands }) => {\n        return commands.toggleWrap(this.name)\n      },\n      unsetBlockquote: () => ({ commands }) => {\n        return commands.lift(this.name)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-Shift-b': () => this.editor.commands.toggleBlockquote(),\n    }\n  },\n\n  addInputRules() {\n    return [\n      wrappingInputRule({\n        find: inputRegex,\n        type: this.type,\n      }),\n    ]\n  },\n})\n","import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Matches bold text via `**` as input.\n */\nconst starInputRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))$/;\n/**\n * Matches bold text via `**` while pasting.\n */\nconst starPasteRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))/g;\n/**\n * Matches bold text via `__` as input.\n */\nconst underscoreInputRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))$/;\n/**\n * Matches bold text via `__` while pasting.\n */\nconst underscorePasteRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))/g;\n/**\n * This extension allows you to mark text as bold.\n * @see https://tiptap.dev/api/marks/bold\n */\nconst Bold = Mark.create({\n    name: 'bold',\n    addOptions() {\n        return {\n            HTMLAttributes: {},\n        };\n    },\n    parseHTML() {\n        return [\n            {\n                tag: 'strong',\n            },\n            {\n                tag: 'b',\n                getAttrs: node => node.style.fontWeight !== 'normal' && null,\n            },\n            {\n                style: 'font-weight=400',\n                clearMark: mark => mark.type.name === this.name,\n            },\n            {\n                style: 'font-weight',\n                getAttrs: value => /^(bold(er)?|[5-9]\\d{2,})$/.test(value) && null,\n            },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['strong', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            setBold: () => ({ commands }) => {\n                return commands.setMark(this.name);\n            },\n            toggleBold: () => ({ commands }) => {\n                return commands.toggleMark(this.name);\n            },\n            unsetBold: () => ({ commands }) => {\n                return commands.unsetMark(this.name);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-b': () => this.editor.commands.toggleBold(),\n            'Mod-B': () => this.editor.commands.toggleBold(),\n        };\n    },\n    addInputRules() {\n        return [\n            markInputRule({\n                find: starInputRegex,\n                type: this.type,\n            }),\n            markInputRule({\n                find: underscoreInputRegex,\n                type: this.type,\n            }),\n        ];\n    },\n    addPasteRules() {\n        return [\n            markPasteRule({\n                find: starPasteRegex,\n                type: this.type,\n            }),\n            markPasteRule({\n                find: underscorePasteRegex,\n                type: this.type,\n            }),\n        ];\n    },\n});\n\nexport { Bold, Bold as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex };\n//# sourceMappingURL=index.js.map\n","import {\n  Mark,\n  markInputRule,\n  markPasteRule,\n  mergeAttributes,\n} from '@tiptap/core'\n\nexport interface BoldOptions {\n  /**\n   * HTML attributes to add to the bold element.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    bold: {\n      /**\n       * Set a bold mark\n       */\n      setBold: () => ReturnType,\n      /**\n       * Toggle a bold mark\n       */\n      toggleBold: () => ReturnType,\n      /**\n       * Unset a bold mark\n       */\n      unsetBold: () => ReturnType,\n    }\n  }\n}\n\n/**\n * Matches bold text via `**` as input.\n */\nexport const starInputRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))$/\n\n/**\n * Matches bold text via `**` while pasting.\n */\nexport const starPasteRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))/g\n\n/**\n * Matches bold text via `__` as input.\n */\nexport const underscoreInputRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))$/\n\n/**\n * Matches bold text via `__` while pasting.\n */\nexport const underscorePasteRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))/g\n\n/**\n * This extension allows you to mark text as bold.\n * @see https://tiptap.dev/api/marks/bold\n */\nexport const Bold = Mark.create<BoldOptions>({\n  name: 'bold',\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 'strong',\n      },\n      {\n        tag: 'b',\n        getAttrs: node => (node as HTMLElement).style.fontWeight !== 'normal' && null,\n      },\n      {\n        style: 'font-weight=400',\n        clearMark: mark => mark.type.name === this.name,\n      },\n      {\n        style: 'font-weight',\n        getAttrs: value => /^(bold(er)?|[5-9]\\d{2,})$/.test(value as string) && null,\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['strong', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setBold: () => ({ commands }) => {\n        return commands.setMark(this.name)\n      },\n      toggleBold: () => ({ commands }) => {\n        return commands.toggleMark(this.name)\n      },\n      unsetBold: () => ({ commands }) => {\n        return commands.unsetMark(this.name)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-b': () => this.editor.commands.toggleBold(),\n      'Mod-B': () => this.editor.commands.toggleBold(),\n    }\n  },\n\n  addInputRules() {\n    return [\n      markInputRule({\n        find: starInputRegex,\n        type: this.type,\n      }),\n      markInputRule({\n        find: underscoreInputRegex,\n        type: this.type,\n      }),\n    ]\n  },\n\n  addPasteRules() {\n    return [\n      markPasteRule({\n        find: starPasteRegex,\n        type: this.type,\n      }),\n      markPasteRule({\n        find: underscorePasteRegex,\n        type: this.type,\n      }),\n    ]\n  },\n})\n","import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core';\n\nconst ListItemName = 'listItem';\nconst TextStyleName = 'textStyle';\n/**\n * Matches a bullet list to a dash or asterisk.\n */\nconst inputRegex = /^\\s*([-+*])\\s$/;\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */\nconst BulletList = Node.create({\n    name: 'bulletList',\n    addOptions() {\n        return {\n            itemTypeName: 'listItem',\n            HTMLAttributes: {},\n            keepMarks: false,\n            keepAttributes: false,\n        };\n    },\n    group: 'block list',\n    content() {\n        return `${this.options.itemTypeName}+`;\n    },\n    parseHTML() {\n        return [\n            { tag: 'ul' },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            toggleBulletList: () => ({ commands, chain }) => {\n                if (this.options.keepAttributes) {\n                    return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run();\n                }\n                return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n        };\n    },\n    addInputRules() {\n        let inputRule = wrappingInputRule({\n            find: inputRegex,\n            type: this.type,\n        });\n        if (this.options.keepMarks || this.options.keepAttributes) {\n            inputRule = wrappingInputRule({\n                find: inputRegex,\n                type: this.type,\n                keepMarks: this.options.keepMarks,\n                keepAttributes: this.options.keepAttributes,\n                getAttributes: () => { return this.editor.getAttributes(TextStyleName); },\n                editor: this.editor,\n            });\n        }\n        return [\n            inputRule,\n        ];\n    },\n});\n\nexport { BulletList, BulletList as default, inputRegex };\n//# sourceMappingURL=index.js.map\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface BulletListOptions {\n  /**\n   * The node name for the list items\n   * @default 'listItem'\n   * @example 'paragraph'\n   */\n  itemTypeName: string,\n\n  /**\n   * HTML attributes to add to the bullet list element\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n\n  /**\n   * Keep the marks when splitting the list\n   * @default false\n   * @example true\n   */\n  keepMarks: boolean,\n\n  /**\n   * Keep the attributes when splitting the list\n   * @default false\n   * @example true\n   */\n  keepAttributes: boolean,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    bulletList: {\n      /**\n       * Toggle a bullet list\n       */\n      toggleBulletList: () => ReturnType,\n    }\n  }\n}\n\n/**\n * Matches a bullet list to a dash or asterisk.\n */\nexport const inputRegex = /^\\s*([-+*])\\s$/\n\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */\nexport const BulletList = Node.create<BulletListOptions>({\n  name: 'bulletList',\n\n  addOptions() {\n    return {\n      itemTypeName: 'listItem',\n      HTMLAttributes: {},\n      keepMarks: false,\n      keepAttributes: false,\n    }\n  },\n\n  group: 'block list',\n\n  content() {\n    return `${this.options.itemTypeName}+`\n  },\n\n  parseHTML() {\n    return [\n      { tag: 'ul' },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      toggleBulletList: () => ({ commands, chain }) => {\n        if (this.options.keepAttributes) {\n          return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run()\n        }\n        return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n    }\n  },\n\n  addInputRules() {\n    let inputRule = wrappingInputRule({\n      find: inputRegex,\n      type: this.type,\n    })\n\n    if (this.options.keepMarks || this.options.keepAttributes) {\n      inputRule = wrappingInputRule({\n        find: inputRegex,\n        type: this.type,\n        keepMarks: this.options.keepMarks,\n        keepAttributes: this.options.keepAttributes,\n        getAttributes: () => { return this.editor.getAttributes(TextStyleName) },\n        editor: this.editor,\n      })\n    }\n    return [\n      inputRule,\n    ]\n  },\n})\n","import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Regular expressions to match inline code blocks enclosed in backticks.\n *  It matches:\n *     - An opening backtick, followed by\n *     - Any text that doesn't include a backtick (captured for marking), followed by\n *     - A closing backtick.\n *  This ensures that any text between backticks is formatted as code,\n *  regardless of the surrounding characters (exception being another backtick).\n */\nconst inputRegex = /(^|[^`])`([^`]+)`(?!`)/;\n/**\n * Matches inline code while pasting.\n */\nconst pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;\n/**\n * This extension allows you to mark text as inline code.\n * @see https://tiptap.dev/api/marks/code\n */\nconst Code = Mark.create({\n    name: 'code',\n    addOptions() {\n        return {\n            HTMLAttributes: {},\n        };\n    },\n    excludes: '_',\n    code: true,\n    exitable: true,\n    parseHTML() {\n        return [\n            { tag: 'code' },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['code', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            setCode: () => ({ commands }) => {\n                return commands.setMark(this.name);\n            },\n            toggleCode: () => ({ commands }) => {\n                return commands.toggleMark(this.name);\n            },\n            unsetCode: () => ({ commands }) => {\n                return commands.unsetMark(this.name);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-e': () => this.editor.commands.toggleCode(),\n        };\n    },\n    addInputRules() {\n        return [\n            markInputRule({\n                find: inputRegex,\n                type: this.type,\n            }),\n        ];\n    },\n    addPasteRules() {\n        return [\n            markPasteRule({\n                find: pasteRegex,\n                type: this.type,\n            }),\n        ];\n    },\n});\n\nexport { Code, Code as default, inputRegex, pasteRegex };\n//# sourceMappingURL=index.js.map\n","import {\n  Mark,\n  markInputRule,\n  markPasteRule,\n  mergeAttributes,\n} from '@tiptap/core'\n\nexport interface CodeOptions {\n  /**\n   * The HTML attributes applied to the code element.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    code: {\n      /**\n       * Set a code mark\n       */\n      setCode: () => ReturnType,\n      /**\n       * Toggle inline code\n       */\n      toggleCode: () => ReturnType,\n      /**\n       * Unset a code mark\n       */\n      unsetCode: () => ReturnType,\n    }\n  }\n}\n\n/**\n * Regular expressions to match inline code blocks enclosed in backticks.\n *  It matches:\n *     - An opening backtick, followed by\n *     - Any text that doesn't include a backtick (captured for marking), followed by\n *     - A closing backtick.\n *  This ensures that any text between backticks is formatted as code,\n *  regardless of the surrounding characters (exception being another backtick).\n */\nexport const inputRegex = /(^|[^`])`([^`]+)`(?!`)/\n\n/**\n * Matches inline code while pasting.\n */\nexport const pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g\n\n/**\n * This extension allows you to mark text as inline code.\n * @see https://tiptap.dev/api/marks/code\n */\nexport const Code = Mark.create<CodeOptions>({\n  name: 'code',\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n    }\n  },\n\n  excludes: '_',\n\n  code: true,\n\n  exitable: true,\n\n  parseHTML() {\n    return [\n      { tag: 'code' },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['code', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setCode: () => ({ commands }) => {\n        return commands.setMark(this.name)\n      },\n      toggleCode: () => ({ commands }) => {\n        return commands.toggleMark(this.name)\n      },\n      unsetCode: () => ({ commands }) => {\n        return commands.unsetMark(this.name)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-e': () => this.editor.commands.toggleCode(),\n    }\n  },\n\n  addInputRules() {\n    return [\n      markInputRule({\n        find: inputRegex,\n        type: this.type,\n      }),\n    ]\n  },\n\n  addPasteRules() {\n    return [\n      markPasteRule({\n        find: pasteRegex,\n        type: this.type,\n      }),\n    ]\n  },\n})\n","import { Node, mergeAttributes, textblockTypeInputRule } from '@tiptap/core';\nimport { Selection, Plugin, PluginKey, TextSelection } from '@tiptap/pm/state';\n\n/**\n * Matches a code block with backticks.\n */\nconst backtickInputRegex = /^```([a-z]+)?[\\s\\n]$/;\n/**\n * Matches a code block with tildes.\n */\nconst tildeInputRegex = /^~~~([a-z]+)?[\\s\\n]$/;\n/**\n * This extension allows you to create code blocks.\n * @see https://tiptap.dev/api/nodes/code-block\n */\nconst CodeBlock = Node.create({\n    name: 'codeBlock',\n    addOptions() {\n        return {\n            languageClassPrefix: 'language-',\n            exitOnTripleEnter: true,\n            exitOnArrowDown: true,\n            defaultLanguage: null,\n            HTMLAttributes: {},\n        };\n    },\n    content: 'text*',\n    marks: '',\n    group: 'block',\n    code: true,\n    defining: true,\n    addAttributes() {\n        return {\n            language: {\n                default: this.options.defaultLanguage,\n                parseHTML: element => {\n                    var _a;\n                    const { languageClassPrefix } = this.options;\n                    const classNames = [...(((_a = element.firstElementChild) === null || _a === void 0 ? void 0 : _a.classList) || [])];\n                    const languages = classNames\n                        .filter(className => className.startsWith(languageClassPrefix))\n                        .map(className => className.replace(languageClassPrefix, ''));\n                    const language = languages[0];\n                    if (!language) {\n                        return null;\n                    }\n                    return language;\n                },\n                rendered: false,\n            },\n        };\n    },\n    parseHTML() {\n        return [\n            {\n                tag: 'pre',\n                preserveWhitespace: 'full',\n            },\n        ];\n    },\n    renderHTML({ node, HTMLAttributes }) {\n        return [\n            'pre',\n            mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n            [\n                'code',\n                {\n                    class: node.attrs.language\n                        ? this.options.languageClassPrefix + node.attrs.language\n                        : null,\n                },\n                0,\n            ],\n        ];\n    },\n    addCommands() {\n        return {\n            setCodeBlock: attributes => ({ commands }) => {\n                return commands.setNode(this.name, attributes);\n            },\n            toggleCodeBlock: attributes => ({ commands }) => {\n                return commands.toggleNode(this.name, 'paragraph', attributes);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-Alt-c': () => this.editor.commands.toggleCodeBlock(),\n            // remove code block when at start of document or code block is empty\n            Backspace: () => {\n                const { empty, $anchor } = this.editor.state.selection;\n                const isAtStart = $anchor.pos === 1;\n                if (!empty || $anchor.parent.type.name !== this.name) {\n                    return false;\n                }\n                if (isAtStart || !$anchor.parent.textContent.length) {\n                    return this.editor.commands.clearNodes();\n                }\n                return false;\n            },\n            // exit node on triple enter\n            Enter: ({ editor }) => {\n                if (!this.options.exitOnTripleEnter) {\n                    return false;\n                }\n                const { state } = editor;\n                const { selection } = state;\n                const { $from, empty } = selection;\n                if (!empty || $from.parent.type !== this.type) {\n                    return false;\n                }\n                const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;\n                const endsWithDoubleNewline = $from.parent.textContent.endsWith('\\n\\n');\n                if (!isAtEnd || !endsWithDoubleNewline) {\n                    return false;\n                }\n                return editor\n                    .chain()\n                    .command(({ tr }) => {\n                    tr.delete($from.pos - 2, $from.pos);\n                    return true;\n                })\n                    .exitCode()\n                    .run();\n            },\n            // exit node on arrow down\n            ArrowDown: ({ editor }) => {\n                if (!this.options.exitOnArrowDown) {\n                    return false;\n                }\n                const { state } = editor;\n                const { selection, doc } = state;\n                const { $from, empty } = selection;\n                if (!empty || $from.parent.type !== this.type) {\n                    return false;\n                }\n                const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;\n                if (!isAtEnd) {\n                    return false;\n                }\n                const after = $from.after();\n                if (after === undefined) {\n                    return false;\n                }\n                const nodeAfter = doc.nodeAt(after);\n                if (nodeAfter) {\n                    return editor.commands.command(({ tr }) => {\n                        tr.setSelection(Selection.near(doc.resolve(after)));\n                        return true;\n                    });\n                }\n                return editor.commands.exitCode();\n            },\n        };\n    },\n    addInputRules() {\n        return [\n            textblockTypeInputRule({\n                find: backtickInputRegex,\n                type: this.type,\n                getAttributes: match => ({\n                    language: match[1],\n                }),\n            }),\n            textblockTypeInputRule({\n                find: tildeInputRegex,\n                type: this.type,\n                getAttributes: match => ({\n                    language: match[1],\n                }),\n            }),\n        ];\n    },\n    addProseMirrorPlugins() {\n        return [\n            // this plugin creates a code block for pasted content from VS Code\n            // we can also detect the copied code language\n            new Plugin({\n                key: new PluginKey('codeBlockVSCodeHandler'),\n                props: {\n                    handlePaste: (view, event) => {\n                        if (!event.clipboardData) {\n                            return false;\n                        }\n                        // don’t create a new code block within code blocks\n                        if (this.editor.isActive(this.type.name)) {\n                            return false;\n                        }\n                        const text = event.clipboardData.getData('text/plain');\n                        const vscode = event.clipboardData.getData('vscode-editor-data');\n                        const vscodeData = vscode ? JSON.parse(vscode) : undefined;\n                        const language = vscodeData === null || vscodeData === void 0 ? void 0 : vscodeData.mode;\n                        if (!text || !language) {\n                            return false;\n                        }\n                        const { tr, schema } = view.state;\n                        // prepare a text node\n                        // strip carriage return chars from text pasted as code\n                        // see: https://github.com/ProseMirror/prosemirror-view/commit/a50a6bcceb4ce52ac8fcc6162488d8875613aacd\n                        const textNode = schema.text(text.replace(/\\r\\n?/g, '\\n'));\n                        // create a code block with the text node\n                        // replace selection with the code block\n                        tr.replaceSelectionWith(this.type.create({ language }, textNode));\n                        if (tr.selection.$from.parent.type !== this.type) {\n                            // put cursor inside the newly created code block\n                            tr.setSelection(TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))));\n                        }\n                        // store meta information\n                        // this is useful for other plugins that depends on the paste event\n                        // like the paste rule plugin\n                        tr.setMeta('paste', true);\n                        view.dispatch(tr);\n                        return true;\n                    },\n                },\n            }),\n        ];\n    },\n});\n\nexport { CodeBlock, backtickInputRegex, CodeBlock as default, tildeInputRegex };\n//# sourceMappingURL=index.js.map\n","import { mergeAttributes, Node, textblockTypeInputRule } from '@tiptap/core'\nimport {\n  Plugin,\n  PluginKey,\n  Selection,\n  TextSelection,\n} from '@tiptap/pm/state'\n\nexport interface CodeBlockOptions {\n  /**\n   * Adds a prefix to language classes that are applied to code tags.\n   * @default 'language-'\n   */\n  languageClassPrefix: string\n  /**\n   * Define whether the node should be exited on triple enter.\n   * @default true\n   */\n  exitOnTripleEnter: boolean\n  /**\n   * Define whether the node should be exited on arrow down if there is no node after it.\n   * @default true\n   */\n  exitOnArrowDown: boolean\n  /**\n   * The default language.\n   * @default null\n   * @example 'js'\n   */\n  defaultLanguage: string | null | undefined\n  /**\n   * Custom HTML attributes that should be added to the rendered HTML tag.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    codeBlock: {\n      /**\n       * Set a code block\n       * @param attributes Code block attributes\n       * @example editor.commands.setCodeBlock({ language: 'javascript' })\n       */\n      setCodeBlock: (attributes?: { language: string }) => ReturnType\n      /**\n       * Toggle a code block\n       * @param attributes Code block attributes\n       * @example editor.commands.toggleCodeBlock({ language: 'javascript' })\n       */\n      toggleCodeBlock: (attributes?: { language: string }) => ReturnType\n    }\n  }\n}\n\n/**\n * Matches a code block with backticks.\n */\nexport const backtickInputRegex = /^```([a-z]+)?[\\s\\n]$/\n\n/**\n * Matches a code block with tildes.\n */\nexport const tildeInputRegex = /^~~~([a-z]+)?[\\s\\n]$/\n\n/**\n * This extension allows you to create code blocks.\n * @see https://tiptap.dev/api/nodes/code-block\n */\nexport const CodeBlock = Node.create<CodeBlockOptions>({\n  name: 'codeBlock',\n\n  addOptions() {\n    return {\n      languageClassPrefix: 'language-',\n      exitOnTripleEnter: true,\n      exitOnArrowDown: true,\n      defaultLanguage: null,\n      HTMLAttributes: {},\n    }\n  },\n\n  content: 'text*',\n\n  marks: '',\n\n  group: 'block',\n\n  code: true,\n\n  defining: true,\n\n  addAttributes() {\n    return {\n      language: {\n        default: this.options.defaultLanguage,\n        parseHTML: element => {\n          const { languageClassPrefix } = this.options\n          const classNames = [...(element.firstElementChild?.classList || [])]\n          const languages = classNames\n            .filter(className => className.startsWith(languageClassPrefix))\n            .map(className => className.replace(languageClassPrefix, ''))\n          const language = languages[0]\n\n          if (!language) {\n            return null\n          }\n\n          return language\n        },\n        rendered: false,\n      },\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 'pre',\n        preserveWhitespace: 'full',\n      },\n    ]\n  },\n\n  renderHTML({ node, HTMLAttributes }) {\n    return [\n      'pre',\n      mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n      [\n        'code',\n        {\n          class: node.attrs.language\n            ? this.options.languageClassPrefix + node.attrs.language\n            : null,\n        },\n        0,\n      ],\n    ]\n  },\n\n  addCommands() {\n    return {\n      setCodeBlock:\n        attributes => ({ commands }) => {\n          return commands.setNode(this.name, attributes)\n        },\n      toggleCodeBlock:\n        attributes => ({ commands }) => {\n          return commands.toggleNode(this.name, 'paragraph', attributes)\n        },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-Alt-c': () => this.editor.commands.toggleCodeBlock(),\n\n      // remove code block when at start of document or code block is empty\n      Backspace: () => {\n        const { empty, $anchor } = this.editor.state.selection\n        const isAtStart = $anchor.pos === 1\n\n        if (!empty || $anchor.parent.type.name !== this.name) {\n          return false\n        }\n\n        if (isAtStart || !$anchor.parent.textContent.length) {\n          return this.editor.commands.clearNodes()\n        }\n\n        return false\n      },\n\n      // exit node on triple enter\n      Enter: ({ editor }) => {\n        if (!this.options.exitOnTripleEnter) {\n          return false\n        }\n\n        const { state } = editor\n        const { selection } = state\n        const { $from, empty } = selection\n\n        if (!empty || $from.parent.type !== this.type) {\n          return false\n        }\n\n        const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2\n        const endsWithDoubleNewline = $from.parent.textContent.endsWith('\\n\\n')\n\n        if (!isAtEnd || !endsWithDoubleNewline) {\n          return false\n        }\n\n        return editor\n          .chain()\n          .command(({ tr }) => {\n            tr.delete($from.pos - 2, $from.pos)\n\n            return true\n          })\n          .exitCode()\n          .run()\n      },\n\n      // exit node on arrow down\n      ArrowDown: ({ editor }) => {\n        if (!this.options.exitOnArrowDown) {\n          return false\n        }\n\n        const { state } = editor\n        const { selection, doc } = state\n        const { $from, empty } = selection\n\n        if (!empty || $from.parent.type !== this.type) {\n          return false\n        }\n\n        const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2\n\n        if (!isAtEnd) {\n          return false\n        }\n\n        const after = $from.after()\n\n        if (after === undefined) {\n          return false\n        }\n\n        const nodeAfter = doc.nodeAt(after)\n\n        if (nodeAfter) {\n          return editor.commands.command(({ tr }) => {\n            tr.setSelection(Selection.near(doc.resolve(after)))\n            return true\n          })\n        }\n\n        return editor.commands.exitCode()\n      },\n    }\n  },\n\n  addInputRules() {\n    return [\n      textblockTypeInputRule({\n        find: backtickInputRegex,\n        type: this.type,\n        getAttributes: match => ({\n          language: match[1],\n        }),\n      }),\n      textblockTypeInputRule({\n        find: tildeInputRegex,\n        type: this.type,\n        getAttributes: match => ({\n          language: match[1],\n        }),\n      }),\n    ]\n  },\n\n  addProseMirrorPlugins() {\n    return [\n      // this plugin creates a code block for pasted content from VS Code\n      // we can also detect the copied code language\n      new Plugin({\n        key: new PluginKey('codeBlockVSCodeHandler'),\n        props: {\n          handlePaste: (view, event) => {\n            if (!event.clipboardData) {\n              return false\n            }\n\n            // don’t create a new code block within code blocks\n            if (this.editor.isActive(this.type.name)) {\n              return false\n            }\n\n            const text = event.clipboardData.getData('text/plain')\n            const vscode = event.clipboardData.getData('vscode-editor-data')\n            const vscodeData = vscode ? JSON.parse(vscode) : undefined\n            const language = vscodeData?.mode\n\n            if (!text || !language) {\n              return false\n            }\n\n            const { tr, schema } = view.state\n\n            // prepare a text node\n            // strip carriage return chars from text pasted as code\n            // see: https://github.com/ProseMirror/prosemirror-view/commit/a50a6bcceb4ce52ac8fcc6162488d8875613aacd\n            const textNode = schema.text(text.replace(/\\r\\n?/g, '\\n'))\n\n            // create a code block with the text node\n            // replace selection with the code block\n            tr.replaceSelectionWith(this.type.create({ language }, textNode))\n\n            if (tr.selection.$from.parent.type !== this.type) {\n              // put cursor inside the newly created code block\n              tr.setSelection(TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))))\n            }\n\n            // store meta information\n            // this is useful for other plugins that depends on the paste event\n            // like the paste rule plugin\n            tr.setMeta('paste', true)\n\n            view.dispatch(tr)\n\n            return true\n          },\n        },\n      }),\n    ]\n  },\n})\n","import { Node } from '@tiptap/core';\n\n/**\n * The default document node which represents the top level node of the editor.\n * @see https://tiptap.dev/api/nodes/document\n */\nconst Document = Node.create({\n    name: 'doc',\n    topNode: true,\n    content: 'block+',\n});\n\nexport { Document, Document as default };\n//# sourceMappingURL=index.js.map\n","import { Node } from '@tiptap/core'\n\n/**\n * The default document node which represents the top level node of the editor.\n * @see https://tiptap.dev/api/nodes/document\n */\nexport const Document = Node.create({\n  name: 'doc',\n  topNode: true,\n  content: 'block+',\n})\n","import { Extension } from '@tiptap/core';\nimport { dropCursor } from '@tiptap/pm/dropcursor';\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * inbetween nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nconst Dropcursor = Extension.create({\n    name: 'dropCursor',\n    addOptions() {\n        return {\n            color: 'currentColor',\n            width: 1,\n            class: undefined,\n        };\n    },\n    addProseMirrorPlugins() {\n        return [\n            dropCursor(this.options),\n        ];\n    },\n});\n\nexport { Dropcursor, Dropcursor as default };\n//# sourceMappingURL=index.js.map\n","import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n  /**\n   * The color of the drop cursor\n   * @default 'currentColor'\n   * @example 'red'\n   */\n  color: string | undefined,\n\n  /**\n   * The width of the drop cursor\n   * @default 1\n   * @example 2\n  */\n  width: number | undefined,\n\n  /**\n   * The class of the drop cursor\n   * @default undefined\n   * @example 'drop-cursor'\n  */\n  class: string | undefined,\n}\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * inbetween nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nexport const Dropcursor = Extension.create<DropcursorOptions>({\n  name: 'dropCursor',\n\n  addOptions() {\n    return {\n      color: 'currentColor',\n      width: 1,\n      class: undefined,\n    }\n  },\n\n  addProseMirrorPlugins() {\n    return [\n      dropCursor(this.options),\n    ]\n  },\n})\n","// dropcursor/index.ts\nexport * from \"prosemirror-dropcursor\";\n","import { Plugin } from 'prosemirror-state';\nimport { dropPoint } from 'prosemirror-transform';\n\n/**\nCreate a plugin that, when added to a ProseMirror instance,\ncauses a decoration to show up at the drop position when something\nis dragged over the editor.\n\nNodes may add a `disableDropCursor` property to their spec to\ncontrol the showing of a drop cursor inside them. This may be a\nboolean or a function, which will be called with a view and a\nposition, and should return a boolean.\n*/\nfunction dropCursor(options = {}) {\n    return new Plugin({\n        view(editorView) { return new DropCursorView(editorView, options); }\n    });\n}\nclass DropCursorView {\n    constructor(editorView, options) {\n        var _a;\n        this.editorView = editorView;\n        this.cursorPos = null;\n        this.element = null;\n        this.timeout = -1;\n        this.width = (_a = options.width) !== null && _a !== void 0 ? _a : 1;\n        this.color = options.color === false ? undefined : (options.color || \"black\");\n        this.class = options.class;\n        this.handlers = [\"dragover\", \"dragend\", \"drop\", \"dragleave\"].map(name => {\n            let handler = (e) => { this[name](e); };\n            editorView.dom.addEventListener(name, handler);\n            return { name, handler };\n        });\n    }\n    destroy() {\n        this.handlers.forEach(({ name, handler }) => this.editorView.dom.removeEventListener(name, handler));\n    }\n    update(editorView, prevState) {\n        if (this.cursorPos != null && prevState.doc != editorView.state.doc) {\n            if (this.cursorPos > editorView.state.doc.content.size)\n                this.setCursor(null);\n            else\n                this.updateOverlay();\n        }\n    }\n    setCursor(pos) {\n        if (pos == this.cursorPos)\n            return;\n        this.cursorPos = pos;\n        if (pos == null) {\n            this.element.parentNode.removeChild(this.element);\n            this.element = null;\n        }\n        else {\n            this.updateOverlay();\n        }\n    }\n    updateOverlay() {\n        let $pos = this.editorView.state.doc.resolve(this.cursorPos);\n        let isBlock = !$pos.parent.inlineContent, rect;\n        if (isBlock) {\n            let before = $pos.nodeBefore, after = $pos.nodeAfter;\n            if (before || after) {\n                let node = this.editorView.nodeDOM(this.cursorPos - (before ? before.nodeSize : 0));\n                if (node) {\n                    let nodeRect = node.getBoundingClientRect();\n                    let top = before ? nodeRect.bottom : nodeRect.top;\n                    if (before && after)\n                        top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2;\n                    rect = { left: nodeRect.left, right: nodeRect.right, top: top - this.width / 2, bottom: top + this.width / 2 };\n                }\n            }\n        }\n        if (!rect) {\n            let coords = this.editorView.coordsAtPos(this.cursorPos);\n            rect = { left: coords.left - this.width / 2, right: coords.left + this.width / 2, top: coords.top, bottom: coords.bottom };\n        }\n        let parent = this.editorView.dom.offsetParent;\n        if (!this.element) {\n            this.element = parent.appendChild(document.createElement(\"div\"));\n            if (this.class)\n                this.element.className = this.class;\n            this.element.style.cssText = \"position: absolute; z-index: 50; pointer-events: none;\";\n            if (this.color) {\n                this.element.style.backgroundColor = this.color;\n            }\n        }\n        this.element.classList.toggle(\"prosemirror-dropcursor-block\", isBlock);\n        this.element.classList.toggle(\"prosemirror-dropcursor-inline\", !isBlock);\n        let parentLeft, parentTop;\n        if (!parent || parent == document.body && getComputedStyle(parent).position == \"static\") {\n            parentLeft = -pageXOffset;\n            parentTop = -pageYOffset;\n        }\n        else {\n            let rect = parent.getBoundingClientRect();\n            parentLeft = rect.left - parent.scrollLeft;\n            parentTop = rect.top - parent.scrollTop;\n        }\n        this.element.style.left = (rect.left - parentLeft) + \"px\";\n        this.element.style.top = (rect.top - parentTop) + \"px\";\n        this.element.style.width = (rect.right - rect.left) + \"px\";\n        this.element.style.height = (rect.bottom - rect.top) + \"px\";\n    }\n    scheduleRemoval(timeout) {\n        clearTimeout(this.timeout);\n        this.timeout = setTimeout(() => this.setCursor(null), timeout);\n    }\n    dragover(event) {\n        if (!this.editorView.editable)\n            return;\n        let pos = this.editorView.posAtCoords({ left: event.clientX, top: event.clientY });\n        let node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside);\n        let disableDropCursor = node && node.type.spec.disableDropCursor;\n        let disabled = typeof disableDropCursor == \"function\" ? disableDropCursor(this.editorView, pos, event) : disableDropCursor;\n        if (pos && !disabled) {\n            let target = pos.pos;\n            if (this.editorView.dragging && this.editorView.dragging.slice) {\n                let point = dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice);\n                if (point != null)\n                    target = point;\n            }\n            this.setCursor(target);\n            this.scheduleRemoval(5000);\n        }\n    }\n    dragend() {\n        this.scheduleRemoval(20);\n    }\n    drop() {\n        this.scheduleRemoval(20);\n    }\n    dragleave(event) {\n        if (event.target == this.editorView.dom || !this.editorView.dom.contains(event.relatedTarget))\n            this.setCursor(null);\n    }\n}\n\nexport { dropCursor };\n","import { Extension, callOrReturn, getExtensionField } from '@tiptap/core';\nimport { gapCursor } from '@tiptap/pm/gapcursor';\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nconst Gapcursor = Extension.create({\n    name: 'gapCursor',\n    addProseMirrorPlugins() {\n        return [\n            gapCursor(),\n        ];\n    },\n    extendNodeSchema(extension) {\n        var _a;\n        const context = {\n            name: extension.name,\n            options: extension.options,\n            storage: extension.storage,\n        };\n        return {\n            allowGapCursor: (_a = callOrReturn(getExtensionField(extension, 'allowGapCursor', context))) !== null && _a !== void 0 ? _a : null,\n        };\n    },\n});\n\nexport { Gapcursor, Gapcursor as default };\n//# sourceMappingURL=index.js.map\n","import {\n  callOrReturn,\n  Extension,\n  getExtensionField,\n  ParentConfig,\n} from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n  interface NodeConfig<Options, Storage> {\n    /**\n     * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.\n     * @default null\n     */\n    allowGapCursor?:\n      | boolean\n      | null\n      | ((this: {\n        name: string,\n        options: Options,\n        storage: Storage,\n        parent: ParentConfig<NodeConfig<Options>>['allowGapCursor'],\n      }) => boolean | null),\n  }\n}\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nexport const Gapcursor = Extension.create({\n  name: 'gapCursor',\n\n  addProseMirrorPlugins() {\n    return [\n      gapCursor(),\n    ]\n  },\n\n  extendNodeSchema(extension) {\n    const context = {\n      name: extension.name,\n      options: extension.options,\n      storage: extension.storage,\n    }\n\n    return {\n      allowGapCursor: callOrReturn(getExtensionField(extension, 'allowGapCursor', context)) ?? null,\n    }\n  },\n})\n","// gapcursor/index.ts\nexport * from \"prosemirror-gapcursor\";\n","import { keydownHandler } from 'prosemirror-keymap';\nimport { Selection, NodeSelection, TextSelection, Plugin } from 'prosemirror-state';\nimport { Slice, Fragment } from 'prosemirror-model';\nimport { DecorationSet, Decoration } from 'prosemirror-view';\n\n/**\nGap cursor selections are represented using this class. Its\n`$anchor` and `$head` properties both point at the cursor position.\n*/\nclass GapCursor extends Selection {\n    /**\n    Create a gap cursor.\n    */\n    constructor($pos) {\n        super($pos, $pos);\n    }\n    map(doc, mapping) {\n        let $pos = doc.resolve(mapping.map(this.head));\n        return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);\n    }\n    content() { return Slice.empty; }\n    eq(other) {\n        return other instanceof GapCursor && other.head == this.head;\n    }\n    toJSON() {\n        return { type: \"gapcursor\", pos: this.head };\n    }\n    /**\n    @internal\n    */\n    static fromJSON(doc, json) {\n        if (typeof json.pos != \"number\")\n            throw new RangeError(\"Invalid input for GapCursor.fromJSON\");\n        return new GapCursor(doc.resolve(json.pos));\n    }\n    /**\n    @internal\n    */\n    getBookmark() { return new GapBookmark(this.anchor); }\n    /**\n    @internal\n    */\n    static valid($pos) {\n        let parent = $pos.parent;\n        if (parent.isTextblock || !closedBefore($pos) || !closedAfter($pos))\n            return false;\n        let override = parent.type.spec.allowGapCursor;\n        if (override != null)\n            return override;\n        let deflt = parent.contentMatchAt($pos.index()).defaultType;\n        return deflt && deflt.isTextblock;\n    }\n    /**\n    @internal\n    */\n    static findGapCursorFrom($pos, dir, mustMove = false) {\n        search: for (;;) {\n            if (!mustMove && GapCursor.valid($pos))\n                return $pos;\n            let pos = $pos.pos, next = null;\n            // Scan up from this position\n            for (let d = $pos.depth;; d--) {\n                let parent = $pos.node(d);\n                if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {\n                    next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);\n                    break;\n                }\n                else if (d == 0) {\n                    return null;\n                }\n                pos += dir;\n                let $cur = $pos.doc.resolve(pos);\n                if (GapCursor.valid($cur))\n                    return $cur;\n            }\n            // And then down into the next node\n            for (;;) {\n                let inside = dir > 0 ? next.firstChild : next.lastChild;\n                if (!inside) {\n                    if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) {\n                        $pos = $pos.doc.resolve(pos + next.nodeSize * dir);\n                        mustMove = false;\n                        continue search;\n                    }\n                    break;\n                }\n                next = inside;\n                pos += dir;\n                let $cur = $pos.doc.resolve(pos);\n                if (GapCursor.valid($cur))\n                    return $cur;\n            }\n            return null;\n        }\n    }\n}\nGapCursor.prototype.visible = false;\nGapCursor.findFrom = GapCursor.findGapCursorFrom;\nSelection.jsonID(\"gapcursor\", GapCursor);\nclass GapBookmark {\n    constructor(pos) {\n        this.pos = pos;\n    }\n    map(mapping) {\n        return new GapBookmark(mapping.map(this.pos));\n    }\n    resolve(doc) {\n        let $pos = doc.resolve(this.pos);\n        return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);\n    }\n}\nfunction closedBefore($pos) {\n    for (let d = $pos.depth; d >= 0; d--) {\n        let index = $pos.index(d), parent = $pos.node(d);\n        // At the start of this parent, look at next one\n        if (index == 0) {\n            if (parent.type.spec.isolating)\n                return true;\n            continue;\n        }\n        // See if the node before (or its first ancestor) is closed\n        for (let before = parent.child(index - 1);; before = before.lastChild) {\n            if ((before.childCount == 0 && !before.inlineContent) || before.isAtom || before.type.spec.isolating)\n                return true;\n            if (before.inlineContent)\n                return false;\n        }\n    }\n    // Hit start of document\n    return true;\n}\nfunction closedAfter($pos) {\n    for (let d = $pos.depth; d >= 0; d--) {\n        let index = $pos.indexAfter(d), parent = $pos.node(d);\n        if (index == parent.childCount) {\n            if (parent.type.spec.isolating)\n                return true;\n            continue;\n        }\n        for (let after = parent.child(index);; after = after.firstChild) {\n            if ((after.childCount == 0 && !after.inlineContent) || after.isAtom || after.type.spec.isolating)\n                return true;\n            if (after.inlineContent)\n                return false;\n        }\n    }\n    return true;\n}\n\n/**\nCreate a gap cursor plugin. When enabled, this will capture clicks\nnear and arrow-key-motion past places that don't have a normally\nselectable position nearby, and create a gap cursor selection for\nthem. The cursor is drawn as an element with class\n`ProseMirror-gapcursor`. You can either include\n`style/gapcursor.css` from the package's directory or add your own\nstyles to make it visible.\n*/\nfunction gapCursor() {\n    return new Plugin({\n        props: {\n            decorations: drawGapCursor,\n            createSelectionBetween(_view, $anchor, $head) {\n                return $anchor.pos == $head.pos && GapCursor.valid($head) ? new GapCursor($head) : null;\n            },\n            handleClick,\n            handleKeyDown,\n            handleDOMEvents: { beforeinput: beforeinput }\n        }\n    });\n}\nconst handleKeyDown = keydownHandler({\n    \"ArrowLeft\": arrow(\"horiz\", -1),\n    \"ArrowRight\": arrow(\"horiz\", 1),\n    \"ArrowUp\": arrow(\"vert\", -1),\n    \"ArrowDown\": arrow(\"vert\", 1)\n});\nfunction arrow(axis, dir) {\n    const dirStr = axis == \"vert\" ? (dir > 0 ? \"down\" : \"up\") : (dir > 0 ? \"right\" : \"left\");\n    return function (state, dispatch, view) {\n        let sel = state.selection;\n        let $start = dir > 0 ? sel.$to : sel.$from, mustMove = sel.empty;\n        if (sel instanceof TextSelection) {\n            if (!view.endOfTextblock(dirStr) || $start.depth == 0)\n                return false;\n            mustMove = false;\n            $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before());\n        }\n        let $found = GapCursor.findGapCursorFrom($start, dir, mustMove);\n        if (!$found)\n            return false;\n        if (dispatch)\n            dispatch(state.tr.setSelection(new GapCursor($found)));\n        return true;\n    };\n}\nfunction handleClick(view, pos, event) {\n    if (!view || !view.editable)\n        return false;\n    let $pos = view.state.doc.resolve(pos);\n    if (!GapCursor.valid($pos))\n        return false;\n    let clickPos = view.posAtCoords({ left: event.clientX, top: event.clientY });\n    if (clickPos && clickPos.inside > -1 && NodeSelection.isSelectable(view.state.doc.nodeAt(clickPos.inside)))\n        return false;\n    view.dispatch(view.state.tr.setSelection(new GapCursor($pos)));\n    return true;\n}\n// This is a hack that, when a composition starts while a gap cursor\n// is active, quickly creates an inline context for the composition to\n// happen in, to avoid it being aborted by the DOM selection being\n// moved into a valid position.\nfunction beforeinput(view, event) {\n    if (event.inputType != \"insertCompositionText\" || !(view.state.selection instanceof GapCursor))\n        return false;\n    let { $from } = view.state.selection;\n    let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);\n    if (!insert)\n        return false;\n    let frag = Fragment.empty;\n    for (let i = insert.length - 1; i >= 0; i--)\n        frag = Fragment.from(insert[i].createAndFill(null, frag));\n    let tr = view.state.tr.replace($from.pos, $from.pos, new Slice(frag, 0, 0));\n    tr.setSelection(TextSelection.near(tr.doc.resolve($from.pos + 1)));\n    view.dispatch(tr);\n    return false;\n}\nfunction drawGapCursor(state) {\n    if (!(state.selection instanceof GapCursor))\n        return null;\n    let node = document.createElement(\"div\");\n    node.className = \"ProseMirror-gapcursor\";\n    return DecorationSet.create(state.doc, [Decoration.widget(state.selection.head, node, { key: \"gapcursor\" })]);\n}\n\nexport { GapCursor, gapCursor };\n","import { Node, mergeAttributes } from '@tiptap/core';\n\n/**\n * This extension allows you to insert hard breaks.\n * @see https://www.tiptap.dev/api/nodes/hard-break\n */\nconst HardBreak = Node.create({\n    name: 'hardBreak',\n    addOptions() {\n        return {\n            keepMarks: true,\n            HTMLAttributes: {},\n        };\n    },\n    inline: true,\n    group: 'inline',\n    selectable: false,\n    linebreakReplacement: true,\n    parseHTML() {\n        return [\n            { tag: 'br' },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['br', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n    },\n    renderText() {\n        return '\\n';\n    },\n    addCommands() {\n        return {\n            setHardBreak: () => ({ commands, chain, state, editor, }) => {\n                return commands.first([\n                    () => commands.exitCode(),\n                    () => commands.command(() => {\n                        const { selection, storedMarks } = state;\n                        if (selection.$from.parent.type.spec.isolating) {\n                            return false;\n                        }\n                        const { keepMarks } = this.options;\n                        const { splittableMarks } = editor.extensionManager;\n                        const marks = storedMarks\n                            || (selection.$to.parentOffset && selection.$from.marks());\n                        return chain()\n                            .insertContent({ type: this.name })\n                            .command(({ tr, dispatch }) => {\n                            if (dispatch && marks && keepMarks) {\n                                const filteredMarks = marks\n                                    .filter(mark => splittableMarks.includes(mark.type.name));\n                                tr.ensureMarks(filteredMarks);\n                            }\n                            return true;\n                        })\n                            .run();\n                    }),\n                ]);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-Enter': () => this.editor.commands.setHardBreak(),\n            'Shift-Enter': () => this.editor.commands.setHardBreak(),\n        };\n    },\n});\n\nexport { HardBreak, HardBreak as default };\n//# sourceMappingURL=index.js.map\n","import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface HardBreakOptions {\n  /**\n   * Controls if marks should be kept after being split by a hard break.\n   * @default true\n   * @example false\n   */\n  keepMarks: boolean,\n\n  /**\n   * HTML attributes to add to the hard break element.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    hardBreak: {\n      /**\n       * Add a hard break\n       * @example editor.commands.setHardBreak()\n       */\n      setHardBreak: () => ReturnType,\n    }\n  }\n}\n\n/**\n * This extension allows you to insert hard breaks.\n * @see https://www.tiptap.dev/api/nodes/hard-break\n */\nexport const HardBreak = Node.create<HardBreakOptions>({\n  name: 'hardBreak',\n\n  addOptions() {\n    return {\n      keepMarks: true,\n      HTMLAttributes: {},\n    }\n  },\n\n  inline: true,\n\n  group: 'inline',\n\n  selectable: false,\n\n  linebreakReplacement: true,\n\n  parseHTML() {\n    return [\n      { tag: 'br' },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['br', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]\n  },\n\n  renderText() {\n    return '\\n'\n  },\n\n  addCommands() {\n    return {\n      setHardBreak: () => ({\n        commands,\n        chain,\n        state,\n        editor,\n      }) => {\n        return commands.first([\n          () => commands.exitCode(),\n          () => commands.command(() => {\n            const { selection, storedMarks } = state\n\n            if (selection.$from.parent.type.spec.isolating) {\n              return false\n            }\n\n            const { keepMarks } = this.options\n            const { splittableMarks } = editor.extensionManager\n            const marks = storedMarks\n              || (selection.$to.parentOffset && selection.$from.marks())\n\n            return chain()\n              .insertContent({ type: this.name })\n              .command(({ tr, dispatch }) => {\n                if (dispatch && marks && keepMarks) {\n                  const filteredMarks = marks\n                    .filter(mark => splittableMarks.includes(mark.type.name))\n\n                  tr.ensureMarks(filteredMarks)\n                }\n\n                return true\n              })\n              .run()\n          }),\n        ])\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-Enter': () => this.editor.commands.setHardBreak(),\n      'Shift-Enter': () => this.editor.commands.setHardBreak(),\n    }\n  },\n})\n","import { Node, mergeAttributes, textblockTypeInputRule } from '@tiptap/core';\n\n/**\n * This extension allows you to create headings.\n * @see https://www.tiptap.dev/api/nodes/heading\n */\nconst Heading = Node.create({\n    name: 'heading',\n    addOptions() {\n        return {\n            levels: [1, 2, 3, 4, 5, 6],\n            HTMLAttributes: {},\n        };\n    },\n    content: 'inline*',\n    group: 'block',\n    defining: true,\n    addAttributes() {\n        return {\n            level: {\n                default: 1,\n                rendered: false,\n            },\n        };\n    },\n    parseHTML() {\n        return this.options.levels\n            .map((level) => ({\n            tag: `h${level}`,\n            attrs: { level },\n        }));\n    },\n    renderHTML({ node, HTMLAttributes }) {\n        const hasLevel = this.options.levels.includes(node.attrs.level);\n        const level = hasLevel\n            ? node.attrs.level\n            : this.options.levels[0];\n        return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            setHeading: attributes => ({ commands }) => {\n                if (!this.options.levels.includes(attributes.level)) {\n                    return false;\n                }\n                return commands.setNode(this.name, attributes);\n            },\n            toggleHeading: attributes => ({ commands }) => {\n                if (!this.options.levels.includes(attributes.level)) {\n                    return false;\n                }\n                return commands.toggleNode(this.name, 'paragraph', attributes);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return this.options.levels.reduce((items, level) => ({\n            ...items,\n            ...{\n                [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level }),\n            },\n        }), {});\n    },\n    addInputRules() {\n        return this.options.levels.map(level => {\n            return textblockTypeInputRule({\n                find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\\\s$`),\n                type: this.type,\n                getAttributes: {\n                    level,\n                },\n            });\n        });\n    },\n});\n\nexport { Heading, Heading as default };\n//# sourceMappingURL=index.js.map\n","import { mergeAttributes, Node, textblockTypeInputRule } from '@tiptap/core'\n\n/**\n * The heading level options.\n */\nexport type Level = 1 | 2 | 3 | 4 | 5 | 6\n\nexport interface HeadingOptions {\n  /**\n   * The available heading levels.\n   * @default [1, 2, 3, 4, 5, 6]\n   * @example [1, 2, 3]\n   */\n  levels: Level[],\n\n  /**\n   * The HTML attributes for a heading node.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    heading: {\n      /**\n       * Set a heading node\n       * @param attributes The heading attributes\n       * @example editor.commands.setHeading({ level: 1 })\n       */\n      setHeading: (attributes: { level: Level }) => ReturnType,\n      /**\n       * Toggle a heading node\n       * @param attributes The heading attributes\n       * @example editor.commands.toggleHeading({ level: 1 })\n       */\n      toggleHeading: (attributes: { level: Level }) => ReturnType,\n    }\n  }\n}\n\n/**\n * This extension allows you to create headings.\n * @see https://www.tiptap.dev/api/nodes/heading\n */\nexport const Heading = Node.create<HeadingOptions>({\n  name: 'heading',\n\n  addOptions() {\n    return {\n      levels: [1, 2, 3, 4, 5, 6],\n      HTMLAttributes: {},\n    }\n  },\n\n  content: 'inline*',\n\n  group: 'block',\n\n  defining: true,\n\n  addAttributes() {\n    return {\n      level: {\n        default: 1,\n        rendered: false,\n      },\n    }\n  },\n\n  parseHTML() {\n    return this.options.levels\n      .map((level: Level) => ({\n        tag: `h${level}`,\n        attrs: { level },\n      }))\n  },\n\n  renderHTML({ node, HTMLAttributes }) {\n    const hasLevel = this.options.levels.includes(node.attrs.level)\n    const level = hasLevel\n      ? node.attrs.level\n      : this.options.levels[0]\n\n    return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setHeading: attributes => ({ commands }) => {\n        if (!this.options.levels.includes(attributes.level)) {\n          return false\n        }\n\n        return commands.setNode(this.name, attributes)\n      },\n      toggleHeading: attributes => ({ commands }) => {\n        if (!this.options.levels.includes(attributes.level)) {\n          return false\n        }\n\n        return commands.toggleNode(this.name, 'paragraph', attributes)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return this.options.levels.reduce((items, level) => ({\n      ...items,\n      ...{\n        [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level }),\n      },\n    }), {})\n  },\n\n  addInputRules() {\n    return this.options.levels.map(level => {\n      return textblockTypeInputRule({\n        find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\\\s$`),\n        type: this.type,\n        getAttributes: {\n          level,\n        },\n      })\n    })\n  },\n})\n","import { Extension } from '@tiptap/core';\nimport { undo, redo, history } from '@tiptap/pm/history';\n\n/**\n * This extension allows you to undo and redo recent changes.\n * @see https://www.tiptap.dev/api/extensions/history\n *\n * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n * the `history` extension, as it is not compatible with the `collaboration` extension.\n *\n * `@tiptap/extension-collaboration` uses its own history implementation.\n */\nconst History = Extension.create({\n    name: 'history',\n    addOptions() {\n        return {\n            depth: 100,\n            newGroupDelay: 500,\n        };\n    },\n    addCommands() {\n        return {\n            undo: () => ({ state, dispatch }) => {\n                return undo(state, dispatch);\n            },\n            redo: () => ({ state, dispatch }) => {\n                return redo(state, dispatch);\n            },\n        };\n    },\n    addProseMirrorPlugins() {\n        return [\n            history(this.options),\n        ];\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-z': () => this.editor.commands.undo(),\n            'Shift-Mod-z': () => this.editor.commands.redo(),\n            'Mod-y': () => this.editor.commands.redo(),\n            // Russian keyboard layouts\n            'Mod-я': () => this.editor.commands.undo(),\n            'Shift-Mod-я': () => this.editor.commands.redo(),\n        };\n    },\n});\n\nexport { History, History as default };\n//# sourceMappingURL=index.js.map\n","import { Extension } from '@tiptap/core'\nimport { history, redo, undo } from '@tiptap/pm/history'\n\nexport interface HistoryOptions {\n  /**\n   * The amount of history events that are collected before the oldest events are discarded.\n   * @default 100\n   * @example 50\n   */\n  depth: number,\n\n  /**\n   * The delay (in milliseconds) between changes after which a new group should be started.\n   * @default 500\n   * @example 1000\n   */\n  newGroupDelay: number,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    history: {\n      /**\n       * Undo recent changes\n       * @example editor.commands.undo()\n       */\n      undo: () => ReturnType,\n      /**\n       * Reapply reverted changes\n       * @example editor.commands.redo()\n       */\n      redo: () => ReturnType,\n    }\n  }\n}\n\n/**\n * This extension allows you to undo and redo recent changes.\n * @see https://www.tiptap.dev/api/extensions/history\n *\n * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n * the `history` extension, as it is not compatible with the `collaboration` extension.\n *\n * `@tiptap/extension-collaboration` uses its own history implementation.\n */\nexport const History = Extension.create<HistoryOptions>({\n  name: 'history',\n\n  addOptions() {\n    return {\n      depth: 100,\n      newGroupDelay: 500,\n    }\n  },\n\n  addCommands() {\n    return {\n      undo: () => ({ state, dispatch }) => {\n        return undo(state, dispatch)\n      },\n      redo: () => ({ state, dispatch }) => {\n        return redo(state, dispatch)\n      },\n    }\n  },\n\n  addProseMirrorPlugins() {\n    return [\n      history(this.options),\n    ]\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-z': () => this.editor.commands.undo(),\n      'Shift-Mod-z': () => this.editor.commands.redo(),\n      'Mod-y': () => this.editor.commands.redo(),\n\n      // Russian keyboard layouts\n      'Mod-я': () => this.editor.commands.undo(),\n      'Shift-Mod-я': () => this.editor.commands.redo(),\n    }\n  },\n})\n","// history/index.ts\nexport * from \"prosemirror-history\";\n","import RopeSequence from 'rope-sequence';\nimport { Mapping } from 'prosemirror-transform';\nimport { PluginKey, Plugin } from 'prosemirror-state';\n\n// ProseMirror's history isn't simply a way to roll back to a previous\n// state, because ProseMirror supports applying changes without adding\n// them to the history (for example during collaboration).\n//\n// To this end, each 'Branch' (one for the undo history and one for\n// the redo history) keeps an array of 'Items', which can optionally\n// hold a step (an actual undoable change), and always hold a position\n// map (which is needed to move changes below them to apply to the\n// current document).\n//\n// An item that has both a step and a selection bookmark is the start\n// of an 'event' — a group of changes that will be undone or redone at\n// once. (It stores only the bookmark, since that way we don't have to\n// provide a document until the selection is actually applied, which\n// is useful when compressing.)\n// Used to schedule history compression\nconst max_empty_items = 500;\nclass Branch {\n    constructor(items, eventCount) {\n        this.items = items;\n        this.eventCount = eventCount;\n    }\n    // Pop the latest event off the branch's history and apply it\n    // to a document transform.\n    popEvent(state, preserveItems) {\n        if (this.eventCount == 0)\n            return null;\n        let end = this.items.length;\n        for (;; end--) {\n            let next = this.items.get(end - 1);\n            if (next.selection) {\n                --end;\n                break;\n            }\n        }\n        let remap, mapFrom;\n        if (preserveItems) {\n            remap = this.remapping(end, this.items.length);\n            mapFrom = remap.maps.length;\n        }\n        let transform = state.tr;\n        let selection, remaining;\n        let addAfter = [], addBefore = [];\n        this.items.forEach((item, i) => {\n            if (!item.step) {\n                if (!remap) {\n                    remap = this.remapping(end, i + 1);\n                    mapFrom = remap.maps.length;\n                }\n                mapFrom--;\n                addBefore.push(item);\n                return;\n            }\n            if (remap) {\n                addBefore.push(new Item(item.map));\n                let step = item.step.map(remap.slice(mapFrom)), map;\n                if (step && transform.maybeStep(step).doc) {\n                    map = transform.mapping.maps[transform.mapping.maps.length - 1];\n                    addAfter.push(new Item(map, undefined, undefined, addAfter.length + addBefore.length));\n                }\n                mapFrom--;\n                if (map)\n                    remap.appendMap(map, mapFrom);\n            }\n            else {\n                transform.maybeStep(item.step);\n            }\n            if (item.selection) {\n                selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection;\n                remaining = new Branch(this.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this.eventCount - 1);\n                return false;\n            }\n        }, this.items.length, 0);\n        return { remaining: remaining, transform, selection: selection };\n    }\n    // Create a new branch with the given transform added.\n    addTransform(transform, selection, histOptions, preserveItems) {\n        let newItems = [], eventCount = this.eventCount;\n        let oldItems = this.items, lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null;\n        for (let i = 0; i < transform.steps.length; i++) {\n            let step = transform.steps[i].invert(transform.docs[i]);\n            let item = new Item(transform.mapping.maps[i], step, selection), merged;\n            if (merged = lastItem && lastItem.merge(item)) {\n                item = merged;\n                if (i)\n                    newItems.pop();\n                else\n                    oldItems = oldItems.slice(0, oldItems.length - 1);\n            }\n            newItems.push(item);\n            if (selection) {\n                eventCount++;\n                selection = undefined;\n            }\n            if (!preserveItems)\n                lastItem = item;\n        }\n        let overflow = eventCount - histOptions.depth;\n        if (overflow > DEPTH_OVERFLOW) {\n            oldItems = cutOffEvents(oldItems, overflow);\n            eventCount -= overflow;\n        }\n        return new Branch(oldItems.append(newItems), eventCount);\n    }\n    remapping(from, to) {\n        let maps = new Mapping;\n        this.items.forEach((item, i) => {\n            let mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from\n                ? maps.maps.length - item.mirrorOffset : undefined;\n            maps.appendMap(item.map, mirrorPos);\n        }, from, to);\n        return maps;\n    }\n    addMaps(array) {\n        if (this.eventCount == 0)\n            return this;\n        return new Branch(this.items.append(array.map(map => new Item(map))), this.eventCount);\n    }\n    // When the collab module receives remote changes, the history has\n    // to know about those, so that it can adjust the steps that were\n    // rebased on top of the remote changes, and include the position\n    // maps for the remote changes in its array of items.\n    rebased(rebasedTransform, rebasedCount) {\n        if (!this.eventCount)\n            return this;\n        let rebasedItems = [], start = Math.max(0, this.items.length - rebasedCount);\n        let mapping = rebasedTransform.mapping;\n        let newUntil = rebasedTransform.steps.length;\n        let eventCount = this.eventCount;\n        this.items.forEach(item => { if (item.selection)\n            eventCount--; }, start);\n        let iRebased = rebasedCount;\n        this.items.forEach(item => {\n            let pos = mapping.getMirror(--iRebased);\n            if (pos == null)\n                return;\n            newUntil = Math.min(newUntil, pos);\n            let map = mapping.maps[pos];\n            if (item.step) {\n                let step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]);\n                let selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos));\n                if (selection)\n                    eventCount++;\n                rebasedItems.push(new Item(map, step, selection));\n            }\n            else {\n                rebasedItems.push(new Item(map));\n            }\n        }, start);\n        let newMaps = [];\n        for (let i = rebasedCount; i < newUntil; i++)\n            newMaps.push(new Item(mapping.maps[i]));\n        let items = this.items.slice(0, start).append(newMaps).append(rebasedItems);\n        let branch = new Branch(items, eventCount);\n        if (branch.emptyItemCount() > max_empty_items)\n            branch = branch.compress(this.items.length - rebasedItems.length);\n        return branch;\n    }\n    emptyItemCount() {\n        let count = 0;\n        this.items.forEach(item => { if (!item.step)\n            count++; });\n        return count;\n    }\n    // Compressing a branch means rewriting it to push the air (map-only\n    // items) out. During collaboration, these naturally accumulate\n    // because each remote change adds one. The `upto` argument is used\n    // to ensure that only the items below a given level are compressed,\n    // because `rebased` relies on a clean, untouched set of items in\n    // order to associate old items with rebased steps.\n    compress(upto = this.items.length) {\n        let remap = this.remapping(0, upto), mapFrom = remap.maps.length;\n        let items = [], events = 0;\n        this.items.forEach((item, i) => {\n            if (i >= upto) {\n                items.push(item);\n                if (item.selection)\n                    events++;\n            }\n            else if (item.step) {\n                let step = item.step.map(remap.slice(mapFrom)), map = step && step.getMap();\n                mapFrom--;\n                if (map)\n                    remap.appendMap(map, mapFrom);\n                if (step) {\n                    let selection = item.selection && item.selection.map(remap.slice(mapFrom));\n                    if (selection)\n                        events++;\n                    let newItem = new Item(map.invert(), step, selection), merged, last = items.length - 1;\n                    if (merged = items.length && items[last].merge(newItem))\n                        items[last] = merged;\n                    else\n                        items.push(newItem);\n                }\n            }\n            else if (item.map) {\n                mapFrom--;\n            }\n        }, this.items.length, 0);\n        return new Branch(RopeSequence.from(items.reverse()), events);\n    }\n}\nBranch.empty = new Branch(RopeSequence.empty, 0);\nfunction cutOffEvents(items, n) {\n    let cutPoint;\n    items.forEach((item, i) => {\n        if (item.selection && (n-- == 0)) {\n            cutPoint = i;\n            return false;\n        }\n    });\n    return items.slice(cutPoint);\n}\nclass Item {\n    constructor(\n    // The (forward) step map for this item.\n    map, \n    // The inverted step\n    step, \n    // If this is non-null, this item is the start of a group, and\n    // this selection is the starting selection for the group (the one\n    // that was active before the first step was applied)\n    selection, \n    // If this item is the inverse of a previous mapping on the stack,\n    // this points at the inverse's offset\n    mirrorOffset) {\n        this.map = map;\n        this.step = step;\n        this.selection = selection;\n        this.mirrorOffset = mirrorOffset;\n    }\n    merge(other) {\n        if (this.step && other.step && !other.selection) {\n            let step = other.step.merge(this.step);\n            if (step)\n                return new Item(step.getMap().invert(), step, this.selection);\n        }\n    }\n}\n// The value of the state field that tracks undo/redo history for that\n// state. Will be stored in the plugin state when the history plugin\n// is active.\nclass HistoryState {\n    constructor(done, undone, prevRanges, prevTime, prevComposition) {\n        this.done = done;\n        this.undone = undone;\n        this.prevRanges = prevRanges;\n        this.prevTime = prevTime;\n        this.prevComposition = prevComposition;\n    }\n}\nconst DEPTH_OVERFLOW = 20;\n// Record a transformation in undo history.\nfunction applyTransaction(history, state, tr, options) {\n    let historyTr = tr.getMeta(historyKey), rebased;\n    if (historyTr)\n        return historyTr.historyState;\n    if (tr.getMeta(closeHistoryKey))\n        history = new HistoryState(history.done, history.undone, null, 0, -1);\n    let appended = tr.getMeta(\"appendedTransaction\");\n    if (tr.steps.length == 0) {\n        return history;\n    }\n    else if (appended && appended.getMeta(historyKey)) {\n        if (appended.getMeta(historyKey).redo)\n            return new HistoryState(history.done.addTransform(tr, undefined, options, mustPreserveItems(state)), history.undone, rangesFor(tr.mapping.maps), history.prevTime, history.prevComposition);\n        else\n            return new HistoryState(history.done, history.undone.addTransform(tr, undefined, options, mustPreserveItems(state)), null, history.prevTime, history.prevComposition);\n    }\n    else if (tr.getMeta(\"addToHistory\") !== false && !(appended && appended.getMeta(\"addToHistory\") === false)) {\n        // Group transforms that occur in quick succession into one event.\n        let composition = tr.getMeta(\"composition\");\n        let newGroup = history.prevTime == 0 ||\n            (!appended && history.prevComposition != composition &&\n                (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges)));\n        let prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps);\n        return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : undefined, options, mustPreserveItems(state)), Branch.empty, prevRanges, tr.time, composition == null ? history.prevComposition : composition);\n    }\n    else if (rebased = tr.getMeta(\"rebased\")) {\n        // Used by the collab module to tell the history that some of its\n        // content has been rebased.\n        return new HistoryState(history.done.rebased(tr, rebased), history.undone.rebased(tr, rebased), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition);\n    }\n    else {\n        return new HistoryState(history.done.addMaps(tr.mapping.maps), history.undone.addMaps(tr.mapping.maps), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition);\n    }\n}\nfunction isAdjacentTo(transform, prevRanges) {\n    if (!prevRanges)\n        return false;\n    if (!transform.docChanged)\n        return true;\n    let adjacent = false;\n    transform.mapping.maps[0].forEach((start, end) => {\n        for (let i = 0; i < prevRanges.length; i += 2)\n            if (start <= prevRanges[i + 1] && end >= prevRanges[i])\n                adjacent = true;\n    });\n    return adjacent;\n}\nfunction rangesFor(maps) {\n    let result = [];\n    for (let i = maps.length - 1; i >= 0 && result.length == 0; i--)\n        maps[i].forEach((_from, _to, from, to) => result.push(from, to));\n    return result;\n}\nfunction mapRanges(ranges, mapping) {\n    if (!ranges)\n        return null;\n    let result = [];\n    for (let i = 0; i < ranges.length; i += 2) {\n        let from = mapping.map(ranges[i], 1), to = mapping.map(ranges[i + 1], -1);\n        if (from <= to)\n            result.push(from, to);\n    }\n    return result;\n}\n// Apply the latest event from one branch to the document and shift the event\n// onto the other branch.\nfunction histTransaction(history, state, redo) {\n    let preserveItems = mustPreserveItems(state);\n    let histOptions = historyKey.get(state).spec.config;\n    let pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);\n    if (!pop)\n        return null;\n    let selection = pop.selection.resolve(pop.transform.doc);\n    let added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems);\n    let newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0, -1);\n    return pop.transform.setSelection(selection).setMeta(historyKey, { redo, historyState: newHist });\n}\nlet cachedPreserveItems = false, cachedPreserveItemsPlugins = null;\n// Check whether any plugin in the given state has a\n// `historyPreserveItems` property in its spec, in which case we must\n// preserve steps exactly as they came in, so that they can be\n// rebased.\nfunction mustPreserveItems(state) {\n    let plugins = state.plugins;\n    if (cachedPreserveItemsPlugins != plugins) {\n        cachedPreserveItems = false;\n        cachedPreserveItemsPlugins = plugins;\n        for (let i = 0; i < plugins.length; i++)\n            if (plugins[i].spec.historyPreserveItems) {\n                cachedPreserveItems = true;\n                break;\n            }\n    }\n    return cachedPreserveItems;\n}\n/**\nSet a flag on the given transaction that will prevent further steps\nfrom being appended to an existing history event (so that they\nrequire a separate undo command to undo).\n*/\nfunction closeHistory(tr) {\n    return tr.setMeta(closeHistoryKey, true);\n}\nconst historyKey = new PluginKey(\"history\");\nconst closeHistoryKey = new PluginKey(\"closeHistory\");\n/**\nReturns a plugin that enables the undo history for an editor. The\nplugin will track undo and redo stacks, which can be used with the\n[`undo`](https://prosemirror.net/docs/ref/#history.undo) and [`redo`](https://prosemirror.net/docs/ref/#history.redo) commands.\n\nYou can set an `\"addToHistory\"` [metadata\nproperty](https://prosemirror.net/docs/ref/#state.Transaction.setMeta) of `false` on a transaction\nto prevent it from being rolled back by undo.\n*/\nfunction history(config = {}) {\n    config = { depth: config.depth || 100,\n        newGroupDelay: config.newGroupDelay || 500 };\n    return new Plugin({\n        key: historyKey,\n        state: {\n            init() {\n                return new HistoryState(Branch.empty, Branch.empty, null, 0, -1);\n            },\n            apply(tr, hist, state) {\n                return applyTransaction(hist, state, tr, config);\n            }\n        },\n        config,\n        props: {\n            handleDOMEvents: {\n                beforeinput(view, e) {\n                    let inputType = e.inputType;\n                    let command = inputType == \"historyUndo\" ? undo : inputType == \"historyRedo\" ? redo : null;\n                    if (!command)\n                        return false;\n                    e.preventDefault();\n                    return command(view.state, view.dispatch);\n                }\n            }\n        }\n    });\n}\nfunction buildCommand(redo, scroll) {\n    return (state, dispatch) => {\n        let hist = historyKey.getState(state);\n        if (!hist || (redo ? hist.undone : hist.done).eventCount == 0)\n            return false;\n        if (dispatch) {\n            let tr = histTransaction(hist, state, redo);\n            if (tr)\n                dispatch(scroll ? tr.scrollIntoView() : tr);\n        }\n        return true;\n    };\n}\n/**\nA command function that undoes the last change, if any.\n*/\nconst undo = buildCommand(false, true);\n/**\nA command function that redoes the last undone change, if any.\n*/\nconst redo = buildCommand(true, true);\n/**\nA command function that undoes the last change. Don't scroll the\nselection into view.\n*/\nconst undoNoScroll = buildCommand(false, false);\n/**\nA command function that redoes the last undone change. Don't\nscroll the selection into view.\n*/\nconst redoNoScroll = buildCommand(true, false);\n/**\nThe amount of undoable events available in a given state.\n*/\nfunction undoDepth(state) {\n    let hist = historyKey.getState(state);\n    return hist ? hist.done.eventCount : 0;\n}\n/**\nThe amount of redoable events available in a given editor state.\n*/\nfunction redoDepth(state) {\n    let hist = historyKey.getState(state);\n    return hist ? hist.undone.eventCount : 0;\n}\n\nexport { closeHistory, history, redo, redoDepth, redoNoScroll, undo, undoDepth, undoNoScroll };\n","var GOOD_LEAF_SIZE = 200;\n\n// :: class<T> A rope sequence is a persistent sequence data structure\n// that supports appending, prepending, and slicing without doing a\n// full copy. It is represented as a mostly-balanced tree.\nvar RopeSequence = function RopeSequence () {};\n\nRopeSequence.prototype.append = function append (other) {\n  if (!other.length) { return this }\n  other = RopeSequence.from(other);\n\n  return (!this.length && other) ||\n    (other.length < GOOD_LEAF_SIZE && this.leafAppend(other)) ||\n    (this.length < GOOD_LEAF_SIZE && other.leafPrepend(this)) ||\n    this.appendInner(other)\n};\n\n// :: (union<[T], RopeSequence<T>>) → RopeSequence<T>\n// Prepend an array or other rope to this one, returning a new rope.\nRopeSequence.prototype.prepend = function prepend (other) {\n  if (!other.length) { return this }\n  return RopeSequence.from(other).append(this)\n};\n\nRopeSequence.prototype.appendInner = function appendInner (other) {\n  return new Append(this, other)\n};\n\n// :: (?number, ?number) → RopeSequence<T>\n// Create a rope repesenting a sub-sequence of this rope.\nRopeSequence.prototype.slice = function slice (from, to) {\n    if ( from === void 0 ) from = 0;\n    if ( to === void 0 ) to = this.length;\n\n  if (from >= to) { return RopeSequence.empty }\n  return this.sliceInner(Math.max(0, from), Math.min(this.length, to))\n};\n\n// :: (number) → T\n// Retrieve the element at the given position from this rope.\nRopeSequence.prototype.get = function get (i) {\n  if (i < 0 || i >= this.length) { return undefined }\n  return this.getInner(i)\n};\n\n// :: ((element: T, index: number) → ?bool, ?number, ?number)\n// Call the given function for each element between the given\n// indices. This tends to be more efficient than looping over the\n// indices and calling `get`, because it doesn't have to descend the\n// tree for every element.\nRopeSequence.prototype.forEach = function forEach (f, from, to) {\n    if ( from === void 0 ) from = 0;\n    if ( to === void 0 ) to = this.length;\n\n  if (from <= to)\n    { this.forEachInner(f, from, to, 0); }\n  else\n    { this.forEachInvertedInner(f, from, to, 0); }\n};\n\n// :: ((element: T, index: number) → U, ?number, ?number) → [U]\n// Map the given functions over the elements of the rope, producing\n// a flat array.\nRopeSequence.prototype.map = function map (f, from, to) {\n    if ( from === void 0 ) from = 0;\n    if ( to === void 0 ) to = this.length;\n\n  var result = [];\n  this.forEach(function (elt, i) { return result.push(f(elt, i)); }, from, to);\n  return result\n};\n\n// :: (?union<[T], RopeSequence<T>>) → RopeSequence<T>\n// Create a rope representing the given array, or return the rope\n// itself if a rope was given.\nRopeSequence.from = function from (values) {\n  if (values instanceof RopeSequence) { return values }\n  return values && values.length ? new Leaf(values) : RopeSequence.empty\n};\n\nvar Leaf = /*@__PURE__*/(function (RopeSequence) {\n  function Leaf(values) {\n    RopeSequence.call(this);\n    this.values = values;\n  }\n\n  if ( RopeSequence ) Leaf.__proto__ = RopeSequence;\n  Leaf.prototype = Object.create( RopeSequence && RopeSequence.prototype );\n  Leaf.prototype.constructor = Leaf;\n\n  var prototypeAccessors = { length: { configurable: true },depth: { configurable: true } };\n\n  Leaf.prototype.flatten = function flatten () {\n    return this.values\n  };\n\n  Leaf.prototype.sliceInner = function sliceInner (from, to) {\n    if (from == 0 && to == this.length) { return this }\n    return new Leaf(this.values.slice(from, to))\n  };\n\n  Leaf.prototype.getInner = function getInner (i) {\n    return this.values[i]\n  };\n\n  Leaf.prototype.forEachInner = function forEachInner (f, from, to, start) {\n    for (var i = from; i < to; i++)\n      { if (f(this.values[i], start + i) === false) { return false } }\n  };\n\n  Leaf.prototype.forEachInvertedInner = function forEachInvertedInner (f, from, to, start) {\n    for (var i = from - 1; i >= to; i--)\n      { if (f(this.values[i], start + i) === false) { return false } }\n  };\n\n  Leaf.prototype.leafAppend = function leafAppend (other) {\n    if (this.length + other.length <= GOOD_LEAF_SIZE)\n      { return new Leaf(this.values.concat(other.flatten())) }\n  };\n\n  Leaf.prototype.leafPrepend = function leafPrepend (other) {\n    if (this.length + other.length <= GOOD_LEAF_SIZE)\n      { return new Leaf(other.flatten().concat(this.values)) }\n  };\n\n  prototypeAccessors.length.get = function () { return this.values.length };\n\n  prototypeAccessors.depth.get = function () { return 0 };\n\n  Object.defineProperties( Leaf.prototype, prototypeAccessors );\n\n  return Leaf;\n}(RopeSequence));\n\n// :: RopeSequence\n// The empty rope sequence.\nRopeSequence.empty = new Leaf([]);\n\nvar Append = /*@__PURE__*/(function (RopeSequence) {\n  function Append(left, right) {\n    RopeSequence.call(this);\n    this.left = left;\n    this.right = right;\n    this.length = left.length + right.length;\n    this.depth = Math.max(left.depth, right.depth) + 1;\n  }\n\n  if ( RopeSequence ) Append.__proto__ = RopeSequence;\n  Append.prototype = Object.create( RopeSequence && RopeSequence.prototype );\n  Append.prototype.constructor = Append;\n\n  Append.prototype.flatten = function flatten () {\n    return this.left.flatten().concat(this.right.flatten())\n  };\n\n  Append.prototype.getInner = function getInner (i) {\n    return i < this.left.length ? this.left.get(i) : this.right.get(i - this.left.length)\n  };\n\n  Append.prototype.forEachInner = function forEachInner (f, from, to, start) {\n    var leftLen = this.left.length;\n    if (from < leftLen &&\n        this.left.forEachInner(f, from, Math.min(to, leftLen), start) === false)\n      { return false }\n    if (to > leftLen &&\n        this.right.forEachInner(f, Math.max(from - leftLen, 0), Math.min(this.length, to) - leftLen, start + leftLen) === false)\n      { return false }\n  };\n\n  Append.prototype.forEachInvertedInner = function forEachInvertedInner (f, from, to, start) {\n    var leftLen = this.left.length;\n    if (from > leftLen &&\n        this.right.forEachInvertedInner(f, from - leftLen, Math.max(to, leftLen) - leftLen, start + leftLen) === false)\n      { return false }\n    if (to < leftLen &&\n        this.left.forEachInvertedInner(f, Math.min(from, leftLen), to, start) === false)\n      { return false }\n  };\n\n  Append.prototype.sliceInner = function sliceInner (from, to) {\n    if (from == 0 && to == this.length) { return this }\n    var leftLen = this.left.length;\n    if (to <= leftLen) { return this.left.slice(from, to) }\n    if (from >= leftLen) { return this.right.slice(from - leftLen, to - leftLen) }\n    return this.left.slice(from, leftLen).append(this.right.slice(0, to - leftLen))\n  };\n\n  Append.prototype.leafAppend = function leafAppend (other) {\n    var inner = this.right.leafAppend(other);\n    if (inner) { return new Append(this.left, inner) }\n  };\n\n  Append.prototype.leafPrepend = function leafPrepend (other) {\n    var inner = this.left.leafPrepend(other);\n    if (inner) { return new Append(inner, this.right) }\n  };\n\n  Append.prototype.appendInner = function appendInner (other) {\n    if (this.left.depth >= Math.max(this.right.depth, other.depth) + 1)\n      { return new Append(this.left, new Append(this.right, other)) }\n    return new Append(this, other)\n  };\n\n  return Append;\n}(RopeSequence));\n\nexport default RopeSequence;\n","import { Node, mergeAttributes, canInsertNode, isNodeSelection, nodeInputRule } from '@tiptap/core';\nimport { TextSelection, NodeSelection } from '@tiptap/pm/state';\n\n/**\n * This extension allows you to insert horizontal rules.\n * @see https://www.tiptap.dev/api/nodes/horizontal-rule\n */\nconst HorizontalRule = Node.create({\n    name: 'horizontalRule',\n    addOptions() {\n        return {\n            HTMLAttributes: {},\n        };\n    },\n    group: 'block',\n    parseHTML() {\n        return [{ tag: 'hr' }];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['hr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n    },\n    addCommands() {\n        return {\n            setHorizontalRule: () => ({ chain, state }) => {\n                // Check if we can insert the node at the current selection\n                if (!canInsertNode(state, state.schema.nodes[this.name])) {\n                    return false;\n                }\n                const { selection } = state;\n                const { $from: $originFrom, $to: $originTo } = selection;\n                const currentChain = chain();\n                if ($originFrom.parentOffset === 0) {\n                    currentChain.insertContentAt({\n                        from: Math.max($originFrom.pos - 1, 0),\n                        to: $originTo.pos,\n                    }, {\n                        type: this.name,\n                    });\n                }\n                else if (isNodeSelection(selection)) {\n                    currentChain.insertContentAt($originTo.pos, {\n                        type: this.name,\n                    });\n                }\n                else {\n                    currentChain.insertContent({ type: this.name });\n                }\n                return (currentChain\n                    // set cursor after horizontal rule\n                    .command(({ tr, dispatch }) => {\n                    var _a;\n                    if (dispatch) {\n                        const { $to } = tr.selection;\n                        const posAfter = $to.end();\n                        if ($to.nodeAfter) {\n                            if ($to.nodeAfter.isTextblock) {\n                                tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1));\n                            }\n                            else if ($to.nodeAfter.isBlock) {\n                                tr.setSelection(NodeSelection.create(tr.doc, $to.pos));\n                            }\n                            else {\n                                tr.setSelection(TextSelection.create(tr.doc, $to.pos));\n                            }\n                        }\n                        else {\n                            // add node after horizontal rule if it’s the end of the document\n                            const node = (_a = $to.parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();\n                            if (node) {\n                                tr.insert(posAfter, node);\n                                tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n                            }\n                        }\n                        tr.scrollIntoView();\n                    }\n                    return true;\n                })\n                    .run());\n            },\n        };\n    },\n    addInputRules() {\n        return [\n            nodeInputRule({\n                find: /^(?:---|—-|___\\s|\\*\\*\\*\\s)$/,\n                type: this.type,\n            }),\n        ];\n    },\n});\n\nexport { HorizontalRule, HorizontalRule as default };\n//# sourceMappingURL=index.js.map\n","import {\n  canInsertNode, isNodeSelection, mergeAttributes, Node, nodeInputRule,\n} from '@tiptap/core'\nimport { NodeSelection, TextSelection } from '@tiptap/pm/state'\n\nexport interface HorizontalRuleOptions {\n  /**\n   * The HTML attributes for a horizontal rule node.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    horizontalRule: {\n      /**\n       * Add a horizontal rule\n       * @example editor.commands.setHorizontalRule()\n       */\n      setHorizontalRule: () => ReturnType\n    }\n  }\n}\n\n/**\n * This extension allows you to insert horizontal rules.\n * @see https://www.tiptap.dev/api/nodes/horizontal-rule\n */\nexport const HorizontalRule = Node.create<HorizontalRuleOptions>({\n  name: 'horizontalRule',\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n    }\n  },\n\n  group: 'block',\n\n  parseHTML() {\n    return [{ tag: 'hr' }]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['hr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]\n  },\n\n  addCommands() {\n    return {\n      setHorizontalRule:\n        () => ({ chain, state }) => {\n          // Check if we can insert the node at the current selection\n          if (!canInsertNode(state, state.schema.nodes[this.name])) {\n            return false\n          }\n\n          const { selection } = state\n          const { $from: $originFrom, $to: $originTo } = selection\n\n          const currentChain = chain()\n\n          if ($originFrom.parentOffset === 0) {\n            currentChain.insertContentAt(\n              {\n                from: Math.max($originFrom.pos - 1, 0),\n                to: $originTo.pos,\n              },\n              {\n                type: this.name,\n              },\n            )\n          } else if (isNodeSelection(selection)) {\n            currentChain.insertContentAt($originTo.pos, {\n              type: this.name,\n            })\n          } else {\n            currentChain.insertContent({ type: this.name })\n          }\n\n          return (\n            currentChain\n              // set cursor after horizontal rule\n              .command(({ tr, dispatch }) => {\n                if (dispatch) {\n                  const { $to } = tr.selection\n                  const posAfter = $to.end()\n\n                  if ($to.nodeAfter) {\n                    if ($to.nodeAfter.isTextblock) {\n                      tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1))\n                    } else if ($to.nodeAfter.isBlock) {\n                      tr.setSelection(NodeSelection.create(tr.doc, $to.pos))\n                    } else {\n                      tr.setSelection(TextSelection.create(tr.doc, $to.pos))\n                    }\n                  } else {\n                    // add node after horizontal rule if it’s the end of the document\n                    const node = $to.parent.type.contentMatch.defaultType?.create()\n\n                    if (node) {\n                      tr.insert(posAfter, node)\n                      tr.setSelection(TextSelection.create(tr.doc, posAfter + 1))\n                    }\n                  }\n\n                  tr.scrollIntoView()\n                }\n\n                return true\n              })\n              .run()\n          )\n        },\n    }\n  },\n\n  addInputRules() {\n    return [\n      nodeInputRule({\n        find: /^(?:---|—-|___\\s|\\*\\*\\*\\s)$/,\n        type: this.type,\n      }),\n    ]\n  },\n})\n","import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Matches an italic to a *italic* on input.\n */\nconst starInputRegex = /(?:^|\\s)(\\*(?!\\s+\\*)((?:[^*]+))\\*(?!\\s+\\*))$/;\n/**\n * Matches an italic to a *italic* on paste.\n */\nconst starPasteRegex = /(?:^|\\s)(\\*(?!\\s+\\*)((?:[^*]+))\\*(?!\\s+\\*))/g;\n/**\n * Matches an italic to a _italic_ on input.\n */\nconst underscoreInputRegex = /(?:^|\\s)(_(?!\\s+_)((?:[^_]+))_(?!\\s+_))$/;\n/**\n * Matches an italic to a _italic_ on paste.\n */\nconst underscorePasteRegex = /(?:^|\\s)(_(?!\\s+_)((?:[^_]+))_(?!\\s+_))/g;\n/**\n * This extension allows you to create italic text.\n * @see https://www.tiptap.dev/api/marks/italic\n */\nconst Italic = Mark.create({\n    name: 'italic',\n    addOptions() {\n        return {\n            HTMLAttributes: {},\n        };\n    },\n    parseHTML() {\n        return [\n            {\n                tag: 'em',\n            },\n            {\n                tag: 'i',\n                getAttrs: node => node.style.fontStyle !== 'normal' && null,\n            },\n            {\n                style: 'font-style=normal',\n                clearMark: mark => mark.type.name === this.name,\n            },\n            {\n                style: 'font-style=italic',\n            },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['em', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            setItalic: () => ({ commands }) => {\n                return commands.setMark(this.name);\n            },\n            toggleItalic: () => ({ commands }) => {\n                return commands.toggleMark(this.name);\n            },\n            unsetItalic: () => ({ commands }) => {\n                return commands.unsetMark(this.name);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-i': () => this.editor.commands.toggleItalic(),\n            'Mod-I': () => this.editor.commands.toggleItalic(),\n        };\n    },\n    addInputRules() {\n        return [\n            markInputRule({\n                find: starInputRegex,\n                type: this.type,\n            }),\n            markInputRule({\n                find: underscoreInputRegex,\n                type: this.type,\n            }),\n        ];\n    },\n    addPasteRules() {\n        return [\n            markPasteRule({\n                find: starPasteRegex,\n                type: this.type,\n            }),\n            markPasteRule({\n                find: underscorePasteRegex,\n                type: this.type,\n            }),\n        ];\n    },\n});\n\nexport { Italic, Italic as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex };\n//# sourceMappingURL=index.js.map\n","import {\n  Mark,\n  markInputRule,\n  markPasteRule,\n  mergeAttributes,\n} from '@tiptap/core'\n\nexport interface ItalicOptions {\n  /**\n   * HTML attributes to add to the italic element.\n   * @default {}\n   * @example { class: 'foo' }\n  */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    italic: {\n      /**\n       * Set an italic mark\n       * @example editor.commands.setItalic()\n       */\n      setItalic: () => ReturnType,\n      /**\n       * Toggle an italic mark\n       * @example editor.commands.toggleItalic()\n       */\n      toggleItalic: () => ReturnType,\n      /**\n       * Unset an italic mark\n       * @example editor.commands.unsetItalic()\n       */\n      unsetItalic: () => ReturnType,\n    }\n  }\n}\n\n/**\n * Matches an italic to a *italic* on input.\n */\nexport const starInputRegex = /(?:^|\\s)(\\*(?!\\s+\\*)((?:[^*]+))\\*(?!\\s+\\*))$/\n\n/**\n * Matches an italic to a *italic* on paste.\n */\nexport const starPasteRegex = /(?:^|\\s)(\\*(?!\\s+\\*)((?:[^*]+))\\*(?!\\s+\\*))/g\n\n/**\n * Matches an italic to a _italic_ on input.\n */\nexport const underscoreInputRegex = /(?:^|\\s)(_(?!\\s+_)((?:[^_]+))_(?!\\s+_))$/\n\n/**\n * Matches an italic to a _italic_ on paste.\n */\nexport const underscorePasteRegex = /(?:^|\\s)(_(?!\\s+_)((?:[^_]+))_(?!\\s+_))/g\n\n/**\n * This extension allows you to create italic text.\n * @see https://www.tiptap.dev/api/marks/italic\n */\nexport const Italic = Mark.create<ItalicOptions>({\n  name: 'italic',\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 'em',\n      },\n      {\n        tag: 'i',\n        getAttrs: node => (node as HTMLElement).style.fontStyle !== 'normal' && null,\n      },\n      {\n        style: 'font-style=normal',\n        clearMark: mark => mark.type.name === this.name,\n      },\n      {\n        style: 'font-style=italic',\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['em', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setItalic: () => ({ commands }) => {\n        return commands.setMark(this.name)\n      },\n      toggleItalic: () => ({ commands }) => {\n        return commands.toggleMark(this.name)\n      },\n      unsetItalic: () => ({ commands }) => {\n        return commands.unsetMark(this.name)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-i': () => this.editor.commands.toggleItalic(),\n      'Mod-I': () => this.editor.commands.toggleItalic(),\n    }\n  },\n\n  addInputRules() {\n    return [\n      markInputRule({\n        find: starInputRegex,\n        type: this.type,\n      }),\n      markInputRule({\n        find: underscoreInputRegex,\n        type: this.type,\n      }),\n    ]\n  },\n\n  addPasteRules() {\n    return [\n      markPasteRule({\n        find: starPasteRegex,\n        type: this.type,\n      }),\n      markPasteRule({\n        find: underscorePasteRegex,\n        type: this.type,\n      }),\n    ]\n  },\n})\n","import { Node, mergeAttributes } from '@tiptap/core';\n\n/**\n * This extension allows you to create list items.\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nconst ListItem = Node.create({\n    name: 'listItem',\n    addOptions() {\n        return {\n            HTMLAttributes: {},\n            bulletListTypeName: 'bulletList',\n            orderedListTypeName: 'orderedList',\n        };\n    },\n    content: 'paragraph block*',\n    defining: true,\n    parseHTML() {\n        return [\n            {\n                tag: 'li',\n            },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addKeyboardShortcuts() {\n        return {\n            Enter: () => this.editor.commands.splitListItem(this.name),\n            Tab: () => this.editor.commands.sinkListItem(this.name),\n            'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n        };\n    },\n});\n\nexport { ListItem, ListItem as default };\n//# sourceMappingURL=index.js.map\n","import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface ListItemOptions {\n  /**\n   * The HTML attributes for a list item node.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n\n  /**\n   * The node type for bulletList nodes\n   * @default 'bulletList'\n   * @example 'myCustomBulletList'\n   */\n  bulletListTypeName: string\n\n  /**\n   * The node type for orderedList nodes\n   * @default 'orderedList'\n   * @example 'myCustomOrderedList'\n   */\n  orderedListTypeName: string\n}\n\n/**\n * This extension allows you to create list items.\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const ListItem = Node.create<ListItemOptions>({\n  name: 'listItem',\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n      bulletListTypeName: 'bulletList',\n      orderedListTypeName: 'orderedList',\n    }\n  },\n\n  content: 'paragraph block*',\n\n  defining: true,\n\n  parseHTML() {\n    return [\n      {\n        tag: 'li',\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      Enter: () => this.editor.commands.splitListItem(this.name),\n      Tab: () => this.editor.commands.sinkListItem(this.name),\n      'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n    }\n  },\n})\n","import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core';\n\nconst ListItemName = 'listItem';\nconst TextStyleName = 'textStyle';\n/**\n * Matches an ordered list to a 1. on input (or any number followed by a dot).\n */\nconst inputRegex = /^(\\d+)\\.\\s$/;\n/**\n * This extension allows you to create ordered lists.\n * This requires the ListItem extension\n * @see https://www.tiptap.dev/api/nodes/ordered-list\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nconst OrderedList = Node.create({\n    name: 'orderedList',\n    addOptions() {\n        return {\n            itemTypeName: 'listItem',\n            HTMLAttributes: {},\n            keepMarks: false,\n            keepAttributes: false,\n        };\n    },\n    group: 'block list',\n    content() {\n        return `${this.options.itemTypeName}+`;\n    },\n    addAttributes() {\n        return {\n            start: {\n                default: 1,\n                parseHTML: element => {\n                    return element.hasAttribute('start')\n                        ? parseInt(element.getAttribute('start') || '', 10)\n                        : 1;\n                },\n            },\n            type: {\n                default: null,\n                parseHTML: element => element.getAttribute('type'),\n            },\n        };\n    },\n    parseHTML() {\n        return [\n            {\n                tag: 'ol',\n            },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        const { start, ...attributesWithoutStart } = HTMLAttributes;\n        return start === 1\n            ? ['ol', mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0]\n            : ['ol', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            toggleOrderedList: () => ({ commands, chain }) => {\n                if (this.options.keepAttributes) {\n                    return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run();\n                }\n                return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-Shift-7': () => this.editor.commands.toggleOrderedList(),\n        };\n    },\n    addInputRules() {\n        let inputRule = wrappingInputRule({\n            find: inputRegex,\n            type: this.type,\n            getAttributes: match => ({ start: +match[1] }),\n            joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n        });\n        if (this.options.keepMarks || this.options.keepAttributes) {\n            inputRule = wrappingInputRule({\n                find: inputRegex,\n                type: this.type,\n                keepMarks: this.options.keepMarks,\n                keepAttributes: this.options.keepAttributes,\n                getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }),\n                joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n                editor: this.editor,\n            });\n        }\n        return [\n            inputRule,\n        ];\n    },\n});\n\nexport { OrderedList, OrderedList as default, inputRegex };\n//# sourceMappingURL=index.js.map\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface OrderedListOptions {\n  /**\n   * The node type name for list items.\n   * @default 'listItem'\n   * @example 'myListItem'\n   */\n  itemTypeName: string,\n\n  /**\n   * The HTML attributes for an ordered list node.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n\n  /**\n   * Keep the marks when splitting a list item.\n   * @default false\n   * @example true\n   */\n  keepMarks: boolean,\n\n  /**\n   * Keep the attributes when splitting a list item.\n   * @default false\n   * @example true\n   */\n  keepAttributes: boolean,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    orderedList: {\n      /**\n       * Toggle an ordered list\n       * @example editor.commands.toggleOrderedList()\n       */\n      toggleOrderedList: () => ReturnType,\n    }\n  }\n}\n\n/**\n * Matches an ordered list to a 1. on input (or any number followed by a dot).\n */\nexport const inputRegex = /^(\\d+)\\.\\s$/\n\n/**\n * This extension allows you to create ordered lists.\n * This requires the ListItem extension\n * @see https://www.tiptap.dev/api/nodes/ordered-list\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const OrderedList = Node.create<OrderedListOptions>({\n  name: 'orderedList',\n\n  addOptions() {\n    return {\n      itemTypeName: 'listItem',\n      HTMLAttributes: {},\n      keepMarks: false,\n      keepAttributes: false,\n    }\n  },\n\n  group: 'block list',\n\n  content() {\n    return `${this.options.itemTypeName}+`\n  },\n\n  addAttributes() {\n    return {\n      start: {\n        default: 1,\n        parseHTML: element => {\n          return element.hasAttribute('start')\n            ? parseInt(element.getAttribute('start') || '', 10)\n            : 1\n        },\n      },\n      type: {\n        default: null,\n        parseHTML: element => element.getAttribute('type'),\n      },\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 'ol',\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    const { start, ...attributesWithoutStart } = HTMLAttributes\n\n    return start === 1\n      ? ['ol', mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0]\n      : ['ol', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      toggleOrderedList: () => ({ commands, chain }) => {\n        if (this.options.keepAttributes) {\n          return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run()\n        }\n        return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-Shift-7': () => this.editor.commands.toggleOrderedList(),\n    }\n  },\n\n  addInputRules() {\n    let inputRule = wrappingInputRule({\n      find: inputRegex,\n      type: this.type,\n      getAttributes: match => ({ start: +match[1] }),\n      joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n    })\n\n    if (this.options.keepMarks || this.options.keepAttributes) {\n      inputRule = wrappingInputRule({\n        find: inputRegex,\n        type: this.type,\n        keepMarks: this.options.keepMarks,\n        keepAttributes: this.options.keepAttributes,\n        getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }),\n        joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n        editor: this.editor,\n      })\n    }\n    return [\n      inputRule,\n    ]\n  },\n})\n","import { Node, mergeAttributes } from '@tiptap/core';\n\n/**\n * This extension allows you to create paragraphs.\n * @see https://www.tiptap.dev/api/nodes/paragraph\n */\nconst Paragraph = Node.create({\n    name: 'paragraph',\n    priority: 1000,\n    addOptions() {\n        return {\n            HTMLAttributes: {},\n        };\n    },\n    group: 'block',\n    content: 'inline*',\n    parseHTML() {\n        return [\n            { tag: 'p' },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            setParagraph: () => ({ commands }) => {\n                return commands.setNode(this.name);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-Alt-0': () => this.editor.commands.setParagraph(),\n        };\n    },\n});\n\nexport { Paragraph, Paragraph as default };\n//# sourceMappingURL=index.js.map\n","import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface ParagraphOptions {\n  /**\n   * The HTML attributes for a paragraph node.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    paragraph: {\n      /**\n       * Toggle a paragraph\n       * @example editor.commands.toggleParagraph()\n       */\n      setParagraph: () => ReturnType,\n    }\n  }\n}\n\n/**\n * This extension allows you to create paragraphs.\n * @see https://www.tiptap.dev/api/nodes/paragraph\n */\nexport const Paragraph = Node.create<ParagraphOptions>({\n  name: 'paragraph',\n\n  priority: 1000,\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n    }\n  },\n\n  group: 'block',\n\n  content: 'inline*',\n\n  parseHTML() {\n    return [\n      { tag: 'p' },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setParagraph: () => ({ commands }) => {\n        return commands.setNode(this.name)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-Alt-0': () => this.editor.commands.setParagraph(),\n    }\n  },\n})\n","import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Matches a strike to a ~~strike~~ on input.\n */\nconst inputRegex = /(?:^|\\s)(~~(?!\\s+~~)((?:[^~]+))~~(?!\\s+~~))$/;\n/**\n * Matches a strike to a ~~strike~~ on paste.\n */\nconst pasteRegex = /(?:^|\\s)(~~(?!\\s+~~)((?:[^~]+))~~(?!\\s+~~))/g;\n/**\n * This extension allows you to create strike text.\n * @see https://www.tiptap.dev/api/marks/strike\n */\nconst Strike = Mark.create({\n    name: 'strike',\n    addOptions() {\n        return {\n            HTMLAttributes: {},\n        };\n    },\n    parseHTML() {\n        return [\n            {\n                tag: 's',\n            },\n            {\n                tag: 'del',\n            },\n            {\n                tag: 'strike',\n            },\n            {\n                style: 'text-decoration',\n                consuming: false,\n                getAttrs: style => (style.includes('line-through') ? {} : false),\n            },\n        ];\n    },\n    renderHTML({ HTMLAttributes }) {\n        return ['s', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n    },\n    addCommands() {\n        return {\n            setStrike: () => ({ commands }) => {\n                return commands.setMark(this.name);\n            },\n            toggleStrike: () => ({ commands }) => {\n                return commands.toggleMark(this.name);\n            },\n            unsetStrike: () => ({ commands }) => {\n                return commands.unsetMark(this.name);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-Shift-s': () => this.editor.commands.toggleStrike(),\n        };\n    },\n    addInputRules() {\n        return [\n            markInputRule({\n                find: inputRegex,\n                type: this.type,\n            }),\n        ];\n    },\n    addPasteRules() {\n        return [\n            markPasteRule({\n                find: pasteRegex,\n                type: this.type,\n            }),\n        ];\n    },\n});\n\nexport { Strike, Strike as default, inputRegex, pasteRegex };\n//# sourceMappingURL=index.js.map\n","import {\n  Mark,\n  markInputRule,\n  markPasteRule,\n  mergeAttributes,\n} from '@tiptap/core'\n\nexport interface StrikeOptions {\n  /**\n   * HTML attributes to add to the strike element.\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands<ReturnType> {\n    strike: {\n      /**\n       * Set a strike mark\n       * @example editor.commands.setStrike()\n       */\n      setStrike: () => ReturnType,\n      /**\n       * Toggle a strike mark\n       * @example editor.commands.toggleStrike()\n       */\n      toggleStrike: () => ReturnType,\n      /**\n       * Unset a strike mark\n       * @example editor.commands.unsetStrike()\n       */\n      unsetStrike: () => ReturnType,\n    }\n  }\n}\n\n/**\n * Matches a strike to a ~~strike~~ on input.\n */\nexport const inputRegex = /(?:^|\\s)(~~(?!\\s+~~)((?:[^~]+))~~(?!\\s+~~))$/\n\n/**\n * Matches a strike to a ~~strike~~ on paste.\n */\nexport const pasteRegex = /(?:^|\\s)(~~(?!\\s+~~)((?:[^~]+))~~(?!\\s+~~))/g\n\n/**\n * This extension allows you to create strike text.\n * @see https://www.tiptap.dev/api/marks/strike\n */\nexport const Strike = Mark.create<StrikeOptions>({\n  name: 'strike',\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 's',\n      },\n      {\n        tag: 'del',\n      },\n      {\n        tag: 'strike',\n      },\n      {\n        style: 'text-decoration',\n        consuming: false,\n        getAttrs: style => ((style as string).includes('line-through') ? {} : false),\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['s', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setStrike: () => ({ commands }) => {\n        return commands.setMark(this.name)\n      },\n      toggleStrike: () => ({ commands }) => {\n        return commands.toggleMark(this.name)\n      },\n      unsetStrike: () => ({ commands }) => {\n        return commands.unsetMark(this.name)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-Shift-s': () => this.editor.commands.toggleStrike(),\n    }\n  },\n\n  addInputRules() {\n    return [\n      markInputRule({\n        find: inputRegex,\n        type: this.type,\n      }),\n    ]\n  },\n\n  addPasteRules() {\n    return [\n      markPasteRule({\n        find: pasteRegex,\n        type: this.type,\n      }),\n    ]\n  },\n})\n","import { Node } from '@tiptap/core';\n\n/**\n * This extension allows you to create text nodes.\n * @see https://www.tiptap.dev/api/nodes/text\n */\nconst Text = Node.create({\n    name: 'text',\n    group: 'inline',\n});\n\nexport { Text, Text as default };\n//# sourceMappingURL=index.js.map\n","import { Node } from '@tiptap/core'\n\n/**\n * This extension allows you to create text nodes.\n * @see https://www.tiptap.dev/api/nodes/text\n */\nexport const Text = Node.create({\n  name: 'text',\n  group: 'inline',\n})\n","import { Extension } from '@tiptap/core'\nimport Suggestion from '@tiptap/suggestion'\n\n// Simple renderer without external libs\nfunction renderSuggestionList() {\n  let popup = null\n\n  const createPopup = props => {\n    const { clientRect } = props\n    const container = document.createElement('div')\n    container.className =\n      'bg-white border border-gray-200 rounded-sm shadow-md text-sm text-gray-700 max-h-60 overflow-y-auto'\n    container.style.position = 'absolute'\n    container.style.zIndex = '1000'\n    positionPopup(container, clientRect)\n    document.body.appendChild(container)\n    return container\n  }\n\n  const positionPopup = (container, clientRect) => {\n    if (!clientRect) return\n    const { top, left, height } = clientRect()\n    container.style.top = `${top + height + window.scrollY}px`\n    container.style.left = `${left + window.scrollX}px`\n  }\n\n  const onStart = props => {\n    popup = createPopup(props)\n    updateList(props)\n  }\n\n  const onUpdate = props => {\n    updateList(props)\n    positionPopup(popup, props.clientRect)\n  }\n\n  const onKeyDown = props => {\n    if (props.event.key === 'Escape') {\n      onExit()\n      return true\n    }\n    const items = Array.from(popup.querySelectorAll('button'))\n    let currentIndex = items.findIndex(i => i.classList.contains('bg-gray-100'))\n    if (props.event.key === 'ArrowDown') {\n      currentIndex = (currentIndex + 1) % items.length\n      highlight(items, currentIndex)\n      return true\n    }\n    if (props.event.key === 'ArrowUp') {\n      currentIndex = (currentIndex - 1 + items.length) % items.length\n      highlight(items, currentIndex)\n      return true\n    }\n    if (props.event.key === 'Enter') {\n      if (currentIndex >= 0) {\n        items[currentIndex].click()\n        return true\n      }\n    }\n    return false\n  }\n\n  const onExit = () => {\n    if (popup) {\n      popup.remove()\n      popup = null\n    }\n  }\n\n  function updateList(props) {\n    const { items, command } = props\n    popup.innerHTML = ''\n    items.forEach((item, index) => {\n      const btn = document.createElement('button')\n      btn.type = 'button'\n      const clean = item.label\n        .replace(/^\\s*\\{\\{\\s*/, '')\n        .replace(/\\s*\\}\\}\\s*$/, '')\n      btn.innerHTML = `<span class=\"text-indigo-500\">{{</span><span class=\"mx-1\">${clean}</span><span class=\"text-indigo-500\">}}</span>`\n      btn.className =\n        'flex items-center gap-0 w-full px-3 py-1 text-left hover:bg-indigo-50 hover:text-indigo-600'\n      if (index === 0) btn.classList.add('bg-gray-100')\n      btn.addEventListener('click', () => command(item))\n      popup.appendChild(btn)\n    })\n  }\n\n  function highlight(items, index) {\n    items.forEach(i => i.classList.remove('bg-gray-100'))\n    items[index].classList.add('bg-gray-100')\n    items[index].scrollIntoView({ block: 'nearest' })\n  }\n\n  return { onStart, onUpdate, onKeyDown, onExit }\n}\n\nconst VariableSuggestion = Extension.create({\n  name: 'variableSuggestion',\n  addOptions() {\n    return {\n      variables: [],\n      char: '{',\n    }\n  },\n  addProseMirrorPlugins() {\n    return [\n      Suggestion({\n        char: this.options.char,\n        startOfLine: false,\n        allowSpaces: false,\n        editor: this.editor,\n        items: ({ query }) => {\n          return this.options.variables\n            .filter(v => v.toLowerCase().includes(query.toLowerCase()))\n            .slice(0, 20)\n            .map(v => ({ label: v }))\n        },\n        command: ({ editor, range, props }) => {\n          const variable = props.label.trim().replace(/^\\s*\\{\\{\\s*/, '').replace(/\\s*\\}\\}\\s*$/, '')\n          editor.chain().focus().deleteRange(range).insertVariable(variable).run()\n        },\n        render: renderSuggestionList,\n      }),\n    ]\n  },\n})\n\nexport default VariableSuggestion\n","import { PluginKey, Plugin } from '@tiptap/pm/state';\nimport { DecorationSet, Decoration } from '@tiptap/pm/view';\nimport { escapeForRegEx } from '@tiptap/core';\n\nfunction findSuggestionMatch(config) {\n    var _a;\n    const { char, allowSpaces: allowSpacesOption, allowToIncludeChar, allowedPrefixes, startOfLine, $position, } = config;\n    const allowSpaces = allowSpacesOption && !allowToIncludeChar;\n    const escapedChar = escapeForRegEx(char);\n    const suffix = new RegExp(`\\\\s${escapedChar}$`);\n    const prefix = startOfLine ? '^' : '';\n    const finalEscapedChar = allowToIncludeChar ? '' : escapedChar;\n    const regexp = allowSpaces\n        ? new RegExp(`${prefix}${escapedChar}.*?(?=\\\\s${finalEscapedChar}|$)`, 'gm')\n        : new RegExp(`${prefix}(?:^)?${escapedChar}[^\\\\s${finalEscapedChar}]*`, 'gm');\n    const text = ((_a = $position.nodeBefore) === null || _a === void 0 ? void 0 : _a.isText) && $position.nodeBefore.text;\n    if (!text) {\n        return null;\n    }\n    const textFrom = $position.pos - text.length;\n    const match = Array.from(text.matchAll(regexp)).pop();\n    if (!match || match.input === undefined || match.index === undefined) {\n        return null;\n    }\n    // JavaScript doesn't have lookbehinds. This hacks a check that first character\n    // is a space or the start of the line\n    const matchPrefix = match.input.slice(Math.max(0, match.index - 1), match.index);\n    const matchPrefixIsAllowed = new RegExp(`^[${allowedPrefixes === null || allowedPrefixes === void 0 ? void 0 : allowedPrefixes.join('')}\\0]?$`).test(matchPrefix);\n    if (allowedPrefixes !== null && !matchPrefixIsAllowed) {\n        return null;\n    }\n    // The absolute position of the match in the document\n    const from = textFrom + match.index;\n    let to = from + match[0].length;\n    // Edge case handling; if spaces are allowed and we're directly in between\n    // two triggers\n    if (allowSpaces && suffix.test(text.slice(to - 1, to + 1))) {\n        match[0] += ' ';\n        to += 1;\n    }\n    // If the $position is located within the matched substring, return that range\n    if (from < $position.pos && to >= $position.pos) {\n        return {\n            range: {\n                from,\n                to,\n            },\n            query: match[0].slice(char.length),\n            text: match[0],\n        };\n    }\n    return null;\n}\n\nconst SuggestionPluginKey = new PluginKey('suggestion');\n/**\n * This utility allows you to create suggestions.\n * @see https://tiptap.dev/api/utilities/suggestion\n */\nfunction Suggestion({ pluginKey = SuggestionPluginKey, editor, char = '@', allowSpaces = false, allowToIncludeChar = false, allowedPrefixes = [' '], startOfLine = false, decorationTag = 'span', decorationClass = 'suggestion', command = () => null, items = () => [], render = () => ({}), allow = () => true, findSuggestionMatch: findSuggestionMatch$1 = findSuggestionMatch, }) {\n    let props;\n    const renderer = render === null || render === void 0 ? void 0 : render();\n    const plugin = new Plugin({\n        key: pluginKey,\n        view() {\n            return {\n                update: async (view, prevState) => {\n                    var _a, _b, _c, _d, _e, _f, _g;\n                    const prev = (_a = this.key) === null || _a === void 0 ? void 0 : _a.getState(prevState);\n                    const next = (_b = this.key) === null || _b === void 0 ? void 0 : _b.getState(view.state);\n                    // See how the state changed\n                    const moved = prev.active && next.active && prev.range.from !== next.range.from;\n                    const started = !prev.active && next.active;\n                    const stopped = prev.active && !next.active;\n                    const changed = !started && !stopped && prev.query !== next.query;\n                    const handleStart = started || (moved && changed);\n                    const handleChange = changed || moved;\n                    const handleExit = stopped || (moved && changed);\n                    // Cancel when suggestion isn't active\n                    if (!handleStart && !handleChange && !handleExit) {\n                        return;\n                    }\n                    const state = handleExit && !handleStart ? prev : next;\n                    const decorationNode = view.dom.querySelector(`[data-decoration-id=\"${state.decorationId}\"]`);\n                    props = {\n                        editor,\n                        range: state.range,\n                        query: state.query,\n                        text: state.text,\n                        items: [],\n                        command: commandProps => {\n                            return command({\n                                editor,\n                                range: state.range,\n                                props: commandProps,\n                            });\n                        },\n                        decorationNode,\n                        // virtual node for popper.js or tippy.js\n                        // this can be used for building popups without a DOM node\n                        clientRect: decorationNode\n                            ? () => {\n                                var _a;\n                                // because of `items` can be asynchrounous we’ll search for the current decoration node\n                                const { decorationId } = (_a = this.key) === null || _a === void 0 ? void 0 : _a.getState(editor.state); // eslint-disable-line\n                                const currentDecorationNode = view.dom.querySelector(`[data-decoration-id=\"${decorationId}\"]`);\n                                return (currentDecorationNode === null || currentDecorationNode === void 0 ? void 0 : currentDecorationNode.getBoundingClientRect()) || null;\n                            }\n                            : null,\n                    };\n                    if (handleStart) {\n                        (_c = renderer === null || renderer === void 0 ? void 0 : renderer.onBeforeStart) === null || _c === void 0 ? void 0 : _c.call(renderer, props);\n                    }\n                    if (handleChange) {\n                        (_d = renderer === null || renderer === void 0 ? void 0 : renderer.onBeforeUpdate) === null || _d === void 0 ? void 0 : _d.call(renderer, props);\n                    }\n                    if (handleChange || handleStart) {\n                        props.items = await items({\n                            editor,\n                            query: state.query,\n                        });\n                    }\n                    if (handleExit) {\n                        (_e = renderer === null || renderer === void 0 ? void 0 : renderer.onExit) === null || _e === void 0 ? void 0 : _e.call(renderer, props);\n                    }\n                    if (handleChange) {\n                        (_f = renderer === null || renderer === void 0 ? void 0 : renderer.onUpdate) === null || _f === void 0 ? void 0 : _f.call(renderer, props);\n                    }\n                    if (handleStart) {\n                        (_g = renderer === null || renderer === void 0 ? void 0 : renderer.onStart) === null || _g === void 0 ? void 0 : _g.call(renderer, props);\n                    }\n                },\n                destroy: () => {\n                    var _a;\n                    if (!props) {\n                        return;\n                    }\n                    (_a = renderer === null || renderer === void 0 ? void 0 : renderer.onExit) === null || _a === void 0 ? void 0 : _a.call(renderer, props);\n                },\n            };\n        },\n        state: {\n            // Initialize the plugin's internal state.\n            init() {\n                const state = {\n                    active: false,\n                    range: {\n                        from: 0,\n                        to: 0,\n                    },\n                    query: null,\n                    text: null,\n                    composing: false,\n                };\n                return state;\n            },\n            // Apply changes to the plugin state from a view transaction.\n            apply(transaction, prev, _oldState, state) {\n                const { isEditable } = editor;\n                const { composing } = editor.view;\n                const { selection } = transaction;\n                const { empty, from } = selection;\n                const next = { ...prev };\n                next.composing = composing;\n                // We can only be suggesting if the view is editable, and:\n                //   * there is no selection, or\n                //   * a composition is active (see: https://github.com/ueberdosis/tiptap/issues/1449)\n                if (isEditable && (empty || editor.view.composing)) {\n                    // Reset active state if we just left the previous suggestion range\n                    if ((from < prev.range.from || from > prev.range.to) && !composing && !prev.composing) {\n                        next.active = false;\n                    }\n                    // Try to match against where our cursor currently is\n                    const match = findSuggestionMatch$1({\n                        char,\n                        allowSpaces,\n                        allowToIncludeChar,\n                        allowedPrefixes,\n                        startOfLine,\n                        $position: selection.$from,\n                    });\n                    const decorationId = `id_${Math.floor(Math.random() * 0xffffffff)}`;\n                    // If we found a match, update the current state to show it\n                    if (match && allow({\n                        editor, state, range: match.range, isActive: prev.active,\n                    })) {\n                        next.active = true;\n                        next.decorationId = prev.decorationId ? prev.decorationId : decorationId;\n                        next.range = match.range;\n                        next.query = match.query;\n                        next.text = match.text;\n                    }\n                    else {\n                        next.active = false;\n                    }\n                }\n                else {\n                    next.active = false;\n                }\n                // Make sure to empty the range if suggestion is inactive\n                if (!next.active) {\n                    next.decorationId = null;\n                    next.range = { from: 0, to: 0 };\n                    next.query = null;\n                    next.text = null;\n                }\n                return next;\n            },\n        },\n        props: {\n            // Call the keydown hook if suggestion is active.\n            handleKeyDown(view, event) {\n                var _a;\n                const { active, range } = plugin.getState(view.state);\n                if (!active) {\n                    return false;\n                }\n                return ((_a = renderer === null || renderer === void 0 ? void 0 : renderer.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(renderer, { view, event, range })) || false;\n            },\n            // Setup decorator on the currently active suggestion.\n            decorations(state) {\n                const { active, range, decorationId } = plugin.getState(state);\n                if (!active) {\n                    return null;\n                }\n                return DecorationSet.create(state.doc, [\n                    Decoration.inline(range.from, range.to, {\n                        nodeName: decorationTag,\n                        class: decorationClass,\n                        'data-decoration-id': decorationId,\n                    }),\n                ]);\n            },\n        },\n    });\n    return plugin;\n}\n\nexport { Suggestion, SuggestionPluginKey, Suggestion as default, findSuggestionMatch };\n//# sourceMappingURL=index.js.map\n","import { escapeForRegEx, Range } from '@tiptap/core'\nimport { ResolvedPos } from '@tiptap/pm/model'\n\nexport interface Trigger {\n  char: string\n  allowSpaces: boolean\n  allowToIncludeChar: boolean\n  allowedPrefixes: string[] | null\n  startOfLine: boolean\n  $position: ResolvedPos\n}\n\nexport type SuggestionMatch = {\n  range: Range\n  query: string\n  text: string\n} | null\n\nexport function findSuggestionMatch(config: Trigger): SuggestionMatch {\n  const {\n    char, allowSpaces: allowSpacesOption, allowToIncludeChar, allowedPrefixes, startOfLine, $position,\n  } = config\n\n  const allowSpaces = allowSpacesOption && !allowToIncludeChar\n\n  const escapedChar = escapeForRegEx(char)\n  const suffix = new RegExp(`\\\\s${escapedChar}$`)\n  const prefix = startOfLine ? '^' : ''\n  const finalEscapedChar = allowToIncludeChar ? '' : escapedChar\n  const regexp = allowSpaces\n    ? new RegExp(`${prefix}${escapedChar}.*?(?=\\\\s${finalEscapedChar}|$)`, 'gm')\n    : new RegExp(`${prefix}(?:^)?${escapedChar}[^\\\\s${finalEscapedChar}]*`, 'gm')\n\n  const text = $position.nodeBefore?.isText && $position.nodeBefore.text\n\n  if (!text) {\n    return null\n  }\n\n  const textFrom = $position.pos - text.length\n  const match = Array.from(text.matchAll(regexp)).pop()\n\n  if (!match || match.input === undefined || match.index === undefined) {\n    return null\n  }\n\n  // JavaScript doesn't have lookbehinds. This hacks a check that first character\n  // is a space or the start of the line\n  const matchPrefix = match.input.slice(Math.max(0, match.index - 1), match.index)\n  const matchPrefixIsAllowed = new RegExp(`^[${allowedPrefixes?.join('')}\\0]?$`).test(matchPrefix)\n\n  if (allowedPrefixes !== null && !matchPrefixIsAllowed) {\n    return null\n  }\n\n  // The absolute position of the match in the document\n  const from = textFrom + match.index\n  let to = from + match[0].length\n\n  // Edge case handling; if spaces are allowed and we're directly in between\n  // two triggers\n  if (allowSpaces && suffix.test(text.slice(to - 1, to + 1))) {\n    match[0] += ' '\n    to += 1\n  }\n\n  // If the $position is located within the matched substring, return that range\n  if (from < $position.pos && to >= $position.pos) {\n    return {\n      range: {\n        from,\n        to,\n      },\n      query: match[0].slice(char.length),\n      text: match[0],\n    }\n  }\n\n  return null\n}\n","import { Editor, Range } from '@tiptap/core'\nimport { EditorState, Plugin, PluginKey } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet, EditorView } from '@tiptap/pm/view'\n\nimport { findSuggestionMatch as defaultFindSuggestionMatch } from './findSuggestionMatch.js'\n\nexport interface SuggestionOptions<I = any, TSelected = any> {\n  /**\n   * The plugin key for the suggestion plugin.\n   * @default 'suggestion'\n   * @example 'mention'\n   */\n  pluginKey?: PluginKey\n\n  /**\n   * The editor instance.\n   * @default null\n   */\n  editor: Editor\n\n  /**\n   * The character that triggers the suggestion.\n   * @default '@'\n   * @example '#'\n   */\n  char?: string\n\n  /**\n   * Allow spaces in the suggestion query. Not compatible with `allowToIncludeChar`. Will be disabled if `allowToIncludeChar` is set to `true`.\n   * @default false\n   * @example true\n  */\n  allowSpaces?: boolean\n\n  /**\n   * Allow the character to be included in the suggestion query. Not compatible with `allowSpaces`.\n   * @default false\n   */\n  allowToIncludeChar?: boolean\n\n  /**\n   * Allow prefixes in the suggestion query.\n   * @default [' ']\n   * @example [' ', '@']\n   */\n  allowedPrefixes?: string[] | null\n\n  /**\n   * Only match suggestions at the start of the line.\n   * @default false\n   * @example true\n   */\n  startOfLine?: boolean\n\n  /**\n   * The tag name of the decoration node.\n   * @default 'span'\n   * @example 'div'\n   */\n  decorationTag?: string\n\n  /**\n   * The class name of the decoration node.\n   * @default 'suggestion'\n   * @example 'mention'\n   */\n  decorationClass?: string\n\n  /**\n   * A function that is called when a suggestion is selected.\n   * @param props The props object.\n   * @param props.editor The editor instance.\n   * @param props.range The range of the suggestion.\n   * @param props.props The props of the selected suggestion.\n   * @returns void\n   * @example ({ editor, range, props }) => { props.command(props.props) }\n   */\n  command?: (props: { editor: Editor; range: Range; props: TSelected }) => void\n\n  /**\n   * A function that returns the suggestion items in form of an array.\n   * @param props The props object.\n   * @param props.editor The editor instance.\n   * @param props.query The current suggestion query.\n   * @returns An array of suggestion items.\n   * @example ({ editor, query }) => [{ id: 1, label: 'John Doe' }]\n   */\n  items?: (props: { query: string; editor: Editor }) => I[] | Promise<I[]>\n\n  /**\n   * The render function for the suggestion.\n   * @returns An object with render functions.\n   */\n  render?: () => {\n    onBeforeStart?: (props: SuggestionProps<I, TSelected>) => void;\n    onStart?: (props: SuggestionProps<I, TSelected>) => void;\n    onBeforeUpdate?: (props: SuggestionProps<I, TSelected>) => void;\n    onUpdate?: (props: SuggestionProps<I, TSelected>) => void;\n    onExit?: (props: SuggestionProps<I, TSelected>) => void;\n    onKeyDown?: (props: SuggestionKeyDownProps) => boolean;\n  }\n\n  /**\n   * A function that returns a boolean to indicate if the suggestion should be active.\n   * @param props The props object.\n   * @returns {boolean}\n   */\n  allow?: (props: { editor: Editor; state: EditorState; range: Range, isActive?: boolean }) => boolean\n  findSuggestionMatch?: typeof defaultFindSuggestionMatch\n}\n\nexport interface SuggestionProps<I = any, TSelected = any> {\n  /**\n   * The editor instance.\n   */\n  editor: Editor\n\n  /**\n   * The range of the suggestion.\n   */\n  range: Range\n\n  /**\n   * The current suggestion query.\n   */\n  query: string\n\n  /**\n   * The current suggestion text.\n   */\n  text: string\n\n  /**\n   * The suggestion items array.\n   */\n  items: I[]\n\n  /**\n   * A function that is called when a suggestion is selected.\n   * @param props The props object.\n   * @returns void\n   */\n  command: (props: TSelected) => void\n\n  /**\n   * The decoration node HTML element\n   * @default null\n   */\n  decorationNode: Element | null\n\n  /**\n   * The function that returns the client rect\n   * @default null\n   * @example () => new DOMRect(0, 0, 0, 0)\n   */\n  clientRect?: (() => DOMRect | null) | null\n}\n\nexport interface SuggestionKeyDownProps {\n  view: EditorView\n  event: KeyboardEvent\n  range: Range\n}\n\nexport const SuggestionPluginKey = new PluginKey('suggestion')\n\n/**\n * This utility allows you to create suggestions.\n * @see https://tiptap.dev/api/utilities/suggestion\n */\nexport function Suggestion<I = any, TSelected = any>({\n  pluginKey = SuggestionPluginKey,\n  editor,\n  char = '@',\n  allowSpaces = false,\n  allowToIncludeChar = false,\n  allowedPrefixes = [' '],\n  startOfLine = false,\n  decorationTag = 'span',\n  decorationClass = 'suggestion',\n  command = () => null,\n  items = () => [],\n  render = () => ({}),\n  allow = () => true,\n  findSuggestionMatch = defaultFindSuggestionMatch,\n}: SuggestionOptions<I, TSelected>) {\n  let props: SuggestionProps<I, TSelected> | undefined\n  const renderer = render?.()\n\n  const plugin: Plugin<any> = new Plugin({\n    key: pluginKey,\n\n    view() {\n      return {\n        update: async (view, prevState) => {\n          const prev = this.key?.getState(prevState)\n          const next = this.key?.getState(view.state)\n\n          // See how the state changed\n          const moved = prev.active && next.active && prev.range.from !== next.range.from\n          const started = !prev.active && next.active\n          const stopped = prev.active && !next.active\n          const changed = !started && !stopped && prev.query !== next.query\n\n          const handleStart = started || (moved && changed)\n          const handleChange = changed || moved\n          const handleExit = stopped || (moved && changed)\n\n          // Cancel when suggestion isn't active\n          if (!handleStart && !handleChange && !handleExit) {\n            return\n          }\n\n          const state = handleExit && !handleStart ? prev : next\n          const decorationNode = view.dom.querySelector(\n            `[data-decoration-id=\"${state.decorationId}\"]`,\n          )\n\n          props = {\n            editor,\n            range: state.range,\n            query: state.query,\n            text: state.text,\n            items: [],\n            command: commandProps => {\n              return command({\n                editor,\n                range: state.range,\n                props: commandProps,\n              })\n            },\n            decorationNode,\n            // virtual node for popper.js or tippy.js\n            // this can be used for building popups without a DOM node\n            clientRect: decorationNode\n              ? () => {\n                // because of `items` can be asynchrounous we’ll search for the current decoration node\n                  const { decorationId } = this.key?.getState(editor.state) // eslint-disable-line\n                const currentDecorationNode = view.dom.querySelector(\n                  `[data-decoration-id=\"${decorationId}\"]`,\n                )\n\n                return currentDecorationNode?.getBoundingClientRect() || null\n              }\n              : null,\n          }\n\n          if (handleStart) {\n            renderer?.onBeforeStart?.(props)\n          }\n\n          if (handleChange) {\n            renderer?.onBeforeUpdate?.(props)\n          }\n\n          if (handleChange || handleStart) {\n            props.items = await items({\n              editor,\n              query: state.query,\n            })\n          }\n\n          if (handleExit) {\n            renderer?.onExit?.(props)\n          }\n\n          if (handleChange) {\n            renderer?.onUpdate?.(props)\n          }\n\n          if (handleStart) {\n            renderer?.onStart?.(props)\n          }\n        },\n\n        destroy: () => {\n          if (!props) {\n            return\n          }\n\n          renderer?.onExit?.(props)\n        },\n      }\n    },\n\n    state: {\n      // Initialize the plugin's internal state.\n      init() {\n        const state: {\n          active: boolean\n          range: Range\n          query: null | string\n          text: null | string\n          composing: boolean\n          decorationId?: string | null\n        } = {\n          active: false,\n          range: {\n            from: 0,\n            to: 0,\n          },\n          query: null,\n          text: null,\n          composing: false,\n        }\n\n        return state\n      },\n\n      // Apply changes to the plugin state from a view transaction.\n      apply(transaction, prev, _oldState, state) {\n        const { isEditable } = editor\n        const { composing } = editor.view\n        const { selection } = transaction\n        const { empty, from } = selection\n        const next = { ...prev }\n\n        next.composing = composing\n\n        // We can only be suggesting if the view is editable, and:\n        //   * there is no selection, or\n        //   * a composition is active (see: https://github.com/ueberdosis/tiptap/issues/1449)\n        if (isEditable && (empty || editor.view.composing)) {\n          // Reset active state if we just left the previous suggestion range\n          if ((from < prev.range.from || from > prev.range.to) && !composing && !prev.composing) {\n            next.active = false\n          }\n\n          // Try to match against where our cursor currently is\n          const match = findSuggestionMatch({\n            char,\n            allowSpaces,\n            allowToIncludeChar,\n            allowedPrefixes,\n            startOfLine,\n            $position: selection.$from,\n          })\n          const decorationId = `id_${Math.floor(Math.random() * 0xffffffff)}`\n\n          // If we found a match, update the current state to show it\n          if (match && allow({\n            editor, state, range: match.range, isActive: prev.active,\n          })) {\n            next.active = true\n            next.decorationId = prev.decorationId ? prev.decorationId : decorationId\n            next.range = match.range\n            next.query = match.query\n            next.text = match.text\n          } else {\n            next.active = false\n          }\n        } else {\n          next.active = false\n        }\n\n        // Make sure to empty the range if suggestion is inactive\n        if (!next.active) {\n          next.decorationId = null\n          next.range = { from: 0, to: 0 }\n          next.query = null\n          next.text = null\n        }\n\n        return next\n      },\n    },\n\n    props: {\n      // Call the keydown hook if suggestion is active.\n      handleKeyDown(view, event) {\n        const { active, range } = plugin.getState(view.state)\n\n        if (!active) {\n          return false\n        }\n\n        return renderer?.onKeyDown?.({ view, event, range }) || false\n      },\n\n      // Setup decorator on the currently active suggestion.\n      decorations(state) {\n        const { active, range, decorationId } = plugin.getState(state)\n\n        if (!active) {\n          return null\n        }\n\n        return DecorationSet.create(state.doc, [\n          Decoration.inline(range.from, range.to, {\n            nodeName: decorationTag,\n            class: decorationClass,\n            'data-decoration-id': decorationId,\n          }),\n        ])\n      },\n    },\n  })\n\n  return plugin\n}\n","import { Node } from \"@tiptap/core\";\n\nconst VariableNode = Node.create({\n  name: \"variable\",\n\n  group: \"inline\",\n\n  inline: true,\n\n  selectable: false,\n\n  marks: \"bold italic underline strike\",\n\n  addAttributes() {\n    return {\n      variable: {\n        default: null,\n        parseHTML: (element) => element.getAttribute(\"data-variable\"),\n        renderHTML: (attributes) => ({\n          \"data-variable\": attributes.variable,\n        }),\n      },\n    };\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: \"span[data-variable]\",\n      },\n    ];\n  },\n\n  renderHTML({ node, HTMLAttributes }) {\n    const variable = node.attrs.variable;\n    return [\n      \"span\",\n      {\n        ...HTMLAttributes,\n        class: \"wysiwyg-variable\",\n        \"data-variable\": variable,\n      },\n      [\"span\", { class: \"curly-braces\" }, \"{{\"],\n      [\"span\", { class: \"variable-name\" }, ` ${variable} `],\n      [\"span\", { class: \"curly-braces\" }, \"}}\"],\n    ];\n  },\n\n  addNodeView() {\n    return ({ node, HTMLAttributes }) => {\n      const variable = node.attrs.variable;\n      const span = document.createElement(\"span\");\n      span.className = \"wysiwyg-variable\";\n      span.setAttribute(\"data-variable\", variable);\n\n      // Apply styling based on marks\n      const marks = node.marks || [];\n      marks.forEach(mark => {\n        switch (mark.type.name) {\n          case 'bold':\n            span.style.fontWeight = 'bold';\n            break;\n          case 'italic':\n            span.style.fontStyle = 'italic';\n            break;\n          case 'underline':\n            span.style.textDecoration = span.style.textDecoration \n              ? span.style.textDecoration + ' underline'\n              : 'underline';\n            break;\n          case 'strike':\n            span.style.textDecoration = span.style.textDecoration \n              ? span.style.textDecoration + ' line-through'\n              : 'line-through';\n            break;\n        }\n      });\n\n      const openBrace = document.createElement(\"span\");\n      openBrace.className = \"curly-braces\";\n      openBrace.textContent = \"{{\";\n\n      const variableName = document.createElement(\"span\");\n      variableName.className = \"variable-name\";\n      variableName.textContent = ` ${variable} `;\n\n      const closeBrace = document.createElement(\"span\");\n      closeBrace.className = \"curly-braces\";\n      closeBrace.textContent = \"}}\";\n\n      span.appendChild(openBrace);\n      span.appendChild(variableName);\n      span.appendChild(closeBrace);\n\n      return {\n        dom: span,\n        update: (updatedNode) => {\n          if (updatedNode.type.name !== \"variable\") return false;\n          \n          // Update styling when marks change\n          const newMarks = updatedNode.marks || [];\n          span.style.fontWeight = '';\n          span.style.fontStyle = '';\n          span.style.textDecoration = '';\n          \n          newMarks.forEach(mark => {\n            switch (mark.type.name) {\n              case 'bold':\n                span.style.fontWeight = 'bold';\n                break;\n              case 'italic':\n                span.style.fontStyle = 'italic';\n                break;\n              case 'underline':\n                span.style.textDecoration = span.style.textDecoration \n                  ? span.style.textDecoration + ' underline'\n                  : 'underline';\n                break;\n              case 'strike':\n                span.style.textDecoration = span.style.textDecoration \n                  ? span.style.textDecoration + ' line-through'\n                  : 'line-through';\n                break;\n            }\n          });\n          \n          return true;\n        },\n      };\n    };\n  },\n\n  addCommands() {\n    return {\n      insertVariable:\n        (variable) =>\n        ({ commands }) => {\n          return commands.insertContent({\n            type: this.name,\n            attrs: { variable },\n          });\n        },\n    };\n  },\n});\n\nexport default VariableNode;\n","/**\n * Simple Image Resize & Align for TipTap\n * Clean, maintainable image controls\n */\n\n// Two independent choices, the way Word and Docs split them: where the image\n// sits, and whether text wraps beside it. CSS cannot centre a float, so wrap\n// only applies to left and right (tiptap#5685). Inline styles rather than\n// classes, and px rather than rem: no mail client loads our CSS, and Outlook on\n// Windows draws with the Word engine, which has no rem unit.\nexport const IMAGE_ALIGNMENT_STYLES = {\n  left: 'float: none; display: block; margin: 16px auto 16px 0;',\n  center: 'float: none; display: block; margin: 16px auto;',\n  right: 'float: none; display: block; margin: 16px 0 16px auto;',\n  wrapLeft: 'float: left; margin: 0 16px 8px 0;',\n  wrapRight: 'float: right; margin: 0 0 8px 16px;'\n};\n\n// Word supports neither `float` nor `margin: auto`, so every mode above needs a\n// second, attribute-based spelling for Outlook. Wrapping is `align` on the image\n// itself, the HTML 4 original the property was named after; position without\n// wrapping is `align` on the paragraph, which Tiptap's TextAlign already writes\n// as an attribute. Only one of the two is ever set: `align` on an unwrapped\n// image would start wrapping text Word would otherwise leave below it.\nconst WRAP_ALIGN_ATTRIBUTES = { wrapLeft: 'left', wrapRight: 'right' };\n\nconst WRAPPED_STYLE_KEYS = { left: 'wrapLeft', right: 'wrapRight' };\nconst styleKeyFor = (position, wrap) => (wrap && WRAPPED_STYLE_KEYS[position]) || position;\n\n// Each icon draws the image block (filled) against the text lines it produces,\n// so the button shows the result rather than naming a direction.\nconst icon = (body) => `<svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\">${body}</svg>`;\nconst block = (x) => `<rect x=\"${x}\" y=\"8\" width=\"9\" height=\"8\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M3 4h18M3 20h18\"/>`;\nconst ALIGNMENT_ICONS = {\n  left: icon(block(3)),\n  center: icon('<rect x=\"7\" y=\"8\" width=\"10\" height=\"8\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M3 4h18M3 20h18\"/>'),\n  right: icon(block(12)),\n  wrap: icon('<rect x=\"3\" y=\"5\" width=\"9\" height=\"9\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M14 7h7M14 11h7M3 17h18M3 20h18\"/>')\n};\n\nconst ALIGNMENT_BUTTONS = [\n  { key: 'left', title: 'Own line, left' },\n  { key: 'center', title: 'Own line, centered' },\n  { key: 'right', title: 'Own line, right' }\n];\n\n\nclass ImageResizerClass {\n  constructor(editor, editorElement, maxWidth = 0) {\n    this.editor = editor;\n    this.editorElement = editorElement;\n    // Email editors pass the column width. Outlook honours a width and ignores\n    // max-width, so a drag past the column would reach a recipient overflowing\n    // it no matter what the sanitizer adds afterwards. 0 means no limit.\n    this.maxWidth = maxWidth;\n    this.selectedImage = null;\n    this.resizeContainer = null;\n    this.isResizing = false;\n\n    this.init();\n  }\n\n  init() {\n    this.createControls();\n    this.attachListeners();\n  }\n\n  createControls() {\n    // Create overlay container\n    this.resizeContainer = document.createElement(\"div\");\n    this.resizeContainer.className = \"image-resize-container\";\n    this.resizeContainer.style.display = \"none\";\n    this.resizeContainer.style.position = \"absolute\";\n\n    // Ensure editor has relative positioning\n    if (getComputedStyle(this.editorElement).position === 'static') {\n      this.editorElement.style.position = 'relative';\n    }\n    this.editorElement.appendChild(this.resizeContainer);\n\n    // Add resize handles\n    [\"nw\", \"ne\", \"sw\", \"se\"].forEach(direction => {\n      const handle = document.createElement(\"div\");\n      handle.className = `resize-handle resize-handle-${direction}`;\n      handle.dataset.direction = direction;\n      this.resizeContainer.appendChild(handle);\n    });\n\n    // Add alignment buttons\n    const alignContainer = document.createElement(\"div\");\n    alignContainer.className = \"image-alignment-controls\";\n\n    ALIGNMENT_BUTTONS.forEach(({ key, title }) => {\n      const btn = document.createElement(\"button\");\n      btn.className = `alignment-btn alignment-btn-${key}`;\n      btn.innerHTML = ALIGNMENT_ICONS[key];\n      btn.title = title;\n      btn.onclick = (e) => {\n        e.preventDefault();\n        // Switching sides keeps the wrap setting; centre drops it.\n        this.alignImage(key, this.currentAlignment().wrap);\n      };\n      alignContainer.appendChild(btn);\n    });\n\n    const wrapBtn = document.createElement(\"button\");\n    wrapBtn.className = \"alignment-btn alignment-btn-wrap\";\n    wrapBtn.innerHTML = ALIGNMENT_ICONS.wrap;\n    wrapBtn.title = \"Let text wrap beside the image\";\n    wrapBtn.onclick = (e) => {\n      e.preventDefault();\n      const { position, wrap } = this.currentAlignment();\n      if (WRAPPED_STYLE_KEYS[position]) this.alignImage(position, !wrap);\n    };\n    alignContainer.appendChild(wrapBtn);\n\n    this.resizeContainer.appendChild(alignContainer);\n  }\n\n  attachListeners() {\n    // Click on images to select\n    this.editorElement.addEventListener(\"click\", (e) => {\n      // The controls sit inside the editor; their clicks are not a deselect.\n      if (this.resizeContainer?.contains(e.target)) return;\n      if (e.target.tagName === \"IMG\") {\n        this.selectImage(e.target);\n      } else {\n        this.deselectImage();\n      }\n    });\n\n    // Click outside to deselect\n    document.addEventListener(\"click\", (e) => {\n      if (!this.editorElement.contains(e.target) &&\n        (!this.resizeContainer || !this.resizeContainer.contains(e.target))) {\n        this.deselectImage();\n      }\n    });\n\n    // Resize drag handling\n    this.resizeContainer?.addEventListener(\"mousedown\", (e) => {\n      if (e.target.classList.contains(\"resize-handle\")) {\n        this.startResize(e);\n      }\n    });\n\n    document.addEventListener(\"mousemove\", (e) => {\n      if (this.isResizing) this.doResize(e);\n    });\n\n    document.addEventListener(\"mouseup\", () => {\n      if (this.isResizing) this.endResize();\n    });\n  }\n\n  selectImage(img) {\n    this.selectedImage = img;\n    this.showControls();\n    this.updateButtonStates();\n  }\n\n  deselectImage() {\n    this.selectedImage = null;\n    if (this.resizeContainer) {\n      this.resizeContainer.style.display = \"none\";\n    }\n  }\n\n  showControls() {\n    if (!this.selectedImage || !this.resizeContainer) return;\n\n    const imgRect = this.selectedImage.getBoundingClientRect();\n    const editorRect = this.editorElement.getBoundingClientRect();\n\n    this.resizeContainer.style.display = \"block\";\n    this.resizeContainer.style.left = (imgRect.left - editorRect.left) + \"px\";\n    this.resizeContainer.style.top = (imgRect.top - editorRect.top) + \"px\";\n    this.resizeContainer.style.width = imgRect.width + \"px\";\n    this.resizeContainer.style.height = imgRect.height + \"px\";\n  }\n\n  // The image's own style is the state; nothing is cached, so content typed,\n  // pasted or imported elsewhere reads back correctly.\n  currentAlignment() {\n    const style = this.selectedImage?.style;\n    if (!style) return { position: 'left', wrap: false };\n\n    if (style.float === 'left' || style.float === 'right') {\n      return { position: style.float, wrap: true };\n    }\n    if (style.marginLeft === 'auto' && style.marginRight === 'auto') {\n      return { position: 'center', wrap: false };\n    }\n    if (style.marginLeft === 'auto') return { position: 'right', wrap: false };\n    // Everything else, including an image pasted or imported with no style of\n    // its own, reads as left: that is where it renders.\n    return { position: 'left', wrap: false };\n  }\n\n  updateButtonStates() {\n    if (!this.selectedImage || !this.resizeContainer) return;\n\n    const { position, wrap } = this.currentAlignment();\n\n    this.resizeContainer.querySelectorAll('.alignment-btn').forEach(btn =>\n      btn.classList.remove('active')\n    );\n    this.resizeContainer.querySelector(`.alignment-btn-${position}`)?.classList.add('active');\n\n    // Wrapping is a float, and a float has no centred form.\n    const wrapBtn = this.resizeContainer.querySelector('.alignment-btn-wrap');\n    wrapBtn.disabled = !WRAPPED_STYLE_KEYS[position];\n    wrapBtn.classList.toggle('active', wrap);\n  }\n\n  alignImage(position, wrap) {\n    if (!this.selectedImage || !this.editor) return;\n\n    const styleKey = styleKeyFor(position, wrap);\n\n    // Preserve current dimensions\n    const currentWidth = this.selectedImage.style.width;\n    const currentHeight = this.selectedImage.style.height;\n\n    let newStyle = IMAGE_ALIGNMENT_STYLES[styleKey];\n    if (currentWidth) newStyle += ` width: ${currentWidth};`;\n    if (currentHeight) newStyle += ` height: ${currentHeight};`;\n\n    this.selectedImage.style.cssText = newStyle;\n\n    // Update TipTap\n    const chain = this.editor.chain().focus().updateAttributes(\"image\", {\n      style: this.selectedImage.style.cssText,\n      align: WRAP_ALIGN_ATTRIBUTES[styleKey] || null\n    });\n    // Position names are TextAlign's own values. A wrapped image is placed by\n    // the float/align pair instead: aligning its paragraph would move the\n    // wrapping text too.\n    if (!wrap) chain.setTextAlign(position);\n    chain.run();\n\n    this.updateButtonStates();\n    setTimeout(() => this.showControls(), 10);\n  }\n\n  startResize(e) {\n    this.isResizing = true;\n    this.startX = e.clientX;\n    this.startY = e.clientY;\n    this.startWidth = this.selectedImage.offsetWidth;\n    this.startHeight = this.selectedImage.offsetHeight;\n    this.aspectRatio = this.selectedImage.naturalWidth / this.selectedImage.naturalHeight;\n\n    document.body.style.cursor = \"se-resize\";\n    document.body.style.userSelect = \"none\";\n  }\n\n  doResize(e) {\n    if (!this.isResizing || !this.selectedImage) return;\n\n    const deltaX = e.clientX - this.startX;\n    const deltaY = e.clientY - this.startY;\n    const deltaMax = Math.max(Math.abs(deltaX), Math.abs(deltaY / this.aspectRatio));\n    let newWidth = Math.max(50, this.startWidth + (deltaX > 0 ? deltaMax : -deltaMax));\n    if (this.maxWidth) {\n      newWidth = Math.min(newWidth, this.maxWidth);\n    }\n    const newHeight = newWidth / this.aspectRatio;\n\n    this.selectedImage.style.width = newWidth + \"px\";\n    this.selectedImage.style.height = newHeight + \"px\";\n\n    this.resizeContainer.style.width = newWidth + \"px\";\n    this.resizeContainer.style.height = newHeight + \"px\";\n  }\n\n  endResize() {\n    this.isResizing = false;\n    document.body.style.cursor = \"\";\n    document.body.style.userSelect = \"\";\n\n    if (this.selectedImage && this.editor) {\n      const width = this.selectedImage.style.width;\n      const height = this.selectedImage.style.height;\n\n      this.editor.chain().focus().updateAttributes(\"image\", {\n        style: this.selectedImage.style.cssText,\n        width: width.replace('px', ''),\n        height: height.replace('px', '')\n      }).run();\n    }\n\n    this.showControls();\n  }\n\n  destroy() {\n    if (this.resizeContainer && this.editorElement?.contains(this.resizeContainer)) {\n      this.editorElement.removeChild(this.resizeContainer);\n    }\n    this.selectedImage = null;\n    this.resizeContainer = null;\n  }\n}\n\n\nexport function createImageResizer(editor, editorElement, maxWidth = 0) {\n  return new ImageResizerClass(editor, editorElement, maxWidth);\n}\n\n","// What to do with one email image's width, decided from the full input space:\n// attribute (absent | integer | other) x inline width (absent | px | auto | other).\n// Outlook ignores max-width and reads the width attribute, except that a CSS\n// width (auto included) beats the attribute. The same rules as the backfill\n// command (backfill_email_image_widths.py) — change them together.\n//\n//                 | inline absent      | inline px p          | inline auto        | inline other (%…)\n// attr absent     | probe              | p>col: set col       | probe              | leave\n// attr integer a  | a>col: set col     |   else leave         | set min(a,col)     | leave\n// attr other (%…) | leave              |                      | set attr as-is     | leave\n//\n// Every \"set\" also strips inline width/height and the height attribute, so the\n// new width is not overridden or distorted. \"probe\" means: measure the natural\n// size, then set min(natural, col).\n\n// The effective inline width, following the cascade (!important, then last).\n// {px}, {auto}, {other} for a percentage or another unit, null when absent.\n// This is a pattern, not a CSS parser: comments are stripped first, and a style\n// carrying a string or url() is reported {other} so nothing touches it — the\n// backend's tinycss2 could read further, but \"leave it alone\" can break nothing.\nexport const inlineWidth = (style) => {\n  style = (style || \"\").replace(/\\/\\*[\\s\\S]*?\\*\\//g, \" \");\n  if (/[\"']|url\\(/i.test(style)) return { other: true };\n  const re = /(?:^|;)\\s*width\\s*:\\s*([^;!]+?)\\s*(!important)?\\s*(?=;|$)/gi;\n  let match,\n    last = null;\n  while ((match = re.exec(style))) if (!last || match[2] || !last[2]) last = match;\n  if (!last) return null;\n  const value = last[1].trim();\n  if (/^auto$/i.test(value)) return { auto: true };\n  const px = /^([\\d.]+)px$/i.exec(value);\n  return px ? { px: Math.ceil(parseFloat(px[1])) } : { other: true };\n};\n\n// Only a bare integer is a px width; parseInt would read \"100%\" as 100.\nconst integerAttribute = (widthAttribute) => (/^\\d+$/.test(widthAttribute || \"\") ? parseInt(widthAttribute, 10) : null);\n\nconst SIZE_DECLARATIONS = /(^|;)\\s*(width|height)\\s*:[^;]*/gi;\n\nexport const stripSizeDeclarations = (style) =>\n  (style || \"\").replace(SIZE_DECLARATIONS, \"\").replace(/^;\\s*/, \"\").trim() || null;\n\n// -> { action: \"leave\" } | { action: \"probe\" } | { action: \"set\", width }\n// where width is a number, or the attribute's own string when it is kept as written.\nexport const decideEmailImageWidth = (widthAttribute, style, column) => {\n  const inline = inlineWidth(style);\n  if (inline?.other) return { action: \"leave\" }; // the author's layout, not ours to touch\n  if (inline && \"px\" in inline) {\n    // 0 is a real value (a hidden spacer), so the check is presence, not truthiness.\n    return inline.px > column ? { action: \"set\", width: column } : { action: \"leave\" };\n  }\n  const attribute = integerAttribute(widthAttribute);\n  if (inline?.auto) {\n    // The auto defeats the attribute, so drop it; an attribute keeps saying what it said.\n    if (attribute !== null) return { action: \"set\", width: Math.min(attribute, column) };\n    if (widthAttribute) return { action: \"set\", width: widthAttribute };\n    return { action: \"probe\" };\n  }\n  if (attribute !== null) return attribute > column ? { action: \"set\", width: column } : { action: \"leave\" };\n  if (widthAttribute) return { action: \"leave\" }; // \"100%\": the author's, as on the backend\n  return { action: \"probe\" };\n};\n","// Custom table extension for email HTML import with bgcolor, style, width, height support\nimport { Node, Extension, mergeAttributes } from \"@tiptap/core\";\n\n// Common email HTML attributes to preserve\nconst EMAIL_ATTRIBUTES = {\n  bgcolor: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"bgcolor\"),\n    renderHTML: (attributes) => {\n      if (!attributes.bgcolor) return {};\n      return { bgcolor: attributes.bgcolor };\n    },\n  },\n  style: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"style\"),\n    renderHTML: (attributes) => {\n      if (!attributes.style) return {};\n      return { style: attributes.style };\n    },\n  },\n  width: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"width\"),\n    renderHTML: (attributes) => {\n      if (!attributes.width) return {};\n      return { width: attributes.width };\n    },\n  },\n  height: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"height\"),\n    renderHTML: (attributes) => {\n      if (!attributes.height) return {};\n      return { height: attributes.height };\n    },\n  },\n  align: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"align\"),\n    renderHTML: (attributes) => {\n      if (!attributes.align) return {};\n      return { align: attributes.align };\n    },\n  },\n  valign: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"valign\"),\n    renderHTML: (attributes) => {\n      if (!attributes.valign) return {};\n      return { valign: attributes.valign };\n    },\n  },\n  border: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"border\"),\n    renderHTML: (attributes) => {\n      if (!attributes.border) return {};\n      return { border: attributes.border };\n    },\n  },\n  cellpadding: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"cellpadding\"),\n    renderHTML: (attributes) => {\n      if (!attributes.cellpadding) return {};\n      return { cellpadding: attributes.cellpadding };\n    },\n  },\n  cellspacing: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"cellspacing\"),\n    renderHTML: (attributes) => {\n      if (!attributes.cellspacing) return {};\n      return { cellspacing: attributes.cellspacing };\n    },\n  },\n  colspan: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"colspan\"),\n    renderHTML: (attributes) => {\n      if (!attributes.colspan) return {};\n      return { colspan: attributes.colspan };\n    },\n  },\n  rowspan: {\n    default: null,\n    parseHTML: (element) => element.getAttribute(\"rowspan\"),\n    renderHTML: (attributes) => {\n      if (!attributes.rowspan) return {};\n      return { rowspan: attributes.rowspan };\n    },\n  },\n};\n\n// Table node\nconst EmailTable = Node.create({\n  name: \"emailTable\",\n  group: \"block\",\n  content: \"emailTableRow+\",\n\n  parseHTML() {\n    return [{ tag: \"table\" }];\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return [\"table\", mergeAttributes(HTMLAttributes), 0];\n  },\n\n  addAttributes() {\n    return {\n      ...EMAIL_ATTRIBUTES,\n    };\n  },\n});\n\n// Table row node\nconst EmailTableRow = Node.create({\n  name: \"emailTableRow\",\n  content: \"(emailTableCell | emailTableHeader)+\",\n\n  parseHTML() {\n    return [{ tag: \"tr\" }];\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return [\"tr\", mergeAttributes(HTMLAttributes), 0];\n  },\n\n  addAttributes() {\n    return {\n      bgcolor: EMAIL_ATTRIBUTES.bgcolor,\n      style: EMAIL_ATTRIBUTES.style,\n      height: EMAIL_ATTRIBUTES.height,\n      align: EMAIL_ATTRIBUTES.align,\n      valign: EMAIL_ATTRIBUTES.valign,\n    };\n  },\n});\n\n// Table cell node\nconst EmailTableCell = Node.create({\n  name: \"emailTableCell\",\n  content: \"block+\",\n  // Enter on an empty paragraph lifts it out of a non-isolating cell and the schema\n  // repair mints a new cell, so typed text jumps to a new column. Same as tiptap's own TableCell.\n  isolating: true,\n\n  parseHTML() {\n    return [{ tag: \"td\" }];\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return [\"td\", mergeAttributes(HTMLAttributes), 0];\n  },\n\n  addAttributes() {\n    return {\n      ...EMAIL_ATTRIBUTES,\n    };\n  },\n});\n\n// Table header cell node\nconst EmailTableHeader = Node.create({\n  name: \"emailTableHeader\",\n  content: \"block+\",\n  isolating: true,\n\n  parseHTML() {\n    return [{ tag: \"th\" }];\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return [\"th\", mergeAttributes(HTMLAttributes), 0];\n  },\n\n  addAttributes() {\n    return {\n      ...EMAIL_ATTRIBUTES,\n    };\n  },\n});\n\n// Extension to add style/bgcolor to paragraphs, headings, and other block elements\nconst EmailBlockAttributes = Extension.create({\n  name: \"emailBlockAttributes\",\n\n  addGlobalAttributes() {\n    return [\n      {\n        types: [\"paragraph\", \"heading\", \"blockquote\", \"listItem\"],\n        attributes: {\n          bgcolor: {\n            default: null,\n            parseHTML: (element) => element.getAttribute(\"bgcolor\"),\n            renderHTML: (attributes) => {\n              if (!attributes.bgcolor) return {};\n              return { bgcolor: attributes.bgcolor };\n            },\n          },\n          style: {\n            default: null,\n            parseHTML: (element) => element.getAttribute(\"style\"),\n            renderHTML: (attributes) => {\n              if (!attributes.style) return {};\n              return { style: attributes.style };\n            },\n          },\n        },\n      },\n    ];\n  },\n});\n\n// Div support for email layouts\nconst EmailDiv = Node.create({\n  name: \"emailDiv\",\n  group: \"block\",\n  content: \"block+\",\n\n  parseHTML() {\n    return [{ tag: \"div\" }];\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return [\"div\", mergeAttributes(HTMLAttributes), 0];\n  },\n\n  addAttributes() {\n    return {\n      bgcolor: EMAIL_ATTRIBUTES.bgcolor,\n      style: EMAIL_ATTRIBUTES.style,\n      width: EMAIL_ATTRIBUTES.width,\n      align: EMAIL_ATTRIBUTES.align,\n    };\n  },\n});\n\n\n// Export all extensions as a single array for easy inclusion\nconst EmailExtensions = [\n  EmailTable,\n  EmailTableRow,\n  EmailTableCell,\n  EmailTableHeader,\n  EmailDiv,\n  EmailBlockAttributes,\n];\n\nexport default EmailExtensions;\n","module.exports = Promise.all([require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"3nQvj\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"jZLek\"))]).then(() => parcelRequire('2OEOD'));","\"use strict\";\n\nvar cacheLoader = require('../cacheLoader');\nmodule.exports = cacheLoader(function (bundle) {\n  return new Promise(function (resolve, reject) {\n    // Don't insert the same script twice (e.g. if it was already in the HTML)\n    var existingScripts = document.getElementsByTagName('script');\n    if ([].concat(existingScripts).some(function (script) {\n      return script.src === bundle;\n    })) {\n      resolve();\n      return;\n    }\n    var preloadLink = document.createElement('link');\n    preloadLink.href = bundle;\n    preloadLink.rel = 'preload';\n    preloadLink.as = 'script';\n    document.head.appendChild(preloadLink);\n    var script = document.createElement('script');\n    script.async = true;\n    script.type = 'text/javascript';\n    script.src = bundle;\n    script.onerror = function (e) {\n      var error = new TypeError(\"Failed to fetch dynamically imported module: \".concat(bundle, \". Error: \").concat(e.message));\n      script.onerror = script.onload = null;\n      script.remove();\n      reject(error);\n    };\n    script.onload = function () {\n      script.onerror = script.onload = null;\n      resolve();\n    };\n    document.getElementsByTagName('head')[0].appendChild(script);\n  });\n});","\"use strict\";\n\nvar cachedBundles = {};\nvar cachedPreloads = {};\nvar cachedPrefetches = {};\nfunction getCache(type) {\n  switch (type) {\n    case 'preload':\n      return cachedPreloads;\n    case 'prefetch':\n      return cachedPrefetches;\n    default:\n      return cachedBundles;\n  }\n}\nmodule.exports = function (loader, type) {\n  return function (bundle) {\n    var cache = getCache(type);\n    if (cache[bundle]) {\n      return cache[bundle];\n    }\n    return cache[bundle] = loader.apply(null, arguments).catch(function (e) {\n      delete cache[bundle];\n      throw e;\n    });\n  };\n};","module.exports = Promise.all([require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"3nQvj\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"4vlhK\"))]).then(() => parcelRequire('jQNkf'));","const dayjs = require(\"dayjs\");\nvar utc = require(\"dayjs/plugin/utc\");\nvar timezone = require(\"dayjs/plugin/timezone\");\nvar isoWeek = require(\"dayjs/plugin/isoWeek\");\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isoWeek);\n\n// Cute pastel colors for calendar events (background color classes)\nconst CALENDAR_COLORS = [\n  { bg: \"bg-blue-100\", border: \"border-blue-200\" },\n  { bg: \"bg-pink-100\", border: \"border-pink-200\" },\n  { bg: \"bg-green-100\", border: \"border-green-200\" },\n  { bg: \"bg-purple-100\", border: \"border-purple-200\" },\n  { bg: \"bg-amber-100\", border: \"border-amber-200\" },\n  { bg: \"bg-cyan-100\", border: \"border-cyan-200\" },\n  { bg: \"bg-rose-100\", border: \"border-rose-200\" },\n  { bg: \"bg-teal-100\", border: \"border-teal-200\" },\n];\n\nexport default ({ initialCurrentDate, userLocale = \"en\", initialStartTime = \"09:00\", initialEndTime = \"10:00\" }) => {\n  // Configure Day.js locale based on user preference\n  const locale = userLocale === \"tr\" ? \"tr\" : \"en\";\n  dayjs.locale(locale);\n\n  return {\n    inProgress: false,\n    currentDate: initialCurrentDate ? dayjs(initialCurrentDate) : dayjs(),\n    startTime: initialStartTime,\n    endTime: initialEndTime,\n    locale: locale,\n    selectedTimezone: null, // Will be set from the timezone selector\n\n    // Get color for a calendar based on its index\n    getCalendarColor(index) {\n      return CALENDAR_COLORS[index % CALENDAR_COLORS.length];\n    },\n\n    // Get localized day names for calendar header\n    getLocalizedDayNames() {\n      const dayNames = [];\n      // Start with Monday (ISO week)\n      for (let i = 1; i <= 7; i++) {\n        const day = dayjs().isoWeekday(i);\n        dayNames.push(day.format(\"dd\")); // Short day names like \"Mo\", \"Tu\", etc.\n      }\n      return dayNames;\n    },\n\n    processEvents(events) {\n      // Sort events by start time using valueOf() for reliable comparison\n      const sortedEvents = [...events].sort((a, b) => {\n        const startA = this.convertToLocalTime(\n          a.when.start_time,\n          a.when.start_timezone,\n        );\n        const startB = this.convertToLocalTime(\n          b.when.start_time,\n          b.when.start_timezone,\n        );\n        return startA.valueOf() - startB.valueOf();\n      });\n\n      // Track overlapping groups - need to track the maximum end time of the group\n      const groups = [];\n      let currentGroup = [];\n      let groupMaxEnd = null;\n\n      for (const event of sortedEvents) {\n        const eventStart = this.convertToLocalTime(\n          event.when.start_time,\n          event.when.start_timezone,\n        );\n        const eventEnd = this.convertToLocalTime(\n          event.when.end_time,\n          event.when.end_timezone,\n        );\n\n        // If currentGroup is empty or event overlaps with the group's time span\n        if (currentGroup.length === 0) {\n          currentGroup.push({ event, column: 0 });\n          groupMaxEnd = eventEnd;\n        } else {\n          // Check if event starts before the group's maximum end time (any overlap)\n          if (eventStart.isBefore(groupMaxEnd)) {\n            // Find first available column where no overlap exists\n            let column = 0;\n            while (\n              currentGroup.some(\n                (item) =>\n                  item.column === column &&\n                  this.eventsOverlap(item.event, event),\n              )\n            ) {\n              column++;\n            }\n            currentGroup.push({ event, column });\n            // Update group's max end time if this event ends later\n            if (eventEnd.isAfter(groupMaxEnd)) {\n              groupMaxEnd = eventEnd;\n            }\n          } else {\n            // No overlap with group, start new group\n            groups.push(currentGroup);\n            currentGroup = [{ event, column: 0 }];\n            groupMaxEnd = eventEnd;\n          }\n        }\n      }\n\n      if (currentGroup.length > 0) {\n        groups.push(currentGroup);\n      }\n\n      return groups;\n    },\n\n    eventsOverlap(event1, event2) {\n      const start1 = this.convertToLocalTime(\n        event1.when.start_time,\n        event1.when.start_timezone,\n      );\n      const end1 = this.convertToLocalTime(\n        event1.when.end_time,\n        event1.when.end_timezone,\n      );\n      const start2 = this.convertToLocalTime(\n        event2.when.start_time,\n        event2.when.start_timezone,\n      );\n      const end2 = this.convertToLocalTime(\n        event2.when.end_time,\n        event2.when.end_timezone,\n      );\n\n      // Two events overlap if one starts before the other ends\n      return start1.isBefore(end2) && start2.isBefore(end1);\n    },\n\n    // Get horizontal positioning for overlapping events (left/width)\n    getEventHorizontalStyle(event, events) {\n      const groups = this.processEvents(events);\n      let eventGroup;\n\n      // Find which group contains this event\n      for (let i = 0; i < groups.length; i++) {\n        const group = groups[i];\n        const foundEvent = group.find((item) => item.event.id === event.id);\n        if (foundEvent) {\n          eventGroup = group;\n          break;\n        }\n      }\n\n      // Default: full width with margin for spacing from grid lines\n      if (!eventGroup || eventGroup.length <= 1) {\n        return {\n          width: \"calc(100% - 12px)\",\n          left: \"6px\",\n        };\n      }\n\n      const maxColumns = Math.max(...eventGroup.map((item) => item.column)) + 1;\n      const eventData = eventGroup.find((item) => item.event.id === event.id);\n      const column = eventData.column;\n\n      // Calculate horizontal position as percentages - events share full width evenly\n      const widthPercent = 100 / maxColumns;\n      const leftPercent = column * widthPercent;\n\n      return {\n        width: `calc(${widthPercent}% - 12px)`,\n        left: `calc(${leftPercent}% + 6px)`,\n      };\n    },\n\n    // Combined absolute positioning for events (top, height, left, width as percentages)\n    getEventAbsoluteStyle(event, events) {\n      // Vertical positioning: percentage of total day (24 hours = 1440 minutes = 100%)\n      // Use native Date for reliable local time conversion (unix timestamps are UTC)\n      const startDate = new Date(event.when.start_time * 1000);\n      const endDate = new Date(event.when.end_time * 1000);\n\n      const startMinutes = startDate.getHours() * 60 + startDate.getMinutes();\n      const endMinutes = endDate.getHours() * 60 + endDate.getMinutes();\n      const durationMinutes = endMinutes - startMinutes;\n\n      // Top and height as percentage of day\n      const topPercent = (startMinutes / 1440) * 100;\n      const heightPercent = (durationMinutes / 1440) * 100;\n\n      // Horizontal positioning: get column info from overlap detection\n      const groups = this.processEvents(events);\n      let eventGroup;\n\n      for (let i = 0; i < groups.length; i++) {\n        const group = groups[i];\n        const foundEvent = group.find((item) => item.event.id === event.id);\n        if (foundEvent) {\n          eventGroup = group;\n          break;\n        }\n      }\n\n      let leftPercent = 0;\n      let widthPercent = 100;\n\n      if (eventGroup && eventGroup.length > 1) {\n        const maxColumns = Math.max(...eventGroup.map((item) => item.column)) + 1;\n        const eventData = eventGroup.find((item) => item.event.id === event.id);\n        const column = eventData.column;\n\n        widthPercent = 100 / maxColumns;\n        leftPercent = column * widthPercent;\n      }\n\n      return {\n        top: `${topPercent}%`,\n        height: `${heightPercent}%`,\n        left: `calc(${leftPercent}% + 2px)`,\n        width: `calc(${widthPercent}% - 4px)`,\n      };\n    },\n\n    // Simple event style - just vertical positioning via grid-row\n    getEventStyle(event) {\n      return {\n        \"grid-row\": `${this.getGridRow(event)} / span ${this.getGridSpan(event)}`,\n      };\n    },\n\n    // Grid-based event style for vertical positioning (uses grid-row)\n    getEventGridStyle(event) {\n      return {\n        \"grid-row\": `${this.getGridRow(event)} / span ${this.getGridSpan(event)}`,\n        \"grid-column\": \"1\",\n      };\n    },\n\n    // Get overlay style for selected time slot (matches events grid with header row)\n    getSelectedTimeOverlayStyle() {\n      const [startHours, startMinutes] = this.startTime.split(\":\").map(Number);\n      const [endHours, endMinutes] = this.endTime.split(\":\").map(Number);\n\n      // Grid row calculation: each hour has 12 slots (5-minute intervals)\n      // +2 for initial offset (header row) - must match getGridRow calculation\n      const startRow = startHours * 12 + Math.floor(startMinutes / 5) + 2;\n\n      // Calculate duration in 5-minute slots\n      const startTotalMinutes = startHours * 60 + startMinutes;\n      const endTotalMinutes = endHours * 60 + endMinutes;\n      const durationMinutes = endTotalMinutes - startTotalMinutes;\n      const span = Math.ceil(durationMinutes / 5);\n\n      return {\n        \"grid-row\": `${startRow} / span ${span}`,\n      };\n    },\n\n    // --- Meeting room availability -------------------------------------------\n    // The server returns only busy time ranges for the selected room; the\n    // provider's free/busy API carries no titles or participants, so there is\n    // nothing else to render even if we wanted to.\n    selectedRoomId: \"\",\n    roomBusy: [],\n    roomUnavailable: false,\n\n    fetchRoomBusy() {\n      this.roomUnavailable = false;\n      if (!this.selectedRoomId) {\n        this.roomBusy = [];\n        return;\n      }\n      const dayStart = this.currentDate.startOf(\"day\").unix();\n      fetch(`/scheduling/rooms/${this.selectedRoomId}/busy/${dayStart}/`)\n        .then(async (response) => {\n          if (!response.ok) {\n            // A room deleted on the provider side is deactivated server-side;\n            // flag it here so the picker stops promising availability.\n            if (response.status === 404) this.roomUnavailable = true;\n            throw new Error(`Room availability failed with ${response.status}`);\n          }\n          return response.json();\n        })\n        .then((data) => {\n          this.roomBusy = data.busy || [];\n        })\n        .catch(() => {\n          this.roomBusy = [];\n        });\n    },\n\n    clearRoom() {\n      this.selectedRoomId = \"\";\n      this.roomBusy = [];\n      this.roomUnavailable = false;\n    },\n\n    getRoomBusyStyle(slot) {\n      const start = this.convertToLocalTime(slot.start_time);\n      const end = this.convertToLocalTime(slot.end_time);\n      const startRow = start.hour() * 12 + Math.floor(start.minute() / 5) + 2;\n      const span = Math.max(1, Math.ceil(end.diff(start, \"minute\") / 5));\n      return { \"grid-row\": `${startRow} / span ${span}` };\n    },\n\n    // True when the currently picked slot overlaps a booking on the room.\n    get roomConflict() {\n      if (!this.selectedRoomId || this.roomBusy.length === 0) return false;\n      const [startHours, startMinutes] = this.startTime.split(\":\").map(Number);\n      const [endHours, endMinutes] = this.endTime.split(\":\").map(Number);\n      const selectedStart = startHours * 60 + startMinutes;\n      const selectedEnd = endHours * 60 + endMinutes;\n\n      return this.roomBusy.some((slot) => {\n        const start = this.convertToLocalTime(slot.start_time);\n        const end = this.convertToLocalTime(slot.end_time);\n        const busyStart = start.hour() * 60 + start.minute();\n        const busyEnd = end.hour() * 60 + end.minute();\n        return selectedStart < busyEnd && busyStart < selectedEnd;\n      });\n    },\n\n    scrollToBusinessHours() {\n      // Wait for the next tick to ensure DOM is updated\n      this.$nextTick(() => {\n        const container = this.$refs.eventContainer;\n        if (container) {\n          // For 9 AM:\n          // - Skip header row (1.25rem)\n          // - Each hour is 12 slots (5-minute intervals)\n          // - We want to scroll to 9 * 12 = 108 slots\n          const slotHeight = (container.scrollHeight - 1.25) / 288; // Total height minus header divided by number of slots\n          const scrollPosition = 9 * 12 * slotHeight;\n          container.scrollTop = scrollPosition;\n        }\n      });\n    },\n    today() {\n      return dayjs();\n    },\n    setDate(date) {\n      this.currentDate = dayjs(date);\n    },\n    nextMonth() {\n      this.currentDate = this.currentDate.add(1, \"month\");\n    },\n    previousMonth() {\n      this.currentDate = this.currentDate.subtract(1, \"month\");\n    },\n    nextDay() {\n      this.currentDate = this.currentDate.add(1, \"day\");\n    },\n    previousDay() {\n      this.currentDate = this.currentDate.subtract(1, \"day\");\n    },\n    getSelectedTimeStyle() {\n      // Calculate grid position based on start and end time\n      const [startHours, startMinutes] = this.startTime.split(\":\").map(Number);\n      const [endHours, endMinutes] = this.endTime.split(\":\").map(Number);\n\n      // Grid row calculation: each hour has 12 slots (5-minute intervals)\n      // +2 for the initial offset (header row)\n      const startRow = startHours * 12 + Math.floor(startMinutes / 5) + 2;\n\n      // Calculate duration in 5-minute slots\n      const startTotalMinutes = startHours * 60 + startMinutes;\n      const endTotalMinutes = endHours * 60 + endMinutes;\n      const durationMinutes = endTotalMinutes - startTotalMinutes;\n      const span = Math.ceil(durationMinutes / 5);\n\n      return {\n        \"grid-row\": `${startRow} / span ${span}`,\n      };\n    },\n    getDaysArray() {\n      let startDay = this.currentDate.startOf(\"month\").startOf(\"isoWeek\");\n      let endDay = this.currentDate.endOf(\"month\").endOf(\"isoWeek\");\n      let days = [];\n      for (let day = startDay; day.isBefore(endDay); day = day.add(1, \"day\")) {\n        days.push({\n          date: day.format(\"YYYY-MM-DD\"),\n          number: day.format(\"D\"),\n          isCurrentMonth: day.month() === this.currentDate.month(),\n          isCurrentDay:\n            day.format(\"YYYY-MM-DD\") === this.currentDate.format(\"YYYY-MM-DD\"),\n          isToday: day.format(\"YYYY-MM-DD\") === dayjs().format(\"YYYY-MM-DD\"),\n          isStartOfMonth: day.date() === 1,\n          isEndOfMonth: day.date() === day.daysInMonth(),\n          isTopLeftDay: day.isSame(startDay, \"day\"),\n          isTopRightDay: day.isSame(startDay.add(6, \"day\"), \"day\"),\n          isBottomLeftDay: day.isSame(endDay.subtract(6, \"day\"), \"day\"),\n          isBottomRightDay: day.isSame(endDay, \"day\"),\n        });\n      }\n      return days;\n    },\n    unauthenticatedInterviewers: [],\n    // calendar data format: {id: string, events: array}\n    calendars: [],\n    filteredEvents(calendarData) {\n      return calendarData.events.filter((event) => {\n        const eventStart = this.convertToLocalTime(\n          event.when.start_time,\n          event.when.start_timezone,\n        );\n        const eventEnd = this.convertToLocalTime(\n          event.when.end_time,\n          event.when.end_timezone,\n        );\n        return (\n          eventStart.isSame(this.currentDate, \"day\") ||\n          eventEnd.isSame(this.currentDate, \"day\")\n        );\n      });\n    },\n    getEventClasses(event) {\n      return \"relative mt-px flex\";\n    },\n    getGridRow(event) {\n      const localTime = this.convertToLocalTime(\n        event.when.start_time,\n        event.when.start_timezone,\n      );\n      const hour = localTime.hour();\n      const minute = localTime.minute();\n      return hour * 12 + Math.floor(minute / 5) + 2; // +2 for initial offset in grid rows\n    },\n    getGridSpan(event) {\n      const startTime = this.convertToLocalTime(\n        event.when.start_time,\n        event.when.start_timezone,\n      );\n      const endTime = this.convertToLocalTime(\n        event.when.end_time,\n        event.when.end_timezone,\n      );\n      const duration = endTime.diff(startTime, \"minute\");\n      return Math.ceil(duration / 5); // Each grid row represents 5 minutes\n    },\n    formatTime(event) {\n      const localTime = this.convertToLocalTime(\n        event.when.start_time,\n        event.when.start_timezone,\n      );\n      return localTime.format(\"h:mm A\");\n    },\n    getDateTime(event) {\n      return this.convertToLocalTime(\n        event.when.start_time,\n        event.when.start_timezone,\n      ).toISOString();\n    },\n    convertToLocalTime(unixTime, timezone) {\n      // Convert unix timestamp to the selected timezone for display\n      // If selectedTimezone is set, use it; otherwise fall back to browser's timezone\n      const targetTimezone = this.selectedTimezone || dayjs.tz.guess();\n      return dayjs.unix(unixTime).tz(targetTimezone);\n    },\n    isEven(index) {\n      return index % 2 === 0;\n    },\n    /*\n     * Fetches calendar events for the given interviewer and adds them to the calendars array\n     * If the interviewer is not authenticated, adds the email to the unauthenticatedInterviewers array\n     *\n     * @param {{ email: string, name: string, id: string }} interviewer - interviewer object\n     */\n    fetchCalendars(interviewer) {\n      this.inProgress = true;\n      fetch(\n        `/scheduling/calendars/${interviewer.id}/events/${this.currentDate.startOf(\"day\").unix()}/`,\n      )\n        .then(async (response) => {\n          this.inProgress = false;\n          if (!response.ok) {\n            const data = await response.json();\n            const error = new Error(\n              `API request failed with status ${response.status}`,\n            );\n            // Attach the server response data to the error object to preserve existing error handling logic\n            Object.assign(error, data);\n            throw error;\n          }\n          return response.json();\n        })\n        .then((data) => {\n          // push data to calendars array\n          // check if the interviewer is already in the calendars array\n          // if so, update the events array\n          const index = this.calendars.findIndex(\n            (calendar) => calendar.id === interviewer.email,\n          );\n          if (index === -1) {\n            this.calendars.push({ id: interviewer.email, events: data.events });\n          } else {\n            this.calendars[index].events = data.events;\n          }\n          // Scroll to business hours after calendar data is loaded\n          this.scrollToBusinessHours();\n        })\n        .catch((error) => {\n          // If error is 400 and error.type is \"grant-needed\", push the email to unauthenticatedInterviewers\n          if (error?.error?.type === \"grant-needed\") {\n            this.unauthenticatedInterviewers.push(interviewer.email);\n          } else {\n            // Report error to sentry\n            try {\n              throw new Error(\"Unexpected Nylas error\", error);\n            } catch (err) {\n              window.Sentry &&\n                Sentry.onLoad(function () {\n                  const client = Sentry.getClient();\n                  client.captureException(err);\n                });\n            }\n          }\n        });\n    },\n    init() {\n      if (this.interviewers) {\n        this.calendars = [];\n        this.unauthenticatedInterviewers = [];\n        for (const interviewer of this.interviewers) {\n          this.fetchCalendars(interviewer);\n        }\n      }\n      this.$watch(\"interviewers, currentDate\", (value) => {\n        // For each interviewer, fetch calender events and add returned data to calendars\n        // Clean up calendars and unauthenticatedInterviewers arrays before fetching new data\n        this.calendars = [];\n        this.unauthenticatedInterviewers = [];\n        for (const interviewer of value) {\n          this.fetchCalendars(interviewer);\n        }\n      });\n\n      // Watch for start time changes\n      this.$watch(\"startTime\", (value) => {\n        if (!value) return;\n\n        // Parse the start time and add one hour\n        const [hours, minutes] = value.split(\":\");\n        const startDate = new Date(\n          2000,\n          0,\n          1,\n          parseInt(hours),\n          parseInt(minutes),\n        );\n        // Special case for 11 PM (23:00)\n        if (parseInt(hours) >= 23) {\n          // Add 45 minutes instead of 1 hour\n          this.endTime = \"23:45\";\n        } else {\n          // Normal case: add 1 hour\n          const endDate = new Date(startDate.getTime() + 60 * 60 * 1000);\n          this.endTime = `${endDate.getHours().toString().padStart(2, \"0\")}:${endDate.getMinutes().toString().padStart(2, \"0\")}`;\n        }\n      });\n\n      // Room busy blocks are day-scoped, so they follow both the picked room and\n      // the picked date.\n      this.$watch(\"selectedRoomId\", () => this.fetchRoomBusy());\n      this.$watch(\"currentDate\", () => this.fetchRoomBusy());\n\n      // Initial scroll to business hours\n      this.scrollToBusinessHours();\n    },\n  };\n};\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){\"use strict\";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,r){var o,a=function(t,n,i){void 0===i&&(i={});var r=new Date(t),o=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||\"short\",r=t+\"|\"+i,o=e[r];return o||(o=new Intl.DateTimeFormat(\"en-US\",{hour12:!1,timeZone:t,year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",timeZoneName:i}),e[r]=o),o}(n,i);return o.formatToParts(r)},u=function(e,n){for(var i=a(e,n),o=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(o[c]=parseInt(m,10))}var l=o[3],d=24===l?0:l,h=o[0]+\"-\"+o[1]+\"-\"+o[2]+\" \"+d+\":\"+o[4]+\":\"+o[5]+\":000\",v=+e;return(r.utc(h).valueOf()-(v-=v%1e3))/6e4},f=i.prototype;f.tz=function(t,e){if(void 0===t&&(t=o),!this.isValid())return this;var n,i=this.utcOffset(),a=this.toDate(),f=a.toLocaleString(\"en-US\",{timeZone:t}),s=u(+a,t);if(!Number(s))n=this.utcOffset(0,e);else if(n=r(f,{locale:this.$L}).$set(\"millisecond\",this.$ms).utcOffset(s,!0),e){var m=n.utcOffset();n=n.add(i-m,\"minute\")}return n.$x.$timezone=t,n},f.offsetName=function(t){var e=this.$x.$timezone||r.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return\"timezonename\"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=r(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\"),{locale:this.$L});return s.call(n,t,e).tz(this.$x.$timezone,!0)},r.tz=function(t,e,n){var i=n&&e,a=n||e||o,f=u(+r(),a);if(\"string\"!=typeof t)return r(t).tz(a);var s=r.utc(t,i).valueOf();if(Number.isNaN(s)){var m=r(NaN);return m.$x.$timezone=a,m}var c=function(t,e,n){var i=t-60*e*1e3,r=u(i,n);if(e===r)return[i,e];var o=u(i-=60*(r-e)*1e3,n);return r===o?[i,r]:[t-60*Math.min(r,o)*1e3,Math.max(r,o)]}(s,f,a),l=c[0],d=c[1],h=r(l).utcOffset(d);return h.$x.$timezone=a,h},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(t){o=t}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isoWeek=t()}(this,(function(){\"use strict\";var e=\"day\";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf(\"year\"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,\"week\")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return\"isoweek\"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf(\"day\"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(\"day\"):n.bind(this)(e,t)}}}));","/**\n * @fileoverview Alpine.js component for filtering job listings on career site pages.\n *\n * This component provides client-side filtering functionality for job cards by:\n * - Location (populated from DOM with UUID-based IDs)\n * - Department (populated from DOM with UUID-based IDs)\n * - Employment type (options rendered server-side via Django {% translate %} tags)\n * - Workplace type (options rendered server-side via Django {% translate %} tags)\n *\n * The component reads job data from HTML data attributes on job cards and uses\n * DOM manipulation to show/hide cards based on the selected filter criteria.\n */\n\n/**\n * @typedef {Object} FilterOption\n * @property {string} value - The filter value used for comparison\n * @property {string} label - The display label shown to users\n */\n\n/**\n * @typedef {Object} JobListFilterData\n * @property {string} selectedLocation - Currently selected location ID (UUID)\n * @property {string} selectedEmploymentType - Currently selected employment type value\n * @property {string} selectedWorkplaceType - Currently selected workplace type value\n * @property {string} selectedDepartment - Currently selected department ID (UUID)\n * @property {FilterOption[]} locations - Available location options with UUID values\n * @property {FilterOption[]} departments - Available department options with UUID values\n * @property {function(): void} init - Initialize the component and populate filter options\n * @property {function(): void} populateLocationOptions - Extract location options from DOM\n * @property {function(): void} populateDepartmentOptions - Extract department options from DOM\n * @property {function(): void} filterJobs - Apply current filters to job cards\n * @property {function(): void} updateDepartmentGroupsVisibility - Show/hide department groups based on visible jobs\n * @property {function(boolean): void} toggleNoResultsMessage - Show/hide the no results message\n * @property {function(): void} resetFilters - Clear all filters and show all jobs\n */\n\n/**\n * Alpine.js job list filter component for career site job listings.\n * Provides client-side filtering by location, department, employment type,\n * and workplace type.\n *\n * @returns {JobListFilterData} Alpine.js component data object\n */\nexport default () => {\n  console.debug(\"Alpine.js job_list_filter component instantiated\");\n\n  return {\n    // State - Filter selections\n    /** @type {string} Currently selected location ID (UUID, empty string = no filter) */\n    selectedLocation: \"\",\n\n    /** @type {string} Currently selected employment type (empty string = no filter) */\n    selectedEmploymentType: \"\",\n\n    /** @type {string} Currently selected workplace type (empty string = no filter) */\n    selectedWorkplaceType: \"\",\n\n    /** @type {string} Currently selected department ID (UUID, empty string = no filter) */\n    selectedDepartment: \"\",\n\n    // Available options - Filter choices\n    /** @type {FilterOption[]} Location options populated from job cards */\n    locations: [], // Will be populated from DOM\n\n    /** @type {FilterOption[]} Department options populated from job cards */\n    departments: [], // Will be populated from DOM\n\n    /**\n     * Initialize the Alpine.js component.\n     * Waits for DOM to be ready, then populates location and department\n     * options from job cards.\n     * Employment type and workplace type options are rendered server-side.\n     * Called automatically by Alpine.js when component is mounted.\n     *\n     * @returns {void}\n     */\n    init() {\n      console.debug(\"Alpine.js job_list_filter init() called\");\n      // Use nextTick to ensure DOM is ready\n      this.$nextTick(() => {\n        console.debug(\"Alpine.js nextTick called\");\n        // Populate location and department options from existing job cards\n        this.populateLocationOptions();\n        this.populateDepartmentOptions();\n\n        console.debug(\"Data populated:\", {\n          locations: this.locations,\n          departments: this.departments,\n        });\n      });\n    },\n\n    /**\n     * Extract location options from job card DOM elements.\n     * Reads data-location-id attributes and finds corresponding display names\n     * using the data-field-type=\"location\" attribute for identification.\n     * Updates the locations array with FilterOption objects.\n     *\n     * @returns {void}\n     */\n    populateLocationOptions() {\n      const jobCards = document.querySelectorAll(\".job-card\");\n      console.debug(\"Found job cards:\", jobCards.length);\n\n      const locationsMap = new Map();\n\n      jobCards.forEach((card, index) => {\n        const locationId = card.getAttribute(\"data-location-id\");\n\n        console.debug(`Card ${index}:`, {\n          locationId,\n          hasDataLocationId: card.hasAttribute(\"data-location-id\"),\n        });\n\n        if (locationId && locationId !== \"\") {\n          // Get the location name from the element with data-field-type=\"location\"\n          const locationElement = card.querySelector(\n            '[data-field-type=\"location\"]',\n          );\n          if (locationElement) {\n            const locationName = locationElement.textContent.trim();\n            if (locationName) {\n              locationsMap.set(locationId, locationName);\n            }\n          }\n        }\n      });\n\n      // Convert map to array of objects for Alpine.js x-for, sort by label\n      this.locations = Array.from(locationsMap.entries())\n        .map(([id, name]) => ({\n          value: id,\n          label: name,\n        }))\n        .sort((a, b) => a.label.localeCompare(b.label));\n\n      console.debug(\"Final location array:\", this.locations);\n    },\n\n    /**\n     * Extract department options from job card DOM elements.\n     * Reads data-department-id and data-department-name attributes.\n     * Jobs without a department are grouped under a translated \"Other\"\n     * section on the page, so when such cards exist an \"Other\" option\n     * (sentinel value \"__other__\") is appended, labeled with that\n     * section's header text.\n     * Updates the departments array with FilterOption objects.\n     *\n     * @returns {void}\n     */\n    populateDepartmentOptions() {\n      const jobCards = document.querySelectorAll(\".job-card\");\n      const departmentsMap = new Map();\n      let otherLabel = \"\";\n\n      jobCards.forEach((card) => {\n        const departmentId = card.getAttribute(\"data-department-id\");\n        const departmentName = card.getAttribute(\"data-department-name\");\n\n        if (departmentId && departmentName) {\n          departmentsMap.set(departmentId, departmentName);\n        } else if (!otherLabel) {\n          // Department-less jobs render under the translated \"Other\"\n          // section; reuse its header as the option label.\n          const heading = card\n            .closest(\"[data-department-group]\")\n            ?.querySelector(\"h3\");\n          otherLabel = heading ? heading.textContent.trim() : \"\";\n        }\n      });\n\n      this.departments = Array.from(departmentsMap.entries())\n        .map(([id, name]) => ({\n          value: id,\n          label: name,\n        }))\n        .sort((a, b) => a.label.localeCompare(b.label));\n\n      if (otherLabel) {\n        this.departments.push({ value: \"__other__\", label: otherLabel });\n      }\n\n      console.debug(\"Final department array:\", this.departments);\n    },\n\n    /**\n     * Apply current filter selections to job cards.\n     * Shows/hides job cards based on location, employment type, and workplace type filters.\n     * Also updates department group visibility and shows/hides no results message.\n     *\n     * @returns {void}\n     */\n    filterJobs() {\n      const jobCards = document.querySelectorAll(\".job-card\");\n      let visibleCount = 0;\n\n      jobCards.forEach((card) => {\n        const locationId = card.getAttribute(\"data-location-id\") || \"\";\n        const employmentType = card.getAttribute(\"data-employment-type\") || \"\";\n        const workplaceType = card.getAttribute(\"data-workplace-type\") || \"\";\n        const departmentId = card.getAttribute(\"data-department-id\") || \"\";\n\n        // Check if job matches all filters\n        const matchesLocation =\n          !this.selectedLocation || locationId === this.selectedLocation;\n\n        const matchesEmployment =\n          !this.selectedEmploymentType ||\n          employmentType === this.selectedEmploymentType;\n\n        const matchesWorkplace =\n          !this.selectedWorkplaceType ||\n          workplaceType === this.selectedWorkplaceType;\n\n        const matchesDepartment =\n          !this.selectedDepartment ||\n          (this.selectedDepartment === \"__other__\"\n            ? departmentId === \"\"\n            : departmentId === this.selectedDepartment);\n\n        const shouldShow =\n          matchesLocation &&\n          matchesEmployment &&\n          matchesWorkplace &&\n          matchesDepartment;\n\n        // Show/hide the card\n        if (shouldShow) {\n          card.style.display = \"\";\n          card.classList.remove(\"opacity-0\");\n          visibleCount++;\n        } else {\n          card.style.display = \"none\";\n          card.classList.add(\"opacity-0\");\n        }\n      });\n\n      // Handle department groups visibility\n      this.updateDepartmentGroupsVisibility();\n\n      // Show/hide no results message\n      this.toggleNoResultsMessage(visibleCount === 0);\n    },\n\n    /**\n     * Update department group visibility based on visible job cards.\n     * Hides department sections that have no visible jobs after filtering.\n     * Shows department sections that have at least one visible job.\n     *\n     * @returns {void}\n     */\n    updateDepartmentGroupsVisibility() {\n      const departmentGroups = document.querySelectorAll(\n        \"[data-department-group]\",\n      );\n\n      departmentGroups.forEach((group) => {\n        const visibleJobs = group.querySelectorAll(\n          '.job-card:not([style*=\"display: none\"])',\n        );\n        if (visibleJobs.length === 0) {\n          group.style.display = \"none\";\n        } else {\n          group.style.display = \"\";\n        }\n      });\n    },\n\n    /**\n     * Show or hide the \"no results found\" message.\n     * Uses the existing element in the template with proper translation.\n     *\n     * @param {boolean} show - Whether to show (true) or hide (false) the message\n     * @returns {void}\n     */\n    toggleNoResultsMessage(show) {\n      const noResultsEl = document.getElementById(\"no-filter-results\");\n\n      if (noResultsEl) {\n        if (show) {\n          noResultsEl.classList.remove(\"hidden\");\n        } else {\n          noResultsEl.classList.add(\"hidden\");\n        }\n      }\n    },\n\n    /**\n     * Reset all filter selections to empty values.\n     * Clears location, department, employment type, and workplace type filters.\n     * Automatically triggers filterJobs() to show all jobs.\n     *\n     * @returns {void}\n     */\n    resetFilters() {\n      this.selectedLocation = \"\";\n      this.selectedEmploymentType = \"\";\n      this.selectedWorkplaceType = \"\";\n      this.selectedDepartment = \"\";\n      this.filterJobs();\n    },\n  };\n};\n","/**\n * Alpine.js component for scorecard weight management\n * Handles editing, validation, and dirty state tracking for scorecard part weights\n */\n\n/**\n * Create scorecard weights Alpine.js component\n *\n * @param {Object} initialData - Initial component data\n * @param {boolean} initialData.isWeighted - Whether weights are currently enabled\n * @param {boolean} initialData.hasScoreableParts - Whether there are scoreable parts\n * @returns {Object} Alpine.js component configuration\n */\nexport function createScorecardWeightsComponent(initialData) {\n  return {\n    isWeighted: initialData.isWeighted,\n    hasScoreableParts: initialData.hasScoreableParts,\n    weights: {},\n    isDirty: false,\n    initialState: null,\n    editingPartId: null,\n\n    /**\n     * Initialize the component\n     */\n    init() {\n      this.setupBeforeUnloadHandler();\n      this.loadWeights();\n      if (!initialData.hasScoreableParts) {\n        this.isWeighted = false;\n      }\n      this.captureInitial();\n      this.setupWatchers();\n      window.__hirexScorecardWeightsDirty = false;\n    },\n\n    /**\n     * Setup beforeunload handler to warn about unsaved changes\n     */\n    setupBeforeUnloadHandler() {\n      if (window.__hirexScorecardWeightsDirty === undefined) {\n        window.__hirexScorecardWeightsDirty = false;\n        window.addEventListener(\"beforeunload\", (event) => {\n          if (window.__hirexScorecardWeightsDirty) {\n            event.preventDefault();\n            event.returnValue = \"\";\n          }\n        });\n      }\n    },\n\n    /**\n     * Load weights from JSON seed data\n     */\n    loadWeights() {\n      const dataEl = this.$refs.weightsSeed;\n      if (dataEl) {\n        try {\n          const parsed = JSON.parse(dataEl.textContent || \"{}\");\n          this.weights = this.normalizeWeights(parsed);\n        } catch (error) {\n          console.error(\"Failed to parse scorecard weights\", error);\n        }\n      }\n    },\n\n    /**\n     * Normalize weight values from parsed JSON\n     * @param {Object} parsed - Parsed weight data\n     * @returns {Object} Normalized weights\n     */\n    normalizeWeights(parsed) {\n      const normalized = {};\n      Object.keys(parsed || {}).forEach((key) => {\n        const value = parsed[key];\n        normalized[key] = value === null ? null : Number(value);\n      });\n      return normalized;\n    },\n\n    /**\n     * Setup watchers for state changes\n     */\n    setupWatchers() {\n      this.$nextTick(() => {\n        this.$watch(\"isWeighted\", () => this.updateDirty());\n        this.$watch(\"weights\", () => this.updateDirty(), { deep: true });\n      });\n    },\n\n    /**\n     * Capture initial state for dirty tracking\n     */\n    captureInitial() {\n      this.initialState = JSON.stringify({\n        isWeighted: this.isWeighted,\n        weights: this.weights,\n      });\n    },\n\n    /**\n     * Update dirty state based on current vs initial values\n     */\n    updateDirty() {\n      const currentState = JSON.stringify({\n        isWeighted: this.isWeighted,\n        weights: this.weights,\n      });\n      this.isDirty = this.initialState !== currentState;\n      window.__hirexScorecardWeightsDirty = this.isDirty;\n    },\n\n    /**\n     * Format weight for display\n     * @param {string} partId - The part ID\n     * @returns {string} Formatted weight string\n     */\n    formatWeight(partId) {\n      const val = this.weights?.[partId];\n      if (val === null || val === undefined || val === \"\") {\n        return \"--\";\n      }\n      return `%${val}`;\n    },\n\n    /**\n     * Calculate total weight percentage\n     * @returns {number} Total weight as percentage\n     */\n    totalWeight() {\n      if (!this.isWeighted) {\n        return 0;\n      }\n      return Object.values(this.weights || {}).reduce(\n        (acc, value) => acc + (Number(value) || 0),\n        0,\n      );\n    },\n\n    /**\n     * Check if there's a client-side validation error\n     * @returns {boolean} True if weights don't sum to 100%\n     */\n    hasClientError() {\n      return this.isWeighted && Math.abs(this.totalWeight() - 100) > 0.01;\n    },\n\n    /**\n     * Check if the save button should be disabled\n     * @returns {boolean} True if button should be disabled\n     */\n    isSaveButtonDisabled() {\n      return !this.isDirty || this.hasClientError() || !this.hasScoreableParts;\n    },\n  };\n}\n","/**\n * Condition Builder Alpine.js component\n *\n * Visual rule builder for automation conditions.\n * Allows users to create conditions based on form field values.\n */\n\nexport default function conditionBuilder({\n  initialConditions = {},\n  operatorsMap = {},\n  fieldsEndpointUrl = \"\",\n}) {\n  return {\n    expanded: false,\n    logic: \"AND\",\n    rules: [],\n    groups: [], // Array of {logic, rules} for nested condition groups\n    fields: [],\n    operatorsMap: operatorsMap,\n    fieldsEndpointUrl: fieldsEndpointUrl,\n    hasFields: false,\n    _initialConditions: initialConditions, // Store for later use after fields load\n    _initialConditionsApplied: false,\n\n    init() {\n      // Don't load initial conditions here - wait until fields are loaded\n      // This ensures the select dropdowns have options before values are set\n\n      // Listen for fields loaded event\n      this.$el.addEventListener(\"fields-loaded\", (e) => {\n        this.fields = e.detail.fields || [];\n        this.hasFields = this.fields.length > 0;\n        // Clear rules and groups if no fields\n        if (!this.hasFields) {\n          this.rules = [];\n          this.groups = [];\n          this.expanded = false;\n        }\n      });\n    },\n\n    // Apply initial conditions after fields are loaded\n    _applyInitialConditions() {\n      if (this._initialConditionsApplied) return;\n      const hasRules = this._initialConditions?.rules?.length > 0;\n      const hasGroups = this._initialConditions?.groups?.length > 0;\n      if (!hasRules && !hasGroups) return;\n\n      this._initialConditionsApplied = true;\n      this.logic = this._initialConditions.logic || \"AND\";\n      this.expanded = true;\n\n      // Set rules from initial conditions\n      this.rules = (this._initialConditions.rules || []).map((rule) => ({\n        field_id: rule.field_id || \"\",\n        operator: rule.operator || \"\",\n        value: rule.value ?? \"\",\n        type: rule.type || \"form_field\",\n      }));\n\n      // Set groups from initial conditions\n      this.groups = (this._initialConditions.groups || []).map((group) => ({\n        logic: group.logic || \"AND\",\n        rules: (group.rules || []).map((rule) => ({\n          field_id: rule.field_id || \"\",\n          operator: rule.operator || \"\",\n          value: rule.value ?? \"\",\n          type: rule.type || \"form_field\",\n        })),\n      }));\n\n      // Use setTimeout to wait for full DOM render cycle, then manually sync select values\n      // This is needed because Alpine's x-model on selects doesn't properly sync when\n      // both the select and its options are rendered dynamically via nested x-for\n      setTimeout(() => {\n        this._syncSelectValues();\n        // Second sync after a longer delay for value inputs that depend on field/operator\n        // The multiselect template needs field_id and operator to be set, then Alpine\n        // needs to render the options via x-for before we can sync selected values\n        setTimeout(() => {\n          this._syncSelectValues();\n        }, 150);\n      }, 0);\n    },\n\n    // Manually sync select element values to match Alpine data\n    // This fixes the x-model binding issue with dynamically rendered selects\n    _syncSelectValues() {\n      const container = this.$el;\n      if (!container) return;\n\n      // Helper to sync selects within a rule div\n      const syncRuleSelects = (ruleDiv, rule) => {\n        if (!ruleDiv || !rule) return;\n\n        // Sync field select\n        const fieldSelect = ruleDiv.querySelector(\n          'select[x-model=\"rule.field_id\"]',\n        );\n        if (fieldSelect && rule.field_id) {\n          fieldSelect.value = rule.field_id;\n        }\n\n        // Sync operator select\n        const operatorSelect = ruleDiv.querySelector(\n          'select[x-model=\"rule.operator\"]',\n        );\n        if (operatorSelect && rule.operator) {\n          operatorSelect.value = rule.operator;\n        }\n\n        // Sync value select (single select) - third select in the rule div\n        const allSelects = ruleDiv.querySelectorAll(\"select\");\n        const valueSelect = allSelects[2]; // 0=field, 1=operator, 2=value\n        if (\n          valueSelect &&\n          !valueSelect.multiple &&\n          rule.value &&\n          !Array.isArray(rule.value)\n        ) {\n          valueSelect.value = rule.value;\n        }\n\n        // Sync value multiselect\n        // Alpine's x-model on <select multiple> doesn't properly sync when options\n        // are dynamically rendered. We need to directly set the DOM selected state.\n        if (\n          valueSelect &&\n          valueSelect.multiple &&\n          Array.isArray(rule.value) &&\n          rule.value.length > 0\n        ) {\n          const valuesToSelect = new Set(rule.value);\n          Array.from(valueSelect.options).forEach((option) => {\n            option.selected = valuesToSelect.has(option.value);\n          });\n        }\n      };\n\n      // Sync top-level rules\n      this.rules.forEach((rule, index) => {\n        // Find the rule's container div (nth rule div in the first .space-y-3)\n        const topLevelRulesContainer = container.querySelector(\n          \".rounded-lg.border.border-gray-200 > .space-y-3\",\n        );\n        if (!topLevelRulesContainer) return;\n\n        const ruleDivs = topLevelRulesContainer.querySelectorAll(\n          \":scope > template + div, :scope > div[class*='flex items-start']\",\n        );\n        const ruleDiv = ruleDivs[index];\n        syncRuleSelects(ruleDiv, rule);\n      });\n\n      // Sync rules within groups\n      this.groups.forEach((group, groupIndex) => {\n        // Find the group container (bg-indigo-50 divs)\n        const groupDivs = container.querySelectorAll(\".bg-indigo-50\");\n        const groupDiv = groupDivs[groupIndex];\n        if (!groupDiv) return;\n\n        // Find rules within this group\n        const groupRuleDivs = groupDiv.querySelectorAll(\n          \".space-y-2 > template + div, .space-y-2 > div[class*='flex items-start']\",\n        );\n\n        group.rules.forEach((rule, ruleIndex) => {\n          const ruleDiv = groupRuleDivs[ruleIndex];\n          syncRuleSelects(ruleDiv, rule);\n        });\n      });\n    },\n\n    expand() {\n      this.expanded = true;\n      if (this.rules.length === 0) {\n        this.addRule();\n      }\n    },\n\n    collapse() {\n      this.expanded = false;\n    },\n\n    addRule() {\n      this.rules.push({\n        field_id: \"\",\n        operator: \"\",\n        value: \"\",\n        type: \"form_field\",\n      });\n    },\n\n    removeRule(index) {\n      this.rules.splice(index, 1);\n      // Collapse if no rules and no groups remain\n      if (this.rules.length === 0 && this.groups.length === 0) {\n        this.expanded = false;\n      }\n    },\n\n    onFieldChange(index) {\n      // Reset operator and value when field changes\n      this.rules[index].operator = \"\";\n      this.rules[index].value = \"\";\n\n      // Update type based on field\n      const field = this.getFieldById(this.rules[index].field_id);\n      if (field && field.field_type === \"DATE\") {\n        this.rules[index].type = \"form_field_date\";\n      } else {\n        this.rules[index].type = \"form_field\";\n      }\n    },\n\n    onOperatorChange(index) {\n      const rule = this.rules[index];\n\n      // Reset value when operator changes\n      if (rule.operator === \"between\") {\n        // Initialize array for between operator\n        rule.value = [null, null];\n      } else if (rule.operator === \"in\" || rule.operator === \"not_in\") {\n        // Initialize array for multi-select\n        rule.value = [];\n      } else {\n        rule.value = \"\";\n      }\n    },\n\n    // ===== Group Methods =====\n\n    addGroup() {\n      this.groups.push({\n        logic: \"AND\",\n        rules: [\n          {\n            field_id: \"\",\n            operator: \"\",\n            value: \"\",\n            type: \"form_field\",\n          },\n        ],\n      });\n    },\n\n    removeGroup(groupIndex) {\n      this.groups.splice(groupIndex, 1);\n      // Collapse if no rules and no groups\n      if (this.rules.length === 0 && this.groups.length === 0) {\n        this.expanded = false;\n      }\n    },\n\n    addRuleToGroup(groupIndex) {\n      this.groups[groupIndex].rules.push({\n        field_id: \"\",\n        operator: \"\",\n        value: \"\",\n        type: \"form_field\",\n      });\n    },\n\n    removeRuleFromGroup(groupIndex, ruleIndex) {\n      this.groups[groupIndex].rules.splice(ruleIndex, 1);\n      // If group has no rules, remove the group\n      if (this.groups[groupIndex].rules.length === 0) {\n        this.removeGroup(groupIndex);\n      }\n    },\n\n    onFieldChangeInGroup(groupIndex, ruleIndex) {\n      const rule = this.groups[groupIndex].rules[ruleIndex];\n      // Reset operator and value when field changes\n      rule.operator = \"\";\n      rule.value = \"\";\n\n      // Update type based on field\n      const field = this.getFieldById(rule.field_id);\n      if (field && field.field_type === \"DATE\") {\n        rule.type = \"form_field_date\";\n      } else {\n        rule.type = \"form_field\";\n      }\n    },\n\n    onOperatorChangeInGroup(groupIndex, ruleIndex) {\n      const rule = this.groups[groupIndex].rules[ruleIndex];\n\n      // Reset value when operator changes\n      if (rule.operator === \"between\") {\n        rule.value = [null, null];\n      } else if (rule.operator === \"in\" || rule.operator === \"not_in\") {\n        rule.value = [];\n      } else {\n        rule.value = \"\";\n      }\n    },\n\n    getFieldById(fieldId) {\n      return this.fields.find((f) => f.id === fieldId);\n    },\n\n    getOperatorsForField(fieldId) {\n      const field = this.getFieldById(fieldId);\n      if (!field) return [];\n      return this.operatorsMap[field.field_type] || [];\n    },\n\n    getFieldOptions(fieldId) {\n      const field = this.getFieldById(fieldId);\n      if (!field || !field.options) return [];\n      return field.options;\n    },\n\n    getValueInputType(fieldId, operator) {\n      if (!fieldId || !operator) return \"none\";\n\n      const field = this.getFieldById(fieldId);\n      if (!field) return \"none\";\n\n      const fieldType = field.field_type;\n      const hasOptions = field.options && field.options.length > 0;\n\n      // Handle between operator\n      if (operator === \"between\") {\n        if (fieldType === \"DATE\") return \"between_date\";\n        if (fieldType === \"NUMERIC\" || fieldType === \"SALARY_EXPECTATION\")\n          return \"between_number\";\n      }\n\n      // Handle in/not_in operators (multi-select)\n      if (operator === \"in\" || operator === \"not_in\") {\n        if (hasOptions) return \"multiselect\";\n        return \"text\"; // Fallback for text fields\n      }\n\n      // Field type specific inputs\n      switch (fieldType) {\n        case \"NUMERIC\":\n        case \"SALARY_EXPECTATION\":\n          return \"number\";\n        case \"DATE\":\n          return \"date\";\n        case \"DROPDOWN\":\n        case \"MULTIPLESELECT\":\n        case \"YESNO\":\n        case \"PRIVACY_POLICY\":\n        case \"UNIVERSITY\":\n        case \"CITY\":\n        case \"FIELD_OF_STUDY\":\n          return hasOptions ? \"select\" : \"text\";\n        case \"MULTIPLECHOICE\":\n          return hasOptions ? \"multiselect\" : \"text\";\n        case \"SHORTTEXT\":\n        case \"LONGTEXT\":\n        case \"URL\":\n        default:\n          return \"text\";\n      }\n    },\n\n    getConditionsJSON() {\n      // Helper to check if a rule is valid\n      const isValidRule = (rule) =>\n        rule.field_id &&\n        rule.operator &&\n        rule.value !== \"\" &&\n        rule.value !== null &&\n        (Array.isArray(rule.value) ? rule.value.length > 0 : true);\n\n      // Helper to serialize a rule\n      const serializeRule = (rule) => ({\n        type: rule.type,\n        field_id: rule.field_id,\n        operator: rule.operator,\n        value: rule.value,\n      });\n\n      // Filter out incomplete rules\n      const validRules = this.rules.filter(isValidRule);\n\n      // Filter and serialize groups (only include groups with valid rules)\n      const validGroups = this.groups\n        .map((group) => {\n          const groupValidRules = group.rules.filter(isValidRule);\n          if (groupValidRules.length === 0) {\n            return null;\n          }\n          return {\n            logic: group.logic,\n            rules: groupValidRules.map(serializeRule),\n          };\n        })\n        .filter((group) => group !== null);\n\n      // Return empty if nothing valid\n      if (validRules.length === 0 && validGroups.length === 0) {\n        return \"{}\";\n      }\n\n      const result = {\n        logic: this.logic,\n        rules: validRules.map(serializeRule),\n      };\n\n      // Only include groups if there are valid groups\n      if (validGroups.length > 0) {\n        result.groups = validGroups;\n      }\n\n      return JSON.stringify(result);\n    },\n\n    // Method to load fields from endpoint\n    async loadFields(informationFormId) {\n      if (!informationFormId || !this.fieldsEndpointUrl) {\n        this.fields = [];\n        this.hasFields = false;\n        this.rules = [];\n        this.groups = [];\n        this.expanded = false;\n        return;\n      }\n\n      const url = this.fieldsEndpointUrl.replace(\n        \"__FORM_ID__\",\n        informationFormId,\n      );\n      try {\n        const response = await fetch(url, {\n          headers: {\n            \"HX-Request\": \"true\",\n          },\n        });\n        if (response.ok) {\n          const data = await response.json();\n          this.fields = data.fields || [];\n          this.hasFields = this.fields.length > 0;\n\n          // Apply initial conditions after fields are loaded\n          // This ensures select dropdowns have options before values are set\n          if (this.hasFields) {\n            this._applyInitialConditions();\n          }\n        }\n      } catch (error) {\n        console.error(\"Failed to load form fields:\", error);\n        this.fields = [];\n        this.hasFields = false;\n      }\n    },\n  };\n}\n","/**\n * @fileoverview Alpine component for the candidates (applications) list shell.\n *\n * Owns the URL <-> table contract for the page: every filter/sort/pagination change\n * pushes a querystring and reloads the `#applications_table_isle` via htmx, and the\n * sidebar's nested filter components call back into these methods.\n *\n * Config (see ApplicationsList.get_context_data) arrives as a JSON blob so no Django\n * template values live in this file.\n *\n * @param {Object} config\n * @param {string} config.searchUrl - page URL, what gets pushed to the address bar\n * @param {string} config.tableUrl - table isle endpoint\n * @param {string} config.legacyCandidateListUrl - legacy table, for the escape hatch\n * @param {string} config.applicationDetailUrlTpl - slideover URL with an `__APP_ID__` placeholder\n * @param {string} config.candidateDetailUrlTpl - slideover URL with a `__CAND_ID__` placeholder\n * @param {string} config.colsStorageKey - localStorage key for the visible columns\n * @param {string} config.oneRowStorageKey - localStorage key for \"Show one row per candidate\"\n * @param {string} config.oneRowParam - isle-fetch flag sent while that setting is on\n * @param {string} config.caseResponsesParam\n * @param {string} config.orgCustomFieldResponsesParam\n * @param {string} config.savedFieldResponsesParam\n * @param {string} config.jobFieldResponsesParam\n * @param {string} config.caseEmptyStatusValue\n * @param {string} config.caseOverdueStatusValue\n * @param {string} config.rowSelectIdPrefix - row checkbox id prefix, `<prefix><candidate_id>[-<application_id>]`\n */\nexport default function applications_list(config) {\n  return {\n    config,\n    // Nested filter components call these methods, so `this.$el` would be *their* element.\n    // Every page-wide DOM read/dispatch goes through this instead.\n    rootEl: null,\n    redirectingToLegacyTable: false,\n    tableLoading: false,\n    // Set by the isle's own htmx:before-swap guard, which also stops the global error modal.\n    tableFailed: false,\n    sidebarCollapsed: JSON.parse(localStorage.getItem(\"filterSidebarCollapsed\") || \"false\"),\n    mobileFiltersOpen: false,\n    showOnlyMyJobs: new URLSearchParams(window.location.search).get(\"my_jobs\") === \"true\",\n    search: new URLSearchParams(window.location.search).get(\"search\") || \"\",\n    // Visible columns: localStorage is the source of truth; `_cols` rides only on isle/save fetches, never the address bar.\n    cols: [],\n    // Like cols: localStorage only, rides on isle fetches as `oneRowParam`.\n    oneRowPerCandidate: JSON.parse(localStorage.getItem(config.oneRowStorageKey) || \"false\"),\n    // Pagination settings dialog; held here so it survives the isle reload its toggles trigger.\n    settingsOpen: false,\n    // Byproduct snapshots of the last collect* call; stale the moment a box is ticked. Re-collect instead of trusting them.\n    currentlyHighlyProbableSelectedCandidateIds: [],\n    currentlyHighlyProbableSelectedApplicationIds: [],\n    currentlyHighlyProbableSelectedRowCount: 0,\n\n    init() {\n      this.rootEl = this.$el;\n\n      const goLegacy = () => {\n        this.redirectingToLegacyTable = true;\n        // Keep ?candidate_id etc. so deep links still open the slideover on the legacy page.\n        window.location.href = this.config.legacyCandidateListUrl + window.location.search;\n      };\n      if (!this.$store.candidate_listing_settings.get(\"use_new_candidates_page\")) goLegacy();\n      this.$watch(\"$store.candidate_listing_settings.use_new_candidates_page\", (v) => {\n        if (!v) goLegacy();\n      });\n\n      // Columns: hydrate from localStorage, then do the ONE initial table load carrying _cols. No static\n      // hx-trigger load, so nothing races to render the default set over this on a hard refresh.\n      this.initCols();\n      // Before the first fetch, so neither the table request nor the sidebar sees the junk.\n      this.dropMalformedCaseFilters();\n      this.dropMalformedEavFieldFilters(this.config.orgCustomFieldResponsesParam);\n      this.dropMalformedEavFieldFilters(this.config.savedFieldResponsesParam);\n      this.dropMalformedEavFieldFilters(this.config.jobFieldResponsesParam);\n      this.dropMalformedEavFieldFilters(this.config.scorecardResponsesParam);\n      this.dropNonUuidTokens(\"company\");\n      this.dropNonUuidTokens(\"sector\");\n      this.dropNonUuidTokens(\"school\");\n      this.dropNonUuidTokens(\"field_of_study\");\n      this.dropNonUuidTokens(\"location\");\n      this.reloadTable();\n\n      this.$watch(\"oneRowPerCandidate\", (on) => {\n        localStorage.setItem(this.config.oneRowStorageKey, JSON.stringify(on));\n        this.reloadTable();\n      });\n\n      // Restore slideover from URL (?application_id / ?candidate_id); $nextTick + window dispatch so slideover is mounted.\n      this.$nextTick(() => this.restoreSlideoverFromUrl());\n    },\n\n    // $dispatch would fire from the calling (nested) element; keep the page-level events on the root.\n    _dispatch(name, detail) {\n      this.rootEl.dispatchEvent(\n        new CustomEvent(name, { detail, bubbles: true, composed: true, cancelable: true }),\n      );\n    },\n\n    // Fresh read of the ticked row checkboxes, parsed from their ids.\n    _collectSelectedRows() {\n      const prefix = this.config.rowSelectIdPrefix;\n      const checkboxes = this.rootEl.querySelectorAll(`input[type=\"checkbox\"][id^=\"${prefix}\"]:checked`);\n      const rows = [];\n      for (const checkbox of checkboxes) {\n        const [candidateId, applicationId] = checkbox.id.slice(prefix.length).split(\"-\");\n        rows.push({ candidateId, applicationId });\n      }\n      return rows;\n    },\n\n    // Ticks and table swaps both change what's selected; re-collect fresh.\n    collectSelection() {\n      this.collectSelectedCandidateIds();\n      this.collectSelectedApplicationIds();\n      this.collectSelectedRowCount();\n    },\n\n    collectSelectedRowCount() {\n      const rowCount = this._collectSelectedRows().length;\n      this.currentlyHighlyProbableSelectedRowCount = rowCount;\n      return rowCount;\n    },\n\n    collectSelectedCandidateIds() {\n      const candidateIds = [];\n      for (const row of this._collectSelectedRows()) {\n        // One candidate can have several ticked application rows.\n        if (!candidateIds.includes(row.candidateId)) candidateIds.push(row.candidateId);\n      }\n      this.currentlyHighlyProbableSelectedCandidateIds = candidateIds;\n      return candidateIds;\n    },\n\n    collectSelectedApplicationIds() {\n      const applicationIds = [];\n      for (const row of this._collectSelectedRows()) {\n        // App-less candidate rows have no application id.\n        if (row.applicationId) applicationIds.push(row.applicationId);\n      }\n      this.currentlyHighlyProbableSelectedApplicationIds = applicationIds;\n      return applicationIds;\n    },\n\n    // Selection-bar actions request through these two, so the fresh selection rides along without each action wiring it.\n    // `source` is the action's <form>: its fields (files too, multipart via enctype) are sent with `values` on top.\n    sendBulkAction(url, { source, target, values = {} }) {\n      return this._requestWithSelection(\"POST\", url, { source, target, values });\n    },\n\n    // GET twin, for selection-dependent bits of an action's UI (e.g. the mail template picker).\n    loadForSelection(url, { source, target }) {\n      return this._requestWithSelection(\"GET\", url, { source, target, values: {} });\n    },\n\n    _requestWithSelection(verb, url, { source, target, values }) {\n      return htmx.ajax(verb, url, {\n        source,\n        target,\n        swap: \"innerHTML\",\n        values: { ...values, candidates: this.collectSelectedCandidateIds() },\n      });\n    },\n\n    _detailUrlFor(params) {\n      const appId = params.get(\"application_id\");\n      const candId = params.get(\"candidate_id\");\n      if (appId) {\n        return (\n          this.config.applicationDetailUrlTpl.replace(\"__APP_ID__\", encodeURIComponent(appId)) +\n          window.location.search\n        );\n      }\n      if (candId) {\n        return (\n          this.config.candidateDetailUrlTpl.replace(\"__CAND_ID__\", encodeURIComponent(candId)) +\n          window.location.search\n        );\n      }\n      return null;\n    },\n\n    _defaultCols() {\n      try {\n        return JSON.parse(document.getElementById(\"applications-default-cols\").textContent);\n      } catch (e) {\n        return [];\n      }\n    },\n\n    _catalogCols() {\n      try {\n        return JSON.parse(document.getElementById(\"applications-catalog-cols\").textContent);\n      } catch (e) {\n        return [];\n      }\n    },\n\n    // ponytail: one-shot fixup, keyed off a marker so it runs once per browser. Arrays stored before\n    // `_cols` became order-significant are in historical checkbox-click order, so without this every\n    // existing user's table silently reshuffles on the first load after deploy. Per-org keys aren't\n    // in the published catalog, so they land at the end — fine for a fixup, and reorderable after.\n    _normalizeStoredColOrder(cols) {\n      if (localStorage.getItem(this.config.colsOrderNormalizedKey) === \"1\") return cols;\n      localStorage.setItem(this.config.colsOrderNormalizedKey, \"1\");\n      const catalog = this._catalogCols();\n      if (catalog.length === 0) return cols;\n      const inCatalog = catalog.filter((key) => cols.includes(key));\n      const rest = cols.filter((key) => !catalog.includes(key));\n      return [...inCatalog, ...rest];\n    },\n\n    initCols() {\n      const stored = localStorage.getItem(this.config.colsStorageKey);\n      if (!stored) {\n        this.cols = this._defaultCols();\n        return;\n      }\n      try {\n        this.cols = JSON.parse(stored);\n      } catch (e) {\n        this.cols = this._defaultCols();\n        return;\n      }\n      // Persist the fixup, since views_header reads this key on its own for the dirty check.\n      const normalized = this._normalizeStoredColOrder(this.cols);\n      if (normalized.join(\",\") === this.cols.join(\",\")) return;\n      this.cols = normalized;\n      localStorage.setItem(this.config.colsStorageKey, JSON.stringify(this.cols));\n    },\n\n    colsParam() {\n      return this.cols.join(\",\");\n    },\n\n    // Commit a staged column selection (from the picker's Apply): persist + one table reload.\n    applyCols(newCols) {\n      this.cols = [...newCols];\n      localStorage.setItem(this.config.colsStorageKey, JSON.stringify(this.cols));\n      this.reloadTable();\n    },\n\n    setColsFromView(csv) {\n      // null/undefined (e.g. 'All candidates') -> defaults; '' -> explicitly none; else the view's set.\n      if (csv === null || csv === undefined) this.cols = this._defaultCols();\n      else this.cols = csv ? csv.split(\",\").filter(Boolean) : [];\n      localStorage.setItem(this.config.colsStorageKey, JSON.stringify(this.cols));\n    },\n\n    reloadTable() {\n      return this._pushAndReloadTable(new URLSearchParams(window.location.search));\n    },\n\n    isMobile() {\n      return window.matchMedia(\"(max-width: 767px)\").matches;\n    },\n\n    toggleSidebar() {\n      if (this.isMobile()) {\n        this.mobileFiltersOpen = !this.mobileFiltersOpen;\n      } else {\n        this.sidebarCollapsed = !this.sidebarCollapsed;\n        localStorage.setItem(\"filterSidebarCollapsed\", JSON.stringify(this.sidebarCollapsed));\n      }\n    },\n\n    submitFilters() {\n      const params = new URLSearchParams(window.location.search);\n      if (this.search) params.set(\"search\", this.search);\n      else params.delete(\"search\");\n      if (this.showOnlyMyJobs) params.set(\"my_jobs\", \"true\");\n      else params.delete(\"my_jobs\");\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n    },\n\n    filterChanged(filterKey) {\n      const params = new URLSearchParams(window.location.search);\n      const checked = this.rootEl.querySelectorAll(`input[name='${filterKey}']:checked`);\n      const values = [...checked].map((cb) => cb.value);\n      if (values.length) params.set(filterKey, \"|||\" + values.join(\"|||\"));\n      else params.delete(filterKey);\n      // switching jobs invalidates stage ids from the previous pipeline and question ids from its application form.\n      if (filterKey === \"jobs\") {\n        params.delete(\"stages\");\n        params.delete(this.config.jobFieldResponsesParam);\n      }\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n      this._dispatch(\"filter-state-changed\", { filterKey });\n    },\n\n    singleSelectChanged(filterKey) {\n      const params = new URLSearchParams(window.location.search);\n      const radio = this.rootEl.querySelector(`input[name='${filterKey}']:checked`);\n      if (radio && radio.value) params.set(filterKey, radio.value);\n      else params.delete(filterKey);\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n      this._dispatch(\"filter-state-changed\", { filterKey });\n    },\n\n    textFilterChanged(filterKey, value) {\n      const params = new URLSearchParams(window.location.search);\n      if (value) params.set(filterKey, value);\n      else params.delete(filterKey);\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n      this._dispatch(\"filter-state-changed\", { filterKey });\n    },\n\n    // Min/max pair in one reload, so clearing both doesn't fetch the table twice.\n    rangeFilterChanged(minKey, min, maxKey, max) {\n      const params = new URLSearchParams(window.location.search);\n      if (min !== \"\") params.set(minKey, min);\n      else params.delete(minKey);\n      if (max !== \"\") params.set(maxKey, max);\n      else params.delete(maxKey);\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n      this._dispatch(\"filter-state-changed\", { filterKey: minKey });\n    },\n\n    clearSingleFilter(filterKey) {\n      const params = new URLSearchParams(window.location.search);\n      params.delete(filterKey);\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n      this._dispatch(\"filter-state-changed\", { filterKey });\n    },\n\n    // Case filter: one JSON array param holding a {field_id, value?, score__gte?, score__lte?} entry per case.\n    caseFilters() {\n      try {\n        const raw = new URLSearchParams(window.location.search).get(this.config.caseResponsesParam);\n        const parsed = JSON.parse(raw);\n        return Array.isArray(parsed) ? parsed : [];\n      } catch (e) {\n        return [];\n      }\n    },\n\n    dropMalformedCaseFilters() {\n      const params = new URLSearchParams(window.location.search);\n      if (params.get(this.config.caseResponsesParam) === null) return;\n      const entries = this.caseFilters();\n      const usable = entries.filter((entry) => entry && entry.field_id);\n      if (entries.length && usable.length === entries.length) return;\n      if (usable.length) params.set(this.config.caseResponsesParam, JSON.stringify(usable));\n      else params.delete(this.config.caseResponsesParam);\n      const query = params.toString();\n      history.replaceState(null, \"\", this.config.searchUrl + (query ? \"?\" + query : \"\"));\n    },\n\n    // Company/sector/school/field of study/location filters are id-based. A leftover name (saved view or bookmark from before the\n    // canonical pool) can't be checked, counted or cleared in the sidebar, so drop it on arrival.\n    dropNonUuidTokens(filterKey) {\n      const params = new URLSearchParams(window.location.search);\n      if (params.get(filterKey) === null) return;\n      const tokens = (params.get(filterKey) || \"\").split(\"|||\").filter(Boolean);\n      const usable = tokens.filter((token) =>\n        /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(token),\n      );\n      if (usable.length === tokens.length) return;\n      if (usable.length) params.set(filterKey, \"|||\" + usable.join(\"|||\"));\n      else params.delete(filterKey);\n      const query = params.toString();\n      history.replaceState(null, \"\", this.config.searchUrl + (query ? \"?\" + query : \"\"));\n    },\n\n    caseFilterChanged(caseId, entry) {\n      const params = new URLSearchParams(window.location.search);\n      const next = { field_id: caseId };\n      // Status options carry a comma-joined bucket of real statuses; the two sentinels stay scalar\n      // because BaseCaseFilter resolves them specially.\n      if (entry.value) {\n        const sentinels = [this.config.caseEmptyStatusValue, this.config.caseOverdueStatusValue];\n        if (sentinels.includes(entry.value)) {\n          next.value = entry.value;\n        } else {\n          next.value = entry.value.split(\",\");\n          next.lookup = \"in\";\n        }\n      }\n      if (entry.score__gte !== \"\" && entry.score__gte !== null && entry.score__gte !== undefined) {\n        next.score__gte = parseFloat(entry.score__gte);\n      }\n      if (entry.score__lte !== \"\" && entry.score__lte !== null && entry.score__lte !== undefined) {\n        next.score__lte = parseFloat(entry.score__lte);\n      }\n      const others = this.caseFilters().filter((e) => e && e.field_id !== caseId);\n      // field_id alone means nothing is set for that case — drop the entry instead of storing a no-op.\n      const all = Object.keys(next).length > 1 ? [...others, next] : others;\n      if (all.length) params.set(this.config.caseResponsesParam, JSON.stringify(all));\n      else params.delete(this.config.caseResponsesParam);\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n      this._dispatch(\"filter-state-changed\", { filterKey: this.config.caseResponsesParam });\n    },\n\n    // Scorecard filter: one JSON array param holding a\n    // {field_id, value?, decision?, score__gte?, score__lte?} entry per scorecard template.\n    // Reads/scrubs through the param-generic eavFieldFilters helpers below; only the entry shape differs.\n    scorecardFilterChanged(scorecardId, entry) {\n      const paramKey = this.config.scorecardResponsesParam;\n      const params = new URLSearchParams(window.location.search);\n      const next = { field_id: scorecardId };\n      if (entry.value) next.value = entry.value;\n      if (entry.decision) next.decision = entry.decision;\n      if (entry.score__gte !== \"\" && entry.score__gte !== null && entry.score__gte !== undefined) {\n        next.score__gte = parseFloat(entry.score__gte);\n      }\n      if (entry.score__lte !== \"\" && entry.score__lte !== null && entry.score__lte !== undefined) {\n        next.score__lte = parseFloat(entry.score__lte);\n      }\n      const others = this.eavFieldFilters(paramKey).filter((e) => e && e.field_id !== scorecardId);\n      // field_id alone means nothing is set for that scorecard — drop the entry instead of storing a no-op.\n      const all = Object.keys(next).length > 1 ? [...others, next] : others;\n      if (all.length) params.set(paramKey, JSON.stringify(all));\n      else params.delete(paramKey);\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n      this._dispatch(\"filter-state-changed\", { filterKey: paramKey });\n    },\n\n    // Server told us some scorecard entries name templates it ignored (deleted, or hidden from this\n    // user). Drop them from the URL only — the rendered table already excluded them, so a reload would\n    // fetch identical rows. replaceState, so the stale URL doesn't become a back-button destination.\n    dropStaleScorecardFilters(ids) {\n      const paramKey = this.config.scorecardResponsesParam;\n      const params = new URLSearchParams(window.location.search);\n      if (params.get(paramKey) === null || !ids || !ids.length) return;\n      const stale = new Set(ids.map(String));\n      const kept = this.eavFieldFilters(paramKey).filter(\n        (entry) => entry && !stale.has(String(entry.field_id)),\n      );\n      if (kept.length) params.set(paramKey, JSON.stringify(kept));\n      else params.delete(paramKey);\n      const query = params.toString();\n      history.replaceState(null, \"\", this.config.searchUrl + (query ? \"?\" + query : \"\"));\n      // So the section badge stops counting them and any open row re-reads its (now absent) entry.\n      this._dispatch(\"filter-state-changed\", { filterKey: paramKey });\n    },\n\n    // EAV field filters (org custom fields, screening questions): one JSON array param each, holding\n    // {field_id, value, lookup} entries — a range field owns two of them.\n    eavFieldFilters(paramKey) {\n      try {\n        const parsed = JSON.parse(new URLSearchParams(window.location.search).get(paramKey));\n        return Array.isArray(parsed) ? parsed : [];\n      } catch (e) {\n        return [];\n      }\n    },\n\n    dropMalformedEavFieldFilters(paramKey) {\n      const params = new URLSearchParams(window.location.search);\n      if (params.get(paramKey) === null) return;\n      const entries = this.eavFieldFilters(paramKey);\n      const usable = entries.filter((entry) => entry && entry.field_id);\n      if (entries.length && usable.length === entries.length) return;\n      if (usable.length) params.set(paramKey, JSON.stringify(usable));\n      else params.delete(paramKey);\n      const query = params.toString();\n      history.replaceState(null, \"\", this.config.searchUrl + (query ? \"?\" + query : \"\"));\n    },\n\n    eavFieldChanged(paramKey, fieldId, entries) {\n      const params = new URLSearchParams(window.location.search);\n      const others = this.eavFieldFilters(paramKey).filter(\n        (entry) => entry && String(entry.field_id) !== String(fieldId),\n      );\n      const all = [...others, ...entries];\n      if (all.length) params.set(paramKey, JSON.stringify(all));\n      else params.delete(paramKey);\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n      this._dispatch(\"filter-state-changed\", { filterKey: paramKey });\n    },\n\n    dateFilterChanged(filterKey) {\n      const params = new URLSearchParams(window.location.search);\n      params.delete(filterKey + \"_preset\");\n      params.delete(filterKey + \"_from\");\n      params.delete(filterKey + \"_to\");\n      const radio = this.rootEl.querySelector(`input[name='${filterKey}_preset']:checked`);\n      if (radio) {\n        params.set(filterKey + \"_preset\", radio.value);\n        if (radio.value === \"custom\") {\n          const fromEl = this.rootEl.querySelector(`input[name='${filterKey}_from']`);\n          const toEl = this.rootEl.querySelector(`input[name='${filterKey}_to']`);\n          if (fromEl && fromEl.value) params.set(filterKey + \"_from\", fromEl.value);\n          if (toEl && toEl.value) params.set(filterKey + \"_to\", toEl.value);\n        }\n      }\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n      this._dispatch(\"filter-state-changed\", { filterKey });\n    },\n\n    clearDateFilter(filterKey) {\n      const params = new URLSearchParams(window.location.search);\n      params.delete(filterKey + \"_preset\");\n      params.delete(filterKey + \"_from\");\n      params.delete(filterKey + \"_to\");\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n      this._dispatch(\"filter-state-changed\", { filterKey });\n    },\n\n    handleSort(orderKey) {\n      const params = new URLSearchParams(window.location.search);\n      const current = params.get(\"order\") || \"\";\n      const next = current === orderKey ? \"-\" + orderKey : orderKey;\n      params.set(\"order\", next);\n      params.delete(\"order_dir\");\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n    },\n\n    clearSort() {\n      const params = new URLSearchParams(window.location.search);\n      params.delete(\"order\");\n      params.delete(\"order_dir\");\n      params.delete(\"page\");\n      this._pushAndReloadTable(params);\n    },\n\n    handlePageClick(pageNum) {\n      const params = new URLSearchParams(window.location.search);\n      params.set(\"page\", pageNum);\n      // Drop slideover view-state so paginating doesn't re-open a detail that isn't on the new page.\n      params.delete(\"application_id\");\n      params.delete(\"candidate_id\");\n      this._pushAndReloadTable(params);\n    },\n\n    clearFilters() {\n      this.search = \"\";\n      this.showOnlyMyJobs = false;\n      this._pushAndReloadTable(new URLSearchParams());\n      this._dispatch(\"filter-state-changed\", { cleared: true });\n    },\n\n    refresh() {\n      this._pushAndReloadTable(new URLSearchParams(window.location.search));\n    },\n\n    // Saved views: applying a view pushes its filter querystring and reloads the table + sidebar.\n    applyView(detail) {\n      const viewParams = new URLSearchParams(detail.encodedUrl);\n      this.search = viewParams.get(\"search\") || \"\";\n      this.showOnlyMyJobs = viewParams.get(\"my_jobs\") === \"true\";\n      // Restore the view's columns (cols=null for 'All candidates' -> defaults) before the reload picks up _cols.\n      this.setColsFromView(detail.cols);\n      this._pushAndReloadTable(viewParams);\n      this._dispatch(\"filter-state-changed\", { cleared: true });\n    },\n\n    refreshSlideover() {\n      const detailUrl = this._detailUrlFor(new URLSearchParams(window.location.search));\n      if (!detailUrl) return;\n      // ponytail: source = the indicator, never body. Body-sourced htmx.ajax poisons htmx 1.9's body\n      // request-counter (wiped mid-flight when body's class hash changes), leaving `htmx-request` stuck\n      // on body forever → skeleton pinned over every slideover.\n      htmx.ajax(\"GET\", detailUrl, {\n        source: document.getElementById(\"slideover-indicator\"),\n        target: \"#slideover-content\",\n      });\n    },\n\n    restoreSlideoverFromUrl() {\n      const detailUrl = this._detailUrlFor(new URLSearchParams(window.location.search));\n      if (!detailUrl) return;\n      const closingCallback = () => {\n        const u = new URL(window.location);\n        u.searchParams.delete(\"application_id\");\n        u.searchParams.delete(\"candidate_id\");\n        window.history.replaceState(null, \"\", u.toString());\n        window.dispatchEvent(new CustomEvent(\"candidate-slideover-closed\"));\n      };\n      window.dispatchEvent(\n        new CustomEvent(\"open-slideover\", { detail: { size: \"xl\", closingCallback } }),\n      );\n      htmx.ajax(\"GET\", detailUrl, {\n        source: document.getElementById(\"slideover-indicator\"),\n        target: \"#slideover-content\",\n      });\n    },\n\n    // Focus the search input on \"/\" (ignore when typing in inputs/textareas/contenteditable).\n    handleSlashKey(event) {\n      if (event.key !== \"/\") return;\n      const t = event.target;\n      const tag = t && t.tagName ? t.tagName.toLowerCase() : \"\";\n      if (tag === \"input\" || tag === \"textarea\" || tag === \"select\" || (t && t.isContentEditable)) return;\n      event.preventDefault();\n      this.$refs.searchInput && this.$refs.searchInput.focus();\n    },\n\n    _pushAndReloadTable(params) {\n      const query = params.toString();\n      // Address bar stays clean (filters only, no _cols).\n      history.pushState(null, \"\", this.config.searchUrl + (query ? \"?\" + query : \"\"));\n      // The isle fetch carries _cols so the server renders the right columns.\n      const fetchParams = new URLSearchParams(params);\n      fetchParams.set(\"_cols\", this.colsParam());\n      if (this.oneRowPerCandidate) fetchParams.set(this.config.oneRowParam, \"1\");\n      this.tableLoading = true;\n      this.tableFailed = false;\n      // ponytail: source = the component root, never body — keeps htmx's request-counter off <body> so it\n      // can't get stuck. Table loading UX is driven by tableLoading, not the htmx-request class.\n      return htmx\n        .ajax(\"GET\", this.config.tableUrl + \"?\" + fetchParams.toString(), {\n          source: this.rootEl,\n          target: \"#applications_table_isle\",\n          swap: \"innerHTML\",\n        })\n        .finally(() => {\n          this.tableLoading = false;\n          this.collectSelection();\n        });\n    },\n  };\n}\n","/** Mobile (≤ md) applications list shell: stage picker, search, sort / filters / fields sheets and the\n * card list loaded from the `job-applications-mobile` fragment. Lives inside candidates_table's\n * Alpine scope (uses its `openSlideover`) and shares the URL params with the desktop table.\n */\nexport default ({\n  listUrl, // mobile fragment url\n  baseUrl, // page url the params are pushed onto\n  filterUrl, // filter-detail url (chip + panel), `&id=<field>` appended\n  rejected, // bool: rejected-applications page\n  storageKey, // localStorage key for the compact-line fields\n  catalog, // [{id, label}] card fields, in display order\n  sortOptions, // [{value, label}]\n  filterNames, // {fieldId: name}\n}) => ({\n  sheet: null, // 'sort' | 'filters' | 'fields'\n  mobileSearch: new URLSearchParams(window.location.search).get(\"search\") || \"\",\n  order: new URLSearchParams(window.location.search).get(\"order\") || \"\",\n  mobileCount: null,\n  fieldSearch: \"\",\n  catalog,\n  sortOptions,\n  filterNames,\n  // compact-line fields, per job\n  fields: window.Alpine.$persist([\"field_of_study\", \"school\", \"experience\"]).as(storageKey),\n\n  init() {\n    if (this.isMobile()) this.loadList();\n  },\n\n  isMobile() {\n    return window.matchMedia(\"(max-width: 767px)\").matches;\n  },\n\n  get sortLabel() {\n    const current = this.sortOptions.find((o) => o.value === this.order) || this.sortOptions[0];\n    return current.label;\n  },\n\n  listParams() {\n    const params = new URLSearchParams(window.location.search);\n    params.delete(\"page\");\n    params.delete(\"application_id\");\n    if (rejected) params.set(\"rejected\", \"true\");\n    return params;\n  },\n\n  loadList() {\n    // source: the wrapper gets htmx-request (dims the list); without one htmx marks <body> and never clears it\n    htmx.ajax(\"GET\", `${listUrl}?${this.listParams()}`, {\n      source: \"#mobile-list-indicator\",\n      target: \"#mobile-list\",\n      swap: \"innerHTML\",\n    });\n  },\n\n  // Table swaps (filter chips, desktop search) push the URL; reload the cards from it.\n  onSettled(event) {\n    if (!this.isMobile()) return;\n    const id = event.detail.target?.id;\n    if (id === \"candidates_table_wrapper\") this.loadList();\n    if (id === \"mobile-list\") {\n      this.mobileCount = document.getElementById(\"mobile-list-count\")?.dataset.count ?? this.mobileCount;\n    }\n  },\n\n  pushParam(key, value) {\n    const params = new URLSearchParams(window.location.search);\n    value ? params.set(key, value) : params.delete(key);\n    params.delete(\"page\");\n    history.pushState(null, \"\", `${baseUrl}?${params}`);\n    this.loadList();\n  },\n\n  setOrder(value) {\n    this.order = value;\n    this.sheet = null;\n    this.pushParam(\"order\", value);\n  },\n\n  toggleField(id) {\n    const next = this.fields.includes(id) ? this.fields.filter((f) => f !== id) : [...this.fields, id];\n    // keep catalog order so line1/line2 stay stable\n    this.fields = this.catalog.map((c) => c.id).filter((c) => next.includes(c));\n  },\n\n  get activeFilterIds() {\n    return this.$store.filterFields.fields.filter((id) => this.filterNames[id]);\n  },\n\n  // Same flow as the desktop \"Add Filter\" menu: append the chip, then its panel opens.\n  addFilter(fieldId) {\n    this.sheet = null;\n    if (this.$store.filterFields.has(fieldId)) {\n      this.$dispatch(\"open-filter-panel\", fieldId);\n      return;\n    }\n    htmx\n      .ajax(\"GET\", `${filterUrl}&id=${fieldId}&is_open=true`, { source: \"#filters\", target: \"#filters\", swap: \"beforeend\" })\n      .then(() => this.$store.filterFields.add(fieldId));\n  },\n\n  clearFilters() {\n    window.location.assign(baseUrl);\n  },\n});\n","// Alpine components for the AI Interview Notebook (candidate detail → Interviews tab).\n// Registered via Alpine.data in index.js so they exist before htmx swaps the tab in —\n// inline <script> definitions in swapped partials lose the race against Alpine's\n// MutationObserver (htmx defers script eval to its settle phase).\n\n// List ↔ detail navigation: two layers on the same surface. Scroll resets when\n// entering the detail and is restored on back.\nexport function interviewsNav() {\n  return {\n    view: \"list\",\n    _listScroll: 0,\n    _pendingDetail: false,\n\n    _scroller() {\n      return this.$root.closest('[role=\"tabpanel\"]') || document.documentElement;\n    },\n    // The row click fires the htmx request; the surface only flips once the\n    // content has actually swapped in (onDetailLoaded) — flipping immediately\n    // showed a spinner/stale-content blink and made everything re-render in view.\n    openDetail() {\n      this._listScroll = this._scroller().scrollTop;\n      this._pendingDetail = true;\n    },\n    onDetailLoaded(evt) {\n      if (!this._pendingDetail) return;\n      if (!evt.detail || !evt.detail.target || evt.detail.target.id !== \"interviews-detail-panel\") return;\n      this._pendingDetail = false;\n      this.view = \"detail\";\n      this.$nextTick(() => {\n        this._scroller().scrollTop = 0;\n      });\n    },\n    goList() {\n      this._pendingDetail = false;\n      this.view = \"list\";\n      this.$nextTick(() => {\n        this._scroller().scrollTop = this._listScroll;\n      });\n    },\n    onEscape(evt) {\n      if (this.view !== \"detail\") return; // at list level Escape keeps closing the candidate panel\n      const chatPanel = this.$root.querySelector(\".iv-chat-panel\");\n      if (chatPanel && getComputedStyle(chatPanel).display !== \"none\") return; // chat drawer closes first\n      evt.stopPropagation();\n      this.goList();\n    },\n  };\n}\n\n// Autosave controller for one notes document. Each contenteditable line carries\n// data-block-id + data-edit-url; saves are per-line and debounced. Per-block save\n// rhythm: yellow dot while a change is pending, green dot once saved (fades after\n// ~2.2s). The document label at the top follows the same rhythm.\nexport function notesEditor(opts) {\n  return {\n    blockStates: {}, // blockId -> dirty | saving | saved | error\n    everTouched: false, // pristine docs show \"Last edited: …\" instead of \"Saved\"\n    _timers: {},\n    _fadeTimers: {},\n\n    docState() {\n      const states = Object.values(this.blockStates);\n      if (states.includes(\"error\")) return \"error\";\n      if (states.includes(\"dirty\") || states.includes(\"saving\")) return \"dirty\";\n      return this.everTouched ? \"saved\" : \"idle\";\n    },\n    hasDot(blockId) {\n      return this.blockStates[blockId] !== undefined;\n    },\n    dotClass(blockId) {\n      const state = this.blockStates[blockId];\n      if (state === \"error\") return \"bg-red-600\";\n      if (state === \"saved\") return \"bg-[#40C4AA]\";\n      return \"bg-[#F2AE40]\";\n    },\n    _setState(blockId, state) {\n      clearTimeout(this._fadeTimers[blockId]);\n      if (state === null) {\n        delete this.blockStates[blockId];\n        return;\n      }\n      this.blockStates[blockId] = state;\n      if (state === \"saved\") {\n        this._fadeTimers[blockId] = setTimeout(() => {\n          if (this.blockStates[blockId] === \"saved\") delete this.blockStates[blockId];\n        }, 2200);\n      }\n    },\n\n    onEdit(el) {\n      this.everTouched = true;\n      const blockId = el.dataset.blockId;\n      this._setState(blockId, \"dirty\");\n      clearTimeout(this._timers[blockId]);\n      this._timers[blockId] = setTimeout(() => this.saveBlock(el), 1200);\n    },\n    onBlur(el) {\n      const blockId = el.dataset.blockId;\n      if (this._timers[blockId] !== undefined) {\n        clearTimeout(this._timers[blockId]);\n        this.saveBlock(el);\n      }\n    },\n    async saveBlock(el) {\n      const blockId = el.dataset.blockId;\n      delete this._timers[blockId];\n      this._setState(blockId, \"saving\");\n      try {\n        const resp = await fetch(el.dataset.editUrl, {\n          method: \"POST\",\n          headers: { \"X-CSRFToken\": opts.csrf, \"Content-Type\": \"application/x-www-form-urlencoded\" },\n          body: new URLSearchParams({ text: el.innerText }),\n        });\n        if (!resp.ok) throw new Error(\"save failed: \" + resp.status);\n        // A newer keystroke may already have re-dirtied the block.\n        if (this._timers[blockId] === undefined && this.blockStates[blockId] === \"saving\") {\n          this._setState(blockId, \"saved\");\n        }\n      } catch (e) {\n        this._setState(blockId, \"error\");\n      }\n    },\n    // htmx add/delete rows persist server-side immediately; nothing to track per\n    // block, but a failed one should surface on the doc label.\n    onStructureChange(evt) {\n      const detail = evt.detail || {};\n      const path = (detail.pathInfo && detail.pathInfo.requestPath) || \"\";\n      if (path.indexOf(\"/notes/blocks/\") === -1) return;\n      if (detail.successful) this.everTouched = true;\n      else this._setState(\"__structure__\", \"error\");\n    },\n  };\n}\n\n// \"Ask about this interview\": one persisted thread per user per recording,\n// streamed over SSE (fetch + reader — same transport as the main AI chat).\nexport function interviewChat(opts) {\n  return {\n    messages: opts.messages || [],\n    draft: \"\",\n    busy: false,\n    // The drawer opens on click/focus or on send — never on load (it would\n    // overlay the notes the user came to read).\n    open: false,\n\n    init() {\n      this.$watch(\"open\", (opened) => {\n        if (opened) this.scrollDown();\n      });\n    },\n    renderMarkdown(text) {\n      if (window.marked && window.DOMPurify) {\n        return window.DOMPurify.sanitize(window.marked.parse(text || \"\"));\n      }\n      const div = document.createElement(\"div\");\n      div.textContent = text || \"\";\n      return div.innerHTML;\n    },\n    async send() {\n      const text = this.draft.trim();\n      if (!text || this.busy) return;\n      this.draft = \"\";\n      this.open = true;\n      this.busy = true;\n      this.messages.push({ role: \"user\", text: text });\n      this.scrollDown();\n      try {\n        const resp = await fetch(opts.turnUrl, {\n          method: \"POST\",\n          headers: { \"Content-Type\": \"application/json\", \"X-CSRFToken\": opts.csrf },\n          body: JSON.stringify({ message: text }),\n        });\n        if (!resp.ok || !resp.body) throw new Error(\"turn failed: \" + resp.status);\n        const reader = resp.body.getReader();\n        const decoder = new TextDecoder();\n        let buffer = \"\";\n        for (;;) {\n          const { done, value } = await reader.read();\n          if (done) break;\n          buffer += decoder.decode(value, { stream: true });\n          let boundary;\n          while ((boundary = buffer.indexOf(\"\\n\\n\")) !== -1) {\n            const rawEvent = buffer.slice(0, boundary);\n            buffer = buffer.slice(boundary + 2);\n            const dataLine = rawEvent.split(\"\\n\").find((line) => line.startsWith(\"data: \"));\n            if (dataLine) this.handleFrame(JSON.parse(dataLine.slice(6)));\n          }\n        }\n      } catch (e) {\n        this.messages.push({ role: \"error\", text: opts.errorMessage });\n      } finally {\n        this.busy = false;\n        this.scrollDown();\n      }\n    },\n    handleFrame(frame) {\n      if (frame.type === \"assistant\") {\n        this.messages.push({ role: \"assistant\", text: frame.content });\n        this.scrollDown();\n      } else if (frame.type === \"error\") {\n        this.messages.push({ role: \"error\", text: frame.message || opts.errorMessage });\n      }\n    },\n    scrollDown() {\n      this.$nextTick(() => {\n        const thread = this.$refs.thread;\n        if (thread) thread.scrollTop = thread.scrollHeight;\n      });\n    },\n  };\n}\n","// Mirrors one URL param into page state; the URL is the source of truth.\n// Back/Forward, reload and programmatic changes all reach onChange(value, { initial }).\nconst CHANGED_EVENT = \"urlparam:changed\";\nconst registry = new Map(); // param name -> { clearOn }\n\nfunction navigate(mutate, { push, pushedBy }) {\n  const url = new URL(window.location);\n  mutate(url.searchParams);\n  if (push) history.pushState({ pushedBy }, \"\", url);\n  else history.replaceState(history.state, \"\", url);\n  // pushState/replaceState don't fire popstate; tell every instance to re-read.\n  window.dispatchEvent(new Event(CHANGED_EVENT));\n}\n\n// Deep link landed with ?name set: slip the page without it underneath, so the first Back\n// (or clear()) closes onto the page instead of leaving the site. Call before urlParam(name).\nexport function stackOverBase(name) {\n  const url = new URL(window.location);\n  const value = url.searchParams.get(name);\n  if (value === null || history.state?.pushedBy === name) return;\n  url.searchParams.delete(name);\n  history.replaceState(null, \"\", url);\n  url.searchParams.set(name, value);\n  history.pushState({ pushedBy: name }, \"\", url);\n}\n\nexport function urlParam(name, { fallback = null, clearOn = [], resets = [], onChange }) {\n  const read = () => new URL(window.location).searchParams.get(name) ?? fallback;\n  let value = read();\n\n  const sync = () => {\n    const next = read();\n    if (next === value) return;\n    value = next;\n    onChange(value, { initial: false });\n  };\n\n  const write = (next, push) => {\n    next = next === null ? null : String(next);\n    if (next === value) return;\n    navigate(\n      (params) => {\n        // Fallback stays out of the URL: ?tab=members == no ?tab.\n        if (next === null || next === fallback) params.delete(name);\n        else params.set(name, next);\n        // Plain params this one invalidates, e.g. a tab change resets ?page.\n        for (const other of resets) params.delete(other);\n        // Same history entry drops dependents, e.g. tab change closes the tab's modal.\n        for (const [other, config] of registry) {\n          if (config.clearOn.includes(name)) params.delete(other);\n        }\n      },\n      { push, pushedBy: name },\n    );\n  };\n\n  registry.set(name, { clearOn });\n  window.addEventListener(\"popstate\", sync);\n  window.addEventListener(CHANGED_EVENT, sync);\n  onChange(value, { initial: true });\n\n  return {\n    get value() {\n      return value;\n    },\n    set: (next) => write(next, true),\n    replace: (next) => write(next, false),\n    clear() {\n      if (value === fallback) return;\n      // We pushed this entry: undo it so Back doesn't land on a closed modal.\n      if (history.state?.pushedBy === name) history.back();\n      else write(fallback, false);\n    },\n    destroy() {\n      registry.delete(name);\n      window.removeEventListener(\"popstate\", sync);\n      window.removeEventListener(CHANGED_EVENT, sync);\n    },\n  };\n}\n","import { loadSlideover } from \"../../shared/slideover.js\";\nimport { stackOverBase, urlParam } from \"../../shared/url_param.js\";\n\n/**\n * Settings → Users: tabs (?tab=), users table isle, ?user_id=<pk> user slideover, and the ?group_modal=new|<uuid> group modal.\n * The address bar is the table's state: ?tab, ?search and ?page are urlParams whose changes\n * (clicks, Back/Forward) all land in refresh(); mutations fire the load event, which does too.\n */\nexport default ({\n  tabs, // {USERS, GROUPS, GUESTS} from OrganizationUserListTab\n  tableUrl, // table isle endpoint, fetched with the address bar's params\n  userDetailUrlTemplate, // user slideover, uuidPlaceholder swapped for the user id\n  groupCreateUrl, // group create form, loaded into the modal\n  groupEditUrlTemplate, // group edit form, uuidPlaceholder swapped for the group id\n  uuidPlaceholder,\n}) => ({\n  search: \"\",\n  tabs,\n  tab: null,\n  tabParam: null,\n  searchParam: null,\n  pageParam: null,\n  refreshQueued: false,\n  refreshQuiet: false,\n  userParam: null,\n  userSlideoverKey: null, // id of the user in the open slideover, null when closed\n  groupModalOpen: false,\n  groupModalParam: null,\n\n  get isGuestUser() {\n    return this.tab === this.tabs.GUESTS;\n  },\n\n  init() {\n    this.tabParam = urlParam(\"tab\", {\n      fallback: this.tabs.USERS,\n      resets: [\"page\"],\n      onChange: (value, { initial }) => {\n        this.tab = value;\n        if (!initial) this.refresh();\n      },\n    });\n    this.searchParam = urlParam(\"search\", {\n      fallback: \"\",\n      resets: [\"page\"],\n      onChange: (value, { initial }) => {\n        this.search = value;\n        if (!initial) this.refresh();\n      },\n    });\n    this.pageParam = urlParam(\"page\", {\n      onChange: (value, { initial }) => {\n        if (!initial) this.refresh();\n      },\n    });\n    this.refresh();\n    stackOverBase(\"user_id\");\n    this.userParam = urlParam(\"user_id\", {\n      clearOn: [\"tab\"],\n      onChange: (value, { initial }) => {\n        // Our own re-push below; refetching would wipe the edits.\n        if (value && value === this.userSlideoverKey) return;\n        // On load the slideover component may not be listening yet.\n        if (value && initial) this.$nextTick(() => this.openUser(value));\n        else if (value) this.openUser(value);\n        else if (this.userSlideoverKey) this.closeUserFromBack();\n      },\n    });\n    // A tab switch drops ?group_modal in the same history entry.\n    this.groupModalParam = urlParam(\"group_modal\", {\n      clearOn: [\"tab\"],\n      onChange: (value) => {\n        if (value) this.loadGroupModal(value);\n        else this.groupModalOpen = false;\n      },\n    });\n    this.$watch(\"groupModalOpen\", (open) => {\n      if (!open) this.groupModalParam.clear();\n    });\n  },\n\n  destroy() {\n    this.tabParam.destroy();\n    this.searchParam.destroy();\n    this.pageParam.destroy();\n    this.userParam.destroy();\n    this.groupModalParam.destroy();\n  },\n\n  openUser(id) {\n    this.userSlideoverKey = id;\n    window.dispatchEvent(\n      new CustomEvent(\"open-slideover\", {\n        detail: {\n          size: \"md\",\n          // Slideover runs this twice on X/Escape/Discard (handleClose, then its isSlideoverOpen watcher);\n          // a second clear() would see our entry still on top and go Back off the page.\n          closingCallback: () => {\n            if (!this.userSlideoverKey) return;\n            this.userSlideoverKey = null;\n            this.userParam.clear();\n            // Generous: whatever changed in the slideover shows in the table.\n            this.refresh({ quiet: true });\n          },\n        },\n      }),\n    );\n    loadSlideover(userDetailUrlTemplate.replace(uuidPlaceholder, id));\n  },\n\n  // Back on an open slideover. X/save already closed it and nulled the key, so this is only Back.\n  // Dirty edits make close-slideover show \"Discard changes?\" and stay open (closingCallback not run):\n  // push ?user_id back so the URL matches; Discard then clears it like any close.\n  closeUserFromBack() {\n    window.dispatchEvent(new Event(\"close-slideover\"));\n    if (this.userSlideoverKey) this.userParam.set(this.userSlideoverKey);\n  },\n\n  // Detail/role/access edits: reload the open slideover in place; its indicator is the loading state.\n  refreshUser() {\n    if (!this.userParam.value) return;\n    loadSlideover(userDetailUrlTemplate.replace(uuidPlaceholder, this.userParam.value));\n  },\n\n  searchData() {\n    this.searchParam.set(this.search);\n  },\n\n  handlePageClick(pageNum) {\n    this.pageParam.set(pageNum);\n  },\n\n  // One navigation can change several params (tab resets page, Back undoes search + page): one fetch for all.\n  // quiet: swap in place without the spinner; only if every caller in the tick asked for it.\n  refresh({ quiet = false } = {}) {\n    this.refreshQuiet = this.refreshQueued ? this.refreshQuiet && quiet : quiet;\n    if (this.refreshQueued) return;\n    this.refreshQueued = true;\n    queueMicrotask(() => {\n      this.refreshQueued = false;\n      this._reloadTable({ quiet: this.refreshQuiet });\n    });\n  },\n\n  // Groups tab has no users table; switching back reloads it.\n  // Container as source: its htmx-request class swaps the table for a spinner. The quiet source is\n  // its sibling, so nothing above the table gets the class.\n  _reloadTable({ quiet = false } = {}) {\n    if (this.tab === this.tabs.GROUPS) return;\n    // Slideover state isn't table state; keeps ?user_id out of the isle's page/name hrefs.\n    const params = new URLSearchParams(window.location.search);\n    params.delete(\"user_id\");\n    htmx.ajax(\"GET\", tableUrl + \"?\" + params.toString(), {\n      source: quiet ? \"#organization_user_table_quiet_source\" : \"#organization_user_table_container\",\n      target: \"#organization_user_table\",\n      swap: \"innerHTML\",\n    });\n  },\n\n  async loadGroupModal(key) {\n    const url = key === \"new\" ? groupCreateUrl : groupEditUrlTemplate.replace(uuidPlaceholder, key);\n    const response = await fetch(url);\n    if (!response.ok) {\n      this.groupModalParam.clear();\n      return;\n    }\n    const body = document.getElementById(\"organization-user-group-modal-body\");\n    body.innerHTML = await response.text();\n    htmx.process(body);\n    this.groupModalOpen = true;\n  },\n});\n","// Loads url into the layout's slideover. Source = its indicator, never body: a body-sourced\n// request puts htmx-request on <body>, which trips every `.htmx-request &` style on the page.\nexport function loadSlideover(url) {\n  return htmx.ajax(\"GET\", url, {\n    source: document.getElementById(\"slideover-indicator\"),\n    target: \"#slideover-content\",\n  });\n}\n","// What's new: one Alpine state machine for the popover, note modal and slideover.\n// Every state change goes through go(), which wraps it in a view transition (see global.css \"What's new\").\nconst PANEL_TTL_MS = 50 * 60 * 1000; // hero URLs are signed for 1h; refetch the panel before they expire\nconst REDUCED_MOTION = \"(prefers-reduced-motion: reduce)\";\n\nexport default ({ unseen, panelUrl, announceUrl }) => ({\n  view: \"closed\", // what is rendered\n  target: \"closed\", // where the latest go() is heading; set synchronously so double clicks are ignored\n  unseen,\n  loading: false,\n  panelLoadedAt: 0,\n  transitionId: 0,\n\n  async init() {\n    // Auto-announce once per tab session, and only where the icon is visible (not mobile, not HRIS context).\n    // $nextTick: the header wrapper's x-cloak/x-show are applied after this init, so the icon reads hidden until then.\n    if (!announceUrl) return;\n    await this.$nextTick();\n    if (!this.$refs.button.checkVisibility?.()) return;\n    const key = `whats-new-announced:${announceUrl}`;\n    try {\n      if (sessionStorage.getItem(key)) return;\n      sessionStorage.setItem(key, \"1\");\n    } catch (e) {\n      // Storage blocked: announce anyway; the server marks it opened, so it shows once.\n    }\n    this.openNote(announceUrl, this.$refs.button, null);\n  },\n\n  async go(next) {\n    if (next === this.target) return;\n    const from = this.target;\n    this.target = next;\n    // open: closed -> surface (dropdown-like pop); close: surface -> closed; morph: surface -> surface.\n    const kind = from === \"closed\" ? \"open\" : next === \"closed\" ? \"close\" : \"morph\";\n    const apply = async () => {\n      this.view = next;\n      await this.$nextTick();\n      // Hidden surfaces keep their DOM; stop the hero loop when the modal is not on screen.\n      this.$root.querySelectorAll(\"#whats-new-modal video\").forEach((video) => {\n        if (next === \"modal\") video.play().catch(() => {});\n        else video.pause();\n      });\n    };\n    if (!document.startViewTransition || window.matchMedia(REDUCED_MOTION).matches) {\n      return apply();\n    }\n    const id = ++this.transitionId;\n    const root = document.documentElement;\n    root.dataset.whatsNewVt = kind;\n    try {\n      await document.startViewTransition(apply).finished;\n    } finally {\n      // A newer go() owns the attribute now; leave it alone.\n      if (id === this.transitionId) delete root.dataset.whatsNewVt;\n    }\n  },\n\n  // GET into a container; true only if the response swapped something in (htmx skips 4xx swaps).\n  async load(url, selector, source) {\n    if (this.loading) return false;\n    this.loading = true;\n    const container = document.querySelector(selector);\n    container.innerHTML = \"\";\n    try {\n      await htmx.ajax(\"GET\", url, { source, target: selector, swap: \"innerHTML\" });\n    } finally {\n      this.loading = false;\n    }\n    return container.childElementCount > 0;\n  },\n\n  async ensurePanel(source) {\n    if (Date.now() - this.panelLoadedAt < PANEL_TTL_MS) return true;\n    const loaded = await this.load(panelUrl, \"#whats-new-popover-list\", source);\n    if (loaded) {\n      this.panelLoadedAt = Date.now();\n      this.unseen = false; // the panel request marked every listed note seen\n    }\n    return loaded;\n  },\n\n  async togglePopover() {\n    if (this.target !== \"closed\") return this.go(\"closed\");\n    if (await this.ensurePanel(this.$refs.button)) return this.go(\"popover\");\n  },\n\n  async showAll(source) {\n    if (await this.ensurePanel(source)) return this.go(\"slideover\");\n  },\n\n  // Fetch first, then transition, so the snapshot already holds the note.\n  async openNote(url, source, noteId) {\n    if (!(await this.load(url, \"#whats-new-modal\", source))) return;\n    if (noteId) {\n      document.querySelectorAll(`[data-unread-dot=\"${noteId}\"]`).forEach((dot) => dot.remove());\n    }\n    return this.go(\"modal\");\n  },\n});\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst assert_valid_user_options_1 = __importDefault(require(\"./helpers/assert-valid-user-options\"));\nconst suggest_email_1 = __importDefault(require(\"./suggest-email\"));\nconst get_options_1 = __importDefault(require(\"./helpers/get-options\"));\nfunction run(userOptions) {\n    const options = get_options_1.default(userOptions);\n    assert_valid_user_options_1.default(options || {});\n    const email = suggest_email_1.default(options);\n    if (!email && userOptions.empty) {\n        userOptions.empty();\n    }\n    if (email && userOptions.suggested) {\n        userOptions.suggested(email);\n    }\n    return email;\n}\nexports.default = run;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst assert_1 = __importDefault(require(\"./assert\"));\nfunction assertValidUserOptions(options) {\n    assert_1.default(Array.isArray(options.domains), 'domains must be an array');\n    assert_1.default(Array.isArray(options.topLevelDomains), 'topLevelDomains must be an array');\n    assert_1.default(Array.isArray(options.secondLevelDomains), 'secondLevelDomains must be an array');\n    assert_1.default(typeof options.distanceFunction === 'function', 'distanceFunction must be a function');\n}\nexports.default = assertValidUserOptions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction assert(condition, message) {\n    if (!condition) {\n        throw new Error(message);\n    }\n}\nexports.default = assert;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst encode_email_1 = __importDefault(require(\"./helpers/encode-email\"));\nconst find_closest_domain_1 = __importDefault(require(\"./helpers/find-closest-domain\"));\nconst parse_email_1 = __importDefault(require(\"./helpers/parse-email\"));\nfunction suggestEmail(opts) {\n    const encodedEmail = encode_email_1.default(opts.email.toLowerCase());\n    const email = parse_email_1.default(encodedEmail);\n    if (!email) {\n        return undefined;\n    }\n    const { domains, domainThreshold, distanceFunction, secondLevelDomains, topLevelDomains, } = opts;\n    if (secondLevelDomains && topLevelDomains) {\n        // If the email is a valid 2nd-level + top-level, do not suggest anything.\n        // if (hasValidSecondLevelDomain(email) && hasValidTopLevelDomain(email)) {\n        if (secondLevelDomains.indexOf(email.secondLevelDomain) !== -1 &&\n            topLevelDomains.indexOf(email.topLevelDomain) !== -1) {\n            return undefined;\n        }\n    }\n    let closestDomain = find_closest_domain_1.default({\n        domain: email.domain,\n        domains,\n        distanceFunction,\n        threshold: domainThreshold,\n    });\n    if (closestDomain) {\n        if (closestDomain == email.domain) {\n            // The email address exactly matches one of the supplied domains; do not return a suggestion.\n            return undefined;\n        }\n        else {\n            // The email address closely matches one of the supplied domains; return a suggestion\n            return {\n                address: email.address,\n                domain: closestDomain,\n                full: email.address + '@' + closestDomain,\n            };\n        }\n    }\n    // The email address does not closely match one of the supplied domains\n    const closestSecondLevelDomain = find_closest_domain_1.default({\n        domain: email.secondLevelDomain,\n        domains: secondLevelDomains,\n        distanceFunction,\n        threshold: opts.secondLevelThreshold,\n    });\n    const closestTopLevelDomain = find_closest_domain_1.default({\n        domain: email.topLevelDomain,\n        domains: topLevelDomains,\n        distanceFunction,\n        threshold: opts.topLevelThreshold,\n    });\n    if (email.domain) {\n        closestDomain = email.domain;\n        let rtrn = false;\n        if (closestSecondLevelDomain &&\n            closestSecondLevelDomain != email.secondLevelDomain) {\n            // The email address may have a mispelled second-level domain; return a suggestion\n            closestDomain = closestDomain.replace(email.secondLevelDomain, closestSecondLevelDomain);\n            rtrn = true;\n        }\n        if (closestTopLevelDomain &&\n            closestTopLevelDomain != email.topLevelDomain &&\n            email.secondLevelDomain !== '') {\n            // The email address may have a mispelled top-level domain; return a suggestion\n            closestDomain = closestDomain.replace(new RegExp(email.topLevelDomain + '$'), closestTopLevelDomain);\n            rtrn = true;\n        }\n        if (rtrn) {\n            return {\n                address: email.address,\n                domain: closestDomain,\n                full: email.address + '@' + closestDomain,\n            };\n        }\n    }\n    /* The email address exactly matches one of the supplied domains, does not closely\n     * match any domain and does not appear to simply have a mispelled top-level domain,\n     * or is an invalid email address; do not return a suggestion.\n     */\n    return undefined;\n}\nexports.default = suggestEmail;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Encode the email address to prevent XSS but leave in valid\n// characters, following this official spec:\n// http://en.wikipedia.org/wiki/Email_address#Syntax\n//\n// We have to replace all the possible characters.\n// that's why we use a regex with a global flag.\nfunction encodeEmail(email) {\n    const result = encodeURI(email)\n        .replace(/%20/g, ' ')\n        .replace(/%25/g, '%')\n        .replace(/%5E/g, '^')\n        .replace(/%60/g, '`')\n        .replace(/%7B/g, '{')\n        .replace(/%7C/g, '|')\n        .replace(/%7D/g, '}');\n    return result;\n}\nexports.default = encodeEmail;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction findClosestDomain(opts) {\n    const { domain, domains, distanceFunction, threshold } = opts;\n    let dist;\n    let minDist = Infinity;\n    let closestDomain = null;\n    if (!domain || !domains) {\n        return undefined;\n    }\n    for (let i = 0; i < domains.length; i++) {\n        if (domain === domains[i]) {\n            return domain;\n        }\n        dist = distanceFunction(domain, domains[i]);\n        if (dist < minDist) {\n            minDist = dist;\n            closestDomain = domains[i];\n        }\n    }\n    if (minDist <= threshold && closestDomain !== null) {\n        return closestDomain;\n    }\n    else {\n        return undefined;\n    }\n}\nexports.default = findClosestDomain;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst trim_1 = __importDefault(require(\"./trim\"));\nconst MINIUM_EMAIL_PARTS = 2;\nfunction parseEmail(emailStr) {\n    const email = trim_1.default(emailStr);\n    const parts = email.split('@');\n    if (parts.length < MINIUM_EMAIL_PARTS) {\n        return false;\n    }\n    for (let i = 0; i < parts.length; i++) {\n        if (parts[i] === '') {\n            return false;\n        }\n    }\n    // FYI, in hello@example.com\n    // secondLevelDomain -> example\n    // topLevelDomain -> com\n    let sld = '';\n    let tld = '';\n    const domain = parts.pop();\n    const domainParts = domain.split('.');\n    if (domainParts.length === 0) {\n        // The address does not have a top-level domain\n        return false;\n    }\n    else if (domainParts.length == 1) {\n        // The address has only a top-level domain (valid under RFC)\n        tld = domainParts[0];\n    }\n    else {\n        // The address has a domain and a top-level domain\n        sld = domainParts[0];\n        for (let j = 1; j < domainParts.length; j++) {\n            tld += domainParts[j] + '.';\n        }\n        tld = tld.substring(0, tld.length - 1);\n    }\n    return {\n        topLevelDomain: tld,\n        secondLevelDomain: sld,\n        domain,\n        address: parts.join('@'),\n    };\n}\nexports.default = parseEmail;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst WHITESPACE_PATTERN = /\\s/;\n/**\n * Just in case a browser doesn't support .trim\n * Copied from https://github.com/Trott/trim\n * Credits to them\n */\nfunction trim(str) {\n    if (str.trim) {\n        return str.trim();\n    }\n    return right(left(str));\n}\nfunction left(str) {\n    if (str.trimLeft)\n        return str.trimLeft();\n    return str.replace(/^\\s\\s*/, '');\n}\nfunction right(str) {\n    if (str.trimRight)\n        return str.trimRight();\n    let i = str.length;\n    while (WHITESPACE_PATTERN.test(str.charAt(--i)))\n        ;\n    return str.slice(0, i + 1);\n}\nexports.default = trim;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst config_1 = require(\"../config\");\nfunction getOptions(userOptions) {\n    return {\n        email: userOptions.email,\n        domains: userOptions.domains || config_1.DEFAULT_CONFIG.domains,\n        topLevelDomains: userOptions.topLevelDomains || config_1.DEFAULT_CONFIG.topLevelDomains,\n        secondLevelDomains: userOptions.secondLevelDomains || config_1.DEFAULT_CONFIG.secondLevelDomains,\n        distanceFunction: userOptions.distanceFunction || config_1.DEFAULT_CONFIG.distanceFunction,\n        domainThreshold: userOptions.domainThreshold || config_1.DEFAULT_CONFIG.domainThreshold,\n        secondLevelThreshold: userOptions.secondLevelThreshold || config_1.DEFAULT_CONFIG.secondLevelThreshold,\n        topLevelThreshold: userOptions.topLevelThreshold || config_1.DEFAULT_CONFIG.topLevelThreshold,\n        suggested: userOptions.suggested || undefined,\n        empty: userOptions.suggested || undefined,\n    };\n}\nexports.default = getOptions;\n","\"use strict\";\n// Default configuration options\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.POPULAR_TLDS = exports.POPULAR_DOMAINS = exports.DEFAULT_CONFIG = void 0;\nconst sift3_distance_1 = __importDefault(require(\"../fuzzy-detection/sift3-distance\"));\n/***\n * Default list of popular emails for 2022 and onwards.\n * https://www.mailmunch.com/blog/best-email-service-providers\n *\n * If you find a domain you want to add, please submit a PR.\n * Also, notice that this list is not exhaustive.\n * You can always pass your own list of domains.\n */\nconst POPULAR_DOMAINS = [\n    'msn.com',\n    'bellsouth.net',\n    'telus.net',\n    'comcast.net',\n    'optusnet.com.au',\n    'earthlink.net',\n    'qq.com',\n    'sky.com',\n    'icloud.com',\n    'sympatico.ca',\n    'googlemail.com',\n    'att.net',\n    'xtra.co.nz',\n    'web.de',\n    'cox.net',\n    'gmail.com',\n    'ymail.com',\n    'aim.com',\n    'rogers.com',\n    'verizon.net',\n    'rocketmail.com',\n    'optonline.net',\n    'sbcglobal.net',\n    // aol\n    'aol.com',\n    'aim.com',\n    'me.com',\n    'mailw.com',\n    'btinternet.com',\n    'charter.net',\n    'shaw.ca',\n    'hey.com',\n    // Proton\n    'proton.me',\n    'pm.com',\n    'protonmail.com',\n    'zoho.com',\n    'yandex.com',\n    'titan.email',\n];\nexports.POPULAR_DOMAINS = POPULAR_DOMAINS;\nconst POPULAR_TLDS = [\n    'com',\n    'com.au',\n    'com.tw',\n    'co',\n    'ca',\n    'co.nz',\n    'co.uk',\n    'de',\n    'fr',\n    'it',\n    'ru',\n    'org',\n    'edu',\n    'gov',\n    'jp',\n    'nl',\n    'kr',\n    'se',\n    'eu',\n    'ie',\n    'co.il',\n    'us',\n    'at',\n    'be',\n    'dk',\n    'hk',\n    'es',\n    'gr',\n    'ch',\n    'no',\n    'cz',\n    'net',\n    'net.au',\n    'info',\n    'biz',\n    'mil',\n    'co.jp',\n    'sg',\n    'hu',\n    'uk',\n    'sk',\n    // Country specific popular domains\n    'ar',\n    'cf',\n    'cl',\n    'cn',\n    'ga',\n    'gq',\n    'ir',\n    'ml',\n    'mx',\n    'nu',\n    'nz',\n    'ph',\n    'pl',\n    'ro',\n    'tk',\n    'tw',\n    'ua',\n    'vg',\n    'ws',\n    'xn',\n    'za',\n    // popular TLDs that startup use in 2022\n    // https://thewebsiteflip.com/domains/funded-startup-brands-2021/#:~:text=from%20the%20data.-,1.,TLDs%20for%20the%20foreseeable%20future.\n    // https://martijnoud.com/most-popular-tld-crypto/\n    'app',\n    'au',\n    'ai',\n    'biz',\n    'br',\n    'blog',\n    'cloud',\n    'club',\n    'cc',\n    'de',\n    'dev',\n    'digital',\n    'fi',\n    'finance',\n    'id',\n    'in',\n    'io',\n    'me',\n    'mobi',\n    'network',\n    'pw',\n    'so',\n    'xyz',\n    'software',\n    'to',\n    'tech',\n];\nexports.POPULAR_TLDS = POPULAR_TLDS;\nconst DEFAULT_CONFIG = {\n    domainThreshold: 2,\n    domains: POPULAR_DOMAINS,\n    secondLevelThreshold: 2,\n    secondLevelDomains: ['yahoo', 'hotmail', 'mail', 'live', 'outlook'],\n    topLevelThreshold: 2,\n    topLevelDomains: POPULAR_TLDS,\n    distanceFunction: sift3_distance_1.default,\n};\nexports.DEFAULT_CONFIG = DEFAULT_CONFIG;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction sift3Distance(s1, s2) {\n    // sift3: http://siderite.blogspot.com/2007/04/super-fast-and-accurate-string-distance.html\n    if (s1 == null || s1.length === 0) {\n        if (s2 == null || s2.length === 0) {\n            return 0;\n        }\n        else {\n            return s2.length;\n        }\n    }\n    if (s2 == null || s2.length === 0) {\n        return s1.length;\n    }\n    let c = 0;\n    let offset1 = 0;\n    let offset2 = 0;\n    let lcs = 0;\n    const maxOffset = 5;\n    while (c + offset1 < s1.length && c + offset2 < s2.length) {\n        if (s1.charAt(c + offset1) == s2.charAt(c + offset2)) {\n            lcs++;\n        }\n        else {\n            offset1 = 0;\n            offset2 = 0;\n            for (let i = 0; i < maxOffset; i++) {\n                if (c + i < s1.length && s1.charAt(c + i) == s2.charAt(c)) {\n                    offset1 = i;\n                    break;\n                }\n                if (c + i < s2.length && s1.charAt(c) == s2.charAt(c + i)) {\n                    offset2 = i;\n                    break;\n                }\n            }\n        }\n        c++;\n    }\n    return (s1.length + s2.length) / 2 - lcs;\n}\nexports.default = sift3Distance;\n","// Day.js configuration\nimport dayjs from \"dayjs\";\nimport utc from \"dayjs/plugin/utc\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat\";\nimport isSameOrBefore from \"dayjs/plugin/isSameOrBefore\";\nimport \"dayjs/locale/tr\"; // Import Turkish locale\n\ndayjs.extend(utc);\ndayjs.extend(customParseFormat);\ndayjs.extend(isSameOrBefore);\n\nwindow.dayjs = dayjs;\n\n// Apexcharts\nimport ApexCharts from \"apexcharts\";\nwindow.ApexCharts = ApexCharts;\n\n// QR codes\nimport qrcode from \"qrcode-generator\";\nwindow.qrCodeGenerator = qrcode;\n\n// Alpine\nimport collapse from \"@alpinejs/collapse\";\nimport focus from \"@alpinejs/focus\";\nimport intersect from \"@alpinejs/intersect\";\nimport mask from \"@alpinejs/mask\";\nimport morph from \"@alpinejs/morph\";\nimport persist from \"@alpinejs/persist\";\nimport sort from \"@alpinejs/sort\";\nimport ui from \"@alpinejs/ui\";\nimport Alpine from \"alpinejs\";\n\nimport options_editor from \"./components/application_form_fields/options_editor.js\";\nimport conditional_field_config from \"./components/application_form_fields/conditional_field_config.js\";\nimport command_palette from \"./components/command_palette/command_palette.js\";\nimport filter from \"./components/filter/filter.js\";\nimport reportingViews from \"./pages/reporting/components/reporting_views.js\";\nimport combobox from \"./components/form_inputs/combobox.js\";\nimport file_input from \"./components/form_inputs/file_input.js\";\nimport multi_file_input from \"./components/form_inputs/multi_file_input.js\";\nimport phone_input from \"./components/form_inputs/phone_input.js\";\nimport job_form from \"./components/job_posting_wizard/job_form.js\";\nimport workflow from \"./components/job_posting_wizard/workflow.js\";\nimport organization_sortable from \"./components/organizations/organization_sortable.js\";\nimport mention_comment_form from \"./components/candidate_detail/mention_comment_form.js\";\nimport wysiwyg from \"./components/wysiwyg/wysiwyg.js\";\nimport availability_calendar from \"./pages/scheduling/components/availability_calendar.js\";\nimport job_list_filter from \"./components/careersite/job_list_filter.js\";\nimport { createScorecardWeightsComponent } from \"./pages/organizations/scorecard-weights.js\";\nimport condition_builder from \"./components/automations/condition_builder.js\";\nimport applications_list from \"./components/applications_list/applications_list.js\";\nimport candidates_table_mobile from \"./components/candidates_table/candidates_table_mobile.js\";\nimport { interviewsNav, notesEditor, interviewChat } from \"./components/interview_notebook/interview_notebook.js\";\nimport { urlParam } from \"./shared/url_param.js\";\nimport organization_user_list from \"./pages/organizations/organization_user_list.js\";\nimport whats_new from \"./components/whats_new/whats_new.js\";\n\nimport emailSpellChecker from '@zootools/email-spell-checker';\n\nwindow.emailSpellChecker = emailSpellChecker;\nwindow.urlParam = urlParam;\n\nAlpine.plugin(focus);\nAlpine.plugin(ui);\nAlpine.plugin(morph);\nAlpine.plugin(mask);\nAlpine.plugin(collapse);\nAlpine.plugin(persist);\nAlpine.plugin(sort);\nAlpine.plugin(intersect);\n\nAlpine.store(\"filterFields\", {\n  fields: [],\n\n  add(field) {\n    this.fields.push(field);\n  },\n  remove(field) {\n    const index = this.fields.indexOf(field);\n    this.fields.splice(index, 1);\n  },\n  has(field) {\n    return this.fields.includes(field) ? true : false;\n  },\n  flush() {\n    this.fields = [];\n  },\n});\n\nAlpine.store(\"hrisLibrarySorting\", {\n  emails: '',\n  forms: '',\n  documents: '',\n  emailsLayout: 'card',\n  formsLayout: 'card',\n  documentsLayout: 'card',\n\n  init() {\n    try {\n      // Load sorting preferences\n      const savedSort = localStorage.getItem('hris_assets_sorting');\n      if (savedSort) {\n        const data = JSON.parse(savedSort);\n        this.emails = data.emails || '';\n        this.forms = data.forms || '';\n        this.documents = data.documents || '';\n      }\n\n      // Load layout preferences separately\n      const savedLayout = localStorage.getItem('hris_assets_layout');\n      if (savedLayout) {\n        const data = JSON.parse(savedLayout);\n        this.emailsLayout = data.emails || 'card';\n        this.formsLayout = data.forms || 'card';\n        this.documentsLayout = data.documents || 'card';\n      }\n    } catch (e) {\n      // Invalid JSON, ignore and use defaults\n    }\n  },\n\n  getCurrentSort(section) {\n    return this[section] || '';\n  },\n\n  setSort(section, value) {\n    this[section] = value || '';\n    this._saveSorting();\n  },\n\n  getCurrentLayout(section) {\n    return this[section + 'Layout'] || 'card';\n  },\n\n  setLayout(section, layout) {\n    this[section + 'Layout'] = layout || 'card';\n    this._saveLayout();\n  },\n\n  _saveSorting() {\n    try {\n      localStorage.setItem('hris_assets_sorting', JSON.stringify({\n        emails: this.emails,\n        forms: this.forms,\n        documents: this.documents\n      }));\n    } catch (e) {\n      // localStorage failed, ignore\n    }\n  },\n\n  _saveLayout() {\n    try {\n      localStorage.setItem('hris_assets_layout', JSON.stringify({\n        emails: this.emailsLayout,\n        forms: this.formsLayout,\n        documents: this.documentsLayout\n      }));\n    } catch (e) {\n      // localStorage failed, ignore\n    }\n  }\n});\n\nAlpine.store(\"hrisOnboardingTaskSectionCollapse\", {\n  // Initialize from localStorage\n  init() {\n    try {\n      const saved = localStorage.getItem('hris_onboarding_task_section_collapse');\n      if (saved) {\n        const data = JSON.parse(saved);\n        Object.keys(data).forEach(key => {\n          this[key] = data[key];\n        });\n      }\n    } catch (e) {\n      // localStorage failed, ignore\n    }\n  },\n\n  // Save all state to localStorage\n  _saveAll() {\n    try {\n      const data = {};\n      Object.keys(this).forEach(key => {\n        if (!key.startsWith('_') && typeof this[key] !== 'function' && key !== 'init') {\n          data[key] = this[key];\n        }\n      });\n      localStorage.setItem('hris_onboarding_task_section_collapse', JSON.stringify(data));\n    } catch (e) {\n      // localStorage failed, ignore\n    }\n  },\n\n  // Check if section is expanded (with default fallback)\n  isExpanded(key, defaultExpanded = false) {\n    return this[key] ?? defaultExpanded;\n  },\n\n  // Toggle section state\n  toggle(key, defaultExpanded = false) {\n    const currentState = this[key] ?? defaultExpanded;\n    this[key] = !currentState;\n    this._saveAll();\n  },\n\n  // Explicitly set state\n  setExpanded(key, isExpanded) {\n    this[key] = isExpanded;\n    this._saveAll();\n  }\n});\n\nconst HRIS_LIBRARY_FORM_REPORTING_DEFAULT_FIELDS = [\"template\", \"department\", \"team\", \"job_title\"];\n\nAlpine.store(\"hrisLibraryFormReportingColumns\", {\n  fields: [...HRIS_LIBRARY_FORM_REPORTING_DEFAULT_FIELDS],\n\n  init() {\n    try {\n      const saved = localStorage.getItem('hris_library_form_reporting_columns');\n      if (saved) {\n        const data = JSON.parse(saved);\n        this.fields = data.fields || [...HRIS_LIBRARY_FORM_REPORTING_DEFAULT_FIELDS];\n      }\n    } catch (e) {\n      // localStorage failed, ignore\n    }\n  },\n\n  _save() {\n    try {\n      localStorage.setItem('hris_library_form_reporting_columns', JSON.stringify({\n        fields: this.fields\n      }));\n    } catch (e) {\n      // localStorage failed, ignore\n    }\n  },\n\n  hasField(fieldName) {\n    return this.fields.includes(fieldName);\n  },\n\n  toggleField(fieldName) {\n    if (this.hasField(fieldName)) {\n      this.fields = this.fields.filter(f => f !== fieldName);\n    } else {\n      this.fields.push(fieldName);\n    }\n    this._save();\n  },\n\n  reset() {\n    this.fields = [...HRIS_LIBRARY_FORM_REPORTING_DEFAULT_FIELDS];\n    this._save();\n  }\n});\n\n// Pessimistic settings store for the candidate listing page.\n// Missing keys are treated as `false` via `get(key)`. Toggling persists to localStorage.\nAlpine.store(\"candidate_listing_settings\", {\n  init() {\n    try {\n      const saved = localStorage.getItem('candidate_listing_settings');\n      if (saved) {\n        const data = JSON.parse(saved);\n        Object.keys(data).forEach(key => {\n          this[key] = data[key];\n        });\n      }\n    } catch (e) {\n      // localStorage failed, ignore\n    }\n  },\n\n  get(key) {\n    return this[key] ?? false;\n  },\n\n  set(key, value) {\n    this[key] = value;\n    this._save();\n  },\n\n  toggle(key) {\n    this.set(key, !this.get(key));\n  },\n\n  _save() {\n    try {\n      const data = {};\n      Object.keys(this).forEach(k => {\n        if (!k.startsWith('_') && typeof this[k] !== 'function' && k !== 'init' && k !== 'get' && k !== 'set' && k !== 'toggle') {\n          data[k] = this[k];\n        }\n      });\n      localStorage.setItem('candidate_listing_settings', JSON.stringify(data));\n    } catch (e) {\n      // localStorage failed, ignore\n    }\n  }\n});\n\n// Initialize the store from localStorage\nAlpine.store(\"hrisOnboardingTaskSectionCollapse\").init();\nAlpine.store(\"hrisLibrarySorting\").init();\nAlpine.store(\"hrisLibraryFormReportingColumns\").init();\nAlpine.store(\"candidate_listing_settings\").init();\n\n\nwindow.Alpine = Alpine;\n\nwindow.Alpine.data(\"wysiwyg\", wysiwyg);\nwindow.Alpine.data(\"combobox\", combobox);\nwindow.Alpine.data(\"file_input\", file_input);\nwindow.Alpine.data(\"multi_file_input\", multi_file_input);\nwindow.Alpine.data(\"workflow\", workflow);\nwindow.Alpine.data(\"organization_sortable\", organization_sortable);\nwindow.Alpine.data(\"job_form\", job_form);\nwindow.Alpine.data(\"options_editor\", options_editor);\nwindow.Alpine.data(\"conditionalFieldConfig\", conditional_field_config);\nwindow.Alpine.data(\"phone_input\", phone_input);\nwindow.Alpine.data(\"filter\", filter);\nwindow.Alpine.data(\"reportingViews\", reportingViews);\nwindow.Alpine.data(\"command_palette\", command_palette);\nwindow.Alpine.data(\"availability_calendar\", availability_calendar);\nwindow.Alpine.data(\"job_list_filter\", job_list_filter);\nwindow.Alpine.data(\"scorecard_weights\", createScorecardWeightsComponent);\nwindow.Alpine.data(\"conditionBuilder\", condition_builder);\nwindow.Alpine.data(\"mention_comment_form\", mention_comment_form);\nwindow.Alpine.data(\"applications_list\", applications_list);\nwindow.Alpine.data(\"jobApplicationsMobile\", candidates_table_mobile);\nwindow.Alpine.data(\"interviewsNav\", interviewsNav);\nwindow.Alpine.data(\"notesEditor\", notesEditor);\nwindow.Alpine.data(\"interviewChat\", interviewChat);\nwindow.Alpine.data(\"organization_user_list\", organization_user_list);\nwindow.Alpine.data(\"whats_new\", whats_new);\n\n// Alpine's x-teleport clones tooltips into <body>, carrying their scope only as\n// internal references. htmx history snapshots the whole <body>, so a restored page\n// contains those clones as scopeless orphans that Alpine would re-init and throw\n// \"ReferenceError: tooltipVisible is not defined\" for (one per tooltip). Purge them\n// synchronously on restore — Alpine skips disconnected nodes, and the restored\n// source elements re-init and re-create their own clones anyway.\ndocument.addEventListener(\"htmx:historyRestore\", () => {\n  document.querySelectorAll(\"[data-tooltip-teleport]\").forEach((el) => el.remove());\n});\n\nwindow.Alpine.start();\n\n// Flowbite\nimport \"flowbite\";\n","!function(a,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e(require(\"dayjs\")):\"function\"==typeof define&&define.amd?define([\"dayjs\"],e):(a=\"undefined\"!=typeof globalThis?globalThis:a||self).dayjs_locale_tr=e(a.dayjs)}(this,(function(a){\"use strict\";function e(a){return a&&\"object\"==typeof a&&\"default\"in a?a:{default:a}}var t=e(a),_={name:\"tr\",weekdays:\"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi\".split(\"_\"),weekdaysShort:\"Paz_Pts_Sal_Çar_Per_Cum_Cts\".split(\"_\"),weekdaysMin:\"Pz_Pt_Sa_Ça_Pe_Cu_Ct\".split(\"_\"),months:\"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık\".split(\"_\"),monthsShort:\"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara\".split(\"_\"),weekStart:1,formats:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},relativeTime:{future:\"%s sonra\",past:\"%s önce\",s:\"birkaç saniye\",m:\"bir dakika\",mm:\"%d dakika\",h:\"bir saat\",hh:\"%d saat\",d:\"bir gün\",dd:\"%d gün\",M:\"bir ay\",MM:\"%d ay\",y:\"bir yıl\",yy:\"%d yıl\"},ordinal:function(a){return a+\".\"}};return t.default.locale(_,null,!0),_}));","var __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a2, b2) => {\n  for (var prop in b2 || (b2 = {}))\n    if (__hasOwnProp.call(b2, prop))\n      __defNormalProp(a2, prop, b2[prop]);\n  if (__getOwnPropSymbols)\n    for (var prop of __getOwnPropSymbols(b2)) {\n      if (__propIsEnum.call(b2, prop))\n        __defNormalProp(a2, prop, b2[prop]);\n    }\n  return a2;\n};\nvar __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));\nvar __objRest = (source, exclude) => {\n  var target = {};\n  for (var prop in source)\n    if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n      target[prop] = source[prop];\n  if (source != null && __getOwnPropSymbols)\n    for (var prop of __getOwnPropSymbols(source)) {\n      if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n        target[prop] = source[prop];\n    }\n  return target;\n};\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar __async = (__this, __arguments, generator) => {\n  return new Promise((resolve, reject) => {\n    var fulfilled = (value) => {\n      try {\n        step(generator.next(value));\n      } catch (e2) {\n        reject(e2);\n      }\n    };\n    var rejected = (value) => {\n      try {\n        step(generator.throw(value));\n      } catch (e2) {\n        reject(e2);\n      }\n    };\n    var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n    step((generator = generator.apply(__this, __arguments)).next());\n  });\n};\n/*!\n * ApexCharts v6.10.0\n * (c) 2018-2026 ApexCharts\n */\nclass Environment {\n  /**\n   * Check if running in server-side rendering environment (Node.js)\n   * @returns {boolean} True if in SSR/Node.js, false if in browser\n   */\n  static isSSR() {\n    return typeof window === \"undefined\" || typeof document === \"undefined\";\n  }\n  /**\n   * Check if running in browser environment\n   * @returns {boolean} True if in browser, false if in SSR/Node.js\n   */\n  static isBrowser() {\n    return !this.isSSR();\n  }\n  /**\n   * Check if a specific browser API is available\n   * @param {string} api - Name of the API to check (e.g., 'ResizeObserver')\n   * @returns {boolean} True if API is available\n   */\n  static hasAPI(api) {\n    if (this.isSSR()) return false;\n    return typeof /** @type {any} */\n    window[api] !== \"undefined\";\n  }\n  /**\n   * Returns the global Apex config object regardless of environment.\n   * In browser: window.Apex; in SSR/Node.js: global.Apex; fallback: {}.\n   * @returns {any}\n   */\n  static getApex() {\n    if (typeof window !== \"undefined\" && window.Apex) return window.Apex;\n    if (typeof global !== \"undefined\" && global.Apex) return global.Apex;\n    return {};\n  }\n}\nclass SSRElement {\n  /**\n   * @param {string} nodeName\n   * @param {any} namespaceURI\n   */\n  constructor(nodeName, namespaceURI = null) {\n    this.nodeName = nodeName;\n    this.namespaceURI = namespaceURI;\n    this.attributes = /* @__PURE__ */ new Map();\n    this.children = [];\n    this.textContent = \"\";\n    this.style = {};\n    this.classList = new SSRClassList();\n    this.parentNode = /** @type {SSRElement | null} */\n    null;\n    this._ssrWidth = void 0;\n    this._ssrHeight = void 0;\n    this._ssrMode = void 0;\n  }\n  /**\n   * @param {string} name\n   * @param {any} value\n   */\n  setAttribute(name2, value) {\n    this.attributes.set(name2, value);\n  }\n  /**\n   * @param {string} name\n   */\n  getAttribute(name2) {\n    return this.attributes.get(name2);\n  }\n  /**\n   * @param {string} name\n   */\n  removeAttribute(name2) {\n    this.attributes.delete(name2);\n  }\n  /**\n   * @param {string} name\n   */\n  hasAttribute(name2) {\n    return this.attributes.has(name2);\n  }\n  /**\n   * @param {any} child\n   */\n  appendChild(child) {\n    if (child && child !== this) {\n      if (child.parentNode && child.parentNode !== this) {\n        child.parentNode.removeChild(child);\n      } else if (child.parentNode === this) {\n        const index = this.children.indexOf(child);\n        if (index !== -1) this.children.splice(index, 1);\n      }\n      child.parentNode = this;\n      this.children.push(child);\n    }\n    return child;\n  }\n  /**\n   * @param {any} child\n   */\n  removeChild(child) {\n    const index = this.children.indexOf(child);\n    if (index !== -1) {\n      this.children.splice(index, 1);\n      child.parentNode = null;\n    }\n    return child;\n  }\n  /**\n   * @param {any} newNode\n   * @param {any} referenceNode\n   */\n  insertBefore(newNode, referenceNode) {\n    if (!referenceNode) {\n      return this.appendChild(newNode);\n    }\n    if (newNode.parentNode && newNode.parentNode !== this) {\n      newNode.parentNode.removeChild(newNode);\n    } else if (newNode.parentNode === this) {\n      const existingIndex = this.children.indexOf(newNode);\n      if (existingIndex !== -1) this.children.splice(existingIndex, 1);\n    }\n    const index = this.children.indexOf(referenceNode);\n    if (index !== -1) {\n      newNode.parentNode = this;\n      this.children.splice(index, 0, newNode);\n    }\n    return newNode;\n  }\n  cloneNode(deep = false) {\n    const clone = new SSRElement(this.nodeName, this.namespaceURI);\n    clone.textContent = this.textContent;\n    this.attributes.forEach((value, key) => {\n      clone.attributes.set(key, value);\n    });\n    Object.assign(clone.style, this.style);\n    if (deep) {\n      this.children.forEach((child) => {\n        if (child.cloneNode) {\n          clone.appendChild(child.cloneNode(true));\n        }\n      });\n    }\n    return clone;\n  }\n  getBoundingClientRect() {\n    return {\n      width: this._ssrWidth || 0,\n      height: this._ssrHeight || 0,\n      top: 0,\n      left: 0,\n      right: this._ssrWidth || 0,\n      bottom: this._ssrHeight || 0,\n      x: 0,\n      y: 0\n    };\n  }\n  getRootNode() {\n    let root = this;\n    while (root.parentNode) {\n      root = root.parentNode;\n    }\n    return root;\n  }\n  querySelector() {\n    return null;\n  }\n  querySelectorAll() {\n    return [];\n  }\n  getElementsByClassName() {\n    return [];\n  }\n  addEventListener() {\n  }\n  removeEventListener() {\n  }\n  get childNodes() {\n    return this.children;\n  }\n  toString() {\n    let attrs = \"\";\n    this.attributes.forEach((value, key) => {\n      attrs += ` ${key}=\"${value}\"`;\n    });\n    if (this.children.length === 0 && !this.textContent) {\n      return `<${this.nodeName}${attrs}/>`;\n    }\n    const childrenStr = this.children.map((c2) => c2.toString()).join(\"\");\n    return `<${this.nodeName}${attrs}>${this.textContent}${childrenStr}</${this.nodeName}>`;\n  }\n  // Property getters/setters\n  get innerHTML() {\n    return this.children.map((c2) => c2.toString()).join(\"\");\n  }\n  set innerHTML(value) {\n    this.children = [];\n    this.textContent = value;\n  }\n  get outerHTML() {\n    return this.toString();\n  }\n  get isConnected() {\n    return true;\n  }\n}\nclass SSRClassList {\n  constructor() {\n    this.classes = /* @__PURE__ */ new Set();\n  }\n  add(...classNames) {\n    classNames.forEach((name2) => this.classes.add(name2));\n  }\n  remove(...classNames) {\n    classNames.forEach((name2) => this.classes.delete(name2));\n  }\n  /**\n   * @param {string} className\n   */\n  contains(className) {\n    return this.classes.has(className);\n  }\n  /**\n   * @param {string} className\n   * @param {any} force\n   */\n  toggle(className, force) {\n    if (force === true) {\n      this.classes.add(className);\n      return true;\n    } else if (force === false) {\n      this.classes.delete(className);\n      return false;\n    } else {\n      if (this.classes.has(className)) {\n        this.classes.delete(className);\n        return false;\n      } else {\n        this.classes.add(className);\n        return true;\n      }\n    }\n  }\n  toString() {\n    return Array.from(this.classes).join(\" \");\n  }\n}\nclass SSRDOMShim {\n  constructor() {\n    this.SVGNS = \"http://www.w3.org/2000/svg\";\n    this.XLINKNS = \"http://www.w3.org/1999/xlink\";\n  }\n  /**\n   * Create SVG element with namespace\n   * @param {string} namespaceURI - Namespace URI\n   * @param {string} qualifiedName - Element tag name\n   * @returns {SSRElement} Mock SVG element\n   */\n  createElementNS(namespaceURI, qualifiedName) {\n    return new SSRElement(qualifiedName, namespaceURI);\n  }\n  /**\n   * Create text node\n   * @param {string} data - Text content\n   * @returns {object} Text node mock\n   */\n  createTextNode(data) {\n    const node = {\n      nodeName: \"#text\",\n      nodeType: 3,\n      textContent: data,\n      toString() {\n        return node.textContent;\n      }\n    };\n    return node;\n  }\n  /**\n   * Query selector (returns null in SSR)\n   * @returns {null}\n   */\n  querySelector() {\n    return null;\n  }\n  /**\n   * Query selector all (returns empty array in SSR)\n   * @returns {any[]}\n   */\n  querySelectorAll() {\n    return [];\n  }\n  /**\n   * Get computed style (returns empty object in SSR)\n   * @returns {object}\n   */\n  getComputedStyle() {\n    return {};\n  }\n  /**\n   * Get bounding client rect for element\n   * @param {SSRElement} element - Element to measure\n   * @returns {object} Mock dimensions\n   */\n  getBoundingClientRect(element) {\n    if (element && element.getBoundingClientRect) {\n      return element.getBoundingClientRect();\n    }\n    return {\n      width: 0,\n      height: 0,\n      top: 0,\n      left: 0,\n      right: 0,\n      bottom: 0,\n      x: 0,\n      y: 0\n    };\n  }\n  /**\n   * Create mock XMLSerializer for SSR\n   * @returns {object} XMLSerializer mock\n   */\n  createXMLSerializer() {\n    return {\n      /**\n       * @param {Element} element\n       */\n      serializeToString(element) {\n        return element.toString ? element.toString() : \"\";\n      }\n    };\n  }\n  /**\n   * Create mock DOMParser for SSR\n   * @returns {object} DOMParser mock\n   */\n  createDOMParser() {\n    return {\n      /**\n       * @param {string} str\n       * @param {string} _type\n       */\n      parseFromString(str, _type) {\n        const root = new SSRElement(\"root\");\n        root.innerHTML = str;\n        return {\n          documentElement: root\n        };\n      }\n    };\n  }\n}\nlet shim = null;\nlet xmlSerializerInstance = null;\nlet domParserInstance = null;\nclass BrowserAPIs {\n  /**\n   * Initialize the SSR shim if in SSR environment\n   * Must be called before using other methods\n   */\n  static init() {\n    if (Environment.isSSR() && !shim) {\n      shim = new SSRDOMShim();\n    }\n  }\n  /**\n   * Create an HTML element\n   * @param {string} tagName - Element tag name\n   * @returns {HTMLElement} HTML element\n   */\n  static createElement(tagName) {\n    if (Environment.isSSR()) {\n      if (!shim) this.init();\n      return shim.createElementNS(null, tagName);\n    }\n    return document.createElement(tagName);\n  }\n  /**\n   * Create an SVG element with namespace\n   * @param {string} namespaceURI - Namespace URI\n   * @param {string} qualifiedName - Element tag name\n   * @returns {HTMLElement} created element\n   */\n  static createElementNS(namespaceURI, qualifiedName) {\n    if (Environment.isSSR()) {\n      if (!shim) this.init();\n      return shim.createElementNS(namespaceURI, qualifiedName);\n    }\n    return (\n      /** @type {HTMLElement} */\n      document.createElementNS(namespaceURI, qualifiedName)\n    );\n  }\n  /**\n   * Create a text node\n   * @param {string} data - Text content\n   * @returns {Text|object} Text node\n   */\n  static createTextNode(data) {\n    if (Environment.isSSR()) {\n      if (!shim) this.init();\n      return shim.createTextNode(data);\n    }\n    return document.createTextNode(data);\n  }\n  /**\n   * Query selector\n   * @param {string} selector - CSS selector\n   * @returns {Element|null}\n   */\n  static querySelector(selector) {\n    if (Environment.isSSR()) {\n      return null;\n    }\n    return document.querySelector(selector);\n  }\n  /**\n   * Query selector all\n   * @param {string} selector - CSS selector\n   * @returns {NodeList|any[]}\n   */\n  static querySelectorAll(selector) {\n    if (Environment.isSSR()) {\n      return [];\n    }\n    return document.querySelectorAll(selector);\n  }\n  /**\n   * Get computed style for an element\n   * @param {Element} element - Element to get styles for\n   * @returns {CSSStyleDeclaration|object}\n   */\n  static getComputedStyle(element) {\n    if (Environment.isSSR()) {\n      return {};\n    }\n    return window.getComputedStyle(element);\n  }\n  /**\n   * Evaluate a media query. Returns the live MediaQueryList in a browser (so\n   * callers can attach a `change` listener) or null under SSR / when\n   * unsupported. Facet (#13) uses this for `theme.follow: 'os'`.\n   * @param {string} query\n   * @returns {MediaQueryList|null}\n   */\n  static matchMedia(query) {\n    if (Environment.isSSR() || typeof window.matchMedia !== \"function\") {\n      return null;\n    }\n    try {\n      return window.matchMedia(query);\n    } catch (e2) {\n      return null;\n    }\n  }\n  /**\n   * Get bounding client rect for an element\n   * @param {Element} element - Element to measure\n   * @returns {DOMRect|object}\n   */\n  static getBoundingClientRect(element) {\n    if (Environment.isSSR()) {\n      if (!shim) this.init();\n      return shim.getBoundingClientRect(element);\n    }\n    return element ? element.getBoundingClientRect() : {\n      width: 0,\n      height: 0,\n      top: 0,\n      left: 0,\n      right: 0,\n      bottom: 0,\n      x: 0,\n      y: 0\n    };\n  }\n  /**\n   * Get XMLSerializer instance\n   * @returns {XMLSerializer|object}\n   */\n  static getXMLSerializer() {\n    if (Environment.isSSR()) {\n      if (!shim) this.init();\n      if (!xmlSerializerInstance) {\n        xmlSerializerInstance = shim.createXMLSerializer();\n      }\n      return xmlSerializerInstance;\n    }\n    if (!xmlSerializerInstance) {\n      xmlSerializerInstance = new XMLSerializer();\n    }\n    return xmlSerializerInstance;\n  }\n  /**\n   * Get DOMParser instance\n   * @returns {DOMParser|object}\n   */\n  static getDOMParser() {\n    if (Environment.isSSR()) {\n      if (!shim) this.init();\n      if (!domParserInstance) {\n        domParserInstance = shim.createDOMParser();\n      }\n      return domParserInstance;\n    }\n    if (!domParserInstance) {\n      domParserInstance = new DOMParser();\n    }\n    return domParserInstance;\n  }\n  /**\n   * Add event listener to window\n   * @param {string} event - Event name\n   * @param {EventListenerOrEventListenerObject} handler - Event handler\n   * @param {object} options - Event options\n   */\n  static addWindowEventListener(event, handler, options2) {\n    if (Environment.isBrowser()) {\n      window.addEventListener(event, handler, options2);\n    }\n  }\n  /**\n   * Remove event listener from window\n   * @param {string} event - Event name\n   * @param {EventListenerOrEventListenerObject} handler - Event handler\n   * @param {object} options - Event options\n   */\n  static removeWindowEventListener(event, handler, options2) {\n    if (Environment.isBrowser()) {\n      window.removeEventListener(event, handler, options2);\n    }\n  }\n  /**\n   * Request animation frame\n   * @param {FrameRequestCallback} callback - Callback function\n   * @returns {number|null}\n   */\n  static requestAnimationFrame(callback) {\n    if (Environment.isBrowser()) {\n      return window.requestAnimationFrame(callback);\n    }\n    callback(0);\n    return null;\n  }\n  /**\n   * Cancel animation frame\n   * @param {number} id - Animation frame ID\n   */\n  static cancelAnimationFrame(id) {\n    if (Environment.isBrowser() && id) {\n      window.cancelAnimationFrame(id);\n    }\n  }\n  /**\n   * Check if element exists\n   * @param {Element} element - Element to check\n   * @returns {boolean}\n   */\n  static elementExists(element) {\n    if (!element) return false;\n    if (Environment.isSSR()) {\n      return element._ssrMode === true || element.nodeName !== void 0;\n    }\n    return element.getRootNode ? element.getRootNode({ composed: true }) === document || element.isConnected : false;\n  }\n  /**\n   * Get window object (or null in SSR)\n   * @returns {Window|null}\n   */\n  static getWindow() {\n    return Environment.isBrowser() ? window : null;\n  }\n  /**\n   * Get document object (or null in SSR)\n   * @returns {Document|null}\n   */\n  static getDocument() {\n    return Environment.isBrowser() ? document : null;\n  }\n  /**\n   * Get the shim instance (for testing purposes)\n   * @returns {SSRDOMShim|null}\n   */\n  static _getShim() {\n    return shim;\n  }\n  /**\n   * Reset the shim instance (for testing purposes)\n   */\n  static _resetShim() {\n    shim = null;\n    xmlSerializerInstance = null;\n    domParserInstance = null;\n  }\n}\nconst fnIds = /* @__PURE__ */ new WeakMap();\nlet fnSeq = 0;\nlet Utils$1 = class Utils {\n  /**\n   * @param {*} item\n   */\n  static isObject(item) {\n    return item && typeof item === \"object\" && !Array.isArray(item);\n  }\n  // Type checking that works across different window objects\n  /**\n   * @param {string} type\n   * @param {string} val\n   */\n  static is(type, val) {\n    return Object.prototype.toString.call(val) === \"[object \" + type + \"]\";\n  }\n  static isSafari() {\n    return Environment.isBrowser() && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n  }\n  // to extend defaults with user options\n  // credit: http://stackoverflow.com/questions/27936772/deep-object-merging-in-es6-es7#answer-34749873\n  /**\n   * @param {any} target\n   * @param {any} source\n   */\n  static extend(target, source) {\n    if (!this.isObject(target) && this.isObject(source)) {\n      return this.clone(source);\n    }\n    const output = Object.assign({}, target);\n    if (this.isObject(target) && this.isObject(source)) {\n      Object.keys(source).forEach((key) => {\n        if (this.isObject(source[key])) {\n          if (!(key in target)) {\n            Object.assign(output, {\n              [key]: source[key]\n            });\n          } else {\n            output[key] = this.extend(target[key], source[key]);\n          }\n        } else {\n          Object.assign(output, {\n            [key]: source[key]\n          });\n        }\n      });\n    }\n    return output;\n  }\n  /**\n   * @param {any[]} arrToExtend\n   * @param {any} resultArr\n   */\n  static extendArray(arrToExtend, resultArr) {\n    const extendedArr = [];\n    arrToExtend.map((item) => {\n      extendedArr.push(Utils.extend(resultArr, item));\n    });\n    arrToExtend = extendedArr;\n    return arrToExtend;\n  }\n  // If month counter exceeds 12, it starts again from 1\n  /**\n   * @param {number} month\n   */\n  static monthMod(month) {\n    return month % 12;\n  }\n  /**\n   * clone object with optional shallow copy for performance\n   * @param {*} source - Source object to clone\n   * @param {WeakMap<any, any>} visited - Circular reference tracker\n   * @param {boolean} shallow - If true, performs shallow copy (default: false)\n   * @returns {*} Cloned object\n   */\n  static clone(source, visited = /* @__PURE__ */ new WeakMap(), shallow = false) {\n    if (source === null || typeof source !== \"object\") {\n      return source;\n    }\n    if (visited.has(source)) {\n      return visited.get(source);\n    }\n    let cloneResult;\n    if (Array.isArray(source)) {\n      if (shallow) {\n        cloneResult = source.slice();\n      } else {\n        cloneResult = [];\n        visited.set(source, cloneResult);\n        for (let i2 = 0; i2 < source.length; i2++) {\n          cloneResult[i2] = this.clone(source[i2], visited, false);\n        }\n      }\n    } else if (source instanceof Date) {\n      cloneResult = new Date(source.getTime());\n    } else {\n      if (shallow) {\n        cloneResult = Object.assign({}, source);\n      } else {\n        cloneResult = {};\n        visited.set(source, cloneResult);\n        for (const prop in source) {\n          if (Object.prototype.hasOwnProperty.call(source, prop)) {\n            cloneResult[prop] = this.clone(\n              /** @type {Record<string,any>} */\n              source[prop],\n              visited,\n              false\n            );\n          }\n        }\n      }\n    }\n    return cloneResult;\n  }\n  /**\n   * Shallow clone for performance when deep clone isn't needed\n   * @param {*} source - Source to clone\n   * @returns {*} Shallow cloned object\n   */\n  static shallowClone(source) {\n    if (source === null || typeof source !== \"object\") {\n      return source;\n    }\n    if (Array.isArray(source)) {\n      return source.slice();\n    }\n    return Object.assign({}, source);\n  }\n  /**\n   * Serialize options for an equality check, with functions included.\n   *\n   * `JSON.stringify` DROPS function values, so two configs differing only in a\n   * callback stringify identically. The update path used that comparison to skip\n   * redundant renders, which silently swallowed any update that changed only a\n   * function: a new `plotOptions.unit.positions` (a whole layout), a new\n   * `dataLabels.formatter`, a new custom tooltip.\n   *\n   * Functions are compared BY IDENTITY: the same function twice still compares\n   * equal (so the skip keeps working), a different one does not. A caller who\n   * passes a fresh closure on every update gets a render every time, which is\n   * the safe direction to err in - the closure may capture new state.\n   *\n   * @param {any} options\n   * @returns {string}\n   */\n  static stringifyForCompare(options2) {\n    return JSON.stringify(options2, (_key, value) => {\n      if (typeof value !== \"function\") return value;\n      let id = fnIds.get(value);\n      if (id === void 0) {\n        id = ++fnSeq;\n        fnIds.set(value, id);\n      }\n      return `__apx_fn_${id}`;\n    });\n  }\n  /**\n   * Fast shallow equality check for objects\n   * @param {Object} obj1 - First object\n   * @param {Object} obj2 - Second object\n   * @returns {boolean} True if shallowly equal\n   */\n  static shallowEqual(obj1, obj2) {\n    if (obj1 === obj2) return true;\n    if (!obj1 || !obj2) return false;\n    if (typeof obj1 !== \"object\" || typeof obj2 !== \"object\") {\n      return obj1 === obj2;\n    }\n    const keys1 = Object.keys(obj1);\n    const keys2 = Object.keys(obj2);\n    if (keys1.length !== keys2.length) return false;\n    for (const key of keys1) {\n      if (\n        /** @type {Record<string,any>} */\n        obj1[key] !== /** @type {Record<string,any>} */\n        obj2[key]\n      )\n        return false;\n    }\n    return true;\n  }\n  /**\n   * @param {number} x\n   */\n  static log10(x) {\n    return Math.log(x) / Math.LN10;\n  }\n  /**\n   * @param {number} x\n   */\n  static roundToBase10(x) {\n    return Math.pow(10, Math.floor(Math.log10(x)));\n  }\n  /**\n   * @param {number} x\n   * @param {number} base\n   */\n  static roundToBase(x, base) {\n    return Math.pow(base, Math.floor(Math.log(x) / Math.log(base)));\n  }\n  /**\n   * @param {any} val\n   */\n  static parseNumber(val) {\n    if (typeof val === \"number\" || val === null) return val;\n    return parseFloat(val);\n  }\n  /**\n   * @param {number} num\n   */\n  static stripNumber(num, precision = 2) {\n    return Number.isInteger(num) ? num : parseFloat(num.toPrecision(precision));\n  }\n  static randomId() {\n    return (Math.random() + 1).toString(36).substring(4);\n  }\n  /**\n   * @param {number} num\n   */\n  static noExponents(num) {\n    if (num.toString().includes(\"e\")) {\n      return Math.round(num);\n    }\n    return num;\n  }\n  /**\n   * @param {any} element\n   */\n  static elementExists(element) {\n    if (!element || !element.isConnected) {\n      return false;\n    }\n    return true;\n  }\n  /**\n   * @param {any} el\n   */\n  static getDimensions(el) {\n    if (!el) return [0, 0];\n    if (Environment.isSSR()) {\n      return [el._ssrWidth || 400, el._ssrHeight || 300];\n    }\n    let computedStyle;\n    try {\n      computedStyle = getComputedStyle(el, null);\n    } catch (e2) {\n      return [el.clientWidth || 0, el.clientHeight || 0];\n    }\n    let elementWidth = el.clientWidth;\n    let elementHeight = el.clientHeight;\n    if (!elementWidth || !elementHeight) {\n      const rect = el.getBoundingClientRect();\n      elementWidth = elementWidth || rect.width;\n      elementHeight = elementHeight || rect.height;\n    }\n    elementHeight -= parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom);\n    elementWidth -= parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight);\n    return [elementWidth, elementHeight];\n  }\n  /**\n   * @returns {any}\n   * @param {any} element\n   */\n  static getBoundingClientRect(element) {\n    if (!element) {\n      return {\n        top: 0,\n        right: 0,\n        bottom: 0,\n        left: 0,\n        width: 0,\n        height: 0,\n        x: 0,\n        y: 0\n      };\n    }\n    if (Environment.isSSR()) {\n      return BrowserAPIs.getBoundingClientRect(element);\n    }\n    const rect = element.getBoundingClientRect();\n    return {\n      top: rect.top,\n      right: rect.right,\n      bottom: rect.bottom,\n      left: rect.left,\n      width: element.clientWidth,\n      height: element.clientHeight,\n      x: rect.left,\n      y: rect.top\n    };\n  }\n  /**\n   * @param {any[]} arr\n   */\n  static getLargestStringFromArr(arr) {\n    return arr.reduce((a2, b2) => {\n      if (Array.isArray(b2)) {\n        b2 = b2.reduce((aa, bb) => aa.length > bb.length ? aa : bb);\n      }\n      return a2.length > b2.length ? a2 : b2;\n    }, 0);\n  }\n  // http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb#answer-12342275\n  static hexToRgba(hex = \"#999999\", opacity = 0.6) {\n    if (hex.substring(0, 1) !== \"#\") {\n      hex = \"#999999\";\n    }\n    const hexStr = hex.replace(\"#\", \"\");\n    const h2 = hexStr.match(new RegExp(\"(.{\" + hexStr.length / 3 + \"})\", \"g\")) || [];\n    for (let i2 = 0; i2 < h2.length; i2++) {\n      h2[i2] = parseInt(h2[i2].length === 1 ? h2[i2] + h2[i2] : h2[i2], 16);\n    }\n    if (typeof opacity !== \"undefined\") h2.push(opacity);\n    return \"rgba(\" + h2.join(\",\") + \")\";\n  }\n  /**\n   * @param {string} rgba\n   */\n  static getOpacityFromRGBA(rgba) {\n    return parseFloat(rgba.replace(/^.*,(.+)\\)/, \"$1\"));\n  }\n  /**\n   * Parse a #RGB or #RRGGBB hex colour string into [r,g,b] in 0–255.\n   * Returns null for invalid input. Used by getContrastRatio.\n   * @param {string} hex\n   * @returns {[number, number, number] | null}\n   */\n  static parseHex(hex) {\n    if (typeof hex !== \"string\") return null;\n    let h2 = hex.trim().replace(\"#\", \"\");\n    if (h2.length === 3) {\n      h2 = h2.split(\"\").map((c2) => c2 + c2).join(\"\");\n    }\n    if (!/^[0-9a-fA-F]{6}$/.test(h2)) return null;\n    return [\n      parseInt(h2.slice(0, 2), 16),\n      parseInt(h2.slice(2, 4), 16),\n      parseInt(h2.slice(4, 6), 16)\n    ];\n  }\n  /**\n   * Relative luminance per WCAG 2.x (https://www.w3.org/TR/WCAG22/#dfn-relative-luminance).\n   * @param {[number, number, number]} rgb 0–255 sRGB triplet\n   * @returns {number} 0.0–1.0\n   */\n  static relativeLuminance([r2, g2, b2]) {\n    const channel = (c2) => {\n      const v2 = c2 / 255;\n      return v2 <= 0.03928 ? v2 / 12.92 : Math.pow((v2 + 0.055) / 1.055, 2.4);\n    };\n    return 0.2126 * channel(r2) + 0.7152 * channel(g2) + 0.0722 * channel(b2);\n  }\n  /**\n   * WCAG contrast ratio between two hex colours. Returns 0 for invalid input.\n   * Range: 1 (identical) … 21 (#000 vs #fff).\n   * WCAG AA requires ≥ 4.5 for normal text and ≥ 3.0 for large text / UI components.\n   * @param {string} hex1\n   * @param {string} hex2\n   * @returns {number}\n   */\n  static getContrastRatio(hex1, hex2) {\n    const rgb1 = Utils.parseHex(hex1);\n    const rgb2 = Utils.parseHex(hex2);\n    if (!rgb1 || !rgb2) return 0;\n    const l1 = Utils.relativeLuminance(rgb1);\n    const l2 = Utils.relativeLuminance(rgb2);\n    const lighter = Math.max(l1, l2);\n    const darker = Math.min(l1, l2);\n    return (lighter + 0.05) / (darker + 0.05);\n  }\n  /**\n   * @param {any} rgb\n   */\n  static rgb2hex(rgb) {\n    rgb = rgb.match(\n      /^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i\n    );\n    return rgb && rgb.length === 4 ? \"#\" + (\"0\" + parseInt(rgb[1], 10).toString(16)).slice(-2) + (\"0\" + parseInt(rgb[2], 10).toString(16)).slice(-2) + (\"0\" + parseInt(rgb[3], 10).toString(16)).slice(-2) : \"\";\n  }\n  /**\n   * @param {number} percent\n   * @param {string} color\n   */\n  shadeRGBColor(percent, color) {\n    const f = color.split(\",\"), t2 = percent < 0 ? 0 : 255, p2 = percent < 0 ? percent * -1 : percent, R = parseInt(f[0].slice(4), 10), G2 = parseInt(f[1], 10), B = parseInt(f[2], 10);\n    return \"rgb(\" + (Math.round((t2 - R) * p2) + R) + \",\" + (Math.round((t2 - G2) * p2) + G2) + \",\" + (Math.round((t2 - B) * p2) + B) + \")\";\n  }\n  /**\n   * @param {number} percent\n   * @param {string} color\n   */\n  shadeHexColor(percent, color) {\n    const f = parseInt(color.slice(1), 16), t2 = percent < 0 ? 0 : 255, p2 = percent < 0 ? percent * -1 : percent, R = f >> 16, G2 = f >> 8 & 255, B = f & 255;\n    return \"#\" + (16777216 + (Math.round((t2 - R) * p2) + R) * 65536 + (Math.round((t2 - G2) * p2) + G2) * 256 + (Math.round((t2 - B) * p2) + B)).toString(16).slice(1);\n  }\n  // beautiful color shading blending code\n  // http://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors\n  /**\n   * @param {number} p\n   * @param {string} color\n   */\n  shadeColor(p2, color) {\n    if (Utils.isColorHex(color)) {\n      return this.shadeHexColor(p2, color);\n    } else {\n      return this.shadeRGBColor(p2, color);\n    }\n  }\n  /**\n   * @param {string} color\n   */\n  static isColorHex(color) {\n    return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(color);\n  }\n  /**\n   * @param {string} color\n   */\n  static isCSSVariable(color) {\n    if (typeof color !== \"string\") return false;\n    const value = color.trim();\n    return value.startsWith(\"var(\") && value.endsWith(\")\");\n  }\n  /**\n   * @param {string} color\n   */\n  static getThemeColor(color) {\n    if (!Utils.isCSSVariable(color)) return color;\n    if (Environment.isSSR()) return color;\n    const tempElem = document.createElement(\"div\");\n    tempElem.style.cssText = \"position:fixed; left: -9999px; visibility:hidden;\";\n    tempElem.style.color = color;\n    document.body.appendChild(tempElem);\n    let computedColor;\n    try {\n      computedColor = window.getComputedStyle(tempElem).color;\n    } finally {\n      if (tempElem.parentNode) {\n        tempElem.parentNode.removeChild(tempElem);\n      }\n    }\n    return computedColor;\n  }\n  /**\n   * @param {string} color\n   * @param {number} opacity\n   */\n  static applyOpacityToColor(color, opacity) {\n    const value = Number(opacity);\n    if (!Number.isFinite(value)) return color;\n    if (value <= 0) return \"transparent\";\n    if (value >= 1) return color;\n    const percent = Math.round(value * 100);\n    return `color-mix(in srgb, ${color} ${percent}%, transparent)`;\n  }\n  /**\n   * @param {number} size\n   * @param {number} dataPointsLen\n   */\n  static getPolygonPos(size, dataPointsLen) {\n    const dotsArray = [];\n    const angle = Math.PI * 2 / dataPointsLen;\n    for (let i2 = 0; i2 < dataPointsLen; i2++) {\n      const curPos = {};\n      curPos.x = size * Math.sin(i2 * angle);\n      curPos.y = -size * Math.cos(i2 * angle);\n      dotsArray.push(curPos);\n    }\n    return dotsArray;\n  }\n  /**\n   * @param {number} centerX\n   * @param {number} centerY\n   * @param {number} radius\n   * @param {number} angleInDegrees\n   */\n  static polarToCartesian(centerX, centerY, radius, angleInDegrees) {\n    const angleInRadians = (angleInDegrees - 90) * Math.PI / 180;\n    return {\n      x: centerX + radius * Math.cos(angleInRadians),\n      y: centerY + radius * Math.sin(angleInRadians)\n    };\n  }\n  /**\n   * @param {string} str\n   */\n  static escapeString(str, escapeWith = \"x\") {\n    let newStr = str.toString().slice();\n    newStr = newStr.replace(/[` ~!@#$%^&*()|+=?;:'\",.<>{}[\\]\\\\/]/gi, escapeWith);\n    return newStr;\n  }\n  /**\n   * @param {number} val\n   */\n  static negToZero(val) {\n    return val < 0 ? 0 : val;\n  }\n  /**\n   * @param {any[]} arr\n   * @param {number} old_index\n   * @param {number} new_index\n   */\n  static moveIndexInArray(arr, old_index, new_index) {\n    if (new_index >= arr.length) {\n      let k = new_index - arr.length + 1;\n      while (k--) {\n        arr.push(void 0);\n      }\n    }\n    arr.splice(new_index, 0, arr.splice(old_index, 1)[0]);\n    return arr;\n  }\n  /**\n   * @param {string} s\n   */\n  static extractNumber(s2) {\n    return parseFloat(s2.replace(/[^\\d.]*/g, \"\"));\n  }\n  /**\n   * @param {any} el\n   * @param {string} cls\n   */\n  static findAncestor(el, cls) {\n    while ((el = el.parentElement) && !el.classList.contains(cls)) ;\n    return el;\n  }\n  /**\n   * @param {any} el\n   * @param {Record<string, any>} styles\n   */\n  static setELstyles(el, styles) {\n    for (const key in styles) {\n      if (Object.prototype.hasOwnProperty.call(styles, key)) {\n        el.style[key] = styles[key];\n      }\n    }\n  }\n  // prevents JS prevision errors when adding\n  /**\n   * @param {number} a\n   * @param {number} b\n   */\n  static preciseAddition(a2, b2) {\n    const aDecimals = (String(a2).split(\".\")[1] || \"\").length;\n    const bDecimals = (String(b2).split(\".\")[1] || \"\").length;\n    const factor = Math.pow(10, Math.max(aDecimals, bDecimals));\n    return (Math.round(a2 * factor) + Math.round(b2 * factor)) / factor;\n  }\n  /**\n   * @param {any} value\n   */\n  static isNumber(value) {\n    return !isNaN(value) && parseFloat(String(Number(value))) === value && !isNaN(parseInt(value, 10));\n  }\n  /**\n   * @param {number} n\n   */\n  static isFloat(n2) {\n    return Number(n2) === n2 && n2 % 1 !== 0;\n  }\n  static isMsEdge() {\n    if (Environment.isSSR()) return false;\n    const ua = window.navigator.userAgent;\n    const edge = ua.indexOf(\"Edge/\");\n    if (edge > 0) {\n      return parseInt(ua.substring(edge + 5, ua.indexOf(\".\", edge)), 10);\n    }\n    return false;\n  }\n  //\n  // Find the Greatest Common Divisor of two numbers\n  //\n  /**\n   * @param {number} a\n   * @param {number} b\n   */\n  static getGCD(a2, b2, p2 = 7) {\n    let factor = Math.pow(10, p2 - Math.floor(Math.log10(Math.max(a2, b2))));\n    if (factor > 1) {\n      a2 = Math.round(Math.abs(a2) * factor);\n      b2 = Math.round(Math.abs(b2) * factor);\n    } else {\n      factor = 1;\n    }\n    while (b2) {\n      const t2 = b2;\n      b2 = a2 % b2;\n      a2 = t2;\n    }\n    return a2 / factor;\n  }\n  /**\n   * @param {number} n\n   */\n  static getPrimeFactors(n2) {\n    const factors = [];\n    let divisor = 2;\n    while (n2 >= 2) {\n      if (n2 % divisor == 0) {\n        factors.push(divisor);\n        n2 = n2 / divisor;\n      } else {\n        divisor++;\n      }\n    }\n    return factors;\n  }\n  /**\n   * @param {number} a\n   * @param {number} b\n   */\n  static mod(a2, b2, p2 = 7) {\n    const big = Math.pow(10, p2 - Math.floor(Math.log10(Math.max(a2, b2))));\n    a2 = Math.round(Math.abs(a2) * big);\n    b2 = Math.round(Math.abs(b2) * big);\n    return a2 % b2 / big;\n  }\n};\nclass DateTime {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n    this.months31 = [1, 3, 5, 7, 8, 10, 12];\n    this.months30 = [2, 4, 6, 9, 11];\n    this.daysCntOfYear = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\n  }\n  /**\n   * @param {any} date\n   */\n  isValidDate(date) {\n    if (typeof date === \"number\") {\n      return false;\n    }\n    return !isNaN(this.parseDate(date));\n  }\n  /**\n   * @param {any} dateStr\n   */\n  getTimeStamp(dateStr) {\n    if (isNaN(Date.parse(dateStr))) {\n      return dateStr;\n    }\n    const utc = this.w.config.xaxis.labels.datetimeUTC;\n    return !utc ? new Date(dateStr).getTime() : new Date(new Date(dateStr).toISOString().substr(0, 25)).getTime();\n  }\n  /**\n   * @param {any} timestamp\n   */\n  getDate(timestamp) {\n    const utc = this.w.config.xaxis.labels.datetimeUTC;\n    return utc ? new Date(new Date(timestamp).toUTCString()) : new Date(timestamp);\n  }\n  /**\n   * @param {string} dateStr\n   */\n  parseDate(dateStr) {\n    const parsed = Date.parse(dateStr);\n    if (!isNaN(parsed)) {\n      return this.getTimeStamp(dateStr);\n    }\n    let output = Date.parse(dateStr.replace(/-/g, \"/\").replace(/[a-z]+/gi, \" \"));\n    output = this.getTimeStamp(output);\n    return output;\n  }\n  // This fixes the difference of x-axis labels between chrome/safari\n  // Fixes #1726, #1544, #1485, #1255\n  /**\n   * @param {string} dateStr\n   */\n  parseDateWithTimezone(dateStr) {\n    return Date.parse(dateStr.replace(/-/g, \"/\").replace(/[a-z]+/gi, \" \"));\n  }\n  // http://stackoverflow.com/questions/14638018/current-time-formatting-with-javascript#answer-14638191\n  /**\n   * @param {Date} date\n   * @param {string} format\n   */\n  formatDate(date, format) {\n    const locale = this.w.globals.locale;\n    const utc = this.w.config.xaxis.labels.datetimeUTC;\n    const MMMM = [\"\\0\", ...locale.months];\n    const MMM = [\"\u0001\", ...locale.shortMonths];\n    const dddd = [\"\u0002\", ...locale.days];\n    const ddd = [\"\u0003\", ...locale.shortDays];\n    function ii(i2, len = 2) {\n      let s3 = i2 + \"\";\n      while (s3.length < len) s3 = \"0\" + s3;\n      return s3;\n    }\n    const y = utc ? date.getUTCFullYear() : date.getFullYear();\n    format = format.replace(/(^|[^\\\\])yyyy+/g, \"$1\" + y);\n    format = format.replace(/(^|[^\\\\])yy/g, \"$1\" + y.toString().substr(2, 2));\n    format = format.replace(/(^|[^\\\\])y/g, \"$1\" + y);\n    const M2 = (utc ? date.getUTCMonth() : date.getMonth()) + 1;\n    format = format.replace(/(^|[^\\\\])MMMM+/g, \"$1\" + MMMM[0]);\n    format = format.replace(/(^|[^\\\\])MMM/g, \"$1\" + MMM[0]);\n    format = format.replace(/(^|[^\\\\])MM/g, \"$1\" + ii(M2));\n    format = format.replace(/(^|[^\\\\])M/g, \"$1\" + M2);\n    const d = utc ? date.getUTCDate() : date.getDate();\n    format = format.replace(/(^|[^\\\\])dddd+/g, \"$1\" + dddd[0]);\n    format = format.replace(/(^|[^\\\\])ddd/g, \"$1\" + ddd[0]);\n    format = format.replace(/(^|[^\\\\])dd/g, \"$1\" + ii(d));\n    format = format.replace(/(^|[^\\\\])d/g, \"$1\" + d);\n    const H = utc ? date.getUTCHours() : date.getHours();\n    format = format.replace(/(^|[^\\\\])HH+/g, \"$1\" + ii(H));\n    format = format.replace(/(^|[^\\\\])H/g, \"$1\" + H);\n    const h2 = H > 12 ? H - 12 : H === 0 ? 12 : H;\n    format = format.replace(/(^|[^\\\\])hh+/g, \"$1\" + ii(h2));\n    format = format.replace(/(^|[^\\\\])h/g, \"$1\" + h2);\n    const m2 = utc ? date.getUTCMinutes() : date.getMinutes();\n    format = format.replace(/(^|[^\\\\])mm+/g, \"$1\" + ii(m2));\n    format = format.replace(/(^|[^\\\\])m/g, \"$1\" + m2);\n    const s2 = utc ? date.getUTCSeconds() : date.getSeconds();\n    format = format.replace(/(^|[^\\\\])ss+/g, \"$1\" + ii(s2));\n    format = format.replace(/(^|[^\\\\])s/g, \"$1\" + s2);\n    let f = utc ? date.getUTCMilliseconds() : date.getMilliseconds();\n    format = format.replace(/(^|[^\\\\])fff+/g, \"$1\" + ii(f, 3));\n    f = Math.round(f / 10);\n    format = format.replace(/(^|[^\\\\])ff/g, \"$1\" + ii(f));\n    f = Math.round(f / 10);\n    format = format.replace(/(^|[^\\\\])f/g, \"$1\" + f);\n    const T = H < 12 ? \"AM\" : \"PM\";\n    format = format.replace(/(^|[^\\\\])TT+/g, \"$1\" + T);\n    format = format.replace(/(^|[^\\\\])T/g, \"$1\" + T.charAt(0));\n    const t2 = T.toLowerCase();\n    format = format.replace(/(^|[^\\\\])tt+/g, \"$1\" + t2);\n    format = format.replace(/(^|[^\\\\])t/g, \"$1\" + t2.charAt(0));\n    let tz = -date.getTimezoneOffset();\n    let K = utc || !tz ? \"Z\" : tz > 0 ? \"+\" : \"-\";\n    if (!utc) {\n      tz = Math.abs(tz);\n      const tzHrs = Math.floor(tz / 60);\n      const tzMin = tz % 60;\n      K += ii(tzHrs) + \":\" + ii(tzMin);\n    }\n    format = format.replace(/(^|[^\\\\])K/g, \"$1\" + K);\n    const day = (utc ? date.getUTCDay() : date.getDay()) + 1;\n    format = format.replace(new RegExp(dddd[0], \"g\"), dddd[day]);\n    format = format.replace(new RegExp(ddd[0], \"g\"), ddd[day]);\n    format = format.replace(new RegExp(MMMM[0], \"g\"), MMMM[M2]);\n    format = format.replace(new RegExp(MMM[0], \"g\"), MMM[M2]);\n    format = format.replace(/\\\\(.)/g, \"$1\");\n    return format;\n  }\n  /**\n   * @param {number} minX\n   * @param {number} maxX\n   */\n  getTimeUnitsfromTimestamp(minX, maxX) {\n    const w2 = this.w;\n    if (w2.config.xaxis.min !== void 0) {\n      minX = w2.config.xaxis.min;\n    }\n    if (w2.config.xaxis.max !== void 0) {\n      maxX = w2.config.xaxis.max;\n    }\n    const tsMin = this.getDate(minX);\n    const tsMax = this.getDate(maxX);\n    const minD = this.formatDate(tsMin, \"yyyy MM dd HH mm ss fff\").split(\" \");\n    const maxD = this.formatDate(tsMax, \"yyyy MM dd HH mm ss fff\").split(\" \");\n    return {\n      minMillisecond: parseInt(minD[6], 10),\n      maxMillisecond: parseInt(maxD[6], 10),\n      minSecond: parseInt(minD[5], 10),\n      maxSecond: parseInt(maxD[5], 10),\n      minMinute: parseInt(minD[4], 10),\n      maxMinute: parseInt(maxD[4], 10),\n      minHour: parseInt(minD[3], 10),\n      maxHour: parseInt(maxD[3], 10),\n      minDate: parseInt(minD[2], 10),\n      maxDate: parseInt(maxD[2], 10),\n      minMonth: parseInt(minD[1], 10) - 1,\n      maxMonth: parseInt(maxD[1], 10) - 1,\n      minYear: parseInt(minD[0], 10),\n      maxYear: parseInt(maxD[0], 10)\n    };\n  }\n  /**\n   * @param {number} year\n   */\n  isLeapYear(year) {\n    return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n  }\n  /**\n   * @param {number} month\n   * @param {number} year\n   * @param {number} subtract\n   */\n  calculcateLastDaysOfMonth(month, year, subtract) {\n    const days = this.determineDaysOfMonths(month, year);\n    return days - subtract;\n  }\n  /**\n   * @param {number} year\n   */\n  determineDaysOfYear(year) {\n    let days = 365;\n    if (this.isLeapYear(year)) {\n      days = 366;\n    }\n    return days;\n  }\n  /**\n   * @param {number} year\n   * @param {number} month\n   * @param {number} date\n   */\n  determineRemainingDaysOfYear(year, month, date) {\n    let dayOfYear = this.daysCntOfYear[month] + date;\n    if (month > 1 && this.isLeapYear(year)) dayOfYear++;\n    return dayOfYear;\n  }\n  /**\n   * @param {number} month\n   * @param {number} year\n   */\n  determineDaysOfMonths(month, year) {\n    let days = 30;\n    month = Utils$1.monthMod(month);\n    switch (true) {\n      case this.months30.indexOf(month) > -1:\n        if (month === 2) {\n          if (this.isLeapYear(year)) {\n            days = 29;\n          } else {\n            days = 28;\n          }\n        }\n        break;\n      case this.months31.indexOf(month) > -1:\n        days = 31;\n        break;\n      default:\n        days = 31;\n        break;\n    }\n    return days;\n  }\n  // ───────────────────────────────────────────────────────────────────────────\n  // Pure date helpers used by the v6 single-interval TimeScale.\n  // Native Date setters/getters do all rollover work (leap years, month\n  // length, year crossings), eliminating the manual rollover code that was\n  // the source of the historical TimeScale boundary bugs.\n  // ───────────────────────────────────────────────────────────────────────────\n  /**\n   * Extract calendar fields from a timestamp. Month is 0-indexed (matches\n   * Date.getMonth / getUTCMonth).\n   *\n   * @param {number} timestamp\n   * @param {boolean} isUTC\n   * @returns {{ year: number, month: number, date: number, hour: number, minute: number, second: number, ms: number, weekday: number }}\n   */\n  getDateFields(timestamp, isUTC) {\n    const d = new Date(timestamp);\n    return isUTC ? {\n      year: d.getUTCFullYear(),\n      month: d.getUTCMonth(),\n      date: d.getUTCDate(),\n      hour: d.getUTCHours(),\n      minute: d.getUTCMinutes(),\n      second: d.getUTCSeconds(),\n      ms: d.getUTCMilliseconds(),\n      weekday: d.getUTCDay()\n    } : {\n      year: d.getFullYear(),\n      month: d.getMonth(),\n      date: d.getDate(),\n      hour: d.getHours(),\n      minute: d.getMinutes(),\n      second: d.getSeconds(),\n      ms: d.getMilliseconds(),\n      weekday: d.getDay()\n    };\n  }\n  /**\n   * Advance a timestamp by `count` units. Native setters handle cross-month,\n   * cross-year, leap-year, and DST rollover correctly.\n   *\n   * @param {number} timestamp\n   * @param {'year'|'month'|'week'|'day'|'hour'|'minute'|'second'} unit\n   * @param {number} count  may be negative\n   * @param {boolean} isUTC\n   * @returns {number}\n   */\n  addInterval(timestamp, unit, count, isUTC) {\n    const d = new Date(timestamp);\n    if (isUTC) {\n      switch (unit) {\n        case \"year\":\n          d.setUTCFullYear(d.getUTCFullYear() + count);\n          break;\n        case \"month\":\n          d.setUTCMonth(d.getUTCMonth() + count);\n          break;\n        case \"week\":\n          d.setUTCDate(d.getUTCDate() + count * 7);\n          break;\n        case \"day\":\n          d.setUTCDate(d.getUTCDate() + count);\n          break;\n        case \"hour\":\n          d.setUTCHours(d.getUTCHours() + count);\n          break;\n        case \"minute\":\n          d.setUTCMinutes(d.getUTCMinutes() + count);\n          break;\n        case \"second\":\n          d.setUTCSeconds(d.getUTCSeconds() + count);\n          break;\n      }\n    } else {\n      switch (unit) {\n        case \"year\":\n          d.setFullYear(d.getFullYear() + count);\n          break;\n        case \"month\":\n          d.setMonth(d.getMonth() + count);\n          break;\n        case \"week\":\n          d.setDate(d.getDate() + count * 7);\n          break;\n        case \"day\":\n          d.setDate(d.getDate() + count);\n          break;\n        case \"hour\":\n          d.setHours(d.getHours() + count);\n          break;\n        case \"minute\":\n          d.setMinutes(d.getMinutes() + count);\n          break;\n        case \"second\":\n          d.setSeconds(d.getSeconds() + count);\n          break;\n      }\n    }\n    return d.getTime();\n  }\n  /**\n   * Snap a timestamp UP to the next boundary aligned with `step` units of\n   * `unit`. Returns the input unchanged if already on a boundary. Alignment\n   * rules per unit:\n   *   - second: 0/step/2*step/... seconds within a minute (step must divide 60)\n   *   - minute: 0/step/2*step/... minutes within an hour (step must divide 60)\n   *   - hour:   0/step/... hours within a day (step must divide 24)\n   *   - day:    every day (step always 1)\n   *   - week:   next Monday on a `step`-week stride from a fixed epoch Monday\n   *   - month:  Jan/Apr/Jul/Oct for step=3, Jan/Jul for step=6 (step must divide 12)\n   *   - year:   year % step === 0\n   *\n   * @param {number} timestamp\n   * @param {'year'|'month'|'week'|'day'|'hour'|'minute'|'second'} unit\n   * @param {number} step\n   * @param {boolean} isUTC\n   * @returns {number}\n   */\n  ceilToBoundary(timestamp, unit, step, isUTC) {\n    const d = new Date(timestamp);\n    if (isUTC) {\n      switch (unit) {\n        case \"second\": {\n          const s2 = d.getUTCSeconds();\n          const aligned = Math.ceil(s2 / step) * step;\n          if (aligned === s2 && d.getUTCMilliseconds() === 0)\n            return timestamp;\n          d.setUTCMilliseconds(0);\n          d.setUTCSeconds(aligned);\n          return d.getTime();\n        }\n        case \"minute\": {\n          const m2 = d.getUTCMinutes();\n          const aligned = Math.ceil(m2 / step) * step;\n          if (aligned === m2 && d.getUTCSeconds() === 0 && d.getUTCMilliseconds() === 0)\n            return timestamp;\n          d.setUTCMilliseconds(0);\n          d.setUTCSeconds(0);\n          d.setUTCMinutes(aligned);\n          return d.getTime();\n        }\n        case \"hour\": {\n          const h2 = d.getUTCHours();\n          const aligned = Math.ceil(h2 / step) * step;\n          if (aligned === h2 && d.getUTCMinutes() === 0 && d.getUTCSeconds() === 0 && d.getUTCMilliseconds() === 0)\n            return timestamp;\n          d.setUTCMilliseconds(0);\n          d.setUTCSeconds(0);\n          d.setUTCMinutes(0);\n          d.setUTCHours(aligned);\n          return d.getTime();\n        }\n        case \"day\": {\n          if (d.getUTCHours() === 0 && d.getUTCMinutes() === 0 && d.getUTCSeconds() === 0 && d.getUTCMilliseconds() === 0)\n            return timestamp;\n          d.setUTCMilliseconds(0);\n          d.setUTCSeconds(0);\n          d.setUTCMinutes(0);\n          d.setUTCHours(0);\n          d.setUTCDate(d.getUTCDate() + 1);\n          return d.getTime();\n        }\n        case \"week\": {\n          const MS_PER_WEEK = 7 * 24 * 60 * 60 * 1e3;\n          const REF_MONDAY_UTC = Date.UTC(1970, 0, 5);\n          d.setUTCMilliseconds(0);\n          d.setUTCSeconds(0);\n          d.setUTCMinutes(0);\n          d.setUTCHours(0);\n          const startOfDay = d.getTime();\n          const weeksSinceRef = Math.ceil(\n            (startOfDay - REF_MONDAY_UTC) / MS_PER_WEEK\n          );\n          const alignedWeeks = Math.ceil(weeksSinceRef / step) * step;\n          const aligned = REF_MONDAY_UTC + alignedWeeks * MS_PER_WEEK;\n          if (aligned >= timestamp) return aligned;\n          return aligned + step * MS_PER_WEEK;\n        }\n        case \"month\": {\n          const m2 = d.getUTCMonth();\n          const aligned = Math.ceil(m2 / step) * step;\n          if (aligned === m2 && d.getUTCDate() === 1 && d.getUTCHours() === 0 && d.getUTCMinutes() === 0 && d.getUTCSeconds() === 0 && d.getUTCMilliseconds() === 0)\n            return timestamp;\n          d.setUTCMilliseconds(0);\n          d.setUTCSeconds(0);\n          d.setUTCMinutes(0);\n          d.setUTCHours(0);\n          d.setUTCDate(1);\n          d.setUTCMonth(aligned);\n          return d.getTime();\n        }\n        case \"year\": {\n          const y = d.getUTCFullYear();\n          const aligned = Math.ceil(y / step) * step;\n          if (aligned === y && d.getUTCMonth() === 0 && d.getUTCDate() === 1 && d.getUTCHours() === 0 && d.getUTCMinutes() === 0 && d.getUTCSeconds() === 0 && d.getUTCMilliseconds() === 0)\n            return timestamp;\n          return Date.UTC(aligned, 0, 1);\n        }\n      }\n    } else {\n      switch (unit) {\n        case \"second\": {\n          const s2 = d.getSeconds();\n          const aligned = Math.ceil(s2 / step) * step;\n          if (aligned === s2 && d.getMilliseconds() === 0) return timestamp;\n          d.setMilliseconds(0);\n          d.setSeconds(aligned);\n          return d.getTime();\n        }\n        case \"minute\": {\n          const m2 = d.getMinutes();\n          const aligned = Math.ceil(m2 / step) * step;\n          if (aligned === m2 && d.getSeconds() === 0 && d.getMilliseconds() === 0)\n            return timestamp;\n          d.setMilliseconds(0);\n          d.setSeconds(0);\n          d.setMinutes(aligned);\n          return d.getTime();\n        }\n        case \"hour\": {\n          const h2 = d.getHours();\n          const aligned = Math.ceil(h2 / step) * step;\n          if (aligned === h2 && d.getMinutes() === 0 && d.getSeconds() === 0 && d.getMilliseconds() === 0)\n            return timestamp;\n          d.setMilliseconds(0);\n          d.setSeconds(0);\n          d.setMinutes(0);\n          d.setHours(aligned);\n          return d.getTime();\n        }\n        case \"day\": {\n          if (d.getHours() === 0 && d.getMinutes() === 0 && d.getSeconds() === 0 && d.getMilliseconds() === 0)\n            return timestamp;\n          d.setMilliseconds(0);\n          d.setSeconds(0);\n          d.setMinutes(0);\n          d.setHours(0);\n          d.setDate(d.getDate() + 1);\n          return d.getTime();\n        }\n        case \"week\": {\n          const MS_PER_WEEK = 7 * 24 * 60 * 60 * 1e3;\n          const REF_MONDAY_LOCAL = new Date(1970, 0, 5).getTime();\n          d.setMilliseconds(0);\n          d.setSeconds(0);\n          d.setMinutes(0);\n          d.setHours(0);\n          const startOfDay = d.getTime();\n          const weeksSinceRef = Math.ceil(\n            (startOfDay - REF_MONDAY_LOCAL) / MS_PER_WEEK\n          );\n          const alignedWeeks = Math.ceil(weeksSinceRef / step) * step;\n          const aligned = REF_MONDAY_LOCAL + alignedWeeks * MS_PER_WEEK;\n          if (aligned >= timestamp) return aligned;\n          return aligned + step * MS_PER_WEEK;\n        }\n        case \"month\": {\n          const m2 = d.getMonth();\n          const aligned = Math.ceil(m2 / step) * step;\n          if (aligned === m2 && d.getDate() === 1 && d.getHours() === 0 && d.getMinutes() === 0 && d.getSeconds() === 0 && d.getMilliseconds() === 0)\n            return timestamp;\n          d.setMilliseconds(0);\n          d.setSeconds(0);\n          d.setMinutes(0);\n          d.setHours(0);\n          d.setDate(1);\n          d.setMonth(aligned);\n          return d.getTime();\n        }\n        case \"year\": {\n          const y = d.getFullYear();\n          const aligned = Math.ceil(y / step) * step;\n          if (aligned === y && d.getMonth() === 0 && d.getDate() === 1 && d.getHours() === 0 && d.getMinutes() === 0 && d.getSeconds() === 0 && d.getMilliseconds() === 0)\n            return timestamp;\n          return new Date(aligned, 0, 1).getTime();\n        }\n      }\n    }\n    return timestamp;\n  }\n  /**\n   * Test whether a timestamp falls exactly on a unit boundary (start of year,\n   * start of month, start of day, etc.). Used by the multi-resolution\n   * formatter to upgrade a tick's display unit to a coarser scale.\n   *\n   * @param {number} timestamp\n   * @param {'year'|'month'|'day'|'hour'|'minute'|'second'} unit\n   * @param {boolean} isUTC\n   * @returns {boolean}\n   */\n  isAtBoundary(timestamp, unit, isUTC) {\n    const f = this.getDateFields(timestamp, isUTC);\n    switch (unit) {\n      case \"year\":\n        return f.month === 0 && f.date === 1 && f.hour === 0 && f.minute === 0 && f.second === 0 && f.ms === 0;\n      case \"month\":\n        return f.date === 1 && f.hour === 0 && f.minute === 0 && f.second === 0 && f.ms === 0;\n      case \"day\":\n        return f.hour === 0 && f.minute === 0 && f.second === 0 && f.ms === 0;\n      case \"hour\":\n        return f.minute === 0 && f.second === 0 && f.ms === 0;\n      case \"minute\":\n        return f.second === 0 && f.ms === 0;\n      case \"second\":\n        return f.ms === 0;\n    }\n    return false;\n  }\n}\nclass Formatters {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n    this.tooltipKeyFormat = \"dd MMM\";\n  }\n  /**\n   * @param {Function} fn\n   * @param {any} val\n   * @param {any} timestamp\n   * @param {any} _opts\n   */\n  xLabelFormat(fn, val, timestamp, _opts) {\n    const w2 = this.w;\n    if (w2.config.xaxis.type === \"datetime\") {\n      if (w2.config.xaxis.labels.formatter === void 0) {\n        if (w2.config.tooltip.x.formatter === void 0) {\n          const datetimeObj = new DateTime(this.w);\n          return datetimeObj.formatDate(\n            datetimeObj.getDate(val),\n            w2.config.tooltip.x.format\n          );\n        }\n      }\n    }\n    return fn(val, timestamp, _opts);\n  }\n  /**\n   * @param {any} val\n   */\n  defaultGeneralFormatter(val) {\n    if (Array.isArray(val)) {\n      return val.map((v2) => {\n        return v2;\n      });\n    } else {\n      return val;\n    }\n  }\n  /**\n   * @param {any} v\n   * @param {ApexYAxis} yaxe\n   */\n  defaultYFormatter(v2, yaxe) {\n    const w2 = this.w;\n    if (Utils$1.isNumber(v2)) {\n      if (w2.globals.yValueDecimal !== 0) {\n        v2 = v2.toFixed(\n          yaxe.decimalsInFloat !== void 0 ? yaxe.decimalsInFloat : w2.globals.yValueDecimal\n        );\n      } else {\n        const f = v2.toFixed(0);\n        v2 = Number(f) === v2 ? f : v2.toFixed(1);\n      }\n    }\n    return v2;\n  }\n  setLabelFormatters() {\n    const w2 = this.w;\n    const fmt = w2.formatters;\n    fmt.xaxisTooltipFormatter = (val) => {\n      return this.defaultGeneralFormatter(val);\n    };\n    fmt.ttKeyFormatter = (val) => {\n      return this.defaultGeneralFormatter(val);\n    };\n    fmt.ttZFormatter = (val) => {\n      return val;\n    };\n    fmt.legendFormatter = (val) => {\n      return this.defaultGeneralFormatter(val);\n    };\n    if (w2.config.xaxis.labels.formatter !== void 0) {\n      fmt.xLabelFormatter = w2.config.xaxis.labels.formatter;\n    } else {\n      fmt.xLabelFormatter = (val) => {\n        if (Utils$1.isNumber(val)) {\n          if (!w2.config.xaxis.convertedCatToNumeric && w2.config.xaxis.type === \"numeric\") {\n            if (Utils$1.isNumber(w2.config.xaxis.decimalsInFloat)) {\n              return val.toFixed(w2.config.xaxis.decimalsInFloat);\n            } else {\n              const diff = w2.globals.maxX - w2.globals.minX;\n              if (diff > 0) {\n                const step = diff / 10;\n                const decimals = Math.max(0, -Math.floor(Math.log10(step)));\n                return val.toFixed(decimals);\n              }\n              return val.toFixed(0);\n            }\n          }\n          if (w2.globals.isBarHorizontal) {\n            const range = w2.globals.maxY - w2.globals.minY;\n            if (range < 4) {\n              return val.toFixed(1);\n            }\n          }\n          return val.toFixed(0);\n        }\n        return val;\n      };\n    }\n    if (typeof w2.config.tooltip.x.formatter === \"function\") {\n      fmt.ttKeyFormatter = w2.config.tooltip.x.formatter;\n    } else {\n      fmt.ttKeyFormatter = fmt.xLabelFormatter;\n    }\n    if (typeof w2.config.xaxis.tooltip.formatter === \"function\") {\n      fmt.xaxisTooltipFormatter = w2.config.xaxis.tooltip.formatter;\n    }\n    if (Array.isArray(w2.config.tooltip.y)) {\n      fmt.ttVal = w2.config.tooltip.y;\n    } else {\n      if (w2.config.tooltip.y.formatter !== void 0) {\n        fmt.ttVal = w2.config.tooltip.y;\n      }\n    }\n    if (w2.config.tooltip.z.formatter !== void 0) {\n      fmt.ttZFormatter = w2.config.tooltip.z.formatter;\n    }\n    if (w2.config.legend.formatter !== void 0) {\n      fmt.legendFormatter = w2.config.legend.formatter;\n    }\n    fmt.yLabelFormatters = [];\n    w2.config.yaxis.forEach((yaxe, i2) => {\n      if (yaxe.labels.formatter !== void 0) {\n        fmt.yLabelFormatters[i2] = yaxe.labels.formatter;\n      } else if (w2.config.chart.type === \"violin\") {\n        const round = (v2) => typeof v2 === \"number\" && isFinite(v2) ? `${Math.round(v2 * 100) / 100}` : v2;\n        fmt.yLabelFormatters[i2] = (val) => {\n          if (!w2.globals.xyCharts) return val;\n          return Array.isArray(val) ? val.map(round) : round(val);\n        };\n      } else {\n        fmt.yLabelFormatters[i2] = (val) => {\n          if (!w2.globals.xyCharts) return val;\n          if (Array.isArray(val)) {\n            return val.map((v2) => {\n              return this.defaultYFormatter(v2, yaxe);\n            });\n          } else {\n            return this.defaultYFormatter(val, yaxe);\n          }\n        };\n      }\n    });\n    return w2.globals;\n  }\n  heatmapLabelFormatters() {\n    const w2 = this.w;\n    if (w2.config.chart.type === \"heatmap\") {\n      w2.globals.yAxisScale[0].result = /** @type {any} */\n      w2.seriesData.seriesNames.slice();\n      const longest = (\n        /** @type {any} */\n        w2.seriesData.seriesNames.reduce(\n          (a2, b2) => a2.length > b2.length ? a2 : b2,\n          0\n        )\n      );\n      w2.globals.yAxisScale[0].niceMax = longest;\n      w2.globals.yAxisScale[0].niceMin = longest;\n    }\n  }\n}\nconst name = \"en\";\nconst options = { \"months\": [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"], \"shortMonths\": [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"], \"days\": [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], \"shortDays\": [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], \"toolbar\": { \"exportToSVG\": \"Download SVG\", \"exportToPNG\": \"Download PNG\", \"exportToCSV\": \"Download CSV\", \"menu\": \"Menu\", \"selection\": \"Selection\", \"selectionZoom\": \"Selection Zoom\", \"zoomIn\": \"Zoom In\", \"zoomOut\": \"Zoom Out\", \"pan\": \"Panning\", \"reset\": \"Reset Zoom\", \"measure\": \"Measure\" } };\nconst en = {\n  name,\n  options\n};\nclass Options {\n  constructor() {\n    this.yAxis = {\n      show: true,\n      showAlways: false,\n      showForNullSeries: true,\n      seriesName: void 0,\n      opposite: false,\n      reversed: false,\n      logarithmic: false,\n      logBase: 10,\n      tickAmount: void 0,\n      stepSize: void 0,\n      forceNiceScale: false,\n      alignZero: false,\n      max: void 0,\n      min: void 0,\n      floating: false,\n      decimalsInFloat: void 0,\n      labels: {\n        show: true,\n        showDuplicates: false,\n        minWidth: 0,\n        maxWidth: 160,\n        offsetX: 0,\n        offsetY: 0,\n        align: void 0,\n        rotate: 0,\n        padding: 20,\n        style: {\n          colors: [],\n          fontSize: \"11px\",\n          fontWeight: 400,\n          fontFamily: void 0,\n          cssClass: \"\"\n        },\n        formatter: void 0\n      },\n      axisBorder: {\n        show: false,\n        color: \"#e0e0e0\",\n        width: 1,\n        offsetX: 0,\n        offsetY: 0\n      },\n      axisTicks: {\n        show: false,\n        color: \"#e0e0e0\",\n        width: 6,\n        offsetX: 0,\n        offsetY: 0\n      },\n      title: {\n        text: void 0,\n        rotate: -90,\n        offsetY: 0,\n        offsetX: 0,\n        style: {\n          color: void 0,\n          fontSize: \"11px\",\n          fontWeight: 900,\n          fontFamily: void 0,\n          cssClass: \"\"\n        }\n      },\n      tooltip: {\n        enabled: false,\n        offsetX: 0\n      },\n      crosshairs: {\n        show: true,\n        position: \"front\",\n        stroke: {\n          color: \"#b6b6b6\",\n          width: 1,\n          dashArray: 0\n        }\n      }\n    };\n    this.pointAnnotation = {\n      id: void 0,\n      x: 0,\n      y: null,\n      yAxisIndex: 0,\n      seriesIndex: void 0,\n      mouseEnter: void 0,\n      mouseLeave: void 0,\n      click: void 0,\n      marker: {\n        size: 4,\n        fillColor: \"#fff\",\n        strokeWidth: 2,\n        strokeColor: \"#333\",\n        shape: \"circle\",\n        offsetX: 0,\n        offsetY: 0,\n        // radius: 2, // DEPRECATED\n        cssClass: \"\"\n      },\n      label: {\n        borderColor: \"#c2c2c2\",\n        borderWidth: 1,\n        borderRadius: 2,\n        text: void 0,\n        textAnchor: \"middle\",\n        offsetX: 0,\n        offsetY: 0,\n        mouseEnter: void 0,\n        mouseLeave: void 0,\n        click: void 0,\n        style: {\n          background: \"#fff\",\n          color: void 0,\n          fontSize: \"11px\",\n          fontFamily: void 0,\n          fontWeight: 400,\n          cssClass: \"\",\n          padding: {\n            left: 5,\n            right: 5,\n            top: 2,\n            bottom: 2\n          }\n        }\n      },\n      customSVG: {\n        // this will be deprecated in the next major version as it is going to be replaced with a better alternative below (image)\n        SVG: void 0,\n        cssClass: void 0,\n        offsetX: 0,\n        offsetY: 0\n      },\n      image: {\n        path: void 0,\n        width: 20,\n        height: 20,\n        offsetX: 0,\n        offsetY: 0\n      },\n      tooltip: {\n        // Show a hover tooltip over the annotation marker, like a regular\n        // data point. Lets you surface richer detail than fits in the label.\n        enabled: false,\n        // Static tooltip content (HTML allowed; array joined with <br/>).\n        // Falls back to label.text when omitted.\n        text: void 0,\n        // formatter({ annotation, seriesIndex, id, w }) => string (HTML).\n        // Takes precedence over `text` when provided.\n        formatter: void 0,\n        // 'light' | 'dark'. Falls back to the global tooltip.theme.\n        theme: void 0,\n        offsetX: 0,\n        offsetY: 0\n      }\n    };\n    this.yAxisAnnotation = {\n      id: void 0,\n      y: 0,\n      y2: null,\n      strokeDashArray: 1,\n      fillColor: \"#c2c2c2\",\n      borderColor: \"#c2c2c2\",\n      borderWidth: 1,\n      opacity: 0.3,\n      offsetX: 0,\n      offsetY: 0,\n      width: \"100%\",\n      yAxisIndex: 0,\n      label: {\n        borderColor: \"#c2c2c2\",\n        borderWidth: 1,\n        borderRadius: 2,\n        text: void 0,\n        textAnchor: \"end\",\n        position: \"right\",\n        offsetX: 0,\n        offsetY: -3,\n        mouseEnter: void 0,\n        mouseLeave: void 0,\n        click: void 0,\n        style: {\n          background: \"#fff\",\n          color: void 0,\n          fontSize: \"11px\",\n          fontFamily: void 0,\n          fontWeight: 400,\n          cssClass: \"\",\n          padding: {\n            left: 5,\n            right: 5,\n            top: 2,\n            bottom: 2\n          }\n        }\n      }\n    };\n    this.xAxisAnnotation = {\n      id: void 0,\n      x: 0,\n      x2: null,\n      strokeDashArray: 1,\n      fillColor: \"#c2c2c2\",\n      borderColor: \"#c2c2c2\",\n      borderWidth: 1,\n      opacity: 0.3,\n      offsetX: 0,\n      offsetY: 0,\n      label: {\n        borderColor: \"#c2c2c2\",\n        borderWidth: 1,\n        borderRadius: 2,\n        text: void 0,\n        textAnchor: \"middle\",\n        orientation: \"vertical\",\n        position: \"top\",\n        offsetX: 0,\n        offsetY: 0,\n        mouseEnter: void 0,\n        mouseLeave: void 0,\n        click: void 0,\n        style: {\n          background: \"#fff\",\n          color: void 0,\n          fontSize: \"11px\",\n          fontFamily: void 0,\n          fontWeight: 400,\n          cssClass: \"\",\n          padding: {\n            left: 5,\n            right: 5,\n            top: 2,\n            bottom: 2\n          }\n        }\n      }\n    };\n    this.text = {\n      x: 0,\n      y: 0,\n      text: \"\",\n      textAnchor: \"start\",\n      foreColor: void 0,\n      fontSize: \"13px\",\n      fontFamily: void 0,\n      fontWeight: 400,\n      appendTo: \".apexcharts-annotations\",\n      backgroundColor: \"transparent\",\n      borderColor: \"#c2c2c2\",\n      borderRadius: 0,\n      borderWidth: 0,\n      paddingLeft: 4,\n      paddingRight: 4,\n      paddingTop: 2,\n      paddingBottom: 2\n    };\n  }\n  init() {\n    return {\n      annotations: {\n        yaxis: [this.yAxisAnnotation],\n        xaxis: [this.xAxisAnnotation],\n        points: [this.pointAnnotation],\n        texts: [],\n        images: [],\n        shapes: []\n      },\n      // Weave (#1): public plugin platform. Per-chart activation list:\n      // { name, options?, order? }. Requires the Weave host to be bundled\n      // (`import 'apexcharts/features/weave'`, included in the full bundle) and\n      // the plugin registered via ApexCharts.registerPlugin().\n      plugins: [],\n      chart: {\n        animations: {\n          // Master switch — set false to render charts without any animation.\n          // Each chart type gets a tailored initial-mount animation by default:\n          //   line/area/rangeArea/radar: pen-stroke draw + radial fill bloom\n          //   bar/stacked/range/funnel:  grow from baseline (+ stagger)\n          //   scatter/bubble:            scale-up pop with overshoot\n          //   heatmap:                   diagonal-wave cell reveal\n          //   treemap:                   largest-tile-first cascade\n          //   pie/donut/polar/gauge:     arc sweep + needle settle\n          // Speed is controlled by `speed`; per-element stagger by\n          // `animateGradually.enabled` / `animateGradually.delay`.\n          enabled: true,\n          speed: 800,\n          // Cadence (#6): easing for the generic tweens (data-update value\n          // transitions, path morphs, marker animate). A registered name, a\n          // cubic-bezier [x1,y1,x2,y2] array, or a function (t in [0,1]).\n          // 'easeInOutSine' is the historical curve, so the default is\n          // behavior-neutral. The tuned initial-draw pen/pop easings are fixed.\n          easing: \"easeInOutSine\",\n          animateGradually: {\n            // Drives per-element stagger across all chart types. When enabled,\n            // bars/heatmap-cells/scatter-points/treemap-tiles reveal in\n            // sequence; line/area markers fade in progressively along the\n            // draw. `delay` is the requested step in ms (auto-capped per\n            // chart so total stagger ≤ ~half the animation duration).\n            delay: 150,\n            enabled: true\n          },\n          dynamicAnimation: {\n            // Data-change (updateSeries) animation. Independent from the\n            // initial-mount animations above.\n            enabled: true,\n            speed: 350,\n            // Easing for data-change morphs only (same accepted forms as\n            // `animations.easing`). Unset -> inherit the chart-wide easing,\n            // except detected streaming scrolls (rolling window / append\n            // under xaxis.range) which default to 'linear' so the window\n            // slides at constant velocity instead of pulsing each tick.\n            easing: void 0\n          },\n          chartTypeMorph: {\n            // Cross-type morph (updateOptions changing chart.type). Bridges\n            // the destroy+recreate flicker by sampling source + target paths\n            // into N evenly-spaced perimeter points and tweening point-by-point\n            // with rotation-search alignment, so the transition is always smooth\n            // and non-self-intersecting even between very different shapes (bar\n            // rect ↔ pie wedge / radial arc). Supported pairs include bar ↔\n            // pie / donut / radialBar / polarArea / funnel / pyramid (plus the\n            // trivial pie ↔ donut ↔ polarArea cases). Falls back to instant\n            // snap when types or data shape are incompatible.\n            enabled: true,\n            speed: 600\n          },\n          // Honor the OS-level prefers-reduced-motion setting. When true (default)\n          // and the user has the accessibility preference enabled, all initial-mount\n          // animations are skipped and the chart renders instantly.\n          respectReducedMotion: true,\n          // Above this many data points, per-element morph + stagger (which\n          // spins up one JS-driven animation timeline per path — three chained\n          // tweens each in morphSVG) is replaced by a single GPU-composited\n          // opacity fade of the whole series. Thousands of candlesticks/bars\n          // otherwise jank the main thread on initial render and on every zoom.\n          // The fade reuses the existing delayedElements reveal so the result\n          // still animates in, just at O(1) cost instead of O(n). Set to 0 to\n          // always animate per-element regardless of dataset size.\n          largeDatasetThreshold: 1e3\n        },\n        background: \"\",\n        locales: [en],\n        defaultLocale: \"en\",\n        // Perspectives (#10): serializable/shareable view state. Passive:\n        // requires `import 'apexcharts/features/perspectives'`. serializeOptions\n        // is the whitelist of function-free option paths stored in a token.\n        perspectives: {\n          serializeOptions: [\"theme\", \"xaxis\", \"yaxis\", \"title\", \"subtitle\"]\n        },\n        // Rewind (#3): undo/redo history. Opt-in (bundle + behavior): requires\n        // `import 'apexcharts/features/history'` AND chart.history.enabled.\n        history: {\n          enabled: false,\n          maxDepth: 100,\n          coalesceMs: 250,\n          keyboard: true\n        },\n        // Strata (#2): hybrid SVG+canvas series renderer. 'svg' (default) |\n        // 'canvas' | 'auto'. 'auto'/'canvas' need the canvas renderer feature\n        // (`import 'apexcharts/features/renderer-canvas'`); without it, or with\n        // a canvas-unsupported feature (pattern/image fill, color-matrix state\n        // filters), selection falls back to 'svg'. Only the series layer is\n        // canvas-capable in v1; chrome stays SVG.\n        renderer: \"svg\",\n        rendererThreshold: 8e3,\n        layers: {\n          series: \"auto\",\n          grid: \"svg\",\n          annotations: \"svg\",\n          dataLabels: \"svg\"\n        },\n        dropShadow: {\n          enabled: false,\n          enabledOnSeries: void 0,\n          top: 2,\n          left: 2,\n          blur: 4,\n          color: \"#000\",\n          opacity: 0.7\n        },\n        events: {\n          animationEnd: void 0,\n          beforeMount: void 0,\n          mounted: void 0,\n          updated: void 0,\n          click: void 0,\n          mouseMove: void 0,\n          mouseLeave: void 0,\n          xAxisLabelClick: void 0,\n          legendClick: void 0,\n          markerClick: void 0,\n          selection: void 0,\n          dataPointSelection: void 0,\n          dataPointMouseEnter: void 0,\n          dataPointMouseLeave: void 0,\n          beforeZoom: void 0,\n          beforeResetZoom: void 0,\n          zoomed: void 0,\n          scrolled: void 0,\n          brushScrolled: void 0,\n          crossFilter: void 0,\n          filterChange: void 0,\n          annotationDragged: void 0,\n          annotationEdited: void 0,\n          annotationCreated: void 0,\n          annotationStyled: void 0,\n          annotationDeleted: void 0,\n          measured: void 0,\n          keyDown: void 0,\n          keyUp: void 0\n        },\n        foreColor: \"#373d3f\",\n        fontFamily: \"Helvetica, Arial, sans-serif\",\n        height: \"auto\",\n        parentHeightOffset: 15,\n        redrawOnParentResize: true,\n        redrawOnWindowResize: true,\n        id: void 0,\n        group: void 0,\n        nonce: void 0,\n        // Per-chart license key override for the gated premium features\n        // (storyboard, link/crossfilter, ink, measure, contextMenu,\n        // perspectives, history). Most specific wins: chart.license ->\n        // ApexCharts.setLicense() -> window.Apex.license -> unlicensed (trial\n        // watermark). Shared across the ApexCharts family. See setLicense().\n        license: void 0,\n        offsetX: 0,\n        offsetY: 0,\n        injectStyleSheet: true,\n        selection: {\n          enabled: false,\n          type: \"x\",\n          // selectedPoints: undefined, // default datapoints that should be selected automatically\n          fill: {\n            color: \"#24292e\",\n            opacity: 0.1\n          },\n          stroke: {\n            width: 1,\n            color: \"#24292e\",\n            opacity: 0.4,\n            dashArray: 3\n          },\n          xaxis: {\n            min: void 0,\n            max: void 0\n          },\n          yaxis: {\n            min: void 0,\n            max: void 0\n          }\n        },\n        sparkline: {\n          enabled: false\n        },\n        brush: {\n          enabled: false,\n          autoScaleYaxis: true,\n          target: void 0,\n          targets: void 0\n        },\n        // Linked Views (#4): crossfilter / linked highlighting. Requires the\n        // `link` feature. Two modes:\n        //   HIGHLIGHT (P1): `enabled` with no `dimension`. Charts sharing a\n        //   `chart.group` form a set; brushing a range (needs\n        //   `chart.selection.enabled`) dims out-of-range marks in place.\n        //   FILTER (P2): set `dimension` (its presence selects this path). Each\n        //   chart declares a dimension + reduction over a shared record set\n        //   registered with ApexCharts.crossfilter({ id, records }); clicking a\n        //   bucket re-aggregates the other charts. See docs/spec.\n        link: {\n          enabled: false,\n          mode: \"highlight\",\n          dimOpacity: 0.2,\n          // FILTER-mode config (all optional except dimension):\n          id: void 0,\n          // crossfilter coordinator id (defaults to chart.group)\n          dimension: void 0,\n          // (row) => key; presence selects filter mode\n          reduce: void 0,\n          // 'count' | { sum|avg|min|max: field } | (rows)=>n\n          type: void 0,\n          // 'category' | 'range' (else inferred from bins)\n          bins: void 0,\n          // range dims: { width } | { count } | { thresholds }\n          order: void 0,\n          // category order: 'first-seen' | 'asc' | 'desc' | fn\n          seriesName: void 0\n          // axis-chart series name (default 'Count')\n        },\n        // Ink Layer (#7): direct-manipulation annotations. When enabled, every\n        // point annotation is draggable (unless it sets draggable:false); or opt\n        // in per annotation with annotations.points[].draggable. Clicking an\n        // ink-managed annotation opens a floating editor card: rename inline,\n        // recolor, toggle bold, step the font size, size/reshape the marker, or\n        // delete the note. Axis-line annotations get separate Label and Line\n        // color rows, so restyling the label chip never touches the stroke.\n        // Requires the `ink` feature. Fires annotationDragged,\n        // annotationEdited, annotationStyled and annotationDeleted.\n        ink: {\n          enabled: false,\n          // Show a minimal \"add note\" tool palette; clicking it arms create\n          // mode (the next plot click drops an editable, draggable annotation).\n          palette: false,\n          // Snap a dragged point / axis-line annotation to the nearest gridline\n          // (numeric x + linear y). Undo/redo of ink edits is automatic when the\n          // history (Rewind) feature is enabled.\n          snap: false,\n          // Accent swatches offered by the floating note editor; defaults to a\n          // built-in 6-color palette when undefined.\n          noteColors: void 0\n        },\n        // Measure ruler (#18): a measure/delta ruler. Requires the `measure`\n        // feature. Hold `key` (default 'm') and drag A->B on the plot, or call\n        // chart.startMeasure()/chart.stopMeasure() to arm it. The live ruler\n        // reads dx, dy, %change and slope; on release it pins as a data-anchored\n        // overlay that re-projects on zoom/resize. Fires `measured`.\n        measure: {\n          enabled: false,\n          // 'span' (default): finance-style vertical band between two x-points\n          // with a \"change (%) + range\" readout, endpoints snapped to the first\n          // series. 'free': a diagonal ruler between two arbitrary points.\n          mode: \"span\",\n          key: \"m\",\n          pinOnRelease: true,\n          // Styling tokens. Every element also carries a stable CSS class\n          // (apexcharts-measure-band / -vline / -line / -label-bg / -label,\n          // group gets apexcharts-measure-up|down|flat). Colors are left\n          // undefined so they resolve config -> `--apx-measure-*` CSS custom\n          // property -> built-in default; set them here to force a color from JS.\n          colors: {\n            up: void 0,\n            down: void 0,\n            neutral: void 0,\n            guide: void 0\n          },\n          band: true,\n          // span mode: shaded band between the two x-positions\n          guides: true,\n          // span mode: vertical dashed reference lines\n          markers: true,\n          // endpoint dots on the series line\n          // Content: value formatters and a full readout override. `label`\n          // receives { from, to, dx, dy, percentChange, slope, mode } and\n          // returns a string or string[] (lines).\n          format: { x: void 0, y: void 0, percent: void 0 },\n          label: void 0\n        },\n        // Radial Actions (#chrome): right-click / long-press context menu.\n        // Requires the `contextMenu` feature. Each action receives the clicked\n        // data coordinates, so verbs act at the point (not chart-wide like a\n        // toolbar button). `items` is an ordered list of built-in ids\n        // ('annotate' | 'xline' | 'yline' | 'measure') and/or custom\n        // { id, label, icon, onClick(ctx, { x, y, seriesIndex, dataPointIndex,\n        // clientX, clientY }) }. 'measure' is shown only when the measure tool\n        // is enabled. `labels` overrides built-in text; `noteText` is the label\n        // dropped by 'annotate'.\n        contextMenu: {\n          enabled: false,\n          items: [\"annotate\", \"xline\", \"yline\", \"measure\"],\n          labels: {\n            annotate: void 0,\n            xline: void 0,\n            yline: void 0,\n            measure: void 0\n          },\n          noteText: \"Note\",\n          // 'xline' (\"Annotate here\") drops a dashed vertical LINE at the\n          // clicked x; 'yline' (\"Mark this level\") a dashed horizontal line at\n          // the clicked y. Lines only, never a range rectangle. Like the note,\n          // a line is ink-managed when the ink feature is bundled: it opens\n          // the floating editor (rename; separate Label and Line color rows,\n          // so restyling the chip cannot blank the stroke; delete), drags\n          // along its axis, and undoes via Rewind. `line` styles both items.\n          line: {\n            text: \"\",\n            // label drawn on the line; empty for no label\n            strokeDashArray: 4,\n            color: void 0\n            // undefined keeps the annotation default color\n          }\n        },\n        stacked: false,\n        stackOnlyBar: true,\n        // mixed chart with stacked bars and line series - incorrect line draw #907\n        stackType: \"normal\",\n        // Real-time streaming mode. When enabled, appendData() bounds memory\n        // automatically: each series is trimmed to `maxPoints` (when set) or\n        // to the visible `xaxis.range` window plus a two-point off-screen\n        // runway (so exiting segments slide off the left edge instead of\n        // popping). The scroll animation itself needs no opt-in; updates\n        // that continue the previous window (appendData, or updateSeries with\n        // a shifted fixed-length window) always translate at constant\n        // velocity; see modules/animations/StreamScroll.\n        streaming: {\n          enabled: false,\n          maxPoints: void 0\n        },\n        toolbar: {\n          show: true,\n          offsetX: 0,\n          offsetY: 0,\n          tools: {\n            download: true,\n            selection: true,\n            zoom: true,\n            zoomin: true,\n            zoomout: true,\n            pan: true,\n            reset: true,\n            // Shown only when the measure ruler is active (chart.measure.enabled\n            // and the `measure` feature bundled). Toggles the measure tool; set\n            // false to keep the ruler key-driven only. See chart.measure.\n            measure: true,\n            customIcons: []\n          },\n          export: {\n            csv: {\n              filename: void 0,\n              columnDelimiter: \",\",\n              headerCategory: \"category\",\n              headerValue: \"value\",\n              categoryFormatter: void 0,\n              valueFormatter: void 0\n            },\n            png: {\n              filename: void 0\n            },\n            svg: {\n              filename: void 0\n            },\n            scale: void 0,\n            width: void 0,\n            // An exported SVG is a standalone document: it cannot reach the\n            // page's @font-face rules, so a custom font falls back to a\n            // generic one in the PNG/SVG. When true, matching @font-face\n            // rules are inlined as base64 data URIs. See #3617.\n            embedFonts: true\n          },\n          autoSelected: \"zoom\"\n          // accepts -> zoom, pan, selection, measure\n        },\n        type: \"line\",\n        width: \"100%\",\n        zoom: {\n          enabled: true,\n          type: \"x\",\n          autoScaleYaxis: false,\n          // Wheel and pinch zoom can both be triggered without meaning to (a\n          // page scroll or a two-finger swipe over the chart), so 'auto' offers\n          // them only when the viewer has a way back: the toolbar's reset\n          // button. With the toolbar hidden they stay off, since a zoom nobody\n          // asked for and nobody can undo is a trap. Set either to true to\n          // force the gesture on regardless (for a page that supplies its own\n          // reset control), or false to turn it off outright.\n          allowMouseWheelZoom: \"auto\",\n          // Momentum: two-finger pinch-zoom on touch devices. Zooms the x-axis\n          // around the pinch centroid (matching the x-only wheel/toolbar zoom),\n          // frame-by-frame rather than the 400ms wheel throttle.\n          pinch: \"auto\",\n          zoomedArea: {\n            fill: {\n              color: \"#90CAF9\",\n              opacity: 0.4\n            },\n            stroke: {\n              color: \"#0D47A1\",\n              opacity: 0.4,\n              width: 1\n            }\n          }\n        },\n        // Momentum: kinetic panning on touch. When a one-finger pan is released\n        // with velocity, the chart keeps gliding and decelerates by `friction`\n        // each frame, clamping (no elastic overshoot) at the data edges.\n        pan: {\n          inertia: true,\n          friction: 0.92\n        },\n        accessibility: {\n          enabled: true,\n          description: void 0,\n          announcements: {\n            enabled: true\n          },\n          keyboard: {\n            enabled: true,\n            navigation: {\n              enabled: true,\n              wrapAround: false\n            }\n          }\n        },\n        dataReducer: {\n          enabled: false,\n          algorithm: \"lttb\",\n          targetPoints: 250,\n          threshold: 500\n        }\n      },\n      parsing: {\n        x: void 0,\n        y: void 0\n      },\n      plotOptions: {\n        line: {\n          isSlopeChart: false,\n          colors: {\n            threshold: 0,\n            colorAboveThreshold: void 0,\n            colorBelowThreshold: void 0\n          }\n        },\n        area: {\n          fillTo: \"origin\"\n        },\n        bar: {\n          horizontal: false,\n          columnWidth: \"70%\",\n          // should be in percent 0 - 100\n          barHeight: \"70%\",\n          // should be in percent 0 - 100\n          distributed: false,\n          borderRadius: 0,\n          borderRadiusApplication: \"around\",\n          // [around, end]\n          borderRadiusWhenStacked: \"last\",\n          // [all, last]\n          rangeBarOverlap: true,\n          rangeBarGroupRows: false,\n          hideZeroBarsWhenGrouped: false,\n          isDumbbell: false,\n          dumbbellColors: void 0,\n          isFunnel: false,\n          isFunnel3d: true,\n          colors: {\n            ranges: [],\n            backgroundBarColors: [],\n            backgroundBarOpacity: 1,\n            backgroundBarRadius: 0\n          },\n          dataLabels: {\n            position: \"top\",\n            // top, center, bottom\n            maxItems: 100,\n            hideOverflowingLabels: true,\n            orientation: \"horizontal\",\n            total: {\n              enabled: false,\n              formatter: void 0,\n              offsetX: 0,\n              offsetY: 0,\n              style: {\n                color: \"#373d3f\",\n                fontSize: \"12px\",\n                fontFamily: void 0,\n                fontWeight: 600\n              }\n            }\n          }\n        },\n        bubble: {\n          zScaling: true,\n          minBubbleRadius: void 0,\n          maxBubbleRadius: void 0\n        },\n        scatter: {\n          // Spread overlapping points apart (\"jitter\"). Two uses, one engine:\n          //  - Strip plot: supply data as { x: 'Category', y: [v1, v2, ...] }.\n          //    Each category becomes a band and the values are scattered\n          //    horizontally within it. Marker styling comes from the standard\n          //    `markers` / `colors` config.\n          //  - Overplotting: ordinary { x, y } points get a small random offset\n          //    so dense clusters fan out. The underlying data (and tooltip\n          //    values) stay exact — only the drawn position moves.\n          // Offsets are in axis units (x: 1 = one category step) and are\n          // deterministic (stable across re-renders, SSR-safe).\n          jitter: {\n            enabled: false,\n            x: 0,\n            // max ± horizontal offset, in x-axis units\n            y: 0,\n            // max ± vertical offset, in y-axis units\n            distributed: false,\n            // single series: colour each band differently\n            maxPoints: 5e3\n            // per band; excess values are stride-thinned\n          }\n        },\n        candlestick: {\n          colors: {\n            upward: \"#00B746\",\n            downward: \"#EF403C\"\n          },\n          wick: {\n            useFillColor: true\n          }\n        },\n        boxPlot: {\n          colors: {\n            upper: \"#00E396\",\n            lower: \"#008FFB\"\n          },\n          // Where the whiskers reach when the summary is DERIVED from raw\n          // observations (a datum supplying `points` instead of a 5-number y,\n          // which needs `apexcharts/features/stats`). Ignored for precomputed\n          // summaries, which are drawn exactly as given.\n          //   'minmax' → the extremes, so nothing is hidden\n          //   'tukey'  → the last observation inside 1.5 * IQR of each\n          //              quartile. Points beyond the fence fall outside the\n          //              whisker, so pair it with `points.show` or they become\n          //              invisible.\n          whiskers: \"minmax\",\n          // Optional individual observations (\"jitter\") overlaid on each box.\n          // Inert unless a data point supplies a `points: number[]` array; off\n          // by default so existing boxPlot charts are unchanged.\n          points: {\n            show: false,\n            shape: \"circle\",\n            // 'circle' | 'square'\n            size: 2.5,\n            // radius (px)\n            jitter: 0.5,\n            // 0..1 fraction of the box half-width to scatter within\n            maxPoints: 3e3,\n            // cap per box; excess is stride-thinned\n            opacity: 0.9,\n            // 'series-dark' (default) → a darker shade of the series colour,\n            // 'series' → the series colour, or any literal colour string.\n            fillColor: \"series-dark\",\n            strokeColor: \"#fff\",\n            strokeWidth: 1\n            // Optional `colorScale` (undeclared so a user object merges cleanly)\n            // colours each dot by its value: { colors, min, max, steps }\n          }\n        },\n        violin: {\n          // Multiply the density-derived half-width. 1 = density's own maxWeight\n          // maps to half the category slot.\n          bandwidthScale: 1,\n          // Kernel density estimation, used only when the density is DERIVED\n          // from raw observations (a datum supplying `points`, or a flat number\n          // array as `y`, which needs `apexcharts/features/stats`). A\n          // precomputed density profile is drawn exactly as given.\n          //   bandwidth  → kernel width in value units. Unset uses Silverman's\n          //                rule of thumb, which takes the smaller of the\n          //                standard deviation and a scaled IQR so one distant\n          //                outlier cannot smear the curve flat. Note this is a\n          //                statistical parameter, unlike `bandwidthScale`\n          //                above, which only scales the drawn width.\n          //   resolution → density samples per violin (default 64).\n          kde: {\n            bandwidth: void 0,\n            resolution: 64\n          },\n          // 'individual' → every violin uses the full slot width (scaled to its\n          // own peak). 'group' → all violins share one scale (the densest in the\n          // series), so widths stay proportional to density across categories.\n          normalize: \"individual\",\n          // Individual observations (\"jitter\") overlaid on the violin shape.\n          points: {\n            show: true,\n            shape: \"circle\",\n            // 'circle' | 'square'\n            size: 2.5,\n            // radius (px)\n            jitter: 0.5,\n            // 0..1 fraction of the half-width to scatter within\n            constrainToViolin: true,\n            // clamp jitter to the density width at each value\n            maxPoints: 3e3,\n            // cap per violin; excess is stride-thinned\n            opacity: 0.9,\n            // Default: a darker shade of each violin's own colour, with a white\n            // outline. fillColor accepts 'series-dark' (default), 'series' (the\n            // violin's colour as-is), or any literal colour string.\n            fillColor: \"series-dark\",\n            strokeColor: \"#fff\",\n            strokeWidth: 1\n            // Optional `colorScale` (left undeclared so a user object merges\n            // cleanly) colours each dot by its value along a ramp:\n            //   { colors: ['#0d0887', … '#f0f921'], min, max, steps }\n          }\n        },\n        histogram: {\n          // How the bin width is chosen from the raw observations. A rule name\n          // ('auto' | 'fd' | 'sturges' | 'scott' | 'rice' | 'sqrt') or a fixed\n          // bin count. 'auto' takes the narrower of Freedman-Diaconis and\n          // Sturges, falling back to Sturges when the IQR is 0 (which happens\n          // as soon as most values are identical).\n          bins: \"auto\",\n          // Explicit bin width in value units. Wins over `bins` when set: use\n          // it when the bin boundaries carry meaning (decades, 5-minute\n          // buckets) rather than being a statistical choice.\n          binWidth: void 0,\n          // [min, max] to bin over, instead of the data's own extent. Lets\n          // several histograms share one scale.\n          range: void 0,\n          // y units: 'count' (observations per bin), 'relative' (percent of\n          // the series total), or 'density' (count / (n * binWidth), so the\n          // total area is 1 and bins of different widths stay comparable).\n          normalize: \"count\",\n          // Running total across bins, i.e. a cumulative distribution.\n          cumulative: false,\n          // With more than one series, draw every distribution across the FULL\n          // bin so they overlay, instead of dividing the bin between them. All\n          // series already share one set of edges, and comparing two shapes is\n          // the reason to put them on one axis; splitting the bin makes the\n          // columns stop touching, which reads as a clustered bar chart rather\n          // than a distribution. Set false for side-by-side bars.\n          //\n          // An overlay is unreadable opaque, so it also softens the fill and\n          // drops the bin separator stroke. Both remain overridable.\n          overlap: true\n        },\n        heatmap: {\n          radius: 2,\n          enableShades: true,\n          shadeIntensity: 0.5,\n          reverseNegativeShade: false,\n          distributed: false,\n          useFillColorAsStroke: false,\n          colorScale: {\n            inverse: false,\n            ranges: [],\n            min: void 0,\n            max: void 0,\n            // Replaces the default categorical legend with a continuous\n            // gradient stripe + a hover indicator arrow. Honors\n            // `chart.legend.position` (top / right / bottom / left).\n            gradientLegend: {\n              enabled: false,\n              // Strip length along the legend's long axis. Accepts a number\n              // (pixels) or a percentage string. For top/bottom placement the\n              // percentage is resolved against the chart's SVG width; for\n              // left/right placement, against the SVG height.\n              width: \"70%\",\n              height: \"70%\",\n              thickness: 12,\n              // Alignment of the strip within the legend area:\n              //  - top/bottom: 'start' = left, 'center', 'end' = right\n              //  - left/right: 'start' = top,  'center', 'end' = bottom\n              align: \"center\",\n              // Number of gradient stops sampled from the shade function when\n              // no explicit `ranges` are provided.\n              stops: 16,\n              // Show min/max labels at the ends of the strip.\n              showLabels: true,\n              // Show a value tooltip next to the arrow when hovering a cell.\n              showHoverValue: true,\n              labelStyle: {\n                fontSize: \"11px\",\n                fontFamily: void 0,\n                colors: void 0\n              },\n              arrow: {\n                size: 8,\n                color: void 0\n                // falls back to chart.foreColor\n              },\n              formatter: void 0\n              // (val) => string, for min/max + hover value\n            }\n          }\n        },\n        funnel: {\n          // 'rectangle' preserves the existing centered-rectangle funnel\n          // geometry. 'trapezoid' produces continuous sloped sides between\n          // consecutive stages (each stage's bottom width matches the next\n          // stage's top width).\n          shape: \"rectangle\",\n          // For shape: 'trapezoid' only — what to do with the last stage's\n          // bottom edge: 'flat' (parallel sides) or 'taper' (taper to a point).\n          lastShape: \"flat\"\n        },\n        treemap: {\n          enableShades: true,\n          shadeIntensity: 0.5,\n          distributed: false,\n          reverseNegativeShade: false,\n          useFillColorAsStroke: false,\n          borderRadius: 4,\n          dataLabels: {\n            format: \"scale\",\n            // scale | truncate\n            // Skip a tile's label when it would render below this size.\n            //\n            // With `format: 'scale'` the font size follows the tile's area, so\n            // on a dense treemap most tiles ask for text a few pixels tall,\n            // which nobody can read. Drawing it is not free: each label has to\n            // be built and measured against the DOM, and on a 10k-tile chart\n            // that was the entire render cost (~7.5s, versus ~0.1s once the\n            // unreadable ones are skipped).\n            //\n            // The default sits below the smallest label any bundled sample\n            // draws, so it only ever removes text that was already illegible.\n            // Set 0 to draw a label on every tile regardless of size.\n            minFontSize: 4\n          },\n          colorScale: {\n            inverse: false,\n            ranges: [],\n            min: void 0,\n            max: void 0,\n            // Colour a tile by a SECOND metric, independent of the value that\n            // sizes it (area = how big, colour = how it did). Reads\n            // `datum.colorValue` unless this names another key or supplies an\n            // accessor `(datum, {seriesIndex, dataPointIndex, w}) => number`.\n            colorValue: void 0,\n            // Continuous interpolation between colour stops. Active as soon as\n            // any datum carries a colour metric; `enabled: false` opts out and\n            // `true` forces it on. `ranges` is unaffected and still applies\n            // wherever it is set.\n            gradient: {\n              enabled: void 0,\n              // Domain. Defaults to the extent of the colour metric.\n              min: void 0,\n              max: void 0,\n              // The value the middle colour is pinned to. Defaults to 0 when\n              // the domain straddles zero (a diverging metric), else none.\n              midpoint: void 0,\n              // With a midpoint, balance the domain around it so equal moves\n              // in either direction read as equally saturated.\n              symmetric: true,\n              // Low -> mid -> high. Two colours make a sequential ramp.\n              colors: void 0,\n              // Explicit `[{ value, color }]` stops; overrides colors/midpoint.\n              stops: void 0\n            },\n            // Continuous colour legend: a gradient strip with end labels and a\n            // hover indicator, in place of the categorical legend. Same options\n            // as the heatmap's.\n            gradientLegend: {\n              enabled: false,\n              width: \"70%\",\n              height: \"70%\",\n              thickness: 12,\n              align: \"center\",\n              stops: 16,\n              showLabels: true,\n              showHoverValue: true,\n              labelStyle: {\n                fontSize: \"11px\",\n                fontFamily: void 0,\n                colors: void 0\n              },\n              arrow: {\n                size: 8,\n                color: void 0\n              },\n              formatter: void 0\n            }\n          },\n          // Arbitrary-depth treemap: a datum may carry `children`.\n          nested: {\n            // Parent containers appear on their own as soon as the data is\n            // nested; `false` forces the flat two-level layout.\n            enabled: void 0,\n            // Read `drilldown: '<id>'` ids as extra levels instead of as a\n            // click target for the drilldown feature. Off by default, because\n            // on a treemap that id has always meant \"descend on click\".\n            drilldownAsLevels: false\n          },\n          // How a parent is drawn once the data is nested. Per-level overrides\n          // go in `levels` below.\n          parents: {\n            // 'auto' (default): on when the data carries `children`.\n            show: \"auto\",\n            // Inset between a parent's edge and the children inside it.\n            padding: 4,\n            fill: void 0,\n            fillOpacity: 1,\n            borderColor: void 0,\n            borderWidth: 1,\n            borderRadius: void 0,\n            hover: {\n              show: true,\n              color: void 0,\n              width: 2\n            },\n            header: {\n              show: true,\n              height: 22,\n              // Skip the strip on tiles too narrow to show a name.\n              minWidth: 40,\n              align: \"left\",\n              offsetX: 0,\n              offsetY: 0,\n              showValue: false,\n              // (name, { value, depth, seriesIndex, node, w }) => string\n              formatter: void 0,\n              style: {\n                fontSize: \"12px\",\n                fontFamily: void 0,\n                fontWeight: 600,\n                color: void 0,\n                background: void 0,\n                cssClass: \"\"\n              }\n            },\n            tooltip: {\n              // ({ name, value, depth, leafCount, percentOfParent,\n              //    percentOfTotal, node, w }) => html\n              formatter: void 0\n            }\n          },\n          // Per-depth overrides of `parents`, indexed from the outermost group\n          // actually drawn (0 = the series, or the first authored level when a\n          // single series is unwrapped).\n          levels: [],\n          // Click a group to fill the canvas with it; a breadcrumb goes back.\n          // Ignored when the drilldown feature is active on the same chart:\n          // both navigate the hierarchy, and drilldown owns the click there.\n          zoom: {\n            enabled: false,\n            // Overrides `drilldown.breadcrumb` for this chart only. Same shape\n            // (show / position / separator / rootLabel / offsetX / offsetY /\n            // formatter), so a zoomed treemap and a drilled-in chart present\n            // the same affordance without importing the drilldown feature.\n            breadcrumb: void 0\n          },\n          seriesTitle: {\n            show: true,\n            offsetY: 1,\n            offsetX: 1,\n            borderColor: \"#000\",\n            borderWidth: 1,\n            borderRadius: 2,\n            style: {\n              background: \"rgba(0, 0, 0, 0.6)\",\n              color: \"#fff\",\n              fontSize: \"12px\",\n              fontFamily: void 0,\n              fontWeight: 400,\n              cssClass: \"\",\n              padding: {\n                left: 6,\n                right: 6,\n                top: 2,\n                bottom: 2\n              }\n            }\n          }\n        },\n        unit: {\n          // 'grouped' (each category is its own cluster, laid out in a row) |\n          // 'packed' (one blob; categories coloured + sorted, minority centred) |\n          // 'columns' (each category is a vertical bar built from stacked dots) |\n          // 'grid' (one lattice of cells filled in category order - a waffle /\n          // part-to-whole square \"pie\"; `chart.type:'waffle'` presets this) |\n          // 'scatter' (units on real value axes: a beeswarm, or a 2D\n          // value-value scatter - see the `scatter` block below) |\n          // 'arc' (a semicircular fan) |\n          // 'custom' (positions come from `positions` below).\n          layout: \"grouped\",\n          // `layout: 'custom'` only. The layout provider: either a function\n          // `(objects, rect) => [{id, x, y, r?}]` returning plot pixels, or the\n          // name of one registered with `ApexCharts.registerUnitLayout`.\n          //\n          // This is the whole extension point. A layout is objects in,\n          // positions out; it knows nothing about animation, because the engine\n          // already tweens position, radius and colour and already keeps each\n          // mark's identity across a relayout. So an arrangement this file\n          // cannot know about - a country silhouette, a hex grid, a timeline, a\n          // projection handed over by ApexMaps - is a plugin, not a core edit.\n          //\n          // `objects` carries one entry per mark: {id, index, seriesIndex,\n          // dataPointIndex, label, value, datum, r}. `id` is the datum's own\n          // id/name when the per-unit object form supplies one, so a provider\n          // can address a specific unit rather than a positional slot.\n          //\n          // A mark whose id the provider omits animates out; ids matching no\n          // mark are ignored.\n          positions: void 0,\n          // Update transition, controlling which previous dot each new dot\n          // tweens from. 'group' (default): keyed per category, so dots stay in\n          // their group and category-level enters/exits fade. 'flow': keyed by\n          // global order, so the anonymous crowd migrates across a regroup (the\n          // circles-to-bars effect). 'identity': keyed by each datum's id/name,\n          // so a SPECIFIC unit migrates across any regroup/relayout keeping its\n          // colour and size (needs the object form with unique ids/names).\n          transition: \"group\",\n          // 'circle' | 'square' | 'image' (isotype pictogram).\n          shape: \"circle\",\n          // Icon used when shape:'image'. Each unit renders this icon at the\n          // given size. Set `tint:true` to recolour a monochrome icon to the\n          // category colour (or a per-unit fillColor) so the pictogram matches\n          // the legend; leave it off for multi-colour icons that should keep\n          // their own colours.\n          image: {\n            src: void 0,\n            width: 20,\n            height: 20,\n            tint: false\n          },\n          // dot radius in px, or 'auto' to size dots so the largest cluster\n          // fits its allotted box.\n          size: \"auto\",\n          // The 'columns' layout can size its dots independently of `size`\n          // (which the circle layouts / storyboard beats often pin to a\n          // constant so dots do not resize while migrating). 'inherit' uses\n          // `size`; 'auto' sizes the dots to fill the plot height; a number\n          // pins a columns-only size. Circle / square only (image icons keep\n          // their intrinsic size).\n          columns: {\n            size: \"inherit\"\n          },\n          // The 'grid' (waffle) layout: one lattice of cells filled in category\n          // order. `columns` = cells per row. `total` (optional) fixes the cell\n          // budget - e.g. 100 for a percentage waffle - and largest-remainder\n          // allocates the cells to categories; leave it undefined for one cell\n          // per unit (respects unitValue / maxUnits). `fillFrom` picks the first\n          // row: 'bottom' (default) or 'top'.\n          //\n          // `split:true` switches to SMALL MULTIPLES: one mini-waffle per\n          // category, arranged in a near-square trellis (or `tileColumns` per\n          // row). Each tile then has `total` cells (default 100) and fills a\n          // fraction equal to the category's value over `max` (default = the\n          // largest count, so the leader fills its tile; set `max:100` with\n          // percentage data for true \"of 100\" tiles). The unfilled cells show as\n          // a faint `trackColor` backdrop, and each tile gets its own label.\n          grid: {\n            columns: 10,\n            total: void 0,\n            fillFrom: \"bottom\",\n            // small-multiple (one waffle per category) mode + its knobs:\n            split: false,\n            // tiles per row; undefined = auto (near-square).\n            tileColumns: void 0,\n            // value -> filled-cell denominator; undefined = the largest count.\n            max: void 0,\n            // colour of the empty \"track\" cells; undefined = a neutral grey.\n            trackColor: void 0\n          },\n          // The 'scatter' layout places each unit on real value axes (needs the\n          // object-form data). Two modes via `y`:\n          //  - `y:'lanes'` (default): a BEESWARM. X is the per-unit value axis,\n          //    Y is a category lane. `spread:'swarm'` packs dots off the centre\n          //    line so equal values do not overlap; 'jitter' scatters randomly.\n          //  - `y:'value'`: a 2D value-value scatter. X = each datum's `x`, Y =\n          //    each datum's `y`, on two numeric axes; category = colour.\n          // `sizeRange:[min,max]` turns dots into BUBBLES scaled (by area) from\n          // each datum's `sizeField` (default 'z') - a bubble scatter / bubble\n          // beeswarm. `tickAmount`/`xMin`/`xMax`/`xTitle`/`xFormatter` control the\n          // X axis; the `y*` twins the Y axis (2D only); `laneLabelWidth` the\n          // lane-label gutter (lanes mode); `gridlines` the grid.\n          scatter: {\n            y: \"lanes\",\n            spread: \"swarm\",\n            // Beeswarm orientation (1D lanes mode only): 'horizontal' lays the\n            // value on the X axis with category lanes stacked on Y (default);\n            // 'vertical' lays the value on the Y axis with category lanes as\n            // columns across X. Ignored for the 2D value-value scatter (y:'value').\n            orientation: \"horizontal\",\n            tickAmount: 5,\n            xMin: void 0,\n            xMax: void 0,\n            xTitle: void 0,\n            // (value) => string\n            xFormatter: void 0,\n            yTickAmount: 5,\n            yMin: void 0,\n            yMax: void 0,\n            yTitle: void 0,\n            // (value) => string\n            yFormatter: void 0,\n            // bubble sizing: datum key for the size value + [minR, maxR] in px.\n            sizeField: \"z\",\n            sizeRange: void 0,\n            laneLabelWidth: void 0,\n            gridlines: true\n          },\n          // Opt-in bubble sizing: scale each dot's radius by its per-unit value\n          // (needs the object-form data). Circle shape only; the lattice is\n          // spaced for the largest bubble so dots never overlap.\n          sizeByValue: {\n            enabled: false,\n            // radius (px) for the largest value, or 'auto' to fit the largest\n            // bubble to the plot like uniform auto-sizing.\n            maxRadius: \"auto\",\n            // radius (px) for the smallest value; defaults to ~35% of maxRadius.\n            minRadius: void 0,\n            // 'area' (bubble AREA proportional to value) | 'linear'.\n            scale: \"area\"\n          },\n          // packing gap factor between spiral shells (1 = dots touch).\n          spacing: 1.05,\n          // corner radius for shape:'square'.\n          borderRadius: 0,\n          // How marks move between layouts on an update, and where entering\n          // marks come from.\n          //\n          // `motion`: 'spring' settles each mark on a damped spring, so a\n          // gather interrupted by the next update carries the marks' velocity\n          // into it instead of restarting them from a standstill - which is\n          // what a dragged slider or a scrubbed storyboard does on almost every\n          // frame. 'tween' runs the fixed-duration ease below instead. 'auto'\n          // (the default) is spring, unless `easing` was set to something other\n          // than the default, so an explicit curve keeps working without having\n          // to set `motion` as well.\n          //\n          // `spring`: 'crisp' (default) | 'gentle' (softer, for large reflows)\n          // | 'snappy' (faster, a hint of settle). Scaled by\n          // `chart.animations.speed`, which stretches the spring in time\n          // without making it bouncier.\n          //\n          // `easing` (tween only): 'outCubic' (default: decelerate to a stop) |\n          // 'inOutCubic' (accelerate gently out of rest, weighted travel) |\n          // 'outBack' (overshoot each mark past its slot and spring back - a\n          // per-mark settle), with `overshoot` tuning the spring strength.\n          //\n          // `enter`: where a fresh / appearing mark animates FROM - 'burst'\n          // (default: fly out from the cluster centre) | 'fade' (materialise in\n          // place) | 'rise' (fade in while drifting gently up into the slot).\n          //\n          // Colour, radius and opacity always stay on the out-cubic, under\n          // either motion (a back ease overshoots past 1, which would push RGB\n          // channels / radii out of range; and the spring's rest thresholds are\n          // absolute, so they are far too coarse for a 0..1 quantity).\n          gather: {\n            motion: \"auto\",\n            spring: \"crisp\",\n            easing: \"outCubic\",\n            overshoot: 1.70158,\n            enter: \"burst\"\n          },\n          // The 'arc' layout arranges marks as a PARLIAMENT / hemicycle: seats in\n          // concentric arced rows across an annulus, filled in category order so\n          // each category is a contiguous wedge (the classic seating chart). Angles\n          // use the radialBar convention (0 = top, clockwise); the default sweep is\n          // a top semicircle (a full circle = startAngle 0, endAngle 360).\n          // `innerRadiusRatio` is the donut hole (inner radius / outer); `rows`\n          // fixes the number of seat rows, or 'auto' to size the dots as large as\n          // fit. Like 'packed' the legend carries the category names (no per-wedge\n          // labels).\n          arc: {\n            startAngle: -90,\n            endAngle: 90,\n            innerRadiusRatio: 0.4,\n            rows: \"auto\"\n          },\n          // 1 dot represents this many units of value (waffle scaling).\n          unitValue: 1,\n          // safety cap on total dots; counts scale down proportionally above it.\n          maxUnits: 5e3,\n          // packed layout: order categories smallest-first so the minority\n          // group nests in the centre of the blob.\n          sortByGroup: true,\n          clusterLabels: {\n            show: true,\n            // Label placement relative to the cluster/bar: 'top' (default) or\n            // 'bottom'. A 'bottom' label is always straight; the curved arc\n            // (below) rides the top crown only.\n            position: \"top\",\n            curved: true,\n            fontSize: \"13px\",\n            fontFamily: void 0,\n            fontWeight: 600,\n            // defaults to the cluster's own colour when undefined.\n            color: void 0,\n            offsetY: 0,\n            // (name, { seriesIndex, value, percent, w }) => string.\n            // Return \"\\n\"-separated text to split an outer label over lines.\n            formatter: void 0,\n            // Outer (name) labels, as pie/donut draw them: the label sits in the\n            // margin beside the shape and a leader line joins it to the colour\n            // band it names, so the crowd needs no legend to be read.\n            //\n            // `layout: 'custom'` only, and best on a silhouette whose categories\n            // stack vertically (the default row ordering): those alternate down\n            // the left and right gutters. A column-ordered shape sends each\n            // label to the side its own band sits on.\n            //\n            // The margin is taken off BOTH sides so the shape stays centred,\n            // which means turning this on makes the silhouette a little smaller.\n            external: {\n              show: false,\n              connector: {\n                show: true,\n                width: 1.5,\n                // defaults to the band's own colour when undefined.\n                color: void 0,\n                // air between the band's outermost dot and the line's bend.\n                gap: 8,\n                // length of the run out to the label.\n                length: 22\n              },\n              offsetX: 0,\n              offsetY: 0\n            }\n          },\n          tooltip: {\n            // Per-unit tooltip body. Each dot carries its category (seriesIndex)\n            // and its index within that category (dataPointIndex), so the\n            // formatter can look up per-unit data and return a string/HTML.\n            // ({ seriesName, seriesIndex, dataPointIndex, count, unitValue,\n            //    color, w }) => string\n            // Default: \"#<dataPointIndex+1> of <count>\".\n            formatter: void 0\n          }\n        },\n        radialBar: {\n          inverseOrder: false,\n          startAngle: 0,\n          endAngle: 360,\n          offsetX: 0,\n          offsetY: 0,\n          // Gauge sub-shape. 'arc' (default) renders the existing filled\n          // value-arc gauge; 'needle' replaces the value-arc with a rotating\n          // pointer/needle. Bands and ticks are independent and work for both\n          // shapes.\n          shape: \"arc\",\n          // Value-to-angle mapping. Defaults to the existing 0..100 range\n          // used by radialBar. Override for gauges that need a custom domain\n          // (e.g. min: 0, max: 240 for a speedometer).\n          min: 0,\n          max: 100,\n          // Threshold bands rendered as colored arc segments along the gauge\n          // arc (e.g. [{from:0,to:30,color:'#FF4560'}, ...]). Bands draw\n          // behind the value-arc and tick marks. Set to [] (default) to\n          // disable.\n          bands: [],\n          bandsStyle: {\n            // % of arc radius. Slightly less than the value-arc stroke so\n            // the value-arc reads on top by default.\n            strokeWidth: \"40%\",\n            // px gap between consecutive bands.\n            gap: 0,\n            // Hide the track when bands cover the full range; the bands\n            // themselves act as the visual backdrop.\n            hideTrackWhenPresent: true\n          },\n          // Tick marks rendered along (outside) the gauge arc.\n          ticks: {\n            show: false,\n            major: {\n              count: 11,\n              length: 10,\n              width: 2,\n              color: \"#666\",\n              // 'inside' draws ticks from `radius - length` to `radius`;\n              // 'outside' draws from `radius` to `radius + length`.\n              placement: \"outside\"\n            },\n            minor: {\n              count: 4,\n              // minor ticks BETWEEN each pair of major ticks\n              length: 5,\n              width: 1,\n              color: \"#999\",\n              placement: \"outside\"\n            },\n            labels: {\n              show: false,\n              offset: 6,\n              fontSize: \"11px\",\n              fontFamily: void 0,\n              fontWeight: 400,\n              color: \"#666\",\n              /** @param {number} v */\n              formatter(v2) {\n                return String(v2);\n              }\n            }\n          },\n          // Needle/dial configuration. Only applies when `shape: 'needle'`.\n          needle: {\n            color: \"#333\",\n            // Needle length as a % of the gauge radius (string like '85%')\n            // or as an absolute px number.\n            length: \"85%\",\n            // px width of the needle line at the base.\n            baseWidth: 4,\n            // px width of the needle tip (tapered if smaller than baseWidth).\n            tipWidth: 1,\n            // px offset from the geometric arc center on Y. Positive values\n            // push the needle base down (toward the chord midpoint of a\n            // ∩-shape gauge); negative pushes up. The needle rotates around\n            // this shifted point.\n            offsetY: 0,\n            // When true, also render the filled value-arc alongside the\n            // needle. Default false preserves the previous needle-only\n            // behavior. Useful for gauges that want a progress ring plus a\n            // pointer indicator.\n            showValueArc: false,\n            animation: {\n              enabled: true,\n              duration: 800,\n              easing: \"ease-out\"\n            }\n          },\n          hollow: {\n            margin: 5,\n            size: \"50%\",\n            background: \"transparent\",\n            image: void 0,\n            imageWidth: 150,\n            imageHeight: 150,\n            imageOffsetX: 0,\n            imageOffsetY: 0,\n            imageClipped: true,\n            position: \"front\",\n            // Optional stroke around the hollow ring. Combined with\n            // `strokeDasharray` this produces a dashed indicator circle\n            // around the value text — useful for gauge designs where the\n            // value sits inside its own boundary.\n            stroke: void 0,\n            strokeWidth: 1,\n            strokeDasharray: void 0,\n            dropShadow: {\n              enabled: false,\n              top: 0,\n              left: 0,\n              blur: 3,\n              color: \"#000\",\n              opacity: 0.5\n            }\n          },\n          track: {\n            show: true,\n            startAngle: void 0,\n            endAngle: void 0,\n            background: \"#f2f2f2\",\n            strokeWidth: \"97%\",\n            opacity: 1,\n            margin: 5,\n            // margin is in pixels\n            dropShadow: {\n              enabled: false,\n              top: 0,\n              left: 0,\n              blur: 3,\n              color: \"#000\",\n              opacity: 0.5\n            }\n          },\n          dataLabels: {\n            show: true,\n            name: {\n              show: true,\n              fontSize: \"16px\",\n              fontFamily: void 0,\n              fontWeight: 600,\n              color: void 0,\n              offsetY: 0,\n              /**\n               * @param {any} val\n               */\n              formatter(val) {\n                return val;\n              }\n            },\n            value: {\n              show: true,\n              fontSize: \"14px\",\n              fontFamily: void 0,\n              fontWeight: 400,\n              color: void 0,\n              offsetY: 16,\n              /**\n               * @param {any} val\n               */\n              formatter(val) {\n                return val + \"%\";\n              }\n            },\n            total: {\n              show: false,\n              label: \"Total\",\n              fontSize: \"16px\",\n              fontWeight: 600,\n              fontFamily: void 0,\n              color: void 0,\n              /**\n               * @param {import('../../types/internal').ChartStateW} w\n               */\n              formatter(w2) {\n                return (\n                  /**\n                   * @param {number} a\n                   * @param {number} b\n                   */\n                  w2.globals.seriesTotals.reduce((a2, b2) => a2 + b2, 0) / w2.seriesData.series.length + \"%\"\n                );\n              }\n            }\n          },\n          barLabels: {\n            enabled: false,\n            offsetX: 0,\n            offsetY: 0,\n            useSeriesColors: true,\n            fontFamily: void 0,\n            fontWeight: 600,\n            fontSize: \"16px\",\n            /**\n             * @param {any} val\n             */\n            formatter(val) {\n              return val;\n            },\n            onClick: void 0\n          }\n        },\n        pie: {\n          customScale: 1,\n          offsetX: 0,\n          offsetY: 0,\n          startAngle: 0,\n          endAngle: 360,\n          expandOnClick: true,\n          // How far a clicked slice slides out of the pie (px), measured along\n          // its own mid-angle. The slice is translated, not redrawn at a bigger\n          // radius, so its shape and the quantity it encodes are unchanged and\n          // a gap opens between it and the rest of the pie. The inner\n          // percentage label (and the outer name label, when enabled) ride\n          // along with it. Ignored for polarArea, where the radius is the\n          // value, and in a drilldown pie/donut, where a click navigates (the\n          // slice would slide out only to be discarded by the drill, and\n          // states.active takes the click feedback back over). Set 0 to keep\n          // the slice in place.\n          expandOffset: 10,\n          // Hover outline: a translucent band traced just outside the rim of\n          // the hovered slice, so the slice keeps its own colour instead of\n          // being lightened. Takes the place of the states.hover filter for\n          // pie / donut / polarArea, and is skipped entirely when\n          // states.hover.filter.type is 'none' (that stays the way to turn all\n          // hover feedback off). Applies to pie, donut and polarArea.\n          hoverOutline: {\n            show: true,\n            size: 8,\n            // band thickness (px)\n            // Extra clearance between the slice rim and the band (px), ON TOP\n            // of the slice stroke: the band always starts at the outer edge of\n            // the stroke, never under it. Default 0, because a stroke is\n            // normally present (stroke.width defaults to 2) and already reads\n            // as the separation. Any gap beyond that and the band stops\n            // belonging to its slice and starts reading as a ring of its own.\n            gap: 0,\n            opacity: 0.3,\n            // band opacity, over the slice colour\n            color: void 0\n            // defaults to the hovered slice's colour\n          },\n          // Rounds the corners of each slice (in px). Applies to pie, donut and\n          // polarArea (all rendered by the Pie module). 0 = sharp corners\n          // (default, unchanged behavior). The value is clamped per slice so\n          // opposing corner fillets never cross on thin/narrow slices.\n          borderRadius: 0,\n          // Gap between adjacent slices (in px). Applies to pie, donut and\n          // polarArea. 0 = slices touch (default). Each slice is inset\n          // symmetrically, so its mid-angle (data label + hit region) is kept.\n          spacing: 0,\n          dataLabels: {\n            // These are the percentage values which are displayed on slice\n            offset: 0,\n            // offset by which labels will move outside\n            minAngleToShowLabel: 10,\n            // External (outer) labels: render the category/series name outside\n            // the slice, joined to it by a leader (connector) line, so users\n            // don't have to map legend colors back to slices. The percentage\n            // keeps rendering inside the slice (governed by dataLabels.enabled).\n            // Pie + donut only; ignored for polarArea (radial length already\n            // encodes the value there).\n            external: {\n              show: false,\n              // master switch for the external (outer) labels\n              offsetX: 0,\n              offsetY: 0,\n              fontSize: void 0,\n              // falls back to dataLabels.style.fontSize\n              fontFamily: void 0,\n              // falls back to dataLabels.style.fontFamily\n              fontWeight: void 0,\n              // falls back to dataLabels.style.fontWeight\n              color: void 0,\n              // defaults to chart.foreColor (readable text)\n              /**\n               * Return a string (single line) or an array of strings (stacked\n               * lines, e.g. [name, percent + '%']).\n               * @param {string} name\n               * @param {{ seriesIndex: number, percent: number, value: number, w: any }} opts\n               * @returns {string | string[]}\n               */\n              formatter: void 0,\n              connector: {\n                show: true,\n                width: 1,\n                color: void 0,\n                // defaults to the slice color\n                length: 16,\n                // horizontal run after the radial elbow (px)\n                gap: 6\n                // radial gap from slice edge to the elbow point (px)\n              }\n            }\n          },\n          donut: {\n            size: \"65%\",\n            background: \"transparent\",\n            labels: {\n              // These are the inner labels appearing inside donut\n              show: false,\n              name: {\n                show: true,\n                fontSize: \"16px\",\n                fontFamily: void 0,\n                fontWeight: 600,\n                color: void 0,\n                offsetY: -10,\n                /**\n                 * @param {any} val\n                 */\n                formatter(val) {\n                  return val;\n                }\n              },\n              value: {\n                show: true,\n                fontSize: \"20px\",\n                fontFamily: void 0,\n                fontWeight: 400,\n                color: void 0,\n                offsetY: 10,\n                /**\n                 * @param {any} val\n                 */\n                formatter(val) {\n                  return val;\n                }\n              },\n              total: {\n                show: false,\n                showAlways: false,\n                label: \"Total\",\n                fontSize: \"16px\",\n                fontWeight: 400,\n                fontFamily: void 0,\n                color: void 0,\n                /**\n                 * @param {import('../../types/internal').ChartStateW} w\n                 */\n                formatter(w2) {\n                  return w2.globals.seriesTotals.reduce((a2, b2) => a2 + b2, 0);\n                }\n              }\n            }\n          }\n        },\n        polarArea: {\n          rings: {\n            strokeWidth: 1,\n            strokeColor: \"#e8e8e8\"\n          },\n          spokes: {\n            strokeWidth: 1,\n            connectorColors: \"#e8e8e8\"\n          }\n        },\n        sunburst: {\n          // Sunburst / nested pie-donut (hierarchical radial). Rings go from the\n          // centre hole outward, one per hierarchy level; each child arc is\n          // nested inside its parent's angular wedge.\n          offsetX: 0,\n          offsetY: 0,\n          startAngle: 0,\n          endAngle: 360,\n          // Centre hole radius, as a % of the max radius (like donut size).\n          innerSize: \"15%\",\n          // Corner rounding + inter-arc gap (px), same semantics as the pie\n          // family (see plotOptions.pie.borderRadius / .spacing).\n          borderRadius: 0,\n          spacing: 1,\n          // How a branch that bottoms out before the deepest level is drawn:\n          // 'extend' stretches the leaf arc out to the rim (default, matches\n          // d3); 'stop' leaves the outer rings empty behind it.\n          leaf: \"extend\",\n          // Angular partition of a parent's wedge among its children:\n          // 'normalize' splits by each child's share of its siblings (safe for\n          // any data); 'strict' expects children to sum to the parent's value.\n          partition: \"normalize\",\n          // Each depth level is tinted this much lighter than its parent colour\n          // (0 = keep parent colour, 1 = white). A per-node `color` overrides.\n          tint: 0.14,\n          // Click a wedge to zoom into that branch (its subtree fills the\n          // chart; a breadcrumb walks back). Click the focused inner ring to\n          // zoom out. Set false to disable.\n          zoomOnClick: true,\n          dataLabels: {\n            show: true,\n            // Hide the label on any arc narrower than this (degrees), so tiny\n            // wedges do not overflow with text.\n            minAngleToShow: 8,\n            style: {\n              fontSize: \"12px\",\n              fontFamily: void 0,\n              fontWeight: 400,\n              colors: void 0\n            }\n          }\n        },\n        radar: {\n          size: void 0,\n          offsetX: 0,\n          offsetY: 0,\n          polygons: {\n            // strokeColor: '#e8e8e8', // should be deprecated in the minor version i.e 3.2\n            strokeWidth: 1,\n            strokeColors: \"#e8e8e8\",\n            connectorColors: \"#e8e8e8\",\n            fill: {\n              colors: void 0\n            }\n          }\n        }\n      },\n      colors: void 0,\n      dataLabels: {\n        enabled: true,\n        enabledOnSeries: void 0,\n        /**\n         * @param {any} val\n         */\n        formatter(val) {\n          return val !== null ? val : \"\";\n        },\n        textAnchor: \"middle\",\n        distributed: false,\n        offsetX: 0,\n        offsetY: 0,\n        style: {\n          fontSize: \"12px\",\n          fontFamily: void 0,\n          fontWeight: 600,\n          colors: void 0\n        },\n        background: {\n          enabled: true,\n          foreColor: \"#fff\",\n          backgroundColor: void 0,\n          borderRadius: 2,\n          padding: 4,\n          opacity: 0.9,\n          borderWidth: 1,\n          borderColor: \"#fff\",\n          dropShadow: {\n            enabled: false,\n            top: 1,\n            left: 1,\n            blur: 1,\n            color: \"#000\",\n            opacity: 0.8\n          }\n        },\n        dropShadow: {\n          enabled: false,\n          top: 1,\n          left: 1,\n          blur: 1,\n          color: \"#000\",\n          opacity: 0.8\n        },\n        // Ride data labels to their new position on a data-change update\n        // (e.g. a bar chart race), instead of snapping. Off by default so\n        // existing charts are unchanged. Speed/easing follow\n        // chart.animations.dynamicAnimation. Bar/column only.\n        animate: {\n          enabled: false\n        },\n        // Count the numeric value up/down from its previous value on update,\n        // like countUp.js. Off by default. The dataLabels.formatter runs each\n        // frame, so number formatting (decimals, separators, prefixes) is\n        // preserved. Bar/column only.\n        countUp: {\n          enabled: false\n        }\n      },\n      fill: {\n        type: \"solid\",\n        colors: void 0,\n        // array of colors\n        opacity: 0.85,\n        gradient: {\n          shade: \"dark\",\n          type: \"horizontal\",\n          shadeIntensity: 0.5,\n          gradientToColors: void 0,\n          inverseColors: true,\n          opacityFrom: 1,\n          opacityTo: 1,\n          stops: [0, 50, 100],\n          colorStops: []\n        },\n        image: {\n          src: [],\n          width: void 0,\n          // optional\n          height: void 0\n          // optional\n        },\n        pattern: {\n          style: \"squares\",\n          // String | Array of Strings\n          width: 6,\n          height: 6,\n          strokeWidth: 2\n        }\n      },\n      forecastDataPoints: {\n        count: 0,\n        fillOpacity: 0.5,\n        strokeWidth: void 0,\n        dashArray: 4\n      },\n      grid: {\n        show: true,\n        borderColor: \"#e0e0e0\",\n        strokeDashArray: 0,\n        position: \"back\",\n        xaxis: {\n          lines: {\n            show: false\n          }\n        },\n        yaxis: {\n          lines: {\n            show: true\n          }\n        },\n        row: {\n          colors: void 0,\n          // takes as array which will be repeated on rows\n          opacity: 0.5\n        },\n        column: {\n          colors: void 0,\n          // takes an array which will be repeated on columns\n          opacity: 0.5\n        },\n        padding: {\n          top: 0,\n          right: 10,\n          bottom: 0,\n          left: 12\n        }\n      },\n      labels: [],\n      drilldown: {\n        // Opt-in. When false, the Drilldown feature module stays inert even if\n        // it was imported. Requires `import 'apexcharts/features/drilldown'`.\n        enabled: false,\n        // Child levels referenced by a data point's `drilldown: '<id>'` field.\n        // Each: { id, name?, data, chart?, xaxis?, yaxis?, colors?, plotOptions? }\n        series: [],\n        breadcrumb: {\n          show: true,\n          position: \"top-left\",\n          // 'top-left' | 'top-right'\n          separator: \" / \",\n          rootLabel: \"All\",\n          offsetX: 0,\n          offsetY: 0\n          // formatter: (label, { index, depth }) => label,\n        },\n        // Animation is delegated to the chart's update pipeline; `enabled`\n        // gates whether the drill transition animates at all.\n        animation: {\n          enabled: true,\n          // Anchor the drill transition at the clicked point: the child unfolds\n          // outward from it (and settles back on drill-up) instead of the chart\n          // simply re-rendering. A gentle scale layered on the SVG; opt-in.\n          zoomFromPoint: false,\n          // Base duration (ms) of the transition, used only when zoomFromPoint\n          // is true. The fade-out phase runs a little shorter than this.\n          speed: 260\n        },\n        // Optional async resolver, called when a drillable point has no inline\n        // match in `series`. Receives ({ id, point, seriesIndex, dataPointIndex })\n        // and returns a level (or a promise of one). A throw, a rejection, or a\n        // resolved value without a `data` array leaves the chart exactly where\n        // it was and fires `drillDownError` - a failed fetch is ordinary, not\n        // a reason to strand the view.\n        // onDrillDown: undefined,\n        // Overlay shown while an async level resolves. `text` is optional: with\n        // none, the spinner shows alone (and carries 'Loading' as its\n        // accessible name), which keeps the default free of any language.\n        loading: {\n          show: true\n          // text: 'Loading…',\n        },\n        // Cache levels resolved by `onDrillDown`, keyed by id, so drilling back\n        // down a branch does not re-fetch it. Call `chart.drillDown` module's\n        // clearCache() when the data behind an already-drilled chart changes.\n        cache: true,\n        // The dot that marks a drillable point on a line/area chart drawn\n        // without markers. A bar, slice, tile or cell is already a visible,\n        // clickable mark; a line point is not, so without this the chart would\n        // give no sign that anything can be opened. Only drillable points get\n        // one, which is what makes them read as openable. Set `show: false` to\n        // supply your own affordance (turning `markers.size` on, for instance).\n        // Omitted colours inherit the series marker defaults.\n        marker: {\n          show: true,\n          size: 6,\n          // shape: undefined,      // 'circle' | 'square' | 'rect'\n          // fillColor: undefined,  // defaults to the series colour\n          strokeColor: \"#fff\"\n        }\n      },\n      legend: {\n        show: true,\n        showForSingleSeries: false,\n        showForNullSeries: true,\n        showForZeroSeries: true,\n        floating: false,\n        position: \"bottom\",\n        // whether to position legends in 1 of 4\n        // direction - top, bottom, left, right\n        horizontalAlign: \"center\",\n        // when position top/bottom, you can specify whether to align legends left, right or center\n        inverseOrder: false,\n        fontSize: \"12px\",\n        fontFamily: void 0,\n        fontWeight: 400,\n        width: void 0,\n        height: void 0,\n        formatter: void 0,\n        tooltipHoverFormatter: void 0,\n        offsetX: -20,\n        offsetY: 4,\n        customLegendItems: [],\n        clusterGroupedSeries: true,\n        clusterGroupedSeriesOrientation: \"vertical\",\n        labels: {\n          colors: void 0,\n          useSeriesColors: false\n        },\n        markers: {\n          size: 7,\n          fillColors: void 0,\n          strokeWidth: 1,\n          shape: void 0,\n          offsetX: 0,\n          offsetY: 0,\n          customHTML: void 0,\n          onClick: void 0\n        },\n        itemMargin: {\n          horizontal: 5,\n          vertical: 4\n        },\n        onItemClick: {\n          toggleDataSeries: true\n        },\n        onItemHover: {\n          highlightDataSeries: true\n        }\n      },\n      markers: {\n        discrete: [],\n        size: 0,\n        colors: void 0,\n        strokeColors: \"#fff\",\n        strokeWidth: 2,\n        strokeOpacity: 0.9,\n        strokeDashArray: 0,\n        fillOpacity: 1,\n        shape: \"circle\",\n        offsetX: 0,\n        offsetY: 0,\n        showNullDataPoints: true,\n        onClick: void 0,\n        onDblClick: void 0,\n        hover: {\n          size: void 0,\n          sizeOffset: 3\n        }\n      },\n      noData: {\n        text: void 0,\n        align: \"center\",\n        offsetX: 0,\n        offsetY: 0,\n        style: {\n          color: void 0,\n          fontSize: \"14px\",\n          fontFamily: void 0\n        }\n      },\n      responsive: [],\n      // breakpoints should follow ascending order 400, then 700, then 1000\n      series: void 0,\n      states: {\n        hover: {\n          filter: {\n            type: \"lighten\",\n            value: 0.15\n          }\n        },\n        active: {\n          allowMultipleDataPointsSelection: false,\n          filter: {\n            type: \"darken\",\n            value: 0.35\n          }\n        }\n      },\n      title: {\n        text: void 0,\n        align: \"left\",\n        margin: 5,\n        offsetX: 0,\n        offsetY: 0,\n        floating: false,\n        style: {\n          fontSize: \"14px\",\n          fontWeight: 900,\n          fontFamily: void 0,\n          color: void 0\n        }\n      },\n      subtitle: {\n        text: void 0,\n        align: \"left\",\n        margin: 5,\n        offsetX: 0,\n        offsetY: 30,\n        floating: false,\n        style: {\n          fontSize: \"12px\",\n          fontWeight: 400,\n          fontFamily: void 0,\n          color: void 0\n        }\n      },\n      stroke: {\n        show: true,\n        curve: \"smooth\",\n        // \"smooth\" / \"straight\" / \"monotoneCubic\" / \"stepline\" / \"linestep\"\n        lineCap: \"butt\",\n        // round, butt , square\n        width: 2,\n        colors: void 0,\n        // array of colors\n        dashArray: 0,\n        // single value or array of values\n        fill: {\n          type: \"solid\",\n          colors: void 0,\n          // array of colors\n          opacity: 0.85,\n          gradient: {\n            shade: \"dark\",\n            type: \"horizontal\",\n            shadeIntensity: 0.5,\n            gradientToColors: void 0,\n            inverseColors: true,\n            opacityFrom: 1,\n            opacityTo: 1,\n            stops: [0, 50, 100],\n            colorStops: []\n          }\n        }\n      },\n      tooltip: {\n        enabled: true,\n        enabledOnSeries: void 0,\n        shared: true,\n        hideEmptySeries: false,\n        followCursor: false,\n        // when disabled, the tooltip will show on top of the series instead of mouse position\n        intersect: false,\n        // when enabled, tooltip will only show when user directly hovers over point\n        inverseOrder: false,\n        arrow: true,\n        custom: void 0,\n        fillSeriesColor: false,\n        theme: \"light\",\n        cssClass: \"\",\n        style: {\n          fontSize: \"12px\",\n          fontFamily: void 0,\n          background: void 0\n        },\n        onDatasetHover: {\n          highlightDataSeries: false\n        },\n        x: {\n          // x value\n          show: true,\n          format: \"dd MMM\",\n          // dd/MM, dd MMM yy, dd MMM yyyy\n          formatter: void 0\n          // a custom user supplied formatter function\n        },\n        y: {\n          formatter: void 0,\n          title: {\n            /**\n             * @param {string} seriesName\n             */\n            formatter(seriesName) {\n              return seriesName ? seriesName + \": \" : \"\";\n            }\n          }\n        },\n        z: {\n          formatter: void 0,\n          title: \"Size: \"\n        },\n        marker: {\n          show: true,\n          fillColors: void 0\n        },\n        items: {\n          display: \"flex\"\n        },\n        fixed: {\n          enabled: false,\n          position: \"topRight\",\n          // topRight, topLeft, bottomRight, bottomLeft\n          offsetX: 0,\n          offsetY: 0\n        }\n      },\n      xaxis: {\n        type: \"category\",\n        categories: [],\n        convertedCatToNumeric: false,\n        // internal property which should not be altered outside\n        offsetX: 0,\n        offsetY: 0,\n        overwriteCategories: void 0,\n        labels: {\n          show: true,\n          rotate: -45,\n          rotateAlways: false,\n          hideOverlappingLabels: true,\n          trim: false,\n          minHeight: void 0,\n          maxHeight: 120,\n          showDuplicates: true,\n          style: {\n            colors: [],\n            fontSize: \"12px\",\n            fontWeight: 400,\n            fontFamily: void 0,\n            cssClass: \"\"\n          },\n          offsetX: 0,\n          offsetY: 0,\n          format: void 0,\n          formatter: void 0,\n          // custom formatter function which will override format\n          datetimeUTC: true,\n          datetimeFormatter: {\n            // Base format per interval unit. TimeScale.formatDates folds in\n            // coarser context automatically when the data range spans it\n            // (e.g. month-scale across years → 'MMM yyyy', hour-scale across\n            // days → 'dd MMM HH:mm'). Customizing a base format that already\n            // includes the higher-unit token disables the auto-expansion for\n            // that level.\n            year: \"yyyy\",\n            month: \"MMM\",\n            day: \"dd MMM\",\n            hour: \"HH:mm\",\n            minute: \"HH:mm\",\n            second: \"HH:mm:ss\"\n          }\n        },\n        group: {\n          groups: [],\n          style: {\n            colors: [],\n            fontSize: \"12px\",\n            fontWeight: 400,\n            fontFamily: void 0,\n            cssClass: \"\"\n          }\n        },\n        axisBorder: {\n          show: true,\n          color: \"#e0e0e0\",\n          width: \"100%\",\n          height: 1,\n          offsetX: 0,\n          offsetY: 0\n        },\n        axisTicks: {\n          show: true,\n          color: \"#e0e0e0\",\n          height: 6,\n          offsetX: 0,\n          offsetY: 0\n        },\n        stepSize: void 0,\n        tickAmount: void 0,\n        tickPlacement: \"on\",\n        min: void 0,\n        max: void 0,\n        range: void 0,\n        floating: false,\n        decimalsInFloat: void 0,\n        position: \"bottom\",\n        title: {\n          text: void 0,\n          offsetX: 0,\n          offsetY: 0,\n          style: {\n            color: void 0,\n            fontSize: \"12px\",\n            fontWeight: 900,\n            fontFamily: void 0,\n            cssClass: \"\"\n          }\n        },\n        crosshairs: {\n          show: true,\n          width: 1,\n          // tickWidth/barWidth or an integer\n          position: \"back\",\n          opacity: 0.9,\n          stroke: {\n            color: \"#b6b6b6\",\n            width: 1,\n            dashArray: 3\n          },\n          fill: {\n            type: \"solid\",\n            // solid, gradient\n            color: \"#B1B9C4\",\n            gradient: {\n              colorFrom: \"#D8E3F0\",\n              colorTo: \"#BED1E6\",\n              stops: [0, 100],\n              opacityFrom: 0.4,\n              opacityTo: 0.5\n            }\n          },\n          dropShadow: {\n            enabled: false,\n            left: 0,\n            top: 0,\n            blur: 1,\n            opacity: 0.8\n          }\n        },\n        tooltip: {\n          enabled: false,\n          offsetY: 0,\n          formatter: void 0,\n          style: {\n            fontSize: \"12px\",\n            fontFamily: void 0\n          }\n        }\n      },\n      yaxis: this.yAxis,\n      theme: {\n        mode: \"\",\n        palette: \"palette1\",\n        // If defined, it will overwrite globals.colors variable\n        // Facet (#13): read `--apx-*` CSS design tokens from the cascade\n        // (accent/fore/grid/surface + series-1..N). true (default) reads any\n        // present (absence is a no-op); false disables. Tokens top the\n        // resolution chain below explicit config. Tokens are re-read on every\n        // render; call chart.refreshTokens() to pick up a runtime CSS change\n        // that does not itself trigger a render.\n        tokens: true,\n        // Facet (#13): 'os' follows prefers-color-scheme + prefers-contrast\n        // reactively (SSR-safe, cleaned up on destroy). false disables.\n        follow: false,\n        // 'os' | false\n        // Facet (#13): a theme registered via ApexCharts.registerTheme(name, def)\n        name: \"\",\n        // '' | registered theme name\n        monochrome: {\n          // monochrome allows you to select just 1 color and fill out the rest with light/dark shade (intensity can be selected)\n          enabled: false,\n          color: \"#008FFB\",\n          shadeTo: \"light\",\n          shadeIntensity: 0.65\n        },\n        accessibility: {\n          colorBlindMode: \"\"\n          // '' | 'deuteranopia' | 'protanopia' | 'tritanopia' | 'highContrast'\n        }\n      }\n    };\n  }\n}\nconst TYPE_OWNED = \"_apexOwnedByType\";\nconst ownedBy = (types, fn) => {\n  const marked = (\n    /** @type {any} */\n    fn\n  );\n  marked[TYPE_OWNED] = types;\n  return fn;\n};\nconst TYPE_OWNED_PATHS = [\n  // What the tooltip reads and how it resolves a hover. `custom` is the sharp\n  // one: each built-in reads globals only its own type fills.\n  \"tooltip.custom\",\n  \"tooltip.shared\",\n  \"tooltip.intersect\",\n  \"tooltip.followCursor\",\n  // Whether values are written on the marks, and how they are phrased. A pie's\n  // percentage formatter handed a treemap a category name.\n  \"dataLabels.enabled\",\n  \"dataLabels.formatter\",\n  \"plotOptions.bar.dataLabels.position\",\n  // A box plot's outlier markers are hit targets; a violin draws none.\n  \"markers.size\",\n  // Hover and select feedback, off by design on the types that draw their own.\n  \"states.hover.filter.type\",\n  \"states.active.filter.type\",\n  // Axis chrome that exists to be pointed at.\n  \"xaxis.crosshairs.width\",\n  \"xaxis.tickPlacement\",\n  \"xaxis.tooltip.enabled\",\n  // Interaction the type either supports or does not: a violin's categories\n  // cannot be range-zoomed, and an index-keyed summary animates as churn.\n  \"chart.zoom.enabled\",\n  \"chart.animations.dynamicAnimation.enabled\"\n];\nconst readPath = (obj, path) => {\n  let cur = (\n    /** @type {any} */\n    obj\n  );\n  for (const key of path.split(\".\")) {\n    if (cur == null || typeof cur !== \"object\") return void 0;\n    cur = cur[key];\n  }\n  return cur;\n};\nconst writePath = (obj, path, value) => {\n  const keys = path.split(\".\");\n  const last = keys.pop();\n  let cur = (\n    /** @type {any} */\n    obj\n  );\n  for (const key of keys) {\n    if (cur[key] == null || typeof cur[key] !== \"object\") cur[key] = {};\n    cur = cur[key];\n  }\n  if (value === void 0) delete cur[\n    /** @type {string} */\n    last\n  ];\n  else cur[\n    /** @type {string} */\n    last\n  ] = value;\n};\nconst TYPE_ALIASES = {\n  funnel: \"bar\",\n  pyramid: \"bar\",\n  gauge: \"radialBar\",\n  waffle: \"unit\",\n  histogram: \"bar\"\n};\nconst typeOpts = (type, config) => {\n  var _a, _b;\n  const base = (\n    /** @type {Record<string, string>} */\n    TYPE_ALIASES[type]\n  );\n  return {\n    chart: {\n      type: base || type,\n      requestedType: base ? type : void 0,\n      // Stacking belongs to the chart, not to its type, so both sides see it.\n      stacked: (_a = config.chart) == null ? void 0 : _a.stacked\n    },\n    plotOptions: {\n      bar: { isFunnel: type === \"funnel\" || type === \"pyramid\" },\n      histogram: (_b = config.plotOptions) == null ? void 0 : _b.histogram\n    },\n    // The histogram's defaults read the series to decide whether overlaid bins\n    // share a tooltip. Both sides are asked with the series the chart has now.\n    series: config.series,\n    yaxis: [{ title: {}, labels: {}, axisBorder: {}, axisTicks: {} }]\n  };\n};\nconst isUntouched = (current, fromDefault) => {\n  if (typeof current === \"function\") {\n    if (Array.isArray(\n      /** @type {any} */\n      current[TYPE_OWNED]\n    )) return true;\n    return typeof fromDefault === \"function\" && String(current) === String(fromDefault);\n  }\n  if (typeof fromDefault === \"function\") return current === void 0;\n  if (current === fromDefault) return true;\n  try {\n    return JSON.stringify(current) === JSON.stringify(fromDefault);\n  } catch (e2) {\n    return false;\n  }\n};\nconst getRangeValues = ({\n  isTimeline,\n  seriesIndex,\n  dataPointIndex,\n  y1,\n  y2,\n  w: w2\n}) => {\n  var _a;\n  let start = w2.rangeData.seriesRangeStart[seriesIndex][dataPointIndex];\n  let end = w2.rangeData.seriesRangeEnd[seriesIndex][dataPointIndex];\n  let ylabel = w2.labelData.labels[dataPointIndex];\n  let seriesName = w2.config.series[seriesIndex].name ? w2.config.series[seriesIndex].name : \"\";\n  const yLbFormatter = w2.formatters.ttKeyFormatter;\n  const yLbTitleFormatter = w2.config.tooltip.y.title.formatter;\n  const opts = {\n    w: w2,\n    seriesIndex,\n    dataPointIndex,\n    start,\n    end\n  };\n  if (typeof yLbTitleFormatter === \"function\") {\n    seriesName = yLbTitleFormatter(seriesName, opts);\n  }\n  if ((_a = w2.config.series[seriesIndex].data[dataPointIndex]) == null ? void 0 : _a.x) {\n    ylabel = w2.config.series[seriesIndex].data[dataPointIndex].x;\n  }\n  if (!isTimeline) {\n    if (w2.config.xaxis.type === \"datetime\") {\n      const xFormat = new Formatters(w2);\n      ylabel = xFormat.xLabelFormat(\n        w2.formatters.ttKeyFormatter,\n        ylabel,\n        ylabel,\n        {\n          i: void 0,\n          dateFormatter: new DateTime(w2).formatDate,\n          w: w2\n        }\n      );\n    }\n  }\n  if (typeof yLbFormatter === \"function\") {\n    ylabel = yLbFormatter(ylabel, opts);\n  }\n  if (Number.isFinite(y1) && Number.isFinite(y2)) {\n    start = y1;\n    end = y2;\n  }\n  let startVal = \"\";\n  let endVal = \"\";\n  const color = w2.globals.colors[seriesIndex];\n  if (w2.config.tooltip.x.formatter === void 0) {\n    if (w2.config.xaxis.type === \"datetime\") {\n      const datetimeObj = new DateTime(w2);\n      startVal = datetimeObj.formatDate(\n        datetimeObj.getDate(start),\n        w2.config.tooltip.x.format\n      );\n      endVal = datetimeObj.formatDate(\n        datetimeObj.getDate(end),\n        w2.config.tooltip.x.format\n      );\n    } else {\n      startVal = start;\n      endVal = end;\n    }\n  } else {\n    startVal = w2.config.tooltip.x.formatter(start);\n    endVal = w2.config.tooltip.x.formatter(end);\n  }\n  return { start, end, startVal, endVal, ylabel, color, seriesName };\n};\nconst buildRangeTooltipHTML = (opts) => {\n  let { color, seriesName, ylabel, start, end, seriesIndex, dataPointIndex } = opts;\n  const formatter = opts.w.globals.tooltip.tooltipLabels.getFormatters(seriesIndex);\n  start = formatter.yLbFormatter(start);\n  end = formatter.yLbFormatter(end);\n  const val = formatter.yLbFormatter(\n    opts.w.seriesData.series[seriesIndex][dataPointIndex]\n  );\n  let valueHTML = \"\";\n  const rangeValues = `<span class=\"value start-value\">\n  ${start}\n  </span> <span class=\"separator\">-</span> <span class=\"value end-value\">\n  ${end}\n  </span>`;\n  if (opts.w.globals.comboCharts) {\n    if (opts.w.config.series[seriesIndex].type === \"rangeArea\" || opts.w.config.series[seriesIndex].type === \"rangeBar\") {\n      valueHTML = rangeValues;\n    } else {\n      valueHTML = `<span>${val}</span>`;\n    }\n  } else {\n    valueHTML = rangeValues;\n  }\n  return '<div class=\"apexcharts-tooltip-rangebar\"><div> <span class=\"series-name\" style=\"color: ' + color + '\">' + (seriesName ? seriesName : \"\") + '</span></div><div> <span class=\"category\">' + ylabel + \": </span> \" + valueHTML + \" </div></div>\";\n};\nclass Defaults {\n  /**\n   * @param {Record<string, any>} opts\n   */\n  constructor(opts) {\n    this.opts = opts;\n  }\n  /**\n   * The defaults a chart type chooses for itself, which is the same pick\n   * Config.init makes on the initial render. Shared with the update path so\n   * that \"what does type X want\" has one answer and cannot drift between the\n   * two. Modes layered on top of a type (brush, slope, sparkline) are not\n   * included: they belong to the chart, not to its type, and a type change does\n   * not disturb them.\n   *\n   * @param {Record<string, any>} opts a config, read for the type and for the\n   *   flags that pick a variant of it\n   * @returns {Record<string, any>}\n   */\n  static forType(opts) {\n    var _a, _b;\n    const defaults = new Defaults(opts);\n    const chartTypes = [\n      \"line\",\n      \"area\",\n      \"bar\",\n      \"candlestick\",\n      \"boxPlot\",\n      \"violin\",\n      \"rangeBar\",\n      \"rangeArea\",\n      \"bubble\",\n      \"scatter\",\n      \"heatmap\",\n      \"treemap\",\n      \"unit\",\n      \"sunburst\",\n      \"pie\",\n      \"polarArea\",\n      \"donut\",\n      \"radar\",\n      \"radialBar\"\n    ];\n    const requestedType = opts.chart.requestedType;\n    let chartDefaults;\n    if (requestedType === \"funnel\" || requestedType === \"pyramid\") {\n      chartDefaults = /** @type {any} */\n      defaults[requestedType]();\n    } else if (requestedType === \"gauge\") {\n      chartDefaults = defaults.gauge();\n    } else if (requestedType === \"histogram\") {\n      chartDefaults = defaults.histogram();\n    } else if (chartTypes.indexOf(opts.chart.type) !== -1) {\n      chartDefaults = /** @type {any} */\n      defaults[opts.chart.type]();\n    } else {\n      chartDefaults = defaults.line();\n    }\n    if ((_b = (_a = opts.plotOptions) == null ? void 0 : _a.bar) == null ? void 0 : _b.isFunnel) {\n      chartDefaults = defaults.funnel();\n    }\n    if (opts.chart.stacked && opts.chart.type === \"bar\") {\n      chartDefaults = defaults.stackedBars();\n    }\n    return chartDefaults;\n  }\n  /**\n   * Re-choose the type-owned leaves (see TYPE_OWNED_PATHS) after\n   * `updateOptions({ chart: { type } })` moved the chart from one type to\n   * another, so the chart behaves as the type it now is.\n   *\n   * A leaf is only handed over when it still holds exactly what `fromType`\n   * chose for it. That single test covers every way a value can be the user's\n   * instead of ours: set at construction, set by an earlier update, or set by\n   * this very update. `options` is consulted too, so an explicit ask in the\n   * same call wins even when it happens to equal the outgoing default.\n   *\n   * @param {Record<string, any>} config the merged w.config, mutated in place\n   * @param {string} fromType the type (or requested alias) before this update\n   * @param {Record<string, any>} [options] this update's payload\n   */\n  static handOverTypeDefaults(config, fromType, options2) {\n    const toType = config.chart.requestedType || config.chart.type;\n    if (!fromType || fromType === toType) return;\n    const base = new Options().init();\n    const from = Utils$1.extend(\n      base,\n      Defaults.forType(typeOpts(fromType, config))\n    );\n    const to = Utils$1.extend(base, Defaults.forType(typeOpts(toType, config)));\n    for (const path of TYPE_OWNED_PATHS) {\n      if (options2 && readPath(options2, path) !== void 0) continue;\n      const fromDefault = readPath(from, path);\n      const toDefault = readPath(to, path);\n      if (fromDefault === void 0 && toDefault === void 0) continue;\n      if (!isUntouched(readPath(config, path), fromDefault)) continue;\n      writePath(config, path, toDefault);\n    }\n  }\n  hideYAxis() {\n    this.opts.yaxis[0].show = false;\n    this.opts.yaxis[0].title.text = \"\";\n    this.opts.yaxis[0].axisBorder.show = false;\n    this.opts.yaxis[0].axisTicks.show = false;\n    this.opts.yaxis[0].floating = true;\n  }\n  line() {\n    return {\n      dataLabels: {\n        enabled: false\n      },\n      stroke: {\n        width: 5,\n        curve: \"straight\"\n      },\n      markers: {\n        size: 0,\n        hover: {\n          sizeOffset: 6\n        }\n      },\n      xaxis: {\n        crosshairs: {\n          width: 1\n        }\n      }\n    };\n  }\n  /**\n   * @param {Record<string, any>} defaults\n   */\n  sparkline(defaults) {\n    this.hideYAxis();\n    const ret = {\n      grid: {\n        show: false,\n        padding: {\n          left: 0,\n          right: 0,\n          top: 0,\n          bottom: 0\n        }\n      },\n      legend: {\n        show: false\n      },\n      xaxis: {\n        labels: {\n          show: false\n        },\n        tooltip: {\n          enabled: false\n        },\n        axisBorder: {\n          show: false\n        },\n        axisTicks: {\n          show: false\n        }\n      },\n      chart: {\n        toolbar: {\n          show: false\n        },\n        zoom: {\n          enabled: false\n        }\n      },\n      dataLabels: {\n        enabled: false\n      }\n    };\n    return Utils$1.extend(defaults, ret);\n  }\n  slope() {\n    this.hideYAxis();\n    return {\n      chart: {\n        toolbar: {\n          show: false\n        },\n        zoom: {\n          enabled: false\n        }\n      },\n      dataLabels: {\n        enabled: true,\n        /**\n         * @param {any} val\n         * @param {Record<string, any>} opts\n         */\n        formatter(val, opts) {\n          const seriesName = opts.w.config.series[opts.seriesIndex].name;\n          return val !== null ? seriesName + \": \" + val : \"\";\n        },\n        background: {\n          enabled: false\n        },\n        offsetX: -5\n      },\n      grid: {\n        xaxis: {\n          lines: {\n            show: true\n          }\n        },\n        yaxis: {\n          lines: {\n            show: false\n          }\n        }\n      },\n      xaxis: {\n        position: \"top\",\n        labels: {\n          style: {\n            fontSize: 14,\n            fontWeight: 900\n          }\n        },\n        tooltip: {\n          enabled: false\n        },\n        crosshairs: {\n          show: false\n        }\n      },\n      markers: {\n        size: 8,\n        hover: {\n          sizeOffset: 1\n        }\n      },\n      legend: {\n        show: false\n      },\n      tooltip: {\n        shared: false,\n        intersect: true,\n        followCursor: true\n      },\n      stroke: {\n        width: 5,\n        curve: \"straight\"\n      }\n    };\n  }\n  bar() {\n    return {\n      chart: {\n        stacked: false\n      },\n      plotOptions: {\n        bar: {\n          dataLabels: {\n            position: \"center\"\n          }\n        }\n      },\n      dataLabels: {\n        style: {\n          colors: [\"#fff\"]\n        },\n        background: {\n          enabled: false\n        }\n      },\n      stroke: {\n        width: 0,\n        lineCap: \"square\"\n      },\n      fill: {\n        opacity: 0.85\n      },\n      legend: {\n        markers: {\n          shape: \"square\"\n        }\n      },\n      tooltip: {\n        shared: false,\n        intersect: true\n      },\n      xaxis: {\n        tooltip: {\n          enabled: false\n        },\n        tickPlacement: \"between\",\n        crosshairs: {\n          width: \"barWidth\",\n          position: \"back\",\n          fill: {\n            type: \"gradient\"\n          },\n          dropShadow: {\n            enabled: false\n          },\n          stroke: {\n            width: 0\n          }\n        }\n      }\n    };\n  }\n  funnel() {\n    this.hideYAxis();\n    return __spreadProps(__spreadValues({}, this.bar()), {\n      chart: {\n        animations: {\n          speed: 800,\n          animateGradually: {\n            enabled: false\n          }\n        }\n      },\n      plotOptions: {\n        bar: {\n          horizontal: true,\n          borderRadiusApplication: \"around\",\n          borderRadius: 0,\n          dataLabels: {\n            position: \"center\"\n          }\n        }\n      },\n      grid: {\n        show: false,\n        padding: {\n          left: 0,\n          right: 0\n        }\n      },\n      xaxis: {\n        labels: {\n          show: false\n        },\n        tooltip: {\n          enabled: false\n        },\n        axisBorder: {\n          show: false\n        },\n        axisTicks: {\n          show: false\n        }\n      }\n    });\n  }\n  pyramid() {\n    return this.funnel();\n  }\n  gauge() {\n    const base = this.radialBar();\n    return __spreadProps(__spreadValues({}, base), {\n      plotOptions: {\n        radialBar: {\n          startAngle: -135,\n          endAngle: 135,\n          hollow: {\n            margin: 0,\n            size: \"60%\"\n          },\n          track: {\n            background: \"#e7e7e7\",\n            strokeWidth: \"100%\",\n            margin: 5\n          },\n          dataLabels: {\n            name: {\n              show: false\n            },\n            value: {\n              show: true,\n              fontSize: \"32px\",\n              fontWeight: 600,\n              offsetY: 8\n            }\n          }\n        }\n      }\n    });\n  }\n  histogram() {\n    var _a, _b, _c, _d;\n    const overlaid = Array.isArray((_a = this.opts) == null ? void 0 : _a.series) && this.opts.series.length > 1 && ((_d = (_c = (_b = this.opts) == null ? void 0 : _b.plotOptions) == null ? void 0 : _c.histogram) == null ? void 0 : _d.overlap) !== false;\n    return __spreadProps(__spreadValues({}, this.bar()), {\n      chart: {\n        stacked: false,\n        // The bins are the summary: they are chosen once from the whole sample\n        // and do NOT re-derive from the visible window, so zooming only\n        // magnifies bars while hiding the rest of the distribution the shape is\n        // read against. Off by default, mirroring heatmap and violin; users can\n        // opt back in with chart.zoom.enabled: true.\n        zoom: {\n          enabled: false\n        },\n        animations: {\n          // The bars of a histogram are one shape, not N independent\n          // categories, so revealing them one by one reads as a sequence that\n          // is not in the data. The distribution rises as a whole instead.\n          animateGradually: {\n            enabled: false\n          }\n        }\n      },\n      plotOptions: {\n        bar: {\n          // Bins are adjacent by definition, so the columns touch: a gap\n          // between them would read as a gap in the data. Rounded corners are\n          // dropped for the same reason (they shave area off each bar, and a\n          // histogram's whole claim is that area is proportional to count).\n          columnWidth: \"100%\",\n          borderRadius: 0,\n          dataLabels: {\n            position: \"top\"\n          }\n        }\n      },\n      dataLabels: {\n        enabled: false\n      },\n      fill: overlaid ? { opacity: 0.65 } : {},\n      // A hairline separator keeps the bin boundaries readable once the columns\n      // touch, the same treatment heatmap cells get.\n      stroke: overlaid ? { show: false } : {\n        show: true,\n        width: 1,\n        colors: [\"#fff\"]\n      },\n      xaxis: {\n        type: \"numeric\",\n        // The axis carries bin midpoints; the range is what people read, and\n        // the tooltip already states it.\n        tooltip: {\n          enabled: false\n        }\n      },\n      tooltip: {\n        // Overlaid bars share a bin, so hovering one has to report both\n        // distributions: the comparison is the whole point of stacking them on\n        // one axis.\n        shared: overlaid,\n        intersect: false,\n        x: {\n          formatter: (val, opts) => {\n            var _a2, _b2;\n            const edges = (_b2 = (_a2 = opts == null ? void 0 : opts.w) == null ? void 0 : _a2.histogramData) == null ? void 0 : _b2.edges;\n            const k = opts == null ? void 0 : opts.dataPointIndex;\n            if (!Array.isArray(edges) || typeof k !== \"number\" || k < 0) {\n              return String(val);\n            }\n            const lo = edges[k];\n            const hi = edges[k + 1];\n            if (lo === void 0 || hi === void 0) return String(val);\n            const fmt = (v2) => Number.isInteger(v2) ? String(v2) : v2.toFixed(2);\n            return `${fmt(lo)} to ${fmt(hi)}`;\n          }\n        }\n      }\n    });\n  }\n  candlestick() {\n    return {\n      stroke: {\n        width: 1\n      },\n      fill: {\n        opacity: 1\n      },\n      dataLabels: {\n        enabled: false\n      },\n      tooltip: {\n        shared: true,\n        custom: ownedBy(\n          [\"candlestick\"],\n          ({ seriesIndex, dataPointIndex, w: w2 }) => {\n            return this._getBoxTooltip(\n              w2,\n              seriesIndex,\n              dataPointIndex,\n              [\"Open\", \"High\", \"\", \"Low\", \"Close\"],\n              \"candlestick\"\n            );\n          }\n        )\n      },\n      states: {\n        active: {\n          filter: {\n            type: \"none\"\n          }\n        }\n      },\n      xaxis: {\n        crosshairs: {\n          width: 1\n        }\n      }\n    };\n  }\n  boxPlot() {\n    return {\n      chart: {\n        animations: {\n          dynamicAnimation: {\n            enabled: false\n          }\n        }\n      },\n      stroke: {\n        width: 1,\n        colors: [\"#24292e\"]\n      },\n      dataLabels: {\n        enabled: false\n      },\n      tooltip: {\n        shared: true,\n        custom: ownedBy(\n          [\"boxPlot\"],\n          ({ seriesIndex, dataPointIndex, w: w2 }) => {\n            return this._getBoxTooltip(\n              w2,\n              seriesIndex,\n              dataPointIndex,\n              [\"Minimum\", \"Q1\", \"Median\", \"Q3\", \"Maximum\"],\n              \"boxPlot\"\n            );\n          }\n        )\n      },\n      markers: {\n        size: 7,\n        strokeWidth: 1,\n        strokeColors: \"#111\"\n      },\n      xaxis: {\n        crosshairs: {\n          width: 1\n        }\n      }\n    };\n  }\n  violin() {\n    return {\n      chart: {\n        // Violins are a per-category distribution plot (discrete category\n        // x-axis), so range zooming/panning is meaningless — off by default.\n        zoom: {\n          enabled: false\n        },\n        animations: {\n          dynamicAnimation: {\n            enabled: false\n          }\n        }\n      },\n      stroke: {\n        width: 1,\n        colors: [\"#24292e\"]\n      },\n      fill: {\n        opacity: 0.7\n      },\n      dataLabels: {\n        enabled: false\n      },\n      tooltip: {\n        shared: true,\n        custom: ownedBy(\n          [\"violin\"],\n          ({ seriesIndex, dataPointIndex, w: w2 }) => {\n            return this._getViolinTooltip(w2, seriesIndex, dataPointIndex);\n          }\n        )\n      },\n      states: {\n        active: {\n          filter: {\n            type: \"none\"\n          }\n        }\n      },\n      xaxis: {\n        crosshairs: {\n          width: 1\n        }\n      }\n    };\n  }\n  rangeBar() {\n    const handleTimelineTooltip = (opts) => {\n      const { color, seriesName, ylabel, startVal, endVal } = getRangeValues(__spreadProps(__spreadValues({}, opts), {\n        isTimeline: true\n      }));\n      return buildRangeTooltipHTML(__spreadProps(__spreadValues({}, opts), {\n        color,\n        seriesName,\n        ylabel,\n        start: startVal,\n        end: endVal\n      }));\n    };\n    const handleRangeColumnTooltip = (opts) => {\n      const { color, seriesName, ylabel, start, end } = getRangeValues(opts);\n      return buildRangeTooltipHTML(__spreadProps(__spreadValues({}, opts), {\n        color,\n        seriesName,\n        ylabel,\n        start,\n        end\n      }));\n    };\n    return {\n      chart: {\n        animations: {\n          animateGradually: false\n        }\n      },\n      stroke: {\n        width: 0,\n        lineCap: \"square\"\n      },\n      plotOptions: {\n        bar: {\n          borderRadius: 0,\n          dataLabels: {\n            position: \"center\"\n          }\n        }\n      },\n      dataLabels: {\n        enabled: false,\n        /**\n         * @param {any} val\n         */\n        formatter(val, { seriesIndex, dataPointIndex, w: w2 }) {\n          const getVal = () => {\n            const start = w2.rangeData.seriesRangeStart[seriesIndex][dataPointIndex];\n            const end = w2.rangeData.seriesRangeEnd[seriesIndex][dataPointIndex];\n            return end - start;\n          };\n          if (w2.globals.comboCharts) {\n            if (w2.config.series[seriesIndex].type === \"rangeBar\" || w2.config.series[seriesIndex].type === \"rangeArea\") {\n              return getVal();\n            } else {\n              return val;\n            }\n          } else {\n            return getVal();\n          }\n        },\n        background: {\n          enabled: false\n        },\n        style: {\n          colors: [\"#fff\"]\n        }\n      },\n      markers: {\n        size: 10\n      },\n      tooltip: {\n        shared: false,\n        followCursor: true,\n        custom: ownedBy(\n          [\"rangeBar\"],\n          /** @param {Record<string, any>} opts */\n          (opts) => {\n            if (opts.w.config.plotOptions && opts.w.config.plotOptions.bar && opts.w.config.plotOptions.bar.horizontal) {\n              return handleTimelineTooltip(opts);\n            } else {\n              return handleRangeColumnTooltip(opts);\n            }\n          }\n        )\n      },\n      xaxis: {\n        tickPlacement: \"between\",\n        tooltip: {\n          enabled: false\n        },\n        crosshairs: {\n          stroke: {\n            width: 0\n          }\n        }\n      }\n    };\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  dumbbell(opts) {\n    var _a, _b;\n    if (!((_a = opts.plotOptions.bar) == null ? void 0 : _a.barHeight)) {\n      opts.plotOptions.bar.barHeight = 2;\n    }\n    if (!((_b = opts.plotOptions.bar) == null ? void 0 : _b.columnWidth)) {\n      opts.plotOptions.bar.columnWidth = 2;\n    }\n    return opts;\n  }\n  area() {\n    return {\n      stroke: {\n        width: 4,\n        fill: {\n          type: \"solid\",\n          gradient: {\n            inverseColors: false,\n            shade: \"light\",\n            type: \"vertical\",\n            opacityFrom: 0.65,\n            opacityTo: 0.5,\n            stops: [0, 100, 100]\n          }\n        }\n      },\n      fill: {\n        type: \"gradient\",\n        gradient: {\n          inverseColors: false,\n          shade: \"light\",\n          type: \"vertical\",\n          opacityFrom: 0.65,\n          opacityTo: 0.5,\n          stops: [0, 100, 100]\n        }\n      },\n      markers: {\n        size: 0,\n        hover: {\n          sizeOffset: 6\n        }\n      },\n      tooltip: {\n        followCursor: false\n      }\n    };\n  }\n  rangeArea() {\n    const handleRangeAreaTooltip = (opts) => {\n      const { color, seriesName, ylabel, start, end } = getRangeValues(opts);\n      return buildRangeTooltipHTML(__spreadProps(__spreadValues({}, opts), {\n        color,\n        seriesName,\n        ylabel,\n        start,\n        end\n      }));\n    };\n    return {\n      stroke: {\n        curve: \"straight\",\n        width: 0\n      },\n      fill: {\n        type: \"solid\",\n        opacity: 0.6\n      },\n      markers: {\n        size: 0\n      },\n      states: {\n        hover: {\n          filter: {\n            type: \"none\"\n          }\n        },\n        active: {\n          filter: {\n            type: \"none\"\n          }\n        }\n      },\n      tooltip: {\n        intersect: false,\n        shared: true,\n        followCursor: true,\n        custom: ownedBy(\n          [\"rangeArea\"],\n          /** @param {Record<string, any>} opts */\n          (opts) => handleRangeAreaTooltip(opts)\n        )\n      }\n    };\n  }\n  /**\n   * @param {Record<string, any>} defaults\n   */\n  brush(defaults) {\n    const ret = {\n      chart: {\n        toolbar: {\n          autoSelected: \"selection\",\n          show: false\n        },\n        zoom: {\n          enabled: false\n        }\n      },\n      dataLabels: {\n        enabled: false\n      },\n      stroke: {\n        width: 1\n      },\n      tooltip: {\n        enabled: false\n      },\n      xaxis: {\n        tooltip: {\n          enabled: false\n        }\n      }\n    };\n    return Utils$1.extend(defaults, ret);\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  stacked100(opts) {\n    opts.dataLabels = opts.dataLabels || {};\n    opts.dataLabels.formatter = opts.dataLabels.formatter || void 0;\n    const existingDataLabelFormatter = opts.dataLabels.formatter;\n    opts.yaxis.forEach((yaxe, index) => {\n      opts.yaxis[index].min = 0;\n      opts.yaxis[index].max = 100;\n    });\n    const isBar = opts.chart.type === \"bar\";\n    if (isBar) {\n      opts.dataLabels.formatter = existingDataLabelFormatter || /**\n       * @param {any} val\n       */\n      function(val) {\n        if (typeof val === \"number\") {\n          return val ? val.toFixed(0) + \"%\" : val;\n        }\n        return val;\n      };\n    }\n    return opts;\n  }\n  stackedBars() {\n    const barDefaults = this.bar();\n    return __spreadProps(__spreadValues({}, barDefaults), {\n      plotOptions: __spreadProps(__spreadValues({}, barDefaults.plotOptions), {\n        bar: __spreadProps(__spreadValues({}, barDefaults.plotOptions.bar), {\n          borderRadiusApplication: \"end\",\n          borderRadiusWhenStacked: \"last\"\n        })\n      })\n    });\n  }\n  // This function removes the left and right spacing in chart for line/area/scatter if xaxis type = category for those charts by converting xaxis = numeric. Numeric/Datetime xaxis prevents the unnecessary spacing in the left/right of the chart area\n  /**\n   * @param {Record<string, any>} opts\n   */\n  convertCatToNumeric(opts) {\n    opts.xaxis.convertedCatToNumeric = true;\n    return opts;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   * @param {any} cats\n   */\n  convertCatToNumericXaxis(opts, cats) {\n    opts.xaxis.type = \"numeric\";\n    opts.xaxis.labels = opts.xaxis.labels || {};\n    opts.xaxis.labels.formatter = opts.xaxis.labels.formatter || /**\n     * @param {any} val\n     */\n    function(val) {\n      return Utils$1.isNumber(val) ? Math.floor(val) : val;\n    };\n    const defaultFormatter = opts.xaxis.labels.formatter;\n    let labels = opts.xaxis.categories && opts.xaxis.categories.length ? opts.xaxis.categories : opts.labels;\n    if (cats && cats.length) {\n      labels = cats.map((c2) => {\n        return Array.isArray(c2) ? c2 : String(c2);\n      });\n    }\n    if (labels && labels.length) {\n      opts.xaxis.labels.formatter = function(val) {\n        return Utils$1.isNumber(val) ? defaultFormatter(labels[Math.floor(val) - 1]) : defaultFormatter(val);\n      };\n    }\n    opts.xaxis.categories = [];\n    opts.labels = [];\n    opts.xaxis.tickAmount = opts.xaxis.tickAmount || \"dataPoints\";\n    return opts;\n  }\n  bubble() {\n    return {\n      dataLabels: {\n        style: {\n          colors: [\"#fff\"]\n        }\n      },\n      tooltip: {\n        shared: false,\n        intersect: true\n      },\n      xaxis: {\n        crosshairs: {\n          width: 0\n        }\n      },\n      fill: {\n        type: \"solid\",\n        gradient: {\n          shade: \"light\",\n          inverse: true,\n          shadeIntensity: 0.55,\n          opacityFrom: 0.4,\n          opacityTo: 0.8\n        }\n      }\n    };\n  }\n  scatter() {\n    return {\n      dataLabels: {\n        enabled: false\n      },\n      tooltip: {\n        shared: false,\n        intersect: true\n      },\n      markers: {\n        size: 6,\n        strokeWidth: 1,\n        hover: {\n          sizeOffset: 2\n        }\n      }\n    };\n  }\n  heatmap() {\n    return {\n      chart: {\n        stacked: false,\n        // A heatmap is a fixed grid: zooming/panning only distorts the cells\n        // and (on a datetime axis) collapses the month labels to repeats, so\n        // it is off by default, mirroring treemap. Users can opt back in with\n        // chart.zoom.enabled: true.\n        zoom: {\n          enabled: false\n        }\n      },\n      fill: {\n        opacity: 1\n      },\n      dataLabels: {\n        style: {\n          colors: [\"#fff\"]\n        }\n      },\n      stroke: {\n        colors: [\"#fff\"]\n      },\n      tooltip: {\n        // Anchor the tooltip above the hovered cell with a downward arrow\n        // (flipping below near the top edge), the same treatment horizontal\n        // bars get, rather than trailing the cursor. Opt back into the old\n        // behavior with tooltip.followCursor: true.\n        followCursor: false,\n        marker: {\n          show: false\n        },\n        x: {\n          show: false\n        }\n      },\n      legend: {\n        position: \"top\",\n        markers: {\n          shape: \"square\"\n        }\n      },\n      grid: {\n        padding: {\n          right: 20\n        }\n      }\n    };\n  }\n  treemap() {\n    return {\n      chart: {\n        zoom: {\n          enabled: false\n        }\n      },\n      dataLabels: {\n        style: {\n          fontSize: 14,\n          fontWeight: 600,\n          colors: [\"#fff\"]\n        }\n      },\n      stroke: {\n        show: true,\n        width: 2,\n        colors: [\"#fff\"]\n      },\n      legend: {\n        show: false\n      },\n      fill: {\n        opacity: 1,\n        gradient: {\n          stops: [0, 100]\n        }\n      },\n      tooltip: {\n        followCursor: true,\n        x: {\n          show: false\n        }\n      },\n      grid: {\n        padding: {\n          left: 0,\n          right: 0\n        }\n      },\n      xaxis: {\n        crosshairs: {\n          show: false\n        },\n        tooltip: {\n          enabled: false\n        },\n        // A treemap has no x axis to read: the tiles are the whole plot, and\n        // the ticks mark data-point positions that mean nothing here. One tick\n        // per row is invisible at a dozen rows and a solid comb under the plot\n        // at several hundred, so they are off by default. Set\n        // `xaxis.axisTicks.show: true` to bring them back.\n        axisTicks: {\n          show: false\n        }\n      }\n    };\n  }\n  unit() {\n    return {\n      chart: {\n        toolbar: {\n          show: false\n        }\n      },\n      dataLabels: {\n        enabled: false\n      },\n      stroke: {\n        show: false,\n        width: 0\n      },\n      fill: {\n        opacity: 1\n      },\n      tooltip: {\n        followCursor: true,\n        x: {\n          show: false\n        }\n      },\n      legend: {\n        show: true,\n        position: \"bottom\"\n      },\n      grid: {\n        padding: {\n          left: 0,\n          right: 0,\n          top: 0,\n          bottom: 0\n        }\n      }\n    };\n  }\n  sunburst() {\n    return {\n      chart: {\n        toolbar: {\n          show: false\n        }\n      },\n      dataLabels: {\n        style: {\n          colors: [\"#fff\"]\n        },\n        dropShadow: {\n          enabled: true\n        }\n      },\n      stroke: {\n        colors: [\"#fff\"]\n      },\n      fill: {\n        opacity: 1\n      },\n      // Unlike pie, sunburst keeps the STANDARD themed tooltip (light/dark).\n      // Slice-coloured tooltips (fillSeriesColor) wash out here because child\n      // arcs are tinted toward white per depth; users can still opt in.\n      legend: {\n        position: \"right\"\n      },\n      grid: {\n        padding: {\n          left: 0,\n          right: 0,\n          top: 0,\n          bottom: 0\n        }\n      }\n    };\n  }\n  pie() {\n    return {\n      chart: {\n        toolbar: {\n          show: false\n        }\n      },\n      plotOptions: {\n        pie: {\n          donut: {\n            labels: {\n              show: false\n            }\n          }\n        }\n      },\n      dataLabels: {\n        /**\n         * The share of the whole, as a percentage. Guarded because a config\n         * survives a chart-type change: a pie that becomes a treemap hands\n         * this same default a category NAME, and a default of ours must not\n         * throw on a value it was never designed for.\n         * @param {any} val\n         */\n        formatter(val) {\n          return typeof val === \"number\" ? val.toFixed(1) + \"%\" : val;\n        },\n        style: {\n          colors: [\"#fff\"]\n        },\n        background: {\n          enabled: false\n        },\n        dropShadow: {\n          enabled: true\n        }\n      },\n      stroke: {\n        colors: [\"#fff\"]\n      },\n      fill: {\n        opacity: 1,\n        gradient: {\n          shade: \"light\",\n          stops: [0, 100]\n        }\n      },\n      tooltip: {\n        theme: \"dark\",\n        fillSeriesColor: true\n      },\n      legend: {\n        position: \"right\"\n      },\n      grid: {\n        padding: {\n          left: 0,\n          right: 0,\n          top: 0,\n          bottom: 0\n        }\n      }\n    };\n  }\n  donut() {\n    return {\n      chart: {\n        toolbar: {\n          show: false\n        }\n      },\n      dataLabels: {\n        /**\n         * The share of the whole, as a percentage. Guarded because a config\n         * survives a chart-type change: a pie that becomes a treemap hands\n         * this same default a category NAME, and a default of ours must not\n         * throw on a value it was never designed for.\n         * @param {any} val\n         */\n        formatter(val) {\n          return typeof val === \"number\" ? val.toFixed(1) + \"%\" : val;\n        },\n        style: {\n          colors: [\"#fff\"]\n        },\n        background: {\n          enabled: false\n        },\n        dropShadow: {\n          enabled: true\n        }\n      },\n      stroke: {\n        colors: [\"#fff\"]\n      },\n      fill: {\n        opacity: 1,\n        gradient: {\n          shade: \"light\",\n          shadeIntensity: 0.35,\n          stops: [80, 100],\n          opacityFrom: 1,\n          opacityTo: 1\n        }\n      },\n      tooltip: {\n        theme: \"dark\",\n        fillSeriesColor: true\n      },\n      legend: {\n        position: \"right\"\n      },\n      grid: {\n        padding: {\n          left: 0,\n          right: 0,\n          top: 0,\n          bottom: 0\n        }\n      }\n    };\n  }\n  polarArea() {\n    return {\n      chart: {\n        toolbar: {\n          show: false\n        }\n      },\n      dataLabels: {\n        /**\n         * The share of the whole, as a percentage. Guarded because a config\n         * survives a chart-type change: a pie that becomes a treemap hands\n         * this same default a category NAME, and a default of ours must not\n         * throw on a value it was never designed for.\n         * @param {any} val\n         */\n        formatter(val) {\n          return typeof val === \"number\" ? val.toFixed(1) + \"%\" : val;\n        },\n        enabled: false\n      },\n      stroke: {\n        show: true,\n        width: 2\n      },\n      fill: {\n        opacity: 0.7\n      },\n      tooltip: {\n        theme: \"dark\",\n        fillSeriesColor: true\n      },\n      legend: {\n        position: \"right\"\n      },\n      grid: {\n        padding: {\n          left: 0,\n          right: 0,\n          top: 0,\n          bottom: 0\n        }\n      }\n    };\n  }\n  radar() {\n    this.opts.yaxis[0].labels.offsetY = this.opts.yaxis[0].labels.offsetY ? this.opts.yaxis[0].labels.offsetY : 6;\n    return {\n      dataLabels: {\n        enabled: false,\n        style: {\n          fontSize: \"11px\"\n        }\n      },\n      stroke: {\n        width: 2\n      },\n      markers: {\n        size: 5,\n        strokeWidth: 1,\n        strokeOpacity: 1\n      },\n      fill: {\n        opacity: 0.2\n      },\n      tooltip: {\n        shared: false,\n        intersect: true,\n        followCursor: true\n      },\n      grid: {\n        show: false,\n        padding: {\n          left: 0,\n          right: 0,\n          top: 0,\n          bottom: 0\n        }\n      },\n      xaxis: {\n        labels: {\n          formatter: (val) => val,\n          style: {\n            colors: [\"#a8a8a8\"],\n            fontSize: \"11px\"\n          }\n        },\n        tooltip: {\n          enabled: false\n        },\n        crosshairs: {\n          show: false\n        }\n      }\n    };\n  }\n  radialBar() {\n    return {\n      chart: {\n        animations: {\n          dynamicAnimation: {\n            enabled: true,\n            speed: 800\n          }\n        },\n        toolbar: {\n          show: false\n        }\n      },\n      stroke: {\n        // Radial value arcs are stroked open arcs; square/round caps would\n        // extend the stroke half a stroke-width past each endpoint, making\n        // the \"starting edge\" visibly stick out past the geometric arc.\n        // Butt cap is the only one that aligns with the arc's true angular\n        // span. Without this, a chart that previously was a bar (whose\n        // defaults set lineCap='square') would carry that cap across into\n        // the radial render after a type morph.\n        lineCap: \"butt\"\n      },\n      fill: {\n        gradient: {\n          shade: \"dark\",\n          shadeIntensity: 0.4,\n          inverseColors: false,\n          type: \"diagonal2\",\n          opacityFrom: 1,\n          opacityTo: 1,\n          stops: [70, 98, 100]\n        }\n      },\n      legend: {\n        show: false,\n        position: \"right\"\n      },\n      tooltip: {\n        enabled: false,\n        fillSeriesColor: true\n      },\n      grid: {\n        padding: {\n          left: 0,\n          right: 0,\n          top: 0,\n          bottom: 0\n        }\n      }\n    };\n  }\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {number} seriesIndex\n   * @param {number} dataPointIndex\n   * @param {any[]} labels\n   * @param {string} chartType\n   */\n  _getBoxTooltip(w2, seriesIndex, dataPointIndex, labels, chartType) {\n    const o2 = w2.candleData.seriesCandleO[seriesIndex][dataPointIndex];\n    const h2 = w2.candleData.seriesCandleH[seriesIndex][dataPointIndex];\n    const m2 = w2.candleData.seriesCandleM[seriesIndex][dataPointIndex];\n    const l2 = w2.candleData.seriesCandleL[seriesIndex][dataPointIndex];\n    const c2 = w2.candleData.seriesCandleC[seriesIndex][dataPointIndex];\n    const _si = (\n      /** @type {Record<string,any>} */\n      w2.config.series[seriesIndex]\n    );\n    if (_si.type && _si.type !== chartType) {\n      return `<div class=\"apexcharts-custom-tooltip\">\n          ${_si.name ? _si.name : \"series-\" + (seriesIndex + 1)}: <strong>${w2.seriesData.series[seriesIndex][dataPointIndex]}</strong>\n        </div>`;\n    } else {\n      return `<div class=\"apexcharts-tooltip-box apexcharts-tooltip-${w2.config.chart.type}\"><div>${labels[0]}: <span class=\"value\">` + o2 + `</span></div><div>${labels[1]}: <span class=\"value\">` + h2 + \"</span></div>\" + (m2 ? `<div>${labels[2]}: <span class=\"value\">` + m2 + \"</span></div>\" : \"\") + `<div>${labels[3]}: <span class=\"value\">` + l2 + `</span></div><div>${labels[4]}: <span class=\"value\">` + c2 + \"</span></div></div>\";\n    }\n  }\n  /**\n   * Shared tooltip for a violin: distribution value range and observation\n   * count. Per-point hover is intentionally unsupported (jitter renders as a\n   * single path), so the tooltip summarizes the violin as a whole.\n   *\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {number} seriesIndex\n   * @param {number} dataPointIndex\n   */\n  _getViolinTooltip(w2, seriesIndex, dataPointIndex) {\n    var _a, _b, _c;\n    const minV = (_a = w2.violinData.seriesViolinMin[seriesIndex]) == null ? void 0 : _a[dataPointIndex];\n    const maxV = (_b = w2.violinData.seriesViolinMax[seriesIndex]) == null ? void 0 : _b[dataPointIndex];\n    const pts = ((_c = w2.violinData.seriesViolinPoints[seriesIndex]) == null ? void 0 : _c[dataPointIndex]) || [];\n    const name2 = (\n      /** @type {Record<string,any>} */\n      w2.config.series[seriesIndex].name || \"series-\" + (seriesIndex + 1)\n    );\n    return `<div class=\"apexcharts-tooltip-box apexcharts-tooltip-${w2.config.chart.type}\"><div class=\"apexcharts-tooltip-violin-name\">${name2}</div><div>Min: <span class=\"value\">${minV}</span></div><div>Max: <span class=\"value\">${maxV}</span></div><div>Observations: <span class=\"value\">${pts.length}</span></div></div>`;\n  }\n}\nclass Config {\n  /**\n   * @param {Record<string, any>} opts\n   */\n  constructor(opts) {\n    this.opts = opts;\n  }\n  /** @param {{responsiveOverride: any}} opts */\n  init({ responsiveOverride }) {\n    var _a, _b, _c, _d, _e, _f, _g, _h;\n    let opts = this.opts;\n    const options2 = new Options();\n    const defaults = new Defaults(opts);\n    opts = this.normalizeAliasedChartType(opts);\n    this.chartType = opts.chart.type;\n    opts = this.extendYAxis(opts);\n    opts = this.extendAnnotations(opts);\n    let config = options2.init();\n    let newDefaults = {};\n    if (opts && typeof opts === \"object\") {\n      let chartDefaults = Defaults.forType(opts);\n      if ((_a = opts.chart.brush) == null ? void 0 : _a.enabled) {\n        chartDefaults = defaults.brush(chartDefaults);\n      }\n      if ((_c = (_b = opts.plotOptions) == null ? void 0 : _b.line) == null ? void 0 : _c.isSlopeChart) {\n        chartDefaults = defaults.slope();\n      }\n      if (opts.chart.stacked && opts.chart.stackType === \"100%\") {\n        opts = defaults.stacked100(opts);\n      }\n      if ((_e = (_d = opts.plotOptions) == null ? void 0 : _d.bar) == null ? void 0 : _e.isDumbbell) {\n        opts = defaults.dumbbell(opts);\n      }\n      this.checkForDarkTheme(Environment.getApex());\n      this.checkForDarkTheme(opts);\n      opts.xaxis = opts.xaxis || Environment.getApex().xaxis || {};\n      if (!responsiveOverride) {\n        opts.xaxis.convertedCatToNumeric = false;\n      }\n      opts = this.checkForCatToNumericXAxis(this.chartType, chartDefaults, opts);\n      if (((_f = opts.chart.sparkline) == null ? void 0 : _f.enabled) || ((_h = (_g = Environment.getApex().chart) == null ? void 0 : _g.sparkline) == null ? void 0 : _h.enabled)) {\n        chartDefaults = defaults.sparkline(chartDefaults);\n      }\n      newDefaults = Utils$1.extend(config, chartDefaults);\n    }\n    const mergedWithDefaultConfig = Utils$1.extend(\n      newDefaults,\n      Environment.getApex()\n    );\n    config = Utils$1.extend(mergedWithDefaultConfig, opts);\n    config = this.handleUserInputErrors(config);\n    return config;\n  }\n  /**\n   * Promoted chart-type aliases — `funnel`, `pyramid`, `gauge` — render via\n   * the existing `bar` (with `isFunnel`) and `radialBar` pathways. To keep\n   * the ~20 internal `chart.type === 'bar' | 'radialBar'` checks working\n   * unchanged, we normalize `chart.type` to the base renderer name here and\n   * preserve the user-facing name on `chart.requestedType` for the public\n   * API and for default selection.\n   *\n   * @param {Record<string, any>} opts\n   * @returns {Record<string, any>}\n   */\n  normalizeAliasedChartType(opts) {\n    if (!opts || !opts.chart) return opts;\n    const requested = opts.chart.type;\n    if (requested !== \"funnel\" && requested !== \"pyramid\" && requested !== \"gauge\" && requested !== \"waffle\" && requested !== \"histogram\") {\n      return opts;\n    }\n    opts.chart.requestedType = requested;\n    if (requested === \"waffle\") {\n      opts.plotOptions = opts.plotOptions || {};\n      opts.plotOptions.unit = opts.plotOptions.unit || {};\n      if (opts.plotOptions.unit.layout == null) {\n        opts.plotOptions.unit.layout = \"grid\";\n      }\n      if (opts.plotOptions.unit.shape == null) {\n        opts.plotOptions.unit.shape = \"square\";\n      }\n      opts.chart.type = \"unit\";\n    } else if (requested === \"funnel\" || requested === \"pyramid\") {\n      opts.plotOptions = opts.plotOptions || {};\n      opts.plotOptions.bar = opts.plotOptions.bar || {};\n      opts.plotOptions.bar.isFunnel = true;\n      opts.plotOptions.bar.horizontal = true;\n      opts.chart.type = \"bar\";\n      if (requested === \"pyramid\") {\n        opts.plotOptions.bar.isPyramid = true;\n      } else {\n        opts.plotOptions.bar.isPyramid = false;\n      }\n    } else if (requested === \"gauge\") {\n      opts.chart.type = \"radialBar\";\n    } else if (requested === \"histogram\") {\n      opts.xaxis = opts.xaxis || {};\n      if (opts.xaxis.type == null) {\n        opts.xaxis.type = \"numeric\";\n      }\n      opts.chart.type = \"bar\";\n    }\n    return opts;\n  }\n  /**\n   * @param {string} chartType\n   * @param {Record<string, any>} chartDefaults\n   * @param {Record<string, any>} opts\n   */\n  checkForCatToNumericXAxis(chartType, chartDefaults, opts) {\n    var _a, _b, _c, _d, _e;\n    const defaults = new Defaults(opts);\n    const isBarHorizontal = (chartType === \"bar\" || chartType === \"boxPlot\" || chartType === \"violin\") && ((_b = (_a = opts.plotOptions) == null ? void 0 : _a.bar) == null ? void 0 : _b.horizontal);\n    const unsupportedZoom = chartType === \"pie\" || chartType === \"polarArea\" || chartType === \"donut\" || chartType === \"radar\" || chartType === \"radialBar\" || chartType === \"heatmap\" || chartType === \"unit\" || chartType === \"sunburst\";\n    const notNumericXAxis = opts.xaxis.type !== \"datetime\" && opts.xaxis.type !== \"numeric\";\n    const isScatterJitter = (chartType === \"scatter\" || chartType === \"bubble\") && ((_e = (_d = (_c = opts.plotOptions) == null ? void 0 : _c.scatter) == null ? void 0 : _d.jitter) == null ? void 0 : _e.enabled);\n    const tickPlacement = opts.xaxis.tickPlacement ? opts.xaxis.tickPlacement : chartDefaults.xaxis && chartDefaults.xaxis.tickPlacement;\n    if (!isBarHorizontal && !unsupportedZoom && !isScatterJitter && notNumericXAxis && tickPlacement !== \"between\") {\n      opts = defaults.convertCatToNumeric(opts);\n    }\n    return opts;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   * @param {import('../../types/internal').ChartStateW} [w]\n   */\n  extendYAxis(opts, w2) {\n    const options2 = new Options();\n    if (typeof opts.yaxis === \"undefined\" || !opts.yaxis || Array.isArray(opts.yaxis) && opts.yaxis.length === 0) {\n      opts.yaxis = {};\n    }\n    const globalApex = Environment.getApex();\n    if (opts.yaxis.constructor !== Array && globalApex.yaxis && globalApex.yaxis.constructor !== Array) {\n      opts.yaxis = Utils$1.extend(opts.yaxis, globalApex.yaxis);\n    }\n    if (opts.yaxis.constructor !== Array) {\n      opts.yaxis = [Utils$1.extend(options2.yAxis, opts.yaxis)];\n    } else {\n      opts.yaxis = Utils$1.extendArray(opts.yaxis, options2.yAxis);\n    }\n    let isLogY = false;\n    opts.yaxis.forEach((y) => {\n      if (y.logarithmic) {\n        isLogY = true;\n      }\n    });\n    let series = opts.series;\n    if (w2 && !series) {\n      series = w2.config.series;\n    }\n    if (isLogY && series.length !== opts.yaxis.length && series.length) {\n      opts.yaxis = series.map((s2, i2) => {\n        if (!s2.name) {\n          series[i2].name = `series-${i2 + 1}`;\n        }\n        if (opts.yaxis[i2]) {\n          opts.yaxis[i2].seriesName = series[i2].name;\n          return opts.yaxis[i2];\n        } else {\n          const newYaxis = Utils$1.extend(options2.yAxis, opts.yaxis[0]);\n          newYaxis.show = false;\n          return newYaxis;\n        }\n      });\n    }\n    if (isLogY && series.length > 1 && series.length !== opts.yaxis.length) {\n      console.warn(\n        \"A multi-series logarithmic chart should have equal number of series and y-axes\"\n      );\n    }\n    return opts;\n  }\n  // annotations also accepts array, so we need to extend them manually\n  /**\n   * @param {Record<string, any>} opts\n   */\n  extendAnnotations(opts) {\n    if (typeof opts.annotations === \"undefined\") {\n      opts.annotations = {};\n      opts.annotations.yaxis = [];\n      opts.annotations.xaxis = [];\n      opts.annotations.points = [];\n    }\n    opts = this.extendYAxisAnnotations(opts);\n    opts = this.extendXAxisAnnotations(opts);\n    opts = this.extendPointAnnotations(opts);\n    return opts;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  extendYAxisAnnotations(opts) {\n    const options2 = new Options();\n    opts.annotations.yaxis = Utils$1.extendArray(\n      typeof opts.annotations.yaxis !== \"undefined\" ? opts.annotations.yaxis : [],\n      options2.yAxisAnnotation\n    );\n    return opts;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  extendXAxisAnnotations(opts) {\n    const options2 = new Options();\n    opts.annotations.xaxis = Utils$1.extendArray(\n      typeof opts.annotations.xaxis !== \"undefined\" ? opts.annotations.xaxis : [],\n      options2.xAxisAnnotation\n    );\n    return opts;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  extendPointAnnotations(opts) {\n    const options2 = new Options();\n    opts.annotations.points = Utils$1.extendArray(\n      typeof opts.annotations.points !== \"undefined\" ? opts.annotations.points : [],\n      options2.pointAnnotation\n    );\n    return opts;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  checkForDarkTheme(opts) {\n    if (opts.theme && opts.theme.mode === \"dark\") {\n      if (!opts.tooltip) {\n        opts.tooltip = {};\n      }\n      if (opts.tooltip.theme !== \"light\") {\n        opts.tooltip.theme = \"dark\";\n      }\n      if (!opts.chart.foreColor) {\n        opts.chart.foreColor = \"#f6f7f8\";\n      }\n      if (!opts.theme.palette) {\n        opts.theme.palette = \"palette4\";\n      }\n    }\n  }\n  /**\n   * @param {any} opts\n   */\n  handleUserInputErrors(opts) {\n    const config = opts;\n    if (config.tooltip.shared && config.tooltip.intersect) {\n      throw new Error(\n        \"tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.\"\n      );\n    }\n    if (config.chart.type === \"bar\" && config.plotOptions.bar.horizontal) {\n      if (config.yaxis.length > 1) {\n        throw new Error(\n          \"Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false\"\n        );\n      }\n      if (config.yaxis[0].reversed) {\n        config.yaxis[0].opposite = true;\n      }\n      config.xaxis.tooltip.enabled = false;\n      config.yaxis[0].tooltip.enabled = false;\n      config.chart.zoom.enabled = false;\n    }\n    if (config.chart.type === \"bar\" || config.chart.type === \"rangeBar\") {\n      if (config.tooltip.shared) {\n        if (config.xaxis.crosshairs.width === \"barWidth\" && config.series.length > 1) {\n          config.xaxis.crosshairs.width = \"tickWidth\";\n        }\n      }\n    }\n    if (config.chart.type === \"candlestick\" || config.chart.type === \"boxPlot\") {\n      if (config.yaxis[0].reversed) {\n        console.warn(\n          `Reversed y-axis in ${config.chart.type} chart is not supported.`\n        );\n        config.yaxis[0].reversed = false;\n      }\n    }\n    return config;\n  }\n}\nconst LINE_HEIGHT_RATIO = 1.618;\nconst NICE_SCALE_ALLOWED_MAG_MSD = [\n  [1, 1, 2, 5, 5, 5, 10, 10, 10, 10, 10],\n  [1, 1, 2, 5, 5, 5, 10, 10, 10, 10, 10]\n];\nconst NICE_SCALE_DEFAULT_TICKS = [\n  1,\n  2,\n  4,\n  4,\n  6,\n  6,\n  6,\n  6,\n  6,\n  6,\n  6,\n  6,\n  6,\n  6,\n  6,\n  6,\n  6,\n  6,\n  12,\n  12,\n  12,\n  12,\n  12,\n  12,\n  12,\n  12,\n  12,\n  24\n];\nclass Globals {\n  /**\n   * @param {any} gl\n   */\n  initGlobalVars(gl) {\n    gl.series = [];\n    gl.seriesCandleO = [];\n    gl.seriesCandleH = [];\n    gl.seriesCandleM = [];\n    gl.seriesCandleL = [];\n    gl.seriesCandleC = [];\n    gl.seriesRangeStart = [];\n    gl.seriesRangeEnd = [];\n    gl.seriesRange = [];\n    gl.seriesPercent = [];\n    gl.seriesGoals = [];\n    gl.seriesX = [];\n    gl.seriesZ = [];\n    gl.seriesNames = [];\n    gl.seriesTotals = [];\n    gl.seriesLog = [];\n    gl.seriesColors = [];\n    gl.stackedSeriesTotals = [];\n    gl.seriesXvalues = [];\n    gl.seriesYvalues = [];\n    gl.dataWasParsed = false;\n    gl.originalSeries = null;\n    gl.maxValsInArrayIndex = 0;\n    gl.yValueDecimal = 0;\n    gl.allSeriesHasEqualX = true;\n    gl.hasNullValues = false;\n    gl.invalidLogScale = false;\n    gl.seriesRangeName = {};\n    gl.labels = [];\n    gl.hasXaxisGroups = false;\n    gl.groups = [];\n    gl.barGroups = [];\n    gl.lineGroups = [];\n    gl.areaGroups = [];\n    gl.hasSeriesGroups = false;\n    gl.seriesGroups = [];\n    gl.categoryLabels = [];\n    gl.timescaleLabels = [];\n    gl.noLabelsProvided = false;\n    gl.isXNumeric = false;\n    gl.skipLastTimelinelabel = false;\n    gl.skipFirstTimelinelabel = false;\n    gl.isDataXYZ = false;\n    gl.isMultiLineX = false;\n    gl.isMultipleYAxis = false;\n    gl.maxY = -Number.MAX_VALUE;\n    gl.minY = Number.MIN_VALUE;\n    gl.minYArr = [];\n    gl.maxYArr = [];\n    gl.maxX = -Number.MAX_VALUE;\n    gl.minX = Number.MAX_VALUE;\n    gl.initialMaxX = -Number.MAX_VALUE;\n    gl.initialMinX = Number.MAX_VALUE;\n    gl.maxDate = 0;\n    gl.minDate = Number.MAX_VALUE;\n    gl.minZ = Number.MAX_VALUE;\n    gl.maxZ = -Number.MAX_VALUE;\n    gl.minXDiff = Number.MAX_VALUE;\n    gl.yAxisScale = [];\n    gl.xAxisScale = null;\n    gl.xAxisTicksPositions = [];\n    gl.xRange = 0;\n    gl.yRange = [];\n    gl.zRange = 0;\n    gl.dataPoints = 0;\n    gl.xTickAmount = 0;\n    gl.multiAxisTickAmount = 0;\n    gl.disableZoomIn = false;\n    gl.disableZoomOut = false;\n    gl.yLabelsCoords = [];\n    gl.yTitleCoords = [];\n    gl.barPadForNumericAxis = 0;\n    gl.padHorizontal = 0;\n    gl.rotateXLabels = false;\n    gl.overlappingXLabels = false;\n    gl.radialSize = 0;\n    gl.barHeight = 0;\n    gl.barWidth = 0;\n    gl.animationEnded = false;\n    gl.isDestroyed = false;\n    gl.bulkRevealScheduled = false;\n    gl.resizeTimer = null;\n    gl.selectionResizeTimer = null;\n    gl.delayedElements = [];\n    gl.pointsArray = [];\n    gl.barCanvasCoords = null;\n    gl.activeRenderer = null;\n    gl.dataLabelsRects = [];\n    gl.lastDrawnDataLabelsIndexes = [];\n    gl.textRectsCache = /* @__PURE__ */ new Map();\n    gl.domCache = /* @__PURE__ */ new Map();\n    gl.dimensionCache = {};\n    gl.cachedSelectors = {};\n    if (!gl.seriesNS) {\n      this._attachNamespaces(gl);\n    }\n  }\n  /**\n   * Attach domain-grouped namespace sub-objects onto gl.\n   * Each sub-object is a plain object whose properties are defined as\n   * getters/setters that read/write the canonical flat properties on gl.\n   * This means there is exactly ONE storage location per value — no copies,\n   * no sync needed.\n   *\n   * Namespaces:\n   *   gl.series  — parsed series data and chart-type-specific arrays\n   *   gl.axes    — axis bounds, scales, ranges, tick state\n   *   gl.layout  — SVG/grid dimensions, translations, label sizes\n   *   gl.cache   — DOM caches, timers, observers, drawing scratch space\n   *\n   * Note: interact state lives on w.interact (not gl) — see Base.js.\n   * @param {any} gl\n   */\n  _attachNamespaces(gl) {\n    const proxy = (ns, key, nsKey = key) => {\n      Object.defineProperty(ns, nsKey, {\n        get() {\n          return gl[key];\n        },\n        set(v2) {\n          gl[key] = v2;\n        },\n        enumerable: true,\n        configurable: true\n      });\n    };\n    const seriesNS = {};\n    proxy(seriesNS, \"series\", \"data\");\n    for (const key of [\n      \"seriesNames\",\n      \"seriesX\",\n      \"seriesZ\",\n      \"seriesXvalues\",\n      \"seriesYvalues\",\n      \"seriesGoals\",\n      \"seriesLog\",\n      \"seriesColors\",\n      \"seriesPercent\",\n      \"seriesTotals\",\n      \"stackedSeriesTotals\",\n      \"seriesCandleO\",\n      \"seriesCandleH\",\n      \"seriesCandleM\",\n      \"seriesCandleL\",\n      \"seriesCandleC\",\n      \"seriesRangeStart\",\n      \"seriesRangeEnd\",\n      \"seriesRange\",\n      \"seriesYAxisMap\",\n      \"seriesYAxisReverseMap\",\n      \"seriesGroups\",\n      \"barGroups\",\n      \"lineGroups\",\n      \"areaGroups\",\n      \"originalSeries\",\n      \"collapsedSeries\",\n      \"collapsedSeriesIndices\",\n      \"ancillaryCollapsedSeries\",\n      \"ancillaryCollapsedSeriesIndices\",\n      \"allSeriesCollapsed\",\n      \"risingSeries\",\n      \"previousPaths\",\n      \"ignoreYAxisIndexes\",\n      \"labels\",\n      \"categoryLabels\",\n      \"timescaleLabels\",\n      \"groups\"\n    ]) {\n      proxy(seriesNS, key);\n    }\n    Object.defineProperty(gl, \"seriesNS\", {\n      value: seriesNS,\n      writable: false,\n      enumerable: false,\n      configurable: true\n    });\n    const axesNS = {};\n    for (const key of [\n      \"minX\",\n      \"maxX\",\n      \"initialMinX\",\n      \"initialMaxX\",\n      \"minY\",\n      \"maxY\",\n      \"minYArr\",\n      \"maxYArr\",\n      \"minZ\",\n      \"maxZ\",\n      \"minDate\",\n      \"maxDate\",\n      \"minXDiff\",\n      \"xRange\",\n      \"yRange\",\n      \"zRange\",\n      \"xAxisScale\",\n      \"yAxisScale\",\n      \"xAxisTicksPositions\",\n      \"xTickAmount\",\n      \"multiAxisTickAmount\",\n      \"dataPoints\",\n      \"maxValsInArrayIndex\",\n      \"isXNumeric\",\n      \"isMultipleYAxis\",\n      \"isMultiLineX\",\n      \"isDataXYZ\",\n      \"dataFormatXNumeric\",\n      \"allSeriesHasEqualX\",\n      \"hasNullValues\",\n      \"dataWasParsed\",\n      \"hasXaxisGroups\",\n      \"hasSeriesGroups\",\n      \"skipFirstTimelinelabel\",\n      \"skipLastTimelinelabel\",\n      \"yValueDecimal\",\n      \"invalidLogScale\",\n      \"noLabelsProvided\"\n    ]) {\n      proxy(axesNS, key);\n    }\n    Object.defineProperty(gl, \"axes\", {\n      value: axesNS,\n      writable: false,\n      enumerable: false,\n      configurable: true\n    });\n    const layoutNS = {};\n    for (const key of [\n      \"svgWidth\",\n      \"svgHeight\",\n      \"gridWidth\",\n      \"gridHeight\",\n      \"translateX\",\n      \"translateY\",\n      \"translateXAxisX\",\n      \"translateXAxisY\",\n      \"translateYAxisX\",\n      \"xAxisLabelsHeight\",\n      \"xAxisGroupLabelsHeight\",\n      \"xAxisLabelsWidth\",\n      \"yAxisLabelsWidth\",\n      \"yAxisWidths\",\n      \"yLabelsCoords\",\n      \"yTitleCoords\",\n      \"padHorizontal\",\n      \"barPadForNumericAxis\",\n      \"rotateXLabels\",\n      \"scaleX\",\n      \"scaleY\",\n      \"radialSize\",\n      \"defaultLabels\",\n      \"overlappingXLabels\"\n    ]) {\n      proxy(layoutNS, key);\n    }\n    Object.defineProperty(gl, \"layout\", {\n      value: layoutNS,\n      writable: false,\n      enumerable: false,\n      configurable: true\n    });\n    const cacheNS = {};\n    for (const key of [\n      \"domCache\",\n      \"dimensionCache\",\n      \"cachedSelectors\",\n      \"textRectsCache\",\n      \"pointsArray\",\n      \"dataLabelsRects\",\n      \"lastDrawnDataLabelsIndexes\",\n      \"delayedElements\",\n      \"resizeTimer\",\n      \"selectionResizeTimer\",\n      \"resizeObserver\"\n    ]) {\n      proxy(cacheNS, key);\n    }\n    Object.defineProperty(gl, \"cache\", {\n      value: cacheNS,\n      writable: false,\n      enumerable: false,\n      configurable: true\n    });\n  }\n  /**\n   * Persistent chart state — set ONCE at chart construction and intentionally NOT\n   * reset by initGlobalVars.  These values must survive updateSeries / re-render.\n   *\n   * Rule: if a value is recalculated fresh on every render it belongs in\n   * initGlobalVars instead, not here.\n   * @returns {import('../../types/internal').ChartGlobals}\n   * @param {Record<string, any>} config\n   */\n  globalVars(config) {\n    const globals = {\n      // ── Identity (set once, never changes) ───────────────────────────────────\n      chartID: null,\n      // full chart ID: \"apexcharts-<cuid>\"\n      cuid: null,\n      // random suffix only\n      // ── Event registry (accumulates listeners, never reset) ───────────────────\n      events: {\n        beforeMount: [],\n        mounted: [],\n        updated: [],\n        clicked: [],\n        selection: [],\n        dataPointSelection: [],\n        zoomed: [],\n        scrolled: []\n      },\n      // ── Theme colors (set by Theme module after config merge) ─────────────────\n      colors: [],\n      fill: { colors: [] },\n      // ── Animation-frame handles cancellable across re-renders ─────────────────\n      // The chart-type instances that own these loops (Radial needle, Unit\n      // gather/exit) are recreated every render, so the handle lives here: a new\n      // render cancels the previous render's loop before starting its own,\n      // instead of leaving it to animate detached nodes. NOT reset per render.\n      radialNeedleRAF: null,\n      unitGatherRAF: null,\n      unitExitRAF: null,\n      stroke: { colors: [] },\n      dataLabels: { style: { colors: [] } },\n      radarPolygons: { fill: { colors: [] } },\n      markers: {\n        colors: [],\n        size: config.markers.size,\n        largestSize: 0\n      },\n      // ── Device / environment detected once at startup ─────────────────────────\n      // Note: isTouchDevice lives on w.interact — see Base.js. Shim installed there.\n      LINE_HEIGHT_RATIO,\n      // ── Chart-type flags (derived from config, set during Core.mount) ─────────\n      axisCharts: true,\n      // false for pie/radial/treemap etc.\n      isSlopeChart: config.plotOptions.line.isSlopeChart,\n      comboCharts: false,\n      // true when mixing line + column series\n      // ── Config snapshots (backups for zoom-reset / updateOptions) ────────────\n      initialConfig: null,\n      // deep clone of the original user config\n      initialSeries: [],\n      // The `--apx-surface` value Theme wrote into chart.background, so a later\n      // token read can tell its own value from an explicit user background and\n      // update it (see Theme.applyTokenChrome). Persistent: a re-render must\n      // not forget it.\n      tokenSurface: void 0,\n      lastXAxis: [],\n      lastYAxis: [],\n      // ── User interaction state (must survive re-renders) ──────────────────────\n      // Note: zoomEnabled, panEnabled, selectionEnabled, zoomed, selection,\n      //       visibleXRange, selectedDataPoints, mousedown, clientX, clientY,\n      //       lastClientPosition, capturedSeriesIndex, capturedDataPointIndex,\n      //       disableZoomIn, disableZoomOut, isTouchDevice\n      //       live on w.interact — see Base.js. Backward-compat shims installed there.\n      // Series collapse state (user-driven, must persist across re-renders)\n      allSeriesCollapsed: false,\n      collapsedSeries: [],\n      collapsedSeriesIndices: [],\n      ancillaryCollapsedSeries: [],\n      ancillaryCollapsedSeriesIndices: [],\n      risingSeries: [],\n      // series being re-shown after collapse\n      ignoreYAxisIndexes: [],\n      // y-axis indices excluded during series collapse\n      // ── Lifecycle / update flags ──────────────────────────────────────────────\n      isDirty: false,\n      // true when user called an update method manually\n      isExecCalled: false,\n      // true when update came via exec()\n      dataChanged: false,\n      // true when series data was changed dynamically\n      resized: false,\n      // true after a container resize\n      // ── Data format flags (derived from config/series, stable between renders) ─\n      // Note: dataFormatXNumeric lives on w.axisFlags — see Base.js. Shim installed there.\n      // hasNullValues / invalidLogScale are recomputed every render and reset in\n      // initGlobalVars (they are NOT stable between renders).\n      // Persistent data tracking\n      columnSeries: null,\n      // tracks which series are rendered as bars/columns\n      yaxis: null,\n      // resolved yaxis config array\n      total: 0,\n      // running total (used by pie/radial)\n      // ── Animation control ─────────────────────────────────────────────────────\n      shouldAnimate: true,\n      previousPaths: [],\n      // paths from previous render — source for enter animation\n      // polarArea's last-drawn sector angles. Its angles are count-based, not\n      // value-based, so a data-change animation cannot reconstruct them from\n      // previousPaths (the previous VALUES) the way pie does; Pie.draw stashes\n      // the real ones here each render.\n      prevPolarAngles: null,\n      // Streaming scroll: previous frame's parsed rows + pixel positions,\n      // captured by Series.getPreviousPaths(). Consulted (like previousPaths)\n      // only while a data-change morph renders. See StreamScroll.\n      prevStreamFrame: null,\n      // Axis-chrome snapshot (tick label texts/positions + gridline positions)\n      // captured alongside prevStreamFrame; consumed once by AxisTransition\n      // after a variable-length re-render mounts.\n      prevChromeFrame: null,\n      // ── SVG viewport (set by Dimensions, but persistent as layout anchor) ─────\n      svgWidth: 0,\n      svgHeight: 0,\n      // Fingerprint of the container inputs that fed the last rendered size, so\n      // the window-resize handler can skip a redraw (and the animation teardown\n      // it causes) when a resize does not change the chart's drawing box.\n      lastResizeSignature: null,\n      // Note: gridWidth, gridHeight, translateX, translateY, translateXAxisX,\n      // translateXAxisY, xAxisLabelsHeight, xAxisGroupLabelsHeight, xAxisLabelsWidth,\n      // rotateXLabels, xAxisHeight, yLabelsCoords, yTitleCoords live on w.layout —\n      // see Base.js. Backward-compat shims installed there.\n      defaultLabels: false,\n      // Note: formatter properties (xLabelFormatter, yLabelFormatters, etc.) live on\n      // w.formatters — see Base.js. Backward-compat shims installed there.\n      yAxisLabelsWidth: 0,\n      scaleX: 1,\n      scaleY: 1,\n      translateYAxisX: [],\n      yAxisWidths: [],\n      // ── Instances (created once, replaced only on full re-init) ──────────────\n      tooltip: null,\n      resizeObserver: null,\n      // ── Locale (loaded once; changes only via setLocale()) ───────────────────\n      locale: {},\n      // ── Method queue (deferred calls during async operations) ────────────────\n      memory: {\n        methodsToExec: []\n      },\n      // ── Scale configuration constants — imported from utils/Constants.js ──────\n      niceScaleAllowedMagMsd: NICE_SCALE_ALLOWED_MAG_MSD,\n      niceScaleDefaultTicks: NICE_SCALE_DEFAULT_TICKS,\n      // ── Multi-axis series mapping ─────────────────────────────────────────────\n      seriesYAxisMap: [],\n      // yAxis index → series indices[]\n      seriesYAxisReverseMap: [],\n      // series index → yAxis index\n      noData: false\n      // true when there is nothing to render\n    };\n    return (\n      /** @type {import('../../types/internal').ChartGlobals} */\n      /** @type {unknown} */\n      globals\n    );\n  }\n  /**\n   * Lazy initial-series snapshot. Capturing `initialSeries` used to deep-clone\n   * the entire series on every parse and every update: the single largest CPU\n   * bucket at 50k+ points (profiled at ~23ms per 50k update). The setter now\n   * stores a cheap per-series shallow copy (series OBJECTS copied, data arrays\n   * shared) and the deep snapshot materializes only when something actually\n   * reads it (resetSeries, toolbar reset-home, tooltip same-length check).\n   *\n   * Why sharing the data arrays is safe: internal \"mutations\" of a series'\n   * data are property REPLACEMENTS (`series[i].data = []` on legend collapse),\n   * which cannot reach the captured copies because each series object was\n   * copied at capture time. The one in-place mutator (appendData's push loop)\n   * re-captures immediately after mutating, so the pending snapshot never\n   * spans the mutation.\n   *\n   * @param {Record<string, any>} globals\n   */\n  defineLazyInitialSeries(globals) {\n    let src = [];\n    let snap = null;\n    Object.defineProperty(globals, \"initialSeries\", {\n      configurable: true,\n      enumerable: true,\n      get() {\n        if (snap === null) {\n          snap = Utils$1.clone(src);\n        }\n        return snap;\n      },\n      set(value) {\n        src = Array.isArray(value) ? value.map(\n          (s2) => s2 && typeof s2 === \"object\" && !Array.isArray(s2) ? __spreadValues({}, s2) : s2\n        ) : value;\n        snap = null;\n        globals._initialSeriesPeek = src;\n      }\n    });\n    globals._initialSeriesPeek = src;\n  }\n  /**\n   * @param {Record<string, any>} config\n   */\n  init(config) {\n    const globals = this.globalVars(config);\n    this.initGlobalVars(globals);\n    this.defineLazyInitialSeries(globals);\n    globals.initialConfig = Utils$1.extend({}, config);\n    globals.initialSeries = config.series;\n    globals.lastXAxis = Utils$1.clone(\n      /** @type {NonNullable<typeof globals.initialConfig>} */\n      globals.initialConfig.xaxis\n    );\n    globals.lastYAxis = Utils$1.clone(\n      /** @type {NonNullable<typeof globals.initialConfig>} */\n      globals.initialConfig.yaxis\n    );\n    return globals;\n  }\n}\nclass Base {\n  /**\n   * @param {object} opts\n   */\n  constructor(opts) {\n    this.opts = opts;\n  }\n  /**\n   * Build and return the full chart state object `w`.\n   * @returns {import('../types/internal').ChartStateW}\n   */\n  init() {\n    const config = new Config(this.opts).init({ responsiveOverride: false });\n    const globals = new Globals().init(config);\n    const w2 = {\n      config,\n      globals,\n      dom: {},\n      // DOM node cache — lives here, not inside globals\n      interact: {\n        // Tool mode (derived from toolbar config at construction, updated by Toolbar)\n        zoomEnabled: config.chart.toolbar.autoSelected === \"zoom\" && config.chart.toolbar.tools.zoom && config.chart.zoom.enabled,\n        panEnabled: config.chart.toolbar.autoSelected === \"pan\" && config.chart.toolbar.tools.pan,\n        selectionEnabled: config.chart.toolbar.autoSelected === \"selection\" && config.chart.toolbar.tools.selection,\n        // Measure tool pre-selected via toolbar.autoSelected: 'measure'. Armed by\n        // the Measure module (self-arms on mount) and the toolbar button.\n        measureEnabled: config.chart.toolbar.autoSelected === \"measure\" && !!config.chart.toolbar.tools.measure && !!(config.chart.measure && config.chart.measure.enabled),\n        // Zoom / pan state (user-driven, must persist across re-renders)\n        zoomed: false,\n        selection: void 0,\n        visibleXRange: void 0,\n        selectedDataPoints: [],\n        // Mouse / pointer state\n        mousedown: false,\n        clientX: null,\n        clientY: null,\n        lastClientPosition: {},\n        // Tooltip capture state\n        capturedSeriesIndex: -1,\n        capturedDataPointIndex: -1,\n        // Timescale zoom bounds (reset per render by TimeScale)\n        disableZoomIn: false,\n        disableZoomOut: false,\n        // Device detection (set once at construction)\n        isTouchDevice: Environment.isBrowser() ? \"ontouchstart\" in window || navigator.maxTouchPoints > 0 : false\n      },\n      formatters: {\n        // Populated by Formatters.setLabelFormatters() each render\n        xLabelFormatter: void 0,\n        yLabelFormatters: [],\n        xaxisTooltipFormatter: void 0,\n        ttKeyFormatter: void 0,\n        ttVal: void 0,\n        ttZFormatter: void 0,\n        legendFormatter: void 0\n      },\n      // Candlestick / boxplot OHLC arrays — written by Data.handleCandleStickBoxData()\n      // each render; empty for all other chart types.\n      candleData: {\n        seriesCandleO: [],\n        seriesCandleH: [],\n        seriesCandleM: [],\n        seriesCandleL: [],\n        seriesCandleC: [],\n        // Optional raw observations per boxPlot data point ([i][j] = number[]),\n        // rendered as jitter dots. Empty unless boxPlot points are supplied.\n        seriesBoxPoints: []\n      },\n      // Range chart arrays — written by Data.handleRangeData() each render;\n      // empty for all other chart types.\n      rangeData: {\n        seriesRangeStart: [],\n        seriesRangeEnd: [],\n        seriesRange: []\n      },\n      // Violin distribution arrays — written by Data.handleViolinData() each\n      // render; empty for all other chart types.\n      //   seriesViolinDensity[i][j] = { values:number[], weights:number[], maxWeight:number }\n      //   seriesViolinPoints[i][j]  = number[] (raw observations, value-axis units)\n      //   seriesViolinMin/Max[i][j] = number (extent of density + points — drives Range.js)\n      violinData: {\n        seriesViolinDensity: [],\n        seriesViolinPoints: [],\n        seriesViolinMin: [],\n        seriesViolinMax: []\n      },\n      // Histogram binning — written by Data.binHistogramData() each render;\n      // empty for all other chart types.\n      //   edges[k]     = bin boundaries (length = binCount + 1)\n      //   counts[i][k] = raw observation count per series, before normalize\n      //   rule         = the rule that chose the width ('fd', 'sturges', ...)\n      histogramData: {\n        edges: [],\n        binWidth: 0,\n        counts: [],\n        rule: \"\",\n        capped: false\n      },\n      // Label / category data — written by Data.parseData() and TimeScale each render.\n      labelData: {\n        labels: [],\n        categoryLabels: [],\n        timescaleLabels: [],\n        // written by TimeScale.calculateTimeScaleMinMax()\n        hasXaxisGroups: false,\n        groups: [],\n        seriesGroups: []\n      },\n      // Axis / parsing behaviour flags — written by Data.parseData() each render.\n      axisFlags: {\n        isXNumeric: false,\n        dataFormatXNumeric: false,\n        isDataXYZ: false,\n        isRangeData: false,\n        isRangeBar: false,\n        isMultiLineX: false,\n        noLabelsProvided: false,\n        dataWasParsed: false\n      },\n      // Parsed series data — written by Data.parseData() each render.\n      // Note: initialSeries and originalSeries are intentionally excluded —\n      // they are persistent (survive re-renders) and remain on w.globals.\n      seriesData: {\n        series: [],\n        // main y-values array\n        seriesNames: [],\n        seriesX: [],\n        seriesZ: [],\n        seriesColors: [],\n        seriesGoals: [],\n        stackedSeriesTotals: [],\n        stackedSeriesTotalsByGroups: [],\n        unitData: []\n        // per-unit data for the `unit` chart (see SeriesData)\n      },\n      // Grid / axis layout computed by Dimensions.plotCoords() each render.\n      // gridWidth/gridHeight/translateX/translateY are also used as starting\n      // points by Dimensions on the next render (accumulated values), so the\n      // shim must be bidirectional — reads and writes both route correctly.\n      layout: {\n        gridHeight: 0,\n        gridWidth: 0,\n        translateX: 0,\n        translateY: 0,\n        translateXAxisX: 0,\n        translateXAxisY: 0,\n        rotateXLabels: false,\n        xAxisHeight: 0,\n        xAxisLabelsHeight: 0,\n        xAxisGroupLabelsHeight: 0,\n        xAxisLabelsWidth: 0,\n        yLabelsCoords: [],\n        yTitleCoords: [],\n        gridPad: { top: 0, right: 0, bottom: 0, left: 0 }\n      }\n    };\n    Object.defineProperty(globals, \"dom\", {\n      get() {\n        return w2.dom;\n      },\n      set(v2) {\n        w2.dom = v2;\n      },\n      enumerable: false,\n      configurable: true\n    });\n    for (const key of [\n      \"xLabelFormatter\",\n      \"yLabelFormatters\",\n      \"xaxisTooltipFormatter\",\n      \"ttKeyFormatter\",\n      \"ttVal\",\n      \"ttZFormatter\",\n      \"legendFormatter\"\n    ]) {\n      Object.defineProperty(globals, key, {\n        get() {\n          return (\n            /** @type {Record<string,any>} */\n            w2.formatters[key]\n          );\n        },\n        set(v2) {\n          w2.formatters[key] = v2;\n        },\n        enumerable: false,\n        configurable: true\n      });\n    }\n    for (const key of [\n      \"zoomEnabled\",\n      \"panEnabled\",\n      \"selectionEnabled\",\n      \"zoomed\",\n      \"selection\",\n      \"visibleXRange\",\n      \"selectedDataPoints\",\n      \"mousedown\",\n      \"clientX\",\n      \"clientY\",\n      \"lastClientPosition\",\n      \"capturedSeriesIndex\",\n      \"capturedDataPointIndex\",\n      \"disableZoomIn\",\n      \"disableZoomOut\",\n      \"isTouchDevice\"\n    ]) {\n      Object.defineProperty(globals, key, {\n        get() {\n          return (\n            /** @type {Record<string,any>} */\n            w2.interact[key]\n          );\n        },\n        set(v2) {\n          w2.interact[key] = v2;\n        },\n        enumerable: false,\n        configurable: true\n      });\n    }\n    for (const key of [\n      \"gridHeight\",\n      \"gridWidth\",\n      \"translateX\",\n      \"translateY\",\n      \"translateXAxisX\",\n      \"translateXAxisY\",\n      \"rotateXLabels\",\n      \"xAxisHeight\",\n      \"xAxisLabelsHeight\",\n      \"xAxisGroupLabelsHeight\",\n      \"xAxisLabelsWidth\",\n      \"yLabelsCoords\",\n      \"yTitleCoords\",\n      \"gridPad\"\n    ]) {\n      Object.defineProperty(globals, key, {\n        get() {\n          return (\n            /** @type {Record<string,any>} */\n            w2.layout[key]\n          );\n        },\n        set(v2) {\n          w2.layout[key] = v2;\n        },\n        enumerable: false,\n        configurable: true\n      });\n    }\n    for (const key of [\n      \"series\",\n      \"seriesNames\",\n      \"seriesX\",\n      \"seriesZ\",\n      \"seriesColors\",\n      \"seriesGoals\",\n      \"stackedSeriesTotals\",\n      \"stackedSeriesTotalsByGroups\"\n    ]) {\n      Object.defineProperty(globals, key, {\n        get() {\n          return (\n            /** @type {Record<string,any>} */\n            w2.seriesData[key]\n          );\n        },\n        set(v2) {\n          w2.seriesData[key] = v2;\n        },\n        enumerable: false,\n        configurable: true\n      });\n    }\n    for (const key of [\n      \"isXNumeric\",\n      \"dataFormatXNumeric\",\n      \"isDataXYZ\",\n      \"isRangeData\",\n      \"isRangeBar\",\n      \"isMultiLineX\",\n      \"noLabelsProvided\",\n      \"dataWasParsed\"\n    ]) {\n      Object.defineProperty(globals, key, {\n        get() {\n          return (\n            /** @type {Record<string,any>} */\n            w2.axisFlags[key]\n          );\n        },\n        set(v2) {\n          w2.axisFlags[key] = v2;\n        },\n        enumerable: false,\n        configurable: true\n      });\n    }\n    for (const key of [\n      \"labels\",\n      \"categoryLabels\",\n      \"timescaleLabels\",\n      \"hasXaxisGroups\",\n      \"groups\",\n      \"seriesGroups\"\n    ]) {\n      Object.defineProperty(globals, key, {\n        get() {\n          return (\n            /** @type {Record<string,any>} */\n            w2.labelData[key]\n          );\n        },\n        set(v2) {\n          w2.labelData[key] = v2;\n        },\n        enumerable: false,\n        configurable: true\n      });\n    }\n    for (const key of [\"seriesRangeStart\", \"seriesRangeEnd\", \"seriesRange\"]) {\n      Object.defineProperty(globals, key, {\n        get() {\n          return (\n            /** @type {Record<string,any>} */\n            w2.rangeData[key]\n          );\n        },\n        set(v2) {\n          w2.rangeData[key] = v2;\n        },\n        enumerable: false,\n        configurable: true\n      });\n    }\n    for (const key of [\n      \"seriesCandleO\",\n      \"seriesCandleH\",\n      \"seriesCandleM\",\n      \"seriesCandleL\",\n      \"seriesCandleC\"\n    ]) {\n      Object.defineProperty(globals, key, {\n        get() {\n          return (\n            /** @type {Record<string,any>} */\n            w2.candleData[key]\n          );\n        },\n        set(v2) {\n          w2.candleData[key] = v2;\n        },\n        enumerable: false,\n        configurable: true\n      });\n    }\n    for (const key of [\n      \"seriesViolinDensity\",\n      \"seriesViolinPoints\",\n      \"seriesViolinMin\",\n      \"seriesViolinMax\"\n    ]) {\n      Object.defineProperty(globals, key, {\n        get() {\n          return (\n            /** @type {Record<string,any>} */\n            w2.violinData[key]\n          );\n        },\n        set(v2) {\n          w2.violinData[key] = v2;\n        },\n        enumerable: false,\n        configurable: true\n      });\n    }\n    return (\n      /** @type {import('../types/internal').ChartStateW} */\n      /** @type {unknown} */\n      w2\n    );\n  }\n}\nclass CoreUtils {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n  }\n  /**\n   * @param {any[]} series\n   * @param {string} chartType\n   */\n  static checkComboSeries(series, chartType) {\n    let comboCharts = false;\n    let comboBarCount = 0;\n    let comboCount = 0;\n    if (chartType === void 0) {\n      chartType = \"line\";\n    }\n    if (series.length && typeof series[0].type !== \"undefined\") {\n      series.forEach((s2) => {\n        if (s2.type === \"bar\" || s2.type === \"column\" || s2.type === \"candlestick\" || s2.type === \"boxPlot\" || s2.type === \"violin\") {\n          comboBarCount++;\n        }\n        if (typeof s2.type !== \"undefined\" && s2.type !== chartType) {\n          comboCount++;\n        }\n      });\n    }\n    if (comboCount > 0) {\n      comboCharts = true;\n    }\n    return {\n      comboBarCount,\n      comboCharts\n    };\n  }\n  /**\n   * @memberof CoreUtils\n   * returns the sum of all individual values in a multiple stacked series\n   * Eg. w.seriesData.series = [[32,33,43,12], [2,3,5,1]]\n   *  @return [34,36,48,13]\n   * @param {number[]} excludedSeriesIndices\n   **/\n  getStackedSeriesTotals(excludedSeriesIndices = []) {\n    const w2 = this.w;\n    const total = [];\n    if (w2.seriesData.series.length === 0) return total;\n    for (let i2 = 0; i2 < w2.seriesData.series[w2.globals.maxValsInArrayIndex].length; i2++) {\n      let t2 = 0;\n      for (let j = 0; j < w2.seriesData.series.length; j++) {\n        if (typeof w2.seriesData.series[j][i2] !== \"undefined\" && excludedSeriesIndices.indexOf(j) === -1) {\n          t2 += w2.seriesData.series[j][i2];\n        }\n      }\n      total.push(t2);\n    }\n    return total;\n  }\n  // get total of the all values inside all series\n  /**\n   * @param {number | null} [index]\n   */\n  getSeriesTotalByIndex(index = null) {\n    if (index === null) {\n      return (\n        /** @type {any[]} */\n        this.w.config.series.reduce(\n          (acc, cur) => acc + cur,\n          0\n        )\n      );\n    } else {\n      const seriesAtIndex = this.w.seriesData.series[index];\n      if (!Array.isArray(seriesAtIndex)) {\n        return seriesAtIndex != null ? seriesAtIndex : 0;\n      }\n      return seriesAtIndex.reduce(\n        (acc, cur) => acc + cur,\n        0\n      );\n    }\n  }\n  /**\n   * @memberof CoreUtils\n   * returns the sum of values in a multiple stacked grouped charts\n   * Eg. w.seriesData.series = [[32,33,43,12], [2,3,5,1], [43, 23, 34, 22]]\n   * series 1 and 2 are in a group, while series 3 is in another group\n   *  @return [[34, 36, 48, 12], [43, 23, 34, 22]]\n   **/\n  getStackedSeriesTotalsByGroups() {\n    const w2 = this.w;\n    const total = [];\n    w2.labelData.seriesGroups.forEach((sg) => {\n      const includedIndexes = [];\n      w2.config.series.forEach((s2, si) => {\n        if (sg.indexOf(w2.seriesData.seriesNames[si]) > -1) {\n          includedIndexes.push(si);\n        }\n      });\n      const excludedIndices = w2.seriesData.series.map((_, fi) => includedIndexes.indexOf(fi) === -1 ? fi : -1).filter((f) => f !== -1);\n      total.push(this.getStackedSeriesTotals(excludedIndices));\n    });\n    return total;\n  }\n  setSeriesYAxisMappings() {\n    const gl = this.w.globals;\n    const cnf = this.w.config;\n    let axisSeriesMap = [];\n    const seriesYAxisReverseMap = [];\n    const unassignedSeriesIndices = [];\n    const seriesNameArrayStyle = this.w.seriesData.series.length > cnf.yaxis.length || /**\n     * @param {ApexYAxis} a\n     */\n    cnf.yaxis.some((a2) => Array.isArray(a2.seriesName));\n    cnf.series.forEach((_s, i2) => {\n      unassignedSeriesIndices.push(i2);\n      seriesYAxisReverseMap.push(null);\n    });\n    cnf.yaxis.forEach(\n      (_yaxe, yi) => {\n        axisSeriesMap[yi] = [];\n      }\n    );\n    const unassignedYAxisIndices = [];\n    cnf.yaxis.forEach((yaxe, yi) => {\n      let assigned = false;\n      if (yaxe.seriesName) {\n        let seriesNames = [];\n        if (Array.isArray(yaxe.seriesName)) {\n          seriesNames = yaxe.seriesName;\n        } else {\n          seriesNames.push(yaxe.seriesName);\n        }\n        seriesNames.forEach((name2) => {\n          cnf.series.forEach((s2, si) => {\n            if (\n              /** @type {any} */\n              s2.name === name2\n            ) {\n              let remove = si;\n              if (yi === si || seriesNameArrayStyle) {\n                if (!seriesNameArrayStyle || unassignedSeriesIndices.indexOf(si) > -1) {\n                  axisSeriesMap[yi].push([yi, si]);\n                } else {\n                  console.warn(\n                    \"Series '\" + /** @type {any} */\n                    s2.name + \"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes.\"\n                  );\n                }\n              } else {\n                axisSeriesMap[si].push([si, yi]);\n                remove = yi;\n              }\n              assigned = true;\n              remove = unassignedSeriesIndices.indexOf(remove);\n              if (remove !== -1) {\n                unassignedSeriesIndices.splice(remove, 1);\n              }\n            }\n          });\n        });\n      }\n      if (!assigned) {\n        unassignedYAxisIndices.push(yi);\n      }\n    });\n    axisSeriesMap = axisSeriesMap.map((yaxe) => {\n      const ra = [];\n      yaxe.forEach((sa) => {\n        seriesYAxisReverseMap[sa[1]] = sa[0];\n        ra.push(sa[1]);\n      });\n      return ra;\n    });\n    let lastUnassignedYAxis = cnf.yaxis.length - 1;\n    for (let i2 = 0; i2 < unassignedYAxisIndices.length; i2++) {\n      lastUnassignedYAxis = unassignedYAxisIndices[i2];\n      axisSeriesMap[lastUnassignedYAxis] = [];\n      if (unassignedSeriesIndices) {\n        const si = unassignedSeriesIndices[0];\n        unassignedSeriesIndices.shift();\n        axisSeriesMap[lastUnassignedYAxis].push(si);\n        seriesYAxisReverseMap[si] = lastUnassignedYAxis;\n      } else {\n        break;\n      }\n    }\n    unassignedSeriesIndices.forEach((i2) => {\n      axisSeriesMap[lastUnassignedYAxis].push(i2);\n      seriesYAxisReverseMap[i2] = lastUnassignedYAxis;\n    });\n    gl.seriesYAxisMap = axisSeriesMap.map((x) => x);\n    gl.seriesYAxisReverseMap = seriesYAxisReverseMap.map((x) => x);\n    gl.seriesYAxisMap.forEach((axisSeries, ai) => {\n      axisSeries.forEach((si) => {\n        if (\n          /** @type {any} */\n          cnf.series[si] && /** @type {any} */\n          cnf.series[si].group === void 0\n        ) {\n          const _series = (\n            /** @type {any} */\n            cnf.series[si]\n          );\n          _series.group = \"apexcharts-axis-\".concat(ai.toString());\n        }\n      });\n    });\n  }\n  /**\n   * @param {number | null} [index]\n   */\n  isSeriesNull(index = null) {\n    let r2 = [];\n    const series = (\n      /** @type {any[]} */\n      this.w.config.series\n    );\n    if (index === null) {\n      r2 = series.filter((d) => d !== null);\n    } else if (series[index] && Array.isArray(series[index].data)) {\n      r2 = series[index].data.filter((d) => d !== null);\n    } else {\n      r2 = series[index] !== null && series[index] !== void 0 ? [series[index]] : [];\n    }\n    return r2.length === 0;\n  }\n  /**\n   * @param {number} index\n   */\n  seriesHaveSameValues(index) {\n    const seriesAtIndex = this.w.seriesData.series[index];\n    if (!Array.isArray(seriesAtIndex)) {\n      return true;\n    }\n    return seriesAtIndex.every(\n      (val, i2, arr) => val === arr[0]\n    );\n  }\n  /**\n   * @param {any[]} labels\n   */\n  getCategoryLabels(labels) {\n    const w2 = this.w;\n    let catLabels = labels.slice();\n    if (w2.config.xaxis.convertedCatToNumeric) {\n      catLabels = labels.map((i2) => {\n        return w2.config.xaxis.labels.formatter(i2 - w2.globals.minX + 1);\n      });\n    }\n    return catLabels;\n  }\n  // maxValsInArrayIndex is the index of series[] which has the largest number of items\n  getLargestSeries() {\n    const w2 = this.w;\n    w2.globals.maxValsInArrayIndex = w2.seriesData.series.map((a2) => a2.length).indexOf(\n      Math.max.apply(\n        Math,\n        /**\n         * @param {number[]} a\n         */\n        w2.seriesData.series.map((a2) => a2.length)\n      )\n    );\n  }\n  getLargestMarkerSize() {\n    const w2 = this.w;\n    let size = 0;\n    w2.globals.markers.size.forEach((m2) => {\n      size = Math.max(size, m2);\n    });\n    if (w2.config.markers.discrete && w2.config.markers.discrete.length) {\n      w2.config.markers.discrete.forEach((m2) => {\n        size = Math.max(size, m2.size);\n      });\n    }\n    if (size > 0) {\n      if (w2.config.markers.hover.size > 0) {\n        size = w2.config.markers.hover.size;\n      } else {\n        size += w2.config.markers.hover.sizeOffset;\n      }\n    }\n    w2.globals.markers.largestSize = size;\n    return size;\n  }\n  /**\n   * @memberof Core\n   * returns the sum of all values in a series\n   * Eg. w.seriesData.series = [[32,33,43,12], [2,3,5,1]]\n   *  @return [120, 11]\n   **/\n  getSeriesTotals() {\n    const w2 = this.w;\n    w2.globals.seriesTotals = w2.seriesData.series.map((ser) => {\n      let total = 0;\n      if (Array.isArray(ser)) {\n        for (let j = 0; j < ser.length; j++) {\n          total += ser[j];\n        }\n      } else {\n        total += ser;\n      }\n      return total;\n    });\n  }\n  /**\n   * @param {number} minX\n   * @param {number} maxX\n   */\n  getSeriesTotalsXRange(minX, maxX) {\n    const w2 = this.w;\n    const seriesTotalsXRange = w2.seriesData.series.map((ser, index) => {\n      let total = 0;\n      for (let j = 0; j < ser.length; j++) {\n        if (w2.seriesData.seriesX[index][j] > minX && w2.seriesData.seriesX[index][j] < maxX) {\n          total += ser[j];\n        }\n      }\n      return total;\n    });\n    return seriesTotalsXRange;\n  }\n  /**\n   * @memberof CoreUtils\n   * returns the percentage value of all individual values which can be used in a 100% stacked series\n   * Eg. w.seriesData.series = [[32, 33, 43, 12], [2, 3, 5, 1]]\n   *  @return [[94.11, 91.66, 89.58, 92.30], [5.88, 8.33, 10.41, 7.7]]\n   **/\n  getPercentSeries() {\n    const w2 = this.w;\n    w2.globals.seriesPercent = w2.seriesData.series.map((ser) => {\n      const seriesPercent = [];\n      if (Array.isArray(ser)) {\n        for (let j = 0; j < ser.length; j++) {\n          const total = w2.seriesData.stackedSeriesTotals[j];\n          let percent = 0;\n          if (total) {\n            percent = 100 * ser[j] / total;\n          }\n          seriesPercent.push(percent);\n        }\n      } else {\n        const total = w2.globals.seriesTotals.reduce((acc, val) => acc + val, 0);\n        const percent = 100 * ser / total;\n        seriesPercent.push(percent);\n      }\n      return seriesPercent;\n    });\n  }\n  getCalculatedRatios() {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const yRatio = [];\n    let invertedYRatio = 0;\n    let xRatio = 0;\n    let invertedXRatio = 0;\n    let zRatio = 0;\n    let baseLineY = [];\n    let baseLineInvertedY = 0.1;\n    let baseLineX = 0;\n    gl.yRange = [];\n    if (gl.isMultipleYAxis) {\n      for (let i2 = 0; i2 < gl.minYArr.length; i2++) {\n        gl.yRange.push(Math.abs(gl.minYArr[i2] - gl.maxYArr[i2]));\n        baseLineY.push(0);\n      }\n    } else {\n      gl.yRange.push(Math.abs(gl.minY - gl.maxY));\n    }\n    gl.xRange = Math.abs(gl.maxX - gl.minX);\n    gl.zRange = Math.abs(gl.maxZ - gl.minZ);\n    for (let i2 = 0; i2 < gl.yRange.length; i2++) {\n      yRatio.push(gl.yRange[i2] / this.w.layout.gridHeight);\n    }\n    xRatio = gl.xRange / this.w.layout.gridWidth;\n    invertedYRatio = /** @type {any} */\n    gl.yRange / this.w.layout.gridWidth;\n    invertedXRatio = gl.xRange / this.w.layout.gridHeight;\n    zRatio = gl.zRange / this.w.layout.gridHeight * 16;\n    if (!zRatio) {\n      zRatio = 1;\n    }\n    if (gl.minY !== Number.MIN_VALUE && Math.abs(gl.minY) !== 0) {\n      const _hasNegsGl = (\n        /** @type {any} */\n        gl\n      );\n      _hasNegsGl.hasNegs = true;\n    }\n    if (w2.globals.seriesYAxisReverseMap.length > 0) {\n      const scaleBaseLineYScale = (y, i2) => {\n        const yAxis = w2.config.yaxis[w2.globals.seriesYAxisReverseMap[i2]];\n        if (!yAxis) return 0;\n        const sign = y < 0 ? -1 : 1;\n        y = Math.abs(y);\n        if (yAxis.logarithmic) {\n          y = this.getBaseLog(yAxis.logBase, y);\n        }\n        return -sign * y / yRatio[i2];\n      };\n      if (gl.isMultipleYAxis) {\n        baseLineY = [];\n        for (let i2 = 0; i2 < yRatio.length; i2++) {\n          baseLineY.push(scaleBaseLineYScale(gl.minYArr[i2], i2));\n        }\n      } else {\n        baseLineY = [];\n        baseLineY.push(scaleBaseLineYScale(gl.minY, 0));\n        if (gl.minY !== Number.MIN_VALUE && Math.abs(gl.minY) !== 0) {\n          baseLineInvertedY = -gl.minY / invertedYRatio;\n          baseLineX = gl.minX / xRatio;\n        }\n      }\n    } else {\n      baseLineY = [];\n      baseLineY.push(0);\n      baseLineInvertedY = 0;\n      baseLineX = 0;\n    }\n    return {\n      yRatio,\n      invertedYRatio,\n      zRatio,\n      xRatio,\n      invertedXRatio,\n      baseLineInvertedY,\n      baseLineY,\n      baseLineX\n    };\n  }\n  /**\n   * @param {any[]} series\n   */\n  getLogSeries(series) {\n    const w2 = this.w;\n    w2.globals.seriesLog = series.map((s2, i2) => {\n      const yAxisIndex = w2.globals.seriesYAxisReverseMap[i2];\n      if (w2.config.yaxis[yAxisIndex] && w2.config.yaxis[yAxisIndex].logarithmic) {\n        return s2.map((d) => {\n          if (d === null) return null;\n          return this.getLogVal(w2.config.yaxis[yAxisIndex].logBase, d, i2);\n        });\n      } else {\n        return s2;\n      }\n    });\n    return w2.globals.invalidLogScale ? series : w2.globals.seriesLog;\n  }\n  /**\n   * @param {number} val\n   * @param {number} seriesIndex\n   * @returns {number}\n   */\n  getLogValAtSeriesIndex(val, seriesIndex) {\n    if (val === null) return (\n      /** @type {any} */\n      null\n    );\n    const w2 = this.w;\n    const yAxisIndex = w2.globals.seriesYAxisReverseMap[seriesIndex];\n    if (w2.config.yaxis[yAxisIndex] && w2.config.yaxis[yAxisIndex].logarithmic) {\n      return this.getLogVal(\n        w2.config.yaxis[yAxisIndex].logBase,\n        val,\n        seriesIndex\n      );\n    }\n    return val;\n  }\n  /**\n   * @param {number} base\n   * @param {number} value\n   */\n  getBaseLog(base, value) {\n    return Math.log(value) / Math.log(base);\n  }\n  /**\n   * @param {number} b\n   * @param {number} d\n   * @param {number} seriesIndex\n   */\n  getLogVal(b2, d, seriesIndex) {\n    if (d <= 0) {\n      return 0;\n    }\n    const w2 = this.w;\n    const min_log_val = w2.globals.minYArr[seriesIndex] === 0 ? -1 : this.getBaseLog(b2, w2.globals.minYArr[seriesIndex]);\n    const max_log_val = w2.globals.maxYArr[seriesIndex] === 0 ? 0 : this.getBaseLog(b2, w2.globals.maxYArr[seriesIndex]);\n    const number_of_height_levels = max_log_val - min_log_val;\n    if (d < 1) return d / number_of_height_levels;\n    const log_height_value = this.getBaseLog(b2, d) - min_log_val;\n    return log_height_value / number_of_height_levels;\n  }\n  /**\n   * @param {number[]} yRatio\n   */\n  getLogYRatios(yRatio) {\n    const w2 = this.w;\n    const gl = this.w.globals;\n    const _gl = (\n      /** @type {any} */\n      gl\n    );\n    _gl.yLogRatio = yRatio.slice();\n    _gl.logYRange = /** @type {any[]} */\n    gl.yRange.map(\n      (_, i2) => {\n        const yAxisIndex = w2.globals.seriesYAxisReverseMap[i2];\n        if (w2.config.yaxis[yAxisIndex] && this.w.config.yaxis[yAxisIndex].logarithmic) {\n          let maxY = -Number.MAX_VALUE;\n          let minY = Number.MIN_VALUE;\n          let range = 1;\n          gl.seriesLog.forEach(\n            (s2, si) => {\n              s2.forEach((v2) => {\n                if (w2.config.yaxis[si] && w2.config.yaxis[si].logarithmic) {\n                  maxY = Math.max(v2, maxY);\n                  minY = Math.min(v2, minY);\n                }\n              });\n            }\n          );\n          range = Math.pow(gl.yRange[i2], Math.abs(minY - maxY) / gl.yRange[i2]);\n          _gl.yLogRatio[i2] = range / this.w.layout.gridHeight;\n          return range;\n        }\n      }\n    );\n    return _gl.invalidLogScale ? yRatio.slice() : _gl.yLogRatio;\n  }\n  // Some config objects can be array - and we need to extend them correctly\n  /**\n   * @param {any} configInstance\n   * @param {Record<string, any>} options\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  static extendArrayProps(configInstance, options2, w2) {\n    var _a, _b;\n    if (options2 == null ? void 0 : options2.yaxis) {\n      options2 = configInstance.extendYAxis(options2, w2);\n    }\n    if (options2 == null ? void 0 : options2.annotations) {\n      if (options2.annotations.yaxis) {\n        options2 = configInstance.extendYAxisAnnotations(options2);\n      }\n      if ((_a = options2 == null ? void 0 : options2.annotations) == null ? void 0 : _a.xaxis) {\n        options2 = configInstance.extendXAxisAnnotations(options2);\n      }\n      if ((_b = options2 == null ? void 0 : options2.annotations) == null ? void 0 : _b.points) {\n        options2 = configInstance.extendPointAnnotations(options2);\n      }\n    }\n    return options2;\n  }\n  // Series of the same group and type can be stacked together distinct from\n  // other series of the same type on the same axis.\n  /**\n   * @param {Record<string, any>} typeSeries\n   * @param {string[]} typeGroups\n   * @param {string} type\n   * @param {string} chartClass\n   */\n  drawSeriesByGroup(typeSeries, typeGroups, type, chartClass) {\n    const w2 = this.w;\n    const graph = [];\n    if (typeSeries.series.length > 0) {\n      typeGroups.forEach((gn) => {\n        const gs = [];\n        const gi = [];\n        typeSeries.i.forEach((i2, ii) => {\n          if (\n            /** @type {Record<string,any>} */\n            w2.config.series[i2].group === gn\n          ) {\n            gs.push(typeSeries.series[ii]);\n            gi.push(i2);\n          }\n        });\n        gs.length > 0 && graph.push(\n          /** @type {any} */\n          chartClass.draw(gs, type, gi)\n        );\n      });\n    }\n    return graph;\n  }\n}\nconst SVGNS$2 = \"http://www.w3.org/2000/svg\";\nclass Point {\n  /**\n   * @param {number|{x:number,y:number}} x\n   * @param {number} [y]\n   */\n  constructor(x, y) {\n    if (typeof x === \"object\") {\n      this.x = x.x;\n      this.y = x.y;\n    } else {\n      this.x = x || 0;\n      this.y = y || 0;\n    }\n  }\n  /**\n   * @param {Matrix} matrix\n   */\n  transform(matrix) {\n    return matrix.apply(this);\n  }\n  clone() {\n    return new Point(this.x, this.y);\n  }\n}\nclass Matrix {\n  /**\n   * Defaults to the identity matrix when called with no args.\n   * @param {number} [a]\n   * @param {number} [b]\n   * @param {number} [c]\n   * @param {number} [d]\n   * @param {number} [e]\n   * @param {number} [f]\n   */\n  constructor(a2, b2, c2, d, e2, f) {\n    this.a = a2 != null ? a2 : 1;\n    this.b = b2 != null ? b2 : 0;\n    this.c = c2 != null ? c2 : 0;\n    this.d = d != null ? d : 1;\n    this.e = e2 != null ? e2 : 0;\n    this.f = f != null ? f : 0;\n  }\n  /**\n   * @param {number} deg\n   */\n  rotate(deg) {\n    const rad = deg * Math.PI / 180;\n    const cos = Math.cos(rad);\n    const sin = Math.sin(rad);\n    return this.multiply(new Matrix(cos, sin, -sin, cos, 0, 0));\n  }\n  /**\n   * @param {number} sx\n   * @param {number} sy\n   */\n  scale(sx, sy) {\n    return this.multiply(new Matrix(sx, 0, 0, sy != null ? sy : sx, 0, 0));\n  }\n  /**\n   * @param {Matrix} m\n   */\n  multiply(m2) {\n    return new Matrix(\n      this.a * m2.a + this.c * m2.b,\n      this.b * m2.a + this.d * m2.b,\n      this.a * m2.c + this.c * m2.d,\n      this.b * m2.c + this.d * m2.d,\n      this.a * m2.e + this.c * m2.f + this.e,\n      this.b * m2.e + this.d * m2.f + this.f\n    );\n  }\n  /**\n   * @param {Point} point\n   */\n  apply(point) {\n    return new Point(\n      this.a * point.x + this.c * point.y + this.e,\n      this.b * point.x + this.d * point.y + this.f\n    );\n  }\n}\nclass Box {\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @param {number} w\n   * @param {number} h\n   */\n  constructor(x, y, w2, h2) {\n    this.x = x;\n    this.y = y;\n    this.w = w2;\n    this.h = h2;\n    this.width = w2;\n    this.height = h2;\n    this.x2 = x + w2;\n    this.y2 = y + h2;\n  }\n}\n/*!\n * Path morphing for SVG path animations\n * Based on svg.pathmorphing.js by Ulrich-Matthias Schäfer (MIT License)\n * Refactored to be standalone (no SVG.js dependency)\n *\n * Two algorithms are exported:\n *   - morphPaths()    — command-level interpolation; preserves curves but can\n *                       produce \"wings/flips\" when two shapes have very\n *                       different topology (e.g. bar rect → pie arc).\n *   - morphPolygons() — resamples both shapes into N evenly-spaced perimeter\n *                       points and tweens point-by-point with rotation-search\n *                       alignment; always smooth and non-self-intersecting,\n *                       at the cost of throwing away curve smoothness.\n */\nfunction parsePath(d) {\n  if (!d || typeof d !== \"string\") return [[\"M\", 0, 0]];\n  const commands = [];\n  const re = /([MmLlHhVvCcSsQqTtAaZz])\\s*/g;\n  const numRe = /[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?/gi;\n  let match;\n  const letters = [];\n  const positions = [];\n  while ((match = re.exec(d)) !== null) {\n    letters.push(match[1]);\n    positions.push(match.index);\n  }\n  for (let i2 = 0; i2 < letters.length; i2++) {\n    const start = positions[i2] + letters[i2].length;\n    const end = i2 + 1 < positions.length ? positions[i2 + 1] : d.length;\n    const paramStr = d.substring(start, end);\n    const nums = [];\n    let numMatch;\n    numRe.lastIndex = 0;\n    while ((numMatch = numRe.exec(paramStr)) !== null) {\n      nums.push(parseFloat(numMatch[0]));\n    }\n    const cmd = letters[i2].toUpperCase();\n    if (cmd === \"Z\") {\n      commands.push([\"Z\"]);\n    } else if (cmd === \"M\" || cmd === \"L\" || cmd === \"T\") {\n      for (let j = 0; j < nums.length; j += 2) {\n        commands.push([cmd, nums[j], nums[j + 1]]);\n      }\n    } else if (cmd === \"H\") {\n      for (let j = 0; j < nums.length; j++) {\n        commands.push([cmd, nums[j]]);\n      }\n    } else if (cmd === \"V\") {\n      for (let j = 0; j < nums.length; j++) {\n        commands.push([cmd, nums[j]]);\n      }\n    } else if (cmd === \"C\") {\n      for (let j = 0; j < nums.length; j += 6) {\n        commands.push([\n          cmd,\n          nums[j],\n          nums[j + 1],\n          nums[j + 2],\n          nums[j + 3],\n          nums[j + 4],\n          nums[j + 5]\n        ]);\n      }\n    } else if (cmd === \"S\" || cmd === \"Q\") {\n      for (let j = 0; j < nums.length; j += 4) {\n        commands.push([cmd, nums[j], nums[j + 1], nums[j + 2], nums[j + 3]]);\n      }\n    } else if (cmd === \"A\") {\n      for (let j = 0; j < nums.length; j += 7) {\n        commands.push([\n          cmd,\n          nums[j],\n          nums[j + 1],\n          nums[j + 2],\n          nums[j + 3],\n          nums[j + 4],\n          nums[j + 5],\n          nums[j + 6]\n        ]);\n      }\n    }\n  }\n  if (commands.length === 0) {\n    commands.push([\"M\", 0, 0]);\n  }\n  return commands;\n}\nfunction pathBbox(arr) {\n  let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;\n  arr.forEach((cmd) => {\n    for (let i2 = 1; i2 < cmd.length; i2 += 2) {\n      if (i2 + 1 <= cmd.length) {\n        const x = cmd[i2];\n        const y = cmd[i2 + 1];\n        if (typeof x === \"number\" && typeof y === \"number\") {\n          if (x < minX) minX = x;\n          if (x > maxX) maxX = x;\n          if (y < minY) minY = y;\n          if (y > maxY) maxY = y;\n        }\n      }\n    }\n  });\n  if (minX === Infinity) {\n    return { x: 0, y: 0, width: 0, height: 0 };\n  }\n  return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };\n}\nfunction arrayToPath(arr) {\n  return arr.map((cmd) => cmd.join(\" \")).join(\" \");\n}\nfunction simplify(val) {\n  switch (val[0]) {\n    case \"z\":\n    case \"Z\":\n      val[0] = \"L\";\n      val[1] = this.start[0];\n      val[2] = this.start[1];\n      break;\n    case \"H\":\n      val[0] = \"L\";\n      val[2] = this.pos[1];\n      break;\n    case \"V\":\n      val[0] = \"L\";\n      val[2] = val[1];\n      val[1] = this.pos[0];\n      break;\n    case \"T\":\n      val[0] = \"Q\";\n      val[3] = val[1];\n      val[4] = val[2];\n      val[1] = this.reflection[1];\n      val[2] = this.reflection[0];\n      break;\n    case \"S\":\n      val[0] = \"C\";\n      val[6] = val[4];\n      val[5] = val[3];\n      val[4] = val[2];\n      val[3] = val[1];\n      val[2] = this.reflection[1];\n      val[1] = this.reflection[0];\n      break;\n  }\n  return val;\n}\nfunction setPosAndReflection(val) {\n  var len = val.length;\n  this.pos = [val[len - 2], val[len - 1]];\n  if (\"SCQT\".indexOf(val[0]) != -1) {\n    this.reflection = [\n      2 * this.pos[0] - val[len - 4],\n      2 * this.pos[1] - val[len - 3]\n    ];\n  }\n  return val;\n}\nfunction toBezier(val) {\n  var _a;\n  var retVal = [val];\n  switch (val[0]) {\n    case \"M\":\n      this.pos = this.start = [val[1], val[2]];\n      return retVal;\n    case \"L\":\n      val[5] = val[3] = val[1];\n      val[6] = val[4] = val[2];\n      val[1] = this.pos[0];\n      val[2] = this.pos[1];\n      break;\n    case \"Q\":\n      val[6] = val[4];\n      val[5] = val[3];\n      val[4] = val[4] * 1 / 3 + val[2] * 2 / 3;\n      val[3] = val[3] * 1 / 3 + val[1] * 2 / 3;\n      val[2] = this.pos[1] * 1 / 3 + val[2] * 2 / 3;\n      val[1] = this.pos[0] * 1 / 3 + val[1] * 2 / 3;\n      break;\n    case \"A\":\n      retVal = arcToBezier((_a = this.pos) != null ? _a : [], val);\n      val = retVal[0];\n      break;\n  }\n  val[0] = \"C\";\n  this.pos = [val[5], val[6]];\n  this.reflection = [2 * val[5] - val[3], 2 * val[6] - val[4]];\n  return retVal;\n}\nfunction findNextM(arr, offset) {\n  if (offset === false) return false;\n  for (var i2 = offset, len = arr.length; i2 < len; ++i2) {\n    if (arr[i2][0] == \"M\") return i2;\n  }\n  return false;\n}\nfunction arcToBezier(pos, val) {\n  var rx = Math.abs(val[1]), ry = Math.abs(val[2]), xAxisRotation = val[3] % 360, largeArcFlag = val[4], sweepFlag = val[5], x = val[6], y = val[7], A = new Point(pos[0], pos[1]), B = new Point(x, y), primedCoord, lambda, mat, k, c2, cSquare, t2, O, OA, OB, tetaStart, tetaEnd, deltaTeta, nbSectors, f, arcSegPoints, angle, sinAngle, cosAngle, pt, i2, il, retVal = [], x1, y1, x2, y2;\n  if (rx === 0 || ry === 0 || A.x === B.x && A.y === B.y) {\n    return [[\"C\", A.x, A.y, B.x, B.y, B.x, B.y]];\n  }\n  primedCoord = new Point((A.x - B.x) / 2, (A.y - B.y) / 2).transform(\n    // Start with the identity matrix (no args → Matrix defaults a=d=1, others 0).\n    // Passing all-zero args here would produce a degenerate zero matrix, since\n    // `0 ?? 1` is `0`, not `1` — every subsequent transform then yields (0,0)\n    // and the arc-to-bezier conversion crashes on a NaN cascade.\n    /** @type {any} */\n    new Matrix().rotate(xAxisRotation)\n  );\n  lambda = primedCoord.x * primedCoord.x / (rx * rx) + primedCoord.y * primedCoord.y / (ry * ry);\n  if (lambda > 1) {\n    lambda = Math.sqrt(lambda);\n    rx = lambda * rx;\n    ry = lambda * ry;\n  }\n  mat = /** @type {any} */\n  new Matrix().rotate(xAxisRotation).scale(1 / rx, 1 / ry).rotate(-xAxisRotation);\n  A = A.transform(mat);\n  B = B.transform(mat);\n  k = [B.x - A.x, B.y - A.y];\n  cSquare = k[0] * k[0] + k[1] * k[1];\n  c2 = Math.sqrt(cSquare);\n  k[0] /= c2;\n  k[1] /= c2;\n  t2 = cSquare < 4 ? Math.sqrt(1 - cSquare / 4) : 0;\n  if (largeArcFlag === sweepFlag) {\n    t2 *= -1;\n  }\n  O = new Point((B.x + A.x) / 2 + t2 * -k[1], (B.y + A.y) / 2 + t2 * k[0]);\n  OA = new Point(A.x - O.x, A.y - O.y);\n  OB = new Point(B.x - O.x, B.y - O.y);\n  tetaStart = Math.acos(OA.x / Math.sqrt(OA.x * OA.x + OA.y * OA.y));\n  if (OA.y < 0) tetaStart *= -1;\n  tetaEnd = Math.acos(OB.x / Math.sqrt(OB.x * OB.x + OB.y * OB.y));\n  if (OB.y < 0) tetaEnd *= -1;\n  if (sweepFlag && tetaStart > tetaEnd) {\n    tetaEnd += 2 * Math.PI;\n  }\n  if (!sweepFlag && tetaStart < tetaEnd) {\n    tetaEnd -= 2 * Math.PI;\n  }\n  nbSectors = Math.ceil(Math.abs(tetaStart - tetaEnd) * 2 / Math.PI);\n  arcSegPoints = [];\n  angle = tetaStart;\n  deltaTeta = (tetaEnd - tetaStart) / nbSectors;\n  f = 4 * Math.tan(deltaTeta / 4) / 3;\n  for (i2 = 0; i2 <= nbSectors; i2++) {\n    cosAngle = Math.cos(angle);\n    sinAngle = Math.sin(angle);\n    pt = new Point(O.x + cosAngle, O.y + sinAngle);\n    arcSegPoints[i2] = [\n      new Point(pt.x + f * sinAngle, pt.y - f * cosAngle),\n      pt,\n      new Point(pt.x - f * sinAngle, pt.y + f * cosAngle)\n    ];\n    angle += deltaTeta;\n  }\n  arcSegPoints[0][0] = arcSegPoints[0][1].clone();\n  arcSegPoints[arcSegPoints.length - 1][2] = arcSegPoints[arcSegPoints.length - 1][1].clone();\n  mat = /** @type {any} */\n  new Matrix().rotate(xAxisRotation).scale(rx, ry).rotate(-xAxisRotation);\n  for (i2 = 0, il = arcSegPoints.length; i2 < il; i2++) {\n    arcSegPoints[i2][0] = arcSegPoints[i2][0].transform(mat);\n    arcSegPoints[i2][1] = arcSegPoints[i2][1].transform(mat);\n    arcSegPoints[i2][2] = arcSegPoints[i2][2].transform(mat);\n  }\n  for (i2 = 1, il = arcSegPoints.length; i2 < il; i2++) {\n    pt = arcSegPoints[i2 - 1][2];\n    x1 = pt.x;\n    y1 = pt.y;\n    pt = arcSegPoints[i2][0];\n    x2 = pt.x;\n    y2 = pt.y;\n    pt = arcSegPoints[i2][1];\n    x = pt.x;\n    y = pt.y;\n    retVal.push([\"C\", x1, y1, x2, y2, x, y]);\n  }\n  return retVal;\n}\nfunction handleBlock(startArr, startOffsetM, startOffsetNextM, destArr, destOffsetM, destOffsetNextM) {\n  var startArrTemp = startArr.slice(startOffsetM, startOffsetNextM || void 0);\n  var destArrTemp = destArr.slice(destOffsetM, destOffsetNextM || void 0);\n  var i2 = 0, posStart = { pos: [0, 0], start: [0, 0] }, posDest = { pos: [0, 0], start: [0, 0] };\n  while (true) {\n    startArrTemp[i2] = simplify.call(posStart, startArrTemp[i2]);\n    destArrTemp[i2] = simplify.call(posDest, destArrTemp[i2]);\n    if (startArrTemp[i2][0] != destArrTemp[i2][0] || startArrTemp[i2][0] == \"M\" || startArrTemp[i2][0] == \"A\" && (startArrTemp[i2][4] != destArrTemp[i2][4] || startArrTemp[i2][5] != destArrTemp[i2][5])) {\n      Array.prototype.splice.apply(\n        startArrTemp,\n        /** @type {[number, number, ...any[]]} */\n        [i2, 1].concat(\n          /** @type {any} */\n          toBezier.call(posStart, startArrTemp[i2])\n        )\n      );\n      Array.prototype.splice.apply(\n        destArrTemp,\n        /** @type {[number, number, ...any[]]} */\n        [i2, 1].concat(\n          /** @type {any} */\n          toBezier.call(posDest, destArrTemp[i2])\n        )\n      );\n    } else {\n      startArrTemp[i2] = /** @type {any} */\n      setPosAndReflection.call(\n        posStart,\n        startArrTemp[i2]\n      );\n      destArrTemp[i2] = /** @type {any} */\n      setPosAndReflection.call(\n        posDest,\n        destArrTemp[i2]\n      );\n    }\n    if (++i2 == startArrTemp.length && i2 == destArrTemp.length) break;\n    if (i2 == startArrTemp.length) {\n      startArrTemp.push([\n        \"C\",\n        posStart.pos[0],\n        posStart.pos[1],\n        posStart.pos[0],\n        posStart.pos[1],\n        posStart.pos[0],\n        posStart.pos[1]\n      ]);\n    }\n    if (i2 == destArrTemp.length) {\n      destArrTemp.push([\n        \"C\",\n        posDest.pos[0],\n        posDest.pos[1],\n        posDest.pos[0],\n        posDest.pos[1],\n        posDest.pos[0],\n        posDest.pos[1]\n      ]);\n    }\n  }\n  return { start: startArrTemp, dest: destArrTemp };\n}\nfunction synchronizePaths(fromD, toD) {\n  var startArr = parsePath(fromD);\n  var destArr = parsePath(toD);\n  var startOffsetM = 0;\n  var destOffsetM = 0;\n  var startOffsetNextM = false;\n  var destOffsetNextM = false;\n  var result;\n  while (true) {\n    if (startOffsetM === false && destOffsetM === false) break;\n    startOffsetNextM = findNextM(\n      startArr,\n      startOffsetM === false ? false : startOffsetM + 1\n    );\n    destOffsetNextM = findNextM(\n      destArr,\n      destOffsetM === false ? false : destOffsetM + 1\n    );\n    if (startOffsetM === false) {\n      const bbox = pathBbox(\n        /** @type {any} */\n        result.start\n      );\n      if (bbox.height == 0 || bbox.width == 0) {\n        startOffsetM = startArr.push(startArr[0]) - 1;\n      } else {\n        startOffsetM = startArr.push([\n          \"M\",\n          bbox.x + bbox.width / 2,\n          bbox.y + bbox.height / 2\n        ]) - 1;\n      }\n    }\n    if (destOffsetM === false) {\n      const bbox = pathBbox(\n        /** @type {any} */\n        result.dest\n      );\n      if (bbox.height == 0 || bbox.width == 0) {\n        destOffsetM = destArr.push(destArr[0]) - 1;\n      } else {\n        destOffsetM = destArr.push([\n          \"M\",\n          bbox.x + bbox.width / 2,\n          bbox.y + bbox.height / 2\n        ]) - 1;\n      }\n    }\n    result = handleBlock(\n      startArr,\n      startOffsetM,\n      startOffsetNextM,\n      destArr,\n      destOffsetM,\n      destOffsetNextM\n    );\n    startArr = startArr.slice(0, startOffsetM).concat(\n      result.start,\n      startOffsetNextM === false ? [] : startArr.slice(startOffsetNextM)\n    );\n    destArr = destArr.slice(0, destOffsetM).concat(\n      result.dest,\n      destOffsetNextM === false ? [] : destArr.slice(destOffsetNextM)\n    );\n    startOffsetM = startOffsetNextM === false ? false : startOffsetM + result.start.length;\n    destOffsetM = destOffsetNextM === false ? false : destOffsetM + result.dest.length;\n  }\n  return { start: startArr, dest: destArr };\n}\nfunction morphPaths(fromD, toD) {\n  var synced = synchronizePaths(fromD, toD);\n  var startArr = synced.start;\n  var destArr = synced.dest;\n  return function(pos) {\n    var result = startArr.map(function(from, idx) {\n      return destArr[idx].map(function(to, toIdx) {\n        if (toIdx === 0) return to;\n        return from[toIdx] + (destArr[idx][toIdx] - from[toIdx]) * pos;\n      });\n    });\n    return arrayToPath(result);\n  };\n}\nlet _measureSvg = null;\nlet _measurePath = null;\nfunction samplePathPoints(d, n2) {\n  const pts = new Array(n2);\n  if (!Environment.isBrowser()) {\n    const arr = parsePath(d);\n    const bbox = pathBbox(arr);\n    const cx = bbox.x + bbox.width / 2;\n    const cy = bbox.y + bbox.height / 2;\n    for (let i2 = 0; i2 < n2; i2++) pts[i2] = { x: cx, y: cy };\n    return pts;\n  }\n  if (!_measureSvg) {\n    _measureSvg = /** @type {SVGSVGElement} */\n    document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n    _measureSvg.setAttribute(\"width\", \"0\");\n    _measureSvg.setAttribute(\"height\", \"0\");\n    _measureSvg.setAttribute(\n      \"style\",\n      \"position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;\"\n    );\n    _measurePath = /** @type {SVGPathElement} */\n    document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n    _measureSvg.appendChild(_measurePath);\n    document.body.appendChild(_measureSvg);\n  }\n  _measurePath.setAttribute(\"d\", d || \"M0 0\");\n  let len = 0;\n  try {\n    len = _measurePath.getTotalLength();\n  } catch (e2) {\n    len = 0;\n  }\n  if (!len || !isFinite(len)) {\n    const arr = parsePath(d);\n    const bbox = pathBbox(arr);\n    const cx = bbox.x + bbox.width / 2;\n    const cy = bbox.y + bbox.height / 2;\n    for (let i2 = 0; i2 < n2; i2++) pts[i2] = { x: cx, y: cy };\n    return pts;\n  }\n  for (let i2 = 0; i2 < n2; i2++) {\n    try {\n      const p2 = _measurePath.getPointAtLength(i2 / n2 * len);\n      pts[i2] = { x: p2.x, y: p2.y };\n    } catch (e2) {\n      pts[i2] = { x: 0, y: 0 };\n    }\n  }\n  return pts;\n}\nfunction morphPolygons(fromD, toD, n2 = 96) {\n  const fromPts = samplePathPoints(fromD, n2);\n  const toPts = samplePathPoints(toD, n2);\n  let bestOffset = 0;\n  let bestDist = Infinity;\n  for (let off = 0; off < n2; off++) {\n    let dist = 0;\n    for (let i2 = 0; i2 < n2; i2++) {\n      const a2 = fromPts[(i2 + off) % n2];\n      const b2 = toPts[i2];\n      const dx = a2.x - b2.x;\n      const dy = a2.y - b2.y;\n      dist += dx * dx + dy * dy;\n      if (dist >= bestDist) break;\n    }\n    if (dist < bestDist) {\n      bestDist = dist;\n      bestOffset = off;\n    }\n  }\n  const aligned = new Array(n2);\n  for (let i2 = 0; i2 < n2; i2++) {\n    aligned[i2] = fromPts[(i2 + bestOffset) % n2];\n  }\n  return function(pos) {\n    let out = \"\";\n    for (let i2 = 0; i2 < n2; i2++) {\n      const a2 = aligned[i2];\n      const b2 = toPts[i2];\n      const x = a2.x + (b2.x - a2.x) * pos;\n      const y = a2.y + (b2.y - a2.y) * pos;\n      out += (i2 === 0 ? \"M\" : \"L\") + x.toFixed(3) + \" \" + y.toFixed(3) + \" \";\n    }\n    return out + \"Z\";\n  };\n}\nfunction easeInOut(t2) {\n  return -Math.cos(t2 * Math.PI) / 2 + 0.5;\n}\nlet _defaultEasing = easeInOut;\nfunction setDefaultEasing(fn) {\n  _defaultEasing = typeof fn === \"function\" ? fn : easeInOut;\n}\nfunction parseColor$1(str) {\n  if (!str || typeof str !== \"string\") return null;\n  if (str[0] === \"#\") {\n    let hex = str.slice(1);\n    if (hex.length === 3)\n      hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n    const n2 = parseInt(hex, 16);\n    return [n2 >> 16 & 255, n2 >> 8 & 255, n2 & 255, 1];\n  }\n  const m2 = str.match(\n    /rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+))?\\s*\\)/\n  );\n  if (m2) return [+m2[1], +m2[2], +m2[3], m2[4] !== void 0 ? +m2[4] : 1];\n  return null;\n}\nfunction interpolateColor(from, to, pos) {\n  return `rgba(${Math.round(from[0] + (to[0] - from[0]) * pos)},${Math.round(from[1] + (to[1] - from[1]) * pos)},${Math.round(from[2] + (to[2] - from[2]) * pos)},${from[3] + (to[3] - from[3]) * pos})`;\n}\nclass SVGAnimationRunner {\n  /**\n   * @param {any} element\n   * @param {number} duration\n   * @param {number} delay\n   */\n  constructor(element, duration, delay) {\n    this.el = element;\n    this.duration = duration != null ? duration : 300;\n    this.delay = delay || 0;\n    this._attrTarget = null;\n    this._plotTarget = null;\n    this._plotSnap = null;\n    this._plotAlgorithm = \"commands\";\n    this._afterCb = null;\n    this._duringCb = null;\n    this._easing = null;\n    this._next = null;\n    this._root = null;\n    this._scheduled = false;\n  }\n  /**\n   * Override the easing for this runner (else the module default is used).\n   * @param {(t:number)=>number} fn\n   */\n  ease(fn) {\n    if (typeof fn === \"function\") this._easing = fn;\n    this._schedule();\n    return this;\n  }\n  /**\n   * @param {Record<string, any>} to\n   */\n  attr(to) {\n    this._attrTarget = to;\n    this._schedule();\n    return this;\n  }\n  /**\n   * @param {string} d\n   * @param {'commands' | 'polygons'} [algorithm] - morph engine to use for\n   *   the d→d interpolation. 'commands' (default) is the legacy\n   *   per-command lerp; 'polygons' resamples both paths into N evenly\n   *   spaced points and tweens point-by-point (smoother for shapes with\n   *   very different anchor-point counts).\n   * @param {string} [snapTo] - final d to land on when it differs from the\n   *   interpolation target. Used by reconciled length-change morphs: the\n   *   tween runs against a padded path (extra anchors lying exactly on the\n   *   final geometry) but the element must end with the renderer's clean,\n   *   un-padded d so later captures and morphs stay stable.\n   */\n  plot(d, algorithm, snapTo) {\n    this._plotTarget = d;\n    if (algorithm) this._plotAlgorithm = algorithm;\n    this._plotSnap = snapTo || null;\n    this._schedule();\n    return this;\n  }\n  /**\n   * @param {Function} fn\n   */\n  after(fn) {\n    this._afterCb = fn;\n    this._schedule();\n    return this;\n  }\n  /**\n   * @param {Function} fn\n   */\n  during(fn) {\n    this._duringCb = fn;\n    this._schedule();\n    return this;\n  }\n  /**\n   * @param {number} duration\n   * @param {number} delay\n   */\n  animate(duration, delay) {\n    const next = new SVGAnimationRunner(this.el, duration, delay);\n    this._next = next;\n    next._root = this._root || this;\n    return next;\n  }\n  _schedule() {\n    const root = this._root || this;\n    if (!root._scheduled) {\n      root._scheduled = true;\n      queueMicrotask(() => root._executeChain());\n    }\n  }\n  _executeChain() {\n    const chain = [];\n    let r2 = this;\n    while (r2) {\n      chain.push(r2);\n      r2 = r2._next;\n    }\n    let cumulativeDelay = 0;\n    chain.forEach((runner) => {\n      cumulativeDelay += runner.delay;\n      runner._execute(cumulativeDelay);\n      cumulativeDelay += runner.duration;\n    });\n  }\n  /**\n   * @param {number} startDelay\n   */\n  _execute(startDelay) {\n    const el = this.el;\n    const duration = this.duration;\n    if (duration <= 1) {\n      const apply = () => {\n        if (this._attrTarget) el.attr(this._attrTarget);\n        if (this._plotTarget) el.plot(this._plotSnap || this._plotTarget);\n        if (this._afterCb) this._afterCb.call(el);\n      };\n      if (startDelay > 0) {\n        setTimeout(apply, startDelay);\n      } else {\n        apply();\n      }\n      return;\n    }\n    const run = () => {\n      const fromAttrs = (\n        /** @type {Record<string, any>} */\n        {}\n      );\n      const fromColors = (\n        /** @type {Record<string, any>} */\n        {}\n      );\n      const toColors = (\n        /** @type {Record<string, any>} */\n        {}\n      );\n      if (this._attrTarget) {\n        for (const key of Object.keys(this._attrTarget)) {\n          const fromVal = el.attr(key);\n          fromAttrs[key] = fromVal;\n          const fc = parseColor$1(fromVal);\n          const tc = parseColor$1(String(this._attrTarget[key]));\n          if (fc && tc) {\n            fromColors[key] = fc;\n            toColors[key] = tc;\n          }\n        }\n      }\n      let morphFn = null;\n      if (this._plotTarget) {\n        const fromPath = el.attr(\"d\") || \"\";\n        try {\n          morphFn = this._plotAlgorithm === \"polygons\" ? morphPolygons(fromPath, this._plotTarget) : morphPaths(fromPath, this._plotTarget);\n        } catch (e2) {\n          morphFn = null;\n        }\n      }\n      const start = performance.now();\n      const easing = this._easing || _defaultEasing;\n      const tick = (now) => {\n        const elapsed = now - start;\n        const rawPos = Math.min(elapsed / duration, 1);\n        const pos = easing(rawPos);\n        if (this._attrTarget) {\n          if (rawPos >= 1) {\n            el.attr(this._attrTarget);\n          } else {\n            const current = (\n              /** @type {Record<string, any>} */\n              {}\n            );\n            for (const key of Object.keys(this._attrTarget)) {\n              if (fromColors[key] && toColors[key]) {\n                current[key] = interpolateColor(\n                  fromColors[key],\n                  toColors[key],\n                  pos\n                );\n              } else {\n                const from = parseFloat(fromAttrs[key]);\n                const to = parseFloat(this._attrTarget[key]);\n                if (!isNaN(from) && !isNaN(to)) {\n                  current[key] = from + (to - from) * pos;\n                }\n              }\n            }\n            el.attr(current);\n          }\n        }\n        if (morphFn && rawPos < 1) {\n          el.attr(\n            \"d\",\n            /** @type {any} */\n            morphFn(pos)\n          );\n        }\n        if (this._duringCb) this._duringCb(pos);\n        if (rawPos < 1) {\n          BrowserAPIs.requestAnimationFrame(tick);\n        } else {\n          if (this._plotTarget) {\n            el.attr(\"d\", this._plotSnap || this._plotTarget);\n          }\n          if (this._afterCb) this._afterCb.call(el);\n        }\n      };\n      BrowserAPIs.requestAnimationFrame(tick);\n    };\n    if (startDelay > 0) {\n      setTimeout(run, startDelay);\n    } else {\n      run();\n    }\n  }\n}\nfunction installAnimationMethods(ElementClass) {\n  ElementClass.prototype.animate = function(duration, delay) {\n    return new SVGAnimationRunner(this, duration, delay);\n  };\n}\nfunction easeInOutSine(t2) {\n  return -Math.cos(t2 * Math.PI) / 2 + 0.5;\n}\nfunction cubicBezier(x1, y1, x2, y2) {\n  x1 = Math.min(Math.max(x1, 0), 1);\n  x2 = Math.min(Math.max(x2, 0), 1);\n  const cx = 3 * x1;\n  const bx = 3 * (x2 - x1) - cx;\n  const ax = 1 - cx - bx;\n  const cy = 3 * y1;\n  const by = 3 * (y2 - y1) - cy;\n  const ay = 1 - cy - by;\n  const sampleX = (t2) => ((ax * t2 + bx) * t2 + cx) * t2;\n  const sampleY = (t2) => ((ay * t2 + by) * t2 + cy) * t2;\n  const solveT = (x) => {\n    let lo = 0;\n    let hi = 1;\n    let t2 = x;\n    if (t2 < lo) return lo;\n    if (t2 > hi) return hi;\n    while (lo < hi) {\n      const xt = sampleX(t2);\n      if (Math.abs(xt - x) < 1e-4) return t2;\n      if (x > xt) lo = t2;\n      else hi = t2;\n      t2 = (lo + hi) / 2;\n    }\n    return t2;\n  };\n  return (t2) => t2 <= 0 ? 0 : t2 >= 1 ? 1 : sampleY(solveT(t2));\n}\nconst REGISTRY = /* @__PURE__ */ new Map();\nconst linear = (t2) => t2;\nREGISTRY.set(\"linear\", linear);\nREGISTRY.set(\"easeInOutSine\", easeInOutSine);\nREGISTRY.set(\"easeInSine\", (t2) => 1 - Math.cos(t2 * Math.PI / 2));\nREGISTRY.set(\"easeOutSine\", (t2) => Math.sin(t2 * Math.PI / 2));\nREGISTRY.set(\"easeInQuad\", (t2) => t2 * t2);\nREGISTRY.set(\"easeOutQuad\", (t2) => 1 - (1 - t2) * (1 - t2));\nREGISTRY.set(\n  \"easeInOutQuad\",\n  (t2) => t2 < 0.5 ? 2 * t2 * t2 : 1 - Math.pow(-2 * t2 + 2, 2) / 2\n);\nREGISTRY.set(\"easeInCubic\", (t2) => t2 * t2 * t2);\nREGISTRY.set(\"easeOutCubic\", (t2) => 1 - Math.pow(1 - t2, 3));\nREGISTRY.set(\n  \"easeInOutCubic\",\n  (t2) => t2 < 0.5 ? 4 * t2 * t2 * t2 : 1 - Math.pow(-2 * t2 + 2, 3) / 2\n);\nREGISTRY.set(\"easeOutBack\", (t2) => {\n  const c1 = 1.70158;\n  const c3 = c1 + 1;\n  return 1 + c3 * Math.pow(t2 - 1, 3) + c1 * Math.pow(t2 - 1, 2);\n});\nREGISTRY.set(\"easeInOutBack\", (t2) => {\n  const c1 = 1.70158;\n  const c2 = c1 * 1.525;\n  return t2 < 0.5 ? Math.pow(2 * t2, 2) * ((c2 + 1) * 2 * t2 - c2) / 2 : (Math.pow(2 * t2 - 2, 2) * ((c2 + 1) * (t2 * 2 - 2) + c2) + 2) / 2;\n});\nfunction registerEasing(name2, fn) {\n  if (typeof name2 === \"string\" && name2 && typeof fn === \"function\") {\n    REGISTRY.set(name2, fn);\n  }\n}\nfunction isBezierArray(v2) {\n  return Array.isArray(v2) && v2.length === 4 && v2.every((n2) => typeof n2 === \"number\");\n}\nfunction resolveEasing(value) {\n  if (typeof value === \"function\") return guardEasing(value);\n  if (isBezierArray(value))\n    return cubicBezier(value[0], value[1], value[2], value[3]);\n  if (typeof value === \"string\" && REGISTRY.has(value)) {\n    return guardEasing(\n      /** @type {(t:number)=>number} */\n      REGISTRY.get(value)\n    );\n  }\n  return easeInOutSine;\n}\nfunction guardEasing(fn) {\n  return (t2) => {\n    const y = fn(t2);\n    return typeof y === \"number\" && isFinite(y) ? y : t2;\n  };\n}\nconst SVGNS$1 = \"http://www.w3.org/2000/svg\";\nfunction easeOutCubic$1(t2) {\n  return 1 - Math.pow(1 - t2, 3);\n}\nfunction easeOutBack$1(t2) {\n  const c1 = 1.70158;\n  const c3 = c1 + 1;\n  return 1 + c3 * Math.pow(t2 - 1, 3) + c1 * Math.pow(t2 - 1, 2);\n}\nlet _reducedMotionMql = null;\nfunction prefersReducedMotion() {\n  if (!Environment.isBrowser()) return false;\n  try {\n    if (!_reducedMotionMql) {\n      _reducedMotionMql = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n    }\n    return !!_reducedMotionMql.matches;\n  } catch (_) {\n    return false;\n  }\n}\nfunction applyProgressiveReveal(el, x, w2) {\n  if (!Environment.isBrowser()) return false;\n  if (w2.globals.dataChanged || w2.globals.resized) return false;\n  const animCfg = w2.config.chart.animations;\n  if (!animCfg || animCfg.enabled === false) return false;\n  const chartType = w2.config.chart.type;\n  if (chartType !== \"line\" && chartType !== \"area\" && chartType !== \"rangeArea\") {\n    return false;\n  }\n  if (!(w2.layout.gridWidth > 0)) return false;\n  const drawSpeed = (animCfg.speed || 800) * 2;\n  const xRatio = Math.max(0, Math.min(1, x / w2.layout.gridWidth));\n  const easedT = 1 - Math.cbrt(1 - xRatio);\n  const revealDelay = easedT * drawSpeed;\n  const node = el.node;\n  const style = node.style;\n  style.opacity = \"0\";\n  let startAnchor = null;\n  const tick = (now) => {\n    if (startAnchor === null) startAnchor = now;\n    if (now - startAnchor >= revealDelay) {\n      style.opacity = \"\";\n    } else {\n      BrowserAPIs.requestAnimationFrame(tick);\n    }\n  };\n  BrowserAPIs.requestAnimationFrame(tick);\n  return true;\n}\nfunction applyAnimationPolicy(w2) {\n  const anim = w2.config.chart.animations;\n  if (!anim) return;\n  if (anim.respectReducedMotion !== false && prefersReducedMotion()) {\n    anim.enabled = false;\n    if (anim.dynamicAnimation) anim.dynamicAnimation.enabled = false;\n  }\n  setDefaultEasing(resolveEasing(anim.easing));\n}\nfunction computeStagger(opts) {\n  const style = opts.style;\n  const index = opts.index || 0;\n  const baseDelay = typeof opts.baseDelay === \"number\" ? opts.baseDelay : 40;\n  const row = opts.row || 0;\n  const col = opts.col || 0;\n  const groupIndex = opts.groupIndex || 0;\n  const perGroup = opts.perGroup || 1;\n  const centerDistance = opts.centerDistance || 0;\n  switch (style) {\n    case \"none\":\n      return 0;\n    case \"diagonal\":\n      return (row + col) * baseDelay;\n    case \"group\":\n      return groupIndex * baseDelay + index % perGroup * (baseDelay / 4);\n    case \"centroid\":\n      return centerDistance * baseDelay * (index + 1);\n    case \"sequential\":\n    default:\n      return index * baseDelay;\n  }\n}\nclass Animations {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} [ctx]\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n  }\n  /**\n   * @param {any} el\n   * @param {Record<string, any>} from\n   * @param {Record<string, any>} to\n   * @param {object} speed\n   */\n  animateLine(el, from, to, speed) {\n    el.attr(from).animate(speed).attr(to);\n  }\n  /*\n   ** Animate radius of a circle element\n   * @param {any} el\n   * @param {number} speed\n   * @param {string} easing\n   * @param {Function} cb\n   */\n  /** @param {any} el @param {any} speed @param {any} easing @param {any} cb */\n  animateMarker(el, speed, easing, cb) {\n    el.attr({\n      opacity: 0\n    }).animate(speed).attr({\n      opacity: 1\n    }).after(() => {\n      cb();\n    });\n  }\n  /**\n   * Scale-up \"pop\" effect for scatter/bubble markers. Animates\n   * `transform: scale(0 → 1)` (with `easeOutBack` overshoot) plus opacity,\n   * around the marker's own center via `transform-box: fill-box`.\n   *\n   * Falls back to instant render in SSR / when shouldAnimate is false.\n   *\n   * @param {any} el\n   * @param {{ speed: number, delay?: number, onComplete?: () => void }} params\n   */\n  animatePop(el, { speed, delay = 0, onComplete }) {\n    const w2 = this.w;\n    if (!Environment.isBrowser() || !w2.globals.shouldAnimate || speed < 1) {\n      if (onComplete) onComplete();\n      return;\n    }\n    const node = el.node;\n    const style = node.style;\n    style.transformBox = \"fill-box\";\n    style.transformOrigin = \"center\";\n    style.transform = \"scale(0)\";\n    style.opacity = \"0\";\n    const startAt = performance.now() + delay;\n    const step = (now) => {\n      if (w2.globals.isDestroyed) return;\n      const t2 = Math.max(0, Math.min(1, (now - startAt) / speed));\n      style.transform = `scale(${easeOutBack$1(t2)})`;\n      style.opacity = String(Math.min(1, t2 * 2));\n      if (t2 < 1) {\n        BrowserAPIs.requestAnimationFrame(step);\n      } else {\n        style.transform = \"\";\n        style.transformOrigin = \"\";\n        style.transformBox = \"\";\n        style.opacity = \"\";\n        if (onComplete) onComplete();\n      }\n    };\n    BrowserAPIs.requestAnimationFrame(step);\n  }\n  /*\n   ** Animate rect properties\n   * @param {any} el\n   * @param {any} from\n   * @param {any} to\n   * @param {number} speed\n   * @param {Function} fn\n   */\n  /** @param {any} el @param {any} from @param {any} to @param {any} speed @param {any} fn @param {number} [delay] */\n  animateRect(el, from, to, speed, fn, delay = 0) {\n    el.attr(from).animate(speed, delay).attr(to).after(() => fn());\n  }\n  /**\n   * @param {Record<string, any>} params\n   */\n  animatePathsGradually(params) {\n    const {\n      el,\n      realIndex,\n      j,\n      fill,\n      pathFrom,\n      pathTo,\n      pathToInterp,\n      speed,\n      delay,\n      scrollMorph\n    } = params;\n    const me = this;\n    const w2 = this.w;\n    let delayFactor = 0;\n    if (w2.config.chart.animations.animateGradually.enabled) {\n      delayFactor = w2.config.chart.animations.animateGradually.delay;\n    }\n    if (w2.config.chart.animations.dynamicAnimation.enabled && w2.globals.dataChanged && w2.config.chart.type !== \"bar\") {\n      delayFactor = 0;\n    }\n    me.morphSVG(\n      el,\n      realIndex,\n      j,\n      w2.config.chart.type === \"line\" && !w2.globals.comboCharts ? \"stroke\" : fill,\n      pathFrom,\n      pathTo,\n      speed,\n      delay * delayFactor,\n      scrollMorph,\n      pathToInterp\n    );\n  }\n  /**\n   * Opacity-fade reveal (see Graphics.renderPaths `revealViaFade`): hide this\n   * path immediately, then reveal the whole series in a single CSS opacity fade\n   * once the synchronous draw pass has finished. Used for two cases that both\n   * want to avoid per-path morphs: the large-dataset bulk render (>\n   * largeDatasetThreshold) and candlestick/boxPlot data-change updates (where an\n   * index-based morph would slide candles around on zoom). Every faded path is\n   * pushed to delayedElements, but only the first one schedules the reveal — a\n   * lone requestAnimationFrame fires after all paths are in the DOM, so N paths\n   * cost one frame callback instead of N morph timelines. The guard flag is\n   * reset inside the callback (and in initGlobalVars) so subsequent renders\n   * re-arm it.\n   * @param {any} el\n   */\n  revealBulk(el) {\n    const w2 = this.w;\n    el.node.classList.add(\"apexcharts-element-hidden\");\n    w2.globals.delayedElements.push({ el: el.node });\n    if (!Environment.isBrowser() || !w2.globals.shouldAnimate) {\n      this.animationCompleted(el);\n      return;\n    }\n    if (!w2.globals.bulkRevealScheduled) {\n      w2.globals.bulkRevealScheduled = true;\n      BrowserAPIs.requestAnimationFrame(() => {\n        if (w2.globals.isDestroyed) return;\n        w2.globals.bulkRevealScheduled = false;\n        this.animationCompleted(el);\n      });\n    }\n  }\n  showDelayedElements() {\n    this.w.globals.delayedElements.forEach((d) => {\n      if (d.holdUntilComplete && !this.w.globals.animationEnded) return;\n      const ele = d.el;\n      ele.classList.remove(\"apexcharts-element-hidden\");\n      ele.classList.add(\"apexcharts-hidden-element-shown\");\n    });\n  }\n  /**\n   * @param {any} el\n   */\n  animationCompleted(el) {\n    const w2 = this.w;\n    if (w2.globals.animationEnded) return;\n    w2.globals.animationEnded = true;\n    this.showDelayedElements();\n    if (typeof w2.config.chart.events.animationEnd === \"function\") {\n      w2.config.chart.events.animationEnd(this.ctx, { el, w: w2 });\n    }\n  }\n  /**\n   * Initial-mount \"pen-stroke\" draw effect for line / area / rangeArea paths.\n   *\n   * Stroke paths animate `stroke-dashoffset` from total length → 0.\n   * Fill paths animate the width of a per-series SVG `<mask>` rect from 0 → gridWidth,\n   * which coexists with the existing `clip-path: gridRectMask` (mask + clip-path\n   * are independent SVG attributes).\n   *\n   * For radar / radial shapes, pass `mask: { type: 'radial', cx, cy, r }` to\n   * use a circular mask that blooms from center outward instead of the default\n   * left-to-right rect wipe.\n   *\n   * @param {any} el            - SVG.js path element\n   * @param {{realIndex: number, j?: number, isFill: boolean, isLast: boolean, speed: number, delay: number, mask?: {type: 'rect'|'radial', cx?: number, cy?: number, r?: number}}} params\n   */\n  animateDraw(el, { realIndex, j, isFill, isLast, speed, delay, mask: maskShape }) {\n    const w2 = this.w;\n    const me = this;\n    const finalize = () => {\n      if (isLast && w2.globals.shouldAnimate) {\n        me.animationCompleted(el);\n      }\n      me.showDelayedElements();\n    };\n    if (!Environment.isBrowser() || !w2.globals.shouldAnimate || speed < 1) {\n      finalize();\n      return;\n    }\n    const node = el.node;\n    const runMaskReveal = () => {\n      const pad = 4;\n      const isRadial = maskShape && maskShape.type === \"radial\";\n      const targetWidth = w2.layout.gridWidth + pad * 2;\n      const radialCx = maskShape && maskShape.cx || 0;\n      const radialCy = maskShape && maskShape.cy || 0;\n      const targetRadius = (maskShape && maskShape.r || w2.layout.gridWidth / 2) + pad;\n      const maskId = `apexDrawMask${w2.globals.cuid}-${realIndex}-${j != null ? j : 0}-${isFill ? \"f\" : \"s\"}`;\n      const mask = BrowserAPIs.createElementNS(SVGNS$1, \"mask\");\n      mask.setAttribute(\"id\", maskId);\n      mask.setAttribute(\"maskUnits\", \"userSpaceOnUse\");\n      let revealEl;\n      if (isRadial) {\n        const region = targetRadius;\n        mask.setAttribute(\"x\", String(radialCx - region));\n        mask.setAttribute(\"y\", String(radialCy - region));\n        mask.setAttribute(\"width\", String(region * 2));\n        mask.setAttribute(\"height\", String(region * 2));\n        revealEl = BrowserAPIs.createElementNS(SVGNS$1, \"circle\");\n        revealEl.setAttribute(\"cx\", String(radialCx));\n        revealEl.setAttribute(\"cy\", String(radialCy));\n        revealEl.setAttribute(\"r\", \"0\");\n        revealEl.setAttribute(\"fill\", \"#fff\");\n      } else {\n        mask.setAttribute(\"x\", String(-pad));\n        mask.setAttribute(\"y\", String(-pad));\n        mask.setAttribute(\"width\", String(targetWidth));\n        mask.setAttribute(\"height\", String(w2.layout.gridHeight + pad * 2));\n        revealEl = BrowserAPIs.createElementNS(SVGNS$1, \"rect\");\n        revealEl.setAttribute(\"x\", String(-pad));\n        revealEl.setAttribute(\"y\", String(-pad));\n        revealEl.setAttribute(\"width\", \"0\");\n        revealEl.setAttribute(\"height\", String(w2.layout.gridHeight + pad * 2));\n        revealEl.setAttribute(\"fill\", \"#fff\");\n      }\n      mask.appendChild(revealEl);\n      w2.dom.elDefs.node.appendChild(mask);\n      node.setAttribute(\"mask\", `url(#${maskId})`);\n      const startAt = performance.now() + (delay || 0);\n      const step = (now) => {\n        if (w2.globals.isDestroyed) return;\n        const t2 = Math.max(0, Math.min(1, (now - startAt) / speed));\n        const eased = easeOutCubic$1(t2);\n        if (isRadial) {\n          revealEl.setAttribute(\"r\", String(eased * targetRadius));\n        } else {\n          revealEl.setAttribute(\"width\", String(eased * targetWidth));\n        }\n        if (t2 < 1) {\n          BrowserAPIs.requestAnimationFrame(step);\n        } else {\n          node.removeAttribute(\"mask\");\n          if (mask.parentNode) mask.parentNode.removeChild(mask);\n          finalize();\n        }\n      };\n      BrowserAPIs.requestAnimationFrame(step);\n    };\n    const runStrokeDraw = (len) => {\n      node.setAttribute(\"stroke-dasharray\", String(len));\n      node.setAttribute(\"stroke-dashoffset\", String(len));\n      const startAt = performance.now() + (delay || 0);\n      const step = (now) => {\n        if (w2.globals.isDestroyed) return;\n        const t2 = Math.max(0, Math.min(1, (now - startAt) / speed));\n        node.setAttribute(\"stroke-dashoffset\", String(len * (1 - easeOutCubic$1(t2))));\n        if (t2 < 1) {\n          BrowserAPIs.requestAnimationFrame(step);\n        } else {\n          node.removeAttribute(\"stroke-dasharray\");\n          node.removeAttribute(\"stroke-dashoffset\");\n          finalize();\n        }\n      };\n      BrowserAPIs.requestAnimationFrame(step);\n    };\n    BrowserAPIs.requestAnimationFrame(() => {\n      if (w2.globals.isDestroyed) return;\n      if (isFill) {\n        runMaskReveal();\n        return;\n      }\n      const existingDash = node.getAttribute(\"stroke-dasharray\");\n      const hasCustomDash = !!existingDash && existingDash !== \"0\" && existingDash !== \"\";\n      if (hasCustomDash) {\n        runMaskReveal();\n        return;\n      }\n      let len = 0;\n      try {\n        if (typeof node.getTotalLength === \"function\") {\n          len = node.getTotalLength();\n        }\n      } catch (_) {\n        len = 0;\n      }\n      if (!len) {\n        finalize();\n        return;\n      }\n      runStrokeDraw(len);\n    });\n  }\n  // SVG.js animation for morphing one path to another\n  /**\n   * @param {any} el\n   * @param {number} realIndex\n   * @param {number} j\n   * @param {string} fill\n   * @param {string} pathFrom\n   * @param {string} pathTo\n   * @param {number} speed\n   * @param {number} delay\n   * @param {boolean} [scrollMorph] - this morph is a streaming scroll (StreamScroll)\n   * @param {string} [pathToInterp] - interpolation target that differs from the\n   *   final path. Reconciled length-change morphs tween toward a padded copy of\n   *   pathTo (extra anchors sitting exactly on the final geometry) and snap to\n   *   the clean pathTo at the end.\n   */\n  morphSVG(el, realIndex, j, fill, pathFrom, pathTo, speed, delay, scrollMorph, pathToInterp) {\n    var _a, _b;\n    const w2 = this.w;\n    if (!pathFrom) {\n      pathFrom = el.attr(\"pathFrom\");\n    }\n    if (!pathTo) {\n      pathTo = el.attr(\"pathTo\");\n    }\n    const disableAnimationForCorrupPath = () => {\n      if (w2.config.chart.type === \"radar\") {\n        speed = 1;\n      }\n      return `M 0 ${w2.layout.gridHeight}`;\n    };\n    if (!pathFrom || pathFrom.indexOf(\"undefined\") > -1 || pathFrom.indexOf(\"NaN\") > -1) {\n      pathFrom = disableAnimationForCorrupPath();\n    }\n    if (!pathTo.trim() || pathTo.indexOf(\"undefined\") > -1 || pathTo.indexOf(\"NaN\") > -1) {\n      pathTo = disableAnimationForCorrupPath();\n      pathToInterp = void 0;\n    }\n    if (pathToInterp && (!pathToInterp.trim() || pathToInterp.indexOf(\"undefined\") > -1 || pathToInterp.indexOf(\"NaN\") > -1)) {\n      pathToInterp = void 0;\n    }\n    if (!w2.globals.shouldAnimate) {\n      speed = 1;\n    }\n    const crossTypeMorph = ((_b = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange) == null ? void 0 : _b.isActive()) === true;\n    const morphAlgo = crossTypeMorph ? \"polygons\" : \"commands\";\n    let morphEase = null;\n    if (w2.globals.dataChanged) {\n      const dynEasing = w2.config.chart.animations.dynamicAnimation.easing;\n      if (dynEasing != null) {\n        morphEase = resolveEasing(dynEasing);\n      } else if (scrollMorph) {\n        morphEase = resolveEasing(\"linear\");\n      }\n    }\n    const runner = el.plot(pathFrom).animate(1, delay).plot(pathFrom).animate(speed, delay);\n    if (morphEase) {\n      runner.ease(morphEase);\n    }\n    runner.plot(\n      pathToInterp || pathTo,\n      morphAlgo,\n      pathToInterp ? pathTo : void 0\n    ).after(() => {\n      if (Utils$1.isNumber(j)) {\n        const maxSeries = w2.seriesData.series[w2.globals.maxValsInArrayIndex];\n        if (maxSeries && j === maxSeries.length - 2 && w2.globals.shouldAnimate) {\n          this.animationCompleted(el);\n        }\n      } else if (fill !== \"none\" && w2.globals.shouldAnimate) {\n        if (!w2.globals.comboCharts && realIndex === w2.seriesData.series.length - 1 || w2.globals.comboCharts) {\n          this.animationCompleted(el);\n        }\n      }\n      this.showDelayedElements();\n    });\n  }\n}\nconst DEFAULT_INTENSITY = { lighten: 0.15, darken: 0.35 };\nclass Filters {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n  }\n  /**\n   * The three chart types drawn by the Pie module.\n   * @param {any} w\n   */\n  static isSliceChart(w2) {\n    const type = w2.config.chart.type;\n    return type === \"pie\" || type === \"donut\" || type === \"polarArea\";\n  }\n  /**\n   * True when a pie / donut slice carries the hover state itself, as the\n   * outline band traced outside its rim. The band IS the hover feedback, so\n   * the states.hover lighten filter must not also recolour the slice: the\n   * point of the band is that a hovered slice keeps its own colour.\n   * `states.hover.filter.type: 'none'` still turns every hover visual off, so\n   * this only claims the state when a hover visual was wanted at all.\n   * @param {any} w\n   */\n  static hoverOutlineOwnsHoverState(w2) {\n    var _a;\n    return Filters.isSliceChart(w2) && w2.config.states.hover.filter.type !== \"none\" && ((_a = w2.config.plotOptions.pie.hoverOutline) == null ? void 0 : _a.show) === true;\n  }\n  /**\n   * True when a pie / donut slice carries the selected state itself, by\n   * sliding out of the pie (see Pie.offsetSlice). Moving out of the pie is a\n   * strong enough signal on its own, so the states.active darken filter would\n   * only muddy the slice colour on top of it. polarArea is excluded: it never\n   * slides (its radius is the value), so it keeps the filter as its only\n   * click feedback.\n   * @param {any} w\n   */\n  static sliceOffsetOwnsActiveState(w2) {\n    return Filters.isSliceChart(w2) && w2.config.chart.type !== \"polarArea\" && w2.config.plotOptions.pie.expandOnClick === true && w2.config.plotOptions.pie.expandOffset > 0 && !Filters.drilldownBlocksSliceOffset(w2);\n  }\n  /**\n   * A drilldown pie / donut does not slide its slices out at all: a click there\n   * is navigation, so the slice would pull out and then be thrown away by the\n   * drill it just triggered, which reads as a glitch rather than as motion.\n   * The states.active filter comes back as the click feedback (it is instant,\n   * so the re-render lands on top of it rather than fighting it).\n   * @param {any} w\n   */\n  static drilldownBlocksSliceOffset(w2) {\n    var _a;\n    return Filters.isSliceChart(w2) && ((_a = w2.config.drilldown) == null ? void 0 : _a.enabled) === true;\n  }\n  // create a re-usable filter which can be appended other filter effects and applied to multiple elements\n  /**\n   * @param {any} el\n   * @param {number} i\n   */\n  getDefaultFilter(el, i2) {\n    const w2 = this.w;\n    if (el.unfilter) {\n      el.unfilter(true);\n    }\n    if (w2.config.chart.dropShadow.enabled) {\n      this.dropShadow(el, w2.config.chart.dropShadow, i2);\n    }\n  }\n  /**\n   * @param {any} el\n   * @param {number} i\n   * @param {string} filterType\n   * @param {number} [intensity] Blend strength (0 to 1). Defaults per type.\n   */\n  applyFilter(el, i2, filterType, intensity) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    if (el.unfilter) {\n      el.unfilter(true);\n    }\n    if (filterType === \"none\") {\n      this.getDefaultFilter(el, i2);\n      return;\n    }\n    const shadowAttr = w2.config.chart.dropShadow;\n    const fallback = filterType === \"lighten\" ? DEFAULT_INTENSITY.lighten : DEFAULT_INTENSITY.darken;\n    const t2 = Math.max(\n      0,\n      Math.min(1, typeof intensity === \"number\" ? intensity : fallback)\n    );\n    const diag = 1 - t2;\n    const offset = filterType === \"lighten\" ? t2 : 0;\n    if (el.filterWith) {\n      el.filterWith((add) => {\n        add.colorMatrix({\n          type: \"matrix\",\n          values: `\n            ${diag} 0 0 0 ${offset}\n            0 ${diag} 0 0 ${offset}\n            0 0 ${diag} 0 ${offset}\n            0 0 0 1 0\n          `,\n          in: \"SourceGraphic\",\n          result: \"brightness\"\n        });\n        if (shadowAttr.enabled) {\n          this.addShadow(add, i2, shadowAttr, \"brightness\");\n        }\n      });\n      if (!shadowAttr.noUserSpaceOnUse) {\n        (_b = (_a = el.filterer()) == null ? void 0 : _a.node) == null ? void 0 : _b.setAttribute(\"filterUnits\", \"userSpaceOnUse\");\n      }\n      this._scaleFilterSize((_c = el.filterer()) == null ? void 0 : _c.node);\n    }\n  }\n  // appends dropShadow to the filter object which can be chained with other filter effects\n  /**\n   * @param {any} add\n   * @param {number} i\n   * @param {Record<string, any>} attrs\n   * @param {string} source\n   */\n  addShadow(add, i2, attrs, source) {\n    var _a;\n    const w2 = this.w;\n    let { blur, top, left, color, opacity } = attrs;\n    color = Array.isArray(color) ? color[i2] : color;\n    if (((_a = w2.config.chart.dropShadow.enabledOnSeries) == null ? void 0 : _a.length) > 0) {\n      if (w2.config.chart.dropShadow.enabledOnSeries.indexOf(i2) === -1) {\n        return add;\n      }\n    }\n    add.offset({\n      in: source,\n      dx: left,\n      dy: top,\n      result: \"offset\"\n    });\n    add.gaussianBlur({\n      in: \"offset\",\n      stdDeviation: blur,\n      result: \"blur\"\n    });\n    add.flood({\n      \"flood-color\": color,\n      \"flood-opacity\": opacity,\n      result: \"flood\"\n    });\n    add.composite({\n      in: \"flood\",\n      in2: \"blur\",\n      operator: \"in\",\n      result: \"shadow\"\n    });\n    add.merge([\"shadow\", source]);\n  }\n  // directly adds dropShadow to the element and returns the same element.\n  /**\n   * @param {any} el\n   * @param {Record<string, any>} attrs\n   */\n  dropShadow(el, attrs, i2 = 0) {\n    var _a, _b, _c, _d, _e;\n    const w2 = this.w;\n    if (el.unfilter) {\n      el.unfilter(true);\n    }\n    if (Utils$1.isMsEdge() && w2.config.chart.type === \"radialBar\") {\n      return el;\n    }\n    if (((_a = w2.config.chart.dropShadow.enabledOnSeries) == null ? void 0 : _a.length) > 0) {\n      if (((_b = w2.config.chart.dropShadow.enabledOnSeries) == null ? void 0 : _b.indexOf(i2)) === -1) {\n        return el;\n      }\n    }\n    if (el.filterWith) {\n      el.filterWith((add) => {\n        this.addShadow(add, i2, attrs, \"SourceGraphic\");\n      });\n      if (!attrs.noUserSpaceOnUse) {\n        (_d = (_c = el.filterer()) == null ? void 0 : _c.node) == null ? void 0 : _d.setAttribute(\"filterUnits\", \"userSpaceOnUse\");\n      }\n      this._scaleFilterSize((_e = el.filterer()) == null ? void 0 : _e.node);\n    }\n    return el;\n  }\n  /**\n   * @param {any} el\n   * @param {number} realIndex\n   * @param {number} dataPointIndex\n   */\n  setSelectionFilter(el, realIndex, dataPointIndex) {\n    const w2 = this.w;\n    if (typeof w2.interact.selectedDataPoints[realIndex] !== \"undefined\") {\n      if (w2.interact.selectedDataPoints[realIndex].indexOf(dataPointIndex) > -1) {\n        el.node.setAttribute(\"selected\", true);\n        if (Filters.sliceOffsetOwnsActiveState(w2)) return;\n        const activeFilter = w2.config.states.active.filter;\n        if (activeFilter.type !== \"none\") {\n          this.applyFilter(el, realIndex, activeFilter.type, activeFilter.value);\n        }\n      }\n    }\n  }\n  /**\n   * @param {any} el\n   */\n  _scaleFilterSize(el) {\n    if (!el) return;\n    const setAttributes = (attrs) => {\n      for (const key in attrs) {\n        if (Object.prototype.hasOwnProperty.call(attrs, key)) {\n          el.setAttribute(key, attrs[key]);\n        }\n      }\n    };\n    setAttributes({\n      width: \"200%\",\n      height: \"200%\",\n      x: \"-50%\",\n      y: \"-50%\"\n    });\n  }\n}\nclass Graphics {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext | null} ctx\n   */\n  constructor(w2, ctx = null) {\n    this.w = w2;\n    this.ctx = ctx;\n  }\n  /*****************************************************************************\n   *                                                                            *\n   *  SVG Path Rounding Function                                                *\n   *  Copyright (C) 2014 Yona Appletree                                         *\n   *                                                                            *\n   *  Licensed under the Apache License, Version 2.0 (the \"License\");           *\n   *  you may not use this file except in compliance with the License.          *\n   *  You may obtain a copy of the License at                                   *\n   *                                                                            *\n   *      http://www.apache.org/licenses/LICENSE-2.0                            *\n   *                                                                            *\n   *  Unless required by applicable law or agreed to in writing, software       *\n   *  distributed under the License is distributed on an \"AS IS\" BASIS,         *\n   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  *\n   *  See the License for the specific language governing permissions and       *\n   *  limitations under the License.                                            *\n   *                                                                            *\n   *****************************************************************************/\n  /**\n   * SVG Path rounding function. Takes an input path string and outputs a path\n   * string where all line-line corners have been rounded. Only supports absolute\n   * commands at the moment.\n   *\n   * @param pathString The SVG input path\n   * @param radius The amount to round the corners, either a value in the SVG\n   *               coordinate space, or, if useFractionalRadius is true, a value\n   *               from 0 to 1.\n   * @returns A new SVG path string with the rounding\n   * @param {string} pathString\n   * @param {number} radius\n   */\n  roundPathCorners(pathString, radius) {\n    if (pathString.indexOf(\"NaN\") > -1) pathString = \"\";\n    function moveTowardsLength(movingPoint, targetPoint, amount) {\n      var width = targetPoint.x - movingPoint.x;\n      var height = targetPoint.y - movingPoint.y;\n      var distance = Math.sqrt(width * width + height * height);\n      return moveTowardsFractional(\n        movingPoint,\n        targetPoint,\n        Math.min(1, amount / distance)\n      );\n    }\n    function moveTowardsFractional(movingPoint, targetPoint, fraction) {\n      return {\n        x: movingPoint.x + (targetPoint.x - movingPoint.x) * fraction,\n        y: movingPoint.y + (targetPoint.y - movingPoint.y) * fraction\n      };\n    }\n    function adjustCommand(cmd, newPoint) {\n      if (cmd.length > 2) {\n        cmd[cmd.length - 2] = newPoint.x;\n        cmd[cmd.length - 1] = newPoint.y;\n      }\n    }\n    function pointForCommand(cmd) {\n      return {\n        x: parseFloat(cmd[cmd.length - 2]),\n        y: parseFloat(cmd[cmd.length - 1])\n      };\n    }\n    var pathParts = pathString.split(/[,\\s]/).reduce(function(parts, part) {\n      var match = part.match(/^([a-zA-Z])(.+)/);\n      if (match) {\n        parts.push(match[1]);\n        parts.push(match[2]);\n      } else {\n        parts.push(part);\n      }\n      return parts;\n    }, []);\n    var commands = pathParts.reduce(function(commands2, part) {\n      if (parseFloat(part) == part && commands2.length) {\n        commands2[commands2.length - 1].push(part);\n      } else {\n        commands2.push([part]);\n      }\n      return commands2;\n    }, []);\n    var resultCommands = [];\n    if (commands.length > 1) {\n      var startPoint = pointForCommand(commands[0]);\n      var virtualCloseLine = null;\n      if (commands[commands.length - 1][0] == \"Z\" && commands[0].length > 2) {\n        virtualCloseLine = [\"L\", startPoint.x, startPoint.y];\n        commands[commands.length - 1] = virtualCloseLine;\n      }\n      resultCommands.push(commands[0]);\n      for (var cmdIndex = 1; cmdIndex < commands.length; cmdIndex++) {\n        var prevCmd = resultCommands[resultCommands.length - 1];\n        var curCmd = commands[cmdIndex];\n        var nextCmd = curCmd == virtualCloseLine ? commands[1] : commands[cmdIndex + 1];\n        if (nextCmd && prevCmd && prevCmd.length > 2 && curCmd[0] == \"L\" && nextCmd.length > 2 && nextCmd[0] == \"L\") {\n          var prevPoint = pointForCommand(prevCmd);\n          var curPoint = pointForCommand(curCmd);\n          var nextPoint = pointForCommand(nextCmd);\n          var curveStart, curveEnd;\n          curveStart = moveTowardsLength(curPoint, prevPoint, radius);\n          curveEnd = moveTowardsLength(curPoint, nextPoint, radius);\n          adjustCommand(curCmd, curveStart);\n          curCmd.origPoint = curPoint;\n          resultCommands.push(curCmd);\n          var startControl = moveTowardsFractional(curveStart, curPoint, 0.5);\n          var endControl = moveTowardsFractional(curPoint, curveEnd, 0.5);\n          var curveCmd = [\n            \"C\",\n            startControl.x,\n            startControl.y,\n            endControl.x,\n            endControl.y,\n            curveEnd.x,\n            curveEnd.y\n          ];\n          curveCmd.origPoint = curPoint;\n          resultCommands.push(curveCmd);\n        } else {\n          resultCommands.push(curCmd);\n        }\n      }\n      if (virtualCloseLine) {\n        var newStartPoint = pointForCommand(\n          resultCommands[resultCommands.length - 1]\n        );\n        resultCommands.push([\"Z\"]);\n        adjustCommand(resultCommands[0], newStartPoint);\n      }\n    } else {\n      resultCommands = commands;\n    }\n    return resultCommands.reduce(function(str, c2) {\n      return str + c2.join(\" \") + \" \";\n    }, \"\");\n  }\n  /**\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x2\n   * @param {number} y2\n   * @param {number | null} [strokeWidth]\n   */\n  drawLine(x1, y1, x2, y2, lineColor = \"#a8a8a8\", dashArray = 0, strokeWidth = null, strokeLineCap = \"butt\") {\n    const w2 = this.w;\n    const line = w2.dom.Paper.line().attr({\n      x1,\n      y1,\n      x2,\n      y2,\n      stroke: lineColor,\n      \"stroke-dasharray\": dashArray,\n      \"stroke-width\": strokeWidth,\n      \"stroke-linecap\": strokeLineCap\n    });\n    return line;\n  }\n  /**\n   * @param {number | null} [strokeWidth]\n   * @param {string | null} [strokeColor]\n   */\n  drawRect(x1 = 0, y1 = 0, x2 = 0, y2 = 0, radius = 0, color = \"#fefefe\", opacity = 1, strokeWidth = null, strokeColor = null, strokeDashArray = 0) {\n    const w2 = this.w;\n    const rect = w2.dom.Paper.rect();\n    rect.attr({\n      x: x1,\n      y: y1,\n      width: x2 > 0 ? x2 : 0,\n      height: y2 > 0 ? y2 : 0,\n      rx: radius,\n      ry: radius,\n      opacity,\n      \"stroke-width\": strokeWidth !== null ? strokeWidth : 0,\n      stroke: strokeColor !== null ? strokeColor : \"none\",\n      \"stroke-dasharray\": strokeDashArray\n    });\n    rect.node.setAttribute(\"fill\", color);\n    return rect;\n  }\n  /**\n   * @param {string} polygonString\n   */\n  drawPolygon(polygonString, stroke = \"#e1e1e1\", strokeWidth = 1, fill = \"none\") {\n    const w2 = this.w;\n    const polygon = w2.dom.Paper.polygon(polygonString).attr({\n      fill,\n      stroke,\n      \"stroke-width\": strokeWidth\n    });\n    return polygon;\n  }\n  /**\n   * @param {number} radius\n   * @param {Record<string, any> | null} attrs\n   */\n  drawCircle(radius, attrs = null) {\n    const w2 = this.w;\n    if (radius < 0) radius = 0;\n    const c2 = w2.dom.Paper.circle(radius * 2);\n    if (attrs !== null) {\n      c2.attr(attrs);\n    }\n    return c2;\n  }\n  /** @param {{ d?: string, stroke?: string, strokeWidth?: number, fill: any, fillOpacity?: number, strokeOpacity?: number, classes?: any, strokeLinecap?: any, strokeDashArray?: number }} opts */\n  drawPath({\n    d = \"\",\n    stroke = \"#a8a8a8\",\n    strokeWidth = 1,\n    fill,\n    fillOpacity = 1,\n    strokeOpacity = 1,\n    classes,\n    strokeLinecap = null,\n    strokeDashArray = 0\n  }) {\n    const w2 = this.w;\n    if (strokeLinecap === null) {\n      strokeLinecap = w2.config.stroke.lineCap;\n    }\n    if (d.indexOf(\"undefined\") > -1 || d.indexOf(\"NaN\") > -1) {\n      d = `M 0 ${w2.layout.gridHeight}`;\n    }\n    const p2 = w2.dom.Paper.path(d).attr({\n      fill,\n      \"fill-opacity\": fillOpacity,\n      stroke,\n      \"stroke-opacity\": strokeOpacity,\n      \"stroke-linecap\": strokeLinecap,\n      \"stroke-width\": strokeWidth,\n      \"stroke-dasharray\": strokeDashArray,\n      class: classes\n    });\n    return p2;\n  }\n  /**\n   * @param {Record<string, any> | null} attrs\n   */\n  group(attrs = null) {\n    const w2 = this.w;\n    const g2 = w2.dom.Paper.group();\n    if (attrs !== null) {\n      g2.attr(attrs);\n    }\n    return g2;\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   */\n  move(x, y) {\n    const move = [\"M\", x, y].join(\" \");\n    return move;\n  }\n  /**\n   * @param {number | null} x\n   * @param {number | null} y\n   * @param {string | null} hORv\n   * @returns {string}\n   */\n  line(x, y, hORv = null) {\n    if (hORv === \"H\") return [\" H\", x].join(\" \");\n    if (hORv === \"V\") return [\" V\", y].join(\" \");\n    return [\" L\", x, y].join(\" \");\n  }\n  /**\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x2\n   * @param {number} y2\n   * @param {number} x\n   * @param {number} y\n   */\n  curve(x1, y1, x2, y2, x, y) {\n    const curve = [\"C\", x1, y1, x2, y2, x, y].join(\" \");\n    return curve;\n  }\n  /**\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x\n   * @param {number} y\n   */\n  quadraticCurve(x1, y1, x, y) {\n    const curve = [\"Q\", x1, y1, x, y].join(\" \");\n    return curve;\n  }\n  /**\n   * @param {number} rx\n   * @param {number} ry\n   * @param {number} axisRotation\n   * @param {number} largeArcFlag\n   * @param {number} sweepFlag\n   * @param {number} x\n   * @param {number} y\n   */\n  arc(rx, ry, axisRotation, largeArcFlag, sweepFlag, x, y, relative = false) {\n    let coord = \"A\";\n    if (relative) coord = \"a\";\n    const arc = [\n      coord,\n      rx,\n      ry,\n      axisRotation,\n      largeArcFlag,\n      sweepFlag,\n      x,\n      y\n    ].join(\" \");\n    return arc;\n  }\n  /**\n   * @memberof Graphics\n   * @param {Record<string, any>} opts\n   *  i = series's index\n   *  realIndex = realIndex is series's actual index when it was drawn time. After several redraws, the iterating \"i\" may change in loops, but realIndex doesn't\n   *  pathFrom = existing pathFrom to animateTo\n   *  pathTo = new Path to which d attr will be animated from pathFrom to pathTo\n   *  stroke = line Color\n   *  strokeWidth = width of path Line\n   *  fill = it can be gradient, single color, pattern or image\n   *  animationDelay = how much to delay when starting animation (in milliseconds)\n   *  dataChangeSpeed = for dynamic animations, when data changes\n   *  className = class attribute to add\n   *  scrollMorph = this data-change morph is a streaming scroll (see StreamScroll);\n   *                defaults the morph easing to linear so the slide is constant-velocity\n   * @return {any} svg.js path object\n   **/\n  renderPaths({\n    j,\n    realIndex,\n    pathFrom,\n    pathTo,\n    pathToInterp,\n    stroke,\n    strokeWidth,\n    strokeLinecap,\n    fill,\n    animationDelay,\n    initialSpeed,\n    dataChangeSpeed,\n    className,\n    chartType,\n    shouldClipToGrid = true,\n    bindEventsOnPaths = true,\n    drawShadow = true,\n    drawMask = null,\n    scrollMorph = false\n  }) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    const filters = new Filters(this.w);\n    const anim = new Animations(this.w, (_a = this.ctx) != null ? _a : void 0);\n    const initialAnim = this.w.config.chart.animations.enabled;\n    const dynamicAnim = initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;\n    if (pathFrom && pathFrom.startsWith(\"M 0 0 \") && pathTo) {\n      const moveCommand = pathTo.match(/^M\\s+[\\d.-]+\\s+[\\d.-]+/);\n      if (moveCommand) {\n        pathFrom = pathFrom.replace(/^M\\s+0\\s+0/, moveCommand[0]);\n      }\n    }\n    let d;\n    const crossTypeMorph = ((_c = (_b = this.ctx) == null ? void 0 : _b.morphTypeChange) == null ? void 0 : _c.isActive()) === true;\n    const shouldAnimate = !!(initialAnim && !w2.globals.resized || dynamicAnim && w2.globals.dataChanged && w2.globals.shouldAnimate || crossTypeMorph && initialAnim && w2.globals.shouldAnimate);\n    const isDrawableSeries = typeof className === \"string\" && (className.indexOf(\"apexcharts-line\") > -1 || className.indexOf(\"apexcharts-area\") > -1 || className.indexOf(\"apexcharts-rangeArea\") > -1 || className.indexOf(\"apexcharts-radar\") > -1);\n    const useDrawMode = !!(initialAnim && !w2.globals.resized && !w2.globals.dataChanged && isDrawableSeries);\n    const largeThreshold = (_d = w2.config.chart.animations.largeDatasetThreshold) != null ? _d : 0;\n    const bulkRender = !!(shouldAnimate && !useDrawMode && largeThreshold > 0 && w2.globals.dataPoints > largeThreshold);\n    const isCandleOrBox = chartType === \"candlestick\" || chartType === \"boxPlot\";\n    const fadeOnDataChange = !!(isCandleOrBox && shouldAnimate && !useDrawMode && w2.globals.dataChanged && // ...but a cross-type morph is a deliberate one-off with marks already\n    // paired, so it keeps its tween instead of fading.\n    !crossTypeMorph);\n    const revealViaFade = bulkRender || fadeOnDataChange;\n    if (shouldAnimate && !useDrawMode && !revealViaFade) {\n      d = pathFrom;\n    } else {\n      d = pathTo;\n      if (!shouldAnimate) {\n        w2.globals.animationEnded = true;\n      }\n    }\n    const strokeDashArrayOpt = w2.config.stroke.dashArray;\n    let strokeDashArray = 0;\n    if (Array.isArray(strokeDashArrayOpt)) {\n      strokeDashArray = strokeDashArrayOpt[realIndex];\n    } else {\n      strokeDashArray = w2.config.stroke.dashArray;\n    }\n    const el = this.drawPath({\n      d,\n      stroke,\n      strokeWidth,\n      fill,\n      fillOpacity: 1,\n      classes: className,\n      strokeLinecap,\n      strokeDashArray\n    });\n    el.attr(\"index\", realIndex);\n    if (shouldClipToGrid) {\n      if (chartType === \"bar\" && !w2.globals.isBarHorizontal || w2.globals.comboCharts) {\n        el.attr({\n          \"clip-path\": `url(#gridRectBarMask${w2.globals.cuid})`\n        });\n      } else {\n        el.attr({\n          \"clip-path\": `url(#gridRectMask${w2.globals.cuid})`\n        });\n      }\n    }\n    if (w2.config.chart.dropShadow.enabled && drawShadow) {\n      filters.dropShadow(el, w2.config.chart.dropShadow, realIndex);\n    }\n    if (bindEventsOnPaths) {\n      el.node.addEventListener(\"mouseenter\", this.pathMouseEnter.bind(this, el));\n      el.node.addEventListener(\"mouseleave\", this.pathMouseLeave.bind(this, el));\n      el.node.addEventListener(\"mousedown\", this.pathMouseDown.bind(this, el));\n    }\n    el.attr({\n      pathTo,\n      pathFrom\n    });\n    const defaultAnimateOpts = {\n      el,\n      j,\n      realIndex,\n      pathFrom,\n      pathTo,\n      pathToInterp,\n      fill,\n      strokeWidth,\n      delay: animationDelay,\n      scrollMorph\n    };\n    if (initialAnim && !w2.globals.resized && !w2.globals.dataChanged) {\n      if (useDrawMode) {\n        const drawSpeed = initialSpeed * 2;\n        const isFill = stroke === \"none\" || strokeWidth === 0;\n        const seriesCount = w2.seriesData.series.length;\n        const isLast = w2.globals.comboCharts ? true : realIndex === seriesCount - 1;\n        anim.animateDraw(el, {\n          realIndex,\n          j,\n          isFill,\n          isLast,\n          speed: drawSpeed,\n          delay: 0,\n          mask: drawMask\n        });\n      } else if (!revealViaFade) {\n        anim.animatePathsGradually(__spreadProps(__spreadValues({}, defaultAnimateOpts), {\n          speed: initialSpeed\n        }));\n      }\n    } else {\n      if ((w2.globals.resized || !w2.globals.dataChanged) && !revealViaFade) {\n        anim.showDelayedElements();\n      }\n    }\n    const animateOnUpdate = shouldAnimate && !revealViaFade && (w2.globals.dataChanged && dynamicAnim || crossTypeMorph);\n    if (animateOnUpdate) {\n      anim.animatePathsGradually(__spreadProps(__spreadValues({}, defaultAnimateOpts), {\n        speed: dataChangeSpeed\n      }));\n    }\n    if (revealViaFade) {\n      anim.revealBulk(el);\n    }\n    return el;\n  }\n  /**\n   * @param {string} style\n   * @param {number} width\n   * @param {number} height\n   */\n  drawPattern(style, width, height, stroke = \"#a8a8a8\", strokeWidth = 0) {\n    const w2 = this.w;\n    const p2 = w2.dom.Paper.pattern(width, height, (add) => {\n      if (style === \"horizontalLines\") {\n        add.line(0, 0, height, 0).stroke({ color: stroke, width: strokeWidth + 1 });\n      } else if (style === \"verticalLines\") {\n        add.line(0, 0, 0, width).stroke({ color: stroke, width: strokeWidth + 1 });\n      } else if (style === \"slantedLines\") {\n        add.line(0, 0, width, height).stroke({ color: stroke, width: strokeWidth });\n      } else if (style === \"squares\") {\n        add.rect(width, height).fill(\"none\").stroke({ color: stroke, width: strokeWidth });\n      } else if (style === \"circles\") {\n        add.circle(width).fill(\"none\").stroke({ color: stroke, width: strokeWidth });\n      }\n    });\n    return p2;\n  }\n  /**\n   * @param {string} style\n   * @param {string} gfrom\n   * @param {string} gto\n   * @param {number} opacityFrom\n   * @param {number} opacityTo\n   * @param {number | null} [size]\n   * @param {number[] | null} stops\n   * @param {any[]} colorStops\n   * @param {number} [i]\n   * @param {boolean} [verticalUserSpace] anchor a vertical gradient to the plot\n   *   area rather than to each path's own bounding box. Needed when one series\n   *   is drawn as several path elements (nulls split it into segments): with\n   *   the default objectBoundingBox each segment resolves the same offset\n   *   against a different bbox, so the color transition lands on a different\n   *   value in every segment.\n   */\n  drawGradient(style, gfrom, gto, opacityFrom, opacityTo, size = null, stops = null, colorStops = [], i2 = 0, verticalUserSpace = false) {\n    const w2 = this.w;\n    let g2;\n    if (gfrom.length < 9 && gfrom.indexOf(\"#\") === 0) {\n      gfrom = Utils$1.hexToRgba(gfrom, opacityFrom);\n    }\n    if (gto.length < 9 && gto.indexOf(\"#\") === 0) {\n      gto = Utils$1.hexToRgba(gto, opacityTo);\n    }\n    let stop1 = 0;\n    let stop2 = 1;\n    let stop3 = 1;\n    let stop4 = null;\n    if (stops !== null) {\n      stop1 = typeof stops[0] !== \"undefined\" ? stops[0] / 100 : 0;\n      stop2 = typeof stops[1] !== \"undefined\" ? stops[1] / 100 : 1;\n      stop3 = typeof stops[2] !== \"undefined\" ? stops[2] / 100 : 1;\n      stop4 = typeof stops[3] !== \"undefined\" ? stops[3] / 100 : null;\n    }\n    const radial = !!(w2.config.chart.type === \"donut\" || w2.config.chart.type === \"pie\" || w2.config.chart.type === \"polarArea\" || w2.config.chart.type === \"bubble\");\n    if (!colorStops || colorStops.length === 0) {\n      g2 = w2.dom.Paper.gradient(\n        radial ? \"radial\" : \"linear\",\n        (add) => {\n          add.stop(stop1, gfrom, opacityFrom);\n          add.stop(stop2, gto, opacityTo);\n          add.stop(stop3, gto, opacityTo);\n          if (stop4 !== null) {\n            add.stop(stop4, gfrom, opacityFrom);\n          }\n        }\n      );\n    } else {\n      g2 = w2.dom.Paper.gradient(\n        radial ? \"radial\" : \"linear\",\n        (add) => {\n          const gradientStops = Array.isArray(colorStops[i2]) ? colorStops[i2] : Array.isArray(colorStops[0]) ? colorStops[0] || [] : colorStops;\n          gradientStops.forEach((s2) => {\n            add.stop(s2.offset / 100, s2.color, s2.opacity);\n          });\n        }\n      );\n    }\n    if (!radial) {\n      if (style === \"vertical\") {\n        if (verticalUserSpace) {\n          g2.attr({ gradientUnits: \"userSpaceOnUse\" });\n          g2.from(0, 0).to(0, w2.layout.gridHeight);\n        } else {\n          g2.from(0, 0).to(0, 1);\n        }\n      } else if (style === \"diagonal\") {\n        g2.from(0, 0).to(1, 1);\n      } else if (style === \"horizontal\") {\n        g2.from(0, 1).to(1, 1);\n      } else if (style === \"diagonal2\") {\n        g2.from(1, 0).to(0, 1);\n      }\n    } else {\n      const offx = w2.layout.gridWidth / 2;\n      const offy = w2.layout.gridHeight / 2;\n      if (w2.config.chart.type !== \"bubble\") {\n        g2.attr({\n          gradientUnits: \"userSpaceOnUse\",\n          cx: offx,\n          cy: offy,\n          r: size\n        });\n      } else {\n        g2.attr({\n          cx: 0.5,\n          cy: 0.5,\n          r: 0.8,\n          fx: 0.2,\n          fy: 0.2\n        });\n      }\n    }\n    return g2;\n  }\n  /** @param {{ text: any, maxWidth: any, fontSize: any, fontFamily?: any }} opts */\n  getTextBasedOnMaxWidth({ text, maxWidth, fontSize, fontFamily }) {\n    const tRects = this.getTextRects(text, fontSize, fontFamily, \"\");\n    const wordWidth = tRects.width / text.length;\n    const wordsBasedOnWidth = Math.floor(maxWidth / wordWidth);\n    if (maxWidth < tRects.width) {\n      return text.slice(0, wordsBasedOnWidth - 3) + \"...\";\n    }\n    return text;\n  }\n  /**\n   * @param {{ x: any, y: any, text: any, textAnchor?: any, fontSize?: any, fontFamily?: any, fontWeight?: any, foreColor?: any, opacity?: any, maxWidth?: any, cssClass?: string, isPlainText?: boolean, dominantBaseline?: string }} opts\n   */\n  drawText({\n    x,\n    y,\n    text,\n    textAnchor,\n    fontSize,\n    fontFamily,\n    fontWeight,\n    foreColor,\n    opacity,\n    maxWidth,\n    cssClass = \"\",\n    isPlainText = true,\n    dominantBaseline = \"auto\"\n  }) {\n    const w2 = this.w;\n    if (typeof text === \"undefined\") text = \"\";\n    let truncatedText = text;\n    if (!textAnchor) {\n      textAnchor = \"start\";\n    }\n    if (!foreColor || !foreColor.length) {\n      foreColor = w2.config.chart.foreColor;\n    }\n    fontFamily = fontFamily || w2.config.chart.fontFamily;\n    fontSize = fontSize || \"11px\";\n    fontWeight = fontWeight || \"regular\";\n    const commonProps = {\n      maxWidth,\n      fontSize,\n      fontFamily\n    };\n    let elText;\n    if (Array.isArray(text)) {\n      elText = w2.dom.Paper.text((add) => {\n        for (let i2 = 0; i2 < text.length; i2++) {\n          truncatedText = text[i2];\n          if (maxWidth) {\n            truncatedText = this.getTextBasedOnMaxWidth(__spreadValues({\n              text: text[i2]\n            }, commonProps));\n          }\n          i2 === 0 ? add.tspan(truncatedText) : add.tspan(truncatedText).newLine();\n        }\n      });\n    } else {\n      if (maxWidth) {\n        truncatedText = this.getTextBasedOnMaxWidth(__spreadValues({\n          text\n        }, commonProps));\n      }\n      elText = isPlainText ? w2.dom.Paper.plain(text) : (\n        /**\n         * @param {any} add\n         */\n        w2.dom.Paper.text((add) => add.tspan(truncatedText))\n      );\n    }\n    elText.attr({\n      x,\n      y,\n      \"text-anchor\": textAnchor,\n      \"dominant-baseline\": dominantBaseline,\n      \"font-size\": fontSize,\n      \"font-family\": fontFamily,\n      \"font-weight\": fontWeight,\n      fill: foreColor,\n      class: \"apexcharts-text \" + cssClass\n    });\n    elText.node.style.fontFamily = fontFamily;\n    elText.node.style.opacity = opacity;\n    return elText;\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @param {string} type\n   * @param {number} size\n   */\n  getMarkerPath(x, y, type, size) {\n    const CROSS_SHRINK = 1.4;\n    const PLUS_SHRINK = 1.12;\n    const STAR_GROW = 1.15;\n    const SPARKLE_SHRINK = 1.1;\n    const SQUARE_SHRINK = 1.125;\n    const DIAMOND_GROW = 1.05;\n    const LINE_SHRINK = 1.1;\n    const CIRCLE_DIAMETER = 2;\n    let d = \"\";\n    switch (type) {\n      case \"cross\":\n        size = size / CROSS_SHRINK;\n        d = `M ${x - size} ${y - size} L ${x + size} ${y + size}  M ${x - size} ${y + size} L ${x + size} ${y - size}`;\n        break;\n      case \"plus\":\n        size = size / PLUS_SHRINK;\n        d = `M ${x - size} ${y} L ${x + size} ${y}  M ${x} ${y - size} L ${x} ${y + size}`;\n        break;\n      case \"star\":\n      case \"sparkle\": {\n        let points = 5;\n        size = size * STAR_GROW;\n        if (type === \"sparkle\") {\n          size = size / SPARKLE_SHRINK;\n          points = 4;\n        }\n        const step = Math.PI / points;\n        for (let i2 = 0; i2 <= 2 * points; i2++) {\n          const angle = i2 * step;\n          const radius = i2 % 2 === 0 ? size : size / 2;\n          const xPos = x + radius * Math.sin(angle);\n          const yPos = y - radius * Math.cos(angle);\n          d += (i2 === 0 ? \"M\" : \"L\") + xPos + \",\" + yPos;\n        }\n        d += \"Z\";\n        break;\n      }\n      case \"triangle\":\n        d = `M ${x} ${y - size} \n             L ${x + size} ${y + size} \n             L ${x - size} ${y + size} \n             Z`;\n        break;\n      case \"square\":\n      case \"rect\":\n        size = size / SQUARE_SHRINK;\n        d = `M ${x - size} ${y - size} \n           L ${x + size} ${y - size} \n           L ${x + size} ${y + size} \n           L ${x - size} ${y + size} \n           Z`;\n        break;\n      case \"diamond\":\n        size = size * DIAMOND_GROW;\n        d = `M ${x} ${y - size} \n             L ${x + size} ${y} \n             L ${x} ${y + size} \n             L ${x - size} ${y} \n            Z`;\n        break;\n      case \"line\":\n        size = size / LINE_SHRINK;\n        d = `M ${x - size} ${y} \n           L ${x + size} ${y}`;\n        break;\n      case \"circle\":\n      default:\n        size = size * CIRCLE_DIAMETER;\n        d = `M ${x}, ${y} \n           m -${size / 2}, 0 \n           a ${size / 2},${size / 2} 0 1,0 ${size},0 \n           a ${size / 2},${size / 2} 0 1,0 -${size},0`;\n        break;\n    }\n    return d;\n  }\n  /**\n   * @param {number} x - The x-coordinate of the marker\n   * @param {number} y - The y-coordinate of the marker\n   * @param {string} type - Marker shape type\n   * @param {number} size - The size of the marker\n   * @param {Record<string, any>} opts - The options for the marker\n   * @returns {any} The created marker.\n   */\n  drawMarkerShape(x, y, type, size, opts) {\n    const path = this.drawPath({\n      d: this.getMarkerPath(x, y, type, size),\n      stroke: opts.pointStrokeColor,\n      strokeDashArray: opts.pointStrokeDashArray,\n      strokeWidth: opts.pointStrokeWidth,\n      fill: opts.pointFillColor,\n      fillOpacity: opts.pointFillOpacity,\n      strokeOpacity: opts.pointStrokeOpacity\n    });\n    path.attr({\n      cx: x,\n      cy: y,\n      shape: opts.shape,\n      class: opts.class ? opts.class : \"\"\n    });\n    return path;\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @param {Record<string, any>} opts\n   */\n  drawMarker(x, y, opts) {\n    x = x || 0;\n    let size = opts.pSize || 0;\n    if (!Utils$1.isNumber(y)) {\n      size = 0;\n      y = 0;\n    }\n    return this.drawMarkerShape(x, y, opts == null ? void 0 : opts.shape, size, __spreadValues(__spreadValues({}, opts), opts.shape === \"line\" || opts.shape === \"plus\" || opts.shape === \"cross\" ? {\n      pointStrokeColor: opts.pointFillColor,\n      pointStrokeOpacity: opts.pointFillOpacity\n    } : {}));\n  }\n  /**\n   * @param {any} path\n   * @param {Event | null} [e]\n   */\n  pathMouseEnter(path, e2) {\n    var _a, _b;\n    const w2 = this.w;\n    const filters = new Filters(this.w);\n    const i2 = parseInt((_a = path.node.getAttribute(\"index\")) != null ? _a : \"\", 10);\n    const j = parseInt((_b = path.node.getAttribute(\"j\")) != null ? _b : \"\", 10);\n    if (isNaN(i2) || isNaN(j)) return;\n    if (typeof w2.config.chart.events.dataPointMouseEnter === \"function\") {\n      w2.config.chart.events.dataPointMouseEnter(e2, this.ctx, {\n        seriesIndex: i2,\n        dataPointIndex: j,\n        w: w2\n      });\n    }\n    Graphics._fireEvent(w2, \"dataPointMouseEnter\", [\n      e2,\n      this.ctx,\n      { seriesIndex: i2, dataPointIndex: j, w: w2 }\n    ]);\n    if (w2.config.states.active.filter.type !== \"none\") {\n      if (path.node.getAttribute(\"selected\") === \"true\") {\n        return;\n      }\n    }\n    if (Filters.hoverOutlineOwnsHoverState(w2)) return;\n    if (w2.config.states.hover.filter.type !== \"none\") {\n      if (!w2.interact.isTouchDevice) {\n        const hoverFilter = w2.config.states.hover.filter;\n        filters.applyFilter(path, i2, hoverFilter.type, hoverFilter.value);\n      }\n    }\n  }\n  /**\n   * @param {any} path\n   * @param {Event | null} [e]\n   */\n  pathMouseLeave(path, e2) {\n    var _a, _b;\n    const w2 = this.w;\n    const filters = new Filters(this.w);\n    const i2 = parseInt((_a = path.node.getAttribute(\"index\")) != null ? _a : \"\", 10);\n    const j = parseInt((_b = path.node.getAttribute(\"j\")) != null ? _b : \"\", 10);\n    if (isNaN(i2) || isNaN(j)) return;\n    if (typeof w2.config.chart.events.dataPointMouseLeave === \"function\") {\n      w2.config.chart.events.dataPointMouseLeave(e2, this.ctx, {\n        seriesIndex: i2,\n        dataPointIndex: j,\n        w: w2\n      });\n    }\n    Graphics._fireEvent(w2, \"dataPointMouseLeave\", [\n      e2,\n      this.ctx,\n      { seriesIndex: i2, dataPointIndex: j, w: w2 }\n    ]);\n    if (w2.config.states.active.filter.type !== \"none\") {\n      if (path.node.getAttribute(\"selected\") === \"true\") {\n        return;\n      }\n    }\n    if (Filters.hoverOutlineOwnsHoverState(w2)) return;\n    if (w2.config.states.hover.filter.type !== \"none\") {\n      filters.getDefaultFilter(path, i2);\n    }\n  }\n  /**\n   * Clear every selected data point (single-select mode): reset the selection\n   * array and restore the default filter on all series path/circle/rect nodes.\n   * NOTE: preserves the original behavior of passing the clicked series index\n   * `i` to getDefaultFilter for every element (not each element's own index).\n   * @param {any} filters @param {number} i\n   */\n  _clearAllDataPointSelections(filters, i2) {\n    const w2 = this.w;\n    w2.interact.selectedDataPoints = [];\n    const elPaths = w2.dom.Paper.find(\n      \".apexcharts-series path:not(.apexcharts-decoration-element)\"\n    );\n    const elCircles = w2.dom.Paper.find(\n      \".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)\"\n    );\n    const deSelect = (els) => {\n      Array.prototype.forEach.call(els, (el) => {\n        el.node.setAttribute(\"selected\", \"false\");\n        filters.getDefaultFilter(el, i2);\n      });\n    };\n    deSelect(elPaths);\n    deSelect(elCircles);\n  }\n  /**\n   * Toggle the selected state of a single data point. Mutates\n   * `w.interact.selectedDataPoints` and the path's `selected` attribute,\n   * honoring single- vs multi-select mode. Returns the new selected flag.\n   * @param {any} path @param {any} filters @param {number} i @param {number} j\n   * @returns {'true' | 'false'}\n   */\n  _togglePointSelection(path, filters, i2, j) {\n    const w2 = this.w;\n    if (path.node.getAttribute(\"selected\") === \"true\") {\n      path.node.setAttribute(\"selected\", \"false\");\n      const index = w2.interact.selectedDataPoints[i2].indexOf(j);\n      if (index > -1) {\n        w2.interact.selectedDataPoints[i2].splice(index, 1);\n      }\n      return \"false\";\n    }\n    if (!w2.config.states.active.allowMultipleDataPointsSelection && w2.interact.selectedDataPoints.length > 0) {\n      this._clearAllDataPointSelections(filters, i2);\n    }\n    path.node.setAttribute(\"selected\", \"true\");\n    if (typeof w2.interact.selectedDataPoints[i2] === \"undefined\") {\n      w2.interact.selectedDataPoints[i2] = [];\n    }\n    w2.interact.selectedDataPoints[i2].push(j);\n    return \"true\";\n  }\n  /**\n   * Apply the active / hover / default state filter after a selection toggle,\n   * matching the original inline branching.\n   * @param {any} path @param {any} filters @param {number} i\n   * @param {'true' | 'false'} selected\n   */\n  _applyPointSelectionFilter(path, filters, i2, selected) {\n    const w2 = this.w;\n    if (Filters.sliceOffsetOwnsActiveState(w2)) return;\n    if (selected === \"true\") {\n      const activeFilter = w2.config.states.active.filter;\n      if (activeFilter !== \"none\") {\n        filters.applyFilter(path, i2, activeFilter.type, activeFilter.value);\n      } else {\n        if (w2.config.states.hover.filter !== \"none\") {\n          if (!w2.interact.isTouchDevice) {\n            const hoverFilter = w2.config.states.hover.filter;\n            filters.applyFilter(path, i2, hoverFilter.type, hoverFilter.value);\n          }\n        }\n      }\n    } else {\n      if (w2.config.states.active.filter.type !== \"none\") {\n        if (w2.config.states.hover.filter.type !== \"none\" && !w2.interact.isTouchDevice) {\n          const hoverFilter = w2.config.states.hover.filter;\n          filters.applyFilter(path, i2, hoverFilter.type, hoverFilter.value);\n        } else {\n          filters.getDefaultFilter(path, i2);\n        }\n      }\n    }\n  }\n  /**\n   * @param {any} path\n   * @param {Event | null} e\n   */\n  pathMouseDown(path, e2) {\n    var _a, _b;\n    const w2 = this.w;\n    const filters = new Filters(this.w);\n    const i2 = parseInt((_a = path.node.getAttribute(\"index\")) != null ? _a : \"\", 10);\n    const j = parseInt((_b = path.node.getAttribute(\"j\")) != null ? _b : \"\", 10);\n    if (isNaN(i2) || isNaN(j)) return;\n    const link = w2.config.chart.link;\n    const crossfilterClick = !!(link && (typeof link.dimension === \"function\" || link.enabled));\n    if (!crossfilterClick) {\n      const selected = this._togglePointSelection(path, filters, i2, j);\n      this._applyPointSelectionFilter(path, filters, i2, selected);\n    }\n    if (typeof w2.config.chart.events.dataPointSelection === \"function\") {\n      w2.config.chart.events.dataPointSelection(e2, this.ctx, {\n        selectedDataPoints: w2.interact.selectedDataPoints,\n        seriesIndex: i2,\n        dataPointIndex: j,\n        w: w2\n      });\n    }\n    if (e2) {\n      Graphics._fireEvent(w2, \"dataPointSelection\", [\n        e2,\n        this.ctx,\n        {\n          selectedDataPoints: w2.interact.selectedDataPoints,\n          seriesIndex: i2,\n          dataPointIndex: j,\n          w: w2\n        }\n      ]);\n    }\n  }\n  /**\n   * @param {any} el\n   * @returns {{ x: number, y: number }}\n   */\n  rotateAroundCenter(el) {\n    let coord = (\n      /** @type {any} */\n      {}\n    );\n    if (el && typeof el.getBBox === \"function\") {\n      coord = el.getBBox();\n    }\n    const x = coord.x + coord.width / 2;\n    const y = coord.y + coord.height / 2;\n    return {\n      x,\n      y\n    };\n  }\n  /**\n   * Sets up event delegation on a parent group element.\n   * Uses mouseover/mouseout (which bubble) to simulate mouseenter/mouseleave\n   * on matching child elements, reducing per-element listener overhead.\n   * @param {any} parentGroup\n   * @param {string} targetSelector\n   */\n  setupEventDelegation(parentGroup, targetSelector) {\n    let currentHovered = null;\n    parentGroup.node.addEventListener(\"mouseover\", (e2) => {\n      const targetNode = Graphics._findDelegateTarget(\n        e2.target,\n        parentGroup.node,\n        targetSelector\n      );\n      if (!targetNode || targetNode === currentHovered) return;\n      if (currentHovered && /** @type {any} */\n      currentHovered.instance) {\n        this.pathMouseLeave(\n          /** @type {any} */\n          currentHovered.instance,\n          e2\n        );\n      }\n      currentHovered = targetNode;\n      if (targetNode.instance) {\n        this.pathMouseEnter(targetNode.instance, e2);\n      }\n    });\n    parentGroup.node.addEventListener(\"mouseout\", (e2) => {\n      if (!currentHovered) return;\n      const relatedNode = e2.relatedTarget ? Graphics._findDelegateTarget(\n        e2.relatedTarget,\n        parentGroup.node,\n        targetSelector\n      ) : null;\n      if (relatedNode !== currentHovered) {\n        if (currentHovered && /** @type {any} */\n        currentHovered.instance) {\n          this.pathMouseLeave(\n            /** @type {any} */\n            currentHovered.instance,\n            e2\n          );\n        }\n        currentHovered = null;\n      }\n    });\n    parentGroup.node.addEventListener(\"mousedown\", (e2) => {\n      const targetNode = Graphics._findDelegateTarget(\n        e2.target,\n        parentGroup.node,\n        targetSelector\n      );\n      if (targetNode && targetNode.instance) {\n        this.pathMouseDown(targetNode.instance, e2);\n      }\n    });\n  }\n  // Fire a named event from w.globals.events without requiring a ctx reference.\n  // Mirrors Events.fireEvent() but reads the registry directly from w so that\n  // pathMouseEnter/Leave/Down work even when this.ctx is null (Graphics instances\n  // created without a ctx arg for drawing-only use cases).\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {string} name\n   * @param {any[]} args\n   */\n  static _fireEvent(w2, name2, args) {\n    const evs = w2.globals.events;\n    if (!evs || !Object.prototype.hasOwnProperty.call(evs, name2)) return;\n    const handlers = (\n      /** @type {Record<string,any>} */\n      evs[name2]\n    );\n    for (let i2 = 0; i2 < handlers.length; i2++) {\n      handlers[i2].apply(null, args);\n    }\n  }\n  /**\n   * @param {any} node\n   * @param {Record<string, any>} boundary\n   * @param {string} selector\n   */\n  static _findDelegateTarget(node, boundary, selector) {\n    while (node && node !== boundary && node !== document) {\n      if (node.matches && node.matches(selector)) return node;\n      node = node.parentNode;\n    }\n    return null;\n  }\n  /**\n   * @param {any} el\n   * @param {Record<string, any>} attrs\n   */\n  static setAttrs(el, attrs) {\n    for (const key in attrs) {\n      if (Object.prototype.hasOwnProperty.call(attrs, key)) {\n        el.setAttribute(key, attrs[key]);\n      }\n    }\n  }\n  /**\n   * @param {string} text\n   * @param {string} fontSize\n   * @param {string | null | undefined} [fontFamily]\n   * @param {string} [transform]\n   * @returns {{ width: number, height: number }}\n   */\n  getTextRects(text, fontSize, fontFamily, transform, useBBox = true) {\n    const w2 = this.w;\n    const cacheKey = [text, fontSize, fontFamily, transform, useBBox].join(\"\\0\");\n    const cache = w2.globals.textRectsCache;\n    if (cache && cache.has(cacheKey)) {\n      return (\n        /** @type {{ width: number, height: number }} */\n        cache.get(cacheKey)\n      );\n    }\n    const virtualText = this.drawText({\n      x: -200,\n      y: -200,\n      text,\n      textAnchor: \"start\",\n      fontSize,\n      fontFamily,\n      foreColor: \"#fff\",\n      opacity: 0\n    });\n    if (transform) {\n      virtualText.attr(\"transform\", transform);\n    }\n    w2.dom.Paper.add(virtualText);\n    let rect = virtualText.bbox();\n    const bboxY = rect.y;\n    if (!useBBox) {\n      rect = virtualText.node.getBoundingClientRect();\n    }\n    virtualText.remove();\n    const result = {\n      width: rect.width,\n      height: rect.height,\n      // Offset from the text element's `y` (alphabetic baseline) to the\n      // bbox vertical center. For most fonts this is NEGATIVE (bbox center\n      // sits above the baseline because the ascender is taller than the\n      // descender). Use as: `text_y = desired_visual_center_y - centerOffset`.\n      // Only populated when useBBox=true (the default).\n      centerOffset: useBBox ? bboxY + rect.height / 2 - -200 : 0\n    };\n    if (cache) {\n      cache.set(cacheKey, result);\n    }\n    return result;\n  }\n  /**\n   * append ... to long text\n   * http://stackoverflow.com/questions/9241315/trimming-text-to-a-given-pixel-width-in-svg\n   * @memberof Graphics\n   * @param {Record<string, any>} textObj\n   * @param {string} textString\n   * @param {number} width\n   **/\n  placeTextWithEllipsis(textObj, textString, width) {\n    if (typeof textObj.getComputedTextLength !== \"function\") return;\n    textObj.textContent = textString;\n    if (textString.length > 0) {\n      if (textObj.getComputedTextLength() >= width / 1.1) {\n        for (let x = textString.length - 3; x > 0; x -= 3) {\n          if (textObj.getSubStringLength(0, x) <= width / 1.1) {\n            textObj.textContent = textString.substring(0, x) + \"...\";\n            return;\n          }\n        }\n        textObj.textContent = \".\";\n      }\n    }\n  }\n}\nclass Fill {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n    this.opts = null;\n    this.seriesIndex = 0;\n    this.patternIDs = [];\n  }\n  /**\n   * @param {Record<string, any>} params\n   */\n  clippedImgArea(params) {\n    const w2 = this.w;\n    const cnf = w2.config;\n    const svgW = parseInt(String(w2.layout.gridWidth), 10);\n    const svgH = parseInt(String(w2.layout.gridHeight), 10);\n    const size = svgW > svgH ? svgW : svgH;\n    const fillImg = params.image;\n    let imgWidth = 0;\n    let imgHeight = 0;\n    if (typeof params.width === \"undefined\" && typeof params.height === \"undefined\") {\n      if (cnf.fill.image.width !== void 0 && cnf.fill.image.height !== void 0) {\n        imgWidth = cnf.fill.image.width + 1;\n        imgHeight = cnf.fill.image.height;\n      } else {\n        imgWidth = size + 1;\n        imgHeight = size;\n      }\n    } else {\n      imgWidth = params.width;\n      imgHeight = params.height;\n    }\n    const elPattern = BrowserAPIs.createElementNS(SVGNS$2, \"pattern\");\n    Graphics.setAttrs(elPattern, {\n      id: params.patternID,\n      patternUnits: params.patternUnits ? params.patternUnits : \"userSpaceOnUse\",\n      width: imgWidth + \"px\",\n      height: imgHeight + \"px\"\n    });\n    const elImage = BrowserAPIs.createElementNS(SVGNS$2, \"image\");\n    elPattern.appendChild(elImage);\n    const SVGLib = Environment.isBrowser() ? (\n      /** @type {any} */\n      window.SVG\n    ) : (\n      /** @type {any} */\n      global.SVG\n    );\n    elImage.setAttributeNS(SVGLib.xlink, \"href\", fillImg);\n    Graphics.setAttrs(elImage, {\n      x: 0,\n      y: 0,\n      preserveAspectRatio: \"none\",\n      width: imgWidth + \"px\",\n      height: imgHeight + \"px\"\n    });\n    elImage.style.opacity = params.opacity;\n    w2.dom.elDefs.node.appendChild(elPattern);\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  getSeriesIndex(opts) {\n    const w2 = this.w;\n    const cType = w2.config.chart.type;\n    if ((cType === \"bar\" || cType === \"rangeBar\") && w2.config.plotOptions.bar.distributed || cType === \"heatmap\" || cType === \"treemap\") {\n      this.seriesIndex = opts.seriesNumber;\n    } else {\n      this.seriesIndex = opts.seriesNumber % w2.seriesData.series.length;\n    }\n    return this.seriesIndex;\n  }\n  /**\n   * The y-axis window a series is plotted against. This is the space the\n   * threshold gradient is measured in, since that gradient spans the plot area.\n   *\n   * @param {number} realIndex\n   */\n  getSeriesAxisRange(realIndex) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    const yaxisIndex = (_b = (_a = w2.globals.seriesYAxisReverseMap) == null ? void 0 : _a[realIndex]) != null ? _b : 0;\n    return {\n      minY: Utils$1.isNumber(w2.globals.minYArr[realIndex]) ? w2.globals.minYArr[realIndex] : w2.globals.minY,\n      maxY: Utils$1.isNumber(w2.globals.maxYArr[realIndex]) ? w2.globals.maxYArr[realIndex] : w2.globals.maxY,\n      reversed: !!((_c = w2.config.yaxis[yaxisIndex]) == null ? void 0 : _c.reversed)\n    };\n  }\n  /**\n   * Builds the two stops that split a series into an above- and a\n   * below-threshold color.\n   *\n   * The stops are painted into a vertical gradient anchored to the plot area\n   * (see Graphics.drawGradient's verticalUserSpace branch), so the boundary is\n   * positioned over the *axis* range. Deriving it from the data range instead\n   * puts the transition on the wrong value whenever the axis extends past the\n   * data, which is the common case: an explicit yaxis.min/max, a nice scale, or\n   * an axis shared with another series.\n   *\n   * @param {{ minY: number, maxY: number, reversed?: boolean }} axisRange\n   * @param {Record<string, any>} multiColorConfig\n   */\n  computeColorStops(axisRange, multiColorConfig) {\n    const w2 = this.w;\n    const { threshold, colorAboveThreshold, colorBelowThreshold } = multiColorConfig;\n    const { minY, maxY } = axisRange;\n    const span = maxY - minY;\n    let offset = span === 0 ? threshold > maxY ? 0 : 100 : (maxY - threshold) / span * 100;\n    if (axisRange.reversed) {\n      offset = 100 - offset;\n    }\n    offset = Math.max(0, Math.min(offset, 100));\n    const fillOpacity = Array.isArray(w2.config.fill.opacity) ? w2.config.fill.opacity[this.seriesIndex] : w2.config.fill.opacity;\n    const above = {\n      offset,\n      color: colorAboveThreshold,\n      opacity: fillOpacity\n    };\n    const below = {\n      offset,\n      color: colorBelowThreshold,\n      opacity: fillOpacity\n    };\n    return axisRange.reversed ? [below, above] : [above, below];\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  fillPath(opts) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    this.opts = opts;\n    const cnf = this.w.config;\n    let pathFill;\n    let patternFill, gradientFill;\n    this.seriesIndex = this.getSeriesIndex(opts);\n    const drawMultiColorLine = cnf.plotOptions.line.colors.colorAboveThreshold && cnf.plotOptions.line.colors.colorBelowThreshold;\n    const fillColors = this.getFillColors();\n    let fillColor = fillColors[this.seriesIndex];\n    if (w2.seriesData.seriesColors[this.seriesIndex] !== void 0) {\n      fillColor = w2.seriesData.seriesColors[this.seriesIndex];\n    }\n    if (typeof fillColor === \"function\") {\n      fillColor = fillColor({\n        seriesIndex: this.seriesIndex,\n        dataPointIndex: opts.dataPointIndex,\n        value: opts.value,\n        w: w2\n      });\n    }\n    const fillType = opts.fillType ? opts.fillType : this.getFillType(this.seriesIndex);\n    let fillOpacity = Array.isArray(cnf.fill.opacity) ? cnf.fill.opacity[this.seriesIndex] : cnf.fill.opacity;\n    const useGradient = fillType === \"gradient\" || drawMultiColorLine;\n    if (opts.color) {\n      fillColor = opts.color;\n    }\n    const seriesItem = (\n      /** @type {Record<string,any>} */\n      w2.config.series[this.seriesIndex]\n    );\n    if ((_b = (_a = seriesItem == null ? void 0 : seriesItem.data) == null ? void 0 : _a[opts.dataPointIndex]) == null ? void 0 : _b.fillColor) {\n      fillColor = (_d = (_c = seriesItem == null ? void 0 : seriesItem.data) == null ? void 0 : _c[opts.dataPointIndex]) == null ? void 0 : _d.fillColor;\n    }\n    if (!fillColor) {\n      fillColor = \"#fff\";\n      console.warn(\"undefined color - ApexCharts\");\n    }\n    if (opts.opacity !== void 0 && opts.opacity !== null) fillOpacity = opts.opacity;\n    let defaultColor = fillColor;\n    if (Utils$1.isCSSVariable(fillColor)) {\n      defaultColor = Utils$1.applyOpacityToColor(fillColor, fillOpacity);\n    } else if (fillColor.indexOf(\"rgb\") === -1) {\n      if (fillColor.indexOf(\"#\") === -1) {\n        defaultColor = fillColor;\n      } else if (fillColor.length < 9) {\n        defaultColor = Utils$1.hexToRgba(fillColor, fillOpacity);\n      }\n    } else {\n      if (fillColor.indexOf(\"rgba\") > -1) {\n        fillOpacity = Utils$1.getOpacityFromRGBA(fillColor);\n      } else {\n        defaultColor = Utils$1.hexToRgba(Utils$1.rgb2hex(fillColor), fillOpacity);\n      }\n    }\n    const resolvedFillColor = Utils$1.isCSSVariable(fillColor) ? Utils$1.getThemeColor(fillColor) : fillColor;\n    if (fillType === \"pattern\") {\n      patternFill = this.handlePatternFill({\n        fillConfig: opts.fillConfig,\n        patternFill,\n        fillColor: resolvedFillColor,\n        defaultColor\n      });\n    }\n    if (useGradient) {\n      const colorStops = cnf.fill.gradient.colorStops ? [...cnf.fill.gradient.colorStops] : [];\n      let type = cnf.fill.gradient.type;\n      if (drawMultiColorLine) {\n        colorStops[this.seriesIndex] = this.computeColorStops(\n          this.getSeriesAxisRange(this.seriesIndex),\n          cnf.plotOptions.line.colors\n        );\n        type = \"vertical\";\n      }\n      gradientFill = this.handleGradientFill({\n        type,\n        fillConfig: opts.fillConfig,\n        fillColor: resolvedFillColor,\n        fillOpacity,\n        colorStops,\n        i: this.seriesIndex,\n        // Threshold stops are positioned over the axis range, so the gradient\n        // has to be anchored to the plot area to match. This also keeps every\n        // segment of a null-split series on one shared coordinate space.\n        verticalUserSpace: drawMultiColorLine\n      });\n    }\n    if (fillType === \"image\") {\n      const imgSrc = cnf.fill.image.src;\n      const patternID = opts.patternID ? opts.patternID : \"\";\n      const patternKey = `pattern${w2.globals.cuid}${opts.seriesNumber + 1}${patternID}`;\n      if (this.patternIDs.indexOf(patternKey) === -1) {\n        this.clippedImgArea({\n          opacity: fillOpacity,\n          image: Array.isArray(imgSrc) ? opts.seriesNumber < imgSrc.length ? imgSrc[opts.seriesNumber] : imgSrc[0] : imgSrc,\n          width: opts.width ? opts.width : void 0,\n          height: opts.height ? opts.height : void 0,\n          patternUnits: opts.patternUnits,\n          patternID: patternKey\n        });\n        this.patternIDs.push(patternKey);\n      }\n      pathFill = `url(#${patternKey})`;\n    } else if (useGradient) {\n      pathFill = gradientFill;\n    } else if (fillType === \"pattern\") {\n      pathFill = patternFill;\n    } else {\n      pathFill = defaultColor;\n    }\n    if (opts.solid) {\n      pathFill = defaultColor;\n    }\n    return pathFill;\n  }\n  /**\n   * @param {number} seriesIndex\n   */\n  getFillType(seriesIndex) {\n    const w2 = this.w;\n    if (Array.isArray(w2.config.fill.type)) {\n      return w2.config.fill.type[seriesIndex];\n    } else {\n      return w2.config.fill.type;\n    }\n  }\n  getFillColors() {\n    const w2 = this.w;\n    const cnf = w2.config;\n    const opts = this.opts;\n    let fillColors = [];\n    if (w2.globals.comboCharts) {\n      if (\n        /** @type {Record<string,any>} */\n        w2.config.series[this.seriesIndex].type === \"line\"\n      ) {\n        if (Array.isArray(w2.globals.stroke.colors)) {\n          fillColors = w2.globals.stroke.colors;\n        } else {\n          fillColors.push(w2.globals.stroke.colors);\n        }\n      } else {\n        if (Array.isArray(w2.globals.fill.colors)) {\n          fillColors = w2.globals.fill.colors;\n        } else {\n          fillColors.push(w2.globals.fill.colors);\n        }\n      }\n    } else {\n      if (cnf.chart.type === \"line\") {\n        if (Array.isArray(w2.globals.stroke.colors)) {\n          fillColors = w2.globals.stroke.colors;\n        } else {\n          fillColors.push(w2.globals.stroke.colors);\n        }\n      } else {\n        if (Array.isArray(w2.globals.fill.colors)) {\n          fillColors = w2.globals.fill.colors;\n        } else {\n          fillColors.push(w2.globals.fill.colors);\n        }\n      }\n    }\n    if (typeof opts.fillColors !== \"undefined\") {\n      fillColors = [];\n      if (Array.isArray(opts.fillColors)) {\n        fillColors = opts.fillColors.slice();\n      } else {\n        fillColors.push(opts.fillColors);\n      }\n    }\n    return fillColors;\n  }\n  /** @param {{fillConfig: any, patternFill: any, fillColor: any, defaultColor: any}} opts */\n  handlePatternFill({ fillConfig, patternFill, fillColor, defaultColor }) {\n    let fillCnf = this.w.config.fill;\n    if (fillConfig) {\n      fillCnf = fillConfig;\n    }\n    const opts = this.opts;\n    const graphics = new Graphics(this.w);\n    const patternStrokeWidth = Array.isArray(fillCnf.pattern.strokeWidth) ? fillCnf.pattern.strokeWidth[this.seriesIndex] : fillCnf.pattern.strokeWidth;\n    const patternLineColor = fillColor;\n    if (Array.isArray(fillCnf.pattern.style)) {\n      if (typeof fillCnf.pattern.style[opts.seriesNumber] !== \"undefined\") {\n        const pf = graphics.drawPattern(\n          fillCnf.pattern.style[opts.seriesNumber],\n          fillCnf.pattern.width,\n          fillCnf.pattern.height,\n          patternLineColor,\n          patternStrokeWidth\n        );\n        patternFill = pf;\n      } else {\n        patternFill = defaultColor;\n      }\n    } else {\n      patternFill = graphics.drawPattern(\n        fillCnf.pattern.style,\n        fillCnf.pattern.width,\n        fillCnf.pattern.height,\n        patternLineColor,\n        patternStrokeWidth\n      );\n    }\n    return patternFill;\n  }\n  handleGradientFill({\n    type,\n    fillColor,\n    fillOpacity,\n    fillConfig,\n    colorStops,\n    i: i2,\n    verticalUserSpace = false\n  }) {\n    let fillCnf = this.w.config.fill;\n    if (fillConfig) {\n      fillCnf = __spreadValues(__spreadValues({}, fillCnf), fillConfig);\n    }\n    const opts = this.opts;\n    const graphics = new Graphics(this.w);\n    const utils = new Utils$1();\n    type = type || fillCnf.gradient.type;\n    let gradientFrom = fillColor;\n    let gradientTo;\n    let opacityFrom = fillCnf.gradient.opacityFrom === void 0 ? fillOpacity : Array.isArray(fillCnf.gradient.opacityFrom) ? fillCnf.gradient.opacityFrom[i2] : fillCnf.gradient.opacityFrom;\n    if (gradientFrom.indexOf(\"rgba\") > -1) {\n      opacityFrom = Utils$1.getOpacityFromRGBA(gradientFrom);\n    }\n    let opacityTo = fillCnf.gradient.opacityTo === void 0 ? fillOpacity : Array.isArray(fillCnf.gradient.opacityTo) ? fillCnf.gradient.opacityTo[i2] : fillCnf.gradient.opacityTo;\n    if (fillCnf.gradient.gradientToColors === void 0 || fillCnf.gradient.gradientToColors.length === 0) {\n      if (fillCnf.gradient.shade === \"dark\") {\n        gradientTo = utils.shadeColor(\n          parseFloat(fillCnf.gradient.shadeIntensity) * -1,\n          fillColor.indexOf(\"rgb\") > -1 ? Utils$1.rgb2hex(fillColor) : fillColor\n        );\n      } else {\n        gradientTo = utils.shadeColor(\n          parseFloat(fillCnf.gradient.shadeIntensity),\n          fillColor.indexOf(\"rgb\") > -1 ? Utils$1.rgb2hex(fillColor) : fillColor\n        );\n      }\n    } else {\n      if (fillCnf.gradient.gradientToColors[opts.seriesNumber]) {\n        const gToColor = fillCnf.gradient.gradientToColors[opts.seriesNumber];\n        gradientTo = gToColor;\n        if (gToColor.indexOf(\"rgba\") > -1) {\n          opacityTo = Utils$1.getOpacityFromRGBA(gToColor);\n        }\n      } else {\n        gradientTo = fillColor;\n      }\n    }\n    if (fillCnf.gradient.gradientFrom) {\n      gradientFrom = fillCnf.gradient.gradientFrom;\n    }\n    if (fillCnf.gradient.gradientTo) {\n      gradientTo = fillCnf.gradient.gradientTo;\n    }\n    if (fillCnf.gradient.inverseColors) {\n      const t2 = gradientFrom;\n      gradientFrom = gradientTo;\n      gradientTo = t2;\n    }\n    if (gradientFrom.indexOf(\"rgb\") > -1) {\n      gradientFrom = Utils$1.rgb2hex(gradientFrom);\n    }\n    if (gradientTo.indexOf(\"rgb\") > -1) {\n      gradientTo = Utils$1.rgb2hex(gradientTo);\n    }\n    return graphics.drawGradient(\n      type,\n      gradientFrom,\n      gradientTo,\n      opacityFrom,\n      opacityTo,\n      opts.size,\n      fillCnf.gradient.stops,\n      colorStops,\n      i2,\n      verticalUserSpace\n    );\n  }\n}\nconst OK_FILTER_TYPES = [\"none\", \"lighten\", \"darken\"];\nfunction seriesEmitter(ctx, graphics) {\n  const r2 = ctx && ctx.renderer;\n  return r2 && r2.kind && r2.kind !== \"svg\" ? r2 : graphics;\n}\nfunction computeMarkCount(w2) {\n  const series = w2.config.series || [];\n  const type = w2.config.chart.type;\n  const scatterish = type === \"scatter\" || type === \"bubble\";\n  const markerSize = w2.config.markers && w2.config.markers.size;\n  const markersOn = Array.isArray(markerSize) ? markerSize.some((s2) => s2 > 0) : (markerSize || 0) > 0;\n  const labelsOn = !!(w2.config.dataLabels && w2.config.dataLabels.enabled);\n  const isHeatmap = type === \"heatmap\";\n  let total = 0;\n  let maxLen = 0;\n  series.forEach((s2) => {\n    const n2 = Array.isArray(s2.data) ? s2.data.length : 0;\n    if (n2 > maxLen) maxLen = n2;\n    if (scatterish || markersOn || isHeatmap) total += n2;\n    if (labelsOn) total += n2;\n  });\n  const LARGE_D = 5e4;\n  if (maxLen >= LARGE_D) total = Math.max(total, maxLen);\n  return total;\n}\nfunction hasCanvasUnsupportedFeature(w2) {\n  var _a, _b;\n  const fillType = w2.config.fill && w2.config.fill.type;\n  const isUnsupportedFill = (t2) => t2 === \"pattern\" || t2 === \"image\" || t2 === \"gradient\";\n  if (Array.isArray(fillType) ? fillType.some(isUnsupportedFill) : isUnsupportedFill(fillType)) {\n    return true;\n  }\n  const lineColors = (_b = (_a = w2.config.plotOptions) == null ? void 0 : _a.line) == null ? void 0 : _b.colors;\n  if (lineColors && lineColors.colorAboveThreshold && lineColors.colorBelowThreshold) {\n    return true;\n  }\n  const states = w2.config.states || {};\n  const hoverFilter = states.hover && states.hover.filter && states.hover.filter.type;\n  const activeFilter = states.active && states.active.filter && states.active.filter.type;\n  if (hoverFilter && !OK_FILTER_TYPES.includes(hoverFilter)) return true;\n  if (activeFilter && !OK_FILTER_TYPES.includes(activeFilter)) return true;\n  return false;\n}\nclass Markers {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this._filters = new Filters(this.w);\n    this._graphics = new Graphics(this.w, this.ctx);\n    this._seriesWrap = null;\n    this._seriesWrapIndex = -1;\n  }\n  /**\n   * Invalidate the cached per-series wrap group. Callers that drive\n   * plotChartMarkers point-by-point (Line) must call this when a series'\n   * element tree is (re)created, so a later render never appends markers to a\n   * detached group from the previous pass.\n   */\n  resetSeriesWrapCache() {\n    this._seriesWrap = null;\n    this._seriesWrapIndex = -1;\n  }\n  setGlobalMarkerSize() {\n    const w2 = this.w;\n    w2.globals.markers.size = Array.isArray(w2.config.markers.size) ? w2.config.markers.size : [w2.config.markers.size];\n    if (w2.globals.markers.size.length > 0) {\n      if (w2.globals.markers.size.length < w2.seriesData.series.length + 1) {\n        for (let i2 = 0; i2 <= w2.seriesData.series.length; i2++) {\n          if (typeof w2.globals.markers.size[i2] === \"undefined\") {\n            w2.globals.markers.size.push(w2.globals.markers.size[0]);\n          }\n        }\n      }\n    } else {\n      w2.globals.markers.size = w2.config.series.map(\n        () => (\n          /** @type {number} */\n          w2.config.markers.size\n        )\n      );\n    }\n  }\n  /** @param {{ pointsPos?: any, seriesIndex?: any, j?: any, pSize?: any, alwaysDrawMarker?: boolean, isVirtualPoint?: boolean }} opts */\n  plotChartMarkers({\n    pointsPos,\n    seriesIndex,\n    j,\n    pSize,\n    alwaysDrawMarker = false,\n    isVirtualPoint = false\n  }) {\n    const w2 = this.w;\n    const i2 = seriesIndex;\n    const p2 = pointsPos;\n    let elMarkersWrap = null;\n    const graphics = new Graphics(this.w);\n    const emit = seriesEmitter(this.ctx, graphics);\n    const hasDiscreteMarkers = w2.config.markers.discrete && w2.config.markers.discrete.length;\n    if (Array.isArray(p2.x)) {\n      for (let q = 0; q < p2.x.length; q++) {\n        let markerElement;\n        let dataPointIndex = j;\n        let invalidMarker = !Utils$1.isNumber(p2.y[q]);\n        if (w2.globals.markers.largestSize === 0 && w2.globals.hasNullValues && w2.seriesData.series[i2][j + 1] !== null && !isVirtualPoint) {\n          invalidMarker = true;\n        }\n        if (j === 1 && q === 0) dataPointIndex = 0;\n        if (j === 1 && q === 1) dataPointIndex = 1;\n        let markerClasses = \"apexcharts-marker\";\n        if ((w2.config.chart.type === \"line\" || w2.config.chart.type === \"area\") && !w2.globals.comboCharts && !w2.config.tooltip.intersect) {\n          markerClasses += \" no-pointer-events\";\n        }\n        const shouldMarkerDraw = Array.isArray(w2.config.markers.size) ? w2.globals.markers.size[seriesIndex] > 0 : w2.config.markers.size > 0;\n        if (shouldMarkerDraw || alwaysDrawMarker || hasDiscreteMarkers) {\n          if (emit.kind === \"canvas\") {\n            if (typeof w2.globals.pointsArray[seriesIndex] === \"undefined\") {\n              w2.globals.pointsArray[seriesIndex] = [];\n            }\n            w2.globals.pointsArray[seriesIndex][dataPointIndex] = [p2.x[q], p2.y[q]];\n          }\n          if (!invalidMarker) {\n            markerClasses += ` w${Utils$1.randomId()}`;\n          }\n          const opts = this.getMarkerConfig({\n            cssClass: markerClasses,\n            seriesIndex,\n            dataPointIndex\n          });\n          const _si = (\n            /** @type {Record<string,any>} */\n            w2.config.series[i2]\n          );\n          if (_si.data[dataPointIndex]) {\n            if (_si.data[dataPointIndex].fillColor) {\n              opts.pointFillColor = _si.data[dataPointIndex].fillColor;\n            }\n            if (_si.data[dataPointIndex].strokeColor) {\n              opts.pointStrokeColor = _si.data[dataPointIndex].strokeColor;\n            }\n          }\n          if (typeof pSize !== \"undefined\") {\n            opts.pSize = pSize;\n          }\n          if (p2.x[q] < -w2.globals.markers.largestSize || p2.x[q] > w2.layout.gridWidth + w2.globals.markers.largestSize || p2.y[q] < -w2.globals.markers.largestSize || p2.y[q] > w2.layout.gridHeight + w2.globals.markers.largestSize) {\n            opts.pSize = 0;\n          }\n          if (!invalidMarker) {\n            const shouldCreateMarkerWrap = w2.globals.markers.size[seriesIndex] > 0 || alwaysDrawMarker || hasDiscreteMarkers;\n            if (shouldCreateMarkerWrap && !elMarkersWrap) {\n              const standardWrap = !alwaysDrawMarker && !hasDiscreteMarkers;\n              if (standardWrap && this._seriesWrap && this._seriesWrapIndex === seriesIndex) {\n                elMarkersWrap = this._seriesWrap;\n              } else {\n                elMarkersWrap = emit.group({\n                  class: standardWrap ? \"apexcharts-series-markers\" : \"\"\n                });\n                elMarkersWrap.attr(\n                  \"clip-path\",\n                  `url(#gridRectMarkerMask${w2.globals.cuid})`\n                );\n                this.setupMarkerDelegation(elMarkersWrap);\n                if (standardWrap) {\n                  this._seriesWrap = elMarkersWrap;\n                  this._seriesWrapIndex = seriesIndex;\n                }\n              }\n            }\n            markerElement = emit.drawMarker(p2.x[q], p2.y[q], opts);\n            markerElement.attr(\"rel\", dataPointIndex);\n            markerElement.attr(\"j\", dataPointIndex);\n            markerElement.attr(\"index\", seriesIndex);\n            markerElement.node.setAttribute(\"default-marker-size\", opts.pSize);\n            applyProgressiveReveal(markerElement, p2.x[q], w2);\n            this._filters.setSelectionFilter(\n              markerElement,\n              seriesIndex,\n              dataPointIndex\n            );\n            if (elMarkersWrap) {\n              elMarkersWrap.add(markerElement);\n            }\n          }\n        } else {\n          if (typeof w2.globals.pointsArray[seriesIndex] === \"undefined\")\n            w2.globals.pointsArray[seriesIndex] = [];\n          w2.globals.pointsArray[seriesIndex].push([p2.x[q], p2.y[q]]);\n        }\n      }\n    }\n    return elMarkersWrap;\n  }\n  /** @param {{cssClass: any, seriesIndex: any, dataPointIndex?: any, radius?: any, size?: any, strokeWidth?: any}} opts */\n  getMarkerConfig({\n    cssClass,\n    seriesIndex,\n    dataPointIndex = null,\n    radius = null,\n    size = null,\n    strokeWidth = null\n  }) {\n    const w2 = this.w;\n    const pStyle = this.getMarkerStyle(seriesIndex);\n    let pSize = size === null ? w2.globals.markers.size[seriesIndex] : size;\n    const m2 = w2.config.markers;\n    if (dataPointIndex !== null && m2.discrete.length) {\n      m2.discrete.map((marker) => {\n        if (marker.seriesIndex === seriesIndex && marker.dataPointIndex === dataPointIndex) {\n          if (marker.strokeColor !== void 0) {\n            pStyle.pointStrokeColor = marker.strokeColor;\n          }\n          if (marker.fillColor !== void 0) {\n            pStyle.pointFillColor = marker.fillColor;\n          }\n          if (marker.size !== void 0) pSize = marker.size;\n          if (marker.shape !== void 0) pStyle.pointShape = marker.shape;\n        }\n      });\n    }\n    return {\n      pSize: radius === null ? pSize : radius,\n      pRadius: radius !== null ? radius : m2.radius,\n      pointStrokeWidth: strokeWidth !== null ? strokeWidth : Array.isArray(m2.strokeWidth) ? m2.strokeWidth[seriesIndex] : m2.strokeWidth,\n      pointStrokeColor: pStyle.pointStrokeColor,\n      pointFillColor: pStyle.pointFillColor,\n      shape: pStyle.pointShape || (Array.isArray(m2.shape) ? m2.shape[seriesIndex] : m2.shape),\n      class: cssClass,\n      pointStrokeOpacity: Array.isArray(m2.strokeOpacity) ? m2.strokeOpacity[seriesIndex] : m2.strokeOpacity,\n      pointStrokeDashArray: Array.isArray(m2.strokeDashArray) ? m2.strokeDashArray[seriesIndex] : m2.strokeDashArray,\n      pointFillOpacity: Array.isArray(m2.fillOpacity) ? m2.fillOpacity[seriesIndex] : m2.fillOpacity,\n      seriesIndex\n    };\n  }\n  /**\n   * @param {any} parentGroup\n   */\n  setupMarkerDelegation(parentGroup) {\n    const w2 = this.w;\n    const selector = \".apexcharts-marker\";\n    this._graphics.setupEventDelegation(parentGroup, selector);\n    parentGroup.node.addEventListener(\"click\", (e2) => {\n      if (w2.config.markers.onClick) {\n        const targetNode = Graphics._findDelegateTarget(\n          e2.target,\n          parentGroup.node,\n          selector\n        );\n        if (targetNode) w2.config.markers.onClick(e2);\n      }\n    });\n    parentGroup.node.addEventListener(\"dblclick\", (e2) => {\n      if (w2.config.markers.onDblClick) {\n        const targetNode = Graphics._findDelegateTarget(\n          e2.target,\n          parentGroup.node,\n          selector\n        );\n        if (targetNode) w2.config.markers.onDblClick(e2);\n      }\n    });\n    parentGroup.node.addEventListener(\n      \"touchstart\",\n      (e2) => {\n        const targetNode = Graphics._findDelegateTarget(\n          e2.target,\n          parentGroup.node,\n          selector\n        );\n        if (targetNode && targetNode.instance) {\n          this._graphics.pathMouseDown(targetNode.instance, e2);\n        }\n      },\n      { passive: true }\n    );\n  }\n  /**\n   * @returns {any}\n   * @param {number} seriesIndex\n   */\n  getMarkerStyle(seriesIndex) {\n    const w2 = this.w;\n    const colors = w2.globals.markers.colors;\n    const strokeColors = w2.config.markers.strokeColor || w2.config.markers.strokeColors;\n    const pointStrokeColor = Array.isArray(strokeColors) ? strokeColors[seriesIndex] : strokeColors;\n    const pointFillColor = Array.isArray(colors) ? colors[seriesIndex] : colors;\n    return {\n      pointStrokeColor,\n      pointFillColor\n    };\n  }\n}\nclass Scatter {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.ctx = ctx;\n    this.w = w2;\n    this.initialAnim = this.w.config.chart.animations.enabled;\n    this.anim = new Animations(this.w);\n    this.filters = new Filters(this.w);\n    this.fill = new Fill(this.w);\n    this.markers = new Markers(this.w, this.ctx);\n    this.graphics = new Graphics(this.w);\n    this._elPointsWrap = null;\n    this._elPointsWrapParent = null;\n    this._perSeries = null;\n  }\n  /**\n   * @param {Element} elSeries\n   * @param {number} j\n   * @param {Record<string, any>} opts\n   */\n  draw(elSeries, j, opts) {\n    const w2 = this.w;\n    const graphics = this.graphics;\n    const emit = seriesEmitter(this.ctx, graphics);\n    const realIndex = opts.realIndex;\n    const pointsPos = opts.pointsPos;\n    const zRatio = opts.zRatio;\n    const elPointsMain = opts.elParent;\n    let elPointsWrap = this._elPointsWrap;\n    if (!elPointsWrap || this._elPointsWrapParent !== elPointsMain) {\n      elPointsWrap = emit.group({\n        class: `apexcharts-series-markers apexcharts-series-${w2.config.chart.type}`\n      });\n      elPointsWrap.attr(\n        \"clip-path\",\n        `url(#gridRectMarkerMask${w2.globals.cuid})`\n      );\n      this.markers.setupMarkerDelegation(elPointsWrap);\n      elPointsMain.add(elPointsWrap);\n      this._elPointsWrap = elPointsWrap;\n      this._elPointsWrapParent = elPointsMain;\n      this._perSeries = this._buildPerSeriesCache(realIndex, emit);\n    }\n    if (Array.isArray(pointsPos.x)) {\n      for (let q = 0; q < pointsPos.x.length; q++) {\n        let dataPointIndex = j + 1;\n        let shouldDraw = true;\n        if (j === 0 && q === 0) dataPointIndex = 0;\n        if (j === 0 && q === 1) dataPointIndex = 1;\n        let radius = w2.globals.markers.size[realIndex];\n        if (zRatio !== Infinity) {\n          const bubble = w2.config.plotOptions.bubble;\n          radius = w2.seriesData.seriesZ[realIndex][dataPointIndex];\n          if (bubble.zScaling) {\n            radius /= zRatio;\n          }\n          if (bubble.minBubbleRadius && radius < bubble.minBubbleRadius) {\n            radius = bubble.minBubbleRadius;\n          }\n          if (bubble.maxBubbleRadius && radius > bubble.maxBubbleRadius) {\n            radius = bubble.maxBubbleRadius;\n          }\n        }\n        const x = pointsPos.x[q];\n        const y = pointsPos.y[q];\n        radius = radius || 0;\n        if (y === null || typeof w2.seriesData.series[realIndex][dataPointIndex] === \"undefined\") {\n          shouldDraw = false;\n        }\n        if (shouldDraw) {\n          const point = this.drawPoint(\n            x,\n            y,\n            radius,\n            realIndex,\n            dataPointIndex,\n            j\n          );\n          elPointsWrap.add(point);\n          if (emit.kind === \"canvas\") {\n            if (typeof w2.globals.pointsArray[realIndex] === \"undefined\") {\n              w2.globals.pointsArray[realIndex] = [];\n            }\n            w2.globals.pointsArray[realIndex][dataPointIndex] = [x, y];\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Per-series constants for drawPoint's hot path. Everything here is uniform\n   * across the points of one series; computing or allocating it per point is\n   * measurable overhead at 20k-50k points.\n   * @param {number} realIndex\n   * @param {any} emit\n   */\n  _buildPerSeriesCache(realIndex, emit) {\n    var _a;\n    const w2 = this.w;\n    return {\n      realIndex,\n      emit,\n      isBubble: w2.config.chart.type === \"bubble\" || w2.globals.comboCharts && w2.config.series[realIndex] && /** @type {Record<string,any>} */\n      w2.config.series[realIndex].type === \"bubble\",\n      // discrete markers vary per point; they disable both caches below\n      canCacheConfig: !w2.config.markers.discrete.length,\n      /** @type {any} lazily built shared marker config (first point) */\n      markerConfig: null,\n      /** @type {boolean|undefined} lazily resolved on the first fillPath call */\n      fillCacheable: void 0,\n      /** @type {any} cached fillPath result (undefined = not cached yet) */\n      fillCircle: void 0,\n      dropShadowEnabled: w2.config.chart.dropShadow.enabled,\n      doInitialAnim: this.initialAnim && !w2.globals.dataChanged && !w2.globals.resized,\n      jitter: (_a = w2.config.plotOptions.scatter) == null ? void 0 : _a.jitter,\n      /** @type {any} lazily built pop-animation constants */\n      anim: null\n    };\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @param {number} radius\n   * @param {number} realIndex\n   * @param {number} dataPointIndex\n   * @param {number} j\n   */\n  drawPoint(x, y, radius, realIndex, dataPointIndex, j) {\n    var _a;\n    const w2 = this.w;\n    const i2 = realIndex;\n    const anim = this.anim;\n    const filters = this.filters;\n    const fill = this.fill;\n    const markers = this.markers;\n    let ps = this._perSeries;\n    if (!ps || ps.realIndex !== realIndex) {\n      ps = this._perSeries = this._buildPerSeriesCache(\n        realIndex,\n        seriesEmitter(this.ctx, this.graphics)\n      );\n    }\n    const emit = ps.emit;\n    let markerConfig;\n    if (ps.canCacheConfig) {\n      if (!ps.markerConfig) {\n        ps.markerConfig = markers.getMarkerConfig({\n          cssClass: \"apexcharts-marker\",\n          seriesIndex: i2,\n          dataPointIndex,\n          radius: ps.isBubble ? radius : null\n        });\n      }\n      markerConfig = ps.markerConfig;\n      if (ps.isBubble) {\n        markerConfig.pSize = radius;\n        markerConfig.pRadius = radius;\n      }\n    } else {\n      markerConfig = markers.getMarkerConfig({\n        cssClass: \"apexcharts-marker\",\n        seriesIndex: i2,\n        dataPointIndex,\n        radius: ps.isBubble ? radius : null\n      });\n    }\n    const _si = (\n      /** @type {Record<string,any>} */\n      w2.config.series[i2]\n    );\n    const dataItem = _si.data[dataPointIndex];\n    let pathFillCircle;\n    if (ps.fillCircle !== void 0) {\n      pathFillCircle = ps.fillCircle;\n    } else {\n      pathFillCircle = fill.fillPath({\n        seriesNumber: realIndex,\n        dataPointIndex,\n        color: markerConfig.pointFillColor,\n        patternUnits: \"objectBoundingBox\",\n        value: w2.seriesData.series[realIndex][j]\n      });\n      if (ps.fillCacheable === void 0) {\n        ps.fillCacheable = ps.canCacheConfig && fill.getFillType(realIndex) === \"solid\" && typeof markerConfig.pointFillColor === \"string\" && !!markerConfig.pointFillColor;\n      }\n      if (ps.fillCacheable && !(dataItem == null ? void 0 : dataItem.fillColor)) {\n        ps.fillCircle = pathFillCircle;\n      }\n    }\n    const el = emit.drawMarker(x, y, markerConfig);\n    if (dataItem == null ? void 0 : dataItem.fillColor) {\n      pathFillCircle = dataItem.fillColor;\n    }\n    const jt = ps.jitter;\n    if ((jt == null ? void 0 : jt.enabled) && jt.distributed && w2.globals.colors.length) {\n      const bandIdx = Math.round(\n        (_a = w2.seriesData.seriesX[realIndex]) == null ? void 0 : _a[dataPointIndex]\n      );\n      if (!isNaN(bandIdx)) {\n        pathFillCircle = w2.globals.colors[bandIdx % w2.globals.colors.length];\n      }\n    }\n    el.attr({\n      fill: pathFillCircle\n    });\n    if (ps.dropShadowEnabled) {\n      const dropShadow = w2.config.chart.dropShadow;\n      filters.dropShadow(el, dropShadow, realIndex);\n    }\n    if (ps.doInitialAnim) {\n      if (!ps.anim) {\n        const animCfg = w2.config.chart.animations;\n        const totalPoints = w2.globals.dataPoints || 1;\n        const gradCfg = animCfg.animateGradually;\n        const gradEnabled = gradCfg && gradCfg.enabled !== false;\n        ps.anim = {\n          popSpeed: animCfg.speed,\n          baseDelay: gradEnabled ? Math.min(20, animCfg.speed * 0.5 / Math.max(1, totalPoints)) : 0\n        };\n      }\n      const delay = computeStagger({\n        style: ps.anim.baseDelay > 0 ? \"sequential\" : \"none\",\n        index: dataPointIndex,\n        baseDelay: ps.anim.baseDelay\n      });\n      anim.animatePop(el, {\n        speed: ps.anim.popSpeed,\n        delay,\n        onComplete: () => anim.animationCompleted(el)\n      });\n    } else {\n      w2.globals.animationEnded = true;\n    }\n    el.attr({\n      rel: dataPointIndex,\n      j: dataPointIndex,\n      index: realIndex,\n      \"default-marker-size\": markerConfig.pSize\n    });\n    filters.setSelectionFilter(el, realIndex, dataPointIndex);\n    return el;\n  }\n  /**\n   * @param {number} y\n   */\n  centerTextInBubble(y) {\n    const w2 = this.w;\n    y = y + parseInt(w2.config.dataLabels.style.fontSize, 10) / 4;\n    return {\n      y\n    };\n  }\n}\nconst resolveDataLabelOffset = (value, w2, seriesIndex, dataPointIndex) => {\n  if (typeof value !== \"function\") return value;\n  const resolved = value({\n    series: w2.seriesData.series,\n    seriesIndex,\n    dataPointIndex,\n    w: w2\n  });\n  return Number.isFinite(resolved) ? resolved : 0;\n};\nclass DataLabels {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext | null} ctx\n   */\n  constructor(w2, ctx = null) {\n    this.w = w2;\n    this.ctx = ctx;\n  }\n  // When there are many datalabels to be printed, and some of them overlaps each other in the same series, this method will take care of that\n  // Also, when datalabels exceeds the drawable area and get clipped off, we need to adjust and move some pixels to make them visible again\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @param {any} val\n   * @param {number} i\n   * @param {number} dataPointIndex\n   * @param {boolean} alwaysDrawDataLabel\n   * @param {string} fontSize\n   */\n  dataLabelsCorrection(x, y, val, i2, dataPointIndex, alwaysDrawDataLabel, fontSize) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    let drawnextLabel = false;\n    const textRects = (\n      /** @type {any} */\n      graphics.getTextRects(val, fontSize)\n    );\n    const width = textRects.width;\n    const height = textRects.height;\n    if (y < 0) y = 0;\n    if (y > w2.layout.gridHeight + height) y = w2.layout.gridHeight + height / 2;\n    if (typeof /** @type {any} */\n    w2.globals.dataLabelsRects[i2] === \"undefined\") {\n      w2.globals.dataLabelsRects[i2] = [];\n    }\n    w2.globals.dataLabelsRects[i2].push({\n      x,\n      y,\n      width,\n      height\n    });\n    const len = (\n      /** @type {any} */\n      w2.globals.dataLabelsRects[i2].length - 2\n    );\n    const lastDrawnIndex = typeof w2.globals.lastDrawnDataLabelsIndexes[i2] !== \"undefined\" ? w2.globals.lastDrawnDataLabelsIndexes[i2][w2.globals.lastDrawnDataLabelsIndexes[i2].length - 1] : 0;\n    if (typeof /** @type {any} */\n    w2.globals.dataLabelsRects[i2][len] !== \"undefined\") {\n      const lastDataLabelRect = (\n        /** @type {any} */\n        w2.globals.dataLabelsRects[i2][lastDrawnIndex]\n      );\n      if (\n        // next label forward and x not intersecting\n        x > lastDataLabelRect.x + lastDataLabelRect.width || y > lastDataLabelRect.y + lastDataLabelRect.height || y + height < lastDataLabelRect.y || x + width < lastDataLabelRect.x\n      ) {\n        drawnextLabel = true;\n      }\n    }\n    if (dataPointIndex === 0 || alwaysDrawDataLabel) {\n      drawnextLabel = true;\n    }\n    return {\n      x,\n      y,\n      textRects,\n      drawnextLabel\n    };\n  }\n  /** @param {{type: any, pos: any, i: any, j: any, isRangeStart: any, strokeWidth?: any}} opts */\n  drawDataLabel({ type, pos, i: i2, j, isRangeStart, strokeWidth = 2 }) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const dataLabelsConfig = w2.config.dataLabels;\n    let x = 0;\n    let y = 0;\n    let dataPointIndex = j;\n    let elDataLabelsWrap = null;\n    const seriesCollapsed = w2.globals.collapsedSeriesIndices.indexOf(i2) !== -1;\n    if (seriesCollapsed || !dataLabelsConfig.enabled || !Array.isArray(pos.x)) {\n      return elDataLabelsWrap;\n    }\n    elDataLabelsWrap = graphics.group({\n      class: \"apexcharts-data-labels\"\n    });\n    for (let q = 0; q < pos.x.length; q++) {\n      if (j === 1 && q === 0) dataPointIndex = 0;\n      if (j === 1 && q === 1) dataPointIndex = 1;\n      x = pos.x[q] + resolveDataLabelOffset(dataLabelsConfig.offsetX, w2, i2, dataPointIndex);\n      y = pos.y[q] + resolveDataLabelOffset(dataLabelsConfig.offsetY, w2, i2, dataPointIndex) + strokeWidth;\n      if (!isNaN(x)) {\n        let val = w2.seriesData.series[i2][dataPointIndex];\n        if (type === \"rangeArea\") {\n          if (isRangeStart) {\n            val = w2.rangeData.seriesRangeStart[i2][dataPointIndex];\n          } else {\n            val = w2.rangeData.seriesRangeEnd[i2][dataPointIndex];\n          }\n        }\n        let text = \"\";\n        const getText = (v2) => {\n          return w2.config.dataLabels.formatter(v2, {\n            seriesIndex: i2,\n            dataPointIndex,\n            w: w2\n          });\n        };\n        if (w2.config.chart.type === \"bubble\") {\n          val = w2.seriesData.seriesZ[i2][dataPointIndex];\n          text = getText(val);\n          y = pos.y[q];\n          const scatter = new Scatter(\n            this.w,\n            /** @type {import('../types/internal').ChartContext} */\n            this.ctx\n          );\n          const centerTextInBubbleCoords = scatter.centerTextInBubble(y);\n          y = centerTextInBubbleCoords.y;\n        } else {\n          if (typeof val !== \"undefined\") {\n            text = getText(val);\n          }\n        }\n        let textAnchor = w2.config.dataLabels.textAnchor;\n        if (w2.globals.isSlopeChart) {\n          if (dataPointIndex === 0) {\n            textAnchor = \"end\";\n          } else if (dataPointIndex === /** @type {Record<string,any>} */\n          w2.config.series[i2].data.length - 1) {\n            textAnchor = \"start\";\n          } else {\n            textAnchor = \"middle\";\n          }\n        }\n        this.plotDataLabelsText({\n          x,\n          y,\n          text,\n          i: i2,\n          j: dataPointIndex,\n          parent: elDataLabelsWrap,\n          offsetCorrection: true,\n          dataLabelsConfig: w2.config.dataLabels,\n          textAnchor\n        });\n      }\n    }\n    return elDataLabelsWrap;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  plotDataLabelsText(opts) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    let {\n      x,\n      y,\n      i: i2,\n      j,\n      text,\n      textAnchor,\n      fontSize,\n      parent,\n      dataLabelsConfig,\n      color,\n      alwaysDrawDataLabel,\n      offsetCorrection,\n      className,\n      // some callers (radar) reuse `j` for something other than the data point\n      // index, so per-point offsets take these explicit indices when supplied\n      seriesIndex = i2,\n      dataPointIndex = j\n    } = opts;\n    let dataLabelText = null;\n    if (Array.isArray(w2.config.dataLabels.enabledOnSeries)) {\n      if (w2.config.dataLabels.enabledOnSeries.indexOf(i2) < 0) {\n        return dataLabelText;\n      }\n    }\n    let correctedLabels = {\n      x,\n      y,\n      drawnextLabel: true,\n      textRects: null\n    };\n    if (offsetCorrection) {\n      correctedLabels = this.dataLabelsCorrection(\n        x,\n        y,\n        text,\n        i2,\n        j,\n        alwaysDrawDataLabel,\n        parseInt(\n          /** @type {any} */\n          dataLabelsConfig.style.fontSize,\n          10\n        ).toString()\n      );\n    }\n    if (!w2.interact.zoomed) {\n      x = correctedLabels.x;\n      y = correctedLabels.y;\n    }\n    if (correctedLabels.textRects) {\n      const barPad = w2.globals.barPadForNumericAxis || 0;\n      if (x < -(barPad + 20) - /** @type {any} */\n      correctedLabels.textRects.width || x > w2.layout.gridWidth + /** @type {any} */\n      correctedLabels.textRects.width + barPad + 30) {\n        text = \"\";\n      }\n    }\n    let dataLabelColor = w2.globals.dataLabels.style.colors[i2];\n    if ((w2.config.chart.type === \"bar\" || w2.config.chart.type === \"rangeBar\") && w2.config.plotOptions.bar.distributed || w2.config.dataLabels.distributed) {\n      dataLabelColor = w2.globals.dataLabels.style.colors[j];\n    }\n    if (typeof dataLabelColor === \"function\") {\n      dataLabelColor = /** @type {any} */\n      dataLabelColor({\n        series: w2.seriesData.series,\n        seriesIndex: i2,\n        dataPointIndex: j,\n        w: w2\n      });\n    }\n    if (color) {\n      dataLabelColor = color;\n    }\n    const offsetsHandledElsewhere = w2.config.chart.type === \"bar\" || w2.config.chart.type === \"rangeBar\";\n    const resolvedOffX = offsetsHandledElsewhere ? 0 : resolveDataLabelOffset(\n      dataLabelsConfig.offsetX,\n      w2,\n      seriesIndex,\n      dataPointIndex\n    );\n    const resolvedOffY = offsetsHandledElsewhere ? 0 : resolveDataLabelOffset(\n      dataLabelsConfig.offsetY,\n      w2,\n      seriesIndex,\n      dataPointIndex\n    );\n    let offX = resolvedOffX;\n    const offY = resolvedOffY;\n    if (w2.globals.isSlopeChart) {\n      if (j !== 0) {\n        offX = resolvedOffX * -2 + 5;\n      }\n      if (j !== 0 && j !== /** @type {Record<string,any>} */\n      w2.config.series[i2].data.length - 1) {\n        offX = 0;\n      }\n    }\n    if (correctedLabels.drawnextLabel) {\n      if (textAnchor === \"middle\") {\n        if (x === w2.layout.gridWidth) {\n          textAnchor = \"end\";\n        }\n      }\n      dataLabelText = graphics.drawText({\n        x: x + offX,\n        y: y + offY,\n        foreColor: dataLabelColor,\n        textAnchor: textAnchor || dataLabelsConfig.textAnchor,\n        text,\n        fontSize: fontSize || dataLabelsConfig.style.fontSize,\n        fontFamily: dataLabelsConfig.style.fontFamily,\n        fontWeight: dataLabelsConfig.style.fontWeight || \"normal\"\n      });\n      dataLabelText.attr({\n        class: className || \"apexcharts-datalabel\",\n        cx: x,\n        cy: y\n      });\n      if (dataLabelsConfig.dropShadow.enabled) {\n        const textShadow = dataLabelsConfig.dropShadow;\n        const filters = new Filters(this.w);\n        filters.dropShadow(dataLabelText, textShadow);\n      }\n      parent.add(dataLabelText);\n      applyProgressiveReveal(dataLabelText, x, w2);\n      if (typeof w2.globals.lastDrawnDataLabelsIndexes[i2] === \"undefined\") {\n        w2.globals.lastDrawnDataLabelsIndexes[i2] = [];\n      }\n      w2.globals.lastDrawnDataLabelsIndexes[i2].push(j);\n    }\n    return dataLabelText;\n  }\n  /**\n   * @param {Element} el\n   * @param {{x: number, y: number, width: number, height: number}} coords\n   */\n  addBackgroundToDataLabel(el, coords) {\n    const w2 = this.w;\n    const bCnf = w2.config.dataLabels.background;\n    const paddingH = bCnf.padding;\n    const paddingV = bCnf.padding / 2;\n    const width = coords.width;\n    const height = coords.height;\n    const graphics = new Graphics(this.w);\n    const elRect = graphics.drawRect(\n      coords.x - paddingH,\n      coords.y - paddingV / 2,\n      width + paddingH * 2,\n      height + paddingV,\n      bCnf.borderRadius,\n      w2.config.chart.background === \"transparent\" || !w2.config.chart.background ? \"#fff\" : w2.config.chart.background,\n      bCnf.opacity,\n      bCnf.borderWidth,\n      bCnf.borderColor\n    );\n    if (bCnf.dropShadow.enabled) {\n      const filters = new Filters(this.w);\n      filters.dropShadow(elRect, bCnf.dropShadow);\n    }\n    return elRect;\n  }\n  dataLabelsBackground() {\n    var _a;\n    const w2 = this.w;\n    if (w2.config.chart.type === \"bubble\") return;\n    const elDataLabels = w2.dom.baseEl.querySelectorAll(\n      \".apexcharts-datalabels text\"\n    );\n    for (let i2 = 0; i2 < elDataLabels.length; i2++) {\n      const el = elDataLabels[i2];\n      const coords = (\n        /** @type {SVGGraphicsElement} */\n        el.getBBox()\n      );\n      let elRect = null;\n      if (coords.width && coords.height) {\n        elRect = this.addBackgroundToDataLabel(el, coords);\n      }\n      if (elRect) {\n        (_a = el.parentNode) == null ? void 0 : _a.insertBefore(elRect.node, el);\n        const background = w2.config.dataLabels.background.backgroundColor || el.getAttribute(\"fill\");\n        const shouldAnim = w2.config.chart.animations.enabled && !w2.globals.resized && !w2.globals.dataChanged;\n        if (shouldAnim) {\n          elRect.animate().attr({ fill: background });\n        } else {\n          elRect.attr({ fill: background });\n        }\n        el.setAttribute(\"fill\", w2.config.dataLabels.background.foreColor);\n        const cxAttr = el.getAttribute(\"cx\");\n        if (cxAttr !== null) {\n          applyProgressiveReveal(elRect, parseFloat(cxAttr), w2);\n        }\n      }\n    }\n  }\n  bringForward() {\n    const w2 = this.w;\n    const elDataLabelsNodes = w2.dom.baseEl.querySelectorAll(\n      \".apexcharts-datalabels\"\n    );\n    const elSeries = w2.dom.baseEl.querySelector(\n      \".apexcharts-plot-series:last-child\"\n    );\n    for (let i2 = 0; i2 < elDataLabelsNodes.length; i2++) {\n      if (elSeries) {\n        elSeries.insertBefore(elDataLabelsNodes[i2], elSeries.nextSibling);\n      }\n    }\n  }\n}\nclass PerformanceCache {\n  /**\n   * Invalidate all caches\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   */\n  static invalidateAll(w2) {\n    if (!w2 || !w2.globals) return;\n    if (w2.globals.cachedSelectors) {\n      w2.globals.cachedSelectors = {};\n    }\n    if (w2.globals.domCache) {\n      w2.globals.domCache.clear();\n    }\n    w2.globals.dimensionCache = {};\n  }\n  /**\n   * Invalidate dimension cache only\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   */\n  static invalidateDimensions(w2) {\n    if (!w2 || !w2.globals) return;\n    w2.globals.dimensionCache = {};\n  }\n  /**\n   * Invalidate selector cache only\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   */\n  static invalidateSelectors(w2) {\n    if (!w2 || !w2.globals) return;\n    if (w2.globals.cachedSelectors) {\n      w2.globals.cachedSelectors = {};\n    }\n  }\n  /**\n   * Get cached selector result or compute and cache it\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   * @param {string} key - Cache key\n   * @param {Function} queryFn - Function to execute if not cached\n   * @returns {*} Cached or newly computed result\n   */\n  static getCachedSelector(w2, key, queryFn) {\n    if (!w2 || !w2.globals) return queryFn();\n    if (!w2.globals.cachedSelectors) {\n      w2.globals.cachedSelectors = {};\n    }\n    if (!w2.globals.cachedSelectors[key]) {\n      w2.globals.cachedSelectors[key] = queryFn();\n    }\n    return w2.globals.cachedSelectors[key];\n  }\n  /**\n   * Get cached dimension or compute and cache it\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   * @param {string} key - Cache key\n   * @param {Function} computeFn - Function to compute dimensions\n   * @param {number} maxAge - Maximum cache age in milliseconds (default: 1000ms)\n   * @returns {*} Cached or newly computed dimensions\n   */\n  static getCachedDimension(w2, key, computeFn, maxAge = 1e3) {\n    if (!w2 || !w2.globals) return computeFn();\n    if (!w2.globals.dimensionCache) {\n      w2.globals.dimensionCache = {};\n    }\n    const cache = w2.globals.dimensionCache[key];\n    const now = Date.now();\n    if (cache && cache.lastUpdate && now - cache.lastUpdate < maxAge) {\n      return cache.value;\n    }\n    const value = computeFn();\n    w2.globals.dimensionCache[key] = {\n      value,\n      lastUpdate: now\n    };\n    return value;\n  }\n  /**\n   * Cache a DOM element reference\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   * @param {string} key - Cache key\n   * @param {Element} element - DOM element to cache\n   */\n  static cacheDOMElement(w2, key, element) {\n    if (!w2 || !w2.globals) return;\n    if (!w2.globals.domCache) {\n      w2.globals.domCache = /* @__PURE__ */ new Map();\n    }\n    w2.globals.domCache.set(key, element);\n  }\n  /**\n   * Get cached DOM element\n   * @param {import('../types/internal').ChartStateW} w - ApexCharts state object\n   * @param {string} key - Cache key\n   * @returns {Element|null} Cached element or null\n   */\n  static getCachedDOMElement(w2, key) {\n    if (!w2 || !w2.globals || !w2.globals.domCache) return null;\n    return w2.globals.domCache.get(key) || null;\n  }\n}\nclass AxesUtils {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   */\n  constructor(w2, { theme = null, timeScale = null } = {}) {\n    this.w = w2;\n    this.theme = theme;\n    this.timeScale = timeScale;\n  }\n  // Based on the formatter function, get the label text and position\n  /**\n   * @param {any[]} labels\n   * @param {Array<Record<string, any>>} timescaleLabels\n   * @param {number} x\n   * @param {number} i\n   * @param {any[]} drawnLabels\n   */\n  getLabel(labels, timescaleLabels, x, i2, drawnLabels = [], fontSize = \"12px\", isLeafGroup = true) {\n    const w2 = this.w;\n    const rawLabel = typeof labels[i2] === \"undefined\" ? \"\" : labels[i2];\n    let label = rawLabel;\n    const xlbFormatter = w2.formatters.xLabelFormatter;\n    const customFormatter = w2.config.xaxis.labels.formatter;\n    const xFormat = new Formatters(this.w);\n    const timestamp = rawLabel;\n    if (isLeafGroup) {\n      label = /** @type {any} */\n      xFormat.xLabelFormat(\n        xlbFormatter,\n        rawLabel,\n        timestamp,\n        {\n          i: i2,\n          dateFormatter: new DateTime(this.w).formatDate,\n          w: w2\n        }\n      );\n      if (customFormatter !== void 0) {\n        label = customFormatter(rawLabel, labels[i2], {\n          i: i2,\n          dateFormatter: new DateTime(this.w).formatDate,\n          w: w2\n        });\n      }\n    }\n    if (timescaleLabels.length > 0) {\n      x = timescaleLabels[i2].position;\n      label = timescaleLabels[i2].value;\n    } else {\n      if (w2.config.xaxis.type === \"datetime\" && customFormatter === void 0) {\n        label = \"\";\n      }\n    }\n    if (typeof label === \"undefined\") label = \"\";\n    label = Array.isArray(label) ? label : label.toString();\n    const graphics = new Graphics(this.w);\n    let textRect = {};\n    if (w2.layout.rotateXLabels && isLeafGroup) {\n      textRect = graphics.getTextRects(\n        label,\n        parseInt(fontSize, 10).toString(),\n        null,\n        `rotate(${w2.config.xaxis.labels.rotate} 0 0)`,\n        false\n      );\n    } else {\n      textRect = graphics.getTextRects(label, parseInt(fontSize, 10).toString());\n    }\n    const allowDuplicatesInTimeScale = !w2.config.xaxis.labels.showDuplicates && this.timeScale;\n    if (!Array.isArray(label) && (String(label) === \"NaN\" || drawnLabels.indexOf(label) >= 0 && allowDuplicatesInTimeScale)) {\n      label = \"\";\n    }\n    return {\n      x,\n      text: label,\n      textRect\n    };\n  }\n  /**\n   * @param {number} i\n   * @param {any} label\n   * @param {number} labelsLen\n   */\n  checkLabelBasedOnTickamount(i2, label, labelsLen) {\n    const w2 = this.w;\n    let ticks = w2.config.xaxis.tickAmount;\n    if (ticks === \"dataPoints\") ticks = Math.round(w2.layout.gridWidth / 120);\n    if (ticks > labelsLen) return label;\n    const tickMultiple = Math.round(labelsLen / (ticks + 1));\n    if (i2 % tickMultiple === 0) {\n      return label;\n    } else {\n      label.text = \"\";\n    }\n    return label;\n  }\n  /**\n   * @param {number} i\n   * @param {any} label\n   * @param {number} labelsLen\n   * @param {any[]} drawnLabels\n   * @param {Array<Record<string, any>>} drawnLabelsRects\n   */\n  checkForOverflowingLabels(i2, label, labelsLen, drawnLabels, drawnLabelsRects) {\n    const w2 = this.w;\n    if (i2 === 0) {\n      if (w2.globals.skipFirstTimelinelabel) {\n        label.text = \"\";\n      }\n    }\n    if (i2 === labelsLen - 1) {\n      if (w2.globals.skipLastTimelinelabel) {\n        label.text = \"\";\n      }\n    }\n    if (w2.config.xaxis.labels.hideOverlappingLabels && drawnLabels.length > 0) {\n      const prev = drawnLabelsRects[drawnLabelsRects.length - 1];\n      if (w2.config.xaxis.labels.trim && w2.config.xaxis.type !== \"datetime\") {\n        return label;\n      }\n      if (\n        /** @type {any} */\n        label.x < prev.textRect.width / (w2.layout.rotateXLabels ? (\n          // Floor the rotation at 1deg: rotateAlways:true forces\n          // rotateXLabels even with rotate:0, and a 0 divisor here makes the\n          // spread Infinity, blanking every label after the first.\n          Math.max(Math.abs(w2.config.xaxis.labels.rotate), 1) / 12\n        ) : 1.01) + prev.x\n      ) {\n        label.text = \"\";\n      }\n    }\n    return label;\n  }\n  /**\n   * @param {number} i\n   * @param {any[]} labels\n   */\n  checkForReversedLabels(i2, labels) {\n    const w2 = this.w;\n    if (w2.config.yaxis[i2] && w2.config.yaxis[i2].reversed) {\n      labels.reverse();\n    }\n    return labels;\n  }\n  /**\n   * @param {number} index\n   */\n  yAxisAllSeriesCollapsed(index) {\n    const gl = this.w.globals;\n    return !gl.seriesYAxisMap[index].some((si) => {\n      return gl.collapsedSeriesIndices.indexOf(si) === -1;\n    });\n  }\n  // Method to translate annotation.yAxisIndex values from\n  // seriesName-as-a-string values to seriesName-as-an-array values (old style\n  // series mapping to new style).\n  /**\n   * @param {number} index\n   */\n  translateYAxisIndex(index) {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const yaxis = w2.config.yaxis;\n    const newStyle = w2.seriesData.series.length > yaxis.length || /**\n     * @param {Record<string, any>} a\n     */\n    yaxis.some((a2) => Array.isArray(a2.seriesName));\n    if (newStyle) {\n      return index;\n    } else {\n      return gl.seriesYAxisReverseMap[index];\n    }\n  }\n  /**\n   * @param {number} index\n   */\n  isYAxisHidden(index) {\n    const w2 = this.w;\n    const yaxis = w2.config.yaxis[index];\n    if (!yaxis.show || this.yAxisAllSeriesCollapsed(index)) {\n      return true;\n    }\n    if (!yaxis.showForNullSeries) {\n      const seriesIndices = w2.globals.seriesYAxisMap[index];\n      const coreUtils = new CoreUtils(this.w);\n      return seriesIndices.every((si) => coreUtils.isSeriesNull(si));\n    }\n    return false;\n  }\n  // get the label color for y-axis\n  // realIndex is the actual series index, while i is the tick Index\n  /**\n   * @param {string[]} yColors\n   * @param {number} realIndex\n   */\n  getYAxisForeColor(yColors, realIndex) {\n    var _a;\n    const w2 = this.w;\n    if (Array.isArray(yColors) && w2.globals.yAxisScale[realIndex]) {\n      (_a = this.theme) == null ? void 0 : _a.pushExtraColors(\n        yColors,\n        w2.globals.yAxisScale[realIndex].result.length,\n        false\n      );\n    }\n    return yColors;\n  }\n  /**\n   * @param {number} x\n   * @param {number} tickAmount\n   * @param {Record<string, any>} axisBorder\n   * @param {Record<string, any>} axisTicks\n   * @param {number} realIndex\n   * @param {any} labelsDivider\n   * @param {any} elYaxis\n   */\n  drawYAxisTicks(x, tickAmount, axisBorder, axisTicks, realIndex, labelsDivider, elYaxis) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    let tY = w2.layout.translateY + w2.config.yaxis[realIndex].labels.offsetY;\n    if (w2.globals.isBarHorizontal) {\n      tY = 0;\n    } else if (w2.config.chart.type === \"heatmap\") {\n      tY += labelsDivider / 2;\n    }\n    if (axisTicks.show && tickAmount > 0) {\n      if (w2.config.yaxis[realIndex].opposite === true) x = x + axisTicks.width;\n      for (let i2 = tickAmount; i2 >= 0; i2--) {\n        const elTick = graphics.drawLine(\n          x + axisBorder.offsetX - axisTicks.width + axisTicks.offsetX,\n          tY + axisTicks.offsetY,\n          x + axisBorder.offsetX + axisTicks.offsetX,\n          tY + axisTicks.offsetY,\n          axisTicks.color\n        );\n        elYaxis.add(elTick);\n        tY += labelsDivider;\n      }\n    }\n  }\n}\nclass XAxis {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   * @param {any} [elgrid]\n   */\n  constructor(w2, ctx, elgrid) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.elgrid = elgrid;\n    this.axesUtils = new AxesUtils(w2, {\n      theme: ctx.theme,\n      timeScale: ctx.timeScale\n    });\n    this.xaxisLabels = w2.labelData.labels.slice();\n    if (w2.labelData.timescaleLabels.length > 0 && !w2.globals.isBarHorizontal) {\n      this.xaxisLabels = w2.labelData.timescaleLabels.slice();\n    }\n    if (w2.config.xaxis.overwriteCategories) {\n      this.xaxisLabels = w2.config.xaxis.overwriteCategories;\n    }\n    this.drawnLabels = [];\n    this.drawnLabelsRects = [];\n    if (w2.config.xaxis.position === \"top\") {\n      this.offY = 0;\n    } else {\n      this.offY = w2.layout.gridHeight;\n    }\n    this.offY = this.offY + w2.config.xaxis.axisBorder.offsetY;\n    this.isCategoryBarHorizontal = w2.config.chart.type === \"bar\" && w2.config.plotOptions.bar.horizontal;\n    this.xaxisFontSize = w2.config.xaxis.labels.style.fontSize;\n    this.xaxisFontFamily = w2.config.xaxis.labels.style.fontFamily;\n    this.xaxisForeColors = w2.config.xaxis.labels.style.colors;\n    this.xaxisBorderWidth = w2.config.xaxis.axisBorder.width;\n    if (this.isCategoryBarHorizontal) {\n      this.xaxisBorderWidth = w2.config.yaxis[0].axisBorder.width.toString();\n    }\n    if (String(this.xaxisBorderWidth).indexOf(\"%\") > -1) {\n      this.xaxisBorderWidth = w2.layout.gridWidth * parseInt(this.xaxisBorderWidth, 10) / 100;\n    } else {\n      this.xaxisBorderWidth = parseInt(this.xaxisBorderWidth, 10);\n    }\n    this.xaxisBorderHeight = w2.config.xaxis.axisBorder.height;\n    this.yaxis = w2.config.yaxis[0];\n  }\n  drawXaxis() {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const elXaxis = graphics.group({\n      class: \"apexcharts-xaxis\",\n      transform: `translate(${w2.config.xaxis.offsetX}, ${w2.config.xaxis.offsetY})`\n    });\n    const elXaxisTexts = graphics.group({\n      class: \"apexcharts-xaxis-texts-g\",\n      transform: `translate(${w2.layout.translateXAxisX}, ${w2.layout.translateXAxisY})`\n    });\n    elXaxis.add(elXaxisTexts);\n    let labels = [];\n    for (let i2 = 0; i2 < this.xaxisLabels.length; i2++) {\n      labels.push(this.xaxisLabels[i2]);\n    }\n    this.drawXAxisLabelAndGroup(\n      true,\n      graphics,\n      elXaxisTexts,\n      labels,\n      w2.axisFlags.isXNumeric,\n      (i2, colWidth) => colWidth\n    );\n    if (w2.labelData.hasXaxisGroups) {\n      const labelsGroup = w2.labelData.groups;\n      labels = [];\n      for (let i2 = 0; i2 < labelsGroup.length; i2++) {\n        labels.push(labelsGroup[i2].title);\n      }\n      const overwriteStyles = (\n        /** @type {any} */\n        {}\n      );\n      if (w2.config.xaxis.group.style) {\n        overwriteStyles.xaxisFontSize = w2.config.xaxis.group.style.fontSize;\n        overwriteStyles.xaxisFontFamily = w2.config.xaxis.group.style.fontFamily;\n        overwriteStyles.xaxisForeColors = w2.config.xaxis.group.style.colors;\n        overwriteStyles.fontWeight = w2.config.xaxis.group.style.fontWeight;\n        overwriteStyles.cssClass = w2.config.xaxis.group.style.cssClass;\n      }\n      this.drawXAxisLabelAndGroup(\n        false,\n        graphics,\n        elXaxisTexts,\n        labels,\n        false,\n        (i2, colWidth) => labelsGroup[i2].cols * colWidth,\n        overwriteStyles\n      );\n    }\n    if (w2.config.xaxis.title.text !== void 0) {\n      const elXaxisTitle = graphics.group({\n        class: \"apexcharts-xaxis-title\"\n      });\n      const elXAxisTitleText = graphics.drawText({\n        x: w2.layout.gridWidth / 2 + w2.config.xaxis.title.offsetX,\n        y: this.offY + parseFloat(this.xaxisFontSize) + (w2.config.xaxis.position === \"bottom\" ? w2.layout.xAxisLabelsHeight : -w2.layout.xAxisLabelsHeight - 10) + w2.config.xaxis.title.offsetY,\n        text: w2.config.xaxis.title.text,\n        textAnchor: \"middle\",\n        fontSize: w2.config.xaxis.title.style.fontSize,\n        fontFamily: w2.config.xaxis.title.style.fontFamily,\n        fontWeight: w2.config.xaxis.title.style.fontWeight,\n        foreColor: w2.config.xaxis.title.style.color,\n        cssClass: \"apexcharts-xaxis-title-text \" + w2.config.xaxis.title.style.cssClass\n      });\n      elXaxisTitle.add(elXAxisTitleText);\n      elXaxis.add(elXaxisTitle);\n    }\n    if (w2.config.xaxis.axisBorder.show) {\n      const offX = w2.globals.barPadForNumericAxis;\n      const elHorzLine = graphics.drawLine(\n        w2.globals.padHorizontal + w2.config.xaxis.axisBorder.offsetX - offX,\n        this.offY,\n        this.xaxisBorderWidth + offX,\n        this.offY,\n        w2.config.xaxis.axisBorder.color,\n        0,\n        this.xaxisBorderHeight\n      );\n      if (this.elgrid && this.elgrid.elGridBorders && w2.config.grid.show) {\n        this.elgrid.elGridBorders.add(elHorzLine);\n      } else {\n        elXaxis.add(elHorzLine);\n      }\n    }\n    return elXaxis;\n  }\n  /**\n   * @param {Record<string, any>} [overwriteStyles]\n   * @param {boolean} isLeafGroup\n   * @param {import('../Graphics').default} graphics\n   * @param {any} elXaxisTexts\n   * @param {any[]} labels\n   * @param {boolean} isXNumeric\n   * @param {any} colWidthCb\n   */\n  drawXAxisLabelAndGroup(isLeafGroup, graphics, elXaxisTexts, labels, isXNumeric, colWidthCb, overwriteStyles = {}) {\n    var _a, _b;\n    const drawnLabels = [];\n    const drawnLabelsRects = [];\n    const w2 = this.w;\n    const xaxisFontSize = overwriteStyles.xaxisFontSize || this.xaxisFontSize;\n    const xaxisFontFamily = overwriteStyles.xaxisFontFamily || this.xaxisFontFamily;\n    const xaxisForeColors = overwriteStyles.xaxisForeColors || this.xaxisForeColors;\n    const fontWeight = overwriteStyles.fontWeight || w2.config.xaxis.labels.style.fontWeight;\n    const cssClass = overwriteStyles.cssClass || w2.config.xaxis.labels.style.cssClass;\n    let colWidth;\n    let xPos = w2.globals.padHorizontal;\n    const labelsLen = labels.length;\n    let dataPoints = w2.config.xaxis.type === \"category\" ? w2.globals.dataPoints : labelsLen;\n    if (dataPoints === 0 && labelsLen > dataPoints) dataPoints = labelsLen;\n    if (isXNumeric) {\n      const len = Math.max(\n        Number(w2.config.xaxis.tickAmount) || 1,\n        dataPoints > 1 ? dataPoints - 1 : dataPoints\n      );\n      colWidth = w2.layout.gridWidth / Math.min(len, labelsLen - 1);\n      xPos = xPos + colWidthCb(0, colWidth) / 2 + w2.config.xaxis.labels.offsetX;\n    } else {\n      colWidth = w2.layout.gridWidth / dataPoints;\n      xPos = xPos + colWidthCb(0, colWidth) + w2.config.xaxis.labels.offsetX;\n    }\n    for (let i2 = 0; i2 <= labelsLen - 1; i2++) {\n      let x = xPos - colWidthCb(i2, colWidth) / 2 + w2.config.xaxis.labels.offsetX;\n      if (i2 === 0 && labelsLen === 1 && colWidth / 2 === xPos && dataPoints === 1) {\n        x = w2.layout.gridWidth / 2;\n      }\n      let label = this.axesUtils.getLabel(\n        labels,\n        w2.labelData.timescaleLabels,\n        x,\n        i2,\n        drawnLabels,\n        xaxisFontSize,\n        isLeafGroup\n      );\n      let offsetYCorrection = 28;\n      if (w2.layout.rotateXLabels && isLeafGroup) {\n        offsetYCorrection = 22;\n      }\n      if (w2.config.xaxis.title.text && w2.config.xaxis.position === \"top\") {\n        offsetYCorrection += parseFloat(w2.config.xaxis.title.style.fontSize) + 2;\n      }\n      if (!isLeafGroup) {\n        offsetYCorrection = offsetYCorrection + parseFloat(xaxisFontSize) + (w2.layout.xAxisLabelsHeight - w2.layout.xAxisGroupLabelsHeight) + (w2.layout.rotateXLabels ? 10 : 0);\n      }\n      const isCategoryTickAmounts = typeof w2.config.xaxis.tickAmount !== \"undefined\" && w2.config.xaxis.tickAmount !== \"dataPoints\" && w2.config.xaxis.type !== \"datetime\";\n      if (isCategoryTickAmounts) {\n        label = this.axesUtils.checkLabelBasedOnTickamount(i2, label, labelsLen);\n      } else {\n        label = this.axesUtils.checkForOverflowingLabels(\n          i2,\n          label,\n          labelsLen,\n          drawnLabels,\n          drawnLabelsRects\n        );\n      }\n      const getCatForeColor = () => {\n        return isLeafGroup && w2.config.xaxis.convertedCatToNumeric ? xaxisForeColors[w2.globals.minX + i2 - 1] : xaxisForeColors[i2];\n      };\n      const labelRectWidth = (\n        /** @type {any} */\n        (_b = (_a = label.textRect) == null ? void 0 : _a.width) != null ? _b : 0\n      );\n      const halfWidth = labelRectWidth / 2;\n      const fullyOutsideGrid = label.x + halfWidth < 0;\n      if (w2.config.xaxis.labels.show && !fullyOutsideGrid) {\n        const elText = graphics.drawText({\n          x: label.x,\n          y: this.offY + w2.config.xaxis.labels.offsetY + offsetYCorrection - (w2.config.xaxis.position === \"top\" ? w2.layout.xAxisHeight + w2.config.xaxis.axisTicks.height - 2 : 0),\n          text: label.text,\n          textAnchor: \"middle\",\n          fontWeight,\n          fontSize: xaxisFontSize,\n          fontFamily: xaxisFontFamily,\n          foreColor: Array.isArray(xaxisForeColors) ? getCatForeColor() : xaxisForeColors,\n          isPlainText: false,\n          cssClass: (isLeafGroup ? \"apexcharts-xaxis-label \" : \"apexcharts-xaxis-group-label \") + cssClass\n        });\n        elXaxisTexts.add(elText);\n        elText.on(\"click\", (e2) => {\n          if (typeof w2.config.chart.events.xAxisLabelClick === \"function\") {\n            const opts = Object.assign({}, w2, {\n              labelIndex: i2\n            });\n            w2.config.chart.events.xAxisLabelClick(e2, this.ctx, opts);\n          }\n        });\n        if (isLeafGroup) {\n          const elTooltipTitle = BrowserAPIs.createElementNS(SVGNS$2, \"title\");\n          elTooltipTitle.textContent = Array.isArray(label.text) ? label.text.join(\" \") : label.text;\n          elText.node.appendChild(elTooltipTitle);\n          if (label.text !== \"\") {\n            drawnLabels.push(label.text);\n            drawnLabelsRects.push(label);\n          }\n        }\n      }\n      if (i2 < labelsLen - 1) {\n        xPos = xPos + colWidthCb(i2 + 1, colWidth);\n      }\n    }\n  }\n  // this actually becomes the vertical axis (for bar charts)\n  /**\n   * @param {number} realIndex\n   */\n  drawXaxisInversed(realIndex) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const translateYAxisX = w2.config.yaxis[0].opposite ? w2.globals.translateYAxisX[realIndex] : 0;\n    const elYaxis = graphics.group({\n      class: \"apexcharts-yaxis apexcharts-xaxis-inversed\",\n      rel: realIndex\n    });\n    const elYaxisTexts = graphics.group({\n      class: \"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g\",\n      transform: \"translate(\" + translateYAxisX + \", 0)\"\n    });\n    elYaxis.add(elYaxisTexts);\n    const labels = [];\n    if (w2.config.yaxis[realIndex].show) {\n      for (let i2 = 0; i2 < this.xaxisLabels.length; i2++) {\n        labels.push(this.xaxisLabels[i2]);\n      }\n    }\n    const colHeight = w2.layout.gridHeight / labels.length;\n    let yPos = -(colHeight / 2.2);\n    const lbFormatter = w2.formatters.yLabelFormatters[0];\n    const ylabels = w2.config.yaxis[0].labels;\n    if (ylabels.show) {\n      for (let i2 = 0; i2 <= labels.length - 1; i2++) {\n        let label = typeof labels[i2] === \"undefined\" ? \"\" : labels[i2];\n        label = lbFormatter(label, {\n          seriesIndex: realIndex,\n          dataPointIndex: i2,\n          w: w2\n        });\n        const yColors = this.axesUtils.getYAxisForeColor(\n          ylabels.style.colors,\n          realIndex\n        );\n        const getForeColor = () => {\n          return Array.isArray(yColors) ? yColors[i2] : yColors;\n        };\n        let multiY = 0;\n        if (Array.isArray(label)) {\n          multiY = label.length / 2 * parseInt(ylabels.style.fontSize, 10);\n        }\n        let offsetX = ylabels.offsetX - 15;\n        let textAnchor = \"end\";\n        if (this.yaxis.opposite) {\n          textAnchor = \"start\";\n        }\n        if (w2.config.yaxis[0].labels.align === \"left\") {\n          offsetX = ylabels.offsetX;\n          textAnchor = \"start\";\n        } else if (w2.config.yaxis[0].labels.align === \"center\") {\n          offsetX = ylabels.offsetX;\n          textAnchor = \"middle\";\n        } else if (w2.config.yaxis[0].labels.align === \"right\") {\n          textAnchor = \"end\";\n        }\n        const elLabel = graphics.drawText({\n          x: offsetX,\n          y: yPos + colHeight + ylabels.offsetY - multiY,\n          text: label,\n          textAnchor,\n          foreColor: getForeColor(),\n          fontSize: ylabels.style.fontSize,\n          fontFamily: ylabels.style.fontFamily,\n          fontWeight: ylabels.style.fontWeight,\n          isPlainText: false,\n          cssClass: \"apexcharts-yaxis-label \" + ylabels.style.cssClass,\n          maxWidth: ylabels.maxWidth\n        });\n        elYaxisTexts.add(elLabel);\n        elLabel.on(\"click\", (e2) => {\n          if (typeof w2.config.chart.events.xAxisLabelClick === \"function\") {\n            const opts = Object.assign({}, w2, {\n              labelIndex: i2\n            });\n            w2.config.chart.events.xAxisLabelClick(e2, this.ctx, opts);\n          }\n        });\n        const elTooltipTitle = BrowserAPIs.createElementNS(SVGNS$2, \"title\");\n        elTooltipTitle.textContent = Array.isArray(label) ? label.join(\" \") : label;\n        elLabel.node.appendChild(elTooltipTitle);\n        if (w2.config.yaxis[realIndex].labels.rotate !== 0) {\n          const labelRotatingCenter = graphics.rotateAroundCenter(elLabel.node);\n          elLabel.node.setAttribute(\n            \"transform\",\n            `rotate(${w2.config.yaxis[realIndex].labels.rotate} 0 ${labelRotatingCenter.y})`\n          );\n        }\n        yPos = yPos + colHeight;\n      }\n    }\n    if (w2.config.yaxis[0].title.text !== void 0) {\n      const elXaxisTitle = graphics.group({\n        class: \"apexcharts-yaxis-title apexcharts-xaxis-title-inversed\",\n        transform: \"translate(\" + translateYAxisX + \", 0)\"\n      });\n      const elXAxisTitleText = graphics.drawText({\n        x: w2.config.yaxis[0].title.offsetX,\n        y: w2.layout.gridHeight / 2 + w2.config.yaxis[0].title.offsetY,\n        text: w2.config.yaxis[0].title.text,\n        textAnchor: \"middle\",\n        foreColor: w2.config.yaxis[0].title.style.color,\n        fontSize: w2.config.yaxis[0].title.style.fontSize,\n        fontWeight: w2.config.yaxis[0].title.style.fontWeight,\n        fontFamily: w2.config.yaxis[0].title.style.fontFamily,\n        cssClass: \"apexcharts-yaxis-title-text \" + w2.config.yaxis[0].title.style.cssClass\n      });\n      elXaxisTitle.add(elXAxisTitleText);\n      elYaxis.add(elXaxisTitle);\n    }\n    let offX = 0;\n    if (this.isCategoryBarHorizontal && w2.config.yaxis[0].opposite) {\n      offX = w2.layout.gridWidth;\n    }\n    const axisBorder = w2.config.xaxis.axisBorder;\n    if (axisBorder.show) {\n      const elVerticalLine = graphics.drawLine(\n        w2.globals.padHorizontal + axisBorder.offsetX + offX,\n        1 + axisBorder.offsetY,\n        w2.globals.padHorizontal + axisBorder.offsetX + offX,\n        w2.layout.gridHeight + axisBorder.offsetY,\n        axisBorder.color,\n        0\n      );\n      if (this.elgrid && this.elgrid.elGridBorders && w2.config.grid.show) {\n        this.elgrid.elGridBorders.add(elVerticalLine);\n      } else {\n        elYaxis.add(elVerticalLine);\n      }\n    }\n    if (w2.config.yaxis[0].axisTicks.show) {\n      this.axesUtils.drawYAxisTicks(\n        offX,\n        labels.length,\n        w2.config.yaxis[0].axisBorder,\n        w2.config.yaxis[0].axisTicks,\n        0,\n        colHeight,\n        elYaxis\n      );\n    }\n    return elYaxis;\n  }\n  /**\n   * @param {number} x1\n   * @param {number} y2\n   * @param {any} appendToElement\n   */\n  drawXaxisTicks(x1, y2, appendToElement) {\n    const w2 = this.w;\n    const x2 = x1;\n    if (x1 < 0 || x1 - 2 > w2.layout.gridWidth) return;\n    const y1 = this.offY + w2.config.xaxis.axisTicks.offsetY;\n    y2 = y2 + y1 + w2.config.xaxis.axisTicks.height;\n    if (w2.config.xaxis.position === \"top\") {\n      y2 = y1 - w2.config.xaxis.axisTicks.height;\n    }\n    if (w2.config.xaxis.axisTicks.show) {\n      const graphics = new Graphics(this.w);\n      const line = graphics.drawLine(\n        x1 + w2.config.xaxis.axisTicks.offsetX,\n        y1 + w2.config.xaxis.offsetY,\n        x2 + w2.config.xaxis.axisTicks.offsetX,\n        y2 + w2.config.xaxis.offsetY,\n        w2.config.xaxis.axisTicks.color\n      );\n      appendToElement.add(line);\n      line.node.classList.add(\"apexcharts-xaxis-tick\");\n    }\n  }\n  getXAxisTicksPositions() {\n    const w2 = this.w;\n    const xAxisTicksPositions = [];\n    const xCount = this.xaxisLabels.length;\n    let x1 = w2.globals.padHorizontal;\n    if (w2.labelData.timescaleLabels.length > 0) {\n      for (let i2 = 0; i2 < xCount; i2++) {\n        x1 = this.xaxisLabels[i2].position;\n        xAxisTicksPositions.push(x1);\n      }\n    } else {\n      const xCountForCategoryCharts = xCount;\n      for (let i2 = 0; i2 < xCountForCategoryCharts; i2++) {\n        let x1Count = xCountForCategoryCharts;\n        if (w2.axisFlags.isXNumeric && w2.config.chart.type !== \"bar\") {\n          x1Count -= 1;\n        }\n        x1 = x1 + w2.layout.gridWidth / x1Count;\n        xAxisTicksPositions.push(x1);\n      }\n    }\n    return xAxisTicksPositions;\n  }\n  // to rotate x-axis labels or to put ... for longer text in xaxis\n  xAxisLabelCorrections() {\n    var _a, _b, _c;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const xAxis = w2.dom.baseEl.querySelector(\".apexcharts-xaxis-texts-g\");\n    const xAxisTexts = w2.dom.baseEl.querySelectorAll(\n      \".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)\"\n    );\n    const yAxisTextsInversed = w2.dom.baseEl.querySelectorAll(\n      \".apexcharts-yaxis-inversed text\"\n    );\n    const xAxisTextsInversed = w2.dom.baseEl.querySelectorAll(\n      \".apexcharts-xaxis-inversed-texts-g text tspan\"\n    );\n    if (w2.layout.rotateXLabels || w2.config.xaxis.labels.rotateAlways) {\n      for (let xat = 0; xat < xAxisTexts.length; xat++) {\n        const textRotatingCenter = graphics.rotateAroundCenter(xAxisTexts[xat]);\n        textRotatingCenter.y = textRotatingCenter.y - 1;\n        textRotatingCenter.x = textRotatingCenter.x + 1;\n        xAxisTexts[xat].setAttribute(\n          \"transform\",\n          `rotate(${w2.config.xaxis.labels.rotate} ${textRotatingCenter.x} ${textRotatingCenter.y})`\n        );\n        xAxisTexts[xat].setAttribute(\"text-anchor\", `end`);\n        xAxis == null ? void 0 : xAxis.setAttribute(\"transform\", `translate(0, ${-10})`);\n        const tSpan = xAxisTexts[xat].childNodes;\n        if (w2.config.xaxis.labels.trim) {\n          Array.prototype.forEach.call(tSpan, (ts) => {\n            graphics.placeTextWithEllipsis(\n              ts,\n              ts.textContent,\n              w2.layout.xAxisLabelsHeight - (w2.config.legend.position === \"bottom\" ? 20 : 10)\n            );\n          });\n        }\n      }\n    } else {\n      const width = w2.layout.gridWidth / (w2.labelData.labels.length + 1);\n      for (let xat = 0; xat < xAxisTexts.length; xat++) {\n        const tSpan = xAxisTexts[xat].childNodes;\n        if (w2.config.xaxis.labels.trim && w2.config.xaxis.type !== \"datetime\") {\n          Array.prototype.forEach.call(tSpan, (ts) => {\n            graphics.placeTextWithEllipsis(ts, ts.textContent, width);\n          });\n        }\n      }\n    }\n    if (yAxisTextsInversed.length > 0) {\n      const firstLabelPosX = (\n        /** @type {SVGGraphicsElement} */\n        yAxisTextsInversed[yAxisTextsInversed.length - 1].getBBox()\n      );\n      const lastLabelPosX = (\n        /** @type {SVGGraphicsElement} */\n        yAxisTextsInversed[0].getBBox()\n      );\n      if (firstLabelPosX.x < -20) {\n        (_a = yAxisTextsInversed[yAxisTextsInversed.length - 1].parentNode) == null ? void 0 : _a.removeChild(\n          yAxisTextsInversed[yAxisTextsInversed.length - 1]\n        );\n      }\n      if (lastLabelPosX.x + lastLabelPosX.width > w2.layout.gridWidth && !w2.globals.isBarHorizontal) {\n        (_b = yAxisTextsInversed[0].parentNode) == null ? void 0 : _b.removeChild(yAxisTextsInversed[0]);\n      }\n      for (let xat = 0; xat < xAxisTextsInversed.length; xat++) {\n        graphics.placeTextWithEllipsis(\n          xAxisTextsInversed[xat],\n          (_c = xAxisTextsInversed[xat].textContent) != null ? _c : \"\",\n          w2.config.yaxis[0].labels.maxWidth - (w2.config.yaxis[0].title.text ? parseFloat(w2.config.yaxis[0].title.style.fontSize) * 2 : 0) - 15\n        );\n      }\n    }\n  }\n  // renderXAxisBands() {\n  //   let w = this.w;\n  //   let plotBand = document.createElementNS(SVGNS, 'rect')\n  //   w.dom.elGraphical.add(plotBand)\n  // }\n}\nclass Grid {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.xaxisLabels = w2.labelData.labels.slice();\n    this.axesUtils = new AxesUtils(ctx.w, {\n      theme: ctx.theme,\n      timeScale: ctx.timeScale\n    });\n    this.isRangeBar = w2.rangeData.seriesRange.length && w2.globals.isBarHorizontal;\n    if (w2.labelData.timescaleLabels.length > 0) {\n      this.xaxisLabels = w2.labelData.timescaleLabels.slice();\n    }\n  }\n  /**\n   * @param {any} elGrid\n   */\n  drawGridArea(elGrid = null) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    if (!elGrid) {\n      elGrid = graphics.group({ class: \"apexcharts-grid\" });\n    }\n    const elVerticalLine = graphics.drawLine(\n      w2.globals.padHorizontal,\n      1,\n      w2.globals.padHorizontal,\n      w2.layout.gridHeight,\n      \"transparent\"\n    );\n    const elHorzLine = graphics.drawLine(\n      w2.globals.padHorizontal,\n      w2.layout.gridHeight,\n      w2.layout.gridWidth,\n      w2.layout.gridHeight,\n      \"transparent\"\n    );\n    elGrid.add(elHorzLine);\n    elGrid.add(elVerticalLine);\n    return elGrid;\n  }\n  drawGrid() {\n    const gl = this.w.globals;\n    if (gl.axisCharts) {\n      const elgrid = this.renderGrid();\n      this.drawGridArea(elgrid.el);\n      return elgrid;\n    }\n    return null;\n  }\n  createGridMask() {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const graphics = new Graphics(this.w);\n    const strokeSize = Array.isArray(w2.config.stroke.width) ? Math.max(...w2.config.stroke.width) : w2.config.stroke.width;\n    const createClipPath = (id) => {\n      const clipPath = BrowserAPIs.createElementNS(SVGNS$2, \"clipPath\");\n      clipPath.setAttribute(\"id\", id);\n      return clipPath;\n    };\n    w2.dom.elGridRectMask = createClipPath(`gridRectMask${gl.cuid}`);\n    w2.dom.elGridRectBarMask = createClipPath(`gridRectBarMask${gl.cuid}`);\n    w2.dom.elGridRectMarkerMask = createClipPath(`gridRectMarkerMask${gl.cuid}`);\n    w2.dom.elForecastMask = createClipPath(`forecastMask${gl.cuid}`);\n    w2.dom.elNonForecastMask = createClipPath(`nonForecastMask${gl.cuid}`);\n    const hasBar = [\"bar\", \"rangeBar\", \"candlestick\", \"boxPlot\", \"violin\"].includes(\n      w2.config.chart.type\n    ) || w2.globals.comboBarCount > 0;\n    let barWidthLeft = 0;\n    let barWidthRight = 0;\n    if (hasBar && w2.axisFlags.isXNumeric && !w2.globals.isBarHorizontal) {\n      barWidthLeft = Math.max(w2.layout.gridPad.left, gl.barPadForNumericAxis);\n      barWidthRight = Math.max(w2.layout.gridPad.right, gl.barPadForNumericAxis);\n    }\n    w2.dom.elGridRect = graphics.drawRect(\n      -strokeSize / 2 - 2,\n      -strokeSize / 2 - 2,\n      w2.layout.gridWidth + strokeSize + 4,\n      w2.layout.gridHeight + strokeSize + 4,\n      0,\n      \"#fff\"\n    );\n    w2.dom.elGridRectBar = graphics.drawRect(\n      -strokeSize / 2 - barWidthLeft - 2,\n      -strokeSize / 2 - 2,\n      w2.layout.gridWidth + strokeSize + barWidthRight + barWidthLeft + 4,\n      w2.layout.gridHeight + strokeSize + 4,\n      0,\n      \"#fff\"\n    );\n    const markerSize = w2.globals.markers.largestSize;\n    w2.dom.elGridRectMarker = graphics.drawRect(\n      Math.min(-strokeSize / 2 - barWidthLeft - 2, -markerSize),\n      -markerSize,\n      w2.layout.gridWidth + Math.max(strokeSize + barWidthRight + barWidthLeft + 4, markerSize * 2),\n      w2.layout.gridHeight + markerSize * 2,\n      0,\n      \"#fff\"\n    );\n    w2.dom.elGridRectMask.appendChild(w2.dom.elGridRect.node);\n    w2.dom.elGridRectBarMask.appendChild(w2.dom.elGridRectBar.node);\n    w2.dom.elGridRectMarkerMask.appendChild(w2.dom.elGridRectMarker.node);\n    const defs = w2.dom.elDefs.node;\n    defs.appendChild(w2.dom.elGridRectMask);\n    defs.appendChild(w2.dom.elGridRectBarMask);\n    defs.appendChild(w2.dom.elGridRectMarkerMask);\n    defs.appendChild(w2.dom.elForecastMask);\n    defs.appendChild(w2.dom.elNonForecastMask);\n  }\n  /** @param {{i: any, x1: any, y1: any, x2: any, y2: any, xCount: any, parent: any}} opts */\n  _drawGridLines({ i: i2, x1, y1, x2, y2, xCount, parent }) {\n    const w2 = this.w;\n    const shouldDraw = () => {\n      if (i2 === 0 && w2.globals.skipFirstTimelinelabel) return false;\n      if (i2 === xCount - 1 && w2.globals.skipLastTimelinelabel && !w2.config.xaxis.labels.formatter)\n        return false;\n      if (w2.config.chart.type === \"radar\") return false;\n      return true;\n    };\n    if (shouldDraw()) {\n      if (w2.config.grid.xaxis.lines.show) {\n        this._drawGridLine({ i: i2, x1, y1, x2, y2, xCount, parent });\n      }\n      let y_2 = 0;\n      if (w2.labelData.hasXaxisGroups && w2.config.xaxis.tickPlacement === \"between\") {\n        const groups = w2.labelData.groups;\n        if (groups) {\n          let gacc = 0;\n          for (let gi = 0; gacc < i2 && gi < groups.length; gi++) {\n            gacc += groups[gi].cols;\n          }\n          if (gacc === i2) {\n            y_2 = w2.layout.xAxisLabelsHeight * 0.6;\n          }\n        }\n      }\n      const xAxis = new XAxis(this.w, this.ctx);\n      xAxis.drawXaxisTicks(x1, y_2, w2.dom.elGraphical);\n    }\n  }\n  /** @param {{i: any, x1: any, y1: any, x2: any, y2: any, xCount: any, parent: any}} opts */\n  _drawGridLine({ i: i2, x1, y1, x2, y2, xCount, parent }) {\n    const w2 = this.w;\n    const isHorzLine = parent.node.classList.contains(\n      \"apexcharts-gridlines-horizontal\"\n    );\n    const offX = w2.globals.barPadForNumericAxis;\n    const excludeBorders = y1 === 0 && y2 === 0 || x1 === 0 && x2 === 0 || y1 === w2.layout.gridHeight && y2 === w2.layout.gridHeight || w2.globals.isBarHorizontal && (i2 === 0 || i2 === xCount - 1);\n    const graphics = new Graphics(this.w);\n    const line = graphics.drawLine(\n      x1 - (isHorzLine ? offX : 0),\n      y1,\n      x2 + (isHorzLine ? offX : 0),\n      y2,\n      w2.config.grid.borderColor,\n      w2.config.grid.strokeDashArray\n    );\n    line.node.classList.add(\"apexcharts-gridline\");\n    if (excludeBorders && w2.config.grid.show) {\n      this.elGridBorders.add(line);\n    } else {\n      parent.add(line);\n    }\n  }\n  /** @param {{c: any, x1: any, y1: any, x2: any, y2: any, type: any}} opts */\n  _drawGridBandRect({ c: c2, x1, y1, x2, y2, type }) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const offX = w2.globals.barPadForNumericAxis;\n    const color = w2.config.grid[type].colors[c2];\n    const rect = graphics.drawRect(\n      x1 - (type === \"row\" ? offX : 0),\n      y1,\n      x2 + (type === \"row\" ? offX * 2 : 0),\n      y2,\n      0,\n      color,\n      w2.config.grid[type].opacity\n    );\n    this.elg.add(rect);\n    rect.attr(\"clip-path\", `url(#gridRectMask${w2.globals.cuid})`);\n    rect.node.classList.add(`apexcharts-grid-${type}`);\n  }\n  /** @param {{xCount: any, tickAmount: any}} opts */\n  _drawXYLines({ xCount, tickAmount }) {\n    var _a;\n    const w2 = this.w;\n    const datetimeLines = ({ xC, x1, y1, x2, y2 }) => {\n      for (let i2 = 0; i2 < xC; i2++) {\n        x1 = /** @type {any} */\n        this.xaxisLabels[i2].position;\n        x2 = /** @type {any} */\n        this.xaxisLabels[i2].position;\n        if (x1 < 0 || x1 - 2 > w2.layout.gridWidth) continue;\n        this._drawGridLines({\n          i: i2,\n          x1,\n          y1,\n          x2,\n          y2,\n          xCount,\n          parent: this.elgridLinesV\n        });\n      }\n    };\n    const categoryLines = ({ xC, x1, y1, x2, y2 }) => {\n      for (let i2 = 0; i2 < xC + (w2.axisFlags.isXNumeric ? 0 : 1); i2++) {\n        if (i2 === 0 && xC === 1 && w2.globals.dataPoints === 1) {\n          x1 = w2.layout.gridWidth / 2;\n          x2 = x1;\n        }\n        this._drawGridLines({\n          i: i2,\n          x1,\n          y1,\n          x2,\n          y2,\n          xCount,\n          parent: this.elgridLinesV\n        });\n        x1 += w2.layout.gridWidth / (w2.axisFlags.isXNumeric ? xC - 1 : xC);\n        x2 = x1;\n      }\n    };\n    if (w2.config.grid.xaxis.lines.show || w2.config.xaxis.axisTicks.show) {\n      const x1 = w2.globals.padHorizontal;\n      const y1 = 0;\n      let x2;\n      const y2 = w2.layout.gridHeight;\n      if (w2.labelData.timescaleLabels.length) {\n        datetimeLines({ xC: xCount, x1, y1, x2, y2 });\n      } else {\n        if (w2.axisFlags.isXNumeric) {\n          xCount = (_a = w2.globals.xAxisScale) == null ? void 0 : _a.result.length;\n        }\n        categoryLines({ xC: xCount, x1, y1, x2, y2 });\n      }\n    }\n    if (w2.config.grid.yaxis.lines.show) {\n      const x1 = 0;\n      let y1 = 0;\n      let y2 = 0;\n      const x2 = w2.layout.gridWidth;\n      let tA = tickAmount + 1;\n      if (this.isRangeBar) {\n        tA = w2.labelData.labels.length;\n      }\n      for (let i2 = 0; i2 < tA + (this.isRangeBar ? 1 : 0); i2++) {\n        this._drawGridLine({\n          i: i2,\n          xCount: tA + (this.isRangeBar ? 1 : 0),\n          x1,\n          y1,\n          x2,\n          y2,\n          parent: this.elgridLinesH\n        });\n        y1 += w2.layout.gridHeight / (this.isRangeBar ? tA : tickAmount);\n        y2 = y1;\n      }\n    }\n  }\n  /** @param {{ xCount?: any, tickAmount?: any }} opts */\n  _drawInvertedXYLines({ xCount }) {\n    const w2 = this.w;\n    if (w2.config.grid.xaxis.lines.show || w2.config.xaxis.axisTicks.show) {\n      let x1 = w2.globals.padHorizontal;\n      const y1 = 0;\n      let x2;\n      const y2 = w2.layout.gridHeight;\n      for (let i2 = 0; i2 < xCount + 1; i2++) {\n        if (w2.config.grid.xaxis.lines.show) {\n          this._drawGridLine({\n            i: i2,\n            xCount: xCount + 1,\n            x1,\n            y1,\n            x2,\n            y2,\n            parent: this.elgridLinesV\n          });\n        }\n        const xAxis = new XAxis(this.w, this.ctx);\n        xAxis.drawXaxisTicks(x1, 0, w2.dom.elGraphical);\n        x1 += w2.layout.gridWidth / xCount;\n        x2 = x1;\n      }\n    }\n    if (w2.config.grid.yaxis.lines.show) {\n      const x1 = 0;\n      let y1 = 0;\n      let y2 = 0;\n      const x2 = w2.layout.gridWidth;\n      for (let i2 = 0; i2 < w2.globals.dataPoints + 1; i2++) {\n        this._drawGridLine({\n          i: i2,\n          xCount: w2.globals.dataPoints + 1,\n          x1,\n          y1,\n          x2,\n          y2,\n          parent: this.elgridLinesH\n        });\n        y1 += w2.layout.gridHeight / w2.globals.dataPoints;\n        y2 = y1;\n      }\n    }\n  }\n  renderGrid() {\n    var _a, _b, _c;\n    const w2 = this.w;\n    const gl = w2.globals;\n    const graphics = new Graphics(this.w);\n    this.elg = graphics.group({ class: \"apexcharts-grid\" });\n    this.elgridLinesH = graphics.group({\n      class: \"apexcharts-gridlines-horizontal\"\n    });\n    this.elgridLinesV = graphics.group({\n      class: \"apexcharts-gridlines-vertical\"\n    });\n    this.elGridBorders = graphics.group({ class: \"apexcharts-grid-borders\" });\n    this.elg.add(this.elgridLinesH);\n    this.elg.add(this.elgridLinesV);\n    if (!w2.config.grid.show) {\n      this.elgridLinesV.hide();\n      this.elgridLinesH.hide();\n      this.elGridBorders.hide();\n    }\n    let gridAxisIndex = 0;\n    while (gridAxisIndex < gl.seriesYAxisMap.length && gl.ignoreYAxisIndexes.includes(gridAxisIndex)) {\n      gridAxisIndex++;\n    }\n    if (gridAxisIndex === gl.seriesYAxisMap.length) {\n      gridAxisIndex = 0;\n    }\n    let yTickAmount = gl.yAxisScale[gridAxisIndex].result.length - 1;\n    let xCount;\n    if (!gl.isBarHorizontal || this.isRangeBar) {\n      xCount = this.xaxisLabels.length;\n      if (this.isRangeBar) {\n        yTickAmount = w2.labelData.labels.length;\n        if (w2.config.xaxis.tickAmount && w2.config.xaxis.labels.formatter) {\n          xCount = w2.config.xaxis.tickAmount;\n        }\n        if (((_c = (_b = (_a = gl.yAxisScale) == null ? void 0 : _a[gridAxisIndex]) == null ? void 0 : _b.result) == null ? void 0 : _c.length) > 0 && w2.config.xaxis.type !== \"datetime\") {\n          xCount = gl.yAxisScale[gridAxisIndex].result.length - 1;\n        }\n      }\n      this._drawXYLines({ xCount, tickAmount: yTickAmount });\n    } else {\n      xCount = yTickAmount;\n      yTickAmount = gl.xTickAmount;\n      this._drawInvertedXYLines({ xCount, tickAmount: yTickAmount });\n    }\n    this.drawGridBands(xCount, yTickAmount);\n    return {\n      el: this.elg,\n      elGridBorders: this.elGridBorders,\n      xAxisTickWidth: w2.layout.gridWidth / xCount\n    };\n  }\n  /**\n   * @param {number} xCount\n   * @param {number} tickAmount\n   */\n  drawGridBands(xCount, tickAmount) {\n    var _a, _b, _c, _d, _e;\n    const w2 = this.w;\n    const drawBands = (type, count, x1, y1, x2, y2) => {\n      for (let i2 = 0, c2 = 0; i2 < count; i2++, c2++) {\n        if (c2 >= w2.config.grid[type].colors.length) {\n          c2 = 0;\n        }\n        this._drawGridBandRect({ c: c2, x1, y1, x2, y2, type });\n        y1 += w2.layout.gridHeight / tickAmount;\n      }\n    };\n    if (((_a = w2.config.grid.row.colors) == null ? void 0 : _a.length) > 0) {\n      drawBands(\n        \"row\",\n        tickAmount,\n        0,\n        0,\n        w2.layout.gridWidth,\n        w2.layout.gridHeight / tickAmount\n      );\n    }\n    if (((_b = w2.config.grid.column.colors) == null ? void 0 : _b.length) > 0) {\n      let xc = !w2.globals.isBarHorizontal && w2.config.xaxis.tickPlacement === \"on\" && (w2.config.xaxis.type === \"category\" || w2.config.xaxis.convertedCatToNumeric) ? xCount - 1 : xCount;\n      if (w2.axisFlags.isXNumeric) {\n        xc = ((_d = (_c = w2.globals.xAxisScale) == null ? void 0 : _c.result.length) != null ? _d : 1) - 1;\n      }\n      let x1 = w2.globals.padHorizontal;\n      const y1 = 0;\n      let x2 = w2.globals.padHorizontal + w2.layout.gridWidth / xc;\n      const y2 = w2.layout.gridHeight;\n      for (let i2 = 0, c2 = 0; i2 < xCount; i2++, c2++) {\n        if (c2 >= w2.config.grid.column.colors.length) {\n          c2 = 0;\n        }\n        if (w2.config.xaxis.type === \"datetime\") {\n          x1 = /** @type {any} */\n          this.xaxisLabels[i2].position;\n          x2 = /** @type {any} */\n          (((_e = this.xaxisLabels[i2 + 1]) == null ? void 0 : _e.position) || w2.layout.gridWidth) - /** @type {any} */\n          this.xaxisLabels[i2].position;\n        }\n        this._drawGridBandRect({ c: c2, x1, y1, x2, y2, type: \"column\" });\n        x1 += w2.layout.gridWidth / xc;\n      }\n    }\n  }\n}\nclass Scales {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n    this.coreUtils = new CoreUtils(this.w);\n  }\n  // http://stackoverflow.com/questions/326679/choosing-an-attractive-linear-scale-for-a-graphs-y-axis\n  // This routine creates the Y axis values for a graph.\n  /**\n   * @param {number} yMin\n   * @param {number} yMax\n   */\n  niceScale(yMin, yMax, index = 0) {\n    const jsPrecision = 1e-11;\n    const w2 = this.w;\n    const gl = w2.globals;\n    let axisCnf;\n    let maxTicks;\n    let gotMin;\n    let gotMax;\n    if (gl.isBarHorizontal) {\n      axisCnf = w2.config.xaxis;\n      maxTicks = Math.max((gl.svgWidth - 100) / 25, 2);\n    } else {\n      axisCnf = w2.config.yaxis[index];\n      maxTicks = Math.max((gl.svgHeight - 100) / 15, 2);\n    }\n    if (!Utils$1.isNumber(maxTicks)) {\n      maxTicks = 10;\n    }\n    gotMin = axisCnf.min !== void 0 && axisCnf.min !== null;\n    gotMax = axisCnf.max !== void 0 && axisCnf.max !== null;\n    let gotStepSize = axisCnf.stepSize !== void 0 && axisCnf.stepSize !== null;\n    let gotTickAmount = axisCnf.tickAmount !== void 0 && axisCnf.tickAmount !== null;\n    let ticks = gotTickAmount ? axisCnf.tickAmount : NICE_SCALE_DEFAULT_TICKS[Math.min(\n      Math.round(maxTicks / 2),\n      NICE_SCALE_DEFAULT_TICKS.length - 1\n    )];\n    if (gl.isMultipleYAxis && !gotTickAmount && gl.multiAxisTickAmount > 0) {\n      ticks = gl.multiAxisTickAmount;\n      gotTickAmount = true;\n    }\n    if (ticks === \"dataPoints\") {\n      ticks = gl.dataPoints - 1;\n    } else {\n      ticks = Math.abs(Math.round(ticks));\n    }\n    if (yMin === Number.MIN_VALUE && yMax === 0 || !Utils$1.isNumber(yMin) && !Utils$1.isNumber(yMax) || yMin === Number.MIN_VALUE && yMax === -Number.MAX_VALUE) {\n      yMin = Utils$1.isNumber(axisCnf.min) ? axisCnf.min : 0;\n      yMax = Utils$1.isNumber(axisCnf.max) ? axisCnf.max : yMin + ticks;\n      gl.allSeriesCollapsed = false;\n    }\n    if (yMin > yMax) {\n      console.warn(\n        \"axis.min cannot be greater than axis.max: swapping min and max\"\n      );\n      const temp = yMax;\n      yMax = yMin;\n      yMin = temp;\n    } else if (yMin === yMax) {\n      yMin = yMin === 0 ? 0 : yMin - 1;\n      yMax = yMax === 0 ? 2 : yMax + 1;\n    }\n    const result = [];\n    if (ticks < 1) {\n      ticks = 1;\n    }\n    let tiks = ticks;\n    let range = Math.abs(yMax - yMin);\n    const proximityRatio = 0.15;\n    if (!gotMin && yMin > 0 && yMin / range < proximityRatio) {\n      yMin = 0;\n      gotMin = true;\n    }\n    if (!gotMax && yMax < 0 && -yMax / range < proximityRatio) {\n      yMax = 0;\n      gotMax = true;\n    }\n    range = Math.abs(yMax - yMin);\n    let stepSize = range / tiks;\n    let niceStep = stepSize;\n    const mag = Math.floor(Math.log10(niceStep));\n    const magPow = Math.pow(10, mag);\n    let magMsd = Math.ceil(niceStep / magPow);\n    magMsd = NICE_SCALE_ALLOWED_MAG_MSD[gl.yValueDecimal === 0 ? 0 : 1][magMsd];\n    niceStep = magMsd * magPow;\n    stepSize = niceStep;\n    if (gl.isBarHorizontal && axisCnf.stepSize && axisCnf.type !== \"datetime\") {\n      stepSize = axisCnf.stepSize;\n      gotStepSize = true;\n    } else if (gotStepSize) {\n      stepSize = axisCnf.stepSize;\n    }\n    if (gotStepSize) {\n      if (axisCnf.forceNiceScale) {\n        const stepMag = Math.floor(Math.log10(stepSize));\n        stepSize *= Math.pow(10, mag - stepMag);\n      }\n    }\n    if (gotMin && gotMax) {\n      let crudeStep = range / tiks;\n      if (gotTickAmount) {\n        if (gotStepSize) {\n          if (Utils$1.mod(range, stepSize) != 0) {\n            const gcdStep = Utils$1.getGCD(stepSize, crudeStep);\n            if (crudeStep / gcdStep < 10) {\n              stepSize = gcdStep;\n            } else {\n              stepSize = crudeStep;\n            }\n          } else {\n            if (Utils$1.mod(stepSize, crudeStep) == 0) {\n              stepSize = crudeStep;\n            } else {\n              crudeStep = stepSize;\n              gotTickAmount = false;\n            }\n          }\n        } else {\n          stepSize = crudeStep;\n        }\n      } else {\n        if (gotStepSize) {\n          if (Utils$1.mod(range, stepSize) == 0) {\n            crudeStep = stepSize;\n          } else {\n            stepSize = crudeStep;\n          }\n        } else {\n          if (Utils$1.mod(range, stepSize) == 0) {\n            crudeStep = stepSize;\n          } else {\n            tiks = Math.ceil(range / stepSize);\n            crudeStep = range / tiks;\n            const gcdStep = Utils$1.getGCD(range, stepSize);\n            if (range / gcdStep < maxTicks) {\n              crudeStep = gcdStep;\n            }\n            stepSize = crudeStep;\n          }\n        }\n      }\n      tiks = Math.round(range / stepSize);\n    } else {\n      if (!gotMin && !gotMax) {\n        if (gl.isMultipleYAxis && gotTickAmount) {\n          const tMin = stepSize * Math.floor(yMin / stepSize);\n          let tMax = tMin + stepSize * tiks;\n          if (tMax < yMax) {\n            stepSize *= 2;\n          }\n          yMin = tMin;\n          tMax = yMax;\n          yMax = yMin + stepSize * tiks;\n          range = Math.abs(yMax - yMin);\n          if (yMin > 0 && yMin < Math.abs(tMax - yMax)) {\n            yMin = 0;\n            yMax = stepSize * tiks;\n          }\n          if (yMax < 0 && -yMax < Math.abs(tMin - yMin)) {\n            yMax = 0;\n            yMin = -stepSize * tiks;\n          }\n        } else {\n          yMin = stepSize * Math.floor(yMin / stepSize);\n          yMax = stepSize * Math.ceil(yMax / stepSize);\n        }\n      } else if (gotMax) {\n        if (gotTickAmount) {\n          yMin = yMax - stepSize * tiks;\n        } else {\n          const yMinPrev = yMin;\n          yMin = stepSize * Math.floor(yMin / stepSize);\n          if (Math.abs(yMax - yMin) / Utils$1.getGCD(range, stepSize) > maxTicks) {\n            yMin = yMax - stepSize * ticks;\n            yMin += stepSize * Math.floor((yMinPrev - yMin) / stepSize);\n          }\n        }\n      } else if (gotMin) {\n        if (gotTickAmount) {\n          yMax = yMin + stepSize * tiks;\n        } else {\n          const yMaxPrev = yMax;\n          yMax = stepSize * Math.ceil(yMax / stepSize);\n          if (Math.abs(yMax - yMin) / Utils$1.getGCD(range, stepSize) > maxTicks) {\n            yMax = yMin + stepSize * ticks;\n            yMax += stepSize * Math.ceil((yMaxPrev - yMax) / stepSize);\n          }\n        }\n      }\n      range = Math.abs(yMax - yMin);\n      stepSize = Utils$1.getGCD(range, stepSize);\n      tiks = Math.round(range / stepSize);\n    }\n    if (!gotTickAmount && !(gotMin || gotMax)) {\n      tiks = Math.ceil((range - jsPrecision) / (stepSize + jsPrecision));\n      if (tiks > 16 && Utils$1.getPrimeFactors(tiks).length < 2) {\n        tiks++;\n      }\n    }\n    if (!gotTickAmount && axisCnf.forceNiceScale && gl.yValueDecimal === 0 && tiks > range) {\n      tiks = range;\n      stepSize = Math.round(range / tiks);\n    }\n    if (tiks > maxTicks && (!(gotTickAmount || gotStepSize) || axisCnf.forceNiceScale)) {\n      const pf = Utils$1.getPrimeFactors(tiks);\n      const last = pf.length - 1;\n      let tt = tiks;\n      reduceLoop: for (var xFactors = 0; xFactors < last; xFactors++) {\n        for (var lowest = 0; lowest <= last - xFactors; lowest++) {\n          const stop = Math.min(lowest + xFactors, last);\n          let t2 = tt;\n          let div = 1;\n          for (var next = lowest; next <= stop; next++) {\n            div *= pf[next];\n          }\n          t2 /= div;\n          if (t2 < maxTicks) {\n            tt = t2;\n            break reduceLoop;\n          }\n        }\n      }\n      if (tt === tiks) {\n        stepSize = range;\n      } else {\n        stepSize = range / tt;\n      }\n      tiks = Math.round(range / stepSize);\n    }\n    if (gl.isMultipleYAxis && gl.multiAxisTickAmount == 0 && gl.ignoreYAxisIndexes.indexOf(index) < 0) {\n      gl.multiAxisTickAmount = tiks;\n    }\n    let val = yMin - stepSize;\n    const err = stepSize * jsPrecision;\n    do {\n      val += stepSize;\n      result.push(Utils$1.stripNumber(val, 7));\n    } while (yMax - val > err);\n    return {\n      result,\n      niceMin: result[0],\n      niceMax: result[result.length - 1]\n    };\n  }\n  /** @param {number} yMin @param {number} yMax @param {number|string} ticks @param {number} index @param {number|undefined} step */\n  linearScale(yMin, yMax, ticks = 10, index = 0, step = void 0) {\n    const range = Math.abs(yMax - yMin);\n    let result = [];\n    if (yMin === yMax) {\n      result = [yMin];\n      return {\n        result,\n        niceMin: result[0],\n        niceMax: result[result.length - 1]\n      };\n    }\n    ticks = this._adjustTicksForSmallRange(ticks, index, range);\n    if (\n      /** @type {any} */\n      ticks === \"dataPoints\"\n    ) {\n      ticks = this.w.globals.dataPoints - 1;\n    }\n    const ticksNum = (\n      /** @type {number} */\n      ticks\n    );\n    if (!step) {\n      step = range / ticksNum;\n    }\n    const MIN_PRECISION = 2;\n    if (step !== 0 && isFinite(step)) {\n      const magnitude = Math.floor(Math.log10(Math.abs(step)));\n      const precision = Math.max(MIN_PRECISION, -magnitude + MIN_PRECISION);\n      const multiplier = Math.pow(10, precision);\n      step = Math.round((step + Number.EPSILON) * multiplier) / multiplier;\n    }\n    let tickCount = ticks === Number.MAX_VALUE ? 5 : ticksNum;\n    if (ticks === Number.MAX_VALUE) {\n      step = 1;\n    }\n    let v2 = yMin;\n    while (tickCount >= 0) {\n      result.push(v2);\n      v2 = Utils$1.preciseAddition(v2, step);\n      tickCount -= 1;\n    }\n    return {\n      result,\n      niceMin: result[0],\n      niceMax: result[result.length - 1]\n    };\n  }\n  /**\n   * @param {number} yMin\n   * @param {number} yMax\n   * @param {number} base\n   */\n  logarithmicScaleNice(yMin, yMax, base) {\n    if (yMax <= 0) yMax = Math.max(yMin, base);\n    if (yMin <= 0) yMin = Math.min(yMax, base);\n    const logs = [];\n    const logMax = Math.ceil(Math.log(yMax) / Math.log(base) + 1);\n    const logMin = Math.floor(Math.log(yMin) / Math.log(base));\n    for (let i2 = logMin; i2 < logMax; i2++) {\n      logs.push(Math.pow(base, i2));\n    }\n    return {\n      result: logs,\n      niceMin: logs[0],\n      niceMax: logs[logs.length - 1]\n    };\n  }\n  /**\n   * @param {number} yMin\n   * @param {number} yMax\n   * @param {number} base\n   */\n  logarithmicScale(yMin, yMax, base) {\n    if (yMax <= 0) yMax = Math.max(yMin, base);\n    if (yMin <= 0) yMin = Math.min(yMax, base);\n    const logs = [];\n    const logMax = Math.log(yMax) / Math.log(base);\n    const logMin = Math.log(yMin) / Math.log(base);\n    const logRange = logMax - logMin;\n    const ticks = Math.round(logRange);\n    const logTickSpacing = logRange / ticks;\n    for (let i2 = 0, logTick = logMin; i2 < ticks; i2++, logTick += logTickSpacing) {\n      logs.push(Math.pow(base, logTick));\n    }\n    logs.push(Math.pow(base, logMax));\n    return {\n      result: logs,\n      niceMin: yMin,\n      niceMax: yMax\n    };\n  }\n  /**\n   * @param {number | string} ticks\n   * @param {number} index\n   * @param {number} range\n   */\n  _adjustTicksForSmallRange(ticks, index, range) {\n    let newTicks = ticks;\n    if (typeof index !== \"undefined\" && this.w.config.yaxis[index].labels.formatter && this.w.config.yaxis[index].tickAmount === void 0) {\n      const formattedVal = Number(\n        this.w.config.yaxis[index].labels.formatter(1)\n      );\n      if (Utils$1.isNumber(formattedVal) && this.w.globals.yValueDecimal === 0) {\n        newTicks = Math.ceil(range);\n      }\n    }\n    return newTicks < ticks ? newTicks : ticks;\n  }\n  /**\n   * @param {number} index\n   * @param {number} minY\n   * @param {number} maxY\n   */\n  setYScaleForIndex(index, minY, maxY) {\n    const gl = this.w.globals;\n    const cnf = this.w.config;\n    const y = gl.isBarHorizontal ? cnf.xaxis : cnf.yaxis[index];\n    if (typeof gl.yAxisScale[index] === \"undefined\") {\n      gl.yAxisScale[index] = [];\n    }\n    const range = Math.abs(maxY - minY);\n    if (y.logarithmic && range <= 5) {\n      gl.invalidLogScale = true;\n    }\n    if (y.logarithmic && range > 5) {\n      gl.allSeriesCollapsed = false;\n      gl.yAxisScale[index] = y.forceNiceScale ? this.logarithmicScaleNice(minY, maxY, y.logBase) : this.logarithmicScale(minY, maxY, y.logBase);\n    } else {\n      if (maxY === -Number.MAX_VALUE || !Utils$1.isNumber(maxY) || minY === Number.MAX_VALUE || !Utils$1.isNumber(minY)) {\n        gl.yAxisScale[index] = this.niceScale(\n          Number.MIN_VALUE,\n          0,\n          index\n        );\n      } else {\n        gl.allSeriesCollapsed = false;\n        gl.yAxisScale[index] = this.niceScale(\n          minY,\n          maxY,\n          index\n        );\n      }\n    }\n  }\n  /**\n   * @param {number} minX\n   * @param {number} maxX\n   */\n  setXScale(minX, maxX) {\n    const w2 = this.w;\n    const gl = w2.globals;\n    if (maxX === -Number.MAX_VALUE || !Utils$1.isNumber(maxX)) {\n      gl.xAxisScale = this.linearScale(0, 10, 10);\n    } else {\n      const ticks = gl.xTickAmount;\n      gl.xAxisScale = this.linearScale(\n        minX,\n        maxX,\n        ticks,\n        0,\n        w2.config.xaxis.max === void 0 ? w2.config.xaxis.stepSize : void 0\n      );\n    }\n    return gl.xAxisScale;\n  }\n  scaleMultipleYAxes() {\n    const cnf = this.w.config;\n    const gl = this.w.globals;\n    this.coreUtils.setSeriesYAxisMappings();\n    const axisSeriesMap = gl.seriesYAxisMap;\n    const minYArr = gl.minYArr;\n    const maxYArr = gl.maxYArr;\n    const alignZeroParticipants = [];\n    const canAlignZero = !gl.isBarHorizontal;\n    gl.allSeriesCollapsed = true;\n    gl.barGroups = [];\n    axisSeriesMap.forEach((axisSeries, ai) => {\n      const groupNames = [];\n      axisSeries.forEach((as) => {\n        var _a;\n        const group = (\n          /** @type {Record<string,any>} */\n          (_a = cnf.series[as]) == null ? void 0 : _a.group\n        );\n        if (groupNames.indexOf(group) < 0) {\n          groupNames.push(group);\n        }\n      });\n      if (axisSeries.length > 0) {\n        let minY = Number.MAX_VALUE;\n        let maxY = -Number.MAX_VALUE;\n        let lowestY = minY;\n        let highestY = maxY;\n        let seriesType;\n        let seriesGroupName;\n        if (cnf.chart.stacked) {\n          const mapSeries = new Array(gl.dataPoints).fill(0);\n          const sumSeries = [];\n          const posSeries = [];\n          const negSeries = [];\n          groupNames.forEach(() => {\n            sumSeries.push(mapSeries.map(() => Number.MIN_VALUE));\n            posSeries.push(mapSeries.map(() => Number.MIN_VALUE));\n            negSeries.push(mapSeries.map(() => Number.MIN_VALUE));\n          });\n          for (let i2 = 0; i2 < axisSeries.length; i2++) {\n            if (!seriesType && /** @type {Record<string,any>} */\n            cnf.series[axisSeries[i2]].type) {\n              seriesType = /** @type {Record<string,any>} */\n              cnf.series[axisSeries[i2]].type;\n            }\n            const si = axisSeries[i2];\n            if (\n              /** @type {Record<string,any>} */\n              cnf.series[si].group\n            ) {\n              seriesGroupName = /** @type {Record<string,any>} */\n              cnf.series[si].group;\n            } else {\n              seriesGroupName = \"axis-\".concat(ai.toString());\n            }\n            const collapsed = !(gl.collapsedSeriesIndices.indexOf(si) < 0 && gl.ancillaryCollapsedSeriesIndices.indexOf(si) < 0);\n            if (!collapsed) {\n              gl.allSeriesCollapsed = false;\n              groupNames.forEach((gn, gni) => {\n                if (\n                  /** @type {Record<string,any>} */\n                  cnf.series[si].group === gn\n                ) {\n                  for (let j = 0; j < this.w.seriesData.series[si].length; j++) {\n                    const val = this.w.seriesData.series[si][j];\n                    if (val >= 0) {\n                      posSeries[gni][j] += val;\n                    } else {\n                      negSeries[gni][j] += val;\n                    }\n                    sumSeries[gni][j] += val;\n                    lowestY = Math.min(lowestY, val);\n                    highestY = Math.max(highestY, val);\n                  }\n                }\n              });\n            }\n            if (seriesType === \"bar\" || seriesType === \"column\") {\n              gl.barGroups.push(seriesGroupName);\n            }\n          }\n          if (!seriesType) {\n            seriesType = cnf.chart.type;\n          }\n          if (seriesType === \"bar\" || seriesType === \"column\") {\n            groupNames.forEach((gn, gni) => {\n              minY = Math.min(minY, Math.min.apply(null, negSeries[gni]));\n              maxY = Math.max(maxY, Math.max.apply(null, posSeries[gni]));\n            });\n          } else {\n            groupNames.forEach((gn, gni) => {\n              lowestY = Math.min(lowestY, Math.min.apply(null, sumSeries[gni]));\n              highestY = Math.max(\n                highestY,\n                Math.max.apply(null, sumSeries[gni])\n              );\n            });\n            minY = lowestY;\n            maxY = highestY;\n          }\n          if (minY === Number.MIN_VALUE && maxY === Number.MIN_VALUE) {\n            maxY = -Number.MAX_VALUE;\n          }\n        } else {\n          for (let i2 = 0; i2 < axisSeries.length; i2++) {\n            const si = axisSeries[i2];\n            minY = Math.min(minY, minYArr[si]);\n            maxY = Math.max(maxY, maxYArr[si]);\n            const collapsed = !(gl.collapsedSeriesIndices.indexOf(si) < 0 && gl.ancillaryCollapsedSeriesIndices.indexOf(si) < 0);\n            if (!collapsed) {\n              gl.allSeriesCollapsed = false;\n            }\n          }\n        }\n        if (cnf.yaxis[ai].min !== void 0) {\n          if (typeof cnf.yaxis[ai].min === \"function\") {\n            minY = cnf.yaxis[ai].min(minY);\n          } else {\n            minY = cnf.yaxis[ai].min;\n          }\n        }\n        if (cnf.yaxis[ai].max !== void 0) {\n          if (typeof cnf.yaxis[ai].max === \"function\") {\n            maxY = cnf.yaxis[ai].max(maxY);\n          } else {\n            maxY = cnf.yaxis[ai].max;\n          }\n        }\n        gl.barGroups = gl.barGroups.filter((v2, i2, a2) => a2.indexOf(v2) === i2);\n        const yaxe = cnf.yaxis[ai];\n        const participates = canAlignZero && yaxe.alignZero === true && !yaxe.logarithmic && yaxe.min === void 0 && yaxe.max === void 0 && gl.ignoreYAxisIndexes.indexOf(ai) < 0 && Utils$1.isNumber(minY) && Utils$1.isNumber(maxY);\n        if (participates) {\n          alignZeroParticipants.push({ ai, minY, maxY });\n        } else {\n          this.setYScaleForIndex(ai, minY, maxY);\n          axisSeries.forEach((si) => {\n            minYArr[si] = gl.yAxisScale[ai].niceMin;\n            maxYArr[si] = gl.yAxisScale[ai].niceMax;\n          });\n        }\n      } else {\n        this.setYScaleForIndex(ai, 0, -Number.MAX_VALUE);\n      }\n    });\n    if (alignZeroParticipants.length >= 2) {\n      alignZeroParticipants.forEach((p2) => {\n        this.setYScaleForIndex(p2.ai, p2.minY, p2.maxY);\n        axisSeriesMap[p2.ai].forEach((si) => {\n          minYArr[si] = gl.yAxisScale[p2.ai].niceMin;\n          maxYArr[si] = gl.yAxisScale[p2.ai].niceMax;\n        });\n      });\n      let targetRatio = 0;\n      alignZeroParticipants.forEach((p2) => {\n        const scale = gl.yAxisScale[p2.ai];\n        const range = scale.niceMax - scale.niceMin;\n        if (range > 0) {\n          const r2 = -scale.niceMin / range;\n          if (r2 > targetRatio) targetRatio = r2;\n        }\n      });\n      if (targetRatio > 1) targetRatio = 1;\n      if (targetRatio < 0) targetRatio = 0;\n      const niceRoundUp = (raw) => {\n        if (raw <= 0) return 1;\n        const mag = Math.floor(Math.log10(raw));\n        const magPow = Math.pow(10, mag);\n        const msd = raw / magPow;\n        let mult;\n        if (msd <= 1 + 1e-9) mult = 1;\n        else if (msd <= 2 + 1e-9) mult = 2;\n        else if (msd <= 2.5 + 1e-9) mult = 2.5;\n        else if (msd <= 5 + 1e-9) mult = 5;\n        else mult = 10;\n        return mult * magPow;\n      };\n      alignZeroParticipants.forEach((p2) => {\n        const scale = gl.yAxisScale[p2.ai];\n        if (!scale.result || scale.result.length < 2) return;\n        const range = scale.niceMax - scale.niceMin;\n        if (range <= 0) return;\n        const r2 = -scale.niceMin / range;\n        if (Math.abs(r2 - targetRatio) <= 1e-9) return;\n        const extendMin = r2 < targetRatio && targetRatio < 1 - 1e-9;\n        const extendMaxOnly = !extendMin && r2 > targetRatio && targetRatio > 1e-9;\n        if (!extendMin && !extendMaxOnly) return;\n        const targetNiceMin = extendMin ? -targetRatio * scale.niceMax / (1 - targetRatio) : scale.niceMin;\n        const targetNiceMax = extendMaxOnly ? -scale.niceMin * (1 - targetRatio) / targetRatio : scale.niceMax;\n        const newRange = targetNiceMax - targetNiceMin;\n        if (newRange <= 0) return;\n        const desiredTicks = Math.max(scale.result.length, 5);\n        const newStep = niceRoundUp(newRange / Math.max(desiredTicks - 1, 1));\n        if (newStep <= 0) return;\n        let newNiceMin;\n        let newNiceMax;\n        if (extendMin) {\n          newNiceMin = Math.floor(targetNiceMin / newStep + 1e-9) * newStep;\n          const requiredMax = targetRatio > 1e-9 ? newNiceMin * (targetRatio - 1) / targetRatio : scale.niceMax;\n          const maxNeeded = Math.max(requiredMax, scale.niceMax);\n          newNiceMax = Math.ceil(maxNeeded / newStep - 1e-9) * newStep;\n        } else {\n          newNiceMax = Math.ceil(targetNiceMax / newStep - 1e-9) * newStep;\n          const requiredMin = targetRatio < 1 - 1e-9 ? -targetRatio * newNiceMax / (1 - targetRatio) : scale.niceMin;\n          const minNeeded = Math.min(requiredMin, scale.niceMin);\n          newNiceMin = Math.floor(minNeeded / newStep + 1e-9) * newStep;\n        }\n        scale.result = [];\n        for (let v2 = newNiceMin; v2 <= newNiceMax + newStep * 1e-9; v2 = Utils$1.preciseAddition(v2, newStep)) {\n          scale.result.push(Utils$1.stripNumber(v2, 7));\n        }\n        scale.niceMin = newNiceMin;\n        scale.niceMax = newNiceMax;\n        axisSeriesMap[p2.ai].forEach((si) => {\n          minYArr[si] = scale.niceMin;\n          maxYArr[si] = scale.niceMax;\n        });\n      });\n    } else if (alignZeroParticipants.length === 1) {\n      const p2 = alignZeroParticipants[0];\n      this.setYScaleForIndex(p2.ai, p2.minY, p2.maxY);\n      axisSeriesMap[p2.ai].forEach((si) => {\n        minYArr[si] = gl.yAxisScale[p2.ai].niceMin;\n        maxYArr[si] = gl.yAxisScale[p2.ai].niceMax;\n      });\n    }\n  }\n}\nclass Range {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n    this.scales = new Scales(this.w);\n  }\n  init() {\n    this.setYRange();\n    this.setXRange();\n    this.setZRange();\n  }\n  /**\n   * One rendered x-pixel expressed in data units, used to widen the\n   * autoScaleYaxis window so a boundary point that is still drawn inside the\n   * plot survives a sub-pixel rounding error in `xaxis.min`/`xaxis.max`.\n   *\n   * The window is taken from the configured bounds (that is what maps onto the\n   * grid) and falls back to the series' own x-extent for whichever bound is\n   * unset. Returns 0 when there is nothing to scale against: `gridWidth` is\n   * still 0 before the first `plotCoords()` run, and a first render has no\n   * pixel round-trip to compensate for anyway.\n   *\n   * @param {number[] | undefined} seriesX\n   * @returns {number}\n   */\n  _xPixelTolerance(seriesX) {\n    const gridWidth = this.w.layout.gridWidth;\n    if (!gridWidth || !seriesX || !seriesX.length) return 0;\n    const cnfX = this.w.config.xaxis;\n    const lo = typeof cnfX.min === \"number\" ? cnfX.min : seriesX[0];\n    const hi = typeof cnfX.max === \"number\" ? cnfX.max : seriesX[seriesX.length - 1];\n    if (!(hi > lo)) return 0;\n    return (hi - lo) / gridWidth;\n  }\n  /**\n   * @param {number} startingSeriesIndex\n   * @param {number | null} [endingSeriesIndex]\n   */\n  getMinYMaxY(startingSeriesIndex, lowestY = Number.MAX_VALUE, highestY = -Number.MAX_VALUE, endingSeriesIndex = null) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n    const cnf = this.w.config;\n    const gl = this.w.globals;\n    let maxY = -Number.MAX_VALUE;\n    let minY = Number.MIN_VALUE;\n    if (endingSeriesIndex === null) {\n      endingSeriesIndex = startingSeriesIndex + 1;\n    }\n    const series = this.w.seriesData.series;\n    let seriesMin = series;\n    let seriesMax = series;\n    if (cnf.chart.type === \"candlestick\") {\n      seriesMin = this.w.candleData.seriesCandleL;\n      seriesMax = this.w.candleData.seriesCandleH;\n    } else if (cnf.chart.type === \"boxPlot\") {\n      seriesMin = this.w.candleData.seriesCandleO;\n      seriesMax = this.w.candleData.seriesCandleC;\n    } else if (cnf.chart.type === \"violin\") {\n      seriesMin = this.w.violinData.seriesViolinMin;\n      seriesMax = this.w.violinData.seriesViolinMax;\n    } else if (this.w.axisFlags.isRangeData) {\n      seriesMin = this.w.rangeData.seriesRangeStart;\n      seriesMax = this.w.rangeData.seriesRangeEnd;\n    }\n    let autoScaleYaxis = false;\n    if (this.w.seriesData.seriesX.length >= endingSeriesIndex) {\n      const brush = (\n        /** @type {any} */\n        (_a = gl.brushSource) == null ? void 0 : _a.w.config.chart.brush\n      );\n      if (cnf.chart.zoom.enabled && cnf.chart.zoom.autoScaleYaxis || (brush == null ? void 0 : brush.enabled) && (brush == null ? void 0 : brush.autoScaleYaxis)) {\n        autoScaleYaxis = true;\n      }\n    }\n    for (let i2 = startingSeriesIndex; i2 < endingSeriesIndex; i2++) {\n      gl.dataPoints = Math.max(gl.dataPoints, series[i2].length);\n      const seriesType = (\n        /** @type {Record<string,any>} */\n        cnf.series[i2].type\n      );\n      if (this.w.labelData.categoryLabels.length) {\n        gl.dataPoints = this.w.labelData.categoryLabels.filter(\n          (label) => typeof label !== \"undefined\"\n        ).length;\n      }\n      if (this.w.labelData.labels.length && cnf.xaxis.type !== \"datetime\" && /**\n       * @param {number} a\n       * @param {number[]} c\n       */\n      this.w.seriesData.series.reduce((a2, c2) => a2 + c2.length, 0) !== 0) {\n        gl.dataPoints = Math.max(gl.dataPoints, this.w.labelData.labels.length);\n      }\n      let firstXIndex = 0;\n      let lastXIndex = series[i2].length - 1;\n      if (autoScaleYaxis) {\n        const xTolerance = this._xPixelTolerance(this.w.seriesData.seriesX[i2]);\n        if (cnf.xaxis.min) {\n          const lowerBound = cnf.xaxis.min - xTolerance;\n          for (; firstXIndex < lastXIndex && this.w.seriesData.seriesX[i2][firstXIndex] < lowerBound; firstXIndex++) {\n          }\n        }\n        if (cnf.xaxis.max) {\n          const upperBound = cnf.xaxis.max + xTolerance;\n          for (; lastXIndex > firstXIndex && this.w.seriesData.seriesX[i2][lastXIndex] > upperBound; lastXIndex--) {\n          }\n        }\n      }\n      const plainNumeric = seriesMin === series && seriesMax === series && cnf.chart.type !== \"boxPlot\" && seriesType !== \"candlestick\" && seriesType !== \"boxPlot\" && seriesType !== \"violin\" && seriesType !== \"rangeArea\" && seriesType !== \"rangeBar\" && !(this.w.seriesData.seriesGoals[i2] && this.w.seriesData.seriesGoals[i2].length);\n      if (plainNumeric) {\n        const arr = series[i2];\n        const jEnd = Math.min(lastXIndex, arr.length - 1);\n        const pe = (_b = this.w.seriesData._parsedExtrema) == null ? void 0 : _b[i2];\n        if (pe && pe.ref === arr && pe.len === arr.length && firstXIndex === 0 && jEnd === arr.length - 1) {\n          if (pe.maxY > maxY) maxY = pe.maxY;\n          if (pe.lowestY < lowestY) lowestY = pe.lowestY;\n          if (pe.negMinY < 0 && pe.negMinY < minY) minY = pe.negMinY;\n          if (pe.yDec > gl.yValueDecimal) gl.yValueDecimal = pe.yDec;\n          if (pe.hasNulls) gl.hasNullValues = true;\n        } else {\n          let yDec = gl.yValueDecimal;\n          let hasNulls = false;\n          for (let j = firstXIndex; j <= jEnd; j++) {\n            const val = arr[j];\n            if (val !== null && typeof val === \"number\" && val === val && val !== Infinity && val !== -Infinity) {\n              if (val > maxY) maxY = val;\n              if (val < lowestY) lowestY = val;\n              if (minY > val && val < 0) minY = val;\n              if (!Number.isInteger(val)) {\n                const av = val < 0 ? -val : val;\n                if (av >= 1e-6 && av < 1e21) {\n                  const str = \"\" + val;\n                  const dot = str.indexOf(\".\");\n                  const dec = dot === -1 ? 0 : str.length - dot - 1;\n                  if (dec > yDec) yDec = dec;\n                } else {\n                  const nv = Utils$1.noExponents(val);\n                  if (Utils$1.isFloat(nv)) {\n                    yDec = Math.max(yDec, nv.toString().split(\".\")[1].length);\n                  }\n                }\n              }\n            } else {\n              hasNulls = true;\n            }\n          }\n          gl.yValueDecimal = yDec;\n          if (hasNulls) gl.hasNullValues = true;\n        }\n        highestY = maxY;\n        if (seriesType === \"bar\" || seriesType === \"column\") {\n          if (minY < 0 && maxY < 0) {\n            maxY = 0;\n            highestY = Math.max(highestY, 0);\n          }\n          if (minY === Number.MIN_VALUE) {\n            minY = 0;\n            lowestY = Math.min(lowestY, 0);\n          }\n        }\n        continue;\n      }\n      for (let j = firstXIndex; j <= lastXIndex && j < this.w.seriesData.series[i2].length; j++) {\n        let val = series[i2][j];\n        if (val !== null && Utils$1.isNumber(val)) {\n          if (typeof ((_c = seriesMax[i2]) == null ? void 0 : _c[j]) !== \"undefined\") {\n            maxY = Math.max(maxY, seriesMax[i2][j]);\n            lowestY = Math.min(lowestY, seriesMax[i2][j]);\n          }\n          if (typeof ((_d = seriesMin[i2]) == null ? void 0 : _d[j]) !== \"undefined\") {\n            lowestY = Math.min(lowestY, seriesMin[i2][j]);\n            highestY = Math.max(highestY, seriesMin[i2][j]);\n          }\n          switch (seriesType) {\n            case \"candlestick\":\n              {\n                if (typeof this.w.candleData.seriesCandleC[i2][j] !== \"undefined\") {\n                  maxY = Math.max(maxY, this.w.candleData.seriesCandleH[i2][j]);\n                  lowestY = Math.min(\n                    lowestY,\n                    this.w.candleData.seriesCandleL[i2][j]\n                  );\n                }\n              }\n              break;\n            case \"boxPlot\":\n              {\n                if (typeof this.w.candleData.seriesCandleC[i2][j] !== \"undefined\") {\n                  maxY = Math.max(maxY, this.w.candleData.seriesCandleC[i2][j]);\n                  lowestY = Math.min(\n                    lowestY,\n                    this.w.candleData.seriesCandleO[i2][j]\n                  );\n                }\n              }\n              break;\n            case \"violin\":\n              {\n                if (typeof ((_e = this.w.violinData.seriesViolinMax[i2]) == null ? void 0 : _e[j]) !== \"undefined\") {\n                  maxY = Math.max(maxY, this.w.violinData.seriesViolinMax[i2][j]);\n                  lowestY = Math.min(\n                    lowestY,\n                    this.w.violinData.seriesViolinMin[i2][j]\n                  );\n                }\n              }\n              break;\n          }\n          if (seriesType && seriesType !== \"candlestick\" && seriesType !== \"boxPlot\" && seriesType !== \"violin\" && seriesType !== \"rangeArea\" && seriesType !== \"rangeBar\") {\n            maxY = Math.max(maxY, this.w.seriesData.series[i2][j]);\n            lowestY = Math.min(lowestY, this.w.seriesData.series[i2][j]);\n          }\n          if (this.w.seriesData.seriesGoals[i2] && this.w.seriesData.seriesGoals[i2][j] && Array.isArray(this.w.seriesData.seriesGoals[i2][j])) {\n            this.w.seriesData.seriesGoals[i2][j].forEach(\n              (g2) => {\n                maxY = Math.max(maxY, g2.value);\n                lowestY = Math.min(lowestY, g2.value);\n              }\n            );\n          }\n          if (this.w.config.chart.type === \"boxPlot\" || seriesType === \"boxPlot\") {\n            const boxPts = (_g = (_f = this.w.candleData.seriesBoxPoints) == null ? void 0 : _f[i2]) == null ? void 0 : _g[j];\n            if (boxPts) {\n              for (let p2 = 0; p2 < boxPts.length; p2++) {\n                const pv = boxPts[p2];\n                if (typeof pv === \"number\") {\n                  maxY = Math.max(maxY, pv);\n                  lowestY = Math.min(lowestY, pv);\n                }\n              }\n            }\n          }\n          highestY = maxY;\n          val = Utils$1.noExponents(val);\n          if (Utils$1.isFloat(val)) {\n            gl.yValueDecimal = Math.max(\n              gl.yValueDecimal,\n              val.toString().split(\".\")[1].length\n            );\n          }\n          if (minY > ((_h = seriesMin[i2]) == null ? void 0 : _h[j]) && ((_i = seriesMin[i2]) == null ? void 0 : _i[j]) < 0) {\n            minY = seriesMin[i2][j];\n          }\n        } else {\n          gl.hasNullValues = true;\n        }\n      }\n      if (seriesType === \"bar\" || seriesType === \"column\") {\n        if (minY < 0 && maxY < 0) {\n          maxY = 0;\n          highestY = Math.max(highestY, 0);\n        }\n        if (minY === Number.MIN_VALUE) {\n          minY = 0;\n          lowestY = Math.min(lowestY, 0);\n        }\n      }\n    }\n    if (cnf.chart.type === \"rangeBar\" && this.w.rangeData.seriesRangeStart.length && gl.isBarHorizontal) {\n      minY = lowestY;\n    }\n    if (cnf.chart.type === \"bar\") {\n      if (minY < 0 && maxY < 0) {\n        maxY = 0;\n      }\n      if (minY === Number.MIN_VALUE) {\n        minY = 0;\n      }\n    }\n    return {\n      minY,\n      maxY,\n      lowestY,\n      highestY\n    };\n  }\n  setYRange() {\n    const gl = this.w.globals;\n    const cnf = this.w.config;\n    gl.maxY = -Number.MAX_VALUE;\n    gl.minY = Number.MIN_VALUE;\n    let lowestYInAllSeries = Number.MAX_VALUE;\n    let minYMaxY;\n    if (gl.isMultipleYAxis) {\n      lowestYInAllSeries = Number.MAX_VALUE;\n      for (let i2 = 0; i2 < this.w.seriesData.series.length; i2++) {\n        minYMaxY = this.getMinYMaxY(i2);\n        gl.minYArr[i2] = minYMaxY.lowestY;\n        gl.maxYArr[i2] = minYMaxY.highestY;\n        lowestYInAllSeries = Math.min(lowestYInAllSeries, minYMaxY.lowestY);\n      }\n    }\n    minYMaxY = this.getMinYMaxY(\n      0,\n      lowestYInAllSeries,\n      void 0,\n      this.w.seriesData.series.length\n    );\n    if (cnf.chart.type === \"bar\") {\n      gl.minY = minYMaxY.minY;\n      gl.maxY = minYMaxY.maxY;\n    } else {\n      gl.minY = minYMaxY.lowestY;\n      gl.maxY = minYMaxY.highestY;\n    }\n    lowestYInAllSeries = minYMaxY.lowestY;\n    if (cnf.chart.stacked) {\n      this._setStackedMinMax();\n    }\n    if (cnf.chart.type === \"line\" || cnf.chart.type === \"area\" || cnf.chart.type === \"scatter\" || cnf.chart.type === \"candlestick\" || cnf.chart.type === \"boxPlot\" || cnf.chart.type === \"violin\" || cnf.chart.type === \"rangeBar\" && !gl.isBarHorizontal) {\n      if (gl.minY === Number.MIN_VALUE && lowestYInAllSeries !== -Number.MAX_VALUE && lowestYInAllSeries !== gl.maxY) {\n        gl.minY = lowestYInAllSeries;\n      }\n    } else {\n      gl.minY = gl.minY !== Number.MIN_VALUE ? Math.min(minYMaxY.minY, gl.minY) : minYMaxY.minY;\n    }\n    cnf.yaxis.forEach((yaxe, index) => {\n      if (yaxe.max !== void 0) {\n        if (typeof yaxe.max === \"number\") {\n          gl.maxYArr[index] = yaxe.max;\n        } else if (typeof yaxe.max === \"function\") {\n          gl.maxYArr[index] = yaxe.max(\n            gl.isMultipleYAxis ? gl.maxYArr[index] : gl.maxY\n          );\n        }\n        gl.maxY = gl.maxYArr[index];\n      }\n      if (yaxe.min !== void 0) {\n        if (typeof yaxe.min === \"number\") {\n          gl.minYArr[index] = yaxe.min;\n        } else if (typeof yaxe.min === \"function\") {\n          gl.minYArr[index] = yaxe.min(\n            gl.isMultipleYAxis ? gl.minYArr[index] === Number.MIN_VALUE ? 0 : gl.minYArr[index] : gl.minY\n          );\n        }\n        gl.minY = gl.minYArr[index];\n      }\n    });\n    if (gl.isBarHorizontal) {\n      const minmax = [\"min\", \"max\"];\n      minmax.forEach((m2) => {\n        if (cnf.xaxis[m2] !== void 0 && typeof cnf.xaxis[m2] === \"number\") {\n          m2 === \"min\" ? gl.minY = cnf.xaxis[m2] : gl.maxY = cnf.xaxis[m2];\n        }\n      });\n    }\n    if (gl.isMultipleYAxis) {\n      this.scales.scaleMultipleYAxes();\n      gl.minY = lowestYInAllSeries;\n    } else {\n      this.scales.setYScaleForIndex(0, gl.minY, gl.maxY);\n      gl.minY = gl.yAxisScale[0].niceMin;\n      gl.maxY = gl.yAxisScale[0].niceMax;\n      gl.minYArr[0] = gl.minY;\n      gl.maxYArr[0] = gl.maxY;\n    }\n    gl.barGroups = [];\n    gl.lineGroups = [];\n    gl.areaGroups = [];\n    cnf.series.forEach((s2) => {\n      const _s = (\n        /** @type {any} */\n        s2\n      );\n      const type = _s.type || cnf.chart.type;\n      switch (type) {\n        case \"bar\":\n        case \"column\":\n          gl.barGroups.push(_s.group);\n          break;\n        case \"line\":\n          gl.lineGroups.push(_s.group);\n          break;\n        case \"area\":\n          gl.areaGroups.push(_s.group);\n          break;\n      }\n    });\n    gl.barGroups = gl.barGroups.filter((v2, i2, a2) => a2.indexOf(v2) === i2);\n    gl.lineGroups = gl.lineGroups.filter((v2, i2, a2) => a2.indexOf(v2) === i2);\n    gl.areaGroups = gl.areaGroups.filter((v2, i2, a2) => a2.indexOf(v2) === i2);\n    return {\n      minY: gl.minY,\n      maxY: gl.maxY,\n      minYArr: gl.minYArr,\n      maxYArr: gl.maxYArr,\n      yAxisScale: gl.yAxisScale\n    };\n  }\n  setXRange() {\n    const gl = this.w.globals;\n    const cnf = this.w.config;\n    const isXNumeric = cnf.xaxis.type === \"numeric\" || cnf.xaxis.type === \"datetime\" || cnf.xaxis.type === \"category\" && !this.w.axisFlags.noLabelsProvided || this.w.axisFlags.noLabelsProvided || this.w.axisFlags.isXNumeric;\n    const getInitialMinXMaxX = () => {\n      var _a;\n      let minX = gl.minX;\n      let maxX = gl.maxX;\n      for (let i2 = 0; i2 < this.w.seriesData.series.length; i2++) {\n        const lbls = (\n          /** @type {any} */\n          this.w.labelData.labels[i2]\n        );\n        if (!lbls) continue;\n        const pe = (_a = this.w.seriesData._parsedExtrema) == null ? void 0 : _a[i2];\n        if (pe && pe.xNumeric && pe.xref === lbls && pe.len === lbls.length) {\n          if (pe.maxX > maxX) maxX = pe.maxX;\n          if (pe.minX < minX) minX = pe.minX;\n          continue;\n        }\n        for (let j = 0; j < lbls.length; j++) {\n          const v2 = lbls[j];\n          if (v2 !== null && typeof v2 === \"number\" && v2 === v2) {\n            if (v2 > maxX) maxX = v2;\n            if (v2 < minX) minX = v2;\n          }\n        }\n      }\n      gl.maxX = maxX;\n      gl.initialMaxX = maxX;\n      gl.minX = minX;\n      gl.initialMinX = minX;\n    };\n    if (this.w.axisFlags.isXNumeric) {\n      getInitialMinXMaxX();\n    }\n    if (this.w.axisFlags.noLabelsProvided) {\n      if (cnf.xaxis.categories.length === 0) {\n        gl.maxX = /** @type {any} */\n        this.w.labelData.labels[this.w.labelData.labels.length - 1];\n        gl.initialMaxX = /** @type {any} */\n        this.w.labelData.labels[this.w.labelData.labels.length - 1];\n        gl.minX = 1;\n        gl.initialMinX = 1;\n      }\n    }\n    if (this.w.axisFlags.isXNumeric || this.w.axisFlags.noLabelsProvided || this.w.axisFlags.dataFormatXNumeric) {\n      let ticks = 10;\n      if (cnf.xaxis.tickAmount === void 0) {\n        ticks = Math.round(gl.svgWidth / 150);\n        if (cnf.xaxis.type === \"numeric\" && gl.dataPoints < 30) {\n          ticks = gl.dataPoints - 1;\n        }\n        if (ticks > gl.dataPoints && gl.dataPoints !== 0) {\n          ticks = gl.dataPoints - 1;\n        }\n      } else if (cnf.xaxis.tickAmount === \"dataPoints\") {\n        if (this.w.seriesData.series.length > 1) {\n          ticks = this.w.seriesData.series[gl.maxValsInArrayIndex].length - 1;\n        }\n        if (this.w.axisFlags.isXNumeric) {\n          const diff = Math.round(gl.maxX - gl.minX);\n          if (diff < 30) {\n            ticks = diff;\n          }\n        }\n      } else {\n        ticks = cnf.xaxis.tickAmount;\n      }\n      gl.xTickAmount = ticks;\n      if (cnf.xaxis.max !== void 0 && typeof cnf.xaxis.max === \"number\") {\n        gl.maxX = cnf.xaxis.max;\n      }\n      if (cnf.xaxis.min !== void 0 && typeof cnf.xaxis.min === \"number\") {\n        gl.minX = cnf.xaxis.min;\n      }\n      if (cnf.xaxis.range !== void 0) {\n        gl.minX = gl.maxX - cnf.xaxis.range;\n      }\n      if (gl.minX !== Number.MAX_VALUE && gl.maxX !== -Number.MAX_VALUE) {\n        if (cnf.xaxis.convertedCatToNumeric && !this.w.axisFlags.dataFormatXNumeric) {\n          const catScale = [];\n          for (let i2 = gl.minX - 1; i2 < gl.maxX; i2++) {\n            catScale.push(i2 + 1);\n          }\n          gl.xAxisScale = {\n            result: catScale,\n            niceMin: catScale[0],\n            niceMax: catScale[catScale.length - 1]\n          };\n        } else {\n          gl.xAxisScale = this.scales.setXScale(gl.minX, gl.maxX);\n        }\n      } else {\n        gl.xAxisScale = this.scales.linearScale(\n          0,\n          ticks,\n          ticks,\n          0,\n          cnf.xaxis.stepSize\n        );\n        if (this.w.axisFlags.noLabelsProvided && this.w.labelData.labels.length > 0) {\n          gl.xAxisScale = this.scales.linearScale(\n            1,\n            this.w.labelData.labels.length,\n            ticks - 1,\n            0,\n            cnf.xaxis.stepSize\n          );\n          this.w.seriesData.seriesX = /** @type {any} */\n          this.w.labelData.labels.slice();\n        }\n      }\n      if (isXNumeric) {\n        this.w.labelData.labels = /** @type {any} */\n        gl.xAxisScale.result.slice();\n      }\n    }\n    if (gl.isBarHorizontal && this.w.labelData.labels.length) {\n      gl.xTickAmount = this.w.labelData.labels.length;\n    }\n    this._handleSingleDataPoint();\n    this._getMinXDiff();\n    return {\n      minX: gl.minX,\n      maxX: gl.maxX\n    };\n  }\n  setZRange() {\n    const gl = this.w.globals;\n    if (!this.w.axisFlags.isDataXYZ) return;\n    for (let i2 = 0; i2 < this.w.seriesData.series.length; i2++) {\n      if (typeof this.w.seriesData.seriesZ[i2] !== \"undefined\") {\n        for (let j = 0; j < this.w.seriesData.seriesZ[i2].length; j++) {\n          if (this.w.seriesData.seriesZ[i2][j] !== null && Utils$1.isNumber(this.w.seriesData.seriesZ[i2][j])) {\n            gl.maxZ = Math.max(gl.maxZ, this.w.seriesData.seriesZ[i2][j]);\n            gl.minZ = Math.min(gl.minZ, this.w.seriesData.seriesZ[i2][j]);\n          }\n        }\n      }\n    }\n  }\n  _handleSingleDataPoint() {\n    const gl = this.w.globals;\n    const cnf = this.w.config;\n    if (gl.minX === gl.maxX) {\n      const datetimeObj = new DateTime(this.w);\n      if (cnf.xaxis.type === \"datetime\") {\n        const newMinX = datetimeObj.getDate(gl.minX);\n        if (cnf.xaxis.labels.datetimeUTC) {\n          newMinX.setUTCDate(newMinX.getUTCDate() - 2);\n        } else {\n          newMinX.setDate(newMinX.getDate() - 2);\n        }\n        gl.minX = new Date(newMinX).getTime();\n        const newMaxX = datetimeObj.getDate(gl.maxX);\n        if (cnf.xaxis.labels.datetimeUTC) {\n          newMaxX.setUTCDate(newMaxX.getUTCDate() + 2);\n        } else {\n          newMaxX.setDate(newMaxX.getDate() + 2);\n        }\n        gl.maxX = new Date(newMaxX).getTime();\n      } else if (cnf.xaxis.type === \"numeric\" || cnf.xaxis.type === \"category\" && !this.w.axisFlags.noLabelsProvided) {\n        gl.minX = gl.minX - 2;\n        gl.initialMinX = gl.minX;\n        gl.maxX = gl.maxX + 2;\n        gl.initialMaxX = gl.maxX;\n      }\n    }\n  }\n  _getMinXDiff() {\n    const gl = this.w.globals;\n    if (this.w.axisFlags.isXNumeric) {\n      this.w.seriesData.seriesX.forEach((sX, si) => {\n        var _a;\n        if (sX.length) {\n          if (sX.length === 1) {\n            sX.push(\n              this.w.seriesData.seriesX[gl.maxValsInArrayIndex][this.w.seriesData.seriesX[gl.maxValsInArrayIndex].length - 1]\n            );\n          }\n          const pe = (_a = this.w.seriesData._parsedExtrema) == null ? void 0 : _a[si];\n          if (pe && pe.xNumeric && pe.xSorted && pe.xref === sX && pe.len === sX.length) {\n            if (pe.minXDiff < gl.minXDiff) gl.minXDiff = pe.minXDiff;\n            if (gl.dataPoints === 1 || gl.minXDiff === Number.MAX_VALUE) {\n              gl.minXDiff = 0.5;\n            }\n            return;\n          }\n          let presorted = true;\n          let minDiff = gl.minXDiff;\n          for (let j = 1; j < sX.length; j++) {\n            const d = sX[j] - sX[j - 1];\n            if (d > 0) {\n              if (d < minDiff) minDiff = d;\n            } else if (d < 0) {\n              presorted = false;\n              break;\n            }\n          }\n          if (presorted) {\n            gl.minXDiff = minDiff;\n            if (gl.dataPoints === 1 || gl.minXDiff === Number.MAX_VALUE) {\n              gl.minXDiff = 0.5;\n            }\n            return;\n          }\n          const seriesX = sX.slice();\n          seriesX.sort((a2, b2) => a2 - b2);\n          seriesX.forEach((s2, j) => {\n            if (j > 0) {\n              const xDiff = s2 - seriesX[j - 1];\n              if (xDiff > 0) {\n                gl.minXDiff = Math.min(xDiff, gl.minXDiff);\n              }\n            }\n          });\n          if (gl.dataPoints === 1 || gl.minXDiff === Number.MAX_VALUE) {\n            gl.minXDiff = 0.5;\n          }\n        }\n      });\n    }\n  }\n  _setStackedMinMax() {\n    const gl = this.w.globals;\n    if (!this.w.seriesData.series.length) return;\n    let seriesGroups = this.w.labelData.seriesGroups;\n    if (!seriesGroups.length) {\n      seriesGroups = [this.w.seriesData.seriesNames.map((name2) => name2)];\n    }\n    const stackedPoss = {};\n    const stackedNegs = {};\n    seriesGroups.forEach((group) => {\n      stackedPoss[group] = [];\n      stackedNegs[group] = [];\n      const indicesOfSeriesInGroup = this.w.config.series.map(\n        (serie, si) => group.indexOf(this.w.seriesData.seriesNames[si]) > -1 ? si : null\n      ).filter((f) => f !== null);\n      indicesOfSeriesInGroup.forEach((i2) => {\n        var _a, _b, _c, _d;\n        for (let j = 0; j < this.w.seriesData.series[gl.maxValsInArrayIndex].length; j++) {\n          if (typeof stackedPoss[group][j] === \"undefined\") {\n            stackedPoss[group][j] = 0;\n            stackedNegs[group][j] = 0;\n          }\n          const stackSeries = this.w.config.chart.stacked && !gl.comboCharts || this.w.config.chart.stacked && gl.comboCharts && (!this.w.config.chart.stackOnlyBar || /** @type {Record<string,any>} */\n          ((_b = (_a = this.w.config.series) == null ? void 0 : _a[i2]) == null ? void 0 : _b.type) === \"bar\" || /** @type {Record<string,any>} */\n          ((_d = (_c = this.w.config.series) == null ? void 0 : _c[i2]) == null ? void 0 : _d.type) === \"column\");\n          if (stackSeries) {\n            if (this.w.seriesData.series[i2][j] !== null && Utils$1.isNumber(this.w.seriesData.series[i2][j])) {\n              this.w.seriesData.series[i2][j] > 0 ? stackedPoss[group][j] += parseFloat(String(this.w.seriesData.series[i2][j])) + 1e-4 : stackedNegs[group][j] += parseFloat(\n                String(this.w.seriesData.series[i2][j])\n              );\n            }\n          }\n        }\n      });\n    });\n    Object.entries(stackedPoss).forEach(([key]) => {\n      stackedPoss[key].forEach(\n        (_, stgi) => {\n          gl.maxY = Math.max(gl.maxY, stackedPoss[key][stgi]);\n          gl.minY = Math.min(gl.minY, stackedNegs[key][stgi]);\n        }\n      );\n    });\n  }\n}\nfunction getThemePalettes() {\n  return {\n    // All colours pass WCAG 1.4.11 non-text contrast (≥ 3:1) against the\n    // default light (#fff) and dark (#293450) theme backgrounds.\n    palette1: [\"#008FFB\", \"#00A86F\", \"#CA8501\", \"#FF4560\", \"#846DD5\"],\n    palette2: [\"#6978CB\", \"#039DE2\", \"#49A84D\", \"#B39105\", \"#D68000\"],\n    palette3: [\"#209FCC\", \"#648291\", \"#D4526E\", \"#0FA783\", \"#A19285\"],\n    palette4: [\"#2FA59D\", \"#73A20B\", \"#099DE1\", \"#FD5D5D\", \"#648291\"],\n    palette5: [\"#2B908F\", \"#F56566\", \"#2EAB16\", \"#FA4443\", \"#1EA2BD\"],\n    palette6: [\"#449DD1\", \"#F86624\", \"#EA3A4A\", \"#9C63D1\", \"#899E2A\"],\n    palette7: [\"#DF475B\", \"#1B998B\", \"#7E75B7\", \"#F46036\", \"#B1911B\"],\n    palette8: [\"#9C63D1\", \"#F86624\", \"#B38F04\", \"#EA3A4A\", \"#2FA2B3\"],\n    palette9: [\"#98776F\", \"#A19285\", \"#A8705E\", \"#BA6560\", \"#A0927F\"],\n    palette10: [\"#C91EFF\", \"#A94BFD\", \"#6C6AFE\", \"#2983FF\", \"#009ED8\"],\n    // CVD-safe palettes (Wong 2011 / IBM design)\n    cvdDeuteranopia: [\n      \"#0072B2\",\n      \"#E69F00\",\n      \"#56B4E9\",\n      \"#009E73\",\n      \"#F0E442\",\n      \"#D55E00\",\n      \"#CC79A7\"\n    ],\n    cvdProtanopia: [\n      \"#0077BB\",\n      \"#EE7733\",\n      \"#009988\",\n      \"#EE3377\",\n      \"#BBBBBB\",\n      \"#33BBEE\",\n      \"#CC3311\"\n    ],\n    cvdTritanopia: [\n      \"#CC3311\",\n      \"#009988\",\n      \"#EE7733\",\n      \"#0077BB\",\n      \"#EE3377\",\n      \"#BBBBBB\",\n      \"#33BBEE\"\n    ],\n    highContrast: [\n      \"#005A9C\",\n      \"#C00000\",\n      \"#007A33\",\n      \"#6C3483\",\n      \"#7B3F00\",\n      \"#0097A7\",\n      \"#4A235A\"\n    ]\n  };\n}\nclass YAxis {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {any} [elgrid]\n   */\n  constructor(w2, { theme = null, timeScale = null } = {}, elgrid) {\n    this.w = w2;\n    this.elgrid = elgrid;\n    this.xaxisFontSize = w2.config.xaxis.labels.style.fontSize;\n    this.axisFontFamily = w2.config.xaxis.labels.style.fontFamily;\n    this.xaxisForeColors = w2.config.xaxis.labels.style.colors;\n    this.isCategoryBarHorizontal = w2.config.chart.type === \"bar\" && w2.config.plotOptions.bar.horizontal;\n    this.xAxisoffX = w2.config.xaxis.position === \"bottom\" ? w2.layout.gridHeight : 0;\n    this.drawnLabels = [];\n    this.axesUtils = new AxesUtils(w2, { theme, timeScale });\n  }\n  /**\n   * @param {number} realIndex\n   */\n  drawYaxis(realIndex) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const yaxisStyle = w2.config.yaxis[realIndex].labels.style;\n    const {\n      fontSize: yaxisFontSize,\n      fontFamily: yaxisFontFamily,\n      fontWeight: yaxisFontWeight\n    } = yaxisStyle;\n    const elYaxis = graphics.group({\n      class: \"apexcharts-yaxis\",\n      rel: realIndex,\n      transform: `translate(${w2.globals.translateYAxisX[realIndex]}, 0)`\n    });\n    if (this.axesUtils.isYAxisHidden(realIndex)) return elYaxis;\n    const elYaxisTexts = graphics.group({ class: \"apexcharts-yaxis-texts-g\" });\n    elYaxis.add(elYaxisTexts);\n    const tickAmount = w2.globals.yAxisScale[realIndex].result.length - 1;\n    const labelsDivider = w2.layout.gridHeight / tickAmount;\n    const lbFormatter = w2.formatters.yLabelFormatters[realIndex];\n    const labels = this.axesUtils.checkForReversedLabels(\n      realIndex,\n      w2.globals.yAxisScale[realIndex].result.slice()\n    );\n    let labelStep = 1;\n    if (w2.config.chart.type === \"heatmap\" && !w2.config.yaxis[realIndex].labels.formatter) {\n      const fs = parseInt(yaxisFontSize, 10) || 11;\n      const maxLabels = Math.max(1, Math.floor(w2.layout.gridHeight / (fs * 1.4)));\n      const count = tickAmount + 1;\n      if (count > maxLabels) labelStep = Math.ceil(count / maxLabels);\n    }\n    if (w2.config.yaxis[realIndex].labels.show) {\n      let lY = w2.layout.translateY + w2.config.yaxis[realIndex].labels.offsetY;\n      if (w2.globals.isBarHorizontal) lY = 0;\n      else if (w2.config.chart.type === \"heatmap\") lY -= labelsDivider / 2;\n      lY += parseInt(yaxisFontSize, 10) / 3;\n      let firstLabel = null;\n      for (let i2 = tickAmount; i2 >= 0; i2--) {\n        const thinned = labelStep > 1 && i2 % labelStep !== 0;\n        const val = thinned ? \"\" : lbFormatter(labels[i2], i2, w2);\n        let xPad = w2.config.yaxis[realIndex].labels.padding;\n        if (w2.config.yaxis[realIndex].opposite && w2.config.yaxis.length !== 0)\n          xPad *= -1;\n        const textAnchor = this.getTextAnchor(\n          w2.config.yaxis[realIndex].labels.align,\n          w2.config.yaxis[realIndex].opposite\n        );\n        const yColors = this.axesUtils.getYAxisForeColor(\n          yaxisStyle.colors,\n          realIndex\n        );\n        const foreColor = Array.isArray(yColors) ? yColors[i2] : yColors;\n        const existingYLabels = Array.from(\n          w2.dom.baseEl.querySelectorAll(\n            `.apexcharts-yaxis[rel='${realIndex}'] .apexcharts-yaxis-label tspan`\n          )\n        ).map((label2) => label2.textContent);\n        const label = graphics.drawText({\n          x: xPad,\n          y: lY,\n          text: existingYLabels.includes(val) && !w2.config.yaxis[realIndex].labels.showDuplicates ? \"\" : val,\n          textAnchor,\n          fontSize: yaxisFontSize,\n          fontFamily: yaxisFontFamily,\n          fontWeight: yaxisFontWeight,\n          maxWidth: w2.config.yaxis[realIndex].labels.maxWidth,\n          foreColor,\n          isPlainText: false,\n          cssClass: `apexcharts-yaxis-label ${yaxisStyle.cssClass}`\n        });\n        elYaxisTexts.add(label);\n        this.addTooltip(label, val);\n        if (firstLabel === null) {\n          firstLabel = label;\n        }\n        if (w2.config.yaxis[realIndex].labels.rotate !== 0) {\n          this.rotateLabel(\n            graphics,\n            label,\n            firstLabel,\n            w2.config.yaxis[realIndex].labels.rotate\n          );\n        }\n        lY += labelsDivider;\n      }\n    }\n    this.addYAxisTitle(graphics, elYaxis, realIndex);\n    this.addAxisBorder(graphics, elYaxis, realIndex, tickAmount, labelsDivider);\n    return elYaxis;\n  }\n  /**\n   * @param {string} align\n   * @param {boolean} opposite\n   */\n  getTextAnchor(align, opposite) {\n    if (align === \"left\") return \"start\";\n    if (align === \"center\") return \"middle\";\n    if (align === \"right\") return \"end\";\n    return opposite ? \"start\" : \"end\";\n  }\n  /**\n   * @param {any} label\n   * @param {any} val\n   */\n  addTooltip(label, val) {\n    const elTooltipTitle = BrowserAPIs.createElementNS(SVGNS$2, \"title\");\n    elTooltipTitle.textContent = Array.isArray(val) ? val.join(\" \") : val;\n    label.node.appendChild(elTooltipTitle);\n  }\n  /**\n   * @param {import('../Graphics').default} graphics\n   * @param {any} label\n   * @param {any} firstLabel\n   * @param {number} rotate\n   */\n  rotateLabel(graphics, label, firstLabel, rotate) {\n    const firstLabelCenter = graphics.rotateAroundCenter(firstLabel.node);\n    const labelCenter = graphics.rotateAroundCenter(label.node);\n    label.node.setAttribute(\n      \"transform\",\n      `rotate(${rotate} ${firstLabelCenter.x} ${labelCenter.y})`\n    );\n  }\n  /**\n   * @param {import('../Graphics').default} graphics\n   * @param {any} elYaxis\n   * @param {number} realIndex\n   */\n  addYAxisTitle(graphics, elYaxis, realIndex) {\n    const w2 = this.w;\n    if (w2.config.yaxis[realIndex].title.text !== void 0) {\n      const elYaxisTitle = graphics.group({ class: \"apexcharts-yaxis-title\" });\n      const x = w2.config.yaxis[realIndex].opposite ? w2.globals.translateYAxisX[realIndex] : 0;\n      const elYAxisTitleText = graphics.drawText({\n        x,\n        y: w2.layout.gridHeight / 2 + w2.layout.translateY + w2.config.yaxis[realIndex].title.offsetY,\n        text: w2.config.yaxis[realIndex].title.text,\n        textAnchor: \"end\",\n        foreColor: w2.config.yaxis[realIndex].title.style.color,\n        fontSize: w2.config.yaxis[realIndex].title.style.fontSize,\n        fontWeight: w2.config.yaxis[realIndex].title.style.fontWeight,\n        fontFamily: w2.config.yaxis[realIndex].title.style.fontFamily,\n        cssClass: `apexcharts-yaxis-title-text ${w2.config.yaxis[realIndex].title.style.cssClass}`\n      });\n      elYaxisTitle.add(elYAxisTitleText);\n      elYaxis.add(elYaxisTitle);\n    }\n  }\n  /**\n   * @param {import('../Graphics').default} graphics\n   * @param {any} elYaxis\n   * @param {number} realIndex\n   * @param {number} tickAmount\n   * @param {number} labelsDivider\n   */\n  addAxisBorder(graphics, elYaxis, realIndex, tickAmount, labelsDivider) {\n    const w2 = this.w;\n    const axisBorder = w2.config.yaxis[realIndex].axisBorder;\n    let x = 31 + axisBorder.offsetX;\n    if (w2.config.yaxis[realIndex].opposite) x = -31 - axisBorder.offsetX;\n    if (axisBorder.show) {\n      const elVerticalLine = graphics.drawLine(\n        x,\n        w2.layout.translateY + axisBorder.offsetY - 2,\n        x,\n        w2.layout.gridHeight + w2.layout.translateY + axisBorder.offsetY + 2,\n        axisBorder.color,\n        0,\n        axisBorder.width\n      );\n      elYaxis.add(elVerticalLine);\n    }\n    if (w2.config.yaxis[realIndex].axisTicks.show) {\n      this.axesUtils.drawYAxisTicks(\n        x,\n        tickAmount,\n        axisBorder,\n        w2.config.yaxis[realIndex].axisTicks,\n        realIndex,\n        labelsDivider,\n        elYaxis\n      );\n    }\n  }\n  /**\n   * @param {number} realIndex\n   */\n  drawYaxisInversed(realIndex) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const elXaxis = graphics.group({\n      class: \"apexcharts-xaxis apexcharts-yaxis-inversed\"\n    });\n    const elXaxisTexts = graphics.group({\n      class: \"apexcharts-xaxis-texts-g\",\n      transform: `translate(${w2.layout.translateXAxisX}, ${w2.layout.translateXAxisY})`\n    });\n    elXaxis.add(elXaxisTexts);\n    let tickAmount = w2.globals.yAxisScale[realIndex].result.length - 1;\n    const labelsDivider = w2.layout.gridWidth / tickAmount + 0.1;\n    let l2 = labelsDivider + w2.config.xaxis.labels.offsetX;\n    const lbFormatter = w2.formatters.xLabelFormatter;\n    let labels = this.axesUtils.checkForReversedLabels(\n      realIndex,\n      w2.globals.yAxisScale[realIndex].result.slice()\n    );\n    const timescaleLabels = w2.labelData.timescaleLabels;\n    if (timescaleLabels.length > 0) {\n      this.xaxisLabels = timescaleLabels.slice();\n      labels = timescaleLabels.slice();\n      tickAmount = labels.length;\n    }\n    if (w2.config.xaxis.labels.show) {\n      for (let i2 = timescaleLabels.length ? 0 : tickAmount; timescaleLabels.length ? i2 < timescaleLabels.length : i2 >= 0; timescaleLabels.length ? i2++ : i2--) {\n        let val = lbFormatter == null ? void 0 : lbFormatter(labels[i2], i2, w2);\n        let x = w2.layout.gridWidth + w2.globals.padHorizontal - (l2 - labelsDivider + w2.config.xaxis.labels.offsetX);\n        if (timescaleLabels.length) {\n          const label = this.axesUtils.getLabel(\n            labels,\n            timescaleLabels,\n            x,\n            i2,\n            this.drawnLabels,\n            this.xaxisFontSize\n          );\n          x = label.x;\n          val = label.text;\n          this.drawnLabels.push(label.text);\n          if (i2 === 0 && w2.globals.skipFirstTimelinelabel) val = \"\";\n          if (i2 === labels.length - 1 && w2.globals.skipLastTimelinelabel)\n            val = \"\";\n        }\n        const elTick = graphics.drawText({\n          x,\n          y: this.xAxisoffX + w2.config.xaxis.labels.offsetY + 30 - (w2.config.xaxis.position === \"top\" ? w2.layout.xAxisHeight + w2.config.xaxis.axisTicks.height - 2 : 0),\n          text: val,\n          textAnchor: \"middle\",\n          foreColor: Array.isArray(this.xaxisForeColors) ? this.xaxisForeColors[realIndex] : this.xaxisForeColors,\n          fontSize: this.xaxisFontSize,\n          fontFamily: this.axisFontFamily,\n          fontWeight: w2.config.xaxis.labels.style.fontWeight,\n          isPlainText: false,\n          cssClass: `apexcharts-xaxis-label ${w2.config.xaxis.labels.style.cssClass}`\n        });\n        elXaxisTexts.add(elTick);\n        this.addTooltip(elTick, val);\n        l2 += labelsDivider;\n      }\n    }\n    this.inversedYAxisTitleText(elXaxis);\n    this.inversedYAxisBorder(elXaxis);\n    return elXaxis;\n  }\n  /**\n   * @param {any} parent\n   */\n  inversedYAxisBorder(parent) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const axisBorder = w2.config.xaxis.axisBorder;\n    if (axisBorder.show) {\n      let lineCorrection = 0;\n      if (w2.config.chart.type === \"bar\" && w2.axisFlags.isXNumeric)\n        lineCorrection -= 15;\n      const elHorzLine = graphics.drawLine(\n        w2.globals.padHorizontal + lineCorrection + axisBorder.offsetX,\n        this.xAxisoffX,\n        w2.layout.gridWidth,\n        this.xAxisoffX,\n        axisBorder.color,\n        0,\n        axisBorder.height\n      );\n      if (this.elgrid && this.elgrid.elGridBorders && w2.config.grid.show) {\n        this.elgrid.elGridBorders.add(elHorzLine);\n      } else {\n        parent.add(elHorzLine);\n      }\n    }\n  }\n  /**\n   * @param {any} parent\n   */\n  inversedYAxisTitleText(parent) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    if (w2.config.xaxis.title.text !== void 0) {\n      const elYaxisTitle = graphics.group({\n        class: \"apexcharts-xaxis-title apexcharts-yaxis-title-inversed\"\n      });\n      const elYAxisTitleText = graphics.drawText({\n        x: w2.layout.gridWidth / 2 + w2.config.xaxis.title.offsetX,\n        y: this.xAxisoffX + parseFloat(this.xaxisFontSize) + parseFloat(w2.config.xaxis.title.style.fontSize) + w2.config.xaxis.title.offsetY + 20,\n        text: w2.config.xaxis.title.text,\n        textAnchor: \"middle\",\n        fontSize: w2.config.xaxis.title.style.fontSize,\n        fontFamily: w2.config.xaxis.title.style.fontFamily,\n        fontWeight: w2.config.xaxis.title.style.fontWeight,\n        foreColor: w2.config.xaxis.title.style.color,\n        cssClass: `apexcharts-xaxis-title-text ${w2.config.xaxis.title.style.cssClass}`\n      });\n      elYaxisTitle.add(elYAxisTitleText);\n      parent.add(elYaxisTitle);\n    }\n  }\n  /**\n   * @param {number} realIndex\n   * @param {boolean} yAxisOpposite\n   */\n  yAxisTitleRotate(realIndex, yAxisOpposite) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const elYAxisLabelsWrap = w2.dom.baseEl.querySelector(\n      `.apexcharts-yaxis[rel='${realIndex}'] .apexcharts-yaxis-texts-g`\n    );\n    const yAxisLabelsCoord = elYAxisLabelsWrap ? elYAxisLabelsWrap.getBoundingClientRect() : { width: 0, height: 0 };\n    const yAxisTitle = w2.dom.baseEl.querySelector(\n      `.apexcharts-yaxis[rel='${realIndex}'] .apexcharts-yaxis-title text`\n    );\n    const yAxisTitleCoord = yAxisTitle ? yAxisTitle.getBoundingClientRect() : { width: 0, height: 0 };\n    if (yAxisTitle) {\n      const x = this.xPaddingForYAxisTitle(\n        realIndex,\n        yAxisLabelsCoord,\n        yAxisTitleCoord,\n        yAxisOpposite\n      );\n      yAxisTitle.setAttribute(\"x\", String(x.xPos - (yAxisOpposite ? 10 : 0)));\n      const titleRotatingCenter = graphics.rotateAroundCenter(yAxisTitle);\n      yAxisTitle.setAttribute(\n        \"transform\",\n        `rotate(${yAxisOpposite ? w2.config.yaxis[realIndex].title.rotate * -1 : w2.config.yaxis[realIndex].title.rotate} ${titleRotatingCenter.x} ${titleRotatingCenter.y})`\n      );\n    }\n  }\n  /**\n   * @param {number} realIndex\n   * @param {{width: number, height: number}} yAxisLabelsCoord\n   * @param {{width: number, height: number}} yAxisTitleCoord\n   * @param {boolean} yAxisOpposite\n   */\n  xPaddingForYAxisTitle(realIndex, yAxisLabelsCoord, yAxisTitleCoord, yAxisOpposite) {\n    const w2 = this.w;\n    let x = 0;\n    let padd = 10;\n    if (w2.config.yaxis[realIndex].title.text === void 0 || realIndex < 0) {\n      return { xPos: x, padd: 0 };\n    }\n    if (yAxisOpposite) {\n      x = yAxisLabelsCoord.width + w2.config.yaxis[realIndex].title.offsetX + yAxisTitleCoord.width / 2 + padd / 2;\n    } else {\n      x = yAxisLabelsCoord.width * -1 + w2.config.yaxis[realIndex].title.offsetX + padd / 2 + yAxisTitleCoord.width / 2;\n      if (w2.globals.isBarHorizontal) {\n        padd = 25;\n        x = yAxisLabelsCoord.width * -1 - w2.config.yaxis[realIndex].title.offsetX - padd;\n      }\n    }\n    return { xPos: x, padd };\n  }\n  /**\n   * @param {Array<{width: number, height: number}>} yaxisLabelCoords\n   * @param {Array<{width: number, height: number}>} yTitleCoords\n   */\n  setYAxisXPosition(yaxisLabelCoords, yTitleCoords) {\n    const w2 = this.w;\n    let xLeft = 0;\n    let xRight = 0;\n    let leftOffsetX = 18;\n    let rightOffsetX = 1;\n    if (w2.config.yaxis.length > 1) this.multipleYs = true;\n    w2.config.yaxis.forEach((yaxe, index) => {\n      const shouldNotDrawAxis = w2.globals.ignoreYAxisIndexes.includes(index) || !yaxe.show || yaxe.floating || yaxisLabelCoords[index].width === 0;\n      const axisWidth = yaxisLabelCoords[index].width + yTitleCoords[index].width;\n      if (!yaxe.opposite) {\n        xLeft = w2.layout.translateX - leftOffsetX;\n        if (!shouldNotDrawAxis) leftOffsetX += axisWidth + 20;\n        w2.globals.translateYAxisX[index] = xLeft + yaxe.labels.offsetX;\n      } else {\n        if (w2.globals.isBarHorizontal) {\n          xRight = w2.layout.gridWidth + w2.layout.translateX - 1;\n          w2.globals.translateYAxisX[index] = xRight - yaxe.labels.offsetX;\n        } else {\n          xRight = w2.layout.gridWidth + w2.layout.translateX + rightOffsetX;\n          if (!shouldNotDrawAxis) rightOffsetX += axisWidth + 20;\n          w2.globals.translateYAxisX[index] = xRight - yaxe.labels.offsetX + 20;\n        }\n      }\n    });\n  }\n  setYAxisTextAlignments() {\n    const w2 = this.w;\n    const yaxis = Array.from(\n      w2.dom.baseEl.getElementsByClassName(\"apexcharts-yaxis\")\n    );\n    yaxis.forEach((y, index) => {\n      const yaxe = w2.config.yaxis[index];\n      if (yaxe && !yaxe.floating && yaxe.labels.align !== void 0) {\n        const yAxisInner = w2.dom.baseEl.querySelector(\n          `.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-texts-g`\n        );\n        const yAxisTexts = Array.from(\n          w2.dom.baseEl.querySelectorAll(\n            `.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-label`\n          )\n        );\n        const rect = (\n          /** @type {Element} */\n          yAxisInner.getBoundingClientRect()\n        );\n        yAxisTexts.forEach((label) => {\n          label.setAttribute(\"text-anchor\", yaxe.labels.align);\n        });\n        if (yaxe.labels.align === \"left\" && !yaxe.opposite) {\n          yAxisInner.setAttribute(\n            \"transform\",\n            `translate(-${rect.width}, 0)`\n          );\n        } else if (yaxe.labels.align === \"center\") {\n          yAxisInner.setAttribute(\n            \"transform\",\n            `translate(${rect.width / 2 * (!yaxe.opposite ? -1 : 1)}, 0)`\n          );\n        } else if (yaxe.labels.align === \"right\" && yaxe.opposite) {\n          yAxisInner.setAttribute(\n            \"transform\",\n            `translate(${rect.width}, 0)`\n          );\n        }\n      }\n    });\n  }\n}\nclass Events {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.documentEvent = this.documentEvent.bind(this);\n  }\n  /**\n   * @param {string} name\n   * @param {Function} handler\n   */\n  addEventListener(name2, handler) {\n    const w2 = this.w;\n    if (Object.prototype.hasOwnProperty.call(w2.globals.events, name2)) {\n      w2.globals.events[name2].push(handler);\n    } else {\n      w2.globals.events[name2] = [handler];\n    }\n  }\n  /**\n   * @param {string} name\n   * @param {Function} handler\n   */\n  removeEventListener(name2, handler) {\n    const w2 = this.w;\n    if (!Object.prototype.hasOwnProperty.call(w2.globals.events, name2)) {\n      return;\n    }\n    const index = (\n      /** @type {Record<string,any>} */\n      w2.globals.events[name2].indexOf(handler)\n    );\n    if (index !== -1) {\n      w2.globals.events[name2].splice(\n        index,\n        1\n      );\n    }\n  }\n  /**\n   * @param {string} name\n   * @param {any[]} args\n   */\n  fireEvent(name2, args) {\n    const w2 = this.w;\n    if (!Object.prototype.hasOwnProperty.call(w2.globals.events, name2)) {\n      return;\n    }\n    if (!args || !args.length) {\n      args = [];\n    }\n    const evs = (\n      /** @type {Record<string,any>} */\n      w2.globals.events[name2]\n    );\n    const l2 = evs.length;\n    for (let i2 = 0; i2 < l2; i2++) {\n      evs[i2].apply(null, args);\n    }\n  }\n  setupEventHandlers() {\n    const w2 = this.w;\n    const me = this.ctx;\n    const clickableArea = w2.dom.baseEl.querySelector(w2.globals.chartClass);\n    this.ctx.eventList.forEach((event) => {\n      clickableArea == null ? void 0 : clickableArea.addEventListener(\n        event,\n        (e2) => {\n          const capturedSeriesIndex = e2.target.getAttribute(\"i\") === null && w2.interact.capturedSeriesIndex !== -1 ? w2.interact.capturedSeriesIndex : e2.target.getAttribute(\"i\");\n          const capturedDataPointIndex = e2.target.getAttribute(\"j\") === null && w2.interact.capturedDataPointIndex !== -1 ? w2.interact.capturedDataPointIndex : e2.target.getAttribute(\"j\");\n          const opts = Object.assign({}, w2, {\n            seriesIndex: w2.globals.axisCharts ? capturedSeriesIndex : 0,\n            dataPointIndex: capturedDataPointIndex\n          });\n          if (e2.type === \"keydown\") {\n            if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.keyboard.enabled) {\n              if (me.ctx.keyboardNavigation) {\n                me.ctx.keyboardNavigation.handleKey(e2);\n              }\n              if (typeof w2.config.chart.events.keyDown === \"function\") {\n                w2.config.chart.events.keyDown(e2, me, opts);\n              }\n              me.ctx.events.fireEvent(\"keydown\", [e2, me, opts]);\n            }\n          } else if (e2.type === \"keyup\") {\n            if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.keyboard.enabled) {\n              if (typeof w2.config.chart.events.keyUp === \"function\") {\n                w2.config.chart.events.keyUp(e2, me, opts);\n              }\n              me.ctx.events.fireEvent(\"keyup\", [e2, me, opts]);\n            }\n          } else if (e2.type === \"mousemove\" || e2.type === \"touchmove\") {\n            if (typeof w2.config.chart.events.mouseMove === \"function\") {\n              w2.config.chart.events.mouseMove(e2, me, opts);\n            }\n          } else if (e2.type === \"mouseleave\" || e2.type === \"touchleave\") {\n            if (typeof w2.config.chart.events.mouseLeave === \"function\") {\n              w2.config.chart.events.mouseLeave(e2, me, opts);\n            }\n          } else if (e2.type === \"mouseup\" && e2.which === 1 || e2.type === \"touchend\") {\n            if (typeof w2.config.chart.events.click === \"function\") {\n              w2.config.chart.events.click(e2, me, opts);\n            }\n            me.ctx.events.fireEvent(\"click\", [e2, me, opts]);\n          }\n        },\n        { capture: false, passive: true }\n      );\n    });\n    this.ctx.eventList.forEach((event) => {\n      w2.dom.baseEl.addEventListener(event, this.documentEvent, {\n        passive: true\n      });\n    });\n    this.ctx.core.setupBrushHandler();\n  }\n  /**\n   * @param {any} e\n   */\n  documentEvent(e2) {\n    const w2 = this.w;\n    const target = e2.target.className;\n    if (e2.type === \"click\") {\n      const elMenu = w2.dom.baseEl.querySelector(\".apexcharts-menu\");\n      if (elMenu && elMenu.classList.contains(\"apexcharts-menu-open\") && target !== \"apexcharts-menu-icon\") {\n        elMenu.classList.remove(\"apexcharts-menu-open\");\n      }\n    }\n    w2.interact.clientX = e2.type === \"touchmove\" ? e2.touches[0].clientX : e2.clientX;\n    w2.interact.clientY = e2.type === \"touchmove\" ? e2.touches[0].clientY : e2.clientY;\n  }\n}\nclass Localization {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n  }\n  /**\n   * @param {string} localeName\n   */\n  setCurrentLocaleValues(localeName) {\n    let locales = this.w.config.chart.locales;\n    const globalApex = Environment.getApex();\n    if (globalApex.chart && globalApex.chart.locales && globalApex.chart.locales.length > 0) {\n      locales = this.w.config.chart.locales.concat(globalApex.chart.locales);\n    }\n    const selectedLocale = locales.filter(\n      (c2) => c2.name === localeName\n    )[0];\n    if (selectedLocale) {\n      const ret = Utils$1.extend(en, selectedLocale);\n      this.w.globals.locale = ret.options;\n    } else {\n      throw new Error(\n        \"Wrong locale name provided. Please make sure you set the correct locale name in options\"\n      );\n    }\n  }\n}\nclass Axes {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n  }\n  /**\n   * @param {string} type\n   * @param {any} elgrid\n   */\n  drawAxis(type, elgrid) {\n    const gl = this.w.globals;\n    const cnf = this.w.config;\n    const xAxis = new XAxis(this.w, this.ctx, elgrid);\n    const yAxis = new YAxis(this.w, { theme: this.ctx.theme, timeScale: this.ctx.timeScale }, elgrid);\n    if (gl.axisCharts && type !== \"radar\") {\n      let elXaxis, elYaxis;\n      if (gl.isBarHorizontal) {\n        elYaxis = yAxis.drawYaxisInversed(0);\n        elXaxis = xAxis.drawXaxisInversed(0);\n        this.w.dom.elGraphical.add(elXaxis);\n        this.w.dom.elGraphical.add(elYaxis);\n      } else {\n        elXaxis = xAxis.drawXaxis();\n        this.w.dom.elGraphical.add(elXaxis);\n        cnf.yaxis.map((yaxe, index) => {\n          if (gl.ignoreYAxisIndexes.indexOf(index) === -1) {\n            elYaxis = yAxis.drawYaxis(index);\n            this.w.dom.Paper.add(elYaxis);\n            if (this.w.config.grid.position === \"back\") {\n              const inner = this.w.dom.Paper.children()[1];\n              if (inner) {\n                inner.remove();\n                this.w.dom.Paper.add(inner);\n              }\n            }\n          }\n        });\n      }\n    }\n  }\n}\nclass Crosshairs {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n  }\n  drawXCrosshairs() {\n    const w2 = this.w;\n    w2.dom.elGraphical.node.querySelectorAll(\":scope > .apexcharts-xcrosshairs\").forEach((el) => el.remove());\n    const graphics = new Graphics(this.w);\n    const filters = new Filters(this.w);\n    const crosshairGradient = w2.config.xaxis.crosshairs.fill.gradient;\n    const crosshairShadow = w2.config.xaxis.crosshairs.dropShadow;\n    const fillType = w2.config.xaxis.crosshairs.fill.type;\n    const gradientFrom = crosshairGradient.colorFrom;\n    const gradientTo = crosshairGradient.colorTo;\n    const opacityFrom = crosshairGradient.opacityFrom;\n    const opacityTo = crosshairGradient.opacityTo;\n    const stops = crosshairGradient.stops;\n    const shadow = \"none\";\n    const dropShadow = crosshairShadow.enabled;\n    const shadowLeft = crosshairShadow.left;\n    const shadowTop = crosshairShadow.top;\n    const shadowBlur = crosshairShadow.blur;\n    const shadowColor = crosshairShadow.color;\n    const shadowOpacity = crosshairShadow.opacity;\n    let xcrosshairsFill = w2.config.xaxis.crosshairs.fill.color;\n    if (w2.config.xaxis.crosshairs.show) {\n      if (fillType === \"gradient\") {\n        xcrosshairsFill = graphics.drawGradient(\n          \"vertical\",\n          gradientFrom,\n          gradientTo,\n          opacityFrom,\n          opacityTo,\n          null,\n          stops,\n          []\n        );\n      }\n      let xcrosshairs = w2.config.xaxis.crosshairs.width === 1 ? graphics.drawLine(0, 0, 0, 0) : graphics.drawRect();\n      let gridHeight = w2.layout.gridHeight;\n      if (!Utils$1.isNumber(gridHeight) || gridHeight < 0) {\n        gridHeight = 0;\n      }\n      let crosshairsWidth = w2.config.xaxis.crosshairs.width;\n      if (!Utils$1.isNumber(crosshairsWidth) || Number(crosshairsWidth) < 0) {\n        crosshairsWidth = 0;\n      }\n      xcrosshairs.attr({\n        class: \"apexcharts-xcrosshairs\",\n        x: 0,\n        y: 0,\n        y2: gridHeight,\n        width: crosshairsWidth,\n        height: gridHeight,\n        fill: xcrosshairsFill,\n        filter: shadow,\n        \"fill-opacity\": w2.config.xaxis.crosshairs.opacity,\n        stroke: w2.config.xaxis.crosshairs.stroke.color,\n        \"stroke-width\": w2.config.xaxis.crosshairs.stroke.width,\n        \"stroke-dasharray\": w2.config.xaxis.crosshairs.stroke.dashArray\n      });\n      if (dropShadow) {\n        xcrosshairs = filters.dropShadow(xcrosshairs, {\n          left: shadowLeft,\n          top: shadowTop,\n          blur: shadowBlur,\n          color: shadowColor,\n          opacity: shadowOpacity\n        });\n      }\n      w2.dom.elGraphical.add(xcrosshairs);\n    }\n  }\n  drawYCrosshairs() {\n    const w2 = this.w;\n    w2.dom.elGraphical.node.querySelectorAll(\n      \":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden\"\n    ).forEach((el) => el.remove());\n    const graphics = new Graphics(this.w);\n    const crosshair = (\n      /** @type {any[]} */\n      w2.config.yaxis[0].crosshairs\n    );\n    const offX = w2.globals.barPadForNumericAxis;\n    if (\n      /** @type {any[]} */\n      w2.config.yaxis[0].crosshairs.show\n    ) {\n      const ycrosshairs = graphics.drawLine(\n        -offX,\n        0,\n        w2.layout.gridWidth + offX,\n        0,\n        crosshair.stroke.color,\n        crosshair.stroke.dashArray,\n        crosshair.stroke.width\n      );\n      ycrosshairs.attr({\n        class: \"apexcharts-ycrosshairs\"\n      });\n      w2.dom.elGraphical.add(ycrosshairs);\n    }\n    const ycrosshairsHidden = graphics.drawLine(\n      -offX,\n      0,\n      w2.layout.gridWidth + offX,\n      0,\n      crosshair.stroke.color,\n      0,\n      0\n    );\n    ycrosshairsHidden.attr({\n      class: \"apexcharts-ycrosshairs-hidden\"\n    });\n    w2.dom.elGraphical.add(ycrosshairsHidden);\n  }\n}\nfunction mergeYaxisOverride(base, override) {\n  if (!Utils$1.isObject(base) || !Utils$1.isObject(override)) {\n    return override !== void 0 ? override : base;\n  }\n  const out = __spreadValues({}, base);\n  for (const key of Object.keys(override)) {\n    const v2 = override[key];\n    if (v2 === void 0) continue;\n    if (Utils$1.isObject(v2) && Utils$1.isObject(base[key])) {\n      out[key] = mergeYaxisOverride(base[key], v2);\n    } else {\n      out[key] = v2;\n    }\n  }\n  return out;\n}\nclass Responsive {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n    this._activeBreakpoint = null;\n  }\n  // the opts parameter if not null has to be set overriding everything\n  // as the opts is set by user externally\n  /**\n   * @param {object} opts\n   */\n  checkResponsiveConfig(opts) {\n    const w2 = this.w;\n    const cnf = w2.config;\n    if (cnf.responsive.length === 0) return;\n    const res = cnf.responsive.slice();\n    res.sort(\n      (a2, b2) => a2.breakpoint > b2.breakpoint ? 1 : b2.breakpoint > a2.breakpoint ? -1 : 0\n    ).reverse();\n    const config = new Config({});\n    const iterateResponsiveOptions = (newOptions = {}) => {\n      var _a;\n      const largestBreakpoint = res[0].breakpoint;\n      const width = Environment.isBrowser() ? window.innerWidth > 0 ? window.innerWidth : screen.width : 0;\n      if (width > largestBreakpoint) {\n        if (this._activeBreakpoint !== null) {\n          if (!w2.globals.initialConfig) return;\n          const initialConfig = Utils$1.clone(w2.globals.initialConfig);\n          initialConfig.series = Utils$1.clone(w2.config.series);\n          const options2 = CoreUtils.extendArrayProps(config, initialConfig, w2);\n          newOptions = Utils$1.extend(options2, newOptions);\n          this.overrideResponsiveOptions(newOptions);\n          this._activeBreakpoint = null;\n        }\n      } else {\n        for (let i2 = 0; i2 < res.length; i2++) {\n          if (width < res[i2].breakpoint) {\n            const originalUserYaxis = ((_a = res[i2].options) == null ? void 0 : _a.yaxis) ? Utils$1.clone(res[i2].options.yaxis) : null;\n            newOptions = CoreUtils.extendArrayProps(config, res[i2].options, w2);\n            newOptions = Utils$1.extend(w2.config, newOptions);\n            if (Array.isArray(w2.config.yaxis) && originalUserYaxis) {\n              const userYaxis = Array.isArray(originalUserYaxis) ? originalUserYaxis : [originalUserYaxis];\n              newOptions = __spreadProps(__spreadValues({}, newOptions), {\n                yaxis: w2.config.yaxis.map(\n                  (baseAxis, idx) => mergeYaxisOverride(baseAxis, userYaxis[idx])\n                )\n              });\n            }\n            this.overrideResponsiveOptions(newOptions);\n            this._activeBreakpoint = res[i2].breakpoint;\n          }\n        }\n      }\n    };\n    if (opts) {\n      let options2 = CoreUtils.extendArrayProps(config, opts, w2);\n      options2 = Utils$1.extend(w2.config, options2);\n      options2 = Utils$1.extend(options2, opts);\n      iterateResponsiveOptions(options2);\n    } else {\n      iterateResponsiveOptions({});\n    }\n  }\n  /**\n   * @param {Record<string, any>} newOptions\n   */\n  overrideResponsiveOptions(newOptions) {\n    const newConfig = new Config(newOptions).init({ responsiveOverride: true });\n    this.w.config = /** @type {any} */\n    newConfig;\n  }\n}\nfunction captureStreamFrame(w2) {\n  var _a, _b, _c;\n  const gl = w2.globals;\n  if (!gl.axisCharts || !w2.seriesData || !Array.isArray(w2.seriesData.series) || w2.seriesData.series.length === 0) {\n    gl.prevStreamFrame = null;\n    return;\n  }\n  const rPixels = [];\n  if ((_b = (_a = w2.dom) == null ? void 0 : _a.baseEl) == null ? void 0 : _b.querySelectorAll) {\n    w2.dom.baseEl.querySelectorAll(\".apexcharts-marker\").forEach((node) => {\n      var _a2, _b2, _c2, _d, _e;\n      const ri = parseInt((_a2 = node.getAttribute(\"index\")) != null ? _a2 : \"\", 10);\n      const j = parseInt(\n        (_c2 = (_b2 = node.getAttribute(\"j\")) != null ? _b2 : node.getAttribute(\"rel\")) != null ? _c2 : \"\",\n        10\n      );\n      const r2 = parseFloat(\n        (_e = (_d = node.getAttribute(\"r\")) != null ? _d : node.getAttribute(\"default-marker-size\")) != null ? _e : \"\"\n      );\n      if (isFinite(ri) && isFinite(j) && isFinite(r2)) {\n        (rPixels[ri] = rPixels[ri] || [])[j] = r2;\n      }\n    });\n  }\n  gl.prevStreamFrame = {\n    seriesX: (w2.seriesData.seriesX || []).slice(),\n    seriesY: w2.seriesData.series.slice(),\n    xPixels: (gl.seriesXvalues || []).slice(),\n    yPixels: (gl.seriesYvalues || []).slice(),\n    rPixels,\n    labels: (gl.labels || []).slice(),\n    isXNumeric: !!((_c = w2.axisFlags) == null ? void 0 : _c.isXNumeric)\n  };\n}\nfunction detectStreamScroll(w2, realIndex, newXPixels, newYPixels) {\n  var _a;\n  const gl = w2.globals;\n  const frame = gl.prevStreamFrame;\n  if (!frame || !gl.dataChanged || !((_a = w2.axisFlags) == null ? void 0 : _a.isXNumeric)) return null;\n  const oldX = frame.seriesX[realIndex];\n  const oldY = frame.seriesY[realIndex];\n  const newX = w2.seriesData.seriesX[realIndex];\n  const newY = w2.seriesData.series[realIndex];\n  if (!oldX || !oldY || !newX || !newY) return null;\n  if (oldX.length < 3 || newX.length < 3) return null;\n  let k = -1;\n  for (let i2 = 0; i2 < oldX.length; i2++) {\n    if (oldX[i2] === newX[0]) {\n      k = i2;\n      break;\n    }\n  }\n  if (k === -1) return null;\n  const overlap = Math.min(oldX.length - k, newX.length);\n  if (overlap < 2) return null;\n  const appended = newX.length - overlap;\n  if (k === 0 && appended === 0) return null;\n  for (let i2 = 0; i2 < overlap; i2++) {\n    if (oldX[k + i2] !== newX[i2]) return null;\n    const oy = oldY[k + i2];\n    const ny = newY[i2];\n    if (oy !== ny && !(oy == null && ny == null)) return null;\n  }\n  const oldXP = frame.xPixels[realIndex];\n  const oldYP = frame.yPixels[realIndex];\n  if (!oldXP || !oldYP) return null;\n  let a2 = -1;\n  let b2 = -1;\n  for (let i2 = 0; i2 < overlap; i2++) {\n    if (oldXP[k + i2] == null || oldYP[k + i2] == null || newXPixels[i2] == null || newYPixels[i2] == null) {\n      continue;\n    }\n    if (a2 === -1) a2 = i2;\n    b2 = i2;\n  }\n  if (a2 === -1 || b2 <= a2) return null;\n  const nxA = (\n    /** @type {number} */\n    newXPixels[a2]\n  );\n  const nxB = (\n    /** @type {number} */\n    newXPixels[b2]\n  );\n  const oxA = (\n    /** @type {number} */\n    oldXP[k + a2]\n  );\n  const oxB = (\n    /** @type {number} */\n    oldXP[k + b2]\n  );\n  if (Math.abs(nxB - nxA) < 1e-6) return null;\n  const ax = (oxB - oxA) / (nxB - nxA);\n  const bx = oxA - ax * nxA;\n  if (!isFinite(ax) || !isFinite(bx)) return null;\n  if (Math.abs(ax - 1) > 0.02) return null;\n  if (Math.abs(bx) < 0.5) return null;\n  let yLo = a2;\n  let yHi = a2;\n  for (let i2 = a2; i2 <= b2; i2++) {\n    const ny = newYPixels[i2];\n    if (ny == null || oldYP[k + i2] == null) continue;\n    if (ny < /** @type {number} */\n    newYPixels[yLo]) yLo = i2;\n    if (ny > /** @type {number} */\n    newYPixels[yHi]) yHi = i2;\n  }\n  let ay = 1;\n  let by = 0;\n  const nyLo = (\n    /** @type {number} */\n    newYPixels[yLo]\n  );\n  const nyHi = (\n    /** @type {number} */\n    newYPixels[yHi]\n  );\n  if (Math.abs(nyHi - nyLo) > 1e-6) {\n    ay = /** @type {number} */\n    (oldYP[k + yHi] - /** @type {number} */\n    oldYP[k + yLo]) / (nyHi - nyLo);\n    by = /** @type {number} */\n    oldYP[k + yLo] - ay * nyLo;\n  } else {\n    by = /** @type {number} */\n    oldYP[k + yLo] - nyLo;\n  }\n  if (!isFinite(ay) || !isFinite(by) || ay < 0.2 || ay > 5) return null;\n  const m2 = Math.floor((a2 + b2) / 2);\n  if (m2 !== a2 && m2 !== b2 && newXPixels[m2] != null && oldXP[k + m2] != null) {\n    const predX = ax * /** @type {number} */\n    newXPixels[m2] + bx;\n    if (Math.abs(predX - /** @type {number} */\n    oldXP[k + m2]) > 1.5) {\n      return null;\n    }\n    if (newYPixels[m2] != null && oldYP[k + m2] != null) {\n      const predY = ay * /** @type {number} */\n      newYPixels[m2] + by;\n      if (Math.abs(predY - /** @type {number} */\n      oldYP[k + m2]) > 1.5) {\n        return null;\n      }\n    }\n  }\n  return { ax, bx, ay, by };\n}\nconst NUM_RE = /[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?/gi;\nfunction projectPathToPrevFrame(d, t2) {\n  const { ax, bx, ay, by } = t2;\n  const out = [];\n  const re = /([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;\n  let match;\n  while ((match = re.exec(d)) !== null) {\n    const cmd = match[1].toUpperCase();\n    const nums = (match[2].match(NUM_RE) || []).map(parseFloat);\n    if (cmd === \"Z\") {\n      out.push(\"z\");\n      continue;\n    }\n    if (cmd === \"H\") {\n      for (const x of nums) out.push(`H ${ax * x + bx}`);\n      continue;\n    }\n    if (cmd === \"V\") {\n      for (const y of nums) out.push(`V ${ay * y + by}`);\n      continue;\n    }\n    if (cmd === \"A\") {\n      for (let i2 = 0; i2 + 6 < nums.length; i2 += 7) {\n        out.push(\n          `A ${nums[i2]} ${nums[i2 + 1]} ${nums[i2 + 2]} ${nums[i2 + 3]} ${nums[i2 + 4]} ${ax * nums[i2 + 5] + bx} ${ay * nums[i2 + 6] + by}`\n        );\n      }\n      continue;\n    }\n    const coords = [];\n    for (let i2 = 0; i2 + 1 < nums.length; i2 += 2) {\n      coords.push(`${ax * nums[i2] + bx} ${ay * nums[i2 + 1] + by}`);\n    }\n    if (coords.length) out.push(`${cmd} ${coords.join(\" \")}`);\n  }\n  return out.join(\" \");\n}\nfunction trimStreamingSeries(newSeries, w2) {\n  const cfg = w2.config.chart.streaming;\n  if (!cfg || !cfg.enabled) return;\n  const maxPoints = cfg.maxPoints;\n  const range = w2.config.xaxis.range;\n  const xOf = (p2) => {\n    if (p2 == null) return null;\n    if (Array.isArray(p2)) return typeof p2[0] === \"number\" ? p2[0] : null;\n    if (typeof p2 === \"object\") return typeof p2.x === \"number\" ? p2.x : null;\n    return null;\n  };\n  newSeries.forEach((s2) => {\n    var _a;\n    const data = s2 == null ? void 0 : s2.data;\n    if (!Array.isArray(data) || data.length < 2) return;\n    if (typeof maxPoints === \"number\" && maxPoints > 0) {\n      if (data.length > maxPoints) s2.data = data.slice(data.length - maxPoints);\n      return;\n    }\n    if (!range) return;\n    const lastX = xOf(data[data.length - 1]);\n    const firstX = xOf(data[0]);\n    if (lastX == null || firstX == null || lastX <= firstX) return;\n    const avgSpacing = (lastX - firstX) / (data.length - 1);\n    const cutoff = lastX - range - 2 * avgSpacing;\n    let idx = 0;\n    while (idx < data.length && ((_a = xOf(data[idx])) != null ? _a : cutoff) < cutoff) idx++;\n    if (idx > 0) s2.data = data.slice(idx);\n  });\n}\nfunction buildUnionEntries(join, oldN) {\n  const exitSet = new Set(join.exits);\n  const entries = [];\n  let oi = 0;\n  for (let nj = 0; nj < join.toOld.length; nj++) {\n    const oj = join.toOld[nj];\n    if (oj !== -1) {\n      while (oi < oj) {\n        if (exitSet.has(oi)) entries.push({ oldJ: oi, newJ: -1 });\n        oi++;\n      }\n      entries.push({ oldJ: oj, newJ: nj });\n      oi = oj + 1;\n    } else {\n      entries.push({ oldJ: -1, newJ: nj });\n    }\n  }\n  while (oi < oldN) {\n    if (exitSet.has(oi)) entries.push({ oldJ: oi, newJ: -1 });\n    oi++;\n  }\n  return entries;\n}\nfunction analyzeSeriesPath(d, expectedAnchors, isArea) {\n  if (!d || typeof d !== \"string\") return null;\n  const cmds = parsePath(d);\n  if (!cmds.length || cmds[0][0] !== \"M\") return null;\n  for (let i2 = 1; i2 < cmds.length; i2++) {\n    if (cmds[i2][0] === \"M\") return null;\n  }\n  let body = cmds;\n  let closing = null;\n  if (isArea) {\n    if (cmds.length < 5) return null;\n    closing = cmds.slice(-3);\n    body = cmds.slice(0, -3);\n    if (closing[2][0] !== \"Z\") return null;\n    if (closing[1][0] !== \"L\") return null;\n    if (closing[0][0] !== \"L\" && closing[0][0] !== \"C\") return null;\n  } else if (cmds[cmds.length - 1][0] === \"Z\") {\n    return null;\n  }\n  if (body.length !== expectedAnchors || body.length < 2) return null;\n  const segType = body[1][0];\n  if (segType !== \"L\" && segType !== \"C\") return null;\n  for (let i2 = 2; i2 < body.length; i2++) {\n    if (body[i2][0] !== segType) return null;\n  }\n  const anchors = body.map(\n    (c2) => c2[0] === \"C\" ? [Number(c2[5]), Number(c2[6])] : [Number(c2[1]), Number(c2[2])]\n  );\n  for (const a2 of anchors) {\n    if (!isFinite(a2[0]) || !isFinite(a2[1])) return null;\n  }\n  return { body, closing, segType, anchors };\n}\nfunction lerpPt(a2, b2, t2) {\n  return [a2[0] + (b2[0] - a2[0]) * t2, a2[1] + (b2[1] - a2[1]) * t2];\n}\nfunction splitCubic(s2, cmd, t2) {\n  const p0 = s2;\n  const p1 = [cmd[1], cmd[2]];\n  const p2 = [cmd[3], cmd[4]];\n  const p3 = [cmd[5], cmd[6]];\n  const p01 = lerpPt(p0, p1, t2);\n  const p12 = lerpPt(p1, p2, t2);\n  const p23 = lerpPt(p2, p3, t2);\n  const p012 = lerpPt(p01, p12, t2);\n  const p123 = lerpPt(p12, p23, t2);\n  const mid = lerpPt(p012, p123, t2);\n  return {\n    first: [\"C\", p01[0], p01[1], p012[0], p012[1], mid[0], mid[1]],\n    second: [\"C\", p123[0], p123[1], p23[0], p23[1], p3[0], p3[1]],\n    mid\n  };\n}\nfunction splitLine(s2, cmd, t2) {\n  const e2 = [cmd[1], cmd[2]];\n  const mid = lerpPt(s2, e2, t2);\n  return {\n    first: [\"L\", mid[0], mid[1]],\n    second: [\"L\", e2[0], e2[1]],\n    mid\n  };\n}\nfunction expandPath(analysis, ownIdx) {\n  const { body, closing, segType, anchors } = analysis;\n  const n2 = anchors.length;\n  const m2 = ownIdx.length;\n  const degen = (p2) => segType === \"C\" ? [\"C\", p2[0], p2[1], p2[0], p2[1], p2[0], p2[1]] : [\"L\", p2[0], p2[1]];\n  const out = [[\"M\", anchors[0][0], anchors[0][1]]];\n  let firstOwn = 0;\n  while (firstOwn < m2 && ownIdx[firstOwn] !== 0) firstOwn++;\n  for (let q = 1; q <= firstOwn; q++) out.push(degen(anchors[0]));\n  let entry = firstOwn + 1;\n  for (let s2 = 0; s2 < n2 - 1; s2++) {\n    let interior = 0;\n    while (entry + interior < m2 && ownIdx[entry + interior] === -1) interior++;\n    const cmd = body[s2 + 1];\n    if (!interior) {\n      out.push(cmd.slice());\n    } else {\n      const totalParts = interior + 1;\n      let start = anchors[s2];\n      let rest = cmd;\n      for (let q = 0; q < interior; q++) {\n        const t2 = 1 / (totalParts - q);\n        const sp = segType === \"C\" ? splitCubic(start, rest, t2) : splitLine(start, rest, t2);\n        out.push(sp.first);\n        start = sp.mid;\n        rest = sp.second;\n      }\n      out.push(rest);\n    }\n    entry += interior + 1;\n  }\n  while (entry < m2) {\n    out.push(degen(anchors[n2 - 1]));\n    entry++;\n  }\n  if (closing) closing.forEach((c2) => out.push(c2.slice()));\n  return out;\n}\nfunction reconcilePathPair(fromD, toD, entries, oldN, newN, isArea) {\n  const fromAnalysis = analyzeSeriesPath(fromD, oldN, isArea);\n  if (!fromAnalysis) return null;\n  const toAnalysis = analyzeSeriesPath(toD, newN, isArea);\n  if (!toAnalysis) return null;\n  if (fromAnalysis.segType !== toAnalysis.segType) return null;\n  if ((fromAnalysis.closing || toAnalysis.closing) && (!fromAnalysis.closing || !toAnalysis.closing || fromAnalysis.closing[0][0] !== toAnalysis.closing[0][0])) {\n    return null;\n  }\n  const fromOwn = entries.map((e2) => e2.oldJ);\n  const toOwn = entries.map((e2) => e2.newJ);\n  return {\n    from: arrayToPath(expandPath(fromAnalysis, fromOwn)),\n    toInterp: arrayToPath(expandPath(toAnalysis, toOwn))\n  };\n}\nfunction lengthTransitionEnabled(w2) {\n  var _a;\n  const anim = w2.config.chart.animations;\n  if (!anim || anim.enabled === false) return false;\n  if (!anim.dynamicAnimation || anim.dynamicAnimation.enabled === false) {\n    return false;\n  }\n  const largeThreshold = (_a = anim.largeDatasetThreshold) != null ? _a : 0;\n  if (largeThreshold > 0 && w2.globals.dataPoints > largeThreshold) return false;\n  return !!(Environment.isBrowser() && w2.globals.dataChanged && w2.globals.shouldAnimate);\n}\nfunction datumKey(w2, realIndex, j) {\n  var _a, _b, _c, _d;\n  if ((_a = w2.axisFlags) == null ? void 0 : _a.isXNumeric) {\n    const sx = (_c = (_b = w2.seriesData) == null ? void 0 : _b.seriesX) == null ? void 0 : _c[realIndex];\n    if (sx && sx.length && sx[j] != null) return \"x:\" + sx[j];\n  }\n  const lbl = (_d = w2.globals.labels) == null ? void 0 : _d[j];\n  if (lbl != null && String(lbl) !== \"\") {\n    return \"c:\" + (Array.isArray(lbl) ? lbl.join(\" \") : String(lbl));\n  }\n  return \"j:\" + j;\n}\nfunction frameDatumKey(frame, realIndex, j) {\n  var _a, _b;\n  if (frame.isXNumeric) {\n    const sx = (_a = frame.seriesX) == null ? void 0 : _a[realIndex];\n    if (sx && sx.length && sx[j] != null) return \"x:\" + sx[j];\n  }\n  const lbl = (_b = frame.labels) == null ? void 0 : _b[j];\n  if (lbl != null && String(lbl) !== \"\") {\n    return \"c:\" + (Array.isArray(lbl) ? lbl.join(\" \") : String(lbl));\n  }\n  return \"j:\" + j;\n}\nfunction joinKeys(oldKeys, newKeys) {\n  const oldIndex = /* @__PURE__ */ new Map();\n  oldKeys.forEach((k, i2) => {\n    if (!oldIndex.has(k)) oldIndex.set(k, i2);\n  });\n  const toOld = new Array(newKeys.length);\n  const usedOld = /* @__PURE__ */ new Set();\n  let prev = -1;\n  let ordered = true;\n  let identity = oldKeys.length === newKeys.length;\n  newKeys.forEach((k, i2) => {\n    const oi = oldIndex.has(k) && !usedOld.has(oldIndex.get(k)) ? oldIndex.get(k) : -1;\n    toOld[i2] = oi;\n    if (oi !== -1) {\n      usedOld.add(oi);\n      if (oi < prev) ordered = false;\n      prev = oi;\n    }\n    if (oi !== i2) identity = false;\n  });\n  const exits = [];\n  for (let i2 = 0; i2 < oldKeys.length; i2++) {\n    if (!usedOld.has(i2)) exits.push(i2);\n  }\n  return { toOld, exits, ordered, changed: !identity };\n}\nfunction uniquifyKeys(keys) {\n  const seen = /* @__PURE__ */ new Map();\n  return keys.map((k) => {\n    const count = seen.get(k) || 0;\n    seen.set(k, count + 1);\n    return count === 0 ? k : `${k}#${count}`;\n  });\n}\nfunction seriesJoin(w2, realIndex, includeIdentity = false, allowReorder = false) {\n  var _a, _b;\n  if (!lengthTransitionEnabled(w2)) return null;\n  const frame = w2.globals.prevStreamFrame;\n  if (!frame) return null;\n  const oldY = (_a = frame.seriesY) == null ? void 0 : _a[realIndex];\n  const newY = (_b = w2.seriesData.series) == null ? void 0 : _b[realIndex];\n  if (!Array.isArray(oldY) || !Array.isArray(newY)) return null;\n  if (!oldY.length || !newY.length) return null;\n  const oldKeys = uniquifyKeys(\n    oldY.map((_, j) => frameDatumKey(frame, realIndex, j))\n  );\n  const newKeys = uniquifyKeys(newY.map((_, j) => datumKey(w2, realIndex, j)));\n  const join = joinKeys(oldKeys, newKeys);\n  if (!join.ordered && !allowReorder) return null;\n  if (!join.changed && !includeIdentity) return null;\n  return { join, oldKeys, newKeys };\n}\nfunction morphEasing(w2) {\n  var _a, _b;\n  const anim = w2.config.chart.animations;\n  return resolveEasing((_b = (_a = anim.dynamicAnimation) == null ? void 0 : _a.easing) != null ? _b : anim.easing);\n}\nfunction rafTween(w2, duration, ease, onFrame, onDone) {\n  const startAt = performance.now();\n  const step = (now) => {\n    if (w2.globals.isDestroyed) return;\n    const raw = Math.max(0, Math.min(1, (now - startAt) / duration));\n    onFrame(ease(raw), raw);\n    if (raw < 1) {\n      BrowserAPIs.requestAnimationFrame(step);\n    } else if (onDone) {\n      onDone();\n    }\n  };\n  BrowserAPIs.requestAnimationFrame(step);\n}\nfunction tweenSeriesMarkers(w2, { elPointsMain, realIndex, speed }) {\n  var _a, _b, _c, _d;\n  if (!(elPointsMain == null ? void 0 : elPointsMain.node)) return false;\n  const sj = seriesJoin(w2, realIndex, true);\n  if (!sj) return false;\n  const frame = w2.globals.prevStreamFrame;\n  if (!frame) return false;\n  const oldXP = (_a = frame.xPixels) == null ? void 0 : _a[realIndex];\n  const oldYP = (_b = frame.yPixels) == null ? void 0 : _b[realIndex];\n  if (!oldXP || !oldYP) return false;\n  const markers = elPointsMain.node.querySelectorAll(\".apexcharts-marker\");\n  if (!markers.length) return false;\n  const newXP = ((_c = w2.globals.seriesXvalues) == null ? void 0 : _c[realIndex]) || [];\n  const newYP = ((_d = w2.globals.seriesYvalues) == null ? void 0 : _d[realIndex]) || [];\n  const ease = morphEasing(w2);\n  const duration = Math.max(1, speed || 1);\n  elPointsMain.node.classList.remove(\"apexcharts-element-hidden\");\n  markers.forEach((node) => {\n    var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i;\n    const j = parseInt(\n      (_b2 = (_a2 = node.getAttribute(\"j\")) != null ? _a2 : node.getAttribute(\"rel\")) != null ? _b2 : \"\",\n      10\n    );\n    if (!isFinite(j) || j < 0 || j >= sj.join.toOld.length) return;\n    const oldJ = sj.join.toOld[j];\n    const to = newXP[j] != null && newYP[j] != null ? [newXP[j], newYP[j]] : null;\n    if (oldJ === -1 || !to) {\n      const style = (\n        /** @type {any} */\n        node.style\n      );\n      style.opacity = \"0\";\n      rafTween(\n        w2,\n        duration,\n        ease,\n        (eased) => {\n          style.opacity = String(eased);\n        },\n        () => {\n          style.opacity = \"\";\n        }\n      );\n      return;\n    }\n    const dx = ((_c2 = oldXP[oldJ]) != null ? _c2 : NaN) - to[0];\n    const dy = ((_d2 = oldYP[oldJ]) != null ? _d2 : NaN) - to[1];\n    if (!isFinite(dx) || !isFinite(dy)) return;\n    const rFrom = (_g = (_f = (_e = frame.rPixels) == null ? void 0 : _e[realIndex]) == null ? void 0 : _f[oldJ]) != null ? _g : NaN;\n    const rTo = parseFloat(\n      (_i = (_h = node.getAttribute(\"r\")) != null ? _h : node.getAttribute(\"default-marker-size\")) != null ? _i : \"\"\n    );\n    const scales = isFinite(rFrom) && isFinite(rTo) && rTo > 0 && Math.abs(rFrom - rTo) > 0.25;\n    const moves = Math.abs(dx) >= 0.5 || Math.abs(dy) >= 0.5;\n    if (!moves && !scales) return;\n    const apply = (eased) => {\n      const offX = dx * (1 - eased);\n      const offY = dy * (1 - eased);\n      if (scales) {\n        const s2 = (rFrom + (rTo - rFrom) * eased) / rTo;\n        node.setAttribute(\n          \"transform\",\n          `translate(${offX + to[0] * (1 - s2)}, ${offY + to[1] * (1 - s2)}) scale(${s2})`\n        );\n      } else {\n        node.setAttribute(\"transform\", `translate(${offX}, ${offY})`);\n      }\n    };\n    apply(0);\n    rafTween(w2, duration, ease, apply, () => {\n      node.removeAttribute(\"transform\");\n    });\n  });\n  return true;\n}\nfunction reconcileSeriesPaths(w2, { type, realIndex, pathFromLine, pathFromArea, linePaths, areaPaths }) {\n  var _a, _b;\n  const sj = seriesJoin(w2, realIndex);\n  if (!sj) return null;\n  const { join, oldKeys, newKeys } = sj;\n  const frame = w2.globals.prevStreamFrame;\n  if (!frame) return null;\n  const oldY = (_a = frame.seriesY) == null ? void 0 : _a[realIndex];\n  const newY = (_b = w2.seriesData.series) == null ? void 0 : _b[realIndex];\n  if (oldY.length < 2 || newY.length < 2) return null;\n  if (oldY.some((v2) => v2 === null) || newY.some((v2) => v2 === null)) return null;\n  const entries = buildUnionEntries(join, oldKeys.length);\n  const out = {};\n  if (Array.isArray(linePaths) && linePaths.length === 1 && pathFromLine) {\n    out.line = reconcilePathPair(\n      pathFromLine,\n      linePaths[0],\n      entries,\n      oldKeys.length,\n      newKeys.length,\n      false\n    );\n  }\n  if (type === \"area\" && Array.isArray(areaPaths) && areaPaths.length === 1 && pathFromArea) {\n    out.area = reconcilePathPair(\n      pathFromArea,\n      areaPaths[0],\n      entries,\n      oldKeys.length,\n      newKeys.length,\n      true\n    );\n  }\n  if (!out.line && !out.area) return null;\n  return out;\n}\nfunction firstMove(d) {\n  const m2 = /^M\\s*([+-]?[\\d.eE]+)[\\s,]+([+-]?[\\d.eE]+)/.exec(d || \"\");\n  if (!m2) return null;\n  const x = parseFloat(m2[1]);\n  const y = parseFloat(m2[2]);\n  return isFinite(x) && isFinite(y) ? { x, y } : null;\n}\nfunction renderBarExitGhosts({\n  w: w2,\n  elSeries,\n  record,\n  newKeys,\n  isHorizontal,\n  speed\n}) {\n  var _a;\n  if (!lengthTransitionEnabled(w2)) return;\n  if (!record || !Array.isArray(record.paths) || !(elSeries == null ? void 0 : elSeries.node)) return;\n  const newKeySet = new Set(newKeys);\n  const exits = record.paths.filter(\n    (p2) => p2 && p2.d && p2.key != null && !newKeySet.has(p2.key)\n  );\n  if (!exits.length) return;\n  const graphics = new Graphics(w2);\n  const fallbackFill = (_a = w2.globals.colors) == null ? void 0 : _a[parseInt(String(record.realIndex), 10)];\n  exits.forEach((p2) => {\n    let fill = p2.fill || fallbackFill || \"#c8c8c8\";\n    if (String(fill).indexOf(\"url(\") === 0) fill = fallbackFill || \"#c8c8c8\";\n    const ghost = graphics.drawPath({\n      d: p2.d,\n      stroke: \"none\",\n      strokeWidth: 0,\n      fill,\n      fillOpacity: 1,\n      classes: \"apexcharts-bar-ghost\"\n    });\n    const node = ghost.node;\n    node.setAttribute(\"pointer-events\", \"none\");\n    ghost.attr(\n      \"clip-path\",\n      `url(#gridRectBarMask${w2.globals.cuid})`\n    );\n    elSeries.node.insertBefore(node, elSeries.node.firstChild);\n    const start = firstMove(p2.d);\n    let origin = isHorizontal ? \"left center\" : \"center bottom\";\n    try {\n      const bb = node.getBBox();\n      if (start && bb) {\n        if (isHorizontal) {\n          origin = Math.abs(start.x - bb.x) <= Math.abs(start.x - (bb.x + bb.width)) ? \"left center\" : \"right center\";\n        } else {\n          origin = Math.abs(start.y - (bb.y + bb.height)) <= Math.abs(start.y - bb.y) ? \"center bottom\" : \"center top\";\n        }\n      }\n    } catch (_) {\n    }\n    const style = node.style;\n    style.transformBox = \"fill-box\";\n    style.transformOrigin = origin;\n    const duration = Math.max(1, speed || 1);\n    const startAt = performance.now();\n    const step = (now) => {\n      if (w2.globals.isDestroyed || !node.parentNode) return;\n      const t2 = Math.max(0, Math.min(1, (now - startAt) / duration));\n      const eased = 1 - Math.pow(1 - t2, 3);\n      const scale = 1 - eased;\n      style.transform = isHorizontal ? `scaleX(${scale})` : `scaleY(${scale})`;\n      style.opacity = String(1 - eased);\n      if (t2 < 1) {\n        BrowserAPIs.requestAnimationFrame(step);\n      } else {\n        node.parentNode.removeChild(node);\n      }\n    };\n    BrowserAPIs.requestAnimationFrame(step);\n  });\n}\nfunction grabLabels(root, sel, posAttr) {\n  return [...root.querySelectorAll(sel)].map((el) => {\n    var _a, _b, _c;\n    return {\n      // `text` is the matching KEY (textContent, which doubles tspan + title\n      // but does so consistently on both sides); `display` is the visible\n      // string, used when rendering an exit ghost.\n      text: el.textContent || \"\",\n      display: (_c = (_b = (_a = el.querySelector(\"tspan\")) == null ? void 0 : _a.textContent) != null ? _b : el.textContent) != null ? _c : \"\",\n      pos: parseFloat(el.getAttribute(posAttr) || \"\"),\n      transform: el.getAttribute(\"transform\")\n    };\n  });\n}\nfunction grabLines(root, sel, posAttr) {\n  return [...root.querySelectorAll(sel)].map(\n    (el) => parseFloat(el.getAttribute(posAttr) || \"\")\n  );\n}\nconst NO_GHOST = \":not(.apexcharts-tick-ghost)\";\nconst X_LABELS_SEL = `.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${NO_GHOST}`;\nconst Y_LABELS_SEL = `.apexcharts-yaxis-texts-g text${NO_GHOST}`;\nconst V_GRID_SEL = `.apexcharts-gridlines-vertical line${NO_GHOST}`;\nconst H_GRID_SEL = `.apexcharts-gridlines-horizontal line${NO_GHOST}`;\nfunction currentXScale(w2) {\n  var _a, _b;\n  const gl = w2.globals;\n  if (!((_a = w2.axisFlags) == null ? void 0 : _a.isXNumeric) || gl.isBarHorizontal) return null;\n  if ((_b = w2.config.xaxis) == null ? void 0 : _b.reversed) return null;\n  const min = gl.minX;\n  const max = gl.maxX;\n  const width = w2.layout.gridWidth;\n  if (!isFinite(min) || !isFinite(max) || !(max > min) || !(width > 0)) {\n    return null;\n  }\n  return { min, max, width };\n}\nfunction currentYAnchors(w2, labels) {\n  var _a;\n  const gl = w2.globals;\n  if (gl.isBarHorizontal) return null;\n  if (!Array.isArray(w2.config.yaxis) || w2.config.yaxis.length !== 1) return null;\n  if ((_a = w2.config.yaxis[0]) == null ? void 0 : _a.logarithmic) return null;\n  const min = gl.minY;\n  const max = gl.maxY;\n  if (!isFinite(min) || !isFinite(max) || !(max > min)) return null;\n  const ps = labels.map((l2) => l2.pos).filter((p2) => isFinite(p2));\n  if (ps.length < 2) return null;\n  return { min, max, pLo: Math.max(...ps), pHi: Math.min(...ps) };\n}\nfunction composeXMap(o2, n2) {\n  if (!o2 || !n2) return null;\n  const os = o2.max - o2.min;\n  const ns = n2.max - n2.min;\n  if (!(os > 0) || !(ns > 0) || !(o2.width > 0) || !(n2.width > 0)) return null;\n  return {\n    toNew: (p2) => (o2.min + p2 / o2.width * os - n2.min) / ns * n2.width,\n    toOld: (p2) => (n2.min + p2 / n2.width * ns - o2.min) / os * o2.width\n  };\n}\nfunction composeYMap(o2, n2) {\n  if (!o2 || !n2) return null;\n  const oSpanP = o2.pHi - o2.pLo;\n  const nSpanP = n2.pHi - n2.pLo;\n  const oSpanV = o2.max - o2.min;\n  const nSpanV = n2.max - n2.min;\n  if (!oSpanP || !nSpanP || !(oSpanV > 0) || !(nSpanV > 0)) return null;\n  const oldVal = (p2) => o2.min + (p2 - o2.pLo) / oSpanP * oSpanV;\n  const newVal = (p2) => n2.min + (p2 - n2.pLo) / nSpanP * nSpanV;\n  return {\n    toNew: (p2) => n2.pLo + (oldVal(p2) - n2.min) / nSpanV * nSpanP,\n    toOld: (p2) => o2.pLo + (newVal(p2) - o2.min) / oSpanV * oSpanP\n  };\n}\nfunction captureAxisChrome(w2) {\n  const gl = w2.globals;\n  gl.prevChromeFrame = null;\n  if (!gl.axisCharts || !Environment.isBrowser()) return;\n  const root = w2.dom.baseEl;\n  if (!Utils$1.elementExists(root)) return;\n  try {\n    const yLabels = grabLabels(root, Y_LABELS_SEL, \"y\");\n    gl.prevChromeFrame = {\n      xLabels: grabLabels(root, X_LABELS_SEL, \"x\"),\n      yLabels,\n      vGrid: grabLines(root, V_GRID_SEL, \"x1\"),\n      hGrid: grabLines(root, H_GRID_SEL, \"y1\"),\n      // Value scales of the outgoing render, so ticks whose TEXT has no\n      // counterpart (e.g. a zoom across datetime granularities) can still be\n      // re-projected: new ticks slide in from where their value sat, old\n      // ticks ghost out to where their value lands.\n      xScale: currentXScale(w2),\n      yAnchors: currentYAnchors(w2, yLabels)\n    };\n  } catch (_) {\n    gl.prevChromeFrame = null;\n  }\n}\nfunction fadeIn$1(w2, node, duration, ease) {\n  const style = (\n    /** @type {any} */\n    node.style\n  );\n  style.opacity = \"0\";\n  rafTween(\n    w2,\n    duration,\n    ease,\n    (eased) => {\n      style.opacity = String(eased);\n    },\n    () => {\n      style.opacity = \"\";\n    }\n  );\n}\nfunction tweenPos(w2, node, attrs, from, to, duration, ease) {\n  attrs.forEach((a2) => node.setAttribute(a2, String(from)));\n  rafTween(\n    w2,\n    duration,\n    ease,\n    (eased) => {\n      const v2 = String(from + (to - from) * eased);\n      attrs.forEach((a2) => node.setAttribute(a2, v2));\n    },\n    () => {\n      attrs.forEach((a2) => node.setAttribute(a2, String(to)));\n    }\n  );\n}\nfunction spawnGhost(w2, { template, display, attrs, from, to, duration, ease }) {\n  const parent = template.parentNode;\n  if (!parent) return;\n  const ghost = (\n    /** @type {Element} */\n    template.cloneNode(true)\n  );\n  ghost.classList.add(\"apexcharts-tick-ghost\");\n  ghost.setAttribute(\"pointer-events\", \"none\");\n  ghost.removeAttribute(\"id\");\n  if (display !== void 0) {\n    const tspan = ghost.querySelector(\"tspan\");\n    if (tspan) tspan.textContent = display;\n    else ghost.textContent = display;\n    const title = ghost.querySelector(\"title\");\n    if (title) title.textContent = display;\n  }\n  attrs.forEach((a2) => ghost.setAttribute(a2, String(from)));\n  const style = (\n    /** @type {any} */\n    ghost.style\n  );\n  style.opacity = \"1\";\n  parent.appendChild(ghost);\n  rafTween(\n    w2,\n    duration,\n    ease,\n    (eased) => {\n      const v2 = String(from + (to - from) * eased);\n      attrs.forEach((a2) => ghost.setAttribute(a2, v2));\n      style.opacity = String(1 - eased);\n    },\n    () => {\n      if (ghost.parentNode) ghost.parentNode.removeChild(ghost);\n    }\n  );\n}\nconst MAX_GHOSTS = 20;\nfunction transitionAxis(w2, {\n  newLabels,\n  oldLabels,\n  posAttr,\n  newLines,\n  oldLines,\n  lineAttrs,\n  duration,\n  ease,\n  project\n}) {\n  const oldByText = /* @__PURE__ */ new Map();\n  oldLabels.forEach((l2, i2) => {\n    if (!oldByText.has(l2.text)) oldByText.set(l2.text, __spreadProps(__spreadValues({}, l2), { i: i2 }));\n  });\n  const matchedOld = /* @__PURE__ */ new Set();\n  const newLinesAligned = newLines.length === newLabels.length;\n  const oldLinesAligned = oldLines.length === oldLabels.length;\n  const spanPs = oldLabels.map((l2) => l2.pos).concat(\n    newLabels.map((l2) => parseFloat(l2.getAttribute(posAttr) || \"\"))\n  ).filter((p2) => isFinite(p2));\n  const spanLo = Math.min(...spanPs);\n  const spanHi = Math.max(...spanPs);\n  const margin = Math.max(40, (spanHi - spanLo) * 0.25);\n  const clamp = (p2) => Math.max(spanLo - margin, Math.min(spanHi + margin, p2));\n  const tweenPairedLine = (line, old) => {\n    if (!line) return;\n    const lineTo = parseFloat(line.getAttribute(lineAttrs[0]) || \"\");\n    const lineFrom = oldLines[old.i];\n    if (isFinite(lineTo) && isFinite(lineFrom)) {\n      tweenPos(w2, line, lineAttrs, lineFrom, lineTo, duration, ease);\n    }\n  };\n  newLabels.forEach((label, i2) => {\n    const to = parseFloat(label.getAttribute(posAttr) || \"\");\n    const old = oldByText.get(label.textContent || \"\");\n    const line = newLinesAligned ? newLines[i2] : null;\n    if (old) matchedOld.add(old.i);\n    const labelTransform = label.getAttribute(\"transform\");\n    if (!old || !isFinite(old.pos)) {\n      if (!old) {\n        if (project && isFinite(to) && !labelTransform) {\n          const from = isFinite(project.toOld(to)) ? clamp(project.toOld(to)) : NaN;\n          if (isFinite(from) && Math.abs(from - to) > 0.5) {\n            tweenPos(w2, label, [posAttr], from, to, duration, ease);\n            if (line) tweenPos(w2, line, lineAttrs, from, to, duration, ease);\n          }\n        }\n        fadeIn$1(w2, label, duration, ease);\n        if (line) fadeIn$1(w2, line, duration, ease);\n      }\n      return;\n    }\n    if (!isFinite(to) || Math.abs(old.pos - to) < 0.5) return;\n    if (labelTransform || old.transform) {\n      const delta = old.pos - to;\n      if (isFinite(delta)) {\n        const base = labelTransform || \"\";\n        rafTween(\n          w2,\n          duration,\n          ease,\n          (eased) => {\n            const v2 = delta * (1 - eased);\n            const t2 = posAttr === \"x\" ? `translate(${v2} 0)` : `translate(0 ${v2})`;\n            label.setAttribute(\"transform\", `${t2} ${base}`.trim());\n          },\n          () => {\n            if (base) label.setAttribute(\"transform\", base);\n            else label.removeAttribute(\"transform\");\n          }\n        );\n      }\n      tweenPairedLine(line, old);\n      return;\n    }\n    tweenPos(w2, label, [posAttr], old.pos, to, duration, ease);\n    tweenPairedLine(line, old);\n  });\n  if (!project || !newLabels.length) return;\n  let ghosts = 0;\n  oldLabels.forEach((old, i2) => {\n    if (matchedOld.has(i2)) return;\n    if (!isFinite(old.pos) || old.transform) return;\n    if (ghosts >= MAX_GHOSTS) return;\n    const rawTo = project.toNew(old.pos);\n    if (!isFinite(rawTo) || Math.abs(rawTo - old.pos) < 0.5) return;\n    ghosts++;\n    spawnGhost(w2, {\n      template: newLabels[0],\n      display: old.display,\n      attrs: [posAttr],\n      from: old.pos,\n      to: clamp(rawTo),\n      duration,\n      ease\n    });\n    if (oldLinesAligned && newLines.length && isFinite(oldLines[i2])) {\n      spawnGhost(w2, {\n        template: newLines[0],\n        attrs: lineAttrs,\n        from: oldLines[i2],\n        to: clamp(project.toNew(oldLines[i2])),\n        duration,\n        ease\n      });\n    }\n  });\n}\nfunction applyAxisTransition(w2) {\n  const gl = w2.globals;\n  const chrome = gl.prevChromeFrame;\n  gl.prevChromeFrame = null;\n  if (!chrome || !gl.axisCharts || !Environment.isBrowser()) return;\n  if (!lengthTransitionEnabled(w2)) return;\n  const anyMotion = (w2.seriesData.series || []).some(\n    (_, i2) => seriesJoin(w2, i2, true, true) !== null\n  );\n  if (!anyMotion) return;\n  const root = w2.dom.baseEl;\n  if (!Utils$1.elementExists(root)) return;\n  const duration = Math.max(1, w2.config.chart.animations.dynamicAnimation.speed || 1);\n  const ease = morphEasing(w2);\n  try {\n    const newYLabels = [...root.querySelectorAll(Y_LABELS_SEL)];\n    const projX = composeXMap(chrome.xScale, currentXScale(w2));\n    const projY = composeYMap(\n      chrome.yAnchors,\n      currentYAnchors(\n        w2,\n        newYLabels.map((el) => ({\n          pos: parseFloat(el.getAttribute(\"y\") || \"\")\n        }))\n      )\n    );\n    transitionAxis(w2, {\n      newLabels: [...root.querySelectorAll(X_LABELS_SEL)],\n      oldLabels: chrome.xLabels,\n      posAttr: \"x\",\n      newLines: [...root.querySelectorAll(V_GRID_SEL)],\n      oldLines: chrome.vGrid,\n      lineAttrs: [\"x1\", \"x2\"],\n      duration,\n      ease,\n      project: projX\n    });\n    transitionAxis(w2, {\n      newLabels: newYLabels,\n      oldLabels: chrome.yLabels,\n      posAttr: \"y\",\n      newLines: [...root.querySelectorAll(H_GRID_SEL)],\n      oldLines: chrome.hGrid,\n      lineAttrs: [\"y1\", \"y2\"],\n      duration,\n      ease,\n      project: projY\n    });\n  } catch (_) {\n  }\n}\nconst DL_GROUP_SEL = \".apexcharts-data-labels[data\\\\:dlKey]\";\nconst DL_TEXT_SEL = \".apexcharts-datalabel\";\nfunction dataLabelMotionEnabled(w2) {\n  var _a, _b;\n  const dl = w2.config.dataLabels;\n  return !!(((_a = dl == null ? void 0 : dl.animate) == null ? void 0 : _a.enabled) || ((_b = dl == null ? void 0 : dl.countUp) == null ? void 0 : _b.enabled));\n}\nfunction decimalsOf(n2) {\n  if (!isFinite(n2)) return 0;\n  const s2 = String(Math.abs(n2));\n  const e2 = s2.indexOf(\"e\");\n  if (e2 !== -1) {\n    const mantissa = s2.slice(0, e2);\n    const exp = parseInt(s2.slice(e2 + 1), 10);\n    const dot2 = mantissa.indexOf(\".\");\n    const mantissaDec = dot2 === -1 ? 0 : mantissa.length - dot2 - 1;\n    return Math.min(6, Math.max(0, mantissaDec - exp));\n  }\n  const dot = s2.indexOf(\".\");\n  return dot === -1 ? 0 : Math.min(6, s2.length - dot - 1);\n}\nfunction writeLabel(textEl, s2) {\n  const tspan = textEl.querySelector(\"tspan\");\n  if (tspan) tspan.textContent = s2;\n  else textEl.textContent = s2;\n}\nfunction captureDataLabels(w2) {\n  const gl = w2.globals;\n  gl.prevDataLabels = null;\n  if (!gl.axisCharts || !Environment.isBrowser()) return;\n  if (!dataLabelMotionEnabled(w2)) return;\n  const root = w2.dom.baseEl;\n  if (!Utils$1.elementExists(root)) return;\n  try {\n    const map = /* @__PURE__ */ new Map();\n    root.querySelectorAll(DL_GROUP_SEL).forEach((group) => {\n      const key = group.getAttribute(\"data:dlKey\");\n      if (!key) return;\n      const textEl = group.querySelector(DL_TEXT_SEL);\n      if (!textEl) return;\n      map.set(key, {\n        cx: parseFloat(textEl.getAttribute(\"cx\") || \"\"),\n        cy: parseFloat(textEl.getAttribute(\"cy\") || \"\"),\n        val: parseFloat(group.getAttribute(\"data:dlVal\") || \"\")\n      });\n    });\n    gl.prevDataLabels = map.size ? map : null;\n  } catch (_) {\n    gl.prevDataLabels = null;\n  }\n}\nfunction fadeIn(w2, node, duration, ease) {\n  const style = (\n    /** @type {any} */\n    node.style\n  );\n  style.opacity = \"0\";\n  rafTween(\n    w2,\n    duration,\n    ease,\n    (eased) => {\n      style.opacity = String(eased);\n    },\n    () => {\n      style.opacity = \"\";\n    }\n  );\n}\nfunction applyDataLabelTransition(w2) {\n  var _a, _b;\n  const gl = w2.globals;\n  const prev = gl.prevDataLabels;\n  gl.prevDataLabels = null;\n  if (!prev || !gl.axisCharts || !Environment.isBrowser()) return;\n  if (!dataLabelMotionEnabled(w2)) return;\n  if (!lengthTransitionEnabled(w2)) return;\n  const root = w2.dom.baseEl;\n  if (!Utils$1.elementExists(root)) return;\n  const dl = w2.config.dataLabels;\n  const ride = !!((_a = dl.animate) == null ? void 0 : _a.enabled);\n  const countUp = !!((_b = dl.countUp) == null ? void 0 : _b.enabled);\n  const formatter = dl.formatter;\n  const duration = Math.max(1, w2.config.chart.animations.dynamicAnimation.speed || 1);\n  const ease = morphEasing(w2);\n  try {\n    root.querySelectorAll(DL_GROUP_SEL).forEach((group) => {\n      const key = group.getAttribute(\"data:dlKey\");\n      if (!key) return;\n      const textEl = group.querySelector(DL_TEXT_SEL);\n      if (!textEl) return;\n      const old = prev.get(key);\n      if (ride) {\n        if (old && isFinite(old.cx) && isFinite(old.cy)) {\n          const newCx = parseFloat(textEl.getAttribute(\"cx\") || \"\");\n          const newCy = parseFloat(textEl.getAttribute(\"cy\") || \"\");\n          const dx = old.cx - newCx;\n          const dy = old.cy - newCy;\n          if (isFinite(dx) && isFinite(dy) && Math.abs(dx) + Math.abs(dy) > 0.5) {\n            const base = group.getAttribute(\"transform\") || \"\";\n            rafTween(\n              w2,\n              duration,\n              ease,\n              (eased) => {\n                const t2 = 1 - eased;\n                group.setAttribute(\n                  \"transform\",\n                  `translate(${dx * t2} ${dy * t2}) ${base}`.trim()\n                );\n              },\n              () => {\n                group.setAttribute(\"transform\", base);\n              }\n            );\n          }\n        } else if (!old) {\n          fadeIn(w2, group, duration, ease);\n        }\n      }\n      if (countUp && old && isFinite(old.val)) {\n        const newVal = parseFloat(group.getAttribute(\"data:dlVal\") || \"\");\n        if (isFinite(newVal) && Math.abs(newVal - old.val) > 1e-9) {\n          const from = old.val;\n          const dec = Math.max(decimalsOf(from), decimalsOf(newVal));\n          const realIndex = parseInt(key, 10);\n          const j = parseInt(group.getAttribute(\"data:dlJ\") || \"\", 10);\n          const fmtOpts = __spreadProps(__spreadValues({}, w2), {\n            seriesIndex: realIndex,\n            dataPointIndex: isFinite(j) ? j : 0,\n            w: w2\n          });\n          const format = (v2) => {\n            const rounded = Number(v2.toFixed(dec));\n            let out = rounded;\n            if (typeof formatter === \"function\") {\n              try {\n                out = formatter(rounded, fmtOpts);\n              } catch (_) {\n                out = rounded;\n              }\n            }\n            return String(out);\n          };\n          rafTween(\n            w2,\n            duration,\n            ease,\n            (eased) => {\n              writeLabel(textEl, format(from + (newVal - from) * eased));\n            },\n            () => {\n              writeLabel(textEl, format(newVal));\n            }\n          );\n        }\n      }\n    });\n  } catch (_) {\n  }\n}\nclass Series {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {{ toggleDataSeries?: Function, revertDefaultAxisMinMax?: Function, updateSeries?: Function }} [callbacks]\n   */\n  constructor(w2, {\n    toggleDataSeries = void 0,\n    revertDefaultAxisMinMax = void 0,\n    updateSeries = void 0\n  } = {}) {\n    this.w = w2;\n    this._toggleDataSeries = toggleDataSeries || null;\n    this._revertDefaultAxisMinMax = revertDefaultAxisMinMax || null;\n    this._updateSeries = updateSeries || null;\n    this.legendInactiveClass = \"legend-mouseover-inactive\";\n  }\n  clearSeriesCache() {\n    const w2 = this.w;\n    if (w2.globals.cachedSelectors) {\n      delete w2.globals.cachedSelectors.allSeriesEls;\n      delete w2.globals.cachedSelectors.highlightSeriesEls;\n    }\n  }\n  getAllSeriesEls() {\n    const w2 = this.w;\n    const cacheKey = \"allSeriesEls\";\n    if (!w2.globals.cachedSelectors[cacheKey]) {\n      w2.globals.cachedSelectors[cacheKey] = /** @type {any} */\n      w2.dom.baseEl.getElementsByClassName(`apexcharts-series`);\n    }\n    return w2.globals.cachedSelectors[cacheKey];\n  }\n  /**\n   * @param {string} seriesName\n   */\n  getSeriesByName(seriesName) {\n    return this.w.dom.baseEl.querySelector(\n      `.apexcharts-inner .apexcharts-series[seriesName='${Utils$1.escapeString(\n        seriesName\n      )}']`\n    );\n  }\n  /**\n   * @param {string} seriesName\n   */\n  isSeriesHidden(seriesName) {\n    var _a;\n    const targetElement = this.getSeriesByName(seriesName);\n    const el = (\n      /** @type {Element} */\n      targetElement\n    );\n    const realIndex = parseInt((_a = el.getAttribute(\"data:realIndex\")) != null ? _a : \"0\", 10);\n    const isHidden = el.classList.contains(\"apexcharts-series-collapsed\");\n    return { isHidden, realIndex };\n  }\n  /**\n   * @param {any} elSeries\n   * @param {number} index\n   */\n  addCollapsedClassToSeries(elSeries, index) {\n    Series.addCollapsedClassToSeries(this.w, elSeries, index);\n  }\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {any} elSeries\n   * @param {number} index\n   */\n  static addCollapsedClassToSeries(w2, elSeries, index) {\n    function iterateOnAllCollapsedSeries(series) {\n      for (let cs = 0; cs < series.length; cs++) {\n        if (series[cs].index === index) {\n          elSeries.node.classList.add(\"apexcharts-series-collapsed\");\n        }\n      }\n    }\n    iterateOnAllCollapsedSeries(w2.globals.collapsedSeries);\n    iterateOnAllCollapsedSeries(w2.globals.ancillaryCollapsedSeries);\n  }\n  /**\n   * @param {string} seriesName\n   */\n  toggleSeries(seriesName) {\n    var _a;\n    const isSeriesHidden = this.isSeriesHidden(seriesName);\n    (_a = this._toggleDataSeries) == null ? void 0 : _a.call(this, isSeriesHidden.realIndex, isSeriesHidden.isHidden);\n    return isSeriesHidden.isHidden;\n  }\n  /**\n   * @param {string} seriesName\n   */\n  showSeries(seriesName) {\n    var _a;\n    const isSeriesHidden = this.isSeriesHidden(seriesName);\n    if (isSeriesHidden.isHidden) {\n      (_a = this._toggleDataSeries) == null ? void 0 : _a.call(this, isSeriesHidden.realIndex, true);\n    }\n  }\n  /**\n   * @param {string} seriesName\n   */\n  hideSeries(seriesName) {\n    var _a;\n    const isSeriesHidden = this.isSeriesHidden(seriesName);\n    if (!isSeriesHidden.isHidden) {\n      (_a = this._toggleDataSeries) == null ? void 0 : _a.call(this, isSeriesHidden.realIndex, false);\n    }\n  }\n  /**\n   * Cheap pre-update reset for the data-replacement paths (updateSeries /\n   * appendSeries). Clears the same bookkeeping resetSeries() clears (series\n   * cache, previous paths, collapsed-series state) WITHOUT restoring\n   * config.series from the initialSeries snapshot: the caller is about to\n   * replace the series anyway (parseData assigns config.series = newSeries),\n   * so materializing and cloning the snapshot per update is pure waste (two\n   * O(n) deep clones per streaming tick at 50k points).\n   */\n  prepareDataUpdate() {\n    const w2 = this.w;\n    this.clearSeriesCache();\n    w2.globals.previousPaths = [];\n    w2.globals.collapsedSeries = [];\n    w2.globals.ancillaryCollapsedSeries = [];\n    w2.globals.collapsedSeriesIndices = [];\n    w2.globals.ancillaryCollapsedSeriesIndices = [];\n  }\n  resetSeries(shouldUpdateChart = true, shouldResetZoom = true, shouldResetCollapsed = true) {\n    var _a, _b;\n    const w2 = this.w;\n    this.clearSeriesCache();\n    let series = Utils$1.clone(w2.globals.initialSeries);\n    if (!Array.isArray(series)) {\n      series = Utils$1.clone(w2.config.series) || [];\n    }\n    w2.globals.previousPaths = [];\n    if (shouldResetCollapsed) {\n      w2.globals.collapsedSeries = [];\n      w2.globals.ancillaryCollapsedSeries = [];\n      w2.globals.collapsedSeriesIndices = [];\n      w2.globals.ancillaryCollapsedSeriesIndices = [];\n    } else {\n      series = this.emptyCollapsedSeries(series);\n    }\n    w2.config.series = series;\n    if (shouldUpdateChart) {\n      if (shouldResetZoom) {\n        w2.interact.zoomed = false;\n        (_a = this._revertDefaultAxisMinMax) == null ? void 0 : _a.call(this);\n      }\n      (_b = this._updateSeries) == null ? void 0 : _b.call(\n        this,\n        series,\n        w2.config.chart.animations.dynamicAnimation.enabled\n      );\n    }\n  }\n  /**\n   * @param {any[]} series\n   */\n  emptyCollapsedSeries(series) {\n    const w2 = this.w;\n    if (!Array.isArray(series)) return series;\n    for (let i2 = 0; i2 < series.length; i2++) {\n      if (w2.globals.collapsedSeriesIndices.indexOf(i2) > -1) {\n        if (series[i2] && typeof series[i2] === \"object\") {\n          series[i2].data = [];\n        } else {\n          series[i2] = 0;\n        }\n      }\n    }\n    return series;\n  }\n  /**\n   * Series display names for the CURRENT `w.config` (post-merge), derived the\n   * same way the parser does: an object series' own `name`, else the matching\n   * `labels` entry (non-axis / pie / unit), else a generated `series-N`.\n   * @returns {string[]}\n   */\n  _deriveSeriesNames() {\n    const w2 = this.w;\n    const series = w2.config.series || [];\n    const labels = w2.config.labels || [];\n    return series.map((s2, i2) => {\n      if (s2 && typeof s2 === \"object\" && s2.name != null) return String(s2.name);\n      return labels[i2] != null ? String(labels[i2]) : `series-${i2 + 1}`;\n    });\n  }\n  /**\n   * Re-apply legend-hidden (collapsed) series to a freshly-updated\n   * `w.config.series`, matching BY CATEGORY NAME rather than index. This keeps a\n   * hide alive across a data update that reorders or regroups categories - most\n   * visibly a storyboard beat that supplies new series each scroll:\n   *   - a category still present stays hidden (at its possibly-new index);\n   *   - a category the update dropped/regrouped away is un-hidden (it no longer\n   *     exists, so it must reappear as part of the new grouping).\n   * Records without a stored name (older collapses) fall back to their index.\n   */\n  reconcileCollapsedByName() {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const newNames = this._deriveSeriesNames();\n    const reconcile = (records) => {\n      const nextRecords = [];\n      const nextIndices = [];\n      records.forEach((rec) => {\n        const j = rec && rec.name != null ? newNames.indexOf(rec.name) : rec.index;\n        if (j == null || j < 0 || j >= w2.config.series.length) return;\n        const s2 = (\n          /** @type {any} */\n          w2.config.series[j]\n        );\n        rec.index = j;\n        rec.data = gl.axisCharts ? s2 && s2.data ? s2.data.slice() : [] : s2;\n        nextRecords.push(rec);\n        nextIndices.push(j);\n      });\n      return { records: nextRecords, indices: nextIndices };\n    };\n    const main = reconcile(gl.collapsedSeries);\n    gl.collapsedSeries = main.records;\n    gl.collapsedSeriesIndices = main.indices;\n    const anc = reconcile(gl.ancillaryCollapsedSeries);\n    gl.ancillaryCollapsedSeries = anc.records;\n    gl.ancillaryCollapsedSeriesIndices = anc.indices;\n    gl.allSeriesCollapsed = gl.collapsedSeries.length + gl.ancillaryCollapsedSeries.length === w2.config.series.length;\n    this.emptyCollapsedSeries(w2.config.series);\n  }\n  /**\n   * @param {string} seriesName\n   */\n  /**\n   * Bridge SVG series-dim state to the canvas renderer: SVG opacity classes\n   * (legend-mouseover-inactive) don't touch the painted canvas series layer, so\n   * repaint it with a matching per-series opacity. No-op unless the canvas\n   * renderer is active. The renderer is mirrored on globals by RendererController\n   * (Series has no ctx handle).\n   * @param {{active:number, opacity:number}|null} dim\n   */\n  canvasRestyle(dim) {\n    const r2 = this.w.globals.activeRenderer;\n    if (r2 && r2.kind === \"canvas\" && typeof r2.restyle === \"function\") {\n      r2.restyle(dim);\n    }\n  }\n  /**\n   * @param {string} seriesName\n   */\n  highlightSeries(seriesName) {\n    var _a;\n    const w2 = this.w;\n    const targetElement = this.getSeriesByName(seriesName);\n    const realIndex = parseInt(\n      (_a = targetElement == null ? void 0 : targetElement.getAttribute(\"data:realIndex\")) != null ? _a : \"\",\n      10\n    );\n    const cacheKey = \"highlightSeriesEls\";\n    let allSeriesEls = w2.globals.cachedSelectors[cacheKey];\n    if (!allSeriesEls) {\n      allSeriesEls = w2.dom.baseEl.querySelectorAll(\n        `.apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis`\n      );\n      w2.globals.cachedSelectors[cacheKey] = allSeriesEls;\n    }\n    let seriesEl = null;\n    let dataLabelEl = null;\n    let yaxisEl = null;\n    if (w2.globals.axisCharts || w2.config.chart.type === \"radialBar\") {\n      if (w2.globals.axisCharts) {\n        seriesEl = w2.dom.baseEl.querySelector(\n          `.apexcharts-series[data\\\\:realIndex='${realIndex}']`\n        );\n        dataLabelEl = w2.dom.baseEl.querySelector(\n          `.apexcharts-datalabels[data\\\\:realIndex='${realIndex}']`\n        );\n        const yaxisIndex = w2.globals.seriesYAxisReverseMap[realIndex];\n        yaxisEl = w2.dom.baseEl.querySelector(\n          `.apexcharts-yaxis[rel='${yaxisIndex}']`\n        );\n      } else {\n        seriesEl = w2.dom.baseEl.querySelector(\n          `.apexcharts-series[rel='${realIndex + 1}']`\n        );\n      }\n    } else {\n      seriesEl = w2.dom.baseEl.querySelector(\n        `.apexcharts-series[rel='${realIndex + 1}'] path`\n      );\n    }\n    for (let se2 = 0; se2 < allSeriesEls.length; se2++) {\n      const serEl = (\n        /** @type {Element} */\n        allSeriesEls[se2]\n      );\n      serEl.classList.add(this.legendInactiveClass);\n    }\n    if (seriesEl) {\n      if (!w2.globals.axisCharts) {\n        const parentEl = (\n          /** @type {Element} */\n          seriesEl.parentNode\n        );\n        parentEl == null ? void 0 : parentEl.classList.remove(this.legendInactiveClass);\n      }\n      seriesEl.classList.remove(this.legendInactiveClass);\n      if (dataLabelEl !== null) {\n        dataLabelEl.classList.remove(this.legendInactiveClass);\n      }\n      if (yaxisEl !== null) {\n        yaxisEl.classList.remove(this.legendInactiveClass);\n      }\n    } else {\n      for (let se2 = 0; se2 < allSeriesEls.length; se2++) {\n        const serEl = (\n          /** @type {Element} */\n          allSeriesEls[se2]\n        );\n        serEl.classList.remove(this.legendInactiveClass);\n      }\n    }\n    this.canvasRestyle(\n      seriesEl && !Number.isNaN(realIndex) ? { active: realIndex, opacity: 0.2 } : null\n    );\n  }\n  /**\n   * @param {Event} e\n   * @param {any} targetElement\n   */\n  toggleSeriesOnHover(e2, targetElement) {\n    const w2 = this.w;\n    if (!targetElement) targetElement = e2.target;\n    const allSeriesEls = w2.dom.baseEl.querySelectorAll(\n      `.apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis`\n    );\n    if (e2.type === \"mousemove\") {\n      const realIndex = parseInt(targetElement.getAttribute(\"rel\"), 10) - 1;\n      this.highlightSeries(w2.seriesData.seriesNames[realIndex]);\n    } else if (e2.type === \"mouseout\") {\n      for (let se2 = 0; se2 < allSeriesEls.length; se2++) {\n        allSeriesEls[se2].classList.remove(this.legendInactiveClass);\n      }\n      this.canvasRestyle(null);\n    }\n  }\n  /**\n   * Dim every heatmap cell except those whose value falls inside the color\n   * range at `rangeIndex`. Shared by the categorical legend (hover a legend\n   * item) and the gradient legend (hover a band) — both supply an index into\n   * `colorScale.ranges` plus an action, decoupling the highlight from any\n   * particular DOM element / event shape.\n   *\n   * @param {number} rangeIndex index into `colorScale.ranges`\n   * @param {'highlight'|'reset'} action\n   */\n  highlightRangeInSeries(rangeIndex, action) {\n    const w2 = this.w;\n    const allHeatMapElements = w2.dom.baseEl.getElementsByClassName(\n      \"apexcharts-heatmap-rect\"\n    );\n    const toggleAllInactive = (op) => {\n      for (let i2 = 0; i2 < allHeatMapElements.length; i2++) {\n        const classList = (\n          /** @type {any} */\n          allHeatMapElements[i2].classList\n        );\n        if (typeof classList[op] === \"function\") {\n          classList[op](this.legendInactiveClass);\n        }\n      }\n    };\n    if (action === \"reset\") {\n      toggleAllInactive(\"remove\");\n      return;\n    }\n    const ranges = w2.config.plotOptions.heatmap.colorScale.ranges;\n    const range = ranges && ranges[rangeIndex];\n    if (!range) return;\n    toggleAllInactive(\"add\");\n    for (let i2 = 0; i2 < allHeatMapElements.length; i2++) {\n      const val = Number(allHeatMapElements[i2].getAttribute(\"val\"));\n      if (val >= range.from && val <= range.to) {\n        allHeatMapElements[i2].classList.remove(this.legendInactiveClass);\n      }\n    }\n  }\n  /**\n   * @param {string[]} chartTypes\n   */\n  getActiveConfigSeriesIndex(order = \"asc\", chartTypes = []) {\n    const w2 = this.w;\n    let activeIndex = 0;\n    if (w2.config.series.length > 1) {\n      const activeSeriesIndex = w2.config.series.map((s2, index) => {\n        const checkChartType = () => {\n          if (w2.globals.comboCharts) {\n            return chartTypes.length === 0 || chartTypes.length && chartTypes.indexOf(\n              /** @type {Record<string,any>} */\n              w2.config.series[index].type\n            ) > -1;\n          }\n          return true;\n        };\n        const hasData = (\n          /** @type {any} */\n          s2.data && /** @type {any} */\n          s2.data.length > 0 && w2.globals.collapsedSeriesIndices.indexOf(index) === -1\n        );\n        return hasData && checkChartType() ? index : -1;\n      });\n      for (let a2 = order === \"asc\" ? 0 : activeSeriesIndex.length - 1; order === \"asc\" ? a2 < activeSeriesIndex.length : a2 >= 0; order === \"asc\" ? a2++ : a2--) {\n        if (activeSeriesIndex[a2] !== -1) {\n          activeIndex = activeSeriesIndex[a2];\n          break;\n        }\n      }\n    }\n    return activeIndex;\n  }\n  /**\n   * The highest active series index inside each series group, as an array\n   * parallel to `w.labelData.seriesGroups`. Entries are -1 for a group whose\n   * every series is collapsed or empty.\n   *\n   * Same activity test as `getActiveConfigSeriesIndex` (has data and is not\n   * legend-collapsed), applied per group so grouped stacked bars can ask which\n   * series caps each individual stack rather than the chart as a whole.\n   * @param {string[]} chartTypes\n   * @returns {number[]}\n   */\n  getActiveConfigSeriesIndexByGroup(chartTypes = []) {\n    const w2 = this.w;\n    const groups = w2.labelData.seriesGroups || [];\n    return groups.map((group) => {\n      let last = -1;\n      w2.config.series.forEach((s2, i2) => {\n        if (group.indexOf(w2.seriesData.seriesNames[i2]) === -1) return;\n        if (w2.globals.comboCharts && chartTypes.length && chartTypes.indexOf(s2.type) === -1) {\n          return;\n        }\n        const hasData = s2.data && s2.data.length > 0 && w2.globals.collapsedSeriesIndices.indexOf(i2) === -1;\n        if (hasData) last = i2;\n      });\n      return last;\n    });\n  }\n  getBarSeriesIndices() {\n    const w2 = this.w;\n    if (w2.globals.comboCharts) {\n      return this.w.config.series.map((s2, i2) => {\n        return s2.type === \"bar\" || s2.type === \"column\" ? i2 : -1;\n      }).filter((i2) => {\n        return i2 !== -1;\n      });\n    }\n    return this.w.config.series.map((s2, i2) => {\n      return i2;\n    });\n  }\n  getPreviousPaths() {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    captureStreamFrame(w2);\n    captureAxisChrome(w2);\n    captureDataLabels(w2);\n    if (!w2.globals.axisCharts) {\n      w2.globals.previousPaths = w2.seriesData.series;\n      return;\n    }\n    if (!Utils$1.elementExists(w2.dom.baseEl)) {\n      w2.globals.previousPaths = [];\n      return;\n    }\n    w2.globals.previousPaths = [];\n    function pushPaths(seriesEls, i2, type) {\n      const paths = seriesEls[i2].childNodes;\n      const dArr = {\n        type,\n        paths: (\n          /** @type {any[]} */\n          []\n        ),\n        realIndex: seriesEls[i2].getAttribute(\"data:realIndex\")\n      };\n      for (let j = 0; j < paths.length; j++) {\n        if (paths[j].hasAttribute(\"pathTo\")) {\n          const d = paths[j].getAttribute(\"pathTo\");\n          dArr.paths.push({\n            d,\n            key: paths[j].getAttribute(\"data:pathKey\"),\n            fill: paths[j].getAttribute(\"fill\")\n          });\n        }\n      }\n      w2.globals.previousPaths.push(dArr);\n    }\n    const getPaths = (chartType) => {\n      return w2.dom.baseEl.querySelectorAll(\n        `.apexcharts-${chartType}-series .apexcharts-series`\n      );\n    };\n    const chartTypes = [\n      \"line\",\n      \"area\",\n      \"bar\",\n      \"rangebar\",\n      \"rangeArea\",\n      \"candlestick\",\n      \"radar\"\n    ];\n    chartTypes.forEach((type) => {\n      const paths = getPaths(type);\n      for (let p2 = 0; p2 < paths.length; p2++) {\n        pushPaths(paths, p2, type);\n      }\n    });\n    const heatTreeSeries = w2.dom.baseEl.querySelectorAll(\n      `.apexcharts-${w2.config.chart.type} .apexcharts-series`\n    );\n    if (heatTreeSeries.length > 0) {\n      for (let h2 = 0; h2 < heatTreeSeries.length; h2++) {\n        const seriesEls = w2.dom.baseEl.querySelectorAll(\n          `.apexcharts-${w2.config.chart.type} .apexcharts-series[data\\\\:realIndex='${h2}'] rect`\n        );\n        const dArr = [];\n        for (let i2 = 0; i2 < seriesEls.length; i2++) {\n          const getAttr = (x) => {\n            return (\n              /** @type {Element} */\n              seriesEls[i2].getAttribute(x)\n            );\n          };\n          const rect = {\n            x: parseFloat((_a = getAttr(\"x\")) != null ? _a : \"0\"),\n            y: parseFloat((_b = getAttr(\"y\")) != null ? _b : \"0\"),\n            width: parseFloat((_c = getAttr(\"width\")) != null ? _c : \"0\"),\n            height: parseFloat((_d = getAttr(\"height\")) != null ? _d : \"0\")\n          };\n          dArr.push({\n            rect,\n            color: seriesEls[i2].getAttribute(\"color\")\n          });\n        }\n        w2.globals.previousPaths.push(dArr);\n      }\n    }\n  }\n  clearPreviousPaths() {\n    const w2 = this.w;\n    w2.globals.previousPaths = [];\n    w2.globals.allSeriesCollapsed = false;\n  }\n  handleNoData() {\n    const w2 = this.w;\n    const me = this;\n    const noDataOpts = w2.config.noData;\n    const graphics = new Graphics(me.w);\n    let x = w2.globals.svgWidth / 2;\n    let y = w2.globals.svgHeight / 2;\n    let textAnchor = \"middle\";\n    w2.globals.noData = true;\n    w2.globals.animationEnded = true;\n    if (noDataOpts.align === \"left\") {\n      x = 10;\n      textAnchor = \"start\";\n    } else if (noDataOpts.align === \"right\") {\n      x = w2.globals.svgWidth - 10;\n      textAnchor = \"end\";\n    }\n    if (noDataOpts.verticalAlign === \"top\") {\n      y = 50;\n    } else if (noDataOpts.verticalAlign === \"bottom\") {\n      y = w2.globals.svgHeight - 50;\n    }\n    x = x + noDataOpts.offsetX;\n    y = y + parseInt(noDataOpts.style.fontSize, 10) + 2 + noDataOpts.offsetY;\n    if (noDataOpts.text !== void 0 && noDataOpts.text !== \"\") {\n      const titleText = graphics.drawText({\n        x,\n        y,\n        text: noDataOpts.text,\n        textAnchor,\n        fontSize: noDataOpts.style.fontSize,\n        fontFamily: noDataOpts.style.fontFamily,\n        foreColor: noDataOpts.style.color,\n        opacity: 1,\n        cssClass: \"apexcharts-text-nodata\"\n      });\n      w2.dom.Paper.add(titleText);\n    }\n  }\n  // When user clicks on legends, the collapsed series is filled with [0,0,0,...,0]\n  // This is because we don't want to alter the series' length as it is used at many places\n  /**\n   * @param {any[]} series\n   */\n  setNullSeriesToZeroValues(series) {\n    const w2 = this.w;\n    for (let sl = 0; sl < series.length; sl++) {\n      if (series[sl].length === 0) {\n        for (let j = 0; j < series[w2.globals.maxValsInArrayIndex].length; j++) {\n          series[sl].push(0);\n        }\n      }\n    }\n    return series;\n  }\n  hasAllSeriesEqualX() {\n    let equalLen = true;\n    const w2 = this.w;\n    const filteredSerX = this.filteredSeriesX();\n    for (let i2 = 0; i2 < filteredSerX.length - 1; i2++) {\n      if (filteredSerX[i2][0] !== filteredSerX[i2 + 1][0]) {\n        equalLen = false;\n        break;\n      }\n    }\n    w2.globals.allSeriesHasEqualX = equalLen;\n    return equalLen;\n  }\n  filteredSeriesX() {\n    const w2 = this.w;\n    const filteredSeriesX = w2.seriesData.seriesX.map(\n      (ser) => ser.length > 0 ? ser : []\n    );\n    return filteredSeriesX;\n  }\n}\nconst TOKEN_MAP = {\n  accent: \"--apx-accent\",\n  fore: \"--apx-fore\",\n  grid: \"--apx-grid\",\n  surface: \"--apx-surface\"\n};\nconst MAX_SERIES_TOKENS = 24;\nfunction readTokens(w2) {\n  if (!Environment.isBrowser()) return {};\n  const el = w2.dom && (w2.dom.elWrap || w2.dom.baseEl) || null;\n  if (!el) return {};\n  const cs = BrowserAPIs.getComputedStyle(el);\n  if (!cs || typeof /** @type {any} */\n  cs.getPropertyValue !== \"function\") {\n    return {};\n  }\n  const read = (name2) => {\n    const v2 = (\n      /** @type {any} */\n      cs.getPropertyValue(name2)\n    );\n    return v2 ? String(v2).trim() : \"\";\n  };\n  const out = {};\n  for (const key in TOKEN_MAP) {\n    const v2 = read(\n      /** @type {any} */\n      TOKEN_MAP[key]\n    );\n    if (v2) out[key] = v2;\n  }\n  const series = [];\n  for (let i2 = 1; i2 <= MAX_SERIES_TOKENS; i2++) {\n    const v2 = read(`--apx-series-${i2}`);\n    if (!v2) break;\n    series.push(v2);\n  }\n  if (series.length) out.series = series;\n  return out;\n}\nconst THEME_KEY = \"__apexcharts_themes__\";\nif (!/** @type {any} */\nglobalThis[THEME_KEY]) {\n  globalThis[THEME_KEY] = {};\n}\nfunction getThemes() {\n  return (\n    /** @type {any} */\n    globalThis[THEME_KEY]\n  );\n}\nfunction registerTheme(name2, def) {\n  if (!name2 || typeof name2 !== \"string\") {\n    console.warn(\"ApexCharts: registerTheme requires a non-empty name.\");\n    return;\n  }\n  if (def != null && (typeof def !== \"object\" || Array.isArray(def))) {\n    console.warn(\n      `ApexCharts: registerTheme(\"${name2}\") expects an object like { mode, palette, tokens, monochrome, accessibility }.`\n    );\n    return;\n  }\n  getThemes()[name2] = def || {};\n}\nfunction getTheme(name2) {\n  if (!name2) return null;\n  return getThemes()[name2] || null;\n}\nfunction unregisterTheme(name2) {\n  if (!name2) return;\n  delete getThemes()[name2];\n}\nconst DEFAULT_FORECOLOR_LIGHT = \"#373d3f\";\nconst DEFAULT_FORECOLOR_DARK = \"#f6f7f8\";\nconst DEFAULT_AXIS_GRID = \"#e0e0e0\";\nclass Theme {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n    this.colors = [];\n    this.isColorFn = false;\n    this.isHeatmapDistributed = this.checkHeatmapDistributed();\n    this.isBarDistributed = this.checkBarDistributed();\n    this._tokens = {};\n    this._namedTheme = null;\n  }\n  checkHeatmapDistributed() {\n    const { chart, plotOptions } = this.w.config;\n    return chart.type === \"treemap\" && plotOptions.treemap && plotOptions.treemap.distributed || chart.type === \"heatmap\" && plotOptions.heatmap && plotOptions.heatmap.distributed;\n  }\n  checkBarDistributed() {\n    const { chart, plotOptions } = this.w.config;\n    return plotOptions.bar && plotOptions.bar.distributed && (chart.type === \"bar\" || chart.type === \"rangeBar\");\n  }\n  init() {\n    this.setDefaultColors();\n  }\n  setDefaultColors() {\n    var _a;\n    const w2 = this.w;\n    const utils = new Utils$1();\n    this._namedTheme = getTheme(w2.config.theme.name);\n    this._applyNamedThemeMode();\n    w2.dom.elWrap.classList.add(\n      `apexcharts-theme-${w2.config.theme.mode || \"light\"}`\n    );\n    this._applyModeDefaults();\n    this._tokens = this._resolveTokens();\n    this.applyTokenChrome(this._tokens);\n    const colorBlindMode = (_a = w2.config.theme.accessibility) == null ? void 0 : _a.colorBlindMode;\n    if (colorBlindMode) {\n      w2.globals.colors = this.getColorBlindColors(colorBlindMode);\n      this.applySeriesColors(w2.seriesData.seriesColors, w2.globals.colors);\n      const defaultColors2 = w2.globals.colors.slice();\n      this.pushExtraColors(w2.globals.colors);\n      this.applyColorTypes([\"fill\", \"stroke\"], defaultColors2);\n      this.applyDataLabelsColors(defaultColors2);\n      this.applyRadarPolygonsColors();\n      this.applyMarkersColors(defaultColors2);\n      if (colorBlindMode === \"highContrast\") {\n        w2.dom.elWrap.classList.add(\"apexcharts-high-contrast\");\n      }\n      return;\n    }\n    const configColors = [...w2.config.colors || w2.config.fill.colors || []];\n    w2.globals.colors = this.getColors(configColors);\n    this.applySeriesColors(w2.seriesData.seriesColors, w2.globals.colors);\n    if (w2.config.theme.monochrome.enabled) {\n      w2.globals.colors = this.getMonochromeColors(\n        w2.config.theme.monochrome,\n        w2.seriesData.series,\n        utils\n      );\n    }\n    const defaultColors = w2.globals.colors.slice();\n    this.pushExtraColors(w2.globals.colors);\n    this.applyColorTypes([\"fill\", \"stroke\"], defaultColors);\n    this.applyDataLabelsColors(defaultColors);\n    this.applyRadarPolygonsColors();\n    this.applyMarkersColors(defaultColors);\n  }\n  /**\n   * Facet (#13): normalize the mode's concrete defaults (foreColor + palette +\n   * tooltip theme) at render time. Only overwrites a value still at its\n   * opposite-mode default sentinel, so an explicit user value or a value\n   * already normalized by checkForDarkTheme/updateThemeOptions is untouched.\n   */\n  _applyModeDefaults() {\n    const w2 = this.w;\n    const mode = w2.config.theme.mode;\n    if (mode === \"dark\") {\n      if (w2.config.chart.foreColor === DEFAULT_FORECOLOR_LIGHT) {\n        w2.config.chart.foreColor = DEFAULT_FORECOLOR_DARK;\n      }\n      if (w2.config.theme.palette === \"palette1\") {\n        w2.config.theme.palette = \"palette4\";\n      }\n      if (w2.config.tooltip && w2.config.tooltip.theme !== \"light\") {\n        w2.config.tooltip.theme = \"dark\";\n      }\n    } else if (mode === \"light\") {\n      if (w2.config.chart.foreColor === DEFAULT_FORECOLOR_DARK) {\n        w2.config.chart.foreColor = DEFAULT_FORECOLOR_LIGHT;\n      }\n      if (w2.config.theme.palette === \"palette4\") {\n        w2.config.theme.palette = \"palette1\";\n      }\n    }\n  }\n  /**\n   * Facet (#13): apply a registered named theme's mode / accessibility /\n   * monochrome, each only when the user (or the OS watcher) has not set it, so\n   * explicit config and `follow:'os'` both win over the named theme.\n   */\n  _applyNamedThemeMode() {\n    const named = this._namedTheme;\n    if (!named) return;\n    const theme = this.w.config.theme;\n    if (named.mode && !theme.mode) {\n      theme.mode = named.mode;\n    }\n    if (named.accessibility && named.accessibility.colorBlindMode && !(theme.accessibility && theme.accessibility.colorBlindMode)) {\n      theme.accessibility = theme.accessibility || {};\n      theme.accessibility.colorBlindMode = named.accessibility.colorBlindMode;\n    }\n    if (named.monochrome && named.monochrome.enabled && !theme.monochrome.enabled) {\n      theme.monochrome = __spreadValues(__spreadValues({}, theme.monochrome), named.monochrome);\n    }\n  }\n  /**\n   * Facet (#13): the effective token set. CSS `--apx-*` tokens (when enabled)\n   * layer over the named theme's `tokens`, so a page-level token overrides a\n   * registered brand default.\n   * @returns {{accent?:string, fore?:string, grid?:string, surface?:string, series?:string[]}}\n   */\n  _resolveTokens() {\n    const named = this._namedTheme && this._namedTheme.tokens || {};\n    const css = this._shouldUseTokens() ? readTokens(this.w) : {};\n    return __spreadValues(__spreadValues({}, named), css);\n  }\n  /**\n   * Facet (#13): tokens are on unless explicitly disabled (`theme.tokens:false`).\n   * `true` is the default (the legacy `'auto'` value is accepted and means the\n   * same); `readTokens` returns only the tokens actually present, so absence\n   * is a no-op.\n   * @returns {boolean}\n   */\n  _shouldUseTokens() {\n    return this.w.config.theme.tokens !== false;\n  }\n  /**\n   * Facet (#13): overwrite chrome defaults with `--apx-*` tokens, but only where\n   * the value still equals its built-in default (so explicit config wins).\n   * @param {{fore?:string, grid?:string, surface?:string}} tokens\n   */\n  applyTokenChrome(tokens) {\n    if (!tokens) return;\n    const w2 = this.w;\n    if (tokens.fore && (w2.config.chart.foreColor === DEFAULT_FORECOLOR_LIGHT || w2.config.chart.foreColor === DEFAULT_FORECOLOR_DARK)) {\n      w2.config.chart.foreColor = tokens.fore;\n    }\n    if (tokens.grid) {\n      if (w2.config.grid.borderColor === DEFAULT_AXIS_GRID) {\n        w2.config.grid.borderColor = tokens.grid;\n      }\n      const applyAxis = (axis) => {\n        if (!axis) return;\n        if (axis.axisBorder && axis.axisBorder.color === DEFAULT_AXIS_GRID) {\n          axis.axisBorder.color = tokens.grid;\n        }\n        if (axis.axisTicks && axis.axisTicks.color === DEFAULT_AXIS_GRID) {\n          axis.axisTicks.color = tokens.grid;\n        }\n      };\n      applyAxis(w2.config.xaxis);\n      if (Array.isArray(w2.config.yaxis)) {\n        w2.config.yaxis.forEach(applyAxis);\n      } else {\n        applyAxis(w2.config.yaxis);\n      }\n    }\n    const appliedSurface = w2.globals.tokenSurface;\n    const currentBg = w2.config.chart.background;\n    const isOurs = !currentBg || currentBg === appliedSurface;\n    if (tokens.surface) {\n      if (isOurs) {\n        w2.config.chart.background = tokens.surface;\n        w2.globals.tokenSurface = tokens.surface;\n        const paperNode = w2.dom.Paper && w2.dom.Paper.node;\n        if (paperNode && paperNode.style) {\n          paperNode.style.background = tokens.surface;\n        }\n      }\n    } else if (appliedSurface && currentBg === appliedSurface) {\n      w2.config.chart.background = \"\";\n      w2.globals.tokenSurface = void 0;\n      const paperNode = w2.dom.Paper && w2.dom.Paper.node;\n      if (paperNode && paperNode.style) {\n        paperNode.style.background = \"\";\n      }\n    }\n  }\n  /**\n   * @param {any[]} configColors\n   */\n  getColors(configColors) {\n    const w2 = this.w;\n    if (!configColors || configColors.length === 0) {\n      return this.predefined();\n    }\n    if (Array.isArray(configColors) && configColors.length > 0 && typeof configColors[0] === \"function\") {\n      this.isColorFn = true;\n      return w2.config.series.map((s2, i2) => {\n        const c2 = configColors[i2] || configColors[0];\n        return typeof c2 === \"function\" ? c2({\n          value: w2.globals.axisCharts ? w2.seriesData.series[i2][0] || 0 : w2.seriesData.series[i2],\n          seriesIndex: i2,\n          dataPointIndex: i2,\n          w: this.w\n        }) : c2;\n      });\n    }\n    return configColors;\n  }\n  /**\n   * @param {any[]} seriesColors\n   * @param {any[]} globalsColors\n   */\n  applySeriesColors(seriesColors, globalsColors) {\n    seriesColors.forEach((c2, i2) => {\n      if (c2) {\n        globalsColors[i2] = c2;\n      }\n    });\n  }\n  /**\n   * @param {Record<string, any>} monochrome\n   * @param {any[]} series\n   * @param {any} utils\n   */\n  getMonochromeColors(monochrome, series, utils) {\n    const { color, shadeIntensity, shadeTo } = monochrome;\n    const glsCnt = this.isBarDistributed || this.isHeatmapDistributed ? series[0].length * series.length : series.length;\n    const part = 1 / (glsCnt / shadeIntensity);\n    let percent = 0;\n    return Array.from({ length: glsCnt }, () => {\n      const newColor = shadeTo === \"dark\" ? utils.shadeColor(percent * -1, color) : utils.shadeColor(percent, color);\n      percent += part;\n      return newColor;\n    });\n  }\n  /**\n   * @param {string[]} colorTypes\n   * @param {string[]} defaultColors\n   */\n  applyColorTypes(colorTypes, defaultColors) {\n    const w2 = this.w;\n    colorTypes.forEach((c2) => {\n      w2.globals[c2].colors = w2.config[c2].colors === void 0 ? this.isColorFn ? w2.config.colors : defaultColors : w2.config[c2].colors.slice();\n      this.pushExtraColors(\n        /** @type {Record<string,any>} */\n        w2.globals[c2].colors\n      );\n    });\n  }\n  /**\n   * @param {string[]} defaultColors\n   */\n  applyDataLabelsColors(defaultColors) {\n    const w2 = this.w;\n    w2.globals.dataLabels.style.colors = w2.config.dataLabels.style.colors === void 0 ? defaultColors : w2.config.dataLabels.style.colors.slice();\n    this.pushExtraColors(w2.globals.dataLabels.style.colors, 50);\n  }\n  applyRadarPolygonsColors() {\n    const w2 = this.w;\n    w2.globals.radarPolygons.fill.colors = w2.config.plotOptions.radar.polygons.fill.colors === void 0 ? [w2.config.theme.mode === \"dark\" ? \"#343A3F\" : \"none\"] : w2.config.plotOptions.radar.polygons.fill.colors.slice();\n    this.pushExtraColors(w2.globals.radarPolygons.fill.colors, 20);\n  }\n  /**\n   * @param {string[]} defaultColors\n   */\n  applyMarkersColors(defaultColors) {\n    const w2 = this.w;\n    w2.globals.markers.colors = w2.config.markers.colors === void 0 ? defaultColors : w2.config.markers.colors.slice();\n    this.pushExtraColors(w2.globals.markers.colors);\n  }\n  /**\n   * @param {any} colorSeries\n   * @param {number} [length]\n   * @param {boolean | null} [distributed]\n   */\n  pushExtraColors(colorSeries, length, distributed = null) {\n    const w2 = this.w;\n    let len = length || w2.seriesData.series.length;\n    if (distributed === null) {\n      distributed = this.isBarDistributed || this.isHeatmapDistributed || w2.config.chart.type === \"heatmap\" && w2.config.plotOptions.heatmap && w2.config.plotOptions.heatmap.colorScale.inverse;\n    }\n    if (distributed && w2.seriesData.series.length) {\n      len = w2.seriesData.series[w2.globals.maxValsInArrayIndex].length * w2.seriesData.series.length;\n    }\n    if (colorSeries.length < len) {\n      const diff = len - colorSeries.length;\n      for (let i2 = 0; i2 < diff; i2++) {\n        colorSeries.push(colorSeries[i2]);\n      }\n    }\n  }\n  /**\n   * @param {'light' | 'dark'} mode\n   */\n  getColorBlindColors(mode) {\n    const palettes = getThemePalettes();\n    const map = {\n      deuteranopia: palettes.cvdDeuteranopia,\n      protanopia: palettes.cvdProtanopia,\n      tritanopia: palettes.cvdTritanopia,\n      highContrast: palettes.highContrast\n    };\n    return (\n      /** @type {Record<string,any>} */\n      /** @type {any} */\n      (map[mode] || palettes.palette1).slice()\n    );\n  }\n  /**\n   * @param {Record<string, any>} options\n   */\n  updateThemeOptions(options2) {\n    options2.chart = options2.chart || {};\n    options2.tooltip = options2.tooltip || {};\n    const mode = options2.theme.mode;\n    const palette = mode === \"dark\" ? \"palette4\" : mode === \"light\" ? \"palette1\" : options2.theme.palette || \"palette1\";\n    const foreColor = mode === \"dark\" ? \"#f6f7f8\" : mode === \"light\" ? \"#373d3f\" : options2.chart.foreColor || \"#373d3f\";\n    options2.tooltip.theme = mode || \"light\";\n    options2.chart.foreColor = foreColor;\n    options2.theme.palette = palette;\n    return options2;\n  }\n  predefined() {\n    const palette = this.w.config.theme.palette;\n    const palettes = getThemePalettes();\n    const builtin = (\n      /** @type {Record<string,any>} */\n      palettes[palette] || palettes.palette1\n    );\n    const tokens = this._tokens || {};\n    if (Array.isArray(tokens.series) && tokens.series.length) {\n      return tokens.series.slice();\n    }\n    if (tokens.accent) {\n      return [tokens.accent, ...builtin];\n    }\n    const named = this._namedTheme;\n    if (named && Array.isArray(named.palette) && named.palette.length) {\n      return named.palette.slice();\n    }\n    return builtin;\n  }\n}\nclass TitleSubtitle {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n  }\n  draw() {\n    this.drawTitleSubtitle(\"title\");\n    this.drawTitleSubtitle(\"subtitle\");\n  }\n  /**\n   * @param {'title' | 'subtitle'} type\n   */\n  drawTitleSubtitle(type) {\n    const w2 = this.w;\n    const tsConfig = type === \"title\" ? w2.config.title : w2.config.subtitle;\n    let x = w2.globals.svgWidth / 2;\n    let y = tsConfig.offsetY;\n    let textAnchor = \"middle\";\n    if (tsConfig.align === \"left\") {\n      x = 10;\n      textAnchor = \"start\";\n    } else if (tsConfig.align === \"right\") {\n      x = w2.globals.svgWidth - 10;\n      textAnchor = \"end\";\n    }\n    x = x + tsConfig.offsetX;\n    y = y + parseInt(tsConfig.style.fontSize, 10) + tsConfig.margin / 2;\n    if (tsConfig.text !== void 0) {\n      const graphics = new Graphics(this.w);\n      const titleText = graphics.drawText({\n        x,\n        y,\n        text: tsConfig.text,\n        textAnchor,\n        fontSize: tsConfig.style.fontSize,\n        fontFamily: tsConfig.style.fontFamily,\n        fontWeight: tsConfig.style.fontWeight,\n        foreColor: tsConfig.style.color,\n        opacity: 1\n      });\n      titleText.node.setAttribute(\"class\", `apexcharts-${type}-text`);\n      w2.dom.Paper.add(titleText);\n    }\n  }\n}\nlet Helpers$4 = class Helpers {\n  /**\n   * @param {import('./Dimensions').default} dCtx\n   */\n  constructor(dCtx) {\n    this.w = dCtx.w;\n    this.dCtx = dCtx;\n  }\n  /**\n   * Get Chart Title/Subtitle Dimensions\n   * @memberof Dimensions\n   * @return {{width: number, height: number}}\n   * @param {string} type\n   **/\n  getTitleSubtitleCoords(type) {\n    const w2 = this.w;\n    let width = 0;\n    let height = 0;\n    const floating = type === \"title\" ? w2.config.title.floating : w2.config.subtitle.floating;\n    const el = w2.dom.baseEl.querySelector(`.apexcharts-${type}-text`);\n    if (el !== null && !floating) {\n      const coord = el.getBoundingClientRect();\n      width = coord.width;\n      height = w2.globals.axisCharts ? coord.height + 5 : coord.height;\n    }\n    return {\n      width,\n      height\n    };\n  }\n  getLegendsRect() {\n    const w2 = this.w;\n    const elLegendWrap = w2.dom.elLegendWrap;\n    if (!w2.config.legend.height && (w2.config.legend.position === \"top\" || w2.config.legend.position === \"bottom\")) {\n      if (elLegendWrap)\n        elLegendWrap.style.maxHeight = w2.globals.svgHeight / 2 + \"px\";\n    }\n    const lgRect = (\n      /** @type {any} */\n      Object.assign({}, Utils$1.getBoundingClientRect(elLegendWrap))\n    );\n    if (elLegendWrap !== null && !w2.config.legend.floating && w2.config.legend.show) {\n      this.dCtx.lgRect = {\n        x: lgRect.x,\n        y: lgRect.y,\n        height: lgRect.height,\n        width: lgRect.height === 0 ? 0 : lgRect.width\n      };\n    } else {\n      this.dCtx.lgRect = {\n        x: 0,\n        y: 0,\n        height: 0,\n        width: 0\n      };\n    }\n    if (w2.config.legend.position === \"left\" || w2.config.legend.position === \"right\") {\n      if (this.dCtx.lgRect.width * 1.5 > w2.globals.svgWidth) {\n        this.dCtx.lgRect.width = w2.globals.svgWidth / 1.5;\n      }\n    }\n    return this.dCtx.lgRect;\n  }\n  /**\n   * Get Y Axis Dimensions\n   * @memberof Dimensions\n   * @return {{width: number, height: number}}\n   **/\n  getDatalabelsRect() {\n    const w2 = this.w;\n    const allLabels = [];\n    w2.config.series.forEach(\n      (serie, seriesIndex) => {\n        serie.data.forEach(\n          (datum, dataPointIndex) => {\n            const getText = (v2) => {\n              return w2.config.dataLabels.formatter(v2, {\n                seriesIndex,\n                dataPointIndex,\n                w: w2\n              });\n            };\n            const labelText = getText(\n              w2.seriesData.series[seriesIndex][dataPointIndex]\n            );\n            allLabels.push(labelText);\n          }\n        );\n      }\n    );\n    const val = Utils$1.getLargestStringFromArr(allLabels);\n    const graphics = new Graphics(this.w);\n    const dataLabelsStyle = w2.config.dataLabels.style;\n    const labelrect = graphics.getTextRects(\n      val,\n      parseInt(dataLabelsStyle.fontSize).toString(),\n      dataLabelsStyle.fontFamily\n    );\n    return {\n      width: labelrect.width * 1.05,\n      height: labelrect.height\n    };\n  }\n  /**\n   * @param {any} val\n   * @param {any[]} arr\n   */\n  getLargestStringFromMultiArr(val, arr) {\n    const w2 = this.w;\n    let valArr = val;\n    if (w2.axisFlags.isMultiLineX) {\n      const maxArrs = arr.map((xl) => {\n        return Array.isArray(xl) ? xl.length : 1;\n      });\n      const maxArrLen = Math.max(...maxArrs);\n      const maxArrIndex = maxArrs.indexOf(maxArrLen);\n      valArr = arr[maxArrIndex];\n    }\n    return valArr;\n  }\n  /**\n   * Vertical space a sparkline has to keep free inside its SVG so the series\n   * stroke isn't clipped at the top / bottom edge.\n   *\n   * A stroke is centred on its path, so half of it hangs outside the plot\n   * wherever the path runs along an edge. Reserving that half unconditionally\n   * lifts the whole plot away from the SVG edges even when nothing is drawn\n   * there, which shows up as a strip of empty space under an area fill or a\n   * bar base (#5137). So reserve only what the ink can't absorb itself: where\n   * the stroke traces the data points, the distance between the extreme datum\n   * and the axis extreme already swallows part or all of the overhang. Fills\n   * need nothing: area fills are drawn unstroked (see Line.js renderPaths).\n   *\n   * @returns {{ top: number, bottom: number }}\n   **/\n  getSparklineStrokeInset() {\n    const w2 = this.w;\n    const maxStrokeWidth = Array.isArray(w2.config.stroke.width) ? Math.max(...w2.config.stroke.width) : w2.config.stroke.width;\n    const half = maxStrokeWidth / 2;\n    if (!w2.config.stroke.show || !(half > 0)) {\n      return { top: 0, bottom: 0 };\n    }\n    const yRange = w2.globals.maxY - w2.globals.minY;\n    const extremes = this._getSeriesYExtremes();\n    if (!this._strokeTracesDataPoints() || !(yRange > 0) || !extremes) {\n      return { top: half, bottom: half };\n    }\n    const plotHeight = Math.max(w2.globals.svgHeight - maxStrokeWidth, 0);\n    const roomAbove = plotHeight * (w2.globals.maxY - extremes.max) / yRange;\n    const roomBelow = plotHeight * (extremes.min - w2.globals.minY) / yRange;\n    return {\n      top: Math.min(Math.max(half - roomAbove, 0), half),\n      bottom: Math.min(Math.max(half - roomBelow, 0), half)\n    };\n  }\n  /**\n   * Whether every drawn series is one whose stroke follows the data points, so\n   * the extreme datum marks the outermost ink. False for anything that strokes\n   * to the baseline or fills the plot (bar, heatmap, ...) and for stacked\n   * charts, where the ink is the cumulative total rather than the raw values.\n   * @returns {boolean}\n   **/\n  _strokeTracesDataPoints() {\n    const w2 = this.w;\n    if (!w2.globals.axisCharts || w2.config.chart.stacked) return false;\n    const tracesPoints = [\"line\", \"area\", \"scatter\"];\n    return (\n      /** @type {any[]} */\n      w2.config.series.every(\n        (s2) => tracesPoints.includes(s2.type || w2.config.chart.type)\n      )\n    );\n  }\n  /**\n   * Min / max across every plotted y value, or null when nothing is plottable.\n   * @returns {{ min: number, max: number } | null}\n   **/\n  _getSeriesYExtremes() {\n    let min = Infinity;\n    let max = -Infinity;\n    this.w.seriesData.series.forEach((data) => {\n      if (!Array.isArray(data)) return;\n      data.forEach((val) => {\n        if (!Number.isFinite(val)) return;\n        if (val < min) min = val;\n        if (val > max) max = val;\n      });\n    });\n    return min === Infinity ? null : { min, max };\n  }\n};\nclass DimXAxis {\n  /**\n   * @param {import('./Dimensions').default} dCtx\n   */\n  constructor(dCtx) {\n    this.w = dCtx.w;\n    this.dCtx = dCtx;\n  }\n  /**\n   * Get X Axis Dimensions\n   * @memberof Dimensions\n   * @return {{width: number, height: number}}\n   **/\n  getxAxisLabelsCoords() {\n    const w2 = this.w;\n    let xaxisLabels = w2.labelData.labels.slice();\n    if (w2.config.xaxis.convertedCatToNumeric && xaxisLabels.length === 0) {\n      xaxisLabels = w2.labelData.categoryLabels;\n    }\n    let rect;\n    if (w2.labelData.timescaleLabels.length > 0) {\n      const coords = this.getxAxisTimeScaleLabelsCoords();\n      rect = {\n        width: coords.width,\n        height: coords.height\n      };\n      w2.layout.rotateXLabels = false;\n    } else {\n      this.dCtx.lgWidthForSideLegends = (w2.config.legend.position === \"left\" || w2.config.legend.position === \"right\") && !w2.config.legend.floating ? this.dCtx.lgRect.width : 0;\n      const xlbFormatter = w2.formatters.xLabelFormatter;\n      let val = Utils$1.getLargestStringFromArr(xaxisLabels);\n      let valArr = this.dCtx.dimHelpers.getLargestStringFromMultiArr(\n        val,\n        xaxisLabels\n      );\n      if (w2.globals.isBarHorizontal) {\n        val = w2.globals.yAxisScale[0].result.reduce(\n          (a2, b2) => a2.length > b2.length ? a2 : b2,\n          0\n        );\n        valArr = val;\n      }\n      const xFormat = new Formatters(this.w);\n      const timestamp = val;\n      val = xFormat.xLabelFormat(\n        /** @type {Function} */\n        xlbFormatter,\n        val,\n        timestamp,\n        {\n          i: void 0,\n          dateFormatter: new DateTime(this.w).formatDate,\n          w: w2\n        }\n      );\n      valArr = xFormat.xLabelFormat(\n        /** @type {Function} */\n        xlbFormatter,\n        valArr,\n        timestamp,\n        {\n          i: void 0,\n          dateFormatter: new DateTime(this.w).formatDate,\n          w: w2\n        }\n      );\n      if (w2.config.xaxis.convertedCatToNumeric && typeof val === \"undefined\" || String(val).trim() === \"\") {\n        val = \"1\";\n        valArr = val;\n      }\n      const graphics = new Graphics(this.w);\n      let xLabelrect = graphics.getTextRects(\n        val,\n        w2.config.xaxis.labels.style.fontSize\n      );\n      let xArrLabelrect = xLabelrect;\n      if (val !== valArr) {\n        xArrLabelrect = graphics.getTextRects(\n          valArr,\n          w2.config.xaxis.labels.style.fontSize\n        );\n      }\n      rect = {\n        width: xLabelrect.width >= xArrLabelrect.width ? xLabelrect.width : xArrLabelrect.width,\n        height: xLabelrect.height >= xArrLabelrect.height ? xLabelrect.height : xArrLabelrect.height\n      };\n      if (rect.width * xaxisLabels.length > w2.globals.svgWidth - this.dCtx.lgWidthForSideLegends - this.dCtx.yAxisWidth - this.dCtx.gridPad.left - this.dCtx.gridPad.right && w2.config.xaxis.labels.rotate !== 0 || w2.config.xaxis.labels.rotateAlways) {\n        if (!w2.globals.isBarHorizontal) {\n          w2.layout.rotateXLabels = true;\n          const getRotatedTextRects = (text) => {\n            return graphics.getTextRects(\n              text,\n              w2.config.xaxis.labels.style.fontSize,\n              w2.config.xaxis.labels.style.fontFamily,\n              `rotate(${w2.config.xaxis.labels.rotate} 0 0)`,\n              false\n            );\n          };\n          xLabelrect = getRotatedTextRects(val);\n          if (val !== valArr) {\n            xArrLabelrect = getRotatedTextRects(valArr);\n          }\n          rect.height = (xLabelrect.height > xArrLabelrect.height ? xLabelrect.height : xArrLabelrect.height) / 1.5;\n          rect.width = xLabelrect.width > xArrLabelrect.width ? xLabelrect.width : xArrLabelrect.width;\n        }\n      } else {\n        w2.layout.rotateXLabels = false;\n      }\n    }\n    if (!w2.config.xaxis.labels.show) {\n      rect = {\n        width: 0,\n        height: 0\n      };\n    }\n    return {\n      width: rect.width,\n      height: rect.height\n    };\n  }\n  /**\n   * Get X Axis Label Group height\n   * @memberof Dimensions\n   * @return {{width: number, height: number}}\n   */\n  getxAxisGroupLabelsCoords() {\n    var _a;\n    const w2 = this.w;\n    if (!w2.labelData.hasXaxisGroups) {\n      return { width: 0, height: 0 };\n    }\n    const fontSize = ((_a = w2.config.xaxis.group.style) == null ? void 0 : _a.fontSize) || w2.config.xaxis.labels.style.fontSize;\n    const xaxisLabels = w2.labelData.groups.map(\n      (g2) => g2.title\n    );\n    let rect;\n    const val = Utils$1.getLargestStringFromArr(xaxisLabels);\n    const valArr = this.dCtx.dimHelpers.getLargestStringFromMultiArr(\n      val,\n      xaxisLabels\n    );\n    const graphics = new Graphics(this.w);\n    const xLabelrect = graphics.getTextRects(val, fontSize);\n    let xArrLabelrect = xLabelrect;\n    if (val !== valArr) {\n      xArrLabelrect = graphics.getTextRects(valArr, fontSize);\n    }\n    rect = {\n      width: xLabelrect.width >= xArrLabelrect.width ? xLabelrect.width : xArrLabelrect.width,\n      height: xLabelrect.height >= xArrLabelrect.height ? xLabelrect.height : xArrLabelrect.height\n    };\n    if (!w2.config.xaxis.labels.show) {\n      rect = {\n        width: 0,\n        height: 0\n      };\n    }\n    return {\n      width: rect.width,\n      height: rect.height\n    };\n  }\n  /**\n   * Get X Axis Title Dimensions\n   * @memberof Dimensions\n   * @return {{width: number, height: number}}\n   **/\n  getxAxisTitleCoords() {\n    const w2 = this.w;\n    let width = 0;\n    let height = 0;\n    if (w2.config.xaxis.title.text !== void 0) {\n      const graphics = new Graphics(this.w);\n      const rect = graphics.getTextRects(\n        w2.config.xaxis.title.text,\n        w2.config.xaxis.title.style.fontSize\n      );\n      width = rect.width;\n      height = rect.height;\n    }\n    return {\n      width,\n      height\n    };\n  }\n  getxAxisTimeScaleLabelsCoords() {\n    const w2 = this.w;\n    this.dCtx.timescaleLabels = w2.labelData.timescaleLabels.slice();\n    const labels = this.dCtx.timescaleLabels.map(\n      (label) => label.value\n    );\n    const val = labels.reduce((a2, b2) => {\n      if (typeof a2 === \"undefined\") {\n        console.error(\n          \"You have possibly supplied invalid Date format. Please supply a valid JavaScript Date\"\n        );\n        return 0;\n      } else {\n        return a2.length > b2.length ? a2 : b2;\n      }\n    }, 0);\n    const graphics = new Graphics(this.w);\n    const rect = graphics.getTextRects(\n      val,\n      w2.config.xaxis.labels.style.fontSize\n    );\n    const totalWidthRotated = rect.width * 1.05 * labels.length;\n    if (totalWidthRotated > w2.layout.gridWidth && w2.config.xaxis.labels.rotate !== 0) {\n      w2.globals.overlappingXLabels = true;\n    }\n    return rect;\n  }\n  // In certain cases, the last labels gets cropped in xaxis.\n  // Hence, we add some additional padding based on the label length to avoid the last label being cropped or we don't draw it at all\n  /**\n   * @param {Record<string, any>} xaxisLabelCoords\n   */\n  additionalPaddingXLabels(xaxisLabelCoords) {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const cnf = w2.config;\n    const xtype = cnf.xaxis.type;\n    const lbWidth = xaxisLabelCoords.width;\n    gl.skipLastTimelinelabel = false;\n    gl.skipFirstTimelinelabel = false;\n    const isBarOpposite = w2.config.yaxis[0].opposite && w2.globals.isBarHorizontal;\n    const isCollapsed = (i2) => gl.collapsedSeriesIndices.indexOf(i2) !== -1;\n    const rightPad = (yaxe) => {\n      if (this.dCtx.timescaleLabels && this.dCtx.timescaleLabels.length) {\n        const firstimescaleLabel = this.dCtx.timescaleLabels[0];\n        const lastTimescaleLabel = this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length - 1];\n        const lastLabelPosition = lastTimescaleLabel.position + lbWidth / 1.75 - this.dCtx.yAxisWidthRight;\n        const firstLabelPosition = firstimescaleLabel.position - lbWidth / 1.75 + this.dCtx.yAxisWidthLeft;\n        const lgRightRectWidth = w2.config.legend.position === \"right\" && this.dCtx.lgRect.width > 0 ? this.dCtx.lgRect.width : 0;\n        if (lastLabelPosition > gl.svgWidth - w2.layout.translateX - lgRightRectWidth) {\n          gl.skipLastTimelinelabel = true;\n        }\n        if (firstLabelPosition < -((!yaxe.show || yaxe.floating) && (cnf.chart.type === \"bar\" || cnf.chart.type === \"candlestick\" || cnf.chart.type === \"rangeBar\" || cnf.chart.type === \"boxPlot\" || cnf.chart.type === \"violin\") ? lbWidth / 1.75 : 10)) {\n          gl.skipFirstTimelinelabel = true;\n        }\n      } else if (xtype === \"datetime\") {\n        if (this.dCtx.gridPad.right < lbWidth && !w2.layout.rotateXLabels) {\n          gl.skipLastTimelinelabel = true;\n        }\n      } else if (xtype !== \"datetime\") {\n        if (this.dCtx.gridPad.right < lbWidth / 2 - this.dCtx.yAxisWidthRight && !w2.layout.rotateXLabels && !w2.config.xaxis.labels.trim) {\n          this.dCtx.xPadRight = lbWidth / 2 + 1;\n        }\n      }\n    };\n    const padYAxe = (yaxe, i2) => {\n      if (cnf.yaxis.length > 1 && isCollapsed(i2)) return;\n      rightPad(yaxe);\n    };\n    cnf.yaxis.forEach((yaxe, i2) => {\n      if (isBarOpposite) {\n        if (this.dCtx.gridPad.left < lbWidth) {\n          this.dCtx.xPadLeft = lbWidth / 2 + 1;\n        }\n        this.dCtx.xPadRight = lbWidth / 2 + 1;\n      } else {\n        padYAxe(yaxe, i2);\n      }\n    });\n  }\n}\nclass DimYAxis {\n  /**\n   * @param {import('./Dimensions').default} dCtx\n   */\n  constructor(dCtx) {\n    this.w = dCtx.w;\n    this.dCtx = dCtx;\n  }\n  /**\n   * Get Y Axis Dimensions\n   * @memberof Dimensions\n   * @returns {Array<{width: number, height: number}>}\n   **/\n  getyAxisLabelsCoords() {\n    const w2 = this.w;\n    const width = 0;\n    const height = 0;\n    const ret = [];\n    let labelPad = 10;\n    const axesUtils = new AxesUtils(this.w, { theme: this.dCtx.theme, timeScale: this.dCtx.timeScale });\n    w2.config.yaxis.map((yaxe, index) => {\n      const formatterArgs = {\n        seriesIndex: index,\n        dataPointIndex: -1,\n        w: w2\n      };\n      const yS = w2.globals.yAxisScale[index];\n      let yAxisMinWidth = 0;\n      if (!axesUtils.isYAxisHidden(index) && yaxe.labels.show && yaxe.labels.minWidth !== void 0)\n        yAxisMinWidth = yaxe.labels.minWidth;\n      if (!axesUtils.isYAxisHidden(index) && yaxe.labels.show && yS.result.length) {\n        const lbFormatter = w2.formatters.yLabelFormatters[index];\n        const minV = yS.niceMin === Number.MIN_VALUE ? 0 : yS.niceMin;\n        let val = yS.result.reduce((acc, curr) => {\n          var _a, _b;\n          return ((_a = String(lbFormatter(acc, formatterArgs))) == null ? void 0 : _a.length) > ((_b = String(lbFormatter(curr, formatterArgs))) == null ? void 0 : _b.length) ? acc : curr;\n        }, minV);\n        val = lbFormatter(val, formatterArgs);\n        let valArr = val;\n        if (typeof val === \"undefined\" || val.length === 0) {\n          val = yS.niceMax;\n        }\n        if (String(val).length === 1) {\n          val = val + \".0\";\n          valArr = val;\n        }\n        if (w2.globals.isBarHorizontal) {\n          labelPad = 0;\n          const barYaxisLabels = w2.labelData.labels.slice();\n          val = Utils$1.getLargestStringFromArr(barYaxisLabels);\n          val = lbFormatter(val, { seriesIndex: index, dataPointIndex: -1, w: w2 });\n          valArr = this.dCtx.dimHelpers.getLargestStringFromMultiArr(\n            val,\n            barYaxisLabels\n          );\n        }\n        const graphics = new Graphics(this.w);\n        const rotateStr = \"rotate(\".concat(yaxe.labels.rotate, \" 0 0)\");\n        const rect = graphics.getTextRects(\n          val,\n          yaxe.labels.style.fontSize,\n          yaxe.labels.style.fontFamily,\n          rotateStr,\n          false\n        );\n        let arrLabelrect = rect;\n        if (val !== valArr) {\n          arrLabelrect = graphics.getTextRects(\n            valArr,\n            yaxe.labels.style.fontSize,\n            yaxe.labels.style.fontFamily,\n            rotateStr,\n            false\n          );\n        }\n        ret.push({\n          width: (yAxisMinWidth > arrLabelrect.width || yAxisMinWidth > rect.width ? yAxisMinWidth : arrLabelrect.width > rect.width ? arrLabelrect.width : rect.width) + labelPad,\n          height: arrLabelrect.height > rect.height ? arrLabelrect.height : rect.height\n        });\n      } else {\n        ret.push({\n          width,\n          height\n        });\n      }\n    });\n    return ret;\n  }\n  /**\n   * Get Y Axis Dimensions\n   * @memberof Dimensions\n   * @returns {Array<{width: number, height: number}>}\n   **/\n  getyAxisTitleCoords() {\n    const w2 = this.w;\n    const ret = [];\n    w2.config.yaxis.map((yaxe) => {\n      if (yaxe.show && yaxe.title.text !== void 0) {\n        const graphics = new Graphics(this.w);\n        const rotateStr = \"rotate(\".concat(yaxe.title.rotate, \" 0 0)\");\n        const rect = graphics.getTextRects(\n          yaxe.title.text,\n          yaxe.title.style.fontSize,\n          yaxe.title.style.fontFamily,\n          rotateStr,\n          false\n        );\n        ret.push({\n          width: rect.width,\n          height: rect.height\n        });\n      } else {\n        ret.push({\n          width: 0,\n          height: 0\n        });\n      }\n    });\n    return ret;\n  }\n  getTotalYAxisWidth() {\n    const w2 = this.w;\n    let yAxisWidth = 0;\n    let yAxisWidthLeft = 0;\n    let yAxisWidthRight = 0;\n    const padding = w2.globals.yAxisScale.length > 1 ? 10 : 0;\n    const axesUtils = new AxesUtils(this.w, { theme: this.dCtx.theme, timeScale: this.dCtx.timeScale });\n    const isHiddenYAxis = function(index) {\n      return w2.globals.ignoreYAxisIndexes.indexOf(index) > -1;\n    };\n    const padForLabelTitle = (coord, index) => {\n      const floating = w2.config.yaxis[index].floating;\n      let width = 0;\n      if (coord.width > 0 && !floating) {\n        width = coord.width + padding;\n        if (isHiddenYAxis(index)) {\n          width = width - coord.width - padding;\n        }\n      } else {\n        width = floating || axesUtils.isYAxisHidden(index) ? 0 : 5;\n      }\n      w2.config.yaxis[index].opposite ? yAxisWidthRight = yAxisWidthRight + width : yAxisWidthLeft = yAxisWidthLeft + width;\n      yAxisWidth = yAxisWidth + width;\n    };\n    w2.layout.yLabelsCoords.map((yLabelCoord, index) => {\n      padForLabelTitle(yLabelCoord, index);\n    });\n    w2.layout.yTitleCoords.map((yTitleCoord, index) => {\n      padForLabelTitle(yTitleCoord, index);\n    });\n    if (w2.globals.isBarHorizontal && !w2.config.yaxis[0].floating) {\n      yAxisWidth = w2.layout.yLabelsCoords[0].width + w2.layout.yTitleCoords[0].width + 15;\n    }\n    this.dCtx.yAxisWidthLeft = yAxisWidthLeft;\n    this.dCtx.yAxisWidthRight = yAxisWidthRight;\n    return yAxisWidth;\n  }\n}\nclass DimGrid {\n  /**\n   * @param {import('./Dimensions').default} dCtx\n   */\n  constructor(dCtx) {\n    this.w = dCtx.w;\n    this.dCtx = dCtx;\n  }\n  /**\n   * @param {number} gridWidth\n   */\n  gridPadForColumnsInNumericAxis(gridWidth) {\n    const { w: w2 } = this;\n    const { config: cnf, globals: gl } = w2;\n    if (gl.noData || gl.collapsedSeries.length + gl.ancillaryCollapsedSeries.length === cnf.series.length) {\n      return 0;\n    }\n    const hasBar = (type2) => [\"bar\", \"rangeBar\", \"candlestick\", \"boxPlot\", \"violin\"].includes(type2);\n    const type = cnf.chart.type;\n    let barWidth = 0;\n    let seriesLen = hasBar(type) ? cnf.series.length : 1;\n    if (gl.comboBarCount > 0) {\n      seriesLen = gl.comboBarCount;\n    }\n    gl.collapsedSeries.forEach((c2) => {\n      if (hasBar(c2.type)) {\n        seriesLen -= 1;\n      }\n    });\n    if (cnf.chart.stacked) {\n      seriesLen = 1;\n    }\n    const barsPresent = hasBar(type) || gl.comboBarCount > 0;\n    let xRange = Math.abs(gl.initialMaxX - gl.initialMinX);\n    if (barsPresent && w2.axisFlags.isXNumeric && !gl.isBarHorizontal && seriesLen > 0 && xRange !== 0) {\n      if (xRange <= 3) {\n        xRange = gl.dataPoints;\n      }\n      const xRatio = xRange / gridWidth;\n      let xDivision = gl.minXDiff && gl.minXDiff / xRatio > 0 ? gl.minXDiff / xRatio : 0;\n      if (xDivision > gridWidth / 2) {\n        xDivision /= 2;\n      }\n      barWidth = xDivision * parseInt(cnf.plotOptions.bar.columnWidth, 10) / 100;\n      if (barWidth < 1) {\n        barWidth = 1;\n      }\n      gl.barPadForNumericAxis = barWidth;\n    }\n    return barWidth;\n  }\n  /**\n   * Reserve room to the right of the plot for stacked *total* dataLabels on a\n   * 100% horizontal bar chart.\n   *\n   * The total label is placed just past the end of the stack. Under\n   * `stackType: '100%'` every stack ends at the axis maximum, i.e. exactly at\n   * the right edge of the plot, so the label was drawn outside the grid and\n   * clipped by the SVG viewport. See #3579.\n   *\n   * Scoped to the 100% case on purpose: with ordinary stacking the axis\n   * maximum is a rounded \"nice\" number that normally sits beyond the longest\n   * stack, so there is already room and padding every such chart would move\n   * layouts that render correctly today.\n   *\n   * Raises `xPadRight`, which narrows `gridWidth` without translating the plot\n   * origin, so the y-axis and its labels stay put and only the bars get\n   * shorter.\n   */\n  gridPadForStackedTotalDataLabels() {\n    const { w: w2 } = this;\n    const totalConfig = w2.config.plotOptions.bar.dataLabels.total;\n    if (!w2.globals.isBarHorizontal || !w2.config.chart.stacked || w2.config.chart.stackType !== \"100%\" || !totalConfig.enabled) {\n      return;\n    }\n    const totals = w2.seriesData.stackedSeriesTotals || [];\n    if (!totals.length) return;\n    const formatter = totalConfig.formatter || w2.config.dataLabels.formatter;\n    const labels = totals.map(\n      (val, j) => String(\n        formatter ? formatter(val, __spreadProps(__spreadValues({}, w2), { seriesIndex: 0, dataPointIndex: j, w: w2 })) : val\n      )\n    );\n    const graphics = new Graphics(w2);\n    const rect = graphics.getTextRects(\n      Utils$1.getLargestStringFromArr(labels),\n      parseFloat(totalConfig.style.fontSize).toString(),\n      totalConfig.style.fontFamily\n    );\n    const needed = rect.width + Math.abs(totalConfig.offsetX || 0) + 2;\n    this.dCtx.xPadRight = Math.max(this.dCtx.xPadRight, needed);\n  }\n  gridPadFortitleSubtitle() {\n    const { w: w2 } = this;\n    const { globals: gl } = w2;\n    let gridShrinkOffset = this.dCtx.isSparkline || !gl.axisCharts ? 0 : 10;\n    const titleSubtitle = [\"title\", \"subtitle\"];\n    titleSubtitle.forEach((t2) => {\n      if (w2.config[t2].text !== void 0) {\n        gridShrinkOffset += w2.config[t2].margin;\n      } else {\n        gridShrinkOffset += this.dCtx.isSparkline || !gl.axisCharts ? 0 : 5;\n      }\n    });\n    if (w2.config.legend.show && w2.config.legend.position === \"bottom\" && !w2.config.legend.floating && !gl.axisCharts) {\n      gridShrinkOffset += 10;\n    }\n    const titleCoords = this.dCtx.dimHelpers.getTitleSubtitleCoords(\"title\");\n    const subtitleCoords = this.dCtx.dimHelpers.getTitleSubtitleCoords(\"subtitle\");\n    this.dCtx.titleBlockPad = gridShrinkOffset;\n    w2.layout.gridHeight -= titleCoords.height + subtitleCoords.height + gridShrinkOffset;\n    w2.layout.translateY += titleCoords.height + subtitleCoords.height + gridShrinkOffset;\n  }\n  /**\n   * @param {{width: number, height: number}[]} yTitleCoords\n   * @param {{width: number, height: number}[]} yaxisLabelCoords\n   */\n  setGridXPosForDualYAxis(yTitleCoords, yaxisLabelCoords) {\n    const { w: w2 } = this;\n    const axesUtils = new AxesUtils(this.w, { theme: this.dCtx.theme, timeScale: this.dCtx.timeScale });\n    w2.config.yaxis.forEach((yaxe, index) => {\n      if (w2.globals.ignoreYAxisIndexes.indexOf(index) === -1 && !yaxe.floating && !axesUtils.isYAxisHidden(index)) {\n        if (yaxe.opposite) {\n          w2.layout.translateX -= yaxisLabelCoords[index].width + yTitleCoords[index].width + parseInt(yaxe.labels.style.fontSize, 10) / 1.2 + 12;\n        }\n        if (w2.layout.translateX < 2) {\n          w2.layout.translateX = 2;\n        }\n      }\n    });\n  }\n}\nconst XHTML$3 = \"http://www.w3.org/1999/xhtml\";\nconst BREADCRUMB_HEIGHT = 18;\nconst BREADCRUMB_HEIGHT_FULL = 23;\nfunction breadcrumbConfig(w2, localCfg) {\n  const shared = w2.config.drilldown && w2.config.drilldown.breadcrumb || {};\n  return __spreadValues(__spreadValues({\n    show: true,\n    position: \"top-left\",\n    separator: \" / \",\n    rootLabel: \"All\",\n    offsetX: 0,\n    offsetY: 0,\n    formatter: void 0\n  }, shared), localCfg || {});\n}\nfunction avoidChromeOverlap(w2, nav) {\n  const chrome = (\n    /** @type {Element[]} */\n    [\".apexcharts-title-text\", \".apexcharts-subtitle-text\"].map((s2) => w2.dom.baseEl.querySelector(s2)).filter((el) => el !== null)\n  );\n  if (!chrome.length) return;\n  const wrapTop = w2.dom.elWrap.getBoundingClientRect().top;\n  for (let pass = 0; pass < chrome.length + 1; pass++) {\n    const nr = nav.getBoundingClientRect();\n    const hit = chrome.find((el) => {\n      const r2 = el.getBoundingClientRect();\n      return nr.left < r2.right && nr.right > r2.left && nr.top < r2.bottom && nr.bottom > r2.top;\n    });\n    if (!hit) break;\n    nav.style.top = `${hit.getBoundingClientRect().bottom - wrapTop + 4}px`;\n  }\n}\nfunction breadcrumbCeiling(w2, nav) {\n  const gridTop = w2.layout.translateY || 0;\n  const elWrap = w2.dom.elWrap;\n  if (!elWrap) return gridTop;\n  const labels = w2.dom.baseEl.querySelectorAll(\".apexcharts-yaxis-label\");\n  if (!labels.length) return gridTop;\n  const wrapTop = elWrap.getBoundingClientRect().top;\n  const navRect = nav.getBoundingClientRect();\n  let ceiling = gridTop;\n  for (let i2 = 0; i2 < labels.length; i2++) {\n    const r2 = labels[i2].getBoundingClientRect();\n    if (!r2.height) continue;\n    if (r2.left >= navRect.right || r2.right <= navRect.left) continue;\n    ceiling = Math.min(ceiling, r2.top - wrapTop);\n  }\n  return ceiling;\n}\nfunction placeInReservedBand(w2, ctx, nav, cfg) {\n  var _a;\n  const dimHelpers = (_a = ctx == null ? void 0 : ctx.dimensions) == null ? void 0 : _a.dimHelpers;\n  const titleArea = dimHelpers ? dimHelpers.getTitleSubtitleCoords(\"title\").height + dimHelpers.getTitleSubtitleCoords(\"subtitle\").height : 0;\n  const navH = nav.getBoundingClientRect().height || BREADCRUMB_HEIGHT;\n  const offsetY = cfg && cfg.offsetY || 0;\n  const ceiling = breadcrumbCeiling(w2, nav);\n  if (ceiling - titleArea >= navH + 1) {\n    nav.style.top = `${ceiling - navH - 1 + offsetY}px`;\n    return true;\n  }\n  nav.style.top = `${titleArea + offsetY}px`;\n  const dark = w2.config.theme.mode === \"dark\";\n  nav.style.background = dark ? \"rgba(20,24,30,0.82)\" : \"rgba(255,255,255,0.86)\";\n  nav.style.borderRadius = \"4px\";\n  return false;\n}\nfunction clearBreadcrumb(w2) {\n  const elWrap = w2.dom.elWrap;\n  if (!elWrap) return;\n  const existing = elWrap.querySelector(\".apexcharts-breadcrumb\");\n  if (existing && existing.parentNode) existing.parentNode.removeChild(existing);\n}\nfunction renderBreadcrumb(w2, opts) {\n  if (!Environment.isBrowser()) return null;\n  const elWrap = w2.dom.elWrap;\n  if (!elWrap) return null;\n  clearBreadcrumb(w2);\n  const cfg = opts.config || breadcrumbConfig(w2);\n  if (cfg.show === false) return null;\n  const crumbs = opts.crumbs || [];\n  if (crumbs.length < 2) return null;\n  const nav = BrowserAPIs.createElementNS(XHTML$3, \"nav\");\n  nav.setAttribute(\"class\", \"apexcharts-breadcrumb\");\n  nav.setAttribute(\"aria-label\", opts.ariaLabel || \"Breadcrumb\");\n  positionBreadcrumb(nav, cfg);\n  if (opts.compact) {\n    nav.style.fontSize = \"11px\";\n    nav.style.padding = \"0 2px\";\n  }\n  const separator = cfg.separator != null ? cfg.separator : \" / \";\n  crumbs.forEach((crumb, i2) => {\n    var _a;\n    if (i2 > 0) {\n      const sep = BrowserAPIs.createElementNS(XHTML$3, \"span\");\n      sep.setAttribute(\"class\", \"apexcharts-breadcrumb-separator\");\n      sep.setAttribute(\"aria-hidden\", \"true\");\n      sep.textContent = separator;\n      nav.appendChild(sep);\n    }\n    let label = i2 === 0 ? (_a = cfg.rootLabel) != null ? _a : \"All\" : crumb.label;\n    if (typeof cfg.formatter === \"function\") {\n      label = cfg.formatter(label, {\n        index: i2,\n        depth: crumbs.length - 1,\n        data: crumb.data\n      });\n    }\n    if (i2 === crumbs.length - 1) {\n      const cur = BrowserAPIs.createElementNS(XHTML$3, \"span\");\n      cur.setAttribute(\n        \"class\",\n        \"apexcharts-breadcrumb-item apexcharts-breadcrumb-current\"\n      );\n      cur.setAttribute(\"aria-current\", \"page\");\n      cur.textContent = String(label);\n      nav.appendChild(cur);\n      return;\n    }\n    const btn = (\n      /** @type {HTMLButtonElement} */\n      BrowserAPIs.createElementNS(XHTML$3, \"button\")\n    );\n    btn.setAttribute(\"type\", \"button\");\n    btn.setAttribute(\"class\", \"apexcharts-breadcrumb-item\");\n    if (i2 === 0) {\n      const arrow = BrowserAPIs.createElementNS(XHTML$3, \"span\");\n      arrow.setAttribute(\"class\", \"apexcharts-breadcrumb-arrow\");\n      arrow.setAttribute(\"aria-hidden\", \"true\");\n      arrow.textContent = \"←\";\n      btn.appendChild(arrow);\n    }\n    const text = BrowserAPIs.createElementNS(XHTML$3, \"span\");\n    text.setAttribute(\"class\", \"apexcharts-breadcrumb-label\");\n    text.textContent = String(label);\n    btn.appendChild(text);\n    btn.addEventListener(\"click\", () => opts.onNavigate(i2, crumb));\n    nav.appendChild(btn);\n  });\n  elWrap.appendChild(nav);\n  return nav;\n}\nfunction positionBreadcrumb(nav, cfg) {\n  const ox = cfg.offsetX || 0;\n  const oy = cfg.offsetY || 0;\n  nav.style.position = \"absolute\";\n  nav.style.top = oy + \"px\";\n  if (cfg.position === \"top-right\") {\n    nav.style.right = -ox + 3 + \"px\";\n  } else {\n    nav.style.left = ox + \"px\";\n  }\n}\nclass Dimensions {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.theme = ctx.theme;\n    this.timeScale = ctx.timeScale;\n    this.lgRect = /** @type {any} */\n    {};\n    this.yAxisWidth = 0;\n    this.yAxisWidthLeft = 0;\n    this.yAxisWidthRight = 0;\n    this.xAxisHeight = 0;\n    this.isSparkline = this.w.config.chart.sparkline.enabled;\n    this.dimHelpers = new Helpers$4(this);\n    this.dimYAxis = new DimYAxis(this);\n    this.dimXAxis = new DimXAxis(this);\n    this.dimGrid = new DimGrid(this);\n    this.lgWidthForSideLegends = 0;\n    this.gridPad = __spreadValues({}, this.w.config.grid.padding);\n    this.xPadRight = 0;\n    this.titleBlockPad = 0;\n    this.xPadLeft = 0;\n    this.datalabelsCoords = { width: 0, height: 0 };\n    this.xAxisWidth = 0;\n    this.timescaleLabels = [];\n  }\n  /**\n   * @memberof Dimensions\n   **/\n  plotCoords() {\n    const w2 = this.w;\n    const gl = w2.globals;\n    this.gridPad = __spreadValues({}, w2.config.grid.padding);\n    this.lgRect = this.dimHelpers.getLegendsRect();\n    this.datalabelsCoords = { width: 0, height: 0 };\n    if (this.isSparkline) {\n      if (this.w.globals.markers.largestSize > 0) {\n        Object.entries(this.gridPad).forEach(([k, v2]) => {\n          this.gridPad[k] = Math.max(\n            v2,\n            this.w.globals.markers.largestSize / 1.5\n          );\n        });\n      }\n      const strokeInset = this.dimHelpers.getSparklineStrokeInset();\n      this.gridPad.top = Math.max(strokeInset.top, this.gridPad.top);\n      this.gridPad.bottom = Math.max(strokeInset.bottom, this.gridPad.bottom);\n    }\n    if (gl.axisCharts) {\n      this.setDimensionsForAxisCharts();\n    } else {\n      this.setDimensionsForNonAxisCharts();\n    }\n    this.dimGrid.gridPadFortitleSubtitle();\n    this.gridPadForBreadcrumb();\n    this.dimGrid.gridPadForStackedTotalDataLabels();\n    w2.layout.gridHeight = w2.layout.gridHeight - this.gridPad.top - this.gridPad.bottom;\n    w2.layout.gridWidth = w2.layout.gridWidth - this.gridPad.left - this.gridPad.right - this.xPadRight - this.xPadLeft;\n    const barWidth = this.dimGrid.gridPadForColumnsInNumericAxis(\n      w2.layout.gridWidth\n    );\n    w2.layout.gridWidth = w2.layout.gridWidth - barWidth * 2;\n    w2.layout.translateX = w2.layout.translateX + this.gridPad.left + this.xPadLeft + (barWidth > 0 ? barWidth : 0);\n    w2.layout.translateY = w2.layout.translateY + this.gridPad.top;\n    return {\n      // w.layout (future slice)\n      layout: {\n        gridHeight: w2.layout.gridHeight,\n        gridWidth: w2.layout.gridWidth,\n        translateX: w2.layout.translateX,\n        translateY: w2.layout.translateY,\n        translateXAxisX: w2.layout.translateXAxisX,\n        translateXAxisY: w2.layout.translateXAxisY,\n        rotateXLabels: w2.layout.rotateXLabels,\n        xAxisHeight: w2.layout.xAxisHeight,\n        xAxisLabelsHeight: w2.layout.xAxisLabelsHeight,\n        xAxisGroupLabelsHeight: w2.layout.xAxisGroupLabelsHeight,\n        xAxisLabelsWidth: w2.layout.xAxisLabelsWidth,\n        yLabelsCoords: w2.layout.yLabelsCoords,\n        yTitleCoords: w2.layout.yTitleCoords,\n        gridPad: __spreadValues({}, this.gridPad)\n      }\n    };\n  }\n  /**\n   * Reserve a strip above the plot for a navigation breadcrumb.\n   *\n   * A treemap fills its plot edge to edge, so unlike a sunburst - whose rings\n   * leave the corners empty - an absolutely-positioned breadcrumb has nowhere\n   * to float without covering a tile. Giving it real space is the only way it\n   * never overlaps.\n   *\n   * Reserved whenever click-to-zoom is enabled, not only while zoomed in: the\n   * strip appears and disappears as the reader navigates, and sizing the plot\n   * around its presence would reflow every tile on each zoom.\n   */\n  gridPadForBreadcrumb() {\n    var _a, _b, _c, _d, _e, _f;\n    const w2 = this.w;\n    const isTreemap = w2.config.chart.type === \"treemap\";\n    if (isTreemap) {\n      const zoom = (_b = (_a = w2.config.plotOptions) == null ? void 0 : _a.treemap) == null ? void 0 : _b.zoom;\n      if (zoom && zoom.enabled) {\n        if (breadcrumbConfig(w2, zoom.breadcrumb).show === false) return;\n        this.gridPad.top += BREADCRUMB_HEIGHT + 4;\n        return;\n      }\n    }\n    if (!w2.globals.axisCharts) return;\n    if (!this.ctx.drilldown) return;\n    if (!w2.config.drilldown || !w2.config.drilldown.enabled) return;\n    if (breadcrumbConfig(w2).show === false) return;\n    const labelFs = parseFloat(String((_f = (_e = (_d = (_c = w2.config.yaxis) == null ? void 0 : _c[0]) == null ? void 0 : _d.labels) == null ? void 0 : _e.style) == null ? void 0 : _f.fontSize)) || 11;\n    const yLabelOverhang = isTreemap ? 0 : Math.ceil(labelFs * LINE_HEIGHT_RATIO / 2);\n    const needed = BREADCRUMB_HEIGHT_FULL + 1 + yLabelOverhang;\n    const alreadyFree = isTreemap ? 0 : this.titleBlockPad || 0;\n    this.gridPad.top += Math.max(0, needed - alreadyFree);\n  }\n  setDimensionsForAxisCharts() {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const yaxisLabelCoords = this.dimYAxis.getyAxisLabelsCoords();\n    const yTitleCoords = this.dimYAxis.getyAxisTitleCoords();\n    if (gl.isSlopeChart) {\n      this.datalabelsCoords = this.dimHelpers.getDatalabelsRect();\n    }\n    w2.layout.yLabelsCoords = [];\n    w2.layout.yTitleCoords = [];\n    w2.config.yaxis.map((yaxe, index) => {\n      w2.layout.yLabelsCoords.push({\n        width: yaxisLabelCoords[index].width,\n        index\n      });\n      w2.layout.yTitleCoords.push(\n        /** @type {any} */\n        {\n          width: yTitleCoords[index].width,\n          index\n        }\n      );\n    });\n    this.yAxisWidth = this.dimYAxis.getTotalYAxisWidth();\n    const xaxisLabelCoords = this.dimXAxis.getxAxisLabelsCoords();\n    const xaxisGroupLabelCoords = this.dimXAxis.getxAxisGroupLabelsCoords();\n    const xtitleCoords = this.dimXAxis.getxAxisTitleCoords();\n    this.conditionalChecksForAxisCoords(\n      xaxisLabelCoords,\n      xtitleCoords,\n      xaxisGroupLabelCoords\n    );\n    w2.layout.translateXAxisY = w2.layout.rotateXLabels ? this.xAxisHeight / 8 : -4;\n    w2.layout.translateXAxisX = w2.layout.rotateXLabels && w2.axisFlags.isXNumeric && w2.config.xaxis.labels.rotate <= -45 ? -this.xAxisWidth / 4 : 0;\n    if (w2.globals.isBarHorizontal) {\n      w2.layout.rotateXLabels = false;\n      w2.layout.translateXAxisY = -1 * ((parseInt(w2.config.xaxis.labels.style.fontSize, 10) || 12) / 1.5);\n    }\n    w2.layout.translateXAxisY = w2.layout.translateXAxisY + w2.config.xaxis.labels.offsetY;\n    w2.layout.translateXAxisX = w2.layout.translateXAxisX + w2.config.xaxis.labels.offsetX;\n    let yAxisWidth = this.yAxisWidth;\n    let xAxisHeight = this.xAxisHeight;\n    w2.layout.xAxisLabelsHeight = this.xAxisHeight - xtitleCoords.height;\n    w2.layout.xAxisGroupLabelsHeight = w2.layout.xAxisLabelsHeight - xaxisLabelCoords.height;\n    w2.layout.xAxisLabelsWidth = this.xAxisWidth;\n    w2.layout.xAxisHeight = this.xAxisHeight;\n    let translateY = 10;\n    if (w2.config.chart.type === \"radar\" || this.isSparkline) {\n      yAxisWidth = 0;\n      xAxisHeight = 0;\n    }\n    if (this.isSparkline) {\n      this.lgRect = {\n        height: 0,\n        width: 0\n      };\n    }\n    if (this.isSparkline || w2.config.chart.type === \"treemap\") {\n      yAxisWidth = 0;\n      xAxisHeight = 0;\n      translateY = 0;\n    }\n    if (!this.isSparkline && w2.config.chart.type !== \"treemap\") {\n      this.dimXAxis.additionalPaddingXLabels(xaxisLabelCoords);\n    }\n    const legendTopBottom = () => {\n      w2.layout.translateX = yAxisWidth + this.datalabelsCoords.width;\n      w2.layout.gridHeight = gl.svgHeight - this.lgRect.height - xAxisHeight - (!this.isSparkline && w2.config.chart.type !== \"treemap\" ? w2.layout.rotateXLabels ? 10 : 15 : 0);\n      w2.layout.gridWidth = gl.svgWidth - yAxisWidth - this.datalabelsCoords.width * 2;\n    };\n    if (w2.config.xaxis.position === \"top\")\n      translateY = w2.layout.xAxisHeight - w2.config.xaxis.axisTicks.height - 5;\n    switch (w2.config.legend.position) {\n      case \"bottom\":\n        w2.layout.translateY = translateY;\n        legendTopBottom();\n        break;\n      case \"top\":\n        w2.layout.translateY = this.lgRect.height + translateY;\n        legendTopBottom();\n        break;\n      case \"left\":\n        w2.layout.translateY = translateY;\n        w2.layout.translateX = this.lgRect.width + yAxisWidth + this.datalabelsCoords.width;\n        w2.layout.gridHeight = gl.svgHeight - xAxisHeight - 12;\n        w2.layout.gridWidth = gl.svgWidth - this.lgRect.width - yAxisWidth - this.datalabelsCoords.width * 2;\n        break;\n      case \"right\":\n        w2.layout.translateY = translateY;\n        w2.layout.translateX = yAxisWidth + this.datalabelsCoords.width;\n        w2.layout.gridHeight = gl.svgHeight - xAxisHeight - 12;\n        w2.layout.gridWidth = gl.svgWidth - this.lgRect.width - yAxisWidth - this.datalabelsCoords.width * 2 - 5;\n        break;\n      default:\n        throw new Error(\"Legend position not supported\");\n    }\n    this.dimGrid.setGridXPosForDualYAxis(yTitleCoords, yaxisLabelCoords);\n    const objyAxis = new YAxis(this.w, {\n      theme: this.theme,\n      timeScale: this.timeScale\n    });\n    objyAxis.setYAxisXPosition(yaxisLabelCoords, yTitleCoords);\n  }\n  setDimensionsForNonAxisCharts() {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const cnf = w2.config;\n    let xPad = 0;\n    if (w2.config.legend.show && !w2.config.legend.floating) {\n      xPad = 20;\n    }\n    if (cnf.chart.type === \"unit\") {\n      const legendVisible = cnf.legend.show && !cnf.legend.floating;\n      const pos = cnf.legend.position;\n      let top = 0;\n      let side = 0;\n      if (legendVisible) {\n        if (pos === \"bottom\" || pos === \"top\") {\n          top = this.lgRect.height;\n        } else {\n          side = this.lgRect.width + xPad;\n        }\n      }\n      w2.layout.gridWidth = gl.svgWidth - side;\n      w2.layout.gridHeight = gl.svgHeight - top;\n      w2.layout.translateX = pos === \"left\" ? side : 0;\n      w2.layout.translateY = pos === \"top\" ? top : 0;\n      return;\n    }\n    const type = cnf.chart.type === \"sunburst\" ? \"sunburst\" : cnf.chart.type === \"pie\" || cnf.chart.type === \"polarArea\" || cnf.chart.type === \"donut\" ? \"pie\" : \"radialBar\";\n    const offY = cnf.plotOptions[type].offsetY;\n    const offX = cnf.plotOptions[type].offsetX;\n    if (!cnf.legend.show || cnf.legend.floating) {\n      w2.layout.gridHeight = gl.svgHeight;\n      const maxWidth = w2.dom.elWrap.getBoundingClientRect().width;\n      w2.layout.gridWidth = Math.min(maxWidth, w2.layout.gridHeight);\n      w2.layout.translateY = offY;\n      w2.layout.translateX = offX + (gl.svgWidth - w2.layout.gridWidth) / 2;\n      return;\n    }\n    switch (cnf.legend.position) {\n      case \"bottom\":\n        w2.layout.gridHeight = gl.svgHeight - this.lgRect.height;\n        w2.layout.gridWidth = gl.svgWidth;\n        w2.layout.translateY = offY - 10;\n        w2.layout.translateX = offX + (gl.svgWidth - w2.layout.gridWidth) / 2;\n        break;\n      case \"top\":\n        w2.layout.gridHeight = gl.svgHeight - this.lgRect.height;\n        w2.layout.gridWidth = gl.svgWidth;\n        w2.layout.translateY = this.lgRect.height + offY + 10;\n        w2.layout.translateX = offX + (gl.svgWidth - w2.layout.gridWidth) / 2;\n        break;\n      case \"left\":\n        w2.layout.gridWidth = gl.svgWidth - this.lgRect.width - xPad;\n        w2.layout.gridHeight = cnf.chart.height !== \"auto\" ? gl.svgHeight : w2.layout.gridWidth;\n        w2.layout.translateY = offY;\n        w2.layout.translateX = offX + this.lgRect.width + xPad;\n        break;\n      case \"right\":\n        w2.layout.gridWidth = gl.svgWidth - this.lgRect.width - xPad - 5;\n        w2.layout.gridHeight = cnf.chart.height !== \"auto\" ? gl.svgHeight : w2.layout.gridWidth;\n        w2.layout.translateY = offY;\n        w2.layout.translateX = offX + 10;\n        break;\n      default:\n        throw new Error(\"Legend position not supported\");\n    }\n  }\n  /**\n   * @param {any} xaxisLabelCoords\n   * @param {any} xtitleCoords\n   * @param {any} xaxisGroupLabelCoords\n   */\n  conditionalChecksForAxisCoords(xaxisLabelCoords, xtitleCoords, xaxisGroupLabelCoords) {\n    const w2 = this.w;\n    const xAxisNum = w2.labelData.hasXaxisGroups ? 2 : 1;\n    const baseXAxisHeight = xaxisGroupLabelCoords.height + xaxisLabelCoords.height + xtitleCoords.height;\n    const xAxisHeightMultiplicate = w2.axisFlags.isMultiLineX ? 1.2 : LINE_HEIGHT_RATIO;\n    const rotatedXAxisOffset = w2.layout.rotateXLabels ? 22 : 10;\n    const rotatedXAxisLegendOffset = w2.layout.rotateXLabels && w2.config.legend.position === \"bottom\";\n    const additionalOffset = rotatedXAxisLegendOffset ? 10 : 0;\n    this.xAxisHeight = baseXAxisHeight * xAxisHeightMultiplicate + xAxisNum * rotatedXAxisOffset + additionalOffset;\n    this.xAxisWidth = xaxisLabelCoords.width;\n    if (this.xAxisHeight - xtitleCoords.height > w2.config.xaxis.labels.maxHeight) {\n      this.xAxisHeight = w2.config.xaxis.labels.maxHeight;\n    }\n    if (w2.config.xaxis.labels.minHeight && this.xAxisHeight < w2.config.xaxis.labels.minHeight) {\n      this.xAxisHeight = w2.config.xaxis.labels.minHeight;\n    }\n    if (w2.config.xaxis.floating) {\n      this.xAxisHeight = 0;\n    }\n    let minYAxisWidth = 0;\n    let maxYAxisWidth = 0;\n    w2.config.yaxis.forEach((y) => {\n      minYAxisWidth += y.labels.minWidth;\n      maxYAxisWidth += y.labels.maxWidth;\n    });\n    if (this.yAxisWidth < minYAxisWidth) {\n      this.yAxisWidth = minYAxisWidth;\n    }\n    if (this.yAxisWidth > maxYAxisWidth) {\n      this.yAxisWidth = maxYAxisWidth;\n    }\n  }\n}\nconst SECOND = 1e3;\nconst MINUTE = 60 * SECOND;\nconst HOUR = 60 * MINUTE;\nconst DAY = 24 * HOUR;\nconst WEEK = 7 * DAY;\nconst APPROX_MONTH = 30 * DAY;\nconst APPROX_YEAR = 365 * DAY;\nconst MIN_ZOOM_DAYS = 10 / (24 * 60 * 60);\nconst TICK_LADDER = [\n  { unit: \"second\", step: 1, approxMs: SECOND },\n  { unit: \"second\", step: 5, approxMs: 5 * SECOND },\n  { unit: \"second\", step: 15, approxMs: 15 * SECOND },\n  { unit: \"second\", step: 30, approxMs: 30 * SECOND },\n  { unit: \"minute\", step: 1, approxMs: MINUTE },\n  { unit: \"minute\", step: 5, approxMs: 5 * MINUTE },\n  { unit: \"minute\", step: 15, approxMs: 15 * MINUTE },\n  { unit: \"minute\", step: 30, approxMs: 30 * MINUTE },\n  { unit: \"hour\", step: 1, approxMs: HOUR },\n  { unit: \"hour\", step: 3, approxMs: 3 * HOUR },\n  { unit: \"hour\", step: 6, approxMs: 6 * HOUR },\n  { unit: \"hour\", step: 12, approxMs: 12 * HOUR },\n  { unit: \"day\", step: 1, approxMs: DAY },\n  { unit: \"day\", step: 2, approxMs: 2 * DAY },\n  { unit: \"week\", step: 1, approxMs: WEEK },\n  { unit: \"week\", step: 2, approxMs: 2 * WEEK },\n  { unit: \"month\", step: 1, approxMs: APPROX_MONTH },\n  { unit: \"month\", step: 3, approxMs: 3 * APPROX_MONTH },\n  { unit: \"month\", step: 6, approxMs: 6 * APPROX_MONTH },\n  { unit: \"year\", step: 1, approxMs: APPROX_YEAR },\n  { unit: \"year\", step: 2, approxMs: 2 * APPROX_YEAR },\n  { unit: \"year\", step: 5, approxMs: 5 * APPROX_YEAR },\n  { unit: \"year\", step: 10, approxMs: 10 * APPROX_YEAR },\n  { unit: \"year\", step: 25, approxMs: 25 * APPROX_YEAR },\n  { unit: \"year\", step: 50, approxMs: 50 * APPROX_YEAR },\n  { unit: \"year\", step: 100, approxMs: 100 * APPROX_YEAR }\n];\nconst DEFAULT_TICK_COUNT = 10;\nclass TimeScale {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.tickInterval = null;\n    this.timeScaleArray = [];\n    this.utc = w2.config.xaxis.labels.datetimeUTC;\n  }\n  /**\n   * Compute raw ticks for a datetime axis spanning [minX, maxX]. Single\n   * uniform stride — one unit, no promotion, no calendar-boundary overlay.\n   * Context (year, day) is folded into each label's format string at\n   * `formatDates` time, not split across promoted ticks.\n   *\n   * @param {number} minX\n   * @param {number} maxX\n   * @returns {Array<any>} raw ticks (pre-formatting). Pass to recalcDimensionsBasedOnFormat for the final timescaleLabels.\n   */\n  calculateTimeScaleTicks(minX, maxX) {\n    const w2 = this.w;\n    if (w2.globals.allSeriesCollapsed) {\n      w2.labelData.labels = [];\n      w2.labelData.timescaleLabels = [];\n      this.timeScaleArray = [];\n      return [];\n    }\n    const span = maxX - minX;\n    const daysDiff = span / DAY;\n    w2.interact.disableZoomIn = false;\n    w2.interact.disableZoomOut = false;\n    if (daysDiff < MIN_ZOOM_DAYS) {\n      w2.interact.disableZoomIn = true;\n    } else if (daysDiff > 5e4) {\n      w2.interact.disableZoomOut = true;\n    }\n    const targetCount = Number.isFinite(w2.config.xaxis.tickAmount) ? (\n      /** @type {number} */\n      w2.config.xaxis.tickAmount\n    ) : DEFAULT_TICK_COUNT;\n    this.tickInterval = pickInterval(span, targetCount);\n    const ticks = this.generateBaseTicks(minX, maxX, this.tickInterval);\n    this.timeScaleArray = ticks;\n    return ticks;\n  }\n  /**\n   * Walk the interval stride from `minX` to `maxX`. Every tick carries\n   * `unit: interval.unit` — no promotion, no snapping. Uniform spacing is\n   * guaranteed.\n   *\n   * @param {number} minX\n   * @param {number} maxX\n   * @param {{ unit: string, step: number }} interval\n   * @returns {Array<any>}\n   */\n  generateBaseTicks(minX, maxX, interval) {\n    const w2 = this.w;\n    const dt = new DateTime(w2);\n    const isUTC = this.utc;\n    const gridWidth = w2.layout.gridWidth;\n    const span = maxX - minX;\n    const ticks = [];\n    let t2 = dt.ceilToBoundary(\n      minX,\n      /** @type {any} */\n      interval.unit,\n      interval.step,\n      isUTC\n    );\n    let iter = 0;\n    const MAX_ITER = 5e3;\n    while (t2 <= maxX && iter < MAX_ITER) {\n      const f = dt.getDateFields(t2, isUTC);\n      const position = span > 0 ? (t2 - minX) / span * gridWidth : 0;\n      ticks.push({\n        timestamp: t2,\n        position,\n        unit: interval.unit,\n        year: f.year,\n        month: f.month + 1,\n        day: f.date,\n        hour: f.hour,\n        minute: f.minute,\n        second: f.second,\n        value: t2\n      });\n      t2 = dt.addInterval(\n        t2,\n        /** @type {any} */\n        interval.unit,\n        interval.step,\n        isUTC\n      );\n      iter++;\n    }\n    return ticks;\n  }\n  /**\n   * Public entry called from Core.js after calculateTimeScaleTicks. Formats\n   * the raw ticks into display labels, removes overlapping entries, writes\n   * the result to `w.labelData.timescaleLabels`, and re-runs Dimensions to\n   * lay out the grid based on the final label widths.\n   *\n   * @param {Array<any>} rawTicks\n   */\n  recalcDimensionsBasedOnFormat(rawTicks) {\n    const w2 = this.w;\n    const formatted = this.formatDates(rawTicks);\n    const filtered = this.removeOverlappingTS(formatted);\n    w2.labelData.timescaleLabels = filtered.slice();\n    const dimensions = new Dimensions(this.w, this.ctx);\n    const layoutState = dimensions.plotCoords();\n    this.ctx._writeLayoutCoords(layoutState.layout);\n  }\n  /**\n   * Format each raw tick into a display label. All ticks share one\n   * effective format computed once from the interval unit and the data\n   * range — when the range spans coarser units, the base format from\n   * `datetimeFormatter[unit]` is automatically extended with the higher-\n   * unit context (e.g. month-scale spanning years → `MMM yyyy`, hour-scale\n   * spanning days → `dd MMM HH:mm`). A user-supplied `xaxis.labels.format`\n   * overrides everything.\n   *\n   * @param {Array<any>} rawTicks\n   * @returns {Array<any>}\n   */\n  formatDates(rawTicks) {\n    const w2 = this.w;\n    const dt = new DateTime(w2);\n    const userFormat = w2.config.xaxis.labels.format;\n    const dtFmt = w2.config.xaxis.labels.datetimeFormatter;\n    const isUTC = this.utc;\n    const pad = (n2, len = 2) => String(n2).padStart(len, \"0\");\n    const effectiveFormat = userFormat ? userFormat : this._effectiveFormat(rawTicks, dtFmt);\n    return rawTicks.map((tick) => {\n      const date = dt.getDate(tick.timestamp);\n      const value = dt.formatDate(date, effectiveFormat);\n      const ds = `${tick.year}-${pad(tick.month)}-${pad(tick.day)}T${pad(tick.hour)}:${pad(tick.minute)}:${pad(tick.second)}.000${isUTC ? \"Z\" : \"\"}`;\n      return {\n        dateString: ds,\n        position: tick.position,\n        value,\n        unit: tick.unit,\n        year: tick.year,\n        month: tick.month\n      };\n    });\n  }\n  /**\n   * Pick the format string used for every tick this render. Folds coarser\n   * context into the base `datetimeFormatter[unit]` when the data range\n   * spans it. Skipped when the base format already references the higher\n   * unit's tokens (so user customizations aren't doubled).\n   *\n   * @param {Array<any>} rawTicks\n   * @param {Record<string, string>} dtFmt\n   * @returns {string}\n   */\n  _effectiveFormat(rawTicks, dtFmt) {\n    if (rawTicks.length === 0) return dtFmt.day || \"dd MMM\";\n    const unit = this.tickInterval && this.tickInterval.unit || rawTicks[0].unit;\n    const base = dtFmt[unit === \"week\" ? \"day\" : unit] || dtFmt.day || \"dd MMM\";\n    const first = rawTicks[0];\n    const last = rawTicks[rawTicks.length - 1];\n    const spansYears = first.year !== last.year;\n    const spansMonths = spansYears || first.month !== last.month;\n    const spansDays = spansMonths || first.day !== last.day;\n    const hasYearToken = /y/i.test(base);\n    const hasMonthToken = /M/.test(base);\n    const hasDayToken = /d/i.test(base);\n    if (unit === \"month\" || unit === \"week\") {\n      if (spansYears && !hasYearToken) return base + \" yyyy\";\n      return base;\n    }\n    if (unit === \"day\") {\n      if (spansYears && !hasYearToken) return base + \" yyyy\";\n      return base;\n    }\n    if (unit === \"hour\" || unit === \"minute\" || unit === \"second\") {\n      if (spansDays && !hasDayToken && !hasMonthToken) {\n        const prefix = spansYears ? \"dd MMM yyyy\" : \"dd MMM\";\n        return prefix + \" \" + base;\n      }\n      return base;\n    }\n    return base;\n  }\n  /**\n   * Drop labels that would overlap their predecessor (when\n   * `xaxis.labels.hideOverlappingLabels` is true). The first label is always\n   * kept. Width is measured per-label unless all labels have the same string\n   * length, in which case one measurement is reused.\n   *\n   * @param {Array<any>} arr\n   * @returns {Array<any>}\n   */\n  removeOverlappingTS(arr) {\n    if (arr.length === 0) return [];\n    const w2 = this.w;\n    const graphics = new Graphics(w2);\n    let equalLabelLengthFlag = false;\n    let constantLabelWidth;\n    if (arr[0].value && arr.every((lb) => lb.value.length === arr[0].value.length)) {\n      equalLabelLengthFlag = true;\n      constantLabelWidth = graphics.getTextRects(\n        arr[0].value,\n        w2.config.xaxis.labels.style.fontSize\n      ).width;\n    }\n    let lastDrawnIndex = 0;\n    const filtered = arr.map((item, index) => {\n      if (index === 0) return item;\n      if (!w2.config.xaxis.labels.hideOverlappingLabels) return item;\n      const prevLabelWidth = equalLabelLengthFlag ? (\n        /** @type {number} */\n        constantLabelWidth\n      ) : graphics.getTextRects(\n        arr[lastDrawnIndex].value,\n        w2.config.xaxis.labels.style.fontSize\n      ).width;\n      const prevPos = arr[lastDrawnIndex].position;\n      const pos = item.position;\n      if (pos > prevPos + prevLabelWidth + 10) {\n        lastDrawnIndex = index;\n        return item;\n      }\n      return null;\n    }).filter((f) => f !== null);\n    return filtered;\n  }\n}\nfunction pickInterval(span, targetCount) {\n  if (!Number.isFinite(targetCount) || targetCount <= 0) {\n    targetCount = DEFAULT_TICK_COUNT;\n  }\n  if (span <= 0) return TICK_LADDER[0];\n  const targetMs = span / targetCount;\n  let best = TICK_LADDER[0];\n  let bestDist = Infinity;\n  for (const interval of TICK_LADDER) {\n    const dist = Math.abs(Math.log(interval.approxMs / targetMs));\n    if (dist < bestDist) {\n      bestDist = dist;\n      best = interval;\n    }\n  }\n  return best;\n}\nconst REGISTRY_KEY$1 = \"__apexcharts_registry__\";\nconst CUSTOM_KEY = \"__apexcharts_custom_types__\";\nif (!/** @type {any} */\nglobalThis[REGISTRY_KEY$1]) {\n  globalThis[REGISTRY_KEY$1] = {};\n}\nif (!/** @type {any} */\nglobalThis[CUSTOM_KEY]) {\n  globalThis[CUSTOM_KEY] = /* @__PURE__ */ new Set();\n}\nfunction getRegistry$1() {\n  return (\n    /** @type {any} */\n    globalThis[REGISTRY_KEY$1]\n  );\n}\nfunction getCustomTypes() {\n  return (\n    /** @type {any} */\n    globalThis[CUSTOM_KEY]\n  );\n}\nfunction markCustom(name2) {\n  getCustomTypes().add(name2);\n}\nfunction isCustom(name2) {\n  return getCustomTypes().has(name2);\n}\nfunction hasChartClass(type) {\n  return !!getRegistry$1()[type];\n}\nfunction unregister(name2) {\n  delete getRegistry$1()[name2];\n  getCustomTypes().delete(name2);\n}\nfunction register(typeMap) {\n  Object.assign(getRegistry$1(), typeMap);\n}\nfunction getChartClass(type) {\n  const Cls = getRegistry$1()[type];\n  if (!Cls) {\n    throw new Error(\n      `ApexCharts: chart type \"${type}\" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`\n    );\n  }\n  return Cls;\n}\nclass Core {\n  /**\n   * @param {Element} el\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(el, w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.el = el;\n  }\n  setupElements() {\n    const { globals: gl, config: cnf } = this.w;\n    const ct = cnf.chart.type;\n    const xyChartsArrTypes = [\n      \"line\",\n      \"area\",\n      \"bar\",\n      \"rangeBar\",\n      \"rangeArea\",\n      \"candlestick\",\n      \"boxPlot\",\n      \"violin\",\n      \"scatter\",\n      \"bubble\"\n    ];\n    const axisChartsArrTypes = [\n      ...xyChartsArrTypes,\n      \"radar\",\n      \"heatmap\",\n      \"treemap\"\n    ];\n    const isCustomType = !axisChartsArrTypes.includes(ct) && ![\"pie\", \"donut\", \"polarArea\", \"radialBar\"].includes(ct) && isCustom(ct);\n    gl.axisCharts = axisChartsArrTypes.includes(ct) || isCustomType;\n    gl.xyCharts = xyChartsArrTypes.includes(ct) || isCustomType;\n    gl.isBarHorizontal = [\"bar\", \"rangeBar\", \"boxPlot\", \"violin\"].includes(ct) && cnf.plotOptions.bar.horizontal;\n    gl.chartClass = `.apexcharts${gl.chartID}`;\n    this.w.dom.baseEl = this.el;\n    this.w.dom.elWrap = BrowserAPIs.createElementNS(\n      \"http://www.w3.org/1999/xhtml\",\n      \"div\"\n    );\n    Graphics.setAttrs(this.w.dom.elWrap, {\n      id: gl.chartClass.substring(1),\n      class: `apexcharts-canvas ${gl.chartClass.substring(1)}`\n    });\n    this.el.appendChild(this.w.dom.elWrap);\n    const SVG2 = (\n      /** @type {any} */\n      globalThis.SVG\n    );\n    this.w.dom.Paper = SVG2().addTo(this.w.dom.elWrap);\n    this.w.dom.Paper.attr({\n      class: \"apexcharts-svg\",\n      \"xmlns:data\": \"ApexChartsNS\",\n      transform: `translate(${cnf.chart.offsetX}, ${cnf.chart.offsetY})`\n    });\n    this.w.dom.Paper.node.style.background = cnf.theme.mode === \"dark\" && !cnf.chart.background ? \"#343A3F\" : cnf.theme.mode === \"light\" && !cnf.chart.background ? \"#fff\" : cnf.chart.background;\n    this.setSVGDimensions();\n    this.w.dom.elLegendForeign = BrowserAPIs.createElementNS(\n      SVGNS$2,\n      \"foreignObject\"\n    );\n    Graphics.setAttrs(this.w.dom.elLegendForeign, {\n      x: 0,\n      y: 0,\n      width: gl.svgWidth,\n      height: gl.svgHeight\n    });\n    this.w.dom.elLegendWrap = BrowserAPIs.createElementNS(\n      \"http://www.w3.org/1999/xhtml\",\n      \"div\"\n    );\n    this.w.dom.elLegendWrap.classList.add(\"apexcharts-legend\");\n    this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap);\n    this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign);\n    if (cnf.chart.accessibility.enabled && cnf.chart.accessibility.announcements.enabled) {\n      const srStatus = BrowserAPIs.createElement(\"div\");\n      srStatus.className = \"apexcharts-sr-status\";\n      srStatus.setAttribute(\"role\", \"status\");\n      srStatus.setAttribute(\"aria-live\", \"polite\");\n      srStatus.setAttribute(\"aria-atomic\", \"true\");\n      this.w.dom.elWrap.appendChild(srStatus);\n    }\n    if (cnf.chart.accessibility.enabled) {\n      const ariaLabel = this.getAccessibleChartLabel();\n      const svgRole = cnf.chart.accessibility.keyboard.enabled && cnf.chart.accessibility.keyboard.navigation.enabled ? \"application\" : \"img\";\n      this.w.dom.Paper.attr({\n        role: svgRole,\n        \"aria-label\": ariaLabel\n      });\n      if (cnf.chart.accessibility.description) {\n        const descEl = BrowserAPIs.createElementNS(SVGNS$2, \"desc\");\n        descEl.textContent = cnf.chart.accessibility.description;\n        this.w.dom.Paper.node.insertBefore(\n          descEl,\n          this.w.dom.elLegendForeign.nextSibling\n        );\n      }\n    }\n    this.w.dom.elGraphical = this.w.dom.Paper.group().attr({\n      class: \"apexcharts-inner apexcharts-graphical\"\n    });\n    this.w.dom.elDefs = this.w.dom.Paper.defs();\n    this.w.dom.Paper.add(this.w.dom.elGraphical);\n    this.w.dom.elGraphical.add(this.w.dom.elDefs);\n  }\n  /**\n   * Classify each series by its resolved chart type into per-type render\n   * buckets (`{ series, i }`, plus `seriesRangeEnd` for rangeArea). Side\n   * effects mirror the original inline code: sets `w.globals.columnSeries`,\n   * folds `w.globals.comboCharts`, and warns on unsupported combinations (a\n   * non-combo type mixed in, or horizontal bars in a combo). Extracted from\n   * plotChartType to shrink it (audit C2).\n   * @param {any[]} ser\n   * @returns {{ seriesTypes: Record<string, any>, customBuckets: Record<string, {series: any[], i: number[]}> }}\n   */\n  _classifySeriesByType(ser) {\n    const { w: w2 } = this;\n    const { config: cnf, globals: gl } = w2;\n    const seriesTypes = {\n      line: { series: [], i: [] },\n      area: { series: [], i: [] },\n      scatter: { series: [], i: [] },\n      bubble: { series: [], i: [] },\n      bar: { series: [], i: [] },\n      candlestick: { series: [], i: [] },\n      boxPlot: { series: [], i: [] },\n      violin: { series: [], i: [] },\n      rangeBar: { series: [], i: [] },\n      rangeArea: { series: [], seriesRangeEnd: [], i: [] }\n    };\n    const customBuckets = {};\n    const chartType = cnf.chart.type || \"line\";\n    let nonComboType = null;\n    let comboCount = 0;\n    this.w.seriesData.series.forEach((serie, st) => {\n      var _a, _b;\n      const seriesType = ((_a = ser[st]) == null ? void 0 : _a.type) === \"column\" ? \"bar\" : ((_b = ser[st]) == null ? void 0 : _b.type) || (chartType === \"column\" ? \"bar\" : chartType);\n      const st_ = (\n        /** @type {Record<string,any>} */\n        seriesTypes\n      );\n      if (st_[seriesType]) {\n        if (seriesType === \"rangeArea\") {\n          st_[seriesType].series.push(this.w.rangeData.seriesRangeStart[st]);\n          st_[seriesType].seriesRangeEnd.push(\n            this.w.rangeData.seriesRangeEnd[st]\n          );\n        } else {\n          st_[seriesType].series.push(serie);\n        }\n        st_[seriesType].i.push(st);\n        if (seriesType === \"bar\") w2.globals.columnSeries = seriesTypes.bar;\n      } else if ([\n        \"heatmap\",\n        \"treemap\",\n        \"pie\",\n        \"donut\",\n        \"polarArea\",\n        \"radialBar\",\n        \"radar\",\n        \"unit\",\n        \"sunburst\"\n      ].includes(seriesType)) {\n        nonComboType = seriesType;\n      } else if (isCustom(seriesType)) {\n        if (!customBuckets[seriesType]) {\n          customBuckets[seriesType] = { series: [], i: [] };\n        }\n        customBuckets[seriesType].series.push(serie);\n        customBuckets[seriesType].i.push(st);\n      } else {\n        console.warn(\n          `You have specified an unrecognized series type (${seriesType}).`\n        );\n      }\n      if (chartType !== seriesType && seriesType !== \"scatter\") comboCount++;\n    });\n    if (comboCount > 0) {\n      if (nonComboType) {\n        console.warn(\n          `Chart or series type ${nonComboType} cannot appear with other chart or series types.`\n        );\n      }\n      if (seriesTypes.bar.series.length > 0 && cnf.plotOptions.bar.horizontal) {\n        comboCount -= seriesTypes.bar.series.length;\n        seriesTypes.bar = { series: [], i: [] };\n        w2.globals.columnSeries = { series: [], i: [] };\n        console.warn(\n          \"Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`\"\n        );\n      }\n    }\n    gl.comboCharts || (gl.comboCharts = comboCount > 0);\n    return { seriesTypes, customBuckets };\n  }\n  /**\n   * @param {any[]} ser\n   * @param {import('../types/internal').XYRatios} xyRatios\n   */\n  plotChartType(ser, xyRatios) {\n    const { w: w2, ctx } = this;\n    const canvasMode = ctx.renderer && ctx.renderer.kind === \"canvas\";\n    if (canvasMode) ctx.renderer.beginSeries();\n    const { seriesTypes, customBuckets } = this._classifySeriesByType(ser);\n    const renderers = this._instantiateSeriesRenderers(seriesTypes, xyRatios);\n    const elGraph = this._assembleSeriesGraphics(\n      seriesTypes,\n      customBuckets,\n      renderers,\n      xyRatios\n    );\n    if (canvasMode) {\n      const rr = (\n        /** @type {any} */\n        ctx.renderer\n      );\n      if (rr && rr._repaintHostInPlace) {\n        rr._repaintHostInPlace = false;\n        const wrapNode = this.w.dom.elGraphical.node.querySelector(\n          \".apexcharts-canvas-series-wrap\"\n        );\n        if (wrapNode && rr.canRepaintInPlace && rr.canRepaintInPlace()) {\n          rr.repaintInPlace();\n          const groups = Array.isArray(elGraph) ? elGraph : [elGraph];\n          groups.forEach((g2) => {\n            if (g2 && g2.node) wrapNode.appendChild(g2.node);\n          });\n          return [];\n        }\n      }\n      const host = ctx.renderer.present();\n      if (host) {\n        const wrap = new Graphics(w2).group({\n          class: \"apexcharts-canvas-series-wrap\"\n        });\n        wrap.add(host);\n        const groups = Array.isArray(elGraph) ? elGraph : [elGraph];\n        groups.forEach((g2) => {\n          if (g2) wrap.add(g2);\n        });\n        return wrap;\n      }\n    }\n    return elGraph;\n  }\n  /**\n   * Lazily instantiate the shared series renderers the orchestration below\n   * needs. getChartClass() is only called for types actually present, so a page\n   * that registers just 'line' never triggers a lookup for 'candlestick' etc.\n   * (tree-shaking). Returns the line/candlestick/violin renderers and sets\n   * ctx.pie / ctx.rangeBar as a side effect (both may be null). Extracted from\n   * plotChartType (audit C2).\n   * @param {Record<string, any>} seriesTypes\n   * @param {import('../types/internal').XYRatios} xyRatios\n   * @returns {{ line: any, boxCandlestick: any, violin: any }}\n   */\n  _instantiateSeriesRenderers(seriesTypes, xyRatios) {\n    const { w: w2, ctx } = this;\n    const { config: cnf, globals: gl } = w2;\n    const needsLine = seriesTypes.line.series.length > 0 || seriesTypes.area.series.length > 0 || seriesTypes.scatter.series.length > 0 || seriesTypes.bubble.series.length > 0 || seriesTypes.rangeArea.series.length > 0 || !gl.comboCharts && [\"line\", \"area\", \"scatter\", \"bubble\", \"rangeArea\"].includes(\n      cnf.chart.type\n    );\n    const line = needsLine ? new (getChartClass(\"line\"))(ctx.w, ctx, xyRatios) : null;\n    const needsCandlestick = seriesTypes.candlestick.series.length > 0 || seriesTypes.boxPlot.series.length > 0 || !gl.comboCharts && [\"candlestick\", \"boxPlot\"].includes(cnf.chart.type);\n    const boxCandlestick = needsCandlestick ? new (getChartClass(\"candlestick\"))(ctx.w, ctx, xyRatios) : null;\n    const needsViolin = seriesTypes.violin.series.length > 0 || !gl.comboCharts && cnf.chart.type === \"violin\";\n    const violin = needsViolin ? new (getChartClass(\"violin\"))(ctx.w, ctx, xyRatios) : null;\n    const needsPie = !gl.comboCharts && [\"pie\", \"donut\", \"polarArea\"].includes(cnf.chart.type);\n    ctx.pie = needsPie ? new (getChartClass(\"pie\"))(ctx.w, ctx) : null;\n    const needsRangeBar = seriesTypes.rangeBar.series.length > 0 || !gl.comboCharts && cnf.chart.type === \"rangeBar\";\n    ctx.rangeBar = needsRangeBar ? new (getChartClass(\"rangeBar\"))(ctx.w, ctx, xyRatios) : null;\n    return { line, boxCandlestick, violin };\n  }\n  /**\n   * Build the ordered list of series graphic groups (elGraph) from the\n   * classified buckets. Combo charts layer per-type draws in z-order; a\n   * single-type chart dispatches on cnf.chart.type. Sets ctx.bar for the\n   * non-stacked bar paths (side effect, preserved). Extracted from\n   * plotChartType (audit C2).\n   * @param {Record<string, any>} seriesTypes\n   * @param {Record<string, {series: any[], i: number[]}>} customBuckets\n   * @param {{ line: any, boxCandlestick: any, violin: any }} renderers\n   * @param {import('../types/internal').XYRatios} xyRatios\n   * @returns {any}\n   */\n  _assembleSeriesGraphics(seriesTypes, customBuckets, renderers, xyRatios) {\n    const { w: w2, ctx } = this;\n    const { config: cnf, globals: gl } = w2;\n    const { line, boxCandlestick, violin } = renderers;\n    let elGraph = [];\n    if (gl.comboCharts) {\n      const coreUtils = new CoreUtils(this.w);\n      if (seriesTypes.area.series.length > 0) {\n        elGraph.push(\n          ...coreUtils.drawSeriesByGroup(\n            seriesTypes.area,\n            gl.areaGroups,\n            \"area\",\n            line\n          )\n        );\n      }\n      if (seriesTypes.bar.series.length > 0) {\n        if (cnf.chart.stacked) {\n          const barStacked = new (getChartClass(\"barStacked\"))(\n            ctx.w,\n            ctx,\n            xyRatios\n          );\n          elGraph.push(\n            barStacked.draw(seriesTypes.bar.series, seriesTypes.bar.i)\n          );\n        } else {\n          ctx.bar = new (getChartClass(\"bar\"))(ctx.w, ctx, xyRatios);\n          elGraph.push(ctx.bar.draw(seriesTypes.bar.series, seriesTypes.bar.i));\n        }\n      }\n      if (seriesTypes.rangeArea.series.length > 0) {\n        elGraph.push(\n          line.draw(\n            seriesTypes.rangeArea.series,\n            \"rangeArea\",\n            seriesTypes.rangeArea.i,\n            seriesTypes.rangeArea.seriesRangeEnd\n          )\n        );\n      }\n      if (seriesTypes.line.series.length > 0) {\n        elGraph.push(\n          ...coreUtils.drawSeriesByGroup(\n            seriesTypes.line,\n            gl.lineGroups,\n            \"line\",\n            line\n          )\n        );\n      }\n      if (seriesTypes.candlestick.series.length > 0) {\n        elGraph.push(\n          boxCandlestick.draw(\n            seriesTypes.candlestick.series,\n            \"candlestick\",\n            seriesTypes.candlestick.i\n          )\n        );\n      }\n      if (seriesTypes.boxPlot.series.length > 0) {\n        elGraph.push(\n          boxCandlestick.draw(\n            seriesTypes.boxPlot.series,\n            \"boxPlot\",\n            seriesTypes.boxPlot.i\n          )\n        );\n      }\n      if (seriesTypes.violin.series.length > 0) {\n        elGraph.push(\n          violin.draw(seriesTypes.violin.series, \"violin\", seriesTypes.violin.i)\n        );\n      }\n      if (seriesTypes.rangeBar.series.length > 0) {\n        elGraph.push(\n          ctx.rangeBar.draw(\n            seriesTypes.rangeBar.series,\n            seriesTypes.rangeBar.i\n          )\n        );\n      }\n      if (seriesTypes.scatter.series.length > 0) {\n        const scatterLine = new (getChartClass(\"line\"))(\n          ctx.w,\n          ctx,\n          xyRatios,\n          true\n        );\n        elGraph.push(\n          scatterLine.draw(\n            seriesTypes.scatter.series,\n            \"scatter\",\n            seriesTypes.scatter.i\n          )\n        );\n      }\n      if (seriesTypes.bubble.series.length > 0) {\n        const bubbleLine = new (getChartClass(\"line\"))(\n          ctx.w,\n          ctx,\n          xyRatios,\n          true\n        );\n        elGraph.push(\n          bubbleLine.draw(\n            seriesTypes.bubble.series,\n            \"bubble\",\n            seriesTypes.bubble.i\n          )\n        );\n      }\n      Object.keys(customBuckets).forEach((cname) => {\n        const bucket = customBuckets[cname];\n        if (bucket.series.length > 0) {\n          const cs = new (getChartClass(cname))(ctx.w, ctx, xyRatios);\n          elGraph.push(cs.draw(bucket.series, cname, bucket.i));\n        }\n      });\n    } else {\n      const type = cnf.chart.type;\n      switch (type) {\n        case \"line\":\n          elGraph = line.draw(this.w.seriesData.series, \"line\");\n          break;\n        case \"area\":\n          elGraph = line.draw(this.w.seriesData.series, \"area\");\n          break;\n        case \"bar\":\n          if (cnf.chart.stacked) {\n            const barStacked = new (getChartClass(\"barStacked\"))(\n              ctx.w,\n              ctx,\n              xyRatios\n            );\n            elGraph = barStacked.draw(this.w.seriesData.series);\n          } else {\n            ctx.bar = new (getChartClass(\"bar\"))(ctx.w, ctx, xyRatios);\n            elGraph = ctx.bar.draw(this.w.seriesData.series);\n          }\n          break;\n        case \"candlestick\":\n          elGraph = boxCandlestick.draw(this.w.seriesData.series, \"candlestick\");\n          break;\n        case \"boxPlot\":\n          elGraph = boxCandlestick.draw(this.w.seriesData.series, type);\n          break;\n        case \"violin\":\n          elGraph = violin.draw(this.w.seriesData.series, \"violin\");\n          break;\n        case \"rangeBar\":\n          elGraph = ctx.rangeBar.draw(this.w.seriesData.series);\n          break;\n        case \"rangeArea\":\n          elGraph = line.draw(\n            this.w.rangeData.seriesRangeStart,\n            \"rangeArea\",\n            void 0,\n            this.w.rangeData.seriesRangeEnd\n          );\n          break;\n        case \"heatmap\": {\n          const heatmap = new (getChartClass(\"heatmap\"))(ctx.w, ctx, xyRatios);\n          elGraph = heatmap.draw(this.w.seriesData.series);\n          break;\n        }\n        case \"treemap\": {\n          const treemap = new (getChartClass(\"treemap\"))(ctx.w, ctx);\n          elGraph = treemap.draw(this.w.seriesData.series);\n          break;\n        }\n        case \"unit\": {\n          const unit = new (getChartClass(\"unit\"))(ctx.w, ctx);\n          elGraph = unit.draw(this.w.seriesData.series);\n          break;\n        }\n        case \"sunburst\": {\n          const sunburst = new (getChartClass(\"sunburst\"))(ctx.w, ctx);\n          elGraph = sunburst.draw(this.w.seriesData.series);\n          break;\n        }\n        case \"pie\":\n        case \"donut\":\n        case \"polarArea\":\n          elGraph = ctx.pie.draw(this.w.seriesData.series);\n          break;\n        case \"radialBar\": {\n          const radialBar = new (getChartClass(\"radialBar\"))(ctx.w, ctx);\n          elGraph = radialBar.draw(this.w.seriesData.series);\n          break;\n        }\n        case \"radar\": {\n          const radar = new (getChartClass(\"radar\"))(ctx.w, ctx);\n          elGraph = radar.draw(this.w.seriesData.series);\n          break;\n        }\n        default:\n          if (isCustom(type)) {\n            const cs = new (getChartClass(type))(ctx.w, ctx, xyRatios);\n            elGraph = cs.draw(this.w.seriesData.series, type);\n          } else {\n            elGraph = line.draw(this.w.seriesData.series);\n          }\n      }\n    }\n    return elGraph;\n  }\n  /**\n   * Extract the CSS unit suffix from a chart width/height config value\n   * (`'100%'` -> `'%'`, `'300px'` -> `'px'`, `300`/`'300'` -> `''`). Kept as the\n   * original digit-split idiom so results are identical for every input the\n   * call sites already handle ('%', 'px', '', 'auto').\n   * @param {string|number} value\n   * @returns {string|undefined}\n   */\n  _extractDimensionUnit(value) {\n    return String(value).split(/[0-9]+/g).pop();\n  }\n  setSVGDimensions() {\n    var _a;\n    const { globals: gl, config: cnf } = this.w;\n    cnf.chart.width = cnf.chart.width || \"100%\";\n    cnf.chart.height = cnf.chart.height || \"auto\";\n    const rawWidth = cnf.chart.width;\n    const rawHeight = cnf.chart.height;\n    gl.svgWidth = NaN;\n    gl.svgHeight = NaN;\n    let elDim = Utils$1.getDimensions(this.el);\n    const widthUnit = this._extractDimensionUnit(rawWidth);\n    if (widthUnit === \"%\") {\n      if (Utils$1.isNumber(elDim[0])) {\n        if (elDim[0].width === 0) {\n          elDim = Utils$1.getDimensions(this.el.parentNode);\n        }\n        gl.svgWidth = elDim[0] * parseInt(rawWidth, 10) / 100;\n      }\n    } else if (widthUnit === \"px\" || widthUnit === \"\") {\n      gl.svgWidth = parseInt(rawWidth, 10);\n    }\n    const heightUnit = this._extractDimensionUnit(rawHeight);\n    if (rawHeight !== \"auto\" && rawHeight !== \"\") {\n      if (heightUnit === \"%\") {\n        const elParentDim = Utils$1.getDimensions(this.el.parentNode);\n        gl.svgHeight = elParentDim[1] * parseInt(rawHeight, 10) / 100;\n      } else {\n        gl.svgHeight = parseInt(rawHeight, 10);\n      }\n    } else {\n      gl.svgHeight = gl.axisCharts ? gl.svgWidth / 1.61 : gl.svgWidth / 1.2;\n    }\n    gl.svgWidth = Math.max(gl.svgWidth, 0);\n    gl.svgHeight = Math.max(gl.svgHeight, 0);\n    Graphics.setAttrs(this.w.dom.Paper.node, {\n      width: gl.svgWidth,\n      height: gl.svgHeight\n    });\n    if (heightUnit !== \"%\" && Environment.isBrowser()) {\n      const needsAxisPadding = gl.axisCharts && (cnf.grid.show || cnf.dataLabels.enabled || cnf.xaxis.labels.show || cnf.xaxis.axisBorder.show || cnf.xaxis.axisTicks.show || cnf.yaxis.some(\n        (y) => y.show && (y.labels.show || y.axisBorder.show || y.axisTicks.show)\n      ));\n      const offsetY = cnf.chart.sparkline.enabled || !needsAxisPadding ? 0 : cnf.chart.parentHeightOffset;\n      const paperNode = this.w.dom.Paper.node;\n      if ((_a = paperNode.parentNode) == null ? void 0 : _a.parentNode) {\n        paperNode.parentNode.parentNode.style.minHeight = `${gl.svgHeight + offsetY}px`;\n      }\n    }\n    this.w.dom.elWrap.style.width = `${gl.svgWidth}px`;\n    this.w.dom.elWrap.style.height = `${gl.svgHeight}px`;\n    gl.lastResizeSignature = this.getResizeSignature();\n  }\n  /**\n   * A stable fingerprint of the container measurements that actually feed the\n   * chart's rendered dimensions, given the width/height config. Only inputs that\n   * a resize can change are included: the element width when the width is a\n   * percentage, and the parent height when the height is a percentage. A fully\n   * pixel-sized chart therefore has a constant signature, so a resize never\n   * forces a redraw; a percentage-sized chart's signature tracks the container.\n   * The window-resize handler compares this against the last render to skip\n   * redraws (and the entrance-animation teardown they cause) that aren't needed.\n   * @returns {{ w: number, h: number }}\n   */\n  getResizeSignature() {\n    const { config: cnf } = this.w;\n    const rawWidth = (cnf.chart.width || \"100%\").toString().trim();\n    const rawHeight = (cnf.chart.height || \"auto\").toString().trim();\n    let w2 = 0;\n    let h2 = 0;\n    if (rawWidth.endsWith(\"%\")) {\n      let elDim = Utils$1.getDimensions(this.el);\n      if (!elDim[0]) elDim = Utils$1.getDimensions(this.el.parentNode);\n      w2 = elDim[0] || 0;\n    }\n    if (rawHeight.endsWith(\"%\")) {\n      h2 = Utils$1.getDimensions(this.el.parentNode)[1] || 0;\n    }\n    const sig = { w: Math.round(w2), h: Math.round(h2) };\n    if (cnf.responsive && cnf.responsive.length && Environment.isBrowser()) {\n      sig.iw = window.innerWidth;\n    }\n    return sig;\n  }\n  shiftGraphPosition() {\n    const { globals: gl } = this.w;\n    const { translateY: tY, translateX: tX } = gl;\n    Graphics.setAttrs(this.w.dom.elGraphical.node, {\n      transform: `translate(${tX}, ${tY})`\n    });\n  }\n  resizeNonAxisCharts() {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n    const { w: w2 } = this;\n    const heightStr = w2.config.chart.height ? String(w2.config.chart.height) : \"\";\n    const userSetFixedHeight = heightStr !== \"\" && heightStr !== \"auto\";\n    const isPercentHeight = heightStr.includes(\"%\");\n    let legendHeight = 0;\n    let offY = w2.config.chart.sparkline.enabled ? 1 : 15;\n    offY += w2.layout.gridPad.bottom;\n    if ([\"top\", \"bottom\"].includes(w2.config.legend.position) && w2.config.legend.show && !w2.config.legend.floating) {\n      legendHeight = ((_b = (_a = this.ctx.legend) == null ? void 0 : _a.legendHelpers.getLegendDimensions().clwh) != null ? _b : 0) + 7;\n    }\n    const el = w2.dom.baseEl.querySelector(\n      \".apexcharts-radialbar, .apexcharts-pie, .apexcharts-sunburst\"\n    );\n    const externalLabelMarginY = w2.globals.pieExternalLabelMarginY || 0;\n    let chartInnerDimensions = externalLabelMarginY > 0 ? w2.globals.radialSize * 2 + externalLabelMarginY * 2 : w2.globals.radialSize * 2.05;\n    const angleType = w2.config.chart.type === \"sunburst\" ? \"sunburst\" : w2.config.chart.type === \"pie\" || w2.config.chart.type === \"donut\" || w2.config.chart.type === \"polarArea\" ? \"pie\" : \"radialBar\";\n    const radialAngleSpan = Math.abs(\n      w2.config.plotOptions[angleType].endAngle - w2.config.plotOptions[angleType].startAngle\n    );\n    if (el && !w2.config.chart.sparkline.enabled && radialAngleSpan < 360) {\n      const svgRect = Utils$1.getBoundingClientRect(this.w.dom.Paper.node);\n      let arcTopFromSVGTop = Infinity;\n      let arcBottomFromSVGTop = -Infinity;\n      const accumulate = (node) => {\n        var _a2, _b2, _c2, _d2;\n        if ((_a2 = node.classList) == null ? void 0 : _a2.contains(\"apexcharts-radialbar-hollow\")) {\n          return;\n        }\n        const tag = (_c2 = (_b2 = node.tagName) == null ? void 0 : _b2.toLowerCase) == null ? void 0 : _c2.call(_b2);\n        if (tag === \"text\" || tag === \"tspan\") return;\n        const children = Array.from((_d2 = node.children) != null ? _d2 : []);\n        if (children.length > 0) {\n          children.forEach((c2) => accumulate(\n            /** @type {Element} */\n            c2\n          ));\n          return;\n        }\n        const r2 = Utils$1.getBoundingClientRect(node);\n        const height = r2.bottom - r2.top;\n        if (height > 0) {\n          const top = r2.top - svgRect.top;\n          const bottom = r2.bottom - svgRect.top;\n          if (top < arcTopFromSVGTop) arcTopFromSVGTop = top;\n          if (bottom > arcBottomFromSVGTop) arcBottomFromSVGTop = bottom;\n        }\n      };\n      Array.from((_c = el.children) != null ? _c : []).forEach(\n        (c2) => accumulate(\n          /** @type {Element} */\n          c2\n        )\n      );\n      if (!Number.isFinite(arcTopFromSVGTop)) arcTopFromSVGTop = 0;\n      if (!Number.isFinite(arcBottomFromSVGTop)) {\n        const elRect = Utils$1.getBoundingClientRect(el);\n        arcBottomFromSVGTop = elRect.bottom - svgRect.top;\n      }\n      const padding = Math.max(offY, w2.globals.radialSize * 0.2);\n      const verticalShift = Math.max(padding - arcTopFromSVGTop, 0);\n      if (verticalShift !== 0) {\n        w2.layout.translateY = ((_d = w2.layout.translateY) != null ? _d : 0) + verticalShift;\n        Graphics.setAttrs(this.w.dom.elGraphical.node, {\n          transform: `translate(${(_e = w2.layout.translateX) != null ? _e : 0}, ${w2.layout.translateY})`\n        });\n        arcBottomFromSVGTop += verticalShift;\n      }\n      chartInnerDimensions = arcBottomFromSVGTop > 0 ? arcBottomFromSVGTop : w2.globals.radialSize * 2.05;\n      const bottomPadding = Math.max(padding, arcTopFromSVGTop);\n      const svgHeight = Math.ceil(\n        chartInnerDimensions + legendHeight + bottomPadding\n      );\n      const chartOffsetY = (_f = w2.config.chart.offsetY) != null ? _f : 0;\n      const elWrapHeight = svgHeight + Math.max(chartOffsetY, 0);\n      if (!isPercentHeight) {\n        if (this.w.dom.elLegendForeign) {\n          this.w.dom.elLegendForeign.setAttribute(\n            \"height\",\n            String(elWrapHeight)\n          );\n        }\n        this.w.dom.elWrap.style.height = `${elWrapHeight}px`;\n        Graphics.setAttrs(this.w.dom.Paper.node, { height: svgHeight });\n        if (Environment.isBrowser()) {\n          const grandparent = (_g = this.w.dom.Paper.node.parentNode) == null ? void 0 : _g.parentNode;\n          if (grandparent) {\n            grandparent.style.minHeight = `${elWrapHeight}px`;\n          }\n        }\n        w2.globals.svgHeight = svgHeight;\n        if (w2.config.legend.position === \"bottom\" && w2.config.legend.show && !w2.config.legend.floating) {\n          (_h = this.ctx.legend) == null ? void 0 : _h.setLegendWrapXY(20, 0);\n        }\n      }\n      return;\n    }\n    const newHeight = Math.ceil(\n      chartInnerDimensions + this.w.layout.translateY + legendHeight + offY\n    );\n    if (userSetFixedHeight) return;\n    if (this.w.dom.elLegendForeign) {\n      this.w.dom.elLegendForeign.setAttribute(\"height\", String(newHeight));\n    }\n    this.w.dom.elWrap.style.height = `${newHeight}px`;\n    Graphics.setAttrs(this.w.dom.Paper.node, { height: newHeight });\n    if (Environment.isBrowser()) {\n      const grandparent = (_i = this.w.dom.Paper.node.parentNode) == null ? void 0 : _i.parentNode;\n      if (grandparent) {\n        grandparent.style.minHeight = `${newHeight}px`;\n      }\n    }\n  }\n  coreCalculations() {\n    new Range(this.w).init();\n  }\n  resetGlobals() {\n    const resetxyValues = () => this.w.config.series.map(() => []);\n    const globalObj = new Globals();\n    const { globals: gl } = this.w;\n    const parsingFlags = {\n      dataWasParsed: this.w.axisFlags.dataWasParsed,\n      originalSeries: gl.originalSeries\n    };\n    globalObj.initGlobalVars(gl);\n    gl.seriesXvalues = resetxyValues();\n    gl.seriesYvalues = resetxyValues();\n    if (parsingFlags.dataWasParsed) {\n      this.w.axisFlags.dataWasParsed = parsingFlags.dataWasParsed;\n      gl.originalSeries = parsingFlags.originalSeries;\n    }\n  }\n  isMultipleY() {\n    if (Array.isArray(this.w.config.yaxis) && this.w.config.yaxis.length > 1) {\n      this.w.globals.isMultipleYAxis = true;\n      return true;\n    }\n    return false;\n  }\n  xySettings() {\n    const { w: w2 } = this;\n    let xyRatios = null;\n    if (w2.globals.axisCharts) {\n      if (w2.config.xaxis.crosshairs.position === \"back\") {\n        new Crosshairs(this.w).drawXCrosshairs();\n      }\n      if (w2.config.yaxis[0].crosshairs.position === \"back\") {\n        new Crosshairs(this.w).drawYCrosshairs();\n      }\n      if (w2.config.xaxis.type === \"datetime\" && w2.config.xaxis.labels.formatter === void 0) {\n        this.ctx.timeScale = new TimeScale(this.w, this.ctx);\n        let formattedTimeScale = [];\n        if (isFinite(w2.globals.minX) && isFinite(w2.globals.maxX) && !w2.globals.isBarHorizontal) {\n          formattedTimeScale = this.ctx.timeScale.calculateTimeScaleTicks(\n            w2.globals.minX,\n            w2.globals.maxX\n          );\n        } else if (w2.globals.isBarHorizontal) {\n          formattedTimeScale = this.ctx.timeScale.calculateTimeScaleTicks(\n            w2.globals.minY,\n            w2.globals.maxY\n          );\n        }\n        this.ctx.timeScale.recalcDimensionsBasedOnFormat(formattedTimeScale);\n      }\n      const coreUtils = new CoreUtils(this.w);\n      xyRatios = coreUtils.getCalculatedRatios();\n    }\n    return xyRatios;\n  }\n  /**\n   * @param {any} targetChart\n   */\n  updateSourceChart(targetChart) {\n    this.ctx.w.interact.selection = void 0;\n    this.ctx.updateHelpers._updateOptions(\n      {\n        chart: {\n          selection: {\n            xaxis: {\n              min: targetChart.w.globals.minX,\n              max: targetChart.w.globals.maxX\n            }\n          }\n        }\n      },\n      false,\n      false\n    );\n  }\n  setupBrushHandler() {\n    const { ctx, w: w2 } = this;\n    if (!w2.config.chart.brush.enabled) return;\n    if (typeof w2.config.chart.events.selection !== \"function\") {\n      const targets = Array.isArray(w2.config.chart.brush.targets) ? w2.config.chart.brush.targets : [w2.config.chart.brush.target];\n      targets.forEach((target) => {\n        const targetChart = (\n          /** @type {any} */\n          ctx.constructor.getChartByID(\n            target\n          )\n        );\n        if (!targetChart) {\n          console.warn(\n            `ApexCharts: brush target \"${target}\" was not found. Ensure the target chart is rendered (and its chart.id matches) before the brush chart.`\n          );\n          return;\n        }\n        targetChart.w.globals.brushSource = this.ctx;\n        if (typeof targetChart.w.config.chart.events.zoomed !== \"function\") {\n          targetChart.w.config.chart.events.zoomed = () => this.updateSourceChart(targetChart);\n        }\n        if (typeof targetChart.w.config.chart.events.scrolled !== \"function\") {\n          targetChart.w.config.chart.events.scrolled = () => (\n            /**\n             * @param {any} chart\n             * @param {Event} e\n             */\n            this.updateSourceChart(targetChart)\n          );\n        }\n      });\n      w2.config.chart.events.selection = (chart, e2) => {\n        targets.forEach((target) => {\n          const targetChart = (\n            /** @type {any} */\n            ctx.constructor.getChartByID(\n              target\n            )\n          );\n          if (!targetChart) return;\n          targetChart.ctx.updateHelpers._updateOptions(\n            {\n              xaxis: {\n                min: e2.xaxis.min,\n                max: e2.xaxis.max\n              }\n            },\n            false,\n            false,\n            false,\n            false\n          );\n        });\n      };\n    }\n  }\n  getAccessibleChartLabel() {\n    const w2 = this.w;\n    const cnf = w2.config;\n    if (cnf.chart.accessibility && cnf.chart.accessibility.description) {\n      return cnf.chart.accessibility.description;\n    }\n    const chartType = cnf.chart.type;\n    const parts = [];\n    if (cnf.title.text) {\n      parts.push(`${cnf.title.text}. ${chartType} chart`);\n      if (cnf.subtitle.text) parts.push(cnf.subtitle.text);\n    } else {\n      const namedSeries = (() => {\n        if (Array.isArray(w2.seriesData.seriesNames) && w2.seriesData.seriesNames.length) {\n          return w2.seriesData.seriesNames.filter(Boolean);\n        }\n        if (Array.isArray(cnf.series)) {\n          return cnf.series.map((s2) => typeof s2 === \"object\" && s2 !== null ? s2.name : null).filter(Boolean);\n        }\n        return [];\n      })();\n      const seriesCount = w2.seriesData.series.length || (cnf.series ? cnf.series.length : 0);\n      if (namedSeries.length) {\n        parts.push(\n          `${chartType} chart with ${seriesCount} data series: ${namedSeries.join(\", \")}`\n        );\n      } else {\n        parts.push(`${chartType} chart with ${seriesCount} data series`);\n      }\n    }\n    return parts.join(\". \");\n  }\n}\nconst TRANSFORM_KEY = \"__apexcharts_series_transforms__\";\nif (!/** @type {any} */\nglobalThis[TRANSFORM_KEY]) {\n  globalThis[TRANSFORM_KEY] = {};\n}\nfunction getTransforms() {\n  return (\n    /** @type {any} */\n    globalThis[TRANSFORM_KEY]\n  );\n}\nfunction registerSeriesTransform(name2, fn) {\n  if (!name2 || typeof name2 !== \"string\") {\n    console.warn(\n      \"ApexCharts: registerSeriesTransform requires a non-empty name.\"\n    );\n    return;\n  }\n  if (typeof fn !== \"function\") {\n    console.warn(\n      `ApexCharts: registerSeriesTransform(\"${name2}\") expects a function (series, w) => series.`\n    );\n    return;\n  }\n  getTransforms()[name2] = fn;\n}\nfunction getSeriesTransform(name2) {\n  if (!name2) return null;\n  return getTransforms()[name2] || null;\n}\nfunction drilldownById(w2, id) {\n  const dd = w2.config.drilldown;\n  const list = dd && Array.isArray(dd.series) ? dd.series : [];\n  return list.find((s2) => s2 && s2.id === id);\n}\nfunction toNode(w2, d, i2, paletteFromParent, parentKey, seenIds = null, opts = {}) {\n  var _a, _b, _c;\n  const isObj = d && typeof d === \"object\";\n  const name2 = isObj ? (_b = (_a = d.x) != null ? _a : d.name) != null ? _b : \"\" : \"\";\n  const value = isObj ? Number((_c = d.y) != null ? _c : d.value) : Number(d);\n  const node = {\n    name: String(name2),\n    value: isNaN(value) ? null : value,\n    color: isObj && d.color ? d.color : void 0,\n    // Identity across data updates: the path of names (indexed so same-named\n    // siblings stay distinct). Update animations morph matched keys in place.\n    _key: `${parentKey}/${i2}:${name2}`\n  };\n  if (paletteFromParent && !node.color) {\n    node.color = paletteFromParent[i2 % paletteFromParent.length];\n  }\n  if (opts.keepDatum) node._datum = d;\n  if (isObj && Array.isArray(d.children) && d.children.length) {\n    node.children = d.children.map(\n      (c2, j) => toNode(w2, c2, j, null, node._key, seenIds, opts)\n    );\n  } else if (isObj && d.drilldown != null && opts.expandDrilldown !== false) {\n    const visited = seenIds || /* @__PURE__ */ new Set();\n    if (!visited.has(d.drilldown)) {\n      const dd = drilldownById(w2, d.drilldown);\n      if (dd && Array.isArray(dd.data) && dd.data.length) {\n        const nextSeen = new Set(visited);\n        nextSeen.add(d.drilldown);\n        const palette = Array.isArray(dd.colors) ? dd.colors : null;\n        node.children = dd.data.map(\n          (c2, j) => toNode(w2, c2, j, palette, node._key, nextSeen, opts)\n        );\n      }\n    }\n  }\n  return node;\n}\nfunction buildHierarchy(w2, opts = {}) {\n  const cfgSeries = (\n    /** @type {any} */\n    w2.config.series\n  );\n  const first = cfgSeries && cfgSeries[0];\n  const data = first && Array.isArray(first.data) ? first.data : cfgSeries;\n  if (!Array.isArray(data)) return [];\n  return data.map(\n    (d, i2) => toNode(w2, d, i2, null, \"\", null, opts)\n  );\n}\nfunction buildSeriesRoots(w2, series, opts = {}) {\n  const cfgSeries = (\n    /** @type {any} */\n    series || w2.config.series\n  );\n  if (!Array.isArray(cfgSeries)) return [];\n  return cfgSeries.map((s2, i2) => {\n    var _a, _b;\n    const data = s2 && Array.isArray(s2.data) ? s2.data : [];\n    const key = `${i2}:${(_a = s2 == null ? void 0 : s2.name) != null ? _a : \"\"}`;\n    const root = {\n      name: String((_b = s2 == null ? void 0 : s2.name) != null ? _b : \"\"),\n      value: null,\n      color: (s2 == null ? void 0 : s2.color) || void 0,\n      _key: key,\n      _seriesIndex: i2,\n      children: data.map(\n        (d, j) => toNode(w2, d, j, null, key, null, opts)\n      )\n    };\n    return root;\n  });\n}\nfunction fillValues(node) {\n  if (node.children && node.children.length) {\n    node.children.forEach((c2) => fillValues(c2));\n    if (node.value == null || isNaN(node.value)) {\n      node.value = node.children.reduce(\n        (s2, c2) => s2 + Math.max(0, c2.value || 0),\n        0\n      );\n    }\n  }\n  if (node.value == null || isNaN(node.value)) node.value = 0;\n}\nfunction hasNesting(series, opts = {}) {\n  if (!Array.isArray(series)) return false;\n  const countDrilldown = opts.drilldown !== false;\n  for (let i2 = 0; i2 < series.length; i2++) {\n    const data = series[i2] && series[i2].data;\n    if (!Array.isArray(data)) continue;\n    for (let j = 0; j < data.length; j++) {\n      const d = data[j];\n      if (!d || typeof d !== \"object\") continue;\n      if (Array.isArray(d.children) && d.children.length) return true;\n      if (countDrilldown && d.drilldown != null) return true;\n    }\n  }\n  return false;\n}\nfunction morphKey(key) {\n  if (typeof key !== \"string\") return \"\";\n  const i2 = key.indexOf(\"/\");\n  return i2 === -1 ? \"\" : key.slice(i2);\n}\nfunction drilldownAsLevels(w2) {\n  var _a, _b, _c, _d;\n  return !!((_d = (_c = (_b = (_a = w2 == null ? void 0 : w2.config) == null ? void 0 : _a.plotOptions) == null ? void 0 : _b.treemap) == null ? void 0 : _c.nested) == null ? void 0 : _d.drilldownAsLevels);\n}\nfunction isNestedTreemap(w2, series) {\n  var _a, _b, _c;\n  const nestedCfg = (_c = (_b = (_a = w2 == null ? void 0 : w2.config) == null ? void 0 : _a.plotOptions) == null ? void 0 : _b.treemap) == null ? void 0 : _c.nested;\n  if (nestedCfg && nestedCfg.enabled === false) return false;\n  return hasNesting(series, { drilldown: drilldownAsLevels(w2) });\n}\nfunction annotate(roots) {\n  const leaves = [];\n  let maxDepth = 0;\n  roots.forEach((root, si) => {\n    const seriesLeaves = [];\n    const walk = (node, depth, parent) => {\n      node._parent = parent;\n      node._depth = depth;\n      node._si = si;\n      node._leaf = !(node.children && node.children.length);\n      if (depth > maxDepth) maxDepth = depth;\n      if (node._leaf) {\n        node._di = seriesLeaves.length;\n        seriesLeaves.push(node);\n      } else {\n        node._di = -1;\n        node.children.forEach(\n          (c2) => walk(c2, depth + 1, node)\n        );\n      }\n    };\n    walk(root, 0, null);\n    leaves.push(seriesLeaves);\n  });\n  return { leaves, maxDepth };\n}\nfunction leafRow(node) {\n  const d = node._datum;\n  if (d && typeof d === \"object\") {\n    const row = __spreadProps(__spreadValues({}, d), { x: node.name, y: node.value });\n    delete row.children;\n    return row;\n  }\n  return { x: node.name, y: node.value };\n}\nfunction resolveTreemapTree(w2, series) {\n  const roots = buildSeriesRoots(w2, series, {\n    keepDatum: true,\n    expandDrilldown: drilldownAsLevels(w2)\n  });\n  roots.forEach(fillValues);\n  const { leaves, maxDepth } = annotate(roots);\n  const leafSeries = series.map((s2, i2) => __spreadProps(__spreadValues({}, s2), {\n    data: (leaves[i2] || []).map(leafRow)\n  }));\n  return { roots, leafSeries, maxDepth };\n}\nfunction getTreemapRoots(w2) {\n  const stashed = w2.globals.treemapRoots;\n  if (stashed && stashed.length) {\n    return {\n      roots: stashed,\n      maxDepth: w2.globals.treemapMaxDepth || 1,\n      nested: true\n    };\n  }\n  const roots = buildSeriesRoots(w2, w2.config.series, {\n    keepDatum: true,\n    expandDrilldown: false\n  });\n  roots.forEach(fillValues);\n  const { maxDepth } = annotate(roots);\n  return { roots, maxDepth, nested: false };\n}\nconst RAW_SAMPLE_TYPES = [\"histogram\"];\nclass Data {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   */\n  constructor(w2, { resetGlobals = () => {\n  }, isMultipleY = () => {\n  } } = {}) {\n    this.w = w2;\n    this.resetGlobals = resetGlobals;\n    this.isMultipleY = isMultipleY;\n    this.twoDSeries = [];\n    this.threeDSeries = [];\n    this.twoDSeriesX = [];\n    this.seriesGoals = [];\n    this._warnedMissingTransform = false;\n    this.coreUtils = new CoreUtils(this.w);\n    this.activeSeriesIndex = 0;\n  }\n  // Helper to get the first valid data point from the active series\n  getFirstDataPoint() {\n    const series = this.w.config.series;\n    const sr = new Series(this.w);\n    this.activeSeriesIndex = sr.getActiveConfigSeriesIndex();\n    const activeItem = (\n      /** @type {any} */\n      series[this.activeSeriesIndex]\n    );\n    if (activeItem && activeItem.data && activeItem.data.length > 0 && activeItem.data[0] !== null && typeof activeItem.data[0] !== \"undefined\") {\n      return activeItem.data[0];\n    }\n    return null;\n  }\n  isMultiFormat() {\n    return this.isFormatXY() || this.isFormat2DArray();\n  }\n  // given format is [{x, y}, {x, y}]\n  isFormatXY() {\n    var _a;\n    const firstDataPoint = this.getFirstDataPoint();\n    if (!firstDataPoint || typeof firstDataPoint.x === \"undefined\") return false;\n    const data = (\n      /** @type {any} */\n      (_a = this.w.config.series[this.activeSeriesIndex]) == null ? void 0 : _a.data\n    );\n    if (data) {\n      const isXY = (pt) => pt && typeof pt.x !== \"undefined\";\n      for (let k = 1; k < Math.min(3, data.length); k++) {\n        if (isXY(data[k]) !== true) {\n          console.warn(\n            `ApexCharts: series data has mixed formats starting at index ${k}`\n          );\n          break;\n        }\n      }\n    }\n    return true;\n  }\n  // given format is [[x, y], [x, y]]\n  isFormat2DArray() {\n    const firstDataPoint = this.getFirstDataPoint();\n    return firstDataPoint && Array.isArray(firstDataPoint);\n  }\n  /**\n   * Typed single pass for the dominant [[x, y], ...] shape: scalar numeric or\n   * null y, no z, no OHLC tuples. One monomorphic loop fills preallocated\n   * x/y arrays and fuses the y-extrema scan that Range.getMinYMaxY would\n   * otherwise repeat over every value (the extrema entry is ref+length\n   * guarded, so any later reshaping of the series array simply falls back to\n   * the scan). Returns false untouched on any non-conforming point so the\n   * general loop below handles mixed/exotic data with unchanged output.\n   * @param {any[]} data\n   * @param {number} i\n   * @returns {boolean}\n   */\n  _fast2DArrayParse(data, i2) {\n    var _a, _b;\n    const n2 = data.length;\n    if (n2 === 0) return false;\n    const ys = new Array(n2);\n    const xs = new Array(n2);\n    let maxY = -Number.MAX_VALUE;\n    let lowestY = Number.MAX_VALUE;\n    let negMinY = Infinity;\n    let hasNulls = false;\n    let yDec = 0;\n    let xNumeric = true;\n    let minX = Infinity;\n    let maxX = -Infinity;\n    let xSorted = true;\n    let minXDiff = Infinity;\n    let prevX = NaN;\n    for (let j = 0; j < n2; j++) {\n      const point = data[j];\n      if (!Array.isArray(point) || point.length > 2) return false;\n      const x = point[0];\n      const y = point[1];\n      if (xNumeric) {\n        if (typeof x === \"number\") {\n          if (x === x) {\n            if (x < minX) minX = x;\n            if (x > maxX) maxX = x;\n          }\n          const d = x - prevX;\n          if (d > 0) {\n            if (d < minXDiff) minXDiff = d;\n          } else if (d < 0) {\n            xSorted = false;\n          }\n          prevX = x;\n        } else {\n          xNumeric = false;\n        }\n      }\n      if (typeof y === \"number\") {\n        if (y === y && y !== Infinity && y !== -Infinity) {\n          if (y > maxY) maxY = y;\n          if (y < lowestY) lowestY = y;\n          if (y < 0 && y < negMinY) negMinY = y;\n          if (!Number.isInteger(y)) {\n            const av = y < 0 ? -y : y;\n            if (av >= 1e-6 && av < 1e21) {\n              const str = \"\" + y;\n              const dot = str.indexOf(\".\");\n              const dec = dot === -1 ? 0 : str.length - dot - 1;\n              if (dec > yDec) yDec = dec;\n            } else {\n              const nv = Utils$1.noExponents(y);\n              if (Utils$1.isFloat(nv)) {\n                yDec = Math.max(yDec, nv.toString().split(\".\")[1].length);\n              }\n            }\n          }\n        } else {\n          hasNulls = true;\n        }\n      } else if (y === null) {\n        hasNulls = true;\n      } else {\n        return false;\n      }\n      ys[j] = y;\n      xs[j] = x;\n    }\n    this.twoDSeries = ys;\n    this.twoDSeriesX = xs;\n    this.w.axisFlags.dataFormatXNumeric = true;\n    const extrema = (_b = (_a = this.w.seriesData)._parsedExtrema) != null ? _b : _a._parsedExtrema = [];\n    extrema[i2] = {\n      ref: ys,\n      len: n2,\n      maxY,\n      lowestY,\n      negMinY,\n      hasNulls,\n      yDec,\n      xref: xs,\n      xNumeric,\n      minX,\n      maxX,\n      xSorted,\n      minXDiff\n    };\n    return true;\n  }\n  /**\n   * @param {any[]} ser\n   * @param {number} i\n   */\n  handleFormat2DArray(ser, i2) {\n    const cnf = this.w.config;\n    const data = ser[i2].data;\n    const isBoxPlot = cnf.chart.type === \"boxPlot\" || /** @type {any} */\n    cnf.series[i2].type === \"boxPlot\";\n    if (!isBoxPlot && cnf.xaxis.type !== \"datetime\" && this._fast2DArrayParse(data, i2)) {\n      return;\n    }\n    for (let j = 0; j < data.length; j++) {\n      const point = data[j];\n      const x = point[0];\n      const y = point[1];\n      const z = point[2];\n      if (typeof y !== \"undefined\") {\n        if (Array.isArray(y) && y.length === 4 && !isBoxPlot) {\n          this.twoDSeries.push(Utils$1.parseNumber(y[3]));\n        } else if (point.length >= 5) {\n          this.twoDSeries.push(Utils$1.parseNumber(point[4]));\n        } else {\n          this.twoDSeries.push(Utils$1.parseNumber(y));\n        }\n        this.w.axisFlags.dataFormatXNumeric = true;\n      }\n      if (cnf.xaxis.type === \"datetime\") {\n        const ts = new Date(x).getTime();\n        this.twoDSeriesX.push(ts);\n      } else {\n        this.twoDSeriesX.push(x);\n      }\n      if (typeof z !== \"undefined\") {\n        this.threeDSeries.push(z);\n        this.w.axisFlags.isDataXYZ = true;\n      }\n    }\n  }\n  /**\n   * @param {any[]} ser\n   * @param {number} i\n   */\n  handleFormatXY(ser, i2) {\n    const cnf = this.w.config;\n    const gl = this.w.globals;\n    const dt = new DateTime(this.w);\n    const data = ser[i2].data;\n    let activeI = i2;\n    if (gl.collapsedSeriesIndices.indexOf(i2) > -1) {\n      activeI = this.activeSeriesIndex;\n    }\n    const activeData = ser[activeI].data;\n    for (let j = 0; j < data.length; j++) {\n      const point = data[j];\n      if (typeof point.y !== \"undefined\") {\n        const val = Array.isArray(point.y) ? Utils$1.parseNumber(point.y[point.y.length - 1]) : Utils$1.parseNumber(point.y);\n        this.twoDSeries.push(val);\n      }\n      if (typeof this.seriesGoals[i2] === \"undefined\") {\n        this.seriesGoals[i2] = [];\n      }\n      if (typeof point.goals !== \"undefined\" && Array.isArray(point.goals)) {\n        this.seriesGoals[i2].push(point.goals);\n      } else {\n        this.seriesGoals[i2].push(null);\n      }\n      if (typeof point.z !== \"undefined\") {\n        this.threeDSeries.push(point.z);\n        this.w.axisFlags.isDataXYZ = true;\n      }\n    }\n    for (let j = 0; j < activeData.length; j++) {\n      const point = activeData[j];\n      const x = point.x;\n      const isXString = typeof x === \"string\";\n      const isXArr = Array.isArray(x);\n      const isXDate = !isXArr && !!dt.isValidDate(x);\n      if (isXString || isXDate) {\n        if (isXString || cnf.xaxis.convertedCatToNumeric) {\n          const isRangeColumn = gl.isBarHorizontal && this.w.axisFlags.isRangeData;\n          if (cnf.xaxis.type === \"datetime\" && !isRangeColumn) {\n            this.twoDSeriesX.push(dt.parseDate(x));\n          } else {\n            this.fallbackToCategory = true;\n            this.twoDSeriesX.push(x);\n            if (!isNaN(x) && this.w.config.xaxis.type !== \"category\" && typeof x !== \"string\") {\n              this.w.axisFlags.isXNumeric = true;\n            }\n          }\n        } else {\n          if (cnf.xaxis.type === \"datetime\") {\n            this.twoDSeriesX.push(\n              x instanceof Date ? x.getTime() : dt.parseDate(x.toString())\n            );\n          } else {\n            this.w.axisFlags.dataFormatXNumeric = true;\n            this.w.axisFlags.isXNumeric = true;\n            this.twoDSeriesX.push(parseFloat(x));\n          }\n        }\n      } else if (isXArr) {\n        this.fallbackToCategory = true;\n        this.twoDSeriesX.push(x);\n      } else {\n        this.w.axisFlags.isXNumeric = true;\n        this.w.axisFlags.dataFormatXNumeric = true;\n        this.twoDSeriesX.push(x);\n      }\n    }\n  }\n  /**\n   * @param {any[]} ser\n   * @param {number} i\n   */\n  handleRangeData(ser, i2) {\n    let range = { start: [], end: [], rangeUniques: [] };\n    if (this.isFormat2DArray()) {\n      range = this.handleRangeDataFormat(\"array\", ser, i2);\n    } else if (this.isFormatXY()) {\n      range = this.handleRangeDataFormat(\"xy\", ser, i2);\n    }\n    this.w.rangeData.seriesRangeStart[i2] = range.start === void 0 ? [] : range.start;\n    this.w.rangeData.seriesRangeEnd[i2] = range.end === void 0 ? [] : range.end;\n    this.w.rangeData.seriesRange[i2] = range.rangeUniques;\n    this.w.rangeData.seriesRange.forEach((sr) => {\n      if (!sr) return;\n      sr.forEach((sarr) => {\n        const yItems = (\n          /** @type {any} */\n          sarr.y\n        );\n        const len = (\n          /** @type {any[]} */\n          yItems.length\n        );\n        if (len <= 1) return;\n        for (let arri = 0; arri < len; arri++) {\n          const arr = (\n            /** @type {any} */\n            yItems[arri]\n          );\n          const range1y1 = arr.y1;\n          const range1y2 = arr.y2;\n          for (let sri = arri + 1; sri < len; sri++) {\n            const range2 = (\n              /** @type {any} */\n              yItems[sri]\n            );\n            const range2y1 = range2.y1;\n            const range2y2 = range2.y2;\n            if (range1y1 <= range2y2 && range2y1 <= range1y2) {\n              const sarrAny = (\n                /** @type {any} */\n                sarr\n              );\n              sarrAny.overlaps.add(arr.rangeName);\n              sarrAny.overlaps.add(range2.rangeName);\n            }\n          }\n        }\n      });\n    });\n    return range;\n  }\n  /**\n   * Marks (#11) P3: fold a custom series' per-datum y-extent into the\n   * range-data slice so both bounds drive the y-axis scale. When `yExtent` is\n   * given it supplies the values a datum occupies (scalar or array => min/max\n   * across them); otherwise the datum's `y` is used (array => first/last,\n   * scalar => itself). The datum still carries a representative scalar `y`\n   * (folded by handleFormatXY into seriesData.series) that gates Range.\n   * @param {any[]} ser @param {number} i @param {Function|null} yExtent\n   */\n  handleCustomRangeData(ser, i2, yExtent) {\n    const data = ser[i2].data || [];\n    const start = [];\n    const end = [];\n    for (let j = 0; j < data.length; j++) {\n      const datum = data[j];\n      let lo;\n      let hi;\n      if (typeof yExtent === \"function\") {\n        let ext = yExtent(datum, j);\n        if (!Array.isArray(ext)) ext = [ext];\n        const nums = ext.map((v2) => Utils$1.parseNumber(v2)).filter((v2) => v2 !== null && !isNaN(v2));\n        lo = nums.length ? Math.min(...nums) : null;\n        hi = nums.length ? Math.max(...nums) : null;\n      } else {\n        const y = datum == null ? null : datum.y;\n        if (Array.isArray(y)) {\n          lo = Utils$1.parseNumber(y[0]);\n          hi = Utils$1.parseNumber(y[y.length - 1]);\n        } else {\n          lo = hi = Utils$1.parseNumber(y);\n        }\n      }\n      start.push(lo);\n      end.push(hi);\n    }\n    this.w.rangeData.seriesRangeStart[i2] = start;\n    this.w.rangeData.seriesRangeEnd[i2] = end;\n  }\n  /**\n   * @param {any[]} ser\n   * @param {number} i\n   */\n  handleCandleStickBoxData(ser, i2) {\n    let ohlc = { o: [], h: [], m: [], l: [], c: [] };\n    if (this.isFormat2DArray()) {\n      ohlc = this.handleCandleStickBoxDataFormat(\"array\", ser, i2);\n    } else if (this.isFormatXY()) {\n      ohlc = this.handleCandleStickBoxDataFormat(\"xy\", ser, i2);\n    }\n    this.w.candleData.seriesCandleO[i2] = ohlc.o;\n    this.w.candleData.seriesCandleH[i2] = ohlc.h;\n    this.w.candleData.seriesCandleM[i2] = ohlc.m;\n    this.w.candleData.seriesCandleL[i2] = ohlc.l;\n    this.w.candleData.seriesCandleC[i2] = ohlc.c;\n    this.w.candleData.seriesBoxPoints[i2] = ohlc.points || [];\n    return ohlc;\n  }\n  /**\n   * Parse a violin series. Each data point carries a precomputed density\n   * profile (the violin shape) and an array of raw observations (the jitter):\n   *\n   *   { x, y: { density: [[value, weight], ...], points: [v1, v2, ...] } }\n   *\n   * Array fallback form: [x, densityPairs, pointsArray].\n   *\n   * Density `weight` need not be normalized — Violin.js scales each violin by\n   * its own maxWeight. The representative scalar pushed into the main series\n   * (so generic code paths see a non-null y) is the density mode — the value\n   * carrying the greatest weight.\n   *\n   * @param {any[]} ser\n   * @param {number} i\n   */\n  handleViolinData(ser, i2) {\n    var _a, _b, _c, _d, _e, _f;\n    const w2 = this.w;\n    const data = ser[i2].data;\n    const densityArr = [];\n    const pointsArr = [];\n    const minArr = [];\n    const maxArr = [];\n    const placeholders = [];\n    for (let j = 0; j < data.length; j++) {\n      const d = data[j];\n      const dens = (_c = (_b = (_a = d == null ? void 0 : d.y) == null ? void 0 : _a.density) != null ? _b : d == null ? void 0 : d[1]) != null ? _c : [];\n      const pts = (_f = (_e = (_d = d == null ? void 0 : d.y) == null ? void 0 : _d.points) != null ? _e : d == null ? void 0 : d[2]) != null ? _f : [];\n      const values = [];\n      const weights = [];\n      let maxWeight = 0;\n      let modeValue = null;\n      let minVal = Infinity;\n      let maxVal = -Infinity;\n      for (let k = 0; k < dens.length; k++) {\n        const v2 = Utils$1.parseNumber(dens[k][0]);\n        const wt = Utils$1.parseNumber(dens[k][1]);\n        if (v2 === null || wt === null) continue;\n        values.push(v2);\n        weights.push(wt);\n        if (wt > maxWeight) {\n          maxWeight = wt;\n          modeValue = v2;\n        }\n        if (v2 < minVal) minVal = v2;\n        if (v2 > maxVal) maxVal = v2;\n      }\n      const cleanPts = [];\n      for (let k = 0; k < pts.length; k++) {\n        const p2 = Utils$1.parseNumber(pts[k]);\n        if (p2 === null) continue;\n        cleanPts.push(p2);\n        if (p2 < minVal) minVal = p2;\n        if (p2 > maxVal) maxVal = p2;\n      }\n      densityArr.push({ values, weights, maxWeight });\n      pointsArr.push(cleanPts);\n      minArr.push(minVal === Infinity ? 0 : minVal);\n      maxArr.push(maxVal === -Infinity ? 0 : maxVal);\n      placeholders.push(\n        modeValue !== null ? modeValue : cleanPts.length ? cleanPts[Math.floor(cleanPts.length / 2)] : 0\n      );\n    }\n    w2.violinData.seriesViolinDensity[i2] = densityArr;\n    w2.violinData.seriesViolinPoints[i2] = pointsArr;\n    w2.violinData.seriesViolinMin[i2] = minArr;\n    w2.violinData.seriesViolinMax[i2] = maxArr;\n    this.twoDSeries = placeholders;\n  }\n  /**\n   * @param {string} format\n   * @param {any[]} ser\n   * @param {number} i\n   */\n  handleRangeDataFormat(format, ser, i2) {\n    const rangeStart = [];\n    const rangeEnd = [];\n    const uniqueKeysMap = /* @__PURE__ */ new Map();\n    const uniqueKeys = [];\n    ser[i2].data.forEach((item) => {\n      if (!uniqueKeysMap.has(item.x)) {\n        const keyObj = {\n          x: item.x,\n          overlaps: /* @__PURE__ */ new Set(),\n          y: []\n        };\n        uniqueKeysMap.set(item.x, keyObj);\n        uniqueKeys.push(keyObj);\n      }\n    });\n    if (format === \"array\") {\n      for (let j = 0; j < ser[i2].data.length; j++) {\n        if (Array.isArray(ser[i2].data[j])) {\n          rangeStart.push(ser[i2].data[j][1][0]);\n          rangeEnd.push(ser[i2].data[j][1][1]);\n        } else {\n          rangeStart.push(ser[i2].data[j]);\n          rangeEnd.push(ser[i2].data[j]);\n        }\n      }\n    } else if (format === \"xy\") {\n      for (let j = 0; j < ser[i2].data.length; j++) {\n        const isDataPoint2D = Array.isArray(ser[i2].data[j].y);\n        const id = Utils$1.randomId();\n        const x = ser[i2].data[j].x;\n        const y = {\n          y1: isDataPoint2D ? ser[i2].data[j].y[0] : ser[i2].data[j].y,\n          y2: isDataPoint2D ? ser[i2].data[j].y[1] : ser[i2].data[j].y,\n          rangeName: id\n        };\n        const gl = this.w.globals;\n        if (!gl.seriesRangeName) gl.seriesRangeName = {};\n        if (!gl.seriesRangeName[i2]) gl.seriesRangeName[i2] = {};\n        gl.seriesRangeName[i2][j] = id;\n        const keyObj = uniqueKeysMap.get(x);\n        if (keyObj) {\n          keyObj.y.push(y);\n        }\n        rangeStart.push(y.y1);\n        rangeEnd.push(y.y2);\n      }\n    }\n    return {\n      start: rangeStart,\n      end: rangeEnd,\n      rangeUniques: uniqueKeys\n    };\n  }\n  /**\n   * @param {string} format\n   * @param {any[]} ser\n   * @param {number} i\n   */\n  handleCandleStickBoxDataFormat(format, ser, i2) {\n    const w2 = this.w;\n    const isBoxPlot = w2.config.chart.type === \"boxPlot\" || /** @type {Record<string,any>} */\n    w2.config.series[i2].type === \"boxPlot\";\n    const serO = [];\n    const serH = [];\n    const serM = [];\n    const serL = [];\n    const serC = [];\n    const serPoints = [];\n    const data = ser[i2].data;\n    let getVals;\n    if (format === \"array\") {\n      const first = data[0];\n      const isFlat = isBoxPlot && first && first.length === 6 || !isBoxPlot && first && first.length === 5;\n      if (isFlat) {\n        getVals = (d) => d.slice(1);\n      } else {\n        getVals = (d) => Array.isArray(d[1]) ? d[1] : [];\n      }\n    } else {\n      getVals = (d) => Array.isArray(d.y) ? d.y : [];\n    }\n    for (let j = 0; j < data.length; j++) {\n      const vals = getVals(data[j]);\n      if (vals && vals.length >= 2) {\n        serO.push(vals[0]);\n        serH.push(vals[1]);\n        if (isBoxPlot) {\n          serM.push(vals[2]);\n          serL.push(vals[3]);\n          serC.push(vals[4]);\n        } else {\n          serL.push(vals[2]);\n          serC.push(vals[3]);\n        }\n      }\n      const pts = data[j] && /** @type {any} */\n      data[j].points;\n      serPoints.push(Array.isArray(pts) ? pts : []);\n    }\n    return {\n      o: serO,\n      h: serH,\n      m: serM,\n      l: serL,\n      c: serC,\n      points: serPoints\n    };\n  }\n  /**\n   * @param {any[]} ser\n   */\n  parseDataAxisCharts(ser) {\n    var _a, _b, _c, _d, _e, _f;\n    const cnf = this.w.config;\n    const gl = this.w.globals;\n    const dt = new DateTime(this.w);\n    this.w.seriesData._parsedExtrema = [];\n    const xlabels = cnf.labels.length > 0 ? cnf.labels.slice() : cnf.xaxis.categories.slice();\n    this.w.axisFlags.isRangeBar = cnf.chart.type === \"rangeBar\" && gl.isBarHorizontal;\n    this.w.labelData.hasXaxisGroups = cnf.xaxis.type === \"category\" && cnf.xaxis.group.groups.length > 0;\n    if (this.w.labelData.hasXaxisGroups) {\n      this.w.labelData.groups = cnf.xaxis.group.groups;\n    }\n    ser.forEach((s2, i2) => {\n      if (s2.name !== void 0) {\n        this.w.seriesData.seriesNames.push(s2.name);\n      } else {\n        this.w.seriesData.seriesNames.push(\n          \"series-\" + parseInt(String(i2 + 1), 10)\n        );\n      }\n    });\n    this.coreUtils.setSeriesYAxisMappings();\n    const buckets = [];\n    const groups = [\n      ...new Set(cnf.series.map((s2) => s2.group))\n    ];\n    cnf.series.forEach((s2, i2) => {\n      const index = groups.indexOf(s2.group);\n      if (!buckets[index]) buckets[index] = [];\n      buckets[index].push(this.w.seriesData.seriesNames[i2]);\n    });\n    this.w.labelData.seriesGroups = buckets;\n    const handleDates = () => {\n      for (let j = 0; j < xlabels.length; j++) {\n        if (typeof xlabels[j] === \"string\") {\n          const isDate = dt.isValidDate(xlabels[j]);\n          if (isDate) {\n            this.twoDSeriesX.push(dt.parseDate(xlabels[j]));\n          } else {\n            throw new Error(\n              \"You have provided invalid Date format. Please provide a valid JavaScript Date\"\n            );\n          }\n        } else {\n          this.twoDSeriesX.push(xlabels[j]);\n        }\n      }\n    };\n    for (let i2 = 0; i2 < ser.length; i2++) {\n      this.twoDSeries = [];\n      this.twoDSeriesX = [];\n      this.threeDSeries = [];\n      if (typeof ser[i2].data === \"undefined\") {\n        console.error(\n          \"It is a possibility that you may have not included 'data' property in series.\"\n        );\n        ser[i2] = __spreadProps(__spreadValues({}, ser[i2]), { data: [] });\n      }\n      const dr = cnf.chart.dataReducer;\n      const rawStash = (_b = (_a = gl.dataReducerRawSeries) == null ? void 0 : _a[i2]) == null ? void 0 : _b.data;\n      if ((dr == null ? void 0 : dr.enabled) && this.isMultiFormat() && Array.isArray(rawStash) && rawStash.length > ((_c = dr.threshold) != null ? _c : 500)) {\n        const targetPoints = (_d = dr.targetPoints) != null ? _d : 250;\n        const xmin = cnf.xaxis.min;\n        const xmax = cnf.xaxis.max;\n        const windowed = xmin == null && xmax == null ? rawStash : Data.sliceByXRange(rawStash, xmin, xmax);\n        let reduced = windowed;\n        if (windowed.length > targetPoints) {\n          const sampleY = !Array.isArray(windowed[0]) ? (_e = windowed[0]) == null ? void 0 : _e.y : (_f = windowed[0]) == null ? void 0 : _f[1];\n          if (Array.isArray(sampleY)) {\n            if (sampleY.length === 4) {\n              reduced = Data.ohlcAggregate(windowed, targetPoints);\n            } else if (sampleY.length === 2) {\n              reduced = Data.rangeAggregate(windowed, targetPoints);\n            }\n          } else {\n            reduced = Data.lttbDownsample(windowed, targetPoints);\n          }\n        }\n        ser[i2] = __spreadProps(__spreadValues({}, ser[i2]), { data: reduced });\n      }\n      if (cnf.chart.type === \"rangeBar\" || cnf.chart.type === \"rangeArea\" || ser[i2].type === \"rangeBar\" || ser[i2].type === \"rangeArea\") {\n        this.w.axisFlags.isRangeData = true;\n        this.handleRangeData(ser, i2);\n      }\n      const customType = ser[i2].type || cnf.chart.type;\n      if (isCustom(customType)) {\n        const cls = (\n          /** @type {any} */\n          getChartClass(customType)\n        );\n        const yExtent = cls && cls.yExtent;\n        if (cls && cls.dataType === \"rangeXY\" || typeof yExtent === \"function\") {\n          this.w.axisFlags.isRangeData = true;\n          this.handleCustomRangeData(ser, i2, yExtent);\n        }\n      }\n      if (this.isMultiFormat()) {\n        if (this.isFormat2DArray()) {\n          this.handleFormat2DArray(ser, i2);\n        } else if (this.isFormatXY()) {\n          this.handleFormatXY(ser, i2);\n        }\n        if (cnf.chart.type === \"candlestick\" || ser[i2].type === \"candlestick\" || cnf.chart.type === \"boxPlot\" || ser[i2].type === \"boxPlot\") {\n          this.handleCandleStickBoxData(ser, i2);\n        }\n        if (cnf.chart.type === \"violin\" || ser[i2].type === \"violin\") {\n          this.handleViolinData(ser, i2);\n        }\n        this.w.seriesData.series.push(this.twoDSeries);\n        this.w.labelData.labels.push(this.twoDSeriesX);\n        this.w.seriesData.seriesX.push(this.twoDSeriesX);\n        this.w.seriesData.seriesGoals = this.seriesGoals;\n        if (i2 === this.activeSeriesIndex && !this.fallbackToCategory) {\n          this.w.axisFlags.isXNumeric = true;\n        }\n      } else {\n        if (cnf.xaxis.type === \"datetime\") {\n          this.w.axisFlags.isXNumeric = true;\n          handleDates();\n          this.w.seriesData.seriesX.push(this.twoDSeriesX);\n        } else if (cnf.xaxis.type === \"numeric\") {\n          this.w.axisFlags.isXNumeric = true;\n          if (xlabels.length > 0) {\n            this.twoDSeriesX = xlabels;\n            this.w.seriesData.seriesX.push(this.twoDSeriesX);\n          }\n        }\n        this.w.labelData.labels.push(this.twoDSeriesX);\n        const singleArray = ser[i2].data.map(\n          (d) => Utils$1.parseNumber(d)\n        );\n        this.w.seriesData.series.push(singleArray);\n      }\n      this.w.seriesData.seriesZ.push(this.threeDSeries);\n      if (ser[i2].color !== void 0) {\n        this.w.seriesData.seriesColors.push(ser[i2].color);\n      } else {\n        this.w.seriesData.seriesColors.push(\n          /** @type {any} */\n          void 0\n        );\n      }\n    }\n    return this.w;\n  }\n  /**\n   * @param {any[]} ser\n   */\n  parseDataNonAxisCharts(ser) {\n    const cnf = this.w.config;\n    this.w.seriesData.unitData = [];\n    const hasOldFormat = Array.isArray(ser) && ser.every((s2) => typeof s2 === \"number\") && cnf.labels.length > 0;\n    const hasNewFormat = Array.isArray(ser) && ser.some(\n      (s2) => s2 && typeof s2 === \"object\" && s2.data || s2 && typeof s2 === \"object\" && s2.parsing\n    );\n    if (cnf.chart.type === \"unit\" && hasNewFormat && !hasOldFormat) {\n      return this.parseUnitSeries(ser);\n    }\n    if (hasOldFormat && hasNewFormat) {\n      console.warn(\n        \"ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility.\"\n      );\n    }\n    if (hasOldFormat) {\n      this.w.seriesData.series = /** @type {any} */\n      ser.slice();\n      this.w.seriesData.seriesNames = cnf.labels.slice();\n      for (let i2 = 0; i2 < this.w.seriesData.series.length; i2++) {\n        if (this.w.seriesData.seriesNames[i2] === void 0) {\n          this.w.seriesData.seriesNames.push(\"series-\" + (i2 + 1));\n        }\n      }\n      return this.w;\n    }\n    if (Array.isArray(ser) && ser.every((s2) => typeof s2 === \"number\")) {\n      this.w.seriesData.series = /** @type {any} */\n      ser.slice();\n      this.w.seriesData.seriesNames = [];\n      for (let i2 = 0; i2 < this.w.seriesData.series.length; i2++) {\n        this.w.seriesData.seriesNames.push(cnf.labels[i2] || `series-${i2 + 1}`);\n      }\n      return this.w;\n    }\n    const processedData = this.extractPieDataFromSeries(ser);\n    this.w.seriesData.series = processedData.values;\n    this.w.seriesData.seriesNames = processedData.labels;\n    if (cnf.chart.type === \"radialBar\") {\n      this.w.seriesData.series = this.w.seriesData.series.map((val) => {\n        const numVal = Utils$1.parseNumber(val);\n        if (numVal > 100) {\n          console.warn(\n            `ApexCharts: RadialBar value ${numVal} > 100, consider using percentage values (0-100)`\n          );\n        }\n        return numVal;\n      });\n    }\n    for (let i2 = 0; i2 < this.w.seriesData.series.length; i2++) {\n      if (this.w.seriesData.seriesNames[i2] === void 0) {\n        this.w.seriesData.seriesNames.push(\"series-\" + (i2 + 1));\n      }\n    }\n    return this.w;\n  }\n  /**\n   * Parse the unit chart's per-unit object form:\n   *   series: [{ name, data: [datum, datum, ...] }, ...]\n   * Each category's dot count is `data.length` (one dot per datum), and the\n   * per-unit data is kept on `w.seriesData.unitData` so the renderer can colour\n   * dots individually and the tooltip can show each unit's own info.\n   * @param {any[]} ser\n   * @returns {any} w\n   */\n  parseUnitSeries(ser) {\n    const cnf = this.w.config;\n    const series = [];\n    const seriesNames = [];\n    const unitData = [];\n    ser.forEach((s2, i2) => {\n      var _a;\n      const data = s2 && Array.isArray(s2.data) ? s2.data : [];\n      series.push(data.length);\n      const name2 = s2 && s2.name !== void 0 && s2.name !== null ? s2.name : void 0;\n      seriesNames.push((_a = name2 != null ? name2 : cnf.labels[i2]) != null ? _a : `series-${i2 + 1}`);\n      unitData.push(data.slice());\n    });\n    this.w.seriesData.series = /** @type {any} */\n    series;\n    this.w.seriesData.seriesNames = seriesNames;\n    this.w.seriesData.unitData = unitData;\n    return this.w;\n  }\n  /**\n   * Reset parsing flags to allow re-parsing of data during updates\n   */\n  resetParsingFlags() {\n    const w2 = this.w;\n    w2.axisFlags.dataWasParsed = false;\n    w2.globals.originalSeries = null;\n    if (w2.config.series) {\n      w2.config.series.forEach((serie) => {\n        if (\n          /** @type {any} */\n          serie.__apexParsed\n        ) {\n          delete /** @type {any} */\n          serie.__apexParsed;\n        }\n      });\n    }\n  }\n  /**\n   * @param {any[]} ser\n   */\n  extractPieDataFromSeries(ser) {\n    const values = [];\n    const labels = [];\n    if (!Array.isArray(ser)) {\n      console.warn(\"ApexCharts: Expected array for series data\");\n      return { values: [], labels: [] };\n    }\n    if (ser.length === 0) {\n      console.warn(\"ApexCharts: Empty series array\");\n      return { values: [], labels: [] };\n    }\n    const firstItem = ser[0];\n    if (typeof firstItem === \"object\" && firstItem !== null && firstItem.data) {\n      this.extractPieDataFromSeriesObjects(ser, values, labels);\n    } else {\n      console.warn(\n        \"ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property.\"\n      );\n      return { values: [], labels: [] };\n    }\n    return { values, labels };\n  }\n  // Extract data from series objects: [{ data: [...], parsing: {...} }]\n  /**\n   * @param {any[]} seriesArray\n   * @param {any[]} values\n   * @param {any[]} labels\n   */\n  extractPieDataFromSeriesObjects(seriesArray, values, labels) {\n    seriesArray.forEach((serie, serieIndex) => {\n      if (!serie.data || !Array.isArray(serie.data)) {\n        console.warn(`ApexCharts: Series ${serieIndex} has no valid data array`);\n        return;\n      }\n      serie.data.forEach((dataPoint) => {\n        if (typeof dataPoint === \"object\" && dataPoint !== null) {\n          if (dataPoint.x !== void 0 && dataPoint.y !== void 0) {\n            labels.push(String(dataPoint.x));\n            values.push(Utils$1.parseNumber(dataPoint.y));\n          } else {\n            console.warn(\n              \"ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:\",\n              dataPoint\n            );\n          }\n        } else {\n          console.warn(\n            \"ApexCharts: Expected object data point, got:\",\n            typeof dataPoint\n          );\n        }\n      });\n    });\n  }\n  /** User possibly set string categories in xaxis.categories or labels prop\n   * Or didn't set xaxis labels at all - in which case we manually do it.\n   * If user passed series data as [[3, 2], [4, 5]] or [{ x: 3, y: 55 }],\n   * this shouldn't be called\n   * @param {any[]} ser - the series which user passed to the config\n   */\n  handleExternalLabelsData(ser) {\n    const cnf = this.w.config;\n    if (cnf.xaxis.categories.length > 0) {\n      this.w.labelData.labels = cnf.xaxis.categories;\n    } else if (cnf.labels.length > 0) {\n      this.w.labelData.labels = cnf.labels.slice();\n    } else if (this.fallbackToCategory) {\n      this.w.labelData.labels = /** @type {string[]} */\n      /** @type {unknown} */\n      this.w.labelData.labels[0];\n      if (this.w.rangeData.seriesRange.length) {\n        this.w.rangeData.seriesRange.map((srt) => {\n          srt.forEach((sr) => {\n            if (this.w.labelData.labels.indexOf(sr.x) < 0 && sr.x) {\n              this.w.labelData.labels.push(sr.x);\n            }\n          });\n        });\n        const _labels = this.w.labelData.labels;\n        if (_labels.length > 0 && (typeof _labels[0] === \"number\" || typeof _labels[0] === \"string\")) {\n          this.w.labelData.labels = [...new Set(_labels)];\n        } else {\n          const _seen = /* @__PURE__ */ new Map();\n          for (const _label of _labels) {\n            const _key = JSON.stringify(_label);\n            if (!_seen.has(_key)) _seen.set(_key, _label);\n          }\n          this.w.labelData.labels = Array.from(_seen.values());\n        }\n      }\n      if (cnf.xaxis.convertedCatToNumeric) {\n        const defaults = new Defaults(cnf);\n        defaults.convertCatToNumericXaxis(cnf, this.w.seriesData.seriesX[0]);\n        this._generateExternalLabels(ser);\n      }\n    } else {\n      this._generateExternalLabels(ser);\n    }\n  }\n  /**\n   * @param {any[]} ser\n   */\n  _generateExternalLabels(ser) {\n    const gl = this.w.globals;\n    const cnf = this.w.config;\n    let labelArr = [];\n    if (gl.axisCharts) {\n      if (this.w.seriesData.series.length > 0) {\n        if (this.isFormatXY()) {\n          const seriesDataFiltered = cnf.series.map(\n            (serie) => {\n              const seen = /* @__PURE__ */ new Map();\n              for (const point of serie.data) {\n                if (!seen.has(point.x)) seen.set(point.x, point);\n              }\n              return Array.from(seen.values());\n            }\n          );\n          const len = seriesDataFiltered.reduce(\n            (p2, c2, i2, a2) => a2[p2].length > c2.length ? p2 : i2,\n            0\n          );\n          for (let i2 = 0; i2 < seriesDataFiltered[len].length; i2++) {\n            labelArr.push(i2 + 1);\n          }\n        } else {\n          for (let i2 = 0; i2 < this.w.seriesData.series[gl.maxValsInArrayIndex].length; i2++) {\n            labelArr.push(i2 + 1);\n          }\n        }\n      }\n      this.w.seriesData.seriesX = [];\n      for (let i2 = 0; i2 < ser.length; i2++) {\n        this.w.seriesData.seriesX.push(labelArr);\n      }\n      if (!this.w.globals.isBarHorizontal) {\n        this.w.axisFlags.isXNumeric = true;\n      }\n    }\n    if (labelArr.length === 0) {\n      labelArr = gl.axisCharts ? [] : (\n        /**\n         * @param {Record<string, any>} gls\n         * @param {number} glsi\n         */\n        this.w.seriesData.series.map((gls, glsi) => {\n          return glsi + 1;\n        })\n      );\n      for (let i2 = 0; i2 < ser.length; i2++) {\n        this.w.seriesData.seriesX.push(labelArr);\n      }\n    }\n    this.w.labelData.labels = /** @type {string[]} */\n    /** @type {unknown} */\n    labelArr;\n    if (cnf.xaxis.convertedCatToNumeric) {\n      this.w.labelData.categoryLabels = labelArr.map((l2) => {\n        return cnf.xaxis.labels.formatter(l2);\n      });\n    }\n    this.w.axisFlags.noLabelsProvided = true;\n  }\n  /**\n   * @param {any[]} series\n   */\n  parseRawDataIfNeeded(series) {\n    const cnf = this.w.config;\n    const gl = this.w.globals;\n    const globalParsing = cnf.parsing;\n    if (this.w.axisFlags.dataWasParsed) {\n      return series;\n    }\n    const hasGlobalParsing = !!(globalParsing && (globalParsing.x || globalParsing.y || globalParsing.z));\n    const hasSeriesParsing = series.some(\n      (s2) => s2.parsing && (s2.parsing.x || s2.parsing.y || s2.parsing.z)\n    );\n    if (!hasGlobalParsing && !hasSeriesParsing) {\n      return series;\n    }\n    const processedSeries = series.map((serie, index) => {\n      var _a, _b, _c, _d, _e;\n      if (!serie.data || !Array.isArray(serie.data) || serie.data.length === 0) {\n        return serie;\n      }\n      const effectiveParsing = {\n        x: ((_a = serie.parsing) == null ? void 0 : _a.x) || (globalParsing == null ? void 0 : globalParsing.x),\n        y: ((_b = serie.parsing) == null ? void 0 : _b.y) || (globalParsing == null ? void 0 : globalParsing.y),\n        z: ((_c = serie.parsing) == null ? void 0 : _c.z) || (globalParsing == null ? void 0 : globalParsing.z)\n      };\n      if (!effectiveParsing.x && !effectiveParsing.y) {\n        return serie;\n      }\n      const firstDataPoint = serie.data[0];\n      if (typeof firstDataPoint === \"object\" && firstDataPoint !== null && (Object.prototype.hasOwnProperty.call(firstDataPoint, \"x\") || Object.prototype.hasOwnProperty.call(firstDataPoint, \"y\")) || Array.isArray(firstDataPoint)) {\n        return serie;\n      }\n      if (!effectiveParsing.x || !effectiveParsing.y || Array.isArray(effectiveParsing.y) && effectiveParsing.y.length === 0) {\n        const missing = [];\n        if (!effectiveParsing.x) missing.push(\"x\");\n        if (!effectiveParsing.y || Array.isArray(effectiveParsing.y) && effectiveParsing.y.length === 0) {\n          missing.push(\"y\");\n        }\n        const seriesName = (_d = serie.name) != null ? _d : `series[${index}]`;\n        console.warn(\n          `ApexCharts [${this.w.globals.chartID}]: \"${seriesName}\" has a parseData config but is missing the '${missing.join(\n            \"', '\"\n          )}' field specification.`,\n          { parsing: (_e = serie.parsing) != null ? _e : globalParsing }\n        );\n        return serie;\n      }\n      const transformedData = serie.data.map(\n        (item, itemIndex) => {\n          if (typeof item !== \"object\" || item === null) {\n            console.warn(\n              `ApexCharts: Series ${index}, data point ${itemIndex} is not an object, skipping parsing`\n            );\n            return item;\n          }\n          const x = this.getNestedValue(item, effectiveParsing.x);\n          let y;\n          let z = void 0;\n          if (Array.isArray(effectiveParsing.y)) {\n            const yValues = effectiveParsing.y.map(\n              (fieldName) => this.getNestedValue(item, fieldName)\n            );\n            if (this.w.config.chart.type === \"bubble\") {\n              if (yValues.length < 2) {\n                console.warn(\n                  `ApexCharts: series[${index}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(effectiveParsing.y)}`\n                );\n              }\n              y = yValues[0];\n            } else {\n              y = yValues;\n            }\n          } else {\n            y = this.getNestedValue(item, effectiveParsing.y);\n          }\n          if (effectiveParsing.z) {\n            z = this.getNestedValue(item, effectiveParsing.z);\n          }\n          if (x === void 0) {\n            console.warn(\n              `ApexCharts: Series ${index}, data point ${itemIndex} missing field '${effectiveParsing.x}'`\n            );\n          }\n          if (y === void 0) {\n            console.warn(\n              `ApexCharts: Series ${index}, data point ${itemIndex} missing field '${effectiveParsing.y}'`\n            );\n          }\n          const result = { x, y, z: void 0 };\n          if (this.w.config.chart.type === \"bubble\" && Array.isArray(effectiveParsing.y) && effectiveParsing.y.length === 2) {\n            const zValue = this.getNestedValue(item, effectiveParsing.y[1]);\n            if (zValue !== void 0) {\n              result.z = zValue;\n            }\n          }\n          if (z !== void 0) {\n            result.z = z;\n          }\n          return result;\n        }\n      );\n      return __spreadProps(__spreadValues({}, serie), {\n        data: transformedData,\n        __apexParsed: true\n      });\n    });\n    this.w.axisFlags.dataWasParsed = true;\n    if (!gl.originalSeries) {\n      gl.originalSeries = Utils$1.clone(series);\n    }\n    return processedSeries;\n  }\n  /**\n   * Get nested object value using dot notation path\n   * @param {Object} obj - The object to search in\n   * @param {string} path - Dot notation path (e.g., 'user.profile.name')\n   * @returns {*} The value at the path, or undefined if not found\n   */\n  getNestedValue(obj, path) {\n    if (!obj || typeof obj !== \"object\" || !path) {\n      return void 0;\n    }\n    if (path.indexOf(\".\") === -1) {\n      return (\n        /** @type {any} */\n        obj[path]\n      );\n    }\n    const keys = path.split(\".\");\n    let current = obj;\n    for (let i2 = 0; i2 < keys.length; i2++) {\n      if (current === null || current === void 0 || typeof current !== \"object\") {\n        return void 0;\n      }\n      current = /** @type {any} */\n      current[keys[i2]];\n    }\n    return current;\n  }\n  /**\n   * Optional pre-parse series transform. A chart type whose series carries RAW\n   * observations rather than the values it draws (a histogram's sample, and in\n   * time a boxPlot's or a violin's) registers a transform through\n   * `apexcharts/features/stats`. Core keeps only this lookup, so a bundle that\n   * never asks for a raw-sample type never pays for the statistics.\n   *\n   * @param {any[]} ser\n   * @returns {any[]}\n   */\n  applySeriesTransform(ser) {\n    const cnf = this.w.config;\n    const name2 = cnf.chart.requestedType || cnf.chart.type;\n    const transform = getSeriesTransform(name2);\n    if (transform) return transform(ser, this.w);\n    if (!Array.isArray(ser) || RAW_SAMPLE_TYPES.indexOf(name2) === -1) return ser;\n    if (!this._warnedMissingTransform) {\n      this._warnedMissingTransform = true;\n      console.warn(\n        `ApexCharts: chart.type '${name2}' needs the stats feature. Add \\`import 'apexcharts/features/stats'\\`, or import from 'apexcharts/${name2}'.`\n      );\n    }\n    return ser.map((s2) => __spreadProps(__spreadValues({}, s2), { data: [] }));\n  }\n  /**\n   * Nested treemap: resolve a `children` hierarchy into the tree the renderer\n   * lays out, and return the leaves as a flat series.\n   *\n   * Everything downstream of here addresses a treemap by `(seriesIndex,\n   * dataPointIndex)` into a flat matrix, so the leaves are flattened in\n   * depth-first order and `dataPointIndex` keeps meaning \"the nth leaf of this\n   * series\". The tree itself goes on globals for the renderer.\n   *\n   * `cnf.series` is replaced with the flattened leaves further down parseData,\n   * which is the only copy that survives — so the nested input is stashed on\n   * the first parse and every later parse resolves from the stash, never from\n   * the already-flattened view. That is the same contract the histogram's raw\n   * observations and the downsampler's raw series use, and `_updateSeries`\n   * clears all three when the user pushes new data.\n   *\n   * @param {any[]} ser\n   * @returns {any[]}\n   */\n  flattenTreemapHierarchy(ser) {\n    const w2 = this.w;\n    const gl = w2.globals;\n    if (w2.config.chart.type !== \"treemap\" || !Array.isArray(ser)) return ser;\n    if (!gl.treemapRawSeries) {\n      if (!isNestedTreemap(w2, ser)) {\n        gl.treemapRoots = null;\n        return ser;\n      }\n      gl.treemapRawSeries = ser.map((s2) => __spreadProps(__spreadValues({}, s2), {\n        data: Array.isArray(s2 == null ? void 0 : s2.data) ? s2.data.slice() : s2 == null ? void 0 : s2.data\n      }));\n    }\n    const { roots, leafSeries, maxDepth } = resolveTreemapTree(\n      w2,\n      gl.treemapRawSeries\n    );\n    gl.treemapRoots = roots;\n    gl.treemapMaxDepth = maxDepth;\n    return leafSeries;\n  }\n  /**\n   * Scatter strip-plot support. When `plotOptions.scatter.jitter.enabled` and a\n   * series carries compact `{ x: 'Category', y: [v1, v2, ...] }` data, expand\n   * each observation into its own `{ x: bandIndex, y }` point (so every dot is a\n   * first-class, hoverable marker) and frame the x-axis as evenly-spaced,\n   * labelled bands. The reference per-point form (numeric x + `xaxis.categories`)\n   * is reframed too, without expansion. Returns `ser` unchanged for non-scatter\n   * charts and for plain numeric/datetime data (continuous overplotting jitter\n   * is offset at render time instead).\n   *\n   * @param {any[]} ser\n   * @returns {any[]}\n   */\n  expandScatterJitterData(ser) {\n    var _a, _b;\n    const cnf = this.w.config;\n    const isScatter = cnf.chart.type === \"scatter\" || cnf.chart.type === \"bubble\";\n    const jt = (_b = (_a = cnf.plotOptions) == null ? void 0 : _a.scatter) == null ? void 0 : _b.jitter;\n    if (!isScatter || !jt || !jt.enabled || !Array.isArray(ser)) return ser;\n    const hasArrayY = ser.some(\n      (s2) => Array.isArray(s2 == null ? void 0 : s2.data) && s2.data.some(\n        (d) => d && !Array.isArray(d) && Array.isArray(d.y)\n      )\n    );\n    if (!hasArrayY) {\n      if (cnf.xaxis.type !== \"datetime\") {\n        if (Array.isArray(cnf.xaxis.categories) && cnf.xaxis.categories.length) {\n          this._applyBandAxis(cnf.xaxis.categories.slice());\n        } else if (Array.isArray(cnf.xaxis._scatterBandLabels) && cnf.xaxis._scatterBandLabels.length) {\n          this._applyBandAxis(cnf.xaxis._scatterBandLabels);\n        }\n      }\n      return ser;\n    }\n    const bandLabels = [];\n    const bandIndex = /* @__PURE__ */ new Map();\n    ser.forEach((s2) => {\n      if (!Array.isArray(s2 == null ? void 0 : s2.data)) return;\n      s2.data.forEach((d) => {\n        if (d && Array.isArray(d.y)) {\n          const key = String(d.x);\n          if (!bandIndex.has(key)) {\n            bandIndex.set(key, bandLabels.length);\n            bandLabels.push(d.x);\n          }\n        }\n      });\n    });\n    const maxPoints = jt.maxPoints || 5e3;\n    const expanded = ser.map((s2) => {\n      if (!Array.isArray(s2 == null ? void 0 : s2.data)) return s2;\n      const out = [];\n      s2.data.forEach((d) => {\n        if (d && Array.isArray(d.y)) {\n          const bi = bandIndex.get(String(d.x));\n          const ys = d.y;\n          const stride = ys.length > maxPoints ? Math.ceil(ys.length / maxPoints) : 1;\n          for (let k = 0; k < ys.length; k += stride) {\n            const yv = Utils$1.parseNumber(ys[k]);\n            if (yv === null) continue;\n            out.push({ x: bi, y: yv });\n          }\n        } else if (d && typeof d === \"object\" && !Array.isArray(d)) {\n          const key = String(d.x);\n          out.push({ x: bandIndex.has(key) ? bandIndex.get(key) : d.x, y: d.y });\n        } else {\n          out.push(d);\n        }\n      });\n      return __spreadProps(__spreadValues({}, s2), { data: out });\n    });\n    this._applyBandAxis(bandLabels);\n    return expanded;\n  }\n  /**\n   * Frame the x-axis as N evenly-spaced bands (one per category) on a numeric\n   * scale. Bands sit at integer positions 0..N-1; the range is padded by a full\n   * band on each side (min -1, max N) so jittered dots never clip. Crucially the\n   * range bounds and tick count are integers, so the ticks land exactly on the\n   * band centers regardless of how the numeric scale \"nices\" the step (e.g. the\n   * small-range reduction in Scales._adjustTicksForSmallRange triggered by a\n   * y-axis formatter). Only fills in options the user hasn't set, so explicit\n   * min/max/tickAmount/formatter still win. The exception is an interactive\n   * zoom/pan window (w.interact.zoomed): its fractional bounds are snapped to\n   * whole bands so tick labels stay on band centers and edge bands are never\n   * half-cropped.\n   *\n   * @param {any[]} bandLabels\n   */\n  _applyBandAxis(bandLabels) {\n    var _a;\n    const xa = this.w.config.xaxis;\n    const n2 = bandLabels.length;\n    if (!n2) return;\n    const owned = (\n      /** @type {Record<string, boolean>} */\n      xa._scatterBand = xa._scatterBand || {}\n    );\n    xa._scatterBandLabels = bandLabels.slice();\n    xa.type = \"numeric\";\n    if (((_a = this.w.interact) == null ? void 0 : _a.zoomed) && typeof xa.min === \"number\" && typeof xa.max === \"number\" && isFinite(xa.min) && isFinite(xa.max)) {\n      const clampBand = (b2) => Math.max(0, Math.min(n2 - 1, b2));\n      let first = clampBand(Math.round(xa.min + 0.49));\n      let last = clampBand(Math.round(xa.max - 0.49));\n      if (last < first) {\n        first = last = clampBand(Math.round((xa.min + xa.max) / 2));\n      }\n      xa.min = first - 1;\n      xa.max = last + 1;\n      xa.tickAmount = last - first + 2;\n      owned.min = true;\n      owned.max = true;\n      owned.tick = true;\n    } else {\n      if (xa.min == null || owned.min) {\n        xa.min = -1;\n        owned.min = true;\n      }\n      if (xa.max == null || owned.max) {\n        xa.max = n2;\n        owned.max = true;\n      }\n      if (xa.tickAmount == null || xa.tickAmount === \"dataPoints\" || owned.tick) {\n        xa.tickAmount = n2 + 1;\n        owned.tick = true;\n      }\n    }\n    xa.labels = xa.labels || {};\n    const existing = (\n      /** @type {any} */\n      xa.labels.formatter\n    );\n    if (typeof existing !== \"function\" || existing._scatterBand) {\n      const fmt = (\n        /** @type {any} */\n        ((val) => {\n          const r2 = Math.round(val);\n          return Math.abs(val - r2) < 1e-6 && bandLabels[r2] !== void 0 ? bandLabels[r2] : \"\";\n        })\n      );\n      fmt._scatterBand = true;\n      xa.labels.formatter = fmt;\n    }\n  }\n  // Segregate user provided data into appropriate vars\n  /**\n   * @param {any[]} ser\n   */\n  parseData(ser) {\n    var _a, _b, _c, _d, _e, _f, _g;\n    const w2 = this.w;\n    const cnf = w2.config;\n    const gl = w2.globals;\n    ser = this.parseRawDataIfNeeded(ser);\n    ser = this.applySeriesTransform(ser);\n    ser = this.expandScatterJitterData(ser);\n    ser = this.flattenTreemapHierarchy(ser);\n    if (((_a = cnf.chart.dataReducer) == null ? void 0 : _a.enabled) && gl.axisCharts && !gl.dataReducerRawSeries) {\n      gl.dataReducerRawSeries = ser.map((s2) => ({\n        data: Array.isArray(s2 == null ? void 0 : s2.data) ? s2.data.slice() : s2 == null ? void 0 : s2.data\n      }));\n      let rawMinX = Infinity;\n      let rawMaxX = -Infinity;\n      for (const s2 of ser) {\n        const d = s2 == null ? void 0 : s2.data;\n        if (!Array.isArray(d) || d.length === 0) continue;\n        const isXY = !Array.isArray(d[0]);\n        const firstX = isXY ? (_b = d[0]) == null ? void 0 : _b.x : (_c = d[0]) == null ? void 0 : _c[0];\n        const lastX = isXY ? (_d = d[d.length - 1]) == null ? void 0 : _d.x : (_e = d[d.length - 1]) == null ? void 0 : _e[0];\n        if (typeof firstX === \"number\") rawMinX = Math.min(rawMinX, firstX);\n        if (typeof lastX === \"number\") rawMaxX = Math.max(rawMaxX, lastX);\n      }\n      if (rawMinX !== Infinity) {\n        gl.dataReducerRawMinX = rawMinX;\n        gl.dataReducerRawMaxX = rawMaxX;\n      }\n    }\n    if (gl.dataReducerRawSeries && ((_f = cnf.chart.dataReducer) == null ? void 0 : _f.enabled)) {\n      ser = ser.map((s2) => __spreadValues({}, s2));\n    }\n    cnf.series = ser;\n    if (gl.dataReducerRawSeries && ((_g = cnf.chart.dataReducer) == null ? void 0 : _g.enabled)) {\n      const stash = gl.dataReducerRawSeries;\n      gl.initialSeries = ser.map((s2, i2) => {\n        var _a2, _b2, _c2;\n        return __spreadProps(__spreadValues({}, s2), {\n          data: (_c2 = (_b2 = (_a2 = stash[i2]) == null ? void 0 : _a2.data) == null ? void 0 : _b2.slice()) != null ? _c2 : s2.data\n        });\n      });\n    } else if (gl.histogramRawSeries) {\n      gl.initialSeries = gl.histogramRawSeries;\n    } else if (gl.treemapRawSeries) {\n      gl.initialSeries = gl.treemapRawSeries;\n    } else {\n      gl.initialSeries = ser;\n    }\n    this.excludeCollapsedSeriesInYAxis();\n    this.fallbackToCategory = false;\n    this.resetGlobals();\n    this.isMultipleY();\n    if (gl.axisCharts) {\n      this.parseDataAxisCharts(ser);\n      this.coreUtils.getLargestSeries();\n    } else {\n      this.parseDataNonAxisCharts(ser);\n    }\n    if (cnf.chart.stacked) {\n      const series = new Series(this.w);\n      this.w.seriesData.series = series.setNullSeriesToZeroValues(\n        this.w.seriesData.series\n      );\n    }\n    this.coreUtils.getSeriesTotals();\n    if (gl.axisCharts) {\n      Data._defineLazyResult(\n        this.w.seriesData,\n        \"stackedSeriesTotals\",\n        () => this.coreUtils.getStackedSeriesTotals()\n      );\n      Data._defineLazyResult(\n        this.w.seriesData,\n        \"stackedSeriesTotalsByGroups\",\n        () => this.coreUtils.getStackedSeriesTotalsByGroups()\n      );\n      Data._defineLazyResult(gl, \"seriesPercent\", () => {\n        this.coreUtils.getPercentSeries();\n        return gl.seriesPercent;\n      });\n    } else {\n      this.coreUtils.getPercentSeries();\n    }\n    if (!this.w.axisFlags.dataFormatXNumeric && (!this.w.axisFlags.isXNumeric || cnf.xaxis.type === \"numeric\" && cnf.labels.length === 0 && cnf.xaxis.categories.length === 0)) {\n      this.handleExternalLabelsData(ser);\n    }\n    const catLabels = this.coreUtils.getCategoryLabels(this.w.labelData.labels);\n    for (let l2 = 0; l2 < catLabels.length; l2++) {\n      if (Array.isArray(catLabels[l2])) {\n        this.w.axisFlags.isMultiLineX = true;\n        break;\n      }\n    }\n    return {\n      // w.seriesData (future slice)\n      // initialSeries/originalSeries and the stacked totals are deliberately\n      // ABSENT: they already live as lazy accessors on gl / w.seriesData, so\n      // a snapshot field would either force their materialization (a deep\n      // clone plus three O(n) passes per parse that most charts never need)\n      // or, as a delegating getter, recurse into itself when a writer copies\n      // it back onto the object it delegates to.\n      seriesData: {\n        series: this.w.seriesData.series,\n        seriesNames: this.w.seriesData.seriesNames,\n        seriesX: this.w.seriesData.seriesX,\n        seriesZ: this.w.seriesData.seriesZ,\n        seriesColors: this.w.seriesData.seriesColors,\n        seriesGoals: this.w.seriesData.seriesGoals,\n        unitData: this.w.seriesData.unitData,\n        noLabelsProvided: this.w.axisFlags.noLabelsProvided\n      },\n      // w.rangeData (future slice)\n      rangeData: {\n        seriesRangeStart: this.w.rangeData.seriesRangeStart,\n        seriesRangeEnd: this.w.rangeData.seriesRangeEnd,\n        seriesRange: this.w.rangeData.seriesRange\n      },\n      // w.candleData (future slice)\n      candleData: {\n        seriesCandleO: this.w.candleData.seriesCandleO,\n        seriesCandleH: this.w.candleData.seriesCandleH,\n        seriesCandleM: this.w.candleData.seriesCandleM,\n        seriesCandleL: this.w.candleData.seriesCandleL,\n        seriesCandleC: this.w.candleData.seriesCandleC,\n        seriesBoxPoints: this.w.candleData.seriesBoxPoints\n      },\n      // w.labelData (future slice)\n      labelData: {\n        labels: this.w.labelData.labels,\n        categoryLabels: this.w.labelData.categoryLabels\n      },\n      // w.axisFlags (future slice)\n      axisFlags: {\n        isXNumeric: this.w.axisFlags.isXNumeric,\n        dataFormatXNumeric: this.w.axisFlags.dataFormatXNumeric,\n        isDataXYZ: this.w.axisFlags.isDataXYZ,\n        isRangeData: this.w.axisFlags.isRangeData,\n        isRangeBar: this.w.axisFlags.isRangeBar,\n        isMultiLineX: this.w.axisFlags.isMultiLineX,\n        dataWasParsed: this.w.axisFlags.dataWasParsed,\n        hasXaxisGroups: this.w.labelData.hasXaxisGroups,\n        groups: this.w.labelData.groups,\n        seriesGroups: this.w.labelData.seriesGroups\n      }\n    };\n  }\n  /**\n   * Slice a sorted-by-x series to a [xmin, xmax] window using binary search.\n   *\n   * Pads with one extra point on each side so lines extend cleanly to the\n   * chart edges. Either bound may be null/undefined to disable that side.\n   *\n   * @param {any[]} data - Series data in [{x,y}] or [[x,y]] format, sorted by x.\n   * @param {number|null|undefined} xmin\n   * @param {number|null|undefined} xmax\n   * @returns {any[]} Sliced array (new array, never the input reference).\n   */\n  /**\n   * Define `key` on `obj` as a lazily computed property: `compute` runs on\n   * first read after this call and its result is cached; assigning to the\n   * property stores the assigned value directly (so code that writes the\n   * field, like getPercentSeries, keeps working). Re-calling resets the cache\n   * (used once per parse).\n   * @param {any} obj\n   * @param {string} key\n   * @param {() => any} compute\n   */\n  static _defineLazyResult(obj, key, compute) {\n    let has = false;\n    let value;\n    Object.defineProperty(obj, key, {\n      configurable: true,\n      enumerable: true,\n      get() {\n        if (!has) {\n          has = true;\n          value = compute();\n        }\n        return value;\n      },\n      set(v2) {\n        has = true;\n        value = v2;\n      }\n    });\n  }\n  /**\n   * @param {any[]} data\n   * @param {any} xmin\n   * @param {any} xmax\n   */\n  static sliceByXRange(data, xmin, xmax) {\n    const len = data.length;\n    if (len === 0) return data;\n    const isXY = !Array.isArray(data[0]);\n    const getX = isXY ? (p2) => p2.x : (p2) => p2[0];\n    let lo = 0;\n    if (xmin != null) {\n      let l2 = 0;\n      let r2 = len - 1;\n      while (l2 <= r2) {\n        const m2 = l2 + r2 >> 1;\n        if (getX(data[m2]) < xmin) l2 = m2 + 1;\n        else r2 = m2 - 1;\n      }\n      lo = Math.max(0, l2 - 1);\n    }\n    let hi = len;\n    if (xmax != null) {\n      let l2 = 0;\n      let r2 = len - 1;\n      while (l2 <= r2) {\n        const m2 = l2 + r2 >> 1;\n        if (getX(data[m2]) > xmax) r2 = m2 - 1;\n        else l2 = m2 + 1;\n      }\n      hi = Math.min(len, l2 + 1);\n    }\n    return lo === 0 && hi === len ? data.slice() : data.slice(lo, hi);\n  }\n  /**\n   * Largest-Triangle-Three-Bucket (LTTB) downsampling.\n   *\n   * Reduces `data` to `targetPoints` points while preserving the visual shape\n   * of the series as perceived by the human eye.\n   *\n   * @param {any[]} data   - Raw series data in [{x,y}] or [[x,y]] format.\n   * @param {number} targetPoints - Desired output length (>= 3).\n   * @returns {any[]} Downsampled array in the same format as the input.\n   */\n  static lttbDownsample(data, targetPoints) {\n    const len = data.length;\n    if (targetPoints >= len || targetPoints < 3) return data;\n    const isXY = !Array.isArray(data[0]);\n    const getX = isXY ? (p2) => p2.x : (p2) => p2[0];\n    const getY = isXY ? (p2) => p2.y : (p2) => p2[1];\n    const sampled = [];\n    sampled.push(data[0]);\n    const bucketSize = (len - 2) / (targetPoints - 2);\n    let a2 = 0;\n    for (let i2 = 0; i2 < targetPoints - 2; i2++) {\n      const avgRangeStart = Math.floor((i2 + 1) * bucketSize) + 1;\n      const avgRangeEnd = Math.min(Math.floor((i2 + 2) * bucketSize) + 1, len);\n      let avgX = 0;\n      let avgY = 0;\n      const avgRangeLen = avgRangeEnd - avgRangeStart;\n      for (let j = avgRangeStart; j < avgRangeEnd; j++) {\n        avgX += getX(data[j]);\n        avgY += getY(data[j]);\n      }\n      avgX /= avgRangeLen;\n      avgY /= avgRangeLen;\n      const rangeStart = Math.floor(i2 * bucketSize) + 1;\n      const rangeEnd = Math.min(Math.floor((i2 + 1) * bucketSize) + 1, len);\n      const pointAX = getX(data[a2]);\n      const pointAY = getY(data[a2]);\n      let maxArea = -1;\n      let maxAreaIdx = rangeStart;\n      for (let j = rangeStart; j < rangeEnd; j++) {\n        const area = Math.abs(\n          (pointAX - avgX) * (getY(data[j]) - pointAY) - (pointAX - getX(data[j])) * (avgY - pointAY)\n        ) * 0.5;\n        if (area > maxArea) {\n          maxArea = area;\n          maxAreaIdx = j;\n        }\n      }\n      sampled.push(data[maxAreaIdx]);\n      a2 = maxAreaIdx;\n    }\n    sampled.push(data[len - 1]);\n    return sampled;\n  }\n  /**\n   * OHLC-aware bucket aggregation for candlestick / OHLC series.\n   *\n   * Each point's y is a 4-tuple `[open, high, low, close]`. LTTB is unusable\n   * here — it treats y as a scalar, so the triangle-area math degenerates and\n   * silently discards the high/low extremes that *define* a candle. Instead we\n   * split the series into `targetPoints` contiguous buckets and roll each up\n   * into a single candle: open = first bucket open, close = last bucket close,\n   * high = max of highs, low = min of lows. The x is the first point's x in the\n   * bucket. Output keeps the input's format ([{x,y}] or [[x,y]]).\n   *\n   * @param {any[]} data         - Raw OHLC series in [{x,y:[o,h,l,c]}] or [[x,[o,h,l,c]]] format.\n   * @param {number} targetPoints - Desired output length (>= 1).\n   * @returns {any[]} Aggregated array in the same format as the input.\n   */\n  static ohlcAggregate(data, targetPoints) {\n    const len = data.length;\n    if (targetPoints >= len || targetPoints < 1) return data;\n    const isXY = !Array.isArray(data[0]);\n    const getX = isXY ? (p2) => p2.x : (p2) => p2[0];\n    const getY = isXY ? (p2) => p2.y : (p2) => p2[1];\n    const make = isXY ? (x, y) => ({ x, y }) : (x, y) => [x, y];\n    const out = [];\n    const bucketSize = len / targetPoints;\n    for (let i2 = 0; i2 < targetPoints; i2++) {\n      const start = Math.floor(i2 * bucketSize);\n      const end = i2 === targetPoints - 1 ? len : Math.floor((i2 + 1) * bucketSize);\n      if (end <= start) continue;\n      const firstY = getY(data[start]);\n      const open = firstY[0];\n      let high = firstY[1];\n      let low = firstY[2];\n      let close = firstY[3];\n      for (let j = start + 1; j < end; j++) {\n        const y = getY(data[j]);\n        if (y[1] > high) high = y[1];\n        if (y[2] < low) low = y[2];\n        close = y[3];\n      }\n      out.push(make(getX(data[start]), [open, high, low, close]));\n    }\n    return out;\n  }\n  /**\n   * Bucket-aggregate 2-tuple range data (`y: [low, high]`, rangeArea/rangeBar)\n   * into `targetPoints` points, the range analog of {@link ohlcAggregate}. Each\n   * bucket emits `[min low, max high]` so the band's vertical extent is never\n   * understated by downsampling (LTTB, built for scalar y, would drop these\n   * extremes). Order-agnostic: the min/max scan both tuple slots, so it is\n   * correct whether a point is stored `[low, high]` or `[high, low]`.\n   *\n   * Null bounds (e.g. an indicator's warm-up period) are ignored, not treated\n   * as 0 — `Math.min(null, x)` would coerce to 0 and pin the band to the\n   * baseline. A bucket with no finite bounds emits `[null, null]` so it renders\n   * as a gap, matching the un-downsampled series.\n   * @param {any[]} data\n   * @param {number} targetPoints\n   * @returns {any[]}\n   */\n  static rangeAggregate(data, targetPoints) {\n    const len = data.length;\n    if (targetPoints >= len || targetPoints < 1) return data;\n    const isXY = !Array.isArray(data[0]);\n    const getX = isXY ? (p2) => p2.x : (p2) => p2[0];\n    const getY = isXY ? (p2) => p2.y : (p2) => p2[1];\n    const make = isXY ? (x, y) => ({ x, y }) : (x, y) => [x, y];\n    const out = [];\n    const bucketSize = len / targetPoints;\n    for (let i2 = 0; i2 < targetPoints; i2++) {\n      const start = Math.floor(i2 * bucketSize);\n      const end = i2 === targetPoints - 1 ? len : Math.floor((i2 + 1) * bucketSize);\n      if (end <= start) continue;\n      let low = Infinity;\n      let high = -Infinity;\n      for (let j = start; j < end; j++) {\n        const y = getY(data[j]);\n        if (y == null) continue;\n        for (let k = 0; k < 2; k++) {\n          const v2 = y[k];\n          if (v2 == null || !isFinite(v2)) continue;\n          if (v2 < low) low = v2;\n          if (v2 > high) high = v2;\n        }\n      }\n      out.push(\n        make(getX(data[start]), low === Infinity ? [null, null] : [low, high])\n      );\n    }\n    return out;\n  }\n  excludeCollapsedSeriesInYAxis() {\n    const w2 = this.w;\n    const yAxisIndexes = [];\n    w2.globals.seriesYAxisMap.forEach((yAxisArr, yi) => {\n      let collapsedCount = 0;\n      yAxisArr.forEach((seriesIndex) => {\n        if (w2.globals.collapsedSeriesIndices.indexOf(seriesIndex) !== -1) {\n          collapsedCount++;\n        }\n      });\n      if (collapsedCount > 0 && collapsedCount == yAxisArr.length) {\n        yAxisIndexes.push(yi);\n      }\n    });\n    w2.globals.ignoreYAxisIndexes = yAxisIndexes.map((x) => x);\n  }\n}\nclass UpdateHelpers {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n  }\n  /**\n   * private method to update Options.\n   *\n   * @param {Record<string, any>} options - A new config object can be passed which will be merged with the existing config object\n   * @param {boolean} redraw - should redraw from beginning or should use existing paths and redraw from there\n   * @param {boolean} animate - should animate or not on updating Options\n   * @param {boolean} overwriteInitialConfig - should update the initial config or not\n   */\n  _updateOptions(options2, redraw = false, animate = true, updateSyncedCharts = true, overwriteInitialConfig = false) {\n    return new Promise((resolve, reject) => {\n      let charts = [this.ctx];\n      if (updateSyncedCharts) {\n        charts = this.ctx.getSyncedCharts();\n      }\n      if (this.w.globals.isExecCalled) {\n        charts = [this.ctx];\n        this.w.globals.isExecCalled = false;\n      }\n      charts.forEach((ch, chartIndex) => {\n        var _a, _b;\n        const w2 = ch.w;\n        w2.globals.shouldAnimate = animate;\n        if (!redraw) {\n          w2.globals.resized = true;\n          w2.globals.dataChanged = true;\n          if (animate && w2.config.chart.animations.enabled) {\n            ch.series.getPreviousPaths();\n          }\n        }\n        const fromType = w2.config.chart.requestedType || w2.config.chart.type;\n        if (animate && options2 && typeof options2 === \"object\") {\n          const newType = (_a = options2 == null ? void 0 : options2.chart) == null ? void 0 : _a.type;\n          if (newType && newType !== fromType) {\n            (_b = ch.morphTypeChange) == null ? void 0 : _b.captureBeforeDestroy({\n              fromType,\n              toType: newType,\n              newSeries: options2.series || w2.config.series\n            });\n          }\n        }\n        if (options2 && typeof options2 === \"object\") {\n          ch.config = new Config(options2);\n          const incomingType = options2.chart && options2.chart.type;\n          const isAliasRequest = incomingType === \"funnel\" || incomingType === \"pyramid\" || incomingType === \"gauge\";\n          const wasAlias = !!w2.config.chart.requestedType;\n          if (incomingType && !isAliasRequest && wasAlias) {\n            options2.chart = options2.chart || {};\n            options2.chart.requestedType = incomingType;\n            const prev = w2.config.chart.requestedType;\n            if (prev === \"funnel\" || prev === \"pyramid\") {\n              options2.plotOptions = options2.plotOptions || {};\n              options2.plotOptions.bar = options2.plotOptions.bar || {};\n              if (options2.plotOptions.bar.isFunnel === void 0) {\n                options2.plotOptions.bar.isFunnel = false;\n              }\n              if (options2.plotOptions.bar.isPyramid === void 0) {\n                options2.plotOptions.bar.isPyramid = false;\n              }\n            }\n          }\n          ch.config.normalizeAliasedChartType(options2);\n          options2 = CoreUtils.extendArrayProps(ch.config, options2, w2);\n          if (ch.w.globals.chartID !== this.w.globals.chartID) {\n            delete options2.series;\n            delete options2.yaxis;\n          }\n          w2.config = Utils$1.extend(w2.config, options2);\n          Defaults.handOverTypeDefaults(w2.config, fromType, options2);\n          if (overwriteInitialConfig) {\n            w2.globals.lastXAxis = options2.xaxis ? Utils$1.clone(options2.xaxis) : [];\n            w2.globals.lastYAxis = options2.yaxis ? Utils$1.clone(options2.yaxis) : [];\n            w2.globals.initialConfig = Utils$1.extend({}, w2.config);\n            w2.globals.initialSeries = w2.config.series;\n          }\n          if (options2.series && (w2.globals.collapsedSeriesIndices.length > 0 || w2.globals.ancillaryCollapsedSeriesIndices.length > 0)) {\n            ch.series.reconcileCollapsedByName();\n          }\n        }\n        return ch.update(options2).then(() => {\n          if (chartIndex === charts.length - 1) {\n            resolve(ch);\n          }\n        }).catch(reject);\n      });\n    });\n  }\n  /**\n   * Private method to update Series.\n   *\n   * @param {any[]} newSeries - New series which will override the existing\n   * @param {boolean} animate\n   */\n  _updateSeries(newSeries, animate, overwriteInitialSeries = false) {\n    return new Promise((resolve, reject) => {\n      const w2 = this.w;\n      w2.globals.shouldAnimate = animate;\n      w2.globals.dataChanged = true;\n      const prevAxisScaleSig = JSON.stringify({\n        y: (w2.globals.yAxisScale || []).map((s2) => s2 ? s2.result : null),\n        xMin: w2.globals.minX,\n        xMax: w2.globals.maxX\n      });\n      PerformanceCache.invalidateSelectors(w2);\n      if (animate && w2.config.chart.animations.enabled) {\n        this.ctx.series.getPreviousPaths();\n      }\n      const prevSeriesCount = w2.config.series.length;\n      const prevDataLengths = w2.config.series.map(\n        (s2) => {\n          var _a, _b;\n          return (_b = (_a = s2 == null ? void 0 : s2.data) == null ? void 0 : _a.length) != null ? _b : 0;\n        }\n      );\n      if (overwriteInitialSeries) {\n        w2.globals.dataReducerRawSeries = null;\n        w2.globals.histogramRawSeries = null;\n        w2.globals.treemapRawSeries = null;\n      }\n      this.ctx.data.resetParsingFlags();\n      const parsedState = this.ctx.data.parseData(newSeries);\n      this.ctx._writeParsedSeriesData(parsedState.seriesData);\n      this.ctx._writeParsedRangeData(parsedState.rangeData);\n      this.ctx._writeParsedCandleData(parsedState.candleData);\n      this.ctx._writeParsedLabelData(parsedState.labelData);\n      this.ctx._writeParsedAxisFlags(parsedState.axisFlags);\n      if (overwriteInitialSeries) {\n        if (w2.globals.initialConfig) {\n          w2.globals.initialConfig.series = w2.config.series;\n        }\n        w2.globals.initialSeries = w2.config.series;\n      }\n      if (this._canUseFastPath(newSeries, prevSeriesCount, prevDataLengths, w2)) {\n        return this.ctx.fastUpdate(animate, prevAxisScaleSig).then(() => {\n          resolve(this.ctx);\n        }).catch(reject);\n      }\n      if (this.ctx._updateStats) this.ctx._updateStats.full++;\n      return this.ctx.update().then(() => {\n        resolve(this.ctx);\n      }).catch(reject);\n    });\n  }\n  /**\n   * Returns true if the data-only fast path can be used for this update.\n   * Fast path skips rebuilding grid, axes, legend, annotations, and tooltip DOM.\n   *\n   * Requirements:\n   * - Chart has been fully rendered (DOM exists)\n   * - Axis chart (non-axis charts like pie always need full rebuild due to radial layout)\n   * - Series count unchanged (grid column/row counts depend on it)\n   * - Per-series data lengths unchanged (the fast path preserves the axis DOM,\n   *   and a changed point count re-slots categories/ticks: with explicit\n   *   categories the axis-scale signature can still match, leaving a stale\n   *   ruler under the re-slotted marks; length changes also want the full\n   *   render so enter/exit and axis transitions run)\n   * - No series currently collapsing (collapsed series changes visible data range)\n   * - Not a combo chart (combo charts mix types and need coordinated axis recalc)\n   * - Not currently zoomed (zoomed charts have altered x-labels that need recalculation)\n   * @param {any[]} newSeries\n   * @param {number} prevSeriesCount\n   * @param {number[]} prevDataLengths\n   * @param {import('../../types/internal').ChartStateW} w\n   */\n  _canUseFastPath(newSeries, prevSeriesCount, prevDataLengths, w2) {\n    if (!w2.dom.elGraphical) return false;\n    if (!w2.globals.axisCharts) return false;\n    if (newSeries.length !== prevSeriesCount) return false;\n    if (newSeries.some(\n      (s2, i2) => {\n        var _a, _b;\n        return ((_b = (_a = s2 == null ? void 0 : s2.data) == null ? void 0 : _a.length) != null ? _b : 0) !== prevDataLengths[i2];\n      }\n    )) {\n      return false;\n    }\n    if (w2.globals.collapsedSeries.length > 0) return false;\n    if (w2.globals.ancillaryCollapsedSeries.length > 0) return false;\n    if (w2.globals.risingSeries.length > 0) return false;\n    if (w2.globals.comboCharts) return false;\n    if (w2.interact.zoomed) return false;\n    return true;\n  }\n  /**\n   * @param {any} s\n   * @param {number} i\n   */\n  _extendSeries(s2, i2) {\n    const w2 = this.w;\n    const ser = w2.config.series[i2];\n    return __spreadProps(__spreadValues(\n      {},\n      /** @type {Record<string,any>} */\n      w2.config.series[i2]\n    ), {\n      name: s2.name ? s2.name : (\n        /** @type {any} */\n        ser == null ? void 0 : ser.name\n      ),\n      color: s2.color ? s2.color : (\n        /** @type {any} */\n        ser == null ? void 0 : ser.color\n      ),\n      type: s2.type ? s2.type : (\n        /** @type {any} */\n        ser == null ? void 0 : ser.type\n      ),\n      group: s2.group ? s2.group : (\n        /** @type {any} */\n        ser == null ? void 0 : ser.group\n      ),\n      hidden: typeof s2.hidden !== \"undefined\" ? s2.hidden : (\n        /** @type {any} */\n        ser == null ? void 0 : ser.hidden\n      ),\n      data: s2.data ? s2.data : (\n        /** @type {any} */\n        ser == null ? void 0 : ser.data\n      ),\n      zIndex: typeof s2.zIndex !== \"undefined\" ? s2.zIndex : i2\n    });\n  }\n  /**\n   * @param {number} seriesIndex\n   * @param {number} dataPointIndex\n   */\n  toggleDataPointSelection(seriesIndex, dataPointIndex) {\n    const w2 = this.w;\n    let elPath = null;\n    const parent = `.apexcharts-series[data\\\\:realIndex='${seriesIndex}']`;\n    if (w2.globals.axisCharts) {\n      elPath = w2.dom.Paper.findOne(\n        `${parent} path[j='${dataPointIndex}'], ${parent} circle[j='${dataPointIndex}'], ${parent} rect[j='${dataPointIndex}']`\n      );\n    } else {\n      if (typeof dataPointIndex === \"undefined\") {\n        elPath = w2.dom.Paper.findOne(`${parent} path[j='${seriesIndex}']`);\n        if (w2.config.chart.type === \"pie\" || w2.config.chart.type === \"polarArea\" || w2.config.chart.type === \"donut\") {\n          this.ctx.pie.pieClicked(seriesIndex);\n        }\n      }\n    }\n    if (elPath) {\n      const graphics = new Graphics(this.w);\n      graphics.pathMouseDown(\n        elPath,\n        /** @type {any} */\n        null\n      );\n    } else {\n      console.warn(\"toggleDataPointSelection: Element not found\");\n      return null;\n    }\n    return elPath.node ? elPath.node : null;\n  }\n  /**\n   * @param {Record<string, any>} options\n   */\n  forceXAxisUpdate(options2) {\n    const w2 = this.w;\n    const minmax = [\"min\", \"max\"];\n    minmax.forEach((a2) => {\n      if (typeof options2.xaxis[a2] !== \"undefined\") {\n        w2.config.xaxis[a2] = options2.xaxis[a2];\n        w2.globals.lastXAxis[a2] = options2.xaxis[a2];\n      }\n    });\n    if (options2.xaxis.categories && options2.xaxis.categories.length) {\n      w2.config.xaxis.categories = options2.xaxis.categories;\n    }\n    if (w2.config.xaxis.convertedCatToNumeric) {\n      const defaults = new Defaults(options2);\n      options2 = defaults.convertCatToNumericXaxis(options2, this.ctx);\n    }\n    return options2;\n  }\n  /**\n   * @param {Record<string, any>} options\n   */\n  forceYAxisUpdate(options2) {\n    if (options2.chart && options2.chart.stacked && options2.chart.stackType === \"100%\") {\n      if (Array.isArray(options2.yaxis)) {\n        options2.yaxis.forEach(\n          (yaxe, index) => {\n            options2.yaxis[index].min = 0;\n            options2.yaxis[index].max = 100;\n          }\n        );\n      } else {\n        options2.yaxis.min = 0;\n        options2.yaxis.max = 100;\n      }\n    }\n    return options2;\n  }\n  /**\n   * This function reverts the yaxis and xaxis min/max values to what it was when the chart was defined.\n   * This function fixes an important bug where a user might load a new series after zooming in/out of previous series which resulted in wrong min/max\n   * Also, this should never be called internally on zoom/pan - the reset should only happen when user calls the updateSeries() function externally\n   * The function also accepts an object {xaxis, yaxis} which when present is set as the new xaxis/yaxis\n   * @param {Record<string, any>} opts\n   */\n  revertDefaultAxisMinMax(opts) {\n    const w2 = this.w;\n    let xaxis = w2.globals.lastXAxis;\n    let yaxis = w2.globals.lastYAxis;\n    if (opts && opts.xaxis) {\n      xaxis = opts.xaxis;\n    }\n    if (opts && opts.yaxis) {\n      yaxis = opts.yaxis;\n    }\n    const _xaxis = (\n      /** @type {any} */\n      xaxis\n    );\n    w2.config.xaxis.min = _xaxis.min;\n    w2.config.xaxis.max = _xaxis.max;\n    const getLastYAxis = (index) => {\n      if (typeof yaxis[index] !== \"undefined\") {\n        const _y = (\n          /** @type {any} */\n          yaxis[index]\n        );\n        w2.config.yaxis[index].min = _y.min;\n        w2.config.yaxis[index].max = _y.max;\n      }\n    };\n    w2.config.yaxis.map((yaxe, index) => {\n      if (w2.interact.zoomed) {\n        getLastYAxis(index);\n      } else {\n        if (typeof yaxis[index] !== \"undefined\") {\n          getLastYAxis(index);\n        } else {\n          if (typeof this.ctx.opts.yaxis[index] !== \"undefined\") {\n            yaxe.min = this.ctx.opts.yaxis[index].min;\n            yaxe.max = this.ctx.opts.yaxis[index].max;\n          }\n        }\n      }\n    });\n  }\n}\nclass AxisMapping {\n  /**\n   * Pixels per data-unit on the x-axis. Derived from `minX..maxX` so it is the\n   * exact inverse used by both {@link dataXToPx} and {@link pxToDataX}.\n   * @param {import('../types/internal').ChartStateW} w\n   * @returns {number}\n   */\n  static xRatio(w2) {\n    const gw = w2.layout.gridWidth || 1;\n    return (w2.globals.maxX - w2.globals.minX) / gw;\n  }\n  /**\n   * Data-x -> pixels from the plot origin (usable as an SVG `x` attribute).\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {number} dataX\n   * @returns {number}\n   */\n  static dataXToPx(w2, dataX) {\n    return (dataX - w2.globals.minX) / AxisMapping.xRatio(w2);\n  }\n  /**\n   * Pixels from the plot origin -> data-x. Feed it `screenX - svgLeft - translateX`.\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {number} px\n   * @returns {number}\n   */\n  static pxToDataX(w2, px) {\n    return w2.globals.minX + px * AxisMapping.xRatio(w2);\n  }\n  /**\n   * Client (screen) x -> pixels from the plot origin. The origin is the svg\n   * element's left edge plus `translateX`, never the `.apexcharts-grid` box\n   * (fact 2 above), so the result does not depend on what the grid happens to\n   * render. `svgWidth` is the unscaled width the svg was drawn at, so the ratio\n   * against the measured one is the CSS zoom of any container the chart sits in.\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {number} screenX\n   * @returns {number}\n   */\n  static screenXToPlotPx(w2, screenX) {\n    const baseEl = w2.dom.baseEl;\n    const svg = baseEl && baseEl.querySelector(\".apexcharts-svg\");\n    if (!svg) return screenX - w2.layout.translateX;\n    const svgRect = svg.getBoundingClientRect();\n    const zoom = w2.globals.svgWidth ? svgRect.width / w2.globals.svgWidth : 1;\n    return (screenX - svgRect.left) / (zoom || 1) - w2.layout.translateX;\n  }\n}\nclass Utils2 {\n  /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */\n  constructor(tooltipContext) {\n    this.w = tooltipContext.w;\n    this.ttCtx = tooltipContext;\n  }\n  /**\n   ** When hovering over series, you need to capture which series is being hovered on.\n   ** This function will return both capturedseries index as well as inner index of that series\n   * @memberof Utils\n   * @param {{ hoverArea: any, elGrid: any, clientX: any, clientY: any, context?: any }} opts\n   */\n  getNearestValues({ hoverArea, elGrid, clientX, clientY }) {\n    var _a, _b;\n    const w2 = this.w;\n    const seriesBound = elGrid.getBoundingClientRect();\n    const hoverWidth = w2.layout.gridWidth;\n    const hoverHeight = seriesBound.height;\n    let xDivisor = hoverWidth / (w2.globals.dataPoints - 1);\n    const yDivisor = hoverHeight / w2.globals.dataPoints;\n    const hasBars = this.hasBars();\n    if ((w2.globals.comboCharts || hasBars) && !w2.config.xaxis.convertedCatToNumeric) {\n      xDivisor = hoverWidth / w2.globals.dataPoints;\n    }\n    const hoverX = AxisMapping.screenXToPlotPx(w2, clientX);\n    const hoverY = clientY - seriesBound.top;\n    const edgePad = w2.globals.barPadForNumericAxis || 0;\n    const notInRect = hoverX < -edgePad || hoverY < 0 || hoverX > hoverWidth + edgePad || hoverY > hoverHeight;\n    if (notInRect) {\n      hoverArea.classList.remove(\"hovering-zoom\");\n      hoverArea.classList.remove(\"hovering-pan\");\n    } else {\n      if (w2.interact.zoomEnabled) {\n        hoverArea.classList.remove(\"hovering-pan\");\n        hoverArea.classList.add(\"hovering-zoom\");\n      } else if (w2.interact.panEnabled) {\n        hoverArea.classList.remove(\"hovering-zoom\");\n        hoverArea.classList.add(\"hovering-pan\");\n      }\n    }\n    let j = Math.round(hoverX / xDivisor);\n    const jHorz = Math.floor(hoverY / yDivisor);\n    if (hasBars && !w2.config.xaxis.convertedCatToNumeric) {\n      j = Math.ceil(hoverX / xDivisor);\n      j = j - 1;\n    }\n    let capturedSeries = null;\n    let closest = null;\n    let seriesXValArr = w2.globals.seriesXvalues.map(\n      (seriesXVal) => {\n        return seriesXVal.filter(\n          (s2) => Utils$1.isNumber(s2)\n        );\n      }\n    );\n    const seriesYValArr = w2.globals.seriesYvalues.map(\n      (seriesYVal) => {\n        return seriesYVal.filter(\n          (s2) => Utils$1.isNumber(s2)\n        );\n      }\n    );\n    if (w2.axisFlags.isXNumeric) {\n      closest = this.closestInMultiArray(\n        hoverX,\n        hoverY,\n        seriesXValArr,\n        seriesYValArr\n      );\n      capturedSeries = closest.index;\n      j = (_a = closest.j) != null ? _a : 0;\n      if (capturedSeries !== null && w2.globals.hasNullValues) {\n        seriesXValArr = w2.globals.seriesXvalues[capturedSeries];\n        closest = this.closestInArray(hoverX, seriesXValArr);\n        j = (_b = closest.j) != null ? _b : 0;\n      }\n    }\n    w2.interact.capturedSeriesIndex = capturedSeries === null ? -1 : capturedSeries;\n    if (!j || j < 1) j = 0;\n    if (w2.globals.isBarHorizontal) {\n      w2.interact.capturedDataPointIndex = jHorz;\n    } else {\n      w2.interact.capturedDataPointIndex = j;\n    }\n    return {\n      capturedSeries,\n      j: w2.globals.isBarHorizontal ? jHorz : j,\n      hoverX,\n      hoverY\n    };\n  }\n  /**\n   * @param {any[]} Xarrays\n   */\n  getFirstActiveXArray(Xarrays) {\n    const w2 = this.w;\n    let activeIndex = 0;\n    const firstActiveSeriesIndex = Xarrays.map(\n      (xarr, index) => {\n        return xarr.length > 0 ? index : -1;\n      }\n    );\n    for (let a2 = 0; a2 < firstActiveSeriesIndex.length; a2++) {\n      if (firstActiveSeriesIndex[a2] !== -1 && w2.globals.collapsedSeriesIndices.indexOf(a2) === -1 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(a2) === -1) {\n        activeIndex = firstActiveSeriesIndex[a2];\n        break;\n      }\n    }\n    return activeIndex;\n  }\n  /**\n   * @param {number} hoverX\n   * @param {number} hoverY\n   * @param {any[]} Xarrays\n   * @param {any[]} Yarrays\n   */\n  closestInMultiArray(hoverX, hoverY, Xarrays, Yarrays) {\n    const w2 = this.w;\n    const isActiveSeries = (seriesIndex) => {\n      return w2.globals.collapsedSeriesIndices.indexOf(seriesIndex) === -1 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(seriesIndex) === -1;\n    };\n    const chartType = w2.config.chart.type;\n    const isLineArea = !w2.globals.comboCharts && (chartType === \"line\" || chartType === \"area\");\n    let closestDist = Infinity;\n    let closestSeriesIndex = null;\n    let closestPointIndex = null;\n    if (w2.globals.allSeriesHasEqualX) {\n      let bucketDistX = Infinity;\n      for (let i2 = 0; i2 < Xarrays.length; i2++) {\n        if (!isActiveSeries(i2)) continue;\n        const xArr = Xarrays[i2];\n        const yArr = Yarrays[i2];\n        const len = Math.min(xArr.length, yArr.length);\n        for (let j = 0; j < len; j++) {\n          const distX = Math.abs(hoverX - xArr[j]);\n          if (distX < bucketDistX) {\n            bucketDistX = distX;\n            closestPointIndex = j;\n          }\n        }\n      }\n      if (closestPointIndex !== null) {\n        if (isLineArea) {\n          let bestSegDist = Infinity;\n          for (let i2 = 0; i2 < Xarrays.length; i2++) {\n            if (!isActiveSeries(i2)) continue;\n            const xArr = Xarrays[i2];\n            const yArr = Yarrays[i2];\n            const len = Math.min(xArr.length, yArr.length);\n            if (len < 2) {\n              const yVal = yArr[closestPointIndex];\n              if (typeof yVal !== \"number\") continue;\n              const d = Math.abs(hoverY - yVal);\n              if (d < bestSegDist) {\n                bestSegDist = d;\n                closestSeriesIndex = i2;\n              }\n              continue;\n            }\n            for (let j = 0; j < len - 1; j++) {\n              const seg = this._distanceToSegment(\n                hoverX,\n                hoverY,\n                xArr[j],\n                yArr[j],\n                xArr[j + 1],\n                yArr[j + 1]\n              );\n              if (seg.dist < bestSegDist) {\n                bestSegDist = seg.dist;\n                closestSeriesIndex = i2;\n              }\n            }\n          }\n        } else {\n          let bestY = Infinity;\n          for (let i2 = 0; i2 < Xarrays.length; i2++) {\n            if (!isActiveSeries(i2)) continue;\n            const yVal = Yarrays[i2][closestPointIndex];\n            if (typeof yVal !== \"number\") continue;\n            const distY = Math.abs(hoverY - yVal);\n            if (distY < bestY) {\n              bestY = distY;\n              closestSeriesIndex = i2;\n            }\n          }\n        }\n      }\n      return {\n        index: closestSeriesIndex,\n        j: closestPointIndex\n      };\n    }\n    for (let i2 = 0; i2 < Xarrays.length; i2++) {\n      if (!isActiveSeries(i2)) {\n        continue;\n      }\n      const xArr = Xarrays[i2];\n      const yArr = Yarrays[i2];\n      const len = Math.min(xArr.length, yArr.length);\n      if (isLineArea && len >= 2) {\n        for (let j = 0; j < len - 1; j++) {\n          const seg = this._distanceToSegment(\n            hoverX,\n            hoverY,\n            xArr[j],\n            yArr[j],\n            xArr[j + 1],\n            yArr[j + 1]\n          );\n          if (seg.dist < closestDist) {\n            closestDist = seg.dist;\n            closestSeriesIndex = i2;\n            closestPointIndex = seg.t < 0.5 ? j : j + 1;\n          }\n        }\n        continue;\n      }\n      for (let j = 0; j < len; j++) {\n        const xVal = xArr[j];\n        const distX = hoverX - xVal;\n        const yVal = yArr[j];\n        const distY = hoverY - yVal;\n        const dist = Math.sqrt(distX * distX + distY * distY);\n        if (dist < closestDist) {\n          closestDist = dist;\n          closestSeriesIndex = i2;\n          closestPointIndex = j;\n        }\n      }\n    }\n    return {\n      index: closestSeriesIndex,\n      j: closestPointIndex\n    };\n  }\n  /**\n   * Perpendicular distance from point (px, py) to the line segment\n   * (ax, ay) → (bx, by). Returns the distance plus the projection\n   * parameter t (0 = at A, 1 = at B, clamped) so callers know which\n   * endpoint the projection landed nearest.\n   * @param {number} px\n   * @param {number} py\n   * @param {number} ax\n   * @param {number} ay\n   * @param {number} bx\n   * @param {number} by\n   * @returns {{ dist: number, t: number }}\n   */\n  _distanceToSegment(px, py, ax, ay, bx, by) {\n    const dx = bx - ax;\n    const dy = by - ay;\n    const lenSq = dx * dx + dy * dy;\n    let t2 = lenSq === 0 ? 0 : ((px - ax) * dx + (py - ay) * dy) / lenSq;\n    if (t2 < 0) t2 = 0;\n    else if (t2 > 1) t2 = 1;\n    const cx = ax + t2 * dx;\n    const cy = ay + t2 * dy;\n    const ex = px - cx;\n    const ey = py - cy;\n    return { dist: Math.sqrt(ex * ex + ey * ey), t: t2 };\n  }\n  /**\n   * @param {number} val\n   * @param {any[]} arr\n   */\n  closestInArray(val, arr) {\n    const curr = arr[0];\n    let currIndex = null;\n    let diff = Math.abs(val - curr);\n    for (let i2 = 0; i2 < arr.length; i2++) {\n      const newdiff = Math.abs(val - arr[i2]);\n      if (newdiff < diff) {\n        diff = newdiff;\n        currIndex = i2;\n      }\n    }\n    return {\n      j: currIndex\n    };\n  }\n  /**\n   * When there are multiple series, it is possible to have different x values for each series.\n   * But it may be possible in those multiple series, that there is same x value for 2 or more\n   * series.\n   * @memberof Utils\n   * @param {number} j - the inner index of series (series[i][j])\n   * @return {boolean}\n   */\n  isXoverlap(j) {\n    const w2 = this.w;\n    const xSameForAllSeriesJArr = [];\n    const seriesX = w2.seriesData.seriesX.filter(\n      (s2) => typeof s2[0] !== \"undefined\"\n    );\n    if (seriesX.length > 0) {\n      for (let i2 = 0; i2 < seriesX.length - 1; i2++) {\n        if (typeof seriesX[i2][j] !== \"undefined\" && typeof seriesX[i2 + 1][j] !== \"undefined\") {\n          if (seriesX[i2][j] !== seriesX[i2 + 1][j]) {\n            xSameForAllSeriesJArr.push(\"unEqual\");\n          }\n        }\n      }\n    }\n    if (xSameForAllSeriesJArr.length === 0) {\n      return true;\n    }\n    return false;\n  }\n  isInitialSeriesSameLen() {\n    var _a, _b, _c, _d;\n    let sameLen = true;\n    const initialSeries = (\n      /** @type {any[]} */\n      ((_b = (_a = this.w.globals._initialSeriesPeek) != null ? _a : this.w.globals.initialSeries) == null ? void 0 : _b.filter(\n        /**\n         * @param {Record<string, any>} s\n         * @param {number} i\n         */\n        (s2, i2) => {\n          var _a2;\n          return !((_a2 = this.w.globals.collapsedSeriesIndices) == null ? void 0 : _a2.includes(i2));\n        }\n      )) || []\n    );\n    for (let i2 = 0; i2 < initialSeries.length - 1; i2++) {\n      if (!((_c = initialSeries[i2]) == null ? void 0 : _c.data) || !((_d = initialSeries[i2 + 1]) == null ? void 0 : _d.data)) return true;\n      if (initialSeries[i2].data.length !== initialSeries[i2 + 1].data.length) {\n        sameLen = false;\n        break;\n      }\n    }\n    return sameLen;\n  }\n  /**\n   * @param {any[]} allbars\n   */\n  getBarsHeight(allbars) {\n    const bars = [...allbars];\n    const totalHeight = bars.reduce((acc, bar) => acc + bar.getBBox().height, 0);\n    return totalHeight;\n  }\n  /**\n   * @param {number} capturedSeries\n   */\n  getElMarkers(capturedSeries) {\n    if (typeof capturedSeries == \"number\") {\n      return this.w.dom.baseEl.querySelectorAll(\n        `.apexcharts-series[data\\\\:realIndex='${capturedSeries}'] .apexcharts-series-markers-wrap > *`\n      );\n    }\n    return this.w.dom.baseEl.querySelectorAll(\n      \".apexcharts-series-markers-wrap > *\"\n    );\n  }\n  getAllMarkers(filterCollapsed = false) {\n    let markersWraps = (\n      /** @type {any[]} */\n      [\n        ...this.w.dom.baseEl.querySelectorAll(\".apexcharts-series-markers-wrap\")\n      ]\n    );\n    if (filterCollapsed) {\n      markersWraps = markersWraps.filter((m2) => {\n        const realIndex = Number(m2.getAttribute(\"data:realIndex\"));\n        return this.w.globals.collapsedSeriesIndices.indexOf(realIndex) === -1;\n      });\n    }\n    markersWraps.sort((a2, b2) => {\n      var indexA = Number(a2.getAttribute(\"data:realIndex\"));\n      var indexB = Number(b2.getAttribute(\"data:realIndex\"));\n      return indexB < indexA ? 1 : indexB > indexA ? -1 : 0;\n    });\n    const markers = [];\n    markersWraps.forEach((m2) => {\n      markers.push(m2.querySelector(\".apexcharts-marker\"));\n    });\n    return markers;\n  }\n  /**\n   * @param {number} capturedSeries\n   */\n  hasMarkers(capturedSeries) {\n    const markers = this.getElMarkers(capturedSeries);\n    return markers.length > 0;\n  }\n  /**\n   * @param {any} point\n   * @param {number} size\n   */\n  getPathFromPoint(point, size) {\n    const cx = Number(point.getAttribute(\"cx\"));\n    const cy = Number(point.getAttribute(\"cy\"));\n    const shape = point.getAttribute(\"shape\");\n    return new Graphics(this.w).getMarkerPath(cx, cy, shape, size);\n  }\n  getElBars() {\n    return this.w.dom.baseEl.querySelectorAll(\n      \".apexcharts-bar-series,  .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series\"\n    );\n  }\n  hasBars() {\n    const bars = this.getElBars();\n    return bars.length > 0;\n  }\n  /**\n   * @param {number} index\n   */\n  getHoverMarkerSize(index) {\n    const w2 = this.w;\n    let hoverSize = w2.config.markers.hover.size;\n    if (hoverSize === void 0) {\n      hoverSize = w2.globals.markers.size[index] + w2.config.markers.hover.sizeOffset;\n    }\n    return hoverSize;\n  }\n  /**\n   * @param {string} state\n   */\n  toggleAllTooltipSeriesGroups(state) {\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    if (ttCtx.allTooltipSeriesGroups.length === 0) {\n      ttCtx.allTooltipSeriesGroups = w2.dom.baseEl.querySelectorAll(\n        \".apexcharts-tooltip-series-group\"\n      );\n    }\n    const allTooltipSeriesGroups = ttCtx.allTooltipSeriesGroups;\n    for (let i2 = 0; i2 < allTooltipSeriesGroups.length; i2++) {\n      if (state === \"enable\") {\n        allTooltipSeriesGroups[i2].classList.add(\"apexcharts-active\");\n        allTooltipSeriesGroups[i2].style.display = w2.config.tooltip.items.display;\n      } else {\n        allTooltipSeriesGroups[i2].classList.remove(\"apexcharts-active\");\n        allTooltipSeriesGroups[i2].style.display = \"none\";\n      }\n    }\n  }\n}\nclass Labels {\n  /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */\n  constructor(tooltipContext) {\n    this.w = tooltipContext.w;\n    this.ttCtx = tooltipContext;\n    this.tooltipUtil = new Utils2(tooltipContext);\n  }\n  /** @param {{ shared?: boolean, ttItems?: any, i?: number, j?: any, y1?: any, y2?: any, e?: any }} opts */\n  drawSeriesTexts({ shared = true, ttItems, i: i2 = 0, j = null, y1, y2, e: e2 }) {\n    const w2 = this.w;\n    if (w2.config.tooltip.custom !== void 0) {\n      this.handleCustomTooltip({ i: i2, j, y1, y2, w: w2 });\n    } else {\n      this.toggleActiveInactiveSeries(shared, i2);\n    }\n    const values = this.getValuesToPrint({\n      i: i2,\n      j\n    });\n    this.printLabels({\n      i: i2,\n      j,\n      values,\n      ttItems,\n      shared,\n      e: e2\n    });\n    const tooltipEl = this.ttCtx.getElTooltip();\n    if (tooltipEl) {\n      this.ttCtx.tooltipRect.ttWidth = tooltipEl.getBoundingClientRect().width;\n      this.ttCtx.tooltipRect.ttHeight = tooltipEl.getBoundingClientRect().height;\n    }\n  }\n  /** @param {{i: any, j: any, values: any, ttItems: any, shared: any, e: any}} opts */\n  printLabels({ i: i2, j, values, ttItems, shared, e: e2 }) {\n    const w2 = this.w;\n    const { xVal, zVal, xAxisTTVal } = values;\n    const seriesLen = w2.seriesData.series.length;\n    const basePColor = j !== null && w2.config.plotOptions.bar.distributed ? w2.globals.colors[j] : w2.globals.colors[i2];\n    for (let t2 = 0; t2 < seriesLen; t2++) {\n      const tIndex = w2.config.tooltip.inverseOrder ? seriesLen - 1 - t2 : t2;\n      const row = this.computeSeriesRow({\n        i: i2,\n        j,\n        t: t2,\n        tIndex,\n        shared,\n        e: e2,\n        basePColor\n      });\n      this.DOMHandling({\n        i: i2,\n        t: tIndex,\n        j,\n        ttItems,\n        values: {\n          val: row.val,\n          goalVals: row.goalVals,\n          xVal,\n          xAxisTTVal,\n          zVal\n        },\n        seriesName: row.seriesName,\n        shared,\n        pColor: row.pColor\n      });\n    }\n  }\n  /**\n   * Compute the per-series row values (seriesName, val, goalVals, pColor)\n   * for one iteration of the tooltip's series loop. Extracted from\n   * printLabels() to keep the outer loop scannable.\n   * @param {{i: number, j: any, t: number, tIndex: number, shared: boolean, e: any, basePColor: string}} opts\n   */\n  computeSeriesRow({ i: i2, j, tIndex, shared, e: e2, basePColor }) {\n    const w2 = this.w;\n    let f = this.getFormatters(i2);\n    let pColor = basePColor;\n    let val;\n    let goalVals = (\n      /** @type {any[]} */\n      []\n    );\n    let seriesName = w2.config.chart.type === \"treemap\" ? f.yLbTitleFormatter(\n      String(\n        /** @type {any} */\n        w2.config.series[i2].data[j].x\n      ),\n      {\n        series: w2.seriesData.series,\n        seriesIndex: i2,\n        dataPointIndex: j,\n        w: w2\n      }\n    ) : this.getSeriesName({\n      fn: f.yLbTitleFormatter,\n      index: i2,\n      seriesIndex: i2,\n      j\n    });\n    if (w2.globals.axisCharts) {\n      if (shared) {\n        f = this.getFormatters(tIndex);\n        seriesName = this.getSeriesName({\n          fn: f.yLbTitleFormatter,\n          index: tIndex,\n          seriesIndex: i2,\n          j\n        });\n        pColor = w2.globals.colors[tIndex];\n        val = this.formatYValue(f, tIndex, j);\n        goalVals = this.formatGoalVals(f, tIndex, j);\n      } else {\n        pColor = this.resolvePatternColor(e2, pColor);\n        val = this.formatYValue(f, i2, j);\n        goalVals = this.formatGoalVals(f, i2, j);\n      }\n    }\n    if (j === null) {\n      val = f.yLbFormatter(w2.seriesData.series[i2], __spreadProps(__spreadValues({}, w2), {\n        seriesIndex: i2,\n        dataPointIndex: i2\n      }));\n    }\n    return { seriesName, val, goalVals, pColor };\n  }\n  /**\n   * Run the y-value formatter for a given (seriesIndex, dataPointIndex),\n   * handling the range-data case (start - end concatenation).\n   * @param {{yLbFormatter: Function}} f\n   * @param {number} index\n   * @param {any} j\n   */\n  formatYValue(f, index, j) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    if (w2.axisFlags.isRangeData) {\n      return f.yLbFormatter((_b = (_a = w2.rangeData.seriesRangeStart) == null ? void 0 : _a[index]) == null ? void 0 : _b[j], {\n        series: w2.rangeData.seriesRangeStart,\n        seriesIndex: index,\n        dataPointIndex: j,\n        w: w2\n      }) + \" - \" + f.yLbFormatter((_d = (_c = w2.rangeData.seriesRangeEnd) == null ? void 0 : _c[index]) == null ? void 0 : _d[j], {\n        series: w2.rangeData.seriesRangeEnd,\n        seriesIndex: index,\n        dataPointIndex: j,\n        w: w2\n      });\n    }\n    return f.yLbFormatter(w2.seriesData.series[index][j], {\n      series: w2.seriesData.series,\n      seriesIndex: index,\n      dataPointIndex: j,\n      w: w2\n    });\n  }\n  /**\n   * Format the goal-line values attached to a given (seriesIndex, dataPointIndex).\n   * Returns an empty array when no goals exist.\n   * @param {{yLbFormatter: Function}} f\n   * @param {number} index\n   * @param {any} j\n   */\n  formatGoalVals(f, index, j) {\n    var _a;\n    const w2 = this.w;\n    const goals = (_a = w2.seriesData.seriesGoals[index]) == null ? void 0 : _a[j];\n    if (!Array.isArray(goals)) return [];\n    return goals.map((goal) => ({\n      attrs: goal,\n      val: f.yLbFormatter(goal.value, {\n        seriesIndex: index,\n        dataPointIndex: j,\n        w: w2\n      })\n    }));\n  }\n  /**\n   * When the hovered element has a pattern fill (url(#…Pattern…)), reach\n   * into the pattern's first child to pull a stroke color. Otherwise\n   * return the raw fill attribute or the fallback.\n   * @param {any} e\n   * @param {string} fallback\n   */\n  resolvePatternColor(e2, fallback) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    const targetFill = (_a = e2 == null ? void 0 : e2.target) == null ? void 0 : _a.getAttribute(\"fill\");\n    if (!targetFill) return fallback;\n    if (targetFill.indexOf(\"url\") === -1) return targetFill;\n    if (targetFill.indexOf(\"Pattern\") === -1) return fallback;\n    const patternEl = w2.dom.baseEl.querySelector(\n      targetFill.substr(4).slice(0, -1)\n    );\n    return (_c = (_b = patternEl == null ? void 0 : patternEl.childNodes[0]) == null ? void 0 : _b.getAttribute(\"stroke\")) != null ? _c : fallback;\n  }\n  /**\n   * @param {number} i\n   */\n  getFormatters(i2) {\n    const w2 = this.w;\n    let yLbFormatter = w2.formatters.yLabelFormatters[i2];\n    let yLbTitleFormatter;\n    if (w2.formatters.ttVal !== void 0) {\n      if (Array.isArray(w2.formatters.ttVal)) {\n        yLbFormatter = /** @type {any} */\n        w2.formatters.ttVal[i2] && /** @type {any} */\n        w2.formatters.ttVal[i2].formatter;\n        yLbTitleFormatter = /** @type {any} */\n        w2.formatters.ttVal[i2] && /** @type {any} */\n        w2.formatters.ttVal[i2].title && /** @type {any} */\n        w2.formatters.ttVal[i2].title.formatter;\n      } else {\n        yLbFormatter = /** @type {any} */\n        w2.formatters.ttVal.formatter;\n        if (typeof /** @type {any} */\n        w2.formatters.ttVal.title.formatter === \"function\") {\n          yLbTitleFormatter = /** @type {any} */\n          w2.formatters.ttVal.title.formatter;\n        }\n      }\n    } else {\n      yLbTitleFormatter = w2.config.tooltip.y.title.formatter;\n    }\n    if (typeof yLbFormatter !== \"function\") {\n      if (w2.formatters.yLabelFormatters[0]) {\n        yLbFormatter = w2.formatters.yLabelFormatters[0];\n      } else {\n        yLbFormatter = function(label) {\n          return label;\n        };\n      }\n    }\n    if (typeof yLbTitleFormatter !== \"function\") {\n      yLbTitleFormatter = function(label) {\n        return label ? label + \": \" : \"\";\n      };\n    }\n    return {\n      yLbFormatter,\n      yLbTitleFormatter\n    };\n  }\n  /** @param {{fn: any, index: any, seriesIndex: any, j: any}} opts */\n  getSeriesName({ fn, index, seriesIndex, j }) {\n    const w2 = this.w;\n    return fn(String(w2.seriesData.seriesNames[index]), {\n      series: w2.seriesData.series,\n      seriesIndex,\n      dataPointIndex: j,\n      w: w2\n    });\n  }\n  /** @param {{ t?: any, j?: any, i?: any, ttItems?: any, values?: any, seriesName?: any, shared?: any, pColor?: any }} opts */\n  DOMHandling({ t: t2, j, ttItems, values, seriesName, shared, pColor }) {\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    const { val, goalVals, xVal, xAxisTTVal, zVal } = values;\n    if (!ttItems || !ttItems[t2]) return;\n    let ttItemsChildren = null;\n    ttItemsChildren = ttItems[t2].children;\n    if (w2.config.tooltip.fillSeriesColor) {\n      ttItems[t2].style.backgroundColor = pColor;\n      ttItemsChildren[0].style.display = \"none\";\n    }\n    if (ttCtx.showTooltipTitle) {\n      if (ttCtx.tooltipTitle === null) {\n        ttCtx.tooltipTitle = w2.dom.baseEl.querySelector(\n          \".apexcharts-tooltip-title\"\n        );\n      }\n      if (ttCtx.tooltipTitle) {\n        ttCtx.tooltipTitle.innerHTML = xVal;\n      }\n    }\n    if (ttCtx.isXAxisTooltipEnabled) {\n      if (ttCtx.xaxisTooltipText) {\n        ttCtx.xaxisTooltipText.innerHTML = xAxisTTVal !== \"\" ? xAxisTTVal : xVal;\n      }\n    }\n    const ttYLabel = ttItems[t2].querySelector(\n      \".apexcharts-tooltip-text-y-label\"\n    );\n    if (ttYLabel) {\n      ttYLabel.innerHTML = seriesName ? seriesName : \"\";\n    }\n    const ttYVal = ttItems[t2].querySelector(\".apexcharts-tooltip-text-y-value\");\n    if (ttYVal) {\n      ttYVal.innerHTML = typeof val !== \"undefined\" ? val : \"\";\n    }\n    if (ttItemsChildren[0] && ttItemsChildren[0].classList.contains(\"apexcharts-tooltip-marker\")) {\n      if (w2.config.tooltip.marker.fillColors && Array.isArray(w2.config.tooltip.marker.fillColors)) {\n        pColor = w2.config.tooltip.marker.fillColors[t2];\n      }\n      if (w2.config.tooltip.fillSeriesColor) {\n        ttItemsChildren[0].style.backgroundColor = pColor;\n      } else {\n        ttItemsChildren[0].style.color = pColor;\n      }\n    }\n    if (!w2.config.tooltip.marker.show) {\n      ttItemsChildren[0].style.display = \"none\";\n    }\n    const ttGLabel = ttItems[t2].querySelector(\n      \".apexcharts-tooltip-text-goals-label\"\n    );\n    const ttGVal = ttItems[t2].querySelector(\n      \".apexcharts-tooltip-text-goals-value\"\n    );\n    if (goalVals.length && w2.seriesData.seriesGoals[t2]) {\n      const createGoalsHtml = () => {\n        let gLabels = \"<div>\";\n        let gVals = \"<div>\";\n        goalVals.forEach((goal) => {\n          gLabels += ` <div style=\"display: flex\"><span class=\"apexcharts-tooltip-marker\" style=\"background-color: ${goal.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;\"></span> ${goal.attrs.name}</div>`;\n          gVals += `<div>${goal.val}</div>`;\n        });\n        ttGLabel.innerHTML = gLabels + `</div>`;\n        ttGVal.innerHTML = gVals + `</div>`;\n      };\n      if (shared) {\n        if (w2.seriesData.seriesGoals[t2][j] && Array.isArray(w2.seriesData.seriesGoals[t2][j])) {\n          createGoalsHtml();\n        } else {\n          ttGLabel.innerHTML = \"\";\n          ttGVal.innerHTML = \"\";\n        }\n      } else {\n        createGoalsHtml();\n      }\n    } else {\n      ttGLabel.innerHTML = \"\";\n      ttGVal.innerHTML = \"\";\n    }\n    if (zVal !== null) {\n      const ttZLabel = ttItems[t2].querySelector(\n        \".apexcharts-tooltip-text-z-label\"\n      );\n      ttZLabel.innerHTML = w2.config.tooltip.z.title;\n      const ttZVal = ttItems[t2].querySelector(\n        \".apexcharts-tooltip-text-z-value\"\n      );\n      ttZVal.innerHTML = typeof zVal !== \"undefined\" ? zVal : \"\";\n    }\n    if (shared && ttItemsChildren[0]) {\n      if (w2.config.tooltip.hideEmptySeries) {\n        const ttItemMarker = ttItems[t2].querySelector(\n          \".apexcharts-tooltip-marker\"\n        );\n        const ttItemText = ttItems[t2].querySelector(\".apexcharts-tooltip-text\");\n        if (parseFloat(val) == 0) {\n          ttItemMarker.style.display = \"none\";\n          ttItemText.style.display = \"none\";\n        } else {\n          ttItemMarker.style.display = \"block\";\n          ttItemText.style.display = \"block\";\n        }\n      }\n      if (typeof val === \"undefined\" || val === null || w2.globals.ancillaryCollapsedSeriesIndices.indexOf(t2) > -1 || w2.globals.collapsedSeriesIndices.indexOf(t2) > -1 || Array.isArray(ttCtx.tConfig.enabledOnSeries) && ttCtx.tConfig.enabledOnSeries.indexOf(t2) === -1) {\n        ttItemsChildren[0].parentNode.style.display = \"none\";\n      } else {\n        ttItemsChildren[0].parentNode.style.display = w2.config.tooltip.items.display;\n      }\n    } else {\n      if (Array.isArray(ttCtx.tConfig.enabledOnSeries) && ttCtx.tConfig.enabledOnSeries.indexOf(t2) === -1) {\n        ttItemsChildren[0].parentNode.style.display = \"none\";\n      }\n    }\n  }\n  /**\n   * @param {boolean} shared\n   * @param {number} i\n   */\n  toggleActiveInactiveSeries(shared, i2) {\n    const w2 = this.w;\n    if (shared) {\n      this.tooltipUtil.toggleAllTooltipSeriesGroups(\"enable\");\n    } else {\n      this.tooltipUtil.toggleAllTooltipSeriesGroups(\"disable\");\n      const firstTooltipSeriesGroup = w2.dom.baseEl.querySelector(\n        `.apexcharts-tooltip-series-group-${i2}`\n      );\n      if (firstTooltipSeriesGroup) {\n        const ftsGroup = (\n          /** @type {HTMLElement} */\n          firstTooltipSeriesGroup\n        );\n        ftsGroup.classList.add(\"apexcharts-active\");\n        ftsGroup.style.display = w2.config.tooltip.items.display;\n      }\n    }\n  }\n  /** @param {{i: any, j: any}} opts */\n  getValuesToPrint({ i: i2, j }) {\n    var _a, _b, _c, _d, _e, _f, _g, _h;\n    const w2 = this.w;\n    const filteredSeriesX = w2.seriesData.seriesX.map(\n      (ser) => ser.length > 0 ? ser : []\n    );\n    let xVal = \"\";\n    let xAxisTTVal = \"\";\n    let zVal = null;\n    let val = null;\n    const customFormatterOpts = {\n      series: w2.seriesData.series,\n      seriesIndex: i2,\n      dataPointIndex: j,\n      w: w2\n    };\n    const zFormatter = w2.formatters.ttZFormatter;\n    if (j === null) {\n      val = w2.seriesData.series[i2];\n    } else {\n      if (w2.axisFlags.isXNumeric && w2.config.chart.type !== \"treemap\") {\n        xVal = filteredSeriesX[i2][j];\n        if (filteredSeriesX[i2].length === 0) {\n          const firstActiveSeriesIndex = this.tooltipUtil.getFirstActiveXArray(filteredSeriesX);\n          xVal = filteredSeriesX[firstActiveSeriesIndex][j];\n        }\n      } else {\n        const dataFormat = new Data(this.w);\n        if (dataFormat.isFormatXY()) {\n          xVal = typeof /** @type {any} */\n          w2.config.series[i2].data[j] !== \"undefined\" ? (\n            /** @type {any} */\n            w2.config.series[i2].data[j].x\n          ) : \"\";\n        } else {\n          xVal = typeof w2.labelData.labels[j] !== \"undefined\" ? w2.labelData.labels[j] : \"\";\n        }\n      }\n    }\n    const bufferXVal = xVal;\n    if (w2.axisFlags.isXNumeric && w2.config.xaxis.type === \"datetime\") {\n      const xFormat = new Formatters(this.w);\n      xVal = xFormat.xLabelFormat(\n        /** @type {Function} */\n        w2.formatters.ttKeyFormatter,\n        bufferXVal,\n        bufferXVal,\n        {\n          i: void 0,\n          dateFormatter: new DateTime(this.w).formatDate,\n          w: this.w\n        }\n      );\n    } else {\n      if (w2.globals.isBarHorizontal) {\n        xVal = w2.formatters.yLabelFormatters[0](bufferXVal, customFormatterOpts);\n      } else {\n        xVal = (_c = (_b = (_a = w2.formatters).xLabelFormatter) == null ? void 0 : _b.call(_a, bufferXVal, customFormatterOpts)) != null ? _c : bufferXVal;\n      }\n    }\n    if (w2.config.tooltip.x.formatter !== void 0) {\n      xVal = (_f = (_e = (_d = w2.formatters).ttKeyFormatter) == null ? void 0 : _e.call(_d, bufferXVal, customFormatterOpts)) != null ? _f : bufferXVal;\n    }\n    if (w2.seriesData.seriesZ.length > 0 && w2.seriesData.seriesZ[i2].length > 0) {\n      zVal = zFormatter == null ? void 0 : zFormatter(w2.seriesData.seriesZ[i2][j], w2);\n    }\n    if (typeof w2.config.xaxis.tooltip.formatter === \"function\") {\n      xAxisTTVal = (_h = (_g = w2.formatters).xaxisTooltipFormatter) == null ? void 0 : _h.call(\n        _g,\n        bufferXVal,\n        customFormatterOpts\n      );\n    } else {\n      xAxisTTVal = xVal;\n    }\n    return {\n      val: Array.isArray(val) ? val.join(\" \") : val,\n      xVal: Array.isArray(xVal) ? xVal.join(\" \") : xVal,\n      xAxisTTVal: Array.isArray(xAxisTTVal) ? xAxisTTVal.join(\" \") : xAxisTTVal,\n      zVal\n    };\n  }\n  /** @param {{i: any, j: any, y1: any, y2: any, w: any}} opts */\n  handleCustomTooltip({ i: i2, j, y1, y2, w: w2 }) {\n    const tooltipEl = this.ttCtx.getElTooltip();\n    let fn = w2.config.tooltip.custom;\n    if (Array.isArray(fn)) {\n      fn = fn[i2];\n    }\n    if (typeof fn !== \"function\") return;\n    const customTooltip = fn({\n      series: w2.seriesData.series,\n      seriesIndex: i2,\n      dataPointIndex: j,\n      y1,\n      y2,\n      w: w2\n    });\n    if (tooltipEl) {\n      const arrowEl = tooltipEl.querySelector(\".apexcharts-tooltip-arrow\");\n      if (typeof customTooltip === \"string\" || typeof customTooltip === \"number\") {\n        tooltipEl.innerHTML = String(customTooltip);\n      } else if (customTooltip != null && (customTooltip instanceof Element || typeof customTooltip.nodeName === \"string\")) {\n        tooltipEl.innerHTML = \"\";\n        tooltipEl.appendChild(customTooltip.cloneNode(true));\n      }\n      if (arrowEl) tooltipEl.appendChild(arrowEl);\n    }\n  }\n}\nconst ARROW_TIP_OVERHANG = 7;\nconst POINT_TIP_GAP = 0;\nclass Position {\n  /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */\n  constructor(tooltipContext) {\n    this.ttCtx = tooltipContext;\n    this.w = tooltipContext.w;\n  }\n  /**\n   * This will move the crosshair (the vertical/horz line that moves along with mouse)\n   * Along with this, this function also calls the xaxisMove function\n   * @memberof Position\n   * @param {number} cx - point's x position, wherever point's x is, you need to move crosshair\n   * @param {number | null} [j]\n   */\n  moveXCrosshairs(cx, j = null) {\n    const ttCtx = this.ttCtx;\n    const w2 = this.w;\n    const xcrosshairs = ttCtx.getElXCrosshairs();\n    let x = cx - ttCtx.xcrosshairsWidth / 2;\n    const tickAmount = w2.labelData.labels.slice().length;\n    if (j !== null) {\n      x = w2.layout.gridWidth / tickAmount * j;\n    }\n    if (xcrosshairs !== null && !w2.globals.isBarHorizontal) {\n      xcrosshairs.setAttribute(\"x\", String(x));\n      xcrosshairs.setAttribute(\"x1\", String(x));\n      xcrosshairs.setAttribute(\"x2\", String(x));\n      xcrosshairs.setAttribute(\"y2\", String(w2.layout.gridHeight));\n      xcrosshairs.classList.add(\"apexcharts-active\");\n    }\n    if (x < 0) {\n      x = 0;\n    }\n    if (x > w2.layout.gridWidth) {\n      x = w2.layout.gridWidth;\n    }\n    if (ttCtx.isXAxisTooltipEnabled) {\n      let tx = x;\n      if (w2.config.xaxis.crosshairs.width === \"tickWidth\" || w2.config.xaxis.crosshairs.width === \"barWidth\") {\n        tx = x + ttCtx.xcrosshairsWidth / 2;\n      }\n      this.moveXAxisTooltip(tx);\n    }\n  }\n  /**\n   * This will move the crosshair (the vertical/horz line that moves along with mouse)\n   * Along with this, this function also calls the xaxisMove function\n   * @memberof Position\n   * @param {number} cy - point's y position, wherever point's y is, you need to move crosshair\n   */\n  moveYCrosshairs(cy) {\n    const ttCtx = this.ttCtx;\n    if (ttCtx.ycrosshairs !== null) {\n      Graphics.setAttrs(ttCtx.ycrosshairs, {\n        y1: cy,\n        y2: cy\n      });\n    }\n    if (ttCtx.ycrosshairsHidden !== null) {\n      Graphics.setAttrs(ttCtx.ycrosshairsHidden, {\n        y1: cy,\n        y2: cy\n      });\n    }\n  }\n  /**\n   ** AxisTooltip is the small rectangle which appears on x axis with x value, when user moves\n   * @memberof Position\n   * @param {number} cx - point's x position, wherever point's x is, you need to move\n   */\n  moveXAxisTooltip(cx) {\n    var _a, _b;\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    if (ttCtx.xaxisTooltip !== null && ttCtx.xcrosshairsWidth !== 0) {\n      ttCtx.xaxisTooltip.classList.add(\"apexcharts-active\");\n      const cy = ttCtx.xaxisOffY + w2.config.xaxis.tooltip.offsetY + w2.layout.translateY + 5 + w2.config.xaxis.offsetY;\n      const xaxisTTText = ttCtx.xaxisTooltip.getBoundingClientRect();\n      const xaxisTTTextWidth = xaxisTTText.width;\n      cx = cx - xaxisTTTextWidth / 2;\n      if (!isNaN(cx)) {\n        cx = cx + w2.layout.translateX;\n        const graphics = new Graphics(this.w);\n        const textRect = graphics.getTextRects(\n          (_b = (_a = ttCtx.xaxisTooltipText) == null ? void 0 : _a.innerHTML) != null ? _b : \"\",\n          w2.config.xaxis.labels.style.fontSize\n        );\n        if (ttCtx.xaxisTooltipText) {\n          ttCtx.xaxisTooltipText.style.minWidth = textRect.width + \"px\";\n        }\n        ttCtx.xaxisTooltip.style.left = cx + \"px\";\n        ttCtx.xaxisTooltip.style.top = cy + \"px\";\n      }\n    }\n  }\n  /**\n   * @param {number} index\n   */\n  moveYAxisTooltip(index) {\n    var _a, _b;\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    if (ttCtx.yaxisTTEls === null) {\n      ttCtx.yaxisTTEls = /** @type {any[]} */\n      [\n        ...w2.dom.baseEl.querySelectorAll(\".apexcharts-yaxistooltip\")\n      ];\n    }\n    const ycrosshairsHiddenRectY1 = parseInt(\n      (_b = (_a = ttCtx.ycrosshairsHidden) == null ? void 0 : _a.getAttribute(\"y1\")) != null ? _b : \"0\",\n      10\n    );\n    let cy = w2.layout.translateY + ycrosshairsHiddenRectY1;\n    if (ttCtx.yaxisTTEls) {\n      const yAxisTTRect = ttCtx.yaxisTTEls[index].getBoundingClientRect();\n      const yAxisTTHeight = yAxisTTRect.height;\n      let cx;\n      const labelsGroup = (\n        /** @type {SVGGElement | null} */\n        w2.dom.baseEl.querySelector(\n          `.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-texts-g`\n        )\n      );\n      const elWrapRect = w2.dom.elWrap.getBoundingClientRect();\n      if (labelsGroup) {\n        const lr = labelsGroup.getBoundingClientRect();\n        if (lr.width > 0) {\n          const labelsCenterInElWrap = lr.left + lr.width / 2 - elWrapRect.left;\n          cx = labelsCenterInElWrap - yAxisTTRect.width / 2;\n        }\n      }\n      if (cx == null) {\n        const GAP = 4;\n        cx = w2.config.yaxis[index].opposite ? w2.globals.translateYAxisX[index] + GAP : w2.globals.translateYAxisX[index] - yAxisTTRect.width - GAP;\n      }\n      cy = cy - yAxisTTHeight / 2;\n      if (w2.globals.ignoreYAxisIndexes.indexOf(index) === -1 && cy > 0 && cy < w2.layout.gridHeight) {\n        ttCtx.yaxisTTEls[index].classList.add(\"apexcharts-active\");\n        ttCtx.yaxisTTEls[index].style.top = cy + \"px\";\n        ttCtx.yaxisTTEls[index].style.left = cx + w2.config.yaxis[index].tooltip.offsetX + \"px\";\n      } else {\n        ttCtx.yaxisTTEls[index].classList.remove(\"apexcharts-active\");\n      }\n    }\n  }\n  /**\n   ** moves the whole tooltip by changing x, y attrs\n   * @memberof Position\n   * @param {number} cx - point's x position, wherever point's x is, you need to move tooltip\n   * @param {number} cy - point's y position, wherever point's y is, you need to move tooltip\n   * @param {number | null} [markerSize] - point's size\n   */\n  moveTooltip(cx, cy, markerSize = null) {\n    const ttCtx = this.ttCtx;\n    const tooltipEl = ttCtx.getElTooltip();\n    if (!tooltipEl) return;\n    const pos = this.computeTooltipPosition(cx, cy, markerSize);\n    if (pos === null) return;\n    this.applyTooltipPosition(tooltipEl, pos);\n  }\n  /**\n   * Pure-ish (reads from `this.ttCtx` + `this.w` but performs no DOM writes)\n   * computation of the tooltip box position, edge placement (for arrow),\n   * and arrow vertical offset. Returns null when inputs are not numeric.\n   *\n   * @param {number} cx\n   * @param {number} cy\n   * @param {number | null} [markerSize]\n   * @returns {{ x: number, y: number, placement: 'left'|'right', arrowY: number|null } | null}\n   */\n  computeTooltipPosition(cx, cy, markerSize = null) {\n    var _a, _b, _c, _d, _e, _f, _g;\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    const tooltipRect = ttCtx.tooltipRect;\n    const arrowEnabled = !!w2.config.tooltip.arrow;\n    const pointSize = markerSize !== null ? parseFloat(String(markerSize)) : 1;\n    const ttH = tooltipRect.ttHeight || 0;\n    const ttW = tooltipRect.ttWidth || 0;\n    const cxNum = parseFloat(String(cx));\n    const cyNum = parseFloat(String(cy));\n    if (isNaN(cxNum) || isNaN(cyNum)) return null;\n    const clearance = pointSize + (arrowEnabled ? ARROW_TIP_OVERHANG : 0) + POINT_TIP_GAP;\n    let x = cxNum + clearance;\n    const pointY = cyNum + w2.layout.translateY;\n    let y = arrowEnabled ? pointY - ttH / 2 + pointSize / 2 : cyNum + pointSize / 2;\n    let placement = \"right\";\n    if (x > w2.layout.gridWidth / 2) {\n      x = cxNum - ttW - clearance;\n      placement = \"left\";\n    }\n    if (x > w2.layout.gridWidth - ttW - 10) {\n      x = placement === \"left\" ? Math.min(w2.layout.gridWidth - ttW, x) : w2.layout.gridWidth - ttW;\n    }\n    if (x < -20) {\n      x = -20;\n    }\n    if (w2.config.tooltip.followCursor) {\n      const elGrid = ttCtx.getElGrid();\n      if (!elGrid) return null;\n      const seriesBound = elGrid.getBoundingClientRect();\n      x = ttCtx.e.clientX - seriesBound.left;\n      if (x > w2.layout.gridWidth / 2) {\n        x = x - ttW;\n        placement = \"left\";\n      } else {\n        placement = \"right\";\n      }\n      y = ttCtx.e.clientY + w2.layout.translateY - seriesBound.top;\n      if (y > w2.layout.gridHeight / 2) {\n        y = y - ttH;\n      }\n    } else {\n      if (!w2.globals.isBarHorizontal) {\n        if (arrowEnabled) {\n          const gridTop = w2.layout.translateY;\n          const gridBottom = w2.layout.translateY + w2.layout.gridHeight;\n          if (y + ttH > gridBottom) {\n            y = gridBottom - ttH;\n          }\n          if (y < gridTop) {\n            y = gridTop;\n          }\n        } else {\n          if (ttH / 2 + y > w2.layout.gridHeight) {\n            y = w2.layout.gridHeight - ttH + w2.layout.translateY;\n          }\n        }\n      }\n    }\n    if (isNaN(x)) return null;\n    x = x + w2.layout.translateX;\n    const a11y = (_b = (_a = w2.config) == null ? void 0 : _a.chart) == null ? void 0 : _b.accessibility;\n    if ((a11y == null ? void 0 : a11y.enabled) && ((_d = (_c = a11y == null ? void 0 : a11y.keyboard) == null ? void 0 : _c.navigation) == null ? void 0 : _d.enabled) && ((_g = (_f = (_e = w2.dom) == null ? void 0 : _e.baseEl) == null ? void 0 : _f.querySelector) == null ? void 0 : _g.call(_f, \".apexcharts-keyboard-focused\"))) {\n      const refPointY = arrowEnabled ? pointY : cyNum;\n      const margin = (pointSize || 1) + 12;\n      const tooltipTop = y;\n      const tooltipBottom = y + ttH;\n      if (!isNaN(refPointY) && ttH > 0 && tooltipTop < refPointY + margin && tooltipBottom > refPointY - margin) {\n        y = refPointY - ttH - margin;\n        if (y < 0) {\n          y = refPointY + margin;\n        }\n      }\n    }\n    let arrowY = null;\n    if (arrowEnabled && ttH > 0) {\n      const localY = pointY - y;\n      const minArrowY = 10;\n      const maxArrowY = ttH - 10;\n      arrowY = Math.max(minArrowY, Math.min(maxArrowY, localY));\n    }\n    return { x, y, placement, arrowY };\n  }\n  /**\n   * Single DOM-writer used by every positioning path on the main tooltip.\n   * Replaces the duplicated `style.left/top` writes that previously lived\n   * in Position.moveTooltip, Tooltip.drawFixedTooltipRect, and Intersect.\n   *\n   * @param {HTMLElement} tooltipEl\n   * @param {{\n   *   x: number,\n   *   y: number,\n   *   placement?: 'left'|'right'|'top'|'bottom',\n   *   arrowY?: number|null,\n   *   arrowX?: number|null,\n   * }} pos\n   */\n  applyTooltipPosition(tooltipEl, pos) {\n    if (!tooltipEl) return;\n    const firstPaint = tooltipEl.dataset.positioned !== \"true\";\n    if (firstPaint) {\n      tooltipEl.style.transitionProperty = \"none\";\n    }\n    tooltipEl.style.left = pos.x + \"px\";\n    tooltipEl.style.top = pos.y + \"px\";\n    if (pos.placement) {\n      tooltipEl.dataset.placement = pos.placement;\n    }\n    if (pos.arrowY != null) {\n      tooltipEl.style.setProperty(\"--apx-tt-arrow-y\", pos.arrowY + \"px\");\n    }\n    if (pos.arrowX != null) {\n      tooltipEl.style.setProperty(\"--apx-tt-arrow-x\", pos.arrowX + \"px\");\n    }\n    if (firstPaint) {\n      void tooltipEl.offsetWidth;\n      tooltipEl.dataset.positioned = \"true\";\n      requestAnimationFrame(() => {\n        tooltipEl.style.transitionProperty = \"\";\n      });\n    }\n  }\n  /**\n   * @param {number} i\n   * @param {number} j\n   */\n  moveMarkers(i2, j) {\n    var _a;\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    if (w2.globals.markers.size[i2] > 0) {\n      const allPoints = w2.dom.baseEl.querySelectorAll(\n        ` .apexcharts-series[data\\\\:realIndex='${i2}'] .apexcharts-marker`\n      );\n      for (let p2 = 0; p2 < allPoints.length; p2++) {\n        if (parseInt((_a = allPoints[p2].getAttribute(\"rel\")) != null ? _a : \"0\", 10) === j) {\n          ttCtx.marker.resetPointsSize();\n          ttCtx.marker.enlargeCurrentPoint(j, allPoints[p2]);\n        }\n      }\n    } else {\n      ttCtx.marker.resetPointsSize();\n      this.moveDynamicPointOnHover(j, i2);\n    }\n  }\n  // This function is used when you need to show markers/points only on hover -\n  // DIFFERENT X VALUES in multiple series\n  /**\n   * @param {number} j\n   * @param {number} capturedSeries\n   */\n  moveDynamicPointOnHover(j, capturedSeries) {\n    var _a, _b, _c, _d, _e;\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    let cx = 0;\n    let cy = 0;\n    const graphics = new Graphics(this.w);\n    const pointsArr = w2.globals.pointsArray;\n    const hoverSize = ttCtx.tooltipUtil.getHoverMarkerSize(capturedSeries);\n    const serType = (\n      /** @type {any} */\n      w2.config.series[capturedSeries].type\n    );\n    if (serType && (serType === \"column\" || serType === \"candlestick\" || serType === \"boxPlot\" || serType === \"violin\")) {\n      return;\n    }\n    cx = (_b = (_a = pointsArr[capturedSeries]) == null ? void 0 : _a[j]) == null ? void 0 : _b[0];\n    cy = ((_d = (_c = pointsArr[capturedSeries]) == null ? void 0 : _c[j]) == null ? void 0 : _d[1]) || 0;\n    const point = w2.dom.baseEl.querySelector(\n      `.apexcharts-series[data\\\\:realIndex='${capturedSeries}'] .apexcharts-series-markers path`\n    );\n    if (point && cy < w2.layout.gridHeight && cy > 0) {\n      const shape = (_e = point.getAttribute(\"shape\")) != null ? _e : \"circle\";\n      const path = graphics.getMarkerPath(cx, cy, shape, hoverSize * 1.5);\n      point.setAttribute(\"d\", path);\n    }\n    this.moveXCrosshairs(cx);\n    if (!ttCtx.fixedTooltip) {\n      this.moveTooltip(cx, cy, hoverSize);\n    }\n  }\n  // This function is used when you need to show markers/points only on hover -\n  // SAME X VALUES in multiple series\n  /**\n   * @param {number} j\n   */\n  moveDynamicPointsOnHover(j) {\n    var _a, _b;\n    const ttCtx = this.ttCtx;\n    const w2 = ttCtx.w;\n    let cx = 0;\n    let cy = 0;\n    let activeSeries = 0;\n    const pointsArr = w2.globals.pointsArray;\n    const series = new Series(this.w);\n    const graphics = new Graphics(this.w);\n    activeSeries = series.getActiveConfigSeriesIndex(\"asc\", [\n      \"line\",\n      \"area\",\n      \"scatter\",\n      \"bubble\"\n    ]);\n    const hoverSize = ttCtx.tooltipUtil.getHoverMarkerSize(activeSeries);\n    if ((_a = pointsArr[activeSeries]) == null ? void 0 : _a[j]) {\n      cx = pointsArr[activeSeries][j][0];\n      cy = pointsArr[activeSeries][j][1];\n    }\n    if (isNaN(cx)) {\n      return;\n    }\n    const points = ttCtx.tooltipUtil.getAllMarkers();\n    if (points.length) {\n      for (let p2 = 0; p2 < w2.seriesData.series.length; p2++) {\n        const pointArr = pointsArr[p2];\n        if (w2.globals.comboCharts) {\n          if (typeof pointArr === \"undefined\") {\n            points.splice(p2, 0, null);\n          }\n        }\n        if (points[p2] && pointArr && pointArr.length) {\n          let pcy = pointsArr[p2][j][1];\n          let pcy2;\n          points[p2].setAttribute(\"cx\", cx);\n          const shape = (_b = points[p2].getAttribute(\"shape\")) != null ? _b : \"circle\";\n          if (w2.config.chart.type === \"rangeArea\" && !w2.globals.comboCharts) {\n            const rangeStartIndex = j + w2.seriesData.series[p2].length;\n            pcy2 = pointsArr[p2][rangeStartIndex][1];\n            const pcyDiff = Math.abs(pcy - pcy2) / 2;\n            pcy = pcy - pcyDiff;\n          }\n          if (pcy !== null && !isNaN(pcy) && pcy < w2.layout.gridHeight + hoverSize && pcy + hoverSize > 0) {\n            const path = graphics.getMarkerPath(cx, pcy, shape, hoverSize);\n            points[p2].setAttribute(\"d\", path);\n          } else {\n            points[p2].setAttribute(\"d\", \"\");\n          }\n        }\n      }\n    }\n    this.moveXCrosshairs(cx);\n    if (!ttCtx.fixedTooltip) {\n      this.moveTooltip(cx, cy || w2.layout.gridHeight, hoverSize);\n    }\n  }\n  /**\n   * @param {number} j\n   * @param {number} capturedSeries\n   */\n  moveStickyTooltipOverBars(j, capturedSeries) {\n    var _a, _b, _c, _d, _e;\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    let barLen = w2.globals.columnSeries ? (\n      /** @type {any} */\n      w2.globals.columnSeries.length\n    ) : w2.seriesData.series.length;\n    if (w2.config.chart.stacked) {\n      barLen = w2.globals.barGroups.length;\n    }\n    let i2 = barLen >= 2 && barLen % 2 === 0 ? Math.floor(barLen / 2) : Math.floor(barLen / 2) + 1;\n    if (w2.globals.isBarHorizontal) {\n      const series = new Series(this.w);\n      i2 = series.getActiveConfigSeriesIndex(\"desc\") + 1;\n    }\n    let jBar = w2.dom.baseEl.querySelector(\n      `.apexcharts-bar-series .apexcharts-series[rel='${i2}'] path[j='${j}'], .apexcharts-candlestick-series .apexcharts-series[rel='${i2}'] path[j='${j}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${i2}'] path[j='${j}'], .apexcharts-violin-series .apexcharts-series[rel='${i2}'] path[j='${j}'], .apexcharts-rangebar-series .apexcharts-series[rel='${i2}'] path[j='${j}']`\n    );\n    if (!jBar && typeof capturedSeries === \"number\") {\n      jBar = w2.dom.baseEl.querySelector(\n        `.apexcharts-bar-series .apexcharts-series[data\\\\:realIndex='${capturedSeries}'] path[j='${j}'],\n        .apexcharts-candlestick-series .apexcharts-series[data\\\\:realIndex='${capturedSeries}'] path[j='${j}'],\n        .apexcharts-boxPlot-series .apexcharts-series[data\\\\:realIndex='${capturedSeries}'] path[j='${j}'],\n        .apexcharts-violin-series .apexcharts-series[data\\\\:realIndex='${capturedSeries}'] path[j='${j}'],\n        .apexcharts-rangebar-series .apexcharts-series[data\\\\:realIndex='${capturedSeries}'] path[j='${j}']`\n      );\n    }\n    let bc = null;\n    const bcc = (\n      /** @type {any} */\n      w2.globals.barCanvasCoords\n    );\n    if (!jBar && bcc) {\n      bc = typeof capturedSeries === \"number\" && ((_a = bcc[capturedSeries]) == null ? void 0 : _a[j]) || null;\n      if (!bc) {\n        for (const key in bcc) {\n          if ((_b = bcc[key]) == null ? void 0 : _b[j]) {\n            bc = bcc[key][j];\n            break;\n          }\n        }\n      }\n    }\n    let bcx = jBar ? parseFloat((_c = jBar.getAttribute(\"cx\")) != null ? _c : \"0\") : bc ? bc.cx : 0;\n    let bcy = jBar ? parseFloat((_d = jBar.getAttribute(\"cy\")) != null ? _d : \"0\") : bc ? bc.cy : 0;\n    const bw = jBar ? parseFloat((_e = jBar.getAttribute(\"barWidth\")) != null ? _e : \"0\") : bc ? bc.barWidth : 0;\n    const elGrid = ttCtx.getElGrid();\n    if (!elGrid) return;\n    const seriesBound = elGrid.getBoundingClientRect();\n    const isBoxOrCandle = jBar && (jBar.classList.contains(\"apexcharts-candlestick-area\") || jBar.classList.contains(\"apexcharts-boxPlot-area\"));\n    if (w2.axisFlags.isXNumeric) {\n      if (jBar && !isBoxOrCandle) {\n        const center = this._datapointCenterXFromBars(j);\n        if (center != null) {\n          bcx = center;\n        } else {\n          bcx = bcx - (barLen % 2 !== 0 ? bw / 2 : 0);\n        }\n      }\n      if (jBar && // fixes apexcharts.js#2354\n      isBoxOrCandle) {\n        bcx = bcx - bw / 2;\n      }\n    } else {\n      if (!w2.globals.isBarHorizontal && !bc) {\n        bcx = ttCtx.xAxisTicksPositions[j - 1] + ttCtx.dataPointsDividedWidth / 2;\n        if (isNaN(bcx)) {\n          bcx = ttCtx.xAxisTicksPositions[j] - ttCtx.dataPointsDividedWidth / 2;\n        }\n      }\n    }\n    if (!w2.globals.isBarHorizontal) {\n      if (w2.config.tooltip.followCursor) {\n        bcy = ttCtx.e.clientY - seriesBound.top - ttCtx.tooltipRect.ttHeight / 2;\n      } else {\n        if (bcy + ttCtx.tooltipRect.ttHeight + 15 > w2.layout.gridHeight) {\n          bcy = w2.layout.gridHeight;\n        }\n      }\n    } else {\n      bcy = bcy - ttCtx.tooltipRect.ttHeight;\n    }\n    if (!w2.globals.isBarHorizontal) {\n      this.moveXCrosshairs(bcx);\n    }\n    if (!ttCtx.fixedTooltip) {\n      if (w2.globals.isBarHorizontal && !w2.config.tooltip.followCursor) {\n        const placed = this.placeHorizontalSharedTooltip(j);\n        if (placed) return;\n      }\n      this.moveTooltip(bcx, bcy || w2.layout.gridHeight);\n    }\n  }\n  /**\n   * Place tooltip above (or flipped: below) the union rect of all bars at\n   * dataPointIndex `j` for horizontal-bar-likes. Returns true when a\n   * Compute the true horizontal center of dataPointIndex `j` in grid-local\n   * coords from the union of every visible bar's `getBoundingClientRect()`.\n   * Used as a replacement for the (buggy on numeric/datetime xaxis) `cx`\n   * attribute math in `moveStickyTooltipOverBars`. Returns null when no\n   * usable bars are found.\n   * @param {number} j\n   * @returns {number | null}\n   */\n  _datapointCenterXFromBars(j) {\n    var _a, _b;\n    const w2 = this.w;\n    const bars = w2.dom.baseEl.querySelectorAll(\n      `.apexcharts-bar-series path[j='${j}'],.apexcharts-rangebar-series path[j='${j}']`\n    );\n    if (!bars.length) return null;\n    let unionLeft = Infinity;\n    let unionRight = -Infinity;\n    for (const bar of bars) {\n      const parent = (\n        /** @type {Element|null} */\n        bar.parentNode\n      );\n      if ((_b = (_a = parent == null ? void 0 : parent.classList) == null ? void 0 : _a.contains) == null ? void 0 : _b.call(_a, \"apexcharts-series-collapsed\")) continue;\n      const r2 = (\n        /** @type {Element} */\n        bar.getBoundingClientRect()\n      );\n      if (r2.width === 0 && r2.height === 0) continue;\n      if (r2.left < unionLeft) unionLeft = r2.left;\n      if (r2.right > unionRight) unionRight = r2.right;\n    }\n    if (!isFinite(unionLeft)) return null;\n    return AxisMapping.screenXToPlotPx(w2, (unionLeft + unionRight) / 2);\n  }\n  /**\n   * Place tooltip above (or flipped: below) the union rect of all bars at\n   * dataPointIndex `j` for horizontal-bar-likes. Returns true when a\n   * placement was applied; false when no bars found (caller falls back).\n   * @param {number} j\n   * @returns {boolean}\n   */\n  placeHorizontalSharedTooltip(j) {\n    var _a, _b;\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    const tooltipEl = ttCtx.getElTooltip();\n    if (!tooltipEl) return false;\n    const elGrid = ttCtx.getElGrid();\n    if (!elGrid) return false;\n    const gridRect = elGrid.getBoundingClientRect();\n    const bars = w2.dom.baseEl.querySelectorAll(\n      `.apexcharts-bar-series path[j='${j}'],.apexcharts-rangebar-series path[j='${j}'],.apexcharts-boxPlot-series path[j='${j}']`\n    );\n    if (!bars.length) return false;\n    let unionLeft = Infinity;\n    let unionRight = -Infinity;\n    let unionTop = Infinity;\n    let unionBottom = -Infinity;\n    for (const bar of bars) {\n      const parent = (\n        /** @type {Element|null} */\n        bar.parentNode\n      );\n      if ((_b = (_a = parent == null ? void 0 : parent.classList) == null ? void 0 : _a.contains) == null ? void 0 : _b.call(_a, \"apexcharts-series-collapsed\")) continue;\n      const r2 = (\n        /** @type {Element} */\n        bar.getBoundingClientRect()\n      );\n      if (r2.width === 0 && r2.height === 0) continue;\n      if (r2.left < unionLeft) unionLeft = r2.left;\n      if (r2.right > unionRight) unionRight = r2.right;\n      if (r2.top < unionTop) unionTop = r2.top;\n      if (r2.bottom > unionBottom) unionBottom = r2.bottom;\n    }\n    if (!isFinite(unionLeft)) return false;\n    const ttW = ttCtx.tooltipRect.ttWidth || 0;\n    const ttH = ttCtx.tooltipRect.ttHeight || 0;\n    const rowCenterX = (unionLeft + unionRight) / 2 - gridRect.left + w2.layout.translateX;\n    const rowTopElWrap = unionTop - gridRect.top + w2.layout.translateY;\n    const rowBottomElWrap = unionBottom - gridRect.top + w2.layout.translateY;\n    const gridTop = w2.layout.translateY;\n    const gridBottom = w2.layout.translateY + w2.layout.gridHeight;\n    const gridLeft = w2.layout.translateX;\n    const gridRight = w2.layout.translateX + w2.layout.gridWidth;\n    let placement = \"top\";\n    let finalY = rowTopElWrap - ttH - ARROW_TIP_OVERHANG;\n    if (finalY < gridTop) {\n      const belowTop = rowBottomElWrap + ARROW_TIP_OVERHANG;\n      if (belowTop + ttH <= gridBottom) {\n        placement = \"bottom\";\n        finalY = belowTop;\n      }\n    }\n    let finalX = rowCenterX - ttW / 2;\n    if (finalX < gridLeft) finalX = gridLeft;\n    if (finalX + ttW > gridRight) finalX = gridRight - ttW;\n    const arrowX = Math.max(10, Math.min(ttW - 10, rowCenterX - finalX));\n    this.applyTooltipPosition(tooltipEl, {\n      x: finalX,\n      y: finalY,\n      placement,\n      arrowY: null,\n      arrowX\n    });\n    return true;\n  }\n}\nfunction renderMarkerSVG(shape) {\n  const svg = (body) => `<svg viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">${body}</svg>`;\n  switch (shape) {\n    case \"square\":\n    case \"rect\":\n      return svg('<rect x=\"1\" y=\"1\" width=\"10\" height=\"10\" rx=\"1\" fill=\"currentColor\"/>');\n    case \"line\":\n      return svg('<rect x=\"0\" y=\"5\" width=\"12\" height=\"2\" rx=\"1\" fill=\"currentColor\"/>');\n    case \"diamond\":\n      return svg('<path d=\"M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z\" fill=\"currentColor\"/>');\n    case \"triangle\":\n      return svg('<path d=\"M6 1 L11.2 10.5 L0.8 10.5 Z\" fill=\"currentColor\"/>');\n    case \"cross\":\n      return svg(\n        '<path d=\"M2 2 L10 10 M10 2 L2 10\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>'\n      );\n    case \"plus\":\n      return svg(\n        '<path d=\"M6 1 L6 11 M1 6 L11 6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>'\n      );\n    case \"star\":\n      return svg(\n        '<path d=\"M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z\" fill=\"currentColor\"/>'\n      );\n    case \"sparkle\":\n      return svg(\n        '<path d=\"M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z\" fill=\"currentColor\"/>'\n      );\n    case \"circle\":\n    default:\n      return svg('<circle cx=\"6\" cy=\"6\" r=\"5\" fill=\"currentColor\"/>');\n  }\n}\nclass Marker {\n  /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */\n  constructor(tooltipContext) {\n    this.w = tooltipContext.w;\n    this.ttCtx = tooltipContext;\n    this.ctx = tooltipContext.ctx;\n    this.tooltipPosition = new Position(tooltipContext);\n  }\n  drawDynamicPoints() {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const marker = new Markers(this.w, this.ctx);\n    const elsSeries = (\n      /** @type {any[]} */\n      [\n        ...w2.dom.baseEl.querySelectorAll(\".apexcharts-series\")\n      ]\n    );\n    if (w2.config.chart.stacked) {\n      elsSeries.sort((a2, b2) => {\n        return parseFloat(a2.getAttribute(\"data:realIndex\")) - parseFloat(b2.getAttribute(\"data:realIndex\"));\n      });\n    }\n    for (let i2 = 0; i2 < elsSeries.length; i2++) {\n      const pointsMain = elsSeries[i2].querySelector(\n        `.apexcharts-series-markers-wrap`\n      );\n      if (pointsMain !== null) {\n        let PointClasses = `apexcharts-marker w${(Math.random() + 1).toString(36).substring(4)}`;\n        if ((w2.config.chart.type === \"line\" || w2.config.chart.type === \"area\") && !w2.globals.comboCharts && !w2.config.tooltip.intersect) {\n          PointClasses += \" no-pointer-events\";\n        }\n        const elPointOptions = marker.getMarkerConfig({\n          cssClass: PointClasses,\n          seriesIndex: Number(pointsMain.getAttribute(\"data:realIndex\"))\n          // fixes apexcharts/apexcharts.js #1427\n        });\n        const point = graphics.drawMarker(0, 0, elPointOptions);\n        point.node.setAttribute(\"default-marker-size\", 0);\n        const elPointsG = BrowserAPIs.createElementNS(SVGNS$2, \"g\");\n        elPointsG.classList.add(\"apexcharts-series-markers\");\n        elPointsG.appendChild(point.node);\n        pointsMain.appendChild(elPointsG);\n      }\n    }\n  }\n  /**\n   * @param {any} rel\n   * @param {any} point\n   * @param {number | null} [x]\n   * @param {number | null} [y]\n   */\n  enlargeCurrentPoint(rel, point, x = null, y = null) {\n    const w2 = this.w;\n    let appliedSize = w2.config.markers.hover.size;\n    if (w2.config.chart.type !== \"bubble\") {\n      appliedSize = this.newPointSize(rel, point);\n    }\n    let cx = point.getAttribute(\"cx\");\n    let cy = point.getAttribute(\"cy\");\n    if (x !== null && y !== null) {\n      cx = x;\n      cy = y;\n    }\n    this.tooltipPosition.moveXCrosshairs(cx);\n    if (!this.fixedTooltip) {\n      if (w2.config.chart.type === \"radar\") {\n        const elGrid = this.ttCtx.getElGrid();\n        if (!elGrid) return;\n        const seriesBound = elGrid.getBoundingClientRect();\n        cx = this.ttCtx.e.clientX - seriesBound.left;\n      }\n      this.tooltipPosition.moveTooltip(cx, cy, appliedSize);\n    }\n  }\n  /**\n   * @param {number} j\n   */\n  enlargePoints(j) {\n    var _a, _b;\n    const w2 = this.w;\n    const me = this;\n    const ttCtx = this.ttCtx;\n    const col = j;\n    const points = w2.dom.baseEl.querySelectorAll(\n      \".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker\"\n    );\n    let newSize = w2.config.markers.hover.size;\n    for (let p2 = 0; p2 < points.length; p2++) {\n      const rel = points[p2].getAttribute(\"rel\");\n      const index = points[p2].getAttribute(\"index\");\n      if (newSize === void 0) {\n        newSize = w2.globals.markers.size[\n          /** @type {any} */\n          index\n        ] + w2.config.markers.hover.sizeOffset;\n      }\n      if (col === parseInt(rel != null ? rel : \"0\", 10)) {\n        me.newPointSize(col, points[p2]);\n        const cx = (_a = points[p2].getAttribute(\"cx\")) != null ? _a : \"0\";\n        const cy = (_b = points[p2].getAttribute(\"cy\")) != null ? _b : \"0\";\n        me.tooltipPosition.moveXCrosshairs(parseFloat(cx));\n        if (!ttCtx.fixedTooltip) {\n          me.tooltipPosition.moveTooltip(\n            parseFloat(cx),\n            parseFloat(cy),\n            newSize\n          );\n        }\n      } else {\n        me.oldPointSize(points[p2]);\n      }\n    }\n  }\n  /**\n   * Resizes the hovered marker to its hover size and returns the size applied,\n   * so the caller can position the tooltip clear of the enlarged dot. Undefined\n   * when nothing was resized (a zero-size marker has nothing to clear).\n   * @param {any} rel\n   * @param {any} point\n   * @returns {number | undefined}\n   */\n  newPointSize(rel, point) {\n    const w2 = this.w;\n    let newSize = w2.config.markers.hover.size;\n    const elPoint = rel === 0 ? point.parentNode.firstChild : point.parentNode.lastChild;\n    if (elPoint.getAttribute(\"default-marker-size\") !== \"0\") {\n      const index = parseInt(elPoint.getAttribute(\"index\"), 10);\n      if (newSize === void 0) {\n        newSize = w2.globals.markers.size[index] + w2.config.markers.hover.sizeOffset;\n      }\n      if (newSize < 0) {\n        newSize = 0;\n      }\n      const path = this.ttCtx.tooltipUtil.getPathFromPoint(point, newSize);\n      point.setAttribute(\"d\", path);\n      return newSize;\n    }\n    return void 0;\n  }\n  /**\n   * @param {any} point\n   */\n  oldPointSize(point) {\n    const size = parseFloat(point.getAttribute(\"default-marker-size\"));\n    const path = this.ttCtx.tooltipUtil.getPathFromPoint(point, size);\n    point.setAttribute(\"d\", path);\n  }\n  resetPointsSize() {\n    var _a;\n    const w2 = this.w;\n    const points = w2.dom.baseEl.querySelectorAll(\n      \".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker\"\n    );\n    for (let p2 = 0; p2 < points.length; p2++) {\n      const size = parseFloat(\n        (_a = points[p2].getAttribute(\"default-marker-size\")) != null ? _a : \"0\"\n      );\n      if (Utils$1.isNumber(size) && size > 0) {\n        const path = this.ttCtx.tooltipUtil.getPathFromPoint(points[p2], size);\n        points[p2].setAttribute(\"d\", path);\n      } else {\n        points[p2].setAttribute(\"d\", \"M0,0\");\n      }\n    }\n  }\n}\nclass Intersect {\n  /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */\n  constructor(tooltipContext) {\n    this.w = tooltipContext.w;\n    const w2 = this.w;\n    this.ttCtx = tooltipContext;\n    this.isVerticalGroupedRangeBar = !w2.globals.isBarHorizontal && w2.config.chart.type === \"rangeBar\" && w2.config.plotOptions.bar.rangeBarGroupRows;\n  }\n  // a helper function to get an element's attribute value\n  /**\n   * @param {Event} e\n   * @param {string} attr\n   */\n  getAttr(e2, attr) {\n    var _a;\n    return parseFloat(\n      /** @type {Element} */\n      (_a = e2.target.getAttribute(attr)) != null ? _a : \"\"\n    );\n  }\n  // handle tooltip for heatmaps and treemaps\n  /** @param {{e: any, opt: any, x: any, y: any, type: any}} opts */\n  handleHeatTreeTooltip({ e: e2, opt, x, y, type }) {\n    var _a, _b;\n    const ttCtx = this.ttCtx;\n    const w2 = this.w;\n    const renderer = w2.globals.activeRenderer;\n    const canvasCells = type === \"heatmap\" && renderer && renderer.kind === \"canvas\" && typeof renderer.hitTest === \"function\";\n    let i2, j, cx, cy, width, height;\n    if (canvasCells) {\n      const seriesBound = opt.elGrid.getBoundingClientRect();\n      const clientX = e2.type === \"touchmove\" ? e2.touches[0].clientX : e2.clientX;\n      const clientY = e2.type === \"touchmove\" ? e2.touches[0].clientY : e2.clientY;\n      const hit = renderer.hitTest(\n        clientX - seriesBound.left,\n        clientY - seriesBound.top\n      );\n      if (!hit) {\n        return { x, y, noHit: true };\n      }\n      i2 = hit.seriesIndex;\n      j = hit.dataPointIndex;\n      cx = hit.x;\n      cy = hit.y;\n      width = hit.width;\n      height = hit.height;\n    } else if (e2.target.classList.contains(`apexcharts-${type}-rect`)) {\n      i2 = this.getAttr(e2, \"i\");\n      j = this.getAttr(e2, \"j\");\n      cx = this.getAttr(e2, \"cx\");\n      cy = this.getAttr(e2, \"cy\");\n      width = this.getAttr(e2, \"width\");\n      height = this.getAttr(e2, \"height\");\n    } else {\n      return { x, y };\n    }\n    ttCtx.tooltipLabels.drawSeriesTexts({\n      ttItems: opt.ttItems,\n      i: i2,\n      j,\n      shared: false,\n      e: e2\n    });\n    w2.interact.capturedSeriesIndex = i2;\n    w2.interact.capturedDataPointIndex = j;\n    ttCtx.tooltipPosition.moveXCrosshairs(cx + width / 2);\n    const tooltipEl = ttCtx.getElTooltip();\n    if (type === \"heatmap\" && w2.config.tooltip.arrow && !w2.config.tooltip.followCursor && tooltipEl) {\n      const elGridRect = opt.elGrid.getBoundingClientRect();\n      const elWrapRect = w2.dom.elWrap.getBoundingClientRect();\n      const gridOffsetXInElWrap = elGridRect.left - elWrapRect.left;\n      let clLeft, clTop, clRight, clBottom;\n      if (canvasCells) {\n        clLeft = cx;\n        clTop = cy;\n        clRight = cx + width;\n        clBottom = cy + height;\n      } else {\n        const r2 = e2.target.getBoundingClientRect();\n        clLeft = r2.left - elGridRect.left;\n        clTop = r2.top - elGridRect.top;\n        clRight = r2.right - elGridRect.left;\n        clBottom = r2.bottom - elGridRect.top;\n      }\n      const ttW = ttCtx.tooltipRect.ttWidth || 0;\n      const ttH = ttCtx.tooltipRect.ttHeight || 0;\n      const cellCenterXInElWrap = (clLeft + clRight) / 2 + gridOffsetXInElWrap;\n      const cellTopInElWrap = clTop + w2.layout.translateY;\n      const cellBottomInElWrap = clBottom + w2.layout.translateY;\n      const gridTop = w2.layout.translateY;\n      const gridBottom = w2.layout.translateY + w2.layout.gridHeight;\n      const gridLeft = gridOffsetXInElWrap;\n      const gridRight = gridOffsetXInElWrap + w2.layout.gridWidth;\n      let placement = \"top\";\n      let finalY = cellTopInElWrap - ttH - ARROW_TIP_OVERHANG;\n      if (finalY < gridTop) {\n        const belowTop = cellBottomInElWrap + ARROW_TIP_OVERHANG;\n        if (belowTop + ttH <= gridBottom) {\n          placement = \"bottom\";\n          finalY = belowTop;\n        } else {\n          finalY = gridTop;\n        }\n      }\n      let finalX = cellCenterXInElWrap - ttW / 2;\n      if (finalX < gridLeft) finalX = gridLeft;\n      if (finalX + ttW > gridRight) finalX = gridRight - ttW;\n      const arrowX = Math.max(10, Math.min(ttW - 10, cellCenterXInElWrap - finalX));\n      ttCtx.tooltipPosition.applyTooltipPosition(tooltipEl, {\n        x: finalX,\n        y: finalY,\n        placement,\n        arrowY: null,\n        arrowX\n      });\n      return { x: finalX, y: finalY, positioned: true };\n    }\n    x = cx + ttCtx.tooltipRect.ttWidth / 2 + width;\n    y = cy + ttCtx.tooltipRect.ttHeight / 2 - height / 2;\n    if (x > w2.layout.gridWidth / 2) {\n      x = cx - ttCtx.tooltipRect.ttWidth / 2 + width;\n    }\n    if (ttCtx.w.config.tooltip.followCursor) {\n      const seriesBound = w2.dom.elWrap.getBoundingClientRect();\n      x = ((_a = w2.interact.clientX) != null ? _a : 0) - seriesBound.left - (x > w2.layout.gridWidth / 2 ? ttCtx.tooltipRect.ttWidth : 0);\n      y = ((_b = w2.interact.clientY) != null ? _b : 0) - seriesBound.top - (y > w2.layout.gridHeight / 2 ? ttCtx.tooltipRect.ttHeight : 0);\n    }\n    return {\n      x,\n      y\n    };\n  }\n  /**\n   * handle tooltips for line/area/scatter charts where tooltip.intersect is true\n   * when user hovers over the marker directly, this function is executed\n   */\n  /** @param {{e: any, opt: any, x: any, y: any}} opts */\n  handleMarkerTooltip({ e: e2, opt, x, y }) {\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    let i2;\n    let j;\n    if (e2.target.classList.contains(\"apexcharts-marker\")) {\n      const cx = parseInt(opt.paths.getAttribute(\"cx\"), 10);\n      const cy = parseInt(opt.paths.getAttribute(\"cy\"), 10);\n      const val = parseFloat(opt.paths.getAttribute(\"val\"));\n      j = parseInt(opt.paths.getAttribute(\"rel\"), 10);\n      i2 = parseInt(\n        opt.paths.parentNode.parentNode.parentNode.getAttribute(\"rel\"),\n        10\n      ) - 1;\n      if (ttCtx.intersect) {\n        const el = Utils$1.findAncestor(opt.paths, \"apexcharts-series\");\n        if (el) {\n          i2 = parseInt(el.getAttribute(\"data:realIndex\"), 10);\n        }\n      }\n      ttCtx.tooltipLabels.drawSeriesTexts({\n        ttItems: opt.ttItems,\n        i: i2,\n        j,\n        shared: ttCtx.showOnIntersect ? false : w2.config.tooltip.shared,\n        e: e2\n      });\n      if (e2.type === \"mouseup\") {\n        ttCtx.markerClick(e2, i2, j);\n      }\n      w2.interact.capturedSeriesIndex = i2;\n      w2.interact.capturedDataPointIndex = j;\n      const arrowEnabled = !!w2.config.tooltip.arrow;\n      x = cx;\n      if (arrowEnabled) {\n        y = cy;\n      } else {\n        y = cy + w2.layout.translateY - ttCtx.tooltipRect.ttHeight * 1.4;\n        if (val < 0) {\n          y = cy;\n        }\n      }\n      if (ttCtx.w.config.tooltip.followCursor) {\n        const elGrid = ttCtx.getElGrid();\n        if (!elGrid) return { x, y };\n        const seriesBound = elGrid.getBoundingClientRect();\n        y = ttCtx.e.clientY + w2.layout.translateY - seriesBound.top;\n      }\n      ttCtx.marker.enlargeCurrentPoint(j, opt.paths, x, y);\n    }\n    return {\n      x,\n      y\n    };\n  }\n  /**\n   * handle tooltips for bar/column charts\n   */\n  /** @param {{e: any, opt: any}} opts */\n  handleBarTooltip({ e: e2, opt }) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    const tooltipEl = ttCtx.getElTooltip();\n    let bx = 0;\n    let x = 0;\n    let y = 0;\n    let i2 = 0;\n    let strokeWidth;\n    const barXY = this.getBarTooltipXY({\n      e: e2,\n      opt\n    });\n    if (barXY.j === null && barXY.barHeight === 0 && barXY.barWidth === 0) {\n      return;\n    }\n    i2 = barXY.i;\n    const j = barXY.j;\n    w2.interact.capturedSeriesIndex = i2;\n    w2.interact.capturedDataPointIndex = j !== null ? j : w2.interact.capturedDataPointIndex;\n    if (w2.globals.isBarHorizontal && ttCtx.tooltipUtil.hasBars() || !w2.config.tooltip.shared) {\n      x = barXY.x;\n      y = barXY.y;\n      strokeWidth = Array.isArray(w2.config.stroke.width) ? w2.config.stroke.width[i2] : w2.config.stroke.width;\n      bx = x;\n    } else {\n      if (!w2.globals.comboCharts && !w2.config.tooltip.shared) {\n        bx = bx / 2;\n      }\n    }\n    if (isNaN(y)) {\n      y = w2.globals.svgHeight - ttCtx.tooltipRect.ttHeight;\n    }\n    if (x + ttCtx.tooltipRect.ttWidth > w2.layout.gridWidth) {\n      x = x - ttCtx.tooltipRect.ttWidth;\n    } else if (x < 0) {\n      x = 0;\n    }\n    if (ttCtx.w.config.tooltip.followCursor) {\n      const elGrid = ttCtx.getElGrid();\n      if (!elGrid) return;\n    }\n    if (ttCtx.tooltip === null) {\n      ttCtx.tooltip = w2.dom.baseEl.querySelector(\n        \".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)\"\n      );\n    }\n    if (!w2.config.tooltip.shared) {\n      if (w2.globals.comboBarCount > 0) {\n        ttCtx.tooltipPosition.moveXCrosshairs(bx + strokeWidth / 2);\n      } else {\n        ttCtx.tooltipPosition.moveXCrosshairs(bx);\n      }\n    }\n    if (!ttCtx.fixedTooltip && (!w2.config.tooltip.shared || w2.globals.isBarHorizontal && ttCtx.tooltipUtil.hasBars())) {\n      y = y + w2.layout.translateY - ttCtx.tooltipRect.ttHeight / 2;\n      if (tooltipEl) {\n        const ttW = ttCtx.tooltipRect.ttWidth || 0;\n        const ttH = ttCtx.tooltipRect.ttHeight || 0;\n        const arrowEnabled = !!w2.config.tooltip.arrow;\n        const { barAnchorXInGrid, barAnchorYInGrid, barRectInGrid } = barXY;\n        const elGridRect = (_a = ttCtx.getElGrid()) == null ? void 0 : _a.getBoundingClientRect();\n        const elWrapRect = w2.dom.elWrap.getBoundingClientRect();\n        const gridOffsetXInElWrap = elGridRect ? elGridRect.left - elWrapRect.left : w2.layout.translateX;\n        let placement;\n        let arrowY = null;\n        let arrowX = null;\n        let finalX = x + gridOffsetXInElWrap;\n        let finalY = y;\n        if (arrowEnabled && w2.globals.isBarHorizontal && barRectInGrid != null) {\n          const gridTop = w2.layout.translateY;\n          const gridBottom = w2.layout.translateY + w2.layout.gridHeight;\n          const gridLeft = gridOffsetXInElWrap;\n          const gridRight = gridOffsetXInElWrap + w2.layout.gridWidth;\n          const barCenterXInElWrap = (barRectInGrid.left + barRectInGrid.right) / 2 + gridOffsetXInElWrap;\n          const barTopInElWrap = barRectInGrid.top + w2.layout.translateY;\n          const barBottomInElWrap = barRectInGrid.bottom + w2.layout.translateY;\n          let proposedTop = barTopInElWrap - ttH - ARROW_TIP_OVERHANG;\n          placement = \"top\";\n          if (proposedTop < gridTop) {\n            const belowTop = barBottomInElWrap + ARROW_TIP_OVERHANG;\n            if (belowTop + ttH <= gridBottom) {\n              placement = \"bottom\";\n              proposedTop = belowTop;\n            }\n          }\n          finalY = proposedTop;\n          finalX = barCenterXInElWrap - ttW / 2;\n          if (finalX < gridLeft) finalX = gridLeft;\n          if (finalX + ttW > gridRight) finalX = gridRight - ttW;\n          arrowX = Math.max(\n            10,\n            Math.min(ttW - 10, barCenterXInElWrap - finalX)\n          );\n        } else if (arrowEnabled && barAnchorXInGrid != null && barAnchorYInGrid != null) {\n          const barCenterXInElWrap = barAnchorXInGrid + gridOffsetXInElWrap;\n          const gridCenterXInElWrap = gridOffsetXInElWrap + w2.layout.gridWidth / 2;\n          const barLeftInElWrap = ((_b = barRectInGrid == null ? void 0 : barRectInGrid.left) != null ? _b : barAnchorXInGrid) + gridOffsetXInElWrap;\n          const barRightInElWrap = ((_c = barRectInGrid == null ? void 0 : barRectInGrid.right) != null ? _c : barAnchorXInGrid) + gridOffsetXInElWrap;\n          if (barCenterXInElWrap < gridCenterXInElWrap) {\n            placement = \"right\";\n            finalX = barRightInElWrap + ARROW_TIP_OVERHANG;\n          } else {\n            placement = \"left\";\n            finalX = barLeftInElWrap - ttW - ARROW_TIP_OVERHANG;\n          }\n          if (barRectInGrid) {\n            const barCenterYInElWrap = (barRectInGrid.top + barRectInGrid.bottom) / 2 + w2.layout.translateY;\n            finalY = barCenterYInElWrap - ttH / 2;\n            const gridTop = w2.layout.translateY;\n            const gridBottom = w2.layout.translateY + w2.layout.gridHeight;\n            if (finalY < gridTop) finalY = gridTop;\n            if (finalY + ttH > gridBottom) finalY = gridBottom - ttH;\n          }\n          if (ttH > 0 && barRectInGrid) {\n            const barCenterYInElWrap = (barRectInGrid.top + barRectInGrid.bottom) / 2 + w2.layout.translateY;\n            arrowY = Math.max(\n              10,\n              Math.min(ttH - 10, barCenterYInElWrap - finalY)\n            );\n          }\n        }\n        ttCtx.tooltipPosition.applyTooltipPosition(tooltipEl, {\n          x: finalX,\n          y: finalY,\n          placement,\n          arrowY,\n          arrowX\n        });\n      }\n    }\n  }\n  /** @param {{e: any, opt: any}} opts */\n  getBarTooltipXY({ e: e2, opt }) {\n    const w2 = this.w;\n    let j = null;\n    const ttCtx = this.ttCtx;\n    let i2 = 0;\n    let x = 0;\n    let y = 0;\n    let barWidth = 0;\n    let barHeight = 0;\n    let barCx = null;\n    let barCy = null;\n    let barAnchorXInGrid = null;\n    let barAnchorYInGrid = null;\n    let barRectInGrid = null;\n    const cl = e2.target.classList;\n    if (cl.contains(\"apexcharts-bar-area\") || cl.contains(\"apexcharts-candlestick-area\") || cl.contains(\"apexcharts-boxPlot-area\") || cl.contains(\"apexcharts-rangebar-area\")) {\n      const bar = e2.target;\n      const barRect = bar.getBoundingClientRect();\n      const seriesBound = opt.elGrid.getBoundingClientRect();\n      const bh = barRect.height;\n      barHeight = barRect.height;\n      const bw = barRect.width;\n      const cx = parseInt(bar.getAttribute(\"cx\"), 10);\n      const cy = parseInt(bar.getAttribute(\"cy\"), 10);\n      barCx = cx;\n      barCy = cy;\n      barWidth = parseFloat(bar.getAttribute(\"barWidth\"));\n      const rectLeftInGrid = barRect.left - seriesBound.left;\n      const rectTopInGrid = barRect.top - seriesBound.top;\n      const rectCenterXInGrid = rectLeftInGrid + bw / 2;\n      const rectCenterYInGrid = rectTopInGrid + bh / 2;\n      barAnchorXInGrid = rectCenterXInGrid;\n      barAnchorYInGrid = w2.globals.isBarHorizontal ? rectCenterYInGrid : rectTopInGrid;\n      barRectInGrid = {\n        left: rectLeftInGrid,\n        top: rectTopInGrid,\n        right: rectLeftInGrid + bw,\n        bottom: rectTopInGrid + bh\n      };\n      const clientX = e2.type === \"touchmove\" ? e2.touches[0].clientX : e2.clientX;\n      j = parseInt(bar.getAttribute(\"j\"), 10);\n      i2 = parseInt(bar.parentNode.getAttribute(\"rel\"), 10) - 1;\n      const y1 = bar.getAttribute(\"data-range-y1\");\n      const y2 = bar.getAttribute(\"data-range-y2\");\n      if (w2.globals.comboCharts) {\n        i2 = parseInt(bar.parentNode.getAttribute(\"data:realIndex\"), 10);\n      }\n      const handleXForColumns = (x2) => {\n        if (w2.axisFlags.isXNumeric) {\n          x2 = cx - bw / 2;\n        } else {\n          if (this.isVerticalGroupedRangeBar) {\n            x2 = cx + bw / 2;\n          } else {\n            x2 = cx - ttCtx.dataPointsDividedWidth + bw / 2;\n          }\n        }\n        return x2;\n      };\n      const handleYForBars = () => {\n        return cy - ttCtx.dataPointsDividedHeight + bh / 2 - ttCtx.tooltipRect.ttHeight / 2;\n      };\n      ttCtx.tooltipLabels.drawSeriesTexts({\n        ttItems: opt.ttItems,\n        i: i2,\n        j,\n        y1: y1 ? parseInt(y1, 10) : null,\n        y2: y2 ? parseInt(y2, 10) : null,\n        shared: ttCtx.showOnIntersect ? false : w2.config.tooltip.shared,\n        e: e2\n      });\n      if (w2.config.tooltip.followCursor) {\n        if (w2.globals.isBarHorizontal) {\n          x = clientX - seriesBound.left + 15;\n          y = handleYForBars();\n        } else {\n          x = handleXForColumns(x);\n          y = e2.clientY - seriesBound.top - ttCtx.tooltipRect.ttHeight / 2 - 15;\n        }\n      } else {\n        if (w2.globals.isBarHorizontal) {\n          x = cx;\n          if (ttCtx.xyRatios && x < ttCtx.xyRatios.baseLineInvertedY) {\n            x = cx - ttCtx.tooltipRect.ttWidth;\n          }\n          y = handleYForBars();\n        } else {\n          x = handleXForColumns(x);\n          y = cy;\n        }\n      }\n    }\n    return {\n      x,\n      y,\n      barHeight,\n      barWidth,\n      i: i2,\n      j,\n      // SVG attribute values — left for any caller that still wants them.\n      barCx,\n      barCy,\n      // Arrow anchor in grid-local coords (rect-derived; column→top,\n      // horizontal→center). Used by handleBarTooltip to place the arrow\n      // exactly on the bar's data point.\n      barAnchorXInGrid,\n      barAnchorYInGrid,\n      // Full rendered bar rect (grid-local). Used for top/bottom\n      // placement and flip-on-overflow detection.\n      barRectInGrid\n    };\n  }\n}\nclass AxesTooltip {\n  /**\n   * @param {import('./Tooltip').default} tooltipContext\n   */\n  constructor(tooltipContext) {\n    this.w = tooltipContext.w;\n    this.ttCtx = tooltipContext;\n  }\n  /**\n   * This method adds the secondary tooltip which appears below x axis\n   * @memberof Tooltip\n   **/\n  drawXaxisTooltip() {\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    const isBottom = w2.config.xaxis.position === \"bottom\";\n    ttCtx.xaxisOffY = isBottom ? w2.layout.gridHeight + 1 : -w2.layout.xAxisHeight - w2.config.xaxis.axisTicks.height + 3;\n    const tooltipCssClass = isBottom ? \"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom\" : \"apexcharts-xaxistooltip apexcharts-xaxistooltip-top\";\n    const renderTo = w2.dom.elWrap;\n    if (ttCtx.isXAxisTooltipEnabled) {\n      const xaxisTooltip = w2.dom.baseEl.querySelector(\n        \".apexcharts-xaxistooltip\"\n      );\n      if (xaxisTooltip === null) {\n        ttCtx.xaxisTooltip = BrowserAPIs.createElementNS(\n          \"http://www.w3.org/1999/xhtml\",\n          \"div\"\n        );\n        ttCtx.xaxisTooltip.setAttribute(\n          \"class\",\n          tooltipCssClass + \" apexcharts-theme-\" + w2.config.tooltip.theme\n        );\n        renderTo.appendChild(ttCtx.xaxisTooltip);\n        ttCtx.xaxisTooltipText = BrowserAPIs.createElementNS(\n          \"http://www.w3.org/1999/xhtml\",\n          \"div\"\n        );\n        ttCtx.xaxisTooltipText.classList.add(\"apexcharts-xaxistooltip-text\");\n        ttCtx.xaxisTooltipText.style.fontFamily = w2.config.xaxis.tooltip.style.fontFamily || w2.config.chart.fontFamily;\n        ttCtx.xaxisTooltipText.style.fontSize = w2.config.xaxis.tooltip.style.fontSize;\n        ttCtx.xaxisTooltip.appendChild(ttCtx.xaxisTooltipText);\n      }\n    }\n  }\n  /**\n   * This method adds the secondary tooltip which appears below x axis\n   * @memberof Tooltip\n   **/\n  drawYaxisTooltip() {\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    for (let i2 = 0; i2 < w2.config.yaxis.length; i2++) {\n      const isRight = w2.config.yaxis[i2].opposite || w2.config.yaxis[i2].crosshairs.opposite;\n      ttCtx.yaxisOffX = isRight ? w2.layout.gridWidth + 1 : 1;\n      const tooltipCssClass = isRight ? `apexcharts-yaxistooltip apexcharts-yaxistooltip-${i2} apexcharts-yaxistooltip-right` : `apexcharts-yaxistooltip apexcharts-yaxistooltip-${i2} apexcharts-yaxistooltip-left`;\n      const renderTo = w2.dom.elWrap;\n      const yaxisTooltip = w2.dom.baseEl.querySelector(\n        `.apexcharts-yaxistooltip.apexcharts-yaxistooltip-${i2}`\n      );\n      if (yaxisTooltip === null) {\n        ttCtx.yaxisTooltip = BrowserAPIs.createElementNS(\n          \"http://www.w3.org/1999/xhtml\",\n          \"div\"\n        );\n        ttCtx.yaxisTooltip.setAttribute(\n          \"class\",\n          tooltipCssClass + \" apexcharts-theme-\" + w2.config.tooltip.theme\n        );\n        renderTo.appendChild(ttCtx.yaxisTooltip);\n        if (i2 === 0) ttCtx.yaxisTooltipText = [];\n        ttCtx.yaxisTooltipText[i2] = BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n        ttCtx.yaxisTooltipText[i2].classList.add(\n          \"apexcharts-yaxistooltip-text\"\n        );\n        ttCtx.yaxisTooltip.appendChild(\n          /** @type {any} */\n          ttCtx.yaxisTooltipText[i2]\n        );\n      }\n    }\n  }\n  /**\n   * @memberof Tooltip\n   **/\n  setXCrosshairWidth() {\n    var _a, _b;\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    const xcrosshairs = ttCtx.getElXCrosshairs();\n    ttCtx.xcrosshairsWidth = parseInt(w2.config.xaxis.crosshairs.width, 10);\n    if (!w2.globals.comboCharts) {\n      if (w2.config.xaxis.crosshairs.width === \"tickWidth\") {\n        const count = w2.labelData.labels.length;\n        ttCtx.xcrosshairsWidth = w2.layout.gridWidth / count;\n      } else if (w2.config.xaxis.crosshairs.width === \"barWidth\") {\n        const bar = w2.dom.baseEl.querySelector(\".apexcharts-bar-area\");\n        if (bar !== null) {\n          const barWidth = parseFloat((_a = bar.getAttribute(\"barWidth\")) != null ? _a : \"0\");\n          ttCtx.xcrosshairsWidth = barWidth;\n        } else {\n          ttCtx.xcrosshairsWidth = 1;\n        }\n      }\n    } else {\n      const bar = w2.dom.baseEl.querySelector(\".apexcharts-bar-area\");\n      if (bar !== null && w2.config.xaxis.crosshairs.width === \"barWidth\") {\n        const barWidth = parseFloat((_b = bar.getAttribute(\"barWidth\")) != null ? _b : \"0\");\n        ttCtx.xcrosshairsWidth = barWidth;\n      } else {\n        if (w2.config.xaxis.crosshairs.width === \"tickWidth\") {\n          const count = w2.labelData.labels.length;\n          ttCtx.xcrosshairsWidth = w2.layout.gridWidth / count;\n        }\n      }\n    }\n    if (w2.globals.isBarHorizontal) {\n      ttCtx.xcrosshairsWidth = 0;\n    }\n    if (xcrosshairs !== null && ttCtx.xcrosshairsWidth > 0) {\n      xcrosshairs.setAttribute(\"width\", String(ttCtx.xcrosshairsWidth));\n    }\n  }\n  handleYCrosshair() {\n    const w2 = this.w;\n    const ttCtx = this.ttCtx;\n    ttCtx.ycrosshairs = w2.dom.baseEl.querySelector(\".apexcharts-ycrosshairs\");\n    ttCtx.ycrosshairsHidden = w2.dom.baseEl.querySelector(\n      \".apexcharts-ycrosshairs-hidden\"\n    );\n  }\n  /**\n   * @param {number} index\n   * @param {number} clientY\n   * @param {import('../../types/internal').XYRatios} xyRatios\n   */\n  drawYaxisTooltipText(index, clientY, xyRatios) {\n    const ttCtx = this.ttCtx;\n    const w2 = this.w;\n    const gl = w2.globals;\n    const yAxisSeriesArr = gl.seriesYAxisMap[index];\n    if (ttCtx.yaxisTooltips[index] && yAxisSeriesArr.length > 0) {\n      const lbFormatter = w2.formatters.yLabelFormatters[index];\n      const elGrid = ttCtx.getElGrid();\n      if (!elGrid) return;\n      const seriesBound = elGrid.getBoundingClientRect();\n      const seriesIndex = yAxisSeriesArr[0];\n      let translationsIndex = 0;\n      if (xyRatios.yRatio.length > 1) {\n        translationsIndex = seriesIndex;\n      }\n      const hoverY = (clientY - seriesBound.top) * xyRatios.yRatio[translationsIndex];\n      const height = gl.maxYArr[seriesIndex] - gl.minYArr[seriesIndex];\n      let val = gl.minYArr[seriesIndex] + (height - hoverY);\n      if (w2.config.yaxis[index].reversed) {\n        val = gl.maxYArr[seriesIndex] - (height - hoverY);\n      }\n      ttCtx.tooltipPosition.moveYCrosshairs(clientY - seriesBound.top);\n      ttCtx.yaxisTooltipText[index].innerHTML = lbFormatter(val);\n      ttCtx.tooltipPosition.moveYAxisTooltip(index);\n    }\n  }\n}\nclass Tooltip {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.tConfig = w2.config.tooltip;\n    this.tooltipUtil = new Utils2(this);\n    this.tooltipLabels = new Labels(this);\n    this.tooltipPosition = new Position(this);\n    this.marker = new Marker(this);\n    this.intersect = new Intersect(this);\n    this.axesTooltip = new AxesTooltip(this);\n    this.showOnIntersect = this.tConfig.intersect;\n    this.showTooltipTitle = this.tConfig.x.show;\n    this.fixedTooltip = this.tConfig.fixed.enabled;\n    this.xaxisTooltip = null;\n    this.xaxisTooltipText = null;\n    this.yaxisTooltip = null;\n    this.yaxisTooltipText = null;\n    this.yaxisTTEls = null;\n    this.xaxisOffY = 0;\n    this.yaxisOffX = 0;\n    this.xcrosshairsWidth = 0;\n    this.ycrosshairs = null;\n    this.ycrosshairsHidden = null;\n    this.tooltip = null;\n    this.e = null;\n    this.isBarShared = !w2.globals.isBarHorizontal && this.tConfig.shared;\n    this.lastHoverTime = Date.now();\n    this.dimensionUpdateScheduled = false;\n    this.xyRatios = null;\n    this.isXAxisTooltipEnabled = false;\n    this.yaxisTooltips = [];\n    this.allTooltipSeriesGroups = [];\n    this.xAxisTicksPositions = null;\n    this.dataPointsDividedHeight = 0;\n    this.dataPointsDividedWidth = 0;\n    this.tooltipTitle = null;\n    this.legendLabels = null;\n    this.ttItems = null;\n    this.seriesBound = null;\n    this.seriesHoverTimeout = void 0;\n    this.clientX = 0;\n    this.clientY = 0;\n    this.barSeriesHeight = 0;\n    this.tooltipRect = { x: 0, y: 0, ttWidth: 0, ttHeight: 0 };\n  }\n  setupDimensionCache() {\n    const w2 = this.w;\n    const tooltipEl = this.getElTooltip();\n    if (!tooltipEl) return;\n    this.updateDimensionCache();\n    if (typeof ResizeObserver !== \"undefined\" && !w2.globals.resizeObserver) {\n      w2.globals.resizeObserver = new ResizeObserver(() => {\n        if (!this.dimensionUpdateScheduled) {\n          this.dimensionUpdateScheduled = true;\n          requestAnimationFrame(() => {\n            this.updateDimensionCache();\n            this.dimensionUpdateScheduled = false;\n          });\n        }\n      });\n      w2.globals.resizeObserver.observe(tooltipEl);\n    }\n  }\n  updateDimensionCache() {\n    const w2 = this.w;\n    const tooltipEl = this.getElTooltip();\n    if (!tooltipEl) return;\n    const rect = tooltipEl.getBoundingClientRect();\n    w2.globals.dimensionCache.tooltip = /** @type {any} */\n    {\n      width: rect.width,\n      height: rect.height,\n      lastUpdate: Date.now()\n    };\n  }\n  getCachedDimensions() {\n    const w2 = this.w;\n    if (w2.globals.dimensionCache.tooltip) {\n      const cache2 = (\n        /** @type {Record<string,any>} */\n        w2.globals.dimensionCache.tooltip\n      );\n      const age = Date.now() - cache2.lastUpdate;\n      if (age < 1e3) {\n        return {\n          ttWidth: cache2.width,\n          ttHeight: cache2.height\n        };\n      }\n    }\n    this.updateDimensionCache();\n    const cache = (\n      /** @type {Record<string,any>} */\n      w2.globals.dimensionCache.tooltip\n    );\n    return cache ? {\n      ttWidth: cache.width,\n      ttHeight: cache.height\n    } : { ttWidth: 0, ttHeight: 0 };\n  }\n  /**\n   * @param {{ w: import('../../types/internal').ChartStateW }} [ctx]\n   * @returns {HTMLElement | null}\n   */\n  getElTooltip(ctx) {\n    if (!ctx) ctx = this;\n    if (!ctx.w.dom.baseEl) return null;\n    return (\n      /** @type {HTMLElement | null} */\n      ctx.w.dom.baseEl.querySelector(\n        \".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)\"\n      )\n    );\n  }\n  getElXCrosshairs() {\n    return this.w.dom.baseEl.querySelector(\".apexcharts-xcrosshairs\");\n  }\n  getElGrid() {\n    return this.w.dom.baseEl.querySelector(\".apexcharts-grid\");\n  }\n  /**\n   * @param {import('../../types/internal').XYRatios} xyRatios\n   */\n  drawTooltip(xyRatios) {\n    const w2 = this.w;\n    this.xyRatios = xyRatios;\n    this.isXAxisTooltipEnabled = w2.config.xaxis.tooltip.enabled && w2.globals.axisCharts;\n    this.yaxisTooltips = w2.config.yaxis.map((y) => {\n      return y.show && y.tooltip.enabled && w2.globals.axisCharts ? true : false;\n    });\n    this.allTooltipSeriesGroups = [];\n    if (!w2.globals.axisCharts) {\n      this.showTooltipTitle = false;\n    }\n    const existingTooltip = this.getElTooltip();\n    if (existingTooltip == null ? void 0 : existingTooltip.parentNode) {\n      existingTooltip.parentNode.removeChild(existingTooltip);\n    }\n    this.tooltipTitle = null;\n    const tooltipEl = BrowserAPIs.createElementNS(\n      \"http://www.w3.org/1999/xhtml\",\n      \"div\"\n    );\n    tooltipEl.classList.add(\"apexcharts-tooltip\");\n    if (w2.config.tooltip.cssClass) {\n      tooltipEl.classList.add(w2.config.tooltip.cssClass);\n    }\n    tooltipEl.classList.add(`apexcharts-theme-${this.tConfig.theme || \"light\"}`);\n    if (this.tConfig.fillSeriesColor) {\n      tooltipEl.classList.add(\"apexcharts-tooltip-fill-series\");\n    }\n    if (this.tConfig.style && this.tConfig.style.background) {\n      tooltipEl.style.setProperty(\n        \"--apx-tt-bg\",\n        this.tConfig.style.background\n      );\n    }\n    const isSharedMulti = this.tConfig.shared && w2.config.series.length > 1 && !w2.globals.isBarHorizontal && w2.config.chart.type !== \"heatmap\";\n    const shouldDrawArrow = this.tConfig.arrow && !this.tConfig.followCursor && !this.tConfig.fixed.enabled && !isSharedMulti && !this.tConfig.fillSeriesColor && w2.globals.axisCharts;\n    if (shouldDrawArrow) {\n      const arrowEl = BrowserAPIs.createElementNS(\n        \"http://www.w3.org/1999/xhtml\",\n        \"div\"\n      );\n      arrowEl.classList.add(\"apexcharts-tooltip-arrow\");\n      tooltipEl.appendChild(arrowEl);\n    }\n    if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) {\n      tooltipEl.setAttribute(\"role\", \"tooltip\");\n      tooltipEl.setAttribute(\"aria-live\", \"polite\");\n      tooltipEl.setAttribute(\"aria-atomic\", \"true\");\n      tooltipEl.setAttribute(\"aria-hidden\", \"true\");\n    }\n    w2.dom.elWrap.appendChild(tooltipEl);\n    if (w2.globals.axisCharts) {\n      this.axesTooltip.drawXaxisTooltip();\n      this.axesTooltip.drawYaxisTooltip();\n      this.axesTooltip.setXCrosshairWidth();\n      this.axesTooltip.handleYCrosshair();\n      const xAxis = new XAxis(this.w, this.ctx, void 0);\n      this.xAxisTicksPositions = xAxis.getXAxisTicksPositions();\n    }\n    if ((w2.globals.comboCharts || this.tConfig.intersect || w2.config.chart.type === \"rangeBar\") && !this.tConfig.shared) {\n      this.showOnIntersect = true;\n    }\n    if (w2.config.markers.size === 0 || w2.globals.markers.largestSize === 0) {\n      this.marker.drawDynamicPoints();\n    }\n    if (w2.globals.collapsedSeries.length === w2.seriesData.series.length) return;\n    this.dataPointsDividedHeight = w2.layout.gridHeight / w2.globals.dataPoints;\n    this.dataPointsDividedWidth = w2.layout.gridWidth / w2.globals.dataPoints;\n    if (this.showTooltipTitle) {\n      this.tooltipTitle = BrowserAPIs.createElementNS(\n        \"http://www.w3.org/1999/xhtml\",\n        \"div\"\n      );\n      this.tooltipTitle.classList.add(\"apexcharts-tooltip-title\");\n      this.tooltipTitle.style.fontFamily = this.tConfig.style.fontFamily || w2.config.chart.fontFamily;\n      this.tooltipTitle.style.fontSize = this.tConfig.style.fontSize;\n      tooltipEl.appendChild(this.tooltipTitle);\n    }\n    let ttItemsCnt = w2.seriesData.series.length;\n    if ((w2.globals.xyCharts || w2.globals.comboCharts) && this.tConfig.shared) {\n      if (!this.showOnIntersect) {\n        ttItemsCnt = w2.seriesData.series.length;\n      } else {\n        ttItemsCnt = 1;\n      }\n    }\n    this.legendLabels = w2.dom.baseEl.querySelectorAll(\".apexcharts-legend-text\");\n    this.ttItems = this.createTTElements(ttItemsCnt);\n    this.addSVGEvents();\n    this.setupDimensionCache();\n  }\n  /**\n   * @param {number} ttItemsCnt\n   */\n  createTTElements(ttItemsCnt) {\n    const w2 = this.w;\n    const ttItems = [];\n    const tooltipEl = this.getElTooltip();\n    if (!tooltipEl) return ttItems;\n    for (let i2 = 0; i2 < ttItemsCnt; i2++) {\n      const gTxt = BrowserAPIs.createElementNS(\n        \"http://www.w3.org/1999/xhtml\",\n        \"div\"\n      );\n      gTxt.classList.add(\n        \"apexcharts-tooltip-series-group\",\n        `apexcharts-tooltip-series-group-${i2}`\n      );\n      gTxt.style.order = String(\n        w2.config.tooltip.inverseOrder ? ttItemsCnt - i2 : i2 + 1\n      );\n      const point = BrowserAPIs.createElementNS(\n        \"http://www.w3.org/1999/xhtml\",\n        \"span\"\n      );\n      point.classList.add(\"apexcharts-tooltip-marker\");\n      if (w2.config.tooltip.fillSeriesColor) {\n        point.style.backgroundColor = w2.globals.colors[i2];\n      } else {\n        point.style.color = w2.globals.colors[i2];\n      }\n      const mShape = w2.config.markers.shape;\n      let shape = mShape;\n      if (Array.isArray(mShape)) {\n        shape = mShape[i2];\n      }\n      point.setAttribute(\"shape\", shape);\n      point.innerHTML = renderMarkerSVG(shape);\n      gTxt.appendChild(point);\n      const gYZ = BrowserAPIs.createElementNS(\n        \"http://www.w3.org/1999/xhtml\",\n        \"div\"\n      );\n      gYZ.classList.add(\"apexcharts-tooltip-text\");\n      gYZ.style.fontFamily = this.tConfig.style.fontFamily || w2.config.chart.fontFamily;\n      gYZ.style.fontSize = this.tConfig.style.fontSize;\n      [\"y\", \"goals\", \"z\"].forEach((g2) => {\n        const gValText = BrowserAPIs.createElementNS(\n          \"http://www.w3.org/1999/xhtml\",\n          \"div\"\n        );\n        gValText.classList.add(`apexcharts-tooltip-${g2}-group`);\n        const txtLabel = BrowserAPIs.createElementNS(\n          \"http://www.w3.org/1999/xhtml\",\n          \"span\"\n        );\n        txtLabel.classList.add(`apexcharts-tooltip-text-${g2}-label`);\n        gValText.appendChild(txtLabel);\n        const txtValue = BrowserAPIs.createElementNS(\n          \"http://www.w3.org/1999/xhtml\",\n          \"span\"\n        );\n        txtValue.classList.add(`apexcharts-tooltip-text-${g2}-value`);\n        gValText.appendChild(txtValue);\n        gYZ.appendChild(gValText);\n      });\n      gTxt.appendChild(gYZ);\n      tooltipEl.appendChild(gTxt);\n      ttItems.push(gTxt);\n    }\n    return ttItems;\n  }\n  addSVGEvents() {\n    const w2 = this.w;\n    const type = w2.config.chart.type;\n    const tooltipEl = this.getElTooltip();\n    if (!tooltipEl) return;\n    const commonBar = !!(type === \"bar\" || type === \"candlestick\" || type === \"boxPlot\" || type === \"violin\" || type === \"rangeBar\");\n    const chartWithmarkers = type === \"area\" || type === \"line\" || type === \"scatter\" || type === \"bubble\" || type === \"radar\";\n    const isPolarMarkerChart = chartWithmarkers && !w2.globals.xyCharts;\n    const hoverArea = w2.dom.Paper.node;\n    const elGrid = this.getElGrid();\n    if (elGrid) {\n      this.seriesBound = elGrid.getBoundingClientRect();\n    }\n    const tooltipY = [];\n    const tooltipX = [];\n    const seriesHoverParams = {\n      hoverArea,\n      elGrid,\n      tooltipEl,\n      tooltipY,\n      tooltipX,\n      ttItems: this.ttItems\n    };\n    let points;\n    if (w2.globals.axisCharts) {\n      if (chartWithmarkers) {\n        points = w2.dom.baseEl.querySelectorAll(\n          \".apexcharts-series[data\\\\:longestSeries='true'] .apexcharts-marker\"\n        );\n      } else if (commonBar) {\n        points = w2.dom.baseEl.querySelectorAll(\n          \".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-violin-area, .apexcharts-series .apexcharts-rangebar-area\"\n        );\n      } else if (type === \"heatmap\" || type === \"treemap\") {\n        points = w2.dom.baseEl.querySelectorAll(\n          \".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap\"\n        );\n      }\n      if (points && points.length) {\n        for (let p2 = 0; p2 < points.length; p2++) {\n          tooltipY.push(points[p2].getAttribute(\"cy\"));\n          tooltipX.push(points[p2].getAttribute(\"cx\"));\n        }\n      }\n    }\n    const validSharedChartTypes = w2.globals.xyCharts && !this.showOnIntersect || w2.globals.comboCharts && !this.showOnIntersect || commonBar && this.tooltipUtil.hasBars() && this.tConfig.shared;\n    if (validSharedChartTypes) {\n      this.addPathsEventListeners([hoverArea], seriesHoverParams);\n    } else if (commonBar && !w2.globals.comboCharts || chartWithmarkers && this.showOnIntersect || isPolarMarkerChart) {\n      this.addDatapointEventsListeners(seriesHoverParams);\n    } else if (type === \"heatmap\" && w2.globals.activeRenderer && w2.globals.activeRenderer.kind === \"canvas\") {\n      this.addPathsEventListeners([hoverArea], seriesHoverParams);\n    } else if (!w2.globals.axisCharts || type === \"heatmap\" || type === \"treemap\") {\n      const seriesAll = w2.dom.baseEl.querySelectorAll(\".apexcharts-series\");\n      this.addPathsEventListeners(seriesAll, seriesHoverParams);\n    }\n    if (this.showOnIntersect) {\n      const lineAreaPoints = w2.dom.baseEl.querySelectorAll(\n        \".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker\"\n      );\n      if (lineAreaPoints.length > 0) {\n        this.addPathsEventListeners(lineAreaPoints, seriesHoverParams);\n      }\n      if (this.tooltipUtil.hasBars() && !this.tConfig.shared) {\n        this.addDatapointEventsListeners(seriesHoverParams);\n      }\n    }\n  }\n  drawFixedTooltipRect() {\n    const w2 = this.w;\n    const tooltipEl = this.getElTooltip();\n    if (!tooltipEl) return { x: 0, y: 0, ttWidth: 0, ttHeight: 0 };\n    const tooltipRect = tooltipEl.getBoundingClientRect();\n    const ttWidth = tooltipRect.width + 10;\n    const ttHeight = tooltipRect.height + 10;\n    let x = this.tConfig.fixed.offsetX;\n    let y = this.tConfig.fixed.offsetY;\n    const fixed = this.tConfig.fixed.position.toLowerCase();\n    if (fixed.indexOf(\"right\") > -1) {\n      x = x + w2.globals.svgWidth - ttWidth + 10;\n    }\n    if (fixed.indexOf(\"bottom\") > -1) {\n      y = y + w2.globals.svgHeight - ttHeight - 10;\n    }\n    this.tooltipPosition.applyTooltipPosition(tooltipEl, { x, y });\n    return {\n      x,\n      y,\n      ttWidth,\n      ttHeight\n    };\n  }\n  /**\n   * @param {Record<string, any>} seriesHoverParams\n   */\n  addDatapointEventsListeners(seriesHoverParams) {\n    const w2 = this.w;\n    const points = w2.dom.baseEl.querySelectorAll(\n      \".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area\"\n    );\n    this.addPathsEventListeners(points, seriesHoverParams);\n  }\n  /**\n   * @param {any} paths\n   * @param {Record<string, any>} opts\n   */\n  addPathsEventListeners(paths, opts) {\n    const self = this;\n    for (let p2 = 0; p2 < paths.length; p2++) {\n      const extendedOpts = {\n        paths: paths[p2],\n        tooltipEl: opts.tooltipEl,\n        tooltipY: opts.tooltipY,\n        tooltipX: opts.tooltipX,\n        elGrid: opts.elGrid,\n        hoverArea: opts.hoverArea,\n        ttItems: opts.ttItems\n      };\n      const events = [\n        \"mousemove\",\n        \"mouseup\",\n        \"touchmove\",\n        \"mouseout\",\n        \"touchend\"\n      ];\n      events.map((ev) => {\n        return paths[p2].addEventListener(\n          ev,\n          self.onSeriesHover.bind(self, extendedOpts),\n          { capture: false, passive: true }\n        );\n      });\n    }\n  }\n  /*\n   ** Check to see if the tooltips should be updated based on a mouse / touch event\n   * @param {Record<string, any>} opt\n   * @param {Event} e\n   */\n  /** @param {Record<string, any>} opt @param {any} e */\n  onSeriesHover(opt, e2) {\n    const targetDelay = 20;\n    const timeSinceLastUpdate = Date.now() - this.lastHoverTime;\n    if (timeSinceLastUpdate >= targetDelay) {\n      this.seriesHover(opt, e2);\n    } else {\n      clearTimeout(this.seriesHoverTimeout);\n      this.seriesHoverTimeout = setTimeout(() => {\n        this.seriesHover(opt, e2);\n      }, targetDelay - timeSinceLastUpdate);\n    }\n  }\n  /*\n   ** The actual series hover function\n   * @param {Record<string, any>} opt\n   * @param {Event} e\n   */\n  /** @param {Record<string, any>} opt @param {any} e */\n  seriesHover(opt, e2) {\n    if (this.w.globals.isDestroyed) return;\n    this.lastHoverTime = Date.now();\n    let chartGroups = [];\n    const w2 = this.w;\n    const isCfMember = (chart) => {\n      var _a, _b, _c;\n      const link = (_c = (_b = (_a = chart == null ? void 0 : chart.w) == null ? void 0 : _a.config) == null ? void 0 : _b.chart) == null ? void 0 : _c.link;\n      return !!(link && typeof link.dimension === \"function\");\n    };\n    if (w2.config.chart.group && !isCfMember(this.ctx)) {\n      chartGroups = this.ctx.getSyncedCharts().filter((ch) => !isCfMember(ch));\n    }\n    if (w2.globals.axisCharts && (w2.globals.minX === -Infinity && w2.globals.maxX === Infinity || w2.globals.dataPoints === 0)) {\n      return;\n    }\n    if (chartGroups.length) {\n      chartGroups.forEach((ch) => {\n        const tooltipEl = this.getElTooltip(ch);\n        const newOpts = {\n          paths: opt.paths,\n          tooltipEl,\n          tooltipY: opt.tooltipY,\n          tooltipX: opt.tooltipX,\n          elGrid: opt.elGrid,\n          hoverArea: opt.hoverArea,\n          ttItems: ch.w.globals.tooltip.ttItems\n        };\n        if (ch.w.globals.minX === this.w.globals.minX && ch.w.globals.maxX === this.w.globals.maxX) {\n          ch.w.globals.tooltip.seriesHoverByContext({\n            chartCtx: ch,\n            ttCtx: ch.w.globals.tooltip,\n            opt: newOpts,\n            e: e2\n          });\n        }\n      });\n    } else {\n      this.seriesHoverByContext({\n        chartCtx: this.ctx,\n        ttCtx: this.w.globals.tooltip,\n        opt,\n        e: e2\n      });\n    }\n  }\n  /** @param {{chartCtx: any, ttCtx: any, opt: any, e: any}} opts */\n  seriesHoverByContext({ chartCtx, ttCtx, opt, e: e2 }) {\n    const w2 = chartCtx.w;\n    const tooltipEl = this.getElTooltip(chartCtx);\n    if (!tooltipEl) return;\n    const cachedDims = ttCtx.getCachedDimensions();\n    ttCtx.tooltipRect = {\n      x: 0,\n      y: 0,\n      ttWidth: cachedDims.ttWidth,\n      ttHeight: cachedDims.ttHeight\n    };\n    ttCtx.e = e2;\n    if (ttCtx.tooltipUtil.hasBars() && !w2.globals.comboCharts && !ttCtx.isBarShared) {\n      if (this.tConfig.onDatasetHover.highlightDataSeries) {\n        const series = new Series(chartCtx.w);\n        series.toggleSeriesOnHover(e2, e2.target.parentNode);\n      }\n    }\n    if (w2.globals.axisCharts) {\n      ttCtx.axisChartsTooltips({\n        e: e2,\n        opt,\n        tooltipRect: ttCtx.tooltipRect\n      });\n    } else {\n      ttCtx.nonAxisChartsTooltips({\n        e: e2,\n        opt,\n        tooltipRect: ttCtx.tooltipRect\n      });\n    }\n    if (ttCtx.fixedTooltip) {\n      ttCtx.drawFixedTooltipRect();\n    }\n  }\n  // tooltip handling for line/area/bar/columns/scatter\n  /** @param {{e: any, opt: any}} opts */\n  axisChartsTooltips({ e: e2, opt }) {\n    var _a;\n    const w2 = this.w;\n    let x, y;\n    if (!opt.elGrid) return;\n    const seriesBound = opt.elGrid.getBoundingClientRect();\n    const clientX = e2.type === \"touchmove\" ? e2.touches[0].clientX : e2.clientX;\n    const clientY = e2.type === \"touchmove\" ? e2.touches[0].clientY : e2.clientY;\n    this.clientY = clientY;\n    this.clientX = clientX;\n    w2.interact.capturedSeriesIndex = -1;\n    w2.interact.capturedDataPointIndex = -1;\n    if (clientY < seriesBound.top || clientY > seriesBound.top + seriesBound.height) {\n      this.handleMouseOut(opt);\n      return;\n    }\n    if (w2.dom.elWrap.querySelector(\n      \".apexcharts-annotation-tooltip.apexcharts-active\"\n    )) {\n      this.handleMouseOut(opt);\n      return;\n    }\n    if (Array.isArray(this.tConfig.enabledOnSeries) && !w2.config.tooltip.shared) {\n      const index = parseInt(opt.paths.getAttribute(\"index\"), 10);\n      if (this.tConfig.enabledOnSeries.indexOf(index) < 0) {\n        this.handleMouseOut(opt);\n        return;\n      }\n    }\n    const tooltipEl = this.getElTooltip();\n    if (!tooltipEl) return;\n    const xcrosshairs = this.getElXCrosshairs();\n    let syncedCharts = [];\n    if (w2.config.chart.group) {\n      syncedCharts = this.ctx.getSyncedCharts();\n    }\n    const isStickyTooltip = w2.globals.xyCharts || w2.config.chart.type === \"bar\" && !w2.globals.isBarHorizontal && this.tooltipUtil.hasBars() && this.tConfig.shared || w2.globals.comboCharts && this.tooltipUtil.hasBars();\n    if (e2.type === \"mousemove\" || e2.type === \"touchmove\" || e2.type === \"mouseup\") {\n      if (w2.globals.collapsedSeries.length + w2.globals.ancillaryCollapsedSeries.length === w2.seriesData.series.length) {\n        return;\n      }\n      if (xcrosshairs !== null) {\n        xcrosshairs.classList.add(\"apexcharts-active\");\n      }\n      const hasYAxisTooltip = (_a = this.yaxisTooltips) == null ? void 0 : _a.filter(\n        (b2) => {\n          return b2 === true;\n        }\n      );\n      const _yc = (\n        /** @type {any} */\n        this.ycrosshairs\n      );\n      if (_yc !== null && (hasYAxisTooltip == null ? void 0 : hasYAxisTooltip.length)) {\n        _yc.classList.add(\"apexcharts-active\");\n      }\n      if (isStickyTooltip && !this.showOnIntersect || syncedCharts.length > 1) {\n        this.handleStickyTooltip(e2, clientX, clientY, opt);\n      } else {\n        if (w2.config.chart.type === \"heatmap\" || w2.config.chart.type === \"treemap\") {\n          const markerXY = this.intersect.handleHeatTreeTooltip({\n            e: e2,\n            opt,\n            x,\n            y,\n            type: w2.config.chart.type\n          });\n          if (markerXY.noHit) {\n            this.handleMouseOut(opt);\n            return;\n          }\n          x = markerXY.x;\n          y = markerXY.y;\n          if (!markerXY.positioned) {\n            tooltipEl.style.left = x + \"px\";\n            tooltipEl.style.top = y + \"px\";\n          }\n        } else {\n          if (this.tooltipUtil.hasBars()) {\n            this.intersect.handleBarTooltip({\n              e: e2,\n              opt\n            });\n          }\n          if (this.tooltipUtil.hasMarkers(0)) {\n            this.intersect.handleMarkerTooltip({\n              e: e2,\n              opt,\n              x,\n              y\n            });\n          }\n        }\n      }\n      if (this.yaxisTooltips && this.yaxisTooltips.length) {\n        for (let yt = 0; yt < w2.config.yaxis.length; yt++) {\n          this.axesTooltip.drawYaxisTooltipText(\n            yt,\n            clientY,\n            /** @type {import('../../types/internal').XYRatios} */\n            this.xyRatios\n          );\n        }\n      }\n      w2.dom.baseEl.classList.add(\"apexcharts-tooltip-active\");\n      opt.tooltipEl.classList.add(\"apexcharts-active\");\n      if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) {\n        opt.tooltipEl.removeAttribute(\"aria-hidden\");\n      }\n    } else if (e2.type === \"mouseout\" || e2.type === \"touchend\") {\n      this.handleMouseOut(opt);\n    }\n  }\n  /**\n   * Where a pie / donut / polarArea slice wants its tooltip anchored, in\n   * elWrap-relative pixels.\n   *\n   * Pie.js stamps the arc centroid on the path as `data:cx` / `data:cy`, in\n   * the slice's OWN user space: below the inner group's translate, and below\n   * the pie group's customScale. Reading those as if they were SVG-root\n   * coordinates silently drops both, and the inner translate is exactly the\n   * offset that centres a pie in a chart wider than it is tall, so on such a\n   * chart the tooltip landed a couple of hundred pixels to the left of the\n   * slice it described. The element's screen matrix accounts for every\n   * ancestor transform at once, including the translate a slice picks up while\n   * it is slid out on click.\n   *\n   * @param {any} el a slice path carrying data:cx / data:cy\n   * @returns {{x: number, y: number} | null} null when it carries neither\n   */\n  getSliceAnchor(el) {\n    var _a, _b;\n    const w2 = this.w;\n    const cx = parseFloat((_a = el == null ? void 0 : el.getAttribute(\"data:cx\")) != null ? _a : \"\");\n    const cy = parseFloat((_b = el == null ? void 0 : el.getAttribute(\"data:cy\")) != null ? _b : \"\");\n    if (isNaN(cx) || isNaN(cy)) return null;\n    const wrapBound = w2.dom.elWrap.getBoundingClientRect();\n    const ctm = typeof el.getScreenCTM === \"function\" ? el.getScreenCTM() : null;\n    if (!ctm) {\n      const svgBound = w2.dom.Paper.node.getBoundingClientRect();\n      return {\n        x: svgBound.left - wrapBound.left + cx,\n        y: svgBound.top - wrapBound.top + cy\n      };\n    }\n    return {\n      x: ctm.a * cx + ctm.c * cy + ctm.e - wrapBound.left,\n      y: ctm.b * cx + ctm.d * cy + ctm.f - wrapBound.top\n    };\n  }\n  // tooltip handling for pie/donuts\n  /** @param {{e: any, opt: any, tooltipRect: any}} opts */\n  nonAxisChartsTooltips({ e: e2, opt, tooltipRect }) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    const rel = opt.paths.getAttribute(\"rel\");\n    const tooltipEl = this.getElTooltip();\n    if (!tooltipEl) return;\n    const seriesBound = w2.dom.elWrap.getBoundingClientRect();\n    if (e2.type === \"mousemove\" || e2.type === \"touchmove\") {\n      w2.dom.baseEl.classList.add(\"apexcharts-tooltip-active\");\n      tooltipEl.classList.add(\"apexcharts-active\");\n      if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) {\n        tooltipEl.removeAttribute(\"aria-hidden\");\n      }\n      if (w2.config.chart.type === \"unit\") {\n        const unitDot = e2.target && typeof e2.target.closest === \"function\" ? e2.target.closest(\".apexcharts-unit-area\") : null;\n        if (!unitDot) return;\n        this.renderUnitTooltip(unitDot);\n      } else {\n        this.tooltipLabels.drawSeriesTexts({\n          ttItems: opt.ttItems,\n          i: parseInt(rel, 10) - 1,\n          shared: false\n        });\n      }\n      let x, y;\n      const arcPath = opt.paths.querySelector(\"path[data\\\\:cx]\") || opt.paths;\n      const anchor = w2.config.tooltip.intersect ? this.getSliceAnchor(arcPath) : null;\n      if (anchor) {\n        x = anchor.x - tooltipRect.ttWidth / 2;\n        y = anchor.y - tooltipRect.ttHeight - 10;\n      } else {\n        x = ((_a = w2.interact.clientX) != null ? _a : 0) - seriesBound.left - tooltipRect.ttWidth / 2;\n        y = ((_b = w2.interact.clientY) != null ? _b : 0) - seriesBound.top - tooltipRect.ttHeight - 10;\n      }\n      tooltipEl.style.left = x + \"px\";\n      tooltipEl.style.top = y + \"px\";\n      if (w2.config.legend.tooltipHoverFormatter) {\n        const legendFormatter = w2.config.legend.tooltipHoverFormatter;\n        const i2 = rel - 1;\n        const legendEl = (\n          /** @type {HTMLElement | undefined} */\n          (_c = this.legendLabels) == null ? void 0 : _c[i2]\n        );\n        if (!legendEl) return;\n        const legendName = legendEl.getAttribute(\"data:default-text\");\n        const text = legendFormatter(legendName, {\n          seriesIndex: i2,\n          dataPointIndex: i2,\n          w: w2\n        });\n        legendEl.innerHTML = text;\n      }\n    } else if (e2.type === \"mouseout\" || e2.type === \"touchend\") {\n      tooltipEl.classList.remove(\"apexcharts-active\");\n      w2.dom.baseEl.classList.remove(\"apexcharts-tooltip-active\");\n      if (w2.config.legend.tooltipHoverFormatter) {\n        (_d = this.legendLabels) == null ? void 0 : _d.forEach((l2) => {\n          const defaultText = l2.getAttribute(\"data:default-text\");\n          l2.innerHTML = decodeURIComponent(\n            defaultText != null ? defaultText : \"\"\n          );\n        });\n      }\n    }\n  }\n  /**\n   * Fill the tooltip for one hovered unit-chart dot. Each dot carries `i` (its\n   * category / series index) and `j` (its index within that category). The\n   * default body reads \"#<j+1> of <count>\"; `plotOptions.unit.tooltip.formatter`\n   * overrides just the body text (it is handed i/j so it can look up per-unit\n   * data), and the global `tooltip.custom` still overrides the whole markup.\n   * @param {Element} dotEl the hovered `.apexcharts-unit-area` node\n   */\n  renderUnitTooltip(dotEl) {\n    var _a, _b, _c, _d, _e;\n    const w2 = this.w;\n    const tooltipEl = this.getElTooltip();\n    if (!tooltipEl) return;\n    const i2 = parseInt(dotEl.getAttribute(\"i\") || \"0\", 10);\n    const j = parseInt(dotEl.getAttribute(\"j\") || \"0\", 10);\n    if (typeof w2.config.tooltip.custom === \"function\") {\n      this.tooltipLabels.handleCustomTooltip({ i: i2, j, y1: null, y2: null, w: w2 });\n      return;\n    }\n    const seriesName = w2.seriesData.seriesNames[i2] || `series-${i2 + 1}`;\n    const value = Math.round(Number(w2.seriesData.series[i2]) || 0);\n    const group = dotEl.parentNode;\n    const count = group && group.querySelectorAll ? group.querySelectorAll(\".apexcharts-unit-area\").length : value;\n    const unitOpts = w2.config.plotOptions.unit || {};\n    const unitValue = unitOpts.unitValue > 0 ? unitOpts.unitValue : 1;\n    const catData = w2.seriesData.unitData && w2.seriesData.unitData[i2];\n    const datum = catData ? catData[j] : void 0;\n    const datumObj = datum && typeof datum === \"object\" ? datum : null;\n    const color = datumObj && datumObj.fillColor || w2.globals.colors && w2.globals.colors[i2] || \"#008FFB\";\n    let body;\n    const fmt = unitOpts.tooltip && unitOpts.tooltip.formatter;\n    if (typeof fmt === \"function\") {\n      body = fmt({\n        seriesName,\n        seriesIndex: i2,\n        dataPointIndex: j,\n        count,\n        value,\n        unitValue,\n        datum,\n        color,\n        w: w2\n      });\n    } else if (datum !== void 0 && datum !== null) {\n      const label = datumObj ? (_c = (_b = (_a = datumObj.name) != null ? _a : datumObj.label) != null ? _b : datumObj.x) != null ? _c : null : null;\n      const dVal = datumObj ? (_e = (_d = datumObj.value) != null ? _d : datumObj.y) != null ? _e : null : datum;\n      body = label != null && dVal != null ? `${label}: ${dVal}` : label != null ? String(label) : dVal != null ? String(dVal) : `#${(j + 1).toLocaleString()} of ${count.toLocaleString()}`;\n    } else {\n      body = `#${(j + 1).toLocaleString()} of ${count.toLocaleString()}`;\n      if (unitValue !== 1) {\n        body += ` &middot; ${unitValue.toLocaleString()} per dot`;\n      }\n    }\n    const fontFamily = w2.config.chart.fontFamily || \"inherit\";\n    const fontSize = w2.config.tooltip.style && w2.config.tooltip.style.fontSize || \"12px\";\n    const arrowEl = tooltipEl.querySelector(\".apexcharts-tooltip-arrow\");\n    tooltipEl.innerHTML = `<div class=\"apexcharts-tooltip-title\" style=\"font-family: ${fontFamily}; font-size: ${fontSize};\">${seriesName}</div><div class=\"apexcharts-tooltip-series-group apexcharts-active\" style=\"display: flex;\"><span class=\"apexcharts-tooltip-marker\" style=\"background-color: ${color};\"></span><div class=\"apexcharts-tooltip-text\" style=\"font-family: ${fontFamily}; font-size: ${fontSize};\"><div class=\"apexcharts-tooltip-y-group\"><span class=\"apexcharts-tooltip-text-y-value\">${body}</span></div></div></div>`;\n    if (arrowEl) tooltipEl.appendChild(arrowEl);\n    const rect = tooltipEl.getBoundingClientRect();\n    this.tooltipRect.ttWidth = rect.width;\n    this.tooltipRect.ttHeight = rect.height;\n  }\n  /**\n   * @param {Event} e\n   * @param {number} clientX\n   * @param {number} clientY\n   * @param {Record<string, any>} opt\n   */\n  handleStickyTooltip(e2, clientX, clientY, opt) {\n    const w2 = this.w;\n    const capj = this.tooltipUtil.getNearestValues({\n      context: this,\n      hoverArea: opt.hoverArea,\n      elGrid: opt.elGrid,\n      clientX,\n      clientY\n    });\n    const j = capj.j;\n    let capturedSeries = capj.capturedSeries;\n    if (capturedSeries !== null && w2.globals.collapsedSeriesIndices.includes(capturedSeries != null ? capturedSeries : -1))\n      capturedSeries = null;\n    const edgePad = w2.globals.barPadForNumericAxis || 0;\n    if (capj.hoverX < -edgePad || capj.hoverX > w2.layout.gridWidth + edgePad) {\n      this.handleMouseOut(opt);\n      return;\n    }\n    if (capturedSeries !== null) {\n      this.handleStickyCapturedSeries(e2, capturedSeries != null ? capturedSeries : -1, opt, j != null ? j : 0);\n    } else {\n      if (this.tooltipUtil.isXoverlap(j != null ? j : 0) || w2.globals.isBarHorizontal) {\n        const firstVisibleSeries = w2.seriesData.series.findIndex(\n          /**\n           * @param {any} s\n           * @param {number} i\n           */\n          (s2, i2) => !w2.globals.collapsedSeriesIndices.includes(i2)\n        );\n        this.create(e2, this, firstVisibleSeries, j != null ? j : 0, opt.ttItems);\n      }\n    }\n  }\n  /**\n   * @param {Event} e\n   * @param {number} capturedSeries\n   * @param {Record<string, any>} opt\n   * @param {number} j\n   */\n  handleStickyCapturedSeries(e2, capturedSeries, opt, j) {\n    const w2 = this.w;\n    if (!this.tConfig.shared) {\n      const ignoreNull = w2.seriesData.series[capturedSeries][j] === null;\n      if (ignoreNull) {\n        this.handleMouseOut(opt);\n        return;\n      }\n    }\n    if (typeof w2.seriesData.series[capturedSeries][j] !== \"undefined\") {\n      if (this.tConfig.shared && this.tooltipUtil.isXoverlap(j) && this.tooltipUtil.isInitialSeriesSameLen()) {\n        this.create(e2, this, capturedSeries, j, opt.ttItems);\n      } else {\n        this.create(e2, this, capturedSeries, j, opt.ttItems, false);\n      }\n    } else {\n      if (this.tooltipUtil.isXoverlap(j)) {\n        const firstVisibleSeries = w2.seriesData.series.findIndex(\n          /**\n           * @param {any} s\n           * @param {number} i\n           */\n          (s2, i2) => !w2.globals.collapsedSeriesIndices.includes(i2)\n        );\n        this.create(e2, this, firstVisibleSeries, j, opt.ttItems);\n      }\n    }\n  }\n  deactivateHoverFilter() {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w, this.ctx);\n    const allPaths = w2.dom.Paper.find(`.apexcharts-bar-area`);\n    for (let b2 = 0; b2 < allPaths.length; b2++) {\n      graphics.pathMouseLeave(\n        /** @type {any} */\n        allPaths[b2],\n        /** @type {any} */\n        void 0\n      );\n    }\n  }\n  /**\n   * @param {Record<string, any>} opt\n   */\n  handleMouseOut(opt) {\n    var _a, _b;\n    const w2 = this.w;\n    const xcrosshairs = this.getElXCrosshairs();\n    w2.dom.baseEl.classList.remove(\"apexcharts-tooltip-active\");\n    opt.tooltipEl.classList.remove(\"apexcharts-active\");\n    delete opt.tooltipEl.dataset.positioned;\n    if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) {\n      opt.tooltipEl.setAttribute(\"aria-hidden\", \"true\");\n    }\n    this.deactivateHoverFilter();\n    if (w2.config.chart.type !== \"bubble\") {\n      this.marker.resetPointsSize();\n    }\n    if (xcrosshairs !== null) {\n      xcrosshairs.classList.remove(\"apexcharts-active\");\n    }\n    const _yc2 = (\n      /** @type {any} */\n      this.ycrosshairs\n    );\n    if (_yc2 !== null) {\n      _yc2.classList.remove(\"apexcharts-active\");\n    }\n    if (this.isXAxisTooltipEnabled) {\n      (_a = this.xaxisTooltip) == null ? void 0 : _a.classList.remove(\"apexcharts-active\");\n    }\n    if (this.yaxisTooltips && this.yaxisTooltips.length) {\n      if (this.yaxisTTEls === null) {\n        this.yaxisTTEls = /** @type {HTMLElement[]} */\n        [\n          ...w2.dom.baseEl.querySelectorAll(\".apexcharts-yaxistooltip\")\n        ];\n      }\n      for (let i2 = 0; i2 < this.yaxisTTEls.length; i2++) {\n        this.yaxisTTEls[i2].classList.remove(\"apexcharts-active\");\n      }\n    }\n    if (w2.config.legend.tooltipHoverFormatter) {\n      (_b = this.legendLabels) == null ? void 0 : _b.forEach((l2) => {\n        const defaultText = l2.getAttribute(\"data:default-text\");\n        l2.innerHTML = decodeURIComponent(\n          defaultText != null ? defaultText : \"\"\n        );\n      });\n    }\n  }\n  /**\n   * @param {Event} e\n   * @param {number} seriesIndex\n   * @param {number} dataPointIndex\n   */\n  markerClick(e2, seriesIndex, dataPointIndex) {\n    const w2 = this.w;\n    if (typeof w2.config.chart.events.markerClick === \"function\") {\n      w2.config.chart.events.markerClick(e2, this.ctx, {\n        seriesIndex,\n        dataPointIndex,\n        w: w2\n      });\n    }\n    this.ctx.events.fireEvent(\"markerClick\", [\n      e2,\n      this.ctx,\n      { seriesIndex, dataPointIndex, w: w2 }\n    ]);\n  }\n  /**\n   * Marks (#11): whether the chart's type (or any series' type) is a registered\n   * custom series, whose marks live outside the built-in marker DOM.\n   * @returns {boolean}\n   */\n  _hasCustomSeries() {\n    const w2 = this.w;\n    if (isCustom(w2.config.chart.type)) return true;\n    const series = w2.config.series || [];\n    return series.some(\n      (s2) => s2 && s2.type && isCustom(s2.type)\n    );\n  }\n  /**\n   * @param {Event} e\n   * @param {any} context\n   * @param {number} capturedSeries\n   * @param {number} j\n   * @param {any} ttItems\n   * @param {boolean | null} shared\n   */\n  create(e2, context, capturedSeries, j, ttItems, shared = null) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;\n    const w2 = this.w;\n    const ttCtx = context;\n    if (e2.type === \"mouseup\") {\n      this.markerClick(e2, capturedSeries, j);\n    }\n    if (shared === null) shared = this.tConfig.shared;\n    const hasMarkers = this.tooltipUtil.hasMarkers(capturedSeries);\n    const canvasMode = ((_b = (_a = this.ctx) == null ? void 0 : _a.renderer) == null ? void 0 : _b.kind) === \"canvas\";\n    const canvasNonBar = canvasMode && !this.tooltipUtil.hasBars();\n    const marksMode = !canvasMode && !hasMarkers && !this.tooltipUtil.hasBars() && this._hasCustomSeries();\n    const dynamicPoints = canvasNonBar || marksMode;\n    const bars = this.tooltipUtil.getElBars();\n    const handlePoints = () => {\n      if (w2.globals.markers.largestSize > 0 && !canvasMode) {\n        ttCtx.marker.enlargePoints(j);\n      } else {\n        ttCtx.tooltipPosition.moveDynamicPointsOnHover(j);\n      }\n    };\n    if (w2.config.legend.tooltipHoverFormatter) {\n      const legendFormatter = w2.config.legend.tooltipHoverFormatter;\n      const els = (\n        /** @type {HTMLElement[]} */\n        Array.from((_c = this.legendLabels) != null ? _c : [])\n      );\n      els.forEach((l2) => {\n        const legendName = l2.getAttribute(\"data:default-text\");\n        l2.innerHTML = decodeURIComponent(legendName != null ? legendName : \"\");\n      });\n      for (let i2 = 0; i2 < els.length; i2++) {\n        const l2 = els[i2];\n        const lsIndex = parseInt((_d = l2.getAttribute(\"i\")) != null ? _d : \"\", 10);\n        const legendName = decodeURIComponent(\n          (_e = l2.getAttribute(\"data:default-text\")) != null ? _e : \"\"\n        );\n        const text = legendFormatter(legendName, {\n          seriesIndex: shared ? lsIndex : capturedSeries,\n          dataPointIndex: j,\n          w: w2\n        });\n        if (!shared) {\n          l2.innerHTML = lsIndex === capturedSeries ? text : legendName;\n          if (capturedSeries === lsIndex) {\n            break;\n          }\n        } else {\n          l2.innerHTML = w2.globals.collapsedSeriesIndices.indexOf(lsIndex) < 0 ? text : legendName;\n        }\n      }\n    }\n    const _rangeData = (\n      /** @type {any} */\n      w2.rangeData\n    );\n    const commonSeriesTextsParams = __spreadValues(__spreadValues({\n      ttItems,\n      i: capturedSeries,\n      j\n    }, ((_i = (_h = (_g = (_f = _rangeData.seriesRange) == null ? void 0 : _f[capturedSeries]) == null ? void 0 : _g[j]) == null ? void 0 : _h.y[0]) == null ? void 0 : _i.y1) !== void 0 && {\n      y1: (_m = (_l = (_k = (_j = _rangeData.seriesRange) == null ? void 0 : _j[capturedSeries]) == null ? void 0 : _k[j]) == null ? void 0 : _l.y[0]) == null ? void 0 : _m.y1\n    }), ((_q = (_p = (_o = (_n = _rangeData.seriesRange) == null ? void 0 : _n[capturedSeries]) == null ? void 0 : _o[j]) == null ? void 0 : _p.y[0]) == null ? void 0 : _q.y2) !== void 0 && {\n      y2: (_u = (_t = (_s = (_r = _rangeData.seriesRange) == null ? void 0 : _r[capturedSeries]) == null ? void 0 : _s[j]) == null ? void 0 : _t.y[0]) == null ? void 0 : _u.y2\n    });\n    if (shared) {\n      ttCtx.tooltipLabels.drawSeriesTexts(__spreadProps(__spreadValues({}, commonSeriesTextsParams), {\n        shared: this.showOnIntersect ? false : this.tConfig.shared\n      }));\n      if (hasMarkers || dynamicPoints) {\n        handlePoints();\n      } else if (this.tooltipUtil.hasBars()) {\n        if (canvasMode) {\n          ttCtx.tooltipPosition.moveStickyTooltipOverBars(j, capturedSeries);\n        }\n        this.barSeriesHeight = this.tooltipUtil.getBarsHeight(\n          /** @type {any[]} */\n          [...bars]\n        );\n        if (this.barSeriesHeight > 0) {\n          const graphics = new Graphics(this.w, this.ctx);\n          const paths = w2.dom.Paper.find(`.apexcharts-bar-area[j='${j}']`);\n          this.deactivateHoverFilter();\n          const points = ttCtx.tooltipUtil.getAllMarkers(true);\n          if (points.length && !this.barSeriesHeight) {\n            handlePoints();\n          }\n          ttCtx.tooltipPosition.moveStickyTooltipOverBars(j, capturedSeries);\n          for (let b2 = 0; b2 < paths.length; b2++) {\n            graphics.pathMouseEnter(\n              /** @type {any} */\n              paths[b2],\n              /** @type {any} */\n              void 0\n            );\n          }\n        }\n      }\n    } else {\n      ttCtx.tooltipLabels.drawSeriesTexts(__spreadValues({\n        shared: false\n      }, commonSeriesTextsParams));\n      if (this.tooltipUtil.hasBars()) {\n        ttCtx.tooltipPosition.moveStickyTooltipOverBars(j, capturedSeries);\n      }\n      if (hasMarkers) {\n        ttCtx.tooltipPosition.moveMarkers(capturedSeries, j);\n      } else if (dynamicPoints) {\n        ttCtx.tooltipPosition.moveDynamicPointOnHover(j, capturedSeries);\n      }\n    }\n  }\n}\nclass SvgRenderer {\n  /**\n   * @param {any} w\n   * @param {any} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.kind = \"svg\";\n  }\n  // ── lifecycle (SVG builds its layer via the existing plotChartType flow) ──\n  beginSeries() {\n  }\n  present() {\n    return null;\n  }\n  clear() {\n  }\n  // ── emit primitives (delegate to Graphics: the canvas renderer mirrors\n  //    this exact surface) ──\n  /** @param {any} attrs */\n  group(attrs) {\n    return this.ctx.graphics.group(attrs);\n  }\n  /** @param {any} opts */\n  drawPath(opts) {\n    return this.ctx.graphics.drawPath(opts);\n  }\n  /** @param {any[]} args */\n  drawLine(...args) {\n    return this.ctx.graphics.drawLine(...args);\n  }\n  /** @param {any[]} args */\n  drawRect(...args) {\n    return this.ctx.graphics.drawRect(...args);\n  }\n  /**\n   * @param {number} r\n   * @param {any} attrs\n   */\n  drawCircle(r2, attrs) {\n    return this.ctx.graphics.drawCircle(r2, attrs);\n  }\n  /** @param {any} opts */\n  drawText(opts) {\n    return this.ctx.graphics.drawText(opts);\n  }\n  /**\n   * A series mark path (animation-aware). Faithful passthrough to Graphics.\n   * Note: the SVG emit path in the per-type draw() methods routes through\n   * `seriesEmitter`, which returns the caller's own `Graphics` in SVG mode: so\n   * this method is the interface contract surface (mirrored by the canvas\n   * renderer), not the hot path.\n   * @param {any} opts\n   */\n  renderPaths(opts) {\n    return this.ctx.graphics.renderPaths(opts);\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @param {any} opts\n   */\n  drawMarker(x, y, opts = {}) {\n    return this.ctx.graphics.drawMarker(x, y, opts);\n  }\n  // ── capabilities: SVG supports everything the interface enumerates ──\n  /** @param {string} _feature */\n  supports(_feature) {\n    return true;\n  }\n  // ── interaction: the DOM does this natively in SVG mode ──\n  hitTest() {\n    return null;\n  }\n  restyle() {\n  }\n  // ── export: SVG serializes directly; no bitmap to composite ──\n  toBitmap() {\n    return null;\n  }\n  destroy() {\n  }\n}\nconst RENDERER_REGISTRY_KEY = \"__apexcharts_renderers__\";\nfunction getRendererRegistry() {\n  const g2 = (\n    /** @type {any} */\n    globalThis\n  );\n  if (!g2[RENDERER_REGISTRY_KEY]) g2[RENDERER_REGISTRY_KEY] = /* @__PURE__ */ new Map();\n  return g2[RENDERER_REGISTRY_KEY];\n}\nclass RendererController {\n  /** Same Map as getRendererRegistry(); exposed for tests/tooling. */\n  static get _rendererRegistry() {\n    return getRendererRegistry();\n  }\n  /**\n   * @param {string} kind\n   * @param {(w: any, ctx: any) => any} factory\n   */\n  static registerRenderer(kind, factory) {\n    getRendererRegistry().set(kind, factory);\n  }\n  /**\n   * Remove a registered renderer backend (tests / hot-reload). Charts fall\n   * back to SVG on their next resolve().\n   * @param {string} kind\n   */\n  static unregisterRenderer(kind) {\n    getRendererRegistry().delete(kind);\n  }\n  /**\n   * @param {any} w\n   * @param {any} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.svg = new SvgRenderer(w2, ctx);\n    this.active = this.svg;\n    this._activeKind = \"svg\";\n    this._instances = {};\n  }\n  /**\n   * The kind selection WANTS (before availability/fallback). Pure.\n   * @returns {import('../renderers/Renderer').RendererKind}\n   */\n  _desiredKind() {\n    const cfg = this.w.config.chart;\n    const mode = cfg.renderer || \"svg\";\n    if (!Environment.isBrowser()) return \"svg\";\n    if (mode === \"svg\") return \"svg\";\n    if (hasCanvasUnsupportedFeature(this.w)) return \"svg\";\n    if (mode === \"canvas\") return \"canvas\";\n    const marks = computeMarkCount(this.w);\n    const threshold = cfg.rendererThreshold || 8e3;\n    return marks >= threshold ? \"canvas\" : \"svg\";\n  }\n  /**\n   * Resolve + instantiate the active renderer and set `ctx.renderer`. Falls\n   * back to SVG (with a warning only when canvas was explicitly requested) if\n   * the desired backend is not registered.\n   * @returns {import('../renderers/Renderer').RendererKind}\n   */\n  resolve() {\n    const mode = this.w.config.chart.renderer || \"svg\";\n    const desired = this._desiredKind();\n    if (desired !== \"svg\") {\n      const factory = getRendererRegistry().get(desired);\n      if (factory) {\n        if (!this._instances[desired]) {\n          this._instances[desired] = factory(this.w, this.ctx);\n        }\n        this.active = this._instances[desired];\n        this._activeKind = desired;\n        this.ctx.renderer = this.active;\n        this.w.globals.activeRenderer = this.active;\n        return this._activeKind;\n      }\n      if (mode === desired) {\n        console.warn(\n          `[apexcharts] renderer:\"${desired}\" requested but that renderer is not bundled (import 'apexcharts/features/renderer-${desired}'); falling back to SVG.`\n        );\n      }\n    } else if (mode === \"canvas\" && hasCanvasUnsupportedFeature(this.w)) {\n      console.warn(\n        `[apexcharts] renderer:\"canvas\" requested but this chart uses a feature the canvas renderer does not render yet (gradient/pattern/image fill or a state color-matrix filter); falling back to SVG.`\n      );\n    }\n    this.active = this.svg;\n    this._activeKind = \"svg\";\n    this.ctx.renderer = this.active;\n    this.w.globals.activeRenderer = this.active;\n    return this._activeKind;\n  }\n  /** @returns {import('../renderers/Renderer').RendererKind} */\n  getActiveKind() {\n    return this._activeKind;\n  }\n  /** Destroy the owned non-SVG renderer instances (full chart destroy). */\n  teardown() {\n    for (const kind in this._instances) {\n      const r2 = this._instances[kind];\n      if (r2 && typeof r2.destroy === \"function\") r2.destroy();\n    }\n    this._instances = {};\n    this.active = this.svg;\n    this._activeKind = \"svg\";\n  }\n}\nclass SVGElement {\n  /**\n   * @param {any} node\n   */\n  constructor(node) {\n    this.node = node;\n    if (node) {\n      node.instance = this;\n    }\n    this._listeners = [];\n    this._filter = null;\n  }\n  // ---- Attribute methods ----\n  /**\n   * @param {any} a\n   * @param {any} [v]\n   */\n  attr(a2, v2) {\n    if (typeof a2 === \"string\" && v2 === void 0) {\n      return this.node.getAttribute(a2);\n    }\n    const attrs = typeof a2 === \"string\" ? { [a2]: v2 } : a2;\n    for (const key in attrs) {\n      let val = attrs[key];\n      if (val === null) {\n        this.node.removeAttribute(key);\n      } else if (val !== void 0) {\n        if (typeof val === \"number\" && isNaN(val)) val = 0;\n        this.node.setAttribute(key, val);\n      }\n    }\n    if (this.node.nodeName === \"text\" && attrs.x != null) {\n      const tspans = this.node.querySelectorAll(\"tspan[data-newline]\");\n      for (let i2 = 0; i2 < tspans.length; i2++) {\n        tspans[i2].setAttribute(\"x\", attrs.x);\n      }\n    }\n    return this;\n  }\n  /**\n   * @param {Record<string, string>} styles\n   */\n  css(styles) {\n    for (const k in styles) {\n      this.node.style[k] = styles[k];\n    }\n    return this;\n  }\n  /**\n   * @param {any} v\n   */\n  fill(v2) {\n    if (typeof v2 === \"object\") {\n      return this.attr(v2);\n    }\n    return this.attr(\"fill\", v2);\n  }\n  /**\n   * @param {any} v\n   */\n  stroke(v2) {\n    if (typeof v2 === \"object\") {\n      if (v2.color !== void 0) this.attr(\"stroke\", v2.color);\n      if (v2.width !== void 0) this.attr(\"stroke-width\", v2.width);\n      if (v2.dasharray !== void 0) this.attr(\"stroke-dasharray\", v2.dasharray);\n      if (v2.linecap !== void 0) this.attr(\"stroke-linecap\", v2.linecap);\n      if (v2.opacity !== void 0) this.attr(\"stroke-opacity\", v2.opacity);\n      return this;\n    }\n    return this.attr(\"stroke\", v2);\n  }\n  /**\n   * @param {number} w\n   * @param {number} h\n   */\n  size(w2, h2) {\n    return this.attr({ width: w2, height: h2 });\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   */\n  move(x, y) {\n    return this.attr({ x, y });\n  }\n  /**\n   * @param {number} cx\n   * @param {number} cy\n   */\n  center(cx, cy) {\n    if (this.node.nodeName === \"g\") {\n      const box = this.bbox();\n      const dx = cx - (box.x + box.width / 2);\n      const dy = cy - (box.y + box.height / 2);\n      return this.attr(\"transform\", `translate(${dx}, ${dy})`);\n    }\n    return this.attr({ cx, cy });\n  }\n  // ---- Tree operations ----\n  /**\n   * @param {any} child\n   */\n  add(child) {\n    if (child && child.__isCanvasMark) return this;\n    this.node.appendChild(child.node || child);\n    return this;\n  }\n  /**\n   * @param {any} parent\n   */\n  addTo(parent) {\n    const p2 = parent.node || parent;\n    p2.appendChild(this.node);\n    return this;\n  }\n  remove() {\n    if (this.node.parentNode) {\n      this.node.parentNode.removeChild(this.node);\n    }\n    return this;\n  }\n  clear() {\n    while (this.node.firstChild) {\n      this.node.removeChild(this.node.firstChild);\n    }\n    return this;\n  }\n  // ---- Query ----\n  /**\n   * @param {string} selector\n   */\n  find(selector) {\n    return Array.from(this.node.querySelectorAll(selector)).map(\n      (n2) => n2.instance || new SVGElement(n2)\n    );\n  }\n  /**\n   * @param {string} selector\n   */\n  findOne(selector) {\n    const n2 = this.node.querySelector(selector);\n    return n2 ? n2.instance || new SVGElement(n2) : null;\n  }\n  // ---- Events ----\n  /**\n   * @param {Event} event\n   * @param {Function} handler\n   */\n  on(event, handler) {\n    const eventType = (\n      /** @type {string} */\n      /** @type {any} */\n      event.split(\n        \".\"\n      )[0]\n    );\n    this._listeners.push({ event, eventType, handler });\n    this.node.addEventListener(eventType, handler);\n    return this;\n  }\n  /**\n   * @param {Event} event\n   * @param {Function} handler\n   */\n  off(event, handler) {\n    if (!event && !handler) {\n      this._listeners.forEach((l2) => {\n        this.node.removeEventListener(l2.eventType, l2.handler);\n      });\n      this._listeners = [];\n    } else if (event && !handler) {\n      const eventType = (\n        /** @type {string} */\n        /** @type {any} */\n        event.split(\".\")[0]\n      );\n      this._listeners = this._listeners.filter((l2) => {\n        if (l2.eventType === eventType) {\n          this.node.removeEventListener(l2.eventType, l2.handler);\n          return false;\n        }\n        return true;\n      });\n    } else {\n      const eventType = (\n        /** @type {string} */\n        /** @type {any} */\n        event.split(\".\")[0]\n      );\n      this._listeners = this._listeners.filter((l2) => {\n        if (l2.eventType === eventType && l2.handler === handler) {\n          this.node.removeEventListener(l2.eventType, l2.handler);\n          return false;\n        }\n        return true;\n      });\n    }\n    return this;\n  }\n  // ---- Iteration ----\n  /**\n   * @param {Function} fn\n   * @param {boolean} deep\n   */\n  each(fn, deep) {\n    const children = Array.from(this.node.children);\n    children.forEach((child) => {\n      const inst = child.instance || new SVGElement(child);\n      fn.call(inst);\n      if (deep) inst.each(fn, deep);\n    });\n    return this;\n  }\n  // ---- CSS classes ----\n  /**\n   * @param {string} cls\n   */\n  removeClass(cls) {\n    if (cls === \"*\") {\n      this.node.removeAttribute(\"class\");\n    } else {\n      this.node.classList.remove(cls);\n    }\n    return this;\n  }\n  // ---- Children ----\n  children() {\n    return Array.from(this.node.childNodes).filter((n2) => n2.nodeType === 1).map((n2) => n2.instance || new SVGElement(n2));\n  }\n  // ---- Visibility ----\n  hide() {\n    this.node.style.display = \"none\";\n    return this;\n  }\n  show() {\n    this.node.style.display = \"\";\n    return this;\n  }\n  // ---- Measurement ----\n  bbox() {\n    if (typeof this.node.getBBox === \"function\") {\n      try {\n        return this.node.getBBox();\n      } catch (e2) {\n      }\n    }\n    return { x: 0, y: 0, width: 0, height: 0 };\n  }\n  // ---- Text-specific ----\n  /**\n   * @param {string} text\n   */\n  tspan(text) {\n    const tspan = BrowserAPIs.createElementNS(\n      \"http://www.w3.org/2000/svg\",\n      \"tspan\"\n    );\n    tspan.textContent = text;\n    this.node.appendChild(tspan);\n    return new SVGElement(tspan);\n  }\n  // ---- Path-specific ----\n  /**\n   * @param {string} d\n   */\n  plot(d) {\n    if (typeof d === \"string\") {\n      this.attr(\"d\", d);\n    }\n    return this;\n  }\n  // ---- Animation (overridden by SVGAnimation mixin) ----\n  animate() {\n    throw new Error(\"Animation module not loaded\");\n  }\n  // ---- Filter methods (set up by SVGFilter module) ----\n  // `filterWith`, `unfilter` and `filterer` are installed on the prototype by\n  // installFilterMethods() (svg/index.js). This stub only exists so a call\n  // before the filter module is installed fails with a clear message.\n  filterWith() {\n    throw new Error(\"Filter module not loaded\");\n  }\n}\nlet gradientCounter = 0;\nclass SVGGradient extends SVGElement {\n  /**\n   * @param {any} container\n   * @param {string} type\n   * @param {object} builder\n   */\n  constructor(container, type, builder) {\n    const tag = type === \"radial\" ? \"radialGradient\" : \"linearGradient\";\n    const node = BrowserAPIs.createElementNS(SVGNS$2, tag);\n    super(node);\n    this._id = \"SvgjsGradient\" + ++gradientCounter;\n    this.attr(\"id\", this._id);\n    if (typeof builder === \"function\") {\n      builder(new StopBuilder(this));\n    }\n    let defs = container.node.querySelector(\"defs\");\n    if (!defs) {\n      defs = BrowserAPIs.createElementNS(SVGNS$2, \"defs\");\n      container.node.appendChild(defs);\n    }\n    defs.appendChild(this.node);\n  }\n  /**\n   * @param {any} offset\n   * @param {string} color\n   * @param {number} opacity\n   */\n  stop(offset, color, opacity) {\n    const s2 = BrowserAPIs.createElementNS(SVGNS$2, \"stop\");\n    s2.setAttribute(\"offset\", offset);\n    s2.setAttribute(\"stop-color\", color);\n    if (opacity !== void 0) s2.setAttribute(\"stop-opacity\", String(opacity));\n    this.node.appendChild(s2);\n    return this;\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   */\n  from(x, y) {\n    return this.attr({ x1: x, y1: y });\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   */\n  to(x, y) {\n    return this.attr({ x2: x, y2: y });\n  }\n  url() {\n    return \"url(#\" + this._id + \")\";\n  }\n  toString() {\n    return this.url();\n  }\n  valueOf() {\n    return this.url();\n  }\n  fill() {\n    return this.url();\n  }\n}\nclass StopBuilder {\n  /**\n   * @param {any} gradient\n   */\n  constructor(gradient) {\n    this.gradient = gradient;\n  }\n  /**\n   * @param {any} offset\n   * @param {string} color\n   * @param {number} opacity\n   */\n  stop(offset, color, opacity) {\n    this.gradient.stop(offset, color, opacity);\n    return this;\n  }\n}\nlet patternCounter = 0;\nclass SVGPattern extends SVGElement {\n  /**\n   * @param {any} container\n   * @param {number} w\n   * @param {number} h\n   * @param {Function} builder\n   */\n  constructor(container, w2, h2, builder) {\n    const node = BrowserAPIs.createElementNS(SVGNS$2, \"pattern\");\n    super(node);\n    this._id = \"SvgjsPattern\" + ++patternCounter;\n    this.attr({\n      id: this._id,\n      width: w2,\n      height: h2,\n      patternUnits: \"userSpaceOnUse\"\n    });\n    if (typeof builder === \"function\") {\n      const patternContainer = new SVGContainer(this.node);\n      builder(patternContainer);\n    }\n    let defs = container.node.querySelector(\"defs\");\n    if (!defs) {\n      defs = BrowserAPIs.createElementNS(SVGNS$2, \"defs\");\n      container.node.appendChild(defs);\n    }\n    defs.appendChild(this.node);\n  }\n  url() {\n    return \"url(#\" + this._id + \")\";\n  }\n  toString() {\n    return this.url();\n  }\n  valueOf() {\n    return this.url();\n  }\n  fill() {\n    return this.url();\n  }\n}\nclass SVGContainer extends SVGElement {\n  /**\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x2\n   * @param {number} y2\n   */\n  line(x1, y1, x2, y2) {\n    const el = this._make(\"line\");\n    if (x1 !== void 0) {\n      el.attr({ x1, y1, x2, y2 });\n    }\n    return el;\n  }\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {number} h\n   */\n  rect(w2, h2) {\n    const el = this._make(\"rect\");\n    if (w2 !== void 0) {\n      el.attr({ width: w2, height: h2 });\n    }\n    return el;\n  }\n  /**\n   * @param {number} d\n   */\n  circle(d) {\n    const el = this._make(\"circle\");\n    if (d !== void 0) {\n      el.attr({ r: d / 2, cx: d / 2, cy: d / 2 });\n    }\n    return el;\n  }\n  /**\n   * @param {string} d\n   */\n  path(d) {\n    const el = this._make(\"path\");\n    if (d) el.attr(\"d\", d);\n    return el;\n  }\n  /**\n   * @param {string} pts\n   */\n  polygon(pts) {\n    const el = this._make(\"polygon\");\n    if (pts) el.attr(\"points\", pts);\n    return el;\n  }\n  group() {\n    return this._makeContainer(\"g\");\n  }\n  defs() {\n    return this._makeContainer(\"defs\");\n  }\n  /**\n   * @param {string} textContent\n   */\n  plain(textContent) {\n    const node = BrowserAPIs.createElementNS(SVGNS$2, \"text\");\n    node.textContent = textContent;\n    const el = new SVGElement(node);\n    this.node.appendChild(node);\n    return el;\n  }\n  /**\n   * @param {object} builder\n   */\n  text(builder) {\n    const node = BrowserAPIs.createElementNS(SVGNS$2, \"text\");\n    const el = new SVGElement(node);\n    this.node.appendChild(node);\n    if (typeof builder === \"function\") {\n      builder(new TspanBuilder(node));\n    }\n    return el;\n  }\n  /**\n   * @param {string} url\n   * @param {Function} callback\n   */\n  image(url, callback) {\n    const node = BrowserAPIs.createElementNS(SVGNS$2, \"image\");\n    node.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"href\", url);\n    const el = new SVGElement(node);\n    this.node.appendChild(node);\n    if (typeof callback === \"function\" && Environment.isBrowser()) {\n      const img = new Image();\n      img.onload = function() {\n        el.size(img.width, img.height);\n        callback.call(el, { width: img.width, height: img.height });\n      };\n      img.src = url;\n    }\n    return el;\n  }\n  /**\n   * @param {string} type\n   * @param {object} builder\n   */\n  gradient(type, builder) {\n    return new SVGGradient(this, type, builder);\n  }\n  /**\n   * @param {number} w\n   * @param {number} h\n   * @param {Function} builder\n   */\n  pattern(w2, h2, builder) {\n    return new SVGPattern(this, w2, h2, builder);\n  }\n  /**\n   * @param {string} tag\n   */\n  _make(tag) {\n    const node = BrowserAPIs.createElementNS(SVGNS$2, tag);\n    this.node.appendChild(node);\n    return new SVGElement(node);\n  }\n  /**\n   * @param {string} tag\n   */\n  _makeContainer(tag) {\n    const node = BrowserAPIs.createElementNS(SVGNS$2, tag);\n    this.node.appendChild(node);\n    return new SVGContainer(node);\n  }\n}\nclass TspanBuilder {\n  /**\n   * @param {any} textNode\n   */\n  constructor(textNode) {\n    this.textNode = textNode;\n  }\n  /**\n   * @param {string} text\n   */\n  tspan(text) {\n    const tspan = BrowserAPIs.createElementNS(SVGNS$2, \"tspan\");\n    tspan.textContent = text;\n    this.textNode.appendChild(tspan);\n    return new TspanWrapper(tspan, this.textNode);\n  }\n}\nclass TspanWrapper {\n  /**\n   * @param {any} node\n   * @param {any} textNode\n   */\n  constructor(node, textNode) {\n    this.node = node;\n    this.textNode = textNode;\n  }\n  newLine() {\n    this.node.setAttribute(\"dy\", \"1.1em\");\n    this.node.dataset.newline = \"1\";\n    return this;\n  }\n}\nlet filterCounter = 0;\nclass SVGFilter extends SVGElement {\n  constructor() {\n    const node = BrowserAPIs.createElementNS(SVGNS$2, \"filter\");\n    super(node);\n    this._id = \"SvgjsFilter\" + ++filterCounter;\n    this.attr(\"id\", this._id);\n  }\n}\nclass FilterBuilder {\n  /**\n   * @param {any} filter\n   */\n  constructor(filter) {\n    this.filter = filter;\n  }\n  /**\n   * @param {object} attrs\n   */\n  colorMatrix(attrs) {\n    return this._primitive(\"feColorMatrix\", attrs);\n  }\n  /**\n   * @param {object} attrs\n   */\n  offset(attrs) {\n    return this._primitive(\"feOffset\", attrs);\n  }\n  /**\n   * @param {object} attrs\n   */\n  gaussianBlur(attrs) {\n    return this._primitive(\"feGaussianBlur\", attrs);\n  }\n  /**\n   * @param {object} attrs\n   */\n  flood(attrs) {\n    return this._primitive(\"feFlood\", attrs);\n  }\n  /**\n   * @param {object} attrs\n   */\n  composite(attrs) {\n    return this._primitive(\"feComposite\", attrs);\n  }\n  /**\n   * @param {string[]} sources\n   */\n  merge(sources) {\n    const m2 = BrowserAPIs.createElementNS(SVGNS$2, \"feMerge\");\n    sources.forEach((src) => {\n      const mn = BrowserAPIs.createElementNS(SVGNS$2, \"feMergeNode\");\n      mn.setAttribute(\"in\", src);\n      m2.appendChild(mn);\n    });\n    this.filter.node.appendChild(m2);\n    return new SVGElement(m2);\n  }\n  /**\n   * @param {string} tag\n   * @param {Record<string, any>} attrs\n   */\n  _primitive(tag, attrs) {\n    const el = BrowserAPIs.createElementNS(SVGNS$2, tag);\n    for (const key in attrs) {\n      el.setAttribute(key, attrs[key]);\n    }\n    this.filter.node.appendChild(el);\n    return new SVGElement(el);\n  }\n}\nfunction installFilterMethods(ElementClass) {\n  ElementClass.prototype.filterWith = function(fn) {\n    const filter = new SVGFilter();\n    this._filter = filter;\n    let svgRoot = this.node;\n    while (svgRoot && svgRoot.nodeName !== \"svg\") {\n      svgRoot = svgRoot.parentNode;\n    }\n    if (svgRoot) {\n      let defs = svgRoot.querySelector(\"defs\");\n      if (!defs) {\n        defs = BrowserAPIs.createElementNS(SVGNS$2, \"defs\");\n        svgRoot.insertBefore(defs, svgRoot.firstChild);\n      }\n      defs.appendChild(filter.node);\n    }\n    fn(new FilterBuilder(filter));\n    this.attr(\"filter\", \"url(#\" + filter._id + \")\");\n    return this;\n  };\n  ElementClass.prototype.unfilter = function(all) {\n    if (this._filter) {\n      this.node.removeAttribute(\"filter\");\n      if (all && this._filter.node && this._filter.node.parentNode) {\n        this._filter.node.parentNode.removeChild(this._filter.node);\n      }\n      this._filter = null;\n    }\n    return this;\n  };\n  ElementClass.prototype.filterer = function() {\n    return this._filter;\n  };\n}\nfunction installDraggable(ElementClass) {\n  ElementClass.prototype.draggable = function(opts) {\n    if (opts === false) {\n      if (this._dragCleanup) {\n        this._dragCleanup();\n        this._dragCleanup = null;\n      }\n      return this;\n    }\n    const el = this;\n    const constraints = opts || {};\n    const onPointerDown = (e2) => {\n      if (e2.button && e2.button !== 0) return;\n      e2.stopPropagation();\n      const isTouch = e2.type === \"touchstart\";\n      const ev = isTouch ? e2.touches[0] : e2;\n      const svgEl = el.node;\n      const startAttrX = parseFloat(svgEl.getAttribute(\"x\")) || 0;\n      const startAttrY = parseFloat(svgEl.getAttribute(\"y\")) || 0;\n      const startClientX = ev.clientX;\n      const startClientY = ev.clientY;\n      const svgRoot = svgEl.ownerSVGElement;\n      let ctm = null;\n      if (svgRoot) {\n        ctm = svgRoot.getScreenCTM();\n      }\n      const onMove = (me) => {\n        const mev = me.type === \"touchmove\" ? me.touches[0] : me;\n        let dx = mev.clientX - startClientX;\n        let dy = mev.clientY - startClientY;\n        if (ctm) {\n          dx = dx / ctm.a;\n          dy = dy / ctm.d;\n        }\n        let newX = startAttrX + dx;\n        let newY = startAttrY + dy;\n        const w2 = parseFloat(svgEl.getAttribute(\"width\")) || 0;\n        const h2 = parseFloat(svgEl.getAttribute(\"height\")) || 0;\n        if (constraints.minX !== void 0 && newX < constraints.minX)\n          newX = constraints.minX;\n        if (constraints.minY !== void 0 && newY < constraints.minY)\n          newY = constraints.minY;\n        if (constraints.maxX !== void 0 && newX + w2 > constraints.maxX)\n          newX = constraints.maxX - w2;\n        if (constraints.maxY !== void 0 && newY + h2 > constraints.maxY)\n          newY = constraints.maxY - h2;\n        const box = {\n          x: newX,\n          y: newY,\n          w: w2,\n          h: h2,\n          x2: newX + w2,\n          y2: newY + h2\n        };\n        const event = new CustomEvent(\"dragmove\", {\n          detail: {\n            handler: {\n              /**\n               * @param {number} x\n               * @param {number} y\n               */\n              move: function(x, y) {\n                svgEl.setAttribute(\"x\", x);\n                svgEl.setAttribute(\"y\", y);\n              }\n            },\n            box\n          }\n        });\n        svgEl.dispatchEvent(event);\n      };\n      const onUp = () => {\n        if (Environment.isBrowser()) {\n          document.removeEventListener(\"mousemove\", onMove);\n          document.removeEventListener(\"touchmove\", onMove);\n          document.removeEventListener(\"mouseup\", onUp);\n          document.removeEventListener(\"touchend\", onUp);\n        }\n        el._activeDrag = null;\n      };\n      if (Environment.isBrowser()) {\n        document.addEventListener(\"mousemove\", onMove);\n        document.addEventListener(\"touchmove\", onMove);\n        document.addEventListener(\"mouseup\", onUp);\n        document.addEventListener(\"touchend\", onUp);\n        el._activeDrag = { onMove, onUp };\n      }\n    };\n    el.node.addEventListener(\"mousedown\", onPointerDown);\n    el.node.addEventListener(\"touchstart\", onPointerDown);\n    el._dragCleanup = () => {\n      el.node.removeEventListener(\"mousedown\", onPointerDown);\n      el.node.removeEventListener(\"touchstart\", onPointerDown);\n      if (el._activeDrag && Environment.isBrowser()) {\n        document.removeEventListener(\"mousemove\", el._activeDrag.onMove);\n        document.removeEventListener(\"touchmove\", el._activeDrag.onMove);\n        document.removeEventListener(\"mouseup\", el._activeDrag.onUp);\n        document.removeEventListener(\"touchend\", el._activeDrag.onUp);\n        el._activeDrag = null;\n      }\n    };\n    return el;\n  };\n}\nfunction installSelectable(ElementClass) {\n  ElementClass.prototype.select = function(opts) {\n    if (opts === false) {\n      if (this._selectCleanup) {\n        this._selectCleanup();\n        this._selectCleanup = null;\n      }\n      return this;\n    }\n    const el = this;\n    const { createHandle, updateHandle } = opts;\n    const handleGroup = document.createElementNS(SVGNS$2, \"g\");\n    handleGroup.setAttribute(\"class\", \"svg_select_points\");\n    const parent = el.node.parentNode;\n    if (parent) {\n      parent.appendChild(handleGroup);\n    }\n    const handles = {};\n    const handleNames = [\"t\", \"b\", \"l\", \"r\", \"lt\", \"rt\", \"lb\", \"rb\"];\n    handleNames.forEach((name2, index) => {\n      const subGroup = new SVGContainer(document.createElementNS(SVGNS$2, \"g\"));\n      handleGroup.appendChild(subGroup.node);\n      const handle = createHandle(subGroup, [0, 0], index, [], name2);\n      handles[name2] = { group: subGroup, handle };\n    });\n    const updatePositions = () => {\n      const x = parseFloat(el.attr(\"x\")) || 0;\n      const y = parseFloat(el.attr(\"y\")) || 0;\n      const w2 = parseFloat(el.attr(\"width\")) || 0;\n      const h2 = parseFloat(el.attr(\"height\")) || 0;\n      const elTransform = el.node.getAttribute(\"transform\");\n      if (elTransform) {\n        handleGroup.setAttribute(\"transform\", elTransform);\n      } else {\n        handleGroup.removeAttribute(\"transform\");\n      }\n      const positions = {\n        t: [x + w2 / 2, y],\n        b: [x + w2 / 2, y + h2],\n        l: [x, y + h2 / 2],\n        r: [x + w2, y + h2 / 2],\n        lt: [x, y],\n        rt: [x + w2, y],\n        lb: [x, y + h2],\n        rb: [x + w2, y + h2]\n      };\n      handleNames.forEach((name2) => {\n        if (handles[name2] && positions[name2]) {\n          updateHandle(handles[name2].group, positions[name2]);\n        }\n      });\n    };\n    updatePositions();\n    el._selectHandles = handleGroup;\n    el._selectHandlesMap = handles;\n    el._updateSelectPositions = updatePositions;\n    el._selectCleanup = () => {\n      if (handleGroup.parentNode) {\n        handleGroup.parentNode.removeChild(handleGroup);\n      }\n      el._selectHandles = null;\n      el._selectHandlesMap = null;\n      el._updateSelectPositions = null;\n    };\n    return el;\n  };\n  ElementClass.prototype.resize = function(enable) {\n    if (enable === false) {\n      if (this._resizeCleanup) {\n        this._resizeCleanup();\n        this._resizeCleanup = null;\n      }\n      return this;\n    }\n    const el = this;\n    const handles = el._selectHandlesMap;\n    if (!handles) return el;\n    const cleanupFns = [];\n    const makeHandleDraggable = (name2) => {\n      const handleInfo = handles[name2];\n      if (!handleInfo || !handleInfo.group || !handleInfo.group.node) return;\n      const handleNode = handleInfo.group.node;\n      const onPointerDown = (e2) => {\n        if (e2.button && e2.button !== 0) return;\n        e2.stopPropagation();\n        const isTouch = e2.type === \"touchstart\";\n        const ev = isTouch ? e2.touches[0] : e2;\n        const startClientX = ev.clientX;\n        const svgRoot = el.node.ownerSVGElement;\n        let ctm = null;\n        if (svgRoot) {\n          ctm = svgRoot.getScreenCTM();\n        }\n        const startX = parseFloat(el.attr(\"x\")) || 0;\n        const startW = parseFloat(el.attr(\"width\")) || 0;\n        const onMove = (me) => {\n          const mev = me.type === \"touchmove\" ? me.touches[0] : me;\n          let dx = mev.clientX - startClientX;\n          if (ctm) dx = dx / /** @type {any} */\n          ctm.a;\n          let newX = startX;\n          let newW = startW;\n          if (name2 === \"l\") {\n            newX = startX + dx;\n            newW = startW - dx;\n          } else if (name2 === \"r\") {\n            newW = startW + dx;\n          }\n          if (newW < 0) {\n            newW = 0;\n          }\n          el.attr({ x: newX, width: newW });\n          if (el._updateSelectPositions) {\n            el._updateSelectPositions();\n          }\n          const event = new CustomEvent(\"resize\", {\n            detail: { el }\n          });\n          el.node.dispatchEvent(event);\n        };\n        const onUp = () => {\n          if (Environment.isBrowser()) {\n            document.removeEventListener(\"mousemove\", onMove);\n            document.removeEventListener(\"touchmove\", onMove);\n            document.removeEventListener(\"mouseup\", onUp);\n            document.removeEventListener(\"touchend\", onUp);\n          }\n          const event = new CustomEvent(\"resize\", {\n            detail: { el }\n          });\n          el.node.dispatchEvent(event);\n        };\n        if (Environment.isBrowser()) {\n          document.addEventListener(\"mousemove\", onMove);\n          document.addEventListener(\"touchmove\", onMove);\n          document.addEventListener(\"mouseup\", onUp);\n          document.addEventListener(\"touchend\", onUp);\n        }\n      };\n      handleNode.addEventListener(\"mousedown\", onPointerDown);\n      handleNode.addEventListener(\"touchstart\", onPointerDown);\n      cleanupFns.push(() => {\n        handleNode.removeEventListener(\"mousedown\", onPointerDown);\n        handleNode.removeEventListener(\"touchstart\", onPointerDown);\n      });\n    };\n    makeHandleDraggable(\"l\");\n    makeHandleDraggable(\"r\");\n    el._resizeCleanup = () => {\n      cleanupFns.forEach((fn) => fn());\n    };\n    return el;\n  };\n}\ninstallFilterMethods(SVGElement);\ninstallAnimationMethods(SVGElement);\ninstallDraggable(SVGElement);\ninstallSelectable(SVGElement);\nfunction SVG() {\n  const svgEl = BrowserAPIs.createElementNS(SVGNS$2, \"svg\");\n  const svg = new SVGContainer(svgEl);\n  svg.attr({ xmlns: SVGNS$2 });\n  return svg;\n}\nSVG.xlink = \"http://www.w3.org/1999/xlink\";\nif (Environment.isBrowser() && typeof window.SVG === \"undefined\") {\n  window.SVG = SVG;\n}\nif (Environment.isBrowser()) {\n  if (typeof window.SVG === \"undefined\") {\n    window.SVG = SVG;\n  }\n  if (typeof window.Apex === \"undefined\") {\n    window.Apex = {};\n  }\n} else {\n  if (typeof global !== \"undefined\") {\n    if (typeof /** @type {any} */\n    global.Apex === \"undefined\") {\n      global.Apex = {};\n    }\n    if (typeof /** @type {any} */\n    global.SVG === \"undefined\") {\n      global.SVG = SVG;\n    }\n  }\n}\nconst _InitCtxVariables = class _InitCtxVariables {\n  /**\n   * Register one or more optional feature modules.\n   *\n   * @param {Record<string, new (w: object, ctx: object) => unknown>} featureMap\n   *   Plain object mapping ctx property name → constructor.\n   *\n   * Example (called from src/features/legend.js):\n   *   InitCtxVariables.registerFeatures({ legend: Legend })\n   */\n  static registerFeatures(featureMap) {\n    for (const [key, Ctor] of Object.entries(featureMap)) {\n      _InitCtxVariables._featureRegistry.set(key, Ctor);\n    }\n  }\n  /**\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(ctx) {\n    this.ctx = ctx;\n    this.w = ctx.w;\n  }\n  initModules() {\n    this.ctx.publicMethods = [\n      \"updateOptions\",\n      \"updateSeries\",\n      \"appendData\",\n      \"appendSeries\",\n      \"isSeriesHidden\",\n      \"highlightSeries\",\n      \"toggleSeries\",\n      \"showSeries\",\n      \"hideSeries\",\n      \"setLocale\",\n      \"resetSeries\",\n      \"zoomX\",\n      \"toggleDataPointSelection\",\n      \"dataURI\",\n      \"exportToCSV\",\n      \"addXaxisAnnotation\",\n      \"addYaxisAnnotation\",\n      \"addPointAnnotation\",\n      \"clearAnnotations\",\n      \"removeAnnotation\",\n      \"drillDown\",\n      \"drillUp\",\n      \"drillToRoot\",\n      \"clearDrilldownCache\",\n      \"paper\",\n      \"getActiveRenderer\",\n      \"destroy\"\n    ];\n    this.ctx.eventList = [\n      \"click\",\n      \"mousedown\",\n      \"mousemove\",\n      \"mouseleave\",\n      \"touchstart\",\n      \"touchmove\",\n      \"touchleave\",\n      \"mouseup\",\n      \"touchend\",\n      \"keydown\",\n      \"keyup\"\n    ];\n    this.ctx.animations = new Animations(this.w, this.ctx);\n    this.ctx.axes = new Axes(this.w, this.ctx);\n    this.ctx.core = new Core(this.ctx.el, this.w, this.ctx);\n    this.ctx.config = new Config({});\n    this.ctx.data = new Data(this.w, {\n      resetGlobals: () => this.ctx.core.resetGlobals(),\n      isMultipleY: () => this.ctx.core.isMultipleY()\n    });\n    this.ctx.grid = new Grid(this.w, this.ctx);\n    this.ctx.graphics = new Graphics(this.w, this.ctx);\n    this.ctx.coreUtils = new CoreUtils(this.w);\n    this.ctx.crosshairs = new Crosshairs(this.w);\n    this.ctx.events = new Events(this.w, this.ctx);\n    this.ctx.fill = new Fill(this.w);\n    this.ctx.localization = new Localization(this.w);\n    this.ctx.options = new Options();\n    this.ctx.responsive = new Responsive(this.w);\n    this.ctx.series = new Series(this.w, {\n      // legend may not be registered — guard with ?.\n      toggleDataSeries: (...a2) => {\n        var _a;\n        return (_a = this.ctx.legend) == null ? void 0 : _a.legendHelpers.toggleDataSeries(...a2);\n      },\n      revertDefaultAxisMinMax: () => this.ctx.updateHelpers.revertDefaultAxisMinMax(),\n      updateSeries: (...a2) => this.ctx.updateHelpers._updateSeries(...a2)\n    });\n    this.ctx.theme = new Theme(this.w);\n    this.ctx.formatters = new Formatters(this.w);\n    this.ctx.titleSubtitle = new TitleSubtitle(this.w);\n    this.ctx.dimensions = new Dimensions(this.w, this.ctx);\n    this.ctx.updateHelpers = new UpdateHelpers(this.w, this.ctx);\n    this.ctx.rendererController = new RendererController(this.w, this.ctx);\n    this.ctx.renderer = this.ctx.rendererController.active;\n    const tooltipInstance = new Tooltip(this.w, this.ctx);\n    this.w.globals.tooltip = tooltipInstance;\n    Object.defineProperty(this.ctx, \"tooltip\", {\n      get() {\n        return this.w.globals.tooltip;\n      },\n      configurable: true\n    });\n    this._initOptionalModules();\n  }\n  /**\n   * Instantiate optional feature modules from the registry.\n   *\n   * Modules that are not registered are set to null on ctx so that call sites\n   * can safely use optional-chaining (ctx.tooltip?.drawTooltip(...)).\n   *\n   * Lazy-getter features (toolbar, zoomPanSelection, keyboardNavigation) are\n   * installed as on-demand getters so they are only constructed if accessed,\n   * and only if their constructor was registered.\n   */\n  _initOptionalModules() {\n    const reg = _InitCtxVariables._featureRegistry;\n    const w2 = this.w;\n    const ctx = this.ctx;\n    const ExportsCtor = reg.get(\"exports\");\n    ctx.exports = ExportsCtor ? new ExportsCtor(w2, ctx) : null;\n    const LegendCtor = reg.get(\"legend\");\n    ctx.legend = LegendCtor ? new LegendCtor(w2, ctx) : null;\n    const MorphCtor = reg.get(\"morphTypeChange\");\n    ctx.morphTypeChange = MorphCtor ? new MorphCtor(w2, ctx) : null;\n    const DrilldownCtor = reg.get(\"drilldown\");\n    ctx.drilldown = DrilldownCtor ? new DrilldownCtor(w2, ctx) : null;\n    const PerspectivesCtor = reg.get(\"perspectives\");\n    ctx.perspectives = PerspectivesCtor ? new PerspectivesCtor(w2, ctx) : null;\n    const StoryboardCtor = reg.get(\"storyboard\");\n    ctx.storyboard = StoryboardCtor ? new StoryboardCtor(w2, ctx) : null;\n    const HistoryCtor = reg.get(\"history\");\n    ctx.history = HistoryCtor ? new HistoryCtor(w2, ctx) : null;\n    const LinkedViewsCtor = reg.get(\"linkedViews\");\n    ctx.linkedViews = LinkedViewsCtor ? new LinkedViewsCtor(w2, ctx) : null;\n    const InkCtor = reg.get(\"ink\");\n    ctx.ink = InkCtor ? new InkCtor(w2, ctx) : null;\n    const MeasureCtor = reg.get(\"measure\");\n    ctx.measure = MeasureCtor ? new MeasureCtor(w2, ctx) : null;\n    const ContextMenuCtor = reg.get(\"contextMenu\");\n    ctx.contextMenu = ContextMenuCtor ? new ContextMenuCtor(w2, ctx) : null;\n    const WeaveCtor = reg.get(\"weave\");\n    ctx.weave = WeaveCtor ? new WeaveCtor(w2, ctx) : null;\n    const OSThemeCtor = reg.get(\"osThemeWatcher\");\n    ctx.osThemeWatcher = OSThemeCtor ? new OSThemeCtor(w2, ctx) : null;\n    const ToolbarCtor = reg.get(\"toolbar\");\n    Object.defineProperty(ctx, \"toolbar\", {\n      get() {\n        var _a;\n        if (!this._toolbar && ToolbarCtor)\n          this._toolbar = new ToolbarCtor(w2, this);\n        return (_a = this._toolbar) != null ? _a : null;\n      },\n      configurable: true\n    });\n    const ZoomPanCtor = reg.get(\"zoomPanSelection\");\n    Object.defineProperty(ctx, \"zoomPanSelection\", {\n      get() {\n        var _a;\n        if (!this._zoomPanSelection && ZoomPanCtor)\n          this._zoomPanSelection = new ZoomPanCtor(w2, this);\n        return (_a = this._zoomPanSelection) != null ? _a : null;\n      },\n      configurable: true\n    });\n    const KeyboardCtor = reg.get(\"keyboardNavigation\");\n    Object.defineProperty(ctx, \"keyboardNavigation\", {\n      get() {\n        var _a;\n        if (!this._keyboardNavigation && KeyboardCtor)\n          this._keyboardNavigation = new KeyboardCtor(w2, this);\n        return (_a = this._keyboardNavigation) != null ? _a : null;\n      },\n      configurable: true\n    });\n  }\n};\n/**\n * Registry of optional feature modules.\n *\n * Populated by ApexCharts.registerFeatures() (called from feature entry\n * files such as src/features/legend.js). Keys match the ctx property name\n * the module is stored under (e.g. 'legend', 'exports').\n *\n * Core modules that every chart needs are NOT in this registry — they are\n * always instantiated unconditionally in initModules().\n */\n__publicField(_InitCtxVariables, \"_featureRegistry\", /* @__PURE__ */ new Map());\nlet InitCtxVariables = _InitCtxVariables;\nclass Destroy {\n  /**\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(ctx) {\n    this.ctx = ctx;\n    this.w = ctx.w;\n  }\n  /**\n   * @param {{ isUpdating: boolean }} opts\n   */\n  clear({ isUpdating }) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;\n    (_a = this.ctx.weave) == null ? void 0 : _a.teardown(isUpdating);\n    if (!isUpdating) {\n      this.w.globals.isDestroyed = true;\n    }\n    if (this.ctx._zoomPanSelection) {\n      this.ctx._zoomPanSelection.destroy();\n    }\n    if (this.ctx._toolbar) {\n      this.ctx._toolbar.destroy();\n    }\n    if (this.w.globals.resizeObserver && typeof this.w.globals.resizeObserver.disconnect === \"function\") {\n      this.w.globals.resizeObserver.disconnect();\n      this.w.globals.resizeObserver = null;\n    }\n    PerformanceCache.invalidateAll(this.w);\n    if (isUpdating) {\n      this.ctx._zoomPanSelection = null;\n      this.ctx._toolbar = null;\n      (_b = this.ctx._keyboardNavigation) == null ? void 0 : _b.destroy();\n      this.ctx._keyboardNavigation = null;\n    } else {\n      (_c = this.ctx.perspectives) == null ? void 0 : _c.teardown();\n      this.ctx.perspectives = null;\n      (_d = this.ctx.storyboard) == null ? void 0 : _d.teardown();\n      this.ctx.storyboard = null;\n      (_e = this.ctx.history) == null ? void 0 : _e.teardown();\n      this.ctx.history = null;\n      (_f = this.ctx.linkedViews) == null ? void 0 : _f.teardown();\n      this.ctx.linkedViews = null;\n      (_g = this.ctx.ink) == null ? void 0 : _g.teardown();\n      this.ctx.ink = null;\n      (_h = this.ctx.measure) == null ? void 0 : _h.teardown();\n      this.ctx.measure = null;\n      (_i = this.ctx.contextMenu) == null ? void 0 : _i.teardown();\n      this.ctx.contextMenu = null;\n      (_j = this.ctx.osThemeWatcher) == null ? void 0 : _j.teardown();\n      this.ctx.osThemeWatcher = null;\n      this.ctx.weave = null;\n      (_l = (_k = this.ctx.rendererController) == null ? void 0 : _k.teardown) == null ? void 0 : _l.call(_k);\n      this.ctx.rendererController = null;\n      this.ctx.renderer = null;\n      this.ctx.drilldown = null;\n      this.ctx.morphTypeChange = null;\n      this.ctx.exports = null;\n      this.ctx.animations = null;\n      this.ctx.axes = null;\n      this.ctx.annotations = null;\n      this.ctx.core = null;\n      this.ctx.data = null;\n      this.ctx.grid = null;\n      this.ctx.series = null;\n      this.ctx.responsive = null;\n      this.ctx.theme = null;\n      this.ctx.formatters = null;\n      this.ctx.titleSubtitle = null;\n      this.ctx.legend = null;\n      this.ctx.dimensions = null;\n      this.ctx.options = null;\n      this.ctx.crosshairs = null;\n      this.ctx._zoomPanSelection = null;\n      this.ctx.updateHelpers = null;\n      this.ctx._toolbar = null;\n      this.ctx.localization = null;\n      this.ctx._keyboardNavigation = null;\n      this.ctx.w.globals.tooltip = null;\n    }\n    this.clearDomElements({ isUpdating });\n  }\n  /**\n   * @param {any} draw\n   */\n  killSVG(draw) {\n    draw.each(\n      /** @this {any} */\n      function() {\n        this.removeClass(\"*\");\n        this.off();\n      },\n      true\n    );\n    draw.clear();\n  }\n  /**\n   * @param {{ isUpdating: boolean }} opts\n   */\n  clearDomElements({ isUpdating }) {\n    const domEls = (\n      /** @type {any} */\n      this.w.dom\n    );\n    if (Environment.isBrowser() && domEls.Paper) {\n      const elSVG = domEls.Paper.node;\n      if (elSVG.parentNode && elSVG.parentNode.parentNode && !isUpdating) {\n        elSVG.parentNode.parentNode.style.minHeight = \"unset\";\n      }\n      const baseEl = domEls.baseEl;\n      if (baseEl) {\n        this.ctx.eventList.forEach((event) => {\n          baseEl.removeEventListener(event, this.ctx.events.documentEvent);\n        });\n      }\n      if (this.ctx.el !== null) {\n        while (this.ctx.el.firstChild) {\n          this.ctx.el.removeChild(this.ctx.el.firstChild);\n        }\n      }\n      this.killSVG(domEls.Paper);\n      domEls.Paper.remove();\n    }\n    domEls.Paper = null;\n    domEls.elWrap = null;\n    domEls.elGraphical = null;\n    domEls.elLegendWrap = null;\n    domEls.elLegendForeign = null;\n    domEls.baseEl = null;\n    domEls.elGridRect = null;\n    domEls.elGridRectMask = null;\n    domEls.elGridRectBarMask = null;\n    domEls.elGridRectMarkerMask = null;\n    domEls.elForecastMask = null;\n    domEls.elNonForecastMask = null;\n    domEls.elDefs = null;\n  }\n}\nconst LAYOUT_KEY = \"__apexcharts_unit_layouts__\";\nif (!/** @type {any} */\nglobalThis[LAYOUT_KEY]) {\n  globalThis[LAYOUT_KEY] = {};\n}\nfunction getLayouts() {\n  return (\n    /** @type {any} */\n    globalThis[LAYOUT_KEY]\n  );\n}\nfunction registerUnitLayout(name2, fn) {\n  if (!name2 || typeof name2 !== \"string\") {\n    console.warn(\"ApexCharts: registerUnitLayout requires a non-empty name.\");\n    return;\n  }\n  if (typeof fn !== \"function\") {\n    console.warn(\n      `ApexCharts: registerUnitLayout(\"${name2}\") expects a function (objects, rect) => [{id, x, y}].`\n    );\n    return;\n  }\n  getLayouts()[name2] = fn;\n}\nfunction getUnitLayout(name2) {\n  if (!name2) return null;\n  return getLayouts()[name2] || null;\n}\nfunction unregisterUnitLayout(name2) {\n  delete getLayouts()[name2];\n}\nconst ROW_SOURCE_KEY = \"__apexcharts_row_sources__\";\nif (!/** @type {any} */\nglobalThis[ROW_SOURCE_KEY]) {\n  globalThis[ROW_SOURCE_KEY] = {};\n}\nfunction getSources() {\n  return (\n    /** @type {any} */\n    globalThis[ROW_SOURCE_KEY]\n  );\n}\nfunction registerRowSource(name2, fn) {\n  if (!name2 || typeof name2 !== \"string\") {\n    console.warn(\"ApexCharts: registerRowSource requires a non-empty name.\");\n    return;\n  }\n  if (typeof fn !== \"function\") {\n    console.warn(\n      `ApexCharts: registerRowSource(\"${name2}\") expects a function (w, opts) => series.`\n    );\n    return;\n  }\n  getSources()[name2] = fn;\n}\nfunction getRowSource(name2) {\n  if (!name2) return null;\n  return getSources()[name2] || null;\n}\nfunction unregisterRowSource(name2) {\n  delete getSources()[name2];\n}\nfunction rowSourceFor(w2) {\n  const cnf = w2 && w2.config && w2.config.chart;\n  if (!cnf) return null;\n  return getRowSource(cnf.requestedType) || getRowSource(cnf.type);\n}\nconst REGISTRY_KEY = \"__apexcharts_plugins__\";\nfunction getRegistry() {\n  const g2 = (\n    /** @type {any} */\n    globalThis\n  );\n  if (!g2[REGISTRY_KEY]) g2[REGISTRY_KEY] = {};\n  return g2[REGISTRY_KEY];\n}\nfunction registerPlugin(def) {\n  if (!def || typeof def.name !== \"string\" || typeof def.setup !== \"function\") {\n    console.error(\n      \"[apexcharts] registerPlugin: a plugin needs a { name, setup } shape.\"\n    );\n    return;\n  }\n  getRegistry()[def.name] = def;\n}\nfunction getPlugin(name2) {\n  return getRegistry()[name2] || null;\n}\nfunction unregisterPlugin(name2) {\n  delete getRegistry()[name2];\n}\nconst ros = /* @__PURE__ */ new WeakMap();\nfunction addResizeListener(el, fn) {\n  if (Environment.isSSR()) return;\n  let called = false;\n  if (el.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {\n    const elRect = el.getBoundingClientRect();\n    if (el.style.display === \"none\" || elRect.width === 0) {\n      called = true;\n    }\n  }\n  const ro = new ResizeObserver((r2) => {\n    if (called) {\n      fn.call(el, r2);\n    }\n    called = true;\n  });\n  if (el.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n    Array.from(el.children).forEach((c2) => ro.observe(c2));\n  } else {\n    ro.observe(el);\n  }\n  ros.set(fn, ro);\n}\nfunction removeResizeListener(el, fn) {\n  if (Environment.isSSR()) return;\n  const ro = ros.get(fn);\n  if (ro) {\n    ro.disconnect();\n    ros.delete(fn);\n  }\n}\nconst apexCSS = '@keyframes opaque {\\n  0% {\\n    opacity: 0\\n  }\\n\\n  to {\\n    opacity: 1\\n  }\\n}\\n\\n@keyframes resizeanim {\\n\\n  0%,\\n  to {\\n    opacity: 0\\n  }\\n}\\n\\n.apexcharts-canvas {\\n  position: relative;\\n  direction: ltr !important;\\n  user-select: none;\\n  /* Focus indicator colour. Themes override below. */\\n  --apexcharts-focus-color: #008FFB;\\n}\\n\\n/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */\\n.apexcharts-canvas .apexcharts-theme-dark,\\n.apexcharts-theme-dark.apexcharts-canvas {\\n  --apexcharts-focus-color: #FFD500;\\n}\\n.apexcharts-canvas.apexcharts-high-contrast,\\n.apexcharts-high-contrast.apexcharts-canvas {\\n  --apexcharts-focus-color: #FFFF00;\\n}\\n\\n/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */\\n.apexcharts-sr-status {\\n  position: absolute;\\n  width: 1px;\\n  height: 1px;\\n  padding: 0;\\n  margin: -1px;\\n  overflow: hidden;\\n  clip: rect(0, 0, 0, 0);\\n  white-space: nowrap;\\n  border: 0;\\n}\\n\\n/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */\\n@media (prefers-reduced-motion: reduce) {\\n  .apexcharts-canvas *,\\n  .apexcharts-canvas *::before,\\n  .apexcharts-canvas *::after {\\n    animation-duration: 0.01ms !important;\\n    animation-iteration-count: 1 !important;\\n    transition-duration: 0.01ms !important;\\n  }\\n}\\n\\n.apexcharts-canvas ::-webkit-scrollbar {\\n  -webkit-appearance: none;\\n  width: 6px\\n}\\n\\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\\n  border-radius: 4px;\\n  background-color: rgba(0, 0, 0, .5);\\n  box-shadow: 0 0 1px rgba(255, 255, 255, .5);\\n  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\\n}\\n\\n.apexcharts-inner {\\n  position: relative\\n}\\n\\n.apexcharts-text tspan {\\n  font-family: inherit\\n}\\n\\nrect.legend-mouseover-inactive,\\n.legend-mouseover-inactive rect,\\n.legend-mouseover-inactive path,\\n.legend-mouseover-inactive circle,\\n.legend-mouseover-inactive line,\\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\\n  transition: .15s ease all;\\n  opacity: .2\\n}\\n\\n/* Linked Views (#4): per-mark crossfilter dim. Applied to individual data\\n   marks (not whole series) whose x is outside the brushed range. Opacity is\\n   overridable per chart via the --apx-cf-dim custom property. */\\n.apexcharts-crossfilter-dimmed {\\n  transition: opacity .25s ease;\\n  opacity: var(--apx-cf-dim, .2)\\n}\\n\\n/* Linked Views (#4): default styling for the built-in crossfilter data table\\n   (cf.dataTable). Deliberately light so host styles can override. */\\n.apexcharts-cf-table {\\n  border-collapse: collapse;\\n  width: 100%;\\n  font-size: 13px;\\n}\\n.apexcharts-cf-table caption {\\n  caption-side: bottom;\\n  text-align: right;\\n  padding: 6px 2px;\\n  font-size: 12px;\\n  opacity: .7\\n}\\n.apexcharts-cf-table th,\\n.apexcharts-cf-table td {\\n  padding: 6px 10px;\\n  text-align: left;\\n  border-bottom: 1px solid rgba(0, 0, 0, .08)\\n}\\n.apexcharts-cf-table th {\\n  font-weight: 600;\\n  border-bottom-width: 2px\\n}\\n.apexcharts-cf-table tbody tr:hover {\\n  background: rgba(99, 102, 241, .06)\\n}\\n\\n/* Measure ruler (#18): measure / delta ruler.\\n   Theme via these classes or the --apx-measure-* custom properties below\\n   (config `chart.measure.colors` overrides both). The ruler group also carries\\n   a direction class: apexcharts-measure-up | -down | -flat.\\n   Element classes:\\n     .apexcharts-measure-band     shaded span band\\n     .apexcharts-measure-vline    vertical guide lines\\n     .apexcharts-measure-line     free-mode diagonal line\\n     .apexcharts-measure-label-bg readout box     .apexcharts-measure-label text\\n   Colors are applied as SVG presentation attributes, so any rule you write on\\n   these classes overrides them. */\\n.apexcharts-canvas {\\n  --apx-measure-up: #16a34a;\\n  --apx-measure-down: #dc2626;\\n  --apx-measure-neutral: #64748b;\\n  --apx-measure-guide: #94a3b8;\\n}\\n.apexcharts-measure-capture {\\n  cursor: crosshair;\\n}\\n\\n/* Radial Actions (#chrome): right-click context menu. Theme via these classes\\n   or the --apx-menu-* custom properties. */\\n.apexcharts-canvas {\\n  --apx-menu-bg: #ffffff;\\n  --apx-menu-fg: #1e293b;\\n  --apx-menu-border: #e2e8f0;\\n  --apx-menu-hover: #f1f5f9;\\n  --apx-menu-shadow: rgba(15, 23, 42, 0.18);\\n}\\n.apexcharts-context-menu {\\n  min-width: 168px;\\n  padding: 4px;\\n  border-radius: 8px;\\n  background: var(--apx-menu-bg);\\n  border: 1px solid var(--apx-menu-border);\\n  box-shadow: 0 6px 22px var(--apx-menu-shadow);\\n  font-family: Helvetica, Arial, sans-serif;\\n  font-size: 13px;\\n  z-index: 20;\\n  user-select: none;\\n}\\n.apexcharts-context-menu-item {\\n  display: block;\\n  width: 100%;\\n  box-sizing: border-box;\\n  text-align: left;\\n  padding: 7px 12px;\\n  border: 0;\\n  border-radius: 5px;\\n  background: transparent;\\n  color: var(--apx-menu-fg);\\n  font: inherit;\\n  cursor: pointer;\\n}\\n.apexcharts-context-menu-item:hover,\\n.apexcharts-context-menu-item--active {\\n  background: var(--apx-menu-hover);\\n}\\n.apexcharts-context-menu-item:focus {\\n  outline: none;\\n}\\n\\n/* Ink Layer (#7): the floating note editor card, opened by clicking an\\n   ink-managed annotation. Theme via these classes or the --apx-ink-* vars. */\\n.apexcharts-canvas {\\n  --apx-ink-card-bg: #ffffff;\\n  --apx-ink-card-fg: #1e293b;\\n  --apx-ink-card-border: #e2e8f0;\\n  --apx-ink-card-hover: #f1f5f9;\\n  --apx-ink-card-accent: #6366f1;\\n  --apx-ink-card-shadow: rgba(15, 23, 42, 0.18);\\n}\\n.apexcharts-ink-card {\\n  position: absolute;\\n  z-index: 25;\\n  display: flex;\\n  flex-direction: column;\\n  gap: 6px;\\n  padding: 8px;\\n  border-radius: 8px;\\n  background: var(--apx-ink-card-bg);\\n  border: 1px solid var(--apx-ink-card-border);\\n  box-shadow: 0 6px 22px var(--apx-ink-card-shadow);\\n  font-family: Helvetica, Arial, sans-serif;\\n  font-size: 12px;\\n  color: var(--apx-ink-card-fg);\\n  user-select: none;\\n}\\n.apexcharts-ink-card-row {\\n  display: flex;\\n  align-items: center;\\n  gap: 4px;\\n}\\n.apexcharts-ink-card input.apexcharts-ink-editor {\\n  flex: 1 1 auto;\\n  width: 150px;\\n  min-width: 0;\\n  box-sizing: border-box;\\n  padding: 4px 6px;\\n  font: inherit;\\n  color: inherit;\\n  background: transparent;\\n  border: 1px solid var(--apx-ink-card-border);\\n  border-radius: 5px;\\n}\\n.apexcharts-ink-card input.apexcharts-ink-editor:focus {\\n  outline: none;\\n  border-color: var(--apx-ink-card-accent);\\n}\\n.apexcharts-ink-btn {\\n  flex: 0 0 auto;\\n  width: 24px;\\n  height: 24px;\\n  display: inline-flex;\\n  align-items: center;\\n  justify-content: center;\\n  padding: 0;\\n  border: 0;\\n  border-radius: 5px;\\n  background: transparent;\\n  color: inherit;\\n  font: inherit;\\n  font-size: 12px;\\n  line-height: 1;\\n  cursor: pointer;\\n}\\n.apexcharts-ink-btn:hover,\\n.apexcharts-ink-btn--active {\\n  background: var(--apx-ink-card-hover);\\n}\\n.apexcharts-ink-btn:focus-visible,\\n.apexcharts-ink-swatch:focus-visible {\\n  outline: 2px solid var(--apx-ink-card-accent);\\n  outline-offset: 1px;\\n}\\n.apexcharts-ink-btn--bold {\\n  font-weight: 700;\\n}\\n.apexcharts-ink-btn--delete:hover {\\n  color: #dc2626;\\n}\\n.apexcharts-ink-swatch {\\n  flex: 0 0 auto;\\n  width: 16px;\\n  height: 16px;\\n  padding: 0;\\n  border: 1px solid rgba(100, 116, 139, 0.45);\\n  border-radius: 50%;\\n  cursor: pointer;\\n}\\n.apexcharts-ink-swatch--active {\\n  box-shadow:\\n    0 0 0 2px var(--apx-ink-card-bg),\\n    0 0 0 4px var(--apx-ink-card-accent);\\n}\\n.apexcharts-ink-sep {\\n  flex: 0 0 auto;\\n  width: 1px;\\n  height: 16px;\\n  margin: 0 2px;\\n  background: var(--apx-ink-card-border);\\n}\\n.apexcharts-ink-cardlabel {\\n  flex: 0 0 auto;\\n  font-size: 10px;\\n  letter-spacing: 0.4px;\\n  text-transform: uppercase;\\n  opacity: 0.65;\\n  margin-right: 2px;\\n}\\n.apexcharts-ink-marker-size {\\n  flex: 0 0 auto;\\n  min-width: 16px;\\n  text-align: center;\\n  font-variant-numeric: tabular-nums;\\n}\\n\\n.apexcharts-legend-text {\\n  padding-left: 15px;\\n  margin-left: -15px;\\n}\\n\\n.apexcharts-legend-series[role=\"button\"]:focus {\\n  outline: 2px solid var(--apexcharts-focus-color, #008FFB);\\n  outline-offset: 2px;\\n}\\n\\n.apexcharts-legend-series[role=\"button\"]:focus:not(:focus-visible) {\\n  outline: none;\\n}\\n\\n.apexcharts-legend-series[role=\"button\"]:focus-visible {\\n  outline: 2px solid var(--apexcharts-focus-color, #008FFB);\\n  outline-offset: 2px;\\n}\\n\\n.apexcharts-series-collapsed {\\n  opacity: 0\\n}\\n\\n.apexcharts-canvas svg:focus:not(:focus-visible) {\\n  outline: none;\\n}\\n\\n/* Keyboard navigation focus indicator on SVG data elements.\\n   SVG elements don\\'t support CSS outline, so we use stroke. */\\n.apexcharts-bar-area.apexcharts-keyboard-focused,\\n.apexcharts-candlestick-area.apexcharts-keyboard-focused,\\n.apexcharts-boxPlot-area.apexcharts-keyboard-focused,\\n.apexcharts-rangebar-area.apexcharts-keyboard-focused,\\n.apexcharts-pie-area.apexcharts-keyboard-focused,\\n.apexcharts-heatmap-rect.apexcharts-keyboard-focused,\\n.apexcharts-treemap-rect.apexcharts-keyboard-focused {\\n  stroke: var(--apexcharts-focus-color, #008FFB);\\n  stroke-width: 2;\\n  stroke-opacity: 1;\\n}\\n\\n.apexcharts-tooltip {\\n  --apx-tt-bg: #ffffff;\\n  /* Shared by the body and the arrow\\'s two outward facets, so the\\n   * hairline reads as one continuous outline around the whole shape.\\n   * Keep it strong enough to survive on its own: the shadow below is\\n   * elevation, not edge definition. */\\n  --apx-tt-border: rgba(15, 23, 42, 0.12);\\n  /* Elevation, in three layers: a tight contact shadow that anchors the\\n   * bottom edge, a directional key shadow for the lift, and a wide\\n   * ambient one that grounds the whole box. Each is weaker and more\\n   * diffuse than the last.\\n   *\\n   * A tooltip is unusual in that it floats over *data*, so reach costs\\n   * more than it does on a page: every pixel the shadow travels tints a\\n   * bar or a line the reader is trying to compare. These numbers are\\n   * tuned to keep the near-edge contrast that reads as elevation while\\n   * dropping the long low haze that only muddies the plot.\\n   *\\n   * Note there is deliberately no `0 0 0 1px` ring layer. That used to\\n   * stand in for edge definition back when --apx-tt-border was barely\\n   * visible; now that the border is a real hairline (and the arrow\\n   * shares it) a ring only double-draws the outline, and being spread\\n   * rather than offset it leaked ink upward too, flattening the lift.\\n   *\\n   * `--apx-tt-shadow-dir` flips the whole stack\\'s Y in one place — see\\n   * the `[data-placement=\"bottom\"]` rule further down. */\\n  --apx-tt-shadow-dir: 1;\\n  --apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(15, 23, 42, 0.06), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(15, 23, 42, 0.10), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(15, 23, 42, 0.14);\\n  --apx-tt-arrow-bg: var(--apx-tt-bg);\\n  --apx-tt-color: #0f172a;\\n  --apx-tt-color-muted: rgba(15, 23, 42, 0.55);\\n  border-radius: 8px;\\n  background: var(--apx-tt-bg);\\n  border: 1px solid var(--apx-tt-border);\\n  box-shadow: var(--apx-tt-shadow);\\n  color: var(--apx-tt-color);\\n  cursor: default;\\n  font-size: 13px;\\n  left: 0;\\n  top: 0;\\n  opacity: 0;\\n  pointer-events: none;\\n  position: absolute;\\n  display: flex;\\n  flex-direction: column;\\n  padding: 2px 0;\\n  white-space: nowrap;\\n  z-index: 12;\\n  transition: opacity .12s ease\\n}\\n\\n/* While the tooltip is visible, smoothly animate position changes\\n * between data points. Kept short (160 ms) and ease-out so it stays\\n * responsive — too long would feel laggy when sweeping across many\\n * points fast. The position transition is only attached after the\\n * first paint (Position.applyTooltipPosition flips `data-positioned`\\n * once the tooltip has been placed) so the *first* show doesn\\'t slide\\n * the tooltip in from the previously-stale (0,0) coordinates. */\\n.apexcharts-tooltip.apexcharts-active {\\n  opacity: 1;\\n  transition: opacity .12s ease\\n}\\n.apexcharts-tooltip.apexcharts-active[data-positioned=\"true\"] {\\n  transition: opacity .12s ease, left .16s ease-out, top .16s ease-out\\n}\\n\\n.apexcharts-tooltip.apexcharts-theme-light {\\n  /* defaults already set above; class kept for backward-compat selectors */\\n}\\n\\n.apexcharts-tooltip.apexcharts-theme-dark {\\n  --apx-tt-bg: #1c1c1f;\\n  --apx-tt-border: rgba(255, 255, 255, 0.16);\\n  /* Dark needs more alpha than light to register at all, but not as much\\n   * as it used to: the light rim above now carries the edge, so the\\n   * shadow is free to be pure elevation instead of doubling as an\\n   * outline. Same geometry as light, heavier ink. */\\n  --apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(0, 0, 0, 0.24), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(0, 0, 0, 0.30), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(0, 0, 0, 0.38);\\n  --apx-tt-color: #f3f4f6;\\n  --apx-tt-color-muted: rgba(243, 244, 246, 0.55);\\n}\\n\\n.apexcharts-tooltip * {\\n  font-family: inherit\\n}\\n\\n/* Point-annotation hover tooltip (apexcharts/apexcharts.js#2424). Reuses the\\n * glass body/border/shadow from `.apexcharts-tooltip` but holds free-form\\n * content, so it needs its own padding, wrapping and a sane max width. */\\n.apexcharts-tooltip.apexcharts-annotation-tooltip {\\n  padding: 6px 10px;\\n  max-width: 240px;\\n  white-space: normal;\\n  line-height: 1.4;\\n  pointer-events: none;\\n  z-index: 13\\n}\\n\\n.apexcharts-tooltip-title {\\n  padding: 8px 12px 4px;\\n  font-size: 12px;\\n  font-weight: 600;\\n  letter-spacing: 0.01em;\\n  color: var(--apx-tt-color-muted);\\n  background: transparent;\\n  border-bottom: none;\\n  margin-bottom: 0\\n}\\n\\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,\\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\\n  background: transparent;\\n  border-bottom: none\\n}\\n\\n/* `fillSeriesColor`: each series-group already paints itself with the\\n * series colour. Drop the glass body entirely (transparent bg, no\\n * border, no backdrop-filter, no padding) and clip the coloured\\n * series-group(s) to the tooltip\\'s rounded corners so they fill the\\n * shell edge-to-edge. Text inside the coloured group is forced to\\n * white for contrast. */\\n.apexcharts-tooltip.apexcharts-tooltip-fill-series {\\n  background: transparent;\\n  -webkit-backdrop-filter: none;\\n  backdrop-filter: none;\\n  border: none;\\n  padding: 0;\\n  overflow: hidden;\\n  color: #fff\\n}\\n\\n.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title {\\n  background: rgba(0, 0, 0, 0.22);\\n  color: #fff;\\n  opacity: 1;\\n  padding: 6px 12px\\n}\\n\\n.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group {\\n  color: #fff\\n}\\n\\n/* Arrow connector — a 45°-rotated square straddling the body\\'s edge, so\\n * the body\\'s 1px border runs continuously out across the arrow and back.\\n * The two facets that face away from the tooltip carry the border; the\\n * two that face into it carry none, and the square\\'s opaque fill covers\\n * the segment of the body\\'s own border it sits on, hiding the seam.\\n *\\n * This is why it\\'s a rotated square and not a triangle: `clip-path`\\n * erases `border` and `box-shadow` along with everything outside the\\n * polygon, which left `filter: drop-shadow` as the only way to suggest\\n * an edge — and a drop-shadow can only ever blur one, never draw a\\n * hairline. Nothing here needs a filter.\\n *\\n * Geometry: a square of side S rotated 45° reaches S/√2 from its centre\\n * to each corner, so S = 10px gives the ~7px tip overhang that\\n * ARROW_TIP_OVERHANG assumes (tooltip/constants.js) over a ~14px base.\\n * The offsets park the square\\'s *centre* 1px outside the padding box\\n * (-6px = -1px border - 10px/2), i.e. exactly on the body\\'s border line,\\n * so the two borders meet end to end instead of overlapping or gapping.\\n * `box-sizing` must be border-box or the bordered sides would grow the\\n * square asymmetrically and knock its centre off that line. */\\n.apexcharts-tooltip-arrow {\\n  position: absolute;\\n  box-sizing: border-box;\\n  width: 10px;\\n  height: 10px;\\n  background: var(--apx-tt-arrow-bg);\\n  transform: rotate(45deg);\\n  pointer-events: none;\\n  top: calc(var(--apx-tt-arrow-y, 50%) - 5px)\\n}\\n\\n/* Which two sides face outward depends on the placement. Under\\n * `rotate(45deg)` the square\\'s bottom-left corner swings to the left,\\n * top-right to the right, top-left to the top and bottom-right to the\\n * bottom — so the pair of borders below is always the two sharing the\\n * corner that ends up as the tip. */\\n.apexcharts-tooltip[data-placement=\"right\"] .apexcharts-tooltip-arrow {\\n  left: -6px;\\n  border-left: 1px solid var(--apx-tt-border);\\n  border-bottom: 1px solid var(--apx-tt-border)\\n}\\n\\n.apexcharts-tooltip[data-placement=\"left\"] .apexcharts-tooltip-arrow {\\n  right: -6px;\\n  border-top: 1px solid var(--apx-tt-border);\\n  border-right: 1px solid var(--apx-tt-border)\\n}\\n\\n/* Vertical arrow variants: tooltip is above/below the data point and the\\n * arrow points down/up. The base rule above uses `--apx-tt-arrow-y` for\\n * left/right placement; for top/bottom we centre on `--apx-tt-arrow-x`\\n * instead (set by applyTooltipPosition). */\\n.apexcharts-tooltip[data-placement=\"top\"] .apexcharts-tooltip-arrow,\\n.apexcharts-tooltip[data-placement=\"bottom\"] .apexcharts-tooltip-arrow {\\n  top: auto;\\n  left: calc(var(--apx-tt-arrow-x, 50%) - 5px)\\n}\\n\\n.apexcharts-tooltip[data-placement=\"top\"] .apexcharts-tooltip-arrow {\\n  bottom: -6px;\\n  border-right: 1px solid var(--apx-tt-border);\\n  border-bottom: 1px solid var(--apx-tt-border)\\n}\\n\\n.apexcharts-tooltip[data-placement=\"bottom\"] .apexcharts-tooltip-arrow {\\n  top: -6px;\\n  border-top: 1px solid var(--apx-tt-border);\\n  border-left: 1px solid var(--apx-tt-border)\\n}\\n\\n/* When the tooltip is flipped below the data point, the default\\n * downward-biased shadow leaves its top edge undefined. Negating the\\n * direction casts the whole elevation upward instead, so the shadow\\n * falls between the tooltip and the mark above it. One multiplier flips\\n * all three layers together; the arrow needs no counterpart, since its\\n * border doesn\\'t depend on light direction. */\\n.apexcharts-tooltip[data-placement=\"bottom\"] {\\n  --apx-tt-shadow-dir: -1\\n}\\n\\n.apexcharts-tooltip-text-goals-value,\\n.apexcharts-tooltip-text-y-value,\\n.apexcharts-tooltip-text-z-value {\\n  display: inline-block;\\n  margin-left: 5px;\\n  font-weight: 600\\n}\\n\\n.apexcharts-tooltip-text-goals-label:empty,\\n.apexcharts-tooltip-text-goals-value:empty,\\n.apexcharts-tooltip-text-y-label:empty,\\n.apexcharts-tooltip-text-y-value:empty,\\n.apexcharts-tooltip-text-z-value:empty,\\n.apexcharts-tooltip-title:empty {\\n  display: none\\n}\\n\\n.apexcharts-tooltip-text-goals-label,\\n.apexcharts-tooltip-text-goals-value {\\n  padding: 6px 0 5px\\n}\\n\\n.apexcharts-tooltip-goals-group,\\n.apexcharts-tooltip-text-goals-label,\\n.apexcharts-tooltip-text-goals-value {\\n  display: flex\\n}\\n\\n.apexcharts-tooltip-text-goals-label:not(:empty),\\n.apexcharts-tooltip-text-goals-value:not(:empty) {\\n  margin-top: -6px\\n}\\n\\n.apexcharts-tooltip-marker {\\n  display: inline-flex;\\n  align-items: center;\\n  justify-content: center;\\n  position: relative;\\n  width: 12px;\\n  height: 12px;\\n  margin-right: 6px;\\n  vertical-align: middle;\\n  color: inherit;\\n}\\n\\n.apexcharts-tooltip-marker svg {\\n  width: 100%;\\n  height: 100%;\\n  display: block;\\n}\\n\\n.apexcharts-tooltip-series-group {\\n  padding: 4px 12px;\\n  display: none;\\n  gap: 8px;\\n  text-align: left;\\n  justify-content: left;\\n  align-items: center\\n}\\n\\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\\n  opacity: 1\\n}\\n\\n.apexcharts-tooltip-series-group.apexcharts-active:last-child,\\n.apexcharts-tooltip-series-group:last-child {\\n  padding-bottom: 8px\\n}\\n\\n.apexcharts-tooltip-y-group {\\n  padding: 6px 0 5px\\n}\\n\\n.apexcharts-custom-tooltip,\\n.apexcharts-tooltip-box {\\n  padding: 4px 8px\\n}\\n\\n.apexcharts-tooltip-boxPlot {\\n  display: flex;\\n  flex-direction: column-reverse\\n}\\n\\n.apexcharts-tooltip-box>div {\\n  margin: 4px 0\\n}\\n\\n.apexcharts-tooltip-box span.value {\\n  font-weight: 700\\n}\\n\\n.apexcharts-tooltip-rangebar {\\n  padding: 5px 8px\\n}\\n\\n.apexcharts-tooltip-rangebar .category {\\n  font-weight: 600;\\n  color: #777\\n}\\n\\n.apexcharts-tooltip-rangebar .series-name {\\n  font-weight: 700;\\n  display: block;\\n  margin-bottom: 5px\\n}\\n\\n/* X/Y axis tooltips — small popovers that label the crosshair on the\\n * axes. Restyled to match the modern data-tooltip palette: solid white\\n * body with a subtle border + soft drop-shadow, smaller font, rounded\\n * corners. The arrows still use the CSS border-triangle technique\\n * (cheap, crisp at small sizes); their colours flow from CSS variables\\n * so light/dark themes only need one override per axis. */\\n.apexcharts-xaxistooltip,\\n.apexcharts-yaxistooltip {\\n  --apx-axt-bg: #ffffff;\\n  --apx-axt-border: rgba(15, 23, 42, 0.08);\\n  --apx-axt-color: #0f172a;\\n  --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12);\\n  opacity: 0;\\n  pointer-events: none;\\n  color: var(--apx-axt-color);\\n  font-size: 12px;\\n  font-weight: 500;\\n  text-align: center;\\n  border-radius: 6px;\\n  position: absolute;\\n  z-index: 10;\\n  background: var(--apx-axt-bg);\\n  border: 1px solid var(--apx-axt-border);\\n  box-shadow: var(--apx-axt-shadow)\\n}\\n\\n.apexcharts-xaxistooltip.apexcharts-theme-dark,\\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\\n  --apx-axt-bg: #1c1c1f;\\n  --apx-axt-border: rgba(255, 255, 255, 0.1);\\n  --apx-axt-color: #f3f4f6;\\n  --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45)\\n}\\n\\n.apexcharts-xaxistooltip {\\n  padding: 4px 8px;\\n  transition: .15s ease all\\n}\\n\\n.apexcharts-xaxistooltip:after,\\n.apexcharts-xaxistooltip:before {\\n  left: 50%;\\n  border: solid transparent;\\n  content: \" \";\\n  height: 0;\\n  width: 0;\\n  position: absolute;\\n  pointer-events: none\\n}\\n\\n/* :before paints the 1px border outline of the triangle (slightly larger\\n * than :after); :after sits inside and paints the fill — leaves a 1px\\n * ring of :before visible at the edges. */\\n.apexcharts-xaxistooltip:after {\\n  border-color: transparent;\\n  border-width: 5px;\\n  margin-left: -5px\\n}\\n\\n.apexcharts-xaxistooltip:before {\\n  border-color: transparent;\\n  border-width: 6px;\\n  margin-left: -6px\\n}\\n\\n.apexcharts-xaxistooltip-bottom:after,\\n.apexcharts-xaxistooltip-bottom:before {\\n  bottom: 100%\\n}\\n\\n.apexcharts-xaxistooltip-top:after,\\n.apexcharts-xaxistooltip-top:before {\\n  top: 100%\\n}\\n\\n.apexcharts-xaxistooltip-bottom:after {\\n  border-bottom-color: var(--apx-axt-bg)\\n}\\n\\n.apexcharts-xaxistooltip-bottom:before {\\n  border-bottom-color: var(--apx-axt-border)\\n}\\n\\n.apexcharts-xaxistooltip-top:after {\\n  border-top-color: var(--apx-axt-bg)\\n}\\n\\n.apexcharts-xaxistooltip-top:before {\\n  border-top-color: var(--apx-axt-border)\\n}\\n\\n.apexcharts-xaxistooltip.apexcharts-active {\\n  opacity: 1;\\n  transition: .15s ease all\\n}\\n\\n.apexcharts-yaxistooltip {\\n  padding: 3px 8px\\n}\\n\\n.apexcharts-yaxistooltip:after,\\n.apexcharts-yaxistooltip:before {\\n  top: 50%;\\n  border: solid transparent;\\n  content: \" \";\\n  height: 0;\\n  width: 0;\\n  position: absolute;\\n  pointer-events: none\\n}\\n\\n.apexcharts-yaxistooltip:after {\\n  border-color: transparent;\\n  border-width: 5px;\\n  margin-top: -5px\\n}\\n\\n.apexcharts-yaxistooltip:before {\\n  border-color: transparent;\\n  border-width: 6px;\\n  margin-top: -6px\\n}\\n\\n.apexcharts-yaxistooltip-left:after,\\n.apexcharts-yaxistooltip-left:before {\\n  left: 100%\\n}\\n\\n.apexcharts-yaxistooltip-right:after,\\n.apexcharts-yaxistooltip-right:before {\\n  right: 100%\\n}\\n\\n.apexcharts-yaxistooltip-left:after {\\n  border-left-color: var(--apx-axt-bg)\\n}\\n\\n.apexcharts-yaxistooltip-left:before {\\n  border-left-color: var(--apx-axt-border)\\n}\\n\\n.apexcharts-yaxistooltip-right:after {\\n  border-right-color: var(--apx-axt-bg)\\n}\\n\\n.apexcharts-yaxistooltip-right:before {\\n  border-right-color: var(--apx-axt-border)\\n}\\n\\n.apexcharts-yaxistooltip.apexcharts-active {\\n  opacity: 1\\n}\\n\\n.apexcharts-yaxistooltip-hidden {\\n  display: none\\n}\\n\\n.apexcharts-xcrosshairs,\\n.apexcharts-ycrosshairs {\\n  pointer-events: none;\\n  opacity: 0;\\n  transition: .15s ease all\\n}\\n\\n.apexcharts-xcrosshairs.apexcharts-active,\\n.apexcharts-ycrosshairs.apexcharts-active {\\n  opacity: 1;\\n  transition: .15s ease all\\n}\\n\\n.apexcharts-ycrosshairs-hidden {\\n  opacity: 0\\n}\\n\\n.apexcharts-selection-rect {\\n  cursor: move\\n}\\n\\n.svg_select_shape {\\n  stroke-width: 1;\\n  stroke-dasharray: 10 10;\\n  stroke: black;\\n  stroke-opacity: 0.1;\\n  pointer-events: none;\\n  fill: none;\\n}\\n\\n.svg_select_handle {\\n  stroke-width: 3;\\n  stroke: black;\\n  fill: none;\\n}\\n\\n.svg_select_handle_r {\\n  cursor: e-resize;\\n}\\n\\n.svg_select_handle_l {\\n  cursor: w-resize;\\n}\\n\\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\\n  cursor: crosshair\\n}\\n\\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\\n  cursor: move\\n}\\n\\n.apexcharts-menu-icon,\\n.apexcharts-measure-icon,\\n.apexcharts-pan-icon,\\n.apexcharts-reset-icon,\\n.apexcharts-selection-icon,\\n.apexcharts-toolbar-custom-icon,\\n.apexcharts-zoom-icon,\\n.apexcharts-zoomin-icon,\\n.apexcharts-zoomout-icon {\\n  cursor: pointer;\\n  /* WCAG 2.5.8 Target Size (Minimum): 24×24 CSS px hit target. */\\n  width: 26px;\\n  height: 24px;\\n  line-height: 24px;\\n  color: #6e8192;\\n  text-align: center;\\n  /* Reset native <button> chrome — these are styled via SVG icons. */\\n  padding: 0;\\n  margin: 0;\\n  background: transparent;\\n  border: 0;\\n  border-radius: 5px;\\n  display: inline-flex;\\n  align-items: center;\\n  justify-content: center;\\n  transition: background-color .12s ease, color .12s ease;\\n}\\n\\n.apexcharts-menu-icon svg,\\n.apexcharts-measure-icon svg,\\n.apexcharts-pan-icon svg,\\n.apexcharts-reset-icon svg,\\n.apexcharts-selection-icon svg,\\n.apexcharts-zoom-icon svg,\\n.apexcharts-zoomin-icon svg,\\n.apexcharts-zoomout-icon svg {\\n  width: 18px;\\n  height: 18px;\\n  fill: none;\\n  stroke: currentColor;\\n  stroke-width: 2;\\n  stroke-linecap: round;\\n  stroke-linejoin: round\\n}\\n\\n.apexcharts-theme-dark .apexcharts-menu-icon,\\n.apexcharts-theme-dark .apexcharts-measure-icon,\\n.apexcharts-theme-dark .apexcharts-pan-icon,\\n.apexcharts-theme-dark .apexcharts-reset-icon,\\n.apexcharts-theme-dark .apexcharts-selection-icon,\\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,\\n.apexcharts-theme-dark .apexcharts-zoom-icon,\\n.apexcharts-theme-dark .apexcharts-zoomin-icon,\\n.apexcharts-theme-dark .apexcharts-zoomout-icon {\\n  color: #d4d6dc\\n}\\n\\n.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,\\n.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,\\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,\\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,\\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected {\\n  background: rgba(0, 143, 251, 0.12);\\n  color: #008ffb\\n}\\n\\n.apexcharts-theme-light .apexcharts-menu-icon:hover,\\n.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-light .apexcharts-reset-icon:hover,\\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover,\\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover {\\n  background: rgba(15, 23, 42, 0.06);\\n  color: #1f2937\\n}\\n\\n.apexcharts-theme-dark .apexcharts-menu-icon:hover,\\n.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-dark .apexcharts-reset-icon:hover,\\n.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,\\n.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,\\n.apexcharts-theme-dark .apexcharts-zoomout-icon:hover {\\n  background: rgba(255, 255, 255, 0.08);\\n  color: #fff\\n}\\n\\n.apexcharts-menu-icon,\\n.apexcharts-selection-icon {\\n  position: relative\\n}\\n\\n.apexcharts-toolbar {\\n  position: absolute;\\n  z-index: 11;\\n  display: inline-flex;\\n  align-items: center;\\n  gap: 1px;\\n  padding: 3px;\\n  border-radius: 8px;\\n  background: rgba(255, 255, 255, 0.85);\\n  backdrop-filter: blur(8px);\\n  -webkit-backdrop-filter: blur(8px);\\n}\\n\\n.apexcharts-theme-dark .apexcharts-toolbar {\\n  background: rgba(28, 28, 31, 0.82);\\n}\\n\\n.apexcharts-menu {\\n  background: rgba(255, 255, 255, 0.95);\\n  backdrop-filter: blur(8px);\\n  -webkit-backdrop-filter: blur(8px);\\n  position: absolute;\\n  top: calc(100% + 4px);\\n  border: 1px solid rgba(15, 23, 42, 0.08);\\n  border-radius: 8px;\\n  padding: 4px;\\n  right: 0;\\n  opacity: 0;\\n  min-width: 120px;\\n  transition: opacity .15s ease, transform .15s ease;\\n  transform: translateY(-2px);\\n  pointer-events: none;\\n  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06)\\n}\\n\\n.apexcharts-menu.apexcharts-menu-open {\\n  opacity: 1;\\n  transform: translateY(0);\\n  pointer-events: all\\n}\\n\\n.apexcharts-menu-item {\\n  padding: 6px 9px;\\n  font-size: 12px;\\n  border-radius: 5px;\\n  cursor: pointer\\n}\\n\\n.apexcharts-theme-light .apexcharts-menu-item:hover {\\n  background: rgba(15, 23, 42, 0.06)\\n}\\n\\n.apexcharts-theme-dark .apexcharts-menu {\\n  background: rgba(28, 28, 31, 0.92);\\n  border-color: rgba(255, 255, 255, 0.08);\\n  color: #f3f4f6;\\n  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4)\\n}\\n\\n.apexcharts-theme-dark .apexcharts-menu-item:hover {\\n  background: rgba(255, 255, 255, 0.08)\\n}\\n\\n@media screen and (min-width:768px) {\\n  .apexcharts-canvas:hover .apexcharts-toolbar {\\n    opacity: 1\\n  }\\n}\\n\\n/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */\\n.apexcharts-toolbar:focus-within {\\n  opacity: 1\\n}\\n\\n/* Focus indicator for toolbar icon buttons */\\n.apexcharts-menu-icon:focus-visible,\\n.apexcharts-measure-icon:focus-visible,\\n.apexcharts-pan-icon:focus-visible,\\n.apexcharts-reset-icon:focus-visible,\\n.apexcharts-selection-icon:focus-visible,\\n.apexcharts-toolbar-custom-icon:focus-visible,\\n.apexcharts-zoom-icon:focus-visible,\\n.apexcharts-zoomin-icon:focus-visible,\\n.apexcharts-zoomout-icon:focus-visible {\\n  outline: 2px solid var(--apexcharts-focus-color, #008FFB);\\n  outline-offset: 1px;\\n  border-radius: 5px\\n}\\n\\n/* Focus indicator for hamburger menu items */\\n.apexcharts-menu-item:focus-visible {\\n  outline: 2px solid var(--apexcharts-focus-color, #008FFB);\\n  outline-offset: -2px;\\n  background: #eee\\n}\\n\\n.apexcharts-canvas .apexcharts-element-hidden,\\n.apexcharts-datalabel.apexcharts-element-hidden,\\n.apexcharts-hide .apexcharts-series-points {\\n  opacity: 0;\\n}\\n\\n.apexcharts-hidden-element-shown {\\n  opacity: 1;\\n  transition: 0.25s ease all;\\n}\\n\\n.apexcharts-datalabel,\\n.apexcharts-datalabel-label,\\n.apexcharts-datalabel-value,\\n.apexcharts-datalabels,\\n.apexcharts-pie-label,\\n.apexcharts-pie-name-label,\\n.apexcharts-pie-name-label-group,\\n.apexcharts-pie-label-connector,\\n.apexcharts-unit-outer-label,\\n.apexcharts-unit-outer-label-group,\\n.apexcharts-unit-label-connector {\\n  cursor: default;\\n  pointer-events: none\\n}\\n\\n.apexcharts-pie-label-connector,\\n.apexcharts-unit-label-connector {\\n  fill: none\\n}\\n\\n.apexcharts-pie-label-delay,\\n.apexcharts-unit-label-delay {\\n  opacity: 0;\\n  animation-name: opaque;\\n  animation-duration: .3s;\\n  animation-fill-mode: forwards;\\n  animation-timing-function: ease\\n}\\n\\n/* Slower than the pie\\'s, on purpose: these come in while the dots are still\\n   easing into place, so a longer fade reads as arriving WITH the crowd. */\\n.apexcharts-unit-label-delay {\\n  animation-duration: .5s\\n}\\n\\n.apexcharts-radialbar-label {\\n  cursor: pointer;\\n}\\n\\n.apexcharts-annotation-rect,\\n.apexcharts-area-series .apexcharts-area,\\n.apexcharts-gridline,\\n.apexcharts-line,\\n.apexcharts-point-annotation-label,\\n.apexcharts-radar-series path:not(.apexcharts-marker),\\n.apexcharts-radar-series polygon,\\n.apexcharts-toolbar svg,\\n.apexcharts-tooltip .apexcharts-marker,\\n.apexcharts-xaxis-annotation-label,\\n.apexcharts-yaxis-annotation-label,\\n.apexcharts-zoom-rect,\\n.no-pointer-events {\\n  pointer-events: none\\n}\\n\\n.apexcharts-tooltip-active .apexcharts-marker {\\n  transition: .15s ease all\\n}\\n\\n.apexcharts-radar-series .apexcharts-yaxis {\\n  pointer-events: none;\\n}\\n\\n.resize-triggers {\\n  animation: 1ms resizeanim;\\n  visibility: hidden;\\n  opacity: 0;\\n  height: 100%;\\n  width: 100%;\\n  overflow: hidden\\n}\\n\\n.contract-trigger:before,\\n.resize-triggers,\\n.resize-triggers>div {\\n  content: \" \";\\n  display: block;\\n  position: absolute;\\n  top: 0;\\n  left: 0\\n}\\n\\n.resize-triggers>div {\\n  height: 100%;\\n  width: 100%;\\n  background: #eee;\\n  overflow: auto\\n}\\n\\n.contract-trigger:before {\\n  overflow: hidden;\\n  width: 200%;\\n  height: 200%\\n}\\n\\n.apexcharts-bar-goals-markers {\\n  pointer-events: none\\n}\\n\\n.apexcharts-bar-shadows {\\n  pointer-events: none\\n}\\n\\n.apexcharts-rangebar-goals-markers {\\n  pointer-events: none\\n}\\n\\n.apexcharts-drilldown-target {\\n  cursor: pointer\\n}\\n\\n.apexcharts-breadcrumb {\\n  position: absolute;\\n  z-index: 11;\\n  display: inline-flex;\\n  align-items: center;\\n  gap: 2px;\\n  font-size: 12px;\\n  font-family: inherit;\\n  padding: 2px 4px\\n}\\n\\n.apexcharts-breadcrumb-item {\\n  background: transparent;\\n  border: none;\\n  padding: 2px 6px;\\n  border-radius: 3px;\\n  font: inherit;\\n  color: inherit;\\n  cursor: pointer;\\n  line-height: 1.2\\n}\\n\\n.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {\\n  background: rgba(0, 0, 0, 0.08)\\n}\\n\\n.apexcharts-breadcrumb-arrow {\\n  margin-right: 4px;\\n  font-weight: 600;\\n  user-select: none\\n}\\n\\n.apexcharts-breadcrumb-current {\\n  cursor: default;\\n  font-weight: 600;\\n  opacity: 0.85\\n}\\n\\n.apexcharts-breadcrumb-separator {\\n  opacity: 0.5;\\n  user-select: none\\n}\\n\\n.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {\\n  background: rgba(255, 255, 255, 0.12)\\n}\\n\\n.apexcharts-drilldown-loading {\\n  position: absolute;\\n  inset: 0;\\n  z-index: 12;\\n  display: flex;\\n  align-items: center;\\n  justify-content: center;\\n  gap: 10px;\\n  font-size: 13px;\\n  font-family: inherit;\\n  color: inherit;\\n  background: rgba(255, 255, 255, 0.62);\\n  /* The chart underneath stays interactive-looking but must not take clicks\\n     while a level is resolving, or a second drill can start mid-fetch. */\\n  cursor: progress\\n}\\n\\n.apexcharts-drilldown-loading-spinner {\\n  width: 26px;\\n  height: 26px;\\n  border-radius: 50%;\\n  border: 2.5px solid rgba(0, 0, 0, 0.16);\\n  border-top-color: rgba(0, 0, 0, 0.55);\\n  animation: apexcharts-drilldown-spin 0.7s linear infinite\\n}\\n\\n.apexcharts-drilldown-loading-text {\\n  opacity: 0.8\\n}\\n\\n.apexcharts-theme-dark .apexcharts-drilldown-loading {\\n  background: rgba(30, 30, 30, 0.62)\\n}\\n\\n.apexcharts-theme-dark .apexcharts-drilldown-loading-spinner {\\n  border-color: rgba(255, 255, 255, 0.22);\\n  border-top-color: rgba(255, 255, 255, 0.7)\\n}\\n\\n@keyframes apexcharts-drilldown-spin {\\n  to {\\n    transform: rotate(360deg)\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .apexcharts-drilldown-loading-spinner {\\n    animation: apexcharts-drilldown-pulse 1.4s ease-in-out infinite\\n  }\\n\\n  @keyframes apexcharts-drilldown-pulse {\\n    0%, 100% {\\n      opacity: 0.35\\n    }\\n\\n    50% {\\n      opacity: 1\\n    }\\n  }\\n}\\n\\n.apexcharts-disable-transitions * {\\n  transition: none !important;\\n}';\nconst e = globalThis.console;\nfunction t(t2) {\n  e.error(t2);\n}\nfunction s(t2) {\n  e.warn(t2);\n}\nconst i = \"APEX-\", n = /* @__PURE__ */ new Date(\"2027-07-31T00:00:00Z\"), r = \"__apex_license_v1__\";\nfunction a() {\n  const e2 = globalThis;\n  let t2 = e2[r];\n  return t2 || (t2 = { key: null, listeners: /* @__PURE__ */ new Set(), result: null }, e2[r] = t2), t2;\n}\nconst l = class {\n  static get licenseKey() {\n    return a().key;\n  }\n  static set licenseKey(e2) {\n    a().key = e2;\n  }\n  static get listeners() {\n    return a().listeners;\n  }\n  static get validationResult() {\n    return a().result;\n  }\n  static set validationResult(e2) {\n    a().result = e2;\n  }\n  static getKey() {\n    return this.licenseKey;\n  }\n  static getLicenseStatus() {\n    return this.licenseKey ? (this.validationResult = this.validateKey(this.licenseKey), this.validationResult) : { expired: false, signatureVerified: false, valid: false };\n  }\n  static isKeyValid(e2) {\n    return !!e2 && this.validateKey(e2).valid;\n  }\n  static isLicenseValid() {\n    return this.getLicenseStatus().valid;\n  }\n  static onChange(e2) {\n    return this.listeners.add(e2), () => {\n      this.listeners.delete(e2);\n    };\n  }\n  static setLicense(e2) {\n    var _a;\n    var i2;\n    if (!e2) return this.licenseKey = null, void this.publish({ expired: false, signatureVerified: false, valid: false });\n    const n2 = this.validateKey(e2);\n    n2.valid || e2 === this.licenseKey || !(null == (i2 = this.validationResult) ? void 0 : i2.valid) ? (this.licenseKey = e2, this.publish(n2), n2.valid || t(`[Apex] ${n2.message}`)) : s(`[Apex] Ignoring license key: ${(_a = n2.message) != null ? _a : \"it is not valid\"} A valid license is already active on this page.`);\n  }\n  static validateKey(e2) {\n    const t2 = this.parseKey(e2), s2 = this.validateStructure(e2, t2);\n    if (!s2.valid || !(null == t2 ? void 0 : t2.signature)) return s2;\n    const i2 = this.verdicts.get(e2);\n    return false === i2 ? { data: t2.data, expired: false, message: \"Invalid license key. The license signature does not verify.\", signatureVerified: true, valid: false } : (void 0 === i2 && this.verifySignature(e2, t2, s2), __spreadProps(__spreadValues({}, s2), { signatureVerified: true === i2 }));\n  }\n  static _resetSignatureState() {\n    this.verdicts.clear(), this.verifying.clear(), this.warnedUnverifiable = false, this.epoch++;\n  }\n  static base64ToBytes(e2) {\n    const t2 = e2.replace(/-/g, \"+\").replace(/_/g, \"/\"), s2 = t2.padEnd(4 * Math.ceil(t2.length / 4), \"=\"), i2 = globalThis.atob;\n    if (\"function\" != typeof i2) throw new Error(\"no base64 decoder available\");\n    const n2 = i2(s2), r2 = new Uint8Array(n2.length);\n    for (let e3 = 0; e3 < n2.length; e3++) r2[e3] = n2.charCodeAt(e3);\n    return r2;\n  }\n  static canonicalPayload(e2) {\n    const t2 = e2.domains && e2.domains.length > 0 ? e2.domains.join(\",\") : \"\";\n    return `v1|${e2.issueDate}|${e2.expiryDate}|${e2.plan}|${t2}`;\n  }\n  static notify(e2) {\n    for (const t2 of this.listeners) try {\n      t2(e2);\n    } catch (e3) {\n    }\n  }\n  static parseKey(e2) {\n    if (\"string\" != typeof e2 || !e2.startsWith(i)) return null;\n    const t2 = e2.slice(5);\n    if (!t2) return null;\n    try {\n      const e3 = new TextDecoder().decode(this.base64ToBytes(t2)), s2 = JSON.parse(e3);\n      return s2.issueDate && s2.expiryDate && s2.plan ? { data: { domains: Array.isArray(s2.domains) ? s2.domains : void 0, expiryDate: s2.expiryDate, issueDate: s2.issueDate, plan: s2.plan, valid: true }, signature: \"string\" == typeof s2.sig && s2.sig ? s2.sig : null } : null;\n    } catch (e3) {\n      return null;\n    }\n  }\n  static publish(e2) {\n    this.validationResult = e2, this.notify(e2);\n  }\n  static validateStructure(e2, t2) {\n    const s2 = (e3) => ({ expired: false, message: e3, signatureVerified: false, valid: false });\n    if (\"string\" != typeof e2 || !e2.startsWith(i)) return s2('Invalid license key format. License key must start with \"APEX-\".');\n    if (!t2) return s2(\"Invalid license key. Unable to decode license data.\");\n    const { data: r2, signature: a2 } = t2;\n    if (!a2 && /* @__PURE__ */ new Date() >= n) return s2(\"This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.\");\n    if (new Date(r2.expiryDate) < /* @__PURE__ */ new Date()) return { data: r2, expired: true, message: `License expired on ${r2.expiryDate}. Please renew your license.`, signatureVerified: false, valid: false };\n    if (r2.domains && r2.domains.length > 0) {\n      const e3 = \"undefined\" == typeof location ? \"\" : location.hostname;\n      if (!r2.domains.some(((t3) => e3 === t3 || e3.endsWith(`.${t3}`)))) return { data: r2, expired: false, message: `License is not valid for this domain (${e3}). Allowed domains: ${r2.domains.join(\", \")}.`, signatureVerified: false, valid: false };\n    }\n    return { data: r2, expired: false, signatureVerified: false, valid: true };\n  }\n  static verifySignature(e2, i2, n2) {\n    return __async(this, null, function* () {\n      var r2;\n      if (this.verifying.has(e2) || this.verdicts.has(e2)) return;\n      this.verifying.add(e2);\n      const a2 = this.epoch, l2 = null == (r2 = globalThis.crypto) ? void 0 : r2.subtle;\n      if (!l2 || 0 === this.publicKeysSpki.length) return this.verifying.delete(e2), void (this.warnedUnverifiable || (this.warnedUnverifiable = true, s(l2 ? \"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.\" : \"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.\")));\n      const o2 = new TextEncoder().encode(this.canonicalPayload(i2.data));\n      let c2 = false;\n      for (const e3 of this.publicKeysSpki) {\n        try {\n          const t2 = yield l2.importKey(\"spki\", this.base64ToBytes(e3), { name: \"ECDSA\", namedCurve: \"P-256\" }, false, [\"verify\"]);\n          c2 = yield l2.verify({ hash: \"SHA-256\", name: \"ECDSA\" }, t2, this.base64ToBytes(i2.signature), o2);\n        } catch (e4) {\n          c2 = false;\n        }\n        if (c2) break;\n      }\n      if (this.verifying.delete(e2), this.epoch !== a2) return;\n      if (this.verdicts.set(e2, c2), c2) {\n        const t2 = __spreadProps(__spreadValues({}, n2), { signatureVerified: true });\n        return void (this.licenseKey === e2 ? this.publish(t2) : this.notify(t2));\n      }\n      const h2 = \"Invalid license key. The license signature does not verify.\", d = { data: i2.data, expired: false, message: h2, signatureVerified: true, valid: false };\n      this.licenseKey === e2 ? this.publish(d) : this.notify(d), t(`[Apex] ${h2}`);\n    });\n  }\n};\nl.publicKeysSpki = [\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA==\"], l.verdicts = /* @__PURE__ */ new Map(), l.verifying = /* @__PURE__ */ new Set(), l.warnedUnverifiable = false, l.epoch = 0;\nlet o = l;\nconst c = class {\n  static applyStyles(e2) {\n    Object.assign(e2.style, this.CRITICAL_STYLES, { backgroundImage: this.createWatermarkPattern(), backgroundRepeat: \"repeat\" });\n  }\n  static node(e2) {\n    return e2 ? e2.querySelector(`[${this.WATERMARK_ATTR}]`) : null;\n  }\n  static add(e2, t2) {\n    return e2 && \"undefined\" != typeof document ? (this.setManaged(e2, t2), this.paint(e2)) : null;\n  }\n  static exists(e2) {\n    return !!this.node(e2);\n  }\n  static remove(e2, t2) {\n    e2 && (this.setManaged(e2, t2), this.erase(e2));\n  }\n  static untrack(e2) {\n    this.managed.delete(e2);\n  }\n  static createWatermarkPattern() {\n    const e2 = this.WATERMARK_TEXT;\n    return `url(\"data:image/svg+xml,${encodeURIComponent(`\n      <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"300\" height=\"200\">\n        <text\n          x=\"50%\"\n          y=\"50%\"\n          dominant-baseline=\"middle\"\n          text-anchor=\"middle\"\n          font-family=\"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif\"\n          font-size=\"18\"\n          font-weight=\"600\"\n          fill=\"rgba(134, 134, 134, 0.1)\"\n          transform=\"rotate(-35, 100, 60)\"\n        >${e2}</text>\n      </svg>\n    `.trim())}\")`;\n  }\n  static erase(e2) {\n    var t2;\n    null == (t2 = this.node(e2)) || t2.remove();\n  }\n  static paint(e2) {\n    let t2 = this.node(e2);\n    return t2 || (t2 = document.createElement(\"div\"), t2.setAttribute(this.WATERMARK_ATTR, \"\"), e2.appendChild(t2)), this.applyStyles(t2), \"function\" == typeof getComputedStyle && \"static\" === getComputedStyle(e2).position && (e2.style.position = \"relative\"), t2;\n  }\n  static reconcile() {\n    const e2 = o.isLicenseValid();\n    for (const t2 of this.managed) t2.isConnected ? e2 ? this.erase(t2) : this.paint(t2) : this.managed.delete(t2);\n  }\n  static setManaged(e2, t2) {\n    false !== (null == t2 ? void 0 : t2.manage) ? this.track(e2) : this.managed.delete(e2);\n  }\n  static track(e2) {\n    this.managed.add(e2), this.subscribed || (this.subscribed = true, o.onChange((() => {\n      this.reconcile();\n    })));\n  }\n};\nc.WATERMARK_ATTR = \"data-apexcharts-watermark\", c.WATERMARK_TEXT = \"APEXCHARTS\", c.ATTR = \"data-apexcharts-watermark\", c.CRITICAL_STYLES = { bottom: \"0\", display: \"block\", left: \"0\", msUserSelect: \"none\", opacity: \"1\", pointerEvents: \"none\", position: \"absolute\", right: \"0\", top: \"0\", userSelect: \"none\", visibility: \"visible\", webkitUserSelect: \"none\", zIndex: \"10000\" }, c.managed = /* @__PURE__ */ new Set(), c.subscribed = false;\nlet h = c;\nconst p = 0.05, m = 0.05, g = 1 / 45;\nfunction v(e2, t2, s2, i2) {\n  const n2 = { value: e2, velocity: 0, target: e2, stiffness: t2, damping: s2 };\n  return n2;\n}\nfunction b(e2, t2) {\n  if (t2 <= 0) return M(e2);\n  let s2 = t2;\n  for (; s2 > 0; ) {\n    const t3 = Math.min(s2, g), i2 = -e2.stiffness * (e2.value - e2.target) - e2.damping * e2.velocity;\n    e2.velocity += i2 * t3, e2.value += e2.velocity * t3, s2 -= t3;\n  }\n  return !!M(e2) && (e2.value = e2.target, e2.velocity = 0, true);\n}\nfunction w(e2, t2) {\n  e2.target = t2;\n}\nfunction M(e2) {\n  var _a, _b;\n  const t2 = (_a = e2.restVelocity) != null ? _a : p, s2 = (_b = e2.restDisplacement) != null ? _b : m;\n  return Math.abs(e2.velocity) < t2 && Math.abs(e2.value - e2.target) < s2;\n}\nconst S = { crisp: [210, 26], gentle: [120, 20], snappy: [320, 30] };\nfunction L(e2) {\n  var _a;\n  return (_a = S[e2 != null ? e2 : \"crisp\"]) != null ? _a : S.crisp;\n}\nconst X = \"__apexcharts_crossfilters__\";\nfunction Y(e2) {\n  if (!Number.isFinite(e2)) return e2;\n  const t2 = Number(e2.toPrecision(12));\n  return Object.is(t2, -0) ? 0 : t2;\n}\nfunction Z(e2) {\n  return \"number\" == typeof e2 && Number.isFinite(e2);\n}\nfunction J(e2) {\n  if (\"function\" == typeof e2) return e2;\n  if (e2 && \"object\" == typeof e2) {\n    if (\"string\" == typeof e2.sum) {\n      const t2 = e2.sum;\n      return (e3) => e3.reduce(((e4, s2) => e4 + (Number(s2[t2]) || 0)), 0);\n    }\n    if (\"string\" == typeof e2.avg) {\n      const t2 = e2.avg;\n      return (e3) => e3.length ? e3.reduce(((e4, s2) => e4 + (Number(s2[t2]) || 0)), 0) / e3.length : 0;\n    }\n    if (\"string\" == typeof e2.min) {\n      const t2 = e2.min;\n      return (e3) => e3.length ? Math.min(...e3.map(((e4) => Number(e4[t2]) || 0))) : 0;\n    }\n    if (\"string\" == typeof e2.max) {\n      const t2 = e2.max;\n      return (e3) => e3.length ? Math.max(...e3.map(((e4) => Number(e4[t2]) || 0))) : 0;\n    }\n  }\n  return (e3) => e3.length;\n}\nfunction G(e2, t2) {\n  return \"function\" == typeof t2 ? e2.slice().sort(t2) : \"asc\" === t2 ? e2.slice().sort(((e3, t3) => e3 > t3 ? 1 : e3 < t3 ? -1 : 0)) : \"desc\" === t2 ? e2.slice().sort(((e3, t3) => e3 < t3 ? 1 : e3 > t3 ? -1 : 0)) : e2;\n}\nfunction ee(e2, t2) {\n  if (!Z(e2)) return -1;\n  const s2 = t2.length - 1;\n  if (e2 < t2[0] || e2 > t2[s2]) return -1;\n  if (e2 === t2[s2]) return s2 - 1;\n  for (let i2 = 0; i2 < s2; i2++) if (e2 >= t2[i2] && e2 < t2[i2 + 1]) return i2;\n  return -1;\n}\nfunction te(e2) {\n  const t2 = [];\n  for (let s2 = 0; s2 < e2.length - 1; s2++) t2.push(Y((e2[s2] + e2[s2 + 1]) / 2));\n  return t2;\n}\nclass se {\n  constructor(e2, t2) {\n    this.dims = /* @__PURE__ */ new Map(), this.listeners = /* @__PURE__ */ new Map(), this.id = e2, this.records = Array.isArray(t2) ? t2 : [];\n  }\n  static store() {\n    const e2 = globalThis;\n    return e2[X] || (e2[X] = /* @__PURE__ */ new Map()), e2[X];\n  }\n  static getOrCreate(e2) {\n    if (!e2 || \"string\" != typeof e2.id) throw new Error(\"Crossfilter.getOrCreate requires an { id } string.\");\n    const t2 = se.store(), s2 = t2.get(e2.id);\n    if (s2) return e2.records && s2.setRecords(e2.records), s2;\n    const i2 = new se(e2.id, e2.records);\n    return t2.set(e2.id, i2), i2;\n  }\n  static get(e2) {\n    return se.store().get(e2) || null;\n  }\n  setRecords(e2) {\n    return this.records = Array.isArray(e2) ? e2 : [], this.dims.forEach(((e3) => this.recomputeDomain(e3))), this.emit(\"records\", this.state()), this.emit(\"change\", this.state()), this;\n  }\n  registerDimension(e2, t2) {\n    if (!t2 || \"function\" != typeof t2.dimension) throw new Error(`crossfilter.registerDimension(\"${e2}\") needs a dimension function.`);\n    const s2 = t2.type || (t2.bins ? \"range\" : \"category\"), i2 = { accessor: t2.dimension, reducer: J(t2.reduce), type: s2, bins: t2.bins, order: t2.order, filter: null, labels: [], edges: null, xLabels: [], yLabels: [] };\n    return this.dims.set(e2, i2), this.recomputeDomain(i2), null != t2.filter && this.setFilterOn(i2, t2.filter), this;\n  }\n  hasDimension(e2) {\n    return this.dims.has(e2);\n  }\n  removeDimension(e2) {\n    const t2 = this.dims.get(e2), s2 = !!t2 && this.hasFilter(t2);\n    return this.dims.delete(e2), s2 && this.emit(\"change\", this.state()), this;\n  }\n  recomputeDomain(e2) {\n    if (\"matrix\" === e2.type) {\n      const t2 = (function(e3, t3, s2) {\n        const i2 = /* @__PURE__ */ new Set(), n2 = /* @__PURE__ */ new Set(), r2 = [], a2 = [];\n        for (let s3 = 0; s3 < e3.length; s3++) {\n          const l2 = t3(e3[s3]);\n          if (!l2) continue;\n          const o2 = l2[0], c2 = l2[1];\n          null == o2 || i2.has(o2) || (i2.add(o2), r2.push(o2)), null == c2 || n2.has(c2) || (n2.add(c2), a2.push(c2));\n        }\n        return { xLabels: G(r2, s2), yLabels: G(a2, s2) };\n      })(this.records, e2.accessor, e2.order);\n      return e2.xLabels = t2.xLabels, e2.yLabels = t2.yLabels, void (e2.edges = null);\n    }\n    if (\"range\" === e2.type) return e2.edges = (function(e3, t2, s2) {\n      if (s2 && Array.isArray(s2.thresholds) && s2.thresholds.length >= 2) {\n        const e4 = Array.from(new Set(s2.thresholds.filter(Z))).sort(((e5, t3) => e5 - t3));\n        return e4.length >= 2 ? e4.map(Y) : [0, 1];\n      }\n      let i2 = 1 / 0, n2 = -1 / 0;\n      for (let s3 = 0; s3 < e3.length; s3++) {\n        const r3 = t2(e3[s3]);\n        Z(r3) && (r3 < i2 && (i2 = r3), r3 > n2 && (n2 = r3));\n      }\n      if (i2 === 1 / 0) return [0, 1];\n      if (i2 === n2) {\n        const e4 = Math.abs(i2) > 0 ? Math.abs(i2) : 1;\n        return [Y(i2), Y(i2 + e4)];\n      }\n      if (s2 && Z(s2.width) && s2.width > 0) {\n        const e4 = s2.width, t3 = Math.floor(i2 / e4) * e4;\n        let r3 = Math.ceil(n2 / e4) * e4;\n        r3 <= t3 && (r3 = t3 + e4);\n        const a3 = Math.max(1, Math.round((r3 - t3) / e4)), l3 = new Array(a3 + 1);\n        for (let s3 = 0; s3 <= a3; s3++) l3[s3] = Y(t3 + s3 * e4);\n        return l3;\n      }\n      const r2 = s2 && Z(s2.count) && s2.count >= 1 ? Math.floor(s2.count) : 30, a2 = (n2 - i2) / r2, l2 = new Array(r2 + 1);\n      for (let e4 = 0; e4 <= r2; e4++) l2[e4] = Y(i2 + e4 * a2);\n      return l2[r2] = Y(n2), l2;\n    })(this.records, e2.accessor, e2.bins), void (e2.labels = te(e2.edges));\n    if (e2.labels = (function(e3, t2, s2) {\n      const i2 = /* @__PURE__ */ new Set(), n2 = [];\n      for (let s3 = 0; s3 < e3.length; s3++) {\n        const r2 = t2(e3[s3]);\n        null != r2 && (i2.has(r2) || (i2.add(r2), n2.push(r2)));\n      }\n      return G(n2, s2);\n    })(this.records, e2.accessor, e2.order), e2.edges = null, e2.filter instanceof Set) {\n      const t2 = new Set(e2.labels);\n      Array.from(e2.filter).forEach(((s2) => {\n        t2.has(s2) || e2.filter.delete(s2);\n      }));\n    }\n  }\n  filter(e2, t2) {\n    const s2 = this.dims.get(e2);\n    return s2 ? (this.setFilterOn(s2, t2), this.emit(\"change\", this.state()), this) : this;\n  }\n  toggleKey(e2, t2) {\n    const s2 = this.dims.get(e2);\n    if (!s2 || \"category\" !== s2.type) return this;\n    s2.filter instanceof Set || (s2.filter = /* @__PURE__ */ new Set());\n    const i2 = s2.filter;\n    return i2.has(t2) ? i2.delete(t2) : i2.add(t2), 0 === i2.size && (s2.filter = null), this.emit(\"change\", this.state()), this;\n  }\n  setFilterOn(e2, t2) {\n    if (null == t2) return void (e2.filter = null);\n    if (\"range\" === e2.type) {\n      if (Array.isArray(t2) && 2 === t2.length && t2.every(Z)) {\n        const [s3, i2] = t2;\n        e2.filter = [Math.min(s3, i2), Math.max(s3, i2)];\n      } else e2.filter = null;\n      return;\n    }\n    const s2 = new Set(t2);\n    e2.filter = s2.size ? s2 : null;\n  }\n  clear(e2) {\n    const t2 = this.dims.get(e2);\n    return t2 && (t2.filter = null), this.emit(\"change\", this.state()), this;\n  }\n  reset() {\n    return this.dims.forEach(((e2) => {\n      e2.filter = null;\n    })), this.emit(\"change\", this.state()), this;\n  }\n  hasFilter(e2) {\n    return null != e2.filter && (!(e2.filter instanceof Set) || e2.filter.size > 0);\n  }\n  passes(e2, t2) {\n    if (!this.hasFilter(e2)) return true;\n    const s2 = e2.accessor(t2);\n    if (e2.filter instanceof Set) return e2.filter.has(s2);\n    if (!Z(s2)) return false;\n    const [i2, n2] = e2.filter;\n    return s2 >= i2 && s2 <= n2;\n  }\n  filteredRecords(e2) {\n    const t2 = [];\n    return this.dims.forEach(((s2, i2) => {\n      i2 !== e2 && this.hasFilter(s2) && t2.push(s2);\n    })), 0 === t2.length ? this.records : this.records.filter(((e3) => t2.every(((t3) => this.passes(t3, e3)))));\n  }\n  filteredRows() {\n    return this.filteredRecords(null);\n  }\n  aggregateFor(e2) {\n    const t2 = this.dims.get(e2);\n    if (!t2) return { type: \"category\", labels: [], values: [], keys: [] };\n    const s2 = this.filteredRecords(e2);\n    if (\"matrix\" === t2.type) {\n      const e3 = new Map(t2.xLabels.map(((e4, t3) => [e4, t3]))), i3 = new Map(t2.yLabels.map(((e4, t3) => [e4, t3]))), n2 = t2.yLabels.map((() => t2.xLabels.map((() => []))));\n      for (let r2 = 0; r2 < s2.length; r2++) {\n        const a2 = t2.accessor(s2[r2]);\n        if (!a2) continue;\n        const l2 = e3.get(a2[0]), o2 = i3.get(a2[1]);\n        null != l2 && null != o2 && n2[o2][l2].push(s2[r2]);\n      }\n      return { type: \"matrix\", xLabels: t2.xLabels.slice(), yLabels: t2.yLabels.slice(), matrix: n2.map(((e4) => e4.map(((e5) => t2.reducer(e5))))) };\n    }\n    if (\"range\" === t2.type) {\n      const e3 = t2.edges || [0, 1], i3 = e3.length - 1, n2 = Array.from({ length: i3 }, (() => []));\n      for (let i4 = 0; i4 < s2.length; i4++) {\n        const r2 = ee(t2.accessor(s2[i4]), e3);\n        r2 >= 0 && n2[r2].push(s2[i4]);\n      }\n      return { type: \"range\", labels: te(e3), values: n2.map(((e4) => t2.reducer(e4))), keys: n2.map(((t3, s3) => [e3[s3], e3[s3 + 1]])), edges: e3 };\n    }\n    const i2 = /* @__PURE__ */ new Map();\n    t2.labels.forEach(((e3) => i2.set(e3, [])));\n    for (let e3 = 0; e3 < s2.length; e3++) {\n      const n2 = i2.get(t2.accessor(s2[e3]));\n      n2 && n2.push(s2[e3]);\n    }\n    return { type: \"category\", labels: t2.labels.slice(), values: t2.labels.map(((e3) => t2.reducer(i2.get(e3) || []))), keys: t2.labels.slice() };\n  }\n  aggregateAll() {\n    const e2 = {};\n    return this.dims.forEach(((t2, s2) => {\n      e2[s2] = this.aggregateFor(s2);\n    })), e2;\n  }\n  state() {\n    const e2 = {};\n    return this.dims.forEach(((t2, s2) => {\n      this.hasFilter(t2) && (e2[s2] = t2.filter instanceof Set ? Array.from(t2.filter) : t2.filter.slice());\n    })), { filters: e2, filteredCount: this.filteredRows().length, total: this.records.length };\n  }\n  filterOf(e2) {\n    const t2 = this.dims.get(e2);\n    return t2 && this.hasFilter(t2) ? t2.filter instanceof Set ? new Set(t2.filter) : t2.filter.slice() : null;\n  }\n  on(e2, t2) {\n    let s2 = this.listeners.get(e2);\n    return s2 || (s2 = /* @__PURE__ */ new Set(), this.listeners.set(e2, s2)), s2.add(t2), () => this.off(e2, t2);\n  }\n  off(e2, t2) {\n    var s2;\n    return null == (s2 = this.listeners.get(e2)) || s2.delete(t2), this;\n  }\n  emit(e2, t2) {\n    var s2;\n    null == (s2 = this.listeners.get(e2)) || s2.forEach(((e3) => {\n      try {\n        e3(t2);\n      } catch (e4) {\n      }\n    }));\n  }\n  static esc(e2) {\n    return String(null == e2 ? \"\" : e2).replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\"/g, \"&quot;\");\n  }\n  resolveColumns(e2) {\n    if (Array.isArray(e2) && e2.length) return e2.map(((e3) => \"string\" == typeof e3 ? { field: e3, label: e3 } : { field: e3.field, label: e3.label || e3.field, format: e3.format }));\n    const t2 = this.records[0];\n    return (t2 ? Object.keys(t2) : []).map(((e3) => ({ field: e3, label: e3 })));\n  }\n  tableHTML(e2, t2, s2) {\n    const i2 = \"<thead><tr>\" + e2.map(((e3) => `<th>${se.esc(e3.label)}</th>`)).join(\"\") + \"</tr></thead>\", n2 = \"<tbody>\" + t2.map(((t3) => \"<tr>\" + e2.map(((e3) => {\n      const s3 = t3[e3.field], i3 = e3.format ? e3.format(s3, t3) : s3;\n      return `<td>${se.esc(i3)}</td>`;\n    })).join(\"\") + \"</tr>\")).join(\"\") + \"</tbody>\";\n    return `<table class=\"apexcharts-cf-table\">${`<caption>${t2.length} of ${s2} rows</caption>`}${i2}${n2}</table>`;\n  }\n  dataTable(e2, t2) {\n    if (!e2) return { refresh() {\n    }, destroy() {\n    } };\n    const s2 = t2 || {}, i2 = this.resolveColumns(s2.columns), n2 = s2.pageSize || 0, r2 = s2.page || 0, a2 = () => {\n      const t3 = this.filteredRows(), s3 = n2 ? t3.slice(r2 * n2, r2 * n2 + n2) : t3;\n      e2.innerHTML = this.tableHTML(i2, s3, t3.length);\n    };\n    a2();\n    const l2 = this.on(\"change\", a2);\n    return { refresh: a2, destroy: () => {\n      l2(), e2.innerHTML = \"\";\n    } };\n  }\n  destroy() {\n    se.store().delete(this.id), this.dims.clear(), this.listeners.clear(), this.records = [];\n  }\n}\nconst PRICING_URL = \"https://apexcharts.com/pricing\";\nlet _perspectivesTokenDecoded = false;\nconst enforced = /* @__PURE__ */ new Set();\nfunction untrackChart(ctx) {\n  enforced.delete(ctx);\n}\nfunction markPerspectivesTokenDecoded() {\n  _perspectivesTokenDecoded = true;\n  reevaluateLicenseAcrossCharts();\n}\nfunction premiumFeaturesInUse(w2, ctx) {\n  const chart = w2 && w2.config && w2.config.chart || {};\n  const used = [];\n  if (chart.type === \"unit\") used.push(\"unit\");\n  if (ctx.storyboard && ctx.storyboard._used) used.push(\"storyboard\");\n  const link = chart.link;\n  if (ctx.linkedViews && link && (link.enabled === true || typeof link.dimension === \"function\")) {\n    used.push(\"link\");\n  }\n  if (ctx.ink && chart.ink && chart.ink.enabled === true) used.push(\"ink\");\n  if (ctx.measure && chart.measure && chart.measure.enabled === true) {\n    used.push(\"measure\");\n  }\n  if (ctx.contextMenu && chart.contextMenu && chart.contextMenu.enabled === true) {\n    used.push(\"context-menu\");\n  }\n  if (ctx.perspectives && (ctx.perspectives._used || _perspectivesTokenDecoded)) {\n    used.push(\"perspectives\");\n  }\n  if (ctx.history && chart.history && chart.history.enabled === true) {\n    used.push(\"history\");\n  }\n  return used;\n}\nfunction resolveKey(w2) {\n  const perChart = w2 && w2.config && w2.config.chart && w2.config.chart.license;\n  if (perChart) return perChart;\n  const singleton = o.getKey();\n  if (singleton) return singleton;\n  const apex = Environment.getApex();\n  if (apex && apex.license) return apex.license;\n  return null;\n}\nconst PREMIUM_PLANS = /* @__PURE__ */ new Set([\"premium\", \"enterprise\"]);\nfunction licensedForPremium(key) {\n  if (!key) return false;\n  const result = o.validateKey(key);\n  if (!result.valid) return false;\n  const plan = result.data && result.data.plan;\n  return typeof plan === \"string\" && PREMIUM_PLANS.has(plan.toLowerCase());\n}\nfunction reinstateWatermark(ctx, elWrap) {\n  const node = h.add(elWrap, { manage: false });\n  if (!node || typeof MutationObserver === \"undefined\") return;\n  if (ctx._wmNodeObserver && ctx._wmObservedNode === node) return;\n  if (ctx._wmNodeObserver) ctx._wmNodeObserver.disconnect();\n  const nodeObs = new MutationObserver(() => {\n    const n2 = h.node(elWrap);\n    if (!n2) return;\n    nodeObs.disconnect();\n    h.applyStyles(n2);\n    nodeObs.takeRecords();\n    nodeObs.observe(n2, { attributes: true, attributeFilter: [\"style\"] });\n  });\n  nodeObs.observe(node, { attributes: true, attributeFilter: [\"style\"] });\n  ctx._wmNodeObserver = nodeObs;\n  ctx._wmObservedNode = node;\n}\nfunction addWatermark(ctx, elWrap) {\n  reinstateWatermark(ctx, elWrap);\n  if (typeof MutationObserver === \"undefined\" || ctx._wmWrapObserver) return;\n  const wrapObs = new MutationObserver(() => {\n    if (!h.node(elWrap)) reinstateWatermark(ctx, elWrap);\n  });\n  wrapObs.observe(elWrap, { childList: true });\n  ctx._wmWrapObserver = wrapObs;\n}\nfunction teardownWatermark(ctx, elWrap) {\n  if (ctx._wmWrapObserver) {\n    ctx._wmWrapObserver.disconnect();\n    ctx._wmWrapObserver = null;\n  }\n  if (ctx._wmNodeObserver) {\n    ctx._wmNodeObserver.disconnect();\n    ctx._wmNodeObserver = null;\n  }\n  ctx._wmObservedNode = null;\n  const wrap = elWrap || ctx.w && ctx.w.dom && ctx.w.dom.elWrap;\n  if (wrap) h.remove(wrap, { manage: false });\n}\nfunction notifyTrial(ctx, key, features) {\n  if (ctx._premiumLicenseNotified) return;\n  ctx._premiumLicenseNotified = true;\n  const many = features.length > 1;\n  if (!key) {\n    console.warn(\n      `[ApexCharts] Premium feature${many ? \"s\" : \"\"} in use (${features.join(\", \")}) without a license. Running in trial mode with a watermark. Get a license: ${PRICING_URL}`\n    );\n    return;\n  }\n  const result = o.validateKey(key);\n  if (result.valid) {\n    const plan = result.data && result.data.plan || \"current\";\n    console.warn(\n      `[ApexCharts] Premium feature${many ? \"s\" : \"\"} in use (${features.join(\", \")}) require a Premium or Enterprise license; the ${plan} plan does not include ${many ? \"them\" : \"it\"}. Running in trial mode with a watermark. Upgrade: ${PRICING_URL}`\n    );\n    return;\n  }\n  if (key !== o.getKey()) {\n    console.error(`[Apex] ${result.message}`);\n  }\n}\nfunction enforceLicense(w2, ctx) {\n  try {\n    if (!Environment.isBrowser()) return;\n    if (w2 && w2.globals && w2.globals.isDestroyed) {\n      enforced.delete(ctx);\n      return;\n    }\n    const elWrap = w2 && w2.dom && w2.dom.elWrap;\n    if (!elWrap) return;\n    const features = premiumFeaturesInUse(w2, ctx);\n    if (features.length === 0) {\n      enforced.delete(ctx);\n      teardownWatermark(ctx, elWrap);\n      return;\n    }\n    enforced.add(ctx);\n    const key = resolveKey(w2);\n    if (licensedForPremium(key)) {\n      teardownWatermark(ctx, elWrap);\n      return;\n    }\n    addWatermark(ctx, elWrap);\n    notifyTrial(ctx, key, features);\n  } catch (e2) {\n  }\n}\nfunction reevaluateLicenseAcrossCharts() {\n  if (!Environment.isBrowser()) return;\n  const visited = /* @__PURE__ */ new Set();\n  const apex = Environment.getApex();\n  const instances = apex && apex._chartInstances;\n  if (Array.isArray(instances)) {\n    instances.forEach((entry) => {\n      const chart = entry && entry.chart;\n      if (chart && chart.w && !chart.w.globals.isDestroyed) {\n        visited.add(chart);\n        enforceLicense(chart.w, chart);\n      }\n    });\n  }\n  Array.from(enforced).forEach((ctx) => {\n    const w2 = ctx && ctx.w;\n    const elWrap = w2 && w2.dom && w2.dom.elWrap;\n    if (!w2 || w2.globals.isDestroyed || !elWrap || elWrap.isConnected === false) {\n      enforced.delete(ctx);\n      return;\n    }\n    if (visited.has(ctx)) return;\n    enforceLicense(w2, ctx);\n  });\n}\no.onChange(reevaluateLicenseAcrossCharts);\nconst _ApexCharts = class _ApexCharts {\n  /**\n   * Creates a new ApexCharts instance.\n   *\n   * @param {HTMLElement} el - The DOM element to render the chart into.\n   * @param {ApexOptions} opts - Chart configuration options.\n   */\n  constructor(el, opts) {\n    // Module properties set dynamically by InitCtxVariables.initModules().\n    // Declared as typed class fields so @ts-check resolves them throughout the\n    // class body without errors. Each field typed as `any` since the modules are\n    // plain objects whose specific shapes are not yet typed.\n    /** @type {any} */\n    __publicField(this, \"core\");\n    /** @type {any} */\n    __publicField(this, \"responsive\");\n    /** @type {any} */\n    __publicField(this, \"axes\");\n    /** @type {any} */\n    __publicField(this, \"grid\");\n    /** @type {any} */\n    __publicField(this, \"graphics\");\n    /** @type {any} */\n    __publicField(this, \"coreUtils\");\n    /** @type {any} */\n    __publicField(this, \"crosshairs\");\n    /** @type {any} */\n    __publicField(this, \"events\");\n    /** @type {any} */\n    __publicField(this, \"fill\");\n    /** @type {any} */\n    __publicField(this, \"localization\");\n    /** @type {any} */\n    __publicField(this, \"options\");\n    /** @type {any} */\n    __publicField(this, \"series\");\n    /** @type {any} */\n    __publicField(this, \"theme\");\n    /** @type {any} */\n    __publicField(this, \"formatters\");\n    /** @type {any} */\n    __publicField(this, \"titleSubtitle\");\n    /** @type {any} */\n    __publicField(this, \"dimensions\");\n    /** @type {any} */\n    __publicField(this, \"updateHelpers\");\n    /** @type {any} */\n    __publicField(this, \"tooltip\");\n    /** @type {any} */\n    __publicField(this, \"data\");\n    /** @type {any} */\n    __publicField(this, \"animations\");\n    /** @type {any} */\n    __publicField(this, \"exports\");\n    /** @type {any} */\n    __publicField(this, \"legend\");\n    /** @type {any} */\n    __publicField(this, \"toolbar\");\n    /** @type {any} */\n    __publicField(this, \"zoomPanSelection\");\n    /** @type {any} */\n    __publicField(this, \"keyboardNavigation\");\n    /** @type {any} */\n    __publicField(this, \"annotations\");\n    /** @type {any} */\n    __publicField(this, \"morphTypeChange\");\n    /** @type {any} */\n    __publicField(this, \"timeScale\");\n    /** @type {any} */\n    __publicField(this, \"_keyboardNavigation\");\n    /** @type {any} */\n    __publicField(this, \"_zoomPanSelection\");\n    /** @type {any} */\n    __publicField(this, \"windowResizeHandler\");\n    /** @type {any} */\n    __publicField(this, \"parentResizeHandler\");\n    /** @type {string[]} */\n    __publicField(this, \"publicMethods\", []);\n    /** @type {string[]} */\n    __publicField(this, \"eventList\", []);\n    /** @type {Promise<any> | null} */\n    __publicField(this, \"_renderPromise\", null);\n    /** @type {any} */\n    __publicField(this, \"config\");\n    /** @type {any} */\n    __publicField(this, \"perspectives\");\n    /** @type {any} */\n    __publicField(this, \"storyboard\");\n    /** @type {any} */\n    __publicField(this, \"history\");\n    /** @type {any} */\n    __publicField(this, \"linkedViews\");\n    /** @type {any} */\n    __publicField(this, \"ink\");\n    /** @type {any} */\n    __publicField(this, \"measure\");\n    /** @type {any} */\n    __publicField(this, \"contextMenu\");\n    /** @type {any} */\n    __publicField(this, \"weave\");\n    /** @type {any} */\n    __publicField(this, \"renderer\");\n    /** @type {any} */\n    __publicField(this, \"rendererController\");\n    this.opts = opts;\n    this.ctx = this;\n    this.w = new Base(opts).init();\n    this.el = el;\n    this.w.globals.cuid = Utils$1.randomId();\n    this.w.globals.chartID = this.w.config.chart.id ? Utils$1.escapeString(this.w.config.chart.id) : this.w.globals.cuid;\n    applyAnimationPolicy(this.w);\n    const initCtx = new InitCtxVariables(this);\n    initCtx.initModules();\n    this.lastUpdateOptions = null;\n    this._updateStats = { fast: 0, fastWithAxes: 0, full: 0 };\n    this.create = this.create.bind(this);\n    if (Environment.isBrowser()) {\n      this.windowResizeHandler = this._windowResizeHandler.bind(this);\n      this.parentResizeHandler = this._parentResizeCallback.bind(this);\n    }\n  }\n  /**\n   * Renders the chart. Must be called once after construction.\n   *\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance after mount.\n   */\n  render() {\n    var _a, _b;\n    if (!((_b = (_a = this.w) == null ? void 0 : _a.config) == null ? void 0 : _b.chart)) {\n      return Promise.reject(\n        new Error(\n          \"ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property.\"\n        )\n      );\n    }\n    if (this._renderPromise) return this._renderPromise;\n    const renderPromise = new Promise((resolve, reject) => {\n      var _a2;\n      if (Utils$1.elementExists(this.el)) {\n        if (typeof Apex._chartInstances === \"undefined\") {\n          Apex._chartInstances = [];\n        }\n        if (this.w.config.chart.id) {\n          Apex._chartInstances.push({\n            id: this.w.globals.chartID,\n            group: this.w.config.chart.group,\n            chart: this\n          });\n        }\n        this.setLocale(this.w.config.chart.defaultLocale);\n        const beforeMount = this.w.config.chart.events.beforeMount;\n        if (typeof beforeMount === \"function\") {\n          beforeMount(this, this.w);\n        }\n        this.events.fireEvent(\"beforeMount\", [this, this.w]);\n        if (Environment.isBrowser()) {\n          window.addEventListener(\"resize\", this.windowResizeHandler);\n          addResizeListener(\n            /** @type {HTMLElement} */\n            this.el.parentNode,\n            this.parentResizeHandler\n          );\n          const rootNode = (\n            /** @type {any} */\n            this.el.getRootNode && this.el.getRootNode()\n          );\n          const inShadowRoot = Utils$1.is(\"ShadowRoot\", rootNode);\n          const doc = this.el.ownerDocument;\n          let css = inShadowRoot ? rootNode.getElementById(\"apexcharts-css\") : doc.getElementById(\"apexcharts-css\");\n          if (!css) {\n            css = BrowserAPIs.createElementNS(\n              \"http://www.w3.org/1999/xhtml\",\n              \"style\"\n            );\n            css.id = \"apexcharts-css\";\n            css.textContent = apexCSS;\n            const nonce = ((_a2 = this.opts.chart) == null ? void 0 : _a2.nonce) || this.w.config.chart.nonce;\n            if (nonce) {\n              css.setAttribute(\"nonce\", nonce);\n            }\n            if (inShadowRoot) {\n              rootNode.prepend(css);\n            } else if (this.w.config.chart.injectStyleSheet !== false) {\n              doc.head.appendChild(css);\n            }\n          }\n        }\n        const graphData = this.create(this.w.config.series, {});\n        if (!graphData) return resolve(this);\n        this.mount(graphData).then(() => {\n          if (typeof this.w.config.chart.events.mounted === \"function\") {\n            this.w.config.chart.events.mounted(this, this.w);\n          }\n          this.events.fireEvent(\"mounted\", [this, this.w]);\n          resolve(graphData);\n        }).catch((e2) => {\n          var _a3, _b2;\n          const enriched = e2 instanceof Error ? e2 : new Error(String(e2));\n          const err = (\n            /** @type {any} */\n            enriched\n          );\n          err.chartId = (_b2 = (_a3 = this.w) == null ? void 0 : _a3.globals) == null ? void 0 : _b2.chartID;\n          err.el = this.el;\n          reject(enriched);\n        });\n      } else {\n        reject(new Error(\"Element not found\"));\n      }\n    });\n    this._renderPromise = renderPromise;\n    renderPromise.catch(() => {\n      if (this._renderPromise === renderPromise) this._renderPromise = null;\n    });\n    return renderPromise;\n  }\n  /**\n   * @param {any[]} ser\n   * @param {object} opts\n   */\n  create(ser, opts) {\n    var _a, _b, _c, _d, _e, _f;\n    const w2 = this.w;\n    if (!this.core) {\n      const initCtx = new InitCtxVariables(this);\n      initCtx.initModules();\n    }\n    const gl = this.w.globals;\n    gl.noData = false;\n    gl.animationEnded = false;\n    if (!Utils$1.elementExists(this.el)) {\n      gl.animationEnded = true;\n      return null;\n    }\n    this.responsive.checkResponsiveConfig(opts);\n    applyAnimationPolicy(w2);\n    if (w2.config.xaxis.convertedCatToNumeric) {\n      const defaults = new Defaults(w2.config);\n      defaults.convertCatToNumericXaxis(w2.config, this.ctx);\n    }\n    this.core.setupElements();\n    if (w2.config.chart.type === \"treemap\") {\n      w2.config.grid.show = false;\n      w2.config.yaxis[0].show = false;\n    }\n    if (gl.svgWidth === 0) {\n      gl.animationEnded = true;\n      return null;\n    }\n    let series = ser;\n    ser.forEach((s2, realIndex) => {\n      if (s2.hidden) {\n        series = this.legend.legendHelpers.getSeriesAfterCollapsing({\n          realIndex\n        });\n      }\n    });\n    const combo = CoreUtils.checkComboSeries(series, w2.config.chart.type);\n    gl.comboCharts = combo.comboCharts;\n    gl.comboBarCount = combo.comboBarCount;\n    const allSeriesAreEmpty = series.every((s2) => s2.data && s2.data.length === 0);\n    if (series.length === 0 || allSeriesAreEmpty && gl.collapsedSeries.length < 1) {\n      this.series.handleNoData();\n    }\n    if (Environment.isBrowser()) {\n      this.events.setupEventHandlers();\n    }\n    const parsedState = this.data.parseData(series);\n    this._writeParsedSeriesData(parsedState.seriesData);\n    this._writeParsedRangeData(parsedState.rangeData);\n    this._writeParsedCandleData(parsedState.candleData);\n    this._writeParsedLabelData(parsedState.labelData);\n    this._writeParsedAxisFlags(parsedState.axisFlags);\n    (_a = this.rendererController) == null ? void 0 : _a.resolve();\n    (_b = this.weave) == null ? void 0 : _b.dispatch(\"afterParse\");\n    this.theme.init();\n    const markers = new Markers(this.w, this);\n    markers.setGlobalMarkerSize();\n    this.formatters.setLabelFormatters();\n    this.titleSubtitle.draw();\n    if (!gl.noData || gl.collapsedSeries.length === w2.seriesData.series.length || w2.config.legend.showForSingleSeries) {\n      (_c = this.legend) == null ? void 0 : _c.init();\n    }\n    this.series.hasAllSeriesEqualX();\n    if (gl.axisCharts) {\n      this.core.coreCalculations();\n      if (w2.config.xaxis.type !== \"category\") {\n        this.formatters.setLabelFormatters();\n      }\n      if (this.ctx.toolbar) {\n        this.ctx.toolbar.minX = w2.globals.minX;\n        this.ctx.toolbar.maxX = w2.globals.maxX;\n      }\n    }\n    this.formatters.heatmapLabelFormatters();\n    const coreUtils = new CoreUtils(this.w);\n    coreUtils.getLargestMarkerSize();\n    const layoutState = this.dimensions.plotCoords();\n    this._writeLayoutCoords(layoutState.layout);\n    const xyRatios = this.core.xySettings();\n    (_d = this.weave) == null ? void 0 : _d.dispatch(\"afterScales\", { xyRatios });\n    this.grid.createGridMask();\n    const elGraph = this.core.plotChartType(series, xyRatios);\n    const dataLabels = new DataLabels(this.w, this);\n    dataLabels.bringForward();\n    if (w2.config.dataLabels.background.enabled) {\n      dataLabels.dataLabelsBackground();\n    }\n    this.core.shiftGraphPosition();\n    (_f = (_e = this.legend) == null ? void 0 : _e.heatmapGradientLegend) == null ? void 0 : _f.repositionToPlot();\n    if (w2.globals.dataPoints > 50) {\n      w2.dom.elWrap.classList.add(\"apexcharts-disable-transitions\");\n    }\n    const dim = {\n      plot: {\n        left: w2.layout.translateX,\n        top: w2.layout.translateY,\n        width: w2.layout.gridWidth,\n        height: w2.layout.gridHeight\n      }\n    };\n    return {\n      elGraph,\n      xyRatios,\n      dimensions: dim\n    };\n  }\n  /**\n   * @param {any} graphData\n   */\n  mount(graphData = null) {\n    const me = this;\n    const w2 = me.w;\n    return new Promise((resolve, reject) => {\n      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;\n      if (me.el === null) {\n        return reject(\n          new Error(\"Not enough data to display or target element not found\")\n        );\n      } else if (w2.globals.allSeriesCollapsed) {\n        me.series.handleNoData();\n      }\n      me.grid = new Grid(me.w, me);\n      const elgrid = me.grid.drawGrid();\n      const AnnotationsCtor = InitCtxVariables._featureRegistry.get(\"annotations\");\n      me.annotations = AnnotationsCtor ? new AnnotationsCtor(me.w, {\n        theme: me.theme,\n        timeScale: me.timeScale\n      }) : null;\n      (_a = me.annotations) == null ? void 0 : _a.drawImageAnnos();\n      (_b = me.annotations) == null ? void 0 : _b.drawTextAnnos();\n      if (w2.config.grid.position === \"back\") {\n        if (elgrid) {\n          w2.dom.elGraphical.add(elgrid.el);\n        }\n        if ((_c = elgrid == null ? void 0 : elgrid.elGridBorders) == null ? void 0 : _c.node) {\n          w2.dom.elGraphical.add(elgrid.elGridBorders);\n        }\n      }\n      if (Array.isArray(graphData.elGraph)) {\n        for (let g2 = 0; g2 < graphData.elGraph.length; g2++) {\n          w2.dom.elGraphical.add(graphData.elGraph[g2]);\n        }\n      } else {\n        w2.dom.elGraphical.add(graphData.elGraph);\n      }\n      if (w2.config.grid.position === \"front\") {\n        if (elgrid) {\n          w2.dom.elGraphical.add(elgrid.el);\n        }\n        if ((_d = elgrid == null ? void 0 : elgrid.elGridBorders) == null ? void 0 : _d.node) {\n          w2.dom.elGraphical.add(elgrid.elGridBorders);\n        }\n      }\n      if (w2.config.xaxis.crosshairs.position === \"front\") {\n        me.crosshairs.drawXCrosshairs();\n      }\n      if (w2.config.yaxis[0].crosshairs.position === \"front\") {\n        me.crosshairs.drawYCrosshairs();\n      }\n      if (w2.config.chart.type !== \"treemap\") {\n        me.axes.drawAxis(w2.config.chart.type, elgrid);\n      }\n      const xAxis = new XAxis(this.w, this.ctx, elgrid);\n      const yaxis = new YAxis(\n        this.w,\n        { theme: this.theme, timeScale: this.timeScale },\n        elgrid\n      );\n      if (elgrid !== null) {\n        xAxis.xAxisLabelCorrections();\n        yaxis.setYAxisTextAlignments();\n        w2.config.yaxis.map((yaxe, index) => {\n          if (w2.globals.ignoreYAxisIndexes.indexOf(index) === -1) {\n            yaxis.yAxisTitleRotate(index, yaxe.opposite);\n          }\n        });\n      }\n      (_e = me.annotations) == null ? void 0 : _e.drawAxesAnnotations();\n      if (!w2.globals.noData) {\n        if (Environment.isBrowser() && w2.config.tooltip.enabled && !w2.globals.noData) {\n          (_f = me.w.globals.tooltip) == null ? void 0 : _f.drawTooltip(graphData.xyRatios);\n        }\n        if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.keyboard.enabled && w2.config.chart.accessibility.keyboard.navigation.enabled) {\n          (_g = me.keyboardNavigation) == null ? void 0 : _g.init();\n        }\n        if (Environment.isBrowser() && w2.globals.axisCharts && (w2.axisFlags.isXNumeric || /** @type {Record<string,any>} */\n        w2.config.xaxis.convertedCatToNumeric || w2.axisFlags.isRangeBar)) {\n          if (w2.config.chart.zoom.enabled || w2.config.chart.selection && w2.config.chart.selection.enabled || // @ts-ignore — chart.pan is an internal toolbar config property\n          w2.config.chart.pan && w2.config.chart.pan.enabled) {\n            (_h = me.zoomPanSelection) == null ? void 0 : _h.init({\n              xyRatios: graphData.xyRatios\n            });\n          }\n        } else {\n          const tools = w2.config.chart.toolbar.tools;\n          const toolsArr = [\n            \"zoom\",\n            \"zoomin\",\n            \"zoomout\",\n            \"selection\",\n            \"pan\",\n            \"reset\"\n          ];\n          toolsArr.forEach((t2) => {\n            tools[t2] = false;\n          });\n        }\n        if (w2.config.chart.toolbar.show && !w2.globals.allSeriesCollapsed) {\n          (_i = me.toolbar) == null ? void 0 : _i.createToolbar();\n        }\n      }\n      (_j = me.weave) == null ? void 0 : _j.dispatch(\"draw\", {\n        pass: \"full\",\n        xyRatios: graphData == null ? void 0 : graphData.xyRatios\n      });\n      if (w2.globals.memory.methodsToExec.length > 0) {\n        w2.globals.memory.methodsToExec.forEach((fn) => {\n          fn.method(fn.params, false, fn.context);\n        });\n      }\n      if (!w2.globals.axisCharts && !w2.globals.noData) {\n        me.core.resizeNonAxisCharts();\n      }\n      enforceLicense(w2, me);\n      resolve(me);\n    });\n  }\n  /**\n   * Destroys the chart instance, removes all DOM elements and event listeners.\n   * After calling this, the instance should not be used again.\n   */\n  destroy() {\n    var _a;\n    this._renderPromise = null;\n    if (Environment.isBrowser()) {\n      window.removeEventListener(\"resize\", this.windowResizeHandler);\n      removeResizeListener(\n        /** @type {Element} */\n        this.el.parentNode,\n        this.parentResizeHandler\n      );\n      clearTimeout((_a = this.w.globals.resizeTimer) != null ? _a : void 0);\n    }\n    const chartID = this.w.config.chart.id;\n    if (chartID && Array.isArray(Apex._chartInstances)) {\n      Apex._chartInstances.forEach(\n        (c2, i2) => {\n          if (c2.id === Utils$1.escapeString(chartID)) {\n            Apex._chartInstances.splice(i2, 1);\n          }\n        }\n      );\n    }\n    if (this._keyboardNavigation) {\n      this._keyboardNavigation.destroy();\n    }\n    teardownWatermark(this);\n    untrackChart(this);\n    new Destroy(this.ctx).clear({ isUpdating: false });\n  }\n  /**\n   * Merges new options into the existing config and re-renders the chart.\n   *\n   * @param {ApexOptions} options - Partial config object merged with the existing config.\n   * @param {boolean} [redraw=false] - When true, redraws the chart from scratch instead of animating from previous paths.\n   * @param {boolean} [animate=true] - Whether to animate the update.\n   * @param {boolean} [updateSyncedCharts=true] - Whether to propagate the update to charts in the same group.\n   * @param {boolean} [overwriteInitialConfig=true] - When true, replaces the stored initial config used by resetSeries().\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance after re-render.\n   */\n  updateOptions(options2, redraw = false, animate = true, updateSyncedCharts = true, overwriteInitialConfig = true) {\n    const w2 = this.w;\n    if (options2 && \"series\" in options2 && !Array.isArray(options2.series)) {\n      console.warn(\n        \"ApexCharts: updateOptions() ignored `series` because it is not an array.\"\n      );\n      options2 = __spreadValues({}, options2);\n      delete options2.series;\n    }\n    w2.interact.selection = void 0;\n    if (this.lastUpdateOptions) {\n      if (Utils$1.shallowEqual(this.lastUpdateOptions, options2)) {\n        return Promise.resolve(this);\n      }\n      if (options2.series && this.lastUpdateOptions.series && !_ApexCharts._optionsTooBigToCompare(options2)) {\n        if (Utils$1.stringifyForCompare(this.lastUpdateOptions.series) === Utils$1.stringifyForCompare(options2.series)) {\n          const optionsWithoutSeries = __spreadValues({}, options2);\n          const lastWithoutSeries = __spreadValues({}, this.lastUpdateOptions);\n          delete optionsWithoutSeries.series;\n          delete lastWithoutSeries.series;\n          if (Utils$1.shallowEqual(optionsWithoutSeries, lastWithoutSeries)) {\n            return Promise.resolve(this);\n          }\n        }\n      }\n    }\n    if (options2.series) {\n      this.data.resetParsingFlags();\n      this.series.resetSeries(false, true, false);\n      if (options2.series.length && options2.series[0].data) {\n        options2.series = options2.series.map(\n          (s2, i2) => {\n            return this.updateHelpers._extendSeries(s2, i2);\n          }\n        );\n      }\n      this.updateHelpers.revertDefaultAxisMinMax();\n    }\n    if (options2.xaxis) {\n      options2 = this.updateHelpers.forceXAxisUpdate(options2);\n    }\n    if (options2.yaxis) {\n      options2 = this.updateHelpers.forceYAxisUpdate(options2);\n    }\n    if (w2.globals.collapsedSeriesIndices.length > 0) {\n      this.series.clearPreviousPaths();\n    }\n    if (options2.theme) {\n      options2 = this.theme.updateThemeOptions(options2);\n    }\n    return this.updateHelpers._updateOptions(\n      options2,\n      redraw,\n      animate,\n      updateSyncedCharts,\n      overwriteInitialConfig\n    );\n  }\n  /**\n   * Replaces the chart's series data and re-renders.\n   *\n   * @param {ApexAxisChartSeries | ApexNonAxisChartSeries} [newSeries=[]] - The replacement series array.\n   * @param {boolean} [animate=true] - Whether to animate the update.\n   * @param {boolean} [overwriteInitialSeries=true] - When true, replaces the stored initial series used by resetSeries().\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance after re-render.\n   */\n  updateSeries(newSeries = [], animate = true, overwriteInitialSeries = true) {\n    if (!Array.isArray(newSeries)) {\n      console.warn(\n        \"ApexCharts: updateSeries() ignored the call because the series is not an array.\"\n      );\n      return Promise.resolve(this);\n    }\n    this.data.resetParsingFlags();\n    this.series.prepareDataUpdate();\n    this.updateHelpers.revertDefaultAxisMinMax();\n    return this.updateHelpers._updateSeries(\n      newSeries,\n      animate,\n      overwriteInitialSeries\n    );\n  }\n  /**\n   * Appends a new series to the existing series array and re-renders.\n   *\n   * @param {ApexAxisChartSeries[0] | ApexNonAxisChartSeries} newSerie - The series object to append.\n   * @param {boolean} [animate=true] - Whether to animate the update.\n   * @param {boolean} [overwriteInitialSeries=true] - When true, replaces the stored initial series used by resetSeries().\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance after re-render.\n   */\n  appendSeries(newSerie, animate = true, overwriteInitialSeries = true) {\n    this.data.resetParsingFlags();\n    const newSeries = this.w.config.series.slice();\n    newSeries.push(\n      /** @type {any} */\n      newSerie\n    );\n    this.series.prepareDataUpdate();\n    this.updateHelpers.revertDefaultAxisMinMax();\n    return this.updateHelpers._updateSeries(\n      newSeries,\n      animate,\n      overwriteInitialSeries\n    );\n  }\n  /**\n   * Appends data points to existing series without replacing them.\n   * Each element of `newData` corresponds to the series at the same index.\n   *\n   * @param {Array<{ data: any[] }>} newData - Data to append, in the same shape as series[].data.\n   * @param {boolean} [overwriteInitialSeries=true] - When true, updates the stored initial series used by resetSeries().\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance after re-render.\n   */\n  appendData(newData, overwriteInitialSeries = true) {\n    const me = this;\n    me.data.resetParsingFlags();\n    me.w.globals.dataChanged = true;\n    if (me.w.config.chart.animations.enabled) {\n      me.series.getPreviousPaths();\n    }\n    const histRaw = me.w.globals.histogramRawSeries;\n    if (histRaw) {\n      for (let i2 = 0; i2 < histRaw.length; i2++) {\n        const src = (\n          /** @type {any} */\n          newData[i2]\n        );\n        if (src && Array.isArray(src.data) && Array.isArray(histRaw[i2].data)) {\n          for (let j = 0; j < src.data.length; j++) {\n            histRaw[i2].data.push(src.data[j]);\n          }\n        }\n      }\n      return this.update();\n    }\n    const newSeries = me.w.config.series.slice();\n    for (let i2 = 0; i2 < newSeries.length; i2++) {\n      if (newData[i2] !== null && typeof newData[i2] !== \"undefined\") {\n        const srcSerie = (\n          /** @type {any} */\n          newData[i2]\n        );\n        const dstSerie = (\n          /** @type {any} */\n          newSeries[i2]\n        );\n        for (let j = 0; j < srcSerie.data.length; j++) {\n          dstSerie.data.push(srcSerie.data[j]);\n        }\n      }\n    }\n    trimStreamingSeries(newSeries, me.w);\n    me.w.config.series = newSeries;\n    if (overwriteInitialSeries) {\n      me.w.globals.initialSeries = me.w.config.series;\n    }\n    return this.update();\n  }\n  /**\n   * True when an options object carries enough series data that a\n   * JSON.stringify equality check (and the Utils.clone needed to store it for\n   * later comparison) would cost more than the re-render it tries to avoid.\n   * @param {any} options\n   * @returns {boolean}\n   */\n  static _optionsTooBigToCompare(options2) {\n    const series = options2 && options2.series;\n    if (!Array.isArray(series)) return false;\n    let points = 0;\n    for (let i2 = 0; i2 < series.length; i2++) {\n      const d = series[i2] && series[i2].data;\n      points += Array.isArray(d) ? d.length : 1;\n      if (points > 1e3) return true;\n    }\n    return false;\n  }\n  /**\n   * @param {object} [options]\n   */\n  update(options2) {\n    return new Promise((resolve, reject) => {\n      if (options2 && this.lastUpdateOptions && !_ApexCharts._optionsTooBigToCompare(options2) && Utils$1.stringifyForCompare(this.lastUpdateOptions) === Utils$1.stringifyForCompare(options2)) {\n        return resolve(this);\n      }\n      this.lastUpdateOptions = options2 && !_ApexCharts._optionsTooBigToCompare(options2) ? Utils$1.clone(options2) : null;\n      new Destroy(this.ctx).clear({ isUpdating: true });\n      const graphData = this.create(this.w.config.series, options2 != null ? options2 : {});\n      if (!graphData) return resolve(this);\n      this.mount(graphData).then(() => {\n        var _a;\n        (_a = this.morphTypeChange) == null ? void 0 : _a.applyChromeFade();\n        applyAxisTransition(this.w);\n        applyDataLabelTransition(this.w);\n        if (typeof this.w.config.chart.events.updated === \"function\") {\n          this.w.config.chart.events.updated(this, this.w);\n        }\n        this.events.fireEvent(\"updated\", [this, this.w]);\n        this.w.globals.isDirty = true;\n        resolve(this);\n      }).catch((e2) => {\n        reject(e2);\n      });\n    });\n  }\n  /**\n   * Redraws the scale-dependent chrome (grid lines, x-axis, y-axes) IN PLACE\n   * within the frozen layout after a data-only update changed the axis\n   * domain. The rebuilt groups replace the old nodes positionally, so z-order\n   * (grid back/front) is preserved without re-running mount. Legend,\n   * annotations containers, toolbar, defs/masks, and the plot geometry are\n   * untouched.\n   *\n   * Returns false when the refresh cannot faithfully reproduce the chart and\n   * the caller must fall back to a full render:\n   * - horizontal bar charts (inversed axes draw through a different path)\n   * - charts with annotations or ink notes (their positions are scale-bound\n   *   and are laid out by the full render)\n   * - the new y labels no longer fit the width reserved at layout time\n   *\n   * @param {any} _xyRatios\n   * @returns {boolean} true when the chrome was refreshed in place\n   */\n  _fastAxisChromeRefresh(_xyRatios) {\n    const w2 = this.w;\n    const gl = w2.globals;\n    this._fastAxisBailReason = \"\";\n    try {\n      if (gl.isBarHorizontal) {\n        this._fastAxisBailReason = \"barHorizontal\";\n        return false;\n      }\n      if (w2.config.chart.sparkline.enabled) return true;\n      const a2 = w2.config.annotations;\n      if (a2 && (a2.yaxis && a2.yaxis.length || a2.xaxis && a2.xaxis.length || a2.points && a2.points.length || a2.texts && a2.texts.length || a2.images && a2.images.length)) {\n        this._fastAxisBailReason = \"annotations\";\n        return false;\n      }\n      if (w2.config.chart.ink && w2.config.chart.ink.enabled) {\n        this._fastAxisBailReason = \"ink\";\n        return false;\n      }\n      const dim = this.dimensions;\n      if (!dim || !dim.dimYAxis) {\n        this._fastAxisBailReason = \"noDimensions\";\n        return false;\n      }\n      const prevYLabelsCoords = w2.layout.yLabelsCoords;\n      const prevYTitleCoords = w2.layout.yTitleCoords;\n      const yaxisLabelCoords = dim.dimYAxis.getyAxisLabelsCoords();\n      const yTitleCoords = dim.dimYAxis.getyAxisTitleCoords();\n      w2.layout.yLabelsCoords = [];\n      w2.layout.yTitleCoords = [];\n      w2.config.yaxis.map((_yaxe, index) => {\n        w2.layout.yLabelsCoords.push({\n          width: yaxisLabelCoords[index].width,\n          index\n        });\n        w2.layout.yTitleCoords.push(\n          /** @type {any} */\n          { width: yTitleCoords[index].width, index }\n        );\n      });\n      const newYAxisWidth = dim.dimYAxis.getTotalYAxisWidth();\n      if (newYAxisWidth > dim.yAxisWidth + 2) {\n        w2.layout.yLabelsCoords = prevYLabelsCoords;\n        w2.layout.yTitleCoords = prevYTitleCoords;\n        this._fastAxisBailReason = `labelWidth ${newYAxisWidth} > ${dim.yAxisWidth}`;\n        return false;\n      }\n      const innerEl = w2.dom.elGraphical.node;\n      const oldGrid = innerEl.querySelector(\".apexcharts-grid\");\n      const oldGridBorders = innerEl.querySelector(\".apexcharts-grid-borders\");\n      if (!oldGrid) {\n        this._fastAxisBailReason = \"missingGridNode\";\n        return false;\n      }\n      const gridParent = oldGrid.parentNode;\n      const gridNext = oldGridBorders ? oldGridBorders.nextSibling : oldGrid.nextSibling;\n      oldGrid.remove();\n      if (oldGridBorders) oldGridBorders.remove();\n      innerEl.querySelectorAll(\".apexcharts-xaxis-tick\").forEach((t2) => t2.remove());\n      this.grid = new Grid(w2, this);\n      const elgrid = this.grid.drawGrid();\n      if (elgrid && elgrid.el) {\n        gridParent.insertBefore(elgrid.el.node, gridNext);\n        if (elgrid.elGridBorders && elgrid.elGridBorders.node) {\n          gridParent.insertBefore(elgrid.elGridBorders.node, gridNext);\n        }\n      }\n      const xAxis = new XAxis(this.w, this.ctx, elgrid);\n      const oldXaxis = innerEl.querySelector(\".apexcharts-xaxis\");\n      if (oldXaxis) {\n        const xParent = oldXaxis.parentNode;\n        const xNext = oldXaxis.nextSibling;\n        oldXaxis.remove();\n        const elXaxis = xAxis.drawXaxis();\n        xParent.insertBefore(elXaxis.node, xNext);\n      }\n      const yAxis = new YAxis(\n        this.w,\n        { theme: this.theme, timeScale: this.timeScale },\n        elgrid\n      );\n      for (let index = 0; index < w2.config.yaxis.length; index++) {\n        if (gl.ignoreYAxisIndexes.indexOf(index) !== -1) continue;\n        const oldY = w2.dom.baseEl.querySelector(\n          `.apexcharts-yaxis[rel='${index}']`\n        );\n        if (!oldY) {\n          this._fastAxisBailReason = \"missingYAxisNode\";\n          return false;\n        }\n        const yParent = oldY.parentNode;\n        if (!yParent) {\n          this._fastAxisBailReason = \"missingYAxisParent\";\n          return false;\n        }\n        const yNext = oldY.nextSibling;\n        oldY.remove();\n        const elYaxis = yAxis.drawYaxis(index);\n        yParent.insertBefore(elYaxis.node, yNext);\n      }\n      if (elgrid !== null) {\n        xAxis.xAxisLabelCorrections();\n        yAxis.setYAxisTextAlignments();\n        w2.config.yaxis.map((yaxe, index) => {\n          if (gl.ignoreYAxisIndexes.indexOf(index) === -1) {\n            yAxis.yAxisTitleRotate(index, yaxe.opposite);\n          }\n        });\n      }\n      return true;\n    } catch (e2) {\n      this._fastAxisBailReason = \"error: \" + (e2 && /** @type {any} */\n      e2.message);\n      return false;\n    }\n  }\n  /**\n   * Fast update path for data-only series changes.\n   *\n   * Skips rebuilding grid, axes, dimensions, legend, annotations, tooltip DOM,\n   * and toolbar. Only recalculates scales and replots the series paths.\n   * Called automatically by _updateSeries() when the fast path is eligible.\n   *\n   * @param {boolean} animate - Whether to animate the update.\n   * @param {string} [prevAxisScaleSig] - Signature of the on-screen axis scale\n   *   captured by _updateSeries() before parseData recomputed bounds. When the\n   *   recomputed scale differs, the fast path can't repaint the ruler in place,\n   *   so it delegates to a full render. Omitted -> the check is skipped.\n   * @returns {Promise<ApexCharts>} Resolves with the chart instance.\n   */\n  fastUpdate(animate, prevAxisScaleSig) {\n    return new Promise((resolve, reject) => {\n      var _a, _b, _c;\n      try {\n        const w2 = this.w;\n        const gl = w2.globals;\n        gl.shouldAnimate = animate;\n        gl.dataChanged = true;\n        gl.animationEnded = false;\n        PerformanceCache.invalidateSelectors(w2);\n        const gl2 = w2.globals;\n        gl2.maxY = -Number.MAX_VALUE;\n        gl2.minY = Number.MIN_VALUE;\n        gl2.minYArr = [];\n        gl2.maxYArr = [];\n        gl2.maxX = -Number.MAX_VALUE;\n        gl2.minX = Number.MAX_VALUE;\n        gl2.initialMaxX = -Number.MAX_VALUE;\n        gl2.initialMinX = Number.MAX_VALUE;\n        gl2.yAxisScale = [];\n        gl2.xAxisScale = null;\n        gl2.xAxisTicksPositions = [];\n        gl2.xRange = 0;\n        gl2.yRange = [];\n        gl2.zRange = 0;\n        gl2.xTickAmount = 0;\n        gl2.multiAxisTickAmount = 0;\n        gl2.pointsArray = [];\n        gl2.barCanvasCoords = null;\n        gl2.dataLabelsRects = [];\n        gl2.lastDrawnDataLabelsIndexes = [];\n        gl2.textRectsCache = /* @__PURE__ */ new Map();\n        gl2.domCache = /* @__PURE__ */ new Map();\n        gl2.cachedSelectors = {};\n        gl2.disableZoomIn = false;\n        gl2.disableZoomOut = false;\n        if (gl.axisCharts) {\n          this.core.coreCalculations();\n          if (w2.config.xaxis.type !== \"category\") {\n            this.formatters.setLabelFormatters();\n          }\n        }\n        this.formatters.heatmapLabelFormatters();\n        const xyRatios = this.core.xySettings();\n        if (this._zoomPanSelection) this._zoomPanSelection.xyRatios = xyRatios;\n        const newAxisScaleSig = JSON.stringify({\n          y: (gl.yAxisScale || []).map((s2) => s2 ? s2.result : null),\n          xMin: gl.minX,\n          xMax: gl.maxX\n        });\n        const scaleChanged = gl.axisCharts && prevAxisScaleSig != null && newAxisScaleSig !== prevAxisScaleSig;\n        if (scaleChanged && !this._fastAxisChromeRefresh(xyRatios)) {\n          this._updateStats.full++;\n          return this.update().then(() => resolve(this)).catch(reject);\n        }\n        if (scaleChanged) {\n          this._updateStats.fastWithAxes++;\n        } else {\n          this._updateStats.fast++;\n        }\n        (_a = this.weave) == null ? void 0 : _a.dispatch(\"afterScales\", { pass: \"fast\", xyRatios });\n        const rr = (\n          /** @type {any} */\n          this.ctx.renderer\n        );\n        const reuseCanvasHost = !!(rr && rr.kind === \"canvas\" && rr.canRepaintInPlace && rr.canRepaintInPlace());\n        if (reuseCanvasHost) rr._repaintHostInPlace = true;\n        const innerEl = w2.dom.elGraphical.node;\n        const toRemove = innerEl.querySelectorAll(\n          (reuseCanvasHost ? \"\" : \".apexcharts-canvas-series-wrap, \") + \".apexcharts-plot-series, .apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background\"\n        );\n        toRemove.forEach(\n          (el) => {\n            var _a2;\n            return (_a2 = el.parentNode) == null ? void 0 : _a2.removeChild(el);\n          }\n        );\n        const elGraph = this.core.plotChartType(w2.config.series, xyRatios);\n        const gridEl = innerEl.querySelector(\".apexcharts-grid\");\n        const xaxisEl = innerEl.querySelector(\".apexcharts-xaxis\");\n        const graphs = Array.isArray(elGraph) ? elGraph : [elGraph];\n        const anchor = gridEl && w2.config.grid.position === \"front\" ? gridEl : xaxisEl;\n        if (anchor) {\n          graphs.forEach((g2) => {\n            const node = g2 && g2.node ? g2.node : g2;\n            if (node) innerEl.insertBefore(node, anchor);\n          });\n        } else {\n          graphs.forEach((g2) => {\n            w2.dom.elGraphical.add(g2);\n          });\n        }\n        const dataLabels = new DataLabels(w2, this);\n        dataLabels.bringForward();\n        if (w2.config.dataLabels.background.enabled) {\n          dataLabels.dataLabelsBackground();\n        }\n        if (Environment.isBrowser() && w2.config.tooltip.enabled && !gl.noData) {\n          (_b = w2.globals.tooltip) == null ? void 0 : _b.drawTooltip(xyRatios);\n        }\n        (_c = this.weave) == null ? void 0 : _c.dispatch(\"draw\", { pass: \"fast\", xyRatios });\n        if (typeof w2.config.chart.events.updated === \"function\") {\n          w2.config.chart.events.updated(this, w2);\n        }\n        this.events.fireEvent(\"updated\", [this, w2]);\n        enforceLicense(w2, this);\n        gl.isDirty = true;\n        resolve(this);\n      } catch (e2) {\n        reject(e2);\n      }\n    });\n  }\n  /**\n   * Returns all charts in the same `chart.group` (including this instance),\n   * used to synchronise zoom/pan across grouped charts.\n   *\n   * @returns {ApexCharts[]}\n   */\n  getSyncedCharts() {\n    const group = (\n      /** @type {ApexCharts[]} */\n      this.getGroupedCharts()\n    );\n    group.splice(0, 0, this);\n    return group;\n  }\n  /**\n   * Returns all charts in the same `chart.group`, excluding this instance.\n   * Used internally to apply hover/zoom effects to sibling charts.\n   *\n   * @returns {ApexCharts[]}\n   */\n  getGroupedCharts() {\n    return Apex._chartInstances.filter(\n      (ch) => this !== ch.chart && !!this.w.config.chart.group && this.w.config.chart.group === ch.group\n    ).map((ch) => ch.chart);\n  }\n  /**\n   * Retrieves a rendered chart instance by its `chart.id` config value.\n   *\n   * @param {string} id - The chart ID set via `chart.id` in options.\n   * @returns {ApexCharts | undefined}\n   */\n  static getChartByID(id) {\n    const chartId = Utils$1.escapeString(id);\n    if (!Apex._chartInstances) return void 0;\n    const c2 = Apex._chartInstances.filter(\n      (ch) => ch.id === chartId\n    )[0];\n    return c2 && c2.chart;\n  }\n  /**\n   * Scans the document for elements with a `data-apexcharts` attribute and\n   * `data-options` JSON, then renders a chart in each one automatically.\n   * Useful for non-framework HTML pages.\n   */\n  static initOnLoad() {\n    var _a;\n    const els = document.querySelectorAll(\"[data-apexcharts]\");\n    for (let i2 = 0; i2 < els.length; i2++) {\n      const el = (\n        /** @type {HTMLElement} */\n        els[i2]\n      );\n      const options2 = JSON.parse((_a = els[i2].getAttribute(\"data-options\")) != null ? _a : \"\");\n      const apexChart = new _ApexCharts(el, options2);\n      apexChart.render();\n    }\n  }\n  /**\n   * This static method allows users to call chart methods without necessarily from the\n   * instance of the chart in case user has assigned chartID to the targeted chart.\n   * The chartID is used for mapping the instance stored in Apex._chartInstances global variable\n   *\n   * This is helpful in cases when you don't have reference of the chart instance\n   * easily and need to call the method from anywhere.\n   * For eg, in React/Vue applications when you have many parent/child components,\n   * and need easy reference to other charts for performing dynamic operations\n   *\n   * @param {string} chartID - The unique identifier which will be used to call methods\n   * on that chart instance\n   * @param {string} fn - The method name to call\n   * @param {...any} opts - The parameters which are accepted in the original method will be passed here in the same order.\n   */\n  static exec(chartID, fn, ...opts) {\n    const chart = this.getChartByID(chartID);\n    if (!chart) return;\n    chart.w.globals.isExecCalled = true;\n    let ret = null;\n    if (chart.publicMethods.indexOf(fn) !== -1) {\n      ret = /** @type {any} */\n      chart[fn](...opts);\n    }\n    return ret;\n  }\n  /**\n   * Deep-merges `source` into `target` and returns the result.\n   * Thin wrapper around the internal `Utils.extend` utility.\n   *\n   * @param {object} target\n   * @param {object} source\n   * @returns {object}\n   */\n  static merge(target, source) {\n    return Utils$1.extend(target, source);\n  }\n  static getThemePalettes() {\n    return getThemePalettes();\n  }\n  /**\n   * Register additional chart types. Used by sub-entry points so that only\n   * the types they include are bundled.\n   *\n   * @param {Record<string, new (...args: any[]) => any>} typeMap  e.g. { line: Line, area: Line }\n   */\n  static use(typeMap) {\n    register(typeMap);\n  }\n  /**\n   * Register optional feature modules (Exports, Legend, Toolbar,\n   * ZoomPanSelection, KeyboardNavigation, Annotations).\n   *\n   * Call this before rendering any chart. Feature entry files (e.g.\n   * `apexcharts/features/legend`) call this automatically when imported.\n   * Note: Tooltip is part of core and does not need to be registered.\n   *\n   * @param {Record<string, new (...args: any[]) => any>} featureMap  e.g. { legend: Legend, exports: Exports }\n   */\n  static registerFeatures(featureMap) {\n    InitCtxVariables.registerFeatures(featureMap);\n  }\n  /**\n   * Set the license key that unlocks the premium features (storyboard, link /\n   * crossfilter, ink, measure, contextMenu, perspectives, history). Without a\n   * valid key those features still work but the chart shows an \"APEXCHARTS\"\n   * trial watermark; a valid key removes it. Keys are shared across the whole\n   * ApexCharts family (apexgantt, apextree, apexsankey, apex-grid-enterprise,\n   * apexstock), so one customer key works everywhere.\n   *\n   * Call before render(). The watermark is re-evaluated on every render/update,\n   * so a late setLicense(validKey) followed by chart.update() clears it.\n   *\n   * Precedence per chart: `chart.license` (most specific) -> this key ->\n   * `window.Apex.license` -> unlicensed (trial).\n   *\n   * @param {string} key  the `APEX-<base64(JSON)>` license key\n   * @returns {typeof ApexCharts}\n   */\n  static setLicense(key) {\n    o.setLicense(key);\n    reevaluateLicenseAcrossCharts();\n    return _ApexCharts;\n  }\n  /**\n   * Register a Weave plugin definition (a plain { name, setup } object).\n   * Lives in core so plugins can always be registered; they only activate when\n   * the Weave host is bundled (`import 'apexcharts/features/weave'`, included in\n   * the full bundle) and listed in a chart's `plugins` config.\n   *\n   * @param {{ name: string, apiVersion?: number, setup: Function, destroy?: Function }} def\n   * @returns {typeof ApexCharts}\n   */\n  static registerPlugin(def) {\n    registerPlugin(def);\n    return _ApexCharts;\n  }\n  /**\n   * Remove a registered Weave plugin definition. Charts already holding an\n   * active instance keep it until their plugins config changes or they are\n   * destroyed; the name simply stops resolving for new activations. Intended\n   * for tests and hot-reload flows.\n   * @param {string} name\n   * @returns {typeof ApexCharts}\n   */\n  static unregisterPlugin(name2) {\n    unregisterPlugin(name2);\n    return _ApexCharts;\n  }\n  /**\n   * Register a non-SVG series renderer (Strata #2). SVG is built in; the canvas\n   * backend registers itself via `import 'apexcharts/features/renderer-canvas'`.\n   * When a `kind` is not registered, selection falls back to SVG.\n   *\n   * @param {string} kind  e.g. 'canvas'\n   * @param {(w: any, ctx: any) => any} factory  returns a Renderer instance\n   */\n  static registerRenderer(kind, factory) {\n    RendererController.registerRenderer(kind, factory);\n  }\n  /**\n   * Register a custom series type (Marks #11): a `{ renderItem }` definition\n   * that draws primitives (path/line/rect/circle/text) per datum. Requires the\n   * Marks feature to be bundled (`import 'apexcharts/features/marks'`, included\n   * in the full bundle); without it this warns and no-ops. Once registered, use\n   * it via `series[].type` or `chart.type`.\n   *\n   * @param {string} name  the type name, e.g. 'dumbbell'\n   * @param {{ renderItem: Function, dataType?: string, yExtent?: Function, tooltip?: Function }} def\n   * @returns {typeof ApexCharts}\n   */\n  static registerSeriesType(name2, def) {\n    const factory = (\n      /** @type {any} */\n      _ApexCharts._customSeriesFactory\n    );\n    if (!factory) {\n      console.warn(\n        `[apexcharts] registerSeriesType(\"${name2}\") requires the Marks feature: import 'apexcharts/features/marks'.`\n      );\n      return _ApexCharts;\n    }\n    if (!def || typeof def.renderItem !== \"function\") {\n      console.warn(\n        `[apexcharts] registerSeriesType(\"${name2}\") needs a def with a renderItem() function.`\n      );\n      return _ApexCharts;\n    }\n    if (hasChartClass(name2) && !isCustom(name2)) {\n      console.warn(\n        `[apexcharts] registerSeriesType(\"${name2}\") would override the built-in \"${name2}\" chart type; pick another name.`\n      );\n      return _ApexCharts;\n    }\n    register({ [name2]: factory(name2, def) });\n    markCustom(name2);\n    return _ApexCharts;\n  }\n  /**\n   * Remove a custom series type registered via registerSeriesType. Built-in\n   * chart types cannot be unregistered. Intended for tests and hot-reload.\n   * @param {string} name\n   * @returns {typeof ApexCharts}\n   */\n  static unregisterSeriesType(name2) {\n    if (isCustom(name2)) unregister(name2);\n    return _ApexCharts;\n  }\n  /**\n   * Facet (#13): register a named theme (palette + design tokens + mode)\n   * referenceable via `theme: { name }`. The theme sits below explicit config\n   * and CSS `--apx-*` tokens, above the built-in palette/mode defaults.\n   *\n   * @param {string} name  the theme name, e.g. 'brand'\n   * @param {any} def  { mode?, palette?, tokens?, monochrome?, accessibility? }\n   * @returns {typeof ApexCharts}\n   */\n  static registerTheme(name2, def) {\n    registerTheme(name2, def);\n    return _ApexCharts;\n  }\n  /**\n   * Remove a theme registered via registerTheme. Charts referencing it by\n   * `theme.name` fall back to the built-in defaults on their next render.\n   * Intended for tests and hot-reload flows.\n   * @param {string} name\n   * @returns {typeof ApexCharts}\n   */\n  static unregisterTheme(name2) {\n    unregisterTheme(name2);\n    return _ApexCharts;\n  }\n  /**\n   * Cadence (#6): register a named easing function referenceable via\n   * `chart.animations.easing: '<name>'`. `fn` maps linear progress t in [0,1]\n   * to eased progress (back/elastic curves may overshoot 1).\n   *\n   * @param {string} name  the easing name, e.g. 'bounce'\n   * @param {(t:number)=>number} fn\n   * @returns {typeof ApexCharts}\n   */\n  static registerEasing(name2, fn) {\n    registerEasing(name2, fn);\n    return _ApexCharts;\n  }\n  /**\n   * Register a named unit-chart layout, referenceable via\n   * `plotOptions.unit.positions: '<name>'` with `plotOptions.unit.layout:\n   * 'custom'`.\n   *\n   * A layout is objects in, positions out: `(objects, rect) => [{id, x, y,\n   * r?}]`, in plot pixels. It knows nothing about animation, because the engine\n   * already tweens position, radius and colour and already keeps each mark's\n   * identity across a relayout. That is what lets an arrangement the engine\n   * cannot know about - a country silhouette, a hex grid, a timeline, a\n   * projection supplied by ApexMaps - be a plugin rather than a core change.\n   *\n   * Marks whose id the layout omits animate out; ids matching no mark are\n   * ignored.\n   *\n   * @param {string} name  the layout name, e.g. 'silhouette'\n   * @param {(objects: any[], rect: {x:number,y:number,width:number,height:number}) => any[]} fn\n   * @returns {typeof ApexCharts}\n   */\n  static registerUnitLayout(name2, fn) {\n    registerUnitLayout(name2, fn);\n    return _ApexCharts;\n  }\n  /**\n   * Remove a layout registered via registerUnitLayout. Charts referencing it by\n   * name fall back to the grouped layout on their next render.\n   * @param {string} name\n   * @returns {typeof ApexCharts}\n   */\n  static unregisterUnitLayout(name2) {\n    unregisterUnitLayout(name2);\n    return _ApexCharts;\n  }\n  /**\n   * Register a row source: given a chart's state, what rows is each of its\n   * marks standing for?\n   *\n   * Most marks cannot answer. An ordinary bar aggregates rows the library never\n   * saw. The types that can are the ones whose series carries raw observations\n   * (histogram, boxPlot, violin), and their sources ship with the statistics in\n   * `apexcharts/features/stats`; core keeps only the lookup.\n   *\n   * The function returns a unit-chart series (one cluster per mark, one datum\n   * per row) in the marks' own draw order, or null. See RowSourceRegistry for\n   * why that order is a contract rather than a convention.\n   *\n   * @param {string} name  chart type name, matched against `chart.requestedType` then `chart.type`\n   * @param {(w: any, opts?: any) => any[] | null} fn\n   * @returns {typeof ApexCharts}\n   */\n  static registerRowSource(name2, fn) {\n    registerRowSource(name2, fn);\n    return _ApexCharts;\n  }\n  /**\n   * Remove a row source registered via registerRowSource.\n   * @param {string} name\n   * @returns {typeof ApexCharts}\n   */\n  static unregisterRowSource(name2) {\n    unregisterRowSource(name2);\n    return _ApexCharts;\n  }\n  /**\n   * The rows behind this chart's marks, as a unit-chart series.\n   *\n   * A histogram bar stands for the observations it counted, a box for the\n   * sample it summarises. This hands them back as one cluster per mark, so a\n   * mark can come apart into its own rows:\n   *\n   *     chart.updateOptions({ chart: { type: 'unit' }, series: chart.rowSeries() })\n   *\n   * With the morph feature loaded, each dot then leaves from the part of the\n   * mark that was standing for it, and collapsing back is the inverse.\n   *\n   * Returns null when the chart's type cannot name its rows, or when\n   * `apexcharts/features/stats` (which carries the sources for the types that\n   * can) is not loaded.\n   *\n   * @param {{ maxRows?: number }} [opts] `maxRows` caps the dots produced\n   *   (default 3000, matching the jitter overlay); past it every cluster is\n   *   thinned by one shared stride so their relative sizes survive.\n   * @returns {any[]|null}\n   */\n  rowSeries(opts) {\n    const source = rowSourceFor(this.w);\n    if (!source) return null;\n    return source(this.w, opts) || null;\n  }\n  /**\n   * Linked Views (#4) Phase 2: get-or-create a crossfilter coordinator by id.\n   * Register one shared record set, then let each chart declare a dimension +\n   * reduction under `chart.link`. Selecting in one chart re-aggregates the\n   * others over the filtered subset.\n   *\n   * Lives in core (always callable) but the engine ships in the `link` feature\n   * (`import 'apexcharts/features/link'`, included in the full bundle); without\n   * it this warns and returns null so the engine shakes out when unused.\n   *\n   * @param {{ id: string, records?: any[] }} opts\n   * @returns {any} the coordinator handle, or null if the feature is absent\n   */\n  static crossfilter(opts) {\n    if (!opts || typeof opts.id !== \"string\") {\n      throw new Error(\"ApexCharts.crossfilter requires an { id } string.\");\n    }\n    const factory = (\n      /** @type {any} */\n      _ApexCharts._crossfilterFactory\n    );\n    if (!factory) {\n      console.warn(\n        `[apexcharts] ApexCharts.crossfilter(...) requires the link feature: import 'apexcharts/features/link'.`\n      );\n      return null;\n    }\n    const coordinator = factory(opts);\n    reevaluateLicenseAcrossCharts();\n    return coordinator;\n  }\n  /**\n   * Look up an existing crossfilter coordinator by id (null if none / feature\n   * absent).\n   * @param {string} id\n   * @returns {any}\n   */\n  static getCrossfilter(id) {\n    const get = (\n      /** @type {any} */\n      _ApexCharts._crossfilterGet\n    );\n    return get ? get(id) : null;\n  }\n  /**\n   * Linked Views (#4): clear crossfilter dimming across this chart and every\n   * chart in its `chart.group`. No-op unless the `link` feature is bundled.\n   */\n  clearCrossfilter() {\n    var _a;\n    (_a = this.linkedViews) == null ? void 0 : _a.clearGroup();\n  }\n  /**\n   * Measure ruler (#18): arm a sticky measure-ruler mode (drag A->B on the\n   * plot to read dx/dy/%change/slope). Alternatively hold the measure key\n   * (chart.measure.key, default 'm') and drag. No-op unless the `measure`\n   * feature is bundled and chart.measure.enabled.\n   */\n  startMeasure() {\n    var _a;\n    (_a = this.measure) == null ? void 0 : _a.startMeasure();\n  }\n  /** Measure ruler (#18): leave measure mode. */\n  stopMeasure() {\n    var _a;\n    (_a = this.measure) == null ? void 0 : _a.stopMeasure();\n  }\n  /** Measure ruler (#18): remove all pinned measure rulers. */\n  clearMeasures() {\n    var _a;\n    (_a = this.measure) == null ? void 0 : _a.clearMeasures();\n  }\n  /**\n   * Toggles (show/hide) the series identified by name.\n   * Mirrors a click on the corresponding legend item.\n   *\n   * @param {string} seriesName\n   * @returns {object | undefined} The collapsed series object, if now hidden.\n   */\n  toggleSeries(seriesName) {\n    return this.series.toggleSeries(seriesName);\n  }\n  /**\n   * Highlights or un-highlights a series when the user hovers a legend item.\n   * Called internally by the legend; not typically called by consumers.\n   *\n   * @param {MouseEvent} e\n   * @param {HTMLElement} targetElement - The legend marker element being hovered.\n   */\n  highlightSeriesOnLegendHover(e2, targetElement) {\n    return this.series.toggleSeriesOnHover(e2, targetElement);\n  }\n  /**\n   * Makes a previously hidden series visible and re-renders.\n   *\n   * @param {string} seriesName\n   */\n  showSeries(seriesName) {\n    this.series.showSeries(seriesName);\n  }\n  /**\n   * Hides a visible series and re-renders.\n   *\n   * @param {string} seriesName\n   */\n  hideSeries(seriesName) {\n    this.series.hideSeries(seriesName);\n  }\n  /**\n   * Highlights (dims all other series) the series identified by name.\n   *\n   * @param {string} seriesName\n   */\n  highlightSeries(seriesName) {\n    this.series.highlightSeries(seriesName);\n  }\n  /**\n   * Returns whether the series identified by name is currently hidden.\n   *\n   * @param {string} seriesName\n   * @returns {boolean}\n   */\n  isSeriesHidden(seriesName) {\n    return this.series.isSeriesHidden(seriesName);\n  }\n  /**\n   * Resets the chart to the initial series and optionally the initial zoom level.\n   *\n   * @param {boolean} [shouldUpdateChart=true] - When true, triggers a re-render.\n   * @param {boolean} [shouldResetZoom=true] - When true, restores the initial zoom level.\n   */\n  resetSeries(shouldUpdateChart = true, shouldResetZoom = true) {\n    this.series.resetSeries(shouldUpdateChart, shouldResetZoom);\n  }\n  /**\n   * Subscribes to a chart event by name.\n   * Supported event names mirror the `chart.events` option keys\n   * (e.g. `'mounted'`, `'updated'`, `'dataPointMouseEnter'`).\n   *\n   * @param {string} name - Event name.\n   * @param {Function} handler - Callback invoked when the event fires.\n   */\n  addEventListener(name2, handler) {\n    this.events.addEventListener(name2, handler);\n  }\n  /**\n   * Removes a previously registered event listener.\n   *\n   * @param {string} name - Event name.\n   * @param {Function} handler - The exact function reference passed to addEventListener.\n   */\n  removeEventListener(name2, handler) {\n    this.events.removeEventListener(name2, handler);\n  }\n  /**\n   * Adds an x-axis annotation dynamically after render.\n   *\n   * @param {XAxisAnnotations} opts - Annotation configuration.\n   * @param {boolean} [pushToMemory=true] - When true, the annotation persists across re-renders.\n   * @param {ApexCharts} [context] - Override the target chart instance (used by exec()).\n   */\n  addXaxisAnnotation(opts, pushToMemory = true, context = void 0) {\n    var _a;\n    let me = (\n      /** @type {ApexCharts} */\n      /** @type {unknown} */\n      this\n    );\n    if (context) {\n      me = context;\n    }\n    (_a = me.annotations) == null ? void 0 : _a.addXaxisAnnotationExternal(opts, pushToMemory, me);\n  }\n  /**\n   * Adds a y-axis annotation dynamically after render.\n   *\n   * @param {YAxisAnnotations} opts - Annotation configuration.\n   * @param {boolean} [pushToMemory=true] - When true, the annotation persists across re-renders.\n   * @param {ApexCharts} [context] - Override the target chart instance (used by exec()).\n   */\n  addYaxisAnnotation(opts, pushToMemory = true, context = void 0) {\n    var _a;\n    let me = (\n      /** @type {ApexCharts} */\n      /** @type {unknown} */\n      this\n    );\n    if (context) {\n      me = context;\n    }\n    (_a = me.annotations) == null ? void 0 : _a.addYaxisAnnotationExternal(opts, pushToMemory, me);\n  }\n  /**\n   * Adds a point annotation dynamically after render.\n   *\n   * @param {PointAnnotations} opts - Annotation configuration.\n   * @param {boolean} [pushToMemory=true] - When true, the annotation persists across re-renders.\n   * @param {ApexCharts} [context] - Override the target chart instance (used by exec()).\n   */\n  addPointAnnotation(opts, pushToMemory = true, context = void 0) {\n    var _a;\n    let me = (\n      /** @type {ApexCharts} */\n      /** @type {unknown} */\n      this\n    );\n    if (context) {\n      me = context;\n    }\n    (_a = me.annotations) == null ? void 0 : _a.addPointAnnotationExternal(opts, pushToMemory, me);\n  }\n  /**\n   * Removes all annotations from the chart.\n   *\n   * @param {ApexCharts} [context] - Override the target chart instance (used by exec()).\n   */\n  clearAnnotations(context = void 0) {\n    var _a;\n    let me = (\n      /** @type {ApexCharts} */\n      /** @type {unknown} */\n      this\n    );\n    if (context) {\n      me = context;\n    }\n    me.lastUpdateOptions = null;\n    (_a = me.annotations) == null ? void 0 : _a.clearAnnotations(me);\n  }\n  /**\n   * Removes a specific annotation by its `id`.\n   *\n   * @param {string} id - The annotation id as set in the annotation config.\n   * @param {ApexCharts} [context] - Override the target chart instance (used by exec()).\n   */\n  removeAnnotation(id, context = void 0) {\n    var _a;\n    let me = (\n      /** @type {ApexCharts} */\n      /** @type {unknown} */\n      this\n    );\n    if (context) {\n      me = context;\n    }\n    me.lastUpdateOptions = null;\n    (_a = me.annotations) == null ? void 0 : _a.removeAnnotation(me, id);\n  }\n  /**\n   * Returns the inner SVG group element that contains all chart graphics.\n   *\n   * @returns {Element | null}\n   */\n  getChartArea() {\n    const el = this.w.dom.baseEl.querySelector(\".apexcharts-inner\");\n    return el;\n  }\n  /**\n   * Returns the sum of all data points whose x value falls within [minX, maxX].\n   *\n   * @param {number} minX\n   * @param {number} maxX\n   * @returns {number[]} One total per series.\n   */\n  getSeriesTotalXRange(minX, maxX) {\n    return this.coreUtils.getSeriesTotalsXRange(minX, maxX);\n  }\n  /**\n   * Returns the highest y value in the specified series.\n   *\n   * @param {number} [seriesIndex=0]\n   * @returns {number}\n   */\n  getHighestValueInSeries(seriesIndex = 0) {\n    const range = new Range(this.w);\n    return range.getMinYMaxY(seriesIndex).highestY;\n  }\n  /**\n   * Returns the lowest y value in the specified series.\n   *\n   * @param {number} [seriesIndex=0]\n   * @returns {number}\n   */\n  getLowestValueInSeries(seriesIndex = 0) {\n    const range = new Range(this.w);\n    return range.getMinYMaxY(seriesIndex).lowestY;\n  }\n  /**\n   * Returns the sum of each series (the totals used for percentage calculations).\n   *\n   * @returns {number[]}\n   */\n  getSeriesTotal() {\n    return this.w.globals.seriesTotals;\n  }\n  /**\n   * Returns a curated snapshot of chart state for use in formatters, events,\n   * and external integrations. Prefer this over accessing `chart.w` directly.\n   *\n   * The shape of this object is stable and versioned. `chart.w` is internal\n   * and will be restricted in a future major version.\n   */\n  getState() {\n    const w2 = this.w;\n    const gl = w2.globals;\n    return {\n      // Series data — computed/parsed form used for rendering\n      series: w2.seriesData.series,\n      seriesNames: w2.seriesData.seriesNames,\n      colors: gl.colors,\n      labels: w2.labelData.labels,\n      seriesTotals: gl.seriesTotals,\n      seriesPercent: gl.seriesPercent,\n      seriesXvalues: gl.seriesXvalues,\n      seriesYvalues: gl.seriesYvalues,\n      // Axis bounds — updated after each render\n      minX: gl.minX,\n      maxX: gl.maxX,\n      minY: gl.minY,\n      maxY: gl.maxY,\n      minYArr: gl.minYArr,\n      maxYArr: gl.maxYArr,\n      minXDiff: gl.minXDiff,\n      dataPoints: gl.dataPoints,\n      // Axis scale objects — computed tick/scale results\n      xAxisScale: gl.xAxisScale,\n      yAxisScale: gl.yAxisScale,\n      xTickAmount: gl.xTickAmount,\n      // Axis type flags\n      isXNumeric: w2.axisFlags.isXNumeric,\n      // Multi-axis series mapping\n      seriesYAxisMap: gl.seriesYAxisMap,\n      seriesYAxisReverseMap: gl.seriesYAxisReverseMap,\n      // Chart dimensions — updated after each render/resize\n      svgWidth: gl.svgWidth,\n      svgHeight: gl.svgHeight,\n      gridWidth: w2.layout.gridWidth,\n      gridHeight: w2.layout.gridHeight,\n      // Interactive state\n      selectedDataPoints: w2.interact.selectedDataPoints,\n      collapsedSeriesIndices: gl.collapsedSeriesIndices,\n      zoomed: w2.interact.zoomed,\n      // Chart-type-specific series data (null when not applicable)\n      seriesX: w2.seriesData.seriesX,\n      seriesZ: w2.seriesData.seriesZ,\n      seriesCandleO: w2.candleData.seriesCandleO,\n      seriesCandleH: w2.candleData.seriesCandleH,\n      seriesCandleM: w2.candleData.seriesCandleM,\n      seriesCandleL: w2.candleData.seriesCandleL,\n      seriesCandleC: w2.candleData.seriesCandleC,\n      seriesRangeStart: w2.rangeData.seriesRangeStart,\n      seriesRangeEnd: w2.rangeData.seriesRangeEnd,\n      seriesGoals: w2.seriesData.seriesGoals\n    };\n  }\n  /**\n   * Programmatically selects or deselects a data point.\n   * Equivalent to a user click on the data point.\n   *\n   * @param {number} seriesIndex - Zero-based series index.\n   * @param {number} [dataPointIndex] - Zero-based data point index within the series.\n   * @returns {number[][] | null} Updated selectedDataPoints array, or null.\n   */\n  toggleDataPointSelection(seriesIndex, dataPointIndex) {\n    return this.updateHelpers.toggleDataPointSelection(\n      seriesIndex,\n      dataPointIndex\n    );\n  }\n  /**\n   * Programmatically zooms the x-axis to the given range.\n   * Requires zoom to be enabled (`chart.zoom.enabled: true`).\n   *\n   * @param {number} min - The minimum x value (timestamp or numeric).\n   * @param {number} max - The maximum x value (timestamp or numeric).\n   */\n  zoomX(min, max) {\n    var _a;\n    (_a = this.ctx.toolbar) == null ? void 0 : _a.zoomUpdateOptions(min, max);\n  }\n  /**\n   * Switches the active locale, updating all locale-dependent labels (toolbar tooltips, month names, etc.).\n   *\n   * @param {string} localeName - Must match a locale name defined in `chart.locales`.\n   */\n  setLocale(localeName) {\n    this.localization.setCurrentLocaleValues(localeName);\n  }\n  /**\n   * Exports the chart to a PNG or SVG data URI.\n   * Requires the Exports feature: `import 'apexcharts/features/exports'`.\n   *\n   * @param {{ scale?: number, width?: number }} [options]\n   * @returns {Promise<{ imgURI: string } | { blob: Blob }>}\n   */\n  dataURI(options2) {\n    if (!this.ctx.exports)\n      throw new Error(\n        \"apexcharts: Exports feature is not registered. Import apexcharts/features/exports.\"\n      );\n    return this.ctx.exports.dataURI(options2);\n  }\n  /**\n   * Returns the chart's SVG markup as a string, optionally scaled.\n   * Requires the Exports feature: `import 'apexcharts/features/exports'`.\n   *\n   * @param {number} [scale=1]\n   * @returns {Promise<string>}\n   */\n  getSvgString(scale) {\n    if (!this.ctx.exports)\n      throw new Error(\n        \"apexcharts: Exports feature is not registered. Import apexcharts/features/exports.\"\n      );\n    return this.ctx.exports.getSvgString(scale);\n  }\n  /**\n   * Triggers a CSV download of the chart's data.\n   * Requires the Exports feature: `import 'apexcharts/features/exports'`.\n   *\n   * @param {{ series?: any, fileName?: string, columnDelimiter?: string, lineDelimiter?: string }} [options]\n   */\n  exportToCSV(options2 = {}) {\n    if (!this.ctx.exports)\n      throw new Error(\n        \"apexcharts: Exports feature is not registered. Import apexcharts/features/exports.\"\n      );\n    return this.ctx.exports.exportToCSV(options2);\n  }\n  paper() {\n    return this.w.dom.Paper;\n  }\n  /**\n   * Returns the active series renderer for the last render: `'svg'` (default)\n   * or `'canvas'` (Strata #2). `'auto'`/`'canvas'` resolve to `'svg'` unless the\n   * canvas renderer feature is bundled and no canvas-unsupported feature is in\n   * use. See `chart.renderer` / `chart.rendererThreshold`.\n   *\n   * @returns {'svg' | 'canvas' | 'gpu'}\n   */\n  getActiveRenderer() {\n    return this.rendererController ? this.rendererController.getActiveKind() : \"svg\";\n  }\n  /**\n   * Facet (#13): re-resolve the `--apx-*` design tokens and re-render.\n   *\n   * Tokens are read from the CSS cascade once per render, so a runtime change\n   * that is NOT an OS color-scheme flip (e.g. the host app swaps its own\n   * design-system theme by toggling a class or setting style properties) is\n   * invisible until the next render, and `updateOptions({})` is memoized away.\n   * This busts the memo and re-renders, picking up the current token values.\n   * @returns {Promise<any>}\n   */\n  refreshTokens() {\n    this.lastUpdateOptions = null;\n    return this.update();\n  }\n  /**\n   * Drills into the child level referenced by `id` (a `chart.drilldown.series` entry).\n   * Requires the Drilldown feature: `import 'apexcharts/features/drilldown'`.\n   *\n   * @param {string|number} id - The drilldown series id to navigate into.\n   * @returns {Promise<ApexCharts>}\n   */\n  drillDown(id) {\n    if (!this.ctx.drilldown)\n      throw new Error(\n        \"apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.\"\n      );\n    return this.ctx.drilldown.drillDown(id);\n  }\n  /**\n   * Navigates back one drilldown level.\n   * Requires the Drilldown feature: `import 'apexcharts/features/drilldown'`.\n   *\n   * @returns {Promise<ApexCharts>}\n   */\n  drillUp() {\n    if (!this.ctx.drilldown)\n      throw new Error(\n        \"apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.\"\n      );\n    return this.ctx.drilldown.drillUp();\n  }\n  /**\n   * Navigates back to the root drilldown level.\n   * Requires the Drilldown feature: `import 'apexcharts/features/drilldown'`.\n   *\n   * @returns {Promise<ApexCharts>}\n   */\n  drillToRoot() {\n    if (!this.ctx.drilldown)\n      throw new Error(\n        \"apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.\"\n      );\n    return this.ctx.drilldown.drillToRoot();\n  }\n  /**\n   * Drops levels cached from `drilldown.onDrillDown`, so the next drill re-runs\n   * the resolver. Call it when the data behind an already-drilled chart changes.\n   * Requires the Drilldown feature: `import 'apexcharts/features/drilldown'`.\n   *\n   * @param {string|number} [id] - A single level id, or every level when omitted.\n   * @returns {ApexCharts}\n   */\n  clearDrilldownCache(id) {\n    if (!this.ctx.drilldown)\n      throw new Error(\n        \"apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.\"\n      );\n    return this.ctx.drilldown.clearCache(id);\n  }\n  // ─── Slice write-back stubs ─────────────────────────────────────────────────\n  /**\n   * Copy own DATA properties of a parse-state slice onto a live w.* slice.\n   * Never Object.assign here: several w.* fields (and, historically, snapshot\n   * fields) are lazy accessors, and [[Get]]-ing an accessor while copying\n   * forces its deferred computation (a deep initialSeries clone plus O(n)\n   * stacked-totals passes on every render/update) and can replace the live\n   * accessor with a materialized value for the life of the instance.\n   * @param {any} target\n   * @param {any} slice\n   */\n  static _writeDataProps(target, slice) {\n    for (const key of Object.keys(slice)) {\n      const d = Object.getOwnPropertyDescriptor(slice, key);\n      if (d && \"value\" in d) target[key] = d.value;\n    }\n  }\n  /**\n   * @param {Partial<import('./types/internal').SeriesData>} slice\n   */\n  _writeParsedSeriesData(slice) {\n    _ApexCharts._writeDataProps(this.w.seriesData, slice);\n  }\n  /**\n   * @param {Partial<import('./types/internal').RangeData>} slice\n   */\n  _writeParsedRangeData(slice) {\n    _ApexCharts._writeDataProps(this.w.rangeData, slice);\n  }\n  /**\n   * @param {Partial<import('./types/internal').CandleData>} slice\n   */\n  _writeParsedCandleData(slice) {\n    _ApexCharts._writeDataProps(this.w.candleData, slice);\n  }\n  /**\n   * @param {Partial<import('./types/internal').LabelData>} slice\n   */\n  _writeParsedLabelData(slice) {\n    _ApexCharts._writeDataProps(this.w.labelData, slice);\n  }\n  /**\n   * @param {Partial<import('./types/internal').AxisFlags>} slice\n   */\n  _writeParsedAxisFlags(slice) {\n    _ApexCharts._writeDataProps(this.w.axisFlags, slice);\n  }\n  /**\n   * @param {Partial<import('./types/internal').LayoutCoords>} slice\n   */\n  _writeLayoutCoords(slice) {\n    _ApexCharts._writeDataProps(this.w.layout, slice);\n  }\n  _parentResizeCallback() {\n    if (this.w.globals.animationEnded && this.w.config.chart.redrawOnParentResize) {\n      this._windowResize();\n    }\n  }\n  /**\n   * Handle window resize and re-draw the whole chart.\n   */\n  _windowResize() {\n    this.w.globals.resizeTimer = window.setTimeout(() => {\n      const gl = this.w.globals;\n      if (this.core && gl.lastResizeSignature) {\n        const sig = this.core.getResizeSignature();\n        if (sig.w === gl.lastResizeSignature.w && sig.h === gl.lastResizeSignature.h && sig.iw === gl.lastResizeSignature.iw) {\n          return;\n        }\n      }\n      gl.resized = true;\n      gl.dataChanged = false;\n      this.ctx.update();\n    }, 150);\n  }\n  _windowResizeHandler() {\n    var _a;\n    clearTimeout((_a = this.w.globals.resizeTimer) != null ? _a : void 0);\n    let { redrawOnWindowResize: redraw } = this.w.config.chart;\n    if (typeof redraw === \"function\") {\n      redraw = /** @type {any} */\n      redraw();\n    }\n    redraw && this._windowResize();\n  }\n};\n/**\n * Static Perspectives helpers (decode/fromURL), populated by the perspectives\n * feature when imported (`import 'apexcharts/features/perspectives'`); null\n * otherwise. Declared here as a placeholder so core stays free of the\n * Perspectives module while the assignment in the feature file type-checks.\n * @type {any}\n */\n__publicField(_ApexCharts, \"perspectives\", null);\nlet ApexCharts = _ApexCharts;\nclass Exports {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n  }\n  /**\n   * @param {string} svgString\n   */\n  svgStringToNode(svgString) {\n    const parser = new DOMParser();\n    const svgDoc = parser.parseFromString(svgString, \"image/svg+xml\");\n    return svgDoc.documentElement;\n  }\n  /**\n   * @param {any} svg\n   * @param {number} scale\n   */\n  scaleSvgNode(svg, scale) {\n    const svgWidth = parseFloat(svg.getAttributeNS(null, \"width\"));\n    const svgHeight = parseFloat(svg.getAttributeNS(null, \"height\"));\n    svg.setAttributeNS(null, \"width\", svgWidth * scale);\n    svg.setAttributeNS(null, \"height\", svgHeight * scale);\n    svg.setAttributeNS(null, \"viewBox\", \"0 0 \" + svgWidth + \" \" + svgHeight);\n  }\n  /**\n   * Inline any Strata canvas series layer into the clone as an SVG `<image>`.\n   * A serialized `<canvas>` loses its bitmap, so a canvas-mode export would drop\n   * the series; an `<image>` carrying the canvas `toDataURL()` preserves it in\n   * place. Because it replaces the `<foreignObject>` at the same DOM position,\n   * the grid-behind / annotations-in-front z-order is retained automatically.\n   * No-op in SVG mode (no series canvas present).\n   * @param {any} clonedNode the cloned elWrap about to be serialized\n   */\n  inlineCanvasLayers(clonedNode) {\n    const w2 = this.w;\n    const XLINK = \"http://www.w3.org/1999/xlink\";\n    const origCanvases = w2.dom.elWrap.querySelectorAll(\n      \".apexcharts-series-canvas\"\n    );\n    if (!origCanvases.length) return;\n    const clonedFOs = clonedNode.querySelectorAll(\".apexcharts-canvas-series\");\n    for (let i2 = 0; i2 < origCanvases.length && i2 < clonedFOs.length; i2++) {\n      let dataURL;\n      try {\n        dataURL = /** @type {HTMLCanvasElement} */\n        origCanvases[i2].toDataURL();\n      } catch (e2) {\n        continue;\n      }\n      const fo = clonedFOs[i2];\n      const img = document.createElementNS(SVGNS$2, \"image\");\n      img.setAttribute(\"x\", fo.getAttribute(\"x\") || \"0\");\n      img.setAttribute(\"y\", fo.getAttribute(\"y\") || \"0\");\n      img.setAttribute(\"width\", fo.getAttribute(\"width\") || \"0\");\n      img.setAttribute(\"height\", fo.getAttribute(\"height\") || \"0\");\n      img.setAttribute(\"href\", dataURL);\n      img.setAttributeNS(XLINK, \"xlink:href\", dataURL);\n      if (fo.parentNode) fo.parentNode.replaceChild(img, fo);\n    }\n  }\n  /**\n   * `querySelectorAll` as a typed array. Both HTML and SVG elements carry\n   * `style` / `classList`, but `NodeListOf<Element>` does not.\n   * @param {ParentNode} root\n   * @param {string} selector\n   * @returns {Array<HTMLElement | SVGElement>}\n   */\n  queryStyleable(root, selector) {\n    return (\n      /** @type {Array<HTMLElement | SVGElement>} */\n      Array.prototype.slice.call(root.querySelectorAll(selector))\n    );\n  }\n  /**\n   * Applies `styles` only where the element has no inline value for that\n   * property yet.\n   *\n   * The rules being re-applied here came from a stylesheet, so anything a\n   * module set inline has to keep winning exactly like it does in the live\n   * DOM: `legend.fontSize` (Legend.js) and the heatmap gradient legend's\n   * deliberate `display`/`overflow`/`padding` overrides on the legend wrap\n   * (HeatmapGradientLegend.js) would otherwise be clobbered in the export.\n   * @param {HTMLElement | SVGElement} el\n   * @param {Record<string, string>} styles\n   */\n  setStyleDefaults(el, styles) {\n    Object.keys(styles).forEach((prop) => {\n      if (el.style.getPropertyValue(prop) === \"\") {\n        el.style.setProperty(prop, styles[prop]);\n      }\n    });\n  }\n  /**\n   * Re-applies, as inline styles on the clone, the rules that used to reach\n   * the exported SVG through an injected `<style>` block. A strict\n   * Content-Security-Policy without `'unsafe-inline'` blocks that block and\n   * breaks the export, so the export must not depend on one. See #5146.\n   *\n   * Mirrors `src/assets/apexcharts-legend.css`. Interaction-only rules\n   * (`cursor`, `pointer-events`) are carried over for parity even though they\n   * do nothing in a static image; the layout rules are what matter.\n   * @param {HTMLElement} clonedNode the cloned elWrap about to be serialized\n   */\n  applyExportStyles(clonedNode) {\n    const w2 = this.w;\n    this.queryStyleable(clonedNode, \"style\").forEach((el) => el.remove());\n    this.queryStyleable(\n      clonedNode,\n      [\n        \".apexcharts-tooltip\",\n        \".apexcharts-toolbar\",\n        \".apexcharts-xaxistooltip\",\n        \".apexcharts-yaxistooltip\",\n        \".apexcharts-xcrosshairs\",\n        \".apexcharts-ycrosshairs\",\n        \".apexcharts-zoom-rect\",\n        \".apexcharts-selection-rect\"\n      ].join(\", \")\n    ).forEach((el) => {\n      el.style.setProperty(\"display\", \"none\", \"important\");\n    });\n    this.queryStyleable(clonedNode, \".apexcharts-flip-y\").forEach((el) => {\n      this.setStyleDefaults(el, {\n        transform: \"scaleY(-1) translateY(-100%)\",\n        \"transform-origin\": \"top\",\n        \"transform-box\": \"fill-box\"\n      });\n    });\n    this.queryStyleable(clonedNode, \".apexcharts-flip-x\").forEach((el) => {\n      this.setStyleDefaults(el, {\n        transform: \"scaleX(-1)\",\n        \"transform-origin\": \"center\",\n        \"transform-box\": \"fill-box\"\n      });\n    });\n    if (!w2.config.legend.show || !w2.dom.elLegendWrap || !w2.dom.elLegendWrap.children.length) {\n      return;\n    }\n    this.queryStyleable(clonedNode, \".apexcharts-legend\").forEach((el) => {\n      this.setStyleDefaults(el, {\n        display: \"flex\",\n        overflow: \"auto\",\n        padding: \"0 10px\"\n      });\n      const cl = el.classList;\n      const isSide = cl.contains(\"apx-legend-position-left\") || cl.contains(\"apx-legend-position-right\");\n      const isTopOrBottom = cl.contains(\"apx-legend-position-top\") || cl.contains(\"apx-legend-position-bottom\");\n      if (cl.contains(\"apexcharts-legend-group-horizontal\")) {\n        this.setStyleDefaults(el, { \"flex-direction\": \"column\" });\n      }\n      if (isSide) {\n        this.setStyleDefaults(el, { \"flex-direction\": \"column\", bottom: \"0\" });\n      }\n      if (isTopOrBottom) {\n        this.setStyleDefaults(el, { \"flex-wrap\": \"wrap\" });\n      }\n      if (isSide || isTopOrBottom && cl.contains(\"apexcharts-align-left\")) {\n        this.setStyleDefaults(el, {\n          \"justify-content\": \"flex-start\",\n          \"align-items\": \"flex-start\"\n        });\n      } else if (isTopOrBottom && cl.contains(\"apexcharts-align-center\")) {\n        this.setStyleDefaults(el, {\n          \"justify-content\": \"center\",\n          \"align-items\": \"center\"\n        });\n      } else if (isTopOrBottom && cl.contains(\"apexcharts-align-right\")) {\n        this.setStyleDefaults(el, {\n          \"justify-content\": \"flex-end\",\n          \"align-items\": \"flex-end\"\n        });\n      }\n    });\n    this.queryStyleable(clonedNode, \".apexcharts-legend-group\").forEach(\n      (el) => {\n        this.setStyleDefaults(el, { display: \"flex\" });\n      }\n    );\n    this.queryStyleable(\n      clonedNode,\n      \".apexcharts-legend-group-vertical\"\n    ).forEach((el) => {\n      this.setStyleDefaults(el, { \"flex-direction\": \"column-reverse\" });\n    });\n    this.queryStyleable(clonedNode, \".apexcharts-legend-series\").forEach(\n      (el) => {\n        this.setStyleDefaults(el, {\n          cursor: el.classList.contains(\"apexcharts-no-click\") ? \"auto\" : \"pointer\",\n          \"line-height\": \"normal\",\n          display: \"flex\",\n          \"align-items\": \"center\"\n        });\n      }\n    );\n    this.queryStyleable(clonedNode, \".apexcharts-legend-text\").forEach((el) => {\n      this.setStyleDefaults(el, {\n        position: \"relative\",\n        \"font-size\": \"14px\"\n      });\n    });\n    this.queryStyleable(clonedNode, \".apexcharts-legend-marker\").forEach(\n      (el) => {\n        this.setStyleDefaults(el, {\n          position: \"relative\",\n          display: \"flex\",\n          \"align-items\": \"center\",\n          \"justify-content\": \"center\",\n          cursor: \"pointer\",\n          \"margin-right\": \"1px\"\n        });\n      }\n    );\n    this.queryStyleable(clonedNode, \".apexcharts-inactive-legend\").forEach(\n      (el) => {\n        this.setStyleDefaults(el, { opacity: \"0.45\" });\n      }\n    );\n    this.queryStyleable(\n      clonedNode,\n      \".apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series\"\n    ).forEach((el) => {\n      el.style.setProperty(\"display\", \"none\", \"important\");\n    });\n  }\n  /**\n   * The colour a raster export paints under the chart.\n   *\n   * A PNG needs an opaque base, so `dataURI` fills the canvas before drawing\n   * the SVG onto it. That fill used to be `#fff` whenever `chart.background`\n   * was unset *or* `'transparent'`, which is wrong for a dark theme:\n   * `theme.mode: 'dark'` moves `chart.foreColor` to a near-white `#f6f7f8` but\n   * leaves the background alone, so `background: 'transparent'` produced\n   * near-white labels, axes and legend on white — a PNG that looked like it had\n   * lost all its text. See #2920.\n   *\n   * The unset-background case was already covered: `Core.setupElements` paints\n   * the SVG paper `#343A3F` for a dark theme, and the clone carries that inline\n   * style into the export. `'transparent'` is the gap, because it makes that\n   * paper style transparent too and nothing is left to cover the white fill.\n   *\n   * An explicit non-transparent `chart.background` still wins, including one\n   * written by the Facet `--apx-surface` token (Theme assigns it into the same\n   * field).\n   * @returns {string}\n   */\n  resolveExportBackground() {\n    const w2 = this.w;\n    const bg = w2.config.chart.background;\n    if (bg && bg !== \"transparent\") return bg;\n    return w2.config.theme.mode === \"dark\" ? \"#343A3F\" : \"#fff\";\n  }\n  /**\n   * Font families the rendered chart actually paints with.\n   *\n   * Read off the live DOM rather than the config: computed styles resolve\n   * `chart.fontFamily`, every per-element `style.fontFamily` override, and any\n   * family the chart inherits from the page, none of which are reliably\n   * enumerable from config alone. The clone is not in the document, so its\n   * computed styles would come back empty.\n   * @returns {Set<string>}\n   */\n  collectFontFamilies() {\n    const families = /* @__PURE__ */ new Set();\n    const w2 = this.w;\n    if (!Environment.isBrowser() || !w2.dom.elWrap) return families;\n    const els = this.queryStyleable(\n      w2.dom.elWrap,\n      \"text, tspan, .apexcharts-legend-text, .apexcharts-title-text, .apexcharts-subtitle-text\"\n    );\n    const all = [w2.dom.elWrap, ...els];\n    all.forEach((el) => {\n      const cs = (\n        /** @type {any} */\n        BrowserAPIs.getComputedStyle(\n          /** @type {any} */\n          el\n        )\n      );\n      const ff = cs && cs.fontFamily;\n      if (!ff) return;\n      ff.split(\",\").forEach((name2) => {\n        const clean = name2.trim().replace(/^['\"]|['\"]$/g, \"\");\n        if (clean) families.add(clean.toLowerCase());\n      });\n    });\n    return families;\n  }\n  /**\n   * Every `@font-face` rule reachable from the document, as `{ family, css }`.\n   *\n   * Same-origin sheets are read through `cssRules`. A cross-origin sheet throws\n   * on that access, so it is re-fetched by href and its `@font-face` blocks are\n   * pulled out of the text: that is the path that matters in practice, since\n   * hosted webfonts (the subject of #3617) are exactly the cross-origin case.\n   * @returns {Promise<Array<{family: string, css: string}>>}\n   */\n  collectFontFaceRules() {\n    if (!Environment.isBrowser()) return Promise.resolve([]);\n    const found = [];\n    const remote = [];\n    const pushFromText = (cssText) => {\n      const blocks = cssText.match(/@font-face\\s*\\{[^}]*\\}/gi) || [];\n      blocks.forEach((css) => {\n        const m2 = css.match(/font-family\\s*:\\s*([^;}]+)/i);\n        if (!m2) return;\n        const family = m2[1].trim().replace(/^['\"]|['\"]$/g, \"\");\n        found.push({ family: family.toLowerCase(), css });\n      });\n    };\n    const sheets = Array.from(document.styleSheets || []);\n    sheets.forEach((sheet) => {\n      let rules = null;\n      try {\n        rules = sheet.cssRules;\n      } catch (e2) {\n        rules = null;\n      }\n      if (rules) {\n        Array.from(rules).forEach((rule) => {\n          if (rule.type === 5 && rule.cssText) pushFromText(rule.cssText);\n        });\n        return;\n      }\n      if (sheet.href) {\n        remote.push(\n          fetch(sheet.href).then((r2) => r2.ok ? r2.text() : \"\").then(pushFromText).catch(() => {\n          })\n        );\n      }\n    });\n    return Promise.all(remote).then(() => found);\n  }\n  /**\n   * Inline the `@font-face` rules for the families the chart uses, with the\n   * font files themselves as base64 data URIs, into the exported SVG.\n   *\n   * Needed because the export is a standalone document: rasterizing it through\n   * `<img src=\"data:image/svg+xml,...\">` gives it no access to the page's\n   * stylesheets *or* its loaded fonts, and an SVG-as-image may not fetch\n   * external resources at all. Without this the text silently reflows into a\n   * generic fallback face. See #3617.\n   *\n   * `@font-face` only exists as a stylesheet construct, so unlike the rules in\n   * `applyExportStyles` this cannot be expressed as inline styles and has to\n   * ship as a `<style>` element. A page whose CSP forbids inline styles will\n   * drop it and fall back to today's behaviour, which is why the whole thing is\n   * best-effort: any failure leaves the export exactly as it was.\n   * @param {any} svgNode the parsed outer <svg> about to be serialized\n   * @returns {Promise<void>}\n   */\n  embedFonts(svgNode) {\n    const w2 = this.w;\n    if (!Environment.isBrowser() || !w2.config.chart.toolbar.export.embedFonts || typeof fetch !== \"function\") {\n      return Promise.resolve();\n    }\n    const used = this.collectFontFamilies();\n    if (!used.size) return Promise.resolve();\n    return this.collectFontFaceRules().then((faces) => {\n      const wanted = faces.filter((f) => used.has(f.family));\n      if (!wanted.length) return Promise.resolve([]);\n      return Promise.all(\n        wanted.map(\n          (face) => this.inlineFontFaceUrls(face.css).catch(() => null)\n        )\n      );\n    }).then((cssBlocks) => {\n      const css = (cssBlocks || []).filter(Boolean).join(\"\\n\");\n      if (!css) return;\n      const style = document.createElementNS(SVGNS$2, \"style\");\n      style.textContent = css;\n      svgNode.insertBefore(style, svgNode.firstChild);\n    }).catch(() => {\n    });\n  }\n  /**\n   * Replace every remote `url(...)` in one `@font-face` block with a base64\n   * data URI. Resolves to null if no url could be fetched, so the caller can\n   * drop a block that would only reference unreachable files.\n   * @param {string} css\n   * @returns {Promise<string | null>}\n   */\n  inlineFontFaceUrls(css) {\n    const urls = [];\n    const re = /url\\(\\s*(['\"]?)([^'\")]+)\\1\\s*\\)/gi;\n    let m2;\n    while ((m2 = re.exec(css)) !== null) {\n      if (!m2[2].startsWith(\"data:\")) urls.push(m2[2]);\n    }\n    if (!urls.length) return Promise.resolve(css.includes(\"data:\") ? css : null);\n    return Promise.all(\n      urls.map(\n        (url) => this.fetchAsDataUri(url).then((dataUri) => ({ url, dataUri })).catch(() => ({ url, dataUri: null }))\n      )\n    ).then((results) => {\n      let out = css;\n      let replaced = 0;\n      results.forEach(({ url, dataUri }) => {\n        if (!dataUri) return;\n        out = out.split(url).join(dataUri);\n        replaced++;\n      });\n      return replaced ? out : null;\n    });\n  }\n  /**\n   * Fetch a binary asset as a base64 data URI.\n   *\n   * Uses `fetch` rather than the `<img>`+canvas route in `getBase64FromUrl`:\n   * that route only works for raster images and taints the canvas for any\n   * response without CORS headers, whereas this works for fonts too and fails\n   * cleanly when CORS denies it.\n   * @param {string} url\n   * @returns {Promise<string>}\n   */\n  fetchAsDataUri(url) {\n    if (typeof fetch !== \"function\" || typeof btoa !== \"function\") {\n      return Promise.reject(new Error(\"fetch unavailable\"));\n    }\n    return fetch(url).then((res) => {\n      if (!res.ok) throw new Error(`HTTP ${res.status} for ${url}`);\n      const type = res.headers.get(\"content-type\") || \"application/octet-stream\";\n      return res.arrayBuffer().then((buf) => {\n        const bytes = new Uint8Array(buf);\n        let binary = \"\";\n        const CHUNK = 32768;\n        for (let i2 = 0; i2 < bytes.length; i2 += CHUNK) {\n          binary += String.fromCharCode.apply(\n            null,\n            /** @type {any} */\n            bytes.subarray(i2, i2 + CHUNK)\n          );\n        }\n        return `data:${type};base64,${btoa(binary)}`;\n      });\n    });\n  }\n  /**\n   * @param {number} [_scale]\n   */\n  getSvgString(_scale) {\n    return new Promise((resolve) => {\n      const w2 = this.w;\n      let scale = _scale || w2.config.chart.toolbar.export.scale || w2.config.chart.toolbar.export.width / w2.globals.svgWidth;\n      if (!scale) {\n        scale = 1;\n      }\n      const width = w2.globals.svgWidth * scale;\n      const height = w2.globals.svgHeight * scale;\n      const clonedNode = (\n        /** @type {HTMLElement} */\n        w2.dom.elWrap.cloneNode(true)\n      );\n      clonedNode.style.width = width + \"px\";\n      clonedNode.style.height = height + \"px\";\n      this.inlineCanvasLayers(clonedNode);\n      this.applyExportStyles(clonedNode);\n      const serializedNode = new XMLSerializer().serializeToString(clonedNode);\n      let svgString = `\n        <svg xmlns=\"http://www.w3.org/2000/svg\"\n          version=\"1.1\"\n          xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n          class=\"apexcharts-svg\"\n          xmlns:data=\"ApexChartsNS\"\n          transform=\"translate(0, 0)\"\n          width=\"${w2.globals.svgWidth}px\" height=\"${w2.globals.svgHeight}px\">\n          <foreignObject width=\"100%\" height=\"100%\">\n            <div xmlns=\"http://www.w3.org/1999/xhtml\" style=\"width:${width}px; height:${height}px;\">\n              ${serializedNode}\n            </div>\n          </foreignObject>\n        </svg>\n      `;\n      const svgNode = this.svgStringToNode(svgString);\n      if (scale !== 1) {\n        this.scaleSvgNode(svgNode, scale);\n      }\n      Promise.all([\n        this.convertImagesToBase64(svgNode),\n        this.embedFonts(svgNode)\n      ]).then(() => {\n        svgString = new XMLSerializer().serializeToString(svgNode);\n        resolve(svgString.replace(/&nbsp;/g, \"&#160;\"));\n      });\n    });\n  }\n  /**\n   * Turn every remote `<image>` in the export into an inline data URI.\n   *\n   * This is not an optimisation: an SVG rasterized through `<img src=\"data:...\">`\n   * is not allowed to fetch external resources, so any href left pointing at a\n   * URL vanishes from the PNG entirely. Image annotations and `hollow.image`\n   * were disappearing from downloads for exactly this reason. See #3170.\n   *\n   * Two things were missing before. `SVGContainer.image()` writes `xlink:href`,\n   * but Strata's inlined canvas layers and hand-authored `customSVG` markup use\n   * the plain `href` form, and only the namespaced attribute was being read.\n   * And conversion went through `<img>`+canvas, which taints (and therefore\n   * throws) for any response without CORS headers, so a cross-origin icon,\n   * the common case, silently failed. `fetch` is tried first and only falls\n   * back to the canvas route, which still helps for a same-origin image on a\n   * page whose CSP blocks `connect-src`.\n   * @param {any} svgNode\n   */\n  convertImagesToBase64(svgNode) {\n    const XLINK = \"http://www.w3.org/1999/xlink\";\n    const images = svgNode.getElementsByTagName(\"image\");\n    const promises = Array.from(images).map((img) => {\n      const nsHref = img.getAttributeNS(XLINK, \"href\");\n      const plainHref = img.getAttribute(\"href\");\n      const href = nsHref || plainHref;\n      if (!href || href.startsWith(\"data:\")) return Promise.resolve();\n      const write = (base64) => {\n        if (nsHref) img.setAttributeNS(XLINK, \"href\", base64);\n        if (plainHref || !nsHref) img.setAttribute(\"href\", base64);\n      };\n      return this.fetchAsDataUri(href).then(write).catch(\n        () => this.getBase64FromUrl(href).then(write).catch((error) => {\n          console.error(\"Error converting image to base64:\", error);\n        })\n      );\n    });\n    return Promise.all(promises);\n  }\n  /**\n   * @param {string} url\n   */\n  getBase64FromUrl(url) {\n    if (Environment.isSSR()) return Promise.resolve(url);\n    return new Promise((resolve, reject) => {\n      const img = new Image();\n      img.crossOrigin = \"Anonymous\";\n      img.onload = () => {\n        const canvas = document.createElement(\"canvas\");\n        canvas.width = img.width;\n        canvas.height = img.height;\n        const ctx = canvas.getContext(\"2d\");\n        if (ctx) ctx.drawImage(img, 0, 0);\n        resolve(canvas.toDataURL());\n      };\n      img.onerror = reject;\n      img.src = url;\n    });\n  }\n  svgUrl() {\n    return new Promise((resolve) => {\n      this.getSvgString().then((svgData) => {\n        const svgBlob = new Blob([svgData], {\n          type: \"image/svg+xml;charset=utf-8\"\n        });\n        resolve(URL.createObjectURL(svgBlob));\n      });\n    });\n  }\n  /**\n   * @param {Record<string, any> | undefined} options\n   */\n  dataURI(options2) {\n    if (Environment.isSSR()) return Promise.resolve({ imgURI: \"\" });\n    return new Promise((resolve) => {\n      const w2 = this.w;\n      const scale = options2 ? options2.scale || options2.width / w2.globals.svgWidth : 1;\n      const canvas = document.createElement(\"canvas\");\n      canvas.width = w2.globals.svgWidth * scale;\n      canvas.height = parseInt(w2.dom.elWrap.style.height, 10) * scale;\n      const canvasBg = this.resolveExportBackground();\n      const ctx = canvas.getContext(\"2d\");\n      if (!ctx) return;\n      ctx.fillStyle = canvasBg;\n      ctx.fillRect(0, 0, canvas.width, canvas.height);\n      this.getSvgString(scale).then((svgData) => {\n        const svgUrl = \"data:image/svg+xml,\" + encodeURIComponent(svgData);\n        const img = new Image();\n        img.crossOrigin = \"anonymous\";\n        img.onload = () => {\n          ctx.drawImage(img, 0, 0);\n          const edgeCanvas = canvas;\n          if (edgeCanvas.msToBlob) {\n            const blob = edgeCanvas.msToBlob();\n            resolve({ blob });\n          } else {\n            const imgURI = canvas.toDataURL(\"image/png\");\n            resolve({ imgURI });\n          }\n        };\n        img.src = svgUrl;\n      });\n    });\n  }\n  exportToSVG() {\n    this.svgUrl().then((url) => {\n      this.triggerDownload(\n        url,\n        this.w.config.chart.toolbar.export.svg.filename,\n        \".svg\"\n      );\n    });\n  }\n  exportToPng() {\n    const scale = this.w.config.chart.toolbar.export.scale;\n    const width = this.w.config.chart.toolbar.export.width;\n    const option = scale ? { scale } : width ? { width } : void 0;\n    this.dataURI(option).then(({ imgURI, blob }) => {\n      if (blob) {\n        navigator.msSaveOrOpenBlob(blob, this.w.globals.chartID + \".png\");\n      } else {\n        this.triggerDownload(\n          imgURI,\n          this.w.config.chart.toolbar.export.png.filename,\n          \".png\"\n        );\n      }\n    });\n  }\n  /** @param {{ series?: any, fileName?: any, columnDelimiter?: string, lineDelimiter?: string }} opts */\n  exportToCSV({\n    series,\n    fileName,\n    columnDelimiter = \",\",\n    lineDelimiter = \"\\n\"\n  }) {\n    const w2 = this.w;\n    if (!series) series = w2.config.series;\n    let columns = [];\n    const rows = [];\n    let result = \"\";\n    const universalBOM = \"\\uFEFF\";\n    const gSeries = w2.seriesData.series.map((s2, i2) => {\n      return w2.globals.collapsedSeriesIndices.indexOf(i2) === -1 ? s2 : [];\n    });\n    const csvSafe = (val) => {\n      if (val == null || Utils$1.isNumber(val)) return val;\n      const s2 = String(val);\n      return /^[=+\\-@\\t\\r]/.test(s2) ? `'${s2}` : s2;\n    };\n    const getFormattedCategory = (cat) => {\n      if (typeof w2.config.chart.toolbar.export.csv.categoryFormatter === \"function\") {\n        return w2.config.chart.toolbar.export.csv.categoryFormatter(cat);\n      }\n      if (w2.config.xaxis.type === \"datetime\" && String(cat).length >= 10) {\n        return new Date(cat).toDateString();\n      }\n      return Utils$1.isNumber(cat) ? cat : csvSafe(cat.split(columnDelimiter).join(\"\"));\n    };\n    const getFormattedValue = (value) => {\n      return typeof w2.config.chart.toolbar.export.csv.valueFormatter === \"function\" ? w2.config.chart.toolbar.export.csv.valueFormatter(value) : csvSafe(value);\n    };\n    const seriesMaxDataLength = Math.max(\n      ...series.map((s2) => {\n        return s2.data ? s2.data.length : 0;\n      })\n    );\n    const dataFormat = new Data(this.w);\n    const axesUtils = new AxesUtils(this.w, {\n      theme: this.ctx.theme,\n      timeScale: this.ctx.timeScale\n    });\n    const getCat = (i2) => {\n      let cat = \"\";\n      if (!w2.globals.axisCharts) {\n        cat = w2.config.labels[i2];\n      } else {\n        if (w2.config.xaxis.type === \"category\" || w2.config.xaxis.convertedCatToNumeric) {\n          if (w2.globals.isBarHorizontal) {\n            const lbFormatter = w2.formatters.yLabelFormatters[0];\n            const sr = new Series(this.ctx.w);\n            const activeSeries = sr.getActiveConfigSeriesIndex();\n            cat = lbFormatter(w2.labelData.labels[i2], {\n              seriesIndex: activeSeries,\n              dataPointIndex: i2,\n              w: w2\n            });\n          } else {\n            cat = axesUtils.getLabel(\n              w2.labelData.labels,\n              w2.labelData.timescaleLabels,\n              0,\n              i2\n            ).text;\n          }\n        }\n        if (w2.config.xaxis.type === \"datetime\") {\n          if (w2.config.xaxis.categories.length) {\n            cat = w2.config.xaxis.categories[i2];\n          } else if (w2.config.labels.length) {\n            cat = w2.config.labels[i2];\n          }\n        }\n      }\n      if (cat === null) return \"nullvalue\";\n      if (Array.isArray(cat)) {\n        cat = cat.join(\" \");\n      }\n      return Utils$1.isNumber(cat) ? cat : cat.split(columnDelimiter).join(\"\");\n    };\n    const getEmptyDataForCsvColumn = () => {\n      return [...Array(seriesMaxDataLength)].map(() => \"\");\n    };\n    const handleAxisRowsColumns = (s2, sI) => {\n      var _a, _b, _c, _d, _e, _f;\n      if (columns.length && sI === 0) {\n        rows.push(columns.join(columnDelimiter));\n      }\n      if (s2.data) {\n        const rowData = s2.data.length ? s2.data : getEmptyDataForCsvColumn();\n        for (let i2 = 0; i2 < rowData.length; i2++) {\n          columns = [];\n          let cat = getCat(i2);\n          if (cat === \"nullvalue\") continue;\n          if (!cat) {\n            if (dataFormat.isFormatXY()) {\n              cat = series[sI].data[i2].x;\n            } else if (dataFormat.isFormat2DArray()) {\n              cat = series[sI].data[i2] ? series[sI].data[i2][0] : \"\";\n            }\n          }\n          if (sI === 0) {\n            columns.push(getFormattedCategory(cat));\n            for (let ci = 0; ci < w2.seriesData.series.length; ci++) {\n              const value = dataFormat.isFormatXY() ? (_a = series[ci].data[i2]) == null ? void 0 : _a.y : gSeries[ci][i2];\n              columns.push(getFormattedValue(value));\n            }\n          }\n          if (w2.config.chart.type === \"candlestick\" || s2.type && s2.type === \"candlestick\") {\n            columns.pop();\n            columns.push(w2.candleData.seriesCandleO[sI][i2]);\n            columns.push(w2.candleData.seriesCandleH[sI][i2]);\n            columns.push(w2.candleData.seriesCandleL[sI][i2]);\n            columns.push(w2.candleData.seriesCandleC[sI][i2]);\n          }\n          if (w2.config.chart.type === \"boxPlot\" || s2.type && s2.type === \"boxPlot\") {\n            columns.pop();\n            columns.push(w2.candleData.seriesCandleO[sI][i2]);\n            columns.push(w2.candleData.seriesCandleH[sI][i2]);\n            columns.push(w2.candleData.seriesCandleM[sI][i2]);\n            columns.push(w2.candleData.seriesCandleL[sI][i2]);\n            columns.push(w2.candleData.seriesCandleC[sI][i2]);\n          }\n          if (w2.config.chart.type === \"rangeBar\") {\n            columns.pop();\n            columns.push(w2.rangeData.seriesRangeStart[sI][i2]);\n            columns.push(w2.rangeData.seriesRangeEnd[sI][i2]);\n          }\n          if (w2.config.chart.type === \"violin\" || s2.type && s2.type === \"violin\") {\n            columns.pop();\n            columns.push((_b = w2.violinData.seriesViolinMin[sI]) == null ? void 0 : _b[i2]);\n            columns.push((_c = w2.violinData.seriesViolinMax[sI]) == null ? void 0 : _c[i2]);\n            columns.push((_f = (_e = (_d = w2.violinData.seriesViolinPoints[sI]) == null ? void 0 : _d[i2]) == null ? void 0 : _e.length) != null ? _f : 0);\n          }\n          if (columns.length) {\n            rows.push(columns.join(columnDelimiter));\n          }\n        }\n      }\n    };\n    const handleUnequalXValues = () => {\n      const categories = /* @__PURE__ */ new Set();\n      const data = {};\n      series.forEach((s2, sI) => {\n        s2 == null ? void 0 : s2.data.forEach((dataItem) => {\n          let cat, value;\n          if (dataFormat.isFormatXY()) {\n            cat = dataItem.x;\n            value = dataItem.y;\n          } else if (dataFormat.isFormat2DArray()) {\n            cat = dataItem[0];\n            value = dataItem[1];\n          } else {\n            return;\n          }\n          if (!/** @type {Record<string,any>} */\n          data[cat]) {\n            data[cat] = Array(\n              series.length\n            ).fill(\"\");\n          }\n          data[cat][sI] = getFormattedValue(value);\n          categories.add(cat);\n        });\n      });\n      if (columns.length) {\n        rows.push(columns.join(columnDelimiter));\n      }\n      Array.from(categories).sort().forEach((cat) => {\n        const values = (\n          /** @type {Record<string,any>} */\n          data[cat]\n        );\n        rows.push([getFormattedCategory(cat), ...values].join(columnDelimiter));\n      });\n    };\n    columns.push(w2.config.chart.toolbar.export.csv.headerCategory);\n    if (w2.config.chart.type === \"boxPlot\") {\n      columns.push(\"minimum\");\n      columns.push(\"q1\");\n      columns.push(\"median\");\n      columns.push(\"q3\");\n      columns.push(\"maximum\");\n    } else if (w2.config.chart.type === \"candlestick\") {\n      columns.push(\"open\");\n      columns.push(\"high\");\n      columns.push(\"low\");\n      columns.push(\"close\");\n    } else if (w2.config.chart.type === \"rangeBar\") {\n      columns.push(\"minimum\");\n      columns.push(\"maximum\");\n    } else if (w2.config.chart.type === \"violin\") {\n      columns.push(\"minimum\");\n      columns.push(\"maximum\");\n      columns.push(\"observations\");\n    } else {\n      series.map((s2, sI) => {\n        const sname = (s2.name ? s2.name : `series-${sI}`) + \"\";\n        if (w2.globals.axisCharts) {\n          columns.push(\n            sname.split(columnDelimiter).join(\"\") ? sname.split(columnDelimiter).join(\"\") : `series-${sI}`\n          );\n        }\n      });\n    }\n    if (!w2.globals.axisCharts) {\n      columns.push(w2.config.chart.toolbar.export.csv.headerValue);\n      rows.push(columns.join(columnDelimiter));\n    }\n    if (!w2.globals.allSeriesHasEqualX && w2.globals.axisCharts && !w2.config.xaxis.categories.length && !w2.config.labels.length) {\n      handleUnequalXValues();\n    } else {\n      series.map((s2, sI) => {\n        if (w2.globals.axisCharts) {\n          handleAxisRowsColumns(s2, sI);\n        } else {\n          columns = [];\n          columns.push(getFormattedCategory(w2.labelData.labels[sI]));\n          columns.push(getFormattedValue(gSeries[sI]));\n          rows.push(columns.join(columnDelimiter));\n        }\n      });\n    }\n    result += rows.join(lineDelimiter);\n    this.triggerDownload(\n      \"data:text/csv; charset=utf-8,\" + encodeURIComponent(universalBOM + result),\n      fileName ? fileName : w2.config.chart.toolbar.export.csv.filename,\n      \".csv\"\n    );\n  }\n  /**\n   * @param {string} href\n   * @param {string} filename\n   * @param {string} ext\n   */\n  triggerDownload(href, filename, ext) {\n    if (Environment.isSSR()) return;\n    const downloadLink = document.createElement(\"a\");\n    downloadLink.href = href;\n    downloadLink.download = (filename ? filename : this.w.globals.chartID) + ext;\n    document.body.appendChild(downloadLink);\n    downloadLink.click();\n    document.body.removeChild(downloadLink);\n  }\n}\nApexCharts.registerFeatures({ exports: Exports });\nconst apexchartsLegendCSS = \".apexcharts-flip-y {\\n  transform: scaleY(-1) translateY(-100%);\\n  transform-origin: top;\\n  transform-box: fill-box;\\n}\\n.apexcharts-flip-x {\\n  transform: scaleX(-1);\\n  transform-origin: center;\\n  transform-box: fill-box;\\n}\\n.apexcharts-legend {\\n  display: flex;\\n  overflow: auto;\\n  padding: 0 10px;\\n}\\n.apexcharts-legend.apexcharts-legend-group-horizontal {\\n  flex-direction: column;\\n}\\n.apexcharts-legend-group {\\n  display: flex;\\n}\\n.apexcharts-legend-group-vertical {\\n  flex-direction: column-reverse;\\n}\\n.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\\n  flex-wrap: wrap\\n}\\n.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\\n  flex-direction: column;\\n  bottom: 0;\\n}\\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\\n  justify-content: flex-start;\\n  align-items: flex-start;\\n}\\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\\n  justify-content: center;\\n  align-items: center;\\n}\\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\\n  justify-content: flex-end;\\n  align-items: flex-end;\\n}\\n.apexcharts-legend-series {\\n  cursor: pointer;\\n  line-height: normal;\\n  display: flex;\\n  align-items: center;\\n}\\n.apexcharts-legend-text {\\n  position: relative;\\n  font-size: 14px;\\n}\\n.apexcharts-legend-text *, .apexcharts-legend-marker * {\\n  pointer-events: none;\\n}\\n.apexcharts-legend-marker {\\n  position: relative;\\n  display: flex;\\n  align-items: center;\\n  justify-content: center;\\n  cursor: pointer;\\n  margin-right: 1px;\\n}\\n\\n.apexcharts-legend-series.apexcharts-no-click {\\n  cursor: auto;\\n}\\n.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\\n  display: none !important;\\n}\\n.apexcharts-inactive-legend {\\n  opacity: 0.45;\\n} \";\nlet Helpers$3 = class Helpers2 {\n  /**\n   * @param {import('./Legend').default} lgCtx\n   */\n  constructor(lgCtx) {\n    this.w = lgCtx.w;\n    this.lgCtx = lgCtx;\n  }\n  getLegendStyles() {\n    if (Environment.isSSR()) return null;\n    const stylesheet = document.createElement(\"style\");\n    stylesheet.setAttribute(\"type\", \"text/css\");\n    const nonce = this.w.config.chart.nonce;\n    if (nonce) {\n      stylesheet.setAttribute(\"nonce\", nonce);\n    }\n    const rule = document.createTextNode(apexchartsLegendCSS);\n    stylesheet.appendChild(rule);\n    return stylesheet;\n  }\n  getLegendDimensions() {\n    const w2 = this.w;\n    const currLegendsWrap = w2.dom.baseEl.querySelector(\".apexcharts-legend\");\n    if (!currLegendsWrap) {\n      return { clwh: 0, clww: 0 };\n    }\n    const { width: currLegendsWrapWidth, height: currLegendsWrapHeight } = currLegendsWrap.getBoundingClientRect();\n    return {\n      clwh: currLegendsWrapHeight,\n      clww: currLegendsWrapWidth\n    };\n  }\n  appendToForeignObject() {\n    var _a;\n    const legendStyles = this.getLegendStyles();\n    if (this.w.config.chart.injectStyleSheet !== false && legendStyles) {\n      (_a = this.w.dom.elLegendForeign) == null ? void 0 : _a.appendChild(legendStyles);\n    }\n  }\n  /**\n   * @param {number} seriesCnt\n   * @param {boolean} isHidden\n   */\n  toggleDataSeries(seriesCnt, isHidden) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    if (w2.globals.axisCharts || w2.config.chart.type === \"radialBar\") {\n      w2.globals.resized = true;\n      let seriesEl = null;\n      let realIndex = null;\n      w2.globals.risingSeries = [];\n      if (w2.globals.axisCharts) {\n        seriesEl = (_a = Array.prototype.find.call(\n          w2.dom.baseEl.querySelectorAll(\".apexcharts-series\"),\n          (el) => el.getAttribute(\"data:realIndex\") === String(seriesCnt)\n        )) != null ? _a : null;\n        if (!seriesEl) return;\n        realIndex = parseInt((_b = seriesEl.getAttribute(\"data:realIndex\")) != null ? _b : \"\", 10);\n      } else {\n        seriesEl = w2.dom.baseEl.querySelector(\n          `.apexcharts-series[rel='${seriesCnt + 1}']`\n        );\n        if (!seriesEl) return;\n        realIndex = parseInt((_c = seriesEl.getAttribute(\"rel\")) != null ? _c : \"\", 10) - 1;\n      }\n      if (isHidden) {\n        const seriesToMakeVisible = [\n          {\n            cs: w2.globals.collapsedSeries,\n            csi: w2.globals.collapsedSeriesIndices\n          },\n          {\n            cs: w2.globals.ancillaryCollapsedSeries,\n            csi: w2.globals.ancillaryCollapsedSeriesIndices\n          }\n        ];\n        seriesToMakeVisible.forEach((r2) => {\n          const cs = (\n            /** @type {any} */\n            r2.cs\n          );\n          const csi = (\n            /** @type {any} */\n            r2.csi\n          );\n          this.riseCollapsedSeries(\n            cs,\n            csi,\n            /** @type {number} */\n            realIndex\n          );\n        });\n      } else {\n        this.hideSeries({ seriesEl, realIndex });\n      }\n      if (w2.config.chart.accessibility.enabled) {\n        const legendItem = w2.dom.baseEl.querySelector(\n          `.apexcharts-legend-series[rel=\"${seriesCnt + 1}\"]`\n        );\n        if (legendItem) {\n          const isCollapsed = w2.globals.collapsedSeriesIndices.includes(realIndex) || w2.globals.ancillaryCollapsedSeriesIndices.includes(realIndex);\n          legendItem.setAttribute(\n            \"aria-pressed\",\n            isCollapsed ? \"true\" : \"false\"\n          );\n          const legendTextEl = legendItem.querySelector(\n            \".apexcharts-legend-text\"\n          );\n          const seriesName = legendTextEl ? legendTextEl.textContent : w2.seriesData.seriesNames[seriesCnt];\n          const statusText = isCollapsed ? \"hidden\" : \"visible\";\n          legendItem.setAttribute(\n            \"aria-label\",\n            `${seriesName}, ${statusText}. Press Enter or Space to toggle.`\n          );\n        }\n      }\n    } else {\n      w2.globals.resized = true;\n      w2.globals.risingSeries = [];\n      if (isHidden) {\n        this.riseCollapsedSeries(\n          w2.globals.collapsedSeries,\n          w2.globals.collapsedSeriesIndices,\n          seriesCnt\n        );\n      } else {\n        const series = this.getSeriesAfterCollapsing({ realIndex: seriesCnt });\n        this.lgCtx.updateSeries(\n          series,\n          w2.config.chart.animations.dynamicAnimation.enabled\n        );\n      }\n      if (w2.config.chart.accessibility.enabled) {\n        const legendItem = w2.dom.baseEl.querySelector(\n          `.apexcharts-legend-series[rel=\"${seriesCnt + 1}\"]`\n        );\n        if (legendItem) {\n          const isCollapsed = w2.globals.collapsedSeriesIndices.includes(seriesCnt);\n          legendItem.setAttribute(\n            \"aria-pressed\",\n            isCollapsed ? \"true\" : \"false\"\n          );\n          const legendTextEl = legendItem.querySelector(\n            \".apexcharts-legend-text\"\n          );\n          const seriesName = legendTextEl ? legendTextEl.textContent : w2.seriesData.seriesNames[seriesCnt];\n          const statusText = isCollapsed ? \"hidden\" : \"visible\";\n          legendItem.setAttribute(\n            \"aria-label\",\n            `${seriesName}, ${statusText}. Press Enter or Space to toggle.`\n          );\n        }\n      }\n    }\n  }\n  /**\n   * Non-axis \"slice\" container. A pie/donut/polarArea slice is normally a\n   * top-level series element (numeric form: `series = [n, n, n]`), but object\n   * form (`series = [{ data: [{ x, y, drilldown }, ...] }]`, which pie/donut\n   * drilldown requires) packs every slice as a data point inside a single\n   * series. Return the array that actually holds the slice values so a\n   * slice/legend index addresses the right thing. Scoped to the pie family so\n   * unit charts (which share this non-axis path) are untouched.\n   * @param {any[]} series\n   * @returns {any[]}\n   */\n  _nonAxisSliceContainer(series) {\n    const type = this.w.config.chart.type;\n    if ((type === \"pie\" || type === \"donut\" || type === \"polarArea\" || type === \"sunburst\") && series.length === 1 && series[0] && typeof series[0] === \"object\" && Array.isArray(series[0].data)) {\n      return series[0].data;\n    }\n    return series;\n  }\n  /**\n   * Read a non-axis slice value (handles `{ x, y }` data points and plain\n   * numbers).\n   * @param {any} sliceEntry\n   * @returns {number}\n   */\n  _readSliceValue(sliceEntry) {\n    if (this.w.config.chart.type === \"unit\" && sliceEntry && Array.isArray(sliceEntry.data)) {\n      return sliceEntry.data;\n    }\n    return sliceEntry && typeof sliceEntry === \"object\" ? sliceEntry.y : sliceEntry;\n  }\n  /**\n   * Write a non-axis slice value in place, preserving `{ x, drilldown, ... }`\n   * on object data points.\n   * @param {any[]} container\n   * @param {number} i\n   * @param {number} value\n   */\n  _writeSliceValue(container, i2, value) {\n    const entry = container[i2];\n    if (this.w.config.chart.type === \"unit\" && entry && Array.isArray(entry.data)) {\n      entry.data = Array.isArray(value) ? value : [];\n      return;\n    }\n    if (entry && typeof entry === \"object\") {\n      entry.y = value;\n    } else {\n      container[i2] = value;\n    }\n  }\n  /** @param {{realIndex: any}} opts */\n  getSeriesAfterCollapsing({ realIndex }) {\n    var _a, _b;\n    const w2 = this.w;\n    const gl = w2.globals;\n    const series = Utils$1.clone(w2.config.series);\n    if (gl.axisCharts) {\n      const yaxis = w2.config.yaxis[gl.seriesYAxisReverseMap[realIndex]];\n      const collapseData = {\n        index: realIndex,\n        data: series[realIndex].data.slice(),\n        type: series[realIndex].type || w2.config.chart.type,\n        // The category name pins the hide across a data update that reorders or\n        // regroups categories (e.g. a storyboard beat): the collapse is\n        // reconciled by name, not index. See Series.reconcileCollapsedByName.\n        name: (gl.seriesNames || [])[realIndex]\n      };\n      if (yaxis && yaxis.show && yaxis.showAlways) {\n        if (gl.ancillaryCollapsedSeriesIndices.indexOf(realIndex) < 0) {\n          gl.ancillaryCollapsedSeries.push(collapseData);\n          gl.ancillaryCollapsedSeriesIndices.push(realIndex);\n        }\n      } else {\n        if (gl.collapsedSeriesIndices.indexOf(realIndex) < 0) {\n          gl.collapsedSeries.push(collapseData);\n          gl.collapsedSeriesIndices.push(realIndex);\n          const removeIndexOfRising = gl.risingSeries.indexOf(realIndex);\n          gl.risingSeries.splice(removeIndexOfRising, 1);\n        }\n      }\n    } else {\n      if (gl.collapsedSeriesIndices.indexOf(realIndex) < 0) {\n        const container = this._nonAxisSliceContainer(series);\n        gl.collapsedSeries.push({\n          index: realIndex,\n          // Store the original slice VALUE so it can be restored on rise. In\n          // object form this is a data point's `y`, not the whole series entry.\n          data: this._readSliceValue(container[realIndex]),\n          type: (\n            /** @type {any} */\n            (_b = (_a = w2.config.series[realIndex]) == null ? void 0 : _a.type) != null ? _b : \"line\"\n          ),\n          // Pin the hide by category name so it survives a regroup (see above).\n          name: (gl.seriesNames || [])[realIndex]\n        });\n        gl.collapsedSeriesIndices.push(realIndex);\n      }\n    }\n    const seriesCount = gl.axisCharts ? w2.config.series.length : this._nonAxisSliceContainer(series).length;\n    gl.allSeriesCollapsed = gl.collapsedSeries.length + gl.ancillaryCollapsedSeries.length === seriesCount;\n    return this._getSeriesBasedOnCollapsedState(series);\n  }\n  /** @param {{seriesEl: any, realIndex: any}} opts */\n  hideSeries({ seriesEl, realIndex }) {\n    const w2 = this.w;\n    const series = this.getSeriesAfterCollapsing({\n      realIndex\n    });\n    const seriesChildren = seriesEl.childNodes;\n    for (let sc = 0; sc < seriesChildren.length; sc++) {\n      if (seriesChildren[sc].classList.contains(\"apexcharts-series-markers-wrap\")) {\n        if (seriesChildren[sc].classList.contains(\"apexcharts-hide\")) {\n          seriesChildren[sc].classList.remove(\"apexcharts-hide\");\n        } else {\n          seriesChildren[sc].classList.add(\"apexcharts-hide\");\n        }\n      }\n    }\n    this.lgCtx.updateSeries(\n      series,\n      w2.config.chart.animations.dynamicAnimation.enabled\n    );\n  }\n  /**\n   * @param {any[]} collapsedSeries\n   * @param {number[]} seriesIndices\n   * @param {number} realIndex\n   */\n  riseCollapsedSeries(collapsedSeries, seriesIndices, realIndex) {\n    const w2 = this.w;\n    let series = Utils$1.clone(w2.config.series);\n    if (collapsedSeries.length > 0) {\n      for (let c2 = 0; c2 < collapsedSeries.length; c2++) {\n        if (collapsedSeries[c2].index === realIndex) {\n          if (w2.globals.axisCharts) {\n            series[realIndex].data = collapsedSeries[c2].data.slice();\n            series[realIndex].hidden = false;\n          } else {\n            const container = this._nonAxisSliceContainer(series);\n            this._writeSliceValue(container, realIndex, collapsedSeries[c2].data);\n          }\n          collapsedSeries.splice(c2, 1);\n          seriesIndices.splice(c2, 1);\n          w2.globals.risingSeries.push(realIndex);\n          c2--;\n        }\n      }\n      series = this._getSeriesBasedOnCollapsedState(series);\n      this.lgCtx.updateSeries(\n        series,\n        w2.config.chart.animations.dynamicAnimation.enabled\n      );\n    }\n  }\n  /**\n   * @param {any[]} series\n   */\n  _getSeriesBasedOnCollapsedState(series) {\n    const w2 = this.w;\n    let collapsed = 0;\n    if (w2.globals.axisCharts) {\n      series.forEach((s2, sI) => {\n        if (!(w2.globals.collapsedSeriesIndices.indexOf(sI) < 0 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(sI) < 0)) {\n          series[sI].data = [];\n          collapsed++;\n        }\n      });\n    } else {\n      const container = this._nonAxisSliceContainer(series);\n      container.forEach((s2, sI) => {\n        if (!(w2.globals.collapsedSeriesIndices.indexOf(sI) < 0)) {\n          this._writeSliceValue(container, sI, 0);\n          collapsed++;\n        }\n      });\n    }\n    const seriesCount = w2.globals.axisCharts ? series.length : this._nonAxisSliceContainer(series).length;\n    w2.globals.allSeriesCollapsed = collapsed === seriesCount;\n    return series;\n  }\n};\nconst DEFAULT_DIVERGING = [\"#cf4d3f\", \"#8f9499\", \"#26a75b\"];\nconst lerp$1 = (a2, b2, t2) => a2 + (b2 - a2) * t2;\nfunction toHexPair(n2) {\n  const v2 = Math.max(0, Math.min(255, Math.round(n2)));\n  return v2.toString(16).padStart(2, \"0\");\n}\nfunction mixColors(c1, c2, t2) {\n  const a2 = Utils$1.parseHex(normalizeHex(c1));\n  const b2 = Utils$1.parseHex(normalizeHex(c2));\n  if (!a2 || !b2) return c1;\n  return \"#\" + toHexPair(lerp$1(a2[0], b2[0], t2)) + toHexPair(lerp$1(a2[1], b2[1], t2)) + toHexPair(lerp$1(a2[2], b2[2], t2));\n}\nfunction normalizeHex(c2) {\n  if (typeof c2 !== \"string\") return \"#000000\";\n  if (Utils$1.isColorHex(c2)) return c2;\n  const asHex = Utils$1.rgb2hex(c2);\n  return asHex || \"#000000\";\n}\nfunction colorValueOf(w2, i2, j) {\n  const series = (\n    /** @type {any} */\n    w2.config.series[i2]\n  );\n  const datum = series && Array.isArray(series.data) ? series.data[j] : null;\n  return colorValueOfDatum(w2, datum, i2, j);\n}\nfunction colorValueOfDatum(w2, datum, i2, j) {\n  var _a, _b, _c;\n  if (!datum || typeof datum !== \"object\") return null;\n  const accessor = (_c = (_b = (_a = w2.config.plotOptions) == null ? void 0 : _a.treemap) == null ? void 0 : _b.colorScale) == null ? void 0 : _c.colorValue;\n  let raw;\n  if (typeof accessor === \"function\") {\n    raw = accessor(datum, { seriesIndex: i2, dataPointIndex: j, w: w2 });\n  } else if (typeof accessor === \"string\") {\n    raw = datum[accessor];\n  } else {\n    raw = datum.colorValue;\n  }\n  if (raw == null) return null;\n  const n2 = Number(raw);\n  return Number.isFinite(n2) ? n2 : null;\n}\nfunction resolveStops(cfg, min, max, midpoint) {\n  if (Array.isArray(cfg.stops) && cfg.stops.length >= 2) {\n    return cfg.stops.filter((s2) => s2 && Number.isFinite(Number(s2.value))).map((s2) => ({\n      value: Number(s2.value),\n      color: normalizeHex(s2.color)\n    })).sort(\n      (a2, b2) => a2.value - b2.value\n    );\n  }\n  const colors = (Array.isArray(cfg.colors) && cfg.colors.length >= 2 ? cfg.colors : DEFAULT_DIVERGING).map(normalizeHex);\n  const n2 = colors.length;\n  if (midpoint != null && n2 >= 3) {\n    const mid = Math.floor((n2 - 1) / 2);\n    const out = [];\n    for (let k = 0; k <= mid; k++) {\n      out.push({ value: lerp$1(min, midpoint, k / mid), color: colors[k] });\n    }\n    for (let k = mid + 1; k < n2; k++) {\n      out.push({\n        value: lerp$1(midpoint, max, (k - mid) / (n2 - 1 - mid)),\n        color: colors[k]\n      });\n    }\n    return out;\n  }\n  return colors.map((c2, k) => ({\n    value: lerp$1(min, max, k / (n2 - 1)),\n    color: c2\n  }));\n}\nfunction buildContinuousScale(w2) {\n  var _a, _b, _c;\n  const cs = (_c = (_b = (_a = w2.config) == null ? void 0 : _a.plotOptions) == null ? void 0 : _b.treemap) == null ? void 0 : _c.colorScale;\n  const cfg = cs && cs.gradient;\n  if (!cfg) return null;\n  if (cfg.enabled === false) return null;\n  const series = (\n    /** @type {any} */\n    w2.config.series || []\n  );\n  let dataMin = Infinity;\n  let dataMax = -Infinity;\n  let found = false;\n  for (let i2 = 0; i2 < series.length; i2++) {\n    const data = series[i2] && series[i2].data;\n    if (!Array.isArray(data)) continue;\n    for (let j = 0; j < data.length; j++) {\n      const v2 = colorValueOfDatum(w2, data[j], i2, j);\n      if (v2 == null) continue;\n      found = true;\n      if (v2 < dataMin) dataMin = v2;\n      if (v2 > dataMax) dataMax = v2;\n    }\n  }\n  if (!found && cfg.enabled !== true) return null;\n  if (!Number.isFinite(dataMin)) {\n    dataMin = 0;\n    dataMax = 0;\n  }\n  let min = Number.isFinite(Number(cfg.min)) ? Number(cfg.min) : dataMin;\n  let max = Number.isFinite(Number(cfg.max)) ? Number(cfg.max) : dataMax;\n  let midpoint = null;\n  if (cfg.midpoint === null) {\n    midpoint = null;\n  } else if (Number.isFinite(Number(cfg.midpoint))) {\n    midpoint = Number(cfg.midpoint);\n  } else if (min < 0 && max > 0) {\n    midpoint = 0;\n  }\n  if (midpoint != null && cfg.symmetric !== false && !Number.isFinite(Number(cfg.min)) && !Number.isFinite(Number(cfg.max))) {\n    const reach = Math.max(Math.abs(min - midpoint), Math.abs(max - midpoint));\n    min = midpoint - reach;\n    max = midpoint + reach;\n  }\n  if (max === min) {\n    min -= 0.5;\n    max += 0.5;\n  }\n  const stops = resolveStops(cfg, min, max, midpoint);\n  if (stops.length < 2) return null;\n  const at = (v2) => {\n    if (!Number.isFinite(v2)) return stops[Math.floor(stops.length / 2)].color;\n    if (v2 <= stops[0].value) return stops[0].color;\n    const last = stops[stops.length - 1];\n    if (v2 >= last.value) return last.color;\n    for (let k = 1; k < stops.length; k++) {\n      const hi = stops[k];\n      if (v2 <= hi.value) {\n        const lo = stops[k - 1];\n        const span2 = hi.value - lo.value;\n        const t2 = span2 === 0 ? 0 : (v2 - lo.value) / span2;\n        return mixColors(lo.color, hi.color, t2);\n      }\n    }\n    return last.color;\n  };\n  const span = max - min;\n  const legendStops = stops.map((s2) => ({\n    percent: span === 0 ? 0 : (s2.value - min) / span,\n    color: s2.color\n  }));\n  return { min, max, midpoint, stops, at, legendStops };\n}\nfunction readableOn(bg) {\n  const hex = normalizeHex(bg);\n  return Utils$1.getContrastRatio(hex, \"#ffffff\") >= Utils$1.getContrastRatio(hex, \"#000000\") ? \"#ffffff\" : \"#000000\";\n}\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\nclass HeatmapGradientLegend {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.svgEl = null;\n    this.arrowEl = null;\n    this.hoverValueEl = null;\n    this._min = 0;\n    this._max = 0;\n    this._geom = null;\n    this._bandHitEls = [];\n    this._activeBandIndex = -1;\n    this._onCellEnter = this._onCellEnter.bind(this);\n    this._onCellLeave = this._onCellLeave.bind(this);\n    this._onBandEnter = this._onBandEnter.bind(this);\n    this._onBandLeave = this._onBandLeave.bind(this);\n  }\n  /** Default value formatter for min/max labels and the hover tooltip. */\n  _getFormatter() {\n    const cfg = this._cfg();\n    if (typeof cfg.formatter === \"function\") return cfg.formatter;\n    return (v2) => {\n      if (!Number.isFinite(v2)) return String(v2);\n      const abs = Math.abs(v2);\n      if (abs >= 1e3) return v2.toFixed(0);\n      if (abs >= 10) return v2.toFixed(1);\n      return v2.toFixed(2);\n    };\n  }\n  /**\n   * The colorScale of whichever chart type is being drawn. Every chart type\n   * that encodes a value as colour carries the same `colorScale` shape, so one\n   * strip serves them all rather than a near-copy per type.\n   * @param {any} w\n   */\n  static colorScaleOf(w2) {\n    var _a, _b, _c, _d, _e;\n    const type = (_b = (_a = w2 == null ? void 0 : w2.config) == null ? void 0 : _a.chart) == null ? void 0 : _b.type;\n    if (!type) return null;\n    return ((_e = (_d = (_c = w2 == null ? void 0 : w2.config) == null ? void 0 : _c.plotOptions) == null ? void 0 : _d[type]) == null ? void 0 : _e.colorScale) || null;\n  }\n  /**\n   * @param {any} w\n   */\n  static configFor(w2) {\n    const cs = HeatmapGradientLegend.colorScaleOf(w2);\n    return cs && cs.gradientLegend || null;\n  }\n  /** This instance's gradient-legend config. */\n  _cfg() {\n    return HeatmapGradientLegend.configFor(this.w) || {};\n  }\n  /**\n   * True when the user has opted into the gradient legend variant.\n   * @param {any} w\n   */\n  static isEnabled(w2) {\n    if (!HeatmapGradientLegend.supports(w2)) return false;\n    const cfg = HeatmapGradientLegend.configFor(w2);\n    return !!(cfg && cfg.enabled);\n  }\n  /**\n   * Chart types this legend can serve: those that encode a value as colour\n   * through a `colorScale`. Everything else gets the categorical legend.\n   * @param {any} w\n   */\n  static supports(w2) {\n    var _a, _b;\n    const type = (_b = (_a = w2 == null ? void 0 : w2.config) == null ? void 0 : _a.chart) == null ? void 0 : _b.type;\n    return type === \"heatmap\" || type === \"treemap\";\n  }\n  /**\n   * Build the gradient legend DOM into `elLegendWrap`.\n   * Caller is responsible for clearing the wrap first.\n   */\n  draw() {\n    var _a, _b, _c, _d, _e, _f, _g, _h;\n    const w2 = this.w;\n    const elLegendWrap = (\n      /** @type {HTMLElement} */\n      w2.dom.elLegendWrap\n    );\n    if (!elLegendWrap) return;\n    const cfg = this._cfg();\n    const position = w2.config.legend.position;\n    const isVertical = position === \"left\" || position === \"right\";\n    const arrowSize = (_b = (_a = cfg.arrow) == null ? void 0 : _a.size) != null ? _b : 8;\n    const arrowGutter = arrowSize + 4;\n    const labelPadAlongStrip = cfg.showLabels ? 28 : 4;\n    const labelPadAcrossStrip = cfg.showLabels ? 20 : 4;\n    const minLabelWidth = cfg.showLabels ? 44 : 0;\n    const stripLength = this._resolveStripLength(isVertical ? cfg.height : cfg.width, isVertical);\n    const stripThickness = cfg.thickness;\n    const svgWidth = isVertical ? Math.max(stripThickness + arrowGutter + 4, minLabelWidth) : stripLength + labelPadAlongStrip * 2;\n    const svgHeight = isVertical ? stripLength + labelPadAcrossStrip * 2 : stripThickness + arrowGutter + 4;\n    const verticalGroupWidth = stripThickness + arrowGutter;\n    const verticalGroupLeftPad = (svgWidth - verticalGroupWidth) / 2;\n    const stripX = isVertical ? position === \"left\" ? verticalGroupLeftPad : verticalGroupLeftPad + arrowGutter : labelPadAlongStrip;\n    const stripY = isVertical ? labelPadAcrossStrip : position === \"top\" ? arrowGutter : 4;\n    const svg = BrowserAPIs.createElementNS(SVG_NS, \"svg\");\n    svg.setAttribute(\n      \"class\",\n      \"apexcharts-heatmap-gradient-legend apexcharts-gradient-legend\"\n    );\n    svg.setAttribute(\"width\", String(svgWidth));\n    svg.setAttribute(\"height\", String(svgHeight));\n    svg.setAttribute(\"overflow\", \"visible\");\n    const defs = BrowserAPIs.createElementNS(SVG_NS, \"defs\");\n    const gradId = `apexcharts-heatmap-gradient-${w2.globals.cuid}`;\n    const linearGrad = BrowserAPIs.createElementNS(SVG_NS, \"linearGradient\");\n    linearGrad.setAttribute(\"id\", gradId);\n    if (isVertical) {\n      linearGrad.setAttribute(\"x1\", \"0\");\n      linearGrad.setAttribute(\"y1\", \"1\");\n      linearGrad.setAttribute(\"x2\", \"0\");\n      linearGrad.setAttribute(\"y2\", \"0\");\n    } else {\n      linearGrad.setAttribute(\"x1\", \"0\");\n      linearGrad.setAttribute(\"y1\", \"0\");\n      linearGrad.setAttribute(\"x2\", \"1\");\n      linearGrad.setAttribute(\"y2\", \"0\");\n    }\n    const { min, max, stops, bands } = this._computeStops();\n    this._min = min;\n    this._max = max;\n    stops.forEach((s2) => {\n      const stopEl = BrowserAPIs.createElementNS(SVG_NS, \"stop\");\n      stopEl.setAttribute(\"offset\", `${(s2.percent * 100).toFixed(2)}%`);\n      stopEl.setAttribute(\"stop-color\", s2.color);\n      linearGrad.appendChild(stopEl);\n    });\n    defs.appendChild(linearGrad);\n    svg.appendChild(defs);\n    const rect = BrowserAPIs.createElementNS(SVG_NS, \"rect\");\n    rect.setAttribute(\"x\", String(stripX));\n    rect.setAttribute(\"y\", String(stripY));\n    rect.setAttribute(\"width\", String(isVertical ? stripThickness : stripLength));\n    rect.setAttribute(\"height\", String(isVertical ? stripLength : stripThickness));\n    rect.setAttribute(\"rx\", \"2\");\n    rect.setAttribute(\"fill\", `url(#${gradId})`);\n    svg.appendChild(rect);\n    if (cfg.showLabels) {\n      const labelColor = ((_c = cfg.labelStyle) == null ? void 0 : _c.colors) || (Array.isArray(w2.config.legend.labels.colors) ? w2.config.legend.labels.colors[0] : w2.config.legend.labels.colors) || w2.config.chart.foreColor;\n      const labelFontSize = ((_d = cfg.labelStyle) == null ? void 0 : _d.fontSize) || \"11px\";\n      const labelFontFamily = ((_e = cfg.labelStyle) == null ? void 0 : _e.fontFamily) || w2.config.chart.fontFamily;\n      const fmt = this._getFormatter();\n      const makeLabel = (text, x, y, anchor) => {\n        const t2 = BrowserAPIs.createElementNS(SVG_NS, \"text\");\n        t2.setAttribute(\"x\", String(x));\n        t2.setAttribute(\"y\", String(y));\n        t2.setAttribute(\"text-anchor\", anchor);\n        t2.setAttribute(\"dominant-baseline\", \"middle\");\n        t2.setAttribute(\"fill\", labelColor);\n        t2.setAttribute(\"font-size\", labelFontSize);\n        if (labelFontFamily) t2.setAttribute(\"font-family\", labelFontFamily);\n        t2.textContent = String(text);\n        return t2;\n      };\n      if (isVertical) {\n        const midX = stripX + stripThickness / 2;\n        svg.appendChild(makeLabel(fmt(min), midX, stripY + stripLength + 10, \"middle\"));\n        svg.appendChild(makeLabel(fmt(max), midX, stripY - 10, \"middle\"));\n      } else {\n        const midY = stripY + stripThickness / 2;\n        svg.appendChild(makeLabel(fmt(min), stripX - 6, midY, \"end\"));\n        svg.appendChild(makeLabel(fmt(max), stripX + stripLength + 6, midY, \"start\"));\n      }\n    }\n    const arrowColor = ((_f = cfg.arrow) == null ? void 0 : _f.color) || w2.config.chart.foreColor;\n    const arrow = this._buildArrow(arrowSize, arrowColor, position);\n    svg.appendChild(arrow);\n    this.arrowEl = arrow;\n    this._bandHitEls = [];\n    if (w2.config.legend.onItemHover.highlightDataSeries && bands.length > 0) {\n      bands.forEach((b2) => {\n        const hit = BrowserAPIs.createElementNS(SVG_NS, \"rect\");\n        if (isVertical) {\n          const yTop = stripY + stripLength - b2.p2 * stripLength;\n          const yBot = stripY + stripLength - b2.p1 * stripLength;\n          hit.setAttribute(\"x\", String(stripX));\n          hit.setAttribute(\"y\", String(yTop));\n          hit.setAttribute(\"width\", String(stripThickness));\n          hit.setAttribute(\"height\", String(Math.max(0, yBot - yTop)));\n        } else {\n          hit.setAttribute(\"x\", String(stripX + b2.p1 * stripLength));\n          hit.setAttribute(\"y\", String(stripY));\n          hit.setAttribute(\n            \"width\",\n            String(Math.max(0, (b2.p2 - b2.p1) * stripLength))\n          );\n          hit.setAttribute(\"height\", String(stripThickness));\n        }\n        hit.setAttribute(\"fill\", \"transparent\");\n        hit.setAttribute(\"class\", \"apexcharts-heatmap-gradient-band\");\n        hit.setAttribute(\"data:range-index\", String(b2.index));\n        hit.style.cursor = \"pointer\";\n        svg.appendChild(hit);\n        this._bandHitEls.push(hit);\n      });\n    }\n    this._geom = {\n      isVertical,\n      position,\n      stripX,\n      stripY,\n      stripLength,\n      stripThickness,\n      arrowSize,\n      svgWidth,\n      svgHeight\n    };\n    if (cfg.showHoverValue) {\n      const tt = BrowserAPIs.createElement(\"div\");\n      tt.classList.add(\"apexcharts-heatmap-gradient-legend-value\");\n      tt.style.position = \"absolute\";\n      tt.style.fontSize = ((_g = cfg.labelStyle) == null ? void 0 : _g.fontSize) || \"11px\";\n      tt.style.fontFamily = ((_h = cfg.labelStyle) == null ? void 0 : _h.fontFamily) || w2.config.chart.fontFamily || \"\";\n      tt.style.color = w2.config.chart.foreColor;\n      tt.style.background = \"rgba(0,0,0,0.65)\";\n      tt.style.color = \"#fff\";\n      tt.style.padding = \"2px 6px\";\n      tt.style.borderRadius = \"3px\";\n      tt.style.pointerEvents = \"none\";\n      tt.style.whiteSpace = \"nowrap\";\n      tt.style.opacity = \"0\";\n      tt.style.transition = \"opacity 120ms ease\";\n      this.hoverValueEl = tt;\n    }\n    elLegendWrap.classList.add(\"apexcharts-heatmap-gradient-legend-wrap\");\n    elLegendWrap.classList.add(\n      \"apx-legend-position-\" + position\n    );\n    elLegendWrap.appendChild(svg);\n    if (this.hoverValueEl) elLegendWrap.appendChild(this.hoverValueEl);\n    this.svgEl = svg;\n    this._applyWrapAlignment(elLegendWrap, position, isVertical, svgWidth, svgHeight);\n    this._attachHoverListeners();\n    this._attachBandHoverListeners();\n  }\n  /**\n   * Resolve a configured length (number = px, string ending in '%' =\n   * percentage of the chart's SVG width/height) to a pixel length.\n   * @param {number|string} value\n   * @param {boolean} isVertical\n   * @returns {number}\n   */\n  _resolveStripLength(value, isVertical) {\n    const w2 = this.w;\n    const basis = isVertical ? w2.globals.svgHeight || w2.config.chart.height || 300 : w2.globals.svgWidth || w2.config.chart.width || 600;\n    if (typeof value === \"string\") {\n      const trimmed = value.trim();\n      if (trimmed.endsWith(\"%\")) {\n        const pct = parseFloat(trimmed) || 0;\n        return Math.max(20, basis * pct / 100);\n      }\n      const n2 = parseFloat(trimmed);\n      return Number.isFinite(n2) ? n2 : 200;\n    }\n    if (typeof value === \"number\" && Number.isFinite(value)) return value;\n    return 200;\n  }\n  /**\n   * Position the legend wrap and align the gradient strip within it. The\n   * wrap spans the chart's long axis (full width for top/bottom; full\n   * height for left/right) and uses flexbox to honor the `align` config.\n   * Bypasses the standard `setLegendWrapXY` which sizes the wrap to its\n   * content.\n   * @param {HTMLElement} elLegendWrap\n   * @param {'top'|'right'|'bottom'|'left'} position\n   * @param {boolean} isVertical\n   * @param {number} svgWidth\n   * @param {number} svgHeight\n   */\n  _applyWrapAlignment(elLegendWrap, position, isVertical, svgWidth, svgHeight) {\n    const w2 = this.w;\n    const cfg = this._cfg();\n    const align = cfg.align || \"center\";\n    const edgePad = 12;\n    const chartWidth = w2.globals.svgWidth || w2.config.chart.width || 600;\n    const chartHeight = w2.globals.svgHeight || w2.config.chart.height || 300;\n    const userOffsetX = w2.config.legend.offsetX || 0;\n    const userOffsetY = w2.config.legend.offsetY || 0;\n    elLegendWrap.style.position = \"absolute\";\n    elLegendWrap.style.display = \"block\";\n    elLegendWrap.style.overflow = \"visible\";\n    elLegendWrap.style.padding = \"0\";\n    elLegendWrap.style.width = svgWidth + \"px\";\n    elLegendWrap.style.height = svgHeight + \"px\";\n    elLegendWrap.style.right = \"auto\";\n    elLegendWrap.style.bottom = \"auto\";\n    if (isVertical) {\n      const availableHeight = chartHeight - svgHeight - edgePad * 2;\n      let y;\n      if (align === \"start\") y = edgePad;\n      else if (align === \"end\") y = edgePad + Math.max(0, availableHeight);\n      else y = edgePad + Math.max(0, availableHeight) / 2;\n      elLegendWrap.style.top = y + userOffsetY + \"px\";\n      if (position === \"left\") {\n        elLegendWrap.style.left = edgePad + userOffsetX + \"px\";\n      } else {\n        elLegendWrap.style.left = chartWidth - svgWidth - edgePad + userOffsetX + \"px\";\n      }\n    } else {\n      const availableWidth = chartWidth - svgWidth - edgePad * 2;\n      let x;\n      if (align === \"start\") x = edgePad;\n      else if (align === \"end\") x = edgePad + Math.max(0, availableWidth);\n      else x = edgePad + Math.max(0, availableWidth) / 2;\n      elLegendWrap.style.left = x + userOffsetX + \"px\";\n      if (position === \"top\") {\n        elLegendWrap.style.top = edgePad + userOffsetY + \"px\";\n      } else {\n        elLegendWrap.style.top = chartHeight - svgHeight - edgePad + userOffsetY + \"px\";\n      }\n    }\n  }\n  /**\n   * Re-position the strip once the final layout is known.\n   *\n   * `_applyWrapAlignment` (called during `draw()`, before `plotCoords()`) can\n   * only pin to the chart's outer edge. This runs after layout — when\n   * `translateX/Y`, `gridWidth/Height` and `xAxisHeight` are populated — and:\n   *   - centers the strip within its reserved band on the perpendicular axis\n   *     (between the title and the plot for `top`; the x-axis and the chart\n   *     bottom for `bottom`; the chart edge and the plot for `left`/`right`),\n   *     so the slack is split evenly instead of dumped on one side, and\n   *   - aligns it along the plot's own extent (so `align: 'center'` centers\n   *     over the heatmap, not the whole canvas).\n   * Honors `legend.offsetX/offsetY` for user nudging. Safe to call repeatedly.\n   */\n  repositionToPlot() {\n    var _a, _b;\n    if (!Environment.isBrowser()) return;\n    const w2 = this.w;\n    const g2 = w2.globals;\n    const wrap = (\n      /** @type {HTMLElement} */\n      w2.dom.elLegendWrap\n    );\n    if (!wrap || !this._geom) return;\n    if (!Number.isFinite(g2.gridWidth) || !Number.isFinite(g2.gridHeight)) return;\n    const { isVertical, position, svgWidth, svgHeight, stripX, stripY, stripThickness } = this._geom;\n    const align = this._cfg().align || \"center\";\n    const ox = w2.config.legend.offsetX || 0;\n    const oy = w2.config.legend.offsetY || 0;\n    const dimHelpers = (_b = (_a = this.ctx) == null ? void 0 : _a.dimensions) == null ? void 0 : _b.dimHelpers;\n    const titleArea = dimHelpers ? dimHelpers.getTitleSubtitleCoords(\"title\").height + dimHelpers.getTitleSubtitleCoords(\"subtitle\").height : 0;\n    const xAxisArea = w2.layout.xAxisHeight || 0;\n    const alongOffset = (extent, size) => {\n      const avail = Math.max(0, extent - size);\n      if (align === \"start\") return 0;\n      if (align === \"end\") return avail;\n      return avail / 2;\n    };\n    if (isVertical) {\n      wrap.style.top = g2.translateY + alongOffset(g2.gridHeight, svgHeight) + oy + \"px\";\n      const bandStart = position === \"left\" ? 0 : g2.translateX + g2.gridWidth;\n      const bandEnd = position === \"left\" ? g2.translateX : g2.svgWidth;\n      const stripCenter = (bandStart + bandEnd) / 2;\n      wrap.style.left = stripCenter - stripX - stripThickness / 2 + ox + \"px\";\n    } else {\n      wrap.style.left = g2.translateX + alongOffset(g2.gridWidth, svgWidth) + ox + \"px\";\n      const bandStart = position === \"top\" ? titleArea : g2.translateY + g2.gridHeight + xAxisArea;\n      const bandEnd = position === \"top\" ? g2.translateY : g2.svgHeight;\n      const stripCenter = (bandStart + bandEnd) / 2;\n      wrap.style.top = stripCenter - stripY - stripThickness / 2 + oy + \"px\";\n    }\n    BrowserAPIs.requestAnimationFrame(() => this._enforceMinPlotGap());\n  }\n  /**\n   * Guarantee a minimum gap between the strip's chart-facing edge and the plot.\n   * Measured in viewport space (immune to the wrap↔SVG coordinate offset) and\n   * applied as a *relative* shift to the wrap's current position, so it only\n   * nudges a strip that ended up too close — placements with ample room are\n   * left exactly where centering put them. Runs post-paint (see caller).\n   */\n  _enforceMinPlotGap() {\n    const w2 = this.w;\n    const wrap = (\n      /** @type {HTMLElement} */\n      w2.dom.elLegendWrap\n    );\n    const strip = this.svgEl && this.svgEl.querySelector(\"rect\");\n    const grid = w2.dom.baseEl.querySelector(\".apexcharts-grid\");\n    if (!wrap || !strip || !grid || !this._geom) return;\n    const s2 = strip.getBoundingClientRect();\n    const gr = grid.getBoundingClientRect();\n    if (!s2.width || !s2.height || !gr.width || !gr.height) return;\n    const MIN_GAP = 16;\n    const { isVertical, position } = this._geom;\n    if (isVertical) {\n      const gap = position === \"left\" ? gr.left - s2.right : s2.left - gr.right;\n      if (gap < MIN_GAP) {\n        const curLeft = parseFloat(wrap.style.left) || 0;\n        const shift = MIN_GAP - gap;\n        wrap.style.left = curLeft + (position === \"left\" ? -shift : shift) + \"px\";\n      }\n    } else {\n      const gap = position === \"top\" ? gr.top - s2.bottom : s2.top - gr.bottom;\n      if (gap < MIN_GAP) {\n        const curTop = parseFloat(wrap.style.top) || 0;\n        const shift = MIN_GAP - gap;\n        wrap.style.top = curTop + (position === \"top\" ? -shift : shift) + \"px\";\n      }\n    }\n  }\n  /**\n   * Tear down listeners (called before re-render).\n   */\n  destroy() {\n    var _a, _b, _c, _d, _e, _f, _g;\n    for (let i2 = 0; i2 < this._bandHitEls.length; i2++) {\n      const el = this._bandHitEls[i2];\n      (_a = el.removeEventListener) == null ? void 0 : _a.call(el, \"mousemove\", this._onBandEnter);\n      (_b = el.removeEventListener) == null ? void 0 : _b.call(el, \"mouseout\", this._onBandLeave);\n    }\n    this._bandHitEls = [];\n    this._activeBandIndex = -1;\n    if (!((_c = this.ctx) == null ? void 0 : _c.events)) return;\n    try {\n      (_e = (_d = this.ctx.events).removeEventListener) == null ? void 0 : _e.call(\n        _d,\n        \"dataPointMouseEnter\",\n        this._onCellEnter\n      );\n      (_g = (_f = this.ctx.events).removeEventListener) == null ? void 0 : _g.call(\n        _f,\n        \"dataPointMouseLeave\",\n        this._onCellLeave\n      );\n    } catch (_) {\n    }\n  }\n  /** Wire mousemove/mouseout on each per-band hit-region (ranges mode). */\n  _attachBandHoverListeners() {\n    if (!Environment.isBrowser()) return;\n    for (let i2 = 0; i2 < this._bandHitEls.length; i2++) {\n      const el = this._bandHitEls[i2];\n      el.addEventListener(\"mousemove\", this._onBandEnter);\n      el.addEventListener(\"mouseout\", this._onBandLeave);\n    }\n  }\n  /**\n   * Hovering a gradient band highlights its cells and dims the rest. Guarded\n   * so the repeated mousemove stream only re-applies on an actual band change.\n   * @param {Event} e\n   */\n  _onBandEnter(e2) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    const target = (\n      /** @type {Element} */\n      e2.currentTarget\n    );\n    const idx = parseInt((_a = target.getAttribute(\"data:range-index\")) != null ? _a : \"-1\", 10);\n    if (idx < 0 || idx === this._activeBandIndex) return;\n    this._activeBandIndex = idx;\n    (_d = (_c = (_b = this.ctx) == null ? void 0 : _b.events) == null ? void 0 : _c.fireEvent) == null ? void 0 : _d.call(_c, \"legendHover\", [this.ctx, idx, w2]);\n    new Series(w2).highlightRangeInSeries(idx, \"highlight\");\n  }\n  /** Leaving a band clears the highlight. */\n  _onBandLeave() {\n    if (this._activeBandIndex < 0) return;\n    const idx = this._activeBandIndex;\n    this._activeBandIndex = -1;\n    new Series(this.w).highlightRangeInSeries(idx, \"reset\");\n  }\n  _attachHoverListeners() {\n    var _a, _b;\n    if (!Environment.isBrowser()) return;\n    if (!((_b = (_a = this.ctx) == null ? void 0 : _a.events) == null ? void 0 : _b.addEventListener)) return;\n    this.ctx.events.addEventListener(\n      \"dataPointMouseEnter\",\n      this._onCellEnter\n    );\n    this.ctx.events.addEventListener(\n      \"dataPointMouseLeave\",\n      this._onCellLeave\n    );\n  }\n  /**\n   * dataPointMouseEnter fires as `(e, ctx, { seriesIndex, dataPointIndex, w })`.\n   * Graphics._fireEvent forwards listener args in the same shape.\n   * @param {...any} args\n   */\n  _onCellEnter(...args) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    if (!this.arrowEl) return;\n    const opts = args[args.length - 1];\n    if (!opts || typeof opts !== \"object\") return;\n    const i2 = opts.seriesIndex;\n    const j = opts.dataPointIndex;\n    if (typeof i2 !== \"number\" || typeof j !== \"number\") return;\n    if (!HeatmapGradientLegend.supports(w2)) return;\n    let val;\n    if (this._continuous) {\n      val = colorValueOf(w2, i2, j);\n    } else {\n      val = (_c = (_b = (_a = w2.seriesData) == null ? void 0 : _a.series) == null ? void 0 : _b[i2]) == null ? void 0 : _c[j];\n    }\n    if (val == null || Number.isNaN(val)) return;\n    this._positionArrow(val);\n  }\n  _onCellLeave() {\n    if (!this.arrowEl) return;\n    this.arrowEl.setAttribute(\"opacity\", \"0\");\n    if (this.hoverValueEl) {\n      this.hoverValueEl.style.opacity = \"0\";\n    }\n  }\n  /**\n   * Move the arrow to the position corresponding to `val` along the strip.\n   * @param {number} val\n   */\n  _positionArrow(val) {\n    if (!this.arrowEl || !this._geom) return;\n    const { isVertical, position, stripX, stripY, stripLength, stripThickness, arrowSize } = this._geom;\n    const min = this._min;\n    const max = this._max;\n    const span = max - min;\n    let pct;\n    if (span === 0) {\n      pct = 0.5;\n    } else {\n      pct = (val - min) / span;\n    }\n    if (pct < 0) pct = 0;\n    if (pct > 1) pct = 1;\n    if (isVertical) {\n      const yCenter = stripY + stripLength - pct * stripLength;\n      let tipX, baseX;\n      if (position === \"left\") {\n        tipX = stripX + stripThickness;\n        baseX = tipX + arrowSize;\n      } else {\n        tipX = stripX;\n        baseX = tipX - arrowSize;\n      }\n      const points = [\n        `${tipX},${yCenter}`,\n        `${baseX},${yCenter - arrowSize / 2}`,\n        `${baseX},${yCenter + arrowSize / 2}`\n      ].join(\" \");\n      this.arrowEl.setAttribute(\"points\", points);\n    } else {\n      const xCenter = stripX + pct * stripLength;\n      let tipY, baseY;\n      if (position === \"top\") {\n        tipY = stripY + stripThickness;\n        baseY = tipY + arrowSize;\n      } else {\n        tipY = stripY;\n        baseY = tipY - arrowSize;\n      }\n      const points = [\n        `${xCenter},${tipY}`,\n        `${xCenter - arrowSize / 2},${baseY}`,\n        `${xCenter + arrowSize / 2},${baseY}`\n      ].join(\" \");\n      this.arrowEl.setAttribute(\"points\", points);\n    }\n    this.arrowEl.setAttribute(\"opacity\", \"1\");\n    if (this.hoverValueEl) {\n      const fmt = this._getFormatter();\n      this.hoverValueEl.textContent = fmt(val);\n      if (isVertical) {\n        const yCenter = stripY + stripLength - pct * stripLength;\n        if (position === \"left\") {\n          this.hoverValueEl.style.left = `${stripX + stripThickness + arrowSize + 8}px`;\n        } else {\n          this.hoverValueEl.style.left = `${stripX - arrowSize - 8}px`;\n          this.hoverValueEl.style.transform = \"translateX(-100%)\";\n        }\n        this.hoverValueEl.style.top = `${yCenter - 9}px`;\n      } else {\n        const xCenter = stripX + pct * stripLength;\n        this.hoverValueEl.style.left = `${xCenter}px`;\n        this.hoverValueEl.style.transform = \"translateX(-50%)\";\n        if (position === \"top\") {\n          this.hoverValueEl.style.top = `${stripY + stripThickness + arrowSize + 8}px`;\n        } else {\n          this.hoverValueEl.style.top = `${stripY - arrowSize - 18}px`;\n        }\n      }\n      this.hoverValueEl.style.opacity = \"1\";\n    }\n  }\n  /**\n   * @param {number} size\n   * @param {string} color\n   * @param {'top'|'right'|'bottom'|'left'} _position\n   */\n  _buildArrow(size, color, _position) {\n    const polygon = BrowserAPIs.createElementNS(SVG_NS, \"polygon\");\n    polygon.setAttribute(\"fill\", color);\n    polygon.setAttribute(\"opacity\", \"0\");\n    polygon.setAttribute(\"class\", \"apexcharts-heatmap-gradient-arrow\");\n    polygon.setAttribute(\"points\", \"0,0 0,0 0,0\");\n    polygon.setAttribute(\"pointer-events\", \"none\");\n    return polygon;\n  }\n  /**\n   * Build gradient stops + return effective min/max.\n   * - If `colorScale.ranges` is set, stops are placed at each range boundary\n   *   so the gradient reflects the user's discrete palette.\n   * - Otherwise, samples N stops from the same shadeColor function the cells\n   *   use, so the strip visually matches the heatmap.\n   * @returns {{ min: number, max: number, stops: Array<{percent:number,color:string}>, bands: Array<{index:number,p1:number,p2:number}> }}\n   */\n  _computeStops() {\n    var _a, _b;\n    const w2 = this.w;\n    const cs = HeatmapGradientLegend.colorScaleOf(w2) || {};\n    const cfg = this._cfg();\n    const continuous = buildContinuousScale(w2);\n    if (continuous) {\n      this._continuous = true;\n      return {\n        min: continuous.min,\n        max: continuous.max,\n        stops: continuous.legendStops,\n        bands: []\n      };\n    }\n    this._continuous = false;\n    let dataMin = Infinity;\n    let dataMax = -Infinity;\n    const rows = ((_a = w2.seriesData) == null ? void 0 : _a.series) || [];\n    for (let i2 = 0; i2 < rows.length; i2++) {\n      const row = rows[i2];\n      if (!row) continue;\n      for (let j = 0; j < row.length; j++) {\n        const v2 = row[j];\n        if (v2 == null || Number.isNaN(v2)) continue;\n        if (v2 < dataMin) dataMin = v2;\n        if (v2 > dataMax) dataMax = v2;\n      }\n    }\n    if (!Number.isFinite(dataMin)) dataMin = 0;\n    if (!Number.isFinite(dataMax)) dataMax = 0;\n    let min = dataMin;\n    let max = dataMax;\n    if (typeof cs.min !== \"undefined\") {\n      min = cs.min < dataMin ? cs.min : dataMin;\n    }\n    if (typeof cs.max !== \"undefined\") {\n      max = cs.max > dataMax ? cs.max : dataMax;\n    }\n    const stops = [];\n    const bands = [];\n    if (cs.ranges && cs.ranges.length > 0) {\n      const ranges = cs.ranges.map((r2, originalIndex) => __spreadProps(__spreadValues({}, r2), {\n        _originalIndex: originalIndex\n      })).sort((a2, b2) => a2.from - b2.from);\n      const lo = ranges[0].from;\n      const hi = ranges[ranges.length - 1].to;\n      min = lo;\n      max = hi;\n      const span = hi - lo || 1;\n      ranges.forEach((r2) => {\n        const p1 = (r2.from - lo) / span;\n        const p2 = (r2.to - lo) / span;\n        stops.push({ percent: (p1 + p2) / 2, color: r2.color });\n        bands.push({ index: r2._originalIndex, p1, p2 });\n      });\n    } else {\n      const baseColor = w2.globals.colors[0] || \"#008FFB\";\n      const utils = new Utils$1();\n      const plot = w2.config.plotOptions[w2.config.chart.type] || {};\n      const shadeIntensity = (_b = plot.shadeIntensity) != null ? _b : 0.5;\n      const hasNegs = (\n        /** @type {any} */\n        w2.globals.hasNegs\n      );\n      const n2 = Math.max(2, cfg.stops || 16);\n      for (let s2 = 0; s2 < n2; s2++) {\n        const t2 = s2 / (n2 - 1);\n        const v2 = min + t2 * (max - min);\n        const total = Math.abs(max) + Math.abs(min);\n        const percent_v = total === 0 ? 0 : 100 * v2 / total;\n        let colorShadePercent;\n        if (hasNegs) {\n          if (plot.reverseNegativeShade) {\n            colorShadePercent = percent_v < 0 ? percent_v / 100 * (shadeIntensity * 1.25) : (1 - percent_v / 100) * (shadeIntensity * 1.25);\n          } else {\n            colorShadePercent = percent_v <= 0 ? 1 - (1 + percent_v / 100) * shadeIntensity : (1 - percent_v / 100) * shadeIntensity;\n          }\n        } else {\n          colorShadePercent = 1 - percent_v / 100;\n        }\n        if (colorShadePercent > 1) colorShadePercent = 1;\n        if (colorShadePercent < -1) colorShadePercent = -1;\n        const shaded = plot.enableShades ? utils.shadeColor(\n          w2.config.theme.mode === \"dark\" ? colorShadePercent * -1 : colorShadePercent,\n          baseColor\n        ) : baseColor;\n        stops.push({ percent: t2, color: shaded });\n      }\n    }\n    return { min, max, stops, bands };\n  }\n}\nclass Legend {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.updateSeries = (...a2) => ctx.updateHelpers._updateSeries(...a2);\n    this.onLegendClick = this.onLegendClick.bind(this);\n    this.onLegendHovered = this.onLegendHovered.bind(this);\n    this.isBarsDistributed = this.w.config.chart.type === \"bar\" && this.w.config.plotOptions.bar.distributed && this.w.config.series.length === 1;\n    this.legendHelpers = new Helpers$3(this);\n  }\n  init() {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const cnf = w2.config;\n    this.isBarsDistributed = cnf.chart.type === \"bar\" && cnf.plotOptions.bar.distributed && cnf.series.length === 1;\n    const showLegendAlways = cnf.legend.showForSingleSeries && this.w.seriesData.series.length === 1 || this.isBarsDistributed || // Heatmap legends are colorScale-driven (discrete ranges or the\n    // gradient strip), not series-driven, so they must render even for a\n    // single-row heatmap.\n    cnf.chart.type === \"heatmap\" || // Same for a treemap once it has a gradient strip: a nested treemap is\n    // usually one series, and the strip describes the colour metric rather\n    // than the series.\n    HeatmapGradientLegend.isEnabled(w2) || this.w.seriesData.series.length > 1;\n    this.legendHelpers.appendToForeignObject();\n    if ((showLegendAlways || !gl.axisCharts) && cnf.legend.show) {\n      const elLegendWrap = (\n        /** @type {HTMLElement} */\n        w2.dom.elLegendWrap\n      );\n      while (elLegendWrap.firstChild) {\n        elLegendWrap.removeChild(elLegendWrap.firstChild);\n      }\n      if (this.heatmapGradientLegend) {\n        this.heatmapGradientLegend.destroy();\n        this.heatmapGradientLegend = null;\n      }\n      if (HeatmapGradientLegend.isEnabled(w2)) {\n        this.heatmapGradientLegend = new HeatmapGradientLegend(w2, this.ctx);\n        this.heatmapGradientLegend.draw();\n      } else {\n        this.drawLegends();\n        if (cnf.legend.position === \"bottom\" || cnf.legend.position === \"top\") {\n          this.legendAlignHorizontal();\n        } else if (cnf.legend.position === \"right\" || cnf.legend.position === \"left\") {\n          this.legendAlignVertical();\n        }\n      }\n    }\n  }\n  createLegendMarker({ i: i2, fillcolor }) {\n    const w2 = this.w;\n    const elMarker = BrowserAPIs.createElement(\"span\");\n    elMarker.classList.add(\"apexcharts-legend-marker\");\n    const mShape = w2.config.legend.markers.shape || w2.config.markers.shape;\n    let shape = mShape;\n    if (Array.isArray(mShape)) {\n      shape = mShape[i2];\n    }\n    const mSize = Array.isArray(w2.config.legend.markers.size) ? parseFloat(w2.config.legend.markers.size[i2]) : parseFloat(w2.config.legend.markers.size);\n    const mOffsetX = Array.isArray(w2.config.legend.markers.offsetX) ? parseFloat(w2.config.legend.markers.offsetX[i2]) : parseFloat(w2.config.legend.markers.offsetX);\n    const mOffsetY = Array.isArray(w2.config.legend.markers.offsetY) ? parseFloat(w2.config.legend.markers.offsetY[i2]) : parseFloat(w2.config.legend.markers.offsetY);\n    const mBorderWidth = Array.isArray(w2.config.legend.markers.strokeWidth) ? parseFloat(w2.config.legend.markers.strokeWidth[i2]) : parseFloat(w2.config.legend.markers.strokeWidth);\n    const mStyle = elMarker.style;\n    mStyle.height = (mSize + mBorderWidth) * 2 + \"px\";\n    mStyle.width = (mSize + mBorderWidth) * 2 + \"px\";\n    mStyle.left = mOffsetX + \"px\";\n    mStyle.top = mOffsetY + \"px\";\n    if (w2.config.legend.markers.customHTML) {\n      mStyle.background = \"transparent\";\n      mStyle.color = fillcolor[i2];\n      if (Array.isArray(w2.config.legend.markers.customHTML)) {\n        if (w2.config.legend.markers.customHTML[i2]) {\n          elMarker.innerHTML = w2.config.legend.markers.customHTML[i2]();\n        }\n      } else {\n        elMarker.innerHTML = w2.config.legend.markers.customHTML();\n      }\n    } else {\n      const markers = new Markers(this.ctx.w, this.ctx);\n      const markerConfig = markers.getMarkerConfig({\n        cssClass: `apexcharts-legend-marker apexcharts-marker apexcharts-marker-${shape}`,\n        seriesIndex: i2,\n        strokeWidth: mBorderWidth,\n        size: mSize\n      });\n      const SVGLib = Environment.isBrowser() ? (\n        /** @type {any} */\n        window.SVG\n      ) : (\n        /** @type {any} */\n        global.SVG\n      );\n      const SVGMarker = SVGLib().addTo(elMarker).size(\"100%\", \"100%\");\n      const marker = new Graphics(this.w).drawMarker(0, 0, __spreadProps(__spreadValues({}, markerConfig), {\n        pointFillColor: Array.isArray(fillcolor) ? fillcolor[i2] : markerConfig.pointFillColor,\n        shape\n      }));\n      const shapesEls = w2.dom.Paper.find(\n        \".apexcharts-legend-marker.apexcharts-marker\"\n      );\n      shapesEls.forEach((shapeEl) => {\n        if (shapeEl.node.classList.contains(\"apexcharts-marker-triangle\")) {\n          shapeEl.node.style.transform = \"translate(50%, 45%)\";\n        } else {\n          shapeEl.node.style.transform = \"translate(50%, 50%)\";\n        }\n      });\n      SVGMarker.add(marker);\n    }\n    return elMarker;\n  }\n  drawLegends() {\n    var _a;\n    const me = this;\n    const w2 = this.w;\n    const elLegendWrap = (\n      /** @type {HTMLElement} */\n      w2.dom.elLegendWrap\n    );\n    const fontFamily = w2.config.legend.fontFamily;\n    let legendNames = w2.seriesData.seriesNames;\n    let fillcolor = w2.config.legend.markers.fillColors ? w2.config.legend.markers.fillColors.slice() : w2.globals.colors.slice();\n    if (w2.config.chart.type === \"heatmap\") {\n      const ranges = w2.config.plotOptions.heatmap.colorScale.ranges;\n      legendNames = ranges.map((colorScale) => {\n        return colorScale.name ? colorScale.name : colorScale.from + \" - \" + colorScale.to;\n      });\n      fillcolor = ranges.map((color) => color.color);\n    } else if (this.isBarsDistributed) {\n      legendNames = w2.labelData.labels.slice();\n    }\n    if (w2.config.legend.customLegendItems.length) {\n      legendNames = w2.config.legend.customLegendItems;\n    }\n    const legendFormatter = w2.formatters.legendFormatter;\n    const isLegendInversed = w2.config.legend.inverseOrder;\n    const legendGroups = [];\n    if (w2.labelData.seriesGroups.length > 1 && w2.config.legend.clusterGroupedSeries) {\n      w2.labelData.seriesGroups.forEach((_, gi) => {\n        legendGroups[gi] = BrowserAPIs.createElement(\"div\");\n        legendGroups[gi].classList.add(\n          \"apexcharts-legend-group\",\n          `apexcharts-legend-group-${gi}`\n        );\n        if (w2.config.legend.clusterGroupedSeriesOrientation === \"horizontal\") {\n          elLegendWrap.classList.add(\"apexcharts-legend-group-horizontal\");\n        } else {\n          legendGroups[gi].classList.add(\"apexcharts-legend-group-vertical\");\n        }\n      });\n    }\n    for (let i2 = isLegendInversed ? legendNames.length - 1 : 0; isLegendInversed ? i2 >= 0 : i2 <= legendNames.length - 1; isLegendInversed ? i2-- : i2++) {\n      const text = legendFormatter(legendNames[i2], { seriesIndex: i2, w: w2 });\n      let collapsedSeries = false;\n      let ancillaryCollapsedSeries = false;\n      if (w2.globals.collapsedSeries.length > 0) {\n        for (let c2 = 0; c2 < w2.globals.collapsedSeries.length; c2++) {\n          if (w2.globals.collapsedSeries[c2].index === i2) {\n            collapsedSeries = true;\n          }\n        }\n      }\n      if (w2.globals.ancillaryCollapsedSeriesIndices.length > 0) {\n        for (let c2 = 0; c2 < w2.globals.ancillaryCollapsedSeriesIndices.length; c2++) {\n          if (w2.globals.ancillaryCollapsedSeriesIndices[c2] === i2) {\n            ancillaryCollapsedSeries = true;\n          }\n        }\n      }\n      const elMarker = this.createLegendMarker({ i: i2, fillcolor });\n      Graphics.setAttrs(elMarker, {\n        rel: i2 + 1,\n        \"data:collapsed\": collapsedSeries || ancillaryCollapsedSeries\n      });\n      if (collapsedSeries || ancillaryCollapsedSeries) {\n        elMarker.classList.add(\"apexcharts-inactive-legend\");\n      }\n      const elLegend = BrowserAPIs.createElement(\"div\");\n      if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.keyboard.enabled) {\n        elLegend.setAttribute(\"role\", \"button\");\n        elLegend.setAttribute(\"tabindex\", \"0\");\n        const seriesName = Array.isArray(text) ? text.join(\" \") : text;\n        const isCollapsed = collapsedSeries || ancillaryCollapsedSeries;\n        const statusText = isCollapsed ? \"hidden\" : \"visible\";\n        elLegend.setAttribute(\n          \"aria-label\",\n          `${seriesName}, ${statusText}. Press Enter or Space to toggle.`\n        );\n        elLegend.setAttribute(\"aria-pressed\", isCollapsed ? \"true\" : \"false\");\n      }\n      const elLegendText = BrowserAPIs.createElement(\"span\");\n      elLegendText.classList.add(\"apexcharts-legend-text\");\n      elLegendText.innerHTML = Array.isArray(text) ? text.join(\" \") : text;\n      let textColor = w2.config.legend.labels.useSeriesColors ? w2.globals.colors[i2] : Array.isArray(w2.config.legend.labels.colors) ? (_a = w2.config.legend.labels.colors) == null ? void 0 : _a[i2] : w2.config.legend.labels.colors;\n      if (!textColor) {\n        textColor = w2.config.chart.foreColor;\n      }\n      elLegendText.style.color = textColor;\n      elLegendText.style.fontSize = w2.config.legend.fontSize;\n      elLegendText.style.fontWeight = w2.config.legend.fontWeight;\n      elLegendText.style.fontFamily = fontFamily || w2.config.chart.fontFamily;\n      Graphics.setAttrs(elLegendText, {\n        rel: i2 + 1,\n        i: i2,\n        \"data:default-text\": encodeURIComponent(text),\n        \"data:collapsed\": collapsedSeries || ancillaryCollapsedSeries\n      });\n      elLegend.appendChild(elMarker);\n      elLegend.appendChild(elLegendText);\n      const coreUtils = new CoreUtils(this.w);\n      if (!w2.config.legend.showForZeroSeries) {\n        const total = coreUtils.getSeriesTotalByIndex(i2);\n        if (total === 0 && coreUtils.seriesHaveSameValues(i2) && !coreUtils.isSeriesNull(i2) && w2.globals.collapsedSeriesIndices.indexOf(i2) === -1 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(i2) === -1) {\n          elLegend.classList.add(\"apexcharts-hidden-zero-series\");\n        }\n      }\n      if (!w2.config.legend.showForNullSeries) {\n        if (coreUtils.isSeriesNull(i2) && w2.globals.collapsedSeriesIndices.indexOf(i2) === -1 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(i2) === -1) {\n          elLegend.classList.add(\"apexcharts-hidden-null-series\");\n        }\n      }\n      if (legendGroups.length) {\n        w2.labelData.seriesGroups.forEach((group, gi) => {\n          var _a2, _b;\n          if (group.includes(\n            /** @type {Record<string,any>} */\n            (_b = (_a2 = w2.config.series[i2]) == null ? void 0 : _a2.name) != null ? _b : \"\"\n          )) {\n            elLegendWrap.appendChild(legendGroups[gi]);\n            legendGroups[gi].appendChild(elLegend);\n          }\n        });\n      } else {\n        elLegendWrap.appendChild(elLegend);\n      }\n      elLegendWrap.classList.add(\n        `apexcharts-align-${w2.config.legend.horizontalAlign}`\n      );\n      elLegendWrap.classList.add(\n        \"apx-legend-position-\" + w2.config.legend.position\n      );\n      elLegend.classList.add(\"apexcharts-legend-series\");\n      elLegend.style.margin = `${w2.config.legend.itemMargin.vertical}px ${w2.config.legend.itemMargin.horizontal}px`;\n      elLegendWrap.style.width = w2.config.legend.width ? w2.config.legend.width + \"px\" : \"\";\n      elLegendWrap.style.height = w2.config.legend.height ? w2.config.legend.height + \"px\" : \"\";\n      Graphics.setAttrs(elLegend, {\n        rel: i2 + 1,\n        seriesName: Utils$1.escapeString(legendNames[i2]),\n        \"data:collapsed\": collapsedSeries || ancillaryCollapsedSeries\n      });\n      if (collapsedSeries || ancillaryCollapsedSeries) {\n        elLegend.classList.add(\"apexcharts-inactive-legend\");\n      }\n      if (!w2.config.legend.onItemClick.toggleDataSeries) {\n        elLegend.classList.add(\"apexcharts-no-click\");\n      }\n    }\n    w2.dom.elWrap.addEventListener(\"click\", me.onLegendClick, true);\n    if (w2.config.legend.onItemHover.highlightDataSeries && w2.config.legend.customLegendItems.length === 0) {\n      w2.dom.elWrap.addEventListener(\"mousemove\", me.onLegendHovered, true);\n      w2.dom.elWrap.addEventListener(\"mouseout\", me.onLegendHovered, true);\n    }\n    if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.keyboard.enabled) {\n      w2.dom.elWrap.addEventListener(\n        \"keydown\",\n        me.onLegendKeyDown.bind(me),\n        true\n      );\n    }\n  }\n  /**\n   * @param {number} offsetX\n   * @param {number} offsetY\n   */\n  setLegendWrapXY(offsetX, offsetY) {\n    const w2 = this.w;\n    const elLegendWrap = (\n      /** @type {HTMLElement} */\n      w2.dom.elLegendWrap\n    );\n    const legendHeight = elLegendWrap.clientHeight;\n    let x = 0;\n    let y = 0;\n    if (w2.config.legend.position === \"bottom\") {\n      y = w2.globals.svgHeight - Math.min(legendHeight, w2.globals.svgHeight / 2) - 5;\n    } else if (w2.config.legend.position === \"top\") {\n      const dim = new Dimensions(this.w, this.ctx);\n      const titleH = dim.dimHelpers.getTitleSubtitleCoords(\"title\").height;\n      const subtitleH = dim.dimHelpers.getTitleSubtitleCoords(\"subtitle\").height;\n      y = (titleH > 0 ? titleH - 10 : 0) + (subtitleH > 0 ? subtitleH - 10 : 0);\n    }\n    elLegendWrap.style.position = \"absolute\";\n    x = x + offsetX + w2.config.legend.offsetX;\n    y = y + offsetY + w2.config.legend.offsetY;\n    elLegendWrap.style.left = x + \"px\";\n    elLegendWrap.style.top = y + \"px\";\n    if (w2.config.legend.position === \"right\") {\n      elLegendWrap.style.left = \"auto\";\n      elLegendWrap.style.right = 25 + w2.config.legend.offsetX + \"px\";\n    }\n    const fixedHeigthWidth = (\n      /** @type {const} */\n      [\"width\", \"height\"]\n    );\n    fixedHeigthWidth.forEach((hw) => {\n      if (elLegendWrap && elLegendWrap.style[hw]) {\n        elLegendWrap.style[hw] = parseInt(String(w2.config.legend[hw]), 10) + \"px\";\n      }\n    });\n  }\n  legendAlignHorizontal() {\n    const w2 = this.w;\n    const elLegendWrap = (\n      /** @type {HTMLElement} */\n      w2.dom.elLegendWrap\n    );\n    elLegendWrap.style.right = \"0\";\n    const dimensions = new Dimensions(this.w, this.ctx);\n    const titleRect = dimensions.dimHelpers.getTitleSubtitleCoords(\"title\");\n    const subtitleRect = dimensions.dimHelpers.getTitleSubtitleCoords(\"subtitle\");\n    const offsetX = 20;\n    let offsetY = 0;\n    if (w2.config.legend.position === \"top\") {\n      offsetY = titleRect.height + subtitleRect.height + w2.config.title.margin + w2.config.subtitle.margin - 10;\n    }\n    this.setLegendWrapXY(offsetX, offsetY);\n  }\n  legendAlignVertical() {\n    const w2 = this.w;\n    const lRect = this.legendHelpers.getLegendDimensions();\n    const offsetY = 20;\n    let offsetX = 0;\n    if (w2.config.legend.position === \"left\") {\n      offsetX = 20;\n    }\n    if (w2.config.legend.position === \"right\") {\n      offsetX = w2.globals.svgWidth - lRect.clww - 10;\n    }\n    this.setLegendWrapXY(offsetX, offsetY);\n  }\n  /**\n   * @param {MouseEvent} e\n   */\n  onLegendHovered(e2) {\n    var _a;\n    const w2 = this.w;\n    const target = (\n      /** @type {Element} */\n      e2.target\n    );\n    const hoverOverLegend = target.classList.contains(\"apexcharts-legend-series\") || target.classList.contains(\"apexcharts-legend-text\") || target.classList.contains(\"apexcharts-legend-marker\");\n    if (w2.config.chart.type !== \"heatmap\" && !this.isBarsDistributed) {\n      if (!target.classList.contains(\"apexcharts-inactive-legend\") && hoverOverLegend) {\n        const series = new Series(this.ctx.w);\n        series.toggleSeriesOnHover(e2, target);\n      }\n    } else {\n      if (hoverOverLegend) {\n        const seriesCnt = parseInt((_a = target.getAttribute(\"rel\")) != null ? _a : \"0\", 10) - 1;\n        this.ctx.events.fireEvent(\"legendHover\", [this.ctx, seriesCnt, this.w]);\n        const series = new Series(this.ctx.w);\n        if (e2.type === \"mousemove\") {\n          series.highlightRangeInSeries(seriesCnt, \"highlight\");\n        } else if (e2.type === \"mouseout\") {\n          series.highlightRangeInSeries(seriesCnt, \"reset\");\n        }\n      }\n    }\n  }\n  /**\n   * @param {KeyboardEvent} e\n   */\n  onLegendKeyDown(e2) {\n    const me = this;\n    const w2 = this.w;\n    const target = (\n      /** @type {Element} */\n      e2.target\n    );\n    const isLegendItem = target.classList.contains(\"apexcharts-legend-series\") || target.classList.contains(\"apexcharts-legend-text\") || target.classList.contains(\"apexcharts-legend-marker\");\n    if (!isLegendItem) return;\n    if (e2.key === \"Enter\" || e2.key === \" \") {\n      e2.preventDefault();\n      const rel = target.getAttribute(\"rel\");\n      me.onLegendClick(e2);\n      if (rel !== null && w2.config.legend.onItemClick.toggleDataSeries) {\n        requestAnimationFrame(() => {\n          const restored = w2.dom.baseEl.querySelector(\n            `.apexcharts-legend-series[rel=\"${rel}\"]`\n          );\n          if (restored) restored.focus();\n        });\n      }\n    }\n  }\n  /**\n   * @param {Event} e\n   */\n  onLegendClick(e2) {\n    var _a;\n    const w2 = this.w;\n    const target = (\n      /** @type {Element} */\n      e2.target\n    );\n    if (w2.config.legend.customLegendItems.length) return;\n    if (target.classList.contains(\"apexcharts-legend-series\") || target.classList.contains(\"apexcharts-legend-text\") || target.classList.contains(\"apexcharts-legend-marker\")) {\n      const seriesCnt = parseInt((_a = target.getAttribute(\"rel\")) != null ? _a : \"0\", 10) - 1;\n      const isHidden = target.getAttribute(\"data:collapsed\") === \"true\";\n      const legendClick = this.w.config.chart.events.legendClick;\n      if (typeof legendClick === \"function\") {\n        legendClick(this.ctx, seriesCnt, this.w);\n      }\n      this.ctx.events.fireEvent(\"legendClick\", [this.ctx, seriesCnt, this.w]);\n      const markerClick = this.w.config.legend.markers.onClick;\n      if (typeof markerClick === \"function\" && target.classList.contains(\"apexcharts-legend-marker\")) {\n        markerClick(this.ctx, seriesCnt, this.w);\n        this.ctx.events.fireEvent(\"legendMarkerClick\", [\n          this.ctx,\n          seriesCnt,\n          this.w\n        ]);\n      }\n      const clickAllowed = w2.config.chart.type !== \"treemap\" && w2.config.chart.type !== \"heatmap\" && !this.isBarsDistributed;\n      if (clickAllowed && w2.config.legend.onItemClick.toggleDataSeries) {\n        this.legendHelpers.toggleDataSeries(seriesCnt, isHidden);\n      }\n    }\n  }\n}\nApexCharts.registerFeatures({ legend: Legend });\nconst icoPan = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M5 9 2 12l3 3\"/>\\n    <path d=\"M9 5l3-3 3 3\"/>\\n    <path d=\"M15 19l-3 3-3-3\"/>\\n    <path d=\"M19 9l3 3-3 3\"/>\\n    <path d=\"M2 12h20\"/>\\n    <path d=\"M12 2v20\"/>\\n</svg>\\n';\nconst icoZoom = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <circle cx=\"11\" cy=\"11\" r=\"7\"/>\\n    <path d=\"m21 21-4.3-4.3M8 11h6M11 8v6\"/>\\n</svg>\\n';\nconst icoReset = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\"/>\\n    <path d=\"M3 3v5h5\"/>\\n</svg>\\n';\nconst icoZoomIn = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M12 5v14M5 12h14\"/>\\n</svg>\\n';\nconst icoZoomOut = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M5 12h14\"/>\\n</svg>\\n';\nconst icoSelect = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M5 3a2 2 0 0 0-2 2\"/>\\n    <path d=\"M19 3a2 2 0 0 1 2 2\"/>\\n    <path d=\"M21 19a2 2 0 0 1-2 2\"/>\\n    <path d=\"M5 21a2 2 0 0 1-2-2\"/>\\n    <path d=\"M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1\"/>\\n</svg>\\n';\nconst icoMeasure = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.4 2.4 0 0 1 0-3.4l2.6-2.6a2.4 2.4 0 0 1 3.4 0Z\"/>\\n    <path d=\"m14.5 12.5 2-2\"/>\\n    <path d=\"m11.5 9.5 2-2\"/>\\n    <path d=\"m8.5 6.5 2-2\"/>\\n    <path d=\"m17.5 15.5 2-2\"/>\\n</svg>\\n';\nconst icoMenu = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\\n    <path d=\"M4 6h16M4 12h16M4 18h16\"/>\\n</svg>\\n';\nclass Toolbar {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.ev = this.w.config.chart.events;\n    this.selectedClass = \"apexcharts-selected\";\n    this.localeValues = this.w.globals.locale.toolbar;\n    this.minX = w2.globals.minX;\n    this.maxX = w2.globals.maxX;\n    this.elZoom = null;\n    this.elZoomIn = null;\n    this.elZoomOut = null;\n    this.elPan = null;\n    this.elSelection = null;\n    this.elMeasure = null;\n    this.elZoomReset = null;\n    this.elMenuIcon = null;\n    this.elMenu = null;\n    this.elMenuItems = [];\n    this.t = null;\n  }\n  createToolbar() {\n    var _a, _b;\n    const w2 = this.w;\n    const createDiv = () => {\n      return BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n    };\n    const createBtn = () => {\n      const btn = (\n        /** @type {HTMLButtonElement} */\n        BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"button\")\n      );\n      btn.setAttribute(\"type\", \"button\");\n      return btn;\n    };\n    const elToolbarWrap = createDiv();\n    elToolbarWrap.setAttribute(\"class\", \"apexcharts-toolbar\");\n    elToolbarWrap.style.top = w2.config.chart.toolbar.offsetY + \"px\";\n    elToolbarWrap.style.right = -w2.config.chart.toolbar.offsetX + 3 + \"px\";\n    w2.dom.elWrap.appendChild(elToolbarWrap);\n    this.elZoom = createBtn();\n    this.elZoomIn = createBtn();\n    this.elZoomOut = createBtn();\n    this.elPan = createBtn();\n    this.elSelection = createBtn();\n    this.elMeasure = createBtn();\n    this.elZoomReset = createBtn();\n    this.elMenuIcon = createBtn();\n    this.elMenu = createDiv();\n    this.elCustomIcons = [];\n    this.t = w2.config.chart.toolbar.tools;\n    if (Array.isArray(this.t.customIcons)) {\n      for (let i2 = 0; i2 < this.t.customIcons.length; i2++) {\n        this.elCustomIcons.push(createBtn());\n      }\n    }\n    const toolbarControls = [];\n    const appendZoomControl = (type, el, ico) => {\n      const tool = type.toLowerCase();\n      if (this.t[tool] && w2.config.chart.zoom.enabled) {\n        toolbarControls.push({\n          el,\n          icon: typeof this.t[tool] === \"string\" ? this.t[tool] : ico,\n          title: (\n            /** @type {any} */\n            this.localeValues[type]\n          ),\n          class: `apexcharts-${tool}-icon`\n        });\n      }\n    };\n    appendZoomControl(\"zoomIn\", this.elZoomIn, icoZoomIn);\n    appendZoomControl(\"zoomOut\", this.elZoomOut, icoZoomOut);\n    const zoomSelectionCtrls = (z) => {\n      if (this.t[z] && w2.config.chart[z].enabled) {\n        toolbarControls.push({\n          el: z === \"zoom\" ? this.elZoom : this.elSelection,\n          icon: typeof this.t[z] === \"string\" ? this.t[z] : z === \"zoom\" ? icoZoom : icoSelect,\n          title: (\n            /** @type {any} */\n            this.localeValues[z === \"zoom\" ? \"selectionZoom\" : \"selection\"]\n          ),\n          class: `apexcharts-${z}-icon`\n        });\n      }\n    };\n    zoomSelectionCtrls(\"zoom\");\n    zoomSelectionCtrls(\"selection\");\n    if (this.t.pan && w2.config.chart.zoom.enabled) {\n      toolbarControls.push({\n        el: this.elPan,\n        icon: typeof this.t.pan === \"string\" ? this.t.pan : icoPan,\n        title: this.localeValues.pan,\n        class: \"apexcharts-pan-icon\"\n      });\n    }\n    if (this.t.measure && w2.config.chart.measure && w2.config.chart.measure.enabled) {\n      toolbarControls.push({\n        el: this.elMeasure,\n        icon: typeof this.t.measure === \"string\" ? this.t.measure : icoMeasure,\n        title: (\n          /** @type {any} */\n          this.localeValues.measure || \"Measure\"\n        ),\n        class: \"apexcharts-measure-icon\"\n      });\n    }\n    appendZoomControl(\"reset\", this.elZoomReset, icoReset);\n    if (this.t.download) {\n      toolbarControls.push({\n        el: this.elMenuIcon,\n        icon: typeof this.t.download === \"string\" ? this.t.download : icoMenu,\n        title: this.localeValues.menu,\n        class: \"apexcharts-menu-icon\"\n      });\n    }\n    for (let i2 = 0; i2 < this.elCustomIcons.length; i2++) {\n      toolbarControls.push({\n        el: this.elCustomIcons[i2],\n        icon: this.t.customIcons[i2].icon,\n        title: this.t.customIcons[i2].title,\n        index: this.t.customIcons[i2].index,\n        class: \"apexcharts-toolbar-custom-icon \" + this.t.customIcons[i2].class\n      });\n    }\n    toolbarControls.forEach((t2, index) => {\n      if (t2.index) {\n        Utils$1.moveIndexInArray(toolbarControls, index, t2.index);\n      }\n    });\n    for (let i2 = 0; i2 < toolbarControls.length; i2++) {\n      Graphics.setAttrs(toolbarControls[i2].el, {\n        class: toolbarControls[i2].class,\n        title: toolbarControls[i2].title,\n        \"aria-label\": toolbarControls[i2].title\n      });\n      toolbarControls[i2].el.innerHTML = toolbarControls[i2].icon;\n      elToolbarWrap.appendChild(toolbarControls[i2].el);\n    }\n    if (this.elZoom.parentNode) {\n      this.elZoom.setAttribute(\"aria-pressed\", String(!!w2.interact.zoomEnabled));\n    }\n    if (this.elSelection.parentNode) {\n      this.elSelection.setAttribute(\n        \"aria-pressed\",\n        String(!!w2.interact.selectionEnabled)\n      );\n    }\n    if (this.elPan.parentNode) {\n      this.elPan.setAttribute(\"aria-pressed\", String(!!w2.interact.panEnabled));\n    }\n    if (this.elMeasure.parentNode) {\n      this.elMeasure.setAttribute(\n        \"aria-pressed\",\n        String(!!w2.interact.measureEnabled)\n      );\n    }\n    if (this.elMenuIcon.parentNode) {\n      this.elMenuIcon.setAttribute(\"aria-haspopup\", \"true\");\n      this.elMenuIcon.setAttribute(\"aria-expanded\", \"false\");\n    }\n    this._createHamburgerMenu(elToolbarWrap);\n    if (w2.interact.zoomEnabled) {\n      this.elZoom.classList.add(this.selectedClass);\n    } else if (w2.interact.panEnabled) {\n      this.elPan.classList.add(this.selectedClass);\n    } else if (w2.interact.selectionEnabled) {\n      this.elSelection.classList.add(this.selectedClass);\n    } else if (w2.interact.measureEnabled && this.elMeasure) {\n      this.elMeasure.classList.add(this.selectedClass);\n      (_b = (_a = this.ctx.measure) == null ? void 0 : _a.startMeasure) == null ? void 0 : _b.call(_a);\n    }\n    this.addToolbarEventListeners();\n  }\n  /**\n   * @param {Element} parent\n   */\n  _createHamburgerMenu(parent) {\n    this.elMenuItems = [];\n    parent.appendChild(\n      /** @type {Node} */\n      this.elMenu\n    );\n    Graphics.setAttrs(this.elMenu, {\n      class: \"apexcharts-menu\",\n      role: \"menu\"\n    });\n    const menuItems = [\n      {\n        name: \"exportSVG\",\n        title: this.localeValues.exportToSVG\n      },\n      {\n        name: \"exportPNG\",\n        title: this.localeValues.exportToPNG\n      },\n      {\n        name: \"exportCSV\",\n        title: this.localeValues.exportToCSV\n      }\n    ];\n    for (let i2 = 0; i2 < menuItems.length; i2++) {\n      this.elMenuItems.push(\n        BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\")\n      );\n      this.elMenuItems[i2].innerHTML = menuItems[i2].title;\n      Graphics.setAttrs(this.elMenuItems[i2], {\n        class: `apexcharts-menu-item ${menuItems[i2].name}`,\n        title: menuItems[i2].title,\n        role: \"menuitem\",\n        tabindex: \"-1\"\n      });\n      this.elMenu.appendChild(this.elMenuItems[i2]);\n    }\n  }\n  addToolbarEventListeners() {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n    (_a = this.elZoomReset) == null ? void 0 : _a.addEventListener(\"click\", this.handleZoomReset.bind(this));\n    (_b = this.elSelection) == null ? void 0 : _b.addEventListener(\n      \"click\",\n      this.toggleZoomSelection.bind(this, \"selection\")\n    );\n    (_c = this.elZoom) == null ? void 0 : _c.addEventListener(\n      \"click\",\n      this.toggleZoomSelection.bind(this, \"zoom\")\n    );\n    (_d = this.elZoomIn) == null ? void 0 : _d.addEventListener(\"click\", this.handleZoomIn.bind(this));\n    (_e = this.elZoomOut) == null ? void 0 : _e.addEventListener(\"click\", this.handleZoomOut.bind(this));\n    (_f = this.elPan) == null ? void 0 : _f.addEventListener(\"click\", this.togglePanning.bind(this));\n    (_g = this.elMeasure) == null ? void 0 : _g.addEventListener(\"click\", this.toggleMeasure.bind(this));\n    (_h = this.elMenuIcon) == null ? void 0 : _h.addEventListener(\"click\", this.toggleMenu.bind(this));\n    this.elMenuItems.forEach((m2) => {\n      if (m2.classList.contains(\"exportSVG\")) {\n        m2.addEventListener(\"click\", this.handleDownload.bind(this, \"svg\"));\n      } else if (m2.classList.contains(\"exportPNG\")) {\n        m2.addEventListener(\"click\", this.handleDownload.bind(this, \"png\"));\n      } else if (m2.classList.contains(\"exportCSV\")) {\n        m2.addEventListener(\"click\", this.handleDownload.bind(this, \"csv\"));\n      }\n    });\n    for (let i2 = 0; i2 < this.t.customIcons.length; i2++) {\n      this.elCustomIcons[i2].addEventListener(\n        \"click\",\n        this.t.customIcons[i2].click.bind(this, this.ctx, this.ctx.w)\n      );\n    }\n    const toolbarButtons = [\n      this.elZoomReset,\n      this.elSelection,\n      this.elZoom,\n      this.elZoomIn,\n      this.elZoomOut,\n      this.elPan,\n      this.elMeasure,\n      this.elMenuIcon,\n      ...this.elCustomIcons\n    ];\n    toolbarButtons.forEach((btn) => {\n      btn.addEventListener(\"keydown\", (e2) => {\n        if (e2.key === \"Enter\" || e2.key === \" \") {\n          e2.preventDefault();\n          const btnClass = btn.className;\n          btn.click();\n          requestAnimationFrame(() => {\n            const baseEl = this.w.dom.baseEl;\n            if (!baseEl) return;\n            const apexClass = btnClass.split(\" \").find((c2) => c2.startsWith(\"apexcharts-\"));\n            if (!apexClass) return;\n            const restored = baseEl.querySelector(`.${apexClass}`);\n            if (restored) restored.focus();\n          });\n        }\n      });\n    });\n    (_i = this.elMenuIcon) == null ? void 0 : _i.addEventListener(\n      \"keydown\",\n      (e2) => {\n        var _a2;\n        if (e2.key === \"ArrowDown\" || e2.key === \"ArrowUp\") {\n          e2.preventDefault();\n          if (!((_a2 = this.elMenu) == null ? void 0 : _a2.classList.contains(\"apexcharts-menu-open\"))) {\n            this.toggleMenu();\n          }\n          window.setTimeout(() => {\n            const idx = e2.key === \"ArrowDown\" ? 0 : this.elMenuItems.length - 1;\n            if (this.elMenuItems[idx])\n              this.elMenuItems[idx].focus();\n          }, 20);\n        }\n      }\n    );\n    this.elMenuItems.forEach((m2, idx) => {\n      m2.addEventListener(\"keydown\", (e2) => {\n        var _a2;\n        if (e2.key === \"ArrowDown\") {\n          e2.preventDefault();\n          const next = this.elMenuItems[idx + 1] || this.elMenuItems[0];\n          next.focus();\n        } else if (e2.key === \"ArrowUp\") {\n          e2.preventDefault();\n          const prev = this.elMenuItems[idx - 1] || this.elMenuItems[this.elMenuItems.length - 1];\n          prev.focus();\n        } else if (e2.key === \"Escape\" || e2.key === \"Tab\") {\n          this._closeMenu();\n          (_a2 = this.elMenuIcon) == null ? void 0 : _a2.focus();\n          if (e2.key === \"Tab\") ;\n          else {\n            e2.preventDefault();\n          }\n        } else if (e2.key === \"Enter\" || e2.key === \" \") {\n          e2.preventDefault();\n          m2.click();\n        }\n      });\n    });\n  }\n  /**\n   * @param {string} type\n   */\n  toggleZoomSelection(type) {\n    const charts = this.ctx.getSyncedCharts();\n    charts.forEach((ch) => {\n      const tb = ch.ctx.toolbar;\n      const enabledType = type === \"selection\" ? \"selectionEnabled\" : \"zoomEnabled\";\n      const wasEnabled = !!ch.w.globals[enabledType];\n      tb.toggleOtherControls();\n      const el = type === \"selection\" ? tb.elSelection : tb.elZoom;\n      if (!wasEnabled) {\n        ch.w.globals[enabledType] = true;\n        el.classList.add(tb.selectedClass);\n      }\n      el.setAttribute(\"aria-pressed\", String(!!ch.w.globals[enabledType]));\n    });\n  }\n  /**\n   * Toggle the measure ruler tool. Mutually exclusive with zoom/pan/selection\n   * (toggleOtherControls deselects those and disarms any active measure), so a\n   * fresh enable arms the ruler via the Measure module's sticky mode.\n   */\n  toggleMeasure() {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    const enabling = !w2.interact.measureEnabled;\n    this.toggleOtherControls();\n    if (enabling) {\n      w2.interact.measureEnabled = true;\n      (_a = this.elMeasure) == null ? void 0 : _a.classList.add(this.selectedClass);\n      (_c = (_b = this.ctx.measure) == null ? void 0 : _b.startMeasure) == null ? void 0 : _c.call(_b);\n    }\n    (_d = this.elMeasure) == null ? void 0 : _d.setAttribute(\n      \"aria-pressed\",\n      String(w2.interact.measureEnabled)\n    );\n  }\n  getToolbarIconsReference() {\n    const w2 = this.w;\n    if (!this.elZoom) {\n      this.elZoom = w2.dom.baseEl.querySelector(\".apexcharts-zoom-icon\");\n    }\n    if (!this.elPan) {\n      this.elPan = w2.dom.baseEl.querySelector(\".apexcharts-pan-icon\");\n    }\n    if (!this.elSelection) {\n      this.elSelection = w2.dom.baseEl.querySelector(\n        \".apexcharts-selection-icon\"\n      );\n    }\n    if (!this.elMeasure) {\n      this.elMeasure = w2.dom.baseEl.querySelector(\".apexcharts-measure-icon\");\n    }\n  }\n  /**\n   * @param {string} type\n   */\n  enableZoomPanFromToolbar(type) {\n    this.toggleOtherControls();\n    type === \"pan\" ? this.w.interact.panEnabled = true : this.w.interact.zoomEnabled = true;\n    const el = type === \"pan\" ? this.elPan : this.elZoom;\n    const el2 = type === \"pan\" ? this.elZoom : this.elPan;\n    if (el) {\n      el.classList.add(this.selectedClass);\n    }\n    if (el2) {\n      el2.classList.remove(this.selectedClass);\n    }\n  }\n  togglePanning() {\n    const charts = this.ctx.getSyncedCharts();\n    charts.forEach((ch) => {\n      const tb = ch.ctx.toolbar;\n      const wasEnabled = !!ch.w.interact.panEnabled;\n      tb.toggleOtherControls();\n      if (!wasEnabled) {\n        ch.w.interact.panEnabled = true;\n        tb.elPan.classList.add(tb.selectedClass);\n      }\n      tb.elPan.setAttribute(\"aria-pressed\", String(!!ch.w.interact.panEnabled));\n    });\n  }\n  toggleOtherControls() {\n    var _a, _b, _c;\n    const w2 = this.w;\n    w2.interact.panEnabled = false;\n    w2.interact.zoomEnabled = false;\n    w2.interact.selectionEnabled = false;\n    if (w2.interact.measureEnabled) {\n      w2.interact.measureEnabled = false;\n      (_b = (_a = this.ctx.measure) == null ? void 0 : _a.stopMeasure) == null ? void 0 : _b.call(_a);\n      (_c = this.elMeasure) == null ? void 0 : _c.setAttribute(\"aria-pressed\", \"false\");\n    }\n    this.getToolbarIconsReference();\n    const toggleEls = [this.elPan, this.elSelection, this.elZoom, this.elMeasure];\n    toggleEls.forEach((el) => {\n      if (el) {\n        el.classList.remove(this.selectedClass);\n      }\n    });\n  }\n  /**\n   * Read the current x-range from globals at click time.\n   * Toolbar instance is kept alive across updates (Phase 8 lazy\n   * instantiation), so cached this.minX/maxX go stale after a zoom.\n   * @returns {{minX: number, maxX: number}}\n   */\n  _currentXRange() {\n    const w2 = this.w;\n    if (w2.axisFlags.isRangeBar) {\n      return { minX: w2.globals.minY, maxX: w2.globals.maxY };\n    }\n    return { minX: w2.globals.minX, maxX: w2.globals.maxX };\n  }\n  handleZoomIn() {\n    const w2 = this.w;\n    const { minX, maxX } = this._currentXRange();\n    this.minX = minX;\n    this.maxX = maxX;\n    const centerX = (minX + maxX) / 2;\n    const newMinX = (minX + centerX) / 2;\n    const newMaxX = (maxX + centerX) / 2;\n    const newMinXMaxX = this._getNewMinXMaxX(newMinX, newMaxX);\n    if (!w2.interact.disableZoomIn) {\n      this.zoomUpdateOptions(newMinXMaxX.minX, newMinXMaxX.maxX);\n    }\n  }\n  handleZoomOut() {\n    const w2 = this.w;\n    const { minX, maxX } = this._currentXRange();\n    this.minX = minX;\n    this.maxX = maxX;\n    if (w2.config.xaxis.type === \"datetime\" && new Date(minX).getUTCFullYear() < 1e3) {\n      return;\n    }\n    const centerX = (minX + maxX) / 2;\n    const newMinX = minX - (centerX - minX);\n    const newMaxX = maxX - (centerX - maxX);\n    const newMinXMaxX = this._getNewMinXMaxX(newMinX, newMaxX);\n    if (!w2.interact.disableZoomOut) {\n      this.zoomUpdateOptions(newMinXMaxX.minX, newMinXMaxX.maxX);\n    }\n  }\n  /**\n   * @param {number} newMinX\n   * @param {number} newMaxX\n   */\n  _getNewMinXMaxX(newMinX, newMaxX) {\n    const shouldFloor = this.w.config.xaxis.convertedCatToNumeric;\n    return {\n      minX: shouldFloor ? Math.floor(newMinX) : newMinX,\n      maxX: shouldFloor ? Math.floor(newMaxX) : newMaxX\n    };\n  }\n  /**\n   * @param {number} newMinX\n   * @param {number} newMaxX\n   */\n  zoomUpdateOptions(newMinX, newMaxX) {\n    const w2 = this.w;\n    if (newMinX === void 0 && newMaxX === void 0) {\n      this.handleZoomReset();\n      return;\n    }\n    if (w2.config.xaxis.convertedCatToNumeric) {\n      if (newMinX < 1) {\n        newMinX = 1;\n        newMaxX = w2.globals.dataPoints;\n      }\n      if (newMaxX - newMinX < 2) {\n        return;\n      }\n    }\n    let xaxis = {\n      min: newMinX,\n      max: newMaxX\n    };\n    const beforeZoomRange = this.getBeforeZoomRange(\n      xaxis,\n      /** @type {any} */\n      void 0\n    );\n    if (beforeZoomRange) {\n      xaxis = beforeZoomRange.xaxis;\n    }\n    const options2 = {\n      xaxis\n    };\n    if (!w2.globals.initialConfig) return;\n    const yaxis = Utils$1.clone(w2.globals.initialConfig.yaxis);\n    if (!w2.config.chart.group) {\n      options2.yaxis = yaxis;\n    }\n    this.w.interact.zoomed = true;\n    this.ctx.updateHelpers._updateOptions(\n      options2,\n      false,\n      this.w.config.chart.animations.dynamicAnimation.enabled\n    );\n    this.zoomCallback(xaxis, yaxis);\n  }\n  /**\n   * @param {Record<string, any>} xaxis\n   * @param {Record<string, any>} yaxis\n   */\n  zoomCallback(xaxis, yaxis) {\n    if (typeof this.ev.zoomed === \"function\") {\n      this.ev.zoomed(this.ctx, { xaxis, yaxis });\n      this.ctx.events.fireEvent(\"zoomed\", { xaxis, yaxis });\n    }\n  }\n  /**\n   * @param {Record<string, any>} xaxis\n   * @param {Record<string, any>} yaxis\n   */\n  getBeforeZoomRange(xaxis, yaxis) {\n    let newRange = null;\n    if (typeof this.ev.beforeZoom === \"function\") {\n      newRange = this.ev.beforeZoom(this, { xaxis, yaxis });\n    }\n    return newRange;\n  }\n  toggleMenu() {\n    window.setTimeout(() => {\n      var _a, _b, _c;\n      if ((_a = this.elMenu) == null ? void 0 : _a.classList.contains(\"apexcharts-menu-open\")) {\n        this._closeMenu();\n      } else {\n        (_b = this.elMenu) == null ? void 0 : _b.classList.add(\"apexcharts-menu-open\");\n        (_c = this.elMenuIcon) == null ? void 0 : _c.setAttribute(\"aria-expanded\", \"true\");\n      }\n    }, 0);\n  }\n  _closeMenu() {\n    var _a, _b;\n    (_a = this.elMenu) == null ? void 0 : _a.classList.remove(\"apexcharts-menu-open\");\n    (_b = this.elMenuIcon) == null ? void 0 : _b.setAttribute(\"aria-expanded\", \"false\");\n  }\n  /**\n   * @param {string} type\n   */\n  handleDownload(type) {\n    const w2 = this.w;\n    const exprt = new Exports(this.w, this.ctx);\n    switch (type) {\n      case \"svg\":\n        exprt.exportToSVG();\n        break;\n      case \"png\":\n        exprt.exportToPng();\n        break;\n      case \"csv\":\n        exprt.exportToCSV({\n          series: w2.config.series,\n          columnDelimiter: w2.config.chart.toolbar.export.csv.columnDelimiter\n        });\n        break;\n    }\n  }\n  handleZoomReset() {\n    const charts = this.ctx.getSyncedCharts();\n    charts.forEach((ch) => {\n      const w2 = ch.w;\n      if (!w2.interact.zoomed) return;\n      w2.globals.lastXAxis.min = w2.globals.initialConfig.xaxis.min;\n      w2.globals.lastXAxis.max = w2.globals.initialConfig.xaxis.max;\n      ch.updateHelpers.revertDefaultAxisMinMax();\n      if (typeof w2.config.chart.events.beforeResetZoom === \"function\") {\n        const resetZoomRange = w2.config.chart.events.beforeResetZoom(ch, w2);\n        if (resetZoomRange) {\n          ch.updateHelpers.revertDefaultAxisMinMax(resetZoomRange);\n        }\n      }\n      if (typeof w2.config.chart.events.zoomed === \"function\") {\n        ch.ctx.toolbar.zoomCallback({\n          min: w2.config.xaxis.min,\n          max: w2.config.xaxis.max\n        });\n      }\n      const series = ch.ctx.series.emptyCollapsedSeries(\n        Utils$1.clone(w2.globals.initialSeries)\n      );\n      ch.updateHelpers._updateSeries(\n        series,\n        w2.config.chart.animations.dynamicAnimation.enabled\n      );\n      w2.interact.zoomed = false;\n    });\n  }\n  destroy() {\n    this.elZoom = null;\n    this.elZoomIn = null;\n    this.elZoomOut = null;\n    this.elPan = null;\n    this.elSelection = null;\n    this.elMeasure = null;\n    this.elZoomReset = null;\n    this.elMenuIcon = null;\n  }\n}\nconst WHEEL_ZOOM_PIXELS_PER_2X = 240;\nconst INERTIA_MIN_RELEASE_VELOCITY = 0.05;\nconst INERTIA_DEFAULT_FRICTION = 0.92;\nconst INERTIA_STOP_VELOCITY = 0.02;\nconst FRAME_MS_60FPS = 16.6667;\nconst PAN_NUDGE_DIVISOR = 15;\nclass ZoomPanSelection extends Toolbar {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    super(w2, ctx);\n    this.w = w2;\n    this.ctx = ctx;\n    this.dragged = false;\n    this.graphics = new Graphics(this.w);\n    this.eventList = [\n      \"mousedown\",\n      \"mouseleave\",\n      \"mousemove\",\n      \"touchstart\",\n      \"touchmove\",\n      \"mouseup\",\n      \"touchend\"\n    ];\n    this.clientX = 0;\n    this.clientY = 0;\n    this.startX = 0;\n    this.endX = 0;\n    this.dragX = 0;\n    this.startY = 0;\n    this.endY = 0;\n    this.dragY = 0;\n    this.moveDirection = \"none\";\n  }\n  /** @param {{xyRatios: any}} opts */\n  init({ xyRatios }) {\n    const w2 = this.w;\n    const me = this;\n    this.xyRatios = xyRatios;\n    this.zoomRect = this.graphics.drawRect(0, 0, 0, 0);\n    this.selectionRect = this.graphics.drawRect(0, 0, 0, 0);\n    this.constraints = new Box(0, 0, w2.layout.gridWidth, w2.layout.gridHeight);\n    this.zoomRect.node.classList.add(\"apexcharts-zoom-rect\");\n    this.selectionRect.node.classList.add(\"apexcharts-selection-rect\");\n    w2.dom.Paper.add(this.zoomRect);\n    w2.dom.Paper.add(this.selectionRect);\n    if (w2.config.chart.selection.type === \"x\") {\n      this.slDraggableRect = this.selectionRect.draggable({\n        minX: 0,\n        minY: 0,\n        maxX: w2.layout.gridWidth,\n        maxY: w2.layout.gridHeight\n      }).on(\"dragmove.namespace\", this.selectionDragging.bind(this, \"dragging\"));\n    } else if (w2.config.chart.selection.type === \"y\") {\n      this.slDraggableRect = this.selectionRect.draggable({\n        minX: 0,\n        maxX: w2.layout.gridWidth\n      }).on(\"dragmove.namespace\", this.selectionDragging.bind(this, \"dragging\"));\n    } else {\n      this.slDraggableRect = this.selectionRect.draggable().on(\"dragmove.namespace\", this.selectionDragging.bind(this, \"dragging\"));\n    }\n    this.preselectedSelection();\n    this.hoverArea = /** @type {Element} */\n    w2.dom.baseEl.querySelector(`${w2.globals.chartClass} .apexcharts-svg`);\n    if (!this.hoverArea) return;\n    this.hoverArea.classList.add(\"apexcharts-zoomable\");\n    this.eventList.forEach((event) => {\n      var _a;\n      (_a = this.hoverArea) == null ? void 0 : _a.addEventListener(\n        event,\n        me.svgMouseEvents.bind(me, xyRatios),\n        {\n          capture: false,\n          passive: true\n        }\n      );\n    });\n    if (this._wheelZoomEnabled()) {\n      this.hoverArea.addEventListener(\"wheel\", me.mouseWheelEvent.bind(me), {\n        capture: false,\n        passive: false\n      });\n    }\n    if (this._momentumEnabled()) {\n      [\"touchstart\", \"touchmove\", \"touchend\", \"touchcancel\"].forEach(\n        (event) => {\n          var _a;\n          (_a = this.hoverArea) == null ? void 0 : _a.addEventListener(event, me.momentumTouch.bind(me), {\n            capture: false,\n            passive: false\n          });\n        }\n      );\n    }\n  }\n  // remove the event listeners which were previously added on hover area\n  destroy() {\n    if (this.slDraggableRect) {\n      this.slDraggableRect.draggable(false);\n      this.slDraggableRect.off();\n      this.selectionRect.off();\n    }\n    this.selectionRect = null;\n    this.zoomRect = null;\n  }\n  /**\n   * @param {import('../types/internal').XYRatios} xyRatios\n   * @param {any} e\n   */\n  svgMouseEvents(xyRatios, e2) {\n    const w2 = this.w;\n    const toolbar = this.ctx.toolbar;\n    if (w2.interact.momentum && w2.interact.momentum.busy) return;\n    if (this._momentumEnabled() && e2.touches && e2.touches.length > 1) {\n      return;\n    }\n    const zoomtype = w2.interact.zoomEnabled ? w2.config.chart.zoom.type : w2.config.chart.selection.type;\n    const autoSelected = w2.config.chart.toolbar.autoSelected;\n    if (autoSelected !== \"measure\") {\n      if (e2.shiftKey) {\n        w2.interact.shiftWasPressed = true;\n        toolbar.enableZoomPanFromToolbar(autoSelected === \"pan\" ? \"zoom\" : \"pan\");\n      } else {\n        if (w2.interact.shiftWasPressed) {\n          toolbar.enableZoomPanFromToolbar(autoSelected);\n          w2.interact.shiftWasPressed = false;\n        }\n      }\n    }\n    if (!e2.target) return;\n    const tc = e2.target.classList;\n    let pc;\n    if (e2.target.parentNode && e2.target.parentNode !== null) {\n      pc = e2.target.parentNode.classList;\n    }\n    const falsePositives = tc.contains(\"apexcharts-legend-marker\") || tc.contains(\"apexcharts-legend-text\") || pc && pc.contains(\"apexcharts-toolbar\");\n    if (falsePositives) return;\n    this.clientX = e2.type === \"touchmove\" || e2.type === \"touchstart\" ? e2.touches[0].clientX : e2.type === \"touchend\" ? e2.changedTouches[0].clientX : e2.clientX;\n    this.clientY = e2.type === \"touchmove\" || e2.type === \"touchstart\" ? e2.touches[0].clientY : e2.type === \"touchend\" ? e2.changedTouches[0].clientY : e2.clientY;\n    if (e2.type === \"mousedown\" && e2.which === 1 || e2.type === \"touchstart\") {\n      const gridRectDim = this._gridRect();\n      if (!gridRectDim) return;\n      this.startX = this._screenXToPlotPx(this.clientX);\n      this.startY = this.clientY - gridRectDim.top;\n      this.dragged = false;\n      this.w.interact.mousedown = true;\n    }\n    if (e2.type === \"mousemove\" && e2.which === 1 || e2.type === \"touchmove\") {\n      this.dragged = true;\n      if (w2.interact.panEnabled) {\n        w2.interact.selection = null;\n        if (this.w.interact.mousedown) {\n          this.panDragging({\n            context: this,\n            zoomtype,\n            xyRatios: this.xyRatios\n          });\n        }\n      } else {\n        if (this.w.interact.mousedown && w2.interact.zoomEnabled || this.w.interact.mousedown && w2.interact.selectionEnabled) {\n          this.selection = this.selectionDrawing({\n            context: this,\n            zoomtype\n          });\n        }\n      }\n    }\n    if (e2.type === \"mouseup\" || e2.type === \"touchend\" || e2.type === \"mouseleave\") {\n      this.handleMouseUp({ zoomtype });\n    }\n    this.makeSelectionRectDraggable();\n  }\n  /** @param {{ zoomtype?: any, isResized?: any }} opts */\n  handleMouseUp({ zoomtype, isResized }) {\n    const w2 = this.w;\n    const gridRectDim = this._gridRect();\n    if (gridRectDim && (this.w.interact.mousedown || isResized)) {\n      this.endX = this._screenXToPlotPx(this.clientX);\n      this.endY = this.clientY - gridRectDim.top;\n      this.dragX = Math.abs(this.endX - this.startX);\n      this.dragY = Math.abs(this.endY - this.startY);\n      if (w2.interact.zoomEnabled || w2.interact.selectionEnabled) {\n        this.selectionDrawn({\n          context: this,\n          zoomtype\n        });\n      }\n    }\n    if (w2.interact.zoomEnabled) {\n      this.hideSelectionRect(this.selectionRect);\n    }\n    this.dragged = false;\n    this.w.interact.mousedown = false;\n  }\n  // ---------------------------------------------------------------------------\n  // Wheel zoom: continuous, cursor-anchored zoom on mouse wheel / trackpad.\n  //\n  // Each wheel event multiplies a pending zoom factor scaled to its deltaY (so\n  // a trackpad's stream of tiny deltas and a discrete wheel's ±100 notches both\n  // feel proportional), and the accumulated factor is applied at most once per\n  // animation frame through the same immediate, animation-free fast path the\n  // touch pinch uses (_applyXRange). Deliberately instant, trading-chart style:\n  // no per-step morph and no easing between steps (an animated variant was\n  // tried and rejected). The original implementation instead ran a fixed\n  // 0.5x/1.5x animated update at most once per 400ms and dropped every wheel\n  // event in between, which read as lag on continuous scrolling.\n  //\n  // Like Momentum (see the comment above momentumTouch), applying a frame\n  // triggers _updateOptions, which destroys and recreates this instance\n  // mid-gesture, so all wheel-gesture state lives on w.interact.wheel rather\n  // than on the instance.\n  // ---------------------------------------------------------------------------\n  /**\n   * A wheel or pinch zoom is an incidental gesture: the viewer can land in a\n   * zoomed window without meaning to (a page scroll over the chart, a two-finger\n   * swipe), so it is only offered when there is a way back out of it. The only\n   * built-in way back is the toolbar's reset button, hence 'auto' (the default\n   * for both allowMouseWheelZoom and pinch) resolves against that button being\n   * present. A page that builds its own reset control sets the option to true\n   * and gets the gesture with no toolbar. Drag-to-zoom is deliberate, so it is\n   * not gated this way.\n   *\n   * @param {boolean|'auto'} setting\n   */\n  _incidentalZoomEnabled(setting) {\n    var _a, _b, _c;\n    const c2 = this.w.config.chart;\n    if (!c2.zoom || !c2.zoom.enabled) return false;\n    if (setting !== \"auto\") return !!setting;\n    return !!(((_a = c2.toolbar) == null ? void 0 : _a.show) && ((_c = (_b = c2.toolbar) == null ? void 0 : _b.tools) == null ? void 0 : _c.reset));\n  }\n  _wheelZoomEnabled() {\n    const { zoom } = this.w.config.chart;\n    return this._incidentalZoomEnabled(zoom && zoom.allowMouseWheelZoom);\n  }\n  /** Lazily-created, re-render-surviving wheel-gesture state. */\n  _wheel() {\n    const it = this.w.interact;\n    if (!it.wheel) {\n      it.wheel = {\n        factor: 1,\n        clientX: 0,\n        /** @type {number|null} */\n        rafId: null,\n        /** @type {any} */\n        endTimer: null\n      };\n    }\n    return it.wheel;\n  }\n  /**\n   * @param {any} e\n   */\n  mouseWheelEvent(e2) {\n    e2.preventDefault();\n    const st = this._wheel();\n    let dy = e2.deltaY;\n    if (e2.deltaMode === 1) dy *= 33;\n    else if (e2.deltaMode === 2) dy *= 330;\n    st.factor *= Math.pow(2, dy / WHEEL_ZOOM_PIXELS_PER_2X);\n    st.clientX = e2.clientX;\n    if (st.rafId == null) {\n      st.rafId = requestAnimationFrame(() => this._applyWheelZoom());\n    }\n    if (st.endTimer) clearTimeout(st.endTimer);\n    st.endTimer = setTimeout(() => this._endWheelZoom(), 150);\n  }\n  /**\n   * Apply the zoom factor accumulated since the last animation frame, keeping\n   * the data value under the cursor pinned (both zooming in and out).\n   */\n  _applyWheelZoom() {\n    const w2 = this.w;\n    const st = this._wheel();\n    st.rafId = null;\n    const scale = st.factor;\n    st.factor = 1;\n    if (scale === 1 || w2.globals.isDestroyed) return;\n    const gridRectDim = this._gridRect();\n    if (!gridRectDim || !gridRectDim.width) return;\n    const { min, max } = this._currentXWindow();\n    const range = max - min;\n    const mouseX = Math.min(\n      Math.max((st.clientX - gridRectDim.left) / gridRectDim.width, 0),\n      1\n    );\n    let newRange = range * scale;\n    const bounds = this._clampBounds();\n    if (bounds) {\n      const minXDiff = w2.globals.minXDiff > 0 && isFinite(w2.globals.minXDiff) ? w2.globals.minXDiff : 0;\n      const minRange = Math.max(minXDiff * 2, (bounds.max - bounds.min) * 1e-6);\n      if (newRange < minRange) newRange = minRange;\n      if (newRange > bounds.max - bounds.min) newRange = bounds.max - bounds.min;\n    }\n    const anchor = min + mouseX * range;\n    let newMinX = anchor - mouseX * newRange;\n    let newMaxX = newMinX + newRange;\n    const eps = range * 1e-9;\n    if (Math.abs(newMinX - min) < eps && Math.abs(newMaxX - max) < eps) return;\n    if (isNaN(newMinX) || isNaN(newMaxX)) return;\n    const beforeZoomRange = this.getBeforeZoomRange(\n      { min: newMinX, max: newMaxX },\n      /** @type {any} */\n      void 0\n    );\n    if (beforeZoomRange && beforeZoomRange.xaxis) {\n      newMinX = beforeZoomRange.xaxis.min;\n      newMaxX = beforeZoomRange.xaxis.max;\n    }\n    this._applyXRange(newMinX, newMaxX, true);\n  }\n  /** Fire the zoomed callback once the wheel gesture settles (mirrors _endPinch). */\n  _endWheelZoom() {\n    const w2 = this.w;\n    const st = this._wheel();\n    st.endTimer = null;\n    if (w2.globals.isDestroyed || !w2.interact.zoomed) return;\n    const { min, max } = this._currentXWindow();\n    const yaxis = w2.globals.initialConfig ? Utils$1.clone(w2.globals.initialConfig.yaxis) : [];\n    const toolbar = this.ctx.toolbar;\n    if (toolbar) toolbar.zoomCallback({ min, max }, yaxis);\n  }\n  makeSelectionRectDraggable() {\n    const w2 = this.w;\n    if (!this.selectionRect) return;\n    const rectDim = this.selectionRect.node.getBoundingClientRect();\n    if (rectDim.width > 0 && rectDim.height > 0) {\n      this.selectionRect.select(false).resize(false);\n      this.selectionRect.select({\n        createRot: () => {\n        },\n        updateRot: () => {\n        },\n        createHandle: (group, p2, index, pointArr, handleName) => {\n          if (handleName === \"l\" || handleName === \"r\")\n            return group.circle(8).css({ \"stroke-width\": 1, stroke: \"#333\", fill: \"#fff\" });\n          return group.circle(0);\n        },\n        updateHandle: (group, p2) => {\n          return group.center(p2[0], p2[1]);\n        }\n      }).resize().on(\"resize\", () => {\n        var _a;\n        if (w2.interact.selectionEnabled) {\n          w2.interact.selection = {\n            x: parseFloat(this.selectionRect.node.getAttribute(\"x\")),\n            y: parseFloat(this.selectionRect.node.getAttribute(\"y\")),\n            width: parseFloat(this.selectionRect.node.getAttribute(\"width\")),\n            height: parseFloat(this.selectionRect.node.getAttribute(\"height\"))\n          };\n          clearTimeout((_a = this.w.globals.selectionResizeTimer) != null ? _a : void 0);\n          this.w.globals.selectionResizeTimer = window.setTimeout(() => {\n            this._emitSelectionFromRect();\n          }, 30);\n        } else {\n          const zoomtype = w2.interact.zoomEnabled ? w2.config.chart.zoom.type : w2.config.chart.selection.type;\n          this.handleMouseUp({ zoomtype, isResized: true });\n        }\n      });\n    }\n  }\n  preselectedSelection() {\n    const w2 = this.w;\n    const xyRatios = this.xyRatios;\n    if (!w2.interact.zoomEnabled) {\n      if (typeof w2.interact.selection !== \"undefined\" && w2.interact.selection !== null) {\n        this.drawSelectionRect(__spreadProps(__spreadValues({}, w2.interact.selection), {\n          translateX: w2.layout.translateX,\n          translateY: w2.layout.translateY\n        }));\n      } else {\n        if (w2.config.chart.selection.xaxis.min !== void 0 && w2.config.chart.selection.xaxis.max !== void 0) {\n          let x = AxisMapping.dataXToPx(w2, w2.config.chart.selection.xaxis.min);\n          let width = AxisMapping.dataXToPx(w2, w2.config.chart.selection.xaxis.max) - x;\n          if (w2.axisFlags.isRangeBar) {\n            x = (w2.config.chart.selection.xaxis.min - w2.globals.yAxisScale[0].niceMin) / xyRatios.invertedYRatio;\n            width = (w2.config.chart.selection.xaxis.max - w2.config.chart.selection.xaxis.min) / xyRatios.invertedYRatio;\n          }\n          const selectionRect = {\n            x,\n            y: 0,\n            width,\n            height: w2.layout.gridHeight,\n            translateX: w2.layout.translateX,\n            translateY: w2.layout.translateY,\n            selectionEnabled: true\n          };\n          this.drawSelectionRect(selectionRect);\n          this.makeSelectionRectDraggable();\n          if (typeof w2.config.chart.events.selection === \"function\") {\n            w2.config.chart.events.selection(this.ctx, {\n              xaxis: {\n                min: w2.config.chart.selection.xaxis.min,\n                max: w2.config.chart.selection.xaxis.max\n              },\n              yaxis: {}\n            });\n          }\n        }\n      }\n    }\n  }\n  /** @param {{x: any, y: any, width: any, height: any, translateX: any, translateY: any}} opts */\n  drawSelectionRect({ x, y, width, height, translateX = 0, translateY = 0 }) {\n    const w2 = this.w;\n    const zoomRect = this.zoomRect;\n    const selectionRect = this.selectionRect;\n    if (this.dragged || w2.interact.selection !== null) {\n      const scalingAttrs = {\n        transform: \"translate(\" + translateX + \", \" + translateY + \")\"\n      };\n      if (w2.interact.zoomEnabled && this.dragged) {\n        if (width < 0) width = 1;\n        zoomRect.attr({\n          x,\n          y,\n          width,\n          height,\n          fill: w2.config.chart.zoom.zoomedArea.fill.color,\n          \"fill-opacity\": w2.config.chart.zoom.zoomedArea.fill.opacity,\n          stroke: w2.config.chart.zoom.zoomedArea.stroke.color,\n          \"stroke-width\": w2.config.chart.zoom.zoomedArea.stroke.width,\n          \"stroke-opacity\": w2.config.chart.zoom.zoomedArea.stroke.opacity\n        });\n        Graphics.setAttrs(zoomRect.node, scalingAttrs);\n      }\n      if (w2.interact.selectionEnabled) {\n        selectionRect.attr({\n          x,\n          y,\n          width: width > 0 ? width : 0,\n          height: height > 0 ? height : 0,\n          fill: w2.config.chart.selection.fill.color,\n          \"fill-opacity\": w2.config.chart.selection.fill.opacity,\n          stroke: w2.config.chart.selection.stroke.color,\n          \"stroke-width\": w2.config.chart.selection.stroke.width,\n          \"stroke-dasharray\": w2.config.chart.selection.stroke.dashArray,\n          \"stroke-opacity\": w2.config.chart.selection.stroke.opacity\n        });\n        Graphics.setAttrs(selectionRect.node, scalingAttrs);\n      }\n    }\n  }\n  /**\n   * @param {any} rect\n   */\n  hideSelectionRect(rect) {\n    if (rect) {\n      rect.attr({\n        x: 0,\n        y: 0,\n        width: 0,\n        height: 0\n      });\n    }\n  }\n  selectionDrawing({ context, zoomtype }) {\n    const w2 = this.w;\n    const me = context;\n    const gridRectDim = this._gridRect();\n    if (!gridRectDim) return;\n    const startX = me.startX - 1;\n    const startY = me.startY;\n    let inversedX = false;\n    let inversedY = false;\n    const left = this._screenXToPlotPx(me.clientX);\n    const top = me.clientY - gridRectDim.top;\n    let selectionWidth = left - startX;\n    let selectionHeight = top - startY;\n    let selectionRect = {\n      translateX: w2.layout.translateX,\n      translateY: w2.layout.translateY\n    };\n    if (Math.abs(selectionWidth + startX) > w2.layout.gridWidth) {\n      selectionWidth = w2.layout.gridWidth - startX;\n    } else if (left < 0) {\n      selectionWidth = startX;\n    }\n    if (startX > left) {\n      inversedX = true;\n      selectionWidth = Math.abs(selectionWidth);\n    }\n    if (startY > top) {\n      inversedY = true;\n      selectionHeight = Math.abs(selectionHeight);\n    }\n    if (zoomtype === \"x\") {\n      selectionRect = {\n        x: inversedX ? startX - selectionWidth : startX,\n        y: 0,\n        width: selectionWidth,\n        height: w2.layout.gridHeight\n      };\n    } else if (zoomtype === \"y\") {\n      selectionRect = {\n        x: 0,\n        y: inversedY ? startY - selectionHeight : startY,\n        width: w2.layout.gridWidth,\n        height: selectionHeight\n      };\n    } else {\n      selectionRect = {\n        x: inversedX ? startX - selectionWidth : startX,\n        y: inversedY ? startY - selectionHeight : startY,\n        width: selectionWidth,\n        height: selectionHeight\n      };\n    }\n    selectionRect = __spreadProps(__spreadValues({}, selectionRect), {\n      translateX: w2.layout.translateX,\n      translateY: w2.layout.translateY\n    });\n    me.drawSelectionRect(selectionRect);\n    me.selectionDragging(\"resizing\");\n    return selectionRect;\n  }\n  /**\n   * @param {string} type\n   * @param {CustomEvent} e\n   */\n  selectionDragging(type, e2) {\n    var _a;\n    const w2 = this.w;\n    if (!e2) return;\n    e2.preventDefault();\n    const { handler, box } = e2.detail;\n    const constraints = (\n      /** @type {any} */\n      this.constraints\n    );\n    let { x, y } = box;\n    if (x < constraints.x) {\n      x = constraints.x;\n    }\n    if (y < constraints.y) {\n      y = constraints.y;\n    }\n    if (box.x2 > constraints.x2) {\n      x = constraints.x2 - box.w;\n    }\n    if (box.y2 > constraints.y2) {\n      y = constraints.y2 - box.h;\n    }\n    handler.move(x, y);\n    const selRect = this.selectionRect;\n    let timerInterval = 0;\n    if (type === \"resizing\") {\n      timerInterval = 30;\n    }\n    const getSelAttr = (attr) => {\n      return parseFloat(selRect.node.getAttribute(attr));\n    };\n    const draggedProps = {\n      x: getSelAttr(\"x\"),\n      y: getSelAttr(\"y\"),\n      width: getSelAttr(\"width\"),\n      height: getSelAttr(\"height\")\n    };\n    w2.interact.selection = draggedProps;\n    const link = w2.config.chart.link;\n    const linkActive = !!(link && (link.enabled || typeof link.dimension === \"function\"));\n    if ((typeof w2.config.chart.events.selection === \"function\" || linkActive) && w2.interact.selectionEnabled) {\n      clearTimeout((_a = this.w.globals.selectionResizeTimer) != null ? _a : void 0);\n      this.w.globals.selectionResizeTimer = window.setTimeout(() => {\n        this._emitSelectionFromRect();\n      }, timerInterval);\n    }\n  }\n  /**\n   * Recompute the reported x/y range from the CURRENT persistent selection rect\n   * (via the shared AxisMapping) and notify listeners: chart.events.selection,\n   * brushScrolled, and the crossfilter coordinator. Shared by the rect-body drag\n   * (selectionDragging) and the handle resize (makeSelectionRectDraggable) so\n   * every gesture re-reports through ONE mapping and the reported range always\n   * matches the rect the user sees. No dragged/threshold gate: reaching here\n   * already means the user moved or resized the persistent rect.\n   */\n  _emitSelectionFromRect() {\n    var _a;\n    const w2 = this.w;\n    if (!w2.interact.selectionEnabled) return;\n    const link = w2.config.chart.link;\n    const linkActive = !!(link && (link.enabled || typeof link.dimension === \"function\"));\n    if (typeof w2.config.chart.events.selection !== \"function\" && !linkActive) {\n      return;\n    }\n    const gridRectDim = this._gridRect();\n    if (!gridRectDim) return;\n    const selectionRect = this.selectionRect.node.getBoundingClientRect();\n    const xyRatios = this.xyRatios;\n    let minX, maxX, minY, maxY;\n    const relLeft = this._screenXToPlotPx(selectionRect.left);\n    const relRight = this._screenXToPlotPx(selectionRect.right);\n    if (!w2.axisFlags.isRangeBar) {\n      if (!w2.globals.xAxisScale) return;\n      minX = AxisMapping.pxToDataX(w2, relLeft);\n      maxX = AxisMapping.pxToDataX(w2, relRight);\n      minY = w2.globals.yAxisScale[0].niceMin + (gridRectDim.bottom - selectionRect.bottom) * xyRatios.yRatio[0];\n      maxY = w2.globals.yAxisScale[0].niceMax - (selectionRect.top - gridRectDim.top) * xyRatios.yRatio[0];\n    } else {\n      minX = w2.globals.yAxisScale[0].niceMin + relLeft * xyRatios.invertedYRatio;\n      maxX = w2.globals.yAxisScale[0].niceMin + relRight * xyRatios.invertedYRatio;\n      minY = 0;\n      maxY = 1;\n    }\n    const xyAxis = {\n      xaxis: { min: minX, max: maxX },\n      yaxis: { min: minY, max: maxY }\n    };\n    if (typeof w2.config.chart.events.selection === \"function\") {\n      w2.config.chart.events.selection(this.ctx, xyAxis);\n    }\n    if (w2.config.chart.brush.enabled && w2.config.chart.events.brushScrolled !== void 0) {\n      w2.config.chart.events.brushScrolled(this.ctx, xyAxis);\n    }\n    (_a = this.ctx.linkedViews) == null ? void 0 : _a.onSourceSelection(xyAxis.xaxis);\n  }\n  /** @param {{context: any, zoomtype: any}} opts */\n  selectionDrawn({ context, zoomtype }) {\n    var _a;\n    const w2 = this.w;\n    const me = context;\n    const xyRatios = this.xyRatios;\n    const toolbar = this.ctx.toolbar;\n    const selRect = w2.interact.zoomEnabled ? me.zoomRect.node.getBoundingClientRect() : me.selectionRect.node.getBoundingClientRect();\n    const gridRectDim = me._gridRect();\n    if (!gridRectDim) return;\n    const localStartX = this._screenXToPlotPx(selRect.left);\n    const localEndX = this._screenXToPlotPx(selRect.right);\n    const localStartY = selRect.top - gridRectDim.top;\n    const localEndY = selRect.bottom - gridRectDim.top;\n    let xLowestValue, xHighestValue;\n    if (!w2.axisFlags.isRangeBar) {\n      xLowestValue = AxisMapping.pxToDataX(w2, localStartX);\n      xHighestValue = AxisMapping.pxToDataX(w2, localEndX);\n    } else {\n      xLowestValue = w2.globals.yAxisScale[0].niceMin + localStartX * xyRatios.invertedYRatio;\n      xHighestValue = w2.globals.yAxisScale[0].niceMin + localEndX * xyRatios.invertedYRatio;\n    }\n    const yHighestValue = [];\n    const yLowestValue = [];\n    w2.config.yaxis.forEach((yaxe, index) => {\n      const seriesIndex = w2.globals.seriesYAxisMap[index][0];\n      const highestVal = w2.globals.yAxisScale[index].niceMax - xyRatios.yRatio[seriesIndex] * localStartY;\n      const lowestVal = w2.globals.yAxisScale[index].niceMax - xyRatios.yRatio[seriesIndex] * localEndY;\n      yHighestValue.push(highestVal);\n      yLowestValue.push(lowestVal);\n    });\n    if (me.dragged && (me.dragX > 10 || me.dragY > 10) && xLowestValue !== xHighestValue) {\n      if (w2.interact.zoomEnabled) {\n        if (!w2.globals.initialConfig) return;\n        let yaxis = Utils$1.clone(w2.globals.initialConfig.yaxis);\n        let xaxis = Utils$1.clone(w2.globals.initialConfig.xaxis);\n        w2.interact.zoomed = true;\n        if (w2.config.xaxis.convertedCatToNumeric) {\n          xLowestValue = Math.floor(xLowestValue);\n          xHighestValue = Math.floor(xHighestValue);\n          if (xLowestValue < 1) {\n            xLowestValue = 1;\n            xHighestValue = w2.globals.dataPoints;\n          }\n          if (xHighestValue - xLowestValue < 2) {\n            xHighestValue = xLowestValue + 1;\n          }\n        }\n        if (zoomtype === \"xy\" || zoomtype === \"x\") {\n          xaxis = {\n            min: xLowestValue,\n            max: xHighestValue\n          };\n        }\n        if (zoomtype === \"xy\" || zoomtype === \"y\") {\n          yaxis.forEach((yaxe, index) => {\n            yaxis[index].min = yLowestValue[index];\n            yaxis[index].max = yHighestValue[index];\n          });\n        }\n        if (toolbar) {\n          const beforeZoomRange = toolbar.getBeforeZoomRange(xaxis, yaxis);\n          if (beforeZoomRange) {\n            xaxis = beforeZoomRange.xaxis ? beforeZoomRange.xaxis : xaxis;\n            yaxis = beforeZoomRange.yaxis ? beforeZoomRange.yaxis : yaxis;\n          }\n        }\n        const options2 = {\n          xaxis\n        };\n        if (!w2.config.chart.group) {\n          options2.yaxis = yaxis;\n        }\n        me.ctx.updateHelpers._updateOptions(\n          options2,\n          false,\n          me.w.config.chart.animations.dynamicAnimation.enabled\n        );\n        if (typeof w2.config.chart.events.zoomed === \"function\") {\n          toolbar.zoomCallback(xaxis, yaxis);\n        }\n      } else if (w2.interact.selectionEnabled) {\n        let yaxis = null;\n        let xaxis = null;\n        xaxis = {\n          min: xLowestValue,\n          max: xHighestValue\n        };\n        if (zoomtype === \"xy\" || zoomtype === \"y\") {\n          const yaxisCopy = (\n            /** @type {ApexYAxis[]} */\n            Utils$1.clone(w2.config.yaxis)\n          );\n          yaxis = yaxisCopy;\n          yaxisCopy.forEach((yaxe, index) => {\n            yaxisCopy[index].min = yLowestValue[index];\n            yaxisCopy[index].max = yHighestValue[index];\n          });\n        }\n        w2.interact.selection = me.selection;\n        if (typeof w2.config.chart.events.selection === \"function\") {\n          w2.config.chart.events.selection(me.ctx, {\n            xaxis,\n            yaxis\n          });\n        }\n        (_a = me.ctx.linkedViews) == null ? void 0 : _a.onSourceSelection(xaxis);\n      }\n    }\n  }\n  /** @param {{ context?: any, zoomtype?: any, xyRatios?: any }} opts */\n  panDragging({ context }) {\n    var _a;\n    const w2 = this.w;\n    const me = context;\n    if (typeof w2.interact.lastClientPosition.x !== \"undefined\") {\n      const deltaX = w2.interact.lastClientPosition.x - me.clientX;\n      const deltaY = ((_a = w2.interact.lastClientPosition.y) != null ? _a : 0) - me.clientY;\n      if (Math.abs(deltaX) > Math.abs(deltaY) && deltaX > 0) {\n        this.moveDirection = \"left\";\n      } else if (Math.abs(deltaX) > Math.abs(deltaY) && deltaX < 0) {\n        this.moveDirection = \"right\";\n      } else if (Math.abs(deltaY) > Math.abs(deltaX) && deltaY > 0) {\n        this.moveDirection = \"up\";\n      } else if (Math.abs(deltaY) > Math.abs(deltaX) && deltaY < 0) {\n        this.moveDirection = \"down\";\n      }\n    }\n    w2.interact.lastClientPosition = {\n      x: me.clientX,\n      y: me.clientY\n    };\n    const xLowestValue = w2.axisFlags.isRangeBar ? w2.globals.minY : w2.globals.minX;\n    const xHighestValue = w2.axisFlags.isRangeBar ? w2.globals.maxY : w2.globals.maxX;\n    me.panScrolled(xLowestValue, xHighestValue);\n  }\n  // delayedPanScrolled() {\n  //   const w = this.w\n  //   let newMinX = w.globals.minX\n  //   let newMaxX = w.globals.maxX\n  //   const centerX = (w.globals.maxX - w.globals.minX) / 2\n  //   if (this.moveDirection === 'left') {\n  //     newMinX = w.globals.minX + centerX\n  //     newMaxX = w.globals.maxX + centerX\n  //   } else if (this.moveDirection === 'right') {\n  //     newMinX = w.globals.minX - centerX\n  //     newMaxX = w.globals.maxX - centerX\n  //   }\n  //   newMinX = Math.floor(newMinX)\n  //   newMaxX = Math.floor(newMaxX)\n  //   this.updateScrolledChart(\n  //     { xaxis: { min: newMinX, max: newMaxX } },\n  //     newMinX,\n  //     newMaxX\n  //   )\n  // }\n  /**\n   * @param {number} xLowestValue\n   * @param {number} xHighestValue\n   */\n  panScrolled(xLowestValue, xHighestValue) {\n    var _a, _b;\n    const w2 = this.w;\n    const xyRatios = this.xyRatios;\n    if (!w2.globals.initialConfig) return;\n    const yaxis = Utils$1.clone(w2.globals.initialConfig.yaxis);\n    let xRatio = xyRatios.xRatio;\n    let minX = w2.globals.minX;\n    let maxX = w2.globals.maxX;\n    if (w2.axisFlags.isRangeBar) {\n      xRatio = xyRatios.invertedYRatio;\n      minX = w2.globals.minY;\n      maxX = w2.globals.maxY;\n    }\n    if (this.moveDirection === \"left\") {\n      xLowestValue = minX + w2.layout.gridWidth / PAN_NUDGE_DIVISOR * xRatio;\n      xHighestValue = maxX + w2.layout.gridWidth / PAN_NUDGE_DIVISOR * xRatio;\n    } else if (this.moveDirection === \"right\") {\n      xLowestValue = minX - w2.layout.gridWidth / PAN_NUDGE_DIVISOR * xRatio;\n      xHighestValue = maxX - w2.layout.gridWidth / PAN_NUDGE_DIVISOR * xRatio;\n    }\n    if (!w2.axisFlags.isRangeBar) {\n      const clampMin = (_a = w2.globals.dataReducerRawMinX) != null ? _a : w2.globals.initialMinX;\n      const clampMax = (_b = w2.globals.dataReducerRawMaxX) != null ? _b : w2.globals.initialMaxX;\n      if (xLowestValue < clampMin || xHighestValue > clampMax) {\n        xLowestValue = minX;\n        xHighestValue = maxX;\n      }\n    }\n    const xaxis = {\n      min: xLowestValue,\n      max: xHighestValue\n    };\n    const options2 = {\n      xaxis\n    };\n    if (!w2.config.chart.group) {\n      options2.yaxis = yaxis;\n    }\n    this.updateScrolledChart(options2, xLowestValue, xHighestValue);\n  }\n  /**\n   * @param {object} options\n   * @param {number} xLowestValue\n   * @param {number} xHighestValue\n   */\n  updateScrolledChart(options2, xLowestValue, xHighestValue) {\n    const w2 = this.w;\n    this.ctx.updateHelpers._updateOptions(options2, false, false);\n    if (typeof w2.config.chart.events.scrolled === \"function\") {\n      const args = {\n        xaxis: {\n          min: xLowestValue,\n          max: xHighestValue\n        }\n      };\n      w2.config.chart.events.scrolled(this.ctx, args);\n      this.ctx.events.fireEvent(\"scrolled\", args);\n    }\n  }\n  // ---------------------------------------------------------------------------\n  // Momentum: multi-touch pinch-zoom, two-finger pan and kinetic inertia.\n  //\n  // Every _updateOptions destroys and recreates this instance, and applying a\n  // gesture frame IS an _updateOptions, so the gesture must not depend on the\n  // instance surviving. All runtime state lives on w.interact.momentum (the\n  // interaction slice that persists across re-renders, like the crude pan's\n  // lastClientPosition). The instance that received touchstart keeps driving\n  // the gesture off the persistent state; inertia is a self-contained rAF loop\n  // that stops on w.globals.isDestroyed (a real destroy) rather than being\n  // cancelled by the per-update destroy().\n  // ---------------------------------------------------------------------------\n  _momentumEnabled() {\n    return this._pinchEnabled() || this._panInertiaEnabled();\n  }\n  _pinchEnabled() {\n    return this._incidentalZoomEnabled(this.w.config.chart.zoom.pinch);\n  }\n  _panInertiaEnabled() {\n    const c2 = this.w.config.chart;\n    return !!(c2.pan && c2.pan.inertia);\n  }\n  /** Lazily-created, re-render-surviving gesture state on the interaction slice. */\n  _m() {\n    const it = this.w.interact;\n    if (!it.momentum) {\n      it.momentum = {\n        busy: false,\n        /** @type {any} */\n        pinch: null,\n        /** @type {any} */\n        panState: null,\n        /** @type {{x:number,t:number}[]} */\n        samples: [],\n        /** @type {number|null} */\n        inertiaRAF: null\n      };\n    }\n    return it.momentum;\n  }\n  /** Current x data-window (rangeBars carry the datetime domain on y). */\n  _currentXWindow() {\n    const w2 = this.w;\n    return w2.axisFlags.isRangeBar ? { min: w2.globals.minY, max: w2.globals.maxY } : { min: w2.globals.minX, max: w2.globals.maxX };\n  }\n  /** Live grid rect from the current DOM. Never cache the grid node on the\n   * instance: a full render replaces this whole instance, but the fast update\n   * path (fastUpdate/_fastAxisChromeRefresh) keeps the instance while swapping\n   * the grid node, and a cached node would go stale (detached nodes report an\n   * all-zero bounding rect, silently corrupting selection geometry). */\n  _gridRect() {\n    const baseEl = this.w.dom.baseEl;\n    const grid = baseEl && baseEl.querySelector(\".apexcharts-grid\");\n    return grid ? grid.getBoundingClientRect() : null;\n  }\n  /**\n   * Convert an absolute (client) x pixel to the plot-origin coordinate space\n   * that bar placement and the selection rect transform both use:\n   * `screenX - svgLeft - translateX`. This is the ONLY correct reference for the\n   * numeric/datetime x mapping (see AxisMapping): do NOT measure from the\n   * `.apexcharts-grid` box and subtract barPadForNumericAxis, because on a\n   * numeric bar chart that box extends barPad to the LEFT of the plot origin, so\n   * the two corrections are a fragile pair that only cancels while the grid box\n   * happens to extend exactly barPad. Anchoring on translateX (the same origin\n   * the bars use) is stable regardless of grid padding.\n   * @param {number} screenX\n   * @returns {number}\n   */\n  _screenXToPlotPx(screenX) {\n    return AxisMapping.screenXToPlotPx(this.w, screenX);\n  }\n  /**\n   * Raw data bounds to clamp against. When zoom-aware downsampling is active,\n   * the raw stash tracks the full domain; fall back to the initial window.\n   * Returns null for rangeBars (no raw-x clamp available).\n   * @returns {{min:number, max:number}|null}\n   */\n  _clampBounds() {\n    var _a, _b;\n    const w2 = this.w;\n    if (w2.axisFlags.isRangeBar) return null;\n    return {\n      min: (_a = w2.globals.dataReducerRawMinX) != null ? _a : w2.globals.initialMinX,\n      max: (_b = w2.globals.dataReducerRawMaxX) != null ? _b : w2.globals.initialMaxX\n    };\n  }\n  /**\n   * Apply an x-window immediately (no animation), mirroring panScrolled but\n   * pixel-accurate: clamp to the raw bounds (preserving window width so a pan\n   * stops flush at the edge rather than shrinking), floor for category axes,\n   * then route through the fast _updateOptions path.\n   * @param {number} newMinX @param {number} newMaxX @param {boolean} isZoom\n   * @returns {{minX:number, maxX:number}|false} applied window, or false if rejected\n   */\n  _applyXRange(newMinX, newMaxX, isZoom) {\n    const w2 = this.w;\n    if (!w2.globals.initialConfig) return false;\n    const cur = this._currentXWindow();\n    const zoomingOut = isZoom && newMaxX - newMinX > cur.max - cur.min;\n    const bounds = this._clampBounds();\n    if (bounds) {\n      const range = newMaxX - newMinX;\n      if (newMinX < bounds.min) {\n        newMinX = bounds.min;\n        newMaxX = newMinX + range;\n      }\n      if (newMaxX > bounds.max) {\n        newMaxX = bounds.max;\n        newMinX = newMaxX - range;\n      }\n      if (newMinX < bounds.min) newMinX = bounds.min;\n    }\n    if (w2.config.xaxis.convertedCatToNumeric) {\n      newMinX = Math.floor(newMinX);\n      newMaxX = zoomingOut ? Math.ceil(newMaxX) : Math.floor(newMaxX);\n      if (newMinX < 1) newMinX = 1;\n      if (bounds && newMaxX > bounds.max) newMaxX = Math.floor(bounds.max);\n      if (newMaxX - newMinX < 2) return false;\n    }\n    if (!(newMaxX > newMinX)) return false;\n    const options2 = { xaxis: { min: newMinX, max: newMaxX } };\n    if (!w2.config.chart.group) {\n      options2.yaxis = Utils$1.clone(w2.globals.initialConfig.yaxis);\n    }\n    if (isZoom) w2.interact.zoomed = true;\n    this.ctx.updateHelpers._updateOptions(options2, false, false);\n    return { minX: newMinX, maxX: newMaxX };\n  }\n  _cancelInertia() {\n    const m2 = this._m();\n    if (m2.inertiaRAF != null) {\n      cancelAnimationFrame(m2.inertiaRAF);\n      m2.inertiaRAF = null;\n    }\n  }\n  _fireScrolled() {\n    const w2 = this.w;\n    if (typeof w2.config.chart.events.scrolled !== \"function\") return;\n    const { min, max } = this._currentXWindow();\n    const args = { xaxis: { min, max } };\n    w2.config.chart.events.scrolled(this.ctx, args);\n    this.ctx.events.fireEvent(\"scrolled\", args);\n  }\n  /** @param {number} x @param {number} t */\n  _pushSample(x, t2) {\n    const s2 = this._m().samples;\n    s2.push({ x, t: t2 });\n    while (s2.length > 6) s2.shift();\n  }\n  /**\n   * Single passive:false handler for all touch phases. Two fingers => pinch /\n   * two-finger pan (zoom). One finger, in pan mode => kinetic pan with inertia.\n   * @param {any} e\n   */\n  momentumTouch(e2) {\n    const w2 = this.w;\n    const m2 = this._m();\n    const type = e2.type;\n    if (type === \"touchstart\") {\n      this._cancelInertia();\n      const gridRectDim = this._gridRect();\n      if (!gridRectDim) return;\n      if (e2.touches.length >= 2 && this._pinchEnabled()) {\n        e2.preventDefault();\n        m2.busy = true;\n        m2.panState = null;\n        this._beginPinch(e2, gridRectDim);\n      } else if (e2.touches.length === 1 && this._panInertiaEnabled() && w2.interact.panEnabled) {\n        m2.busy = true;\n        m2.pinch = null;\n        const t2 = e2.touches[0];\n        const win = this._currentXWindow();\n        const gw = w2.layout.gridWidth || 1;\n        m2.panState = {\n          startX: t2.clientX,\n          startY: t2.clientY,\n          axis: null,\n          // decided on first move (rails)\n          minX0: win.min,\n          maxX0: win.max,\n          ratio0: (win.max - win.min) / gw\n        };\n        m2.samples = [{ x: t2.clientX, t: e2.timeStamp }];\n      }\n      return;\n    }\n    if (type === \"touchmove\") {\n      if (m2.pinch && e2.touches.length >= 2) {\n        e2.preventDefault();\n        this._movePinch(e2);\n      } else if (m2.panState && e2.touches.length === 1) {\n        this._movePan(e2);\n      }\n      return;\n    }\n    if (m2.pinch) {\n      if (e2.touches.length < 2) this._endPinch();\n    } else if (m2.panState) {\n      if (e2.touches.length === 0) this._endPan();\n    }\n    if (e2.touches.length === 0) {\n      w2.interact.mousedown = false;\n      this.dragged = false;\n      if (m2.inertiaRAF == null && !m2.pinch && !m2.panState) {\n        m2.busy = false;\n      }\n    }\n  }\n  /** @param {any} e @param {DOMRect} gridRectDim */\n  _beginPinch(e2, gridRectDim) {\n    const w2 = this.w;\n    const t0 = e2.touches[0];\n    const t1 = e2.touches[1];\n    const dist = Math.hypot(t1.clientX - t0.clientX, t1.clientY - t0.clientY) || 1;\n    const cx = (t0.clientX + t1.clientX) / 2 - gridRectDim.left - w2.globals.barPadForNumericAxis;\n    const { min, max } = this._currentXWindow();\n    this._m().pinch = {\n      d0: dist,\n      cx0: cx,\n      minX0: min,\n      maxX0: max,\n      gridWidth: w2.layout.gridWidth || 1\n    };\n  }\n  /** @param {any} e */\n  _movePinch(e2) {\n    const w2 = this.w;\n    const p2 = this._m().pinch;\n    if (!p2) return;\n    const gridRectDim = this._gridRect();\n    if (!gridRectDim) return;\n    const t0 = e2.touches[0];\n    const t1 = e2.touches[1];\n    const dist = Math.hypot(t1.clientX - t0.clientX, t1.clientY - t0.clientY) || 1;\n    const cx = (t0.clientX + t1.clientX) / 2 - gridRectDim.left - w2.globals.barPadForNumericAxis;\n    const range0 = p2.maxX0 - p2.minX0;\n    const newRange = range0 * (p2.d0 / dist);\n    const anchorData = p2.minX0 + p2.cx0 / p2.gridWidth * range0;\n    let newMinX = anchorData - cx / p2.gridWidth * newRange;\n    let newMaxX = newMinX + newRange;\n    const bounds = this._clampBounds();\n    if (bounds) {\n      const minXDiff = w2.globals.minXDiff > 0 && isFinite(w2.globals.minXDiff) ? w2.globals.minXDiff : 0;\n      const minRange = Math.max(minXDiff * 2, (bounds.max - bounds.min) * 1e-6);\n      if (newMaxX - newMinX < minRange) {\n        const mid = (newMinX + newMaxX) / 2;\n        newMinX = mid - minRange / 2;\n        newMaxX = mid + minRange / 2;\n      }\n    }\n    this._applyXRange(newMinX, newMaxX, true);\n  }\n  _endPinch() {\n    const w2 = this.w;\n    const m2 = this._m();\n    m2.pinch = null;\n    const { min, max } = this._currentXWindow();\n    const xaxis = { min, max };\n    const yaxis = w2.globals.initialConfig ? Utils$1.clone(w2.globals.initialConfig.yaxis) : [];\n    const toolbar = this.ctx.toolbar;\n    if (toolbar) toolbar.zoomCallback(xaxis, yaxis);\n  }\n  /** @param {any} e */\n  _movePan(e2) {\n    const m2 = this._m();\n    const s2 = m2.panState;\n    const t2 = e2.touches[0];\n    if (!s2.axis) {\n      const dx = Math.abs(t2.clientX - s2.startX);\n      const dy = Math.abs(t2.clientY - s2.startY);\n      if (dx < 6 && dy < 6) {\n        this._pushSample(t2.clientX, e2.timeStamp);\n        return;\n      }\n      if (dy > dx) {\n        m2.busy = false;\n        m2.panState = null;\n        return;\n      }\n      s2.axis = \"x\";\n    }\n    if (s2.axis !== \"x\") return;\n    e2.preventDefault();\n    const totalDeltaPx = t2.clientX - s2.startX;\n    const deltaData = totalDeltaPx * s2.ratio0;\n    this._pushSample(t2.clientX, e2.timeStamp);\n    this._applyXRange(s2.minX0 - deltaData, s2.maxX0 - deltaData, false);\n  }\n  _endPan() {\n    const m2 = this._m();\n    const s2 = m2.panState;\n    m2.panState = null;\n    let vel = 0;\n    const samples = m2.samples;\n    if (samples.length >= 2) {\n      const a2 = samples[0];\n      const b2 = samples[samples.length - 1];\n      const dt = b2.t - a2.t;\n      if (dt > 0) vel = (b2.x - a2.x) / dt;\n    }\n    m2.samples = [];\n    if (s2 && s2.axis === \"x\" && this._panInertiaEnabled() && Math.abs(vel) > INERTIA_MIN_RELEASE_VELOCITY) {\n      this._startInertia(vel);\n    } else {\n      m2.busy = false;\n      this._fireScrolled();\n    }\n  }\n  /**\n   * Kinetic glide after a one-finger pan release: decay the velocity by\n   * `friction` each frame and shift the window, stopping at the data edge\n   * (clamp, not elastic overshoot). The loop is w-driven, so it keeps running\n   * across the re-renders each frame triggers and stops only on a real destroy.\n   * @param {number} vel0 px/ms, sign is the finger direction\n   */\n  _startInertia(vel0) {\n    const w2 = this.w;\n    const m2 = this._m();\n    const cfgFriction = w2.config.chart.pan && w2.config.chart.pan.friction;\n    const friction = typeof cfgFriction === \"number\" ? Math.min(Math.max(cfgFriction, 0.5), 0.999) : INERTIA_DEFAULT_FRICTION;\n    let vel = vel0;\n    let lastT = null;\n    m2.busy = true;\n    const step = (ts) => {\n      if (w2.globals.isDestroyed) {\n        m2.inertiaRAF = null;\n        m2.busy = false;\n        return;\n      }\n      if (lastT == null) {\n        lastT = ts;\n        m2.inertiaRAF = requestAnimationFrame(step);\n        return;\n      }\n      const dt = ts - lastT;\n      lastT = ts;\n      vel *= Math.pow(friction, dt / FRAME_MS_60FPS);\n      if (Math.abs(vel) < INERTIA_STOP_VELOCITY) {\n        m2.inertiaRAF = null;\n        m2.busy = false;\n        this._fireScrolled();\n        return;\n      }\n      const win = this._currentXWindow();\n      const gw = w2.layout.gridWidth || 1;\n      const ratio = (win.max - win.min) / gw;\n      const deltaData = vel * dt * ratio;\n      const applied = this._applyXRange(\n        win.min - deltaData,\n        win.max - deltaData,\n        false\n      );\n      const bounds = this._clampBounds();\n      const hitEdge = !applied || bounds && (deltaData > 0 && applied.minX <= bounds.min + (bounds.max - bounds.min) * 1e-6 || deltaData < 0 && applied.maxX >= bounds.max - (bounds.max - bounds.min) * 1e-6);\n      if (hitEdge) {\n        m2.inertiaRAF = null;\n        m2.busy = false;\n        this._fireScrolled();\n        return;\n      }\n      m2.inertiaRAF = requestAnimationFrame(step);\n    };\n    m2.inertiaRAF = requestAnimationFrame(step);\n  }\n}\nApexCharts.registerFeatures({\n  toolbar: Toolbar,\n  zoomPanSelection: ZoomPanSelection\n});\nlet Helpers$2 = class Helpers3 {\n  /**\n   * @param {import('./Annotations').default} annoCtx\n   */\n  constructor(annoCtx) {\n    this.w = annoCtx.w;\n    this.annoCtx = annoCtx;\n  }\n  /**\n   * @param {Record<string, any>} anno\n   * @param {number | null} [annoIndex]\n   */\n  setOrientations(anno, annoIndex = null) {\n    var _a, _b;\n    const w2 = this.w;\n    if (anno.label.orientation === \"vertical\") {\n      const i2 = annoIndex !== null ? annoIndex : 0;\n      const xAnno = w2.dom.baseEl.querySelector(\n        `.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${i2}']`\n      );\n      if (xAnno !== null) {\n        const xAnnoCoord = (\n          /** @type {SVGGraphicsElement} */\n          xAnno.getBBox()\n        );\n        xAnno.setAttribute(\n          \"x\",\n          String(\n            parseFloat((_a = xAnno.getAttribute(\"x\")) != null ? _a : \"0\") - xAnnoCoord.height + 4\n          )\n        );\n        const yOffset = anno.label.position === \"top\" ? xAnnoCoord.width : -xAnnoCoord.width;\n        xAnno.setAttribute(\n          \"y\",\n          String(parseFloat((_b = xAnno.getAttribute(\"y\")) != null ? _b : \"0\") + yOffset)\n        );\n        const { x, y } = this.annoCtx.graphics.rotateAroundCenter(xAnno);\n        xAnno.setAttribute(\"transform\", `rotate(-90 ${x} ${y})`);\n      }\n    }\n  }\n  /**\n   * @param {any} annoEl\n   * @param {Record<string, any>} anno\n   */\n  addBackgroundToAnno(annoEl, anno) {\n    const w2 = this.w;\n    if (!annoEl || !anno.label.text || !String(anno.label.text).trim()) {\n      return null;\n    }\n    const gridEl = w2.dom.baseEl.querySelector(\".apexcharts-grid\");\n    if (!gridEl) return null;\n    const elGridRect = gridEl.getBoundingClientRect();\n    const gridBBox = (\n      /** @type {SVGGraphicsElement} */\n      gridEl.getBBox()\n    );\n    const zoom = elGridRect.width / gridBBox.width || 1;\n    const coords = annoEl.getBoundingClientRect();\n    let {\n      left: pleft,\n      right: pright,\n      top: ptop,\n      bottom: pbottom\n    } = anno.label.style.padding;\n    if (anno.label.orientation === \"vertical\") {\n      [ptop, pbottom, pleft, pright] = [pleft, pright, ptop, pbottom];\n    }\n    const gridLeft = elGridRect.left - gridBBox.x * zoom;\n    const gridTop = elGridRect.top - gridBBox.y * zoom;\n    const x1 = (coords.left - gridLeft) / zoom - pleft;\n    const y1 = (coords.top - gridTop) / zoom - ptop;\n    const elRect = this.annoCtx.graphics.drawRect(\n      x1,\n      y1,\n      coords.width / zoom + pleft + pright,\n      coords.height / zoom + ptop + pbottom,\n      anno.label.borderRadius,\n      anno.label.style.background,\n      1,\n      anno.label.borderWidth,\n      anno.label.borderColor,\n      0\n    );\n    if (anno.id) {\n      elRect.node.classList.add(anno.id);\n    }\n    return elRect;\n  }\n  annotationsBackground() {\n    const w2 = this.w;\n    const add = (anno, i2, type) => {\n      const annoLabel = w2.dom.baseEl.querySelector(\n        `.apexcharts-${type}-annotations .apexcharts-${type}-annotation-label[rel='${i2}']`\n      );\n      if (annoLabel) {\n        const parent = annoLabel.parentNode;\n        const elRect = this.addBackgroundToAnno(annoLabel, anno);\n        if (elRect) {\n          parent == null ? void 0 : parent.insertBefore(elRect.node, annoLabel);\n          const labelX = annoLabel.getAttribute(\"x\");\n          if (labelX !== null) {\n            applyProgressiveReveal(elRect, parseFloat(labelX), w2);\n          }\n          if (anno.label.mouseEnter) {\n            elRect.node.addEventListener(\n              \"mouseenter\",\n              anno.label.mouseEnter.bind(this, anno)\n            );\n          }\n          if (anno.label.mouseLeave) {\n            elRect.node.addEventListener(\n              \"mouseleave\",\n              anno.label.mouseLeave.bind(this, anno)\n            );\n          }\n          if (anno.label.click) {\n            elRect.node.addEventListener(\n              \"click\",\n              anno.label.click.bind(this, anno)\n            );\n          }\n        }\n      }\n    };\n    w2.config.annotations.xaxis.forEach(\n      (anno, i2) => add(anno, i2, \"xaxis\")\n    );\n    w2.config.annotations.yaxis.forEach(\n      (anno, i2) => add(anno, i2, \"yaxis\")\n    );\n    w2.config.annotations.points.forEach(\n      (anno, i2) => add(anno, i2, \"point\")\n    );\n  }\n  /**\n   * @param {string} type\n   * @param {Record<string, any>} anno\n   */\n  getY1Y2(type, anno) {\n    var _a, _b;\n    const w2 = this.w;\n    const y = type === \"y1\" ? anno.y : anno.y2;\n    let yP;\n    let clipped = false;\n    if (this.annoCtx.invertAxis) {\n      const labels = w2.config.xaxis.convertedCatToNumeric ? w2.labelData.categoryLabels : w2.labelData.labels;\n      const catIndex = labels.indexOf(y);\n      const xLabel = w2.dom.baseEl.querySelector(\n        `.apexcharts-yaxis-texts-g text:nth-child(${catIndex + 1})`\n      );\n      yP = xLabel ? parseFloat((_a = xLabel.getAttribute(\"y\")) != null ? _a : \"0\") : (w2.layout.gridHeight / labels.length - 1) * (catIndex + 1) - w2.globals.barHeight;\n      if (anno.seriesIndex !== void 0 && w2.globals.barHeight) {\n        yP -= w2.globals.barHeight / 2 * (w2.seriesData.series.length - 1) - w2.globals.barHeight * anno.seriesIndex;\n      }\n    } else {\n      const yAxisMap = w2.globals.seriesYAxisMap[anno.yAxisIndex];\n      if (!yAxisMap || yAxisMap[0] == null || !w2.config.yaxis[anno.yAxisIndex]) {\n        return { yP: 0, clipped: true };\n      }\n      const seriesIndex = yAxisMap[0];\n      const yPos = w2.config.yaxis[anno.yAxisIndex].logarithmic ? new CoreUtils(this.w).getLogVal(\n        w2.config.yaxis[anno.yAxisIndex].logBase,\n        y,\n        seriesIndex\n      ) / /** @type {any} */\n      w2.globals.yLogRatio[seriesIndex] : (y - w2.globals.minYArr[seriesIndex]) / (w2.globals.yRange[seriesIndex] / w2.layout.gridHeight);\n      yP = w2.layout.gridHeight - Math.min(Math.max(yPos, 0), w2.layout.gridHeight);\n      clipped = yPos > w2.layout.gridHeight || yPos < 0;\n      if (anno.marker && (anno.y === void 0 || anno.y === null)) {\n        yP = 0;\n      }\n      if ((_b = w2.config.yaxis[anno.yAxisIndex]) == null ? void 0 : _b.reversed) {\n        yP = yPos;\n      }\n    }\n    if (typeof y === \"string\" && y.includes(\"px\")) {\n      yP = parseFloat(y);\n    }\n    return { yP, clipped };\n  }\n  /**\n   * @param {string} type\n   * @param {Record<string, any>} anno\n   */\n  getX1X2(type, anno) {\n    const w2 = this.w;\n    const x = type === \"x1\" ? anno.x : anno.x2;\n    const min = this.annoCtx.invertAxis ? w2.globals.minY : w2.globals.minX;\n    const max = this.annoCtx.invertAxis ? w2.globals.maxY : w2.globals.maxX;\n    const range = this.annoCtx.invertAxis ? w2.globals.yRange[0] : w2.globals.xRange;\n    let clipped = false;\n    let xP = this.annoCtx.inversedReversedAxis ? (max - x) / (range / w2.layout.gridWidth) : (x - min) / (range / w2.layout.gridWidth);\n    if ((w2.config.xaxis.type === \"category\" || w2.config.xaxis.convertedCatToNumeric) && !this.annoCtx.invertAxis && !w2.axisFlags.dataFormatXNumeric) {\n      if (!w2.config.chart.sparkline.enabled) {\n        xP = this.getStringX(x);\n      }\n    }\n    if (typeof x === \"string\" && x.includes(\"px\")) {\n      xP = parseFloat(x);\n    }\n    if ((x === void 0 || x === null) && anno.marker) {\n      xP = w2.layout.gridWidth;\n    }\n    if (anno.seriesIndex !== void 0 && w2.globals.barWidth && !this.annoCtx.invertAxis) {\n      xP -= w2.globals.barWidth / 2 * (w2.seriesData.series.length - 1) - w2.globals.barWidth * anno.seriesIndex;\n    }\n    if (typeof xP !== \"number\") {\n      xP = 0;\n      clipped = true;\n    }\n    if (parseFloat(xP.toFixed(10)) > parseFloat(w2.layout.gridWidth.toFixed(10))) {\n      xP = w2.layout.gridWidth;\n      clipped = true;\n    } else if (xP < 0) {\n      xP = 0;\n      clipped = true;\n    }\n    return { x: xP, clipped };\n  }\n  /**\n   * @param {number} x\n   */\n  getStringX(x) {\n    var _a;\n    const w2 = this.w;\n    let rX = x;\n    if (w2.config.xaxis.convertedCatToNumeric && w2.labelData.categoryLabels.length) {\n      const strX = String(x);\n      x = w2.labelData.categoryLabels.findIndex(\n        (l2) => String(l2) === strX\n      ) + 1;\n    }\n    const catIndex = w2.labelData.labels.map(\n      (item) => Array.isArray(item) ? item.join(\" \") : item\n    ).indexOf(x);\n    const xLabel = w2.dom.baseEl.querySelector(\n      `.apexcharts-xaxis-texts-g text:nth-child(${catIndex + 1})`\n    );\n    if (xLabel) {\n      rX = parseFloat((_a = xLabel.getAttribute(\"x\")) != null ? _a : \"0\");\n    }\n    return rX;\n  }\n};\nclass XAnnotations {\n  /**\n   * @param {import('./Annotations').default} annoCtx\n   */\n  constructor(annoCtx) {\n    this.w = annoCtx.w;\n    this.annoCtx = annoCtx;\n    this.invertAxis = this.annoCtx.invertAxis;\n    this.helpers = new Helpers$2(this.annoCtx);\n  }\n  /**\n   * @param {XAxisAnnotations} anno\n   * @param {Element} parent\n   * @param {number} index\n   */\n  addXaxisAnnotation(anno, parent, index) {\n    const w2 = this.w;\n    const result = this.helpers.getX1X2(\"x1\", anno);\n    let x1 = result.x;\n    const clipX1 = result.clipped;\n    let clipX2 = true;\n    let x2;\n    const text = anno.label.text;\n    const strokeDashArray = anno.strokeDashArray;\n    if (!Utils$1.isNumber(x1)) return;\n    if (anno.x2 === null || typeof anno.x2 === \"undefined\") {\n      if (!clipX1) {\n        const line = this.annoCtx.graphics.drawLine(\n          x1 + anno.offsetX,\n          // x1\n          0 + anno.offsetY,\n          // y1\n          x1 + anno.offsetX,\n          // x2\n          w2.layout.gridHeight + anno.offsetY,\n          // y2\n          anno.borderColor,\n          // lineColor\n          strokeDashArray,\n          //dashArray\n          anno.borderWidth\n        );\n        parent.appendChild(line.node);\n        if (anno.id) {\n          line.node.classList.add(anno.id);\n        }\n        applyProgressiveReveal(line, x1 + anno.offsetX, w2);\n      }\n    } else {\n      const result2 = this.helpers.getX1X2(\"x2\", anno);\n      x2 = result2.x;\n      clipX2 = result2.clipped;\n      if (x2 < x1) {\n        const temp = x1;\n        x1 = x2;\n        x2 = temp;\n      }\n      const rect = this.annoCtx.graphics.drawRect(\n        x1 + anno.offsetX,\n        // x1\n        0 + anno.offsetY,\n        // y1\n        x2 - x1,\n        // x2\n        w2.layout.gridHeight + anno.offsetY,\n        // y2\n        0,\n        // radius\n        anno.fillColor,\n        // color\n        anno.opacity,\n        // opacity,\n        1,\n        // strokeWidth\n        anno.borderColor,\n        // strokeColor\n        strokeDashArray\n        // stokeDashArray\n      );\n      rect.node.classList.add(\"apexcharts-annotation-rect\");\n      rect.attr(\"clip-path\", `url(#gridRectMask${w2.globals.cuid})`);\n      parent.appendChild(rect.node);\n      if (anno.id) {\n        rect.node.classList.add(anno.id);\n      }\n      applyProgressiveReveal(rect, x1 + anno.offsetX, w2);\n    }\n    if (!(clipX1 && clipX2)) {\n      const textRects = this.annoCtx.graphics.getTextRects(\n        text,\n        anno.label.style.fontSize\n      );\n      const textY = anno.label.position === \"top\" ? 4 : anno.label.position === \"center\" ? w2.layout.gridHeight / 2 + (anno.label.orientation === \"vertical\" ? textRects.width / 2 : 0) : w2.layout.gridHeight;\n      const elText = this.annoCtx.graphics.drawText({\n        x: x1 + anno.label.offsetX,\n        y: textY + anno.label.offsetY - (anno.label.orientation === \"vertical\" ? anno.label.position === \"top\" ? textRects.width / 2 - 12 : -textRects.width / 2 : 0),\n        text,\n        textAnchor: anno.label.textAnchor,\n        fontSize: anno.label.style.fontSize,\n        fontFamily: anno.label.style.fontFamily,\n        fontWeight: anno.label.style.fontWeight,\n        foreColor: anno.label.style.color,\n        cssClass: `apexcharts-xaxis-annotation-label ${anno.label.style.cssClass} ${anno.id ? anno.id : \"\"}`\n      });\n      elText.attr({\n        rel: index\n      });\n      parent.appendChild(elText.node);\n      applyProgressiveReveal(elText, x1 + anno.label.offsetX, w2);\n      this.annoCtx.helpers.setOrientations(anno, index);\n    }\n  }\n  drawXAxisAnnotations() {\n    const w2 = this.w;\n    const elg = this.annoCtx.graphics.group({\n      class: \"apexcharts-xaxis-annotations\"\n    });\n    w2.config.annotations.xaxis.map(\n      (anno, index) => {\n        this.addXaxisAnnotation(anno, elg.node, index);\n      }\n    );\n    return elg;\n  }\n}\nclass YAnnotations {\n  /**\n   * @param {import('./Annotations').default} annoCtx\n   */\n  constructor(annoCtx) {\n    this.w = annoCtx.w;\n    this.annoCtx = annoCtx;\n    this.helpers = new Helpers$2(this.annoCtx);\n    this.axesUtils = new AxesUtils(this.annoCtx.w, {\n      theme: this.annoCtx.theme,\n      timeScale: this.annoCtx.timeScale\n    });\n  }\n  /**\n   * @param {YAxisAnnotations} anno\n   * @param {Element} parent\n   * @param {number} index\n   */\n  addYaxisAnnotation(anno, parent, index) {\n    const w2 = this.w;\n    const strokeDashArray = anno.strokeDashArray;\n    let result = this.helpers.getY1Y2(\"y1\", anno);\n    let y1 = result.yP;\n    const clipY1 = result.clipped;\n    let y2;\n    let clipY2 = true;\n    let drawn = false;\n    const text = anno.label.text;\n    if (anno.y2 === null || typeof anno.y2 === \"undefined\") {\n      if (!clipY1) {\n        drawn = true;\n        const line = this.annoCtx.graphics.drawLine(\n          0 + anno.offsetX,\n          // x1\n          y1 + anno.offsetY,\n          // y1\n          this._getYAxisAnnotationWidth(anno),\n          // x2\n          y1 + anno.offsetY,\n          // y2\n          anno.borderColor,\n          // lineColor\n          strokeDashArray,\n          // dashArray\n          anno.borderWidth\n        );\n        parent.appendChild(line.node);\n        if (anno.id) {\n          line.node.classList.add(anno.id);\n        }\n      }\n    } else {\n      result = this.helpers.getY1Y2(\"y2\", anno);\n      y2 = result.yP;\n      clipY2 = result.clipped;\n      if (y2 > y1) {\n        const temp = y1;\n        y1 = y2;\n        y2 = temp;\n      }\n      if (!(clipY1 && clipY2)) {\n        drawn = true;\n        const rect = this.annoCtx.graphics.drawRect(\n          0 + anno.offsetX,\n          // x1\n          y2 + anno.offsetY,\n          // y1\n          this._getYAxisAnnotationWidth(anno),\n          // x2\n          y1 - y2,\n          // y2\n          0,\n          // radius\n          anno.fillColor,\n          // color\n          anno.opacity,\n          // opacity,\n          1,\n          // strokeWidth\n          anno.borderColor,\n          // strokeColor\n          strokeDashArray\n          // stokeDashArray\n        );\n        rect.node.classList.add(\"apexcharts-annotation-rect\");\n        rect.attr(\"clip-path\", `url(#gridRectMask${w2.globals.cuid})`);\n        parent.appendChild(rect.node);\n        if (anno.id) {\n          rect.node.classList.add(anno.id);\n        }\n      }\n    }\n    if (drawn) {\n      const textX = anno.label.position === \"right\" ? w2.layout.gridWidth : anno.label.position === \"center\" ? w2.layout.gridWidth / 2 : 0;\n      const elText = this.annoCtx.graphics.drawText({\n        x: textX + anno.label.offsetX,\n        y: (y2 != null ? y2 : y1) + anno.label.offsetY - 3,\n        text,\n        textAnchor: anno.label.textAnchor,\n        fontSize: anno.label.style.fontSize,\n        fontFamily: anno.label.style.fontFamily,\n        fontWeight: anno.label.style.fontWeight,\n        foreColor: anno.label.style.color,\n        cssClass: `apexcharts-yaxis-annotation-label ${anno.label.style.cssClass} ${anno.id ? anno.id : \"\"}`\n      });\n      elText.attr({\n        rel: index\n      });\n      parent.appendChild(elText.node);\n    }\n  }\n  /**\n   * @param {YAxisAnnotations} anno\n   */\n  _getYAxisAnnotationWidth(anno) {\n    const w2 = this.w;\n    let width = w2.layout.gridWidth;\n    if (anno.width.indexOf(\"%\") > -1) {\n      width = w2.layout.gridWidth * parseInt(anno.width, 10) / 100;\n    } else {\n      width = parseInt(anno.width, 10);\n    }\n    return width + anno.offsetX;\n  }\n  drawYAxisAnnotations() {\n    const w2 = this.w;\n    const elg = this.annoCtx.graphics.group({\n      class: \"apexcharts-yaxis-annotations\"\n    });\n    w2.config.annotations.yaxis.forEach(\n      (anno, index) => {\n        anno.yAxisIndex = this.axesUtils.translateYAxisIndex(anno.yAxisIndex);\n        if (!(this.axesUtils.isYAxisHidden(anno.yAxisIndex) && this.axesUtils.yAxisAllSeriesCollapsed(anno.yAxisIndex))) {\n          this.addYaxisAnnotation(anno, elg.node, index);\n        }\n      }\n    );\n    return elg;\n  }\n}\nclass PointAnnotations {\n  /**\n   * @param {import('./Annotations').default} annoCtx\n   */\n  constructor(annoCtx) {\n    this.w = annoCtx.w;\n    this.annoCtx = annoCtx;\n    this.helpers = new Helpers$2(this.annoCtx);\n  }\n  /**\n   * @param {Record<string, any>} anno\n   * @param {Element} parent\n   * @param {number} index\n   */\n  addPointAnnotation(anno, parent, index) {\n    const w2 = this.w;\n    if (w2.globals.collapsedSeriesIndices.indexOf(anno.seriesIndex) > -1) {\n      return;\n    }\n    const resultX = this.helpers.getX1X2(\"x1\", anno);\n    const x = resultX.x;\n    const clipX = resultX.clipped;\n    const resultY = this.helpers.getY1Y2(\"y1\", anno);\n    const y = resultY.yP;\n    const clipY = resultY.clipped;\n    if (!Utils$1.isNumber(x)) return;\n    if (!(clipY || clipX)) {\n      const optsPoints = {\n        pSize: anno.marker.size,\n        pointStrokeWidth: anno.marker.strokeWidth,\n        pointFillColor: anno.marker.fillColor,\n        pointStrokeColor: anno.marker.strokeColor,\n        shape: anno.marker.shape,\n        pRadius: anno.marker.radius,\n        class: `apexcharts-point-annotation-marker ${anno.marker.cssClass} ${anno.id ? anno.id : \"\"}`\n      };\n      let point = this.annoCtx.graphics.drawMarker(\n        x + anno.marker.offsetX,\n        y + anno.marker.offsetY,\n        optsPoints\n      );\n      parent.appendChild(point.node);\n      const tooltipTargets = [point.node];\n      applyProgressiveReveal(point, x, w2);\n      const text = anno.label.text ? anno.label.text : \"\";\n      const elText = this.annoCtx.graphics.drawText({\n        x: x + anno.label.offsetX,\n        y: y + anno.label.offsetY - anno.marker.size - parseFloat(anno.label.style.fontSize) / 1.6,\n        text,\n        textAnchor: anno.label.textAnchor,\n        fontSize: anno.label.style.fontSize,\n        fontFamily: anno.label.style.fontFamily,\n        fontWeight: anno.label.style.fontWeight,\n        foreColor: anno.label.style.color,\n        cssClass: `apexcharts-point-annotation-label ${anno.label.style.cssClass} ${anno.id ? anno.id : \"\"}`\n      });\n      elText.attr({\n        rel: index\n      });\n      parent.appendChild(elText.node);\n      applyProgressiveReveal(elText, x, w2);\n      if (anno.customSVG.SVG) {\n        const g2 = this.annoCtx.graphics.group({\n          class: \"apexcharts-point-annotations-custom-svg \" + anno.customSVG.cssClass\n        });\n        g2.attr({\n          transform: `translate(${x + anno.customSVG.offsetX}, ${y + anno.customSVG.offsetY})`\n        });\n        g2.node.innerHTML = anno.customSVG.SVG;\n        parent.appendChild(g2.node);\n        tooltipTargets.push(g2.node);\n      }\n      if (anno.image.path) {\n        const imgWidth = anno.image.width ? anno.image.width : 20;\n        const imgHeight = anno.image.height ? anno.image.height : 20;\n        point = this.annoCtx.addImage({\n          x: x + anno.image.offsetX - imgWidth / 2,\n          y: y + anno.image.offsetY - imgHeight / 2,\n          width: imgWidth,\n          height: imgHeight,\n          path: anno.image.path,\n          appendTo: \".apexcharts-point-annotations\"\n        });\n        tooltipTargets.push(point.node);\n      }\n      if (anno.tooltip && anno.tooltip.enabled) {\n        tooltipTargets.forEach((node) => {\n          node.addEventListener(\"mouseenter\", () => {\n            this.showPointTooltip(anno, node);\n          });\n          node.addEventListener(\"mouseleave\", () => {\n            this.hidePointTooltip();\n          });\n        });\n      }\n      if (anno.mouseEnter) {\n        point.node.addEventListener(\n          \"mouseenter\",\n          anno.mouseEnter.bind(this, anno)\n        );\n      }\n      if (anno.mouseLeave) {\n        point.node.addEventListener(\n          \"mouseleave\",\n          anno.mouseLeave.bind(this, anno)\n        );\n      }\n      if (anno.click) {\n        point.node.addEventListener(\"click\", anno.click.bind(this, anno));\n      }\n    }\n  }\n  /**\n   * Lazily create (once per chart) and return the shared HTML element used to\n   * render point-annotation tooltips. Reuses the `.apexcharts-tooltip` glass\n   * styling; the `.apexcharts-annotation-tooltip` modifier adds padding and\n   * text wrapping for free-form content.\n   * @returns {HTMLElement}\n   */\n  getPointTooltipEl() {\n    const w2 = this.w;\n    let el = (\n      /** @type {HTMLElement | null} */\n      w2.dom.elWrap.querySelector(\".apexcharts-annotation-tooltip\")\n    );\n    if (!el) {\n      el = /** @type {HTMLElement} */\n      BrowserAPIs.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\");\n      el.classList.add(\"apexcharts-tooltip\", \"apexcharts-annotation-tooltip\");\n      w2.dom.elWrap.appendChild(el);\n    }\n    return el;\n  }\n  /**\n   * Resolve the tooltip markup for a point annotation. Precedence:\n   * `tooltip.formatter` (fn) -> `tooltip.text` -> `label.text`. Arrays are\n   * joined with line breaks.\n   * @param {Record<string, any>} anno\n   * @returns {string}\n   */\n  getPointTooltipContent(anno) {\n    const w2 = this.w;\n    const tt = anno.tooltip || {};\n    if (typeof tt.formatter === \"function\") {\n      return tt.formatter({\n        annotation: anno,\n        seriesIndex: anno.seriesIndex,\n        id: anno.id,\n        w: w2\n      });\n    }\n    let content = tt.text != null ? tt.text : anno.label && anno.label.text;\n    if (Array.isArray(content)) {\n      content = content.join(\"<br/>\");\n    }\n    return content == null ? \"\" : String(content);\n  }\n  /**\n   * @param {Record<string, any>} anno\n   * @param {Element} targetNode the hovered marker / image / custom-SVG node\n   */\n  showPointTooltip(anno, targetNode) {\n    const w2 = this.w;\n    const content = this.getPointTooltipContent(anno);\n    if (!content) return;\n    const el = this.getPointTooltipEl();\n    el.innerHTML = content;\n    const theme = anno.tooltip.theme || w2.config.tooltip.theme || \"light\";\n    el.classList.remove(\"apexcharts-theme-light\", \"apexcharts-theme-dark\");\n    el.classList.add(`apexcharts-theme-${theme}`);\n    el.classList.add(\"apexcharts-active\");\n    const wrapRect = w2.dom.elWrap.getBoundingClientRect();\n    const markRect = targetNode.getBoundingClientRect();\n    const ttRect = el.getBoundingClientRect();\n    const offsetX = anno.tooltip.offsetX || 0;\n    const offsetY = anno.tooltip.offsetY || 0;\n    let left = markRect.left - wrapRect.left + markRect.width / 2 - ttRect.width / 2;\n    let top = markRect.top - wrapRect.top - ttRect.height - 10;\n    left = Math.max(0, Math.min(left, wrapRect.width - ttRect.width));\n    if (top < 0) {\n      top = markRect.top - wrapRect.top + markRect.height + 10;\n    }\n    el.style.left = left + offsetX + \"px\";\n    el.style.top = top + offsetY + \"px\";\n  }\n  hidePointTooltip() {\n    const el = (\n      /** @type {HTMLElement | null} */\n      this.w.dom.elWrap.querySelector(\".apexcharts-annotation-tooltip\")\n    );\n    if (el) {\n      el.classList.remove(\"apexcharts-active\");\n    }\n  }\n  drawPointAnnotations() {\n    const w2 = this.w;\n    const elg = this.annoCtx.graphics.group({\n      class: \"apexcharts-point-annotations\"\n    });\n    w2.config.annotations.points.map(\n      (anno, index) => {\n        this.addPointAnnotation(anno, elg.node, index);\n      }\n    );\n    return elg;\n  }\n}\nclass Annotations {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   */\n  constructor(w2, { theme = null, timeScale = null } = {}) {\n    this.w = w2;\n    this.theme = theme;\n    this.timeScale = timeScale;\n    this.invertAxis = void 0;\n    this.inversedReversedAxis = void 0;\n    this.graphics = new Graphics(this.w);\n    if (this.w.globals.isBarHorizontal) {\n      this.invertAxis = true;\n    }\n    this.helpers = new Helpers$2(this);\n    this.xAxisAnnotations = new XAnnotations(this);\n    this.yAxisAnnotations = new YAnnotations(this);\n    this.pointsAnnotations = new PointAnnotations(this);\n    if (this.w.globals.isBarHorizontal && this.w.config.yaxis[0].reversed) {\n      this.inversedReversedAxis = true;\n    }\n    this.xDivision = this.w.layout.gridWidth / this.w.globals.dataPoints;\n  }\n  drawAxesAnnotations() {\n    const w2 = this.w;\n    if (w2.globals.axisCharts && w2.globals.dataPoints) {\n      const yAnnotations = this.yAxisAnnotations.drawYAxisAnnotations();\n      const xAnnotations = this.xAxisAnnotations.drawXAxisAnnotations();\n      const pointAnnotations = this.pointsAnnotations.drawPointAnnotations();\n      const initialAnim = w2.config.chart.animations.enabled;\n      const annoArray = [yAnnotations, xAnnotations, pointAnnotations];\n      const annoElArray = [\n        xAnnotations.node,\n        yAnnotations.node,\n        pointAnnotations.node\n      ];\n      const progressiveAnnos = w2.config.chart.type === \"line\" || w2.config.chart.type === \"area\" || w2.config.chart.type === \"rangeArea\";\n      const skipGroupHide = [progressiveAnnos, false, progressiveAnnos];\n      for (let i2 = 0; i2 < 3; i2++) {\n        w2.dom.elGraphical.add(annoArray[i2]);\n        if (initialAnim && !w2.globals.resized && !w2.globals.dataChanged) {\n          if (w2.config.chart.type !== \"scatter\" && w2.config.chart.type !== \"bubble\" && w2.globals.dataPoints > 1 && !skipGroupHide[i2]) {\n            annoElArray[i2].classList.add(\"apexcharts-element-hidden\");\n          }\n        }\n        w2.globals.delayedElements.push({ el: annoElArray[i2], index: 0 });\n      }\n      this.helpers.annotationsBackground();\n    }\n  }\n  drawImageAnnos() {\n    const w2 = this.w;\n    w2.config.annotations.images.map((s2) => {\n      this.addImage(s2);\n    });\n  }\n  drawTextAnnos() {\n    const w2 = this.w;\n    w2.config.annotations.texts.map((t2) => {\n      this.addText(t2);\n    });\n  }\n  /**\n   * @param {Record<string, any>} anno\n   * @param {Element} parent\n   * @param {number} index\n   */\n  addXaxisAnnotation(anno, parent, index) {\n    this.xAxisAnnotations.addXaxisAnnotation(anno, parent, index);\n  }\n  /**\n   * @param {Record<string, any>} anno\n   * @param {Element} parent\n   * @param {number} index\n   */\n  addYaxisAnnotation(anno, parent, index) {\n    this.yAxisAnnotations.addYaxisAnnotation(anno, parent, index);\n  }\n  /**\n   * @param {Record<string, any>} anno\n   * @param {Element} parent\n   * @param {number} index\n   */\n  addPointAnnotation(anno, parent, index) {\n    this.pointsAnnotations.addPointAnnotation(anno, parent, index);\n  }\n  /**\n   * @param {Record<string, any>} params\n   */\n  addText(params) {\n    const {\n      x,\n      y,\n      text,\n      textAnchor,\n      foreColor,\n      fontSize,\n      fontFamily,\n      fontWeight,\n      cssClass,\n      backgroundColor,\n      borderWidth,\n      strokeDashArray,\n      borderRadius,\n      borderColor,\n      appendTo = \".apexcharts-svg\",\n      paddingLeft = 4,\n      paddingRight = 4,\n      paddingBottom = 2,\n      paddingTop = 2\n    } = params;\n    const w2 = this.w;\n    const elText = this.graphics.drawText({\n      x,\n      y,\n      text,\n      textAnchor: textAnchor || \"start\",\n      fontSize: fontSize || \"12px\",\n      fontWeight: fontWeight || \"regular\",\n      fontFamily: fontFamily || w2.config.chart.fontFamily,\n      foreColor: foreColor || w2.config.chart.foreColor,\n      cssClass: \"apexcharts-text \" + cssClass ? cssClass : \"\"\n    });\n    const parent = w2.dom.baseEl.querySelector(appendTo);\n    if (parent) {\n      parent.appendChild(elText.node);\n    }\n    const textRect = elText.bbox();\n    if (text) {\n      const elRect = this.graphics.drawRect(\n        textRect.x - paddingLeft,\n        textRect.y - paddingTop,\n        textRect.width + paddingLeft + paddingRight,\n        textRect.height + paddingBottom + paddingTop,\n        borderRadius,\n        backgroundColor ? backgroundColor : \"transparent\",\n        1,\n        borderWidth,\n        borderColor,\n        strokeDashArray\n      );\n      parent.insertBefore(elRect.node, elText.node);\n    }\n  }\n  /**\n   * @param {Record<string, any>} params\n   */\n  addImage(params) {\n    const w2 = this.w;\n    const {\n      path,\n      x = 0,\n      y = 0,\n      width = 20,\n      height = 20,\n      appendTo = \".apexcharts-svg\"\n    } = params;\n    const img = w2.dom.Paper.image(path);\n    img.size(width, height).move(x, y);\n    const parent = w2.dom.baseEl.querySelector(appendTo);\n    if (parent) {\n      parent.appendChild(img.node);\n    }\n    return img;\n  }\n  // The addXaxisAnnotation method requires a parent class, and user calling this method externally on the chart instance may not specify parent, hence a different method\n  /**\n   * @param {Record<string, any>} params\n   * @param {boolean} pushToMemory\n   * @param {any} context\n   */\n  addXaxisAnnotationExternal(params, pushToMemory, context) {\n    this.addAnnotationExternal({\n      params,\n      pushToMemory,\n      context,\n      type: \"xaxis\",\n      contextMethod: context.addXaxisAnnotation\n    });\n    return context;\n  }\n  /**\n   * @param {Record<string, any>} params\n   * @param {boolean} pushToMemory\n   * @param {any} context\n   */\n  addYaxisAnnotationExternal(params, pushToMemory, context) {\n    this.addAnnotationExternal({\n      params,\n      pushToMemory,\n      context,\n      type: \"yaxis\",\n      contextMethod: context.addYaxisAnnotation\n    });\n    return context;\n  }\n  /**\n   * @param {Record<string, any>} params\n   * @param {boolean} pushToMemory\n   * @param {any} context\n   */\n  addPointAnnotationExternal(params, pushToMemory, context) {\n    if (typeof this.invertAxis === \"undefined\") {\n      this.invertAxis = context.w.globals.isBarHorizontal;\n    }\n    this.addAnnotationExternal({\n      params,\n      pushToMemory,\n      context,\n      type: \"point\",\n      contextMethod: context.addPointAnnotation\n    });\n    return context;\n  }\n  /** @param {{params: any, pushToMemory: any, context: any, type: any, contextMethod: any}} opts */\n  addAnnotationExternal({\n    params,\n    pushToMemory,\n    context,\n    type,\n    contextMethod\n  }) {\n    const me = context;\n    const w2 = me.w;\n    const parent = w2.dom.baseEl.querySelector(`.apexcharts-${type}-annotations`);\n    const index = parent.childNodes.length + 1;\n    const options2 = new Options();\n    const axesAnno = Object.assign(\n      {},\n      type === \"xaxis\" ? options2.xAxisAnnotation : type === \"yaxis\" ? options2.yAxisAnnotation : options2.pointAnnotation\n    );\n    const anno = Utils$1.extend(axesAnno, params);\n    switch (type) {\n      case \"xaxis\":\n        this.addXaxisAnnotation(anno, parent, index);\n        break;\n      case \"yaxis\":\n        this.addYaxisAnnotation(anno, parent, index);\n        break;\n      case \"point\":\n        this.addPointAnnotation(anno, parent, index);\n        break;\n    }\n    const axesAnnoLabel = w2.dom.baseEl.querySelector(\n      `.apexcharts-${type}-annotations .apexcharts-${type}-annotation-label[rel='${index}']`\n    );\n    const elRect = this.helpers.addBackgroundToAnno(axesAnnoLabel, anno);\n    if (elRect) {\n      parent.insertBefore(elRect.node, axesAnnoLabel);\n    }\n    if (pushToMemory) {\n      w2.globals.memory.methodsToExec.push({\n        context: me,\n        id: anno.id ? anno.id : Utils$1.randomId(),\n        method: contextMethod,\n        label: \"addAnnotation\",\n        params\n      });\n    }\n    return context;\n  }\n  /**\n   * Remove the shared point-annotation hover tooltip node.\n   *\n   * `hidePointTooltip` is wired only to the marker's `mouseleave`; if the marker\n   * is torn down while hovered (clearAnnotations / removeAnnotation / a redraw),\n   * that never fires and the tooltip is left `.apexcharts-active`. A stale active\n   * annotation tooltip then permanently suppresses the series tooltip (see the\n   * guard in Tooltip.drawTooltip added by b1369f5ab). Removing the node clears\n   * both the ghost box and the stale state; it is recreated on the next hover.\n   * @param {any} w\n   */\n  _removeAnnotationTooltip(w2) {\n    const el = w2.dom.elWrap && w2.dom.elWrap.querySelector(\".apexcharts-annotation-tooltip\");\n    if (el && el.parentNode) {\n      el.parentNode.removeChild(el);\n    }\n  }\n  /**\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  clearAnnotations(ctx) {\n    const w2 = ctx.w;\n    this._removeAnnotationTooltip(w2);\n    const annos = w2.dom.baseEl.querySelectorAll(\n      \".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations\"\n    );\n    for (let i2 = w2.globals.memory.methodsToExec.length - 1; i2 >= 0; i2--) {\n      if (w2.globals.memory.methodsToExec[i2].label === \"addText\" || w2.globals.memory.methodsToExec[i2].label === \"addAnnotation\") {\n        w2.globals.memory.methodsToExec.splice(i2, 1);\n      }\n    }\n    Array.prototype.forEach.call(annos, (a2) => {\n      while (a2.firstChild) {\n        a2.removeChild(a2.firstChild);\n      }\n    });\n  }\n  /**\n   * @param {import('../../types/internal').ChartContext} ctx\n   * @param {string} id\n   */\n  removeAnnotation(ctx, id) {\n    const w2 = ctx.w;\n    this._removeAnnotationTooltip(w2);\n    const annos = w2.dom.baseEl.querySelectorAll(`.${id}`);\n    if (annos) {\n      w2.globals.memory.methodsToExec.map((m2, i2) => {\n        if (m2.id === id) {\n          w2.globals.memory.methodsToExec.splice(i2, 1);\n        }\n      });\n      Object.keys(w2.config.annotations).forEach((key) => {\n        const annotationArray = w2.config.annotations[key];\n        if (Array.isArray(annotationArray)) {\n          w2.config.annotations[key] = annotationArray.filter((m2) => m2.id !== id);\n        }\n      });\n      Array.prototype.forEach.call(annos, (a2) => {\n        a2.parentElement.removeChild(a2);\n      });\n    }\n  }\n}\nApexCharts.registerFeatures({ annotations: Annotations });\nclass KeyboardNavigation {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.seriesIndex = 0;\n    this.dataPointIndex = 0;\n    this.active = false;\n    this._tooltipDismissed = false;\n    this._focusedEl = null;\n    this._hoveredBarEl = null;\n    this._enlargedScatterMarker = null;\n    this._onKeyDown = this._onKeyDown.bind(this);\n    this._onFocus = this._onFocus.bind(this);\n    this._onBlur = this._onBlur.bind(this);\n    this._onLegendClick = this._onLegendClick.bind(this);\n    this._onPointerDown = this._onPointerDown.bind(this);\n    this._lastPointerDownAt = 0;\n  }\n  // ─── Public API ───────────────────────────────────────────────────────────\n  /**\n   * Called after the chart and tooltip have been fully rendered.\n   * Attaches event listeners and makes the SVG keyboard-focusable.\n   */\n  init() {\n    const w2 = this.w;\n    const svgEl = w2.dom.Paper.node;\n    if (!svgEl) return;\n    svgEl.setAttribute(\"tabindex\", \"0\");\n    svgEl.addEventListener(\"focus\", this._onFocus);\n    svgEl.addEventListener(\"blur\", this._onBlur);\n    svgEl.addEventListener(\"mousedown\", this._onPointerDown, { capture: true });\n    svgEl.addEventListener(\"pointerdown\", this._onPointerDown, {\n      capture: true\n    });\n    svgEl.addEventListener(\"touchstart\", this._onPointerDown, {\n      capture: true,\n      passive: true\n    });\n    svgEl.addEventListener(\"keydown\", this._onKeyDown, { passive: false });\n    this.ctx.events.addEventListener(\"legendClick\", this._onLegendClick);\n  }\n  /**\n   * Removes all event listeners. Called from chart.destroy().\n   */\n  destroy() {\n    const w2 = this.w;\n    const svgEl = w2.dom.Paper && w2.dom.Paper.node;\n    this.ctx.events.removeEventListener(\"legendClick\", this._onLegendClick);\n    if (!svgEl) return;\n    svgEl.removeEventListener(\"focus\", this._onFocus);\n    svgEl.removeEventListener(\"blur\", this._onBlur);\n    svgEl.removeEventListener(\"keydown\", this._onKeyDown);\n    svgEl.removeEventListener(\n      \"mousedown\",\n      this._onPointerDown,\n      /** @type {any} */\n      { capture: true }\n    );\n    svgEl.removeEventListener(\n      \"pointerdown\",\n      this._onPointerDown,\n      /** @type {any} */\n      { capture: true }\n    );\n    svgEl.removeEventListener(\n      \"touchstart\",\n      this._onPointerDown,\n      /** @type {any} */\n      { capture: true }\n    );\n  }\n  // Records the timestamp of the most recent pointer-down inside the SVG.\n  // `_onFocus` reads this to distinguish keyboard-driven focus (no recent\n  // pointer activity) from mouse-driven focus (pointer event within the\n  // last 100 ms). Stays a no-op for keyboard users.\n  _onPointerDown() {\n    this._lastPointerDownAt = Date.now();\n  }\n  /**\n   * Called from Events.js keydown handler. Navigation keys are already handled\n   * by the direct SVG listener (which can call preventDefault). This entry\n   * point is intentionally a no-op — Events.js still fires the public keyDown\n   * callback and fireEvent('keydown') independently.\n   * @param {Event} _e\n   */\n  handleKey(_e) {\n  }\n  // ─── Focus / blur ─────────────────────────────────────────────────────────\n  _onFocus() {\n    if (!this._isNavEnabled()) return;\n    if (Date.now() - this._lastPointerDownAt < 100) {\n      return;\n    }\n    this.active = true;\n    this._clampCursor();\n    this._snapToVisibleRange();\n    this._showCurrentPoint();\n  }\n  _onBlur() {\n    this.active = false;\n    this._tooltipDismissed = false;\n    this._hideFocus();\n  }\n  // Called when the user clicks a legend item (collapse/expand a series).\n  // Hide the keyboard-nav tooltip — the chart is about to re-render and the\n  // current position may no longer be valid.\n  _onLegendClick() {\n    if (!this.active) return;\n    this.active = false;\n    this._hideFocus();\n  }\n  // ─── Key handler ──────────────────────────────────────────────────────────\n  /**\n   * @param {KeyboardEvent} e\n   */\n  _onKeyDown(e2) {\n    var _a, _b, _c;\n    if (!this._isNavEnabled() || !this.active) return;\n    if (e2.shiftKey && (e2.key === \"ArrowRight\" || e2.key === \"ArrowLeft\") && this._canPan()) {\n      e2.preventDefault();\n      this._panBy(e2.key === \"ArrowRight\" ? 1 : -1);\n      return;\n    }\n    switch (e2.key) {\n      case \"ArrowRight\":\n        e2.preventDefault();\n        this._move(0, 1);\n        break;\n      case \"ArrowLeft\":\n        e2.preventDefault();\n        this._move(0, -1);\n        break;\n      case \"ArrowUp\":\n        e2.preventDefault();\n        this._move(-1, 0);\n        break;\n      case \"ArrowDown\":\n        e2.preventDefault();\n        this._move(1, 0);\n        break;\n      case \"Home\":\n        e2.preventDefault();\n        this.dataPointIndex = 0;\n        this._skipNullForward();\n        this._showCurrentPoint();\n        break;\n      case \"End\":\n        e2.preventDefault();\n        this.dataPointIndex = this._getDataPointCount(this.seriesIndex) - 1;\n        this._skipNullBackward();\n        this._showCurrentPoint();\n        break;\n      case \"Enter\":\n      case \" \":\n        e2.preventDefault();\n        this._fireClick();\n        break;\n      case \"+\":\n      case \"=\":\n        if (this._canZoom()) {\n          e2.preventDefault();\n          (_a = this.ctx.toolbar) == null ? void 0 : _a.handleZoomIn();\n          this._announce(\"Zoomed in\");\n        }\n        break;\n      case \"-\":\n      case \"_\":\n        if (this._canZoom()) {\n          e2.preventDefault();\n          (_b = this.ctx.toolbar) == null ? void 0 : _b.handleZoomOut();\n          this._announce(\"Zoomed out\");\n        }\n        break;\n      case \"0\":\n        if (this._canZoom() && this.w.interact.zoomed) {\n          e2.preventDefault();\n          (_c = this.ctx.toolbar) == null ? void 0 : _c.handleZoomReset();\n          this._announce(\"Zoom reset\");\n        }\n        break;\n      case \"Escape\":\n        e2.preventDefault();\n        if (!this._tooltipDismissed) {\n          this._tooltipDismissed = true;\n          this._hideFocus();\n        } else {\n          this.active = false;\n          this._tooltipDismissed = false;\n          this._hideFocus();\n        }\n        break;\n    }\n  }\n  // ─── Zoom / pan (keyboard alternatives for drag gestures) ─────────────────\n  _canZoom() {\n    const w2 = this.w;\n    return Boolean(\n      w2.globals.axisCharts && w2.config.chart.zoom && w2.config.chart.zoom.enabled\n    );\n  }\n  _canPan() {\n    return this._canZoom();\n  }\n  /**\n   * Shift the visible x-range by ~10% in the given direction.\n   * @param {number} direction +1 = right, -1 = left\n   */\n  _panBy(direction) {\n    const w2 = this.w;\n    const toolbar = this.ctx.toolbar;\n    if (!toolbar) return;\n    const minX = Number(w2.globals.minX);\n    const maxX = Number(w2.globals.maxX);\n    if (!isFinite(minX) || !isFinite(maxX) || minX === maxX) return;\n    const span = maxX - minX;\n    const step = span * 0.1 * direction;\n    toolbar.zoomUpdateOptions(minX + step, maxX + step);\n    this._announce(direction > 0 ? \"Panned right\" : \"Panned left\");\n  }\n  // ─── Navigation ───────────────────────────────────────────────────────────\n  /**\n   * @param {number} dSeries\n   * @param {number} dPoint\n   */\n  _move(dSeries, dPoint) {\n    const w2 = this.w;\n    const wrapAround = w2.config.chart.accessibility.keyboard.navigation.wrapAround;\n    if (dSeries !== 0) {\n      const ttCtx = this.w.globals.tooltip;\n      if (ttCtx && ttCtx.tConfig && ttCtx.tConfig.shared) {\n        const j = this.dataPointIndex;\n        const isActuallyShared = ttCtx.tooltipUtil && ttCtx.tooltipUtil.isXoverlap(j) && ttCtx.tooltipUtil.isInitialSeriesSameLen();\n        if (isActuallyShared) return;\n      }\n      const total = this._getSeriesCount();\n      let si = this.seriesIndex + dSeries;\n      let attempts = 0;\n      while (attempts < total) {\n        if (si < 0) si = wrapAround ? total - 1 : 0;\n        if (si >= total) si = wrapAround ? 0 : total - 1;\n        if (!w2.globals.collapsedSeriesIndices.includes(si)) break;\n        si += dSeries;\n        attempts++;\n      }\n      this.seriesIndex = si;\n      const dpCount = this._getDataPointCount(si);\n      if (this.dataPointIndex >= dpCount) {\n        this.dataPointIndex = dpCount - 1;\n      }\n    }\n    if (dPoint !== 0) {\n      const dpCount = this._getDataPointCount(this.seriesIndex);\n      let di = this.dataPointIndex + dPoint;\n      if (di < 0) di = wrapAround ? dpCount - 1 : 0;\n      if (di >= dpCount) di = wrapAround ? 0 : dpCount - 1;\n      this.dataPointIndex = di;\n      if (dPoint > 0) {\n        this._skipNullForward();\n      } else {\n        this._skipNullBackward();\n      }\n      if (!this._isDataPointVisible(this.seriesIndex, this.dataPointIndex)) {\n        this._snapToVisibleRangeInDirection(dPoint);\n      }\n    }\n    this._showCurrentPoint();\n  }\n  /** Advance dataPointIndex forward past any nulls */\n  _skipNullForward() {\n    const w2 = this.w;\n    const si = this.seriesIndex;\n    const dpCount = this._getDataPointCount(si);\n    let di = this.dataPointIndex;\n    let attempts = 0;\n    if (!Array.isArray(w2.seriesData.series[si])) return;\n    while (attempts < dpCount && w2.seriesData.series[si][di] === null) {\n      di = (di + 1) % dpCount;\n      attempts++;\n    }\n    this.dataPointIndex = di;\n  }\n  /** Retreat dataPointIndex backward past any nulls */\n  _skipNullBackward() {\n    const w2 = this.w;\n    const si = this.seriesIndex;\n    const dpCount = this._getDataPointCount(si);\n    let di = this.dataPointIndex;\n    let attempts = 0;\n    if (!Array.isArray(w2.seriesData.series[si])) return;\n    while (attempts < dpCount && w2.seriesData.series[si][di] === null) {\n      di = (di - 1 + dpCount) % dpCount;\n      attempts++;\n    }\n    this.dataPointIndex = di;\n  }\n  // ─── Display ──────────────────────────────────────────────────────────────\n  _showCurrentPoint() {\n    const { seriesIndex: i2, dataPointIndex: j } = this;\n    const w2 = this.w;\n    const ttCtx = w2.globals.tooltip;\n    if (!ttCtx || !ttCtx.ttItems) return;\n    w2.interact.capturedSeriesIndex = i2;\n    w2.interact.capturedDataPointIndex = j;\n    this._applyFocusClass(i2, j);\n    this._showTooltip(\n      i2,\n      j,\n      /** @type {any} */\n      ttCtx\n    );\n  }\n  _hideFocus() {\n    const w2 = this.w;\n    const ttCtx = (\n      /** @type {any} */\n      w2.globals.tooltip\n    );\n    this._removeFocusClass();\n    this._leaveHoveredBar();\n    if (!ttCtx) return;\n    if (ttCtx.marker) {\n      ttCtx.marker.resetPointsSize();\n    }\n    this._enlargedScatterMarker = null;\n    const tooltipEl = ttCtx.getElTooltip();\n    if (tooltipEl) {\n      tooltipEl.classList.remove(\"apexcharts-active\");\n      if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) {\n        tooltipEl.setAttribute(\"aria-hidden\", \"true\");\n      }\n    }\n    w2.dom.baseEl.classList.remove(\"apexcharts-tooltip-active\");\n    const xcrosshairs = ttCtx.getElXCrosshairs();\n    if (xcrosshairs) xcrosshairs.classList.remove(\"apexcharts-active\");\n  }\n  // ─── Tooltip display per chart type ───────────────────────────────────────\n  /**\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   */\n  _showTooltip(i2, j, ttCtx) {\n    const w2 = this.w;\n    const type = w2.config.chart.type;\n    const tooltipEl = ttCtx.getElTooltip();\n    if (!tooltipEl) return;\n    const cachedDims = ttCtx.getCachedDimensions();\n    ttCtx.tooltipRect = {\n      x: 0,\n      y: 0,\n      ttWidth: cachedDims.ttWidth || 0,\n      ttHeight: cachedDims.ttHeight || 0\n    };\n    this._setSyntheticEvent(i2, j, ttCtx);\n    w2.dom.baseEl.classList.add(\"apexcharts-tooltip-active\");\n    tooltipEl.classList.add(\"apexcharts-active\");\n    if (w2.config.chart.accessibility.enabled && w2.config.chart.accessibility.announcements.enabled) {\n      tooltipEl.removeAttribute(\"aria-hidden\");\n    }\n    if (type === \"pie\" || type === \"donut\" || type === \"polarArea\") {\n      this._showTooltipNonAxis(i2, j, ttCtx, tooltipEl);\n    } else if (type === \"radialBar\") {\n      this._showTooltipRadialBar(i2, j, ttCtx, tooltipEl);\n    } else if (type === \"heatmap\" || type === \"treemap\") {\n      this._showTooltipHeatTree(i2, j, ttCtx, tooltipEl, type);\n    } else if (type === \"bar\" || type === \"candlestick\" || type === \"boxPlot\" || type === \"violin\" || type === \"rangeBar\") {\n      this._showTooltipBar(i2, j, ttCtx);\n    } else {\n      this._showTooltipAxisLine(i2, j, ttCtx);\n    }\n  }\n  /**\n   * Set ttCtx.e to a synthetic mouse-event-like object whose clientX/Y point\n   * to the centre of the current data-point element.  This ensures that any\n   * positioning helper that reads ttCtx.e (followCursor path in moveTooltip,\n   * moveStickyTooltipOverBars, moveDynamicPointsOnHover, etc.) gets valid\n   * coordinates rather than crashing on undefined.\n   *\n   * For chart types that don't have a concrete SVG element per data point\n   * (pie, radialBar) we fall back to the SVG centre.\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   */\n  _setSyntheticEvent(i2, j, ttCtx) {\n    const w2 = this.w;\n    const type = w2.config.chart.type;\n    let clientX = 0;\n    let clientY = 0;\n    const el = this._getFocusableElement(i2, j);\n    if (el) {\n      const rect = el.getBoundingClientRect();\n      clientX = rect.left + rect.width / 2;\n      clientY = rect.top + rect.height / 2;\n    } else if (w2.globals.pointsArray && w2.globals.pointsArray[i2] && w2.globals.pointsArray[i2][j]) {\n      const pt = w2.globals.pointsArray[i2][j];\n      const elGrid = ttCtx.getElGrid && ttCtx.getElGrid();\n      if (elGrid) {\n        const gridRect = elGrid.getBoundingClientRect();\n        clientX = gridRect.left + (pt[0] || 0);\n        clientY = gridRect.top + (pt[1] || 0);\n      }\n    } else {\n      const svgEl = w2.dom.Paper && w2.dom.Paper.node;\n      if (svgEl) {\n        const svgRect = svgEl.getBoundingClientRect();\n        clientX = svgRect.left + svgRect.width / 2;\n        clientY = svgRect.top + svgRect.height / 2;\n      }\n    }\n    if (type === \"line\" || type === \"area\" || type === \"rangeArea\" || type === \"scatter\" || type === \"bubble\" || type === \"radar\") {\n      if (w2.globals.pointsArray && w2.globals.pointsArray[i2] && w2.globals.pointsArray[i2][j]) {\n        const pt = w2.globals.pointsArray[i2][j];\n        const elGrid = ttCtx.getElGrid && ttCtx.getElGrid();\n        if (elGrid) {\n          const gridRect = elGrid.getBoundingClientRect();\n          clientX = gridRect.left + (pt[0] || 0);\n          clientY = gridRect.top + (pt[1] || 0);\n        }\n      }\n    }\n    ttCtx.e = { type: \"mousemove\", clientX, clientY };\n  }\n  /**\n   * bar / column / candlestick / boxPlot / rangeBar\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   */\n  _showTooltipBar(i2, j, ttCtx) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    const shared = ttCtx.tConfig.shared && (ttCtx.tooltipUtil.isXoverlap(j) || w2.globals.isBarHorizontal) && ttCtx.tooltipUtil.isInitialSeriesSameLen();\n    const rangeData = (\n      /** @type {any} */\n      (_d = (_c = (_b = (_a = w2.rangeData.seriesRange) == null ? void 0 : _a[i2]) == null ? void 0 : _b[j]) == null ? void 0 : _c.y) == null ? void 0 : _d[0]\n    );\n    ttCtx.tooltipLabels.drawSeriesTexts(__spreadProps(__spreadValues(__spreadValues({\n      ttItems: ttCtx.ttItems,\n      i: i2,\n      j\n    }, (rangeData == null ? void 0 : rangeData.y1) !== void 0 && { y1: rangeData.y1 }), (rangeData == null ? void 0 : rangeData.y2) !== void 0 && { y2: rangeData.y2 }), {\n      shared\n    }));\n    const parent = `.apexcharts-series[data\\\\:realIndex='${i2}']`;\n    const elPath = w2.dom.Paper.findOne(\n      `${parent} path[j='${j}'], ${parent} circle[j='${j}'], ${parent} rect[j='${j}']`\n    );\n    if (elPath) {\n      this._leaveHoveredBar();\n      const graphics = new Graphics(this.w, this.ctx);\n      graphics.pathMouseEnter(elPath, null);\n      this._hoveredBarEl = elPath;\n    }\n    if (w2.globals.isBarHorizontal) {\n      const barDomEl = elPath && elPath.node;\n      if (barDomEl) {\n        const wrapRect = w2.dom.elWrap.getBoundingClientRect();\n        const barRect = barDomEl.getBoundingClientRect();\n        const barCx = barRect.left - wrapRect.left;\n        const barCy = barRect.top - wrapRect.top;\n        const bh = barRect.height;\n        const bw = barRect.width;\n        const ttWidth = ttCtx.tooltipRect.ttWidth || 0;\n        const ttHeight = ttCtx.tooltipRect.ttHeight || 0;\n        const y = barCy + bh / 2 - ttHeight / 2;\n        let x = barCx + bw;\n        const baselineX = ttCtx.xyRatios && ttCtx.xyRatios.baseLineInvertedY != null ? ttCtx.xyRatios.baseLineInvertedY : wrapRect.width / 2;\n        if (barCx < baselineX) {\n          x = barCx - ttWidth;\n        }\n        const tooltipEl = ttCtx.getElTooltip();\n        if (tooltipEl) {\n          tooltipEl.style.left = x + \"px\";\n          tooltipEl.style.top = y + \"px\";\n        }\n      }\n    } else {\n      ttCtx.tooltipPosition.moveStickyTooltipOverBars(j, i2);\n    }\n  }\n  /**\n   * line / area / scatter / bubble / radar / rangeArea\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   */\n  _showTooltipAxisLine(i2, j, ttCtx) {\n    const w2 = this.w;\n    const type = w2.config.chart.type;\n    const sharedConfigured = ttCtx.tConfig.shared;\n    const shared = sharedConfigured && ttCtx.tooltipUtil.isXoverlap(j) && ttCtx.tooltipUtil.isInitialSeriesSameLen();\n    ttCtx.tooltipLabels.drawSeriesTexts({\n      ttItems: ttCtx.ttItems,\n      i: i2,\n      j,\n      shared\n    });\n    const isScatterLike = type === \"scatter\" || type === \"bubble\";\n    const hasVisibleMarkers = w2.globals.markers.largestSize > 0;\n    if (isScatterLike) {\n      this._showScatterBubblePoint(i2, j, ttCtx);\n    } else if (hasVisibleMarkers) {\n      if (shared) {\n        ttCtx.marker.enlargePoints(j);\n      } else {\n        ttCtx.tooltipPosition.moveDynamicPointOnHover(j, i2);\n      }\n    } else if (shared) {\n      ttCtx.tooltipPosition.moveDynamicPointsOnHover(j);\n    } else {\n      ttCtx.tooltipPosition.moveDynamicPointOnHover(j, i2);\n    }\n  }\n  /**\n   * Scatter / bubble: find the specific marker element for (seriesIndex i,\n   * dataPointIndex j), resize only that element, and position the tooltip at\n   * its coordinates — mirroring what Position.moveMarkers does for mouse hover.\n   *\n   * Unlike enlargePoints(j) which queries ALL series for rel===j (causing\n   * multiple bubbles to enlarge and tooltip to land on the wrong one), this\n   * method queries by both series index AND data-point index for precision.\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   */\n  _showScatterBubblePoint(i2, j, ttCtx) {\n    const baseEl = this.w.dom.baseEl;\n    if (this._enlargedScatterMarker) {\n      ttCtx.marker.oldPointSize(this._enlargedScatterMarker);\n      this._enlargedScatterMarker = null;\n    }\n    const seriesEl = baseEl.querySelector(\n      `.apexcharts-series[data\\\\:realIndex='${i2}']`\n    );\n    if (!seriesEl) return;\n    const markerEl = seriesEl.querySelector(`.apexcharts-marker[rel='${j}']`);\n    if (!markerEl) return;\n    ttCtx.marker.enlargeCurrentPoint(j, markerEl);\n    this._enlargedScatterMarker = markerEl;\n  }\n  /**\n   * pie / donut / polarArea\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   * @param {HTMLElement} tooltipEl\n   */\n  _showTooltipNonAxis(i2, j, ttCtx, tooltipEl) {\n    const w2 = this.w;\n    ttCtx.tooltipLabels.drawSeriesTexts({\n      ttItems: ttCtx.ttItems,\n      i: j,\n      shared: false\n    });\n    const tooltipBound = tooltipEl.getBoundingClientRect();\n    const ttWidth = tooltipBound.width || ttCtx.tooltipRect.ttWidth || 0;\n    const ttHeight = tooltipBound.height || ttCtx.tooltipRect.ttHeight || 0;\n    const sliceEl = w2.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${j}']`);\n    const anchor = ttCtx.getSliceAnchor(sliceEl);\n    if (anchor) {\n      tooltipEl.style.left = anchor.x - ttWidth / 2 + \"px\";\n      tooltipEl.style.top = anchor.y - ttHeight - 10 + \"px\";\n    }\n  }\n  /**\n   * radialBar — one ring per series, single value each\n   * @param {number} i\n   * @param {any} _j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   * @param {HTMLElement} tooltipEl\n   */\n  _showTooltipRadialBar(i2, _j, ttCtx, tooltipEl) {\n    var _a;\n    const w2 = this.w;\n    ttCtx.tooltipLabels.drawSeriesTexts({\n      ttItems: ttCtx.ttItems,\n      i: i2,\n      shared: false\n    });\n    const { ttWidth = 0, ttHeight = 0 } = ttCtx.getCachedDimensions();\n    const arcEl = w2.dom.baseEl.querySelector(\n      `.apexcharts-radialbar-series[data\\\\:realIndex='${i2}'] path`\n    );\n    if (arcEl) {\n      const angle = parseFloat((_a = arcEl.getAttribute(\"data:angle\")) != null ? _a : \"\") || 0;\n      const initialAngle = w2.config.plotOptions.radialBar.startAngle || 0;\n      const midAngle = initialAngle + angle / 2;\n      const centerX = w2.layout.gridWidth / 2;\n      const centerY = w2.layout.gridHeight / 2;\n      const radialSize = w2.globals.radialSize || Math.min(w2.layout.gridWidth, w2.layout.gridHeight) / 2;\n      const seriesCount = w2.seriesData.series.length;\n      const trackSize = radialSize / Math.max(seriesCount, 1);\n      const outerRadius = radialSize - i2 * trackSize;\n      const innerRadius = outerRadius - trackSize;\n      const ringRadius = (outerRadius + innerRadius) / 2;\n      const centroid = Utils$1.polarToCartesian(\n        centerX,\n        centerY,\n        ringRadius,\n        midAngle\n      );\n      const x = centroid.x + (w2.layout.translateX || 0);\n      const y = centroid.y + (w2.layout.translateY || 0);\n      tooltipEl.style.left = x - ttWidth / 2 + \"px\";\n      tooltipEl.style.top = y - ttHeight - 10 + \"px\";\n    }\n  }\n  /**\n   * heatmap / treemap — position tooltip using element bounding rect\n   * @param {number} i\n   * @param {number} j\n   * @param {import('../tooltip/Tooltip').default} ttCtx\n   * @param {HTMLElement} tooltipEl\n   * @param {string} type\n   */\n  _showTooltipHeatTree(i2, j, ttCtx, tooltipEl, type) {\n    var _a, _b;\n    const w2 = this.w;\n    ttCtx.tooltipLabels.drawSeriesTexts({\n      ttItems: ttCtx.ttItems,\n      i: i2,\n      j,\n      shared: false\n    });\n    const tooltipRect = tooltipEl.getBoundingClientRect();\n    const ttWidth = tooltipRect.width || ttCtx.tooltipRect.ttWidth || 0;\n    const ttHeight = tooltipRect.height || ttCtx.tooltipRect.ttHeight || 0;\n    const rectClass = type === \"heatmap\" ? \"apexcharts-heatmap-rect\" : \"apexcharts-treemap-rect\";\n    const cell = w2.dom.baseEl.querySelector(`.${rectClass}[i='${i2}'][j='${j}']`);\n    if (cell) {\n      const wrapRect = w2.dom.elWrap.getBoundingClientRect();\n      const cellRect = cell.getBoundingClientRect();\n      const cellCx = cellRect.left - wrapRect.left;\n      const cellCy = cellRect.top - wrapRect.top;\n      const cellWidth = cellRect.width;\n      const cellHeight = cellRect.height;\n      const cx = parseFloat((_a = cell.getAttribute(\"cx\")) != null ? _a : \"\");\n      const cellWidthAttr = parseFloat((_b = cell.getAttribute(\"width\")) != null ? _b : \"\");\n      ttCtx.tooltipPosition.moveXCrosshairs(cx + cellWidthAttr / 2);\n      let x = cellCx + cellWidth + ttWidth / 2;\n      const y = cellCy + cellHeight / 2 - ttHeight / 2;\n      if (cellCx + cellWidth > w2.layout.gridWidth / 2) {\n        x = cellCx - ttWidth / 2;\n      }\n      tooltipEl.style.left = x + \"px\";\n      tooltipEl.style.top = y + \"px\";\n    }\n  }\n  // ─── Focus class management ───────────────────────────────────────────────\n  /**\n   * @param {number} i\n   * @param {number} j\n   */\n  _applyFocusClass(i2, j) {\n    this._removeFocusClass();\n    const el = this._getFocusableElement(i2, j);\n    if (el) {\n      el.classList.add(\"apexcharts-keyboard-focused\");\n      el.setAttribute(\"role\", \"img\");\n      const label = this._buildPointLabel(i2, j);\n      if (label) el.setAttribute(\"aria-label\", label);\n      this._focusedEl = el;\n    }\n  }\n  _removeFocusClass() {\n    if (this._focusedEl) {\n      this._focusedEl.classList.remove(\"apexcharts-keyboard-focused\");\n      this._focusedEl.removeAttribute(\"role\");\n      this._focusedEl.removeAttribute(\"aria-label\");\n      this._focusedEl = null;\n    }\n  }\n  /**\n   * Build an accessible label for the data point at (i, j) using the same\n   * formatters the visible tooltip / axis labels use, so SR output matches\n   * the visual presentation.\n   * @param {number} i\n   * @param {number} j\n   * @returns {string}\n   */\n  _buildPointLabel(i2, j) {\n    var _a, _b, _c, _d, _e, _f, _g, _h;\n    const w2 = this.w;\n    const type = w2.config.chart.type;\n    const seriesNames = w2.seriesData.seriesNames || [];\n    const series = w2.seriesData.series || [];\n    if (type === \"pie\" || type === \"donut\" || type === \"polarArea\") {\n      const sliceLabel = (_b = ((_a = w2.labelData) == null ? void 0 : _a.labels) && w2.labelData.labels[j]) != null ? _b : \"\";\n      const value = Array.isArray(series) ? series[j] : \"\";\n      return sliceLabel ? `${sliceLabel}: ${value}` : `${value}`;\n    }\n    if (type === \"radialBar\") {\n      const seriesName2 = seriesNames[i2] || `Series ${i2 + 1}`;\n      const value = Array.isArray(series) ? series[i2] : \"\";\n      return `${seriesName2}: ${value}`;\n    }\n    const seriesName = seriesNames[i2] || `Series ${i2 + 1}`;\n    const row = Array.isArray(series[i2]) ? series[i2] : [];\n    const rawValue = row[j];\n    let formattedValue = rawValue == null ? \"\" : String(rawValue);\n    const yFormatter = (_d = (_c = w2.formatters) == null ? void 0 : _c.yLabelFormatters) == null ? void 0 : _d[i2];\n    if (typeof yFormatter === \"function\") {\n      try {\n        formattedValue = yFormatter(rawValue, {\n          seriesIndex: i2,\n          dataPointIndex: j,\n          w: w2\n        });\n      } catch (e2) {\n      }\n    }\n    let category = \"\";\n    const categoryLabels = (_e = w2.labelData) == null ? void 0 : _e.categoryLabels;\n    const seriesX = (_g = (_f = w2.seriesData) == null ? void 0 : _f.seriesX) == null ? void 0 : _g[i2];\n    if (Array.isArray(categoryLabels) && categoryLabels[j] != null) {\n      category = String(categoryLabels[j]);\n    } else if (Array.isArray(seriesX) && seriesX[j] != null) {\n      const xFormatter = (_h = w2.formatters) == null ? void 0 : _h.xLabelFormatter;\n      if (typeof xFormatter === \"function\") {\n        try {\n          category = String(\n            xFormatter(seriesX[j], { seriesIndex: i2, dataPointIndex: j, w: w2 })\n          );\n        } catch (e2) {\n          category = String(seriesX[j]);\n        }\n      } else {\n        category = String(seriesX[j]);\n      }\n    }\n    return category ? `${seriesName}: ${formattedValue}, ${category}` : `${seriesName}: ${formattedValue}`;\n  }\n  _leaveHoveredBar() {\n    if (this._hoveredBarEl) {\n      const graphics = new Graphics(this.w, this.ctx);\n      graphics.pathMouseLeave(this._hoveredBarEl, null);\n      this._hoveredBarEl = null;\n    }\n  }\n  /**\n   * @param {number} i\n   * @param {number} j\n   */\n  _getFocusableElement(i2, j) {\n    const w2 = this.w;\n    const type = w2.config.chart.type;\n    const baseEl = w2.dom.baseEl;\n    if (type === \"pie\" || type === \"donut\" || type === \"polarArea\") {\n      return baseEl.querySelector(`.apexcharts-pie-area[j='${j}']`);\n    }\n    if (type === \"heatmap\") {\n      return baseEl.querySelector(\n        `.apexcharts-heatmap-rect[i='${i2}'][j='${j}']`\n      );\n    }\n    if (type === \"treemap\") {\n      return baseEl.querySelector(\n        `.apexcharts-treemap-rect[i='${i2}'][j='${j}']`\n      );\n    }\n    if (type === \"radialBar\") {\n      return baseEl.querySelector(\n        `.apexcharts-radialbar-series[data\\\\:realIndex='${i2}'] path`\n      );\n    }\n    if (type === \"bar\" || type === \"candlestick\" || type === \"boxPlot\" || type === \"violin\" || type === \"rangeBar\") {\n      return baseEl.querySelector(\n        `.apexcharts-series[data\\\\:realIndex='${i2}'] path[j='${j}']`\n      );\n    }\n    const marker = baseEl.querySelector(\n      `.apexcharts-series[data\\\\:realIndex='${i2}'] .apexcharts-marker[rel='${j}']`\n    );\n    return marker || null;\n  }\n  // ─── Click / Enter ────────────────────────────────────────────────────────\n  _fireClick() {\n    const w2 = this.w;\n    const ttCtx = w2.globals.tooltip;\n    if (!ttCtx) return;\n    const syntheticEvent = {\n      type: \"mouseup\",\n      clientX: 0,\n      clientY: 0\n    };\n    ttCtx.markerClick(syntheticEvent, this.seriesIndex, this.dataPointIndex);\n  }\n  // ─── Helpers ──────────────────────────────────────────────────────────────\n  _isNavEnabled() {\n    const a11y = this.w.config.chart.accessibility;\n    return a11y.enabled && a11y.keyboard.enabled && a11y.keyboard.navigation.enabled;\n  }\n  _getSeriesCount() {\n    const w2 = this.w;\n    const type = w2.config.chart.type;\n    if (type === \"pie\" || type === \"donut\" || type === \"polarArea\") {\n      return 1;\n    }\n    return w2.seriesData.series.length;\n  }\n  /**\n   * @param {number} si\n   */\n  _getDataPointCount(si) {\n    const w2 = this.w;\n    const type = w2.config.chart.type;\n    if (type === \"pie\" || type === \"donut\" || type === \"polarArea\") {\n      return w2.seriesData.series.length;\n    }\n    const series = w2.seriesData.series;\n    return series[si] && Array.isArray(series[si]) ? series[si].length : 0;\n  }\n  _clampCursor() {\n    const seriesCount = this._getSeriesCount();\n    if (this.seriesIndex >= seriesCount) this.seriesIndex = seriesCount - 1;\n    if (this.seriesIndex < 0) this.seriesIndex = 0;\n    const dpCount = this._getDataPointCount(this.seriesIndex);\n    if (this.dataPointIndex >= dpCount) this.dataPointIndex = dpCount - 1;\n    if (this.dataPointIndex < 0) this.dataPointIndex = 0;\n  }\n  /**\n   * When the chart is zoomed in, the current dataPointIndex may point to a\n   * data point that is outside the visible viewport. Snap the cursor to the\n   * first data point whose x-value falls within [minX, maxX].\n   *\n   * Only adjusts when w.seriesData.seriesX is populated (numeric/datetime axes).\n   * Category-only charts (seriesX entries are strings or auto-indices) are\n   * unaffected — all points are always visible.\n   */\n  _snapToVisibleRange() {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const si = this.seriesIndex;\n    if (!w2.interact.zoomed) return;\n    const seriesX = w2.seriesData.seriesX && w2.seriesData.seriesX[si];\n    if (!seriesX || !seriesX.length) return;\n    const minX = gl.minX;\n    const maxX = gl.maxX;\n    if (minX === void 0 || maxX === void 0) return;\n    const currentX = seriesX[this.dataPointIndex];\n    if (currentX >= minX && currentX <= maxX) return;\n    const dpCount = seriesX.length;\n    for (let di = 0; di < dpCount; di++) {\n      if (seriesX[di] >= minX && seriesX[di] <= maxX) {\n        this.dataPointIndex = di;\n        return;\n      }\n    }\n  }\n  /**\n   * Snap to the nearest visible data point in the given navigation direction.\n   * direction > 0 → find the first visible point (left boundary of zoomed range)\n   * direction < 0 → find the last visible point (right boundary of zoomed range)\n   * @param {number} direction\n   */\n  _snapToVisibleRangeInDirection(direction) {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const si = this.seriesIndex;\n    const seriesX = w2.seriesData.seriesX && w2.seriesData.seriesX[si];\n    if (!seriesX || !seriesX.length) return;\n    const minX = gl.minX;\n    const maxX = gl.maxX;\n    if (minX === void 0 || maxX === void 0) return;\n    const dpCount = seriesX.length;\n    if (direction >= 0) {\n      for (let di = 0; di < dpCount; di++) {\n        if (seriesX[di] >= minX && seriesX[di] <= maxX) {\n          this.dataPointIndex = di;\n          return;\n        }\n      }\n    } else {\n      for (let di = dpCount - 1; di >= 0; di--) {\n        if (seriesX[di] >= minX && seriesX[di] <= maxX) {\n          this.dataPointIndex = di;\n          return;\n        }\n      }\n    }\n  }\n  /**\n   * Check whether the data point at (si, di) is within the current visible\n   * x-axis range. Used to skip out-of-viewport points during keyboard nav.\n   * @param {number} si\n   * @param {number} di\n   */\n  _isDataPointVisible(si, di) {\n    const w2 = this.w;\n    const gl = w2.globals;\n    if (!w2.interact.zoomed) return true;\n    const seriesX = w2.seriesData.seriesX && w2.seriesData.seriesX[si];\n    if (!seriesX) return true;\n    const x = seriesX[di];\n    if (x === void 0) return true;\n    return x >= gl.minX && x <= gl.maxX;\n  }\n  /**\n   * Push a short status message to the visually-hidden aria-live region so\n   * screen readers announce zoom / pan / reset events that have no inherent\n   * tooltip update. Silently no-op if the region is missing or announcements\n   * are disabled.\n   * @param {string} message\n   */\n  _announce(message) {\n    const w2 = this.w;\n    if (!w2.config.chart.accessibility.announcements.enabled) return;\n    const baseEl = w2.dom.baseEl;\n    if (!baseEl) return;\n    const region = baseEl.querySelector(\".apexcharts-sr-status\");\n    if (!region) return;\n    region.textContent = \"\";\n    setTimeout(() => {\n      region.textContent = message;\n    }, 0);\n  }\n}\nApexCharts.registerFeatures({ keyboardNavigation: KeyboardNavigation });\nfunction gridDivideRect(bbox, count) {\n  if (!(count > 0)) return [];\n  if (count === 1) return [__spreadValues({}, bbox)];\n  const horizontal = bbox.width >= bbox.height;\n  const rowExtent = horizontal ? bbox.width : bbox.height;\n  const colExtent = horizontal ? bbox.height : bbox.width;\n  const ratio = colExtent > 0 ? rowExtent / colExtent : count;\n  let rows = Math.max(1, Math.ceil(Math.sqrt(ratio * count)));\n  if (rows > count) rows = count;\n  const baseCols = Math.floor(count / rows);\n  let remainder = count - baseCols * rows;\n  const cells = [];\n  const rowSize = rowExtent / rows;\n  let rowStart = 0;\n  for (let r2 = 0; r2 < rows; r2++) {\n    const cols = baseCols + (remainder > 0 ? 1 : 0);\n    if (remainder > 0) remainder--;\n    const colSize = cols > 0 ? colExtent / cols : 0;\n    for (let c2 = 0; c2 < cols; c2++) {\n      cells.push(\n        horizontal ? {\n          x: bbox.x + rowStart,\n          y: bbox.y + c2 * colSize,\n          width: rowSize,\n          height: colSize\n        } : {\n          x: bbox.x + c2 * colSize,\n          y: bbox.y + rowStart,\n          width: colSize,\n          height: rowSize\n        }\n      );\n    }\n    rowStart += rowSize;\n  }\n  return cells;\n}\nfunction gridDivideShape(bbox, count, intervalsAt) {\n  if (!(count > 0)) return [];\n  const horizontal = bbox.width >= bbox.height;\n  const rowExtent = horizontal ? bbox.width : bbox.height;\n  const colExtent = horizontal ? bbox.height : bbox.width;\n  const minorLo = horizontal ? bbox.y : bbox.x;\n  const minorHi = minorLo + colExtent;\n  const ratio = colExtent > 0 ? rowExtent / colExtent : count;\n  let rows = Math.max(\n    Math.ceil(Math.sqrt(ratio * count)),\n    Math.ceil(rowExtent / 16)\n  );\n  if (!(rows >= 1)) rows = 1;\n  if (rows > count) rows = count;\n  const baseCols = Math.floor(count / rows);\n  let remainder = count - baseCols * rows;\n  const cells = [];\n  const rowSize = rowExtent / rows;\n  let rowStart = horizontal ? bbox.x : bbox.y;\n  for (let r2 = 0; r2 < rows; r2++) {\n    const cols = baseCols + (remainder > 0 ? 1 : 0);\n    if (remainder > 0) remainder--;\n    const spans = [];\n    const raw = intervalsAt(rowStart, rowStart + rowSize, horizontal);\n    if (Array.isArray(raw)) {\n      for (let s2 = 0; s2 < raw.length; s2++) {\n        const iv = raw[s2];\n        if (!iv) continue;\n        const lo = Math.max(minorLo, Math.min(iv[0], iv[1]));\n        const hi = Math.min(minorHi, Math.max(iv[0], iv[1]));\n        if (hi > lo) spans.push([lo, hi]);\n      }\n    }\n    if (!spans.length) spans.push([minorLo, minorHi]);\n    const totalLen = spans.reduce((a2, s2) => a2 + (s2[1] - s2[0]), 0);\n    const exact = spans.map(\n      (s2) => totalLen > 0 ? (s2[1] - s2[0]) / totalLen * cols : cols / spans.length\n    );\n    const share = exact.map((v2) => Math.floor(v2));\n    let used = share.reduce((a2, b2) => a2 + b2, 0);\n    const byFrac = exact.map((v2, i2) => ({ i: i2, frac: v2 - Math.floor(v2) })).sort((a2, b2) => b2.frac - a2.frac);\n    for (let k = 0; used < cols; k++, used++) {\n      share[byFrac[k % byFrac.length].i]++;\n    }\n    for (let s2 = 0; s2 < spans.length; s2++) {\n      const n2 = share[s2];\n      if (n2 <= 0) continue;\n      const lo = spans[s2][0];\n      const colSize = (spans[s2][1] - lo) / n2;\n      for (let c2 = 0; c2 < n2; c2++) {\n        cells.push(\n          horizontal ? { x: rowStart, y: lo + c2 * colSize, width: rowSize, height: colSize } : { x: lo + c2 * colSize, y: rowStart, width: colSize, height: rowSize }\n        );\n      }\n    }\n    rowStart += rowSize;\n  }\n  return cells;\n}\nfunction hilbertIndex(x, y, minX, minY, maxX, maxY) {\n  let ix = maxX === minX ? 0 : Math.round(32767 * ((x - minX) / (maxX - minX)));\n  let iy = maxY === minY ? 0 : Math.round(32767 * ((y - minY) / (maxY - minY)));\n  let d = 0;\n  for (let s2 = 32768; s2 >= 1; s2 /= 2) {\n    const rx = (ix & s2) > 0 ? 1 : 0;\n    const ry = (iy & s2) > 0 ? 1 : 0;\n    d += s2 * s2 * (3 * rx ^ ry);\n    if (ry === 0) {\n      if (rx === 1) {\n        ix = s2 - 1 - ix;\n        iy = s2 - 1 - iy;\n      }\n      const t2 = ix;\n      ix = iy;\n      iy = t2;\n    }\n  }\n  return d;\n}\nfunction sortByHilbert(items, getXY) {\n  let minX = Infinity;\n  let minY = Infinity;\n  let maxX = -Infinity;\n  let maxY = -Infinity;\n  const pts = items.map((it) => {\n    const [x, y] = getXY(it);\n    if (x < minX) minX = x;\n    if (x > maxX) maxX = x;\n    if (y < minY) minY = y;\n    if (y > maxY) maxY = y;\n    return [x, y];\n  });\n  return items.map((item, k) => ({\n    item,\n    d: hilbertIndex(pts[k][0], pts[k][1], minX, minY, maxX, maxY)\n  })).sort((a2, b2) => a2.d - b2.d).map((e2) => e2.item);\n}\nfunction parseColor(str) {\n  if (!str || typeof str !== \"string\") return null;\n  const s2 = str.trim();\n  if (s2[0] === \"#\") {\n    const hex = s2.slice(1);\n    if (hex.length === 3) {\n      return [\n        parseInt(hex[0] + hex[0], 16),\n        parseInt(hex[1] + hex[1], 16),\n        parseInt(hex[2] + hex[2], 16),\n        1\n      ];\n    }\n    if (hex.length === 6 || hex.length === 8) {\n      return [\n        parseInt(hex.slice(0, 2), 16),\n        parseInt(hex.slice(2, 4), 16),\n        parseInt(hex.slice(4, 6), 16),\n        hex.length === 8 ? parseInt(hex.slice(6, 8), 16) / 255 : 1\n      ];\n    }\n    return null;\n  }\n  const m2 = s2.match(/^rgba?\\(([^)]+)\\)$/i);\n  if (m2) {\n    const parts = m2[1].split(\",\").map((p2) => parseFloat(p2));\n    if (parts.length < 3 || parts.some((v2) => !isFinite(v2))) return null;\n    return [parts[0], parts[1], parts[2], parts.length > 3 ? parts[3] : 1];\n  }\n  return null;\n}\nfunction makeColorLerp(from, to) {\n  const a2 = parseColor(from);\n  const b2 = parseColor(to);\n  if (!a2 || !b2) return null;\n  return (t2) => {\n    const r2 = Math.round(a2[0] + (b2[0] - a2[0]) * t2);\n    const g2 = Math.round(a2[1] + (b2[1] - a2[1]) * t2);\n    const bl = Math.round(a2[2] + (b2[2] - a2[2]) * t2);\n    const al = a2[3] + (b2[3] - a2[3]) * t2;\n    return al >= 1 ? `rgb(${r2},${g2},${bl})` : `rgba(${r2},${g2},${bl},${al})`;\n  };\n}\nfunction easeInOutCubic$1(t2) {\n  return t2 < 0.5 ? 4 * t2 * t2 * t2 : 1 - Math.pow(-2 * t2 + 2, 3) / 2;\n}\nfunction runPieceTween({ pieces, duration, onPieceDone, onAllDone }) {\n  let cancelled = false;\n  const start = Date.now();\n  const dur = Math.max(1, duration);\n  const write = (p2, e2) => {\n    const f = p2.from;\n    const t2 = p2.to;\n    const el = p2.el;\n    el.setAttribute(\"x\", String(f.x + (t2.x - f.x) * e2));\n    el.setAttribute(\"y\", String(f.y + (t2.y - f.y) * e2));\n    el.setAttribute(\"width\", String(Math.max(0, f.width + (t2.width - f.width) * e2)));\n    el.setAttribute(\"height\", String(Math.max(0, f.height + (t2.height - f.height) * e2)));\n    el.setAttribute(\"rx\", String(Math.max(0, f.rx + (t2.rx - f.rx) * e2)));\n    if (p2.fill) el.setAttribute(\"fill\", p2.fill(e2));\n    else if (e2 >= 1 && p2.fillEnd) el.setAttribute(\"fill\", p2.fillEnd);\n  };\n  const frame = () => {\n    if (cancelled) return;\n    const elapsed = Date.now() - start;\n    let live = false;\n    for (let k = 0; k < pieces.length; k++) {\n      const p2 = pieces[k];\n      if (\n        /** @type {any} */\n        p2._done\n      ) continue;\n      const raw = (elapsed - p2.delay) / dur;\n      if (raw < 1) live = true;\n      if (raw <= 0) continue;\n      const t2 = Math.min(1, raw);\n      write(p2, easeInOutCubic$1(t2));\n      if (t2 >= 1) {\n        p2._done = true;\n        if (onPieceDone) onPieceDone(p2);\n      }\n    }\n    if (live) BrowserAPIs.requestAnimationFrame(frame);\n    else if (onAllDone) onAllDone();\n  };\n  BrowserAPIs.requestAnimationFrame(frame);\n  return () => {\n    cancelled = true;\n  };\n}\nconst BAR_FAMILY = /* @__PURE__ */ new Set([\"bar\", \"funnel\", \"pyramid\", \"histogram\"]);\nconst RADIAL_FAMILY = /* @__PURE__ */ new Set([\"pie\", \"donut\", \"polarArea\", \"radialBar\", \"gauge\"]);\nconst UNIT_FAMILY = /* @__PURE__ */ new Set([\"unit\", \"waffle\"]);\nconst PARTITION_FAMILY = /* @__PURE__ */ new Set([\"treemap\", \"sunburst\"]);\nconst SUMMARY_FAMILY = /* @__PURE__ */ new Set([\"boxPlot\", \"violin\"]);\nconst GHOST_FADE_FRACTION = 0.55;\nconst PIECE_BUDGET = 1500;\nconst PIECE_STAGGER_MAX = 300;\nfunction familyOf(type) {\n  if (BAR_FAMILY.has(type)) return \"bar\";\n  if (RADIAL_FAMILY.has(type)) return \"radial\";\n  if (UNIT_FAMILY.has(type)) return \"unit\";\n  if (PARTITION_FAMILY.has(type)) return \"partition\";\n  if (SUMMARY_FAMILY.has(type)) return \"summary\";\n  return null;\n}\nclass MorphTypeChange {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this._snapshot = null;\n    this._ghost = null;\n    this._pieceLayer = null;\n    this._pieceCancel = null;\n  }\n  /**\n   * @param {string} fromType\n   * @param {string} toType\n   * @returns {boolean}\n   */\n  canMorphTypes(fromType, toType) {\n    if (fromType === toType) return false;\n    const ff = familyOf(fromType);\n    const tf = familyOf(toType);\n    if (!ff || !tf) return false;\n    if (ff === \"partition\" !== (tf === \"partition\")) {\n      return ff !== \"unit\" && tf !== \"unit\";\n    }\n    return true;\n  }\n  /**\n   * @param {string} fromType\n   * @param {string} toType\n   * @param {any} newSeries\n   * @returns {boolean}\n   */\n  isCompatibleSeriesShape(fromType, toType, newSeries) {\n    if (!Array.isArray(newSeries) || newSeries.length === 0) return false;\n    const ff = familyOf(fromType);\n    const tf = familyOf(toType);\n    if (tf === \"unit\") {\n      if (newSeries.every((v2) => typeof v2 === \"number\")) return true;\n      return newSeries.every(\n        (s2) => s2 && typeof s2 === \"object\" && Array.isArray(s2.data)\n      );\n    }\n    if (tf === \"partition\") {\n      return true;\n    }\n    if (tf === \"radial\") {\n      if (newSeries.every((v2) => typeof v2 === \"number\")) return true;\n      return newSeries.length === 1 && newSeries[0] && typeof newSeries[0] === \"object\" && Array.isArray(newSeries[0].data);\n    }\n    if (tf === \"bar\" || tf === \"summary\") {\n      return newSeries.every(\n        (s2) => s2 && typeof s2 === \"object\" && Array.isArray(s2.data)\n      );\n    }\n    return ff !== null && tf !== null;\n  }\n  /**\n   * Capture the live DOM of the *current* (outgoing) chart and stash it on\n   * this module. Called from `apexcharts._updateOptions` before the config\n   * merge that flips `chart.type`.\n   *\n   * Returns true if a morph is queued — caller doesn't need the value, but\n   * tests use it.\n   *\n   * @param {{ fromType: string, toType: string, newSeries: any }} args\n   * @returns {boolean}\n   */\n  captureBeforeDestroy({ fromType, toType, newSeries }) {\n    this._snapshot = null;\n    this._removeGhost();\n    this._cancelPieces();\n    if (!Environment.isBrowser()) return false;\n    const animCfg = this.w.config.chart.animations;\n    if (!animCfg || animCfg.enabled === false) return false;\n    if (animCfg.chartTypeMorph && animCfg.chartTypeMorph.enabled === false)\n      return false;\n    if (animCfg.respectReducedMotion && prefersReducedMotion()) return false;\n    if (!this.canMorphTypes(fromType, toType)) return false;\n    if (!this.isCompatibleSeriesShape(fromType, toType, newSeries)) return false;\n    const { marks, branches, unitDots } = this._captureFromDOM(fromType);\n    if (!marks.length) return false;\n    const mapping = this._buildMapping(\n      marks,\n      fromType,\n      toType,\n      newSeries,\n      branches\n    );\n    if (mapping.size === 0) return false;\n    this._snapshot = {\n      fromType,\n      toType,\n      mapping,\n      oldLayout: {\n        translateX: this.w.layout.translateX || 0,\n        translateY: this.w.layout.translateY || 0\n      }\n    };\n    const ff = familyOf(fromType);\n    const tf = familyOf(toType);\n    const canShape = this._canProbePaths();\n    const pieceFamilies = ff === \"bar\" || ff === \"summary\" || ff === \"radial\" && canShape;\n    if (tf === \"unit\" && pieceFamilies) {\n      const total = this._countUnitSeries(newSeries);\n      this._snapshot.pieceOut = total > 0 && total <= PIECE_BUDGET;\n    } else if (ff === \"unit\" && (tf === \"bar\" || tf === \"summary\" || tf === \"radial\" && canShape)) {\n      let total = 0;\n      unitDots.forEach((list) => {\n        total += list.length;\n      });\n      if (total > 0 && total <= PIECE_BUDGET) {\n        this._snapshot.pieceIn = true;\n        this._snapshot.sourceDots = unitDots;\n        const keyOrder = [];\n        if (tf === \"radial\") {\n          (Array.isArray(newSeries) ? newSeries : []).forEach(\n            (_v, i2) => {\n              keyOrder.push(`${i2}:0`);\n            }\n          );\n        } else {\n          (Array.isArray(newSeries) ? newSeries : []).forEach(\n            (s2, seriesIdx) => {\n              const data = s2 && Array.isArray(s2.data) ? s2.data : [];\n              for (let j = 0; j < data.length; j++) {\n                keyOrder.push(`${seriesIdx}:${j}`);\n              }\n            }\n          );\n        }\n        this._snapshot.keyOrder = keyOrder;\n      }\n    }\n    if (this._needsGhost(fromType, toType) && !this._snapshot.pieceOut && !this._snapshot.pieceIn) {\n      this._captureGhost();\n    }\n    this.w.globals.previousPaths = [];\n    return true;\n  }\n  /**\n   * Whether the outgoing marks need an exit animation of their own.\n   *\n   * Most pairs do not. bar → pie hands every wedge the exact `d` of the bar it\n   * replaces, and treemap → sunburst does the same for its tiles: the outgoing\n   * mark IS the incoming mark's first frame, so it never needs to leave, and\n   * drawing a copy of it would only double the image at t=0.\n   *\n   * The unit pairs are the exception, in both directions, because the\n   * correspondence is not 1:1. Going in, one bar becomes N dots, so the bar has\n   * no successor to become. Coming out, N dots become one bar: the bar does\n   * grow from the cloud's footprint, but no individual dot has anywhere to go.\n   * Either way something on screen simply stops existing, which is exactly the\n   * hard cut that made these pairs read as \"the old chart vanished and the new\n   * one animated\" rather than as a morph.\n   *\n   * @param {string} fromType\n   * @param {string} toType\n   * @returns {boolean}\n   */\n  _needsGhost(fromType, toType) {\n    return familyOf(fromType) === \"unit\" || familyOf(toType) === \"unit\";\n  }\n  /**\n   * Take a detached copy of the outgoing chart's marks, to be mounted over the\n   * incoming chart once it exists (see `_mountGhost`).\n   *\n   * The whole `<svg>` is cloned and the chrome then removed from the copy,\n   * rather than lifting the series groups out on their own: every mark's\n   * position depends on the transforms of the groups above it, and cloning\n   * from the root is what keeps those intact without re-deriving any geometry.\n   *\n   * The chrome is dropped because `applyChromeFade` already fades the incoming\n   * axes, grid and legend in from zero. Keeping the outgoing set as well would\n   * put two sets of axis labels on screen at half opacity each.\n   */\n  _captureGhost() {\n    var _a, _b;\n    const paper = (_a = this.w.dom) == null ? void 0 : _a.Paper;\n    const node = paper && paper.node;\n    if (!node || typeof node.cloneNode !== \"function\") return;\n    const clone = node.cloneNode(true);\n    const drop = [\n      \".apexcharts-xaxis\",\n      \".apexcharts-yaxis\",\n      \".apexcharts-grid\",\n      \".apexcharts-gridlines-horizontal\",\n      \".apexcharts-gridlines-vertical\",\n      \".apexcharts-legend\",\n      \".apexcharts-title-text\",\n      \".apexcharts-subtitle-text\",\n      \".apexcharts-annotations\",\n      \".apexcharts-zoom-rect\",\n      \".apexcharts-selection-rect\",\n      \".apexcharts-xcrosshairs\",\n      \".apexcharts-ycrosshairs\"\n    ];\n    if (typeof clone.querySelectorAll === \"function\") {\n      drop.forEach((sel) => {\n        clone.querySelectorAll(sel).forEach((el) => {\n          if (el.parentNode) el.parentNode.removeChild(el);\n        });\n      });\n    }\n    if (typeof clone.querySelectorAll === \"function\") {\n      clone.querySelectorAll(\"[id]\").forEach((el) => {\n        el.removeAttribute(\"id\");\n      });\n    }\n    (_b = clone.removeAttribute) == null ? void 0 : _b.call(clone, \"id\");\n    this._ghost = clone;\n  }\n  /**\n   * Mount the captured copy over the newly-rendered chart and fade it out.\n   *\n   * It goes ON TOP of the live svg, which is what makes both directions read\n   * as one motion rather than as a swap. Going into a unit chart the bars\n   * dissolve and the dots are uncovered already in flight, having left from\n   * inside the bar that held them. Coming out of one, the dots are still there\n   * to fade while the bar grows underneath them; behind the incoming mark they\n   * would be hidden on the first frame, because that mark starts out exactly\n   * the size of the cloud it is replacing.\n   *\n   * The fade runs over a fraction of the morph so the outgoing marks are gone\n   * before the incoming ones settle. Holding them for the full duration leaves\n   * two charts overlapping right at the moment the eye is reading the final\n   * shape, which looks like a rendering fault rather than a transition.\n   */\n  _mountGhost() {\n    var _a, _b, _c;\n    const ghost = this._ghost;\n    if (!ghost || !Environment.isBrowser()) return;\n    const wrap = (_a = this.w.dom) == null ? void 0 : _a.elWrap;\n    if (!wrap || typeof wrap.appendChild !== \"function\") {\n      this._ghost = null;\n      return;\n    }\n    const style = ghost.style;\n    if (style) {\n      style.position = \"absolute\";\n      style.left = \"0\";\n      style.top = \"0\";\n      style.background = \"transparent\";\n      style.pointerEvents = \"none\";\n      style.opacity = \"1\";\n    }\n    (_b = ghost.setAttribute) == null ? void 0 : _b.call(ghost, \"aria-hidden\", \"true\");\n    (_c = ghost.setAttribute) == null ? void 0 : _c.call(ghost, \"class\", \"apexcharts-morph-ghost\");\n    wrap.appendChild(ghost);\n    const speed = this.getSpeed();\n    const fade = Math.max(120, Math.round(speed * GHOST_FADE_FRACTION));\n    BrowserAPIs.requestAnimationFrame(() => {\n      if (!style) return;\n      style.transition = `opacity ${fade}ms ease-in`;\n      style.opacity = \"0\";\n    });\n    setTimeout(() => this._removeGhost(), fade + 60);\n  }\n  /** Detach the ghost if one is mounted. Safe to call at any time. */\n  _removeGhost() {\n    const ghost = this._ghost;\n    this._ghost = null;\n    if (ghost && ghost.parentNode) ghost.parentNode.removeChild(ghost);\n  }\n  /* ------------------------------------------------------------------ *\n   * The piece layer (see MorphPieces for the geometry).\n   * ------------------------------------------------------------------ */\n  /**\n   * Object count of an incoming unit series: one datum per dot in the object\n   * form. The numeric form ([3, 5]) scales values by `plotOptions.unit\n   * .unitValue`, which is not resolvable pre-merge, so it counts as zero and\n   * keeps the burst-and-ghost behaviour.\n   *\n   * @param {any} newSeries\n   * @returns {number}\n   */\n  _countUnitSeries(newSeries) {\n    if (!Array.isArray(newSeries)) return 0;\n    let total = 0;\n    for (const s2 of newSeries) {\n      if (!s2 || typeof s2 !== \"object\" || !Array.isArray(s2.data)) return 0;\n      total += s2.data.length;\n    }\n    return total;\n  }\n  /**\n   * Whether the incoming unit chart should hold its dots for the piece layer:\n   * render them at their final slots, hidden, and let the pieces do the\n   * flying. The reveal happens per dot as its piece lands.\n   *\n   * Consulted by the unit renderer during its draw, which runs after\n   * `captureBeforeDestroy` and before `applyChromeFade`, so the decision was\n   * already made from the same series the renderer is now drawing.\n   *\n   * @returns {boolean}\n   */\n  usesPieceTakeover() {\n    return !!(this._snapshot && this._snapshot.pieceOut);\n  }\n  /**\n   * Whether the piece layer claims the incoming mark at (realIndex, j): a\n   * source cluster's dots will fly to it and tile it, so it must render\n   * hidden and reveal only when its mosaic is complete. Consulted by the bar\n   * renderer (boxPlot and violin render through it).\n   *\n   * @param {number|string} realIndex\n   * @param {number|string} j\n   * @returns {boolean}\n   */\n  claimsTargetMark(realIndex, j) {\n    return !!(this._snapshot && this._snapshot.pieceIn && this._snapshot.mapping.has(`${realIndex}:${j}`));\n  }\n  /**\n   * Create the overlay group the pieces are driven in. It lives INSIDE the\n   * new chart's elGraphical so every coordinate matches the marks' own local\n   * space, and it never takes a pointer event.\n   * @returns {any} the <g> node, or null\n   */\n  _makePieceLayer() {\n    var _a, _b;\n    const graph = (_a = this.w.dom) == null ? void 0 : _a.elGraphical;\n    const host = graph && graph.node;\n    if (!host || typeof host.appendChild !== \"function\") return null;\n    const g2 = BrowserAPIs.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n    if (!g2) return null;\n    g2.setAttribute(\"class\", \"apexcharts-morph-pieces\");\n    g2.setAttribute(\"pointer-events\", \"none\");\n    const cuid = (_b = this.w.globals) == null ? void 0 : _b.cuid;\n    if (cuid) g2.setAttribute(\"clip-path\", `url(#gridRectBarMask${cuid})`);\n    host.appendChild(g2);\n    this._pieceLayer = g2;\n    return g2;\n  }\n  /**\n   * Reveal everything a piece takeover hid, whether or not the pieces ran.\n   * The attribute is plain (no namespace colon) so it stays selectable\n   * everywhere.\n   */\n  _revealPieceHidden() {\n    var _a;\n    const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n    if (!baseEl || typeof baseEl.querySelectorAll !== \"function\") return;\n    baseEl.querySelectorAll(\"[data-piece-hidden]\").forEach(\n      (el) => {\n        el.removeAttribute(\"opacity\");\n        el.removeAttribute(\"data-piece-hidden\");\n      }\n    );\n  }\n  /** Stop the piece run, drop the overlay, and reveal anything still hidden. */\n  _cancelPieces() {\n    if (this._pieceCancel) {\n      this._pieceCancel();\n      this._pieceCancel = null;\n    }\n    const layer = this._pieceLayer;\n    this._pieceLayer = null;\n    if (layer && layer.parentNode) layer.parentNode.removeChild(layer);\n    this._revealPieceHidden();\n  }\n  /**\n   * Whether this environment can hit-test path geometry at all. Decided\n   * before the ghost clone is taken, because a family whose cells are only\n   * honest when probed (radial) must keep the fade rather than fall back to a\n   * rectangular grid it cannot justify. jsdom answers no.\n   * @returns {boolean}\n   */\n  _canProbePaths() {\n    if (!Environment.isBrowser()) return false;\n    const probe = BrowserAPIs.createElementNS(\n      \"http://www.w3.org/2000/svg\",\n      \"path\"\n    );\n    return !!probe && typeof /** @type {any} */\n    probe.isPointInFill === \"function\";\n  }\n  /**\n   * A per-band ink prober over a mark's path, for gridDivideShape: given a\n   * major-axis band it measures where the mark actually has ink across the\n   * minor axis, so a violin's cells follow its density outline, a boxPlot's\n   * whisker rows collapse to slivers, and a wedge's rows stop at the wedge\n   * instead of spanning the bounding box (which stamped a rectangle over the\n   * mark at frame one).\n   *\n   * The probe path is mounted (hidden) inside the piece layer so its user\n   * space is exactly the space the cells are laid out in. The stroke test\n   * catches zero-area subpaths (a boxPlot's whisker line has no fill to\n   * hit), and its width is what a whisker's slivers will measure.\n   *\n   * Returns null when the environment cannot hit-test path geometry (jsdom);\n   * the caller then keeps the plain grid.\n   *\n   * @param {string} d - path data, in piece-layer coordinates\n   * @param {{x:number,y:number,width:number,height:number}} bbox\n   * @param {any} layer - the mounted piece layer\n   * @returns {{ intervalsAt: (bandLo: number, bandHi: number, horizontal: boolean) => Array<[number, number]> | null, dispose: () => void } | null}\n   */\n  _makeExtentProber(d, bbox, layer) {\n    const doc = layer.ownerDocument;\n    const probe = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n    probe.setAttribute(\"d\", d);\n    probe.setAttribute(\"fill\", \"#000\");\n    probe.setAttribute(\"stroke\", \"#000\");\n    probe.setAttribute(\"stroke-width\", \"3\");\n    probe.setAttribute(\"visibility\", \"hidden\");\n    layer.appendChild(probe);\n    const svg = probe.ownerSVGElement;\n    if (typeof /** @type {any} */\n    probe.isPointInFill !== \"function\" || !svg || typeof svg.createSVGPoint !== \"function\") {\n      layer.removeChild(probe);\n      return null;\n    }\n    const pt = svg.createSVGPoint();\n    const hit = (x, y) => {\n      pt.x = x;\n      pt.y = y;\n      const p2 = (\n        /** @type {any} */\n        probe\n      );\n      return p2.isPointInFill(pt) || typeof p2.isPointInStroke === \"function\" && p2.isPointInStroke(pt);\n    };\n    const SCAN = 48;\n    const intervalsAt = (bandLo, bandHi, horizontal) => {\n      const lo = horizontal ? bbox.y : bbox.x;\n      const hi = lo + (horizontal ? bbox.height : bbox.width);\n      if (!(hi > lo)) return null;\n      const at = (v2, major) => horizontal ? hit(major, v2) : hit(v2, major);\n      const majors = [\n        bandLo + (bandHi - bandLo) * 0.1,\n        (bandLo + bandHi) / 2,\n        bandHi - (bandHi - bandLo) * 0.1\n      ];\n      const edge = (inside, outside, major) => {\n        let a2 = outside;\n        let b2 = inside;\n        for (let it = 0; it < 6; it++) {\n          const m2 = (a2 + b2) / 2;\n          if (at(m2, major)) b2 = m2;\n          else a2 = m2;\n        }\n        return (a2 + b2) / 2;\n      };\n      const step = (hi - lo) / SCAN;\n      const proof = new Array(SCAN + 1).fill(null);\n      let any = false;\n      for (const major of majors) {\n        for (let s2 = 0; s2 <= SCAN; s2++) {\n          if (proof[s2] !== null) continue;\n          if (at(lo + s2 * step, major)) {\n            proof[s2] = major;\n            any = true;\n          }\n        }\n      }\n      if (!any) return null;\n      const out = [];\n      let runStart = -1;\n      for (let s2 = 0; s2 <= SCAN + 1; s2++) {\n        const inside = s2 <= SCAN && proof[s2] !== null;\n        if (inside && runStart < 0) runStart = s2;\n        if (!inside && runStart >= 0) {\n          const last = s2 - 1;\n          const major = (\n            /** @type {number} */\n            proof[runStart]\n          );\n          const left = runStart === 0 ? lo : edge(lo + runStart * step, lo + (runStart - 1) * step, major);\n          const right = last === SCAN ? hi : edge(\n            lo + last * step,\n            lo + (last + 1) * step,\n            /** @type {number} */\n            proof[last]\n          );\n          if (right > left) out.push([left, right]);\n          runStart = -1;\n        }\n      }\n      return out.length ? out : null;\n    };\n    return {\n      intervalsAt,\n      dispose: () => {\n        if (probe.parentNode) probe.parentNode.removeChild(probe);\n      }\n    };\n  }\n  /**\n   * mark -> objects. Cut each captured mark into one cell per dot and fly\n   * every cell to its dot, corners rounding off and fill blending on the way.\n   * The real dots (rendered hidden by the unit chart, see usesPieceTakeover)\n   * are revealed one by one as their piece lands, so the handoff is\n   * geometrically exact and nothing ever fades.\n   */\n  _separatePieces() {\n    var _a;\n    const snap = this._snapshot;\n    const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n    if (!snap || !baseEl) return this._revealPieceHidden();\n    const byCluster = /* @__PURE__ */ new Map();\n    let total = 0;\n    baseEl.querySelectorAll(\".apexcharts-unit-area\").forEach((dot) => {\n      var _a2, _b, _c, _d, _e, _f, _g;\n      const i2 = parseInt((_a2 = dot.getAttribute(\"i\")) != null ? _a2 : \"\", 10);\n      if (isNaN(i2)) return;\n      const cxAttr = dot.getAttribute(\"cx\");\n      let x;\n      let y;\n      let r2 = 3;\n      if (cxAttr != null) {\n        x = parseFloat(cxAttr);\n        y = parseFloat((_b = dot.getAttribute(\"cy\")) != null ? _b : \"\");\n        r2 = parseFloat((_c = dot.getAttribute(\"r\")) != null ? _c : \"3\") || 3;\n      } else {\n        const wAttr = parseFloat((_d = dot.getAttribute(\"width\")) != null ? _d : \"0\") || 0;\n        const hAttr = parseFloat((_e = dot.getAttribute(\"height\")) != null ? _e : \"0\") || 0;\n        x = parseFloat((_f = dot.getAttribute(\"x\")) != null ? _f : \"\") + wAttr / 2;\n        y = parseFloat((_g = dot.getAttribute(\"y\")) != null ? _g : \"\") + hAttr / 2;\n        r2 = Math.max(wAttr, hAttr) / 2 || 3;\n      }\n      if (!isFinite(x) || !isFinite(y)) return;\n      let list = byCluster.get(i2);\n      if (!list) {\n        list = [];\n        byCluster.set(i2, list);\n      }\n      list.push({ el: dot, x, y, r: r2, fill: dot.getAttribute(\"fill\") });\n      total++;\n    });\n    if (total === 0 || total > PIECE_BUDGET) return this._revealPieceHidden();\n    const layer = this._makePieceLayer();\n    if (!layer) return this._revealPieceHidden();\n    const pieces = [];\n    const doc = layer.ownerDocument;\n    const sourceFam = familyOf(snap.fromType);\n    const shapedSource = sourceFam === \"summary\" || sourceFam === \"radial\";\n    Array.from(byCluster.keys()).sort((a2, b2) => a2 - b2).forEach((i2) => {\n      var _a2;\n      const dots = (\n        /** @type {any[]} */\n        byCluster.get(i2)\n      );\n      const box = this.getInitialBBoxFor(i2);\n      const entry = snap.mapping.get(`${i2}:0`);\n      if (!box || !entry) {\n        dots.forEach((d) => {\n          d.el.removeAttribute(\"opacity\");\n          d.el.removeAttribute(\"data-piece-hidden\");\n        });\n        return;\n      }\n      const markFill = entry.fill && entry.fill.indexOf(\"url(\") !== 0 ? entry.fill : ((_a2 = this.w.globals.colors) == null ? void 0 : _a2[i2]) || dots[0].fill;\n      let prober = null;\n      if (shapedSource) {\n        const shifted = this.getInitialPathFor(i2, 0);\n        if (shifted) prober = this._makeExtentProber(shifted, box, layer);\n      }\n      const divided = prober ? gridDivideShape(box, dots.length, prober.intervalsAt) : gridDivideRect(box, dots.length);\n      if (prober) prober.dispose();\n      const cells = sortByHilbert(divided, (c2) => [\n        c2.x + c2.width / 2,\n        c2.y + c2.height / 2\n      ]);\n      const ordered = sortByHilbert(dots, (d) => [d.x, d.y]);\n      for (let k = 0; k < ordered.length; k++) {\n        const cell = cells[k];\n        const dot = ordered[k];\n        const el = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n        el.setAttribute(\"data-i\", String(i2));\n        el.setAttribute(\"x\", String(cell.x));\n        el.setAttribute(\"y\", String(cell.y));\n        el.setAttribute(\"width\", String(cell.width));\n        el.setAttribute(\"height\", String(cell.height));\n        el.setAttribute(\"rx\", \"0\");\n        el.setAttribute(\"fill\", String(markFill));\n        layer.appendChild(el);\n        pieces.push({\n          el,\n          from: { x: cell.x, y: cell.y, width: cell.width, height: cell.height, rx: 0 },\n          to: {\n            x: dot.x - dot.r,\n            y: dot.y - dot.r,\n            width: dot.r * 2,\n            height: dot.r * 2,\n            rx: dot.r\n          },\n          fill: makeColorLerp(markFill, dot.fill),\n          fillEnd: dot.fill,\n          delay: 0,\n          meta: { dotEl: dot.el }\n        });\n      }\n    });\n    if (!pieces.length) return this._cancelPieces();\n    this._runPieces(pieces, (piece) => {\n      const dotEl = piece.meta.dotEl;\n      dotEl.removeAttribute(\"opacity\");\n      dotEl.removeAttribute(\"data-piece-hidden\");\n      if (piece.el.parentNode) piece.el.parentNode.removeChild(piece.el);\n    });\n  }\n  /**\n   * objects -> mark. Each captured outgoing dot flies to one cell of the\n   * incoming mark, squaring off and blending towards the mark's fill; the\n   * mark itself (rendered hidden, see claimsTargetMark) is revealed the\n   * moment its last piece lands and the mosaic is complete, which is also the\n   * moment the seams disappear.\n   */\n  _combinePieces() {\n    var _a, _b;\n    const snap = this._snapshot;\n    const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n    if (!snap || !snap.sourceDots || !snap.keyOrder || !baseEl) {\n      return this._revealPieceHidden();\n    }\n    const targets = this._collectTargetMarks(snap.toType);\n    if (!targets.size) return this._revealPieceHidden();\n    const dx = snap.oldLayout.translateX - (this.w.layout.translateX || 0);\n    const dy = snap.oldLayout.translateY - (this.w.layout.translateY || 0);\n    const clusterIdx = Array.from(snap.sourceDots.keys()).sort((a2, b2) => a2 - b2);\n    const layer = this._makePieceLayer();\n    if (!layer) return this._revealPieceHidden();\n    const doc = layer.ownerDocument;\n    const pieces = [];\n    const targetFam = familyOf(snap.toType);\n    const shapedTarget = targetFam === \"summary\" || targetFam === \"radial\";\n    for (let k = 0; k < clusterIdx.length; k++) {\n      const dots = (\n        /** @type {any[]} */\n        snap.sourceDots.get(clusterIdx[k])\n      );\n      const key = snap.keyOrder[k];\n      const target = key ? targets.get(key) : null;\n      if (!target || !dots || !dots.length) {\n        if (target) {\n          target.els.forEach((el) => {\n            el.removeAttribute(\"opacity\");\n            el.removeAttribute(\"data-piece-hidden\");\n          });\n        }\n        continue;\n      }\n      const markFill = target.fill && target.fill.indexOf(\"url(\") !== 0 ? target.fill : ((_b = this.w.globals.colors) == null ? void 0 : _b[target.realIndex]) || dots[0].fill;\n      let prober = null;\n      if (shapedTarget) {\n        const d = target.d || target.els.map(\n          (p2) => p2.getAttribute(\"pathTo\") || p2.getAttribute(\"d\")\n        ).filter(Boolean).join(\" \");\n        if (d) prober = this._makeExtentProber(d, target.bbox, layer);\n      }\n      const divided = prober ? gridDivideShape(target.bbox, dots.length, prober.intervalsAt) : gridDivideRect(target.bbox, dots.length);\n      if (prober) prober.dispose();\n      const cells = sortByHilbert(divided, (c2) => [\n        c2.x + c2.width / 2,\n        c2.y + c2.height / 2\n      ]);\n      const ordered = sortByHilbert(dots, (d) => [d.x, d.y]);\n      const markState = { remaining: ordered.length, els: target.els, tiles: (\n        /** @type {any[]} */\n        []\n      ) };\n      for (let m2 = 0; m2 < ordered.length; m2++) {\n        const dot = ordered[m2];\n        const cell = cells[m2];\n        const el = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n        const fx = dot.x + dx - dot.r;\n        const fy = dot.y + dy - dot.r;\n        el.setAttribute(\"data-key\", key);\n        el.setAttribute(\"x\", String(fx));\n        el.setAttribute(\"y\", String(fy));\n        el.setAttribute(\"width\", String(dot.r * 2));\n        el.setAttribute(\"height\", String(dot.r * 2));\n        el.setAttribute(\"rx\", String(dot.r));\n        el.setAttribute(\"fill\", String(dot.fill || markFill));\n        layer.appendChild(el);\n        markState.tiles.push(el);\n        pieces.push({\n          el,\n          from: { x: fx, y: fy, width: dot.r * 2, height: dot.r * 2, rx: dot.r },\n          to: { x: cell.x, y: cell.y, width: cell.width, height: cell.height, rx: 0 },\n          fill: makeColorLerp(dot.fill, markFill),\n          fillEnd: String(markFill),\n          delay: 0,\n          meta: { markState }\n        });\n      }\n    }\n    if (!pieces.length) return this._cancelPieces();\n    this._runPieces(pieces, (piece) => {\n      const state = piece.meta.markState;\n      state.remaining--;\n      if (state.remaining === 0) {\n        state.els.forEach((el) => {\n          el.removeAttribute(\"opacity\");\n          el.removeAttribute(\"data-piece-hidden\");\n        });\n        state.tiles.forEach((t2) => {\n          if (t2.parentNode) t2.parentNode.removeChild(t2);\n        });\n      }\n    });\n  }\n  /**\n   * Stagger and start a piece run. Delays sweep the (already spatially\n   * sorted) list front to back, and the last piece still lands within the\n   * configured morph speed.\n   *\n   * @param {import('./MorphPieces').Piece[]} pieces\n   * @param {(piece: import('./MorphPieces').Piece) => void} onPieceDone\n   */\n  _runPieces(pieces, onPieceDone) {\n    const speed = this.getSpeed();\n    const stagger = Math.min(PIECE_STAGGER_MAX, speed * 0.35);\n    const flight = Math.max(180, speed - stagger);\n    for (let k = 0; k < pieces.length; k++) {\n      pieces[k].delay = pieces.length > 1 ? k / (pieces.length - 1) * stagger : 0;\n    }\n    this._pieceCancel = runPieceTween({\n      pieces,\n      duration: flight,\n      onPieceDone,\n      onAllDone: () => {\n        this._pieceCancel = null;\n        this._cancelPieces();\n      }\n    });\n  }\n  /**\n   * The incoming chart's marks, read live: every `path[pathTo]` grouped into\n   * one mark per (realIndex, j), with the union bbox of its final geometry.\n   * Bar marks are one path each; summary marks (boxPlot, violin) may be\n   * several, walked exactly like the capture branch walks the outgoing ones.\n   *\n   * @param {string} toType\n   * @returns {Map<string, { realIndex: number, j: number, bbox: {x:number,y:number,width:number,height:number}, fill: string|null, els: any[], d?: string }>}\n   */\n  _collectTargetMarks(toType) {\n    var _a;\n    const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n    const out = /* @__PURE__ */ new Map();\n    if (!baseEl) return out;\n    const fam = familyOf(toType);\n    if (fam === \"radial\") {\n      baseEl.querySelectorAll(\".apexcharts-pie-series .apexcharts-pie-area\").forEach((p2, i2) => {\n        const d = p2.getAttribute(\"data:pathFinal\") || p2.getAttribute(\"d\");\n        if (!d || !d.trim()) return;\n        const box = this._pathBBox(d);\n        if (!box) return;\n        out.set(`${i2}:0`, {\n          realIndex: i2,\n          j: 0,\n          d,\n          bbox: {\n            x: box.minX,\n            y: box.minY,\n            width: box.maxX - box.minX,\n            height: box.maxY - box.minY\n          },\n          fill: p2.getAttribute(\"fill\"),\n          els: [p2]\n        });\n      });\n      return out;\n    }\n    const wrapClass = fam === \"summary\" ? `.apexcharts-${toType}-series` : \".apexcharts-bar-series\";\n    baseEl.querySelectorAll(`${wrapClass} .apexcharts-series`).forEach((group) => {\n      var _a2;\n      const realIndex = parseInt((_a2 = group.getAttribute(\"data:realIndex\")) != null ? _a2 : \"0\", 10) || 0;\n      let order = 0;\n      group.querySelectorAll(\"path[pathTo]\").forEach((p2) => {\n        var _a3;\n        const d = p2.getAttribute(\"pathTo\") || p2.getAttribute(\"d\");\n        if (!d || !d.trim()) return;\n        const jAttr = parseInt((_a3 = p2.getAttribute(\"j\")) != null ? _a3 : \"\", 10);\n        const j = isNaN(jAttr) ? order++ : jAttr;\n        const box = this._pathBBox(d);\n        if (!box) return;\n        const key = `${realIndex}:${j}`;\n        const prev = out.get(key);\n        if (prev) {\n          prev.els.push(p2);\n          prev.bbox = {\n            x: Math.min(prev.bbox.x, box.minX),\n            y: Math.min(prev.bbox.y, box.minY),\n            width: Math.max(prev.bbox.x + prev.bbox.width, box.maxX) - Math.min(prev.bbox.x, box.minX),\n            height: Math.max(prev.bbox.y + prev.bbox.height, box.maxY) - Math.min(prev.bbox.y, box.minY)\n          };\n        } else {\n          out.set(key, {\n            realIndex,\n            j,\n            bbox: {\n              x: box.minX,\n              y: box.minY,\n              width: box.maxX - box.minX,\n              height: box.maxY - box.minY\n            },\n            fill: p2.getAttribute(\"fill\"),\n            els: [p2]\n          });\n        }\n      });\n    });\n    return out;\n  }\n  /**\n   * Walk the outgoing chart's DOM and collect path `d` strings keyed by\n   * (realIndex, j). The selectors are scoped to the chart family — bar\n   * elements have `pathTo` set; pie/radial elements use their final `d`.\n   *\n   * @param {string} fromType\n   * @returns {{ marks: Array<{ realIndex: number, j: number, d: string, fill: string|null, key?: string|null }>, branches: Array<{ key: string, d: string, fill: string|null }>, unitDots: Map<number, Array<{x:number,y:number,r:number,fill:string|null}>> }}\n   */\n  _captureFromDOM(fromType) {\n    var _a;\n    const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n    if (!baseEl) return { marks: [], branches: [], unitDots: /* @__PURE__ */ new Map() };\n    const captured = [];\n    const branches = [];\n    const unitDots = /* @__PURE__ */ new Map();\n    const fam = familyOf(fromType);\n    if (fam === \"bar\") {\n      const seriesNodes = baseEl.querySelectorAll(\n        \".apexcharts-bar-series .apexcharts-series\"\n      );\n      seriesNodes.forEach((seriesNode) => {\n        var _a2;\n        const realIndex = parseInt(\n          (_a2 = seriesNode.getAttribute(\"data:realIndex\")) != null ? _a2 : \"0\",\n          10\n        );\n        const paths = seriesNode.querySelectorAll(\"path[pathTo]\");\n        paths.forEach((p2, j) => {\n          const d = p2.getAttribute(\"pathTo\") || p2.getAttribute(\"d\");\n          if (!d) return;\n          captured.push({\n            realIndex,\n            j,\n            d,\n            fill: p2.getAttribute(\"fill\")\n          });\n        });\n      });\n    } else if (fam === \"summary\") {\n      const byMark = /* @__PURE__ */ new Map();\n      baseEl.querySelectorAll(`.apexcharts-${fromType}-area`).forEach((p2) => {\n        var _a2, _b;\n        const j = parseInt((_a2 = p2.getAttribute(\"j\")) != null ? _a2 : \"\", 10);\n        if (isNaN(j)) return;\n        const d = p2.getAttribute(\"pathTo\") || p2.getAttribute(\"d\");\n        if (!d || !d.trim()) return;\n        const group = typeof p2.closest === \"function\" ? p2.closest(\".apexcharts-series\") : null;\n        const realIndex = parseInt((_b = group == null ? void 0 : group.getAttribute(\"data:realIndex\")) != null ? _b : \"0\", 10) || 0;\n        const key = `${realIndex}:${j}`;\n        const prev = byMark.get(key);\n        if (prev) prev.d += ` ${d}`;\n        else byMark.set(key, { realIndex, j, d, fill: p2.getAttribute(\"fill\") });\n      });\n      Array.from(byMark.values()).sort((a2, b2) => a2.realIndex - b2.realIndex || a2.j - b2.j).forEach((m2) => captured.push(m2));\n    } else if (fam === \"partition\") {\n      if (fromType === \"treemap\") {\n        const rectPath = (el) => {\n          var _a2, _b, _c, _d;\n          const x = parseFloat((_a2 = el.getAttribute(\"x\")) != null ? _a2 : \"\");\n          const y = parseFloat((_b = el.getAttribute(\"y\")) != null ? _b : \"\");\n          const width = parseFloat((_c = el.getAttribute(\"width\")) != null ? _c : \"\");\n          const height = parseFloat((_d = el.getAttribute(\"height\")) != null ? _d : \"\");\n          if (![x, y, width, height].every((v2) => isFinite(v2))) return null;\n          return `M ${x} ${y} L ${x + width} ${y} L ${x + width} ${y + height} L ${x} ${y + height} Z`;\n        };\n        const tiles = baseEl.querySelectorAll(\".apexcharts-treemap-rect\");\n        tiles.forEach((t2) => {\n          var _a2, _b;\n          const d = rectPath(t2);\n          if (!d) return;\n          captured.push({\n            realIndex: parseInt((_a2 = t2.getAttribute(\"i\")) != null ? _a2 : \"0\", 10) || 0,\n            j: parseInt((_b = t2.getAttribute(\"j\")) != null ? _b : \"0\", 10) || 0,\n            d,\n            fill: t2.getAttribute(\"fill\"),\n            key: t2.getAttribute(\"data:key\") || null\n          });\n        });\n        const containers = baseEl.querySelectorAll(\n          \".apexcharts-treemap-parent-rect\"\n        );\n        containers.forEach((c2) => {\n          const d = rectPath(c2);\n          const key = c2.getAttribute(\"data:key\");\n          if (!d || !key) return;\n          branches.push({ key, d, fill: c2.getAttribute(\"fill\") });\n        });\n      } else {\n        const arcs = baseEl.querySelectorAll(\".apexcharts-sunburst-arc\");\n        const leaves = [];\n        arcs.forEach((a2) => {\n          if (a2.getAttribute(\"data:leaf\") === \"true\") leaves.push(a2);\n        });\n        const source = leaves.length ? leaves : Array.from(arcs);\n        source.forEach((a2, i2) => {\n          const d = a2.getAttribute(\"d\");\n          if (!d || !d.trim()) return;\n          captured.push({\n            realIndex: i2,\n            j: 0,\n            d,\n            fill: a2.getAttribute(\"fill\"),\n            key: a2.getAttribute(\"data:key\") || null\n          });\n        });\n        arcs.forEach((a2) => {\n          if (a2.getAttribute(\"data:leaf\") === \"true\") return;\n          const d = a2.getAttribute(\"d\");\n          const key = a2.getAttribute(\"data:key\");\n          if (!d || !d.trim() || !key) return;\n          branches.push({ key, d, fill: a2.getAttribute(\"fill\") });\n        });\n      }\n    } else if (fam === \"unit\") {\n      const dots = baseEl.querySelectorAll(\".apexcharts-unit-area\");\n      const boxes = /* @__PURE__ */ new Map();\n      dots.forEach((dot) => {\n        var _a2, _b, _c, _d, _e, _f, _g;\n        const i2 = parseInt((_a2 = dot.getAttribute(\"i\")) != null ? _a2 : \"\", 10);\n        if (isNaN(i2)) return;\n        const cxAttr = dot.getAttribute(\"cx\");\n        let x;\n        let y;\n        let r2 = 3;\n        if (cxAttr != null) {\n          x = parseFloat(cxAttr);\n          y = parseFloat((_b = dot.getAttribute(\"cy\")) != null ? _b : \"\");\n          r2 = parseFloat((_c = dot.getAttribute(\"r\")) != null ? _c : \"3\") || 3;\n        } else {\n          const wAttr = parseFloat((_d = dot.getAttribute(\"width\")) != null ? _d : \"0\") || 0;\n          const hAttr = parseFloat((_e = dot.getAttribute(\"height\")) != null ? _e : \"0\") || 0;\n          x = parseFloat((_f = dot.getAttribute(\"x\")) != null ? _f : \"\") + wAttr / 2;\n          y = parseFloat((_g = dot.getAttribute(\"y\")) != null ? _g : \"\") + hAttr / 2;\n          r2 = Math.max(wAttr, hAttr) / 2 || 3;\n        }\n        if (!isFinite(x) || !isFinite(y)) return;\n        let list = unitDots.get(i2);\n        if (!list) {\n          list = [];\n          unitDots.set(i2, list);\n        }\n        list.push({ x, y, r: r2, fill: dot.getAttribute(\"fill\") });\n        const box = boxes.get(i2);\n        if (!box) {\n          boxes.set(i2, {\n            minX: x,\n            minY: y,\n            maxX: x,\n            maxY: y,\n            fill: dot.getAttribute(\"fill\")\n          });\n          return;\n        }\n        if (x < box.minX) box.minX = x;\n        if (x > box.maxX) box.maxX = x;\n        if (y < box.minY) box.minY = y;\n        if (y > box.maxY) box.maxY = y;\n      });\n      Array.from(boxes.keys()).sort((a2, b2) => a2 - b2).forEach((i2) => {\n        const b2 = (\n          /** @type {any} */\n          boxes.get(i2)\n        );\n        const pad = 2;\n        const x1 = b2.minX - pad;\n        const y1 = b2.minY - pad;\n        const x2 = b2.maxX + pad;\n        const y2 = b2.maxY + pad;\n        captured.push({\n          realIndex: i2,\n          j: 0,\n          d: `M ${x1} ${y1} L ${x2} ${y1} L ${x2} ${y2} L ${x1} ${y2} Z`,\n          fill: b2.fill\n        });\n      });\n    } else if (fam === \"radial\") {\n      if (fromType === \"radialBar\" || fromType === \"gauge\") {\n        const centerX = this.w.layout.gridWidth / 2;\n        const centerY = Math.min(this.w.layout.gridWidth, this.w.layout.gridHeight) / 2;\n        const rings = baseEl.querySelectorAll(\n          \".apexcharts-radial-series .apexcharts-radialbar-area\"\n        );\n        rings.forEach((p2) => {\n          var _a2;\n          const parent = (\n            /** @type {Element|null} */\n            p2.parentElement\n          );\n          const realIndex = parseInt(\n            (_a2 = parent == null ? void 0 : parent.getAttribute(\"data:realIndex\")) != null ? _a2 : \"0\",\n            10\n          );\n          const rawD = p2.getAttribute(\"d\");\n          if (!rawD) return;\n          const strokeWidth = parseFloat(p2.getAttribute(\"stroke-width\") || \"0\");\n          const d = strokeWidth > 1 ? this._radialArcToFilledSegment(\n            rawD,\n            strokeWidth,\n            centerX,\n            centerY\n          ) || rawD : rawD;\n          captured.push({\n            realIndex,\n            j: 0,\n            d,\n            fill: p2.getAttribute(\"stroke\")\n          });\n        });\n      } else {\n        const slices = baseEl.querySelectorAll(\n          \".apexcharts-pie-series .apexcharts-pie-area\"\n        );\n        slices.forEach(\n          (p2, i2) => {\n            const d = p2.getAttribute(\"d\");\n            if (!d) return;\n            captured.push({\n              realIndex: i2,\n              j: 0,\n              d,\n              fill: p2.getAttribute(\"fill\")\n            });\n          }\n        );\n      }\n    }\n    return { marks: captured, branches, unitDots };\n  }\n  /**\n   * Convert a radialBar's stroked open-arc `d` (\"M x1 y1 A r r 0 large sweep\n   * x2 y2\") into a closed donut-segment polygon whose FILLED rendering\n   * visually matches the original stroked arc — needed because the morph\n   * target (pie/donut/polarArea) renders by fill, not stroke. Returns null\n   * if the input doesn't match the expected M-then-A shape.\n   *\n   * @param {string} rawD\n   * @param {number} strokeWidth\n   * @param {number} centerX\n   * @param {number} centerY\n   * @returns {string | null}\n   */\n  _radialArcToFilledSegment(rawD, strokeWidth, centerX, centerY) {\n    const m2 = rawD.match(\n      /M\\s*(-?[\\d.]+)\\s+(-?[\\d.]+)\\s+A\\s*(-?[\\d.]+)\\s+(?:-?[\\d.]+)\\s+(?:-?[\\d.]+)\\s+(\\d)\\s+(\\d)\\s+(-?[\\d.]+)\\s+(-?[\\d.]+)/\n    );\n    if (!m2) return null;\n    const x1 = parseFloat(m2[1]);\n    const y1 = parseFloat(m2[2]);\n    const r2 = parseFloat(m2[3]);\n    const large = parseInt(m2[4], 10);\n    const sweep = parseInt(m2[5], 10);\n    const x2 = parseFloat(m2[6]);\n    const y2 = parseFloat(m2[7]);\n    if (!isFinite(r2) || r2 <= 0) return null;\n    const half = strokeWidth / 2;\n    const rOuter = r2 + half;\n    const rInner = Math.max(0, r2 - half);\n    const proj = (px, py, newR) => {\n      const dx = px - centerX;\n      const dy = py - centerY;\n      const dist = Math.sqrt(dx * dx + dy * dy);\n      if (dist === 0) return { x: centerX, y: centerY };\n      const k = newR / dist;\n      return { x: centerX + dx * k, y: centerY + dy * k };\n    };\n    const o1 = proj(x1, y1, rOuter);\n    const o2 = proj(x2, y2, rOuter);\n    const i1 = proj(x1, y1, rInner);\n    const i2 = proj(x2, y2, rInner);\n    const sweepBack = sweep ? 0 : 1;\n    return `M ${o1.x} ${o1.y} A ${rOuter} ${rOuter} 0 ${large} ${sweep} ${o2.x} ${o2.y} L ${i2.x} ${i2.y} A ${rInner} ${rInner} 0 ${large} ${sweepBack} ${i1.x} ${i1.y} Z`;\n  }\n  /**\n   * Build a closed donut-segment path for the given polar arc geometry. Used\n   * by Radial.drawArcs when morphing FROM a filled wedge (pie/donut/polarArea)\n   * TO a radialBar arc: the final radialBar is rendered as a stroked open arc,\n   * but during the morph we tween d toward this closed-segment form (which\n   * looks identical to the stroked arc when filled with the same color) so\n   * the in-between frames remain visually consistent filled shapes rather\n   * than a thick-outlined wedge.\n   *\n   * @param {number} centerX\n   * @param {number} centerY\n   * @param {number} ringRadius - centerline radius of the radialBar ring\n   * @param {number} strokeWidth - the ring's stroke thickness\n   * @param {number} startAngleDeg - in degrees, 0° = top (12 o'clock)\n   * @param {number} endAngleDeg\n   * @returns {string}\n   */\n  buildRingSegmentPath(centerX, centerY, ringRadius, strokeWidth, startAngleDeg, endAngleDeg) {\n    const halfStroke = strokeWidth / 2;\n    const rOuter = ringRadius + halfStroke;\n    const rInner = Math.max(0, ringRadius - halfStroke);\n    const sRad = (startAngleDeg - 90) * Math.PI / 180;\n    const eRad = (endAngleDeg - 90) * Math.PI / 180;\n    const oStart = {\n      x: centerX + rOuter * Math.cos(sRad),\n      y: centerY + rOuter * Math.sin(sRad)\n    };\n    const oEnd = {\n      x: centerX + rOuter * Math.cos(eRad),\n      y: centerY + rOuter * Math.sin(eRad)\n    };\n    const iStart = {\n      x: centerX + rInner * Math.cos(sRad),\n      y: centerY + rInner * Math.sin(sRad)\n    };\n    const iEnd = {\n      x: centerX + rInner * Math.cos(eRad),\n      y: centerY + rInner * Math.sin(eRad)\n    };\n    const sweep = endAngleDeg > startAngleDeg ? 1 : 0;\n    const large = Math.abs(endAngleDeg - startAngleDeg) > 180 ? 1 : 0;\n    return `M ${oStart.x} ${oStart.y} A ${rOuter} ${rOuter} 0 ${large} ${sweep} ${oEnd.x} ${oEnd.y} L ${iEnd.x} ${iEnd.y} A ${rInner} ${rInner} 0 ${large} ${1 - sweep} ${iStart.x} ${iStart.y} Z`;\n  }\n  /**\n   * @returns {string | null} the chart-type the active snapshot was captured\n   *   from, or null when no morph is in flight.\n   */\n  getFromType() {\n    return this._snapshot ? this._snapshot.fromType : null;\n  }\n  /**\n   * Build a (targetKey → captured) map. The targetKey matches the lookup\n   * pattern each chart-type renderer uses when it asks\n   * `getInitialPathFor(realIndex, j)`.\n   *\n   * Strategy: flatten the captured items into a linear sequence (matching the\n   * source chart's natural DOM iteration order: series-then-point for bar,\n   * ring-by-ring for radial), then walk the target's iteration positions in\n   * the same order and pair them up 1:1. This handles every supported shape\n   * without per-pair branching:\n   *\n   *   - bar (1 series, N pts) ↔ radial-family (N items)  → linear[k] ↔ k\n   *   - bar (M series, 1 pt)  ↔ radial-family (M items)  → linear[k] ↔ k\n   *   - radial-family (N items) ↔ bar (any matching shape) → linear[k] ↔ flat target\n   *   - radial-family ↔ radial-family                    → linear[k] ↔ k\n   *\n   * @param {Array<{ realIndex: number, j: number, d: string, fill: string|null, key?: string|null }>} captured\n   * @param {string} _fromType\n   * @param {string} toType\n   * @param {any} newSeries - the series array being passed to the new chart;\n   *   used only to derive the bar target's (realIndex, j) iteration positions.\n   * @param {Array<{ key: string, d: string, fill: string|null }>} [branches]\n   *   non-leaf marks, for the key-based partition pairing.\n   */\n  _buildMapping(captured, _fromType, toType, newSeries, branches) {\n    const map = /* @__PURE__ */ new Map();\n    const tf = familyOf(toType);\n    const flat = captured.slice().sort((a2, b2) => a2.realIndex - b2.realIndex || a2.j - b2.j);\n    if (tf === \"partition\" && branches && branches.length) {\n      const keyedMarks = flat.filter((c2) => c2.key);\n      if (keyedMarks.length === flat.length) {\n        keyedMarks.forEach((c2) => {\n          map.set(`key:${c2.key}`, { d: c2.d, fill: c2.fill });\n        });\n        branches.forEach((br) => {\n          map.set(`key:${br.key}`, { d: br.d, fill: br.fill });\n        });\n      }\n    }\n    if (tf === \"radial\" || tf === \"unit\" || tf === \"partition\") {\n      flat.forEach((c2, i2) => {\n        map.set(`${i2}:0`, { d: c2.d, fill: c2.fill });\n      });\n      return map;\n    }\n    if (tf === \"bar\" || tf === \"summary\") {\n      const positions = [];\n      const series = Array.isArray(newSeries) ? newSeries : [];\n      series.forEach((s2, seriesIdx) => {\n        const data = s2 && Array.isArray(s2.data) ? s2.data : [];\n        for (let j = 0; j < data.length; j++) {\n          positions.push({ realIndex: seriesIdx, j });\n        }\n      });\n      flat.forEach((c2, i2) => {\n        const pos = positions[i2];\n        if (pos) {\n          map.set(`${pos.realIndex}:${pos.j}`, { d: c2.d, fill: c2.fill });\n        }\n      });\n      return map;\n    }\n    return map;\n  }\n  isActive() {\n    return this._snapshot !== null;\n  }\n  /**\n   * @param {number|string} realIndex\n   * @param {number|string} j\n   * @returns {string | null}\n   */\n  getInitialPathFor(realIndex, j) {\n    if (!this._snapshot) return null;\n    const entry = this._snapshot.mapping.get(`${realIndex}:${j}`);\n    if (!entry) return null;\n    const dx = this._snapshot.oldLayout.translateX - (this.w.layout.translateX || 0);\n    const dy = this._snapshot.oldLayout.translateY - (this.w.layout.translateY || 0);\n    return dx === 0 && dy === 0 ? entry.d : this._translatePathD(entry.d, dx, dy);\n  }\n  /**\n   * Offset every absolute coordinate in an SVG path `d` by (dx, dy).\n   *\n   * Assumes the path uses only uppercase (absolute) commands — every path\n   * ApexCharts generates does. Relative-command paths would pass through\n   * unchanged at the lowercase, which is also semantically correct (deltas\n   * don't shift under a parent translate).\n   *\n   * @param {string} d\n   * @param {number} dx\n   * @param {number} dy\n   * @returns {string}\n   */\n  _translatePathD(d, dx, dy) {\n    if (dx === 0 && dy === 0) return d;\n    const commands = parsePath(d);\n    return commands.map(\n      /** @param {any[]} c */\n      (c2) => {\n        const cmd = c2[0];\n        if (cmd === \"Z\") return \"Z\";\n        if (cmd === \"M\" || cmd === \"L\" || cmd === \"T\") {\n          return `${cmd} ${c2[1] + dx} ${c2[2] + dy}`;\n        }\n        if (cmd === \"H\") return `${cmd} ${c2[1] + dx}`;\n        if (cmd === \"V\") return `${cmd} ${c2[1] + dy}`;\n        if (cmd === \"C\") {\n          return `${cmd} ${c2[1] + dx} ${c2[2] + dy} ${c2[3] + dx} ${c2[4] + dy} ${c2[5] + dx} ${c2[6] + dy}`;\n        }\n        if (cmd === \"S\" || cmd === \"Q\") {\n          return `${cmd} ${c2[1] + dx} ${c2[2] + dy} ${c2[3] + dx} ${c2[4] + dy}`;\n        }\n        if (cmd === \"A\") {\n          return `${cmd} ${c2[1]} ${c2[2]} ${c2[3]} ${c2[4]} ${c2[5]} ${c2[6] + dx} ${c2[7] + dy}`;\n        }\n        return c2.join(\" \");\n      }\n    ).join(\" \");\n  }\n  /**\n   * The centre point (in the NEW chart's screen space) of the captured shape\n   * for cluster `i`. Kept for callers that only need a point; the unit renderer\n   * uses getInitialBBoxFor so its dots fill the shape rather than stack on a\n   * single point.\n   * @param {number} i\n   * @returns {{ x: number, y: number } | null}\n   */\n  getInitialCenterFor(i2) {\n    const box = this.getInitialBBoxFor(i2);\n    if (!box) return null;\n    return { x: box.x + box.width / 2, y: box.y + box.height / 2 };\n  }\n  /**\n   * The `k`-th captured path in draw order, already shifted into the NEW\n   * chart's coordinate space.\n   *\n   * For marks that pair up by position rather than by a (series, point) grid:\n   * a treemap's tiles and a sunburst's leaves are each one mark per row, laid\n   * out in the same reading order, so the k-th of one becomes the k-th of the\n   * other.\n   *\n   * @param {number} k\n   * @returns {string | null}\n   */\n  getInitialPathAt(k) {\n    return this.getInitialPathFor(k, 0);\n  }\n  /**\n   * The captured shape for a branch identity (charts/common/Hierarchy.morphKey),\n   * or null when the outgoing chart had no mark for that branch.\n   *\n   * This is what lets a partition morph pair at every level: a sector, an\n   * industry and a company each find the arc or tile that stood for the same\n   * branch, instead of leaves pairing by draw order while the containers pop.\n   *\n   * @param {string} key\n   * @returns {string | null}\n   */\n  getInitialPathForKey(key) {\n    if (!this._snapshot || !key) return null;\n    return this.getInitialPathFor(\"key\", key);\n  }\n  /** True when the active snapshot can pair by branch key. */\n  hasKeyedMarks() {\n    if (!this._snapshot) return false;\n    for (const k of this._snapshot.mapping.keys()) {\n      if (typeof k === \"string\" && k.startsWith(\"key:\")) return true;\n    }\n    return false;\n  }\n  /**\n   * Where the `j`-th of `n` objects in cluster `i` starts, INSIDE the shape it\n   * came out of.\n   *\n   * An aggregate mark stands for a quantity, and its extent is that quantity: a\n   * bar of height h representing n units gives its k-th unit the height\n   * fraction (k + 0.5)/n. So a bar does not spray its dots from a single point,\n   * it comes apart along its own length, bottom-up, and each dot leaves from\n   * the part of the bar that was standing for it. The reverse direction reads\n   * the same geometry, so explode and collapse are inverses.\n   *\n   * The distribution follows the captured shape's LONGER axis, which is what\n   * makes one function serve both marks: a bar's box is tall and thin, so the\n   * dots leave in a column; a wedge's box is squat, so they leave in a row\n   * across it.\n   *\n   * @param {number} i - cluster index\n   * @param {number} j - the object's rank within its cluster\n   * @param {number} n - objects in the cluster\n   * @returns {{ x: number, y: number } | null}\n   */\n  getInitialSlotFor(i2, j, n2) {\n    const box = this.getInitialBBoxFor(i2);\n    if (!box) return null;\n    const cx = box.x + box.width / 2;\n    const cy = box.y + box.height / 2;\n    if (!(n2 > 1) || !(j >= 0)) return { x: cx, y: cy };\n    const t2 = (Math.min(j, n2 - 1) + 0.5) / n2;\n    if (box.height >= box.width) {\n      return { x: cx, y: box.y + box.height * (1 - t2) };\n    }\n    return { x: box.x + box.width * t2, y: cy };\n  }\n  /**\n   * The bounding box (in the NEW chart's screen space) of the captured shape\n   * for cluster `i`. `getInitialSlotFor` distributes a cluster's objects across\n   * this box as their start positions, so a tall bar visibly breaks apart into\n   * a tall column of dots that then swarm into the cluster.\n   * @param {number} i\n   * @returns {{ x: number, y: number, width: number, height: number } | null}\n   */\n  getInitialBBoxFor(i2) {\n    if (!this._snapshot) return null;\n    const entry = this._snapshot.mapping.get(`${i2}:0`);\n    if (!entry) return null;\n    const box = this._pathBBox(entry.d);\n    if (!box) return null;\n    const dx = this._snapshot.oldLayout.translateX - (this.w.layout.translateX || 0);\n    const dy = this._snapshot.oldLayout.translateY - (this.w.layout.translateY || 0);\n    return {\n      x: box.minX + dx,\n      y: box.minY + dy,\n      width: box.maxX - box.minX,\n      height: box.maxY - box.minY\n    };\n  }\n  /**\n   * Bounding box of an absolute-command SVG path `d`. Good enough as the burst\n   * footprint (we only need where the shape sat, not exact geometry).\n   * @param {string} d\n   * @returns {{ minX:number, minY:number, maxX:number, maxY:number } | null}\n   */\n  _pathBBox(d) {\n    const commands = parsePath(d);\n    let minX = Infinity;\n    let minY = Infinity;\n    let maxX = -Infinity;\n    let maxY = -Infinity;\n    let seen = false;\n    commands.forEach(\n      /** @param {any[]} c */\n      (c2) => {\n        const cmd = c2[0];\n        if (cmd === \"Z\") return;\n        let pairs = [];\n        if (cmd === \"H\") pairs = [[c2[1], (minY + maxY) / 2 || c2[1]]];\n        else if (cmd === \"V\") pairs = [[(minX + maxX) / 2 || c2[1], c2[1]]];\n        else if (cmd === \"A\") pairs = [[c2[6], c2[7]]];\n        else {\n          for (let k = 1; k + 1 < c2.length; k += 2) pairs.push([c2[k], c2[k + 1]]);\n        }\n        pairs.forEach(([x, y]) => {\n          if (!isFinite(x) || !isFinite(y)) return;\n          seen = true;\n          if (x < minX) minX = x;\n          if (x > maxX) maxX = x;\n          if (y < minY) minY = y;\n          if (y > maxY) maxY = y;\n        });\n      }\n    );\n    if (!seen) return null;\n    return { minX, minY, maxX, maxY };\n  }\n  /**\n   * @param {number} realIndex\n   * @param {number} j\n   * @returns {string | null}\n   */\n  getInitialFillFor(realIndex, j) {\n    if (!this._snapshot) return null;\n    const entry = this._snapshot.mapping.get(`${realIndex}:${j}`);\n    return entry ? entry.fill : null;\n  }\n  /** @returns {number} */\n  getSpeed() {\n    const animCfg = this.w.config.chart.animations;\n    return animCfg.chartTypeMorph && animCfg.chartTypeMorph.speed || animCfg.speed || 600;\n  }\n  /**\n   * Fade newly-mounted axes / grid / legend / titles from opacity 0 → 1 in\n   * parallel with the morph. Without this the chart's chrome would pop in\n   * abruptly while the series elements are still mid-tween, which reads as a\n   * jarring layout shift.\n   */\n  applyChromeFade() {\n    var _a;\n    if (!this._snapshot || !Environment.isBrowser()) return;\n    const baseEl = (_a = this.w.globals.dom) == null ? void 0 : _a.baseEl;\n    if (!baseEl) return;\n    if (this._snapshot.pieceOut) this._separatePieces();\n    else if (this._snapshot.pieceIn) this._combinePieces();\n    else this._mountGhost();\n    const speed = this.getSpeed();\n    const chromeSelectors = [\n      \".apexcharts-xaxis\",\n      \".apexcharts-yaxis\",\n      \".apexcharts-grid\",\n      \".apexcharts-gridlines-horizontal\",\n      \".apexcharts-gridlines-vertical\",\n      \".apexcharts-legend\",\n      \".apexcharts-title-text\",\n      \".apexcharts-subtitle-text\"\n    ];\n    chromeSelectors.forEach((sel) => {\n      baseEl.querySelectorAll(sel).forEach((el) => {\n        if (!el.style) return;\n        el.style.opacity = \"0\";\n        el.style.transition = `opacity ${speed}ms ease-out`;\n        BrowserAPIs.requestAnimationFrame(() => {\n          el.style.opacity = \"1\";\n        });\n        setTimeout(() => {\n          el.style.transition = \"\";\n          el.style.opacity = \"\";\n        }, speed + 80);\n      });\n    });\n    setTimeout(() => this.cleanup(), speed + 100);\n  }\n  cleanup() {\n    this._snapshot = null;\n    this._removeGhost();\n    this._cancelPieces();\n  }\n}\nApexCharts.registerFeatures({ morphTypeChange: MorphTypeChange });\nconst XHTML$2 = \"http://www.w3.org/1999/xhtml\";\nclass Breadcrumb {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   * @param {import('./Drilldown').default} drilldown\n   */\n  constructor(w2, ctx, drilldown) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.drilldown = drilldown;\n  }\n  /**\n   * @param {Array<string|number>} path - ['root', id, id, ...]\n   */\n  render(path) {\n    if (!Environment.isBrowser()) return;\n    const w2 = this.w;\n    const elWrap = w2.dom.elWrap;\n    if (!elWrap) return;\n    const existing = elWrap.querySelector(\".apexcharts-breadcrumb\");\n    if (existing && existing.parentNode) {\n      existing.parentNode.removeChild(existing);\n    }\n    const cfg = w2.config.drilldown && w2.config.drilldown.breadcrumb;\n    if (!cfg || cfg.show === false) return;\n    if (this.drilldown.depth === 0) return;\n    const nav = BrowserAPIs.createElementNS(XHTML$2, \"nav\");\n    nav.setAttribute(\"class\", \"apexcharts-breadcrumb\");\n    nav.setAttribute(\"aria-label\", \"Drilldown breadcrumb\");\n    this._position(nav, cfg);\n    const separator = cfg.separator != null ? cfg.separator : \" / \";\n    path.forEach((id, i2) => {\n      if (i2 > 0) {\n        const sep = BrowserAPIs.createElementNS(XHTML$2, \"span\");\n        sep.setAttribute(\"class\", \"apexcharts-breadcrumb-separator\");\n        sep.setAttribute(\"aria-hidden\", \"true\");\n        sep.textContent = separator;\n        nav.appendChild(sep);\n      }\n      const label = this._label(id, i2);\n      const isCurrent = i2 === path.length - 1;\n      if (isCurrent) {\n        const cur = BrowserAPIs.createElementNS(XHTML$2, \"span\");\n        cur.setAttribute(\n          \"class\",\n          \"apexcharts-breadcrumb-item apexcharts-breadcrumb-current\"\n        );\n        cur.setAttribute(\"aria-current\", \"page\");\n        cur.textContent = label;\n        nav.appendChild(cur);\n      } else {\n        const btn = (\n          /** @type {HTMLButtonElement} */\n          BrowserAPIs.createElementNS(XHTML$2, \"button\")\n        );\n        btn.setAttribute(\"type\", \"button\");\n        btn.setAttribute(\"class\", \"apexcharts-breadcrumb-item\");\n        if (i2 === 0) {\n          const arrow = BrowserAPIs.createElementNS(XHTML$2, \"span\");\n          arrow.setAttribute(\"class\", \"apexcharts-breadcrumb-arrow\");\n          arrow.setAttribute(\"aria-hidden\", \"true\");\n          arrow.textContent = \"←\";\n          btn.appendChild(arrow);\n        }\n        const text = BrowserAPIs.createElementNS(XHTML$2, \"span\");\n        text.setAttribute(\"class\", \"apexcharts-breadcrumb-label\");\n        text.textContent = label;\n        btn.appendChild(text);\n        btn.addEventListener(\"click\", () => this.drilldown.drillToLevel(i2));\n        nav.appendChild(btn);\n      }\n    });\n    elWrap.appendChild(nav);\n    if (this.w.globals.axisCharts) {\n      placeInReservedBand(this.w, this.ctx, nav, cfg);\n    }\n    this._avoidChromeOverlap(nav);\n  }\n  /**\n   * The breadcrumb is an absolute overlay, so at its default top-left it can\n   * sit on top of a left-aligned title (or subtitle). After mounting, push it\n   * below any chart chrome it intersects. (Sunburst's self-contained\n   * breadcrumb applies the same rule.)\n   * @param {HTMLElement} nav\n   */\n  _avoidChromeOverlap(nav) {\n    const w2 = this.w;\n    const chrome = (\n      /** @type {Element[]} */\n      [\".apexcharts-title-text\", \".apexcharts-subtitle-text\"].map((s2) => w2.dom.baseEl.querySelector(s2)).filter((el) => el !== null)\n    );\n    if (!chrome.length) return;\n    const wrapTop = w2.dom.elWrap.getBoundingClientRect().top;\n    for (let pass = 0; pass < chrome.length + 1; pass++) {\n      const nr = nav.getBoundingClientRect();\n      const hit = chrome.find((el) => {\n        const r2 = el.getBoundingClientRect();\n        return nr.left < r2.right && nr.right > r2.left && nr.top < r2.bottom && nr.bottom > r2.top;\n      });\n      if (!hit) break;\n      nav.style.top = `${hit.getBoundingClientRect().bottom - wrapTop + 4}px`;\n    }\n  }\n  /**\n   * @param {string|number} id\n   * @param {number} index\n   * @returns {string}\n   */\n  _label(id, index) {\n    const cfg = this.w.config.drilldown.breadcrumb;\n    let label;\n    if (index === 0) {\n      label = cfg.rootLabel != null ? cfg.rootLabel : \"All\";\n    } else {\n      const list = (this.w.config.drilldown.series || []).find(\n        (s2) => s2 && s2.id === id\n      );\n      label = list && list.name || String(id);\n    }\n    if (typeof cfg.formatter === \"function\") {\n      return cfg.formatter(label, { index, depth: this.drilldown.depth });\n    }\n    return label;\n  }\n  /**\n   * @param {HTMLElement} nav\n   * @param {Record<string, any>} cfg\n   */\n  _position(nav, cfg) {\n    const ox = cfg.offsetX || 0;\n    const oy = cfg.offsetY || 0;\n    nav.style.position = \"absolute\";\n    nav.style.top = oy + \"px\";\n    if (cfg.position === \"top-right\") {\n      nav.style.right = -ox + 3 + \"px\";\n    } else {\n      nav.style.left = ox + \"px\";\n    }\n  }\n}\nconst XHTML$1 = \"http://www.w3.org/1999/xhtml\";\nconst CLASS = \"apexcharts-drilldown-loading\";\nclass DrilldownLoading {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n    this.el = null;\n  }\n  /** @returns {any} the drilldown.loading config, normalised. */\n  _cfg() {\n    const d = this.w.config.drilldown;\n    const l2 = d && d.loading;\n    if (l2 === false) return { show: false };\n    return l2 || {};\n  }\n  /**\n   * Mount the overlay. No-op when disabled, outside a browser, or already up.\n   */\n  show() {\n    if (!Environment.isBrowser()) return;\n    const cfg = this._cfg();\n    if (cfg.show === false) return;\n    const elWrap = this.w.dom.elWrap;\n    if (!elWrap) return;\n    this.hide();\n    const box = BrowserAPIs.createElementNS(XHTML$1, \"div\");\n    box.setAttribute(\"class\", CLASS);\n    box.setAttribute(\"role\", \"status\");\n    box.setAttribute(\"aria-live\", \"polite\");\n    box.setAttribute(\"aria-label\", cfg.text || \"Loading\");\n    const spinner = BrowserAPIs.createElementNS(XHTML$1, \"div\");\n    spinner.setAttribute(\"class\", `${CLASS}-spinner`);\n    spinner.setAttribute(\"aria-hidden\", \"true\");\n    box.appendChild(spinner);\n    if (cfg.text) {\n      const label = BrowserAPIs.createElementNS(XHTML$1, \"span\");\n      label.setAttribute(\"class\", `${CLASS}-text`);\n      label.textContent = cfg.text;\n      box.appendChild(label);\n    }\n    elWrap.appendChild(box);\n    this.el = box;\n  }\n  /** Remove the overlay. Safe to call when it is not mounted. */\n  hide() {\n    const elWrap = this.w.dom.elWrap;\n    if (elWrap) {\n      const nodes = elWrap.querySelectorAll(`.${CLASS}`);\n      for (let i2 = 0; i2 < nodes.length; i2++) {\n        const n2 = nodes[i2];\n        if (n2.parentNode) n2.parentNode.removeChild(n2);\n      }\n    } else if (this.el && this.el.parentNode) {\n      this.el.parentNode.removeChild(this.el);\n    }\n    this.el = null;\n  }\n}\nconst MAX_DEPTH = 32;\nconst DRILL_MARKER = \"__apexDrilldownMarker\";\nclass Drilldown {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.stack = [];\n    this.rootSnapshot = null;\n    this._wired = false;\n    this._asyncCache = /* @__PURE__ */ new Map();\n    this._pending = null;\n    this._warnedUnreachable = false;\n    this._warnedNoSliceOffset = false;\n    this.breadcrumb = new Breadcrumb(w2, ctx, this);\n    this.loading = new DrilldownLoading(w2);\n    this._onPointSelect = this._onPointSelect.bind(this);\n    this._afterRender = this._afterRender.bind(this);\n    this._onPlotDown = this._onPlotDown.bind(this);\n    this._onPlotClick = this._onPlotClick.bind(this);\n    this._downAt = null;\n    this._plotClickWired = null;\n    this.init();\n  }\n  init() {\n    const w2 = this.w;\n    if (!w2.config.drilldown || !w2.config.drilldown.enabled) return;\n    if (this._wired) return;\n    this._wired = true;\n    this.ctx.addEventListener(\"dataPointSelection\", this._onPointSelect);\n    this.ctx.addEventListener(\"mounted\", this._afterRender);\n    this.ctx.addEventListener(\"updated\", this._afterRender);\n    if (w2.config.markers) {\n      w2.config.markers.discrete = this._drillMarkers(w2.config.series);\n    }\n  }\n  // ─── Observable state ──────────────────────────────────────────────────────\n  /** @returns {Array<string|number>} e.g. ['root', '2024-quarters'] */\n  get path() {\n    return [\"root\", ...this.stack.map((f) => f.id)];\n  }\n  /** @returns {number} 0 at root */\n  get depth() {\n    return this.stack.length;\n  }\n  // ─── Navigation API ────────────────────────────────────────────────────────\n  /**\n   * Drill into the child level with the given id.\n   * @param {string|number} id\n   * @param {any} [triggerPoint] - the clicked data point (for events / async ctx)\n   * @param {{ seriesIndex?: number, dataPointIndex?: number }} [meta]\n   * @returns {Promise<any>}\n   */\n  drillDown(id, triggerPoint, meta) {\n    const child = this._resolveChild(id);\n    if (child) return this._drillInto(child, triggerPoint, meta);\n    if (typeof this.w.config.drilldown.onDrillDown === \"function\") {\n      return this._drillDownAsync(id, triggerPoint, meta);\n    }\n    console.warn(\n      `ApexCharts: drilldown id \"${id}\" not found in chart.drilldown.series, and no onDrillDown resolver is set.`\n    );\n    return Promise.resolve(this.ctx);\n  }\n  /**\n   * Navigate back one level.\n   * @returns {Promise<any>}\n   */\n  drillUp() {\n    return this.drillToLevel(this.stack.length - 1);\n  }\n  /**\n   * Navigate back to the root view.\n   * @returns {Promise<any>}\n   */\n  drillToRoot() {\n    return this.drillToLevel(0);\n  }\n  /**\n   * Navigate to an arbitrary depth (0 = root). Used by breadcrumb clicks.\n   * @param {number} targetDepth\n   * @returns {Promise<any>}\n   */\n  drillToLevel(targetDepth) {\n    const cur = this.stack.length;\n    if (targetDepth < 0 || targetDepth >= cur) return Promise.resolve(this.ctx);\n    const from = this.path[this.path.length - 1];\n    const restore = targetDepth === 0 ? this.rootSnapshot : this.stack[targetDepth].restore;\n    this.stack = this.stack.slice(0, targetDepth);\n    const to = this.path[this.path.length - 1];\n    return this._apply(this._viewFromSnapshot(restore), \"up\", { from, to });\n  }\n  // ─── Internals ─────────────────────────────────────────────────────────────\n  /**\n   * @param {string|number} id\n   * @returns {any|null}\n   */\n  _resolveChild(id) {\n    const list = this.w.config.drilldown && this.w.config.drilldown.series;\n    if (!Array.isArray(list)) return null;\n    return list.find((s2) => s2 && s2.id === id) || null;\n  }\n  /**\n   * @param {any} child\n   * @param {any} [triggerPoint]\n   * @param {{ seriesIndex?: number, dataPointIndex?: number }} [meta]\n   * @returns {Promise<any>}\n   */\n  _drillInto(child, triggerPoint, meta) {\n    if (this.stack.length >= MAX_DEPTH) {\n      console.warn(`ApexCharts: drilldown max depth (${MAX_DEPTH}) reached.`);\n      return Promise.resolve(this.ctx);\n    }\n    if (!this.rootSnapshot) this.rootSnapshot = this._snapshot();\n    const from = this.path[this.path.length - 1];\n    this.stack.push({ id: child.id, name: child.name, restore: this._snapshot() });\n    return this._apply(this._viewFromChild(child), \"down\", {\n      from,\n      to: child.id,\n      point: triggerPoint,\n      seriesIndex: meta && meta.seriesIndex,\n      dataPointIndex: meta && meta.dataPointIndex\n    });\n  }\n  /**\n   * Resolve a level through `onDrillDown` and drill into it.\n   *\n   * Failure never changes state: on a throw, a rejection, or a resolver that\n   * hands back something undrillable, the chart stays exactly where it was and\n   * `drillDownError` fires. That is what makes this usable against a real\n   * backend, where a fetch failing is ordinary rather than exceptional.\n   *\n   * @param {string|number|null} id\n   * @param {any} point\n   * @param {{ seriesIndex?: number, dataPointIndex?: number }} [meta]\n   * @returns {Promise<any>}\n   */\n  _drillDownAsync(id, point, meta) {\n    const cfg = this.w.config.drilldown;\n    const fn = cfg.onDrillDown;\n    const cached = this._cacheGet(id);\n    if (cached) return this._drillInto(cached, point, meta);\n    if (this._pending) return this._pending;\n    let result;\n    this.loading.show();\n    try {\n      result = fn({\n        // `id` was missing here, so a resolver could not tell WHICH level was\n        // asked for without re-deriving it from the point. It is the first\n        // thing a real implementation needs (`fetch('/levels/' + id)`).\n        id,\n        point,\n        seriesIndex: meta && meta.seriesIndex,\n        dataPointIndex: meta && meta.dataPointIndex\n      });\n    } catch (error) {\n      this.loading.hide();\n      this._fire(\"drillDownError\", { id, error });\n      return Promise.resolve(this.ctx);\n    }\n    const settle = () => {\n      this._pending = null;\n      this.loading.hide();\n    };\n    const p2 = Promise.resolve(result).then(\n      (child) => {\n        settle();\n        if (this._isDead()) return this.ctx;\n        if (!child || !child.data) {\n          this._fire(\"drillDownError\", {\n            id,\n            error: new Error(\n              `drilldown: onDrillDown resolved without a drillable level for id \"${id}\" (expected an object with a \\`data\\` array).`\n            )\n          });\n          return this.ctx;\n        }\n        const level = child.id != null ? child : __spreadProps(__spreadValues({}, child), { id });\n        this._cacheSet(id, level);\n        return this._drillInto(level, point, meta);\n      },\n      (error) => {\n        settle();\n        if (this._isDead()) return this.ctx;\n        this._fire(\"drillDownError\", { id, error });\n        return this.ctx;\n      }\n    );\n    this._pending = p2;\n    return p2;\n  }\n  /**\n   * Whether the chart was torn down while a resolver was in flight.\n   *\n   * Clicking to drill and then navigating away is ordinary, not exceptional: a\n   * component unmounts, `destroy()` runs, and the fetch settles afterwards.\n   * Without this the resolved level would be applied to a destroyed chart,\n   * which throws out of `updateOptions` and surfaces in the host app as an\n   * unhandled rejection from a click the user has already forgotten about.\n   *\n   * @returns {boolean}\n   */\n  _isDead() {\n    const w2 = this.w;\n    return !w2 || !w2.globals || w2.globals.isDestroyed === true;\n  }\n  /** @returns {boolean} whether resolved async levels are cached. */\n  _cacheEnabled() {\n    const cfg = this.w.config.drilldown;\n    return !!(cfg && cfg.cache !== false);\n  }\n  /**\n   * @param {string|number|null} id\n   * @returns {any|null}\n   */\n  _cacheGet(id) {\n    if (!this._cacheEnabled() || id == null) return null;\n    return this._asyncCache.get(id) || null;\n  }\n  /**\n   * @param {string|number|null} id\n   * @param {any} level\n   */\n  _cacheSet(id, level) {\n    if (!this._cacheEnabled() || id == null) return;\n    this._asyncCache.set(id, level);\n  }\n  /**\n   * Drop cached async levels, so the next drill re-runs `onDrillDown`. Call it\n   * when the underlying data changes behind a chart that has already drilled.\n   * @param {string|number} [id] a single level, or every level when omitted\n   * @returns {any} the chart, for chaining\n   */\n  clearCache(id) {\n    if (id == null) this._asyncCache.clear();\n    else this._asyncCache.delete(id);\n    return this.ctx;\n  }\n  /**\n   * Capture the overridable surface of the current view so it can be restored.\n   * Only fields that some drilldown.series entry can change are cloned; series\n   * and chart.type/stacked are always captured.\n   * @returns {object}\n   */\n  _snapshot() {\n    const c2 = this.w.config;\n    const fields = this._overrideFields();\n    const snap = { series: this._uncollapseSeries(Utils$1.clone(c2.series)) };\n    if (Array.isArray(c2.labels) && c2.labels.length) {\n      snap.labels = Utils$1.clone(c2.labels);\n    }\n    snap.chart = { type: c2.chart.type, stacked: c2.chart.stacked };\n    if (fields.has(\"xaxis\")) snap.xaxis = Utils$1.clone(c2.xaxis);\n    if (fields.has(\"yaxis\")) snap.yaxis = Utils$1.clone(c2.yaxis);\n    if (fields.has(\"colors\")) snap.colors = c2.colors ? Utils$1.clone(c2.colors) : void 0;\n    if (fields.has(\"plotOptions\")) snap.plotOptions = Utils$1.clone(c2.plotOptions);\n    if (fields.has(\"fill\")) snap.fill = Utils$1.clone(c2.fill);\n    if (fields.has(\"legend\")) snap.legend = Utils$1.clone(c2.legend);\n    return snap;\n  }\n  /**\n   * Restore any legend-collapsed slices/series to their original values in a\n   * cloned series array, so a drill snapshot captures the pre-collapse data.\n   * Mirrors legend Helpers' collapse addressing: object-form pie/donut packs\n   * every slice as a data point inside `series[0].data`; numeric pie stores a\n   * slice per top-level element; axis series carry a `data` array. No-op when\n   * nothing is collapsed.\n   * @param {any[]} series\n   * @returns {any[]}\n   */\n  _uncollapseSeries(series) {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const entries = [\n      ...gl.collapsedSeries || [],\n      ...gl.ancillaryCollapsedSeries || []\n    ];\n    if (!entries.length) return series;\n    const type = w2.config.chart.type;\n    const objectFormPie = (type === \"pie\" || type === \"donut\" || type === \"polarArea\") && series.length === 1 && series[0] && typeof series[0] === \"object\" && Array.isArray(series[0].data);\n    const container = objectFormPie ? series[0].data : series;\n    for (const entry of entries) {\n      const i2 = entry.index;\n      if (gl.axisCharts) {\n        if (series[i2]) {\n          series[i2].data = Array.isArray(entry.data) ? entry.data.slice() : entry.data;\n        }\n      } else if (container[i2] && typeof container[i2] === \"object\") {\n        container[i2].y = entry.data;\n      } else if (container[i2] !== void 0) {\n        container[i2] = entry.data;\n      }\n    }\n    return series;\n  }\n  /**\n   * Union of overridable fields across all declared drilldown levels. Ensures a\n   * deep drillToRoot restores everything any intermediate level may have changed.\n   * @returns {Set<string>}\n   */\n  _overrideFields() {\n    const fields = /* @__PURE__ */ new Set();\n    const list = this.w.config.drilldown && this.w.config.drilldown.series || [];\n    for (const s2 of list) {\n      if (!s2) continue;\n      if (s2.xaxis) fields.add(\"xaxis\");\n      if (s2.yaxis) fields.add(\"yaxis\");\n      if (s2.colors) fields.add(\"colors\");\n      if (s2.plotOptions) fields.add(\"plotOptions\");\n      if (s2.fill) fields.add(\"fill\");\n      if (s2.legend) fields.add(\"legend\");\n    }\n    return fields;\n  }\n  /**\n   * Copy the optional view fields shared by a drilldown child level and a\n   * restore snapshot (`xaxis`, `yaxis`, `colors`, `plotOptions`, `fill`,\n   * `legend`) from `src` onto `view`, only when present.\n   * @param {Record<string, any>} view @param {Record<string, any>} src\n   */\n  _copyOptionalViewFields(view, src) {\n    if (src.xaxis) view.xaxis = src.xaxis;\n    if (src.yaxis) view.yaxis = src.yaxis;\n    if (src.colors) view.colors = src.colors;\n    if (src.plotOptions) view.plotOptions = src.plotOptions;\n    if (src.fill) view.fill = src.fill;\n    if (src.legend) view.legend = src.legend;\n  }\n  /**\n   * Build an updateOptions/updateSeries payload for drilling INTO a child level.\n   * Works for axis charts and pie/donut alike: both accept series objects with a\n   * `data` array of `{ x, y }` points (pie derives slice labels from `x`).\n   * @param {any} child\n   * @returns {Record<string, any>}\n   */\n  _viewFromChild(child) {\n    const view = {};\n    if (Array.isArray(child.series)) {\n      view.series = child.series;\n    } else {\n      view.series = [{ name: child.name || \"\", data: child.data }];\n    }\n    const chart = {};\n    if (child.chart && child.chart.type) chart.type = child.chart.type;\n    if (child.chart && child.chart.stacked != null) chart.stacked = child.chart.stacked;\n    if (Object.keys(chart).length) view.chart = chart;\n    this._copyOptionalViewFields(view, child);\n    return view;\n  }\n  /**\n   * Build an updateOptions payload from a restore-snapshot.\n   * @param {Record<string, any>} snap\n   * @returns {Record<string, any>}\n   */\n  _viewFromSnapshot(snap) {\n    const view = { series: snap.series, chart: snap.chart };\n    if (snap.labels && snap.labels.length) view.labels = snap.labels;\n    this._copyOptionalViewFields(view, snap);\n    return view;\n  }\n  /**\n   * Apply a view by delegating to the right update path, firing drill events\n   * around it.\n   * @param {Record<string, any>} view\n   * @param {'down'|'up'} direction\n   * @param {object} meta\n   * @returns {Promise<any>}\n   */\n  _apply(view, direction, meta) {\n    const w2 = this.w;\n    w2.interact.selectedDataPoints = [];\n    w2.globals.collapsedSeries = [];\n    w2.globals.collapsedSeriesIndices = [];\n    w2.globals.ancillaryCollapsedSeries = [];\n    w2.globals.ancillaryCollapsedSeriesIndices = [];\n    w2.globals.allSeriesCollapsed = false;\n    w2.globals.risingSeries = [];\n    view.markers = __spreadProps(__spreadValues({}, view.markers || {}), {\n      discrete: this._drillMarkers(view.series)\n    });\n    const animate = (!w2.config.drilldown.animation || w2.config.drilldown.animation.enabled !== false) && w2.config.chart.animations.enabled !== false;\n    if (direction === \"down\") this._fire(\"drillDownStart\", meta);\n    const runUpdate = (anim) => this.ctx.updateOptions(view, false, anim, false, false);\n    const done = () => {\n      this._fire(direction === \"down\" ? \"drillDownEnd\" : \"drillUp\", meta);\n      return this.ctx;\n    };\n    if (animate && this._zoomEnabled()) {\n      const origin = this._triggerOrigin(meta);\n      if (origin) {\n        return this._zoomDrill(origin, direction, () => runUpdate(false)).then(done);\n      }\n    }\n    return runUpdate(animate).then(done);\n  }\n  /** @returns {boolean} whether trigger-point zoom is configured on. */\n  _zoomEnabled() {\n    const a2 = this.w.config.drilldown && this.w.config.drilldown.animation;\n    return !!(a2 && a2.zoomFromPoint);\n  }\n  /** @returns {SVGSVGElement|null} the chart's root <svg> node, if present. */\n  _svgNode() {\n    const paper = this.w.dom && this.w.dom.Paper;\n    return paper && paper.node ? paper.node : null;\n  }\n  /**\n   * The group wrapping ONLY the data marks (bars/cells/tiles) — not the axes,\n   * grid, or titles. Animating this keeps the chart frame still while the marks\n   * move. Covers bar/line/area (`.apexcharts-plot-series`), heatmap, and treemap.\n   * @returns {SVGElement|null}\n   */\n  _markGroup() {\n    const svg = this._svgNode();\n    if (!svg || typeof svg.querySelector !== \"function\") return null;\n    return svg.querySelector(\n      \".apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap\"\n    );\n  }\n  /**\n   * Centre of the clicked point in the SVG's view-box pixel space, used as the\n   * transform-origin for the mark-group scale (which uses `transform-box:\n   * view-box`, so the origin is resolved in SVG coordinates and stays stable\n   * across the parent and child renders). Falls back to the mark group's centre\n   * when there is no trigger point (e.g. drillUp / imperative drill). Returns\n   * null when the marks / SVG / WAAPI are unavailable (SSR / old browsers).\n   * @param {object} meta\n   * @returns {{ x: number, y: number }|null}\n   */\n  _triggerOrigin(meta) {\n    if (!Environment.isBrowser()) return null;\n    const svg = this._svgNode();\n    const group = this._markGroup();\n    if (!svg || !group || typeof group.animate !== \"function\" || typeof svg.getBoundingClientRect !== \"function\") {\n      return null;\n    }\n    const svgRect = svg.getBoundingClientRect();\n    let el = null;\n    if (meta && meta.seriesIndex != null && meta.dataPointIndex != null && this.w.dom.baseEl) {\n      el = this.w.dom.baseEl.querySelector(\n        `[index=\"${meta.seriesIndex}\"][j=\"${meta.dataPointIndex}\"]`\n      );\n    }\n    if (el && typeof el.getBoundingClientRect === \"function\") {\n      const r2 = el.getBoundingClientRect();\n      return {\n        x: r2.left + r2.width / 2 - svgRect.left,\n        y: r2.top + r2.height / 2 - svgRect.top\n      };\n    }\n    const gRect = group.getBoundingClientRect();\n    return {\n      x: gRect.left + gRect.width / 2 - svgRect.left,\n      y: gRect.top + gRect.height / 2 - svgRect.top\n    };\n  }\n  /**\n   * Run the \"expand from the clicked point\" choreography around an instant\n   * (un-animated) update. Only the data-mark group is animated — the axes, grid,\n   * and titles stay fixed, so the effect doesn't drag the whole chart frame. The\n   * current marks fade out near-in-place (a quick fade, not a balloon), the child\n   * renders invisibly underneath, then the child marks unfold outward from the\n   * clicked point: a horizontal-biased scale anchored there, so the bars read as\n   * emerging from the column you clicked. Drilling up has no trigger column, so\n   * it settles gently from the marks' centre.\n   *\n   * `transform-box: view-box` resolves the origin in SVG coordinates, so the same\n   * origin applies cleanly to the parent and the freshly-rendered child group.\n   * @param {{ x: number, y: number }} origin\n   * @param {'down'|'up'} direction\n   * @param {() => Promise<any>} runUpdate\n   * @returns {Promise<void>}\n   */\n  _zoomDrill(origin, direction, runUpdate) {\n    return __async(this, null, function* () {\n      const dur = this._zoomDuration();\n      const down = direction === \"down\";\n      const outDur = Math.round(dur * 0.55);\n      const outTo = down ? \"scale(1.03)\" : \"scale(0.97)\";\n      const inFrom = down ? \"scaleX(0.55) scaleY(0.85)\" : \"scale(1.04)\";\n      const anchor = (el) => {\n        el.style.transformBox = \"view-box\";\n        el.style.transformOrigin = `${origin.x}px ${origin.y}px`;\n      };\n      const clear = (el) => {\n        el.style.transform = \"\";\n        el.style.opacity = \"\";\n        el.style.transformOrigin = \"\";\n        el.style.transformBox = \"\";\n      };\n      const outGroup = this._markGroup();\n      let outAnim = null;\n      if (outGroup) {\n        anchor(outGroup);\n        outAnim = outGroup.animate(\n          [\n            { transform: \"scale(1)\", opacity: 1 },\n            { transform: outTo, opacity: 0 }\n          ],\n          { duration: outDur, easing: \"ease-in\", fill: \"forwards\" }\n        );\n        try {\n          yield outAnim.finished;\n        } catch (e2) {\n        }\n      }\n      yield runUpdate();\n      const inGroup = this._markGroup();\n      if (inGroup) {\n        anchor(inGroup);\n        inGroup.style.opacity = \"0\";\n        inGroup.style.transform = inFrom;\n        if (outAnim && outGroup === inGroup) outAnim.cancel();\n        const inAnim = inGroup.animate(\n          [\n            { transform: inFrom, opacity: 0 },\n            { transform: \"scale(1)\", opacity: 1 }\n          ],\n          // Decelerating ease so the unfold settles softly into place.\n          { duration: dur, easing: \"cubic-bezier(0.16, 1, 0.3, 1)\", fill: \"forwards\" }\n        );\n        try {\n          yield inAnim.finished;\n        } catch (e2) {\n        }\n        clear(inGroup);\n        inAnim.cancel();\n      }\n    });\n  }\n  /** @returns {number} per-phase zoom duration in ms. */\n  _zoomDuration() {\n    const a2 = this.w.config.drilldown && this.w.config.drilldown.animation;\n    const speed = a2 && typeof a2.speed === \"number\" ? a2.speed : 260;\n    return Math.max(80, speed);\n  }\n  /**\n   * Fire a drill event through both the config callback and the listener registry.\n   * @param {string} name\n   * @param {object} payload\n   */\n  _fire(name2, payload) {\n    const cb = this.w.config.chart.events && this.w.config.chart.events[name2];\n    if (typeof cb === \"function\") cb(payload, this.ctx, this.w);\n    this.ctx.events.fireEvent(name2, [payload, this.ctx, this.w]);\n  }\n  // ─── Click + post-render hooks ───────────────────────────────────────────────\n  /**\n   * @param {Event} _event\n   * @param {any} _ctx\n   * @param {{ seriesIndex?: number, dataPointIndex?: number }} opts\n   */\n  _onPointSelect(_event, _ctx, opts) {\n    if (!opts) return void 0;\n    const point = this._pointAt(opts.seriesIndex, opts.dataPointIndex);\n    if (point && typeof point === \"object\" && point.drilldown != null) {\n      return this.drillDown(point.drilldown, point, opts);\n    }\n    if (typeof this.w.config.drilldown.onDrillDown === \"function\") {\n      return this._drillDownAsync(null, point, opts);\n    }\n    return void 0;\n  }\n  /**\n   * @param {number|undefined} seriesIndex\n   * @param {number|undefined} dataPointIndex\n   * @returns {any|null}\n   */\n  _pointAt(seriesIndex, dataPointIndex) {\n    const series = this.w.config.series;\n    if (!Array.isArray(series) || seriesIndex == null || dataPointIndex == null) {\n      return null;\n    }\n    const s2 = series[seriesIndex];\n    if (!s2 || !Array.isArray(s2.data)) return null;\n    return s2.data[dataPointIndex] != null ? s2.data[dataPointIndex] : null;\n  }\n  _afterRender() {\n    const w2 = this.w;\n    if (!w2.config.drilldown || !w2.config.drilldown.enabled) return;\n    this._markDrillableTargets();\n    this._wirePlotClick();\n    this.breadcrumb.render(this.path);\n    if (w2.config.markers) {\n      w2.config.markers.discrete = this._drillMarkers(w2.config.series);\n    }\n  }\n  /**\n   * Mark every point that carries a `drilldown` field as an openable target.\n   *\n   * Two things have to be true for a point to be drillable, and on line/area\n   * neither holds by default. It needs a mark to click (with `markers.size: 0`\n   * there is no element at all), and that mark has to accept the click: core\n   * gives line/area markers `no-pointer-events` so the shared tooltip can track\n   * the whole plot, which silently swallows it. `_drillMarkers()` supplies the\n   * missing dots; this re-enables pointer events on them.\n   *\n   * The cursor class only goes on marks that can actually take the click, so we\n   * never promise an interaction that cannot happen.\n   */\n  _markDrillableTargets() {\n    if (!Environment.isBrowser()) return;\n    const w2 = this.w;\n    const baseEl = w2.dom.baseEl;\n    const series = w2.config.series;\n    if (!baseEl || !Array.isArray(series)) return;\n    let unreachable = 0;\n    series.forEach((s2, i2) => {\n      const data = s2 && Array.isArray(s2.data) ? s2.data : null;\n      if (!data) return;\n      data.forEach((point, j) => {\n        if (!point || typeof point !== \"object\" || point.drilldown == null) return;\n        const nodes = baseEl.querySelectorAll(`[index=\"${i2}\"][j=\"${j}\"]`);\n        if (!nodes.length) unreachable++;\n        nodes.forEach((node) => {\n          if (this._isClickThroughMark(node)) {\n            node.classList.remove(\"no-pointer-events\");\n          }\n          node.classList.add(\"apexcharts-drilldown-target\");\n        });\n      });\n    });\n    if (unreachable && !this._warnedUnreachable) {\n      this._warnedUnreachable = true;\n      console.warn(\n        `ApexCharts: ${unreachable} drillable point(s) have no clickable mark, so clicking them cannot do anything. Leave \\`drilldown.marker\\` on, or give the series markers of its own (\\`markers.size > 0\\`).`\n      );\n    }\n  }\n  /**\n   * Called by Pie when it declines to wire the slice pull-out because this\n   * chart drills. Warned once per chart (a drill re-renders, and the same\n   * notice on every navigation is just noise), and from here rather than from\n   * Pie because this module is the reason it is unavailable.\n   */\n  warnSliceOffsetDisabled() {\n    if (this._warnedNoSliceOffset) return;\n    this._warnedNoSliceOffset = true;\n    console.warn(\n      \"ApexCharts: `plotOptions.pie.expandOnClick` is not available in a drilldown pie/donut, so it was ignored. A slice click navigates, and a slice that slid out would be discarded by the drill it just triggered.\"\n    );\n  }\n  /**\n   * Make the whole band a drillable point owns clickable, not just its dot.\n   *\n   * A dot is ~6px across, so hitting it takes pixel-precise aim, it is far under\n   * the ~44px a finger needs, and the tooltip's arrow points AT the point by\n   * design, which puts a triangle over the very thing you are aiming at. Rather\n   * than move the tooltip, widen the target: a click anywhere in the plot drills\n   * whichever point the tooltip is currently reading. The hit area then matches\n   * the feedback already on screen, so \"the tooltip says 2024, I click, I get\n   * 2024\" holds, and the dot goes back to being an affordance rather than a\n   * target you have to chase.\n   *\n   * Only for the point-based types, since a bar, slice or tile is already a\n   * comfortably large mark and drilling one by clicking the background near it\n   * would be surprising.\n   */\n  _wirePlotClick() {\n    if (!Environment.isBrowser()) return;\n    const baseEl = this.w.dom.baseEl;\n    if (!baseEl || this._plotClickWired === baseEl) return;\n    if (this._plotClickWired) {\n      this._plotClickWired.removeEventListener(\"mousedown\", this._onPlotDown);\n      this._plotClickWired.removeEventListener(\"click\", this._onPlotClick);\n    }\n    baseEl.addEventListener(\"mousedown\", this._onPlotDown);\n    baseEl.addEventListener(\"click\", this._onPlotClick);\n    this._plotClickWired = baseEl;\n  }\n  /** @param {any} e */\n  _onPlotDown(e2) {\n    this._downAt = { x: e2.clientX, y: e2.clientY };\n  }\n  /**\n   * @param {any} e\n   * @returns {any}\n   */\n  _onPlotClick(e2) {\n    const w2 = this.w;\n    if (!w2.config.drilldown || !w2.config.drilldown.enabled) return void 0;\n    const down = this._downAt;\n    this._downAt = null;\n    if (down && Math.hypot(e2.clientX - down.x, e2.clientY - down.y) > 4) {\n      return void 0;\n    }\n    const target = (\n      /** @type {Element} */\n      e2.target\n    );\n    if (!target || typeof target.closest !== \"function\") return void 0;\n    if (target.closest(\".apexcharts-drilldown-target\")) return void 0;\n    if (target.closest(\n      \".apexcharts-legend, .apexcharts-toolbar, .apexcharts-breadcrumb, .apexcharts-menu, .apexcharts-tooltip\"\n    )) {\n      return void 0;\n    }\n    const i2 = w2.interact.capturedSeriesIndex;\n    const j = w2.interact.capturedDataPointIndex;\n    if (i2 == null || j == null || i2 < 0 || j < 0) return void 0;\n    if (!this._isPointBasedSeries(w2.config.series[i2])) return void 0;\n    const point = this._pointAt(i2, j);\n    if (!point || typeof point !== \"object\" || point.drilldown == null) {\n      return void 0;\n    }\n    return this.drillDown(point.drilldown, point, {\n      seriesIndex: i2,\n      dataPointIndex: j\n    });\n  }\n  /**\n   * A series mark that is deliberately click-through. Restricted to markers\n   * inside the plot: the tooltip draws its own `no-pointer-events` marker, and\n   * that one must stay click-through or it would sit under the cursor and eat\n   * the hover it exists to follow.\n   * @param {Element} node\n   * @returns {boolean}\n   */\n  _isClickThroughMark(node) {\n    if (!node.classList || !node.classList.contains(\"no-pointer-events\")) {\n      return false;\n    }\n    if (!node.classList.contains(\"apexcharts-marker\")) return false;\n    return !(typeof node.closest === \"function\" && node.closest(\".apexcharts-tooltip\"));\n  }\n  /**\n   * Discrete-marker entries that give each drillable point a visible dot.\n   *\n   * Only series drawn WITHOUT markers get them, so an author who already shows\n   * markers keeps their styling untouched, and only drillable points get one, so\n   * the dots read as \"these are the ones you can open\" rather than turning every\n   * point into a dot. Core renders discrete markers even when `markers.size` is\n   * 0, which is what makes the affordance possible without a core change.\n   *\n   * Entries are tagged so a resync replaces ours and leaves the author's alone.\n   * @param {any[]} series - the series being rendered (a drill applies its\n   *   level's series, which are not yet on `w.config` when this runs)\n   * @returns {any[]}\n   */\n  _drillMarkers(series) {\n    const w2 = this.w;\n    const cfg = w2.config.drilldown;\n    const authored = Array.isArray(w2.config.markers && w2.config.markers.discrete) ? w2.config.markers.discrete.filter(\n      (d) => !d || !d[DRILL_MARKER]\n    ) : [];\n    const mk = cfg && cfg.marker || {};\n    if (mk.show === false || !Array.isArray(series)) return authored;\n    const own = [];\n    series.forEach((s2, i2) => {\n      if (!this._seriesNeedsDrillMarker(i2, s2)) return;\n      const data = s2 && Array.isArray(s2.data) ? s2.data : null;\n      if (!data) return;\n      data.forEach((point, j) => {\n        if (!point || typeof point !== \"object\" || point.drilldown == null) return;\n        const entry = { seriesIndex: i2, dataPointIndex: j, [DRILL_MARKER]: true };\n        if (mk.size !== void 0) entry.size = mk.size;\n        if (mk.shape !== void 0) entry.shape = mk.shape;\n        if (mk.fillColor !== void 0) entry.fillColor = mk.fillColor;\n        if (mk.strokeColor !== void 0) entry.strokeColor = mk.strokeColor;\n        own.push(entry);\n      });\n    });\n    return authored.concat(own);\n  }\n  /**\n   * Whether a series needs drill dots supplied for it: a point-based type whose\n   * marks are the markers, drawn with markers off. Bar, pie, treemap and heatmap\n   * marks are already real clickable elements, and a series that already shows\n   * markers already has its affordance.\n   * @param {number} i @param {any} s\n   * @returns {boolean}\n   */\n  _seriesNeedsDrillMarker(i2, s2) {\n    if (!this._isPointBasedSeries(s2)) return false;\n    const size = this.w.config.markers && this.w.config.markers.size;\n    const effective = Array.isArray(size) ? size[i2] : size;\n    return !(Number(effective) > 0);\n  }\n  /**\n   * A series whose marks are markers (a point), rather than a shape big enough\n   * to aim at on its own.\n   * @param {any} s\n   * @returns {boolean}\n   */\n  _isPointBasedSeries(s2) {\n    const type = s2 && s2.type || this.w.config.chart.type;\n    return type === \"line\" || type === \"area\";\n  }\n}\nApexCharts.registerFeatures({ drilldown: Drilldown });\nconst VIEWSTATE_VERSION = 1;\nfunction axisWindow(min, max) {\n  const hasMin = min !== void 0 && min !== null;\n  const hasMax = max !== void 0 && max !== null;\n  if (!hasMin && !hasMax) return null;\n  return { min: hasMin ? min : null, max: hasMax ? max : null };\n}\nfunction cloneSelection(sel) {\n  if (!Array.isArray(sel)) return [];\n  return sel.map((a2) => Array.isArray(a2) ? a2.slice() : a2);\n}\nfunction annotationKind(method, ctx) {\n  if (typeof method !== \"function\" || !ctx) return null;\n  if (method === ctx.addXaxisAnnotation) return \"xaxis\";\n  if (method === ctx.addYaxisAnnotation) return \"yaxis\";\n  if (method === ctx.addPointAnnotation) return \"point\";\n  return null;\n}\nfunction addMethodName(kind) {\n  switch (kind) {\n    case \"xaxis\":\n      return \"addXaxisAnnotation\";\n    case \"yaxis\":\n      return \"addYaxisAnnotation\";\n    case \"point\":\n      return \"addPointAnnotation\";\n    default:\n      return null;\n  }\n}\nfunction captureAnnotations(w2, ctx) {\n  const staticAnno = w2.config.annotations ? Utils$1.clone(w2.config.annotations) : null;\n  const dynamic = [];\n  const mem = w2.globals.memory && w2.globals.memory.methodsToExec || [];\n  for (const entry of mem) {\n    if (!entry || entry.label !== \"addAnnotation\") continue;\n    const kind = annotationKind(entry.method, ctx);\n    if (!kind) continue;\n    dynamic.push({ kind, params: Utils$1.clone(entry.params) });\n  }\n  return { static: staticAnno, dynamic };\n}\nfunction captureMeasure(ctx) {\n  const m2 = ctx && ctx.measure;\n  if (!m2 || typeof m2.getPins !== \"function\") return null;\n  const pins = m2.getPins();\n  return Array.isArray(pins) && pins.length ? { pins } : null;\n}\nfunction captureViewState(w2, ctx) {\n  var _a, _b;\n  const cfgX = w2.config.xaxis || {};\n  const cfgYArr = Array.isArray(w2.config.yaxis) ? w2.config.yaxis : w2.config.yaxis ? [w2.config.yaxis] : [];\n  const yWindows = cfgYArr.map(\n    (y) => axisWindow(y && y.min, y && y.max)\n  );\n  const anyY = yWindows.some((yw) => yw !== null);\n  const theme = w2.config.theme;\n  const drilldown = ctx && ctx.drilldown;\n  return {\n    v: VIEWSTATE_VERSION,\n    window: {\n      xaxis: axisWindow(cfgX.min, cfgX.max),\n      yaxis: anyY ? yWindows : null\n    },\n    zoomed: !!w2.interact.zoomed,\n    collapsed: (w2.globals.collapsedSeriesIndices || []).slice(),\n    ancillaryCollapsed: (w2.globals.ancillaryCollapsedSeriesIndices || []).slice(),\n    selectedDataPoints: cloneSelection(w2.interact.selectedDataPoints),\n    theme: theme ? { mode: (_a = theme.mode) != null ? _a : null, palette: (_b = theme.palette) != null ? _b : null } : null,\n    locale: w2.config.chart && w2.config.chart.defaultLocale || null,\n    annotations: captureAnnotations(w2, ctx),\n    drill: drilldown && drilldown.depth > 0 ? { path: drilldown.path.slice() } : null,\n    measure: captureMeasure(ctx)\n  };\n}\nfunction applyCollapsedSet(ctx, targetCollapsed, targetAncillary) {\n  const w2 = ctx.w;\n  if (targetCollapsed == null && targetAncillary == null) return;\n  const names = w2.globals.seriesNames || [];\n  const target = /* @__PURE__ */ new Set([\n    ...targetCollapsed || [],\n    ...targetAncillary || []\n  ]);\n  const current = /* @__PURE__ */ new Set([\n    ...w2.globals.collapsedSeriesIndices || [],\n    ...w2.globals.ancillaryCollapsedSeriesIndices || []\n  ]);\n  for (let realIndex = 0; realIndex < names.length; realIndex++) {\n    const name2 = names[realIndex];\n    if (name2 == null) continue;\n    const shouldCollapse = target.has(realIndex);\n    const isCollapsed = current.has(realIndex);\n    if (shouldCollapse && !isCollapsed) {\n      ctx.hideSeries(name2);\n    } else if (!shouldCollapse && isCollapsed) {\n      ctx.showSeries(name2);\n    }\n  }\n}\nfunction restoreSelection(ctx, selectedDataPoints) {\n  if (!Array.isArray(selectedDataPoints)) return;\n  ctx.w.interact.selectedDataPoints = cloneSelection(selectedDataPoints);\n}\nfunction applyViewState(ctx, view, { animate = true, mergeOptions } = {}) {\n  var _a, _b;\n  if (!ctx || !view) return;\n  if (typeof view.v === \"number\" && view.v > VIEWSTATE_VERSION) {\n    console.warn(\n      `[apexcharts] ViewState v${view.v} is newer than this build understands (v${VIEWSTATE_VERSION}); applying best-effort.`\n    );\n  }\n  ctx.clearAnnotations();\n  const options2 = mergeOptions ? Utils$1.clone(mergeOptions) : {};\n  const xw = view.window && view.window.xaxis;\n  options2.xaxis = Object.assign(\n    {},\n    options2.xaxis,\n    xw ? { min: (_a = xw.min) != null ? _a : void 0, max: (_b = xw.max) != null ? _b : void 0 } : { min: void 0, max: void 0 }\n  );\n  const yw = view.window && view.window.yaxis;\n  if (Array.isArray(yw)) {\n    options2.yaxis = yw.map(\n      (y) => {\n        var _a2, _b2;\n        return y ? { min: (_a2 = y.min) != null ? _a2 : void 0, max: (_b2 = y.max) != null ? _b2 : void 0 } : {};\n      }\n    );\n  }\n  if (view.theme) {\n    const theme = {};\n    if (view.theme.mode != null) theme.mode = view.theme.mode;\n    if (view.theme.palette != null) theme.palette = view.theme.palette;\n    if (Object.keys(theme).length) {\n      options2.theme = Object.assign({}, options2.theme, theme);\n    }\n  }\n  if (view.annotations && view.annotations.static) {\n    options2.annotations = Utils$1.clone(view.annotations.static);\n  }\n  ctx.updateOptions(\n    options2,\n    false,\n    animate,\n    false,\n    false\n  );\n  applyViewInteraction(ctx, view);\n}\nfunction applyViewInteraction(ctx, view) {\n  if (!ctx || !view) return;\n  const w2 = ctx.w;\n  w2.interact.zoomed = !!view.zoomed;\n  applyCollapsedSet(ctx, view.collapsed, view.ancillaryCollapsed);\n  if (view.annotations && Array.isArray(view.annotations.dynamic)) {\n    view.annotations.dynamic.forEach((a2) => {\n      const method = addMethodName(a2.kind);\n      if (method && typeof ctx[method] === \"function\") {\n        ctx[method](a2.params, true);\n      }\n    });\n  }\n  restoreSelection(ctx, view.selectedDataPoints);\n  if (view.locale && view.locale !== w2.config.chart.defaultLocale) {\n    ctx.setLocale(view.locale);\n  }\n  if (ctx.measure && typeof ctx.measure.setPins === \"function\") {\n    ctx.measure.setPins(view.measure && view.measure.pins || []);\n  }\n}\nconst PERSPECTIVE_VERSION = 1;\nconst HASH_KEY = \"apex\";\nfunction toBase64(str) {\n  if (typeof Buffer !== \"undefined\") {\n    return Buffer.from(str, \"utf-8\").toString(\"base64\");\n  }\n  const bytes = new TextEncoder().encode(str);\n  let bin = \"\";\n  for (let i2 = 0; i2 < bytes.length; i2++) bin += String.fromCharCode(bytes[i2]);\n  return btoa(bin);\n}\nfunction fromBase64(b64) {\n  if (typeof Buffer !== \"undefined\") {\n    return Buffer.from(b64, \"base64\").toString(\"utf-8\");\n  }\n  const bin = atob(b64);\n  const bytes = new Uint8Array(bin.length);\n  for (let i2 = 0; i2 < bin.length; i2++) bytes[i2] = bin.charCodeAt(i2);\n  return new TextDecoder().decode(bytes);\n}\nfunction base64urlEncode(str) {\n  return toBase64(str).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\");\n}\nfunction base64urlDecode(b64url) {\n  let b64 = b64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n  while (b64.length % 4) b64 += \"=\";\n  return fromBase64(b64);\n}\nfunction stripFunctions(obj) {\n  try {\n    return JSON.parse(JSON.stringify(obj));\n  } catch (e2) {\n    return void 0;\n  }\n}\nclass Perspectives {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this._saved = [];\n    this._counter = 0;\n    this._used = false;\n  }\n  /**\n   * Capture the current chart view as a Perspective token.\n   * @returns {{ v: number, view: object, options?: Record<string, any> }}\n   */\n  capture() {\n    const view = captureViewState(this.w, this.ctx);\n    const token = (\n      /** @type {any} */\n      { v: PERSPECTIVE_VERSION, view }\n    );\n    const options2 = this._serializableDelta();\n    if (options2 && Object.keys(options2).length) token.options = options2;\n    return token;\n  }\n  /**\n   * Build the whitelisted, function-free option override recorded in the token.\n   * @returns {Record<string, any>}\n   * @private\n   */\n  _serializableDelta() {\n    const cfg = this.w.config;\n    const whitelist = cfg.chart && cfg.chart.perspectives && cfg.chart.perspectives.serializeOptions || [\"theme\", \"xaxis\", \"yaxis\", \"title\", \"subtitle\"];\n    const delta = {};\n    whitelist.forEach((path) => {\n      if (cfg[path] !== void 0) {\n        const stripped = stripFunctions(cfg[path]);\n        if (stripped !== void 0) delta[path] = stripped;\n      }\n    });\n    return delta;\n  }\n  /**\n   * Encode a token (or the current capture) to a compact base64url string.\n   * JSON.stringify drops any functions embedded in annotation params / option\n   * overrides by construction: a shared link carries data; the opening page\n   * supplies its own functions from config.\n   * @param {any} [token]\n   * @returns {string}\n   */\n  encode(token) {\n    const t2 = token || this.capture();\n    return base64urlEncode(JSON.stringify(t2));\n  }\n  /**\n   * Decode a base64url token string. Never throws: returns null on any error\n   * or version mismatch (with a console warning).\n   * @param {string} str\n   * @returns {any | null}\n   */\n  decode(str) {\n    return Perspectives.decode(str);\n  }\n  /**\n   * Encode the current capture into a `#apex=<token>` URL hash fragment on the\n   * current location. Browser-only; returns '' under SSR.\n   * @returns {string}\n   */\n  toURL() {\n    if (!Environment.isBrowser()) return \"\";\n    const encoded = this.encode(this.capture());\n    const url = new URL(window.location.href);\n    url.hash = `${HASH_KEY}=${encoded}`;\n    return url.toString();\n  }\n  /**\n   * Restore a perspective. Accepts a token object or an encoded string. When\n   * the chart is grouped, applies to every synced chart.\n   *\n   * The token's option overrides and `opts.mergeOptions` are folded into the\n   * view restore's ONE updateOptions call (mergeOptions wins over\n   * token.options; the view's own fields win over both). A single render is\n   * deliberate: a second immediate updateOptions would kill the first one's\n   * animation mid-flight, and a chart.type change applied this way morphs\n   * (morph feature) inside the same re-render instead of being re-rendered\n   * over. Consumed by Storyboard for per-beat option payloads.\n   *\n   * @param {any} tokenOrString\n   * @param {{ animate?: boolean, mergeOptions?: Record<string, any> }} [opts]\n   */\n  apply(tokenOrString, opts = {}) {\n    const token = typeof tokenOrString === \"string\" ? Perspectives.decode(tokenOrString) : tokenOrString;\n    if (!token || !token.view) return;\n    this._used = true;\n    enforceLicense(this.w, this.ctx);\n    const animate = opts.animate !== void 0 ? opts.animate : true;\n    const combined = Utils$1.extend(\n      token.options ? Utils$1.clone(token.options) : {},\n      opts.mergeOptions || {}\n    );\n    const mergeOptions = Object.keys(combined).length ? combined : void 0;\n    const targets = this.w.config.chart.group ? this.ctx.getSyncedCharts() : [this.ctx];\n    targets.forEach((chart) => {\n      applyViewState(chart, token.view, { animate, mergeOptions });\n    });\n  }\n  /**\n   * Save the current view under a name in the in-memory registry.\n   * @param {string} name\n   * @returns {string} generated id\n   */\n  save(name2) {\n    const id = `perspective-${++this._counter}`;\n    this._saved.push({ id, name: name2 || id, token: this.capture() });\n    this._used = true;\n    enforceLicense(this.w, this.ctx);\n    return id;\n  }\n  /**\n   * List saved perspectives.\n   * @returns {{ id: string, name: string, token: any }[]}\n   */\n  list() {\n    return this._saved.map((s2) => ({ id: s2.id, name: s2.name, token: s2.token }));\n  }\n  /**\n   * Delete a saved perspective by id.\n   * @param {string} id\n   */\n  delete(id) {\n    const i2 = this._saved.findIndex((s2) => s2.id === id);\n    if (i2 > -1) this._saved.splice(i2, 1);\n  }\n  /** Drop the saved-views registry (called on full destroy). */\n  teardown() {\n    this._saved = [];\n    this._counter = 0;\n  }\n  // ── static, pure helpers (available once the feature is imported) ─────────\n  /**\n   * @param {string} str base64url token\n   * @returns {any | null}\n   */\n  static decode(str) {\n    if (typeof str !== \"string\" || !str) return null;\n    try {\n      const token = JSON.parse(base64urlDecode(str));\n      if (!token || typeof token !== \"object\") return null;\n      if (token.v !== PERSPECTIVE_VERSION) {\n        console.warn(\n          `apexcharts: unsupported perspective version ${token.v} (expected ${PERSPECTIVE_VERSION}).`\n        );\n        return null;\n      }\n      return token;\n    } catch (e2) {\n      console.warn(\"apexcharts: failed to decode perspective token.\", e2);\n      return null;\n    }\n  }\n  /**\n   * Parse a `#apex=<token>` fragment out of an href (or the current location in\n   * a browser). Pure and Node-safe when given an explicit href.\n   * @param {string} [href]\n   * @returns {any | null}\n   */\n  static fromURL(href) {\n    try {\n      const target = href || (Environment.isBrowser() ? window.location.href : \"\");\n      if (!target) return null;\n      const url = new URL(target);\n      const hash = url.hash.replace(/^#/, \"\");\n      if (!hash) return null;\n      const pair = hash.split(\"&\").map((p2) => p2.split(\"=\")).find((p2) => p2[0] === HASH_KEY);\n      if (!pair || pair[1] == null) return null;\n      return Perspectives.decode(decodeURIComponent(pair[1]));\n    } catch (e2) {\n      return null;\n    }\n  }\n}\nApexCharts.registerFeatures({ perspectives: Perspectives });\nApexCharts.perspectives = {\n  /** @param {string} str */\n  decode: (str) => {\n    markPerspectivesTokenDecoded();\n    return Perspectives.decode(str);\n  },\n  /** @param {string} [href] */\n  fromURL: (href) => {\n    markPerspectivesTokenDecoded();\n    return Perspectives.fromURL(href);\n  }\n};\nclass Storyboard {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this._beats = [];\n    this._observer = null;\n    this._activeIndex = -1;\n    this._animate = true;\n    this._warnedNoPerspectives = false;\n    this._used = false;\n  }\n  /**\n   * Bind beats to scroll position. Rebinding replaces the previous binding.\n   * @param {{\n   *   beats?: Array<{ el?: Element, selector?: string, key?: string, view?: any, announce?: string, onEnter?: (chart: any, info: StoryboardBeatInfo) => void }>,\n   *   scroller?: Element | string,\n   *   offset?: number,\n   *   animate?: boolean,\n   * }} [opts]\n   * @returns {number} the number of beats bound\n   */\n  bind(opts = {}) {\n    var _a;\n    this.unbind();\n    if (!Environment.isBrowser()) return 0;\n    const doc = this.ctx.el && this.ctx.el.ownerDocument;\n    if (!doc || typeof IntersectionObserver === \"undefined\") return 0;\n    let root = null;\n    if (opts.scroller) {\n      root = typeof opts.scroller === \"string\" ? doc.querySelector(opts.scroller) : opts.scroller;\n    }\n    this._beats = this._resolveBeats(doc, root, opts.beats);\n    if (!this._beats.length) return 0;\n    this._animate = opts.animate !== false;\n    const offset = Math.min(Math.max((_a = opts.offset) != null ? _a : 0.5, 0), 1);\n    const top = +(offset * 100).toFixed(3);\n    const bottom = +(100 - offset * 100).toFixed(3);\n    this._observer = new IntersectionObserver(\n      (entries) => this._onIntersect(entries),\n      { root, rootMargin: `-${top}% 0px -${bottom}%`, threshold: 0 }\n    );\n    this._beats.forEach((b2) => {\n      var _a2;\n      return (_a2 = this._observer) == null ? void 0 : _a2.observe(b2.el);\n    });\n    this._used = true;\n    enforceLicense(this.w, this.ctx);\n    return this._beats.length;\n  }\n  /**\n   * Normalize the beats option, or auto-discover [data-apex-beat] elements in\n   * document order when no explicit list is given.\n   * @param {Document} doc\n   * @param {Element | null} root\n   * @param {Array<any>} [beatsOpt]\n   * @returns {StoryboardBeat[]}\n   * @private\n   */\n  _resolveBeats(doc, root, beatsOpt) {\n    const beats = [];\n    if (Array.isArray(beatsOpt)) {\n      beatsOpt.forEach((b2, i2) => {\n        var _a, _b;\n        if (!b2) return;\n        const el = b2.el && typeof b2.el === \"object\" ? b2.el : b2.selector ? doc.querySelector(b2.selector) : null;\n        if (!el) {\n          console.warn(\n            `apexcharts: storyboard beat ${i2} has no resolvable element; skipped.`\n          );\n          return;\n        }\n        beats.push({\n          el,\n          key: (_b = (_a = b2.key) != null ? _a : el.getAttribute(\"data-apex-beat\")) != null ? _b : String(i2),\n          view: b2.view,\n          options: b2.options,\n          announce: b2.announce,\n          onEnter: typeof b2.onEnter === \"function\" ? b2.onEnter : void 0\n        });\n      });\n      return beats;\n    }\n    const scope = root || doc;\n    scope.querySelectorAll(\"[data-apex-beat]\").forEach((el, i2) => {\n      beats.push({\n        el,\n        key: el.getAttribute(\"data-apex-beat\") || String(i2),\n        view: el.getAttribute(\"data-apex-view\") || void 0,\n        options: void 0,\n        announce: el.getAttribute(\"data-apex-announce\") || void 0,\n        onEnter: void 0\n      });\n    });\n    return beats;\n  }\n  /**\n   * @param {IntersectionObserverEntry[]} entries\n   * @private\n   */\n  _onIntersect(entries) {\n    entries.forEach((entry) => {\n      const idx = this._beats.findIndex((b2) => b2.el === entry.target);\n      if (idx < 0) return;\n      if (entry.isIntersecting) {\n        this._activate(idx);\n      } else if (idx === this._activeIndex && entry.rootBounds) {\n        if (entry.boundingClientRect.top >= entry.rootBounds.bottom && idx > 0) {\n          this._activate(idx - 1);\n        }\n      }\n    });\n  }\n  /**\n   * Activate a beat: apply its view token, run its callback, announce it and\n   * fire `beatChange`. Idempotent per beat (re-activating the current beat is\n   * a no-op), so IO chatter never re-applies a view.\n   * @param {number} idx\n   * @param {{ animate?: boolean }} [opts]\n   * @private\n   */\n  _activate(idx, opts = {}) {\n    var _a, _b;\n    if (idx === this._activeIndex) return;\n    const beat = this._beats[idx];\n    if (!beat) return;\n    const direction = idx > this._activeIndex ? \"down\" : \"up\";\n    this._activeIndex = idx;\n    const animate = (opts.animate !== void 0 ? opts.animate : this._animate) && !prefersReducedMotion();\n    if (beat.view != null || beat.options) {\n      if (this.ctx.perspectives) {\n        const v2 = (_a = beat.view) != null ? _a : {};\n        const token = typeof v2 === \"string\" || v2.view ? v2 : { view: this._normalizeView(v2) };\n        this.ctx.perspectives.apply(token, {\n          animate,\n          mergeOptions: beat.options\n        });\n      } else if (!this._warnedNoPerspectives) {\n        this._warnedNoPerspectives = true;\n        console.warn(\n          'apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import \"apexcharts/features/storyboard\" (which includes it) or drive beats via onEnter.'\n        );\n      }\n    }\n    const info = { index: idx, key: beat.key, el: beat.el, direction };\n    if (beat.onEnter) beat.onEnter(this.ctx, info);\n    if (beat.announce) this._announce(beat.announce);\n    if (typeof this.w.config.chart.events.beatChange === \"function\") {\n      this.w.config.chart.events.beatChange(this.ctx, info);\n    }\n    (_b = this.ctx.events) == null ? void 0 : _b.fireEvent(\"beatChange\", [this.ctx, info]);\n  }\n  /**\n   * Fill in the parts of a hand-authored (bare) ViewState that would\n   * otherwise LEAK between beats. updateOptions merges objects, so a beat\n   * listing only xaxis annotations would keep a previous beat's point\n   * annotations; padding every annotation kind with an empty array makes\n   * each beat fully describe its own state, which is what allows scrubbing\n   * in both directions. Full tokens (from capture()/encode()) already carry\n   * the complete set and never pass through here.\n   * @param {any} view\n   * @returns {any}\n   * @private\n   */\n  _normalizeView(view) {\n    const provided = view.annotations && view.annotations.static || {};\n    return __spreadProps(__spreadValues({}, view), {\n      annotations: {\n        static: __spreadValues({\n          points: [],\n          xaxis: [],\n          yaxis: [],\n          texts: [],\n          images: []\n        }, provided),\n        dynamic: view.annotations && view.annotations.dynamic || []\n      }\n    });\n  }\n  /**\n   * Programmatically jump to a beat by index or author key (also usable\n   * without scrolling, e.g. from next/prev buttons).\n   * @param {number | string} indexOrKey\n   * @param {{ animate?: boolean }} [opts]\n   */\n  goTo(indexOrKey, opts = {}) {\n    const idx = typeof indexOrKey === \"number\" ? indexOrKey : this._beats.findIndex((b2) => b2.key === indexOrKey);\n    if (idx >= 0 && idx < this._beats.length) this._activate(idx, opts);\n  }\n  /**\n   * @returns {{ index: number, key: string | null } | null} the active beat\n   */\n  current() {\n    if (this._activeIndex < 0) return null;\n    const beat = this._beats[this._activeIndex];\n    return { index: this._activeIndex, key: beat ? beat.key : null };\n  }\n  /** Disconnect the observer and drop the beat list. */\n  unbind() {\n    if (this._observer) {\n      this._observer.disconnect();\n      this._observer = null;\n    }\n    this._beats = [];\n    this._activeIndex = -1;\n    this._used = false;\n    enforceLicense(this.w, this.ctx);\n  }\n  /** Full-destroy cleanup (called from Destroy). */\n  teardown() {\n    this.unbind();\n  }\n  /**\n   * Push a beat's announcement to the chart's visually-hidden aria-live\n   * status region so screen-reader users follow the story too. No-op when\n   * announcements are disabled or the region is absent.\n   * @param {string} message\n   * @private\n   */\n  _announce(message) {\n    const w2 = this.w;\n    if (!w2.config.chart.accessibility.announcements.enabled) return;\n    const baseEl = w2.dom.baseEl;\n    if (!baseEl) return;\n    const region = baseEl.querySelector(\".apexcharts-sr-status\");\n    if (!region) return;\n    region.textContent = \"\";\n    setTimeout(() => {\n      region.textContent = message;\n    }, 0);\n  }\n}\nApexCharts.registerFeatures({ storyboard: Storyboard });\nfunction isEditableTarget(node) {\n  if (!node) return false;\n  const tag = node.tagName;\n  return tag === \"INPUT\" || tag === \"TEXTAREA\" || tag === \"SELECT\" || node.isContentEditable === true;\n}\nclass History {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.stack = [];\n    this.pointer = -1;\n    this.applying = false;\n    this._batching = false;\n    this._counter = 0;\n    this._coalesceTimer = null;\n    this._settleTimer = null;\n    this._pendingLabel = void 0;\n    this._keydownTarget = null;\n    this._pointerTarget = null;\n    this._engaged = false;\n    this._wired = false;\n    this._readConfig();\n    this._onMounted = this._onMounted.bind(this);\n    this._onUpdated = this._onUpdated.bind(this);\n    this._onSelection = this._onSelection.bind(this);\n    this._onKeyDown = this._onKeyDown.bind(this);\n    this._onPointerDown = this._onPointerDown.bind(this);\n    this.init();\n  }\n  /**\n   * (Re)read chart.history config. Called at construction and again on every\n   * mounted/updated event so `updateOptions({ chart: { history: {...} } })`\n   * takes effect at runtime: enabling wires the keyboard + starts capturing,\n   * disabling stops capturing (the stack is kept for a later re-enable).\n   */\n  _readConfig() {\n    const w2 = this.w;\n    const cfg = w2.config.chart && w2.config.chart.history || {};\n    this.enabled = !!cfg.enabled;\n    this.maxDepth = cfg.maxDepth > 0 ? cfg.maxDepth : 100;\n    this.coalesceMs = cfg.coalesceMs != null ? cfg.coalesceMs : 250;\n    this.keyboard = cfg.keyboard !== false;\n  }\n  /** Re-sync config, then wire/unwire the keyboard to match. */\n  _syncConfig() {\n    this._readConfig();\n    if (this.enabled && this.keyboard) this._wireKeyboard();\n    else this._unwireKeyboard();\n  }\n  init() {\n    if (this._wired) return;\n    this._wired = true;\n    this.ctx.addEventListener(\"mounted\", this._onMounted);\n    this.ctx.addEventListener(\"updated\", this._onUpdated);\n    this.ctx.addEventListener(\"scrolled\", this._onUpdated);\n    this.ctx.addEventListener(\"dataPointSelection\", this._onSelection);\n    if (this.enabled && this.keyboard) this._wireKeyboard();\n  }\n  /**\n   * Keyboard: Cmd/Ctrl+Z = undo, Shift+Cmd/Ctrl+Z or Ctrl+Y = redo. Bound on\n   * the document (not the chart element) because pointer gestures that create\n   * an undo step (annotation drag, zoom, pan) call preventDefault and so never\n   * move focus into the chart, leaving an el-scoped listener unreachable. To\n   * stay non-intrusive it acts only when this chart is \"engaged\" (see\n   * _onKeyDown): a capture-phase pointerdown marks engagement so the shortcut\n   * follows the chart the user last touched, and defers to text editing.\n   */\n  _wireKeyboard() {\n    if (this._keydownTarget) return;\n    const el = (\n      /** @type {any} */\n      this.ctx.el\n    );\n    const doc = el && el.ownerDocument;\n    if (!Environment.isBrowser() || !doc) return;\n    doc.addEventListener(\"keydown\", this._onKeyDown);\n    doc.addEventListener(\"pointerdown\", this._onPointerDown, true);\n    doc.addEventListener(\"mousedown\", this._onPointerDown, true);\n    this._keydownTarget = doc;\n    this._pointerTarget = doc;\n  }\n  _unwireKeyboard() {\n    if (this._keydownTarget) {\n      this._keydownTarget.removeEventListener(\"keydown\", this._onKeyDown);\n      this._keydownTarget = null;\n    }\n    if (this._pointerTarget) {\n      this._pointerTarget.removeEventListener(\"pointerdown\", this._onPointerDown, true);\n      this._pointerTarget.removeEventListener(\"mousedown\", this._onPointerDown, true);\n      this._pointerTarget = null;\n    }\n    this._engaged = false;\n  }\n  // ─── Event handlers ─────────────────────────────────────────────────────\n  _onMounted() {\n    this._syncConfig();\n    if (!this.enabled) return;\n    if (this.stack.length === 0) this._commit(\"initial\", true);\n  }\n  _onUpdated() {\n    this._syncConfig();\n    if (!this.enabled) return;\n    if (this.applying) {\n      this._refreshSettle();\n      return;\n    }\n    this._schedule(\"update\");\n  }\n  _onSelection() {\n    if (!this.enabled || this.applying) return;\n    this._schedule(\"selection\");\n  }\n  /**\n   * Mark whether the chart is engaged: a capture-phase pointerdown inside `el`\n   * engages it (runs before feature handlers stopPropagation), one elsewhere\n   * releases it. Capture phase so an annotation/zoom gesture that stops\n   * propagation still registers.\n   * @param {any} e\n   */\n  _onPointerDown(e2) {\n    const el = (\n      /** @type {any} */\n      this.ctx.el\n    );\n    this._engaged = !!(el && e2.target && el.contains(e2.target));\n  }\n  /**\n   * @param {KeyboardEvent} e\n   */\n  _onKeyDown(e2) {\n    if (!(e2.metaKey || e2.ctrlKey)) return;\n    const key = (e2.key || \"\").toLowerCase();\n    if (key !== \"z\" && key !== \"y\") return;\n    const el = (\n      /** @type {any} */\n      this.ctx.el\n    );\n    if (!el) return;\n    const doc = el.ownerDocument;\n    const active = doc && doc.activeElement;\n    if (isEditableTarget(active)) return;\n    if (!(el.contains(active) || this._engaged)) return;\n    const redo = key === \"y\" || e2.shiftKey;\n    e2.preventDefault();\n    if (redo) this.redo();\n    else this.undo();\n  }\n  // ─── Capture (coalesced) ────────────────────────────────────────────────\n  /**\n   * @param {string} label\n   */\n  _schedule(label) {\n    if (this.applying || this._batching || !this.enabled) return;\n    this._pendingLabel = label;\n    if (this.coalesceMs > 0 && Environment.isBrowser()) {\n      clearTimeout(this._coalesceTimer);\n      this._coalesceTimer = setTimeout(\n        () => this._commit(this._pendingLabel),\n        this.coalesceMs\n      );\n    } else {\n      this._commit(label);\n    }\n  }\n  /**\n   * @param {string} [label]\n   * @param {boolean} [force] bypass the applying/batching guard (baseline / transaction)\n   */\n  _commit(label, force) {\n    clearTimeout(this._coalesceTimer);\n    this._coalesceTimer = null;\n    if (!force && (this.applying || this._batching)) return;\n    const cp = this._capture(label);\n    const current = this.stack[this.pointer];\n    if (current && current.sig === cp.sig) return;\n    if (this.pointer < this.stack.length - 1) {\n      this.stack.splice(this.pointer + 1);\n    }\n    this.stack.push(cp);\n    this.pointer = this.stack.length - 1;\n    while (this.stack.length > this.maxDepth) {\n      this.stack.shift();\n      this.pointer--;\n    }\n    this._emitChange();\n  }\n  /**\n   * @param {string} [label]\n   */\n  _capture(label) {\n    const view = captureViewState(this.w, this.ctx);\n    const { config, seriesSig } = this._cloneConfigCOW();\n    return {\n      id: `hist-${++this._counter}`,\n      view,\n      config,\n      seriesSig,\n      label: label || \"change\",\n      at: Environment.isBrowser() ? Date.now() : 0,\n      origin: \"local\",\n      // reserved for per-user scoping (Live Rooms)\n      sig: this._signature(view, config)\n    };\n  }\n  /**\n   * Clone w.config, sharing the previous checkpoint's cloned series when the\n   * live series CONTENT is unchanged (copy-on-write). Sharing is decided by a\n   * value signature, not reference identity: callers commonly mutate a kept\n   * series array in place and pass the same reference back to updateSeries, and\n   * an identity check would share a stale clone for exactly that case. The\n   * stringify is not extra cost: _signature already serialises the series as\n   * part of dedup.\n   * @returns {{ config: any, seriesSig: string|null }}\n   */\n  _cloneConfigCOW() {\n    const w2 = this.w;\n    const prev = this.stack[this.pointer];\n    let seriesSig = null;\n    try {\n      seriesSig = JSON.stringify(w2.config.series);\n    } catch (e2) {\n      seriesSig = null;\n    }\n    let cloned;\n    if (prev && seriesSig !== null && prev.seriesSig === seriesSig) {\n      const _a = w2.config, { series: _series } = _a, rest = __objRest(_a, [\"series\"]);\n      cloned = Utils$1.clone(rest);\n      cloned.series = prev.config.series;\n    } else {\n      cloned = Utils$1.clone(w2.config);\n    }\n    return { config: cloned, seriesSig };\n  }\n  /**\n   * Data-level signature for dedup. Functions are dropped by JSON (fine: a\n   * checkpoint whose only change is a function reference is not a meaningful\n   * undo step). Runs once per committed checkpoint, not per raw event.\n   * @param {any} view\n   * @param {any} config\n   * @returns {string}\n   */\n  _signature(view, config) {\n    try {\n      return JSON.stringify(view) + \"|\" + JSON.stringify(config);\n    } catch (e2) {\n      return `nosig-${this._counter}`;\n    }\n  }\n  // ─── Restore ────────────────────────────────────────────────────────────\n  /**\n   * @param {any} cp\n   * @param {boolean} animate\n   */\n  _restore(cp, animate) {\n    if (!cp) return;\n    this.applying = true;\n    let p2;\n    try {\n      this.ctx.clearAnnotations();\n      p2 = this.ctx.updateOptions(Utils$1.clone(cp.config), false, animate, false, false);\n    } catch (e2) {\n      this.applying = false;\n      throw e2;\n    }\n    Promise.resolve(p2).then(() => {\n      if (this.w.globals.isDestroyed) {\n        this.applying = false;\n        return;\n      }\n      applyViewInteraction(this.ctx, cp.view);\n      this._refreshSettle();\n      this._emitChange();\n    }).catch(() => {\n      this.applying = false;\n    });\n  }\n  /**\n   * Hold `applying` true until the restore's burst of async 'updated' events\n   * has drained (one macrotask after the last one). Refreshed by _onUpdated.\n   */\n  _refreshSettle() {\n    if (!Environment.isBrowser()) {\n      this.applying = false;\n      return;\n    }\n    clearTimeout(this._settleTimer);\n    this._settleTimer = setTimeout(() => {\n      this.applying = false;\n    }, 0);\n  }\n  // ─── Public API ─────────────────────────────────────────────────────────\n  /**\n   * Commit a checkpoint of the current state now (a discrete undo step). Used by\n   * callers that mutate `w.config` without going through a full re-render (e.g.\n   * Ink Layer's targeted annotation redraws, which fire no 'updated' event).\n   * No-op when disabled or while a restore is applying.\n   * @param {string} [label]\n   */\n  snapshot(label) {\n    if (!this.enabled || this.applying) return;\n    this._commit(label || \"change\");\n  }\n  /**\n   * @param {boolean} [animate]\n   */\n  undo(animate = true) {\n    if (!this.canUndo()) return;\n    this.pointer--;\n    this._restore(this.stack[this.pointer], animate);\n  }\n  /**\n   * @param {boolean} [animate]\n   */\n  redo(animate = true) {\n    if (!this.canRedo()) return;\n    this.pointer++;\n    this._restore(this.stack[this.pointer], animate);\n  }\n  canUndo() {\n    return this.pointer > 0;\n  }\n  canRedo() {\n    return this.pointer > -1 && this.pointer < this.stack.length - 1;\n  }\n  /**\n   * @param {string} id\n   * @param {boolean} [animate]\n   */\n  jump(id, animate = true) {\n    const idx = this.stack.findIndex((c2) => c2.id === id);\n    if (idx === -1 || idx === this.pointer) return;\n    this.pointer = idx;\n    this._restore(this.stack[idx], animate);\n  }\n  /** Clear the history, keeping the current state as the new baseline. */\n  clear() {\n    clearTimeout(this._coalesceTimer);\n    this._coalesceTimer = null;\n    const current = this.stack[this.pointer];\n    this.stack = current ? [current] : [];\n    this.pointer = this.stack.length - 1;\n    this._emitChange();\n  }\n  /**\n   * Group multiple edits into a single undo step. `fn` may be async; await your\n   * updateOptions/updateSeries calls inside it so the intermediate 'updated'\n   * events are suppressed and only one checkpoint is committed afterwards.\n   * @param {() => (void | Promise<any>)} fn\n   * @param {{ label?: string }} [opts]\n   * @returns {Promise<void>}\n   */\n  transaction(fn, opts = {}) {\n    if (typeof fn !== \"function\") return Promise.resolve();\n    const wasBatching = this._batching;\n    this._batching = true;\n    return Promise.resolve().then(() => fn()).finally(() => {\n      this._batching = wasBatching;\n      if (!wasBatching) this._commit(opts.label || \"transaction\", true);\n    });\n  }\n  /**\n   * @returns {{ id: string, label: string, at: number }[]}\n   */\n  entries() {\n    return this.stack.map((c2) => ({ id: c2.id, label: c2.label, at: c2.at }));\n  }\n  /** Lightweight state for the historyChange event / a history-rail UI. */\n  state() {\n    return {\n      canUndo: this.canUndo(),\n      canRedo: this.canRedo(),\n      index: this.pointer,\n      length: this.stack.length\n    };\n  }\n  _emitChange() {\n    this.ctx.events.fireEvent(\"historyChange\", [this.ctx, this.state()]);\n  }\n  /** Drop the stack + detach listeners (called on full destroy). */\n  teardown() {\n    var _a, _b, _c, _d, _e, _f, _g, _h;\n    clearTimeout(this._coalesceTimer);\n    clearTimeout(this._settleTimer);\n    this._coalesceTimer = null;\n    this._settleTimer = null;\n    this._unwireKeyboard();\n    if (this._wired) {\n      (_b = (_a = this.ctx).removeEventListener) == null ? void 0 : _b.call(_a, \"mounted\", this._onMounted);\n      (_d = (_c = this.ctx).removeEventListener) == null ? void 0 : _d.call(_c, \"updated\", this._onUpdated);\n      (_f = (_e = this.ctx).removeEventListener) == null ? void 0 : _f.call(_e, \"scrolled\", this._onUpdated);\n      (_h = (_g = this.ctx).removeEventListener) == null ? void 0 : _h.call(_g, \"dataPointSelection\", this._onSelection);\n    }\n    this.stack = [];\n    this.pointer = -1;\n    this._wired = false;\n  }\n}\nApexCharts.registerFeatures({ history: History });\nconst WEAVE_API_VERSION = 1;\nconst PLUGIN_CHART_METHODS = [\n  \"updateOptions\",\n  \"updateSeries\",\n  \"appendData\",\n  \"appendSeries\",\n  \"toggleSeries\",\n  \"showSeries\",\n  \"hideSeries\",\n  \"highlightSeries\",\n  \"isSeriesHidden\",\n  \"zoomX\",\n  \"addXaxisAnnotation\",\n  \"addYaxisAnnotation\",\n  \"addPointAnnotation\",\n  \"clearAnnotations\",\n  \"removeAnnotation\",\n  \"dataURI\",\n  \"exportToCSV\"\n];\nfunction buildBoundPublicMethods(ctx) {\n  const out = {};\n  PLUGIN_CHART_METHODS.forEach((m2) => {\n    if (typeof ctx[m2] === \"function\") out[m2] = ctx[m2].bind(ctx);\n  });\n  return Object.freeze(out);\n}\nfunction makeLayerHandle(g2, graphics) {\n  const add = (el) => {\n    if (el) g2.add(el);\n    return el;\n  };\n  const handle = {\n    get node() {\n      return g2.node;\n    },\n    /** @param {any} opts */\n    path(opts = {}) {\n      const {\n        d = \"\",\n        stroke = \"#000\",\n        width = 1,\n        fill = \"none\",\n        opacity = 1,\n        dash = 0,\n        className = \"\"\n      } = opts;\n      return add(\n        graphics.drawPath({\n          d,\n          stroke,\n          strokeWidth: width,\n          fill,\n          fillOpacity: fill === \"none\" ? 0 : opacity,\n          strokeOpacity: opacity,\n          strokeDashArray: dash,\n          classes: className\n        })\n      );\n    },\n    /** @param {any} opts */\n    line(opts = {}) {\n      const { x1, y1, x2, y2, stroke = \"#000\", width = 1, dash = 0 } = opts;\n      return add(graphics.drawLine(x1, y1, x2, y2, stroke, dash, width));\n    },\n    /** @param {any} opts */\n    rect(opts = {}) {\n      const {\n        x = 0,\n        y = 0,\n        w: w2 = 0,\n        h: h2 = 0,\n        r: r2 = 0,\n        fill = \"#000\",\n        stroke = null,\n        opacity = 1\n      } = opts;\n      return add(\n        graphics.drawRect(\n          x,\n          y,\n          w2,\n          h2,\n          r2,\n          fill,\n          opacity,\n          stroke != null ? 1 : null,\n          stroke\n        )\n      );\n    },\n    /** @param {any} opts */\n    circle(opts = {}) {\n      const { cx = 0, cy = 0, r: r2 = 0, fill = \"#000\", stroke = null } = opts;\n      return add(\n        graphics.drawCircle(r2, { cx, cy, fill, stroke: stroke || \"none\" })\n      );\n    },\n    /** @param {any} opts */\n    text(opts = {}) {\n      const {\n        x = 0,\n        y = 0,\n        text = \"\",\n        color,\n        size,\n        anchor = \"start\",\n        weight\n      } = opts;\n      return add(\n        graphics.drawText({\n          x,\n          y,\n          text,\n          textAnchor: anchor,\n          fontSize: size,\n          foreColor: color,\n          fontWeight: weight\n        })\n      );\n    },\n    clear() {\n      const node = g2.node;\n      while (node.firstChild) node.removeChild(node.firstChild);\n      return handle;\n    }\n  };\n  return handle;\n}\nfunction buildPluginAPI(host, record) {\n  const ctx = host.ctx;\n  const w2 = host.w;\n  const api = {\n    name: record.def.name,\n    version: WEAVE_API_VERSION,\n    // Live: reconcile refreshes record.options when the chart's plugins config\n    // changes, so updateOptions({ plugins: [{ name, options }] }) reconfigures\n    // an active plugin in place. The returned object is frozen.\n    get options() {\n      return record.options;\n    },\n    // ── lifecycle subscription ──\n    /**\n     * @param {string} hook\n     * @param {Function} fn\n     */\n    on(hook, fn) {\n      const m2 = record.handlers;\n      if (!m2.has(hook)) m2.set(hook, []);\n      m2.get(hook).push(fn);\n      return api;\n    },\n    /**\n     * @param {string} hook\n     * @param {Function} fn\n     */\n    off(hook, fn) {\n      const a2 = record.handlers.get(hook);\n      if (a2) {\n        const i2 = a2.indexOf(fn);\n        if (i2 > -1) a2.splice(i2, 1);\n      }\n      return api;\n    },\n    // ── per-plugin, per-chart scratch state (survives updates, dropped on\n    //    destroy). The api object is frozen, but this object is mutable. ──\n    store: {},\n    // ── drawing (renderer-agnostic) ──\n    // Call this INSIDE each draw handler: the host wipes plugin layers at the\n    // start of every draw pass, so a handle cached across draws points at a\n    // detached node and its writes vanish silently.\n    /** @param {any} [opts] */\n    layer(opts) {\n      return host._layer(record.def.name, opts || {});\n    },\n    // ── reads ──\n    get scales() {\n      return host._currentScales;\n    },\n    // Served from the per-dispatch snapshot when one exists (invalidated at\n    // every dispatch), so reading api.data in a loop does not rebuild the\n    // point arrays on each property access.\n    get data() {\n      return host._lastData || (host._lastData = host._dataSnapshot());\n    },\n    theme: Object.freeze({\n      get mode() {\n        return w2.config.theme.mode;\n      },\n      get foreColor() {\n        return w2.config.chart.foreColor;\n      },\n      /** @param {number} i */\n      seriesColor(i2) {\n        return w2.globals.colors[i2];\n      },\n      /** @param {string} name */\n      token(name2) {\n        return host._token(name2);\n      }\n    }),\n    // ── curated actions (bound public methods only; NEVER raw w) ──\n    chart: buildBoundPublicMethods(ctx),\n    // ── custom events out to the host app ──\n    /**\n     * Fires as `plugin:<pluginName>:<name>` on the chart's event bus. The\n     * namespace is not optional: the bus also carries the internal lifecycle\n     * events ('updated', 'mounted', ...), and an un-namespaced emit could\n     * trigger every internal subscriber (history capture, re-render hooks).\n     * Listen with chart.addEventListener('plugin:myplugin:myevent', fn).\n     * @param {string} name\n     * @param {any} [detail]\n     */\n    emit(name2, detail) {\n      ctx.events.fireEvent(`plugin:${record.def.name}:${name2}`, [ctx, detail]);\n    },\n    // ── host element (read; lazy: baseEl is not set until render) ──\n    get el() {\n      return w2.dom.baseEl;\n    }\n  };\n  return Object.freeze(api);\n}\nclass WeaveHost {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.active = [];\n    this._layers = /* @__PURE__ */ new Map();\n    this._currentScales = null;\n    this._lastPluginsRef = null;\n    this._lastData = null;\n    this._updatedWired = false;\n    this._onUpdated = this._onUpdated.bind(this);\n    this._init();\n  }\n  _init() {\n    const list = this.w.config.plugins || [];\n    list.map((entry, i2) => ({\n      entry,\n      order: entry.order != null ? entry.order : i2\n    })).sort((a2, b2) => a2.order - b2.order).forEach((o2) => this._activate(o2.entry));\n    this._lastPluginsRef = this.w.config.plugins;\n    this._wireUpdated();\n  }\n  _wireUpdated() {\n    if (this._updatedWired) return;\n    this.ctx.addEventListener(\"updated\", this._onUpdated);\n    this._updatedWired = true;\n  }\n  _onUpdated() {\n    this.dispatch(\"afterUpdate\", { pass: \"update\" });\n  }\n  /**\n   * @param {any} entry { name, options?, order? }\n   */\n  _activate(entry) {\n    const def = getPlugin(entry.name);\n    if (!def) {\n      console.error(`[apexcharts] plugin \"${entry.name}\" is not registered.`);\n      return;\n    }\n    const v2 = def.apiVersion != null ? def.apiVersion : 1;\n    if (Math.trunc(v2) !== WEAVE_API_VERSION) {\n      console.error(\n        `[apexcharts] plugin \"${def.name}\" targets Weave API v${v2}, host is v${WEAVE_API_VERSION}; skipped.`\n      );\n      return;\n    }\n    const record = {\n      def,\n      options: Object.freeze(__spreadValues({}, entry.options || {})),\n      handlers: /* @__PURE__ */ new Map(),\n      disabled: false,\n      failures: 0,\n      api: null\n    };\n    record.api = buildPluginAPI(this, record);\n    this.active.push(record);\n    this._guard(record, \"setup\", () => def.setup(record.api));\n  }\n  /**\n   * @param {string} hook\n   * @param {{ pass?: string, xyRatios?: any }} [extra]\n   */\n  dispatch(hook, extra) {\n    if (hook === \"draw\") {\n      this._reconcile();\n      this._resetLayers();\n    }\n    this._lastData = null;\n    if (!this.active.length) return;\n    if (hook === \"afterParse\") {\n      this._currentScales = null;\n    } else if (extra && \"xyRatios\" in extra) {\n      this._setScales(extra.xyRatios);\n    }\n    const pass = extra && extra.pass || \"full\";\n    let data = null;\n    for (const record of this.active) {\n      if (record.disabled) continue;\n      const fns = record.handlers.get(hook);\n      if (!fns || !fns.length) continue;\n      if (data === null) {\n        data = this._dataSnapshot();\n        this._lastData = data;\n      }\n      const payload = {\n        api: record.api,\n        scales: this._currentScales,\n        data,\n        pass,\n        hook\n      };\n      for (const fn of fns.slice()) {\n        this._guard(record, hook, () => fn(payload));\n      }\n    }\n  }\n  /**\n   * @param {any} record\n   * @param {string} where\n   * @param {Function} fn\n   */\n  _guard(record, where, fn) {\n    if (record.disabled) return;\n    try {\n      fn();\n    } catch (e2) {\n      console.error(\n        `[apexcharts] plugin \"${record.def.name}\" threw in \"${where}\":`,\n        e2\n      );\n      record.failures = (record.failures || 0) + 1;\n      if (record.failures >= 3) {\n        record.disabled = true;\n        console.error(\n          `[apexcharts] plugin \"${record.def.name}\" disabled after repeated errors.`\n        );\n      }\n    }\n  }\n  // ─── Scales facade ──────────────────────────────────────────────────────\n  /**\n   * Build api.scales from the SAME xyRatios the series were drawn with, so\n   * plugin pixels align with series pixels by construction.\n   * @param {any} xyRatios\n   */\n  _setScales(xyRatios) {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const L2 = w2.layout;\n    if (!xyRatios || !gl.axisCharts) {\n      this._currentScales = null;\n      return;\n    }\n    const xRatio = xyRatios.xRatio;\n    const yRatio = xyRatios.yRatio || [];\n    const yr = (axis) => yRatio[axis] != null ? yRatio[axis] : yRatio[0];\n    const maxY = (axis) => gl.maxYArr[axis] != null ? gl.maxYArr[axis] : gl.maxY;\n    const minY = (axis) => gl.minYArr[axis] != null ? gl.minYArr[axis] : gl.minY;\n    this._currentScales = {\n      /** @param {number} v */\n      x: (v2) => L2.translateX + (v2 - gl.minX) / xRatio,\n      /**\n       * @param {number} v\n       * @param {number} [axis]\n       */\n      y: (v2, axis = 0) => L2.translateY + (maxY(axis) - v2) / yr(axis),\n      domainX: [gl.minX, gl.maxX],\n      /** @param {number} [axis] */\n      domainY: (axis = 0) => [minY(axis), maxY(axis)],\n      gridWidth: L2.gridWidth,\n      gridHeight: L2.gridHeight,\n      ratios: xyRatios\n    };\n  }\n  // ─── Read-only data snapshot ────────────────────────────────────────────\n  /**\n   * @returns {any[]} defensive per-series snapshot (never the live slice)\n   */\n  _dataSnapshot() {\n    const w2 = this.w;\n    const gl = w2.globals;\n    const series = w2.seriesData.series || [];\n    const seriesX = w2.seriesData.seriesX || [];\n    return series.map((sData, i2) => {\n      const xs = seriesX[i2] || [];\n      const points = (sData || []).map((y, j) => ({\n        x: xs[j] != null ? xs[j] : j,\n        y\n      }));\n      return {\n        name: gl.seriesNames ? gl.seriesNames[i2] : void 0,\n        hidden: (gl.collapsedSeriesIndices || []).includes(i2),\n        color: gl.colors ? gl.colors[i2] : void 0,\n        points\n      };\n    });\n  }\n  // ─── Theme tokens ───────────────────────────────────────────────────────\n  /**\n   * @param {string} name\n   * @returns {any}\n   */\n  _token(name2) {\n    const w2 = this.w;\n    const gl = w2.globals;\n    switch (name2) {\n      case \"foreColor\":\n        return w2.config.chart.foreColor;\n      case \"background\":\n        return w2.config.chart.background;\n      case \"accent\":\n      case \"primary\":\n        return gl.colors ? gl.colors[0] : void 0;\n      default:\n        if (/^series-\\d+$/.test(name2)) {\n          return gl.colors ? gl.colors[Number(name2.split(\"-\")[1])] : void 0;\n        }\n        return void 0;\n    }\n  }\n  // ─── Layers ─────────────────────────────────────────────────────────────\n  /**\n   * @param {string} name\n   * @param {{ z?: 'front'|'behind', className?: string }} opts\n   */\n  _layer(name2, { z = \"front\", className = \"\" } = {}) {\n    let g2 = this._layers.get(name2);\n    if (!g2) {\n      g2 = this.ctx.graphics.group({\n        class: `apexcharts-plugin-${name2} ${className}`.trim()\n      });\n      const parent = this.w.dom.elGraphical.node;\n      if (z === \"behind\") parent.insertBefore(g2.node, parent.firstChild);\n      else parent.appendChild(g2.node);\n      g2.node.setAttribute(\"aria-hidden\", \"true\");\n      this._layers.set(name2, g2);\n    }\n    return makeLayerHandle(g2, this.ctx.graphics);\n  }\n  /**\n   * Remove all plugin layers. Run at the start of every `draw` because\n   * fastUpdate only removes series/data-label groups (not arbitrary plugin\n   * groups), so without this, fast-path redraws would duplicate plugin output.\n   */\n  _resetLayers() {\n    const el = this.w.dom.elGraphical;\n    const parent = el && el.node;\n    if (parent) {\n      const groups = parent.querySelectorAll('g[class*=\"apexcharts-plugin-\"]');\n      Array.prototype.forEach.call(groups, (n2) => n2.remove());\n    }\n    this._layers.clear();\n  }\n  // ─── Config-change reconciliation ───────────────────────────────────────\n  /**\n   * Diff w.config.plugins by name: teardown removed, activate added; unchanged\n   * plugins keep their instance + store, but their `options` are refreshed from\n   * the new entry (api.options is a live getter), so\n   * updateOptions({ plugins: [{ name, options }] }) reconfigures in place.\n   * Skipped when the plugins array reference is unchanged (fast redraws), so it\n   * costs nothing on hover.\n   */\n  _reconcile() {\n    const plugins = this.w.config.plugins || [];\n    if (plugins === this._lastPluginsRef) return;\n    this._lastPluginsRef = plugins;\n    const desired = new Map(\n      plugins.map((e2, i2) => [\n        e2.name,\n        { entry: e2, order: e2.order != null ? e2.order : i2 }\n      ])\n    );\n    for (let i2 = this.active.length - 1; i2 >= 0; i2--) {\n      const r2 = this.active[i2];\n      const want = desired.get(r2.def.name);\n      if (!want) {\n        this._guard(r2, \"destroy\", () => r2.def.destroy && r2.def.destroy(r2.api));\n        this.active.splice(i2, 1);\n      } else {\n        r2.options = Object.freeze(__spreadValues({}, want.entry.options || {}));\n      }\n    }\n    const activeNames = new Set(this.active.map((r2) => r2.def.name));\n    const toAdd = [];\n    desired.forEach((v2, name2) => {\n      if (!activeNames.has(name2)) toAdd.push(v2);\n    });\n    toAdd.sort((a2, b2) => a2.order - b2.order).forEach((v2) => this._activate(v2.entry));\n  }\n  /**\n   * @param {boolean} [isUpdating]\n   */\n  teardown(isUpdating) {\n    if (!isUpdating) {\n      this.dispatch(\"destroy\");\n      for (const record of this.active) {\n        this._guard(record, \"destroy\", () => record.def.destroy && record.def.destroy(record.api));\n      }\n      this.active = [];\n      if (this._updatedWired) {\n        this.ctx.removeEventListener && this.ctx.removeEventListener(\"updated\", this._onUpdated);\n        this._updatedWired = false;\n      }\n    }\n    this._layers.clear();\n  }\n}\nApexCharts.registerFeatures({ weave: WeaveHost });\nconst STYLE_KEYS = {\n  fill: \"fill\",\n  stroke: \"stroke\",\n  \"stroke-width\": \"strokeWidth\",\n  \"stroke-dasharray\": \"strokeDash\",\n  \"stroke-linecap\": \"lineCap\",\n  \"fill-opacity\": \"fillOpacity\",\n  \"stroke-opacity\": \"strokeOpacity\",\n  \"fill-rule\": \"fillRule\"\n};\nconst NEVER = Symbol(\"never\");\nconst SHAPE_ID = {\n  circle: 0,\n  square: 1,\n  rect: 1,\n  triangle: 2,\n  diamond: 3,\n  star: 4,\n  sparkle: 5,\n  cross: 6,\n  plus: 7,\n  line: 8\n};\nconst SHAPE_NAME = [\n  \"circle\",\n  \"square\",\n  \"triangle\",\n  \"diamond\",\n  \"star\",\n  \"sparkle\",\n  \"cross\",\n  \"plus\",\n  \"line\"\n];\nconst NOOP_RUNNER = {\n  /** @returns {any} */\n  attr() {\n    return NOOP_RUNNER;\n  },\n  plot() {\n    return NOOP_RUNNER;\n  },\n  during() {\n    return NOOP_RUNNER;\n  },\n  after(fn) {\n    if (typeof fn === \"function\") fn();\n    return NOOP_RUNNER;\n  },\n  animate() {\n    return NOOP_RUNNER;\n  },\n  delay() {\n    return NOOP_RUNNER;\n  },\n  loop() {\n    return NOOP_RUNNER;\n  },\n  finish() {\n    return NOOP_RUNNER;\n  },\n  stop() {\n    return NOOP_RUNNER;\n  }\n};\nconst SHARED_MARKER_NODE = {\n  nodeName: \"path\",\n  style: {},\n  classList: { add() {\n  }, remove() {\n  }, toggle() {\n  }, contains: () => false },\n  setAttribute() {\n  },\n  getAttribute: () => null,\n  removeAttribute() {\n  },\n  hasAttribute: () => false,\n  addEventListener() {\n  },\n  removeEventListener() {\n  },\n  appendChild() {\n  },\n  getBBox: () => ({ x: 0, y: 0, width: 0, height: 0 })\n};\nconst SHARED_GROUP = {\n  __isCanvasMark: true,\n  node: {\n    nodeName: \"g\",\n    instance: null,\n    style: {},\n    classList: { add() {\n    }, remove() {\n    }, toggle() {\n    }, contains: () => false },\n    setAttribute() {\n    },\n    getAttribute: () => null,\n    removeAttribute() {\n    },\n    addEventListener() {\n    },\n    removeEventListener() {\n    },\n    appendChild() {\n    },\n    getBBox: () => ({ x: 0, y: 0, width: 0, height: 0 })\n  },\n  /** @returns {any} */\n  attr() {\n    return SHARED_GROUP;\n  },\n  add() {\n    return SHARED_GROUP;\n  },\n  addTo() {\n    return SHARED_GROUP;\n  },\n  remove() {\n    return SHARED_GROUP;\n  },\n  clear() {\n    return SHARED_GROUP;\n  },\n  css() {\n    return SHARED_GROUP;\n  },\n  hide() {\n    return SHARED_GROUP;\n  },\n  show() {\n    return SHARED_GROUP;\n  },\n  removeClass() {\n    return SHARED_GROUP;\n  },\n  animate() {\n    return NOOP_RUNNER;\n  }\n};\nclass CanvasMarkerRef {\n  /**\n   * @param {CanvasGraphics} g\n   * @param {number} i\n   */\n  constructor(g2, i2) {\n    this.__isCanvasMark = true;\n    this._g = g2;\n    this._i = i2;\n  }\n  get node() {\n    return SHARED_MARKER_NODE;\n  }\n  /**\n   * @param {any} a\n   * @param {any} [v]\n   * @returns {any}\n   */\n  attr(a2, v2) {\n    if (typeof a2 === \"string\") {\n      if (a2 === \"fill\" && v2 !== void 0) this._g._setMarkerFill(this._i, v2);\n      return v2 === void 0 ? null : this;\n    }\n    if (a2 && a2.fill !== void 0) this._g._setMarkerFill(this._i, a2.fill);\n    return this;\n  }\n  /** @param {any} _c */\n  add(_c) {\n    return this;\n  }\n  /** @param {any} _p */\n  addTo(_p) {\n    return this;\n  }\n  remove() {\n    return this;\n  }\n  /** @param {any} _s */\n  css(_s) {\n    return this;\n  }\n  /** @param {any} _v */\n  fill(_v) {\n    if (_v !== void 0) this._g._setMarkerFill(this._i, _v);\n    return this;\n  }\n  /** @param {any} _v */\n  stroke(_v) {\n    return this;\n  }\n  hide() {\n    return this;\n  }\n  show() {\n    return this;\n  }\n  /** @param {string} _c */\n  removeClass(_c) {\n    return this;\n  }\n  animate() {\n    return NOOP_RUNNER;\n  }\n}\nconst SHARED_RECT_REF = {\n  __isCanvasMark: true,\n  node: SHARED_MARKER_NODE,\n  /** @returns {any} */\n  attr() {\n    return SHARED_RECT_REF;\n  },\n  add() {\n    return SHARED_RECT_REF;\n  },\n  addTo() {\n    return SHARED_RECT_REF;\n  },\n  remove() {\n    return SHARED_RECT_REF;\n  },\n  /** @returns {any} */\n  css() {\n    return SHARED_RECT_REF;\n  },\n  animate() {\n    return NOOP_RUNNER;\n  }\n};\nclass CanvasMark {\n  /** @param {any} cmd */\n  constructor(cmd) {\n    this.__isCanvasMark = true;\n    this._cmd = cmd;\n    const self = this;\n    this.node = {\n      nodeName: cmd ? cmd.tag : \"g\",\n      instance: this,\n      style: {},\n      classList: { add() {\n      }, remove() {\n      }, toggle() {\n      }, contains: () => false },\n      /** @param {string} k @param {any} v */\n      setAttribute(k, v2) {\n        self._applyAttr(k, v2);\n      },\n      getAttribute: () => null,\n      removeAttribute() {\n      },\n      hasAttribute: () => false,\n      addEventListener() {\n      },\n      removeEventListener() {\n      },\n      appendChild() {\n      },\n      getBBox: () => ({ x: 0, y: 0, width: 0, height: 0 })\n    };\n  }\n  /**\n   * @param {string} k\n   * @param {any} v\n   */\n  _applyAttr(k, v2) {\n    const cmd = this._cmd;\n    if (!cmd) return;\n    const sk = STYLE_KEYS[k];\n    if (sk !== void 0) cmd[sk] = v2;\n  }\n  /**\n   * @param {any} a\n   * @param {any} [v]\n   * @returns {any}\n   */\n  attr(a2, v2) {\n    if (typeof a2 === \"string\") {\n      if (v2 === void 0) return null;\n      this._applyAttr(a2, v2);\n      return this;\n    }\n    for (const k in a2) {\n      if (a2[k] !== void 0) this._applyAttr(k, a2[k]);\n    }\n    return this;\n  }\n  /** @param {any} _c */\n  add(_c) {\n    return this;\n  }\n  /** @param {any} _p */\n  addTo(_p) {\n    return this;\n  }\n  remove() {\n    return this;\n  }\n  clear() {\n    return this;\n  }\n  /** @param {any} _s */\n  css(_s) {\n    return this;\n  }\n  /** @param {any} v */\n  fill(v2) {\n    if (typeof v2 === \"object\") return this.attr(v2);\n    return this.attr(\"fill\", v2);\n  }\n  /** @param {any} v */\n  stroke(v2) {\n    if (typeof v2 === \"object\") {\n      if (v2.color !== void 0) this.attr(\"stroke\", v2.color);\n      if (v2.width !== void 0) this.attr(\"stroke-width\", v2.width);\n      return this;\n    }\n    return this.attr(\"stroke\", v2);\n  }\n  /** @param {string} d */\n  plot(d) {\n    if (typeof d === \"string\" && this._cmd && this._cmd.tag === \"path\") {\n      this._cmd.d = d;\n    }\n    return this;\n  }\n  hide() {\n    return this;\n  }\n  show() {\n    return this;\n  }\n  /** @param {string} _c */\n  removeClass(_c) {\n    return this;\n  }\n  bbox() {\n    return { x: 0, y: 0, width: 0, height: 0 };\n  }\n  animate() {\n    return NOOP_RUNNER;\n  }\n}\nclass CanvasGraphics {\n  /** @param {any} w */\n  constructor(w2) {\n    this.w = w2;\n    this._g = new Graphics(w2);\n    this._list = [];\n    this._mx = new Float64Array(16);\n    this._my = new Float64Array(16);\n    this._msize = new Float64Array(16);\n    this._mshape = new Int16Array(16);\n    this._mstyle = new Int32Array(16);\n    this._msi = new Int32Array(16);\n    this._mn = 0;\n    this._mcap = 16;\n    this._crx = new Float64Array(16);\n    this._cry = new Float64Array(16);\n    this._crw = new Float64Array(16);\n    this._crh = new Float64Array(16);\n    this._crstyle = new Int32Array(16);\n    this._crsi = new Int32Array(16);\n    this._crdi = new Int32Array(16);\n    this._crn = 0;\n    this._crcap = 16;\n    this._cellRadius = 0;\n    this._styles = [];\n    this._styleMap = /* @__PURE__ */ new Map();\n    this._lf = NEVER;\n    this._ls = NEVER;\n    this._lsw = NEVER;\n    this._ld = NEVER;\n    this._lfo = NEVER;\n    this._lso = NEVER;\n    this._lid = -1;\n    this._lofFill = NEVER;\n    this._lofBase = -1;\n    this._lofId = -1;\n    this._rlf = NEVER;\n    this._rls = NEVER;\n    this._rlsw = NEVER;\n    this._rlfo = NEVER;\n    this._rlso = NEVER;\n    this._rlid = -1;\n  }\n  _resetStyleCache() {\n    this._lf = NEVER;\n    this._ls = NEVER;\n    this._lsw = NEVER;\n    this._ld = NEVER;\n    this._lfo = NEVER;\n    this._lso = NEVER;\n    this._lid = -1;\n    this._lofFill = NEVER;\n    this._lofBase = -1;\n    this._lofId = -1;\n    this._rlf = NEVER;\n    this._rls = NEVER;\n    this._rlsw = NEVER;\n    this._rlfo = NEVER;\n    this._rlso = NEVER;\n    this._rlid = -1;\n  }\n  /** Start a fresh scene (columnar marker store + object-command list). */\n  reset() {\n    this._list = [];\n    this._mn = 0;\n    this._styles = [];\n    this._styleMap = /* @__PURE__ */ new Map();\n    this._resetStyleCache();\n    const series = this.w.config.series || [];\n    let cap = 16;\n    for (let i2 = 0; i2 < series.length; i2++) {\n      const d = series[i2] && series[i2].data;\n      if (Array.isArray(d)) cap += d.length;\n    }\n    cap = Math.ceil(cap * 1.15) + 16;\n    if (cap > this._mcap) this._allocMarkers(cap);\n    this._crn = 0;\n    this._cellRadius = 0;\n    if (cap > this._crcap) this._allocRects(cap);\n  }\n  /** @param {number} cap */\n  _allocRects(cap) {\n    this._crcap = cap;\n    this._crx = new Float64Array(cap);\n    this._cry = new Float64Array(cap);\n    this._crw = new Float64Array(cap);\n    this._crh = new Float64Array(cap);\n    this._crstyle = new Int32Array(cap);\n    this._crsi = new Int32Array(cap);\n    this._crdi = new Int32Array(cap);\n  }\n  /** Grow the rect columns (rare: capacity estimate was low). */\n  _growRects() {\n    const cap = this._crcap * 2;\n    const nx = new Float64Array(cap);\n    nx.set(this._crx);\n    this._crx = nx;\n    const ny = new Float64Array(cap);\n    ny.set(this._cry);\n    this._cry = ny;\n    const nw = new Float64Array(cap);\n    nw.set(this._crw);\n    this._crw = nw;\n    const nh = new Float64Array(cap);\n    nh.set(this._crh);\n    this._crh = nh;\n    const nst = new Int32Array(cap);\n    nst.set(this._crstyle);\n    this._crstyle = nst;\n    const nsi = new Int32Array(cap);\n    nsi.set(this._crsi);\n    this._crsi = nsi;\n    const ndi = new Int32Array(cap);\n    ndi.set(this._crdi);\n    this._crdi = ndi;\n    this._crcap = cap;\n  }\n  /** @param {number} cap */\n  _allocMarkers(cap) {\n    this._mcap = cap;\n    this._mx = new Float64Array(cap);\n    this._my = new Float64Array(cap);\n    this._msize = new Float64Array(cap);\n    this._mshape = new Int16Array(cap);\n    this._mstyle = new Int32Array(cap);\n    this._msi = new Int32Array(cap);\n  }\n  /** Grow the marker columns (rare: capacity estimate was low). */\n  _growMarkers() {\n    const cap = this._mcap * 2;\n    const nx = new Float64Array(cap);\n    nx.set(this._mx);\n    this._mx = nx;\n    const ny = new Float64Array(cap);\n    ny.set(this._my);\n    this._my = ny;\n    const ns = new Float64Array(cap);\n    ns.set(this._msize);\n    this._msize = ns;\n    const nsh = new Int16Array(cap);\n    nsh.set(this._mshape);\n    this._mshape = nsh;\n    const nst = new Int32Array(cap);\n    nst.set(this._mstyle);\n    this._mstyle = nst;\n    const nsi = new Int32Array(cap);\n    nsi.set(this._msi);\n    this._msi = nsi;\n    this._mcap = cap;\n  }\n  displayList() {\n    return this._list;\n  }\n  markerCount() {\n    return this._mn;\n  }\n  /**\n   * Intern a marker style; returns its palette id. Keeps the per-point columns\n   * numeric (no retained per-point object).\n   * @param {any} fill @param {any} stroke @param {any} sw @param {any} dash\n   * @param {any} fo @param {any} so\n   * @returns {number}\n   */\n  _internStyle(fill, stroke, sw, dash, fo, so) {\n    const key = `${fill}|${stroke}|${sw}|${dash}|${fo}|${so}`;\n    const cached = this._styleMap.get(key);\n    if (cached !== void 0) return cached;\n    const id = this._styles.length;\n    this._styles.push({\n      fill,\n      stroke,\n      strokeWidth: sw,\n      strokeDash: dash,\n      fillOpacity: fo,\n      strokeOpacity: so\n    });\n    this._styleMap.set(key, id);\n    return id;\n  }\n  /**\n   * Override a recorded marker's fill (scatter sets a per-point fill via `attr`\n   * right after drawMarker). Like the draw path, the string-key intern is cached\n   * on (base style, fill) so the Map/string work stays OFF the per-point path\n   * (it otherwise mixes with the `_mstyle[i]` typed-array write → the ~80× slow\n   * path). For a scatter series the base + fill are uniform, so it interns once.\n   * @param {number} i @param {any} fill\n   */\n  _setMarkerFill(i2, fill) {\n    const base = this._mstyle[i2];\n    if (fill === this._lofFill && base === this._lofBase) {\n      this._mstyle[i2] = this._lofId;\n      return;\n    }\n    const s2 = this._styles[base];\n    if (!s2 || s2.fill === fill) {\n      this._lofFill = fill;\n      this._lofBase = base;\n      this._lofId = base;\n      return;\n    }\n    const id = this._internStyle(\n      fill,\n      s2.stroke,\n      s2.strokeWidth,\n      s2.strokeDash,\n      s2.fillOpacity,\n      s2.strokeOpacity\n    );\n    this._mstyle[i2] = id;\n    this._lofFill = fill;\n    this._lofBase = base;\n    this._lofId = id;\n  }\n  /** @param {number} i @returns {any} the style object for a marker index */\n  markerStyle(i2) {\n    return this._styles[this._mstyle[i2]];\n  }\n  /** @param {number} i @returns {number} series (realIndex) of a marker, -1 if none */\n  markerSeries(i2) {\n    return this._msi[i2];\n  }\n  /** @param {number} id @returns {string} */\n  shapeName(id) {\n    return SHAPE_NAME[id] || \"circle\";\n  }\n  // ── columnar rect cell (heatmap): parallel unboxed arrays, no per-cell object ──\n  /**\n   * Record a heatmap-style cell (a filled, optionally stroked rect). Geometry\n   * and style are captured up front into the columns; the returned handle is a\n   * shared no-op (the emit site sets nothing back on it in canvas mode).\n   * @param {number} x @param {number} y @param {number} w @param {number} h\n   * @param {any} opts {fill, fillOpacity, stroke, strokeWidth, radius, seriesIndex, dataPointIndex}\n   * @returns {any}\n   */\n  drawRectCell(x, y, w2, h2, opts = {}) {\n    const styleId = this._rectStyleId(opts);\n    if (this._crn >= this._crcap) this._growRects();\n    const i2 = this._crn++;\n    this._crx[i2] = x || 0;\n    this._cry[i2] = y || 0;\n    this._crw[i2] = w2 > 0 ? w2 : 0;\n    this._crh[i2] = h2 > 0 ? h2 : 0;\n    this._crstyle[i2] = styleId;\n    this._crsi[i2] = opts.seriesIndex == null ? -1 : opts.seriesIndex;\n    this._crdi[i2] = opts.dataPointIndex == null ? -1 : opts.dataPointIndex;\n    if (opts.radius) this._cellRadius = opts.radius;\n    return SHARED_RECT_REF;\n  }\n  /**\n   * Resolve (and dedupe) a rect-cell style → shared-palette id. A last-style\n   * cache keeps the Map/string work off the path for runs of same-style cells.\n   * @param {any} opts\n   * @returns {number}\n   */\n  _rectStyleId(opts) {\n    const fill = opts.fill;\n    const stroke = opts.stroke;\n    const sw = opts.strokeWidth;\n    const fo = opts.fillOpacity;\n    const so = opts.strokeOpacity;\n    if (fill === this._rlf && stroke === this._rls && sw === this._rlsw && fo === this._rlfo && so === this._rlso) {\n      return this._rlid;\n    }\n    const id = this._internStyle(fill, stroke, sw, 0, fo, so);\n    this._rlf = fill;\n    this._rls = stroke;\n    this._rlsw = sw;\n    this._rlfo = fo;\n    this._rlso = so;\n    this._rlid = id;\n    return id;\n  }\n  /** @returns {number} number of recorded rect cells */\n  rectCount() {\n    return this._crn;\n  }\n  /** @param {number} i @returns {any} the style object for a rect cell */\n  rectStyle(i2) {\n    return this._styles[this._crstyle[i2]];\n  }\n  /** @param {number} i @returns {number} series (realIndex) of a cell, -1 if none */\n  rectSeries(i2) {\n    return this._crsi[i2];\n  }\n  /**\n   * @param {string} tag\n   * @param {number} z\n   * @returns {any}\n   */\n  _cmd(tag, z) {\n    const cmd = {\n      tag,\n      z: z || 0,\n      fill: void 0,\n      stroke: void 0,\n      strokeWidth: void 0,\n      strokeDash: void 0,\n      lineCap: void 0,\n      fillOpacity: void 0,\n      strokeOpacity: void 0,\n      fillRule: void 0\n    };\n    this._list.push(cmd);\n    return cmd;\n  }\n  // ── organizational (groups don't paint or record) ──\n  // Series draw() creates a wrap group PER POINT (scatter.draw / plotChartMarkers\n  // run per point), so allocating a handle per group is ~50k heavy allocations\n  // at scale: enough transient churn to tip V8 into a GC blow-up. Groups carry\n  // no paint state in canvas mode (attr/add are no-ops), so every group shares\n  // one singleton: zero per-point allocation.\n  /** @param {any} _attrs */\n  group(_attrs) {\n    return SHARED_GROUP;\n  }\n  // ── per-point marker (line/area markers, scatter, bubble): COLUMNAR ──\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @param {any} opts\n   */\n  drawMarker(x, y, opts = {}) {\n    var _a;\n    const styleId = this._markerStyleId(opts);\n    if (this._mn >= this._mcap) this._growMarkers();\n    const i2 = this._mn++;\n    this._mx[i2] = x || 0;\n    this._my[i2] = typeof y === \"number\" ? y : NaN;\n    this._msize[i2] = opts.pSize || 0;\n    this._mshape[i2] = (_a = SHAPE_ID[opts.shape || \"circle\"]) != null ? _a : 0;\n    this._mstyle[i2] = styleId;\n    this._msi[i2] = opts.seriesIndex == null ? -1 : opts.seriesIndex;\n    return new CanvasMarkerRef(this, i2);\n  }\n  /**\n   * Resolve (and dedupe) a marker style → palette id. A last-style cache keeps\n   * the Map/string work off the path when consecutive markers share a style\n   * (the common case), so intern runs once per style run.\n   * @param {any} opts\n   * @returns {number}\n   */\n  _markerStyleId(opts) {\n    const shape = opts.shape || \"circle\";\n    const strokeTinted = shape === \"line\" || shape === \"plus\" || shape === \"cross\";\n    const fill = strokeTinted ? \"none\" : opts.pointFillColor;\n    const stroke = strokeTinted ? opts.pointFillColor : opts.pointStrokeColor;\n    const sw = opts.pointStrokeWidth;\n    const dash = opts.pointStrokeDashArray;\n    const fo = opts.pointFillOpacity;\n    const so = strokeTinted ? opts.pointFillOpacity : opts.pointStrokeOpacity;\n    if (fill === this._lf && stroke === this._ls && sw === this._lsw && dash === this._ld && fo === this._lfo && so === this._lso) {\n      return this._lid;\n    }\n    const id = this._internStyle(fill, stroke, sw, dash, fo, so);\n    this._lf = fill;\n    this._ls = stroke;\n    this._lsw = sw;\n    this._ld = dash;\n    this._lfo = fo;\n    this._lso = so;\n    this._lid = id;\n    return id;\n  }\n  // ── series body path (line/area/bar): object command ──\n  /** @param {any} opts */\n  renderPaths(opts) {\n    const cmd = this._cmd(\"path\", opts.realIndex);\n    cmd.d = opts.pathTo;\n    if (opts.pathToNumeric) {\n      cmd.nxs = opts.pathToNumeric.xs;\n      cmd.nys = opts.pathToNumeric.ys;\n      cmd.ncloseY = opts.pathToNumeric.closeY;\n    }\n    cmd.stroke = opts.stroke;\n    cmd.strokeWidth = opts.strokeWidth;\n    cmd.fill = opts.fill;\n    cmd.lineCap = opts.strokeLinecap;\n    cmd.si = opts.realIndex;\n    this.w.globals.animationEnded = true;\n    return new CanvasMark(cmd);\n  }\n  /** @param {any} opts */\n  drawPath(opts) {\n    const cmd = this._cmd(\"path\", 0);\n    cmd.d = opts.d;\n    cmd.stroke = opts.stroke;\n    cmd.strokeWidth = opts.strokeWidth;\n    cmd.fill = opts.fill;\n    cmd.fillOpacity = opts.fillOpacity;\n    cmd.strokeOpacity = opts.strokeOpacity;\n    cmd.lineCap = opts.strokeLinecap;\n    cmd.strokeDash = opts.strokeDashArray;\n    return new CanvasMark(cmd);\n  }\n  // ── remaining primitives (contract completeness / Marks #11 forward-compat) ──\n  /**\n   * @param {number} x1 @param {number} y1 @param {number} x2 @param {number} y2\n   * @param {string} lineColor @param {any} dashArray @param {number} strokeWidth\n   */\n  drawLine(x1, y1, x2, y2, lineColor = \"#a8a8a8\", dashArray = 0, strokeWidth = 1) {\n    const cmd = this._cmd(\"line\", 0);\n    cmd.lx1 = x1;\n    cmd.ly1 = y1;\n    cmd.lx2 = x2;\n    cmd.ly2 = y2;\n    cmd.stroke = lineColor;\n    cmd.strokeDash = dashArray;\n    cmd.strokeWidth = strokeWidth;\n    return new CanvasMark(cmd);\n  }\n  /**\n   * Mirrors Graphics.drawRect's full signature (including stroke), so callers\n   * that stroke rects (Marks api.rect, chart code) paint the same on canvas.\n   * @param {number} x1 @param {number} y1 @param {number} x2 @param {number} y2\n   * @param {number} radius @param {string} color @param {number} opacity\n   * @param {number|null} [strokeWidth] @param {string|null} [strokeColor]\n   * @param {any} [strokeDashArray]\n   */\n  drawRect(x1 = 0, y1 = 0, x2 = 0, y2 = 0, radius = 0, color = \"#fefefe\", opacity = 1, strokeWidth = null, strokeColor = null, strokeDashArray = 0) {\n    const cmd = this._cmd(\"rect\", 0);\n    cmd.x1 = x1;\n    cmd.y1 = y1;\n    cmd.rw = x2 > 0 ? x2 : 0;\n    cmd.rh = y2 > 0 ? y2 : 0;\n    cmd.radius = radius;\n    cmd.fill = color;\n    cmd.fillOpacity = opacity;\n    if (strokeColor != null) {\n      cmd.stroke = strokeColor;\n      cmd.strokeWidth = strokeWidth == null ? 1 : strokeWidth;\n      cmd.strokeDash = strokeDashArray;\n    }\n    return new CanvasMark(cmd);\n  }\n  /**\n   * @param {number} radius\n   * @param {any} attrs\n   */\n  drawCircle(radius, attrs = null) {\n    const cmd = this._cmd(\"circle\", 0);\n    cmd.r = radius < 0 ? 0 : radius;\n    if (attrs) {\n      cmd.cx = attrs.cx;\n      cmd.cy = attrs.cy;\n      if (attrs.fill !== void 0) cmd.fill = attrs.fill;\n      if (attrs.stroke !== void 0) cmd.stroke = attrs.stroke;\n    }\n    return new CanvasMark(cmd);\n  }\n  /** @param {any} opts */\n  drawText(opts) {\n    const cmd = this._cmd(\"text\", 0);\n    cmd.text = Array.isArray(opts.text) ? opts.text.join(\" \") : opts.text;\n    cmd.tx = opts.x;\n    cmd.ty = opts.y;\n    cmd.textAnchor = opts.textAnchor || \"start\";\n    cmd.fontSize = opts.fontSize;\n    cmd.fontFamily = opts.fontFamily;\n    cmd.fill = opts.foreColor;\n    return new CanvasMark(cmd);\n  }\n  /**\n   * Resolve a marker's SVG path `d` (non-circle shapes) lazily at paint time.\n   * @param {number} x @param {number} y @param {number} shapeId @param {number} size\n   * @returns {string}\n   */\n  markerPath(x, y, shapeId, size) {\n    return this._g.getMarkerPath(x, y, SHAPE_NAME[shapeId] || \"circle\", size);\n  }\n}\nconst TWO_PI = Math.PI * 2;\nconst DPR_CAP = 2;\nclass CanvasCompositor {\n  /** @param {any} w */\n  constructor(w2) {\n    this.w = w2;\n    this._host = null;\n    this._canvas = null;\n    this._c2d = null;\n    this._margin = 0;\n    this._dpr = 1;\n    this._dim = null;\n    this._alpha = 1;\n    this._unitPaths = /* @__PURE__ */ new Map();\n    this._markerBatches = 0;\n  }\n  /** Marker style-batches applied during the last paint() (dev/test hook). */\n  markerBatchCount() {\n    return this._markerBatches;\n  }\n  /**\n   * Opacity multiplier for a series index under the active dim spec: 1 for the\n   * highlighted series (or when not dimming, or for unidentified marks), else\n   * the inactive opacity.\n   * @param {number} si\n   * @returns {number}\n   */\n  _seriesAlpha(si) {\n    const d = this._dim;\n    if (!d || d.active == null || d.active < 0 || si == null || si < 0) return 1;\n    return si === d.active ? 1 : d.opacity == null ? 0.2 : d.opacity;\n  }\n  _plotDims() {\n    var _a;\n    const gw = Math.max(0, Math.ceil(this.w.layout.gridWidth || 0));\n    const gh = Math.max(0, Math.ceil(this.w.layout.gridHeight || 0));\n    const largest = ((_a = this.w.globals.markers) == null ? void 0 : _a.largestSize) || 0;\n    const margin = Math.ceil(largest + 8);\n    return { gw, gh, margin };\n  }\n  /**\n   * Create (or recreate) the foreignObject + canvas sized to the plot rect and\n   * return the SVGElement host that `plotChartType` inserts into the tree.\n   * @returns {any}\n   */\n  createHost() {\n    const win = BrowserAPIs.getWindow();\n    this._dpr = Math.min(DPR_CAP, win && win.devicePixelRatio || 1);\n    const { gw, gh, margin } = this._plotDims();\n    this._margin = margin;\n    const w2 = gw + margin * 2;\n    const h2 = gh + margin * 2;\n    const fo = BrowserAPIs.createElementNS(SVGNS$2, \"foreignObject\");\n    fo.setAttribute(\"x\", String(-margin));\n    fo.setAttribute(\"y\", String(-margin));\n    fo.setAttribute(\"width\", String(w2));\n    fo.setAttribute(\"height\", String(h2));\n    fo.setAttribute(\"class\", \"apexcharts-canvas-series\");\n    fo.style.overflow = \"visible\";\n    const canvas = (\n      /** @type {any} */\n      BrowserAPIs.createElement(\"canvas\")\n    );\n    canvas.setAttribute(\"class\", \"apexcharts-series-canvas\");\n    canvas.width = Math.max(1, Math.round(w2 * this._dpr));\n    canvas.height = Math.max(1, Math.round(h2 * this._dpr));\n    canvas.style.width = w2 + \"px\";\n    canvas.style.height = h2 + \"px\";\n    canvas.style.pointerEvents = \"none\";\n    fo.appendChild(canvas);\n    this._canvas = canvas;\n    this._c2d = canvas.getContext(\"2d\");\n    this._host = new SVGElement(fo);\n    return this._host;\n  }\n  getHost() {\n    return this._host;\n  }\n  clear() {\n    if (!this._c2d || !this._canvas) return;\n    this._c2d.setTransform(1, 0, 0, 1, 0, 0);\n    this._c2d.clearRect(0, 0, this._canvas.width, this._canvas.height);\n  }\n  /**\n   * Re-check devicePixelRatio before painting: a restyle() repaint after the\n   * window moved between monitors would otherwise keep the stale backing-store\n   * scale (blurry or over-sized) until the next full render rebuilds the host.\n   * The canvas CSS size is unchanged; only the backing store is resized.\n   */\n  _syncDpr() {\n    if (!this._canvas) return;\n    const win = BrowserAPIs.getWindow();\n    const dpr = Math.min(DPR_CAP, win && win.devicePixelRatio || 1);\n    if (dpr === this._dpr) return;\n    this._dpr = dpr;\n    const wCss = parseFloat(this._canvas.style.width) || 0;\n    const hCss = parseFloat(this._canvas.style.height) || 0;\n    this._canvas.width = Math.max(1, Math.round(wCss * dpr));\n    this._canvas.height = Math.max(1, Math.round(hCss * dpr));\n  }\n  /**\n   * Paint the recorded scene: object commands (series bodies / rects / lines /\n   * text) first, then the columnar markers on top (matching SVG z-order where\n   * markers sit above the series path). `shim` supplies the columnar marker\n   * arrays + lazy non-circle marker geometry.\n   * @param {any[]} list\n   * @param {any} shim\n   * @param {{active:number, opacity:number}|null} [dim] per-series dim spec\n   *   (hover / legend restyle); null repaints at full opacity.\n   */\n  paint(list, shim2, dim = null) {\n    const ctx = this._c2d;\n    if (!ctx) return;\n    this._dim = dim || null;\n    this._syncDpr();\n    this.clear();\n    const dpr = this._dpr;\n    const m2 = this._margin;\n    ctx.setTransform(dpr, 0, 0, dpr, m2 * dpr, m2 * dpr);\n    if (list.length) {\n      const ordered = list.length > 1 ? list.map((c2, i2) => [c2, i2]).sort(\n        (a2, b2) => a2[0].z === b2[0].z ? a2[1] - b2[1] : a2[0].z - b2[0].z\n      ).map((pair) => pair[0]) : list;\n      for (let i2 = 0; i2 < ordered.length; i2++) {\n        const c2 = ordered[i2];\n        this._alpha = this._dim ? this._seriesAlpha(c2.si) : 1;\n        this._paintOne(ctx, c2);\n      }\n    }\n    this._paintRects(ctx, shim2);\n    this._paintMarkers(ctx, shim2);\n    this._alpha = 1;\n  }\n  /**\n   * Paint the columnar rect cells (heatmap) as STYLE BATCHES: one fill/stroke\n   * state application per run of consecutive same-style cells, then a fast\n   * fillRect (or a roundRect path when the shared corner radius is non-zero)\n   * per cell. Clipped to the plot rect so cells never bleed into the canvas\n   * margin (mirrors the SVG gridRectMask). Per-cell globalAlpha carries the\n   * hover/legend dim multiplier when a dim spec is active.\n   * @param {any} ctx\n   * @param {any} shim\n   */\n  _paintRects(ctx, shim2) {\n    const n2 = shim2.rectCount ? shim2.rectCount() : 0;\n    if (!n2) return;\n    const rx = shim2._crx;\n    const ry = shim2._cry;\n    const rw = shim2._crw;\n    const rh = shim2._crh;\n    const rstyle = shim2._crstyle;\n    const radius = shim2._cellRadius || 0;\n    const cx = (\n      /** @type {any} */\n      ctx\n    );\n    const useRound = radius > 0 && typeof cx.roundRect === \"function\";\n    const dimming = !!this._dim;\n    const gw = Math.max(0, this.w.layout.gridWidth || 0);\n    const gh = Math.max(0, this.w.layout.gridHeight || 0);\n    ctx.save();\n    ctx.beginPath();\n    ctx.rect(0, 0, gw, gh);\n    ctx.clip();\n    let i2 = 0;\n    while (i2 < n2) {\n      const styleId = rstyle[i2];\n      const style = shim2.rectStyle(i2);\n      if (!style) {\n        i2++;\n        continue;\n      }\n      const fill = style.fill;\n      const doFill = fill && fill !== \"none\" && !(typeof fill === \"string\" && fill.indexOf(\"url(\") === 0);\n      const stroke = style.stroke;\n      const sw = style.strokeWidth == null ? 0 : Number(style.strokeWidth);\n      const doStroke = stroke && stroke !== \"none\" && sw > 0 && !(typeof stroke === \"string\" && stroke.indexOf(\"url(\") === 0);\n      if (doFill) ctx.fillStyle = fill;\n      if (doStroke) {\n        ctx.strokeStyle = stroke;\n        ctx.lineWidth = sw;\n        ctx.setLineDash([]);\n      }\n      const baseFillA = style.fillOpacity == null ? 1 : Number(style.fillOpacity);\n      const baseStrokeA = style.strokeOpacity == null ? 1 : Number(style.strokeOpacity);\n      let j = i2;\n      while (j < n2 && rstyle[j] === styleId) {\n        const w2 = rw[j];\n        const h2 = rh[j];\n        if (w2 > 0 && h2 > 0) {\n          const f = dimming ? this._seriesAlpha(shim2.rectSeries(j)) : 1;\n          if (useRound) {\n            ctx.beginPath();\n            cx.roundRect(rx[j], ry[j], w2, h2, radius);\n            if (doFill) {\n              ctx.globalAlpha = baseFillA * f;\n              ctx.fill();\n            }\n            if (doStroke) {\n              ctx.globalAlpha = baseStrokeA * f;\n              ctx.stroke();\n            }\n          } else {\n            if (doFill) {\n              ctx.globalAlpha = baseFillA * f;\n              ctx.fillRect(rx[j], ry[j], w2, h2);\n            }\n            if (doStroke) {\n              ctx.globalAlpha = baseStrokeA * f;\n              ctx.strokeRect(rx[j], ry[j], w2, h2);\n            }\n          }\n        }\n        j++;\n      }\n      i2 = j;\n    }\n    ctx.globalAlpha = 1;\n    ctx.restore();\n  }\n  /**\n   * Reusable unit Path2D for a (shape, size): the shape's geometry built at the\n   * origin once, then translated per marker via setTransform. Returns null when\n   * the geometry string cannot be parsed.\n   * @param {any} shim\n   * @param {number} shapeId\n   * @param {number} size\n   * @returns {any}\n   */\n  _unitPath(shim2, shapeId, size) {\n    const key = shapeId + \"|\" + size;\n    let p2 = this._unitPaths.get(key);\n    if (p2 === void 0) {\n      try {\n        p2 = new Path2D(shim2.markerPath(0, 0, shapeId, size));\n      } catch (e2) {\n        p2 = null;\n      }\n      this._unitPaths.set(key, p2);\n    }\n    return p2;\n  }\n  /**\n   * Markers paint as STYLE BATCHES: one fill/stroke state application per run\n   * of consecutive same-style markers (a uniform single-series scatter is\n   * exactly one batch), then per-marker geometry inside the run. Per-marker\n   * geometry stays painter's-ordered (fill+stroke per marker) so overlapping\n   * semi-transparent markers composite exactly as SVG does.\n   * @param {any} ctx\n   * @param {any} shim\n   */\n  _paintMarkers(ctx, shim2) {\n    this._markerBatches = 0;\n    const n2 = shim2.markerCount();\n    if (!n2) return;\n    const mx = shim2._mx;\n    const my = shim2._my;\n    const msize = shim2._msize;\n    const mshape = shim2._mshape;\n    const mstyle = shim2._mstyle;\n    const dimming = !!this._dim;\n    if (!dimming) this._alpha = 1;\n    let i2 = 0;\n    while (i2 < n2) {\n      const styleId = mstyle[i2];\n      const shapeId = mshape[i2];\n      const style = shim2.markerStyle(i2);\n      if (!style) {\n        i2++;\n        continue;\n      }\n      const doFill = this._applyFill(ctx, style);\n      const doStroke = this._applyStroke(ctx, style);\n      this._markerBatches++;\n      const baseFillA = style.fillOpacity == null ? 1 : Number(style.fillOpacity);\n      const baseStrokeA = style.strokeOpacity == null ? 1 : Number(style.strokeOpacity);\n      if (shapeId === 0) {\n        let j = i2;\n        while (j < n2 && mshape[j] === 0 && mstyle[j] === styleId) {\n          const r2 = msize[j] || 0;\n          const y = my[j];\n          if (r2 > 0 && y === y) {\n            ctx.beginPath();\n            ctx.arc(mx[j], y, r2, 0, TWO_PI);\n            if (dimming) {\n              const f = this._seriesAlpha(shim2.markerSeries(j));\n              if (doFill) {\n                ctx.globalAlpha = baseFillA * f;\n                ctx.fill();\n              }\n              if (doStroke) {\n                ctx.globalAlpha = baseStrokeA * f;\n                ctx.stroke();\n              }\n            } else {\n              if (doFill) ctx.fill();\n              if (doStroke) ctx.stroke();\n            }\n          }\n          j++;\n        }\n        ctx.globalAlpha = 1;\n        i2 = j;\n      } else {\n        const dpr = this._dpr;\n        const m2 = this._margin;\n        let j = i2;\n        while (j < n2 && mshape[j] === shapeId && mstyle[j] === styleId) {\n          const y = my[j];\n          const size = msize[j];\n          if (y === y && size > 0) {\n            const p2 = this._unitPath(shim2, shapeId, size);\n            if (p2) {\n              ctx.setTransform(dpr, 0, 0, dpr, (m2 + mx[j]) * dpr, (m2 + y) * dpr);\n              const f = dimming ? this._seriesAlpha(shim2.markerSeries(j)) : 1;\n              if (doFill) {\n                ctx.globalAlpha = baseFillA * f;\n                ctx.fill(p2);\n              }\n              if (doStroke) {\n                ctx.globalAlpha = baseStrokeA * f;\n                ctx.stroke(p2);\n              }\n            }\n          }\n          j++;\n        }\n        ctx.setTransform(dpr, 0, 0, dpr, m2 * dpr, m2 * dpr);\n        ctx.globalAlpha = 1;\n        i2 = j;\n      }\n    }\n  }\n  /**\n   * Paint a series path from its numeric fast-path coords: a direct\n   * moveTo/lineTo loop over the typed arrays, no Path2D and no d-string\n   * parse. `ncloseY` (areas) closes the polygon down to the baseline exactly\n   * like the string form's `L xLast bottom L x0 bottom z` tail.\n   * @param {any} ctx\n   * @param {any} cmd\n   */\n  _paintNumericPath(ctx, cmd) {\n    const xs = cmd.nxs;\n    const ys = cmd.nys;\n    const n2 = xs.length;\n    if (!n2) return;\n    ctx.beginPath();\n    ctx.moveTo(xs[0], ys[0]);\n    for (let k = 1; k < n2; k++) {\n      ctx.lineTo(xs[k], ys[k]);\n    }\n    if (cmd.ncloseY != null) {\n      ctx.lineTo(xs[n2 - 1], cmd.ncloseY);\n      ctx.lineTo(xs[0], cmd.ncloseY);\n      ctx.closePath();\n    }\n    if (this._applyFill(ctx, cmd)) {\n      ctx.fill(cmd.fillRule === \"evenodd\" ? \"evenodd\" : \"nonzero\");\n    }\n    if (this._applyStroke(ctx, cmd)) {\n      ctx.stroke();\n    }\n    ctx.globalAlpha = 1;\n  }\n  /**\n   * @param {any} ctx\n   * @param {any} cmd style-bearing flat command\n   */\n  _paintOne(ctx, cmd) {\n    switch (cmd.tag) {\n      case \"path\": {\n        if (cmd.nxs) {\n          this._paintNumericPath(ctx, cmd);\n          break;\n        }\n        if (!cmd.d) return;\n        if (!cmd.path2d) {\n          try {\n            cmd.path2d = new Path2D(cmd.d);\n          } catch (e2) {\n            return;\n          }\n        }\n        this._fillStrokePath(ctx, cmd, cmd.path2d);\n        break;\n      }\n      case \"rect\": {\n        const p2 = new Path2D();\n        if (cmd.radius && typeof /** @type {any} */\n        p2.roundRect === \"function\") {\n          p2.roundRect(cmd.x1, cmd.y1, cmd.rw, cmd.rh, cmd.radius);\n        } else {\n          p2.rect(cmd.x1, cmd.y1, cmd.rw, cmd.rh);\n        }\n        this._fillStrokePath(ctx, cmd, p2);\n        break;\n      }\n      case \"circle\": {\n        if (!(cmd.r > 0)) return;\n        ctx.beginPath();\n        ctx.arc(cmd.cx, cmd.cy, cmd.r, 0, TWO_PI);\n        this._fillStroke(ctx, cmd);\n        break;\n      }\n      case \"line\": {\n        ctx.beginPath();\n        ctx.moveTo(cmd.lx1, cmd.ly1);\n        ctx.lineTo(cmd.lx2, cmd.ly2);\n        this._strokeOnly(ctx, cmd);\n        break;\n      }\n      case \"text\": {\n        if (cmd.text == null) return;\n        ctx.save();\n        ctx.globalAlpha = this._alpha;\n        ctx.fillStyle = cmd.fill || \"#000\";\n        const size = cmd.fontSize || \"11px\";\n        ctx.font = `${typeof size === \"number\" ? size + \"px\" : size} ${cmd.fontFamily || \"Helvetica, Arial, sans-serif\"}`;\n        ctx.textAlign = cmd.textAnchor === \"middle\" ? \"center\" : cmd.textAnchor === \"end\" ? \"right\" : \"left\";\n        ctx.fillText(String(cmd.text), cmd.tx, cmd.ty);\n        ctx.restore();\n        break;\n      }\n    }\n  }\n  /**\n   * @param {any} ctx\n   * @param {any} style\n   * @param {any} path2d\n   */\n  _fillStrokePath(ctx, style, path2d) {\n    if (this._applyFill(ctx, style)) {\n      ctx.fill(path2d, style.fillRule === \"evenodd\" ? \"evenodd\" : \"nonzero\");\n    }\n    if (this._applyStroke(ctx, style)) {\n      ctx.stroke(path2d);\n    }\n    ctx.globalAlpha = 1;\n  }\n  /**\n   * @param {any} ctx\n   * @param {any} style\n   */\n  _fillStroke(ctx, style) {\n    if (this._applyFill(ctx, style)) ctx.fill();\n    if (this._applyStroke(ctx, style)) ctx.stroke();\n    ctx.globalAlpha = 1;\n  }\n  /**\n   * @param {any} ctx\n   * @param {any} style\n   */\n  _strokeOnly(ctx, style) {\n    if (this._applyStroke(ctx, style)) ctx.stroke();\n    ctx.globalAlpha = 1;\n  }\n  /**\n   * Set fill state. Returns false when there's nothing to fill.\n   * @param {any} ctx\n   * @param {any} style\n   */\n  _applyFill(ctx, style) {\n    const fill = style.fill;\n    if (!fill || fill === \"none\") return false;\n    if (typeof fill === \"string\" && fill.indexOf(\"url(\") === 0) return false;\n    ctx.globalAlpha = (style.fillOpacity == null ? 1 : Number(style.fillOpacity)) * this._alpha;\n    ctx.fillStyle = fill;\n    return true;\n  }\n  /**\n   * Set stroke state. Returns false when there's nothing to stroke.\n   * @param {any} ctx\n   * @param {any} style\n   */\n  _applyStroke(ctx, style) {\n    const stroke = style.stroke;\n    const sw = style.strokeWidth == null ? 1 : Number(style.strokeWidth);\n    if (!stroke || stroke === \"none\" || !(sw > 0)) return false;\n    if (typeof stroke === \"string\" && stroke.indexOf(\"url(\") === 0) return false;\n    ctx.globalAlpha = (style.strokeOpacity == null ? 1 : Number(style.strokeOpacity)) * this._alpha;\n    ctx.strokeStyle = stroke;\n    ctx.lineWidth = sw;\n    ctx.lineCap = style.lineCap || \"butt\";\n    const dash = style.strokeDash;\n    if (dash && dash !== 0) {\n      ctx.setLineDash(Array.isArray(dash) ? dash : [Number(dash)]);\n    } else {\n      ctx.setLineDash([]);\n    }\n    return true;\n  }\n  /** Series bitmap for the export composite bridge (P4). @returns {string|null} */\n  toDataURL() {\n    return this._canvas ? this._canvas.toDataURL() : null;\n  }\n  destroy() {\n    this._host = null;\n    this._canvas = null;\n    this._c2d = null;\n    this._unitPaths.clear();\n  }\n}\nclass CanvasRenderer {\n  /**\n   * @param {any} w\n   * @param {any} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.kind = \"canvas\";\n    this._g = new CanvasGraphics(w2);\n    this._compositor = new CanvasCompositor(w2);\n  }\n  // ── lifecycle ──\n  /** Start a fresh series display list for this render pass. */\n  beginSeries() {\n    this._g.reset();\n  }\n  /**\n   * Finalize the pass: paint the recorded display list and return the SVG host\n   * (a `<foreignObject><canvas>`) for `plotChartType` to composite into the tree.\n   * @returns {any}\n   */\n  present() {\n    const host = this._compositor.createHost();\n    this._compositor.paint(this._g.displayList(), this._g);\n    return host;\n  }\n  /** Fast-path wipe of the series layer. */\n  clear() {\n    this._compositor.clear();\n  }\n  /**\n   * Whether the existing <canvas> host can be repainted in place (it exists\n   * and is still mounted). Used by the data-only fast update path to skip\n   * recreating the foreignObject + backing store on every tick.\n   * @returns {boolean}\n   */\n  canRepaintInPlace() {\n    const host = this._compositor.getHost();\n    return !!(host && host.node && host.node.isConnected);\n  }\n  /** Repaint the freshly recorded display list into the EXISTING canvas. */\n  repaintInPlace() {\n    this._compositor.paint(this._g.displayList(), this._g);\n  }\n  // ── emit primitives (delegate to the display-list shim) ──\n  /** @param {any} attrs */\n  group(attrs) {\n    return this._g.group(attrs);\n  }\n  /** @param {any} opts */\n  drawPath(opts) {\n    return this._g.drawPath(opts);\n  }\n  /** @param {any[]} args */\n  drawLine(...args) {\n    return (\n      /** @type {any} */\n      this._g.drawLine(...args)\n    );\n  }\n  /** @param {any[]} args */\n  drawRect(...args) {\n    return (\n      /** @type {any} */\n      this._g.drawRect(...args)\n    );\n  }\n  /**\n   * Columnar heatmap-cell rect (dense same-shape rects): recorded into typed\n   * arrays, painted as style batches. Distinct from drawRect (object command)\n   * so 100k cells don't allocate 100k retained commands.\n   * @param {number} x @param {number} y @param {number} w @param {number} h\n   * @param {any} opts\n   */\n  drawRectCell(x, y, w2, h2, opts) {\n    return this._g.drawRectCell(x, y, w2, h2, opts);\n  }\n  /**\n   * @param {number} r\n   * @param {any} attrs\n   */\n  drawCircle(r2, attrs) {\n    return this._g.drawCircle(r2, attrs);\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @param {any} opts\n   */\n  drawMarker(x, y, opts) {\n    return this._g.drawMarker(x, y, opts);\n  }\n  /** @param {any} opts */\n  renderPaths(opts) {\n    return this._g.renderPaths(opts);\n  }\n  /** @param {any} opts */\n  drawText(opts) {\n    return this._g.drawText(opts);\n  }\n  // ── capabilities ──\n  /** @param {string} feature */\n  supports(feature) {\n    return feature === \"solidFill\" || feature === \"dashArray\";\n  }\n  // ── interaction ──\n  // Line/area/bar/scatter tooltips resolve via coordinate lookup (pointsArray),\n  // so those need no per-mark query. Heatmap cells, however, are hovered by\n  // point (the SVG path hit-tests the <rect> under the cursor); with cells on\n  // canvas there is no node, so hitTest resolves the columnar rect store.\n  /**\n   * Find the cell under a plot-local point (0,0 = plot origin, the same space\n   * as the recorded cell geometry). Reverse scan so a later-painted cell wins\n   * when cells overlap (continuous-x edges). A linear scan stays well under a\n   * frame even at 100k cells (~100k integer compares). Returns the cell's\n   * series/dataPoint index plus its geometry for tooltip positioning, or null\n   * when the point is off every cell.\n   * @param {number} px\n   * @param {number} py\n   * @returns {({seriesIndex:number,dataPointIndex:number,x:number,y:number,width:number,height:number})|null}\n   */\n  hitTest(px, py) {\n    const g2 = this._g;\n    const n2 = g2.rectCount ? g2.rectCount() : 0;\n    if (!n2) return null;\n    const rx = g2._crx;\n    const ry = g2._cry;\n    const rw = g2._crw;\n    const rh = g2._crh;\n    for (let k = n2 - 1; k >= 0; k--) {\n      const w2 = rw[k];\n      const h2 = rh[k];\n      if (w2 <= 0 || h2 <= 0) continue;\n      if (px >= rx[k] && px < rx[k] + w2 && py >= ry[k] && py < ry[k] + h2) {\n        return {\n          seriesIndex: g2._crsi[k],\n          dataPointIndex: g2._crdi[k],\n          x: rx[k],\n          y: ry[k],\n          width: w2,\n          height: h2\n        };\n      }\n    }\n    return null;\n  }\n  /**\n   * Repaint the retained series scene with a per-series dim spec (hover /\n   * legend restyle). No geometry recompute: reuses the display list + marker\n   * columns recorded at render time. Pass null to repaint at full opacity.\n   * @param {{active:number, opacity:number}|null} [dim]\n   */\n  restyle(dim) {\n    this._compositor.paint(this._g.displayList(), this._g, dim || null);\n  }\n  // ── export ── toBitmap() and the compositor's toDataURL() back\n  //    Exports.inlineCanvasLayers, which inlines the series bitmap as an SVG\n  //    <image> so PNG/SVG export includes the canvas layer in correct z-order.\n  /** @returns {{dataURL:string,x:number,y:number,w:number,h:number}|null} */\n  toBitmap() {\n    const url = this._compositor.toDataURL();\n    if (!url) return null;\n    const gl = this.w.globals;\n    const cfg = this.w.config.chart;\n    const margin = this._compositor._margin;\n    return {\n      dataURL: url,\n      x: (gl.translateX || 0) + (cfg.offsetX || 0) - margin,\n      y: (gl.translateY || 0) + (cfg.offsetY || 0) - margin,\n      w: (this.w.layout.gridWidth || 0) + margin * 2,\n      h: (this.w.layout.gridHeight || 0) + margin * 2\n    };\n  }\n  destroy() {\n    this._compositor.destroy();\n  }\n}\nApexCharts.registerRenderer(\n  \"canvas\",\n  /**\n   * @param {any} w\n   * @param {any} ctx\n   */\n  (w2, ctx) => new CanvasRenderer(w2, ctx)\n);\nfunction makeCustomSeriesClass(name2, def) {\n  const cls = class CustomSeries {\n    /**\n     * @param {any} w @param {any} ctx @param {any} xyRatios\n     */\n    constructor(w2, ctx, xyRatios) {\n      this.w = w2;\n      this.ctx = ctx;\n      this.xyRatios = xyRatios;\n      this._warned = false;\n    }\n    /**\n     * @param {any[]} series parsed y-arrays (one per drawn series)\n     * @param {string} [_ctype]\n     * @param {number[]} [seriesIndices] realIndex per entry (combo dispatch)\n     * @returns {any} the wrap group\n     */\n    draw(series, _ctype, seriesIndices) {\n      var _a, _b;\n      const w2 = this.w;\n      const graphics = new Graphics(w2, this.ctx);\n      const emit = seriesEmitter(this.ctx, graphics);\n      const ret = graphics.group({ class: \"apexcharts-marks-series\" });\n      series.forEach((_s, idx) => {\n        var _a2;\n        const realIndex = Array.isArray(seriesIndices) ? seriesIndices[idx] : idx;\n        const elSeries = graphics.group({\n          class: \"apexcharts-series\",\n          rel: realIndex + 1,\n          seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n          \"data:realIndex\": realIndex\n        });\n        const scales = this._scales(\n          realIndex,\n          (w2.seriesData.series[realIndex] || []).length\n        );\n        const color = w2.globals.colors[realIndex];\n        const rawData = (\n          /** @type {any} */\n          ((_a2 = w2.config.series[realIndex]) == null ? void 0 : _a2.data) || []\n        );\n        const xvals = w2.seriesData.seriesX[realIndex] || [];\n        const yvals = w2.seriesData.series[realIndex] || [];\n        w2.globals.seriesXvalues[realIndex] = [];\n        w2.globals.seriesYvalues[realIndex] = [];\n        if (typeof w2.globals.pointsArray[realIndex] === \"undefined\") {\n          w2.globals.pointsArray[realIndex] = [];\n        }\n        for (let j = 0; j < yvals.length; j++) {\n          const yVal = yvals[j];\n          if (yVal === null || typeof yVal === \"undefined\") continue;\n          const xVal = xvals[j];\n          const xPx = scales.xAt(j, xVal);\n          const yPx = scales.y(yVal);\n          const api = this._api(emit, elSeries, realIndex, j);\n          try {\n            def.renderItem({\n              datum: rawData[j],\n              x: xPx,\n              y: yPx,\n              scales,\n              api,\n              seriesIndex: realIndex,\n              dataPointIndex: j,\n              color\n            });\n          } catch (e2) {\n            if (!this._warned) {\n              console.warn(\n                `[apexcharts] renderItem for series type \"${name2}\" threw; skipping datum:`,\n                e2\n              );\n              this._warned = true;\n            }\n          }\n          w2.globals.seriesXvalues[realIndex][j] = xPx;\n          w2.globals.seriesYvalues[realIndex][j] = yPx;\n          w2.globals.pointsArray[realIndex][j] = [xPx, yPx];\n        }\n        graphics.setupEventDelegation(elSeries, \".apexcharts-marks-mark\");\n        ret.add(elSeries);\n      });\n      (_b = (_a = this.ctx.animations) == null ? void 0 : _a.animationCompleted) == null ? void 0 : _b.call(_a, ret);\n      return ret;\n    }\n    /**\n     * Series-space (elGraphical-local, translate-free) scales, matching how the\n     * built-ins compute pixels, so custom marks align with axes and gridlines\n     * and paint correctly on the elGraphical-local canvas.\n     * @param {number} realIndex\n     * @param {number} [nPts] number of data points (for categorical band sizing)\n     */\n    _scales(realIndex, nPts) {\n      var _a, _b, _c, _d;\n      const gl = this.w.globals;\n      const cnf = this.w.config;\n      const xRatio = this.xyRatios.xRatio;\n      const yRatioArr = this.xyRatios.yRatio;\n      const axis = (_b = (_a = gl.seriesYAxisReverseMap) == null ? void 0 : _a[realIndex]) != null ? _b : 0;\n      const yr = Array.isArray(yRatioArr) ? (_c = yRatioArr[axis]) != null ? _c : yRatioArr[0] : yRatioArr;\n      const maxYArr = (\n        /** @type {any} */\n        gl.maxYArr\n      );\n      const maxY = Array.isArray(maxYArr) && maxYArr.length ? (_d = maxYArr[axis]) != null ? _d : gl.maxY : gl.maxY;\n      const gridWidth = gl.gridWidth;\n      const gridHeight = gl.gridHeight;\n      const catMode = !gl.isXNumeric;\n      const n2 = nPts || gl.dataPoints || 1;\n      const bandW = n2 > 0 ? gridWidth / n2 : gridWidth;\n      const tickOn = cnf.xaxis.tickPlacement === \"on\";\n      const x = (v2) => xRatio ? (v2 - gl.minX) / xRatio : gridWidth / 2;\n      const y = (v2) => (maxY - v2) / yr;\n      const xAt = (index, v2) => {\n        if (!catMode) return x(v2);\n        if (tickOn && n2 > 1) return index / (n2 - 1) * gridWidth;\n        return (index + 0.5) * bandW;\n      };\n      const step = gl.minXDiff || 1;\n      const band = catMode ? bandW : xRatio ? step / xRatio : gridWidth;\n      return {\n        x,\n        xAt,\n        y,\n        gridWidth,\n        gridHeight,\n        band\n      };\n    }\n    /**\n     * Per-datum primitive API. Each call emits immediately (canvas-aware via\n     * `emit`), tags the node with the datum's identity, and adds it to the\n     * series group; on canvas the tag/add are inert (marks live on the canvas,\n     * events are coordinate-based).\n     * @param {any} emit @param {any} elSeries @param {number} realIndex @param {number} j\n     */\n    _api(emit, elSeries, realIndex, j) {\n      const tag = (el) => {\n        if (el) {\n          try {\n            el.node.setAttribute(\"index\", String(realIndex));\n            el.node.setAttribute(\"j\", String(j));\n            el.node.classList.add(\"apexcharts-marks-mark\");\n          } catch (e2) {\n          }\n          elSeries.add(el);\n        }\n        return el;\n      };\n      return {\n        /** @param {any} o */\n        path: (o2 = {}) => {\n          var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n          return tag(\n            emit.drawPath({\n              d: o2.d || \"\",\n              stroke: (_a = o2.stroke) != null ? _a : \"#000\",\n              strokeWidth: (_c = (_b = o2.width) != null ? _b : o2.strokeWidth) != null ? _c : 1,\n              fill: (_d = o2.fill) != null ? _d : \"none\",\n              fillOpacity: (_f = o2.fillOpacity) != null ? _f : o2.fill && o2.fill !== \"none\" ? (_e = o2.opacity) != null ? _e : 1 : 0,\n              strokeOpacity: (_h = (_g = o2.strokeOpacity) != null ? _g : o2.opacity) != null ? _h : 1,\n              strokeDashArray: (_i = o2.dash) != null ? _i : 0,\n              strokeLinecap: o2.lineCap\n            })\n          );\n        },\n        /** @param {any} o */\n        line: (o2 = {}) => {\n          var _a, _b, _c, _d;\n          return tag(\n            emit.drawLine(\n              o2.x1,\n              o2.y1,\n              o2.x2,\n              o2.y2,\n              (_a = o2.stroke) != null ? _a : \"#000\",\n              (_b = o2.dash) != null ? _b : 0,\n              (_d = (_c = o2.width) != null ? _c : o2.strokeWidth) != null ? _d : 1\n            )\n          );\n        },\n        /** @param {any} o */\n        rect: (o2 = {}) => {\n          var _a, _b, _c, _d, _e, _f, _g, _h;\n          return tag(\n            emit.drawRect(\n              (_a = o2.x) != null ? _a : 0,\n              (_b = o2.y) != null ? _b : 0,\n              (_c = o2.w) != null ? _c : 0,\n              (_d = o2.h) != null ? _d : 0,\n              (_e = o2.r) != null ? _e : 0,\n              (_f = o2.fill) != null ? _f : \"#000\",\n              (_g = o2.opacity) != null ? _g : 1,\n              o2.stroke != null ? (_h = o2.strokeWidth) != null ? _h : 1 : null,\n              o2.stroke\n            )\n          );\n        },\n        /** @param {any} o */\n        circle: (o2 = {}) => {\n          var _a, _b, _c, _d, _e;\n          return tag(\n            emit.drawCircle((_a = o2.r) != null ? _a : 0, {\n              cx: (_b = o2.cx) != null ? _b : 0,\n              cy: (_c = o2.cy) != null ? _c : 0,\n              fill: (_d = o2.fill) != null ? _d : \"#000\",\n              stroke: o2.stroke || \"none\",\n              \"stroke-width\": (_e = o2.strokeWidth) != null ? _e : o2.stroke ? 1 : 0\n            })\n          );\n        },\n        /** @param {any} o */\n        text: (o2 = {}) => {\n          var _a, _b, _c, _d;\n          return tag(\n            emit.drawText({\n              x: (_a = o2.x) != null ? _a : 0,\n              y: (_b = o2.y) != null ? _b : 0,\n              text: (_c = o2.text) != null ? _c : \"\",\n              textAnchor: (_d = o2.anchor) != null ? _d : \"start\",\n              fontSize: o2.size,\n              foreColor: o2.color,\n              fontWeight: o2.weight\n            })\n          );\n        }\n      };\n    }\n  };\n  cls.dataType = def.dataType || \"xy\";\n  cls.yExtent = typeof def.yExtent === \"function\" ? def.yExtent : null;\n  return cls;\n}\nApexCharts._customSeriesFactory = makeCustomSeriesClass;\nconst DARK_QUERY = \"(prefers-color-scheme: dark)\";\nconst CONTRAST_QUERY = \"(prefers-contrast: more)\";\nclass OSThemeWatcher {\n  /**\n   * @param {any} w @param {any} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    if (w2.config.theme.follow !== \"os\" || !Environment.isBrowser()) return;\n    const media = this._ensureMedia();\n    if (!media) return;\n    this._applyToConfig(media);\n    this._ensureListeners(media);\n  }\n  /**\n   * Create (once per instance) the MediaQueryLists and stash them on `ctx` so\n   * they persist across the re-render that `updateOptions` triggers.\n   * @returns {{dark: MediaQueryList|null, contrast: MediaQueryList|null, handler: null|(()=>void)}|null}\n   */\n  _ensureMedia() {\n    if (!this.ctx._osThemeMedia) {\n      const dark = BrowserAPIs.matchMedia(DARK_QUERY);\n      const contrast = BrowserAPIs.matchMedia(CONTRAST_QUERY);\n      if (!dark && !contrast) return null;\n      this.ctx._osThemeMedia = { dark, contrast, handler: null };\n    }\n    return this.ctx._osThemeMedia;\n  }\n  /**\n   * Write the OS-resolved mode / high-contrast onto the live `w.config.theme`.\n   * @param {{dark: MediaQueryList|null, contrast: MediaQueryList|null}} media\n   */\n  _applyToConfig(media) {\n    const theme = this.w.config.theme;\n    if (media.dark) {\n      theme.mode = media.dark.matches ? \"dark\" : \"light\";\n    }\n    if (media.contrast && media.contrast.matches) {\n      theme.accessibility = theme.accessibility || {};\n      theme.accessibility.colorBlindMode = \"highContrast\";\n    }\n  }\n  /**\n   * Attach the `change` listener once. The handler closes over `ctx` + `media`\n   * (both stable across re-renders), NOT over `this` (a fresh watcher is built\n   * each create), so it never goes stale.\n   * @param {{dark: MediaQueryList|null, contrast: MediaQueryList|null, handler: null|(()=>void)}} media\n   */\n  _ensureListeners(media) {\n    if (media.handler) return;\n    const ctx = this.ctx;\n    const handler = () => {\n      const m2 = ctx._osThemeMedia;\n      if (!m2) return;\n      const themeOpt = { mode: m2.dark && m2.dark.matches ? \"dark\" : \"light\" };\n      if (m2.contrast && m2.contrast.matches) {\n        themeOpt.accessibility = { colorBlindMode: \"highContrast\" };\n      } else {\n        themeOpt.accessibility = { colorBlindMode: \"\" };\n      }\n      ctx.updateOptions({ theme: themeOpt }, false, true, false);\n    };\n    OSThemeWatcher._add(media.dark, handler);\n    OSThemeWatcher._add(media.contrast, handler);\n    media.handler = handler;\n  }\n  /** Remove the listeners and drop the stashed media. Called on full destroy. */\n  teardown() {\n    const media = this.ctx._osThemeMedia;\n    if (!media) return;\n    if (media.handler) {\n      OSThemeWatcher._remove(media.dark, media.handler);\n      OSThemeWatcher._remove(media.contrast, media.handler);\n    }\n    this.ctx._osThemeMedia = null;\n  }\n  /**\n   * @param {MediaQueryList|null} mql @param {()=>void} handler\n   */\n  static _add(mql, handler) {\n    if (!mql) return;\n    if (typeof mql.addEventListener === \"function\") {\n      mql.addEventListener(\"change\", handler);\n    } else if (typeof /** @type {any} */\n    mql.addListener === \"function\") {\n      mql.addListener(handler);\n    }\n  }\n  /**\n   * @param {MediaQueryList|null} mql @param {()=>void} handler\n   */\n  static _remove(mql, handler) {\n    if (!mql) return;\n    if (typeof mql.removeEventListener === \"function\") {\n      mql.removeEventListener(\"change\", handler);\n    } else if (typeof /** @type {any} */\n    mql.removeListener === \"function\") {\n      mql.removeListener(handler);\n    }\n  }\n}\nApexCharts.registerFeatures({ osThemeWatcher: OSThemeWatcher });\nconst MARK_SELECTOR = [\n  \".apexcharts-bar-area\",\n  \".apexcharts-candlestick-area\",\n  \".apexcharts-boxPlot-area\",\n  \".apexcharts-rangebar-area\",\n  \".apexcharts-marker\"\n].join(\", \");\nconst FILTER_MARK_SELECTOR = [\n  \".apexcharts-pie-area\",\n  \".apexcharts-bar-area\"\n].join(\", \");\nconst DIMMED_CLASS = \"apexcharts-crossfilter-dimmed\";\nconst PIE_TYPES = [\"pie\", \"donut\", \"polarArea\", \"radialBar\"];\nclass LinkedViews {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this._dimmed = false;\n    this._wired = false;\n    this._pending = false;\n    this._lastValues = null;\n    this._onPointSelect = this._onPointSelect.bind(this);\n    this._afterRender = this._afterRender.bind(this);\n    this._onChange = this._onChange.bind(this);\n    if (this._mode() === \"filter\") this._initEngine();\n  }\n  /** @returns {'highlight'|'filter'|'off'} */\n  _mode() {\n    const link = this.w.config.chart.link;\n    if (link && typeof link.dimension === \"function\") return \"filter\";\n    if (link && link.enabled) return \"highlight\";\n    return \"off\";\n  }\n  _enabled() {\n    const link = this.w.config.chart.link;\n    return !!(link && link.enabled);\n  }\n  /**\n   * The source chart's rectangle brush produced a data-x range. In FILTER mode\n   * this becomes a `[min,max]` range filter on the chart's dimension (the other\n   * charts re-aggregate). In HIGHLIGHT mode (P1) it dims out-of-range marks\n   * across the group. Called (null-safe) from ZoomPanSelection selectionDrawn /\n   * selectionDragging.\n   * @param {{min:number, max:number}} xaxis\n   */\n  onSourceSelection(xaxis) {\n    var _a;\n    const mode = this._mode();\n    if (mode === \"off\") return;\n    if (!xaxis || xaxis.min == null || xaxis.max == null) return;\n    let min = Math.min(xaxis.min, xaxis.max);\n    let max = Math.max(xaxis.min, xaxis.max);\n    const gMinX = this.w.globals.minX;\n    const gMaxX = this.w.globals.maxX;\n    if (isFinite(gMinX) && isFinite(gMaxX) && gMaxX > gMinX) {\n      const tol = (gMaxX - gMinX) * 1e-6;\n      if (min - gMinX <= tol) min = gMinX;\n      if (gMaxX - max <= tol) max = gMaxX;\n    }\n    if (mode === \"filter\") {\n      const cf = this._cf();\n      if (!cf) return;\n      cf.filter(this._chartId(), [min, max]);\n      this._fireFilterChange(cf, [min, max]);\n      return;\n    }\n    this._group().forEach((ch) => {\n      var _a2;\n      (_a2 = ch == null ? void 0 : ch.linkedViews) == null ? void 0 : _a2.applyDim(min, max);\n    });\n    const args = { xaxis: { min, max }, sourceChartID: this.w.globals.chartID };\n    if (typeof this.w.config.chart.events.crossFilter === \"function\") {\n      this.w.config.chart.events.crossFilter(this.ctx, args);\n    }\n    (_a = this.ctx.events) == null ? void 0 : _a.fireEvent(\"crossFilter\", [this.ctx, args]);\n  }\n  /** self + grouped siblings (dedup-safe; getGroupedCharts excludes self). */\n  _group() {\n    const siblings = typeof this.ctx.getGroupedCharts === \"function\" ? this.ctx.getGroupedCharts() : [];\n    return [this.ctx, ...siblings];\n  }\n  /**\n   * Dim this chart's marks whose x is outside [min,max]; un-dim those inside.\n   * No re-render, so mark identities are preserved.\n   * @param {number} min @param {number} max\n   */\n  applyDim(min, max) {\n    if (!this._enabled()) return;\n    const w2 = this.w;\n    const baseEl = w2.dom.baseEl;\n    if (!baseEl) return;\n    const dimOpacity = w2.config.chart.link.dimOpacity;\n    if (w2.dom.elWrap && typeof dimOpacity === \"number\") {\n      w2.dom.elWrap.style.setProperty(\"--apx-cf-dim\", String(dimOpacity));\n    }\n    const seriesX = w2.globals.seriesX || [];\n    const marks = baseEl.querySelectorAll(MARK_SELECTOR);\n    marks.forEach((node) => {\n      const jAttr = node.getAttribute(\"j\");\n      if (jAttr === null) return;\n      const j = parseInt(jAttr, 10);\n      const iAttr = node.getAttribute(\"index\");\n      const i2 = iAttr === null ? 0 : parseInt(iAttr, 10);\n      const row = seriesX[i2] || seriesX[0];\n      if (!row) return;\n      const x = row[j];\n      if (x == null) return;\n      node.classList.toggle(DIMMED_CLASS, x < min || x > max);\n    });\n    this._dimmed = true;\n  }\n  /** Remove dimming from this chart only. */\n  clear() {\n    const baseEl = this.w.dom.baseEl;\n    if (!baseEl) return;\n    baseEl.querySelectorAll(\".\" + DIMMED_CLASS).forEach((n2) => n2.classList.remove(DIMMED_CLASS));\n    this._dimmed = false;\n  }\n  /** Clear dimming across the whole group (backs chart.clearCrossfilter). */\n  clearGroup() {\n    if (this._mode() === \"filter\") {\n      const cf = this._cf();\n      if (cf) cf.reset();\n      return;\n    }\n    this._group().forEach((ch) => {\n      var _a;\n      return (_a = ch == null ? void 0 : ch.linkedViews) == null ? void 0 : _a.clear();\n    });\n  }\n  // ─── FILTER mode (crossfilter engine glue) ───────────────────────────────\n  /**\n   * The chart's stable internal id (keys its dimension in the coordinator).\n   * Always set by the ApexCharts constructor (falls back to a cuid).\n   * @returns {string}\n   */\n  _chartId() {\n    return (\n      /** @type {string} */\n      this.w.globals.chartID\n    );\n  }\n  /** @returns {import('./Crossfilter').default|null} the coordinator, or null */\n  _cf() {\n    const link = this.w.config.chart.link;\n    const id = link && (link.id || this.w.config.chart.group);\n    return id ? se.get(id) : null;\n  }\n  _isPie() {\n    return PIE_TYPES.indexOf(this.w.config.chart.type) !== -1;\n  }\n  _isHeatmap() {\n    return this.w.config.chart.type === \"heatmap\";\n  }\n  /**\n   * Before the first render: resolve the coordinator, register this chart's\n   * dimension, inject the initial aggregated series into w.config (so the first\n   * paint is already aggregated, no empty flash), and wire the listeners.\n   */\n  _initEngine() {\n    const cf = this._cf();\n    const link = this.w.config.chart.link;\n    if (!cf) {\n      const id = link && link.id || this.w.config.chart.group;\n      console.warn(\n        `[apexcharts] chart.link.dimension is set but no crossfilter coordinator \"${id}\" exists. Call ApexCharts.crossfilter({ id, records }) before creating the chart.`\n      );\n      return;\n    }\n    const chartId = this._chartId();\n    if (!cf.hasDimension(chartId)) {\n      cf.registerDimension(chartId, {\n        dimension: link.dimension,\n        reduce: link.reduce,\n        // heatmap => 2D matrix dimension (accessor returns [xKey, yKey]).\n        type: link.type || (this._isHeatmap() ? \"matrix\" : void 0),\n        bins: link.bins,\n        order: link.order\n      });\n    }\n    this._injectSeries(cf.aggregateFor(chartId));\n    this._wire(cf);\n  }\n  /**\n   * Build the chart's series value from an aggregation, shaped by chart type:\n   *   matrix (heatmap) -> [{ name:yKey, data:[{x:xKey, y:value}] }]\n   *   pie/donut  -> number[]\n   *   axis + category -> [{ name, data:number[] }] (categories set separately)\n   *   axis + range    -> [{ name, data:[x,value][] }] on a numeric/time x-axis\n   * @param {any} agg\n   */\n  _seriesFromAgg(agg) {\n    if (agg.type === \"matrix\") {\n      return agg.yLabels.map((yl, yi) => ({\n        name: String(yl),\n        data: agg.xLabels.map((xl, xi) => ({\n          x: String(xl),\n          y: agg.matrix[yi][xi]\n        }))\n      }));\n    }\n    if (this._isPie()) return agg.values.slice();\n    const name2 = this.w.config.chart.link.seriesName || \"Count\";\n    if (agg.type === \"range\") {\n      return [{ name: name2, data: agg.labels.map((x, i2) => [x, agg.values[i2]]) }];\n    }\n    return [{ name: name2, data: agg.values.slice() }];\n  }\n  /**\n   * Value signature used to skip a reflow when only dimming changed.\n   * @param {any} agg\n   */\n  _sigOf(agg) {\n    return JSON.stringify(agg.matrix || agg.values);\n  }\n  /**\n   * Write the aggregation into w.config as the chart's series/labels. Runs once\n   * before the first paint; later updates go through updateSeries.\n   * @param {any} agg\n   */\n  _injectSeries(agg) {\n    const w2 = this.w;\n    this._lastValues = this._sigOf(agg);\n    w2.config.series = this._seriesFromAgg(agg);\n    if (agg.type === \"matrix\") return;\n    if (this._isPie()) {\n      w2.config.labels = agg.labels.map(String);\n    } else if (agg.type === \"category\") {\n      if (!w2.config.xaxis) w2.config.xaxis = {};\n      w2.config.xaxis.categories = agg.labels.map(String);\n    } else if (agg.type === \"range\") {\n      this._pinRangeDomain(agg.edges);\n    }\n  }\n  /**\n   * Pin the numeric/datetime x-axis to the outer bin edges of a range-binned\n   * dimension (unless the user set xaxis.min/max explicitly). See _injectSeries.\n   * @param {number[]|null|undefined} edges\n   */\n  _pinRangeDomain(edges) {\n    if (!Array.isArray(edges) || edges.length < 2) return;\n    const w2 = this.w;\n    if (!w2.config.xaxis) w2.config.xaxis = /** @type {any} */\n    {};\n    if (w2.config.xaxis.min == null) w2.config.xaxis.min = edges[0];\n    if (w2.config.xaxis.max == null) w2.config.xaxis.max = edges[edges.length - 1];\n  }\n  /** @param {import('./Crossfilter').default} cf */\n  _wire(cf) {\n    if (this._wired) return;\n    this._wired = true;\n    this.ctx.addEventListener(\"dataPointSelection\", this._onPointSelect);\n    this.ctx.addEventListener(\"mounted\", this._afterRender);\n    this.ctx.addEventListener(\"updated\", this._afterRender);\n    cf.on(\"change\", this._onChange);\n  }\n  /**\n   * A pie slice / bar was clicked: toggle its bucket key on the coordinator.\n   * @param {any} _e @param {any} _ctx @param {{dataPointIndex?:number}} opts\n   */\n  _onPointSelect(_e, _ctx, opts) {\n    if (this._mode() !== \"filter\" || !opts || opts.dataPointIndex == null) return;\n    const cf = this._cf();\n    if (!cf) return;\n    const chartId = this._chartId();\n    const agg = cf.aggregateFor(chartId);\n    if (agg.type === \"matrix\") return;\n    const key = agg.keys[opts.dataPointIndex];\n    if (key == null) return;\n    cf.toggleKey(chartId, key);\n    this._fireFilterChange(cf, key);\n  }\n  /** Coordinator filter changed: re-aggregate this chart on a microtask so the\n   *  triggering click handler unwinds before we destroy/redraw the DOM. */\n  _onChange() {\n    if (this._mode() !== \"filter\" || this._pending) return;\n    this._pending = true;\n    Promise.resolve().then(() => {\n      this._pending = false;\n      if (this.w.globals.isDestroyed) return;\n      this._applyAggregation();\n    });\n  }\n  /**\n   * Pull this chart's crossfilter aggregation and push it through updateSeries\n   * (animated). When the values are unchanged (e.g. only this chart's own\n   * filter moved, which it ignores for itself), skip the reflow and just\n   * refresh the self-dim.\n   */\n  _applyAggregation() {\n    if (this._mode() !== \"filter\") return;\n    const cf = this._cf();\n    if (!cf) return;\n    const agg = cf.aggregateFor(this._chartId());\n    const sig = this._sigOf(agg);\n    if (sig === this._lastValues) {\n      this._applySelfDim();\n      return;\n    }\n    this._lastValues = sig;\n    this.ctx.updateSeries(this._seriesFromAgg(agg), true);\n  }\n  _afterRender() {\n    if (this._mode() !== \"filter\") return;\n    const series = this.w.config.series;\n    if (!series || series.length === 0) {\n      this._reassertSeries();\n      return;\n    }\n    this._applySelfDim();\n  }\n  /** Restore the aggregated series after an external updateSeries emptied it.\n   *  Deferred a microtask so the triggering update fully unwinds first. */\n  _reassertSeries() {\n    if (this._pending) return;\n    this._pending = true;\n    Promise.resolve().then(() => {\n      this._pending = false;\n      if (this.w.globals.isDestroyed) return;\n      const cf = this._cf();\n      if (!cf) return;\n      const agg = cf.aggregateFor(this._chartId());\n      const series = this._seriesFromAgg(agg);\n      if (!series.length) return;\n      this._lastValues = this._sigOf(agg);\n      this.ctx.updateSeries(series, true);\n    });\n  }\n  /**\n   * Dim this chart's own buckets that are not in its own filter (no filter ->\n   * none dimmed). Categorical: dim buckets whose key is not in the selected Set.\n   * Range: dim bins lying fully outside the selected `[min,max]`. Keyed by each\n   * mark's `j` (dataPointIndex) -> the aggregation key.\n   */\n  _applySelfDim() {\n    const cf = this._cf();\n    if (!cf) return;\n    const w2 = this.w;\n    const baseEl = w2.dom.baseEl;\n    if (!baseEl) return;\n    const chartId = this._chartId();\n    const filter = cf.filterOf(chartId);\n    const dimOpacity = w2.config.chart.link.dimOpacity;\n    if (w2.dom.elWrap && typeof dimOpacity === \"number\") {\n      w2.dom.elWrap.style.setProperty(\"--apx-cf-dim\", String(dimOpacity));\n    }\n    const isCategory = filter instanceof Set;\n    const isRange = Array.isArray(filter);\n    const agg = cf.aggregateFor(chartId);\n    if (agg.type === \"matrix\") return;\n    const keys = agg.keys;\n    baseEl.querySelectorAll(FILTER_MARK_SELECTOR).forEach((node) => {\n      const jAttr = node.getAttribute(\"j\");\n      if (jAttr === null) return;\n      const key = keys[parseInt(jAttr, 10)];\n      let dim = false;\n      if (isCategory) {\n        dim = !/** @type {Set<any>} */\n        filter.has(key);\n      } else if (isRange && Array.isArray(key)) {\n        dim = key[1] <= filter[0] || key[0] >= filter[1];\n      }\n      node.classList.toggle(DIMMED_CLASS, dim);\n    });\n    this._dimmed = !!filter;\n  }\n  /**\n   * Fire the `filterChange` event on this (source) chart.\n   * @param {import('./Crossfilter').default} cf @param {any} key\n   */\n  _fireFilterChange(cf, key) {\n    var _a;\n    const args = __spreadProps(__spreadValues({}, cf.state()), {\n      sourceChartID: this._chartId(),\n      key\n    });\n    const events = this.w.config.chart.events;\n    if (typeof events.filterChange === \"function\") {\n      events.filterChange(this.ctx, args);\n    }\n    (_a = this.ctx.events) == null ? void 0 : _a.fireEvent(\"filterChange\", [this.ctx, args]);\n  }\n  teardown() {\n    var _a, _b, _c, _d, _e, _f;\n    this.clear();\n    if (this._wired) {\n      (_b = (_a = this.ctx).removeEventListener) == null ? void 0 : _b.call(_a, \"dataPointSelection\", this._onPointSelect);\n      (_d = (_c = this.ctx).removeEventListener) == null ? void 0 : _d.call(_c, \"mounted\", this._afterRender);\n      (_f = (_e = this.ctx).removeEventListener) == null ? void 0 : _f.call(_e, \"updated\", this._afterRender);\n      const cf = this._cf();\n      if (cf) {\n        cf.off(\"change\", this._onChange);\n        cf.removeDimension(this._chartId());\n      }\n      this._wired = false;\n    }\n  }\n}\nApexCharts.registerFeatures({ linkedViews: LinkedViews });\nconst AC = (\n  /** @type {any} */\n  ApexCharts\n);\nAC._crossfilterFactory = (opts) => se.getOrCreate(opts);\nAC._crossfilterGet = (id) => se.get(id);\nconst DRAG_CLASS = \"apexcharts-ink-draggable\";\nconst TYPES = [\"point\", \"xaxis\", \"yaxis\"];\nconst EDGE_PX = 8;\nconst CLICK_SLOP_PX = 2;\nconst FONT_STEPS = [10, 11, 12, 14, 17, 20];\nconst MARKER_SHAPES = [\"circle\", \"square\", \"diamond\", \"triangle\"];\nconst SHAPE_GLYPHS = {\n  circle: \"●\",\n  square: \"■\",\n  diamond: \"◆\",\n  triangle: \"▲\"\n};\nconst NOTE_COLORS = [\n  \"#ffffff\",\n  \"#334155\",\n  \"#2563eb\",\n  \"#16a34a\",\n  \"#d97706\",\n  \"#dc2626\"\n];\nconst TRASH_ICON = '<svg viewBox=\"0 0 24 24\" width=\"13\" height=\"13\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\"/></svg>';\nclass InkLayer {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this._wired = false;\n    this._drag = null;\n    this._editor = null;\n    this._creating = false;\n    this._createSeq = 0;\n    this._attach = this._attach.bind(this);\n    this._onRerender = this._onRerender.bind(this);\n    this._onMove = this._onMove.bind(this);\n    this._onUp = this._onUp.bind(this);\n    this._onCreateClick = this._onCreateClick.bind(this);\n    this._onDocDownEditor = this._onDocDownEditor.bind(this);\n    if (this._enabledGlobally() || this._hasDraggable() || this._paletteEnabled()) {\n      this._wire();\n    }\n  }\n  _enabledGlobally() {\n    const ink = this.w.config.chart.ink;\n    return !!(ink && ink.enabled);\n  }\n  _paletteEnabled() {\n    const ink = this.w.config.chart.ink;\n    return !!(ink && ink.palette);\n  }\n  _snapEnabled() {\n    const ink = this.w.config.chart.ink;\n    return !!(ink && ink.snap);\n  }\n  // ─── P5: snap to gridlines ────────────────────────────────────────────────\n  /** @param {number} v @param {number[]} ticks @returns {number} nearest tick */\n  _nearest(v2, ticks) {\n    let best = v2;\n    let bd = Infinity;\n    for (let i2 = 0; i2 < ticks.length; i2++) {\n      const d = Math.abs(ticks[i2] - v2);\n      if (d < bd) {\n        bd = d;\n        best = ticks[i2];\n      }\n    }\n    return best;\n  }\n  /**\n   * Snap an x value to the nearest x gridline (numeric axes only).\n   * @param {number} x\n   */\n  _snapX(x) {\n    if (!this._snapEnabled() || typeof x !== \"number\") return x;\n    const s2 = this.w.globals.xAxisScale;\n    return s2 && Array.isArray(s2.result) && s2.result.length ? this._nearest(x, s2.result) : x;\n  }\n  /**\n   * Snap a y value to the nearest y gridline.\n   * @param {number} y @param {number} si\n   */\n  _snapY(y, si) {\n    if (!this._snapEnabled() || typeof y !== \"number\") return y;\n    const scales = this.w.globals.yAxisScale;\n    const s2 = scales && scales[si];\n    return s2 && Array.isArray(s2.result) && s2.result.length ? this._nearest(y, s2.result) : y;\n  }\n  /** @param {string} type @returns {any[]} the config annotations of a type */\n  _annoList(type) {\n    const a2 = this.w.config.annotations;\n    if (!a2) return [];\n    const key = type === \"point\" ? \"points\" : type;\n    return Array.isArray(a2[key]) ? a2[key] : [];\n  }\n  /** @param {any} anno */\n  _isDraggable(anno) {\n    if (!anno) return false;\n    if (anno.draggable === true) return true;\n    if (anno.draggable === false) return false;\n    return this._enabledGlobally();\n  }\n  _hasDraggable() {\n    return TYPES.some((t2) => this._annoList(t2).some((p2) => this._isDraggable(p2)));\n  }\n  _wire() {\n    if (this._wired) return;\n    this._wired = true;\n    this.ctx.addEventListener(\"mounted\", this._onRerender);\n    this.ctx.addEventListener(\"updated\", this._onRerender);\n  }\n  /**\n   * A full (re)render rebuilds the SVG and may swap the annotations config\n   * (updateOptions, undo restore), so an open editor card points at stale\n   * state: drop it (without committing) before rebinding handlers. Targeted\n   * redraws call _attach() directly and keep the card open.\n   */\n  _onRerender() {\n    this._closeEditor(false);\n    this._attach();\n    if (this._creating) {\n      const svg = this.w.dom.Paper && this.w.dom.Paper.node;\n      if (svg) {\n        svg.style.cursor = \"crosshair\";\n        svg.addEventListener(\"click\", this._onCreateClick, true);\n      }\n    }\n  }\n  /**\n   * After each (re)render, bind drag + edit handlers to every draggable\n   * annotation's elements. Idempotent via a per-node flag so a targeted redraw\n   * re-runs this without double-binding the untouched annotations.\n   */\n  _attach() {\n    const w2 = this.w;\n    const baseEl = w2.dom.baseEl;\n    if (!baseEl) return;\n    TYPES.forEach((type) => {\n      this._annoList(type).forEach((anno, index) => {\n        if (!this._isDraggable(anno)) return;\n        if (!anno.id) {\n          anno.id = \"apexcharts-ink-\" + type + \"-\" + index + \"-\" + w2.globals.chartID;\n        }\n        baseEl.querySelectorAll(\".\" + anno.id).forEach((el) => {\n          if (el.__inkBound) return;\n          el.__inkBound = true;\n          el.style.cursor = \"move\";\n          el.classList.add(DRAG_CLASS);\n          el.addEventListener(\n            \"mousedown\",\n            (e2) => this._onDown(e2, type, index)\n          );\n          el.addEventListener(\n            \"touchstart\",\n            (e2) => this._onDown(e2, type, index)\n          );\n          el.addEventListener(\"dblclick\", (e2) => {\n            e2.preventDefault();\n            e2.stopPropagation();\n            this._startEdit(type, index, { select: true });\n          });\n        });\n      });\n    });\n    if (this._paletteEnabled()) this._renderPalette();\n  }\n  // ─── drag / resize ────────────────────────────────────────────────────────\n  /**\n   * @param {any} e @param {string} type @param {number} index\n   */\n  _onDown(e2, type, index) {\n    if (e2.button && e2.button !== 0) return;\n    const w2 = this.w;\n    const doc = w2.dom.baseEl && w2.dom.baseEl.ownerDocument;\n    if (!doc) return;\n    e2.stopPropagation();\n    if (e2.cancelable) e2.preventDefault();\n    const isTouch = e2.type === \"touchstart\";\n    const ev = isTouch ? e2.touches[0] : e2;\n    const svgRoot = w2.dom.Paper && w2.dom.Paper.node;\n    const ctm = svgRoot && svgRoot.getScreenCTM ? svgRoot.getScreenCTM() : null;\n    const anno = this._annoList(type)[index];\n    let mode = \"move\";\n    let rect = null;\n    let origX = 0;\n    let origW = 0;\n    if (type === \"xaxis\" && anno.x2 != null) {\n      rect = w2.dom.baseEl.querySelector(\".apexcharts-annotation-rect.\" + anno.id);\n      if (rect) {\n        const r2 = rect.getBoundingClientRect();\n        if (Math.abs(ev.clientX - r2.left) <= EDGE_PX) mode = \"resize-x1\";\n        else if (Math.abs(ev.clientX - r2.right) <= EDGE_PX) mode = \"resize-x2\";\n        origX = parseFloat(rect.getAttribute(\"x\")) || 0;\n        origW = parseFloat(rect.getAttribute(\"width\")) || 0;\n      }\n    }\n    this._drag = {\n      type,\n      index,\n      anno,\n      els: Array.from(w2.dom.baseEl.querySelectorAll(\".\" + anno.id)),\n      mode,\n      rect,\n      origX,\n      origW,\n      startX: ev.clientX,\n      startY: ev.clientY,\n      scaleX: ctm && ctm.a ? ctm.a : 1,\n      scaleY: ctm && ctm.d ? ctm.d : 1,\n      dxPixel: 0,\n      dyPixel: 0,\n      moved: false\n    };\n    doc.addEventListener(\"mousemove\", this._onMove);\n    doc.addEventListener(\"touchmove\", this._onMove, { passive: false });\n    doc.addEventListener(\"mouseup\", this._onUp);\n    doc.addEventListener(\"touchend\", this._onUp);\n  }\n  /** @param {any} me */\n  _onMove(me) {\n    const d = this._drag;\n    if (!d) return;\n    if (me.cancelable) me.preventDefault();\n    const mev = me.type === \"touchmove\" ? me.touches[0] : me;\n    d.dxPixel = (mev.clientX - d.startX) / d.scaleX;\n    d.dyPixel = (mev.clientY - d.startY) / d.scaleY;\n    if (Math.abs(d.dxPixel) > CLICK_SLOP_PX || Math.abs(d.dyPixel) > CLICK_SLOP_PX) {\n      d.moved = true;\n    }\n    if (d.mode === \"move\") {\n      const t2 = `translate(${d.dxPixel} ${d.dyPixel})`;\n      d.els.forEach((el) => el.setAttribute(\"transform\", t2));\n    } else if (d.rect) {\n      if (d.mode === \"resize-x1\") {\n        d.rect.setAttribute(\"x\", d.origX + d.dxPixel);\n        d.rect.setAttribute(\"width\", Math.max(1, d.origW - d.dxPixel));\n      } else if (d.mode === \"resize-x2\") {\n        d.rect.setAttribute(\"width\", Math.max(1, d.origW + d.dxPixel));\n      }\n    }\n  }\n  _onUp() {\n    const d = this._drag;\n    this._drag = null;\n    this._teardownDocListeners();\n    if (!d || !d.moved) {\n      if (d) {\n        d.els.forEach((el) => el.removeAttribute(\"transform\"));\n        this._startEdit(d.type, d.index);\n      }\n      return;\n    }\n    const anno = this._annoList(d.type)[d.index];\n    if (!anno) return;\n    this._applyDelta(d, anno);\n    d.els.forEach((el) => el.removeAttribute(\"transform\"));\n    this._redrawAnno(d.type, anno, d.index);\n    this._checkpoint(\"ink:drag\");\n    this._fireDragged(d.type, anno, d.index);\n  }\n  /**\n   * Record a Rewind (undo) checkpoint for an ink edit. Targeted redraws fire no\n   * 'updated' event, so History would otherwise miss them. No-op when the\n   * history feature is absent or disabled.\n   * @param {string} label\n   */\n  _checkpoint(label) {\n    var _a, _b;\n    (_b = (_a = this.ctx.history) == null ? void 0 : _a.snapshot) == null ? void 0 : _b.call(_a, label);\n  }\n  /**\n   * Mutate the annotation's config from the pixel drag delta (type + mode aware).\n   * @param {any} d @param {any} anno\n   */\n  _applyDelta(d, anno) {\n    const w2 = this.w;\n    const dxData = w2.layout.gridWidth ? d.dxPixel * (w2.globals.xRange / w2.layout.gridWidth) : 0;\n    if (d.type === \"point\") {\n      const { newX, newY } = this._invertPoint(anno, d.dxPixel, d.dyPixel);\n      anno.x = this._snapX(newX);\n      if (newY != null) {\n        const yi = anno.yAxisIndex || 0;\n        const map = w2.globals.seriesYAxisMap;\n        anno.y = this._snapY(newY, map && map[yi] ? map[yi][0] : 0);\n      }\n      return;\n    }\n    if (d.type === \"xaxis\") {\n      if (typeof anno.x !== \"number\") return;\n      if (d.mode === \"move\") {\n        if (typeof anno.x2 === \"number\") {\n          anno.x += dxData;\n          anno.x2 += dxData;\n        } else {\n          anno.x = this._snapX(anno.x + dxData);\n        }\n      } else if (d.mode === \"resize-x1\" || d.mode === \"resize-x2\") {\n        const xIsLeft = anno.x2 == null || anno.x <= anno.x2;\n        const grow = d.mode === \"resize-x2\" ? !xIsLeft : xIsLeft;\n        if (grow) anno.x = this._snapX(anno.x + dxData);\n        else if (typeof anno.x2 === \"number\") anno.x2 = this._snapX(anno.x2 + dxData);\n      }\n      return;\n    }\n    if (d.type === \"yaxis\") {\n      const yi = anno.yAxisIndex || 0;\n      const map = w2.globals.seriesYAxisMap;\n      const si = map && map[yi] ? map[yi][0] : 0;\n      const yRange = w2.globals.yRange ? w2.globals.yRange[si] : null;\n      if (yRange == null || !w2.layout.gridHeight) return;\n      const dyData = -d.dyPixel * (yRange / w2.layout.gridHeight);\n      if (typeof anno.y2 === \"number\") {\n        if (typeof anno.y === \"number\") anno.y += dyData;\n        anno.y2 += dyData;\n      } else if (typeof anno.y === \"number\") {\n        anno.y = this._snapY(anno.y + dyData, si);\n      }\n    }\n  }\n  /**\n   * Invert a pixel drag delta to a point annotation's data x/y.\n   * @param {any} anno @param {number} dxPixel @param {number} dyPixel\n   * @returns {{newX:any, newY:any}}\n   */\n  _invertPoint(anno, dxPixel, dyPixel) {\n    const w2 = this.w;\n    const categoryX = (w2.config.xaxis.type === \"category\" || w2.config.xaxis.convertedCatToNumeric) && !w2.axisFlags.dataFormatXNumeric;\n    let newX = anno.x;\n    if (!categoryX && typeof anno.x === \"number\" && w2.layout.gridWidth) {\n      newX = anno.x + dxPixel * (w2.globals.xRange / w2.layout.gridWidth);\n    }\n    let newY = anno.y;\n    const yi = anno.yAxisIndex || 0;\n    const map = w2.globals.seriesYAxisMap;\n    const si = map && map[yi] ? map[yi][0] : 0;\n    const yRange = w2.globals.yRange ? w2.globals.yRange[si] : null;\n    const logY = w2.config.yaxis[yi] && w2.config.yaxis[yi].logarithmic;\n    if (typeof anno.y === \"number\" && yRange != null && !logY && w2.layout.gridHeight) {\n      newY = anno.y - dyPixel * (yRange / w2.layout.gridHeight);\n    }\n    return { newX, newY };\n  }\n  /**\n   * Targeted redraw of one annotation: drop its elements and re-add the shape +\n   * label + label background at the current config coordinates (no full chart\n   * re-render, and repeat-safe unlike updateOptions({})).\n   * @param {string} type @param {any} anno @param {number} index\n   */\n  _redrawAnno(type, anno, index) {\n    const w2 = this.w;\n    const baseEl = w2.dom.baseEl;\n    const annotations = this.ctx.annotations;\n    if (!baseEl || !annotations) return;\n    baseEl.querySelectorAll(\".\" + anno.id).forEach((el) => el.remove());\n    const group = baseEl.querySelector(\".apexcharts-\" + type + \"-annotations\");\n    if (!group) return;\n    if (type === \"point\" && annotations.pointsAnnotations) {\n      annotations.pointsAnnotations.addPointAnnotation(anno, group, index);\n    } else if (type === \"xaxis\" && annotations.xAxisAnnotations) {\n      annotations.xAxisAnnotations.addXaxisAnnotation(anno, group, index);\n    } else if (type === \"yaxis\" && annotations.yAxisAnnotations) {\n      annotations.yAxisAnnotations.addYaxisAnnotation(anno, group, index);\n    }\n    const labelEl = baseEl.querySelector(\n      \".apexcharts-\" + type + \"-annotation-label.\" + anno.id\n    );\n    if (labelEl && annotations.helpers && anno.label && anno.label.text) {\n      const elRect = annotations.helpers.addBackgroundToAnno(labelEl, anno);\n      if (elRect && labelEl.parentNode) {\n        labelEl.parentNode.insertBefore(elRect.node, labelEl);\n      }\n    }\n    this._attach();\n  }\n  /**\n   * Dispatch an ink annotation lifecycle event both to the user callback\n   * (`chart.events[name]`) and the internal event bus, in that order.\n   * @param {string} name @param {any} args\n   */\n  _fireAnnotationEvent(name2, args) {\n    var _a;\n    const events = this.w.config.chart.events;\n    if (typeof events[name2] === \"function\") {\n      events[name2](this.ctx, args);\n    }\n    (_a = this.ctx.events) == null ? void 0 : _a.fireEvent(name2, [this.ctx, args]);\n  }\n  /** @param {string} type @param {any} anno @param {number} index */\n  _fireDragged(type, anno, index) {\n    const args = { type, id: anno.id, index, x: anno.x, y: anno.y };\n    if (anno.x2 != null) args.x2 = anno.x2;\n    if (anno.y2 != null) args.y2 = anno.y2;\n    this._fireAnnotationEvent(\"annotationDragged\", args);\n  }\n  // ─── P3: click-to-create ─────────────────────────────────────────────────\n  /**\n   * Enter create mode: the next click on the plot area drops a new draggable\n   * point annotation there and opens its label editor.\n   */\n  startCreate() {\n    if (this._creating) return;\n    const svg = this.w.dom.Paper && this.w.dom.Paper.node;\n    if (!svg) return;\n    this._creating = true;\n    svg.style.cursor = \"crosshair\";\n    svg.addEventListener(\"click\", this._onCreateClick, true);\n    this._syncPalette();\n  }\n  /** Leave create mode. */\n  stopCreate() {\n    if (!this._creating) return;\n    this._creating = false;\n    const svg = this.w.dom.Paper && this.w.dom.Paper.node;\n    if (svg) {\n      svg.style.cursor = \"\";\n      svg.removeEventListener(\"click\", this._onCreateClick, true);\n    }\n    this._syncPalette();\n  }\n  /** @param {any} e */\n  _onCreateClick(e2) {\n    if (!this._creating) return;\n    e2.preventDefault();\n    e2.stopPropagation();\n    const pos = this._pixelToData(e2.clientX, e2.clientY);\n    this.stopCreate();\n    if (!pos) return;\n    this.createAt(pos.x, pos.y);\n  }\n  /**\n   * Create a draggable note at data coordinates and open its editor card.\n   * Public: the context menu's \"Add note here\" routes here so its notes are\n   * config-backed too, and thus draggable, editable, persistable and undoable.\n   * @param {any} x @param {any} y @param {{text?: string}} [opts]\n   * @returns {any} the created annotation config\n   */\n  createAt(x, y, opts = {}) {\n    const w2 = this.w;\n    this._wire();\n    this._createSeq += 1;\n    const id = \"apexcharts-ink-new-\" + this._createSeq + \"-\" + w2.globals.chartID;\n    const anno = Utils$1.extend(new Options().pointAnnotation, {\n      x,\n      y,\n      id,\n      draggable: true,\n      label: { text: opts.text || \"Note\" }\n    });\n    if (!w2.config.annotations) w2.config.annotations = {};\n    if (!Array.isArray(w2.config.annotations.points)) w2.config.annotations.points = [];\n    w2.config.annotations.points.push(anno);\n    const index = w2.config.annotations.points.length - 1;\n    this._redrawAnno(\"point\", anno, index);\n    this._checkpoint(\"ink:create\");\n    this._fireCreated(\"point\", anno, index);\n    this._startEdit(\"point\", index, { select: true });\n    return anno;\n  }\n  /**\n   * Create a draggable dashed LINE annotation at a data value and open its\n   * editor card: axis 'x' drops a vertical line at a data x, axis 'y' a\n   * horizontal line at a data y. Public: the context menu's \"Annotate here\"\n   * routes here so its lines are config-backed too, and thus draggable,\n   * editable, persistable and undoable. Lines only: x2/y2 are never set, so\n   * this can never produce a range rectangle.\n   * @param {'x'|'y'} axis @param {any} val\n   * @param {{text?: string, strokeDashArray?: number, color?: string, select?: boolean}} [opts]\n   * @returns {any} the created annotation config\n   */\n  createLineAt(axis, val, opts = {}) {\n    const w2 = this.w;\n    this._wire();\n    this._createSeq += 1;\n    const id = \"apexcharts-ink-new-\" + this._createSeq + \"-\" + w2.globals.chartID;\n    const type = axis === \"y\" ? \"yaxis\" : \"xaxis\";\n    const defaults = type === \"yaxis\" ? new Options().yAxisAnnotation : new Options().xAxisAnnotation;\n    const over = {\n      id,\n      draggable: true,\n      strokeDashArray: opts.strokeDashArray != null ? opts.strokeDashArray : 4,\n      label: { text: opts.text || \"\" }\n    };\n    if (opts.color) {\n      over.borderColor = opts.color;\n      over.label.borderColor = opts.color;\n    }\n    if (type === \"yaxis\") over.y = val;\n    else over.x = val;\n    const anno = Utils$1.extend(defaults, over);\n    if (!w2.config.annotations) w2.config.annotations = {};\n    if (!Array.isArray(w2.config.annotations[type])) w2.config.annotations[type] = [];\n    w2.config.annotations[type].push(anno);\n    const index = w2.config.annotations[type].length - 1;\n    this._redrawAnno(type, anno, index);\n    this._checkpoint(\"ink:create\");\n    this._fireCreated(type, anno, index);\n    if (opts.select !== false) this._startEdit(type, index, { select: true });\n    return anno;\n  }\n  /**\n   * Convert a client-space point to data coordinates (absolute, for create).\n   * @param {number} clientX @param {number} clientY\n   * @returns {{x:any, y:any}|null}\n   */\n  _pixelToData(clientX, clientY) {\n    const w2 = this.w;\n    const gridEl = w2.dom.baseEl && w2.dom.baseEl.querySelector(\".apexcharts-grid\");\n    if (!gridEl) return null;\n    const g2 = gridEl.getBoundingClientRect();\n    if (!g2.width || !g2.height) return null;\n    const fx = (clientX - g2.left) / g2.width;\n    const fy = (clientY - g2.top) / g2.height;\n    const minX = w2.globals.minX;\n    const xRange = w2.globals.xRange;\n    const minY = w2.globals.minYArr && w2.globals.minYArr[0] != null ? w2.globals.minYArr[0] : w2.globals.minY;\n    const yRange = w2.globals.yRange && w2.globals.yRange[0] != null ? w2.globals.yRange[0] : w2.globals.maxY - w2.globals.minY;\n    let x = minX + fx * xRange;\n    const y = minY + (1 - fy) * yRange;\n    const categoryX = (w2.config.xaxis.type === \"category\" || w2.config.xaxis.convertedCatToNumeric) && !w2.axisFlags.dataFormatXNumeric;\n    if (categoryX) x = Math.round(x);\n    return { x, y };\n  }\n  /** @param {string} type @param {any} anno @param {number} index */\n  _fireCreated(type, anno, index) {\n    const args = { type, id: anno.id, index };\n    if (typeof anno.x !== \"undefined\") args.x = anno.x;\n    if (typeof anno.y !== \"undefined\") args.y = anno.y;\n    this._fireAnnotationEvent(\"annotationCreated\", args);\n  }\n  // ─── P3: tool palette ────────────────────────────────────────────────────\n  /** Render a minimal \"add note\" toggle into the chart wrap (once per render). */\n  _renderPalette() {\n    const w2 = this.w;\n    const elWrap = w2.dom.elWrap;\n    if (!elWrap || elWrap.querySelector(\".apexcharts-ink-palette\")) return;\n    const doc = elWrap.ownerDocument;\n    const bar = doc.createElement(\"div\");\n    bar.className = \"apexcharts-ink-palette\";\n    const s2 = bar.style;\n    s2.position = \"absolute\";\n    s2.top = \"6px\";\n    s2.left = \"6px\";\n    s2.zIndex = \"15\";\n    const btn = doc.createElement(\"button\");\n    btn.type = \"button\";\n    btn.className = \"apexcharts-ink-add\";\n    btn.textContent = \"+ Note\";\n    const bs = btn.style;\n    bs.cursor = \"pointer\";\n    bs.font = \"12px sans-serif\";\n    bs.padding = \"4px 9px\";\n    bs.borderRadius = \"5px\";\n    bs.border = \"1px solid #6366f1\";\n    bs.color = \"#4338ca\";\n    bs.background = \"#fff\";\n    btn.addEventListener(\"click\", (e2) => {\n      e2.stopPropagation();\n      if (this._creating) this.stopCreate();\n      else this.startCreate();\n    });\n    bar.appendChild(btn);\n    elWrap.appendChild(bar);\n    this._syncPalette();\n  }\n  /** Reflect create-mode state on the palette button. */\n  _syncPalette() {\n    const elWrap = this.w.dom.elWrap;\n    const btn = (\n      /** @type {any} */\n      elWrap && elWrap.querySelector(\".apexcharts-ink-add\")\n    );\n    if (!btn) return;\n    if (this._creating) {\n      btn.style.background = \"#6366f1\";\n      btn.style.color = \"#fff\";\n      btn.textContent = \"Click chart...\";\n    } else {\n      btn.style.background = \"#fff\";\n      btn.style.color = \"#4338ca\";\n      btn.textContent = \"+ Note\";\n    }\n  }\n  // ─── P2 + P6: the floating note editor card ──────────────────────────────\n  // Click (or double-click) an ink-managed annotation to open a small card\n  // anchored to it: rename inline, recolor via accent swatches, toggle bold,\n  // step the font size, size/reshape the marker (points), or delete the note.\n  /** @returns {string[]} the accent swatches offered by the editor */\n  _noteColors() {\n    const ink = this.w.config.chart.ink;\n    return ink && Array.isArray(ink.noteColors) && ink.noteColors.length ? ink.noteColors : NOTE_COLORS;\n  }\n  /**\n   * Perceived-luminance check so text/border contrast follows the accent.\n   * @param {string} hex\n   */\n  static _isLight(hex) {\n    const h2 = String(hex || \"\").replace(\"#\", \"\");\n    const full = h2.length === 3 ? h2.split(\"\").map((c2) => c2 + c2).join(\"\") : h2;\n    const n2 = parseInt(full, 16);\n    if (isNaN(n2) || full.length !== 6) return false;\n    const r2 = n2 >> 16 & 255;\n    const g2 = n2 >> 8 & 255;\n    const b2 = n2 & 255;\n    return (0.299 * r2 + 0.587 * g2 + 0.114 * b2) / 255 > 0.72;\n  }\n  /** @param {any} style */\n  static _isBold(style) {\n    const fw = style && style.fontWeight;\n    return fw === \"bold\" || parseInt(String(fw), 10) >= 600;\n  }\n  /**\n   * Small icon/text button for the editor card. mousedown is prevented so the\n   * text input keeps focus while formatting.\n   * @param {any} doc @param {string} content @param {string} title\n   * @param {Function} onClick @param {string} [extraClass] @param {boolean} [isSvg]\n   */\n  _cardBtn(doc, content, title, onClick, extraClass, isSvg) {\n    const b2 = doc.createElement(\"button\");\n    b2.type = \"button\";\n    b2.className = \"apexcharts-ink-btn\" + (extraClass ? \" \" + extraClass : \"\");\n    b2.title = title;\n    b2.setAttribute(\"aria-label\", title);\n    if (isSvg) b2.innerHTML = content;\n    else b2.textContent = content;\n    b2.addEventListener(\"mousedown\", (e2) => e2.preventDefault());\n    b2.addEventListener(\"click\", (e2) => {\n      e2.stopPropagation();\n      onClick();\n    });\n    return b2;\n  }\n  /**\n   * Uppercase row caption (\"Label\" / \"Line\" / \"Marker\") for the editor card.\n   * @param {any} doc @param {string} text\n   */\n  _cardLabel(doc, text) {\n    const lab = doc.createElement(\"span\");\n    lab.className = \"apexcharts-ink-cardlabel\";\n    lab.textContent = text;\n    return lab;\n  }\n  /**\n   * Color swatch button for the editor card. mousedown is prevented so the\n   * text input keeps focus while restyling.\n   * @param {any} doc @param {string} c\n   * @param {(c: string) => void} pick @param {string} [extraClass]\n   */\n  _mkSwatch(doc, c2, pick, extraClass) {\n    const sw = doc.createElement(\"button\");\n    sw.type = \"button\";\n    sw.className = \"apexcharts-ink-swatch\" + (extraClass ? \" \" + extraClass : \"\");\n    sw.title = c2;\n    sw.setAttribute(\"aria-label\", \"Color \" + c2);\n    sw.dataset.color = c2;\n    sw.style.background = c2;\n    sw.addEventListener(\"mousedown\", (e2) => e2.preventDefault());\n    sw.addEventListener(\"click\", (e2) => {\n      e2.stopPropagation();\n      pick(c2);\n    });\n    return sw;\n  }\n  /**\n   * Open the floating editor card for an annotation.\n   * @param {string} type @param {number} index\n   * @param {{select?: boolean}} [opts] select: preselect the text (create / dblclick)\n   */\n  _startEdit(type, index, opts = {}) {\n    const w2 = this.w;\n    const anno = this._annoList(type)[index];\n    const baseEl = w2.dom.baseEl;\n    const elWrap = w2.dom.elWrap;\n    if (!anno || !anno.id || !baseEl || !elWrap) return;\n    this._closeEditor(false);\n    const doc = baseEl.ownerDocument;\n    const card = doc.createElement(\"div\");\n    card.className = \"apexcharts-ink-card\";\n    card.setAttribute(\"role\", \"dialog\");\n    card.setAttribute(\"aria-label\", \"Edit note\");\n    card.style.visibility = \"hidden\";\n    const rowText = doc.createElement(\"div\");\n    rowText.className = \"apexcharts-ink-card-row\";\n    const input = doc.createElement(\"input\");\n    input.type = \"text\";\n    input.className = \"apexcharts-ink-editor\";\n    input.placeholder = \"Note text\";\n    input.value = anno.label && anno.label.text || \"\";\n    rowText.appendChild(input);\n    rowText.appendChild(\n      this._cardBtn(\n        doc,\n        TRASH_ICON,\n        \"Delete note\",\n        () => this._deleteAnno(),\n        \"apexcharts-ink-btn--delete\",\n        true\n      )\n    );\n    card.appendChild(rowText);\n    const rowStyle = doc.createElement(\"div\");\n    rowStyle.className = \"apexcharts-ink-card-row\";\n    if (type !== \"point\") {\n      rowStyle.appendChild(this._cardLabel(doc, \"Label\"));\n    }\n    this._noteColors().forEach((c2) => {\n      rowStyle.appendChild(this._mkSwatch(doc, c2, (col) => this._applyColor(col)));\n    });\n    const sep = doc.createElement(\"span\");\n    sep.className = \"apexcharts-ink-sep\";\n    rowStyle.appendChild(sep);\n    rowStyle.appendChild(\n      this._cardBtn(doc, \"B\", \"Bold\", () => this._toggleBold(), \"apexcharts-ink-btn--bold\")\n    );\n    rowStyle.appendChild(this._cardBtn(doc, \"A-\", \"Smaller text\", () => this._stepFont(-1)));\n    rowStyle.appendChild(this._cardBtn(doc, \"A+\", \"Larger text\", () => this._stepFont(1)));\n    card.appendChild(rowStyle);\n    if (type !== \"point\") {\n      const rowLine = doc.createElement(\"div\");\n      rowLine.className = \"apexcharts-ink-card-row\";\n      rowLine.appendChild(this._cardLabel(doc, \"Line\"));\n      this._noteColors().forEach((c2) => {\n        rowLine.appendChild(\n          this._mkSwatch(\n            doc,\n            c2,\n            (col) => this._applyLineColor(col),\n            \"apexcharts-ink-swatch--line\"\n          )\n        );\n      });\n      card.appendChild(rowLine);\n    }\n    if (type === \"point\") {\n      const rowMarker = doc.createElement(\"div\");\n      rowMarker.className = \"apexcharts-ink-card-row\";\n      rowMarker.appendChild(this._cardLabel(doc, \"Marker\"));\n      rowMarker.appendChild(\n        this._cardBtn(doc, \"-\", \"Smaller marker\", () => this._stepMarker(-1))\n      );\n      const sizeOut = doc.createElement(\"span\");\n      sizeOut.className = \"apexcharts-ink-marker-size\";\n      rowMarker.appendChild(sizeOut);\n      rowMarker.appendChild(\n        this._cardBtn(doc, \"+\", \"Larger marker\", () => this._stepMarker(1))\n      );\n      rowMarker.appendChild(\n        this._cardBtn(\n          doc,\n          SHAPE_GLYPHS.circle,\n          \"Marker shape\",\n          () => this._cycleShape(),\n          \"apexcharts-ink-btn--shape\"\n        )\n      );\n      card.appendChild(rowMarker);\n    }\n    elWrap.appendChild(card);\n    this._editor = { card, input, type, index };\n    this._positionCard();\n    this._syncCard();\n    card.style.visibility = \"\";\n    input.focus();\n    if (opts.select) input.select();\n    card.addEventListener(\"keydown\", (e2) => {\n      if (e2.key === \"Escape\") {\n        e2.preventDefault();\n        e2.stopPropagation();\n        this._closeEditor(false);\n      } else if (e2.key === \"Enter\" && e2.target === input) {\n        e2.preventDefault();\n        this._closeEditor(true);\n      }\n    });\n    doc.addEventListener(\"mousedown\", this._onDocDownEditor, true);\n    doc.addEventListener(\"touchstart\", this._onDocDownEditor, true);\n  }\n  /**\n   * Commit + close on any press outside the card.\n   * @param {any} e\n   */\n  _onDocDownEditor(e2) {\n    const ed = this._editor;\n    if (!ed || ed.card.contains(e2.target)) return;\n    this._closeEditor(true);\n  }\n  /**\n   * Anchor the card to the annotation's label (below it, or above when there\n   * is no room), clamped inside the chart wrap. Re-run after each restyle\n   * since the label rect changes.\n   */\n  _positionCard() {\n    const ed = this._editor;\n    if (!ed) return;\n    const w2 = this.w;\n    const baseEl = w2.dom.baseEl;\n    const elWrap = w2.dom.elWrap;\n    const anno = this._annoList(ed.type)[ed.index];\n    if (!baseEl || !elWrap || !anno) return;\n    const anchor = baseEl.querySelector(\n      \".apexcharts-\" + ed.type + \"-annotation-label.\" + anno.id\n    ) || baseEl.querySelector(\".\" + anno.id);\n    if (!anchor) return;\n    const wrapRect = elWrap.getBoundingClientRect();\n    const aRect = anchor.getBoundingClientRect();\n    const cw = ed.card.offsetWidth;\n    const ch = ed.card.offsetHeight;\n    let left = Math.round(aRect.left - wrapRect.left);\n    let top = Math.round(aRect.bottom - wrapRect.top) + 8;\n    if (top + ch > elWrap.clientHeight - 4) {\n      top = Math.round(aRect.top - wrapRect.top) - ch - 8;\n    }\n    if (left + cw > elWrap.clientWidth - 4) left = elWrap.clientWidth - cw - 4;\n    ed.card.style.left = Math.max(4, left) + \"px\";\n    ed.card.style.top = Math.max(4, top) + \"px\";\n  }\n  /** Reflect the annotation's current style on the card controls. */\n  _syncCard() {\n    const ed = this._editor;\n    if (!ed) return;\n    const anno = this._annoList(ed.type)[ed.index];\n    if (!anno) return;\n    const style = anno.label && anno.label.style || {};\n    const bg = String(style.background || \"\").toLowerCase();\n    ed.card.querySelectorAll(\".apexcharts-ink-swatch:not(.apexcharts-ink-swatch--line)\").forEach((sw) => {\n      sw.classList.toggle(\n        \"apexcharts-ink-swatch--active\",\n        (sw.dataset.color || \"\").toLowerCase() === bg\n      );\n    });\n    const stroke = String(anno.borderColor || \"\").toLowerCase();\n    ed.card.querySelectorAll(\".apexcharts-ink-swatch--line\").forEach((sw) => {\n      sw.classList.toggle(\n        \"apexcharts-ink-swatch--active\",\n        (sw.dataset.color || \"\").toLowerCase() === stroke\n      );\n    });\n    const boldBtn = ed.card.querySelector(\".apexcharts-ink-btn--bold\");\n    if (boldBtn) {\n      boldBtn.classList.toggle(\"apexcharts-ink-btn--active\", InkLayer._isBold(style));\n    }\n    const m2 = anno.marker || {};\n    const sizeOut = ed.card.querySelector(\".apexcharts-ink-marker-size\");\n    if (sizeOut) {\n      sizeOut.textContent = String(typeof m2.size === \"number\" ? m2.size : 4);\n    }\n    const shapeBtn = ed.card.querySelector(\".apexcharts-ink-btn--shape\");\n    if (shapeBtn) {\n      shapeBtn.textContent = SHAPE_GLYPHS[m2.shape] || SHAPE_GLYPHS.circle;\n    }\n  }\n  /**\n   * Commit the input's text into the annotation (the card stays open). Also\n   * runs before any style apply so typed-but-unconfirmed text survives the\n   * redraw.\n   * @param {any} ed\n   */\n  _commitTextOf(ed) {\n    const anno = this._annoList(ed.type)[ed.index];\n    if (!anno) return;\n    const text = ed.input.value;\n    if (!anno.label) anno.label = {};\n    if (anno.label.text === text) return;\n    anno.label.text = text;\n    this._redrawAnno(ed.type, anno, ed.index);\n    this._checkpoint(\"ink:edit\");\n    this._fireEdited(ed.type, anno, ed.index);\n  }\n  /**\n   * Close the editor card. commit=true also commits the pending text. Style\n   * edits apply immediately and are not rolled back by Escape; use undo.\n   * @param {boolean} commit\n   */\n  _closeEditor(commit) {\n    const ed = this._editor;\n    if (!ed) return;\n    this._editor = null;\n    const doc = this.w.dom.baseEl && this.w.dom.baseEl.ownerDocument;\n    if (doc) {\n      doc.removeEventListener(\"mousedown\", this._onDocDownEditor, true);\n      doc.removeEventListener(\"touchstart\", this._onDocDownEditor, true);\n    }\n    if (ed.card.parentNode) ed.card.parentNode.removeChild(ed.card);\n    if (commit) this._commitTextOf(ed);\n  }\n  /**\n   * Apply a config mutation from a card control: commit pending text, mutate,\n   * redraw, checkpoint for undo, then refresh + re-anchor the card.\n   * @param {string} label @param {(anno: any) => void} mutate\n   */\n  _applyStyle(label, mutate) {\n    const ed = this._editor;\n    if (!ed) return;\n    const anno = this._annoList(ed.type)[ed.index];\n    if (!anno) return;\n    this._commitTextOf(ed);\n    if (!anno.label) anno.label = {};\n    if (!anno.label.style) anno.label.style = {};\n    mutate(anno);\n    this._redrawAnno(ed.type, anno, ed.index);\n    this._checkpoint(label);\n    this._fireStyled(ed.type, anno, ed.index);\n    this._syncCard();\n    this._positionCard();\n  }\n  /**\n   * Apply an accent color: label chip + marker (points) or line/range fill\n   * (axis annotations), with text/border contrast following the luminance.\n   * @param {string} c\n   */\n  _applyColor(c2) {\n    const ed = this._editor;\n    if (!ed) return;\n    const light = InkLayer._isLight(c2);\n    this._applyStyle(\"ink:style\", (anno) => {\n      anno.label.style.background = c2;\n      anno.label.style.color = light ? \"#334155\" : \"#ffffff\";\n      anno.label.borderColor = light ? \"#cbd5e1\" : c2;\n      if (ed.type === \"point\") {\n        if (!anno.marker) anno.marker = {};\n        anno.marker.strokeColor = light ? \"#334155\" : c2;\n        anno.marker.fillColor = light ? \"#ffffff\" : c2;\n      }\n    });\n  }\n  /**\n   * Line-stroke color for axis annotations, separate from the label chip.\n   * @param {string} c\n   */\n  _applyLineColor(c2) {\n    const ed = this._editor;\n    if (!ed || ed.type === \"point\") return;\n    this._applyStyle(\"ink:style\", (anno) => {\n      anno.borderColor = c2;\n      if (anno.x2 != null || anno.y2 != null) anno.fillColor = c2;\n    });\n  }\n  /**\n   * Step the label font size through the preset scale.\n   * @param {number} dir\n   */\n  _stepFont(dir) {\n    this._applyStyle(\"ink:style\", (anno) => {\n      const cur = parseFloat(anno.label.style.fontSize) || 11;\n      let i2 = 0;\n      for (let k = 1; k < FONT_STEPS.length; k++) {\n        if (Math.abs(FONT_STEPS[k] - cur) < Math.abs(FONT_STEPS[i2] - cur)) i2 = k;\n      }\n      i2 = Math.min(FONT_STEPS.length - 1, Math.max(0, i2 + dir));\n      anno.label.style.fontSize = FONT_STEPS[i2] + \"px\";\n    });\n  }\n  _toggleBold() {\n    this._applyStyle(\"ink:style\", (anno) => {\n      anno.label.style.fontWeight = InkLayer._isBold(anno.label.style) ? 400 : 700;\n    });\n  }\n  /**\n   * Grow/shrink the point marker.\n   * @param {number} dir\n   */\n  _stepMarker(dir) {\n    this._applyStyle(\"ink:style\", (anno) => {\n      if (!anno.marker) anno.marker = {};\n      const cur = typeof anno.marker.size === \"number\" ? anno.marker.size : 4;\n      anno.marker.size = Math.min(14, Math.max(2, cur + dir));\n    });\n  }\n  /** Cycle the point marker shape (circle, square, diamond, triangle). */\n  _cycleShape() {\n    this._applyStyle(\"ink:style\", (anno) => {\n      if (!anno.marker) anno.marker = {};\n      const i2 = MARKER_SHAPES.indexOf(anno.marker.shape);\n      anno.marker.shape = MARKER_SHAPES[(i2 + 1) % MARKER_SHAPES.length];\n    });\n  }\n  /** Delete the annotation the editor is open on (undoable via Rewind). */\n  _deleteAnno() {\n    const ed = this._editor;\n    if (!ed) return;\n    const list = this._annoList(ed.type);\n    const anno = list[ed.index];\n    this._closeEditor(false);\n    if (!anno) return;\n    const baseEl = this.w.dom.baseEl;\n    if (baseEl && anno.id) {\n      baseEl.querySelectorAll(\".\" + anno.id).forEach((el) => el.remove());\n    }\n    list.splice(ed.index, 1);\n    for (let i2 = ed.index; i2 < list.length; i2++) {\n      this._redrawAnno(ed.type, list[i2], i2);\n    }\n    this._checkpoint(\"ink:delete\");\n    this._fireDeleted(ed.type, anno, ed.index);\n  }\n  /** @param {string} type @param {any} anno @param {number} index */\n  _fireEdited(type, anno, index) {\n    const args = { type, id: anno.id, index, text: anno.label ? anno.label.text : \"\" };\n    this._fireAnnotationEvent(\"annotationEdited\", args);\n  }\n  /** @param {string} type @param {any} anno @param {number} index */\n  _fireStyled(type, anno, index) {\n    const args = { type, id: anno.id, index, label: anno.label, marker: anno.marker };\n    this._fireAnnotationEvent(\"annotationStyled\", args);\n  }\n  /** @param {string} type @param {any} anno @param {number} index */\n  _fireDeleted(type, anno, index) {\n    const args = { type, id: anno.id, index };\n    this._fireAnnotationEvent(\"annotationDeleted\", args);\n  }\n  // ─── lifecycle ────────────────────────────────────────────────────────────\n  _teardownDocListeners() {\n    const doc = this.w.dom.baseEl && this.w.dom.baseEl.ownerDocument;\n    if (!doc) return;\n    doc.removeEventListener(\"mousemove\", this._onMove);\n    doc.removeEventListener(\"touchmove\", this._onMove);\n    doc.removeEventListener(\"mouseup\", this._onUp);\n    doc.removeEventListener(\"touchend\", this._onUp);\n  }\n  teardown() {\n    var _a, _b, _c, _d;\n    this._teardownDocListeners();\n    this._closeEditor(false);\n    this.stopCreate();\n    this._drag = null;\n    if (this._wired) {\n      (_b = (_a = this.ctx).removeEventListener) == null ? void 0 : _b.call(_a, \"mounted\", this._onRerender);\n      (_d = (_c = this.ctx).removeEventListener) == null ? void 0 : _d.call(_c, \"updated\", this._onRerender);\n      this._wired = false;\n    }\n  }\n}\nApexCharts.registerFeatures({ ink: InkLayer });\nclass Measure {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.graphics = new Graphics(w2);\n    this.pins = [];\n    this.drag = null;\n    this.armed = false;\n    this.persistent = false;\n    this.pane = null;\n    this._seedActive = false;\n    this._onKeyDown = this._onKeyDown.bind(this);\n    this._onKeyUp = this._onKeyUp.bind(this);\n    this._onDown = this._onDown.bind(this);\n    this._onMove = this._onMove.bind(this);\n    this._onUp = this._onUp.bind(this);\n    this._onSeedDown = this._onSeedDown.bind(this);\n    this._onSeedKey = this._onSeedKey.bind(this);\n    this._afterRender = this._afterRender.bind(this);\n    ctx.addEventListener(\"mounted\", this._afterRender);\n    ctx.addEventListener(\"updated\", this._afterRender);\n    this._bindKeys();\n  }\n  _cfg() {\n    return this.w.config.chart.measure || {};\n  }\n  _enabled() {\n    return this.w.globals.axisCharts && this._cfg().enabled === true;\n  }\n  _mode() {\n    return this._cfg().mode === \"free\" ? \"free\" : \"span\";\n  }\n  /**\n   * Nearest first-series data point to a data x (used to snap span endpoints\n   * onto the series line).\n   * @param {number} dataX\n   * @returns {{x:number,y:number}|null}\n   */\n  _snapToSeries(dataX) {\n    const s0 = (\n      /** @type {any} */\n      (this.w.config.series || [])[0]\n    );\n    if (!s0) return null;\n    const pts = this._points(s0.data || []);\n    if (!pts.length) return null;\n    let best = pts[0];\n    let bd = Math.abs(pts[0].x - dataX);\n    for (let i2 = 1; i2 < pts.length; i2++) {\n      const d = Math.abs(pts[i2].x - dataX);\n      if (d < bd) {\n        bd = d;\n        best = pts[i2];\n      }\n    }\n    return best;\n  }\n  /**\n   * Resolve a raw projected point to the endpoint that is actually drawn: span\n   * mode snaps x to the nearest first-series data point (y follows the line);\n   * free mode keeps the raw point.\n   * @param {{x:number,y:number,gx:number,gy:number}} raw\n   */\n  _resolve(raw) {\n    if (this._mode() === \"free\") return raw;\n    const snapped = this._snapToSeries(raw.x);\n    if (!snapped) return raw;\n    const g2 = this._dataToGrid(snapped.x, snapped.y);\n    return { x: snapped.x, y: snapped.y, gx: g2.gx, gy: g2.gy };\n  }\n  _doc() {\n    return this.w.dom.baseEl && this.w.dom.baseEl.ownerDocument;\n  }\n  /** Bind the measure-key listeners once on the owner document. */\n  _bindKeys() {\n    if (this._keysBound) return;\n    const doc = this._doc();\n    if (!doc) return;\n    doc.addEventListener(\"keydown\", this._onKeyDown);\n    doc.addEventListener(\"keyup\", this._onKeyUp);\n    this._keysBound = true;\n  }\n  /** @param {any} e */\n  _onKeyDown(e2) {\n    if (!this._enabled() || this.persistent) return;\n    const key = this._cfg().key || \"m\";\n    if (e2.key && e2.key.toLowerCase() === String(key).toLowerCase()) {\n      this._arm();\n    } else if (e2.key === \"Escape\") {\n      this._cancelDrag();\n    }\n  }\n  /** @param {any} e */\n  _onKeyUp(e2) {\n    if (this.persistent) return;\n    const key = this._cfg().key || \"m\";\n    if (e2.key && e2.key.toLowerCase() === String(key).toLowerCase()) {\n      if (!this.drag) this._disarm();\n    }\n  }\n  /** Public: arm a sticky measure mode (survives key release) until stopped. */\n  startMeasure() {\n    if (!this._enabled()) return;\n    this.persistent = true;\n    this._arm();\n  }\n  /** Public: leave measure mode. */\n  stopMeasure() {\n    this.persistent = false;\n    this._cancelDrag();\n    this._disarm();\n  }\n  /**\n   * Public: begin a measurement anchored at a client-space point (used by the\n   * context menu's \"Measure from here\"). Endpoint A is fixed at (cx,cy), the\n   * ruler follows the cursor, and the next pointer press sets B and pins it.\n   * Escape cancels. No-op unless the measure tool is enabled.\n   * @param {number} cx @param {number} cy\n   */\n  seedFromClient(cx, cy) {\n    if (!this._enabled()) return;\n    this._cancelDrag();\n    this._endSeed(false);\n    const a2 = this._project(cx, cy);\n    this.drag = { a: a2, b: a2 };\n    this._seedActive = true;\n    const doc = this._doc();\n    if (doc) {\n      doc.addEventListener(\"mousemove\", this._onMove);\n      doc.addEventListener(\"touchmove\", this._onMove, { passive: false });\n      doc.addEventListener(\"mousedown\", this._onSeedDown, true);\n      doc.addEventListener(\"touchstart\", this._onSeedDown, true);\n      doc.addEventListener(\"keydown\", this._onSeedKey, true);\n    }\n    this._renderLive();\n  }\n  /** @param {any} e */\n  _onSeedDown(e2) {\n    if (!this._seedActive || !this.drag) return;\n    e2.preventDefault();\n    e2.stopPropagation();\n    const { cx, cy } = this._clientXY(e2);\n    this.drag.b = this._project(cx, cy);\n    this._endSeed(true);\n  }\n  /** @param {any} e */\n  _onSeedKey(e2) {\n    if (e2.key === \"Escape\") this._endSeed(false);\n  }\n  /**\n   * Finish (commit) or cancel a \"measure from here\" seed and detach listeners.\n   * @param {boolean} commit\n   */\n  _endSeed(commit) {\n    var _a, _b;\n    if (!this._seedActive) return;\n    this._seedActive = false;\n    const doc = this._doc();\n    if (doc) {\n      doc.removeEventListener(\"mousemove\", this._onMove);\n      doc.removeEventListener(\"touchmove\", this._onMove);\n      doc.removeEventListener(\"mousedown\", this._onSeedDown, true);\n      doc.removeEventListener(\"touchstart\", this._onSeedDown, true);\n      doc.removeEventListener(\"keydown\", this._onSeedKey, true);\n    }\n    const d = this.drag;\n    this.drag = null;\n    this._clearLive();\n    if (!commit || !d) return;\n    const a2 = this._resolve(d.a);\n    const b2 = this._resolve(d.b);\n    if (Math.abs(a2.gx - b2.gx) < 2 && Math.abs(a2.gy - b2.gy) < 2) return;\n    const mode = this._mode();\n    if (this._cfg().pinOnRelease !== false) {\n      this.pins.push({ xa: a2.x, ya: a2.y, xb: b2.x, yb: b2.y, mode });\n      this._renderPins();\n      (_b = (_a = this.ctx.history) == null ? void 0 : _a.snapshot) == null ? void 0 : _b.call(_a, \"measure\");\n    }\n    this._fireMeasured(a2, b2);\n  }\n  /** Public: remove all pinned rulers. */\n  clearMeasures() {\n    var _a, _b;\n    this.pins = [];\n    this._renderPins();\n    (_b = (_a = this.ctx.history) == null ? void 0 : _a.snapshot) == null ? void 0 : _b.call(_a, \"clear measures\");\n  }\n  /**\n   * Snapshot of the pinned rulers as JSON-safe plain data. This is the piece of\n   * state ViewState / Perspectives (shareable URL) / Rewind (undo) persist:\n   * pins already live in data space, so they round-trip and re-project.\n   * Returns a deep copy so callers cannot mutate ours.\n   * @returns {Array<{xa:number,ya:number,xb:number,yb:number,mode:string}>}\n   */\n  getPins() {\n    return this.pins.map((p2) => ({\n      xa: p2.xa,\n      ya: p2.ya,\n      xb: p2.xb,\n      yb: p2.yb,\n      mode: p2.mode === \"free\" ? \"free\" : \"span\"\n    }));\n  }\n  /**\n   * Replace the pinned rulers with a restored set and redraw. Accepts the shape\n   * getPins() returns; a nullish / non-array value (or an old token without\n   * measure state) clears all pins. Non-finite entries are dropped. Does NOT\n   * record a Rewind step (the restore itself is the caller's undo boundary).\n   * @param {any} pins\n   */\n  setPins(pins) {\n    this.pins = Array.isArray(pins) ? pins.filter(\n      (p2) => p2 && isFinite(p2.xa) && isFinite(p2.ya) && isFinite(p2.xb) && isFinite(p2.yb)\n    ).map((p2) => ({\n      xa: +p2.xa,\n      ya: +p2.ya,\n      xb: +p2.xb,\n      yb: +p2.yb,\n      mode: p2.mode === \"free\" ? \"free\" : \"span\"\n    })) : [];\n    this._renderPins();\n  }\n  /**\n   * Normalize a series `data` array into {x,y} points (numeric/datetime x or\n   * category index). Non-finite / non-scalar (range/candle) points drop out.\n   * @param {any[]} data\n   * @returns {Array<{x:number,y:number}>}\n   */\n  _points(data) {\n    const out = [];\n    for (let i2 = 0; i2 < data.length; i2++) {\n      const p2 = data[i2];\n      let x;\n      let y;\n      if (Array.isArray(p2)) {\n        x = +p2[0];\n        y = +p2[1];\n      } else if (p2 && typeof p2 === \"object\") {\n        x = +p2.x;\n        y = +p2.y;\n      } else {\n        x = i2;\n        y = +p2;\n      }\n      if (isFinite(x) && isFinite(y)) out.push({ x, y });\n    }\n    return out;\n  }\n  /** Lay the transparent capture pane over the plot so our pointer handlers own\n   *  the drag (ZoomPanSelection never sees it). */\n  _arm() {\n    if (this.armed || !this._enabled()) return;\n    const w2 = this.w;\n    const parent = w2.dom.elGraphical;\n    if (!parent) return;\n    this.armed = true;\n    const pane = this.graphics.drawRect(0, 0, w2.layout.gridWidth, w2.layout.gridHeight);\n    pane.node.setAttribute(\"class\", \"apexcharts-measure-capture\");\n    pane.node.setAttribute(\"fill\", \"transparent\");\n    pane.node.style.cursor = \"crosshair\";\n    pane.node.style.pointerEvents = \"all\";\n    pane.node.addEventListener(\"mousedown\", this._onDown);\n    pane.node.addEventListener(\"touchstart\", this._onDown, { passive: false });\n    parent.add(pane);\n    this.pane = pane;\n  }\n  _disarm() {\n    this.armed = false;\n    if (this.pane) {\n      this.pane.node.removeEventListener(\"mousedown\", this._onDown);\n      this.pane.node.removeEventListener(\"touchstart\", this._onDown);\n      const p2 = this.pane.node;\n      if (p2.parentNode) p2.parentNode.removeChild(p2);\n      this.pane = null;\n    }\n  }\n  /** @param {any} e @returns {{cx:number,cy:number}} */\n  _clientXY(e2) {\n    const t2 = e2.touches && e2.touches[0] ? e2.touches[0] : e2;\n    return { cx: t2.clientX, cy: t2.clientY };\n  }\n  _gridRect() {\n    const g2 = this.w.dom.baseEl.querySelector(\".apexcharts-grid\");\n    return g2 ? g2.getBoundingClientRect() : null;\n  }\n  /** [min,max] for the primary y-axis, preferring the rendered nice scale. */\n  _yRange() {\n    const g2 = this.w.globals;\n    const s2 = g2.yAxisScale && g2.yAxisScale[0];\n    if (s2 && isFinite(s2.niceMin) && isFinite(s2.niceMax) && s2.niceMax !== s2.niceMin) {\n      return [s2.niceMin, s2.niceMax];\n    }\n    return [g2.minY, g2.maxY];\n  }\n  /**\n   * Client pixel -> { x, y (data), gx, gy (grid-local SVG units) }.\n   * @param {number} cx @param {number} cy\n   */\n  _project(cx, cy) {\n    const w2 = this.w;\n    const rect = this._gridRect();\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const clamp = (v2) => v2 < 0 ? 0 : v2 > 1 ? 1 : v2;\n    const fx = rect ? clamp((cx - rect.left) / rect.width) : 0;\n    const fy = rect ? clamp((cy - rect.top) / rect.height) : 0;\n    const [ymin, ymax] = this._yRange();\n    const x = w2.globals.minX + fx * (w2.globals.maxX - w2.globals.minX);\n    const y = ymax - fy * (ymax - ymin);\n    return { x, y, gx: fx * gw, gy: fy * gh };\n  }\n  /**\n   * Data (x,y) -> grid-local SVG coords, for redrawing pinned rulers.\n   * @param {number} x @param {number} y\n   */\n  _dataToGrid(x, y) {\n    const w2 = this.w;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const xr = w2.globals.maxX - w2.globals.minX || 1;\n    const [ymin, ymax] = this._yRange();\n    const yr = ymax - ymin || 1;\n    return {\n      gx: (x - w2.globals.minX) / xr * gw,\n      gy: gh - (y - ymin) / yr * gh\n    };\n  }\n  /** @param {any} e */\n  _onDown(e2) {\n    if (!this.armed) return;\n    e2.preventDefault();\n    e2.stopPropagation();\n    const { cx, cy } = this._clientXY(e2);\n    const a2 = this._project(cx, cy);\n    this.drag = { a: a2, b: a2 };\n    const doc = this._doc();\n    if (doc) {\n      doc.addEventListener(\"mousemove\", this._onMove);\n      doc.addEventListener(\"mouseup\", this._onUp);\n      doc.addEventListener(\"touchmove\", this._onMove, { passive: false });\n      doc.addEventListener(\"touchend\", this._onUp);\n    }\n    this._renderLive();\n  }\n  /** @param {any} e */\n  _onMove(e2) {\n    if (!this.drag) return;\n    if (e2.cancelable) e2.preventDefault();\n    const { cx, cy } = this._clientXY(e2);\n    this.drag.b = this._project(cx, cy);\n    this._renderLive();\n  }\n  /** @param {any} _e */\n  _onUp(_e) {\n    var _a, _b;\n    const doc = this._doc();\n    if (doc) {\n      doc.removeEventListener(\"mousemove\", this._onMove);\n      doc.removeEventListener(\"mouseup\", this._onUp);\n      doc.removeEventListener(\"touchmove\", this._onMove);\n      doc.removeEventListener(\"touchend\", this._onUp);\n    }\n    if (!this.drag) return;\n    const rawA = this.drag.a;\n    const rawB = this.drag.b;\n    this.drag = null;\n    this._clearLive();\n    if (Math.abs(rawA.gx - rawB.gx) < 2 && Math.abs(rawA.gy - rawB.gy) < 2) {\n      if (!this.persistent) this._disarm();\n      return;\n    }\n    const mode = this._mode();\n    const a2 = this._resolve(rawA);\n    const b2 = this._resolve(rawB);\n    if (this._cfg().pinOnRelease !== false) {\n      this.pins.push({ xa: a2.x, ya: a2.y, xb: b2.x, yb: b2.y, mode });\n      this._renderPins();\n      (_b = (_a = this.ctx.history) == null ? void 0 : _a.snapshot) == null ? void 0 : _b.call(_a, \"measure\");\n    }\n    this._fireMeasured(a2, b2);\n    if (!this.persistent) this._disarm();\n  }\n  _cancelDrag() {\n    const doc = this._doc();\n    if (doc) {\n      doc.removeEventListener(\"mousemove\", this._onMove);\n      doc.removeEventListener(\"mouseup\", this._onUp);\n      doc.removeEventListener(\"touchmove\", this._onMove);\n      doc.removeEventListener(\"touchend\", this._onUp);\n    }\n    this.drag = null;\n    this._clearLive();\n  }\n  /**\n   * @param {{x:number,y:number}} a @param {{x:number,y:number}} b\n   * @returns {{dx:number,dy:number,pct:number,slope:number}}\n   */\n  _stats(a2, b2) {\n    const dx = b2.x - a2.x;\n    const dy = b2.y - a2.y;\n    return {\n      dx,\n      dy,\n      pct: a2.y !== 0 ? dy / Math.abs(a2.y) * 100 : NaN,\n      slope: dx !== 0 ? dy / dx : NaN\n    };\n  }\n  /** @param {number} v */\n  _fmt(v2) {\n    if (!isFinite(v2)) return \"n/a\";\n    const a2 = Math.abs(v2);\n    if (a2 !== 0 && (a2 < 0.01 || a2 >= 1e6)) return v2.toExponential(2);\n    return String(Math.round(v2 * 100) / 100);\n  }\n  /** getComputedStyle of the graphical layer (browser only), for CSS vars. */\n  _computedStyle() {\n    if (!Environment.isBrowser()) return null;\n    const node = this.w.dom.elGraphical && this.w.dom.elGraphical.node;\n    if (!node || typeof getComputedStyle !== \"function\") return null;\n    try {\n      return getComputedStyle(node);\n    } catch (e2) {\n      return null;\n    }\n  }\n  /**\n   * Resolve a color: explicit config value, else a `--apx-measure-*` CSS custom\n   * property, else the built-in default.\n   * @param {any} cfgVal @param {string} varName @param {string} fallback\n   * @param {CSSStyleDeclaration|null} [cs]\n   */\n  _resolveColor(cfgVal, varName, fallback, cs) {\n    if (cfgVal) return cfgVal;\n    const style = cs !== void 0 ? cs : this._computedStyle();\n    const v2 = style ? style.getPropertyValue(varName).trim() : \"\";\n    return v2 || fallback;\n  }\n  /** Resolved semantic colors (config -> CSS var -> built-in default). */\n  _colors() {\n    const c2 = this._cfg().colors || {};\n    const cs = this._computedStyle();\n    return {\n      up: this._resolveColor(c2.up, \"--apx-measure-up\", \"#16a34a\", cs),\n      down: this._resolveColor(c2.down, \"--apx-measure-down\", \"#dc2626\", cs),\n      neutral: this._resolveColor(c2.neutral, \"--apx-measure-neutral\", \"#64748b\", cs),\n      guide: this._resolveColor(c2.guide, \"--apx-measure-guide\", \"#94a3b8\", cs)\n    };\n  }\n  /** @param {number} dy */\n  _dirColor(dy) {\n    const c2 = this._colors();\n    return dy === 0 ? c2.neutral : dy > 0 ? c2.up : c2.down;\n  }\n  /** @param {number} dy */\n  _dirClass(dy) {\n    return dy === 0 ? \"apexcharts-measure-flat\" : dy > 0 ? \"apexcharts-measure-up\" : \"apexcharts-measure-down\";\n  }\n  /**\n   * Format a percentage, via `measure.format.percent` when set.\n   * @param {number} p\n   */\n  _fmtPct(p2) {\n    if (!isFinite(p2)) return \"n/a\";\n    const f = this._cfg().format && this._cfg().format.percent;\n    if (typeof f === \"function\") {\n      try {\n        const s2 = f(p2);\n        if (s2 != null) return String(s2);\n      } catch (e2) {\n      }\n    }\n    return (p2 >= 0 ? \"+\" : \"\") + this._fmt(p2) + \"%\";\n  }\n  /**\n   * The readout lines for a ruler: `measure.label` override, else the default\n   * per-mode text.\n   * @param {{x:number,y:number}} a @param {{x:number,y:number}} b\n   * @param {{dx:number,dy:number,pct:number,slope:number}} st @param {string} mode\n   * @returns {string[]}\n   */\n  _label(a2, b2, st, mode) {\n    const fn = this._cfg().label;\n    if (typeof fn === \"function\") {\n      const out = fn({\n        from: { x: a2.x, y: a2.y },\n        to: { x: b2.x, y: b2.y },\n        dx: st.dx,\n        dy: st.dy,\n        percentChange: st.pct,\n        slope: st.slope,\n        mode\n      });\n      return Array.isArray(out) ? out.map(String) : [String(out)];\n    }\n    if (mode === \"span\") {\n      const arrow = st.dy === 0 ? \"\" : st.dy > 0 ? \" ↑\" : \" ↓\";\n      const pct = isFinite(st.pct) ? \"(\" + this._fmtPct(st.pct) + \")\" : \"\";\n      return [this._fmtY(st.dy) + \"  \" + pct + arrow, this._fmtX(a2.x) + \"  to  \" + this._fmtX(b2.x)];\n    }\n    return [\"Δx \" + this._fmtDx(st.dx), \"Δy \" + this._fmtY(st.dy), this._fmtPct(st.pct)];\n  }\n  /**\n   * Format an x delta, treating datetime x as a day count.\n   * @param {number} dx\n   */\n  _fmtDx(dx) {\n    if (this.w.config.xaxis.type === \"datetime\") {\n      const days = dx / 864e5;\n      return Math.round(days * 10) / 10 + \"d\";\n    }\n    return this._fmt(dx);\n  }\n  /**\n   * Format a y value (a delta) via the y-axis label formatter when present.\n   * @param {number} v\n   */\n  _fmtY(v2) {\n    const cf = this._cfg().format && this._cfg().format.y;\n    if (typeof cf === \"function\") {\n      try {\n        const s2 = cf(v2);\n        if (s2 != null) return String(s2);\n      } catch (e2) {\n      }\n    }\n    const f = this.w.globals.yLabelFormatters && this.w.globals.yLabelFormatters[0];\n    if (typeof f === \"function\") {\n      try {\n        const s2 = f(v2, { seriesIndex: 0, dataPointIndex: -1, w: this.w });\n        if (s2 != null && s2 !== \"\") return String(s2);\n      } catch (e2) {\n      }\n    }\n    return this._fmt(v2);\n  }\n  /**\n   * Format an x value: a short date for datetime x, else the x-label formatter\n   * or a plain number.\n   * @param {number} x\n   */\n  _fmtX(x) {\n    const w2 = this.w;\n    const cf = this._cfg().format && this._cfg().format.x;\n    if (typeof cf === \"function\") {\n      try {\n        const s2 = cf(x);\n        if (s2 != null) return String(s2);\n      } catch (e2) {\n      }\n    }\n    if (w2.config.xaxis.type === \"datetime\") {\n      const d = new Date(x);\n      return d.toLocaleDateString(void 0, {\n        day: \"numeric\",\n        month: \"short\",\n        year: \"numeric\"\n      });\n    }\n    const f = w2.globals.xLabelFormatter;\n    if (typeof f === \"function\") {\n      try {\n        const s2 = f(x, { w: w2 });\n        if (s2 != null && s2 !== \"\") return String(s2);\n      } catch (e2) {\n      }\n    }\n    return this._fmt(x);\n  }\n  /** The live overlay group, created lazily inside elGraphical. */\n  _liveGroup() {\n    const w2 = this.w;\n    if (this._live && this._live.node && this._live.node.parentNode) {\n      return this._live;\n    }\n    const g2 = this.graphics.group({ class: \"apexcharts-measure-live\" });\n    g2.node.style.pointerEvents = \"none\";\n    if (w2.dom.elGraphical) w2.dom.elGraphical.add(g2);\n    this._live = g2;\n    return g2;\n  }\n  _clearLive() {\n    if (this._live && this._live.node) {\n      const n2 = this._live.node;\n      if (n2.parentNode) n2.parentNode.removeChild(n2);\n    }\n    this._live = null;\n  }\n  _renderLive() {\n    if (!this.drag) return;\n    const g2 = this._liveGroup();\n    while (g2.node.firstChild) g2.node.removeChild(g2.node.firstChild);\n    const a2 = this._resolve(this.drag.a);\n    const b2 = this._resolve(this.drag.b);\n    this._drawRuler(g2, a2, b2, false, this._mode());\n  }\n  /** Redraw all pinned rulers into a fresh group (called after each render). */\n  _renderPins() {\n    const w2 = this.w;\n    const old = w2.dom.baseEl && w2.dom.baseEl.querySelector(\".apexcharts-measure-pins\");\n    if (old && old.parentNode) old.parentNode.removeChild(old);\n    if (!this.pins.length || !w2.dom.elGraphical) return;\n    const g2 = this.graphics.group({ class: \"apexcharts-measure-pins\" });\n    g2.node.style.pointerEvents = \"none\";\n    w2.dom.elGraphical.add(g2);\n    this.pins.forEach((p2) => {\n      const a2 = __spreadProps(__spreadValues({}, this._dataToGrid(p2.xa, p2.ya)), { x: p2.xa, y: p2.ya });\n      const b2 = __spreadProps(__spreadValues({}, this._dataToGrid(p2.xb, p2.yb)), { x: p2.xb, y: p2.yb });\n      this._drawRuler(g2, a2, b2, true, p2.mode || \"span\");\n    });\n  }\n  /**\n   * Draw one ruler into `g`, dispatching on style.\n   * @param {any} g\n   * @param {{gx:number,gy:number,x:number,y:number}} a\n   * @param {{gx:number,gy:number,x:number,y:number}} b\n   * @param {boolean} [pinned]\n   * @param {string} [mode] 'span' (finance-style band, default) | 'free'\n   */\n  _drawRuler(g2, a2, b2, pinned, mode) {\n    const st = this._stats(a2, b2);\n    const rg = this.graphics.group({\n      class: \"apexcharts-measure-ruler \" + this._dirClass(st.dy) + (pinned ? \" apexcharts-measure-pinned\" : \"\")\n    });\n    if ((mode || this._mode()) === \"free\") this._drawFree(rg, a2, b2, st);\n    else this._drawSpan(rg, a2, b2, st);\n    g2.add(rg);\n  }\n  /** Endpoint dots on the series line (skipped when markers:false).\n   * @param {any} g @param {{gx:number,gy:number}} p @param {string} color */\n  _dot(g2, p2, color) {\n    if (this._cfg().markers === false) return;\n    const dot = this.graphics.drawMarker(p2.gx, p2.gy, {\n      pSize: 4,\n      shape: \"circle\",\n      pointFillColor: color,\n      pointFillOpacity: 1,\n      pointStrokeColor: \"#fff\",\n      pointStrokeWidth: 2,\n      pointStrokeOpacity: 1\n    });\n    g2.add(dot);\n  }\n  /** Draw the readout label box + text into `g` at (bx,by).\n   * @param {any} g @param {string[]} lines @param {number} bx @param {number} by\n   * @param {number} boxW @param {number} boxH @param {string} color */\n  _readout(g2, lines, bx, by, boxW, boxH, color) {\n    const box = this.graphics.drawRect(bx, by, boxW, boxH, 4);\n    box.node.setAttribute(\"class\", \"apexcharts-measure-label-bg\");\n    box.attr({ fill: \"#ffffff\", \"fill-opacity\": 0.95, stroke: color, \"stroke-width\": 1 });\n    g2.add(box);\n    const label = this.graphics.drawText({\n      x: bx + 9,\n      y: by + 15,\n      text: lines,\n      textAnchor: \"start\",\n      fontSize: \"11px\",\n      foreColor: \"#1e293b\",\n      cssClass: \"apexcharts-measure-label\"\n    });\n    g2.add(label);\n  }\n  /**\n   * Finance-style ruler: vertical guides + shaded band + endpoints on the\n   * series line + a top readout. Guides/band/markers are individually\n   * toggleable via config.\n   * @param {any} g\n   * @param {{gx:number,gy:number,x:number,y:number}} a\n   * @param {{gx:number,gy:number,x:number,y:number}} b\n   * @param {{dx:number,dy:number,pct:number,slope:number}} st\n   */\n  _drawSpan(g2, a2, b2, st) {\n    const w2 = this.w;\n    const cfg = this._cfg();\n    const gh = w2.layout.gridHeight;\n    const color = this._dirColor(st.dy);\n    const lx = Math.min(a2.gx, b2.gx);\n    const rx = Math.max(a2.gx, b2.gx);\n    if (cfg.band !== false) {\n      const band = this.graphics.drawRect(lx, 0, Math.max(0, rx - lx), gh, 0);\n      band.node.setAttribute(\"class\", \"apexcharts-measure-band\");\n      band.attr({ fill: color, \"fill-opacity\": 0.09, stroke: \"none\" });\n      g2.add(band);\n    }\n    if (cfg.guides !== false) {\n      [a2, b2].forEach((p2) => {\n        const vline = this.graphics.drawLine(p2.gx, 0, p2.gx, gh, this._colors().guide, 4, 1);\n        vline.node.setAttribute(\"class\", \"apexcharts-measure-vline\");\n        g2.add(vline);\n      });\n    }\n    [a2, b2].forEach((p2) => this._dot(g2, p2, color));\n    const lines = this._label(a2, b2, st, \"span\");\n    const longest = lines.reduce((m2, s2) => Math.max(m2, s2.length), 0);\n    const boxW = Math.max(148, longest * 6.4);\n    const boxH = 20 + lines.length * 15;\n    let bx = (lx + rx) / 2 - boxW / 2;\n    bx = Math.max(2, Math.min(bx, w2.layout.gridWidth - boxW - 2));\n    this._readout(g2, lines, bx, 4, boxW, boxH, color);\n  }\n  /**\n   * Free 2D ruler: a diagonal line between two arbitrary points + a readout.\n   * @param {any} g\n   * @param {{gx:number,gy:number,x:number,y:number}} a\n   * @param {{gx:number,gy:number,x:number,y:number}} b\n   * @param {{dx:number,dy:number,pct:number,slope:number}} st\n   */\n  _drawFree(g2, a2, b2, st) {\n    const color = this._dirColor(st.dy);\n    const line = this.graphics.drawLine(a2.gx, a2.gy, b2.gx, b2.gy, color, 0, 2);\n    line.node.setAttribute(\"class\", \"apexcharts-measure-line\");\n    g2.add(line);\n    [a2, b2].forEach((p2) => this._dot(g2, p2, color));\n    const lines = this._label(a2, b2, st, \"free\");\n    const longest = lines.reduce((m2, s2) => Math.max(m2, s2.length), 0);\n    const boxW = Math.max(72, longest * 6.2);\n    const boxH = 16 + lines.length * 15;\n    let bx = (a2.gx + b2.gx) / 2 + 8;\n    let by = (a2.gy + b2.gy) / 2 - boxH / 2;\n    bx = Math.max(2, Math.min(bx, this.w.layout.gridWidth - boxW - 2));\n    by = Math.max(2, Math.min(by, this.w.layout.gridHeight - boxH - 2));\n    this._readout(g2, lines, bx, by, boxW, boxH, color);\n  }\n  /**\n   * @param {{x:number,y:number}} a @param {{x:number,y:number}} b\n   */\n  _fireMeasured(a2, b2) {\n    const st = this._stats(a2, b2);\n    const payload = {\n      from: { x: a2.x, y: a2.y },\n      to: { x: b2.x, y: b2.y },\n      dx: st.dx,\n      dy: st.dy,\n      percentChange: st.pct,\n      slope: st.slope\n    };\n    const fn = this.w.config.chart.events.measured;\n    if (typeof fn === \"function\") fn(this.ctx, payload);\n    this.ctx.events.fireEvent(\"measured\", [this.ctx, payload]);\n  }\n  /** Re-project the measure pins after each render. */\n  _afterRender() {\n    if (!this._enabled()) return;\n    if (this.w.interact.measureEnabled && !this.persistent) {\n      this.persistent = true;\n    }\n    if (this.pins.length) this._renderPins();\n    if (this.persistent && !this.drag) {\n      this._disarm();\n      this._arm();\n    }\n  }\n  teardown() {\n    this._cancelDrag();\n    this._endSeed(false);\n    this._disarm();\n    const doc = this._doc();\n    if (doc && this._keysBound) {\n      doc.removeEventListener(\"keydown\", this._onKeyDown);\n      doc.removeEventListener(\"keyup\", this._onKeyUp);\n    }\n    this._keysBound = false;\n    this.pins = [];\n  }\n}\nApexCharts.registerFeatures({ measure: Measure });\nclass ContextMenu {\n  /**\n   * @param {import('../../types/internal').ChartStateW} w\n   * @param {import('../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.w = w2;\n    this.ctx = ctx;\n    this.menu = null;\n    this._items = [];\n    this._focusIndex = -1;\n    this._trigger = null;\n    this._onContext = this._onContext.bind(this);\n    this._onDocDown = this._onDocDown.bind(this);\n    this._onKey = this._onKey.bind(this);\n    this._afterRender = this._afterRender.bind(this);\n    ctx.addEventListener(\"mounted\", this._afterRender);\n    ctx.addEventListener(\"updated\", this._afterRender);\n  }\n  _cfg() {\n    return this.w.config.chart.contextMenu || {};\n  }\n  _enabled() {\n    return this._cfg().enabled === true;\n  }\n  _doc() {\n    return this.w.dom.baseEl && this.w.dom.baseEl.ownerDocument;\n  }\n  /** (Re)attach the contextmenu trigger to the freshly (re)built SVG. */\n  _afterRender() {\n    this._detachTrigger();\n    this.close();\n    if (!this._enabled() || !Environment.isBrowser()) return;\n    const svg = this.w.dom.Paper && this.w.dom.Paper.node;\n    if (!svg) return;\n    svg.addEventListener(\"contextmenu\", this._onContext);\n    this._trigger = svg;\n  }\n  _detachTrigger() {\n    if (this._trigger) {\n      this._trigger.removeEventListener(\"contextmenu\", this._onContext);\n      this._trigger = null;\n    }\n  }\n  /** @param {any} e */\n  _onContext(e2) {\n    if (!this._enabled()) return;\n    e2.preventDefault();\n    this.open(e2.clientX, e2.clientY);\n  }\n  /**\n   * Client pixel -> data {x,y} via the grid client-rect fraction (scale\n   * independent). Null when the grid is not measurable.\n   * @param {number} cx @param {number} cy\n   * @returns {{x:number,y:number}|null}\n   */\n  _clientToData(cx, cy) {\n    const w2 = this.w;\n    const grid = w2.dom.baseEl && w2.dom.baseEl.querySelector(\".apexcharts-grid\");\n    if (!grid) return null;\n    const r2 = grid.getBoundingClientRect();\n    if (!r2.width || !r2.height) return null;\n    const clamp = (v2) => v2 < 0 ? 0 : v2 > 1 ? 1 : v2;\n    const fx = clamp((cx - r2.left) / r2.width);\n    const fy = clamp((cy - r2.top) / r2.height);\n    const x = w2.globals.minX + fx * (w2.globals.maxX - w2.globals.minX);\n    const s2 = w2.globals.yAxisScale && w2.globals.yAxisScale[0];\n    const ymin = s2 && isFinite(s2.niceMin) ? s2.niceMin : w2.globals.minY;\n    const ymax = s2 && isFinite(s2.niceMax) ? s2.niceMax : w2.globals.maxY;\n    const y = ymax - fy * (ymax - ymin);\n    return { x, y };\n  }\n  /**\n   * Resolve the configured items into runnable entries, dropping built-ins\n   * whose dependency is absent (e.g. measure not enabled).\n   * @param {any} context\n   * @returns {Array<{id:string,label:string,run:Function}>}\n   */\n  _resolveItems(context) {\n    const cfg = this._cfg();\n    const raw = Array.isArray(cfg.items) && cfg.items.length ? cfg.items : [\"annotate\", \"xline\", \"yline\", \"measure\"];\n    const labels = cfg.labels || {};\n    const out = [];\n    raw.forEach((it) => {\n      if (typeof it === \"string\") {\n        if (it === \"annotate\") {\n          out.push({\n            id: \"annotate\",\n            label: labels.annotate || \"Add note here\",\n            run: () => this._annotate(context)\n          });\n        } else if (it === \"xline\") {\n          out.push({\n            id: \"xline\",\n            label: labels.xline || \"Annotate here\",\n            run: () => this._line(context, \"x\")\n          });\n        } else if (it === \"yline\") {\n          out.push({\n            id: \"yline\",\n            label: labels.yline || \"Mark this level\",\n            run: () => this._line(context, \"y\")\n          });\n        } else if (it === \"measure\") {\n          const m2 = this.ctx.measure;\n          const on = m2 && this.w.config.chart.measure && this.w.config.chart.measure.enabled;\n          if (on) {\n            out.push({\n              id: \"measure\",\n              label: labels.measure || \"Measure from here\",\n              run: () => m2.seedFromClient(context.clientX, context.clientY)\n            });\n          }\n        }\n      } else if (it && typeof it === \"object\" && typeof it.onClick === \"function\") {\n        out.push({\n          id: it.id || \"custom\",\n          label: it.label || \"Action\",\n          run: () => it.onClick(this.ctx, context)\n        });\n      }\n    });\n    return out;\n  }\n  /** @param {any} context */\n  _annotate(context) {\n    if (context.x == null || context.y == null) return;\n    const cfg = this._cfg();\n    const ink = this.ctx.ink;\n    if (ink && typeof ink.createAt === \"function\") {\n      ink.createAt(context.x, context.y, { text: cfg.noteText || \"Note\" });\n      return;\n    }\n    this.ctx.addPointAnnotation(\n      {\n        x: context.x,\n        y: context.y,\n        marker: { size: 5 },\n        label: {\n          text: cfg.noteText || \"Note\",\n          style: { background: \"#fff\", color: \"#334155\" }\n        }\n      },\n      true\n    );\n  }\n  /**\n   * The 'xline' / 'yline' items: drop a dashed line annotation at the clicked\n   * data point ('x' = vertical line at the clicked x, 'y' = horizontal line\n   * at the clicked y). Lines only: no x2/y2 is ever set, so this never\n   * creates a range rectangle. Both items share chart.contextMenu.line\n   * ({ text, strokeDashArray, color }) for styling.\n   * @param {any} context @param {'x'|'y'} axis\n   */\n  _line(context, axis) {\n    const lc = this._cfg().line || {};\n    const val = axis === \"x\" ? context.x : context.y;\n    if (val == null) return;\n    const ink = this.ctx.ink;\n    if (ink && typeof ink.createLineAt === \"function\") {\n      ink.createLineAt(axis, val, {\n        text: lc.text,\n        strokeDashArray: lc.strokeDashArray,\n        color: lc.color\n      });\n      return;\n    }\n    const anno = {\n      strokeDashArray: lc.strokeDashArray != null ? lc.strokeDashArray : 4\n    };\n    if (lc.text) anno.label = { text: lc.text };\n    if (lc.color) {\n      anno.borderColor = lc.color;\n      anno.label = Utils$1.extend(anno.label || {}, { borderColor: lc.color });\n    }\n    if (axis === \"x\") {\n      this.ctx.addXaxisAnnotation(Utils$1.extend(anno, { x: val }), true);\n    } else {\n      this.ctx.addYaxisAnnotation(Utils$1.extend(anno, { y: val }), true);\n    }\n  }\n  /**\n   * Open the menu at a client-space point.\n   * @param {number} clientX @param {number} clientY\n   */\n  open(clientX, clientY) {\n    this.close();\n    const w2 = this.w;\n    const elWrap = w2.dom.elWrap;\n    const doc = this._doc();\n    if (!elWrap || !doc) return;\n    const data = this._clientToData(clientX, clientY);\n    const g2 = w2.globals;\n    const context = {\n      x: data ? data.x : null,\n      y: data ? data.y : null,\n      seriesIndex: g2.capturedSeriesIndex >= 0 ? g2.capturedSeriesIndex : null,\n      dataPointIndex: g2.capturedDataPointIndex >= 0 ? g2.capturedDataPointIndex : null,\n      clientX,\n      clientY\n    };\n    const items = this._resolveItems(context);\n    if (!items.length) return;\n    this._items = items;\n    const menu = doc.createElement(\"div\");\n    menu.className = \"apexcharts-context-menu\";\n    menu.setAttribute(\"role\", \"menu\");\n    menu.style.position = \"absolute\";\n    menu.style.visibility = \"hidden\";\n    items.forEach((it, i2) => {\n      const btn = doc.createElement(\"button\");\n      btn.type = \"button\";\n      btn.className = \"apexcharts-context-menu-item\";\n      btn.setAttribute(\"role\", \"menuitem\");\n      btn.tabIndex = -1;\n      btn.textContent = it.label;\n      btn.addEventListener(\"click\", (ev) => {\n        ev.stopPropagation();\n        this._activate(i2);\n      });\n      btn.addEventListener(\"mouseenter\", () => this._focus(i2));\n      menu.appendChild(btn);\n    });\n    elWrap.appendChild(menu);\n    this.menu = menu;\n    const wrapRect = elWrap.getBoundingClientRect();\n    let left = clientX - wrapRect.left;\n    let top = clientY - wrapRect.top;\n    const mw = menu.offsetWidth;\n    const mh = menu.offsetHeight;\n    const maxLeft = Math.max(0, elWrap.clientWidth - mw);\n    const maxTop = Math.max(0, elWrap.clientHeight - mh);\n    if (left > maxLeft) left = maxLeft;\n    if (top > maxTop) top = maxTop;\n    menu.style.left = Math.max(0, left) + \"px\";\n    menu.style.top = Math.max(0, top) + \"px\";\n    menu.style.visibility = \"visible\";\n    doc.addEventListener(\"mousedown\", this._onDocDown, true);\n    doc.addEventListener(\"keydown\", this._onKey, true);\n    this._focus(0);\n  }\n  /** @param {number} i */\n  _focus(i2) {\n    if (!this.menu) return;\n    const btns = this.menu.querySelectorAll(\".apexcharts-context-menu-item\");\n    if (this._focusIndex >= 0 && btns[this._focusIndex]) {\n      btns[this._focusIndex].classList.remove(\"apexcharts-context-menu-item--active\");\n    }\n    this._focusIndex = i2;\n    if (btns[i2]) {\n      btns[i2].classList.add(\"apexcharts-context-menu-item--active\");\n      if (typeof btns[i2].focus === \"function\") btns[i2].focus();\n    }\n  }\n  /** @param {number} i */\n  _activate(i2) {\n    const it = this._items[i2];\n    this.close();\n    if (it) it.run();\n  }\n  /** @param {any} e */\n  _onDocDown(e2) {\n    if (this.menu && this.menu.contains(e2.target)) return;\n    this.close();\n  }\n  /** @param {any} e */\n  _onKey(e2) {\n    if (!this.menu || !this._items.length) return;\n    if (e2.key === \"Escape\") {\n      e2.preventDefault();\n      this.close();\n    } else if (e2.key === \"ArrowDown\") {\n      e2.preventDefault();\n      this._focus((this._focusIndex + 1) % this._items.length);\n    } else if (e2.key === \"ArrowUp\") {\n      e2.preventDefault();\n      this._focus((this._focusIndex - 1 + this._items.length) % this._items.length);\n    } else if (e2.key === \"Enter\" || e2.key === \" \") {\n      e2.preventDefault();\n      this._activate(this._focusIndex < 0 ? 0 : this._focusIndex);\n    }\n  }\n  close() {\n    const doc = this._doc();\n    if (doc) {\n      doc.removeEventListener(\"mousedown\", this._onDocDown, true);\n      doc.removeEventListener(\"keydown\", this._onKey, true);\n    }\n    if (this.menu && this.menu.parentNode) {\n      this.menu.parentNode.removeChild(this.menu);\n    }\n    this.menu = null;\n    this._items = [];\n    this._focusIndex = -1;\n  }\n  teardown() {\n    this.close();\n    this._detachTrigger();\n  }\n}\nApexCharts.registerFeatures({ contextMenu: ContextMenu });\nconst MAX_BINS = 1e3;\nfunction quantileSorted(sorted, q) {\n  const n2 = sorted.length;\n  if (n2 === 0) return NaN;\n  if (n2 === 1) return sorted[0];\n  const pos = (n2 - 1) * q;\n  const lo = Math.floor(pos);\n  const hi = Math.ceil(pos);\n  if (lo === hi) return sorted[lo];\n  return sorted[lo] + (sorted[hi] - sorted[lo]) * (pos - lo);\n}\nfunction stdDev(values) {\n  const n2 = values.length;\n  if (n2 < 2) return 0;\n  let sum = 0;\n  for (let i2 = 0; i2 < n2; i2++) sum += values[i2];\n  const mean = sum / n2;\n  let acc = 0;\n  for (let i2 = 0; i2 < n2; i2++) {\n    const d = values[i2] - mean;\n    acc += d * d;\n  }\n  return Math.sqrt(acc / n2);\n}\nfunction widthForRule(sorted, span, rule) {\n  const n2 = sorted.length;\n  const byCount = (count) => span / Math.max(1, Math.ceil(count));\n  switch (rule) {\n    case \"sqrt\":\n      return { width: byCount(Math.sqrt(n2)), rule: \"sqrt\" };\n    case \"rice\":\n      return { width: byCount(2 * Math.cbrt(n2)), rule: \"rice\" };\n    case \"scott\": {\n      const sd = stdDev(sorted);\n      if (sd > 0) return { width: 3.49 * sd * Math.pow(n2, -1 / 3), rule: \"scott\" };\n      return { width: byCount(Math.log2(n2) + 1), rule: \"sturges\" };\n    }\n    case \"fd\": {\n      const iqr = quantileSorted(sorted, 0.75) - quantileSorted(sorted, 0.25);\n      if (iqr > 0) return { width: 2 * iqr * Math.pow(n2, -1 / 3), rule: \"fd\" };\n      return { width: byCount(Math.log2(n2) + 1), rule: \"sturges\" };\n    }\n    case \"auto\": {\n      const sturges = byCount(Math.log2(n2) + 1);\n      const iqr = quantileSorted(sorted, 0.75) - quantileSorted(sorted, 0.25);\n      if (iqr <= 0) return { width: sturges, rule: \"sturges\" };\n      const fd = 2 * iqr * Math.pow(n2, -1 / 3);\n      return fd < sturges ? { width: fd, rule: \"fd\" } : { width: sturges, rule: \"sturges\" };\n    }\n    case \"sturges\":\n    default:\n      return { width: byCount(Math.log2(n2) + 1), rule: \"sturges\" };\n  }\n}\nfunction computeBinning(values, opts = {}) {\n  if (!Array.isArray(values) || values.length === 0) return null;\n  const sorted = values.slice().sort((a2, b2) => a2 - b2);\n  let lo = sorted[0];\n  let hi = sorted[sorted.length - 1];\n  const range = opts.range;\n  if (Array.isArray(range) && range.length === 2) {\n    const rLo = Number(range[0]);\n    const rHi = Number(range[1]);\n    if (isFinite(rLo) && isFinite(rHi) && rHi > rLo) {\n      lo = rLo;\n      hi = rHi;\n    }\n  }\n  if (!(hi > lo)) {\n    const pad = Math.abs(lo) > 0 ? Math.abs(lo) * 0.05 : 0.5;\n    return {\n      edges: [lo - pad, lo + pad],\n      binWidth: pad * 2,\n      rule: \"single\",\n      capped: false\n    };\n  }\n  const span = hi - lo;\n  let width;\n  let rule;\n  if (typeof opts.binWidth === \"number\" && opts.binWidth > 0) {\n    width = opts.binWidth;\n    rule = \"binWidth\";\n  } else if (typeof opts.bins === \"number\" && opts.bins >= 1) {\n    width = span / Math.floor(opts.bins);\n    rule = \"count\";\n  } else {\n    const chosen = widthForRule(\n      sorted,\n      span,\n      typeof opts.bins === \"string\" ? opts.bins : \"auto\"\n    );\n    width = chosen.width;\n    rule = chosen.rule;\n  }\n  if (!isFinite(width) || width <= 0) width = span;\n  let count = Math.ceil(span / width);\n  if (!isFinite(count) || count < 1) count = 1;\n  let capped = false;\n  if (count > MAX_BINS) {\n    count = MAX_BINS;\n    width = span / count;\n    capped = true;\n  }\n  width = span / count;\n  const edges = new Array(count + 1);\n  for (let k = 0; k <= count; k++) edges[k] = lo + k * width;\n  edges[count] = Math.max(edges[count], hi);\n  return { edges, binWidth: width, rule, capped };\n}\nfunction binIndexOf(v2, edges) {\n  const last = edges.length - 1;\n  if (!(v2 >= edges[0]) || v2 > edges[last]) return -1;\n  if (v2 === edges[last]) return last - 1;\n  const width = (edges[last] - edges[0]) / last;\n  if (width > 0) {\n    let k = Math.floor((v2 - edges[0]) / width);\n    if (k < 0) k = 0;\n    if (k > last - 1) k = last - 1;\n    if (v2 < edges[k]) k--;\n    else if (v2 >= edges[k + 1]) k++;\n    if (k < 0 || k > last - 1) return -1;\n    return k;\n  }\n  let lo = 0;\n  let hi = last - 1;\n  while (lo <= hi) {\n    const mid = lo + hi >> 1;\n    if (v2 < edges[mid]) hi = mid - 1;\n    else if (v2 >= edges[mid + 1]) lo = mid + 1;\n    else return mid;\n  }\n  return -1;\n}\nfunction binCounts(values, edges) {\n  const counts = new Array(Math.max(0, edges.length - 1)).fill(0);\n  for (let i2 = 0; i2 < values.length; i2++) {\n    const k = binIndexOf(values[i2], edges);\n    if (k >= 0) counts[k]++;\n  }\n  return counts;\n}\nfunction rowsByBin(values, edges) {\n  const n2 = Math.max(0, edges.length - 1);\n  const buckets = new Array(n2);\n  for (let k = 0; k < n2; k++) buckets[k] = [];\n  for (let i2 = 0; i2 < values.length; i2++) {\n    const k = binIndexOf(values[i2], edges);\n    if (k >= 0) buckets[k].push(values[i2]);\n  }\n  return buckets;\n}\nfunction fiveNumberSummary(values, opts = {}) {\n  if (!Array.isArray(values) || values.length === 0) return null;\n  const sorted = values.slice().sort((a2, b2) => a2 - b2);\n  const q1 = quantileSorted(sorted, 0.25);\n  const median = quantileSorted(sorted, 0.5);\n  const q3 = quantileSorted(sorted, 0.75);\n  const iqr = q3 - q1;\n  let lo = sorted[0];\n  let hi = sorted[sorted.length - 1];\n  let outliers = [];\n  if (opts.whiskers === \"tukey\" && iqr > 0) {\n    const loFence = q1 - 1.5 * iqr;\n    const hiFence = q3 + 1.5 * iqr;\n    let i2 = 0;\n    while (i2 < sorted.length && sorted[i2] < loFence) i2++;\n    let j = sorted.length - 1;\n    while (j >= 0 && sorted[j] > hiFence) j--;\n    if (i2 <= j) {\n      lo = sorted[i2];\n      hi = sorted[j];\n      outliers = sorted.slice(0, i2).concat(sorted.slice(j + 1));\n    }\n  }\n  return { summary: [lo, q1, median, q3, hi], outliers, iqr };\n}\nfunction kernelDensity(values, opts = {}) {\n  if (!Array.isArray(values) || values.length === 0) return null;\n  const sorted = values.slice().sort((a2, b2) => a2 - b2);\n  const n2 = sorted.length;\n  let h2 = opts.bandwidth;\n  if (!(typeof h2 === \"number\" && h2 > 0)) {\n    const sd = stdDev(sorted);\n    const iqr = quantileSorted(sorted, 0.75) - quantileSorted(sorted, 0.25);\n    const spread = iqr > 0 ? Math.min(sd, iqr / 1.349) : sd;\n    h2 = 0.9 * spread * Math.pow(n2, -1 / 5);\n  }\n  if (!isFinite(h2) || h2 <= 0) {\n    const v2 = sorted[0];\n    const eps = Math.abs(v2) > 0 ? Math.abs(v2) * 1e-3 : 1e-3;\n    return {\n      density: [\n        [v2 - eps, 0],\n        [v2, 1],\n        [v2 + eps, 0]\n      ],\n      bandwidth: eps\n    };\n  }\n  const steps = Math.max(8, Math.floor(opts.resolution || 64));\n  const lo = sorted[0] - 2 * h2;\n  const hi = sorted[n2 - 1] + 2 * h2;\n  const step = (hi - lo) / (steps - 1);\n  const norm = 1 / (n2 * h2 * Math.sqrt(2 * Math.PI));\n  const density = [];\n  for (let g2 = 0; g2 < steps; g2++) {\n    const x = lo + g2 * step;\n    let sum = 0;\n    for (let i2 = 0; i2 < n2; i2++) {\n      const z = (x - sorted[i2]) / h2;\n      sum += Math.exp(-0.5 * z * z);\n    }\n    density.push([x, sum * norm]);\n  }\n  return { density, bandwidth: h2 };\n}\nfunction normalizeCounts(counts, opts = {}) {\n  let out = counts.slice();\n  if (opts.cumulative) {\n    let acc = 0;\n    out = out.map((c2) => acc += c2);\n  }\n  const total = counts.reduce((a2, b2) => a2 + b2, 0);\n  if (total <= 0) return out;\n  if (opts.normalize === \"relative\") {\n    return out.map((c2) => c2 / total * 100);\n  }\n  if (opts.normalize === \"density\") {\n    const w2 = opts.binWidth;\n    if (typeof w2 === \"number\" && w2 > 0) return out.map((c2) => c2 / (total * w2));\n  }\n  return out;\n}\nfunction histogramValues(data) {\n  const out = [];\n  if (!Array.isArray(data)) return out;\n  for (let i2 = 0; i2 < data.length; i2++) {\n    const d = data[i2];\n    let raw = d;\n    if (Array.isArray(d)) raw = d.length === 1 ? d[0] : d[1];\n    else if (d && typeof d === \"object\") raw = d.y !== void 0 ? d.y : d.x;\n    const v2 = Utils$1.parseNumber(raw);\n    if (v2 !== null && isFinite(v2)) out.push(v2);\n  }\n  return out;\n}\nfunction histogramTransform(ser, w2) {\n  var _a;\n  const cnf = w2.config;\n  const gl = w2.globals;\n  if (!Array.isArray(ser)) return ser;\n  if (!gl.histogramRawSeries) {\n    gl.histogramRawSeries = ser.map((s2) => __spreadProps(__spreadValues({}, s2), {\n      data: Array.isArray(s2 == null ? void 0 : s2.data) ? s2.data.slice() : s2 == null ? void 0 : s2.data\n    }));\n  }\n  const raw = gl.histogramRawSeries;\n  const hcfg = ((_a = cnf.plotOptions) == null ? void 0 : _a.histogram) || {};\n  const perSeries = raw.map((s2) => histogramValues(s2 == null ? void 0 : s2.data));\n  let all = [];\n  if (perSeries.length === 1) {\n    all = perSeries[0];\n  } else {\n    for (const vals of perSeries) all = all.concat(vals);\n  }\n  const binning = computeBinning(all, {\n    bins: hcfg.bins,\n    binWidth: hcfg.binWidth,\n    range: hcfg.range\n  });\n  if (!binning) {\n    w2.histogramData = {\n      edges: [],\n      binWidth: 0,\n      counts: [],\n      rule: \"\",\n      capped: false\n    };\n    return raw;\n  }\n  const { edges, binWidth } = binning;\n  const counts = perSeries.map(\n    (vals) => binCounts(vals, edges)\n  );\n  w2.histogramData = {\n    edges,\n    binWidth,\n    counts,\n    rule: binning.rule,\n    capped: binning.capped\n  };\n  const collapsed = gl.collapsedSeriesIndices || [];\n  return raw.map((s2, i2) => {\n    if (collapsed.indexOf(i2) !== -1) return __spreadProps(__spreadValues({}, s2), { data: [] });\n    const ys = normalizeCounts(counts[i2], {\n      normalize: hcfg.normalize,\n      cumulative: hcfg.cumulative,\n      binWidth\n    });\n    const data = [];\n    for (let k = 0; k < ys.length; k++) {\n      data.push({ x: (edges[k] + edges[k + 1]) / 2, y: ys[k] });\n    }\n    return __spreadProps(__spreadValues({}, s2), { data });\n  });\n}\nconst derivedData = /* @__PURE__ */ new WeakSet();\nfunction observationsOf(d, allowFlatY) {\n  var _a;\n  if (!d || typeof d !== \"object\" || Array.isArray(d)) return null;\n  let raw = null;\n  if (Array.isArray(d.points)) raw = d.points;\n  else if (Array.isArray((_a = d.y) == null ? void 0 : _a.points)) raw = d.y.points;\n  else if (allowFlatY && Array.isArray(d.y) && typeof d.y[0] === \"number\") {\n    raw = d.y;\n  }\n  if (!raw) return null;\n  const out = [];\n  for (let i2 = 0; i2 < raw.length; i2++) {\n    const v2 = Utils$1.parseNumber(raw[i2]);\n    if (v2 !== null && isFinite(v2)) out.push(v2);\n  }\n  return out.length ? out : null;\n}\nfunction boxPlotTransform(ser, w2) {\n  var _a, _b;\n  if (!Array.isArray(ser)) return ser;\n  const whiskers = ((_b = (_a = w2.config.plotOptions) == null ? void 0 : _a.boxPlot) == null ? void 0 : _b.whiskers) || \"minmax\";\n  return ser.map((s2) => {\n    if (!Array.isArray(s2 == null ? void 0 : s2.data)) return s2;\n    let touched = false;\n    const data = s2.data.map((d) => {\n      if (Array.isArray(d == null ? void 0 : d.y) && d.y.length === 5 && !derivedData.has(d)) {\n        return d;\n      }\n      const values = observationsOf(d, false);\n      if (!values) return d;\n      const summary = fiveNumberSummary(values, { whiskers });\n      if (!summary) return d;\n      touched = true;\n      const next = __spreadProps(__spreadValues({}, d), { y: summary.summary, points: values });\n      derivedData.add(next);\n      return next;\n    });\n    return touched ? __spreadProps(__spreadValues({}, s2), { data }) : s2;\n  });\n}\nfunction violinTransform(ser, w2) {\n  var _a, _b;\n  if (!Array.isArray(ser)) return ser;\n  const kde = ((_b = (_a = w2.config.plotOptions) == null ? void 0 : _a.violin) == null ? void 0 : _b.kde) || {};\n  return ser.map((s2) => {\n    if (!Array.isArray(s2 == null ? void 0 : s2.data)) return s2;\n    let touched = false;\n    const data = s2.data.map((d) => {\n      var _a2;\n      if (Array.isArray((_a2 = d == null ? void 0 : d.y) == null ? void 0 : _a2.density) && d.y.density.length && !derivedData.has(d)) {\n        return d;\n      }\n      const values = observationsOf(d, true);\n      if (!values) return d;\n      const est = kernelDensity(values, {\n        bandwidth: kde.bandwidth,\n        resolution: kde.resolution\n      });\n      if (!est) return d;\n      touched = true;\n      const next = __spreadProps(__spreadValues({}, d), { y: { density: est.density, points: values } });\n      derivedData.add(next);\n      return next;\n    });\n    return touched ? __spreadProps(__spreadValues({}, s2), { data }) : s2;\n  });\n}\nconst DEFAULT_MAX_ROWS = 3e3;\nfunction thinClusters(clusters, maxRows) {\n  let total = 0;\n  let widest = 0;\n  for (const c2 of clusters) {\n    total += c2.length;\n    if (c2.length > widest) widest = c2.length;\n  }\n  if (total <= maxRows) return { clusters, stride: 1, total, kept: total };\n  const keptAt = (s2) => {\n    let n2 = 0;\n    for (const c2 of clusters) n2 += Math.ceil(c2.length / s2);\n    return n2;\n  };\n  let stride = Math.max(2, Math.ceil(total / maxRows));\n  while (stride < widest && keptAt(stride) > maxRows) stride++;\n  let kept = 0;\n  const out = clusters.map((rows) => {\n    const keepList = [];\n    for (let i2 = 0; i2 < rows.length; i2 += stride) keepList.push(rows[i2]);\n    kept += keepList.length;\n    return keepList;\n  });\n  return { clusters: out, stride, total, kept };\n}\nfunction toUnitSeries(w2, clusters, opts) {\n  const maxRows = opts && opts.maxRows != null ? opts.maxRows : DEFAULT_MAX_ROWS;\n  const thinned = thinClusters(\n    clusters.map((c2) => c2.rows),\n    maxRows\n  );\n  if (thinned.stride > 1) {\n    console.warn(\n      `ApexCharts: rowSeries() thinned ${thinned.total} rows to ${thinned.kept} (every ${thinned.stride}${thinned.stride === 2 ? \"nd\" : thinned.stride === 3 ? \"rd\" : \"th\"} row) to stay under maxRows=${maxRows}. Raise maxRows to draw more.`\n    );\n  }\n  const colors = w2.globals && w2.globals.colors || [];\n  return clusters.map((c2, i2) => {\n    const fillColor = colors[c2.realIndex] || colors[0];\n    return {\n      name: c2.name,\n      data: thinned.clusters[i2].map((v2, q) => __spreadValues({\n        id: `${c2.realIndex}:${i2}:${q}`,\n        x: c2.name,\n        y: v2\n      }, fillColor ? { fillColor } : {}))\n    };\n  });\n}\nfunction histogramRows(w2, opts) {\n  const gl = w2.globals;\n  const hd = w2.histogramData;\n  const raw = gl && gl.histogramRawSeries;\n  if (!hd || !Array.isArray(hd.edges) || hd.edges.length < 2) return null;\n  if (!Array.isArray(raw) || !raw.length) return null;\n  const collapsed = gl && gl.collapsedSeriesIndices || [];\n  const edges = hd.edges;\n  const clusters = [];\n  raw.forEach((s2, i2) => {\n    var _a;\n    if (collapsed.indexOf(i2) !== -1) return;\n    const buckets = rowsByBin(histogramValues(s2 && s2.data), edges);\n    const seriesName = w2.seriesData && ((_a = w2.seriesData.seriesNames) == null ? void 0 : _a[i2]) || (s2 == null ? void 0 : s2.name);\n    buckets.forEach((rows, k) => {\n      const range = `${formatEdge(edges[k])}-${formatEdge(edges[k + 1])}`;\n      clusters.push({\n        // Only qualify by series when there is more than one to tell apart.\n        name: raw.length > 1 && seriesName ? `${seriesName} ${range}` : range,\n        realIndex: i2,\n        rows\n      });\n    });\n  });\n  return clusters.length ? toUnitSeries(w2, clusters, opts) : null;\n}\nfunction formatEdge(v2) {\n  if (!isFinite(v2)) return String(v2);\n  const r2 = Math.round(v2);\n  return Math.abs(v2 - r2) < 1e-6 ? String(r2) : String(Number(v2.toFixed(2)));\n}\nfunction pointsRowSource(pick) {\n  return (w2, opts) => {\n    var _a;\n    const perSeries = pick(w2);\n    if (!Array.isArray(perSeries) || !perSeries.length) return null;\n    const collapsed = w2.globals && w2.globals.collapsedSeriesIndices || [];\n    const labels = w2.globals && (((_a = w2.globals.categoryLabels) == null ? void 0 : _a.length) ? w2.globals.categoryLabels : w2.globals.labels) || [];\n    const clusters = [];\n    perSeries.forEach((byCat, i2) => {\n      var _a2;\n      if (collapsed.indexOf(i2) !== -1) return;\n      if (!Array.isArray(byCat)) return;\n      const seriesName = w2.seriesData && ((_a2 = w2.seriesData.seriesNames) == null ? void 0 : _a2[i2]);\n      byCat.forEach((pts, j) => {\n        const label = labels[j] != null ? String(labels[j]) : `#${j + 1}`;\n        clusters.push({\n          name: perSeries.length > 1 && seriesName ? `${seriesName} ${label}` : label,\n          realIndex: i2,\n          rows: Array.isArray(pts) ? pts.slice() : []\n        });\n      });\n    });\n    return clusters.length ? toUnitSeries(w2, clusters, opts) : null;\n  };\n}\nconst boxPlotRows = pointsRowSource((w2) => {\n  var _a;\n  return (_a = w2.candleData) == null ? void 0 : _a.seriesBoxPoints;\n});\nconst violinRows = pointsRowSource((w2) => {\n  var _a;\n  return (_a = w2.violinData) == null ? void 0 : _a.seriesViolinPoints;\n});\nregisterSeriesTransform(\"histogram\", histogramTransform);\nregisterSeriesTransform(\"boxPlot\", boxPlotTransform);\nregisterSeriesTransform(\"violin\", violinTransform);\nregisterRowSource(\"histogram\", histogramRows);\nregisterRowSource(\"boxPlot\", boxPlotRows);\nregisterRowSource(\"violin\", violinRows);\nclass BarDataLabels {\n  /**\n   * @param {import('../../../charts/Bar').default} barCtx\n   */\n  constructor(barCtx) {\n    this.w = barCtx.w;\n    this.barCtx = barCtx;\n    this.totalFormatter = this.w.config.plotOptions.bar.dataLabels.total.formatter;\n    if (!this.totalFormatter) {\n      this.totalFormatter = this.w.config.dataLabels.formatter;\n    }\n  }\n  /** handleBarDataLabels is used to calculate the positions for the data-labels\n   * It also sets the element's data attr for bars and calls drawCalculatedBarDataLabels()\n   * After calculating, it also calls the function to draw data labels\n   * @memberof Bar\n   * @param {Record<string, any>} opts - bar properties used throughout the bar drawing function\n   * @return {object} dataLabels node-element which you can append later\n   **/\n  handleBarDataLabels(opts) {\n    const {\n      x,\n      y,\n      y1,\n      y2,\n      i: i2,\n      j,\n      realIndex,\n      columnGroupIndex,\n      series,\n      barHeight,\n      barWidth,\n      barXPosition,\n      barYPosition,\n      visibleSeries\n    } = opts;\n    const w2 = this.w;\n    const graphics = new Graphics(this.barCtx.w);\n    const strokeWidth = Array.isArray(this.barCtx.strokeWidth) ? this.barCtx.strokeWidth[realIndex] : this.barCtx.strokeWidth;\n    let bcx;\n    let bcy;\n    if (w2.axisFlags.isXNumeric && !w2.globals.isBarHorizontal) {\n      bcx = x + barWidth * (visibleSeries + 1);\n      bcy = y + barHeight * (visibleSeries + 1) - strokeWidth;\n    } else {\n      bcx = x + barWidth * visibleSeries;\n      bcy = y + barHeight * visibleSeries;\n    }\n    let dataLabels = null;\n    let totalDataLabels = null;\n    let dataLabelsX = x;\n    let dataLabelsY = y;\n    let dataLabelsPos = (\n      /** @type {any} */\n      {}\n    );\n    const dataLabelsConfig = w2.config.dataLabels;\n    const barDataLabelsConfig = this.barCtx.barOptions.dataLabels;\n    const barTotalDataLabelsConfig = this.barCtx.barOptions.dataLabels.total;\n    if (typeof barYPosition !== \"undefined\" && (this.barCtx.isRangeBar || this.barCtx.isPyramid)) {\n      bcy = barYPosition;\n      dataLabelsY = barYPosition;\n    }\n    if (typeof barXPosition !== \"undefined\" && this.barCtx.isVerticalGroupedRangeBar) {\n      bcx = barXPosition;\n      dataLabelsX = barXPosition;\n    }\n    const offX = resolveDataLabelOffset(\n      dataLabelsConfig.offsetX,\n      w2,\n      realIndex,\n      j\n    );\n    const offY = resolveDataLabelOffset(\n      dataLabelsConfig.offsetY,\n      w2,\n      realIndex,\n      j\n    );\n    let textRects = {\n      width: 0,\n      height: 0\n    };\n    if (w2.config.dataLabels.enabled) {\n      const yLabel = w2.seriesData.series[realIndex][j];\n      textRects = graphics.getTextRects(\n        w2.config.dataLabels.formatter ? w2.config.dataLabels.formatter(yLabel, __spreadProps(__spreadValues({}, w2), {\n          seriesIndex: realIndex,\n          dataPointIndex: j,\n          w: w2\n        })) : w2.formatters.yLabelFormatters[0](yLabel),\n        parseFloat(dataLabelsConfig.style.fontSize).toString()\n      );\n    }\n    const params = {\n      x,\n      y,\n      i: i2,\n      j,\n      realIndex,\n      columnGroupIndex,\n      bcx,\n      bcy,\n      barHeight,\n      barWidth,\n      textRects,\n      strokeWidth,\n      dataLabelsX,\n      dataLabelsY,\n      dataLabelsConfig,\n      barDataLabelsConfig,\n      barTotalDataLabelsConfig,\n      offX,\n      offY\n    };\n    if (this.barCtx.isHorizontal) {\n      dataLabelsPos = this.calculateBarsDataLabelsPosition(params);\n    } else {\n      dataLabelsPos = this.calculateColumnsDataLabelsPosition(params);\n    }\n    dataLabels = this.drawCalculatedDataLabels({\n      x: dataLabelsPos.dataLabelsX,\n      y: dataLabelsPos.dataLabelsY,\n      val: this.barCtx.isRangeBar ? [y1, y2] : w2.config.chart.stackType === \"100%\" ? series[realIndex][j] : w2.seriesData.series[realIndex][j],\n      i: realIndex,\n      j,\n      barWidth,\n      barHeight,\n      textRects,\n      dataLabelsConfig\n    });\n    if (w2.config.chart.stacked && barTotalDataLabelsConfig.enabled) {\n      totalDataLabels = this.drawTotalDataLabels({\n        x: dataLabelsPos.totalDataLabelsX,\n        y: dataLabelsPos.totalDataLabelsY,\n        barWidth,\n        barHeight,\n        realIndex,\n        textAnchor: dataLabelsPos.totalDataLabelsAnchor,\n        val: this.getStackedTotalDataLabel({ realIndex, j }),\n        dataLabelsConfig,\n        barTotalDataLabelsConfig\n      });\n    }\n    return {\n      dataLabelsPos,\n      dataLabels,\n      totalDataLabels\n    };\n  }\n  /**\n   * True when this chart stacks in more than one group, so totals have to be\n   * resolved per group rather than across the whole data point. A single-group\n   * chart keeps every old code path exactly as it was. See #4173.\n   */\n  hasMultipleSeriesGroups() {\n    return this.w.labelData.seriesGroups.length > 1;\n  }\n  /**\n   * The series group `realIndex` belongs to, and that group's own stacking\n   * state, or null when totals are chart-wide (the single-group case).\n   * @param {number} realIndex\n   * @returns {{groupIndex: number, group: string[]} | null}\n   */\n  getTotalGroupContext(realIndex) {\n    if (!this.hasMultipleSeriesGroups()) return null;\n    const groupIndex = this.barCtx.barHelpers.getSeriesGroupIndex(realIndex);\n    if (groupIndex < 0) return null;\n    return { groupIndex, group: this.w.labelData.seriesGroups[groupIndex] };\n  }\n  /**\n   * Whether `realIndex` is the series that should draw the stacked total.\n   *\n   * That is the series capping the stack. With grouped stacks each group has\n   * its own cap, so gating on the chart-wide `lastActiveBarSerieIndex` drew a\n   * single total for the last group only. See #4173.\n   * @param {number} realIndex\n   */\n  drawsStackedTotal(realIndex) {\n    const byGroup = this.barCtx.lastActiveBarSerieIndexByGroup;\n    const ctx = this.getTotalGroupContext(realIndex);\n    if (ctx && byGroup && byGroup.length > ctx.groupIndex) {\n      return byGroup[ctx.groupIndex] === realIndex;\n    }\n    return this.barCtx.lastActiveBarSerieIndex === realIndex;\n  }\n  /** @param {{realIndex: any, j: any}} opts */\n  getStackedTotalDataLabel({ realIndex, j }) {\n    const w2 = this.w;\n    const ctx = this.getTotalGroupContext(realIndex);\n    const byGroups = w2.seriesData.stackedSeriesTotalsByGroups;\n    let val = ctx && byGroups && byGroups[ctx.groupIndex] ? byGroups[ctx.groupIndex][j] : this.barCtx.stackedSeriesTotals[j];\n    if (this.totalFormatter) {\n      val = this.totalFormatter(val, __spreadProps(__spreadValues({}, w2), {\n        seriesIndex: realIndex,\n        dataPointIndex: j,\n        w: w2\n      }));\n    }\n    return val;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  calculateColumnsDataLabelsPosition(opts) {\n    const w2 = this.w;\n    let {\n      i: i2,\n      j,\n      realIndex,\n      y,\n      bcx,\n      barWidth,\n      barHeight,\n      textRects,\n      dataLabelsX,\n      dataLabelsY,\n      dataLabelsConfig,\n      barDataLabelsConfig,\n      barTotalDataLabelsConfig,\n      strokeWidth,\n      offX,\n      offY\n    } = opts;\n    let totalDataLabelsY;\n    let totalDataLabelsX;\n    const totalDataLabelsAnchor = \"middle\";\n    const totalDataLabelsBcx = bcx;\n    barHeight = Math.abs(barHeight);\n    const vertical = w2.config.plotOptions.bar.dataLabels.orientation === \"vertical\";\n    const { zeroEncounters } = this.barCtx.barHelpers.getZeroValueEncounters({\n      i: i2,\n      j\n    });\n    bcx = bcx - strokeWidth / 2;\n    const dataPointsDividedWidth = w2.layout.gridWidth / w2.globals.dataPoints;\n    if (this.barCtx.isVerticalGroupedRangeBar) {\n      dataLabelsX += barWidth / 2;\n    } else {\n      if (w2.axisFlags.isXNumeric) {\n        dataLabelsX = bcx - barWidth / 2 + offX;\n      } else {\n        dataLabelsX = bcx - dataPointsDividedWidth + barWidth / 2 + offX;\n      }\n      if (!w2.config.chart.stacked && zeroEncounters > 0 && w2.config.plotOptions.bar.hideZeroBarsWhenGrouped) {\n        dataLabelsX -= barWidth * zeroEncounters;\n      }\n    }\n    if (vertical) {\n      const offsetDLX = 2;\n      dataLabelsX = dataLabelsX + textRects.height / 2 - strokeWidth / 2 - offsetDLX;\n    }\n    const valIsNegative = w2.seriesData.series[i2][j] < 0;\n    let newY = y;\n    if (this.barCtx.isReversed) {\n      newY = y + (valIsNegative ? barHeight : -barHeight);\n    }\n    switch (barDataLabelsConfig.position) {\n      case \"center\":\n        if (vertical) {\n          if (valIsNegative) {\n            dataLabelsY = newY - barHeight / 2 + offY;\n          } else {\n            dataLabelsY = newY + barHeight / 2 - offY;\n          }\n        } else {\n          if (valIsNegative) {\n            dataLabelsY = newY - barHeight / 2 + textRects.height / 2 + offY;\n          } else {\n            dataLabelsY = newY + barHeight / 2 + textRects.height / 2 - offY;\n          }\n        }\n        break;\n      case \"bottom\":\n        if (vertical) {\n          if (valIsNegative) {\n            dataLabelsY = newY - barHeight + offY;\n          } else {\n            dataLabelsY = newY + barHeight - offY;\n          }\n        } else {\n          if (valIsNegative) {\n            dataLabelsY = newY - barHeight + textRects.height + strokeWidth + offY;\n          } else {\n            dataLabelsY = newY + barHeight - textRects.height / 2 + strokeWidth - offY;\n          }\n        }\n        break;\n      case \"top\":\n        if (vertical) {\n          if (valIsNegative) {\n            dataLabelsY = newY + offY;\n          } else {\n            dataLabelsY = newY - offY;\n          }\n        } else {\n          if (valIsNegative) {\n            dataLabelsY = newY - textRects.height / 2 - offY;\n          } else {\n            dataLabelsY = newY + textRects.height + offY;\n          }\n        }\n        break;\n    }\n    let lowestPrevY = newY;\n    const totalGroupCtx = this.getTotalGroupContext(realIndex);\n    const prevYGroups = totalGroupCtx ? [totalGroupCtx.group] : w2.labelData.seriesGroups;\n    prevYGroups.forEach((sg) => {\n      var _a;\n      (_a = this.barCtx[sg.join(\",\")]) == null ? void 0 : _a.prevY.forEach(\n        (arr) => {\n          if (valIsNegative) {\n            lowestPrevY = Math.max(arr[j], lowestPrevY);\n          } else {\n            lowestPrevY = Math.min(arr[j], lowestPrevY);\n          }\n        }\n      );\n    });\n    if (this.drawsStackedTotal(realIndex) && barTotalDataLabelsConfig.enabled) {\n      const ADDITIONAL_OFFY = 18;\n      const graphics = new Graphics(this.barCtx.w);\n      const totalLabeltextRects = graphics.getTextRects(\n        this.getStackedTotalDataLabel({ realIndex, j }),\n        dataLabelsConfig.fontSize\n      );\n      if (valIsNegative) {\n        totalDataLabelsY = lowestPrevY - totalLabeltextRects.height / 2 - offY - barTotalDataLabelsConfig.offsetY + ADDITIONAL_OFFY;\n      } else {\n        totalDataLabelsY = lowestPrevY + totalLabeltextRects.height + offY + barTotalDataLabelsConfig.offsetY - ADDITIONAL_OFFY;\n      }\n      const xDivision = dataPointsDividedWidth;\n      totalDataLabelsX = totalDataLabelsBcx + (w2.axisFlags.isXNumeric ? -barWidth / 2 : barWidth / 2 - xDivision) + barTotalDataLabelsConfig.offsetX;\n    }\n    if (!w2.config.chart.stacked) {\n      if (dataLabelsY < 0) {\n        dataLabelsY = 0 + strokeWidth;\n      } else if (dataLabelsY + textRects.height / 3 > w2.layout.gridHeight) {\n        dataLabelsY = w2.layout.gridHeight - strokeWidth;\n      }\n    }\n    return {\n      bcx,\n      bcy: y,\n      dataLabelsX,\n      dataLabelsY,\n      totalDataLabelsX,\n      totalDataLabelsY,\n      totalDataLabelsAnchor\n    };\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  calculateBarsDataLabelsPosition(opts) {\n    var _a;\n    const w2 = this.w;\n    let {\n      x,\n      i: i2,\n      j,\n      realIndex,\n      bcy,\n      barHeight,\n      barWidth,\n      textRects,\n      dataLabelsX,\n      strokeWidth,\n      dataLabelsConfig,\n      barDataLabelsConfig,\n      barTotalDataLabelsConfig,\n      offX,\n      offY\n    } = opts;\n    const dataPointsDividedHeight = w2.layout.gridHeight / w2.globals.dataPoints;\n    const { zeroEncounters } = this.barCtx.barHelpers.getZeroValueEncounters({\n      i: i2,\n      j\n    });\n    barWidth = Math.abs(barWidth);\n    let dataLabelsY;\n    if (this.barCtx.isPyramid) {\n      const centerOffset = (_a = textRects.centerOffset) != null ? _a : 0;\n      dataLabelsY = bcy + barHeight / 2 + offY - centerOffset;\n    } else {\n      dataLabelsY = bcy - (this.barCtx.isRangeBar ? 0 : dataPointsDividedHeight) + barHeight / 2 + textRects.height / 2 + offY - 3;\n    }\n    if (!w2.config.chart.stacked && zeroEncounters > 0 && w2.config.plotOptions.bar.hideZeroBarsWhenGrouped) {\n      dataLabelsY -= barHeight * zeroEncounters;\n    }\n    let totalDataLabelsX;\n    let totalDataLabelsY;\n    let totalDataLabelsAnchor = \"start\";\n    const valIsNegative = w2.seriesData.series[i2][j] < 0;\n    let newX = x;\n    if (this.barCtx.isReversed) {\n      newX = x + (valIsNegative ? -barWidth : barWidth);\n      totalDataLabelsAnchor = valIsNegative ? \"start\" : \"end\";\n    }\n    if (this.barCtx.isPyramid) {\n      dataLabelsX = w2.layout.gridWidth / 2 + offX;\n    } else {\n      switch (barDataLabelsConfig.position) {\n        case \"center\":\n          if (valIsNegative) {\n            dataLabelsX = newX + barWidth / 2 - offX;\n          } else {\n            dataLabelsX = Math.max(textRects.width / 2, newX - barWidth / 2) + offX;\n          }\n          break;\n        case \"bottom\":\n          if (valIsNegative) {\n            dataLabelsX = newX + barWidth - strokeWidth - offX;\n          } else {\n            dataLabelsX = newX - barWidth + strokeWidth + offX;\n          }\n          break;\n        case \"top\":\n          if (valIsNegative) {\n            dataLabelsX = newX - strokeWidth - offX;\n          } else {\n            dataLabelsX = newX - strokeWidth + offX;\n          }\n          break;\n      }\n    }\n    let lowestPrevX = newX;\n    const totalGroupCtx = this.getTotalGroupContext(realIndex);\n    const prevXGroups = totalGroupCtx ? [totalGroupCtx.group] : w2.labelData.seriesGroups;\n    prevXGroups.forEach((sg) => {\n      var _a2;\n      (_a2 = this.barCtx[sg.join(\",\")]) == null ? void 0 : _a2.prevX.forEach(\n        (arr) => {\n          if (valIsNegative) {\n            lowestPrevX = Math.min(arr[j], lowestPrevX);\n          } else {\n            lowestPrevX = Math.max(arr[j], lowestPrevX);\n          }\n        }\n      );\n    });\n    if (this.drawsStackedTotal(realIndex) && barTotalDataLabelsConfig.enabled) {\n      const graphics = new Graphics(this.barCtx.w);\n      const totalLabeltextRects = graphics.getTextRects(\n        this.getStackedTotalDataLabel({ realIndex, j }),\n        dataLabelsConfig.fontSize\n      );\n      if (valIsNegative) {\n        totalDataLabelsX = lowestPrevX - strokeWidth - offX - barTotalDataLabelsConfig.offsetX;\n        totalDataLabelsAnchor = \"end\";\n      } else {\n        totalDataLabelsX = lowestPrevX + offX + barTotalDataLabelsConfig.offsetX + (this.barCtx.isReversed ? -(barWidth + strokeWidth) : strokeWidth);\n      }\n      totalDataLabelsY = dataLabelsY - textRects.height / 2 + totalLabeltextRects.height / 2 + barTotalDataLabelsConfig.offsetY + strokeWidth;\n      if (w2.globals.barGroups.length > 1 && !totalGroupCtx) {\n        totalDataLabelsY = totalDataLabelsY - w2.globals.barGroups.length / 2 * (barHeight / 2);\n      }\n    }\n    if (!w2.config.chart.stacked) {\n      if (dataLabelsConfig.textAnchor === \"start\") {\n        if (dataLabelsX - textRects.width < 0) {\n          dataLabelsX = valIsNegative ? textRects.width + strokeWidth - offX : strokeWidth + offX;\n        } else if (dataLabelsX + textRects.width > w2.layout.gridWidth) {\n          dataLabelsX = valIsNegative ? w2.layout.gridWidth - strokeWidth : w2.layout.gridWidth - textRects.width - strokeWidth;\n        }\n      } else if (dataLabelsConfig.textAnchor === \"middle\") {\n        if (dataLabelsX - textRects.width / 2 < 0) {\n          dataLabelsX = textRects.width / 2 + strokeWidth;\n        } else if (dataLabelsX + textRects.width / 2 > w2.layout.gridWidth) {\n          dataLabelsX = w2.layout.gridWidth - textRects.width / 2 - strokeWidth;\n        }\n      } else if (dataLabelsConfig.textAnchor === \"end\") {\n        if (dataLabelsX < 1) {\n          dataLabelsX = textRects.width + strokeWidth;\n        } else if (dataLabelsX + 1 > w2.layout.gridWidth) {\n          dataLabelsX = w2.layout.gridWidth - textRects.width - strokeWidth;\n        }\n      }\n    }\n    return {\n      bcx: x,\n      bcy,\n      dataLabelsX,\n      dataLabelsY,\n      totalDataLabelsX,\n      totalDataLabelsY,\n      totalDataLabelsAnchor\n    };\n  }\n  /** @param {{x: any, y: any, val: any, i: any, j: any, textRects: any, barHeight: any, barWidth: any, dataLabelsConfig: any}} opts */\n  drawCalculatedDataLabels({\n    x,\n    y,\n    val,\n    i: i2,\n    // = realIndex\n    j,\n    textRects,\n    barHeight,\n    barWidth,\n    dataLabelsConfig\n  }) {\n    var _a, _b;\n    const w2 = this.w;\n    let rotate = \"rotate(0)\";\n    if (w2.config.plotOptions.bar.dataLabels.orientation === \"vertical\")\n      rotate = `rotate(-90, ${x}, ${y})`;\n    const dataLabels = new DataLabels(this.barCtx.w, this.barCtx.ctx);\n    const graphics = new Graphics(this.barCtx.w);\n    const formatter = dataLabelsConfig.formatter;\n    let elDataLabelsWrap = null;\n    const isSeriesNotCollapsed = w2.globals.collapsedSeriesIndices.indexOf(i2) > -1;\n    if (dataLabelsConfig.enabled && !isSeriesNotCollapsed) {\n      elDataLabelsWrap = graphics.group({\n        class: \"apexcharts-data-labels\",\n        transform: rotate\n      });\n      const dlCfg = w2.config.dataLabels;\n      if (((_a = dlCfg.animate) == null ? void 0 : _a.enabled) || ((_b = dlCfg.countUp) == null ? void 0 : _b.enabled)) {\n        elDataLabelsWrap.node.setAttribute(\n          \"data:dlKey\",\n          `${i2}::${datumKey(w2, i2, j)}`\n        );\n        elDataLabelsWrap.node.setAttribute(\"data:dlJ\", String(j));\n        if (typeof val === \"number\" && isFinite(val)) {\n          elDataLabelsWrap.node.setAttribute(\"data:dlVal\", String(val));\n        }\n      }\n      let text = \"\";\n      if (typeof val !== \"undefined\") {\n        text = formatter(val, __spreadProps(__spreadValues({}, w2), {\n          seriesIndex: i2,\n          dataPointIndex: j,\n          w: w2\n        }));\n      }\n      if (!val && w2.config.plotOptions.bar.hideZeroBarsWhenGrouped) {\n        text = \"\";\n      }\n      const valIsNegative = w2.seriesData.series[i2][j] < 0;\n      const position = w2.config.plotOptions.bar.dataLabels.position;\n      if (w2.config.plotOptions.bar.dataLabels.orientation === \"vertical\") {\n        if (position === \"top\") {\n          if (valIsNegative) dataLabelsConfig.textAnchor = \"end\";\n          else dataLabelsConfig.textAnchor = \"start\";\n        }\n        if (position === \"center\") {\n          dataLabelsConfig.textAnchor = \"middle\";\n        }\n        if (position === \"bottom\") {\n          if (valIsNegative) dataLabelsConfig.textAnchor = \"end\";\n          else dataLabelsConfig.textAnchor = \"start\";\n        }\n      }\n      if (this.barCtx.isRangeBar && this.barCtx.barOptions.dataLabels.hideOverflowingLabels) {\n        const txRect = graphics.getTextRects(\n          text,\n          parseFloat(dataLabelsConfig.style.fontSize).toString()\n        );\n        if (barWidth < txRect.width) {\n          text = \"\";\n        }\n      }\n      if (w2.config.chart.stacked && this.barCtx.barOptions.dataLabels.hideOverflowingLabels) {\n        if (this.barCtx.isHorizontal) {\n          if (textRects.width / 1.6 > Math.abs(barWidth)) {\n            text = \"\";\n          }\n        } else {\n          if (textRects.height / 1.6 > Math.abs(barHeight)) {\n            text = \"\";\n          }\n        }\n      }\n      const modifiedDataLabelsConfig = __spreadValues({}, dataLabelsConfig);\n      if (this.barCtx.isHorizontal) {\n        if (val < 0) {\n          if (dataLabelsConfig.textAnchor === \"start\") {\n            modifiedDataLabelsConfig.textAnchor = \"end\";\n          } else if (dataLabelsConfig.textAnchor === \"end\") {\n            modifiedDataLabelsConfig.textAnchor = \"start\";\n          }\n        }\n      }\n      dataLabels.plotDataLabelsText({\n        x,\n        y,\n        text,\n        i: i2,\n        j,\n        parent: elDataLabelsWrap,\n        dataLabelsConfig: modifiedDataLabelsConfig,\n        alwaysDrawDataLabel: true,\n        offsetCorrection: true\n      });\n    }\n    return elDataLabelsWrap;\n  }\n  /** @param {{ x?: any, y?: any, val?: any, realIndex?: any, textAnchor?: any, barWidth?: any, barHeight?: any, dataLabelsConfig?: any, barTotalDataLabelsConfig?: any }} opts */\n  drawTotalDataLabels({\n    x,\n    y,\n    val,\n    realIndex,\n    textAnchor,\n    barTotalDataLabelsConfig\n  }) {\n    const graphics = new Graphics(this.barCtx.w);\n    let totalDataLabelText;\n    if (barTotalDataLabelsConfig.enabled && typeof x !== \"undefined\" && typeof y !== \"undefined\" && this.drawsStackedTotal(realIndex)) {\n      totalDataLabelText = graphics.drawText({\n        x,\n        y,\n        foreColor: barTotalDataLabelsConfig.style.color,\n        text: val,\n        textAnchor,\n        fontFamily: barTotalDataLabelsConfig.style.fontFamily,\n        fontSize: barTotalDataLabelsConfig.style.fontSize,\n        fontWeight: barTotalDataLabelsConfig.style.fontWeight\n      });\n    }\n    return totalDataLabelText;\n  }\n}\nfunction isHistogramOverlay(w2) {\n  var _a, _b, _c, _d, _e, _f, _g;\n  if (((_b = (_a = w2 == null ? void 0 : w2.config) == null ? void 0 : _a.chart) == null ? void 0 : _b.requestedType) !== \"histogram\") return false;\n  if (((_d = (_c = w2.config.plotOptions) == null ? void 0 : _c.histogram) == null ? void 0 : _d.overlap) === false) return false;\n  return ((_g = (_f = (_e = w2.seriesData) == null ? void 0 : _e.series) == null ? void 0 : _f.length) != null ? _g : 0) > 1;\n}\nlet Helpers$1 = class Helpers4 {\n  /**\n   * @param {Record<string, any>} barCtx\n   */\n  constructor(barCtx) {\n    this.w = barCtx.w;\n    this.barCtx = barCtx;\n  }\n  /**\n   * @param {any[]} series\n   */\n  initVariables(series) {\n    const w2 = this.w;\n    this.barCtx.series = series;\n    this.barCtx.totalItems = 0;\n    this.barCtx.seriesLen = 0;\n    this.barCtx.visibleI = -1;\n    this.barCtx.visibleItems = 1;\n    for (let sl = 0; sl < series.length; sl++) {\n      if (series[sl].length > 0) {\n        this.barCtx.seriesLen = this.barCtx.seriesLen + 1;\n        this.barCtx.totalItems += series[sl].length;\n      }\n      if (w2.axisFlags.isXNumeric) {\n        for (let j = 0; j < series[sl].length; j++) {\n          if (w2.seriesData.seriesX[sl][j] > w2.globals.minX && w2.seriesData.seriesX[sl][j] < w2.globals.maxX) {\n            this.barCtx.visibleItems++;\n          }\n        }\n      } else {\n        this.barCtx.visibleItems = w2.globals.dataPoints;\n      }\n    }\n    this.arrBorderRadius = this.createBorderRadiusArr(w2.seriesData.series);\n    if (Utils$1.isSafari()) {\n      this.arrBorderRadius = this.arrBorderRadius.map(\n        (brArr) => (\n          /**\n           * @param {any} _\n           */\n          brArr.map((_) => \"none\")\n        )\n      );\n    }\n    if (this.barCtx.seriesLen === 0) {\n      this.barCtx.seriesLen = 1;\n    }\n  }\n  /**\n   * @param {number} realIndex\n   */\n  initialPositions(realIndex) {\n    const w2 = this.w;\n    let x, y, yDivision, xDivision, barHeight, barWidth, zeroH, zeroW;\n    let dataPoints = w2.globals.dataPoints;\n    if (this.barCtx.isRangeBar) {\n      dataPoints = w2.labelData.labels.length;\n    }\n    let seriesLen = this.barCtx.seriesLen;\n    if (w2.config.plotOptions.bar.rangeBarGroupRows || isHistogramOverlay(w2)) {\n      seriesLen = 1;\n    }\n    if (this.barCtx.isHorizontal) {\n      yDivision = w2.layout.gridHeight / dataPoints;\n      barHeight = yDivision / seriesLen;\n      if (w2.axisFlags.isXNumeric) {\n        yDivision = w2.layout.gridHeight / this.barCtx.totalItems;\n        barHeight = yDivision / this.barCtx.seriesLen;\n      }\n      barHeight = barHeight * parseInt(this.barCtx.barOptions.barHeight, 10) / 100;\n      if (String(this.barCtx.barOptions.barHeight).indexOf(\"%\") === -1) {\n        barHeight = parseInt(this.barCtx.barOptions.barHeight, 10);\n      }\n      zeroW = this.barCtx.baseLineInvertedY + w2.globals.padHorizontal + (this.barCtx.isReversed ? w2.layout.gridWidth : 0) - (this.barCtx.isReversed ? this.barCtx.baseLineInvertedY * 2 : 0);\n      if (this.barCtx.isFunnel) {\n        zeroW = w2.layout.gridWidth / 2;\n      }\n      y = (yDivision - barHeight * this.barCtx.seriesLen) / 2;\n    } else {\n      xDivision = w2.layout.gridWidth / this.barCtx.visibleItems;\n      if (w2.config.xaxis.convertedCatToNumeric) {\n        xDivision = w2.layout.gridWidth / w2.globals.dataPoints;\n      }\n      barWidth = xDivision / seriesLen * parseInt(this.barCtx.barOptions.columnWidth, 10) / 100;\n      if (w2.axisFlags.isXNumeric) {\n        const xRatio = this.barCtx.xRatio;\n        if (w2.globals.minXDiff && w2.globals.minXDiff !== 0.5 && w2.globals.minXDiff / xRatio > 0) {\n          xDivision = w2.globals.minXDiff / xRatio;\n        }\n        barWidth = xDivision / seriesLen * parseInt(this.barCtx.barOptions.columnWidth, 10) / 100;\n        if (barWidth < 1) {\n          barWidth = 1;\n        }\n      }\n      if (String(this.barCtx.barOptions.columnWidth).indexOf(\"%\") === -1) {\n        barWidth = parseInt(this.barCtx.barOptions.columnWidth, 10);\n      }\n      zeroH = w2.layout.gridHeight - this.barCtx.baseLineY[this.barCtx.translationsIndex] - (this.barCtx.isReversed ? w2.layout.gridHeight : 0) + (this.barCtx.isReversed ? this.barCtx.baseLineY[this.barCtx.translationsIndex] * 2 : 0);\n      if (w2.axisFlags.isXNumeric) {\n        const xForNumericX = this.barCtx.getBarXForNumericXAxis({\n          x,\n          j: 0,\n          realIndex,\n          barWidth\n        });\n        x = xForNumericX.x;\n      } else {\n        x = w2.globals.padHorizontal + Utils$1.noExponents(xDivision - barWidth * this.barCtx.seriesLen) / 2;\n      }\n    }\n    w2.globals.barHeight = barHeight;\n    w2.globals.barWidth = barWidth;\n    return {\n      x,\n      y,\n      yDivision,\n      xDivision,\n      barHeight,\n      barWidth,\n      zeroH,\n      zeroW\n    };\n  }\n  /**\n   * @param {Record<string, any>} ctx\n   */\n  initializeStackedPrevVars(ctx) {\n    const w2 = ctx.w;\n    w2.labelData.seriesGroups.forEach((group) => {\n      if (!ctx[group]) ctx[group] = {};\n      ctx[group].prevY = [];\n      ctx[group].prevX = [];\n      ctx[group].prevYF = [];\n      ctx[group].prevXF = [];\n      ctx[group].prevYVal = [];\n      ctx[group].prevXVal = [];\n    });\n  }\n  /**\n   * @param {Record<string, any>} ctx\n   */\n  initializeStackedXYVars(ctx) {\n    const w2 = ctx.w;\n    w2.labelData.seriesGroups.forEach((group) => {\n      if (!ctx[group]) ctx[group] = {};\n      ctx[group].xArrj = [];\n      ctx[group].xArrjF = [];\n      ctx[group].xArrjVal = [];\n      ctx[group].yArrj = [];\n      ctx[group].yArrjF = [];\n      ctx[group].yArrjVal = [];\n    });\n  }\n  /**\n   * @param {any[]} series\n   * @param {number} i\n   * @param {number} j\n   * @param {number} realIndex\n   */\n  getPathFillColor(series, i2, j, realIndex) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    const fill = new Fill(this.barCtx.w);\n    let fillColor = null;\n    const seriesNumber = this.barCtx.barOptions.distributed ? j : i2;\n    let useRangeColor = false;\n    if (this.barCtx.barOptions.colors.ranges.length > 0) {\n      const colorRange = this.barCtx.barOptions.colors.ranges;\n      colorRange.map((range) => {\n        if (series[i2][j] >= range.from && series[i2][j] <= range.to) {\n          fillColor = range.color;\n          useRangeColor = true;\n        }\n      });\n    }\n    const pathFill = fill.fillPath({\n      seriesNumber: this.barCtx.barOptions.distributed ? seriesNumber : realIndex,\n      dataPointIndex: j,\n      color: fillColor,\n      value: series[i2][j],\n      fillConfig: (_a = w2.config.series[i2].data[j]) == null ? void 0 : _a.fill,\n      fillType: ((_c = (_b = w2.config.series[i2].data[j]) == null ? void 0 : _b.fill) == null ? void 0 : _c.type) ? (_d = w2.config.series[i2].data[j]) == null ? void 0 : _d.fill.type : Array.isArray(w2.config.fill.type) ? w2.config.fill.type[realIndex] : w2.config.fill.type\n    });\n    return {\n      color: pathFill,\n      useRangeColor\n    };\n  }\n  /**\n   * @param {number} i\n   * @param {number} j\n   * @param {number} realIndex\n   */\n  getStrokeWidth(i2, j, realIndex) {\n    let strokeWidth = 0;\n    const w2 = this.w;\n    if (typeof this.barCtx.series[i2][j] === \"undefined\" || this.barCtx.series[i2][j] === null || w2.config.chart.type === \"bar\" && !this.barCtx.series[i2][j]) {\n      this.barCtx.isNullValue = true;\n    } else {\n      this.barCtx.isNullValue = false;\n    }\n    if (w2.config.stroke.show) {\n      if (!this.barCtx.isNullValue) {\n        strokeWidth = Array.isArray(this.barCtx.strokeWidth) ? this.barCtx.strokeWidth[realIndex] : this.barCtx.strokeWidth;\n      }\n    }\n    return strokeWidth;\n  }\n  /**\n   * @param {any[]} series\n   */\n  createBorderRadiusArr(series) {\n    var _a;\n    const w2 = this.w;\n    const alwaysApplyRadius = !this.w.config.chart.stacked || w2.config.plotOptions.bar.borderRadius <= 0;\n    const numSeries = series.length;\n    const numColumns = ((_a = series[0]) == null ? void 0 : _a.length) | 0;\n    const output = Array.from(\n      { length: numSeries },\n      () => Array(numColumns).fill(alwaysApplyRadius ? \"top\" : \"none\")\n    );\n    if (alwaysApplyRadius) return output;\n    const chartType = this.w.config.chart.type;\n    for (let j = 0; j < numColumns; j++) {\n      const positiveIndices = [];\n      const negativeIndices = [];\n      let nonZeroCount = 0;\n      for (let i2 = 0; i2 < numSeries; i2++) {\n        const value = series[i2][j];\n        if (value > 0) {\n          positiveIndices.push(i2);\n          nonZeroCount++;\n        } else if (value < 0) {\n          negativeIndices.push(i2);\n          nonZeroCount++;\n        }\n      }\n      if (positiveIndices.length > 0 && negativeIndices.length === 0) {\n        if (positiveIndices.length === 1) {\n          output[positiveIndices[0]][j] = chartType === \"bar\" && numColumns === 1 ? \"top\" : \"both\";\n        } else {\n          const firstPositiveIndex = positiveIndices[0];\n          const lastPositiveIndex = positiveIndices[positiveIndices.length - 1];\n          for (const i2 of positiveIndices) {\n            if (i2 === firstPositiveIndex) {\n              output[i2][j] = chartType === \"bar\" && numColumns === 1 ? \"top\" : \"bottom\";\n            } else if (i2 === lastPositiveIndex) {\n              output[i2][j] = \"top\";\n            } else {\n              output[i2][j] = \"none\";\n            }\n          }\n        }\n      } else if (negativeIndices.length > 0 && positiveIndices.length === 0) {\n        if (negativeIndices.length === 1) {\n          output[negativeIndices[0]][j] = \"both\";\n        } else {\n          const highestNegativeIndex = Math.max(...negativeIndices);\n          const lowestNegativeIndex = Math.min(...negativeIndices);\n          for (const i2 of negativeIndices) {\n            if (i2 === highestNegativeIndex) {\n              output[i2][j] = \"bottom\";\n            } else if (i2 === lowestNegativeIndex) {\n              output[i2][j] = \"top\";\n            } else {\n              output[i2][j] = \"none\";\n            }\n          }\n        }\n      } else if (positiveIndices.length > 0 && negativeIndices.length > 0) {\n        const lastPositiveIndex = positiveIndices[positiveIndices.length - 1];\n        for (const i2 of positiveIndices) {\n          if (i2 === lastPositiveIndex) {\n            output[i2][j] = \"top\";\n          } else {\n            output[i2][j] = \"none\";\n          }\n        }\n        const highestNegativeIndex = Math.max(...negativeIndices);\n        for (const i2 of negativeIndices) {\n          if (i2 === highestNegativeIndex) {\n            output[i2][j] = \"bottom\";\n          } else {\n            output[i2][j] = \"none\";\n          }\n        }\n      } else if (nonZeroCount === 1) {\n        const index = positiveIndices[0] || negativeIndices[0];\n        output[index][j] = \"both\";\n      }\n    }\n    return output;\n  }\n  /** @param {{ j?: any, i?: any, x1?: any, x2?: any, y1?: any, y2?: any, bc?: any, elSeries?: any }} opts */\n  barBackground({ j, i: i2, x1, x2, y1, y2, elSeries }) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.barCtx.w);\n    const sr = new Series(this.barCtx.w);\n    const activeSeriesIndex = sr.getActiveConfigSeriesIndex();\n    if (this.barCtx.barOptions.colors.backgroundBarColors.length > 0 && activeSeriesIndex === i2) {\n      if (j >= this.barCtx.barOptions.colors.backgroundBarColors.length) {\n        j %= this.barCtx.barOptions.colors.backgroundBarColors.length;\n      }\n      const bcolor = this.barCtx.barOptions.colors.backgroundBarColors[j];\n      const rect = graphics.drawRect(\n        typeof x1 !== \"undefined\" ? x1 : 0,\n        typeof y1 !== \"undefined\" ? y1 : 0,\n        typeof x2 !== \"undefined\" ? x2 : w2.layout.gridWidth,\n        typeof y2 !== \"undefined\" ? y2 : w2.layout.gridHeight,\n        this.barCtx.barOptions.colors.backgroundBarRadius,\n        bcolor,\n        this.barCtx.barOptions.colors.backgroundBarOpacity\n      );\n      elSeries.add(rect);\n      rect.node.classList.add(\"apexcharts-backgroundBar\");\n    }\n  }\n  /** @param {{ barWidth?: any, barXPosition?: any, y1?: any, y2?: any, yRatio?: any, strokeWidth?: any, isReversed?: any, series?: any, seriesGroup?: any, realIndex?: any, i?: any, j?: any, w?: any }} opts */\n  getColumnPaths({\n    barWidth,\n    barXPosition,\n    y1,\n    y2,\n    strokeWidth,\n    isReversed,\n    series,\n    seriesGroup,\n    realIndex,\n    i: i2,\n    j,\n    w: w2\n  }) {\n    var _a, _b, _c;\n    const graphics = new Graphics(this.barCtx.w);\n    strokeWidth = Array.isArray(strokeWidth) ? strokeWidth[realIndex] : strokeWidth;\n    if (!strokeWidth) strokeWidth = 0;\n    let bW = barWidth;\n    let bXP = barXPosition;\n    if ((_a = w2.config.series[realIndex].data[j]) == null ? void 0 : _a.columnWidthOffset) {\n      bXP = barXPosition - w2.config.series[realIndex].data[j].columnWidthOffset / 2;\n      bW = barWidth + w2.config.series[realIndex].data[j].columnWidthOffset;\n    }\n    const strokeCenter = strokeWidth / 2;\n    const x1 = bXP + strokeCenter;\n    const x2 = bXP + bW - strokeCenter;\n    const direction = (series[i2][j] >= 0 ? 1 : -1) * (isReversed ? -1 : 1);\n    y1 += 1e-3 - strokeCenter * direction;\n    y2 += 1e-3 + strokeCenter * direction;\n    const sl = graphics.line(x2, y1);\n    const closing = w2.config.plotOptions.bar.borderRadiusApplication === \"around\" || this.arrBorderRadius[realIndex][j] === \"both\" ? \" Z\" : \" z\";\n    let pathTo = graphics.move(x1, y1) + graphics.line(x1, y2) + graphics.line(x2, y2) + sl + closing;\n    if (this.arrBorderRadius[realIndex][j] !== \"none\") {\n      pathTo = graphics.roundPathCorners(\n        pathTo,\n        w2.config.plotOptions.bar.borderRadius\n      );\n    }\n    let pathFrom = null;\n    const morphFrom = (_c = (_b = this.barCtx.ctx) == null ? void 0 : _b.morphTypeChange) == null ? void 0 : _c.getInitialPathFor(\n      realIndex,\n      j\n    );\n    if (morphFrom) {\n      pathFrom = morphFrom;\n    } else if (w2.globals.previousPaths.length > 0) {\n      pathFrom = this.barCtx.getPreviousPath(realIndex, j, pathTo);\n    }\n    if (pathFrom == null) {\n      pathFrom = graphics.move(x1, y1) + graphics.line(x1, y1) + sl + sl + sl + sl + sl + graphics.line(x1, y1) + closing;\n    }\n    if (w2.config.chart.stacked) {\n      let _ctx = this.barCtx;\n      _ctx = this.barCtx[seriesGroup];\n      _ctx.yArrj.push(y2 - strokeCenter * direction);\n      _ctx.yArrjF.push(Math.abs(y1 - y2 + strokeWidth * direction));\n      _ctx.yArrjVal.push(this.barCtx.series[i2][j]);\n    }\n    return {\n      pathTo,\n      pathFrom\n    };\n  }\n  /**\n   * Build a trapezoidal funnel-stage path. Used when\n   * `plotOptions.funnel.shape === 'trapezoid'` is active alongside `isFunnel`.\n   *\n   * Each stage is a 4-corner polygon whose top width matches the current\n   * stage's value and bottom width matches the next stage's value, producing\n   * continuous sloped sides between consecutive stages.\n   *\n   * For the last stage, the bottom width is configurable:\n   * - `lastShape: 'flat'`  → bottom width = top width (parallel sides)\n   * - `lastShape: 'taper'` → bottom width = 0 (taper to a point)\n   *\n   * @param {{ barYPosition: number, barHeight: number, series: any[][], i: number, j: number, realIndex: number, strokeWidth: number, w: any }} opts\n   */\n  getFunnelTrapezoidPaths({\n    barYPosition,\n    barHeight,\n    series,\n    i: i2,\n    j,\n    realIndex,\n    strokeWidth,\n    w: w2\n  }) {\n    var _a, _b;\n    const graphics = new Graphics(this.barCtx.w);\n    const center = w2.layout.gridWidth / 2;\n    const halfWidthFor = (v2) => Math.abs(v2 / this.barCtx.invertedYRatio) / 2;\n    const topHalf = halfWidthFor(series[i2][j]);\n    const lastIdx = series[i2].length - 1;\n    const isLast = j === lastIdx;\n    const lastShape = w2.config.plotOptions.funnel.lastShape === \"taper\" ? \"taper\" : \"flat\";\n    let bottomHalf;\n    if (isLast) {\n      bottomHalf = lastShape === \"taper\" ? 0 : topHalf;\n    } else {\n      bottomHalf = halfWidthFor(series[i2][j + 1]);\n    }\n    const strokeCenter = strokeWidth / 2;\n    const y1 = barYPosition + strokeCenter;\n    const y2 = barYPosition + barHeight - strokeCenter;\n    const topLeftX = center - topHalf;\n    const topRightX = center + topHalf;\n    const bottomLeftX = center - bottomHalf;\n    const bottomRightX = center + bottomHalf;\n    const pathTo = graphics.move(topLeftX, y1) + graphics.line(topRightX, y1) + graphics.line(bottomRightX, y2) + graphics.line(bottomLeftX, y2) + \" Z\";\n    let pathFrom = null;\n    const morphFrom = (_b = (_a = this.barCtx.ctx) == null ? void 0 : _a.morphTypeChange) == null ? void 0 : _b.getInitialPathFor(\n      realIndex,\n      j\n    );\n    if (morphFrom) {\n      pathFrom = morphFrom;\n    } else if (w2.globals.previousPaths.length > 0) {\n      pathFrom = this.barCtx.getPreviousPath(realIndex, j, pathTo);\n    }\n    if (pathFrom == null) {\n      pathFrom = graphics.move(center, y1) + graphics.line(center, y1) + graphics.line(center, y2) + graphics.line(center, y2) + \" Z\";\n    }\n    return {\n      pathTo,\n      pathFrom,\n      // x is the right edge of the wider (top) side — used by dataLabel\n      // positioning helpers that expect a \"right\" reference.\n      x: topRightX,\n      x1: topLeftX,\n      barXPosition: center\n    };\n  }\n  /**\n   * Pre-compute the per-segment layout for a value-proportional pyramid.\n   *\n   * Each segment is a horizontal slice of a triangle whose apex sits at the\n   * top of the plot area (width = 0) and whose base spans `gridWidth` at the\n   * bottom. The vertical extent of each slice is its share of the total\n   * series value, so areas track value contribution and segments share\n   * edges (no gaps). The first data point is the apex, the last is the base.\n   *\n   * @param {any[]} seriesData - 1D array of values for a single series row\n   * @returns {{ y: number, height: number, topHalf: number, bottomHalf: number }[]}\n   */\n  computePyramidLayout(seriesData) {\n    const w2 = this.w;\n    const gridHeight = w2.layout.gridHeight;\n    const gridWidth = w2.layout.gridWidth;\n    const values = seriesData.map(\n      /** @param {any} v */\n      (v2) => Math.abs(Number(v2) || 0)\n    );\n    const total = values.reduce(\n      /** @param {number} a @param {number} b */\n      (a2, b2) => a2 + b2,\n      0\n    );\n    if (total === 0 || gridHeight <= 0) {\n      return values.map(() => ({ y: 0, height: 0, topHalf: 0, bottomHalf: 0 }));\n    }\n    const halfWidth = gridWidth / 2;\n    let cumulative = 0;\n    const layout = [];\n    for (let j = 0; j < values.length; j++) {\n      const topRatio = cumulative / total;\n      cumulative += values[j];\n      const bottomRatio = cumulative / total;\n      const topY = topRatio * gridHeight;\n      const bottomY = bottomRatio * gridHeight;\n      layout.push({\n        y: topY,\n        height: bottomY - topY,\n        topHalf: topRatio * halfWidth,\n        bottomHalf: bottomRatio * halfWidth\n      });\n    }\n    return layout;\n  }\n  /**\n   * Build a single pyramid stage path. Geometry is precomputed by\n   * `computePyramidLayout`; this method only renders that geometry into an\n   * SVG path string plus a `pathFrom` for entry/morph animations.\n   *\n   * @param {{ barYPosition: number, barHeight: number, topHalf: number, bottomHalf: number, realIndex: number, j: number, strokeWidth: number, w: any }} opts\n   */\n  getPyramidPaths({\n    barYPosition,\n    barHeight,\n    topHalf,\n    bottomHalf,\n    realIndex,\n    j,\n    strokeWidth,\n    w: w2\n  }) {\n    var _a, _b;\n    const graphics = new Graphics(this.barCtx.w);\n    const center = w2.layout.gridWidth / 2;\n    const strokeCenter = strokeWidth / 2;\n    const y1 = barYPosition + strokeCenter;\n    const y2 = barYPosition + barHeight - strokeCenter;\n    const topLeftX = center - topHalf;\n    const topRightX = center + topHalf;\n    const bottomLeftX = center - bottomHalf;\n    const bottomRightX = center + bottomHalf;\n    const pathTo = graphics.move(topLeftX, y1) + graphics.line(topRightX, y1) + graphics.line(bottomRightX, y2) + graphics.line(bottomLeftX, y2) + \" Z\";\n    let pathFrom = null;\n    const morphFrom = (_b = (_a = this.barCtx.ctx) == null ? void 0 : _a.morphTypeChange) == null ? void 0 : _b.getInitialPathFor(\n      realIndex,\n      j\n    );\n    if (morphFrom) {\n      pathFrom = morphFrom;\n    } else if (w2.globals.previousPaths.length > 0) {\n      pathFrom = this.barCtx.getPreviousPath(realIndex, j, pathTo);\n    }\n    if (pathFrom == null) {\n      pathFrom = graphics.move(center, y1) + graphics.line(center, y1) + graphics.line(center, y2) + graphics.line(center, y2) + \" Z\";\n    }\n    return {\n      pathTo,\n      pathFrom,\n      x: topRightX,\n      x1: topLeftX,\n      barXPosition: center\n    };\n  }\n  /** @param {{ barYPosition?: any, barHeight?: any, x1?: any, x2?: any, strokeWidth?: any, isReversed?: any, series?: any, seriesGroup?: any, realIndex?: any, i?: any, j?: any, w?: any }} opts */\n  getBarpaths({\n    barYPosition,\n    barHeight,\n    x1,\n    x2,\n    strokeWidth,\n    isReversed,\n    series,\n    seriesGroup,\n    realIndex,\n    i: i2,\n    j,\n    w: w2\n  }) {\n    var _a, _b, _c;\n    const graphics = new Graphics(this.barCtx.w);\n    strokeWidth = Array.isArray(strokeWidth) ? strokeWidth[realIndex] : strokeWidth;\n    if (!strokeWidth) strokeWidth = 0;\n    let bYP = barYPosition;\n    let bH = barHeight;\n    if ((_a = w2.config.series[realIndex].data[j]) == null ? void 0 : _a.barHeightOffset) {\n      bYP = barYPosition - w2.config.series[realIndex].data[j].barHeightOffset / 2;\n      bH = barHeight + w2.config.series[realIndex].data[j].barHeightOffset;\n    }\n    const strokeCenter = strokeWidth / 2;\n    const y1 = bYP + strokeCenter;\n    const y2 = bYP + bH - strokeCenter;\n    const direction = (series[i2][j] >= 0 ? 1 : -1) * (isReversed ? -1 : 1);\n    x1 += 1e-3 + strokeCenter * direction;\n    x2 += 1e-3 - strokeCenter * direction;\n    const isFunnel = this.barCtx.isFunnel;\n    const fromX = isFunnel ? (x1 + x2) / 2 : x1;\n    const sl = graphics.line(x1, y2);\n    const closing = w2.config.plotOptions.bar.borderRadiusApplication === \"around\" || this.arrBorderRadius[realIndex][j] === \"both\" ? \" Z\" : \" z\";\n    let pathTo = graphics.move(x1, y1) + graphics.line(x2, y1) + graphics.line(x2, y2) + sl + closing;\n    if (this.arrBorderRadius[realIndex][j] !== \"none\") {\n      pathTo = graphics.roundPathCorners(\n        pathTo,\n        w2.config.plotOptions.bar.borderRadius\n      );\n    }\n    let pathFrom = null;\n    const morphFrom = (_c = (_b = this.barCtx.ctx) == null ? void 0 : _b.morphTypeChange) == null ? void 0 : _c.getInitialPathFor(\n      realIndex,\n      j\n    );\n    if (morphFrom) {\n      pathFrom = morphFrom;\n    } else if (w2.globals.previousPaths.length > 0) {\n      pathFrom = this.barCtx.getPreviousPath(realIndex, j, pathTo);\n    }\n    if (pathFrom == null) {\n      const slFrom = isFunnel ? graphics.line(fromX, y2) : sl;\n      pathFrom = graphics.move(fromX, y1) + graphics.line(fromX, y1) + slFrom + slFrom + slFrom + slFrom + slFrom + graphics.line(fromX, y1) + closing;\n    }\n    if (w2.config.chart.stacked) {\n      let _ctx = this.barCtx;\n      _ctx = this.barCtx[seriesGroup];\n      _ctx.xArrj.push(x2 + strokeCenter * direction);\n      _ctx.xArrjF.push(Math.abs(x1 - x2 - strokeWidth * direction));\n      _ctx.xArrjVal.push(this.barCtx.series[i2][j]);\n    }\n    return {\n      pathTo,\n      pathFrom\n    };\n  }\n  /**\n   * @param {number} value\n   * @param {number} zeroW\n   */\n  getXForValue(value, zeroW, zeroPositionForNull = true) {\n    let xForVal = zeroPositionForNull ? zeroW : null;\n    if (typeof value !== \"undefined\" && value !== null) {\n      xForVal = zeroW + value / this.barCtx.invertedYRatio - (this.barCtx.isReversed ? value / this.barCtx.invertedYRatio : 0) * 2;\n    }\n    return xForVal;\n  }\n  /**\n   * @param {number} value\n   * @param {number} zeroH\n   * @param {number} translationsIndex\n   */\n  getYForValue(value, zeroH, translationsIndex, zeroPositionForNull = true) {\n    let yForVal = zeroPositionForNull ? zeroH : null;\n    if (typeof value !== \"undefined\" && value !== null) {\n      yForVal = zeroH - value / this.barCtx.yRatio[translationsIndex] + (this.barCtx.isReversed ? value / this.barCtx.yRatio[translationsIndex] : 0) * 2;\n    }\n    return yForVal;\n  }\n  /**\n   * @param {string} type\n   * @param {number} zeroW\n   * @param {number} zeroH\n   * @param {number} i\n   * @param {number} j\n   * @param {number} translationsIndex\n   */\n  getGoalValues(type, zeroW, zeroH, i2, j, translationsIndex) {\n    const w2 = this.w;\n    const goals = [];\n    const pushGoal = (value, attrs) => {\n      goals.push({\n        [type]: type === \"x\" ? this.getXForValue(value, zeroW, false) : this.getYForValue(value, zeroH, translationsIndex, false),\n        attrs\n      });\n    };\n    if (w2.seriesData.seriesGoals[i2] && w2.seriesData.seriesGoals[i2][j] && Array.isArray(w2.seriesData.seriesGoals[i2][j])) {\n      w2.seriesData.seriesGoals[i2][j].forEach((goal) => {\n        pushGoal(goal.value, goal);\n      });\n    }\n    if (this.barCtx.barOptions.isDumbbell && w2.rangeData.seriesRange.length) {\n      const colors = this.barCtx.barOptions.dumbbellColors ? this.barCtx.barOptions.dumbbellColors : w2.globals.colors;\n      const commonAttrs = {\n        strokeHeight: type === \"x\" ? 0 : w2.globals.markers.size[i2],\n        strokeWidth: type === \"x\" ? w2.globals.markers.size[i2] : 0,\n        strokeDashArray: 0,\n        strokeLineCap: \"round\",\n        strokeColor: Array.isArray(colors[i2]) ? colors[i2][0] : colors[i2]\n      };\n      pushGoal(w2.rangeData.seriesRangeStart[i2][j], commonAttrs);\n      pushGoal(w2.rangeData.seriesRangeEnd[i2][j], __spreadProps(__spreadValues({}, commonAttrs), {\n        strokeColor: Array.isArray(colors[i2]) ? colors[i2][1] : colors[i2]\n      }));\n    }\n    return goals;\n  }\n  /** @param {{barXPosition: any, barYPosition: any, goalX: any, goalY: any, barWidth: any, barHeight: any}} opts */\n  drawGoalLine({\n    barXPosition,\n    barYPosition,\n    goalX,\n    goalY,\n    barWidth,\n    barHeight\n  }) {\n    const hasGoals = Array.isArray(goalX) && goalX.length > 0 || Array.isArray(goalY) && goalY.length > 0;\n    if (!hasGoals) {\n      return null;\n    }\n    const graphics = new Graphics(this.barCtx.w);\n    const lineGroup = graphics.group({\n      className: \"apexcharts-bar-goals-groups\"\n    });\n    lineGroup.node.classList.add(\"apexcharts-element-hidden\");\n    this.barCtx.w.globals.delayedElements.push({\n      el: lineGroup.node\n    });\n    lineGroup.attr(\n      \"clip-path\",\n      `url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`\n    );\n    let line = null;\n    if (this.barCtx.isHorizontal) {\n      if (Array.isArray(goalX)) {\n        goalX.forEach((goal) => {\n          if (goal.x >= -1 && goal.x <= graphics.w.layout.gridWidth + 1) {\n            const sHeight = typeof goal.attrs.strokeHeight !== \"undefined\" ? goal.attrs.strokeHeight : barHeight / 2;\n            const y = barYPosition + sHeight + barHeight / 2;\n            line = graphics.drawLine(\n              goal.x,\n              y - sHeight * 2,\n              goal.x,\n              y,\n              goal.attrs.strokeColor ? goal.attrs.strokeColor : void 0,\n              goal.attrs.strokeDashArray,\n              goal.attrs.strokeWidth ? goal.attrs.strokeWidth : 2,\n              goal.attrs.strokeLineCap\n            );\n            lineGroup.add(line);\n          }\n        });\n      }\n    } else {\n      if (Array.isArray(goalY)) {\n        goalY.forEach((goal) => {\n          if (goal.y >= -1 && goal.y <= graphics.w.layout.gridHeight + 1) {\n            const sWidth = typeof goal.attrs.strokeWidth !== \"undefined\" ? goal.attrs.strokeWidth : barWidth / 2;\n            const x = barXPosition + sWidth + barWidth / 2;\n            line = graphics.drawLine(\n              x - sWidth * 2,\n              goal.y,\n              x,\n              goal.y,\n              goal.attrs.strokeColor ? goal.attrs.strokeColor : void 0,\n              goal.attrs.strokeDashArray,\n              goal.attrs.strokeHeight ? goal.attrs.strokeHeight : 2,\n              goal.attrs.strokeLineCap\n            );\n            lineGroup.add(line);\n          }\n        });\n      }\n    }\n    return lineGroup;\n  }\n  /** @param {{prevPaths: any, currPaths: any, color: any, realIndex: any, j: any}} opts */\n  drawBarShadow({ prevPaths, currPaths, color, realIndex, j }) {\n    const w2 = this.w;\n    const { x: prevX2, x1: prevX1, barYPosition: prevY1 } = prevPaths;\n    const { x: currX2, x1: currX1, barYPosition: currY1 } = currPaths;\n    const prevY2 = prevY1 + currPaths.barHeight;\n    const graphics = new Graphics(this.barCtx.w);\n    const utils = new Utils$1();\n    const shadowPath = graphics.move(prevX1, prevY2) + graphics.line(prevX2, prevY2) + graphics.line(currX2, currY1) + graphics.line(currX1, currY1) + graphics.line(prevX1, prevY2) + (w2.config.plotOptions.bar.borderRadiusApplication === \"around\" || this.arrBorderRadius[realIndex][j] === \"both\" ? \" Z\" : \" z\");\n    return graphics.drawPath({\n      d: shadowPath,\n      fill: utils.shadeColor(0.5, Utils$1.rgb2hex(color)),\n      stroke: \"none\",\n      strokeWidth: 0,\n      fillOpacity: 1,\n      classes: \"apexcharts-bar-shadow apexcharts-decoration-element\"\n    });\n  }\n  /** @param {{i: any, j: any}} opts */\n  getZeroValueEncounters({ i: i2, j }) {\n    var _a;\n    const w2 = this.w;\n    let nonZeroColumns = 0;\n    let zeroEncounters = 0;\n    const seriesIndices = w2.config.plotOptions.bar.horizontal ? w2.seriesData.series.map((_, _i) => _i) : ((_a = w2.globals.columnSeries) == null ? void 0 : _a.i.map((_i) => _i)) || [];\n    seriesIndices.forEach((_si) => {\n      const val = w2.globals.seriesPercent[_si][j];\n      if (val) {\n        nonZeroColumns++;\n      }\n      if (_si < i2 && val === 0) {\n        zeroEncounters++;\n      }\n    });\n    return {\n      nonZeroColumns,\n      zeroEncounters\n    };\n  }\n  /**\n   * Index of the series group `seriesIndex` belongs to within\n   * `w.labelData.seriesGroups`, or -1 when the chart has no groups.\n   *\n   * Unlike `getGroupIndex` this is a pure lookup: it never appends to\n   * `columnGroupIndices`, so it is safe to call from positioning/label code\n   * that must not perturb the draw order bookkeeping.\n   * @param {number} seriesIndex\n   * @returns {number}\n   */\n  getSeriesGroupIndex(seriesIndex) {\n    const w2 = this.w;\n    return w2.labelData.seriesGroups.findIndex(\n      (group) => group.indexOf(w2.seriesData.seriesNames[seriesIndex]) > -1\n    );\n  }\n  /**\n   * @param {number} seriesIndex\n   */\n  getGroupIndex(seriesIndex) {\n    const w2 = this.w;\n    const groupIndex = w2.labelData.seriesGroups.findIndex(\n      (group) => (\n        // w.config.series[i].name may be undefined, so use\n        // w.seriesData.seriesNames[i], which has default names for those\n        // series. w.labelData.seriesGroups[] uses the same default naming.\n        group.indexOf(w2.seriesData.seriesNames[seriesIndex]) > -1\n      )\n    );\n    const cGI = this.barCtx.columnGroupIndices;\n    let columnGroupIndex = cGI.indexOf(groupIndex);\n    if (columnGroupIndex < 0) {\n      cGI.push(groupIndex);\n      columnGroupIndex = cGI.length - 1;\n    }\n    return { groupIndex, columnGroupIndex };\n  }\n};\nclass Bar {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   * @param {import('../types/internal').XYRatios} xyRatios\n   */\n  constructor(w2, ctx, xyRatios) {\n    this.ctx = ctx;\n    this.w = w2;\n    this.barOptions = w2.config.plotOptions.bar;\n    this.isHorizontal = this.barOptions.horizontal;\n    this.strokeWidth = w2.config.stroke.width;\n    this.isNullValue = false;\n    this.isRangeBar = w2.rangeData.seriesRange.length && this.isHorizontal;\n    this.isVerticalGroupedRangeBar = !w2.globals.isBarHorizontal && w2.rangeData.seriesRange.length && w2.config.plotOptions.bar.rangeBarGroupRows;\n    this.isFunnel = this.barOptions.isFunnel;\n    this.isPyramid = this.barOptions.isPyramid;\n    this.pyramidLayout = null;\n    this.xyRatios = xyRatios;\n    this.xRatio = 0;\n    this.yRatio = [];\n    this.invertedXRatio = 0;\n    this.invertedYRatio = 0;\n    this.baseLineY = [];\n    this.baseLineInvertedY = 0;\n    if (this.xyRatios !== null) {\n      this.xRatio = xyRatios.xRatio;\n      this.yRatio = xyRatios.yRatio;\n      this.invertedXRatio = xyRatios.invertedXRatio;\n      this.invertedYRatio = xyRatios.invertedYRatio;\n      this.baseLineY = xyRatios.baseLineY;\n      this.baseLineInvertedY = xyRatios.baseLineInvertedY;\n    }\n    this.yaxisIndex = 0;\n    this.translationsIndex = 0;\n    this.seriesLen = 0;\n    this.pathArr = [];\n    this._prevKeyed = null;\n    this._ltCache = null;\n    this._layoutShiftCache = null;\n    this.series = [];\n    this.elSeries = null;\n    this.visibleI = 0;\n    this.isReversed = false;\n    const ser = new Series(this.w);\n    this.lastActiveBarSerieIndex = ser.getActiveConfigSeriesIndex(\"desc\", [\n      \"bar\",\n      \"column\"\n    ]);\n    this.lastActiveBarSerieIndexByGroup = ser.getActiveConfigSeriesIndexByGroup([\"bar\", \"column\"]);\n    this.columnGroupIndices = [];\n    const barSeriesIndices = ser.getBarSeriesIndices();\n    const coreUtils = new CoreUtils(this.w);\n    this.stackedSeriesTotals = coreUtils.getStackedSeriesTotals(\n      this.w.config.series.map((s2, i2) => {\n        return barSeriesIndices.indexOf(i2) === -1 ? i2 : -1;\n      }).filter((s2) => {\n        return s2 !== -1;\n      })\n    );\n    this.barHelpers = new Helpers$1(this);\n  }\n  /** primary draw method which is called on bar object\n   * @memberof Bar\n   * @param {any[]} series - user supplied series values\n   * @param {number} seriesIndex - the index by which series will be drawn on the svg\n   * @return {Element} element which is supplied to parent chart draw method for appending\n   **/\n  draw(series, seriesIndex) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const coreUtils = new CoreUtils(this.w);\n    series = coreUtils.getLogSeries(series);\n    this.series = series;\n    this.yRatio = coreUtils.getLogYRatios(this.yRatio);\n    this.barHelpers.initVariables(series);\n    const ret = graphics.group({\n      class: \"apexcharts-bar-series apexcharts-plot-series\"\n    });\n    if (w2.config.dataLabels.enabled) {\n      if (this.totalItems > this.barOptions.dataLabels.maxItems) {\n        console.warn(\n          \"WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts\"\n        );\n      }\n    }\n    for (let i2 = 0, bc = 0; i2 < series.length; i2++, bc++) {\n      let x, y;\n      const yArrj = [];\n      const xArrj = [];\n      const realIndex = w2.globals.comboCharts ? (\n        /** @type {any} */\n        seriesIndex[i2]\n      ) : i2;\n      const { columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);\n      const elSeries = graphics.group({\n        class: `apexcharts-series`,\n        rel: i2 + 1,\n        seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n        \"data:realIndex\": realIndex\n      });\n      Series.addCollapsedClassToSeries(this.w, elSeries, realIndex);\n      if (series[i2].length > 0) {\n        this.visibleI = this.visibleI + 1;\n      }\n      if (this.yRatio.length > 1) {\n        this.yaxisIndex = w2.globals.seriesYAxisReverseMap[realIndex];\n        this.translationsIndex = realIndex;\n      }\n      const translationsIndex = this.translationsIndex;\n      this.isReversed = w2.config.yaxis[this.yaxisIndex] && w2.config.yaxis[this.yaxisIndex].reversed;\n      if (this.isPyramid) {\n        this.pyramidLayout = this.barHelpers.computePyramidLayout(series[i2]);\n      }\n      const initPositions = this.barHelpers.initialPositions(realIndex);\n      const {\n        y: initY,\n        yDivision,\n        // yDivision is the GRIDHEIGHT divided by number of datapoints (bars)\n        zeroW,\n        // zeroW is the baseline where 0 meets x axis\n        x: initX,\n        xDivision,\n        // xDivision is the GRIDWIDTH divided by number of datapoints (columns)\n        zeroH\n        // zeroH is the baseline where 0 meets y axis\n      } = initPositions;\n      let barHeight = initPositions.barHeight;\n      let barWidth = initPositions.barWidth;\n      y = initY;\n      x = initX;\n      if (!this.isHorizontal) {\n        xArrj.push(x + (barWidth != null ? barWidth : 0) / 2);\n      }\n      const elDataLabelsWrap = graphics.group({\n        class: \"apexcharts-datalabels\",\n        \"data:realIndex\": realIndex\n      });\n      w2.globals.delayedElements.push({\n        el: elDataLabelsWrap.node,\n        // On a layout-changing update the labels must stay hidden through the\n        // reflow morph (the updateOptions flow otherwise reveals them at\n        // frame 0, where they float over sliding bars). When dataLabels.animate\n        // is on the labels instead RIDE the morph (see DataLabelTransition), so\n        // keep them visible: holding would hide the very motion we want to show.\n        holdUntilComplete: !((_a = w2.config.dataLabels.animate) == null ? void 0 : _a.enabled) && this.isLengthTransition(realIndex)\n      });\n      elDataLabelsWrap.node.classList.add(\"apexcharts-element-hidden\");\n      const elGoalsMarkers = graphics.group({\n        class: \"apexcharts-bar-goals-markers\"\n      });\n      const elBarShadows = graphics.group({\n        class: \"apexcharts-bar-shadows\"\n      });\n      w2.globals.delayedElements.push({\n        el: elBarShadows.node\n      });\n      elBarShadows.node.classList.add(\"apexcharts-element-hidden\");\n      for (let j = 0; j < series[i2].length; j++) {\n        const strokeWidth = this.barHelpers.getStrokeWidth(i2, j, realIndex);\n        let paths = (\n          /** @type {any} */\n          null\n        );\n        const pathsParams = {\n          indexes: {\n            i: i2,\n            j,\n            realIndex,\n            translationsIndex,\n            bc\n          },\n          x,\n          y,\n          strokeWidth,\n          elSeries\n        };\n        if (this.isHorizontal) {\n          paths = this.drawBarPaths(__spreadProps(__spreadValues({}, pathsParams), {\n            barHeight,\n            zeroW,\n            yDivision\n          }));\n          barWidth = this.series[i2][j] / this.invertedYRatio;\n        } else {\n          paths = this.drawColumnPaths(__spreadProps(__spreadValues({}, pathsParams), {\n            xDivision,\n            barWidth,\n            zeroH\n          }));\n          barHeight = this.series[i2][j] / this.yRatio[translationsIndex];\n        }\n        const pathFill = this.barHelpers.getPathFillColor(\n          series,\n          i2,\n          j,\n          realIndex\n        );\n        if (this.isFunnel && !this.isPyramid && this.barOptions.isFunnel3d && ((_b = w2.config.plotOptions.funnel) == null ? void 0 : _b.shape) !== \"trapezoid\" && this.pathArr.length && j > 0) {\n          const barShadow = this.barHelpers.drawBarShadow({\n            color: typeof pathFill.color === \"string\" && ((_c = pathFill.color) == null ? void 0 : _c.indexOf(\"url\")) === -1 ? pathFill.color : Utils$1.hexToRgba(w2.globals.colors[i2]),\n            prevPaths: this.pathArr[this.pathArr.length - 1],\n            currPaths: paths,\n            realIndex,\n            j\n          });\n          elBarShadows.add(barShadow);\n          if (w2.config.chart.dropShadow.enabled) {\n            const filters = new Filters(this.w);\n            filters.dropShadow(barShadow, w2.config.chart.dropShadow, realIndex);\n          }\n        }\n        this.pathArr.push(paths);\n        const barGoalLine = this.barHelpers.drawGoalLine({\n          barXPosition: paths.barXPosition,\n          barYPosition: paths.barYPosition,\n          goalX: paths.goalX,\n          goalY: paths.goalY,\n          barHeight,\n          barWidth\n        });\n        if (barGoalLine) {\n          elGoalsMarkers.add(barGoalLine);\n        }\n        y = paths.y;\n        x = paths.x;\n        if (j > 0) {\n          xArrj.push(x + (barWidth != null ? barWidth : 0) / 2);\n        }\n        yArrj.push(y);\n        this.renderSeries(__spreadProps(__spreadValues({\n          realIndex,\n          pathFill: pathFill.color\n        }, pathFill.useRangeColor ? { lineFill: pathFill.color } : {}), {\n          j,\n          i: i2,\n          columnGroupIndex,\n          pathFrom: paths.pathFrom,\n          pathTo: paths.pathTo,\n          strokeWidth,\n          elSeries,\n          x,\n          y,\n          series,\n          barHeight: Math.abs(paths.barHeight ? paths.barHeight : barHeight),\n          barWidth: Math.abs(paths.barWidth ? paths.barWidth : barWidth),\n          elDataLabelsWrap,\n          elGoalsMarkers,\n          elBarShadows,\n          visibleSeries: this.visibleI,\n          type: \"bar\"\n        }));\n      }\n      w2.globals.seriesXvalues[realIndex] = xArrj;\n      w2.globals.seriesYvalues[realIndex] = yArrj;\n      if (w2.globals.previousPaths.length > 0) {\n        const newKeys = [];\n        for (let j = 0; j < series[i2].length; j++) {\n          newKeys.push(datumKey(w2, realIndex, j));\n        }\n        renderBarExitGhosts({\n          w: w2,\n          elSeries,\n          record: this._prevRecord(realIndex),\n          newKeys,\n          isHorizontal: this.isHorizontal,\n          speed: w2.config.chart.animations.dynamicAnimation.speed\n        });\n      }\n      ret.add(elSeries);\n    }\n    return ret;\n  }\n  /** @param {{ realIndex?: any, pathFill?: any, lineFill?: any, j?: any, i?: any, columnGroupIndex?: any, pathFrom?: any, pathTo?: any, strokeWidth?: any, elSeries?: any, x?: any, y?: any, y1?: any, y2?: any, series?: any, barHeight?: any, barWidth?: any, barXPosition?: any, barYPosition?: any, elDataLabelsWrap?: any, elGoalsMarkers?: any, elBarShadows?: any, visibleSeries?: any, type?: any, classes?: any }} opts */\n  renderSeries({\n    realIndex,\n    pathFill,\n    lineFill,\n    j,\n    i: i2,\n    columnGroupIndex,\n    pathFrom,\n    pathTo,\n    strokeWidth,\n    elSeries,\n    x,\n    // x pos\n    y,\n    // y pos\n    y1,\n    // absolute value\n    y2,\n    // absolute value\n    series,\n    barHeight,\n    barWidth,\n    barXPosition,\n    barYPosition,\n    elDataLabelsWrap,\n    elGoalsMarkers,\n    elBarShadows,\n    visibleSeries,\n    type,\n    classes\n  }) {\n    var _a;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w, this.ctx);\n    const emit = seriesEmitter(this.ctx, graphics);\n    let skipDrawing = false;\n    if (!elSeries._bindingsDelegated) {\n      elSeries._bindingsDelegated = true;\n      graphics.setupEventDelegation(elSeries, `.apexcharts-${type}-area`);\n    }\n    if (!lineFill) {\n      let fetchColor = function(i3) {\n        const exp = w2.config.stroke.colors;\n        let c2;\n        if (Array.isArray(exp) && exp.length > 0) {\n          c2 = exp[i3];\n          if (!c2) c2 = \"\";\n          if (typeof c2 === \"function\") {\n            return c2({\n              value: w2.seriesData.series[i3][j],\n              dataPointIndex: j,\n              w: w2\n            });\n          }\n        }\n        return c2;\n      };\n      const checkAvailableColor = typeof w2.globals.stroke.colors[realIndex] === \"function\" ? fetchColor(realIndex) : w2.globals.stroke.colors[realIndex];\n      lineFill = this.barOptions.distributed ? w2.globals.stroke.colors[j] : checkAvailableColor;\n    }\n    const barDataLabels = new BarDataLabels(this);\n    const dataLabelsObj = (\n      /** @type {any} */\n      barDataLabels.handleBarDataLabels({\n        x,\n        y,\n        y1,\n        y2,\n        i: i2,\n        j,\n        series,\n        realIndex,\n        columnGroupIndex,\n        barHeight,\n        barWidth,\n        barXPosition,\n        barYPosition,\n        visibleSeries\n      })\n    );\n    if (!w2.globals.isBarHorizontal) {\n      if (dataLabelsObj.dataLabelsPos.dataLabelsX + Math.max(barWidth, w2.globals.barPadForNumericAxis) < 0 || dataLabelsObj.dataLabelsPos.dataLabelsX - Math.max(barWidth, w2.globals.barPadForNumericAxis) > w2.layout.gridWidth) {\n        skipDrawing = true;\n      }\n    }\n    if (\n      /** @type {Record<string,any>} */\n      w2.config.series[i2].data[j] && /** @type {Record<string,any>} */\n      w2.config.series[i2].data[j].strokeColor\n    ) {\n      lineFill = /** @type {Record<string,any>} */\n      w2.config.series[i2].data[j].strokeColor;\n    }\n    if (this.isNullValue) {\n      pathFill = \"none\";\n    }\n    const animCfg = w2.config.chart.animations;\n    const gradCfg = animCfg.animateGradually;\n    const staggerEnabled = gradCfg && gradCfg.enabled !== false && !(w2.globals.dataChanged && this.isLayoutShift(realIndex));\n    let delay = 0;\n    if (staggerEnabled) {\n      const totalBars = w2.globals.dataPoints || 1;\n      const configStep = gradCfg.delay || 0;\n      const baseDelayMs = Math.min(\n        configStep,\n        animCfg.speed * 0.5 / Math.max(1, totalBars)\n      );\n      let delayMs = computeStagger({\n        style: \"sequential\",\n        index: j,\n        baseDelay: baseDelayMs\n      });\n      if (w2.config.chart.stacked) {\n        delayMs += i2 * baseDelayMs * 0.5;\n      }\n      const delayFactor = configStep || 1;\n      delay = delayMs / delayFactor;\n    }\n    if (!skipDrawing) {\n      const morphActive = ((_a = this.ctx.morphTypeChange) == null ? void 0 : _a.isActive()) === true;\n      const dataChangeSpeed = morphActive ? this.ctx.morphTypeChange.getSpeed() : w2.config.chart.animations.dynamicAnimation.speed;\n      const pieceClaimed = morphActive && this.ctx.morphTypeChange.claimsTargetMark(realIndex, j);\n      if (pieceClaimed) {\n        pathFrom = pathTo;\n        delay = 0;\n      }\n      const renderedPath = (\n        /** @type {any} */\n        emit.renderPaths({\n          i: i2,\n          j,\n          realIndex,\n          pathFrom,\n          pathTo,\n          stroke: lineFill,\n          strokeWidth,\n          strokeLineCap: w2.config.stroke.lineCap,\n          fill: pathFill,\n          animationDelay: delay,\n          initialSpeed: w2.config.chart.animations.speed,\n          dataChangeSpeed,\n          // `classes` is optional: boxPlot, violin and candlestick call\n          // renderSeries without it, and interpolating it unguarded stamped a\n          // literal \"undefined\" into every one of their marks' class lists.\n          className: `apexcharts-${type}-area${classes ? ` ${classes}` : \"\"}`,\n          chartType: type,\n          bindEventsOnPaths: false\n        })\n      );\n      renderedPath.attr(\"clip-path\", `url(#gridRectBarMask${w2.globals.cuid})`);\n      if (pieceClaimed) {\n        renderedPath.node.setAttribute(\"opacity\", \"0\");\n        renderedPath.node.setAttribute(\"data-piece-hidden\", \"1\");\n      }\n      const forecast = w2.config.forecastDataPoints;\n      if (forecast.count > 0) {\n        if (j >= w2.globals.dataPoints - forecast.count) {\n          renderedPath.node.setAttribute(\"stroke-dasharray\", forecast.dashArray);\n          renderedPath.node.setAttribute(\"stroke-width\", forecast.strokeWidth);\n          renderedPath.node.setAttribute(\"fill-opacity\", forecast.fillOpacity);\n        }\n      }\n      if (typeof y1 !== \"undefined\" && typeof y2 !== \"undefined\") {\n        renderedPath.attr(\"data-range-y1\", y1);\n        renderedPath.attr(\"data-range-y2\", y2);\n      }\n      const filters = new Filters(this.w);\n      filters.setSelectionFilter(renderedPath, realIndex, j);\n      elSeries.add(renderedPath);\n      renderedPath.attr({\n        cy: dataLabelsObj.dataLabelsPos.bcy,\n        cx: dataLabelsObj.dataLabelsPos.bcx,\n        j,\n        val: w2.seriesData.series[i2][j],\n        barHeight,\n        barWidth,\n        // Datum identity for the next update's keyed join (see\n        // LengthTransition): survivors match by key, not array position.\n        \"data:pathKey\": datumKey(w2, realIndex, j)\n      });\n      if (emit.kind === \"canvas\") {\n        if (!w2.globals.barCanvasCoords) w2.globals.barCanvasCoords = {};\n        if (!w2.globals.barCanvasCoords[realIndex]) {\n          w2.globals.barCanvasCoords[realIndex] = {};\n        }\n        w2.globals.barCanvasCoords[realIndex][j] = {\n          cx: dataLabelsObj.dataLabelsPos.bcx,\n          cy: dataLabelsObj.dataLabelsPos.bcy,\n          barWidth\n        };\n      }\n      if (dataLabelsObj.dataLabels !== null) {\n        elDataLabelsWrap.add(dataLabelsObj.dataLabels);\n      }\n      if (dataLabelsObj.totalDataLabels) {\n        elDataLabelsWrap.add(dataLabelsObj.totalDataLabels);\n      }\n      elSeries.add(elDataLabelsWrap);\n      if (elGoalsMarkers) {\n        elSeries.add(elGoalsMarkers);\n      }\n      if (elBarShadows) {\n        elSeries.add(elBarShadows);\n      }\n    }\n    return elSeries;\n  }\n  /** @param {{indexes: any, barHeight: any, strokeWidth: any, zeroW: any, x: any, y: any, yDivision: any, elSeries: any}} opts */\n  drawBarPaths({\n    indexes,\n    barHeight,\n    strokeWidth,\n    zeroW,\n    x,\n    y,\n    yDivision,\n    elSeries\n  }) {\n    const w2 = this.w;\n    const i2 = indexes.i;\n    const j = indexes.j;\n    let barYPosition;\n    if (w2.axisFlags.isXNumeric) {\n      y = (w2.seriesData.seriesX[i2][j] - w2.globals.minX) / this.invertedXRatio - barHeight;\n      barYPosition = y + barHeight * this.visibleI;\n    } else {\n      if (w2.config.plotOptions.bar.hideZeroBarsWhenGrouped) {\n        const { nonZeroColumns, zeroEncounters } = this.barHelpers.getZeroValueEncounters({ i: i2, j });\n        if (nonZeroColumns > 0) {\n          barHeight = this.seriesLen * barHeight / nonZeroColumns;\n        }\n        barYPosition = y + barHeight * this.visibleI;\n        barYPosition -= barHeight * zeroEncounters;\n      } else {\n        barYPosition = y + barHeight * this.visibleI;\n      }\n    }\n    const useTrapezoid = this.isFunnel && w2.config.plotOptions.funnel.shape === \"trapezoid\";\n    const pyramidSeg = this.isPyramid && this.pyramidLayout ? this.pyramidLayout[j] : null;\n    const usePyramid = !!pyramidSeg;\n    if (pyramidSeg) {\n      barYPosition = pyramidSeg.y;\n      barHeight = pyramidSeg.height;\n    } else if (this.isFunnel && !useTrapezoid) {\n      const _zeroW = zeroW != null ? zeroW : 0;\n      zeroW = _zeroW - /** @type {number} */\n      /** @type {any} */\n      (this.barHelpers.getXForValue(\n        /** @type {any} */\n        this.series[i2][j],\n        _zeroW\n      ) - _zeroW) / 2;\n    }\n    x = this.barHelpers.getXForValue(\n      /** @type {any} */\n      this.series[i2][j],\n      zeroW != null ? zeroW : 0\n    );\n    let paths;\n    if (pyramidSeg) {\n      paths = /** @type {any} */\n      this.barHelpers.getPyramidPaths({\n        barYPosition,\n        barHeight,\n        topHalf: pyramidSeg.topHalf,\n        bottomHalf: pyramidSeg.bottomHalf,\n        realIndex: indexes.realIndex,\n        j,\n        strokeWidth,\n        w: w2\n      });\n    } else if (useTrapezoid) {\n      paths = /** @type {any} */\n      this.barHelpers.getFunnelTrapezoidPaths({\n        barYPosition,\n        barHeight,\n        series: (\n          /** @type {any} */\n          this.series\n        ),\n        i: i2,\n        j,\n        realIndex: indexes.realIndex,\n        strokeWidth,\n        w: w2\n      });\n    } else {\n      paths = /** @type {any} */\n      this.barHelpers.getBarpaths({\n        barYPosition,\n        barHeight,\n        x1: zeroW,\n        x2: x,\n        strokeWidth,\n        isReversed: this.isReversed,\n        series: this.series,\n        realIndex: indexes.realIndex,\n        i: i2,\n        j,\n        w: w2\n      });\n    }\n    if (useTrapezoid || usePyramid) {\n      zeroW = paths.x1;\n      x = paths.x;\n    }\n    if (!w2.axisFlags.isXNumeric && !usePyramid) {\n      y = y + yDivision;\n    }\n    if (usePyramid) {\n      y = barYPosition;\n    }\n    this.barHelpers.barBackground({\n      j,\n      i: i2,\n      y1: barYPosition - barHeight * this.visibleI,\n      y2: barHeight * this.seriesLen,\n      elSeries\n    });\n    return {\n      pathTo: paths.pathTo,\n      pathFrom: paths.pathFrom,\n      x1: zeroW,\n      x,\n      y,\n      goalX: this.barHelpers.getGoalValues(\n        \"x\",\n        zeroW,\n        /** @type {any} */\n        null,\n        indexes.realIndex,\n        j,\n        0\n      ),\n      barYPosition,\n      barHeight\n    };\n  }\n  /** @param {{indexes: any, x: any, y: any, xDivision: any, barWidth: any, zeroH: any, strokeWidth: any, elSeries: any}} opts */\n  drawColumnPaths({\n    indexes,\n    x,\n    y,\n    xDivision,\n    barWidth,\n    zeroH,\n    strokeWidth,\n    elSeries\n  }) {\n    const w2 = this.w;\n    const realIndex = indexes.realIndex;\n    const translationsIndex = indexes.translationsIndex;\n    const i2 = indexes.i;\n    const j = indexes.j;\n    const bc = indexes.bc;\n    let barXPosition;\n    if (w2.axisFlags.isXNumeric) {\n      const xForNumericX = this.getBarXForNumericXAxis({\n        x,\n        j,\n        realIndex,\n        barWidth\n      });\n      x = xForNumericX.x;\n      barXPosition = xForNumericX.barXPosition;\n    } else {\n      if (w2.config.plotOptions.bar.hideZeroBarsWhenGrouped) {\n        const { nonZeroColumns, zeroEncounters } = this.barHelpers.getZeroValueEncounters({ i: i2, j });\n        if (nonZeroColumns > 0) {\n          barWidth = this.seriesLen * barWidth / nonZeroColumns;\n        }\n        barXPosition = x + barWidth * this.visibleI;\n        barXPosition -= barWidth * zeroEncounters;\n      } else {\n        barXPosition = x + barWidth * this.visibleI;\n      }\n    }\n    y = this.barHelpers.getYForValue(\n      /** @type {any} */\n      this.series[i2][j],\n      zeroH,\n      translationsIndex\n    );\n    const paths = (\n      /** @type {any} */\n      this.barHelpers.getColumnPaths({\n        barXPosition,\n        barWidth,\n        y1: zeroH,\n        y2: y,\n        strokeWidth,\n        isReversed: this.isReversed,\n        series: this.series,\n        realIndex,\n        i: i2,\n        j,\n        w: w2\n      })\n    );\n    if (!w2.axisFlags.isXNumeric) {\n      x = x + xDivision;\n    }\n    this.barHelpers.barBackground({\n      bc,\n      j,\n      i: i2,\n      x1: barXPosition - strokeWidth / 2 - barWidth * this.visibleI,\n      x2: barWidth * this.seriesLen + strokeWidth / 2,\n      elSeries\n    });\n    return {\n      pathTo: paths.pathTo,\n      pathFrom: paths.pathFrom,\n      x,\n      y,\n      goalY: this.barHelpers.getGoalValues(\n        \"y\",\n        /** @type {any} */\n        null,\n        zeroH,\n        realIndex,\n        j,\n        translationsIndex\n      ),\n      barXPosition,\n      barWidth\n    };\n  }\n  /** @param {{x: any, barWidth: any, realIndex: any, j: any}} opts */\n  getBarXForNumericXAxis({ x, barWidth, realIndex, j }) {\n    const w2 = this.w;\n    let sxI = realIndex;\n    if (!w2.seriesData.seriesX[realIndex].length) {\n      sxI = w2.globals.maxValsInArrayIndex;\n    }\n    if (Utils$1.isNumber(w2.seriesData.seriesX[sxI][j])) {\n      x = AxisMapping.dataXToPx(w2, w2.seriesData.seriesX[sxI][j]) - barWidth * this.seriesLen / 2;\n    }\n    return {\n      barXPosition: x + (isHistogramOverlay(w2) ? 0 : barWidth * this.visibleI),\n      x\n    };\n  }\n  /**\n   * The captured previous-render record for a series (last match wins, same\n   * as the historical scan order).\n   *\n   * @param {number} realIndex\n   * @returns {any | null}\n   */\n  _prevRecord(realIndex) {\n    const w2 = this.w;\n    let record = null;\n    for (let pp = 0; pp < w2.globals.previousPaths.length; pp++) {\n      const gpp = w2.globals.previousPaths[pp];\n      if (gpp.paths && gpp.paths.length > 0 && parseInt(gpp.realIndex, 10) === parseInt(String(realIndex), 10)) {\n        record = gpp;\n      }\n    }\n    return record;\n  }\n  /**\n   * Previous paths of a series re-keyed by datum key (stamped as\n   * `data:pathKey` on each bar path and captured by Series.getPreviousPaths).\n   * Returns null when the previous render carries no keys (so the caller\n   * falls back to positional matching).\n   *\n   * @param {number} realIndex\n   * @returns {Map<string, {d: string}> | null}\n   */\n  _prevKeyedPaths(realIndex) {\n    if (!this._prevKeyed) this._prevKeyed = {};\n    if (this._prevKeyed[realIndex] !== void 0) {\n      return this._prevKeyed[realIndex];\n    }\n    const record = this._prevRecord(realIndex);\n    let map = null;\n    if (record && record.paths.every((p2) => p2.key != null)) {\n      const keyed = /* @__PURE__ */ new Map();\n      record.paths.forEach((p2) => {\n        keyed.set(p2.key, p2);\n      });\n      map = keyed;\n    }\n    this._prevKeyed[realIndex] = map;\n    return map;\n  }\n  /**\n   * Whether this series' update changes its datum layout (points entered,\n   * exited, or changed identity). Layout-changing updates run all survivors\n   * on one shared clock (no per-bar stagger) so the reflow reads as a single\n   * coordinated motion; pure value updates keep the stagger.\n   *\n   * @param {number} realIndex\n   * @returns {boolean}\n   */\n  isLengthTransition(realIndex) {\n    var _a, _b;\n    if (!this._ltCache) this._ltCache = {};\n    if (this._ltCache[realIndex] !== void 0) return this._ltCache[realIndex];\n    const w2 = this.w;\n    let result = false;\n    if (lengthTransitionEnabled(w2) && w2.globals.previousPaths.length > 0) {\n      const record = this._prevRecord(realIndex);\n      const dataLen = (_b = (_a = w2.seriesData.series[realIndex]) == null ? void 0 : _a.length) != null ? _b : 0;\n      if (!record) {\n        result = dataLen > 0;\n      } else if (record.paths.length !== dataLen) {\n        result = true;\n      } else {\n        const keyed = this._prevKeyedPaths(realIndex);\n        if (keyed) {\n          for (let j = 0; j < dataLen; j++) {\n            if (!keyed.has(datumKey(w2, realIndex, j))) {\n              result = true;\n              break;\n            }\n          }\n        }\n      }\n    }\n    this._ltCache[realIndex] = result;\n    return result;\n  }\n  /**\n   * Whether this update moves survivors to new slots: a length change\n   * (enter/exit, via isLengthTransition) OR a pure reorder (a \"bar chart race\"\n   * swap, same datum set in a new order). Used to drop the per-bar stagger so\n   * all bars slide on one shared clock, staying locked to the axis/data labels.\n   * Broader than isLengthTransition, which is deliberately enter/exit-only\n   * (exit ghosts / baseline enters must not fire on a plain reorder).\n   * @param {number} realIndex\n   */\n  isLayoutShift(realIndex) {\n    if (this.isLengthTransition(realIndex)) return true;\n    if (!this._layoutShiftCache) this._layoutShiftCache = {};\n    if (this._layoutShiftCache[realIndex] !== void 0) {\n      return this._layoutShiftCache[realIndex];\n    }\n    const sj = seriesJoin(this.w, realIndex, true, true);\n    const result = !!(sj && sj.join.changed);\n    this._layoutShiftCache[realIndex] = result;\n    return result;\n  }\n  /**\n   * Resolve `pathFrom` for a bar on data update, joining old and new datums\n   * by KEY (category label / x value) so survivors keep their identity across\n   * inserts, prepends, and removals. Three outcomes:\n   *\n   *  - survivor with stable shape → the previous `d` (smooth reflow morph);\n   *  - survivor whose command count changed (corner state flipped, e.g. bar\n   *    became new top-of-stack) → `pathTo` (pathFrom === pathTo, a snap);\n   *  - genuinely new datum (key absent from the previous render, or the whole\n   *    series is new) → null, telling the path builder to use its\n   *    grow-from-baseline enter path.\n   *\n   * Falls back to positional (index j) matching when the previous render\n   * carries no datum keys.\n   *\n   * @param {number} realIndex - stable series index from `data:realIndex`\n   * @param {number} j - data-point index within the series\n   * @param {string} pathTo - the freshly-built path for this bar (post-roundPathCorners)\n   * @returns {string | null}\n   **/\n  getPreviousPath(realIndex, j, pathTo) {\n    const w2 = this.w;\n    const record = this._prevRecord(realIndex);\n    if (!record) {\n      return lengthTransitionEnabled(w2) ? null : pathTo;\n    }\n    let oldD = null;\n    let isNewDatum = false;\n    const keyed = this._prevKeyedPaths(realIndex);\n    if (keyed) {\n      const prev = keyed.get(datumKey(w2, realIndex, j));\n      if (prev) {\n        oldD = prev.d;\n      } else {\n        isNewDatum = true;\n      }\n    } else if (typeof record.paths[j] !== \"undefined\") {\n      oldD = record.paths[j].d;\n    } else {\n      isNewDatum = true;\n    }\n    if (oldD && Bar.pathCommandCount(oldD) === Bar.pathCommandCount(pathTo)) {\n      return oldD;\n    }\n    if (isNewDatum && lengthTransitionEnabled(w2)) {\n      return null;\n    }\n    return pathTo;\n  }\n  /**\n   * Count SVG path commands (M, L, C, Q, Z, etc.). Used to detect whether\n   * two paths can be morphed safely — SVG.js requires matching command counts.\n   *\n   * @param {string} d\n   * @returns {number}\n   */\n  static pathCommandCount(d) {\n    if (!d) return 0;\n    const matches = d.match(/[A-Za-z]/g);\n    return matches ? matches.length : 0;\n  }\n}\nclass BarStacked extends Bar {\n  /**\n   * @param {any[]} series\n   * @param {number} seriesIndex\n   */\n  draw(series, seriesIndex) {\n    const w2 = this.w;\n    this.graphics = new Graphics(this.w);\n    this.bar = new Bar(this.w, this.ctx, this.xyRatios);\n    const coreUtils = new CoreUtils(this.w);\n    series = coreUtils.getLogSeries(series);\n    this.yRatio = coreUtils.getLogYRatios(this.yRatio);\n    this.barHelpers.initVariables(series);\n    if (w2.config.chart.stackType === \"100%\") {\n      series = w2.globals.comboCharts ? (\n        /** @type {any} */\n        seriesIndex.map(\n          (_) => w2.globals.seriesPercent[_]\n        )\n      ) : w2.globals.seriesPercent.slice();\n    }\n    this.series = series;\n    this.barHelpers.initializeStackedPrevVars(this);\n    const ret = this.graphics.group({\n      class: \"apexcharts-bar-series apexcharts-plot-series\"\n    });\n    let x = 0;\n    let y = 0;\n    for (let i2 = 0, bc = 0; i2 < series.length; i2++, bc++) {\n      const realIndex = w2.globals.comboCharts ? (\n        /** @type {any} */\n        seriesIndex[i2]\n      ) : i2;\n      const { groupIndex, columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);\n      this.groupCtx = /** @type {any} */\n      this[\n        /** @type {any} */\n        w2.labelData.seriesGroups[groupIndex]\n      ];\n      const xArrValues = [];\n      const yArrValues = [];\n      let translationsIndex = 0;\n      if (this.yRatio.length > 1) {\n        this.yaxisIndex = /** @type {any} */\n        w2.globals.seriesYAxisReverseMap[realIndex][0];\n        translationsIndex = realIndex;\n      }\n      this.isReversed = w2.config.yaxis[this.yaxisIndex] && w2.config.yaxis[this.yaxisIndex].reversed;\n      let elSeries = this.graphics.group({\n        class: `apexcharts-series`,\n        seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n        rel: i2 + 1,\n        \"data:realIndex\": realIndex\n      });\n      Series.addCollapsedClassToSeries(this.w, elSeries, realIndex);\n      const elDataLabelsWrap = this.graphics.group({\n        class: \"apexcharts-datalabels\",\n        \"data:realIndex\": realIndex\n      });\n      const elGoalsMarkers = this.graphics.group({\n        class: \"apexcharts-bar-goals-markers\"\n      });\n      const initPositions = this.initialPositions(\n        x,\n        y,\n        void 0,\n        void 0,\n        void 0,\n        void 0,\n        translationsIndex\n      );\n      const {\n        xDivision,\n        // xDivision is the GRIDWIDTH divided by number of datapoints (columns)\n        yDivision,\n        // yDivision is the GRIDHEIGHT divided by number of datapoints (bars)\n        zeroH,\n        // zeroH is the baseline where 0 meets y axis\n        zeroW\n        // zeroW is the baseline where 0 meets x axis\n      } = initPositions;\n      let barHeight = initPositions.barHeight;\n      let barWidth = initPositions.barWidth;\n      y = initPositions.y;\n      x = initPositions.x;\n      w2.globals.barHeight = barHeight;\n      w2.globals.barWidth = barWidth;\n      this.barHelpers.initializeStackedXYVars(this);\n      if (this.groupCtx.prevY.length === 1 && /**\n       * @param {number} val\n       */\n      this.groupCtx.prevY[0].every((val) => isNaN(val))) {\n        this.groupCtx.prevY[0] = this.groupCtx.prevY[0].map(() => zeroH);\n        this.groupCtx.prevYF[0] = this.groupCtx.prevYF[0].map(() => 0);\n      }\n      for (let j = 0; j < w2.globals.dataPoints; j++) {\n        const strokeWidth = this.barHelpers.getStrokeWidth(i2, j, realIndex);\n        const commonPathOpts = {\n          indexes: { i: i2, j, realIndex, translationsIndex, bc },\n          strokeWidth,\n          x,\n          y,\n          elSeries,\n          columnGroupIndex,\n          seriesGroup: w2.labelData.seriesGroups[groupIndex]\n        };\n        let paths = (\n          /** @type {any} */\n          null\n        );\n        if (this.isHorizontal) {\n          paths = this.drawStackedBarPaths(__spreadProps(__spreadValues({}, commonPathOpts), {\n            zeroW,\n            barHeight,\n            yDivision\n          }));\n          barWidth = this.series[i2][j] / this.invertedYRatio;\n        } else {\n          paths = this.drawStackedColumnPaths(__spreadProps(__spreadValues({}, commonPathOpts), {\n            xDivision,\n            barWidth,\n            zeroH\n          }));\n          barHeight = this.series[i2][j] / this.yRatio[translationsIndex];\n        }\n        const barGoalLine = this.barHelpers.drawGoalLine({\n          barXPosition: paths.barXPosition,\n          barYPosition: paths.barYPosition,\n          goalX: paths.goalX,\n          goalY: paths.goalY,\n          barHeight,\n          barWidth\n        });\n        if (barGoalLine) {\n          elGoalsMarkers.add(barGoalLine);\n        }\n        y = paths.y;\n        x = paths.x;\n        xArrValues.push(x);\n        yArrValues.push(y);\n        const pathFill = this.barHelpers.getPathFillColor(\n          series,\n          i2,\n          j,\n          realIndex\n        );\n        let classes = \"\";\n        const flipClass = w2.globals.isBarHorizontal ? \"apexcharts-flip-x\" : \"apexcharts-flip-y\";\n        if (this.barHelpers.arrBorderRadius[realIndex][j] === \"bottom\" && w2.seriesData.series[realIndex][j] > 0 || this.barHelpers.arrBorderRadius[realIndex][j] === \"top\" && w2.seriesData.series[realIndex][j] < 0) {\n          classes = flipClass;\n        }\n        elSeries = this.renderSeries(__spreadProps(__spreadValues({\n          realIndex,\n          pathFill: pathFill.color\n        }, pathFill.useRangeColor ? { lineFill: pathFill.color } : {}), {\n          j,\n          i: i2,\n          columnGroupIndex,\n          pathFrom: paths.pathFrom,\n          pathTo: paths.pathTo,\n          strokeWidth,\n          elSeries,\n          x,\n          y,\n          series,\n          barHeight,\n          barWidth,\n          elDataLabelsWrap,\n          elGoalsMarkers,\n          type: \"bar\",\n          visibleSeries: columnGroupIndex,\n          classes\n        }));\n      }\n      w2.globals.seriesXvalues[realIndex] = xArrValues;\n      w2.globals.seriesYvalues[realIndex] = yArrValues;\n      this.groupCtx.prevY.push(this.groupCtx.yArrj);\n      this.groupCtx.prevYF.push(this.groupCtx.yArrjF);\n      this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal);\n      this.groupCtx.prevX.push(this.groupCtx.xArrj);\n      this.groupCtx.prevXF.push(this.groupCtx.xArrjF);\n      this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal);\n      ret.add(elSeries);\n    }\n    return ret;\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @param {number | undefined} xDivision\n   * @param {number | undefined} yDivision\n   * @param {number | undefined} zeroH\n   * @param {number | undefined} zeroW\n   * @param {number} translationsIndex\n   */\n  initialPositions(x, y, xDivision, yDivision, zeroH, zeroW, translationsIndex) {\n    const w2 = this.w;\n    let barHeight, barWidth;\n    if (this.isHorizontal) {\n      yDivision = w2.layout.gridHeight / w2.globals.dataPoints;\n      const userBarHeight = w2.config.plotOptions.bar.barHeight;\n      if (String(userBarHeight).indexOf(\"%\") === -1) {\n        barHeight = parseInt(userBarHeight, 10);\n      } else {\n        barHeight = yDivision * parseInt(userBarHeight, 10) / 100;\n      }\n      zeroW = w2.globals.padHorizontal + (this.isReversed ? w2.layout.gridWidth - this.baseLineInvertedY : this.baseLineInvertedY);\n      y = (yDivision - barHeight) / 2;\n    } else {\n      xDivision = w2.layout.gridWidth / w2.globals.dataPoints;\n      barWidth = xDivision;\n      const userColumnWidth = w2.config.plotOptions.bar.columnWidth;\n      if (w2.axisFlags.isXNumeric && w2.globals.dataPoints > 1) {\n        xDivision = w2.globals.minXDiff / this.xRatio;\n        barWidth = xDivision * parseInt(this.barOptions.columnWidth, 10) / 100;\n      } else if (String(userColumnWidth).indexOf(\"%\") === -1) {\n        barWidth = parseInt(userColumnWidth, 10);\n      } else {\n        barWidth *= parseInt(userColumnWidth, 10) / 100;\n      }\n      if (this.isReversed) {\n        zeroH = this.baseLineY[translationsIndex];\n      } else {\n        zeroH = w2.layout.gridHeight - this.baseLineY[translationsIndex];\n      }\n      x = w2.globals.padHorizontal + (xDivision - barWidth) / 2;\n    }\n    const subDivisions = w2.globals.barGroups.length || 1;\n    return {\n      x,\n      y,\n      yDivision,\n      xDivision,\n      barHeight: (barHeight != null ? barHeight : 0) / subDivisions,\n      barWidth: (barWidth != null ? barWidth : 0) / subDivisions,\n      zeroH,\n      zeroW\n    };\n  }\n  /** @param {{indexes: any, barHeight: any, strokeWidth: any, zeroW: any, x: any, y: any, columnGroupIndex: any, seriesGroup: any, yDivision: any, elSeries: any}} opts */\n  drawStackedBarPaths({\n    indexes,\n    barHeight,\n    strokeWidth,\n    zeroW,\n    x,\n    y,\n    columnGroupIndex,\n    seriesGroup,\n    yDivision,\n    elSeries\n  }) {\n    var _a, _b, _c, _d, _e;\n    const w2 = this.w;\n    const barYPosition = y + columnGroupIndex * barHeight;\n    let barXPosition;\n    const i2 = indexes.i;\n    const j = indexes.j;\n    const realIndex = indexes.realIndex;\n    const translationsIndex = indexes.translationsIndex;\n    let prevBarW = 0;\n    for (let k = 0; k < this.groupCtx.prevXF.length; k++) {\n      prevBarW = prevBarW + this.groupCtx.prevXF[k][j];\n    }\n    let gsi = i2;\n    if (\n      /** @type {Record<string,any>} */\n      w2.config.series[realIndex].name\n    ) {\n      gsi = seriesGroup.indexOf(\n        /** @type {Record<string,any>} */\n        w2.config.series[realIndex].name\n      );\n    }\n    if (gsi > 0) {\n      let bXP = zeroW;\n      if (this.groupCtx.prevXVal[gsi - 1][j] < 0) {\n        bXP = /** @type {any} */\n        ((_a = this.series[i2]) == null ? void 0 : _a[j]) >= 0 ? this.groupCtx.prevX[gsi - 1][j] + prevBarW - (this.isReversed ? prevBarW : 0) * 2 : this.groupCtx.prevX[gsi - 1][j];\n      } else if (this.groupCtx.prevXVal[gsi - 1][j] >= 0) {\n        bXP = /** @type {any} */\n        ((_b = this.series[i2]) == null ? void 0 : _b[j]) >= 0 ? this.groupCtx.prevX[gsi - 1][j] : this.groupCtx.prevX[gsi - 1][j] - prevBarW + (this.isReversed ? prevBarW : 0) * 2;\n      }\n      barXPosition = bXP;\n    } else {\n      barXPosition = zeroW;\n    }\n    if (\n      /** @type {any} */\n      ((_c = this.series[i2]) == null ? void 0 : _c[j]) === null\n    ) {\n      x = barXPosition;\n    } else {\n      x = barXPosition + /** @type {any} */\n      ((_d = this.series[i2]) == null ? void 0 : _d[j]) / this.invertedYRatio - (this.isReversed ? (\n        /** @type {any} */\n        ((_e = this.series[i2]) == null ? void 0 : _e[j]) / this.invertedYRatio\n      ) : 0) * 2;\n    }\n    const paths = this.barHelpers.getBarpaths({\n      barYPosition,\n      barHeight,\n      x1: barXPosition,\n      x2: x,\n      strokeWidth,\n      isReversed: this.isReversed,\n      series: this.series,\n      realIndex: indexes.realIndex,\n      seriesGroup,\n      i: i2,\n      j,\n      w: w2\n    });\n    this.barHelpers.barBackground({\n      j,\n      i: i2,\n      y1: barYPosition,\n      y2: barHeight,\n      elSeries\n    });\n    y = y + yDivision;\n    return {\n      pathTo: paths.pathTo,\n      pathFrom: paths.pathFrom,\n      goalX: this.barHelpers.getGoalValues(\n        \"x\",\n        zeroW,\n        /** @type {any} */\n        null,\n        realIndex,\n        j,\n        translationsIndex\n      ),\n      barXPosition,\n      barYPosition,\n      x,\n      y\n    };\n  }\n  /** @param {{indexes: any, x: any, y: any, xDivision: any, barWidth: any, zeroH: any, columnGroupIndex: any, seriesGroup: any, elSeries: any}} opts */\n  drawStackedColumnPaths({\n    indexes,\n    x,\n    y,\n    xDivision,\n    barWidth,\n    zeroH,\n    columnGroupIndex,\n    seriesGroup,\n    elSeries\n  }) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n    const w2 = this.w;\n    const i2 = indexes.i;\n    const j = indexes.j;\n    const bc = indexes.bc;\n    const realIndex = indexes.realIndex;\n    const translationsIndex = indexes.translationsIndex;\n    if (w2.axisFlags.isXNumeric) {\n      let seriesVal = w2.seriesData.seriesX[realIndex][j];\n      if (!seriesVal) seriesVal = 0;\n      x = (seriesVal - w2.globals.minX) / this.xRatio - barWidth / 2 * w2.globals.barGroups.length;\n    }\n    const barXPosition = x + columnGroupIndex * barWidth;\n    let barYPosition;\n    let prevBarH = 0;\n    for (let k = 0; k < this.groupCtx.prevYF.length; k++) {\n      prevBarH = prevBarH + (!isNaN(this.groupCtx.prevYF[k][j]) ? this.groupCtx.prevYF[k][j] : 0);\n    }\n    let gsi = i2;\n    if (seriesGroup) {\n      gsi = seriesGroup.indexOf(w2.seriesData.seriesNames[realIndex]);\n    }\n    if (gsi > 0 && !w2.axisFlags.isXNumeric || gsi > 0 && w2.axisFlags.isXNumeric && w2.seriesData.seriesX[realIndex - 1][j] === w2.seriesData.seriesX[realIndex][j]) {\n      let bYP;\n      let prevYValue;\n      const p2 = Math.min(this.yRatio.length + 1, realIndex + 1);\n      if (this.groupCtx.prevY[gsi - 1] !== void 0 && this.groupCtx.prevY[gsi - 1].length) {\n        for (let ii = 1; ii < p2; ii++) {\n          if (!isNaN((_a = this.groupCtx.prevY[gsi - ii]) == null ? void 0 : _a[j])) {\n            prevYValue = this.groupCtx.prevY[gsi - ii][j];\n            break;\n          }\n        }\n      }\n      for (let ii = 1; ii < p2; ii++) {\n        if (((_b = this.groupCtx.prevYVal[gsi - ii]) == null ? void 0 : _b[j]) < 0) {\n          bYP = /** @type {any} */\n          ((_c = this.series[i2]) == null ? void 0 : _c[j]) >= 0 ? prevYValue - prevBarH + (this.isReversed ? prevBarH : 0) * 2 : prevYValue;\n          break;\n        } else if (((_d = this.groupCtx.prevYVal[gsi - ii]) == null ? void 0 : _d[j]) >= 0) {\n          bYP = /** @type {any} */\n          ((_e = this.series[i2]) == null ? void 0 : _e[j]) >= 0 ? prevYValue : prevYValue + prevBarH - (this.isReversed ? prevBarH : 0) * 2;\n          break;\n        }\n      }\n      if (typeof bYP === \"undefined\") bYP = w2.layout.gridHeight;\n      if (\n        /**\n         * @param {number} val\n         */\n        ((_f = this.groupCtx.prevYF[0]) == null ? void 0 : _f.every((val) => val === 0)) && this.groupCtx.prevYF.slice(1, gsi).every(\n          (arr) => arr.every((val) => isNaN(val))\n        )\n      ) {\n        barYPosition = zeroH;\n      } else {\n        barYPosition = bYP;\n      }\n    } else {\n      barYPosition = zeroH;\n    }\n    if (\n      /** @type {any} */\n      (_g = this.series[i2]) == null ? void 0 : _g[j]\n    ) {\n      y = barYPosition - /** @type {any} */\n      ((_h = this.series[i2]) == null ? void 0 : _h[j]) / this.yRatio[translationsIndex] + (this.isReversed ? (\n        /** @type {any} */\n        ((_i = this.series[i2]) == null ? void 0 : _i[j]) / this.yRatio[translationsIndex]\n      ) : 0) * 2;\n    } else {\n      y = barYPosition;\n    }\n    const paths = this.barHelpers.getColumnPaths({\n      barXPosition,\n      barWidth,\n      y1: barYPosition,\n      y2: y,\n      yRatio: this.yRatio[translationsIndex],\n      strokeWidth: this.strokeWidth,\n      isReversed: this.isReversed,\n      series: this.series,\n      seriesGroup,\n      realIndex: indexes.realIndex,\n      i: i2,\n      j,\n      w: w2\n    });\n    this.barHelpers.barBackground({\n      bc,\n      j,\n      i: i2,\n      x1: barXPosition,\n      x2: barWidth,\n      elSeries\n    });\n    return {\n      pathTo: paths.pathTo,\n      pathFrom: paths.pathFrom,\n      goalY: this.barHelpers.getGoalValues(\n        \"y\",\n        /** @type {any} */\n        null,\n        zeroH,\n        realIndex,\n        j,\n        0\n      ),\n      barXPosition,\n      x: w2.axisFlags.isXNumeric ? x : x + xDivision,\n      y\n    };\n  }\n}\nfunction buildJitterGroups({\n  w: w2,\n  points,\n  seedA,\n  seedB,\n  center,\n  halfExtent,\n  alongFn,\n  isHorizontal,\n  options: options2,\n  clampAt\n}) {\n  const opts = options2;\n  if (!opts || opts.show === false) return [];\n  if (!points || !points.length) return [];\n  const maxPoints = opts.maxPoints || 3e3;\n  const stride = points.length > maxPoints ? Math.ceil(points.length / maxPoints) : 1;\n  const r2 = opts.size != null ? opts.size : 2.5;\n  const jitterFrac = opts.jitter != null ? opts.jitter : 0.5;\n  const jitterPx = halfExtent * jitterFrac;\n  const constrain = opts.constrainToViolin !== false && typeof clampAt === \"function\";\n  const isSquare = opts.shape === \"square\";\n  const scale = opts.colorScale;\n  const useScale = scale && Array.isArray(scale.colors) && scale.colors.length > 0;\n  const steps = useScale ? Math.max(2, scale.steps || 24) : 1;\n  const sMin = useScale && scale.min != null ? scale.min : w2.globals.minY;\n  const sMax = useScale && scale.max != null ? scale.max : w2.globals.maxY;\n  const span = sMax - sMin || 1;\n  const buckets = useScale ? new Array(steps).fill(\"\") : [\"\"];\n  for (let k = 0; k < points.length; k += stride) {\n    const v2 = points[k];\n    const a2 = alongFn(v2);\n    let off = (hash01(seedA * 7919 + seedB * 100003 + k) - 0.5) * 2 * jitterPx;\n    if (constrain) {\n      const cap = (\n        /** @type {(v:number)=>number} */\n        clampAt(v2)\n      );\n      if (off > cap) off = cap;\n      if (off < -cap) off = -cap;\n    }\n    const px = isHorizontal ? a2 : center + off;\n    const py = isHorizontal ? center + off : a2;\n    const sub = isSquare ? squareSubPath(px, py, r2) : circleSubPath(px, py, r2);\n    if (useScale) {\n      let t2 = (v2 - sMin) / span;\n      if (t2 < 0) t2 = 0;\n      if (t2 > 1) t2 = 1;\n      buckets[Math.round(t2 * (steps - 1))] += sub;\n    } else {\n      buckets[0] += sub;\n    }\n  }\n  if (!useScale) {\n    return buckets[0] ? [{ fill: null, d: buckets[0] }] : [];\n  }\n  const groups = [];\n  for (let b2 = 0; b2 < steps; b2++) {\n    if (!buckets[b2]) continue;\n    groups.push({\n      fill: rampColorAt(scale.colors, b2 / (steps - 1)),\n      d: buckets[b2]\n    });\n  }\n  return groups;\n}\nfunction renderJitter({\n  graphics,\n  w: w2,\n  elSeries,\n  pointsByCat,\n  options: options2,\n  distributed,\n  realIndex,\n  wrapClass,\n  pointClass\n}) {\n  if (!options2 || options2.show === false || !pointsByCat.length) return;\n  const pOpacity = options2.opacity != null ? options2.opacity : 0.9;\n  const strokeColor = options2.strokeColor != null ? options2.strokeColor : \"#fff\";\n  const strokeW = options2.strokeWidth != null ? options2.strokeWidth : 1;\n  const willAnimateIn = w2.config.chart.animations.enabled && !w2.globals.resized && !w2.globals.dataChanged;\n  const elPointsWrap = graphics.group({\n    class: willAnimateIn ? `${wrapClass} apexcharts-element-hidden` : wrapClass\n  });\n  if (willAnimateIn) {\n    w2.globals.delayedElements.push({ el: elPointsWrap.node });\n  }\n  pointsByCat.forEach(({ groups, j }) => {\n    const catColor = distributed ? w2.globals.colors[j] : w2.globals.colors[realIndex];\n    const fc = options2.fillColor;\n    const defaultFill = fc === \"series\" ? catColor : fc === \"series-dark\" ? darkenColor(catColor, 0.45) : fc || darkenColor(catColor, 0.45);\n    groups.forEach((g2) => {\n      const elPoints = graphics.drawPath({\n        d: g2.d,\n        fill: g2.fill != null ? g2.fill : defaultFill,\n        stroke: strokeW > 0 ? strokeColor : \"none\",\n        strokeWidth: strokeW,\n        fillOpacity: pOpacity,\n        classes: pointClass\n      });\n      elPoints.attr(\"data:realIndex\", realIndex);\n      elPoints.attr(\"j\", j);\n      elPoints.attr(\"clip-path\", `url(#gridRectBarMask${w2.globals.cuid})`);\n      elPoints.node.style.pointerEvents = \"none\";\n      elPointsWrap.add(elPoints);\n    });\n  });\n  elSeries.add(elPointsWrap);\n}\nfunction darkenColor(color, amount) {\n  const rgb = Utils$1.parseHex(color);\n  if (!rgb) return color;\n  const f = Math.max(0, 1 - amount);\n  return `rgb(${Math.round(rgb[0] * f)},${Math.round(rgb[1] * f)},${Math.round(rgb[2] * f)})`;\n}\nfunction rampColorAt(colors, t2) {\n  if (!colors.length) return \"#000\";\n  if (colors.length === 1) return colors[0];\n  const x = Math.max(0, Math.min(1, t2)) * (colors.length - 1);\n  const i2 = Math.floor(x);\n  const frac = x - i2;\n  const c0 = Utils$1.parseHex(colors[i2]) || [0, 0, 0];\n  const c1 = Utils$1.parseHex(colors[Math.min(i2 + 1, colors.length - 1)]) || c0;\n  const mix = (a2, b2) => Math.round(a2 + (b2 - a2) * frac);\n  return `rgb(${mix(c0[0], c1[0])},${mix(c0[1], c1[1])},${mix(c0[2], c1[2])})`;\n}\nfunction hash01(n2) {\n  let h2 = (n2 ^ 2654435769) >>> 0;\n  h2 = Math.imul(h2 ^ h2 >>> 16, 73244475);\n  h2 = Math.imul(h2 ^ h2 >>> 16, 73244475);\n  return ((h2 ^ h2 >>> 16) >>> 0) / 4294967296;\n}\nfunction circleSubPath(px, py, r2) {\n  return `M ${px - r2} ${py} a ${r2} ${r2} 0 1 0 ${2 * r2} 0 a ${r2} ${r2} 0 1 0 ${-2 * r2} 0 `;\n}\nfunction squareSubPath(px, py, r2) {\n  return `M ${px - r2} ${py - r2} h ${2 * r2} v ${2 * r2} h ${-2 * r2} z `;\n}\nclass BoxCandleStick extends Bar {\n  /**\n   * @param {any[]} series\n   * @param {string} ctype\n   * @param {number} seriesIndex\n   */\n  // @ts-ignore -- BoxCandleStick.draw has an extra ctype param compared to Bar.draw\n  draw(series, ctype, seriesIndex) {\n    var _a;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const type = w2.globals.comboCharts ? ctype : w2.config.chart.type;\n    const fill = new Fill(this.w);\n    this.candlestickOptions = this.w.config.plotOptions.candlestick;\n    this.boxOptions = this.w.config.plotOptions.boxPlot;\n    this.isHorizontal = w2.config.plotOptions.bar.horizontal;\n    this.isOHLC = this.candlestickOptions && this.candlestickOptions.type === \"ohlc\";\n    this.coreUtils = new CoreUtils(this.w);\n    series = this.coreUtils.getLogSeries(series);\n    this.series = series;\n    this.yRatio = this.coreUtils.getLogYRatios(this.yRatio);\n    this.barHelpers.initVariables(series);\n    const ret = graphics.group({\n      class: `apexcharts-${type}-series apexcharts-plot-series`\n    });\n    for (let i2 = 0; i2 < series.length; i2++) {\n      this.isBoxPlot = w2.config.chart.type === \"boxPlot\" || /** @type {Record<string,any>} */\n      w2.config.series[i2].type === \"boxPlot\";\n      let x;\n      let y;\n      const yArrj = [];\n      const xArrj = [];\n      const realIndex = w2.globals.comboCharts ? (\n        /** @type {any} */\n        seriesIndex[i2]\n      ) : i2;\n      const { columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);\n      const elSeries = graphics.group({\n        class: `apexcharts-series`,\n        seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n        rel: i2 + 1,\n        \"data:realIndex\": realIndex\n      });\n      Series.addCollapsedClassToSeries(this.w, elSeries, realIndex);\n      if (series[i2].length > 0) {\n        this.visibleI = this.visibleI + 1;\n      }\n      let translationsIndex = 0;\n      if (this.yRatio.length > 1) {\n        this.yaxisIndex = /** @type {any} */\n        w2.globals.seriesYAxisReverseMap[realIndex][0];\n        translationsIndex = realIndex;\n      }\n      const initPositions = this.barHelpers.initialPositions(realIndex);\n      const {\n        y: initY,\n        barHeight,\n        yDivision,\n        // yDivision is the GRIDHEIGHT divided by number of datapoints (bars)\n        zeroW,\n        // zeroW is the baseline where 0 meets x axis\n        x: initX,\n        barWidth,\n        xDivision,\n        // xDivision is the GRIDWIDTH divided by number of datapoints (columns)\n        zeroH\n        // zeroH is the baseline where 0 meets y axis\n      } = initPositions;\n      y = initY;\n      x = initX;\n      xArrj.push(x + (barWidth != null ? barWidth : 0) / 2);\n      const elDataLabelsWrap = graphics.group({\n        class: \"apexcharts-datalabels\",\n        \"data:realIndex\": realIndex\n      });\n      const elGoalsMarkers = graphics.group({\n        class: \"apexcharts-bar-goals-markers\"\n      });\n      const boxPointsOpts = this.isBoxPlot ? this.boxOptions.points : null;\n      const pointsByCat = [];\n      const gridW = w2.layout.gridWidth;\n      const cullBuffer = barWidth != null ? barWidth : 0;\n      for (let j = 0; j < w2.globals.dataPoints; j++) {\n        const strokeWidth = this.barHelpers.getStrokeWidth(i2, j, realIndex);\n        let paths = (\n          /** @type {any} */\n          null\n        );\n        const pathsParams = {\n          indexes: {\n            i: i2,\n            j,\n            realIndex,\n            translationsIndex\n          },\n          x,\n          y,\n          strokeWidth,\n          elSeries\n        };\n        if (this.isHorizontal) {\n          paths = this.drawHorizontalBoxPaths(__spreadProps(__spreadValues({}, pathsParams), {\n            yDivision,\n            barHeight,\n            zeroW\n          }));\n        } else {\n          paths = this.drawVerticalBoxPaths(__spreadProps(__spreadValues({}, pathsParams), {\n            xDivision,\n            barWidth,\n            zeroH,\n            cullBounds: { lo: -cullBuffer, hi: gridW + cullBuffer }\n          }));\n        }\n        y = paths.y;\n        x = paths.x;\n        if (j > 0) {\n          xArrj.push(x + (barWidth != null ? barWidth : 0) / 2);\n        }\n        yArrj.push(y);\n        if (paths.culled) {\n          continue;\n        }\n        const barGoalLine = this.barHelpers.drawGoalLine({\n          barXPosition: paths.barXPosition,\n          barYPosition: paths.barYPosition,\n          goalX: paths.goalX,\n          goalY: paths.goalY,\n          barHeight,\n          barWidth\n        });\n        if (barGoalLine) {\n          elGoalsMarkers.add(barGoalLine);\n        }\n        paths.pathTo.forEach(\n          (pathTo, pi) => {\n            const lineFill = !this.isBoxPlot && this.candlestickOptions.wick.useFillColor ? paths.color[pi] : w2.globals.stroke.colors[i2];\n            const pathFill = fill.fillPath({\n              seriesNumber: realIndex,\n              dataPointIndex: j,\n              color: paths.color[pi],\n              value: series[i2][j]\n            });\n            this.renderSeries({\n              realIndex,\n              pathFill,\n              lineFill,\n              j,\n              i: i2,\n              pathFrom: paths.pathFrom,\n              pathTo,\n              strokeWidth,\n              elSeries,\n              x,\n              y,\n              series,\n              columnGroupIndex,\n              barHeight,\n              barWidth,\n              elDataLabelsWrap,\n              elGoalsMarkers,\n              visibleSeries: this.visibleI,\n              type: w2.config.chart.type\n            });\n          }\n        );\n        if (boxPointsOpts && boxPointsOpts.show !== false) {\n          const pts = (_a = w2.candleData.seriesBoxPoints[realIndex]) == null ? void 0 : _a[j];\n          if (pts && pts.length) {\n            const logVal = (v2) => (\n              /** @type {any} */\n              this.coreUtils.getLogValAtSeriesIndex(\n                v2,\n                realIndex\n              )\n            );\n            let center, halfExtent, alongFn;\n            if (this.isHorizontal) {\n              const yRatio = this.invertedYRatio;\n              const bh = barHeight != null ? barHeight : 0;\n              const z = zeroW != null ? zeroW : 0;\n              center = paths.barYPosition + bh / 2;\n              halfExtent = bh / 2;\n              alongFn = (v2) => z + logVal(v2) / yRatio;\n            } else {\n              const yRatio = this.yRatio[translationsIndex];\n              const bw = barWidth != null ? barWidth : 0;\n              const z = zeroH != null ? zeroH : 0;\n              center = paths.barXPosition + bw / 2;\n              halfExtent = bw / 2;\n              alongFn = (v2) => z - logVal(v2) / yRatio;\n            }\n            const groups = buildJitterGroups({\n              w: w2,\n              points: pts,\n              seedA: realIndex,\n              seedB: j,\n              center,\n              halfExtent,\n              alongFn,\n              isHorizontal: this.isHorizontal,\n              options: boxPointsOpts\n            });\n            if (groups.length) pointsByCat.push({ groups, j });\n          }\n        }\n      }\n      if (boxPointsOpts) {\n        renderJitter({\n          graphics,\n          w: w2,\n          elSeries,\n          pointsByCat,\n          options: boxPointsOpts,\n          distributed: w2.config.plotOptions.bar.distributed,\n          realIndex,\n          wrapClass: \"apexcharts-boxPlot-points-wrap\",\n          pointClass: \"apexcharts-boxPlot-points\"\n        });\n      }\n      w2.globals.seriesXvalues[realIndex] = xArrj;\n      w2.globals.seriesYvalues[realIndex] = yArrj;\n      ret.add(elSeries);\n    }\n    return ret;\n  }\n  /** @param {{indexes: any, x: any, xDivision: any, barWidth: any, zeroH: any, strokeWidth: any, cullBounds?: {lo: number, hi: number}|null}} opts */\n  drawVerticalBoxPaths({\n    indexes,\n    x,\n    xDivision,\n    barWidth,\n    zeroH,\n    strokeWidth,\n    cullBounds = null\n  }) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const i2 = indexes.i;\n    const j = indexes.j;\n    const { colors: candleColors } = w2.config.plotOptions.candlestick;\n    const { colors: boxColors } = this.boxOptions;\n    const realIndex = indexes.realIndex;\n    const getColor = (color2) => Array.isArray(color2) ? color2[realIndex] : color2;\n    const colorPos = getColor(candleColors.upward);\n    const colorNeg = getColor(candleColors.downward);\n    const yRatio = this.yRatio[indexes.translationsIndex];\n    const ohlc = this.getOHLCValue(realIndex, j);\n    let l1 = zeroH;\n    let l2 = zeroH;\n    let color = ohlc.o < ohlc.c ? [colorPos] : [colorNeg];\n    if (this.isBoxPlot) {\n      color = [getColor(boxColors.lower), getColor(boxColors.upper)];\n    }\n    let y1 = Math.min(ohlc.o, ohlc.c);\n    let y2 = Math.max(ohlc.o, ohlc.c);\n    let m2 = ohlc.m;\n    if (w2.axisFlags.isXNumeric) {\n      x = (w2.seriesData.seriesX[realIndex][j] - w2.globals.minX) / this.xRatio - barWidth / 2;\n    }\n    const barXPosition = x + barWidth * this.visibleI;\n    if (typeof /** @type {any} */\n    ((_a = this.series[i2]) == null ? void 0 : _a[j]) === \"undefined\" || /** @type {any} */\n    ((_b = this.series[i2]) == null ? void 0 : _b[j]) === null) {\n      y1 = zeroH;\n      y2 = zeroH;\n    } else {\n      y1 = zeroH - y1 / yRatio;\n      y2 = zeroH - y2 / yRatio;\n      l1 = zeroH - ohlc.h / yRatio;\n      l2 = zeroH - ohlc.l / yRatio;\n      m2 = zeroH - ohlc.m / yRatio;\n    }\n    if (cullBounds && (barXPosition + barWidth < cullBounds.lo || barXPosition > cullBounds.hi)) {\n      return {\n        pathTo: null,\n        pathFrom: null,\n        x: w2.axisFlags.isXNumeric ? x : x + xDivision,\n        y: y2,\n        barXPosition,\n        color,\n        culled: true\n      };\n    }\n    let pathTo;\n    if (this.isOHLC) {\n      const centerX = barXPosition + barWidth / 2;\n      const openY = zeroH - ohlc.o / yRatio;\n      const closeY = zeroH - ohlc.c / yRatio;\n      pathTo = [\n        graphics.move(centerX, l1) + graphics.line(centerX, l2) + graphics.move(centerX, openY) + graphics.line(barXPosition, openY) + graphics.move(centerX, closeY) + graphics.line(barXPosition + barWidth, closeY)\n      ];\n    } else if (this.isBoxPlot) {\n      pathTo = [\n        graphics.move(barXPosition, y1) + graphics.line(barXPosition + barWidth / 2, y1) + graphics.line(barXPosition + barWidth / 2, l1) + graphics.line(barXPosition + barWidth / 4, l1) + graphics.line(barXPosition + barWidth - barWidth / 4, l1) + graphics.line(barXPosition + barWidth / 2, l1) + graphics.line(barXPosition + barWidth / 2, y1) + graphics.line(barXPosition + barWidth, y1) + graphics.line(barXPosition + barWidth, m2) + graphics.line(barXPosition, m2) + graphics.line(barXPosition, y1 + strokeWidth / 2),\n        graphics.move(barXPosition, m2) + graphics.line(barXPosition + barWidth, m2) + graphics.line(barXPosition + barWidth, y2) + graphics.line(barXPosition + barWidth / 2, y2) + graphics.line(barXPosition + barWidth / 2, l2) + graphics.line(barXPosition + barWidth - barWidth / 4, l2) + graphics.line(barXPosition + barWidth / 4, l2) + graphics.line(barXPosition + barWidth / 2, l2) + graphics.line(barXPosition + barWidth / 2, y2) + graphics.line(barXPosition, y2) + graphics.line(barXPosition, m2) + \"z\"\n      ];\n    } else {\n      pathTo = [\n        graphics.move(barXPosition, y2) + graphics.line(barXPosition + barWidth / 2, y2) + graphics.line(barXPosition + barWidth / 2, l1) + graphics.line(barXPosition + barWidth / 2, y2) + graphics.line(barXPosition + barWidth, y2) + graphics.line(barXPosition + barWidth, y1) + graphics.line(barXPosition + barWidth / 2, y1) + graphics.line(barXPosition + barWidth / 2, l2) + graphics.line(barXPosition + barWidth / 2, y1) + graphics.line(barXPosition, y1) + graphics.line(barXPosition, y2 - strokeWidth / 2)\n      ];\n    }\n    let pathFrom = null;\n    const morphFrom = (_d = (_c = this.ctx) == null ? void 0 : _c.morphTypeChange) == null ? void 0 : _d.getInitialPathFor(realIndex, j);\n    if (morphFrom) {\n      pathFrom = morphFrom;\n    } else if (w2.globals.previousPaths.length > 0) {\n      pathFrom = this.getPreviousPath(realIndex, j, pathTo[0]);\n    }\n    if (pathFrom == null) {\n      pathFrom = graphics.move(barXPosition + barWidth / 2, y1) + graphics.move(barXPosition, y1);\n    }\n    if (!w2.axisFlags.isXNumeric) {\n      x = x + xDivision;\n    }\n    return {\n      pathTo,\n      pathFrom,\n      x,\n      y: y2,\n      goalY: this.barHelpers.getGoalValues(\n        \"y\",\n        /** @type {any} */\n        null,\n        zeroH,\n        realIndex,\n        j,\n        indexes.translationsIndex\n      ),\n      barXPosition,\n      color\n    };\n  }\n  /** @param {{indexes: any, y: any, yDivision: any, barHeight: any, zeroW: any, strokeWidth: any}} opts */\n  drawHorizontalBoxPaths({\n    indexes,\n    y,\n    yDivision,\n    barHeight,\n    zeroW,\n    strokeWidth\n  }) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const i2 = indexes.i;\n    const j = indexes.j;\n    const realIndex = indexes.realIndex;\n    const { colors: candleColors } = w2.config.plotOptions.candlestick;\n    const { colors: boxColors } = this.boxOptions;\n    const getColor = (color2) => Array.isArray(color2) ? color2[realIndex] : color2;\n    const yRatio = this.invertedYRatio;\n    const ohlc = this.getOHLCValue(realIndex, j);\n    let color = ohlc.o < ohlc.c ? [getColor(candleColors.upward)] : [getColor(candleColors.downward)];\n    if (this.isBoxPlot) {\n      color = [getColor(boxColors.lower), getColor(boxColors.upper)];\n    }\n    let l1 = zeroW;\n    let l2 = zeroW;\n    let x1 = Math.min(ohlc.o, ohlc.c);\n    let x2 = Math.max(ohlc.o, ohlc.c);\n    let m2 = ohlc.m;\n    if (w2.axisFlags.isXNumeric) {\n      y = (w2.seriesData.seriesX[realIndex][j] - w2.globals.minX) / this.invertedXRatio - barHeight / 2;\n    }\n    const barYPosition = y + barHeight * this.visibleI;\n    if (typeof /** @type {any} */\n    ((_a = this.series[i2]) == null ? void 0 : _a[j]) === \"undefined\" || /** @type {any} */\n    ((_b = this.series[i2]) == null ? void 0 : _b[j]) === null) {\n      x1 = zeroW;\n      x2 = zeroW;\n    } else {\n      x1 = zeroW + x1 / yRatio;\n      x2 = zeroW + x2 / yRatio;\n      l1 = zeroW + ohlc.h / yRatio;\n      l2 = zeroW + ohlc.l / yRatio;\n      m2 = zeroW + ohlc.m / yRatio;\n    }\n    const pathTo = [\n      graphics.move(x1, barYPosition) + graphics.line(x1, barYPosition + barHeight / 2) + graphics.line(l1, barYPosition + barHeight / 2) + graphics.line(l1, barYPosition + barHeight / 2 - barHeight / 4) + graphics.line(l1, barYPosition + barHeight / 2 + barHeight / 4) + graphics.line(l1, barYPosition + barHeight / 2) + graphics.line(x1, barYPosition + barHeight / 2) + graphics.line(x1, barYPosition + barHeight) + graphics.line(m2, barYPosition + barHeight) + graphics.line(m2, barYPosition) + graphics.line(x1 + strokeWidth / 2, barYPosition),\n      graphics.move(m2, barYPosition) + graphics.line(m2, barYPosition + barHeight) + graphics.line(x2, barYPosition + barHeight) + graphics.line(x2, barYPosition + barHeight / 2) + graphics.line(l2, barYPosition + barHeight / 2) + graphics.line(l2, barYPosition + barHeight - barHeight / 4) + graphics.line(l2, barYPosition + barHeight / 4) + graphics.line(l2, barYPosition + barHeight / 2) + graphics.line(x2, barYPosition + barHeight / 2) + graphics.line(x2, barYPosition) + graphics.line(m2, barYPosition) + \"z\"\n    ];\n    let pathFrom = null;\n    const morphFrom = (_d = (_c = this.ctx) == null ? void 0 : _c.morphTypeChange) == null ? void 0 : _d.getInitialPathFor(realIndex, j);\n    if (morphFrom) {\n      pathFrom = morphFrom;\n    } else if (w2.globals.previousPaths.length > 0) {\n      pathFrom = this.getPreviousPath(realIndex, j, pathTo[0]);\n    }\n    if (pathFrom == null) {\n      pathFrom = graphics.move(x1, barYPosition + barHeight / 2) + graphics.move(x1, barYPosition);\n    }\n    if (!w2.axisFlags.isXNumeric) {\n      y = y + yDivision;\n    }\n    return {\n      pathTo,\n      pathFrom,\n      x: x2,\n      y,\n      goalX: this.barHelpers.getGoalValues(\n        \"x\",\n        zeroW,\n        /** @type {any} */\n        null,\n        realIndex,\n        j,\n        0\n      ),\n      barYPosition,\n      color\n    };\n  }\n  /**\n   * @param {number} i\n   * @param {number} j\n   */\n  getOHLCValue(i2, j) {\n    const w2 = this.w;\n    const coreUtils = this.coreUtils;\n    const getCandleVal = (arr) => arr[i2] && arr[i2][j] != null ? (\n      /** @type {any} */\n      coreUtils.getLogValAtSeriesIndex(arr[i2][j], i2)\n    ) : 0;\n    const h2 = getCandleVal(w2.candleData.seriesCandleH);\n    const o2 = getCandleVal(w2.candleData.seriesCandleO);\n    const m2 = getCandleVal(w2.candleData.seriesCandleM);\n    const c2 = getCandleVal(w2.candleData.seriesCandleC);\n    const l2 = getCandleVal(w2.candleData.seriesCandleL);\n    return {\n      o: this.isBoxPlot ? h2 : o2,\n      h: this.isBoxPlot ? o2 : h2,\n      m: m2,\n      l: this.isBoxPlot ? c2 : l2,\n      c: this.isBoxPlot ? l2 : c2\n    };\n  }\n}\nconst tangents = (points) => {\n  const m2 = finiteDifferences(points);\n  const n2 = points.length - 1;\n  const ε = 1e-6;\n  const tgts = [];\n  let a2, b2, d, s2;\n  for (let i2 = 0; i2 < n2; i2++) {\n    d = slope(points[i2], points[i2 + 1]);\n    if (Math.abs(d) < ε) {\n      m2[i2] = m2[i2 + 1] = 0;\n    } else {\n      a2 = m2[i2] / d;\n      b2 = m2[i2 + 1] / d;\n      s2 = a2 * a2 + b2 * b2;\n      if (s2 > 9) {\n        s2 = d * 3 / Math.sqrt(s2);\n        m2[i2] = s2 * a2;\n        m2[i2 + 1] = s2 * b2;\n      }\n    }\n  }\n  for (let i2 = 0; i2 <= n2; i2++) {\n    s2 = (points[Math.min(n2, i2 + 1)][0] - points[Math.max(0, i2 - 1)][0]) / (6 * (1 + m2[i2] * m2[i2]));\n    tgts.push([s2 || 0, m2[i2] * s2 || 0]);\n  }\n  return tgts;\n};\nconst svgPath = (points) => {\n  let p2 = \"\";\n  for (let i2 = 0; i2 < points.length; i2++) {\n    const point = points[i2];\n    const n2 = point.length;\n    if (n2 > 4) {\n      p2 += `C${point[0]}, ${point[1]}`;\n      p2 += `, ${point[2]}, ${point[3]}`;\n      p2 += `, ${point[4]}, ${point[5]}`;\n    } else if (n2 > 2) {\n      p2 += `S${point[0]}, ${point[1]}`;\n      p2 += `, ${point[2]}, ${point[3]}`;\n    }\n  }\n  return p2;\n};\nconst spline = {\n  /**\n   * Convert 'points' to bezier\n   * @param {any[]} points\n   * @returns {any[]}\n   */\n  points(points) {\n    const tgts = tangents(points);\n    const p2 = points[1];\n    const p0 = points[0];\n    const pts = [];\n    const t2 = tgts[1];\n    const t0 = tgts[0];\n    pts.push(p0, [\n      p0[0] + t0[0],\n      p0[1] + t0[1],\n      p2[0] - t2[0],\n      p2[1] - t2[1],\n      p2[0],\n      p2[1]\n    ]);\n    for (let i2 = 2, n2 = tgts.length; i2 < n2; i2++) {\n      const p3 = points[i2];\n      const t3 = tgts[i2];\n      pts.push([p3[0] - t3[0], p3[1] - t3[1], p3[0], p3[1]]);\n    }\n    return pts;\n  },\n  /**\n   * Slice out a segment of 'points'\n   * @param {any[]} points\n   * @param {Number} start\n   * @param {Number} end\n   * @returns {any[]}\n   */\n  slice(points, start, end) {\n    const pts = points.slice(start, end);\n    if (start) {\n      if (end - start > 1 && pts[1].length < 6) {\n        const n2 = pts[0].length;\n        pts[1] = [\n          pts[0][n2 - 2] * 2 - pts[0][n2 - 4],\n          pts[0][n2 - 1] * 2 - pts[0][n2 - 3]\n        ].concat(pts[1]);\n      }\n      pts[0] = pts[0].slice(-2);\n    }\n    return pts;\n  }\n};\nfunction slope(p0, p1) {\n  return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}\nfunction finiteDifferences(points) {\n  const m2 = [];\n  let p0 = points[0];\n  let p1 = points[1];\n  let d = m2[0] = slope(p0, p1);\n  let i2 = 1;\n  for (let n2 = points.length - 1; i2 < n2; i2++) {\n    p0 = p1;\n    p1 = points[i2 + 1];\n    m2[i2] = (d + (d = slope(p0, p1))) * 0.5;\n  }\n  m2[i2] = d;\n  return m2;\n}\nclass Violin extends Bar {\n  /**\n   * @param {any[]} series\n   * @param {string} ctype\n   * @param {number} [seriesIndex]\n   */\n  // @ts-ignore -- Violin.draw has extra ctype param compared to Bar.draw\n  draw(series, ctype, seriesIndex) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const fill = new Fill(this.w);\n    this.violinOptions = w2.config.plotOptions.violin;\n    this.pointsOptions = this.violinOptions.points;\n    this.bandwidthScale = this.violinOptions.bandwidthScale || 1;\n    this.normalize = this.violinOptions.normalize || \"individual\";\n    this.distributed = w2.config.plotOptions.bar.distributed;\n    this.isHorizontal = w2.config.plotOptions.bar.horizontal;\n    this.coreUtils = new CoreUtils(this.w);\n    series = this.coreUtils.getLogSeries(series);\n    this.series = series;\n    this.yRatio = this.coreUtils.getLogYRatios(this.yRatio);\n    this.barHelpers.initVariables(series);\n    const ret = graphics.group({\n      class: \"apexcharts-violin-series apexcharts-plot-series\"\n    });\n    for (let i2 = 0; i2 < series.length; i2++) {\n      let x;\n      let y;\n      const yArrj = [];\n      const xArrj = [];\n      const realIndex = w2.globals.comboCharts ? (\n        /** @type {any} */\n        seriesIndex[i2]\n      ) : i2;\n      const { columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);\n      const elSeries = graphics.group({\n        class: \"apexcharts-series\",\n        seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n        rel: i2 + 1,\n        \"data:realIndex\": realIndex\n      });\n      Series.addCollapsedClassToSeries(this.w, elSeries, realIndex);\n      if (series[i2].length > 0) {\n        this.visibleI = this.visibleI + 1;\n      }\n      let translationsIndex = 0;\n      if (this.yRatio.length > 1) {\n        this.yaxisIndex = /** @type {any} */\n        w2.globals.seriesYAxisReverseMap[realIndex][0];\n        translationsIndex = realIndex;\n      }\n      const initPositions = this.barHelpers.initialPositions(realIndex);\n      const {\n        y: initY,\n        barHeight,\n        yDivision,\n        zeroW,\n        x: initX,\n        barWidth,\n        xDivision,\n        zeroH\n      } = initPositions;\n      y = initY;\n      x = initX;\n      xArrj.push(x + (barWidth != null ? barWidth : 0) / 2);\n      const elDataLabelsWrap = graphics.group({\n        class: \"apexcharts-datalabels\",\n        \"data:realIndex\": realIndex\n      });\n      this.seriesMaxWeight = 0;\n      if (this.normalize === \"group\") {\n        const dens = w2.violinData.seriesViolinDensity[realIndex] || [];\n        dens.forEach((d) => {\n          if (d && d.maxWeight > this.seriesMaxWeight) {\n            this.seriesMaxWeight = d.maxWeight;\n          }\n        });\n      }\n      const pointsByViolin = [];\n      for (let j = 0; j < w2.globals.dataPoints; j++) {\n        const strokeWidth = this.barHelpers.getStrokeWidth(i2, j, realIndex);\n        const paths = this.isHorizontal ? this.drawHorizontalViolin({\n          indexes: { i: i2, j, realIndex, translationsIndex },\n          y,\n          yDivision,\n          barHeight,\n          zeroW\n        }) : this.drawVerticalViolin({\n          indexes: { i: i2, j, realIndex, translationsIndex },\n          x,\n          xDivision,\n          barWidth,\n          zeroH\n        });\n        x = paths.x;\n        y = paths.y;\n        if (j > 0) {\n          xArrj.push(paths.center);\n        }\n        yArrj.push(paths.alongRepresentative);\n        const pointGroups = this.buildPointsSubPath({\n          realIndex,\n          j,\n          center: paths.center,\n          halfExtent: paths.halfExtent,\n          alongFn: paths.alongFn,\n          density: paths.density,\n          maxWeight: paths.maxWeight\n        });\n        if (pointGroups.length) pointsByViolin.push({ groups: pointGroups, j });\n        const pathFill = fill.fillPath({\n          // distributed → color per category (data point) instead of per series\n          seriesNumber: this.distributed ? j : realIndex,\n          dataPointIndex: j,\n          color: this.distributed ? w2.globals.colors[j] : void 0,\n          value: series[i2][j]\n        });\n        this.renderSeries({\n          realIndex,\n          pathFill,\n          lineFill: w2.globals.stroke.colors[realIndex],\n          j,\n          i: i2,\n          pathFrom: paths.pathFrom,\n          pathTo: paths.pathTo,\n          strokeWidth,\n          elSeries,\n          x,\n          y,\n          series,\n          columnGroupIndex,\n          barHeight,\n          barWidth,\n          elDataLabelsWrap,\n          visibleSeries: this.visibleI,\n          type: \"violin\"\n        });\n        const bodyEl = elSeries.node.querySelector(\n          `path.apexcharts-violin-area[j='${j}']`\n        );\n        if (bodyEl && isFinite(paths.alongRepresentative)) {\n          bodyEl.setAttribute(\n            this.isHorizontal ? \"cx\" : \"cy\",\n            `${paths.alongRepresentative}`\n          );\n        }\n      }\n      renderJitter({\n        graphics,\n        w: w2,\n        elSeries,\n        pointsByCat: pointsByViolin,\n        options: this.pointsOptions,\n        distributed: this.distributed,\n        realIndex,\n        wrapClass: \"apexcharts-violin-points-wrap\",\n        pointClass: \"apexcharts-violin-points\"\n      });\n      w2.globals.seriesXvalues[realIndex] = xArrj;\n      w2.globals.seriesYvalues[realIndex] = yArrj;\n      ret.add(elSeries);\n    }\n    return ret;\n  }\n  /** @param {{indexes: any, x: any, xDivision: any, barWidth: any, zeroH: any}} opts */\n  drawVerticalViolin({ indexes, x, xDivision, barWidth, zeroH }) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    const { realIndex, j, translationsIndex } = indexes;\n    const yRatio = this.yRatio[translationsIndex];\n    if (w2.axisFlags.isXNumeric) {\n      x = (w2.seriesData.seriesX[realIndex][j] - w2.globals.minX) / this.xRatio - barWidth / 2;\n    }\n    const barXPosition = x + barWidth * this.visibleI;\n    const center = barXPosition + barWidth / 2;\n    const halfExtent = barWidth / 2;\n    const density = this.getDensity(realIndex, j);\n    const maxWeight = this.effectiveMaxWeight(density);\n    const alongFn = (v2) => zeroH - this.logVal(v2, realIndex) / yRatio;\n    const pathTo = this.buildBodyPath({\n      nodes: density.nodes,\n      center,\n      halfExtent,\n      maxWeight,\n      vertical: true,\n      alongFn,\n      collapsed: false\n    });\n    let pathFrom = null;\n    const morphFrom = (_b = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange) == null ? void 0 : _b.getInitialPathFor(realIndex, j);\n    if (morphFrom) {\n      pathFrom = morphFrom;\n    } else if (w2.globals.previousPaths.length > 0) {\n      pathFrom = this.getPreviousPath(realIndex, j, pathTo);\n    }\n    if (pathFrom == null) {\n      pathFrom = this.buildBodyPath({\n        nodes: density.nodes,\n        center,\n        halfExtent,\n        maxWeight,\n        vertical: true,\n        alongFn,\n        collapsed: true\n      });\n    }\n    if (!w2.axisFlags.isXNumeric) {\n      x = x + xDivision;\n    }\n    return {\n      pathTo,\n      pathFrom,\n      x,\n      y: zeroH,\n      center,\n      halfExtent,\n      alongFn,\n      density,\n      maxWeight,\n      alongRepresentative: alongFn((_c = this.series[indexes.i][j]) != null ? _c : 0)\n    };\n  }\n  /** @param {{indexes: any, y: any, yDivision: any, barHeight: any, zeroW: any}} opts */\n  drawHorizontalViolin({ indexes, y, yDivision, barHeight, zeroW }) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    const { realIndex, j } = indexes;\n    const yRatio = this.invertedYRatio;\n    if (w2.axisFlags.isXNumeric) {\n      y = (w2.seriesData.seriesX[realIndex][j] - w2.globals.minX) / this.invertedXRatio - barHeight / 2;\n    }\n    const barYPosition = y + barHeight * this.visibleI;\n    const center = barYPosition + barHeight / 2;\n    const halfExtent = barHeight / 2;\n    const density = this.getDensity(realIndex, j);\n    const maxWeight = this.effectiveMaxWeight(density);\n    const alongFn = (v2) => zeroW + this.logVal(v2, realIndex) / yRatio;\n    const pathTo = this.buildBodyPath({\n      nodes: density.nodes,\n      center,\n      halfExtent,\n      maxWeight,\n      vertical: false,\n      alongFn,\n      collapsed: false\n    });\n    let pathFrom = null;\n    const morphFrom = (_b = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange) == null ? void 0 : _b.getInitialPathFor(realIndex, j);\n    if (morphFrom) {\n      pathFrom = morphFrom;\n    } else if (w2.globals.previousPaths.length > 0) {\n      pathFrom = this.getPreviousPath(realIndex, j, pathTo);\n    }\n    if (pathFrom == null) {\n      pathFrom = this.buildBodyPath({\n        nodes: density.nodes,\n        center,\n        halfExtent,\n        maxWeight,\n        vertical: false,\n        alongFn,\n        collapsed: true\n      });\n    }\n    if (!w2.axisFlags.isXNumeric) {\n      y = y + yDivision;\n    }\n    return {\n      pathTo,\n      pathFrom,\n      x: zeroW,\n      y,\n      center,\n      halfExtent,\n      alongFn,\n      maxWeight,\n      density,\n      alongRepresentative: alongFn((_c = this.series[indexes.i][j]) != null ? _c : 0)\n    };\n  }\n  /**\n   * Read the parsed density for one violin and return sorted, de-duplicated\n   * nodes (strictly increasing value — a hard requirement for the spline).\n   * @param {number} realIndex\n   * @param {number} j\n   */\n  getDensity(realIndex, j) {\n    var _a;\n    const w2 = this.w;\n    const d = (_a = w2.violinData.seriesViolinDensity[realIndex]) == null ? void 0 : _a[j];\n    if (!d || !d.values.length) {\n      return { nodes: [], maxWeight: 0 };\n    }\n    const order = d.values.map(\n      (_, k) => k\n    );\n    order.sort(\n      (a2, b2) => d.values[a2] - d.values[b2]\n    );\n    const nodes = [];\n    let prevV = null;\n    for (const k of order) {\n      const v2 = d.values[k];\n      if (prevV !== null && v2 === prevV) continue;\n      nodes.push({ v: v2, w: d.weights[k] });\n      prevV = v2;\n    }\n    return { nodes, maxWeight: d.maxWeight };\n  }\n  /**\n   * The peak weight used to scale a violin's width: its own ('individual') or\n   * the densest violin in the series ('group', preserving relative widths).\n   * @param {{maxWeight:number}} density\n   */\n  effectiveMaxWeight(density) {\n    return this.normalize === \"group\" && this.seriesMaxWeight > 0 ? this.seriesMaxWeight : density.maxWeight;\n  }\n  /**\n   * Build the closed, smooth violin outline. The value axis is the monotonic\n   * parameter for the spline (vertical → Y, horizontal → X); the spline is fed\n   * with that axis first and the control points swapped back to screen space.\n   *\n   * @param {{nodes:{v:number,w:number}[], center:number, halfExtent:number, maxWeight:number, vertical:boolean, alongFn:(v:number)=>number, collapsed:boolean}} opts\n   */\n  buildBodyPath({\n    nodes,\n    center,\n    halfExtent,\n    maxWeight,\n    vertical,\n    alongFn,\n    collapsed\n  }) {\n    const graphics = new Graphics(this.w);\n    if (nodes.length === 0) {\n      const a2 = alongFn(0);\n      return vertical ? graphics.move(center, a2) + graphics.line(center, a2) : graphics.move(a2, center) + graphics.line(a2, center);\n    }\n    const wpxOf = (weight) => {\n      if (collapsed || maxWeight <= 0) return 0;\n      const wp = weight / maxWeight * halfExtent * this.bandwidthScale;\n      return Math.min(halfExtent, Math.max(0, wp));\n    };\n    const rightPts = [];\n    const leftPts = [];\n    for (let k = 0; k < nodes.length; k++) {\n      const a2 = alongFn(nodes[k].v);\n      const wp = wpxOf(nodes[k].w);\n      if (vertical) {\n        rightPts.push([center + wp, a2]);\n        leftPts.push([center - wp, a2]);\n      } else {\n        rightPts.push([a2, center + wp]);\n        leftPts.push([a2, center - wp]);\n      }\n    }\n    leftPts.reverse();\n    return this.smoothSegment(rightPts, vertical, false) + this.smoothSegment(leftPts, vertical, true) + \"z\";\n  }\n  /**\n   * Emit one edge as a smooth (monotone-cubic) path segment, or a polyline\n   * when there are too few nodes for a spline.\n   *\n   * @param {[number,number][]} screenPts ordered screen points for this edge\n   * @param {boolean} monotonicIsY true when the value axis is vertical\n   * @param {boolean} continued false → start with M; true → start with L (joins the previous edge)\n   */\n  smoothSegment(screenPts, monotonicIsY, continued) {\n    const graphics = new Graphics(this.w);\n    const first = screenPts[0];\n    let d = continued ? graphics.line(first[0], first[1]) : graphics.move(first[0], first[1]);\n    const usePolyline = screenPts.length < 3 || !this.strictlyMonotonic(screenPts, monotonicIsY);\n    if (usePolyline) {\n      for (let k = 1; k < screenPts.length; k++) {\n        d += graphics.line(screenPts[k][0], screenPts[k][1]);\n      }\n      return d;\n    }\n    const input = screenPts.map(\n      ([px, py]) => monotonicIsY ? [py, px] : [px, py]\n    );\n    const bez = spline.points(input);\n    const out = monotonicIsY ? bez.map(swapPairs) : bez;\n    d += svgPath(out);\n    return d;\n  }\n  /**\n   * @param {[number,number][]} screenPts\n   * @param {boolean} monotonicIsY\n   */\n  strictlyMonotonic(screenPts, monotonicIsY) {\n    const axis = monotonicIsY ? 1 : 0;\n    for (let k = 1; k < screenPts.length; k++) {\n      if (screenPts[k][axis] === screenPts[k - 1][axis]) return false;\n    }\n    return true;\n  }\n  /**\n   * Build the jitter sub-paths for one violin, grouped for rendering. Returns\n   * `[]` when points are hidden or absent. Normally one group (single dot\n   * colour); with `points.colorScale` the dots are bucketed by value into shade\n   * groups, each carrying its ramp colour. Offsets are a deterministic index\n   * hash (SSR-safe); points beyond maxPoints are stride-thinned.\n   *\n   * @param {{realIndex:number, j:number, center:number, halfExtent:number, alongFn:(v:number)=>number, density:{nodes:{v:number,w:number}[], maxWeight:number}, maxWeight:number}} opts\n   * @returns {{fill:string|null, d:string}[]}\n   */\n  buildPointsSubPath({\n    realIndex,\n    j,\n    center,\n    halfExtent,\n    alongFn,\n    density,\n    maxWeight\n  }) {\n    var _a;\n    return buildJitterGroups({\n      w: this.w,\n      points: (_a = this.w.violinData.seriesViolinPoints[realIndex]) == null ? void 0 : _a[j],\n      seedA: realIndex,\n      seedB: j,\n      center,\n      halfExtent,\n      alongFn,\n      isHorizontal: this.isHorizontal,\n      options: this.pointsOptions,\n      // Violin clamps jitter to the density half-width at each value so dots\n      // stay inside the shape.\n      clampAt: (v2) => this.halfWidthAtValue(v2, density, halfExtent, maxWeight)\n    });\n  }\n  /**\n   * Density half-width (pixels) at a given value — used to keep jitter inside\n   * the violin. Linear interpolation between the two nearest density nodes.\n   * @param {number} value\n   * @param {{nodes:{v:number,w:number}[], maxWeight:number}} density\n   * @param {number} halfExtent\n   * @param {number} [maxWeightOverride] use the group max for 'group' normalize\n   */\n  halfWidthAtValue(value, density, halfExtent, maxWeightOverride) {\n    const { nodes } = density;\n    const maxWeight = maxWeightOverride != null ? maxWeightOverride : density.maxWeight;\n    if (!nodes.length || maxWeight <= 0) return 0;\n    const toPx = (weight) => Math.min(\n      halfExtent,\n      weight / maxWeight * halfExtent * this.bandwidthScale\n    );\n    if (value <= nodes[0].v) return toPx(nodes[0].w);\n    if (value >= nodes[nodes.length - 1].v)\n      return toPx(nodes[nodes.length - 1].w);\n    for (let k = 1; k < nodes.length; k++) {\n      if (value <= nodes[k].v) {\n        const a2 = nodes[k - 1];\n        const b2 = nodes[k];\n        const t2 = b2.v === a2.v ? 0 : (value - a2.v) / (b2.v - a2.v);\n        return toPx(a2.w + (b2.w - a2.w) * t2);\n      }\n    }\n    return 0;\n  }\n  /**\n   * Apply the y-axis log transform to a value when that axis is logarithmic,\n   * mirroring BoxCandleStick. Linear axes return the value unchanged.\n   * @param {number} value\n   * @param {number} realIndex\n   */\n  logVal(value, realIndex) {\n    return (\n      /** @type {any} */\n      this.coreUtils.getLogValAtSeriesIndex(\n        value,\n        realIndex\n      )\n    );\n  }\n}\nfunction swapPairs(arr) {\n  const out = [];\n  for (let k = 0; k < arr.length; k += 2) {\n    out.push(arr[k + 1], arr[k]);\n  }\n  return out;\n}\nclass TreemapHelpers {\n  /**\n   * @param {import('../../../types/internal').ChartStateW} w\n   * @param {import('../../../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.ctx = ctx;\n    this.w = w2;\n  }\n  checkColorRange() {\n    const w2 = this.w;\n    let negRange = false;\n    const chartOpts = w2.config.plotOptions[w2.config.chart.type];\n    if (chartOpts.colorScale.ranges.length > 0) {\n      chartOpts.colorScale.ranges.map((range) => {\n        if (range.from <= 0) {\n          negRange = true;\n        }\n      });\n    }\n    return negRange;\n  }\n  /**\n   * @param {string} chartType\n   * @param {number} i\n   * @param {number} j\n   * @param {any} negRange\n   */\n  getShadeColor(chartType, i2, j, negRange) {\n    const w2 = this.w;\n    let colorShadePercent = 1;\n    const shadeIntensity = w2.config.plotOptions[chartType].shadeIntensity;\n    const colorProps = this.determineColor(chartType, i2, j);\n    if (\n      /** @type {any} */\n      w2.globals.hasNegs || negRange\n    ) {\n      if (w2.config.plotOptions[chartType].reverseNegativeShade) {\n        if (colorProps.percent < 0) {\n          colorShadePercent = colorProps.percent / 100 * (shadeIntensity * 1.25);\n        } else {\n          colorShadePercent = (1 - colorProps.percent / 100) * (shadeIntensity * 1.25);\n        }\n      } else {\n        if (colorProps.percent <= 0) {\n          colorShadePercent = 1 - (1 + colorProps.percent / 100) * shadeIntensity;\n        } else {\n          colorShadePercent = (1 - colorProps.percent / 100) * shadeIntensity;\n        }\n      }\n    } else {\n      colorShadePercent = 1 - colorProps.percent / 100;\n      if (chartType === \"treemap\") {\n        colorShadePercent = (1 - colorProps.percent / 100) * (shadeIntensity * 1.25);\n      }\n    }\n    let color = colorProps.color;\n    const utils = new Utils$1();\n    if (w2.config.plotOptions[chartType].enableShades) {\n      if (this.w.config.theme.mode === \"dark\") {\n        const shadeColor = utils.shadeColor(\n          colorShadePercent * -1,\n          colorProps.color\n        );\n        color = Utils$1.hexToRgba(\n          Utils$1.isColorHex(shadeColor) ? shadeColor : Utils$1.rgb2hex(shadeColor),\n          w2.config.fill.opacity\n        );\n      } else {\n        const shadeColor = utils.shadeColor(colorShadePercent, colorProps.color);\n        color = Utils$1.hexToRgba(\n          Utils$1.isColorHex(shadeColor) ? shadeColor : Utils$1.rgb2hex(shadeColor),\n          w2.config.fill.opacity\n        );\n      }\n    }\n    return { color, colorProps };\n  }\n  /**\n   * @param {string} chartType\n   * @param {number} i\n   * @param {number} j\n   */\n  determineColor(chartType, i2, j) {\n    const w2 = this.w;\n    const val = w2.seriesData.series[i2][j];\n    const chartOpts = w2.config.plotOptions[chartType];\n    let seriesNumber = chartOpts.colorScale.inverse ? j : i2;\n    if (chartOpts.distributed && w2.config.chart.type === \"treemap\") {\n      seriesNumber = j;\n    }\n    let color = w2.globals.colors[seriesNumber];\n    let foreColor = null;\n    let min;\n    let max;\n    if (!chartOpts.distributed && chartType === \"heatmap\") {\n      min = w2.globals.minY;\n      max = w2.globals.maxY;\n    } else {\n      const row = w2.seriesData.series[i2];\n      min = row.length ? row[0] : 0;\n      max = min;\n      for (let k = 1; k < row.length; k++) {\n        if (row[k] < min) min = row[k];\n        if (row[k] > max) max = row[k];\n      }\n    }\n    if (typeof chartOpts.colorScale.min !== \"undefined\") {\n      min = chartOpts.colorScale.min < w2.globals.minY ? chartOpts.colorScale.min : w2.globals.minY;\n      max = chartOpts.colorScale.max > w2.globals.maxY ? chartOpts.colorScale.max : w2.globals.maxY;\n    }\n    const total = Math.abs(max) + Math.abs(min);\n    let percent = total === 0 ? 0 : 100 * val / total;\n    if (chartOpts.colorScale.ranges.length > 0) {\n      const colorRange = chartOpts.colorScale.ranges;\n      colorRange.map((range) => {\n        if (val >= range.from && val <= range.to) {\n          color = range.color;\n          foreColor = range.foreColor ? range.foreColor : null;\n          min = range.from;\n          max = range.to;\n          const rTotal = Math.abs(max) + Math.abs(min);\n          percent = rTotal === 0 ? 0 : 100 * val / rTotal;\n        }\n      });\n    }\n    return {\n      color,\n      foreColor,\n      percent\n    };\n  }\n  /** @param {{ text?: any, x?: any, y?: any, i?: any, j?: any, colorProps?: any, fontSize?: any, series?: any }} opts */\n  calculateDataLabels({ text, x, y, i: i2, j, colorProps, fontSize }) {\n    const w2 = this.w;\n    const dataLabelsConfig = w2.config.dataLabels;\n    const graphics = new Graphics(this.w);\n    const dataLabels = new DataLabels(this.w, this.ctx);\n    let elDataLabelsWrap = null;\n    if (dataLabelsConfig.enabled) {\n      elDataLabelsWrap = graphics.group({\n        class: \"apexcharts-data-labels\"\n      });\n      const offX = resolveDataLabelOffset(dataLabelsConfig.offsetX, w2, i2, j);\n      const offY = resolveDataLabelOffset(dataLabelsConfig.offsetY, w2, i2, j);\n      const dataLabelsX = x + offX;\n      const dataLabelsY = y + parseFloat(dataLabelsConfig.style.fontSize) / 3 + offY;\n      dataLabels.plotDataLabelsText({\n        x: dataLabelsX,\n        y: dataLabelsY,\n        text,\n        i: i2,\n        j,\n        color: colorProps.foreColor,\n        parent: elDataLabelsWrap,\n        fontSize,\n        dataLabelsConfig\n      });\n    }\n    return elDataLabelsWrap;\n  }\n}\nclass HeatMap {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   * @param {import('../types/internal').XYRatios} xyRatios\n   */\n  constructor(w2, ctx, xyRatios) {\n    this.ctx = ctx;\n    this.w = w2;\n    this.xRatio = xyRatios.xRatio;\n    this.yRatio = xyRatios.yRatio;\n    this.dynamicAnim = this.w.config.chart.animations.dynamicAnimation;\n    this.helpers = new TreemapHelpers(w2, ctx);\n    this.rectRadius = this.w.config.plotOptions.heatmap.radius;\n    this.strokeWidth = this.w.config.stroke.show ? this.w.config.stroke.width : 0;\n  }\n  /**\n   * @param {any[]} series\n   */\n  draw(series) {\n    var _a, _b;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w, this.ctx);\n    const emit = seriesEmitter(this.ctx, graphics);\n    const useCanvas = emit !== graphics && typeof emit.drawRectCell === \"function\";\n    const ret = graphics.group({\n      class: \"apexcharts-heatmap\"\n    });\n    ret.attr(\"clip-path\", `url(#gridRectMask${w2.globals.cuid})`);\n    const xDivision = w2.layout.gridWidth / w2.globals.dataPoints;\n    const yDivision = w2.layout.gridHeight / w2.seriesData.series.length;\n    const isContinuousX = (w2.config.xaxis.type === \"numeric\" || w2.config.xaxis.type === \"datetime\") && w2.axisFlags.isXNumeric && this.xRatio > 0;\n    let binPx = xDivision;\n    if (isContinuousX) {\n      const diff = w2.globals.minXDiff;\n      binPx = Number.isFinite(diff) && diff > 0 ? diff / this.xRatio : xDivision;\n    }\n    const cellFillOpacity = Array.isArray(w2.config.fill.opacity) ? (_a = w2.config.fill.opacity[0]) != null ? _a : 1 : (_b = w2.config.fill.opacity) != null ? _b : 1;\n    let y1 = 0;\n    let rev = false;\n    this.negRange = this.helpers.checkColorRange();\n    const heatSeries = series.slice();\n    if (w2.config.yaxis[0].reversed) {\n      rev = true;\n      heatSeries.reverse();\n    }\n    for (let i2 = rev ? 0 : heatSeries.length - 1; rev ? i2 < heatSeries.length : i2 >= 0; rev ? i2++ : i2--) {\n      const elSeries = graphics.group({\n        class: `apexcharts-series apexcharts-heatmap-series`,\n        seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[i2]),\n        rel: i2 + 1,\n        \"data:realIndex\": i2\n      });\n      Series.addCollapsedClassToSeries(this.w, elSeries, i2);\n      if (!useCanvas) {\n        graphics.setupEventDelegation(elSeries, \".apexcharts-heatmap-rect\");\n      }\n      if (w2.config.chart.dropShadow.enabled) {\n        const shadow = w2.config.chart.dropShadow;\n        const filters = new Filters(this.w);\n        filters.dropShadow(elSeries, shadow, i2);\n      }\n      let x1 = 0;\n      const shadeIntensity = w2.config.plotOptions.heatmap.shadeIntensity;\n      let j = 0;\n      for (let dIndex = 0; dIndex < w2.globals.dataPoints; dIndex++) {\n        if (!isContinuousX && w2.seriesData.seriesX.length && !w2.globals.allSeriesHasEqualX) {\n          if (w2.globals.minX + w2.globals.minXDiff * dIndex < w2.seriesData.seriesX[i2][j]) {\n            x1 = x1 + xDivision;\n            continue;\n          }\n        }\n        if (j >= heatSeries[i2].length) break;\n        const cellW = isContinuousX ? binPx : xDivision;\n        if (isContinuousX) {\n          const xVal = w2.seriesData.seriesX[i2] ? w2.seriesData.seriesX[i2][j] : null;\n          if (xVal == null || xVal !== xVal) {\n            j++;\n            continue;\n          }\n          x1 = (xVal - w2.globals.minX) / this.xRatio - binPx / 2;\n        }\n        const heatColor = this.helpers.getShadeColor(\n          w2.config.chart.type,\n          i2,\n          j,\n          this.negRange\n        );\n        let color = heatColor.color;\n        const heatColorProps = heatColor.colorProps;\n        if (w2.config.fill.type === \"image\") {\n          const fill = new Fill(this.w);\n          color = fill.fillPath({\n            seriesNumber: i2,\n            dataPointIndex: j,\n            opacity: (\n              /** @type {any} */\n              w2.globals.hasNegs ? heatColorProps.percent < 0 ? 1 - (1 + heatColorProps.percent / 100) : shadeIntensity + heatColorProps.percent / 100 : heatColorProps.percent / 100\n            ),\n            patternID: Utils$1.randomId(),\n            width: w2.config.fill.image.width ? w2.config.fill.image.width : cellW,\n            height: w2.config.fill.image.height ? w2.config.fill.image.height : yDivision\n          });\n        }\n        const radius = this.rectRadius;\n        const stroke = w2.config.plotOptions.heatmap.useFillColorAsStroke ? color : w2.globals.stroke.colors[0];\n        if (useCanvas) {\n          emit.drawRectCell(x1, y1, cellW, yDivision, {\n            fill: color,\n            fillOpacity: cellFillOpacity,\n            stroke,\n            strokeWidth: this.strokeWidth,\n            radius,\n            seriesIndex: i2,\n            dataPointIndex: j\n          });\n        } else {\n          const rect = graphics.drawRect(x1, y1, cellW, yDivision, radius);\n          rect.attr({\n            cx: x1,\n            cy: y1\n          });\n          rect.node.classList.add(\"apexcharts-heatmap-rect\");\n          elSeries.add(rect);\n          rect.attr({\n            fill: color,\n            i: i2,\n            index: i2,\n            j,\n            val: series[i2][j],\n            \"stroke-width\": this.strokeWidth,\n            stroke,\n            color\n          });\n          if (w2.config.chart.animations.enabled && !w2.globals.dataChanged) {\n            let speed = 1;\n            if (!w2.globals.resized) {\n              speed = w2.config.chart.animations.speed;\n            }\n            this.animateHeatMap(rect, x1, y1, cellW, yDivision, speed, i2, j);\n          }\n          if (w2.globals.dataChanged) {\n            let speed = 1;\n            if (this.dynamicAnim.enabled && w2.globals.shouldAnimate) {\n              speed = this.dynamicAnim.speed;\n              let colorFrom = w2.globals.previousPaths[i2] && w2.globals.previousPaths[i2][j] && w2.globals.previousPaths[i2][j].color;\n              if (!colorFrom) colorFrom = \"rgba(255, 255, 255, 0)\";\n              this.animateHeatColor(\n                rect,\n                Utils$1.isColorHex(colorFrom) ? colorFrom : Utils$1.rgb2hex(colorFrom),\n                Utils$1.isColorHex(color) ? color : Utils$1.rgb2hex(color),\n                speed\n              );\n            }\n          }\n        }\n        const formatter = w2.config.dataLabels.formatter;\n        const formattedText = formatter(w2.seriesData.series[i2][j], {\n          value: w2.seriesData.series[i2][j],\n          seriesIndex: i2,\n          dataPointIndex: j,\n          w: w2\n        });\n        const dataLabels = this.helpers.calculateDataLabels({\n          text: formattedText,\n          x: x1 + cellW / 2,\n          y: y1 + yDivision / 2,\n          i: i2,\n          j,\n          colorProps: heatColorProps,\n          series: heatSeries\n        });\n        if (dataLabels !== null) {\n          elSeries.add(dataLabels);\n        }\n        if (!isContinuousX) x1 = x1 + xDivision;\n        j++;\n      }\n      y1 = y1 + yDivision;\n      ret.add(elSeries);\n    }\n    const yAxisScale = (\n      /** @type {any[]} */\n      w2.globals.yAxisScale[0].result.slice()\n    );\n    if (w2.config.yaxis[0].reversed) {\n      yAxisScale.unshift(\"\");\n    } else {\n      yAxisScale.push(\"\");\n    }\n    w2.globals.yAxisScale[0].result = yAxisScale;\n    return ret;\n  }\n  /**\n   * @param {any} el\n   * @param {number} x\n   * @param {number} y\n   * @param {number} width\n   * @param {number} height\n   * @param {number} speed\n   * @param {number} [row] - series index (heatmap row)\n   * @param {number} [col] - data point index (heatmap column)\n   */\n  animateHeatMap(el, x, y, width, height, speed, row = 0, col = 0) {\n    const w2 = this.w;\n    const animations = new Animations(this.w);\n    const animCfg = w2.config.chart.animations;\n    const gradCfg = animCfg.animateGradually;\n    const staggerEnabled = gradCfg && gradCfg.enabled !== false;\n    let delay = 0;\n    if (staggerEnabled) {\n      const seriesCount = (w2.seriesData.series || []).length || 1;\n      const pointsCount = w2.globals.dataPoints || 1;\n      const maxDiag = seriesCount + pointsCount - 2;\n      const baseDelay = Math.min(\n        gradCfg.delay || 0,\n        speed * 0.5 / Math.max(1, maxDiag)\n      );\n      delay = computeStagger({\n        style: \"diagonal\",\n        index: col,\n        row,\n        col,\n        baseDelay\n      });\n    }\n    animations.animateRect(\n      el,\n      {\n        x: x + width / 2,\n        y: y + height / 2,\n        width: 0,\n        height: 0\n      },\n      {\n        x,\n        y,\n        width,\n        height\n      },\n      speed,\n      () => {\n        animations.animationCompleted(el);\n      },\n      delay\n    );\n  }\n  /**\n   * @param {any} el\n   * @param {string} colorFrom\n   * @param {string} colorTo\n   * @param {number} speed\n   */\n  animateHeatColor(el, colorFrom, colorTo, speed) {\n    el.attr({\n      fill: colorFrom\n    }).animate(speed).attr({\n      fill: colorTo\n    });\n  }\n}\nclass Helpers5 {\n  /**\n   * @param {import('../../../charts/Line').default} lineCtx\n   */\n  constructor(lineCtx) {\n    this.w = lineCtx.w;\n    this.lineCtx = lineCtx;\n  }\n  /**\n   * @param {number} i\n   * @param {any[]} series\n   */\n  sameValueSeriesFix(i2, series) {\n    const w2 = this.w;\n    if (w2.config.fill.type === \"gradient\" || w2.config.fill.type[i2] === \"gradient\") {\n      const coreUtils = new CoreUtils(this.lineCtx.w);\n      if (coreUtils.seriesHaveSameValues(i2)) {\n        const gSeries = series[i2].slice();\n        gSeries[gSeries.length - 1] = gSeries[gSeries.length - 1] + 1e-6;\n        series[i2] = gSeries;\n      }\n    }\n    return series;\n  }\n  /** @param {{series: any, realIndex: any, x: any, y: any, i: any, j: any, prevY: any}} opts */\n  calculatePoints({ series, realIndex, x, y, i: i2, j, prevY }) {\n    const w2 = this.w;\n    const ptX = [];\n    const ptY = [];\n    let xPT1st = this.lineCtx.categoryAxisCorrection + w2.config.markers.offsetX;\n    if (w2.axisFlags.isXNumeric) {\n      xPT1st = (w2.seriesData.seriesX[realIndex][0] - w2.globals.minX) / this.lineCtx.xRatio + w2.config.markers.offsetX;\n    }\n    if (j === 0) {\n      ptX.push(xPT1st);\n      ptY.push(\n        Utils$1.isNumber(series[i2][0]) ? prevY + w2.config.markers.offsetY : null\n      );\n    }\n    ptX.push(x + w2.config.markers.offsetX);\n    ptY.push(\n      Utils$1.isNumber(series[i2][j + 1]) ? y + w2.config.markers.offsetY : null\n    );\n    return {\n      x: ptX,\n      y: ptY\n    };\n  }\n  /** @param {{pathFromLine: any, pathFromArea: any, realIndex: any}} opts */\n  checkPreviousPaths({ pathFromLine, pathFromArea, realIndex }) {\n    const w2 = this.w;\n    for (let pp = 0; pp < w2.globals.previousPaths.length; pp++) {\n      const gpp = w2.globals.previousPaths[pp];\n      if ((gpp.type === \"line\" || gpp.type === \"area\") && gpp.paths.length > 0 && parseInt(gpp.realIndex, 10) === parseInt(realIndex, 10)) {\n        if (gpp.type === \"line\") {\n          this.lineCtx.appendPathFrom = false;\n          pathFromLine = w2.globals.previousPaths[pp].paths[0].d;\n        } else if (gpp.type === \"area\") {\n          this.lineCtx.appendPathFrom = false;\n          pathFromArea = w2.globals.previousPaths[pp].paths[0].d;\n          if (w2.config.stroke.show && w2.globals.previousPaths[pp].paths[1]) {\n            pathFromLine = w2.globals.previousPaths[pp].paths[1].d;\n          }\n        }\n      }\n    }\n    return {\n      pathFromLine,\n      pathFromArea\n    };\n  }\n  /** @param {{i: any, realIndex: any, series: any, prevY: any, lineYPosition: any, translationsIndex: any}} opts */\n  determineFirstPrevY({\n    i: i2,\n    realIndex,\n    series,\n    prevY,\n    lineYPosition,\n    translationsIndex\n  }) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    const stackSeries = w2.config.chart.stacked && !w2.globals.comboCharts || w2.config.chart.stacked && w2.globals.comboCharts && (!this.w.config.chart.stackOnlyBar || /** @type {any} */\n    ((_a = this.w.config.series[realIndex]) == null ? void 0 : _a.type) === \"bar\" || /** @type {any} */\n    ((_b = this.w.config.series[realIndex]) == null ? void 0 : _b.type) === \"column\");\n    if (typeof ((_c = series[i2]) == null ? void 0 : _c[0]) !== \"undefined\") {\n      if (stackSeries) {\n        if (i2 > 0) {\n          lineYPosition = this.lineCtx.prevSeriesY[i2 - 1][0];\n        } else {\n          lineYPosition = this.lineCtx.zeroY;\n        }\n      } else {\n        lineYPosition = this.lineCtx.zeroY;\n      }\n      prevY = lineYPosition - series[i2][0] / this.lineCtx.yRatio[translationsIndex] + (this.lineCtx.isReversed ? series[i2][0] / this.lineCtx.yRatio[translationsIndex] : 0) * 2;\n    } else {\n      if (stackSeries && i2 > 0 && typeof series[i2][0] === \"undefined\") {\n        for (let s2 = i2 - 1; s2 >= 0; s2--) {\n          if (series[s2][0] !== null && typeof series[s2][0] !== \"undefined\") {\n            lineYPosition = this.lineCtx.prevSeriesY[s2][0];\n            prevY = lineYPosition;\n            break;\n          }\n        }\n      }\n    }\n    return {\n      prevY,\n      lineYPosition\n    };\n  }\n}\nclass Line {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   * @param {import('../types/internal').XYRatios} xyRatios\n   * @param {boolean} isPointsChart\n   */\n  constructor(w2, ctx, xyRatios, isPointsChart) {\n    this.ctx = ctx;\n    this.w = w2;\n    this.xyRatios = xyRatios;\n    this.xRatio = 0;\n    this.yRatio = [];\n    this.zRatio = 0;\n    this.baseLineY = [];\n    this.pointsChart = !(this.w.config.chart.type !== \"bubble\" && this.w.config.chart.type !== \"scatter\") || isPointsChart;\n    this.scatter = new Scatter(this.w, this.ctx);\n    this.noNegatives = this.w.globals.minX === Number.MAX_VALUE;\n    this.lineHelpers = new Helpers5(this);\n    this.markers = new Markers(this.w, this.ctx);\n    this.prevSeriesY = [];\n    this.categoryAxisCorrection = 0;\n    this.yaxisIndex = 0;\n    this.xDivision = 0;\n    this.zeroY = 0;\n    this.areaBottomY = 0;\n    this.strokeWidth = 0;\n    this.isReversed = false;\n    this.appendPathFrom = false;\n    this.elSeries = null;\n    this.elPointsMain = null;\n    this.elDataLabelsWrap = null;\n    this._elLastPointsWrap = null;\n  }\n  /**\n   * @param {any[]} series\n   * @param {string} ctype\n   * @param {number} seriesIndex\n   * @param {any} seriesRangeEnd\n   */\n  draw(series, ctype, seriesIndex, seriesRangeEnd) {\n    var _a;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const type = w2.globals.comboCharts ? ctype : w2.config.chart.type;\n    const ret = graphics.group({\n      class: `apexcharts-${type}-series apexcharts-plot-series`\n    });\n    const coreUtils = new CoreUtils(this.w);\n    this.yRatio = this.xyRatios.yRatio;\n    this.zRatio = this.xyRatios.zRatio;\n    this.xRatio = this.xyRatios.xRatio;\n    this.baseLineY = this.xyRatios.baseLineY;\n    series = coreUtils.getLogSeries(series);\n    this.yRatio = coreUtils.getLogYRatios(this.yRatio);\n    this.prevSeriesY = [];\n    const allSeries = [];\n    for (let i2 = 0; i2 < series.length; i2++) {\n      series = this.lineHelpers.sameValueSeriesFix(i2, series);\n      const realIndex = w2.globals.comboCharts ? (\n        /** @type {any} */\n        seriesIndex[i2]\n      ) : i2;\n      const translationsIndex = this.yRatio.length > 1 ? realIndex : 0;\n      this._initSerieVariables(series, i2, realIndex);\n      const yArrj = [];\n      const y2Arrj = [];\n      const xArrj = [];\n      let x = w2.globals.padHorizontal + this.categoryAxisCorrection;\n      const y = 1;\n      const linePaths = [];\n      const areaPaths = [];\n      Series.addCollapsedClassToSeries(this.w, this.elSeries, realIndex);\n      if (w2.axisFlags.isXNumeric && w2.seriesData.seriesX.length > 0) {\n        x = (w2.seriesData.seriesX[realIndex][0] - w2.globals.minX) / this.xRatio;\n      }\n      xArrj.push(x);\n      const pX = x;\n      let pY2;\n      const prevX = pX;\n      let prevY = this.zeroY;\n      let prevY2 = this.zeroY;\n      const lineYPosition = 0;\n      const firstPrevY = this.lineHelpers.determineFirstPrevY({\n        i: i2,\n        realIndex,\n        series,\n        prevY,\n        lineYPosition,\n        translationsIndex\n      });\n      prevY = firstPrevY.prevY;\n      if (w2.config.stroke.curve === \"monotoneCubic\" && series[i2][0] === null) {\n        yArrj.push(null);\n      } else {\n        yArrj.push(prevY);\n      }\n      const pY = prevY;\n      let firstPrevY2;\n      if (type === \"rangeArea\") {\n        firstPrevY2 = this.lineHelpers.determineFirstPrevY({\n          i: i2,\n          realIndex,\n          series: seriesRangeEnd,\n          prevY: prevY2,\n          lineYPosition,\n          translationsIndex\n        });\n        prevY2 = firstPrevY2.prevY;\n        pY2 = prevY2;\n        y2Arrj.push(yArrj[0] !== null ? prevY2 : null);\n      }\n      const pathsFrom = this._calculatePathsFrom({\n        type,\n        series,\n        i: i2,\n        realIndex,\n        translationsIndex,\n        prevX,\n        prevY,\n        prevY2\n      });\n      const rYArrj = [yArrj[0]];\n      const rY2Arrj = [y2Arrj[0]];\n      const iteratingOpts = {\n        type,\n        series,\n        realIndex,\n        translationsIndex,\n        i: i2,\n        x,\n        y,\n        pX,\n        pY,\n        pathsFrom,\n        linePaths,\n        areaPaths,\n        seriesIndex,\n        lineYPosition,\n        xArrj,\n        yArrj,\n        y2Arrj,\n        seriesRangeEnd\n      };\n      const paths = this._iterateOverDataPoints(__spreadProps(__spreadValues({}, iteratingOpts), {\n        iterations: type === \"rangeArea\" ? series[i2].length - 1 : void 0,\n        isRangeStart: true\n      }));\n      if (type === \"rangeArea\") {\n        const pathsFrom2 = this._calculatePathsFrom({\n          series: seriesRangeEnd,\n          i: i2,\n          realIndex,\n          prevX,\n          prevY: prevY2\n        });\n        const rangePaths = this._iterateOverDataPoints(__spreadProps(__spreadValues({}, iteratingOpts), {\n          series: seriesRangeEnd,\n          xArrj: [x],\n          yArrj: rYArrj,\n          y2Arrj: rY2Arrj,\n          pY: pY2,\n          areaPaths: paths.areaPaths,\n          pathsFrom: pathsFrom2,\n          iterations: seriesRangeEnd[i2].length - 1,\n          isRangeStart: false\n        }));\n        const segments = paths.linePaths.length / 2;\n        for (let s2 = 0; s2 < segments; s2++) {\n          paths.linePaths[s2] = rangePaths.linePaths[s2 + segments] + paths.linePaths[s2];\n        }\n        paths.linePaths.splice(segments);\n        paths.pathFromLine = rangePaths.pathFromLine + paths.pathFromLine;\n      } else if (!/z\\s*$/i.test(paths.pathFromArea)) {\n        paths.pathFromArea += \"z\";\n      }\n      this._handlePaths({ type, realIndex, i: i2, paths });\n      this.elSeries.add(this.elPointsMain);\n      this.elSeries.add(this.elDataLabelsWrap);\n      allSeries.push(this.elSeries);\n    }\n    if (typeof /** @type {Record<string,any>} */\n    ((_a = w2.config.series[0]) == null ? void 0 : _a.zIndex) !== \"undefined\") {\n      allSeries.sort(\n        (a2, b2) => Number(a2.node.getAttribute(\"zIndex\")) - Number(b2.node.getAttribute(\"zIndex\"))\n      );\n    }\n    if (w2.config.chart.stacked) {\n      for (let s2 = allSeries.length - 1; s2 >= 0; s2--) {\n        ret.add(allSeries[s2]);\n      }\n    } else {\n      for (let s2 = 0; s2 < allSeries.length; s2++) {\n        ret.add(allSeries[s2]);\n      }\n    }\n    return ret;\n  }\n  /**\n   * @param {any[]} series\n   * @param {number} i\n   * @param {number} realIndex\n   */\n  _initSerieVariables(series, i2, realIndex) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    this.xDivision = w2.layout.gridWidth / (w2.globals.dataPoints - (w2.config.xaxis.tickPlacement === \"on\" ? 1 : 0));\n    this.strokeWidth = Array.isArray(w2.config.stroke.width) ? w2.config.stroke.width[realIndex] : w2.config.stroke.width;\n    let translationsIndex = 0;\n    if (this.yRatio.length > 1) {\n      this.yaxisIndex = w2.globals.seriesYAxisReverseMap[realIndex];\n      translationsIndex = realIndex;\n    }\n    this.isReversed = w2.config.yaxis[this.yaxisIndex] && w2.config.yaxis[this.yaxisIndex].reversed;\n    this.zeroY = w2.layout.gridHeight - this.baseLineY[translationsIndex] - (this.isReversed ? w2.layout.gridHeight : 0) + (this.isReversed ? this.baseLineY[translationsIndex] * 2 : 0);\n    this.areaBottomY = this.zeroY;\n    if (this.zeroY > w2.layout.gridHeight || w2.config.plotOptions.area.fillTo === \"end\") {\n      this.areaBottomY = w2.layout.gridHeight;\n    }\n    this.categoryAxisCorrection = this.xDivision / 2;\n    const seriesItem = (\n      /** @type {Record<string,any>} */\n      w2.config.series[realIndex]\n    );\n    this.elSeries = graphics.group({\n      class: `apexcharts-series`,\n      zIndex: typeof seriesItem.zIndex !== \"undefined\" ? seriesItem.zIndex : realIndex,\n      seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[realIndex])\n    });\n    this.elPointsMain = graphics.group({\n      class: \"apexcharts-series-markers-wrap\",\n      \"data:realIndex\": realIndex\n    });\n    this.markers.resetSeriesWrapCache();\n    this._elLastPointsWrap = null;\n    if (w2.globals.hasNullValues) {\n      const firstPoint = this.markers.plotChartMarkers({\n        pointsPos: {\n          x: [0],\n          y: [w2.layout.gridHeight + w2.globals.markers.largestSize]\n        },\n        seriesIndex: i2,\n        j: 0,\n        pSize: 0.1,\n        alwaysDrawMarker: true,\n        isVirtualPoint: true\n      });\n      if (firstPoint !== null) {\n        this.elPointsMain.add(firstPoint);\n      }\n    }\n    this.elDataLabelsWrap = graphics.group({\n      class: \"apexcharts-datalabels\",\n      \"data:realIndex\": realIndex\n    });\n    const longestSeries = series[i2].length === w2.globals.dataPoints;\n    this.elSeries.attr({\n      \"data:longestSeries\": longestSeries,\n      rel: i2 + 1,\n      \"data:realIndex\": realIndex\n    });\n    this.appendPathFrom = true;\n  }\n  /** @param {{ type?: any, series?: any, i?: any, realIndex?: any, translationsIndex?: any, prevX?: any, prevY?: any, prevY2?: any }} opts */\n  _calculatePathsFrom({\n    type,\n    series,\n    i: i2,\n    realIndex,\n    translationsIndex,\n    prevX,\n    prevY,\n    prevY2\n  }) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    let linePath, areaPath, pathFromLine, pathFromArea;\n    if (series[i2][0] === null) {\n      for (let s2 = 0; s2 < series[i2].length; s2++) {\n        if (series[i2][s2] !== null) {\n          prevX = this.xDivision * s2;\n          prevY = this.zeroY - series[i2][s2] / this.yRatio[translationsIndex];\n          linePath = graphics.move(prevX, prevY);\n          areaPath = graphics.move(prevX, this.areaBottomY);\n          break;\n        }\n      }\n    } else {\n      linePath = graphics.move(prevX, prevY);\n      if (type === \"rangeArea\") {\n        linePath = graphics.move(prevX, prevY2) + graphics.line(prevX, prevY);\n      }\n      areaPath = graphics.move(prevX, this.areaBottomY) + graphics.line(prevX, prevY);\n    }\n    pathFromLine = graphics.move(0, this.areaBottomY) + graphics.line(0, this.areaBottomY);\n    pathFromArea = graphics.move(0, this.areaBottomY) + graphics.line(0, this.areaBottomY);\n    if (w2.globals.previousPaths.length > 0) {\n      const pathFrom = this.lineHelpers.checkPreviousPaths({\n        pathFromLine,\n        pathFromArea,\n        realIndex\n      });\n      pathFromLine = pathFrom.pathFromLine;\n      pathFromArea = pathFrom.pathFromArea;\n    }\n    return {\n      prevX,\n      prevY,\n      linePath,\n      areaPath,\n      pathFromLine,\n      pathFromArea\n    };\n  }\n  /** @param {{type: any, realIndex: any, i: any, paths: any}} opts */\n  _handlePaths({ type, realIndex, i: i2, paths }) {\n    var _a, _b, _c, _d, _e, _f, _g;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const emit = seriesEmitter(this.ctx, graphics);\n    const fill = new Fill(this.w);\n    this.prevSeriesY.push(paths.yArrj);\n    let streamScroll = null;\n    if ((type === \"line\" || type === \"area\") && w2.globals.dataChanged) {\n      streamScroll = detectStreamScroll(w2, realIndex, paths.xArrj, paths.yArrj);\n    }\n    let reconcile = null;\n    if (!streamScroll && (type === \"line\" || type === \"area\")) {\n      reconcile = reconcileSeriesPaths(w2, {\n        type,\n        realIndex,\n        pathFromLine: paths.pathFromLine,\n        pathFromArea: paths.pathFromArea,\n        linePaths: paths.linePaths,\n        areaPaths: paths.areaPaths\n      });\n    }\n    w2.globals.seriesXvalues[realIndex] = paths.xArrj;\n    w2.globals.seriesYvalues[realIndex] = paths.yArrj;\n    const forecast = w2.config.forecastDataPoints;\n    if (forecast.count > 0 && type !== \"rangeArea\") {\n      const forecastCutoff = w2.globals.seriesXvalues[realIndex][w2.globals.seriesXvalues[realIndex].length - forecast.count - 1];\n      const elForecastMask = graphics.drawRect(\n        forecastCutoff,\n        0,\n        w2.layout.gridWidth,\n        w2.layout.gridHeight,\n        0\n      );\n      w2.dom.elForecastMask.appendChild(elForecastMask.node);\n      const elNonForecastMask = graphics.drawRect(\n        0,\n        0,\n        forecastCutoff,\n        w2.layout.gridHeight,\n        0\n      );\n      w2.dom.elNonForecastMask.appendChild(elNonForecastMask.node);\n    }\n    if (!this.pointsChart) {\n      w2.globals.delayedElements.push({\n        el: this.elPointsMain.node,\n        index: realIndex\n      });\n      tweenSeriesMarkers(w2, {\n        elPointsMain: this.elPointsMain,\n        realIndex,\n        speed: w2.config.chart.animations.dynamicAnimation.speed\n      });\n      if (seriesJoin(w2, realIndex) && ((_a = this.elDataLabelsWrap) == null ? void 0 : _a.node)) {\n        this.elDataLabelsWrap.node.classList.add(\"apexcharts-element-hidden\");\n        w2.globals.delayedElements.push({\n          el: this.elDataLabelsWrap.node,\n          holdUntilComplete: true\n        });\n      }\n    } else {\n      tweenSeriesMarkers(w2, {\n        elPointsMain: this.elPointsMain,\n        realIndex,\n        speed: w2.config.chart.animations.dynamicAnimation.speed\n      });\n    }\n    const defaultRenderedPathOptions = {\n      i: i2,\n      realIndex,\n      animationDelay: i2,\n      initialSpeed: w2.config.chart.animations.speed,\n      dataChangeSpeed: w2.config.chart.animations.dynamicAnimation.speed,\n      className: `apexcharts-${type}`\n    };\n    const numericXY = paths.numericXY;\n    if (type === \"area\") {\n      const pathFill = fill.fillPath({\n        seriesNumber: realIndex\n      });\n      for (let p2 = 0; p2 < paths.areaPaths.length; p2++) {\n        const renderedPath = emit.renderPaths(__spreadProps(__spreadValues({}, defaultRenderedPathOptions), {\n          pathFrom: streamScroll ? projectPathToPrevFrame(paths.areaPaths[p2], streamScroll) : (_c = (_b = reconcile == null ? void 0 : reconcile.area) == null ? void 0 : _b.from) != null ? _c : paths.pathFromArea,\n          pathTo: paths.areaPaths[p2],\n          pathToNumeric: numericXY ? {\n            xs: numericXY.xs,\n            ys: numericXY.ys,\n            closeY: numericXY.areaCloseY\n          } : void 0,\n          pathToInterp: (_d = reconcile == null ? void 0 : reconcile.area) == null ? void 0 : _d.toInterp,\n          scrollMorph: !!streamScroll,\n          stroke: \"none\",\n          strokeWidth: 0,\n          strokeLineCap: null,\n          fill: pathFill\n        }));\n        this.elSeries.add(renderedPath);\n      }\n    }\n    if (w2.config.stroke.show && !this.pointsChart) {\n      let lineFill = null;\n      if (type === \"line\") {\n        lineFill = fill.fillPath({\n          seriesNumber: realIndex,\n          i: i2\n        });\n      } else {\n        if (w2.config.stroke.fill.type === \"solid\") {\n          lineFill = w2.globals.stroke.colors[realIndex];\n        } else {\n          const prevFill = w2.config.fill;\n          w2.config.fill = w2.config.stroke.fill;\n          lineFill = fill.fillPath({\n            seriesNumber: realIndex,\n            i: i2\n          });\n          w2.config.fill = prevFill;\n        }\n      }\n      for (let p2 = 0; p2 < paths.linePaths.length; p2++) {\n        let pathFill = lineFill;\n        if (type === \"rangeArea\") {\n          pathFill = fill.fillPath({\n            seriesNumber: realIndex\n          });\n        }\n        const linePathCommonOpts = __spreadProps(__spreadValues({}, defaultRenderedPathOptions), {\n          pathFrom: streamScroll ? projectPathToPrevFrame(paths.linePaths[p2], streamScroll) : (_f = (_e = reconcile == null ? void 0 : reconcile.line) == null ? void 0 : _e.from) != null ? _f : paths.pathFromLine,\n          pathTo: paths.linePaths[p2],\n          pathToNumeric: numericXY ? { xs: numericXY.xs, ys: numericXY.ys } : void 0,\n          pathToInterp: (_g = reconcile == null ? void 0 : reconcile.line) == null ? void 0 : _g.toInterp,\n          scrollMorph: !!streamScroll,\n          stroke: lineFill,\n          strokeWidth: this.strokeWidth,\n          strokeLineCap: w2.config.stroke.lineCap,\n          fill: type === \"rangeArea\" ? pathFill : \"none\"\n        });\n        const renderedPath = emit.renderPaths(linePathCommonOpts);\n        this.elSeries.add(renderedPath);\n        renderedPath.attr(\"fill-rule\", `evenodd`);\n        if (forecast.count > 0 && type !== \"rangeArea\") {\n          const renderedForecastPath = emit.renderPaths(linePathCommonOpts);\n          renderedForecastPath.node.setAttribute(\n            \"stroke-dasharray\",\n            forecast.dashArray\n          );\n          if (forecast.strokeWidth) {\n            renderedForecastPath.node.setAttribute(\n              \"stroke-width\",\n              forecast.strokeWidth\n            );\n          }\n          this.elSeries.add(renderedForecastPath);\n          renderedForecastPath.attr(\n            \"clip-path\",\n            `url(#forecastMask${w2.globals.cuid})`\n          );\n          renderedPath.attr(\n            \"clip-path\",\n            `url(#nonForecastMask${w2.globals.cuid})`\n          );\n        }\n      }\n    }\n  }\n  _iterateOverDataPoints({\n    type,\n    series,\n    iterations,\n    realIndex,\n    translationsIndex,\n    i: i2,\n    x,\n    y,\n    pX,\n    pY,\n    pathsFrom,\n    linePaths,\n    areaPaths,\n    seriesIndex,\n    lineYPosition,\n    xArrj,\n    yArrj,\n    y2Arrj,\n    isRangeStart,\n    seriesRangeEnd\n  }) {\n    var _a, _b;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const yRatio = this.yRatio;\n    let { prevY, linePath, areaPath, pathFromLine, pathFromArea } = pathsFrom;\n    const minY = Utils$1.isNumber(w2.globals.minYArr[realIndex]) ? w2.globals.minYArr[realIndex] : w2.globals.minY;\n    if (!iterations) {\n      iterations = w2.globals.dataPoints > 1 ? w2.globals.dataPoints - 1 : w2.globals.dataPoints;\n    }\n    const getY = (_y, lineYPos) => {\n      return lineYPos - _y / yRatio[translationsIndex] + (this.isReversed ? _y / yRatio[translationsIndex] : 0) * 2;\n    };\n    let y2 = y;\n    const stackSeries = w2.config.chart.stacked && !w2.globals.comboCharts || w2.config.chart.stacked && w2.globals.comboCharts && (!this.w.config.chart.stackOnlyBar || /** @type {Record<string,any>} */\n    ((_a = this.w.config.series[realIndex]) == null ? void 0 : _a.type) === \"bar\" || /** @type {Record<string,any>} */\n    ((_b = this.w.config.series[realIndex]) == null ? void 0 : _b.type) === \"column\");\n    let curve = w2.config.stroke.curve;\n    if (Array.isArray(curve)) {\n      if (Array.isArray(seriesIndex)) {\n        curve = curve[seriesIndex[i2]];\n      } else {\n        curve = curve[i2];\n      }\n    }\n    let pathState = 0;\n    let segmentStartX;\n    const jitterPx = this.pointsChart ? this._scatterJitterPx(realIndex) : null;\n    if (curve === \"straight\" && !this.pointsChart) {\n      const fast = this._fastStraightPath({\n        type,\n        series,\n        i: i2,\n        realIndex,\n        translationsIndex,\n        iterations,\n        x,\n        y,\n        pX,\n        pY,\n        pathsFrom,\n        linePaths,\n        areaPaths,\n        xArrj,\n        yArrj,\n        y2Arrj,\n        stackSeries\n      });\n      if (fast) return fast;\n    }\n    for (let j = 0; j < iterations; j++) {\n      if (series[i2].length === 0) break;\n      const isNull = typeof series[i2][j + 1] === \"undefined\" || series[i2][j + 1] === null;\n      if (w2.axisFlags.isXNumeric) {\n        let sX = w2.seriesData.seriesX[realIndex][j + 1];\n        if (typeof w2.seriesData.seriesX[realIndex][j + 1] === \"undefined\") {\n          sX = w2.seriesData.seriesX[realIndex][iterations - 1];\n        }\n        x = (sX - w2.globals.minX) / this.xRatio;\n      } else {\n        x = x + this.xDivision;\n      }\n      if (stackSeries) {\n        if (i2 > 0 && w2.globals.collapsedSeries.length < w2.config.series.length - 1) {\n          const prevIndex = (pi) => {\n            var _a2;\n            for (let pii = pi; pii >= 0; pii--) {\n              const ri = (_a2 = seriesIndex == null ? void 0 : seriesIndex[pii]) != null ? _a2 : pii;\n              if (w2.globals.collapsedSeriesIndices.indexOf(ri) === -1 && w2.globals.ancillaryCollapsedSeriesIndices.indexOf(ri) === -1) {\n                return pii;\n              }\n            }\n            return -1;\n          };\n          const pIdx = prevIndex(i2 - 1);\n          lineYPosition = pIdx < 0 ? this.zeroY : this.prevSeriesY[pIdx][j + 1];\n        } else {\n          lineYPosition = this.zeroY;\n        }\n      } else {\n        lineYPosition = this.zeroY;\n      }\n      if (isNull) {\n        y = getY(minY, lineYPosition);\n      } else {\n        y = getY(series[i2][j + 1], lineYPosition);\n        if (type === \"rangeArea\") {\n          y2 = getY(seriesRangeEnd[i2][j + 1], lineYPosition);\n        }\n      }\n      let xj = x;\n      let yj = y;\n      if (jitterPx) {\n        const seed = realIndex * 100003 + (j + 1);\n        if (jitterPx.x) xj = x + (hash01(seed * 7919 + 13) - 0.5) * 2 * jitterPx.x;\n        if (jitterPx.y) yj = y + (hash01(seed * 6271 + 97) - 0.5) * 2 * jitterPx.y;\n      }\n      xArrj.push(series[i2][j + 1] === null ? null : xj);\n      if (isNull && (w2.config.stroke.curve === \"smooth\" || w2.config.stroke.curve === \"monotoneCubic\")) {\n        yArrj.push(null);\n        y2Arrj.push(null);\n      } else {\n        yArrj.push(yj);\n        y2Arrj.push(y2);\n      }\n      const pointsPos = this.lineHelpers.calculatePoints({\n        series,\n        x: xj,\n        y: yj,\n        realIndex,\n        i: i2,\n        j,\n        prevY\n      });\n      const calculatedPaths = this._createPaths({\n        type,\n        series,\n        i: i2,\n        j,\n        x,\n        y,\n        y2,\n        xArrj,\n        yArrj,\n        y2Arrj,\n        pX,\n        pY,\n        pathState,\n        segmentStartX,\n        linePath,\n        areaPath,\n        linePaths,\n        areaPaths,\n        curve,\n        isRangeStart\n      });\n      areaPaths = calculatedPaths.areaPaths;\n      linePaths = calculatedPaths.linePaths;\n      pX = calculatedPaths.pX;\n      pY = calculatedPaths.pY;\n      pathState = calculatedPaths.pathState;\n      segmentStartX = calculatedPaths.segmentStartX;\n      areaPath = calculatedPaths.areaPath;\n      linePath = calculatedPaths.linePath;\n      if (this.appendPathFrom && !w2.globals.hasNullValues && !(curve === \"monotoneCubic\" && type === \"rangeArea\")) {\n        pathFromLine += graphics.line(x, this.areaBottomY);\n        pathFromArea += graphics.line(x, this.areaBottomY);\n      }\n      this.handleNullDataPoints(series, pointsPos, i2, j, realIndex);\n      this._handleMarkersAndLabels({\n        type,\n        pointsPos,\n        i: i2,\n        j,\n        realIndex,\n        isRangeStart\n      });\n    }\n    return {\n      yArrj,\n      xArrj,\n      pathFromArea,\n      areaPaths,\n      pathFromLine,\n      linePaths,\n      linePath,\n      areaPath\n    };\n  }\n  /** @param {{type: any, pointsPos: any, isRangeStart: any, i: any, j: any, realIndex: any}} opts */\n  _handleMarkersAndLabels({ type, pointsPos, isRangeStart, i: i2, j, realIndex }) {\n    const w2 = this.w;\n    const dataLabels = new DataLabels(this.w, this.ctx);\n    if (!this.pointsChart) {\n      const useProgressive = !w2.globals.dataChanged && !w2.globals.resized;\n      if (!useProgressive && w2.seriesData.series[i2].length > 1) {\n        this.elPointsMain.node.classList.add(\"apexcharts-element-hidden\");\n      }\n      const elPointsWrap = this.markers.plotChartMarkers({\n        pointsPos,\n        seriesIndex: realIndex,\n        j: j + 1\n      });\n      if (elPointsWrap !== null && elPointsWrap !== this._elLastPointsWrap) {\n        this.elPointsMain.add(elPointsWrap);\n        this._elLastPointsWrap = elPointsWrap;\n      }\n    } else {\n      this.scatter.draw(this.elSeries, j, {\n        realIndex,\n        pointsPos,\n        zRatio: this.zRatio,\n        elParent: this.elPointsMain\n      });\n    }\n    const drawnLabels = dataLabels.drawDataLabel({\n      type,\n      isRangeStart,\n      pos: pointsPos,\n      i: realIndex,\n      j: j + 1\n    });\n    if (drawnLabels !== null) {\n      this.elDataLabelsWrap.add(drawnLabels);\n    }\n  }\n  /**\n   * Max scatter-jitter offsets in pixels for this series, or null when jitter is\n   * off. The config offsets are in axis units (x: 1 = one category step / x-data\n   * unit, y: 1 = one y-data unit); convert each to pixels using the chart's\n   * ratios. The actual per-point offset is a deterministic fraction of these\n   * (see Scatter.drawPoint).\n   * @param {number} realIndex\n   * @returns {{ x: number, y: number } | null}\n   */\n  _scatterJitterPx(realIndex) {\n    var _a;\n    const w2 = this.w;\n    const jt = (_a = w2.config.plotOptions.scatter) == null ? void 0 : _a.jitter;\n    if (!jt || !jt.enabled || !jt.x && !jt.y) return null;\n    const xUnitPx = w2.axisFlags.isXNumeric && this.xRatio ? 1 / this.xRatio : this.xDivision;\n    const ti = this.yRatio.length > 1 ? realIndex : 0;\n    const yUnitPx = this.yRatio[ti] ? 1 / this.yRatio[ti] : 0;\n    return {\n      x: (jt.x || 0) * xUnitPx,\n      y: (jt.y || 0) * yUnitPx\n    };\n  }\n  /**\n   * Numeric geometry fast path for plain straight line/area series (the\n   * render-2026 perf work). Eligibility is strict: everything the per-point\n   * slow loop can do beyond plain geometry (null gaps, markers, data labels,\n   * discrete markers, stacking, combos, range areas) bails to the state\n   * machine. When eligible it produces the SAME outputs as the slow loop\n   * (byte-identical d strings via join, the same xArrj/yArrj/y2Arrj\n   * pushes, and the same pointsArray tooltip cache) in one tight loop.\n   * In canvas mode it additionally emits typed-array coordinates so the\n   * renderer can paint via moveTo/lineTo without a Path2D d-string parse.\n   *\n   * @param {{type: any, series: any, i: number, realIndex: number,\n   *   translationsIndex: number, iterations: number, x: number, y: number,\n   *   pX: number, pY: number, pathsFrom: any, linePaths: any[],\n   *   areaPaths: any[], xArrj: any[], yArrj: any[], y2Arrj: any[],\n   *   stackSeries: boolean}} opts\n   * @returns {any} the _iterateOverDataPoints result, or null when ineligible\n   */\n  _fastStraightPath({\n    type,\n    series,\n    i: i2,\n    realIndex,\n    translationsIndex,\n    iterations,\n    x,\n    y,\n    pX,\n    pY,\n    pathsFrom,\n    linePaths,\n    areaPaths,\n    xArrj,\n    yArrj,\n    y2Arrj,\n    stackSeries\n  }) {\n    const w2 = this.w;\n    if (type !== \"line\" && type !== \"area\") return null;\n    if (w2.globals.comboCharts || stackSeries) return null;\n    if (w2.config.dataLabels.enabled) return null;\n    if (w2.config.markers.discrete.length) return null;\n    if (w2.globals.markers.size[realIndex] > 0) return null;\n    const s2 = series[i2];\n    const n2 = s2.length;\n    if (!iterations || n2 < 2 || n2 - 1 !== iterations) return null;\n    for (let k = 0; k <= iterations; k++) {\n      const v2 = s2[k];\n      if (v2 === null || typeof v2 === \"undefined\") return null;\n    }\n    const isXNumeric = w2.axisFlags.isXNumeric;\n    const sx = isXNumeric ? w2.seriesData.seriesX[realIndex] : null;\n    if (isXNumeric && (!sx || sx.length < n2)) return null;\n    const yR = this.yRatio[translationsIndex];\n    const isReversed = this.isReversed;\n    const zeroY = this.zeroY;\n    const bottomY = this.areaBottomY;\n    const xRatio = this.xRatio;\n    const minX = w2.globals.minX;\n    const xDivision = this.xDivision;\n    const offX = w2.config.markers.offsetX;\n    const offY = w2.config.markers.offsetY;\n    const appendFrom = this.appendPathFrom && !w2.globals.hasNullValues;\n    let { pathFromLine, pathFromArea } = pathsFrom;\n    const r2 = this.ctx && this.ctx.renderer;\n    const canvasMode = !!(r2 && r2.kind && r2.kind !== \"svg\");\n    const buildStrings = !canvasMode || w2.globals.dataChanged && !!w2.globals.prevStreamFrame;\n    const nxs = canvasMode ? new Float64Array(n2) : null;\n    const nys = canvasMode ? new Float64Array(n2) : null;\n    if (nxs && nys) {\n      nxs[0] = pX;\n      nys[0] = pY;\n    }\n    if (typeof w2.globals.pointsArray[realIndex] === \"undefined\") {\n      w2.globals.pointsArray[realIndex] = [];\n    }\n    const pts = w2.globals.pointsArray[realIndex];\n    const xPT1st = sx ? (sx[0] - minX) / xRatio + offX : this.categoryAxisCorrection + offX;\n    pts.push([xPT1st, pathsFrom.prevY + offY]);\n    const parts = buildStrings ? new Array(iterations + 1) : [];\n    if (buildStrings) parts[0] = \"M \" + pX + \" \" + pY;\n    const fromParts = buildStrings && appendFrom ? new Array(iterations) : null;\n    let xv = x;\n    let xj = pX;\n    let yj = pY;\n    for (let j = 0; j < iterations; j++) {\n      if (sx) {\n        xj = (sx[j + 1] - minX) / xRatio;\n      } else {\n        xv = xv + xDivision;\n        xj = xv;\n      }\n      const v2 = s2[j + 1];\n      yj = zeroY - v2 / yR + (isReversed ? v2 / yR : 0) * 2;\n      xArrj.push(xj);\n      yArrj.push(yj);\n      y2Arrj.push(y);\n      pts.push([xj + offX, yj + offY]);\n      if (buildStrings) {\n        parts[j + 1] = \" L \" + xj + \" \" + yj;\n        if (fromParts) fromParts[j] = \" L \" + xj + \" \" + bottomY;\n      }\n      if (nxs && nys) {\n        nxs[j + 1] = xj;\n        nys[j + 1] = yj;\n      }\n    }\n    let linePath = \"\";\n    let areaPath = \"\";\n    if (buildStrings) {\n      linePath = parts.join(\"\");\n      areaPath = linePath + \" L \" + xj + \" \" + bottomY + \" L \" + pX + \" \" + bottomY + \"z\";\n    }\n    if (fromParts) {\n      const fromAppend = fromParts.join(\"\");\n      pathFromLine += fromAppend;\n      pathFromArea += fromAppend;\n    } else if (!buildStrings && appendFrom) {\n      pathFromLine += \" L \" + xj + \" \" + bottomY;\n      pathFromArea += \" L \" + xj + \" \" + bottomY;\n    }\n    linePaths.push(linePath);\n    areaPaths.push(areaPath);\n    return {\n      yArrj,\n      xArrj,\n      pathFromArea,\n      areaPaths,\n      pathFromLine,\n      linePaths,\n      linePath,\n      areaPath,\n      numericXY: nxs ? { xs: nxs, ys: nys, areaCloseY: bottomY } : void 0\n    };\n  }\n  /** @param {{type: any, series: any, i: any, j: any, x: any, y: any, xArrj: any, yArrj: any, y2: any, y2Arrj: any, pX: any, pY: any, pathState: any, segmentStartX: any, linePath: any, areaPath: any, linePaths: any, areaPaths: any, curve: any, isRangeStart: any}} opts */\n  _createPaths({\n    type,\n    series,\n    i: i2,\n    j,\n    x,\n    y,\n    xArrj,\n    yArrj,\n    y2,\n    y2Arrj,\n    pX,\n    pY,\n    pathState,\n    segmentStartX,\n    linePath,\n    areaPath,\n    linePaths,\n    areaPaths,\n    curve,\n    isRangeStart\n  }) {\n    const graphics = new Graphics(this.w);\n    const areaBottomY = this.areaBottomY;\n    const rangeArea = type === \"rangeArea\";\n    const isLowerRangeAreaPath = type === \"rangeArea\" && isRangeStart;\n    switch (curve) {\n      case \"monotoneCubic\": {\n        const yAj = isRangeStart ? yArrj : y2Arrj;\n        const getSmoothInputs = (xArr, yArr) => {\n          return xArr.map((_, i3) => {\n            return [_, yArr[i3]];\n          }).filter((_) => _[1] !== null);\n        };\n        const getSegmentLengths = (yArr) => {\n          const segLens = [];\n          let count = 0;\n          yArr.forEach((_) => {\n            if (_ !== null) {\n              count++;\n            } else if (count > 0) {\n              segLens.push(count);\n              count = 0;\n            }\n          });\n          if (count > 0) {\n            segLens.push(count);\n          }\n          return segLens;\n        };\n        const getSegments = (yArr, points) => {\n          const segLens = getSegmentLengths(yArr);\n          const segments = [];\n          for (let i3 = 0, len = 0; i3 < segLens.length; len += segLens[i3++]) {\n            segments[i3] = spline.slice(points, len, len + segLens[i3]);\n          }\n          return segments;\n        };\n        switch (pathState) {\n          case 0:\n            if (yAj[j + 1] === null) {\n              break;\n            }\n            pathState = 1;\n          // falls through\n          case 1:\n            if (!(rangeArea ? xArrj.length === series[i2].length : j === series[i2].length - 2)) {\n              break;\n            }\n          // falls through\n          case 2: {\n            const _xAj = isRangeStart ? xArrj : xArrj.slice().reverse();\n            const _yAj = isRangeStart ? yAj : yAj.slice().reverse();\n            const smoothInputs = getSmoothInputs(_xAj, _yAj);\n            const points = smoothInputs.length > 1 ? spline.points(smoothInputs) : smoothInputs;\n            let smoothInputsLower = [];\n            if (rangeArea) {\n              if (isLowerRangeAreaPath) {\n                areaPaths = smoothInputs;\n              } else {\n                smoothInputsLower = areaPaths.reverse();\n              }\n            }\n            let segmentCount = 0;\n            let smoothInputsIndex = 0;\n            getSegments(_yAj, points).forEach((_) => {\n              segmentCount++;\n              const svgPoints = svgPath(_);\n              const _start = smoothInputsIndex;\n              smoothInputsIndex += _.length;\n              const _end = smoothInputsIndex - 1;\n              if (isLowerRangeAreaPath) {\n                linePath = graphics.move(\n                  smoothInputs[_start][0],\n                  smoothInputs[_start][1]\n                ) + svgPoints;\n              } else if (rangeArea) {\n                linePath = graphics.move(\n                  smoothInputsLower[_start][0],\n                  smoothInputsLower[_start][1]\n                ) + graphics.line(\n                  smoothInputs[_start][0],\n                  smoothInputs[_start][1]\n                ) + svgPoints + graphics.line(\n                  smoothInputsLower[_end][0],\n                  smoothInputsLower[_end][1]\n                );\n              } else {\n                linePath = graphics.move(\n                  smoothInputs[_start][0],\n                  smoothInputs[_start][1]\n                ) + svgPoints;\n                areaPath = linePath + graphics.line(smoothInputs[_end][0], areaBottomY) + graphics.line(smoothInputs[_start][0], areaBottomY) + \"z\";\n                areaPaths.push(areaPath);\n              }\n              linePaths.push(linePath);\n            });\n            if (rangeArea && segmentCount > 1 && !isLowerRangeAreaPath) {\n              const upperLinePaths = linePaths.slice(segmentCount).reverse();\n              linePaths.splice(segmentCount);\n              upperLinePaths.forEach(\n                (u) => linePaths.push(u)\n              );\n            }\n            pathState = 0;\n            break;\n          }\n        }\n        break;\n      }\n      case \"smooth\": {\n        const length = (x - pX) * 0.35;\n        if (series[i2][j] === null) {\n          pathState = 0;\n        } else {\n          switch (pathState) {\n            case 0:\n              segmentStartX = pX;\n              if (isLowerRangeAreaPath) {\n                linePath = graphics.move(pX, y2Arrj[j]) + graphics.line(pX, pY);\n              } else {\n                linePath = graphics.move(pX, pY);\n              }\n              areaPath = graphics.move(pX, pY);\n              if (series[i2][j + 1] === null || typeof series[i2][j + 1] === \"undefined\") {\n                linePaths.push(linePath);\n                areaPaths.push(areaPath);\n                break;\n              }\n              pathState = 1;\n              if (j < series[i2].length - 2) {\n                const p2 = graphics.curve(pX + length, pY, x - length, y, x, y);\n                linePath += p2;\n                areaPath += p2;\n                break;\n              }\n            // falls through\n            case 1:\n              if (series[i2][j + 1] === null) {\n                if (isLowerRangeAreaPath) {\n                  linePath += graphics.line(pX, y2);\n                } else {\n                  linePath += graphics.move(pX, pY);\n                }\n                areaPath += graphics.line(pX, areaBottomY) + graphics.line(segmentStartX, areaBottomY) + \"z\";\n                linePaths.push(linePath);\n                areaPaths.push(areaPath);\n                pathState = -1;\n              } else {\n                const p2 = graphics.curve(pX + length, pY, x - length, y, x, y);\n                linePath += p2;\n                areaPath += p2;\n                if (j >= series[i2].length - 2) {\n                  if (isLowerRangeAreaPath) {\n                    linePath += graphics.curve(x, y, x, y, x, y2) + graphics.move(x, y2);\n                  }\n                  areaPath += graphics.curve(x, y, x, y, x, areaBottomY) + graphics.line(segmentStartX, areaBottomY) + \"z\";\n                  linePaths.push(linePath);\n                  areaPaths.push(areaPath);\n                  pathState = -1;\n                }\n              }\n              break;\n          }\n        }\n        pX = x;\n        pY = y;\n        break;\n      }\n      default: {\n        const pathToPoint = (curve2, x2, y3) => {\n          let path = \"\";\n          switch (curve2) {\n            case \"stepline\":\n              path = graphics.line(x2, null, \"H\") + graphics.line(null, y3, \"V\");\n              break;\n            case \"linestep\":\n              path = graphics.line(null, y3, \"V\") + graphics.line(x2, null, \"H\");\n              break;\n            case \"straight\":\n              path = graphics.line(x2, y3);\n              break;\n          }\n          return path;\n        };\n        if (series[i2][j] === null) {\n          pathState = 0;\n        } else {\n          switch (pathState) {\n            case 0:\n              segmentStartX = pX;\n              if (isLowerRangeAreaPath) {\n                linePath = graphics.move(pX, y2Arrj[j]) + graphics.line(pX, pY);\n              } else {\n                linePath = graphics.move(pX, pY);\n              }\n              areaPath = graphics.move(pX, pY);\n              if (series[i2][j + 1] === null || typeof series[i2][j + 1] === \"undefined\") {\n                linePaths.push(linePath);\n                areaPaths.push(areaPath);\n                break;\n              }\n              pathState = 1;\n              if (j < series[i2].length - 2) {\n                const p2 = pathToPoint(curve, x, y);\n                linePath += p2;\n                areaPath += p2;\n                break;\n              }\n            // falls through\n            case 1:\n              if (series[i2][j + 1] === null) {\n                if (isLowerRangeAreaPath) {\n                  linePath += graphics.line(pX, y2);\n                } else {\n                  linePath += graphics.move(pX, pY);\n                }\n                areaPath += graphics.line(pX, areaBottomY) + graphics.line(segmentStartX, areaBottomY) + \"z\";\n                linePaths.push(linePath);\n                areaPaths.push(areaPath);\n                pathState = -1;\n              } else {\n                const p2 = pathToPoint(curve, x, y);\n                linePath += p2;\n                areaPath += p2;\n                if (j >= series[i2].length - 2) {\n                  if (isLowerRangeAreaPath) {\n                    linePath += graphics.line(x, y2);\n                  }\n                  areaPath += graphics.line(x, areaBottomY) + graphics.line(segmentStartX, areaBottomY) + \"z\";\n                  linePaths.push(linePath);\n                  areaPaths.push(areaPath);\n                  pathState = -1;\n                }\n              }\n              break;\n          }\n        }\n        pX = x;\n        pY = y;\n        break;\n      }\n    }\n    return {\n      linePaths,\n      areaPaths,\n      pX,\n      pY,\n      pathState,\n      segmentStartX,\n      linePath,\n      areaPath\n    };\n  }\n  /**\n   * @param {any[]} series\n   * @param {any} pointsPos\n   * @param {number} i\n   * @param {number} j\n   * @param {number} realIndex\n   */\n  handleNullDataPoints(series, pointsPos, i2, j, realIndex) {\n    const w2 = this.w;\n    if (series[i2][j] === null && w2.config.markers.showNullDataPoints || series[i2].length === 1) {\n      let pSize = this.strokeWidth - w2.config.markers.strokeWidth / 2;\n      if (!(pSize > 0)) {\n        pSize = 0;\n      }\n      const elPointsWrap = this.markers.plotChartMarkers({\n        pointsPos,\n        seriesIndex: realIndex,\n        j: j + 1,\n        pSize,\n        alwaysDrawMarker: true\n      });\n      if (elPointsWrap !== null) {\n        this.elPointsMain.add(elPointsWrap);\n      }\n    }\n  }\n}\nfunction drawOuterLabel(w2, spec) {\n  const {\n    lines,\n    lineHeight,\n    anchor,\n    elbow,\n    labelX,\n    labelY,\n    side,\n    connector,\n    style,\n    foreColor\n  } = spec;\n  const graphics = new Graphics(w2);\n  const group = graphics.group({\n    class: spec.groupClass || \"apexcharts-outer-label-group\"\n  });\n  if (connector.show) {\n    const d = `M ${anchor.x} ${anchor.y} L ${elbow.x} ${elbow.y} L ${labelX} ${labelY}`;\n    const line = graphics.drawPath({\n      d,\n      stroke: connector.color,\n      strokeWidth: connector.width,\n      fill: \"none\",\n      strokeLinecap: \"round\"\n    });\n    line.node.classList.add(spec.connectorClass || \"apexcharts-outer-label-connector\");\n    group.add(line);\n  }\n  const textX = side === \"right\" ? labelX + 4 : labelX - 4;\n  const n2 = lines.length;\n  const startY = labelY - (n2 - 1) * lineHeight / 2;\n  const elText = graphics.drawText({\n    x: textX,\n    y: startY,\n    text: n2 === 1 ? lines[0] : lines,\n    textAnchor: side === \"right\" ? \"start\" : \"end\",\n    fontSize: style.fontSize,\n    fontFamily: style.fontFamily,\n    fontWeight: style.fontWeight,\n    foreColor,\n    dominantBaseline: \"central\",\n    cssClass: spec.textClass || \"apexcharts-outer-label\"\n  });\n  if (n2 > 1) {\n    const tspans = elText.node.getElementsByTagName(\"tspan\");\n    for (let li = 0; li < tspans.length; li++) {\n      tspans[li].setAttribute(\"x\", `${textX}`);\n      tspans[li].setAttribute(\"dy\", li === 0 ? \"0\" : `${lineHeight}`);\n    }\n  }\n  group.add(elText);\n  return group;\n}\nfunction measureLabelWidth(w2, labels, style = {}) {\n  const graphics = new Graphics(w2);\n  const fontSize = style.fontSize || \"12px\";\n  const px = parseFloat(fontSize) || 12;\n  let max = 0;\n  labels.forEach((text) => {\n    if (text == null || text === \"\") return;\n    const str = `${text}`;\n    const measured = graphics.getTextRects(str, fontSize, style.fontFamily, \"\").width;\n    max = Math.max(max, measured > 0 ? measured : str.length * px * 0.58);\n  });\n  return max;\n}\nfunction spaceOutLabels(items, minGap, maxY, minY) {\n  const col = items.slice().sort((a2, b2) => a2.idealY - b2.idealY);\n  col.forEach((l2) => {\n    l2.labelY = l2.idealY;\n  });\n  for (let k = 1; k < col.length; k++) {\n    if (col[k].labelY - col[k - 1].labelY < minGap) {\n      col[k].labelY = col[k - 1].labelY + minGap;\n    }\n  }\n  const last = col[col.length - 1];\n  const overflow = last ? last.labelY - maxY : 0;\n  if (overflow > 0) {\n    for (let k = col.length - 1; k >= 0; k--) {\n      col[k].labelY -= overflow;\n      if (k < col.length - 1 && col[k + 1].labelY - col[k].labelY < minGap) {\n        col[k].labelY = col[k + 1].labelY - minGap;\n      }\n    }\n  }\n  if (minY != null && col.length && col[0].labelY < minY) {\n    const shift = minY - col[0].labelY;\n    for (let k = 0; k < col.length; k++) {\n      col[k].labelY += shift;\n    }\n  }\n}\nclass CircularChartsHelpers {\n  /**\n   * @param {import('../../../types/internal').ChartStateW} w\n   */\n  constructor(w2) {\n    this.w = w2;\n  }\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @param {number} i\n   * @param {string | number} text\n   */\n  drawYAxisTexts(x, y, i2, text) {\n    const w2 = this.w;\n    const yaxisConfig = w2.config.yaxis[0];\n    const formatter = w2.formatters.yLabelFormatters[0];\n    const graphics = new Graphics(this.w);\n    const yaxisLabel = graphics.drawText({\n      x: x + yaxisConfig.labels.offsetX,\n      y: y + yaxisConfig.labels.offsetY,\n      text: formatter(text, i2),\n      textAnchor: \"middle\",\n      fontSize: yaxisConfig.labels.style.fontSize,\n      fontFamily: yaxisConfig.labels.style.fontFamily,\n      foreColor: Array.isArray(yaxisConfig.labels.style.colors) ? yaxisConfig.labels.style.colors[i2] : yaxisConfig.labels.style.colors\n    });\n    return yaxisLabel;\n  }\n  /**\n   * Widest rendered width among the given label strings. Used to reserve\n   * horizontal room for outer (name) labels so the pie can shrink to fit them.\n   * @param {string[]} labels\n   * @param {{ fontSize?: string, fontFamily?: string }} style\n   * @returns {number}\n   */\n  getMaxLabelWidth(labels, { fontSize, fontFamily } = {}) {\n    const graphics = new Graphics(this.w);\n    let maxWidth = 0;\n    labels.forEach((text) => {\n      if (text === null || typeof text === \"undefined\" || text === \"\") return;\n      const rect = graphics.getTextRects(\n        `${text}`,\n        fontSize || \"12px\",\n        fontFamily,\n        \"\"\n      );\n      maxWidth = Math.max(maxWidth, rect.width);\n    });\n    return maxWidth;\n  }\n  /**\n   * Draw a single outer (name) label: an optional leader line from the slice\n   * edge (anchor -> radial elbow -> label) plus the name text (one or more\n   * lines, e.g. name + percent). Geometry is computed by the caller (Pie.js)\n   * so it can run a de-overlap pass first. The text block is vertically\n   * centered on `labelY`, which is where the connector terminates.\n   * @param {{\n   *   lines: string[],\n   *   lineHeight: number,\n   *   anchor: { x: number, y: number },\n   *   elbow: { x: number, y: number },\n   *   labelX: number,\n   *   labelY: number,\n   *   side: 'left' | 'right',\n   *   connector: { show: boolean, width: number, color: string },\n   *   style: { fontSize?: string, fontFamily?: string, fontWeight?: string | number },\n   *   foreColor: string,\n   * }} opts\n   */\n  drawExternalLabel(opts) {\n    return drawOuterLabel(this.w, __spreadProps(__spreadValues({}, opts), {\n      groupClass: \"apexcharts-pie-name-label-group\",\n      textClass: \"apexcharts-pie-name-label\",\n      connectorClass: \"apexcharts-pie-label-connector\"\n    }));\n  }\n}\nconst D2R$1 = Math.PI / 180;\nconst R2D$1 = 180 / Math.PI;\nfunction arcPoint(cx, cy, radius, deg) {\n  return {\n    x: cx + radius * Math.cos((deg - 90) * D2R$1),\n    y: cy + radius * Math.sin((deg - 90) * D2R$1)\n  };\n}\nconst xy = (p2) => `${p2.x} ${p2.y}`;\nfunction roundedDonutSegmentPath({ cx, cy, rIn, rOut, a0, a1, r: r2, spanDeg }) {\n  const ptAt = (radius, deg) => arcPoint(cx, cy, radius, deg);\n  const degOut = r2 / rOut * R2D$1;\n  const degIn = r2 / rIn * R2D$1;\n  const oStart = ptAt(rOut, a0 + degOut);\n  const oEnd = ptAt(rOut, a1 - degOut);\n  const largeOut = spanDeg - 2 * degOut > 180 ? 1 : 0;\n  const ocEnd = ptAt(rOut, a1);\n  const rEndOut = ptAt(rOut - r2, a1);\n  const ocStart = ptAt(rOut, a0);\n  const rStartOut = ptAt(rOut - r2, a0);\n  const iEnd = ptAt(rIn, a1 - degIn);\n  const iStart = ptAt(rIn, a0 + degIn);\n  const largeIn = spanDeg - 2 * degIn > 180 ? 1 : 0;\n  const icEnd = ptAt(rIn, a1);\n  const rEndIn = ptAt(rIn + r2, a1);\n  const icStart = ptAt(rIn, a0);\n  const rStartIn = ptAt(rIn + r2, a0);\n  return [\n    \"M\",\n    xy(oStart),\n    \"A\",\n    rOut,\n    rOut,\n    0,\n    largeOut,\n    1,\n    xy(oEnd),\n    \"Q\",\n    xy(ocEnd),\n    xy(rEndOut),\n    \"L\",\n    xy(rEndIn),\n    \"Q\",\n    xy(icEnd),\n    xy(iEnd),\n    \"A\",\n    rIn,\n    rIn,\n    0,\n    largeIn,\n    0,\n    xy(iStart),\n    \"Q\",\n    xy(icStart),\n    xy(rStartIn),\n    \"L\",\n    xy(rStartOut),\n    \"Q\",\n    xy(ocStart),\n    xy(oStart),\n    \"Z\"\n  ].join(\" \");\n}\nfunction roundedPieSegmentPath({ cx, cy, rOut, a0, a1, r: r2, spanDeg }) {\n  const ptAt = (radius, deg) => arcPoint(cx, cy, radius, deg);\n  const degOut = r2 / rOut * R2D$1;\n  const oStart = ptAt(rOut, a0 + degOut);\n  const oEnd = ptAt(rOut, a1 - degOut);\n  const largeOut = spanDeg - 2 * degOut > 180 ? 1 : 0;\n  const ocEnd = ptAt(rOut, a1);\n  const rEndOut = ptAt(rOut - r2, a1);\n  const ocStart = ptAt(rOut, a0);\n  const rStartOut = ptAt(rOut - r2, a0);\n  return [\n    \"M\",\n    xy(oStart),\n    \"A\",\n    rOut,\n    rOut,\n    0,\n    largeOut,\n    1,\n    xy(oEnd),\n    \"Q\",\n    xy(ocEnd),\n    xy(rEndOut),\n    \"L\",\n    `${cx} ${cy}`,\n    \"L\",\n    xy(rStartOut),\n    \"Q\",\n    xy(ocStart),\n    xy(oStart),\n    \"Z\"\n  ].join(\" \");\n}\nfunction sharpDonutSegmentPath({ cx, cy, rIn, rOut, a0, a1, spanDeg }) {\n  const ptAt = (radius, deg) => arcPoint(cx, cy, radius, deg);\n  const largeArc = spanDeg > 180 ? 1 : 0;\n  const A = ptAt(rOut, a0);\n  const B = ptAt(rOut, a1);\n  const C = ptAt(rIn, a1);\n  const Din = ptAt(rIn, a0);\n  return [\n    \"M\",\n    xy(A),\n    \"A\",\n    rOut,\n    rOut,\n    0,\n    largeArc,\n    1,\n    xy(B),\n    \"L\",\n    xy(C),\n    \"A\",\n    rIn,\n    rIn,\n    0,\n    largeArc,\n    0,\n    xy(Din),\n    \"Z\"\n  ].join(\" \");\n}\nconst SLICE_OFFSET_TRANSITION = \"transform 320ms cubic-bezier(0.25, 0.8, 0.3, 1)\";\nconst HOVER_OUTLINE_TRANSITION = \"opacity 180ms ease-out\";\nclass Pie {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.ctx = ctx;\n    this.w = w2;\n    this.chartType = this.w.config.chart.type;\n    this.initialAnim = this.w.config.chart.animations.enabled;\n    this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;\n    this.animBeginArr = [0];\n    this.animDur = 0;\n    this.donutDataLabels = this.w.config.plotOptions.pie.donut.labels;\n    this.lineColorArr = w2.globals.stroke.colors !== void 0 ? w2.globals.stroke.colors : w2.globals.colors;\n    this.defaultSize = Math.min(w2.layout.gridWidth, w2.layout.gridHeight);\n    this.centerY = this.defaultSize / 2;\n    this.centerX = w2.layout.gridWidth / 2;\n    if (w2.config.chart.type === \"radialBar\") {\n      this.fullAngle = 360;\n    } else {\n      this.fullAngle = Math.abs(\n        w2.config.plotOptions.pie.endAngle - w2.config.plotOptions.pie.startAngle\n      );\n    }\n    this.initialAngle = w2.config.plotOptions.pie.startAngle % this.fullAngle;\n    w2.globals.radialSize = this.defaultSize / 2.05 - w2.config.stroke.width - (!w2.config.chart.sparkline.enabled ? w2.config.chart.dropShadow.blur : 0);\n    this.externalCfg = w2.config.plotOptions.pie.dataLabels.external;\n    const dlStyle = w2.config.dataLabels.style;\n    this.externalLabelStyle = {\n      fontSize: this.externalCfg.fontSize || dlStyle.fontSize,\n      fontFamily: this.externalCfg.fontFamily || dlStyle.fontFamily,\n      fontWeight: this.externalCfg.fontWeight || dlStyle.fontWeight\n    };\n    this.externalLabels = [];\n    this.externalLabelMaxLines = 1;\n    this.externalLabelLineH = parseFloat(this.externalLabelStyle.fontSize) || 12;\n    w2.globals.pieExternalLabelMarginY = 0;\n    this.showExternalLabels = this.externalCfg.show && this.chartType !== \"polarArea\";\n    if (this.showExternalLabels && !w2.globals.noData) {\n      this.reserveExternalLabelSpace();\n    }\n    this.donutSize = w2.globals.radialSize * parseInt(w2.config.plotOptions.pie.donut.size, 10) / 100;\n    const scaleSize = w2.config.plotOptions.pie.customScale;\n    const halfW = w2.layout.gridWidth / 2;\n    const halfH = w2.layout.gridHeight / 2;\n    this.translateX = halfW - halfW * scaleSize;\n    this.translateY = halfH - halfH * scaleSize;\n    this.dataLabelsGroup = new Graphics(this.w).group({\n      class: \"apexcharts-datalabels-group\",\n      transform: `translate(${this.translateX}, ${this.translateY}) scale(${scaleSize})`\n    });\n    this.maxY = 0;\n    this.sliceLabels = [];\n    this.sliceSizes = [];\n    this.prevSliceSizes = [];\n    this.sliceLabelGroups = {};\n    this.externalLabelGroups = {};\n    this.elHoverOutline = null;\n    this.elHoverOutlinePath = null;\n    this.hoverOutlineIndex = -1;\n    this.prevSectorAngleArr = [];\n  }\n  /**\n   * The text shown in an outer (name) label for slice `i`. Applies the\n   * user `name.formatter` if provided, otherwise the raw series name. The\n   * formatter may return a string or an array of strings (one per line, e.g.\n   * `[name, percent]`); normalize via `getExternalLabelLines`.\n   * @param {number} i\n   * @returns {string | string[]}\n   */\n  getExternalLabelText(i2) {\n    var _a, _b, _c;\n    const w2 = this.w;\n    const name2 = w2.seriesData.seriesNames[i2];\n    const fn = this.externalCfg.formatter;\n    if (typeof fn === \"function\") {\n      return fn(name2, {\n        seriesIndex: i2,\n        percent: (_b = (_a = w2.globals.seriesPercent) == null ? void 0 : _a[i2]) == null ? void 0 : _b[0],\n        value: (_c = w2.globals.seriesTotals) == null ? void 0 : _c[i2],\n        w: w2\n      });\n    }\n    return name2 == null ? \"\" : `${name2}`;\n  }\n  /**\n   * Outer label content for slice `i` normalized to an array of line strings.\n   * Supports a formatter returning an array, or a string with `\\n` separators.\n   * @param {number} i\n   * @returns {string[]}\n   */\n  getExternalLabelLines(i2) {\n    const raw = this.getExternalLabelText(i2);\n    const arr = Array.isArray(raw) ? raw : `${raw == null ? \"\" : raw}`.split(\"\\n\");\n    return arr.map((l2) => l2 == null ? \"\" : `${l2}`);\n  }\n  /**\n   * Shrink the pie radius (and reposition its center) so outer name labels and\n   * their connector lines fit inside the chart area without clipping. Stores\n   * the reserved vertical band on `w.globals.pieExternalLabelMarginY` so\n   * Core.resizeNonAxisCharts can grow the SVG height to match.\n   */\n  reserveExternalLabelSpace() {\n    const w2 = this.w;\n    const helpers = new CircularChartsHelpers(w2);\n    const lineSets = (w2.seriesData.seriesNames || []).map(\n      (_, i2) => this.getExternalLabelLines(i2)\n    );\n    const maxLabelWidth = helpers.getMaxLabelWidth(lineSets.flat(), {\n      fontSize: this.externalLabelStyle.fontSize,\n      fontFamily: this.externalLabelStyle.fontFamily\n    });\n    this.externalLabelMaxLines = lineSets.reduce((m2, s2) => Math.max(m2, s2.length), 1);\n    this.externalLabelLineH = Math.round(\n      (parseFloat(this.externalLabelStyle.fontSize) || 12) * 1.35\n    );\n    const cn = this.externalCfg.connector;\n    const blockHeight = this.externalLabelMaxLines * this.externalLabelLineH;\n    const mh = maxLabelWidth + (cn.length || 0) + (cn.gap || 0) + 12;\n    const mv = blockHeight / 2 + (cn.gap || 0) + 6;\n    const fitted = Math.min(\n      w2.globals.radialSize,\n      w2.layout.gridWidth / 2 - mh,\n      w2.layout.gridHeight / 2 - mv\n    );\n    w2.globals.radialSize = Math.max(fitted, this.defaultSize * 0.15);\n    w2.globals.pieExternalLabelMarginY = mv;\n    const heightStr = w2.config.chart.height ? String(w2.config.chart.height) : \"\";\n    const userSetFixedHeight = heightStr !== \"\" && heightStr !== \"auto\";\n    this.centerY = userSetFixedHeight ? w2.layout.gridHeight / 2 : w2.globals.radialSize + mv;\n  }\n  /**\n   * @param {any[]} series\n   */\n  draw(series) {\n    var _a;\n    const self = this;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const elPie = graphics.group({\n      class: \"apexcharts-pie\"\n    });\n    if (w2.globals.noData) return elPie;\n    let total = 0;\n    for (let k = 0; k < series.length; k++) {\n      total += Utils$1.negToZero(series[k]);\n    }\n    const sectorAngleArr = [];\n    const elSeries = graphics.group();\n    if (total === 0) {\n      total = 1e-5;\n    }\n    series.forEach((m2) => {\n      this.maxY = Math.max(this.maxY, m2);\n    });\n    if (w2.config.yaxis[0].max) {\n      this.maxY = w2.config.yaxis[0].max;\n    }\n    if (w2.config.grid.position === \"back\" && this.chartType === \"polarArea\") {\n      this.drawPolarElements(elPie);\n    }\n    const collapsedIdx = w2.globals.collapsedSeriesIndices || [];\n    let polarVisible = 1;\n    if (this.chartType === \"polarArea\") {\n      let visible = 0;\n      for (let k = 0; k < series.length; k++) {\n        if (collapsedIdx.indexOf(k) === -1) visible++;\n      }\n      polarVisible = Math.max(1, visible);\n    }\n    for (let i2 = 0; i2 < series.length; i2++) {\n      const angle = this.fullAngle * Utils$1.negToZero(series[i2]) / total;\n      sectorAngleArr.push(angle);\n      if (this.chartType === \"polarArea\") {\n        sectorAngleArr[i2] = collapsedIdx.indexOf(i2) > -1 ? 0 : this.fullAngle / polarVisible;\n        this.sliceSizes.push(\n          w2.globals.radialSize * series[i2] / (this.maxY || 1)\n        );\n      } else {\n        this.sliceSizes.push(w2.globals.radialSize);\n      }\n    }\n    const morphActive = ((_a = this.ctx.morphTypeChange) == null ? void 0 : _a.isActive()) === true;\n    if (w2.globals.dataChanged && !morphActive) {\n      if (this.chartType === \"polarArea\") {\n        const prevValues = w2.globals.previousPaths;\n        const stash = w2.globals.prevPolarAngles;\n        if (Array.isArray(stash) && stash.length === prevValues.length) {\n          this.prevSectorAngleArr = stash.slice();\n        } else {\n          for (let i2 = 0; i2 < prevValues.length; i2++) {\n            this.prevSectorAngleArr.push(\n              this.fullAngle / Math.max(1, prevValues.length)\n            );\n          }\n        }\n        let prevMaxY = 0;\n        for (let k = 0; k < prevValues.length; k++) {\n          prevMaxY = Math.max(prevMaxY, Utils$1.negToZero(prevValues[k]));\n        }\n        if (w2.config.yaxis[0].max) {\n          prevMaxY = w2.config.yaxis[0].max;\n        }\n        this.prevSliceSizes = prevValues.map(\n          (v2) => w2.globals.radialSize * Utils$1.negToZero(v2) / (prevMaxY || 1)\n        );\n      } else {\n        let prevTotal = 0;\n        for (let k = 0; k < w2.globals.previousPaths.length; k++) {\n          prevTotal += Utils$1.negToZero(w2.globals.previousPaths[k]);\n        }\n        let previousAngle;\n        for (let i2 = 0; i2 < w2.globals.previousPaths.length; i2++) {\n          previousAngle = this.fullAngle * Utils$1.negToZero(w2.globals.previousPaths[i2]) / prevTotal;\n          this.prevSectorAngleArr.push(previousAngle);\n        }\n      }\n    }\n    if (this.chartType === \"polarArea\") {\n      w2.globals.prevPolarAngles = sectorAngleArr.slice();\n    }\n    if (this.donutSize < 0) {\n      this.donutSize = 0;\n    }\n    if (this.chartType === \"donut\") {\n      const circle = graphics.drawCircle(this.donutSize);\n      circle.attr({\n        cx: this.centerX,\n        cy: this.centerY,\n        fill: w2.config.plotOptions.pie.donut.background ? w2.config.plotOptions.pie.donut.background : \"transparent\"\n      });\n      elSeries.add(circle);\n    }\n    const elG = self.drawArcs(sectorAngleArr, series);\n    this.sliceLabels.forEach((s2) => {\n      elG.add(s2);\n    });\n    elSeries.attr({\n      transform: `translate(${this.translateX}, ${this.translateY}) scale(${w2.config.plotOptions.pie.customScale})`\n    });\n    elSeries.add(elG);\n    elPie.add(elSeries);\n    if (this.donutDataLabels.show) {\n      const shouldFadeInLabels = this.initialAnim && !w2.globals.resized && !w2.globals.dataChanged && this.animDur > 0;\n      const dataLabels = this.renderInnerDataLabels(\n        this.dataLabelsGroup,\n        this.donutDataLabels,\n        {\n          hollowSize: this.donutSize,\n          centerX: this.centerX,\n          centerY: this.centerY,\n          opacity: shouldFadeInLabels ? 0 : this.donutDataLabels.show\n        }\n      );\n      if (shouldFadeInLabels) {\n        const labelsNode = this.dataLabelsGroup.node;\n        labelsNode.style.transition = \"opacity 280ms ease-out\";\n        setTimeout(() => {\n          labelsNode.style.opacity = \"1\";\n        }, this.animDur);\n      }\n      elPie.add(dataLabels);\n    }\n    if (w2.config.grid.position === \"front\" && this.chartType === \"polarArea\") {\n      this.drawPolarElements(elPie);\n    }\n    return elPie;\n  }\n  // core function for drawing pie arcs\n  /**\n   * @param {any[]} sectorAngleArr\n   * @param {any[]} series\n   */\n  drawArcs(sectorAngleArr, series) {\n    var _a, _b, _c, _d, _e;\n    const w2 = this.w;\n    const filters = new Filters(this.w);\n    const graphics = new Graphics(this.w);\n    const fill = new Fill(this.w);\n    const g2 = graphics.group({\n      class: \"apexcharts-slices\"\n    });\n    this.elHoverOutline = graphics.group({\n      class: \"apexcharts-pie-hover-outline\"\n    });\n    this.elHoverOutline.node.style.pointerEvents = \"none\";\n    this.elHoverOutline.node.style.opacity = \"0\";\n    if (w2.config.chart.animations.enabled) {\n      this.elHoverOutline.node.style.transition = HOVER_OUTLINE_TRANSITION;\n    }\n    g2.add(this.elHoverOutline);\n    let startAngle = this.initialAngle;\n    let prevStartAngle = this.initialAngle;\n    let endAngle = this.initialAngle;\n    let prevEndAngle = this.initialAngle;\n    this.strokeWidth = w2.config.stroke.show ? w2.config.stroke.width : 0;\n    const morphActive = ((_a = this.ctx.morphTypeChange) == null ? void 0 : _a.isActive()) === true;\n    for (let i2 = 0; i2 < sectorAngleArr.length; i2++) {\n      const elPieArc = graphics.group({\n        class: `apexcharts-series apexcharts-pie-series`,\n        seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[i2]),\n        rel: i2 + 1,\n        \"data:realIndex\": i2\n      });\n      g2.add(elPieArc);\n      startAngle = endAngle;\n      prevStartAngle = prevEndAngle;\n      endAngle = startAngle + sectorAngleArr[i2];\n      prevEndAngle = prevStartAngle + this.prevSectorAngleArr[i2];\n      const angle = endAngle < startAngle ? this.fullAngle + endAngle - startAngle : endAngle - startAngle;\n      const pathFill = fill.fillPath({\n        seriesNumber: i2,\n        size: this.sliceSizes[i2],\n        value: series[i2]\n      });\n      const morphFrom = morphActive ? this.ctx.morphTypeChange.getInitialPathFor(i2, 0) : null;\n      const prevSize = this.chartType === \"polarArea\" && w2.globals.dataChanged && !morphActive ? this.prevSliceSizes[i2] || 0 : void 0;\n      const path = morphFrom || this.getChangedPath(prevStartAngle, prevEndAngle, prevSize);\n      const elPath = graphics.drawPath({\n        d: path,\n        // Pie/donut/polarArea data is a single series, so a user-supplied\n        // `stroke.colors` shorter than the slice count is NOT padded by the\n        // theme engine (unlike fill colors, which cycle). Without this, only\n        // slice 0 gets the requested color and the rest fall back to a grey\n        // default. Cycle the array — matching fill-color behaviour — so a\n        // single `stroke.colors: ['#fff']` borders every slice as expected.\n        stroke: Array.isArray(this.lineColorArr) ? (_b = this.lineColorArr[i2]) != null ? _b : this.lineColorArr[i2 % this.lineColorArr.length] : this.lineColorArr,\n        strokeWidth: 0,\n        fill: pathFill,\n        fillOpacity: w2.config.fill.opacity,\n        classes: `apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`\n      });\n      elPath.attr({\n        index: 0,\n        j: i2\n      });\n      filters.setSelectionFilter(elPath, 0, i2);\n      if (w2.config.chart.dropShadow.enabled) {\n        const shadow = w2.config.chart.dropShadow;\n        filters.dropShadow(elPath, shadow, i2);\n      }\n      this.addListeners(elPath, this.donutDataLabels, i2);\n      let labelPosition = {\n        x: 0,\n        y: 0\n      };\n      const midAngle = (startAngle + angle / 2) % this.fullAngle;\n      let arcCenter = { x: this.centerX, y: this.centerY };\n      if (this.chartType === \"pie\" || this.chartType === \"polarArea\") {\n        labelPosition = Utils$1.polarToCartesian(\n          this.centerX,\n          this.centerY,\n          w2.globals.radialSize / 1.25 + w2.config.plotOptions.pie.dataLabels.offset,\n          midAngle\n        );\n        arcCenter = Utils$1.polarToCartesian(\n          this.centerX,\n          this.centerY,\n          w2.globals.radialSize / 2,\n          midAngle\n        );\n      } else if (this.chartType === \"donut\") {\n        labelPosition = Utils$1.polarToCartesian(\n          this.centerX,\n          this.centerY,\n          (w2.globals.radialSize + this.donutSize) / 2 + w2.config.plotOptions.pie.dataLabels.offset,\n          midAngle\n        );\n        arcCenter = Utils$1.polarToCartesian(\n          this.centerX,\n          this.centerY,\n          (w2.globals.radialSize + this.donutSize) / 2,\n          midAngle\n        );\n      }\n      Graphics.setAttrs(elPath.node, {\n        \"data:angle\": angle,\n        \"data:startAngle\": startAngle,\n        \"data:strokeWidth\": this.strokeWidth,\n        \"data:value\": series[i2],\n        \"data:cx\": arcCenter.x,\n        \"data:cy\": arcCenter.y\n      });\n      elPieArc.add(elPath);\n      let pieceClaimed = false;\n      if (morphActive) {\n        const finalD = this.getPiePath({\n          me: this,\n          startAngle,\n          angle,\n          size: this.sliceSizes[i2]\n        });\n        elPath.node.setAttribute(\"data:pathFinal\", finalD);\n        pieceClaimed = ((_d = (_c = this.ctx.morphTypeChange).claimsTargetMark) == null ? void 0 : _d.call(_c, i2, 0)) === true;\n        if (pieceClaimed) {\n          elPath.attr({ d: finalD });\n          elPath.node.setAttribute(\"data:pathOrig\", finalD);\n          elPath.node.setAttribute(\"opacity\", \"0\");\n          elPath.node.setAttribute(\"data-piece-hidden\", \"1\");\n        }\n      }\n      let dur = 0;\n      if (this.initialAnim && !w2.globals.resized && !w2.globals.dataChanged) {\n        dur = angle / this.fullAngle * w2.config.chart.animations.speed;\n        if (dur === 0) dur = 1;\n        this.animDur = dur + this.animDur;\n        this.animBeginArr.push(this.animDur);\n      } else {\n        this.animBeginArr.push(0);\n      }\n      if (pieceClaimed) ;\n      else if (morphActive && morphFrom) {\n        const targetD = this.getPiePath({\n          me: this,\n          startAngle,\n          angle,\n          size: this.sliceSizes[i2]\n        });\n        const morphSpeed = this.ctx.morphTypeChange.getSpeed();\n        const animations = this.ctx.animations;\n        elPath.node.setAttribute(\"data:pathOrig\", targetD);\n        const morphRunner = elPath.animate(morphSpeed).plot(targetD, \"polygons\").attr({ \"stroke-width\": this.strokeWidth });\n        if (morphRunner && typeof morphRunner.after === \"function\") {\n          morphRunner.after(() => animations.animationCompleted(elPath));\n        } else {\n          animations.animationCompleted(elPath);\n        }\n      } else if (this.dynamicAnim && w2.globals.dataChanged) {\n        this.animatePaths(elPath, {\n          size: this.sliceSizes[i2],\n          prevSize,\n          endAngle,\n          startAngle,\n          prevStartAngle,\n          prevEndAngle,\n          animateStartingPos: true,\n          i: i2,\n          animBeginArr: this.animBeginArr,\n          shouldSetPrevPaths: true,\n          dur: w2.config.chart.animations.dynamicAnimation.speed\n        });\n      } else {\n        this.animatePaths(elPath, {\n          size: this.sliceSizes[i2],\n          endAngle,\n          startAngle,\n          i: i2,\n          totalItems: sectorAngleArr.length - 1,\n          animBeginArr: this.animBeginArr,\n          dur\n        });\n      }\n      if (this.getExpandOffset() > 0) {\n        elPath.node.addEventListener(\"mouseup\", this.pieClicked.bind(this, i2));\n      } else if (i2 === 0 && Filters.drilldownBlocksSliceOffset(w2)) {\n        (_e = this.ctx.drilldown) == null ? void 0 : _e.warnSliceOffsetDisabled();\n      }\n      if (typeof w2.interact.selectedDataPoints[0] !== \"undefined\" && w2.interact.selectedDataPoints[0].indexOf(i2) > -1) {\n        if (this.initialAnim && !w2.globals.resized && !w2.globals.dataChanged && this.animDur > 0) {\n          const _this = this;\n          const _i = i2;\n          setTimeout(() => _this.pieClicked(_i, { animate: false }), this.animDur);\n        } else {\n          this.pieClicked(i2, { animate: false });\n        }\n      }\n      if (w2.config.dataLabels.enabled) {\n        const xPos = labelPosition.x;\n        const yPos = labelPosition.y;\n        let text = 100 * angle / this.fullAngle + \"%\";\n        if (angle !== 0 && w2.config.plotOptions.pie.dataLabels.minAngleToShowLabel < sectorAngleArr[i2]) {\n          const formatter = w2.config.dataLabels.formatter;\n          if (formatter !== void 0) {\n            text = formatter(w2.globals.seriesPercent[i2][0], {\n              seriesIndex: i2,\n              w: w2\n            });\n          }\n          const foreColor = w2.globals.dataLabels.style.colors[i2];\n          const elPieLabelWrap = graphics.group({\n            class: `apexcharts-datalabels`\n          });\n          const elPieLabel = graphics.drawText({\n            x: xPos,\n            y: yPos,\n            text,\n            textAnchor: \"middle\",\n            fontSize: w2.config.dataLabels.style.fontSize,\n            fontFamily: w2.config.dataLabels.style.fontFamily,\n            fontWeight: w2.config.dataLabels.style.fontWeight,\n            foreColor\n          });\n          elPieLabelWrap.add(elPieLabel);\n          if (w2.config.dataLabels.dropShadow.enabled) {\n            const textShadow = w2.config.dataLabels.dropShadow;\n            filters.dropShadow(elPieLabel, textShadow);\n          }\n          elPieLabel.node.classList.add(\"apexcharts-pie-label\");\n          if (w2.config.chart.animations.animate && w2.globals.resized === false) {\n            elPieLabel.node.classList.add(\"apexcharts-pie-label-delay\");\n            elPieLabel.node.style.animationDelay = w2.config.chart.animations.speed / 940 + \"s\";\n          }\n          this.sliceLabels.push(elPieLabelWrap);\n          this.sliceLabelGroups[i2] = elPieLabelWrap.node;\n        }\n      }\n      if (this.showExternalLabels && angle !== 0) {\n        const lines = this.getExternalLabelLines(i2);\n        if (lines.some((l2) => l2 !== \"\")) {\n          const anchor = Utils$1.polarToCartesian(\n            this.centerX,\n            this.centerY,\n            w2.globals.radialSize,\n            midAngle\n          );\n          const elbow = Utils$1.polarToCartesian(\n            this.centerX,\n            this.centerY,\n            w2.globals.radialSize + (this.externalCfg.connector.gap || 0),\n            midAngle\n          );\n          const isRight = elbow.x >= this.centerX;\n          const baseLabelX = isRight ? elbow.x + (this.externalCfg.connector.length || 0) : elbow.x - (this.externalCfg.connector.length || 0);\n          this.externalLabels.push({\n            i: i2,\n            lines,\n            anchor,\n            elbow,\n            side: isRight ? \"right\" : \"left\",\n            labelX: baseLabelX + parseFloat(this.externalCfg.offsetX || 0),\n            idealY: elbow.y + parseFloat(this.externalCfg.offsetY || 0),\n            connectorColor: this.externalCfg.connector.color || w2.globals.colors[i2],\n            foreColor: this.externalCfg.color || w2.config.chart.foreColor\n          });\n        }\n      }\n    }\n    if (this.showExternalLabels && this.externalLabels.length) {\n      this.placeExternalLabels();\n      const revealOnAnimEnd = Environment.isBrowser() && (morphActive || this.dynamicAnim && w2.globals.dataChanged || this.initialAnim && !w2.globals.resized && !w2.globals.dataChanged);\n      this.externalLabels.forEach((lbl) => {\n        const group = new CircularChartsHelpers(w2).drawExternalLabel({\n          lines: lbl.lines,\n          lineHeight: this.externalLabelLineH,\n          anchor: lbl.anchor,\n          elbow: lbl.elbow,\n          labelX: lbl.labelX,\n          labelY: lbl.labelY,\n          side: lbl.side,\n          connector: {\n            show: this.externalCfg.connector.show,\n            width: this.externalCfg.connector.width,\n            color: lbl.connectorColor\n          },\n          style: this.externalLabelStyle,\n          foreColor: lbl.foreColor\n        });\n        if (revealOnAnimEnd) {\n          group.node.classList.add(\"apexcharts-element-hidden\");\n          w2.globals.delayedElements.push({ el: group.node });\n        }\n        this.externalLabelGroups[lbl.i] = group.node;\n        g2.add(group);\n      });\n    }\n    return g2;\n  }\n  /**\n   * Vertical de-overlap for outer (name) labels: per side, sort by ideal y and\n   * push neighbours apart so they keep at least one line-height of spacing.\n   * Mutates each entry's `labelY`. Connector lines re-route to the moved y.\n   */\n  placeExternalLabels() {\n    const w2 = this.w;\n    const lineHeight = this.externalLabelMaxLines * this.externalLabelLineH + 2;\n    const maxY = this.centerY + w2.globals.radialSize + w2.globals.pieExternalLabelMarginY;\n    [\"left\", \"right\"].forEach((side) => {\n      spaceOutLabels(\n        this.externalLabels.filter((l2) => l2.side === side),\n        lineHeight,\n        maxY\n      );\n    });\n  }\n  /**\n   * @param {any} elPath\n   * @param {Record<string, any>} dataLabels\n   * @param {number} [i] slice index, for the hover outline band\n   */\n  addListeners(elPath, dataLabels, i2) {\n    const graphics = new Graphics(this.w, this.ctx);\n    elPath.node.addEventListener(\n      \"mouseenter\",\n      graphics.pathMouseEnter.bind(graphics, elPath)\n    );\n    elPath.node.addEventListener(\n      \"mouseleave\",\n      graphics.pathMouseLeave.bind(graphics, elPath)\n    );\n    elPath.node.addEventListener(\n      \"mouseleave\",\n      this.revertDataLabelsInner.bind(this)\n    );\n    if (typeof i2 === \"number\") {\n      elPath.node.addEventListener(\n        \"mouseenter\",\n        this.showHoverOutline.bind(this, i2)\n      );\n      elPath.node.addEventListener(\n        \"mouseleave\",\n        this.hideHoverOutline.bind(this)\n      );\n    }\n    elPath.node.addEventListener(\n      \"mousedown\",\n      graphics.pathMouseDown.bind(graphics, elPath)\n    );\n    if (!this.donutDataLabels.total.showAlways) {\n      elPath.node.addEventListener(\n        \"mouseenter\",\n        this.printDataLabelsInner.bind(this, elPath.node, dataLabels)\n      );\n      elPath.node.addEventListener(\n        \"mousedown\",\n        this.printDataLabelsInner.bind(this, elPath.node, dataLabels)\n      );\n    }\n  }\n  // This function can be used for other circle charts too\n  /**\n   * @param {any} el\n   * @param {Record<string, any>} opts\n   */\n  animatePaths(el, opts) {\n    const w2 = this.w;\n    const me = this;\n    let angle = opts.endAngle < opts.startAngle ? this.fullAngle + opts.endAngle - opts.startAngle : opts.endAngle - opts.startAngle;\n    let prevAngle = angle;\n    let fromStartAngle = opts.startAngle;\n    const toStartAngle = opts.startAngle;\n    if (opts.prevStartAngle !== void 0 && opts.prevEndAngle !== void 0) {\n      fromStartAngle = opts.prevEndAngle;\n      prevAngle = opts.prevEndAngle < opts.prevStartAngle ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle : opts.prevEndAngle - opts.prevStartAngle;\n    }\n    if (opts.i === w2.config.series.length - 1) {\n      if (angle + toStartAngle > this.fullAngle) {\n        opts.endAngle = opts.endAngle - (angle + toStartAngle);\n      } else if (angle + toStartAngle < this.fullAngle) {\n        opts.endAngle = opts.endAngle + (this.fullAngle - (angle + toStartAngle));\n      }\n    }\n    if (angle === this.fullAngle) angle = this.fullAngle - 0.01;\n    me.animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts);\n  }\n  /**\n   * @param {any} el\n   * @param {number} fromStartAngle\n   * @param {number} toStartAngle\n   * @param {number} angle\n   * @param {number} prevAngle\n   * @param {Record<string, any>} opts\n   */\n  animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts) {\n    const me = this;\n    const w2 = this.w;\n    const animations = new Animations(this.w);\n    const size = opts.size;\n    let path;\n    if (isNaN(fromStartAngle) || isNaN(prevAngle)) {\n      fromStartAngle = toStartAngle;\n      prevAngle = angle;\n      opts.dur = 0;\n    }\n    let currAngle = angle;\n    let startAngle = toStartAngle;\n    const fromAngle = fromStartAngle < toStartAngle ? this.fullAngle + fromStartAngle - toStartAngle : fromStartAngle - toStartAngle;\n    const hasPrevSize = typeof opts.prevSize === \"number\";\n    if (w2.globals.dataChanged && opts.shouldSetPrevPaths) {\n      if (opts.prevEndAngle) {\n        path = me.getPiePath({\n          me,\n          startAngle: opts.prevStartAngle,\n          angle: opts.prevEndAngle < opts.prevStartAngle ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle : opts.prevEndAngle - opts.prevStartAngle,\n          size: hasPrevSize ? opts.prevSize : size\n        });\n        el.attr({ d: path });\n      }\n    }\n    if (opts.dur !== 0) {\n      el.animate(opts.dur, opts.animBeginArr[opts.i]).after(\n        /** @this {any} */\n        function() {\n          if (me.chartType === \"pie\" || me.chartType === \"donut\" || me.chartType === \"polarArea\") {\n            this.animate(\n              w2.config.chart.animations.dynamicAnimation.speed\n            ).attr({\n              \"stroke-width\": me.strokeWidth\n            });\n          }\n          if (opts.i === w2.config.series.length - 1) {\n            animations.animationCompleted(el);\n          }\n        }\n      ).during((pos) => {\n        currAngle = fromAngle + (angle - fromAngle) * pos;\n        if (opts.animateStartingPos) {\n          currAngle = prevAngle + (angle - prevAngle) * pos;\n          startAngle = fromStartAngle - prevAngle + (toStartAngle - (fromStartAngle - prevAngle)) * pos;\n        }\n        path = me.getPiePath({\n          me,\n          startAngle,\n          angle: currAngle,\n          size: hasPrevSize ? opts.prevSize + (size - opts.prevSize) * pos : size\n        });\n        el.node.setAttribute(\"data:pathOrig\", path);\n        el.attr({\n          d: path\n        });\n      });\n    } else {\n      path = me.getPiePath({\n        me,\n        startAngle,\n        angle,\n        size\n      });\n      if (!opts.isTrack) {\n        w2.globals.animationEnded = true;\n      }\n      el.node.setAttribute(\"data:pathOrig\", path);\n      el.attr({\n        d: path,\n        \"stroke-width\": me.strokeWidth\n      });\n    }\n  }\n  /**\n   * Toggle slice `i` in or out of the pie. Only one slice sits outside at a\n   * time. Bound to `mouseup` on each slice, and also reached from the\n   * `toggleDataPointSelection` API and from the pre-selected-slice pass in\n   * drawArcs (which passes `animate: false` so the slice is already parked by\n   * the time the first frame is painted).\n   * @param {number} i\n   * @param {{animate?: boolean}} [opts] a MouseEvent when called as a listener,\n   *   which carries no `animate`, so real clicks animate\n   */\n  pieClicked(i2, opts) {\n    const w2 = this.w;\n    const me = this;\n    const animate = !(opts && opts.animate === false);\n    const elPath = w2.dom.Paper.findOne(\n      `.apexcharts-${me.chartType.toLowerCase()}-slice-${i2}`\n    );\n    if (!elPath) return;\n    if (elPath.attr(\"data:pieClicked\") === \"true\") {\n      elPath.attr({\n        \"data:pieClicked\": \"false\"\n      });\n      this.revertDataLabelsInner();\n      this.offsetSlice(i2, 0, animate);\n      return;\n    }\n    const allEls = w2.dom.baseEl.getElementsByClassName(\"apexcharts-pie-area\");\n    Array.prototype.forEach.call(allEls, (pieSlice) => {\n      const wasOut = pieSlice.getAttribute(\"data:pieClicked\") === \"true\";\n      pieSlice.setAttribute(\"data:pieClicked\", \"false\");\n      if (wasOut) {\n        this.offsetSlice(parseInt(pieSlice.getAttribute(\"j\"), 10), 0, animate);\n      }\n    });\n    w2.interact.capturedDataPointIndex = i2;\n    elPath.attr(\"data:pieClicked\", \"true\");\n    this.offsetSlice(i2, this.getExpandOffset(), animate);\n  }\n  /**\n   * How far a clicked slice slides out, in px. 0 when the pull-out is off, when\n   * drilldown owns the click, and always for polarArea: there the radius\n   * encodes the value, so moving a slice outward would read as a bigger number.\n   * @returns {number}\n   */\n  getExpandOffset() {\n    const pie = this.w.config.plotOptions.pie;\n    if (!pie.expandOnClick || this.chartType === \"polarArea\") return 0;\n    if (Filters.drilldownBlocksSliceOffset(this.w)) return 0;\n    const offset = Number(pie.expandOffset);\n    return Number.isFinite(offset) && offset > 0 ? offset : 0;\n  }\n  /**\n   * Every node that has to travel with slice `i`: the slice path itself plus\n   * its labels, which live in sibling groups so they paint above all slices.\n   * @param {number} i\n   * @returns {SVGElement[]}\n   */\n  getSliceMovers(i2) {\n    const elPath = this.w.dom.Paper.findOne(\n      `.apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`\n    );\n    return [\n      elPath ? elPath.node : null,\n      this.sliceLabelGroups[i2],\n      this.externalLabelGroups[i2],\n      // The hover band, when it is this slice's: clicking a slice you are\n      // hovering has to take its outline along, or the band is left behind\n      // sitting in the gap the slice just opened.\n      this.hoverOutlineIndex === i2 && this.elHoverOutlinePath ? this.elHoverOutlinePath.node : null\n    ].filter(Boolean);\n  }\n  /**\n   * Slide slice `i` `dist` px out of the pie along its own mid-angle, or back\n   * to its resting place when `dist` is 0.\n   *\n   * The slice is *translated*, never re-drawn: the arc keeps the exact radius\n   * and span it had, so the pulled-out slice still encodes the same quantity\n   * (growing the radius, as this used to, quietly inflates it) and a clean gap\n   * opens between it and the rest of the pie.\n   * @param {number} i\n   * @param {number} dist\n   * @param {boolean} [animate] false to park it instantly, with no transition\n   */\n  offsetSlice(i2, dist, animate = true) {\n    const w2 = this.w;\n    const elPath = w2.dom.Paper.findOne(\n      `.apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`\n    );\n    if (!elPath) return;\n    const { dx, dy } = this.getSliceOffsetVector(i2, dist);\n    const transform = `translate(${dx} ${dy})`;\n    const transition = animate && w2.config.chart.animations.enabled ? SLICE_OFFSET_TRANSITION : \"\";\n    this.getSliceMovers(i2).forEach((node) => {\n      node.style.transition = transition;\n      node.setAttribute(\"transform\", transform);\n    });\n  }\n  /**\n   * The px vector `dist` along slice `i`'s mid-angle. Zero for a slice that\n   * fills the pie: there is no \"outside\" for it to move to, and sliding it\n   * would just shift the whole chart sideways.\n   * @param {number} i\n   * @param {number} dist\n   * @returns {{dx: number, dy: number}}\n   */\n  getSliceOffsetVector(i2, dist) {\n    const elPath = this.w.dom.Paper.findOne(\n      `.apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`\n    );\n    const angle = elPath ? parseFloat(elPath.attr(\"data:angle\")) : NaN;\n    if (!dist || !Number.isFinite(angle) || angle >= this.fullAngle) {\n      return { dx: 0, dy: 0 };\n    }\n    const startAngle = parseFloat(elPath.attr(\"data:startAngle\"));\n    const midRad = Math.PI * (startAngle + angle / 2 - 90) / 180;\n    return { dx: dist * Math.cos(midRad), dy: dist * Math.sin(midRad) };\n  }\n  /**\n   * Fade in the hover outline: a translucent band traced just outside the rim\n   * of slice `i`, in the slice's own colour. It replaces lightening the slice\n   * (see Filters.hoverOutlineOwnsHoverState) so a hovered slice keeps the\n   * colour the legend and the data labels claim it has.\n   * @param {number} i\n   */\n  showHoverOutline(i2) {\n    const w2 = this.w;\n    if (!Filters.hoverOutlineOwnsHoverState(w2)) return;\n    if (!this.elHoverOutline) return;\n    const path = this.getHoverOutlinePath(i2);\n    if (!path) return;\n    const cfg = w2.config.plotOptions.pie.hoverOutline;\n    const fill = cfg.color || w2.globals.colors[i2];\n    if (!this.elHoverOutlinePath) {\n      const graphics = new Graphics(w2);\n      this.elHoverOutlinePath = graphics.drawPath({\n        d: path,\n        fill,\n        strokeWidth: 0,\n        classes: \"apexcharts-pie-hover-outline-band\"\n      });\n      this.elHoverOutline.add(this.elHoverOutlinePath);\n    }\n    this.elHoverOutlinePath.attr({\n      d: path,\n      fill,\n      \"fill-opacity\": cfg.opacity\n    });\n    const { dx, dy } = this.getSliceOffsetVector(\n      i2,\n      this.isSliceOut(i2) ? this.getExpandOffset() : 0\n    );\n    this.elHoverOutlinePath.node.style.transition = \"\";\n    this.elHoverOutlinePath.node.setAttribute(\"transform\", `translate(${dx} ${dy})`);\n    this.hoverOutlineIndex = i2;\n    this.elHoverOutline.node.style.opacity = \"1\";\n  }\n  /** Fade the hover outline back out, leaving the band node in place. */\n  hideHoverOutline() {\n    if (this.elHoverOutline) {\n      this.elHoverOutline.node.style.opacity = \"0\";\n    }\n  }\n  /** @param {number} i @returns {boolean} */\n  isSliceOut(i2) {\n    const elPath = this.w.dom.Paper.findOne(\n      `.apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`\n    );\n    return !!elPath && elPath.attr(\"data:pieClicked\") === \"true\";\n  }\n  /**\n   * Band geometry for the hover outline of slice `i`: an annulus from the\n   * slice rim (plus the stroke and the configured clearance) outward, over the\n   * same angular extent the slice is actually drawn over, so it lines up with\n   * both slice edges even with `spacing` insetting them. Rounded into a pill\n   * when the band is thick enough for the fillets to fit.\n   * @param {number} i\n   * @returns {string | null}\n   */\n  getHoverOutlinePath(i2) {\n    const w2 = this.w;\n    const cfg = w2.config.plotOptions.pie.hoverOutline;\n    const elPath = w2.dom.Paper.findOne(\n      `.apexcharts-${this.chartType.toLowerCase()}-slice-${i2}`\n    );\n    if (!elPath) return null;\n    const angle = parseFloat(elPath.attr(\"data:angle\"));\n    if (!Number.isFinite(angle) || angle <= 0) return null;\n    const size = this.sliceSizes[i2];\n    const thickness = Number(cfg.size);\n    if (!Number.isFinite(size) || !Number.isFinite(thickness) || thickness <= 0) {\n      return null;\n    }\n    const { startDeg, spanDeg } = this.getSliceExtent({\n      me: this,\n      startAngle: parseFloat(elPath.attr(\"data:startAngle\")),\n      angle,\n      size\n    });\n    if (!(spanDeg > 0)) return null;\n    const rIn = size + (this.strokeWidth || 0) / 2 + (Number(cfg.gap) || 0);\n    const rOut = rIn + thickness;\n    const geo = {\n      cx: this.centerX,\n      cy: this.centerY,\n      rIn,\n      rOut,\n      a0: startDeg,\n      a1: startDeg + spanDeg,\n      spanDeg\n    };\n    const r2 = Math.min(thickness / 2, spanDeg * Math.PI / 180 / 2 * rIn);\n    return r2 > 0.5 ? roundedDonutSegmentPath(__spreadProps(__spreadValues({}, geo), { r: r2 })) : sharpDonutSegmentPath(geo);\n  }\n  /**\n   * @param {number} prevStartAngle\n   * @param {number} prevEndAngle\n   */\n  /**\n   * @param {number} prevStartAngle\n   * @param {number} prevEndAngle\n   * @param {number} [prevSize] - polarArea passes its previous slice radius,\n   *   so the pre-animation frame sits at the previous VALUE too, not just the\n   *   previous angles.\n   */\n  getChangedPath(prevStartAngle, prevEndAngle, prevSize) {\n    let path = \"\";\n    if (this.dynamicAnim && this.w.globals.dataChanged) {\n      path = this.getPiePath({\n        me: this,\n        startAngle: prevStartAngle,\n        angle: prevEndAngle - prevStartAngle,\n        // @ts-ignore — size is set dynamically during draw()\n        size: typeof prevSize === \"number\" ? prevSize : this.size\n      });\n    }\n    return path;\n  }\n  /**\n   * The angular extent a slice is actually drawn over: the raw start / span\n   * clamped so a full circle never overlaps itself, then inset by\n   * `plotOptions.pie.spacing`. Shared by getPiePath and the hover outline, so\n   * the band lines up with the slice edges instead of with the un-inset angles\n   * cached on the path node.\n   * @param {{me: any, startAngle: number, angle: number, size: number}} opts\n   * @returns {{startDeg: number, spanDeg: number, endDeg: number}}\n   */\n  getSliceExtent({ me, startAngle, angle, size }) {\n    const w2 = this.w;\n    let startDeg = startAngle;\n    let endDeg = angle + startAngle;\n    if (Math.ceil(endDeg) >= this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle) {\n      endDeg = this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle - 0.01;\n    }\n    let spanDeg = endDeg - startDeg;\n    const isSliceType = me.chartType === \"pie\" || me.chartType === \"donut\" || me.chartType === \"polarArea\";\n    const spacing = w2.config.plotOptions.pie.spacing;\n    if (isSliceType && spacing > 0 && spanDeg > 0) {\n      const rRef = me.chartType === \"donut\" ? (size + me.donutSize) / 2 : size;\n      const gapDeg = rRef > 0 ? spacing / rRef * (180 / Math.PI) : 0;\n      const inset = Math.min(gapDeg / 2, Math.max(0, spanDeg / 2 - 0.5));\n      startDeg += inset;\n      spanDeg -= 2 * inset;\n    }\n    endDeg = startDeg + spanDeg;\n    if (Math.ceil(endDeg) > this.fullAngle) endDeg -= this.fullAngle;\n    return { startDeg, spanDeg, endDeg };\n  }\n  /** @param {{me: any, startAngle: any, angle: any, size: any}} opts */\n  getPiePath({ me, startAngle, angle, size }) {\n    let path;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const { startDeg, spanDeg, endDeg } = this.getSliceExtent({\n      me,\n      startAngle,\n      angle,\n      size\n    });\n    const isSliceType = me.chartType === \"pie\" || me.chartType === \"donut\" || me.chartType === \"polarArea\";\n    const startRadians = Math.PI * (startDeg - 90) / 180;\n    const borderRadius = w2.config.plotOptions.pie.borderRadius;\n    if (borderRadius > 0 && isSliceType) {\n      const roundedPath = this.getRoundedSlicePath({\n        me,\n        startDeg,\n        spanDeg,\n        size,\n        borderRadius\n      });\n      if (roundedPath) return roundedPath;\n    }\n    const endRadians = Math.PI * (endDeg - 90) / 180;\n    const x1 = me.centerX + size * Math.cos(startRadians);\n    const y1 = me.centerY + size * Math.sin(startRadians);\n    const x2 = me.centerX + size * Math.cos(endRadians);\n    const y2 = me.centerY + size * Math.sin(endRadians);\n    const startInner = Utils$1.polarToCartesian(\n      me.centerX,\n      me.centerY,\n      me.donutSize,\n      endDeg\n    );\n    const endInner = Utils$1.polarToCartesian(\n      me.centerX,\n      me.centerY,\n      me.donutSize,\n      startDeg\n    );\n    const largeArc = spanDeg > 180 ? 1 : 0;\n    const pathBeginning = [\"M\", x1, y1, \"A\", size, size, 0, largeArc, 1, x2, y2];\n    if (me.chartType === \"donut\") {\n      path = [\n        ...pathBeginning,\n        \"L\",\n        startInner.x,\n        startInner.y,\n        \"A\",\n        me.donutSize,\n        me.donutSize,\n        0,\n        largeArc,\n        0,\n        endInner.x,\n        endInner.y,\n        \"L\",\n        x1,\n        y1,\n        \"z\"\n      ].join(\" \");\n    } else if (me.chartType === \"pie\" || me.chartType === \"polarArea\") {\n      path = [...pathBeginning, \"L\", me.centerX, me.centerY, \"L\", x1, y1].join(\n        \" \"\n      );\n    } else {\n      path = [...pathBeginning].join(\" \");\n    }\n    return graphics.roundPathCorners(path, this.strokeWidth * 2);\n  }\n  /**\n   * Build a slice path with rounded corners (plotOptions.pie.borderRadius).\n   *\n   * The generic roundPathCorners() only rounds line->line joins, but a slice\n   * corner is an arc<->line join, so we construct the fillets explicitly here:\n   * every corner is inset by the (clamped) radius along both the arc and the\n   * radial edge, and a quadratic Bezier with its control point at the original\n   * sharp corner bridges the two inset points. Donut slices round all four\n   * corners; pie / polarArea slices round the two outer corners and keep the\n   * center apex sharp.\n   *\n   * Returns null when the slice is too small to round meaningfully, so the\n   * caller can fall back to a sharp-corner path.\n   *\n   * @param {{me: any, startDeg: number, spanDeg: number, size: number, borderRadius: number}} opts\n   * @returns {string | null}\n   */\n  getRoundedSlicePath({ me, startDeg, spanDeg, size, borderRadius }) {\n    if (!(spanDeg > 0)) return null;\n    const D2R2 = Math.PI / 180;\n    const cx = me.centerX;\n    const cy = me.centerY;\n    const isDonut = me.chartType === \"donut\";\n    const rOut = size;\n    const rIn = isDonut ? me.donutSize : 0;\n    const spanRad = spanDeg * D2R2;\n    let r2 = borderRadius;\n    r2 = Math.min(r2, spanRad * rOut / 2);\n    if (isDonut) {\n      r2 = Math.min(r2, spanRad * rIn / 2);\n      r2 = Math.min(r2, (rOut - rIn) / 2);\n    } else {\n      r2 = Math.min(r2, rOut / 2);\n    }\n    if (!(r2 > 0.5)) return null;\n    const a0 = startDeg;\n    const a1 = startDeg + spanDeg;\n    if (isDonut) {\n      return roundedDonutSegmentPath({ cx, cy, rIn, rOut, a0, a1, r: r2, spanDeg });\n    }\n    return roundedPieSegmentPath({ cx, cy, rOut, a0, a1, r: r2, spanDeg });\n  }\n  /**\n   * @param {any} parent\n   */\n  drawPolarElements(parent) {\n    const w2 = this.w;\n    const scale = new Scales(this.w);\n    const graphics = new Graphics(this.w);\n    const helpers = new CircularChartsHelpers(this.w);\n    const gCircles = graphics.group();\n    const gYAxis = graphics.group();\n    const yScale = scale.niceScale(0, Math.ceil(this.maxY), 0);\n    const yTexts = yScale.result.reverse();\n    const len = yScale.result.length;\n    this.maxY = yScale.niceMax;\n    let circleSize = w2.globals.radialSize;\n    const diff = circleSize / (len - 1);\n    for (let i2 = 0; i2 < len - 1; i2++) {\n      const circle = graphics.drawCircle(circleSize);\n      circle.attr({\n        cx: this.centerX,\n        cy: this.centerY,\n        fill: \"none\",\n        \"stroke-width\": w2.config.plotOptions.polarArea.rings.strokeWidth,\n        stroke: w2.config.plotOptions.polarArea.rings.strokeColor\n      });\n      if (w2.config.yaxis[0].show) {\n        const yLabel = helpers.drawYAxisTexts(\n          this.centerX,\n          this.centerY - circleSize + parseInt(w2.config.yaxis[0].labels.style.fontSize, 10) / 2,\n          i2,\n          yTexts[i2]\n        );\n        gYAxis.add(yLabel);\n      }\n      gCircles.add(circle);\n      circleSize = circleSize - diff;\n    }\n    this.drawSpokes(parent);\n    parent.add(gCircles);\n    parent.add(gYAxis);\n  }\n  /**\n   * @param {any} dataLabelsGroup\n   * @param {Record<string, any>} dataLabelsConfig\n   * @param {Record<string, any>} opts\n   */\n  renderInnerDataLabels(dataLabelsGroup, dataLabelsConfig, opts) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const showTotal = dataLabelsConfig.total.show;\n    dataLabelsGroup.node.innerHTML = \"\";\n    dataLabelsGroup.node.style.opacity = opts.opacity;\n    const x = opts.centerX;\n    const y = !this.donutDataLabels.total.label ? opts.centerY - opts.centerY / 6 : opts.centerY;\n    let labelColor, valueColor;\n    if (dataLabelsConfig.name.color === void 0) {\n      labelColor = w2.globals.colors[0];\n    } else {\n      labelColor = dataLabelsConfig.name.color;\n    }\n    let labelFontSize = dataLabelsConfig.name.fontSize;\n    let labelFontFamily = dataLabelsConfig.name.fontFamily;\n    let labelFontWeight = dataLabelsConfig.name.fontWeight;\n    if (dataLabelsConfig.value.color === void 0) {\n      valueColor = w2.config.chart.foreColor;\n    } else {\n      valueColor = dataLabelsConfig.value.color;\n    }\n    const lbFormatter = dataLabelsConfig.value.formatter;\n    let val = \"\";\n    let name2 = \"\";\n    if (showTotal) {\n      labelColor = dataLabelsConfig.total.color;\n      labelFontSize = dataLabelsConfig.total.fontSize;\n      labelFontFamily = dataLabelsConfig.total.fontFamily;\n      labelFontWeight = dataLabelsConfig.total.fontWeight;\n      name2 = !this.donutDataLabels.total.label ? \"\" : dataLabelsConfig.total.label;\n      val = dataLabelsConfig.total.formatter(w2);\n    } else {\n      if (w2.seriesData.series.length === 1) {\n        val = lbFormatter(w2.seriesData.series[0], w2);\n        name2 = w2.seriesData.seriesNames[0];\n      }\n    }\n    if (name2) {\n      name2 = dataLabelsConfig.name.formatter(\n        name2,\n        dataLabelsConfig.total.show,\n        w2\n      );\n    }\n    if (dataLabelsConfig.name.show) {\n      const elLabel = graphics.drawText({\n        x,\n        y: y + parseFloat(dataLabelsConfig.name.offsetY),\n        text: name2,\n        textAnchor: \"middle\",\n        foreColor: labelColor,\n        fontSize: labelFontSize,\n        fontWeight: labelFontWeight,\n        fontFamily: labelFontFamily\n      });\n      elLabel.node.classList.add(\"apexcharts-datalabel-label\");\n      dataLabelsGroup.add(elLabel);\n    }\n    if (dataLabelsConfig.value.show) {\n      const valOffset = dataLabelsConfig.name.show ? parseFloat(dataLabelsConfig.value.offsetY) + 16 : dataLabelsConfig.value.offsetY;\n      const elValue = graphics.drawText({\n        x,\n        y: y + valOffset,\n        text: val,\n        textAnchor: \"middle\",\n        foreColor: valueColor,\n        fontWeight: dataLabelsConfig.value.fontWeight,\n        fontSize: dataLabelsConfig.value.fontSize,\n        fontFamily: dataLabelsConfig.value.fontFamily\n      });\n      elValue.node.classList.add(\"apexcharts-datalabel-value\");\n      dataLabelsGroup.add(elValue);\n    }\n    return dataLabelsGroup;\n  }\n  /**\n   *\n   * @param {string} name - The name of the series\n   * @param {string} val - The value of that series\n   * @param {any} el - Optional el (indicates which series was hovered/clicked). If this param is not present, means we need to show total\n   * @param {Record<string, any>} labelsConfig\n   */\n  printInnerLabels(labelsConfig, name2, val, el) {\n    const w2 = this.w;\n    let labelColor;\n    if (el) {\n      if (labelsConfig.name.color === void 0) {\n        labelColor = w2.globals.colors[parseInt(el.parentNode.getAttribute(\"rel\"), 10) - 1];\n      } else {\n        labelColor = labelsConfig.name.color;\n      }\n    } else {\n      if (w2.seriesData.series.length > 1 && labelsConfig.total.show) {\n        labelColor = labelsConfig.total.color;\n      }\n    }\n    const elLabel = w2.dom.baseEl.querySelector(\".apexcharts-datalabel-label\");\n    const elValue = w2.dom.baseEl.querySelector(\".apexcharts-datalabel-value\");\n    const lbFormatter = labelsConfig.value.formatter;\n    val = lbFormatter(val, w2);\n    if (!el && typeof labelsConfig.total.formatter === \"function\") {\n      val = labelsConfig.total.formatter(w2);\n    }\n    const isTotal = name2 === labelsConfig.total.label;\n    name2 = !this.donutDataLabels.total.label ? \"\" : labelsConfig.name.formatter(name2, isTotal, w2);\n    if (elLabel !== null) {\n      elLabel.textContent = name2;\n    }\n    if (elValue !== null) {\n      elValue.textContent = val;\n    }\n    if (elLabel !== null) {\n      const elLabelEl = (\n        /** @type {HTMLElement} */\n        elLabel\n      );\n      elLabelEl.style.fill = labelColor;\n    }\n  }\n  /**\n   * @param {any} el\n   * @param {Record<string, any>} dataLabelsConfig\n   */\n  printDataLabelsInner(el, dataLabelsConfig) {\n    const w2 = this.w;\n    const val = el.getAttribute(\"data:value\");\n    const name2 = w2.seriesData.seriesNames[parseInt(el.parentNode.getAttribute(\"rel\"), 10) - 1];\n    if (w2.seriesData.series.length > 1) {\n      this.printInnerLabels(dataLabelsConfig, name2, val, el);\n    }\n    const dataLabelsGroup = w2.dom.baseEl.querySelector(\n      \".apexcharts-datalabels-group\"\n    );\n    if (dataLabelsGroup !== null) {\n      const dataLabelsGroupEl = (\n        /** @type {HTMLElement} */\n        dataLabelsGroup\n      );\n      dataLabelsGroupEl.style.opacity = \"1\";\n    }\n  }\n  /**\n   * @param {any} parent\n   */\n  drawSpokes(parent) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const spokeConfig = w2.config.plotOptions.polarArea.spokes;\n    if (spokeConfig.strokeWidth === 0) return;\n    const spokes = [];\n    const angleDivision = 360 / w2.seriesData.series.length;\n    for (let i2 = 0; i2 < w2.seriesData.series.length; i2++) {\n      spokes.push(\n        Utils$1.polarToCartesian(\n          this.centerX,\n          this.centerY,\n          w2.globals.radialSize,\n          w2.config.plotOptions.pie.startAngle + angleDivision * i2\n        )\n      );\n    }\n    spokes.forEach((p2, i2) => {\n      const line = graphics.drawLine(\n        p2.x,\n        p2.y,\n        this.centerX,\n        this.centerY,\n        Array.isArray(spokeConfig.connectorColors) ? spokeConfig.connectorColors[i2] : spokeConfig.connectorColors\n      );\n      parent.add(line);\n    });\n  }\n  revertDataLabelsInner() {\n    const w2 = this.w;\n    if (this.donutDataLabels.show) {\n      const dataLabelsGroup = w2.dom.Paper.findOne(\n        `.apexcharts-datalabels-group`\n      );\n      const dataLabels = this.renderInnerDataLabels(\n        dataLabelsGroup,\n        this.donutDataLabels,\n        {\n          hollowSize: this.donutSize,\n          centerX: this.centerX,\n          centerY: this.centerY,\n          opacity: this.donutDataLabels.show\n        }\n      );\n      const elPie = w2.dom.Paper.findOne(\n        \".apexcharts-radialbar, .apexcharts-pie\"\n      );\n      elPie.add(dataLabels);\n    }\n  }\n}\nconst RADAR_HIT_AREA_SIZE = 5;\nclass Radar {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.ctx = ctx;\n    this.w = w2;\n    this.chartType = this.w.config.chart.type;\n    this.initialAnim = this.w.config.chart.animations.enabled;\n    this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;\n    this.animDur = 0;\n    this.graphics = new Graphics(this.w);\n    this.lineColorArr = w2.globals.stroke.colors !== void 0 ? w2.globals.stroke.colors : w2.globals.colors;\n    this.defaultSize = w2.globals.svgHeight < w2.globals.svgWidth ? w2.layout.gridHeight : w2.layout.gridWidth;\n    this.isLog = w2.config.yaxis[0].logarithmic;\n    this.logBase = w2.config.yaxis[0].logBase;\n    this.coreUtils = new CoreUtils(this.w);\n    this.maxValue = this.isLog ? this.coreUtils.getLogVal(this.logBase, w2.globals.maxY, 0) : w2.globals.maxY;\n    this.minValue = this.isLog ? this.coreUtils.getLogVal(this.logBase, this.w.globals.minY, 0) : w2.globals.minY;\n    this.polygons = w2.config.plotOptions.radar.polygons;\n    this.strokeWidth = w2.config.stroke.show ? w2.config.stroke.width : 0;\n    this.size = this.defaultSize / 2.1 - this.strokeWidth - w2.config.chart.dropShadow.blur;\n    if (w2.config.xaxis.labels.show) {\n      this.size = this.size - w2.layout.xAxisLabelsWidth / 1.75;\n    }\n    if (w2.config.plotOptions.radar.size !== void 0) {\n      this.size = w2.config.plotOptions.radar.size;\n    }\n    this.dataRadiusOfPercent = /** @type {any} */\n    [];\n    this.dataRadius = /** @type {any} */\n    [];\n    this.angleArr = /** @type {any} */\n    [];\n    this.dataPointsLen = 0;\n    this.disAngle = 0;\n    this.yaxisLabelsTextsPos = [];\n  }\n  /**\n   * @param {any[]} series\n   */\n  draw(series) {\n    const w2 = this.w;\n    const fill = new Fill(this.w);\n    const allSeries = [];\n    const dataLabels = new DataLabels(this.w, this.ctx);\n    if (series.length) {\n      this.dataPointsLen = series[w2.globals.maxValsInArrayIndex].length;\n    }\n    this.disAngle = Math.PI * 2 / this.dataPointsLen;\n    const halfW = w2.layout.gridWidth / 2;\n    const halfH = w2.layout.gridHeight / 2;\n    const translateX = halfW + w2.config.plotOptions.radar.offsetX;\n    const translateY = halfH + w2.config.plotOptions.radar.offsetY;\n    const ret = this.graphics.group({\n      class: \"apexcharts-radar-series apexcharts-plot-series\",\n      transform: `translate(${translateX || 0}, ${translateY || 0})`\n    });\n    let dataPointsPos = [];\n    let elPointsMain = null;\n    let elDataPointsMain = null;\n    this.yaxisLabels = this.graphics.group({\n      class: \"apexcharts-yaxis\"\n    });\n    series.forEach((s2, i2) => {\n      const longestSeries = s2.length === w2.globals.dataPoints;\n      const elSeries = this.graphics.group().attr({\n        class: `apexcharts-series`,\n        \"data:longestSeries\": longestSeries,\n        seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[i2]),\n        rel: i2 + 1,\n        \"data:realIndex\": i2\n      });\n      this.dataRadiusOfPercent[i2] = [];\n      this.dataRadius[i2] = [];\n      this.angleArr[i2] = [];\n      s2.forEach((dv, j) => {\n        const range = Math.abs(this.maxValue - this.minValue);\n        dv = dv - this.minValue;\n        if (this.isLog) {\n          dv = this.coreUtils.getLogVal(this.logBase, dv, 0);\n        }\n        this.dataRadiusOfPercent[i2][j] = dv / range;\n        this.dataRadius[i2][j] = this.dataRadiusOfPercent[i2][j] * this.size;\n        this.angleArr[i2][j] = j * this.disAngle;\n      });\n      dataPointsPos = this.getDataPointsPos(\n        this.dataRadius[i2],\n        this.angleArr[i2]\n      );\n      const paths = this.createPaths(dataPointsPos, {\n        x: 0,\n        y: 0\n      });\n      elPointsMain = this.graphics.group({\n        class: \"apexcharts-series-markers-wrap apexcharts-element-hidden\"\n      });\n      elDataPointsMain = this.graphics.group({\n        class: `apexcharts-datalabels`,\n        \"data:realIndex\": i2\n      });\n      w2.globals.delayedElements.push({\n        el: elPointsMain.node,\n        index: i2\n      });\n      const defaultRenderedPathOptions = {\n        i: i2,\n        realIndex: i2,\n        animationDelay: i2,\n        initialSpeed: w2.config.chart.animations.speed,\n        dataChangeSpeed: w2.config.chart.animations.dynamicAnimation.speed,\n        className: `apexcharts-radar`,\n        shouldClipToGrid: false,\n        bindEventsOnPaths: false,\n        stroke: w2.globals.stroke.colors[i2],\n        strokeLineCap: w2.config.stroke.lineCap\n      };\n      let pathFrom = null;\n      if (w2.globals.previousPaths.length > 0) {\n        pathFrom = this.getPreviousPath(i2);\n      }\n      for (let p2 = 0; p2 < paths.linePathsTo.length; p2++) {\n        const renderedLinePath = this.graphics.renderPaths(__spreadProps(__spreadValues({}, defaultRenderedPathOptions), {\n          pathFrom: pathFrom === null ? paths.linePathsFrom[p2] : pathFrom,\n          pathTo: paths.linePathsTo[p2],\n          strokeWidth: Array.isArray(this.strokeWidth) ? this.strokeWidth[i2] : this.strokeWidth,\n          fill: \"none\",\n          drawShadow: false\n        }));\n        elSeries.add(renderedLinePath);\n        const pathFill = fill.fillPath({\n          seriesNumber: i2\n        });\n        const renderedAreaPath = this.graphics.renderPaths(__spreadProps(__spreadValues({}, defaultRenderedPathOptions), {\n          pathFrom: pathFrom === null ? paths.areaPathsFrom[p2] : pathFrom,\n          pathTo: paths.areaPathsTo[p2],\n          strokeWidth: 0,\n          fill: pathFill,\n          drawShadow: false,\n          // Radial mask: the area fill blooms outward from the radar's center\n          // (in this group's local coords) instead of the default L→R rect wipe.\n          drawMask: { type: \"radial\", cx: 0, cy: 0, r: this.size }\n        }));\n        if (w2.config.chart.dropShadow.enabled) {\n          const filters = new Filters(this.w);\n          const shadow = w2.config.chart.dropShadow;\n          filters.dropShadow(\n            renderedAreaPath,\n            Object.assign({}, shadow, { noUserSpaceOnUse: true }),\n            i2\n          );\n        }\n        elSeries.add(renderedAreaPath);\n      }\n      s2.forEach((sj, j) => {\n        const markers = new Markers(this.w, this.ctx);\n        const opts = markers.getMarkerConfig({\n          cssClass: \"apexcharts-marker\",\n          seriesIndex: i2,\n          dataPointIndex: j\n        });\n        if (!opts.pSize) {\n          opts.pSize = RADAR_HIT_AREA_SIZE;\n          opts.pointFillColor = \"transparent\";\n          opts.pointStrokeColor = \"transparent\";\n          opts.pointStrokeWidth = 0;\n        }\n        const point = this.graphics.drawMarker(\n          dataPointsPos[j].x,\n          dataPointsPos[j].y,\n          opts\n        );\n        point.attr(\"rel\", j);\n        point.attr(\"j\", j);\n        point.attr(\"index\", i2);\n        point.node.setAttribute(\"default-marker-size\", opts.pSize);\n        const elPointsWrap = this.graphics.group({\n          class: \"apexcharts-series-markers\"\n        });\n        if (elPointsWrap) {\n          elPointsWrap.add(point);\n        }\n        elPointsMain.add(elPointsWrap);\n        elSeries.add(elPointsMain);\n        const dataLabelsConfig = w2.config.dataLabels;\n        if (dataLabelsConfig.enabled) {\n          const text = dataLabelsConfig.formatter(w2.seriesData.series[i2][j], {\n            seriesIndex: i2,\n            dataPointIndex: j,\n            w: w2\n          });\n          dataLabels.plotDataLabelsText({\n            x: dataPointsPos[j].x,\n            y: dataPointsPos[j].y,\n            text,\n            textAnchor: \"middle\",\n            i: i2,\n            j: i2,\n            // `j` above is the series index (kept for the color lookup), so\n            // pass the real data point index for per-point offsets\n            seriesIndex: i2,\n            dataPointIndex: j,\n            parent: elDataPointsMain,\n            offsetCorrection: false,\n            dataLabelsConfig: __spreadValues({}, dataLabelsConfig)\n          });\n        }\n        elSeries.add(elDataPointsMain);\n      });\n      allSeries.push(elSeries);\n    });\n    this.drawPolygons({\n      parent: ret\n    });\n    if (w2.config.xaxis.labels.show) {\n      const xaxisTexts = this.drawXAxisTexts();\n      ret.add(xaxisTexts);\n    }\n    allSeries.forEach((elS) => {\n      ret.add(elS);\n    });\n    ret.add(this.yaxisLabels);\n    return ret;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  drawPolygons(opts) {\n    const w2 = this.w;\n    const { parent } = opts;\n    const helpers = new CircularChartsHelpers(this.w);\n    const yaxisTexts = w2.globals.yAxisScale[0].result.reverse();\n    const layers = yaxisTexts.length;\n    const radiusSizes = [];\n    const layerDis = this.size / (layers - 1);\n    for (let i2 = 0; i2 < layers; i2++) {\n      radiusSizes[i2] = layerDis * i2;\n    }\n    radiusSizes.reverse();\n    const polygonStrings = [];\n    const lines = [];\n    radiusSizes.forEach((radiusSize, r2) => {\n      const polygon = Utils$1.getPolygonPos(radiusSize, this.dataPointsLen);\n      let string = \"\";\n      polygon.forEach((p2, i2) => {\n        if (r2 === 0) {\n          const line = this.graphics.drawLine(\n            p2.x,\n            p2.y,\n            0,\n            0,\n            Array.isArray(this.polygons.connectorColors) ? this.polygons.connectorColors[i2] : this.polygons.connectorColors\n          );\n          lines.push(line);\n        }\n        if (i2 === 0) {\n          this.yaxisLabelsTextsPos.push({\n            x: p2.x,\n            y: p2.y\n          });\n        }\n        string += p2.x + \",\" + p2.y + \" \";\n      });\n      polygonStrings.push(string);\n    });\n    polygonStrings.forEach((p2, i2) => {\n      const strokeColors = this.polygons.strokeColors;\n      const strokeWidth = this.polygons.strokeWidth;\n      const polygon = this.graphics.drawPolygon(\n        p2,\n        Array.isArray(strokeColors) ? strokeColors[i2] : strokeColors,\n        Array.isArray(strokeWidth) ? strokeWidth[i2] : strokeWidth,\n        w2.globals.radarPolygons.fill.colors[i2]\n      );\n      parent.add(polygon);\n    });\n    lines.forEach((l2) => {\n      parent.add(l2);\n    });\n    if (w2.config.yaxis[0].show) {\n      this.yaxisLabelsTextsPos.forEach(\n        (p2, i2) => {\n          const yText = helpers.drawYAxisTexts(p2.x, p2.y, i2, yaxisTexts[i2]);\n          this.yaxisLabels.add(yText);\n        }\n      );\n    }\n  }\n  drawXAxisTexts() {\n    const w2 = this.w;\n    const xaxisLabelsConfig = w2.config.xaxis.labels;\n    const elXAxisWrap = this.graphics.group({\n      class: \"apexcharts-xaxis\"\n    });\n    const polygonPos = Utils$1.getPolygonPos(this.size, this.dataPointsLen);\n    w2.labelData.labels.forEach((label, i2) => {\n      const formatter = w2.config.xaxis.labels.formatter;\n      const dataLabels = new DataLabels(this.w, this.ctx);\n      if (polygonPos[i2]) {\n        const textPos = this.getTextPos(polygonPos[i2], this.size);\n        const text = formatter(label, {\n          seriesIndex: -1,\n          dataPointIndex: i2,\n          w: w2\n        });\n        const dataLabelText = dataLabels.plotDataLabelsText({\n          x: textPos.newX,\n          y: textPos.newY,\n          text,\n          textAnchor: textPos.textAnchor,\n          i: i2,\n          j: i2,\n          parent: elXAxisWrap,\n          className: \"apexcharts-xaxis-label\",\n          color: Array.isArray(xaxisLabelsConfig.style.colors) && xaxisLabelsConfig.style.colors[i2] ? xaxisLabelsConfig.style.colors[i2] : \"#a8a8a8\",\n          dataLabelsConfig: __spreadValues({\n            textAnchor: textPos.textAnchor,\n            dropShadow: { enabled: false }\n          }, xaxisLabelsConfig),\n          offsetCorrection: false\n        });\n        dataLabelText.on(\"click\", (e2) => {\n          if (typeof w2.config.chart.events.xAxisLabelClick === \"function\") {\n            const opts = Object.assign({}, w2, {\n              labelIndex: i2\n            });\n            w2.config.chart.events.xAxisLabelClick(e2, this.ctx, opts);\n          }\n        });\n      }\n    });\n    return elXAxisWrap;\n  }\n  /**\n   * @param {Array<Record<string, any>>} pos\n   * @param {Record<string, any>} origin\n   */\n  createPaths(pos, origin) {\n    const linePathsTo = [];\n    let linePathsFrom = [];\n    const areaPathsTo = [];\n    let areaPathsFrom = [];\n    if (pos.length) {\n      linePathsFrom = [this.graphics.move(origin.x, origin.y)];\n      areaPathsFrom = [this.graphics.move(origin.x, origin.y)];\n      let linePathTo = this.graphics.move(pos[0].x, pos[0].y);\n      let areaPathTo = this.graphics.move(pos[0].x, pos[0].y);\n      pos.forEach((p2, i2) => {\n        linePathTo += this.graphics.line(p2.x, p2.y);\n        areaPathTo += this.graphics.line(p2.x, p2.y);\n        if (i2 === pos.length - 1) {\n          linePathTo += \"Z\";\n          areaPathTo += \"Z\";\n        }\n      });\n      linePathsTo.push(linePathTo);\n      areaPathsTo.push(areaPathTo);\n    }\n    return {\n      linePathsFrom,\n      linePathsTo,\n      areaPathsFrom,\n      areaPathsTo\n    };\n  }\n  /**\n   * @param {Record<string, any>} pos\n   * @param {number} polygonSize\n   */\n  getTextPos(pos, polygonSize) {\n    const limit = 10;\n    let textAnchor = \"middle\";\n    let newX = pos.x;\n    let newY = pos.y;\n    if (Math.abs(pos.x) >= limit) {\n      if (pos.x > 0) {\n        textAnchor = \"start\";\n        newX += 10;\n      } else if (pos.x < 0) {\n        textAnchor = \"end\";\n        newX -= 10;\n      }\n    } else {\n      textAnchor = \"middle\";\n    }\n    if (Math.abs(pos.y) >= polygonSize - limit) {\n      if (pos.y < 0) {\n        newY -= 10;\n      } else if (pos.y > 0) {\n        newY += 10;\n      }\n    }\n    return {\n      textAnchor,\n      newX,\n      newY\n    };\n  }\n  /**\n   * @param {number} realIndex\n   */\n  getPreviousPath(realIndex) {\n    const w2 = this.w;\n    let pathFrom = null;\n    for (let pp = 0; pp < w2.globals.previousPaths.length; pp++) {\n      const gpp = w2.globals.previousPaths[pp];\n      if (gpp.paths.length > 0 && parseInt(gpp.realIndex, 10) === parseInt(String(realIndex), 10)) {\n        if (typeof w2.globals.previousPaths[pp].paths[0] !== \"undefined\") {\n          pathFrom = w2.globals.previousPaths[pp].paths[0].d;\n        }\n      }\n    }\n    return pathFrom;\n  }\n  /**\n   * @param {any[]} dataRadiusArr\n   * @param {any[]} angleArr\n   */\n  getDataPointsPos(dataRadiusArr, angleArr, dataPointsLen = this.dataPointsLen) {\n    dataRadiusArr = dataRadiusArr || [];\n    angleArr = angleArr || [];\n    const dataPointsPosArray = [];\n    for (let j = 0; j < dataPointsLen; j++) {\n      const curPointPos = {};\n      curPointPos.x = dataRadiusArr[j] * Math.sin(angleArr[j]);\n      curPointPos.y = -dataRadiusArr[j] * Math.cos(angleArr[j]);\n      dataPointsPosArray.push(curPointPos);\n    }\n    return dataPointsPosArray;\n  }\n}\nclass Radial extends Pie {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    super(w2, ctx);\n    this.ctx = ctx;\n    this.w = w2;\n    this.animBeginArr = [0];\n    this.animDur = 0;\n    this.startAngle = w2.config.plotOptions.radialBar.startAngle;\n    this.endAngle = w2.config.plotOptions.radialBar.endAngle;\n    this.totalAngle = Math.abs(\n      w2.config.plotOptions.radialBar.endAngle - w2.config.plotOptions.radialBar.startAngle\n    );\n    this.trackStartAngle = w2.config.plotOptions.radialBar.track.startAngle;\n    this.trackEndAngle = w2.config.plotOptions.radialBar.track.endAngle;\n    this.barLabels = this.w.config.plotOptions.radialBar.barLabels;\n    this.donutDataLabels = this.w.config.plotOptions.radialBar.dataLabels;\n    this.radialDataLabels = this.donutDataLabels;\n    if (!this.trackStartAngle) this.trackStartAngle = this.startAngle;\n    if (!this.trackEndAngle) this.trackEndAngle = this.endAngle;\n    if (this.endAngle === 360) this.endAngle = 359.99;\n    this.margin = parseInt(w2.config.plotOptions.radialBar.track.margin, 10);\n    this.onBarLabelClick = this.onBarLabelClick.bind(this);\n  }\n  /**\n   * @param {any[]} series\n   */\n  draw(series) {\n    var _a;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const ret = graphics.group({\n      class: \"apexcharts-radialbar\"\n    });\n    if (w2.globals.noData) return ret;\n    const elSeries = graphics.group();\n    const centerY = this.defaultSize / 2;\n    const centerX = w2.layout.gridWidth / 2;\n    let size = this.defaultSize / 2.05;\n    if (!w2.config.chart.sparkline.enabled) {\n      size = size - w2.config.stroke.width - w2.config.chart.dropShadow.blur;\n    }\n    const colorArr = w2.globals.fill.colors;\n    const rb = w2.config.plotOptions.radialBar;\n    const hasBands = Array.isArray(rb.bands) && rb.bands.length > 0;\n    const hideTrack = hasBands && rb.bandsStyle && rb.bandsStyle.hideTrackWhenPresent;\n    const isNeedleShape = rb.shape === \"needle\";\n    if (rb.track.show && !hideTrack) {\n      const elTracks = this.drawTracks({\n        size,\n        centerX,\n        centerY,\n        colorArr,\n        series\n      });\n      elSeries.add(elTracks);\n    }\n    if (hasBands) {\n      const elBands = this.drawBands({\n        size,\n        centerX,\n        centerY,\n        series\n      });\n      elSeries.add(elBands);\n    }\n    const elG = this.drawArcs({\n      size,\n      centerX,\n      centerY,\n      colorArr,\n      series,\n      // When `needle.showValueArc` is true, render both the filled value-arc\n      // and the needle on top — required for gauges that want a progress\n      // ring with a pointer indicator (default still hides the arc when in\n      // needle shape, preserving prior behavior).\n      skipValueArc: isNeedleShape && !((_a = rb.needle) == null ? void 0 : _a.showValueArc)\n    });\n    if (rb.ticks && rb.ticks.show) {\n      const elTicks = this.drawTicks({\n        size,\n        centerX,\n        centerY,\n        series\n      });\n      const isInitialMount = this.initialAnim && !w2.globals.dataChanged && !w2.globals.resized;\n      if (isInitialMount && Environment.isBrowser() && w2.globals.shouldAnimate) {\n        const ticksNode = elTicks.node;\n        ticksNode.style.opacity = \"0\";\n        ticksNode.style.transition = \"opacity 280ms ease-out\";\n        const sweepDur = w2.config.chart.animations.speed || 800;\n        setTimeout(() => {\n          ticksNode.style.opacity = \"1\";\n        }, sweepDur);\n      }\n      elSeries.add(elTicks);\n    }\n    if (isNeedleShape) {\n      const elNeedle = this.drawNeedle({\n        size,\n        centerX,\n        centerY,\n        series\n      });\n      elSeries.add(elNeedle);\n    }\n    let totalAngle = 360;\n    if (w2.config.plotOptions.radialBar.startAngle < 0) {\n      totalAngle = this.totalAngle;\n    }\n    const angleRatio = (360 - totalAngle) / 360;\n    w2.globals.radialSize = size - size * angleRatio;\n    if (this.radialDataLabels.value.show) {\n      const offset = Math.max(\n        this.radialDataLabels.value.offsetY,\n        this.radialDataLabels.name.offsetY\n      );\n      w2.globals.radialSize += offset * angleRatio;\n    }\n    elSeries.add(elG.g);\n    if (w2.config.plotOptions.radialBar.hollow.position === \"front\") {\n      elG.g.add(elG.elHollow);\n      if (elG.dataLabels) {\n        elG.g.add(elG.dataLabels);\n      }\n    }\n    ret.add(elSeries);\n    return ret;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  drawTracks(opts) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const g2 = graphics.group({\n      class: \"apexcharts-tracks\"\n    });\n    const filters = new Filters(this.w);\n    const fill = new Fill(this.w);\n    const strokeWidth = this.getStrokeWidth(opts);\n    opts.size = opts.size - strokeWidth / 2;\n    for (let i2 = 0; i2 < opts.series.length; i2++) {\n      const elRadialBarTrack = graphics.group({\n        class: \"apexcharts-radialbar-track apexcharts-track\"\n      });\n      g2.add(elRadialBarTrack);\n      elRadialBarTrack.attr({\n        rel: i2 + 1\n      });\n      opts.size = opts.size - strokeWidth - this.margin;\n      const trackConfig = w2.config.plotOptions.radialBar.track;\n      const pathFill = fill.fillPath({\n        seriesNumber: 0,\n        size: opts.size,\n        fillColors: Array.isArray(trackConfig.background) ? trackConfig.background[i2] : trackConfig.background,\n        solid: true\n      });\n      const startAngle = this.trackStartAngle;\n      let endAngle = this.trackEndAngle;\n      if (Math.abs(endAngle) + Math.abs(startAngle) >= 360)\n        endAngle = 360 - Math.abs(this.startAngle) - 0.1;\n      const elPath = graphics.drawPath({\n        d: \"\",\n        stroke: pathFill,\n        strokeWidth: strokeWidth * parseInt(trackConfig.strokeWidth, 10) / 100,\n        fill: \"none\",\n        strokeOpacity: trackConfig.opacity,\n        classes: \"apexcharts-radialbar-area\"\n      });\n      if (trackConfig.dropShadow.enabled) {\n        const shadow = trackConfig.dropShadow;\n        filters.dropShadow(elPath, shadow);\n      }\n      elRadialBarTrack.add(elPath);\n      elPath.attr(\"id\", \"apexcharts-radialbarTrack-\" + i2);\n      this.animatePaths(elPath, {\n        centerX: opts.centerX,\n        centerY: opts.centerY,\n        endAngle,\n        startAngle,\n        size: opts.size,\n        i: i2,\n        totalItems: 2,\n        animBeginArr: 0,\n        dur: 0,\n        isTrack: true\n      });\n    }\n    return g2;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  drawArcs(opts) {\n    var _a;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const fill = new Fill(this.w);\n    const filters = new Filters(this.w);\n    const g2 = graphics.group();\n    const strokeWidth = this.getStrokeWidth(opts);\n    opts.size = opts.size - strokeWidth / 2;\n    let hollowFillID = w2.config.plotOptions.radialBar.hollow.background;\n    const hollowSize = opts.size - strokeWidth * opts.series.length - this.margin * opts.series.length - strokeWidth * parseInt(w2.config.plotOptions.radialBar.track.strokeWidth, 10) / 100 / 2;\n    const hollowRadius = hollowSize - w2.config.plotOptions.radialBar.hollow.margin;\n    if (w2.config.plotOptions.radialBar.hollow.image !== void 0) {\n      hollowFillID = this.drawHollowImage(opts, g2, hollowSize, hollowFillID);\n    }\n    const elHollow = this.drawHollow({\n      size: hollowRadius,\n      centerX: opts.centerX,\n      centerY: opts.centerY,\n      fill: hollowFillID ? hollowFillID : \"transparent\"\n    });\n    if (w2.config.plotOptions.radialBar.hollow.dropShadow.enabled) {\n      const shadow = w2.config.plotOptions.radialBar.hollow.dropShadow;\n      filters.dropShadow(elHollow, shadow);\n    }\n    let shown = 1;\n    if (!this.radialDataLabels.total.show && w2.seriesData.series.length > 1) {\n      shown = 0;\n    }\n    let dataLabels = null;\n    if (this.radialDataLabels.show) {\n      const dataLabelsGroup = w2.dom.Paper.findOne(\n        `.apexcharts-datalabels-group`\n      );\n      dataLabels = this.renderInnerDataLabels(\n        dataLabelsGroup,\n        this.radialDataLabels,\n        {\n          hollowSize,\n          centerX: opts.centerX,\n          centerY: opts.centerY,\n          opacity: shown\n        }\n      );\n    }\n    if (w2.config.plotOptions.radialBar.hollow.position === \"back\") {\n      g2.add(elHollow);\n      if (dataLabels) {\n        g2.add(dataLabels);\n      }\n    }\n    let reverseLoop = false;\n    if (w2.config.plotOptions.radialBar.inverseOrder) {\n      reverseLoop = true;\n    }\n    const morphActive = ((_a = this.ctx.morphTypeChange) == null ? void 0 : _a.isActive()) === true;\n    for (let i2 = reverseLoop ? opts.series.length - 1 : 0; reverseLoop ? i2 >= 0 : i2 < opts.series.length; reverseLoop ? i2-- : i2++) {\n      const elRadialBarArc = graphics.group({\n        class: `apexcharts-series apexcharts-radial-series`,\n        seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[i2])\n      });\n      g2.add(elRadialBarArc);\n      elRadialBarArc.attr({\n        rel: i2 + 1,\n        \"data:realIndex\": i2\n      });\n      Series.addCollapsedClassToSeries(this.w, elRadialBarArc, i2);\n      opts.size = opts.size - strokeWidth - this.margin;\n      const pathFill = fill.fillPath({\n        seriesNumber: i2,\n        size: opts.size,\n        value: opts.series[i2]\n      });\n      const startAngle = this.startAngle;\n      let prevStartAngle;\n      const rb = w2.config.plotOptions.radialBar;\n      const domainMin = typeof rb.min === \"number\" ? rb.min : 0;\n      const domainMax = typeof rb.max === \"number\" ? rb.max : 100;\n      const domainSpan = domainMax === domainMin ? 1 : domainMax - domainMin;\n      const valueToFraction = (v2) => {\n        const clamped = Math.min(Math.max(v2, domainMin), domainMax);\n        return Math.max(0, (clamped - domainMin) / domainSpan);\n      };\n      const dataValue = valueToFraction(Utils$1.negToZero(opts.series[i2]));\n      let endAngle = Math.round(this.totalAngle * dataValue) + this.startAngle;\n      let prevEndAngle;\n      if (w2.globals.dataChanged) {\n        prevStartAngle = this.startAngle;\n        prevEndAngle = Math.round(\n          this.totalAngle * valueToFraction(Utils$1.negToZero(w2.globals.previousPaths[i2]))\n        ) + prevStartAngle;\n      }\n      const currFullAngle = Math.abs(endAngle) + Math.abs(startAngle);\n      if (currFullAngle > 360) {\n        endAngle = endAngle - 0.01;\n      }\n      const prevFullAngle = Math.abs(prevEndAngle) + Math.abs(prevStartAngle);\n      if (prevFullAngle > 360) {\n        prevEndAngle = prevEndAngle - 0.01;\n      }\n      const angle = endAngle - startAngle;\n      const dashArray = Array.isArray(w2.config.stroke.dashArray) ? w2.config.stroke.dashArray[i2] : w2.config.stroke.dashArray;\n      const morphFrom = morphActive ? this.ctx.morphTypeChange.getInitialPathFor(i2, 0) : null;\n      const morphFromType = morphActive ? this.ctx.morphTypeChange.getFromType() : null;\n      const morphFromFilled = !!morphFrom && (morphFromType === \"bar\" || morphFromType === \"funnel\" || morphFromType === \"pyramid\" || morphFromType === \"pie\" || morphFromType === \"donut\" || morphFromType === \"polarArea\");\n      const elPath = graphics.drawPath({\n        d: morphFrom || \"\",\n        stroke: morphFromFilled ? \"transparent\" : opts.skipValueArc ? \"transparent\" : pathFill,\n        strokeWidth: morphFromFilled ? 0 : opts.skipValueArc ? 0 : strokeWidth,\n        fill: morphFromFilled ? pathFill : \"none\",\n        fillOpacity: w2.config.fill.opacity,\n        classes: \"apexcharts-radialbar-area apexcharts-radialbar-slice-\" + i2,\n        strokeDashArray: dashArray\n      });\n      const radialMidAngle = startAngle + angle / 2;\n      const radialArcCenter = Utils$1.polarToCartesian(\n        opts.centerX,\n        opts.centerY,\n        opts.size,\n        radialMidAngle\n      );\n      Graphics.setAttrs(elPath.node, {\n        \"data:angle\": angle,\n        \"data:value\": opts.series[i2],\n        \"data:cx\": radialArcCenter.x,\n        \"data:cy\": radialArcCenter.y\n      });\n      if (w2.config.chart.dropShadow.enabled) {\n        const shadow = w2.config.chart.dropShadow;\n        filters.dropShadow(elPath, shadow, i2);\n      }\n      filters.setSelectionFilter(elPath, 0, i2);\n      this.addListeners(elPath, this.radialDataLabels);\n      elRadialBarArc.add(elPath);\n      elPath.attr({\n        index: 0,\n        j: i2\n      });\n      if (this.barLabels.enabled) {\n        const barStartCords = Utils$1.polarToCartesian(\n          opts.centerX,\n          opts.centerY,\n          opts.size,\n          startAngle\n        );\n        const text = this.barLabels.formatter(w2.seriesData.seriesNames[i2], {\n          seriesIndex: i2,\n          w: w2\n        });\n        const classes = [\"apexcharts-radialbar-label\"];\n        if (!this.barLabels.onClick) {\n          classes.push(\"apexcharts-no-click\");\n        }\n        let textColor = this.barLabels.useSeriesColors ? w2.globals.colors[i2] : w2.config.chart.foreColor;\n        if (!textColor) {\n          textColor = w2.config.chart.foreColor;\n        }\n        const x = barStartCords.x + this.barLabels.offsetX;\n        const y = barStartCords.y + this.barLabels.offsetY;\n        const elText = graphics.drawText({\n          x,\n          y,\n          text,\n          textAnchor: \"end\",\n          dominantBaseline: \"middle\",\n          fontFamily: this.barLabels.fontFamily,\n          fontWeight: this.barLabels.fontWeight,\n          fontSize: this.barLabels.fontSize,\n          foreColor: textColor,\n          cssClass: classes.join(\" \")\n        });\n        elText.on(\"click\", this.onBarLabelClick);\n        elText.attr({\n          rel: i2 + 1\n        });\n        if (startAngle !== 0) {\n          elText.attr({\n            \"transform-origin\": `${x} ${y}`,\n            transform: `rotate(${startAngle} 0 0)`\n          });\n        }\n        elRadialBarArc.add(elText);\n      }\n      let dur = 0;\n      if (this.initialAnim && !w2.globals.resized && !w2.globals.dataChanged) {\n        dur = w2.config.chart.animations.speed;\n      }\n      if (w2.globals.dataChanged) {\n        dur = w2.config.chart.animations.dynamicAnimation.speed;\n      }\n      this.animDur = dur / (opts.series.length * 1.2) + this.animDur;\n      this.animBeginArr.push(this.animDur);\n      if (morphActive && morphFrom) {\n        const morphSpeed = this.ctx.morphTypeChange.getSpeed();\n        const actualArcD = this.getPiePath({\n          me: this,\n          startAngle,\n          angle,\n          size: opts.size\n        });\n        if (morphFromFilled) {\n          const targetD = this.ctx.morphTypeChange.buildRingSegmentPath(\n            opts.centerX,\n            opts.centerY,\n            opts.size,\n            strokeWidth,\n            startAngle,\n            startAngle + angle\n          );\n          elPath.animate(morphSpeed).plot(targetD, \"polygons\").after(\n            /** @this {any} */\n            function() {\n              this.attr({\n                d: actualArcD,\n                fill: \"none\",\n                stroke: opts.skipValueArc ? \"transparent\" : pathFill,\n                \"stroke-width\": opts.skipValueArc ? 0 : strokeWidth\n              });\n            }\n          );\n        } else {\n          elPath.animate(morphSpeed).plot(actualArcD, \"polygons\").attr({ \"stroke-width\": strokeWidth });\n        }\n      } else {\n        this.animatePaths(elPath, {\n          centerX: opts.centerX,\n          centerY: opts.centerY,\n          endAngle,\n          startAngle,\n          prevEndAngle,\n          prevStartAngle,\n          size: opts.size,\n          i: i2,\n          totalItems: 2,\n          animBeginArr: this.animBeginArr,\n          dur,\n          shouldSetPrevPaths: true\n        });\n      }\n    }\n    return {\n      g: g2,\n      elHollow,\n      dataLabels\n    };\n  }\n  /**\n   * Map a domain value (between `min` and `max`) to the corresponding angle\n   * in the gauge's `startAngle`..`endAngle` range. Values outside the\n   * domain are clamped.\n   *\n   * @param {number} value\n   * @returns {number}\n   */\n  _angleAtValue(value) {\n    const rb = this.w.config.plotOptions.radialBar;\n    const min = typeof rb.min === \"number\" ? rb.min : 0;\n    const max = typeof rb.max === \"number\" ? rb.max : 100;\n    const safeMax = max === min ? min + 1 : max;\n    const clamped = Math.max(min, Math.min(safeMax, Number(value)));\n    const t2 = (clamped - min) / (safeMax - min);\n    return this.startAngle + t2 * (this.endAngle - this.startAngle);\n  }\n  /**\n   * Build an SVG arc path from `startAngle` to `endAngle` at radius `r`\n   * around `(cx, cy)`. Angles are in degrees, with 0° at the top.\n   * Used by drawBands; mirrors the `M ... A ... ` form used elsewhere.\n   *\n   * @param {number} cx\n   * @param {number} cy\n   * @param {number} r\n   * @param {number} startAngle\n   * @param {number} endAngle\n   * @returns {string}\n   */\n  _describeArc(cx, cy, r2, startAngle, endAngle) {\n    const start = Utils$1.polarToCartesian(cx, cy, r2, endAngle);\n    const end = Utils$1.polarToCartesian(cx, cy, r2, startAngle);\n    const sweep = endAngle - startAngle;\n    const largeArc = Math.abs(sweep) > 180 ? 1 : 0;\n    return `M ${start.x} ${start.y} A ${r2} ${r2} 0 ${largeArc} 0 ${end.x} ${end.y}`;\n  }\n  /**\n   * Draw threshold bands as colored arc segments along the gauge arc.\n   * Bands sit behind the value-arc and tick marks. Used for gauges that\n   * indicate ranges like 0-30 critical / 30-70 warning / 70-100 healthy.\n   *\n   * @param {Record<string, any>} opts\n   */\n  drawBands(opts) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const rb = w2.config.plotOptions.radialBar;\n    const bands = rb.bands || [];\n    const g2 = graphics.group({\n      class: \"apexcharts-gauge-bands\"\n    });\n    const strokeWidth = this.getStrokeWidth(opts);\n    const radius = opts.size - strokeWidth / 2 - strokeWidth - this.margin;\n    const bandStroke = strokeWidth * parseInt(rb.bandsStyle.strokeWidth, 10) / 100;\n    const min = typeof rb.min === \"number\" ? rb.min : 0;\n    const max = typeof rb.max === \"number\" ? rb.max : 100;\n    const gapDeg = max === min ? 0 : (rb.bandsStyle.gap || 0) * ((this.endAngle - this.startAngle) / (max - min));\n    for (let b2 = 0; b2 < bands.length; b2++) {\n      const band = bands[b2];\n      if (band.from === void 0 || band.to === void 0) continue;\n      const a1 = this._angleAtValue(band.from);\n      const a2 = this._angleAtValue(band.to);\n      const startA = Math.min(a1, a2) + gapDeg / 2;\n      const endA = Math.max(a1, a2) - gapDeg / 2;\n      if (endA - startA <= 0) continue;\n      const elBand = graphics.drawPath({\n        d: this._describeArc(opts.centerX, opts.centerY, radius, startA, endA),\n        stroke: band.color || \"#ccc\",\n        strokeWidth: bandStroke,\n        fill: \"none\",\n        strokeLinecap: rb.bandsStyle.linecap || \"butt\",\n        classes: \"apexcharts-gauge-band\"\n      });\n      elBand.node.setAttribute(\"data-band-index\", String(b2));\n      g2.add(elBand);\n    }\n    return g2;\n  }\n  /**\n   * Draw tick marks (major + minor) along the gauge arc, with optional\n   * value labels at each major tick.\n   *\n   * @param {Record<string, any>} opts\n   */\n  drawTicks(opts) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const rb = w2.config.plotOptions.radialBar;\n    const ticks = rb.ticks;\n    const g2 = graphics.group({ class: \"apexcharts-gauge-ticks\" });\n    const strokeWidth = this.getStrokeWidth(opts);\n    const radius = opts.size - strokeWidth / 2 - strokeWidth - this.margin;\n    const min = typeof rb.min === \"number\" ? rb.min : 0;\n    const max = typeof rb.max === \"number\" ? rb.max : 100;\n    const majorCount = Math.max(2, (_b = (_a = ticks.major) == null ? void 0 : _a.count) != null ? _b : 11);\n    const minorCount = Math.max(0, (_d = (_c = ticks.minor) == null ? void 0 : _c.count) != null ? _d : 0);\n    const drawTickAt = (value, cfg, isMajor) => {\n      var _a2, _b2, _c2;\n      const angle = this._angleAtValue(value);\n      const length = (_a2 = cfg.length) != null ? _a2 : 8;\n      const inner = cfg.placement === \"inside\" ? radius - length : radius;\n      const outer = cfg.placement === \"inside\" ? radius : radius + length;\n      const p1 = Utils$1.polarToCartesian(\n        opts.centerX,\n        opts.centerY,\n        inner,\n        angle\n      );\n      const p2 = Utils$1.polarToCartesian(\n        opts.centerX,\n        opts.centerY,\n        outer,\n        angle\n      );\n      const line = graphics.drawLine(\n        p1.x,\n        p1.y,\n        p2.x,\n        p2.y,\n        cfg.color || (isMajor ? \"#666\" : \"#999\"),\n        0,\n        cfg.width || (isMajor ? 2 : 1)\n      );\n      g2.add(line);\n      if (isMajor && ((_b2 = ticks.labels) == null ? void 0 : _b2.show)) {\n        const labelRadius = (cfg.placement === \"inside\" ? inner : outer) + (cfg.placement === \"inside\" ? -1 : 1) * ((_c2 = ticks.labels.offset) != null ? _c2 : 6);\n        const labelPos = Utils$1.polarToCartesian(\n          opts.centerX,\n          opts.centerY,\n          labelRadius,\n          angle\n        );\n        const labelText = typeof ticks.labels.formatter === \"function\" ? ticks.labels.formatter(value) : String(value);\n        const elText = graphics.drawText({\n          x: labelPos.x,\n          y: labelPos.y,\n          text: labelText,\n          textAnchor: \"middle\",\n          dominantBaseline: \"middle\",\n          fontFamily: ticks.labels.fontFamily,\n          fontSize: ticks.labels.fontSize,\n          fontWeight: ticks.labels.fontWeight,\n          foreColor: ticks.labels.color,\n          cssClass: \"apexcharts-gauge-tick-label\"\n        });\n        g2.add(elText);\n      }\n    };\n    for (let m2 = 0; m2 < majorCount; m2++) {\n      const t2 = m2 / (majorCount - 1);\n      const value = min + t2 * (max - min);\n      drawTickAt(value, ticks.major || {}, true);\n      if (m2 < majorCount - 1 && minorCount > 0) {\n        for (let n2 = 1; n2 <= minorCount; n2++) {\n          const tMinor = (m2 + n2 / (minorCount + 1)) / (majorCount - 1);\n          const minorValue = min + tMinor * (max - min);\n          drawTickAt(minorValue, ticks.minor || {}, false);\n        }\n      }\n    }\n    return g2;\n  }\n  /**\n   * Draw a rotating needle pointing at the current series value. Only\n   * called when `plotOptions.radialBar.shape === 'needle'`. The needle is\n   * a tapered polygon inside a `<g>` whose rotation transform is animated\n   * from `startAngle` to the value's angle.\n   *\n   * Renders a single needle for the first series value (gauge use case).\n   * Additional series are ignored — drilled-down multi-series gauges are\n   * out of scope for this iteration.\n   *\n   * @param {Record<string, any>} opts\n   */\n  drawNeedle(opts) {\n    var _a, _b, _c, _d, _e;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    const rb = w2.config.plotOptions.radialBar;\n    const cfg = rb.needle || {};\n    const g2 = graphics.group({ class: \"apexcharts-gauge-needle\" });\n    if (!opts.series || opts.series.length === 0) return g2;\n    const strokeWidth = this.getStrokeWidth(opts);\n    const arcRadius = opts.size - strokeWidth / 2 - strokeWidth - this.margin;\n    const length = typeof cfg.length === \"string\" && cfg.length.endsWith(\"%\") ? arcRadius * parseInt(cfg.length, 10) / 100 : Number(cfg.length || arcRadius * 0.85);\n    const baseW = (_a = cfg.baseWidth) != null ? _a : 4;\n    const tipW = (_b = cfg.tipWidth) != null ? _b : 1;\n    const color = cfg.color || \"#333\";\n    const cx = opts.centerX;\n    const needleOffsetY = Number((_c = cfg.offsetY) != null ? _c : 0);\n    const cy = opts.centerY + needleOffsetY;\n    const path = `M ${cx + baseW / 2} ${cy} A ${baseW / 2} ${baseW / 2} 0 0 1 ${cx - baseW / 2} ${cy} L ${cx - tipW / 2} ${cy - length} L ${cx + tipW / 2} ${cy - length} Z`;\n    const elNeedle = graphics.drawPath({\n      d: path,\n      stroke: color,\n      strokeWidth: 0,\n      fill: color,\n      classes: \"apexcharts-gauge-needle-shape\"\n    });\n    g2.add(elNeedle);\n    const value = Number(opts.series[0]);\n    const targetAngle = this._angleAtValue(value);\n    const isInitialMount = this.initialAnim && !w2.globals.dataChanged && !w2.globals.resized;\n    const ctx = (\n      /** @type {any} */\n      this.ctx\n    );\n    const fromAngle = typeof ctx._lastNeedleAngle === \"number\" ? ctx._lastNeedleAngle : this.startAngle;\n    ctx._lastNeedleAngle = targetAngle;\n    const shouldAnimate = Environment.isBrowser() && w2.globals.shouldAnimate && (isInitialMount || w2.globals.dataChanged);\n    if (shouldAnimate && fromAngle !== targetAngle) {\n      const node = g2.node;\n      node.setAttribute(\"transform-origin\", `${cx} ${cy}`);\n      node.setAttribute(\"transform\", `rotate(${fromAngle})`);\n      const speed = ((_d = cfg.animation) == null ? void 0 : _d.duration) && Number(cfg.animation.duration) || cfg.animationSpeed && Number(cfg.animationSpeed) || ((_e = w2.config.chart.animations.dynamicAnimation) == null ? void 0 : _e.speed) || w2.config.chart.animations.speed || 800;\n      const c1 = 1.70158;\n      const c3 = c1 + 1;\n      const easeOutBack2 = (t2) => 1 + c3 * Math.pow(t2 - 1, 3) + c1 * Math.pow(t2 - 1, 2);\n      const easeOutCubic2 = (t2) => 1 - Math.pow(1 - t2, 3);\n      const ease = isInitialMount ? easeOutBack2 : easeOutCubic2;\n      if (w2.globals.radialNeedleRAF != null) {\n        BrowserAPIs.cancelAnimationFrame(w2.globals.radialNeedleRAF);\n        w2.globals.radialNeedleRAF = null;\n      }\n      const startAt = performance.now();\n      const step = (now) => {\n        if (this.w.globals.isDestroyed) {\n          w2.globals.radialNeedleRAF = null;\n          return;\n        }\n        const t2 = Math.max(0, Math.min(1, (now - startAt) / speed));\n        const angle = fromAngle + (targetAngle - fromAngle) * ease(t2);\n        node.setAttribute(\"transform\", `rotate(${angle})`);\n        if (t2 < 1) {\n          w2.globals.radialNeedleRAF = BrowserAPIs.requestAnimationFrame(step);\n        } else {\n          w2.globals.radialNeedleRAF = null;\n        }\n      };\n      w2.globals.radialNeedleRAF = BrowserAPIs.requestAnimationFrame(step);\n    } else {\n      g2.attr({\n        \"transform-origin\": `${cx} ${cy}`,\n        transform: `rotate(${targetAngle})`\n      });\n    }\n    return g2;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  drawHollow(opts) {\n    var _a;\n    const graphics = new Graphics(this.w);\n    const hollow = this.w.config.plotOptions.radialBar.hollow;\n    const circle = graphics.drawCircle(opts.size * 2);\n    const attrs = {\n      class: \"apexcharts-radialbar-hollow\",\n      cx: opts.centerX,\n      cy: opts.centerY,\n      r: opts.size,\n      fill: opts.fill\n    };\n    if (hollow.stroke || hollow.strokeDasharray) {\n      attrs.stroke = hollow.stroke || \"transparent\";\n      attrs[\"stroke-width\"] = (_a = hollow.strokeWidth) != null ? _a : 1;\n      if (hollow.strokeDasharray) {\n        attrs[\"stroke-dasharray\"] = hollow.strokeDasharray;\n      }\n    }\n    circle.attr(attrs);\n    return circle;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   * @param {any} g\n   * @param {number} hollowSize\n   * @param {string} hollowFillID\n   */\n  drawHollowImage(opts, g2, hollowSize, hollowFillID) {\n    const w2 = this.w;\n    const fill = new Fill(this.w);\n    const randID = Utils$1.randomId();\n    const hollowFillImg = w2.config.plotOptions.radialBar.hollow.image;\n    if (w2.config.plotOptions.radialBar.hollow.imageClipped) {\n      fill.clippedImgArea({\n        width: hollowSize,\n        height: hollowSize,\n        image: hollowFillImg,\n        patternID: `pattern${w2.globals.cuid}${randID}`\n      });\n      hollowFillID = `url(#pattern${w2.globals.cuid}${randID})`;\n    } else {\n      const imgWidth = w2.config.plotOptions.radialBar.hollow.imageWidth;\n      const imgHeight = w2.config.plotOptions.radialBar.hollow.imageHeight;\n      if (imgWidth === void 0 && imgHeight === void 0) {\n        const image = w2.dom.Paper.image(\n          hollowFillImg,\n          /** @this {any} */\n          function(loader) {\n            this.move(\n              opts.centerX - loader.width / 2 + w2.config.plotOptions.radialBar.hollow.imageOffsetX,\n              opts.centerY - loader.height / 2 + w2.config.plotOptions.radialBar.hollow.imageOffsetY\n            );\n          }\n        );\n        g2.add(image);\n      } else {\n        const image = w2.dom.Paper.image(\n          hollowFillImg,\n          /** @this {any} */\n          function() {\n            this.move(\n              opts.centerX - imgWidth / 2 + w2.config.plotOptions.radialBar.hollow.imageOffsetX,\n              opts.centerY - imgHeight / 2 + w2.config.plotOptions.radialBar.hollow.imageOffsetY\n            );\n            this.size(imgWidth, imgHeight);\n          }\n        );\n        g2.add(image);\n      }\n    }\n    return hollowFillID;\n  }\n  /**\n   * @param {Record<string, any>} opts\n   */\n  getStrokeWidth(opts) {\n    const w2 = this.w;\n    return opts.size * (100 - parseInt(w2.config.plotOptions.radialBar.hollow.size, 10)) / 100 / (opts.series.length + 1) - this.margin;\n  }\n  /**\n   * @param {Event} e\n   */\n  onBarLabelClick(e2) {\n    var _a;\n    const target = (\n      /** @type {Element} */\n      e2.target\n    );\n    const seriesIndex = parseInt((_a = target.getAttribute(\"rel\")) != null ? _a : \"\", 10) - 1;\n    const legendClick = this.barLabels.onClick;\n    const w2 = this.w;\n    if (legendClick) {\n      legendClick(w2.seriesData.seriesNames[seriesIndex], { w: w2, seriesIndex });\n    }\n  }\n}\nclass RangeBar extends Bar {\n  /**\n   * @param {any[]} series\n   * @param {number} seriesIndex\n   */\n  draw(series, seriesIndex) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    this.rangeBarOptions = this.w.config.plotOptions.rangeBar;\n    this.series = series;\n    this.seriesRangeStart = w2.rangeData.seriesRangeStart;\n    this.seriesRangeEnd = w2.rangeData.seriesRangeEnd;\n    this.barHelpers.initVariables(series);\n    const ret = graphics.group({\n      class: \"apexcharts-rangebar-series apexcharts-plot-series\"\n    });\n    for (let i2 = 0; i2 < series.length; i2++) {\n      let x, y;\n      const realIndex = w2.globals.comboCharts ? (\n        /** @type {any} */\n        seriesIndex[i2]\n      ) : i2;\n      const { columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);\n      const elSeries = graphics.group({\n        class: `apexcharts-series`,\n        seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[realIndex]),\n        rel: i2 + 1,\n        \"data:realIndex\": realIndex\n      });\n      Series.addCollapsedClassToSeries(this.w, elSeries, realIndex);\n      if (series[i2].length > 0) {\n        this.visibleI = this.visibleI + 1;\n      }\n      let translationsIndex = 0;\n      if (this.yRatio.length > 1) {\n        this.yaxisIndex = /** @type {any} */\n        w2.globals.seriesYAxisReverseMap[realIndex][0];\n        translationsIndex = realIndex;\n      }\n      const initPositions = this.barHelpers.initialPositions(realIndex);\n      const {\n        y: initY,\n        zeroW,\n        // zeroW is the baseline where 0 meets x axis\n        x: initX,\n        zeroH\n        // zeroH is the baseline where 0 meets y axis\n      } = initPositions;\n      let barWidth = (_a = initPositions.barWidth) != null ? _a : 0;\n      let barHeight = (_b = initPositions.barHeight) != null ? _b : 0;\n      const yDivision = (_c = initPositions.yDivision) != null ? _c : 0;\n      const xDivision = (_d = initPositions.xDivision) != null ? _d : 0;\n      y = initY;\n      x = initX;\n      const elDataLabelsWrap = graphics.group({\n        class: \"apexcharts-datalabels\",\n        \"data:realIndex\": realIndex\n      });\n      const elGoalsMarkers = graphics.group({\n        class: \"apexcharts-rangebar-goals-markers\"\n      });\n      for (let j = 0; j < w2.globals.dataPoints; j++) {\n        const strokeWidth = this.barHelpers.getStrokeWidth(i2, j, realIndex);\n        const y1 = this.seriesRangeStart[i2][j];\n        const y2 = this.seriesRangeEnd[i2][j];\n        let paths = (\n          /** @type {any} */\n          null\n        );\n        let barXPosition = null;\n        let barYPosition = null;\n        const params = { x, y, strokeWidth, elSeries };\n        let seriesLen = this.seriesLen;\n        if (w2.config.plotOptions.bar.rangeBarGroupRows) {\n          seriesLen = 1;\n        }\n        if (typeof /** @type {Record<string,any>} */\n        ((_e = w2.config.series[i2].data) == null ? void 0 : _e[j]) === \"undefined\") {\n          break;\n        }\n        if (this.isHorizontal) {\n          barYPosition = y + barHeight * /** @type {any} */\n          this.visibleI;\n          const srty = (yDivision - barHeight * seriesLen) / 2;\n          if (\n            /** @type {Record<string,any>} */\n            (_g = (_f = w2.config.series[i2].data) == null ? void 0 : _f[j]) == null ? void 0 : _g.x\n          ) {\n            const positions = this.detectOverlappingBars({\n              i: i2,\n              j,\n              barYPosition,\n              srty,\n              barHeight,\n              yDivision,\n              initPositions\n            });\n            barHeight = positions.barHeight;\n            barYPosition = positions.barYPosition;\n          }\n          paths = this.drawRangeBarPaths(__spreadValues({\n            indexes: { i: i2, j, realIndex },\n            barHeight,\n            barYPosition,\n            zeroW,\n            yDivision,\n            y1,\n            y2\n          }, params));\n          barWidth = paths.barWidth;\n        } else {\n          if (w2.axisFlags.isXNumeric) {\n            x = (w2.seriesData.seriesX[i2][j] - w2.globals.minX) / this.xRatio - barWidth / 2;\n          }\n          barXPosition = x + barWidth * /** @type {any} */\n          this.visibleI;\n          const srtx = (xDivision - barWidth * seriesLen) / 2;\n          if (\n            /** @type {Record<string,any>} */\n            (_i = (_h = w2.config.series[i2].data) == null ? void 0 : _h[j]) == null ? void 0 : _i.x\n          ) {\n            const positions = this.detectOverlappingBars({\n              i: i2,\n              j,\n              barXPosition,\n              srtx,\n              barWidth,\n              xDivision,\n              initPositions\n            });\n            barWidth = positions.barWidth;\n            barXPosition = positions.barXPosition;\n          }\n          paths = this.drawRangeColumnPaths(__spreadValues({\n            indexes: { i: i2, j, realIndex, translationsIndex },\n            barWidth,\n            barXPosition,\n            zeroH,\n            xDivision\n          }, params));\n          barHeight = paths.barHeight;\n        }\n        const barGoalLine = this.barHelpers.drawGoalLine({\n          barXPosition: paths.barXPosition,\n          barYPosition,\n          goalX: paths.goalX,\n          goalY: paths.goalY,\n          barHeight,\n          barWidth\n        });\n        if (barGoalLine) {\n          elGoalsMarkers.add(barGoalLine);\n        }\n        y = paths.y;\n        x = paths.x;\n        const pathFill = this.barHelpers.getPathFillColor(\n          series,\n          i2,\n          j,\n          realIndex\n        );\n        this.renderSeries({\n          realIndex,\n          pathFill: pathFill.color,\n          lineFill: pathFill.useRangeColor ? pathFill.color : w2.globals.stroke.colors[realIndex],\n          j,\n          i: i2,\n          x,\n          y,\n          y1,\n          y2,\n          pathFrom: paths.pathFrom,\n          pathTo: paths.pathTo,\n          strokeWidth,\n          elSeries,\n          series,\n          barHeight,\n          barWidth,\n          barXPosition,\n          barYPosition,\n          columnGroupIndex,\n          elDataLabelsWrap,\n          elGoalsMarkers,\n          visibleSeries: this.visibleI,\n          type: \"rangebar\"\n        });\n      }\n      ret.add(elSeries);\n    }\n    return ret;\n  }\n  /** @param {{ i?: any, j?: any, barYPosition?: any, barXPosition?: any, srty?: any, srtx?: any, barHeight?: any, barWidth?: any, yDivision?: any, xDivision?: any, initPositions?: any }} opts */\n  detectOverlappingBars({\n    i: i2,\n    j,\n    barYPosition,\n    barXPosition,\n    srty,\n    srtx,\n    barHeight,\n    barWidth,\n    yDivision,\n    xDivision,\n    initPositions\n  }) {\n    var _a, _b, _c, _d;\n    const w2 = this.w;\n    let overlaps = [];\n    const rangeName = (_b = (_a = w2.globals.seriesRangeName) == null ? void 0 : _a[i2]) == null ? void 0 : _b[j];\n    const x = (\n      /** @type {Record<string,any>} */\n      (_d = (_c = w2.config.series[i2].data) == null ? void 0 : _c[j]) == null ? void 0 : _d.x\n    );\n    const labelX = Array.isArray(x) ? x.join(\" \") : x;\n    const rowIndex = w2.labelData.labels.map((_) => Array.isArray(_) ? _.join(\" \") : _).indexOf(labelX);\n    const overlappedIndex = w2.rangeData.seriesRange[i2].findIndex(\n      (tx) => {\n        var _a2;\n        return tx.x === labelX && ((_a2 = tx.overlaps) == null ? void 0 : _a2.size) > 0;\n      }\n    );\n    if (this.isHorizontal) {\n      if (w2.config.plotOptions.bar.rangeBarGroupRows) {\n        barYPosition = srty + yDivision * rowIndex;\n      } else {\n        barYPosition = srty + barHeight * this.visibleI + yDivision * rowIndex;\n      }\n      if (overlappedIndex > -1 && !w2.config.plotOptions.bar.rangeBarOverlap) {\n        overlaps = Array.from(\n          /** @type {any} */\n          w2.rangeData.seriesRange[i2][overlappedIndex].overlaps\n        );\n        if (overlaps.indexOf(rangeName) > -1) {\n          barHeight = initPositions.barHeight / overlaps.length;\n          barYPosition = barHeight * this.visibleI + yDivision * (100 - parseInt(this.barOptions.barHeight, 10)) / 100 / 2 + barHeight * (this.visibleI + overlaps.indexOf(rangeName)) + yDivision * rowIndex;\n        }\n      }\n    } else {\n      if (rowIndex > -1 && !w2.labelData.timescaleLabels.length) {\n        if (w2.config.plotOptions.bar.rangeBarGroupRows) {\n          barXPosition = srtx + xDivision * rowIndex;\n        } else {\n          barXPosition = srtx + barWidth * this.visibleI + xDivision * rowIndex;\n        }\n      }\n      if (overlappedIndex > -1 && !w2.config.plotOptions.bar.rangeBarOverlap) {\n        overlaps = Array.from(\n          /** @type {any} */\n          w2.rangeData.seriesRange[i2][overlappedIndex].overlaps\n        );\n        if (overlaps.indexOf(rangeName) > -1) {\n          barWidth = initPositions.barWidth / overlaps.length;\n          barXPosition = barWidth * this.visibleI + xDivision * (100 - parseInt(this.barOptions.barWidth, 10)) / 100 / 2 + barWidth * (this.visibleI + overlaps.indexOf(rangeName)) + xDivision * rowIndex;\n        }\n      }\n    }\n    return {\n      barYPosition,\n      barXPosition,\n      barHeight,\n      barWidth\n    };\n  }\n  /** @param {{indexes: any, x: any, xDivision: any, barWidth: any, barXPosition: any, zeroH: any}} opts */\n  drawRangeColumnPaths({\n    indexes,\n    x,\n    xDivision,\n    barWidth,\n    barXPosition,\n    zeroH\n  }) {\n    var _a, _b;\n    const w2 = this.w;\n    const { i: i2, j, realIndex, translationsIndex } = indexes;\n    const yRatio = this.yRatio[translationsIndex];\n    const range = this.getRangeValue(realIndex, j);\n    let y1 = Math.min(range.start, range.end);\n    let y2 = Math.max(range.start, range.end);\n    if (typeof /** @type {any} */\n    ((_a = this.series[i2]) == null ? void 0 : _a[j]) === \"undefined\" || /** @type {any} */\n    ((_b = this.series[i2]) == null ? void 0 : _b[j]) === null) {\n      y1 = zeroH;\n    } else {\n      y1 = zeroH - y1 / yRatio;\n      y2 = zeroH - y2 / yRatio;\n    }\n    const barHeight = Math.abs(y2 - y1);\n    const paths = this.barHelpers.getColumnPaths({\n      barXPosition,\n      barWidth,\n      y1,\n      y2,\n      strokeWidth: this.strokeWidth,\n      series: this.seriesRangeEnd,\n      realIndex,\n      i: realIndex,\n      j,\n      w: w2\n    });\n    if (!w2.axisFlags.isXNumeric) {\n      x = x + xDivision;\n    } else {\n      const xForNumericXAxis = this.getBarXForNumericXAxis({\n        x,\n        j,\n        realIndex,\n        barWidth\n      });\n      x = xForNumericXAxis.x;\n      barXPosition = xForNumericXAxis.barXPosition;\n    }\n    return {\n      pathTo: paths.pathTo,\n      pathFrom: paths.pathFrom,\n      barHeight,\n      x,\n      y: range.start < 0 && range.end < 0 ? y1 : y2,\n      goalY: this.barHelpers.getGoalValues(\n        \"y\",\n        /** @type {any} */\n        null,\n        zeroH,\n        realIndex,\n        j,\n        translationsIndex\n      ),\n      barXPosition\n    };\n  }\n  /**\n   * @param {number} val\n   */\n  preventBarOverflow(val) {\n    const w2 = this.w;\n    if (val < 0) {\n      val = 0;\n    }\n    if (val > w2.layout.gridWidth) {\n      val = w2.layout.gridWidth;\n    }\n    return val;\n  }\n  /** @param {{indexes: any, y: any, y1: any, y2: any, yDivision: any, barHeight: any, barYPosition: any, zeroW: any}} opts */\n  drawRangeBarPaths({\n    indexes,\n    y,\n    y1,\n    y2,\n    yDivision,\n    barHeight,\n    barYPosition,\n    zeroW\n  }) {\n    const w2 = this.w;\n    const { realIndex, j } = indexes;\n    const x1 = this.preventBarOverflow(zeroW + y1 / this.invertedYRatio);\n    const x2 = this.preventBarOverflow(zeroW + y2 / this.invertedYRatio);\n    const range = this.getRangeValue(realIndex, j);\n    const barWidth = Math.abs(x2 - x1);\n    const paths = this.barHelpers.getBarpaths({\n      barYPosition,\n      barHeight,\n      x1,\n      x2,\n      strokeWidth: this.strokeWidth,\n      series: this.seriesRangeEnd,\n      i: realIndex,\n      realIndex,\n      j,\n      w: w2\n    });\n    if (!w2.axisFlags.isXNumeric) {\n      y = y + yDivision;\n    }\n    return {\n      pathTo: paths.pathTo,\n      pathFrom: paths.pathFrom,\n      barWidth,\n      x: range.start < 0 && range.end < 0 ? x1 : x2,\n      goalX: this.barHelpers.getGoalValues(\n        \"x\",\n        zeroW,\n        /** @type {any} */\n        null,\n        realIndex,\n        j,\n        0\n      ),\n      y\n    };\n  }\n  /**\n   * @param {number} i\n   * @param {number} j\n   */\n  getRangeValue(i2, j) {\n    const w2 = this.w;\n    return {\n      start: w2.rangeData.seriesRangeStart[i2][j],\n      end: w2.rangeData.seriesRangeEnd[i2][j]\n    };\n  }\n}\nfunction normalize(data, area) {\n  let sum = 0;\n  for (let i2 = 0; i2 < data.length; i2++) {\n    sum += data[i2];\n  }\n  const multiplier = area / sum;\n  const result = new Array(data.length);\n  for (let i2 = 0; i2 < data.length; i2++) {\n    result[i2] = data[i2] * multiplier;\n  }\n  return result;\n}\nfunction calculateRatio(rowMin, rowMax, rowSum, length) {\n  const lengthSq = length * length;\n  const sumSq = rowSum * rowSum;\n  return Math.max(\n    lengthSq * rowMax / sumSq,\n    sumSq / (lengthSq * rowMin)\n  );\n}\nfunction improvesRatio(rowLen, rowMin, rowMax, rowSum, nextNode, length) {\n  if (rowLen === 0) return true;\n  const currentRatio = calculateRatio(rowMin, rowMax, rowSum, length);\n  const newRatio = calculateRatio(\n    Math.min(rowMin, nextNode),\n    Math.max(rowMax, nextNode),\n    rowSum + nextNode,\n    length\n  );\n  return currentRatio >= newRatio;\n}\nfunction emitCoordinates(coords, row, rowLen, rowSum, xoffset, yoffset, width, height) {\n  if (width >= height) {\n    const areaWidth = rowSum / height;\n    let subY = yoffset;\n    for (let i2 = 0; i2 < rowLen; i2++) {\n      const h2 = row[i2] / areaWidth;\n      coords.push([xoffset, subY, xoffset + areaWidth, subY + h2]);\n      subY += h2;\n    }\n  } else {\n    const areaHeight = rowSum / width;\n    let subX = xoffset;\n    for (let i2 = 0; i2 < rowLen; i2++) {\n      const w2 = row[i2] / areaHeight;\n      coords.push([subX, yoffset, subX + w2, yoffset + areaHeight]);\n      subX += w2;\n    }\n  }\n}\nfunction squarify(data, xoffset, yoffset, width, height) {\n  const coords = [];\n  const n2 = data.length;\n  if (n2 === 0) return coords;\n  const row = new Array(n2);\n  let rowLen = 0;\n  let rowSum = 0;\n  let rowMin = Infinity;\n  let rowMax = -Infinity;\n  let i2 = 0;\n  while (i2 < n2) {\n    const length = Math.min(width, height);\n    const val = data[i2];\n    if (improvesRatio(rowLen, rowMin, rowMax, rowSum, val, length)) {\n      row[rowLen] = val;\n      rowLen++;\n      rowSum += val;\n      if (val < rowMin) rowMin = val;\n      if (val > rowMax) rowMax = val;\n      i2++;\n    } else {\n      emitCoordinates(coords, row, rowLen, rowSum, xoffset, yoffset, width, height);\n      if (width >= height) {\n        const areaWidth = rowSum / height;\n        xoffset += areaWidth;\n        width -= areaWidth;\n      } else {\n        const areaHeight = rowSum / width;\n        yoffset += areaHeight;\n        height -= areaHeight;\n      }\n      rowLen = 0;\n      rowSum = 0;\n      rowMin = Infinity;\n      rowMax = -Infinity;\n    }\n  }\n  if (rowLen > 0) {\n    emitCoordinates(coords, row, rowLen, rowSum, xoffset, yoffset, width, height);\n  }\n  return coords;\n}\nfunction generate(data, width, height) {\n  const n2 = data.length;\n  const sums = new Array(n2);\n  for (let i2 = 0; i2 < n2; i2++) {\n    let s2 = 0;\n    const series = data[i2];\n    for (let j = 0; j < series.length; j++) {\n      s2 += series[j];\n    }\n    sums[i2] = s2;\n  }\n  const seriesRects = squarify(\n    normalize(sums, width * height),\n    0,\n    0,\n    width,\n    height\n  );\n  const results = new Array(n2);\n  for (let i2 = 0; i2 < n2; i2++) {\n    const rect = seriesRects[i2];\n    const rx = rect[0];\n    const ry = rect[1];\n    const rw = rect[2] - rx;\n    const rh = rect[3] - ry;\n    results[i2] = squarify(\n      normalize(data[i2], rw * rh),\n      rx,\n      ry,\n      rw,\n      rh\n    );\n  }\n  return results;\n}\nfunction computeArea(node) {\n  const kids = node.children;\n  if (kids && kids.length) {\n    let s2 = 0;\n    for (let i2 = 0; i2 < kids.length; i2++) {\n      s2 += computeArea(kids[i2]);\n    }\n    node._area = s2;\n    return s2;\n  }\n  const v2 = Number(node.value);\n  const a2 = isNaN(v2) ? 0 : Math.abs(v2);\n  node._area = a2;\n  return a2;\n}\nfunction layoutLevel(nodes, xoffset, yoffset, width, height, depth, padding, header) {\n  const n2 = nodes.length;\n  if (n2 === 0 || width <= 0 || height <= 0) return;\n  const areas = new Array(n2);\n  let total = 0;\n  for (let i2 = 0; i2 < n2; i2++) {\n    areas[i2] = nodes[i2]._area;\n    total += areas[i2];\n  }\n  if (total <= 0) return;\n  const rects = squarify(\n    normalize(areas, width * height),\n    xoffset,\n    yoffset,\n    width,\n    height\n  );\n  for (let i2 = 0; i2 < n2; i2++) {\n    const node = nodes[i2];\n    const r2 = rects[i2];\n    if (!r2) continue;\n    node.rect = r2;\n    node.depth = depth;\n    const kids = node.children;\n    if (!kids || !kids.length) continue;\n    const rw = r2[2] - r2[0];\n    const rh = r2[3] - r2[1];\n    let pad = Math.max(0, padding(node, depth, rw, rh) || 0);\n    if (pad * 2 >= rw || pad * 2 >= rh) pad = 0;\n    let head = Math.max(0, header(node, depth, rw, rh) || 0);\n    if (head > 0 && rh - pad * 2 - head < head) head = 0;\n    node.headerHeight = head;\n    layoutLevel(\n      kids,\n      r2[0] + pad,\n      r2[1] + head + pad,\n      rw - pad * 2,\n      rh - head - pad * 2,\n      depth + 1,\n      padding,\n      header\n    );\n  }\n}\nfunction generateNested(nodes, width, height, opts = {}) {\n  if (!Array.isArray(nodes) || nodes.length === 0) return nodes || [];\n  const padding = opts.padding || (() => 0);\n  const header = opts.header || (() => 0);\n  for (let i2 = 0; i2 < nodes.length; i2++) computeArea(nodes[i2]);\n  layoutLevel(nodes, 0, 0, width, height, 0, padding, header);\n  return nodes;\n}\nconst TreemapSquared = { generate, generateNested };\nconst areaOf = (r2) => (r2[2] - r2[0]) * (r2[3] - r2[1]);\nclass TreemapChart {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.ctx = ctx;\n    this.w = w2;\n    this.strokeWidth = this.w.config.stroke.width;\n    this.helpers = new TreemapHelpers(w2, ctx);\n    this.dynamicAnim = this.w.config.chart.animations.dynamicAnimation;\n    this.labels = [];\n    this.roots = [];\n    this.drawn = [];\n    this.nested = false;\n    this.showParents = false;\n    this.scale = null;\n    this._levelCache = null;\n    this._total = null;\n    this._avgLabelSize = null;\n    this._tooltipEl = null;\n    this._tipOwned = false;\n    this._morphLeafIndex = 0;\n  }\n  /**\n   * @param {any[]} series\n   */\n  draw(series) {\n    var _a;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w, this.ctx);\n    const fill = new Fill(this.w);\n    const ret = graphics.group({\n      class: \"apexcharts-treemap\"\n    });\n    if (w2.globals.noData) return ret;\n    series.forEach((s2) => {\n      s2.map((v2) => {\n        return Math.abs(v2);\n      });\n    });\n    this.negRange = this.helpers.checkColorRange();\n    w2.config.series.forEach((s2, i2) => {\n      s2.data.forEach((l2) => {\n        if (!Array.isArray(this.labels[i2])) this.labels[i2] = [];\n        this.labels[i2].push(l2.x);\n      });\n    });\n    const tree = getTreemapRoots(w2);\n    this.nested = tree.nested;\n    this.roots = tree.roots;\n    this.scale = buildContinuousScale(w2);\n    const drawn = tree.roots.length === 1 ? tree.roots[0].children || [] : tree.roots;\n    this.drawn = drawn;\n    const parentsCfg = w2.config.plotOptions.treemap.parents;\n    this.showParents = parentsCfg.show === true || parentsCfg.show !== false && this.nested;\n    const focus = this._resolveFocus(drawn);\n    const layoutRoots = focus ? [focus] : drawn;\n    TreemapSquared.generateNested(\n      layoutRoots,\n      w2.layout.gridWidth,\n      w2.layout.gridHeight,\n      {\n        padding: (node, depth, rw, rh) => this.showParents ? this._levelPadding(depth, rw, rh) : 0,\n        header: (node, depth, rw, rh) => this.showParents ? this._levelHeader(node, depth, rw, rh) : 0\n      }\n    );\n    const morphSrc = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange;\n    const morphActive = !!morphSrc && typeof morphSrc.isActive === \"function\" && morphSrc.isActive() && typeof morphSrc.getInitialPathAt === \"function\";\n    this._morphLeafIndex = 0;\n    const leavesBySeries = this._leavesBySeries(layoutRoots, w2.config.series.length);\n    const parentsBySeries = this.showParents ? this._parentsBySeries(layoutRoots, w2.config.series.length) : [];\n    leavesBySeries.forEach((node, i2) => {\n      var _a2;\n      const elSeries = graphics.group({\n        class: `apexcharts-series apexcharts-treemap-series`,\n        seriesName: Utils$1.escapeString(w2.seriesData.seriesNames[i2]),\n        rel: i2 + 1,\n        \"data:realIndex\": i2\n      });\n      graphics.setupEventDelegation(elSeries, \".apexcharts-treemap-rect\");\n      if (w2.config.chart.dropShadow.enabled) {\n        const shadow = w2.config.chart.dropShadow;\n        const filters = new Filters(this.w);\n        filters.dropShadow(ret, shadow, i2);\n      }\n      const elDataLabelWrap = graphics.group({\n        class: \"apexcharts-data-labels\"\n      });\n      const bounds = {\n        xMin: Infinity,\n        yMin: Infinity,\n        xMax: -Infinity,\n        yMax: -Infinity\n      };\n      if (this.showParents) {\n        (parentsBySeries[i2] || []).forEach((p2) => {\n          this._drawParent(elSeries, p2, i2);\n        });\n      }\n      const animCfg = w2.config.chart.animations;\n      const gradCfg = animCfg.animateGradually;\n      const cascadeEnabled = gradCfg && gradCfg.enabled !== false;\n      const cascadeDelays = new Array(node.length).fill(0);\n      if (cascadeEnabled) {\n        const tileCount = node.length || 1;\n        const baseDelay = Math.min(\n          gradCfg.delay || 0,\n          animCfg.speed * 0.5 / tileCount\n        );\n        const ranked = node.map(\n          /** @param {any} leaf @param {number} k */\n          (leaf, k) => ({ j: k, area: leaf.rect ? areaOf(leaf.rect) : 0 })\n        ).sort(\n          /** @param {{j: number, area: number}} a @param {{j: number, area: number}} b */\n          (a2, b2) => b2.area - a2.area\n        );\n        ranked.forEach(\n          /** @param {{j: number, area: number}} item @param {number} rank */\n          (item, rank) => {\n            cascadeDelays[item.j] = rank * baseDelay;\n          }\n        );\n      }\n      node.forEach((leaf, k) => {\n        const r2 = leaf.rect;\n        if (!r2) return;\n        const j = leaf._di;\n        const x1 = r2[0];\n        const y1 = r2[1];\n        const x2 = r2[2];\n        const y2 = r2[3];\n        bounds.xMin = Math.min(bounds.xMin, x1);\n        bounds.yMin = Math.min(bounds.yMin, y1);\n        bounds.xMax = Math.max(bounds.xMax, x2);\n        bounds.yMax = Math.max(bounds.yMax, y2);\n        const colorProps = this._leafColor(i2, j);\n        const color = colorProps.color;\n        const pathFill = fill.fillPath({\n          color,\n          seriesNumber: i2,\n          dataPointIndex: j\n        });\n        const morphFrom = morphActive ? this._morphSourceForLeaf(leaf) : null;\n        const elRect = morphFrom ? graphics.drawPath({\n          d: this._tilePath(x1, y1, x2, y2),\n          fill: \"#fff\",\n          stroke: w2.config.plotOptions.treemap.useFillColorAsStroke ? color : w2.globals.stroke.colors[i2],\n          strokeWidth: this.strokeWidth,\n          fillOpacity: 1\n        }) : graphics.drawRect(\n          x1,\n          y1,\n          x2 - x1,\n          y2 - y1,\n          w2.config.plotOptions.treemap.borderRadius,\n          \"#fff\",\n          1,\n          this.strokeWidth,\n          w2.config.plotOptions.treemap.useFillColorAsStroke ? color : w2.globals.stroke.colors[i2]\n        );\n        elRect.attr({\n          cx: x1,\n          cy: y1,\n          index: i2,\n          i: i2,\n          j,\n          width: x2 - x1,\n          height: y2 - y1,\n          fill: pathFill\n        });\n        elRect.node.classList.add(\"apexcharts-treemap-rect\");\n        elRect.node.setAttribute(\"data:key\", morphKey(leaf._key));\n        let fromRect = {\n          x: x1 + (x2 - x1) / 2,\n          y: y1 + (y2 - y1) / 2,\n          width: 0,\n          height: 0\n        };\n        const toRect = {\n          x: x1,\n          y: y1,\n          width: x2 - x1,\n          height: y2 - y1\n        };\n        if (morphFrom) {\n          this._morphTile(\n            elRect,\n            morphFrom,\n            this._tilePath(x1, y1, x2, y2),\n            this.ctx.morphTypeChange.getSpeed(),\n            i2,\n            j\n          );\n        } else if (w2.config.chart.animations.enabled && !w2.globals.dataChanged) {\n          let speed = 1;\n          if (!w2.globals.resized) {\n            speed = w2.config.chart.animations.speed;\n          }\n          this.animateTreemap(\n            elRect,\n            fromRect,\n            toRect,\n            speed,\n            // Ranked by draw order, not by data index — the cascade is about\n            // what is on screen.\n            cascadeDelays[k] || 0\n          );\n        }\n        if (w2.globals.dataChanged) {\n          let speed = 1;\n          if (this.dynamicAnim.enabled && w2.globals.shouldAnimate) {\n            speed = this.dynamicAnim.speed;\n            if (w2.globals.previousPaths[i2] && /** @type {Record<string,any>} */\n            w2.globals.previousPaths[i2][j] && /** @type {Record<string,any>} */\n            w2.globals.previousPaths[i2][j].rect) {\n              fromRect = /** @type {Record<string,any>} */\n              w2.globals.previousPaths[i2][j].rect;\n            }\n            this.animateTreemap(elRect, fromRect, toRect, speed);\n          }\n        }\n        let fontSize = this.getFontSize(r2);\n        if (w2.config.plotOptions.treemap.dataLabels.format === \"truncate\") {\n          fontSize = parseInt(String(w2.config.dataLabels.style.fontSize), 10);\n        }\n        let dataLabels = null;\n        if (w2.config.dataLabels.enabled && this._labelCanShow(fontSize, x2 - x1, y2 - y1)) {\n          let formattedText = w2.config.dataLabels.formatter(this.labels[i2][j], {\n            value: w2.seriesData.series[i2][j],\n            seriesIndex: i2,\n            dataPointIndex: j,\n            w: w2\n          });\n          if (w2.config.plotOptions.treemap.dataLabels.format === \"truncate\") {\n            formattedText = this.truncateLabels(\n              String(formattedText),\n              fontSize,\n              x1,\n              y1,\n              x2,\n              y2\n            );\n          }\n          if (w2.seriesData.series[i2][j]) {\n            dataLabels = this.helpers.calculateDataLabels({\n              text: formattedText,\n              x: (x1 + x2) / 2,\n              y: (y1 + y2) / 2 + this.strokeWidth / 2 + fontSize / 3,\n              i: i2,\n              j,\n              colorProps,\n              fontSize,\n              series\n            });\n          }\n          if (w2.config.dataLabels.enabled && dataLabels) {\n            this.rotateToFitLabel(\n              dataLabels,\n              fontSize,\n              formattedText,\n              x1,\n              y1,\n              x2,\n              y2\n            );\n          }\n        }\n        elSeries.add(elRect);\n        if (dataLabels !== null) {\n          elSeries.add(dataLabels);\n        }\n      });\n      const seriesTitle = w2.config.plotOptions.treemap.seriesTitle;\n      if (!this.showParents && w2.config.series.length > 1 && seriesTitle && seriesTitle.show) {\n        const sName = (\n          /** @type {Record<string,any>} */\n          w2.config.series[i2].name || \"\"\n        );\n        if (sName && bounds.xMin < Infinity && bounds.yMin < Infinity) {\n          const {\n            offsetX,\n            offsetY,\n            borderColor,\n            borderWidth,\n            borderRadius,\n            style\n          } = seriesTitle;\n          const textColor = style.color || w2.config.chart.foreColor;\n          const padding = {\n            left: style.padding.left,\n            right: style.padding.right,\n            top: style.padding.top,\n            bottom: style.padding.bottom\n          };\n          const textSize = graphics.getTextRects(\n            sName,\n            style.fontSize,\n            style.fontFamily\n          );\n          const labelRectWidth = textSize.width + padding.left + padding.right;\n          const labelRectHeight = textSize.height + padding.top + padding.bottom;\n          const labelX = bounds.xMin + (offsetX || 0);\n          const labelY = bounds.yMin + (offsetY || 0);\n          const elLabelRect = graphics.drawRect(\n            labelX,\n            labelY,\n            labelRectWidth,\n            labelRectHeight,\n            borderRadius,\n            style.background,\n            1,\n            borderWidth,\n            borderColor\n          );\n          const elLabelText = graphics.drawText({\n            x: labelX + padding.left,\n            y: labelY + padding.top + ((_a2 = textSize == null ? void 0 : textSize.height) != null ? _a2 : 0) * 0.75,\n            text: sName,\n            fontSize: style.fontSize,\n            fontFamily: style.fontFamily,\n            fontWeight: style.fontWeight,\n            foreColor: textColor,\n            cssClass: style.cssClass || \"\"\n          });\n          elSeries.add(elLabelRect);\n          elSeries.add(elLabelText);\n        }\n      }\n      elSeries.add(elDataLabelWrap);\n      ret.add(elSeries);\n    });\n    this._renderBreadcrumb();\n    return ret;\n  }\n  // ----------------------------------------------------------------- levels\n  /**\n   * Per-level config: `plotOptions.treemap.parents` is the base, and\n   * `plotOptions.treemap.levels[depth]` overrides it. Depth 0 is the outermost\n   * group actually drawn (the series, unless a single series was unwrapped).\n   * @param {number} depth\n   * @returns {any}\n   */\n  _levelCfg(depth) {\n    if (!this._levelCache) this._levelCache = [];\n    if (this._levelCache[depth]) return this._levelCache[depth];\n    const tm = this.w.config.plotOptions.treemap;\n    const base = tm.parents || {};\n    const lvl = (tm.levels || [])[depth] || {};\n    const merged = __spreadProps(__spreadValues(__spreadValues({}, base), lvl), {\n      header: __spreadProps(__spreadValues(__spreadValues({}, base.header || {}), lvl.header || {}), {\n        style: __spreadValues(__spreadValues({}, (base.header || {}).style || {}), (lvl.header || {}).style || {})\n      }),\n      hover: __spreadValues(__spreadValues({}, base.hover || {}), lvl.hover || {})\n    });\n    this._levelCache[depth] = merged;\n    return merged;\n  }\n  /**\n   * The inset between a parent's edge and its children, at this depth.\n   * @param {number} depth\n   * @param {number} _rw\n   * @param {number} _rh\n   * @returns {number}\n   */\n  _levelPadding(depth, _rw, _rh) {\n    const cfg = this._levelCfg(depth);\n    return Number(cfg.padding) || 0;\n  }\n  /**\n   * The header strip height at this depth, or 0 when the tile is too small to\n   * carry one. The geometry library clamps against its own box; this is the\n   * legibility rule, which needs the font size and so lives here.\n   * @param {any} node\n   * @param {number} depth\n   * @param {number} rw\n   * @param {number} rh\n   * @returns {number}\n   */\n  _levelHeader(node, depth, rw, rh) {\n    const cfg = this._levelCfg(depth);\n    const header = cfg.header || {};\n    if (header.show === false) return 0;\n    const h2 = Number(header.height);\n    if (!Number.isFinite(h2) || h2 <= 0) return 0;\n    const minWidth = Number(header.minWidth) || 40;\n    if (rw < minWidth) return 0;\n    if (rh < h2 * 2) return 0;\n    return h2;\n  }\n  // ------------------------------------------------------------------ nodes\n  /**\n   * Leaves of the drawn tree, bucketed by the series they came from and kept in\n   * depth-first order.\n   * @param {any[]} roots\n   * @param {number} seriesCount\n   * @returns {any[][]}\n   */\n  _leavesBySeries(roots, seriesCount) {\n    const out = new Array(Math.max(1, seriesCount));\n    for (let i2 = 0; i2 < out.length; i2++) out[i2] = [];\n    const walk = (node) => {\n      if (node.children && node.children.length) {\n        node.children.forEach(walk);\n      } else {\n        const si = node._si || 0;\n        if (out[si]) out[si].push(node);\n      }\n    };\n    roots.forEach(walk);\n    return out;\n  }\n  /**\n   * Non-leaf nodes of the drawn tree, bucketed by series, shallowest first so a\n   * container is painted before anything nested inside it.\n   * @param {any[]} roots\n   * @param {number} seriesCount\n   * @returns {any[][]}\n   */\n  _parentsBySeries(roots, seriesCount) {\n    const out = new Array(Math.max(1, seriesCount));\n    for (let i2 = 0; i2 < out.length; i2++) out[i2] = [];\n    const walk = (node) => {\n      if (!node.children || !node.children.length) return;\n      const si = node._si || 0;\n      if (out[si]) out[si].push(node);\n      node.children.forEach(walk);\n    };\n    roots.forEach(walk);\n    out.forEach(\n      (list) => list.sort(\n        (a2, b2) => (a2.depth || 0) - (b2.depth || 0)\n      )\n    );\n    return out;\n  }\n  // ---------------------------------------------------------------- colours\n  /**\n   * A leaf's fill.\n   *\n   * Continuous colour (a datum carrying a second metric) takes over when it is\n   * configured, because shading a tile by its own area value is precisely what\n   * that mode replaces. Everything else - `colorScale.ranges`, `enableShades`,\n   * `distributed`, negative handling - is the path it always was.\n   *\n   * The shape of the return value matches `Helpers.getShadeColor` so the\n   * caller cannot tell the two apart.\n   *\n   * @param {number} i\n   * @param {number} j\n   * @returns {any}\n   */\n  _leafColor(i2, j) {\n    const w2 = this.w;\n    if (this.scale) {\n      const cv = colorValueOf(w2, i2, j);\n      if (cv != null) {\n        const color = this.scale.at(cv);\n        return {\n          color,\n          // The discrete path has never supplied a label colour, so only the\n          // continuous path sets one: a diverging ramp runs right through the\n          // middle of the luminance range and a fixed light-or-dark label\n          // would be unreadable at one end or the other.\n          foreColor: readableOn(color),\n          colorProps: { color, foreColor: readableOn(color), percent: 0 }\n        };\n      }\n    }\n    return this.helpers.getShadeColor(\n      w2.config.chart.type,\n      i2,\n      j,\n      this.negRange\n    );\n  }\n  // ---------------------------------------------------------------- parents\n  /**\n   * Resolved container/header colours for a level. Parent marks are chrome, not\n   * data, so they default to a neutral tint of the background rather than to a\n   * series colour: with continuous colour on the leaves, a coloured container\n   * would read as another data value.\n   * @param {number} depth\n   * @returns {any}\n   */\n  _parentChrome(depth) {\n    const w2 = this.w;\n    const cfg = this._levelCfg(depth);\n    const dark = w2.config.theme.mode === \"dark\";\n    const header = cfg.header || {};\n    const hstyle = header.style || {};\n    const step = Math.min(depth, 3);\n    const base = dark ? 255 : 0;\n    const rgb = `${base},${base},${base}`;\n    return {\n      fill: cfg.fill || `rgba(${rgb},${(dark ? 0.04 : 0.03) + step * 0.02})`,\n      fillOpacity: cfg.fillOpacity == null ? 1 : cfg.fillOpacity,\n      borderColor: cfg.borderColor || `rgba(${rgb},${dark ? 0.18 : 0.14})`,\n      borderWidth: cfg.borderWidth == null ? 1 : cfg.borderWidth,\n      borderRadius: cfg.borderRadius == null ? w2.config.plotOptions.treemap.borderRadius : cfg.borderRadius,\n      headerBg: hstyle.background || `rgba(${rgb},${dark ? 0.1 : 0.07})`,\n      headerColor: hstyle.color || (dark ? \"#e8e8e8\" : w2.config.chart.foreColor),\n      headerFontSize: hstyle.fontSize || \"12px\",\n      headerFontFamily: hstyle.fontFamily || w2.config.chart.fontFamily,\n      headerFontWeight: hstyle.fontWeight == null ? 600 : hstyle.fontWeight,\n      hoverColor: cfg.hover && cfg.hover.color || (dark ? \"rgba(255,255,255,0.85)\" : \"rgba(0,0,0,0.7)\"),\n      hoverWidth: cfg.hover && cfg.hover.width || 2,\n      hoverShow: !(cfg.hover && cfg.hover.show === false)\n    };\n  }\n  /**\n   * Draw one parent as a real mark: a container rect, and the header strip the\n   * layout already reserved room for.\n   *\n   * The container is `pointer-events: none` over its interior so the tiles\n   * inside it keep receiving hover; only the padding gutter and the header\n   * strip belong to the parent.\n   *\n   * @param {any} elSeries\n   * @param {any} node\n   * @param {number} i seriesIndex\n   */\n  _drawParent(elSeries, node, i2) {\n    var _a;\n    const r2 = node.rect;\n    if (!r2) return;\n    const w2 = this.w;\n    const graphics = new Graphics(this.w, this.ctx);\n    const depth = node.depth || 0;\n    const cfg = this._levelCfg(depth);\n    const chrome = this._parentChrome(depth);\n    const x1 = r2[0];\n    const y1 = r2[1];\n    const width = r2[2] - r2[0];\n    const height = r2[3] - r2[1];\n    if (width <= 0 || height <= 0) return;\n    const elGroup = graphics.group({\n      class: \"apexcharts-treemap-parent\",\n      \"data:depth\": depth,\n      \"data:name\": Utils$1.escapeString(node.name)\n    });\n    const key = morphKey(node._key);\n    const morphFrom = this._morphKeyed() ? this.ctx.morphTypeChange.getInitialPathForKey(key) : null;\n    const elRect = morphFrom ? graphics.drawPath({\n      d: this._tilePath(x1, y1, x1 + width, y1 + height),\n      fill: chrome.fill,\n      stroke: chrome.borderColor,\n      strokeWidth: chrome.borderWidth,\n      fillOpacity: chrome.fillOpacity\n    }) : graphics.drawRect(\n      x1,\n      y1,\n      width,\n      height,\n      chrome.borderRadius,\n      chrome.fill,\n      chrome.fillOpacity,\n      chrome.borderWidth,\n      chrome.borderColor\n    );\n    elRect.node.classList.add(\"apexcharts-treemap-parent-rect\");\n    elRect.node.setAttribute(\"data:key\", key);\n    elRect.node.setAttribute(\"data:depth\", String(depth));\n    if (morphFrom) {\n      this._morphTile(\n        elRect,\n        morphFrom,\n        this._tilePath(x1, y1, x1 + width, y1 + height),\n        this.ctx.morphTypeChange.getSpeed(),\n        i2,\n        depth\n      );\n    }\n    elGroup.add(elRect);\n    const headerHeight = node.headerHeight || 0;\n    let headerText = \"\";\n    if (headerHeight > 0) {\n      const header = cfg.header || {};\n      const elHeaderRect = graphics.drawRect(\n        x1,\n        y1,\n        width,\n        headerHeight,\n        0,\n        chrome.headerBg,\n        1,\n        0,\n        \"transparent\"\n      );\n      elHeaderRect.node.classList.add(\"apexcharts-treemap-parent-header\");\n      elGroup.add(elHeaderRect);\n      let text = String((_a = node.name) != null ? _a : \"\");\n      if (typeof header.formatter === \"function\") {\n        text = String(\n          header.formatter(node.name, {\n            value: node.value,\n            depth,\n            seriesIndex: i2,\n            node,\n            w: w2\n          })\n        );\n      } else if (header.showValue) {\n        text = `${text}  ${this._formatValue(node.value)}`;\n      }\n      headerText = text;\n      const offsetX = Number(header.offsetX) || 0;\n      const align = header.align || \"left\";\n      const pad = 6;\n      const maxWidth = Math.max(0, width - pad * 2 - Math.abs(offsetX));\n      const fontSize = parseFloat(String(chrome.headerFontSize)) || 12;\n      const clipped = graphics.getTextBasedOnMaxWidth({\n        text,\n        maxWidth,\n        fontSize\n      });\n      if (clipped) {\n        let tx = x1 + pad + offsetX;\n        let anchor = \"start\";\n        if (align === \"center\") {\n          tx = x1 + width / 2 + offsetX;\n          anchor = \"middle\";\n        } else if (align === \"right\") {\n          tx = x1 + width - pad + offsetX;\n          anchor = \"end\";\n        }\n        const elText = graphics.drawText({\n          x: tx,\n          y: y1 + headerHeight / 2 + fontSize / 3 + (Number(header.offsetY) || 0),\n          text: clipped,\n          textAnchor: anchor,\n          fontSize: chrome.headerFontSize,\n          fontFamily: chrome.headerFontFamily,\n          fontWeight: chrome.headerFontWeight,\n          foreColor: chrome.headerColor,\n          cssClass: `apexcharts-treemap-parent-label ${header.style && header.style.cssClass || \"\"}`\n        });\n        elText.node.setAttribute(\"pointer-events\", \"none\");\n        elGroup.add(elText);\n      }\n      this._attachParentEvents(elHeaderRect.node, node, chrome, elRect);\n      this._makeParentAccessible(\n        elHeaderRect.node,\n        node,\n        chrome,\n        elRect,\n        headerText\n      );\n    }\n    this._attachParentEvents(elRect.node, node, chrome, elRect);\n    elGroup.node.setAttribute(\"role\", \"group\");\n    elGroup.node.setAttribute(\"aria-label\", this._parentLabel(node, headerText));\n    elSeries.add(elGroup);\n  }\n  /**\n   * The spoken description of a branch: what it is, how big, and how much of\n   * the chart it accounts for.\n   *\n   * Starts from the header's own rendered text when there is one (before\n   * clipping), so the accessible name contains the visible label rather than a\n   * differently-formatted number - a formatter that renders \"$3.25T\" must not\n   * be announced as \"3246\".\n   *\n   * @param {any} node\n   * @param {string} [visibleText] the header text, formatter applied, unclipped\n   * @returns {string}\n   */\n  _parentLabel(node, visibleText) {\n    const total = this._drawnTotal();\n    const pct = total > 0 ? (node._area / total * 100).toFixed(1) : \"0\";\n    const n2 = this._countLeaves(node);\n    const lead = visibleText && String(visibleText).trim() ? String(visibleText).replace(/\\s+/g, \" \").trim() : `${node.name}, ${this._formatValue(node._area)}`;\n    return `${lead}, ${n2} ${n2 === 1 ? \"item\" : \"items\"}, ${pct}% of total`;\n  }\n  /**\n   * Make a branch reachable and operable from the keyboard.\n   *\n   * Only the header strip takes focus, and only while click-to-zoom is live: a\n   * treemap can hold hundreds of tiles, and making every mark a tab stop would\n   * bury the chart's own controls behind a few hundred presses. Tabbing the\n   * groups and pressing Enter is the same path the mouse takes, and the\n   * breadcrumb is already real buttons, so the way back is reachable too.\n   *\n   * @param {any} el\n   * @param {any} node\n   * @param {any} chrome\n   * @param {any} elRect\n   * @param {string} [visibleText] the header's rendered text, unclipped\n   */\n  _makeParentAccessible(el, node, chrome, elRect, visibleText) {\n    if (!el || !el.setAttribute) return;\n    if (!this._zoomEnabled()) return;\n    el.setAttribute(\"role\", \"button\");\n    el.setAttribute(\"tabindex\", \"0\");\n    el.setAttribute(\n      \"aria-label\",\n      `${this._parentLabel(node, visibleText)}. Zoom in`\n    );\n    el.setAttribute(\"aria-expanded\", \"false\");\n    if (!Environment.isBrowser() || !el.addEventListener) return;\n    el.addEventListener(\"focus\", () => {\n      elRect.node.setAttribute(\"stroke\", chrome.hoverColor);\n      elRect.node.setAttribute(\"stroke-width\", String(chrome.hoverWidth + 1));\n    });\n    el.addEventListener(\"blur\", () => {\n      elRect.node.setAttribute(\"stroke\", chrome.borderColor);\n      elRect.node.setAttribute(\"stroke-width\", String(chrome.borderWidth));\n    });\n    el.addEventListener(\"keydown\", (e2) => {\n      if (e2.key !== \"Enter\" && e2.key !== \" \" && e2.key !== \"Spacebar\") return;\n      e2.preventDefault();\n      this._zoomTo(node, true);\n    });\n  }\n  /**\n   * Hover outline, aggregate tooltip and click-to-zoom for a parent mark.\n   * @param {any} el the element receiving the pointer\n   * @param {any} node\n   * @param {any} chrome\n   * @param {any} elRect the container rect to outline\n   */\n  _attachParentEvents(el, node, chrome, elRect) {\n    if (!Environment.isBrowser() || !el || !el.addEventListener) return;\n    const w2 = this.w;\n    if (chrome.hoverShow) {\n      el.addEventListener(\"mouseenter\", () => {\n        elRect.node.setAttribute(\"stroke\", chrome.hoverColor);\n        elRect.node.setAttribute(\"stroke-width\", String(chrome.hoverWidth));\n      });\n      el.addEventListener(\"mouseleave\", () => {\n        elRect.node.setAttribute(\"stroke\", chrome.borderColor);\n        elRect.node.setAttribute(\"stroke-width\", String(chrome.borderWidth));\n      });\n    }\n    if (w2.config.tooltip.enabled) {\n      el.addEventListener(\n        \"mouseenter\",\n        (e2) => this._showParentTooltip(e2, node)\n      );\n      el.addEventListener(\n        \"mousemove\",\n        (e2) => this._positionTooltip(e2)\n      );\n      el.addEventListener(\"mouseleave\", () => this._hideParentTooltip());\n    }\n    if (this._zoomEnabled()) {\n      el.style.cursor = \"pointer\";\n      el.addEventListener(\"click\", () => this._zoomTo(node));\n    }\n  }\n  // ------------------------------------------------------------------- zoom\n  /**\n   * Click-to-zoom is live only when nothing else already owns the click.\n   *\n   * The drilldown feature is the other way into a hierarchy on a treemap, and\n   * the two are different models of the same gesture: drilldown replaces the\n   * view one level at a time, zoom reframes a tree that stays whole. Running\n   * both would fight over the same click and over the one breadcrumb slot in\n   * the wrap, so drilldown wins where it is active and this stands down.\n   * @returns {boolean}\n   */\n  _zoomEnabled() {\n    const w2 = this.w;\n    const z = w2.config.plotOptions.treemap.zoom;\n    if (!z || !z.enabled || !this.showParents) return false;\n    const dd = w2.config.drilldown;\n    if (dd && dd.enabled && Array.isArray(dd.series) && dd.series.length) {\n      if (!this._warnedZoomConflict) {\n        this._warnedZoomConflict = true;\n        console.warn(\n          \"ApexCharts treemap: `plotOptions.treemap.zoom` and the drilldown feature both navigate the hierarchy, so zoom is ignored here. Drop `drilldown.series` to zoom a nested treemap instead.\"\n        );\n      }\n      return false;\n    }\n    return true;\n  }\n  /**\n   * The focused branch for this render, looked up by the key stashed on the\n   * last click. Keys are rebuilt identically from the same data, so the focus\n   * survives a re-render; a key that no longer resolves (the data changed under\n   * it) simply falls back to the whole tree.\n   * @param {any[]} drawn\n   * @returns {any}\n   */\n  _resolveFocus(drawn) {\n    const key = this.w.globals.treemapFocusKey;\n    if (!key || !this._zoomEnabled()) return null;\n    let found = null;\n    const walk = (node) => {\n      if (found) return;\n      if (node._key === key) {\n        found = node;\n        return;\n      }\n      if (node.children) node.children.forEach(walk);\n    };\n    drawn.forEach(walk);\n    return found && found.children && found.children.length ? found : null;\n  }\n  /**\n   * @param {any} node\n   * @param {boolean} [restoreFocus] move focus into the new view once it is\n   *   drawn. A zoom re-renders the chart, which destroys the element the\n   *   keyboard user was standing on; without this they would be returned to the\n   *   top of the document.\n   */\n  _zoomTo(node, restoreFocus = false) {\n    const w2 = this.w;\n    if (!node || !node.children || !node.children.length) return;\n    const next = w2.globals.treemapFocusKey === node._key ? null : node._key;\n    w2.globals.treemapFocusKey = next;\n    this._hideParentTooltip();\n    const done = this.ctx.update();\n    if (!restoreFocus || !done || typeof done.then !== \"function\") return;\n    done.then(() => {\n      if (!Environment.isBrowser()) return;\n      const crumb = (\n        /** @type {any} */\n        w2.dom.baseEl.querySelector(\n          \".apexcharts-breadcrumb .apexcharts-breadcrumb-item\"\n        )\n      );\n      if (crumb && crumb.focus) {\n        crumb.focus();\n        return;\n      }\n      const header = (\n        /** @type {any} */\n        w2.dom.baseEl.querySelector(\n          \".apexcharts-treemap-parent-header[tabindex]\"\n        )\n      );\n      if (header && header.focus) header.focus();\n    });\n  }\n  /**\n   * Outermost drawn group -> focus chain, for the breadcrumb.\n   *\n   * Stops at a drawn root rather than walking all the way to `_parent === null`:\n   * when a single series was unwrapped, the series node is still every level-0\n   * node's parent, and it is not a level the reader ever sees.\n   */\n  _focusChain() {\n    const chain = [];\n    const drawnRoots = new Set(this.drawn || []);\n    let n2 = this._resolveFocus(this.drawn || []);\n    while (n2) {\n      chain.unshift(n2);\n      if (drawnRoots.has(n2)) break;\n      n2 = n2._parent;\n    }\n    return chain;\n  }\n  /** The breadcrumb config: a treemap-local override on the shared block. */\n  _breadcrumbCfg() {\n    const z = this.w.config.plotOptions.treemap.zoom;\n    return breadcrumbConfig(this.w, z && z.breadcrumb);\n  }\n  /**\n   * Breadcrumb back out of a zoom. Markup, config and accessible semantics are\n   * the shared ones, so a zoomed treemap and a drilled-in chart present the\n   * same affordance.\n   */\n  _renderBreadcrumb() {\n    if (!Environment.isBrowser()) return;\n    const w2 = this.w;\n    if (!w2.dom.elWrap) return;\n    clearBreadcrumb(w2);\n    if (!this._zoomEnabled()) return;\n    const chain = this._focusChain();\n    if (!chain.length) return;\n    const nav = renderBreadcrumb(w2, {\n      ariaLabel: \"Treemap breadcrumb\",\n      config: this._breadcrumbCfg(),\n      compact: true,\n      crumbs: [{ label: \"All\", data: null }].concat(\n        chain.map((n2) => ({ label: n2.name, data: n2 }))\n      ),\n      onNavigate: (_i, crumb) => {\n        w2.globals.treemapFocusKey = crumb.data ? crumb.data._key : null;\n        this._hideParentTooltip();\n        this.ctx.update();\n      }\n    });\n    if (!nav) return;\n    this._placeBreadcrumb(nav);\n    avoidChromeOverlap(w2, nav);\n  }\n  /**\n   * Sit the breadcrumb in the band the layout reserved for it\n   * (Dimensions.gridPadForBreadcrumb), just above the grid.\n   *\n   * The fallback below should never fire: the reserve is unconditional once\n   * zoom is enabled. It stays for the cases the reserve cannot cover - a\n   * responsive override that turns zoom on after layout, or a host stylesheet\n   * that grows the font - where a readable chip over the tiles beats a\n   * breadcrumb clipped by the plot.\n   *\n   * @param {any} nav\n   */\n  _placeBreadcrumb(nav) {\n    var _a, _b;\n    const w2 = this.w;\n    const gridTop = w2.layout.translateY || 0;\n    const dimHelpers = (_b = (_a = this.ctx) == null ? void 0 : _a.dimensions) == null ? void 0 : _b.dimHelpers;\n    const titleArea = dimHelpers ? dimHelpers.getTitleSubtitleCoords(\"title\").height + dimHelpers.getTitleSubtitleCoords(\"subtitle\").height : 0;\n    const navH = nav.getBoundingClientRect().height || BREADCRUMB_HEIGHT;\n    if (gridTop - titleArea >= navH + 1) {\n      nav.style.top = `${gridTop - navH - 1}px`;\n      return;\n    }\n    nav.style.top = `${titleArea}px`;\n    const dark = w2.config.theme.mode === \"dark\";\n    nav.style.background = dark ? \"rgba(20,24,30,0.82)\" : \"rgba(255,255,255,0.86)\";\n    nav.style.borderRadius = \"4px\";\n  }\n  // ---------------------------------------------------------------- tooltip\n  /**\n   * A parent is not a row in the series matrix, so the shared tooltip - which\n   * addresses everything by (seriesIndex, dataPointIndex) - has nothing to look\n   * up. It writes into the same tooltip element instead, so the aggregate looks\n   * like every other tooltip in the chart.\n   * @param {MouseEvent} e\n   * @param {any} node\n   */\n  _showParentTooltip(e2, node) {\n    const w2 = this.w;\n    const t2 = this._tip();\n    if (!t2) return;\n    const total = this._drawnTotal();\n    const parentVal = node._parent ? node._parent._area : total;\n    const pctTotal = total > 0 ? (node._area / total * 100).toFixed(1) : \"0.0\";\n    const pctParent = parentVal > 0 ? (node._area / parentVal * 100).toFixed(1) : pctTotal;\n    const cfg = this.w.config.plotOptions.treemap.parents;\n    const custom = cfg && cfg.tooltip && cfg.tooltip.formatter;\n    const leafCount = this._countLeaves(node);\n    let html;\n    if (typeof custom === \"function\") {\n      html = custom({\n        name: node.name,\n        value: node._area,\n        depth: node.depth || 0,\n        leafCount,\n        percentOfParent: Number(pctParent),\n        percentOfTotal: Number(pctTotal),\n        node,\n        w: w2\n      });\n    } else {\n      const marker = this._parentChrome(node.depth || 0).headerBg;\n      const groupBg = w2.config.tooltip.fillSeriesColor ? `background-color:${marker};` : \"\";\n      html = `<div class=\"apexcharts-tooltip-series-group apexcharts-active\" style=\"display:flex;${groupBg}\"><div class=\"apexcharts-tooltip-text\"><div class=\"apexcharts-tooltip-y-group\"><span class=\"apexcharts-tooltip-text-y-label\">${Utils$1.escapeString(\n        node.name\n      )}: </span><span class=\"apexcharts-tooltip-text-y-value\">${this._formatValue(\n        node._area\n      )}</span></div><div class=\"apexcharts-tooltip-y-group\"><span class=\"apexcharts-tooltip-text-y-label\">${leafCount} items, </span><span class=\"apexcharts-tooltip-text-y-value\">${pctParent}% of parent, ${pctTotal}% of total</span></div></div></div>`;\n    }\n    t2.innerHTML = html;\n    t2.classList.add(\"apexcharts-active\");\n    t2.style.opacity = \"1\";\n    this._tipOwned = true;\n    this._positionTooltip(e2);\n  }\n  /** @returns {any} */\n  _tip() {\n    if (!this._tooltipEl) {\n      this._tooltipEl = this.w.dom.baseEl.querySelector(\".apexcharts-tooltip\");\n    }\n    return this._tooltipEl;\n  }\n  /**\n   * Position beside the cursor, flipping to the opposite side when the box\n   * would overflow the chart wrap, and clamping inside it either way.\n   * @param {MouseEvent} e\n   */\n  _positionTooltip(e2) {\n    const t2 = this._tip();\n    if (!t2 || !this._tipOwned) return;\n    const rect = this.w.dom.elWrap.getBoundingClientRect();\n    const tw = t2.offsetWidth;\n    const th = t2.offsetHeight;\n    const pad = 12;\n    let x = e2.clientX - rect.left + pad;\n    if (x + tw > rect.width) x = e2.clientX - rect.left - tw - pad;\n    x = Math.max(0, Math.min(x, rect.width - tw));\n    let y = e2.clientY - rect.top + pad;\n    if (y + th > rect.height) y = e2.clientY - rect.top - th - pad;\n    y = Math.max(0, Math.min(y, rect.height - th));\n    t2.style.left = x + \"px\";\n    t2.style.top = y + \"px\";\n  }\n  _hideParentTooltip() {\n    const t2 = this._tip();\n    if (!t2 || !this._tipOwned) return;\n    this._tipOwned = false;\n    t2.classList.remove(\"apexcharts-active\");\n    t2.style.opacity = \"0\";\n  }\n  /**\n   * The whole tree's area, zoomed in or not: \"% of total\" has to mean the same\n   * thing at every zoom level, otherwise the branch you just zoomed into\n   * reports 100%.\n   * @returns {number}\n   */\n  _drawnTotal() {\n    if (this._total == null) {\n      this._total = (this.drawn || []).reduce(\n        (s2, r2) => s2 + this._subtreeArea(r2),\n        0\n      );\n    }\n    return this._total || 0;\n  }\n  /**\n   * A node's area, computed the same way the layout does it. Zooming lays out\n   * only the focused branch, so every other branch reaches here without the\n   * `_area` the layout would otherwise have left on it.\n   * @param {any} node\n   * @returns {number}\n   */\n  _subtreeArea(node) {\n    if (node._area != null) return node._area;\n    const kids = node.children;\n    if (kids && kids.length) {\n      let s2 = 0;\n      for (let i2 = 0; i2 < kids.length; i2++) s2 += this._subtreeArea(kids[i2]);\n      return s2;\n    }\n    const v2 = Number(node.value);\n    return isNaN(v2) ? 0 : Math.abs(v2);\n  }\n  /**\n   * @param {any} node\n   * @returns {number}\n   */\n  _countLeaves(node) {\n    if (!node.children || !node.children.length) return 1;\n    return node.children.reduce(\n      (s2, c2) => s2 + this._countLeaves(c2),\n      0\n    );\n  }\n  /**\n   * Format an aggregate the way the chart formats its own y values, so a\n   * parent's total reads like the tiles it contains.\n   * @param {number} v\n   * @returns {string}\n   */\n  _formatValue(v2) {\n    var _a, _b, _c, _d, _e;\n    const w2 = this.w;\n    const fmt = ((_b = (_a = w2.config.tooltip) == null ? void 0 : _a.y) == null ? void 0 : _b.formatter) || ((_e = (_d = (_c = w2.config.yaxis) == null ? void 0 : _c[0]) == null ? void 0 : _d.labels) == null ? void 0 : _e.formatter);\n    if (typeof fmt === \"function\") {\n      try {\n        return String(fmt(v2, { seriesIndex: 0, dataPointIndex: 0, w: w2 }));\n      } catch (_) {\n      }\n    }\n    return String(v2);\n  }\n  /**\n   * Whether a tile could show a label at all, decided from geometry alone so\n   * nothing has to be measured to find out.\n   *\n   * Two rules, both about legibility rather than about saving work:\n   *   - a tile that cannot hold one character in EITHER orientation has no\n   *     label to draw, rotated or not\n   *   - below `dataLabels.minFontSize` the text is decoration, not information\n   *\n   * Together these keep a dense treemap from spending its whole render\n   * measuring text nobody can read.\n   *\n   * @param {number} fontSize\n   * @param {number} tileWidth\n   * @param {number} tileHeight\n   * @returns {boolean}\n   */\n  _labelCanShow(fontSize, tileWidth, tileHeight) {\n    if (!Number.isFinite(fontSize) || fontSize <= 0) return false;\n    const cfg = this.w.config.plotOptions.treemap.dataLabels;\n    const min = cfg && cfg.minFontSize != null ? Number(cfg.minFontSize) : 0;\n    if (fontSize < min) return false;\n    return Math.max(tileWidth, tileHeight) >= fontSize;\n  }\n  /**\n   * Mean label length across the whole chart.\n   *\n   * It scales every tile's font size, and it is the same number for all of\n   * them, so it is computed once per draw. It used to be recomputed inside\n   * `getFontSize`, which runs per tile: two full walks of every label, per\n   * label, which is quadratic and was the entire cost of a large treemap (a\n   * 10k-tile chart spent ~9s here).\n   *\n   * @returns {number}\n   */\n  _averageLabelSize() {\n    if (this._avgLabelSize != null) return this._avgLabelSize;\n    function totalLabelLength(arr) {\n      let i2, total = 0;\n      if (Array.isArray(arr[0])) {\n        for (i2 = 0; i2 < arr.length; i2++) {\n          total += totalLabelLength(arr[i2]);\n        }\n      } else {\n        for (i2 = 0; i2 < arr.length; i2++) {\n          total += arr[i2].length;\n        }\n      }\n      return total;\n    }\n    function countLabels(arr) {\n      let i2, total = 0;\n      if (Array.isArray(arr[0])) {\n        for (i2 = 0; i2 < arr.length; i2++) {\n          total += countLabels(arr[i2]);\n        }\n      } else {\n        for (i2 = 0; i2 < arr.length; i2++) {\n          total += 1;\n        }\n      }\n      return total;\n    }\n    this._avgLabelSize = totalLabelLength(this.labels) / countLabels(this.labels);\n    return this._avgLabelSize;\n  }\n  // This calculates a font-size based upon\n  // average label length and the size of the box\n  /**\n   * @param {number[]} coordinates\n   */\n  getFontSize(coordinates) {\n    const w2 = this.w;\n    const averagelabelsize = this._averageLabelSize();\n    function fontSize(width, height) {\n      const area = width * height;\n      const arearoot = Math.pow(area, 0.5);\n      return Math.min(\n        arearoot / averagelabelsize,\n        parseInt(w2.config.dataLabels.style.fontSize, 10)\n      );\n    }\n    return fontSize(\n      coordinates[2] - coordinates[0],\n      coordinates[3] - coordinates[1]\n    );\n  }\n  /**\n   * @param {any} elText\n   * @param {string | number} fontSize\n   * @param {string} text\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x2\n   * @param {number} y2\n   */\n  rotateToFitLabel(elText, fontSize, text, x1, y1, x2, y2) {\n    const graphics = new Graphics(this.w);\n    const textRect = graphics.getTextRects(text, String(fontSize));\n    if (textRect.width + this.w.config.stroke.width + 5 > x2 - x1 && textRect.width <= y2 - y1) {\n      const labelRotatingCenter = graphics.rotateAroundCenter(elText.node);\n      elText.node.setAttribute(\n        \"transform\",\n        `rotate(-90 ${labelRotatingCenter.x} ${labelRotatingCenter.y}) translate(${textRect.height / 3})`\n      );\n    }\n  }\n  // This is an alternative label formatting method that uses a\n  // consistent font size, and trims the edge of long labels\n  /**\n   * @param {string} text\n   * @param {number} fontSize\n   * @param {number} x1\n   * @param {number} y1\n   * @param {number} x2\n   * @param {number} y2\n   */\n  truncateLabels(text, fontSize, x1, y1, x2, y2) {\n    const graphics = new Graphics(this.w);\n    const textRect = graphics.getTextRects(text, String(fontSize));\n    const labelMaxWidth = textRect.width + this.w.config.stroke.width + 5 > x2 - x1 && y2 - y1 > x2 - x1 ? y2 - y1 : x2 - x1;\n    const truncatedText = graphics.getTextBasedOnMaxWidth({\n      text,\n      maxWidth: labelMaxWidth,\n      fontSize\n    });\n    if (text.length !== truncatedText.length && labelMaxWidth / fontSize < 5) {\n      return \"\";\n    } else {\n      return truncatedText;\n    }\n  }\n  /**\n   * True when the active cross-type morph can pair marks by branch identity\n   * rather than by draw order.\n   * @returns {boolean}\n   */\n  _morphKeyed() {\n    var _a;\n    const m2 = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange;\n    return !!(m2 && typeof m2.hasKeyedMarks === \"function\" && m2.hasKeyedMarks() && typeof m2.getInitialPathForKey === \"function\");\n  }\n  /**\n   * The captured shape a LEAF tile unrolls from, or null when the outgoing\n   * chart had nothing to give it.\n   *\n   * Branch identity first, so a tile unrolls from the arc that stood for the\n   * same row rather than the k-th one. That key can find nothing even when\n   * both sides carry keys, and a FLAT treemap taking from a nested sunburst is\n   * exactly that case: its tiles are keyed at depth one ('/0:Tops') while the\n   * arcs are keyed at the depth they actually sit ('/0:Apparel/0:Tops'), so no\n   * key ever matches. Draw order is the fallback, the same one the mirror\n   * direction has always had (Sunburst._morphSourceFor), and without it\n   * treemap -> sunburst read as a morph while the return trip grew from\n   * nothing.\n   *\n   * Leaves only. A container taking a leaf's path by position would unroll\n   * from a different branch entirely, so `_morphParent` stays key-or-nothing.\n   *\n   * @param {any} leaf\n   * @returns {string | null}\n   */\n  _morphSourceForLeaf(leaf) {\n    var _a;\n    const morph = (_a = this.ctx) == null ? void 0 : _a.morphTypeChange;\n    if (!morph || typeof morph.getInitialPathAt !== \"function\") return null;\n    if (this._morphKeyed()) {\n      const keyed = morph.getInitialPathForKey(morphKey(leaf._key));\n      if (keyed) return keyed;\n    }\n    return morph.getInitialPathAt(this._morphLeafIndex++);\n  }\n  /**\n   * A tile as closed path data, for the cross-type morph (a <rect> cannot hold\n   * an arc, so a morphing tile is drawn as a <path>).\n   * @param {number} x1 @param {number} y1 @param {number} x2 @param {number} y2\n   * @returns {string}\n   */\n  _tilePath(x1, y1, x2, y2) {\n    return `M ${x1} ${y1} L ${x2} ${y1} L ${x2} ${y2} L ${x1} ${y2} Z`;\n  }\n  /**\n   * Tween a tile's path data from a captured shape (a sunburst arc) into its\n   * rectangle.\n   *\n   * Routed through Animations.morphSVG, the same call every other morphing\n   * renderer makes: it already selects the polygon-resample algorithm while a\n   * cross-type morph is active, which is what tweens between shapes as\n   * different as an arc and a rectangle. Reaching for the interpolator directly\n   * would also add a name to a module the split bundles share, which breaks\n   * them.\n   *\n   * @param {any} el\n   * @param {string} fromD\n   * @param {string} toD\n   * @param {number} speed\n   * @param {number} i\n   * @param {number} j\n   */\n  _morphTile(el, fromD, toD, speed, i2, j) {\n    const animations = new Animations(this.w, this.ctx);\n    animations.morphSVG(el, i2, j, \"none\", fromD, toD, speed, 0);\n  }\n  /**\n   * @param {any} el\n   * @param {Record<string, any>} fromRect\n   * @param {Record<string, any>} toRect\n   * @param {number} speed\n   * @param {number} [delay] - per-tile cascade delay in ms\n   */\n  animateTreemap(el, fromRect, toRect, speed, delay = 0) {\n    const animations = new Animations(this.w);\n    animations.animateRect(\n      el,\n      fromRect,\n      toRect,\n      speed,\n      () => {\n        animations.animationCompleted(el);\n      },\n      delay\n    );\n  }\n}\nconst GOLDEN_ANGLE = Math.PI * (3 - Math.sqrt(5));\nfunction easeOutCubic(t2) {\n  return 1 - Math.pow(1 - t2, 3);\n}\nfunction easeOutBack(s2) {\n  return (t2) => 1 + (s2 + 1) * Math.pow(t2 - 1, 3) + s2 * Math.pow(t2 - 1, 2);\n}\nfunction easeInOutCubic(t2) {\n  return t2 < 0.5 ? 4 * t2 * t2 * t2 : 1 - Math.pow(-2 * t2 + 2, 3) / 2;\n}\nconst SPRING_REFERENCE_SPEED = 800;\nconst MAX_FRAME_STEP = 0.25;\nfunction springParams(preset, speed) {\n  const [stiffness, damping] = L(\n    /** @type {import('apex-commons').SpringPreset|undefined} */\n    preset\n  );\n  const scale = SPRING_REFERENCE_SPEED / Math.max(1, speed);\n  return [stiffness * scale * scale, damping * scale];\n}\nclass Unit {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.ctx = ctx;\n    this.w = w2;\n    this._lastDotR = 1;\n    this._gridTrack = null;\n    this._gridDenom = 1;\n    this._scatterAxis = null;\n  }\n  /**\n   * @param {any[]} series - flat count array (non-axis / pie-shaped data)\n   * @returns {any} the chart's root group element\n   */\n  draw(series) {\n    const w2 = this.w;\n    const graphics = new Graphics(w2, this.ctx);\n    const ret = graphics.group({ class: \"apexcharts-unit\" });\n    if (w2.globals.noData || !Array.isArray(series) || series.length === 0) {\n      return ret;\n    }\n    const opts = w2.config.plotOptions.unit;\n    const layout = opts.layout === \"packed\" ? \"packed\" : opts.layout === \"columns\" ? \"columns\" : opts.layout === \"grid\" ? \"grid\" : opts.layout === \"scatter\" ? \"scatter\" : opts.layout === \"arc\" ? \"arc\" : opts.layout === \"custom\" ? \"custom\" : \"grouped\";\n    const transition = opts.transition;\n    const flow = transition === \"flow\";\n    const identity = transition === \"identity\";\n    const unitValue = opts.unitValue > 0 ? opts.unitValue : 1;\n    let counts = series.map((v2) => {\n      const n2 = Math.abs(Utils$1.parseNumber(v2)) / unitValue;\n      return n2 > 0 ? Math.max(1, Math.round(n2)) : 0;\n    });\n    counts = this._applyMaxUnits(counts, opts.maxUnits);\n    const total = counts.reduce((a2, b2) => a2 + b2, 0);\n    const clusters = layout === \"packed\" ? this._layoutPacked(counts, opts) : layout === \"columns\" ? this._layoutColumns(counts, opts) : layout === \"grid\" ? this._layoutGrid(counts, opts) : layout === \"scatter\" ? this._layoutScatter(opts) : layout === \"arc\" ? this._layoutArc(counts, opts) : layout === \"custom\" ? this._layoutCustom(counts, opts) : this._layoutGrouped(counts, opts);\n    const gridSplit = layout === \"grid\" && !!(opts.grid && opts.grid.split);\n    if (gridSplit) this._drawGridTrack(ret, graphics, opts);\n    if (layout === \"scatter\") this._drawScatterAxes(ret, graphics);\n    const dotR = this._lastDotR;\n    const animate = this._shouldAnimate();\n    const morph = this.ctx && this.ctx.morphTypeChange;\n    const morphActive = animate && !!morph && typeof morph.isActive === \"function\" && morph.isActive() && typeof morph.getInitialCenterFor === \"function\";\n    const perRowBurst = morphActive && typeof morph.getInitialSlotFor === \"function\";\n    const pieceTakeover = morphActive && typeof morph.usesPieceTakeover === \"function\" && morph.usesPieceTakeover();\n    const prev = animate && !morphActive && this.ctx ? this.ctx._unitPrevDots : null;\n    const nextPrev = /* @__PURE__ */ new Map();\n    const animDots = [];\n    const unitData = w2.seriesData.unitData || [];\n    const sizeStats = this._bubbleStats(unitData, opts, dotR);\n    let gIndex = 0;\n    clusters.forEach((cluster) => {\n      const color = w2.globals.colors[cluster.i] || w2.globals.colors[0] || \"#008FFB\";\n      const elSeries = graphics.group({\n        class: \"apexcharts-series\",\n        seriesName: Utils$1.escapeString(\n          w2.seriesData.seriesNames[cluster.i] || `series-${cluster.i + 1}`\n        ),\n        rel: cluster.i + 1,\n        \"data:realIndex\": cluster.i\n      });\n      const burst = morphActive && !perRowBurst ? morph.getInitialCenterFor(cluster.i) : null;\n      const burstCount = cluster.dots.length;\n      const catData = unitData[cluster.i];\n      cluster.dots.forEach((d, j) => {\n        const datum = catData ? catData[j] : void 0;\n        const dotFill = datum && typeof datum === \"object\" && datum.fillColor ? datum.fillColor : color;\n        const rj = d.r != null ? d.r : sizeStats ? this._radiusForValue(this._unitValueOf(datum), sizeStats) : dotR;\n        const el = this._drawDot(graphics, opts, rj, dotFill, cluster.i, j);\n        elSeries.add(el);\n        let key;\n        if (identity) {\n          const id = datum && typeof datum === \"object\" ? datum.id != null ? datum.id : datum.name : void 0;\n          key = id != null ? `id:${id}` : `g:${gIndex}`;\n        } else if (flow) {\n          key = String(gIndex);\n        } else if (d.slot != null) {\n          key = `slot:${d.slot}`;\n        } else {\n          key = `${cluster.i}:${j}`;\n        }\n        gIndex++;\n        nextPrev.set(key, { x: d.x, y: d.y, fill: dotFill, r: rj });\n        if (pieceTakeover) {\n          this._placeDot(el.node, opts, d.x, d.y);\n          el.node.setAttribute(\"opacity\", \"0\");\n          el.node.setAttribute(\"data-piece-hidden\", \"1\");\n        } else if (animate) {\n          const from = prev && prev.get(key);\n          const anchor = from || (perRowBurst ? morph.getInitialSlotFor(cluster.i, j, burstCount) : burst);\n          const enter = opts.gather && opts.gather.enter || \"burst\";\n          const inPlace = gridSplit || enter === \"fade\" || enter === \"rise\";\n          const cx0 = anchor ? anchor.x : inPlace ? d.x : cluster.cx;\n          const cy0 = anchor ? anchor.y : enter === \"rise\" && !gridSplit ? d.y + 14 : inPlace ? d.y : cluster.cy;\n          el.node.style.opacity = anchor ? \"1\" : \"0\";\n          this._placeDot(el.node, opts, cx0, cy0);\n          animDots.push({\n            node: el.node,\n            x: d.x,\n            y: d.y,\n            cx0,\n            cy0,\n            // Carries live spring state (position AND velocity) forward when\n            // this render interrupted one still in flight.\n            key,\n            // Radius tween: an identity-kept dot grows/shrinks from its previous\n            // size to its new one (e.g. bubble sizing turning on) instead of\n            // snapping. Enters/uniform updates keep r0 === r1 (no-op).\n            r0: from && from.r != null ? from.r : rj,\n            r1: rj,\n            // Colour tween: a dot that flows into a differently coloured group\n            // recolours as it travels rather than snapping at the first frame.\n            fill0: from ? from.fill : dotFill,\n            fill1: dotFill,\n            delay: 0,\n            // assigned below (staggered by global order)\n            isEnter: !anchor\n          });\n        } else {\n          this._placeDot(el.node, opts, d.x, d.y);\n        }\n      });\n      if ((layout === \"grouped\" || layout === \"columns\" || gridSplit) && opts.clusterLabels && opts.clusterLabels.show && counts[cluster.i] > 0) {\n        const labelTotal = gridSplit ? this._gridDenom : total;\n        this._drawClusterLabel(elSeries, cluster, counts[cluster.i], labelTotal, opts, color);\n      }\n      ret.add(elSeries);\n    });\n    if (this._outerLabelsOn(opts)) {\n      this._drawOuterLabels(ret, clusters, counts, total, opts, animate && !prev);\n    }\n    if (prev) {\n      const exits = this._collectExits(prev, nextPrev, opts);\n      if (exits.length) {\n        const exitGroup = graphics.group({ class: \"apexcharts-unit-exits\" });\n        ret.add(exitGroup);\n        this._runExits(exitGroup, exits, opts);\n      }\n    }\n    if (this.ctx) this.ctx._unitPrevDots = nextPrev;\n    if (this.ctx && (!animate || morphActive)) this.ctx._unitSprings = null;\n    if (animate && animDots.length) {\n      this._runGather(animDots);\n    }\n    return ret;\n  }\n  /**\n   * Cap total dots to `maxUnits`, scaling every category down proportionally\n   * (a non-zero category keeps at least one dot). Warns once when it clips.\n   * @param {number[]} counts\n   * @param {number} maxUnits\n   * @returns {number[]}\n   */\n  _applyMaxUnits(counts, maxUnits) {\n    const total = counts.reduce((a2, b2) => a2 + b2, 0);\n    if (!maxUnits || maxUnits <= 0 || total <= maxUnits) return counts;\n    const scale = maxUnits / total;\n    console.warn(\n      `[ApexCharts] unit chart: ${total} dots exceeds maxUnits (${maxUnits}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`\n    );\n    return counts.map((c2) => c2 > 0 ? Math.max(1, Math.round(c2 * scale)) : 0);\n  }\n  /**\n   * `layout: 'custom'`. Positions come from a caller-supplied provider rather\n   * than from a generator in this file.\n   *\n   * The provider is the whole extension point: `(objects, rect) => [{id, x, y,\n   * r?}]`. Everything downstream is unchanged, which is the point - the engine\n   * already tweens position, radius and colour, and already keeps a mark's\n   * identity across a relayout, so an arbitrary new arrangement needs no new\n   * transition code. A silhouette, a hex grid, a timeline, or a projection\n   * handed over by ApexMaps are all just this function.\n   *\n   * Marks the provider omits are dropped, so they animate out through the\n   * existing exit path. Ids matching no mark are ignored.\n   *\n   * @param {number[]} counts\n   * @param {any} opts\n   */\n  _layoutCustom(counts, opts) {\n    const w2 = this.w;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const total = counts.reduce((a2, b2) => a2 + b2, 0);\n    const provider = this._resolveLayoutProvider(opts);\n    if (!provider) {\n      console.warn(\n        `[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'.`\n      );\n      return this._layoutGrouped(counts, opts);\n    }\n    const gutter = this._outerLabelsOn(opts) ? this._outerLabelGutter(counts, opts) : 0;\n    this._lastOuterGutter = gutter;\n    const rect = {\n      x: gutter,\n      y: 0,\n      width: Math.max(1, gw - gutter * 2),\n      height: gh\n    };\n    const availR = Math.sqrt(rect.width * rect.height / Math.PI);\n    const step = this._resolveStep(opts, availR, total);\n    this._lastDotR = this._dotRadiusFromStep(step, opts);\n    const dotR = this._lastDotR;\n    const objects = this._layoutObjects(counts, dotR);\n    let placed;\n    try {\n      placed = provider(objects, rect);\n    } catch (e2) {\n      console.warn(\n        \"[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.\",\n        e2\n      );\n      return this._layoutGrouped(counts, opts);\n    }\n    if (!Array.isArray(placed)) {\n      console.warn(\n        \"[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'.\"\n      );\n      return this._layoutGrouped(counts, opts);\n    }\n    const byId = /* @__PURE__ */ new Map();\n    placed.forEach((p2) => {\n      if (!p2 || !isFinite(p2.x) || !isFinite(p2.y)) return;\n      byId.set(String(p2.id), {\n        x: p2.x,\n        y: p2.y,\n        r: typeof p2.r === \"number\" && p2.r > 0 ? p2.r : void 0\n      });\n    });\n    const clusters = counts.map((_, i2) => ({\n      i: i2,\n      cx: gw / 2,\n      cy: gh / 2,\n      outerR: dotR,\n      dots: []\n    }));\n    objects.forEach((o2) => {\n      const hit = byId.get(o2.id);\n      if (!hit) return;\n      clusters[o2.seriesIndex].dots.push({ x: hit.x, y: hit.y, r: hit.r });\n    });\n    clusters.forEach((c2) => {\n      if (!c2.dots.length) return;\n      let sx = 0;\n      let sy = 0;\n      c2.dots.forEach((d) => {\n        sx += d.x;\n        sy += d.y;\n      });\n      c2.cx = sx / c2.dots.length;\n      c2.cy = sy / c2.dots.length;\n      let far = 0;\n      c2.dots.forEach((d) => {\n        far = Math.max(far, Math.hypot(d.x - c2.cx, d.y - c2.cy));\n      });\n      c2.outerR = far + dotR;\n    });\n    return clusters;\n  }\n  /**\n   * One entry per mark, in global draw order, for a layout provider.\n   *\n   * `id` is the datum's own id/name where the per-unit object form supplies\n   * one, so a provider can address a specific unit (\"Texas\", \"employee 41\")\n   * rather than a positional slot. It falls back to `\"<category>:<index>\"`.\n   *\n   * @param {number[]} counts\n   * @param {number} dotR the radius the engine would use, so a provider that\n   *   packs by size does not have to rediscover it\n   * @returns {{id:string,index:number,seriesIndex:number,dataPointIndex:number,label:string,value:number|undefined,datum:any,r:number}[]}\n   */\n  _layoutObjects(counts, dotR) {\n    const w2 = this.w;\n    const unitData = w2.seriesData.unitData || [];\n    const names = w2.seriesData.seriesNames || [];\n    const objects = [];\n    let index = 0;\n    counts.forEach((n2, i2) => {\n      var _a;\n      const catData = unitData[i2];\n      for (let j = 0; j < n2; j++) {\n        const datum = catData ? catData[j] : void 0;\n        const id = datum && typeof datum === \"object\" && (datum.id != null || datum.name != null) ? String(datum.id != null ? datum.id : datum.name) : `${i2}:${j}`;\n        objects.push({\n          id,\n          index,\n          seriesIndex: i2,\n          dataPointIndex: j,\n          label: names[i2],\n          // Normalised at the boundary: internally \"no value\" is null, but the\n          // public object shape uses an absent property.\n          value: (_a = this._unitValueOf(datum)) != null ? _a : void 0,\n          datum,\n          r: dotR\n        });\n        index++;\n      }\n    });\n    return objects;\n  }\n  /**\n   * Resolve `plotOptions.unit.positions` to a provider function: either the\n   * function itself, or the name of one registered through\n   * `ApexCharts.registerUnitLayout`.\n   * @param {any} opts\n   * @returns {Function|null}\n   */\n  _resolveLayoutProvider(opts) {\n    const positions = opts.positions;\n    if (typeof positions === \"function\") return positions;\n    if (typeof positions === \"string\" && positions) {\n      const found = getUnitLayout(positions);\n      if (found) return found;\n      console.warn(\n        `[ApexCharts] unit chart: no layout named \"${positions}\" is registered. Register one with ApexCharts.registerUnitLayout(\"${positions}\", fn).`\n      );\n    }\n    return null;\n  }\n  /**\n   * Lay out each category as its own cluster in a horizontal row. All clusters\n   * share one dot radius (so dot size is comparable across clusters); the blob\n   * radius encodes the count.\n   * @param {number[]} counts\n   * @param {any} opts\n   */\n  _layoutGrouped(counts, opts) {\n    const w2 = this.w;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const labelSpace = opts.clusterLabels && opts.clusterLabels.show ? 30 : 6;\n    const visible = counts.map((_, i2) => i2).filter((i2) => counts[i2] > 0);\n    const Kv = Math.max(1, visible.length);\n    const slotOf = new Array(counts.length).fill(-1);\n    visible.forEach((i2, s2) => slotOf[i2] = s2);\n    const cellW = gw / Kv;\n    const availH = gh - labelSpace;\n    const maxCount = Math.max(1, ...counts);\n    const pad = Math.min(cellW, availH) * 0.08;\n    const availR = Math.max(4, Math.min(cellW, availH) / 2 - pad);\n    const step = this._resolveStep(opts, availR, maxCount);\n    this._lastDotR = this._dotRadiusFromStep(step, opts);\n    const dotR = this._lastDotR;\n    const cy = labelSpace + availH / 2;\n    const outerRs = counts.map((n2) => step * Math.sqrt(Math.max(1, n2)) + dotR);\n    const cellCentre = (i2) => slotOf[i2] >= 0 ? cellW * (slotOf[i2] + 0.5) : gw / 2;\n    let centers = counts.map((_, i2) => cellCentre(i2));\n    const visOuter = visible.map((i2) => outerRs[i2]);\n    let overlap = false;\n    for (let s2 = 1; s2 < Kv; s2++) {\n      if (centers[visible[s2]] - centers[visible[s2 - 1]] < visOuter[s2] + visOuter[s2 - 1]) {\n        overlap = true;\n        break;\n      }\n    }\n    if (overlap) {\n      const gap = Math.max(2 * dotR, 8);\n      const totalW = visOuter.reduce((a2, r2) => a2 + 2 * r2, 0) + gap * (Kv - 1);\n      let visCenters;\n      if (totalW <= gw) {\n        let x = (gw - totalW) / 2;\n        visCenters = visOuter.map((r2) => {\n          const c2 = x + r2;\n          x += 2 * r2 + gap;\n          return c2;\n        });\n      } else if (Kv === 1) {\n        visCenters = [gw / 2];\n      } else {\n        const lo = visOuter[0];\n        const hi = gw - visOuter[Kv - 1];\n        visCenters = visOuter.map((_, s2) => lo + (hi - lo) * s2 / (Kv - 1));\n      }\n      centers = counts.map(\n        (_, i2) => slotOf[i2] >= 0 ? visCenters[slotOf[i2]] : gw / 2\n      );\n    }\n    return counts.map((n2, i2) => ({\n      i: i2,\n      cx: centers[i2],\n      cy,\n      outerR: outerRs[i2],\n      dots: this._spiral(centers[i2], cy, n2, step, 0)\n    }));\n  }\n  /**\n   * Lay out all categories into ONE packed blob. Dots are assigned spiral\n   * indices in category order (smallest-first when sortByGroup), so the\n   * minority group nests in the centre.\n   * @param {number[]} counts\n   * @param {any} opts\n   */\n  _layoutPacked(counts, opts) {\n    const w2 = this.w;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const labelSpace = 6;\n    const total = Math.max(1, counts.reduce((a2, b2) => a2 + b2, 0));\n    const availR = Math.max(\n      4,\n      Math.min(gw, gh - labelSpace) / 2 - Math.min(gw, gh) * 0.06\n    );\n    const step = this._resolveStep(opts, availR, total);\n    this._lastDotR = this._dotRadiusFromStep(step, opts);\n    const cx = gw / 2;\n    const cy = labelSpace + (gh - labelSpace) / 2;\n    const order = counts.map((_, i2) => i2);\n    if (opts.sortByGroup !== false) {\n      order.sort((a2, b2) => counts[a2] - counts[b2]);\n    }\n    const clusters = counts.map((_, i2) => ({\n      i: i2,\n      cx,\n      cy,\n      outerR: step * Math.sqrt(total) + this._lastDotR,\n      /** @type {{x:number,y:number,slot?:number}[]} */\n      dots: []\n    }));\n    let gi = 0;\n    order.forEach((catI) => {\n      for (let j = 0; j < counts[catI]; j++) {\n        const r2 = step * Math.sqrt(gi + 0.5);\n        const theta = gi * GOLDEN_ANGLE;\n        clusters[catI].dots.push({\n          x: cx + r2 * Math.cos(theta),\n          y: cy + r2 * Math.sin(theta),\n          slot: gi\n        });\n        gi++;\n      }\n    });\n    return clusters;\n  }\n  /**\n   * Lay out all marks as a PARLIAMENT / hemicycle: seats in concentric arced\n   * rows across an annulus, filled in category (party) order so each category\n   * forms a contiguous angular wedge (the classic seating chart). `arc` controls\n   * the sweep (`startAngle`/`endAngle`, radialBar convention: 0 = top, clockwise;\n   * default a top semicircle), the donut hole (`innerRadiusRatio`) and the row\n   * count (`rows`, or 'auto'). Like `packed` this is ONE shared shape coloured by\n   * category, so seats key by physical slot: a seat-count change recolours the\n   * party boundary in place and only the rim adds / removes seats.\n   * @param {number[]} counts\n   * @param {any} opts\n   */\n  _layoutArc(counts, opts) {\n    const w2 = this.w;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const total = Math.max(1, counts.reduce((a2, b3) => a2 + b3, 0));\n    const acfg = opts.arc || {};\n    const startDeg = typeof acfg.startAngle === \"number\" ? acfg.startAngle : -90;\n    const endDeg = typeof acfg.endAngle === \"number\" ? acfg.endAngle : 90;\n    const a0 = startDeg * Math.PI / 180;\n    const a1 = endDeg * Math.PI / 180;\n    const span = a1 - a0 || Math.PI;\n    const innerRatio = Math.max(\n      0,\n      Math.min(0.95, typeof acfg.innerRadiusRatio === \"number\" ? acfg.innerRadiusRatio : 0.4)\n    );\n    const ux = (a2) => Math.sin(a2);\n    const uy = (a2) => -Math.cos(a2);\n    const b2 = this._arcBounds(a0, a1);\n    const pad = Math.min(gw, gh) * 0.04;\n    const boxW = Math.max(1e-6, b2.maxX - b2.minX);\n    const boxH = Math.max(1e-6, b2.maxY - b2.minY);\n    const r1 = Math.max(4, Math.min((gw - 2 * pad) / boxW, (gh - 2 * pad) / boxH));\n    const r0 = r1 * innerRatio;\n    const cx = gw / 2 - (b2.minX + b2.maxX) / 2 * r1;\n    const cy = gh / 2 - (b2.minY + b2.maxY) / 2 * r1;\n    const alloc = this._arcAllocate(total, r0, r1, span, opts);\n    this._lastDotR = alloc.dotR;\n    const seats = [];\n    for (let r2 = 0; r2 < alloc.R; r2++) {\n      const rho = alloc.radii[r2];\n      const n2 = alloc.seatsPerRow[r2];\n      for (let k = 0; k < n2; k++) {\n        const a2 = n2 === 1 ? (a0 + a1) / 2 : a0 + span * (k + 0.5) / n2;\n        seats.push({ a: a2, x: cx + rho * ux(a2), y: cy + rho * uy(a2) });\n      }\n    }\n    seats.sort((s1, s2) => s1.a - s2.a);\n    const clusters = counts.map((_, i2) => ({\n      i: i2,\n      cx,\n      cy,\n      outerR: r1,\n      /** @type {{x:number,y:number,slot?:number}[]} */\n      dots: []\n    }));\n    let ci = 0;\n    let used = 0;\n    seats.forEach((s2, slot) => {\n      while (ci < counts.length && used >= counts[ci]) {\n        ci++;\n        used = 0;\n      }\n      if (ci >= counts.length) return;\n      clusters[ci].dots.push({ x: s2.x, y: s2.y, slot });\n      used++;\n    });\n    return clusters;\n  }\n  /**\n   * Bounding box of the outer arc (radius 1) over [a0, a1], including the centre\n   * and every cardinal angle (multiple of 90deg) inside the range, so a\n   * semicircle / full circle / arbitrary sweep is all bounded correctly.\n   * @param {number} a0 @param {number} a1\n   * @returns {{minX:number,maxX:number,minY:number,maxY:number}}\n   */\n  _arcBounds(a0, a1) {\n    const ux = (a2) => Math.sin(a2);\n    const uy = (a2) => -Math.cos(a2);\n    const lo = Math.min(a0, a1);\n    const hi = Math.max(a0, a1);\n    const xs = [0, ux(a0), ux(a1)];\n    const ys = [0, uy(a0), uy(a1)];\n    const q = Math.PI / 2;\n    for (let k = Math.ceil(lo / q); k * q <= hi; k++) {\n      xs.push(ux(k * q));\n      ys.push(uy(k * q));\n    }\n    return {\n      minX: Math.min(...xs),\n      maxX: Math.max(...xs),\n      minY: Math.min(...ys),\n      maxY: Math.max(...ys)\n    };\n  }\n  /**\n   * Allocate `total` seats across concentric rows of the annulus [r0, r1] sweeping\n   * `span` radians: seats per row are proportional to the row radius (a longer arc\n   * holds more), summed EXACTLY to total by largest remainder. Row count is\n   * `arc.rows` if given, else derived from a fixed dot size, else auto-searched to\n   * maximise the dot radius (the largest dots that still pack without overlap,\n   * mirroring `size:'auto'` elsewhere).\n   * @param {number} total @param {number} r0 @param {number} r1 @param {number} span @param {any} opts\n   * @returns {{R:number, radii:number[], seatsPerRow:number[], dotR:number}}\n   */\n  _arcAllocate(total, r0, r1, span, opts) {\n    const spacing = opts.spacing > 0 ? opts.spacing : 1.05;\n    const absSpan = Math.abs(span) || Math.PI;\n    const fixed = this._fixedRadius(opts);\n    const evalR = (R) => {\n      R = Math.max(1, Math.round(R));\n      const radii = [];\n      for (let r2 = 0; r2 < R; r2++) {\n        radii.push(R === 1 ? (r0 + r1) / 2 : r0 + (r1 - r0) * (r2 / (R - 1)));\n      }\n      const weightSum = radii.reduce((a2, x) => a2 + x, 0) || 1;\n      const raw = radii.map((rho) => total * rho / weightSum);\n      const seatsPerRow = raw.map((x) => Math.floor(x));\n      let left = total - seatsPerRow.reduce((a2, x) => a2 + x, 0);\n      raw.map((x, idx) => ({ idx, frac: x - Math.floor(x) })).sort((p2, qq) => qq.frac - p2.frac).forEach((o2) => {\n        if (left > 0) {\n          seatsPerRow[o2.idx]++;\n          left--;\n        }\n      });\n      while (left > 0) {\n        seatsPerRow[R - 1]++;\n        left--;\n      }\n      const radialPitch = R === 1 ? r1 - r0 || r1 : (r1 - r0) / (R - 1);\n      let minArcPitch = Infinity;\n      for (let r2 = 0; r2 < R; r2++) {\n        const n2 = seatsPerRow[r2];\n        if (n2 <= 0) continue;\n        const arcPitch = radii[r2] * absSpan / n2;\n        if (arcPitch < minArcPitch) minArcPitch = arcPitch;\n      }\n      const pitch = Math.min(radialPitch, minArcPitch);\n      return { R, radii, seatsPerRow, dotR: Math.max(1, pitch / (2 * spacing)) };\n    };\n    const arcRows = opts.arc && opts.arc.rows;\n    let res;\n    if (typeof arcRows === \"number\" && arcRows >= 1) {\n      res = evalR(arcRows);\n    } else if (fixed) {\n      const pitch = 2 * fixed * spacing;\n      res = evalR((r1 - r0) / pitch + 1);\n    } else {\n      const maxR = Math.max(1, Math.min(40, Math.ceil(Math.sqrt(total)) + 6));\n      res = evalR(1);\n      for (let R = 2; R <= maxR; R++) {\n        const cand = evalR(R);\n        if (cand.dotR > res.dotR) res = cand;\n      }\n    }\n    if (fixed) res.dotR = fixed;\n    return res;\n  }\n  /**\n   * Lay out each category as a vertical BAR built from stacked dots (a unit /\n   * waffle column). Every bar shares one dot size and one width (the same\n   * number of dot columns); the bar's HEIGHT encodes its count. Dots fill each\n   * bar bottom-up, row by row. This is the \"dot bar\" state the circle layouts\n   * morph into: with `transition:'flow'` the dots glide straight from their\n   * circle slots into these bar slots (see the storyboard sample).\n   * @param {number[]} counts\n   * @param {any} opts\n   */\n  _layoutColumns(counts, opts) {\n    const w2 = this.w;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const labelsOn = !!(opts.clusterLabels && opts.clusterLabels.show);\n    const labelsBelow = labelsOn && opts.clusterLabels.position === \"bottom\";\n    const topPad = labelsOn && !labelsBelow ? 30 : 6;\n    const visible = counts.map((_, i2) => i2).filter((i2) => counts[i2] > 0);\n    const Kv = Math.max(1, visible.length);\n    const slotOf = new Array(counts.length).fill(-1);\n    visible.forEach((i2, s2) => slotOf[i2] = s2);\n    const cellW = gw / Kv;\n    const barW = cellW * 0.62;\n    const bottomPad = Math.max(8, gh * 0.04) + (labelsBelow ? 30 : 0);\n    const availH = Math.max(4, gh - topPad - bottomPad);\n    const maxCount = Math.max(1, ...counts);\n    const spacing = opts.spacing > 0 ? opts.spacing : 1;\n    const colSize = opts.columns ? opts.columns.size : void 0;\n    let fixed;\n    if (opts.shape !== \"image\" && colSize === \"auto\") {\n      fixed = null;\n    } else if (opts.shape !== \"image\" && typeof colSize === \"number\" && colSize > 0) {\n      fixed = colSize;\n    } else {\n      fixed = this._fixedRadius(opts);\n    }\n    let cols = 1;\n    let pitch = 0;\n    if (fixed) {\n      pitch = 2 * fixed * spacing;\n      this._lastDotR = fixed;\n      const rowsCap = Math.max(1, Math.floor(availH / pitch));\n      const maxColsByWidth = Math.max(1, Math.floor(barW / pitch));\n      cols = Math.max(1, Math.min(maxColsByWidth, Math.ceil(maxCount / rowsCap)));\n    } else {\n      let best = 0;\n      const maxCols = Math.max(1, Math.min(40, Math.round(barW / 4)));\n      for (let c2 = 1; c2 <= maxCols; c2++) {\n        const rows = Math.ceil(maxCount / c2);\n        const d = Math.min(barW / c2, availH / rows);\n        if (d > best) {\n          best = d;\n          cols = c2;\n        }\n      }\n      pitch = best;\n      this._lastDotR = Math.max(1, pitch / (2 * spacing));\n    }\n    const r2 = this._lastDotR;\n    const maxRows = Math.ceil(maxCount / cols);\n    const tallestBarH = Math.min(availH, maxRows * pitch);\n    const bottom = topPad + (availH + tallestBarH) / 2;\n    return counts.map((n2, i2) => {\n      const cx = slotOf[i2] >= 0 ? cellW * (slotOf[i2] + 0.5) : gw / 2;\n      const rows = Math.ceil(Math.max(1, n2) / cols);\n      const barH = rows * pitch;\n      const left = cx - cols * pitch / 2 + pitch / 2;\n      const dots = [];\n      for (let j = 0; j < n2; j++) {\n        const rowIdx = Math.floor(j / cols);\n        const colIdx = j % cols;\n        dots.push({\n          x: left + colIdx * pitch,\n          y: bottom - r2 - rowIdx * pitch\n        });\n      }\n      return {\n        i: i2,\n        cx,\n        cy: bottom - barH / 2,\n        outerR: barH / 2,\n        // Flag read by _drawClusterLabel: a bar takes a straight label (above\n        // or below per clusterLabels.position), never a curved arc.\n        flat: true,\n        dots\n      };\n    });\n  }\n  /**\n   * Lay out ALL categories into ONE regular lattice - a waffle / grid. Dots take\n   * sequential slots in DECLARED category order and fill row-major, `columns`\n   * wide, so each category owns a contiguous band of cells: a part-to-whole\n   * square \"pie\". `grid.total` (optional) re-allocates the cells to a fixed\n   * budget (e.g. 100) by largest remainder, so the grid reads as exact\n   * percentages regardless of the raw totals; without it there is one cell per\n   * unit (respecting unitValue / maxUnits). `grid.fillFrom` picks the first row.\n   * The category bands follow the legend order (no smallest-first sort), and\n   * each physical slot is keyed so a proportion change recolours boundary cells\n   * in place rather than reshuffling the whole grid.\n   * @param {number[]} counts\n   * @param {any} opts\n   */\n  _layoutGrid(counts, opts) {\n    if (opts.grid && opts.grid.split) return this._layoutGridSplit(counts, opts);\n    this._gridTrack = null;\n    const w2 = this.w;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const gcfg = opts.grid || {};\n    const cols = Math.max(1, Math.round(gcfg.columns > 0 ? gcfg.columns : 10));\n    const fillFrom = gcfg.fillFrom === \"top\" ? \"top\" : \"bottom\";\n    const cells = gcfg.total > 0 ? this._largestRemainder(counts, Math.round(gcfg.total)) : counts.slice();\n    const totalCells = cells.reduce((a2, b2) => a2 + b2, 0);\n    const rows = Math.max(1, Math.ceil(Math.max(1, totalCells) / cols));\n    const labelSpace = 6;\n    const spacing = opts.spacing > 0 ? opts.spacing : 1;\n    const availW = Math.max(4, gw);\n    const availH = Math.max(4, gh - labelSpace);\n    const fixed = this._fixedRadius(opts);\n    let pitch = 0;\n    if (fixed) {\n      pitch = 2 * fixed * spacing;\n      this._lastDotR = fixed;\n    } else {\n      pitch = Math.min(availW / cols, availH / rows);\n      this._lastDotR = Math.max(1, pitch / (2 * spacing));\n    }\n    const blockW = cols * pitch;\n    const blockH = rows * pitch;\n    const originX = (gw - blockW) / 2 + pitch / 2;\n    const topY = labelSpace + (availH - blockH) / 2;\n    const rowY = (rowIdx) => fillFrom === \"bottom\" ? topY + blockH - pitch / 2 - rowIdx * pitch : topY + pitch / 2 + rowIdx * pitch;\n    const clusters = counts.map((_, i2) => ({\n      i: i2,\n      cx: gw / 2,\n      cy: labelSpace + availH / 2,\n      outerR: Math.max(blockW, blockH) / 2,\n      /** @type {{x:number,y:number,slot?:number}[]} */\n      dots: []\n    }));\n    let k = 0;\n    for (let ci = 0; ci < cells.length; ci++) {\n      for (let j = 0; j < cells[ci]; j++) {\n        const col = k % cols;\n        const rowIdx = Math.floor(k / cols);\n        clusters[ci].dots.push({\n          x: originX + col * pitch,\n          y: rowY(rowIdx),\n          slot: k\n        });\n        k++;\n      }\n    }\n    return clusters;\n  }\n  /**\n   * Small-multiple (\"trellis\") waffles: ONE mini-waffle per category, laid out\n   * in a near-square grid of tiles. Each tile has `grid.total` cells (default\n   * 100 -> a 10x10 tile) and fills a fraction of them equal to the category's\n   * value over a denominator (`grid.max`, else the largest count so the leader\n   * fills its tile and every other tile stays proportionally full - no empty\n   * tiles for arbitrary data). The unfilled cells are drawn as a faint TRACK\n   * backdrop (see _drawGridTrack) so each tile reads as a part-to-whole \"of N\".\n   * Only VISIBLE (non-zero) categories claim a tile, so a legend hide drops the\n   * tile and the rest re-flow. Each filled cell is keyed by a physical\n   * `tile*cells + localCell` slot, so a value change grows/shrinks a tile's fill\n   * in place instead of reshuffling.\n   * @param {number[]} counts @param {any} opts\n   */\n  _layoutGridSplit(counts, opts) {\n    const w2 = this.w;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const gcfg = opts.grid || {};\n    const cols = Math.max(1, Math.round(gcfg.columns > 0 ? gcfg.columns : 10));\n    const fillFrom = gcfg.fillFrom === \"top\" ? \"top\" : \"bottom\";\n    const cellsPerTile = Math.max(1, Math.round(gcfg.total > 0 ? gcfg.total : 100));\n    const rowsPerTile = Math.max(1, Math.ceil(cellsPerTile / cols));\n    const visible = counts.map((_, i2) => i2).filter((i2) => counts[i2] > 0);\n    const K = Math.max(1, visible.length);\n    const denom = gcfg.max > 0 ? gcfg.max : Math.max(1, ...counts);\n    const tileCols = Math.max(\n      1,\n      Math.round(gcfg.tileColumns > 0 ? gcfg.tileColumns : Math.ceil(Math.sqrt(K)))\n    );\n    const tileRows = Math.max(1, Math.ceil(K / tileCols));\n    const labelsOn = !(opts.clusterLabels && opts.clusterLabels.show === false);\n    const labelsBelow = labelsOn && opts.clusterLabels && opts.clusterLabels.position === \"bottom\";\n    const topBand = labelsOn && !labelsBelow ? 22 : 4;\n    const botBand = labelsOn && labelsBelow ? 22 : 4;\n    const tileW = gw / tileCols;\n    const tileH = gh / tileRows;\n    const availTileW = Math.max(4, tileW * 0.86);\n    const availTileH = Math.max(4, tileH - topBand - botBand);\n    const spacing = opts.spacing > 0 ? opts.spacing : 1;\n    const fixed = this._fixedRadius(opts);\n    let pitch = 0;\n    if (fixed) {\n      pitch = 2 * fixed * spacing;\n      this._lastDotR = fixed;\n    } else {\n      pitch = Math.min(availTileW / cols, availTileH / rowsPerTile);\n      this._lastDotR = Math.max(1, pitch / (2 * spacing));\n    }\n    const blockW = cols * pitch;\n    const blockH = rowsPerTile * pitch;\n    const rowY = (topY, rowIdx) => fillFrom === \"bottom\" ? topY + blockH - pitch / 2 - rowIdx * pitch : topY + pitch / 2 + rowIdx * pitch;\n    const track = [];\n    const clusters = [];\n    visible.forEach((ci, t2) => {\n      const tc = t2 % tileCols;\n      const tr = Math.floor(t2 / tileCols);\n      const tileX = tc * tileW;\n      const tileYtop = tr * tileH;\n      const originX = tileX + (tileW - blockW) / 2 + pitch / 2;\n      const topY = tileYtop + topBand + (availTileH - blockH) / 2;\n      const cellXY = (k) => ({\n        x: originX + k % cols * pitch,\n        y: rowY(topY, Math.floor(k / cols))\n      });\n      for (let k = 0; k < cellsPerTile; k++) track.push(cellXY(k));\n      const filled = Math.max(\n        0,\n        Math.min(cellsPerTile, Math.round(counts[ci] / denom * cellsPerTile))\n      );\n      const dots = [];\n      for (let k = 0; k < filled; k++) {\n        const p2 = cellXY(k);\n        dots.push({ x: p2.x, y: p2.y, slot: t2 * cellsPerTile + k });\n      }\n      clusters.push({\n        i: ci,\n        cx: tileX + tileW / 2,\n        cy: topY + blockH / 2,\n        outerR: blockH / 2,\n        // Straight per-tile label (never a curved arc), placed by position.\n        flat: true,\n        split: true,\n        dots\n      });\n    });\n    this._gridDenom = denom;\n    this._gridTrack = { cells: track };\n    return clusters;\n  }\n  /**\n   * Draw the faint \"track\" backdrop for the small-multiple grid: every cell of\n   * every tile's full lattice, so the filled (coloured) cells drawn on top read\n   * as a fraction of the whole. Static (redrawn each render, never animated);\n   * painted BEHIND the series groups. `grid.trackColor` overrides the default\n   * theme-neutral grey.\n   * @param {any} ret @param {Graphics} graphics @param {any} opts\n   */\n  _drawGridTrack(ret, graphics, opts) {\n    const track = this._gridTrack;\n    if (!track || !track.cells || !track.cells.length) return;\n    const r2 = this._lastDotR;\n    const gcfg = opts.grid || {};\n    const trackColor = gcfg.trackColor || \"rgba(128,128,128,0.14)\";\n    const g2 = graphics.group({ class: \"apexcharts-unit-track\" });\n    track.cells.forEach((c2) => {\n      let el;\n      if (opts.shape === \"square\") {\n        const side = r2 * 2;\n        el = graphics.drawRect(0, 0, side, side, opts.borderRadius || 0, trackColor, 1, 0, \"none\");\n        el.node.setAttribute(\"fill\", trackColor);\n        el.node.setAttribute(\"x\", String(c2.x - r2));\n        el.node.setAttribute(\"y\", String(c2.y - r2));\n      } else {\n        el = graphics.drawCircle(r2, { fill: trackColor, \"stroke-width\": 0, stroke: \"none\" });\n        el.node.setAttribute(\"fill\", trackColor);\n        el.node.setAttribute(\"cx\", String(c2.x));\n        el.node.setAttribute(\"cy\", String(c2.y));\n      }\n      el.node.classList.add(\"apexcharts-unit-track-cell\");\n      g2.add(el);\n    });\n    ret.add(g2);\n  }\n  /**\n   * Scatter / beeswarm layout: position every unit on a real numeric X value\n   * axis by its own value (`_unitValueOf`), laned by category on Y. Within a\n   * lane an anti-overlap \"swarm\" pack (or a random jitter) spreads the dots off\n   * the centre line so equal / close values do not stack on top of each other.\n   * This is the unit chart's answer to \"put these on axes\": one dot per datum,\n   * placed by data, with a drawn value axis + category lanes (see\n   * _drawScatterAxes). Needs the per-unit object form (each datum a numeric\n   * `value`/`y`); flat counts have no per-unit value, so their lanes stay empty.\n   * @param {any} opts\n   */\n  _layoutScatter(opts) {\n    const w2 = this.w;\n    const scfg = opts.scatter || {};\n    if (scfg.y === \"value\") return this._layoutScatter2D(opts);\n    if (scfg.orientation === \"vertical\") return this._layoutScatterVertical(opts);\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const unitData = w2.seriesData.unitData || [];\n    const names = w2.seriesData.seriesNames || [];\n    const valueOf = (d) => this._unitValueOf(d);\n    const sizeStats = this._scatterSizeStats(scfg, unitData);\n    const catVals = unitData.map(\n      (cat) => Array.isArray(cat) ? cat.map(valueOf) : []\n    );\n    const isNum = (v2) => v2 != null && isFinite(v2);\n    const visible = catVals.map((_, i2) => i2).filter((i2) => catVals[i2].some(isNum));\n    const Kv = Math.max(1, visible.length);\n    let vmin = Infinity;\n    let vmax = -Infinity;\n    catVals.forEach(\n      (vs) => vs.forEach((v2) => {\n        if (v2 != null && isFinite(v2)) {\n          if (v2 < vmin) vmin = v2;\n          if (v2 > vmax) vmax = v2;\n        }\n      })\n    );\n    if (vmin === Infinity) {\n      vmin = 0;\n      vmax = 1;\n    }\n    const tickAmount = Math.max(2, Math.round(scfg.tickAmount > 0 ? scfg.tickAmount : 5));\n    const domain = this._scatterValueDomain(scfg, vmin, vmax, tickAmount);\n    const xMin = domain.min;\n    const xMax = domain.max;\n    const xSpan = xMax - xMin || 1;\n    const laneW = scfg.laneLabelWidth != null ? Math.max(0, scfg.laneLabelWidth) : Kv > 1 ? 92 : 8;\n    const bottomGutter = 30 + (scfg.xTitle ? 20 : 0);\n    const plotL = laneW;\n    const plotR = gw - 8;\n    const plotT = 10;\n    const plotB = gh - bottomGutter;\n    const plotW = Math.max(4, plotR - plotL);\n    const plotH = Math.max(4, plotB - plotT);\n    const plotX = (v2) => plotL + (v2 - xMin) / xSpan * plotW;\n    const laneH = plotH / Kv;\n    const laneCy = (slot) => plotT + laneH * (slot + 0.5);\n    let r2 = 0;\n    const fixed = this._fixedRadius(opts);\n    if (fixed) {\n      r2 = fixed;\n    } else {\n      const maxLane = Math.max(\n        1,\n        ...visible.map((i2) => catVals[i2].filter(isNum).length)\n      );\n      r2 = Math.max(\n        2,\n        Math.min(6, laneH * 0.12, plotW / (2.5 * Math.sqrt(maxLane)))\n      );\n    }\n    this._lastDotR = r2;\n    const spacing = opts.spacing > 0 ? opts.spacing : 1;\n    const step = Math.max(0.5, r2 * spacing);\n    const jitter = scfg.spread === \"jitter\";\n    const clusters = [];\n    const lanes = [];\n    const maxR = sizeStats ? sizeStats.rMax : r2;\n    visible.forEach((ci, slot) => {\n      const cy = laneCy(slot);\n      lanes.push({ i: ci, cy, name: names[ci] || `series-${ci + 1}` });\n      const cat = unitData[ci] || [];\n      const pts = cat.map((d, j) => {\n        const v2 = valueOf(d);\n        const p2 = { j, px: plotX(isNum(v2) ? v2 : xMin), y: cy };\n        if (sizeStats) p2.r = this._scatterRadius(d, sizeStats, r2);\n        return p2;\n      });\n      if (jitter) {\n        const halfLane = Math.max(maxR, laneH / 2 - maxR);\n        pts.forEach((p2, k) => {\n          const t2 = (k * 9301 + 49297) % 233280 / 233280;\n          p2.y = cy + (t2 * 2 - 1) * halfLane;\n        });\n      } else {\n        this._beeswarm(pts, cy, r2, step, maxR);\n      }\n      clusters.push({\n        i: ci,\n        cx: (plotL + plotR) / 2,\n        cy,\n        outerR: laneH / 2,\n        dots: pts.map((p2) => ({ x: p2.px, y: p2.y, r: p2.r }))\n      });\n    });\n    const ticks = domain.ticks;\n    this._scatterAxis = {\n      mode: \"1d\",\n      plotL,\n      plotR,\n      plotT,\n      plotB,\n      xMin,\n      xMax,\n      plotX,\n      ticks,\n      lanes,\n      xTitle: scfg.xTitle,\n      formatter: typeof scfg.xFormatter === \"function\" ? scfg.xFormatter : null,\n      gridlines: scfg.gridlines !== false\n    };\n    return clusters;\n  }\n  /**\n   * Vertical beeswarm: the transpose of _layoutScatter. The value runs UP the Y\n   * axis and each category is a column (lane) across X; the swarm pack spreads\n   * dots horizontally off each column's centre line. The value-axis config keys\n   * (`xMin`/`xMax`/`xTitle`/`xFormatter`/`tickAmount`) still describe the value\n   * axis (now Y), so flipping `orientation` keeps the same value settings.\n   * @param {any} opts\n   */\n  _layoutScatterVertical(opts) {\n    const w2 = this.w;\n    const scfg = opts.scatter || {};\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const unitData = w2.seriesData.unitData || [];\n    const names = w2.seriesData.seriesNames || [];\n    const valueOf = (d) => this._unitValueOf(d);\n    const sizeStats = this._scatterSizeStats(scfg, unitData);\n    const catVals = unitData.map(\n      (cat) => Array.isArray(cat) ? cat.map(valueOf) : []\n    );\n    const isNum = (v2) => v2 != null && isFinite(v2);\n    const visible = catVals.map((_, i2) => i2).filter((i2) => catVals[i2].some(isNum));\n    const Kv = Math.max(1, visible.length);\n    let vmin = Infinity;\n    let vmax = -Infinity;\n    catVals.forEach(\n      (vs) => vs.forEach((v2) => {\n        if (v2 != null && isFinite(v2)) {\n          if (v2 < vmin) vmin = v2;\n          if (v2 > vmax) vmax = v2;\n        }\n      })\n    );\n    if (vmin === Infinity) {\n      vmin = 0;\n      vmax = 1;\n    }\n    const tickAmount = Math.max(2, Math.round(scfg.tickAmount > 0 ? scfg.tickAmount : 5));\n    const domain = this._scatterValueDomain(scfg, vmin, vmax, tickAmount);\n    const vMin = domain.min;\n    const vMax = domain.max;\n    const vSpan = vMax - vMin || 1;\n    const leftGutter = 46 + (scfg.xTitle ? 18 : 0);\n    const bottomGutter = Kv > 1 ? 26 : 10;\n    const plotL = leftGutter;\n    const plotR = gw - 10;\n    const plotT = 10;\n    const plotB = gh - bottomGutter;\n    const plotW = Math.max(4, plotR - plotL);\n    const plotH = Math.max(4, plotB - plotT);\n    const plotY = (v2) => plotB - (v2 - vMin) / vSpan * plotH;\n    const laneW = plotW / Kv;\n    const laneCx = (slot) => plotL + laneW * (slot + 0.5);\n    let r2 = 0;\n    const fixed = this._fixedRadius(opts);\n    if (fixed) {\n      r2 = fixed;\n    } else {\n      const maxLane = Math.max(\n        1,\n        ...visible.map((i2) => catVals[i2].filter(isNum).length)\n      );\n      r2 = Math.max(\n        2,\n        Math.min(6, laneW * 0.12, plotH / (2.5 * Math.sqrt(maxLane)))\n      );\n    }\n    this._lastDotR = r2;\n    const spacing = opts.spacing > 0 ? opts.spacing : 1;\n    const step = Math.max(0.5, r2 * spacing);\n    const jitter = scfg.spread === \"jitter\";\n    const clusters = [];\n    const lanes = [];\n    const maxR = sizeStats ? sizeStats.rMax : r2;\n    visible.forEach((ci, slot) => {\n      const cx = laneCx(slot);\n      lanes.push({ i: ci, cx, name: names[ci] || `series-${ci + 1}` });\n      const cat = unitData[ci] || [];\n      const pts = cat.map((d, j) => {\n        const v2 = valueOf(d);\n        const p2 = { j, py: plotY(isNum(v2) ? v2 : vMin), x: cx };\n        if (sizeStats) p2.r = this._scatterRadius(d, sizeStats, r2);\n        return p2;\n      });\n      if (jitter) {\n        const halfLane = Math.max(maxR, laneW / 2 - maxR);\n        pts.forEach((p2, k) => {\n          const t2 = (k * 9301 + 49297) % 233280 / 233280;\n          p2.x = cx + (t2 * 2 - 1) * halfLane;\n        });\n      } else {\n        this._beeswarm(pts, cx, r2, step, maxR, true);\n      }\n      clusters.push({\n        i: ci,\n        cx,\n        cy: (plotT + plotB) / 2,\n        outerR: laneW / 2,\n        dots: pts.map((p2) => ({ x: p2.x, y: p2.py, r: p2.r }))\n      });\n    });\n    const ticks = domain.ticks;\n    this._scatterAxis = {\n      mode: \"1d\",\n      orientation: \"vertical\",\n      plotL,\n      plotR,\n      plotT,\n      plotB,\n      vMin,\n      vMax,\n      plotY,\n      ticks,\n      lanes,\n      valueTitle: scfg.xTitle,\n      formatter: typeof scfg.xFormatter === \"function\" ? scfg.xFormatter : null,\n      gridlines: scfg.gridlines !== false\n    };\n    return clusters;\n  }\n  /**\n   * 2D value-value scatter: each datum is a point at (`x`, `y`) on two numeric\n   * axes (a scatter / bubble plot in the unit family - premium, keyed\n   * transitions, per-unit colour/tooltip). Category = colour (one series group\n   * per category). With `scatter.sizeRange` set, each dot is a BUBBLE scaled (by\n   * area) from its `sizeField` (default 'z'). Needs the object form with numeric\n   * `x` + `y`.\n   * @param {any} opts\n   */\n  _layoutScatter2D(opts) {\n    const w2 = this.w;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const scfg = opts.scatter || {};\n    const unitData = w2.seriesData.unitData || [];\n    const isNum = (v2) => typeof v2 === \"number\" && isFinite(v2);\n    const xOf = (d) => d && typeof d === \"object\" ? d.x : null;\n    const yOf = (d) => d && typeof d === \"object\" ? d.y != null ? d.y : d.value : null;\n    const visible = unitData.map((_, i2) => i2).filter(\n      (i2) => (unitData[i2] || []).some((d) => isNum(xOf(d)) && isNum(yOf(d)))\n    );\n    let xmn = Infinity;\n    let xmx = -Infinity;\n    let ymn = Infinity;\n    let ymx = -Infinity;\n    unitData.forEach(\n      (cat) => (cat || []).forEach((d) => {\n        const x = xOf(d);\n        const y = yOf(d);\n        if (isNum(x) && isNum(y)) {\n          if (x < xmn) xmn = x;\n          if (x > xmx) xmx = x;\n          if (y < ymn) ymn = y;\n          if (y > ymx) ymx = y;\n        }\n      })\n    );\n    if (xmn === Infinity) {\n      xmn = 0;\n      xmx = 1;\n      ymn = 0;\n      ymx = 1;\n    }\n    const xTicksN = Math.max(2, Math.round(scfg.tickAmount > 0 ? scfg.tickAmount : 5));\n    const yTicksN = Math.max(2, Math.round(scfg.yTickAmount > 0 ? scfg.yTickAmount : 5));\n    const nx = this._niceScale(\n      scfg.xMin != null ? scfg.xMin : xmn,\n      scfg.xMax != null ? scfg.xMax : xmx,\n      xTicksN\n    );\n    const ny = this._niceScale(\n      scfg.yMin != null ? scfg.yMin : ymn,\n      scfg.yMax != null ? scfg.yMax : ymx,\n      yTicksN\n    );\n    const xMin = scfg.xMin != null ? scfg.xMin : nx.min;\n    const xMax = scfg.xMax != null ? scfg.xMax : nx.max;\n    const yMin = scfg.yMin != null ? scfg.yMin : ny.min;\n    const yMax = scfg.yMax != null ? scfg.yMax : ny.max;\n    const xSpan = xMax - xMin || 1;\n    const ySpan = yMax - yMin || 1;\n    const leftGutter = 46 + (scfg.yTitle ? 18 : 0);\n    const bottomGutter = 30 + (scfg.xTitle ? 20 : 0);\n    const plotL = leftGutter;\n    const plotR = gw - 12;\n    const plotT = 10;\n    const plotB = gh - bottomGutter;\n    const plotW = Math.max(4, plotR - plotL);\n    const plotH = Math.max(4, plotB - plotT);\n    const plotX = (v2) => plotL + (v2 - xMin) / xSpan * plotW;\n    const plotY = (v2) => plotB - (v2 - yMin) / ySpan * plotH;\n    const sizeStats = this._scatterSizeStats(scfg, unitData);\n    const baseR = this._fixedRadius(opts) || 5;\n    this._lastDotR = baseR;\n    const clusters = [];\n    visible.forEach((ci) => {\n      const cat = unitData[ci] || [];\n      const dots = cat.map((d) => {\n        const x = xOf(d);\n        const y = yOf(d);\n        return {\n          x: plotX(isNum(x) ? x : xMin),\n          y: plotY(isNum(y) ? y : yMin),\n          r: sizeStats ? this._scatterRadius(d, sizeStats, baseR) : void 0\n        };\n      });\n      clusters.push({\n        i: ci,\n        cx: (plotL + plotR) / 2,\n        cy: (plotT + plotB) / 2,\n        outerR: plotH / 2,\n        dots\n      });\n    });\n    const mkTicks = (lo, hi, span, spacing, pinned, n2) => {\n      const out = [];\n      if (pinned) {\n        for (let k = 0; k < n2; k++) out.push(lo + span * k / (n2 - 1));\n      } else {\n        const sp = spacing || span / Math.max(1, n2 - 1);\n        for (let v2 = lo; v2 <= hi + sp * 0.5; v2 += sp) {\n          out.push(Math.abs(v2) < sp * 1e-9 ? 0 : v2);\n        }\n      }\n      return out;\n    };\n    this._scatterAxis = {\n      mode: \"2d\",\n      plotL,\n      plotR,\n      plotT,\n      plotB,\n      plotX,\n      plotY,\n      xTicks: mkTicks(\n        xMin,\n        xMax,\n        xSpan,\n        nx.spacing,\n        scfg.xMin != null || scfg.xMax != null,\n        xTicksN\n      ),\n      yTicks: mkTicks(\n        yMin,\n        yMax,\n        ySpan,\n        ny.spacing,\n        scfg.yMin != null || scfg.yMax != null,\n        yTicksN\n      ),\n      xTitle: scfg.xTitle,\n      yTitle: scfg.yTitle,\n      xFormatter: typeof scfg.xFormatter === \"function\" ? scfg.xFormatter : null,\n      yFormatter: typeof scfg.yFormatter === \"function\" ? scfg.yFormatter : null,\n      gridlines: scfg.gridlines !== false\n    };\n    return clusters;\n  }\n  /**\n   * Bubble size stats for the scatter layout, or null when `scatter.sizeRange`\n   * is not a `[minR, maxR]` pair. Reads the global range of each datum's\n   * `sizeField` (default 'z') so a value maps to a radius (area scale) in\n   * _scatterRadius.\n   * @param {any} scfg @param {any[][]} unitData\n   * @returns {{zmin:number,zmax:number,rMin:number,rMax:number,field:string}|null}\n   */\n  _scatterSizeStats(scfg, unitData) {\n    const range = scfg && scfg.sizeRange;\n    if (!Array.isArray(range) || range.length < 2) return null;\n    const rMin = Math.max(0.5, +range[0]);\n    const rMax = Math.max(rMin, +range[1]);\n    const field = scfg.sizeField || \"z\";\n    let zmin = Infinity;\n    let zmax = -Infinity;\n    unitData.forEach(\n      (cat) => (cat || []).forEach((d) => {\n        const z = d && typeof d === \"object\" ? d[field] : null;\n        if (typeof z === \"number\" && isFinite(z)) {\n          if (z < zmin) zmin = z;\n          if (z > zmax) zmax = z;\n        }\n      })\n    );\n    if (zmin === Infinity) return null;\n    return { zmin, zmax, rMin, rMax, field };\n  }\n  /**\n   * Radius for one datum under the bubble size stats: area proportional to the\n   * `sizeField` value (so radius grows with sqrt), between rMin and rMax. A\n   * missing value collapses to rMin.\n   * @param {any} d\n   * @param {{zmin:number,zmax:number,rMin:number,rMax:number,field:string}} st\n   * @param {number} fallback @returns {number}\n   */\n  _scatterRadius(d, st, fallback) {\n    if (!st) return fallback;\n    const z = d && typeof d === \"object\" ? d[st.field] : null;\n    if (typeof z !== \"number\" || !isFinite(z)) return st.rMin;\n    const t2 = st.zmax > st.zmin ? (z - st.zmin) / (st.zmax - st.zmin) : 1;\n    const tc = Math.max(0, Math.min(1, t2));\n    const aMin = st.rMin * st.rMin;\n    const aMax = st.rMax * st.rMax;\n    return Math.sqrt(aMin + tc * (aMax - aMin));\n  }\n  /**\n   * One-dimensional anti-overlap \"beeswarm\" pack: given points with a fixed x\n   * (`px`) and a lane centre `cy`, assign each a y so no two dots overlap (centre\n   * distance >= r_i + r_j). Greedy in ascending-x order, trying offsets 0, +step,\n   * -step, +2step ... and taking the SMALLEST that clears every already-placed\n   * neighbour still within reach in x. No-overlap always wins: a very dense lane\n   * grows a taller swarm rather than stacking dots (offsets are not hard-clamped\n   * to the lane). Each point may carry its own radius `r` (bubble beeswarm),\n   * else `rFallback` applies; `maxR` bounds the value-window break. Deterministic\n   * (no physics, no randomness).\n   *\n   * Orientation-agnostic: the \"fixed\" axis is the value axis and the \"spread\"\n   * axis is the lane thickness. Horizontal (default): fixed = `px`, spread = `y`\n   * (mutates `.y`). Vertical: fixed = `py`, spread = `x` (mutates `.x`).\n   * @param {any[]} pts @param {number} center lane centre on the spread axis\n   * @param {number} rFallback @param {number} step @param {number} [maxR]\n   * @param {boolean} [vertical]\n   */\n  _beeswarm(pts, center, rFallback, step, maxR, vertical = false) {\n    const fk = vertical ? \"py\" : \"px\";\n    const sk = vertical ? \"x\" : \"y\";\n    const order = pts.slice().sort((a2, b2) => a2[fk] - b2[fk]);\n    const placed = [];\n    const rCap = maxR != null ? maxR : rFallback;\n    order.forEach((p2) => {\n      const pr = p2.r != null ? p2.r : rFallback;\n      let chosen = 0;\n      for (let k = 0; k < 2e3; k++) {\n        const off = k === 0 ? 0 : Math.ceil(k / 2) * step * (k % 2 ? 1 : -1);\n        const s2 = center + off;\n        let ok = true;\n        for (let m2 = placed.length - 1; m2 >= 0; m2--) {\n          const q = placed[m2];\n          const df = p2[fk] - q.f;\n          if (df > pr + rCap) break;\n          const need = pr + q.r;\n          const ds = s2 - q.s;\n          if (df * df + ds * ds < need * need) {\n            ok = false;\n            break;\n          }\n        }\n        if (ok) {\n          chosen = off;\n          break;\n        }\n      }\n      p2[sk] = center + chosen;\n      placed.push({ f: p2[fk], s: p2[sk], r: pr });\n    });\n  }\n  /**\n   * Value-axis domain + ticks for a 1D beeswarm. The domain ALWAYS contains\n   * every datum: a swarm that clips a dot outside the plot box is a bug, so an\n   * explicit `xMin`/`xMax` only FRAMES the axis and is extended by whole\n   * tick-steps whenever the data would otherwise overflow. Orientation-agnostic:\n   * the same value axis is X for a horizontal swarm and Y for a vertical one.\n   * @param {any} scfg scatter config\n   * @param {number} vmin data minimum @param {number} vmax data maximum\n   * @param {number} tickAmount desired tick count\n   * @returns {{ min:number, max:number, ticks:number[] }}\n   */\n  _scatterValueDomain(scfg, vmin, vmax, tickAmount) {\n    const buildTicks = (min, max, spacing2) => {\n      const ticks = [];\n      for (let v2 = min; v2 <= max + spacing2 * 0.5; v2 += spacing2) {\n        ticks.push(Math.abs(v2) < spacing2 * 1e-9 ? 0 : v2);\n      }\n      return ticks;\n    };\n    if (scfg.xMin != null || scfg.xMax != null) {\n      let min = scfg.xMin != null ? scfg.xMin : vmin;\n      let max = scfg.xMax != null ? scfg.xMax : vmax;\n      if (!(max > min)) max = min + 1;\n      const spacing2 = (max - min) / Math.max(1, tickAmount - 1);\n      if (vmin < min) min -= Math.ceil((min - vmin) / spacing2) * spacing2;\n      if (vmax > max) max += Math.ceil((vmax - max) / spacing2) * spacing2;\n      return { min, max, ticks: buildTicks(min, max, spacing2) };\n    }\n    const nice = this._niceScale(vmin, vmax, tickAmount);\n    const spacing = nice.spacing || (nice.max - nice.min) / Math.max(1, tickAmount - 1);\n    return { min: nice.min, max: nice.max, ticks: buildTicks(nice.min, nice.max, spacing) };\n  }\n  /**\n   * A \"nice\" numeric scale [min, max] + tick spacing covering [dataMin, dataMax]\n   * with about `ticks` ticks, using rounded 1/2/5 x 10^n steps. Homegrown (no\n   * dependency) - lean-core.\n   * @param {number} dataMin @param {number} dataMax @param {number} ticks\n   * @returns {{min:number,max:number,spacing:number}}\n   */\n  _niceScale(dataMin, dataMax, ticks) {\n    const lo = dataMin;\n    let hi = dataMax;\n    if (!(hi > lo)) hi = lo + 1;\n    const range = this._niceNum(hi - lo, false);\n    const spacing = this._niceNum(range / Math.max(1, ticks - 1), true);\n    return {\n      min: Math.floor(lo / spacing) * spacing,\n      max: Math.ceil(hi / spacing) * spacing,\n      spacing\n    };\n  }\n  /**\n   * Round a range to a \"nice\" 1/2/5 x 10^n number (Heckbert's loose/round label\n   * algorithm).\n   * @param {number} range @param {boolean} round @returns {number}\n   */\n  _niceNum(range, round) {\n    const rng = range > 0 ? range : 1;\n    const exp = Math.floor(Math.log(rng) / Math.LN10);\n    const frac = rng / Math.pow(10, exp);\n    let nf;\n    if (round) {\n      nf = frac < 1.5 ? 1 : frac < 3 ? 2 : frac < 7 ? 5 : 10;\n    } else {\n      nf = frac <= 1 ? 1 : frac <= 2 ? 2 : frac <= 5 ? 5 : 10;\n    }\n    return nf * Math.pow(10, exp);\n  }\n  /**\n   * Draw the scatter chrome behind the dots, from the geometry the layout\n   * stashed on `this._scatterAxis`. 1D (beeswarm): vertical X gridlines +\n   * baseline + tick labels (+ x title) + a per-lane category label in the\n   * category colour. 2D: both X + Y gridlines, both axes' tick labels, and\n   * rotated/placed axis titles (no lane labels - category is colour). Browser-\n   * only (SSR renders the dots without the chrome, as with cluster labels).\n   * @param {any} ret @param {Graphics} graphics\n   */\n  _drawScatterAxes(ret, graphics) {\n    const w2 = this.w;\n    if (!Environment.isBrowser()) return;\n    const ax = this._scatterAxis;\n    if (!ax) return;\n    const NS = \"http://www.w3.org/2000/svg\";\n    const g2 = graphics.group({ class: \"apexcharts-unit-axis\" });\n    const gridColor = w2.config.grid && w2.config.grid.borderColor || \"rgba(128,128,128,0.18)\";\n    const axisColor = \"rgba(128,128,128,0.5)\";\n    const cfgColors = w2.config.xaxis && w2.config.xaxis.labels && w2.config.xaxis.labels.style && w2.config.xaxis.labels.style.colors;\n    const configuredLabelColor = Array.isArray(cfgColors) ? cfgColors[0] : cfgColors;\n    const labelColor = configuredLabelColor || \"rgba(120,130,140,0.9)\";\n    const line = (x1, y1, x2, y2, stroke) => {\n      const l2 = BrowserAPIs.createElementNS(NS, \"line\");\n      l2.setAttribute(\"x1\", String(x1));\n      l2.setAttribute(\"y1\", String(y1));\n      l2.setAttribute(\"x2\", String(x2));\n      l2.setAttribute(\"y2\", String(y2));\n      l2.setAttribute(\"stroke\", stroke);\n      l2.setAttribute(\"shape-rendering\", \"crispEdges\");\n      g2.node.appendChild(l2);\n    };\n    const text = (str, x, y, anchor, fill, size, weight, cls) => {\n      const t2 = BrowserAPIs.createElementNS(NS, \"text\");\n      t2.setAttribute(\"class\", cls);\n      t2.setAttribute(\"x\", String(x));\n      t2.setAttribute(\"y\", String(y));\n      t2.setAttribute(\"text-anchor\", anchor);\n      t2.setAttribute(\"dominant-baseline\", \"middle\");\n      t2.setAttribute(\"font-size\", `${size}px`);\n      t2.setAttribute(\"font-family\", w2.config.chart.fontFamily || \"inherit\");\n      t2.setAttribute(\"font-weight\", String(weight));\n      t2.setAttribute(\"fill\", fill);\n      t2.textContent = str;\n      g2.node.appendChild(t2);\n    };\n    if (ax.mode === \"2d\") {\n      ax.yTicks.forEach((v2) => {\n        const y = ax.plotY(v2);\n        if (ax.gridlines) line(ax.plotL, y, ax.plotR, y, gridColor);\n        const label = ax.yFormatter ? String(ax.yFormatter(v2)) : this._formatTick(v2);\n        text(label, ax.plotL - 8, y, \"end\", labelColor, 11, 400, \"apexcharts-unit-tick\");\n      });\n      ax.xTicks.forEach((v2) => {\n        const x = ax.plotX(v2);\n        if (ax.gridlines) line(x, ax.plotT, x, ax.plotB, gridColor);\n        const label = ax.xFormatter ? String(ax.xFormatter(v2)) : this._formatTick(v2);\n        text(label, x, ax.plotB + 14, \"middle\", labelColor, 11, 400, \"apexcharts-unit-tick\");\n      });\n      line(ax.plotL, ax.plotB, ax.plotR, ax.plotB, axisColor);\n      line(ax.plotL, ax.plotT, ax.plotL, ax.plotB, axisColor);\n      if (ax.xTitle) {\n        text(\n          String(ax.xTitle),\n          (ax.plotL + ax.plotR) / 2,\n          ax.plotB + 32,\n          \"middle\",\n          labelColor,\n          12,\n          600,\n          \"apexcharts-unit-axis-title\"\n        );\n      }\n      if (ax.yTitle) {\n        const yt = BrowserAPIs.createElementNS(NS, \"text\");\n        yt.setAttribute(\"class\", \"apexcharts-unit-axis-title\");\n        const tx = 14;\n        const ty = (ax.plotT + ax.plotB) / 2;\n        yt.setAttribute(\"x\", String(tx));\n        yt.setAttribute(\"y\", String(ty));\n        yt.setAttribute(\"text-anchor\", \"middle\");\n        yt.setAttribute(\"font-size\", \"12px\");\n        yt.setAttribute(\"font-family\", w2.config.chart.fontFamily || \"inherit\");\n        yt.setAttribute(\"font-weight\", \"600\");\n        yt.setAttribute(\"fill\", labelColor);\n        yt.setAttribute(\"transform\", `rotate(-90 ${tx} ${ty})`);\n        yt.textContent = String(ax.yTitle);\n        g2.node.appendChild(yt);\n      }\n      ret.add(g2);\n      return;\n    }\n    if (ax.orientation === \"vertical\") {\n      ax.ticks.forEach((v2) => {\n        const y = ax.plotY(v2);\n        if (ax.gridlines) line(ax.plotL, y, ax.plotR, y, gridColor);\n        const label = ax.formatter ? String(ax.formatter(v2)) : this._formatTick(v2);\n        text(label, ax.plotL - 8, y, \"end\", labelColor, 11, 400, \"apexcharts-unit-tick\");\n      });\n      line(ax.plotL, ax.plotT, ax.plotL, ax.plotB, axisColor);\n      if (ax.valueTitle) {\n        const yt = BrowserAPIs.createElementNS(NS, \"text\");\n        yt.setAttribute(\"class\", \"apexcharts-unit-axis-title\");\n        const tx = 14;\n        const ty = (ax.plotT + ax.plotB) / 2;\n        yt.setAttribute(\"x\", String(tx));\n        yt.setAttribute(\"y\", String(ty));\n        yt.setAttribute(\"text-anchor\", \"middle\");\n        yt.setAttribute(\"font-size\", \"12px\");\n        yt.setAttribute(\"font-family\", w2.config.chart.fontFamily || \"inherit\");\n        yt.setAttribute(\"font-weight\", \"600\");\n        yt.setAttribute(\"fill\", labelColor);\n        yt.setAttribute(\"transform\", `rotate(-90 ${tx} ${ty})`);\n        yt.textContent = String(ax.valueTitle);\n        g2.node.appendChild(yt);\n      }\n      ax.lanes.forEach((lane) => {\n        const color = configuredLabelColor || w2.globals.colors[lane.i] || w2.globals.colors[0] || \"#008FFB\";\n        text(lane.name, lane.cx, ax.plotB + 16, \"middle\", color, 12, 600, \"apexcharts-unit-lane-label\");\n      });\n      ret.add(g2);\n      return;\n    }\n    ax.ticks.forEach((v2, idx) => {\n      const x = ax.plotX(v2);\n      if (ax.gridlines) line(x, ax.plotT, x, ax.plotB, gridColor);\n      const label = ax.formatter ? String(ax.formatter(v2)) : this._formatTick(v2);\n      const anchor = idx === 0 ? \"start\" : idx === ax.ticks.length - 1 ? \"end\" : \"middle\";\n      text(label, x, ax.plotB + 14, anchor, labelColor, 11, 400, \"apexcharts-unit-tick\");\n    });\n    line(ax.plotL, ax.plotB, ax.plotR, ax.plotB, axisColor);\n    if (ax.xTitle) {\n      text(\n        String(ax.xTitle),\n        (ax.plotL + ax.plotR) / 2,\n        ax.plotB + 32,\n        \"middle\",\n        labelColor,\n        12,\n        600,\n        \"apexcharts-unit-axis-title\"\n      );\n    }\n    if (ax.plotL > 12) {\n      ax.lanes.forEach((lane) => {\n        const color = configuredLabelColor || w2.globals.colors[lane.i] || w2.globals.colors[0] || \"#008FFB\";\n        text(lane.name, ax.plotL - 8, lane.cy, \"end\", color, 12, 600, \"apexcharts-unit-lane-label\");\n      });\n    }\n    ret.add(g2);\n  }\n  /**\n   * Compact tick-value formatting: integers as-is, otherwise trimmed to a short\n   * decimal; large magnitudes get a k/M suffix.\n   * @param {number} v @returns {string}\n   */\n  _formatTick(v2) {\n    if (!isFinite(v2)) return \"\";\n    const a2 = Math.abs(v2);\n    if (a2 >= 1e6) return `${+(v2 / 1e6).toFixed(1)}M`;\n    if (a2 >= 1e4) return `${+(v2 / 1e3).toFixed(1)}k`;\n    if (Number.isInteger(v2)) return String(v2);\n    return String(+v2.toFixed(2));\n  }\n  /**\n   * Distribute `total` whole cells across `counts` in proportion to each value,\n   * using the largest-remainder method so the parts sum to exactly `total`\n   * (used by the grid/waffle percentage mode).\n   * @param {number[]} counts @param {number} total @returns {number[]}\n   */\n  _largestRemainder(counts, total) {\n    const sum = counts.reduce((a2, b2) => a2 + b2, 0);\n    if (sum <= 0 || total <= 0) return counts.map(() => 0);\n    const exact = counts.map((c2) => c2 / sum * total);\n    const floors = exact.map((v2) => Math.floor(v2));\n    const used = floors.reduce((a2, b2) => a2 + b2, 0);\n    const remaining = Math.max(0, total - used);\n    const byFrac = exact.map((v2, i2) => ({ i: i2, frac: v2 - Math.floor(v2) })).sort((a2, b2) => b2.frac - a2.frac);\n    const out = floors.slice();\n    for (let n2 = 0; n2 < remaining && n2 < byFrac.length; n2++) {\n      out[byFrac[n2].i]++;\n    }\n    return out;\n  }\n  /**\n   * Phyllotaxis (sunflower) placement for `n` points around (cx, cy).\n   * @param {number} cx @param {number} cy @param {number} n\n   * @param {number} step @param {number} startIndex\n   * @returns {{x:number,y:number}[]}\n   */\n  _spiral(cx, cy, n2, step, startIndex) {\n    const pts = [];\n    for (let k = 0; k < n2; k++) {\n      const idx = startIndex + k;\n      const r2 = step * Math.sqrt(idx + 0.5);\n      const theta = idx * GOLDEN_ANGLE;\n      pts.push({ x: cx + r2 * Math.cos(theta), y: cy + r2 * Math.sin(theta) });\n    }\n    return pts;\n  }\n  /**\n   * A fixed dot radius, if the shape/size implies one: an explicit numeric\n   * `size`, or an `image` shape (sized by its own width/height). Returns null\n   * when dots should auto-size to fit the plot.\n   * @param {any} opts @returns {number | null}\n   */\n  _fixedRadius(opts) {\n    if (opts.shape === \"image\" && opts.image) {\n      return Math.max(opts.image.width || 20, opts.image.height || 20) / 2;\n    }\n    if (this._bubbleActive(opts) && typeof opts.sizeByValue.maxRadius === \"number\") {\n      return opts.sizeByValue.maxRadius > 0 ? opts.sizeByValue.maxRadius : null;\n    }\n    if (typeof opts.size === \"number\" && opts.size > 0) return opts.size;\n    return null;\n  }\n  /**\n   * Whether opt-in bubble sizing applies: enabled, and the shape is a circle\n   * (squares/images keep a uniform size).\n   * @param {any} opts @returns {boolean}\n   */\n  _bubbleActive(opts) {\n    const sbv = opts.sizeByValue;\n    return !!(sbv && sbv.enabled && opts.shape !== \"image\" && opts.shape !== \"square\");\n  }\n  /**\n   * This datum's numeric value for sizing / tooltip: the number itself, or an\n   * object's `value` / `y`. Null when there is no usable number.\n   * @param {any} d @returns {number | null}\n   */\n  _unitValueOf(d) {\n    if (typeof d === \"number\") return d;\n    if (d && typeof d === \"object\") {\n      const v2 = d.value != null ? d.value : d.y;\n      return typeof v2 === \"number\" ? v2 : null;\n    }\n    return null;\n  }\n  /**\n   * Radius for one bubble given the value stats. Default 'area' scaling makes\n   * a bubble's AREA proportional to its value (radius grows with sqrt); 'linear'\n   * scales the radius directly. Missing values collapse to the min radius.\n   * @param {number|null} v\n   * @param {{min:number,max:number,minR:number,maxR:number,scale:string}} stats\n   * @returns {number}\n   */\n  _radiusForValue(v2, stats) {\n    if (v2 == null || !isFinite(v2)) return stats.minR;\n    const t2 = stats.max > stats.min ? (v2 - stats.min) / (stats.max - stats.min) : 1;\n    const tc = Math.max(0, Math.min(1, t2));\n    if (stats.scale === \"linear\") {\n      return stats.minR + tc * (stats.maxR - stats.minR);\n    }\n    const aMin = stats.minR * stats.minR;\n    const aMax = stats.maxR * stats.maxR;\n    return Math.sqrt(aMin + tc * (aMax - aMin));\n  }\n  /**\n   * Value stats + radius bounds for bubble sizing, or null when it does not\n   * apply (disabled, non-circle shape, or no per-unit values). `maxR` is the\n   * reference radius the layout already spaced the lattice for; `minR` defaults\n   * to ~35% of it.\n   * @param {any[][]} unitData @param {any} opts @param {number} refR\n   * @returns {{min:number,max:number,minR:number,maxR:number,scale:string}|null}\n   */\n  _bubbleStats(unitData, opts, refR) {\n    if (!this._bubbleActive(opts)) return null;\n    let vmin = Infinity;\n    let vmax = -Infinity;\n    unitData.forEach((cat) => {\n      if (!cat) return;\n      cat.forEach((d) => {\n        const v2 = this._unitValueOf(d);\n        if (v2 != null && isFinite(v2)) {\n          if (v2 < vmin) vmin = v2;\n          if (v2 > vmax) vmax = v2;\n        }\n      });\n    });\n    if (vmin === Infinity || vmax < vmin) return null;\n    const sbv = opts.sizeByValue;\n    const maxR = refR;\n    const minR = Math.max(\n      1,\n      Math.min(\n        maxR,\n        typeof sbv.minRadius === \"number\" ? sbv.minRadius : maxR * 0.35\n      )\n    );\n    return {\n      min: vmin,\n      max: vmax,\n      minR,\n      maxR,\n      scale: sbv.scale === \"linear\" ? \"linear\" : \"area\"\n    };\n  }\n  /**\n   * Radial step between successive spiral shells. A fixed radius derives the\n   * step directly; 'auto' derives it so a cluster of `count` dots fits `availR`.\n   * @param {any} opts @param {number} availR @param {number} count\n   * @returns {number}\n   */\n  _resolveStep(opts, availR, count) {\n    const spacing = opts.spacing > 0 ? opts.spacing : 1;\n    const fixed = this._fixedRadius(opts);\n    if (fixed) return 2 * fixed * spacing;\n    return availR / (Math.sqrt(Math.max(1, count)) + 0.5);\n  }\n  /**\n   * @param {number} step @param {any} opts\n   * @returns {number}\n   */\n  _dotRadiusFromStep(step, opts) {\n    const spacing = opts.spacing > 0 ? opts.spacing : 1;\n    const fixed = this._fixedRadius(opts);\n    if (fixed) return fixed;\n    return Math.max(1, step / (2 * spacing));\n  }\n  /**\n   * Corner-anchored shapes (square, image) position by their top-left x/y;\n   * circles position by their centre cx/cy.\n   * @param {any} opts @returns {boolean}\n   */\n  _isCorner(opts) {\n    return opts.shape === \"square\" || opts.shape === \"image\";\n  }\n  /**\n   * Half-width/height used to convert a centre point to a corner shape's x/y.\n   * @param {any} opts @returns {{hx:number, hy:number}}\n   */\n  _halfExtent(opts) {\n    if (opts.shape === \"image\" && opts.image) {\n      return { hx: (opts.image.width || 20) / 2, hy: (opts.image.height || 20) / 2 };\n    }\n    const r2 = this._lastDotR;\n    return { hx: r2, hy: r2 };\n  }\n  /**\n   * Draw one dot (circle, square, or image icon) with the category fill +\n   * stroke, tagged so the shared non-axis tooltip and hover reuse work.\n   * @param {Graphics} graphics @param {any} opts @param {number} dotR\n   * @param {string} color @param {number} i @param {number} j\n   * @returns {any}\n   */\n  _drawDot(graphics, opts, dotR, color, i2, j) {\n    const w2 = this.w;\n    const strokeW = w2.config.stroke.show ? w2.config.stroke.width : 0;\n    const strokeColor = Array.isArray(w2.globals.stroke.colors) ? w2.globals.stroke.colors[i2] || \"none\" : \"none\";\n    const fillOpacity = typeof w2.config.fill.opacity === \"number\" ? w2.config.fill.opacity : 1;\n    let el;\n    if (opts.shape === \"image\" && opts.image && opts.image.src) {\n      const iw = opts.image.width || 20;\n      const ih = opts.image.height || 20;\n      el = w2.dom.Paper.image(opts.image.src);\n      el.node.setAttribute(\"width\", String(iw));\n      el.node.setAttribute(\"height\", String(ih));\n      el.node.setAttribute(\"preserveAspectRatio\", \"xMidYMid meet\");\n      if (opts.image.tint) {\n        el.node.setAttribute(\"filter\", `url(#${this._tintFilter(color)})`);\n      }\n    } else if (opts.shape === \"square\") {\n      const side = dotR * 2;\n      el = graphics.drawRect(0, 0, side, side, opts.borderRadius || 0, color, 1, strokeW, strokeColor);\n      el.node.setAttribute(\"fill\", color);\n      if (fillOpacity < 1) el.node.setAttribute(\"fill-opacity\", String(fillOpacity));\n    } else {\n      el = graphics.drawCircle(dotR, {\n        fill: color,\n        \"stroke-width\": strokeW,\n        stroke: strokeColor\n      });\n      el.node.setAttribute(\"fill\", color);\n      if (fillOpacity < 1) el.node.setAttribute(\"fill-opacity\", String(fillOpacity));\n    }\n    el.node.classList.add(\"apexcharts-unit-area\");\n    el.node.setAttribute(\"i\", String(i2));\n    el.node.setAttribute(\"j\", String(j));\n    return el;\n  }\n  /**\n   * Ensure (once per colour) an SVG recolour filter exists in the chart's defs\n   * and return its id. The filter floods `color` and clips it to the source\n   * graphic's alpha (feComposite operator=\"in\"), so an `<image>` referencing a\n   * monochrome icon is repainted in `color` while keeping its silhouette. Reused\n   * across every dot of the same colour.\n   * @param {string} color @returns {string}\n   */\n  _tintFilter(color) {\n    const w2 = this.w;\n    const NS = \"http://www.w3.org/2000/svg\";\n    const safe = String(color).replace(/[^a-zA-Z0-9]/g, \"\");\n    const id = `apexcharts-unit-tint-${w2.globals.chartID}-${safe}`;\n    const svg = w2.dom.Paper.node;\n    if (svg.querySelector(`#${id}`)) return id;\n    let defs = svg.querySelector(\"defs\");\n    if (!defs) {\n      defs = BrowserAPIs.createElementNS(NS, \"defs\");\n      svg.insertBefore(defs, svg.firstChild);\n    }\n    const filter = BrowserAPIs.createElementNS(NS, \"filter\");\n    filter.setAttribute(\"id\", id);\n    filter.setAttribute(\"x\", \"0%\");\n    filter.setAttribute(\"y\", \"0%\");\n    filter.setAttribute(\"width\", \"100%\");\n    filter.setAttribute(\"height\", \"100%\");\n    const flood = BrowserAPIs.createElementNS(NS, \"feFlood\");\n    flood.setAttribute(\"flood-color\", color);\n    flood.setAttribute(\"result\", \"flood\");\n    const comp = BrowserAPIs.createElementNS(NS, \"feComposite\");\n    comp.setAttribute(\"in\", \"flood\");\n    comp.setAttribute(\"in2\", \"SourceAlpha\");\n    comp.setAttribute(\"operator\", \"in\");\n    filter.appendChild(flood);\n    filter.appendChild(comp);\n    defs.appendChild(filter);\n    return id;\n  }\n  /**\n   * Position a non-animated dot at (x, y). Circles use cx/cy at the centre;\n   * corner shapes (square, image) use x/y at the top-left.\n   * @param {SVGElement} node @param {any} opts @param {number} x @param {number} y\n   */\n  _placeDot(node, opts, x, y) {\n    if (this._isCorner(opts)) {\n      const { hx, hy } = this._halfExtent(opts);\n      node.setAttribute(\"x\", String(x - hx));\n      node.setAttribute(\"y\", String(y - hy));\n    } else {\n      node.setAttribute(\"cx\", String(x));\n      node.setAttribute(\"cy\", String(y));\n    }\n  }\n  /**\n   * Parse a `#rgb` / `#rrggbb` / `rgb()` / `rgba()` colour to `[r, g, b]`, or\n   * null if it cannot be parsed (the colour tween is then skipped).\n   * @param {string} str @returns {number[] | null}\n   */\n  _rgb(str) {\n    if (typeof str !== \"string\") return null;\n    let s2 = str.trim();\n    if (s2[0] === \"#\") {\n      if (s2.length === 4) s2 = \"#\" + s2[1] + s2[1] + s2[2] + s2[2] + s2[3] + s2[3];\n      const n2 = parseInt(s2.slice(1, 7), 16);\n      if (isNaN(n2)) return null;\n      return [n2 >> 16 & 255, n2 >> 8 & 255, n2 & 255];\n    }\n    const m2 = s2.match(/rgba?\\(([^)]+)\\)/);\n    if (m2) {\n      const p2 = m2[1].split(\",\").map((x) => parseFloat(x));\n      if (p2.length >= 3 && p2.every((v2) => !isNaN(v2))) return [p2[0], p2[1], p2[2]];\n    }\n    return null;\n  }\n  /**\n   * Whether to run the gather / transition animation. Runs on the initial mount\n   * and on data-driven updates (keyed old->new tween or cross-type burst).\n   * Skipped: in SSR, when animations are off, when the caller passed\n   * `animate:false` (shouldAnimate === false), on a PURE window resize (resized\n   * with no data change - re-gathering on every resize would be jarring), and\n   * when the user prefers reduced motion.\n   *\n   * Note: `w.globals.resized` is set true on every update (not just window\n   * resize), so it must be paired with `!dataChanged` to isolate a real resize.\n   * @returns {boolean}\n   */\n  _shouldAnimate() {\n    const w2 = this.w;\n    const anim = w2.config.chart.animations;\n    if (!Environment.isBrowser()) return false;\n    if (!anim || anim.enabled === false) return false;\n    if (w2.globals.shouldAnimate === false) return false;\n    if (w2.globals.resized && !w2.globals.dataChanged) return false;\n    if (anim.respectReducedMotion && prefersReducedMotion()) return false;\n    return true;\n  }\n  /**\n   * Give every dot an x/y spring, reusing the live springs of a gather this\n   * render just cancelled.\n   *\n   * The reuse is the whole point of the spring path. A carried spring holds a\n   * dot's real on-screen position AND its velocity, so an interrupted gather\n   * resumes from there. Without it the dot restarts from `cx0`, which on an\n   * update is the slot it was still travelling towards - so every interruption\n   * teleports it forward and then re-animates from a standstill. A dragged\n   * slider or a scrubbed storyboard interrupts on almost every frame, which is\n   * where that reads worst.\n   *\n   * Springs left over from a completed gather are at rest on their targets, so\n   * carrying them is identical to making fresh ones. Only an interrupted flight\n   * carries anything.\n   *\n   * @param {UnitAnimDot[]} dots\n   * @param {any} gcfg plotOptions.unit.gather\n   * @param {number} speed chart.animations.speed, in ms\n   * @param {any} opts plotOptions.unit\n   */\n  _seedSprings(dots, gcfg, speed, opts) {\n    const [stiffness, damping] = springParams(gcfg.spring, speed);\n    const live = this.ctx ? this.ctx._unitSprings : null;\n    const springs = /* @__PURE__ */ new Map();\n    for (let k = 0; k < dots.length; k++) {\n      const d = dots[k];\n      const carried = live && !d.isEnter && d.key != null ? live.get(d.key) : null;\n      const sx = carried ? carried.x : v(d.cx0, stiffness, damping);\n      const sy = carried ? carried.y : v(d.cy0, stiffness, damping);\n      if (carried) {\n        sx.stiffness = stiffness;\n        sy.stiffness = stiffness;\n        sx.damping = damping;\n        sy.damping = damping;\n        d.cx0 = sx.value;\n        d.cy0 = sy.value;\n        this._placeDot(d.node, opts, d.cx0, d.cy0);\n        if (sx.velocity !== 0 || sy.velocity !== 0) d.delay = 0;\n      }\n      d.sx = sx;\n      d.sy = sy;\n      if (d.key != null) springs.set(d.key, { x: sx, y: sy });\n    }\n    if (this.ctx) this.ctx._unitSprings = springs;\n  }\n  /**\n   * One rAF loop that tweens every dot from its start (cx0/cy0 - either the\n   * cluster centre on first mount / for entering dots, or its previous slot on\n   * an update) to its target slot, staggered by index. Entering dots fade in;\n   * moving dots stay opaque. Dots whose group colour changed (a 'flow' regroup)\n   * cross-fade their fill from the old colour to the new one over the same ease;\n   * dots whose radius changed (bubble sizing) grow/shrink over it too (circles).\n   *\n   * Position travels on a spring by default (`gather.motion`), so a gather\n   * interrupted by the next render resumes from where the dots actually are,\n   * carrying their velocity, rather than restarting from a standstill. Colour,\n   * radius and opacity stay on a fixed-duration ease either way: those are 0..1\n   * quantities, and the shared solver's rest thresholds are absolute (0.05 in\n   * caller units), which is negligible for pixels but 5% of a unit interval.\n   * @param {UnitAnimDot[]} dots\n   */\n  _runGather(dots) {\n    const w$1 = this.w;\n    const opts = w$1.config.plotOptions.unit;\n    const speed = Math.max(1, w$1.config.chart.animations.speed || 800);\n    const corner = this._isCorner(opts);\n    const { hx, hy } = this._halfExtent(opts);\n    const maxDelay = Math.min(speed * 0.6, 450);\n    const n2 = dots.length;\n    for (let k = 0; k < n2; k++) {\n      dots[k].delay = n2 > 1 ? k / (n2 - 1) * maxDelay : 0;\n    }\n    const cxAttr = corner ? \"x\" : \"cx\";\n    const cyAttr = corner ? \"y\" : \"cy\";\n    const offX = corner ? hx : 0;\n    const offY = corner ? hy : 0;\n    const gcfg = opts.gather || {};\n    const motion = gcfg.motion || \"auto\";\n    const useSpring = motion === \"spring\" || motion === \"auto\" && (!gcfg.easing || gcfg.easing === \"outCubic\");\n    if (useSpring) this._seedSprings(dots, gcfg, speed, opts);\n    else if (this.ctx) this.ctx._unitSprings = null;\n    if (corner) {\n      for (let k = 0; k < n2; k++) {\n        dots[k].node.setAttribute(cxAttr, String(dots[k].cx0 - offX));\n        dots[k].node.setAttribute(cyAttr, String(dots[k].cy0 - offY));\n      }\n    }\n    if (!corner) {\n      for (let k = 0; k < n2; k++) {\n        const d = dots[k];\n        if (d.r0 != null && d.r1 != null && d.r0 !== d.r1) {\n          d.node.setAttribute(\"r\", String(d.r0));\n        }\n      }\n    }\n    for (let k = 0; k < n2; k++) {\n      const d = dots[k];\n      if (d.fill0 && d.fill1 && d.fill0 !== d.fill1) {\n        d._c0 = this._rgb(d.fill0);\n        d._c1 = this._rgb(d.fill1);\n      }\n    }\n    const easePos = gcfg.easing === \"outBack\" ? easeOutBack(typeof gcfg.overshoot === \"number\" ? gcfg.overshoot : 1.70158) : gcfg.easing === \"inOutCubic\" ? easeInOutCubic : easeOutCubic;\n    if (this.w.globals.unitGatherRAF != null) {\n      BrowserAPIs.cancelAnimationFrame(this.w.globals.unitGatherRAF);\n      this.w.globals.unitGatherRAF = null;\n    }\n    const start = performance.now();\n    let last = start;\n    const stepFn = (now) => {\n      if (this.w.globals.isDestroyed) {\n        this.w.globals.unitGatherRAF = null;\n        return;\n      }\n      const dt = Math.min(MAX_FRAME_STEP, Math.max(0, (now - last) / 1e3));\n      last = now;\n      let done = true;\n      for (let k = 0; k < n2; k++) {\n        const d = dots[k];\n        const elapsed = now - start - d.delay;\n        const t2 = Math.max(0, Math.min(1, elapsed / speed));\n        const ec = easeOutCubic(t2);\n        let cx, cy;\n        if (d.sx && d.sy) {\n          if (elapsed >= 0 && !d.released) {\n            w(d.sx, d.x);\n            w(d.sy, d.y);\n            d.released = true;\n          }\n          const restX = b(d.sx, dt);\n          const restY = b(d.sy, dt);\n          if (!d.released || !restX || !restY) done = false;\n          cx = d.sx.value;\n          cy = d.sy.value;\n        } else {\n          const e2 = easePos(t2);\n          cx = d.cx0 + (d.x - d.cx0) * e2;\n          cy = d.cy0 + (d.y - d.cy0) * e2;\n        }\n        d.node.setAttribute(cxAttr, String(cx - offX));\n        d.node.setAttribute(cyAttr, String(cy - offY));\n        if (d.isEnter) d.node.style.opacity = String(Math.min(1, t2 * 2.5));\n        if (d._c0 && d._c1) {\n          const cr = Math.round(d._c0[0] + (d._c1[0] - d._c0[0]) * ec);\n          const cg = Math.round(d._c0[1] + (d._c1[1] - d._c0[1]) * ec);\n          const cb = Math.round(d._c0[2] + (d._c1[2] - d._c0[2]) * ec);\n          d.node.setAttribute(\"fill\", `rgb(${cr},${cg},${cb})`);\n        }\n        if (!corner && d.r0 != null && d.r1 != null && d.r0 !== d.r1) {\n          d.node.setAttribute(\"r\", String(d.r0 + (d.r1 - d.r0) * ec));\n        }\n        if (t2 < 1) done = false;\n      }\n      if (done) {\n        for (let k = 0; k < n2; k++) {\n          const d = dots[k];\n          d.node.style.opacity = \"\";\n          if (d._c1 && d.fill1) d.node.setAttribute(\"fill\", d.fill1);\n          if (!corner && d.r0 != null && d.r1 != null && d.r0 !== d.r1) {\n            d.node.setAttribute(\"r\", String(d.r1));\n          }\n        }\n        this.w.globals.unitGatherRAF = null;\n      } else {\n        this.w.globals.unitGatherRAF = BrowserAPIs.requestAnimationFrame(stepFn);\n      }\n    };\n    this.w.globals.unitGatherRAF = BrowserAPIs.requestAnimationFrame(stepFn);\n  }\n  /**\n   * Keys present in the previous render but not the current one, resolved back\n   * to their old slot {x, y, fill}. These are the dots that must animate out.\n   * @param {Map<string, {x:number,y:number,fill:string}>} prev\n   * @param {Map<string, {x:number,y:number,fill:string}>} nextPrev\n   * @param {any} opts\n   * @returns {{x:number,y:number,fill:string}[]}\n   */\n  _collectExits(prev, nextPrev, opts) {\n    const cap = Math.max(0, opts.maxUnits || 5e3);\n    const exits = [];\n    for (const [key, slot] of prev) {\n      if (!nextPrev.has(key)) {\n        exits.push(slot);\n        if (exits.length >= cap) break;\n      }\n    }\n    return exits;\n  }\n  /**\n   * Animate the exit ghosts out, then remove them. Layouts whose positions carry\n   * data (a waffle / grid lattice, or a scatter / beeswarm on real axes) fade\n   * their ghosts OUT IN PLACE - drifting them toward the plot centre would drag\n   * cells across tiles or bubbles across the plane, which reads as wrong. The\n   * blob / bar layouts keep the gentle inward collapse so a removal reads as\n   * motion rather than a pop.\n   * @param {any} group @param {{x:number,y:number,fill:string}[]} exits @param {any} opts\n   */\n  _runExits(group, exits, opts) {\n    const w2 = this.w;\n    const graphics = new Graphics(w2, this.ctx);\n    const dotR = this._lastDotR;\n    const cx = w2.layout.gridWidth / 2;\n    const cy = w2.layout.gridHeight / 2;\n    const drift = opts.layout === \"grid\" || opts.layout === \"scatter\" || opts.layout === \"arc\" || opts.layout === \"custom\" ? 0 : 0.35;\n    const ghosts = [];\n    exits.forEach((slot) => {\n      const el = this._drawDot(graphics, opts, dotR, slot.fill, 0, 0);\n      el.node.classList.add(\"apexcharts-unit-exit\");\n      this._placeDot(el.node, opts, slot.x, slot.y);\n      group.add(el);\n      ghosts.push({ node: el.node, x0: slot.x, y0: slot.y });\n    });\n    if (!this._shouldAnimate()) {\n      ghosts.forEach((g2) => g2.node.remove());\n      return;\n    }\n    const speed = Math.max(1, w2.config.chart.animations.speed || 800);\n    const corner = this._isCorner(opts);\n    const { hx, hy } = this._halfExtent(opts);\n    const offX = corner ? hx : 0;\n    const offY = corner ? hy : 0;\n    const cxAttr = corner ? \"x\" : \"cx\";\n    const cyAttr = corner ? \"y\" : \"cy\";\n    if (this.w.globals.unitExitRAF != null) {\n      BrowserAPIs.cancelAnimationFrame(this.w.globals.unitExitRAF);\n      this.w.globals.unitExitRAF = null;\n    }\n    const start = performance.now();\n    const stepFn = (now) => {\n      if (this.w.globals.isDestroyed) {\n        this.w.globals.unitExitRAF = null;\n        return;\n      }\n      const t2 = Math.max(0, Math.min(1, (now - start) / speed));\n      const e2 = easeOutCubic(t2);\n      for (let k = 0; k < ghosts.length; k++) {\n        const g2 = ghosts[k];\n        if (drift) {\n          const x = g2.x0 + (cx - g2.x0) * e2 * drift;\n          const y = g2.y0 + (cy - g2.y0) * e2 * drift;\n          g2.node.setAttribute(cxAttr, String(x - offX));\n          g2.node.setAttribute(cyAttr, String(y - offY));\n        }\n        g2.node.style.opacity = String(1 - e2);\n      }\n      if (t2 < 1) {\n        this.w.globals.unitExitRAF = BrowserAPIs.requestAnimationFrame(stepFn);\n      } else {\n        this.w.globals.unitExitRAF = null;\n        group.node && group.node.remove();\n      }\n    };\n    this.w.globals.unitExitRAF = BrowserAPIs.requestAnimationFrame(stepFn);\n  }\n  /**\n   * Are outer (name) labels on? Only for `layout: 'custom'`: they name a colour\n   * BAND, so they need categories that occupy their own part of the shape. The\n   * generated layouts (`packed`, `grid`) interleave categories, and the blob /\n   * bar / arc layouts already carry a label of their own.\n   * @param {any} opts\n   */\n  _outerLabelsOn(opts) {\n    const cfg = opts.clusterLabels;\n    return !!(opts.layout === \"custom\" && cfg && cfg.show !== false && cfg.external && cfg.external.show);\n  }\n  /**\n   * One outer label's text, as lines. Two lines by default (name, then share),\n   * which is what makes the label readable at a distance from the band it names.\n   * A `clusterLabels.formatter` may return \"\\n\"-separated text to control the\n   * split, or a single line.\n   * @param {number} i @param {number} value @param {number} total @param {any} opts\n   * @returns {string[]}\n   */\n  _outerLabelLines(i2, value, total, opts) {\n    const w2 = this.w;\n    const name2 = w2.seriesData.seriesNames[i2] || `series-${i2 + 1}`;\n    const percent = total > 0 ? value / total * 100 : 0;\n    const cfg = opts.clusterLabels;\n    const text = typeof cfg.formatter === \"function\" ? cfg.formatter(name2, { seriesIndex: i2, value, percent, w: w2 }) : `${name2}\n${percent.toFixed(1)}%`;\n    return String(text).split(\"\\n\");\n  }\n  /**\n   * Room one side has to give up: the widest label, plus the leader line, plus a\n   * little air. Capped at a quarter of the plot so one long category name shrinks\n   * its own label into the gutter instead of starving the shape.\n   * @param {number[]} counts @param {any} opts\n   * @returns {number}\n   */\n  _outerLabelGutter(counts, opts) {\n    const w2 = this.w;\n    const cfg = opts.clusterLabels;\n    const conn = cfg.external.connector || {};\n    const total = counts.reduce((a2, b2) => a2 + b2, 0);\n    const lines = [];\n    counts.forEach((c2, i2) => {\n      if (c2 > 0) lines.push(...this._outerLabelLines(i2, c2, total, opts));\n    });\n    if (!lines.length) return 0;\n    const width = measureLabelWidth(w2, lines, {\n      fontSize: cfg.fontSize,\n      fontFamily: cfg.fontFamily || w2.config.chart.fontFamily\n    });\n    const gap = conn.gap != null ? conn.gap : 8;\n    const length = conn.length != null ? conn.length : 22;\n    const room = width + gap + length + 8 + Math.abs(parseFloat(cfg.external.offsetX) || 0);\n    return Math.min(room, w2.layout.gridWidth * 0.25);\n  }\n  /**\n   * Plan and draw the outer labels. A band's anchor is one of its own dots - the\n   * outermost on the label's side, preferring dots near the band's middle - so\n   * the leader line lands on the crowd rather than on a bounding box the viewer\n   * cannot see.\n   *\n   * Sides: a silhouette ordered by rows stacks its categories vertically, so\n   * their centroids share an x and the labels have to alternate left/right down\n   * the shape. One ordered by columns spreads them horizontally, so each label\n   * goes to the side its band is already on.\n   *\n   * @param {any} ret @param {{ i:number, cx:number, cy:number, dots:{x:number,y:number,r?:number}[] }[]} clusters\n   * @param {number[]} counts @param {number} total @param {any} opts\n   * @param {boolean} gathering true only when the dots are flying in from the\n   *   centre (first render / cross-type morph). On an update the crowd is already\n   *   on screen, so the labels must not wait for anything.\n   */\n  _drawOuterLabels(ret, clusters, counts, total, opts, gathering) {\n    const w2 = this.w;\n    if (!Environment.isBrowser()) return;\n    const cfg = opts.clusterLabels;\n    const ext = cfg.external;\n    const conn = ext.connector || {};\n    const gap = conn.gap != null ? conn.gap : 8;\n    const length = conn.length != null ? conn.length : 22;\n    const offsetX = parseFloat(ext.offsetX) || 0;\n    const offsetY = parseFloat(ext.offsetY) || 0;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    const dotR = this._lastDotR;\n    const live = clusters.filter((c2) => c2.dots.length > 0);\n    if (!live.length) return;\n    let spreadX = 0;\n    let spreadY = 0;\n    if (live.length > 1) {\n      const xs = live.map((c2) => c2.cx);\n      const ys = live.map((c2) => c2.cy);\n      spreadX = Math.max(...xs) - Math.min(...xs);\n      spreadY = Math.max(...ys) - Math.min(...ys);\n    }\n    const bandedByX = spreadX > spreadY;\n    const fontSize = parseFloat(cfg.fontSize) || 13;\n    const lineHeight = Math.round(fontSize * 1.35);\n    const items = [];\n    live.slice().sort((a2, b2) => a2.cy - b2.cy).forEach((c2, k) => {\n      const lines = this._outerLabelLines(c2.i, counts[c2.i], total, opts);\n      if (!lines.some((l2) => l2 !== \"\")) return;\n      const side = bandedByX ? c2.cx >= gw / 2 ? \"right\" : \"left\" : k % 2 === 0 ? \"right\" : \"left\";\n      const dir = side === \"right\" ? 1 : -1;\n      let best = c2.dots[0];\n      let bestScore = -Infinity;\n      c2.dots.forEach((d) => {\n        const score = dir * d.x - 0.75 * Math.abs(d.y - c2.cy);\n        if (score > bestScore) {\n          bestScore = score;\n          best = d;\n        }\n      });\n      const anchor = { x: best.x + dir * (best.r || dotR), y: best.y };\n      const elbow = { x: anchor.x + dir * gap, y: anchor.y };\n      items.push({\n        i: c2.i,\n        lines,\n        anchor,\n        elbow,\n        labelX: elbow.x + dir * length + offsetX,\n        idealY: anchor.y + offsetY,\n        labelY: anchor.y + offsetY,\n        side\n      });\n    });\n    if (!items.length) return;\n    const maxLines = items.reduce((m2, it) => Math.max(m2, it.lines.length), 1);\n    const block = maxLines * lineHeight;\n    const half = block / 2;\n    [\"left\", \"right\"].forEach((side) => {\n      spaceOutLabels(\n        items.filter((it) => it.side === side),\n        block + 2,\n        gh - half,\n        half\n      );\n    });\n    const group = new Graphics(w2, this.ctx).group({\n      class: \"apexcharts-unit-outer-labels\"\n    });\n    if (gathering) {\n      const speed = Math.max(1, w2.config.chart.animations.speed || 800);\n      group.node.classList.add(\"apexcharts-unit-label-delay\");\n      group.node.style.animationDelay = `${Math.min(speed * 0.45, 600) / 1e3}s`;\n    }\n    items.forEach((it) => {\n      const color = w2.globals.colors[it.i] || w2.globals.colors[0] || \"#008FFB\";\n      group.add(\n        drawOuterLabel(w2, {\n          lines: it.lines,\n          lineHeight,\n          anchor: it.anchor,\n          elbow: it.elbow,\n          labelX: it.labelX,\n          labelY: it.labelY,\n          side: it.side,\n          connector: {\n            show: conn.show !== false,\n            width: conn.width != null ? conn.width : 1.5,\n            color: conn.color || color\n          },\n          style: {\n            fontSize: cfg.fontSize,\n            fontFamily: cfg.fontFamily || w2.config.chart.fontFamily,\n            fontWeight: cfg.fontWeight\n          },\n          foreColor: cfg.color || w2.config.chart.foreColor,\n          groupClass: \"apexcharts-unit-outer-label-group\",\n          textClass: \"apexcharts-unit-outer-label\",\n          connectorClass: \"apexcharts-unit-label-connector\"\n        })\n      );\n    });\n    ret.add(group);\n  }\n  /**\n   * A cluster label placed above (default) or below the cluster/bar. A TOP label\n   * over a wide grouped/packed blob rides a curved arc (invisible arc path +\n   * <textPath>, centred at 50% offset); a bottom label, a 'columns' bar, or a\n   * cluster too small for the arc gets a straight centred label instead.\n   * `clusterLabels.position` = 'top' | 'bottom'; `offsetY` pushes it further from\n   * the blob in either direction.\n   * @param {any} elSeries @param {{ i:number, cx:number, cy:number, outerR:number, flat?:boolean }} cluster\n   * @param {number} value @param {number} total @param {any} opts @param {string} color\n   */\n  _drawClusterLabel(elSeries, cluster, value, total, opts, color) {\n    const w2 = this.w;\n    if (!Environment.isBrowser()) return;\n    const NS = \"http://www.w3.org/2000/svg\";\n    const name2 = w2.seriesData.seriesNames[cluster.i] || `series-${cluster.i + 1}`;\n    const percent = total > 0 ? value / total * 100 : 0;\n    const cfg = opts.clusterLabels;\n    const fontSize = parseFloat(cfg.fontSize) || 13;\n    let text;\n    if (typeof cfg.formatter === \"function\") {\n      text = cfg.formatter(name2, {\n        seriesIndex: cluster.i,\n        value,\n        percent,\n        w: w2\n      });\n    } else {\n      text = `${name2} (${percent.toFixed(1)}%)`;\n    }\n    const str = typeof text === \"string\" ? text : String(text);\n    const textEl = BrowserAPIs.createElementNS(NS, \"text\");\n    textEl.setAttribute(\"class\", \"apexcharts-unit-label\");\n    textEl.setAttribute(\"text-anchor\", \"middle\");\n    textEl.setAttribute(\"font-size\", `${fontSize}px`);\n    textEl.setAttribute(\"font-family\", cfg.fontFamily || w2.config.chart.fontFamily || \"inherit\");\n    textEl.setAttribute(\"font-weight\", String(cfg.fontWeight || 600));\n    textEl.setAttribute(\"fill\", cfg.color || color);\n    const bottom = cfg.position === \"bottom\";\n    const R = cluster.outerR + fontSize * 0.6 + 3 + (cfg.offsetY || 0);\n    const estWidth = str.length * fontSize * 0.55;\n    const curved = !bottom && !cluster.flat && cfg.curved !== false && estWidth <= Math.PI * R * 0.95;\n    if (curved) {\n      const yMid = cluster.cy;\n      const x1 = cluster.cx - R;\n      const x2 = cluster.cx + R;\n      const d = `M ${x1} ${yMid} A ${R} ${R} 0 0 1 ${x2} ${yMid}`;\n      const arcId = `apexcharts-unit-label-${w2.globals.chartID}-${cluster.i}`;\n      const pathEl = BrowserAPIs.createElementNS(NS, \"path\");\n      pathEl.setAttribute(\"id\", arcId);\n      pathEl.setAttribute(\"d\", d);\n      pathEl.setAttribute(\"fill\", \"none\");\n      pathEl.setAttribute(\"stroke\", \"none\");\n      const tp = BrowserAPIs.createElementNS(NS, \"textPath\");\n      tp.setAttribute(\"href\", `#${arcId}`);\n      tp.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\", `#${arcId}`);\n      tp.setAttribute(\"startOffset\", \"50%\");\n      tp.textContent = str;\n      textEl.appendChild(tp);\n      elSeries.node.appendChild(pathEl);\n    } else {\n      textEl.setAttribute(\"x\", String(cluster.cx));\n      const y = bottom ? cluster.cy + cluster.outerR + fontSize + 6 + (cfg.offsetY || 0) : cluster.cy - cluster.outerR - 6 - (cfg.offsetY || 0);\n      textEl.setAttribute(\"y\", String(y));\n      textEl.textContent = str;\n    }\n    elSeries.node.appendChild(textEl);\n  }\n}\nconst D2R = Math.PI / 180;\nconst R2D = 180 / Math.PI;\nconst SVGNS = \"http://www.w3.org/2000/svg\";\nconst XHTML = \"http://www.w3.org/1999/xhtml\";\nconst lerp = (a2, b2, t2) => a2 + (b2 - a2) * t2;\nclass SunburstChart {\n  /**\n   * @param {import('../types/internal').ChartStateW} w\n   * @param {import('../types/internal').ChartContext} ctx\n   */\n  constructor(w2, ctx) {\n    this.ctx = ctx;\n    this.w = w2;\n    const cnf = w2.config;\n    this.cfg = cnf.plotOptions.sunburst;\n    this.strokeWidth = cnf.stroke.show ? cnf.stroke.width : 0;\n    this.strokeColor = Array.isArray(cnf.stroke.colors) ? cnf.stroke.colors[0] : cnf.stroke.colors || \"#fff\";\n    this.startAngle = this.cfg.startAngle;\n    this.endAngle = this.cfg.endAngle;\n    this.maxDepth = 0;\n    this.centerX = 0;\n    this.centerY = 0;\n    this.maxRadius = 0;\n    this.total = 1;\n    this._focusMaxDepth = 0;\n    this._focus = null;\n    this._zoomGen = 0;\n    this._roots = [];\n    this._nodesAll = [];\n    this._innerR = () => 0;\n    this._outerR = () => 0;\n    this._tooltipEl = null;\n    this._lblSeq = 0;\n    this._morphLeafIndex = 0;\n    this._graphics = null;\n    this._ringsG = null;\n    this._labelsG = null;\n  }\n  /**\n   * @param {any[]} series  flattened top-level values (geometry comes from the\n   *   config hierarchy; kept for the standard draw(series) signature + noData)\n   * @returns {any} SVG group\n   */\n  draw(series) {\n    const w2 = this.w;\n    const graphics = new Graphics(this.w);\n    this._graphics = graphics;\n    const g2 = graphics.group({ class: \"apexcharts-sunburst\" });\n    if (w2.globals.noData || !series || !series.length) return g2;\n    const gw = w2.layout.gridWidth;\n    const gh = w2.layout.gridHeight;\n    this.centerX = gw / 2 + (this.cfg.offsetX || 0);\n    this.centerY = gh / 2 + (this.cfg.offsetY || 0);\n    this.maxRadius = Math.min(gw, gh) / 2.05 - this.strokeWidth - (!w2.config.chart.sparkline.enabled ? w2.config.chart.dropShadow.blur : 0);\n    if (this.maxRadius < 5) return g2;\n    this._roots = this._buildHierarchy();\n    if (!this._roots.length) return g2;\n    this._roots.forEach((r2) => this._fillValues(r2));\n    this._validateStrict();\n    this._nodesAll = [];\n    const colors = w2.globals.colors || [];\n    this._roots.forEach((r2, i2) => {\n      this._colorPass(r2, r2.color || colors[i2 % colors.length] || \"#008FFB\");\n    });\n    this.total = this._roots.reduce((s2, r2) => s2 + Math.max(0, r2.value), 0) || 1;\n    this._ringsG = graphics.group({ class: \"apexcharts-sunburst-rings\" });\n    this._labelsG = graphics.group({ class: \"apexcharts-sunburst-labels\" });\n    g2.add(this._ringsG);\n    g2.add(this._labelsG);\n    this._focus = null;\n    this._relayout(this._focus);\n    const anims = w2.config.chart.animations;\n    let mode = \"none\";\n    if (anims.enabled) {\n      if (w2.globals.dataChanged) {\n        if (anims.dynamicAnimation.enabled) mode = \"update\";\n      } else if (!w2.globals.resized) {\n        mode = \"intro\";\n      }\n    }\n    this._applyLayout(mode);\n    this._renderBreadcrumb();\n    return g2;\n  }\n  // ------------------------------------------------------------------ data\n  /**\n   * Resolve the config into root nodes `{ name, value, color?, children? }`.\n   * Each datum may carry `children` (native) or `drilldown: '<id>'` (adapter).\n   * Shared with the treemap - see charts/common/Hierarchy.\n   * @returns {any[]}\n   */\n  _buildHierarchy() {\n    return buildHierarchy(this.w);\n  }\n  /**\n   * Fill a parent's value from its children when missing.\n   * @param {any} node\n   */\n  _fillValues(node) {\n    fillValues(node);\n  }\n  /**\n   * With `partition: 'strict'`, warn (once) when a parent's value does not\n   * match the sum of its children. The angles are still normalized to fill the\n   * wedge (strict rendering is a P3 refinement); this just surfaces the data\n   * mismatch.\n   */\n  _validateStrict() {\n    if (this.cfg.partition !== \"strict\") return;\n    let warned = false;\n    const walk = (node) => {\n      if (node.children && node.children.length) {\n        const sum = node.children.reduce(\n          (s2, c2) => s2 + Math.max(0, c2.value || 0),\n          0\n        );\n        if (!warned && node.value != null && Math.abs(sum - node.value) > 0.5) {\n          console.warn(\n            `ApexCharts sunburst: partition 'strict' but \"${node.name}\" (${node.value}) != sum of its children (${sum}). Angles are normalized to fill the wedge.`\n          );\n          warned = true;\n        }\n        node.children.forEach(walk);\n      }\n    };\n    this._roots.forEach(walk);\n  }\n  /**\n   * Assign a colour to every node (explicit `color` wins, else the parent's\n   * colour tinted lighter). Done once so zoom preserves colours.\n   * @param {any} node\n   * @param {string} color\n   */\n  _colorPass(node, color) {\n    node._color = node.color || color;\n    this._nodesAll.push(node);\n    if (node.children) {\n      node.children.forEach(\n        (c2) => this._colorPass(c2, c2.color || this._lighten(node._color, this.cfg.tint))\n      );\n    }\n  }\n  // ---------------------------------------------------------------- layout\n  /**\n   * Recompute visibility + angles + radii for a focus node (null = whole tree).\n   * @param {any} focus\n   */\n  _relayout(focus) {\n    this._nodesAll.forEach((n2) => {\n      n2._show = false;\n    });\n    this._focusMaxDepth = 0;\n    if (!focus) {\n      const total = this._roots.reduce((s2, r2) => s2 + Math.max(0, r2.value), 0) || 1;\n      let a2 = this.startAngle;\n      this._roots.forEach((r2) => {\n        const span = (this.endAngle - this.startAngle) * Math.max(0, r2.value) / total;\n        this._placeVis(r2, 0, a2, a2 + span, null);\n        a2 += span;\n      });\n    } else {\n      this._placeVis(focus, 0, this.startAngle, this.endAngle, focus._parent);\n    }\n    const hole = this._parseSize(this.cfg.innerSize, this.maxRadius);\n    const ringCount = this._focusMaxDepth + 1;\n    const band = (this.maxRadius - hole) / ringCount;\n    const radialGap = ringCount > 1 ? 1 : 0;\n    this._innerR = (vd) => hole + vd * band + (vd > 0 ? radialGap / 2 : 0);\n    this._outerR = (vd) => hole + (vd + 1) * band - radialGap / 2;\n    this._nodesAll.forEach((n2) => {\n      if (!n2._show) return;\n      n2._iR = this._innerR(n2._vDepth);\n      n2._oR = n2._leaf && this.cfg.leaf === \"extend\" && n2._vDepth < this._focusMaxDepth ? this.maxRadius : this._outerR(n2._vDepth);\n    });\n  }\n  /**\n   * @param {any} node\n   * @param {number} vDepth\n   * @param {number} a0\n   * @param {number} a1\n   * @param {any} parent\n   */\n  _placeVis(node, vDepth, a0, a1, parent) {\n    node._show = true;\n    node._vDepth = vDepth;\n    node._a0 = a0;\n    node._a1 = a1;\n    node._parent = parent;\n    node._leaf = !(node.children && node.children.length);\n    if (vDepth > this._focusMaxDepth) this._focusMaxDepth = vDepth;\n    if (!node._leaf) {\n      const total = node.children.reduce(\n        (s2, c2) => s2 + Math.max(0, c2.value),\n        0\n      ) || 1;\n      let a2 = a0;\n      node.children.forEach((c2) => {\n        const span = (a1 - a0) * Math.max(0, c2.value) / total;\n        this._placeVis(c2, vDepth + 1, a2, a2 + span, node);\n        a2 += span;\n      });\n    }\n  }\n  // --------------------------------------------------------------- render\n  /**\n   * Create / update / remove arc elements to match the current layout, with an\n   * animation appropriate to the transition:\n   *   intro  — pie/donut-style angular clock sweep from startAngle to endAngle\n   *            (all rings reveal together as the sweep line passes them)\n   *   update — morph every arc from its previous on-screen geometry (matched\n   *            by node key across the re-render); new arcs unfurl in place\n   *   zoom   — tween angles + radii between focus layouts (same instance)\n   * @param {'intro'|'zoom'|'update'|'none'} mode\n   */\n  _applyLayout(mode) {\n    var _a;\n    const w2 = this.w;\n    const anims = w2.config.chart.animations;\n    const dur = !anims.enabled ? 0 : mode === \"none\" ? 0 : mode === \"update\" ? anims.dynamicAnimation.speed || 350 : anims.speed || 500;\n    const gen = ++this._zoomGen;\n    const morph = (\n      /** @type {any} */\n      (_a = this.ctx) == null ? void 0 : _a.morphTypeChange\n    );\n    const morphActive = !!morph && typeof morph.isActive === \"function\" && morph.isActive() && typeof morph.getInitialPathAt === \"function\";\n    const morphDur = morphActive ? morph.getSpeed() : 0;\n    this._morphLeafIndex = 0;\n    const prev = mode === \"update\" ? (\n      /** @type {any} */\n      this.ctx._sunburstPrevGeoms\n    ) : null;\n    this._nodesAll.forEach((node) => {\n      if (node._show) {\n        const target = {\n          a0: node._a0,\n          a1: node._a1,\n          iR: node._iR,\n          oR: node._oR\n        };\n        if (!node._el) node._el = this._createArcEl(node);\n        const morphFrom = morphActive ? this._morphSourceFor(node) : null;\n        if (morphFrom && morphDur > 0) {\n          this._morphArcFrom(node, morphFrom, target, morphDur, gen);\n        } else if ((mode === \"intro\" || morphActive) && dur > 0) {\n          this._sweepArc(node, target, morphActive ? morphDur : dur, gen);\n        } else {\n          let from;\n          let isNew = false;\n          if (node._cur) {\n            from = node._cur;\n          } else if (prev && prev.get(node._key)) {\n            from = prev.get(node._key);\n          } else {\n            const mid = (target.a0 + target.a1) / 2;\n            from = { a0: mid, a1: mid, iR: target.iR, oR: target.iR };\n            isNew = true;\n          }\n          this._animateArc(node, from, target, dur, false, isNew, gen);\n        }\n      } else if (node._el && node._cur) {\n        const mid = (node._cur.a0 + node._cur.a1) / 2;\n        const target = { a0: mid, a1: mid, iR: node._cur.iR, oR: node._cur.iR };\n        this._animateArc(node, node._cur, target, dur, true, false, gen);\n      }\n    });\n    const geoms = /* @__PURE__ */ new Map();\n    this._nodesAll.forEach((n2) => {\n      if (n2._show) {\n        geoms.set(n2._key, { a0: n2._a0, a1: n2._a1, iR: n2._iR, oR: n2._oR });\n      }\n    });\n    this.ctx._sunburstPrevGeoms = geoms;\n    this._renderLabels(dur);\n  }\n  /**\n   * The captured mark this leaf should unroll from, or null when the node is\n   * the outgoing chart had nothing to give it.\n   *\n   * When both charts carry branch keys the pairing is by identity, so EVERY\n   * ring finds the tile that stood for the same branch and the inner rings\n   * unroll instead of appearing from nothing.\n   *\n   * Without keys (a flat treemap, or an older config) only leaves pair, and\n   * they consume the captured paths in draw order - the order the outgoing\n   * renderer laid its own marks out in, so tile k pairs with leaf k.\n   *\n   * @param {any} node\n   * @returns {string | null}\n   */\n  _morphSourceFor(node) {\n    const ctx = (\n      /** @type {any} */\n      this.ctx\n    );\n    const morph = ctx && ctx.morphTypeChange;\n    if (!morph) return null;\n    if (typeof morph.hasKeyedMarks === \"function\" && morph.hasKeyedMarks() && typeof morph.getInitialPathForKey === \"function\") {\n      return morph.getInitialPathForKey(morphKey(node._key));\n    }\n    if (node.children && node.children.length) return null;\n    return morph.getInitialPathAt(this._morphLeafIndex++);\n  }\n  /**\n   * Unroll an arc from an arbitrary captured shape.\n   *\n   * `_animateArc` interpolates arc PARAMETERS (angles and radii), which cannot\n   * express a rectangle, so this one tweens the path data itself through\n   * Animations.morphSVG - the same call every other morphing renderer makes,\n   * which already selects the polygon-resample algorithm while a cross-type\n   * morph is active.\n   *\n   * @param {any} node\n   * @param {string} fromD\n   * @param {{a0:number,a1:number,iR:number,oR:number}} target\n   * @param {number} dur\n   * @param {number} gen\n   */\n  _morphArcFrom(node, fromD, target, dur, gen) {\n    const el = node._el;\n    const toD = this._arcPath(\n      target.iR,\n      target.oR,\n      target.a0,\n      target.a1,\n      this.cfg.borderRadius\n    );\n    el.node.style.display = \"\";\n    el.attr({ d: fromD, opacity: 1 });\n    node._cur = target;\n    if (this._zoomGen !== gen) return;\n    new Animations(\n      this.w,\n      /** @type {any} */\n      this.ctx\n    ).morphSVG(\n      el,\n      0,\n      // Not a (series, point) index: an arc has no j, and passing a number here\n      // would make morphSVG treat it as the last point of a series and fire the\n      // chart's animation-completed hook.\n      /** @type {any} */\n      null,\n      node._color,\n      fromD,\n      toD,\n      dur,\n      0\n    );\n  }\n  /**\n   * Pie/donut-style intro: a clock sweep from startAngle to endAngle. Each\n   * arc's end angle is clamped to the sweep line, so arcs appear in angular\n   * order and grow until complete — the whole hierarchy unwipes together.\n   * @param {any} node\n   * @param {{a0:number,a1:number,iR:number,oR:number}} target\n   * @param {number} dur\n   * @param {number} gen  layout generation; frames stop once superseded\n   */\n  _sweepArc(node, target, dur, gen) {\n    const el = node._el;\n    const br = this.cfg.borderRadius;\n    const s0 = this.startAngle;\n    const s1 = this.endAngle;\n    el.node.style.display = \"\";\n    el.attr({ d: \"\", opacity: 1 });\n    el.animate(dur).during((pos) => {\n      if (this._zoomGen !== gen) return;\n      const sweep = s0 + (s1 - s0) * pos;\n      if (sweep <= target.a0 + 0.01) {\n        el.attr({ d: \"\" });\n        return;\n      }\n      const a1 = Math.min(target.a1, sweep);\n      el.attr({ d: this._arcPath(target.iR, target.oR, target.a0, a1, br) });\n      node._cur = { a0: target.a0, a1, iR: target.iR, oR: target.oR };\n    }).after(() => {\n      if (this._zoomGen !== gen) return;\n      node._cur = target;\n    });\n  }\n  /**\n   * @param {any} node\n   * @returns {any} svg.js path element\n   */\n  _createArcEl(node) {\n    const path = this._graphics.drawPath({\n      d: \"\",\n      fill: node._color,\n      stroke: this.strokeColor,\n      strokeWidth: this.strokeWidth,\n      fillOpacity: 1,\n      classes: \"apexcharts-sunburst-arc\"\n    });\n    const el = path.node;\n    el.setAttribute(\"data:name\", node.name);\n    el.setAttribute(\"data:value\", String(node.value));\n    el.setAttribute(\"data:key\", morphKey(node._key));\n    el.setAttribute(\n      \"data:leaf\",\n      String(!(node.children && node.children.length))\n    );\n    this._attachTooltip(el, node);\n    if (Environment.isBrowser()) {\n      el.addEventListener(\"click\", () => this._zoomTo(node));\n      el.style.cursor = \"pointer\";\n    }\n    this._ringsG.add(path);\n    return path;\n  }\n  /**\n   * @param {any} node\n   * @param {{a0:number,a1:number,iR:number,oR:number}} from\n   * @param {{a0:number,a1:number,iR:number,oR:number}} to\n   * @param {number} dur\n   * @param {boolean} hide    shrink + fade out, then hide\n   * @param {boolean} fadeIn  fade 0 -> 1 (new arcs only; morphs stay opaque)\n   * @param {number} gen  layout generation; frames stop once superseded\n   */\n  _animateArc(node, from, to, dur, hide, fadeIn2, gen) {\n    const el = node._el;\n    const br = this.cfg.borderRadius;\n    el.attr({ fill: node._color });\n    if (dur === 0) {\n      el.attr({ d: this._arcPath(to.iR, to.oR, to.a0, to.a1, br), opacity: hide ? 0 : 1 });\n      el.node.style.display = hide ? \"none\" : \"\";\n      node._cur = hide ? null : to;\n      return;\n    }\n    el.node.style.display = \"\";\n    const startOp = hide ? Number(el.attr(\"opacity\")) || 1 : fadeIn2 ? 0 : 1;\n    const endOp = hide ? 0 : 1;\n    el.attr({ opacity: startOp });\n    el.animate(dur).during((pos) => {\n      if (this._zoomGen !== gen) return;\n      const a0 = lerp(from.a0, to.a0, pos);\n      const a1 = lerp(from.a1, to.a1, pos);\n      const iR = lerp(from.iR, to.iR, pos);\n      const oR = lerp(from.oR, to.oR, pos);\n      el.attr({\n        d: this._arcPath(iR, oR, a0, a1, br),\n        opacity: lerp(startOp, endOp, pos)\n      });\n      node._cur = { a0, a1, iR, oR };\n    }).after(() => {\n      if (this._zoomGen !== gen) return;\n      if (hide) {\n        el.node.style.display = \"none\";\n        node._cur = null;\n      } else {\n        node._cur = to;\n      }\n    });\n  }\n  // ---------------------------------------------------------------- labels\n  /**\n   * Labels are overlays on animated paths, so they reveal gradually AFTER the\n   * arcs settle (repo convention: overlays never pop in over a moving path).\n   * @param {number} dur  arc animation duration (0 = instant labels)\n   */\n  _renderLabels(dur) {\n    const labelsG = this._labelsG;\n    while (labelsG.node.firstChild) labelsG.node.removeChild(labelsG.node.firstChild);\n    if (!this.cfg.dataLabels.show) return;\n    this._nodesAll.forEach((node) => {\n      if (!node._show) return;\n      if (node._a1 - node._a0 < this.cfg.dataLabels.minAngleToShow) return;\n      this._renderCurvedLabel(node);\n    });\n    if (dur > 0) {\n      labelsG.attr({ opacity: 0 });\n      labelsG.animate(250, dur).attr({ opacity: 1 });\n    } else {\n      labelsG.attr({ opacity: 1 });\n    }\n  }\n  /**\n   * Curved label along the arc's mid-radius (flipped on the bottom half so it\n   * stays upright). Raw SVG <textPath> — svg.js has no first-class textPath.\n   * @param {any} node\n   */\n  _renderCurvedLabel(node) {\n    if (!Environment.isBrowser()) return;\n    const style = this.cfg.dataLabels.style;\n    const w2 = this.w;\n    const r2 = (node._iR + node._oR) / 2;\n    const mid = (node._a0 + node._a1) / 2;\n    const flip = mid > 90 && mid < 270;\n    const padDeg = Math.min(r2 > 0 ? 4 / r2 * R2D : 0, (node._a1 - node._a0) / 2);\n    const from = flip ? node._a1 - padDeg : node._a0 + padDeg;\n    const to = flip ? node._a0 + padDeg : node._a1 - padDeg;\n    const p1 = this._ptAt(r2, from);\n    const p2 = this._ptAt(r2, to);\n    const largeArc = Math.abs(to - from) > 180 ? 1 : 0;\n    const sweep = flip ? 0 : 1;\n    const id = `apx-sb-lbl-${w2.globals.cuid}-${this._lblSeq++}`;\n    const guide = BrowserAPIs.createElementNS(SVGNS, \"path\");\n    guide.setAttribute(\"id\", id);\n    guide.setAttribute(\n      \"d\",\n      `M ${p1.x} ${p1.y} A ${r2} ${r2} 0 ${largeArc} ${sweep} ${p2.x} ${p2.y}`\n    );\n    guide.setAttribute(\"fill\", \"none\");\n    guide.setAttribute(\"stroke\", \"none\");\n    const colors = style.colors;\n    const fill = (Array.isArray(colors) ? colors[0] : colors) || \"#fff\";\n    const text = BrowserAPIs.createElementNS(SVGNS, \"text\");\n    text.setAttribute(\"font-size\", style.fontSize || \"12px\");\n    if (style.fontFamily) text.setAttribute(\"font-family\", style.fontFamily);\n    text.setAttribute(\"font-weight\", String(style.fontWeight || 400));\n    text.setAttribute(\"fill\", fill);\n    text.setAttribute(\"dominant-baseline\", \"central\");\n    text.style.pointerEvents = \"none\";\n    const tp = BrowserAPIs.createElementNS(SVGNS, \"textPath\");\n    tp.setAttribute(\"href\", \"#\" + id);\n    tp.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\", \"#\" + id);\n    tp.setAttribute(\"startOffset\", \"50%\");\n    tp.setAttribute(\"text-anchor\", \"middle\");\n    tp.textContent = this._truncate(node.name, r2, node._a1 - node._a0, style.fontSize);\n    text.appendChild(tp);\n    this._labelsG.node.appendChild(guide);\n    this._labelsG.node.appendChild(text);\n  }\n  /**\n   * Trim a label to the arc length available at its radius.\n   * @param {string} name\n   * @param {number} r\n   * @param {number} spanDeg\n   * @param {string} fontSize\n   * @returns {string}\n   */\n  _truncate(name2, r2, spanDeg, fontSize) {\n    const arcLen = r2 * spanDeg * D2R - 8;\n    const charW = (parseFloat(fontSize) || 12) * 0.58;\n    const maxChars = Math.floor(arcLen / charW);\n    if (maxChars >= name2.length) return name2;\n    if (maxChars <= 1) return \"\";\n    return name2.slice(0, Math.max(1, maxChars - 1)) + \"…\";\n  }\n  // ----------------------------------------------------------------- zoom\n  /**\n   * Focus a node (zoom in), or zoom out one level when the current focus (the\n   * innermost ring) is clicked.\n   * @param {any} node\n   */\n  _zoomTo(node) {\n    if (this.cfg.zoomOnClick === false) return;\n    const nextFocus = node === this._focus ? node._parent || null : node;\n    if (nextFocus === this._focus) return;\n    this._focus = nextFocus && !(nextFocus.children && nextFocus.children.length) ? nextFocus._parent || null : nextFocus;\n    this._relayout(this._focus);\n    this._applyLayout(\"zoom\");\n    this._renderBreadcrumb();\n  }\n  /** Root -> focus chain of nodes. */\n  _focusChain() {\n    const chain = [];\n    let n2 = this._focus;\n    while (n2) {\n      chain.unshift(n2);\n      n2 = n2._parent;\n    }\n    return chain;\n  }\n  /**\n   * Minimal self-contained breadcrumb (reuses the shared `.apexcharts-breadcrumb`\n   * CSS classes, but does NOT depend on the drilldown feature).\n   */\n  _renderBreadcrumb() {\n    if (!Environment.isBrowser()) return;\n    const w2 = this.w;\n    const elWrap = w2.dom.elWrap;\n    if (!elWrap) return;\n    const existing = elWrap.querySelector(\".apexcharts-breadcrumb\");\n    if (existing && existing.parentNode) existing.parentNode.removeChild(existing);\n    if (!this._focus) return;\n    const nav = BrowserAPIs.createElementNS(XHTML, \"nav\");\n    nav.setAttribute(\"class\", \"apexcharts-breadcrumb\");\n    nav.setAttribute(\"aria-label\", \"Sunburst breadcrumb\");\n    nav.style.position = \"absolute\";\n    nav.style.top = \"0px\";\n    nav.style.left = \"0px\";\n    const crumbs = [{ name: \"All\", node: null }].concat(\n      this._focusChain().map((n2) => ({ name: n2.name, node: n2 }))\n    );\n    crumbs.forEach((crumb, i2) => {\n      if (i2 > 0) {\n        const sep = BrowserAPIs.createElementNS(XHTML, \"span\");\n        sep.setAttribute(\"class\", \"apexcharts-breadcrumb-separator\");\n        sep.textContent = \" / \";\n        nav.appendChild(sep);\n      }\n      const isCurrent = i2 === crumbs.length - 1;\n      if (isCurrent) {\n        const cur = BrowserAPIs.createElementNS(XHTML, \"span\");\n        cur.setAttribute(\n          \"class\",\n          \"apexcharts-breadcrumb-item apexcharts-breadcrumb-current\"\n        );\n        cur.textContent = crumb.name;\n        nav.appendChild(cur);\n      } else {\n        const btn = BrowserAPIs.createElementNS(XHTML, \"button\");\n        btn.setAttribute(\"type\", \"button\");\n        btn.setAttribute(\"class\", \"apexcharts-breadcrumb-item\");\n        if (i2 === 0) {\n          const arrow = BrowserAPIs.createElementNS(XHTML, \"span\");\n          arrow.setAttribute(\"class\", \"apexcharts-breadcrumb-arrow\");\n          arrow.textContent = \"←\";\n          btn.appendChild(arrow);\n        }\n        const text = BrowserAPIs.createElementNS(XHTML, \"span\");\n        text.setAttribute(\"class\", \"apexcharts-breadcrumb-label\");\n        text.textContent = crumb.name;\n        btn.appendChild(text);\n        btn.addEventListener(\"click\", () => {\n          this._focus = crumb.node;\n          this._relayout(this._focus);\n          this._applyLayout(\"zoom\");\n          this._renderBreadcrumb();\n        });\n        nav.appendChild(btn);\n      }\n    });\n    elWrap.appendChild(nav);\n    this._avoidChromeOverlap(nav);\n  }\n  /**\n   * The breadcrumb is an absolute overlay at top-left, so it can sit on top of\n   * a left-aligned title (or subtitle). After mounting, push it below any chart\n   * chrome it intersects. (Duplicated from drilldown's Breadcrumb on purpose —\n   * sunburst must not import the drilldown feature.)\n   * @param {any} nav\n   */\n  /**\n   * Shared with the treemap - see charts/common/Breadcrumb.\n   * @param {any} nav\n   */\n  _avoidChromeOverlap(nav) {\n    avoidChromeOverlap(this.w, nav);\n  }\n  // ------------------------------------------------------------ geometry\n  /**\n   * @param {number} r\n   * @param {number} deg  0 = top, clockwise\n   * @returns {{x: number, y: number}}\n   */\n  _ptAt(r2, deg) {\n    return {\n      x: this.centerX + r2 * Math.cos((deg - 90) * D2R),\n      y: this.centerY + r2 * Math.sin((deg - 90) * D2R)\n    };\n  }\n  /**\n   * Rounded donut-segment path (inner radius always > 0). Applies `spacing`\n   * (angular gap) and `borderRadius` (corner rounding), both clamped so a thin\n   * arc never inverts.\n   * @param {number} iR\n   * @param {number} oR\n   * @param {number} a0\n   * @param {number} a1\n   * @param {number} borderRadius\n   * @returns {string}\n   */\n  _arcPath(iR, oR, a0, a1, borderRadius) {\n    if (oR <= iR + 0.01) return \"\";\n    let spanDeg = a1 - a0;\n    const spacing = this.cfg.spacing;\n    if (spacing > 0 && spanDeg > 0 && oR > 0) {\n      const gapDeg = spacing / oR * R2D;\n      const inset = Math.min(gapDeg / 2, Math.max(0, spanDeg / 2 - 0.25));\n      a0 += inset;\n      a1 -= inset;\n      spanDeg = a1 - a0;\n    }\n    if (spanDeg <= 0) return \"\";\n    const spanRad = spanDeg * D2R;\n    const cx = this.centerX;\n    const cy = this.centerY;\n    let r2 = borderRadius;\n    r2 = Math.min(r2, spanRad * iR / 2, spanRad * oR / 2, (oR - iR) / 2);\n    if (!(r2 > 0.5)) {\n      return sharpDonutSegmentPath({ cx, cy, rIn: iR, rOut: oR, a0, a1, spanDeg });\n    }\n    return roundedDonutSegmentPath({ cx, cy, rIn: iR, rOut: oR, a0, a1, r: r2, spanDeg });\n  }\n  // ------------------------------------------------------------- tooltip\n  /** @returns {any} */\n  _tip() {\n    if (!this._tooltipEl) {\n      this._tooltipEl = this.w.dom.baseEl.querySelector(\".apexcharts-tooltip\");\n    }\n    return this._tooltipEl;\n  }\n  /**\n   * @param {any} el\n   * @param {any} node\n   */\n  _attachTooltip(el, node) {\n    if (!this.w.config.tooltip.enabled || !Environment.isBrowser()) return;\n    el.addEventListener(\n      \"mouseenter\",\n      (e2) => this._showTooltip(e2, node)\n    );\n    el.addEventListener(\n      \"mousemove\",\n      (e2) => this._positionTooltip(e2)\n    );\n    el.addEventListener(\"mouseleave\", () => this._hideTooltip());\n  }\n  /**\n   * @param {MouseEvent} e\n   * @param {any} node\n   */\n  _showTooltip(e2, node) {\n    const t2 = this._tip();\n    if (!t2) return;\n    const w2 = this.w;\n    const pctTotal = (node.value / this.total * 100).toFixed(1);\n    const parentVal = node._parent ? node._parent.value : this.total;\n    const pctParent = parentVal > 0 ? (node.value / parentVal * 100).toFixed(1) : pctTotal;\n    const groupBg = w2.config.tooltip.fillSeriesColor ? `background-color:${node._color};` : \"\";\n    t2.innerHTML = `<div class=\"apexcharts-tooltip-series-group apexcharts-active\" style=\"display:flex;${groupBg}\"><span class=\"apexcharts-tooltip-marker\" style=\"background-color:${node._color}\"></span><div class=\"apexcharts-tooltip-text\"><div class=\"apexcharts-tooltip-y-group\"><span class=\"apexcharts-tooltip-text-y-label\">${node.name}: </span><span class=\"apexcharts-tooltip-text-y-value\">${node.value} (${pctParent}% of parent, ${pctTotal}% of total)</span></div></div></div>`;\n    t2.classList.add(\"apexcharts-active\");\n    t2.style.opacity = \"1\";\n    this._positionTooltip(e2);\n  }\n  /**\n   * Position beside the cursor, flipping to the opposite side when the box\n   * would overflow the chart wrap, and clamping inside it either way.\n   * @param {MouseEvent} e\n   */\n  _positionTooltip(e2) {\n    const t2 = this._tip();\n    if (!t2) return;\n    const rect = this.w.dom.elWrap.getBoundingClientRect();\n    const tw = t2.offsetWidth;\n    const th = t2.offsetHeight;\n    const pad = 12;\n    let x = e2.clientX - rect.left + pad;\n    if (x + tw > rect.width) x = e2.clientX - rect.left - tw - pad;\n    x = Math.max(0, Math.min(x, rect.width - tw));\n    let y = e2.clientY - rect.top + pad;\n    if (y + th > rect.height) y = e2.clientY - rect.top - th - pad;\n    y = Math.max(0, Math.min(y, rect.height - th));\n    t2.style.left = x + \"px\";\n    t2.style.top = y + \"px\";\n  }\n  _hideTooltip() {\n    const t2 = this._tip();\n    if (!t2) return;\n    t2.classList.remove(\"apexcharts-active\");\n    t2.style.opacity = \"0\";\n  }\n  // --------------------------------------------------------------- utils\n  /**\n   * @param {string|number} size\n   * @param {number} max\n   * @returns {number}\n   */\n  _parseSize(size, max) {\n    if (typeof size === \"number\") return size;\n    const s2 = String(size).trim();\n    if (s2.endsWith(\"%\")) return parseFloat(s2) / 100 * max;\n    const n2 = parseFloat(s2);\n    return isNaN(n2) ? 0.15 * max : n2;\n  }\n  /**\n   * Blend a hex colour toward white by `amount` (0..1). Non-hex returned as-is.\n   * @param {string} color\n   * @param {number} amount\n   * @returns {string}\n   */\n  _lighten(color, amount) {\n    if (typeof color !== \"string\" || color[0] !== \"#\") return color;\n    let hex = color.slice(1);\n    if (hex.length === 3) {\n      hex = hex.split(\"\").map((c2) => c2 + c2).join(\"\");\n    }\n    if (hex.length !== 6) return color;\n    const num = parseInt(hex, 16);\n    if (isNaN(num)) return color;\n    let rC = num >> 16 & 255;\n    let gC = num >> 8 & 255;\n    let bC = num & 255;\n    rC = Math.round(rC + (255 - rC) * amount);\n    gC = Math.round(gC + (255 - gC) * amount);\n    bC = Math.round(bC + (255 - bC) * amount);\n    return \"#\" + ((1 << 24) + (rC << 16) + (gC << 8) + bC).toString(16).slice(1);\n  }\n}\nApexCharts.use({\n  line: Line,\n  area: Line,\n  scatter: Line,\n  bubble: Line,\n  rangeArea: Line,\n  bar: Bar,\n  column: Bar,\n  barStacked: BarStacked,\n  rangeBar: RangeBar,\n  candlestick: BoxCandleStick,\n  boxPlot: BoxCandleStick,\n  violin: Violin,\n  pie: Pie,\n  donut: Pie,\n  polarArea: Pie,\n  radialBar: Radial,\n  radar: Radar,\n  heatmap: HeatMap,\n  treemap: TreemapChart,\n  unit: Unit,\n  sunburst: SunburstChart\n});\nexport {\n  ApexCharts as default\n};\n","//---------------------------------------------------------------------\n//\n// QR Code Generator for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n//  http://www.opensource.org/licenses/mit-license.php\n//\n// The word 'QR Code' is registered trademark of\n// DENSO WAVE INCORPORATED\n//  http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n\n//---------------------------------------------------------------------\n// qrcode\n//---------------------------------------------------------------------\n\n/**\n * qrcode\n * @param typeNumber 1 to 40\n * @param errorCorrectionLevel 'L','M','Q','H'\n */\nexport const qrcode = function(typeNumber, errorCorrectionLevel) {\n\n  const PAD0 = 0xEC;\n  const PAD1 = 0x11;\n\n  let _typeNumber = typeNumber;\n  const _errorCorrectionLevel = QRErrorCorrectionLevel[errorCorrectionLevel];\n  let _modules = null;\n  let _moduleCount = 0;\n  let _dataCache = null;\n  const _dataList = [];\n\n  const _this = {};\n\n  const makeImpl = function(test, maskPattern) {\n\n    _moduleCount = _typeNumber * 4 + 17;\n    _modules = function(moduleCount) {\n      const modules = new Array(moduleCount);\n      for (let row = 0; row < moduleCount; row += 1) {\n        modules[row] = new Array(moduleCount);\n        for (let col = 0; col < moduleCount; col += 1) {\n          modules[row][col] = null;\n        }\n      }\n      return modules;\n    }(_moduleCount);\n\n    setupPositionProbePattern(0, 0);\n    setupPositionProbePattern(_moduleCount - 7, 0);\n    setupPositionProbePattern(0, _moduleCount - 7);\n    setupPositionAdjustPattern();\n    setupTimingPattern();\n    setupTypeInfo(test, maskPattern);\n\n    if (_typeNumber >= 7) {\n      setupTypeNumber(test);\n    }\n\n    if (_dataCache == null) {\n      _dataCache = createData(_typeNumber, _errorCorrectionLevel, _dataList);\n    }\n\n    mapData(_dataCache, maskPattern);\n  };\n\n  const setupPositionProbePattern = function(row, col) {\n\n    for (let r = -1; r <= 7; r += 1) {\n\n      if (row + r <= -1 || _moduleCount <= row + r) continue;\n\n      for (let c = -1; c <= 7; c += 1) {\n\n        if (col + c <= -1 || _moduleCount <= col + c) continue;\n\n        if ( (0 <= r && r <= 6 && (c == 0 || c == 6) )\n            || (0 <= c && c <= 6 && (r == 0 || r == 6) )\n            || (2 <= r && r <= 4 && 2 <= c && c <= 4) ) {\n          _modules[row + r][col + c] = true;\n        } else {\n          _modules[row + r][col + c] = false;\n        }\n      }\n    }\n  };\n\n  const getBestMaskPattern = function() {\n\n    let minLostPoint = 0;\n    let pattern = 0;\n\n    for (let i = 0; i < 8; i += 1) {\n\n      makeImpl(true, i);\n\n      const lostPoint = QRUtil.getLostPoint(_this);\n\n      if (i == 0 || minLostPoint > lostPoint) {\n        minLostPoint = lostPoint;\n        pattern = i;\n      }\n    }\n\n    return pattern;\n  };\n\n  const setupTimingPattern = function() {\n\n    for (let r = 8; r < _moduleCount - 8; r += 1) {\n      if (_modules[r][6] != null) {\n        continue;\n      }\n      _modules[r][6] = (r % 2 == 0);\n    }\n\n    for (let c = 8; c < _moduleCount - 8; c += 1) {\n      if (_modules[6][c] != null) {\n        continue;\n      }\n      _modules[6][c] = (c % 2 == 0);\n    }\n  };\n\n  const setupPositionAdjustPattern = function() {\n\n    const pos = QRUtil.getPatternPosition(_typeNumber);\n\n    for (let i = 0; i < pos.length; i += 1) {\n\n      for (let j = 0; j < pos.length; j += 1) {\n\n        const row = pos[i];\n        const col = pos[j];\n\n        if (_modules[row][col] != null) {\n          continue;\n        }\n\n        for (let r = -2; r <= 2; r += 1) {\n\n          for (let c = -2; c <= 2; c += 1) {\n\n            if (r == -2 || r == 2 || c == -2 || c == 2\n                || (r == 0 && c == 0) ) {\n              _modules[row + r][col + c] = true;\n            } else {\n              _modules[row + r][col + c] = false;\n            }\n          }\n        }\n      }\n    }\n  };\n\n  const setupTypeNumber = function(test) {\n\n    const bits = QRUtil.getBCHTypeNumber(_typeNumber);\n\n    for (let i = 0; i < 18; i += 1) {\n      const mod = (!test && ( (bits >> i) & 1) == 1);\n      _modules[Math.floor(i / 3)][i % 3 + _moduleCount - 8 - 3] = mod;\n    }\n\n    for (let i = 0; i < 18; i += 1) {\n      const mod = (!test && ( (bits >> i) & 1) == 1);\n      _modules[i % 3 + _moduleCount - 8 - 3][Math.floor(i / 3)] = mod;\n    }\n  };\n\n  const setupTypeInfo = function(test, maskPattern) {\n\n    const data = (_errorCorrectionLevel << 3) | maskPattern;\n    const bits = QRUtil.getBCHTypeInfo(data);\n\n    // vertical\n    for (let i = 0; i < 15; i += 1) {\n\n      const mod = (!test && ( (bits >> i) & 1) == 1);\n\n      if (i < 6) {\n        _modules[i][8] = mod;\n      } else if (i < 8) {\n        _modules[i + 1][8] = mod;\n      } else {\n        _modules[_moduleCount - 15 + i][8] = mod;\n      }\n    }\n\n    // horizontal\n    for (let i = 0; i < 15; i += 1) {\n\n      const mod = (!test && ( (bits >> i) & 1) == 1);\n\n      if (i < 8) {\n        _modules[8][_moduleCount - i - 1] = mod;\n      } else if (i < 9) {\n        _modules[8][15 - i - 1 + 1] = mod;\n      } else {\n        _modules[8][15 - i - 1] = mod;\n      }\n    }\n\n    // fixed module\n    _modules[_moduleCount - 8][8] = (!test);\n  };\n\n  const mapData = function(data, maskPattern) {\n\n    let inc = -1;\n    let row = _moduleCount - 1;\n    let bitIndex = 7;\n    let byteIndex = 0;\n    const maskFunc = QRUtil.getMaskFunction(maskPattern);\n\n    for (let col = _moduleCount - 1; col > 0; col -= 2) {\n\n      if (col == 6) col -= 1;\n\n      while (true) {\n\n        for (let c = 0; c < 2; c += 1) {\n\n          if (_modules[row][col - c] == null) {\n\n            let dark = false;\n\n            if (byteIndex < data.length) {\n              dark = ( ( (data[byteIndex] >>> bitIndex) & 1) == 1);\n            }\n\n            const mask = maskFunc(row, col - c);\n\n            if (mask) {\n              dark = !dark;\n            }\n\n            _modules[row][col - c] = dark;\n            bitIndex -= 1;\n\n            if (bitIndex == -1) {\n              byteIndex += 1;\n              bitIndex = 7;\n            }\n          }\n        }\n\n        row += inc;\n\n        if (row < 0 || _moduleCount <= row) {\n          row -= inc;\n          inc = -inc;\n          break;\n        }\n      }\n    }\n  };\n\n  const createBytes = function(buffer, rsBlocks) {\n\n    let offset = 0;\n\n    let maxDcCount = 0;\n    let maxEcCount = 0;\n\n    const dcdata = new Array(rsBlocks.length);\n    const ecdata = new Array(rsBlocks.length);\n\n    for (let r = 0; r < rsBlocks.length; r += 1) {\n\n      const dcCount = rsBlocks[r].dataCount;\n      const ecCount = rsBlocks[r].totalCount - dcCount;\n\n      maxDcCount = Math.max(maxDcCount, dcCount);\n      maxEcCount = Math.max(maxEcCount, ecCount);\n\n      dcdata[r] = new Array(dcCount);\n\n      for (let i = 0; i < dcdata[r].length; i += 1) {\n        dcdata[r][i] = 0xff & buffer.getBuffer()[i + offset];\n      }\n      offset += dcCount;\n\n      const rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);\n      const rawPoly = qrPolynomial(dcdata[r], rsPoly.getLength() - 1);\n\n      const modPoly = rawPoly.mod(rsPoly);\n      ecdata[r] = new Array(rsPoly.getLength() - 1);\n      for (let i = 0; i < ecdata[r].length; i += 1) {\n        const modIndex = i + modPoly.getLength() - ecdata[r].length;\n        ecdata[r][i] = (modIndex >= 0)? modPoly.getAt(modIndex) : 0;\n      }\n    }\n\n    let totalCodeCount = 0;\n    for (let i = 0; i < rsBlocks.length; i += 1) {\n      totalCodeCount += rsBlocks[i].totalCount;\n    }\n\n    const data = new Array(totalCodeCount);\n    let index = 0;\n\n    for (let i = 0; i < maxDcCount; i += 1) {\n      for (let r = 0; r < rsBlocks.length; r += 1) {\n        if (i < dcdata[r].length) {\n          data[index] = dcdata[r][i];\n          index += 1;\n        }\n      }\n    }\n\n    for (let i = 0; i < maxEcCount; i += 1) {\n      for (let r = 0; r < rsBlocks.length; r += 1) {\n        if (i < ecdata[r].length) {\n          data[index] = ecdata[r][i];\n          index += 1;\n        }\n      }\n    }\n\n    return data;\n  };\n\n  const createData = function(typeNumber, errorCorrectionLevel, dataList) {\n\n    const rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectionLevel);\n\n    const buffer = qrBitBuffer();\n\n    for (let i = 0; i < dataList.length; i += 1) {\n      const data = dataList[i];\n      buffer.put(data.getMode(), 4);\n      buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) );\n      data.write(buffer);\n    }\n\n    // calc num max data.\n    let totalDataCount = 0;\n    for (let i = 0; i < rsBlocks.length; i += 1) {\n      totalDataCount += rsBlocks[i].dataCount;\n    }\n\n    if (buffer.getLengthInBits() > totalDataCount * 8) {\n      throw 'code length overflow. ('\n        + buffer.getLengthInBits()\n        + '>'\n        + totalDataCount * 8\n        + ')';\n    }\n\n    // end code\n    if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {\n      buffer.put(0, 4);\n    }\n\n    // padding\n    while (buffer.getLengthInBits() % 8 != 0) {\n      buffer.putBit(false);\n    }\n\n    // padding\n    while (true) {\n\n      if (buffer.getLengthInBits() >= totalDataCount * 8) {\n        break;\n      }\n      buffer.put(PAD0, 8);\n\n      if (buffer.getLengthInBits() >= totalDataCount * 8) {\n        break;\n      }\n      buffer.put(PAD1, 8);\n    }\n\n    return createBytes(buffer, rsBlocks);\n  };\n\n  _this.addData = function(data, mode) {\n\n    mode = mode || 'Byte';\n\n    let newData = null;\n\n    switch(mode) {\n    case 'Numeric' :\n      newData = qrNumber(data);\n      break;\n    case 'Alphanumeric' :\n      newData = qrAlphaNum(data);\n      break;\n    case 'Byte' :\n      newData = qr8BitByte(data);\n      break;\n    case 'Kanji' :\n      newData = qrKanji(data);\n      break;\n    default :\n      throw 'mode:' + mode;\n    }\n\n    _dataList.push(newData);\n    _dataCache = null;\n  };\n\n  _this.isDark = function(row, col) {\n    if (row < 0 || _moduleCount <= row || col < 0 || _moduleCount <= col) {\n      throw row + ',' + col;\n    }\n    return _modules[row][col];\n  };\n\n  _this.getModuleCount = function() {\n    return _moduleCount;\n  };\n\n  _this.make = function() {\n    if (_typeNumber < 1) {\n      let typeNumber = 1;\n\n      for (; typeNumber < 40; typeNumber++) {\n        const rsBlocks = QRRSBlock.getRSBlocks(typeNumber, _errorCorrectionLevel);\n        const buffer = qrBitBuffer();\n\n        for (let i = 0; i < _dataList.length; i++) {\n          const data = _dataList[i];\n          buffer.put(data.getMode(), 4);\n          buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) );\n          data.write(buffer);\n        }\n\n        let totalDataCount = 0;\n        for (let i = 0; i < rsBlocks.length; i++) {\n          totalDataCount += rsBlocks[i].dataCount;\n        }\n\n        if (buffer.getLengthInBits() <= totalDataCount * 8) {\n          break;\n        }\n      }\n\n      _typeNumber = typeNumber;\n    }\n\n    makeImpl(false, getBestMaskPattern() );\n  };\n\n  _this.createTableTag = function(cellSize, margin) {\n\n    cellSize = cellSize || 2;\n    margin = (typeof margin == 'undefined')? cellSize * 4 : margin;\n\n    let qrHtml = '';\n\n    qrHtml += '<table style=\"';\n    qrHtml += ' border-width: 0px; border-style: none;';\n    qrHtml += ' border-collapse: collapse;';\n    qrHtml += ' padding: 0px; margin: ' + margin + 'px;';\n    qrHtml += '\">';\n    qrHtml += '<tbody>';\n\n    for (let r = 0; r < _this.getModuleCount(); r += 1) {\n\n      qrHtml += '<tr>';\n\n      for (let c = 0; c < _this.getModuleCount(); c += 1) {\n        qrHtml += '<td style=\"';\n        qrHtml += ' border-width: 0px; border-style: none;';\n        qrHtml += ' border-collapse: collapse;';\n        qrHtml += ' padding: 0px; margin: 0px;';\n        qrHtml += ' width: ' + cellSize + 'px;';\n        qrHtml += ' height: ' + cellSize + 'px;';\n        qrHtml += ' background-color: ';\n        qrHtml += _this.isDark(r, c)? '#000000' : '#ffffff';\n        qrHtml += ';';\n        qrHtml += '\"/>';\n      }\n\n      qrHtml += '</tr>';\n    }\n\n    qrHtml += '</tbody>';\n    qrHtml += '</table>';\n\n    return qrHtml;\n  };\n\n  _this.createSvgTag = function(cellSize, margin, alt, title) {\n\n    let opts = {};\n    if (typeof arguments[0] == 'object') {\n      // Called by options.\n      opts = arguments[0];\n      // overwrite cellSize and margin.\n      cellSize = opts.cellSize;\n      margin = opts.margin;\n      alt = opts.alt;\n      title = opts.title;\n    }\n\n    cellSize = cellSize || 2;\n    margin = (typeof margin == 'undefined')? cellSize * 4 : margin;\n\n    // Compose alt property surrogate\n    alt = (typeof alt === 'string') ? {text: alt} : alt || {};\n    alt.text = alt.text || null;\n    alt.id = (alt.text) ? alt.id || 'qrcode-description' : null;\n\n    // Compose title property surrogate\n    title = (typeof title === 'string') ? {text: title} : title || {};\n    title.text = title.text || null;\n    title.id = (title.text) ? title.id || 'qrcode-title' : null;\n\n    const size = _this.getModuleCount() * cellSize + margin * 2;\n    let c, mc, r, mr, qrSvg='', rect;\n\n    rect = 'l' + cellSize + ',0 0,' + cellSize +\n      ' -' + cellSize + ',0 0,-' + cellSize + 'z ';\n\n    qrSvg += '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"';\n    qrSvg += !opts.scalable ? ' width=\"' + size + 'px\" height=\"' + size + 'px\"' : '';\n    qrSvg += ' viewBox=\"0 0 ' + size + ' ' + size + '\" ';\n    qrSvg += ' preserveAspectRatio=\"xMinYMin meet\"';\n    qrSvg += (title.text || alt.text) ? ' role=\"img\" aria-labelledby=\"' +\n        escapeXml([title.id, alt.id].join(' ').trim() ) + '\"' : '';\n    qrSvg += '>';\n    qrSvg += (title.text) ? '<title id=\"' + escapeXml(title.id) + '\">' +\n        escapeXml(title.text) + '</title>' : '';\n    qrSvg += (alt.text) ? '<description id=\"' + escapeXml(alt.id) + '\">' +\n        escapeXml(alt.text) + '</description>' : '';\n    qrSvg += '<rect width=\"100%\" height=\"100%\" fill=\"white\" cx=\"0\" cy=\"0\"/>';\n    qrSvg += '<path d=\"';\n\n    for (r = 0; r < _this.getModuleCount(); r += 1) {\n      mr = r * cellSize + margin;\n      for (c = 0; c < _this.getModuleCount(); c += 1) {\n        if (_this.isDark(r, c) ) {\n          mc = c*cellSize+margin;\n          qrSvg += 'M' + mc + ',' + mr + rect;\n        }\n      }\n    }\n\n    qrSvg += '\" stroke=\"transparent\" fill=\"black\"/>';\n    qrSvg += '</svg>';\n\n    return qrSvg;\n  };\n\n  _this.createDataURL = function(cellSize, margin) {\n\n    cellSize = cellSize || 2;\n    margin = (typeof margin == 'undefined')? cellSize * 4 : margin;\n\n    const size = _this.getModuleCount() * cellSize + margin * 2;\n    const min = margin;\n    const max = size - margin;\n\n    return createDataURL(size, size, function(x, y) {\n      if (min <= x && x < max && min <= y && y < max) {\n        const c = Math.floor( (x - min) / cellSize);\n        const r = Math.floor( (y - min) / cellSize);\n        return _this.isDark(r, c)? 0 : 1;\n      } else {\n        return 1;\n      }\n    } );\n  };\n\n  _this.createImgTag = function(cellSize, margin, alt) {\n\n    cellSize = cellSize || 2;\n    margin = (typeof margin == 'undefined')? cellSize * 4 : margin;\n\n    const size = _this.getModuleCount() * cellSize + margin * 2;\n\n    let img = '';\n    img += '<img';\n    img += '\\u0020src=\"';\n    img += _this.createDataURL(cellSize, margin);\n    img += '\"';\n    img += '\\u0020width=\"';\n    img += size;\n    img += '\"';\n    img += '\\u0020height=\"';\n    img += size;\n    img += '\"';\n    if (alt) {\n      img += '\\u0020alt=\"';\n      img += escapeXml(alt);\n      img += '\"';\n    }\n    img += '/>';\n\n    return img;\n  };\n\n  const escapeXml = function(s) {\n    let escaped = '';\n    for (let i = 0; i < s.length; i += 1) {\n      const c = s.charAt(i);\n      switch(c) {\n      case '<': escaped += '&lt;'; break;\n      case '>': escaped += '&gt;'; break;\n      case '&': escaped += '&amp;'; break;\n      case '\"': escaped += '&quot;'; break;\n      default : escaped += c; break;\n      }\n    }\n    return escaped;\n  };\n\n  const _createHalfASCII = function(margin) {\n    const cellSize = 1;\n    margin = (typeof margin == 'undefined')? cellSize * 2 : margin;\n\n    const size = _this.getModuleCount() * cellSize + margin * 2;\n    const min = margin;\n    const max = size - margin;\n\n    let y, x, r1, r2, p;\n\n    const blocks = {\n      '██': '█',\n      '█ ': '▀',\n      ' █': '▄',\n      '  ': ' '\n    };\n\n    const blocksLastLineNoMargin = {\n      '██': '▀',\n      '█ ': '▀',\n      ' █': ' ',\n      '  ': ' '\n    };\n\n    let ascii = '';\n    for (y = 0; y < size; y += 2) {\n      r1 = Math.floor((y - min) / cellSize);\n      r2 = Math.floor((y + 1 - min) / cellSize);\n      for (x = 0; x < size; x += 1) {\n        p = '█';\n\n        if (min <= x && x < max && min <= y && y < max && _this.isDark(r1, Math.floor((x - min) / cellSize))) {\n          p = ' ';\n        }\n\n        if (min <= x && x < max && min <= y+1 && y+1 < max && _this.isDark(r2, Math.floor((x - min) / cellSize))) {\n          p += ' ';\n        }\n        else {\n          p += '█';\n        }\n\n        // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.\n        ascii += (margin < 1 && y+1 >= max) ? blocksLastLineNoMargin[p] : blocks[p];\n      }\n\n      ascii += '\\n';\n    }\n\n    if (size % 2 && margin > 0) {\n      return ascii.substring(0, ascii.length - size - 1) + Array(size+1).join('▀');\n    }\n\n    return ascii.substring(0, ascii.length-1);\n  };\n\n  _this.createASCII = function(cellSize, margin) {\n    cellSize = cellSize || 1;\n\n    if (cellSize < 2) {\n      return _createHalfASCII(margin);\n    }\n\n    cellSize -= 1;\n    margin = (typeof margin == 'undefined')? cellSize * 2 : margin;\n\n    const size = _this.getModuleCount() * cellSize + margin * 2;\n    const min = margin;\n    const max = size - margin;\n\n    let y, x, r, p;\n\n    const white = Array(cellSize+1).join('██');\n    const black = Array(cellSize+1).join('  ');\n\n    let ascii = '';\n    let line = '';\n    for (y = 0; y < size; y += 1) {\n      r = Math.floor( (y - min) / cellSize);\n      line = '';\n      for (x = 0; x < size; x += 1) {\n        p = 1;\n\n        if (min <= x && x < max && min <= y && y < max && _this.isDark(r, Math.floor((x - min) / cellSize))) {\n          p = 0;\n        }\n\n        // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.\n        line += p ? white : black;\n      }\n\n      for (r = 0; r < cellSize; r += 1) {\n        ascii += line + '\\n';\n      }\n    }\n\n    return ascii.substring(0, ascii.length-1);\n  };\n\n  _this.renderTo2dContext = function(context, cellSize) {\n    cellSize = cellSize || 2;\n    const length = _this.getModuleCount();\n    for (let row = 0; row < length; row++) {\n      for (let col = 0; col < length; col++) {\n        context.fillStyle = _this.isDark(row, col) ? 'black' : 'white';\n        context.fillRect(col * cellSize, row * cellSize, cellSize, cellSize);\n      }\n    }\n  }\n\n  return _this;\n};\n\n//---------------------------------------------------------------------\n// qrcode.stringToBytes\n//---------------------------------------------------------------------\n\nqrcode.stringToBytes = function(s) {\n  const bytes = [];\n  for (let i = 0; i < s.length; i += 1) {\n    const c = s.charCodeAt(i);\n    bytes.push(c & 0xff);\n  }\n  return bytes;\n};\n\n//---------------------------------------------------------------------\n// qrcode.createStringToBytes\n//---------------------------------------------------------------------\n\n/**\n * @param unicodeData base64 string of byte array.\n * [16bit Unicode],[16bit Bytes], ...\n * @param numChars\n */\nqrcode.createStringToBytes = function(unicodeData, numChars) {\n\n  // create conversion map.\n\n  const unicodeMap = function() {\n\n    const bin = base64DecodeInputStream(unicodeData);\n    const read = function() {\n      const b = bin.read();\n      if (b == -1) throw 'eof';\n      return b;\n    };\n\n    let count = 0;\n    const unicodeMap = {};\n    while (true) {\n      const b0 = bin.read();\n      if (b0 == -1) break;\n      const b1 = read();\n      const b2 = read();\n      const b3 = read();\n      const k = String.fromCharCode( (b0 << 8) | b1);\n      const v = (b2 << 8) | b3;\n      unicodeMap[k] = v;\n      count += 1;\n    }\n    if (count != numChars) {\n      throw count + ' != ' + numChars;\n    }\n\n    return unicodeMap;\n  }();\n\n  const unknownChar = '?'.charCodeAt(0);\n\n  return function(s) {\n    const bytes = [];\n    for (let i = 0; i < s.length; i += 1) {\n      const c = s.charCodeAt(i);\n      if (c < 128) {\n        bytes.push(c);\n      } else {\n        const b = unicodeMap[s.charAt(i)];\n        if (typeof b == 'number') {\n          if ( (b & 0xff) == b) {\n            // 1byte\n            bytes.push(b);\n          } else {\n            // 2bytes\n            bytes.push(b >>> 8);\n            bytes.push(b & 0xff);\n          }\n        } else {\n          bytes.push(unknownChar);\n        }\n      }\n    }\n    return bytes;\n  };\n};\n\n//---------------------------------------------------------------------\n// QRMode\n//---------------------------------------------------------------------\n\nconst QRMode = {\n  MODE_NUMBER :    1 << 0,\n  MODE_ALPHA_NUM : 1 << 1,\n  MODE_8BIT_BYTE : 1 << 2,\n  MODE_KANJI :     1 << 3\n};\n\n//---------------------------------------------------------------------\n// QRErrorCorrectionLevel\n//---------------------------------------------------------------------\n\nconst QRErrorCorrectionLevel = {\n  L : 1,\n  M : 0,\n  Q : 3,\n  H : 2\n};\n\n//---------------------------------------------------------------------\n// QRMaskPattern\n//---------------------------------------------------------------------\n\nconst QRMaskPattern = {\n  PATTERN000 : 0,\n  PATTERN001 : 1,\n  PATTERN010 : 2,\n  PATTERN011 : 3,\n  PATTERN100 : 4,\n  PATTERN101 : 5,\n  PATTERN110 : 6,\n  PATTERN111 : 7\n};\n\n//---------------------------------------------------------------------\n// QRUtil\n//---------------------------------------------------------------------\n\nconst QRUtil = function() {\n\n  const PATTERN_POSITION_TABLE = [\n    [],\n    [6, 18],\n    [6, 22],\n    [6, 26],\n    [6, 30],\n    [6, 34],\n    [6, 22, 38],\n    [6, 24, 42],\n    [6, 26, 46],\n    [6, 28, 50],\n    [6, 30, 54],\n    [6, 32, 58],\n    [6, 34, 62],\n    [6, 26, 46, 66],\n    [6, 26, 48, 70],\n    [6, 26, 50, 74],\n    [6, 30, 54, 78],\n    [6, 30, 56, 82],\n    [6, 30, 58, 86],\n    [6, 34, 62, 90],\n    [6, 28, 50, 72, 94],\n    [6, 26, 50, 74, 98],\n    [6, 30, 54, 78, 102],\n    [6, 28, 54, 80, 106],\n    [6, 32, 58, 84, 110],\n    [6, 30, 58, 86, 114],\n    [6, 34, 62, 90, 118],\n    [6, 26, 50, 74, 98, 122],\n    [6, 30, 54, 78, 102, 126],\n    [6, 26, 52, 78, 104, 130],\n    [6, 30, 56, 82, 108, 134],\n    [6, 34, 60, 86, 112, 138],\n    [6, 30, 58, 86, 114, 142],\n    [6, 34, 62, 90, 118, 146],\n    [6, 30, 54, 78, 102, 126, 150],\n    [6, 24, 50, 76, 102, 128, 154],\n    [6, 28, 54, 80, 106, 132, 158],\n    [6, 32, 58, 84, 110, 136, 162],\n    [6, 26, 54, 82, 110, 138, 166],\n    [6, 30, 58, 86, 114, 142, 170]\n  ];\n  const G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);\n  const G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);\n  const G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);\n\n  const _this = {};\n\n  const getBCHDigit = function(data) {\n    let digit = 0;\n    while (data != 0) {\n      digit += 1;\n      data >>>= 1;\n    }\n    return digit;\n  };\n\n  _this.getBCHTypeInfo = function(data) {\n    let d = data << 10;\n    while (getBCHDigit(d) - getBCHDigit(G15) >= 0) {\n      d ^= (G15 << (getBCHDigit(d) - getBCHDigit(G15) ) );\n    }\n    return ( (data << 10) | d) ^ G15_MASK;\n  };\n\n  _this.getBCHTypeNumber = function(data) {\n    let d = data << 12;\n    while (getBCHDigit(d) - getBCHDigit(G18) >= 0) {\n      d ^= (G18 << (getBCHDigit(d) - getBCHDigit(G18) ) );\n    }\n    return (data << 12) | d;\n  };\n\n  _this.getPatternPosition = function(typeNumber) {\n    return PATTERN_POSITION_TABLE[typeNumber - 1];\n  };\n\n  _this.getMaskFunction = function(maskPattern) {\n\n    switch (maskPattern) {\n\n    case QRMaskPattern.PATTERN000 :\n      return function(i, j) { return (i + j) % 2 == 0; };\n    case QRMaskPattern.PATTERN001 :\n      return function(i, j) { return i % 2 == 0; };\n    case QRMaskPattern.PATTERN010 :\n      return function(i, j) { return j % 3 == 0; };\n    case QRMaskPattern.PATTERN011 :\n      return function(i, j) { return (i + j) % 3 == 0; };\n    case QRMaskPattern.PATTERN100 :\n      return function(i, j) { return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 == 0; };\n    case QRMaskPattern.PATTERN101 :\n      return function(i, j) { return (i * j) % 2 + (i * j) % 3 == 0; };\n    case QRMaskPattern.PATTERN110 :\n      return function(i, j) { return ( (i * j) % 2 + (i * j) % 3) % 2 == 0; };\n    case QRMaskPattern.PATTERN111 :\n      return function(i, j) { return ( (i * j) % 3 + (i + j) % 2) % 2 == 0; };\n\n    default :\n      throw 'bad maskPattern:' + maskPattern;\n    }\n  };\n\n  _this.getErrorCorrectPolynomial = function(errorCorrectLength) {\n    let a = qrPolynomial([1], 0);\n    for (let i = 0; i < errorCorrectLength; i += 1) {\n      a = a.multiply(qrPolynomial([1, QRMath.gexp(i)], 0) );\n    }\n    return a;\n  };\n\n  _this.getLengthInBits = function(mode, type) {\n\n    if (1 <= type && type < 10) {\n\n      // 1 - 9\n\n      switch(mode) {\n      case QRMode.MODE_NUMBER    : return 10;\n      case QRMode.MODE_ALPHA_NUM : return 9;\n      case QRMode.MODE_8BIT_BYTE : return 8;\n      case QRMode.MODE_KANJI     : return 8;\n      default :\n        throw 'mode:' + mode;\n      }\n\n    } else if (type < 27) {\n\n      // 10 - 26\n\n      switch(mode) {\n      case QRMode.MODE_NUMBER    : return 12;\n      case QRMode.MODE_ALPHA_NUM : return 11;\n      case QRMode.MODE_8BIT_BYTE : return 16;\n      case QRMode.MODE_KANJI     : return 10;\n      default :\n        throw 'mode:' + mode;\n      }\n\n    } else if (type < 41) {\n\n      // 27 - 40\n\n      switch(mode) {\n      case QRMode.MODE_NUMBER    : return 14;\n      case QRMode.MODE_ALPHA_NUM : return 13;\n      case QRMode.MODE_8BIT_BYTE : return 16;\n      case QRMode.MODE_KANJI     : return 12;\n      default :\n        throw 'mode:' + mode;\n      }\n\n    } else {\n      throw 'type:' + type;\n    }\n  };\n\n  _this.getLostPoint = function(qrcode) {\n\n    const moduleCount = qrcode.getModuleCount();\n\n    let lostPoint = 0;\n\n    // LEVEL1\n\n    for (let row = 0; row < moduleCount; row += 1) {\n      for (let col = 0; col < moduleCount; col += 1) {\n\n        let sameCount = 0;\n        const dark = qrcode.isDark(row, col);\n\n        for (let r = -1; r <= 1; r += 1) {\n\n          if (row + r < 0 || moduleCount <= row + r) {\n            continue;\n          }\n\n          for (let c = -1; c <= 1; c += 1) {\n\n            if (col + c < 0 || moduleCount <= col + c) {\n              continue;\n            }\n\n            if (r == 0 && c == 0) {\n              continue;\n            }\n\n            if (dark == qrcode.isDark(row + r, col + c) ) {\n              sameCount += 1;\n            }\n          }\n        }\n\n        if (sameCount > 5) {\n          lostPoint += (3 + sameCount - 5);\n        }\n      }\n    };\n\n    // LEVEL2\n\n    for (let row = 0; row < moduleCount - 1; row += 1) {\n      for (let col = 0; col < moduleCount - 1; col += 1) {\n        let count = 0;\n        if (qrcode.isDark(row, col) ) count += 1;\n        if (qrcode.isDark(row + 1, col) ) count += 1;\n        if (qrcode.isDark(row, col + 1) ) count += 1;\n        if (qrcode.isDark(row + 1, col + 1) ) count += 1;\n        if (count == 0 || count == 4) {\n          lostPoint += 3;\n        }\n      }\n    }\n\n    // LEVEL3\n\n    for (let row = 0; row < moduleCount; row += 1) {\n      for (let col = 0; col < moduleCount - 6; col += 1) {\n        if (qrcode.isDark(row, col)\n            && !qrcode.isDark(row, col + 1)\n            &&  qrcode.isDark(row, col + 2)\n            &&  qrcode.isDark(row, col + 3)\n            &&  qrcode.isDark(row, col + 4)\n            && !qrcode.isDark(row, col + 5)\n            &&  qrcode.isDark(row, col + 6) ) {\n          lostPoint += 40;\n        }\n      }\n    }\n\n    for (let col = 0; col < moduleCount; col += 1) {\n      for (let row = 0; row < moduleCount - 6; row += 1) {\n        if (qrcode.isDark(row, col)\n            && !qrcode.isDark(row + 1, col)\n            &&  qrcode.isDark(row + 2, col)\n            &&  qrcode.isDark(row + 3, col)\n            &&  qrcode.isDark(row + 4, col)\n            && !qrcode.isDark(row + 5, col)\n            &&  qrcode.isDark(row + 6, col) ) {\n          lostPoint += 40;\n        }\n      }\n    }\n\n    // LEVEL4\n\n    let darkCount = 0;\n\n    for (let col = 0; col < moduleCount; col += 1) {\n      for (let row = 0; row < moduleCount; row += 1) {\n        if (qrcode.isDark(row, col) ) {\n          darkCount += 1;\n        }\n      }\n    }\n\n    const ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;\n    lostPoint += ratio * 10;\n\n    return lostPoint;\n  };\n\n  return _this;\n}();\n\n//---------------------------------------------------------------------\n// QRMath\n//---------------------------------------------------------------------\n\nconst QRMath = function() {\n\n  const EXP_TABLE = new Array(256);\n  const LOG_TABLE = new Array(256);\n\n  // initialize tables\n  for (let i = 0; i < 8; i += 1) {\n    EXP_TABLE[i] = 1 << i;\n  }\n  for (let i = 8; i < 256; i += 1) {\n    EXP_TABLE[i] = EXP_TABLE[i - 4]\n      ^ EXP_TABLE[i - 5]\n      ^ EXP_TABLE[i - 6]\n      ^ EXP_TABLE[i - 8];\n  }\n  for (let i = 0; i < 255; i += 1) {\n    LOG_TABLE[EXP_TABLE[i] ] = i;\n  }\n\n  const _this = {};\n\n  _this.glog = function(n) {\n\n    if (n < 1) {\n      throw 'glog(' + n + ')';\n    }\n\n    return LOG_TABLE[n];\n  };\n\n  _this.gexp = function(n) {\n\n    while (n < 0) {\n      n += 255;\n    }\n\n    while (n >= 256) {\n      n -= 255;\n    }\n\n    return EXP_TABLE[n];\n  };\n\n  return _this;\n}();\n\n//---------------------------------------------------------------------\n// qrPolynomial\n//---------------------------------------------------------------------\n\nconst qrPolynomial = function(num, shift) {\n\n  if (typeof num.length == 'undefined') {\n    throw num.length + '/' + shift;\n  }\n\n  const _num = function() {\n    let offset = 0;\n    while (offset < num.length && num[offset] == 0) {\n      offset += 1;\n    }\n    const _num = new Array(num.length - offset + shift);\n    for (let i = 0; i < num.length - offset; i += 1) {\n      _num[i] = num[i + offset];\n    }\n    return _num;\n  }();\n\n  const _this = {};\n\n  _this.getAt = function(index) {\n    return _num[index];\n  };\n\n  _this.getLength = function() {\n    return _num.length;\n  };\n\n  _this.multiply = function(e) {\n\n    const num = new Array(_this.getLength() + e.getLength() - 1);\n\n    for (let i = 0; i < _this.getLength(); i += 1) {\n      for (let j = 0; j < e.getLength(); j += 1) {\n        num[i + j] ^= QRMath.gexp(QRMath.glog(_this.getAt(i) ) + QRMath.glog(e.getAt(j) ) );\n      }\n    }\n\n    return qrPolynomial(num, 0);\n  };\n\n  _this.mod = function(e) {\n\n    if (_this.getLength() - e.getLength() < 0) {\n      return _this;\n    }\n\n    const ratio = QRMath.glog(_this.getAt(0) ) - QRMath.glog(e.getAt(0) );\n\n    const num = new Array(_this.getLength() );\n    for (let i = 0; i < _this.getLength(); i += 1) {\n      num[i] = _this.getAt(i);\n    }\n\n    for (let i = 0; i < e.getLength(); i += 1) {\n      num[i] ^= QRMath.gexp(QRMath.glog(e.getAt(i) ) + ratio);\n    }\n\n    // recursive call\n    return qrPolynomial(num, 0).mod(e);\n  };\n\n  return _this;\n};\n\n//---------------------------------------------------------------------\n// QRRSBlock\n//---------------------------------------------------------------------\n\nconst QRRSBlock = function() {\n\n  const RS_BLOCK_TABLE = [\n\n    // L\n    // M\n    // Q\n    // H\n\n    // 1\n    [1, 26, 19],\n    [1, 26, 16],\n    [1, 26, 13],\n    [1, 26, 9],\n\n    // 2\n    [1, 44, 34],\n    [1, 44, 28],\n    [1, 44, 22],\n    [1, 44, 16],\n\n    // 3\n    [1, 70, 55],\n    [1, 70, 44],\n    [2, 35, 17],\n    [2, 35, 13],\n\n    // 4\n    [1, 100, 80],\n    [2, 50, 32],\n    [2, 50, 24],\n    [4, 25, 9],\n\n    // 5\n    [1, 134, 108],\n    [2, 67, 43],\n    [2, 33, 15, 2, 34, 16],\n    [2, 33, 11, 2, 34, 12],\n\n    // 6\n    [2, 86, 68],\n    [4, 43, 27],\n    [4, 43, 19],\n    [4, 43, 15],\n\n    // 7\n    [2, 98, 78],\n    [4, 49, 31],\n    [2, 32, 14, 4, 33, 15],\n    [4, 39, 13, 1, 40, 14],\n\n    // 8\n    [2, 121, 97],\n    [2, 60, 38, 2, 61, 39],\n    [4, 40, 18, 2, 41, 19],\n    [4, 40, 14, 2, 41, 15],\n\n    // 9\n    [2, 146, 116],\n    [3, 58, 36, 2, 59, 37],\n    [4, 36, 16, 4, 37, 17],\n    [4, 36, 12, 4, 37, 13],\n\n    // 10\n    [2, 86, 68, 2, 87, 69],\n    [4, 69, 43, 1, 70, 44],\n    [6, 43, 19, 2, 44, 20],\n    [6, 43, 15, 2, 44, 16],\n\n    // 11\n    [4, 101, 81],\n    [1, 80, 50, 4, 81, 51],\n    [4, 50, 22, 4, 51, 23],\n    [3, 36, 12, 8, 37, 13],\n\n    // 12\n    [2, 116, 92, 2, 117, 93],\n    [6, 58, 36, 2, 59, 37],\n    [4, 46, 20, 6, 47, 21],\n    [7, 42, 14, 4, 43, 15],\n\n    // 13\n    [4, 133, 107],\n    [8, 59, 37, 1, 60, 38],\n    [8, 44, 20, 4, 45, 21],\n    [12, 33, 11, 4, 34, 12],\n\n    // 14\n    [3, 145, 115, 1, 146, 116],\n    [4, 64, 40, 5, 65, 41],\n    [11, 36, 16, 5, 37, 17],\n    [11, 36, 12, 5, 37, 13],\n\n    // 15\n    [5, 109, 87, 1, 110, 88],\n    [5, 65, 41, 5, 66, 42],\n    [5, 54, 24, 7, 55, 25],\n    [11, 36, 12, 7, 37, 13],\n\n    // 16\n    [5, 122, 98, 1, 123, 99],\n    [7, 73, 45, 3, 74, 46],\n    [15, 43, 19, 2, 44, 20],\n    [3, 45, 15, 13, 46, 16],\n\n    // 17\n    [1, 135, 107, 5, 136, 108],\n    [10, 74, 46, 1, 75, 47],\n    [1, 50, 22, 15, 51, 23],\n    [2, 42, 14, 17, 43, 15],\n\n    // 18\n    [5, 150, 120, 1, 151, 121],\n    [9, 69, 43, 4, 70, 44],\n    [17, 50, 22, 1, 51, 23],\n    [2, 42, 14, 19, 43, 15],\n\n    // 19\n    [3, 141, 113, 4, 142, 114],\n    [3, 70, 44, 11, 71, 45],\n    [17, 47, 21, 4, 48, 22],\n    [9, 39, 13, 16, 40, 14],\n\n    // 20\n    [3, 135, 107, 5, 136, 108],\n    [3, 67, 41, 13, 68, 42],\n    [15, 54, 24, 5, 55, 25],\n    [15, 43, 15, 10, 44, 16],\n\n    // 21\n    [4, 144, 116, 4, 145, 117],\n    [17, 68, 42],\n    [17, 50, 22, 6, 51, 23],\n    [19, 46, 16, 6, 47, 17],\n\n    // 22\n    [2, 139, 111, 7, 140, 112],\n    [17, 74, 46],\n    [7, 54, 24, 16, 55, 25],\n    [34, 37, 13],\n\n    // 23\n    [4, 151, 121, 5, 152, 122],\n    [4, 75, 47, 14, 76, 48],\n    [11, 54, 24, 14, 55, 25],\n    [16, 45, 15, 14, 46, 16],\n\n    // 24\n    [6, 147, 117, 4, 148, 118],\n    [6, 73, 45, 14, 74, 46],\n    [11, 54, 24, 16, 55, 25],\n    [30, 46, 16, 2, 47, 17],\n\n    // 25\n    [8, 132, 106, 4, 133, 107],\n    [8, 75, 47, 13, 76, 48],\n    [7, 54, 24, 22, 55, 25],\n    [22, 45, 15, 13, 46, 16],\n\n    // 26\n    [10, 142, 114, 2, 143, 115],\n    [19, 74, 46, 4, 75, 47],\n    [28, 50, 22, 6, 51, 23],\n    [33, 46, 16, 4, 47, 17],\n\n    // 27\n    [8, 152, 122, 4, 153, 123],\n    [22, 73, 45, 3, 74, 46],\n    [8, 53, 23, 26, 54, 24],\n    [12, 45, 15, 28, 46, 16],\n\n    // 28\n    [3, 147, 117, 10, 148, 118],\n    [3, 73, 45, 23, 74, 46],\n    [4, 54, 24, 31, 55, 25],\n    [11, 45, 15, 31, 46, 16],\n\n    // 29\n    [7, 146, 116, 7, 147, 117],\n    [21, 73, 45, 7, 74, 46],\n    [1, 53, 23, 37, 54, 24],\n    [19, 45, 15, 26, 46, 16],\n\n    // 30\n    [5, 145, 115, 10, 146, 116],\n    [19, 75, 47, 10, 76, 48],\n    [15, 54, 24, 25, 55, 25],\n    [23, 45, 15, 25, 46, 16],\n\n    // 31\n    [13, 145, 115, 3, 146, 116],\n    [2, 74, 46, 29, 75, 47],\n    [42, 54, 24, 1, 55, 25],\n    [23, 45, 15, 28, 46, 16],\n\n    // 32\n    [17, 145, 115],\n    [10, 74, 46, 23, 75, 47],\n    [10, 54, 24, 35, 55, 25],\n    [19, 45, 15, 35, 46, 16],\n\n    // 33\n    [17, 145, 115, 1, 146, 116],\n    [14, 74, 46, 21, 75, 47],\n    [29, 54, 24, 19, 55, 25],\n    [11, 45, 15, 46, 46, 16],\n\n    // 34\n    [13, 145, 115, 6, 146, 116],\n    [14, 74, 46, 23, 75, 47],\n    [44, 54, 24, 7, 55, 25],\n    [59, 46, 16, 1, 47, 17],\n\n    // 35\n    [12, 151, 121, 7, 152, 122],\n    [12, 75, 47, 26, 76, 48],\n    [39, 54, 24, 14, 55, 25],\n    [22, 45, 15, 41, 46, 16],\n\n    // 36\n    [6, 151, 121, 14, 152, 122],\n    [6, 75, 47, 34, 76, 48],\n    [46, 54, 24, 10, 55, 25],\n    [2, 45, 15, 64, 46, 16],\n\n    // 37\n    [17, 152, 122, 4, 153, 123],\n    [29, 74, 46, 14, 75, 47],\n    [49, 54, 24, 10, 55, 25],\n    [24, 45, 15, 46, 46, 16],\n\n    // 38\n    [4, 152, 122, 18, 153, 123],\n    [13, 74, 46, 32, 75, 47],\n    [48, 54, 24, 14, 55, 25],\n    [42, 45, 15, 32, 46, 16],\n\n    // 39\n    [20, 147, 117, 4, 148, 118],\n    [40, 75, 47, 7, 76, 48],\n    [43, 54, 24, 22, 55, 25],\n    [10, 45, 15, 67, 46, 16],\n\n    // 40\n    [19, 148, 118, 6, 149, 119],\n    [18, 75, 47, 31, 76, 48],\n    [34, 54, 24, 34, 55, 25],\n    [20, 45, 15, 61, 46, 16]\n  ];\n\n  const qrRSBlock = function(totalCount, dataCount) {\n    const _this = {};\n    _this.totalCount = totalCount;\n    _this.dataCount = dataCount;\n    return _this;\n  };\n\n  const _this = {};\n\n  const getRsBlockTable = function(typeNumber, errorCorrectionLevel) {\n\n    switch(errorCorrectionLevel) {\n    case QRErrorCorrectionLevel.L :\n      return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];\n    case QRErrorCorrectionLevel.M :\n      return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];\n    case QRErrorCorrectionLevel.Q :\n      return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];\n    case QRErrorCorrectionLevel.H :\n      return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];\n    default :\n      return undefined;\n    }\n  };\n\n  _this.getRSBlocks = function(typeNumber, errorCorrectionLevel) {\n\n    const rsBlock = getRsBlockTable(typeNumber, errorCorrectionLevel);\n\n    if (typeof rsBlock == 'undefined') {\n      throw 'bad rs block @ typeNumber:' + typeNumber +\n          '/errorCorrectionLevel:' + errorCorrectionLevel;\n    }\n\n    const length = rsBlock.length / 3;\n\n    const list = [];\n\n    for (let i = 0; i < length; i += 1) {\n\n      const count = rsBlock[i * 3 + 0];\n      const totalCount = rsBlock[i * 3 + 1];\n      const dataCount = rsBlock[i * 3 + 2];\n\n      for (let j = 0; j < count; j += 1) {\n        list.push(qrRSBlock(totalCount, dataCount) );\n      }\n    }\n\n    return list;\n  };\n\n  return _this;\n}();\n\n//---------------------------------------------------------------------\n// qrBitBuffer\n//---------------------------------------------------------------------\n\nconst qrBitBuffer = function() {\n\n  const _buffer = [];\n  let _length = 0;\n\n  const _this = {};\n\n  _this.getBuffer = function() {\n    return _buffer;\n  };\n\n  _this.getAt = function(index) {\n    const bufIndex = Math.floor(index / 8);\n    return ( (_buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1;\n  };\n\n  _this.put = function(num, length) {\n    for (let i = 0; i < length; i += 1) {\n      _this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1);\n    }\n  };\n\n  _this.getLengthInBits = function() {\n    return _length;\n  };\n\n  _this.putBit = function(bit) {\n\n    const bufIndex = Math.floor(_length / 8);\n    if (_buffer.length <= bufIndex) {\n      _buffer.push(0);\n    }\n\n    if (bit) {\n      _buffer[bufIndex] |= (0x80 >>> (_length % 8) );\n    }\n\n    _length += 1;\n  };\n\n  return _this;\n};\n\n//---------------------------------------------------------------------\n// qrNumber\n//---------------------------------------------------------------------\n\nconst qrNumber = function(data) {\n\n  const _mode = QRMode.MODE_NUMBER;\n  const _data = data;\n\n  const _this = {};\n\n  _this.getMode = function() {\n    return _mode;\n  };\n\n  _this.getLength = function(buffer) {\n    return _data.length;\n  };\n\n  _this.write = function(buffer) {\n\n    const data = _data;\n\n    let i = 0;\n\n    while (i + 2 < data.length) {\n      buffer.put(strToNum(data.substring(i, i + 3) ), 10);\n      i += 3;\n    }\n\n    if (i < data.length) {\n      if (data.length - i == 1) {\n        buffer.put(strToNum(data.substring(i, i + 1) ), 4);\n      } else if (data.length - i == 2) {\n        buffer.put(strToNum(data.substring(i, i + 2) ), 7);\n      }\n    }\n  };\n\n  const strToNum = function(s) {\n    let num = 0;\n    for (let i = 0; i < s.length; i += 1) {\n      num = num * 10 + chatToNum(s.charAt(i) );\n    }\n    return num;\n  };\n\n  const chatToNum = function(c) {\n    if ('0' <= c && c <= '9') {\n      return c.charCodeAt(0) - '0'.charCodeAt(0);\n    }\n    throw 'illegal char :' + c;\n  };\n\n  return _this;\n};\n\n//---------------------------------------------------------------------\n// qrAlphaNum\n//---------------------------------------------------------------------\n\nconst qrAlphaNum = function(data) {\n\n  const _mode = QRMode.MODE_ALPHA_NUM;\n  const _data = data;\n\n  const _this = {};\n\n  _this.getMode = function() {\n    return _mode;\n  };\n\n  _this.getLength = function(buffer) {\n    return _data.length;\n  };\n\n  _this.write = function(buffer) {\n\n    const s = _data;\n\n    let i = 0;\n\n    while (i + 1 < s.length) {\n      buffer.put(\n        getCode(s.charAt(i) ) * 45 +\n        getCode(s.charAt(i + 1) ), 11);\n      i += 2;\n    }\n\n    if (i < s.length) {\n      buffer.put(getCode(s.charAt(i) ), 6);\n    }\n  };\n\n  const getCode = function(c) {\n\n    if ('0' <= c && c <= '9') {\n      return c.charCodeAt(0) - '0'.charCodeAt(0);\n    } else if ('A' <= c && c <= 'Z') {\n      return c.charCodeAt(0) - 'A'.charCodeAt(0) + 10;\n    } else {\n      switch (c) {\n      case '\\u0020' : return 36;\n      case '$' : return 37;\n      case '%' : return 38;\n      case '*' : return 39;\n      case '+' : return 40;\n      case '-' : return 41;\n      case '.' : return 42;\n      case '/' : return 43;\n      case ':' : return 44;\n      default :\n        throw 'illegal char :' + c;\n      }\n    }\n  };\n\n  return _this;\n};\n\n//---------------------------------------------------------------------\n// qr8BitByte\n//---------------------------------------------------------------------\n\nconst qr8BitByte = function(data) {\n\n  const _mode = QRMode.MODE_8BIT_BYTE;\n  const _data = data;\n  const _bytes = qrcode.stringToBytes(data);\n\n  const _this = {};\n\n  _this.getMode = function() {\n    return _mode;\n  };\n\n  _this.getLength = function(buffer) {\n    return _bytes.length;\n  };\n\n  _this.write = function(buffer) {\n    for (let i = 0; i < _bytes.length; i += 1) {\n      buffer.put(_bytes[i], 8);\n    }\n  };\n\n  return _this;\n};\n\n//---------------------------------------------------------------------\n// qrKanji\n//---------------------------------------------------------------------\n\nconst qrKanji = function(data) {\n\n  const _mode = QRMode.MODE_KANJI;\n  const _data = data;\n\n  const stringToBytes = qrcode.stringToBytes;\n  !function(c, code) {\n    // self test for sjis support.\n    const test = stringToBytes(c);\n    if (test.length != 2 || ( (test[0] << 8) | test[1]) != code) {\n      throw 'sjis not supported.';\n    }\n  }('\\u53cb', 0x9746);\n\n  const _bytes = stringToBytes(data);\n\n  const _this = {};\n\n  _this.getMode = function() {\n    return _mode;\n  };\n\n  _this.getLength = function(buffer) {\n    return ~~(_bytes.length / 2);\n  };\n\n  _this.write = function(buffer) {\n\n    const data = _bytes;\n\n    let i = 0;\n\n    while (i + 1 < data.length) {\n\n      let c = ( (0xff & data[i]) << 8) | (0xff & data[i + 1]);\n\n      if (0x8140 <= c && c <= 0x9FFC) {\n        c -= 0x8140;\n      } else if (0xE040 <= c && c <= 0xEBBF) {\n        c -= 0xC140;\n      } else {\n        throw 'illegal char at ' + (i + 1) + '/' + c;\n      }\n\n      c = ( (c >>> 8) & 0xff) * 0xC0 + (c & 0xff);\n\n      buffer.put(c, 13);\n\n      i += 2;\n    }\n\n    if (i < data.length) {\n      throw 'illegal char at ' + (i + 1);\n    }\n  };\n\n  return _this;\n};\n\n//=====================================================================\n// GIF Support etc.\n//\n\n//---------------------------------------------------------------------\n// byteArrayOutputStream\n//---------------------------------------------------------------------\n\nconst byteArrayOutputStream = function() {\n\n  const _bytes = [];\n\n  const _this = {};\n\n  _this.writeByte = function(b) {\n    _bytes.push(b & 0xff);\n  };\n\n  _this.writeShort = function(i) {\n    _this.writeByte(i);\n    _this.writeByte(i >>> 8);\n  };\n\n  _this.writeBytes = function(b, off, len) {\n    off = off || 0;\n    len = len || b.length;\n    for (let i = 0; i < len; i += 1) {\n      _this.writeByte(b[i + off]);\n    }\n  };\n\n  _this.writeString = function(s) {\n    for (let i = 0; i < s.length; i += 1) {\n      _this.writeByte(s.charCodeAt(i) );\n    }\n  };\n\n  _this.toByteArray = function() {\n    return _bytes;\n  };\n\n  _this.toString = function() {\n    let s = '';\n    s += '[';\n    for (let i = 0; i < _bytes.length; i += 1) {\n      if (i > 0) {\n        s += ',';\n      }\n      s += _bytes[i];\n    }\n    s += ']';\n    return s;\n  };\n\n  return _this;\n};\n\n//---------------------------------------------------------------------\n// base64EncodeOutputStream\n//---------------------------------------------------------------------\n\nconst base64EncodeOutputStream = function() {\n\n  let _buffer = 0;\n  let _buflen = 0;\n  let _length = 0;\n  let _base64 = '';\n\n  const _this = {};\n\n  const writeEncoded = function(b) {\n    _base64 += String.fromCharCode(encode(b & 0x3f) );\n  };\n\n  const encode = function(n) {\n    if (n < 0) {\n      throw 'n:' + n;\n    } else if (n < 26) {\n      return 0x41 + n;\n    } else if (n < 52) {\n      return 0x61 + (n - 26);\n    } else if (n < 62) {\n      return 0x30 + (n - 52);\n    } else if (n == 62) {\n      return 0x2b;\n    } else if (n == 63) {\n      return 0x2f;\n    } else {\n      throw 'n:' + n;\n    }\n  };\n\n  _this.writeByte = function(n) {\n\n    _buffer = (_buffer << 8) | (n & 0xff);\n    _buflen += 8;\n    _length += 1;\n\n    while (_buflen >= 6) {\n      writeEncoded(_buffer >>> (_buflen - 6) );\n      _buflen -= 6;\n    }\n  };\n\n  _this.flush = function() {\n\n    if (_buflen > 0) {\n      writeEncoded(_buffer << (6 - _buflen) );\n      _buffer = 0;\n      _buflen = 0;\n    }\n\n    if (_length % 3 != 0) {\n      // padding\n      const padlen = 3 - _length % 3;\n      for (let i = 0; i < padlen; i += 1) {\n        _base64 += '=';\n      }\n    }\n  };\n\n  _this.toString = function() {\n    return _base64;\n  };\n\n  return _this;\n};\n\n//---------------------------------------------------------------------\n// base64DecodeInputStream\n//---------------------------------------------------------------------\n\nconst base64DecodeInputStream = function(str) {\n\n  const _str = str;\n  let _pos = 0;\n  let _buffer = 0;\n  let _buflen = 0;\n\n  const _this = {};\n\n  _this.read = function() {\n\n    while (_buflen < 8) {\n\n      if (_pos >= _str.length) {\n        if (_buflen == 0) {\n          return -1;\n        }\n        throw 'unexpected end of file./' + _buflen;\n      }\n\n      const c = _str.charAt(_pos);\n      _pos += 1;\n\n      if (c == '=') {\n        _buflen = 0;\n        return -1;\n      } else if (c.match(/^\\s$/) ) {\n        // ignore if whitespace.\n        continue;\n      }\n\n      _buffer = (_buffer << 6) | decode(c.charCodeAt(0) );\n      _buflen += 6;\n    }\n\n    const n = (_buffer >>> (_buflen - 8) ) & 0xff;\n    _buflen -= 8;\n    return n;\n  };\n\n  const decode = function(c) {\n    if (0x41 <= c && c <= 0x5a) {\n      return c - 0x41;\n    } else if (0x61 <= c && c <= 0x7a) {\n      return c - 0x61 + 26;\n    } else if (0x30 <= c && c <= 0x39) {\n      return c - 0x30 + 52;\n    } else if (c == 0x2b) {\n      return 62;\n    } else if (c == 0x2f) {\n      return 63;\n    } else {\n      throw 'c:' + c;\n    }\n  };\n\n  return _this;\n};\n\n//---------------------------------------------------------------------\n// gifImage (B/W)\n//---------------------------------------------------------------------\n\nconst gifImage = function(width, height) {\n\n  const _width = width;\n  const _height = height;\n  const _data = new Array(width * height);\n\n  const _this = {};\n\n  _this.setPixel = function(x, y, pixel) {\n    _data[y * _width + x] = pixel;\n  };\n\n  _this.write = function(out) {\n\n    //---------------------------------\n    // GIF Signature\n\n    out.writeString('GIF87a');\n\n    //---------------------------------\n    // Screen Descriptor\n\n    out.writeShort(_width);\n    out.writeShort(_height);\n\n    out.writeByte(0x80); // 2bit\n    out.writeByte(0);\n    out.writeByte(0);\n\n    //---------------------------------\n    // Global Color Map\n\n    // black\n    out.writeByte(0x00);\n    out.writeByte(0x00);\n    out.writeByte(0x00);\n\n    // white\n    out.writeByte(0xff);\n    out.writeByte(0xff);\n    out.writeByte(0xff);\n\n    //---------------------------------\n    // Image Descriptor\n\n    out.writeString(',');\n    out.writeShort(0);\n    out.writeShort(0);\n    out.writeShort(_width);\n    out.writeShort(_height);\n    out.writeByte(0);\n\n    //---------------------------------\n    // Local Color Map\n\n    //---------------------------------\n    // Raster Data\n\n    const lzwMinCodeSize = 2;\n    const raster = getLZWRaster(lzwMinCodeSize);\n\n    out.writeByte(lzwMinCodeSize);\n\n    let offset = 0;\n\n    while (raster.length - offset > 255) {\n      out.writeByte(255);\n      out.writeBytes(raster, offset, 255);\n      offset += 255;\n    }\n\n    out.writeByte(raster.length - offset);\n    out.writeBytes(raster, offset, raster.length - offset);\n    out.writeByte(0x00);\n\n    //---------------------------------\n    // GIF Terminator\n    out.writeString(';');\n  };\n\n  const bitOutputStream = function(out) {\n\n    const _out = out;\n    let _bitLength = 0;\n    let _bitBuffer = 0;\n\n    const _this = {};\n\n    _this.write = function(data, length) {\n\n      if ( (data >>> length) != 0) {\n        throw 'length over';\n      }\n\n      while (_bitLength + length >= 8) {\n        _out.writeByte(0xff & ( (data << _bitLength) | _bitBuffer) );\n        length -= (8 - _bitLength);\n        data >>>= (8 - _bitLength);\n        _bitBuffer = 0;\n        _bitLength = 0;\n      }\n\n      _bitBuffer = (data << _bitLength) | _bitBuffer;\n      _bitLength = _bitLength + length;\n    };\n\n    _this.flush = function() {\n      if (_bitLength > 0) {\n        _out.writeByte(_bitBuffer);\n      }\n    };\n\n    return _this;\n  };\n\n  const getLZWRaster = function(lzwMinCodeSize) {\n\n    const clearCode = 1 << lzwMinCodeSize;\n    const endCode = (1 << lzwMinCodeSize) + 1;\n    let bitLength = lzwMinCodeSize + 1;\n\n    // Setup LZWTable\n    const table = lzwTable();\n\n    for (let i = 0; i < clearCode; i += 1) {\n      table.add(String.fromCharCode(i) );\n    }\n    table.add(String.fromCharCode(clearCode) );\n    table.add(String.fromCharCode(endCode) );\n\n    const byteOut = byteArrayOutputStream();\n    const bitOut = bitOutputStream(byteOut);\n\n    // clear code\n    bitOut.write(clearCode, bitLength);\n\n    let dataIndex = 0;\n\n    let s = String.fromCharCode(_data[dataIndex]);\n    dataIndex += 1;\n\n    while (dataIndex < _data.length) {\n\n      const c = String.fromCharCode(_data[dataIndex]);\n      dataIndex += 1;\n\n      if (table.contains(s + c) ) {\n\n        s = s + c;\n\n      } else {\n\n        bitOut.write(table.indexOf(s), bitLength);\n\n        if (table.size() < 0xfff) {\n\n          if (table.size() == (1 << bitLength) ) {\n            bitLength += 1;\n          }\n\n          table.add(s + c);\n        }\n\n        s = c;\n      }\n    }\n\n    bitOut.write(table.indexOf(s), bitLength);\n\n    // end code\n    bitOut.write(endCode, bitLength);\n\n    bitOut.flush();\n\n    return byteOut.toByteArray();\n  };\n\n  const lzwTable = function() {\n\n    const _map = {};\n    let _size = 0;\n\n    const _this = {};\n\n    _this.add = function(key) {\n      if (_this.contains(key) ) {\n        throw 'dup key:' + key;\n      }\n      _map[key] = _size;\n      _size += 1;\n    };\n\n    _this.size = function() {\n      return _size;\n    };\n\n    _this.indexOf = function(key) {\n      return _map[key];\n    };\n\n    _this.contains = function(key) {\n      return typeof _map[key] != 'undefined';\n    };\n\n    return _this;\n  };\n\n  return _this;\n};\n\nconst createDataURL = function(width, height, getPixel) {\n  const gif = gifImage(width, height);\n  for (let y = 0; y < height; y += 1) {\n    for (let x = 0; x < width; x += 1) {\n      gif.setPixel(x, y, getPixel(x, y) );\n    }\n  }\n\n  const b = byteArrayOutputStream();\n  gif.write(b);\n\n  const base64 = base64EncodeOutputStream();\n  const bytes = b.toByteArray();\n  for (let i = 0; i < bytes.length; i += 1) {\n    base64.writeByte(bytes[i]);\n  }\n  base64.flush();\n\n  return 'data:image/gif;base64,' + base64;\n};\n\nexport default qrcode;\n\nexport const stringToBytes = qrcode.stringToBytes;\n","// packages/collapse/src/index.js\nfunction src_default(Alpine) {\n  Alpine.directive(\"collapse\", collapse);\n  collapse.inline = (el, { modifiers }) => {\n    if (!modifiers.includes(\"min\"))\n      return;\n    el._x_doShow = () => {\n    };\n    el._x_doHide = () => {\n    };\n  };\n  function collapse(el, { modifiers }) {\n    let duration = modifierValue(modifiers, \"duration\", 250) / 1e3;\n    let floor = modifierValue(modifiers, \"min\", 0);\n    let fullyHide = !modifiers.includes(\"min\");\n    if (!el._x_isShown)\n      el.style.height = `${floor}px`;\n    if (!el._x_isShown && fullyHide)\n      el.hidden = true;\n    if (!el._x_isShown)\n      el.style.overflow = \"hidden\";\n    let setFunction = (el2, styles) => {\n      let revertFunction = Alpine.setStyles(el2, styles);\n      return styles.height ? () => {\n      } : revertFunction;\n    };\n    let transitionStyles = {\n      transitionProperty: \"height\",\n      transitionDuration: `${duration}s`,\n      transitionTimingFunction: \"cubic-bezier(0.4, 0.0, 0.2, 1)\"\n    };\n    el._x_transition = {\n      in(before = () => {\n      }, after = () => {\n      }) {\n        if (fullyHide)\n          el.hidden = false;\n        if (fullyHide)\n          el.style.display = null;\n        let current = el.getBoundingClientRect().height;\n        el.style.height = \"auto\";\n        let full = el.getBoundingClientRect().height;\n        if (current === full) {\n          current = floor;\n        }\n        Alpine.transition(el, Alpine.setStyles, {\n          during: transitionStyles,\n          start: { height: current + \"px\" },\n          end: { height: full + \"px\" }\n        }, () => el._x_isShown = true, () => {\n          if (Math.abs(el.getBoundingClientRect().height - full) < 1) {\n            el.style.overflow = null;\n          }\n        });\n      },\n      out(before = () => {\n      }, after = () => {\n      }) {\n        let full = el.getBoundingClientRect().height;\n        Alpine.transition(el, setFunction, {\n          during: transitionStyles,\n          start: { height: full + \"px\" },\n          end: { height: floor + \"px\" }\n        }, () => el.style.overflow = \"hidden\", () => {\n          el._x_isShown = false;\n          if (el.style.height == `${floor}px` && fullyHide) {\n            el.style.display = \"none\";\n            el.hidden = true;\n          }\n        });\n      }\n    };\n  }\n}\nfunction modifierValue(modifiers, key, fallback) {\n  if (modifiers.indexOf(key) === -1)\n    return fallback;\n  const rawValue = modifiers[modifiers.indexOf(key) + 1];\n  if (!rawValue)\n    return fallback;\n  if (key === \"duration\") {\n    let match = rawValue.match(/([0-9]+)ms/);\n    if (match)\n      return match[1];\n  }\n  if (key === \"min\") {\n    let match = rawValue.match(/([0-9]+)px/);\n    if (match)\n      return match[1];\n  }\n  return rawValue;\n}\n\n// packages/collapse/builds/module.js\nvar module_default = src_default;\nexport {\n  src_default as collapse,\n  module_default as default\n};\n","// packages/intersect/src/index.js\nfunction src_default(Alpine) {\n  Alpine.directive(\"intersect\", Alpine.skipDuringClone((el, { value, expression, modifiers }, { evaluateLater, cleanup }) => {\n    let evaluate = evaluateLater(expression);\n    let threshold = getThreshold(modifiers);\n    let options = {\n      rootMargin: getRootMargin(modifiers),\n      threshold,\n      root: modifiers.includes(\"parent\") ? el.parentElement : null\n    };\n    if (modifiers.includes(\"dwell\")) {\n      observeForDwell(el, value, modifiers, evaluate, cleanup, options, threshold);\n      return;\n    }\n    let observer = new IntersectionObserver((entries) => {\n      entries.forEach((entry) => {\n        if (entry.isIntersecting === (value === \"leave\"))\n          return;\n        evaluate();\n        modifiers.includes(\"once\") && observer.disconnect();\n      });\n    }, options);\n    observer.observe(el);\n    cleanup(() => {\n      observer.disconnect();\n    });\n  }));\n}\nfunction observeForDwell(el, value, modifiers, evaluate, cleanup, options, threshold) {\n  let dwellTimeout;\n  let lastEntry;\n  let hasEvaluated = false;\n  let isConfirmingDwell = false;\n  let duration = getDwellDuration(modifiers);\n  let observer;\n  let clearDwellTimeout = () => {\n    clearTimeout(dwellTimeout);\n    dwellTimeout = void 0;\n  };\n  let completeDwell = () => {\n    isConfirmingDwell = false;\n    if (!lastEntry || document.hidden || !meetsDwellThreshold(lastEntry, value, threshold))\n      return;\n    hasEvaluated = true;\n    evaluate();\n    if (modifiers.includes(\"once\")) {\n      observer.disconnect();\n      document.removeEventListener(\"visibilitychange\", handleVisibilityChange);\n    }\n  };\n  let observe = () => {\n    observer && observer.disconnect();\n    observer = new IntersectionObserver(handleEntries, options);\n    observer.observe(el);\n  };\n  let confirmDwell = () => {\n    dwellTimeout = void 0;\n    if (document.hidden)\n      return;\n    let pendingEntries = observer.takeRecords();\n    if (pendingEntries.some((entry) => !meetsDwellThreshold(entry, value, threshold))) {\n      handleEntries(pendingEntries);\n      return;\n    }\n    isConfirmingDwell = true;\n    lastEntry = void 0;\n    observe();\n  };\n  let beginDwell = () => {\n    if (dwellTimeout !== void 0 || hasEvaluated || document.hidden || !lastEntry)\n      return;\n    if (!meetsDwellThreshold(lastEntry, value, threshold))\n      return;\n    dwellTimeout = setTimeout(confirmDwell, duration);\n  };\n  let handleEntries = (entries) => {\n    entries.forEach((entry) => {\n      lastEntry = entry;\n      if (!meetsDwellThreshold(entry, value, threshold)) {\n        clearDwellTimeout();\n        hasEvaluated = false;\n        isConfirmingDwell = false;\n        return;\n      }\n      if (isConfirmingDwell) {\n        completeDwell();\n        return;\n      }\n      beginDwell();\n    });\n  };\n  let handleVisibilityChange = () => {\n    if (document.hidden) {\n      clearDwellTimeout();\n      lastEntry = void 0;\n      hasEvaluated = false;\n      isConfirmingDwell = false;\n      observer.disconnect();\n      return;\n    }\n    observe();\n  };\n  observe();\n  document.addEventListener(\"visibilitychange\", handleVisibilityChange);\n  cleanup(() => {\n    clearDwellTimeout();\n    observer.disconnect();\n    document.removeEventListener(\"visibilitychange\", handleVisibilityChange);\n  });\n}\nfunction meetsDwellThreshold(entry, value, threshold) {\n  let meetsThreshold = threshold === 0 ? entry.isIntersecting : entry.isIntersecting && entry.intersectionRatio >= threshold;\n  return value === \"leave\" ? !meetsThreshold : meetsThreshold;\n}\nfunction getDwellDuration(modifiers) {\n  let rawDuration = modifiers[modifiers.indexOf(\"dwell\") + 1] || \"\";\n  let match = rawDuration.match(/^([0-9]+)(ms)?$/);\n  return match ? Number(match[1]) : 250;\n}\nfunction getThreshold(modifiers) {\n  if (modifiers.includes(\"full\"))\n    return 0.99;\n  if (modifiers.includes(\"half\"))\n    return 0.5;\n  if (!modifiers.includes(\"threshold\"))\n    return 0;\n  let threshold = modifiers[modifiers.indexOf(\"threshold\") + 1];\n  if (threshold === \"100\")\n    return 1;\n  if (threshold === \"0\")\n    return 0;\n  return Number(`.${threshold}`);\n}\nfunction getLengthValue(rawValue) {\n  let match = rawValue.match(/^(-?[0-9]+)(px|%)?$/);\n  return match ? match[1] + (match[2] || \"px\") : void 0;\n}\nfunction getRootMargin(modifiers) {\n  const key = \"margin\";\n  const fallback = \"0px 0px 0px 0px\";\n  const index = modifiers.indexOf(key);\n  if (index === -1)\n    return fallback;\n  let values = [];\n  for (let i = 1; i < 5; i++) {\n    values.push(getLengthValue(modifiers[index + i] || \"\"));\n  }\n  values = values.filter((v) => v !== void 0);\n  return values.length ? values.join(\" \").trim() : fallback;\n}\n\n// packages/intersect/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default,\n  src_default as intersect\n};\n","// packages/mask/src/index.js\nfunction src_default(Alpine) {\n  Alpine.directive(\"mask\", (el, { value, expression }, { effect, evaluateLater, cleanup }) => {\n    let templateFn = () => expression;\n    let lastInputValue = \"\";\n    let undoModelUpdate = () => {\n    };\n    queueMicrotask(() => {\n      if ([\"function\", \"dynamic\"].includes(value)) {\n        let evaluator = evaluateLater(expression);\n        effect(() => {\n          templateFn = (input) => {\n            let result;\n            Alpine.dontAutoEvaluateFunctions(() => {\n              evaluator((value2) => {\n                result = typeof value2 === \"function\" ? value2(input) : value2;\n              }, { scope: {\n                // These are \"magics\" we'll make available to the x-mask:function:\n                \"$input\": input,\n                \"$money\": formatMoney.bind({ el })\n              } });\n            });\n            return result;\n          };\n          processInputValue(el, false);\n        });\n      } else {\n        processInputValue(el, false);\n      }\n      if (el._x_model) {\n        if (el._x_model.get() !== el.value) {\n          if (!(el._x_model.get() === null && el.value === \"\")) {\n            el._x_model.set(el.value);\n          }\n        }\n        let updater = el._x_forceModelUpdate;\n        let update = (value2) => {\n          if (value2 === void 0) {\n            lastInputValue = \"\";\n            return updater(value2);\n          }\n          value2 = String(value2);\n          let template = templateFn(value2);\n          if (template && template !== \"false\") {\n            value2 = formatInput(template, value2);\n          }\n          lastInputValue = value2;\n          updater(value2);\n          el._x_model.set(value2);\n        };\n        el._x_forceModelUpdate = update;\n        undoModelUpdate = () => {\n          if (el._x_forceModelUpdate === update) {\n            el._x_forceModelUpdate = updater;\n          }\n        };\n      }\n    });\n    const controller = new AbortController();\n    cleanup(() => {\n      controller.abort();\n      undoModelUpdate();\n    });\n    el.addEventListener(\"input\", () => processInputValue(el), {\n      signal: controller.signal,\n      // Setting this as a capture phase listener to ensure it runs\n      // before wire:model or x-model added as a latent binding...\n      capture: true\n    });\n    el.addEventListener(\"blur\", () => processInputValue(el, false), { signal: controller.signal });\n    function processInputValue(el2, shouldRestoreCursor = true) {\n      let input = el2.value;\n      let template = templateFn(input);\n      if (!template || template === \"false\")\n        return false;\n      if (lastInputValue.length - el2.value.length === 1) {\n        return lastInputValue = el2.value;\n      }\n      let setInput = () => {\n        lastInputValue = el2.value = formatInput(template, input);\n      };\n      if (shouldRestoreCursor) {\n        restoreCursorPosition(el2, template, () => {\n          setInput();\n        });\n      } else {\n        setInput();\n      }\n    }\n  }).before(\"model\");\n}\nfunction restoreCursorPosition(el, template, callback) {\n  let cursorPosition = el.selectionStart;\n  let unformattedValue = el.value;\n  callback();\n  let beforeLeftOfCursorBeforeFormatting = unformattedValue.slice(0, cursorPosition);\n  let newPosition = formatInput(\n    template,\n    beforeLeftOfCursorBeforeFormatting\n  ).length;\n  el.setSelectionRange(newPosition, newPosition);\n}\nvar regexes = {\n  \"9\": /[0-9]/,\n  \"a\": /[a-zA-Z]/,\n  \"*\": /[a-zA-Z0-9]/\n};\nfunction formatInput(template, input) {\n  let templateMark = 0;\n  let inputMark = 0;\n  let output = \"\";\n  while (templateMark < template.length && inputMark < input.length) {\n    let templateChar = template[templateMark];\n    let inputChar = input[inputMark];\n    if (templateChar in regexes) {\n      if (regexes[templateChar].test(inputChar)) {\n        output += inputChar;\n        templateMark++;\n      }\n      inputMark++;\n    } else {\n      output += templateChar;\n      templateMark++;\n      if (templateChar === input[inputMark])\n        inputMark++;\n    }\n  }\n  return output;\n}\nfunction formatMoney(input, delimiter = \".\", thousands, precision = 2) {\n  if (input === \"-\")\n    return \"-\";\n  if (/^\\D+$/.test(input))\n    return \"9\";\n  if (thousands === null || thousands === void 0) {\n    thousands = delimiter === \",\" ? \".\" : \",\";\n  }\n  let addThousands = (input2, thousands2) => {\n    let output = \"\";\n    let counter = 0;\n    for (let i = input2.length - 1; i >= 0; i--) {\n      if (input2[i] === thousands2)\n        continue;\n      if (counter === 3) {\n        output = input2[i] + thousands2 + output;\n        counter = 0;\n      } else {\n        output = input2[i] + output;\n      }\n      counter++;\n    }\n    return output;\n  };\n  let minus = input.startsWith(\"-\") ? \"-\" : \"\";\n  let strippedInput = input.replaceAll(new RegExp(`[^0-9\\\\${delimiter}]`, \"g\"), \"\");\n  let template = Array.from({ length: strippedInput.split(delimiter)[0].length }).fill(\"9\").join(\"\");\n  template = `${minus}${addThousands(template, thousands)}`;\n  if (precision > 0 && input.includes(delimiter))\n    template += `${delimiter}` + \"9\".repeat(precision);\n  queueMicrotask(() => {\n    if (this.el.value.endsWith(delimiter))\n      return;\n    if (this.el.value[this.el.selectionStart - 1] === delimiter) {\n      this.el.setSelectionRange(this.el.selectionStart - 1, this.el.selectionStart - 1);\n    }\n  });\n  return template;\n}\n\n// packages/mask/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default,\n  formatInput,\n  src_default as mask\n};\n","// packages/morph/src/morph.js\nfunction morph(from, toHtml, options) {\n  monkeyPatchDomSetAttributeToAllowAtSymbols();\n  let context = createMorphContext(options);\n  let toEl = typeof toHtml === \"string\" ? createElement(toHtml) : toHtml;\n  if (window.Alpine && window.Alpine.closestDataStack && !from._x_dataStack) {\n    toEl._x_dataStack = window.Alpine.closestDataStack(from);\n    toEl._x_dataStack && window.Alpine.cloneNode(from, toEl);\n  }\n  context.patch(from, toEl);\n  return from;\n}\nfunction morphBetween(startMarker, endMarker, toHtml, options = {}) {\n  monkeyPatchDomSetAttributeToAllowAtSymbols();\n  let context = createMorphContext(options);\n  let fromContainer = startMarker.parentNode;\n  let fromBlock = new Block(startMarker, endMarker);\n  let toContainer = typeof toHtml === \"string\" ? (() => {\n    let container = document.createElement(\"div\");\n    container.insertAdjacentHTML(\"beforeend\", toHtml);\n    return container;\n  })() : toHtml;\n  let toStartMarker = document.createComment(\"[morph-start]\");\n  let toEndMarker = document.createComment(\"[morph-end]\");\n  toContainer.insertBefore(toStartMarker, toContainer.firstChild);\n  toContainer.appendChild(toEndMarker);\n  let toBlock = new Block(toStartMarker, toEndMarker);\n  if (window.Alpine && window.Alpine.closestDataStack) {\n    toContainer._x_dataStack = window.Alpine.closestDataStack(fromContainer);\n    toContainer._x_dataStack && window.Alpine.cloneNode(fromContainer, toContainer);\n  }\n  context.patchChildren(fromBlock, toBlock);\n}\nfunction createMorphContext(options = {}) {\n  let defaultGetKey = (el) => el.getAttribute(\"key\");\n  let noop = () => {\n  };\n  let context = {\n    key: options.key || defaultGetKey,\n    lookahead: options.lookahead || false,\n    updating: options.updating || noop,\n    updated: options.updated || noop,\n    removing: options.removing || noop,\n    removed: options.removed || noop,\n    adding: options.adding || noop,\n    added: options.added || noop\n  };\n  context.patch = function(from, to) {\n    if (context.differentElementNamesTypesOrKeys(from, to)) {\n      return context.swapElements(from, to);\n    }\n    let updateChildrenOnly = false;\n    let skipChildren = false;\n    let skipUntil = (predicate) => context.skipUntilCondition = predicate;\n    if (shouldSkipChildren(context.updating, () => skipChildren = true, skipUntil, from, to, () => updateChildrenOnly = true))\n      return;\n    if (from.nodeType === 1 && window.Alpine) {\n      window.Alpine.cloneNode(from, to);\n      if (from._x_teleport && to._x_teleport) {\n        context.patch(from._x_teleport, to._x_teleport);\n      }\n    }\n    if (textOrComment(to)) {\n      context.patchNodeValue(from, to);\n      context.updated(from, to);\n      return;\n    }\n    if (!updateChildrenOnly) {\n      context.patchAttributes(from, to);\n    }\n    context.updated(from, to);\n    if (!skipChildren) {\n      context.patchChildren(from, to);\n    }\n  };\n  context.differentElementNamesTypesOrKeys = function(from, to) {\n    return from.nodeType != to.nodeType || from.nodeName != to.nodeName || context.getKey(from) != context.getKey(to);\n  };\n  context.swapElements = function(from, to) {\n    if (shouldSkip(context.removing, from))\n      return;\n    let toCloned = to.cloneNode(true);\n    if (shouldSkip(context.adding, toCloned))\n      return;\n    from.replaceWith(toCloned);\n    context.removed(from);\n    context.added(toCloned);\n  };\n  context.patchNodeValue = function(from, to) {\n    let value = to.nodeValue;\n    if (from.nodeValue !== value) {\n      from.nodeValue = value;\n    }\n  };\n  context.patchAttributes = function(from, to) {\n    if (from._x_transitioning)\n      return;\n    if (from._x_isShown && !to._x_isShown) {\n      return;\n    }\n    if (!from._x_isShown && to._x_isShown) {\n      return;\n    }\n    let domAttributes = Array.from(from.attributes);\n    let toAttributes = Array.from(to.attributes);\n    for (let i = domAttributes.length - 1; i >= 0; i--) {\n      let name = domAttributes[i].name;\n      if (!to.hasAttribute(name)) {\n        if (name === \"open\" && from.nodeName === \"DIALOG\" && from.open) {\n          from.close();\n        } else {\n          from.removeAttribute(name);\n        }\n      }\n    }\n    for (let i = toAttributes.length - 1; i >= 0; i--) {\n      let name = toAttributes[i].name;\n      let value = toAttributes[i].value;\n      if (from.getAttribute(name) !== value) {\n        from.setAttribute(name, value);\n      }\n    }\n  };\n  context.patchChildren = function(from, to) {\n    let fromKeys = context.keyToMap(from.children);\n    let fromKeyHoldovers = {};\n    let currentTo = getFirstNode(to);\n    let currentFrom = getFirstNode(from);\n    while (currentTo) {\n      seedingMatchingId(currentTo, currentFrom);\n      let toKey = context.getKey(currentTo);\n      let fromKey = context.getKey(currentFrom);\n      if (context.skipUntilCondition) {\n        let fromDone = !currentFrom || context.skipUntilCondition(currentFrom);\n        let toDone = !currentTo || context.skipUntilCondition(currentTo);\n        if (fromDone && toDone) {\n          context.skipUntilCondition = null;\n        } else {\n          if (!fromDone)\n            currentFrom = currentFrom && getNextSibling(from, currentFrom);\n          if (!toDone)\n            currentTo = currentTo && getNextSibling(to, currentTo);\n          continue;\n        }\n      }\n      if (!currentFrom) {\n        if (toKey && fromKeyHoldovers[toKey]) {\n          let holdover = fromKeyHoldovers[toKey];\n          from.appendChild(holdover);\n          currentFrom = holdover;\n          fromKey = context.getKey(currentFrom);\n        } else {\n          if (!shouldSkip(context.adding, currentTo)) {\n            let clone = currentTo.cloneNode(true);\n            from.appendChild(clone);\n            context.added(clone);\n          }\n          currentTo = getNextSibling(to, currentTo);\n          continue;\n        }\n      }\n      let isIf = (node) => node && node.nodeType === 8 && node.textContent === \"[if BLOCK]><![endif]\";\n      let isEnd = (node) => node && node.nodeType === 8 && node.textContent === \"[if ENDBLOCK]><![endif]\";\n      if (isIf(currentTo) && isIf(currentFrom)) {\n        let nestedIfCount = 0;\n        let fromBlockStart = currentFrom;\n        while (currentFrom) {\n          let next = getNextSibling(from, currentFrom);\n          if (isIf(next)) {\n            nestedIfCount++;\n          } else if (isEnd(next) && nestedIfCount > 0) {\n            nestedIfCount--;\n          } else if (isEnd(next) && nestedIfCount === 0) {\n            currentFrom = next;\n            break;\n          }\n          currentFrom = next;\n        }\n        let fromBlockEnd = currentFrom;\n        nestedIfCount = 0;\n        let toBlockStart = currentTo;\n        while (currentTo) {\n          let next = getNextSibling(to, currentTo);\n          if (isIf(next)) {\n            nestedIfCount++;\n          } else if (isEnd(next) && nestedIfCount > 0) {\n            nestedIfCount--;\n          } else if (isEnd(next) && nestedIfCount === 0) {\n            currentTo = next;\n            break;\n          }\n          currentTo = next;\n        }\n        let toBlockEnd = currentTo;\n        let fromBlock = new Block(fromBlockStart, fromBlockEnd);\n        let toBlock = new Block(toBlockStart, toBlockEnd);\n        context.patchChildren(fromBlock, toBlock);\n        continue;\n      }\n      if (currentFrom.nodeType === 1 && context.lookahead && !currentFrom.isEqualNode(currentTo)) {\n        let nextToElementSibling = getNextSibling(to, currentTo);\n        let found = false;\n        while (!found && nextToElementSibling) {\n          if (nextToElementSibling.nodeType === 1 && currentFrom.isEqualNode(nextToElementSibling)) {\n            found = true;\n            currentFrom = context.addNodeBefore(from, currentTo, currentFrom);\n            fromKey = context.getKey(currentFrom);\n          }\n          nextToElementSibling = getNextSibling(to, nextToElementSibling);\n        }\n      }\n      if (toKey !== fromKey) {\n        if (!toKey && fromKey) {\n          fromKeyHoldovers[fromKey] = currentFrom;\n          currentFrom = context.addNodeBefore(from, currentTo, currentFrom);\n          fromKeyHoldovers[fromKey].remove();\n          currentFrom = getNextSibling(from, currentFrom);\n          currentTo = getNextSibling(to, currentTo);\n          continue;\n        }\n        if (toKey && !fromKey) {\n          if (fromKeys[toKey]) {\n            currentFrom.replaceWith(fromKeys[toKey]);\n            currentFrom = fromKeys[toKey];\n            fromKey = context.getKey(currentFrom);\n          }\n        }\n        if (toKey && fromKey) {\n          let fromKeyNode = fromKeys[toKey];\n          if (fromKeyNode) {\n            fromKeyHoldovers[fromKey] = currentFrom;\n            currentFrom.replaceWith(fromKeyNode);\n            currentFrom = fromKeyNode;\n            fromKey = context.getKey(currentFrom);\n          } else {\n            fromKeyHoldovers[fromKey] = currentFrom;\n            currentFrom = context.addNodeBefore(from, currentTo, currentFrom);\n            fromKeyHoldovers[fromKey].remove();\n            currentFrom = getNextSibling(from, currentFrom);\n            currentTo = getNextSibling(to, currentTo);\n            continue;\n          }\n        }\n      }\n      let currentFromNext = currentFrom && getNextSibling(from, currentFrom);\n      context.patch(currentFrom, currentTo);\n      if (currentFrom._x_lastRenderedEl) {\n        currentFromNext = getNextSibling(from, currentFrom._x_lastRenderedEl);\n      }\n      currentTo = currentTo && getNextSibling(to, currentTo);\n      currentFrom = currentFromNext;\n    }\n    let removals = [];\n    while (currentFrom) {\n      if (!shouldSkip(context.removing, currentFrom))\n        removals.push(currentFrom);\n      currentFrom = getNextSibling(from, currentFrom);\n    }\n    while (removals.length) {\n      let domForRemoval = removals.shift();\n      domForRemoval.remove();\n      context.removed(domForRemoval);\n    }\n  };\n  context.getKey = function(el) {\n    return el && el.nodeType === 1 && context.key(el);\n  };\n  context.keyToMap = function(els) {\n    let map = {};\n    for (let el of els) {\n      let theKey = context.getKey(el);\n      if (theKey) {\n        map[theKey] = el;\n      }\n    }\n    return map;\n  };\n  context.addNodeBefore = function(parent, node, beforeMe) {\n    if (!shouldSkip(context.adding, node)) {\n      let clone = node.cloneNode(true);\n      parent.insertBefore(clone, beforeMe);\n      context.added(clone);\n      return clone;\n    }\n    return node;\n  };\n  return context;\n}\nmorph.step = () => {\n};\nmorph.log = () => {\n};\nfunction shouldSkip(hook, ...args) {\n  let skip = false;\n  hook(...args, () => skip = true);\n  return skip;\n}\nfunction shouldSkipChildren(hook, skipChildren, skipUntil, ...args) {\n  let skip = false;\n  hook(...args, () => skip = true, skipChildren, skipUntil);\n  return skip;\n}\nvar patched = false;\nfunction createElement(html) {\n  const template = document.createElement(\"template\");\n  template.innerHTML = html;\n  return template.content.firstElementChild;\n}\nfunction textOrComment(el) {\n  return el.nodeType === 3 || el.nodeType === 8;\n}\nvar Block = class {\n  constructor(start, end) {\n    this.startComment = start;\n    this.endComment = end;\n  }\n  get children() {\n    let children = [];\n    let currentNode = this.startComment.nextSibling;\n    while (currentNode && currentNode !== this.endComment) {\n      children.push(currentNode);\n      currentNode = currentNode.nextSibling;\n    }\n    return children;\n  }\n  appendChild(child) {\n    this.endComment.before(child);\n  }\n  get firstChild() {\n    let first = this.startComment.nextSibling;\n    if (first === this.endComment)\n      return;\n    return first;\n  }\n  nextNode(reference) {\n    let next = reference.nextSibling;\n    if (next === this.endComment)\n      return;\n    return next;\n  }\n  insertBefore(newNode, reference) {\n    reference.before(newNode);\n    return newNode;\n  }\n};\nfunction getFirstNode(parent) {\n  return parent.firstChild;\n}\nfunction getNextSibling(parent, reference) {\n  let next;\n  if (parent instanceof Block) {\n    next = parent.nextNode(reference);\n  } else {\n    next = reference.nextSibling;\n  }\n  return next;\n}\nfunction monkeyPatchDomSetAttributeToAllowAtSymbols() {\n  if (patched)\n    return;\n  patched = true;\n  let original = Element.prototype.setAttribute;\n  let hostDiv = document.createElement(\"div\");\n  Element.prototype.setAttribute = function newSetAttribute(name, value) {\n    if (!name.includes(\"@\")) {\n      return original.call(this, name, value);\n    }\n    let escapedValue = value.replace(/&/g, \"&amp;\").replace(/\"/g, \"&quot;\");\n    hostDiv.innerHTML = `<span ${name}=\"${escapedValue}\"></span>`;\n    let attr = hostDiv.firstElementChild.getAttributeNode(name);\n    hostDiv.firstElementChild.removeAttributeNode(attr);\n    this.setAttributeNode(attr);\n  };\n}\nfunction seedingMatchingId(to, from) {\n  let fromId = from && from._x_bindings && from._x_bindings.id;\n  if (!fromId)\n    return;\n  if (!to.setAttribute)\n    return;\n  to.setAttribute(\"id\", fromId);\n  to.id = fromId;\n}\n\n// packages/morph/src/index.js\nfunction src_default(Alpine) {\n  Alpine.morph = morph;\n  Alpine.morphBetween = morphBetween;\n}\n\n// packages/morph/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default,\n  src_default as morph\n};\n","// packages/persist/src/index.js\nfunction src_default(Alpine) {\n  let persist = () => {\n    let alias;\n    let storage;\n    try {\n      storage = localStorage;\n    } catch (e) {\n      console.error(e);\n      console.warn(\"Alpine: $persist is using temporary storage since localStorage is unavailable.\");\n      let dummy = /* @__PURE__ */ new Map();\n      storage = {\n        getItem: (key) => dummy.has(key) ? dummy.get(key) : null,\n        setItem: dummy.set.bind(dummy)\n      };\n    }\n    return Alpine.interceptor((initialValue, getter, setter, path, key, cleanup = () => {\n    }) => {\n      let lookup = alias || `_x_${path}`;\n      let initial = storageHas(lookup, storage) ? storageGet(lookup, storage) : initialValue;\n      setter(initial);\n      let effect = Alpine.effect(() => {\n        let value = getter();\n        storageSet(lookup, value, storage);\n        setter(value);\n      });\n      cleanup(() => Alpine.release(effect));\n      return initial;\n    }, (func) => {\n      func.as = (key) => {\n        alias = key;\n        return func;\n      }, func.using = (target) => {\n        storage = target;\n        return func;\n      };\n    });\n  };\n  Object.defineProperty(Alpine, \"$persist\", { get: () => persist() });\n  Alpine.magic(\"persist\", persist);\n  Alpine.persist = (key, { get, set }, storage = localStorage) => {\n    let initial = storageHas(key, storage) ? storageGet(key, storage) : get();\n    set(initial);\n    Alpine.effect(() => {\n      let value = get();\n      storageSet(key, value, storage);\n      set(value);\n    });\n  };\n}\nfunction storageHas(key, storage) {\n  let value = storage.getItem(key);\n  return value !== null && value !== void 0;\n}\nfunction storageGet(key, storage) {\n  let value = storage.getItem(key);\n  if (value === void 0)\n    return;\n  return JSON.parse(value);\n}\nfunction storageSet(key, value, storage) {\n  if (value === void 0) {\n    storage.removeItem?.(key);\n    return;\n  }\n  storage.setItem(key, JSON.stringify(value));\n}\n\n// packages/persist/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default,\n  src_default as persist\n};\n","// packages/ui/src/list-context.js\nfunction generateContext(Alpine2, multiple, orientation, activateSelectedOrFirst) {\n  return {\n    /**\n     * Main state...\n     */\n    items: [],\n    activeKey: switchboard(),\n    orderedKeys: [],\n    activatedByKeyPress: false,\n    /**\n     *  Initialization...\n     */\n    activateSelectedOrFirst: Alpine2.debounce(function() {\n      activateSelectedOrFirst(false);\n    }),\n    registerItemsQueue: [],\n    registerItem(key, el, value, disabled) {\n      if (this.registerItemsQueue.length === 0) {\n        queueMicrotask(() => {\n          if (this.registerItemsQueue.length > 0) {\n            this.items = this.items.concat(this.registerItemsQueue);\n            this.registerItemsQueue = [];\n            this.reorderKeys();\n            this.activateSelectedOrFirst();\n          }\n        });\n      }\n      let item = {\n        key,\n        el,\n        value,\n        disabled\n      };\n      this.registerItemsQueue.push(item);\n    },\n    unregisterKeysQueue: [],\n    unregisterItem(key) {\n      if (this.unregisterKeysQueue.length === 0) {\n        queueMicrotask(() => {\n          if (this.unregisterKeysQueue.length > 0) {\n            this.items = this.items.filter((i) => !this.unregisterKeysQueue.includes(i.key));\n            this.orderedKeys = this.orderedKeys.filter((i) => !this.unregisterKeysQueue.includes(i));\n            this.unregisterKeysQueue = [];\n            this.reorderKeys();\n            this.activateSelectedOrFirst();\n          }\n        });\n      }\n      this.unregisterKeysQueue.push(key);\n    },\n    getItemByKey(key) {\n      return this.items.find((i) => i.key === key);\n    },\n    getItemByValue(value) {\n      return this.items.find((i) => Alpine2.raw(i.value) === Alpine2.raw(value));\n    },\n    getItemByEl(el) {\n      return this.items.find((i) => i.el === el);\n    },\n    getItemsByValues(values) {\n      let rawValues = values.map((i) => Alpine2.raw(i));\n      let filteredValue = this.items.filter((i) => rawValues.includes(Alpine2.raw(i.value)));\n      filteredValue = filteredValue.slice().sort((a, b) => {\n        let position = a.el.compareDocumentPosition(b.el);\n        if (position & Node.DOCUMENT_POSITION_FOLLOWING)\n          return -1;\n        if (position & Node.DOCUMENT_POSITION_PRECEDING)\n          return 1;\n        return 0;\n      });\n      return filteredValue;\n    },\n    getActiveItem() {\n      if (!this.hasActive())\n        return null;\n      let item = this.items.find((i) => i.key === this.activeKey.get());\n      if (!item)\n        this.deactivateKey(this.activeKey.get());\n      return item;\n    },\n    activateItem(item) {\n      if (!item)\n        return;\n      this.activateKey(item.key);\n    },\n    /**\n     * Handle elements...\n     */\n    reorderKeys: Alpine2.debounce(function() {\n      this.orderedKeys = this.items.map((i) => i.key);\n      this.orderedKeys = this.orderedKeys.slice().sort((a, z) => {\n        if (a === null || z === null)\n          return 0;\n        let aEl = this.items.find((i) => i.key === a).el;\n        let zEl = this.items.find((i) => i.key === z).el;\n        let position = aEl.compareDocumentPosition(zEl);\n        if (position & Node.DOCUMENT_POSITION_FOLLOWING)\n          return -1;\n        if (position & Node.DOCUMENT_POSITION_PRECEDING)\n          return 1;\n        return 0;\n      });\n      if (!this.orderedKeys.includes(this.activeKey.get()))\n        this.deactivateKey(this.activeKey.get());\n    }),\n    getActiveKey() {\n      return this.activeKey.get();\n    },\n    activeEl() {\n      if (!this.activeKey.get())\n        return;\n      return this.items.find((i) => i.key === this.activeKey.get()).el;\n    },\n    isActiveEl(el) {\n      let key = this.items.find((i) => i.el === el);\n      return this.activeKey.is(key);\n    },\n    activateEl(el) {\n      let item = this.items.find((i) => i.el === el);\n      this.activateKey(item.key);\n    },\n    isDisabledEl(el) {\n      return this.items.find((i) => i.el === el).disabled;\n    },\n    get isScrollingTo() {\n      return this.scrollingCount > 0;\n    },\n    scrollingCount: 0,\n    activateAndScrollToKey(key, activatedByKeyPress) {\n      if (!this.getItemByKey(key))\n        return;\n      this.scrollingCount++;\n      this.activateKey(key, activatedByKeyPress);\n      let targetEl = this.items.find((i) => i.key === key).el;\n      targetEl.scrollIntoView({ block: \"nearest\" });\n      setTimeout(() => {\n        this.scrollingCount--;\n      }, 25);\n    },\n    /**\n     * Handle disabled keys...\n     */\n    isDisabled(key) {\n      let item = this.items.find((i) => i.key === key);\n      if (!item)\n        return false;\n      return item.disabled;\n    },\n    get nonDisabledOrderedKeys() {\n      return this.orderedKeys.filter((i) => !this.isDisabled(i));\n    },\n    /**\n     * Handle activated keys...\n     */\n    hasActive() {\n      return !!this.activeKey.get();\n    },\n    /**\n     * Return true if the latest active element was activated\n     * by the user (i.e. using the arrow keys) and false if was\n     * activated automatically by alpine (i.e. first element automatically\n     * activated after filtering the list)\n     */\n    wasActivatedByKeyPress() {\n      return this.activatedByKeyPress;\n    },\n    isActiveKey(key) {\n      return this.activeKey.is(key);\n    },\n    activateKey(key, activatedByKeyPress = false) {\n      if (this.isDisabled(key))\n        return;\n      this.activeKey.set(key);\n      this.activatedByKeyPress = activatedByKeyPress;\n    },\n    deactivateKey(key) {\n      if (this.activeKey.get() === key) {\n        this.activeKey.set(null);\n        this.activatedByKeyPress = false;\n      }\n    },\n    deactivate() {\n      if (!this.activeKey.get())\n        return;\n      if (this.isScrollingTo)\n        return;\n      this.activeKey.set(null);\n      this.activatedByKeyPress = false;\n    },\n    /**\n     * Handle active key traversal...\n     */\n    nextKey() {\n      if (!this.activeKey.get())\n        return;\n      let index = this.nonDisabledOrderedKeys.findIndex((i) => i === this.activeKey.get());\n      return this.nonDisabledOrderedKeys[index + 1];\n    },\n    prevKey() {\n      if (!this.activeKey.get())\n        return;\n      let index = this.nonDisabledOrderedKeys.findIndex((i) => i === this.activeKey.get());\n      return this.nonDisabledOrderedKeys[index - 1];\n    },\n    firstKey() {\n      return this.nonDisabledOrderedKeys[0];\n    },\n    lastKey() {\n      return this.nonDisabledOrderedKeys[this.nonDisabledOrderedKeys.length - 1];\n    },\n    searchQuery: \"\",\n    clearSearch: Alpine2.debounce(function() {\n      this.searchQuery = \"\";\n    }, 350),\n    searchKey(query) {\n      this.clearSearch();\n      this.searchQuery += query;\n      let foundKey;\n      for (let key in this.items) {\n        let content = this.items[key].el.textContent.trim().toLowerCase();\n        if (content.startsWith(this.searchQuery)) {\n          foundKey = this.items[key].key;\n          break;\n        }\n      }\n      if (!this.nonDisabledOrderedKeys.includes(foundKey))\n        return;\n      return foundKey;\n    },\n    activateByKeyEvent(e, searchable = false, isOpen = () => false, open = () => {\n    }, setIsTyping) {\n      let targetKey, hasActive;\n      setIsTyping(true);\n      let activatedByKeyPress = true;\n      switch (e.key) {\n        case [\"ArrowDown\", \"ArrowRight\"][orientation === \"vertical\" ? 0 : 1]:\n          e.preventDefault();\n          e.stopPropagation();\n          setIsTyping(false);\n          if (!isOpen()) {\n            open();\n            break;\n          }\n          this.reorderKeys();\n          hasActive = this.hasActive();\n          targetKey = hasActive ? this.nextKey() : this.firstKey();\n          break;\n        case [\"ArrowUp\", \"ArrowLeft\"][orientation === \"vertical\" ? 0 : 1]:\n          e.preventDefault();\n          e.stopPropagation();\n          setIsTyping(false);\n          if (!isOpen()) {\n            open();\n            break;\n          }\n          this.reorderKeys();\n          hasActive = this.hasActive();\n          targetKey = hasActive ? this.prevKey() : this.lastKey();\n          break;\n        case \"Home\":\n        case \"PageUp\":\n          if (e.key == \"Home\" && e.shiftKey)\n            return;\n          e.preventDefault();\n          e.stopPropagation();\n          setIsTyping(false);\n          this.reorderKeys();\n          hasActive = this.hasActive();\n          targetKey = this.firstKey();\n          break;\n        case \"End\":\n        case \"PageDown\":\n          if (e.key == \"End\" && e.shiftKey)\n            return;\n          e.preventDefault();\n          e.stopPropagation();\n          setIsTyping(false);\n          this.reorderKeys();\n          hasActive = this.hasActive();\n          targetKey = this.lastKey();\n          break;\n        default:\n          activatedByKeyPress = this.activatedByKeyPress;\n          if (searchable && e.key.length === 1) {\n            targetKey = this.searchKey(e.key);\n          }\n          break;\n      }\n      if (targetKey) {\n        this.activateAndScrollToKey(targetKey, activatedByKeyPress);\n      }\n    }\n  };\n}\nfunction renderHiddenInputs(Alpine2, el, name, value) {\n  let newInputs = generateInputs(name, value);\n  newInputs.forEach((i) => i._x_hiddenInput = true);\n  newInputs.forEach((i) => i._x_ignore = true);\n  let children = el.children;\n  let oldInputs = [];\n  for (let i = 0; i < children.length; i++) {\n    let child = children[i];\n    if (child._x_hiddenInput)\n      oldInputs.push(child);\n    else\n      break;\n  }\n  Alpine2.mutateDom(() => {\n    oldInputs.forEach((i) => i.remove());\n    newInputs.reverse().forEach((i) => el.prepend(i));\n  });\n}\nfunction generateInputs(name, value, carry = []) {\n  if (isObjectOrArray(value)) {\n    for (let key in value) {\n      carry = carry.concat(\n        generateInputs(`${name}[${key}]`, value[key])\n      );\n    }\n  } else {\n    let el = document.createElement(\"input\");\n    el.setAttribute(\"type\", \"hidden\");\n    el.setAttribute(\"name\", name);\n    el.setAttribute(\"value\", \"\" + value);\n    return [el];\n  }\n  return carry;\n}\nfunction isObjectOrArray(subject) {\n  return typeof subject === \"object\" && subject !== null;\n}\nfunction switchboard(value) {\n  let lookup = {};\n  let current;\n  let changeTracker = Alpine.reactive({ state: false });\n  let get = () => {\n    if (changeTracker.state) {\n    }\n    return current;\n  };\n  let set = (newValue) => {\n    if (newValue === current)\n      return;\n    if (current !== void 0)\n      lookup[current].state = false;\n    current = newValue;\n    if (lookup[newValue] === void 0) {\n      lookup[newValue] = Alpine.reactive({ state: true });\n    } else {\n      lookup[newValue].state = true;\n    }\n    changeTracker.state = !changeTracker.state;\n  };\n  let is = (comparisonValue) => {\n    if (lookup[comparisonValue] === void 0) {\n      lookup[comparisonValue] = Alpine.reactive({ state: false });\n      return lookup[comparisonValue].state;\n    }\n    return !!lookup[comparisonValue].state;\n  };\n  value === void 0 || set(value);\n  return { get, set, is };\n}\n\n// packages/ui/src/combobox.js\nfunction combobox_default(Alpine2) {\n  Alpine2.directive(\"combobox\", (el, directive, { evaluate }) => {\n    if (directive.value === \"input\")\n      handleInput(el, Alpine2);\n    else if (directive.value === \"button\")\n      handleButton(el, Alpine2);\n    else if (directive.value === \"label\")\n      handleLabel(el, Alpine2);\n    else if (directive.value === \"options\")\n      handleOptions(el, Alpine2);\n    else if (directive.value === \"option\")\n      handleOption(el, Alpine2, directive, evaluate);\n    else\n      handleRoot(el, Alpine2);\n  }).before(\"bind\");\n  Alpine2.magic(\"combobox\", (el) => {\n    let data = Alpine2.$data(el);\n    return {\n      get value() {\n        return data.__value;\n      },\n      get isOpen() {\n        return data.__isOpen;\n      },\n      get isDisabled() {\n        return data.__isDisabled;\n      },\n      get activeOption() {\n        let active = data.__context?.getActiveItem();\n        return active && active.value;\n      },\n      get activeIndex() {\n        let active = data.__context?.getActiveItem();\n        if (active) {\n          return Object.values(Alpine2.raw(data.__context.items)).findIndex((i) => Alpine2.raw(active) == Alpine2.raw(i));\n        }\n        return null;\n      }\n    };\n  });\n  Alpine2.magic(\"comboboxOption\", (el) => {\n    let data = Alpine2.$data(el);\n    let optionEl = Alpine2.findClosest(el, (i) => {\n      return i.hasAttribute(\"x-combobox:option\");\n    });\n    if (!optionEl)\n      throw \"No x-combobox:option directive found...\";\n    return {\n      get isActive() {\n        return data.__context.isActiveKey(Alpine2.$data(optionEl).__optionKey);\n      },\n      get isSelected() {\n        return data.__isSelected(optionEl);\n      },\n      get isDisabled() {\n        return data.__context.isDisabled(Alpine2.$data(optionEl).__optionKey);\n      }\n    };\n  });\n}\nfunction handleRoot(el, Alpine2) {\n  Alpine2.bind(el, {\n    // Setup...\n    \"x-id\"() {\n      return [\"alpine-combobox-button\", \"alpine-combobox-options\", \"alpine-combobox-label\"];\n    },\n    \"x-modelable\": \"__value\",\n    // Initialize...\n    \"x-data\"() {\n      return {\n        /**\n         * Combobox state...\n         */\n        __ready: false,\n        __value: null,\n        __isOpen: false,\n        __context: void 0,\n        __isMultiple: void 0,\n        __isStatic: false,\n        __isDisabled: void 0,\n        __displayValue: void 0,\n        __compareBy: null,\n        __inputName: null,\n        __isTyping: false,\n        __hold: false,\n        /**\n         * Combobox initialization...\n         */\n        init() {\n          this.__isMultiple = Alpine2.extractProp(el, \"multiple\", false);\n          this.__isDisabled = Alpine2.extractProp(el, \"disabled\", false);\n          this.__inputName = Alpine2.extractProp(el, \"name\", null);\n          this.__nullable = Alpine2.extractProp(el, \"nullable\", false);\n          this.__compareBy = Alpine2.extractProp(el, \"by\");\n          this.__context = generateContext(Alpine2, this.__isMultiple, \"vertical\", () => this.__activateSelectedOrFirst());\n          let defaultValue = Alpine2.extractProp(el, \"default-value\", this.__isMultiple ? [] : null);\n          this.__value = defaultValue;\n          queueMicrotask(() => {\n            Alpine2.effect(() => {\n              this.__inputName && renderHiddenInputs(Alpine2, this.$el, this.__inputName, this.__value);\n            });\n            Alpine2.effect(() => !this.__isMultiple && this.__resetInput());\n          });\n        },\n        __startTyping() {\n          this.__isTyping = true;\n        },\n        __stopTyping() {\n          this.__isTyping = false;\n        },\n        __resetInput() {\n          let input = this.$refs.__input;\n          if (!input)\n            return;\n          let value = this.__getCurrentValue();\n          input.value = value;\n        },\n        __getCurrentValue() {\n          if (!this.$refs.__input)\n            return \"\";\n          if (!this.__value)\n            return \"\";\n          if (this.__displayValue)\n            return this.__displayValue(this.__value);\n          if (typeof this.__value === \"string\")\n            return this.__value;\n          return \"\";\n        },\n        __open() {\n          if (this.__isOpen)\n            return;\n          this.__isOpen = true;\n          let input = this.$refs.__input;\n          if (input) {\n            let value = input.value;\n            let { selectionStart, selectionEnd, selectionDirection } = input;\n            input.value = \"\";\n            input.dispatchEvent(new Event(\"change\"));\n            input.value = value;\n            if (selectionDirection !== null) {\n              input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n            } else {\n              input.setSelectionRange(selectionStart, selectionEnd);\n            }\n          }\n          let nextTick = (callback) => requestAnimationFrame(() => requestAnimationFrame(callback));\n          nextTick(() => {\n            this.$refs.__input.focus({ preventScroll: true });\n            this.__activateSelectedOrFirst();\n          });\n        },\n        __close() {\n          this.__isOpen = false;\n          this.__context.deactivate();\n        },\n        __activateSelectedOrFirst(activateSelected = true) {\n          if (!this.__isOpen)\n            return;\n          if (this.__context.hasActive() && this.__context.wasActivatedByKeyPress())\n            return;\n          let firstSelectedValue;\n          if (this.__isMultiple) {\n            let selectedItem = this.__context.getItemsByValues(this.__value);\n            firstSelectedValue = selectedItem.length ? selectedItem[0].value : null;\n          } else {\n            firstSelectedValue = this.__value;\n          }\n          let firstSelected = null;\n          if (activateSelected && firstSelectedValue) {\n            firstSelected = this.__context.getItemByValue(firstSelectedValue);\n          }\n          if (firstSelected) {\n            this.__context.activateAndScrollToKey(firstSelected.key);\n            return;\n          }\n          this.__context.activateAndScrollToKey(this.__context.firstKey());\n        },\n        __selectActive() {\n          let active = this.__context.getActiveItem();\n          if (active)\n            this.__toggleSelected(active.value);\n        },\n        __selectOption(el2) {\n          let item = this.__context.getItemByEl(el2);\n          if (item)\n            this.__toggleSelected(item.value);\n        },\n        __isSelected(el2) {\n          let item = this.__context.getItemByEl(el2);\n          if (!item)\n            return false;\n          if (item.value === null || item.value === void 0)\n            return false;\n          return this.__hasSelected(item.value);\n        },\n        __toggleSelected(value) {\n          if (!this.__isMultiple) {\n            this.__value = value;\n            return;\n          }\n          let index = this.__value.findIndex((j) => this.__compare(j, value));\n          if (index === -1) {\n            this.__value.push(value);\n          } else {\n            this.__value.splice(index, 1);\n          }\n        },\n        __hasSelected(value) {\n          if (!this.__isMultiple)\n            return this.__compare(this.__value, value);\n          return this.__value.some((i) => this.__compare(i, value));\n        },\n        __compare(a, b) {\n          let by = this.__compareBy;\n          if (!by)\n            by = (a2, b2) => Alpine2.raw(a2) === Alpine2.raw(b2);\n          if (typeof by === \"string\") {\n            let property = by;\n            by = (a2, b2) => {\n              if (!a2 || typeof a2 !== \"object\" || (!b2 || typeof b2 !== \"object\")) {\n                return Alpine2.raw(a2) === Alpine2.raw(b2);\n              }\n              return a2[property] === b2[property];\n            };\n          }\n          return by(a, b);\n        }\n      };\n    },\n    // Register event listeners..\n    \"@mousedown.window\"(e) {\n      if (!!!this.$refs.__input.contains(e.target) && !this.$refs.__button.contains(e.target) && !this.$refs.__options.contains(e.target)) {\n        this.__close();\n        this.__resetInput();\n      }\n    }\n  });\n}\nfunction handleInput(el, Alpine2) {\n  Alpine2.bind(el, {\n    // Setup...\n    \"x-ref\": \"__input\",\n    \":id\"() {\n      return this.$id(\"alpine-combobox-input\");\n    },\n    // Accessibility attributes...\n    \"role\": \"combobox\",\n    \"tabindex\": \"0\",\n    \"aria-autocomplete\": \"list\",\n    // We need to defer this evaluation a bit because $refs that get declared later\n    // in the DOM aren't available yet when x-ref is the result of an Alpine.bind object.\n    async \":aria-controls\"() {\n      return await microtask(() => this.$refs.__options && this.$refs.__options.id);\n    },\n    \":aria-expanded\"() {\n      return this.$data.__isDisabled ? void 0 : this.$data.__isOpen;\n    },\n    \":aria-multiselectable\"() {\n      return this.$data.__isMultiple ? true : void 0;\n    },\n    \":aria-activedescendant\"() {\n      if (!this.$data.__context.hasActive())\n        return;\n      let active = this.$data.__context.getActiveItem();\n      return active ? active.el.id : null;\n    },\n    \":aria-labelledby\"() {\n      return this.$refs.__label ? this.$refs.__label.id : this.$refs.__button ? this.$refs.__button.id : null;\n    },\n    // Initialize...\n    \"x-init\"() {\n      let displayValueFn = Alpine2.extractProp(this.$el, \"display-value\");\n      if (displayValueFn)\n        this.$data.__displayValue = displayValueFn;\n    },\n    // Register listeners...\n    \"@input.stop\"(e) {\n      if (this.$data.__isTyping) {\n        this.$data.__open();\n        this.$dispatch(\"change\");\n      }\n    },\n    \"@blur\"() {\n      this.$data.__stopTyping(false);\n    },\n    \"@keydown\"(e) {\n      queueMicrotask(() => this.$data.__context.activateByKeyEvent(e, false, () => this.$data.__isOpen, () => this.$data.__open(), (state) => this.$data.__isTyping = state));\n    },\n    \"@keydown.enter.prevent.stop\"() {\n      this.$data.__selectActive();\n      this.$data.__stopTyping();\n      if (!this.$data.__isMultiple) {\n        this.$data.__close();\n        this.$data.__resetInput();\n      }\n    },\n    \"@keydown.escape.prevent\"(e) {\n      if (!this.$data.__static)\n        e.stopPropagation();\n      this.$data.__stopTyping();\n      this.$data.__close();\n      this.$data.__resetInput();\n    },\n    \"@keydown.tab\"() {\n      this.$data.__stopTyping();\n      if (this.$data.__isOpen) {\n        this.$data.__close();\n      }\n      this.$data.__resetInput();\n    },\n    \"@keydown.backspace\"(e) {\n      if (this.$data.__isMultiple)\n        return;\n      if (!this.$data.__nullable)\n        return;\n      let input = e.target;\n      requestAnimationFrame(() => {\n        if (input.value === \"\") {\n          this.$data.__value = null;\n          let options = this.$refs.__options;\n          if (options) {\n            options.scrollTop = 0;\n          }\n          this.$data.__context.deactivate();\n        }\n      });\n    }\n  });\n}\nfunction handleButton(el, Alpine2) {\n  Alpine2.bind(el, {\n    // Setup...\n    \"x-ref\": \"__button\",\n    \":id\"() {\n      return this.$id(\"alpine-combobox-button\");\n    },\n    // Accessibility attributes...\n    \"aria-haspopup\": \"true\",\n    // We need to defer this evaluation a bit because $refs that get declared later\n    // in the DOM aren't available yet when x-ref is the result of an Alpine.bind object.\n    async \":aria-controls\"() {\n      return await microtask(() => this.$refs.__options && this.$refs.__options.id);\n    },\n    \":aria-labelledby\"() {\n      return this.$refs.__label ? [this.$refs.__label.id, this.$el.id].join(\" \") : null;\n    },\n    \":aria-expanded\"() {\n      return this.$data.__isDisabled ? null : this.$data.__isOpen;\n    },\n    \":disabled\"() {\n      return this.$data.__isDisabled;\n    },\n    \"tabindex\": \"-1\",\n    // Initialize....\n    \"x-init\"() {\n      if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\"))\n        this.$el.type = \"button\";\n    },\n    // Register listeners...\n    \"@click\"(e) {\n      if (this.$data.__isDisabled)\n        return;\n      if (this.$data.__isOpen) {\n        this.$data.__close();\n        this.$data.__resetInput();\n      } else {\n        e.preventDefault();\n        this.$data.__open();\n      }\n      this.$nextTick(() => this.$refs.__input.focus({ preventScroll: true }));\n    }\n  });\n}\nfunction handleLabel(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-ref\": \"__label\",\n    \":id\"() {\n      return this.$id(\"alpine-combobox-label\");\n    },\n    \"@click\"() {\n      this.$refs.__input.focus({ preventScroll: true });\n    }\n  });\n}\nfunction handleOptions(el, Alpine2) {\n  Alpine2.bind(el, {\n    // Setup...\n    \"x-ref\": \"__options\",\n    \":id\"() {\n      return this.$id(\"alpine-combobox-options\");\n    },\n    // Accessibility attributes...\n    \"role\": \"listbox\",\n    \":aria-labelledby\"() {\n      return this.$refs.__label ? this.$refs.__label.id : this.$refs.__button ? this.$refs.__button.id : null;\n    },\n    // Initialize...\n    \"x-init\"() {\n      this.$data.__isStatic = Alpine2.bound(this.$el, \"static\", false);\n      if (Alpine2.bound(this.$el, \"hold\")) {\n        this.$data.__hold = true;\n      }\n    },\n    \"x-show\"() {\n      return this.$data.__isStatic ? true : this.$data.__isOpen;\n    }\n  });\n}\nfunction handleOption(el, Alpine2) {\n  Alpine2.bind(el, {\n    // Setup...\n    \"x-id\"() {\n      return [\"alpine-combobox-option\"];\n    },\n    \":id\"() {\n      return this.$id(\"alpine-combobox-option\");\n    },\n    // Accessibility attributes...\n    \"role\": \"option\",\n    \":tabindex\"() {\n      return this.$comboboxOption.isDisabled ? void 0 : \"-1\";\n    },\n    // Only the active element should have aria-selected=\"true\"...\n    \"x-effect\"() {\n      this.$comboboxOption.isSelected ? el.setAttribute(\"aria-selected\", true) : el.setAttribute(\"aria-selected\", false);\n    },\n    \":aria-disabled\"() {\n      return this.$comboboxOption.isDisabled;\n    },\n    // Initialize...\n    \"x-data\"() {\n      return {\n        \"__optionKey\": null,\n        init() {\n          this.__optionKey = (Math.random() + 1).toString(36).substring(7);\n          let value = Alpine2.extractProp(this.$el, \"value\");\n          let disabled = Alpine2.extractProp(this.$el, \"disabled\", false, false);\n          this.__context.registerItem(this.__optionKey, this.$el, value, disabled);\n        },\n        destroy() {\n          this.__context.unregisterItem(this.__optionKey);\n        }\n      };\n    },\n    // Register listeners...\n    \"@click\"() {\n      if (this.$comboboxOption.isDisabled)\n        return;\n      this.__selectOption(this.$el);\n      if (!this.__isMultiple) {\n        this.__close();\n        this.__resetInput();\n      }\n      this.$nextTick(() => this.$refs.__input.focus({ preventScroll: true }));\n    },\n    \"@mouseenter\"(e) {\n      this.__context.activateEl(this.$el);\n    },\n    \"@mousemove\"(e) {\n      if (this.__context.isActiveEl(this.$el))\n        return;\n      this.__context.activateEl(this.$el);\n    },\n    \"@mouseleave\"(e) {\n      if (this.__hold)\n        return;\n      this.__context.deactivate();\n    }\n  });\n}\nfunction microtask(callback) {\n  return new Promise((resolve) => queueMicrotask(() => resolve(callback())));\n}\n\n// packages/ui/src/dialog.js\nfunction dialog_default(Alpine2) {\n  Alpine2.directive(\"dialog\", (el, directive) => {\n    if (directive.value === \"overlay\")\n      handleOverlay(el, Alpine2);\n    else if (directive.value === \"panel\")\n      handlePanel(el, Alpine2);\n    else if (directive.value === \"title\")\n      handleTitle(el, Alpine2);\n    else if (directive.value === \"description\")\n      handleDescription(el, Alpine2);\n    else\n      handleRoot2(el, Alpine2);\n  });\n  Alpine2.magic(\"dialog\", (el) => {\n    let $data = Alpine2.$data(el);\n    return {\n      // Kept here for legacy. Remove after out of beta.\n      get open() {\n        return $data.__isOpen;\n      },\n      get isOpen() {\n        return $data.__isOpen;\n      },\n      close() {\n        $data.__close();\n      }\n    };\n  });\n}\nfunction handleRoot2(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-data\"() {\n      return {\n        init() {\n          Alpine2.bound(el, \"open\") !== void 0 && Alpine2.effect(() => {\n            this.__isOpenState = Alpine2.bound(el, \"open\");\n          });\n          if (Alpine2.bound(el, \"initial-focus\") !== void 0)\n            this.$watch(\"__isOpenState\", () => {\n              if (!this.__isOpenState)\n                return;\n              setTimeout(() => {\n                Alpine2.bound(el, \"initial-focus\").focus();\n              }, 0);\n            });\n        },\n        __isOpenState: false,\n        __close() {\n          if (Alpine2.bound(el, \"open\"))\n            this.$dispatch(\"close\");\n          else\n            this.__isOpenState = false;\n        },\n        get __isOpen() {\n          return Alpine2.bound(el, \"static\", this.__isOpenState);\n        }\n      };\n    },\n    \"x-modelable\": \"__isOpenState\",\n    \"x-id\"() {\n      return [\"alpine-dialog-title\", \"alpine-dialog-description\"];\n    },\n    \"x-show\"() {\n      return this.__isOpen;\n    },\n    \"x-trap.inert.noscroll\"() {\n      return this.__isOpen;\n    },\n    \"@keydown.escape\"() {\n      this.__close();\n    },\n    \":aria-labelledby\"() {\n      return this.$id(\"alpine-dialog-title\");\n    },\n    \":aria-describedby\"() {\n      return this.$id(\"alpine-dialog-description\");\n    },\n    \"role\": \"dialog\",\n    \"aria-modal\": \"true\"\n  });\n}\nfunction handleOverlay(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      if (this.$data.__isOpen === void 0)\n        console.warn('\"x-dialog:overlay\" is missing a parent element with \"x-dialog\".');\n    },\n    \"x-show\"() {\n      return this.__isOpen;\n    },\n    \"@click.prevent.stop\"() {\n      this.$data.__close();\n    }\n  });\n}\nfunction handlePanel(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"@click.outside\"() {\n      this.$data.__close();\n    },\n    \"x-show\"() {\n      return this.$data.__isOpen;\n    }\n  });\n}\nfunction handleTitle(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      if (this.$data.__isOpen === void 0)\n        console.warn('\"x-dialog:title\" is missing a parent element with \"x-dialog\".');\n    },\n    \":id\"() {\n      return this.$id(\"alpine-dialog-title\");\n    }\n  });\n}\nfunction handleDescription(el, Alpine2) {\n  Alpine2.bind(el, {\n    \":id\"() {\n      return this.$id(\"alpine-dialog-description\");\n    }\n  });\n}\n\n// packages/ui/src/disclosure.js\nfunction disclosure_default(Alpine2) {\n  Alpine2.directive(\"disclosure\", (el, directive) => {\n    if (!directive.value)\n      handleRoot3(el, Alpine2);\n    else if (directive.value === \"panel\")\n      handlePanel2(el, Alpine2);\n    else if (directive.value === \"button\")\n      handleButton2(el, Alpine2);\n  }).before(\"bind\");\n  Alpine2.magic(\"disclosure\", (el) => {\n    let $data = Alpine2.$data(el);\n    return {\n      get isOpen() {\n        return $data.__isOpen;\n      },\n      close() {\n        $data.__close();\n      }\n    };\n  });\n}\nfunction handleRoot3(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-modelable\": \"__isOpen\",\n    \"x-data\"() {\n      return {\n        // The panel will call this...\n        // We can't do this inside a microtask in x-init because, when default-open is set to \"true\",\n        // It will cause the panel to transition in for the first time, instead of showing instantly...\n        __determineDefaultOpenState() {\n          let defaultIsOpen = Boolean(Alpine2.bound(this.$el, \"default-open\", false));\n          if (defaultIsOpen)\n            this.__isOpen = defaultIsOpen;\n        },\n        __isOpen: false,\n        __close() {\n          this.__isOpen = false;\n        },\n        __toggle() {\n          this.__isOpen = !this.__isOpen;\n        }\n      };\n    },\n    \"x-id\"() {\n      return [\"alpine-disclosure-panel\"];\n    }\n  });\n}\nfunction handleButton2(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\"))\n        this.$el.type = \"button\";\n    },\n    \"@click\"() {\n      this.$data.__isOpen = !this.$data.__isOpen;\n    },\n    \":aria-expanded\"() {\n      return this.$data.__isOpen;\n    },\n    \":aria-controls\"() {\n      return this.$data.$id(\"alpine-disclosure-panel\");\n    },\n    \"@keydown.space.prevent.stop\"() {\n      this.$data.__toggle();\n    },\n    \"@keydown.enter.prevent.stop\"() {\n      this.$data.__toggle();\n    },\n    // Required for firefox, event.preventDefault() in handleKeyDown for\n    // the Space key doesn't cancel the handleKeyUp, which in turn\n    // triggers a *click*.\n    \"@keyup.space.prevent\"() {\n    }\n  });\n}\nfunction handlePanel2(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      this.$data.__determineDefaultOpenState();\n    },\n    \"x-show\"() {\n      return this.$data.__isOpen;\n    },\n    \":id\"() {\n      return this.$data.$id(\"alpine-disclosure-panel\");\n    }\n  });\n}\n\n// packages/ui/src/listbox.js\nfunction listbox_default(Alpine2) {\n  Alpine2.directive(\"listbox\", (el, directive) => {\n    if (!directive.value)\n      handleRoot4(el, Alpine2);\n    else if (directive.value === \"label\")\n      handleLabel2(el, Alpine2);\n    else if (directive.value === \"button\")\n      handleButton3(el, Alpine2);\n    else if (directive.value === \"options\")\n      handleOptions2(el, Alpine2);\n    else if (directive.value === \"option\")\n      handleOption2(el, Alpine2);\n  }).before(\"bind\");\n  Alpine2.magic(\"listbox\", (el) => {\n    let data = Alpine2.$data(el);\n    return {\n      // @deprecated:\n      get selected() {\n        return data.__value;\n      },\n      // @deprecated:\n      get active() {\n        let active = data.__context.getActiveItem();\n        return active && active.value;\n      },\n      get value() {\n        return data.__value;\n      },\n      get isOpen() {\n        return data.__isOpen;\n      },\n      get isDisabled() {\n        return data.__isDisabled;\n      },\n      get activeOption() {\n        let active = data.__context.getActiveItem();\n        return active && active.value;\n      },\n      get activeIndex() {\n        let active = data.__context.getActiveItem();\n        return active && active.key;\n      }\n    };\n  });\n  Alpine2.magic(\"listboxOption\", (el) => {\n    let data = Alpine2.$data(el);\n    let optionEl = Alpine2.findClosest(el, (i) => {\n      return i.hasAttribute(\"x-listbox:option\");\n    });\n    if (!optionEl)\n      throw \"No x-listbox:option directive found...\";\n    return {\n      get isActive() {\n        return data.__context.isActiveKey(Alpine2.$data(optionEl).__optionKey);\n      },\n      get isSelected() {\n        return data.__isSelected(optionEl);\n      },\n      get isDisabled() {\n        return data.__context.isDisabled(Alpine2.$data(optionEl).__optionKey);\n      }\n    };\n  });\n}\nfunction handleRoot4(el, Alpine2) {\n  Alpine2.bind(el, {\n    // Setup...\n    \"x-id\"() {\n      return [\"alpine-listbox-button\", \"alpine-listbox-options\", \"alpine-listbox-label\"];\n    },\n    \"x-modelable\": \"__value\",\n    // Initialize...\n    \"x-data\"() {\n      return {\n        /**\n         * Listbox state...\n         */\n        __ready: false,\n        __value: null,\n        __isOpen: false,\n        __context: void 0,\n        __isMultiple: void 0,\n        __isStatic: false,\n        __isDisabled: void 0,\n        __compareBy: null,\n        __inputName: null,\n        __orientation: \"vertical\",\n        __hold: false,\n        /**\n         * Listbox initialization...\n         */\n        init() {\n          this.__isMultiple = Alpine2.extractProp(el, \"multiple\", false);\n          this.__isDisabled = Alpine2.extractProp(el, \"disabled\", false);\n          this.__inputName = Alpine2.extractProp(el, \"name\", null);\n          this.__compareBy = Alpine2.extractProp(el, \"by\");\n          this.__orientation = Alpine2.extractProp(el, \"horizontal\", false) ? \"horizontal\" : \"vertical\";\n          this.__context = generateContext(Alpine2, this.__isMultiple, this.__orientation, () => this.__activateSelectedOrFirst());\n          let defaultValue = Alpine2.extractProp(el, \"default-value\", this.__isMultiple ? [] : null);\n          this.__value = defaultValue;\n          queueMicrotask(() => {\n            Alpine2.effect(() => {\n              this.__inputName && renderHiddenInputs(Alpine2, this.$el, this.__inputName, this.__value);\n            });\n            Alpine2.effect(() => {\n              this.__resetInput();\n            });\n          });\n        },\n        __resetInput() {\n          let input = this.$refs.__input;\n          if (!input)\n            return;\n          let value = this.$data.__getCurrentValue();\n          input.value = value;\n        },\n        __getCurrentValue() {\n          if (!this.$refs.__input)\n            return \"\";\n          if (!this.__value)\n            return \"\";\n          if (this.$data.__displayValue && this.__value !== void 0)\n            return this.$data.__displayValue(this.__value);\n          if (typeof this.__value === \"string\")\n            return this.__value;\n          return \"\";\n        },\n        __open() {\n          if (this.__isOpen)\n            return;\n          this.__isOpen = true;\n          this.__activateSelectedOrFirst();\n          let nextTick = (callback) => requestAnimationFrame(() => requestAnimationFrame(callback));\n          nextTick(() => this.$refs.__options.focus({ preventScroll: true }));\n        },\n        __close() {\n          this.__isOpen = false;\n          this.__context.deactivate();\n          this.$nextTick(() => this.$refs.__button.focus({ preventScroll: true }));\n        },\n        __activateSelectedOrFirst(activateSelected = true) {\n          if (!this.__isOpen)\n            return;\n          if (this.__context.getActiveKey()) {\n            this.__context.activateAndScrollToKey(this.__context.getActiveKey());\n            return;\n          }\n          let firstSelectedValue;\n          if (this.__isMultiple) {\n            firstSelectedValue = this.__value.find((i) => {\n              return !!this.__context.getItemByValue(i);\n            });\n          } else {\n            firstSelectedValue = this.__value;\n          }\n          if (activateSelected && firstSelectedValue) {\n            let firstSelected = this.__context.getItemByValue(firstSelectedValue);\n            firstSelected && this.__context.activateAndScrollToKey(firstSelected.key);\n          } else {\n            this.__context.activateAndScrollToKey(this.__context.firstKey());\n          }\n        },\n        __selectActive() {\n          let active = this.$data.__context.getActiveItem();\n          if (active)\n            this.__toggleSelected(active.value);\n        },\n        __selectOption(el2) {\n          let item = this.__context.getItemByEl(el2);\n          if (item)\n            this.__toggleSelected(item.value);\n        },\n        __isSelected(el2) {\n          let item = this.__context.getItemByEl(el2);\n          if (!item)\n            return false;\n          if (item.value === null || item.value === void 0)\n            return false;\n          return this.__hasSelected(item.value);\n        },\n        __toggleSelected(value) {\n          if (!this.__isMultiple) {\n            this.__value = value;\n            return;\n          }\n          let index = this.__value.findIndex((j) => this.__compare(j, value));\n          if (index === -1) {\n            this.__value.push(value);\n          } else {\n            this.__value.splice(index, 1);\n          }\n        },\n        __hasSelected(value) {\n          if (!this.__isMultiple)\n            return this.__compare(this.__value, value);\n          return this.__value.some((i) => this.__compare(i, value));\n        },\n        __compare(a, b) {\n          let by = this.__compareBy;\n          if (!by)\n            by = (a2, b2) => Alpine2.raw(a2) === Alpine2.raw(b2);\n          if (typeof by === \"string\") {\n            let property = by;\n            by = (a2, b2) => {\n              if (!a2 || typeof a2 !== \"object\" || (!b2 || typeof b2 !== \"object\")) {\n                return Alpine2.raw(a2) === Alpine2.raw(b2);\n              }\n              return a2[property] === b2[property];\n            };\n          }\n          return by(a, b);\n        }\n      };\n    }\n  });\n}\nfunction handleLabel2(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-ref\": \"__label\",\n    \":id\"() {\n      return this.$id(\"alpine-listbox-label\");\n    },\n    \"@click\"() {\n      this.$refs.__button.focus({ preventScroll: true });\n    }\n  });\n}\nfunction handleButton3(el, Alpine2) {\n  Alpine2.bind(el, {\n    // Setup...\n    \"x-ref\": \"__button\",\n    \":id\"() {\n      return this.$id(\"alpine-listbox-button\");\n    },\n    // Accessibility attributes...\n    \"aria-haspopup\": \"true\",\n    \":aria-labelledby\"() {\n      return this.$id(\"alpine-listbox-label\");\n    },\n    \":aria-expanded\"() {\n      return this.$data.__isOpen;\n    },\n    \":aria-controls\"() {\n      return this.$data.__isOpen && this.$id(\"alpine-listbox-options\");\n    },\n    // Initialize....\n    \"x-init\"() {\n      if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\"))\n        this.$el.type = \"button\";\n    },\n    // Register listeners...\n    \"@click\"() {\n      this.$data.__open();\n    },\n    \"@keydown\"(e) {\n      if ([\"ArrowDown\", \"ArrowUp\", \"ArrowLeft\", \"ArrowRight\"].includes(e.key)) {\n        e.stopPropagation();\n        e.preventDefault();\n        this.$data.__open();\n      }\n    },\n    \"@keydown.space.stop.prevent\"() {\n      this.$data.__open();\n    },\n    \"@keydown.enter.stop.prevent\"() {\n      this.$data.__open();\n    }\n  });\n}\nfunction handleOptions2(el, Alpine2) {\n  Alpine2.bind(el, {\n    // Setup...\n    \"x-ref\": \"__options\",\n    \":id\"() {\n      return this.$id(\"alpine-listbox-options\");\n    },\n    // Accessibility attributes...\n    \"role\": \"listbox\",\n    tabindex: \"0\",\n    \":aria-orientation\"() {\n      return this.$data.__orientation;\n    },\n    \":aria-labelledby\"() {\n      return this.$id(\"alpine-listbox-button\");\n    },\n    \":aria-activedescendant\"() {\n      if (!this.$data.__context.hasActive())\n        return;\n      let active = this.$data.__context.getActiveItem();\n      return active ? active.el.id : null;\n    },\n    // Initialize...\n    \"x-init\"() {\n      this.$data.__isStatic = Alpine2.extractProp(this.$el, \"static\", false);\n      if (Alpine2.bound(this.$el, \"hold\")) {\n        this.$data.__hold = true;\n      }\n    },\n    \"x-show\"() {\n      return this.$data.__isStatic ? true : this.$data.__isOpen;\n    },\n    \"x-trap\"() {\n      return this.$data.__isOpen;\n    },\n    \"@click.outside\"() {\n      this.$data.__close();\n    },\n    \"@keydown.escape.stop.prevent\"() {\n      this.$data.__close();\n    },\n    \"@focus\"() {\n      this.$data.__activateSelectedOrFirst();\n    },\n    \"@keydown\"(e) {\n      queueMicrotask(() => this.$data.__context.activateByKeyEvent(e, true, () => this.$data.__isOpen, () => this.$data.__open(), () => {\n      }));\n    },\n    \"@keydown.enter.stop.prevent\"() {\n      this.$data.__selectActive();\n      this.$data.__isMultiple || this.$data.__close();\n    },\n    \"@keydown.space.stop.prevent\"() {\n      this.$data.__selectActive();\n      this.$data.__isMultiple || this.$data.__close();\n    }\n  });\n}\nfunction handleOption2(el, Alpine2) {\n  Alpine2.bind(el, () => {\n    return {\n      \"x-id\"() {\n        return [\"alpine-listbox-option\"];\n      },\n      \":id\"() {\n        return this.$id(\"alpine-listbox-option\");\n      },\n      // Accessibility attributes...\n      \"role\": \"option\",\n      \":tabindex\"() {\n        return this.$listboxOption.isDisabled ? false : \"-1\";\n      },\n      \":aria-selected\"() {\n        return this.$listboxOption.isSelected;\n      },\n      // Initialize...\n      \"x-data\"() {\n        return {\n          \"__optionKey\": null,\n          init() {\n            this.__optionKey = (Math.random() + 1).toString(36).substring(7);\n            let value = Alpine2.extractProp(el, \"value\");\n            let disabled = Alpine2.extractProp(el, \"disabled\", false, false);\n            this.$data.__context.registerItem(this.__optionKey, el, value, disabled);\n          },\n          destroy() {\n            this.$data.__context.unregisterItem(this.__optionKey);\n          }\n        };\n      },\n      // Register listeners...\n      \"@click\"() {\n        if (this.$listboxOption.isDisabled)\n          return;\n        this.$data.__selectOption(el);\n        this.$data.__isMultiple || this.$data.__close();\n      },\n      \"@mouseenter\"() {\n        this.$data.__context.activateEl(el);\n      },\n      \"@mouseleave\"() {\n        this.$data.__hold || this.$data.__context.deactivate();\n      }\n    };\n  });\n}\n\n// packages/ui/src/popover.js\nfunction popover_default(Alpine2) {\n  Alpine2.directive(\"popover\", (el, directive) => {\n    if (!directive.value)\n      handleRoot5(el, Alpine2);\n    else if (directive.value === \"overlay\")\n      handleOverlay2(el, Alpine2);\n    else if (directive.value === \"button\")\n      handleButton4(el, Alpine2);\n    else if (directive.value === \"panel\")\n      handlePanel3(el, Alpine2);\n    else if (directive.value === \"group\")\n      handleGroup(el, Alpine2);\n  });\n  Alpine2.magic(\"popover\", (el) => {\n    let $data = Alpine2.$data(el);\n    return {\n      get isOpen() {\n        return $data.__isOpenState;\n      },\n      open() {\n        $data.__open();\n      },\n      close() {\n        $data.__close();\n      }\n    };\n  });\n}\nfunction handleRoot5(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-id\"() {\n      return [\"alpine-popover-button\", \"alpine-popover-panel\"];\n    },\n    \"x-modelable\": \"__isOpenState\",\n    \"x-data\"() {\n      return {\n        init() {\n          if (this.$data.__groupEl) {\n            this.$data.__groupEl.addEventListener(\"__close-others\", ({ detail }) => {\n              if (detail.el.isSameNode(this.$el))\n                return;\n              this.__close(false);\n            });\n          }\n        },\n        __buttonEl: void 0,\n        __panelEl: void 0,\n        __isStatic: false,\n        get __isOpen() {\n          if (this.__isStatic)\n            return true;\n          return this.__isOpenState;\n        },\n        __isOpenState: false,\n        __open() {\n          this.__isOpenState = true;\n          this.$dispatch(\"__close-others\", { el: this.$el });\n        },\n        __toggle() {\n          this.__isOpenState ? this.__close() : this.__open();\n        },\n        __close(el2) {\n          if (this.__isStatic)\n            return;\n          this.__isOpenState = false;\n          if (el2 === false)\n            return;\n          el2 = el2 || this.$data.__buttonEl;\n          if (document.activeElement.isSameNode(el2))\n            return;\n          setTimeout(() => el2.focus());\n        },\n        __contains(outer, inner) {\n          return !!Alpine2.findClosest(inner, (el2) => el2.isSameNode(outer));\n        }\n      };\n    },\n    \"@keydown.escape.stop.prevent\"() {\n      this.__close();\n    },\n    \"@focusin.window\"() {\n      if (this.$data.__groupEl) {\n        if (!this.$data.__contains(this.$data.__groupEl, document.activeElement)) {\n          this.$data.__close(false);\n        }\n        return;\n      }\n      if (!this.$data.__contains(this.$el, document.activeElement)) {\n        this.$data.__close(false);\n      }\n    }\n  });\n}\nfunction handleButton4(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-ref\": \"button\",\n    \":id\"() {\n      return this.$id(\"alpine-popover-button\");\n    },\n    \":aria-expanded\"() {\n      return this.$data.__isOpen;\n    },\n    \":aria-controls\"() {\n      return this.$data.__isOpen && this.$id(\"alpine-popover-panel\");\n    },\n    \"x-init\"() {\n      if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\"))\n        this.$el.type = \"button\";\n      this.$data.__buttonEl = this.$el;\n    },\n    \"@click\"() {\n      this.$data.__toggle();\n    },\n    \"@keydown.tab\"(e) {\n      if (!e.shiftKey && this.$data.__isOpen) {\n        let firstFocusableEl = this.$focus.within(this.$data.__panelEl).getFirst();\n        if (firstFocusableEl) {\n          e.preventDefault();\n          e.stopPropagation();\n          this.$focus.focus(firstFocusableEl);\n        }\n      }\n    },\n    \"@keyup.tab\"(e) {\n      if (this.$data.__isOpen) {\n        let lastEl = this.$focus.previouslyFocused();\n        if (!lastEl)\n          return;\n        if (\n          // Make sure the last focused wasn't part of this popover.\n          !this.$data.__buttonEl.contains(lastEl) && !this.$data.__panelEl.contains(lastEl) && (lastEl && this.$el.compareDocumentPosition(lastEl) & Node.DOCUMENT_POSITION_FOLLOWING)\n        ) {\n          e.preventDefault();\n          e.stopPropagation();\n          this.$focus.within(this.$data.__panelEl).last();\n        }\n      }\n    },\n    \"@keydown.space.stop.prevent\"() {\n      this.$data.__toggle();\n    },\n    \"@keydown.enter.stop.prevent\"() {\n      this.$data.__toggle();\n    },\n    // This is to stop Firefox from firing a \"click\".\n    \"@keyup.space.stop.prevent\"() {\n    }\n  });\n}\nfunction handlePanel3(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      this.$data.__isStatic = Alpine2.bound(this.$el, \"static\", false);\n      this.$data.__panelEl = this.$el;\n    },\n    \"x-effect\"() {\n      this.$data.__isOpen && Alpine2.bound(el, \"focus\") && this.$focus.first();\n    },\n    \"x-ref\": \"panel\",\n    \":id\"() {\n      return this.$id(\"alpine-popover-panel\");\n    },\n    \"x-show\"() {\n      return this.$data.__isOpen;\n    },\n    \"@mousedown.window\"($event) {\n      if (!this.$data.__isOpen)\n        return;\n      if (this.$data.__contains(this.$data.__buttonEl, $event.target))\n        return;\n      if (this.$data.__contains(this.$el, $event.target))\n        return;\n      if (!this.$focus.focusable($event.target)) {\n        this.$data.__close();\n      }\n    },\n    \"@keydown.tab\"(e) {\n      if (e.shiftKey && this.$focus.isFirst(e.target)) {\n        e.preventDefault();\n        e.stopPropagation();\n        Alpine2.bound(el, \"focus\") ? this.$data.__close() : this.$data.__buttonEl.focus();\n      } else if (!e.shiftKey && this.$focus.isLast(e.target)) {\n        e.preventDefault();\n        e.stopPropagation();\n        let els = this.$focus.within(document).all();\n        let buttonIdx = els.indexOf(this.$data.__buttonEl);\n        let nextEls = els.splice(buttonIdx + 1).filter((el2) => !this.$el.contains(el2));\n        nextEls[0].focus();\n        Alpine2.bound(el, \"focus\") && this.$data.__close(false);\n      }\n    }\n  });\n}\nfunction handleGroup(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-ref\": \"container\",\n    \"x-data\"() {\n      return {\n        __groupEl: this.$el\n      };\n    }\n  });\n}\nfunction handleOverlay2(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-show\"() {\n      return this.$data.__isOpen;\n    }\n  });\n}\n\n// packages/ui/src/menu.js\nfunction menu_default(Alpine2) {\n  Alpine2.directive(\"menu\", (el, directive) => {\n    if (!directive.value)\n      handleRoot6(el, Alpine2);\n    else if (directive.value === \"items\")\n      handleItems(el, Alpine2);\n    else if (directive.value === \"item\")\n      handleItem(el, Alpine2);\n    else if (directive.value === \"button\")\n      handleButton5(el, Alpine2);\n  }).before(\"bind\");\n  Alpine2.magic(\"menuItem\", (el) => {\n    let $data = Alpine2.$data(el);\n    return {\n      get isActive() {\n        return $data.__activeEl == $data.__itemEl;\n      },\n      get isDisabled() {\n        return $data.__itemEl.__isDisabled.value;\n      }\n    };\n  });\n}\nfunction handleRoot6(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-id\"() {\n      return [\"alpine-menu-button\", \"alpine-menu-items\"];\n    },\n    \"x-modelable\": \"__isOpen\",\n    \"x-data\"() {\n      return {\n        __itemEls: [],\n        __activeEl: null,\n        __isOpen: false,\n        __open(activationStrategy) {\n          this.__isOpen = true;\n          let nextTick = (callback) => requestAnimationFrame(() => requestAnimationFrame(callback));\n          nextTick(() => {\n            this.$refs.__items.focus({ preventScroll: true });\n            activationStrategy && activationStrategy(Alpine2, this.$refs.__items, (el2) => el2.__activate());\n          });\n        },\n        __close(focusAfter = true) {\n          this.__isOpen = false;\n          focusAfter && this.$nextTick(() => this.$refs.__button.focus({ preventScroll: true }));\n        },\n        __contains(outer, inner) {\n          return !!Alpine2.findClosest(inner, (el2) => el2.isSameNode(outer));\n        }\n      };\n    },\n    \"@focusin.window\"() {\n      if (!this.$data.__contains(this.$el, document.activeElement)) {\n        this.$data.__close(false);\n      }\n    }\n  });\n}\nfunction handleButton5(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-ref\": \"__button\",\n    \"aria-haspopup\": \"true\",\n    \":aria-labelledby\"() {\n      return this.$id(\"alpine-menu-label\");\n    },\n    \":id\"() {\n      return this.$id(\"alpine-menu-button\");\n    },\n    \":aria-expanded\"() {\n      return this.$data.__isOpen;\n    },\n    \":aria-controls\"() {\n      return this.$data.__isOpen && this.$id(\"alpine-menu-items\");\n    },\n    \"x-init\"() {\n      if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\"))\n        this.$el.type = \"button\";\n    },\n    \"@click\"() {\n      this.$data.__open();\n    },\n    \"@keydown.down.stop.prevent\"() {\n      this.$data.__open();\n    },\n    \"@keydown.up.stop.prevent\"() {\n      this.$data.__open(dom.last);\n    },\n    \"@keydown.space.stop.prevent\"() {\n      this.$data.__open();\n    },\n    \"@keydown.enter.stop.prevent\"() {\n      this.$data.__open();\n    }\n  });\n}\nfunction handleItems(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-ref\": \"__items\",\n    \"aria-orientation\": \"vertical\",\n    \"role\": \"menu\",\n    \":id\"() {\n      return this.$id(\"alpine-menu-items\");\n    },\n    \":aria-labelledby\"() {\n      return this.$id(\"alpine-menu-button\");\n    },\n    \":aria-activedescendant\"() {\n      return this.$data.__activeEl && this.$data.__activeEl.id;\n    },\n    \"x-show\"() {\n      return this.$data.__isOpen;\n    },\n    \"tabindex\": \"0\",\n    \"@click.outside\"() {\n      this.$data.__close();\n    },\n    \"@keydown\"(e) {\n      dom.search(Alpine2, this.$refs.__items, e.key, (el2) => el2.__activate());\n    },\n    \"@keydown.down.stop.prevent\"() {\n      if (this.$data.__activeEl)\n        dom.next(Alpine2, this.$data.__activeEl, (el2) => el2.__activate());\n      else\n        dom.first(Alpine2, this.$refs.__items, (el2) => el2.__activate());\n    },\n    \"@keydown.up.stop.prevent\"() {\n      if (this.$data.__activeEl)\n        dom.previous(Alpine2, this.$data.__activeEl, (el2) => el2.__activate());\n      else\n        dom.last(Alpine2, this.$refs.__items, (el2) => el2.__activate());\n    },\n    \"@keydown.home.stop.prevent\"() {\n      dom.first(Alpine2, this.$refs.__items, (el2) => el2.__activate());\n    },\n    \"@keydown.end.stop.prevent\"() {\n      dom.last(Alpine2, this.$refs.__items, (el2) => el2.__activate());\n    },\n    \"@keydown.page-up.stop.prevent\"() {\n      dom.first(Alpine2, this.$refs.__items, (el2) => el2.__activate());\n    },\n    \"@keydown.page-down.stop.prevent\"() {\n      dom.last(Alpine2, this.$refs.__items, (el2) => el2.__activate());\n    },\n    \"@keydown.escape.stop.prevent\"() {\n      this.$data.__close();\n    },\n    \"@keydown.space.stop.prevent\"() {\n      this.$data.__activeEl && this.$data.__activeEl.click();\n    },\n    \"@keydown.enter.stop.prevent\"() {\n      this.$data.__activeEl && this.$data.__activeEl.click();\n    },\n    // Required for firefox, event.preventDefault() in handleKeyDown for\n    // the Space key doesn't cancel the handleKeyUp, which in turn\n    // triggers a *click*.\n    \"@keyup.space.prevent\"() {\n    }\n  });\n}\nfunction handleItem(el, Alpine2) {\n  Alpine2.bind(el, () => {\n    return {\n      \"x-data\"() {\n        return {\n          __itemEl: this.$el,\n          init() {\n            let els = Alpine2.raw(this.$data.__itemEls);\n            let inserted = false;\n            for (let i = 0; i < els.length; i++) {\n              if (els[i].compareDocumentPosition(this.$el) & Node.DOCUMENT_POSITION_PRECEDING) {\n                els.splice(i, 0, this.$el);\n                inserted = true;\n                break;\n              }\n            }\n            if (!inserted)\n              els.push(this.$el);\n            this.$el.__activate = () => {\n              this.$data.__activeEl = this.$el;\n              this.$el.scrollIntoView({ block: \"nearest\" });\n            };\n            this.$el.__deactivate = () => {\n              this.$data.__activeEl = null;\n            };\n            this.$el.__isDisabled = Alpine2.reactive({ value: false });\n            queueMicrotask(() => {\n              this.$el.__isDisabled.value = Alpine2.bound(this.$el, \"disabled\", false);\n            });\n          },\n          destroy() {\n            let els = this.$data.__itemEls;\n            els.splice(els.indexOf(this.$el), 1);\n          }\n        };\n      },\n      \"x-id\"() {\n        return [\"alpine-menu-item\"];\n      },\n      \":id\"() {\n        return this.$id(\"alpine-menu-item\");\n      },\n      \":tabindex\"() {\n        return this.__itemEl.__isDisabled.value ? false : \"-1\";\n      },\n      \"role\": \"menuitem\",\n      \"@mousemove\"() {\n        this.__itemEl.__isDisabled.value || this.$menuItem.isActive || this.__itemEl.__activate();\n      },\n      \"@mouseleave\"() {\n        this.__itemEl.__isDisabled.value || !this.$menuItem.isActive || this.__itemEl.__deactivate();\n      }\n    };\n  });\n}\nvar dom = {\n  first(Alpine2, parent, receive = (i) => i, fallback = () => {\n  }) {\n    let first = Alpine2.$data(parent).__itemEls[0];\n    if (!first)\n      return fallback();\n    if (first.tagName.toLowerCase() === \"template\") {\n      return this.next(Alpine2, first, receive);\n    }\n    if (first.__isDisabled.value)\n      return this.next(Alpine2, first, receive);\n    return receive(first);\n  },\n  last(Alpine2, parent, receive = (i) => i, fallback = () => {\n  }) {\n    let last = Alpine2.$data(parent).__itemEls.slice(-1)[0];\n    if (!last)\n      return fallback();\n    if (last.__isDisabled.value)\n      return this.previous(Alpine2, last, receive);\n    return receive(last);\n  },\n  next(Alpine2, el, receive = (i) => i, fallback = () => {\n  }) {\n    if (!el)\n      return fallback();\n    let els = Alpine2.$data(el).__itemEls;\n    let next = els[els.indexOf(el) + 1];\n    if (!next)\n      return fallback();\n    if (next.__isDisabled.value || next.tagName.toLowerCase() === \"template\")\n      return this.next(Alpine2, next, receive, fallback);\n    return receive(next);\n  },\n  previous(Alpine2, el, receive = (i) => i, fallback = () => {\n  }) {\n    if (!el)\n      return fallback();\n    let els = Alpine2.$data(el).__itemEls;\n    let prev = els[els.indexOf(el) - 1];\n    if (!prev)\n      return fallback();\n    if (prev.__isDisabled.value || prev.tagName.toLowerCase() === \"template\")\n      return this.previous(Alpine2, prev, receive, fallback);\n    return receive(prev);\n  },\n  searchQuery: \"\",\n  debouncedClearSearch: void 0,\n  clearSearch(Alpine2) {\n    if (!this.debouncedClearSearch) {\n      this.debouncedClearSearch = Alpine2.debounce(function() {\n        this.searchQuery = \"\";\n      }, 350);\n    }\n    this.debouncedClearSearch();\n  },\n  search(Alpine2, parent, key, receiver) {\n    if (key.length > 1)\n      return;\n    this.searchQuery += key;\n    let els = Alpine2.raw(Alpine2.$data(parent).__itemEls);\n    let el = els.find((el2) => {\n      return el2.textContent.trim().toLowerCase().startsWith(this.searchQuery);\n    });\n    el && !el.__isDisabled.value && receiver(el);\n    this.clearSearch(Alpine2);\n  }\n};\n\n// packages/ui/src/switch.js\nfunction switch_default(Alpine2) {\n  Alpine2.directive(\"switch\", (el, directive) => {\n    if (directive.value === \"group\")\n      handleGroup2(el, Alpine2);\n    else if (directive.value === \"label\")\n      handleLabel3(el, Alpine2);\n    else if (directive.value === \"description\")\n      handleDescription2(el, Alpine2);\n    else\n      handleRoot7(el, Alpine2);\n  }).before(\"bind\");\n  Alpine2.magic(\"switch\", (el) => {\n    let $data = Alpine2.$data(el);\n    return {\n      get isChecked() {\n        return $data.__value === true;\n      }\n    };\n  });\n}\nfunction handleGroup2(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-id\"() {\n      return [\"alpine-switch-label\", \"alpine-switch-description\"];\n    },\n    \"x-data\"() {\n      return {\n        __hasLabel: false,\n        __hasDescription: false,\n        __switchEl: void 0\n      };\n    }\n  });\n}\nfunction handleRoot7(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-modelable\": \"__value\",\n    \"x-data\"() {\n      return {\n        init() {\n          queueMicrotask(() => {\n            this.__value = Alpine2.bound(this.$el, \"default-checked\", false);\n            this.__inputName = Alpine2.bound(this.$el, \"name\", false);\n            this.__inputValue = Alpine2.bound(this.$el, \"value\", \"on\");\n            this.__inputId = \"alpine-switch-\" + Date.now();\n          });\n        },\n        __value: void 0,\n        __inputName: void 0,\n        __inputValue: void 0,\n        __inputId: void 0,\n        __toggle() {\n          this.__value = !this.__value;\n        }\n      };\n    },\n    \"x-effect\"() {\n      let value = this.__value;\n      if (!this.__inputName)\n        return;\n      let nextEl = this.$el.nextElementSibling;\n      if (nextEl && String(nextEl.id) === String(this.__inputId)) {\n        nextEl.remove();\n      }\n      if (value) {\n        let input = document.createElement(\"input\");\n        input.type = \"hidden\";\n        input.value = this.__inputValue;\n        input.name = this.__inputName;\n        input.id = this.__inputId;\n        this.$el.after(input);\n      }\n    },\n    \"x-init\"() {\n      if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\"))\n        this.$el.type = \"button\";\n      this.$data.__switchEl = this.$el;\n    },\n    \"role\": \"switch\",\n    \"tabindex\": \"0\",\n    \":aria-checked\"() {\n      return !!this.__value;\n    },\n    \":aria-labelledby\"() {\n      return this.$data.__hasLabel && this.$id(\"alpine-switch-label\");\n    },\n    \":aria-describedby\"() {\n      return this.$data.__hasDescription && this.$id(\"alpine-switch-description\");\n    },\n    \"@click.prevent\"() {\n      this.__toggle();\n    },\n    \"@keyup\"(e) {\n      if (e.key !== \"Tab\")\n        e.preventDefault();\n      if (e.key === \" \")\n        this.__toggle();\n    },\n    // This is needed so that we can \"cancel\" the click event when we use the `Enter` key on a button.\n    \"@keypress.prevent\"() {\n    }\n  });\n}\nfunction handleLabel3(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      this.$data.__hasLabel = true;\n    },\n    \":id\"() {\n      return this.$id(\"alpine-switch-label\");\n    },\n    \"@click\"() {\n      this.$data.__switchEl.click();\n      this.$data.__switchEl.focus({ preventScroll: true });\n    }\n  });\n}\nfunction handleDescription2(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      this.$data.__hasDescription = true;\n    },\n    \":id\"() {\n      return this.$id(\"alpine-switch-description\");\n    }\n  });\n}\n\n// packages/ui/src/radio.js\nfunction radio_default(Alpine2) {\n  Alpine2.directive(\"radio\", (el, directive) => {\n    if (!directive.value)\n      handleRoot8(el, Alpine2);\n    else if (directive.value === \"option\")\n      handleOption3(el, Alpine2);\n    else if (directive.value === \"label\")\n      handleLabel4(el, Alpine2);\n    else if (directive.value === \"description\")\n      handleDescription3(el, Alpine2);\n  }).before(\"bind\");\n  Alpine2.magic(\"radioOption\", (el) => {\n    let $data = Alpine2.$data(el);\n    return {\n      get isActive() {\n        return $data.__option === $data.__active;\n      },\n      get isChecked() {\n        return $data.__option === $data.__value;\n      },\n      get isDisabled() {\n        let disabled = $data.__disabled;\n        if ($data.__rootDisabled)\n          return true;\n        return disabled;\n      }\n    };\n  });\n}\nfunction handleRoot8(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-modelable\": \"__value\",\n    \"x-data\"() {\n      return {\n        init() {\n          queueMicrotask(() => {\n            this.__rootDisabled = Alpine2.bound(el, \"disabled\", false);\n            this.__value = Alpine2.bound(this.$el, \"default-value\", false);\n            this.__inputName = Alpine2.bound(this.$el, \"name\", false);\n            this.__inputId = \"alpine-radio-\" + Date.now();\n          });\n          this.$nextTick(() => {\n            let walker = document.createTreeWalker(\n              this.$el,\n              NodeFilter.SHOW_ELEMENT,\n              {\n                acceptNode: (node) => {\n                  if (node.getAttribute(\"role\") === \"radio\")\n                    return NodeFilter.FILTER_REJECT;\n                  if (node.hasAttribute(\"role\"))\n                    return NodeFilter.FILTER_SKIP;\n                  return NodeFilter.FILTER_ACCEPT;\n                }\n              },\n              false\n            );\n            while (walker.nextNode())\n              walker.currentNode.setAttribute(\"role\", \"none\");\n          });\n        },\n        __value: void 0,\n        __active: void 0,\n        __rootEl: this.$el,\n        __optionValues: [],\n        __disabledOptions: /* @__PURE__ */ new Set(),\n        __optionElsByValue: /* @__PURE__ */ new Map(),\n        __hasLabel: false,\n        __hasDescription: false,\n        __rootDisabled: false,\n        __inputName: void 0,\n        __inputId: void 0,\n        __change(value) {\n          if (this.__rootDisabled)\n            return;\n          this.__value = value;\n        },\n        __addOption(option, el2, disabled) {\n          let options = Alpine2.raw(this.__optionValues);\n          let els = options.map((i) => this.__optionElsByValue.get(i));\n          let inserted = false;\n          for (let i = 0; i < els.length; i++) {\n            if (els[i].compareDocumentPosition(el2) & Node.DOCUMENT_POSITION_PRECEDING) {\n              options.splice(i, 0, option);\n              this.__optionElsByValue.set(option, el2);\n              inserted = true;\n              break;\n            }\n          }\n          if (!inserted) {\n            options.push(option);\n            this.__optionElsByValue.set(option, el2);\n          }\n          disabled && this.__disabledOptions.add(option);\n        },\n        __isFirstOption(option) {\n          return this.__optionValues.indexOf(option) === 0;\n        },\n        __setActive(option) {\n          this.__active = option;\n        },\n        __focusOptionNext() {\n          let option = this.__active;\n          let all = this.__optionValues.filter((i) => !this.__disabledOptions.has(i));\n          let index = all.indexOf(option);\n          let next = all[(index + 1 + all.length) % all.length];\n          this.__optionElsByValue.get(next).focus();\n          this.__change(next);\n        },\n        __focusOptionPrev() {\n          let option = this.__active;\n          let all = this.__optionValues.filter((i) => !this.__disabledOptions.has(i));\n          let index = all.indexOf(option);\n          let prev = all[(index - 1 + all.length) % all.length];\n          this.__optionElsByValue.get(prev).focus();\n          this.__change(prev);\n        }\n      };\n    },\n    \"x-effect\"() {\n      let value = this.__value;\n      if (!this.__inputName)\n        return;\n      let nextEl = this.$el.nextElementSibling;\n      if (nextEl && String(nextEl.id) === String(this.__inputId)) {\n        nextEl.remove();\n      }\n      if (value) {\n        let input = document.createElement(\"input\");\n        input.type = \"hidden\";\n        input.value = value;\n        input.name = this.__inputName;\n        input.id = this.__inputId;\n        this.$el.after(input);\n      }\n    },\n    \"role\": \"radiogroup\",\n    \"x-id\"() {\n      return [\"alpine-radio-label\", \"alpine-radio-description\"];\n    },\n    \":aria-labelledby\"() {\n      return this.__hasLabel && this.$id(\"alpine-radio-label\");\n    },\n    \":aria-describedby\"() {\n      return this.__hasDescription && this.$id(\"alpine-radio-description\");\n    },\n    \"@keydown.up.prevent.stop\"() {\n      this.__focusOptionPrev();\n    },\n    \"@keydown.left.prevent.stop\"() {\n      this.__focusOptionPrev();\n    },\n    \"@keydown.down.prevent.stop\"() {\n      this.__focusOptionNext();\n    },\n    \"@keydown.right.prevent.stop\"() {\n      this.__focusOptionNext();\n    }\n  });\n}\nfunction handleOption3(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-data\"() {\n      return {\n        init() {\n          queueMicrotask(() => {\n            this.__disabled = Alpine2.bound(el, \"disabled\", false);\n            this.__option = Alpine2.bound(el, \"value\");\n            this.$data.__addOption(this.__option, this.$el, this.__disabled);\n          });\n        },\n        __option: void 0,\n        __disabled: false,\n        __hasLabel: false,\n        __hasDescription: false\n      };\n    },\n    \"x-id\"() {\n      return [\"alpine-radio-label\", \"alpine-radio-description\"];\n    },\n    \"role\": \"radio\",\n    \":aria-checked\"() {\n      return this.$radioOption.isChecked;\n    },\n    \":aria-disabled\"() {\n      return this.$radioOption.isDisabled;\n    },\n    \":aria-labelledby\"() {\n      return this.__hasLabel && this.$id(\"alpine-radio-label\");\n    },\n    \":aria-describedby\"() {\n      return this.__hasDescription && this.$id(\"alpine-radio-description\");\n    },\n    \":tabindex\"() {\n      if (this.$radioOption.isDisabled)\n        return -1;\n      if (this.$radioOption.isChecked)\n        return 0;\n      if (!this.$data.__value && this.$data.__isFirstOption(this.$data.__option))\n        return 0;\n      return -1;\n    },\n    \"@click\"() {\n      if (this.$radioOption.isDisabled)\n        return;\n      this.$data.__change(this.$data.__option);\n      this.$el.focus();\n    },\n    \"@focus\"() {\n      if (this.$radioOption.isDisabled)\n        return;\n      this.$data.__setActive(this.$data.__option);\n    },\n    \"@blur\"() {\n      if (this.$data.__active === this.$data.__option)\n        this.$data.__setActive(void 0);\n    },\n    \"@keydown.space.stop.prevent\"() {\n      this.$data.__change(this.$data.__option);\n    }\n  });\n}\nfunction handleLabel4(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      this.$data.__hasLabel = true;\n    },\n    \":id\"() {\n      return this.$id(\"alpine-radio-label\");\n    }\n  });\n}\nfunction handleDescription3(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      this.$data.__hasDescription = true;\n    },\n    \":id\"() {\n      return this.$id(\"alpine-radio-description\");\n    }\n  });\n}\n\n// packages/ui/src/tabs.js\nfunction tabs_default(Alpine2) {\n  Alpine2.directive(\"tabs\", (el, directive) => {\n    if (!directive.value)\n      handleRoot9(el, Alpine2);\n    else if (directive.value === \"list\")\n      handleList(el, Alpine2);\n    else if (directive.value === \"tab\")\n      handleTab(el, Alpine2);\n    else if (directive.value === \"panels\")\n      handlePanels(el, Alpine2);\n    else if (directive.value === \"panel\")\n      handlePanel4(el, Alpine2);\n  }).before(\"bind\");\n  Alpine2.magic(\"tab\", (el) => {\n    let $data = Alpine2.$data(el);\n    return {\n      get isSelected() {\n        return $data.__selectedIndex === $data.__tabs.indexOf($data.__tabEl);\n      },\n      get isDisabled() {\n        return $data.__isDisabled;\n      }\n    };\n  });\n  Alpine2.magic(\"panel\", (el) => {\n    let $data = Alpine2.$data(el);\n    return {\n      get isSelected() {\n        return $data.__selectedIndex === $data.__panels.indexOf($data.__panelEl);\n      }\n    };\n  });\n}\nfunction handleRoot9(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-modelable\": \"__selectedIndex\",\n    \"x-data\"() {\n      return {\n        init() {\n          queueMicrotask(() => {\n            let defaultIndex = this.__selectedIndex || Number(Alpine2.bound(this.$el, \"default-index\", 0));\n            let tabs = this.__activeTabs();\n            let clamp = (number, min, max) => Math.min(Math.max(number, min), max);\n            this.__selectedIndex = clamp(defaultIndex, 0, tabs.length - 1);\n            Alpine2.effect(() => {\n              this.__manualActivation = Alpine2.bound(this.$el, \"manual\", false);\n            });\n          });\n        },\n        __tabs: [],\n        __panels: [],\n        __selectedIndex: null,\n        __tabGroupEl: void 0,\n        __manualActivation: false,\n        __addTab(el2) {\n          this.__tabs.push(el2);\n        },\n        __addPanel(el2) {\n          this.__panels.push(el2);\n        },\n        __selectTab(el2) {\n          this.__selectedIndex = this.__tabs.indexOf(el2);\n        },\n        __activeTabs() {\n          return this.__tabs.filter((i) => !i.__disabled);\n        }\n      };\n    }\n  });\n}\nfunction handleList(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      this.$data.__tabGroupEl = this.$el;\n    }\n  });\n}\nfunction handleTab(el, Alpine2) {\n  Alpine2.bind(el, {\n    \"x-init\"() {\n      if (this.$el.tagName.toLowerCase() === \"button\" && !this.$el.hasAttribute(\"type\"))\n        this.$el.type = \"button\";\n    },\n    \"x-data\"() {\n      return {\n        init() {\n          this.__tabEl = this.$el;\n          this.$data.__addTab(this.$el);\n          this.__tabEl.__disabled = Alpine2.bound(this.$el, \"disabled\", false);\n          this.__isDisabled = this.__tabEl.__disabled;\n        },\n        __tabEl: void 0,\n        __isDisabled: false\n      };\n    },\n    \"@click\"() {\n      if (this.$el.__disabled)\n        return;\n      this.$data.__selectTab(this.$el);\n      this.$el.focus();\n    },\n    \"@keydown.enter.prevent.stop\"() {\n      this.__selectTab(this.$el);\n    },\n    \"@keydown.space.prevent.stop\"() {\n      this.__selectTab(this.$el);\n    },\n    \"@keydown.home.prevent.stop\"() {\n      this.$focus.within(this.$data.__activeTabs()).first();\n    },\n    \"@keydown.page-up.prevent.stop\"() {\n      this.$focus.within(this.$data.__activeTabs()).first();\n    },\n    \"@keydown.end.prevent.stop\"() {\n      this.$focus.within(this.$data.__activeTabs()).last();\n    },\n    \"@keydown.page-down.prevent.stop\"() {\n      this.$focus.within(this.$data.__activeTabs()).last();\n    },\n    \"@keydown.down.prevent.stop\"() {\n      this.$focus.within(this.$data.__activeTabs()).withWrapAround().next();\n    },\n    \"@keydown.right.prevent.stop\"() {\n      this.$focus.within(this.$data.__activeTabs()).withWrapAround().next();\n    },\n    \"@keydown.up.prevent.stop\"() {\n      this.$focus.within(this.$data.__activeTabs()).withWrapAround().prev();\n    },\n    \"@keydown.left.prevent.stop\"() {\n      this.$focus.within(this.$data.__activeTabs()).withWrapAround().prev();\n    },\n    \":tabindex\"() {\n      return this.$tab.isSelected ? 0 : -1;\n    },\n    // This is important because we want to only focus the tab when it gets focus\n    // OR it finished the click event (mouseup). However, if you perform a `click`,\n    // then you will first get the `focus` and then get the `click` event.\n    // See https://github.com/tailwindlabs/headlessui/pull/1192\n    \"@mousedown\"(event) {\n      event.preventDefault();\n    },\n    \"@focus\"() {\n      if (this.$data.__manualActivation) {\n        this.$el.focus();\n      } else {\n        if (this.$el.__disabled)\n          return;\n        this.$data.__selectTab(this.$el);\n        this.$el.focus();\n      }\n    }\n  });\n}\nfunction handlePanels(el, Alpine2) {\n  Alpine2.bind(el, {\n    //\n  });\n}\nfunction handlePanel4(el, Alpine2) {\n  Alpine2.bind(el, {\n    \":tabindex\"() {\n      return this.$panel.isSelected ? 0 : -1;\n    },\n    \"x-data\"() {\n      return {\n        init() {\n          this.__panelEl = this.$el;\n          this.$data.__addPanel(this.$el);\n        },\n        __panelEl: void 0\n      };\n    },\n    \"x-show\"() {\n      return this.$panel.isSelected;\n    }\n  });\n}\n\n// packages/ui/src/index.js\nfunction src_default(Alpine2) {\n  combobox_default(Alpine2);\n  dialog_default(Alpine2);\n  disclosure_default(Alpine2);\n  listbox_default(Alpine2);\n  menu_default(Alpine2);\n  switch_default(Alpine2);\n  popover_default(Alpine2);\n  radio_default(Alpine2);\n  tabs_default(Alpine2);\n}\n\n// packages/ui/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default,\n  src_default as ui\n};\n","// packages/alpinejs/src/scheduler.js\nvar flushPending = false;\nvar flushing = false;\nvar queue = [];\nvar lastFlushedIndex = -1;\nvar queueNeedsSort = false;\nvar transactionActive = false;\nfunction scheduler(callback) {\n  queueJob(callback);\n}\nfunction startTransaction() {\n  transactionActive = true;\n}\nfunction commitTransaction() {\n  transactionActive = false;\n  queueFlush();\n}\nfunction queueJob(job) {\n  if (!queue.includes(job)) {\n    queue.push(job);\n    if (job._x_schedulerPriority !== void 0)\n      queueNeedsSort = true;\n  }\n  queueFlush();\n}\nfunction dequeueJob(job) {\n  let index = queue.indexOf(job);\n  if (index !== -1 && index > lastFlushedIndex)\n    queue.splice(index, 1);\n}\nfunction queueFlush() {\n  if (!flushing && !flushPending) {\n    if (transactionActive)\n      return;\n    flushPending = true;\n    queueMicrotask(flushJobs);\n  }\n}\nfunction flushJobs() {\n  flushPending = false;\n  flushing = true;\n  for (let i = 0; i < queue.length; i++) {\n    if (queueNeedsSort)\n      sortPendingJobs(i);\n    queue[i]();\n    lastFlushedIndex = i;\n  }\n  queue.length = 0;\n  lastFlushedIndex = -1;\n  queueNeedsSort = false;\n  flushing = false;\n}\nfunction sortPendingJobs(start2) {\n  let depths = /* @__PURE__ */ new Map();\n  let sorted = queue.slice(start2).sort((a, b) => compareJobs(a, b, depths));\n  for (let i = 0; i < sorted.length; i++) {\n    queue[start2 + i] = sorted[i];\n  }\n  queueNeedsSort = false;\n}\nfunction compareJobs(a, b, depths) {\n  if (!isStructural(a))\n    return isStructural(b) ? 1 : 0;\n  if (!isStructural(b))\n    return -1;\n  let depthDifference = getElementDepth(a._x_schedulerPriority.el, depths) - getElementDepth(b._x_schedulerPriority.el, depths);\n  return depthDifference || a._x_schedulerPriority.order - b._x_schedulerPriority.order;\n}\nfunction isStructural(job) {\n  return job._x_schedulerPriority !== void 0;\n}\nfunction getElementDepth(el, depths) {\n  if (depths.has(el))\n    return depths.get(el);\n  let depth = 0;\n  let owner = el;\n  while (el) {\n    depth++;\n    if (el._x_teleportBack) {\n      el = el._x_teleportBack;\n    } else if (typeof ShadowRoot === \"function\" && el.parentNode instanceof ShadowRoot) {\n      el = el.parentNode.host;\n    } else {\n      el = el.parentElement;\n    }\n  }\n  depths.set(owner, depth);\n  return depth;\n}\n\n// packages/alpinejs/src/reactivity.js\nvar reactive;\nvar effect;\nvar release;\nvar raw;\nvar nextStructuralEffectOrder = 0;\nvar shouldSchedule = true;\nfunction disableEffectScheduling(callback) {\n  shouldSchedule = false;\n  callback();\n  shouldSchedule = true;\n}\nfunction setReactivityEngine(engine) {\n  reactive = engine.reactive;\n  release = engine.release;\n  effect = (callback) => engine.effect(callback, { scheduler: (task) => {\n    if (shouldSchedule) {\n      scheduler(task);\n    } else {\n      task();\n    }\n  } });\n  raw = engine.raw;\n}\nfunction overrideEffect(override) {\n  effect = override;\n}\nfunction elementBoundEffect(el) {\n  let cleanup = () => {\n  };\n  let wrappedEffect = (callback, options) => {\n    let priority = options?.priority === \"structural\" ? nextStructuralEffectOrder++ : void 0;\n    let effectReference = effect(callback);\n    if (priority !== void 0 && effectReference !== void 0) {\n      effectReference._x_schedulerPriority = { el, order: priority };\n    }\n    if (!el._x_effects) {\n      el._x_effects = /* @__PURE__ */ new Set();\n      el._x_runEffects = () => {\n        el._x_effects.forEach((i) => i());\n      };\n    }\n    el._x_effects.add(effectReference);\n    cleanup = () => {\n      if (effectReference === void 0)\n        return;\n      el._x_effects.delete(effectReference);\n      release(effectReference);\n    };\n    return effectReference;\n  };\n  return [wrappedEffect, () => {\n    cleanup();\n  }];\n}\nfunction watch(getter, callback) {\n  let firstTime = true;\n  let oldValue;\n  let oldValueJSON;\n  let effectReference = effect(() => {\n    let value = getter();\n    let newJSON = JSON.stringify(value);\n    if (!firstTime) {\n      if (typeof value === \"object\" || value !== oldValue) {\n        let previousValue = typeof oldValue === \"object\" ? JSON.parse(oldValueJSON) : oldValue;\n        queueMicrotask(() => {\n          callback(value, previousValue);\n        });\n      }\n    }\n    oldValue = value;\n    oldValueJSON = newJSON;\n    firstTime = false;\n  });\n  return () => {\n    dequeueJob(effectReference);\n    release(effectReference);\n  };\n}\nasync function transaction(callback) {\n  startTransaction();\n  try {\n    await callback();\n    await Promise.resolve();\n  } finally {\n    commitTransaction();\n  }\n}\n\n// packages/alpinejs/src/mutation.js\nvar onAttributeAddeds = [];\nvar onElRemoveds = [];\nvar onElAddeds = [];\nfunction onElAdded(callback) {\n  onElAddeds.push(callback);\n}\nfunction onElRemoved(el, callback) {\n  if (typeof callback === \"function\") {\n    if (!el._x_cleanups)\n      el._x_cleanups = [];\n    el._x_cleanups.push(callback);\n  } else {\n    callback = el;\n    onElRemoveds.push(callback);\n  }\n}\nfunction onAttributesAdded(callback) {\n  onAttributeAddeds.push(callback);\n}\nfunction onAttributeRemoved(el, name, callback) {\n  if (!el._x_attributeCleanups)\n    el._x_attributeCleanups = {};\n  if (!el._x_attributeCleanups[name])\n    el._x_attributeCleanups[name] = [];\n  el._x_attributeCleanups[name].push(callback);\n}\nfunction cleanupAttributes(el, names) {\n  if (!el._x_attributeCleanups)\n    return;\n  Object.entries(el._x_attributeCleanups).forEach(([name, value]) => {\n    if (names === void 0 || names.includes(name)) {\n      value.forEach((i) => i());\n      delete el._x_attributeCleanups[name];\n    }\n  });\n}\nfunction cleanupElement(el) {\n  el._x_effects?.forEach(dequeueJob);\n  while (el._x_cleanups?.length)\n    el._x_cleanups.pop()();\n}\nvar observer = new MutationObserver(onMutate);\nvar currentlyObserving = false;\nfunction startObservingMutations() {\n  observer.observe(document, { subtree: true, childList: true, attributes: true, attributeOldValue: true });\n  currentlyObserving = true;\n}\nfunction stopObservingMutations() {\n  flushObserver();\n  observer.disconnect();\n  currentlyObserving = false;\n}\nvar queuedMutations = [];\nfunction flushObserver() {\n  let records = observer.takeRecords();\n  queuedMutations.push(() => records.length > 0 && onMutate(records));\n  let queueLengthWhenTriggered = queuedMutations.length;\n  queueMicrotask(() => {\n    if (queuedMutations.length === queueLengthWhenTriggered) {\n      while (queuedMutations.length > 0)\n        queuedMutations.shift()();\n    }\n  });\n}\nfunction flushPendingMutations() {\n  while (queuedMutations.length > 0)\n    queuedMutations.shift()();\n  let records = observer.takeRecords();\n  if (records.length > 0)\n    onMutate(records);\n}\nfunction mutateDom(callback) {\n  if (!currentlyObserving)\n    return callback();\n  stopObservingMutations();\n  try {\n    return callback();\n  } finally {\n    startObservingMutations();\n  }\n}\nvar isCollecting = false;\nvar deferredMutations = [];\nfunction deferMutations() {\n  isCollecting = true;\n}\nfunction flushAndStopDeferringMutations() {\n  isCollecting = false;\n  onMutate(deferredMutations);\n  deferredMutations = [];\n}\nfunction onMutate(mutations) {\n  if (isCollecting) {\n    deferredMutations = deferredMutations.concat(mutations);\n    return;\n  }\n  let addedNodes = [];\n  let removedNodes = /* @__PURE__ */ new Set();\n  let addedAttributes = /* @__PURE__ */ new Map();\n  let removedAttributes = /* @__PURE__ */ new Map();\n  for (let i = 0; i < mutations.length; i++) {\n    if (mutations[i].target._x_ignoreMutationObserver)\n      continue;\n    if (mutations[i].type === \"childList\") {\n      mutations[i].removedNodes.forEach((node) => {\n        if (node.nodeType !== 1)\n          return;\n        if (!node._x_marker)\n          return;\n        removedNodes.add(node);\n      });\n      mutations[i].addedNodes.forEach((node) => {\n        if (node.nodeType !== 1)\n          return;\n        if (removedNodes.has(node)) {\n          removedNodes.delete(node);\n          return;\n        }\n        if (node._x_marker)\n          return;\n        addedNodes.push(node);\n      });\n    }\n    if (mutations[i].type === \"attributes\") {\n      let el = mutations[i].target;\n      let name = mutations[i].attributeName;\n      let oldValue = mutations[i].oldValue;\n      let add = () => {\n        if (!addedAttributes.has(el))\n          addedAttributes.set(el, []);\n        addedAttributes.get(el).push({ name, value: el.getAttribute(name) });\n      };\n      let remove2 = () => {\n        if (!removedAttributes.has(el))\n          removedAttributes.set(el, []);\n        removedAttributes.get(el).push(name);\n      };\n      if (el.hasAttribute(name) && oldValue === null) {\n        add();\n      } else if (el.hasAttribute(name)) {\n        remove2();\n        add();\n      } else {\n        remove2();\n      }\n    }\n  }\n  removedAttributes.forEach((attrs, el) => {\n    cleanupAttributes(el, attrs);\n  });\n  addedAttributes.forEach((attrs, el) => {\n    onAttributeAddeds.forEach((i) => i(el, attrs));\n  });\n  for (let node of removedNodes) {\n    if (addedNodes.some((i) => i.contains(node)))\n      continue;\n    onElRemoveds.forEach((i) => i(node));\n  }\n  for (let node of addedNodes) {\n    if (!node.isConnected)\n      continue;\n    onElAddeds.forEach((i) => i(node));\n  }\n  addedNodes = null;\n  removedNodes = null;\n  addedAttributes = null;\n  removedAttributes = null;\n}\n\n// packages/alpinejs/src/scope.js\nfunction scope(node) {\n  return mergeProxies(closestDataStack(node));\n}\nfunction addScopeToNode(node, data2, referenceNode) {\n  node._x_dataStack = [data2, ...closestDataStack(referenceNode || node)];\n  return () => {\n    node._x_dataStack = node._x_dataStack.filter((i) => i !== data2);\n  };\n}\nfunction closestDataStack(node) {\n  if (node._x_dataStack)\n    return node._x_dataStack;\n  if (typeof ShadowRoot === \"function\" && node instanceof ShadowRoot) {\n    return closestDataStack(node.host);\n  }\n  if (!node.parentNode) {\n    return [];\n  }\n  return closestDataStack(node.parentNode);\n}\nfunction mergeProxies(objects) {\n  return new Proxy({ objects }, mergeProxyTrap);\n}\nfunction keyInPrototypeChain(obj, key) {\n  if (obj === null || obj === Object.prototype)\n    return null;\n  if (Object.prototype.hasOwnProperty.call(obj, key))\n    return obj;\n  return keyInPrototypeChain(Object.getPrototypeOf(obj), key);\n}\nvar mergeProxyTrap = {\n  ownKeys({ objects }) {\n    return Array.from(\n      new Set(objects.flatMap((i) => Object.keys(i)))\n    );\n  },\n  has({ objects }, name) {\n    if (name == Symbol.unscopables)\n      return false;\n    return objects.some(\n      (obj) => Object.prototype.hasOwnProperty.call(obj, name) || Reflect.has(obj, name)\n    );\n  },\n  get({ objects }, name, thisProxy) {\n    if (name == \"toJSON\")\n      return collapseProxies;\n    return Reflect.get(\n      objects.find(\n        (obj) => Reflect.has(obj, name)\n      ) || {},\n      name,\n      thisProxy\n    );\n  },\n  set({ objects }, name, value, thisProxy) {\n    let target;\n    for (const obj of objects) {\n      target = keyInPrototypeChain(obj, name);\n      if (target)\n        break;\n    }\n    if (!target)\n      target = objects[objects.length - 1];\n    const descriptor = Object.getOwnPropertyDescriptor(target, name);\n    if (descriptor?.set && descriptor?.get)\n      return descriptor.set.call(thisProxy, value) || true;\n    return Reflect.set(target, name, value);\n  }\n};\nfunction collapseProxies() {\n  let keys = Reflect.ownKeys(this);\n  return keys.reduce((acc, key) => {\n    acc[key] = Reflect.get(this, key);\n    return acc;\n  }, {});\n}\n\n// packages/alpinejs/src/interceptor.js\nfunction initInterceptors(data2, cleanup = () => {\n}) {\n  let isObject3 = (val) => typeof val === \"object\" && !Array.isArray(val) && val !== null;\n  let recurse = (obj, basePath = \"\") => {\n    Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value, enumerable }]) => {\n      if (enumerable === false || value === void 0)\n        return;\n      if (typeof value === \"object\" && value !== null && value.__v_skip)\n        return;\n      let path = basePath === \"\" ? key : `${basePath}.${key}`;\n      if (typeof value === \"object\" && value !== null && value._x_interceptor) {\n        obj[key] = value.initialize(data2, path, key, cleanup);\n      } else {\n        if (isObject3(value) && value !== obj && !(value instanceof Element)) {\n          recurse(value, path);\n        }\n      }\n    });\n  };\n  return recurse(data2);\n}\nfunction interceptor(callback, mutateObj = () => {\n}) {\n  let obj = {\n    initialValue: void 0,\n    _x_interceptor: true,\n    initialize(data2, path, key, cleanup) {\n      return callback(this.initialValue, () => get(data2, path), (value) => set(data2, path, value), path, key, cleanup);\n    }\n  };\n  mutateObj(obj);\n  return (initialValue) => {\n    if (typeof initialValue === \"object\" && initialValue !== null && initialValue._x_interceptor) {\n      let initialize = obj.initialize.bind(obj);\n      obj.initialize = (data2, path, key, cleanup) => {\n        let innerValue = initialValue.initialize(data2, path, key, cleanup);\n        obj.initialValue = innerValue;\n        return initialize(data2, path, key, cleanup);\n      };\n    } else {\n      obj.initialValue = initialValue;\n    }\n    return obj;\n  };\n}\nfunction get(obj, path) {\n  return path.split(\".\").reduce((carry, segment) => carry[segment], obj);\n}\nfunction set(obj, path, value) {\n  if (typeof path === \"string\")\n    path = path.split(\".\");\n  if (path.length === 1)\n    obj[path[0]] = value;\n  else if (path.length === 0)\n    throw error;\n  else {\n    if (obj[path[0]])\n      return set(obj[path[0]], path.slice(1), value);\n    else {\n      obj[path[0]] = {};\n      return set(obj[path[0]], path.slice(1), value);\n    }\n  }\n}\n\n// packages/alpinejs/src/magics.js\nvar magics = {};\nfunction magic(name, callback) {\n  magics[name] = callback;\n}\nfunction injectMagics(obj, el) {\n  let memoizedUtilities = getUtilities(el);\n  Object.entries(magics).forEach(([name, callback]) => {\n    Object.defineProperty(obj, `$${name}`, {\n      get() {\n        return callback(el, memoizedUtilities);\n      },\n      enumerable: false\n    });\n  });\n  return obj;\n}\nfunction getUtilities(el) {\n  let [utilities, cleanup] = getElementBoundUtilities(el);\n  let utils = { interceptor, ...utilities };\n  onElRemoved(el, cleanup);\n  return utils;\n}\n\n// packages/alpinejs/src/utils/error.js\nfunction tryCatch(el, expression, callback, ...args) {\n  try {\n    return callback(...args);\n  } catch (e) {\n    handleError(e, el, expression);\n  }\n}\nfunction handleError(...args) {\n  return errorHandler(...args);\n}\nvar errorHandler = normalErrorHandler;\nfunction setErrorHandler(handler4) {\n  errorHandler = handler4;\n}\nfunction normalErrorHandler(error2, el, expression = void 0) {\n  error2 = Object.assign(\n    error2 ?? { message: \"No error message given.\" },\n    { el, expression }\n  );\n  console.warn(`Alpine Expression Error: ${error2.message}\n\n${expression ? 'Expression: \"' + expression + '\"\\n\\n' : \"\"}`, el);\n  setTimeout(() => {\n    throw error2;\n  }, 0);\n}\n\n// packages/alpinejs/src/evaluator.js\nvar shouldAutoEvaluateFunctions = true;\nfunction dontAutoEvaluateFunctions(callback) {\n  let cache = shouldAutoEvaluateFunctions;\n  shouldAutoEvaluateFunctions = false;\n  let result = callback();\n  shouldAutoEvaluateFunctions = cache;\n  return result;\n}\nfunction evaluate(el, expression, extras = {}) {\n  let result;\n  evaluateLater(el, expression)((value) => result = value, extras);\n  return result;\n}\nfunction evaluateLater(...args) {\n  return theEvaluatorFunction(...args);\n}\nvar theEvaluatorFunction = () => {\n};\nfunction setEvaluator(newEvaluator) {\n  theEvaluatorFunction = newEvaluator;\n}\nvar theRawEvaluatorFunction;\nfunction setRawEvaluator(newEvaluator) {\n  theRawEvaluatorFunction = newEvaluator;\n}\nfunction normalEvaluator(el, expression) {\n  let overriddenMagics = {};\n  injectMagics(overriddenMagics, el);\n  let dataStack = [overriddenMagics, ...closestDataStack(el)];\n  let evaluator = typeof expression === \"function\" ? generateEvaluatorFromFunction(dataStack, expression) : generateEvaluatorFromString(dataStack, expression, el);\n  return tryCatch.bind(null, el, expression, evaluator);\n}\nfunction generateEvaluatorFromFunction(dataStack, func) {\n  return (receiver = () => {\n  }, { scope: scope2 = {}, params = [], context } = {}) => {\n    if (!shouldAutoEvaluateFunctions) {\n      runIfTypeOfFunction(receiver, func, mergeProxies([scope2, ...dataStack]), params);\n      return;\n    }\n    let result = func.apply(mergeProxies([scope2, ...dataStack]), params);\n    runIfTypeOfFunction(receiver, result);\n  };\n}\nvar evaluatorMemo = {};\nfunction generateFunctionFromString(expression, el) {\n  if (evaluatorMemo[expression]) {\n    return evaluatorMemo[expression];\n  }\n  let AsyncFunction = Object.getPrototypeOf(async function() {\n  }).constructor;\n  let rightSideSafeExpression = /^[\\n\\s]*if.*\\(.*\\)/.test(expression.trim()) || /^(let|const)\\s/.test(expression.trim()) ? `(async()=>{ ${expression} })()` : expression;\n  const safeAsyncFunction = () => {\n    try {\n      let func2 = new AsyncFunction(\n        [\"__self\", \"scope\"],\n        `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`\n      );\n      Object.defineProperty(func2, \"name\", {\n        value: `[Alpine] ${expression}`\n      });\n      return func2;\n    } catch (error2) {\n      handleError(error2, el, expression);\n      return Promise.resolve();\n    }\n  };\n  let func = safeAsyncFunction();\n  evaluatorMemo[expression] = func;\n  return func;\n}\nfunction generateEvaluatorFromString(dataStack, expression, el) {\n  let func = generateFunctionFromString(expression, el);\n  return (receiver = () => {\n  }, { scope: scope2 = {}, params = [], context } = {}) => {\n    func.result = void 0;\n    func.finished = false;\n    let completeScope = mergeProxies([scope2, ...dataStack]);\n    if (typeof func === \"function\") {\n      let promise = func.call(context, func, completeScope).catch((error2) => handleError(error2, el, expression));\n      if (func.finished) {\n        runIfTypeOfFunction(receiver, func.result, completeScope, params, el);\n        func.result = void 0;\n      } else {\n        promise.then((result) => {\n          runIfTypeOfFunction(receiver, result, completeScope, params, el);\n        }).catch((error2) => handleError(error2, el, expression)).finally(() => func.result = void 0);\n      }\n    }\n  };\n}\nfunction runIfTypeOfFunction(receiver, value, scope2, params, el) {\n  if (shouldAutoEvaluateFunctions && typeof value === \"function\") {\n    let result = value.apply(scope2, params);\n    if (result instanceof Promise) {\n      result.then((i) => runIfTypeOfFunction(receiver, i, scope2, params)).catch((error2) => handleError(error2, el, value));\n    } else {\n      receiver(result);\n    }\n  } else if (typeof value === \"object\" && value instanceof Promise) {\n    value.then((i) => receiver(i));\n  } else {\n    receiver(value);\n  }\n}\nfunction evaluateRaw(...args) {\n  return theRawEvaluatorFunction(...args);\n}\nfunction normalRawEvaluator(el, expression, extras = {}) {\n  let overriddenMagics = {};\n  injectMagics(overriddenMagics, el);\n  let dataStack = [overriddenMagics, ...closestDataStack(el)];\n  let scope2 = mergeProxies([extras.scope ?? {}, ...dataStack]);\n  let params = extras.params ?? [];\n  if (expression.includes(\"await\")) {\n    let AsyncFunction = Object.getPrototypeOf(async function() {\n    }).constructor;\n    let rightSideSafeExpression = /^[\\n\\s]*if.*\\(.*\\)/.test(expression.trim()) || /^(let|const)\\s/.test(expression.trim()) ? `(async()=>{ ${expression} })()` : expression;\n    let func = new AsyncFunction(\n      [\"scope\"],\n      `with (scope) { let __result = ${rightSideSafeExpression}; return __result }`\n    );\n    let result = func.call(extras.context, scope2);\n    return result;\n  } else {\n    let rightSideSafeExpression = /^[\\n\\s]*if.*\\(.*\\)/.test(expression.trim()) || /^(let|const)\\s/.test(expression.trim()) ? `(()=>{ ${expression} })()` : expression;\n    let func = new Function(\n      [\"scope\"],\n      `with (scope) { let __result = ${rightSideSafeExpression}; return __result }`\n    );\n    let result = func.call(extras.context, scope2);\n    if (typeof result === \"function\" && shouldAutoEvaluateFunctions) {\n      return result.apply(scope2, params);\n    }\n    return result;\n  }\n}\n\n// packages/alpinejs/src/directives.js\nvar prefixAsString = \"x-\";\nfunction prefix(subject = \"\") {\n  return prefixAsString + subject;\n}\nfunction setPrefix(newPrefix) {\n  prefixAsString = newPrefix;\n}\nvar directiveHandlers = {};\nfunction directive(name, callback) {\n  directiveHandlers[name] = callback;\n  return {\n    before(directive2) {\n      if (!directiveHandlers[directive2]) {\n        console.warn(String.raw`Cannot find directive \\`${directive2}\\`. \\`${name}\\` will use the default order of execution`);\n        return;\n      }\n      const pos = directiveOrder.indexOf(directive2);\n      directiveOrder.splice(pos >= 0 ? pos : directiveOrder.indexOf(\"DEFAULT\"), 0, name);\n    }\n  };\n}\nfunction directiveExists(name) {\n  return Object.keys(directiveHandlers).includes(name);\n}\nfunction directives(el, attributes, originalAttributeOverride) {\n  attributes = Array.from(attributes);\n  if (el._x_virtualDirectives) {\n    let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value]) => ({ name, value }));\n    let staticAttributes = attributesOnly(vAttributes);\n    vAttributes = vAttributes.map((attribute) => {\n      if (staticAttributes.find((attr) => attr.name === attribute.name)) {\n        return {\n          name: `x-bind:${attribute.name}`,\n          value: `\"${attribute.value}\"`\n        };\n      }\n      return attribute;\n    });\n    attributes = attributes.concat(vAttributes);\n  }\n  let transformedAttributeMap = {};\n  let directives2 = attributes.map(toTransformedAttributes((newName, oldName) => transformedAttributeMap[newName] = oldName)).filter(outNonAlpineAttributes).map(toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort(byPriority);\n  return directives2.map((directive2) => {\n    return getDirectiveHandler(el, directive2);\n  });\n}\nfunction attributesOnly(attributes) {\n  return Array.from(attributes).map(toTransformedAttributes()).filter((attr) => !outNonAlpineAttributes(attr));\n}\nvar isDeferringHandlers = false;\nvar directiveHandlerStacks = /* @__PURE__ */ new Map();\nvar currentHandlerStackKey = Symbol();\nfunction deferHandlingDirectives(callback) {\n  isDeferringHandlers = true;\n  let key = Symbol();\n  currentHandlerStackKey = key;\n  directiveHandlerStacks.set(key, []);\n  let flushHandlers = () => {\n    while (directiveHandlerStacks.get(key).length)\n      directiveHandlerStacks.get(key).shift()();\n    directiveHandlerStacks.delete(key);\n  };\n  let stopDeferring = () => {\n    isDeferringHandlers = false;\n    flushHandlers();\n  };\n  callback(flushHandlers);\n  stopDeferring();\n}\nfunction getElementBoundUtilities(el) {\n  let cleanups = [];\n  let cleanup = (callback) => cleanups.push(callback);\n  let [effect3, cleanupEffect2] = elementBoundEffect(el);\n  cleanups.push(cleanupEffect2);\n  let utilities = {\n    Alpine: alpine_default,\n    effect: effect3,\n    cleanup,\n    evaluateLater: evaluateLater.bind(evaluateLater, el),\n    evaluate: evaluate.bind(evaluate, el)\n  };\n  let doCleanup = () => cleanups.forEach((i) => i());\n  return [utilities, doCleanup];\n}\nfunction getDirectiveHandler(el, directive2) {\n  let noop = () => {\n  };\n  let handler4 = directiveHandlers[directive2.type] || noop;\n  let [utilities, cleanup] = getElementBoundUtilities(el);\n  onAttributeRemoved(el, directive2.original, cleanup);\n  let fullHandler = () => {\n    if (el._x_ignore || el._x_ignoreSelf)\n      return;\n    handler4.inline && handler4.inline(el, directive2, utilities);\n    handler4 = handler4.bind(handler4, el, directive2, utilities);\n    isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler4) : handler4();\n  };\n  fullHandler.runCleanups = cleanup;\n  return fullHandler;\n}\nvar startingWith = (subject, replacement) => ({ name, value }) => {\n  if (name.startsWith(subject))\n    name = name.replace(subject, replacement);\n  return { name, value };\n};\nvar into = (i) => i;\nfunction toTransformedAttributes(callback = () => {\n}) {\n  return ({ name, value }) => {\n    let { name: newName, value: newValue } = attributeTransformers.reduce((carry, transform) => {\n      return transform(carry);\n    }, { name, value });\n    if (newName !== name)\n      callback(newName, name);\n    return { name: newName, value: newValue };\n  };\n}\nvar attributeTransformers = [];\nfunction mapAttributes(callback) {\n  attributeTransformers.push(callback);\n}\nfunction outNonAlpineAttributes({ name }) {\n  return alpineAttributeRegex().test(name);\n}\nvar alpineAttributeRegex = () => new RegExp(`^${prefixAsString}([^:^.]+)\\\\b`);\nfunction toParsedDirectives(transformedAttributeMap, originalAttributeOverride) {\n  return ({ name, value }) => {\n    if (name === value)\n      value = \"\";\n    let typeMatch = name.match(alpineAttributeRegex());\n    let valueMatch = name.match(/:([a-zA-Z0-9\\-_:]+)/);\n    let modifiers = name.match(/\\.[^.\\]]+(?=[^\\]]*$)/g) || [];\n    let original = originalAttributeOverride || transformedAttributeMap[name] || name;\n    return {\n      type: typeMatch ? typeMatch[1] : null,\n      value: valueMatch ? valueMatch[1] : null,\n      modifiers: modifiers.map((i) => i.replace(\".\", \"\")),\n      expression: value,\n      original\n    };\n  };\n}\nvar DEFAULT = \"DEFAULT\";\nvar directiveOrder = [\n  \"ignore\",\n  \"ref\",\n  \"id\",\n  \"data\",\n  \"anchor\",\n  \"bind\",\n  \"init\",\n  \"for\",\n  \"model\",\n  \"modelable\",\n  \"transition\",\n  \"show\",\n  \"if\",\n  DEFAULT,\n  \"teleport\"\n];\nfunction byPriority(a, b) {\n  let typeA = directiveOrder.indexOf(a.type) === -1 ? DEFAULT : a.type;\n  let typeB = directiveOrder.indexOf(b.type) === -1 ? DEFAULT : b.type;\n  return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB);\n}\n\n// packages/alpinejs/src/utils/walk.js\nfunction walk(el, callback) {\n  if (typeof ShadowRoot === \"function\" && el instanceof ShadowRoot) {\n    Array.from(el.children).forEach((el2) => walk(el2, callback));\n    return;\n  }\n  let skip = false;\n  callback(el, () => skip = true);\n  if (skip)\n    return;\n  let node = el.firstElementChild;\n  while (node) {\n    walk(node, callback, false);\n    node = node.nextElementSibling;\n  }\n}\n\n// packages/alpinejs/src/clone.js\nvar isCloning = false;\nfunction skipDuringClone(callback, fallback = () => {\n}) {\n  return (...args) => isCloning ? fallback(...args) : callback(...args);\n}\nfunction onlyDuringClone(callback) {\n  return (...args) => isCloning && callback(...args);\n}\nvar interceptors = [];\nfunction interceptClone(callback) {\n  interceptors.push(callback);\n}\nfunction cloneNode(from, to) {\n  interceptors.forEach((i) => i(from, to));\n  isCloning = true;\n  dontRegisterReactiveSideEffects(() => {\n    initTree(to, (el, callback) => {\n      callback(el, () => {\n      });\n    });\n  });\n  isCloning = false;\n}\nvar isCloningLegacy = false;\nfunction clone(oldEl, newEl) {\n  if (!newEl._x_dataStack)\n    newEl._x_dataStack = oldEl._x_dataStack;\n  isCloning = true;\n  isCloningLegacy = true;\n  dontRegisterReactiveSideEffects(() => {\n    cloneTree(newEl);\n  });\n  isCloning = false;\n  isCloningLegacy = false;\n}\nfunction cloneTree(el) {\n  let hasRunThroughFirstEl = false;\n  let shallowWalker = (el2, callback) => {\n    walk(el2, (el3, skip) => {\n      if (hasRunThroughFirstEl && isRoot(el3))\n        return skip();\n      hasRunThroughFirstEl = true;\n      callback(el3, skip);\n    });\n  };\n  initTree(el, shallowWalker);\n}\nfunction dontRegisterReactiveSideEffects(callback) {\n  let cache = effect;\n  overrideEffect((callback2, el) => {\n    let storedEffect = cache(callback2);\n    release(storedEffect);\n    return () => {\n    };\n  });\n  callback();\n  overrideEffect(cache);\n}\n\n// packages/alpinejs/src/deferInit.js\nvar activeDefers = 0;\nfunction deferInit(el, promise) {\n  let record = el._x_deferInit;\n  if (!record) {\n    record = el._x_deferInit = {\n      pending: 0,\n      ownsIgnore: !el._x_ignore,\n      queuedAttributes: /* @__PURE__ */ new Map()\n    };\n    if (record.ownsIgnore)\n      el._x_ignore = true;\n    activeDefers++;\n  }\n  record.pending++;\n  Promise.resolve(promise).catch((error2) => {\n    try {\n      handleError(error2, el);\n    } catch (error3) {\n      setTimeout(() => {\n        throw error3;\n      }, 0);\n    }\n  }).then(() => settle(el, record));\n}\nfunction settle(el, record) {\n  record.pending--;\n  if (record.pending > 0)\n    return;\n  flushPendingMutations();\n  if (record.pending > 0)\n    return;\n  if (el._x_deferInit !== record)\n    return;\n  delete el._x_deferInit;\n  if (record.ownsIgnore)\n    delete el._x_ignore;\n  activeDefers--;\n  if (!el.isConnected)\n    return;\n  replayQueuedAttributes(record);\n  initTree(el);\n}\nfunction queueAttributesForDeferredTree(el, attrs) {\n  if (activeDefers === 0)\n    return false;\n  let root = findClosest(el, (i) => i._x_deferInit);\n  if (!root)\n    return false;\n  queueInto(root._x_deferInit, el, attrs.map(({ name }) => name));\n  return true;\n}\nfunction queueInto(record, el, names) {\n  let entry = record.queuedAttributes.get(el);\n  if (!entry || entry.marker !== el._x_marker) {\n    entry = { marker: el._x_marker, names: /* @__PURE__ */ new Set() };\n    record.queuedAttributes.set(el, entry);\n  }\n  names.forEach((name) => entry.names.add(name));\n}\nfunction replayQueuedAttributes(record) {\n  record.queuedAttributes.forEach((entry, el) => {\n    if (!el.isConnected)\n      return;\n    if (!el._x_marker)\n      return;\n    if (el._x_marker !== entry.marker)\n      return;\n    let suspendedAncestor = findClosest(el, (i) => i._x_deferInit);\n    if (suspendedAncestor) {\n      queueInto(suspendedAncestor._x_deferInit, el, Array.from(entry.names));\n      return;\n    }\n    let attrs = Array.from(entry.names).filter((name) => el.hasAttribute(name)).map((name) => ({ name, value: el.getAttribute(name) }));\n    if (attrs.length === 0)\n      return;\n    directives(el, attrs).forEach((handle) => handle());\n  });\n}\ninterceptClone((from, to) => {\n  if (activeDefers === 0)\n    return;\n  if (!from || from.nodeType !== 1 || !to || to.nodeType !== 1)\n    return;\n  if (findClosest(from, (i) => i._x_deferInit))\n    to._x_ignore = true;\n});\n\n// packages/alpinejs/src/utils/dispatch.js\nfunction dispatch(el, name, detail = {}, options = {}) {\n  return el.dispatchEvent(\n    new CustomEvent(name, {\n      detail,\n      bubbles: true,\n      // Allows events to pass the shadow DOM barrier.\n      composed: true,\n      cancelable: true,\n      // Allows overriding the default event options.\n      ...options\n    })\n  );\n}\n\n// packages/alpinejs/src/utils/warn.js\nfunction warn(message, ...args) {\n  console.warn(`Alpine Warning: ${message}`, ...args);\n}\n\n// packages/alpinejs/src/lifecycle.js\nvar started = false;\nfunction start() {\n  if (started)\n    warn(\"Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.\");\n  started = true;\n  if (!document.body)\n    warn(\"Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?\");\n  dispatch(document, \"alpine:init\");\n  dispatch(document, \"alpine:initializing\");\n  startObservingMutations();\n  onElAdded((el) => initTree(el, walk));\n  onElRemoved((el) => destroyTree(el));\n  onAttributesAdded((el, attrs) => {\n    if (queueAttributesForDeferredTree(el, attrs))\n      return;\n    directives(el, attrs).forEach((handle) => handle());\n  });\n  let outNestedComponents = (el) => !closestRoot(el.parentElement, true);\n  Array.from(document.querySelectorAll(allSelectors().join(\",\"))).filter(outNestedComponents).forEach((el) => {\n    initTree(el);\n  });\n  dispatch(document, \"alpine:initialized\");\n  setTimeout(() => {\n    warnAboutMissingPlugins();\n  });\n}\nvar rootSelectorCallbacks = [];\nvar initSelectorCallbacks = [];\nfunction rootSelectors() {\n  return rootSelectorCallbacks.map((fn) => fn());\n}\nfunction allSelectors() {\n  return rootSelectorCallbacks.concat(initSelectorCallbacks).map((fn) => fn());\n}\nfunction addRootSelector(selectorCallback) {\n  rootSelectorCallbacks.push(selectorCallback);\n}\nfunction addInitSelector(selectorCallback) {\n  initSelectorCallbacks.push(selectorCallback);\n}\nfunction closestRoot(el, includeInitSelectors = false) {\n  return findClosest(el, (element) => {\n    const selectors = includeInitSelectors ? allSelectors() : rootSelectors();\n    if (selectors.some((selector) => element.matches(selector)))\n      return true;\n  });\n}\nfunction findClosest(el, callback) {\n  if (!el)\n    return;\n  if (callback(el))\n    return el;\n  if (el._x_teleportBack)\n    return findClosest(el._x_teleportBack, callback);\n  if (el.parentNode instanceof ShadowRoot) {\n    return findClosest(el.parentNode.host, callback);\n  }\n  if (!el.parentElement)\n    return;\n  return findClosest(el.parentElement, callback);\n}\nfunction isRoot(el) {\n  return rootSelectors().some((selector) => el.matches(selector));\n}\nvar initInterceptors2 = [];\nfunction interceptInit(callback) {\n  initInterceptors2.push(callback);\n}\nvar markerDispenser = 1;\nfunction initTree(el, walker = walk, intercept = () => {\n}) {\n  if (findClosest(el, (i) => i._x_ignore))\n    return;\n  deferHandlingDirectives(() => {\n    walker(el, (el2, skip) => {\n      if (el2._x_marker)\n        return;\n      intercept(el2, skip);\n      initInterceptors2.forEach((i) => i(el2, skip));\n      directives(el2, el2.attributes).forEach((handle) => handle());\n      if (!el2._x_ignore)\n        el2._x_marker = markerDispenser++;\n      el2._x_ignore && skip();\n    });\n  });\n}\nfunction destroyTree(root, walker = walk) {\n  walker(root, (el) => {\n    cleanupElement(el);\n    cleanupAttributes(el);\n    delete el._x_marker;\n  });\n}\nfunction warnAboutMissingPlugins() {\n  let pluginDirectives = [\n    [\"ui\", \"dialog\", [\"[x-dialog], [x-popover]\"]],\n    [\"anchor\", \"anchor\", [\"[x-anchor]\"]],\n    [\"sort\", \"sort\", [\"[x-sort]\"]]\n  ];\n  pluginDirectives.forEach(([plugin2, directive2, selectors]) => {\n    if (directiveExists(directive2))\n      return;\n    selectors.some((selector) => {\n      if (document.querySelector(selector)) {\n        warn(`found \"${selector}\", but missing ${plugin2} plugin`);\n        return true;\n      }\n    });\n  });\n}\n\n// packages/alpinejs/src/nextTick.js\nvar tickStack = [];\nvar isHolding = false;\nfunction nextTick(callback = () => {\n}) {\n  queueMicrotask(() => {\n    isHolding || setTimeout(() => {\n      releaseNextTicks();\n    });\n  });\n  return new Promise((res) => {\n    tickStack.push(() => {\n      callback();\n      res();\n    });\n  });\n}\nfunction releaseNextTicks() {\n  isHolding = false;\n  while (tickStack.length)\n    tickStack.shift()();\n}\nfunction holdNextTicks() {\n  isHolding = true;\n}\n\n// packages/alpinejs/src/utils/classes.js\nfunction setClasses(el, value) {\n  if (Array.isArray(value)) {\n    return setClassesFromString(el, value.join(\" \"));\n  } else if (typeof value === \"object\" && value !== null) {\n    return setClassesFromObject(el, value);\n  } else if (typeof value === \"function\") {\n    return setClasses(el, value());\n  }\n  return setClassesFromString(el, value);\n}\nfunction splitClasses(classString) {\n  return classString.split(/\\s/).filter(Boolean);\n}\nfunction setClassesFromString(el, classString) {\n  let missingClasses = (classString2) => splitClasses(classString2).filter((i) => !el.classList.contains(i)).filter(Boolean);\n  let addClassesAndReturnUndo = (classes) => {\n    el.classList.add(...classes);\n    return () => {\n      el.classList.remove(...classes);\n    };\n  };\n  classString = classString === true ? classString = \"\" : classString || \"\";\n  return addClassesAndReturnUndo(missingClasses(classString));\n}\nfunction setClassesFromObject(el, classObject) {\n  let forAdd = Object.entries(classObject).flatMap(([classString, bool]) => bool ? splitClasses(classString) : false).filter(Boolean);\n  let forRemove = Object.entries(classObject).flatMap(([classString, bool]) => !bool ? splitClasses(classString) : false).filter(Boolean);\n  let added = [];\n  let removed = [];\n  forRemove.forEach((i) => {\n    if (el.classList.contains(i)) {\n      el.classList.remove(i);\n      removed.push(i);\n    }\n  });\n  forAdd.forEach((i) => {\n    if (!el.classList.contains(i)) {\n      el.classList.add(i);\n      added.push(i);\n    }\n  });\n  return () => {\n    removed.forEach((i) => el.classList.add(i));\n    added.forEach((i) => el.classList.remove(i));\n  };\n}\n\n// packages/alpinejs/src/utils/styles.js\nfunction setStyles(el, value) {\n  if (typeof value === \"object\" && value !== null) {\n    return setStylesFromObject(el, value);\n  }\n  return setStylesFromString(el, value);\n}\nfunction setStylesFromObject(el, value) {\n  let previousStyles = {};\n  Object.entries(value).forEach(([key, value2]) => {\n    previousStyles[key] = el.style[key];\n    if (!key.startsWith(\"--\")) {\n      key = kebabCase(key);\n    }\n    el.style.setProperty(key, value2);\n  });\n  setTimeout(() => {\n    if (el.style.length === 0) {\n      el.removeAttribute(\"style\");\n    }\n  });\n  return () => {\n    setStyles(el, previousStyles);\n  };\n}\nfunction setStylesFromString(el, value) {\n  let cache = el.getAttribute(\"style\", value);\n  el.setAttribute(\"style\", value);\n  return () => {\n    el.setAttribute(\"style\", cache || \"\");\n  };\n}\nfunction kebabCase(subject) {\n  return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n\n// packages/alpinejs/src/utils/once.js\nfunction once(callback, fallback = () => {\n}) {\n  let called = false;\n  return function() {\n    if (!called) {\n      called = true;\n      callback.apply(this, arguments);\n    } else {\n      fallback.apply(this, arguments);\n    }\n  };\n}\n\n// packages/alpinejs/src/directives/x-transition.js\ndirective(\"transition\", (el, { value, modifiers, expression }, { evaluate: evaluate2 }) => {\n  if (typeof expression === \"function\")\n    expression = evaluate2(expression);\n  if (expression === false)\n    return;\n  if (!expression || typeof expression === \"boolean\") {\n    registerTransitionsFromHelper(el, modifiers, value);\n  } else {\n    registerTransitionsFromClassString(el, expression, value);\n  }\n});\nfunction registerTransitionsFromClassString(el, classString, stage) {\n  registerTransitionObject(el, setClasses, \"\");\n  let directiveStorageMap = {\n    \"enter\": (classes) => {\n      el._x_transition.enter.during = classes;\n    },\n    \"enter-start\": (classes) => {\n      el._x_transition.enter.start = classes;\n    },\n    \"enter-end\": (classes) => {\n      el._x_transition.enter.end = classes;\n    },\n    \"leave\": (classes) => {\n      el._x_transition.leave.during = classes;\n    },\n    \"leave-start\": (classes) => {\n      el._x_transition.leave.start = classes;\n    },\n    \"leave-end\": (classes) => {\n      el._x_transition.leave.end = classes;\n    }\n  };\n  directiveStorageMap[stage](classString);\n}\nfunction registerTransitionsFromHelper(el, modifiers, stage) {\n  registerTransitionObject(el, setStyles);\n  let doesntSpecify = !modifiers.includes(\"in\") && !modifiers.includes(\"out\") && !stage;\n  let transitioningIn = doesntSpecify || modifiers.includes(\"in\") || [\"enter\"].includes(stage);\n  let transitioningOut = doesntSpecify || modifiers.includes(\"out\") || [\"leave\"].includes(stage);\n  if (modifiers.includes(\"in\") && !doesntSpecify) {\n    modifiers = modifiers.filter((i, index) => index < modifiers.indexOf(\"out\"));\n  }\n  if (modifiers.includes(\"out\") && !doesntSpecify) {\n    modifiers = modifiers.filter((i, index) => index > modifiers.indexOf(\"out\"));\n  }\n  let wantsAll = !modifiers.includes(\"opacity\") && !modifiers.includes(\"scale\");\n  let wantsOpacity = wantsAll || modifiers.includes(\"opacity\");\n  let wantsScale = wantsAll || modifiers.includes(\"scale\");\n  let opacityValue = wantsOpacity ? 0 : 1;\n  let scaleValue = wantsScale ? modifierValue(modifiers, \"scale\", 95) / 100 : 1;\n  let delay = modifierValue(modifiers, \"delay\", 0) / 1e3;\n  let origin = modifierValue(modifiers, \"origin\", \"center\");\n  let property = \"opacity, transform\";\n  let durationIn = modifierValue(modifiers, \"duration\", 150) / 1e3;\n  let durationOut = modifierValue(modifiers, \"duration\", 75) / 1e3;\n  let easing = `cubic-bezier(0.4, 0.0, 0.2, 1)`;\n  if (transitioningIn) {\n    el._x_transition.enter.during = {\n      transformOrigin: origin,\n      transitionDelay: `${delay}s`,\n      transitionProperty: property,\n      transitionDuration: `${durationIn}s`,\n      transitionTimingFunction: easing\n    };\n    el._x_transition.enter.start = {\n      opacity: opacityValue,\n      transform: `scale(${scaleValue})`\n    };\n    el._x_transition.enter.end = {\n      opacity: 1,\n      transform: `scale(1)`\n    };\n  }\n  if (transitioningOut) {\n    el._x_transition.leave.during = {\n      transformOrigin: origin,\n      transitionDelay: `${delay}s`,\n      transitionProperty: property,\n      transitionDuration: `${durationOut}s`,\n      transitionTimingFunction: easing\n    };\n    el._x_transition.leave.start = {\n      opacity: 1,\n      transform: `scale(1)`\n    };\n    el._x_transition.leave.end = {\n      opacity: opacityValue,\n      transform: `scale(${scaleValue})`\n    };\n  }\n}\nfunction registerTransitionObject(el, setFunction, defaultValue = {}) {\n  if (!el._x_transition)\n    el._x_transition = {\n      enter: { during: defaultValue, start: defaultValue, end: defaultValue },\n      leave: { during: defaultValue, start: defaultValue, end: defaultValue },\n      in(before = () => {\n      }, after = () => {\n      }) {\n        transition(el, setFunction, {\n          during: this.enter.during,\n          start: this.enter.start,\n          end: this.enter.end\n        }, before, after);\n      },\n      out(before = () => {\n      }, after = () => {\n      }) {\n        transition(el, setFunction, {\n          during: this.leave.during,\n          start: this.leave.start,\n          end: this.leave.end\n        }, before, after);\n      }\n    };\n}\nwindow.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value, show, hide) {\n  const nextTick2 = document.visibilityState === \"visible\" ? requestAnimationFrame : setTimeout;\n  let clickAwayCompatibleShow = () => nextTick2(show);\n  if (value) {\n    if (el._x_transition && (el._x_transition.enter || el._x_transition.leave)) {\n      el._x_transition.enter && (Object.entries(el._x_transition.enter.during).length || Object.entries(el._x_transition.enter.start).length || Object.entries(el._x_transition.enter.end).length) ? el._x_transition.in(show) : clickAwayCompatibleShow();\n    } else {\n      el._x_transition ? el._x_transition.in(show) : clickAwayCompatibleShow();\n    }\n    return;\n  }\n  el._x_hidePromise = el._x_transition ? new Promise((resolve, reject) => {\n    el._x_transition.out(() => {\n    }, () => resolve(hide));\n    el._x_transitioning && el._x_transitioning.beforeCancel(() => reject({ isFromCancelledTransition: true }));\n  }) : Promise.resolve(hide);\n  queueMicrotask(() => {\n    let closest = closestHide(el);\n    if (closest) {\n      if (!closest._x_hideChildren)\n        closest._x_hideChildren = [];\n      closest._x_hideChildren.push(el);\n    } else {\n      nextTick2(() => {\n        let hideAfterChildren = (el2) => {\n          let carry = Promise.all([\n            el2._x_hidePromise,\n            ...(el2._x_hideChildren || []).map(hideAfterChildren)\n          ]).then(([i]) => i?.());\n          delete el2._x_hidePromise;\n          delete el2._x_hideChildren;\n          return carry;\n        };\n        hideAfterChildren(el).catch((e) => {\n          if (!e.isFromCancelledTransition)\n            throw e;\n        });\n      });\n    }\n  });\n};\nfunction closestHide(el) {\n  let parent = el.parentNode;\n  if (!parent)\n    return;\n  return parent._x_hidePromise ? parent : closestHide(parent);\n}\nfunction transition(el, setFunction, { during, start: start2, end } = {}, before = () => {\n}, after = () => {\n}) {\n  if (el._x_transitioning)\n    el._x_transitioning.cancel();\n  if (Object.keys(during).length === 0 && Object.keys(start2).length === 0 && Object.keys(end).length === 0) {\n    before();\n    after();\n    return;\n  }\n  let undoStart, undoDuring, undoEnd;\n  performTransition(el, {\n    start() {\n      undoStart = setFunction(el, start2);\n    },\n    during() {\n      undoDuring = setFunction(el, during);\n    },\n    before,\n    end() {\n      undoStart();\n      undoEnd = setFunction(el, end);\n    },\n    after,\n    cleanup() {\n      undoDuring();\n      undoEnd();\n    }\n  });\n}\nfunction performTransition(el, stages) {\n  let interrupted, reachedBefore, reachedEnd;\n  let finish = once(() => {\n    mutateDom(() => {\n      interrupted = true;\n      if (!reachedBefore)\n        stages.before();\n      if (!reachedEnd) {\n        stages.end();\n        releaseNextTicks();\n      }\n      stages.after();\n      if (el.isConnected)\n        stages.cleanup();\n      delete el._x_transitioning;\n    });\n  });\n  el._x_transitioning = {\n    beforeCancels: [],\n    beforeCancel(callback) {\n      this.beforeCancels.push(callback);\n    },\n    cancel: once(function() {\n      while (this.beforeCancels.length) {\n        this.beforeCancels.shift()();\n      }\n      ;\n      finish();\n    }),\n    finish\n  };\n  mutateDom(() => {\n    stages.start();\n    stages.during();\n  });\n  holdNextTicks();\n  requestAnimationFrame(() => {\n    if (interrupted)\n      return;\n    let duration = Number(getComputedStyle(el).transitionDuration.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n    let delay = Number(getComputedStyle(el).transitionDelay.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n    if (duration === 0)\n      duration = Number(getComputedStyle(el).animationDuration.replace(\"s\", \"\")) * 1e3;\n    mutateDom(() => {\n      stages.before();\n    });\n    reachedBefore = true;\n    requestAnimationFrame(() => {\n      if (interrupted)\n        return;\n      mutateDom(() => {\n        stages.end();\n      });\n      releaseNextTicks();\n      setTimeout(el._x_transitioning.finish, duration + delay);\n      reachedEnd = true;\n    });\n  });\n}\nfunction modifierValue(modifiers, key, fallback) {\n  if (modifiers.indexOf(key) === -1)\n    return fallback;\n  const rawValue = modifiers[modifiers.indexOf(key) + 1];\n  if (!rawValue)\n    return fallback;\n  if (key === \"scale\") {\n    if (isNaN(rawValue))\n      return fallback;\n  }\n  if (key === \"duration\" || key === \"delay\") {\n    let match = rawValue.match(/([0-9]+)ms/);\n    if (match)\n      return match[1];\n  }\n  if (key === \"origin\") {\n    if ([\"top\", \"right\", \"left\", \"center\", \"bottom\"].includes(modifiers[modifiers.indexOf(key) + 2])) {\n      return [rawValue, modifiers[modifiers.indexOf(key) + 2]].join(\" \");\n    }\n  }\n  return rawValue;\n}\n\n// packages/alpinejs/src/utils/bind.js\nfunction bind(el, name, value, modifiers = []) {\n  if (!el._x_bindings)\n    el._x_bindings = reactive({});\n  el._x_bindings[name] = value;\n  name = modifiers.includes(\"camel\") ? camelCase(name) : name;\n  switch (name) {\n    case \"value\":\n      bindInputValue(el, value);\n      break;\n    case \"style\":\n      bindStyles(el, value);\n      break;\n    case \"class\":\n      bindClasses(el, value);\n      break;\n    case \"selected\":\n    case \"checked\":\n      bindAttributeAndProperty(el, name, value);\n      break;\n    default:\n      bindAttribute(el, name, value);\n      break;\n  }\n}\nfunction bindInputValue(el, value) {\n  if (isRadio(el)) {\n    if (el.attributes.value === void 0) {\n      el.value = value;\n    }\n  } else if (isCheckbox(el)) {\n    if (Number.isInteger(value)) {\n      el.value = value;\n    } else if (!Array.isArray(value) && typeof value !== \"boolean\" && ![null, void 0].includes(value)) {\n      el.value = String(value);\n    } else {\n      if (Array.isArray(value)) {\n        el.checked = value.some((val) => checkedAttrLooseCompare(val, el.value));\n      } else {\n        el.checked = !!value;\n      }\n    }\n  } else if (el.tagName === \"SELECT\") {\n    updateSelect(el, value);\n  } else if (el.tagName === \"OPTION\") {\n    bindAttribute(el, \"value\", value);\n  } else {\n    if (el.value === value && (typeof value !== \"object\" || value === null))\n      return;\n    el.value = value === void 0 ? \"\" : value;\n  }\n}\nfunction bindClasses(el, value) {\n  if (el._x_undoAddedClasses)\n    el._x_undoAddedClasses();\n  el._x_undoAddedClasses = setClasses(el, value);\n}\nfunction bindStyles(el, value) {\n  if (el._x_undoAddedStyles)\n    el._x_undoAddedStyles();\n  el._x_undoAddedStyles = setStyles(el, value);\n}\nfunction bindAttributeAndProperty(el, name, value) {\n  bindAttribute(el, name, value);\n  setPropertyIfChanged(el, name, value);\n}\nfunction bindAttribute(el, name, value) {\n  if ([null, void 0, false].includes(value) && attributeShouldntBePreservedIfFalsy(name)) {\n    el.removeAttribute(name);\n  } else {\n    if (isBooleanAttr(name))\n      value = name;\n    if (isObjectAttr(value))\n      value = JSON.stringify(value);\n    setIfChanged(el, name, value);\n  }\n}\nfunction setIfChanged(el, attrName, value) {\n  if (el.getAttribute(attrName) != value) {\n    el.setAttribute(attrName, value);\n  }\n}\nfunction setPropertyIfChanged(el, propName, value) {\n  if (el[propName] !== value) {\n    el[propName] = value;\n  }\n}\nfunction updateSelect(el, value) {\n  const arrayWrappedValue = [].concat(value).map((value2) => {\n    return value2 + \"\";\n  });\n  Array.from(el.options).forEach((option) => {\n    option.selected = arrayWrappedValue.includes(option.value);\n  });\n}\nfunction camelCase(subject) {\n  return subject.toLowerCase().replace(/-(\\w)/g, (match, char) => char.toUpperCase());\n}\nfunction checkedAttrLooseCompare(valueA, valueB) {\n  return valueA == valueB;\n}\nfunction safeParseBoolean(rawValue) {\n  if ([1, \"1\", \"true\", \"on\", \"yes\", true].includes(rawValue)) {\n    return true;\n  }\n  if ([0, \"0\", \"false\", \"off\", \"no\", false].includes(rawValue)) {\n    return false;\n  }\n  return rawValue ? Boolean(rawValue) : null;\n}\nvar booleanAttributes = /* @__PURE__ */ new Set([\n  \"allowfullscreen\",\n  \"async\",\n  \"autofocus\",\n  \"autoplay\",\n  \"checked\",\n  \"controls\",\n  \"default\",\n  \"defer\",\n  \"disabled\",\n  \"formnovalidate\",\n  \"inert\",\n  \"ismap\",\n  \"itemscope\",\n  \"loop\",\n  \"multiple\",\n  \"muted\",\n  \"nomodule\",\n  \"novalidate\",\n  \"open\",\n  \"playsinline\",\n  \"readonly\",\n  \"required\",\n  \"reversed\",\n  \"selected\",\n  \"shadowrootclonable\",\n  \"shadowrootdelegatesfocus\",\n  \"shadowrootserializable\"\n]);\nfunction isBooleanAttr(attrName) {\n  return booleanAttributes.has(attrName);\n}\nfunction attributeShouldntBePreservedIfFalsy(name) {\n  return ![\"aria-pressed\", \"aria-checked\", \"aria-expanded\", \"aria-selected\"].includes(name);\n}\nfunction isObjectAttr(value) {\n  return typeof value === \"object\" && value !== null;\n}\nfunction getBinding(el, name, fallback) {\n  if (el._x_bindings && el._x_bindings[name] !== void 0)\n    return el._x_bindings[name];\n  return getAttributeBinding(el, name, fallback);\n}\nfunction extractProp(el, name, fallback, extract = true) {\n  if (el._x_bindings && el._x_bindings[name] !== void 0)\n    return el._x_bindings[name];\n  if (el._x_inlineBindings && el._x_inlineBindings[name] !== void 0) {\n    let binding = el._x_inlineBindings[name];\n    binding.extract = extract;\n    return dontAutoEvaluateFunctions(() => {\n      return evaluate(el, binding.expression);\n    });\n  }\n  return getAttributeBinding(el, name, fallback);\n}\nfunction getAttributeBinding(el, name, fallback) {\n  let attr = el.getAttribute(name);\n  if (attr === null)\n    return typeof fallback === \"function\" ? fallback() : fallback;\n  if (attr === \"\")\n    return true;\n  if (isBooleanAttr(name)) {\n    return !![name, \"true\"].includes(attr);\n  }\n  return attr;\n}\nfunction isCheckbox(el) {\n  return el.type === \"checkbox\" || el.localName === \"ui-checkbox\" || el.localName === \"ui-switch\";\n}\nfunction isRadio(el) {\n  return el.type === \"radio\" || el.localName === \"ui-radio\";\n}\n\n// packages/alpinejs/src/utils/debounce.js\nfunction debounce(func, wait) {\n  let timeout;\n  return function() {\n    const context = this, args = arguments;\n    const later = function() {\n      timeout = null;\n      func.apply(context, args);\n    };\n    clearTimeout(timeout);\n    timeout = setTimeout(later, wait);\n  };\n}\n\n// packages/alpinejs/src/utils/throttle.js\nfunction throttle(func, limit) {\n  let inThrottle;\n  return function() {\n    let context = this, args = arguments;\n    if (!inThrottle) {\n      func.apply(context, args);\n      inThrottle = true;\n      setTimeout(() => inThrottle = false, limit);\n    }\n  };\n}\n\n// packages/alpinejs/src/entangle.js\nfunction entangle({ get: outerGet, set: outerSet }, { get: innerGet, set: innerSet }) {\n  let firstRun = true;\n  let outerHash;\n  let innerHash;\n  let reference = effect(() => {\n    let outer = outerGet();\n    let inner = innerGet();\n    if (firstRun) {\n      innerSet(cloneIfObject(outer));\n      firstRun = false;\n    } else {\n      let outerHashLatest = JSON.stringify(outer);\n      let innerHashLatest = JSON.stringify(inner);\n      if (outerHashLatest !== outerHash) {\n        innerSet(cloneIfObject(outer));\n      } else if (outerHashLatest !== innerHashLatest) {\n        outerSet(cloneIfObject(inner));\n      } else {\n      }\n    }\n    outerHash = JSON.stringify(outerGet());\n    innerHash = JSON.stringify(innerGet());\n  });\n  return () => {\n    dequeueJob(reference);\n    release(reference);\n  };\n}\nfunction cloneIfObject(value) {\n  return typeof value === \"object\" ? JSON.parse(JSON.stringify(value)) : value;\n}\n\n// packages/alpinejs/src/plugin.js\nfunction plugin(callback) {\n  let callbacks = Array.isArray(callback) ? callback : [callback];\n  callbacks.forEach((i) => i(alpine_default));\n}\n\n// packages/alpinejs/src/store.js\nvar stores = {};\nvar isReactive = false;\nfunction store(name, value) {\n  if (!isReactive) {\n    stores = reactive(stores);\n    isReactive = true;\n  }\n  if (value === void 0) {\n    return stores[name];\n  }\n  stores[name] = value;\n  if (typeof value === \"object\" && value !== null && value._x_interceptor) {\n    stores[name] = value.initialize(stores, name, name, () => {\n    });\n  } else {\n    initInterceptors(stores[name]);\n  }\n  if (typeof value === \"object\" && value !== null && value.hasOwnProperty(\"init\") && typeof value.init === \"function\") {\n    stores[name].init();\n  }\n}\nfunction getStores() {\n  return stores;\n}\n\n// packages/alpinejs/src/binds.js\nvar binds = {};\nfunction bind2(name, bindings) {\n  let getBindings = typeof bindings !== \"function\" ? () => bindings : bindings;\n  if (name instanceof Element) {\n    return applyBindingsObject(name, getBindings());\n  } else {\n    binds[name] = getBindings;\n  }\n  return () => {\n  };\n}\nfunction injectBindingProviders(obj) {\n  Object.entries(binds).forEach(([name, callback]) => {\n    Object.defineProperty(obj, name, {\n      get() {\n        return (...args) => {\n          return callback(...args);\n        };\n      }\n    });\n  });\n  return obj;\n}\nfunction applyBindingsObject(el, obj, original) {\n  let cleanupRunners = [];\n  while (cleanupRunners.length)\n    cleanupRunners.pop()();\n  let attributes = Object.entries(obj).map(([name, value]) => ({ name, value }));\n  let staticAttributes = attributesOnly(attributes);\n  attributes = attributes.map((attribute) => {\n    if (staticAttributes.find((attr) => attr.name === attribute.name)) {\n      return {\n        name: `x-bind:${attribute.name}`,\n        value: `\"${attribute.value}\"`\n      };\n    }\n    return attribute;\n  });\n  directives(el, attributes, original).map((handle) => {\n    cleanupRunners.push(handle.runCleanups);\n    handle();\n  });\n  return () => {\n    while (cleanupRunners.length)\n      cleanupRunners.pop()();\n  };\n}\n\n// packages/alpinejs/src/datas.js\nvar datas = {};\nfunction data(name, callback) {\n  datas[name] = callback;\n}\nfunction injectDataProviders(obj, context) {\n  Object.entries(datas).forEach(([name, callback]) => {\n    Object.defineProperty(obj, name, {\n      get() {\n        return (...args) => {\n          return callback.bind(context)(...args);\n        };\n      },\n      enumerable: false\n    });\n  });\n  return obj;\n}\n\n// packages/alpinejs/src/alpine.js\nvar Alpine = {\n  get reactive() {\n    return reactive;\n  },\n  get release() {\n    return release;\n  },\n  get effect() {\n    return effect;\n  },\n  get raw() {\n    return raw;\n  },\n  get transaction() {\n    return transaction;\n  },\n  version: \"3.17.5\",\n  flushAndStopDeferringMutations,\n  dontAutoEvaluateFunctions,\n  disableEffectScheduling,\n  startObservingMutations,\n  stopObservingMutations,\n  setReactivityEngine,\n  onAttributeRemoved,\n  onAttributesAdded,\n  closestDataStack,\n  skipDuringClone,\n  onlyDuringClone,\n  addRootSelector,\n  addInitSelector,\n  setErrorHandler,\n  interceptClone,\n  addScopeToNode,\n  deferMutations,\n  mapAttributes,\n  evaluateLater,\n  interceptInit,\n  initInterceptors,\n  injectMagics,\n  setEvaluator,\n  setRawEvaluator,\n  mergeProxies,\n  extractProp,\n  findClosest,\n  onElRemoved,\n  closestRoot,\n  destroyTree,\n  interceptor,\n  // INTERNAL: not public API and is subject to change without major release.\n  transition,\n  // INTERNAL\n  setStyles,\n  // INTERNAL\n  mutateDom,\n  deferInit,\n  directive,\n  entangle,\n  throttle,\n  debounce,\n  evaluate,\n  evaluateRaw,\n  initTree,\n  nextTick,\n  prefixed: prefix,\n  prefix: setPrefix,\n  plugin,\n  magic,\n  store,\n  start,\n  clone,\n  // INTERNAL\n  cloneNode,\n  // INTERNAL\n  bound: getBinding,\n  $data: scope,\n  watch,\n  walk,\n  data,\n  bind: bind2\n};\nvar alpine_default = Alpine;\n\n// node_modules/@vue/shared/dist/shared.esm-bundler.js\nfunction makeMap(str) {\n  const map = /* @__PURE__ */ Object.create(null);\n  for (const key of str.split(\",\"))\n    map[key] = 1;\n  return (val) => val in map;\n}\nvar EMPTY_OBJ = true ? Object.freeze({}) : {};\nvar EMPTY_ARR = true ? Object.freeze([]) : [];\nvar extend = Object.assign;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar hasOwn = (val, key) => hasOwnProperty.call(val, key);\nvar isArray = Array.isArray;\nvar isMap = (val) => toTypeString(val) === \"[object Map]\";\nvar isString = (val) => typeof val === \"string\";\nvar isSymbol = (val) => typeof val === \"symbol\";\nvar isObject = (val) => val !== null && typeof val === \"object\";\nvar objectToString = Object.prototype.toString;\nvar toTypeString = (value) => objectToString.call(value);\nvar toRawType = (value) => {\n  return toTypeString(value).slice(8, -1);\n};\nvar isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nvar cacheStringFunction = (fn) => {\n  const cache = /* @__PURE__ */ Object.create(null);\n  return (str) => {\n    const hit = cache[str];\n    return hit || (cache[str] = fn(str));\n  };\n};\nvar camelizeRE = /-\\w/g;\nvar camelize = cacheStringFunction(\n  (str) => {\n    return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());\n  }\n);\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cacheStringFunction(\n  (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nvar capitalize = cacheStringFunction((str) => {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n});\nvar toHandlerKey = cacheStringFunction(\n  (str) => {\n    const s = str ? `on${capitalize(str)}` : ``;\n    return s;\n  }\n);\nvar hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nvar specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nvar isBooleanAttr2 = /* @__PURE__ */ makeMap(\n  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\n\n// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js\nfunction warn2(msg, ...args) {\n  console.warn(`[Vue warn] ${msg}`, ...args);\n}\nvar activeEffectScope;\nvar activeSub;\nvar pausedQueueEffects = /* @__PURE__ */ new WeakSet();\nvar ReactiveEffect = class {\n  constructor(fn) {\n    this.fn = fn;\n    this.deps = void 0;\n    this.depsTail = void 0;\n    this.flags = 1 | 4;\n    this.next = void 0;\n    this.cleanup = void 0;\n    this.scheduler = void 0;\n    if (activeEffectScope) {\n      if (activeEffectScope.active) {\n        activeEffectScope.effects.push(this);\n      } else {\n        this.flags &= -2;\n      }\n    }\n  }\n  pause() {\n    this.flags |= 64;\n  }\n  resume() {\n    if (this.flags & 64) {\n      this.flags &= -65;\n      if (pausedQueueEffects.has(this)) {\n        pausedQueueEffects.delete(this);\n        this.trigger();\n      }\n    }\n  }\n  /**\n   * @internal\n   */\n  notify() {\n    if (this.flags & 2 && !(this.flags & 32)) {\n      return;\n    }\n    if (!(this.flags & 8)) {\n      batch(this);\n    }\n  }\n  run() {\n    if (!(this.flags & 1)) {\n      return this.fn();\n    }\n    this.flags |= 2;\n    cleanupEffect(this);\n    prepareDeps(this);\n    const prevEffect = activeSub;\n    const prevShouldTrack = shouldTrack;\n    activeSub = this;\n    shouldTrack = true;\n    try {\n      return this.fn();\n    } finally {\n      if (activeSub !== this) {\n        warn2(\n          \"Active effect was not restored correctly - this is likely a Vue internal bug.\"\n        );\n      }\n      cleanupDeps(this);\n      activeSub = prevEffect;\n      shouldTrack = prevShouldTrack;\n      this.flags &= -3;\n    }\n  }\n  stop() {\n    if (this.flags & 1) {\n      for (let link = this.deps; link; link = link.nextDep) {\n        removeSub(link);\n      }\n      this.deps = this.depsTail = void 0;\n      cleanupEffect(this);\n      this.onStop && this.onStop();\n      this.flags &= -2;\n    }\n  }\n  trigger() {\n    if (this.flags & 64) {\n      pausedQueueEffects.add(this);\n    } else if (this.scheduler) {\n      this.scheduler();\n    } else {\n      this.runIfDirty();\n    }\n  }\n  /**\n   * @internal\n   */\n  runIfDirty() {\n    if (isDirty(this)) {\n      this.run();\n    }\n  }\n  get dirty() {\n    return isDirty(this);\n  }\n};\nvar batchDepth = 0;\nvar batchedSub;\nvar batchedComputed;\nfunction batch(sub, isComputed = false) {\n  sub.flags |= 8;\n  if (isComputed) {\n    sub.next = batchedComputed;\n    batchedComputed = sub;\n    return;\n  }\n  sub.next = batchedSub;\n  batchedSub = sub;\n}\nfunction startBatch() {\n  batchDepth++;\n}\nfunction endBatch() {\n  if (--batchDepth > 0) {\n    return;\n  }\n  if (batchedComputed) {\n    let e = batchedComputed;\n    batchedComputed = void 0;\n    while (e) {\n      const next = e.next;\n      e.next = void 0;\n      e.flags &= -9;\n      e = next;\n    }\n  }\n  let error2;\n  while (batchedSub) {\n    let e = batchedSub;\n    batchedSub = void 0;\n    while (e) {\n      const next = e.next;\n      e.next = void 0;\n      e.flags &= -9;\n      if (e.flags & 1) {\n        try {\n          ;\n          e.trigger();\n        } catch (err) {\n          if (!error2)\n            error2 = err;\n        }\n      }\n      e = next;\n    }\n  }\n  if (error2)\n    throw error2;\n}\nfunction prepareDeps(sub) {\n  for (let link = sub.deps; link; link = link.nextDep) {\n    link.version = -1;\n    link.prevActiveLink = link.dep.activeLink;\n    link.dep.activeLink = link;\n  }\n}\nfunction cleanupDeps(sub) {\n  let head;\n  let tail = sub.depsTail;\n  let link = tail;\n  while (link) {\n    const prev = link.prevDep;\n    if (link.version === -1) {\n      if (link === tail)\n        tail = prev;\n      removeSub(link);\n      removeDep(link);\n    } else {\n      head = link;\n    }\n    link.dep.activeLink = link.prevActiveLink;\n    link.prevActiveLink = void 0;\n    link = prev;\n  }\n  sub.deps = head;\n  sub.depsTail = tail;\n}\nfunction isDirty(sub) {\n  for (let link = sub.deps; link; link = link.nextDep) {\n    if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {\n      return true;\n    }\n  }\n  if (sub._dirty) {\n    return true;\n  }\n  return false;\n}\nfunction refreshComputed(computed) {\n  if (computed.flags & 4 && !(computed.flags & 16)) {\n    return;\n  }\n  computed.flags &= -17;\n  if (computed.globalVersion === globalVersion) {\n    return;\n  }\n  computed.globalVersion = globalVersion;\n  if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {\n    return;\n  }\n  computed.flags |= 2;\n  const dep = computed.dep;\n  const prevSub = activeSub;\n  const prevShouldTrack = shouldTrack;\n  activeSub = computed;\n  shouldTrack = true;\n  try {\n    prepareDeps(computed);\n    const value = computed.fn(computed._value);\n    if (dep.version === 0 || hasChanged(value, computed._value)) {\n      computed.flags |= 128;\n      computed._value = value;\n      dep.version++;\n    }\n  } catch (err) {\n    dep.version++;\n    throw err;\n  } finally {\n    activeSub = prevSub;\n    shouldTrack = prevShouldTrack;\n    cleanupDeps(computed);\n    computed.flags &= -3;\n  }\n}\nfunction removeSub(link, soft = false) {\n  const { dep, prevSub, nextSub } = link;\n  if (prevSub) {\n    prevSub.nextSub = nextSub;\n    link.prevSub = void 0;\n  }\n  if (nextSub) {\n    nextSub.prevSub = prevSub;\n    link.nextSub = void 0;\n  }\n  if (dep.subsHead === link) {\n    dep.subsHead = nextSub;\n  }\n  if (dep.subs === link) {\n    dep.subs = prevSub;\n    if (!prevSub && dep.computed) {\n      dep.computed.flags &= -5;\n      for (let l = dep.computed.deps; l; l = l.nextDep) {\n        removeSub(l, true);\n      }\n    }\n  }\n  if (!soft && !--dep.sc && dep.map) {\n    dep.map.delete(dep.key);\n  }\n}\nfunction removeDep(link) {\n  const { prevDep, nextDep } = link;\n  if (prevDep) {\n    prevDep.nextDep = nextDep;\n    link.prevDep = void 0;\n  }\n  if (nextDep) {\n    nextDep.prevDep = prevDep;\n    link.nextDep = void 0;\n  }\n}\nfunction effect2(fn, options) {\n  if (fn.effect instanceof ReactiveEffect) {\n    fn = fn.effect.fn;\n  }\n  const e = new ReactiveEffect(fn);\n  if (options) {\n    extend(e, options);\n  }\n  try {\n    e.run();\n  } catch (err) {\n    e.stop();\n    throw err;\n  }\n  const runner = e.run.bind(e);\n  runner.effect = e;\n  return runner;\n}\nfunction stop(runner) {\n  runner.effect.stop();\n}\nvar shouldTrack = true;\nvar trackStack = [];\nfunction pauseTracking() {\n  trackStack.push(shouldTrack);\n  shouldTrack = false;\n}\nfunction resetTracking() {\n  const last = trackStack.pop();\n  shouldTrack = last === void 0 ? true : last;\n}\nfunction cleanupEffect(e) {\n  const { cleanup } = e;\n  e.cleanup = void 0;\n  if (cleanup) {\n    const prevSub = activeSub;\n    activeSub = void 0;\n    try {\n      cleanup();\n    } finally {\n      activeSub = prevSub;\n    }\n  }\n}\nvar globalVersion = 0;\nvar Link = class {\n  constructor(sub, dep) {\n    this.sub = sub;\n    this.dep = dep;\n    this.version = dep.version;\n    this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n  }\n};\nvar Dep = class {\n  // TODO isolatedDeclarations \"__v_skip\"\n  constructor(computed) {\n    this.computed = computed;\n    this.version = 0;\n    this.activeLink = void 0;\n    this.subs = void 0;\n    this.map = void 0;\n    this.key = void 0;\n    this.sc = 0;\n    this.__v_skip = true;\n    if (true) {\n      this.subsHead = void 0;\n    }\n  }\n  track(debugInfo) {\n    if (!activeSub || !shouldTrack || activeSub === this.computed) {\n      return;\n    }\n    let link = this.activeLink;\n    if (link === void 0 || link.sub !== activeSub) {\n      link = this.activeLink = new Link(activeSub, this);\n      if (!activeSub.deps) {\n        activeSub.deps = activeSub.depsTail = link;\n      } else {\n        link.prevDep = activeSub.depsTail;\n        activeSub.depsTail.nextDep = link;\n        activeSub.depsTail = link;\n      }\n      addSub(link);\n    } else if (link.version === -1) {\n      link.version = this.version;\n      if (link.nextDep) {\n        const next = link.nextDep;\n        next.prevDep = link.prevDep;\n        if (link.prevDep) {\n          link.prevDep.nextDep = next;\n        }\n        link.prevDep = activeSub.depsTail;\n        link.nextDep = void 0;\n        activeSub.depsTail.nextDep = link;\n        activeSub.depsTail = link;\n        if (activeSub.deps === link) {\n          activeSub.deps = next;\n        }\n      }\n    }\n    if (activeSub.onTrack) {\n      activeSub.onTrack(\n        extend(\n          {\n            effect: activeSub\n          },\n          debugInfo\n        )\n      );\n    }\n    return link;\n  }\n  trigger(debugInfo) {\n    this.version++;\n    globalVersion++;\n    this.notify(debugInfo);\n  }\n  notify(debugInfo) {\n    startBatch();\n    try {\n      if (true) {\n        for (let head = this.subsHead; head; head = head.nextSub) {\n          if (head.sub.onTrigger && !(head.sub.flags & 8)) {\n            head.sub.onTrigger(\n              extend(\n                {\n                  effect: head.sub\n                },\n                debugInfo\n              )\n            );\n          }\n        }\n      }\n      for (let link = this.subs; link; link = link.prevSub) {\n        if (link.sub.notify()) {\n          ;\n          link.sub.dep.notify();\n        }\n      }\n    } finally {\n      endBatch();\n    }\n  }\n};\nfunction addSub(link) {\n  link.dep.sc++;\n  if (link.sub.flags & 4) {\n    const computed = link.dep.computed;\n    if (computed && !link.dep.subs) {\n      computed.flags |= 4 | 16;\n      for (let l = computed.deps; l; l = l.nextDep) {\n        addSub(l);\n      }\n    }\n    const currentTail = link.dep.subs;\n    if (currentTail !== link) {\n      link.prevSub = currentTail;\n      if (currentTail)\n        currentTail.nextSub = link;\n    }\n    if (link.dep.subsHead === void 0) {\n      link.dep.subsHead = link;\n    }\n    link.dep.subs = link;\n  }\n}\nvar targetMap = /* @__PURE__ */ new WeakMap();\nvar ITERATE_KEY = /* @__PURE__ */ Symbol(\n  true ? \"Object iterate\" : \"\"\n);\nvar MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(\n  true ? \"Map keys iterate\" : \"\"\n);\nvar ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(\n  true ? \"Array iterate\" : \"\"\n);\nfunction track(target, type, key) {\n  if (shouldTrack && activeSub) {\n    let depsMap = targetMap.get(target);\n    if (!depsMap) {\n      targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n    }\n    let dep = depsMap.get(key);\n    if (!dep) {\n      depsMap.set(key, dep = new Dep());\n      dep.map = depsMap;\n      dep.key = key;\n    }\n    if (true) {\n      dep.track({\n        target,\n        type,\n        key\n      });\n    } else {\n      dep.track();\n    }\n  }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n  const depsMap = targetMap.get(target);\n  if (!depsMap) {\n    globalVersion++;\n    return;\n  }\n  const run = (dep) => {\n    if (dep) {\n      if (true) {\n        dep.trigger({\n          target,\n          type,\n          key,\n          newValue,\n          oldValue,\n          oldTarget\n        });\n      } else {\n        dep.trigger();\n      }\n    }\n  };\n  startBatch();\n  if (type === \"clear\") {\n    depsMap.forEach(run);\n  } else {\n    const targetIsArray = isArray(target);\n    const isArrayIndex = targetIsArray && isIntegerKey(key);\n    if (targetIsArray && key === \"length\") {\n      const newLength = Number(newValue);\n      depsMap.forEach((dep, key2) => {\n        if (key2 === \"length\" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {\n          run(dep);\n        }\n      });\n    } else {\n      if (key !== void 0 || depsMap.has(void 0)) {\n        run(depsMap.get(key));\n      }\n      if (isArrayIndex) {\n        run(depsMap.get(ARRAY_ITERATE_KEY));\n      }\n      switch (type) {\n        case \"add\":\n          if (!targetIsArray) {\n            run(depsMap.get(ITERATE_KEY));\n            if (isMap(target)) {\n              run(depsMap.get(MAP_KEY_ITERATE_KEY));\n            }\n          } else if (isArrayIndex) {\n            run(depsMap.get(\"length\"));\n          }\n          break;\n        case \"delete\":\n          if (!targetIsArray) {\n            run(depsMap.get(ITERATE_KEY));\n            if (isMap(target)) {\n              run(depsMap.get(MAP_KEY_ITERATE_KEY));\n            }\n          }\n          break;\n        case \"set\":\n          if (isMap(target)) {\n            run(depsMap.get(ITERATE_KEY));\n          }\n          break;\n      }\n    }\n  }\n  endBatch();\n}\nfunction reactiveReadArray(array) {\n  const raw2 = toRaw(array);\n  if (raw2 === array)\n    return raw2;\n  track(raw2, \"iterate\", ARRAY_ITERATE_KEY);\n  return isShallow(array) ? raw2 : raw2.map(toReactive);\n}\nfunction shallowReadArray(arr) {\n  track(arr = toRaw(arr), \"iterate\", ARRAY_ITERATE_KEY);\n  return arr;\n}\nfunction toWrapped(target, item) {\n  if (isReadonly(target)) {\n    return isReactive2(target) ? toReadonly(toReactive(item)) : toReadonly(item);\n  }\n  return toReactive(item);\n}\nvar arrayInstrumentations = {\n  __proto__: null,\n  [Symbol.iterator]() {\n    return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));\n  },\n  concat(...args) {\n    return reactiveReadArray(this).concat(\n      ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)\n    );\n  },\n  entries() {\n    return iterator(this, \"entries\", (value) => {\n      value[1] = toWrapped(this, value[1]);\n      return value;\n    });\n  },\n  every(fn, thisArg) {\n    return apply(this, \"every\", fn, thisArg, void 0, arguments);\n  },\n  filter(fn, thisArg) {\n    return apply(\n      this,\n      \"filter\",\n      fn,\n      thisArg,\n      (v) => v.map((item) => toWrapped(this, item)),\n      arguments\n    );\n  },\n  find(fn, thisArg) {\n    return apply(\n      this,\n      \"find\",\n      fn,\n      thisArg,\n      (item) => toWrapped(this, item),\n      arguments\n    );\n  },\n  findIndex(fn, thisArg) {\n    return apply(this, \"findIndex\", fn, thisArg, void 0, arguments);\n  },\n  findLast(fn, thisArg) {\n    return apply(\n      this,\n      \"findLast\",\n      fn,\n      thisArg,\n      (item) => toWrapped(this, item),\n      arguments\n    );\n  },\n  findLastIndex(fn, thisArg) {\n    return apply(this, \"findLastIndex\", fn, thisArg, void 0, arguments);\n  },\n  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement\n  forEach(fn, thisArg) {\n    return apply(this, \"forEach\", fn, thisArg, void 0, arguments);\n  },\n  includes(...args) {\n    return searchProxy(this, \"includes\", args);\n  },\n  indexOf(...args) {\n    return searchProxy(this, \"indexOf\", args);\n  },\n  join(separator) {\n    return reactiveReadArray(this).join(separator);\n  },\n  // keys() iterator only reads `length`, no optimization required\n  lastIndexOf(...args) {\n    return searchProxy(this, \"lastIndexOf\", args);\n  },\n  map(fn, thisArg) {\n    return apply(this, \"map\", fn, thisArg, void 0, arguments);\n  },\n  pop() {\n    return noTracking(this, \"pop\");\n  },\n  push(...args) {\n    return noTracking(this, \"push\", args);\n  },\n  reduce(fn, ...args) {\n    return reduce(this, \"reduce\", fn, args);\n  },\n  reduceRight(fn, ...args) {\n    return reduce(this, \"reduceRight\", fn, args);\n  },\n  shift() {\n    return noTracking(this, \"shift\");\n  },\n  // slice could use ARRAY_ITERATE but also seems to beg for range tracking\n  some(fn, thisArg) {\n    return apply(this, \"some\", fn, thisArg, void 0, arguments);\n  },\n  splice(...args) {\n    return noTracking(this, \"splice\", args);\n  },\n  toReversed() {\n    return reactiveReadArray(this).toReversed();\n  },\n  toSorted(comparer) {\n    return reactiveReadArray(this).toSorted(comparer);\n  },\n  toSpliced(...args) {\n    return reactiveReadArray(this).toSpliced(...args);\n  },\n  unshift(...args) {\n    return noTracking(this, \"unshift\", args);\n  },\n  values() {\n    return iterator(this, \"values\", (item) => toWrapped(this, item));\n  }\n};\nfunction iterator(self2, method, wrapValue) {\n  const arr = shallowReadArray(self2);\n  const iter = arr[method]();\n  if (arr !== self2 && !isShallow(self2)) {\n    iter._next = iter.next;\n    iter.next = () => {\n      const result = iter._next();\n      if (!result.done) {\n        result.value = wrapValue(result.value);\n      }\n      return result;\n    };\n  }\n  return iter;\n}\nvar arrayProto = Array.prototype;\nfunction apply(self2, method, fn, thisArg, wrappedRetFn, args) {\n  const arr = shallowReadArray(self2);\n  const needsWrap = arr !== self2 && !isShallow(self2);\n  const methodFn = arr[method];\n  if (methodFn !== arrayProto[method]) {\n    const result2 = methodFn.apply(self2, args);\n    return needsWrap ? toReactive(result2) : result2;\n  }\n  let wrappedFn = fn;\n  if (arr !== self2) {\n    if (needsWrap) {\n      wrappedFn = function(item, index) {\n        return fn.call(this, toWrapped(self2, item), index, self2);\n      };\n    } else if (fn.length > 2) {\n      wrappedFn = function(item, index) {\n        return fn.call(this, item, index, self2);\n      };\n    }\n  }\n  const result = methodFn.call(arr, wrappedFn, thisArg);\n  return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;\n}\nfunction reduce(self2, method, fn, args) {\n  const arr = shallowReadArray(self2);\n  const needsWrap = arr !== self2 && !isShallow(self2);\n  let wrappedFn = fn;\n  let wrapInitialAccumulator = false;\n  if (arr !== self2) {\n    if (needsWrap) {\n      wrapInitialAccumulator = args.length === 0;\n      wrappedFn = function(acc, item, index) {\n        if (wrapInitialAccumulator) {\n          wrapInitialAccumulator = false;\n          acc = toWrapped(self2, acc);\n        }\n        return fn.call(this, acc, toWrapped(self2, item), index, self2);\n      };\n    } else if (fn.length > 3) {\n      wrappedFn = function(acc, item, index) {\n        return fn.call(this, acc, item, index, self2);\n      };\n    }\n  }\n  const result = arr[method](wrappedFn, ...args);\n  return wrapInitialAccumulator ? toWrapped(self2, result) : result;\n}\nfunction searchProxy(self2, method, args) {\n  const arr = toRaw(self2);\n  track(arr, \"iterate\", ARRAY_ITERATE_KEY);\n  const res = arr[method](...args);\n  if ((res === -1 || res === false) && isProxy(args[0])) {\n    args[0] = toRaw(args[0]);\n    return arr[method](...args);\n  }\n  return res;\n}\nfunction noTracking(self2, method, args = []) {\n  pauseTracking();\n  startBatch();\n  const res = toRaw(self2)[method].apply(self2, args);\n  endBatch();\n  resetTracking();\n  return res;\n}\nvar isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nvar builtInSymbols = new Set(\n  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nfunction hasOwnProperty2(key) {\n  if (!isSymbol(key))\n    key = String(key);\n  const obj = toRaw(this);\n  track(obj, \"has\", key);\n  return obj.hasOwnProperty(key);\n}\nvar BaseReactiveHandler = class {\n  constructor(_isReadonly = false, _isShallow = false) {\n    this._isReadonly = _isReadonly;\n    this._isShallow = _isShallow;\n  }\n  get(target, key, receiver) {\n    if (key === \"__v_skip\")\n      return target[\"__v_skip\"];\n    const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n    if (key === \"__v_isReactive\") {\n      return !isReadonly2;\n    } else if (key === \"__v_isReadonly\") {\n      return isReadonly2;\n    } else if (key === \"__v_isShallow\") {\n      return isShallow2;\n    } else if (key === \"__v_raw\") {\n      if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n      // this means the receiver is a user proxy of the reactive proxy\n      Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n        return target;\n      }\n      return;\n    }\n    const targetIsArray = isArray(target);\n    if (!isReadonly2) {\n      let fn;\n      if (targetIsArray && (fn = arrayInstrumentations[key])) {\n        return fn;\n      }\n      if (key === \"hasOwnProperty\") {\n        return hasOwnProperty2;\n      }\n    }\n    const res = Reflect.get(\n      target,\n      key,\n      // if this is a proxy wrapping a ref, return methods using the raw ref\n      // as receiver so that we don't have to call `toRaw` on the ref in all\n      // its class methods\n      isRef(target) ? target : receiver\n    );\n    if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n      return res;\n    }\n    if (!isReadonly2) {\n      track(target, \"get\", key);\n    }\n    if (isShallow2) {\n      return res;\n    }\n    if (isRef(res)) {\n      const value = targetIsArray && isIntegerKey(key) ? res : res.value;\n      return isReadonly2 && isObject(value) ? readonly(value) : value;\n    }\n    if (isObject(res)) {\n      return isReadonly2 ? readonly(res) : reactive2(res);\n    }\n    return res;\n  }\n};\nvar MutableReactiveHandler = class extends BaseReactiveHandler {\n  constructor(isShallow2 = false) {\n    super(false, isShallow2);\n  }\n  set(target, key, value, receiver) {\n    let oldValue = target[key];\n    const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);\n    if (!this._isShallow) {\n      const isOldValueReadonly = isReadonly(oldValue);\n      if (!isShallow(value) && !isReadonly(value)) {\n        oldValue = toRaw(oldValue);\n        value = toRaw(value);\n      }\n      if (!isArrayWithIntegerKey && isRef(oldValue) && !isRef(value)) {\n        if (isOldValueReadonly) {\n          if (true) {\n            warn2(\n              `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n              target[key]\n            );\n          }\n          return true;\n        } else {\n          oldValue.value = value;\n          return true;\n        }\n      }\n    }\n    const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);\n    const result = Reflect.set(\n      target,\n      key,\n      value,\n      isRef(target) ? target : receiver\n    );\n    if (target === toRaw(receiver) && result) {\n      if (!hadKey) {\n        trigger(target, \"add\", key, value);\n      } else if (hasChanged(value, oldValue)) {\n        trigger(target, \"set\", key, value, oldValue);\n      }\n    }\n    return result;\n  }\n  deleteProperty(target, key) {\n    const hadKey = hasOwn(target, key);\n    const oldValue = target[key];\n    const result = Reflect.deleteProperty(target, key);\n    if (result && hadKey) {\n      trigger(target, \"delete\", key, void 0, oldValue);\n    }\n    return result;\n  }\n  has(target, key) {\n    const result = Reflect.has(target, key);\n    if (!isSymbol(key) || !builtInSymbols.has(key)) {\n      track(target, \"has\", key);\n    }\n    return result;\n  }\n  ownKeys(target) {\n    track(\n      target,\n      \"iterate\",\n      isArray(target) ? \"length\" : ITERATE_KEY\n    );\n    return Reflect.ownKeys(target);\n  }\n};\nvar ReadonlyReactiveHandler = class extends BaseReactiveHandler {\n  constructor(isShallow2 = false) {\n    super(true, isShallow2);\n  }\n  set(target, key) {\n    if (true) {\n      warn2(\n        `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n        target\n      );\n    }\n    return true;\n  }\n  deleteProperty(target, key) {\n    if (true) {\n      warn2(\n        `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n        target\n      );\n    }\n    return true;\n  }\n};\nvar mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nvar readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nvar toShallow = (value) => value;\nvar getProto = (v) => Reflect.getPrototypeOf(v);\nfunction createIterableMethod(method, isReadonly2, isShallow2) {\n  return function(...args) {\n    const target = this[\"__v_raw\"];\n    const rawTarget = toRaw(target);\n    const targetIsMap = isMap(rawTarget);\n    const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n    const isKeyOnly = method === \"keys\" && targetIsMap;\n    const innerIterator = target[method](...args);\n    const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n    !isReadonly2 && track(\n      rawTarget,\n      \"iterate\",\n      isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n    );\n    return extend(\n      // inheriting all iterator properties\n      Object.create(innerIterator),\n      {\n        // iterator protocol\n        next() {\n          const { value, done } = innerIterator.next();\n          return done ? { value, done } : {\n            value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n            done\n          };\n        }\n      }\n    );\n  };\n}\nfunction createReadonlyMethod(type) {\n  return function(...args) {\n    if (true) {\n      const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n      warn2(\n        `${capitalize(type)} operation ${key}failed: target is readonly.`,\n        toRaw(this)\n      );\n    }\n    return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n  };\n}\nfunction createInstrumentations(readonly2, shallow) {\n  const instrumentations = {\n    get(key) {\n      const target = this[\"__v_raw\"];\n      const rawTarget = toRaw(target);\n      const rawKey = toRaw(key);\n      if (!readonly2) {\n        if (hasChanged(key, rawKey)) {\n          track(rawTarget, \"get\", key);\n        }\n        track(rawTarget, \"get\", rawKey);\n      }\n      const { has } = getProto(rawTarget);\n      const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;\n      if (has.call(rawTarget, key)) {\n        return wrap(target.get(key));\n      } else if (has.call(rawTarget, rawKey)) {\n        return wrap(target.get(rawKey));\n      } else if (target !== rawTarget) {\n        target.get(key);\n      }\n    },\n    get size() {\n      const target = this[\"__v_raw\"];\n      !readonly2 && track(toRaw(target), \"iterate\", ITERATE_KEY);\n      return target.size;\n    },\n    has(key) {\n      const target = this[\"__v_raw\"];\n      const rawTarget = toRaw(target);\n      const rawKey = toRaw(key);\n      if (!readonly2) {\n        if (hasChanged(key, rawKey)) {\n          track(rawTarget, \"has\", key);\n        }\n        track(rawTarget, \"has\", rawKey);\n      }\n      return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n    },\n    forEach(callback, thisArg) {\n      const observed = this;\n      const target = observed[\"__v_raw\"];\n      const rawTarget = toRaw(target);\n      const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;\n      !readonly2 && track(rawTarget, \"iterate\", ITERATE_KEY);\n      return target.forEach((value, key) => {\n        return callback.call(thisArg, wrap(value), wrap(key), observed);\n      });\n    }\n  };\n  extend(\n    instrumentations,\n    readonly2 ? {\n      add: createReadonlyMethod(\"add\"),\n      set: createReadonlyMethod(\"set\"),\n      delete: createReadonlyMethod(\"delete\"),\n      clear: createReadonlyMethod(\"clear\")\n    } : {\n      add(value) {\n        const target = toRaw(this);\n        const proto = getProto(target);\n        const rawValue = toRaw(value);\n        const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value;\n        const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);\n        if (!hadKey) {\n          target.add(valueToAdd);\n          trigger(target, \"add\", valueToAdd, valueToAdd);\n        }\n        return this;\n      },\n      set(key, value) {\n        if (!shallow && !isShallow(value) && !isReadonly(value)) {\n          value = toRaw(value);\n        }\n        const target = toRaw(this);\n        const { has, get: get2 } = getProto(target);\n        let hadKey = has.call(target, key);\n        if (!hadKey) {\n          key = toRaw(key);\n          hadKey = has.call(target, key);\n        } else if (true) {\n          checkIdentityKeys(target, has, key);\n        }\n        const oldValue = get2.call(target, key);\n        target.set(key, value);\n        if (!hadKey) {\n          trigger(target, \"add\", key, value);\n        } else if (hasChanged(value, oldValue)) {\n          trigger(target, \"set\", key, value, oldValue);\n        }\n        return this;\n      },\n      delete(key) {\n        const target = toRaw(this);\n        const { has, get: get2 } = getProto(target);\n        let hadKey = has.call(target, key);\n        if (!hadKey) {\n          key = toRaw(key);\n          hadKey = has.call(target, key);\n        } else if (true) {\n          checkIdentityKeys(target, has, key);\n        }\n        const oldValue = get2 ? get2.call(target, key) : void 0;\n        const result = target.delete(key);\n        if (hadKey) {\n          trigger(target, \"delete\", key, void 0, oldValue);\n        }\n        return result;\n      },\n      clear() {\n        const target = toRaw(this);\n        const hadItems = target.size !== 0;\n        const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n        const result = target.clear();\n        if (hadItems) {\n          trigger(\n            target,\n            \"clear\",\n            void 0,\n            void 0,\n            oldTarget\n          );\n        }\n        return result;\n      }\n    }\n  );\n  const iteratorMethods = [\n    \"keys\",\n    \"values\",\n    \"entries\",\n    Symbol.iterator\n  ];\n  iteratorMethods.forEach((method) => {\n    instrumentations[method] = createIterableMethod(method, readonly2, shallow);\n  });\n  return instrumentations;\n}\nfunction createInstrumentationGetter(isReadonly2, shallow) {\n  const instrumentations = createInstrumentations(isReadonly2, shallow);\n  return (target, key, receiver) => {\n    if (key === \"__v_isReactive\") {\n      return !isReadonly2;\n    } else if (key === \"__v_isReadonly\") {\n      return isReadonly2;\n    } else if (key === \"__v_raw\") {\n      return target;\n    }\n    return Reflect.get(\n      hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n      key,\n      receiver\n    );\n  };\n}\nvar mutableCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nvar readonlyCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nfunction checkIdentityKeys(target, has, key) {\n  const rawKey = toRaw(key);\n  if (rawKey !== key && has.call(target, rawKey)) {\n    const type = toRawType(target);\n    warn2(\n      `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n    );\n  }\n}\nvar reactiveMap = /* @__PURE__ */ new WeakMap();\nvar shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nvar readonlyMap = /* @__PURE__ */ new WeakMap();\nvar shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n  switch (rawType) {\n    case \"Object\":\n    case \"Array\":\n      return 1;\n    case \"Map\":\n    case \"Set\":\n    case \"WeakMap\":\n    case \"WeakSet\":\n      return 2;\n    default:\n      return 0;\n  }\n}\nfunction reactive2(target) {\n  if (/* @__PURE__ */ isReadonly(target)) {\n    return target;\n  }\n  return createReactiveObject(\n    target,\n    false,\n    mutableHandlers,\n    mutableCollectionHandlers,\n    reactiveMap\n  );\n}\nfunction readonly(target) {\n  return createReactiveObject(\n    target,\n    true,\n    readonlyHandlers,\n    readonlyCollectionHandlers,\n    readonlyMap\n  );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n  if (!isObject(target)) {\n    if (true) {\n      warn2(\n        `value cannot be made ${isReadonly2 ? \"readonly\" : \"reactive\"}: ${String(\n          target\n        )}`\n      );\n    }\n    return target;\n  }\n  if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n    return target;\n  }\n  if (target[\"__v_skip\"] || !Object.isExtensible(target)) {\n    return target;\n  }\n  const existingProxy = proxyMap.get(target);\n  if (existingProxy) {\n    return existingProxy;\n  }\n  const targetType = targetTypeMap(toRawType(target));\n  if (targetType === 0) {\n    return target;\n  }\n  const proxy = new Proxy(\n    target,\n    targetType === 2 ? collectionHandlers : baseHandlers\n  );\n  proxyMap.set(target, proxy);\n  return proxy;\n}\nfunction isReactive2(value) {\n  if (/* @__PURE__ */ isReadonly(value)) {\n    return /* @__PURE__ */ isReactive2(value[\"__v_raw\"]);\n  }\n  return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n  return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n  return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n  return value ? !!value[\"__v_raw\"] : false;\n}\nfunction toRaw(observed) {\n  const raw2 = observed && observed[\"__v_raw\"];\n  return raw2 ? /* @__PURE__ */ toRaw(raw2) : observed;\n}\nvar toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive2(value) : value;\nvar toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;\nfunction isRef(r) {\n  return r ? r[\"__v_isRef\"] === true : false;\n}\n\n// packages/alpinejs/src/magics/$nextTick.js\nmagic(\"nextTick\", () => nextTick);\n\n// packages/alpinejs/src/magics/$dispatch.js\nmagic(\"dispatch\", (el) => dispatch.bind(dispatch, el));\n\n// packages/alpinejs/src/magics/$watch.js\nmagic(\"watch\", (el, { evaluateLater: evaluateLater2, cleanup }) => (key, callback) => {\n  let evaluate2 = evaluateLater2(key);\n  let getter = () => {\n    let value;\n    evaluate2((i) => value = i);\n    return value;\n  };\n  let unwatch = watch(getter, callback);\n  cleanup(unwatch);\n});\n\n// packages/alpinejs/src/magics/$store.js\nmagic(\"store\", getStores);\n\n// packages/alpinejs/src/magics/$data.js\nmagic(\"data\", (el) => scope(el));\n\n// packages/alpinejs/src/magics/$root.js\nmagic(\"root\", (el) => closestRoot(el));\n\n// packages/alpinejs/src/magics/$refs.js\nmagic(\"refs\", (el) => {\n  if (el._x_refs_proxy)\n    return el._x_refs_proxy;\n  el._x_refs_proxy = mergeProxies(getArrayOfRefObject(el));\n  return el._x_refs_proxy;\n});\nfunction getArrayOfRefObject(el) {\n  let refObjects = [];\n  findClosest(el, (i) => {\n    if (i._x_refs)\n      refObjects.push(i._x_refs);\n  });\n  return refObjects;\n}\n\n// packages/alpinejs/src/ids.js\nvar globalIdMemo = {};\nfunction findAndIncrementId(name) {\n  if (!globalIdMemo[name])\n    globalIdMemo[name] = 0;\n  return ++globalIdMemo[name];\n}\nfunction closestIdRoot(el, name) {\n  return findClosest(el, (element) => {\n    if (element._x_ids && element._x_ids[name])\n      return true;\n  });\n}\nfunction setIdRoot(el, name) {\n  if (!el._x_ids)\n    el._x_ids = {};\n  if (!el._x_ids[name])\n    el._x_ids[name] = findAndIncrementId(name);\n}\n\n// packages/alpinejs/src/magics/$id.js\nmagic(\"id\", (el, { cleanup }) => (name, key = null) => {\n  let cacheKey = `${name}${key ? `-${key}` : \"\"}`;\n  return cacheIdByNameOnElement(el, cacheKey, cleanup, () => {\n    let root = closestIdRoot(el, name);\n    let id = root ? root._x_ids[name] : findAndIncrementId(name);\n    return key ? `${name}-${id}-${key}` : `${name}-${id}`;\n  });\n});\ninterceptClone((from, to) => {\n  if (from._x_id) {\n    to._x_id = from._x_id;\n  }\n});\nfunction cacheIdByNameOnElement(el, cacheKey, cleanup, callback) {\n  if (!el._x_id)\n    el._x_id = {};\n  if (el._x_id[cacheKey])\n    return el._x_id[cacheKey];\n  let output = callback();\n  el._x_id[cacheKey] = output;\n  cleanup(() => {\n    delete el._x_id[cacheKey];\n  });\n  return output;\n}\n\n// packages/alpinejs/src/magics/$el.js\nmagic(\"el\", (el) => el);\n\n// packages/alpinejs/src/magics/index.js\nwarnMissingPluginMagic(\"Focus\", \"focus\", \"focus\");\nwarnMissingPluginMagic(\"Persist\", \"persist\", \"persist\");\nfunction warnMissingPluginMagic(name, magicName, slug) {\n  magic(magicName, (el) => warn(`You can't use [$${magicName}] without first installing the \"${name}\" plugin here: https://alpinejs.dev/plugins/${slug}`, el));\n}\n\n// packages/alpinejs/src/directives/x-modelable.js\ndirective(\"modelable\", (el, { expression }, { effect: effect3, evaluateLater: evaluateLater2, cleanup }) => {\n  let func = evaluateLater2(expression);\n  let innerGet = () => {\n    let result;\n    func((i) => result = i);\n    return result;\n  };\n  let evaluateInnerSet = evaluateLater2(`${expression} = __placeholder`);\n  let innerSet = (val) => evaluateInnerSet(() => {\n  }, { scope: { \"__placeholder\": val } });\n  let initialValue = innerGet();\n  innerSet(initialValue);\n  queueMicrotask(() => {\n    if (!el._x_model)\n      return;\n    el._x_removeModelListeners[\"default\"]();\n    let outerGet = el._x_model.get;\n    let outerSet = el._x_model.setWithModifiers;\n    let releaseEntanglement = entangle(\n      {\n        get() {\n          return outerGet();\n        },\n        set(value) {\n          outerSet(value);\n        }\n      },\n      {\n        get() {\n          return innerGet();\n        },\n        set(value) {\n          innerSet(value);\n        }\n      }\n    );\n    cleanup(releaseEntanglement);\n  });\n});\n\n// packages/alpinejs/src/directives/x-teleport.js\ndirective(\"teleport\", (el, { modifiers, expression }, { cleanup }) => {\n  if (el.tagName.toLowerCase() !== \"template\")\n    warn(\"x-teleport can only be used on a <template> tag\", el);\n  let target = getTarget(expression);\n  let clone2 = el.content.cloneNode(true).firstElementChild;\n  el._x_teleport = clone2;\n  clone2._x_teleportBack = el;\n  el.setAttribute(\"data-teleport-template\", true);\n  clone2.setAttribute(\"data-teleport-target\", true);\n  if (el._x_forwardEvents) {\n    el._x_forwardEvents.forEach((eventName) => {\n      clone2.addEventListener(eventName, (e) => {\n        e.stopPropagation();\n        el.dispatchEvent(new e.constructor(e.type, e));\n      });\n    });\n  }\n  addScopeToNode(clone2, {}, el);\n  let placeInDom = (clone3, target2, modifiers2) => {\n    if (modifiers2.includes(\"prepend\")) {\n      target2.parentNode.insertBefore(clone3, target2);\n    } else if (modifiers2.includes(\"append\")) {\n      target2.parentNode.insertBefore(clone3, target2.nextSibling);\n    } else {\n      target2.appendChild(clone3);\n    }\n  };\n  mutateDom(() => {\n    skipDuringClone(() => {\n      placeInDom(clone2, target, modifiers);\n      initTree(clone2);\n    })();\n  });\n  el._x_teleportPutBack = () => {\n    let target2 = getTarget(expression);\n    mutateDom(() => {\n      placeInDom(el._x_teleport, target2, modifiers);\n    });\n  };\n  cleanup(\n    () => mutateDom(() => {\n      clone2.remove();\n      destroyTree(clone2);\n    })\n  );\n});\nvar teleportContainerDuringClone = document.createElement(\"div\");\nfunction getTarget(expression) {\n  let target = skipDuringClone(() => {\n    return document.querySelector(expression);\n  }, () => {\n    return teleportContainerDuringClone;\n  })();\n  if (!target)\n    warn(`Cannot find x-teleport element for selector: \"${expression}\"`);\n  return target;\n}\n\n// packages/alpinejs/src/directives/x-ignore.js\nvar handler = () => {\n};\nhandler.inline = (el, { modifiers }, { cleanup }) => {\n  modifiers.includes(\"self\") ? el._x_ignoreSelf = true : el._x_ignore = true;\n  cleanup(() => {\n    modifiers.includes(\"self\") ? delete el._x_ignoreSelf : delete el._x_ignore;\n  });\n};\ndirective(\"ignore\", handler);\n\n// packages/alpinejs/src/directives/x-effect.js\ndirective(\"effect\", skipDuringClone((el, { expression }, { effect: effect3 }) => {\n  effect3(evaluateLater(el, expression));\n}));\n\n// packages/alpinejs/src/utils/on.js\nfunction on(el, event, modifiers, callback) {\n  let listenerTarget = el;\n  let handler4 = (e) => callback(e);\n  let options = {};\n  let wrapHandler = (callback2, wrapper) => (e) => wrapper(callback2, e);\n  if (modifiers.includes(\"dot\"))\n    event = dotSyntax(event);\n  if (modifiers.includes(\"camel\"))\n    event = camelCase2(event);\n  if (modifiers.includes(\"capture\"))\n    options.capture = true;\n  if (modifiers.includes(\"window\"))\n    listenerTarget = window;\n  if (modifiers.includes(\"document\"))\n    listenerTarget = document;\n  if (modifiers.includes(\"passive\")) {\n    options.passive = modifiers[modifiers.indexOf(\"passive\") + 1] !== \"false\";\n  }\n  handler4 = addDebounceOrThrottle(modifiers, handler4);\n  if (modifiers.includes(\"prevent\"))\n    handler4 = wrapHandler(handler4, (next, e) => {\n      e.preventDefault();\n      next(e);\n    });\n  if (modifiers.includes(\"stop\"))\n    handler4 = wrapHandler(handler4, (next, e) => {\n      e.stopPropagation();\n      next(e);\n    });\n  if (modifiers.includes(\"once\")) {\n    handler4 = wrapHandler(handler4, (next, e) => {\n      next(e);\n      listenerTarget.removeEventListener(event, handler4, options);\n    });\n  }\n  if (modifiers.includes(\"away\") || modifiers.includes(\"outside\")) {\n    listenerTarget = document;\n    handler4 = wrapHandler(handler4, (next, e) => {\n      if (el.contains(e.target))\n        return;\n      if (e.target.isConnected === false)\n        return;\n      if (el.offsetWidth < 1 && el.offsetHeight < 1)\n        return;\n      if (el._x_isShown === false)\n        return;\n      next(e);\n    });\n  }\n  if (modifiers.includes(\"self\"))\n    handler4 = wrapHandler(handler4, (next, e) => {\n      e.target === el && next(e);\n    });\n  if (event === \"submit\") {\n    handler4 = wrapHandler(handler4, (next, e) => {\n      if (e.target._x_pendingModelUpdates) {\n        e.target._x_pendingModelUpdates.forEach((fn) => fn());\n      }\n      next(e);\n    });\n  }\n  if (isKeyEvent(event) || isClickEvent(event)) {\n    handler4 = wrapHandler(handler4, (next, e) => {\n      if (isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers)) {\n        return;\n      }\n      next(e);\n    });\n  }\n  listenerTarget.addEventListener(event, handler4, options);\n  return () => {\n    listenerTarget.removeEventListener(event, handler4, options);\n  };\n}\nfunction addDebounceOrThrottle(modifiers, handler4) {\n  if (modifiers.includes(\"debounce\")) {\n    let nextModifier = modifiers[modifiers.indexOf(\"debounce\") + 1] || \"invalid-wait\";\n    let wait = isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n    handler4 = debounce(handler4, wait);\n  }\n  if (modifiers.includes(\"throttle\")) {\n    let nextModifier = modifiers[modifiers.indexOf(\"throttle\") + 1] || \"invalid-wait\";\n    let wait = isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n    handler4 = throttle(handler4, wait);\n  }\n  return handler4;\n}\nfunction dotSyntax(subject) {\n  return subject.replace(/-/g, \".\");\n}\nfunction camelCase2(subject) {\n  return subject.toLowerCase().replace(/-(\\w)/g, (match, char) => char.toUpperCase());\n}\nfunction isNumeric(subject) {\n  return !Array.isArray(subject) && !isNaN(subject);\n}\nfunction kebabCase2(subject) {\n  if ([\" \", \"_\"].includes(\n    subject\n  ))\n    return subject;\n  return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[_\\s]/, \"-\").toLowerCase();\n}\nfunction isKeyEvent(event) {\n  return [\"keydown\", \"keyup\"].includes(event);\n}\nfunction isClickEvent(event) {\n  return [\"contextmenu\", \"click\", \"mouse\"].some((i) => event.includes(i));\n}\nvar nonKeyModifiers = [\n  // x-on's own modifiers:\n  \"window\",\n  \"document\",\n  \"prevent\",\n  \"stop\",\n  \"once\",\n  \"capture\",\n  \"self\",\n  \"away\",\n  \"outside\",\n  \"passive\",\n  \"dot\",\n  \"camel\",\n  \"preserve-scroll\",\n  // x-model's own modifiers:\n  \"blur\",\n  \"change\",\n  \"lazy\",\n  \"number\",\n  \"boolean\",\n  \"trim\",\n  \"fill\",\n  \"unintrusive\",\n  \"parent\"\n];\nfunction isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers) {\n  let keyModifiers = modifiers.filter((modifier, index) => {\n    if (modifier === \"false\" && modifiers[index - 1] === \"passive\")\n      return false;\n    return !nonKeyModifiers.includes(modifier);\n  });\n  if (keyModifiers.includes(\"debounce\")) {\n    let debounceIndex = keyModifiers.indexOf(\"debounce\");\n    keyModifiers.splice(debounceIndex, isNumeric((keyModifiers[debounceIndex + 1] || \"invalid-wait\").split(\"ms\")[0]) ? 2 : 1);\n  }\n  if (keyModifiers.includes(\"throttle\")) {\n    let debounceIndex = keyModifiers.indexOf(\"throttle\");\n    keyModifiers.splice(debounceIndex, isNumeric((keyModifiers[debounceIndex + 1] || \"invalid-wait\").split(\"ms\")[0]) ? 2 : 1);\n  }\n  if (keyModifiers.length === 0)\n    return false;\n  if (keyModifiers.length === 1 && keyToModifiers(e.key).includes(keyModifiers[0]))\n    return false;\n  const systemKeyModifiers = [\"ctrl\", \"shift\", \"alt\", \"meta\", \"cmd\", \"super\"];\n  const selectedSystemKeyModifiers = systemKeyModifiers.filter((modifier) => keyModifiers.includes(modifier));\n  keyModifiers = keyModifiers.filter((i) => !selectedSystemKeyModifiers.includes(i));\n  if (selectedSystemKeyModifiers.length > 0) {\n    const activelyPressedKeyModifiers = selectedSystemKeyModifiers.filter((modifier) => {\n      if (modifier === \"cmd\" || modifier === \"super\")\n        modifier = \"meta\";\n      return e[`${modifier}Key`];\n    });\n    if (activelyPressedKeyModifiers.length === selectedSystemKeyModifiers.length) {\n      if (isClickEvent(e.type))\n        return false;\n      if (keyToModifiers(e.key).includes(keyModifiers[0]))\n        return false;\n    }\n  }\n  return true;\n}\nfunction keyToModifiers(key) {\n  if (!key)\n    return [];\n  key = kebabCase2(key);\n  let modifierToKeyMap = {\n    \"ctrl\": \"control\",\n    \"slash\": \"/\",\n    \"space\": \" \",\n    \"spacebar\": \" \",\n    \"cmd\": \"meta\",\n    \"esc\": \"escape\",\n    \"up\": \"arrow-up\",\n    \"down\": \"arrow-down\",\n    \"left\": \"arrow-left\",\n    \"right\": \"arrow-right\",\n    \"period\": \".\",\n    \"comma\": \",\",\n    \"equal\": \"=\",\n    \"minus\": \"-\",\n    \"underscore\": \"_\"\n  };\n  modifierToKeyMap[key] = key;\n  return Object.keys(modifierToKeyMap).map((modifier) => {\n    if (modifierToKeyMap[modifier] === key)\n      return modifier;\n  }).filter((modifier) => modifier);\n}\n\n// packages/alpinejs/src/directives/x-model.js\ndirective(\"model\", (el, { modifiers, expression }, { effect: effect3, cleanup }) => {\n  let scopeTarget = el;\n  if (modifiers.includes(\"parent\")) {\n    scopeTarget = findClosest(el, (element) => element !== el);\n  }\n  let evaluateGet = evaluateLater(scopeTarget, expression);\n  let evaluateSet;\n  if (typeof expression === \"string\") {\n    evaluateSet = evaluateLater(scopeTarget, `${expression} = __placeholder`);\n  } else if (typeof expression === \"function\" && typeof expression() === \"string\") {\n    evaluateSet = evaluateLater(scopeTarget, `${expression()} = __placeholder`);\n  } else {\n    evaluateSet = () => {\n    };\n  }\n  let getValue = () => {\n    let result;\n    evaluateGet((value) => result = value);\n    return isGetterSetter(result) ? result.get() : result;\n  };\n  let setValue = (value) => {\n    let result;\n    evaluateGet((value2) => result = value2);\n    if (isGetterSetter(result)) {\n      result.set(value);\n    } else {\n      evaluateSet(() => {\n      }, {\n        scope: { \"__placeholder\": value }\n      });\n    }\n  };\n  if (typeof expression === \"string\" && el.type === \"radio\") {\n    mutateDom(() => {\n      if (!el.hasAttribute(\"name\"))\n        el.setAttribute(\"name\", expression);\n    });\n  }\n  let hasChangeModifier = modifiers.includes(\"change\") || modifiers.includes(\"lazy\");\n  let hasBlurModifier = modifiers.includes(\"blur\");\n  let hasEnterModifier = modifiers.includes(\"enter\");\n  let hasExplicitEventModifiers = hasChangeModifier || hasBlurModifier || hasEnterModifier;\n  let removeListener;\n  if (isCloning) {\n    removeListener = () => {\n    };\n  } else if (hasExplicitEventModifiers) {\n    let listeners = [];\n    let syncValue = (e) => setValue(getInputValue(el, modifiers, e, getValue()));\n    if (hasChangeModifier) {\n      listeners.push(on(el, \"change\", modifiers, syncValue));\n    }\n    if (hasBlurModifier) {\n      listeners.push(on(el, \"blur\", modifiers, syncValue));\n      if (el.form) {\n        let form = el.form;\n        let syncCallback = () => syncValue({ target: el });\n        if (!form._x_pendingModelUpdates)\n          form._x_pendingModelUpdates = [];\n        form._x_pendingModelUpdates.push(syncCallback);\n        cleanup(() => {\n          if (form._x_pendingModelUpdates) {\n            form._x_pendingModelUpdates.splice(form._x_pendingModelUpdates.indexOf(syncCallback), 1);\n          }\n        });\n      }\n    }\n    if (hasEnterModifier) {\n      listeners.push(on(el, \"keydown\", modifiers, (e) => {\n        if (e.key === \"Enter\")\n          syncValue(e);\n      }));\n    }\n    removeListener = () => listeners.forEach((remove2) => remove2());\n  } else {\n    let event = el.tagName.toLowerCase() === \"select\" || [\"checkbox\", \"radio\"].includes(el.type) ? \"change\" : \"input\";\n    removeListener = on(el, event, modifiers, (e) => {\n      setValue(getInputValue(el, modifiers, e, getValue()));\n    });\n  }\n  if (modifiers.includes(\"fill\")) {\n    if ([void 0, null, \"\"].includes(getValue()) || isCheckbox(el) && Array.isArray(getValue()) || el.tagName.toLowerCase() === \"select\" && el.multiple) {\n      setValue(\n        getInputValue(el, modifiers, { target: el }, getValue())\n      );\n    }\n  }\n  if (!el._x_removeModelListeners)\n    el._x_removeModelListeners = {};\n  el._x_removeModelListeners[\"default\"] = removeListener;\n  cleanup(() => el._x_removeModelListeners[\"default\"]());\n  if (el.form) {\n    let removeResetListener = on(el.form, \"reset\", [], (e) => {\n      nextTick(() => el._x_model && el._x_model.set(getInputValue(el, modifiers, { target: el }, getValue())));\n    });\n    cleanup(() => removeResetListener());\n  }\n  el._x_model = {\n    get() {\n      return getValue();\n    },\n    set(value) {\n      setValue(value);\n    },\n    setWithModifiers: addDebounceOrThrottle(modifiers, setValue)\n  };\n  el._x_forceModelUpdate = (value) => {\n    if (value === void 0 && typeof expression === \"string\" && expression.match(/\\./))\n      value = \"\";\n    mutateDom(() => {\n      if (isCheckbox(el)) {\n        if (Array.isArray(value)) {\n          el.checked = value.some((val) => val == el.value);\n        } else {\n          el.checked = !!value;\n        }\n      } else if (isRadio(el)) {\n        if (typeof value === \"boolean\") {\n          el.checked = safeParseBoolean(el.value) === value;\n        } else {\n          el.checked = el.value == value;\n        }\n      } else {\n        bind(el, \"value\", value);\n      }\n    });\n  };\n  if (el.tagName === \"SELECT\") {\n    let observer2 = new MutationObserver(() => {\n      el._x_forceModelUpdate(getValue());\n    });\n    observer2.observe(el, { childList: true });\n    cleanup(() => observer2.disconnect());\n  }\n  effect3(() => {\n    let value = getValue();\n    if (modifiers.includes(\"unintrusive\") && document.activeElement.isSameNode(el))\n      return;\n    el._x_forceModelUpdate(value);\n  });\n});\nfunction getInputValue(el, modifiers, event, currentValue) {\n  return mutateDom(() => {\n    if (event instanceof CustomEvent && event.detail !== void 0)\n      return event.detail !== null && event.detail !== void 0 ? event.detail : event.target.value;\n    else if (isCheckbox(el)) {\n      if (Array.isArray(currentValue)) {\n        let newValue = null;\n        if (modifiers.includes(\"number\")) {\n          newValue = safeParseNumber(event.target.value);\n        } else if (modifiers.includes(\"boolean\")) {\n          newValue = safeParseBoolean(event.target.value);\n        } else {\n          newValue = event.target.value;\n        }\n        return event.target.checked ? currentValue.includes(newValue) ? currentValue : currentValue.concat([newValue]) : currentValue.filter((el2) => !checkedAttrLooseCompare2(el2, newValue));\n      } else {\n        return event.target.checked;\n      }\n    } else if (el.tagName.toLowerCase() === \"select\" && el.multiple) {\n      if (modifiers.includes(\"number\")) {\n        return Array.from(event.target.selectedOptions).map((option) => {\n          let rawValue = option.value || option.text;\n          return safeParseNumber(rawValue);\n        });\n      } else if (modifiers.includes(\"boolean\")) {\n        return Array.from(event.target.selectedOptions).map((option) => {\n          let rawValue = option.value || option.text;\n          return safeParseBoolean(rawValue);\n        });\n      }\n      return Array.from(event.target.selectedOptions).map((option) => {\n        return option.value || option.text;\n      });\n    } else {\n      let newValue;\n      if (isRadio(el)) {\n        if (event.target.checked) {\n          newValue = event.target.value;\n        } else {\n          newValue = currentValue;\n        }\n      } else {\n        newValue = event.target.value;\n      }\n      if (modifiers.includes(\"number\")) {\n        return safeParseNumber(newValue);\n      } else if (modifiers.includes(\"boolean\")) {\n        return safeParseBoolean(newValue);\n      } else if (modifiers.includes(\"trim\")) {\n        return newValue.trim();\n      } else {\n        return newValue;\n      }\n    }\n  });\n}\nfunction safeParseNumber(rawValue) {\n  let number = rawValue ? parseFloat(rawValue) : null;\n  return isNumeric2(number) ? number : rawValue;\n}\nfunction checkedAttrLooseCompare2(valueA, valueB) {\n  return valueA == valueB;\n}\nfunction isNumeric2(subject) {\n  return !Array.isArray(subject) && !isNaN(subject);\n}\nfunction isGetterSetter(value) {\n  return value !== null && typeof value === \"object\" && typeof value.get === \"function\" && typeof value.set === \"function\";\n}\n\n// packages/alpinejs/src/directives/x-cloak.js\ndirective(\"cloak\", (el) => {\n  if (isCloning)\n    return el.removeAttribute(prefix(\"cloak\"));\n  queueMicrotask(() => mutateDom(() => el.removeAttribute(prefix(\"cloak\"))));\n});\n\n// packages/alpinejs/src/directives/x-init.js\naddInitSelector(() => `[${prefix(\"init\")}]`);\ndirective(\"init\", skipDuringClone((el, { expression }, { evaluate: evaluate2 }) => {\n  if (typeof expression === \"string\") {\n    return !!expression.trim() && evaluate2(expression, {}, false);\n  }\n  return evaluate2(expression, {}, false);\n}));\n\n// packages/alpinejs/src/directives/x-text.js\ndirective(\"text\", (el, { expression }, { effect: effect3, evaluateLater: evaluateLater2 }) => {\n  let evaluate2 = evaluateLater2(expression);\n  effect3(() => {\n    evaluate2((value) => {\n      mutateDom(() => {\n        el.textContent = value;\n      });\n    });\n  });\n});\n\n// packages/alpinejs/src/directives/x-html.js\ndirective(\"html\", (el, { expression }, { effect: effect3, evaluateLater: evaluateLater2 }) => {\n  let evaluate2 = evaluateLater2(expression);\n  effect3(() => {\n    evaluate2((value) => {\n      mutateDom(() => {\n        Array.from(el.children).forEach((child) => destroyTree(child));\n        el.innerHTML = value ?? \"\";\n        el._x_ignoreSelf = true;\n        initTree(el);\n        delete el._x_ignoreSelf;\n      });\n    });\n  }, { priority: \"structural\" });\n});\n\n// packages/alpinejs/src/directives/x-bind.js\nmapAttributes(startingWith(\":\", into(prefix(\"bind:\"))));\nvar handler2 = (el, { value, modifiers, expression, original }, { effect: effect3, cleanup }) => {\n  if (!value) {\n    let bindingProviders = {};\n    injectBindingProviders(bindingProviders);\n    let getBindings = evaluateLater(el, expression);\n    getBindings((bindings) => {\n      applyBindingsObject(el, bindings, original);\n    }, { scope: bindingProviders });\n    return;\n  }\n  if (value === \"key\")\n    return storeKeyForXFor(el, expression);\n  if (el._x_inlineBindings && el._x_inlineBindings[value] && el._x_inlineBindings[value].extract) {\n    return;\n  }\n  let evaluate2 = evaluateLater(el, expression);\n  effect3(() => evaluate2((result) => {\n    if (result === void 0 && typeof expression === \"string\" && expression.match(/\\./)) {\n      result = \"\";\n    }\n    mutateDom(() => bind(el, value, result, modifiers));\n  }));\n  cleanup(() => {\n    el._x_undoAddedClasses && el._x_undoAddedClasses();\n    el._x_undoAddedStyles && el._x_undoAddedStyles();\n  });\n};\nhandler2.inline = (el, { value, modifiers, expression }) => {\n  if (!value)\n    return;\n  if (!el._x_inlineBindings)\n    el._x_inlineBindings = {};\n  el._x_inlineBindings[value] = { expression, extract: false };\n};\ndirective(\"bind\", handler2);\nfunction storeKeyForXFor(el, expression) {\n  el._x_keyExpression = expression;\n}\n\n// packages/alpinejs/src/directives/x-data.js\naddRootSelector(() => `[${prefix(\"data\")}]`);\nvar dataForReconciliation = Symbol();\ndirective(\"data\", (el, { expression }, { cleanup }) => {\n  if (shouldSkipRegisteringDataDuringClone(el))\n    return;\n  let dataToReconcile = el[dataForReconciliation];\n  if (dataToReconcile?.expression === expression)\n    return;\n  expression = expression === \"\" ? \"{}\" : expression;\n  let magicContext = {};\n  injectMagics(magicContext, el);\n  let dataProviderContext = {};\n  injectDataProviders(dataProviderContext, magicContext);\n  let data2 = evaluate(el, expression, { scope: dataProviderContext });\n  if (data2 === void 0 || data2 === true)\n    data2 = {};\n  injectMagics(data2, el);\n  let reactiveData;\n  if (dataToReconcile?.reactiveData) {\n    reactiveData = dataToReconcile.reactiveData;\n    reconcileData(reactiveData, data2);\n    let initialized = { expression };\n    el[dataForReconciliation] = initialized;\n    queueMicrotask(() => {\n      if (el[dataForReconciliation] === initialized) {\n        delete el[dataForReconciliation];\n      }\n    });\n  } else {\n    reactiveData = reactive(data2);\n  }\n  initInterceptors(reactiveData, cleanup);\n  let undo = addScopeToNode(el, reactiveData);\n  skipDuringClone(() => {\n    reactiveData[\"init\"] && evaluate(el, reactiveData[\"init\"]);\n  })();\n  cleanup(() => {\n    reactiveData[\"destroy\"] && evaluate(el, reactiveData[\"destroy\"]);\n    undo();\n    let removed = { reactiveData };\n    el[dataForReconciliation] = removed;\n    queueMicrotask(() => {\n      if (el[dataForReconciliation] === removed) {\n        delete el[dataForReconciliation];\n      }\n    });\n  });\n});\nfunction reconcileData(target, source) {\n  Object.keys(source).forEach((key) => {\n    let descriptor = Object.getOwnPropertyDescriptor(source, key);\n    let existingDescriptor = Object.getOwnPropertyDescriptor(target, key);\n    if (descriptor.get || descriptor.set || existingDescriptor?.get || existingDescriptor?.set) {\n      if (existingDescriptor)\n        delete target[key];\n      if (!existingDescriptor)\n        target[key] = void 0;\n      descriptor.get || descriptor.set ? Object.defineProperty(target, key, descriptor) : target[key] = source[key];\n    } else {\n      target[key] = source[key];\n    }\n  });\n  Object.keys(target).filter((key) => !Object.prototype.hasOwnProperty.call(source, key)).forEach((key) => delete target[key]);\n}\ninterceptClone((from, to) => {\n  if (from._x_dataStack) {\n    to._x_dataStack = from._x_dataStack;\n    to.setAttribute(\"data-has-alpine-state\", true);\n  }\n});\nfunction shouldSkipRegisteringDataDuringClone(el) {\n  if (!isCloning)\n    return false;\n  if (isCloningLegacy)\n    return true;\n  return el.hasAttribute(\"data-has-alpine-state\");\n}\n\n// packages/alpinejs/src/directives/x-show.js\ndirective(\"show\", (el, { modifiers, expression }, { effect: effect3 }) => {\n  let evaluate2 = evaluateLater(el, expression);\n  if (!el._x_doHide)\n    el._x_doHide = () => {\n      mutateDom(() => {\n        el.style.setProperty(\"display\", \"none\", modifiers.includes(\"important\") ? \"important\" : void 0);\n      });\n    };\n  if (!el._x_doShow)\n    el._x_doShow = () => {\n      mutateDom(() => {\n        if (el.style.length === 1 && el.style.display === \"none\") {\n          el.removeAttribute(\"style\");\n        } else {\n          el.style.removeProperty(\"display\");\n        }\n      });\n    };\n  let hide = () => {\n    el._x_doHide();\n    el._x_isShown = false;\n  };\n  let show = () => {\n    el._x_doShow();\n    el._x_isShown = true;\n  };\n  let clickAwayCompatibleShow = () => setTimeout(show);\n  let toggle = once(\n    (value) => value ? show() : hide(),\n    (value) => {\n      if (typeof el._x_toggleAndCascadeWithTransitions === \"function\") {\n        el._x_toggleAndCascadeWithTransitions(el, value, show, hide);\n      } else {\n        value ? clickAwayCompatibleShow() : hide();\n      }\n    }\n  );\n  let oldValue;\n  let firstTime = true;\n  effect3(() => evaluate2((value) => {\n    if (!firstTime && value === oldValue)\n      return;\n    if (modifiers.includes(\"immediate\"))\n      value ? clickAwayCompatibleShow() : hide();\n    toggle(value);\n    oldValue = value;\n    firstTime = false;\n  }));\n});\n\n// packages/alpinejs/src/directives/x-for.js\ndirective(\"for\", skipDuringClone((el, { expression }, { effect: effect3, cleanup }) => {\n  let iteratorNames = parseForExpression(expression);\n  let evaluateItems = evaluateLater(el, iteratorNames.items);\n  let evaluateKey = evaluateLater(\n    el,\n    // the x-bind:key expression is stored for our use instead of evaluated.\n    el._x_keyExpression || \"index\"\n  );\n  el._x_lookup = /* @__PURE__ */ new Map();\n  effect3(() => loop(el, iteratorNames, evaluateItems, evaluateKey), { priority: \"structural\" });\n  cleanup(() => {\n    el._x_lookup.forEach(\n      (el2) => mutateDom(() => {\n        destroyTree(el2);\n        el2.remove();\n      })\n    );\n    delete el._x_lookup;\n    delete el._x_lastRenderedEl;\n  });\n}));\nfunction refreshScope(scope2) {\n  return (newScope) => {\n    Object.entries(newScope).forEach(([key, value]) => {\n      scope2[key] = value;\n    });\n  };\n}\nfunction loop(templateEl, iteratorNames, evaluateItems, evaluateKey) {\n  evaluateItems((items) => {\n    if (isNumeric3(items))\n      items = Array.from({ length: items }, (_, i) => i + 1);\n    if (items === void 0 || items === null)\n      items = [];\n    if (items instanceof Set)\n      items = Array.from(items);\n    if (items instanceof Map)\n      items = Array.from(items);\n    let oldLookup = templateEl._x_lookup;\n    let lookup = /* @__PURE__ */ new Map();\n    templateEl._x_lookup = lookup;\n    let hasStringKeys = isObject2(items);\n    let scopeEntries = Object.entries(items).map(([index, item]) => {\n      if (!hasStringKeys)\n        index = parseInt(index);\n      let scope2 = getIterationScopeVariables(iteratorNames, item, index, items);\n      let key;\n      evaluateKey((innerKey) => {\n        if (typeof innerKey === \"object\")\n          warn(\"x-for key cannot be an object, it must be a string or an integer\", templateEl);\n        if (oldLookup.has(innerKey)) {\n          lookup.set(innerKey, oldLookup.get(innerKey));\n          oldLookup.delete(innerKey);\n        }\n        key = innerKey;\n      }, { scope: { index, ...scope2 } });\n      return [key, scope2];\n    });\n    mutateDom(() => {\n      oldLookup.forEach((el) => {\n        destroyTree(el);\n        el.remove();\n      });\n      let added = /* @__PURE__ */ new Set();\n      let prev = templateEl;\n      scopeEntries.forEach(([key, scope2]) => {\n        if (lookup.has(key)) {\n          let el = lookup.get(key);\n          el._x_refreshXForScope(scope2);\n          if (prev.nextElementSibling !== el) {\n            if (prev.nextElementSibling)\n              el.replaceWith(prev.nextElementSibling);\n            prev.after(el);\n          }\n          prev = el;\n          if (el._x_currentIfEl) {\n            if (el.nextElementSibling !== el._x_currentIfEl)\n              prev.after(el._x_currentIfEl);\n            prev = el._x_currentIfEl;\n          }\n          return;\n        }\n        if (templateEl.content.children.length > 1)\n          warn(\"x-for templates require a single root element, additional elements will be ignored.\", templateEl);\n        let clone2 = document.importNode(templateEl.content, true).firstElementChild;\n        let reactiveScope = reactive(scope2);\n        addScopeToNode(clone2, reactiveScope, templateEl);\n        clone2._x_refreshXForScope = refreshScope(reactiveScope);\n        lookup.set(key, clone2);\n        added.add(clone2);\n        prev.after(clone2);\n        prev = clone2;\n      });\n      added.forEach((clone2) => initTree(clone2));\n      if (prev !== templateEl) {\n        templateEl._x_lastRenderedEl = prev;\n      } else {\n        delete templateEl._x_lastRenderedEl;\n      }\n    });\n  });\n}\nfunction parseForExpression(expression) {\n  let forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\n  let stripParensRE = /^\\s*\\(|\\)\\s*$/g;\n  let forAliasRE = /([\\s\\S]*?)\\b(?:in|of)\\b([\\s\\S]*)/;\n  let inMatch = expression.match(forAliasRE);\n  if (!inMatch)\n    return;\n  let res = {};\n  res.items = inMatch[2].trim();\n  let item = inMatch[1].replace(stripParensRE, \"\").trim();\n  let iteratorMatch = item.match(forIteratorRE);\n  if (iteratorMatch) {\n    res.item = item.replace(forIteratorRE, \"\").trim();\n    res.index = iteratorMatch[1].trim();\n    if (iteratorMatch[2]) {\n      res.collection = iteratorMatch[2].trim();\n    }\n  } else {\n    res.item = item;\n  }\n  return res;\n}\nfunction getIterationScopeVariables(iteratorNames, item, index, items) {\n  let scopeVariables = {};\n  if (/^\\[.*\\]$/.test(iteratorNames.item) && Array.isArray(item)) {\n    let names = iteratorNames.item.replace(\"[\", \"\").replace(\"]\", \"\").split(\",\").map((i) => i.trim());\n    names.forEach((name, i) => {\n      scopeVariables[name] = item[i];\n    });\n  } else if (/^\\{.*\\}$/.test(iteratorNames.item) && !Array.isArray(item) && typeof item === \"object\") {\n    let names = iteratorNames.item.replace(\"{\", \"\").replace(\"}\", \"\").split(\",\").map((i) => i.trim());\n    names.forEach((name) => {\n      scopeVariables[name] = item[name];\n    });\n  } else {\n    scopeVariables[iteratorNames.item] = item;\n  }\n  if (iteratorNames.index)\n    scopeVariables[iteratorNames.index] = index;\n  if (iteratorNames.collection)\n    scopeVariables[iteratorNames.collection] = items;\n  return scopeVariables;\n}\nfunction isNumeric3(subject) {\n  return typeof subject !== \"object\" && !isNaN(subject);\n}\nfunction isObject2(subject) {\n  return typeof subject === \"object\" && !Array.isArray(subject);\n}\n\n// packages/alpinejs/src/directives/x-ref.js\nfunction handler3() {\n}\nhandler3.inline = (el, { expression }, { cleanup }) => {\n  let root = closestRoot(el);\n  if (!root)\n    return;\n  if (!root._x_refs)\n    root._x_refs = {};\n  root._x_refs[expression] = el;\n  cleanup(() => delete root._x_refs[expression]);\n};\ndirective(\"ref\", handler3);\n\n// packages/alpinejs/src/directives/x-if.js\ndirective(\"if\", skipDuringClone((el, { expression }, { effect: effect3, cleanup }) => {\n  if (el.tagName.toLowerCase() !== \"template\")\n    warn(\"x-if can only be used on a <template> tag\", el);\n  let evaluate2 = evaluateLater(el, expression);\n  let show = () => {\n    if (el._x_currentIfEl)\n      return el._x_currentIfEl;\n    let clone2 = el.content.cloneNode(true).firstElementChild;\n    addScopeToNode(clone2, {}, el);\n    mutateDom(() => {\n      el.after(clone2);\n      initTree(clone2);\n    });\n    el._x_currentIfEl = clone2;\n    el._x_lastRenderedEl = clone2;\n    el._x_undoIf = () => {\n      mutateDom(() => {\n        destroyTree(clone2);\n        clone2.remove();\n      });\n      delete el._x_currentIfEl;\n      delete el._x_lastRenderedEl;\n    };\n    return clone2;\n  };\n  let hide = () => {\n    if (!el._x_undoIf)\n      return;\n    el._x_undoIf();\n    delete el._x_undoIf;\n  };\n  effect3(() => evaluate2((value) => {\n    value ? show() : hide();\n  }), { priority: \"structural\" });\n  cleanup(() => el._x_undoIf && el._x_undoIf());\n}));\n\n// packages/alpinejs/src/directives/x-id.js\ndirective(\"id\", (el, { expression }, { evaluate: evaluate2 }) => {\n  let names = evaluate2(expression);\n  names.forEach((name) => setIdRoot(el, name));\n});\ninterceptClone((from, to) => {\n  if (from._x_ids) {\n    to._x_ids = from._x_ids;\n  }\n});\n\n// packages/alpinejs/src/directives/x-on.js\nmapAttributes(startingWith(\"@\", into(prefix(\"on:\"))));\ndirective(\"on\", skipDuringClone((el, { value, modifiers, expression }, { cleanup }) => {\n  let evaluate2 = expression ? evaluateLater(el, expression) : () => {\n  };\n  if (el.tagName.toLowerCase() === \"template\") {\n    if (!el._x_forwardEvents)\n      el._x_forwardEvents = [];\n    if (!el._x_forwardEvents.includes(value))\n      el._x_forwardEvents.push(value);\n  }\n  let removeListener = on(el, value, modifiers, (e) => {\n    evaluate2(() => {\n    }, { scope: { \"$event\": e }, params: [e] });\n  });\n  cleanup(() => removeListener());\n}));\n\n// packages/alpinejs/src/directives/index.js\nwarnMissingPluginDirective(\"Collapse\", \"collapse\", \"collapse\");\nwarnMissingPluginDirective(\"Intersect\", \"intersect\", \"intersect\");\nwarnMissingPluginDirective(\"Focus\", \"trap\", \"focus\");\nwarnMissingPluginDirective(\"Mask\", \"mask\", \"mask\");\nfunction warnMissingPluginDirective(name, directiveName, slug) {\n  directive(directiveName, (el) => warn(`You can't use [x-${directiveName}] without first installing the \"${name}\" plugin here: https://alpinejs.dev/plugins/${slug}`, el));\n}\n\n// packages/alpinejs/src/index.js\nalpine_default.setEvaluator(normalEvaluator);\nalpine_default.setRawEvaluator(normalRawEvaluator);\nalpine_default.setReactivityEngine({\n  reactive: reactive2,\n  // Since Vue 3.2, the scheduler is called with no arguments, so we wrap\n  // the effect to hand Alpine's scheduler the runner it expects to queue.\n  effect: (callback, options = {}) => {\n    let runner;\n    runner = effect2(callback, {\n      scheduler: () => {\n        if (!runner)\n          return;\n        options.scheduler ? options.scheduler(runner) : runner();\n      }\n    });\n    return runner;\n  },\n  release: stop,\n  raw: toRaw\n});\nvar src_default = alpine_default;\n\n// packages/alpinejs/builds/module.js\nvar module_default = src_default;\nexport {\n  src_default as Alpine,\n  module_default as default\n};\n/*! Bundled license information:\n\n@vue/shared/dist/shared.esm-bundler.js:\n  (**\n  * @vue/shared v3.5.41\n  * (c) 2018-present Yuxi (Evan) You and Vue contributors\n  * @license MIT\n  **)\n\n@vue/reactivity/dist/reactivity.esm-bundler.js:\n  (**\n  * @vue/reactivity v3.5.41\n  * (c) 2018-present Yuxi (Evan) You and Vue contributors\n  * @license MIT\n  **)\n*/\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.POPULAR_TLDS = exports.POPULAR_DOMAINS = exports.run = void 0;\nconst run_1 = __importDefault(require(\"./lib/run\"));\nexports.run = run_1.default;\nconst config_1 = require(\"./lib/config\");\nObject.defineProperty(exports, \"POPULAR_DOMAINS\", { enumerable: true, get: function () { return config_1.POPULAR_DOMAINS; } });\nObject.defineProperty(exports, \"POPULAR_TLDS\", { enumerable: true, get: function () { return config_1.POPULAR_TLDS; } });\nconst MailSpellChecker = {\n    run: run_1.default,\n    POPULAR_DOMAINS: config_1.POPULAR_DOMAINS,\n    POPULAR_TLDS: config_1.POPULAR_TLDS,\n};\nexports.default = MailSpellChecker;\n","import Events from './dom/events';\nimport { initAccordions } from './components/accordion';\nimport { initCollapses } from './components/collapse';\nimport { initCarousels } from './components/carousel';\nimport { initDismisses } from './components/dismiss';\nimport { initDropdowns } from './components/dropdown';\nimport { initModals } from './components/modal';\nimport { initDrawers } from './components/drawer';\nimport { initTabs } from './components/tabs';\nimport { initTooltips } from './components/tooltip';\nimport { initPopovers } from './components/popover';\nimport { initDials } from './components/dial';\nimport { initInputCounters } from './components/input-counter';\nimport { initCopyClipboards } from './components/clipboard';\nimport { initDatepickers } from './components/datepicker';\nimport './components/index';\nimport './types/declarations';\n// setup events for data attributes\nvar events = new Events('load', [\n    initAccordions,\n    initCollapses,\n    initCarousels,\n    initDismisses,\n    initDropdowns,\n    initModals,\n    initDrawers,\n    initTabs,\n    initTooltips,\n    initPopovers,\n    initDials,\n    initInputCounters,\n    initCopyClipboards,\n    initDatepickers,\n]);\nevents.init();\n// export all components\nexport { default as Accordion } from './components/accordion';\nexport { default as Carousel } from './components/carousel';\nexport { default as Collapse } from './components/collapse';\nexport { default as Dial } from './components/dial';\nexport { default as Dismiss } from './components/dismiss';\nexport { default as Drawer } from './components/drawer';\nexport { default as Dropdown } from './components/dropdown';\nexport { default as Modal } from './components/modal';\nexport { default as Popover } from './components/popover';\nexport { default as Tabs } from './components/tabs';\nexport { default as Tooltip } from './components/tooltip';\nexport { default as InputCounter } from './components/input-counter';\nexport { default as CopyClipboard } from './components/clipboard';\nexport { default as Datepicker } from './components/datepicker';\n// export all types\nexport * from './components/accordion/types';\nexport * from './components/carousel/types';\nexport * from './components/collapse/types';\nexport * from './components/dial/types';\nexport * from './components/dismiss/types';\nexport * from './components/drawer/types';\nexport * from './components/dropdown/types';\nexport * from './components/modal/types';\nexport * from './components/popover/types';\nexport * from './components/tabs/types';\nexport * from './components/tooltip/types';\nexport * from './components/input-counter/types';\nexport * from './components/clipboard/types';\nexport * from './components/datepicker/types';\nexport * from './dom/types';\n// export all interfaces\nexport * from './components/accordion/interface';\nexport * from './components/carousel/interface';\nexport * from './components/collapse/interface';\nexport * from './components/dial/interface';\nexport * from './components/dismiss/interface';\nexport * from './components/drawer/interface';\nexport * from './components/dropdown/interface';\nexport * from './components/modal/interface';\nexport * from './components/popover/interface';\nexport * from './components/tabs/interface';\nexport * from './components/tooltip/interface';\nexport * from './components/input-counter/interface';\nexport * from './components/clipboard/interface';\nexport * from './components/datepicker/interface';\n// export init functions\nexport { initAccordions } from './components/accordion';\nexport { initCarousels } from './components/carousel';\nexport { initCollapses } from './components/collapse';\nexport { initDials } from './components/dial';\nexport { initDismisses } from './components/dismiss';\nexport { initDrawers } from './components/drawer';\nexport { initDropdowns } from './components/dropdown';\nexport { initModals } from './components/modal';\nexport { initPopovers } from './components/popover';\nexport { initTabs } from './components/tabs';\nexport { initTooltips } from './components/tooltip';\nexport { initInputCounters } from './components/input-counter';\nexport { initCopyClipboards } from './components/clipboard';\nexport { initDatepickers } from './components/datepicker';\n// export all init functions\nexport { initFlowbite } from './components/index';\n//# sourceMappingURL=index.js.map",null,"var Events = /** @class */ (function () {\n    function Events(eventType, eventFunctions) {\n        if (eventFunctions === void 0) { eventFunctions = []; }\n        this._eventType = eventType;\n        this._eventFunctions = eventFunctions;\n    }\n    Events.prototype.init = function () {\n        var _this = this;\n        this._eventFunctions.forEach(function (eventFunction) {\n            if (typeof window !== 'undefined') {\n                window.addEventListener(_this._eventType, eventFunction);\n            }\n        });\n    };\n    return Events;\n}());\nexport default Events;\n//# sourceMappingURL=events.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nvar Default = {\n    alwaysOpen: false,\n    activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n    inactiveClasses: 'text-gray-500 dark:text-gray-400',\n    onOpen: function () { },\n    onClose: function () { },\n    onToggle: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Accordion = /** @class */ (function () {\n    function Accordion(accordionEl, items, options, instanceOptions) {\n        if (accordionEl === void 0) { accordionEl = null; }\n        if (items === void 0) { items = []; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : accordionEl.id;\n        this._accordionEl = accordionEl;\n        this._items = items;\n        this._options = __assign(__assign({}, Default), options);\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Accordion', this, this._instanceId, instanceOptions.override);\n    }\n    Accordion.prototype.init = function () {\n        var _this = this;\n        if (this._items.length && !this._initialized) {\n            // show accordion item based on click\n            this._items.forEach(function (item) {\n                if (item.active) {\n                    _this.open(item.id);\n                }\n                var clickHandler = function () {\n                    _this.toggle(item.id);\n                };\n                item.triggerEl.addEventListener('click', clickHandler);\n                // Store the clickHandler in a property of the item for removal later\n                item.clickHandler = clickHandler;\n            });\n            this._initialized = true;\n        }\n    };\n    Accordion.prototype.destroy = function () {\n        if (this._items.length && this._initialized) {\n            this._items.forEach(function (item) {\n                item.triggerEl.removeEventListener('click', item.clickHandler);\n                // Clean up by deleting the clickHandler property from the item\n                delete item.clickHandler;\n            });\n            this._initialized = false;\n        }\n    };\n    Accordion.prototype.removeInstance = function () {\n        instances.removeInstance('Accordion', this._instanceId);\n    };\n    Accordion.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Accordion.prototype.getItem = function (id) {\n        return this._items.filter(function (item) { return item.id === id; })[0];\n    };\n    Accordion.prototype.open = function (id) {\n        var _a, _b;\n        var _this = this;\n        var item = this.getItem(id);\n        // don't hide other accordions if always open\n        if (!this._options.alwaysOpen) {\n            this._items.map(function (i) {\n                var _a, _b;\n                if (i !== item) {\n                    (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' '));\n                    (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' '));\n                    i.targetEl.classList.add('hidden');\n                    i.triggerEl.setAttribute('aria-expanded', 'false');\n                    i.active = false;\n                    // rotate icon if set\n                    if (i.iconEl) {\n                        i.iconEl.classList.add('rotate-180');\n                    }\n                }\n            });\n        }\n        // show active item\n        (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' '));\n        (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' '));\n        item.triggerEl.setAttribute('aria-expanded', 'true');\n        item.targetEl.classList.remove('hidden');\n        item.active = true;\n        // rotate icon if set\n        if (item.iconEl) {\n            item.iconEl.classList.remove('rotate-180');\n        }\n        // callback function\n        this._options.onOpen(this, item);\n    };\n    Accordion.prototype.toggle = function (id) {\n        var item = this.getItem(id);\n        if (item.active) {\n            this.close(id);\n        }\n        else {\n            this.open(id);\n        }\n        // callback function\n        this._options.onToggle(this, item);\n    };\n    Accordion.prototype.close = function (id) {\n        var _a, _b;\n        var item = this.getItem(id);\n        (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' '));\n        (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' '));\n        item.targetEl.classList.add('hidden');\n        item.triggerEl.setAttribute('aria-expanded', 'false');\n        item.active = false;\n        // rotate icon if set\n        if (item.iconEl) {\n            item.iconEl.classList.add('rotate-180');\n        }\n        // callback function\n        this._options.onClose(this, item);\n    };\n    Accordion.prototype.updateOnOpen = function (callback) {\n        this._options.onOpen = callback;\n    };\n    Accordion.prototype.updateOnClose = function (callback) {\n        this._options.onClose = callback;\n    };\n    Accordion.prototype.updateOnToggle = function (callback) {\n        this._options.onToggle = callback;\n    };\n    return Accordion;\n}());\nexport function initAccordions() {\n    document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) {\n        var alwaysOpen = $accordionEl.getAttribute('data-accordion');\n        var activeClasses = $accordionEl.getAttribute('data-active-classes');\n        var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes');\n        var items = [];\n        $accordionEl\n            .querySelectorAll('[data-accordion-target]')\n            .forEach(function ($triggerEl) {\n            // Consider only items that directly belong to $accordionEl\n            // (to make nested accordions work).\n            if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n                var item = {\n                    id: $triggerEl.getAttribute('data-accordion-target'),\n                    triggerEl: $triggerEl,\n                    targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')),\n                    iconEl: $triggerEl.querySelector('[data-accordion-icon]'),\n                    active: $triggerEl.getAttribute('aria-expanded') === 'true'\n                        ? true\n                        : false,\n                };\n                items.push(item);\n            }\n        });\n        new Accordion($accordionEl, items, {\n            alwaysOpen: alwaysOpen === 'open' ? true : false,\n            activeClasses: activeClasses\n                ? activeClasses\n                : Default.activeClasses,\n            inactiveClasses: inactiveClasses\n                ? inactiveClasses\n                : Default.inactiveClasses,\n        });\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Accordion = Accordion;\n    window.initAccordions = initAccordions;\n}\nexport default Accordion;\n//# sourceMappingURL=index.js.map",null,"var Instances = /** @class */ (function () {\n    function Instances() {\n        this._instances = {\n            Accordion: {},\n            Carousel: {},\n            Collapse: {},\n            Dial: {},\n            Dismiss: {},\n            Drawer: {},\n            Dropdown: {},\n            Modal: {},\n            Popover: {},\n            Tabs: {},\n            Tooltip: {},\n            InputCounter: {},\n            CopyClipboard: {},\n            Datepicker: {},\n        };\n    }\n    Instances.prototype.addInstance = function (component, instance, id, override) {\n        if (override === void 0) { override = false; }\n        if (!this._instances[component]) {\n            console.warn(\"Flowbite: Component \".concat(component, \" does not exist.\"));\n            return false;\n        }\n        if (this._instances[component][id] && !override) {\n            console.warn(\"Flowbite: Instance with ID \".concat(id, \" already exists.\"));\n            return;\n        }\n        if (override && this._instances[component][id]) {\n            this._instances[component][id].destroyAndRemoveInstance();\n        }\n        this._instances[component][id ? id : this._generateRandomId()] =\n            instance;\n    };\n    Instances.prototype.getAllInstances = function () {\n        return this._instances;\n    };\n    Instances.prototype.getInstances = function (component) {\n        if (!this._instances[component]) {\n            console.warn(\"Flowbite: Component \".concat(component, \" does not exist.\"));\n            return false;\n        }\n        return this._instances[component];\n    };\n    Instances.prototype.getInstance = function (component, id) {\n        if (!this._componentAndInstanceCheck(component, id)) {\n            return;\n        }\n        if (!this._instances[component][id]) {\n            console.warn(\"Flowbite: Instance with ID \".concat(id, \" does not exist.\"));\n            return;\n        }\n        return this._instances[component][id];\n    };\n    Instances.prototype.destroyAndRemoveInstance = function (component, id) {\n        if (!this._componentAndInstanceCheck(component, id)) {\n            return;\n        }\n        this.destroyInstanceObject(component, id);\n        this.removeInstance(component, id);\n    };\n    Instances.prototype.removeInstance = function (component, id) {\n        if (!this._componentAndInstanceCheck(component, id)) {\n            return;\n        }\n        delete this._instances[component][id];\n    };\n    Instances.prototype.destroyInstanceObject = function (component, id) {\n        if (!this._componentAndInstanceCheck(component, id)) {\n            return;\n        }\n        this._instances[component][id].destroy();\n    };\n    Instances.prototype.instanceExists = function (component, id) {\n        if (!this._instances[component]) {\n            return false;\n        }\n        if (!this._instances[component][id]) {\n            return false;\n        }\n        return true;\n    };\n    Instances.prototype._generateRandomId = function () {\n        return Math.random().toString(36).substr(2, 9);\n    };\n    Instances.prototype._componentAndInstanceCheck = function (component, id) {\n        if (!this._instances[component]) {\n            console.warn(\"Flowbite: Component \".concat(component, \" does not exist.\"));\n            return false;\n        }\n        if (!this._instances[component][id]) {\n            console.warn(\"Flowbite: Instance with ID \".concat(id, \" does not exist.\"));\n            return false;\n        }\n        return true;\n    };\n    return Instances;\n}());\nvar instances = new Instances();\nexport default instances;\nif (typeof window !== 'undefined') {\n    window.FlowbiteInstances = instances;\n}\n//# sourceMappingURL=instances.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nvar Default = {\n    onCollapse: function () { },\n    onExpand: function () { },\n    onToggle: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Collapse = /** @class */ (function () {\n    function Collapse(targetEl, triggerEl, options, instanceOptions) {\n        if (targetEl === void 0) { targetEl = null; }\n        if (triggerEl === void 0) { triggerEl = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = __assign(__assign({}, Default), options);\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Collapse', this, this._instanceId, instanceOptions.override);\n    }\n    Collapse.prototype.init = function () {\n        var _this = this;\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            if (this._triggerEl.hasAttribute('aria-expanded')) {\n                this._visible =\n                    this._triggerEl.getAttribute('aria-expanded') === 'true';\n            }\n            else {\n                // fix until v2 not to break previous single collapses which became dismiss\n                this._visible = !this._targetEl.classList.contains('hidden');\n            }\n            this._clickHandler = function () {\n                _this.toggle();\n            };\n            this._triggerEl.addEventListener('click', this._clickHandler);\n            this._initialized = true;\n        }\n    };\n    Collapse.prototype.destroy = function () {\n        if (this._triggerEl && this._initialized) {\n            this._triggerEl.removeEventListener('click', this._clickHandler);\n            this._initialized = false;\n        }\n    };\n    Collapse.prototype.removeInstance = function () {\n        instances.removeInstance('Collapse', this._instanceId);\n    };\n    Collapse.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Collapse.prototype.collapse = function () {\n        this._targetEl.classList.add('hidden');\n        if (this._triggerEl) {\n            this._triggerEl.setAttribute('aria-expanded', 'false');\n        }\n        this._visible = false;\n        // callback function\n        this._options.onCollapse(this);\n    };\n    Collapse.prototype.expand = function () {\n        this._targetEl.classList.remove('hidden');\n        if (this._triggerEl) {\n            this._triggerEl.setAttribute('aria-expanded', 'true');\n        }\n        this._visible = true;\n        // callback function\n        this._options.onExpand(this);\n    };\n    Collapse.prototype.toggle = function () {\n        if (this._visible) {\n            this.collapse();\n        }\n        else {\n            this.expand();\n        }\n        // callback function\n        this._options.onToggle(this);\n    };\n    Collapse.prototype.updateOnCollapse = function (callback) {\n        this._options.onCollapse = callback;\n    };\n    Collapse.prototype.updateOnExpand = function (callback) {\n        this._options.onExpand = callback;\n    };\n    Collapse.prototype.updateOnToggle = function (callback) {\n        this._options.onToggle = callback;\n    };\n    return Collapse;\n}());\nexport function initCollapses() {\n    document\n        .querySelectorAll('[data-collapse-toggle]')\n        .forEach(function ($triggerEl) {\n        var targetId = $triggerEl.getAttribute('data-collapse-toggle');\n        var $targetEl = document.getElementById(targetId);\n        // check if the target element exists\n        if ($targetEl) {\n            if (!instances.instanceExists('Collapse', $targetEl.getAttribute('id'))) {\n                new Collapse($targetEl, $triggerEl);\n            }\n            else {\n                // if instance exists already for the same target element then create a new one with a different trigger element\n                new Collapse($targetEl, $triggerEl, {}, {\n                    id: $targetEl.getAttribute('id') +\n                        '_' +\n                        instances._generateRandomId(),\n                });\n            }\n        }\n        else {\n            console.error(\"The target element with id \\\"\".concat(targetId, \"\\\" does not exist. Please check the data-collapse-toggle attribute.\"));\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Collapse = Collapse;\n    window.initCollapses = initCollapses;\n}\nexport default Collapse;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nvar Default = {\n    defaultPosition: 0,\n    indicators: {\n        items: [],\n        activeClasses: 'bg-white dark:bg-gray-800',\n        inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n    },\n    interval: 3000,\n    onNext: function () { },\n    onPrev: function () { },\n    onChange: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Carousel = /** @class */ (function () {\n    function Carousel(carouselEl, items, options, instanceOptions) {\n        if (carouselEl === void 0) { carouselEl = null; }\n        if (items === void 0) { items = []; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : carouselEl.id;\n        this._carouselEl = carouselEl;\n        this._items = items;\n        this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) });\n        this._activeItem = this.getItem(this._options.defaultPosition);\n        this._indicators = this._options.indicators.items;\n        this._intervalDuration = this._options.interval;\n        this._intervalInstance = null;\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Carousel', this, this._instanceId, instanceOptions.override);\n    }\n    /**\n     * initialize carousel and items based on active one\n     */\n    Carousel.prototype.init = function () {\n        var _this = this;\n        if (this._items.length && !this._initialized) {\n            this._items.map(function (item) {\n                item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform');\n            });\n            // if no active item is set then first position is default\n            if (this.getActiveItem()) {\n                this.slideTo(this.getActiveItem().position);\n            }\n            else {\n                this.slideTo(0);\n            }\n            this._indicators.map(function (indicator, position) {\n                indicator.el.addEventListener('click', function () {\n                    _this.slideTo(position);\n                });\n            });\n            this._initialized = true;\n        }\n    };\n    Carousel.prototype.destroy = function () {\n        if (this._initialized) {\n            this._initialized = false;\n        }\n    };\n    Carousel.prototype.removeInstance = function () {\n        instances.removeInstance('Carousel', this._instanceId);\n    };\n    Carousel.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Carousel.prototype.getItem = function (position) {\n        return this._items[position];\n    };\n    /**\n     * Slide to the element based on id\n     * @param {*} position\n     */\n    Carousel.prototype.slideTo = function (position) {\n        var nextItem = this._items[position];\n        var rotationItems = {\n            left: nextItem.position === 0\n                ? this._items[this._items.length - 1]\n                : this._items[nextItem.position - 1],\n            middle: nextItem,\n            right: nextItem.position === this._items.length - 1\n                ? this._items[0]\n                : this._items[nextItem.position + 1],\n        };\n        this._rotate(rotationItems);\n        this._setActiveItem(nextItem);\n        if (this._intervalInstance) {\n            this.pause();\n            this.cycle();\n        }\n        this._options.onChange(this);\n    };\n    /**\n     * Based on the currently active item it will go to the next position\n     */\n    Carousel.prototype.next = function () {\n        var activeItem = this.getActiveItem();\n        var nextItem = null;\n        // check if last item\n        if (activeItem.position === this._items.length - 1) {\n            nextItem = this._items[0];\n        }\n        else {\n            nextItem = this._items[activeItem.position + 1];\n        }\n        this.slideTo(nextItem.position);\n        // callback function\n        this._options.onNext(this);\n    };\n    /**\n     * Based on the currently active item it will go to the previous position\n     */\n    Carousel.prototype.prev = function () {\n        var activeItem = this.getActiveItem();\n        var prevItem = null;\n        // check if first item\n        if (activeItem.position === 0) {\n            prevItem = this._items[this._items.length - 1];\n        }\n        else {\n            prevItem = this._items[activeItem.position - 1];\n        }\n        this.slideTo(prevItem.position);\n        // callback function\n        this._options.onPrev(this);\n    };\n    /**\n     * This method applies the transform classes based on the left, middle, and right rotation carousel items\n     * @param {*} rotationItems\n     */\n    Carousel.prototype._rotate = function (rotationItems) {\n        // reset\n        this._items.map(function (item) {\n            item.el.classList.add('hidden');\n        });\n        // Handling the case when there is only one item\n        if (this._items.length === 1) {\n            rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10');\n            rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n            return;\n        }\n        // left item (previously active)\n        rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20');\n        rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n        // currently active item\n        rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10');\n        rotationItems.middle.el.classList.add('translate-x-0', 'z-30');\n        // right item (upcoming active)\n        rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-30');\n        rotationItems.right.el.classList.add('translate-x-full', 'z-20');\n    };\n    /**\n     * Set an interval to cycle through the carousel items\n     */\n    Carousel.prototype.cycle = function () {\n        var _this = this;\n        if (typeof window !== 'undefined') {\n            this._intervalInstance = window.setInterval(function () {\n                _this.next();\n            }, this._intervalDuration);\n        }\n    };\n    /**\n     * Clears the cycling interval\n     */\n    Carousel.prototype.pause = function () {\n        clearInterval(this._intervalInstance);\n    };\n    /**\n     * Get the currently active item\n     */\n    Carousel.prototype.getActiveItem = function () {\n        return this._activeItem;\n    };\n    /**\n     * Set the currently active item and data attribute\n     * @param {*} position\n     */\n    Carousel.prototype._setActiveItem = function (item) {\n        var _a, _b;\n        var _this = this;\n        this._activeItem = item;\n        var position = item.position;\n        // update the indicators if available\n        if (this._indicators.length) {\n            this._indicators.map(function (indicator) {\n                var _a, _b;\n                indicator.el.setAttribute('aria-current', 'false');\n                (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' '));\n                (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' '));\n            });\n            (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' '));\n            (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' '));\n            this._indicators[position].el.setAttribute('aria-current', 'true');\n        }\n    };\n    Carousel.prototype.updateOnNext = function (callback) {\n        this._options.onNext = callback;\n    };\n    Carousel.prototype.updateOnPrev = function (callback) {\n        this._options.onPrev = callback;\n    };\n    Carousel.prototype.updateOnChange = function (callback) {\n        this._options.onChange = callback;\n    };\n    return Carousel;\n}());\nexport function initCarousels() {\n    document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) {\n        var interval = $carouselEl.getAttribute('data-carousel-interval');\n        var slide = $carouselEl.getAttribute('data-carousel') === 'slide'\n            ? true\n            : false;\n        var items = [];\n        var defaultPosition = 0;\n        if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n            Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) {\n                items.push({\n                    position: position,\n                    el: $carouselItemEl,\n                });\n                if ($carouselItemEl.getAttribute('data-carousel-item') ===\n                    'active') {\n                    defaultPosition = position;\n                }\n            });\n        }\n        var indicators = [];\n        if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n            Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) {\n                indicators.push({\n                    position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')),\n                    el: $indicatorEl,\n                });\n            });\n        }\n        var carousel = new Carousel($carouselEl, items, {\n            defaultPosition: defaultPosition,\n            indicators: {\n                items: indicators,\n            },\n            interval: interval ? interval : Default.interval,\n        });\n        if (slide) {\n            carousel.cycle();\n        }\n        // check for controls\n        var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]');\n        var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]');\n        if (carouselNextEl) {\n            carouselNextEl.addEventListener('click', function () {\n                carousel.next();\n            });\n        }\n        if (carouselPrevEl) {\n            carouselPrevEl.addEventListener('click', function () {\n                carousel.prev();\n            });\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Carousel = Carousel;\n    window.initCarousels = initCarousels;\n}\nexport default Carousel;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nvar Default = {\n    transition: 'transition-opacity',\n    duration: 300,\n    timing: 'ease-out',\n    onHide: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Dismiss = /** @class */ (function () {\n    function Dismiss(targetEl, triggerEl, options, instanceOptions) {\n        if (targetEl === void 0) { targetEl = null; }\n        if (triggerEl === void 0) { triggerEl = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = __assign(__assign({}, Default), options);\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Dismiss', this, this._instanceId, instanceOptions.override);\n    }\n    Dismiss.prototype.init = function () {\n        var _this = this;\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._clickHandler = function () {\n                _this.hide();\n            };\n            this._triggerEl.addEventListener('click', this._clickHandler);\n            this._initialized = true;\n        }\n    };\n    Dismiss.prototype.destroy = function () {\n        if (this._triggerEl && this._initialized) {\n            this._triggerEl.removeEventListener('click', this._clickHandler);\n            this._initialized = false;\n        }\n    };\n    Dismiss.prototype.removeInstance = function () {\n        instances.removeInstance('Dismiss', this._instanceId);\n    };\n    Dismiss.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Dismiss.prototype.hide = function () {\n        var _this = this;\n        this._targetEl.classList.add(this._options.transition, \"duration-\".concat(this._options.duration), this._options.timing, 'opacity-0');\n        setTimeout(function () {\n            _this._targetEl.classList.add('hidden');\n        }, this._options.duration);\n        // callback function\n        this._options.onHide(this, this._targetEl);\n    };\n    Dismiss.prototype.updateOnHide = function (callback) {\n        this._options.onHide = callback;\n    };\n    return Dismiss;\n}());\nexport function initDismisses() {\n    document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) {\n        var targetId = $triggerEl.getAttribute('data-dismiss-target');\n        var $dismissEl = document.querySelector(targetId);\n        if ($dismissEl) {\n            new Dismiss($dismissEl, $triggerEl);\n        }\n        else {\n            console.error(\"The dismiss element with id \\\"\".concat(targetId, \"\\\" does not exist. Please check the data-dismiss-target attribute.\"));\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Dismiss = Dismiss;\n    window.initDismisses = initDismisses;\n}\nexport default Dismiss;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport instances from '../../dom/instances';\nvar Default = {\n    placement: 'bottom',\n    triggerType: 'click',\n    offsetSkidding: 0,\n    offsetDistance: 10,\n    delay: 300,\n    ignoreClickOutsideClass: false,\n    onShow: function () { },\n    onHide: function () { },\n    onToggle: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Dropdown = /** @class */ (function () {\n    function Dropdown(targetElement, triggerElement, options, instanceOptions) {\n        if (targetElement === void 0) { targetElement = null; }\n        if (triggerElement === void 0) { triggerElement = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetElement.id;\n        this._targetEl = targetElement;\n        this._triggerEl = triggerElement;\n        this._options = __assign(__assign({}, Default), options);\n        this._popperInstance = null;\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Dropdown', this, this._instanceId, instanceOptions.override);\n    }\n    Dropdown.prototype.init = function () {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._popperInstance = this._createPopperInstance();\n            this._setupEventListeners();\n            this._initialized = true;\n        }\n    };\n    Dropdown.prototype.destroy = function () {\n        var _this = this;\n        var triggerEvents = this._getTriggerEvents();\n        // Remove click event listeners for trigger element\n        if (this._options.triggerType === 'click') {\n            triggerEvents.showEvents.forEach(function (ev) {\n                _this._triggerEl.removeEventListener(ev, _this._clickHandler);\n            });\n        }\n        // Remove hover event listeners for trigger and target elements\n        if (this._options.triggerType === 'hover') {\n            triggerEvents.showEvents.forEach(function (ev) {\n                _this._triggerEl.removeEventListener(ev, _this._hoverShowTriggerElHandler);\n                _this._targetEl.removeEventListener(ev, _this._hoverShowTargetElHandler);\n            });\n            triggerEvents.hideEvents.forEach(function (ev) {\n                _this._triggerEl.removeEventListener(ev, _this._hoverHideHandler);\n                _this._targetEl.removeEventListener(ev, _this._hoverHideHandler);\n            });\n        }\n        this._popperInstance.destroy();\n        this._initialized = false;\n    };\n    Dropdown.prototype.removeInstance = function () {\n        instances.removeInstance('Dropdown', this._instanceId);\n    };\n    Dropdown.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Dropdown.prototype._setupEventListeners = function () {\n        var _this = this;\n        var triggerEvents = this._getTriggerEvents();\n        this._clickHandler = function () {\n            _this.toggle();\n        };\n        // click event handling for trigger element\n        if (this._options.triggerType === 'click') {\n            triggerEvents.showEvents.forEach(function (ev) {\n                _this._triggerEl.addEventListener(ev, _this._clickHandler);\n            });\n        }\n        this._hoverShowTriggerElHandler = function (ev) {\n            if (ev.type === 'click') {\n                _this.toggle();\n            }\n            else {\n                setTimeout(function () {\n                    _this.show();\n                }, _this._options.delay);\n            }\n        };\n        this._hoverShowTargetElHandler = function () {\n            _this.show();\n        };\n        this._hoverHideHandler = function () {\n            setTimeout(function () {\n                if (!_this._targetEl.matches(':hover')) {\n                    _this.hide();\n                }\n            }, _this._options.delay);\n        };\n        // hover event handling for trigger element\n        if (this._options.triggerType === 'hover') {\n            triggerEvents.showEvents.forEach(function (ev) {\n                _this._triggerEl.addEventListener(ev, _this._hoverShowTriggerElHandler);\n                _this._targetEl.addEventListener(ev, _this._hoverShowTargetElHandler);\n            });\n            triggerEvents.hideEvents.forEach(function (ev) {\n                _this._triggerEl.addEventListener(ev, _this._hoverHideHandler);\n                _this._targetEl.addEventListener(ev, _this._hoverHideHandler);\n            });\n        }\n    };\n    Dropdown.prototype._createPopperInstance = function () {\n        return createPopper(this._triggerEl, this._targetEl, {\n            placement: this._options.placement,\n            modifiers: [\n                {\n                    name: 'offset',\n                    options: {\n                        offset: [\n                            this._options.offsetSkidding,\n                            this._options.offsetDistance,\n                        ],\n                    },\n                },\n            ],\n        });\n    };\n    Dropdown.prototype._setupClickOutsideListener = function () {\n        var _this = this;\n        this._clickOutsideEventListener = function (ev) {\n            _this._handleClickOutside(ev, _this._targetEl);\n        };\n        document.body.addEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Dropdown.prototype._removeClickOutsideListener = function () {\n        document.body.removeEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Dropdown.prototype._handleClickOutside = function (ev, targetEl) {\n        var clickedEl = ev.target;\n        // Ignore clicks on the trigger element (ie. a datepicker input)\n        var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n        var isIgnored = false;\n        if (ignoreClickOutsideClass) {\n            var ignoredClickOutsideEls = document.querySelectorAll(\".\".concat(ignoreClickOutsideClass));\n            ignoredClickOutsideEls.forEach(function (el) {\n                if (el.contains(clickedEl)) {\n                    isIgnored = true;\n                    return;\n                }\n            });\n        }\n        // Ignore clicks on the target element (ie. dropdown itself)\n        if (clickedEl !== targetEl &&\n            !targetEl.contains(clickedEl) &&\n            !this._triggerEl.contains(clickedEl) &&\n            !isIgnored &&\n            this.isVisible()) {\n            this.hide();\n        }\n    };\n    Dropdown.prototype._getTriggerEvents = function () {\n        switch (this._options.triggerType) {\n            case 'hover':\n                return {\n                    showEvents: ['mouseenter', 'click'],\n                    hideEvents: ['mouseleave'],\n                };\n            case 'click':\n                return {\n                    showEvents: ['click'],\n                    hideEvents: [],\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: [],\n                };\n            default:\n                return {\n                    showEvents: ['click'],\n                    hideEvents: [],\n                };\n        }\n    };\n    Dropdown.prototype.toggle = function () {\n        if (this.isVisible()) {\n            this.hide();\n        }\n        else {\n            this.show();\n        }\n        this._options.onToggle(this);\n    };\n    Dropdown.prototype.isVisible = function () {\n        return this._visible;\n    };\n    Dropdown.prototype.show = function () {\n        this._targetEl.classList.remove('hidden');\n        this._targetEl.classList.add('block');\n        this._targetEl.removeAttribute('aria-hidden');\n        // Enable the event listeners\n        this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [\n                { name: 'eventListeners', enabled: true },\n            ], false) })); });\n        this._setupClickOutsideListener();\n        // Update its position\n        this._popperInstance.update();\n        this._visible = true;\n        // callback function\n        this._options.onShow(this);\n    };\n    Dropdown.prototype.hide = function () {\n        this._targetEl.classList.remove('block');\n        this._targetEl.classList.add('hidden');\n        this._targetEl.setAttribute('aria-hidden', 'true');\n        // Disable the event listeners\n        this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [\n                { name: 'eventListeners', enabled: false },\n            ], false) })); });\n        this._visible = false;\n        this._removeClickOutsideListener();\n        // callback function\n        this._options.onHide(this);\n    };\n    Dropdown.prototype.updateOnShow = function (callback) {\n        this._options.onShow = callback;\n    };\n    Dropdown.prototype.updateOnHide = function (callback) {\n        this._options.onHide = callback;\n    };\n    Dropdown.prototype.updateOnToggle = function (callback) {\n        this._options.onToggle = callback;\n    };\n    return Dropdown;\n}());\nexport function initDropdowns() {\n    document\n        .querySelectorAll('[data-dropdown-toggle]')\n        .forEach(function ($triggerEl) {\n        var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n        var $dropdownEl = document.getElementById(dropdownId);\n        if ($dropdownEl) {\n            var placement = $triggerEl.getAttribute('data-dropdown-placement');\n            var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding');\n            var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance');\n            var triggerType = $triggerEl.getAttribute('data-dropdown-trigger');\n            var delay = $triggerEl.getAttribute('data-dropdown-delay');\n            var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class');\n            new Dropdown($dropdownEl, $triggerEl, {\n                placement: placement ? placement : Default.placement,\n                triggerType: triggerType\n                    ? triggerType\n                    : Default.triggerType,\n                offsetSkidding: offsetSkidding\n                    ? parseInt(offsetSkidding)\n                    : Default.offsetSkidding,\n                offsetDistance: offsetDistance\n                    ? parseInt(offsetDistance)\n                    : Default.offsetDistance,\n                delay: delay ? parseInt(delay) : Default.delay,\n                ignoreClickOutsideClass: ignoreClickOutsideClass\n                    ? ignoreClickOutsideClass\n                    : Default.ignoreClickOutsideClass,\n            });\n        }\n        else {\n            console.error(\"The dropdown element with id \\\"\".concat(dropdownId, \"\\\" does not exist. Please check the data-dropdown-toggle attribute.\"));\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Dropdown = Dropdown;\n    window.initDropdowns = initDropdowns;\n}\nexport default Dropdown;\n//# sourceMappingURL=index.js.map",null,"import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n  placement: 'bottom',\n  modifiers: [],\n  strategy: 'absolute'\n};\n\nfunction areValidElements() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return !args.some(function (element) {\n    return !(element && typeof element.getBoundingClientRect === 'function');\n  });\n}\n\nexport function popperGenerator(generatorOptions) {\n  if (generatorOptions === void 0) {\n    generatorOptions = {};\n  }\n\n  var _generatorOptions = generatorOptions,\n      _generatorOptions$def = _generatorOptions.defaultModifiers,\n      defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n      _generatorOptions$def2 = _generatorOptions.defaultOptions,\n      defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n  return function createPopper(reference, popper, options) {\n    if (options === void 0) {\n      options = defaultOptions;\n    }\n\n    var state = {\n      placement: 'bottom',\n      orderedModifiers: [],\n      options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n      modifiersData: {},\n      elements: {\n        reference: reference,\n        popper: popper\n      },\n      attributes: {},\n      styles: {}\n    };\n    var effectCleanupFns = [];\n    var isDestroyed = false;\n    var instance = {\n      state: state,\n      setOptions: function setOptions(setOptionsAction) {\n        var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n        cleanupModifierEffects();\n        state.options = Object.assign({}, defaultOptions, state.options, options);\n        state.scrollParents = {\n          reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n          popper: listScrollParents(popper)\n        }; // Orders the modifiers based on their dependencies and `phase`\n        // properties\n\n        var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n        state.orderedModifiers = orderedModifiers.filter(function (m) {\n          return m.enabled;\n        });\n        runModifierEffects();\n        return instance.update();\n      },\n      // Sync update – it will always be executed, even if not necessary. This\n      // is useful for low frequency updates where sync behavior simplifies the\n      // logic.\n      // For high frequency updates (e.g. `resize` and `scroll` events), always\n      // prefer the async Popper#update method\n      forceUpdate: function forceUpdate() {\n        if (isDestroyed) {\n          return;\n        }\n\n        var _state$elements = state.elements,\n            reference = _state$elements.reference,\n            popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n        // anymore\n\n        if (!areValidElements(reference, popper)) {\n          return;\n        } // Store the reference and popper rects to be read by modifiers\n\n\n        state.rects = {\n          reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n          popper: getLayoutRect(popper)\n        }; // Modifiers have the ability to reset the current update cycle. The\n        // most common use case for this is the `flip` modifier changing the\n        // placement, which then needs to re-run all the modifiers, because the\n        // logic was previously ran for the previous placement and is therefore\n        // stale/incorrect\n\n        state.reset = false;\n        state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n        // is filled with the initial data specified by the modifier. This means\n        // it doesn't persist and is fresh on each update.\n        // To ensure persistent data, use `${name}#persistent`\n\n        state.orderedModifiers.forEach(function (modifier) {\n          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n        });\n\n        for (var index = 0; index < state.orderedModifiers.length; index++) {\n          if (state.reset === true) {\n            state.reset = false;\n            index = -1;\n            continue;\n          }\n\n          var _state$orderedModifie = state.orderedModifiers[index],\n              fn = _state$orderedModifie.fn,\n              _state$orderedModifie2 = _state$orderedModifie.options,\n              _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n              name = _state$orderedModifie.name;\n\n          if (typeof fn === 'function') {\n            state = fn({\n              state: state,\n              options: _options,\n              name: name,\n              instance: instance\n            }) || state;\n          }\n        }\n      },\n      // Async and optimistically optimized update – it will not be executed if\n      // not necessary (debounced to run at most once-per-tick)\n      update: debounce(function () {\n        return new Promise(function (resolve) {\n          instance.forceUpdate();\n          resolve(state);\n        });\n      }),\n      destroy: function destroy() {\n        cleanupModifierEffects();\n        isDestroyed = true;\n      }\n    };\n\n    if (!areValidElements(reference, popper)) {\n      return instance;\n    }\n\n    instance.setOptions(options).then(function (state) {\n      if (!isDestroyed && options.onFirstUpdate) {\n        options.onFirstUpdate(state);\n      }\n    }); // Modifiers have the ability to execute arbitrary code before the first\n    // update cycle runs. They will be executed in the same order as the update\n    // cycle. This is useful when a modifier adds some persistent data that\n    // other modifiers need to use, but the modifier is run after the dependent\n    // one.\n\n    function runModifierEffects() {\n      state.orderedModifiers.forEach(function (_ref) {\n        var name = _ref.name,\n            _ref$options = _ref.options,\n            options = _ref$options === void 0 ? {} : _ref$options,\n            effect = _ref.effect;\n\n        if (typeof effect === 'function') {\n          var cleanupFn = effect({\n            state: state,\n            name: name,\n            instance: instance,\n            options: options\n          });\n\n          var noopFn = function noopFn() {};\n\n          effectCleanupFns.push(cleanupFn || noopFn);\n        }\n      });\n    }\n\n    function cleanupModifierEffects() {\n      effectCleanupFns.forEach(function (fn) {\n        return fn();\n      });\n      effectCleanupFns = [];\n    }\n\n    return instance;\n  };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n  var rect = element.getBoundingClientRect();\n  var scaleX = round(rect.width) / element.offsetWidth || 1;\n  var scaleY = round(rect.height) / element.offsetHeight || 1;\n  return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n\n  var isOffsetParentAnElement = isHTMLElement(offsetParent);\n  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n  var documentElement = getDocumentElement(offsetParent);\n  var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n  var scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  var offsets = {\n    x: 0,\n    y: 0\n  };\n\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n    isScrollParent(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n\n    if (isHTMLElement(offsetParent)) {\n      offsets = getBoundingClientRect(offsetParent, true);\n      offsets.x += offsetParent.clientLeft;\n      offsets.y += offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n\n  return {\n    x: rect.left + scroll.scrollLeft - offsets.x,\n    y: rect.top + scroll.scrollTop - offsets.y,\n    width: rect.width,\n    height: rect.height\n  };\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n\n  var clientRect = element.getBoundingClientRect();\n  var scaleX = 1;\n  var scaleY = 1;\n\n  if (includeScale && isHTMLElement(element)) {\n    scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n    scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n  }\n\n  var _ref = isElement(element) ? getWindow(element) : window,\n      visualViewport = _ref.visualViewport;\n\n  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n  var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n  var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n  var width = clientRect.width / scaleX;\n  var height = clientRect.height / scaleY;\n  return {\n    width: width,\n    height: height,\n    top: y,\n    right: x + width,\n    bottom: y + height,\n    left: x,\n    x: x,\n    y: y\n  };\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n  var OwnElement = getWindow(node).Element;\n  return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n  var OwnElement = getWindow(node).HTMLElement;\n  return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n  // IE 11 has no ShadowRoot\n  if (typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n\n  var OwnElement = getWindow(node).ShadowRoot;\n  return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export default function getWindow(node) {\n  if (node == null) {\n    return window;\n  }\n\n  if (node.toString() !== '[object Window]') {\n    var ownerDocument = node.ownerDocument;\n    return ownerDocument ? ownerDocument.defaultView || window : window;\n  }\n\n  return node;\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n  return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","export default function getUAString() {\n  var uaData = navigator.userAgentData;\n\n  if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n    return uaData.brands.map(function (item) {\n      return item.brand + \"/\" + item.version;\n    }).join(' ');\n  }\n\n  return navigator.userAgent;\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n  if (node === getWindow(node) || !isHTMLElement(node)) {\n    return getWindowScroll(node);\n  } else {\n    return getHTMLElementScroll(node);\n  }\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n  var win = getWindow(node);\n  var scrollLeft = win.pageXOffset;\n  var scrollTop = win.pageYOffset;\n  return {\n    scrollLeft: scrollLeft,\n    scrollTop: scrollTop\n  };\n}","export default function getHTMLElementScroll(element) {\n  return {\n    scrollLeft: element.scrollLeft,\n    scrollTop: element.scrollTop\n  };\n}","export default function getNodeName(element) {\n  return element ? (element.nodeName || '').toLowerCase() : null;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n  // If <html> has a CSS width greater than the viewport, then this will be\n  // incorrect for RTL.\n  // Popper 1 is broken in this case and never had a bug report so let's assume\n  // it's not an issue. I don't think anyone ever specifies width on <html>\n  // anyway.\n  // Browsers where the left scrollbar doesn't cause an issue report `0` for\n  // this (e.g. Edge 2019, IE11, Safari)\n  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n  // $FlowFixMe[incompatible-return]: assume body is always available\n  return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n  element.document) || window.document).documentElement;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n  // Firefox wants us to check `-x` and `-y` variations as well\n  var _getComputedStyle = getComputedStyle(element),\n      overflow = _getComputedStyle.overflow,\n      overflowX = _getComputedStyle.overflowX,\n      overflowY = _getComputedStyle.overflowY;\n\n  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n  var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n  // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n  var width = element.offsetWidth;\n  var height = element.offsetHeight;\n\n  if (Math.abs(clientRect.width - width) <= 1) {\n    width = clientRect.width;\n  }\n\n  if (Math.abs(clientRect.height - height) <= 1) {\n    height = clientRect.height;\n  }\n\n  return {\n    x: element.offsetLeft,\n    y: element.offsetTop,\n    width: width,\n    height: height\n  };\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n  var _element$ownerDocumen;\n\n  if (list === void 0) {\n    list = [];\n  }\n\n  var scrollParent = getScrollParent(element);\n  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n  var win = getWindow(scrollParent);\n  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n  var updatedList = list.concat(target);\n  return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n  updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n  if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n    // $FlowFixMe[incompatible-return]: assume body is always available\n    return node.ownerDocument.body;\n  }\n\n  if (isHTMLElement(node) && isScrollParent(node)) {\n    return node;\n  }\n\n  return getScrollParent(getParentNode(node));\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n  if (getNodeName(element) === 'html') {\n    return element;\n  }\n\n  return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n    // $FlowFixMe[incompatible-return]\n    // $FlowFixMe[prop-missing]\n    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n    element.parentNode || ( // DOM Element detected\n    isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n    // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n    getDocumentElement(element) // fallback\n\n  );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n  if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n  getComputedStyle(element).position === 'fixed') {\n    return null;\n  }\n\n  return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n  var isFirefox = /firefox/i.test(getUAString());\n  var isIE = /Trident/i.test(getUAString());\n\n  if (isIE && isHTMLElement(element)) {\n    // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n    var elementCss = getComputedStyle(element);\n\n    if (elementCss.position === 'fixed') {\n      return null;\n    }\n  }\n\n  var currentNode = getParentNode(element);\n\n  if (isShadowRoot(currentNode)) {\n    currentNode = currentNode.host;\n  }\n\n  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n    var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n    // create a containing block.\n    // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n    if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n      return currentNode;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n  var window = getWindow(element);\n  var offsetParent = getTrueOffsetParent(element);\n\n  while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n    offsetParent = getTrueOffsetParent(offsetParent);\n  }\n\n  if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n    return window;\n  }\n\n  return offsetParent || getContainingBlock(element) || window;\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n  return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n  var map = new Map();\n  var visited = new Set();\n  var result = [];\n  modifiers.forEach(function (modifier) {\n    map.set(modifier.name, modifier);\n  }); // On visiting object, check for its dependencies and visit them recursively\n\n  function sort(modifier) {\n    visited.add(modifier.name);\n    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n    requires.forEach(function (dep) {\n      if (!visited.has(dep)) {\n        var depModifier = map.get(dep);\n\n        if (depModifier) {\n          sort(depModifier);\n        }\n      }\n    });\n    result.push(modifier);\n  }\n\n  modifiers.forEach(function (modifier) {\n    if (!visited.has(modifier.name)) {\n      // check for visited object\n      sort(modifier);\n    }\n  });\n  return result;\n}\n\nexport default function orderModifiers(modifiers) {\n  // order based on dependencies\n  var orderedModifiers = order(modifiers); // order based on phase\n\n  return modifierPhases.reduce(function (acc, phase) {\n    return acc.concat(orderedModifiers.filter(function (modifier) {\n      return modifier.phase === phase;\n    }));\n  }, []);\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n  return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n  return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function debounce(fn) {\n  var pending;\n  return function () {\n    if (!pending) {\n      pending = new Promise(function (resolve) {\n        Promise.resolve().then(function () {\n          pending = undefined;\n          resolve(fn());\n        });\n      });\n    }\n\n    return pending;\n  };\n}","export default function mergeByName(modifiers) {\n  var merged = modifiers.reduce(function (merged, current) {\n    var existing = merged[current.name];\n    merged[current.name] = existing ? Object.assign({}, existing, current, {\n      options: Object.assign({}, existing.options, current.options),\n      data: Object.assign({}, existing.data, current.data)\n    }) : current;\n    return merged;\n  }, {}); // IE11 does not support Object.values\n\n  return Object.keys(merged).map(function (key) {\n    return merged[key];\n  });\n}","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n  passive: true\n};\n\nfunction effect(_ref) {\n  var state = _ref.state,\n      instance = _ref.instance,\n      options = _ref.options;\n  var _options$scroll = options.scroll,\n      scroll = _options$scroll === void 0 ? true : _options$scroll,\n      _options$resize = options.resize,\n      resize = _options$resize === void 0 ? true : _options$resize;\n  var window = getWindow(state.elements.popper);\n  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n  if (scroll) {\n    scrollParents.forEach(function (scrollParent) {\n      scrollParent.addEventListener('scroll', instance.update, passive);\n    });\n  }\n\n  if (resize) {\n    window.addEventListener('resize', instance.update, passive);\n  }\n\n  return function () {\n    if (scroll) {\n      scrollParents.forEach(function (scrollParent) {\n        scrollParent.removeEventListener('scroll', instance.update, passive);\n      });\n    }\n\n    if (resize) {\n      window.removeEventListener('resize', instance.update, passive);\n    }\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'eventListeners',\n  enabled: true,\n  phase: 'write',\n  fn: function fn() {},\n  effect: effect,\n  data: {}\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  // Offsets are the actual position the popper needs to have to be\n  // properly positioned near its reference element\n  // This is the most basic placement, and will be adjusted by\n  // the modifiers in the next step\n  state.modifiersData[name] = computeOffsets({\n    reference: state.rects.reference,\n    element: state.rects.popper,\n    strategy: 'absolute',\n    placement: state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'popperOffsets',\n  enabled: true,\n  phase: 'read',\n  fn: popperOffsets,\n  data: {}\n};","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n  var reference = _ref.reference,\n      element = _ref.element,\n      placement = _ref.placement;\n  var basePlacement = placement ? getBasePlacement(placement) : null;\n  var variation = placement ? getVariation(placement) : null;\n  var commonX = reference.x + reference.width / 2 - element.width / 2;\n  var commonY = reference.y + reference.height / 2 - element.height / 2;\n  var offsets;\n\n  switch (basePlacement) {\n    case top:\n      offsets = {\n        x: commonX,\n        y: reference.y - element.height\n      };\n      break;\n\n    case bottom:\n      offsets = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n\n    case right:\n      offsets = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n\n    case left:\n      offsets = {\n        x: reference.x - element.width,\n        y: commonY\n      };\n      break;\n\n    default:\n      offsets = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n\n  var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n  if (mainAxis != null) {\n    var len = mainAxis === 'y' ? 'height' : 'width';\n\n    switch (variation) {\n      case start:\n        offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n        break;\n\n      case end:\n        offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n        break;\n\n      default:\n    }\n  }\n\n  return offsets;\n}","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n  return placement.split('-')[0];\n}","export default function getVariation(placement) {\n  return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n  top: 'auto',\n  right: 'auto',\n  bottom: 'auto',\n  left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n  var x = _ref.x,\n      y = _ref.y;\n  var dpr = win.devicePixelRatio || 1;\n  return {\n    x: round(x * dpr) / dpr || 0,\n    y: round(y * dpr) / dpr || 0\n  };\n}\n\nexport function mapToStyles(_ref2) {\n  var _Object$assign2;\n\n  var popper = _ref2.popper,\n      popperRect = _ref2.popperRect,\n      placement = _ref2.placement,\n      variation = _ref2.variation,\n      offsets = _ref2.offsets,\n      position = _ref2.position,\n      gpuAcceleration = _ref2.gpuAcceleration,\n      adaptive = _ref2.adaptive,\n      roundOffsets = _ref2.roundOffsets,\n      isFixed = _ref2.isFixed;\n  var _offsets$x = offsets.x,\n      x = _offsets$x === void 0 ? 0 : _offsets$x,\n      _offsets$y = offsets.y,\n      y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n  var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n    x: x,\n    y: y\n  }) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref3.x;\n  y = _ref3.y;\n  var hasX = offsets.hasOwnProperty('x');\n  var hasY = offsets.hasOwnProperty('y');\n  var sideX = left;\n  var sideY = top;\n  var win = window;\n\n  if (adaptive) {\n    var offsetParent = getOffsetParent(popper);\n    var heightProp = 'clientHeight';\n    var widthProp = 'clientWidth';\n\n    if (offsetParent === getWindow(popper)) {\n      offsetParent = getDocumentElement(popper);\n\n      if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n        heightProp = 'scrollHeight';\n        widthProp = 'scrollWidth';\n      }\n    } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n    offsetParent = offsetParent;\n\n    if (placement === top || (placement === left || placement === right) && variation === end) {\n      sideY = bottom;\n      var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n      offsetParent[heightProp];\n      y -= offsetY - popperRect.height;\n      y *= gpuAcceleration ? 1 : -1;\n    }\n\n    if (placement === left || (placement === top || placement === bottom) && variation === end) {\n      sideX = right;\n      var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n      offsetParent[widthProp];\n      x -= offsetX - popperRect.width;\n      x *= gpuAcceleration ? 1 : -1;\n    }\n  }\n\n  var commonStyles = Object.assign({\n    position: position\n  }, adaptive && unsetSides);\n\n  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n    x: x,\n    y: y\n  }, getWindow(popper)) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref4.x;\n  y = _ref4.y;\n\n  if (gpuAcceleration) {\n    var _Object$assign;\n\n    return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n  }\n\n  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n  var state = _ref5.state,\n      options = _ref5.options;\n  var _options$gpuAccelerat = options.gpuAcceleration,\n      gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n      _options$adaptive = options.adaptive,\n      adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n      _options$roundOffsets = options.roundOffsets,\n      roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n  var commonStyles = {\n    placement: getBasePlacement(state.placement),\n    variation: getVariation(state.placement),\n    popper: state.elements.popper,\n    popperRect: state.rects.popper,\n    gpuAcceleration: gpuAcceleration,\n    isFixed: state.options.strategy === 'fixed'\n  };\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.popperOffsets,\n      position: state.options.strategy,\n      adaptive: adaptive,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  if (state.modifiersData.arrow != null) {\n    state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.arrow,\n      position: 'absolute',\n      adaptive: false,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-placement': state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'computeStyles',\n  enabled: true,\n  phase: 'beforeWrite',\n  fn: computeStyles,\n  data: {}\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n  var state = _ref.state;\n  Object.keys(state.elements).forEach(function (name) {\n    var style = state.styles[name] || {};\n    var attributes = state.attributes[name] || {};\n    var element = state.elements[name]; // arrow is optional + virtual elements\n\n    if (!isHTMLElement(element) || !getNodeName(element)) {\n      return;\n    } // Flow doesn't support to extend this property, but it's the most\n    // effective way to apply styles to an HTMLElement\n    // $FlowFixMe[cannot-write]\n\n\n    Object.assign(element.style, style);\n    Object.keys(attributes).forEach(function (name) {\n      var value = attributes[name];\n\n      if (value === false) {\n        element.removeAttribute(name);\n      } else {\n        element.setAttribute(name, value === true ? '' : value);\n      }\n    });\n  });\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state;\n  var initialStyles = {\n    popper: {\n      position: state.options.strategy,\n      left: '0',\n      top: '0',\n      margin: '0'\n    },\n    arrow: {\n      position: 'absolute'\n    },\n    reference: {}\n  };\n  Object.assign(state.elements.popper.style, initialStyles.popper);\n  state.styles = initialStyles;\n\n  if (state.elements.arrow) {\n    Object.assign(state.elements.arrow.style, initialStyles.arrow);\n  }\n\n  return function () {\n    Object.keys(state.elements).forEach(function (name) {\n      var element = state.elements[name];\n      var attributes = state.attributes[name] || {};\n      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n      var style = styleProperties.reduce(function (style, property) {\n        style[property] = '';\n        return style;\n      }, {}); // arrow is optional + virtual elements\n\n      if (!isHTMLElement(element) || !getNodeName(element)) {\n        return;\n      }\n\n      Object.assign(element.style, style);\n      Object.keys(attributes).forEach(function (attribute) {\n        element.removeAttribute(attribute);\n      });\n    });\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'applyStyles',\n  enabled: true,\n  phase: 'write',\n  fn: applyStyles,\n  effect: effect,\n  requires: ['computeStyles']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n  var basePlacement = getBasePlacement(placement);\n  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n  var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n    placement: placement\n  })) : offset,\n      skidding = _ref[0],\n      distance = _ref[1];\n\n  skidding = skidding || 0;\n  distance = (distance || 0) * invertDistance;\n  return [left, right].indexOf(basePlacement) >= 0 ? {\n    x: distance,\n    y: skidding\n  } : {\n    x: skidding,\n    y: distance\n  };\n}\n\nfunction offset(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options,\n      name = _ref2.name;\n  var _options$offset = options.offset,\n      offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n  var data = placements.reduce(function (acc, placement) {\n    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n    return acc;\n  }, {});\n  var _data$state$placement = data[state.placement],\n      x = _data$state$placement.x,\n      y = _data$state$placement.y;\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.modifiersData.popperOffsets.x += x;\n    state.modifiersData.popperOffsets.y += y;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'offset',\n  enabled: true,\n  phase: 'main',\n  requires: ['popperOffsets'],\n  fn: offset\n};","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n  if (getBasePlacement(placement) === auto) {\n    return [];\n  }\n\n  var oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n\n  if (state.modifiersData[name]._skip) {\n    return;\n  }\n\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n      specifiedFallbackPlacements = options.fallbackPlacements,\n      padding = options.padding,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      _options$flipVariatio = options.flipVariations,\n      flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n      allowedAutoPlacements = options.allowedAutoPlacements;\n  var preferredPlacement = state.options.placement;\n  var basePlacement = getBasePlacement(preferredPlacement);\n  var isBasePlacement = basePlacement === preferredPlacement;\n  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n  var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n    return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding,\n      flipVariations: flipVariations,\n      allowedAutoPlacements: allowedAutoPlacements\n    }) : placement);\n  }, []);\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var checksMap = new Map();\n  var makeFallbackChecks = true;\n  var firstFittingPlacement = placements[0];\n\n  for (var i = 0; i < placements.length; i++) {\n    var placement = placements[i];\n\n    var _basePlacement = getBasePlacement(placement);\n\n    var isStartVariation = getVariation(placement) === start;\n    var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n    var len = isVertical ? 'width' : 'height';\n    var overflow = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      altBoundary: altBoundary,\n      padding: padding\n    });\n    var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n    if (referenceRect[len] > popperRect[len]) {\n      mainVariationSide = getOppositePlacement(mainVariationSide);\n    }\n\n    var altVariationSide = getOppositePlacement(mainVariationSide);\n    var checks = [];\n\n    if (checkMainAxis) {\n      checks.push(overflow[_basePlacement] <= 0);\n    }\n\n    if (checkAltAxis) {\n      checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n    }\n\n    if (checks.every(function (check) {\n      return check;\n    })) {\n      firstFittingPlacement = placement;\n      makeFallbackChecks = false;\n      break;\n    }\n\n    checksMap.set(placement, checks);\n  }\n\n  if (makeFallbackChecks) {\n    // `2` may be desired in some cases – research later\n    var numberOfChecks = flipVariations ? 3 : 1;\n\n    var _loop = function _loop(_i) {\n      var fittingPlacement = placements.find(function (placement) {\n        var checks = checksMap.get(placement);\n\n        if (checks) {\n          return checks.slice(0, _i).every(function (check) {\n            return check;\n          });\n        }\n      });\n\n      if (fittingPlacement) {\n        firstFittingPlacement = fittingPlacement;\n        return \"break\";\n      }\n    };\n\n    for (var _i = numberOfChecks; _i > 0; _i--) {\n      var _ret = _loop(_i);\n\n      if (_ret === \"break\") break;\n    }\n  }\n\n  if (state.placement !== firstFittingPlacement) {\n    state.modifiersData[name]._skip = true;\n    state.placement = firstFittingPlacement;\n    state.reset = true;\n  }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'flip',\n  enabled: true,\n  phase: 'main',\n  fn: flip,\n  requiresIfExists: ['offset'],\n  data: {\n    _skip: false\n  }\n};","var hash = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}","var hash = {\n  start: 'end',\n  end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n  return placement.replace(/start|end/g, function (matched) {\n    return hash[matched];\n  });\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      _options$placement = _options.placement,\n      placement = _options$placement === void 0 ? state.placement : _options$placement,\n      _options$strategy = _options.strategy,\n      strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n      _options$boundary = _options.boundary,\n      boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n      _options$rootBoundary = _options.rootBoundary,\n      rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n      _options$elementConte = _options.elementContext,\n      elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n      _options$altBoundary = _options.altBoundary,\n      altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n      _options$padding = _options.padding,\n      padding = _options$padding === void 0 ? 0 : _options$padding;\n  var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n  var altContext = elementContext === popper ? reference : popper;\n  var popperRect = state.rects.popper;\n  var element = state.elements[altBoundary ? altContext : elementContext];\n  var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n  var referenceClientRect = getBoundingClientRect(state.elements.reference);\n  var popperOffsets = computeOffsets({\n    reference: referenceClientRect,\n    element: popperRect,\n    strategy: 'absolute',\n    placement: placement\n  });\n  var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n  // 0 or negative = within the clipping rect\n\n  var overflowOffsets = {\n    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n    right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n  };\n  var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n  if (elementContext === popper && offsetData) {\n    var offset = offsetData[placement];\n    Object.keys(overflowOffsets).forEach(function (key) {\n      var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n      var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n      overflowOffsets[key] += offset[axis] * multiply;\n    });\n  }\n\n  return overflowOffsets;\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n  var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n  rect.top = rect.top + element.clientTop;\n  rect.left = rect.left + element.clientLeft;\n  rect.bottom = rect.top + element.clientHeight;\n  rect.right = rect.left + element.clientWidth;\n  rect.width = element.clientWidth;\n  rect.height = element.clientHeight;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n  return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n  var clippingParents = listScrollParents(getParentNode(element));\n  var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n  var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n  if (!isElement(clipperElement)) {\n    return [];\n  } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n  return clippingParents.filter(function (clippingParent) {\n    return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n  });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n  var firstClippingParent = clippingParents[0];\n  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n    var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n  clippingRect.width = clippingRect.right - clippingRect.left;\n  clippingRect.height = clippingRect.bottom - clippingRect.top;\n  clippingRect.x = clippingRect.left;\n  clippingRect.y = clippingRect.top;\n  return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n  var win = getWindow(element);\n  var html = getDocumentElement(element);\n  var visualViewport = win.visualViewport;\n  var width = html.clientWidth;\n  var height = html.clientHeight;\n  var x = 0;\n  var y = 0;\n\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    var layoutViewport = isLayoutViewport();\n\n    if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x + getWindowScrollBarX(element),\n    y: y\n  };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n  var _element$ownerDocumen;\n\n  var html = getDocumentElement(element);\n  var winScroll = getWindowScroll(element);\n  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n  var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n  var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n  var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n  var y = -winScroll.scrollTop;\n\n  if (getComputedStyle(body || html).direction === 'rtl') {\n    x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x,\n    y: y\n  };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n  var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n  if (parent.contains(child)) {\n    return true;\n  } // then fallback to custom implementation with Shadow DOM support\n  else if (rootNode && isShadowRoot(rootNode)) {\n      var next = child;\n\n      do {\n        if (next && parent.isSameNode(next)) {\n          return true;\n        } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n        next = next.parentNode || next.host;\n      } while (next);\n    } // Give up, the result is false\n\n\n  return false;\n}","export default function rectToClientRect(rect) {\n  return Object.assign({}, rect, {\n    left: rect.x,\n    top: rect.y,\n    right: rect.x + rect.width,\n    bottom: rect.y + rect.height\n  });\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n  return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  };\n}","export default function expandToHashMap(value, keys) {\n  return keys.reduce(function (hashMap, key) {\n    hashMap[key] = value;\n    return hashMap;\n  }, {});\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      placement = _options.placement,\n      boundary = _options.boundary,\n      rootBoundary = _options.rootBoundary,\n      padding = _options.padding,\n      flipVariations = _options.flipVariations,\n      _options$allowedAutoP = _options.allowedAutoPlacements,\n      allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n  var variation = getVariation(placement);\n  var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n    return getVariation(placement) === variation;\n  }) : basePlacements;\n  var allowedPlacements = placements.filter(function (placement) {\n    return allowedAutoPlacements.indexOf(placement) >= 0;\n  });\n\n  if (allowedPlacements.length === 0) {\n    allowedPlacements = placements;\n  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n  var overflows = allowedPlacements.reduce(function (acc, placement) {\n    acc[placement] = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding\n    })[getBasePlacement(placement)];\n    return acc;\n  }, {});\n  return Object.keys(overflows).sort(function (a, b) {\n    return overflows[a] - overflows[b];\n  });\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      padding = options.padding,\n      _options$tether = options.tether,\n      tether = _options$tether === void 0 ? true : _options$tether,\n      _options$tetherOffset = options.tetherOffset,\n      tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n  var overflow = detectOverflow(state, {\n    boundary: boundary,\n    rootBoundary: rootBoundary,\n    padding: padding,\n    altBoundary: altBoundary\n  });\n  var basePlacement = getBasePlacement(state.placement);\n  var variation = getVariation(state.placement);\n  var isBasePlacement = !variation;\n  var mainAxis = getMainAxisFromPlacement(basePlacement);\n  var altAxis = getAltAxis(mainAxis);\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : tetherOffset;\n  var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n    mainAxis: tetherOffsetValue,\n    altAxis: tetherOffsetValue\n  } : Object.assign({\n    mainAxis: 0,\n    altAxis: 0\n  }, tetherOffsetValue);\n  var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n  var data = {\n    x: 0,\n    y: 0\n  };\n\n  if (!popperOffsets) {\n    return;\n  }\n\n  if (checkMainAxis) {\n    var _offsetModifierState$;\n\n    var mainSide = mainAxis === 'y' ? top : left;\n    var altSide = mainAxis === 'y' ? bottom : right;\n    var len = mainAxis === 'y' ? 'height' : 'width';\n    var offset = popperOffsets[mainAxis];\n    var min = offset + overflow[mainSide];\n    var max = offset - overflow[altSide];\n    var additive = tether ? -popperRect[len] / 2 : 0;\n    var minLen = variation === start ? referenceRect[len] : popperRect[len];\n    var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n    // outside the reference bounds\n\n    var arrowElement = state.elements.arrow;\n    var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n      width: 0,\n      height: 0\n    };\n    var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n    var arrowPaddingMin = arrowPaddingObject[mainSide];\n    var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n    // to include its full size in the calculation. If the reference is small\n    // and near the edge of a boundary, the popper can overflow even if the\n    // reference is not overflowing as well (e.g. virtual elements with no\n    // width or height)\n\n    var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n    var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n    var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n    var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n    var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n    var tetherMax = offset + maxOffset - offsetModifierValue;\n    var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n    popperOffsets[mainAxis] = preventedOffset;\n    data[mainAxis] = preventedOffset - offset;\n  }\n\n  if (checkAltAxis) {\n    var _offsetModifierState$2;\n\n    var _mainSide = mainAxis === 'x' ? top : left;\n\n    var _altSide = mainAxis === 'x' ? bottom : right;\n\n    var _offset = popperOffsets[altAxis];\n\n    var _len = altAxis === 'y' ? 'height' : 'width';\n\n    var _min = _offset + overflow[_mainSide];\n\n    var _max = _offset - overflow[_altSide];\n\n    var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n    var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n    var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n    var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n    var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n    popperOffsets[altAxis] = _preventedOffset;\n    data[altAxis] = _preventedOffset - _offset;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'preventOverflow',\n  enabled: true,\n  phase: 'main',\n  fn: preventOverflow,\n  requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n  return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n  var v = within(min, value, max);\n  return v > max ? max : v;\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n  padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : padding;\n  return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n  var _state$modifiersData$;\n\n  var state = _ref.state,\n      name = _ref.name,\n      options = _ref.options;\n  var arrowElement = state.elements.arrow;\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var basePlacement = getBasePlacement(state.placement);\n  var axis = getMainAxisFromPlacement(basePlacement);\n  var isVertical = [left, right].indexOf(basePlacement) >= 0;\n  var len = isVertical ? 'height' : 'width';\n\n  if (!arrowElement || !popperOffsets) {\n    return;\n  }\n\n  var paddingObject = toPaddingObject(options.padding, state);\n  var arrowRect = getLayoutRect(arrowElement);\n  var minProp = axis === 'y' ? top : left;\n  var maxProp = axis === 'y' ? bottom : right;\n  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n  var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n  var arrowOffsetParent = getOffsetParent(arrowElement);\n  var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n  var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n  // outside of the popper bounds\n\n  var min = paddingObject[minProp];\n  var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n  var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n  var axisProp = axis;\n  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options;\n  var _options$element = options.element,\n      arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n  if (arrowElement == null) {\n    return;\n  } // CSS selector\n\n\n  if (typeof arrowElement === 'string') {\n    arrowElement = state.elements.popper.querySelector(arrowElement);\n\n    if (!arrowElement) {\n      return;\n    }\n  }\n\n  if (!contains(state.elements.popper, arrowElement)) {\n    return;\n  }\n\n  state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'arrow',\n  enabled: true,\n  phase: 'main',\n  fn: arrow,\n  effect: effect,\n  requires: ['popperOffsets'],\n  requiresIfExists: ['preventOverflow']\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n  if (preventedOffsets === void 0) {\n    preventedOffsets = {\n      x: 0,\n      y: 0\n    };\n  }\n\n  return {\n    top: overflow.top - rect.height - preventedOffsets.y,\n    right: overflow.right - rect.width + preventedOffsets.x,\n    bottom: overflow.bottom - rect.height + preventedOffsets.y,\n    left: overflow.left - rect.width - preventedOffsets.x\n  };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n  return [top, right, bottom, left].some(function (side) {\n    return overflow[side] >= 0;\n  });\n}\n\nfunction hide(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var preventedOffsets = state.modifiersData.preventOverflow;\n  var referenceOverflow = detectOverflow(state, {\n    elementContext: 'reference'\n  });\n  var popperAltOverflow = detectOverflow(state, {\n    altBoundary: true\n  });\n  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n  state.modifiersData[name] = {\n    referenceClippingOffsets: referenceClippingOffsets,\n    popperEscapeOffsets: popperEscapeOffsets,\n    isReferenceHidden: isReferenceHidden,\n    hasPopperEscaped: hasPopperEscaped\n  };\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-reference-hidden': isReferenceHidden,\n    'data-popper-escaped': hasPopperEscaped\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'hide',\n  enabled: true,\n  phase: 'main',\n  requiresIfExists: ['preventOverflow'],\n  fn: hide\n};","var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nvar Default = {\n    placement: 'center',\n    backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40',\n    backdrop: 'dynamic',\n    closable: true,\n    onHide: function () { },\n    onShow: function () { },\n    onToggle: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Modal = /** @class */ (function () {\n    function Modal(targetEl, options, instanceOptions) {\n        if (targetEl === void 0) { targetEl = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._eventListenerInstances = [];\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._options = __assign(__assign({}, Default), options);\n        this._isHidden = true;\n        this._backdropEl = null;\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Modal', this, this._instanceId, instanceOptions.override);\n    }\n    Modal.prototype.init = function () {\n        var _this = this;\n        if (this._targetEl && !this._initialized) {\n            this._getPlacementClasses().map(function (c) {\n                _this._targetEl.classList.add(c);\n            });\n            this._initialized = true;\n        }\n    };\n    Modal.prototype.destroy = function () {\n        if (this._initialized) {\n            this.removeAllEventListenerInstances();\n            this._destroyBackdropEl();\n            this._initialized = false;\n        }\n    };\n    Modal.prototype.removeInstance = function () {\n        instances.removeInstance('Modal', this._instanceId);\n    };\n    Modal.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Modal.prototype._createBackdrop = function () {\n        var _a;\n        if (this._isHidden) {\n            var backdropEl = document.createElement('div');\n            (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' '));\n            document.querySelector('body').append(backdropEl);\n            this._backdropEl = backdropEl;\n        }\n    };\n    Modal.prototype._destroyBackdropEl = function () {\n        if (!this._isHidden && this._backdropEl) {\n            this._backdropEl.remove();\n            this._backdropEl = null;\n        }\n    };\n    Modal.prototype._setupModalCloseEventListeners = function () {\n        var _this = this;\n        if (this._options.backdrop === 'dynamic') {\n            this._clickOutsideEventListener = function (ev) {\n                _this._handleOutsideClick(ev.target);\n            };\n            this._targetEl.addEventListener('click', this._clickOutsideEventListener, true);\n        }\n        this._keydownEventListener = function (ev) {\n            if (ev.key === 'Escape') {\n                _this.hide();\n            }\n        };\n        document.body.addEventListener('keydown', this._keydownEventListener, true);\n    };\n    Modal.prototype._removeModalCloseEventListeners = function () {\n        if (this._options.backdrop === 'dynamic') {\n            this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true);\n        }\n        document.body.removeEventListener('keydown', this._keydownEventListener, true);\n    };\n    Modal.prototype._handleOutsideClick = function (target) {\n        if (target === this._targetEl ||\n            (target === this._backdropEl && this.isVisible())) {\n            this.hide();\n        }\n    };\n    Modal.prototype._getPlacementClasses = function () {\n        switch (this._options.placement) {\n            // top\n            case 'top-left':\n                return ['justify-start', 'items-start'];\n            case 'top-center':\n                return ['justify-center', 'items-start'];\n            case 'top-right':\n                return ['justify-end', 'items-start'];\n            // center\n            case 'center-left':\n                return ['justify-start', 'items-center'];\n            case 'center':\n                return ['justify-center', 'items-center'];\n            case 'center-right':\n                return ['justify-end', 'items-center'];\n            // bottom\n            case 'bottom-left':\n                return ['justify-start', 'items-end'];\n            case 'bottom-center':\n                return ['justify-center', 'items-end'];\n            case 'bottom-right':\n                return ['justify-end', 'items-end'];\n            default:\n                return ['justify-center', 'items-center'];\n        }\n    };\n    Modal.prototype.toggle = function () {\n        if (this._isHidden) {\n            this.show();\n        }\n        else {\n            this.hide();\n        }\n        // callback function\n        this._options.onToggle(this);\n    };\n    Modal.prototype.show = function () {\n        if (this.isHidden) {\n            this._targetEl.classList.add('flex');\n            this._targetEl.classList.remove('hidden');\n            this._targetEl.setAttribute('aria-modal', 'true');\n            this._targetEl.setAttribute('role', 'dialog');\n            this._targetEl.removeAttribute('aria-hidden');\n            this._createBackdrop();\n            this._isHidden = false;\n            // Add keyboard event listener to the document\n            if (this._options.closable) {\n                this._setupModalCloseEventListeners();\n            }\n            // prevent body scroll\n            document.body.classList.add('overflow-hidden');\n            // callback function\n            this._options.onShow(this);\n        }\n    };\n    Modal.prototype.hide = function () {\n        if (this.isVisible) {\n            this._targetEl.classList.add('hidden');\n            this._targetEl.classList.remove('flex');\n            this._targetEl.setAttribute('aria-hidden', 'true');\n            this._targetEl.removeAttribute('aria-modal');\n            this._targetEl.removeAttribute('role');\n            this._destroyBackdropEl();\n            this._isHidden = true;\n            // re-apply body scroll\n            document.body.classList.remove('overflow-hidden');\n            if (this._options.closable) {\n                this._removeModalCloseEventListeners();\n            }\n            // callback function\n            this._options.onHide(this);\n        }\n    };\n    Modal.prototype.isVisible = function () {\n        return !this._isHidden;\n    };\n    Modal.prototype.isHidden = function () {\n        return this._isHidden;\n    };\n    Modal.prototype.addEventListenerInstance = function (element, type, handler) {\n        this._eventListenerInstances.push({\n            element: element,\n            type: type,\n            handler: handler,\n        });\n    };\n    Modal.prototype.removeAllEventListenerInstances = function () {\n        this._eventListenerInstances.map(function (eventListenerInstance) {\n            eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler);\n        });\n        this._eventListenerInstances = [];\n    };\n    Modal.prototype.getAllEventListenerInstances = function () {\n        return this._eventListenerInstances;\n    };\n    Modal.prototype.updateOnShow = function (callback) {\n        this._options.onShow = callback;\n    };\n    Modal.prototype.updateOnHide = function (callback) {\n        this._options.onHide = callback;\n    };\n    Modal.prototype.updateOnToggle = function (callback) {\n        this._options.onToggle = callback;\n    };\n    return Modal;\n}());\nexport function initModals() {\n    // initiate modal based on data-modal-target\n    document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) {\n        var modalId = $triggerEl.getAttribute('data-modal-target');\n        var $modalEl = document.getElementById(modalId);\n        if ($modalEl) {\n            var placement = $modalEl.getAttribute('data-modal-placement');\n            var backdrop = $modalEl.getAttribute('data-modal-backdrop');\n            new Modal($modalEl, {\n                placement: placement ? placement : Default.placement,\n                backdrop: backdrop ? backdrop : Default.backdrop,\n            });\n        }\n        else {\n            console.error(\"Modal with id \".concat(modalId, \" does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.\"));\n        }\n    });\n    // toggle modal visibility\n    document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) {\n        var modalId = $triggerEl.getAttribute('data-modal-toggle');\n        var $modalEl = document.getElementById(modalId);\n        if ($modalEl) {\n            var modal_1 = instances.getInstance('Modal', modalId);\n            if (modal_1) {\n                var toggleModal = function () {\n                    modal_1.toggle();\n                };\n                $triggerEl.addEventListener('click', toggleModal);\n                modal_1.addEventListenerInstance($triggerEl, 'click', toggleModal);\n            }\n            else {\n                console.error(\"Modal with id \".concat(modalId, \" has not been initialized. Please initialize it using the data-modal-target attribute.\"));\n            }\n        }\n        else {\n            console.error(\"Modal with id \".concat(modalId, \" does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?\"));\n        }\n    });\n    // show modal on click if exists based on id\n    document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) {\n        var modalId = $triggerEl.getAttribute('data-modal-show');\n        var $modalEl = document.getElementById(modalId);\n        if ($modalEl) {\n            var modal_2 = instances.getInstance('Modal', modalId);\n            if (modal_2) {\n                var showModal = function () {\n                    modal_2.show();\n                };\n                $triggerEl.addEventListener('click', showModal);\n                modal_2.addEventListenerInstance($triggerEl, 'click', showModal);\n            }\n            else {\n                console.error(\"Modal with id \".concat(modalId, \" has not been initialized. Please initialize it using the data-modal-target attribute.\"));\n            }\n        }\n        else {\n            console.error(\"Modal with id \".concat(modalId, \" does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?\"));\n        }\n    });\n    // hide modal on click if exists based on id\n    document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) {\n        var modalId = $triggerEl.getAttribute('data-modal-hide');\n        var $modalEl = document.getElementById(modalId);\n        if ($modalEl) {\n            var modal_3 = instances.getInstance('Modal', modalId);\n            if (modal_3) {\n                var hideModal = function () {\n                    modal_3.hide();\n                };\n                $triggerEl.addEventListener('click', hideModal);\n                modal_3.addEventListenerInstance($triggerEl, 'click', hideModal);\n            }\n            else {\n                console.error(\"Modal with id \".concat(modalId, \" has not been initialized. Please initialize it using the data-modal-target attribute.\"));\n            }\n        }\n        else {\n            console.error(\"Modal with id \".concat(modalId, \" does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?\"));\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Modal = Modal;\n    window.initModals = initModals;\n}\nexport default Modal;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nvar Default = {\n    placement: 'left',\n    bodyScrolling: false,\n    backdrop: true,\n    edge: false,\n    edgeOffset: 'bottom-[60px]',\n    backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n    onShow: function () { },\n    onHide: function () { },\n    onToggle: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Drawer = /** @class */ (function () {\n    function Drawer(targetEl, options, instanceOptions) {\n        if (targetEl === void 0) { targetEl = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._eventListenerInstances = [];\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._options = __assign(__assign({}, Default), options);\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Drawer', this, this._instanceId, instanceOptions.override);\n    }\n    Drawer.prototype.init = function () {\n        var _this = this;\n        // set initial accessibility attributes\n        if (this._targetEl && !this._initialized) {\n            this._targetEl.setAttribute('aria-hidden', 'true');\n            this._targetEl.classList.add('transition-transform');\n            // set base placement classes\n            this._getPlacementClasses(this._options.placement).base.map(function (c) {\n                _this._targetEl.classList.add(c);\n            });\n            this._handleEscapeKey = function (event) {\n                if (event.key === 'Escape') {\n                    // if 'Escape' key is pressed\n                    if (_this.isVisible()) {\n                        // if the Drawer is visible\n                        _this.hide(); // hide the Drawer\n                    }\n                }\n            };\n            // add keyboard event listener to document\n            document.addEventListener('keydown', this._handleEscapeKey);\n            this._initialized = true;\n        }\n    };\n    Drawer.prototype.destroy = function () {\n        if (this._initialized) {\n            this.removeAllEventListenerInstances();\n            this._destroyBackdropEl();\n            // Remove the keyboard event listener\n            document.removeEventListener('keydown', this._handleEscapeKey);\n            this._initialized = false;\n        }\n    };\n    Drawer.prototype.removeInstance = function () {\n        instances.removeInstance('Drawer', this._instanceId);\n    };\n    Drawer.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Drawer.prototype.hide = function () {\n        var _this = this;\n        // based on the edge option show placement classes\n        if (this._options.edge) {\n            this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) {\n                _this._targetEl.classList.remove(c);\n            });\n            this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) {\n                _this._targetEl.classList.add(c);\n            });\n        }\n        else {\n            this._getPlacementClasses(this._options.placement).active.map(function (c) {\n                _this._targetEl.classList.remove(c);\n            });\n            this._getPlacementClasses(this._options.placement).inactive.map(function (c) {\n                _this._targetEl.classList.add(c);\n            });\n        }\n        // set accessibility attributes\n        this._targetEl.setAttribute('aria-hidden', 'true');\n        this._targetEl.removeAttribute('aria-modal');\n        this._targetEl.removeAttribute('role');\n        // enable body scroll\n        if (!this._options.bodyScrolling) {\n            document.body.classList.remove('overflow-hidden');\n        }\n        // destroy backdrop\n        if (this._options.backdrop) {\n            this._destroyBackdropEl();\n        }\n        this._visible = false;\n        // callback function\n        this._options.onHide(this);\n    };\n    Drawer.prototype.show = function () {\n        var _this = this;\n        if (this._options.edge) {\n            this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) {\n                _this._targetEl.classList.add(c);\n            });\n            this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) {\n                _this._targetEl.classList.remove(c);\n            });\n        }\n        else {\n            this._getPlacementClasses(this._options.placement).active.map(function (c) {\n                _this._targetEl.classList.add(c);\n            });\n            this._getPlacementClasses(this._options.placement).inactive.map(function (c) {\n                _this._targetEl.classList.remove(c);\n            });\n        }\n        // set accessibility attributes\n        this._targetEl.setAttribute('aria-modal', 'true');\n        this._targetEl.setAttribute('role', 'dialog');\n        this._targetEl.removeAttribute('aria-hidden');\n        // disable body scroll\n        if (!this._options.bodyScrolling) {\n            document.body.classList.add('overflow-hidden');\n        }\n        // show backdrop\n        if (this._options.backdrop) {\n            this._createBackdrop();\n        }\n        this._visible = true;\n        // callback function\n        this._options.onShow(this);\n    };\n    Drawer.prototype.toggle = function () {\n        if (this.isVisible()) {\n            this.hide();\n        }\n        else {\n            this.show();\n        }\n    };\n    Drawer.prototype._createBackdrop = function () {\n        var _a;\n        var _this = this;\n        if (!this._visible) {\n            var backdropEl = document.createElement('div');\n            backdropEl.setAttribute('drawer-backdrop', '');\n            (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' '));\n            document.querySelector('body').append(backdropEl);\n            backdropEl.addEventListener('click', function () {\n                _this.hide();\n            });\n        }\n    };\n    Drawer.prototype._destroyBackdropEl = function () {\n        if (this._visible &&\n            document.querySelector('[drawer-backdrop]') !== null) {\n            document.querySelector('[drawer-backdrop]').remove();\n        }\n    };\n    Drawer.prototype._getPlacementClasses = function (placement) {\n        switch (placement) {\n            case 'top':\n                return {\n                    base: ['top-0', 'left-0', 'right-0'],\n                    active: ['transform-none'],\n                    inactive: ['-translate-y-full'],\n                };\n            case 'right':\n                return {\n                    base: ['right-0', 'top-0'],\n                    active: ['transform-none'],\n                    inactive: ['translate-x-full'],\n                };\n            case 'bottom':\n                return {\n                    base: ['bottom-0', 'left-0', 'right-0'],\n                    active: ['transform-none'],\n                    inactive: ['translate-y-full'],\n                };\n            case 'left':\n                return {\n                    base: ['left-0', 'top-0'],\n                    active: ['transform-none'],\n                    inactive: ['-translate-x-full'],\n                };\n            case 'bottom-edge':\n                return {\n                    base: ['left-0', 'top-0'],\n                    active: ['transform-none'],\n                    inactive: ['translate-y-full', this._options.edgeOffset],\n                };\n            default:\n                return {\n                    base: ['left-0', 'top-0'],\n                    active: ['transform-none'],\n                    inactive: ['-translate-x-full'],\n                };\n        }\n    };\n    Drawer.prototype.isHidden = function () {\n        return !this._visible;\n    };\n    Drawer.prototype.isVisible = function () {\n        return this._visible;\n    };\n    Drawer.prototype.addEventListenerInstance = function (element, type, handler) {\n        this._eventListenerInstances.push({\n            element: element,\n            type: type,\n            handler: handler,\n        });\n    };\n    Drawer.prototype.removeAllEventListenerInstances = function () {\n        this._eventListenerInstances.map(function (eventListenerInstance) {\n            eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler);\n        });\n        this._eventListenerInstances = [];\n    };\n    Drawer.prototype.getAllEventListenerInstances = function () {\n        return this._eventListenerInstances;\n    };\n    Drawer.prototype.updateOnShow = function (callback) {\n        this._options.onShow = callback;\n    };\n    Drawer.prototype.updateOnHide = function (callback) {\n        this._options.onHide = callback;\n    };\n    Drawer.prototype.updateOnToggle = function (callback) {\n        this._options.onToggle = callback;\n    };\n    return Drawer;\n}());\nexport function initDrawers() {\n    document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) {\n        // mandatory\n        var drawerId = $triggerEl.getAttribute('data-drawer-target');\n        var $drawerEl = document.getElementById(drawerId);\n        if ($drawerEl) {\n            var placement = $triggerEl.getAttribute('data-drawer-placement');\n            var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling');\n            var backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n            var edge = $triggerEl.getAttribute('data-drawer-edge');\n            var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset');\n            new Drawer($drawerEl, {\n                placement: placement ? placement : Default.placement,\n                bodyScrolling: bodyScrolling\n                    ? bodyScrolling === 'true'\n                        ? true\n                        : false\n                    : Default.bodyScrolling,\n                backdrop: backdrop\n                    ? backdrop === 'true'\n                        ? true\n                        : false\n                    : Default.backdrop,\n                edge: edge ? (edge === 'true' ? true : false) : Default.edge,\n                edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset,\n            });\n        }\n        else {\n            console.error(\"Drawer with id \".concat(drawerId, \" not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?\"));\n        }\n    });\n    document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) {\n        var drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n        var $drawerEl = document.getElementById(drawerId);\n        if ($drawerEl) {\n            var drawer_1 = instances.getInstance('Drawer', drawerId);\n            if (drawer_1) {\n                var toggleDrawer = function () {\n                    drawer_1.toggle();\n                };\n                $triggerEl.addEventListener('click', toggleDrawer);\n                drawer_1.addEventListenerInstance($triggerEl, 'click', toggleDrawer);\n            }\n            else {\n                console.error(\"Drawer with id \".concat(drawerId, \" has not been initialized. Please initialize it using the data-drawer-target attribute.\"));\n            }\n        }\n        else {\n            console.error(\"Drawer with id \".concat(drawerId, \" not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?\"));\n        }\n    });\n    document\n        .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n        .forEach(function ($triggerEl) {\n        var drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n            ? $triggerEl.getAttribute('data-drawer-dismiss')\n            : $triggerEl.getAttribute('data-drawer-hide');\n        var $drawerEl = document.getElementById(drawerId);\n        if ($drawerEl) {\n            var drawer_2 = instances.getInstance('Drawer', drawerId);\n            if (drawer_2) {\n                var hideDrawer = function () {\n                    drawer_2.hide();\n                };\n                $triggerEl.addEventListener('click', hideDrawer);\n                drawer_2.addEventListenerInstance($triggerEl, 'click', hideDrawer);\n            }\n            else {\n                console.error(\"Drawer with id \".concat(drawerId, \" has not been initialized. Please initialize it using the data-drawer-target attribute.\"));\n            }\n        }\n        else {\n            console.error(\"Drawer with id \".concat(drawerId, \" not found. Are you sure that the data-drawer-target attribute points to the correct drawer id\"));\n        }\n    });\n    document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) {\n        var drawerId = $triggerEl.getAttribute('data-drawer-show');\n        var $drawerEl = document.getElementById(drawerId);\n        if ($drawerEl) {\n            var drawer_3 = instances.getInstance('Drawer', drawerId);\n            if (drawer_3) {\n                var showDrawer = function () {\n                    drawer_3.show();\n                };\n                $triggerEl.addEventListener('click', showDrawer);\n                drawer_3.addEventListenerInstance($triggerEl, 'click', showDrawer);\n            }\n            else {\n                console.error(\"Drawer with id \".concat(drawerId, \" has not been initialized. Please initialize it using the data-drawer-target attribute.\"));\n            }\n        }\n        else {\n            console.error(\"Drawer with id \".concat(drawerId, \" not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?\"));\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Drawer = Drawer;\n    window.initDrawers = initDrawers;\n}\nexport default Drawer;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nvar Default = {\n    defaultTabId: null,\n    activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n    inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n    onShow: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Tabs = /** @class */ (function () {\n    function Tabs(tabsEl, items, options, instanceOptions) {\n        if (tabsEl === void 0) { tabsEl = null; }\n        if (items === void 0) { items = []; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id;\n        this._tabsEl = tabsEl;\n        this._items = items;\n        this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n        this._options = __assign(__assign({}, Default), options);\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Tabs', this, this._instanceId, instanceOptions.override);\n    }\n    Tabs.prototype.init = function () {\n        var _this = this;\n        if (this._items.length && !this._initialized) {\n            // set the first tab as active if not set by explicitly\n            if (!this._activeTab) {\n                this.setActiveTab(this._items[0]);\n            }\n            // force show the first default tab\n            this.show(this._activeTab.id, true);\n            // show tab content based on click\n            this._items.map(function (tab) {\n                tab.triggerEl.addEventListener('click', function (event) {\n                    event.preventDefault();\n                    _this.show(tab.id);\n                });\n            });\n        }\n    };\n    Tabs.prototype.destroy = function () {\n        if (this._initialized) {\n            this._initialized = false;\n        }\n    };\n    Tabs.prototype.removeInstance = function () {\n        this.destroy();\n        instances.removeInstance('Tabs', this._instanceId);\n    };\n    Tabs.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Tabs.prototype.getActiveTab = function () {\n        return this._activeTab;\n    };\n    Tabs.prototype.setActiveTab = function (tab) {\n        this._activeTab = tab;\n    };\n    Tabs.prototype.getTab = function (id) {\n        return this._items.filter(function (t) { return t.id === id; })[0];\n    };\n    Tabs.prototype.show = function (id, forceShow) {\n        var _a, _b;\n        var _this = this;\n        if (forceShow === void 0) { forceShow = false; }\n        var tab = this.getTab(id);\n        // don't do anything if already active\n        if (tab === this._activeTab && !forceShow) {\n            return;\n        }\n        // hide other tabs\n        this._items.map(function (t) {\n            var _a, _b;\n            if (t !== tab) {\n                (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' '));\n                (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' '));\n                t.targetEl.classList.add('hidden');\n                t.triggerEl.setAttribute('aria-selected', 'false');\n            }\n        });\n        // show active tab\n        (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' '));\n        (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' '));\n        tab.triggerEl.setAttribute('aria-selected', 'true');\n        tab.targetEl.classList.remove('hidden');\n        this.setActiveTab(tab);\n        // callback function\n        this._options.onShow(this, tab);\n    };\n    Tabs.prototype.updateOnShow = function (callback) {\n        this._options.onShow = callback;\n    };\n    return Tabs;\n}());\nexport function initTabs() {\n    document.querySelectorAll('[data-tabs-toggle]').forEach(function ($parentEl) {\n        var tabItems = [];\n        var activeClasses = $parentEl.getAttribute('data-tabs-active-classes');\n        var inactiveClasses = $parentEl.getAttribute('data-tabs-inactive-classes');\n        var defaultTabId = null;\n        $parentEl\n            .querySelectorAll('[role=\"tab\"]')\n            .forEach(function ($triggerEl) {\n            var isActive = $triggerEl.getAttribute('aria-selected') === 'true';\n            var tab = {\n                id: $triggerEl.getAttribute('data-tabs-target'),\n                triggerEl: $triggerEl,\n                targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')),\n            };\n            tabItems.push(tab);\n            if (isActive) {\n                defaultTabId = tab.id;\n            }\n        });\n        new Tabs($parentEl, tabItems, {\n            defaultTabId: defaultTabId,\n            activeClasses: activeClasses\n                ? activeClasses\n                : Default.activeClasses,\n            inactiveClasses: inactiveClasses\n                ? inactiveClasses\n                : Default.inactiveClasses,\n        });\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Tabs = Tabs;\n    window.initTabs = initTabs;\n}\nexport default Tabs;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport instances from '../../dom/instances';\nvar Default = {\n    placement: 'top',\n    triggerType: 'hover',\n    onShow: function () { },\n    onHide: function () { },\n    onToggle: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Tooltip = /** @class */ (function () {\n    function Tooltip(targetEl, triggerEl, options, instanceOptions) {\n        if (targetEl === void 0) { targetEl = null; }\n        if (triggerEl === void 0) { triggerEl = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = __assign(__assign({}, Default), options);\n        this._popperInstance = null;\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Tooltip', this, this._instanceId, instanceOptions.override);\n    }\n    Tooltip.prototype.init = function () {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._setupEventListeners();\n            this._popperInstance = this._createPopperInstance();\n            this._initialized = true;\n        }\n    };\n    Tooltip.prototype.destroy = function () {\n        var _this = this;\n        if (this._initialized) {\n            // remove event listeners associated with the trigger element\n            var triggerEvents = this._getTriggerEvents();\n            triggerEvents.showEvents.forEach(function (ev) {\n                _this._triggerEl.removeEventListener(ev, _this._showHandler);\n            });\n            triggerEvents.hideEvents.forEach(function (ev) {\n                _this._triggerEl.removeEventListener(ev, _this._hideHandler);\n            });\n            // remove event listeners for keydown\n            this._removeKeydownListener();\n            // remove event listeners for click outside\n            this._removeClickOutsideListener();\n            // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n            if (this._popperInstance) {\n                this._popperInstance.destroy();\n            }\n            this._initialized = false;\n        }\n    };\n    Tooltip.prototype.removeInstance = function () {\n        instances.removeInstance('Tooltip', this._instanceId);\n    };\n    Tooltip.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Tooltip.prototype._setupEventListeners = function () {\n        var _this = this;\n        var triggerEvents = this._getTriggerEvents();\n        this._showHandler = function () {\n            _this.show();\n        };\n        this._hideHandler = function () {\n            _this.hide();\n        };\n        triggerEvents.showEvents.forEach(function (ev) {\n            _this._triggerEl.addEventListener(ev, _this._showHandler);\n        });\n        triggerEvents.hideEvents.forEach(function (ev) {\n            _this._triggerEl.addEventListener(ev, _this._hideHandler);\n        });\n    };\n    Tooltip.prototype._createPopperInstance = function () {\n        return createPopper(this._triggerEl, this._targetEl, {\n            placement: this._options.placement,\n            modifiers: [\n                {\n                    name: 'offset',\n                    options: {\n                        offset: [0, 8],\n                    },\n                },\n            ],\n        });\n    };\n    Tooltip.prototype._getTriggerEvents = function () {\n        switch (this._options.triggerType) {\n            case 'hover':\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n            case 'click':\n                return {\n                    showEvents: ['click', 'focus'],\n                    hideEvents: ['focusout', 'blur'],\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: [],\n                };\n            default:\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n        }\n    };\n    Tooltip.prototype._setupKeydownListener = function () {\n        var _this = this;\n        this._keydownEventListener = function (ev) {\n            if (ev.key === 'Escape') {\n                _this.hide();\n            }\n        };\n        document.body.addEventListener('keydown', this._keydownEventListener, true);\n    };\n    Tooltip.prototype._removeKeydownListener = function () {\n        document.body.removeEventListener('keydown', this._keydownEventListener, true);\n    };\n    Tooltip.prototype._setupClickOutsideListener = function () {\n        var _this = this;\n        this._clickOutsideEventListener = function (ev) {\n            _this._handleClickOutside(ev, _this._targetEl);\n        };\n        document.body.addEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Tooltip.prototype._removeClickOutsideListener = function () {\n        document.body.removeEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Tooltip.prototype._handleClickOutside = function (ev, targetEl) {\n        var clickedEl = ev.target;\n        if (clickedEl !== targetEl &&\n            !targetEl.contains(clickedEl) &&\n            !this._triggerEl.contains(clickedEl) &&\n            this.isVisible()) {\n            this.hide();\n        }\n    };\n    Tooltip.prototype.isVisible = function () {\n        return this._visible;\n    };\n    Tooltip.prototype.toggle = function () {\n        if (this.isVisible()) {\n            this.hide();\n        }\n        else {\n            this.show();\n        }\n    };\n    Tooltip.prototype.show = function () {\n        this._targetEl.classList.remove('opacity-0', 'invisible');\n        this._targetEl.classList.add('opacity-100', 'visible');\n        // Enable the event listeners\n        this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [\n                { name: 'eventListeners', enabled: true },\n            ], false) })); });\n        // handle click outside\n        this._setupClickOutsideListener();\n        // handle esc keydown\n        this._setupKeydownListener();\n        // Update its position\n        this._popperInstance.update();\n        // set visibility\n        this._visible = true;\n        // callback function\n        this._options.onShow(this);\n    };\n    Tooltip.prototype.hide = function () {\n        this._targetEl.classList.remove('opacity-100', 'visible');\n        this._targetEl.classList.add('opacity-0', 'invisible');\n        // Disable the event listeners\n        this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [\n                { name: 'eventListeners', enabled: false },\n            ], false) })); });\n        // handle click outside\n        this._removeClickOutsideListener();\n        // handle esc keydown\n        this._removeKeydownListener();\n        // set visibility\n        this._visible = false;\n        // callback function\n        this._options.onHide(this);\n    };\n    Tooltip.prototype.updateOnShow = function (callback) {\n        this._options.onShow = callback;\n    };\n    Tooltip.prototype.updateOnHide = function (callback) {\n        this._options.onHide = callback;\n    };\n    Tooltip.prototype.updateOnToggle = function (callback) {\n        this._options.onToggle = callback;\n    };\n    return Tooltip;\n}());\nexport function initTooltips() {\n    document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) {\n        var tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n        var $tooltipEl = document.getElementById(tooltipId);\n        if ($tooltipEl) {\n            var triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n            var placement = $triggerEl.getAttribute('data-tooltip-placement');\n            new Tooltip($tooltipEl, $triggerEl, {\n                placement: placement ? placement : Default.placement,\n                triggerType: triggerType\n                    ? triggerType\n                    : Default.triggerType,\n            });\n        }\n        else {\n            console.error(\"The tooltip element with id \\\"\".concat(tooltipId, \"\\\" does not exist. Please check the data-tooltip-target attribute.\"));\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Tooltip = Tooltip;\n    window.initTooltips = initTooltips;\n}\nexport default Tooltip;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport instances from '../../dom/instances';\nvar Default = {\n    placement: 'top',\n    offset: 10,\n    triggerType: 'hover',\n    onShow: function () { },\n    onHide: function () { },\n    onToggle: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Popover = /** @class */ (function () {\n    function Popover(targetEl, triggerEl, options, instanceOptions) {\n        if (targetEl === void 0) { targetEl = null; }\n        if (triggerEl === void 0) { triggerEl = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = __assign(__assign({}, Default), options);\n        this._popperInstance = null;\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Popover', this, instanceOptions.id ? instanceOptions.id : this._targetEl.id, instanceOptions.override);\n    }\n    Popover.prototype.init = function () {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._setupEventListeners();\n            this._popperInstance = this._createPopperInstance();\n            this._initialized = true;\n        }\n    };\n    Popover.prototype.destroy = function () {\n        var _this = this;\n        if (this._initialized) {\n            // remove event listeners associated with the trigger element and target element\n            var triggerEvents = this._getTriggerEvents();\n            triggerEvents.showEvents.forEach(function (ev) {\n                _this._triggerEl.removeEventListener(ev, _this._showHandler);\n                _this._targetEl.removeEventListener(ev, _this._showHandler);\n            });\n            triggerEvents.hideEvents.forEach(function (ev) {\n                _this._triggerEl.removeEventListener(ev, _this._hideHandler);\n                _this._targetEl.removeEventListener(ev, _this._hideHandler);\n            });\n            // remove event listeners for keydown\n            this._removeKeydownListener();\n            // remove event listeners for click outside\n            this._removeClickOutsideListener();\n            // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n            if (this._popperInstance) {\n                this._popperInstance.destroy();\n            }\n            this._initialized = false;\n        }\n    };\n    Popover.prototype.removeInstance = function () {\n        instances.removeInstance('Popover', this._instanceId);\n    };\n    Popover.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Popover.prototype._setupEventListeners = function () {\n        var _this = this;\n        var triggerEvents = this._getTriggerEvents();\n        this._showHandler = function () {\n            _this.show();\n        };\n        this._hideHandler = function () {\n            setTimeout(function () {\n                if (!_this._targetEl.matches(':hover')) {\n                    _this.hide();\n                }\n            }, 100);\n        };\n        triggerEvents.showEvents.forEach(function (ev) {\n            _this._triggerEl.addEventListener(ev, _this._showHandler);\n            _this._targetEl.addEventListener(ev, _this._showHandler);\n        });\n        triggerEvents.hideEvents.forEach(function (ev) {\n            _this._triggerEl.addEventListener(ev, _this._hideHandler);\n            _this._targetEl.addEventListener(ev, _this._hideHandler);\n        });\n    };\n    Popover.prototype._createPopperInstance = function () {\n        return createPopper(this._triggerEl, this._targetEl, {\n            placement: this._options.placement,\n            modifiers: [\n                {\n                    name: 'offset',\n                    options: {\n                        offset: [0, this._options.offset],\n                    },\n                },\n            ],\n        });\n    };\n    Popover.prototype._getTriggerEvents = function () {\n        switch (this._options.triggerType) {\n            case 'hover':\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n            case 'click':\n                return {\n                    showEvents: ['click', 'focus'],\n                    hideEvents: ['focusout', 'blur'],\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: [],\n                };\n            default:\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n        }\n    };\n    Popover.prototype._setupKeydownListener = function () {\n        var _this = this;\n        this._keydownEventListener = function (ev) {\n            if (ev.key === 'Escape') {\n                _this.hide();\n            }\n        };\n        document.body.addEventListener('keydown', this._keydownEventListener, true);\n    };\n    Popover.prototype._removeKeydownListener = function () {\n        document.body.removeEventListener('keydown', this._keydownEventListener, true);\n    };\n    Popover.prototype._setupClickOutsideListener = function () {\n        var _this = this;\n        this._clickOutsideEventListener = function (ev) {\n            _this._handleClickOutside(ev, _this._targetEl);\n        };\n        document.body.addEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Popover.prototype._removeClickOutsideListener = function () {\n        document.body.removeEventListener('click', this._clickOutsideEventListener, true);\n    };\n    Popover.prototype._handleClickOutside = function (ev, targetEl) {\n        var clickedEl = ev.target;\n        if (clickedEl !== targetEl &&\n            !targetEl.contains(clickedEl) &&\n            !this._triggerEl.contains(clickedEl) &&\n            this.isVisible()) {\n            this.hide();\n        }\n    };\n    Popover.prototype.isVisible = function () {\n        return this._visible;\n    };\n    Popover.prototype.toggle = function () {\n        if (this.isVisible()) {\n            this.hide();\n        }\n        else {\n            this.show();\n        }\n        this._options.onToggle(this);\n    };\n    Popover.prototype.show = function () {\n        this._targetEl.classList.remove('opacity-0', 'invisible');\n        this._targetEl.classList.add('opacity-100', 'visible');\n        // Enable the event listeners\n        this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [\n                { name: 'eventListeners', enabled: true },\n            ], false) })); });\n        // handle click outside\n        this._setupClickOutsideListener();\n        // handle esc keydown\n        this._setupKeydownListener();\n        // Update its position\n        this._popperInstance.update();\n        // set visibility to true\n        this._visible = true;\n        // callback function\n        this._options.onShow(this);\n    };\n    Popover.prototype.hide = function () {\n        this._targetEl.classList.remove('opacity-100', 'visible');\n        this._targetEl.classList.add('opacity-0', 'invisible');\n        // Disable the event listeners\n        this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [\n                { name: 'eventListeners', enabled: false },\n            ], false) })); });\n        // handle click outside\n        this._removeClickOutsideListener();\n        // handle esc keydown\n        this._removeKeydownListener();\n        // set visibility to false\n        this._visible = false;\n        // callback function\n        this._options.onHide(this);\n    };\n    Popover.prototype.updateOnShow = function (callback) {\n        this._options.onShow = callback;\n    };\n    Popover.prototype.updateOnHide = function (callback) {\n        this._options.onHide = callback;\n    };\n    Popover.prototype.updateOnToggle = function (callback) {\n        this._options.onToggle = callback;\n    };\n    return Popover;\n}());\nexport function initPopovers() {\n    document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) {\n        var popoverID = $triggerEl.getAttribute('data-popover-target');\n        var $popoverEl = document.getElementById(popoverID);\n        if ($popoverEl) {\n            var triggerType = $triggerEl.getAttribute('data-popover-trigger');\n            var placement = $triggerEl.getAttribute('data-popover-placement');\n            var offset = $triggerEl.getAttribute('data-popover-offset');\n            new Popover($popoverEl, $triggerEl, {\n                placement: placement ? placement : Default.placement,\n                offset: offset ? parseInt(offset) : Default.offset,\n                triggerType: triggerType\n                    ? triggerType\n                    : Default.triggerType,\n            });\n        }\n        else {\n            console.error(\"The popover element with id \\\"\".concat(popoverID, \"\\\" does not exist. Please check the data-popover-target attribute.\"));\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Popover = Popover;\n    window.initPopovers = initPopovers;\n}\nexport default Popover;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nvar Default = {\n    triggerType: 'hover',\n    onShow: function () { },\n    onHide: function () { },\n    onToggle: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Dial = /** @class */ (function () {\n    function Dial(parentEl, triggerEl, targetEl, options, instanceOptions) {\n        if (parentEl === void 0) { parentEl = null; }\n        if (triggerEl === void 0) { triggerEl = null; }\n        if (targetEl === void 0) { targetEl = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._parentEl = parentEl;\n        this._triggerEl = triggerEl;\n        this._targetEl = targetEl;\n        this._options = __assign(__assign({}, Default), options);\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Dial', this, this._instanceId, instanceOptions.override);\n    }\n    Dial.prototype.init = function () {\n        var _this = this;\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType);\n            this._showEventHandler = function () {\n                _this.show();\n            };\n            triggerEventTypes.showEvents.forEach(function (ev) {\n                _this._triggerEl.addEventListener(ev, _this._showEventHandler);\n                _this._targetEl.addEventListener(ev, _this._showEventHandler);\n            });\n            this._hideEventHandler = function () {\n                if (!_this._parentEl.matches(':hover')) {\n                    _this.hide();\n                }\n            };\n            triggerEventTypes.hideEvents.forEach(function (ev) {\n                _this._parentEl.addEventListener(ev, _this._hideEventHandler);\n            });\n            this._initialized = true;\n        }\n    };\n    Dial.prototype.destroy = function () {\n        var _this = this;\n        if (this._initialized) {\n            var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType);\n            triggerEventTypes.showEvents.forEach(function (ev) {\n                _this._triggerEl.removeEventListener(ev, _this._showEventHandler);\n                _this._targetEl.removeEventListener(ev, _this._showEventHandler);\n            });\n            triggerEventTypes.hideEvents.forEach(function (ev) {\n                _this._parentEl.removeEventListener(ev, _this._hideEventHandler);\n            });\n            this._initialized = false;\n        }\n    };\n    Dial.prototype.removeInstance = function () {\n        instances.removeInstance('Dial', this._instanceId);\n    };\n    Dial.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Dial.prototype.hide = function () {\n        this._targetEl.classList.add('hidden');\n        if (this._triggerEl) {\n            this._triggerEl.setAttribute('aria-expanded', 'false');\n        }\n        this._visible = false;\n        // callback function\n        this._options.onHide(this);\n    };\n    Dial.prototype.show = function () {\n        this._targetEl.classList.remove('hidden');\n        if (this._triggerEl) {\n            this._triggerEl.setAttribute('aria-expanded', 'true');\n        }\n        this._visible = true;\n        // callback function\n        this._options.onShow(this);\n    };\n    Dial.prototype.toggle = function () {\n        if (this._visible) {\n            this.hide();\n        }\n        else {\n            this.show();\n        }\n    };\n    Dial.prototype.isHidden = function () {\n        return !this._visible;\n    };\n    Dial.prototype.isVisible = function () {\n        return this._visible;\n    };\n    Dial.prototype._getTriggerEventTypes = function (triggerType) {\n        switch (triggerType) {\n            case 'hover':\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n            case 'click':\n                return {\n                    showEvents: ['click', 'focus'],\n                    hideEvents: ['focusout', 'blur'],\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: [],\n                };\n            default:\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n        }\n    };\n    Dial.prototype.updateOnShow = function (callback) {\n        this._options.onShow = callback;\n    };\n    Dial.prototype.updateOnHide = function (callback) {\n        this._options.onHide = callback;\n    };\n    Dial.prototype.updateOnToggle = function (callback) {\n        this._options.onToggle = callback;\n    };\n    return Dial;\n}());\nexport function initDials() {\n    document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) {\n        var $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n        if ($triggerEl) {\n            var dialId = $triggerEl.getAttribute('data-dial-toggle');\n            var $dialEl = document.getElementById(dialId);\n            if ($dialEl) {\n                var triggerType = $triggerEl.getAttribute('data-dial-trigger');\n                new Dial($parentEl, $triggerEl, $dialEl, {\n                    triggerType: triggerType\n                        ? triggerType\n                        : Default.triggerType,\n                });\n            }\n            else {\n                console.error(\"Dial with id \".concat(dialId, \" does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?\"));\n            }\n        }\n        else {\n            console.error(\"Dial with id \".concat($parentEl.id, \" does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?\"));\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Dial = Dial;\n    window.initDials = initDials;\n}\nexport default Dial;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nvar Default = {\n    minValue: null,\n    maxValue: null,\n    onIncrement: function () { },\n    onDecrement: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar InputCounter = /** @class */ (function () {\n    function InputCounter(targetEl, incrementEl, decrementEl, options, instanceOptions) {\n        if (targetEl === void 0) { targetEl = null; }\n        if (incrementEl === void 0) { incrementEl = null; }\n        if (decrementEl === void 0) { decrementEl = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._incrementEl = incrementEl;\n        this._decrementEl = decrementEl;\n        this._options = __assign(__assign({}, Default), options);\n        this._initialized = false;\n        this.init();\n        instances.addInstance('InputCounter', this, this._instanceId, instanceOptions.override);\n    }\n    InputCounter.prototype.init = function () {\n        var _this = this;\n        if (this._targetEl && !this._initialized) {\n            this._inputHandler = function (event) {\n                {\n                    var target = event.target;\n                    // check if the value is numeric\n                    if (!/^\\d*$/.test(target.value)) {\n                        // Regex to check if the value is numeric\n                        target.value = target.value.replace(/[^\\d]/g, ''); // Remove non-numeric characters\n                    }\n                    // check for max value\n                    if (_this._options.maxValue !== null &&\n                        parseInt(target.value) > _this._options.maxValue) {\n                        target.value = _this._options.maxValue.toString();\n                    }\n                    // check for min value\n                    if (_this._options.minValue !== null &&\n                        parseInt(target.value) < _this._options.minValue) {\n                        target.value = _this._options.minValue.toString();\n                    }\n                }\n            };\n            this._incrementClickHandler = function () {\n                _this.increment();\n            };\n            this._decrementClickHandler = function () {\n                _this.decrement();\n            };\n            // Add event listener to restrict input to numeric values only\n            this._targetEl.addEventListener('input', this._inputHandler);\n            if (this._incrementEl) {\n                this._incrementEl.addEventListener('click', this._incrementClickHandler);\n            }\n            if (this._decrementEl) {\n                this._decrementEl.addEventListener('click', this._decrementClickHandler);\n            }\n            this._initialized = true;\n        }\n    };\n    InputCounter.prototype.destroy = function () {\n        if (this._targetEl && this._initialized) {\n            this._targetEl.removeEventListener('input', this._inputHandler);\n            if (this._incrementEl) {\n                this._incrementEl.removeEventListener('click', this._incrementClickHandler);\n            }\n            if (this._decrementEl) {\n                this._decrementEl.removeEventListener('click', this._decrementClickHandler);\n            }\n            this._initialized = false;\n        }\n    };\n    InputCounter.prototype.removeInstance = function () {\n        instances.removeInstance('InputCounter', this._instanceId);\n    };\n    InputCounter.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    InputCounter.prototype.getCurrentValue = function () {\n        return parseInt(this._targetEl.value) || 0;\n    };\n    InputCounter.prototype.increment = function () {\n        // don't increment if the value is already at the maximum value\n        if (this._options.maxValue !== null &&\n            this.getCurrentValue() >= this._options.maxValue) {\n            return;\n        }\n        this._targetEl.value = (this.getCurrentValue() + 1).toString();\n        this._options.onIncrement(this);\n    };\n    InputCounter.prototype.decrement = function () {\n        // don't decrement if the value is already at the minimum value\n        if (this._options.minValue !== null &&\n            this.getCurrentValue() <= this._options.minValue) {\n            return;\n        }\n        this._targetEl.value = (this.getCurrentValue() - 1).toString();\n        this._options.onDecrement(this);\n    };\n    InputCounter.prototype.updateOnIncrement = function (callback) {\n        this._options.onIncrement = callback;\n    };\n    InputCounter.prototype.updateOnDecrement = function (callback) {\n        this._options.onDecrement = callback;\n    };\n    return InputCounter;\n}());\nexport function initInputCounters() {\n    document.querySelectorAll('[data-input-counter]').forEach(function ($targetEl) {\n        var targetId = $targetEl.id;\n        var $incrementEl = document.querySelector('[data-input-counter-increment=\"' + targetId + '\"]');\n        var $decrementEl = document.querySelector('[data-input-counter-decrement=\"' + targetId + '\"]');\n        var minValue = $targetEl.getAttribute('data-input-counter-min');\n        var maxValue = $targetEl.getAttribute('data-input-counter-max');\n        // check if the target element exists\n        if ($targetEl) {\n            if (!instances.instanceExists('InputCounter', $targetEl.getAttribute('id'))) {\n                new InputCounter($targetEl, $incrementEl ? $incrementEl : null, $decrementEl ? $decrementEl : null, {\n                    minValue: minValue ? parseInt(minValue) : null,\n                    maxValue: maxValue ? parseInt(maxValue) : null,\n                });\n            }\n        }\n        else {\n            console.error(\"The target element with id \\\"\".concat(targetId, \"\\\" does not exist. Please check the data-input-counter attribute.\"));\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.InputCounter = InputCounter;\n    window.initInputCounters = initInputCounters;\n}\nexport default InputCounter;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nvar Default = {\n    htmlEntities: false,\n    contentType: 'input',\n    onCopy: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar CopyClipboard = /** @class */ (function () {\n    function CopyClipboard(triggerEl, targetEl, options, instanceOptions) {\n        if (triggerEl === void 0) { triggerEl = null; }\n        if (targetEl === void 0) { targetEl = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._triggerEl = triggerEl;\n        this._targetEl = targetEl;\n        this._options = __assign(__assign({}, Default), options);\n        this._initialized = false;\n        this.init();\n        instances.addInstance('CopyClipboard', this, this._instanceId, instanceOptions.override);\n    }\n    CopyClipboard.prototype.init = function () {\n        var _this = this;\n        if (this._targetEl && this._triggerEl && !this._initialized) {\n            this._triggerElClickHandler = function () {\n                _this.copy();\n            };\n            // clicking on the trigger element should copy the value of the target element\n            if (this._triggerEl) {\n                this._triggerEl.addEventListener('click', this._triggerElClickHandler);\n            }\n            this._initialized = true;\n        }\n    };\n    CopyClipboard.prototype.destroy = function () {\n        if (this._triggerEl && this._targetEl && this._initialized) {\n            if (this._triggerEl) {\n                this._triggerEl.removeEventListener('click', this._triggerElClickHandler);\n            }\n            this._initialized = false;\n        }\n    };\n    CopyClipboard.prototype.removeInstance = function () {\n        instances.removeInstance('CopyClipboard', this._instanceId);\n    };\n    CopyClipboard.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    CopyClipboard.prototype.getTargetValue = function () {\n        if (this._options.contentType === 'input') {\n            return this._targetEl.value;\n        }\n        if (this._options.contentType === 'innerHTML') {\n            return this._targetEl.innerHTML;\n        }\n        if (this._options.contentType === 'textContent') {\n            return this._targetEl.textContent.replace(/\\s+/g, ' ').trim();\n        }\n    };\n    CopyClipboard.prototype.copy = function () {\n        var textToCopy = this.getTargetValue();\n        // Check if HTMLEntities option is enabled\n        if (this._options.htmlEntities) {\n            // Encode the text using HTML entities\n            textToCopy = this.decodeHTML(textToCopy);\n        }\n        // Create a temporary textarea element\n        var tempTextArea = document.createElement('textarea');\n        tempTextArea.value = textToCopy;\n        document.body.appendChild(tempTextArea);\n        // Select the text inside the textarea and copy it to the clipboard\n        tempTextArea.select();\n        document.execCommand('copy');\n        // Remove the temporary textarea\n        document.body.removeChild(tempTextArea);\n        // Callback function\n        this._options.onCopy(this);\n        return textToCopy;\n    };\n    // Function to encode text into HTML entities\n    CopyClipboard.prototype.decodeHTML = function (html) {\n        var textarea = document.createElement('textarea');\n        textarea.innerHTML = html;\n        return textarea.textContent;\n    };\n    CopyClipboard.prototype.updateOnCopyCallback = function (callback) {\n        this._options.onCopy = callback;\n    };\n    return CopyClipboard;\n}());\nexport function initCopyClipboards() {\n    document\n        .querySelectorAll('[data-copy-to-clipboard-target]')\n        .forEach(function ($triggerEl) {\n        var targetId = $triggerEl.getAttribute('data-copy-to-clipboard-target');\n        var $targetEl = document.getElementById(targetId);\n        var contentType = $triggerEl.getAttribute('data-copy-to-clipboard-content-type');\n        var htmlEntities = $triggerEl.getAttribute('data-copy-to-clipboard-html-entities');\n        // check if the target element exists\n        if ($targetEl) {\n            if (!instances.instanceExists('CopyClipboard', $targetEl.getAttribute('id'))) {\n                new CopyClipboard($triggerEl, $targetEl, {\n                    htmlEntities: htmlEntities && htmlEntities === 'true'\n                        ? true\n                        : Default.htmlEntities,\n                    contentType: contentType\n                        ? contentType\n                        : Default.contentType,\n                });\n            }\n        }\n        else {\n            console.error(\"The target element with id \\\"\".concat(targetId, \"\\\" does not exist. Please check the data-copy-to-clipboard-target attribute.\"));\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.CopyClipboard = CopyClipboard;\n    window.initClipboards = initCopyClipboards;\n}\nexport default CopyClipboard;\n//# sourceMappingURL=index.js.map",null,"var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport instances from '../../dom/instances';\nimport { Datepicker as FlowbiteDatepicker, DateRangePicker as FlowbiteDateRangePicker, } from 'flowbite-datepicker';\nvar Default = {\n    defaultDatepickerId: null,\n    autohide: false,\n    format: 'mm/dd/yyyy',\n    maxDate: null,\n    minDate: null,\n    orientation: 'bottom',\n    buttons: false,\n    autoSelectToday: 0,\n    title: null,\n    language: 'en',\n    rangePicker: false,\n    onShow: function () { },\n    onHide: function () { },\n};\nvar DefaultInstanceOptions = {\n    id: null,\n    override: true,\n};\nvar Datepicker = /** @class */ (function () {\n    function Datepicker(datepickerEl, options, instanceOptions) {\n        if (datepickerEl === void 0) { datepickerEl = null; }\n        if (options === void 0) { options = Default; }\n        if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; }\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : datepickerEl.id;\n        this._datepickerEl = datepickerEl;\n        this._datepickerInstance = null;\n        this._options = __assign(__assign({}, Default), options);\n        this._initialized = false;\n        this.init();\n        instances.addInstance('Datepicker', this, this._instanceId, instanceOptions.override);\n    }\n    Datepicker.prototype.init = function () {\n        if (this._datepickerEl && !this._initialized) {\n            if (this._options.rangePicker) {\n                this._datepickerInstance = new FlowbiteDateRangePicker(this._datepickerEl, this._getDatepickerOptions(this._options));\n            }\n            else {\n                this._datepickerInstance = new FlowbiteDatepicker(this._datepickerEl, this._getDatepickerOptions(this._options));\n            }\n            this._initialized = true;\n        }\n    };\n    Datepicker.prototype.destroy = function () {\n        if (this._initialized) {\n            this._initialized = false;\n            this._datepickerInstance.destroy();\n        }\n    };\n    Datepicker.prototype.removeInstance = function () {\n        this.destroy();\n        instances.removeInstance('Datepicker', this._instanceId);\n    };\n    Datepicker.prototype.destroyAndRemoveInstance = function () {\n        this.destroy();\n        this.removeInstance();\n    };\n    Datepicker.prototype.getDatepickerInstance = function () {\n        return this._datepickerInstance;\n    };\n    Datepicker.prototype.getDate = function () {\n        if (this._options.rangePicker &&\n            this._datepickerInstance instanceof FlowbiteDateRangePicker) {\n            return this._datepickerInstance.getDates();\n        }\n        if (!this._options.rangePicker &&\n            this._datepickerInstance instanceof FlowbiteDatepicker) {\n            return this._datepickerInstance.getDate();\n        }\n    };\n    Datepicker.prototype.setDate = function (date) {\n        if (this._options.rangePicker &&\n            this._datepickerInstance instanceof FlowbiteDateRangePicker) {\n            return this._datepickerInstance.setDates(date);\n        }\n        if (!this._options.rangePicker &&\n            this._datepickerInstance instanceof FlowbiteDatepicker) {\n            return this._datepickerInstance.setDate(date);\n        }\n    };\n    Datepicker.prototype.show = function () {\n        this._datepickerInstance.show();\n        this._options.onShow(this);\n    };\n    Datepicker.prototype.hide = function () {\n        this._datepickerInstance.hide();\n        this._options.onHide(this);\n    };\n    Datepicker.prototype._getDatepickerOptions = function (options) {\n        var datepickerOptions = {};\n        if (options.buttons) {\n            datepickerOptions.todayBtn = true;\n            datepickerOptions.clearBtn = true;\n            if (options.autoSelectToday) {\n                datepickerOptions.todayBtnMode = 1;\n            }\n        }\n        if (options.autohide) {\n            datepickerOptions.autohide = true;\n        }\n        if (options.format) {\n            datepickerOptions.format = options.format;\n        }\n        if (options.maxDate) {\n            datepickerOptions.maxDate = options.maxDate;\n        }\n        if (options.minDate) {\n            datepickerOptions.minDate = options.minDate;\n        }\n        if (options.orientation) {\n            datepickerOptions.orientation = options.orientation;\n        }\n        if (options.title) {\n            datepickerOptions.title = options.title;\n        }\n        if (options.language) {\n            datepickerOptions.language = options.language;\n        }\n        return datepickerOptions;\n    };\n    Datepicker.prototype.updateOnShow = function (callback) {\n        this._options.onShow = callback;\n    };\n    Datepicker.prototype.updateOnHide = function (callback) {\n        this._options.onHide = callback;\n    };\n    return Datepicker;\n}());\nexport function initDatepickers() {\n    document\n        .querySelectorAll('[datepicker], [inline-datepicker], [date-rangepicker]')\n        .forEach(function ($datepickerEl) {\n        if ($datepickerEl) {\n            var buttons = $datepickerEl.hasAttribute('datepicker-buttons');\n            var autoselectToday = $datepickerEl.hasAttribute('datepicker-autoselect-today');\n            var autohide = $datepickerEl.hasAttribute('datepicker-autohide');\n            var format = $datepickerEl.getAttribute('datepicker-format');\n            var maxDate = $datepickerEl.getAttribute('datepicker-max-date');\n            var minDate = $datepickerEl.getAttribute('datepicker-min-date');\n            var orientation_1 = $datepickerEl.getAttribute('datepicker-orientation');\n            var title = $datepickerEl.getAttribute('datepicker-title');\n            var language = $datepickerEl.getAttribute('datepicker-language');\n            var rangePicker = $datepickerEl.hasAttribute('date-rangepicker');\n            new Datepicker($datepickerEl, {\n                buttons: buttons ? buttons : Default.buttons,\n                autoSelectToday: autoselectToday\n                    ? autoselectToday\n                    : Default.autoSelectToday,\n                autohide: autohide ? autohide : Default.autohide,\n                format: format ? format : Default.format,\n                maxDate: maxDate ? maxDate : Default.maxDate,\n                minDate: minDate ? minDate : Default.minDate,\n                orientation: orientation_1\n                    ? orientation_1\n                    : Default.orientation,\n                title: title ? title : Default.title,\n                language: language ? language : Default.language,\n                rangePicker: rangePicker\n                    ? rangePicker\n                    : Default.rangePicker,\n            });\n        }\n        else {\n            console.error(\"The datepicker element does not exist. Please check the datepicker attribute.\");\n        }\n    });\n}\nif (typeof window !== 'undefined') {\n    window.Datepicker = Datepicker;\n    window.initDatepickers = initDatepickers;\n}\nexport default Datepicker;\n//# sourceMappingURL=index.js.map",null,"function _arrayLikeToArray(r, a) {\n  (null == a || a > r.length) && (a = r.length);\n  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n  return n;\n}\nfunction _arrayWithHoles(r) {\n  if (Array.isArray(r)) return r;\n}\nfunction _arrayWithoutHoles(r) {\n  if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _assertThisInitialized(e) {\n  if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  return e;\n}\nfunction _callSuper(t, o, e) {\n  return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nfunction _classCallCheck(a, n) {\n  if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(e, r) {\n  for (var t = 0; t < r.length; t++) {\n    var o = r[t];\n    o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);\n  }\n}\nfunction _createClass(e, r, t) {\n  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n    writable: !1\n  }), e;\n}\nfunction _get() {\n  return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {\n    var p = _superPropBase(e, t);\n    if (p) {\n      var n = Object.getOwnPropertyDescriptor(p, t);\n      return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n    }\n  }, _get.apply(null, arguments);\n}\nfunction _getPrototypeOf(t) {\n  return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n    return t.__proto__ || Object.getPrototypeOf(t);\n  }, _getPrototypeOf(t);\n}\nfunction _inherits(t, e) {\n  if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n  t.prototype = Object.create(e && e.prototype, {\n    constructor: {\n      value: t,\n      writable: !0,\n      configurable: !0\n    }\n  }), Object.defineProperty(t, \"prototype\", {\n    writable: !1\n  }), e && _setPrototypeOf(t, e);\n}\nfunction _isNativeReflectConstruct() {\n  try {\n    var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n  } catch (t) {}\n  return (_isNativeReflectConstruct = function () {\n    return !!t;\n  })();\n}\nfunction _iterableToArray(r) {\n  if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _iterableToArrayLimit(r, l) {\n  var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n  if (null != t) {\n    var e,\n      n,\n      i,\n      u,\n      a = [],\n      f = !0,\n      o = !1;\n    try {\n      if (i = (t = t.call(r)).next, 0 === l) {\n        if (Object(t) !== t) return;\n        f = !1;\n      } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n    } catch (r) {\n      o = !0, n = r;\n    } finally {\n      try {\n        if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n      } finally {\n        if (o) throw n;\n      }\n    }\n    return a;\n  }\n}\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possibleConstructorReturn(t, e) {\n  if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n  if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n  return _assertThisInitialized(t);\n}\nfunction _setPrototypeOf(t, e) {\n  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, _setPrototypeOf(t, e);\n}\nfunction _slicedToArray(r, e) {\n  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _superPropBase(t, o) {\n  for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););\n  return t;\n}\nfunction _toConsumableArray(r) {\n  return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n  if (\"object\" != typeof t || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != typeof i) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n  var i = _toPrimitive(t, \"string\");\n  return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, _typeof(o);\n}\nfunction _unsupportedIterableToArray(r, a) {\n  if (r) {\n    if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n    var t = {}.toString.call(r).slice(8, -1);\n    return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n  }\n}\n\nfunction hasProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction lastItemOf(arr) {\n  return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nfunction pushUnique(arr) {\n  for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    items[_key - 1] = arguments[_key];\n  }\n  items.forEach(function (item) {\n    if (arr.includes(item)) {\n      return;\n    }\n    arr.push(item);\n  });\n  return arr;\n}\nfunction stringToArray(str, separator) {\n  // convert empty string to an empty array\n  return str ? str.split(separator) : [];\n}\nfunction isInRange(testVal, min, max) {\n  var minOK = min === undefined || testVal >= min;\n  var maxOK = max === undefined || testVal <= max;\n  return minOK && maxOK;\n}\nfunction limitToRange(val, min, max) {\n  if (val < min) {\n    return min;\n  }\n  if (val > max) {\n    return max;\n  }\n  return val;\n}\nfunction createTagRepeat(tagName, repeat) {\n  var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n  var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n  var openTagSrc = Object.keys(attributes).reduce(function (src, attr) {\n    var val = attributes[attr];\n    if (typeof val === 'function') {\n      val = val(index);\n    }\n    return \"\".concat(src, \" \").concat(attr, \"=\\\"\").concat(val, \"\\\"\");\n  }, tagName);\n  html += \"<\".concat(openTagSrc, \"></\").concat(tagName, \">\");\n  var next = index + 1;\n  return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nfunction optimizeTemplateHTML(html) {\n  return html.replace(/>\\s+/g, '>').replace(/\\s+</, '<');\n}\n\nfunction stripTime(timeValue) {\n  return new Date(timeValue).setHours(0, 0, 0, 0);\n}\nfunction today() {\n  return new Date().setHours(0, 0, 0, 0);\n}\n\n// Get the time value of the start of given date or year, month and day\nfunction dateValue() {\n  switch (arguments.length) {\n    case 0:\n      return today();\n    case 1:\n      return stripTime(arguments.length <= 0 ? undefined : arguments[0]);\n  }\n\n  // use setFullYear() to keep 2-digit year from being mapped to 1900-1999\n  var newDate = new Date(0);\n  newDate.setFullYear.apply(newDate, arguments);\n  return newDate.setHours(0, 0, 0, 0);\n}\nfunction addDays(date, amount) {\n  var newDate = new Date(date);\n  return newDate.setDate(newDate.getDate() + amount);\n}\nfunction addWeeks(date, amount) {\n  return addDays(date, amount * 7);\n}\nfunction addMonths(date, amount) {\n  // If the day of the date is not in the new month, the last day of the new\n  // month will be returned. e.g. Jan 31 + 1 month → Feb 28 (not Mar 03)\n  var newDate = new Date(date);\n  var monthsToSet = newDate.getMonth() + amount;\n  var expectedMonth = monthsToSet % 12;\n  if (expectedMonth < 0) {\n    expectedMonth += 12;\n  }\n  var time = newDate.setMonth(monthsToSet);\n  return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time;\n}\nfunction addYears(date, amount) {\n  // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the\n  // new year will be returned.\n  var newDate = new Date(date);\n  var expectedMonth = newDate.getMonth();\n  var time = newDate.setFullYear(newDate.getFullYear() + amount);\n  return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time;\n}\n\n// Calculate the distance bettwen 2 days of the week\nfunction dayDiff(day, from) {\n  return (day - from + 7) % 7;\n}\n\n// Get the date of the specified day of the week of given base date\nfunction dayOfTheWeekOf(baseDate, dayOfWeek) {\n  var weekStart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n  var baseDay = new Date(baseDate).getDay();\n  return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nfunction getWeek(date) {\n  // start of ISO week is Monday\n  var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n  // 1st week == the week where the 4th of January is in\n  var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n  return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nfunction startOfYearPeriod(date, years) {\n  /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n  var year = new Date(date).getFullYear();\n  return Math.floor(year / years) * years;\n}\n\n// pattern for format parts\nvar reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nvar reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n// cache for persed formats\nvar knownFormats = {};\n// parse funtions for date parts\nvar parseFns = {\n  y: function y(date, year) {\n    return new Date(date).setFullYear(parseInt(year, 10));\n  },\n  m: function m(date, month, locale) {\n    var newDate = new Date(date);\n    var monthIndex = parseInt(month, 10) - 1;\n    if (isNaN(monthIndex)) {\n      if (!month) {\n        return NaN;\n      }\n      var monthName = month.toLowerCase();\n      var compareNames = function compareNames(name) {\n        return name.toLowerCase().startsWith(monthName);\n      };\n      // compare with both short and full names because some locales have periods\n      // in the short names (not equal to the first X letters of the full names)\n      monthIndex = locale.monthsShort.findIndex(compareNames);\n      if (monthIndex < 0) {\n        monthIndex = locale.months.findIndex(compareNames);\n      }\n      if (monthIndex < 0) {\n        return NaN;\n      }\n    }\n    newDate.setMonth(monthIndex);\n    return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime();\n  },\n  d: function d(date, day) {\n    return new Date(date).setDate(parseInt(day, 10));\n  }\n};\n// format functions for date parts\nvar formatFns = {\n  d: function d(date) {\n    return date.getDate();\n  },\n  dd: function dd(date) {\n    return padZero(date.getDate(), 2);\n  },\n  D: function D(date, locale) {\n    return locale.daysShort[date.getDay()];\n  },\n  DD: function DD(date, locale) {\n    return locale.days[date.getDay()];\n  },\n  m: function m(date) {\n    return date.getMonth() + 1;\n  },\n  mm: function mm(date) {\n    return padZero(date.getMonth() + 1, 2);\n  },\n  M: function M(date, locale) {\n    return locale.monthsShort[date.getMonth()];\n  },\n  MM: function MM(date, locale) {\n    return locale.months[date.getMonth()];\n  },\n  y: function y(date) {\n    return date.getFullYear();\n  },\n  yy: function yy(date) {\n    return padZero(date.getFullYear(), 2).slice(-2);\n  },\n  yyyy: function yyyy(date) {\n    return padZero(date.getFullYear(), 4);\n  }\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n  return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\nfunction padZero(num, length) {\n  return num.toString().padStart(length, '0');\n}\nfunction parseFormatString(format) {\n  if (typeof format !== 'string') {\n    throw new Error(\"Invalid date format.\");\n  }\n  if (format in knownFormats) {\n    return knownFormats[format];\n  }\n\n  // sprit the format string into parts and seprators\n  var separators = format.split(reFormatTokens);\n  var parts = format.match(new RegExp(reFormatTokens, 'g'));\n  if (separators.length === 0 || !parts) {\n    throw new Error(\"Invalid date format.\");\n  }\n\n  // collect format functions used in the format\n  var partFormatters = parts.map(function (token) {\n    return formatFns[token];\n  });\n\n  // collect parse function keys used in the format\n  // iterate over parseFns' keys in order to keep the order of the keys.\n  var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) {\n    var token = parts.find(function (part) {\n      return part[0] !== 'D' && part[0].toLowerCase() === key;\n    });\n    if (token) {\n      keys.push(key);\n    }\n    return keys;\n  }, []);\n  return knownFormats[format] = {\n    parser: function parser(dateStr, locale) {\n      var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) {\n        if (part.length > 0 && parts[index]) {\n          var token = parts[index][0];\n          if (token === 'M') {\n            dtParts.m = part;\n          } else if (token !== 'D') {\n            dtParts[token] = part;\n          }\n        }\n        return dtParts;\n      }, {});\n\n      // iterate over partParserkeys so that the parsing is made in the oder\n      // of year, month and day to prevent the day parser from correcting last\n      // day of month wrongly\n      return partParserKeys.reduce(function (origDate, key) {\n        var newDate = parseFns[key](origDate, dateParts[key], locale);\n        // ingnore the part failed to parse\n        return isNaN(newDate) ? origDate : newDate;\n      }, today());\n    },\n    formatter: function formatter(date, locale) {\n      var dateStr = partFormatters.reduce(function (str, fn, index) {\n        return str += \"\".concat(separators[index]).concat(fn(date, locale));\n      }, '');\n      // separators' length is always parts' length + 1,\n      return dateStr += lastItemOf(separators);\n    }\n  };\n}\nfunction parseDate(dateStr, format, locale) {\n  if (dateStr instanceof Date || typeof dateStr === 'number') {\n    var date = stripTime(dateStr);\n    return isNaN(date) ? undefined : date;\n  }\n  if (!dateStr) {\n    return undefined;\n  }\n  if (dateStr === 'today') {\n    return today();\n  }\n  if (format && format.toValue) {\n    var _date = format.toValue(dateStr, format, locale);\n    return isNaN(_date) ? undefined : stripTime(_date);\n  }\n  return parseFormatString(format).parser(dateStr, locale);\n}\nfunction formatDate(date, format, locale) {\n  if (isNaN(date) || !date && date !== 0) {\n    return '';\n  }\n  var dateObj = typeof date === 'number' ? new Date(date) : date;\n  if (format.toDisplay) {\n    return format.toDisplay(dateObj, format, locale);\n  }\n  return parseFormatString(format).formatter(dateObj, locale);\n}\n\nvar listenerRegistry = new WeakMap();\nvar _EventTarget$prototyp = EventTarget.prototype,\n  addEventListener = _EventTarget$prototyp.addEventListener,\n  removeEventListener = _EventTarget$prototyp.removeEventListener;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n//   - each definition must be a flat array of event target and the arguments\n//     used to call addEventListener() on the target\nfunction registerListeners(keyObj, listeners) {\n  var registered = listenerRegistry.get(keyObj);\n  if (!registered) {\n    registered = [];\n    listenerRegistry.set(keyObj, registered);\n  }\n  listeners.forEach(function (listener) {\n    addEventListener.call.apply(addEventListener, _toConsumableArray(listener));\n    registered.push(listener);\n  });\n}\nfunction unregisterListeners(keyObj) {\n  var listeners = listenerRegistry.get(keyObj);\n  if (!listeners) {\n    return;\n  }\n  listeners.forEach(function (listener) {\n    removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener));\n  });\n  listenerRegistry[\"delete\"](keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n  var getComposedPath = function getComposedPath(node) {\n    var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    path.push(node);\n    var parent;\n    if (node.parentNode) {\n      parent = node.parentNode;\n    } else if (node.host) {\n      // ShadowRoot\n      parent = node.host;\n    } else if (node.defaultView) {\n      // Document\n      parent = node.defaultView;\n    }\n    return parent ? getComposedPath(parent, path) : path;\n  };\n  Event.prototype.composedPath = function () {\n    return getComposedPath(this.target);\n  };\n}\nfunction findFromPath(path, criteria, currentTarget) {\n  var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n  var el = path[index];\n  if (criteria(el)) {\n    return el;\n  } else if (el === currentTarget || !el.parentElement) {\n    // stop when reaching currentTarget or <html>\n    return;\n  }\n  return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nfunction findElementInEventPath(ev, selector) {\n  var criteria = typeof selector === 'function' ? selector : function (el) {\n    return el.matches(selector);\n  };\n  return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n\n// default locales\nvar locales = {\n  en: {\n    days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n    daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n    daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n    months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n    monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n    today: \"Today\",\n    clear: \"Clear\",\n    titleFormat: \"MM y\"\n  }\n};\n\n// config options updatable by setOptions() and their default values\nvar defaultOptions = {\n  autohide: false,\n  beforeShowDay: null,\n  beforeShowDecade: null,\n  beforeShowMonth: null,\n  beforeShowYear: null,\n  calendarWeeks: false,\n  clearBtn: false,\n  dateDelimiter: ',',\n  datesDisabled: [],\n  daysOfWeekDisabled: [],\n  daysOfWeekHighlighted: [],\n  defaultViewDate: undefined,\n  // placeholder, defaults to today() by the program\n  disableTouchKeyboard: false,\n  format: 'mm/dd/yyyy',\n  language: 'en',\n  maxDate: null,\n  maxNumberOfDates: 1,\n  maxView: 3,\n  minDate: null,\n  nextArrow: '<svg class=\"w-4 h-4 rtl:rotate-180 text-gray-800 dark:text-white\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 14 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M1 5h12m0 0L9 1m4 4L9 9\"/></svg>',\n  orientation: 'auto',\n  pickLevel: 0,\n  prevArrow: '<svg class=\"w-4 h-4 rtl:rotate-180 text-gray-800 dark:text-white\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 14 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 5H1m0 0 4 4M1 5l4-4\"/></svg>',\n  showDaysOfWeek: true,\n  showOnClick: true,\n  showOnFocus: true,\n  startView: 0,\n  title: '',\n  todayBtn: false,\n  todayBtnMode: 0,\n  todayHighlight: false,\n  updateOnBlur: true,\n  weekStart: 0\n};\n\nvar range = null;\nfunction parseHTML(html) {\n  if (range == null) {\n    range = document.createRange();\n  }\n  return range.createContextualFragment(html);\n}\nfunction hideElement(el) {\n  if (el.style.display === 'none') {\n    return;\n  }\n  // back up the existing display setting in data-style-display\n  if (el.style.display) {\n    el.dataset.styleDisplay = el.style.display;\n  }\n  el.style.display = 'none';\n}\nfunction showElement(el) {\n  if (el.style.display !== 'none') {\n    return;\n  }\n  if (el.dataset.styleDisplay) {\n    // restore backed-up dispay property\n    el.style.display = el.dataset.styleDisplay;\n    delete el.dataset.styleDisplay;\n  } else {\n    el.style.display = '';\n  }\n}\nfunction emptyChildNodes(el) {\n  if (el.firstChild) {\n    el.removeChild(el.firstChild);\n    emptyChildNodes(el);\n  }\n}\nfunction replaceChildNodes(el, newChildNodes) {\n  emptyChildNodes(el);\n  if (newChildNodes instanceof DocumentFragment) {\n    el.appendChild(newChildNodes);\n  } else if (typeof newChildNodes === 'string') {\n    el.appendChild(parseHTML(newChildNodes));\n  } else if (typeof newChildNodes.forEach === 'function') {\n    newChildNodes.forEach(function (node) {\n      el.appendChild(node);\n    });\n  }\n}\n\nvar defaultLang = defaultOptions.language,\n  defaultFormat = defaultOptions.format,\n  defaultWeekStart = defaultOptions.weekStart;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n  return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow;\n}\nfunction calcEndOfWeek(startOfWeek) {\n  return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n  var date = parseDate(value, format, locale);\n  return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue) {\n  var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n  var viewId = parseInt(value, 10);\n  return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nfunction processOptions(options, datepicker) {\n  var inOpts = Object.assign({}, options);\n  var config = {};\n  var locales = datepicker.constructor.locales;\n  var _ref = datepicker.config || {},\n    format = _ref.format,\n    language = _ref.language,\n    locale = _ref.locale,\n    maxDate = _ref.maxDate,\n    maxView = _ref.maxView,\n    minDate = _ref.minDate,\n    pickLevel = _ref.pickLevel,\n    startView = _ref.startView,\n    weekStart = _ref.weekStart;\n  if (inOpts.language) {\n    var lang;\n    if (inOpts.language !== language) {\n      if (locales[inOpts.language]) {\n        lang = inOpts.language;\n      } else {\n        // Check if langauge + region tag can fallback to the one without\n        // region (e.g. fr-CA → fr)\n        lang = inOpts.language.split('-')[0];\n        if (locales[lang] === undefined) {\n          lang = false;\n        }\n      }\n    }\n    delete inOpts.language;\n    if (lang) {\n      language = config.language = lang;\n\n      // update locale as well when updating language\n      var origLocale = locale || locales[defaultLang];\n      // use default language's properties for the fallback\n      locale = Object.assign({\n        format: defaultFormat,\n        weekStart: defaultWeekStart\n      }, locales[defaultLang]);\n      if (language !== defaultLang) {\n        Object.assign(locale, locales[language]);\n      }\n      config.locale = locale;\n      // if format and/or weekStart are the same as old locale's defaults,\n      // update them to new locale's defaults\n      if (format === origLocale.format) {\n        format = config.format = locale.format;\n      }\n      if (weekStart === origLocale.weekStart) {\n        weekStart = config.weekStart = locale.weekStart;\n        config.weekEnd = calcEndOfWeek(locale.weekStart);\n      }\n    }\n  }\n  if (inOpts.format) {\n    var hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n    var hasToValue = typeof inOpts.format.toValue === 'function';\n    var validFormatString = reFormatTokens.test(inOpts.format);\n    if (hasToDisplay && hasToValue || validFormatString) {\n      format = config.format = inOpts.format;\n    }\n    delete inOpts.format;\n  }\n\n  //*** dates ***//\n  // while min and maxDate for \"no limit\" in the options are better to be null\n  // (especially when updating), the ones in the config have to be undefined\n  // because null is treated as 0 (= unix epoch) when comparing with time value\n  var minDt = minDate;\n  var maxDt = maxDate;\n  if (inOpts.minDate !== undefined) {\n    minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n    : validateDate(inOpts.minDate, format, locale, minDt);\n    delete inOpts.minDate;\n  }\n  if (inOpts.maxDate !== undefined) {\n    maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt);\n    delete inOpts.maxDate;\n  }\n  if (maxDt < minDt) {\n    minDate = config.minDate = maxDt;\n    maxDate = config.maxDate = minDt;\n  } else {\n    if (minDate !== minDt) {\n      minDate = config.minDate = minDt;\n    }\n    if (maxDate !== maxDt) {\n      maxDate = config.maxDate = maxDt;\n    }\n  }\n  if (inOpts.datesDisabled) {\n    config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) {\n      var date = parseDate(dt, format, locale);\n      return date !== undefined ? pushUnique(dates, date) : dates;\n    }, []);\n    delete inOpts.datesDisabled;\n  }\n  if (inOpts.defaultViewDate !== undefined) {\n    var viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n    if (viewDate !== undefined) {\n      config.defaultViewDate = viewDate;\n    }\n    delete inOpts.defaultViewDate;\n  }\n\n  //*** days of week ***//\n  if (inOpts.weekStart !== undefined) {\n    var wkStart = Number(inOpts.weekStart) % 7;\n    if (!isNaN(wkStart)) {\n      weekStart = config.weekStart = wkStart;\n      config.weekEnd = calcEndOfWeek(wkStart);\n    }\n    delete inOpts.weekStart;\n  }\n  if (inOpts.daysOfWeekDisabled) {\n    config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n    delete inOpts.daysOfWeekDisabled;\n  }\n  if (inOpts.daysOfWeekHighlighted) {\n    config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n    delete inOpts.daysOfWeekHighlighted;\n  }\n\n  //*** multi date ***//\n  if (inOpts.maxNumberOfDates !== undefined) {\n    var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n    if (maxNumberOfDates >= 0) {\n      config.maxNumberOfDates = maxNumberOfDates;\n      config.multidate = maxNumberOfDates !== 1;\n    }\n    delete inOpts.maxNumberOfDates;\n  }\n  if (inOpts.dateDelimiter) {\n    config.dateDelimiter = String(inOpts.dateDelimiter);\n    delete inOpts.dateDelimiter;\n  }\n\n  //*** pick level & view ***//\n  var newPickLevel = pickLevel;\n  if (inOpts.pickLevel !== undefined) {\n    newPickLevel = validateViewId(inOpts.pickLevel, 2);\n    delete inOpts.pickLevel;\n  }\n  if (newPickLevel !== pickLevel) {\n    pickLevel = config.pickLevel = newPickLevel;\n  }\n  var newMaxView = maxView;\n  if (inOpts.maxView !== undefined) {\n    newMaxView = validateViewId(inOpts.maxView, maxView);\n    delete inOpts.maxView;\n  }\n  // ensure max view >= pick level\n  newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n  if (newMaxView !== maxView) {\n    maxView = config.maxView = newMaxView;\n  }\n  var newStartView = startView;\n  if (inOpts.startView !== undefined) {\n    newStartView = validateViewId(inOpts.startView, newStartView);\n    delete inOpts.startView;\n  }\n  // ensure pick level <= start view <= max view\n  if (newStartView < pickLevel) {\n    newStartView = pickLevel;\n  } else if (newStartView > maxView) {\n    newStartView = maxView;\n  }\n  if (newStartView !== startView) {\n    config.startView = newStartView;\n  }\n\n  //*** template ***//\n  if (inOpts.prevArrow) {\n    var prevArrow = parseHTML(inOpts.prevArrow);\n    if (prevArrow.childNodes.length > 0) {\n      config.prevArrow = prevArrow.childNodes;\n    }\n    delete inOpts.prevArrow;\n  }\n  if (inOpts.nextArrow) {\n    var nextArrow = parseHTML(inOpts.nextArrow);\n    if (nextArrow.childNodes.length > 0) {\n      config.nextArrow = nextArrow.childNodes;\n    }\n    delete inOpts.nextArrow;\n  }\n\n  //*** misc ***//\n  if (inOpts.disableTouchKeyboard !== undefined) {\n    config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n    delete inOpts.disableTouchKeyboard;\n  }\n  if (inOpts.orientation) {\n    var orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n    config.orientation = {\n      x: orientation.find(function (x) {\n        return x === 'left' || x === 'right';\n      }) || 'auto',\n      y: orientation.find(function (y) {\n        return y === 'top' || y === 'bottom';\n      }) || 'auto'\n    };\n    delete inOpts.orientation;\n  }\n  if (inOpts.todayBtnMode !== undefined) {\n    switch (inOpts.todayBtnMode) {\n      case 0:\n      case 1:\n        config.todayBtnMode = inOpts.todayBtnMode;\n    }\n    delete inOpts.todayBtnMode;\n  }\n\n  //*** copy the rest ***//\n  Object.keys(inOpts).forEach(function (key) {\n    if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n      config[key] = inOpts[key];\n    }\n  });\n  return config;\n}\n\nvar pickerTemplate = optimizeTemplateHTML(\"<div class=\\\"datepicker hidden\\\">\\n  <div class=\\\"datepicker-picker inline-block rounded-lg bg-white dark:bg-gray-700 shadow-lg p-4\\\">\\n    <div class=\\\"datepicker-header\\\">\\n      <div class=\\\"datepicker-title bg-white dark:bg-gray-700 dark:text-white px-2 py-3 text-center font-semibold\\\"></div>\\n      <div class=\\\"datepicker-controls flex justify-between mb-2\\\">\\n        <button type=\\\"button\\\" class=\\\"bg-white dark:bg-gray-700 rounded-lg text-gray-500 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-white text-lg p-2.5 focus:outline-none focus:ring-2 focus:ring-gray-200 prev-btn\\\"></button>\\n        <button type=\\\"button\\\" class=\\\"text-sm rounded-lg text-gray-900 dark:text-white bg-white dark:bg-gray-700 font-semibold py-2.5 px-5 hover:bg-gray-100 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-200 view-switch\\\"></button>\\n        <button type=\\\"button\\\" class=\\\"bg-white dark:bg-gray-700 rounded-lg text-gray-500 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-white text-lg p-2.5 focus:outline-none focus:ring-2 focus:ring-gray-200 next-btn\\\"></button>\\n      </div>\\n    </div>\\n    <div class=\\\"datepicker-main p-1\\\"></div>\\n    <div class=\\\"datepicker-footer\\\">\\n      <div class=\\\"datepicker-controls flex space-x-2 rtl:space-x-reverse mt-2\\\">\\n        <button type=\\\"button\\\" class=\\\"%buttonClass% today-btn text-white bg-blue-700 !bg-primary-700 dark:bg-blue-600 dark:!bg-primary-600 hover:bg-blue-800 hover:!bg-primary-800 dark:hover:bg-blue-700 dark:hover:!bg-primary-700 focus:ring-4 focus:ring-blue-300 focus:!ring-primary-300 font-medium rounded-lg text-sm px-5 py-2 text-center w-1/2\\\"></button>\\n        <button type=\\\"button\\\" class=\\\"%buttonClass% clear-btn text-gray-900 dark:text-white bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600 focus:ring-4 focus:ring-blue-300 focus:!ring-primary-300 font-medium rounded-lg text-sm px-5 py-2 text-center w-1/2\\\"></button>\\n      </div>\\n    </div>\\n  </div>\\n</div>\");\n\nvar daysTemplate = optimizeTemplateHTML(\"<div class=\\\"days\\\">\\n  <div class=\\\"days-of-week grid grid-cols-7 mb-1\\\">\".concat(createTagRepeat('span', 7, {\n  \"class\": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"</div>\\n  <div class=\\\"datepicker-grid w-64 grid grid-cols-7\\\">\").concat(createTagRepeat('span', 42, {\n  \"class\": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'\n}), \"</div>\\n</div>\"));\n\nvar calendarWeeksTemplate = optimizeTemplateHTML(\"<div class=\\\"calendar-weeks\\\">\\n  <div class=\\\"days-of-week flex\\\"><span class=\\\"dow h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400\\\"></span></div>\\n  <div class=\\\"weeks\\\">\".concat(createTagRepeat('span', 6, {\n  \"class\": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"</div>\\n</div>\"));\n\n// Base class of the view classes\nvar View = /*#__PURE__*/function () {\n  function View(picker, config) {\n    _classCallCheck(this, View);\n    Object.assign(this, config, {\n      picker: picker,\n      element: parseHTML(\"<div class=\\\"datepicker-view flex\\\"></div>\").firstChild,\n      selected: []\n    });\n    this.init(this.picker.datepicker.config);\n  }\n  return _createClass(View, [{\n    key: \"init\",\n    value: function init(options) {\n      if (options.pickLevel !== undefined) {\n        this.isMinView = this.id === options.pickLevel;\n      }\n      this.setOptions(options);\n      this.updateFocus();\n      this.updateSelection();\n    }\n\n    // Execute beforeShow() callback and apply the result to the element\n    // args:\n    // - current - current value on the iteration on view rendering\n    // - timeValue - time value of the date to pass to beforeShow()\n  }, {\n    key: \"performBeforeHook\",\n    value: function performBeforeHook(el, current, timeValue) {\n      var result = this.beforeShow(new Date(timeValue));\n      switch (_typeof(result)) {\n        case 'boolean':\n          result = {\n            enabled: result\n          };\n          break;\n        case 'string':\n          result = {\n            classes: result\n          };\n      }\n      if (result) {\n        if (result.enabled === false) {\n          el.classList.add('disabled');\n          pushUnique(this.disabled, current);\n        }\n        if (result.classes) {\n          var _el$classList;\n          var extraClasses = result.classes.split(/\\s+/);\n          (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses));\n          if (extraClasses.includes('disabled')) {\n            pushUnique(this.disabled, current);\n          }\n        }\n        if (result.content) {\n          replaceChildNodes(el, result.content);\n        }\n      }\n    }\n  }]);\n}();\n\nvar DaysView = /*#__PURE__*/function (_View) {\n  function DaysView(picker) {\n    _classCallCheck(this, DaysView);\n    return _callSuper(this, DaysView, [picker, {\n      id: 0,\n      name: 'days',\n      cellClass: 'day'\n    }]);\n  }\n  _inherits(DaysView, _View);\n  return _createClass(DaysView, [{\n    key: \"init\",\n    value: function init(options) {\n      var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      if (onConstruction) {\n        var inner = parseHTML(daysTemplate).firstChild;\n        this.dow = inner.firstChild;\n        this.grid = inner.lastChild;\n        this.element.appendChild(inner);\n      }\n      _get(_getPrototypeOf(DaysView.prototype), \"init\", this).call(this, options);\n    }\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      var _this = this;\n      var updateDOW;\n      if (hasProperty(options, 'minDate')) {\n        this.minDate = options.minDate;\n      }\n      if (hasProperty(options, 'maxDate')) {\n        this.maxDate = options.maxDate;\n      }\n      if (options.datesDisabled) {\n        this.datesDisabled = options.datesDisabled;\n      }\n      if (options.daysOfWeekDisabled) {\n        this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n        updateDOW = true;\n      }\n      if (options.daysOfWeekHighlighted) {\n        this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n      }\n      if (options.todayHighlight !== undefined) {\n        this.todayHighlight = options.todayHighlight;\n      }\n      if (options.weekStart !== undefined) {\n        this.weekStart = options.weekStart;\n        this.weekEnd = options.weekEnd;\n        updateDOW = true;\n      }\n      if (options.locale) {\n        var locale = this.locale = options.locale;\n        this.dayNames = locale.daysMin;\n        this.switchLabelFormat = locale.titleFormat;\n        updateDOW = true;\n      }\n      if (options.beforeShowDay !== undefined) {\n        this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined;\n      }\n      if (options.calendarWeeks !== undefined) {\n        if (options.calendarWeeks && !this.calendarWeeks) {\n          var weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n          this.calendarWeeks = {\n            element: weeksElem,\n            dow: weeksElem.firstChild,\n            weeks: weeksElem.lastChild\n          };\n          this.element.insertBefore(weeksElem, this.element.firstChild);\n        } else if (this.calendarWeeks && !options.calendarWeeks) {\n          this.element.removeChild(this.calendarWeeks.element);\n          this.calendarWeeks = null;\n        }\n      }\n      if (options.showDaysOfWeek !== undefined) {\n        if (options.showDaysOfWeek) {\n          showElement(this.dow);\n          if (this.calendarWeeks) {\n            showElement(this.calendarWeeks.dow);\n          }\n        } else {\n          hideElement(this.dow);\n          if (this.calendarWeeks) {\n            hideElement(this.calendarWeeks.dow);\n          }\n        }\n      }\n\n      // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n      if (updateDOW) {\n        Array.from(this.dow.children).forEach(function (el, index) {\n          var dow = (_this.weekStart + index) % 7;\n          el.textContent = _this.dayNames[dow];\n          el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n        });\n      }\n    }\n\n    // Apply update on the focused date to view's settings\n  }, {\n    key: \"updateFocus\",\n    value: function updateFocus() {\n      var viewDate = new Date(this.picker.viewDate);\n      var viewYear = viewDate.getFullYear();\n      var viewMonth = viewDate.getMonth();\n      var firstOfMonth = dateValue(viewYear, viewMonth, 1);\n      var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n      this.first = firstOfMonth;\n      this.last = dateValue(viewYear, viewMonth + 1, 0);\n      this.start = start;\n      this.focused = this.picker.viewDate;\n    }\n\n    // Apply update on the selected dates to view's settings\n  }, {\n    key: \"updateSelection\",\n    value: function updateSelection() {\n      var _this$picker$datepick = this.picker.datepicker,\n        dates = _this$picker$datepick.dates,\n        rangepicker = _this$picker$datepick.rangepicker;\n      this.selected = dates;\n      if (rangepicker) {\n        this.range = rangepicker.dates;\n      }\n    }\n\n    // Update the entire view UI\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this2 = this;\n      // update today marker on ever render\n      this.today = this.todayHighlight ? today() : undefined;\n      // refresh disabled dates on every render in order to clear the ones added\n      // by beforeShow hook at previous render\n      this.disabled = _toConsumableArray(this.datesDisabled);\n      var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n      this.picker.setViewSwitchLabel(switchLabel);\n      this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n      this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n      if (this.calendarWeeks) {\n        // start of the UTC week (Monday) of the 1st of the month\n        var startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n        Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) {\n          el.textContent = getWeek(addWeeks(startOfWeek, index));\n        });\n      }\n      Array.from(this.grid.children).forEach(function (el, index) {\n        var classList = el.classList;\n        var current = addDays(_this2.start, index);\n        var date = new Date(current);\n        var day = date.getDay();\n        el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n        el.dataset.date = current;\n        el.textContent = date.getDate();\n        if (current < _this2.first) {\n          classList.add('prev', 'text-gray-500', 'dark:text-white');\n        } else if (current > _this2.last) {\n          classList.add('next', 'text-gray-500', 'dark:text-white');\n        }\n        if (_this2.today === current) {\n          classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n        }\n        if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) {\n          classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n          classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n        }\n        if (_this2.daysOfWeekDisabled.includes(day)) {\n          classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n          classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n          pushUnique(_this2.disabled, current);\n        }\n        if (_this2.daysOfWeekHighlighted.includes(day)) {\n          classList.add('highlighted');\n        }\n        if (_this2.range) {\n          var _this2$range = _slicedToArray(_this2.range, 2),\n            rangeStart = _this2$range[0],\n            rangeEnd = _this2$range[1];\n          if (current > rangeStart && current < rangeEnd) {\n            classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n            classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg');\n          }\n          if (current === rangeStart) {\n            classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n            classList.remove('rounded-lg', 'rounded-r-lg');\n          }\n          if (current === rangeEnd) {\n            classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n            classList.remove('rounded-lg', 'rounded-l-lg');\n          }\n        }\n        if (_this2.selected.includes(current)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n        }\n        if (current === _this2.focused) {\n          classList.add('focused');\n        }\n        if (_this2.beforeShow) {\n          _this2.performBeforeHook(el, current, current);\n        }\n      });\n    }\n\n    // Update the view UI by applying the changes of selected and focused items\n  }, {\n    key: \"refresh\",\n    value: function refresh() {\n      var _this3 = this;\n      var _ref = this.range || [],\n        _ref2 = _slicedToArray(_ref, 2),\n        rangeStart = _ref2[0],\n        rangeEnd = _ref2[1];\n      this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n        el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused');\n        el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n      });\n      Array.from(this.grid.children).forEach(function (el) {\n        var current = Number(el.dataset.date);\n        var classList = el.classList;\n        classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg');\n        if (current > rangeStart && current < rangeEnd) {\n          classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n          classList.remove('rounded-lg');\n        }\n        if (current === rangeStart) {\n          classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n          classList.remove('rounded-lg');\n        }\n        if (current === rangeEnd) {\n          classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n          classList.remove('rounded-lg');\n        }\n        if (_this3.selected.includes(current)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n        }\n        if (current === _this3.focused) {\n          classList.add('focused');\n        }\n      });\n    }\n\n    // Update the view UI by applying the change of focused item\n  }, {\n    key: \"refreshFocus\",\n    value: function refreshFocus() {\n      var index = Math.round((this.focused - this.start) / 86400000);\n      this.grid.querySelectorAll('.focused').forEach(function (el) {\n        el.classList.remove('focused');\n      });\n      this.grid.children[index].classList.add('focused');\n    }\n  }]);\n}(View);\n\nfunction computeMonthRange(range, thisYear) {\n  if (!range || !range[0] || !range[1]) {\n    return;\n  }\n  var _range = _slicedToArray(range, 2),\n    _range$ = _slicedToArray(_range[0], 2),\n    startY = _range$[0],\n    startM = _range$[1],\n    _range$2 = _slicedToArray(_range[1], 2),\n    endY = _range$2[0],\n    endM = _range$2[1];\n  if (startY > thisYear || endY < thisYear) {\n    return;\n  }\n  return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12];\n}\nvar MonthsView = /*#__PURE__*/function (_View) {\n  function MonthsView(picker) {\n    _classCallCheck(this, MonthsView);\n    return _callSuper(this, MonthsView, [picker, {\n      id: 1,\n      name: 'months',\n      cellClass: 'month'\n    }]);\n  }\n  _inherits(MonthsView, _View);\n  return _createClass(MonthsView, [{\n    key: \"init\",\n    value: function init(options) {\n      var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      if (onConstruction) {\n        this.grid = this.element;\n        this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n        this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {\n          'data-month': function dataMonth(ix) {\n            return ix;\n          }\n        })));\n      }\n      _get(_getPrototypeOf(MonthsView.prototype), \"init\", this).call(this, options);\n    }\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (options.locale) {\n        this.monthNames = options.locale.monthsShort;\n      }\n      if (hasProperty(options, 'minDate')) {\n        if (options.minDate === undefined) {\n          this.minYear = this.minMonth = this.minDate = undefined;\n        } else {\n          var minDateObj = new Date(options.minDate);\n          this.minYear = minDateObj.getFullYear();\n          this.minMonth = minDateObj.getMonth();\n          this.minDate = minDateObj.setDate(1);\n        }\n      }\n      if (hasProperty(options, 'maxDate')) {\n        if (options.maxDate === undefined) {\n          this.maxYear = this.maxMonth = this.maxDate = undefined;\n        } else {\n          var maxDateObj = new Date(options.maxDate);\n          this.maxYear = maxDateObj.getFullYear();\n          this.maxMonth = maxDateObj.getMonth();\n          this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n        }\n      }\n      if (options.beforeShowMonth !== undefined) {\n        this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined;\n      }\n    }\n\n    // Update view's settings to reflect the viewDate set on the picker\n  }, {\n    key: \"updateFocus\",\n    value: function updateFocus() {\n      var viewDate = new Date(this.picker.viewDate);\n      this.year = viewDate.getFullYear();\n      this.focused = viewDate.getMonth();\n    }\n\n    // Update view's settings to reflect the selected dates\n  }, {\n    key: \"updateSelection\",\n    value: function updateSelection() {\n      var _this$picker$datepick = this.picker.datepicker,\n        dates = _this$picker$datepick.dates,\n        rangepicker = _this$picker$datepick.rangepicker;\n      this.selected = dates.reduce(function (selected, timeValue) {\n        var date = new Date(timeValue);\n        var year = date.getFullYear();\n        var month = date.getMonth();\n        if (selected[year] === undefined) {\n          selected[year] = [month];\n        } else {\n          pushUnique(selected[year], month);\n        }\n        return selected;\n      }, {});\n      if (rangepicker && rangepicker.dates) {\n        this.range = rangepicker.dates.map(function (timeValue) {\n          var date = new Date(timeValue);\n          return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n        });\n      }\n    }\n\n    // Update the entire view UI\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this = this;\n      // refresh disabled months on every render in order to clear the ones added\n      // by beforeShow hook at previous render\n      this.disabled = [];\n      this.picker.setViewSwitchLabel(this.year);\n      this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n      this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n      var selected = this.selected[this.year] || [];\n      var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n      var isMinYear = this.year === this.minYear;\n      var isMaxYear = this.year === this.maxYear;\n      var range = computeMonthRange(this.range, this.year);\n      Array.from(this.grid.children).forEach(function (el, index) {\n        var classList = el.classList;\n        var date = dateValue(_this.year, index, 1);\n        el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this.cellClass);\n        if (_this.isMinView) {\n          el.dataset.date = date;\n        }\n        // reset text on every render to clear the custom content set\n        // by beforeShow hook at previous render\n        el.textContent = _this.monthNames[index];\n        if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) {\n          classList.add('disabled');\n        }\n        if (range) {\n          var _range2 = _slicedToArray(range, 2),\n            rangeStart = _range2[0],\n            rangeEnd = _range2[1];\n          if (index > rangeStart && index < rangeEnd) {\n            classList.add('range');\n          }\n          if (index === rangeStart) {\n            classList.add('range-start');\n          }\n          if (index === rangeEnd) {\n            classList.add('range-end');\n          }\n        }\n        if (selected.includes(index)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n        }\n        if (index === _this.focused) {\n          classList.add('focused');\n        }\n        if (_this.beforeShow) {\n          _this.performBeforeHook(el, index, date);\n        }\n      });\n    }\n\n    // Update the view UI by applying the changes of selected and focused items\n  }, {\n    key: \"refresh\",\n    value: function refresh() {\n      var _this2 = this;\n      var selected = this.selected[this.year] || [];\n      var _ref = computeMonthRange(this.range, this.year) || [],\n        _ref2 = _slicedToArray(_ref, 2),\n        rangeStart = _ref2[0],\n        rangeEnd = _ref2[1];\n      this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n        el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused');\n        el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n      });\n      Array.from(this.grid.children).forEach(function (el, index) {\n        var classList = el.classList;\n        if (index > rangeStart && index < rangeEnd) {\n          classList.add('range');\n        }\n        if (index === rangeStart) {\n          classList.add('range-start');\n        }\n        if (index === rangeEnd) {\n          classList.add('range-end');\n        }\n        if (selected.includes(index)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n        }\n        if (index === _this2.focused) {\n          classList.add('focused');\n        }\n      });\n    }\n\n    // Update the view UI by applying the change of focused item\n  }, {\n    key: \"refreshFocus\",\n    value: function refreshFocus() {\n      this.grid.querySelectorAll('.focused').forEach(function (el) {\n        el.classList.remove('focused');\n      });\n      this.grid.children[this.focused].classList.add('focused');\n    }\n  }]);\n}(View);\n\nfunction toTitleCase(word) {\n  return _toConsumableArray(word).reduce(function (str, ch, ix) {\n    return str += ix ? ch : ch.toUpperCase();\n  }, '');\n}\n\n// Class representing the years and decades view elements\nvar YearsView = /*#__PURE__*/function (_View) {\n  function YearsView(picker, config) {\n    _classCallCheck(this, YearsView);\n    return _callSuper(this, YearsView, [picker, config]);\n  }\n  _inherits(YearsView, _View);\n  return _createClass(YearsView, [{\n    key: \"init\",\n    value: function init(options) {\n      var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      if (onConstruction) {\n        this.navStep = this.step * 10;\n        this.beforeShowOption = \"beforeShow\".concat(toTitleCase(this.cellClass));\n        this.grid = this.element;\n        this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n        this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n      }\n      _get(_getPrototypeOf(YearsView.prototype), \"init\", this).call(this, options);\n    }\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (hasProperty(options, 'minDate')) {\n        if (options.minDate === undefined) {\n          this.minYear = this.minDate = undefined;\n        } else {\n          this.minYear = startOfYearPeriod(options.minDate, this.step);\n          this.minDate = dateValue(this.minYear, 0, 1);\n        }\n      }\n      if (hasProperty(options, 'maxDate')) {\n        if (options.maxDate === undefined) {\n          this.maxYear = this.maxDate = undefined;\n        } else {\n          this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n          this.maxDate = dateValue(this.maxYear, 11, 31);\n        }\n      }\n      if (options[this.beforeShowOption] !== undefined) {\n        var beforeShow = options[this.beforeShowOption];\n        this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n      }\n    }\n\n    // Update view's settings to reflect the viewDate set on the picker\n  }, {\n    key: \"updateFocus\",\n    value: function updateFocus() {\n      var viewDate = new Date(this.picker.viewDate);\n      var first = startOfYearPeriod(viewDate, this.navStep);\n      var last = first + 9 * this.step;\n      this.first = first;\n      this.last = last;\n      this.start = first - this.step;\n      this.focused = startOfYearPeriod(viewDate, this.step);\n    }\n\n    // Update view's settings to reflect the selected dates\n  }, {\n    key: \"updateSelection\",\n    value: function updateSelection() {\n      var _this = this;\n      var _this$picker$datepick = this.picker.datepicker,\n        dates = _this$picker$datepick.dates,\n        rangepicker = _this$picker$datepick.rangepicker;\n      this.selected = dates.reduce(function (years, timeValue) {\n        return pushUnique(years, startOfYearPeriod(timeValue, _this.step));\n      }, []);\n      if (rangepicker && rangepicker.dates) {\n        this.range = rangepicker.dates.map(function (timeValue) {\n          if (timeValue !== undefined) {\n            return startOfYearPeriod(timeValue, _this.step);\n          }\n        });\n      }\n    }\n\n    // Update the entire view UI\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this2 = this;\n      // refresh disabled years on every render in order to clear the ones added\n      // by beforeShow hook at previous render\n      this.disabled = [];\n      this.picker.setViewSwitchLabel(\"\".concat(this.first, \"-\").concat(this.last));\n      this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n      this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n      Array.from(this.grid.children).forEach(function (el, index) {\n        var classList = el.classList;\n        var current = _this2.start + index * _this2.step;\n        var date = dateValue(current, 0, 1);\n        el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n        if (_this2.isMinView) {\n          el.dataset.date = date;\n        }\n        el.textContent = el.dataset.year = current;\n        if (index === 0) {\n          classList.add('prev');\n        } else if (index === 11) {\n          classList.add('next');\n        }\n        if (current < _this2.minYear || current > _this2.maxYear) {\n          classList.add('disabled');\n        }\n        if (_this2.range) {\n          var _this2$range = _slicedToArray(_this2.range, 2),\n            rangeStart = _this2$range[0],\n            rangeEnd = _this2$range[1];\n          if (current > rangeStart && current < rangeEnd) {\n            classList.add('range');\n          }\n          if (current === rangeStart) {\n            classList.add('range-start');\n          }\n          if (current === rangeEnd) {\n            classList.add('range-end');\n          }\n        }\n        if (_this2.selected.includes(current)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n        }\n        if (current === _this2.focused) {\n          classList.add('focused');\n        }\n        if (_this2.beforeShow) {\n          _this2.performBeforeHook(el, current, date);\n        }\n      });\n    }\n\n    // Update the view UI by applying the changes of selected and focused items\n  }, {\n    key: \"refresh\",\n    value: function refresh() {\n      var _this3 = this;\n      var _ref = this.range || [],\n        _ref2 = _slicedToArray(_ref, 2),\n        rangeStart = _ref2[0],\n        rangeEnd = _ref2[1];\n      this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n        el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused');\n      });\n      Array.from(this.grid.children).forEach(function (el) {\n        var current = Number(el.textContent);\n        var classList = el.classList;\n        if (current > rangeStart && current < rangeEnd) {\n          classList.add('range');\n        }\n        if (current === rangeStart) {\n          classList.add('range-start');\n        }\n        if (current === rangeEnd) {\n          classList.add('range-end');\n        }\n        if (_this3.selected.includes(current)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n        }\n        if (current === _this3.focused) {\n          classList.add('focused');\n        }\n      });\n    }\n\n    // Update the view UI by applying the change of focused item\n  }, {\n    key: \"refreshFocus\",\n    value: function refreshFocus() {\n      var index = Math.round((this.focused - this.start) / this.step);\n      this.grid.querySelectorAll('.focused').forEach(function (el) {\n        el.classList.remove('focused');\n      });\n      this.grid.children[index].classList.add('focused');\n    }\n  }]);\n}(View);\n\nfunction triggerDatepickerEvent(datepicker, type) {\n  var detail = {\n    date: datepicker.getDate(),\n    viewDate: new Date(datepicker.picker.viewDate),\n    viewId: datepicker.picker.currentView.id,\n    datepicker: datepicker\n  };\n  datepicker.element.dispatchEvent(new CustomEvent(type, {\n    detail: detail\n  }));\n}\n\n// direction: -1 (to previous), 1 (to next)\nfunction goToPrevOrNext(datepicker, direction) {\n  var _datepicker$config = datepicker.config,\n    minDate = _datepicker$config.minDate,\n    maxDate = _datepicker$config.maxDate;\n  var _datepicker$picker = datepicker.picker,\n    currentView = _datepicker$picker.currentView,\n    viewDate = _datepicker$picker.viewDate;\n  var newViewDate;\n  switch (currentView.id) {\n    case 0:\n      newViewDate = addMonths(viewDate, direction);\n      break;\n    case 1:\n      newViewDate = addYears(viewDate, direction);\n      break;\n    default:\n      newViewDate = addYears(viewDate, direction * currentView.navStep);\n  }\n  newViewDate = limitToRange(newViewDate, minDate, maxDate);\n  datepicker.picker.changeFocus(newViewDate).render();\n}\nfunction switchView(datepicker) {\n  var viewId = datepicker.picker.currentView.id;\n  if (viewId === datepicker.config.maxView) {\n    return;\n  }\n  datepicker.picker.changeView(viewId + 1).render();\n}\nfunction unfocus(datepicker) {\n  if (datepicker.config.updateOnBlur) {\n    datepicker.update({\n      autohide: true\n    });\n  } else {\n    datepicker.refresh('input');\n    datepicker.hide();\n  }\n}\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n  var picker = datepicker.picker;\n  var viewDate = new Date(picker.viewDate);\n  var viewId = picker.currentView.id;\n  var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear());\n  picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\nfunction onClickTodayBtn(datepicker) {\n  var picker = datepicker.picker;\n  var currentDate = today();\n  if (datepicker.config.todayBtnMode === 1) {\n    if (datepicker.config.autohide) {\n      datepicker.setDate(currentDate);\n      return;\n    }\n    datepicker.setDate(currentDate, {\n      render: false\n    });\n    picker.update();\n  }\n  if (picker.viewDate !== currentDate) {\n    picker.changeFocus(currentDate);\n  }\n  picker.changeView(0).render();\n}\nfunction onClickClearBtn(datepicker) {\n  datepicker.setDate({\n    clear: true\n  });\n}\nfunction onClickViewSwitch(datepicker) {\n  switchView(datepicker);\n}\nfunction onClickPrevBtn(datepicker) {\n  goToPrevOrNext(datepicker, -1);\n}\nfunction onClickNextBtn(datepicker) {\n  goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nfunction onClickView(datepicker, ev) {\n  var target = findElementInEventPath(ev, '.datepicker-cell');\n  if (!target || target.classList.contains('disabled')) {\n    return;\n  }\n  var _datepicker$picker$cu = datepicker.picker.currentView,\n    id = _datepicker$picker$cu.id,\n    isMinView = _datepicker$picker$cu.isMinView;\n  if (isMinView) {\n    datepicker.setDate(Number(target.dataset.date));\n  } else if (id === 1) {\n    goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n  } else {\n    goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n  }\n}\nfunction onClickPicker(datepicker) {\n  if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n    datepicker.inputField.focus();\n  }\n}\n\nfunction processPickerOptions(picker, options) {\n  if (options.title !== undefined) {\n    if (options.title) {\n      picker.controls.title.textContent = options.title;\n      showElement(picker.controls.title);\n    } else {\n      picker.controls.title.textContent = '';\n      hideElement(picker.controls.title);\n    }\n  }\n  if (options.prevArrow) {\n    var prevBtn = picker.controls.prevBtn;\n    emptyChildNodes(prevBtn);\n    options.prevArrow.forEach(function (node) {\n      prevBtn.appendChild(node.cloneNode(true));\n    });\n  }\n  if (options.nextArrow) {\n    var nextBtn = picker.controls.nextBtn;\n    emptyChildNodes(nextBtn);\n    options.nextArrow.forEach(function (node) {\n      nextBtn.appendChild(node.cloneNode(true));\n    });\n  }\n  if (options.locale) {\n    picker.controls.todayBtn.textContent = options.locale.today;\n    picker.controls.clearBtn.textContent = options.locale.clear;\n  }\n  if (options.todayBtn !== undefined) {\n    if (options.todayBtn) {\n      showElement(picker.controls.todayBtn);\n    } else {\n      hideElement(picker.controls.todayBtn);\n    }\n  }\n  if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n    var _picker$datepicker$co = picker.datepicker.config,\n      minDate = _picker$datepicker$co.minDate,\n      maxDate = _picker$datepicker$co.maxDate;\n    picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n  }\n  if (options.clearBtn !== undefined) {\n    if (options.clearBtn) {\n      showElement(picker.controls.clearBtn);\n    } else {\n      hideElement(picker.controls.clearBtn);\n    }\n  }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n  var dates = datepicker.dates,\n    config = datepicker.config;\n  var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n  return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n  var oldViewDate = new Date(picker.viewDate);\n  var newViewDate = new Date(newDate);\n  var _picker$currentView = picker.currentView,\n    id = _picker$currentView.id,\n    year = _picker$currentView.year,\n    first = _picker$currentView.first,\n    last = _picker$currentView.last;\n  var viewYear = newViewDate.getFullYear();\n  picker.viewDate = newDate;\n  if (viewYear !== oldViewDate.getFullYear()) {\n    triggerDatepickerEvent(picker.datepicker, 'changeYear');\n  }\n  if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n    triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n  }\n\n  // return whether the new date is in different period on time from the one\n  // displayed in the current view\n  // when true, the view needs to be re-rendered on the next UI refresh.\n  switch (id) {\n    case 0:\n      return newDate < first || newDate > last;\n    case 1:\n      return viewYear !== year;\n    default:\n      return viewYear < first || viewYear > last;\n  }\n}\nfunction getTextDirection(el) {\n  return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nvar Picker = /*#__PURE__*/function () {\n  function Picker(datepicker) {\n    _classCallCheck(this, Picker);\n    this.datepicker = datepicker;\n    var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n    var element = this.element = parseHTML(template).firstChild;\n    var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3),\n      header = _element$firstChild$c[0],\n      main = _element$firstChild$c[1],\n      footer = _element$firstChild$c[2];\n    var title = header.firstElementChild;\n    var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3),\n      prevBtn = _header$lastElementCh[0],\n      viewSwitch = _header$lastElementCh[1],\n      nextBtn = _header$lastElementCh[2];\n    var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2),\n      todayBtn = _footer$firstChild$ch[0],\n      clearBtn = _footer$firstChild$ch[1];\n    var controls = {\n      title: title,\n      prevBtn: prevBtn,\n      viewSwitch: viewSwitch,\n      nextBtn: nextBtn,\n      todayBtn: todayBtn,\n      clearBtn: clearBtn\n    };\n    this.main = main;\n    this.controls = controls;\n    var elementClass = datepicker.inline ? 'inline' : 'dropdown';\n    element.classList.add(\"datepicker-\".concat(elementClass));\n    elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n    processPickerOptions(this, datepicker.config);\n    this.viewDate = computeResetViewDate(datepicker);\n\n    // set up event listeners\n    registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), {\n      capture: true\n    }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]);\n\n    // set up views\n    this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {\n      id: 2,\n      name: 'years',\n      cellClass: 'year',\n      step: 1\n    }), new YearsView(this, {\n      id: 3,\n      name: 'decades',\n      cellClass: 'decade',\n      step: 10\n    })];\n    this.currentView = this.views[datepicker.config.startView];\n    this.currentView.render();\n    this.main.appendChild(this.currentView.element);\n    datepicker.config.container.appendChild(this.element);\n  }\n  return _createClass(Picker, [{\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      processPickerOptions(this, options);\n      this.views.forEach(function (view) {\n        view.init(options, false);\n      });\n      this.currentView.render();\n    }\n  }, {\n    key: \"detach\",\n    value: function detach() {\n      this.datepicker.config.container.removeChild(this.element);\n    }\n  }, {\n    key: \"show\",\n    value: function show() {\n      if (this.active) {\n        return;\n      }\n      this.element.classList.add('active', 'block');\n      this.element.classList.remove('hidden');\n      this.active = true;\n      var datepicker = this.datepicker;\n      if (!datepicker.inline) {\n        // ensure picker's direction matches input's\n        var inputDirection = getTextDirection(datepicker.inputField);\n        if (inputDirection !== getTextDirection(datepicker.config.container)) {\n          this.element.dir = inputDirection;\n        } else if (this.element.dir) {\n          this.element.removeAttribute('dir');\n        }\n        this.place();\n        if (datepicker.config.disableTouchKeyboard) {\n          datepicker.inputField.blur();\n        }\n      }\n      triggerDatepickerEvent(datepicker, 'show');\n    }\n  }, {\n    key: \"hide\",\n    value: function hide() {\n      if (!this.active) {\n        return;\n      }\n      this.datepicker.exitEditMode();\n      this.element.classList.remove('active', 'block');\n      this.element.classList.add('active', 'block', 'hidden');\n      this.active = false;\n      triggerDatepickerEvent(this.datepicker, 'hide');\n    }\n  }, {\n    key: \"place\",\n    value: function place() {\n      var _this$element = this.element,\n        classList = _this$element.classList,\n        style = _this$element.style;\n      var _this$datepicker = this.datepicker,\n        config = _this$datepicker.config,\n        inputField = _this$datepicker.inputField;\n      var container = config.container;\n      var _this$element$getBoun = this.element.getBoundingClientRect(),\n        calendarWidth = _this$element$getBoun.width,\n        calendarHeight = _this$element$getBoun.height;\n      var _container$getBoundin = container.getBoundingClientRect(),\n        containerLeft = _container$getBoundin.left,\n        containerTop = _container$getBoundin.top,\n        containerWidth = _container$getBoundin.width;\n      var _inputField$getBoundi = inputField.getBoundingClientRect(),\n        inputLeft = _inputField$getBoundi.left,\n        inputTop = _inputField$getBoundi.top,\n        inputWidth = _inputField$getBoundi.width,\n        inputHeight = _inputField$getBoundi.height;\n      var _config$orientation = config.orientation,\n        orientX = _config$orientation.x,\n        orientY = _config$orientation.y;\n      var scrollTop;\n      var left;\n      var top;\n      if (container === document.body) {\n        scrollTop = window.scrollY;\n        left = inputLeft + window.scrollX;\n        top = inputTop + scrollTop;\n      } else {\n        scrollTop = container.scrollTop;\n        left = inputLeft - containerLeft;\n        top = inputTop - containerTop + scrollTop;\n      }\n      if (orientX === 'auto') {\n        if (left < 0) {\n          // align to the left and move into visible area if input's left edge < window's\n          orientX = 'left';\n          left = 10;\n        } else if (left + calendarWidth > containerWidth) {\n          // align to the right if canlendar's right edge > container's\n          orientX = 'right';\n        } else {\n          orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n        }\n      }\n      if (orientX === 'right') {\n        left -= calendarWidth - inputWidth;\n      }\n      if (orientY === 'auto') {\n        orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n      }\n      if (orientY === 'top') {\n        top -= calendarHeight;\n      } else {\n        top += inputHeight;\n      }\n      classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left');\n      classList.add(\"datepicker-orient-\".concat(orientY), \"datepicker-orient-\".concat(orientX));\n      style.top = top ? \"\".concat(top, \"px\") : top;\n      style.left = left ? \"\".concat(left, \"px\") : left;\n    }\n  }, {\n    key: \"setViewSwitchLabel\",\n    value: function setViewSwitchLabel(labelText) {\n      this.controls.viewSwitch.textContent = labelText;\n    }\n  }, {\n    key: \"setPrevBtnDisabled\",\n    value: function setPrevBtnDisabled(disabled) {\n      this.controls.prevBtn.disabled = disabled;\n    }\n  }, {\n    key: \"setNextBtnDisabled\",\n    value: function setNextBtnDisabled(disabled) {\n      this.controls.nextBtn.disabled = disabled;\n    }\n  }, {\n    key: \"changeView\",\n    value: function changeView(viewId) {\n      var oldView = this.currentView;\n      var newView = this.views[viewId];\n      if (newView.id !== oldView.id) {\n        this.currentView = newView;\n        this._renderMethod = 'render';\n        triggerDatepickerEvent(this.datepicker, 'changeView');\n        this.main.replaceChild(newView.element, oldView.element);\n      }\n      return this;\n    }\n\n    // Change the focused date (view date)\n  }, {\n    key: \"changeFocus\",\n    value: function changeFocus(newViewDate) {\n      this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n      this.views.forEach(function (view) {\n        view.updateFocus();\n      });\n      return this;\n    }\n\n    // Apply the change of the selected dates\n  }, {\n    key: \"update\",\n    value: function update() {\n      var newViewDate = computeResetViewDate(this.datepicker);\n      this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n      this.views.forEach(function (view) {\n        view.updateFocus();\n        view.updateSelection();\n      });\n      return this;\n    }\n\n    // Refresh the picker UI\n  }, {\n    key: \"render\",\n    value: function render() {\n      var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var renderMethod = quickRender && this._renderMethod || 'render';\n      delete this._renderMethod;\n      this.currentView[renderMethod]();\n    }\n  }]);\n}();\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n//   - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n//   - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n  if (!isInRange(date, min, max)) {\n    return;\n  }\n  if (testFn(date)) {\n    var newDate = addFn(date, increase);\n    return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n  }\n  return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n  var picker = datepicker.picker;\n  var currentView = picker.currentView;\n  var step = currentView.step || 1;\n  var viewDate = picker.viewDate;\n  var addFn;\n  var testFn;\n  switch (currentView.id) {\n    case 0:\n      if (vertical) {\n        viewDate = addDays(viewDate, direction * 7);\n      } else if (ev.ctrlKey || ev.metaKey) {\n        viewDate = addYears(viewDate, direction);\n      } else {\n        viewDate = addDays(viewDate, direction);\n      }\n      addFn = addDays;\n      testFn = function testFn(date) {\n        return currentView.disabled.includes(date);\n      };\n      break;\n    case 1:\n      viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n      addFn = addMonths;\n      testFn = function testFn(date) {\n        var dt = new Date(date);\n        var year = currentView.year,\n          disabled = currentView.disabled;\n        return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n      };\n      break;\n    default:\n      viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n      addFn = addYears;\n      testFn = function testFn(date) {\n        return currentView.disabled.includes(startOfYearPeriod(date, step));\n      };\n  }\n  viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate);\n  if (viewDate !== undefined) {\n    picker.changeFocus(viewDate).render();\n  }\n}\nfunction onKeydown(datepicker, ev) {\n  if (ev.key === 'Tab') {\n    unfocus(datepicker);\n    return;\n  }\n  var picker = datepicker.picker;\n  var _picker$currentView = picker.currentView,\n    id = _picker$currentView.id,\n    isMinView = _picker$currentView.isMinView;\n  if (!picker.active) {\n    switch (ev.key) {\n      case 'ArrowDown':\n      case 'Escape':\n        picker.show();\n        break;\n      case 'Enter':\n        datepicker.update();\n        break;\n      default:\n        return;\n    }\n  } else if (datepicker.editMode) {\n    switch (ev.key) {\n      case 'Escape':\n        picker.hide();\n        break;\n      case 'Enter':\n        datepicker.exitEditMode({\n          update: true,\n          autohide: datepicker.config.autohide\n        });\n        break;\n      default:\n        return;\n    }\n  } else {\n    switch (ev.key) {\n      case 'Escape':\n        picker.hide();\n        break;\n      case 'ArrowLeft':\n        if (ev.ctrlKey || ev.metaKey) {\n          goToPrevOrNext(datepicker, -1);\n        } else if (ev.shiftKey) {\n          datepicker.enterEditMode();\n          return;\n        } else {\n          moveByArrowKey(datepicker, ev, -1, false);\n        }\n        break;\n      case 'ArrowRight':\n        if (ev.ctrlKey || ev.metaKey) {\n          goToPrevOrNext(datepicker, 1);\n        } else if (ev.shiftKey) {\n          datepicker.enterEditMode();\n          return;\n        } else {\n          moveByArrowKey(datepicker, ev, 1, false);\n        }\n        break;\n      case 'ArrowUp':\n        if (ev.ctrlKey || ev.metaKey) {\n          switchView(datepicker);\n        } else if (ev.shiftKey) {\n          datepicker.enterEditMode();\n          return;\n        } else {\n          moveByArrowKey(datepicker, ev, -1, true);\n        }\n        break;\n      case 'ArrowDown':\n        if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n          datepicker.enterEditMode();\n          return;\n        }\n        moveByArrowKey(datepicker, ev, 1, true);\n        break;\n      case 'Enter':\n        if (isMinView) {\n          datepicker.setDate(picker.viewDate);\n        } else {\n          picker.changeView(id - 1).render();\n        }\n        break;\n      case 'Backspace':\n      case 'Delete':\n        datepicker.enterEditMode();\n        return;\n      default:\n        if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n          datepicker.enterEditMode();\n        }\n        return;\n    }\n  }\n  ev.preventDefault();\n  ev.stopPropagation();\n}\nfunction onFocus(datepicker) {\n  if (datepicker.config.showOnFocus && !datepicker._showing) {\n    datepicker.show();\n  }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nfunction onMousedown(datepicker, ev) {\n  var el = ev.target;\n  if (datepicker.picker.active || datepicker.config.showOnClick) {\n    el._active = el === document.activeElement;\n    el._clicking = setTimeout(function () {\n      delete el._active;\n      delete el._clicking;\n    }, 2000);\n  }\n}\nfunction onClickInput(datepicker, ev) {\n  var el = ev.target;\n  if (!el._clicking) {\n    return;\n  }\n  clearTimeout(el._clicking);\n  delete el._clicking;\n  if (el._active) {\n    datepicker.enterEditMode();\n  }\n  delete el._active;\n  if (datepicker.config.showOnClick) {\n    datepicker.show();\n  }\n}\nfunction onPaste(datepicker, ev) {\n  if (ev.clipboardData.types.includes('text/plain')) {\n    datepicker.enterEditMode();\n  }\n}\n\n// for the `document` to delegate the events from outside the picker/input field\nfunction onClickOutside(datepicker, ev) {\n  var element = datepicker.element;\n  if (element !== document.activeElement) {\n    return;\n  }\n  var pickerElem = datepicker.picker.element;\n  if (findElementInEventPath(ev, function (el) {\n    return el === element || el === pickerElem;\n  })) {\n    return;\n  }\n  unfocus(datepicker);\n}\n\nfunction stringifyDates(dates, config) {\n  return dates.map(function (dt) {\n    return formatDate(dt, config.format, config.locale);\n  }).join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates) {\n  var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  var config = datepicker.config,\n    origDates = datepicker.dates,\n    rangepicker = datepicker.rangepicker;\n  if (inputDates.length === 0) {\n    // empty input is considered valid unless origiDates is passed\n    return clear ? [] : undefined;\n  }\n  var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n  var newDates = inputDates.reduce(function (dates, dt) {\n    var date = parseDate(dt, config.format, config.locale);\n    if (date === undefined) {\n      return dates;\n    }\n    if (config.pickLevel > 0) {\n      // adjust to 1st of the month/Jan 1st of the year\n      // or to the last day of the monh/Dec 31st of the year if the datepicker\n      // is the range-end picker of a rangepicker\n      var _dt = new Date(date);\n      if (config.pickLevel === 1) {\n        date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1);\n      } else {\n        date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1);\n      }\n    }\n    if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) {\n      dates.push(date);\n    }\n    return dates;\n  }, []);\n  if (newDates.length === 0) {\n    return;\n  }\n  if (config.multidate && !clear) {\n    // get the synmetric difference between origDates and newDates\n    newDates = newDates.reduce(function (dates, date) {\n      if (!origDates.includes(date)) {\n        dates.push(date);\n      }\n      return dates;\n    }, origDates.filter(function (date) {\n      return !newDates.includes(date);\n    }));\n  }\n  // do length check always because user can input multiple dates regardless of the mode\n  return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker) {\n  var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n  var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n  var config = datepicker.config,\n    picker = datepicker.picker,\n    inputField = datepicker.inputField;\n  if (mode & 2) {\n    var newView = picker.active ? config.pickLevel : config.startView;\n    picker.update().changeView(newView).render(quickRender);\n  }\n  if (mode & 1 && inputField) {\n    inputField.value = stringifyDates(datepicker.dates, config);\n  }\n}\nfunction _setDate(datepicker, inputDates, options) {\n  var clear = options.clear,\n    render = options.render,\n    autohide = options.autohide;\n  if (render === undefined) {\n    render = true;\n  }\n  if (!render) {\n    autohide = false;\n  } else if (autohide === undefined) {\n    autohide = datepicker.config.autohide;\n  }\n  var newDates = processInputDates(datepicker, inputDates, clear);\n  if (!newDates) {\n    return;\n  }\n  if (newDates.toString() !== datepicker.dates.toString()) {\n    datepicker.dates = newDates;\n    refreshUI(datepicker, render ? 3 : 1);\n    triggerDatepickerEvent(datepicker, 'changeDate');\n  } else {\n    refreshUI(datepicker, 1);\n  }\n  if (autohide) {\n    datepicker.hide();\n  }\n}\n\n/**\r\n * Class representing a date picker\r\n */\nvar Datepicker = /*#__PURE__*/function () {\n  /**\r\n   * Create a date picker\r\n   * @param  {Element} element - element to bind a date picker\r\n   * @param  {Object} [options] - config options\r\n   * @param  {DateRangePicker} [rangepicker] - DateRangePicker instance the\r\n   * date picker belongs to. Use this only when creating date picker as a part\r\n   * of date range picker\r\n   */\n  function Datepicker(element) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n    _classCallCheck(this, Datepicker);\n    element.datepicker = this;\n    this.element = element;\n\n    // set up config\n    var config = this.config = Object.assign({\n      buttonClass: options.buttonClass && String(options.buttonClass) || 'button',\n      container: document.body,\n      defaultViewDate: today(),\n      maxDate: undefined,\n      minDate: undefined\n    }, processOptions(defaultOptions, this));\n    this._options = options;\n    Object.assign(config, processOptions(options, this));\n\n    // configure by type\n    var inline = this.inline = element.tagName !== 'INPUT';\n    var inputField;\n    var initialDates;\n    if (inline) {\n      config.container = element;\n      initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n      delete element.dataset.date;\n    } else {\n      var container = options.container ? document.querySelector(options.container) : null;\n      if (container) {\n        config.container = container;\n      }\n      inputField = this.inputField = element;\n      inputField.classList.add('datepicker-input');\n      initialDates = stringToArray(inputField.value, config.dateDelimiter);\n    }\n    if (rangepicker) {\n      // check validiry\n      var index = rangepicker.inputs.indexOf(inputField);\n      var datepickers = rangepicker.datepickers;\n      if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n        throw Error('Invalid rangepicker object.');\n      }\n      // attach itaelf to the rangepicker here so that processInputDates() can\n      // determine if this is the range-end picker of the rangepicker while\n      // setting inital values when pickLevel > 0\n      datepickers[index] = this;\n      // add getter for rangepicker\n      Object.defineProperty(this, 'rangepicker', {\n        get: function get() {\n          return rangepicker;\n        }\n      });\n    }\n\n    // set initial dates\n    this.dates = [];\n    // process initial value\n    var inputDateValues = processInputDates(this, initialDates);\n    if (inputDateValues && inputDateValues.length > 0) {\n      this.dates = inputDateValues;\n    }\n    if (inputField) {\n      inputField.value = stringifyDates(this.dates, config);\n    }\n    var picker = this.picker = new Picker(this);\n    if (inline) {\n      this.show();\n    } else {\n      // set up event listeners in other modes\n      var onMousedownDocument = onClickOutside.bind(null, this);\n      var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]];\n      registerListeners(this, listeners);\n    }\n  }\n\n  /**\r\n   * Format Date object or time value in given format and language\r\n   * @param  {Date|Number} date - date or time value to format\r\n   * @param  {String|Object} format - format string or object that contains\r\n   * toDisplay() custom formatter, whose signature is\r\n   * - args:\r\n   *   - date: {Date} - Date instance of the date passed to the method\r\n   *   - format: {Object} - the format object passed to the method\r\n   *   - locale: {Object} - locale for the language specified by `lang`\r\n   * - return:\r\n   *     {String} formatted date\r\n   * @param  {String} [lang=en] - language code for the locale to use\r\n   * @return {String} formatted date\r\n   */\n  return _createClass(Datepicker, [{\n    key: \"active\",\n    get:\n    /**\r\n     * @type {Boolean} - Whether the picker element is shown. `true` whne shown\r\n     */\n    function get() {\n      return !!(this.picker && this.picker.active);\n    }\n\n    /**\r\n     * @type {HTMLDivElement} - DOM object of picker element\r\n     */\n  }, {\n    key: \"pickerElement\",\n    get: function get() {\n      return this.picker ? this.picker.element : undefined;\n    }\n\n    /**\r\n     * Set new values to the config options\r\n     * @param {Object} options - config options to update\r\n     */\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      var picker = this.picker;\n      var newOptions = processOptions(options, this);\n      Object.assign(this._options, options);\n      Object.assign(this.config, newOptions);\n      picker.setOptions(newOptions);\n      refreshUI(this, 3);\n    }\n\n    /**\r\n     * Show the picker element\r\n     */\n  }, {\n    key: \"show\",\n    value: function show() {\n      if (this.inputField) {\n        if (this.inputField.disabled) {\n          return;\n        }\n        if (this.inputField !== document.activeElement) {\n          this._showing = true;\n          this.inputField.focus();\n          delete this._showing;\n        }\n      }\n      this.picker.show();\n    }\n\n    /**\r\n     * Hide the picker element\r\n     * Not available on inline picker\r\n     */\n  }, {\n    key: \"hide\",\n    value: function hide() {\n      if (this.inline) {\n        return;\n      }\n      this.picker.hide();\n      this.picker.update().changeView(this.config.startView).render();\n    }\n\n    /**\r\n     * Destroy the Datepicker instance\r\n     * @return {Detepicker} - the instance destroyed\r\n     */\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      this.hide();\n      unregisterListeners(this);\n      this.picker.detach();\n      if (!this.inline) {\n        this.inputField.classList.remove('datepicker-input');\n      }\n      delete this.element.datepicker;\n      return this;\n    }\n\n    /**\r\n     * Get the selected date(s)\r\n     *\r\n     * The method returns a Date object of selected date by default, and returns\r\n     * an array of selected dates in multidate mode. If format string is passed,\r\n     * it returns date string(s) formatted in given format.\r\n     *\r\n     * @param  {String} [format] - Format string to stringify the date(s)\r\n     * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\r\n     * selected, empty array in multidate mode and untitled in sigledate mode\r\n     */\n  }, {\n    key: \"getDate\",\n    value: function getDate() {\n      var _this = this;\n      var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n      var callback = format ? function (date) {\n        return formatDate(date, format, _this.config.locale);\n      } : function (date) {\n        return new Date(date);\n      };\n      if (this.config.multidate) {\n        return this.dates.map(callback);\n      }\n      if (this.dates.length > 0) {\n        return callback(this.dates[0]);\n      }\n    }\n\n    /**\r\n     * Set selected date(s)\r\n     *\r\n     * In multidate mode, you can pass multiple dates as a series of arguments\r\n     * or an array. (Since each date is parsed individually, the type of the\r\n     * dates doesn't have to be the same.)\r\n     * The given dates are used to toggle the select status of each date. The\r\n     * number of selected dates is kept from exceeding the length set to\r\n     * maxNumberOfDates.\r\n     *\r\n     * With clear: true option, the method can be used to clear the selection\r\n     * and to replace the selection instead of toggling in multidate mode.\r\n     * If the option is passed with no date arguments or an empty dates array,\r\n     * it works as \"clear\" (clear the selection then set nothing), and if the\r\n     * option is passed with new dates to select, it works as \"replace\" (clear\r\n     * the selection then set the given dates)\r\n     *\r\n     * When render: false option is used, the method omits re-rendering the\r\n     * picker element. In this case, you need to call refresh() method later in\r\n     * order for the picker element to reflect the changes. The input field is\r\n     * refreshed always regardless of this option.\r\n     *\r\n     * When invalid (unparsable, repeated, disabled or out-of-range) dates are\r\n     * passed, the method ignores them and applies only valid ones. In the case\r\n     * that all the given dates are invalid, which is distinguished from passing\r\n     * no dates, the method considers it as an error and leaves the selection\r\n     * untouched.\r\n     *\r\n     * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\r\n     * objects, time values or mix of those for new selection\r\n     * @param {Object} [options] - function options\r\n     * - clear: {boolean} - Whether to clear the existing selection\r\n     *     defualt: false\r\n     * - render: {boolean} - Whether to re-render the picker element\r\n     *     default: true\r\n     * - autohide: {boolean} - Whether to hide the picker element after re-render\r\n     *     Ignored when used with render: false\r\n     *     default: config.autohide\r\n     */\n  }, {\n    key: \"setDate\",\n    value: function setDate() {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      var dates = [].concat(args);\n      var opts = {};\n      var lastArg = lastItemOf(args);\n      if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) {\n        Object.assign(opts, dates.pop());\n      }\n      var inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n      _setDate(this, inputDates, opts);\n    }\n\n    /**\r\n     * Update the selected date(s) with input field's value\r\n     * Not available on inline picker\r\n     *\r\n     * The input field will be refreshed with properly formatted date string.\r\n     *\r\n     * @param  {Object} [options] - function options\r\n     * - autohide: {boolean} - whether to hide the picker element after refresh\r\n     *     default: false\r\n     */\n  }, {\n    key: \"update\",\n    value: function update() {\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n      if (this.inline) {\n        return;\n      }\n      var opts = {\n        clear: true,\n        autohide: !!(options && options.autohide)\n      };\n      var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n      _setDate(this, inputDates, opts);\n    }\n\n    /**\r\n     * Refresh the picker element and the associated input field\r\n     * @param {String} [target] - target item when refreshing one item only\r\n     * 'picker' or 'input'\r\n     * @param {Boolean} [forceRender] - whether to re-render the picker element\r\n     * regardless of its state instead of optimized refresh\r\n     */\n  }, {\n    key: \"refresh\",\n    value: function refresh() {\n      var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n      var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      if (target && typeof target !== 'string') {\n        forceRender = target;\n        target = undefined;\n      }\n      var mode;\n      if (target === 'picker') {\n        mode = 2;\n      } else if (target === 'input') {\n        mode = 1;\n      } else {\n        mode = 3;\n      }\n      refreshUI(this, mode, !forceRender);\n    }\n\n    /**\r\n     * Enter edit mode\r\n     * Not available on inline picker or when the picker element is hidden\r\n     */\n  }, {\n    key: \"enterEditMode\",\n    value: function enterEditMode() {\n      if (this.inline || !this.picker.active || this.editMode) {\n        return;\n      }\n      this.editMode = true;\n      this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700');\n    }\n\n    /**\r\n     * Exit from edit mode\r\n     * Not available on inline picker\r\n     * @param  {Object} [options] - function options\r\n     * - update: {boolean} - whether to call update() after exiting\r\n     *     If false, input field is revert to the existing selection\r\n     *     default: false\r\n     */\n  }, {\n    key: \"exitEditMode\",\n    value: function exitEditMode() {\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n      if (this.inline || !this.editMode) {\n        return;\n      }\n      var opts = Object.assign({\n        update: false\n      }, options);\n      delete this.editMode;\n      this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700');\n      if (opts.update) {\n        this.update(opts);\n      }\n    }\n  }], [{\n    key: \"formatDate\",\n    value: function formatDate$1(date, format, lang) {\n      return formatDate(date, format, lang && locales[lang] || locales.en);\n    }\n\n    /**\r\n     * Parse date string\r\n     * @param  {String|Date|Number} dateStr - date string, Date object or time\r\n     * value to parse\r\n     * @param  {String|Object} format - format string or object that contains\r\n     * toValue() custom parser, whose signature is\r\n     * - args:\r\n     *   - dateStr: {String|Date|Number} - the dateStr passed to the method\r\n     *   - format: {Object} - the format object passed to the method\r\n     *   - locale: {Object} - locale for the language specified by `lang`\r\n     * - return:\r\n     *     {Date|Number} parsed date or its time value\r\n     * @param  {String} [lang=en] - language code for the locale to use\r\n     * @return {Number} time value of parsed date\r\n     */\n  }, {\n    key: \"parseDate\",\n    value: function parseDate$1(dateStr, format, lang) {\n      return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n    }\n\n    /**\r\n     * @type {Object} - Installed locales in `[languageCode]: localeObject` format\r\n     * en`:_English (US)_ is pre-installed.\r\n     */\n  }, {\n    key: \"locales\",\n    get: function get() {\n      return locales;\n    }\n  }]);\n}();\n\n// filter out the config options inapproprite to pass to Datepicker\nfunction filterOptions(options) {\n  var newOpts = Object.assign({}, options);\n  delete newOpts.inputs;\n  delete newOpts.allowOneSidedRange;\n  delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n  return newOpts;\n}\nfunction setupDatepicker(rangepicker, changeDateListener, el, options) {\n  registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]);\n  new Datepicker(el, options, rangepicker);\n}\nfunction onChangeDate(rangepicker, ev) {\n  // to prevent both datepickers trigger the other side's update each other\n  if (rangepicker._updating) {\n    return;\n  }\n  rangepicker._updating = true;\n  var target = ev.target;\n  if (target.datepicker === undefined) {\n    return;\n  }\n  var datepickers = rangepicker.datepickers;\n  var setDateOptions = {\n    render: false\n  };\n  var changedSide = rangepicker.inputs.indexOf(target);\n  var otherSide = changedSide === 0 ? 1 : 0;\n  var changedDate = datepickers[changedSide].dates[0];\n  var otherDate = datepickers[otherSide].dates[0];\n  if (changedDate !== undefined && otherDate !== undefined) {\n    // if the start of the range > the end, swap them\n    if (changedSide === 0 && changedDate > otherDate) {\n      datepickers[0].setDate(otherDate, setDateOptions);\n      datepickers[1].setDate(changedDate, setDateOptions);\n    } else if (changedSide === 1 && changedDate < otherDate) {\n      datepickers[0].setDate(changedDate, setDateOptions);\n      datepickers[1].setDate(otherDate, setDateOptions);\n    }\n  } else if (!rangepicker.allowOneSidedRange) {\n    // to prevent the range from becoming one-sided, copy changed side's\n    // selection (no matter if it's empty) to the other side\n    if (changedDate !== undefined || otherDate !== undefined) {\n      setDateOptions.clear = true;\n      datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n    }\n  }\n  datepickers[0].picker.update().render();\n  datepickers[1].picker.update().render();\n  delete rangepicker._updating;\n}\n\n/**\r\n * Class representing a date range picker\r\n */\nvar DateRangePicker = /*#__PURE__*/function () {\n  /**\r\n   * Create a date range picker\r\n   * @param  {Element} element - element to bind a date range picker\r\n   * @param  {Object} [options] - config options\r\n   */\n  function DateRangePicker(element) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    _classCallCheck(this, DateRangePicker);\n    var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input'));\n    if (inputs.length < 2) {\n      return;\n    }\n    element.rangepicker = this;\n    this.element = element;\n    this.inputs = inputs.slice(0, 2);\n    this.allowOneSidedRange = !!options.allowOneSidedRange;\n    var changeDateListener = onChangeDate.bind(null, this);\n    var cleanOptions = filterOptions(options);\n    // in order for initial date setup to work right when pcicLvel > 0,\n    // let Datepicker constructor add the instance to the rangepicker\n    var datepickers = [];\n    Object.defineProperty(this, 'datepickers', {\n      get: function get() {\n        return datepickers;\n      }\n    });\n    setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n    setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n    Object.freeze(datepickers);\n    // normalize the range if inital dates are given\n    if (datepickers[0].dates.length > 0) {\n      onChangeDate(this, {\n        target: this.inputs[0]\n      });\n    } else if (datepickers[1].dates.length > 0) {\n      onChangeDate(this, {\n        target: this.inputs[1]\n      });\n    }\n  }\n\n  /**\r\n   * @type {Array} - selected date of the linked date pickers\r\n   */\n  return _createClass(DateRangePicker, [{\n    key: \"dates\",\n    get: function get() {\n      return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined;\n    }\n\n    /**\r\n     * Set new values to the config options\r\n     * @param {Object} options - config options to update\r\n     */\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      this.allowOneSidedRange = !!options.allowOneSidedRange;\n      var cleanOptions = filterOptions(options);\n      this.datepickers[0].setOptions(cleanOptions);\n      this.datepickers[1].setOptions(cleanOptions);\n    }\n\n    /**\r\n     * Destroy the DateRangePicker instance\r\n     * @return {DateRangePicker} - the instance destroyed\r\n     */\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      this.datepickers[0].destroy();\n      this.datepickers[1].destroy();\n      unregisterListeners(this);\n      delete this.element.rangepicker;\n    }\n\n    /**\r\n     * Get the start and end dates of the date range\r\n     *\r\n     * The method returns Date objects by default. If format string is passed,\r\n     * it returns date strings formatted in given format.\r\n     * The result array always contains 2 items (start date/end date) and\r\n     * undefined is used for unselected side. (e.g. If none is selected,\r\n     * the result will be [undefined, undefined]. If only the end date is set\r\n     * when allowOneSidedRange config option is true, [undefined, endDate] will\r\n     * be returned.)\r\n     *\r\n     * @param  {String} [format] - Format string to stringify the dates\r\n     * @return {Array} - Start and end dates\r\n     */\n  }, {\n    key: \"getDates\",\n    value: function getDates() {\n      var _this = this;\n      var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n      var callback = format ? function (date) {\n        return formatDate(date, format, _this.datepickers[0].config.locale);\n      } : function (date) {\n        return new Date(date);\n      };\n      return this.dates.map(function (date) {\n        return date === undefined ? date : callback(date);\n      });\n    }\n\n    /**\r\n     * Set the start and end dates of the date range\r\n     *\r\n     * The method calls datepicker.setDate() internally using each of the\r\n     * arguments in start→end order.\r\n     *\r\n     * When a clear: true option object is passed instead of a date, the method\r\n     * clears the date.\r\n     *\r\n     * If an invalid date, the same date as the current one or an option object\r\n     * without clear: true is passed, the method considers that argument as an\r\n     * \"ineffective\" argument because calling datepicker.setDate() with those\r\n     * values makes no changes to the date selection.\r\n     *\r\n     * When the allowOneSidedRange config option is false, passing {clear: true}\r\n     * to clear the range works only when it is done to the last effective\r\n     * argument (in other words, passed to rangeEnd or to rangeStart along with\r\n     * ineffective rangeEnd). This is because when the date range is changed,\r\n     * it gets normalized based on the last change at the end of the changing\r\n     * process.\r\n     *\r\n     * @param {Date|Number|String|Object} rangeStart - Start date of the range\r\n     * or {clear: true} to clear the date\r\n     * @param {Date|Number|String|Object} rangeEnd - End date of the range\r\n     * or {clear: true} to clear the date\r\n     */\n  }, {\n    key: \"setDates\",\n    value: function setDates(rangeStart, rangeEnd) {\n      var _this$datepickers = _slicedToArray(this.datepickers, 2),\n        datepicker0 = _this$datepickers[0],\n        datepicker1 = _this$datepickers[1];\n      var origDates = this.dates;\n\n      // If range normalization runs on every change, we can't set a new range\n      // that starts after the end of the current range correctly because the\n      // normalization process swaps start↔︎end right after setting the new start\n      // date. To prevent this, the normalization process needs to run once after\n      // both of the new dates are set.\n      this._updating = true;\n      datepicker0.setDate(rangeStart);\n      datepicker1.setDate(rangeEnd);\n      delete this._updating;\n      if (datepicker1.dates[0] !== origDates[1]) {\n        onChangeDate(this, {\n          target: this.inputs[1]\n        });\n      } else if (datepicker0.dates[0] !== origDates[0]) {\n        onChangeDate(this, {\n          target: this.inputs[0]\n        });\n      }\n    }\n  }]);\n}();\n\nexport { DateRangePicker, Datepicker };\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCopyClipboards } from './clipboard';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initInputCounters } from './input-counter';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\nimport { initDatepickers } from './datepicker';\nexport function initFlowbite() {\n    initAccordions();\n    initCollapses();\n    initCarousels();\n    initDismisses();\n    initDropdowns();\n    initModals();\n    initDrawers();\n    initTabs();\n    initTooltips();\n    initPopovers();\n    initDials();\n    initInputCounters();\n    initCopyClipboards();\n    initDatepickers();\n}\nif (typeof window !== 'undefined') {\n    window.initFlowbite = initFlowbite;\n}\n//# sourceMappingURL=index.js.map",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["PATTERN_POSITION_TABLE","_this","getBCHDigit","RS_BLOCK_TABLE","qrRSBlock","getRsBlockTable","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$interopDefault","a","__esModule","default","$parcel$resolve","url","parcelRequire","i","$parcel$bundleURL","Error","err","matches","stack","match","$parcel$distDir","URL","toString","generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","$f347e48613385d9c$var$reactive","$f347e48613385d9c$var$effect","$f347e48613385d9c$var$release","$f347e48613385d9c$var$raw","$f347e48613385d9c$var$theRawEvaluatorFunction","$f347e48613385d9c$var$activeEffectScope","$f347e48613385d9c$var$activeSub","$f347e48613385d9c$var$batchedSub","$f347e48613385d9c$var$batchedComputed","$parcel$global","globalThis","$parcel$modules","$parcel$inits","id","exports","init","module","call","code","register","parcelRegister","assign","r","u","o","c","f","h","d","l","$","y","m","t","String","length","Array","join","g","D","name","weekdays","split","months","ordinal","p","S","_","w","toLowerCase","O","clone","date","args","arguments","b","z","utcOffset","Math","abs","floor","year","month","add","ceil","M","ms","Q","replace","locale","$L","utc","$u","x","$x","$offset","parse","prototype","$d","Date","NaN","test","substring","UTC","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","isSame","startOf","endOf","isAfter","isBefore","$g","unix","valueOf","getTime","toDate","apply","slice","$locale","weekStart","$set","min","daysInMonth","Number","round","subtract","format","invalidDate","meridiem","monthsShort","weekdaysMin","weekdaysShort","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","Y","forEach","extend","$i","isDayjs","en","Ls","local","getUTCFullYear","getUTCMonth","getUTCDate","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","$localOffset","isUTC","LTS","LT","L","LL","LLL","LLLL","zone","offset","indexOf","concat","A","afternoon","milliseconds","SS","SSS","ss","mm","H","HH","hh","DD","Do","day","ww","MM","MMM","map","MMMM","YY","YYYY","Z","ZZ","customParseFormat","parseTwoDigitYear","formats","toUpperCase","regex","parser","exec","hours","minutes","seconds","week","isSameOrBefore","$0934e0939605d48c$export$a143d493d941bafc","$0934e0939605d48c$export$f99ded8fe4b79145","$bQMRt","$dbnIE","$0934e0939605d48c$var$customInspectSymbol","Symbol","$0934e0939605d48c$var$createBuffer","RangeError","buf","Uint8Array","setPrototypeOf","$0934e0939605d48c$var$Buffer","arg","encodingOrOffset","TypeError","$0934e0939605d48c$var$allocUnsafe","$0934e0939605d48c$var$from","value","$0934e0939605d48c$var$fromString","string","encoding","isEncoding","$0934e0939605d48c$var$byteLength","actual","write","ArrayBuffer","isView","$0934e0939605d48c$var$fromArrayView","arrayView","$0934e0939605d48c$var$isInstance","copy","$0934e0939605d48c$var$fromArrayBuffer","buffer","byteOffset","byteLength","$0934e0939605d48c$var$fromArrayLike","SharedArrayBuffer","from","$0934e0939605d48c$var$fromObject","obj","isBuffer","len","$0934e0939605d48c$var$checked","undefined","$0934e0939605d48c$var$numberIsNaN","type","isArray","data","toPrimitive","$0934e0939605d48c$var$assertSize","size","array","TYPED_ARRAY_SUPPORT","$0934e0939605d48c$var$typedArraySupport","arr","proto","foo","console","error","poolSize","alloc","fill","allocUnsafe","allocUnsafeSlow","mustMatch","loweredCase","$0934e0939605d48c$var$utf8ToBytes","$0934e0939605d48c$var$base64ToBytes","$0934e0939605d48c$var$slowToString","start","end","$0934e0939605d48c$var$hexSlice","out","$0934e0939605d48c$var$hexSliceLookupTable","$0934e0939605d48c$var$utf8Slice","$0934e0939605d48c$var$asciiSlice","ret","fromCharCode","$0934e0939605d48c$var$latin1Slice","fromByteArray","$0934e0939605d48c$var$utf16leSlice","bytes","res","$0934e0939605d48c$var$swap","$0934e0939605d48c$var$bidirectionalIndexOf","val","dir","$0934e0939605d48c$var$arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","read","readUInt16BE","foundIndex","found","j","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","push","codePoints","$0934e0939605d48c$var$checkOffset","ext","$0934e0939605d48c$var$checkInt","max","$0934e0939605d48c$var$wrtBigUInt64LE","$0934e0939605d48c$var$checkIntBI","lo","BigInt","hi","$0934e0939605d48c$var$wrtBigUInt64BE","$0934e0939605d48c$var$checkIEEE754","$0934e0939605d48c$var$writeFloat","littleEndian","noAssert","$0934e0939605d48c$var$writeDouble","_isBuffer","compare","list","pos","swap16","swap32","swap64","toLocaleString","equals","inspect","str","trim","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","remaining","$0934e0939605d48c$var$hexWrite","strLen","parsed","parseInt","substr","$0934e0939605d48c$var$blitBuffer","$0934e0939605d48c$var$asciiToBytes","byteArray","charCodeAt","$0934e0939605d48c$var$utf16leToBytes","units","_arr","newBuf","subarray","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","$0934e0939605d48c$var$defineBigIntMethod","$0934e0939605d48c$var$validateNumber","first","last","$0934e0939605d48c$var$boundsError","readBigUInt64BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","maxBytes","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeBigInt64LE","writeBigInt64BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","$0934e0939605d48c$var$errors","$0934e0939605d48c$var$E","sym","getMessage","Base","writable","message","$0934e0939605d48c$var$addNumericalSeparator","range","ERR_OUT_OF_RANGE","ERR_INVALID_ARG_TYPE","ERR_BUFFER_OUT_OF_BOUNDS","input","msg","received","isInteger","$0934e0939605d48c$var$INVALID_BASE64_RE","Infinity","leadSurrogate","toByteArray","$0934e0939605d48c$var$base64clean","src","dst","alphabet","table","i16","fn","$0934e0939605d48c$var$BufferBigIntNotDefined","$8a0a73e6b73fd0c4$export$d622b2ad8d90c771","$8a0a73e6b73fd0c4$export$6100ba28696e12de","b64","tmp","lens","$8a0a73e6b73fd0c4$var$getLens","validLen","placeHoldersLen","$8a0a73e6b73fd0c4$var$Arr","curByte","$8a0a73e6b73fd0c4$var$revLookup","uint8","extraBytes","parts","len2","$8a0a73e6b73fd0c4$var$encodeChunk","output","$8a0a73e6b73fd0c4$var$lookup","num","$8a0a73e6b73fd0c4$var$code","$8a0a73e6b73fd0c4$var$i","$8a0a73e6b73fd0c4$var$len","$998eb38f4d082829$export$aafa59e2e03f2942","$998eb38f4d082829$export$68d8715fc104d294","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","rt","isNaN","log","LN2","src_default","module_default","candidateSelectors","candidateSelector","NoElement","Element","msMatchesSelector","webkitMatchesSelector","getRootNode","element","_element$getRootNode","ownerDocument","_isInert","node","lookUp","_node$getAttribute","inertAtt","getAttribute","inert","closest","parentNode","isContentEditable","_node$getAttribute2","attValue","getCandidates","el","includeContainer","filter","candidates","querySelectorAll","unshift","_getCandidatesIteratively","elements","options","elementsToCheck","shift","tagName","assigned","assignedElements","nestedCandidates","children","flatten","scopeParent","validCandidate","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","getTabIndex","tabIndex","getSortOrderTabIndex","isScope","sortOrderedTabbables","documentOrder","isInput","getCheckedRadio","nodes","form","checked","isTabbableRadio","radioSet","radioScope","queryRadios","window","CSS","escape","isNonTabbableRadio","isRadio","isNodeAttached","_nodeRoot","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","nodeRoot","nodeRootHost","host","attached","contains","isZeroArea","_node$getBoundingClie","getBoundingClientRect","width","height","isHidden","_ref","displayCheck","checkVisibility","checkOpacity","opacityProperty","contentVisibilityAuto","visibilityProperty","checkVisibilityCSS","getComputedStyle","visibility","nodeUnderDetails","isDirectSummary","parentElement","originalNode","rootNode","assignedSlot","getClientRects","isDisabledFromFieldset","disabled","child","item","isNodeMatchingSelectorFocusable","some","isNodeMatchingSelectorTabbable","isShadowRootTabbable","shadowHostNode","_sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","content","sort","reduce","acc","sortable","tabbable","container","bind","focusable","isTabbable","focusableCandidateSelector","isFocusable","_arrayLikeToArray","asyncGeneratorStep","n2","done","Promise","resolve","then","_asyncToGenerator","_next","_throw","_createForOfIteratorHelper","iterator","_unsupportedIterableToArray","F","r2","next","return","ownKeys","keys","getOwnPropertySymbols","getOwnPropertyDescriptor","_objectSpread2","_toPropertyKey","_toPrimitive","getOwnPropertyDescriptors","defineProperties","_regenerator","toStringTag","o2","i2","u2","create","c2","Generator","_regeneratorDefine","r3","n3","o3","i3","c3","u3","f2","G","t2","r4","n4","o4","i4","d2","p2","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","e2","__proto__","displayName","e3","_invoke","activeFocusTraps","getActiveTrap","trapStack","activateTrap","trap","pauseTrap","trapIndex","splice","deactivateTrap","unpauseTrap","activeTrap","_setPausedState","_isManuallyPaused","isTabEvent","key","keyCode","isKeyForward","shiftKey","isKeyBackward","delay","setTimeout","valueOrHandler","_len","params","_key","getActualTarget","event","composedPath","internalTrapStack","createFocusTrap","userOptions","doc","document","config","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","isolateSubtrees","state","containers","containerGroups","tabbableGroups","adjacentElements","Set","alreadySilent","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","active","paused","manuallyPaused","delayInitialFocusTimer","recentNavEvent","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","findIndex","tabbableNodes","find","getNodeForOption","_ref2","_ref2$hasFallback","hasFallback","_ref2$params","optionValue","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","querySelector","getInitialFocusNode","tabbableOptions","activeElement","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","focusableNodes","lastTabbableNode","firstDomTabbableNode","lastDomTabbableNode","reverse","posTabIndexesFound","nextTabbableNode","forward","nodeIdx","group","_getActiveElement","_tryFocus","focus","preventScroll","isSelectableInput","select","getReturnFocusNode","previousActiveElement","findNextNavNode","_ref3","_ref3$isBackward","isBackward","destinationNode","containerIndex","containerGroup","startOfGroupIndex","_ref4","destinationGroupIndex","destinationGroup","lastOfGroupIndex","_ref5","_destinationGroupIndex","_destinationGroup","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","preventDefault","checkFocusIn","targetContained","Document","stopImmediatePropagation","nextNode","navAcrossContainers","mruContainerIdx","mruTabIdx","checkKeyNav","checkTabKey","checkEscapeKey","isEscapeEvent","checkClick","addListeners","promise","addEventListener","capture","passive","collectAdjacentElements","_setSubtreeIsolation","clear","_step","containerAncestors","_iterator","insideShadowRoot","ShadowRoot","current","parent","siblings","_step2","_iterator2","removeListeners","removeEventListener","mutationObserver","MutationObserver","mutations","isFocusedNodeRemoved","mutation","removedNodes","updateObservedNodes","disconnect","observe","subtree","childList","activate","activateOptions","_preexistingTrap$_set","_preexistingTrap$_set2","onActivate","onPostActivate","checkCanFocusTrap","preexistingTrap","revertState","_ref6","finishActivation","_callee","_context","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","clearTimeout","finishDeactivation","pause","pauseOptions","unpause","unpauseOptions","updateContainerElements","containerElements","elementsAsArray","Boolean","onPause","onPostPause","_ref7","onUnpause","onPostUnpause","finishUnpause","_callee2","_context2","isEnabled","_el$getAttribute","ariaHidden","setAttribute","hasAttribute","has","removeAttribute","Alpine","lastFocused","currentFocused","magic","within","__noscroll","__wrapAround","el2","withoutScrolling","noscroll","withWrapAround","wrap","previouslyFocused","focused","focusables","all","isFirst","els","isSameNode","isLast","getFirst","getLast","getNext","getPrevious","previous","prev","directive","skipDuringClone","expression","modifiers","effect","evaluateLater","cleanup","evaluator","oldValue","fallbackFocus","undoInert","initialFocus","autofocusEl","nextTick","setInert","undoDisableScrolling","releaseFocus","overflow","paddingRight","scrollbarWidth","scrollbarGutter","documentElement","style","innerWidth","clientWidth","evaluate","undos","crawlSiblingsUp","callback","body","sibling","cache","pop","object","enumerableOnly","symbols","source","_typeof","obj2","_extends","hasOwnProperty","userAgent","pattern","navigator","_throttleTimeout","dragEl","parentEl","ghostEl","rootEl","nextEl","lastDownEl","cloneEl","cloneHidden","oldIndex","newIndex","oldDraggableIndex","newDraggableIndex","activeGroup","putSortable","tapEvt","touchEvt","lastDx","lastDy","tapDistanceLeft","tapDistanceTop","moved","lastTarget","lastDirection","targetMoveDistance","ghostRelativeParent","scrollEl","scrollRootEl","lastAutoScrollX","lastAutoScrollY","touchEvt$1","pointerElemChangedInterval","IE11OrLess","Edge","FireFox","Safari","IOS","ChromeForAndroid","captureMode","on","off","selector","ctx","includeCTX","nodeType","R_SPACE","toggleClass","classList","className","css","prop","defaultView","currentStyle","matrix","selfOnly","appliedTransforms","transform","matrixFn","DOMMatrix","WebKitCSSMatrix","CSSMatrix","MSCSSMatrix","getElementsByTagName","getWindowScrollingElement","scrollingElement","getRect","relativeToContainingBlock","relativeToNonStaticParent","undoScale","top","elRect","left","bottom","right","innerHeight","containerRect","elMatrix","scaleX","scaleY","isScrolledPast","elSide","parentSide","getParentAutoScrollElement","elSideVal","parentSideVal","getChild","childNum","includeDragEl","currentChild","display","Sortable","ghost","dragged","draggable","lastChild","lastElementChild","previousElementSibling","index","index2","nodeName","getRelativeScrollOffset","offsetLeft","offsetTop","winScroller","scrollLeft","scrollTop","includeSelf","elem","gotSelf","scrollWidth","clientHeight","scrollHeight","elemCSS","overflowX","overflowY","isRectEqual","rect1","rect2","throttle","scrollBy","Polymer","jQuery","Zepto","dom","cloneNode","getChildContainingRectFromElement","ghostEl2","rect","animated","_rect$left","_rect$top","_rect$right","_rect$bottom","childRect","expando","plugins","defaults","initializeByDefault","PluginManager","mount","plugin","option2","pluginName","pluginEvent","eventName","evt","eventCanceled","cancel","eventNameGlobal","initializePlugins","defaults2","initialized","modified","modifyOption","getEventProperties","eventProperties","modifiedValue","optionListeners","_excluded","pluginEvent2","originalEvent","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceKeys","sourceSymbolKeys","propertyIsEnumerable","dragStarted","activeSortable","hideGhostForTarget","_hideGhostForTarget","unhideGhostForTarget","_unhideGhostForTarget","cloneNowHidden","cloneNowShown","dispatchSortableEvent","_dispatchEvent","info","dispatchEvent","rootEl2","targetEl","cloneEl2","toEl","fromEl","oldIndex2","newIndex2","oldDraggableIndex2","newDraggableIndex2","putSortable2","extraEventProperties","onName","charAt","CustomEvent","createEvent","initEvent","bubbles","cancelable","to","pullMode","lastPutMode","allEventProperties","awaitingDragStarted","ignoreNextClick","sortables","pastFirstInvertThresh","isCircumstantialInvert","ghostRelativeParentInitialScroll","_silent","savedInputChecked","documentExists","CSSFloatProperty","supportDraggable","createElement","supportCssPointerEvents","cssText","pointerEvents","_detectDirection","elCSS","elWidth","paddingLeft","borderLeftWidth","borderRightWidth","child1","child2","firstChildCSS","secondChildCSS","firstChildWidth","marginLeft","marginRight","secondChildWidth","flexDirection","gridTemplateColumns","touchingSideChild2","_dragElInRowColumn","dragRect","targetRect","vertical","dragElS1Opp","dragElS2Opp","dragElOppLength","targetS1Opp","targetS2Opp","targetOppLength","_detectNearestEmptySortable","threshold","emptyInsertThreshold","insideHorizontally","insideVertically","_prepareGroup","toFn","pull","dragEl2","sameGroup","otherGroup","originalGroup","checkPull","checkPut","put","revertClone","stopPropagation","nearestEmptyInsertDetectEvent","nearest","touches","clientX","clientY","_onDragOver","_checkOutsideTargetEl","_isOutsideThisEl","animationCallbackId","animationStates","store","handle","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","ghostClass","chosenClass","dragClass","ignore","preventOnFilter","animation","easing","setData","dataTransfer","textContent","dropBubble","dragoverBubble","dataIdAttr","delayOnTouchOnly","touchStartThreshold","devicePixelRatio","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","nativeDraggable","_onTapStart","captureAnimationState","fromRect","thisAnimationDuration","childMatrix","addAnimationState","removeAnimationState","indexOfObject","animateAll","animating","animationTime","animatingRect","toRect","time","prevFromRect","prevToRect","targetMatrix","sqrt","animate","animationResetTimer","currentRect","duration","translateX","translateY","animatingX","animatingY","forRepaintDummy","offsetWidth","_onMove","willInsertAfter","retVal","onMoveFn","onMove","draggedRect","related","relatedRect","_disableDraggable","_unsilent","_nextTick","_cancelNextTick","_getDirection","touch","pointerType","originalTarget","path","_saveInputCheckedState","root","inputs","idx","button","criteria","_prepareDragStart","dragStartFn","nextSibling","_lastX","_lastY","_onDrop","_disableDelayedDragEvents","_triggerDragStart","_disableDelayedDrag","_delayedDragTouchMoveHandler","_dragStartTimer","_onTouchMove","_onDragStart","selection","empty","getSelection","removeAllRanges","_dragStarted","fallback","_appendGhost","_nulling","_emulateDragOver","elementFromPoint","inserted","ghostMatrix","relativeScrollOffset","PositionGhostAbsolutely","dx","dy","cssMatrix","appendChild","_hideClone","cloneId","insertBefore","_loopId","setInterval","effectAllowed","_dragStartId","revert","isOwner","canSort","fromSortable","completedFired","dragOverEvent","_ignoreWhileAnimating","completed","elLastChild","_ghostIsLast","lastElRect","childContainingRect","changed","firstElRect","firstChild","targetBeforeFirstSwap","differentLevel","differentRowCol","side1","scrolledPastTop","scrollBefore","_getSwapDirection","isLastTarget","mouseOnAxis","targetLength","targetS1","targetS2","invert","dragIndex","nextElementSibling","after","moveVector","extra","axis","target2","after2","insertion","_showClone","_offMoveEvents","_offUpEvents","clearInterval","removeChild","save","handleEvent","dropEffect","toArray","order","_generateId","href","sum","useAnimation","items","option","destroy","utils","is","cancelNextTick","detectDirection","plugins2","version","autoScrolls","scrolling","clearAutoScrolls","autoScroll2","pid","clearPointerElemChangedInterval","autoScroll","isFallback","scroll","scrollCustomFn","sens","scrollSensitivity","speed","scrollSpeed","scrollThisInstance","scrollFn","layersOut","currentParent","canScrollX","canScrollY","scrollPosX","scrollPosY","vx","vy","layer","scrollOffsetY","scrollOffsetX","bubbleScroll","drop","toSortable","changedTouches","onSpill","Revert","Remove","preferences","ghostRef","_x_sort_key","handleSelector","hideGhost","useHandles","tmpl","handleSort","position","scope","$key","$item","$position","forceAutoScrollFallback","onSort","walk","skip","firstElementChild","onStart","opacity","onEnd","remove","keepElementsWithinMorphMarkers","cursor","append","startIndex","dragStart","parentSortable","AutoScroll","_handleAutoScroll","_handleFallbackAutoScroll","dragOverCompleted","dragOverBubble","nulling","ogElemScroller","newElem","$f9c2d27d3da567dd$export$2e2bcd8739ae039","newOption","editingIndex","editingText","entryMode","bulkText","hasUnsavedEdits","addOption","uniqueId","slugify","random","newOptionObj","text","deleteOption","$el","startEdit","$dispatch","isEditing","saveEdit","cancelEdit","dropIndex","getData","draggedItem","addBulkOptions","lines","line","existingTexts","serializedOptions","JSON","stringify","$ce2ad2657fcd5f58$export$2e2bcd8739ae039","formId","isConditional","fieldId","fieldValue","formType","jobId","selectedFieldId","conditionalValue","availableOptions","loadOptions","getOptionsUrl","response","fetch","json","opt","$8ad9010a1120133a$export$2e2bcd8739ae039","search","searchUrl","isCommandPaletteOpen","closingCallback","handleOpen","detail","search_url","searchData","handleClose","updateURL","baseUrl","placeholderDomain","searchParams","delete","newUrl","htmx","ajax","swap","$85d86a8d4647c102$export$2e2bcd8739ae039","$85d86a8d4647c102$var$ATS_APPLICATIONS_FILTER_TYPE_TO_PARAM_KEY","custom","org_custom","scorecard","case","assessment","videointerview","custom_form_field","hirex_video_interview","fieldName","fieldInitializedWithData","resetFromParent","initialOpenState","queryParam","isEmpty","displayText","initFromURL","cleanValue","labelText","panelLocked","submitted","filterScopedRequestInProgress","timeoutId","getFilterParamKey","filterType","getFilterResponsesFromUrl","paramKey","URLSearchParams","location","findFilterResponseForField","filterFieldId","field_id","findFilterResponsesForField","updateFilterJsonResponses","newEntries","responses","hide","__wrapper","initializeButton","$popover","open","$watch","$store","filterFields","openFilterPanelListener","$event","$root","$a26bd9c4c1da64af$export$2e2bcd8739ae039","$a26bd9c4c1da64af$var$NON_FILTER_PARAMS","$a26bd9c4c1da64af$var$canon","presets","activeId","urlTick","showSaveForm","reconcile","onChange","urlPresetId","dropPointer","liveFilters","dict","hasFilters","activePreset","hasActiveView","isDirty","ka","kb","preset","filters","k","every","activeName","history","replaceState","attachQueryParams","openSaveForm","closeSaveForm","$960a16a0d6d71319$export$2e2bcd8739ae039","modelValue","choices","htmlName","label","updateDropdownPosition","dropdown","$refs","comboboxContainer","dropdownHeight","offsetHeight","viewportHeight","spaceBelow","spaceAbove","minWidth","maxHeight","onDropdownOpen","$nextTick","selected","query","scrollHandler","resizeHandler","positionCheckInterval","hiddenInput","Event","addScrollListeners","checkPosition","requestAnimationFrame","removeScrollListeners","cancelAnimationFrame","filteredOptions","handleQueryChange","$64ad43a0866d003e$export$2e2bcd8739ae039","storageKey","maxFileSize","doNotRestore","fileName","fileTempURL","fileData","isDragging","DB_NAME","STORE_NAME","openDB","reject","request","indexedDB","onerror","onsuccess","result","onupgradeneeded","db","objectStoreNames","createObjectStore","keyPath","createIndex","unique","cleanupDB","currentKey","transaction","objectStore","getAllKeys","isFieldBased","startsWith","oncomplete","close","saveToDB","timestamp","warn","getFromDB","removeFromDB","getFieldStorageKey","generateStorageKey","encoder","TextEncoder","encode","hashHex","hashArray","crypto","subtle","digest","padStart","restoreFile","savedFile","createObjectURL","base64ToFile","DataTransfer","file","files","fieldKey","fileHandler","alert","reader","FileReader","onload","readAsDataURL","handleDragOver","handleDragLeave","handleDrop","droppedFiles","base64Data","filename","binaryString","atob","File","Blob","$58520a14f4c46160$export$2e2bcd8739ae039","maxFiles","maxTotalSize","accept","errors","reset","removeFile","validateFile","acceptedTypes","fileExtension","endsWith","category","totalSize","entry","addFiles","fileList","tempURL","syncInputFiles","inputFiles","removed","revokeObjectURL","formatSize","toFixed","$88e59f55e53b00e7$export$2e2bcd8739ae039","inputId","inputName","initialCountry","invalid","errorText","iti","maskPattern","nationalMode","placeholderNumberType","getExampleNumber","intlTelInputUtils","getSelectedCountryData","iso2","numberType","generateMaskPattern","exampleNumber","updateMask","example","handler","isValidNumber","utilsScript","preferredCountries","separateDialCode","showFlags","telInputName","phone","customPlaceholder","selectedCountryPlaceholder","selectedCountryData","geoIpLookup","country_code","catch","intlTelInput","$7c57d257fcc40f70$export$2e2bcd8739ae039","$7c57d257fcc40f70$var$sanitizeHtmlStyles","html","$7c57d257fcc40f70$var$isHtmlVisuallyEmpty","normalized","textOnly","beforeUnloadHandler","returnValue","htmxBeforeRequestHandler","boosted","confirm","rawFormData","description","rawInitialFormData","formData","initialFormData","checkFormState","elt","isDeepEqual","obj1","keys1","keys2","normalizedFormData","normalizedInitialFormData","success_message","$80ff41514b128c4d$export$2e2bcd8739ae039","stagesData","pipeline","job","canManagePipeline","editingStageId","newStageAdded","isModalOpen","selectedStage","deletedStageId","stageApplicationCount","requestInProgress","getCsrf","addStage","stageType","stageTypeIndex","typeData","stage_type","stages","color","reassignOrders","stageTypeData","stage","removeNewStage","newStageIndex","formHandler","stageData","payload","method","headers","ok","errorData","statusText","derived","getStageApplicationCount","stageId","fromOrg","application_count","deleteStage","executeDeleteStage","newStageId","confirmStageSelection","getNewOrderingDataFromHtml","newOrderingData","baseStages","counter","currentStage","dataset","stageTypeId","stageTypeLabel","stageIndex","stageName","colorCode","stageDescription","updateOrder","factory","converter","defaultAttributes","attributes","expires","now","encodeURIComponent","decodeURIComponent","stringifiedAttributes","attributeName","cookie","cookies","jar","_e","withAttributes","withConverter","freeze","$0de9a4c6f9b7d159$export$2e2bcd8739ae039","$5IiZx","rejectReasons","sortableUpdateUrl","availableCurrencies","isCurrencyModalOpen","currencyToDelete","currencyUsageCount","selectedReplacementCurrency","rejectReasonApplicationCount","selectedRejectReason","deletedRejectReasonId","sortableDeleteUrl","editingSortableItemId","showCreatedItem","getElementById","scrollIntoView","block","behavior","updateSortableItem","formDiv","itemId","reload","getRejectReasonApplicationCount","rejectReasonUrl","executeDeleteRejectReason","newRejectReasonId","deleteRejectReason","applicationCount","hiddenDeleteBtn","click","executeSimpleDelete","confirmRejectReasonSelection","checkCurrencyUsage","currencyId","can_delete","total_count","confirmCurrencyMigration","FormData","$5175c084def09cfa$export$2e2bcd8739ae039","$5175c084def09cfa$var$MENTION_PATTERN","$5175c084def09cfa$var$MIRROR_STYLE_PROPS","initialVisibleToUsers","mentionableUsers","possibleCSRFError","postLabels","everyone","one","many","visible_to_users","mentionMode","mentionQuery","mentionStartIndex","mentionActiveIndex","mentionDropdownTop","mentionDropdownLeft","commentText","mentionedUsers","emails","matchAll","email","mentionedNotInVisible","visibleIds","filteredMentions","q","postButtonText","count","getCaretCoordinates","ta","commentTextarea","mirror","mentionMirror","whiteSpace","wordWrap","selectionStart","marker","maxLeft","insertMention","user","before","newCursor","setSelectionRange","exitMentionMode","handleMentionInput","charBefore","scrollActiveIntoView","mentionDropdown","handleMentionKeydown","$a7a355238de703d2$export$2e2bcd8739ae039","$gkCGf","$kQKXt","$5S5Og","$fdWb7","$a49L5","$7IEdL","$4ReYh","$ednZI","$fXWMf","$1zXqe","$57Sxd","$cwcXZ","$b2sVO","$goFHH","previewFillers","usableVariables","recognizableVariables","imageUploadActive","enableHeadings","enableColor","enableHighlight","emailColumnWidth","previewLayoutPrefix","previewLayoutSuffix","mjmlStamp","editor","imageResizer","hasMjmlStamp","updatedAt","mjmlEligible","previewIsMjml","probedImageSrcs","activeTab","previewContent","isUploading","uploadError","colorPopoverVisible","customColorHex","activeColor","highlightPopoverVisible","customHighlightHex","activeHighlight","linkPopoverVisible","linkUrl","linkText","isEditingLink","savedSelectionFrom","savedSelectionTo","savedSelectedText","existingProseMirror","existingMenus","menu","Editor","extensions","configure","bulletList","keepMarks","keepAttributes","hardBreak","heading","levels","openOnClick","addGlobalAttributes","types","textAlign","parseHTML","renderHTML","align","HTMLAttributes","class","allowBase64","inline","addAttributes","addNodeView","img","entries","attrs","update","updatedNode","sync","alt","title","variables","TextStyle","Color","multicolor","editorProps","view","handleImageUpload","handlePaste","clipboardData","getAsFile","onCreate","convertExistingVariablesToNodes","onUpdate","capEmailImageWidths","onSelectionUpdate","createImageResizer","isEditable","startPos","posAtDOM","endPos","childNodes","commands","setTextSelection","showLinkPopover","isLoaded","isActive","opts","toggleHeading","chain","run","toggleBold","toggleItalic","toggleUnderline","toggleStrike","showColorPopover","getAttributes","hideColorPopover","setColor","hex","unsetColor","applyCustomColor","raw","currentColor","_updatedAt","showHighlightPopover","hideHighlightPopover","setHighlight","unsetHighlight","applyCustomHighlight","currentHighlight","selectedText","selectionFrom","selectionTo","linkMark","marks","$pos","mark","textBetween","linkStart","linkEnd","posMarks","linkUrlInput","hideLinkPopover","applyLink","hasSelection","originalText","newLinkText","deleteSelection","insertContent","setLink","removeLink","unsetLink","setTextAlign","toggleBulletList","toggleOrderedList","toggleBlockquote","setHorizontalRule","insertVariable","variable","cleanVariable","handleContentImported","hasChanges","tr","descendants","isText","variableRegex","fullMatch","variableName","replaceWith","schema","dispatch","insertImageFromFile","onchange","tempForm","createFileList","handleSuccess","xhr","responseText","success","IMAGE_ALIGNMENT_STYLES","setImage","handleError","dt","sized","stripSizeDeclarations","probes","decision","decideEmailImageWidth","action","setNodeMarkup","probe","Image","naturalWidth","later","any","setContent","importContent","getRawHTML","getHTML","DOMParser","parseFromString","paragraphs","innerHTML","existingStyle","emailResetStyle","combinedStyle","variableSpans","span","variableValue","textNode","createTextNode","replaceChild","htmlContent","beforeText","afterText","lastAOpen","isInsideATag","isInHref","renderPreview","getContent","compileMjml","getPreviewBody","htmlToMjml","mjmlModule","mjml2html","compiled","validationLevel","styles","head","outerHTML","finalContent","childrenToReturn","processImagesForPreview","processVariablesForPreview","replaceVariablesForPreview","images","$be3c84bcbbb2383c$export$f73578b718a57eaa","$be3c84bcbbb2383c$export$9f98db6234c4bd78","$be3c84bcbbb2383c$export$592682234826c0bd","$be3c84bcbbb2383c$export$c9d15bcfc6d42044","$be3c84bcbbb2383c$export$eeddbf09bb970356","$be3c84bcbbb2383c$export$f945f1716a5df33d","$be3c84bcbbb2383c$export$6a2a251dde98a23","$be3c84bcbbb2383c$export$fe94072fee8a6976","$be3c84bcbbb2383c$export$ba396fc65ff2f439","$be3c84bcbbb2383c$export$c5fd7af7c5c1efa","$be3c84bcbbb2383c$export$a8c1d2c13abf8822","$be3c84bcbbb2383c$export$7cda8d932e2f33c0","$be3c84bcbbb2383c$export$9f2cb743ab9131de","$be3c84bcbbb2383c$export$6ca56856dfeaf9b6","$be3c84bcbbb2383c$export$cc081314d3f6ffb0","$be3c84bcbbb2383c$export$f7316d89abe4e1c1","$be3c84bcbbb2383c$export$85c928794f8d04d4","$be3c84bcbbb2383c$export$3845eb97abe74944","$be3c84bcbbb2383c$export$d23217284a0e83b9","$be3c84bcbbb2383c$export$d3f82eb9fcc60fbc","$1LeRC","$edQEX","$18HhN","$1krlL","$gfgdn","$9D0ij","$ie1jF","$be3c84bcbbb2383c$export$83e24c5933427696","storedMarks","applyTransaction","reconfigure","$be3c84bcbbb2383c$export$475014de15a4c342","props","rawCommands","extensionManager","customState","hasCustomState","buildProps","fromEntries","command","getMeta","createChain","can","createCan","startTr","shouldDispatch","callbacks","hasStartTransaction","$be3c84bcbbb2383c$var$EventEmitter","emit","once","onceFn","removeAllListeners","extension","field","context","$be3c84bcbbb2383c$export$36e8c2990da8266f","baseExtensions","nodeExtensions","markExtensions","$be3c84bcbbb2383c$export$6e54e3e69d60df3d","extensionAttributes","nodeAndMarkExtensions","defaultAttribute","rendered","keepOnSplit","isRequired","storage","globalAttributes","globalAttribute","attribute","mergedAttr","$be3c84bcbbb2383c$export$d168cba70360dd3d","nameOrType","objects","mergedAttributes","valueClasses","existingClasses","insertClasses","valueClass","newStyles","existingStyles","styleMap","Map","property","part","$be3c84bcbbb2383c$export$bc79d84a417d7b02","nodeOrMark","$be3c84bcbbb2383c$export$f6e2535fb5126e54","$be3c84bcbbb2383c$export$7ce6b571718439ec","parseRule","getAttrs","oldAttributes","newAttributes","$be3c84bcbbb2383c$var$cleanUpSchemaItem","$be3c84bcbbb2383c$export$83b788b1a3698c03","$be3c84bcbbb2383c$export$ea18268b31f54e5","$be3c84bcbbb2383c$export$79b791167b05aada","enabled","enabledExtension","$be3c84bcbbb2383c$export$d1b60002472b2c81","fragment","documentFragment","DOMSerializer","fromSchema","serializeFragment","temporaryDocument","implementation","createHTMLDocument","$be3c84bcbbb2383c$export$49841c62b9eff15","$be3c84bcbbb2383c$export$9b55e2b000ad65f2","$be3c84bcbbb2383c$var$run$1","_a","rules","composing","$from","spec","nodeBefore","nodeAfter","matched","textBefore","$be3c84bcbbb2383c$export$a3e238086d556fa9","maxMatch","sliceEndPos","parentOffset","nodesBetween","_b","chunk","toText","isAtom","rule","$be3c84bcbbb2383c$var$inputRuleMatcherHandler","inputRuleMatch","steps","setMeta","$be3c84bcbbb2383c$export$53b83ca8eaab0383","$be3c84bcbbb2383c$export$dd702b3c8240390c","addOptions","extendedConfig","handleExit","currentPos","currentMarks","removeMark","removeStoredMark","insertText","$be3c84bcbbb2383c$export$e75df4392d073e98","$be3c84bcbbb2383c$var$tiptapDragFromOtherEditor","$be3c84bcbbb2383c$var$ExtensionManager","splittableMarks","$be3c84bcbbb2383c$export$71bc12a97b59a858","allAttributes","topNode","fields","extendNodeSchema","atom","selectable","whitespace","linebreakReplacement","defining","isolating","extensionAttribute","parseDOM","toDOM","renderText","extendMarkSchema","inclusive","excludes","spanning","Schema","setupExtensions","resolvedExtensions","duplicatedNames","addExtensions","flat","priorityA","priorityB","addCommands","inputRules","pasteRules","allPlugins","addKeyboardShortcuts","defaultBindings","ArrowRight","bindings","shortcut","keyMapPlugin","keymap","addInputRules","enableInputRules","addPasteRules","enablePasteRules","addProseMirrorPlugins","proseMirrorPlugins","$be3c84bcbbb2383c$export$f2a821f78e918151","Plugin","stored","simulatedInputMeta","isSimulatedInput","Fragment","selectionSet","docChanged","handleTextInput","handleDOMEvents","compositionend","$cursor","handleKeyDown","isInputRules","$be3c84bcbbb2383c$export$458282b0dddaaaa4","dropEvent","dragSourceElement","isPastedFromProseMirror","isDroppedFromProseMirror","pasteEvent","ClipboardEvent","DragEvent","processEvent","pasteEvt","$be3c84bcbbb2383c$var$run","handlers","isTextblock","resolvedFrom","resolvedTo","$be3c84bcbbb2383c$var$pasteRuleMatcherHandler","pasteRuleMatch","mapping","handleDragstart","handleDragend","dragFromOtherEditor","deleteRange","paste","_view","appendTransaction","transactions","oldState","isPaste","isDrop","simulatedPasteMeta","isSimulatedPaste","findDiffStart","findDiffEnd","nodeViews","getPos","decorations","innerDecorations","extensionStorage","onBeforeCreate","onTransaction","onFocus","onBlur","onDestroy","$be3c84bcbbb2383c$export$6e5992a7455d9ef6","startNode","blockSeparator","textSerializers","isBlock","textSerializer","$be3c84bcbbb2383c$export$fdd92b7d22ac071c","$be3c84bcbbb2383c$var$ClipboardTextSerializer","PluginKey","clipboardTextSerializer","ranges","$to","$be3c84bcbbb2383c$export$7aeb68f71172641d","object1","object2","strict","$be3c84bcbbb2383c$var$findMarkInSet","$be3c84bcbbb2383c$var$isMarkInSet","$be3c84bcbbb2383c$export$8ceae6d06f5c4df5","childAfter","childBefore","endIndex","nodeSize","childCount","$be3c84bcbbb2383c$export$b1269d6bf6e491ec","$be3c84bcbbb2383c$export$38b50bf35e79aaf3","TextSelection","$be3c84bcbbb2383c$export$6fb785c609d82593","$be3c84bcbbb2383c$export$225b0233b78e0d61","selectionAtStart","Selection","atStart","selectionAtEnd","atEnd","minPos","maxPos","$be3c84bcbbb2383c$export$86c1a3f9ab33da5c","platform","$be3c84bcbbb2383c$var$removeWhitespaces","nodeValue","$be3c84bcbbb2383c$export$1b93bf03550cde01","wrappedValue","$be3c84bcbbb2383c$export$12c64e96dddaee61","Node","parseOptions","isJSONContent","isTextContent","fromArray","nodeFromJSON","errorOnInvalidContent","check","cause","hasInvalidContent","invalidContent","contentCheckSchema","__tiptap__private__unknown__catch__all__node","tag","parseSlice","$be3c84bcbbb2383c$export$6159e43e50a41987","$be3c84bcbbb2383c$export$7a24a642b0c7ad29","typeOrName","nodeRanges","relativeFrom","relativeTo","selectionRange","matchedNodeRanges","nodeRange","$be3c84bcbbb2383c$export$e501dfcf737a48e0","$be3c84bcbbb2383c$export$8694e5c03a4df8e6","propOrProps","newObj","$be3c84bcbbb2383c$export$37330def6e48b4c9","$be3c84bcbbb2383c$export$2cd1d0e1f861bae0","$head","markItem","oldDoc","Transform","step","predicate","nodesWithPos","$be3c84bcbbb2383c$export$dc159056ffdb4c76","$be3c84bcbbb2383c$export$fe09644e3bc6166b","depth","schemaType","$be3c84bcbbb2383c$export$e8c6736926dcac42","nodeItem","uniqueChanges","changes","maps","stepMap","newStart","newEnd","oldStart","oldEnd","oldRange","newRange","$be3c84bcbbb2383c$export$2e2262a44ac61957","by","seen","change","rest","otherChange","$be3c84bcbbb2383c$export$49b565bbca5fba3a","typeName","$be3c84bcbbb2383c$export$72001287e2a5b413","markRanges","matchedRange","markRange","excludedRange","$be3c84bcbbb2383c$export$ead95ff48ba53ffd","$be3c84bcbbb2383c$export$cd58ff1081f6abe9","checkChildren","ignoreWhitespace","isLeaf","isContentEmpty","childNode","NodeSelection","$be3c84bcbbb2383c$var$ensureMarks","filteredMarks","ensureMarks","$be3c84bcbbb2383c$var$joinListBackwards","listType","nodeAt","canJoin","$be3c84bcbbb2383c$var$joinListForwards","$be3c84bcbbb2383c$var$commands","blur","isDestroyed","clearContent","emitUpdate","clearNodes","$mappedFrom","$mappedTo","blockRange","targetLiftDepth","liftTarget","defaultType","contentMatchAt","lift","createParagraphNear","cut","originRange","targetPos","contentSlice","newPos","insert","setSelection","deleteCurrentNode","currentNode","$anchor","deleteNode","enter","keyboardShortcut","exitCode","extendMarkRange","newSelection","delayedFocus","hasFocus","isSameSelection","eq","setStoredMarks","insertContentAt","newContent","updateSelection","applyInputRules","applyPasteRules","emitContentError","disableCollaboration","collaboration","isDisabled","preserveWhitespace","enableContentCheck","isOnlyTextContent","isOnlyBlockContent","$be3c84bcbbb2383c$var$isFragment","$be3c84bcbbb2383c$export$bf93acd215057ab0","startLen","ReplaceStep","ReplaceAroundStep","_from","_to","_newFrom","newTo","near","joinBackward","joinDown","joinForward","joinItemBackward","point","joinPoint","joinItemForward","joinTextblockBackward","joinTextblockForward","joinUp","$be3c84bcbbb2383c$var$normalizeKeyName","ctrl","meta","mod","KeyboardEvent","altKey","ctrlKey","metaKey","capturedTransaction","captureTransaction","someProp","newStep","maybeStep","liftEmptyBlock","liftListItem","newlineInCode","resetAttributes","markType","addMark","selectAll","AllSelection","selectNodeBackward","selectNodeForward","selectParentNode","selectTextblockEnd","selectTextblockStart","document1","setMark","addStoredMark","trimmedFrom","trimmedTo","$be3c84bcbbb2383c$var$canSetMark","newMarkType","isInSet","someNodeSupportsMark","inlineContent","allowsMarkType","_pos","isInline","parentAllowsMarkType","currentMarksAllowMarkType","otherMark","setNode","attributesToCopy","sameParent","setBlockType","updatedState","setNodeSelection","resolvedEnd","sinkListItem","splitBlock","canSplit","deflt","$be3c84bcbbb2383c$export$6133a2de0e8ac885","edgeCount","edge","hasRequiredAttrs","indexAfter","$first","canReplaceWith","splitListItem","overrideAttrs","grandParent","depthBefore","depthAfter","newNextTypeAttributes","nextType","contentMatch","createAndFill","Slice","sel","newTypeAttributes","toggleList","listTypeOrName","itemTypeOrName","itemType","parentList","validContent","canWrapInList","wrapInList","toggleMark","extendEmptyMarkRange","unsetMark","toggleNode","toggleTypeOrName","toggleType","toggleWrap","wrapIn","undoInputRule","undoable","getState","toUndo","docs","unsetAllMarks","updateAttributes","lastPos","lastNode","trimmedFrom2","trimmedTo2","$be3c84bcbbb2383c$var$Commands","$be3c84bcbbb2383c$var$Drop","$be3c84bcbbb2383c$var$Editable","editable","$be3c84bcbbb2383c$var$focusEventsPluginKey","$be3c84bcbbb2383c$var$FocusEvents","isFocused","$be3c84bcbbb2383c$var$Keymap","handleBackspace","$parentPos","parentIsIsolating","parentPos","isAtStart","handleDelete","baseKeymap","Enter","Backspace","Delete","pcKeymap","macKeymap","newState","docChanges","ignoreTr","allFrom","allEnd","$be3c84bcbbb2383c$var$Paste","$be3c84bcbbb2383c$var$Tabindex","tabindex","$be3c84bcbbb2383c$export$50c0270e74640068","actualDepth","resolvedPos","domAtPos","isNonTextAtom","childNodePos","nodeAttributes","attrKeys","firstItemOnly","childPos","$be3c84bcbbb2383c$var$style","isInitialized","injectCSS","injectNonce","autofocus","coreExtensionOptions","enableCoreExtensions","onContentError","onPaste","onDrop","isCapturingTransaction","setOptions","createExtensionManager","createCommandManager","createSchema","createView","commandManager","$be3c84bcbbb2383c$export$48321b481dd8a36","nonce","tiptapStyleTag","styleNode","setProps","updateState","setEditable","registerPlugin","handlePlugins","unregisterPlugin","nameOrPluginKeyToRemove","prevPlugins","nameOrPluginKey","allExtensions","EditorView","role","dispatchTransaction","EditorState","createNodeViews","prependClass","selectionHasChanged","nextState","nameOrAttributes","attributesOrUndefined","$be3c84bcbbb2383c$export$39e04e72f972b885","getJSON","getText","getCharacterCount","docView","$node","$doc","$nodes","captureGroup","startSpaces","textStart","textEnd","excludedMarks","markEnd","newNode","matchStart","lastChar","insertionStart","$start","wrapping","findWrapping","joinPredicate","matchType","$1485b5e112c966ab$export$52baac22726c72bf","$1485b5e112c966ab$export$7bd1839c3c5d5bd4","$1485b5e112c966ab$export$c2b25f346d19bcbb","$1485b5e112c966ab$export$c15d9ba76bdbcd95","$1485b5e112c966ab$export$e2940151ac854c0b","$1485b5e112c966ab$export$afa855cbfaff27f2","$1485b5e112c966ab$export$901cf72dabf2112a","$1485b5e112c966ab$export$1692d8b0e89cecc3","$1485b5e112c966ab$var$classesById","anchor","lastParent","openEnd","mapFrom","replaceRange","$1485b5e112c966ab$var$selectionToInsertionEnd","replaceRangeWith","findFrom","inner","$1485b5e112c966ab$var$findSelectionIn","bias","fromJSON","cls","jsonID","selectionClass","getBookmark","between","visible","$1485b5e112c966ab$var$warnedAboutTextSelection","$1485b5e112c966ab$var$checkTextSelection","marksAcross","other","$1485b5e112c966ab$var$TextBookmark","dPos","$end","deleted","mapResult","$1485b5e112c966ab$var$NodeBookmark","isSelectable","$1485b5e112c966ab$var$AllBookmark","$1485b5e112c966ab$export$febc5573c75cefb0","curSelectionFor","updated","curSelection","Mark","sameSet","addToSet","removeFromSet","storedMarksSet","addStep","setTime","replaceSelection","replaceSelectionWith","inheritMarks","none","isGeneric","scrolledIntoView","$1485b5e112c966ab$var$bind","self","$1485b5e112c966ab$var$FieldDesc","desc","$1485b5e112c966ab$var$baseFields","topNodeType","instance","_marks","_old","$1485b5e112c966ab$var$Configuration","pluginsByKey","filterTransaction","rootTr","trs","applyInner","haveNew","newInstance","$config","pluginFields","markFromJSON","$1485b5e112c966ab$var$bindProps","Function","$1485b5e112c966ab$var$createKey","$1485b5e112c966ab$var$keys","$0f7cdfd9537f6363$export$ffb0004e005737fa","$0f7cdfd9537f6363$export$c9d15bcfc6d42044","$0f7cdfd9537f6363$export$6de0e778727af3f2","$0f7cdfd9537f6363$export$b3f2e2de3a8baa1e","$0f7cdfd9537f6363$export$7bc461ceb770fb16","$0f7cdfd9537f6363$export$85c928794f8d04d4","$0f7cdfd9537f6363$export$b6a78689043c6521","$0f7cdfd9537f6363$export$19342e026b58ebb7","$0f7cdfd9537f6363$export$1059c6e7d2ce5669","$0f7cdfd9537f6363$export$3476b78f8f5a8b72","$6ybul","$0f7cdfd9537f6363$var$surrogateLow","ch","$0f7cdfd9537f6363$var$surrogateHigh","nodeStart","leafText","nodeText","sameMarkup","withText","cutByIndex","addToStart","addToEnd","maybeChild","$0f7cdfd9537f6363$var$findDiffStart","childA","childB","tA","tB","otherPos","$0f7cdfd9537f6363$var$findDiffEnd","posA","posB","iA","iB","$0f7cdfd9537f6363$var$retIndex","curPos","cur","toStringInner","joined","$0f7cdfd9537f6363$var$found","$0f7cdfd9537f6363$var$compareDeep","placed","rank","setFrom","openStart","insertAt","$0f7cdfd9537f6363$var$insertInto","dist","canReplace","removeBetween","$0f7cdfd9537f6363$var$removeRange","indexTo","offsetTo","maxOpen","openIsolating","$0f7cdfd9537f6363$var$checkJoin","main","compatibleContent","$0f7cdfd9537f6363$var$joinable","$before","$after","$0f7cdfd9537f6363$var$addNode","$0f7cdfd9537f6363$var$addRange","textOffset","$0f7cdfd9537f6363$var$close","$0f7cdfd9537f6363$var$replaceTwoWay","$0f7cdfd9537f6363$export$b2a42f82e59e4b19","resolveDepth","dOff","posAtIndex","sharedDepth","pred","rem","resolveCached","$0f7cdfd9537f6363$var$resolveCache","elts","$0f7cdfd9537f6363$var$ResolveCache","$0f7cdfd9537f6363$var$resolveCacheSize","WeakMap","$0f7cdfd9537f6363$var$emptyAttrs","hasMarkup","defaultAttrs","includeParents","$0f7cdfd9537f6363$var$replaceOuter","$0f7cdfd9537f6363$var$prepareSliceForReplace","$along","resolveNoCache","$0f7cdfd9537f6363$var$replaceThreeWay","rangeHasMark","toDebugString","$0f7cdfd9537f6363$var$wrapMarks","matchFragment","replacement","two","validEnd","allowsMarks","canAppend","checkContent","$0f7cdfd9537f6363$var$checkAttrs","$0f7cdfd9537f6363$var$TextNode","base","values","attr","validate","$0f7cdfd9537f6363$export$364ed450558d7ec4","wrapCache","nodeTypes","nfa","labeled","stream","$0f7cdfd9537f6363$var$TokenStream","expr","$0f7cdfd9537f6363$var$parseExpr","exprs","$0f7cdfd9537f6363$var$parseExprSeq","$0f7cdfd9537f6363$var$parseExprSubscript","$0f7cdfd9537f6363$var$parseExprAtom","eat","$0f7cdfd9537f6363$var$resolveName","isInGroup","$0f7cdfd9537f6363$var$parseExprRange","$0f7cdfd9537f6363$var$parseNum","$0f7cdfd9537f6363$var$nfa","connect","compile","loop","term","edges","explore","states","$0f7cdfd9537f6363$var$nullFrom","$0f7cdfd9537f6363$var$cmp","$0f7cdfd9537f6363$var$checkForDeadEnds","work","dead","frag","compatible","fillBefore","toEnd","finished","tp","computed","computeWrapping","via","scan","tokens","tok","SyntaxError","$0f7cdfd9537f6363$var$defaultAttrs","attrName","hasDefault","$0f7cdfd9537f6363$var$computeAttrs","built","given","$0f7cdfd9537f6363$var$initAttrs","$0f7cdfd9537f6363$var$Attribute","$0f7cdfd9537f6363$export$f06e977173f1857c","markSet","groups","computeAttrs","createChecked","checkAttrs","allowedMarks","topType","$0f7cdfd9537f6363$var$validateType","cached","instanceSpec","contentExprCache","contentExpr","markExpr","$0f7cdfd9537f6363$var$gatherMarks","excl","wrappings","tags","matchedStyles","normalizeLists","$0f7cdfd9537f6363$var$ParseContext","addAll","finish","matchTag","$0f7cdfd9537f6363$var$matches","mozMatchesSelector","namespace","namespaceURI","matchesContext","matchStyle","schemaRules","priority","nextPriority","$0f7cdfd9537f6363$var$copy","clearMark","domParser","$0f7cdfd9537f6363$var$blockTags","address","article","aside","blockquote","canvas","dd","div","dl","fieldset","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","noscript","ol","pre","section","tfoot","ul","$0f7cdfd9537f6363$var$ignoreTags","script","$0f7cdfd9537f6363$var$listTags","$0f7cdfd9537f6363$var$wsOptionsFor","$0f7cdfd9537f6363$var$OPT_PRESERVE_WS","$0f7cdfd9537f6363$var$NodeContext","solid","activeMarks","inlineContext","isOpen","localPreserveWS","topContext","topOptions","topMatch","findPositions","needsBlock","addDOM","addTextNode","addElement","preserveWS","insertNode","domNodeBefore","previousSibling","findInText","findInside","matchAfter","outerWS","ruleID","$0f7cdfd9537f6363$var$normalizeList","prevItem","ruleFromNode","ignoreFallback","closeParent","oldNeedsBlock","leafFallback","innerMarks","readStyles","addElementByRule","consuming","findPlace","getPropertyValue","continueAfter","startIn","contentDOM","contentElement","findAround","findAtPoint","cautious","route","penalty","cx","enterInner","textblockFromContext","closeExtra","nodeMarks","$0f7cdfd9537f6363$var$markMayApply","applyMarks","topOpen","compareDocumentPosition","useRoot","minDepth","$context","$0f7cdfd9537f6363$var$doc","createDocumentFragment","keep","markDOM","serializeMark","serializeNodeInner","$0f7cdfd9537f6363$var$renderSpec","serializeNode","renderSpec","structure","xmlNS","blockArraysIn","domSerializer","nodesFromSchema","marksFromSchema","$0f7cdfd9537f6363$var$gatherToDOM","$0f7cdfd9537f6363$var$suspiciousAttributeCache","suspicious","space","createElementNS","setAttributeNS","innerContent","$4c4ed464a3187d83$var$OrderedMap","$4c4ed464a3187d83$export$2e2bcd8739ae039","newKey","addBefore","place","without","prepend","toObject","$bd3a9ff77fa05947$export$f5f785078011b62","$bd3a9ff77fa05947$export$5c860b2e74034756","$bd3a9ff77fa05947$export$444ba800d6024a98","$bd3a9ff77fa05947$export$f1508b72cc76a09e","$bd3a9ff77fa05947$export$118cb9a83e81ba37","$bd3a9ff77fa05947$export$5aaf008897aef029","$bd3a9ff77fa05947$export$f15f89fd9d8cc98a","$bd3a9ff77fa05947$export$41b1d4cb5ceb3147","$bd3a9ff77fa05947$export$2819d598d048fc9c","$bd3a9ff77fa05947$export$ed6ac67359824afd","$bd3a9ff77fa05947$export$563a914cafbdc389","$bd3a9ff77fa05947$export$c77c9be41668e9b4","delInfo","recover","deletedBefore","$bd3a9ff77fa05947$var$DEL_BEFORE","deletedAfter","$bd3a9ff77fa05947$var$DEL_AFTER","deletedAcross","$bd3a9ff77fa05947$export$c53d01c3ab9721b3","inverted","assoc","_map","simple","oldSize","newSize","side","del","appendMap","mirrors","setMirror","appendMapping","startSize","mirr","getMirror","appendMappingInverted","inverse","corr","$bd3a9ff77fa05947$var$stepsByID","$bd3a9ff77fa05947$export$fd55ce593607084a","getMap","merge","stepType","stepClass","$bd3a9ff77fa05947$export$8ebf1578a4199c09","failed","fail","fromReplace","ReplaceError","$bd3a9ff77fa05947$var$mapFragment","mapped","$bd3a9ff77fa05947$export$d24ba56b0e3464a9","oldSlice","$bd3a9ff77fa05947$export$94150db1311f67a9","$bd3a9ff77fa05947$export$adefd16c402fee4e","newSet","$bd3a9ff77fa05947$export$fdf7d1dc10724da2","$bd3a9ff77fa05947$var$contentBetween","gapFrom","gapTo","gap","$bd3a9ff77fa05947$var$clearIncompatible","parentType","clearNewlines","replSteps","allowed","newline","innerRange","around","$bd3a9ff77fa05947$var$findWrappingOutside","outer","$bd3a9ff77fa05947$var$findWrappingInside","inside","innerMatch","lastType","$bd3a9ff77fa05947$var$withAttrs","$bd3a9ff77fa05947$var$replaceNewlines","$bd3a9ff77fa05947$var$replaceLinebreaks","typesAfter","innerType","overrideChild","baseType","$bd3a9ff77fa05947$var$joinable","$bd3a9ff77fa05947$var$canAppendWithSubstitutedLinebreaks","pass","insertPos","fits","$bd3a9ff77fa05947$var$fitsTrivially","$bd3a9ff77fa05947$var$Fitter","fit","unplaced","frontier","findFittable","placeNodes","openMore","dropNode","moveInline","mustMoveInline","placedSize","startDepth","sliceDepth","$bd3a9ff77fa05947$var$contentAt","frontierDepth","inject","openAtEnd","$bd3a9ff77fa05947$var$dropFromFragment","closeFrontierNode","openFrontierNode","taken","openEndCount","$bd3a9ff77fa05947$var$closeNodeStart","$bd3a9ff77fa05947$var$addToFragment","level","$bd3a9ff77fa05947$var$contentAfterFits","findCloseLevel","dropInner","move","$bd3a9ff77fa05947$var$invalidMarks","$bd3a9ff77fa05947$var$coveredDepths","$bd3a9ff77fa05947$export$626399c38172f669","$bd3a9ff77fa05947$export$f50707b396300ac9","$bd3a9ff77fa05947$export$88cc3a1dfce48dd3","TransformError","$bd3a9ff77fa05947$var$replaceRange","targetDepths","preferredTarget","definingAsContext","preferredTargetIndex","leftNodes","preferredDepth","leftNode","def","definingForContent","openDepth","targetDepth","expand","$bd3a9ff77fa05947$var$closeFragment","oldOpen","newOpen","startSteps","$bd3a9ff77fa05947$export$64cb316d02de1dd1","$bd3a9ff77fa05947$var$deleteRange","covered","$bd3a9ff77fa05947$var$lift","gapStart","gapEnd","splitting","$bd3a9ff77fa05947$var$join","convertNewlines","beforeType","supportLinebreak","$full","wrappers","$bd3a9ff77fa05947$var$wrap","attrsHere","startM","endM","$bd3a9ff77fa05947$var$setNodeMarkup","setNodeAttribute","setDocAttribute","addNodeMark","removeNodeMark","$bd3a9ff77fa05947$var$split","typeAfter","removing","adding","added","toRemove","MarkType","clearIncompatible","Decoration","DecorationSet","$a5ab20b42a0afbae$export$10e30b733df217ea","$a5ab20b42a0afbae$export$93bf62eb445cec98","$a5ab20b42a0afbae$export$eece2fccabbb77c5","$a5ab20b42a0afbae$var$domIndex","$a5ab20b42a0afbae$var$parentNode","$a5ab20b42a0afbae$var$reusedRange","$a5ab20b42a0afbae$var$textRange","createRange","setEnd","setStart","$a5ab20b42a0afbae$var$clearReusedRange","$a5ab20b42a0afbae$var$isEquivalentPosition","targetNode","targetOff","$a5ab20b42a0afbae$var$scanFor","$a5ab20b42a0afbae$var$atomElements","$a5ab20b42a0afbae$var$nodeSize","$a5ab20b42a0afbae$var$isElt","$a5ab20b42a0afbae$var$hasBlockDesc","contentEditable","pmViewDesc","ignoreForSelection","$a5ab20b42a0afbae$var$isText","$a5ab20b42a0afbae$var$contains","$a5ab20b42a0afbae$var$selectionCollapsed","domSel","focusNode","focusOffset","anchorNode","anchorOffset","$a5ab20b42a0afbae$var$keyEvent","$a5ab20b42a0afbae$var$nav","$a5ab20b42a0afbae$var$doc","$a5ab20b42a0afbae$var$agent","$a5ab20b42a0afbae$var$ie_edge","$a5ab20b42a0afbae$var$ie_upto10","$a5ab20b42a0afbae$var$ie_11up","$a5ab20b42a0afbae$var$ie","$a5ab20b42a0afbae$var$ie_version","documentMode","$a5ab20b42a0afbae$var$gecko","$a5ab20b42a0afbae$var$_chrome","$a5ab20b42a0afbae$var$chrome","$a5ab20b42a0afbae$var$chrome_version","$a5ab20b42a0afbae$var$safari","vendor","$a5ab20b42a0afbae$var$ios","maxTouchPoints","$a5ab20b42a0afbae$var$mac","$a5ab20b42a0afbae$var$windows","$a5ab20b42a0afbae$var$android","$a5ab20b42a0afbae$var$webkit","$a5ab20b42a0afbae$var$webkit_version","$a5ab20b42a0afbae$var$getSide","$a5ab20b42a0afbae$var$scrollRectIntoView","startDOM","$a5ab20b42a0afbae$var$nonZero","scrollThreshold","scrollMargin","atTop","bounding","$a5ab20b42a0afbae$var$windowRect","vp","visualViewport","$a5ab20b42a0afbae$var$clientRect","moveX","moveY","startX","startY","dX","dY","offsetParent","$a5ab20b42a0afbae$var$scrollStack","$a5ab20b42a0afbae$var$restoreScrollStack","dTop","$a5ab20b42a0afbae$var$preventScrollSupported","$a5ab20b42a0afbae$var$inRect","coords","$a5ab20b42a0afbae$var$singleRect","rects","$a5ab20b42a0afbae$var$BIDI","$a5ab20b42a0afbae$var$coordsAtPos","domFromPos","supportEmptyRange","rectBefore","rectAfter","$a5ab20b42a0afbae$var$flattenV","takeSide","$dom","$a5ab20b42a0afbae$var$flattenH","ignoreForCoords","$a5ab20b42a0afbae$var$withFlushedState","viewState","$a5ab20b42a0afbae$var$maybeRTL","$a5ab20b42a0afbae$var$cachedState","$a5ab20b42a0afbae$var$cachedDir","$a5ab20b42a0afbae$var$cachedResult","$a5ab20b42a0afbae$var$ViewDesc","dirty","matchesWidget","widget","matchesMark","matchesNode","outerDeco","innerDeco","matchesHack","addedNodes","stopEvent","border","posBeforeChild","posAtStart","posBefore","posAfter","posAtEnd","localPosFromDOM","domBefore","domAfter","nearestDesc","onlyNodes","getDesc","nodeDOM","posFromDOM","descAt","$a5ab20b42a0afbae$var$BufferHackViewDesc","$a5ab20b42a0afbae$var$WidgetViewDesc","domAtom","parseRange","fromOffset","toOffset","childBase","emptyChildAt","domAfterPos","force","anchorDOM","headDOM","selRange","domSelectionRange","brKludge","domSelExtended","collapse","addRange","ignoreMutation","contentLost","markDirty","startInside","endInside","markParentsDirty","stop","ignoreSelection","relaxedSide","$a5ab20b42a0afbae$var$CompositionViewDesc","textDOM","mut","$a5ab20b42a0afbae$var$MarkViewDesc","reparseInView","$a5ab20b42a0afbae$var$replaceNodes","$a5ab20b42a0afbae$var$NodeViewDesc","descObj","$a5ab20b42a0afbae$var$applyOuterDeco","$a5ab20b42a0afbae$var$CustomNodeViewDesc","$a5ab20b42a0afbae$var$TextViewDesc","$a5ab20b42a0afbae$var$sameOuterDeco","updateChildren","composition","localCompositionInfo","localComposition","compositionInChild","updater","$a5ab20b42a0afbae$var$ViewTreeUpdater","addBuffers","atBufferPos","$a5ab20b42a0afbae$var$iterDeco","deco","onWidget","onNode","locals","forChild","decoIndex","restNode","parentIndex","widgets","$a5ab20b42a0afbae$var$compareSide","cutAt","insideNode","syncToMarks","placeWidget","compIndex","addHackNode","findNodeMatch","findIndexWithChild","updateNodeAt","updateNextNode","addNode","addTextblockHacks","destroyRest","protectLocalComposition","$a5ab20b42a0afbae$var$renderDescs","parentDOM","descs","written","childDOM","$a5ab20b42a0afbae$var$rm","trackWrites","$a5ab20b42a0afbae$var$iosHacks","oldCSS","listStyle","compositionNode","textPos","$a5ab20b42a0afbae$var$findTextInFragment","childStart","compositionNodes","updateInner","updateOuterDeco","needsWrap","oldDOM","$a5ab20b42a0afbae$var$patchOuterDeco","$a5ab20b42a0afbae$var$computeOuterDeco","selectNode","deselectNode","$a5ab20b42a0afbae$var$docViewDesc","pmIsDeco","inParent","multiType","$a5ab20b42a0afbae$var$OuterDecoLevel","$a5ab20b42a0afbae$var$noDeco","outerDOM","prevComputed","curComputed","curDOM","$a5ab20b42a0afbae$var$patchAttributes","prevList","curList","removeProperty","lock","preMatch","$a5ab20b42a0afbae$var$preMatch","parentDesc","curDesc","descI","fI","destroyBetween","maxKeep","scanTo","isLocked","markDesc","targetDesc","domNode","nextDOM","locked","recreateWrapper","wrapper","requiresGeckoHackNode","hack","$a5ab20b42a0afbae$var$selectionFromDOM","origin","inWidget","$a5ab20b42a0afbae$var$isOnEdge","rangeCount","getRangeAt","startContainer","startOffset","endContainer","endOffset","$a5ab20b42a0afbae$var$selectionBetween","$a5ab20b42a0afbae$var$editorOwnsSelection","$a5ab20b42a0afbae$var$hasSelection","$a5ab20b42a0afbae$var$selectionToDOM","$a5ab20b42a0afbae$var$syncNodeSelection","mouseDown","curSel","domObserver","currentSelection","delaySelUpdate","setCurSelection","disconnectSelection","cursorWrapper","$a5ab20b42a0afbae$var$selectCursorWrapper","domSelection","resetEditableFrom","resetEditableTo","$a5ab20b42a0afbae$var$brokenSelectBetweenUneditable","$a5ab20b42a0afbae$var$temporarilyEditableNear","$a5ab20b42a0afbae$var$resetEditable","hideSelectionGuard","connectSelection","$a5ab20b42a0afbae$var$setEditable","wasDraggable","lastSelectedViewDesc","$a5ab20b42a0afbae$var$clearNodeSelection","$a5ab20b42a0afbae$var$hasFocusAndSelection","$a5ab20b42a0afbae$var$moveSelectionBlock","$side","$a5ab20b42a0afbae$var$apply","$a5ab20b42a0afbae$var$selectHorizontally","mods","$newHead","endOfTextblock","nodePos","$a5ab20b42a0afbae$var$isIgnorable","$a5ab20b42a0afbae$var$skipIgnoredNodes","$a5ab20b42a0afbae$var$skipIgnoredNodesBefore","moveNode","moveOffset","$a5ab20b42a0afbae$var$isBlockNode","$a5ab20b42a0afbae$var$setSelFocus","$a5ab20b42a0afbae$var$skipIgnoredNodesAfter","$a5ab20b42a0afbae$var$textNodeAfter","$a5ab20b42a0afbae$var$textNodeBefore","$a5ab20b42a0afbae$var$findDirection","coordsAtPos","mid","$a5ab20b42a0afbae$var$selectVertically","beyond","$a5ab20b42a0afbae$var$stopNativeHorizontalDelete","$a5ab20b42a0afbae$var$switchEditable","$a5ab20b42a0afbae$var$serializeForClipboard","serializer","$a5ab20b42a0afbae$var$detachedDoc","$a5ab20b42a0afbae$var$wrapMap","$a5ab20b42a0afbae$var$parseFromClipboard","plainText","inCode","asText","$a5ab20b42a0afbae$var$readHTML","metas","firstTag","$a5ab20b42a0afbae$var$maybeWrapTrusted","trustedTypes","$a5ab20b42a0afbae$var$_policy","defaultPolicy","createHTML","createPolicy","styleSheets","CSSStyleRule","selectorText","$a5ab20b42a0afbae$var$restoreReplacedSpaces","contextNode","sliceData","$a5ab20b42a0afbae$var$inlineParents","$a5ab20b42a0afbae$var$addContext","$a5ab20b42a0afbae$var$closeSlice","$a5ab20b42a0afbae$var$normalizeSiblings","lastWrap","inLast","$a5ab20b42a0afbae$var$addToSibling","$a5ab20b42a0afbae$var$withWrappers","$a5ab20b42a0afbae$var$closeRight","wrapped","$a5ab20b42a0afbae$var$closeRange","thead","tbody","caption","colgroup","col","td","th","$a5ab20b42a0afbae$var$handlers","$a5ab20b42a0afbae$var$editHandlers","$a5ab20b42a0afbae$var$passiveHandlers","touchstart","touchmove","$a5ab20b42a0afbae$var$InputState","lastKeyCode","lastKeyCodeTime","lastClick","lastSelectionOrigin","lastSelectionTime","lastIOSEnter","lastIOSEnterFallbackTimeout","lastFocus","lastTouch","lastChromeDelete","composingTimeout","compositionEndedAt","compositionID","badSafariComposition","compositionPendingChanges","domChangeCount","eventHandlers","$a5ab20b42a0afbae$var$setSelectionOrigin","$a5ab20b42a0afbae$var$ensureListeners","currentHandlers","$a5ab20b42a0afbae$var$runCustomHandler","defaultPrevented","$a5ab20b42a0afbae$var$eventCoords","$a5ab20b42a0afbae$var$runHandlerOnContext","propName","$a5ab20b42a0afbae$var$updateSelection","$a5ab20b42a0afbae$var$selectionForTripleClick","selectNodes","keydown","_event","$a5ab20b42a0afbae$var$inOrNearComposition","forceFlush","$a5ab20b42a0afbae$var$captureKeyDown","$a5ab20b42a0afbae$var$safariDownArrowBug","keyup","keypress","charCode","$a5ab20b42a0afbae$var$selectNodeModifier","mousedown","flushed","$a5ab20b42a0afbae$var$endComposition","posAtCoords","$a5ab20b42a0afbae$var$LeftMouseDown","$a5ab20b42a0afbae$var$defaultTripleClick","$a5ab20b42a0afbae$var$TripleClickDrag","$a5ab20b42a0afbae$var$MouseDown","mightDrag","up","buttons","delayedSelectionSync","startDoc","allowDefault","addAttr","setUneditable","updateAllowDefault","$a5ab20b42a0afbae$var$selectClickedNode","selectedNode","selectAt","$a5ab20b42a0afbae$var$selectClickedLeaf","startSelection","contextmenu","$a5ab20b42a0afbae$var$timeoutComposition","$a5ab20b42a0afbae$var$scheduleComposeEnd","$a5ab20b42a0afbae$var$clearComposition","restarting","flushingSoon","markCursor","compositionstart","compositionupdate","flush","$a5ab20b42a0afbae$var$selectionBeforeUneditable","pendingRecords","$a5ab20b42a0afbae$var$brokenClipboardAPI","$a5ab20b42a0afbae$var$doPaste","preferPlain","singleNode","$a5ab20b42a0afbae$var$getText","uris","clearData","$a5ab20b42a0afbae$var$captureCopy","selectNodeContents","plain","$a5ab20b42a0afbae$var$capturePaste","$a5ab20b42a0afbae$var$Dragging","$a5ab20b42a0afbae$var$dragCopyModifier","$a5ab20b42a0afbae$var$dragMoves","dragstart","draggedSlice","dragging","dragend","dragover","dragenter","$a5ab20b42a0afbae$var$handleDrop","eventPos","$mouse","dropPoint","isNode","beforeInsert","relatedTarget","beforeinput","inputType","flushSoon","$a5ab20b42a0afbae$var$compareObjs","$a5ab20b42a0afbae$var$WidgetType","$a5ab20b42a0afbae$var$noSpec","oldOffset","valid","$a5ab20b42a0afbae$var$InlineType","inclusiveStart","inclusiveEnd","$a5ab20b42a0afbae$var$NodeType","$a5ab20b42a0afbae$var$none","$a5ab20b42a0afbae$var$buildTree","$a5ab20b42a0afbae$var$empty","findInner","childOff","mapInner","newLocal","onRemove","$a5ab20b42a0afbae$var$mapChildren","oldChildren","baseOffset","dSize","mustRebuild","fromLocal","toLocal","childOffset","$a5ab20b42a0afbae$var$mapAndGatherRemainingDecorations","gather","$a5ab20b42a0afbae$var$byPos","addInner","childIndex","$a5ab20b42a0afbae$var$takeSpansForNode","$a5ab20b42a0afbae$var$moveSpans","$a5ab20b42a0afbae$var$withoutNulls","removeInner","dec","localSet","$a5ab20b42a0afbae$var$DecorationGroup","$a5ab20b42a0afbae$var$removeOverlap","localsInner","forEachSet","removeOverlap","members","mappedDecos","member","sorted","spans","hasNulls","localStart","working","$a5ab20b42a0afbae$var$insertAhead","$a5ab20b42a0afbae$var$viewDecorations","$a5ab20b42a0afbae$var$observeOptions","characterData","characterDataOldValue","attributeOldValue","$a5ab20b42a0afbae$var$useCharData","$a5ab20b42a0afbae$var$SelectionState","$a5ab20b42a0afbae$var$DOMObserver","handleDOMChange","queue","observer","onCharData","suppressingSelectionUpdates","lastChangedTextNode","prevValue","onSelectionChange","takeRecords","take","suppressSelectionUpdates","ignoreSelectionChange","ancestors","newSel","typeOver","registerMutation","brs","br","$a5ab20b42a0afbae$var$blockParent","readSel","scrollToSelection","$a5ab20b42a0afbae$var$cssChecked","$a5ab20b42a0afbae$var$cssCheckWarned","$a5ab20b42a0afbae$var$fixUpBadSafariComposition","nextCell","$a5ab20b42a0afbae$var$rangeToSelectionRange","currentAnchor","$a5ab20b42a0afbae$var$isInline","$a5ab20b42a0afbae$var$resolveSelection","parsedSel","$a5ab20b42a0afbae$var$skipClosingAndOpening","fromEnd","mayOpen","_root","mounted","prevDirectPlugins","pluginViews","_props","directPlugins","$a5ab20b42a0afbae$var$checkStateComponent","$a5ab20b42a0afbae$var$getEditable","$a5ab20b42a0afbae$var$updateCursorWrapper","$a5ab20b42a0afbae$var$buildNodeViews","$a5ab20b42a0afbae$var$computeDocDeco","$a5ab20b42a0afbae$var$readDOMChange","newTextlines","newLeaves","preferredPos","preferredSide","markChange","shared","$a5ab20b42a0afbae$var$parseBetween","from_","to_","$a5ab20b42a0afbae$var$findDiff","lenA","lenB","endA","endB","adjust","$fromA","inlineChange","$a5ab20b42a0afbae$var$looksLikeBackspace","old","$newStart","$newEnd","$next","chFrom","chTo","mkTr","$a5ab20b42a0afbae$var$isMarkChange","curMarks","prevMarks","$a5ab20b42a0afbae$var$initInput","$a5ab20b42a0afbae$var$eventBelongsToView","updatePluginViews","prevProps","updateStateInner","sel1","sel2","redraw","updateSel","pluginsChanged","$a5ab20b42a0afbae$var$changedNodeViews","nA","nB","updateDoc","oldScrollPos","overflowAnchor","$a5ab20b42a0afbae$var$storeScrollPos","refDOM","refTop","localRect","forceSelUpdate","chromeKludge","$a5ab20b42a0afbae$var$findCompositionNode","$a5ab20b42a0afbae$var$textNodeBefore$1","textAfter","$a5ab20b42a0afbae$var$textNodeAfter$1","descAfter","lastChanged","descBefore","updateDraggedNode","$a5ab20b42a0afbae$var$resetScrollPos","newRefTop","destroyPluginViews","prevState","pluginView","movedPos","$a5ab20b42a0afbae$var$focusPreventScroll","setActive","updateRoot","$a5ab20b42a0afbae$var$posAtCoords","caret","$a5ab20b42a0afbae$var$caretFromPoint","caretPositionFromPoint","offsetNode","caretRangeFromPoint","box","$a5ab20b42a0afbae$var$elementFromPoint","startI","$a5ab20b42a0afbae$var$posFromCaret","outsideBlock","sawBlock","$a5ab20b42a0afbae$var$posFromElement","$a5ab20b42a0afbae$var$findOffsetInNode","firstBelow","coordsBelow","dxClosest","coordsClosest","rowBot","rowTop","$a5ab20b42a0afbae$var$findOffsetInText","detach","$a5ab20b42a0afbae$var$endOfTextblock","boxes","$a5ab20b42a0afbae$var$endOfTextblockHorizontal","modify","oldNode","oldOff","oldBidiLevel","caretBidiLevel","newOff","pasteHTML","pasteText","serializeForClipboard","isConnected","$a5ab20b42a0afbae$var$deepActiveElement","$a5ab20b42a0afbae$var$safariShadowSelectionRange","getComposedRanges","getTargetRanges","execCommand","contenteditable","translate","$0d481d7d66f73fd8$export$5043418e2ef368d5","$0d481d7d66f73fd8$export$53f558754f8b9fd1","$16T16","$0d481d7d66f73fd8$var$mac","$0d481d7d66f73fd8$var$modifiers","$0d481d7d66f73fd8$var$normalize","$0d481d7d66f73fd8$var$normalizeKeyName","keyName","baseName","direct","noShift","fromCode","$0cf1073115e44648$export$e2253033e6e1df16","$0cf1073115e44648$export$fb33aafd75404f4c","$0cf1073115e44648$export$fba63a578e423eb","$0cf1073115e44648$var$mac","$0cf1073115e44648$var$ie","$0cf1073115e44648$var$i","$0cf1073115e44648$var$code","$7027fc0208e1ca62$export$e9a518a637d1e641","$7027fc0208e1ca62$export$979097b097459299","$7027fc0208e1ca62$export$1dce4f5c74f5f90f","$7027fc0208e1ca62$export$e796bb96d22be2cd","$7027fc0208e1ca62$export$52b8a4af68d19794","$7027fc0208e1ca62$export$bf432e340007f9ef","$7027fc0208e1ca62$export$5835b52680b80cfd","$7027fc0208e1ca62$export$4bb15e6d4372b393","$7027fc0208e1ca62$export$8dd967a262b064bb","$7027fc0208e1ca62$export$590e8b2c435046d9","$7027fc0208e1ca62$export$a5d02b4b65e94f91","$7027fc0208e1ca62$export$634b78845598ff5b","$7027fc0208e1ca62$export$d0f80ac1b4510888","$7027fc0208e1ca62$export$a3574cc681852c08","$7027fc0208e1ca62$export$a37f6aaa9169911d","$7027fc0208e1ca62$export$c3a64f3c9604a1b1","$7027fc0208e1ca62$export$a66c1876556415e5","$7027fc0208e1ca62$export$6e5e3c49755affd0","$7027fc0208e1ca62$export$36987f561c736aad","$7027fc0208e1ca62$var$atBlockStart","$cut","$7027fc0208e1ca62$var$findCutBefore","$7027fc0208e1ca62$var$deleteBarrier","$7027fc0208e1ca62$var$textblockAt","delStep","replaceStep","$7027fc0208e1ca62$var$joinTextblocksAround","$7027fc0208e1ca62$var$atBlockEnd","$7027fc0208e1ca62$var$findCutAfter","beforePos","afterPos","only","nodeSel","$7027fc0208e1ca62$var$defaultBlockAt","above","same","conn","isolated","canDelAfter","$joinAt","selAfter","at","afterDepth","$7027fc0208e1ca62$var$selectTextblockSide","applicable","$7027fc0208e1ca62$export$146a774cdef7663a","$7027fc0208e1ca62$var$backspace","$7027fc0208e1ca62$var$del","$7027fc0208e1ca62$export$eb36e8971b04df36","splitDepth","splitType","splitPos","$7027fc0208e1ca62$export$f292ad8dbd5063c8","os","$d44a8e25c17a1c43$export$a8aef45c6262afee","$d44a8e25c17a1c43$export$e74cd5adb935a538","$d44a8e25c17a1c43$export$dd505f850a3798a4","doJoin","outerRange","$insert","NodeRange","$d44a8e25c17a1c43$var$doWrapInList","joinBefore","$d44a8e25c17a1c43$var$liftToOuterList","endOfList","$d44a8e25c17a1c43$var$liftOutOfList","indexBefore","nestedBefore","$f2dd16eb0ddfb1e2$export$892596cec99bc70e","Extension","removeEmptyTextStyle","$3897b9a239049a66$export$1df879243bf2e42d","mergeNestedSpanStyles","$3897b9a239049a66$var$mergeNestedSpanStyles","childSpans","childSpan","childStyle","closestParentSpanStyleOfChild","mergeAttributes","$4466808fbf16c5bf$export$39dbc3f558091353","$4466808fbf16c5bf$export$55b9391925fcc072","$4466808fbf16c5bf$export$4ed30f8936af1979","backgroundColor","toggleHighlight","markInputRule","markPasteRule","$b15532edfcdf27fe$export$3e431a229df88919","$b15532edfcdf27fe$export$55b9391925fcc072","nodeInputRule","$7541d8e7fc52594e$export$a6c7ac8248d6e38a","$bgi9S","$7541d8e7fc52594e$var$UNICODE_WHITESPACE_PATTERN","$7541d8e7fc52594e$var$UNICODE_WHITESPACE_REGEX","RegExp","$7541d8e7fc52594e$var$UNICODE_WHITESPACE_REGEX_END","$7541d8e7fc52594e$var$UNICODE_WHITESPACE_REGEX_GLOBAL","$7541d8e7fc52594e$export$7e0e3bd861dc5487","uri","protocols","allowedProtocols","protocol","nextProtocol","scheme","exitable","shouldAutoLink","registerCustomProtocol","optionalSlashes","autolink","linkOnPaste","defaultProtocol","rel","isAllowedUri","defaultValidate","toggleLink","foundLinks","links","isLink","link","preventAutolink","combineTransactionSteps","getChangedRanges","textBlock","textBeforeWhitespace","nodesInChangedRanges","findChildrenInRange","endText","wordsBeforeWhitespace","lastWordBeforeSpace","lastWordAndBlockOffset","linksBeforeSpace","tokenize","getMarksBetween","handleClick","$53ad084189c41264$export$aad8462122ac592b","$53ad084189c41264$export$821627edc2d26f5f","$53ad084189c41264$export$660b2ee2d4fb4eff","$53ad084189c41264$export$71aa6c912b956294","$53ad084189c41264$var$numeric","$53ad084189c41264$var$ascii","$53ad084189c41264$var$alpha","$53ad084189c41264$var$asciinumeric","$53ad084189c41264$var$alphanumeric","$53ad084189c41264$var$domain","$53ad084189c41264$var$emoji","$53ad084189c41264$var$whitespace","$53ad084189c41264$var$addToGroups","flags","$53ad084189c41264$export$7254cc27399e90bd","token","jr","jd","accepts","go","exactOnly","tt","regexp","ts","templateState","$53ad084189c41264$var$flagsForToken","$53ad084189c41264$var$ta","$53ad084189c41264$var$tr","$53ad084189c41264$var$ts","$53ad084189c41264$var$tt","$53ad084189c41264$var$WORD","$53ad084189c41264$var$UWORD","$53ad084189c41264$var$ASCIINUMERICAL","$53ad084189c41264$var$ALPHANUMERICAL","$53ad084189c41264$var$LOCALHOST","$53ad084189c41264$var$UTLD","$53ad084189c41264$var$SCHEME","$53ad084189c41264$var$SLASH_SCHEME","$53ad084189c41264$var$OPENBRACE","$53ad084189c41264$var$CLOSEBRACE","$53ad084189c41264$var$OPENBRACKET","$53ad084189c41264$var$CLOSEBRACKET","$53ad084189c41264$var$OPENPAREN","$53ad084189c41264$var$CLOSEPAREN","$53ad084189c41264$var$OPENANGLEBRACKET","$53ad084189c41264$var$CLOSEANGLEBRACKET","$53ad084189c41264$var$FULLWIDTHLEFTPAREN","$53ad084189c41264$var$FULLWIDTHRIGHTPAREN","$53ad084189c41264$var$LEFTCORNERBRACKET","$53ad084189c41264$var$RIGHTCORNERBRACKET","$53ad084189c41264$var$LEFTWHITECORNERBRACKET","$53ad084189c41264$var$RIGHTWHITECORNERBRACKET","$53ad084189c41264$var$FULLWIDTHLESSTHAN","$53ad084189c41264$var$FULLWIDTHGREATERTHAN","$53ad084189c41264$var$AMPERSAND","$53ad084189c41264$var$APOSTROPHE","$53ad084189c41264$var$ASTERISK","$53ad084189c41264$var$BACKSLASH","$53ad084189c41264$var$BACKTICK","$53ad084189c41264$var$CARET","$53ad084189c41264$var$COLON","$53ad084189c41264$var$COMMA","$53ad084189c41264$var$DOLLAR","$53ad084189c41264$var$EQUALS","$53ad084189c41264$var$EXCLAMATION","$53ad084189c41264$var$HYPHEN","$53ad084189c41264$var$PERCENT","$53ad084189c41264$var$PIPE","$53ad084189c41264$var$PLUS","$53ad084189c41264$var$POUND","$53ad084189c41264$var$QUERY","$53ad084189c41264$var$QUOTE","$53ad084189c41264$var$FULLWIDTHMIDDLEDOT","$53ad084189c41264$var$SEMI","$53ad084189c41264$var$SLASH","$53ad084189c41264$var$TILDE","$53ad084189c41264$var$UNDERSCORE","$53ad084189c41264$var$EMOJI$1","$53ad084189c41264$var$tk","ALPHANUMERICAL","AMPERSAND","APOSTROPHE","ASCIINUMERICAL","ASTERISK","AT","BACKSLASH","BACKTICK","CARET","CLOSEANGLEBRACKET","CLOSEBRACE","CLOSEBRACKET","CLOSEPAREN","COLON","COMMA","DOLLAR","DOT","EMOJI","EQUALS","EXCLAMATION","FULLWIDTHGREATERTHAN","FULLWIDTHLEFTPAREN","FULLWIDTHLESSTHAN","FULLWIDTHMIDDLEDOT","FULLWIDTHRIGHTPAREN","HYPHEN","LEFTCORNERBRACKET","LEFTWHITECORNERBRACKET","LOCALHOST","NL","NUM","OPENANGLEBRACKET","OPENBRACE","OPENBRACKET","OPENPAREN","PERCENT","PIPE","PLUS","POUND","QUERY","QUOTE","RIGHTCORNERBRACKET","RIGHTWHITECORNERBRACKET","SCHEME","SEMI","SLASH","SLASH_SCHEME","SYM","TILDE","TLD","UNDERSCORE","UTLD","UWORD","WORD","WS","$53ad084189c41264$var$ASCII_LETTER","$53ad084189c41264$var$LETTER","$53ad084189c41264$var$EMOJI","$53ad084189c41264$var$DIGIT","$53ad084189c41264$var$SPACE","$53ad084189c41264$var$tlds","$53ad084189c41264$var$utlds","$53ad084189c41264$var$run$1","iterable","$53ad084189c41264$export$b9ca061da17f2d30","second","char","charCount","charCursor","tokenLength","latestAccepting","sinceAccepts","charsSinceAccepts","$53ad084189c41264$var$fastts","defaultt","$53ad084189c41264$var$decodeTlds","encoded","words","popDigitCount","digits","popCount","$53ad084189c41264$var$defaults","events","$53ad084189c41264$var$noop","formatHref","nl2br","truncate","ignoreTags","render","$53ad084189c41264$export$c019608e5b5bb4cb","defaultRender","ignoredTags","uppercaseIgnoredTags","$53ad084189c41264$export$28075db42e06f164","tk","$53ad084189c41264$export$21042e7280c1baba","Token","ir","operator","isCallable","getObj","renderFn","toHref","toFormattedString","formatted","toFormattedHref","toFormattedObject","formattedHref","eventListeners","$53ad084189c41264$var$Email","$53ad084189c41264$var$Text","$53ad084189c41264$var$Nl","$53ad084189c41264$var$Url","hasProtocol","$53ad084189c41264$var$makeState","$53ad084189c41264$var$initMultiToken","Multi","startIdx","endIdx","$53ad084189c41264$var$warn","$53ad084189c41264$var$INIT","scanner","tokenQueue","pluginQueue","customSchemes","optionalSlashSlash","$53ad084189c41264$export$2cd8252107eb640b","$53ad084189c41264$var$init$2","Start","Num","Asciinumeric","Alphanumeric","Word","UWord","Nl","Cr","Ws","Emoji","EmojiJoiner","wordjr","uwordjr","tld","ascii","utld","alpha","slashscheme","sch","$53ad084189c41264$var$init$1","qsAccepting","domain","qsNonAccepting","localpartAccepting","Localpart","Domain","Scheme","SlashScheme","LocalpartAt","LocalpartDot","EmailDomain","EmailDomainDot","Email$1","EmailDomainHyphen","numeric","DomainHyphen","DomainDot","DomainDotTld","DomainDotTldColon","DomainDotTldColonPort","Url$1","UrlNonaccept","SchemeColon","SlashSchemeColon","SlashSchemeColonSlash","UriPrefix","bracketPairs","OPEN","CLOSE","UrlOpen","UrlOpenQ","UrlOpenSyms","$53ad084189c41264$var$run","multis","textTokens","secondState","multiLength","subtokens","filtered","$59ebd7842d492c6a$export$3720eb13f948f394","alignments","defaultAlignment","alignment","unsetTextAlign","toggleTextAlign","$a594e465601a2726$export$741ee5bff4f2bc22","setUnderline","unsetUnderline","$b9f9f5a2724622fc$export$626064c5f1b71dc","$2u5A9","$2xosh","$dacGJ","$lluJu","$1BHwg","$9aRSD","$lnzEF","$i3rT4","$k7DD8","$4w6kx","$luyzA","$gaTMf","$5G1It","$cabgp","$l1c21","$dzWv6","$2jORh","$hirCw","bold","Bold","Blockquote","BulletList","Code","codeBlock","CodeBlock","dropcursor","Dropcursor","gapcursor","Gapcursor","HardBreak","Heading","History","horizontalRule","HorizontalRule","italic","Italic","listItem","ListItem","orderedList","OrderedList","paragraph","Paragraph","strike","Strike","Text","$1cf2b69bc5a33625$export$29a7a275fe11687","$1cf2b69bc5a33625$export$55b9391925fcc072","setBlockquote","unsetBlockquote","wrappingInputRule","$1d91a21df58be65e$export$95aa4184327d6b72","$1d91a21df58be65e$export$73ba4776eeca629e","$1d91a21df58be65e$export$47b75d481b90409","$1d91a21df58be65e$export$79cd1d2695dae26d","$1d91a21df58be65e$export$9b623891dbc7bd12","fontWeight","setBold","unsetBold","$99560d28eed0b417$export$546f606c73d35982","$99560d28eed0b417$var$TextStyleName","$99560d28eed0b417$export$55b9391925fcc072","itemTypeName","inputRule","$f8a365fd4a686699$export$52f0f02147b12c03","$f8a365fd4a686699$export$55b9391925fcc072","$f8a365fd4a686699$export$4ed30f8936af1979","setCode","toggleCode","unsetCode","$12bb012f8380ac9f$export$6c415d1fdae3dfdb","$12bb012f8380ac9f$export$4f70c75119de8367","$12bb012f8380ac9f$export$ab3d90a1a99abb84","languageClassPrefix","exitOnTripleEnter","exitOnArrowDown","defaultLanguage","language","languages","classNames","setCodeBlock","toggleCodeBlock","isAtEnd","endsWithDoubleNewline","ArrowDown","textblockTypeInputRule","vscode","vscodeData","mode","$6aded7bc8316e260$export$b34a105447964f9f","$f90767477590503a$export$bc16731f26f3900d","$e0Vzz","dropCursor","$a33db98654728ae4$export$b8e3092a3bfa2062","editorView","$a33db98654728ae4$var$DropCursorView","cursorPos","timeout","setCursor","updateOverlay","parentLeft","parentTop","nodeRect","toggle","pageXOffset","pageYOffset","scheduleRemoval","disableDropCursor","dragleave","$d24e23a4ef2e6f18$export$79c3dcaa03287f63","$f94iL","gapCursor","allowGapCursor","callOrReturn","getExtensionField","$b06b087e5c2a3bdd$export$54f46a1492d5247","$b06b087e5c2a3bdd$export$3d3d259665dcb4d4","$b06b087e5c2a3bdd$var$GapBookmark","$b06b087e5c2a3bdd$var$closedBefore","$b06b087e5c2a3bdd$var$closedAfter","override","findGapCursorFrom","mustMove","$cur","$b06b087e5c2a3bdd$var$drawGapCursor","createSelectionBetween","$b06b087e5c2a3bdd$var$handleClick","$b06b087e5c2a3bdd$var$handleKeyDown","$b06b087e5c2a3bdd$var$beforeinput","keydownHandler","$b06b087e5c2a3bdd$var$arrow","dirStr","$found","clickPos","$ea6333d2d29ed452$export$d3d3fac13fa635d9","setHardBreak","$349f0fa639d26eec$export$a8a3e93435678ff9","hasLevel","setHeading","$fa5737cb756d0d98$export$84202caead5689ba","$1WaCX","newGroupDelay","undo","redo","$16937392103b9646$export$55abd4691b317664","$16937392103b9646$export$21f930c44940fd98","$16937392103b9646$export$1688e416fee0a49e","$i65BY","$16937392103b9646$var$Branch","eventCount","popEvent","preserveItems","remap","remapping","addAfter","$16937392103b9646$var$Item","addTransform","histOptions","cutPoint","newItems","oldItems","lastItem","merged","$16937392103b9646$var$DEPTH_OVERFLOW","Mapping","mirrorPos","mirrorOffset","addMaps","rebased","rebasedTransform","rebasedCount","rebasedItems","newUntil","iRebased","newMaps","branch","emptyItemCount","compress","upto","newItem","$16937392103b9646$var$HistoryState","undone","prevRanges","prevTime","prevComposition","$16937392103b9646$var$rangesFor","$16937392103b9646$var$mapRanges","$16937392103b9646$var$cachedPreserveItems","$16937392103b9646$var$cachedPreserveItemsPlugins","$16937392103b9646$var$mustPreserveItems","historyPreserveItems","$16937392103b9646$var$historyKey","$16937392103b9646$var$closeHistoryKey","hist","$16937392103b9646$var$applyTransaction","historyTr","historyState","appended","newGroup","$16937392103b9646$var$isAdjacentTo","adjacent","$16937392103b9646$var$buildCommand","$16937392103b9646$var$histTransaction","newHist","$d2cd23df1a60c401$export$2e2bcd8739ae039","$d2cd23df1a60c401$var$RopeSequence","leafAppend","leafPrepend","appendInner","$d2cd23df1a60c401$var$Append","sliceInner","getInner","forEachInner","forEachInvertedInner","$d2cd23df1a60c401$var$Leaf","RopeSequence","Leaf","prototypeAccessors","Append","leftLen","$bc68d8b20cccf3bc$export$841e9c95e6429474","canInsertNode","$originFrom","$originTo","currentChain","isNodeSelection","$422234cfc13196b6$export$1cfcf4275506b1c6","$422234cfc13196b6$export$73ba4776eeca629e","$422234cfc13196b6$export$47b75d481b90409","$422234cfc13196b6$export$79cd1d2695dae26d","$422234cfc13196b6$export$9b623891dbc7bd12","fontStyle","setItalic","unsetItalic","$8daf27f2875b04a8$export$a7b06bfba60a8a78","bulletListTypeName","orderedListTypeName","Tab","$f4d3062c4e6e0bd6$export$547f885a1fca4e31","$f4d3062c4e6e0bd6$var$TextStyleName","$f4d3062c4e6e0bd6$export$55b9391925fcc072","attributesWithoutStart","$9e2bec406bc918cd$export$358a232cca1ab2ac","setParagraph","$1b04ce84bc40ae69$export$97176b8d51d2058f","$1b04ce84bc40ae69$export$55b9391925fcc072","$1b04ce84bc40ae69$export$4ed30f8936af1979","setStrike","unsetStrike","$c9798af43a358308$export$5f1af8db9871e1d6","$12672754d4794564$export$2e2bcd8739ae039","$4WF04","$12672754d4794564$var$renderSuggestionList","popup","positionPopup","clientRect","scrollY","scrollX","onExit","updateList","btn","clean","highlight","createPopup","zIndex","onKeyDown","currentIndex","startOfLine","allowSpaces","$399c61f74c68e54b$export$e88208c327ffe234","$399c61f74c68e54b$export$f7cfb3ba7349a641","allowSpacesOption","allowToIncludeChar","allowedPrefixes","escapedChar","escapeForRegEx","suffix","prefix","finalEscapedChar","textFrom","matchPrefix","matchPrefixIsAllowed","$399c61f74c68e54b$export$14a9e419a6a9b699","pluginKey","decorationTag","decorationClass","allow","findSuggestionMatch","findSuggestionMatch$1","renderer","_c","_d","_f","_g","started","stopped","handleStart","handleChange","decorationNode","decorationId","commandProps","currentDecorationNode","onBeforeStart","onBeforeUpdate","_oldState","$3bb7e8aed5b1c511$export$2e2bcd8739ae039","textDecoration","openBrace","closeBrace","newMarks","$91d288198827f45b$export$843fcab4be7a8d7d","$91d288198827f45b$export$2ab1496d1b3c0c54","center","wrapLeft","wrapRight","$91d288198827f45b$var$WRAP_ALIGN_ATTRIBUTES","$91d288198827f45b$var$WRAPPED_STYLE_KEYS","$91d288198827f45b$var$icon","$91d288198827f45b$var$block","$91d288198827f45b$var$ALIGNMENT_ICONS","$91d288198827f45b$var$ALIGNMENT_BUTTONS","$91d288198827f45b$var$ImageResizerClass","editorElement","maxWidth","selectedImage","resizeContainer","isResizing","createControls","attachListeners","alignContainer","onclick","alignImage","currentAlignment","wrapBtn","selectImage","deselectImage","startResize","doResize","endResize","showControls","updateButtonStates","imgRect","editorRect","float","styleKey","currentWidth","currentHeight","newStyle","startWidth","startHeight","aspectRatio","naturalHeight","userSelect","deltaX","deltaMax","deltaY","newWidth","newHeight","$68e1dffe4d0c6ef4$export$52173eece433aa80","$68e1dffe4d0c6ef4$export$aee7d52823245311","$68e1dffe4d0c6ef4$export$d10f0884d88aa2ca","re","auto","px","parseFloat","$68e1dffe4d0c6ef4$var$SIZE_DECLARATIONS","widthAttribute","column","$beff3cc23a6879ee$export$2e2bcd8739ae039","$beff3cc23a6879ee$var$EMAIL_ATTRIBUTES","bgcolor","valign","cellpadding","cellspacing","colspan","rowspan","$beff3cc23a6879ee$var$EmailTable","$beff3cc23a6879ee$var$EmailTableRow","$beff3cc23a6879ee$var$EmailTableCell","$beff3cc23a6879ee$var$EmailTableHeader","$beff3cc23a6879ee$var$EmailBlockAttributes","$7lV8K","bundle","preloadLink","as","async","$55a6d16921f8ab25$var$cachedBundles","$55a6d16921f8ab25$var$cachedPreloads","$55a6d16921f8ab25$var$cachedPrefetches","loader","$55a6d16921f8ab25$var$getCache","$98ad9a5c4b4a74be$export$2e2bcd8739ae039","$jhwMH","$jSNlv","$1QcTx","$5K4Ak","$98ad9a5c4b4a74be$var$CALENDAR_COLORS","bg","initialCurrentDate","userLocale","initialStartTime","initialEndTime","inProgress","currentDate","startTime","endTime","selectedTimezone","getCalendarColor","getLocalizedDayNames","dayNames","isoWeekday","processEvents","sortedEvents","startA","convertToLocalTime","when","start_time","start_timezone","startB","currentGroup","groupMaxEnd","eventStart","eventEnd","end_time","end_timezone","eventsOverlap","event1","event2","start1","end1","start2","end2","getEventHorizontalStyle","eventGroup","maxColumns","eventData","widthPercent","getEventAbsoluteStyle","startDate","endDate","startMinutes","endMinutes","leftPercent","durationMinutes","getEventStyle","getGridRow","getGridSpan","getEventGridStyle","getSelectedTimeOverlayStyle","startHours","endHours","startRow","endTotalMinutes","selectedRoomId","roomBusy","roomUnavailable","fetchRoomBusy","dayStart","status","busy","clearRoom","getRoomBusyStyle","slot","hour","minute","roomConflict","selectedStart","selectedEnd","busyStart","scrollToBusinessHours","eventContainer","slotHeight","today","setDate","nextMonth","previousMonth","nextDay","previousDay","getSelectedTimeStyle","getDaysArray","startDay","endDay","days","number","isCurrentMonth","isCurrentDay","isToday","isStartOfMonth","isEndOfMonth","isTopLeftDay","isTopRightDay","isBottomLeftDay","isBottomRightDay","unauthenticatedInterviewers","calendars","filteredEvents","calendarData","getEventClasses","localTime","formatTime","getDateTime","unixTime","timezone","targetTimezone","tz","guess","isEven","fetchCalendars","interviewer","calendar","Sentry","onLoad","client","getClient","captureException","interviewers","timeZoneName","Intl","DateTimeFormat","hour12","timeZone","formatToParts","$timezone","offsetName","resolvedOptions","setDefault","isoWeekYear","isoWeek","$07b722027a47cba2$export$2e2bcd8739ae039","debug","selectedLocation","selectedEmploymentType","selectedWorkplaceType","selectedDepartment","locations","departments","populateLocationOptions","populateDepartmentOptions","jobCards","locationsMap","card","locationId","hasDataLocationId","locationElement","locationName","localeCompare","departmentsMap","otherLabel","departmentId","departmentName","filterJobs","visibleCount","employmentType","workplaceType","matchesLocation","matchesEmployment","matchesWorkplace","matchesDepartment","updateDepartmentGroupsVisibility","toggleNoResultsMessage","departmentGroups","visibleJobs","show","noResultsEl","resetFilters","$f6ba04531c01af03$export$5c82fe5388917ea3","initialData","isWeighted","hasScoreableParts","weights","initialState","editingPartId","setupBeforeUnloadHandler","loadWeights","captureInitial","setupWatchers","__hirexScorecardWeightsDirty","dataEl","weightsSeed","normalizeWeights","updateDirty","deep","currentState","formatWeight","partId","totalWeight","hasClientError","isSaveButtonDisabled","$784350fd8b4a0673$export$2e2bcd8739ae039","initialConditions","operatorsMap","fieldsEndpointUrl","expanded","logic","hasFields","_initialConditions","_initialConditionsApplied","_applyInitialConditions","hasRules","hasGroups","_syncSelectValues","syncRuleSelects","ruleDiv","fieldSelect","operatorSelect","valueSelect","allSelects","multiple","valuesToSelect","topLevelRulesContainer","ruleDivs","groupIndex","groupDiv","groupDivs","groupRuleDivs","ruleIndex","addRule","removeRule","onFieldChange","getFieldById","field_type","onOperatorChange","addGroup","removeGroup","addRuleToGroup","removeRuleFromGroup","onFieldChangeInGroup","onOperatorChangeInGroup","getOperatorsForField","getFieldOptions","getValueInputType","fieldType","hasOptions","getConditionsJSON","isValidRule","serializeRule","validRules","validGroups","groupValidRules","loadFields","informationFormId","$ff97ccf4e3f7aa57$export$2e2bcd8739ae039","redirectingToLegacyTable","tableLoading","tableFailed","sidebarCollapsed","localStorage","getItem","mobileFiltersOpen","showOnlyMyJobs","cols","oneRowPerCandidate","oneRowStorageKey","settingsOpen","currentlyHighlyProbableSelectedCandidateIds","currentlyHighlyProbableSelectedApplicationIds","currentlyHighlyProbableSelectedRowCount","goLegacy","legacyCandidateListUrl","candidate_listing_settings","initCols","dropMalformedCaseFilters","dropMalformedEavFieldFilters","orgCustomFieldResponsesParam","savedFieldResponsesParam","jobFieldResponsesParam","scorecardResponsesParam","dropNonUuidTokens","reloadTable","setItem","restoreSlideoverFromUrl","_dispatch","composed","_collectSelectedRows","rowSelectIdPrefix","checkboxes","rows","checkbox","candidateId","applicationId","collectSelection","collectSelectedCandidateIds","collectSelectedApplicationIds","collectSelectedRowCount","rowCount","candidateIds","row","applicationIds","sendBulkAction","_requestWithSelection","loadForSelection","verb","_detailUrlFor","appId","candId","applicationDetailUrlTpl","candidateDetailUrlTpl","_defaultCols","_catalogCols","_normalizeStoredColOrder","colsOrderNormalizedKey","catalog","colsStorageKey","colsParam","applyCols","newCols","setColsFromView","csv","_pushAndReloadTable","isMobile","matchMedia","toggleSidebar","submitFilters","filterChanged","filterKey","cb","singleSelectChanged","radio","textFilterChanged","rangeFilterChanged","minKey","maxKey","clearSingleFilter","caseFilters","caseResponsesParam","usable","caseFilterChanged","caseId","sentinels","caseEmptyStatusValue","caseOverdueStatusValue","lookup","score__gte","score__lte","others","scorecardFilterChanged","scorecardId","eavFieldFilters","dropStaleScorecardFilters","ids","stale","kept","eavFieldChanged","dateFilterChanged","clearDateFilter","orderKey","clearSort","handlePageClick","pageNum","clearFilters","cleared","refresh","applyView","viewParams","encodedUrl","refreshSlideover","detailUrl","handleSlashKey","searchInput","pushState","fetchParams","oneRowParam","tableUrl","finally","$e37bba9fca4e290b$export$2e2bcd8739ae039","listUrl","filterUrl","rejected","sortOptions","filterNames","sheet","mobileSearch","mobileCount","fieldSearch","$persist","loadList","sortLabel","listParams","onSettled","pushParam","setOrder","toggleField","activeFilterIds","addFilter","$9a80a58dfd172945$export$40b84117a14e9e09","_listScroll","_pendingDetail","_scroller","openDetail","onDetailLoaded","goList","onEscape","chatPanel","$9a80a58dfd172945$export$f208eadbd57671d0","blockStates","everTouched","_timers","_fadeTimers","docState","hasDot","blockId","dotClass","_setState","onEdit","saveBlock","resp","editUrl","csrf","innerText","onStructureChange","pathInfo","requestPath","successful","$9a80a58dfd172945$export$c9ecfb1c06f2cc2f","messages","draft","opened","scrollDown","renderMarkdown","marked","DOMPurify","sanitize","send","turnUrl","getReader","decoder","TextDecoder","boundary","decode","rawEvent","dataLine","handleFrame","errorMessage","frame","thread","$f430c38a50cca8e5$export$7f664f745491654","$f430c38a50cca8e5$export$c58cbe8a8ef2f1b3","$f430c38a50cca8e5$var$CHANGED_EVENT","$f430c38a50cca8e5$var$registry","pushedBy","clearOn","resets","initial","$f430c38a50cca8e5$var$navigate","mutate","back","$3b365586fec8dddb$export$2e2bcd8739ae039","$7thvI","$kXOQU","tabs","userDetailUrlTemplate","groupCreateUrl","groupEditUrlTemplate","uuidPlaceholder","tab","tabParam","searchParam","pageParam","refreshQueued","refreshQuiet","userParam","userSlideoverKey","groupModalOpen","groupModalParam","isGuestUser","GUESTS","urlParam","USERS","stackOverBase","openUser","closeUserFromBack","loadGroupModal","quiet","loadSlideover","refreshUser","queueMicrotask","_reloadTable","GROUPS","process","$5708d315b3c58d06$export$a020ab39c95810eb","$ba4454e3ff65ae01$export$2e2bcd8739ae039","unseen","panelUrl","announceUrl","loading","panelLoadedAt","transitionId","sessionStorage","openNote","video","play","startViewTransition","whatsNewVt","load","childElementCount","ensurePanel","loaded","togglePopover","showAll","noteId","dot","$09e5aee2c0c729f7$var$__importDefault","__importDefault","$09e5aee2c0c729f7$var$assert_valid_user_options_1","$09e5aee2c0c729f7$var$suggest_email_1","$09e5aee2c0c729f7$var$get_options_1","suggested","$e1c6017e60cbbf79$var$__importDefault","$e1c6017e60cbbf79$var$assert_1","domains","topLevelDomains","secondLevelDomains","distanceFunction","condition","$acabd4298c556def$var$__importDefault","$acabd4298c556def$var$encode_email_1","$acabd4298c556def$var$find_closest_domain_1","$acabd4298c556def$var$parse_email_1","encodedEmail","domainThreshold","secondLevelDomain","topLevelDomain","closestDomain","full","closestSecondLevelDomain","secondLevelThreshold","closestTopLevelDomain","topLevelThreshold","rtrn","encodeURI","minDist","$b16ad95621c54918$var$__importDefault","$b16ad95621c54918$var$trim_1","emailStr","sld","domainParts","$ee0b0dfb4082f018$var$WHITESPACE_PATTERN","$ee0b0dfb4082f018$var$right","trimRight","trimLeft","$2ffcM","DEFAULT_CONFIG","$1a28c6e684133df7$var$__importDefault","POPULAR_TLDS","POPULAR_DOMAINS","$1a28c6e684133df7$var$sift3_distance_1","$1a28c6e684133df7$var$POPULAR_DOMAINS","$1a28c6e684133df7$var$POPULAR_TLDS","$1a28c6e684133df7$var$DEFAULT_CONFIG","s1","s2","offset1","offset2","lcs","$6N7gE","$17sxp","relativeTime","future","past","yy","$e4b487e979d7c06d$require$Buffer","$N0o3H","Buffer","$e4b487e979d7c06d$var$__defProp","$e4b487e979d7c06d$var$__defProps","$e4b487e979d7c06d$var$__getOwnPropDescs","$e4b487e979d7c06d$var$__getOwnPropSymbols","$e4b487e979d7c06d$var$__hasOwnProp","$e4b487e979d7c06d$var$__propIsEnum","$e4b487e979d7c06d$var$__defNormalProp","$e4b487e979d7c06d$var$__spreadValues","a2","b2","$e4b487e979d7c06d$var$__spreadProps","$e4b487e979d7c06d$var$__publicField","$e4b487e979d7c06d$var$__async","__this","__arguments","generator","fulfilled","throw","$e4b487e979d7c06d$var$Environment","isSSR","isBrowser","hasAPI","api","getApex","Apex","$e4b487e979d7c06d$var$SSRElement","$e4b487e979d7c06d$var$SSRClassList","_ssrWidth","_ssrHeight","_ssrMode","name2","referenceNode","existingIndex","getElementsByClassName","childrenStr","classes","$e4b487e979d7c06d$var$SSRDOMShim","SVGNS","XLINKNS","qualifiedName","createXMLSerializer","serializeToString","createDOMParser","_type","$e4b487e979d7c06d$var$shim","$e4b487e979d7c06d$var$xmlSerializerInstance","$e4b487e979d7c06d$var$domParserInstance","$e4b487e979d7c06d$var$BrowserAPIs","getXMLSerializer","XMLSerializer","getDOMParser","addWindowEventListener","options2","removeWindowEventListener","elementExists","getWindow","getDocument","_getShim","_resetShim","$e4b487e979d7c06d$var$fnIds","$e4b487e979d7c06d$var$fnSeq","$e4b487e979d7c06d$var$Utils$1","Utils","isObject","isSafari","extendArray","arrToExtend","resultArr","extendedArr","monthMod","visited","shallow","cloneResult","shallowClone","stringifyForCompare","shallowEqual","log10","LN10","roundToBase10","roundToBase","parseNumber","stripNumber","precision","toPrecision","randomId","noExponents","getDimensions","computedStyle","elementWidth","elementHeight","paddingTop","paddingBottom","getLargestStringFromArr","aa","bb","hexToRgba","hexStr","getOpacityFromRGBA","rgba","parseHex","relativeLuminance","g2","channel","v2","getContrastRatio","hex1","hex2","rgb1","rgb2","l1","l2","lighter","darker","rgb2hex","rgb","shadeRGBColor","percent","R","G2","B","shadeHexColor","shadeColor","isColorHex","isCSSVariable","getThemeColor","computedColor","tempElem","applyOpacityToColor","getPolygonPos","dataPointsLen","dotsArray","angle","PI","sin","cos","polarToCartesian","centerX","centerY","radius","angleInDegrees","angleInRadians","escapeString","escapeWith","newStr","negToZero","moveIndexInArray","old_index","new_index","extractNumber","findAncestor","setELstyles","preciseAddition","factor","isNumber","isFloat","isMsEdge","ua","getGCD","getPrimeFactors","factors","divisor","big","$e4b487e979d7c06d$var$DateTime","w2","months31","months30","daysCntOfYear","isValidDate","parseDate","getTimeStamp","dateStr","xaxis","labels","datetimeUTC","parseDateWithTimezone","formatDate","globals","shortMonths","dddd","ddd","shortDays","ii","s3","M2","m2","T","K","tzHrs","tzMin","getTimeUnitsfromTimestamp","minX","maxX","tsMin","tsMax","minD","maxD","minMillisecond","maxMillisecond","minSecond","maxSecond","minMinute","maxMinute","minHour","maxHour","minDate","maxDate","minMonth","maxMonth","minYear","maxYear","isLeapYear","calculcateLastDaysOfMonth","determineDaysOfMonths","determineDaysOfYear","determineRemainingDaysOfYear","dayOfYear","getDateFields","weekday","addInterval","unit","setUTCFullYear","setUTCMonth","setUTCDate","setUTCHours","setUTCMinutes","setUTCSeconds","setFullYear","setMonth","setHours","setMinutes","setSeconds","ceilToBoundary","aligned","setUTCMilliseconds","REF_MONDAY_UTC","alignedWeeks","weeksSinceRef","startOfDay","setMilliseconds","REF_MONDAY_LOCAL","isAtBoundary","$e4b487e979d7c06d$var$Formatters","tooltipKeyFormat","xLabelFormat","_opts","formatter","tooltip","datetimeObj","defaultGeneralFormatter","defaultYFormatter","yaxe","yValueDecimal","decimalsInFloat","setLabelFormatters","fmt","formatters","xaxisTooltipFormatter","ttKeyFormatter","ttZFormatter","legendFormatter","xLabelFormatter","convertedCatToNumeric","decimals","isBarHorizontal","maxY","minY","ttVal","legend","yLabelFormatters","yaxis","chart","xyCharts","heatmapLabelFormatters","yAxisScale","seriesData","seriesNames","longest","niceMax","niceMin","$e4b487e979d7c06d$var$en","$e4b487e979d7c06d$var$Options","yAxis","showAlways","showForNullSeries","seriesName","opposite","reversed","logarithmic","logBase","tickAmount","stepSize","forceNiceScale","alignZero","floating","showDuplicates","offsetX","offsetY","rotate","padding","colors","fontSize","fontFamily","cssClass","axisBorder","axisTicks","crosshairs","stroke","dashArray","pointAnnotation","yAxisIndex","seriesIndex","mouseEnter","mouseLeave","fillColor","strokeWidth","strokeColor","shape","borderColor","borderWidth","borderRadius","textAnchor","background","customSVG","SVG","image","theme","yAxisAnnotation","y2","strokeDashArray","xAxisAnnotation","x2","orientation","foreColor","appendTo","annotations","points","texts","shapes","animations","animateGradually","dynamicAnimation","chartTypeMorph","respectReducedMotion","largeDatasetThreshold","locales","defaultLocale","perspectives","serializeOptions","maxDepth","coalesceMs","keyboard","rendererThreshold","layers","series","grid","dataLabels","dropShadow","enabledOnSeries","animationEnd","beforeMount","mouseMove","xAxisLabelClick","legendClick","markerClick","dataPointSelection","dataPointMouseEnter","dataPointMouseLeave","beforeZoom","beforeResetZoom","zoomed","scrolled","brushScrolled","crossFilter","filterChange","annotationDragged","annotationEdited","annotationCreated","annotationStyled","annotationDeleted","measured","keyDown","keyUp","parentHeightOffset","redrawOnParentResize","redrawOnWindowResize","license","injectStyleSheet","sparkline","brush","autoScaleYaxis","targets","dimOpacity","dimension","bins","ink","palette","snap","noteColors","measure","pinOnRelease","down","neutral","guide","band","guides","markers","contextMenu","annotate","xline","yline","noteText","stacked","stackOnlyBar","stackType","streaming","maxPoints","toolbar","tools","download","zoom","zoomin","zoomout","pan","customIcons","export","columnDelimiter","headerCategory","headerValue","categoryFormatter","valueFormatter","png","svg","scale","embedFonts","autoSelected","allowMouseWheelZoom","pinch","zoomedArea","inertia","friction","accessibility","announcements","navigation","wrapAround","dataReducer","algorithm","targetPoints","parsing","plotOptions","isSlopeChart","colorAboveThreshold","colorBelowThreshold","area","fillTo","bar","horizontal","columnWidth","barHeight","distributed","borderRadiusApplication","borderRadiusWhenStacked","rangeBarOverlap","rangeBarGroupRows","hideZeroBarsWhenGrouped","isDumbbell","dumbbellColors","isFunnel","isFunnel3d","backgroundBarColors","backgroundBarOpacity","backgroundBarRadius","maxItems","hideOverflowingLabels","total","bubble","zScaling","minBubbleRadius","maxBubbleRadius","scatter","jitter","candlestick","upward","downward","wick","useFillColor","boxPlot","upper","lower","whiskers","violin","bandwidthScale","kde","bandwidth","resolution","normalize","constrainToViolin","histogram","binWidth","cumulative","overlap","heatmap","enableShades","shadeIntensity","reverseNegativeShade","useFillColorAsStroke","colorScale","gradientLegend","thickness","stops","showLabels","showHoverValue","labelStyle","arrow","funnel","lastShape","treemap","minFontSize","colorValue","gradient","midpoint","symmetric","nested","drilldownAsLevels","parents","fillOpacity","hover","showValue","breadcrumb","seriesTitle","layout","positions","transition","tint","columns","fillFrom","tileColumns","trackColor","spread","xMin","xMax","xTitle","xFormatter","yTickAmount","yMin","yMax","yTitle","yFormatter","sizeField","sizeRange","laneLabelWidth","gridlines","sizeByValue","maxRadius","minRadius","spacing","motion","spring","overshoot","arc","startAngle","endAngle","innerRadiusRatio","unitValue","maxUnits","sortByGroup","clusterLabels","curved","external","connector","radialBar","inverseOrder","bands","bandsStyle","hideTrackWhenPresent","ticks","major","placement","minor","needle","baseWidth","tipWidth","showValueArc","hollow","margin","imageWidth","imageHeight","imageOffsetX","imageOffsetY","imageClipped","strokeDasharray","track","seriesTotals","barLabels","useSeriesColors","onClick","pie","customScale","expandOnClick","expandOffset","hoverOutline","minAngleToShowLabel","donut","polarArea","rings","spokes","connectorColors","sunburst","innerSize","leaf","partition","zoomOnClick","minAngleToShow","radar","polygons","strokeColors","countUp","shade","gradientToColors","inverseColors","opacityFrom","opacityTo","colorStops","forecastDataPoints","drilldown","separator","rootLabel","zoomFromPoint","showForSingleSeries","showForZeroSeries","horizontalAlign","tooltipHoverFormatter","customLegendItems","clusterGroupedSeries","clusterGroupedSeriesOrientation","fillColors","customHTML","itemMargin","onItemClick","toggleDataSeries","onItemHover","highlightDataSeries","discrete","strokeOpacity","showNullDataPoints","onDblClick","sizeOffset","noData","responsive","allowMultipleDataPointsSelection","subtitle","curve","lineCap","hideEmptySeries","followCursor","intersect","fillSeriesColor","onDatasetHover","fixed","categories","overwriteCategories","rotateAlways","hideOverlappingLabels","minHeight","datetimeFormatter","tickPlacement","colorFrom","colorTo","follow","monochrome","shadeTo","colorBlindMode","$e4b487e979d7c06d$var$TYPE_OWNED","$e4b487e979d7c06d$var$ownedBy","$e4b487e979d7c06d$var$TYPE_OWNED_PATHS","$e4b487e979d7c06d$var$readPath","$e4b487e979d7c06d$var$writePath","$e4b487e979d7c06d$var$TYPE_ALIASES","pyramid","gauge","waffle","$e4b487e979d7c06d$var$typeOpts","requestedType","$e4b487e979d7c06d$var$isUntouched","fromDefault","$e4b487e979d7c06d$var$getRangeValues","isTimeline","dataPointIndex","y1","rangeData","seriesRangeStart","seriesRangeEnd","ylabel","labelData","yLbFormatter","yLbTitleFormatter","xFormat","dateFormatter","startVal","endVal","$e4b487e979d7c06d$var$buildRangeTooltipHTML","tooltipLabels","getFormatters","rangeValues","comboCharts","$e4b487e979d7c06d$var$Defaults","forType","chartDefaults","chartTypes","stackedBars","handOverTypeDefaults","fromType","toType","toDefault","hideYAxis","slope","overlaid","_a2","_b2","histogramData","_getBoxTooltip","_getViolinTooltip","rangeBar","getVal","handleTimelineTooltip","handleRangeColumnTooltip","dumbbell","rangeArea","handleRangeAreaTooltip","stacked100","existingDataLabelFormatter","isBar","barDefaults","convertCatToNumeric","convertCatToNumericXaxis","cats","defaultFormatter","chartType","candleData","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","_si","minV","violinData","seriesViolinMin","maxV","seriesViolinMax","pts","seriesViolinPoints","$e4b487e979d7c06d$var$Config","responsiveOverride","_h","normalizeAliasedChartType","extendYAxis","extendAnnotations","newDefaults","checkForDarkTheme","checkForCatToNumericXAxis","mergedWithDefaultConfig","handleUserInputErrors","requested","isPyramid","unsupportedZoom","notNumericXAxis","isScatterJitter","globalApex","isLogY","newYaxis","extendYAxisAnnotations","extendXAxisAnnotations","extendPointAnnotations","$e4b487e979d7c06d$var$NICE_SCALE_ALLOWED_MAG_MSD","$e4b487e979d7c06d$var$NICE_SCALE_DEFAULT_TICKS","$e4b487e979d7c06d$var$Globals","initGlobalVars","gl","seriesRange","seriesPercent","seriesGoals","seriesX","seriesZ","seriesLog","seriesColors","stackedSeriesTotals","seriesXvalues","seriesYvalues","dataWasParsed","originalSeries","maxValsInArrayIndex","allSeriesHasEqualX","hasNullValues","invalidLogScale","seriesRangeName","hasXaxisGroups","barGroups","lineGroups","areaGroups","hasSeriesGroups","seriesGroups","categoryLabels","timescaleLabels","noLabelsProvided","isXNumeric","skipLastTimelinelabel","skipFirstTimelinelabel","isDataXYZ","isMultiLineX","isMultipleYAxis","MAX_VALUE","minYArr","maxYArr","initialMaxX","initialMinX","minZ","maxZ","minXDiff","xAxisScale","xAxisTicksPositions","xRange","yRange","zRange","dataPoints","xTickAmount","multiAxisTickAmount","disableZoomIn","disableZoomOut","yLabelsCoords","yTitleCoords","barPadForNumericAxis","padHorizontal","rotateXLabels","overlappingXLabels","radialSize","barWidth","animationEnded","bulkRevealScheduled","resizeTimer","selectionResizeTimer","delayedElements","pointsArray","barCanvasCoords","activeRenderer","dataLabelsRects","lastDrawnDataLabelsIndexes","textRectsCache","domCache","dimensionCache","cachedSelectors","seriesNS","_attachNamespaces","proxy","ns","nsKey","axesNS","layoutNS","cacheNS","globalVars","chartID","cuid","clicked","radialNeedleRAF","unitGatherRAF","unitExitRAF","radarPolygons","largestSize","LINE_HEIGHT_RATIO","axisCharts","initialConfig","initialSeries","tokenSurface","lastXAxis","lastYAxis","allSeriesCollapsed","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","risingSeries","ignoreYAxisIndexes","isExecCalled","dataChanged","resized","columnSeries","shouldAnimate","previousPaths","prevPolarAngles","prevStreamFrame","prevChromeFrame","svgWidth","svgHeight","lastResizeSignature","defaultLabels","yAxisLabelsWidth","translateYAxisX","yAxisWidths","resizeObserver","memory","methodsToExec","niceScaleAllowedMagMsd","niceScaleDefaultTicks","seriesYAxisMap","seriesYAxisReverseMap","defineLazyInitialSeries","_initialSeriesPeek","$e4b487e979d7c06d$var$Base","interact","zoomEnabled","panEnabled","selectionEnabled","measureEnabled","visibleXRange","selectedDataPoints","lastClientPosition","capturedSeriesIndex","capturedDataPointIndex","isTouchDevice","seriesBoxPoints","seriesViolinDensity","counts","capped","axisFlags","dataFormatXNumeric","isRangeData","isRangeBar","stackedSeriesTotalsByGroups","unitData","gridHeight","gridWidth","translateXAxisX","translateXAxisY","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","gridPad","$e4b487e979d7c06d$var$CoreUtils","checkComboSeries","comboBarCount","comboCount","getStackedSeriesTotals","excludedSeriesIndices","getSeriesTotalByIndex","seriesAtIndex","getStackedSeriesTotalsByGroups","sg","includedIndexes","si","excludedIndices","fi","setSeriesYAxisMappings","cnf","axisSeriesMap","unassignedSeriesIndices","seriesNameArrayStyle","_s","_yaxe","yi","unassignedYAxisIndices","ra","sa","lastUnassignedYAxis","axisSeries","ai","_series","isSeriesNull","seriesHaveSameValues","getCategoryLabels","catLabels","getLargestSeries","getLargestMarkerSize","getSeriesTotals","ser","getSeriesTotalsXRange","getPercentSeries","getCalculatedRatios","yRatio","invertedYRatio","xRatio","invertedXRatio","zRatio","baseLineY","baseLineInvertedY","baseLineX","_hasNegsGl","hasNegs","scaleBaseLineYScale","sign","getBaseLog","getLogSeries","getLogVal","getLogValAtSeriesIndex","min_log_val","number_of_height_levels","max_log_val","log_height_value","getLogYRatios","_gl","yLogRatio","logYRange","extendArrayProps","configInstance","drawSeriesByGroup","typeSeries","typeGroups","chartClass","graph","gn","gs","gi","draw","$e4b487e979d7c06d$var$SVGNS$2","$e4b487e979d7c06d$var$Point","$e4b487e979d7c06d$var$Matrix","deg","rad","multiply","sx","sy","$e4b487e979d7c06d$var$Box","$e4b487e979d7c06d$var$parsePath","numRe","letters","numMatch","paramStr","nums","lastIndex","cmd","$e4b487e979d7c06d$var$pathBbox","$e4b487e979d7c06d$var$arrayToPath","$e4b487e979d7c06d$var$simplify","reflection","$e4b487e979d7c06d$var$setPosAndReflection","$e4b487e979d7c06d$var$toBezier","$e4b487e979d7c06d$var$arcToBezier","primedCoord","lambda","mat","cSquare","OA","OB","tetaStart","tetaEnd","deltaTeta","nbSectors","arcSegPoints","sinAngle","cosAngle","pt","il","x1","rx","ry","xAxisRotation","largeArcFlag","sweepFlag","acos","tan","$e4b487e979d7c06d$var$findNextM","$e4b487e979d7c06d$var$_measureSvg","$e4b487e979d7c06d$var$_measurePath","$e4b487e979d7c06d$var$samplePathPoints","bbox","cy","getTotalLength","getPointAtLength","$e4b487e979d7c06d$var$easeInOut","$e4b487e979d7c06d$var$_defaultEasing","$e4b487e979d7c06d$var$parseColor$1","$e4b487e979d7c06d$var$SVGAnimationRunner","_attrTarget","_plotTarget","_plotSnap","_plotAlgorithm","_afterCb","_duringCb","_easing","_scheduled","ease","_schedule","plot","snapTo","during","_executeChain","cumulativeDelay","runner","_execute","startDelay","fromAttrs","fromColors","toColors","fromVal","fc","tc","morphFn","fromPath","toD","synced","startArr","destArr","$e4b487e979d7c06d$var$morphPolygons","fromD","fromPts","toPts","bestOffset","bestDist","$e4b487e979d7c06d$var$synchronizePaths","startOffsetM","destOffsetM","startOffsetNextM","destOffsetNextM","dest","$e4b487e979d7c06d$var$handleBlock","startArrTemp","destArrTemp","posStart","posDest","toIdx","performance","tick","rawPos","elapsed","$e4b487e979d7c06d$var$easeInOutSine","$e4b487e979d7c06d$var$REGISTRY","$e4b487e979d7c06d$var$resolveEasing","$e4b487e979d7c06d$var$guardEasing","bx","ax","ay","sampleX","solveT","xt","c1","$e4b487e979d7c06d$var$SVGNS$1","$e4b487e979d7c06d$var$easeOutCubic$1","$e4b487e979d7c06d$var$_reducedMotionMql","$e4b487e979d7c06d$var$prefersReducedMotion","$e4b487e979d7c06d$var$applyProgressiveReveal","animCfg","drawSpeed","revealDelay","easedT","cbrt","startAnchor","$e4b487e979d7c06d$var$applyAnimationPolicy","anim","$e4b487e979d7c06d$var$computeStagger","baseDelay","perGroup","centerDistance","$e4b487e979d7c06d$var$Animations","animateLine","animateMarker","animatePop","onComplete","transformBox","transformOrigin","startAt","animateRect","animatePathsGradually","realIndex","pathFrom","pathTo","pathToInterp","scrollMorph","delayFactor","me","morphSVG","revealBulk","animationCompleted","showDelayedElements","holdUntilComplete","ele","animateDraw","isFill","mask","maskShape","finalize","runMaskReveal","revealEl","isRadial","targetWidth","pad","radialCx","radialCy","targetRadius","maskId","region","elDefs","eased","existingDash","disableAnimationForCorrupPath","crossTypeMorph","morphTypeChange","morphEase","dynEasing","maxSeries","$e4b487e979d7c06d$var$Filters","isSliceChart","hoverOutlineOwnsHoverState","sliceOffsetOwnsActiveState","drilldownBlocksSliceOffset","getDefaultFilter","unfilter","applyFilter","intensity","shadowAttr","diag","filterWith","colorMatrix","in","addShadow","noUserSpaceOnUse","filterer","_scaleFilterSize","gaussianBlur","stdDeviation","flood","composite","in2","setSelectionFilter","activeFilter","$e4b487e979d7c06d$var$Graphics","roundPathCorners","pathString","moveTowardsLength","movingPoint","targetPoint","amount","moveTowardsFractional","fraction","adjustCommand","newPoint","pointForCommand","pathParts","commands2","resultCommands","startPoint","virtualCloseLine","cmdIndex","prevCmd","curCmd","nextCmd","curveStart","curveEnd","prevPoint","curPoint","nextPoint","origPoint","startControl","endControl","curveCmd","newStartPoint","drawLine","lineColor","strokeLineCap","Paper","drawRect","drawPolygon","polygonString","polygon","drawCircle","circle","drawPath","strokeLinecap","hORv","quadraticCurve","axisRotation","relative","coord","renderPaths","animationDelay","initialSpeed","dataChangeSpeed","shouldClipToGrid","bindEventsOnPaths","drawShadow","drawMask","initialAnim","dynamicAnim","moveCommand","isDrawableSeries","useDrawMode","largeThreshold","bulkRender","fadeOnDataChange","isCandleOrBox","revealViaFade","strokeDashArrayOpt","pathMouseEnter","pathMouseLeave","pathMouseDown","defaultAnimateOpts","seriesCount","animateOnUpdate","drawPattern","drawGradient","gfrom","gto","verticalUserSpace","stop1","stop2","stop3","stop4","radial","gradientStops","offx","offy","gradientUnits","fx","fy","getTextBasedOnMaxWidth","tRects","getTextRects","wordsBasedOnWidth","drawText","isPlainText","dominantBaseline","elText","truncatedText","commonProps","tspan","newLine","getMarkerPath","drawMarkerShape","pointStrokeColor","pointStrokeDashArray","pointStrokeWidth","pointFillColor","pointFillOpacity","pointStrokeOpacity","drawMarker","pSize","_fireEvent","hoverFilter","_clearAllDataPointSelections","elPaths","elCircles","deSelect","_togglePointSelection","_applyPointSelectionFilter","rotateAroundCenter","getBBox","setupEventDelegation","parentGroup","targetSelector","currentHovered","_findDelegateTarget","relatedNode","evs","setAttrs","useBBox","cacheKey","virtualText","bboxY","centerOffset","placeTextWithEllipsis","textObj","textString","getComputedTextLength","getSubStringLength","$e4b487e979d7c06d$var$Fill","patternIDs","clippedImgArea","svgW","svgH","fillImg","imgWidth","imgHeight","elPattern","patternID","patternUnits","elImage","SVGLib","xlink","preserveAspectRatio","getSeriesIndex","cType","seriesNumber","getSeriesAxisRange","yaxisIndex","computeColorStops","axisRange","multiColorConfig","below","fillPath","pathFill","patternFill","gradientFill","drawMultiColorLine","getFillColors","fillType","getFillType","useGradient","seriesItem","defaultColor","resolvedFillColor","handlePatternFill","fillConfig","handleGradientFill","imgSrc","patternKey","fillCnf","graphics","patternStrokeWidth","gradientTo","gradientFrom","gToColor","$e4b487e979d7c06d$var$OK_FILTER_TYPES","$e4b487e979d7c06d$var$seriesEmitter","kind","$e4b487e979d7c06d$var$hasCanvasUnsupportedFeature","isUnsupportedFill","lineColors","$e4b487e979d7c06d$var$Markers","_filters","_graphics","_seriesWrap","_seriesWrapIndex","resetSeriesWrapCache","setGlobalMarkerSize","plotChartMarkers","pointsPos","alwaysDrawMarker","isVirtualPoint","elMarkersWrap","hasDiscreteMarkers","markerElement","invalidMarker","markerClasses","shouldMarkerDraw","getMarkerConfig","shouldCreateMarkerWrap","standardWrap","setupMarkerDelegation","pStyle","getMarkerStyle","pointShape","pRadius","$e4b487e979d7c06d$var$Scatter","_elPointsWrap","_elPointsWrapParent","_perSeries","elSeries","elPointsMain","elParent","elPointsWrap","_buildPerSeriesCache","shouldDraw","drawPoint","isBubble","canCacheConfig","markerConfig","fillCacheable","fillCircle","dropShadowEnabled","doInitialAnim","pathFillCircle","ps","dataItem","jt","bandIdx","totalPoints","gradCfg","gradEnabled","popSpeed","centerTextInBubble","$e4b487e979d7c06d$var$resolveDataLabelOffset","resolved","$e4b487e979d7c06d$var$DataLabels","dataLabelsCorrection","alwaysDrawDataLabel","drawnextLabel","textRects","lastDrawnIndex","lastDataLabelRect","drawDataLabel","isRangeStart","dataLabelsConfig","elDataLabelsWrap","seriesCollapsed","centerTextInBubbleCoords","plotDataLabelsText","offsetCorrection","dataLabelText","correctedLabels","barPad","dataLabelColor","offsetsHandledElsewhere","resolvedOffX","resolvedOffY","offX","textShadow","addBackgroundToDataLabel","bCnf","paddingH","paddingV","dataLabelsBackground","elDataLabels","baseEl","cxAttr","bringForward","elDataLabelsNodes","$e4b487e979d7c06d$var$PerformanceCache","invalidateAll","invalidateDimensions","invalidateSelectors","getCachedSelector","queryFn","getCachedDimension","computeFn","maxAge","lastUpdate","cacheDOMElement","getCachedDOMElement","$e4b487e979d7c06d$var$AxesUtils","timeScale","getLabel","drawnLabels","isLeafGroup","rawLabel","xlbFormatter","customFormatter","textRect","allowDuplicatesInTimeScale","checkLabelBasedOnTickamount","labelsLen","checkForOverflowingLabels","drawnLabelsRects","checkForReversedLabels","yAxisAllSeriesCollapsed","translateYAxisIndex","isYAxisHidden","seriesIndices","coreUtils","getYAxisForeColor","yColors","pushExtraColors","drawYAxisTicks","labelsDivider","elYaxis","tY","elTick","$e4b487e979d7c06d$var$XAxis","elgrid","axesUtils","xaxisLabels","offY","isCategoryBarHorizontal","xaxisFontSize","xaxisFontFamily","xaxisForeColors","xaxisBorderWidth","xaxisBorderHeight","drawXaxis","elXaxis","elXaxisTexts","drawXAxisLabelAndGroup","colWidth","labelsGroup","overwriteStyles","elXaxisTitle","elXAxisTitleText","elHorzLine","elGridBorders","colWidthCb","xPos","offsetYCorrection","getCatForeColor","halfWidth","labelRectWidth","fullyOutsideGrid","labelIndex","elTooltipTitle","drawXaxisInversed","elYaxisTexts","colHeight","yPos","lbFormatter","ylabels","getForeColor","multiY","elLabel","labelRotatingCenter","elVerticalLine","drawXaxisTicks","appendToElement","getXAxisTicksPositions","xCount","x1Count","xAxisLabelCorrections","xAxis","xAxisTexts","yAxisTextsInversed","xAxisTextsInversed","xat","textRotatingCenter","tSpan","firstLabelPosX","lastLabelPosX","$e4b487e979d7c06d$var$Grid","drawGridArea","elGrid","drawGrid","renderGrid","createGridMask","strokeSize","createClipPath","clipPath","elGridRectMask","elGridRectBarMask","elGridRectMarkerMask","elForecastMask","elNonForecastMask","hasBar","barWidthLeft","barWidthRight","elGridRect","elGridRectBar","markerSize","elGridRectMarker","defs","_drawGridLines","_drawGridLine","y_2","gacc","elGraphical","isHorzLine","excludeBorders","_drawGridBandRect","elg","_drawXYLines","datetimeLines","xC","elgridLinesV","categoryLines","elgridLinesH","_drawInvertedXYLines","gridAxisIndex","drawGridBands","xAxisTickWidth","drawBands","xc","$e4b487e979d7c06d$var$Scales","niceScale","axisCnf","maxTicks","gotMin","gotMax","gotStepSize","gotTickAmount","temp","tiks","niceStep","mag","magPow","magMsd","stepMag","crudeStep","gcdStep","yMinPrev","yMaxPrev","tMin","tMax","pf","reduceLoop","xFactors","lowest","linearScale","_adjustTicksForSmallRange","ticksNum","multiplier","EPSILON","tickCount","logarithmicScaleNice","logs","logMax","logMin","logarithmicScale","logRange","logTickSpacing","logTick","newTicks","formattedVal","setYScaleForIndex","setXScale","scaleMultipleYAxes","alignZeroParticipants","canAlignZero","groupNames","seriesType","seriesGroupName","lowestY","highestY","mapSeries","sumSeries","posSeries","negSeries","gni","targetRatio","newNiceMin","newNiceMax","extendMin","extendMaxOnly","targetNiceMin","targetNiceMax","niceRoundUp","msd","mult","desiredTicks","maxNeeded","minNeeded","$e4b487e979d7c06d$var$Range","scales","setYRange","setXRange","setZRange","_xPixelTolerance","cnfX","getMinYMaxY","startingSeriesIndex","endingSeriesIndex","_i","seriesMin","seriesMax","brushSource","firstXIndex","lastXIndex","xTolerance","lowerBound","upperBound","jEnd","pe","_parsedExtrema","ref","negMinY","yDec","av","nv","boxPts","pv","minYMaxY","lowestYInAllSeries","_setStackedMinMax","minmax","getInitialMinXMaxX","lbls","xNumeric","xref","catScale","_handleSingleDataPoint","_getMinXDiff","newMinX","newMaxX","sX","xSorted","presorted","minDiff","xDiff","stackedPoss","stackedNegs","indicesOfSeriesInGroup","serie","stackSeries","stgi","$e4b487e979d7c06d$var$getThemePalettes","palette1","palette2","palette3","palette4","palette5","palette6","palette7","palette8","palette9","palette10","cvdDeuteranopia","cvdProtanopia","cvdTritanopia","highContrast","$e4b487e979d7c06d$var$YAxis","axisFontFamily","xAxisoffX","drawYaxis","yaxisStyle","yaxisFontSize","yaxisFontFamily","yaxisFontWeight","labelStep","fs","maxLabels","lY","firstLabel","thinned","xPad","getTextAnchor","existingYLabels","label2","addTooltip","rotateLabel","addYAxisTitle","addAxisBorder","firstLabelCenter","labelCenter","elYaxisTitle","elYAxisTitleText","drawYaxisInversed","inversedYAxisTitleText","inversedYAxisBorder","lineCorrection","yAxisTitleRotate","yAxisOpposite","elYAxisLabelsWrap","yAxisLabelsCoord","yAxisTitle","yAxisTitleCoord","xPaddingForYAxisTitle","titleRotatingCenter","padd","setYAxisXPosition","yaxisLabelCoords","xLeft","xRight","leftOffsetX","rightOffsetX","multipleYs","shouldNotDrawAxis","axisWidth","setYAxisTextAlignments","yAxisInner","yAxisTexts","$e4b487e979d7c06d$var$Events","documentEvent","fireEvent","setupEventHandlers","clickableArea","eventList","keyboardNavigation","handleKey","which","core","setupBrushHandler","elMenu","$e4b487e979d7c06d$var$Localization","setCurrentLocaleValues","localeName","selectedLocale","$e4b487e979d7c06d$var$Axes","drawAxis","$e4b487e979d7c06d$var$Crosshairs","drawXCrosshairs","crosshairGradient","crosshairShadow","shadowLeft","shadowTop","shadowBlur","shadowColor","shadowOpacity","xcrosshairsFill","xcrosshairs","crosshairsWidth","drawYCrosshairs","crosshair","ycrosshairs","ycrosshairsHidden","$e4b487e979d7c06d$var$Responsive","_activeBreakpoint","checkResponsiveConfig","breakpoint","iterateResponsiveOptions","newOptions","largestBreakpoint","screen","overrideResponsiveOptions","originalUserYaxis","userYaxis","baseAxis","$e4b487e979d7c06d$var$mergeYaxisOverride","newConfig","$e4b487e979d7c06d$var$NUM_RE","$e4b487e979d7c06d$var$projectPathToPrevFrame","$e4b487e979d7c06d$var$analyzeSeriesPath","expectedAnchors","isArea","cmds","closing","segType","anchors","$e4b487e979d7c06d$var$lerpPt","$e4b487e979d7c06d$var$expandPath","analysis","ownIdx","degen","firstOwn","interior","totalParts","sp","$e4b487e979d7c06d$var$splitCubic","p1","p3","p01","p12","p23","p012","p123","$e4b487e979d7c06d$var$splitLine","$e4b487e979d7c06d$var$reconcilePathPair","oldN","newN","fromAnalysis","toAnalysis","fromOwn","oldJ","toOwn","newJ","toInterp","$e4b487e979d7c06d$var$lengthTransitionEnabled","$e4b487e979d7c06d$var$datumKey","lbl","$e4b487e979d7c06d$var$uniquifyKeys","$e4b487e979d7c06d$var$seriesJoin","includeIdentity","allowReorder","oldY","seriesY","newY","oldKeys","$e4b487e979d7c06d$var$frameDatumKey","newKeys","$e4b487e979d7c06d$var$joinKeys","toOld","usedOld","ordered","identity","oi","exits","$e4b487e979d7c06d$var$morphEasing","$e4b487e979d7c06d$var$rafTween","onFrame","onDone","$e4b487e979d7c06d$var$tweenSeriesMarkers","sj","oldXP","xPixels","oldYP","yPixels","newXP","newYP","_c2","_d2","rFrom","rPixels","rTo","$e4b487e979d7c06d$var$grabLabels","posAttr","$e4b487e979d7c06d$var$grabLines","$e4b487e979d7c06d$var$NO_GHOST","$e4b487e979d7c06d$var$X_LABELS_SEL","$e4b487e979d7c06d$var$Y_LABELS_SEL","$e4b487e979d7c06d$var$V_GRID_SEL","$e4b487e979d7c06d$var$H_GRID_SEL","$e4b487e979d7c06d$var$currentXScale","$e4b487e979d7c06d$var$currentYAnchors","pLo","pHi","$e4b487e979d7c06d$var$fadeIn$1","$e4b487e979d7c06d$var$tweenPos","$e4b487e979d7c06d$var$spawnGhost","template","$e4b487e979d7c06d$var$transitionAxis","newLabels","oldLabels","newLines","oldLines","lineAttrs","project","oldByText","matchedOld","newLinesAligned","oldLinesAligned","spanPs","spanLo","spanHi","clamp","tweenPairedLine","lineTo","lineFrom","labelTransform","delta","ghosts","rawTo","toNew","$e4b487e979d7c06d$var$DL_GROUP_SEL","$e4b487e979d7c06d$var$DL_TEXT_SEL","$e4b487e979d7c06d$var$dataLabelMotionEnabled","$e4b487e979d7c06d$var$decimalsOf","mantissa","exp","dot2","mantissaDec","$e4b487e979d7c06d$var$writeLabel","textEl","$e4b487e979d7c06d$var$Series","revertDefaultAxisMinMax","updateSeries","_toggleDataSeries","_revertDefaultAxisMinMax","_updateSeries","legendInactiveClass","clearSeriesCache","allSeriesEls","highlightSeriesEls","getAllSeriesEls","getSeriesByName","isSeriesHidden","targetElement","addCollapsedClassToSeries","iterateOnAllCollapsedSeries","cs","toggleSeries","showSeries","hideSeries","prepareDataUpdate","resetSeries","shouldUpdateChart","shouldResetZoom","shouldResetCollapsed","emptyCollapsedSeries","_deriveSeriesNames","reconcileCollapsedByName","newNames","records","nextRecords","nextIndices","rec","indices","anc","canvasRestyle","dim","restyle","highlightSeries","seriesEl","dataLabelEl","yaxisEl","se2","serEl","toggleSeriesOnHover","highlightRangeInSeries","rangeIndex","allHeatMapElements","toggleAllInactive","op","getActiveConfigSeriesIndex","activeIndex","activeSeriesIndex","hasData","getActiveConfigSeriesIndexByGroup","getBarSeriesIndices","getPreviousPaths","$e4b487e979d7c06d$var$captureStreamFrame","ri","$e4b487e979d7c06d$var$captureAxisChrome","yLabels","xLabels","vGrid","hGrid","xScale","yAnchors","$e4b487e979d7c06d$var$captureDataLabels","prevDataLabels","paths","pushPaths","seriesEls","dArr","heatTreeSeries","getAttr","clearPreviousPaths","handleNoData","noDataOpts","verticalAlign","titleText","setNullSeriesToZeroValues","sl","hasAllSeriesEqualX","equalLen","filteredSerX","filteredSeriesX","$e4b487e979d7c06d$var$TOKEN_MAP","accent","fore","surface","$e4b487e979d7c06d$var$THEME_KEY","$e4b487e979d7c06d$var$getThemes","$e4b487e979d7c06d$var$DEFAULT_FORECOLOR_LIGHT","$e4b487e979d7c06d$var$DEFAULT_FORECOLOR_DARK","$e4b487e979d7c06d$var$DEFAULT_AXIS_GRID","$e4b487e979d7c06d$var$Theme","isColorFn","isHeatmapDistributed","checkHeatmapDistributed","isBarDistributed","checkBarDistributed","_tokens","_namedTheme","setDefaultColors","_applyNamedThemeMode","elWrap","_applyModeDefaults","_resolveTokens","applyTokenChrome","getColorBlindColors","applySeriesColors","defaultColors2","applyColorTypes","applyDataLabelsColors","applyRadarPolygonsColors","applyMarkersColors","configColors","getColors","getMonochromeColors","defaultColors","named","_shouldUseTokens","$e4b487e979d7c06d$var$readTokens","applyAxis","appliedSurface","currentBg","paperNode","predefined","globalsColors","glsCnt","newColor","colorTypes","colorSeries","palettes","deuteranopia","protanopia","tritanopia","updateThemeOptions","builtin","$e4b487e979d7c06d$var$TitleSubtitle","drawTitleSubtitle","tsConfig","$e4b487e979d7c06d$var$Helpers$4","dCtx","getTitleSubtitleCoords","getLegendsRect","elLegendWrap","lgRect","getDatalabelsRect","allLabels","datum","dataLabelsStyle","labelrect","getLargestStringFromMultiArr","valArr","maxArrs","xl","maxArrLen","getSparklineStrokeInset","maxStrokeWidth","half","extremes","_getSeriesYExtremes","_strokeTracesDataPoints","plotHeight","tracesPoints","$e4b487e979d7c06d$var$DimXAxis","getxAxisLabelsCoords","getxAxisTimeScaleLabelsCoords","lgWidthForSideLegends","dimHelpers","xLabelrect","xArrLabelrect","yAxisWidth","getRotatedTextRects","getxAxisGroupLabelsCoords","getxAxisTitleCoords","totalWidthRotated","additionalPaddingXLabels","xaxisLabelCoords","xtype","lbWidth","isBarOpposite","rightPad","firstimescaleLabel","lastLabelPosition","lastTimescaleLabel","yAxisWidthRight","firstLabelPosition","yAxisWidthLeft","lgRightRectWidth","xPadRight","xPadLeft","$e4b487e979d7c06d$var$DimYAxis","getyAxisLabelsCoords","labelPad","formatterArgs","yS","yAxisMinWidth","curr","barYaxisLabels","rotateStr","arrLabelrect","getyAxisTitleCoords","getTotalYAxisWidth","padForLabelTitle","yLabelCoord","yTitleCoord","$e4b487e979d7c06d$var$DimGrid","gridPadForColumnsInNumericAxis","type2","seriesLen","barsPresent","xDivision","gridPadForStackedTotalDataLabels","totalConfig","totals","needed","gridPadFortitleSubtitle","gridShrinkOffset","isSparkline","titleSubtitle","titleCoords","subtitleCoords","titleBlockPad","setGridXPosForDualYAxis","$e4b487e979d7c06d$var$XHTML$3","$e4b487e979d7c06d$var$breadcrumbConfig","localCfg","$e4b487e979d7c06d$var$avoidChromeOverlap","nav","chrome","wrapTop","nr","hit","$e4b487e979d7c06d$var$clearBreadcrumb","existing","$e4b487e979d7c06d$var$Dimensions","dimYAxis","dimXAxis","dimGrid","datalabelsCoords","xAxisWidth","plotCoords","strokeInset","setDimensionsForAxisCharts","setDimensionsForNonAxisCharts","gridPadForBreadcrumb","isTreemap","$e4b487e979d7c06d$var$BREADCRUMB_HEIGHT","labelFs","yLabelOverhang","alreadyFree","$e4b487e979d7c06d$var$BREADCRUMB_HEIGHT_FULL","xaxisGroupLabelCoords","xtitleCoords","conditionalChecksForAxisCoords","legendTopBottom","objyAxis","legendVisible","xAxisNum","baseXAxisHeight","xAxisHeightMultiplicate","rotatedXAxisOffset","rotatedXAxisLegendOffset","minYAxisWidth","maxYAxisWidth","$e4b487e979d7c06d$var$MIN_ZOOM_DAYS","$e4b487e979d7c06d$var$TICK_LADDER","approxMs","$e4b487e979d7c06d$var$TimeScale","tickInterval","timeScaleArray","calculateTimeScaleTicks","daysDiff","targetCount","$e4b487e979d7c06d$var$pickInterval","targetMs","best","interval","generateBaseTicks","iter","recalcDimensionsBasedOnFormat","rawTicks","formatDates","removeOverlappingTS","layoutState","dimensions","_writeLayoutCoords","userFormat","dtFmt","effectiveFormat","_effectiveFormat","dateString","spansYears","spansDays","spansMonths","hasYearToken","hasMonthToken","hasDayToken","constantLabelWidth","equalLabelLengthFlag","lb","prevLabelWidth","prevPos","$e4b487e979d7c06d$var$REGISTRY_KEY$1","$e4b487e979d7c06d$var$CUSTOM_KEY","$e4b487e979d7c06d$var$getRegistry$1","$e4b487e979d7c06d$var$getCustomTypes","$e4b487e979d7c06d$var$isCustom","$e4b487e979d7c06d$var$register","typeMap","$e4b487e979d7c06d$var$getChartClass","Cls","$e4b487e979d7c06d$var$Core","setupElements","ct","xyChartsArrTypes","axisChartsArrTypes","isCustomType","SVG2","addTo","setSVGDimensions","elLegendForeign","srStatus","ariaLabel","getAccessibleChartLabel","svgRole","descEl","_classifySeriesByType","seriesTypes","customBuckets","nonComboType","st","st_","plotChartType","xyRatios","canvasMode","beginSeries","renderers","_instantiateSeriesRenderers","elGraph","_assembleSeriesGraphics","rr","_repaintHostInPlace","wrapNode","canRepaintInPlace","repaintInPlace","present","needsLine","boxCandlestick","needsCandlestick","needsViolin","needsPie","needsRangeBar","barStacked","scatterLine","bubbleLine","cname","bucket","_extractDimensionUnit","rawWidth","rawHeight","elDim","widthUnit","heightUnit","elParentDim","needsAxisPadding","getResizeSignature","sig","iw","shiftGraphPosition","tX","resizeNonAxisCharts","heightStr","userSetFixedHeight","isPercentHeight","legendHeight","legendHelpers","getLegendDimensions","clwh","externalLabelMarginY","pieExternalLabelMarginY","chartInnerDimensions","angleType","radialAngleSpan","svgRect","arcTopFromSVGTop","arcBottomFromSVGTop","accumulate","verticalShift","elWrapHeight","grandparent","setLegendWrapXY","coreCalculations","resetGlobals","resetxyValues","globalObj","parsingFlags","isMultipleY","xySettings","formattedTimeScale","updateSourceChart","targetChart","updateHelpers","_updateOptions","getChartByID","namedSeries","$e4b487e979d7c06d$var$TRANSFORM_KEY","$e4b487e979d7c06d$var$getTransforms","$e4b487e979d7c06d$var$registerSeriesTransform","$e4b487e979d7c06d$var$toNode","paletteFromParent","parentKey","seenIds","isObj","keepDatum","_datum","expandDrilldown","nextSeen","$e4b487e979d7c06d$var$buildSeriesRoots","cfgSeries","_seriesIndex","$e4b487e979d7c06d$var$fillValues","$e4b487e979d7c06d$var$morphKey","$e4b487e979d7c06d$var$drilldownAsLevels","$e4b487e979d7c06d$var$annotate","roots","leaves","seriesLeaves","_parent","_depth","_leaf","_di","$e4b487e979d7c06d$var$leafRow","$e4b487e979d7c06d$var$RAW_SAMPLE_TYPES","$e4b487e979d7c06d$var$Data","twoDSeries","threeDSeries","twoDSeriesX","_warnedMissingTransform","getFirstDataPoint","sr","activeItem","isMultiFormat","isFormatXY","isFormat2DArray","firstDataPoint","isXY","_fast2DArrayParse","ys","xs","prevX","extrema","handleFormat2DArray","isBoxPlot","handleFormatXY","activeI","activeData","goals","isXString","isXArr","isXDate","isRangeColumn","fallbackToCategory","handleRangeData","rangeUniques","handleRangeDataFormat","sarr","yItems","arri","range1y1","range1y2","sri","range2","range2y1","sarrAny","overlaps","rangeName","handleCustomRangeData","yExtent","handleCandleStickBoxData","ohlc","handleCandleStickBoxDataFormat","handleViolinData","densityArr","pointsArr","minArr","maxArr","placeholders","dens","density","maxWeight","modeValue","minVal","maxVal","wt","cleanPts","rangeStart","rangeEnd","uniqueKeysMap","uniqueKeys","keyObj","isDataPoint2D","getVals","serO","serH","serM","serL","serC","serPoints","vals","parseDataAxisCharts","xlabels","buckets","handleDates","dr","rawStash","dataReducerRawSeries","xmin","xmax","windowed","sliceByXRange","reduced","sampleY","ohlcAggregate","rangeAggregate","lttbDownsample","customType","dataType","singleArray","parseDataNonAxisCharts","hasOldFormat","hasNewFormat","parseUnitSeries","processedData","extractPieDataFromSeries","numVal","resetParsingFlags","__apexParsed","firstItem","extractPieDataFromSeriesObjects","seriesArray","serieIndex","dataPoint","handleExternalLabelsData","srt","_labels","_seen","_label","_generateExternalLabels","labelArr","seriesDataFiltered","gls","glsi","parseRawDataIfNeeded","globalParsing","hasGlobalParsing","hasSeriesParsing","processedSeries","effectiveParsing","missing","transformedData","itemIndex","getNestedValue","yValues","zValue","applySeriesTransform","flattenTreemapHierarchy","treemapRawSeries","nestedCfg","$e4b487e979d7c06d$var$hasNesting","countDrilldown","treemapRoots","leafSeries","$e4b487e979d7c06d$var$resolveTreemapTree","treemapMaxDepth","expandScatterJitterData","isScatter","_applyBandAxis","_scatterBandLabels","bandLabels","bandIndex","bi","stride","yv","xa","owned","_scatterBand","clampBand","parseData","rawMinX","rawMaxX","firstX","lastX","dataReducerRawMinX","dataReducerRawMaxX","stash","histogramRawSeries","excludeCollapsedSeriesInYAxis","_defineLazyResult","compute","getX","getY","sampled","bucketSize","avgRangeStart","avgRangeEnd","avgX","avgY","avgRangeLen","pointAX","pointAY","maxArea","maxAreaIdx","make","firstY","high","low","yAxisIndexes","yAxisArr","collapsedCount","$e4b487e979d7c06d$var$UpdateHelpers","updateSyncedCharts","overwriteInitialConfig","charts","getSyncedCharts","chartIndex","newType","captureBeforeDestroy","newSeries","incomingType","isAliasRequest","wasAlias","overwriteInitialSeries","prevAxisScaleSig","prevSeriesCount","prevDataLengths","parsedState","_writeParsedSeriesData","_writeParsedRangeData","_writeParsedCandleData","_writeParsedLabelData","_writeParsedAxisFlags","_canUseFastPath","fastUpdate","_updateStats","_extendSeries","hidden","toggleDataPointSelection","elPath","findOne","pieClicked","forceXAxisUpdate","forceYAxisUpdate","_xaxis","getLastYAxis","_y","$e4b487e979d7c06d$var$AxisMapping","gw","dataXToPx","dataX","pxToDataX","screenXToPlotPx","screenX","$e4b487e979d7c06d$var$Utils2","tooltipContext","ttCtx","getNearestValues","hoverArea","seriesBound","hoverWidth","hoverHeight","xDivisor","yDivisor","hasBars","hoverX","hoverY","edgePad","jHorz","capturedSeries","seriesXValArr","seriesXVal","seriesYValArr","seriesYVal","closestInMultiArray","closestInArray","getFirstActiveXArray","Xarrays","firstActiveSeriesIndex","xarr","Yarrays","isActiveSeries","isLineArea","closestDist","closestSeriesIndex","closestPointIndex","bucketDistX","xArr","yArr","distX","bestSegDist","yVal","seg","_distanceToSegment","bestY","distY","py","lenSq","ex","ey","currIndex","newdiff","isXoverlap","xSameForAllSeriesJArr","isInitialSeriesSameLen","sameLen","getBarsHeight","allbars","bars","getElMarkers","getAllMarkers","filterCollapsed","markersWraps","indexA","indexB","hasMarkers","getPathFromPoint","getElBars","getHoverMarkerSize","hoverSize","toggleAllTooltipSeriesGroups","allTooltipSeriesGroups","$e4b487e979d7c06d$var$Labels","tooltipUtil","drawSeriesTexts","ttItems","handleCustomTooltip","toggleActiveInactiveSeries","getValuesToPrint","printLabels","tooltipEl","getElTooltip","tooltipRect","ttWidth","ttHeight","xVal","zVal","xAxisTTVal","basePColor","tIndex","computeSeriesRow","DOMHandling","goalVals","pColor","getSeriesName","formatYValue","formatGoalVals","resolvePatternColor","goal","targetFill","patternEl","ttItemsChildren","showTooltipTitle","tooltipTitle","isXAxisTooltipEnabled","xaxisTooltipText","ttYLabel","ttYVal","ttGLabel","ttGVal","createGoalsHtml","gLabels","gVals","ttZLabel","ttZVal","ttItemMarker","ttItemText","tConfig","firstTooltipSeriesGroup","ftsGroup","customFormatterOpts","zFormatter","dataFormat","bufferXVal","customTooltip","arrowEl","$e4b487e979d7c06d$var$Position","moveXCrosshairs","getElXCrosshairs","xcrosshairsWidth","tx","moveXAxisTooltip","moveYCrosshairs","xaxisTooltip","xaxisOffY","xaxisTTTextWidth","xaxisTTText","moveYAxisTooltip","yaxisTTEls","ycrosshairsHiddenRectY1","yAxisTTRect","yAxisTTHeight","elWrapRect","lr","labelsCenterInElWrap","moveTooltip","computeTooltipPosition","applyTooltipPosition","arrowEnabled","pointSize","ttH","ttW","cxNum","cyNum","clearance","pointY","getElGrid","gridTop","gridBottom","a11y","refPointY","tooltipTop","tooltipBottom","arrowY","firstPaint","positioned","transitionProperty","setProperty","arrowX","moveMarkers","allPoints","resetPointsSize","enlargeCurrentPoint","moveDynamicPointOnHover","serType","fixedTooltip","moveDynamicPointsOnHover","activeSeries","pointArr","pcy","rangeStartIndex","pcyDiff","moveStickyTooltipOverBars","barLen","jBar","bc","bcc","bcx","bcy","bw","isBoxOrCandle","_datapointCenterXFromBars","dataPointsDividedWidth","placeHorizontalSharedTooltip","unionLeft","unionRight","gridRect","unionTop","unionBottom","rowCenterX","rowTopElWrap","rowBottomElWrap","gridLeft","gridRight","finalY","belowTop","finalX","$e4b487e979d7c06d$var$Marker","tooltipPosition","drawDynamicPoints","elsSeries","pointsMain","PointClasses","elPointOptions","elPointsG","appliedSize","newPointSize","enlargePoints","oldPointSize","elPoint","$e4b487e979d7c06d$var$Intersect","isVerticalGroupedRangeBar","handleHeatTreeTooltip","canvasCells","hitTest","noHit","clLeft","clTop","clRight","clBottom","gridOffsetXInElWrap","cellCenterXInElWrap","cellTopInElWrap","cellBottomInElWrap","handleMarkerTooltip","showOnIntersect","handleBarTooltip","barXY","getBarTooltipXY","barAnchorXInGrid","barAnchorYInGrid","barRectInGrid","barCenterXInElWrap","barTopInElWrap","barBottomInElWrap","proposedTop","gridCenterXInElWrap","barLeftInElWrap","barRightInElWrap","barCenterYInElWrap","barCx","barCy","cl","barRect","bh","rectLeftInGrid","rectTopInGrid","handleXForColumns","handleYForBars","dataPointsDividedHeight","$e4b487e979d7c06d$var$AxesTooltip","drawXaxisTooltip","isBottom","renderTo","tooltipCssClass","drawYaxisTooltip","isRight","yaxisOffX","yaxisTooltip","yaxisTooltipText","setXCrosshairWidth","handleYCrosshair","drawYaxisTooltipText","yAxisSeriesArr","yaxisTooltips","translationsIndex","$e4b487e979d7c06d$var$Tooltip","axesTooltip","isBarShared","lastHoverTime","dimensionUpdateScheduled","legendLabels","seriesHoverTimeout","barSeriesHeight","setupDimensionCache","updateDimensionCache","ResizeObserver","getCachedDimensions","cache2","age","drawTooltip","existingTooltip","isSharedMulti","ttItemsCnt","createTTElements","addSVGEvents","gTxt","mShape","$e4b487e979d7c06d$var$renderMarkerSVG","gYZ","gValText","txtLabel","txtValue","commonBar","chartWithmarkers","isPolarMarkerChart","tooltipY","tooltipX","seriesHoverParams","addPathsEventListeners","addDatapointEventsListeners","seriesAll","lineAreaPoints","drawFixedTooltipRect","extendedOpts","ev","onSeriesHover","timeSinceLastUpdate","seriesHover","targetDelay","chartGroups","isCfMember","newOpts","seriesHoverByContext","chartCtx","cachedDims","axisChartsTooltips","nonAxisChartsTooltips","handleMouseOut","syncedCharts","isStickyTooltip","hasYAxisTooltip","_yc","handleStickyTooltip","markerXY","yt","getSliceAnchor","wrapBound","ctm","getScreenCTM","svgBound","unitDot","renderUnitTooltip","arcPath","legendEl","defaultText","dotEl","unitOpts","catData","datumObj","dVal","capj","handleStickyCapturedSeries","firstVisibleSeries","deactivateHoverFilter","allPaths","_yc2","_hasCustomSeries","_j","_k","_l","_m","_n","_o","_p","_q","_r","_t","_u","canvasNonBar","marksMode","dynamicPoints","handlePoints","legendName","lsIndex","_rangeData","commonSeriesTextsParams","$e4b487e979d7c06d$var$SvgRenderer","supports","_feature","toBitmap","$e4b487e979d7c06d$var$RENDERER_REGISTRY_KEY","$e4b487e979d7c06d$var$getRendererRegistry","$e4b487e979d7c06d$var$RendererController","_rendererRegistry","registerRenderer","unregisterRenderer","_activeKind","_instances","_desiredKind","scatterish","markersOn","labelsOn","isHeatmap","maxLen","cfg","desired","getActiveKind","teardown","$e4b487e979d7c06d$var$SVGElement","_listeners","_filter","tspans","dasharray","linecap","__isCanvasMark","eventType","each","inst","removeClass","$e4b487e979d7c06d$var$gradientCounter","$e4b487e979d7c06d$var$SVGGradient","builder","_id","$e4b487e979d7c06d$var$StopBuilder","$e4b487e979d7c06d$var$patternCounter","$e4b487e979d7c06d$var$SVGPattern","$e4b487e979d7c06d$var$SVGContainer","_make","_makeContainer","$e4b487e979d7c06d$var$TspanBuilder","$e4b487e979d7c06d$var$TspanWrapper","$e4b487e979d7c06d$var$filterCounter","$e4b487e979d7c06d$var$SVGFilter","$e4b487e979d7c06d$var$FilterBuilder","_primitive","sources","mn","$e4b487e979d7c06d$var$SVG","xmlns","ElementClass","svgRoot","_dragCleanup","constraints","onPointerDown","isTouch","svgEl","startAttrX","startAttrY","startClientX","startClientY","ownerSVGElement","mev","newX","onUp","_activeDrag","_selectCleanup","createHandle","updateHandle","handleGroup","handles","handleNames","subGroup","updatePositions","elTransform","lt","rb","_selectHandles","_selectHandlesMap","_updateSelectPositions","resize","enable","_resizeCleanup","cleanupFns","makeHandleDraggable","handleInfo","handleNode","startW","newW","$e4b487e979d7c06d$var$_InitCtxVariables","_InitCtxVariables","registerFeatures","featureMap","Ctor","_featureRegistry","initModules","publicMethods","axes","localization","rendererController","tooltipInstance","_initOptionalModules","reg","ExportsCtor","LegendCtor","MorphCtor","DrilldownCtor","PerspectivesCtor","StoryboardCtor","storyboard","HistoryCtor","LinkedViewsCtor","linkedViews","InkCtor","MeasureCtor","ContextMenuCtor","WeaveCtor","weave","OSThemeCtor","osThemeWatcher","ToolbarCtor","_toolbar","ZoomPanCtor","_zoomPanSelection","KeyboardCtor","_keyboardNavigation","$e4b487e979d7c06d$var$Destroy","isUpdating","clearDomElements","killSVG","domEls","elSVG","$e4b487e979d7c06d$var$LAYOUT_KEY","$e4b487e979d7c06d$var$getLayouts","$e4b487e979d7c06d$var$ROW_SOURCE_KEY","$e4b487e979d7c06d$var$getSources","$e4b487e979d7c06d$var$registerRowSource","$e4b487e979d7c06d$var$getRowSource","$e4b487e979d7c06d$var$REGISTRY_KEY","$e4b487e979d7c06d$var$getRegistry","$e4b487e979d7c06d$var$ros","$e4b487e979d7c06d$var$e","$e4b487e979d7c06d$var$i","$e4b487e979d7c06d$var$n","$e4b487e979d7c06d$var$r","$e4b487e979d7c06d$var$a","listeners","$e4b487e979d7c06d$var$l","licenseKey","validationResult","getKey","getLicenseStatus","validateKey","expired","signatureVerified","isKeyValid","isLicenseValid","setLicense","publish","parseKey","validateStructure","signature","verdicts","verifySignature","_resetSignatureState","verifying","warnedUnverifiable","epoch","base64ToBytes","padEnd","canonicalPayload","issueDate","expiryDate","plan","notify","hostname","t3","publicKeysSpki","importKey","namedCurve","verify","hash","e4","$e4b487e979d7c06d$var$c","applyStyles","CRITICAL_STYLES","backgroundImage","createWatermarkPattern","backgroundRepeat","WATERMARK_ATTR","setManaged","paint","exists","erase","untrack","managed","WATERMARK_TEXT","$e4b487e979d7c06d$var$o","manage","subscribed","ATTR","msUserSelect","webkitUserSelect","$e4b487e979d7c06d$var$g","$e4b487e979d7c06d$var$v","velocity","stiffness","damping","$e4b487e979d7c06d$var$b","$e4b487e979d7c06d$var$M","restVelocity","restDisplacement","$e4b487e979d7c06d$var$S","crisp","gentle","snappy","$e4b487e979d7c06d$var$X","$e4b487e979d7c06d$var$Y","$e4b487e979d7c06d$var$Z","$e4b487e979d7c06d$var$G","$e4b487e979d7c06d$var$te","$e4b487e979d7c06d$var$se","dims","getOrCreate","setRecords","recomputeDomain","registerDimension","accessor","reducer","$e4b487e979d7c06d$var$J","avg","setFilterOn","hasDimension","removeDimension","hasFilter","thresholds","e5","a3","l3","toggleKey","passes","filteredRecords","filteredRows","aggregateFor","$e4b487e979d7c06d$var$ee","aggregateAll","filteredCount","filterOf","esc","resolveColumns","tableHTML","dataTable","pageSize","page","$e4b487e979d7c06d$var$PRICING_URL","$e4b487e979d7c06d$var$_perspectivesTokenDecoded","$e4b487e979d7c06d$var$enforced","$e4b487e979d7c06d$var$PREMIUM_PLANS","$e4b487e979d7c06d$var$reinstateWatermark","$e4b487e979d7c06d$var$h","_wmNodeObserver","_wmObservedNode","nodeObs","attributeFilter","$e4b487e979d7c06d$var$teardownWatermark","_wmWrapObserver","$e4b487e979d7c06d$var$enforceLicense","used","features","_used","$e4b487e979d7c06d$var$resolveKey","perChart","singleton","apex","$e4b487e979d7c06d$var$licensedForPremium","$e4b487e979d7c06d$var$addWatermark","wrapObs","$e4b487e979d7c06d$var$notifyTrial","_premiumLicenseNotified","$e4b487e979d7c06d$var$reevaluateLicenseAcrossCharts","instances","_chartInstances","$e4b487e979d7c06d$var$_ApexCharts","_ApexCharts","initCtx","lastUpdateOptions","fast","fastWithAxes","windowResizeHandler","_windowResizeHandler","parentResizeHandler","_parentResizeCallback","_renderPromise","renderPromise","setLocale","$e4b487e979d7c06d$var$addResizeListener","called","DOCUMENT_FRAGMENT_NODE","ro","inShadowRoot","graphData","_a3","enriched","chartId","getSeriesAfterCollapsing","combo","allSeriesAreEmpty","heatmapGradientLegend","repositionToPlot","AnnotationsCtor","$e4b487e979d7c06d$var$InitCtxVariables","drawImageAnnos","drawTextAnnos","drawAxesAnnotations","zoomPanSelection","toolsArr","createToolbar","$e4b487e979d7c06d$var$removeResizeListener","updateOptions","_optionsTooBigToCompare","optionsWithoutSeries","lastWithoutSeries","appendSeries","newSerie","appendData","newData","histRaw","srcSerie","dstSerie","$e4b487e979d7c06d$var$trimStreamingSeries","xOf","avgSpacing","cutoff","applyChromeFade","$e4b487e979d7c06d$var$applyAxisTransition","newYLabels","projX","$e4b487e979d7c06d$var$composeXMap","projY","$e4b487e979d7c06d$var$composeYMap","oSpanP","nSpanP","oSpanV","nSpanV","$e4b487e979d7c06d$var$applyDataLabelTransition","ride","newCx","newCy","newVal","fmtOpts","rounded","_fastAxisChromeRefresh","_xyRatios","_fastAxisBailReason","prevYLabelsCoords","prevYTitleCoords","newYAxisWidth","innerEl","oldGrid","oldGridBorders","gridParent","gridNext","oldXaxis","xParent","xNext","yParent","yNext","gl2","newAxisScaleSig","scaleChanged","reuseCanvasHost","gridEl","xaxisEl","graphs","getGroupedCharts","initOnLoad","apexChart","getThemePalettes","use","setup","registerSeriesType","_customSeriesFactory","renderItem","unregisterSeriesType","registerTheme","unregisterTheme","registerEasing","registerUnitLayout","unregisterUnitLayout","registerRowSource","unregisterRowSource","rowSeries","crossfilter","_crossfilterFactory","coordinator","getCrossfilter","_crossfilterGet","clearCrossfilter","clearGroup","startMeasure","stopMeasure","clearMeasures","highlightSeriesOnLegendHover","addXaxisAnnotation","pushToMemory","addXaxisAnnotationExternal","addYaxisAnnotation","addYaxisAnnotationExternal","addPointAnnotation","addPointAnnotationExternal","clearAnnotations","removeAnnotation","getChartArea","getSeriesTotalXRange","getHighestValueInSeries","getLowestValueInSeries","getSeriesTotal","zoomX","zoomUpdateOptions","dataURI","getSvgString","exportToCSV","paper","getActiveRenderer","refreshTokens","drillDown","drillUp","drillToRoot","clearDrilldownCache","clearCache","_writeDataProps","_windowResize","$e4b487e979d7c06d$var$Exports","svgStringToNode","svgString","svgDoc","scaleSvgNode","getAttributeNS","inlineCanvasLayers","clonedNode","origCanvases","clonedFOs","dataURL","toDataURL","fo","queryStyleable","setStyleDefaults","applyExportStyles","isSide","isTopOrBottom","resolveExportBackground","collectFontFamilies","families","ff","collectFontFaceRules","remote","pushFromText","blocks","family","sheets","cssRules","svgNode","faces","wanted","face","inlineFontFaceUrls","cssBlocks","urls","fetchAsDataUri","dataUri","results","replaced","btoa","arrayBuffer","binary","_scale","serializedNode","convertImagesToBase64","XLINK","nsHref","plainHref","base64","getBase64FromUrl","crossOrigin","getContext","drawImage","svgUrl","svgData","svgBlob","imgURI","canvasBg","fillStyle","fillRect","edgeCanvas","msToBlob","blob","exportToSVG","triggerDownload","exportToPng","msSaveOrOpenBlob","lineDelimiter","gSeries","csvSafe","getFormattedCategory","cat","toDateString","getFormattedValue","seriesMaxDataLength","getCat","sI","sname","handleAxisRowsColumns","rowData","ci","handleUnequalXValues","universalBOM","downloadLink","$e4b487e979d7c06d$export$2e2bcd8739ae039","$e4b487e979d7c06d$var$Helpers$3","lgCtx","getLegendStyles","stylesheet","currLegendsWrap","clww","currLegendsWrapWidth","currLegendsWrapHeight","appendToForeignObject","legendStyles","seriesCnt","seriesToMakeVisible","csi","riseCollapsedSeries","legendItem","isCollapsed","legendTextEl","_nonAxisSliceContainer","_readSliceValue","sliceEntry","_writeSliceValue","collapseData","removeIndexOfRising","_getSeriesBasedOnCollapsedState","seriesChildren","sc","collapsed","$e4b487e979d7c06d$var$DEFAULT_DIVERGING","$e4b487e979d7c06d$var$lerp$1","$e4b487e979d7c06d$var$toHexPair","$e4b487e979d7c06d$var$normalizeHex","asHex","$e4b487e979d7c06d$var$colorValueOf","$e4b487e979d7c06d$var$colorValueOfDatum","$e4b487e979d7c06d$var$buildContinuousScale","dataMin","dataMax","reach","$e4b487e979d7c06d$var$resolveStops","legendStops","span2","$e4b487e979d7c06d$var$mixColors","$e4b487e979d7c06d$var$readableOn","$e4b487e979d7c06d$var$SVG_NS","$e4b487e979d7c06d$var$HeatmapGradientLegend","hoverValueEl","_min","_max","_geom","_bandHitEls","_activeBandIndex","_onCellEnter","_onCellLeave","_onBandEnter","_onBandLeave","_getFormatter","_cfg","colorScaleOf","configFor","isVertical","arrowSize","arrowGutter","labelPadAlongStrip","labelPadAcrossStrip","minLabelWidth","stripLength","_resolveStripLength","stripThickness","verticalGroupLeftPad","stripX","stripY","gradId","linearGrad","_computeStops","stopEl","labelColor","labelFontSize","labelFontFamily","makeLabel","midX","midY","arrowColor","_buildArrow","yTop","yBot","_applyWrapAlignment","_attachHoverListeners","_attachBandHoverListeners","basis","trimmed","chartWidth","chartHeight","userOffsetX","userOffsetY","availableHeight","availableWidth","ox","oy","titleArea","xAxisArea","alongOffset","extent","avail","bandStart","bandEnd","stripCenter","_enforceMinPlotGap","strip","gr","curLeft","MIN_GAP","curTop","currentTarget","_continuous","_positionArrow","pct","tipX","baseX","yCenter","tipY","baseY","xCenter","_position","continuous","originalIndex","_originalIndex","baseColor","colorShadePercent","percent_v","shaded","onLegendClick","onLegendHovered","isBarsDistributed","showLegendAlways","drawLegends","legendAlignHorizontal","legendAlignVertical","createLegendMarker","fillcolor","elMarker","mSize","mOffsetX","mOffsetY","mBorderWidth","mStyle","SVGMarker","shapesEls","shapeEl","legendNames","isLegendInversed","legendGroups","elLegend","elLegendText","textColor","onLegendKeyDown","titleH","subtitleH","fixedHeigthWidth","hw","titleRect","subtitleRect","lRect","hoverOverLegend","restored","clickAllowed","$e4b487e979d7c06d$var$Toolbar","selectedClass","localeValues","elZoom","elZoomIn","elZoomOut","elPan","elSelection","elMeasure","elZoomReset","elMenuIcon","elMenuItems","createBtn","elToolbarWrap","elCustomIcons","toolbarControls","appendZoomControl","ico","tool","icon","zoomSelectionCtrls","_createHamburgerMenu","addToolbarEventListeners","menuItems","exportToPNG","handleZoomReset","toggleZoomSelection","handleZoomIn","handleZoomOut","togglePanning","toggleMeasure","toggleMenu","handleDownload","toolbarButtons","btnClass","apexClass","_closeMenu","tb","enabledType","wasEnabled","toggleOtherControls","enabling","getToolbarIconsReference","enableZoomPanFromToolbar","toggleEls","_currentXRange","newMinXMaxX","_getNewMinXMaxX","shouldFloor","beforeZoomRange","getBeforeZoomRange","zoomCallback","exprt","resetZoomRange","endX","dragX","endY","dragY","moveDirection","zoomRect","selectionRect","slDraggableRect","selectionDragging","preselectedSelection","svgMouseEvents","_wheelZoomEnabled","mouseWheelEvent","_momentumEnabled","momentumTouch","pc","momentum","zoomtype","shiftWasPressed","gridRectDim","_gridRect","_screenXToPlotPx","panDragging","selectionDrawing","handleMouseUp","makeSelectionRectDraggable","isResized","selectionDrawn","hideSelectionRect","_incidentalZoomEnabled","setting","_wheel","it","wheel","rafId","endTimer","deltaMode","_applyWheelZoom","_endWheelZoom","_currentXWindow","mouseX","bounds","_clampBounds","minRange","eps","_applyXRange","rectDim","createRot","updateRot","handleName","_emitSelectionFromRect","drawSelectionRect","scalingAttrs","inversedX","inversedY","selectionWidth","selectionHeight","selRect","timerInterval","getSelAttr","draggedProps","linkActive","relLeft","relRight","xyAxis","onSourceSelection","xLowestValue","xHighestValue","localStartX","localEndX","localStartY","localEndY","yHighestValue","yLowestValue","highestVal","lowestVal","yaxisCopy","panScrolled","clampMin","clampMax","updateScrolledChart","_pinchEnabled","_panInertiaEnabled","panState","samples","inertiaRAF","isZoom","zoomingOut","_cancelInertia","_fireScrolled","_pushSample","_beginPinch","win","minX0","maxX0","ratio0","timeStamp","_movePinch","_movePan","_endPinch","_endPan","t0","t1","hypot","d0","cx0","range0","anchorData","deltaData","totalDeltaPx","vel","_startInertia","vel0","cfgFriction","lastT","ratio","applied","$e4b487e979d7c06d$var$Helpers$2","annoCtx","setOrientations","anno","annoIndex","xAnno","xAnnoCoord","yOffset","addBackgroundToAnno","annoEl","gridBBox","pleft","pright","ptop","pbottom","annotationsBackground","annoLabel","labelX","getY1Y2","yP","clipped","invertAxis","catIndex","xLabel","yAxisMap","getX1X2","xP","inversedReversedAxis","getStringX","rX","strX","$e4b487e979d7c06d$var$XAnnotations","helpers","clipX1","clipX2","result2","textY","drawXAxisAnnotations","$e4b487e979d7c06d$var$YAnnotations","clipY1","clipY2","drawn","_getYAxisAnnotationWidth","textX","drawYAxisAnnotations","$e4b487e979d7c06d$var$PointAnnotations","resultX","clipX","resultY","clipY","optsPoints","tooltipTargets","addImage","showPointTooltip","hidePointTooltip","getPointTooltipEl","getPointTooltipContent","annotation","wrapRect","markRect","ttRect","drawPointAnnotations","$e4b487e979d7c06d$var$gridDivideRect","rowExtent","colExtent","baseCols","remainder","cells","rowSize","rowStart","colSize","$e4b487e979d7c06d$var$gridDivideShape","intervalsAt","minorLo","minorHi","iv","totalLen","exact","share","byFrac","frac","$e4b487e979d7c06d$var$sortByHilbert","getXY","$e4b487e979d7c06d$var$hilbertIndex","ix","iy","$e4b487e979d7c06d$var$parseColor","$e4b487e979d7c06d$var$makeColorLerp","bl","al","xAxisAnnotations","yAxisAnnotations","pointsAnnotations","yAnnotations","xAnnotations","pointAnnotations","annoArray","annoElArray","progressiveAnnos","skipGroupHide","addText","addAnnotationExternal","contextMethod","axesAnno","axesAnnoLabel","_removeAnnotationTooltip","annos","annotationArray","_tooltipDismissed","_focusedEl","_hoveredBarEl","_enlargedScatterMarker","_onKeyDown","_onFocus","_onBlur","_onLegendClick","_onPointerDown","_lastPointerDownAt","_isNavEnabled","_clampCursor","_snapToVisibleRange","_showCurrentPoint","_hideFocus","_canPan","_panBy","_move","_skipNullForward","_getDataPointCount","_skipNullBackward","_fireClick","_canZoom","_announce","dSeries","dPoint","_getSeriesCount","attempts","dpCount","di","_isDataPointVisible","_snapToVisibleRangeInDirection","_applyFocusClass","_showTooltip","_removeFocusClass","_leaveHoveredBar","_setSyntheticEvent","_showTooltipNonAxis","_showTooltipRadialBar","_showTooltipHeatTree","_showTooltipBar","_showTooltipAxisLine","_getFocusableElement","barDomEl","sharedConfigured","hasVisibleMarkers","_showScatterBubblePoint","markerEl","tooltipBound","sliceEl","arcEl","initialAngle","trackSize","outerRadius","centroid","cell","cellRect","cellCx","cellCy","cellWidth","cellHeight","cellWidthAttr","_buildPointLabel","sliceLabel","seriesName2","rawValue","formattedValue","currentX","$e4b487e979d7c06d$var$BAR_FAMILY","$e4b487e979d7c06d$var$RADIAL_FAMILY","$e4b487e979d7c06d$var$UNIT_FAMILY","$e4b487e979d7c06d$var$PARTITION_FAMILY","$e4b487e979d7c06d$var$SUMMARY_FAMILY","$e4b487e979d7c06d$var$familyOf","_snapshot","_ghost","_pieceLayer","_pieceCancel","canMorphTypes","tf","isCompatibleSeriesShape","_removeGhost","_cancelPieces","branches","unitDots","_captureFromDOM","_buildMapping","oldLayout","canShape","_canProbePaths","_countUnitSeries","pieceOut","pieceIn","sourceDots","keyOrder","_v","seriesIdx","_needsGhost","_captureGhost","_mountGhost","fade","getSpeed","usesPieceTakeover","claimsTargetMark","_makePieceLayer","_revealPieceHidden","isPointInFill","_makeExtentProber","createSVGPoint","isPointInStroke","bandLo","bandHi","outside","proof","SCAN","runStart","dispose","_separatePieces","byCluster","wAttr","hAttr","pieces","sourceFam","shapedSource","dots","getInitialBBoxFor","markFill","prober","shifted","getInitialPathFor","divided","fillEnd","_runPieces","piece","_combinePieces","_collectTargetMarks","clusterIdx","targetFam","shapedTarget","markState","tiles","onPieceDone","stagger","flight","$e4b487e979d7c06d$var$runPieceTween","onAllDone","cancelled","dur","live","_done","fam","_pathBBox","wrapClass","jAttr","captured","seriesNodes","seriesNode","byMark","rectPath","arcs","rawD","_radialArcToFilledSegment","slices","large","sweep","rOuter","rInner","proj","newR","o1","i1","buildRingSegmentPath","ringRadius","startAngleDeg","endAngleDeg","halfStroke","sRad","eRad","oStart","oEnd","iStart","iEnd","getFromType","_fromType","keyedMarks","_translatePathD","getInitialCenterFor","getInitialPathAt","getInitialPathForKey","hasKeyedMarks","getInitialSlotFor","pairs","getInitialFillFor","chromeSelectors","$e4b487e979d7c06d$var$XHTML$2","$e4b487e979d7c06d$var$Breadcrumb","sep","drillToLevel","$e4b487e979d7c06d$var$placeInReservedBand","navH","ceiling","$e4b487e979d7c06d$var$breadcrumbCeiling","navRect","dark","_avoidChromeOverlap","$e4b487e979d7c06d$var$XHTML$1","$e4b487e979d7c06d$var$CLASS","$e4b487e979d7c06d$var$DrilldownLoading","spinner","$e4b487e979d7c06d$var$DRILL_MARKER","$e4b487e979d7c06d$var$axisWindow","hasMin","hasMax","$e4b487e979d7c06d$var$cloneSelection","$e4b487e979d7c06d$var$captureViewState","cfgX","yWindows","cfgYArr","anyY","yw","ancillaryCollapsed","$e4b487e979d7c06d$var$captureAnnotations","staticAnno","dynamic","static","drill","$e4b487e979d7c06d$var$captureMeasure","getPins","pins","$e4b487e979d7c06d$var$applyViewInteraction","$e4b487e979d7c06d$var$applyCollapsedSet","targetCollapsed","targetAncillary","names","shouldCollapse","$e4b487e979d7c06d$var$addMethodName","setPins","rootSnapshot","_wired","_asyncCache","_pending","_warnedUnreachable","_warnedNoSliceOffset","_onPointSelect","_afterRender","_onPlotDown","_onPlotClick","_downAt","_plotClickWired","_drillMarkers","triggerPoint","_resolveChild","_drillInto","onDrillDown","_drillDownAsync","restore","_apply","_viewFromSnapshot","_viewFromChild","_cacheGet","_fire","settle","_isDead","_cacheSet","_cacheEnabled","_overrideFields","_uncollapseSeries","objectFormPie","_copyOptionalViewFields","runUpdate","_zoomEnabled","_triggerOrigin","_zoomDrill","_svgNode","_markGroup","gRect","_zoomDuration","outDur","inFrom","outGroup","outAnim","inGroup","inAnim","_ctx","_pointAt","_markDrillableTargets","_wirePlotClick","unreachable","_isClickThroughMark","warnSliceOffsetDisabled","_isPointBasedSeries","authored","mk","own","_seriesNeedsDrillMarker","$e4b487e979d7c06d$var$HASH_KEY","$e4b487e979d7c06d$var$Perspectives","_saved","_counter","_serializableDelta","whitelist","stripped","$e4b487e979d7c06d$var$stripFunctions","$e4b487e979d7c06d$var$toBase64","bin","toURL","tokenOrString","combined","mergeOptions","$e4b487e979d7c06d$var$applyViewState","xw","$e4b487e979d7c06d$var$base64urlDecode","b64url","fromURL","pair","_beats","_observer","_activeIndex","_animate","_warnedNoPerspectives","unbind","IntersectionObserver","scroller","_resolveBeats","beats","_onIntersect","rootMargin","beatsOpt","announce","onEnter","isIntersecting","_activate","rootBounds","boundingClientRect","beat","_normalizeView","beatChange","provided","goTo","indexOrKey","pointer","applying","_batching","_coalesceTimer","_settleTimer","_pendingLabel","_keydownTarget","_pointerTarget","_engaged","_readConfig","_onMounted","_onUpdated","_onSelection","_syncConfig","_wireKeyboard","_unwireKeyboard","_commit","_refreshSettle","$e4b487e979d7c06d$var$isEditableTarget","cp","_capture","_emitChange","seriesSig","_cloneConfigCOW","_signature","cloned","$e4b487e979d7c06d$var$__objRest","exclude","_restore","snapshot","canUndo","canRedo","jump","wasBatching","$e4b487e979d7c06d$var$PLUGIN_CHART_METHODS","_layers","_currentScales","_lastPluginsRef","_lastData","_updatedWired","_init","_wireUpdated","apiVersion","trunc","record","failures","hook","_layer","_dataSnapshot","seriesColor","_token","_guard","_reconcile","_resetLayers","_setScales","fns","where","L2","domainX","domainY","ratios","sData","dash","weight","want","activeNames","toAdd","$e4b487e979d7c06d$var$STYLE_KEYS","$e4b487e979d7c06d$var$NEVER","$e4b487e979d7c06d$var$SHAPE_ID","square","triangle","diamond","star","sparkle","cross","plus","$e4b487e979d7c06d$var$SHAPE_NAME","$e4b487e979d7c06d$var$NOOP_RUNNER","$e4b487e979d7c06d$var$SHARED_MARKER_NODE","$e4b487e979d7c06d$var$SHARED_GROUP","$e4b487e979d7c06d$var$CanvasMarkerRef","_setMarkerFill","$e4b487e979d7c06d$var$SHARED_RECT_REF","$e4b487e979d7c06d$var$CanvasMark","_cmd","_applyAttr","sk","$e4b487e979d7c06d$var$CanvasGraphics","_list","_mx","Float64Array","_my","_msize","_mshape","Int16Array","_mstyle","Int32Array","_msi","_mn","_mcap","_crx","_cry","_crw","_crh","_crstyle","_crsi","_crdi","_crn","_crcap","_cellRadius","_styles","_styleMap","_lf","_ls","_lsw","_ld","_lfo","_lso","_lid","_lofFill","_lofBase","_lofId","_rlf","_rls","_rlsw","_rlfo","_rlso","_rlid","_resetStyleCache","cap","_allocMarkers","_allocRects","_growRects","nx","ny","nw","nh","nst","nsi","ndi","_growMarkers","nsh","displayList","markerCount","_internStyle","sw","so","strokeDash","markerStyle","markerSeries","shapeName","drawRectCell","styleId","_rectStyleId","rectCount","rectStyle","rectSeries","fillRule","_attrs","_markerStyleId","strokeTinted","pathToNumeric","nxs","nys","ncloseY","closeY","lx1","ly1","lx2","ly2","rw","rh","ty","markerPath","shapeId","$e4b487e979d7c06d$var$TWO_PI","$e4b487e979d7c06d$var$CanvasCompositor","_host","_canvas","_c2d","_margin","_dpr","_dim","_alpha","_unitPaths","_markerBatches","markerBatchCount","_seriesAlpha","_plotDims","gh","largest","createHost","getHost","setTransform","clearRect","_syncDpr","dpr","wCss","hCss","shim2","_paintOne","_paintRects","_paintMarkers","rstyle","useRound","roundRect","dimming","beginPath","clip","doFill","doStroke","strokeStyle","lineWidth","setLineDash","baseFillA","baseStrokeA","globalAlpha","strokeRect","_unitPath","Path2D","mx","my","msize","mshape","mstyle","_applyFill","_applyStroke","_paintNumericPath","moveTo","closePath","path2d","_fillStrokePath","_fillStroke","_strokeOnly","font","fillText","$e4b487e979d7c06d$var$CanvasRenderer","_compositor","feature","_warned","_ctype","_scales","rawData","xvals","yvals","xPx","xAt","yPx","_api","nPts","yRatioArr","yr","catMode","bandW","tickOn","$e4b487e979d7c06d$var$OSThemeWatcher","media","_ensureMedia","_applyToConfig","_ensureListeners","_osThemeMedia","contrast","themeOpt","_add","_remove","mql","addListener","removeListener","$e4b487e979d7c06d$var$DIMMED_CLASS","$e4b487e979d7c06d$var$PIE_TYPES","_dimmed","_lastValues","_onChange","_mode","_initEngine","_enabled","gMinX","gMaxX","tol","cf","_cf","_chartId","_fireFilterChange","_group","applyDim","sourceChartID","iAttr","_isPie","_isHeatmap","_injectSeries","_wire","_seriesFromAgg","agg","yl","xi","_sigOf","_pinRangeDomain","_applyAggregation","_applySelfDim","_reassertSeries","isCategory","isRange","$e4b487e979d7c06d$var$AC","$e4b487e979d7c06d$var$TYPES","$e4b487e979d7c06d$var$FONT_STEPS","$e4b487e979d7c06d$var$MARKER_SHAPES","$e4b487e979d7c06d$var$SHAPE_GLYPHS","$e4b487e979d7c06d$var$NOTE_COLORS","$e4b487e979d7c06d$var$InkLayer","_drag","_editor","_creating","_createSeq","_attach","_onRerender","_onUp","_onCreateClick","_onDocDownEditor","_enabledGlobally","_hasDraggable","_paletteEnabled","_snapEnabled","_nearest","bd","_snapX","_snapY","_annoList","_isDraggable","_closeEditor","__inkBound","_onDown","_startEdit","_renderPalette","origX","origW","dxPixel","dyPixel","_teardownDocListeners","_applyDelta","_redrawAnno","_checkpoint","_fireDragged","dxData","_invertPoint","xIsLeft","dyData","categoryX","logY","labelEl","_fireAnnotationEvent","startCreate","_syncPalette","stopCreate","_pixelToData","createAt","_fireCreated","createLineAt","over","bs","_noteColors","_isLight","_isBold","fw","_cardBtn","extraClass","isSvg","_cardLabel","lab","_mkSwatch","pick","rowText","placeholder","_deleteAnno","rowStyle","_applyColor","_toggleBold","_stepFont","rowLine","_applyLineColor","rowMarker","_stepMarker","sizeOut","_cycleShape","_positionCard","_syncCard","ed","aRect","cw","boldBtn","shapeBtn","_commitTextOf","_fireEdited","commit","_applyStyle","_fireStyled","light","_fireDeleted","$e4b487e979d7c06d$var$quantileSorted","$e4b487e979d7c06d$var$stdDev","mean","$e4b487e979d7c06d$var$binIndexOf","$e4b487e979d7c06d$var$histogramValues","drag","armed","persistent","pane","_seedActive","_onKeyUp","_onSeedDown","_onSeedKey","_bindKeys","_snapToSeries","s0","_points","_resolve","snapped","_dataToGrid","gx","gy","_doc","_keysBound","_arm","_cancelDrag","_disarm","seedFromClient","_endSeed","_project","_renderLive","_clientXY","_clearLive","ya","xb","yb","_renderPins","_fireMeasured","_yRange","ymin","ymax","xr","rawA","rawB","_stats","_fmt","toExponential","_computedStyle","_resolveColor","cfgVal","varName","_colors","_dirColor","_dirClass","_fmtPct","percentChange","_fmtY","_fmtX","_fmtDx","toLocaleDateString","_liveGroup","_live","_drawRuler","pinned","rg","_drawFree","_drawSpan","_dot","_readout","boxW","boxH","lx","vline","_items","_focusIndex","_trigger","_onContext","_onDocDown","_onKey","_detachTrigger","_clientToData","_resolveItems","_annotate","_line","lc","_focus","mw","mh","maxTop","btns","$e4b487e979d7c06d$var$derivedData","WeakSet","$e4b487e979d7c06d$var$observationsOf","allowFlatY","$e4b487e979d7c06d$var$toUnitSeries","clusters","maxRows","$e4b487e979d7c06d$var$thinClusters","widest","keptAt","keepList","$e4b487e979d7c06d$var$formatEdge","$e4b487e979d7c06d$var$pointsRowSource","perSeries","byCat","$e4b487e979d7c06d$var$boxPlotRows","$e4b487e979d7c06d$var$violinRows","hcfg","binning","$e4b487e979d7c06d$var$computeBinning","rLo","rHi","chosen","$e4b487e979d7c06d$var$widthForRule","byCount","sd","log2","iqr","sturges","fd","$e4b487e979d7c06d$var$binCounts","$e4b487e979d7c06d$var$normalizeCounts","touched","summary","$e4b487e979d7c06d$var$fiveNumberSummary","q1","median","q3","outliers","loFence","hiFence","est","$e4b487e979d7c06d$var$kernelDensity","norm","hd","$e4b487e979d7c06d$var$rowsByBin","$e4b487e979d7c06d$var$BarDataLabels","barCtx","totalFormatter","handleBarDataLabels","columnGroupIndex","barXPosition","barYPosition","visibleSeries","totalDataLabels","dataLabelsX","dataLabelsY","dataLabelsPos","barDataLabelsConfig","barOptions","barTotalDataLabelsConfig","yLabel","isHorizontal","calculateBarsDataLabelsPosition","calculateColumnsDataLabelsPosition","drawCalculatedDataLabels","drawTotalDataLabels","totalDataLabelsX","totalDataLabelsY","totalDataLabelsAnchor","getStackedTotalDataLabel","hasMultipleSeriesGroups","getTotalGroupContext","barHelpers","getSeriesGroupIndex","drawsStackedTotal","byGroup","lastActiveBarSerieIndexByGroup","lastActiveBarSerieIndex","byGroups","totalDataLabelsBcx","zeroEncounters","getZeroValueEncounters","valIsNegative","isReversed","lowestPrevY","totalGroupCtx","prevYGroups","prevY","totalLabeltextRects","lowestPrevX","prevXGroups","isSeriesNotCollapsed","dlCfg","txRect","modifiedDataLabelsConfig","totalDataLabelText","$e4b487e979d7c06d$var$isHistogramOverlay","$e4b487e979d7c06d$var$Helpers$1","initVariables","totalItems","visibleI","visibleItems","arrBorderRadius","createBorderRadiusArr","brArr","initialPositions","yDivision","zeroH","zeroW","xForNumericX","getBarXForNumericXAxis","initializeStackedPrevVars","prevYF","prevXF","prevYVal","prevXVal","initializeStackedXYVars","xArrj","xArrjF","xArrjVal","yArrj","yArrjF","yArrjVal","getPathFillColor","useRangeColor","colorRange","getStrokeWidth","isNullValue","alwaysApplyRadius","numSeries","numColumns","positiveIndices","negativeIndices","nonZeroCount","firstPositiveIndex","lastPositiveIndex","highestNegativeIndex","lowestNegativeIndex","barBackground","bcolor","getColumnPaths","seriesGroup","bW","bXP","columnWidthOffset","strokeCenter","morphFrom","getPreviousPath","getFunnelTrapezoidPaths","bottomHalf","halfWidthFor","topHalf","topLeftX","topRightX","bottomLeftX","bottomRightX","computePyramidLayout","topRatio","bottomRatio","topY","bottomY","getPyramidPaths","getBarpaths","bYP","bH","barHeightOffset","fromX","slFrom","getXForValue","zeroPositionForNull","xForVal","getYForValue","yForVal","getGoalValues","pushGoal","commonAttrs","strokeHeight","drawGoalLine","goalX","goalY","lineGroup","sHeight","sWidth","drawBarShadow","prevPaths","currPaths","prevX2","prevX1","prevY1","currX2","currX1","currY1","prevY2","shadowPath","nonZeroColumns","getGroupIndex","cGI","columnGroupIndices","$e4b487e979d7c06d$var$Bar","pyramidLayout","pathArr","_prevKeyed","_ltCache","_layoutShiftCache","barSeriesIndices","initPositions","initY","initX","isLengthTransition","elGoalsMarkers","elBarShadows","pathsParams","indexes","drawBarPaths","drawColumnPaths","barShadow","barGoalLine","renderSeries","lineFill","$e4b487e979d7c06d$var$renderBarExitGhosts","newKeySet","fallbackFill","$e4b487e979d7c06d$var$firstMove","_prevRecord","skipDrawing","_bindingsDelegated","checkAvailableColor","dataLabelsObj","barDataLabels","staggerEnabled","isLayoutShift","totalBars","configStep","baseDelayMs","delayMs","morphActive","pieceClaimed","renderedPath","forecast","useTrapezoid","pyramidSeg","usePyramid","_zeroW","sxI","pp","gpp","_prevKeyedPaths","keyed","dataLen","oldD","isNewDatum","pathCommandCount","$e4b487e979d7c06d$var$buildJitterGroups","seedA","seedB","halfExtent","alongFn","clampAt","jitterPx","constrain","isSquare","useScale","sMin","sMax","$e4b487e979d7c06d$var$hash01","$e4b487e979d7c06d$var$rampColorAt","c0","mix","$e4b487e979d7c06d$var$renderJitter","pointsByCat","pointClass","pOpacity","strokeW","willAnimateIn","catColor","defaultFill","$e4b487e979d7c06d$var$darkenColor","elPoints","imul","$e4b487e979d7c06d$var$BoxCandleStick","ctype","candlestickOptions","boxOptions","isOHLC","boxPointsOpts","gridW","cullBuffer","drawHorizontalBoxPaths","drawVerticalBoxPaths","cullBounds","culled","pi","logVal","candleColors","boxColors","getColor","color2","colorPos","colorNeg","getOHLCValue","openY","getCandleVal","$e4b487e979d7c06d$var$svgPath","$e4b487e979d7c06d$var$spline","tgts","$e4b487e979d7c06d$var$tangents","$e4b487e979d7c06d$var$finiteDifferences","p0","$e4b487e979d7c06d$var$slope","$e4b487e979d7c06d$var$swapPairs","$e4b487e979d7c06d$var$TreemapHelpers","checkColorRange","negRange","chartOpts","getShadeColor","colorProps","determineColor","rTotal","calculateDataLabels","$e4b487e979d7c06d$var$Helpers5","lineCtx","sameValueSeriesFix","calculatePoints","ptX","ptY","xPT1st","categoryAxisCorrection","checkPreviousPaths","pathFromLine","pathFromArea","appendPathFrom","determineFirstPrevY","lineYPosition","prevSeriesY","zeroY","$e4b487e979d7c06d$var$Line","isPointsChart","pointsChart","noNegatives","lineHelpers","areaBottomY","_elLastPointsWrap","allSeries","pY2","_initSerieVariables","y2Arrj","linePaths","areaPaths","pX","firstPrevY","pY","firstPrevY2","pathsFrom","_calculatePathsFrom","rYArrj","rY2Arrj","iteratingOpts","_iterateOverDataPoints","iterations","pathsFrom2","rangePaths","segments","_handlePaths","firstPoint","longestSeries","linePath","areaPath","streamScroll","$e4b487e979d7c06d$var$detectStreamScroll","newXPixels","newYPixels","oldX","nxA","nxB","oxA","oxB","yLo","yHi","nyLo","nyHi","predX","predY","$e4b487e979d7c06d$var$reconcileSeriesPaths","$e4b487e979d7c06d$var$buildUnionEntries","exitSet","nj","oj","forecastCutoff","defaultRenderedPathOptions","numericXY","areaCloseY","prevFill","linePathCommonOpts","renderedForecastPath","segmentStartX","lineYPos","pathState","_scatterJitterPx","_fastStraightPath","isNull","pIdx","prevIndex","pii","xj","yj","seed","calculatedPaths","_createPaths","handleNullDataPoints","_handleMarkersAndLabels","xUnitPx","ti","yUnitPx","yR","appendFrom","buildStrings","fromParts","xv","fromAppend","isLowerRangeAreaPath","yAj","_xAj","_yAj","smoothInputs","smoothInputsLower","segmentCount","smoothInputsIndex","getSegments","segLens","svgPoints","_start","_end","upperLinePaths","pathToPoint","curve2","y3","$e4b487e979d7c06d$var$drawOuterLabel","lineHeight","elbow","labelY","groupClass","connectorClass","textClass","$e4b487e979d7c06d$var$spaceOutLabels","minGap","idealY","$e4b487e979d7c06d$var$CircularChartsHelpers","drawYAxisTexts","yaxisConfig","getMaxLabelWidth","drawExternalLabel","$e4b487e979d7c06d$var$D2R$1","$e4b487e979d7c06d$var$R2D$1","$e4b487e979d7c06d$var$arcPoint","$e4b487e979d7c06d$var$xy","$e4b487e979d7c06d$var$roundedDonutSegmentPath","rIn","rOut","a0","a1","spanDeg","degOut","degIn","ocEnd","rEndOut","ocStart","rStartOut","icEnd","rEndIn","icStart","rStartIn","$e4b487e979d7c06d$var$sharpDonutSegmentPath","largeArc","C","Din","$e4b487e979d7c06d$var$Pie","animBeginArr","animDur","donutDataLabels","lineColorArr","defaultSize","fullAngle","externalCfg","dlStyle","externalLabelStyle","externalLabels","externalLabelMaxLines","externalLabelLineH","showExternalLabels","reserveExternalLabelSpace","donutSize","scaleSize","halfW","halfH","dataLabelsGroup","sliceLabels","sliceSizes","prevSliceSizes","sliceLabelGroups","externalLabelGroups","elHoverOutline","elHoverOutlinePath","hoverOutlineIndex","prevSectorAngleArr","getExternalLabelText","getExternalLabelLines","lineSets","maxLabelWidth","cn","blockHeight","mv","fitted","elPie","sectorAngleArr","drawPolarElements","collapsedIdx","polarVisible","prevValues","prevMaxY","previousAngle","prevTotal","elG","drawArcs","shouldFadeInLabels","renderInnerDataLabels","hollowSize","labelsNode","prevStartAngle","prevEndAngle","elPieArc","prevSize","getChangedPath","shadow","labelPosition","midAngle","arcCenter","finalD","getPiePath","targetD","morphSpeed","morphRunner","animatePaths","animateStartingPos","shouldSetPrevPaths","getExpandOffset","elPieLabelWrap","elPieLabel","baseLabelX","connectorColor","placeExternalLabels","revealOnAnimEnd","revertDataLabelsInner","showHoverOutline","hideHoverOutline","printDataLabelsInner","prevAngle","fromStartAngle","toStartAngle","animateArc","currAngle","fromAngle","hasPrevSize","isTrack","offsetSlice","allEls","pieSlice","wasOut","getSliceMovers","getSliceOffsetVector","midRad","getHoverOutlinePath","isSliceOut","startDeg","getSliceExtent","geo","endDeg","isSliceType","rRef","inset","gapDeg","startRadians","roundedPath","getRoundedSlicePath","endRadians","startInner","endInner","pathBeginning","D2R2","isDonut","spanRad","$e4b487e979d7c06d$var$roundedPieSegmentPath","gCircles","gYAxis","yScale","yTexts","circleSize","drawSpokes","valueColor","showTotal","labelFontWeight","valOffset","elValue","printInnerLabels","labelsConfig","isTotal","elLabelEl","dataLabelsGroupEl","spokeConfig","angleDivision","$e4b487e979d7c06d$var$calculateRatio","rowMin","rowMax","rowSum","lengthSq","sumSq","$e4b487e979d7c06d$var$emitCoordinates","rowLen","xoffset","yoffset","areaWidth","subY","areaHeight","subX","$e4b487e979d7c06d$var$computeArea","kids","_area","$e4b487e979d7c06d$var$layoutLevel","areas","$e4b487e979d7c06d$var$squarify","currentRatio","$e4b487e979d7c06d$var$normalize","headerHeight","$e4b487e979d7c06d$var$GOLDEN_ANGLE","$e4b487e979d7c06d$var$easeOutCubic","$e4b487e979d7c06d$var$easeInOutCubic","$e4b487e979d7c06d$var$D2R","$e4b487e979d7c06d$var$R2D","$e4b487e979d7c06d$var$SVGNS","$e4b487e979d7c06d$var$XHTML","$e4b487e979d7c06d$var$lerp","groupCtx","xArrValues","yArrValues","commonPathOpts","drawStackedBarPaths","drawStackedColumnPaths","flipClass","userBarHeight","userColumnWidth","subDivisions","prevBarW","gsi","seriesVal","prevBarH","prevYValue","rangeBarOptions","srty","detectOverlappingBars","drawRangeBarPaths","srtx","drawRangeColumnPaths","rowIndex","overlappedIndex","getRangeValue","xForNumericXAxis","preventBarOverflow","violinOptions","pointsOptions","seriesMaxWeight","pointsByViolin","drawHorizontalViolin","drawVerticalViolin","alongRepresentative","pointGroups","buildPointsSubPath","bodyEl","getDensity","effectiveMaxWeight","buildBodyPath","prevV","wpxOf","wp","rightPts","leftPts","smoothSegment","screenPts","monotonicIsY","continued","strictlyMonotonic","bez","halfWidthAtValue","maxWeightOverride","toPx","totalAngle","trackStartAngle","trackEndAngle","radialDataLabels","onBarLabelClick","colorArr","hasBands","hideTrack","isNeedleShape","elTracks","drawTracks","elBands","skipValueArc","elTicks","drawTicks","isInitialMount","ticksNode","elNeedle","drawNeedle","angleRatio","elHollow","elRadialBarTrack","trackConfig","hollowFillID","hollowRadius","drawHollowImage","drawHollow","shown","reverseLoop","elRadialBarArc","domainMin","domainMax","domainSpan","valueToFraction","clamped","dataValue","currFullAngle","prevFullAngle","morphFromType","morphFromFilled","radialMidAngle","radialArcCenter","barStartCords","actualArcD","_angleAtValue","safeMax","_describeArc","bandStroke","elBand","majorCount","minorCount","drawTickAt","isMajor","labelRadius","labelPos","tMinor","arcRadius","baseW","tipW","needleOffsetY","targetAngle","_lastNeedleAngle","animationSpeed","randID","hollowFillImg","isLog","maxValue","minValue","dataRadiusOfPercent","dataRadius","angleArr","disAngle","yaxisLabelsTextsPos","dataPointsPos","elDataPointsMain","yaxisLabels","dv","getDataPointsPos","createPaths","linePathsTo","renderedLinePath","linePathsFrom","renderedAreaPath","areaPathsFrom","areaPathsTo","drawPolygons","xaxisTexts","drawXAxisTexts","elS","yaxisTexts","radiusSizes","layerDis","polygonStrings","radiusSize","yText","xaxisLabelsConfig","elXAxisWrap","polygonPos","getTextPos","linePathTo","areaPathTo","polygonSize","dataRadiusArr","dataPointsPosArray","curPointPos","rectRadius","useCanvas","isContinuousX","binPx","cellFillOpacity","rev","heatSeries","dIndex","cellW","heatColor","heatColorProps","animateHeatMap","animateHeatColor","formattedText","pointsCount","showParents","_levelCache","_total","_avgLabelSize","_tooltipEl","_tipOwned","_morphLeafIndex","tree","$e4b487e979d7c06d$var$getTreemapRoots","stashed","parentsCfg","_resolveFocus","layoutRoots","$e4b487e979d7c06d$var$TreemapSquared","_levelPadding","_levelHeader","morphSrc","leavesBySeries","_leavesBySeries","parentsBySeries","_parentsBySeries","elDataLabelWrap","_drawParent","cascadeEnabled","cascadeDelays","tileCount","ranked","_leafColor","_morphSourceForLeaf","_tilePath","_morphTile","animateTreemap","getFontSize","_labelCanShow","truncateLabels","rotateToFitLabel","sName","textSize","labelRectHeight","elLabelRect","elLabelText","_renderBreadcrumb","_levelCfg","tm","lvl","_rw","_rh","cv","_parentChrome","hstyle","headerBg","headerColor","headerFontSize","headerFontFamily","headerFontWeight","hoverColor","hoverShow","elGroup","_morphKeyed","headerText","elHeaderRect","_formatValue","_attachParentEvents","_makeParentAccessible","_parentLabel","visibleText","_drawnTotal","_countLeaves","lead","_zoomTo","_showParentTooltip","_positionTooltip","_hideParentTooltip","_warnedZoomConflict","treemapFocusKey","restoreFocus","crumb","_focusChain","drawnRoots","_breadcrumbCfg","$e4b487e979d7c06d$var$renderBreadcrumb","crumbs","compact","onNavigate","_placeBreadcrumb","_tip","parentVal","pctTotal","pctParent","leafCount","percentOfParent","percentOfTotal","groupBg","tw","_subtreeArea","tileWidth","tileHeight","_averageLabelSize","totalLabelLength","countLabels","coordinates","averagelabelsize","arearoot","labelMaxWidth","morph","_lastDotR","_gridTrack","_gridDenom","_scatterAxis","flow","_applyMaxUnits","_layoutPacked","_layoutColumns","_layoutGrid","_layoutScatter","_layoutArc","_layoutCustom","_layoutGrouped","gridSplit","_drawGridTrack","_drawScatterAxes","dotR","_shouldAnimate","perRowBurst","pieceTakeover","_unitPrevDots","nextPrev","animDots","sizeStats","_bubbleStats","gIndex","cluster","burst","burstCount","dotFill","rj","_radiusForValue","_unitValueOf","_drawDot","_placeDot","inPlace","cy0","r0","r1","fill0","fill1","isEnter","labelTotal","_drawClusterLabel","_outerLabelsOn","_drawOuterLabels","_collectExits","exitGroup","_runExits","_unitSprings","_runGather","provider","_resolveLayoutProvider","gutter","_outerLabelGutter","_lastOuterGutter","availR","_resolveStep","_dotRadiusFromStep","_layoutObjects","byId","outerR","far","labelSpace","Kv","slotOf","availH","maxCount","outerRs","centers","visOuter","visCenters","totalW","_spiral","catI","theta","b3","acfg","innerRatio","ux","uy","_arcBounds","_arcAllocate","seats","rho","radii","seatsPerRow","absSpan","_fixedRadius","evalR","weightSum","qq","radialPitch","minArcPitch","arcPitch","pitch","arcRows","maxR","cand","labelsBelow","topPad","barW","bottomPad","rowsCap","maxCols","tallestBarH","barH","rowIdx","colIdx","_layoutGridSplit","gcfg","_largestRemainder","availW","blockW","blockH","originX","rowY","cellsPerTile","rowsPerTile","denom","tileCols","tileRows","topBand","tileW","tileH","availTileW","availTileH","tileX","tileYtop","cellXY","filled","scfg","_layoutScatter2D","_layoutScatterVertical","_scatterSizeStats","catVals","isNum","vmin","vmax","vs","_scatterValueDomain","xSpan","laneW","bottomGutter","plotR","plotB","plotW","plotX","plotL","laneH","plotH","lanes","rMax","plotT","_scatterRadius","halfLane","_beeswarm","vMin","vMax","vSpan","leftGutter","plotY","valueTitle","yOf","xmn","xmx","ymn","ymx","xTicksN","yTicksN","_niceScale","ySpan","baseR","mkTicks","xTicks","yTicks","rMin","zmin","zmax","aMin","aMax","rFallback","fk","rCap","pr","df","need","ds","buildTicks","spacing2","nice","_niceNum","rng","nf","NS","gridColor","axisColor","cfgColors","configuredLabelColor","_formatTick","lane","floors","_bubbleActive","sbv","stats","minR","refR","_isCorner","_halfExtent","hx","hy","ih","_tintFilter","safe","comp","_rgb","_seedSprings","$e4b487e979d7c06d$var$springParams","$e4b487e979d7c06d$var$SPRING_REFERENCE_SPEED","springs","carried","w$1","corner","maxDelay","cyAttr","_c0","_c1","easePos","stepFn","ec","released","restX","restY","cr","cg","drift","x0","y0","_outerLabelLines","$e4b487e979d7c06d$var$measureLabelWidth","gathering","spreadX","spreadY","bandedByX","bestScore","score","maxLines","estWidth","yMid","arcId","pathEl","_focusMaxDepth","_zoomGen","_roots","_nodesAll","_innerR","_outerR","_lblSeq","_ringsG","_labelsG","_buildHierarchy","_fillValues","_validateStrict","_colorPass","_relayout","anims","_applyLayout","$e4b487e979d7c06d$var$buildHierarchy","warned","_color","_lighten","_show","_placeVis","hole","_parseSize","ringCount","radialGap","vd","_iR","_vDepth","_oR","vDepth","_a0","_a1","gen","morphDur","_sunburstPrevGeoms","iR","oR","_el","_createArcEl","_morphSourceFor","_morphArcFrom","_sweepArc","isNew","_cur","_animateArc","geoms","_renderLabels","_arcPath","_attachTooltip","fadeIn2","startOp","endOp","labelsG","_renderCurvedLabel","flip","padDeg","_ptAt","_truncate","maxChars","arcLen","nextFocus","_hideTooltip","rC","gC","bC","$bd33f692cf9f4068$export$5f3279733515fed0","typeNumber","errorCorrectionLevel","_typeNumber","_errorCorrectionLevel","$bd33f692cf9f4068$var$QRErrorCorrectionLevel","_modules","_moduleCount","_dataCache","_dataList","makeImpl","moduleCount","modules","setupPositionProbePattern","setupPositionAdjustPattern","setupTimingPattern","setupTypeInfo","setupTypeNumber","createData","mapData","getBestMaskPattern","minLostPoint","lostPoint","$bd33f692cf9f4068$var$QRUtil","getLostPoint","getPatternPosition","bits","getBCHTypeNumber","getBCHTypeInfo","inc","bitIndex","byteIndex","maskFunc","getMaskFunction","createBytes","rsBlocks","maxDcCount","maxEcCount","dcdata","ecdata","dcCount","dataCount","ecCount","totalCount","getBuffer","rsPoly","getErrorCorrectPolynomial","modPoly","rawPoly","$bd33f692cf9f4068$var$qrPolynomial","getLength","modIndex","getAt","totalCodeCount","dataList","$bd33f692cf9f4068$var$QRRSBlock","getRSBlocks","$bd33f692cf9f4068$var$qrBitBuffer","getMode","getLengthInBits","totalDataCount","putBit","addData","$bd33f692cf9f4068$var$qrNumber","$bd33f692cf9f4068$var$qrAlphaNum","$bd33f692cf9f4068$var$qr8BitByte","$bd33f692cf9f4068$var$qrKanji","isDark","getModuleCount","createTableTag","cellSize","qrHtml","createSvgTag","mr","qrSvg","scalable","escapeXml","createDataURL","$bd33f692cf9f4068$var$createDataURL","createImgTag","escaped","_createHalfASCII","blocksLastLineNoMargin","createASCII","white","black","renderTo2dContext","stringToBytes","createStringToBytes","unicodeData","numChars","unicodeMap","$bd33f692cf9f4068$var$base64DecodeInputStream","b0","b1","digit","G15","G18","errorCorrectLength","$bd33f692cf9f4068$var$QRMath","gexp","qrcode","sameCount","darkCount","EXP_TABLE","LOG_TABLE","glog","_num","rsBlock","_buffer","_length","bit","bufIndex","_data","strToNum","chatToNum","getCode","_bytes","$bd33f692cf9f4068$var$byteArrayOutputStream","writeByte","writeShort","writeBytes","writeString","$bd33f692cf9f4068$var$base64EncodeOutputStream","_buflen","_base64","writeEncoded","padlen","_str","$bd33f692cf9f4068$var$gifImage","setPixel","pixel","raster","getLZWRaster","bitOutputStream","_bitLength","_bitBuffer","_out","lzwMinCodeSize","clearCode","endCode","bitLength","lzwTable","byteOut","bitOut","dataIndex","_size","getPixel","gif","$21b57f0df60ff3c3$var$modifierValue","$ojnWK","$d09a060543d6a2e2$var$meetsDwellThreshold","meetsThreshold","intersectionRatio","$cf417a97d74b93bb$var$regexes","$cf417a97d74b93bb$export$193046f9d1fa1ed1","templateMark","inputMark","templateChar","inputChar","$cf417a97d74b93bb$var$formatMoney","delimiter","thousands","minus","strippedInput","replaceAll","addThousands","input2","thousands2","repeat","$85572a2cec6fb903$var$morph","toHtml","$85572a2cec6fb903$var$monkeyPatchDomSetAttributeToAllowAtSymbols","$85572a2cec6fb903$var$createMorphContext","closestDataStack","_x_dataStack","patch","$85572a2cec6fb903$var$morphBetween","startMarker","endMarker","fromContainer","fromBlock","$85572a2cec6fb903$var$Block","toContainer","insertAdjacentHTML","toStartMarker","createComment","toEndMarker","toBlock","patchChildren","noop","lookahead","updating","differentElementNamesTypesOrKeys","swapElements","updateChildrenOnly","skipChildren","$85572a2cec6fb903$var$shouldSkipChildren","skipUntil","skipUntilCondition","_x_teleport","patchNodeValue","patchAttributes","$85572a2cec6fb903$var$shouldSkip","toCloned","_x_transitioning","_x_isShown","domAttributes","toAttributes","fromKeys","keyToMap","fromKeyHoldovers","currentTo","$85572a2cec6fb903$var$getFirstNode","currentFrom","$85572a2cec6fb903$var$seedingMatchingId","fromId","_x_bindings","toKey","fromKey","fromDone","toDone","$85572a2cec6fb903$var$getNextSibling","holdover","isIf","isEnd","nestedIfCount","fromBlockStart","fromBlockEnd","toBlockStart","toBlockEnd","isEqualNode","nextToElementSibling","addNodeBefore","fromKeyNode","currentFromNext","_x_lastRenderedEl","removals","domForRemoval","theKey","beforeMe","$85572a2cec6fb903$var$patched","startComment","endComment","reference","original","hostDiv","escapedValue","getAttributeNode","removeAttributeNode","setAttributeNode","$dc5e95bf63b2a32e$var$storageHas","$dc5e95bf63b2a32e$var$storageGet","$dc5e95bf63b2a32e$var$storageSet","removeItem","$a9mZZ","$182977f45aac8dca$var$generateContext","Alpine2","activateSelectedOrFirst","changeTracker","activeKey","reactive","newValue","comparisonValue","orderedKeys","activatedByKeyPress","debounce","registerItemsQueue","registerItem","reorderKeys","unregisterKeysQueue","unregisterItem","getItemByKey","getItemByValue","getItemByEl","getItemsByValues","rawValues","filteredValue","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","getActiveItem","hasActive","deactivateKey","activateItem","activateKey","aEl","zEl","getActiveKey","activeEl","isActiveEl","activateEl","isDisabledEl","isScrollingTo","scrollingCount","activateAndScrollToKey","nonDisabledOrderedKeys","wasActivatedByKeyPress","isActiveKey","nextKey","prevKey","firstKey","lastKey","searchQuery","clearSearch","searchKey","foundKey","activateByKeyEvent","searchable","setIsTyping","targetKey","$182977f45aac8dca$var$renderHiddenInputs","newInputs","$182977f45aac8dca$var$generateInputs","carry","subject","_x_hiddenInput","_x_ignore","oldInputs","mutateDom","$182977f45aac8dca$var$microtask","$182977f45aac8dca$var$dom","receive","$data","__itemEls","__isDisabled","debouncedClearSearch","receiver","$f347e48613385d9c$var$flushPending","$f347e48613385d9c$var$flushing","$f347e48613385d9c$var$queue","$f347e48613385d9c$var$lastFlushedIndex","$f347e48613385d9c$var$queueNeedsSort","$f347e48613385d9c$var$transactionActive","$f347e48613385d9c$var$dequeueJob","$f347e48613385d9c$var$queueFlush","$f347e48613385d9c$var$flushJobs","$f347e48613385d9c$var$sortPendingJobs","depths","$f347e48613385d9c$var$isStructural","depthDifference","$f347e48613385d9c$var$getElementDepth","_x_schedulerPriority","owner","_x_teleportBack","$f347e48613385d9c$var$nextStructuralEffectOrder","$f347e48613385d9c$var$shouldSchedule","$f347e48613385d9c$var$watch","getter","oldValueJSON","firstTime","effectReference","newJSON","previousValue","$f347e48613385d9c$var$transaction","$f347e48613385d9c$var$onAttributeAddeds","$f347e48613385d9c$var$onElRemoveds","$f347e48613385d9c$var$onElAddeds","$f347e48613385d9c$var$onElRemoved","_x_cleanups","$f347e48613385d9c$var$onAttributesAdded","$f347e48613385d9c$var$onAttributeRemoved","_x_attributeCleanups","$f347e48613385d9c$var$cleanupAttributes","$f347e48613385d9c$var$observer","$f347e48613385d9c$var$onMutate","$f347e48613385d9c$var$currentlyObserving","$f347e48613385d9c$var$startObservingMutations","$f347e48613385d9c$var$stopObservingMutations","queueLengthWhenTriggered","$f347e48613385d9c$var$queuedMutations","$f347e48613385d9c$var$mutateDom","$f347e48613385d9c$var$isCollecting","$f347e48613385d9c$var$deferredMutations","addedAttributes","removedAttributes","_x_ignoreMutationObserver","_x_marker","remove2","$f347e48613385d9c$var$scope","$f347e48613385d9c$var$mergeProxies","$f347e48613385d9c$var$closestDataStack","$f347e48613385d9c$var$addScopeToNode","data2","Proxy","$f347e48613385d9c$var$mergeProxyTrap","flatMap","unscopables","Reflect","thisProxy","$f347e48613385d9c$var$collapseProxies","$f347e48613385d9c$var$keyInPrototypeChain","descriptor","$f347e48613385d9c$var$initInterceptors","recurse","basePath","__v_skip","_x_interceptor","initialize","isObject3","$f347e48613385d9c$var$interceptor","mutateObj","initialValue","segment","$f347e48613385d9c$var$set","$f347e48613385d9c$var$magics","$f347e48613385d9c$var$injectMagics","memoizedUtilities","$f347e48613385d9c$var$getUtilities","utilities","$f347e48613385d9c$var$getElementBoundUtilities","interceptor","$f347e48613385d9c$var$tryCatch","$f347e48613385d9c$var$handleError","$f347e48613385d9c$var$errorHandler","error2","$f347e48613385d9c$var$shouldAutoEvaluateFunctions","$f347e48613385d9c$var$dontAutoEvaluateFunctions","$f347e48613385d9c$var$evaluate","extras","$f347e48613385d9c$var$evaluateLater","$f347e48613385d9c$var$theEvaluatorFunction","$f347e48613385d9c$var$evaluatorMemo","$f347e48613385d9c$var$runIfTypeOfFunction","scope2","$f347e48613385d9c$var$prefixAsString","$f347e48613385d9c$var$prefix","$f347e48613385d9c$var$directiveHandlers","$f347e48613385d9c$var$directive","directive2","$f347e48613385d9c$var$directiveOrder","$f347e48613385d9c$var$directives","originalAttributeOverride","transformedAttributeMap","_x_virtualDirectives","vAttributes","staticAttributes","$f347e48613385d9c$var$attributesOnly","directives2","$f347e48613385d9c$var$toTransformedAttributes","newName","oldName","$f347e48613385d9c$var$outNonAlpineAttributes","typeMatch","$f347e48613385d9c$var$alpineAttributeRegex","valueMatch","$f347e48613385d9c$var$byPriority","$f347e48613385d9c$var$getDirectiveHandler","handler4","fullHandler","_x_ignoreSelf","$f347e48613385d9c$var$isDeferringHandlers","$f347e48613385d9c$var$directiveHandlerStacks","$f347e48613385d9c$var$currentHandlerStackKey","runCleanups","cleanups","effect3","cleanupEffect2","_x_effects","_x_runEffects","$f347e48613385d9c$var$alpine_default","$f347e48613385d9c$var$startingWith","$f347e48613385d9c$var$attributeTransformers","$f347e48613385d9c$var$mapAttributes","$f347e48613385d9c$var$DEFAULT","typeA","typeB","$f347e48613385d9c$var$walk","$f347e48613385d9c$var$isCloning","$f347e48613385d9c$var$skipDuringClone","$f347e48613385d9c$var$interceptors","$f347e48613385d9c$var$interceptClone","$f347e48613385d9c$var$isCloningLegacy","$f347e48613385d9c$var$dontRegisterReactiveSideEffects","callback2","storedEffect","$f347e48613385d9c$var$activeDefers","$f347e48613385d9c$var$queueInto","queuedAttributes","$f347e48613385d9c$var$dispatch","$f347e48613385d9c$var$warn","$f347e48613385d9c$var$findClosest","_x_deferInit","$f347e48613385d9c$var$started","$f347e48613385d9c$var$rootSelectorCallbacks","$f347e48613385d9c$var$initSelectorCallbacks","$f347e48613385d9c$var$rootSelectors","$f347e48613385d9c$var$allSelectors","$f347e48613385d9c$var$addRootSelector","selectorCallback","$f347e48613385d9c$var$addInitSelector","$f347e48613385d9c$var$closestRoot","includeInitSelectors","selectors","$f347e48613385d9c$var$initInterceptors2","$f347e48613385d9c$var$markerDispenser","$f347e48613385d9c$var$initTree","walker","intercept","$f347e48613385d9c$var$deferHandlingDirectives","flushHandlers","$f347e48613385d9c$var$destroyTree","$f347e48613385d9c$var$tickStack","$f347e48613385d9c$var$isHolding","$f347e48613385d9c$var$nextTick","$f347e48613385d9c$var$releaseNextTicks","$f347e48613385d9c$var$setClasses","$f347e48613385d9c$var$setClassesFromString","classObject","forAdd","forRemove","classString","bool","$f347e48613385d9c$var$splitClasses","$f347e48613385d9c$var$setStyles","previousStyles","value2","$f347e48613385d9c$var$once","$f347e48613385d9c$var$registerTransitionObject","setFunction","defaultValue","_x_transition","leave","$f347e48613385d9c$var$transition","undoStart","undoDuring","undoEnd","interrupted","reachedBefore","reachedEnd","beforeCancels","beforeCancel","transitionDuration","transitionDelay","animationDuration","$f347e48613385d9c$var$modifierValue","$f347e48613385d9c$var$bind","$f347e48613385d9c$var$bindInputValue","$f347e48613385d9c$var$isRadio","$f347e48613385d9c$var$isCheckbox","valueA","$f347e48613385d9c$var$updateSelect","arrayWrappedValue","$f347e48613385d9c$var$bindAttribute","_x_undoAddedStyles","_x_undoAddedClasses","$f347e48613385d9c$var$booleanAttributes","$f347e48613385d9c$var$isObjectAttr","$f347e48613385d9c$var$safeParseBoolean","evaluate2","doesntSpecify","transitioningIn","transitioningOut","wantsAll","wantsOpacity","wantsScale","opacityValue","scaleValue","durationIn","durationOut","directiveStorageMap","transitionTimingFunction","_x_toggleAndCascadeWithTransitions","nextTick2","visibilityState","_x_hidePromise","isFromCancelledTransition","$f347e48613385d9c$var$closestHide","_x_hideChildren","hideAfterChildren","$f347e48613385d9c$var$getAttributeBinding","localName","$f347e48613385d9c$var$debounce","func","wait","$f347e48613385d9c$var$throttle","inThrottle","$f347e48613385d9c$var$entangle","outerGet","outerSet","innerGet","innerSet","outerHash","firstRun","$f347e48613385d9c$var$cloneIfObject","outerHashLatest","innerHashLatest","$f347e48613385d9c$var$stores","$f347e48613385d9c$var$isReactive","$f347e48613385d9c$var$binds","$f347e48613385d9c$var$applyBindingsObject","cleanupRunners","$f347e48613385d9c$var$datas","release","flushAndStopDeferringMutations","dontAutoEvaluateFunctions","disableEffectScheduling","startObservingMutations","stopObservingMutations","setReactivityEngine","engine","scheduler","task","onAttributeRemoved","onAttributesAdded","onlyDuringClone","addRootSelector","addInitSelector","setErrorHandler","interceptClone","addScopeToNode","deferMutations","mapAttributes","interceptInit","initInterceptors","injectMagics","setEvaluator","newEvaluator","setRawEvaluator","mergeProxies","extractProp","extract","_x_inlineBindings","binding","findClosest","onElRemoved","closestRoot","destroyTree","setStyles","deferInit","pending","ownsIgnore","error3","$f347e48613385d9c$var$settle","suspendedAncestor","entangle","evaluateRaw","initTree","prefixed","newPrefix","$f347e48613385d9c$var$queueAttributesForDeferredTree","pluginDirectives","plugin2","oldEl","newEl","hasRunThroughFirstEl","el3","bound","watch","getBindings","$f347e48613385d9c$var$extend","$f347e48613385d9c$var$hasOwnProperty","$f347e48613385d9c$var$isArray","$f347e48613385d9c$var$isSymbol","$f347e48613385d9c$var$isObject","$f347e48613385d9c$var$objectToString","$f347e48613385d9c$var$toRawType","$f347e48613385d9c$var$toTypeString","$f347e48613385d9c$var$isIntegerKey","$f347e48613385d9c$var$isString","$f347e48613385d9c$var$cacheStringFunction","$f347e48613385d9c$var$camelizeRE","$f347e48613385d9c$var$hyphenateRE","$f347e48613385d9c$var$capitalize","$f347e48613385d9c$var$warn2","$f347e48613385d9c$var$pausedQueueEffects","$f347e48613385d9c$var$ReactiveEffect","deps","depsTail","effects","resume","trigger","$f347e48613385d9c$var$batch","isComputed","$f347e48613385d9c$var$cleanupEffect","$f347e48613385d9c$var$prepareDeps","prevEffect","prevShouldTrack","$f347e48613385d9c$var$shouldTrack","$f347e48613385d9c$var$cleanupDeps","nextDep","$f347e48613385d9c$var$removeSub","onStop","runIfDirty","$f347e48613385d9c$var$isDirty","$f347e48613385d9c$var$batchDepth","$f347e48613385d9c$var$endBatch","prevActiveLink","dep","activeLink","tail","prevDep","$f347e48613385d9c$var$removeDep","$f347e48613385d9c$var$refreshComputed","globalVersion","$f347e48613385d9c$var$globalVersion","_dirty","prevSub","_value","soft","nextSub","subsHead","subs","$f347e48613385d9c$var$trackStack","$f347e48613385d9c$var$Link","$f347e48613385d9c$var$Dep","debugInfo","$f347e48613385d9c$var$addSub","currentTail","onTrack","onTrigger","$f347e48613385d9c$var$targetMap","$f347e48613385d9c$var$ITERATE_KEY","$f347e48613385d9c$var$MAP_KEY_ITERATE_KEY","$f347e48613385d9c$var$ARRAY_ITERATE_KEY","$f347e48613385d9c$var$track","depsMap","$f347e48613385d9c$var$trigger","oldTarget","targetIsArray","isArrayIndex","newLength","key2","$f347e48613385d9c$var$isMap","$f347e48613385d9c$var$reactiveReadArray","raw2","$f347e48613385d9c$var$toRaw","$f347e48613385d9c$var$isShallow","$f347e48613385d9c$var$toReactive","$f347e48613385d9c$var$shallowReadArray","$f347e48613385d9c$var$toWrapped","$f347e48613385d9c$var$isReadonly","$f347e48613385d9c$var$isReactive2","$f347e48613385d9c$var$toReadonly","$f347e48613385d9c$var$arrayInstrumentations","$f347e48613385d9c$var$iterator","thisArg","$f347e48613385d9c$var$apply","findLast","findLastIndex","$f347e48613385d9c$var$searchProxy","$f347e48613385d9c$var$noTracking","$f347e48613385d9c$var$reduce","reduceRight","toReversed","toSorted","comparer","toSpliced","self2","wrapValue","$f347e48613385d9c$var$arrayProto","wrappedRetFn","methodFn","wrappedFn","wrapInitialAccumulator","$f347e48613385d9c$var$isNonTrackableKeys","$f347e48613385d9c$var$makeMap","$f347e48613385d9c$var$builtInSymbols","getOwnPropertyNames","$f347e48613385d9c$var$hasOwnProperty2","$f347e48613385d9c$var$BaseReactiveHandler","_isReadonly","_isShallow","isReadonly2","isShallow2","$f347e48613385d9c$var$shallowReadonlyMap","$f347e48613385d9c$var$readonlyMap","$f347e48613385d9c$var$shallowReactiveMap","$f347e48613385d9c$var$reactiveMap","$f347e48613385d9c$var$isRef","$f347e48613385d9c$var$readonly","$f347e48613385d9c$var$reactive2","$f347e48613385d9c$var$MutableReactiveHandler","isArrayWithIntegerKey","isOldValueReadonly","hadKey","$f347e48613385d9c$var$hasChanged","deleteProperty","$f347e48613385d9c$var$ReadonlyReactiveHandler","$f347e48613385d9c$var$mutableHandlers","$f347e48613385d9c$var$readonlyHandlers","$f347e48613385d9c$var$toShallow","$f347e48613385d9c$var$createReadonlyMethod","$f347e48613385d9c$var$createInstrumentationGetter","instrumentations","rawTarget","rawKey","readonly2","observed","valueToAdd","get2","$f347e48613385d9c$var$checkIdentityKeys","hadItems","iteratorMethods","targetIsMap","isPair","innerIterator","isKeyOnly","$f347e48613385d9c$var$hasOwn","$f347e48613385d9c$var$mutableCollectionHandlers","$f347e48613385d9c$var$readonlyCollectionHandlers","$f347e48613385d9c$var$createReactiveObject","baseHandlers","collectionHandlers","proxyMap","isExtensible","existingProxy","targetType","$f347e48613385d9c$var$targetTypeMap","rawType","evaluateLater2","refObjects","_x_refs_proxy","_x_refs","$f347e48613385d9c$var$globalIdMemo","$f347e48613385d9c$var$findAndIncrementId","$f347e48613385d9c$var$warnMissingPluginMagic","magicName","slug","$f347e48613385d9c$var$cacheIdByNameOnElement","_x_id","_x_ids","evaluateInnerSet","_x_model","_x_removeModelListeners","setWithModifiers","$f347e48613385d9c$var$getTarget","clone2","_x_forwardEvents","placeInDom","clone3","modifiers2","_x_teleportPutBack","$f347e48613385d9c$var$teleportContainerDuringClone","$f347e48613385d9c$var$handler","$f347e48613385d9c$var$on","listenerTarget","wrapHandler","$f347e48613385d9c$var$addDebounceOrThrottle","_x_pendingModelUpdates","$f347e48613385d9c$var$isKeyEvent","$f347e48613385d9c$var$isClickEvent","$f347e48613385d9c$var$isListeningForASpecificKeyThatHasntBeenPressed","keyModifiers","modifier","$f347e48613385d9c$var$nonKeyModifiers","debounceIndex","$f347e48613385d9c$var$isNumeric","$f347e48613385d9c$var$keyToModifiers","selectedSystemKeyModifiers","systemKeyModifiers","activelyPressedKeyModifiers","nextModifier","modifierToKeyMap","$f347e48613385d9c$var$getInputValue","currentValue","$f347e48613385d9c$var$safeParseNumber","selectedOptions","$f347e48613385d9c$var$isNumeric2","$f347e48613385d9c$var$isGetterSetter","evaluateSet","scopeTarget","evaluateGet","getValue","setValue","hasChangeModifier","hasBlurModifier","hasEnterModifier","syncValue","syncCallback","removeResetListener","_x_forceModelUpdate","observer2","$f347e48613385d9c$var$handler2","bindingProviders","_x_keyExpression","$f347e48613385d9c$var$dataForReconciliation","$f347e48613385d9c$var$handler3","$f347e48613385d9c$var$warnMissingPluginDirective","directiveName","reactiveData","dataToReconcile","magicContext","dataProviderContext","existingDescriptor","_x_doHide","_x_doShow","iteratorNames","$f347e48613385d9c$var$parseForExpression","forIteratorRE","inMatch","iteratorMatch","collection","evaluateItems","evaluateKey","_x_lookup","templateEl","$f347e48613385d9c$var$isNumeric3","oldLookup","hasStringKeys","scopeEntries","scopeVariables","innerKey","_x_refreshXForScope","_x_currentIfEl","importNode","reactiveScope","newScope","_x_undoIf","dataStack","overriddenMagics","$f347e48613385d9c$var$generateFunctionFromString","AsyncFunction","rightSideSafeExpression","safeAsyncFunction","func2","completeScope","$f347e48613385d9c$var$effect2","$lrtgD","$hHqg9","$bV58F","$busg4","$dWz0N","$cSEGC","$8DTOO","$7A7V9","$bKHmb","$aFSg5","$b4EcM","$1c3wp","$6ZBMV","$eokEX","$d6Hx1","$F4g3Q","$lbjQh","$ak9J4","$lWvX9","$jwT4P","$dgpCO","$55buA","$fZuEE","$37e295d5e2f3bd20$exports","$37e295d5e2f3bd20$var$__importDefault","$37e295d5e2f3bd20$var$run_1","$2bd4b9c31e857ffa$var$Events","Events","eventFunctions","_eventType","_eventFunctions","eventFunction","$5d5682da381fac09$var$instances","Instances","Accordion","Carousel","Collapse","Dial","Dismiss","Drawer","Dropdown","Modal","Popover","Tabs","Tooltip","InputCounter","CopyClipboard","Datepicker","addInstance","component","destroyAndRemoveInstance","_generateRandomId","getAllInstances","getInstances","getInstance","_componentAndInstanceCheck","destroyInstanceObject","removeInstance","instanceExists","FlowbiteInstances","$d93a619a461d9c03$var$__assign","$d93a619a461d9c03$var$Default","alwaysOpen","activeClasses","inactiveClasses","onOpen","onClose","onToggle","$d93a619a461d9c03$var$DefaultInstanceOptions","$d93a619a461d9c03$var$Accordion","accordionEl","instanceOptions","_instanceId","_accordionEl","_options","_initialized","clickHandler","triggerEl","iconEl","updateOnOpen","updateOnClose","updateOnToggle","$d93a619a461d9c03$export$226c1dc98323ee4d","$accordionEl","$triggerEl","initAccordions","$fc7ccf099a511882$var$__assign","$fc7ccf099a511882$var$Default","onCollapse","onExpand","$fc7ccf099a511882$var$DefaultInstanceOptions","$fc7ccf099a511882$var$Collapse","_targetEl","_triggerEl","_visible","_clickHandler","updateOnCollapse","updateOnExpand","$fc7ccf099a511882$export$355ba5a528b4009a","targetId","$targetEl","initCollapses","$c1b11beef829dd56$var$__assign","$c1b11beef829dd56$var$Default","defaultPosition","indicators","onNext","onPrev","$c1b11beef829dd56$var$DefaultInstanceOptions","$c1b11beef829dd56$var$Carousel","carouselEl","_carouselEl","_activeItem","_indicators","_intervalDuration","_intervalInstance","slideTo","indicator","nextItem","rotationItems","middle","_rotate","_setActiveItem","cycle","updateOnNext","updateOnPrev","updateOnChange","$c1b11beef829dd56$export$3ab77386b16b9e58","$carouselEl","slide","$carouselItemEl","$indicatorEl","carousel","carouselNextEl","carouselPrevEl","initCarousels","$6d6d37a8acee51c1$var$__assign","$6d6d37a8acee51c1$var$Default","timing","onHide","$6d6d37a8acee51c1$var$DefaultInstanceOptions","$6d6d37a8acee51c1$var$Dismiss","updateOnHide","$6d6d37a8acee51c1$export$69c84787a503daef","$dismissEl","$df9341392e6ed7b1$export$2e2bcd8739ae039","$d98cb23738a6d9d0$export$45a5e7f76e0caa8d","OwnElement","$d98cb23738a6d9d0$export$1b3bfaa9684536aa","HTMLElement","$d98cb23738a6d9d0$export$af51f0f06c0f328a","initDismisses","$7e23bad950468b82$export$8960430cfd85939f","$7e23bad950468b82$export$96ec731ed4dcb222","$7e23bad950468b82$export$2077e0241d6afd3c","$90ccbd5892233dd2$export$2e2bcd8739ae039","uaData","userAgentData","brands","brand","$993d40d65cc118cd$export$2e2bcd8739ae039","$84019ab652aa921b$export$2e2bcd8739ae039","includeScale","isFixedStrategy","addVisualOffsets","$68a584be1dc90596$export$2e2bcd8739ae039","$4f30cf0ce50e075e$export$2e2bcd8739ae039","$433af39bc2fae35d$export$2e2bcd8739ae039","$943aee5c7065ad53$export$2e2bcd8739ae039","$41cae7042543c5d5$export$2e2bcd8739ae039","$18583dfdff147fd4$export$2e2bcd8739ae039","_getComputedStyle","$30ced62b744c6cfe$export$2e2bcd8739ae039","$17f6a21d28fc02f5$export$2e2bcd8739ae039","$a621d360f1a81b88$export$2e2bcd8739ae039","_element$ownerDocumen","scrollParent","$3eb5703c925e0e5d$export$2e2bcd8739ae039","isBody","updatedList","$a56b734280245ffb$var$getTrueOffsetParent","$a56b734280245ffb$export$2e2bcd8739ae039","$a56b734280245ffb$var$getContainingBlock","isFirefox","isIE","elementCss","perspective","contain","willChange","$f5c54167a3c62105$export$40e543e69a8b3fbb","$f5c54167a3c62105$export$79ffe56a765070d2","$f5c54167a3c62105$export$eabcd2c8791e7bf4","$f5c54167a3c62105$export$dfb5619354ba860","$f5c54167a3c62105$export$aec2ce47c367b8c3","$f5c54167a3c62105$export$b3571188c770cc5a","$f5c54167a3c62105$export$d7b7311ec04a3e8f","$f5c54167a3c62105$export$ae5ab1c730825774","$f5c54167a3c62105$export$368f9a87e87fa4e1","$f5c54167a3c62105$export$803cd8101b6c182b","$f5c54167a3c62105$export$d087d3878fdf71d5","$b3c2fd6800546b4b$var$DEFAULT_OPTIONS","strategy","$b3c2fd6800546b4b$var$areValidElements","$ff355aafd082b0cd$var$passive","$afe288682115fde3$export$2e2bcd8739ae039","$7b08f0526e425773$export$2e2bcd8739ae039","$b518c35b71cf930f$export$2e2bcd8739ae039","$03cba2f7a1498b5f$export$2e2bcd8739ae039","offsets","basePlacement","variation","commonX","commonY","mainAxis","$c8f8eadcf7685dc5$var$unsetSides","$c8f8eadcf7685dc5$export$378fa78a8fea596f","_Object$assign2","_Object$assign","popper","popperRect","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","hasX","hasY","sideX","sideY","heightProp","widthProp","commonStyles","$825ae98fe4f5d029$var$hash","$825ae98fe4f5d029$export$2e2bcd8739ae039","$76c023b5f4bd6339$var$hash","$76c023b5f4bd6339$export$2e2bcd8739ae039","$d63950b756706495$export$2e2bcd8739ae039","$b0d5f0927fb8bf5c$export$2e2bcd8739ae039","$631049efb60e96c6$var$getClientRectFromMixedType","clippingParent","winScroll","layoutViewport","clientTop","clientLeft","$683c5e26d5f8bfe5$export$2e2bcd8739ae039","$387b887da02b7e69$export$2e2bcd8739ae039","paddingObject","$4d11a6decde23bf9$export$2e2bcd8739ae039","hashMap","$f765731200b57f98$export$2e2bcd8739ae039","rootBoundary","clippingParents","clipperElement","firstClippingParent","clippingRect","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","clippingClientRect","contextElement","canEscapeClipping","accRect","referenceClientRect","popperOffsets","popperClientRect","elementClientRect","overflowOffsets","offsetData","modifiersData","$b6f0b0266e764faa$export$f28d906d67a997f3","$174d14927bb4f43b$var$getSideOffsets","preventedOffsets","$174d14927bb4f43b$var$isAnySideFullyClipped","$1bf0bf541303046d$export$8f7491d57c8f97a9","_generatorOptions","phase","_options$scroll","_options$resize","scrollParents","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","initialStyles","styleProperties","requires","_options$offset","invertDistance","skidding","distance","_data$state$placement","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","isBasePlacement","$b1f32a1d9525a032$var$getExpandedFallbackPlacements","oppositePlacement","placements","_options$allowedAutoP","allowedPlacements","overflows","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","numberOfChecks","_loop","fittingPlacement","_ret","requiresIfExists","_options$tether","tether","_options$tetherOffset","tetherOffset","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","arrowElement","arrowRect","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","arrowOffsetParent","clientOffset","offsetModifierValue","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","_state$modifiersData$","minProp","maxProp","endDiff","startDiff","clientSize","_options$element","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","orderedModifiers","effectCleanupFns","setOptionsAction","cleanupModifierEffects","depModifier","_ref$options","cleanupFn","forceUpdate","_state$elements","isOffsetParentAnElement","offsetParentIsScaled","_state$orderedModifie","_state$orderedModifie2","onFirstUpdate","$9d7e083df5284b15$var$__assign","$9d7e083df5284b15$var$__spreadArray","pack","ar","$9d7e083df5284b15$var$Default","triggerType","offsetSkidding","offsetDistance","ignoreClickOutsideClass","onShow","$9d7e083df5284b15$var$DefaultInstanceOptions","$9d7e083df5284b15$var$Dropdown","triggerElement","_popperInstance","_createPopperInstance","_setupEventListeners","triggerEvents","_getTriggerEvents","showEvents","_hoverShowTriggerElHandler","_hoverShowTargetElHandler","hideEvents","_hoverHideHandler","_setupClickOutsideListener","_clickOutsideEventListener","_handleClickOutside","_removeClickOutsideListener","clickedEl","isIgnored","ignoredClickOutsideEls","isVisible","updateOnShow","$9d7e083df5284b15$export$8cb65a02593bf108","dropdownId","$dropdownEl","initDropdowns","$eaca6a069237aaf5$var$__assign","$eaca6a069237aaf5$var$Default","backdropClasses","backdrop","closable","$eaca6a069237aaf5$var$DefaultInstanceOptions","$eaca6a069237aaf5$var$Modal","_eventListenerInstances","_isHidden","_backdropEl","_getPlacementClasses","removeAllEventListenerInstances","_destroyBackdropEl","_createBackdrop","backdropEl","_setupModalCloseEventListeners","_handleOutsideClick","_keydownEventListener","_removeModalCloseEventListeners","addEventListenerInstance","eventListenerInstance","getAllEventListenerInstances","$eaca6a069237aaf5$export$e14d3bc873a8b9b1","modalId","$modalEl","modal_1","toggleModal","modal_2","showModal","modal_3","hideModal","initModals","$48c8331f22e653e8$var$__assign","$48c8331f22e653e8$var$Default","bodyScrolling","edgeOffset","$48c8331f22e653e8$var$DefaultInstanceOptions","$48c8331f22e653e8$var$Drawer","_handleEscapeKey","inactive","$48c8331f22e653e8$export$319df2b10e87c8ec","drawerId","$drawerEl","drawer_1","toggleDrawer","drawer_2","hideDrawer","drawer_3","showDrawer","initDrawers","$d9a3b96db6d5dbb4$var$__assign","$d9a3b96db6d5dbb4$var$Default","defaultTabId","$d9a3b96db6d5dbb4$var$DefaultInstanceOptions","$d9a3b96db6d5dbb4$var$Tabs","tabsEl","_tabsEl","_activeTab","getTab","setActiveTab","getActiveTab","forceShow","$d9a3b96db6d5dbb4$export$c92e8f569ad2976f","$parentEl","tabItems","initTabs","$91c32ed640e0fec6$var$__assign","$91c32ed640e0fec6$var$__spreadArray","$91c32ed640e0fec6$var$Default","$91c32ed640e0fec6$var$DefaultInstanceOptions","$91c32ed640e0fec6$var$Tooltip","_showHandler","_hideHandler","_removeKeydownListener","_setupKeydownListener","$91c32ed640e0fec6$export$8f2a38c1f9d9dc3e","tooltipId","$tooltipEl","initTooltips","$6aca18f5cd7d8b7b$var$__assign","$6aca18f5cd7d8b7b$var$__spreadArray","$6aca18f5cd7d8b7b$var$Default","$6aca18f5cd7d8b7b$var$DefaultInstanceOptions","$6aca18f5cd7d8b7b$var$Popover","$6aca18f5cd7d8b7b$export$200409e83b2a0dd4","popoverID","$popoverEl","initPopovers","$027785b5e7762569$var$__assign","$027785b5e7762569$var$Default","$027785b5e7762569$var$DefaultInstanceOptions","$027785b5e7762569$var$Dial","_parentEl","triggerEventTypes","_getTriggerEventTypes","_showEventHandler","_hideEventHandler","$027785b5e7762569$export$33aa68e0bfaa065d","dialId","$dialEl","initDials","$5252bf9f038f0bda$var$__assign","$5252bf9f038f0bda$var$Default","onIncrement","onDecrement","$5252bf9f038f0bda$var$DefaultInstanceOptions","$5252bf9f038f0bda$var$InputCounter","incrementEl","decrementEl","_incrementEl","_decrementEl","_inputHandler","_incrementClickHandler","increment","_decrementClickHandler","decrement","getCurrentValue","updateOnIncrement","updateOnDecrement","$5252bf9f038f0bda$export$4352dd3b7a1676ab","$incrementEl","$decrementEl","initInputCounters","$d10e6c36a2232fe1$var$__assign","$d10e6c36a2232fe1$var$Default","htmlEntities","contentType","onCopy","$d10e6c36a2232fe1$var$DefaultInstanceOptions","$d10e6c36a2232fe1$var$CopyClipboard","_triggerElClickHandler","getTargetValue","textToCopy","decodeHTML","tempTextArea","textarea","updateOnCopyCallback","$d10e6c36a2232fe1$export$ad4117886fd6cf74","$7c39ee59de2954f9$var$_arrayLikeToArray","$7c39ee59de2954f9$var$_callSuper","$7c39ee59de2954f9$var$_getPrototypeOf","$7c39ee59de2954f9$var$_possibleConstructorReturn","ReferenceError","$7c39ee59de2954f9$var$_isNativeReflectConstruct","construct","$7c39ee59de2954f9$var$_classCallCheck","$7c39ee59de2954f9$var$_defineProperties","$7c39ee59de2954f9$var$_toPropertyKey","$7c39ee59de2954f9$var$_toPrimitive","$7c39ee59de2954f9$var$_createClass","$7c39ee59de2954f9$var$_get","$7c39ee59de2954f9$var$_superPropBase","$7c39ee59de2954f9$var$_inherits","$7c39ee59de2954f9$var$_setPrototypeOf","$7c39ee59de2954f9$var$_slicedToArray","$7c39ee59de2954f9$var$_arrayWithHoles","$7c39ee59de2954f9$var$_iterableToArrayLimit","$7c39ee59de2954f9$var$_unsupportedIterableToArray","$7c39ee59de2954f9$var$_nonIterableRest","$7c39ee59de2954f9$var$_toConsumableArray","$7c39ee59de2954f9$var$_arrayWithoutHoles","$7c39ee59de2954f9$var$_iterableToArray","$7c39ee59de2954f9$var$_nonIterableSpread","$7c39ee59de2954f9$var$_typeof","$7c39ee59de2954f9$var$hasProperty","$7c39ee59de2954f9$var$lastItemOf","$7c39ee59de2954f9$var$pushUnique","$7c39ee59de2954f9$var$stringToArray","$7c39ee59de2954f9$var$isInRange","testVal","minOK","$7c39ee59de2954f9$var$createTagRepeat","openTagSrc","$7c39ee59de2954f9$var$optimizeTemplateHTML","$7c39ee59de2954f9$var$stripTime","timeValue","$7c39ee59de2954f9$var$today","$7c39ee59de2954f9$var$dateValue","newDate","$7c39ee59de2954f9$var$addDays","$7c39ee59de2954f9$var$addMonths","monthsToSet","expectedMonth","$7c39ee59de2954f9$var$addYears","initClipboards","$7c39ee59de2954f9$var$dayOfTheWeekOf","baseDate","dayOfWeek","baseDay","$7c39ee59de2954f9$var$dayDiff","$7c39ee59de2954f9$var$startOfYearPeriod","years","$7c39ee59de2954f9$var$reFormatTokens","$7c39ee59de2954f9$var$reNonDateParts","$7c39ee59de2954f9$var$knownFormats","$7c39ee59de2954f9$var$parseFns","monthIndex","monthName","compareNames","$7c39ee59de2954f9$var$normalizeMonth","$7c39ee59de2954f9$var$formatFns","$7c39ee59de2954f9$var$padZero","daysShort","yyyy","$7c39ee59de2954f9$var$parseFormatString","separators","partFormatters","partParserKeys","dateParts","dtParts","origDate","$7c39ee59de2954f9$var$parseDate","toValue","_date","$7c39ee59de2954f9$var$formatDate","dateObj","toDisplay","$7c39ee59de2954f9$var$listenerRegistry","$7c39ee59de2954f9$var$_EventTarget$prototyp","EventTarget","$7c39ee59de2954f9$var$addEventListener","$7c39ee59de2954f9$var$removeEventListener","$7c39ee59de2954f9$var$registerListeners","registered","listener","$7c39ee59de2954f9$var$unregisterListeners","$7c39ee59de2954f9$var$getComposedPath","getComposedPath","$7c39ee59de2954f9$var$findElementInEventPath","$7c39ee59de2954f9$var$findFromPath","$7c39ee59de2954f9$var$locales","daysMin","titleFormat","$7c39ee59de2954f9$var$defaultOptions","autohide","beforeShowDay","beforeShowDecade","beforeShowMonth","beforeShowYear","calendarWeeks","clearBtn","dateDelimiter","datesDisabled","daysOfWeekDisabled","daysOfWeekHighlighted","defaultViewDate","disableTouchKeyboard","maxNumberOfDates","maxView","nextArrow","pickLevel","prevArrow","showDaysOfWeek","showOnClick","showOnFocus","startView","todayBtn","todayBtnMode","todayHighlight","updateOnBlur","$7c39ee59de2954f9$var$range","$7c39ee59de2954f9$var$parseHTML","createContextualFragment","$7c39ee59de2954f9$var$hideElement","styleDisplay","$7c39ee59de2954f9$var$showElement","$7c39ee59de2954f9$var$emptyChildNodes","$7c39ee59de2954f9$var$defaultLang","$7c39ee59de2954f9$var$defaultFormat","$7c39ee59de2954f9$var$defaultWeekStart","$7c39ee59de2954f9$var$sanitizeDOW","dow","$7c39ee59de2954f9$var$validateDate","origValue","$7c39ee59de2954f9$var$validateViewId","viewId","$7c39ee59de2954f9$var$processOptions","datepicker","lang","inOpts","origLocale","weekEnd","startOfWeek","hasToDisplay","hasToValue","validFormatString","minDt","maxDt","dates","viewDate","wkStart","multidate","newPickLevel","newMaxView","newStartView","$7c39ee59de2954f9$var$pickerTemplate","$7c39ee59de2954f9$var$daysTemplate","$7c39ee59de2954f9$var$calendarWeeksTemplate","$7c39ee59de2954f9$var$View","View","picker","isMinView","updateFocus","beforeShow","newChildNodes","_el$classList","extraClasses","DocumentFragment","$7c39ee59de2954f9$var$DaysView","_View","DaysView","cellClass","onConstruction","updateDOW","switchLabelFormat","weeksElem","weeks","viewYear","viewMonth","firstOfMonth","_this$picker$datepick","rangepicker","_this2","switchLabel","setViewSwitchLabel","setPrevBtnDisabled","setNextBtnDisabled","thuOfTheWeek","firstThu","_this2$range","performBeforeHook","_this3","$7c39ee59de2954f9$var$computeMonthRange","thisYear","_range","_range$","_range$2","$7c39ee59de2954f9$var$MonthsView","MonthsView","monthNames","minDateObj","maxDateObj","yrOutOfRange","isMinYear","isMaxYear","_range2","$7c39ee59de2954f9$var$YearsView","YearsView","navStep","beforeShowOption","$7c39ee59de2954f9$var$triggerDatepickerEvent","currentView","$7c39ee59de2954f9$var$goToPrevOrNext","newViewDate","_datepicker$config","_datepicker$picker","changeFocus","$7c39ee59de2954f9$var$switchView","changeView","$7c39ee59de2954f9$var$unfocus","$7c39ee59de2954f9$var$goToSelectedMonthOrYear","$7c39ee59de2954f9$var$onClickTodayBtn","$7c39ee59de2954f9$var$onClickClearBtn","$7c39ee59de2954f9$var$onClickViewSwitch","$7c39ee59de2954f9$var$onClickPrevBtn","$7c39ee59de2954f9$var$onClickNextBtn","$7c39ee59de2954f9$var$onClickView","_datepicker$picker$cu","$7c39ee59de2954f9$var$onClickPicker","inputField","$7c39ee59de2954f9$var$processPickerOptions","controls","prevBtn","nextBtn","_picker$datepicker$co","$7c39ee59de2954f9$var$computeResetViewDate","$7c39ee59de2954f9$var$setViewDate","oldViewDate","_picker$currentView","$7c39ee59de2954f9$var$getTextDirection","$7c39ee59de2954f9$var$Picker","Picker","buttonClass","_element$firstChild$c","_header$lastElementCh","viewSwitch","_footer$firstChild$ch","elementClass","views","inputDirection","exitEditMode","_this$element","_this$datepicker","_this$element$getBoun","calendarWidth","calendarHeight","_container$getBoundin","containerLeft","containerTop","containerWidth","_inputField$getBoundi","inputLeft","inputTop","inputWidth","inputHeight","_config$orientation","orientX","orientY","oldView","newView","_renderMethod","quickRender","renderMethod","$7c39ee59de2954f9$var$moveByArrowKey","addFn","testFn","$7c39ee59de2954f9$var$findNextAvailableOne","increase","$7c39ee59de2954f9$var$onKeydown","editMode","enterEditMode","$7c39ee59de2954f9$var$onFocus","_showing","$7c39ee59de2954f9$var$onMousedown","_active","_clicking","$7c39ee59de2954f9$var$onClickInput","$7c39ee59de2954f9$var$onPaste","$7c39ee59de2954f9$var$onClickOutside","pickerElem","$7c39ee59de2954f9$var$stringifyDates","$7c39ee59de2954f9$var$processInputDates","inputDates","origDates","datepickers","newDates","_dt","$7c39ee59de2954f9$var$refreshUI","$7c39ee59de2954f9$var$_setDate","$7c39ee59de2954f9$export$7235422eca03ec90","initialDates","inputDateValues","onMousedownDocument","lastArg","forceRender","$7c39ee59de2954f9$var$filterOptions","allowOneSidedRange","$7c39ee59de2954f9$var$setupDatepicker","changeDateListener","$7c39ee59de2954f9$var$onChangeDate","_updating","setDateOptions","changedSide","otherSide","changedDate","otherDate","$7c39ee59de2954f9$export$17334619f3ac2224","DateRangePicker","cleanOptions","_this$datepickers","datepicker0","datepicker1","$b94af47b4b1b850b$var$__assign","$b94af47b4b1b850b$var$Default","defaultDatepickerId","autoSelectToday","rangePicker","$b94af47b4b1b850b$var$DefaultInstanceOptions","$b94af47b4b1b850b$var$Datepicker","datepickerEl","_datepickerEl","_datepickerInstance","_getDatepickerOptions","getDatepickerInstance","getDates","setDates","datepickerOptions","$b94af47b4b1b850b$export$81c9f52a292162ae","$datepickerEl","autoselectToday","orientation_1","initDatepickers","initFlowbite","$948592d8c330c4e7$var$events","dayjs","ApexCharts","qrCodeGenerator","emailSpellChecker","$id","__options","__isOpen","__isMultiple","__context","__label","__button","displayValueFn","__displayValue","__isTyping","__open","__stopTyping","__selectActive","__close","__resetInput","__static","__nullable","__value","__input","__isStatic","__hold","$comboboxOption","isSelected","__optionKey","__selectOption","__ready","__compareBy","__inputName","__activateSelectedOrFirst","__startTyping","__getCurrentValue","selectionEnd","selectionDirection","activateSelected","firstSelectedValue","selectedItem","firstSelected","__toggleSelected","__isSelected","__hasSelected","__compare","activeOption","optionEl","__isOpenState","__determineDefaultOpenState","__toggle","defaultIsOpen","__orientation","$listboxOption","__activeEl","__items","__activate","__itemEl","__deactivate","$menuItem","activationStrategy","focusAfter","__contains","__hasLabel","__hasDescription","__switchEl","__inputValue","__inputId","isChecked","__buttonEl","firstFocusableEl","$focus","__panelEl","lastEl","buttonIdx","nextEls","__groupEl","__disabled","__option","__addOption","$radioOption","__isFirstOption","__change","__setActive","__active","__rootDisabled","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","FILTER_REJECT","FILTER_SKIP","FILTER_ACCEPT","__rootEl","__optionValues","__disabledOptions","__optionElsByValue","__focusOptionNext","__focusOptionPrev","__tabGroupEl","__tabEl","__addTab","__selectTab","__activeTabs","$tab","__manualActivation","$panel","__addPanel","defaultIndex","__selectedIndex","__tabs","__panels","morphBetween","templateFn","lastInputValue","undoModelUpdate","processInputValue","controller","AbortController","shouldRestoreCursor","cursorPosition","unformattedValue","newPosition","setInput","abort","signal","fullyHide","revertFunction","transitionStyles","persist","alias","dummy","setter","using","$d09a060543d6a2e2$var$getThreshold","$d09a060543d6a2e2$var$getRootMargin","$d09a060543d6a2e2$var$getLengthValue","dwellTimeout","lastEntry","hasEvaluated","isConfirmingDwell","clearDwellTimeout","confirmDwell","handleEntries","handleVisibilityChange","rawDuration","pendingEntries","forms","documents","emailsLayout","formsLayout","documentsLayout","savedSort","savedLayout","getCurrentSort","setSort","_saveSorting","getCurrentLayout","setLayout","_saveLayout","saved","_saveAll","isExpanded","defaultExpanded","setExpanded","$f9ccc1fa0d22629a$var$HRIS_LIBRARY_FORM_REPORTING_DEFAULT_FIELDS","_save","hasField","createScorecardWeightsComponent","interviewsNav","notesEditor","interviewChat","originalCreateParagraphNear","originalDeleteSelection","originalExitCode","ProseMirrorNode","originalJoinUp","originalJoinDown","originalJoinBackward","originalJoinForward","originalCommand","originalLift","originalLiftEmptyBlock","originalLiftListItem","originalNewlineInCode","originalSelectNodeBackward","originalSelectNodeForward","originalSelectParentNode","originalSelectTextblockEnd","originalSelectTextblockStart","originalSinkListItem","originalWrapIn","originalWrapInList","defaultFindSuggestionMatch"],"mappings":";;A,C,S+Sw1BQ,EA8CA,EAEA,EAsVA,EAwPA,EAOA,EAEA,E,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,S,E,C,E,O,G,E,U,C,E,O,C,C,C,S,E,C,E,G,E,E,C,E,C,E,E,E,C,E,G,C,M,O,C,M,E,C,I,E,C,G,E,K,E,K,C,oE,I,E,O,E,E,E,C,C,E,C,O,I,I,E,E,G,Q,E,C,I0Bt8CwB,EAM1B,EACA,EACA,EACA,E,EnByDF,EACA,EACA,EACA,EAydA,EA07CA,EACA,EAoGA,EACA,E,E,W,E,K,E,C,E,E,C,E,E,E,iB,O,I,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,C,I,E,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,I,E,E,Q,C,E,Q,S,C,C,C,E,O,M,C,E,C,G,C,ErTvlE0B,CAAC,MAAQ,0CAA0C,QAAQ,0CAA0C,QAAQ,2CAA2C,E,G,E,Q,S,C,C,C,ECAkB,EAAA,OAAA,CAApI,EAAA,OAAA,CAAe,AAA2H,WAAW,aAAa,I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AElB,IAAK,IAAM,KADX,EAAM,EAAU,SAAU,QACR,CAChB,cACA,UACA,UACA,gBACA,gBACA,cACA,YACA,eACA,gBACA,eACA,sBACA,gBACA,gBACA,gBACA,gBACA,gBACA,mBACA,iBACA,cACA,iBACA,wBACA,eACA,YACA,aACA,aACA,iBACA,kBACA,yBACA,2BACA,kCACA,qBACA,eACA,gBACA,qBACA,SACA,iBACA,kBACA,SACD,EACC,EAAM,EAAU,GAElB,OAAO,cAAc,CAAC,EAAI,WAAY,CACpC,MAAO,EACP,SAAU,CAAA,EACV,WAAY,CAAA,EACZ,aAAc,CAAA,CAChB,GACA,IAAM,EAAS,CAAC,EAChB,IAAK,IAAM,IAAO,CAChB,OACA,OACA,cACA,cACA,OACA,OACA,UACA,UACA,OACA,OACA,UACA,UACA,WACA,SACA,SACA,SACA,aACA,aACA,sBACA,cACA,sBACA,aACA,sBACA,aACA,kBACA,eACA,YACA,qBACA,qBACA,gBACA,gBACA,iBACA,kBACA,yBACA,wBACA,gBACA,kBACA,mBACD,CACC,EAAM,EAAQ,GAEhB,OAAO,cAAc,CAAC,EAAI,OAAQ,CAChC,MAAO,EACP,SAAU,CAAA,EACV,WAAY,CAAA,EACZ,aAAc,CAAA,CAChB,GACA,IAAM,EAAW,CAAC,EAClB,IAAK,IAAM,IAAO,CAChB,WACA,YACA,YACA,aACA,aACA,aACA,kBACA,kBACA,kBACA,oBACA,yBACA,mBACA,mBACA,cACA,gBACA,eACA,gBACA,uBACA,gBACA,SACA,SACA,aACA,gBACA,qBACD,CACC,EAAM,EAAU,GAElB,OAAO,cAAc,CAAC,EAAI,SAAU,CAClC,MAAO,EACP,SAAU,CAAA,EACV,WAAY,CAAA,EACZ,aAAc,CAAA,CAChB,GACA,IAAM,EAAU,CAAC,EACjB,IAAK,IAAM,IAAO,CAChB,WACA,iBACA,kBACA,iBACA,cACA,kBACA,6BACA,kBACA,cACA,uBACA,iBACD,CACC,EAAM,EAAS,GAEjB,OAAO,cAAc,CAAC,EAA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